define(["exports","./Cartesian3-7e9cc2ff","./Check-741c5f3c","./defaultValue-81eec7ed","./Math-5f585871","./RuntimeError-26acdd3b"],(function(n,t,e,r,a,u){"use strict";function i(n,t,e,a){this.x=r.defaultValue(n,0),this.y=r.defaultValue(t,0),this.z=r.defaultValue(e,0),this.w=r.defaultValue(a,0)}i.fromElements=function(n,t,e,a,u){return r.defined(u)?(u.x=n,u.y=t,u.z=e,u.w=a,u):new i(n,t,e,a)},i.fromColor=function(n,t){return r.defined(t)?(t.x=n.red,t.y=n.green,t.z=n.blue,t.w=n.alpha,t):new i(n.red,n.green,n.blue,n.alpha)},i.clone=function(n,t){if(r.defined(n))return r.defined(t)?(t.x=n.x,t.y=n.y,t.z=n.z,t.w=n.w,t):new i(n.x,n.y,n.z,n.w)},i.packedLength=4,i.pack=function(n,t,e){return e=r.defaultValue(e,0),t[e++]=n.x,t[e++]=n.y,t[e++]=n.z,t[e]=n.w,t},i.unpack=function(n,t,e){return t=r.defaultValue(t,0),r.defined(e)||(e=new i),e.x=n[t++],e.y=n[t++],e.z=n[t++],e.w=n[t],e},i.packArray=function(n,t){const e=n.length,a=4*e;r.defined(t)?(Array.isArray(t)||t.length===a)&&t.length!==a&&(t.length=a):t=new Array(a);for(let r=0;rr&&(u=t,r=e)}let i=1,o=0;const s=C[u],c=g[u];if(Math.abs(n[h.getElementIndex(c,s)])>e){const t=(n[h.getElementIndex(c,c)]-n[h.getElementIndex(s,s)])/2/n[h.getElementIndex(c,s)];let e;e=t<0?-1/(-t+Math.sqrt(1+t*t)):1/(t+Math.sqrt(1+t*t)),i=1/Math.sqrt(1+e*e),o=e*i}return(t=h.clone(h.IDENTITY,t))[h.getElementIndex(s,s)]=t[h.getElementIndex(c,c)]=i,t[h.getElementIndex(c,s)]=o,t[h.getElementIndex(s,c)]=-o,t}const V=new h,E=new h;h.computeEigenDecomposition=function(n,t){const e=a.CesiumMath.EPSILON20;let u=0,i=0;r.defined(t)||(t={});const o=t.unitary=h.clone(h.IDENTITY,t.unitary),s=t.diagonal=h.clone(n,t.diagonal),c=e*function(n){let t=0;for(let e=0;e<9;++e){const r=n[e];t+=r*r}return Math.sqrt(t)}(s);for(;i<10&&b(s)>c;)O(s,V),h.transpose(V,E),h.multiply(s,V,s),h.multiply(E,s,s),h.multiply(o,V,o),++u>2&&(++i,u=0);return t},h.abs=function(n,t){return t[0]=Math.abs(n[0]),t[1]=Math.abs(n[1]),t[2]=Math.abs(n[2]),t[3]=Math.abs(n[3]),t[4]=Math.abs(n[4]),t[5]=Math.abs(n[5]),t[6]=Math.abs(n[6]),t[7]=Math.abs(n[7]),t[8]=Math.abs(n[8]),t},h.determinant=function(n){const t=n[0],e=n[3],r=n[6],a=n[1],u=n[4],i=n[7],o=n[2],s=n[5],c=n[8];return t*(u*c-s*i)+a*(s*r-e*c)+o*(e*i-u*r)},h.inverse=function(n,t){const e=n[0],r=n[1],a=n[2],u=n[3],i=n[4],o=n[5],s=n[6],c=n[7],l=n[8],f=h.determinant(n);t[0]=i*l-c*o,t[1]=c*a-r*l,t[2]=r*o-i*a,t[3]=s*o-u*l,t[4]=e*l-s*a,t[5]=u*a-e*o,t[6]=u*c-s*i,t[7]=s*r-e*c,t[8]=e*i-u*r;const y=1/f;return h.multiplyByScalar(t,y,t)};const R=new h;function N(n,t,e,a,u,i,o,s,c,l,f,y,d,h,m,x){this[0]=r.defaultValue(n,0),this[1]=r.defaultValue(u,0),this[2]=r.defaultValue(c,0),this[3]=r.defaultValue(d,0),this[4]=r.defaultValue(t,0),this[5]=r.defaultValue(i,0),this[6]=r.defaultValue(l,0),this[7]=r.defaultValue(h,0),this[8]=r.defaultValue(e,0),this[9]=r.defaultValue(o,0),this[10]=r.defaultValue(f,0),this[11]=r.defaultValue(m,0),this[12]=r.defaultValue(a,0),this[13]=r.defaultValue(s,0),this[14]=r.defaultValue(y,0),this[15]=r.defaultValue(x,0)}h.inverseTranspose=function(n,t){return h.inverse(h.transpose(n,R),t)},h.equals=function(n,t){return n===t||r.defined(n)&&r.defined(t)&&n[0]===t[0]&&n[1]===t[1]&&n[2]===t[2]&&n[3]===t[3]&&n[4]===t[4]&&n[5]===t[5]&&n[6]===t[6]&&n[7]===t[7]&&n[8]===t[8]},h.equalsEpsilon=function(n,t,e){return e=r.defaultValue(e,0),n===t||r.defined(n)&&r.defined(t)&&Math.abs(n[0]-t[0])<=e&&Math.abs(n[1]-t[1])<=e&&Math.abs(n[2]-t[2])<=e&&Math.abs(n[3]-t[3])<=e&&Math.abs(n[4]-t[4])<=e&&Math.abs(n[5]-t[5])<=e&&Math.abs(n[6]-t[6])<=e&&Math.abs(n[7]-t[7])<=e&&Math.abs(n[8]-t[8])<=e},h.IDENTITY=Object.freeze(new h(1,0,0,0,1,0,0,0,1)),h.ZERO=Object.freeze(new h(0,0,0,0,0,0,0,0,0)),h.COLUMN0ROW0=0,h.COLUMN0ROW1=1,h.COLUMN0ROW2=2,h.COLUMN1ROW0=3,h.COLUMN1ROW1=4,h.COLUMN1ROW2=5,h.COLUMN2ROW0=6,h.COLUMN2ROW1=7,h.COLUMN2ROW2=8,Object.defineProperties(h.prototype,{length:{get:function(){return h.packedLength}}}),h.prototype.clone=function(n){return h.clone(this,n)},h.prototype.equals=function(n){return h.equals(this,n)},h.equalsArray=function(n,t,e){return n[0]===t[e]&&n[1]===t[e+1]&&n[2]===t[e+2]&&n[3]===t[e+3]&&n[4]===t[e+4]&&n[5]===t[e+5]&&n[6]===t[e+6]&&n[7]===t[e+7]&&n[8]===t[e+8]},h.prototype.equalsEpsilon=function(n,t){return h.equalsEpsilon(this,n,t)},h.prototype.toString=function(){return`(${this[0]}, ${this[3]}, ${this[6]})\n(${this[1]}, ${this[4]}, ${this[7]})\n(${this[2]}, ${this[5]}, ${this[8]})`},N.packedLength=16,N.pack=function(n,t,e){return e=r.defaultValue(e,0),t[e++]=n[0],t[e++]=n[1],t[e++]=n[2],t[e++]=n[3],t[e++]=n[4],t[e++]=n[5],t[e++]=n[6],t[e++]=n[7],t[e++]=n[8],t[e++]=n[9],t[e++]=n[10],t[e++]=n[11],t[e++]=n[12],t[e++]=n[13],t[e++]=n[14],t[e]=n[15],t},N.unpack=function(n,t,e){return t=r.defaultValue(t,0),r.defined(e)||(e=new N),e[0]=n[t++],e[1]=n[t++],e[2]=n[t++],e[3]=n[t++],e[4]=n[t++],e[5]=n[t++],e[6]=n[t++],e[7]=n[t++],e[8]=n[t++],e[9]=n[t++],e[10]=n[t++],e[11]=n[t++],e[12]=n[t++],e[13]=n[t++],e[14]=n[t++],e[15]=n[t],e},N.packArray=function(n,t){const e=n.length,a=16*e;r.defined(t)?(Array.isArray(t)||t.length===a)&&t.length!==a&&(t.length=a):t=new Array(a);for(let r=0;r