/**
 * @license
 * Cesium - https://github.com/CesiumGS/cesium
 * Version 1.122
 *
 * 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.
 */
import{a as w}from"./chunk-RAYRECQS.js";import{a as O}from"./chunk-6KLVDWWE.js";import{a as S,b as c}from"./chunk-6P5KAIBX.js";import{e as u}from"./chunk-4FSVUTPL.js";function f(e,t,n){this.x=O(e,0),this.y=O(t,0),this.z=O(n,0)}f.fromSpherical=function(e,t){c.typeOf.object("spherical",e),u(t)||(t=new f);let n=e.clock,r=e.cone,a=O(e.magnitude,1),i=a*Math.sin(r);return t.x=i*Math.cos(n),t.y=i*Math.sin(n),t.z=a*Math.cos(r),t},f.fromElements=function(e,t,n,r){return u(r)?(r.x=e,r.y=t,r.z=n,r):new f(e,t,n)},f.clone=function(e,t){if(u(e))return u(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t):new f(e.x,e.y,e.z)},f.fromCartesian4=f.clone,f.packedLength=3,f.pack=function(e,t,n){return c.typeOf.object("value",e),c.defined("array",t),n=O(n,0),t[n++]=e.x,t[n++]=e.y,t[n]=e.z,t},f.unpack=function(e,t,n){return c.defined("array",e),t=O(t,0),u(n)||(n=new f),n.x=e[t++],n.y=e[t++],n.z=e[t],n},f.packArray=function(e,t){c.defined("array",e);let n=e.length,r=3*n;if(u(t)){if(!Array.isArray(t)&&t.length!==r)throw new S("If result is a typed array, it must have exactly array.length * 3 elements");t.length!==r&&(t.length=r)}else t=new Array(r);for(let r=0;r<n;++r)f.pack(e[r],t,3*r);return t},f.unpackArray=function(e,t){if(c.defined("array",e),c.typeOf.number.greaterThanOrEquals("array.length",e.length,3),e.length%3!=0)throw new S("array length must be a multiple of 3.");let n=e.length;u(t)?t.length=n/3:t=new Array(n/3);for(let r=0;r<n;r+=3){let n=r/3;t[n]=f.unpack(e,r,t[n])}return t},f.fromArray=f.unpack,f.maximumComponent=function(e){return c.typeOf.object("cartesian",e),Math.max(e.x,e.y,e.z)},f.minimumComponent=function(e){return c.typeOf.object("cartesian",e),Math.min(e.x,e.y,e.z)},f.minimumByComponent=function(e,t,n){return c.typeOf.object("first",e),c.typeOf.object("second",t),c.typeOf.object("result",n),n.x=Math.min(e.x,t.x),n.y=Math.min(e.y,t.y),n.z=Math.min(e.z,t.z),n},f.maximumByComponent=function(e,t,n){return c.typeOf.object("first",e),c.typeOf.object("second",t),c.typeOf.object("result",n),n.x=Math.max(e.x,t.x),n.y=Math.max(e.y,t.y),n.z=Math.max(e.z,t.z),n},f.clamp=function(e,t,n,r){c.typeOf.object("value",e),c.typeOf.object("min",t),c.typeOf.object("max",n),c.typeOf.object("result",r);let a=w.clamp(e.x,t.x,n.x),i=w.clamp(e.y,t.y,n.y),u=w.clamp(e.z,t.z,n.z);return r.x=a,r.y=i,r.z=u,r},f.magnitudeSquared=function(e){return c.typeOf.object("cartesian",e),e.x*e.x+e.y*e.y+e.z*e.z},f.magnitude=function(e){return Math.sqrt(f.magnitudeSquared(e))};var G=new f;f.distance=function(e,t){return c.typeOf.object("left",e),c.typeOf.object("right",t),f.subtract(e,t,G),f.magnitude(G)},f.distanceSquared=function(e,t){return c.typeOf.object("left",e),c.typeOf.object("right",t),f.subtract(e,t,G),f.magnitudeSquared(G)},f.normalize=function(e,t){c.typeOf.object("cartesian",e),c.typeOf.object("result",t);let n=f.magnitude(e);if(t.x=e.x/n,t.y=e.y/n,t.z=e.z/n,isNaN(t.x)||isNaN(t.y)||isNaN(t.z))throw new S("normalized result is not a number");return t},f.dot=function(e,t){return c.typeOf.object("left",e),c.typeOf.object("right",t),e.x*t.x+e.y*t.y+e.z*t.z},f.multiplyComponents=function(e,t,n){return c.typeOf.object("left",e),c.typeOf.object("right",t),c.typeOf.object("result",n),n.x=e.x*t.x,n.y=e.y*t.y,n.z=e.z*t.z,n},f.divideComponents=function(e,t,n){return c.typeOf.object("left",e),c.typeOf.object("right",t),c.typeOf.object("result",n),n.x=e.x/t.x,n.y=e.y/t.y,n.z=e.z/t.z,n},f.add=function(e,t,n){return c.typeOf.object("left",e),c.typeOf.object("right",t),c.typeOf.object("result",n),n.x=e.x+t.x,n.y=e.y+t.y,n.z=e.z+t.z,n},f.subtract=function(e,t,n){return c.typeOf.object("left",e),c.typeOf.object("right",t),c.typeOf.object("result",n),n.x=e.x-t.x,n.y=e.y-t.y,n.z=e.z-t.z,n},f.multiplyByScalar=function(e,t,n){return c.typeOf.object("cartesian",e),c.typeOf.number("scalar",t),c.typeOf.object("result",n),n.x=e.x*t,n.y=e.y*t,n.z=e.z*t,n},f.divideByScalar=function(e,t,n){return c.typeOf.object("cartesian",e),c.typeOf.number("scalar",t),c.typeOf.object("result",n),n.x=e.x/t,n.y=e.y/t,n.z=e.z/t,n},f.negate=function(e,t){return c.typeOf.object("cartesian",e),c.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t.z=-e.z,t},f.abs=function(e,t){return c.typeOf.object("cartesian",e),c.typeOf.object("result",t),t.x=Math.abs(e.x),t.y=Math.abs(e.y),t.z=Math.abs(e.z),t};var ln=new f;f.lerp=function(e,t,n,r){return c.typeOf.object("start",e),c.typeOf.object("end",t),c.typeOf.number("t",n),c.typeOf.object("result",r),f.multiplyByScalar(t,n,ln),r=f.multiplyByScalar(e,1-n,r),f.add(ln,r,r)};var Y=new f,yn=new f;f.angleBetween=function(e,t){c.typeOf.object("left",e),c.typeOf.object("right",t),f.normalize(e,Y),f.normalize(t,yn);let n=f.dot(Y,yn),r=f.magnitude(f.cross(Y,yn,Y));return Math.atan2(r,n)};var Xn=new f;f.mostOrthogonalAxis=function(e,t){c.typeOf.object("cartesian",e),c.typeOf.object("result",t);let n=f.normalize(e,Xn);return f.abs(n,n),t=n.x<=n.y?n.x<=n.z?f.clone(f.UNIT_X,t):f.clone(f.UNIT_Z,t):n.y<=n.z?f.clone(f.UNIT_Y,t):f.clone(f.UNIT_Z,t)},f.projectVector=function(e,t,n){c.defined("a",e),c.defined("b",t),c.defined("result",n);let r=f.dot(e,t)/f.dot(t,t);return f.multiplyByScalar(t,r,n)},f.equals=function(e,t){return e===t||u(e)&&u(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z},f.equalsArray=function(e,t,n){return e.x===t[n]&&e.y===t[n+1]&&e.z===t[n+2]},f.equalsEpsilon=function(e,t,n,r){return e===t||u(e)&&u(t)&&w.equalsEpsilon(e.x,t.x,n,r)&&w.equalsEpsilon(e.y,t.y,n,r)&&w.equalsEpsilon(e.z,t.z,n,r)},f.cross=function(e,t,n){c.typeOf.object("left",e),c.typeOf.object("right",t),c.typeOf.object("result",n);let r=e.x,a=e.y,i=e.z,u=t.x,o=t.y,l=t.z,f=a*l-i*o,s=i*u-r*l,y=r*o-a*u;return n.x=f,n.y=s,n.z=y,n},f.midpoint=function(e,t,n){return c.typeOf.object("left",e),c.typeOf.object("right",t),c.typeOf.object("result",n),n.x=.5*(e.x+t.x),n.y=.5*(e.y+t.y),n.z=.5*(e.z+t.z),n},f.fromDegrees=function(e,t,n,r,a){return c.typeOf.number("longitude",e),c.typeOf.number("latitude",t),e=w.toRadians(e),t=w.toRadians(t),f.fromRadians(e,t,n,r,a)};var C=new f,v=new f;f._ellipsoidRadiiSquared=new f(40680631590769,40680631590769,40408299984661.445),f.fromRadians=function(e,t,n,r,a){c.typeOf.number("longitude",e),c.typeOf.number("latitude",t),n=O(n,0);let i=u(r)?r.radiiSquared:f._ellipsoidRadiiSquared,o=Math.cos(t);C.x=o*Math.cos(e),C.y=o*Math.sin(e),C.z=Math.sin(t),C=f.normalize(C,C),f.multiplyComponents(i,C,v);let l=Math.sqrt(f.dot(C,v));return v=f.divideByScalar(v,l,v),C=f.multiplyByScalar(C,n,C),u(a)||(a=new f),f.add(v,C,a)},f.fromDegreesArray=function(e,t,n){if(c.defined("coordinates",e),e.length<2||e.length%2!=0)throw new S("the number of coordinates must be a multiple of 2 and at least 2");let r=e.length;u(n)?n.length=r/2:n=new Array(r/2);for(let a=0;a<r;a+=2){let r=e[a],i=e[a+1],u=a/2;n[u]=f.fromDegrees(r,i,0,t,n[u])}return n},f.fromRadiansArray=function(e,t,n){if(c.defined("coordinates",e),e.length<2||e.length%2!=0)throw new S("the number of coordinates must be a multiple of 2 and at least 2");let r=e.length;u(n)?n.length=r/2:n=new Array(r/2);for(let a=0;a<r;a+=2){let r=e[a],i=e[a+1],u=a/2;n[u]=f.fromRadians(r,i,0,t,n[u])}return n},f.fromDegreesArrayHeights=function(e,t,n){if(c.defined("coordinates",e),e.length<3||e.length%3!=0)throw new S("the number of coordinates must be a multiple of 3 and at least 3");let r=e.length;u(n)?n.length=r/3:n=new Array(r/3);for(let a=0;a<r;a+=3){let r=e[a],i=e[a+1],u=e[a+2],o=a/3;n[o]=f.fromDegrees(r,i,u,t,n[o])}return n},f.fromRadiansArrayHeights=function(e,t,n){if(c.defined("coordinates",e),e.length<3||e.length%3!=0)throw new S("the number of coordinates must be a multiple of 3 and at least 3");let r=e.length;u(n)?n.length=r/3:n=new Array(r/3);for(let a=0;a<r;a+=3){let r=e[a],i=e[a+1],u=e[a+2],o=a/3;n[o]=f.fromRadians(r,i,u,t,n[o])}return n},f.ZERO=Object.freeze(new f(0,0,0)),f.ONE=Object.freeze(new f(1,1,1)),f.UNIT_X=Object.freeze(new f(1,0,0)),f.UNIT_Y=Object.freeze(new f(0,1,0)),f.UNIT_Z=Object.freeze(new f(0,0,1)),f.prototype.clone=function(e){return f.clone(this,e)},f.prototype.equals=function(e){return f.equals(this,e)},f.prototype.equalsEpsilon=function(e,t,n){return f.equalsEpsilon(this,e,t,n)},f.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z})`};var y=f,Yn=new y,Gn=new y;function Hn(e,t,n,r,a){if(!u(e))throw new S("cartesian is required.");if(!u(t))throw new S("oneOverRadii is required.");if(!u(n))throw new S("oneOverRadiiSquared is required.");if(!u(r))throw new S("centerToleranceSquared is required.");let i=e.x,o=e.y,c=e.z,l=t.x,f=t.y,s=t.z,p=i*i*l*l,d=o*o*f*f,m=c*c*s*s,h=p+d+m,b=Math.sqrt(1/h),O=y.multiplyByScalar(e,b,Yn);if(h<r)return isFinite(b)?y.clone(O,a):void 0;let g=n.x,x=n.y,j=n.z,z=Gn;z.x=O.x*g*2,z.y=O.y*x*2,z.z=O.z*j*2;let q,v,E,R,A,_,M,T,C,N,I,F=(1-b)*y.magnitude(e)/(.5*y.magnitude(z)),B=0;do{F-=B,E=1/(1+F*g),R=1/(1+F*x),A=1/(1+F*j),_=E*E,M=R*R,T=A*A,C=_*E,N=M*R,I=T*A,q=p*_+d*M+m*T-1,v=p*C*g+d*N*x+m*I*j,B=q/(-2*v)}while(Math.abs(q)>w.EPSILON12);return u(a)?(a.x=i*E,a.y=o*R,a.z=c*A,a):new y(i*E,o*R,c*A)}var H=Hn;function g(e,t,n){this.longitude=O(e,0),this.latitude=O(t,0),this.height=O(n,0)}g.fromRadians=function(e,t,n,r){return c.typeOf.number("longitude",e),c.typeOf.number("latitude",t),n=O(n,0),u(r)?(r.longitude=e,r.latitude=t,r.height=n,r):new g(e,t,n)},g.fromDegrees=function(e,t,n,r){return c.typeOf.number("longitude",e),c.typeOf.number("latitude",t),e=w.toRadians(e),t=w.toRadians(t),g.fromRadians(e,t,n,r)};var Qn=new y,Kn=new y,Jn=new y;g._ellipsoidOneOverRadii=new y(1/6378137,1/6378137,1/6356752.314245179),g._ellipsoidOneOverRadiiSquared=new y(1/40680631590769,1/40680631590769,1/40408299984661.445),g._ellipsoidCenterToleranceSquared=w.EPSILON1,g.fromCartesian=function(e,t,n){let r=u(t)?t.oneOverRadii:g._ellipsoidOneOverRadii,a=u(t)?t.oneOverRadiiSquared:g._ellipsoidOneOverRadiiSquared,i=u(t)?t._centerToleranceSquared:g._ellipsoidCenterToleranceSquared,o=H(e,r,a,i,Kn);if(!u(o))return;let c=y.multiplyComponents(o,a,Qn);c=y.normalize(c,c);let l=y.subtract(e,o,Jn),f=Math.atan2(c.y,c.x),s=Math.asin(c.z),p=w.sign(y.dot(l,e))*y.magnitude(l);return u(n)?(n.longitude=f,n.latitude=s,n.height=p,n):new g(f,s,p)},g.toCartesian=function(e,t,n){return c.defined("cartographic",e),y.fromRadians(e.longitude,e.latitude,e.height,t,n)},g.clone=function(e,t){if(u(e))return u(t)?(t.longitude=e.longitude,t.latitude=e.latitude,t.height=e.height,t):new g(e.longitude,e.latitude,e.height)},g.equals=function(e,t){return e===t||u(e)&&u(t)&&e.longitude===t.longitude&&e.latitude===t.latitude&&e.height===t.height},g.equalsEpsilon=function(e,t,n){return n=O(n,0),e===t||u(e)&&u(t)&&Math.abs(e.longitude-t.longitude)<=n&&Math.abs(e.latitude-t.latitude)<=n&&Math.abs(e.height-t.height)<=n},g.ZERO=Object.freeze(new g(0,0,0)),g.prototype.clone=function(e){return g.clone(this,e)},g.prototype.equals=function(e){return g.equals(this,e)},g.prototype.equalsEpsilon=function(e,t){return g.equalsEpsilon(this,e,t)},g.prototype.toString=function(){return`(${this.longitude}, ${this.latitude}, ${this.height})`};var D=g;function a(e,t){this.x=O(e,0),this.y=O(t,0)}a.fromElements=function(e,t,n){return u(n)?(n.x=e,n.y=t,n):new a(e,t)},a.clone=function(e,t){if(u(e))return u(t)?(t.x=e.x,t.y=e.y,t):new a(e.x,e.y)},a.fromCartesian3=a.clone,a.fromCartesian4=a.clone,a.packedLength=2,a.pack=function(e,t,n){return c.typeOf.object("value",e),c.defined("array",t),n=O(n,0),t[n++]=e.x,t[n]=e.y,t},a.unpack=function(e,t,n){return c.defined("array",e),t=O(t,0),u(n)||(n=new a),n.x=e[t++],n.y=e[t],n},a.packArray=function(e,t){c.defined("array",e);let n=e.length,r=2*n;if(u(t)){if(!Array.isArray(t)&&t.length!==r)throw new S("If result is a typed array, it must have exactly array.length * 2 elements");t.length!==r&&(t.length=r)}else t=new Array(r);for(let r=0;r<n;++r)a.pack(e[r],t,2*r);return t},a.unpackArray=function(e,t){if(c.defined("array",e),c.typeOf.number.greaterThanOrEquals("array.length",e.length,2),e.length%2!=0)throw new S("array length must be a multiple of 2.");let n=e.length;u(t)?t.length=n/2:t=new Array(n/2);for(let r=0;r<n;r+=2){let n=r/2;t[n]=a.unpack(e,r,t[n])}return t},a.fromArray=a.unpack,a.maximumComponent=function(e){return c.typeOf.object("cartesian",e),Math.max(e.x,e.y)},a.minimumComponent=function(e){return c.typeOf.object("cartesian",e),Math.min(e.x,e.y)},a.minimumByComponent=function(e,t,n){return c.typeOf.object("first",e),c.typeOf.object("second",t),c.typeOf.object("result",n),n.x=Math.min(e.x,t.x),n.y=Math.min(e.y,t.y),n},a.maximumByComponent=function(e,t,n){return c.typeOf.object("first",e),c.typeOf.object("second",t),c.typeOf.object("result",n),n.x=Math.max(e.x,t.x),n.y=Math.max(e.y,t.y),n},a.clamp=function(e,t,n,r){c.typeOf.object("value",e),c.typeOf.object("min",t),c.typeOf.object("max",n),c.typeOf.object("result",r);let a=w.clamp(e.x,t.x,n.x),i=w.clamp(e.y,t.y,n.y);return r.x=a,r.y=i,r},a.magnitudeSquared=function(e){return c.typeOf.object("cartesian",e),e.x*e.x+e.y*e.y},a.magnitude=function(e){return Math.sqrt(a.magnitudeSquared(e))};var Q=new a;a.distance=function(e,t){return c.typeOf.object("left",e),c.typeOf.object("right",t),a.subtract(e,t,Q),a.magnitude(Q)},a.distanceSquared=function(e,t){return c.typeOf.object("left",e),c.typeOf.object("right",t),a.subtract(e,t,Q),a.magnitudeSquared(Q)},a.normalize=function(e,t){c.typeOf.object("cartesian",e),c.typeOf.object("result",t);let n=a.magnitude(e);if(t.x=e.x/n,t.y=e.y/n,isNaN(t.x)||isNaN(t.y))throw new S("normalized result is not a number");return t},a.dot=function(e,t){return c.typeOf.object("left",e),c.typeOf.object("right",t),e.x*t.x+e.y*t.y},a.cross=function(e,t){return c.typeOf.object("left",e),c.typeOf.object("right",t),e.x*t.y-e.y*t.x},a.multiplyComponents=function(e,t,n){return c.typeOf.object("left",e),c.typeOf.object("right",t),c.typeOf.object("result",n),n.x=e.x*t.x,n.y=e.y*t.y,n},a.divideComponents=function(e,t,n){return c.typeOf.object("left",e),c.typeOf.object("right",t),c.typeOf.object("result",n),n.x=e.x/t.x,n.y=e.y/t.y,n},a.add=function(e,t,n){return c.typeOf.object("left",e),c.typeOf.object("right",t),c.typeOf.object("result",n),n.x=e.x+t.x,n.y=e.y+t.y,n},a.subtract=function(e,t,n){return c.typeOf.object("left",e),c.typeOf.object("right",t),c.typeOf.object("result",n),n.x=e.x-t.x,n.y=e.y-t.y,n},a.multiplyByScalar=function(e,t,n){return c.typeOf.object("cartesian",e),c.typeOf.number("scalar",t),c.typeOf.object("result",n),n.x=e.x*t,n.y=e.y*t,n},a.divideByScalar=function(e,t,n){return c.typeOf.object("cartesian",e),c.typeOf.number("scalar",t),c.typeOf.object("result",n),n.x=e.x/t,n.y=e.y/t,n},a.negate=function(e,t){return c.typeOf.object("cartesian",e),c.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t},a.abs=function(e,t){return c.typeOf.object("cartesian",e),c.typeOf.object("result",t),t.x=Math.abs(e.x),t.y=Math.abs(e.y),t};var Cn=new a;a.lerp=function(e,t,n,r){return c.typeOf.object("start",e),c.typeOf.object("end",t),c.typeOf.number("t",n),c.typeOf.object("result",r),a.multiplyByScalar(t,n,Cn),r=a.multiplyByScalar(e,1-n,r),a.add(Cn,r,r)};var Tn=new a,Nn=new a;a.angleBetween=function(e,t){return c.typeOf.object("left",e),c.typeOf.object("right",t),a.normalize(e,Tn),a.normalize(t,Nn),w.acosClamped(a.dot(Tn,Nn))};var ne=new a;a.mostOrthogonalAxis=function(e,t){c.typeOf.object("cartesian",e),c.typeOf.object("result",t);let n=a.normalize(e,ne);return a.abs(n,n),t=n.x<=n.y?a.clone(a.UNIT_X,t):a.clone(a.UNIT_Y,t)},a.equals=function(e,t){return e===t||u(e)&&u(t)&&e.x===t.x&&e.y===t.y},a.equalsArray=function(e,t,n){return e.x===t[n]&&e.y===t[n+1]},a.equalsEpsilon=function(e,t,n,r){return e===t||u(e)&&u(t)&&w.equalsEpsilon(e.x,t.x,n,r)&&w.equalsEpsilon(e.y,t.y,n,r)},a.ZERO=Object.freeze(new a(0,0)),a.ONE=Object.freeze(new a(1,1)),a.UNIT_X=Object.freeze(new a(1,0)),a.UNIT_Y=Object.freeze(new a(0,1)),a.prototype.clone=function(e){return a.clone(this,e)},a.prototype.equals=function(e){return a.equals(this,e)},a.prototype.equalsEpsilon=function(e,t,n){return a.equalsEpsilon(this,e,t,n)},a.prototype.toString=function(){return`(${this.x}, ${this.y})`};var mn=a;function Fn(e,t,n,r){t=O(t,0),n=O(n,0),r=O(r,0),c.typeOf.number.greaterThanOrEquals("x",t,0),c.typeOf.number.greaterThanOrEquals("y",n,0),c.typeOf.number.greaterThanOrEquals("z",r,0),e._radii=new y(t,n,r),e._radiiSquared=new y(t*t,n*n,r*r),e._radiiToTheFourth=new y(t*t*t*t,n*n*n*n,r*r*r*r),e._oneOverRadii=new y(0===t?0:1/t,0===n?0:1/n,0===r?0:1/r),e._oneOverRadiiSquared=new y(0===t?0:1/(t*t),0===n?0:1/(n*n),0===r?0:1/(r*r)),e._minimumRadius=Math.min(t,n,r),e._maximumRadius=Math.max(t,n,r),e._centerToleranceSquared=w.EPSILON1,0!==e._radiiSquared.z&&(e._squaredXOverSquaredZ=e._radiiSquared.x/e._radiiSquared.z)}function b(e,t,n){this._radii=void 0,this._radiiSquared=void 0,this._radiiToTheFourth=void 0,this._oneOverRadii=void 0,this._oneOverRadiiSquared=void 0,this._minimumRadius=void 0,this._maximumRadius=void 0,this._centerToleranceSquared=void 0,this._squaredXOverSquaredZ=void 0,Fn(this,e,t,n)}Object.defineProperties(b.prototype,{radii:{get:function(){return this._radii}},radiiSquared:{get:function(){return this._radiiSquared}},radiiToTheFourth:{get:function(){return this._radiiToTheFourth}},oneOverRadii:{get:function(){return this._oneOverRadii}},oneOverRadiiSquared:{get:function(){return this._oneOverRadiiSquared}},minimumRadius:{get:function(){return this._minimumRadius}},maximumRadius:{get:function(){return this._maximumRadius}}}),b.clone=function(e,t){if(!u(e))return;let n=e._radii;return u(t)?(y.clone(n,t._radii),y.clone(e._radiiSquared,t._radiiSquared),y.clone(e._radiiToTheFourth,t._radiiToTheFourth),y.clone(e._oneOverRadii,t._oneOverRadii),y.clone(e._oneOverRadiiSquared,t._oneOverRadiiSquared),t._minimumRadius=e._minimumRadius,t._maximumRadius=e._maximumRadius,t._centerToleranceSquared=e._centerToleranceSquared,t):new b(n.x,n.y,n.z)},b.fromCartesian3=function(e,t){return u(t)||(t=new b),u(e)&&Fn(t,e.x,e.y,e.z),t},b.WGS84=Object.freeze(new b(6378137,6378137,6356752.314245179)),b.UNIT_SPHERE=Object.freeze(new b(1,1,1)),b.MOON=Object.freeze(new b(w.LUNAR_RADIUS,w.LUNAR_RADIUS,w.LUNAR_RADIUS)),b._default=b.WGS84,Object.defineProperties(b,{default:{get:function(){return b._default},set:function(e){c.typeOf.object("value",e),b._default=e,y._ellipsoidRadiiSquared=e.radiiSquared,D._ellipsoidOneOverRadii=e.oneOverRadii,D._ellipsoidOneOverRadiiSquared=e.oneOverRadiiSquared,D._ellipsoidCenterToleranceSquared=e._centerToleranceSquared}}}),b.prototype.clone=function(e){return b.clone(this,e)},b.packedLength=y.packedLength,b.pack=function(e,t,n){return c.typeOf.object("value",e),c.defined("array",t),n=O(n,0),y.pack(e._radii,t,n),t},b.unpack=function(e,t,n){c.defined("array",e),t=O(t,0);let r=y.unpack(e,t);return b.fromCartesian3(r,n)},b.prototype.geocentricSurfaceNormal=y.normalize,b.prototype.geodeticSurfaceNormalCartographic=function(e,t){c.typeOf.object("cartographic",e);let n=e.longitude,r=e.latitude,a=Math.cos(r),i=a*Math.cos(n),o=a*Math.sin(n),l=Math.sin(r);return u(t)||(t=new y),t.x=i,t.y=o,t.z=l,y.normalize(t,t)},b.prototype.geodeticSurfaceNormal=function(e,t){if(c.typeOf.object("cartesian",e),isNaN(e.x)||isNaN(e.y)||isNaN(e.z))throw new S("cartesian has a NaN component");if(!y.equalsEpsilon(e,y.ZERO,w.EPSILON14))return u(t)||(t=new y),t=y.multiplyComponents(e,this._oneOverRadiiSquared,t),y.normalize(t,t)};var ee=new y,oe=new y;b.prototype.cartographicToCartesian=function(e,t){let n=ee,r=oe;this.geodeticSurfaceNormalCartographic(e,n),y.multiplyComponents(this._radiiSquared,n,r);let a=Math.sqrt(y.dot(n,r));return y.divideByScalar(r,a,r),y.multiplyByScalar(n,e.height,n),u(t)||(t=new y),y.add(r,n,t)},b.prototype.cartographicArrayToCartesianArray=function(e,t){c.defined("cartographics",e);let n=e.length;u(t)?t.length=n:t=new Array(n);for(let r=0;r<n;r++)t[r]=this.cartographicToCartesian(e[r],t[r]);return t};var te=new y,ce=new y,ie=new y;b.prototype.cartesianToCartographic=function(e,t){let n=this.scaleToGeodeticSurface(e,ce);if(!u(n))return;let r=this.geodeticSurfaceNormal(n,te),a=y.subtract(e,n,ie),i=Math.atan2(r.y,r.x),o=Math.asin(r.z),c=w.sign(y.dot(a,e))*y.magnitude(a);return u(t)?(t.longitude=i,t.latitude=o,t.height=c,t):new D(i,o,c)},b.prototype.cartesianArrayToCartographicArray=function(e,t){c.defined("cartesians",e);let n=e.length;u(t)?t.length=n:t=new Array(n);for(let r=0;r<n;++r)t[r]=this.cartesianToCartographic(e[r],t[r]);return t},b.prototype.scaleToGeodeticSurface=function(e,t){return H(e,this._oneOverRadii,this._oneOverRadiiSquared,this._centerToleranceSquared,t)},b.prototype.scaleToGeocentricSurface=function(e,t){c.typeOf.object("cartesian",e),u(t)||(t=new y);let n=e.x,r=e.y,a=e.z,i=this._oneOverRadiiSquared,o=1/Math.sqrt(n*n*i.x+r*r*i.y+a*a*i.z);return y.multiplyByScalar(e,o,t)},b.prototype.transformPositionToScaledSpace=function(e,t){return u(t)||(t=new y),y.multiplyComponents(e,this._oneOverRadii,t)},b.prototype.transformPositionFromScaledSpace=function(e,t){return u(t)||(t=new y),y.multiplyComponents(e,this._radii,t)},b.prototype.equals=function(e){return this===e||u(e)&&y.equals(this._radii,e._radii)},b.prototype.toString=function(){return this._radii.toString()},b.prototype.getSurfaceNormalIntersectionWithZAxis=function(e,t,n){if(c.typeOf.object("position",e),!w.equalsEpsilon(this._radii.x,this._radii.y,w.EPSILON15))throw new S("Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y)");c.typeOf.number.greaterThan("Ellipsoid.radii.z",this._radii.z,0),t=O(t,0);let r=this._squaredXOverSquaredZ;if(u(n)||(n=new y),n.x=0,n.y=0,n.z=e.z*(1-r),!(Math.abs(n.z)>=this._radii.z-t))return n};var fe=new y;b.prototype.getLocalCurvature=function(e,t){c.typeOf.object("surfacePosition",e),u(t)||(t=new mn);let n=this.getSurfaceNormalIntersectionWithZAxis(e,0,fe),r=y.distance(e,n),a=r*(this.minimumRadius*r/this.maximumRadius**2)**2;return mn.fromElements(1/r,1/a,t)};var re=[.14887433898163,.43339539412925,.67940956829902,.86506336668898,.97390652851717,0],pe=[.29552422471475,.26926671930999,.21908636251598,.14945134915058,.066671344308684,0];function xn(e,t,n){c.typeOf.number("a",e),c.typeOf.number("b",t),c.typeOf.func("func",n);let r=.5*(t+e),a=.5*(t-e),i=0;for(let e=0;e<5;e++){let t=a*re[e];i+=pe[e]*(n(r+t)+n(r-t))}return i*=a,i}b.prototype.surfaceArea=function(e){c.typeOf.object("rectangle",e);let t=e.west,n=e.east,r=e.south,a=e.north;for(;n<t;)n+=w.TWO_PI;let i=this._radiiSquared,u=i.x,o=i.y,l=i.z,f=u*o;return xn(r,a,(function(e){let r=Math.cos(e),a=Math.sin(e);return Math.cos(e)*xn(t,n,(function(e){let t=Math.cos(e),n=Math.sin(e);return Math.sqrt(f*a*a+l*(o*t*t+u*n*n)*r*r)}))}))};var fo=b;function r(e,t,n,r,a,i,u,o,c){this[0]=O(e,0),this[1]=O(r,0),this[2]=O(u,0),this[3]=O(t,0),this[4]=O(a,0),this[5]=O(o,0),this[6]=O(n,0),this[7]=O(i,0),this[8]=O(c,0)}r.packedLength=9,r.pack=function(e,t,n){return c.typeOf.object("value",e),c.defined("array",t),n=O(n,0),t[n++]=e[0],t[n++]=e[1],t[n++]=e[2],t[n++]=e[3],t[n++]=e[4],t[n++]=e[5],t[n++]=e[6],t[n++]=e[7],t[n++]=e[8],t},r.unpack=function(e,t,n){return c.defined("array",e),t=O(t,0),u(n)||(n=new r),n[0]=e[t++],n[1]=e[t++],n[2]=e[t++],n[3]=e[t++],n[4]=e[t++],n[5]=e[t++],n[6]=e[t++],n[7]=e[t++],n[8]=e[t++],n},r.packArray=function(e,t){c.defined("array",e);let n=e.length,a=9*n;if(u(t)){if(!Array.isArray(t)&&t.length!==a)throw new S("If result is a typed array, it must have exactly array.length * 9 elements");t.length!==a&&(t.length=a)}else t=new Array(a);for(let a=0;a<n;++a)r.pack(e[a],t,9*a);return t},r.unpackArray=function(e,t){if(c.defined("array",e),c.typeOf.number.greaterThanOrEquals("array.length",e.length,9),e.length%9!=0)throw new S("array length must be a multiple of 9.");let n=e.length;u(t)?t.length=n/9:t=new Array(n/9);for(let a=0;a<n;a+=9){let n=a/9;t[n]=r.unpack(e,a,t[n])}return t},r.clone=function(e,t){if(u(e))return u(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t):new r(e[0],e[3],e[6],e[1],e[4],e[7],e[2],e[5],e[8])},r.fromArray=r.unpack,r.fromColumnMajorArray=function(e,t){return c.defined("values",e),r.clone(e,t)},r.fromRowMajorArray=function(e,t){return c.defined("values",e),u(t)?(t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],t):new r(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])},r.fromQuaternion=function(e,t){c.typeOf.object("quaternion",e);let n=e.x*e.x,a=e.x*e.y,i=e.x*e.z,o=e.x*e.w,l=e.y*e.y,f=e.y*e.z,s=e.y*e.w,y=e.z*e.z,p=e.z*e.w,d=e.w*e.w,m=n-l-y+d,h=2*(a-p),b=2*(i+s),O=2*(a+p),g=-n+l-y+d,x=2*(f-o),j=2*(i-s),w=2*(f+o),z=-n-l+y+d;return u(t)?(t[0]=m,t[1]=O,t[2]=j,t[3]=h,t[4]=g,t[5]=w,t[6]=b,t[7]=x,t[8]=z,t):new r(m,h,b,O,g,x,j,w,z)},r.fromHeadingPitchRoll=function(e,t){c.typeOf.object("headingPitchRoll",e);let n=Math.cos(-e.pitch),a=Math.cos(-e.heading),i=Math.cos(e.roll),o=Math.sin(-e.pitch),l=Math.sin(-e.heading),f=Math.sin(e.roll),s=n*a,y=-i*l+f*o*a,p=f*l+i*o*a,d=n*l,m=i*a+f*o*l,h=-f*a+i*o*l,b=-o,O=f*n,g=i*n;return u(t)?(t[0]=s,t[1]=d,t[2]=b,t[3]=y,t[4]=m,t[5]=O,t[6]=p,t[7]=h,t[8]=g,t):new r(s,y,p,d,m,h,b,O,g)},r.fromScale=function(e,t){return c.typeOf.object("scale",e),u(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=0,t[4]=e.y,t[5]=0,t[6]=0,t[7]=0,t[8]=e.z,t):new r(e.x,0,0,0,e.y,0,0,0,e.z)},r.fromUniformScale=function(e,t){return c.typeOf.number("scale",e),u(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=0,t[4]=e,t[5]=0,t[6]=0,t[7]=0,t[8]=e,t):new r(e,0,0,0,e,0,0,0,e)},r.fromCrossProduct=function(e,t){return c.typeOf.object("vector",e),u(t)?(t[0]=0,t[1]=e.z,t[2]=-e.y,t[3]=-e.z,t[4]=0,t[5]=e.x,t[6]=e.y,t[7]=-e.x,t[8]=0,t):new r(0,-e.z,e.y,e.z,0,-e.x,-e.y,e.x,0)},r.fromRotationX=function(e,t){c.typeOf.number("angle",e);let n=Math.cos(e),a=Math.sin(e);return u(t)?(t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=n,t[5]=a,t[6]=0,t[7]=-a,t[8]=n,t):new r(1,0,0,0,n,-a,0,a,n)},r.fromRotationY=function(e,t){c.typeOf.number("angle",e);let n=Math.cos(e),a=Math.sin(e);return u(t)?(t[0]=n,t[1]=0,t[2]=-a,t[3]=0,t[4]=1,t[5]=0,t[6]=a,t[7]=0,t[8]=n,t):new r(n,0,a,0,1,0,-a,0,n)},r.fromRotationZ=function(e,t){c.typeOf.number("angle",e);let n=Math.cos(e),a=Math.sin(e);return u(t)?(t[0]=n,t[1]=a,t[2]=0,t[3]=-a,t[4]=n,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new r(n,-a,0,a,n,0,0,0,1)},r.toArray=function(e,t){return c.typeOf.object("matrix",e),u(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t):[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},r.getElementIndex=function(e,t){return c.typeOf.number.greaterThanOrEquals("row",t,0),c.typeOf.number.lessThanOrEquals("row",t,2),c.typeOf.number.greaterThanOrEquals("column",e,0),c.typeOf.number.lessThanOrEquals("column",e,2),3*e+t},r.getColumn=function(e,t,n){c.typeOf.object("matrix",e),c.typeOf.number.greaterThanOrEquals("index",t,0),c.typeOf.number.lessThanOrEquals("index",t,2),c.typeOf.object("result",n);let r=3*t,a=e[r],i=e[r+1],u=e[r+2];return n.x=a,n.y=i,n.z=u,n},r.setColumn=function(e,t,n,a){c.typeOf.object("matrix",e),c.typeOf.number.greaterThanOrEquals("index",t,0),c.typeOf.number.lessThanOrEquals("index",t,2),c.typeOf.object("cartesian",n),c.typeOf.object("result",a);let i=3*t;return(a=r.clone(e,a))[i]=n.x,a[i+1]=n.y,a[i+2]=n.z,a},r.getRow=function(e,t,n){c.typeOf.object("matrix",e),c.typeOf.number.greaterThanOrEquals("index",t,0),c.typeOf.number.lessThanOrEquals("index",t,2),c.typeOf.object("result",n);let r=e[t],a=e[t+3],i=e[t+6];return n.x=r,n.y=a,n.z=i,n},r.setRow=function(e,t,n,a){return c.typeOf.object("matrix",e),c.typeOf.number.greaterThanOrEquals("index",t,0),c.typeOf.number.lessThanOrEquals("index",t,2),c.typeOf.object("cartesian",n),c.typeOf.object("result",a),(a=r.clone(e,a))[t]=n.x,a[t+3]=n.y,a[t+6]=n.z,a};var ue=new y;r.setScale=function(e,t,n){c.typeOf.object("matrix",e),c.typeOf.object("scale",t),c.typeOf.object("result",n);let a=r.getScale(e,ue),i=t.x/a.x,u=t.y/a.y,o=t.z/a.z;return n[0]=e[0]*i,n[1]=e[1]*i,n[2]=e[2]*i,n[3]=e[3]*u,n[4]=e[4]*u,n[5]=e[5]*u,n[6]=e[6]*o,n[7]=e[7]*o,n[8]=e[8]*o,n};var ae=new y;r.setUniformScale=function(e,t,n){c.typeOf.object("matrix",e),c.typeOf.number("scale",t),c.typeOf.object("result",n);let a=r.getScale(e,ae),i=t/a.x,u=t/a.y,o=t/a.z;return n[0]=e[0]*i,n[1]=e[1]*i,n[2]=e[2]*i,n[3]=e[3]*u,n[4]=e[4]*u,n[5]=e[5]*u,n[6]=e[6]*o,n[7]=e[7]*o,n[8]=e[8]*o,n};var sn=new y;r.getScale=function(e,t){return c.typeOf.object("matrix",e),c.typeOf.object("result",t),t.x=y.magnitude(y.fromElements(e[0],e[1],e[2],sn)),t.y=y.magnitude(y.fromElements(e[3],e[4],e[5],sn)),t.z=y.magnitude(y.fromElements(e[6],e[7],e[8],sn)),t};var kn=new y;r.getMaximumScale=function(e){return r.getScale(e,kn),y.maximumComponent(kn)};var de=new y;r.setRotation=function(e,t,n){c.typeOf.object("matrix",e),c.typeOf.object("result",n);let a=r.getScale(e,de);return n[0]=t[0]*a.x,n[1]=t[1]*a.x,n[2]=t[2]*a.x,n[3]=t[3]*a.y,n[4]=t[4]*a.y,n[5]=t[5]*a.y,n[6]=t[6]*a.z,n[7]=t[7]*a.z,n[8]=t[8]*a.z,n};var ye=new y;function me(e){let t=0;for(let n=0;n<9;++n){let r=e[n];t+=r*r}return Math.sqrt(t)}r.getRotation=function(e,t){c.typeOf.object("matrix",e),c.typeOf.object("result",t);let n=r.getScale(e,ye);return t[0]=e[0]/n.x,t[1]=e[1]/n.x,t[2]=e[2]/n.x,t[3]=e[3]/n.y,t[4]=e[4]/n.y,t[5]=e[5]/n.y,t[6]=e[6]/n.z,t[7]=e[7]/n.z,t[8]=e[8]/n.z,t},r.multiply=function(e,t,n){c.typeOf.object("left",e),c.typeOf.object("right",t),c.typeOf.object("result",n);let r=e[0]*t[0]+e[3]*t[1]+e[6]*t[2],a=e[1]*t[0]+e[4]*t[1]+e[7]*t[2],i=e[2]*t[0]+e[5]*t[1]+e[8]*t[2],u=e[0]*t[3]+e[3]*t[4]+e[6]*t[5],o=e[1]*t[3]+e[4]*t[4]+e[7]*t[5],l=e[2]*t[3]+e[5]*t[4]+e[8]*t[5],f=e[0]*t[6]+e[3]*t[7]+e[6]*t[8],s=e[1]*t[6]+e[4]*t[7]+e[7]*t[8],y=e[2]*t[6]+e[5]*t[7]+e[8]*t[8];return n[0]=r,n[1]=a,n[2]=i,n[3]=u,n[4]=o,n[5]=l,n[6]=f,n[7]=s,n[8]=y,n},r.add=function(e,t,n){return c.typeOf.object("left",e),c.typeOf.object("right",t),c.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[4]=e[4]+t[4],n[5]=e[5]+t[5],n[6]=e[6]+t[6],n[7]=e[7]+t[7],n[8]=e[8]+t[8],n},r.subtract=function(e,t,n){return c.typeOf.object("left",e),c.typeOf.object("right",t),c.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[4]=e[4]-t[4],n[5]=e[5]-t[5],n[6]=e[6]-t[6],n[7]=e[7]-t[7],n[8]=e[8]-t[8],n},r.multiplyByVector=function(e,t,n){c.typeOf.object("matrix",e),c.typeOf.object("cartesian",t),c.typeOf.object("result",n);let r=t.x,a=t.y,i=t.z,u=e[0]*r+e[3]*a+e[6]*i,o=e[1]*r+e[4]*a+e[7]*i,l=e[2]*r+e[5]*a+e[8]*i;return n.x=u,n.y=o,n.z=l,n},r.multiplyByScalar=function(e,t,n){return c.typeOf.object("matrix",e),c.typeOf.number("scalar",t),c.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[4]=e[4]*t,n[5]=e[5]*t,n[6]=e[6]*t,n[7]=e[7]*t,n[8]=e[8]*t,n},r.multiplyByScale=function(e,t,n){return c.typeOf.object("matrix",e),c.typeOf.object("scale",t),c.typeOf.object("result",n),n[0]=e[0]*t.x,n[1]=e[1]*t.x,n[2]=e[2]*t.x,n[3]=e[3]*t.y,n[4]=e[4]*t.y,n[5]=e[5]*t.y,n[6]=e[6]*t.z,n[7]=e[7]*t.z,n[8]=e[8]*t.z,n},r.multiplyByUniformScale=function(e,t,n){return c.typeOf.object("matrix",e),c.typeOf.number("scale",t),c.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[4]=e[4]*t,n[5]=e[5]*t,n[6]=e[6]*t,n[7]=e[7]*t,n[8]=e[8]*t,n},r.negate=function(e,t){return c.typeOf.object("matrix",e),c.typeOf.object("result",t),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t[4]=-e[4],t[5]=-e[5],t[6]=-e[6],t[7]=-e[7],t[8]=-e[8],t},r.transpose=function(e,t){c.typeOf.object("matrix",e),c.typeOf.object("result",t);let n=e[0],r=e[3],a=e[6],i=e[1],u=e[4],o=e[7],l=e[2],f=e[5],s=e[8];return t[0]=n,t[1]=r,t[2]=a,t[3]=i,t[4]=u,t[5]=o,t[6]=l,t[7]=f,t[8]=s,t};var On=[1,0,0],bn=[2,2,1];function se(e){let t=0;for(let n=0;n<3;++n){let a=e[r.getElementIndex(bn[n],On[n])];t+=2*a*a}return Math.sqrt(t)}function Oe(e,t){let n=w.EPSILON15,a=0,i=1;for(let t=0;t<3;++t){let n=Math.abs(e[r.getElementIndex(bn[t],On[t])]);n>a&&(i=t,a=n)}let u=1,o=0,c=On[i],l=bn[i];if(Math.abs(e[r.getElementIndex(l,c)])>n){let t,n=(e[r.getElementIndex(l,l)]-e[r.getElementIndex(c,c)])/2/e[r.getElementIndex(l,c)];t=n<0?-1/(-n+Math.sqrt(1+n*n)):1/(n+Math.sqrt(1+n*n)),u=1/Math.sqrt(1+t*t),o=t*u}return(t=r.clone(r.IDENTITY,t))[r.getElementIndex(c,c)]=t[r.getElementIndex(l,l)]=u,t[r.getElementIndex(l,c)]=o,t[r.getElementIndex(c,l)]=-o,t}var K=new r,Bn=new r;r.computeEigenDecomposition=function(e,t){c.typeOf.object("matrix",e);let n=w.EPSILON20,a=0,i=0;u(t)||(t={});let o=t.unitary=r.clone(r.IDENTITY,t.unitary),l=t.diagonal=r.clone(e,t.diagonal),f=n*me(l);for(;i<10&&se(l)>f;)Oe(l,K),r.transpose(K,Bn),r.multiply(l,K,l),r.multiply(Bn,l,l),r.multiply(o,K,o),++a>2&&(++i,a=0);return t},r.abs=function(e,t){return c.typeOf.object("matrix",e),c.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[4]=Math.abs(e[4]),t[5]=Math.abs(e[5]),t[6]=Math.abs(e[6]),t[7]=Math.abs(e[7]),t[8]=Math.abs(e[8]),t},r.determinant=function(e){c.typeOf.object("matrix",e);let t=e[0],n=e[3],r=e[6],a=e[1],i=e[4],u=e[7],o=e[2],l=e[5],f=e[8];return t*(i*f-l*u)+a*(l*r-n*f)+o*(n*u-i*r)},r.inverse=function(e,t){c.typeOf.object("matrix",e),c.typeOf.object("result",t);let n=e[0],a=e[1],i=e[2],u=e[3],o=e[4],l=e[5],f=e[6],s=e[7],y=e[8],p=r.determinant(e);if(Math.abs(p)<=w.EPSILON15)throw new S("matrix is not invertible");t[0]=o*y-s*l,t[1]=s*i-a*y,t[2]=a*l-o*i,t[3]=f*l-u*y,t[4]=n*y-f*i,t[5]=u*i-n*l,t[6]=u*s-f*o,t[7]=f*a-n*s,t[8]=n*o-u*a;let d=1/p;return r.multiplyByScalar(t,d,t)};var be=new r;r.inverseTranspose=function(e,t){return c.typeOf.object("matrix",e),c.typeOf.object("result",t),r.inverse(r.transpose(e,be),t)},r.equals=function(e,t){return e===t||u(e)&&u(t)&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]},r.equalsEpsilon=function(e,t,n){return n=O(n,0),e===t||u(e)&&u(t)&&Math.abs(e[0]-t[0])<=n&&Math.abs(e[1]-t[1])<=n&&Math.abs(e[2]-t[2])<=n&&Math.abs(e[3]-t[3])<=n&&Math.abs(e[4]-t[4])<=n&&Math.abs(e[5]-t[5])<=n&&Math.abs(e[6]-t[6])<=n&&Math.abs(e[7]-t[7])<=n&&Math.abs(e[8]-t[8])<=n},r.IDENTITY=Object.freeze(new r(1,0,0,0,1,0,0,0,1)),r.ZERO=Object.freeze(new r(0,0,0,0,0,0,0,0,0)),r.COLUMN0ROW0=0,r.COLUMN0ROW1=1,r.COLUMN0ROW2=2,r.COLUMN1ROW0=3,r.COLUMN1ROW1=4,r.COLUMN1ROW2=5,r.COLUMN2ROW0=6,r.COLUMN2ROW1=7,r.COLUMN2ROW2=8,Object.defineProperties(r.prototype,{length:{get:function(){return r.packedLength}}}),r.prototype.clone=function(e){return r.clone(this,e)},r.prototype.equals=function(e){return r.equals(this,e)},r.equalsArray=function(e,t,n){return e[0]===t[n]&&e[1]===t[n+1]&&e[2]===t[n+2]&&e[3]===t[n+3]&&e[4]===t[n+4]&&e[5]===t[n+5]&&e[6]===t[n+6]&&e[7]===t[n+7]&&e[8]===t[n+8]},r.prototype.equalsEpsilon=function(e,t){return r.equalsEpsilon(this,e,t)},r.prototype.toString=function(){return`(${this[0]}, ${this[3]}, ${this[6]})\n(${this[1]}, ${this[4]}, ${this[7]})\n(${this[2]}, ${this[5]}, ${this[8]})`};var F,Oo=r,R={requestFullscreen:void 0,exitFullscreen:void 0,fullscreenEnabled:void 0,fullscreenElement:void 0,fullscreenchange:void 0,fullscreenerror:void 0},_={};Object.defineProperties(_,{element:{get:function(){if(_.supportsFullscreen())return document[R.fullscreenElement]}},changeEventName:{get:function(){if(_.supportsFullscreen())return R.fullscreenchange}},errorEventName:{get:function(){if(_.supportsFullscreen())return R.fullscreenerror}},enabled:{get:function(){if(_.supportsFullscreen())return document[R.fullscreenEnabled]}},fullscreen:{get:function(){if(_.supportsFullscreen())return null!==_.element}}}),_.supportsFullscreen=function(){if(u(F))return F;F=!1;let e=document.body;if("function"==typeof e.requestFullscreen)return R.requestFullscreen="requestFullscreen",R.exitFullscreen="exitFullscreen",R.fullscreenEnabled="fullscreenEnabled",R.fullscreenElement="fullscreenElement",R.fullscreenchange="fullscreenchange",R.fullscreenerror="fullscreenerror",F=!0;let t,n=["webkit","moz","o","ms","khtml"];for(let r=0,a=n.length;r<a;++r){let a=n[r];t=`${a}RequestFullscreen`,"function"==typeof e[t]?(R.requestFullscreen=t,F=!0):(t=`${a}RequestFullScreen`,"function"==typeof e[t]&&(R.requestFullscreen=t,F=!0)),t=`${a}ExitFullscreen`,"function"==typeof document[t]?R.exitFullscreen=t:(t=`${a}CancelFullScreen`,"function"==typeof document[t]&&(R.exitFullscreen=t)),t=`${a}FullscreenEnabled`,void 0!==document[t]?R.fullscreenEnabled=t:(t=`${a}FullScreenEnabled`,void 0!==document[t]&&(R.fullscreenEnabled=t)),t=`${a}FullscreenElement`,void 0!==document[t]?R.fullscreenElement=t:(t=`${a}FullScreenElement`,void 0!==document[t]&&(R.fullscreenElement=t)),t=`${a}fullscreenchange`,void 0!==document[`on${t}`]&&("ms"===a&&(t="MSFullscreenChange"),R.fullscreenchange=t),t=`${a}fullscreenerror`,void 0!==document[`on${t}`]&&("ms"===a&&(t="MSFullscreenError"),R.fullscreenerror=t)}return F},_.requestFullscreen=function(e,t){_.supportsFullscreen()&&e[R.requestFullscreen]({vrDisplay:t})},_.exitFullscreen=function(){_.supportsFullscreen()&&document[R.exitFullscreen]()},_._names=R;var A,J,In,nn,Pn,en,gn,Z,Sn,on,vn,tn,Rn,hn,wn,jn,$n,cn,Un=_;function B(e){let t=e.split(".");for(let e=0,n=t.length;e<n;++e)t[e]=parseInt(t[e],10);return t}function zn(){if(!u(J)&&(J=!1,!fn())){let e=/ Chrome\/([\.0-9]+)/.exec(A.userAgent);null!==e&&(J=!0,In=B(e[1]))}return J}function he(){return zn()&&In}function Ln(){if(!u(nn)&&(nn=!1,!zn()&&!fn()&&/ Safari\/[\.0-9]+/.test(A.userAgent))){let e=/ Version\/([\.0-9]+)/.exec(A.userAgent);null!==e&&(nn=!0,Pn=B(e[1]))}return nn}function we(){return Ln()&&Pn}function Vn(){if(!u(en)){en=!1;let e=/ AppleWebKit\/([\.0-9]+)(\+?)/.exec(A.userAgent);null!==e&&(en=!0,(gn=B(e[1])).isNightly=!!e[2])}return en}function je(){return Vn()&&gn}function Wn(){if(!u(Z)){let e;Z=!1,"Microsoft Internet Explorer"===A.appName?(e=/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(A.userAgent),null!==e&&(Z=!0,Sn=B(e[1]))):"Netscape"===A.appName&&(e=/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(A.userAgent),null!==e&&(Z=!0,Sn=B(e[1])))}return Z}function ge(){return Wn()&&Sn}function fn(){if(!u(on)){on=!1;let e=/ Edg\/([\.0-9]+)/.exec(A.userAgent);null!==e&&(on=!0,vn=B(e[1]))}return on}function Se(){return fn()&&vn}function rn(){if(!u(tn)){tn=!1;let e=/Firefox\/([\.0-9]+)/.exec(A.userAgent);null!==e&&(tn=!0,Rn=B(e[1]))}return tn}function ze(){return u(hn)||(hn=/Windows/i.test(A.appVersion)),hn}function Re(){return u(wn)||(wn="iPhone"===navigator.platform||"iPod"===navigator.platform||"iPad"===navigator.platform),wn}function Me(){return rn()&&Rn}function qe(){return u(jn)||(jn=!rn()&&typeof PointerEvent<"u"&&(!u(A.pointerEnabled)||A.pointerEnabled)),jn}function Dn(){if(!u(cn)){let e=document.createElement("canvas");e.setAttribute("style","image-rendering: -moz-crisp-edges;image-rendering: pixelated;");let t=e.style.imageRendering;(cn=u(t)&&""!==t)&&($n=t)}return cn}function Ee(){return Dn()?$n:void 0}function E(){if(!E.initialized)throw new S("You must call FeatureDetection.supportsWebP.initialize and wait for the promise to resolve before calling FeatureDetection.supportsWebP");return E._result}A=typeof navigator<"u"?navigator:{},E._promise=void 0,E._result=void 0,E.initialize=function(){return u(E._promise)||(E._promise=new Promise((e=>{let t=new Image;t.onload=function(){E._result=t.width>0&&t.height>0,e(E._result)},t.onerror=function(){E._result=!1,e(E._result)},t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA"}))),E._promise},Object.defineProperties(E,{initialized:{get:function(){return u(E._result)}}});var $=[];typeof ArrayBuffer<"u"&&($.push(Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array),typeof Uint8ClampedArray<"u"&&$.push(Uint8ClampedArray),typeof Uint8ClampedArray<"u"&&$.push(Uint8ClampedArray),typeof BigInt64Array<"u"&&$.push(BigInt64Array),typeof BigUint64Array<"u"&&$.push(BigUint64Array));var T={isChrome:zn,chromeVersion:he,isSafari:Ln,safariVersion:we,isWebkit:Vn,webkitVersion:je,isInternetExplorer:Wn,internetExplorerVersion:ge,isEdge:fn,edgeVersion:Se,isFirefox:rn,firefoxVersion:Me,isWindows:ze,isIPadOrIOS:Re,hardwareConcurrency:O(A.hardwareConcurrency,3),supportsPointerEvents:qe,supportsImageRenderingPixelated:Dn,supportsWebP:E,imageRenderingValue:Ee,typedArrayTypes:$,supportsBasis:function(e){return T.supportsWebAssembly()&&e.context.supportsBasis},supportsFullscreen:function(){return Un.supportsFullscreen()},supportsTypedArrays:function(){return typeof ArrayBuffer<"u"},supportsBigInt64Array:function(){return typeof BigInt64Array<"u"},supportsBigUint64Array:function(){return typeof BigUint64Array<"u"},supportsBigInt:function(){return typeof BigInt<"u"},supportsWebWorkers:function(){return typeof Worker<"u"},supportsWebAssembly:function(){return typeof WebAssembly<"u"},supportsWebgl2:function(e){return c.defined("scene",e),e.context.webgl2},supportsEsmWebWorkers:function(){return!rn()||parseInt(Rn)>=114}},Mo=T;export{y as a,D as b,mn as c,fo as d,Oo as e,Mo as f};