lixuliang
2024-04-19 1fef6dcc04ffe09336e4983c2b05962ad901e545
1
define(["exports","./RuntimeError-ac440aa5","./defaultValue-69ee94f4","./ComponentDatatype-a9820060","./PixelFormat-9ceadbf3","./WebGLConstants-f63312fc"],(function(t,e,n,i,r,a){"use strict";function o(t,e){if(null===t||"object"!=typeof t)return t;e=n.defaultValue(e,!1);const i=new t.constructor;for(const n in t)if(t.hasOwnProperty(n)){let r=t[n];e&&(r=o(r,e)),i[n]=r}return i}function u(t,e){this.x=n.defaultValue(t,0),this.y=n.defaultValue(e,0)}u.fromElements=function(t,e,i){return n.defined(i)?(i.x=t,i.y=e,i):new u(t,e)},u.clone=function(t,e){if(n.defined(t))return n.defined(e)?(e.x=t.x,e.y=t.y,e):new u(t.x,t.y)},u.fromCartesian3=u.clone,u.fromCartesian4=u.clone,u.packedLength=2,u.pack=function(t,e,i){return i=n.defaultValue(i,0),e[i++]=t.x,e[i]=t.y,e},u.unpack=function(t,e,i){return e=n.defaultValue(e,0),n.defined(i)||(i=new u),i.x=t[e++],i.y=t[e],i},u.packArray=function(t,e){const i=t.length,r=2*i;n.defined(e)?(Array.isArray(e)||e.length===r)&&e.length!==r&&(e.length=r):e=new Array(r);for(let n=0;n<i;++n)u.pack(t[n],e,2*n);return e},u.unpackArray=function(t,e){const i=t.length;n.defined(e)?e.length=i/2:e=new Array(i/2);for(let n=0;n<i;n+=2){const i=n/2;e[i]=u.unpack(t,n,e[i])}return e},u.fromArray=u.unpack,u.maximumComponent=function(t){return Math.max(t.x,t.y)},u.minimumComponent=function(t){return Math.min(t.x,t.y)},u.minimumByComponent=function(t,e,n){return n.x=Math.min(t.x,e.x),n.y=Math.min(t.y,e.y),n},u.maximumByComponent=function(t,e,n){return n.x=Math.max(t.x,e.x),n.y=Math.max(t.y,e.y),n},u.clamp=function(t,e,n,r){const a=i.CesiumMath.clamp(t.x,e.x,n.x),o=i.CesiumMath.clamp(t.y,e.y,n.y);return r.x=a,r.y=o,r},u.magnitudeSquared=function(t){return t.x*t.x+t.y*t.y},u.magnitude=function(t){return Math.sqrt(u.magnitudeSquared(t))};const s=new u;u.distance=function(t,e){return u.subtract(t,e,s),u.magnitude(s)},u.distanceSquared=function(t,e){return u.subtract(t,e,s),u.magnitudeSquared(s)},u.normalize=function(t,e){const n=u.magnitude(t);return e.x=t.x/n,e.y=t.y/n,e},u.dot=function(t,e){return t.x*e.x+t.y*e.y},u.cross=function(t,e){return t.x*e.y-t.y*e.x},u.multiplyComponents=function(t,e,n){return n.x=t.x*e.x,n.y=t.y*e.y,n},u.divideComponents=function(t,e,n){return n.x=t.x/e.x,n.y=t.y/e.y,n},u.add=function(t,e,n){return n.x=t.x+e.x,n.y=t.y+e.y,n},u.subtract=function(t,e,n){return n.x=t.x-e.x,n.y=t.y-e.y,n},u.multiplyByScalar=function(t,e,n){return n.x=t.x*e,n.y=t.y*e,n},u.divideByScalar=function(t,e,n){return n.x=t.x/e,n.y=t.y/e,n},u.negate=function(t,e){return e.x=-t.x,e.y=-t.y,e},u.abs=function(t,e){return e.x=Math.abs(t.x),e.y=Math.abs(t.y),e};const l=new u;u.lerp=function(t,e,n,i){return u.multiplyByScalar(e,n,l),i=u.multiplyByScalar(t,1-n,i),u.add(l,i,i)};const c=new u,f=new u;u.angleBetween=function(t,e){return u.normalize(t,c),u.normalize(e,f),i.CesiumMath.acosClamped(u.dot(c,f))};const d=new u;function m(){return!0}u.mostOrthogonalAxis=function(t,e){const n=u.normalize(t,d);return u.abs(n,n),e=n.x<=n.y?u.clone(u.UNIT_X,e):u.clone(u.UNIT_Y,e)},u.equals=function(t,e){return t===e||n.defined(t)&&n.defined(e)&&t.x===e.x&&t.y===e.y},u.equalsArray=function(t,e,n){return t.x===e[n]&&t.y===e[n+1]},u.equalsEpsilon=function(t,e,r,a){return t===e||n.defined(t)&&n.defined(e)&&i.CesiumMath.equalsEpsilon(t.x,e.x,r,a)&&i.CesiumMath.equalsEpsilon(t.y,e.y,r,a)},u.ZERO=Object.freeze(new u(0,0)),u.ONE=Object.freeze(new u(1,1)),u.UNIT_X=Object.freeze(new u(1,0)),u.UNIT_Y=Object.freeze(new u(0,1)),u.prototype.clone=function(t){return u.clone(this,t)},u.prototype.equals=function(t){return u.equals(this,t)},u.prototype.equalsEpsilon=function(t,e,n){return u.equalsEpsilon(this,t,e,n)},u.prototype.toString=function(){return`(${this.x}, ${this.y})`};const h={_maximumCombinedTextureImageUnits:0,_maximumCubeMapSize:0,_maximumFragmentUniformVectors:0,_maximumTextureImageUnits:0,_maximumRenderbufferSize:0,_maximumTextureSize:0,_maximumVaryingVectors:0,_maximumVertexAttributes:0,_maximumVertexTextureImageUnits:0,_maximumVertexUniformVectors:0,_minimumAliasedLineWidth:0,_maximumAliasedLineWidth:0,_minimumAliasedPointSize:0,_maximumAliasedPointSize:0,_maximumViewportWidth:0,_maximumViewportHeight:0,_maximumTextureFilterAnisotropy:0,_maximumDrawBuffers:0,_maximumColorAttachments:0,_maximumSamples:0,_highpFloatSupported:!1,_highpIntSupported:!1};Object.defineProperties(h,{maximumCombinedTextureImageUnits:{get:function(){return h._maximumCombinedTextureImageUnits}},maximumCubeMapSize:{get:function(){return h._maximumCubeMapSize}},maximumFragmentUniformVectors:{get:function(){return h._maximumFragmentUniformVectors}},maximumTextureImageUnits:{get:function(){return h._maximumTextureImageUnits}},maximumRenderbufferSize:{get:function(){return h._maximumRenderbufferSize}},maximumTextureSize:{get:function(){return h._maximumTextureSize}},maximumVaryingVectors:{get:function(){return h._maximumVaryingVectors}},maximumVertexAttributes:{get:function(){return h._maximumVertexAttributes}},maximumVertexTextureImageUnits:{get:function(){return h._maximumVertexTextureImageUnits}},maximumVertexUniformVectors:{get:function(){return h._maximumVertexUniformVectors}},minimumAliasedLineWidth:{get:function(){return h._minimumAliasedLineWidth}},maximumAliasedLineWidth:{get:function(){return h._maximumAliasedLineWidth}},minimumAliasedPointSize:{get:function(){return h._minimumAliasedPointSize}},maximumAliasedPointSize:{get:function(){return h._maximumAliasedPointSize}},maximumViewportWidth:{get:function(){return h._maximumViewportWidth}},maximumViewportHeight:{get:function(){return h._maximumViewportHeight}},maximumTextureFilterAnisotropy:{get:function(){return h._maximumTextureFilterAnisotropy}},maximumDrawBuffers:{get:function(){return h._maximumDrawBuffers}},maximumColorAttachments:{get:function(){return h._maximumColorAttachments}},maximumSamples:{get:function(){return h._maximumSamples}},highpFloatSupported:{get:function(){return h._highpFloatSupported}},highpIntSupported:{get:function(){return h._highpIntSupported}}});const x={DONT_CARE:a.WebGLConstants.DONT_CARE,FASTEST:a.WebGLConstants.FASTEST,NICEST:a.WebGLConstants.NICEST,validate:function(t){return t===x.DONT_CARE||t===x.FASTEST||t===x.NICEST}};var p=Object.freeze(x);const y={NEAREST:a.WebGLConstants.NEAREST,LINEAR:a.WebGLConstants.LINEAR,validate:function(t){return t===y.NEAREST||t===y.LINEAR}};var _=Object.freeze(y);const g={NEAREST:a.WebGLConstants.NEAREST,LINEAR:a.WebGLConstants.LINEAR,NEAREST_MIPMAP_NEAREST:a.WebGLConstants.NEAREST_MIPMAP_NEAREST,LINEAR_MIPMAP_NEAREST:a.WebGLConstants.LINEAR_MIPMAP_NEAREST,NEAREST_MIPMAP_LINEAR:a.WebGLConstants.NEAREST_MIPMAP_LINEAR,LINEAR_MIPMAP_LINEAR:a.WebGLConstants.LINEAR_MIPMAP_LINEAR,validate:function(t){return t===g.NEAREST||t===g.LINEAR||t===g.NEAREST_MIPMAP_NEAREST||t===g.LINEAR_MIPMAP_NEAREST||t===g.NEAREST_MIPMAP_LINEAR||t===g.LINEAR_MIPMAP_LINEAR}};var M=Object.freeze(g);const w={CLAMP_TO_EDGE:a.WebGLConstants.CLAMP_TO_EDGE,REPEAT:a.WebGLConstants.REPEAT,MIRRORED_REPEAT:a.WebGLConstants.MIRRORED_REPEAT,validate:function(t){return t===w.CLAMP_TO_EDGE||t===w.REPEAT||t===w.MIRRORED_REPEAT}};var E=Object.freeze(w);function A(t){t=n.defaultValue(t,n.defaultValue.EMPTY_OBJECT);const e=n.defaultValue(t.wrapS,E.CLAMP_TO_EDGE),i=n.defaultValue(t.wrapT,E.CLAMP_TO_EDGE),r=n.defaultValue(t.minificationFilter,M.LINEAR),a=n.defaultValue(t.magnificationFilter,_.LINEAR),o=n.defined(t.maximumAnisotropy)?t.maximumAnisotropy:1;this._wrapS=e,this._wrapT=i,this._minificationFilter=r,this._magnificationFilter=a,this._maximumAnisotropy=o}function z(t){const e=(t=n.defaultValue(t,n.defaultValue.EMPTY_OBJECT)).context;let i=t.width,a=t.height;const o=t.source;n.defined(o)&&(n.defined(i)||(i=n.defaultValue(o.videoWidth,o.width)),n.defined(a)||(a=n.defaultValue(o.videoHeight,o.height)));const s=n.defaultValue(t.pixelFormat,r.PixelFormat.RGBA),l=n.defaultValue(t.pixelDatatype,r.PixelDatatype.UNSIGNED_BYTE),c=r.PixelFormat.toInternalFormat(s,l,e),f=r.PixelFormat.isCompressedFormat(c),d=t.preMultiplyAlpha||s===r.PixelFormat.RGB||s===r.PixelFormat.LUMINANCE,m=n.defaultValue(t.flipY,!0),h=n.defaultValue(t.skipColorSpaceConversion,!1);let x=!0;const p=e._gl,y=p.TEXTURE_2D,_=p.createTexture();p.activeTexture(p.TEXTURE0),p.bindTexture(y,_);let g,M=4;if(n.defined(o)&&n.defined(o.arrayBufferView)&&!f&&(M=r.PixelFormat.alignmentInBytes(s,l,i)),p.pixelStorei(p.UNPACK_ALIGNMENT,M),h?p.pixelStorei(p.UNPACK_COLORSPACE_CONVERSION_WEBGL,p.NONE):p.pixelStorei(p.UNPACK_COLORSPACE_CONVERSION_WEBGL,p.BROWSER_DEFAULT_WEBGL),n.defined(o))if(n.defined(o.arrayBufferView)){p.pixelStorei(p.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),p.pixelStorei(p.UNPACK_FLIP_Y_WEBGL,!1);let t,u,d,h=o.arrayBufferView;if(f){if(p.compressedTexImage2D(y,0,c,i,a,0,h),n.defined(o.mipLevels))for(u=i,d=a,t=0;t<o.mipLevels.length;++t)u=0|Math.floor(u/2),u<1&&(u=1),d=0|Math.floor(d/2),d<1&&(d=1),p.compressedTexImage2D(y,t+1,c,u,d,0,o.mipLevels[t])}else if(m&&(h=r.PixelFormat.flipY(h,s,l,i,a)),p.texImage2D(y,0,c,i,a,0,s,r.PixelDatatype.toWebGLConstant(l,e),h),n.defined(o.mipLevels))for(u=i,d=a,t=0;t<o.mipLevels.length;++t)u=0|Math.floor(u/2),u<1&&(u=1),d=0|Math.floor(d/2),d<1&&(d=1),p.texImage2D(y,t+1,c,u,d,0,s,r.PixelDatatype.toWebGLConstant(l,e),o.mipLevels[t])}else n.defined(o.framebuffer)?(p.pixelStorei(p.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),p.pixelStorei(p.UNPACK_FLIP_Y_WEBGL,!1),o.framebuffer!==e.defaultFramebuffer&&o.framebuffer._bind(),p.copyTexImage2D(y,0,c,o.xOffset,o.yOffset,i,a,0),o.framebuffer!==e.defaultFramebuffer&&o.framebuffer._unBind()):(p.pixelStorei(p.UNPACK_PREMULTIPLY_ALPHA_WEBGL,d),p.pixelStorei(p.UNPACK_FLIP_Y_WEBGL,m),p.texImage2D(y,0,c,s,r.PixelDatatype.toWebGLConstant(l,e),o));else p.texImage2D(y,0,c,i,a,0,s,r.PixelDatatype.toWebGLConstant(l,e),null),x=!1;p.bindTexture(y,null),g=f?r.PixelFormat.compressedTextureSizeInBytes(s,i,a):r.PixelFormat.textureSizeInBytes(s,l,i,a),this._id="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){const e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)})),this._context=e,this._textureFilterAnisotropic=e._textureFilterAnisotropic,this._textureTarget=y,this._texture=_,this._internalFormat=c,this._pixelFormat=s,this._pixelDatatype=l,this._width=i,this._height=a,this._dimensions=new u(i,a),this._hasMipmap=!1,this._sizeInBytes=g,this._preMultiplyAlpha=d,this._flipY=m,this._initialized=x,this._sampler=void 0,this.sampler=n.defined(t.sampler)?t.sampler:new A}Object.defineProperties(A.prototype,{wrapS:{get:function(){return this._wrapS}},wrapT:{get:function(){return this._wrapT}},minificationFilter:{get:function(){return this._minificationFilter}},magnificationFilter:{get:function(){return this._magnificationFilter}},maximumAnisotropy:{get:function(){return this._maximumAnisotropy}}}),A.equals=function(t,e){return t===e||n.defined(t)&&n.defined(e)&&t._wrapS===e._wrapS&&t._wrapT===e._wrapT&&t._minificationFilter===e._minificationFilter&&t._magnificationFilter===e._magnificationFilter&&t._maximumAnisotropy===e._maximumAnisotropy},A.NEAREST=Object.freeze(new A({wrapS:E.CLAMP_TO_EDGE,wrapT:E.CLAMP_TO_EDGE,minificationFilter:M.NEAREST,magnificationFilter:_.NEAREST})),z.create=function(t){return new z(t)},z.fromFramebuffer=function(t){const e=(t=n.defaultValue(t,n.defaultValue.EMPTY_OBJECT)).context,i=e._gl,a=n.defaultValue(t.pixelFormat,r.PixelFormat.RGB),o=n.defaultValue(t.framebufferXOffset,0),u=n.defaultValue(t.framebufferYOffset,0),s=n.defaultValue(t.width,i.drawingBufferWidth),l=n.defaultValue(t.height,i.drawingBufferHeight),c=t.framebuffer;return new z({context:e,width:s,height:l,pixelFormat:a,source:{framebuffer:n.defined(c)?c:e.defaultFramebuffer,xOffset:o,yOffset:u,width:s,height:l}})},Object.defineProperties(z.prototype,{id:{get:function(){return this._id}},sampler:{get:function(){return this._sampler},set:function(t){let e=t.minificationFilter,i=t.magnificationFilter;const a=this._context,o=this._pixelFormat,u=this._pixelDatatype,s=e===M.NEAREST_MIPMAP_NEAREST||e===M.NEAREST_MIPMAP_LINEAR||e===M.LINEAR_MIPMAP_NEAREST||e===M.LINEAR_MIPMAP_LINEAR;(u===r.PixelDatatype.FLOAT&&!a.textureFloatLinear||u===r.PixelDatatype.HALF_FLOAT&&!a.textureHalfFloatLinear)&&(e=s?M.NEAREST_MIPMAP_NEAREST:M.NEAREST,i=_.NEAREST),a.webgl2&&r.PixelFormat.isDepthFormat(o)&&(e=M.NEAREST,i=_.NEAREST);const l=a._gl,c=this._textureTarget;l.activeTexture(l.TEXTURE0),l.bindTexture(c,this._texture),l.texParameteri(c,l.TEXTURE_MIN_FILTER,e),l.texParameteri(c,l.TEXTURE_MAG_FILTER,i),l.texParameteri(c,l.TEXTURE_WRAP_S,t.wrapS),l.texParameteri(c,l.TEXTURE_WRAP_T,t.wrapT),n.defined(this._textureFilterAnisotropic)&&l.texParameteri(c,this._textureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,t.maximumAnisotropy),l.bindTexture(c,null),this._sampler=t}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},dimensions:{get:function(){return this._dimensions}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},sizeInBytes:{get:function(){return this._hasMipmap?Math.floor(4*this._sizeInBytes/3):this._sizeInBytes}},_target:{get:function(){return this._textureTarget}}}),z.prototype.copyFrom=function(t){const e=n.defaultValue(t.xOffset,0),i=n.defaultValue(t.yOffset,0),a=t.source,o=this._context,u=o._gl,s=this._textureTarget;u.activeTexture(u.TEXTURE0),u.bindTexture(s,this._texture);const l=a.width,c=a.height;let f=a.arrayBufferView;const d=this._width,m=this._height,h=this._internalFormat,x=this._pixelFormat,p=this._pixelDatatype,y=this._preMultiplyAlpha,_=this._flipY,g=n.defaultValue(t.skipColorSpaceConversion,!1);let M=4;n.defined(f)&&(M=r.PixelFormat.alignmentInBytes(x,p,l)),u.pixelStorei(u.UNPACK_ALIGNMENT,M),g?u.pixelStorei(u.UNPACK_COLORSPACE_CONVERSION_WEBGL,u.NONE):u.pixelStorei(u.UNPACK_COLORSPACE_CONVERSION_WEBGL,u.BROWSER_DEFAULT_WEBGL);let w=!1;if(!this._initialized){if(0===e&&0===i&&l===d&&c===m)n.defined(f)?(u.pixelStorei(u.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),u.pixelStorei(u.UNPACK_FLIP_Y_WEBGL,!1),_&&(f=r.PixelFormat.flipY(f,x,p,d,m)),u.texImage2D(s,0,h,d,m,0,x,r.PixelDatatype.toWebGLConstant(p,o),f)):(u.pixelStorei(u.UNPACK_PREMULTIPLY_ALPHA_WEBGL,y),u.pixelStorei(u.UNPACK_FLIP_Y_WEBGL,_),u.texImage2D(s,0,h,x,r.PixelDatatype.toWebGLConstant(p,o),a)),w=!0;else{u.pixelStorei(u.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),u.pixelStorei(u.UNPACK_FLIP_Y_WEBGL,!1);const t=r.PixelFormat.createTypedArray(x,p,d,m);u.texImage2D(s,0,h,d,m,0,x,r.PixelDatatype.toWebGLConstant(p,o),t)}this._initialized=!0}w||(n.defined(f)?(u.pixelStorei(u.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),u.pixelStorei(u.UNPACK_FLIP_Y_WEBGL,!1),_&&(f=r.PixelFormat.flipY(f,x,p,l,c)),u.texSubImage2D(s,0,e,i,l,c,x,r.PixelDatatype.toWebGLConstant(p,o),f)):(u.pixelStorei(u.UNPACK_PREMULTIPLY_ALPHA_WEBGL,y),u.pixelStorei(u.UNPACK_FLIP_Y_WEBGL,_),u.texSubImage2D(s,0,e,i,x,r.PixelDatatype.toWebGLConstant(p,o),a))),u.bindTexture(s,null)},z.prototype.copyFromFramebuffer=function(t,e,i,r,a,o){t=n.defaultValue(t,0),e=n.defaultValue(e,0),i=n.defaultValue(i,0),r=n.defaultValue(r,0),a=n.defaultValue(a,this._width),o=n.defaultValue(o,this._height);const u=this._context._gl,s=this._textureTarget;u.activeTexture(u.TEXTURE0),u.bindTexture(s,this._texture),u.copyTexSubImage2D(s,0,t,e,i,r,a,o),u.bindTexture(s,null),this._initialized=!0},z.prototype.generateMipmap=function(t){t=n.defaultValue(t,p.DONT_CARE),this._hasMipmap=!0;const e=this._context._gl,i=this._textureTarget;e.hint(e.GENERATE_MIPMAP_HINT,t),e.activeTexture(e.TEXTURE0),e.bindTexture(i,this._texture),e.generateMipmap(i),e.bindTexture(i,null)},z.prototype.isDestroyed=function(){return!1},z.prototype.destroy=function(){return this._context._gl.deleteTexture(this._texture),function(t,e){function n(){}for(const e in t)"function"==typeof t[e]&&(t[e]=n);t.isDestroyed=m}(this)};var T={trustGenerator:["fanfan"],_defaultFloodAnalysis:{floodVar:[0,0,0,500],ym_pos_x:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],ym_pos_y:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],ym_pos_z:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],rect_flood:[0,0,0,0,0,0,0,0,0],floodSpeed:1,ym_max_index:0,globe:!0,showElseArea:!0},floodAnalysis:{floodVar:[0,0,0,500],ym_pos_x:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],ym_pos_y:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],ym_pos_z:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],rect_flood:[0,0,0,0,0,0,0,0,0],floodSpeed:1,ym_max_index:0,globe:!0,showElseArea:!0},resetFloodAnalysis:function(){this.floodAnalysis=o(this._defaultFloodAnalysis)},_defaultExcavateAnalysis:{splitNum:30,showSelfOnly:!1,dig_pos_x:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],dig_pos_y:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],dig_pos_z:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],rect_dig:[0,0,0,0,0,0,0,0,0],dig_max_index:0,excavateHeight:0,excavateMinHeight:9999,excavatePerPoint:!1},excavateAnalysis:{splitNum:30,showSelfOnly:!1,dig_pos_x:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],dig_pos_y:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],dig_pos_z:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],rect_dig:[0,0,0,0,0,0,0,0,0],dig_max_index:0,excavateHeight:0,excavateMinHeight:9999,excavatePerPoint:!1},resetExcavateAnalysis:function(){this.excavateAnalysis=o(this._defaultExcavateAnalysis)},_defaultTilesEditor:{floodVar:[0,0,0,0],flatRect:[0,0,0,0,0,0,0,0,0],yp_mat_x:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],yp_mat_y:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],yp_mat_z:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],yp_max_index:0,model_min_height:50,IsYaPing:[!1,!1,!1,!1],yp_show_InOrOut:[!1,!0,!0,!1],yp_black_texture:null,hm_dh_attr:[50,1,100],modelLight:2.2,times:(new Date).getTime(),floodColor:[0,0,0,.5]},tilesEditor:{floodVar:[0,0,0,0],flatRect:[0,0,0,0,0,0,0,0,0],yp_mat_x:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],yp_mat_y:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],yp_mat_z:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],yp_max_index:0,model_min_height:50,IsYaPing:[!1,!1,!1,!1],yp_show_InOrOut:[!1,!0,!0,!1],yp_black_texture:null,hm_dh_attr:[50,1,100],modelLight:2.2,times:(new Date).getTime(),floodColor:[0,0,0,.5]},resetTilesEditor:function(){this.tilesEditor=o(this._defaultTilesEditor)},underEarth:{cullFace:void 0,enable:void 0,enableDepth:100,enableSkirt:!1},occlusionOpen:!0,Ellipsoid:{x:6378137,y:6378137,z:6356752.314140356},displaySlopeMap:!1,_smoothSlopeAtHigherAlt:!1,get smoothSlopeAtHigherAlt(){return this._smoothSlopeAtHigherAlt},set smoothSlopeAtHigherAlt(t){this._smoothSlopeAtHigherAlt=t},isSlopeDirty:!0,_sTex:[],get SlopeMapPallete(){return this._sTex.length<=0&&(this._sTex.push({val:100*Math.cos(Cesium.Math.toRadians(90)),color:"#FF0000"}),this._sTex.push({val:100*Math.cos(Cesium.Math.toRadians(70)),color:"#FF0000"}),this._sTex.push({val:100*Math.cos(Cesium.Math.toRadians(45)),color:"#FF8000"}),this._sTex.push({val:100*Math.cos(Cesium.Math.toRadians(31)),color:"#FFF000"}),this._sTex.push({val:100*Math.cos(Cesium.Math.toRadians(17)),color:"#00FF00"}),this._sTex.push({val:100*Math.cos(Cesium.Math.toRadians(6)),color:"#0000FF"}),this._sTex.push({val:100*Math.cos(Cesium.Math.toRadians(0)),color:"#00FFFF"})),this._sTex},set SlopeMapPallete(t){this._sTex=t},createElevationTextureFromPallete:function(t,e){var n=new Uint8Array(4096);n.length;for(var i=t[0].val,a=t[t.length-1].val,o=a,u=1024/(i-a),s=t.length-1;s>0;s--){var l=t[s].color.replace("#",""),c=t[s-1].color.replace("#",""),f=parseInt(l,16),d=parseInt(c,16),m=t[s].val,h=t[s-1].val,x=Math.floor((m-o)*u+.5),p=Math.floor((h-o)*u+.5),y=p-x;if(0!=y)for(var g=(16711680&f)>>16<<16,w=(65280&f)>>8<<16,T=(255&f)<<16,C=(16711680&d)>>16<<16,S=(65280&d)>>8<<16,R=(255&d)<<16,P=Math.floor((C-g)/y),O=Math.floor((S-w)/y),b=Math.floor((R-T)/y),I=x;I<p;I++)g+=P,w+=O,T+=b,n[4*I+0]=g>>16,n[4*I+1]=w>>16,n[4*I+2]=T>>16,n[4*I+3]=255}var L=function(t,e){return new z({context:e.context,pixelFormat:r.PixelFormat.RGBA,pixelDatatype:r.PixelDatatype.UNSIGNED_BYTE,source:{width:1,height:1024,arrayBufferView:t},sampler:new A({wrapS:E.CLAMP_TO_EDGE,wrapT:E.CLAMP_TO_EDGE,minificationFilter:M.LINEAR,magnificationFilter:_.LINEAR})})}(n,e);return this._slopeTex=L,this.slopeMapTexture=this._slopeTex,L},setSlopeMapPallete:function(t){var e=[];(t=Object.entries(t)).length>0&&t.forEach((function(t){2==t.length&&t[0]>=0&&t[0]<=90&&e.push({val:100*Math.cos(Cesium.Math.toRadians(t[0])),color:t[1]})})),0!==e.length?(e.sort((function(t,e){return t.val<e.val?-1:e.val<t.val?1:0})),this.SlopeMapPallete=e,this.isSlopeDirty=!0):console.log("Error setting new pallete for slope map")}};function C(t,e,i){this.x=n.defaultValue(t,0),this.y=n.defaultValue(e,0),this.z=n.defaultValue(i,0)}C.fromSpherical=function(t,e){n.defined(e)||(e=new C);const i=t.clock,r=t.cone,a=n.defaultValue(t.magnitude,1),o=a*Math.sin(r);return e.x=o*Math.cos(i),e.y=o*Math.sin(i),e.z=a*Math.cos(r),e},C.fromElements=function(t,e,i,r){return n.defined(r)?(r.x=t,r.y=e,r.z=i,r):new C(t,e,i)},C.clone=function(t,e){if(n.defined(t))return n.defined(e)?(e.x=t.x,e.y=t.y,e.z=t.z,e):new C(t.x,t.y,t.z)},C.fromCartesian4=C.clone,C.packedLength=3,C.pack=function(t,e,i){return i=n.defaultValue(i,0),e[i++]=t.x,e[i++]=t.y,e[i]=t.z,e},C.unpack=function(t,e,i){return e=n.defaultValue(e,0),n.defined(i)||(i=new C),i.x=t[e++],i.y=t[e++],i.z=t[e],i},C.packArray=function(t,e){const i=t.length,r=3*i;n.defined(e)?(Array.isArray(e)||e.length===r)&&e.length!==r&&(e.length=r):e=new Array(r);for(let n=0;n<i;++n)C.pack(t[n],e,3*n);return e},C.unpackArray=function(t,e){const i=t.length;n.defined(e)?e.length=i/3:e=new Array(i/3);for(let n=0;n<i;n+=3){const i=n/3;e[i]=C.unpack(t,n,e[i])}return e},C.fromArray=C.unpack,C.maximumComponent=function(t){return Math.max(t.x,t.y,t.z)},C.minimumComponent=function(t){return Math.min(t.x,t.y,t.z)},C.minimumByComponent=function(t,e,n){return n.x=Math.min(t.x,e.x),n.y=Math.min(t.y,e.y),n.z=Math.min(t.z,e.z),n},C.maximumByComponent=function(t,e,n){return n.x=Math.max(t.x,e.x),n.y=Math.max(t.y,e.y),n.z=Math.max(t.z,e.z),n},C.clamp=function(t,e,n,r){const a=i.CesiumMath.clamp(t.x,e.x,n.x),o=i.CesiumMath.clamp(t.y,e.y,n.y),u=i.CesiumMath.clamp(t.z,e.z,n.z);return r.x=a,r.y=o,r.z=u,r},C.magnitudeSquared=function(t){return t.x*t.x+t.y*t.y+t.z*t.z},C.magnitude=function(t){return Math.sqrt(C.magnitudeSquared(t))};const S=new C;C.distance=function(t,e){return C.subtract(t,e,S),C.magnitude(S)},C.distanceSquared=function(t,e){return C.subtract(t,e,S),C.magnitudeSquared(S)},C.normalize=function(t,e){const n=C.magnitude(t);return e.x=t.x/n,e.y=t.y/n,e.z=t.z/n,e},C.dot=function(t,e){return t.x*e.x+t.y*e.y+t.z*e.z},C.multiplyComponents=function(t,e,n){return n.x=t.x*e.x,n.y=t.y*e.y,n.z=t.z*e.z,n},C.divideComponents=function(t,e,n){return n.x=t.x/e.x,n.y=t.y/e.y,n.z=t.z/e.z,n},C.add=function(t,e,n){return n.x=t.x+e.x,n.y=t.y+e.y,n.z=t.z+e.z,n},C.subtract=function(t,e,n){return n.x=t.x-e.x,n.y=t.y-e.y,n.z=t.z-e.z,n},C.multiplyByScalar=function(t,e,n){return n.x=t.x*e,n.y=t.y*e,n.z=t.z*e,n},C.divideByScalar=function(t,e,n){return n.x=t.x/e,n.y=t.y/e,n.z=t.z/e,n},C.negate=function(t,e){return e.x=-t.x,e.y=-t.y,e.z=-t.z,e},C.abs=function(t,e){return e.x=Math.abs(t.x),e.y=Math.abs(t.y),e.z=Math.abs(t.z),e};const R=new C;C.lerp=function(t,e,n,i){return C.multiplyByScalar(e,n,R),i=C.multiplyByScalar(t,1-n,i),C.add(R,i,i)};const P=new C,O=new C;C.angleBetween=function(t,e){C.normalize(t,P),C.normalize(e,O);const n=C.dot(P,O),i=C.magnitude(C.cross(P,O,P));return Math.atan2(i,n)};const b=new C;C.mostOrthogonalAxis=function(t,e){const n=C.normalize(t,b);return C.abs(n,n),e=n.x<=n.y?n.x<=n.z?C.clone(C.UNIT_X,e):C.clone(C.UNIT_Z,e):n.y<=n.z?C.clone(C.UNIT_Y,e):C.clone(C.UNIT_Z,e)},C.projectVector=function(t,e,n){const i=C.dot(t,e)/C.dot(e,e);return C.multiplyByScalar(e,i,n)},C.equals=function(t,e){return t===e||n.defined(t)&&n.defined(e)&&t.x===e.x&&t.y===e.y&&t.z===e.z},C.equalsArray=function(t,e,n){return t.x===e[n]&&t.y===e[n+1]&&t.z===e[n+2]},C.equalsEpsilon=function(t,e,r,a){return t===e||n.defined(t)&&n.defined(e)&&i.CesiumMath.equalsEpsilon(t.x,e.x,r,a)&&i.CesiumMath.equalsEpsilon(t.y,e.y,r,a)&&i.CesiumMath.equalsEpsilon(t.z,e.z,r,a)},C.cross=function(t,e,n){const i=t.x,r=t.y,a=t.z,o=e.x,u=e.y,s=e.z,l=r*s-a*u,c=a*o-i*s,f=i*u-r*o;return n.x=l,n.y=c,n.z=f,n},C.midpoint=function(t,e,n){return n.x=.5*(t.x+e.x),n.y=.5*(t.y+e.y),n.z=.5*(t.z+e.z),n},C.fromDegrees=function(t,e,n,r,a){return t=i.CesiumMath.toRadians(t),e=i.CesiumMath.toRadians(e),C.fromRadians(t,e,n,r,a)};let I=new C,L=new C;const N=new C(T.Ellipsoid.x*T.Ellipsoid.x,T.Ellipsoid.y*T.Ellipsoid.y,T.Ellipsoid.z*T.Ellipsoid.z);C.fromRadians=function(t,e,i,r,a){i=n.defaultValue(i,0);const o=n.defined(r)?r.radiiSquared:N,u=Math.cos(e);I.x=u*Math.cos(t),I.y=u*Math.sin(t),I.z=Math.sin(e),I=C.normalize(I,I),C.multiplyComponents(o,I,L);const s=Math.sqrt(C.dot(I,L));return L=C.divideByScalar(L,s,L),I=C.multiplyByScalar(I,i,I),n.defined(a)||(a=new C),C.add(L,I,a)},C.fromDegreesArray=function(t,e,i){const r=t.length;n.defined(i)?i.length=r/2:i=new Array(r/2);for(let n=0;n<r;n+=2){const r=t[n],a=t[n+1],o=n/2;i[o]=C.fromDegrees(r,a,0,e,i[o])}return i},C.fromRadiansArray=function(t,e,i){const r=t.length;n.defined(i)?i.length=r/2:i=new Array(r/2);for(let n=0;n<r;n+=2){const r=t[n],a=t[n+1],o=n/2;i[o]=C.fromRadians(r,a,0,e,i[o])}return i},C.fromDegreesArrayHeights=function(t,e,i){const r=t.length;n.defined(i)?i.length=r/3:i=new Array(r/3);for(let n=0;n<r;n+=3){const r=t[n],a=t[n+1],o=t[n+2],u=n/3;i[u]=C.fromDegrees(r,a,o,e,i[u])}return i},C.fromRadiansArrayHeights=function(t,e,i){const r=t.length;n.defined(i)?i.length=r/3:i=new Array(r/3);for(let n=0;n<r;n+=3){const r=t[n],a=t[n+1],o=t[n+2],u=n/3;i[u]=C.fromRadians(r,a,o,e,i[u])}return i},C.ZERO=Object.freeze(new C(0,0,0)),C.ONE=Object.freeze(new C(1,1,1)),C.UNIT_X=Object.freeze(new C(1,0,0)),C.UNIT_Y=Object.freeze(new C(0,1,0)),C.UNIT_Z=Object.freeze(new C(0,0,1)),C.prototype.clone=function(t){return C.clone(this,t)},C.prototype.equals=function(t){return C.equals(this,t)},C.prototype.equalsEpsilon=function(t,e,n){return C.equalsEpsilon(this,t,e,n)},C.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z})`};const V=new C,U=new C;function q(t,e,r,a,o){const u=t.x,s=t.y,l=t.z,c=e.x,f=e.y,d=e.z,m=u*u*c*c,h=s*s*f*f,x=l*l*d*d,p=m+h+x,y=Math.sqrt(1/p),_=C.multiplyByScalar(t,y,V);if(p<a)return isFinite(y)?C.clone(_,o):void 0;const g=r.x,M=r.y,w=r.z,E=U;E.x=_.x*g*2,E.y=_.y*M*2,E.z=_.z*w*2;let A,z,T,S,R,P,O,b,I,L,N,q=(1-y)*C.magnitude(t)/(.5*C.magnitude(E)),W=0;do{q-=W,T=1/(1+q*g),S=1/(1+q*M),R=1/(1+q*w),P=T*T,O=S*S,b=R*R,I=P*T,L=O*S,N=b*R,A=m*P+h*O+x*b-1,z=m*I*g+h*L*M+x*N*w;W=A/(-2*z)}while(Math.abs(A)>i.CesiumMath.EPSILON12);return n.defined(o)?(o.x=u*T,o.y=s*S,o.z=l*R,o):new C(u*T,s*S,l*R)}function W(t,e,i){this.longitude=n.defaultValue(t,0),this.latitude=n.defaultValue(e,0),this.height=n.defaultValue(i,0)}W.fromRadians=function(t,e,i,r){return i=n.defaultValue(i,0),n.defined(r)?(r.longitude=t,r.latitude=e,r.height=i,r):new W(t,e,i)},W.fromDegrees=function(t,e,n,r){return t=i.CesiumMath.toRadians(t),e=i.CesiumMath.toRadians(e),W.fromRadians(t,e,n,r)};const F=new C,v=new C,B=new C,D=new C(1/T.Ellipsoid.x,1/T.Ellipsoid.y,1/T.Ellipsoid.z),G=new C(1/(T.Ellipsoid.x*T.Ellipsoid.x),1/(T.Ellipsoid.y*T.Ellipsoid.y),1/(T.Ellipsoid.z*T.Ellipsoid.z)),k=i.CesiumMath.EPSILON1;function j(t,e,r,a){e=n.defaultValue(e,0),r=n.defaultValue(r,0),a=n.defaultValue(a,0),t._radii=new C(e,r,a),t._radiiSquared=new C(e*e,r*r,a*a),t._radiiToTheFourth=new C(e*e*e*e,r*r*r*r,a*a*a*a),t._oneOverRadii=new C(0===e?0:1/e,0===r?0:1/r,0===a?0:1/a),t._oneOverRadiiSquared=new C(0===e?0:1/(e*e),0===r?0:1/(r*r),0===a?0:1/(a*a)),t._minimumRadius=Math.min(e,r,a),t._maximumRadius=Math.max(e,r,a),t._centerToleranceSquared=i.CesiumMath.EPSILON1,0!==t._radiiSquared.z&&(t._squaredXOverSquaredZ=t._radiiSquared.x/t._radiiSquared.z)}function Y(t,e,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,j(this,t,e,n)}W.fromCartesian=function(t,e,r){const a=n.defined(e)?e.oneOverRadii:D,o=n.defined(e)?e.oneOverRadiiSquared:G,u=q(t,a,o,n.defined(e)?e._centerToleranceSquared:k,v);if(!n.defined(u))return;let s=C.multiplyComponents(u,o,F);s=C.normalize(s,s);const l=C.subtract(t,u,B),c=Math.atan2(s.y,s.x),f=Math.asin(s.z),d=i.CesiumMath.sign(C.dot(l,t))*C.magnitude(l);return n.defined(r)?(r.longitude=c,r.latitude=f,r.height=d,r):new W(c,f,d)},W.toCartesian=function(t,e,n){return C.fromRadians(t.longitude,t.latitude,t.height,e,n)},W.clone=function(t,e){if(n.defined(t))return n.defined(e)?(e.longitude=t.longitude,e.latitude=t.latitude,e.height=t.height,e):new W(t.longitude,t.latitude,t.height)},W.equals=function(t,e){return t===e||n.defined(t)&&n.defined(e)&&t.longitude===e.longitude&&t.latitude===e.latitude&&t.height===e.height},W.equalsEpsilon=function(t,e,i){return i=n.defaultValue(i,0),t===e||n.defined(t)&&n.defined(e)&&Math.abs(t.longitude-e.longitude)<=i&&Math.abs(t.latitude-e.latitude)<=i&&Math.abs(t.height-e.height)<=i},W.ZERO=Object.freeze(new W(0,0,0)),W.prototype.clone=function(t){return W.clone(this,t)},W.prototype.equals=function(t){return W.equals(this,t)},W.prototype.equalsEpsilon=function(t,e){return W.equalsEpsilon(this,t,e)},W.prototype.toString=function(){return`(${this.longitude}, ${this.latitude}, ${this.height})`},Object.defineProperties(Y.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}}}),Y.clone=function(t,e){if(!n.defined(t))return;const i=t._radii;return n.defined(e)?(C.clone(i,e._radii),C.clone(t._radiiSquared,e._radiiSquared),C.clone(t._radiiToTheFourth,e._radiiToTheFourth),C.clone(t._oneOverRadii,e._oneOverRadii),C.clone(t._oneOverRadiiSquared,e._oneOverRadiiSquared),e._minimumRadius=t._minimumRadius,e._maximumRadius=t._maximumRadius,e._centerToleranceSquared=t._centerToleranceSquared,e):new Y(i.x,i.y,i.z)},Y.fromCartesian3=function(t,e){return n.defined(e)||(e=new Y),n.defined(t)?(j(e,t.x,t.y,t.z),e):e},Y.WGS84=Object.freeze(new Y(T.Ellipsoid.x,T.Ellipsoid.y,T.Ellipsoid.z)),Y.UNIT_SPHERE=Object.freeze(new Y(1,1,1)),Y.MOON=Object.freeze(new Y(i.CesiumMath.LUNAR_RADIUS,i.CesiumMath.LUNAR_RADIUS,i.CesiumMath.LUNAR_RADIUS)),Y.prototype.clone=function(t){return Y.clone(this,t)},Y.packedLength=C.packedLength,Y.pack=function(t,e,i){return i=n.defaultValue(i,0),C.pack(t._radii,e,i),e},Y.unpack=function(t,e,i){e=n.defaultValue(e,0);const r=C.unpack(t,e);return Y.fromCartesian3(r,i)},Y.prototype.geocentricSurfaceNormal=C.normalize,Y.prototype.geodeticSurfaceNormalCartographic=function(t,e){const i=t.longitude,r=t.latitude,a=Math.cos(r),o=a*Math.cos(i),u=a*Math.sin(i),s=Math.sin(r);return n.defined(e)||(e=new C),e.x=o,e.y=u,e.z=s,C.normalize(e,e)},Y.prototype.geodeticSurfaceNormal=function(t,e){if(!C.equalsEpsilon(t,C.ZERO,i.CesiumMath.EPSILON14))return n.defined(e)||(e=new C),e=C.multiplyComponents(t,this._oneOverRadiiSquared,e),C.normalize(e,e)};const $=new C,X=new C;Y.prototype.cartographicToCartesian=function(t,e){const i=$,r=X;this.geodeticSurfaceNormalCartographic(t,i),C.multiplyComponents(this._radiiSquared,i,r);const a=Math.sqrt(C.dot(i,r));return C.divideByScalar(r,a,r),C.multiplyByScalar(i,t.height,i),n.defined(e)||(e=new C),C.add(r,i,e)},Y.prototype.cartographicArrayToCartesianArray=function(t,e){const i=t.length;n.defined(e)?e.length=i:e=new Array(i);for(let n=0;n<i;n++)e[n]=this.cartographicToCartesian(t[n],e[n]);return e};const H=new C,K=new C,Z=new C;Y.prototype.cartesianToCartographic=function(t,e){const r=this.scaleToGeodeticSurface(t,K);if(!n.defined(r))return;const a=this.geodeticSurfaceNormal(r,H),o=C.subtract(t,r,Z),u=Math.atan2(a.y,a.x),s=Math.asin(a.z),l=i.CesiumMath.sign(C.dot(o,t))*C.magnitude(o);return n.defined(e)?(e.longitude=u,e.latitude=s,e.height=l,e):new W(u,s,l)},Y.prototype.cartesianArrayToCartographicArray=function(t,e){const i=t.length;n.defined(e)?e.length=i:e=new Array(i);for(let n=0;n<i;++n)e[n]=this.cartesianToCartographic(t[n],e[n]);return e},Y.prototype.scaleToGeodeticSurface=function(t,e){return q(t,this._oneOverRadii,this._oneOverRadiiSquared,this._centerToleranceSquared,e)},Y.prototype.scaleToGeocentricSurface=function(t,e){n.defined(e)||(e=new C);const i=t.x,r=t.y,a=t.z,o=this._oneOverRadiiSquared,u=1/Math.sqrt(i*i*o.x+r*r*o.y+a*a*o.z);return C.multiplyByScalar(t,u,e)},Y.prototype.transformPositionToScaledSpace=function(t,e){return n.defined(e)||(e=new C),C.multiplyComponents(t,this._oneOverRadii,e)},Y.prototype.transformPositionFromScaledSpace=function(t,e){return n.defined(e)||(e=new C),C.multiplyComponents(t,this._radii,e)},Y.prototype.equals=function(t){return this===t||n.defined(t)&&C.equals(this._radii,t._radii)},Y.prototype.toString=function(){return this._radii.toString()},Y.prototype.getSurfaceNormalIntersectionWithZAxis=function(t,e,i){e=n.defaultValue(e,0);const r=this._squaredXOverSquaredZ;if(n.defined(i)||(i=new C),i.x=0,i.y=0,i.z=t.z*(1-r),!(Math.abs(i.z)>=this._radii.z-e))return i};const J=[.14887433898163,.43339539412925,.67940956829902,.86506336668898,.97390652851717,0],Q=[.29552422471475,.26926671930999,.21908636251598,.14945134915058,.066671344308684,0];function tt(t,e,n){const i=.5*(e+t),r=.5*(e-t);let a=0;for(let t=0;t<5;t++){const e=r*J[t];a+=Q[t]*(n(i+e)+n(i-e))}return a*=r,a}function et(t,e,i,r,a,o,u,s,l){this[0]=n.defaultValue(t,0),this[1]=n.defaultValue(r,0),this[2]=n.defaultValue(u,0),this[3]=n.defaultValue(e,0),this[4]=n.defaultValue(a,0),this[5]=n.defaultValue(s,0),this[6]=n.defaultValue(i,0),this[7]=n.defaultValue(o,0),this[8]=n.defaultValue(l,0)}Y.prototype.surfaceArea=function(t){const e=t.west;let n=t.east;const r=t.south,a=t.north;for(;n<e;)n+=i.CesiumMath.TWO_PI;const o=this._radiiSquared,u=o.x,s=o.y,l=o.z,c=u*s;return tt(r,a,(function(t){const i=Math.cos(t),r=Math.sin(t);return Math.cos(t)*tt(e,n,(function(t){const e=Math.cos(t),n=Math.sin(t);return Math.sqrt(c*r*r+l*(s*e*e+u*n*n)*i*i)}))}))},et.packedLength=9,et.pack=function(t,e,i){return i=n.defaultValue(i,0),e[i++]=t[0],e[i++]=t[1],e[i++]=t[2],e[i++]=t[3],e[i++]=t[4],e[i++]=t[5],e[i++]=t[6],e[i++]=t[7],e[i++]=t[8],e},et.unpack=function(t,e,i){return e=n.defaultValue(e,0),n.defined(i)||(i=new et),i[0]=t[e++],i[1]=t[e++],i[2]=t[e++],i[3]=t[e++],i[4]=t[e++],i[5]=t[e++],i[6]=t[e++],i[7]=t[e++],i[8]=t[e++],i},et.packArray=function(t,e){const i=t.length,r=9*i;n.defined(e)?(Array.isArray(e)||e.length===r)&&e.length!==r&&(e.length=r):e=new Array(r);for(let n=0;n<i;++n)et.pack(t[n],e,9*n);return e},et.unpackArray=function(t,e){const i=t.length;n.defined(e)?e.length=i/9:e=new Array(i/9);for(let n=0;n<i;n+=9){const i=n/9;e[i]=et.unpack(t,n,e[i])}return e},et.clone=function(t,e){if(n.defined(t))return n.defined(e)?(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],e):new et(t[0],t[3],t[6],t[1],t[4],t[7],t[2],t[5],t[8])},et.fromArray=et.unpack,et.fromColumnMajorArray=function(t,e){return et.clone(t,e)},et.fromRowMajorArray=function(t,e){return n.defined(e)?(e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],e):new et(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8])},et.fromQuaternion=function(t,e){const i=t.x*t.x,r=t.x*t.y,a=t.x*t.z,o=t.x*t.w,u=t.y*t.y,s=t.y*t.z,l=t.y*t.w,c=t.z*t.z,f=t.z*t.w,d=t.w*t.w,m=i-u-c+d,h=2*(r-f),x=2*(a+l),p=2*(r+f),y=-i+u-c+d,_=2*(s-o),g=2*(a-l),M=2*(s+o),w=-i-u+c+d;return n.defined(e)?(e[0]=m,e[1]=p,e[2]=g,e[3]=h,e[4]=y,e[5]=M,e[6]=x,e[7]=_,e[8]=w,e):new et(m,h,x,p,y,_,g,M,w)},et.fromHeadingPitchRoll=function(t,e){const i=Math.cos(-t.pitch),r=Math.cos(-t.heading),a=Math.cos(t.roll),o=Math.sin(-t.pitch),u=Math.sin(-t.heading),s=Math.sin(t.roll),l=i*r,c=-a*u+s*o*r,f=s*u+a*o*r,d=i*u,m=a*r+s*o*u,h=-s*r+a*o*u,x=-o,p=s*i,y=a*i;return n.defined(e)?(e[0]=l,e[1]=d,e[2]=x,e[3]=c,e[4]=m,e[5]=p,e[6]=f,e[7]=h,e[8]=y,e):new et(l,c,f,d,m,h,x,p,y)},et.fromScale=function(t,e){return n.defined(e)?(e[0]=t.x,e[1]=0,e[2]=0,e[3]=0,e[4]=t.y,e[5]=0,e[6]=0,e[7]=0,e[8]=t.z,e):new et(t.x,0,0,0,t.y,0,0,0,t.z)},et.fromUniformScale=function(t,e){return n.defined(e)?(e[0]=t,e[1]=0,e[2]=0,e[3]=0,e[4]=t,e[5]=0,e[6]=0,e[7]=0,e[8]=t,e):new et(t,0,0,0,t,0,0,0,t)},et.fromCrossProduct=function(t,e){return n.defined(e)?(e[0]=0,e[1]=t.z,e[2]=-t.y,e[3]=-t.z,e[4]=0,e[5]=t.x,e[6]=t.y,e[7]=-t.x,e[8]=0,e):new et(0,-t.z,t.y,t.z,0,-t.x,-t.y,t.x,0)},et.fromRotationX=function(t,e){const i=Math.cos(t),r=Math.sin(t);return n.defined(e)?(e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=i,e[5]=r,e[6]=0,e[7]=-r,e[8]=i,e):new et(1,0,0,0,i,-r,0,r,i)},et.fromRotationY=function(t,e){const i=Math.cos(t),r=Math.sin(t);return n.defined(e)?(e[0]=i,e[1]=0,e[2]=-r,e[3]=0,e[4]=1,e[5]=0,e[6]=r,e[7]=0,e[8]=i,e):new et(i,0,r,0,1,0,-r,0,i)},et.fromRotationZ=function(t,e){const i=Math.cos(t),r=Math.sin(t);return n.defined(e)?(e[0]=i,e[1]=r,e[2]=0,e[3]=-r,e[4]=i,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e):new et(i,-r,0,r,i,0,0,0,1)},et.toArray=function(t,e){return n.defined(e)?(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],e):[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},et.getElementIndex=function(t,e){return 3*t+e},et.getColumn=function(t,e,n){const i=3*e,r=t[i],a=t[i+1],o=t[i+2];return n.x=r,n.y=a,n.z=o,n},et.setColumn=function(t,e,n,i){const r=3*e;return(i=et.clone(t,i))[r]=n.x,i[r+1]=n.y,i[r+2]=n.z,i},et.getRow=function(t,e,n){const i=t[e],r=t[e+3],a=t[e+6];return n.x=i,n.y=r,n.z=a,n},et.setRow=function(t,e,n,i){return(i=et.clone(t,i))[e]=n.x,i[e+3]=n.y,i[e+6]=n.z,i};const nt=new C;et.setScale=function(t,e,n){const i=et.getScale(t,nt),r=e.x/i.x,a=e.y/i.y,o=e.z/i.z;return n[0]=t[0]*r,n[1]=t[1]*r,n[2]=t[2]*r,n[3]=t[3]*a,n[4]=t[4]*a,n[5]=t[5]*a,n[6]=t[6]*o,n[7]=t[7]*o,n[8]=t[8]*o,n};const it=new C;et.setUniformScale=function(t,e,n){const i=et.getScale(t,it),r=e/i.x,a=e/i.y,o=e/i.z;return n[0]=t[0]*r,n[1]=t[1]*r,n[2]=t[2]*r,n[3]=t[3]*a,n[4]=t[4]*a,n[5]=t[5]*a,n[6]=t[6]*o,n[7]=t[7]*o,n[8]=t[8]*o,n};const rt=new C;et.getScale=function(t,e){return e.x=C.magnitude(C.fromElements(t[0],t[1],t[2],rt)),e.y=C.magnitude(C.fromElements(t[3],t[4],t[5],rt)),e.z=C.magnitude(C.fromElements(t[6],t[7],t[8],rt)),e};const at=new C;et.getMaximumScale=function(t){return et.getScale(t,at),C.maximumComponent(at)};const ot=new C;et.setRotation=function(t,e,n){const i=et.getScale(t,ot);return n[0]=e[0]*i.x,n[1]=e[1]*i.x,n[2]=e[2]*i.x,n[3]=e[3]*i.y,n[4]=e[4]*i.y,n[5]=e[5]*i.y,n[6]=e[6]*i.z,n[7]=e[7]*i.z,n[8]=e[8]*i.z,n};const ut=new C;et.getRotation=function(t,e){const n=et.getScale(t,ut);return e[0]=t[0]/n.x,e[1]=t[1]/n.x,e[2]=t[2]/n.x,e[3]=t[3]/n.y,e[4]=t[4]/n.y,e[5]=t[5]/n.y,e[6]=t[6]/n.z,e[7]=t[7]/n.z,e[8]=t[8]/n.z,e},et.multiply=function(t,e,n){const i=t[0]*e[0]+t[3]*e[1]+t[6]*e[2],r=t[1]*e[0]+t[4]*e[1]+t[7]*e[2],a=t[2]*e[0]+t[5]*e[1]+t[8]*e[2],o=t[0]*e[3]+t[3]*e[4]+t[6]*e[5],u=t[1]*e[3]+t[4]*e[4]+t[7]*e[5],s=t[2]*e[3]+t[5]*e[4]+t[8]*e[5],l=t[0]*e[6]+t[3]*e[7]+t[6]*e[8],c=t[1]*e[6]+t[4]*e[7]+t[7]*e[8],f=t[2]*e[6]+t[5]*e[7]+t[8]*e[8];return n[0]=i,n[1]=r,n[2]=a,n[3]=o,n[4]=u,n[5]=s,n[6]=l,n[7]=c,n[8]=f,n},et.add=function(t,e,n){return n[0]=t[0]+e[0],n[1]=t[1]+e[1],n[2]=t[2]+e[2],n[3]=t[3]+e[3],n[4]=t[4]+e[4],n[5]=t[5]+e[5],n[6]=t[6]+e[6],n[7]=t[7]+e[7],n[8]=t[8]+e[8],n},et.subtract=function(t,e,n){return n[0]=t[0]-e[0],n[1]=t[1]-e[1],n[2]=t[2]-e[2],n[3]=t[3]-e[3],n[4]=t[4]-e[4],n[5]=t[5]-e[5],n[6]=t[6]-e[6],n[7]=t[7]-e[7],n[8]=t[8]-e[8],n},et.multiplyByVector=function(t,e,n){const i=e.x,r=e.y,a=e.z,o=t[0]*i+t[3]*r+t[6]*a,u=t[1]*i+t[4]*r+t[7]*a,s=t[2]*i+t[5]*r+t[8]*a;return n.x=o,n.y=u,n.z=s,n},et.multiplyByScalar=function(t,e,n){return n[0]=t[0]*e,n[1]=t[1]*e,n[2]=t[2]*e,n[3]=t[3]*e,n[4]=t[4]*e,n[5]=t[5]*e,n[6]=t[6]*e,n[7]=t[7]*e,n[8]=t[8]*e,n},et.multiplyByScale=function(t,e,n){return n[0]=t[0]*e.x,n[1]=t[1]*e.x,n[2]=t[2]*e.x,n[3]=t[3]*e.y,n[4]=t[4]*e.y,n[5]=t[5]*e.y,n[6]=t[6]*e.z,n[7]=t[7]*e.z,n[8]=t[8]*e.z,n},et.multiplyByUniformScale=function(t,e,n){return n[0]=t[0]*e,n[1]=t[1]*e,n[2]=t[2]*e,n[3]=t[3]*e,n[4]=t[4]*e,n[5]=t[5]*e,n[6]=t[6]*e,n[7]=t[7]*e,n[8]=t[8]*e,n},et.negate=function(t,e){return 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],e},et.transpose=function(t,e){const n=t[0],i=t[3],r=t[6],a=t[1],o=t[4],u=t[7],s=t[2],l=t[5],c=t[8];return e[0]=n,e[1]=i,e[2]=r,e[3]=a,e[4]=o,e[5]=u,e[6]=s,e[7]=l,e[8]=c,e};const st=[1,0,0],lt=[2,2,1];function ct(t){let e=0;for(let n=0;n<3;++n){const i=t[et.getElementIndex(lt[n],st[n])];e+=2*i*i}return Math.sqrt(e)}function ft(t,e){const n=i.CesiumMath.EPSILON15;let r=0,a=1;for(let e=0;e<3;++e){const n=Math.abs(t[et.getElementIndex(lt[e],st[e])]);n>r&&(a=e,r=n)}let o=1,u=0;const s=st[a],l=lt[a];if(Math.abs(t[et.getElementIndex(l,s)])>n){const e=(t[et.getElementIndex(l,l)]-t[et.getElementIndex(s,s)])/2/t[et.getElementIndex(l,s)];let n;n=e<0?-1/(-e+Math.sqrt(1+e*e)):1/(e+Math.sqrt(1+e*e)),o=1/Math.sqrt(1+n*n),u=n*o}return(e=et.clone(et.IDENTITY,e))[et.getElementIndex(s,s)]=e[et.getElementIndex(l,l)]=o,e[et.getElementIndex(l,s)]=u,e[et.getElementIndex(s,l)]=-u,e}const dt=new et,mt=new et;et.computeEigenDecomposition=function(t,e){const r=i.CesiumMath.EPSILON20;let a=0,o=0;n.defined(e)||(e={});const u=e.unitary=et.clone(et.IDENTITY,e.unitary),s=e.diagonal=et.clone(t,e.diagonal),l=r*function(t){let e=0;for(let n=0;n<9;++n){const i=t[n];e+=i*i}return Math.sqrt(e)}(s);for(;o<10&&ct(s)>l;)ft(s,dt),et.transpose(dt,mt),et.multiply(s,dt,s),et.multiply(mt,s,s),et.multiply(u,dt,u),++a>2&&(++o,a=0);return e},et.abs=function(t,e){return e[0]=Math.abs(t[0]),e[1]=Math.abs(t[1]),e[2]=Math.abs(t[2]),e[3]=Math.abs(t[3]),e[4]=Math.abs(t[4]),e[5]=Math.abs(t[5]),e[6]=Math.abs(t[6]),e[7]=Math.abs(t[7]),e[8]=Math.abs(t[8]),e},et.determinant=function(t){const e=t[0],n=t[3],i=t[6],r=t[1],a=t[4],o=t[7],u=t[2],s=t[5],l=t[8];return e*(a*l-s*o)+r*(s*i-n*l)+u*(n*o-a*i)},et.inverse=function(t,e){const n=t[0],i=t[1],r=t[2],a=t[3],o=t[4],u=t[5],s=t[6],l=t[7],c=t[8],f=et.determinant(t);e[0]=o*c-l*u,e[1]=l*r-i*c,e[2]=i*u-o*r,e[3]=s*u-a*c,e[4]=n*c-s*r,e[5]=a*r-n*u,e[6]=a*l-s*o,e[7]=s*i-n*l,e[8]=n*o-a*i;const d=1/f;return et.multiplyByScalar(e,d,e)};const ht=new et;function xt(t,e,i,r){this.x=n.defaultValue(t,0),this.y=n.defaultValue(e,0),this.z=n.defaultValue(i,0),this.w=n.defaultValue(r,0)}et.inverseTranspose=function(t,e){return et.inverse(et.transpose(t,ht),e)},et.equals=function(t,e){return t===e||n.defined(t)&&n.defined(e)&&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]},et.equalsEpsilon=function(t,e,i){return i=n.defaultValue(i,0),t===e||n.defined(t)&&n.defined(e)&&Math.abs(t[0]-e[0])<=i&&Math.abs(t[1]-e[1])<=i&&Math.abs(t[2]-e[2])<=i&&Math.abs(t[3]-e[3])<=i&&Math.abs(t[4]-e[4])<=i&&Math.abs(t[5]-e[5])<=i&&Math.abs(t[6]-e[6])<=i&&Math.abs(t[7]-e[7])<=i&&Math.abs(t[8]-e[8])<=i},et.IDENTITY=Object.freeze(new et(1,0,0,0,1,0,0,0,1)),et.ZERO=Object.freeze(new et(0,0,0,0,0,0,0,0,0)),et.COLUMN0ROW0=0,et.COLUMN0ROW1=1,et.COLUMN0ROW2=2,et.COLUMN1ROW0=3,et.COLUMN1ROW1=4,et.COLUMN1ROW2=5,et.COLUMN2ROW0=6,et.COLUMN2ROW1=7,et.COLUMN2ROW2=8,Object.defineProperties(et.prototype,{length:{get:function(){return et.packedLength}}}),et.prototype.clone=function(t){return et.clone(this,t)},et.prototype.equals=function(t){return et.equals(this,t)},et.equalsArray=function(t,e,n){return t[0]===e[n]&&t[1]===e[n+1]&&t[2]===e[n+2]&&t[3]===e[n+3]&&t[4]===e[n+4]&&t[5]===e[n+5]&&t[6]===e[n+6]&&t[7]===e[n+7]&&t[8]===e[n+8]},et.prototype.equalsEpsilon=function(t,e){return et.equalsEpsilon(this,t,e)},et.prototype.toString=function(){return`(${this[0]}, ${this[3]}, ${this[6]})\n(${this[1]}, ${this[4]}, ${this[7]})\n(${this[2]}, ${this[5]}, ${this[8]})`},xt.fromElements=function(t,e,i,r,a){return n.defined(a)?(a.x=t,a.y=e,a.z=i,a.w=r,a):new xt(t,e,i,r)},xt.fromColor=function(t,e){return n.defined(e)?(e.x=t.red,e.y=t.green,e.z=t.blue,e.w=t.alpha,e):new xt(t.red,t.green,t.blue,t.alpha)},xt.clone=function(t,e){if(n.defined(t))return n.defined(e)?(e.x=t.x,e.y=t.y,e.z=t.z,e.w=t.w,e):new xt(t.x,t.y,t.z,t.w)},xt.packedLength=4,xt.pack=function(t,e,i){return i=n.defaultValue(i,0),e[i++]=t.x,e[i++]=t.y,e[i++]=t.z,e[i]=t.w,e},xt.unpack=function(t,e,i){return e=n.defaultValue(e,0),n.defined(i)||(i=new xt),i.x=t[e++],i.y=t[e++],i.z=t[e++],i.w=t[e],i},xt.packArray=function(t,e){const i=t.length,r=4*i;n.defined(e)?(Array.isArray(e)||e.length===r)&&e.length!==r&&(e.length=r):e=new Array(r);for(let n=0;n<i;++n)xt.pack(t[n],e,4*n);return e},xt.unpackArray=function(t,e){const i=t.length;n.defined(e)?e.length=i/4:e=new Array(i/4);for(let n=0;n<i;n+=4){const i=n/4;e[i]=xt.unpack(t,n,e[i])}return e},xt.fromArray=xt.unpack,xt.maximumComponent=function(t){return Math.max(t.x,t.y,t.z,t.w)},xt.minimumComponent=function(t){return Math.min(t.x,t.y,t.z,t.w)},xt.minimumByComponent=function(t,e,n){return n.x=Math.min(t.x,e.x),n.y=Math.min(t.y,e.y),n.z=Math.min(t.z,e.z),n.w=Math.min(t.w,e.w),n},xt.maximumByComponent=function(t,e,n){return n.x=Math.max(t.x,e.x),n.y=Math.max(t.y,e.y),n.z=Math.max(t.z,e.z),n.w=Math.max(t.w,e.w),n},xt.clamp=function(t,e,n,r){const a=i.CesiumMath.clamp(t.x,e.x,n.x),o=i.CesiumMath.clamp(t.y,e.y,n.y),u=i.CesiumMath.clamp(t.z,e.z,n.z),s=i.CesiumMath.clamp(t.w,e.w,n.w);return r.x=a,r.y=o,r.z=u,r.w=s,r},xt.magnitudeSquared=function(t){return t.x*t.x+t.y*t.y+t.z*t.z+t.w*t.w},xt.magnitude=function(t){return Math.sqrt(xt.magnitudeSquared(t))};const pt=new xt;xt.distance=function(t,e){return xt.subtract(t,e,pt),xt.magnitude(pt)},xt.distanceSquared=function(t,e){return xt.subtract(t,e,pt),xt.magnitudeSquared(pt)},xt.normalize=function(t,e){const n=xt.magnitude(t);return e.x=t.x/n,e.y=t.y/n,e.z=t.z/n,e.w=t.w/n,e},xt.dot=function(t,e){return t.x*e.x+t.y*e.y+t.z*e.z+t.w*e.w},xt.multiplyComponents=function(t,e,n){return n.x=t.x*e.x,n.y=t.y*e.y,n.z=t.z*e.z,n.w=t.w*e.w,n},xt.divideComponents=function(t,e,n){return n.x=t.x/e.x,n.y=t.y/e.y,n.z=t.z/e.z,n.w=t.w/e.w,n},xt.add=function(t,e,n){return n.x=t.x+e.x,n.y=t.y+e.y,n.z=t.z+e.z,n.w=t.w+e.w,n},xt.subtract=function(t,e,n){return n.x=t.x-e.x,n.y=t.y-e.y,n.z=t.z-e.z,n.w=t.w-e.w,n},xt.multiplyByScalar=function(t,e,n){return n.x=t.x*e,n.y=t.y*e,n.z=t.z*e,n.w=t.w*e,n},xt.divideByScalar=function(t,e,n){return n.x=t.x/e,n.y=t.y/e,n.z=t.z/e,n.w=t.w/e,n},xt.negate=function(t,e){return e.x=-t.x,e.y=-t.y,e.z=-t.z,e.w=-t.w,e},xt.abs=function(t,e){return e.x=Math.abs(t.x),e.y=Math.abs(t.y),e.z=Math.abs(t.z),e.w=Math.abs(t.w),e};const yt=new xt;xt.lerp=function(t,e,n,i){return xt.multiplyByScalar(e,n,yt),i=xt.multiplyByScalar(t,1-n,i),xt.add(yt,i,i)};const _t=new xt;xt.mostOrthogonalAxis=function(t,e){const n=xt.normalize(t,_t);return xt.abs(n,n),e=n.x<=n.y?n.x<=n.z?n.x<=n.w?xt.clone(xt.UNIT_X,e):xt.clone(xt.UNIT_W,e):n.z<=n.w?xt.clone(xt.UNIT_Z,e):xt.clone(xt.UNIT_W,e):n.y<=n.z?n.y<=n.w?xt.clone(xt.UNIT_Y,e):xt.clone(xt.UNIT_W,e):n.z<=n.w?xt.clone(xt.UNIT_Z,e):xt.clone(xt.UNIT_W,e)},xt.equals=function(t,e){return t===e||n.defined(t)&&n.defined(e)&&t.x===e.x&&t.y===e.y&&t.z===e.z&&t.w===e.w},xt.equalsArray=function(t,e,n){return t.x===e[n]&&t.y===e[n+1]&&t.z===e[n+2]&&t.w===e[n+3]},xt.equalsEpsilon=function(t,e,r,a){return t===e||n.defined(t)&&n.defined(e)&&i.CesiumMath.equalsEpsilon(t.x,e.x,r,a)&&i.CesiumMath.equalsEpsilon(t.y,e.y,r,a)&&i.CesiumMath.equalsEpsilon(t.z,e.z,r,a)&&i.CesiumMath.equalsEpsilon(t.w,e.w,r,a)},xt.ZERO=Object.freeze(new xt(0,0,0,0)),xt.ONE=Object.freeze(new xt(1,1,1,1)),xt.UNIT_X=Object.freeze(new xt(1,0,0,0)),xt.UNIT_Y=Object.freeze(new xt(0,1,0,0)),xt.UNIT_Z=Object.freeze(new xt(0,0,1,0)),xt.UNIT_W=Object.freeze(new xt(0,0,0,1)),xt.prototype.clone=function(t){return xt.clone(this,t)},xt.prototype.equals=function(t){return xt.equals(this,t)},xt.prototype.equalsEpsilon=function(t,e,n){return xt.equalsEpsilon(this,t,e,n)},xt.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z}, ${this.w})`};const gt=new Float32Array(1),Mt=new Uint8Array(gt.buffer),wt=new Uint32Array([287454020]),Et=68===new Uint8Array(wt.buffer)[0];function At(t,e,i,r,a,o,u,s,l,c,f,d,m,h,x,p){this[0]=n.defaultValue(t,0),this[1]=n.defaultValue(a,0),this[2]=n.defaultValue(l,0),this[3]=n.defaultValue(m,0),this[4]=n.defaultValue(e,0),this[5]=n.defaultValue(o,0),this[6]=n.defaultValue(c,0),this[7]=n.defaultValue(h,0),this[8]=n.defaultValue(i,0),this[9]=n.defaultValue(u,0),this[10]=n.defaultValue(f,0),this[11]=n.defaultValue(x,0),this[12]=n.defaultValue(r,0),this[13]=n.defaultValue(s,0),this[14]=n.defaultValue(d,0),this[15]=n.defaultValue(p,0)}xt.packFloat=function(t,e){return n.defined(e)||(e=new xt),gt[0]=t,Et?(e.x=Mt[0],e.y=Mt[1],e.z=Mt[2],e.w=Mt[3]):(e.x=Mt[3],e.y=Mt[2],e.z=Mt[1],e.w=Mt[0]),e},xt.unpackFloat=function(t){return Et?(Mt[0]=t.x,Mt[1]=t.y,Mt[2]=t.z,Mt[3]=t.w):(Mt[0]=t.w,Mt[1]=t.z,Mt[2]=t.y,Mt[3]=t.x),gt[0]},At.packedLength=16,At.pack=function(t,e,i){return i=n.defaultValue(i,0),e[i++]=t[0],e[i++]=t[1],e[i++]=t[2],e[i++]=t[3],e[i++]=t[4],e[i++]=t[5],e[i++]=t[6],e[i++]=t[7],e[i++]=t[8],e[i++]=t[9],e[i++]=t[10],e[i++]=t[11],e[i++]=t[12],e[i++]=t[13],e[i++]=t[14],e[i]=t[15],e},At.unpack=function(t,e,i){return e=n.defaultValue(e,0),n.defined(i)||(i=new At),i[0]=t[e++],i[1]=t[e++],i[2]=t[e++],i[3]=t[e++],i[4]=t[e++],i[5]=t[e++],i[6]=t[e++],i[7]=t[e++],i[8]=t[e++],i[9]=t[e++],i[10]=t[e++],i[11]=t[e++],i[12]=t[e++],i[13]=t[e++],i[14]=t[e++],i[15]=t[e],i},At.packArray=function(t,e){const i=t.length,r=16*i;n.defined(e)?(Array.isArray(e)||e.length===r)&&e.length!==r&&(e.length=r):e=new Array(r);for(let n=0;n<i;++n)At.pack(t[n],e,16*n);return e},At.unpackArray=function(t,e){const i=t.length;n.defined(e)?e.length=i/16:e=new Array(i/16);for(let n=0;n<i;n+=16){const i=n/16;e[i]=At.unpack(t,n,e[i])}return e},At.clone=function(t,e){if(n.defined(t))return n.defined(e)?(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],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e):new At(t[0],t[4],t[8],t[12],t[1],t[5],t[9],t[13],t[2],t[6],t[10],t[14],t[3],t[7],t[11],t[15])},At.fromArray=At.unpack,At.fromColumnMajorArray=function(t,e){return At.clone(t,e)},At.fromRowMajorArray=function(t,e){return n.defined(e)?(e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15],e):new At(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},At.fromRotationTranslation=function(t,e,i){return e=n.defaultValue(e,C.ZERO),n.defined(i)?(i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=0,i[4]=t[3],i[5]=t[4],i[6]=t[5],i[7]=0,i[8]=t[6],i[9]=t[7],i[10]=t[8],i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,i):new At(t[0],t[3],t[6],e.x,t[1],t[4],t[7],e.y,t[2],t[5],t[8],e.z,0,0,0,1)},At.fromTranslationQuaternionRotationScale=function(t,e,i,r){n.defined(r)||(r=new At);const a=i.x,o=i.y,u=i.z,s=e.x*e.x,l=e.x*e.y,c=e.x*e.z,f=e.x*e.w,d=e.y*e.y,m=e.y*e.z,h=e.y*e.w,x=e.z*e.z,p=e.z*e.w,y=e.w*e.w,_=s-d-x+y,g=2*(l-p),M=2*(c+h),w=2*(l+p),E=-s+d-x+y,A=2*(m-f),z=2*(c-h),T=2*(m+f),C=-s-d+x+y;return r[0]=_*a,r[1]=w*a,r[2]=z*a,r[3]=0,r[4]=g*o,r[5]=E*o,r[6]=T*o,r[7]=0,r[8]=M*u,r[9]=A*u,r[10]=C*u,r[11]=0,r[12]=t.x,r[13]=t.y,r[14]=t.z,r[15]=1,r},At.fromTranslationRotationScale=function(t,e){return At.fromTranslationQuaternionRotationScale(t.translation,t.rotation,t.scale,e)},At.fromTranslation=function(t,e){return At.fromRotationTranslation(et.IDENTITY,t,e)},At.fromScale=function(t,e){return n.defined(e)?(e[0]=t.x,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t.y,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t.z,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e):new At(t.x,0,0,0,0,t.y,0,0,0,0,t.z,0,0,0,0,1)},At.fromUniformScale=function(t,e){return n.defined(e)?(e[0]=t,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e):new At(t,0,0,0,0,t,0,0,0,0,t,0,0,0,0,1)},At.fromRotation=function(t,e){return n.defined(e)||(e=new At),e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=0,e[4]=t[3],e[5]=t[4],e[6]=t[5],e[7]=0,e[8]=t[6],e[9]=t[7],e[10]=t[8],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e};const zt=new C,Tt=new C,Ct=new C;At.fromCamera=function(t,e){const i=t.position,r=t.direction,a=t.up;C.normalize(r,zt),C.normalize(C.cross(zt,a,Tt),Tt),C.normalize(C.cross(Tt,zt,Ct),Ct);const o=Tt.x,u=Tt.y,s=Tt.z,l=zt.x,c=zt.y,f=zt.z,d=Ct.x,m=Ct.y,h=Ct.z,x=i.x,p=i.y,y=i.z,_=o*-x+u*-p+s*-y,g=d*-x+m*-p+h*-y,M=l*x+c*p+f*y;return n.defined(e)?(e[0]=o,e[1]=d,e[2]=-l,e[3]=0,e[4]=u,e[5]=m,e[6]=-c,e[7]=0,e[8]=s,e[9]=h,e[10]=-f,e[11]=0,e[12]=_,e[13]=g,e[14]=M,e[15]=1,e):new At(o,u,s,_,d,m,h,g,-l,-c,-f,M,0,0,0,1)},At.computePerspectiveFieldOfView=function(t,e,n,i,r){const a=1/Math.tan(.5*t),o=a/e,u=(i+n)/(n-i),s=2*i*n/(n-i);return r[0]=o,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=a,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=u,r[11]=-1,r[12]=0,r[13]=0,r[14]=s,r[15]=0,r},At.computeOrthographicOffCenter=function(t,e,n,i,r,a,o){let u=1/(e-t),s=1/(i-n),l=1/(a-r);const c=-(e+t)*u,f=-(i+n)*s,d=-(a+r)*l;return u*=2,s*=2,l*=-2,o[0]=u,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=s,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=l,o[11]=0,o[12]=c,o[13]=f,o[14]=d,o[15]=1,o},At.computePerspectiveOffCenter=function(t,e,n,i,r,a,o){const u=2*r/(e-t),s=2*r/(i-n),l=(e+t)/(e-t),c=(i+n)/(i-n),f=-(a+r)/(a-r),d=-2*a*r/(a-r);return o[0]=u,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=s,o[6]=0,o[7]=0,o[8]=l,o[9]=c,o[10]=f,o[11]=-1,o[12]=0,o[13]=0,o[14]=d,o[15]=0,o},At.computeInfinitePerspectiveOffCenter=function(t,e,n,i,r,a){const o=2*r/(e-t),u=2*r/(i-n),s=(e+t)/(e-t),l=(i+n)/(i-n),c=-2*r;return a[0]=o,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=u,a[6]=0,a[7]=0,a[8]=s,a[9]=l,a[10]=-1,a[11]=-1,a[12]=0,a[13]=0,a[14]=c,a[15]=0,a},At.computeViewportTransformation=function(t,e,i,r){n.defined(r)||(r=new At),t=n.defaultValue(t,n.defaultValue.EMPTY_OBJECT);const a=n.defaultValue(t.x,0),o=n.defaultValue(t.y,0),u=n.defaultValue(t.width,0),s=n.defaultValue(t.height,0);e=n.defaultValue(e,0);const l=.5*u,c=.5*s,f=.5*((i=n.defaultValue(i,1))-e),d=l,m=c,h=f,x=a+l,p=o+c,y=e+f;return r[0]=d,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=m,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=h,r[11]=0,r[12]=x,r[13]=p,r[14]=y,r[15]=1,r},At.computeView=function(t,e,n,i,r){return r[0]=i.x,r[1]=n.x,r[2]=-e.x,r[3]=0,r[4]=i.y,r[5]=n.y,r[6]=-e.y,r[7]=0,r[8]=i.z,r[9]=n.z,r[10]=-e.z,r[11]=0,r[12]=-C.dot(i,t),r[13]=-C.dot(n,t),r[14]=C.dot(e,t),r[15]=1,r},At.toArray=function(t,e){return n.defined(e)?(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],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e):[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]},At.getElementIndex=function(t,e){return 4*t+e},At.getColumn=function(t,e,n){const i=4*e,r=t[i],a=t[i+1],o=t[i+2],u=t[i+3];return n.x=r,n.y=a,n.z=o,n.w=u,n},At.setColumn=function(t,e,n,i){const r=4*e;return(i=At.clone(t,i))[r]=n.x,i[r+1]=n.y,i[r+2]=n.z,i[r+3]=n.w,i},At.getRow=function(t,e,n){const i=t[e],r=t[e+4],a=t[e+8],o=t[e+12];return n.x=i,n.y=r,n.z=a,n.w=o,n},At.setRow=function(t,e,n,i){return(i=At.clone(t,i))[e]=n.x,i[e+4]=n.y,i[e+8]=n.z,i[e+12]=n.w,i},At.setTranslation=function(t,e,n){return 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],n[9]=t[9],n[10]=t[10],n[11]=t[11],n[12]=e.x,n[13]=e.y,n[14]=e.z,n[15]=t[15],n};const St=new C;At.setScale=function(t,e,n){const i=At.getScale(t,St),r=e.x/i.x,a=e.y/i.y,o=e.z/i.z;return n[0]=t[0]*r,n[1]=t[1]*r,n[2]=t[2]*r,n[3]=t[3],n[4]=t[4]*a,n[5]=t[5]*a,n[6]=t[6]*a,n[7]=t[7],n[8]=t[8]*o,n[9]=t[9]*o,n[10]=t[10]*o,n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n};const Rt=new C;At.setUniformScale=function(t,e,n){const i=At.getScale(t,Rt),r=e/i.x,a=e/i.y,o=e/i.z;return n[0]=t[0]*r,n[1]=t[1]*r,n[2]=t[2]*r,n[3]=t[3],n[4]=t[4]*a,n[5]=t[5]*a,n[6]=t[6]*a,n[7]=t[7],n[8]=t[8]*o,n[9]=t[9]*o,n[10]=t[10]*o,n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n};const Pt=new C;At.getScale=function(t,e){return e.x=C.magnitude(C.fromElements(t[0],t[1],t[2],Pt)),e.y=C.magnitude(C.fromElements(t[4],t[5],t[6],Pt)),e.z=C.magnitude(C.fromElements(t[8],t[9],t[10],Pt)),e};const Ot=new C;At.getMaximumScale=function(t){return At.getScale(t,Ot),C.maximumComponent(Ot)};const bt=new C;At.setRotation=function(t,e,n){const i=At.getScale(t,bt);return n[0]=e[0]*i.x,n[1]=e[1]*i.x,n[2]=e[2]*i.x,n[3]=t[3],n[4]=e[3]*i.y,n[5]=e[4]*i.y,n[6]=e[5]*i.y,n[7]=t[7],n[8]=e[6]*i.z,n[9]=e[7]*i.z,n[10]=e[8]*i.z,n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n};const It=new C;At.getRotation=function(t,e){const n=At.getScale(t,It);return e[0]=t[0]/n.x,e[1]=t[1]/n.x,e[2]=t[2]/n.x,e[3]=t[4]/n.y,e[4]=t[5]/n.y,e[5]=t[6]/n.y,e[6]=t[8]/n.z,e[7]=t[9]/n.z,e[8]=t[10]/n.z,e},At.multiply=function(t,e,n){const i=t[0],r=t[1],a=t[2],o=t[3],u=t[4],s=t[5],l=t[6],c=t[7],f=t[8],d=t[9],m=t[10],h=t[11],x=t[12],p=t[13],y=t[14],_=t[15],g=e[0],M=e[1],w=e[2],E=e[3],A=e[4],z=e[5],T=e[6],C=e[7],S=e[8],R=e[9],P=e[10],O=e[11],b=e[12],I=e[13],L=e[14],N=e[15],V=i*g+u*M+f*w+x*E,U=r*g+s*M+d*w+p*E,q=a*g+l*M+m*w+y*E,W=o*g+c*M+h*w+_*E,F=i*A+u*z+f*T+x*C,v=r*A+s*z+d*T+p*C,B=a*A+l*z+m*T+y*C,D=o*A+c*z+h*T+_*C,G=i*S+u*R+f*P+x*O,k=r*S+s*R+d*P+p*O,j=a*S+l*R+m*P+y*O,Y=o*S+c*R+h*P+_*O,$=i*b+u*I+f*L+x*N,X=r*b+s*I+d*L+p*N,H=a*b+l*I+m*L+y*N,K=o*b+c*I+h*L+_*N;return n[0]=V,n[1]=U,n[2]=q,n[3]=W,n[4]=F,n[5]=v,n[6]=B,n[7]=D,n[8]=G,n[9]=k,n[10]=j,n[11]=Y,n[12]=$,n[13]=X,n[14]=H,n[15]=K,n},At.add=function(t,e,n){return n[0]=t[0]+e[0],n[1]=t[1]+e[1],n[2]=t[2]+e[2],n[3]=t[3]+e[3],n[4]=t[4]+e[4],n[5]=t[5]+e[5],n[6]=t[6]+e[6],n[7]=t[7]+e[7],n[8]=t[8]+e[8],n[9]=t[9]+e[9],n[10]=t[10]+e[10],n[11]=t[11]+e[11],n[12]=t[12]+e[12],n[13]=t[13]+e[13],n[14]=t[14]+e[14],n[15]=t[15]+e[15],n},At.subtract=function(t,e,n){return n[0]=t[0]-e[0],n[1]=t[1]-e[1],n[2]=t[2]-e[2],n[3]=t[3]-e[3],n[4]=t[4]-e[4],n[5]=t[5]-e[5],n[6]=t[6]-e[6],n[7]=t[7]-e[7],n[8]=t[8]-e[8],n[9]=t[9]-e[9],n[10]=t[10]-e[10],n[11]=t[11]-e[11],n[12]=t[12]-e[12],n[13]=t[13]-e[13],n[14]=t[14]-e[14],n[15]=t[15]-e[15],n},At.multiplyTransformation=function(t,e,n){const i=t[0],r=t[1],a=t[2],o=t[4],u=t[5],s=t[6],l=t[8],c=t[9],f=t[10],d=t[12],m=t[13],h=t[14],x=e[0],p=e[1],y=e[2],_=e[4],g=e[5],M=e[6],w=e[8],E=e[9],A=e[10],z=e[12],T=e[13],C=e[14],S=i*x+o*p+l*y,R=r*x+u*p+c*y,P=a*x+s*p+f*y,O=i*_+o*g+l*M,b=r*_+u*g+c*M,I=a*_+s*g+f*M,L=i*w+o*E+l*A,N=r*w+u*E+c*A,V=a*w+s*E+f*A,U=i*z+o*T+l*C+d,q=r*z+u*T+c*C+m,W=a*z+s*T+f*C+h;return n[0]=S,n[1]=R,n[2]=P,n[3]=0,n[4]=O,n[5]=b,n[6]=I,n[7]=0,n[8]=L,n[9]=N,n[10]=V,n[11]=0,n[12]=U,n[13]=q,n[14]=W,n[15]=1,n},At.multiplyByMatrix3=function(t,e,n){const i=t[0],r=t[1],a=t[2],o=t[4],u=t[5],s=t[6],l=t[8],c=t[9],f=t[10],d=e[0],m=e[1],h=e[2],x=e[3],p=e[4],y=e[5],_=e[6],g=e[7],M=e[8],w=i*d+o*m+l*h,E=r*d+u*m+c*h,A=a*d+s*m+f*h,z=i*x+o*p+l*y,T=r*x+u*p+c*y,C=a*x+s*p+f*y,S=i*_+o*g+l*M,R=r*_+u*g+c*M,P=a*_+s*g+f*M;return n[0]=w,n[1]=E,n[2]=A,n[3]=0,n[4]=z,n[5]=T,n[6]=C,n[7]=0,n[8]=S,n[9]=R,n[10]=P,n[11]=0,n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n},At.multiplyByTranslation=function(t,e,n){const i=e.x,r=e.y,a=e.z,o=i*t[0]+r*t[4]+a*t[8]+t[12],u=i*t[1]+r*t[5]+a*t[9]+t[13],s=i*t[2]+r*t[6]+a*t[10]+t[14];return 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],n[9]=t[9],n[10]=t[10],n[11]=t[11],n[12]=o,n[13]=u,n[14]=s,n[15]=t[15],n},At.multiplyByScale=function(t,e,n){const i=e.x,r=e.y,a=e.z;return 1===i&&1===r&&1===a?At.clone(t,n):(n[0]=i*t[0],n[1]=i*t[1],n[2]=i*t[2],n[3]=t[3],n[4]=r*t[4],n[5]=r*t[5],n[6]=r*t[6],n[7]=t[7],n[8]=a*t[8],n[9]=a*t[9],n[10]=a*t[10],n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n)},At.multiplyByUniformScale=function(t,e,n){return n[0]=t[0]*e,n[1]=t[1]*e,n[2]=t[2]*e,n[3]=t[3],n[4]=t[4]*e,n[5]=t[5]*e,n[6]=t[6]*e,n[7]=t[7],n[8]=t[8]*e,n[9]=t[9]*e,n[10]=t[10]*e,n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n},At.multiplyByVector=function(t,e,n){const i=e.x,r=e.y,a=e.z,o=e.w,u=t[0]*i+t[4]*r+t[8]*a+t[12]*o,s=t[1]*i+t[5]*r+t[9]*a+t[13]*o,l=t[2]*i+t[6]*r+t[10]*a+t[14]*o,c=t[3]*i+t[7]*r+t[11]*a+t[15]*o;return n.x=u,n.y=s,n.z=l,n.w=c,n},At.multiplyByPointAsVector=function(t,e,n){const i=e.x,r=e.y,a=e.z,o=t[0]*i+t[4]*r+t[8]*a,u=t[1]*i+t[5]*r+t[9]*a,s=t[2]*i+t[6]*r+t[10]*a;return n.x=o,n.y=u,n.z=s,n},At.multiplyByPoint=function(t,e,n){const i=e.x,r=e.y,a=e.z,o=t[0]*i+t[4]*r+t[8]*a+t[12],u=t[1]*i+t[5]*r+t[9]*a+t[13],s=t[2]*i+t[6]*r+t[10]*a+t[14];return n.x=o,n.y=u,n.z=s,n},At.multiplyByScalar=function(t,e,n){return n[0]=t[0]*e,n[1]=t[1]*e,n[2]=t[2]*e,n[3]=t[3]*e,n[4]=t[4]*e,n[5]=t[5]*e,n[6]=t[6]*e,n[7]=t[7]*e,n[8]=t[8]*e,n[9]=t[9]*e,n[10]=t[10]*e,n[11]=t[11]*e,n[12]=t[12]*e,n[13]=t[13]*e,n[14]=t[14]*e,n[15]=t[15]*e,n},At.negate=function(t,e){return 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],e[9]=-t[9],e[10]=-t[10],e[11]=-t[11],e[12]=-t[12],e[13]=-t[13],e[14]=-t[14],e[15]=-t[15],e},At.transpose=function(t,e){const n=t[1],i=t[2],r=t[3],a=t[6],o=t[7],u=t[11];return e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=n,e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=i,e[9]=a,e[10]=t[10],e[11]=t[14],e[12]=r,e[13]=o,e[14]=u,e[15]=t[15],e},At.abs=function(t,e){return e[0]=Math.abs(t[0]),e[1]=Math.abs(t[1]),e[2]=Math.abs(t[2]),e[3]=Math.abs(t[3]),e[4]=Math.abs(t[4]),e[5]=Math.abs(t[5]),e[6]=Math.abs(t[6]),e[7]=Math.abs(t[7]),e[8]=Math.abs(t[8]),e[9]=Math.abs(t[9]),e[10]=Math.abs(t[10]),e[11]=Math.abs(t[11]),e[12]=Math.abs(t[12]),e[13]=Math.abs(t[13]),e[14]=Math.abs(t[14]),e[15]=Math.abs(t[15]),e},At.equals=function(t,e){return t===e||n.defined(t)&&n.defined(e)&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[3]===e[3]&&t[7]===e[7]&&t[11]===e[11]&&t[15]===e[15]},At.equalsEpsilon=function(t,e,i){return i=n.defaultValue(i,0),t===e||n.defined(t)&&n.defined(e)&&Math.abs(t[0]-e[0])<=i&&Math.abs(t[1]-e[1])<=i&&Math.abs(t[2]-e[2])<=i&&Math.abs(t[3]-e[3])<=i&&Math.abs(t[4]-e[4])<=i&&Math.abs(t[5]-e[5])<=i&&Math.abs(t[6]-e[6])<=i&&Math.abs(t[7]-e[7])<=i&&Math.abs(t[8]-e[8])<=i&&Math.abs(t[9]-e[9])<=i&&Math.abs(t[10]-e[10])<=i&&Math.abs(t[11]-e[11])<=i&&Math.abs(t[12]-e[12])<=i&&Math.abs(t[13]-e[13])<=i&&Math.abs(t[14]-e[14])<=i&&Math.abs(t[15]-e[15])<=i},At.getTranslation=function(t,e){return e.x=t[12],e.y=t[13],e.z=t[14],e},At.getMatrix3=function(t,e){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],e};const Lt=new et,Nt=new et,Vt=new xt,Ut=new xt(0,0,0,1);At.inverse=function(t,n){const r=t[0],a=t[4],o=t[8],u=t[12],s=t[1],l=t[5],c=t[9],f=t[13],d=t[2],m=t[6],h=t[10],x=t[14],p=t[3],y=t[7],_=t[11],g=t[15];let M=h*g,w=x*_,E=m*g,A=x*y,z=m*_,T=h*y,C=d*g,S=x*p,R=d*_,P=h*p,O=d*y,b=m*p;const I=M*l+A*c+z*f-(w*l+E*c+T*f),L=w*s+C*c+P*f-(M*s+S*c+R*f),N=E*s+S*l+O*f-(A*s+C*l+b*f),V=T*s+R*l+b*c-(z*s+P*l+O*c),U=w*a+E*o+T*u-(M*a+A*o+z*u),q=M*r+S*o+R*u-(w*r+C*o+P*u),W=A*r+C*a+b*u-(E*r+S*a+O*u),F=z*r+P*a+O*o-(T*r+R*a+b*o);M=o*f,w=u*c,E=a*f,A=u*l,z=a*c,T=o*l,C=r*f,S=u*s,R=r*c,P=o*s,O=r*l,b=a*s;const v=M*y+A*_+z*g-(w*y+E*_+T*g),B=w*p+C*_+P*g-(M*p+S*_+R*g),D=E*p+S*y+O*g-(A*p+C*y+b*g),G=T*p+R*y+b*_-(z*p+P*y+O*_),k=E*h+T*x+w*m-(z*x+M*m+A*h),j=R*x+M*d+S*h-(C*h+P*x+w*d),Y=C*m+b*x+A*d-(O*x+E*d+S*m),$=O*h+z*d+P*m-(R*m+b*h+T*d);let X=r*I+a*L+o*N+u*V;if(Math.abs(X)<i.CesiumMath.EPSILON21){if(et.equalsEpsilon(At.getMatrix3(t,Lt),Nt,i.CesiumMath.EPSILON7)&&xt.equals(At.getRow(t,3,Vt),Ut))return n[0]=0,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=0,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=0,n[11]=0,n[12]=-t[12],n[13]=-t[13],n[14]=-t[14],n[15]=1,n;throw new e.RuntimeError("matrix is not invertible because its determinate is zero.")}return X=1/X,n[0]=I*X,n[1]=L*X,n[2]=N*X,n[3]=V*X,n[4]=U*X,n[5]=q*X,n[6]=W*X,n[7]=F*X,n[8]=v*X,n[9]=B*X,n[10]=D*X,n[11]=G*X,n[12]=k*X,n[13]=j*X,n[14]=Y*X,n[15]=$*X,n},At.inverseTransformation=function(t,e){const n=t[0],i=t[1],r=t[2],a=t[4],o=t[5],u=t[6],s=t[8],l=t[9],c=t[10],f=t[12],d=t[13],m=t[14],h=-n*f-i*d-r*m,x=-a*f-o*d-u*m,p=-s*f-l*d-c*m;return e[0]=n,e[1]=a,e[2]=s,e[3]=0,e[4]=i,e[5]=o,e[6]=l,e[7]=0,e[8]=r,e[9]=u,e[10]=c,e[11]=0,e[12]=h,e[13]=x,e[14]=p,e[15]=1,e};const qt=new At;function Wt(t,e,i,r){this.west=n.defaultValue(t,0),this.south=n.defaultValue(e,0),this.east=n.defaultValue(i,0),this.north=n.defaultValue(r,0)}At.inverseTranspose=function(t,e){return At.inverse(At.transpose(t,qt),e)},At.IDENTITY=Object.freeze(new At(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)),At.ZERO=Object.freeze(new At(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)),At.COLUMN0ROW0=0,At.COLUMN0ROW1=1,At.COLUMN0ROW2=2,At.COLUMN0ROW3=3,At.COLUMN1ROW0=4,At.COLUMN1ROW1=5,At.COLUMN1ROW2=6,At.COLUMN1ROW3=7,At.COLUMN2ROW0=8,At.COLUMN2ROW1=9,At.COLUMN2ROW2=10,At.COLUMN2ROW3=11,At.COLUMN3ROW0=12,At.COLUMN3ROW1=13,At.COLUMN3ROW2=14,At.COLUMN3ROW3=15,Object.defineProperties(At.prototype,{length:{get:function(){return At.packedLength}}}),At.prototype.clone=function(t){return At.clone(this,t)},At.prototype.equals=function(t){return At.equals(this,t)},At.equalsArray=function(t,e,n){return t[0]===e[n]&&t[1]===e[n+1]&&t[2]===e[n+2]&&t[3]===e[n+3]&&t[4]===e[n+4]&&t[5]===e[n+5]&&t[6]===e[n+6]&&t[7]===e[n+7]&&t[8]===e[n+8]&&t[9]===e[n+9]&&t[10]===e[n+10]&&t[11]===e[n+11]&&t[12]===e[n+12]&&t[13]===e[n+13]&&t[14]===e[n+14]&&t[15]===e[n+15]},At.prototype.equalsEpsilon=function(t,e){return At.equalsEpsilon(this,t,e)},At.prototype.toString=function(){return`(${this[0]}, ${this[4]}, ${this[8]}, ${this[12]})\n(${this[1]}, ${this[5]}, ${this[9]}, ${this[13]})\n(${this[2]}, ${this[6]}, ${this[10]}, ${this[14]})\n(${this[3]}, ${this[7]}, ${this[11]}, ${this[15]})`},Object.defineProperties(Wt.prototype,{width:{get:function(){return Wt.computeWidth(this)}},height:{get:function(){return Wt.computeHeight(this)}}}),Wt.packedLength=4,Wt.pack=function(t,e,i){return i=n.defaultValue(i,0),e[i++]=t.west,e[i++]=t.south,e[i++]=t.east,e[i]=t.north,e},Wt.unpack=function(t,e,i){return e=n.defaultValue(e,0),n.defined(i)||(i=new Wt),i.west=t[e++],i.south=t[e++],i.east=t[e++],i.north=t[e],i},Wt.computeWidth=function(t){let e=t.east;const n=t.west;return e<n&&(e+=i.CesiumMath.TWO_PI),e-n},Wt.computeHeight=function(t){return t.north-t.south},Wt.fromDegrees=function(t,e,r,a,o){return t=i.CesiumMath.toRadians(n.defaultValue(t,0)),e=i.CesiumMath.toRadians(n.defaultValue(e,0)),r=i.CesiumMath.toRadians(n.defaultValue(r,0)),a=i.CesiumMath.toRadians(n.defaultValue(a,0)),n.defined(o)?(o.west=t,o.south=e,o.east=r,o.north=a,o):new Wt(t,e,r,a)},Wt.fromRadians=function(t,e,i,r,a){return n.defined(a)?(a.west=n.defaultValue(t,0),a.south=n.defaultValue(e,0),a.east=n.defaultValue(i,0),a.north=n.defaultValue(r,0),a):new Wt(t,e,i,r)},Wt.fromCartographicArray=function(t,e){let r=Number.MAX_VALUE,a=-Number.MAX_VALUE,o=Number.MAX_VALUE,u=-Number.MAX_VALUE,s=Number.MAX_VALUE,l=-Number.MAX_VALUE;for(let e=0,n=t.length;e<n;e++){const n=t[e];r=Math.min(r,n.longitude),a=Math.max(a,n.longitude),s=Math.min(s,n.latitude),l=Math.max(l,n.latitude);const c=n.longitude>=0?n.longitude:n.longitude+i.CesiumMath.TWO_PI;o=Math.min(o,c),u=Math.max(u,c)}return a-r>u-o&&(r=o,a=u,a>i.CesiumMath.PI&&(a-=i.CesiumMath.TWO_PI),r>i.CesiumMath.PI&&(r-=i.CesiumMath.TWO_PI)),n.defined(e)?(e.west=r,e.south=s,e.east=a,e.north=l,e):new Wt(r,s,a,l)},Wt.fromCartesianArray=function(t,e,r){e=n.defaultValue(e,Y.WGS84);let a=Number.MAX_VALUE,o=-Number.MAX_VALUE,u=Number.MAX_VALUE,s=-Number.MAX_VALUE,l=Number.MAX_VALUE,c=-Number.MAX_VALUE;for(let n=0,r=t.length;n<r;n++){const r=e.cartesianToCartographic(t[n]);a=Math.min(a,r.longitude),o=Math.max(o,r.longitude),l=Math.min(l,r.latitude),c=Math.max(c,r.latitude);const f=r.longitude>=0?r.longitude:r.longitude+i.CesiumMath.TWO_PI;u=Math.min(u,f),s=Math.max(s,f)}return o-a>s-u&&(a=u,o=s,o>i.CesiumMath.PI&&(o-=i.CesiumMath.TWO_PI),a>i.CesiumMath.PI&&(a-=i.CesiumMath.TWO_PI)),n.defined(r)?(r.west=a,r.south=l,r.east=o,r.north=c,r):new Wt(a,l,o,c)},Wt.clone=function(t,e){if(n.defined(t))return n.defined(e)?(e.west=t.west,e.south=t.south,e.east=t.east,e.north=t.north,e):new Wt(t.west,t.south,t.east,t.north)},Wt.equalsEpsilon=function(t,e,i){return i=n.defaultValue(i,0),t===e||n.defined(t)&&n.defined(e)&&Math.abs(t.west-e.west)<=i&&Math.abs(t.south-e.south)<=i&&Math.abs(t.east-e.east)<=i&&Math.abs(t.north-e.north)<=i},Wt.prototype.clone=function(t){return Wt.clone(this,t)},Wt.prototype.equals=function(t){return Wt.equals(this,t)},Wt.equals=function(t,e){return t===e||n.defined(t)&&n.defined(e)&&t.west===e.west&&t.south===e.south&&t.east===e.east&&t.north===e.north},Wt.prototype.equalsEpsilon=function(t,e){return Wt.equalsEpsilon(this,t,e)},Wt.validate=function(t){},Wt.southwest=function(t,e){return n.defined(e)?(e.longitude=t.west,e.latitude=t.south,e.height=0,e):new W(t.west,t.south)},Wt.northwest=function(t,e){return n.defined(e)?(e.longitude=t.west,e.latitude=t.north,e.height=0,e):new W(t.west,t.north)},Wt.northeast=function(t,e){return n.defined(e)?(e.longitude=t.east,e.latitude=t.north,e.height=0,e):new W(t.east,t.north)},Wt.southeast=function(t,e){return n.defined(e)?(e.longitude=t.east,e.latitude=t.south,e.height=0,e):new W(t.east,t.south)},Wt.center=function(t,e){let r=t.east;const a=t.west;r<a&&(r+=i.CesiumMath.TWO_PI);const o=i.CesiumMath.negativePiToPi(.5*(a+r)),u=.5*(t.south+t.north);return n.defined(e)?(e.longitude=o,e.latitude=u,e.height=0,e):new W(o,u)},Wt.intersection=function(t,e,r){let a=t.east,o=t.west,u=e.east,s=e.west;a<o&&u>0?a+=i.CesiumMath.TWO_PI:u<s&&a>0&&(u+=i.CesiumMath.TWO_PI),a<o&&s<0?s+=i.CesiumMath.TWO_PI:u<s&&o<0&&(o+=i.CesiumMath.TWO_PI);const l=i.CesiumMath.negativePiToPi(Math.max(o,s)),c=i.CesiumMath.negativePiToPi(Math.min(a,u));if((t.west<t.east||e.west<e.east)&&c<=l)return;const f=Math.max(t.south,e.south),d=Math.min(t.north,e.north);return f>=d?void 0:n.defined(r)?(r.west=l,r.south=f,r.east=c,r.north=d,r):new Wt(l,f,c,d)},Wt.simpleIntersection=function(t,e,i){const r=Math.max(t.west,e.west),a=Math.max(t.south,e.south),o=Math.min(t.east,e.east),u=Math.min(t.north,e.north);if(!(a>=u||r>=o))return n.defined(i)?(i.west=r,i.south=a,i.east=o,i.north=u,i):new Wt(r,a,o,u)},Wt.union=function(t,e,r){n.defined(r)||(r=new Wt);let a=t.east,o=t.west,u=e.east,s=e.west;a<o&&u>0?a+=i.CesiumMath.TWO_PI:u<s&&a>0&&(u+=i.CesiumMath.TWO_PI),a<o&&s<0?s+=i.CesiumMath.TWO_PI:u<s&&o<0&&(o+=i.CesiumMath.TWO_PI);const l=i.CesiumMath.negativePiToPi(Math.min(o,s)),c=i.CesiumMath.negativePiToPi(Math.max(a,u));return r.west=l,r.south=Math.min(t.south,e.south),r.east=c,r.north=Math.max(t.north,e.north),r},Wt.expand=function(t,e,i){return n.defined(i)||(i=new Wt),i.west=Math.min(t.west,e.longitude),i.south=Math.min(t.south,e.latitude),i.east=Math.max(t.east,e.longitude),i.north=Math.max(t.north,e.latitude),i},Wt.contains=function(t,e){let n=e.longitude;const r=e.latitude,a=t.west;let o=t.east;return o<a&&(o+=i.CesiumMath.TWO_PI,n<0&&(n+=i.CesiumMath.TWO_PI)),(n>a||i.CesiumMath.equalsEpsilon(n,a,i.CesiumMath.EPSILON14))&&(n<o||i.CesiumMath.equalsEpsilon(n,o,i.CesiumMath.EPSILON14))&&r>=t.south&&r<=t.north};const Ft=new W;function vt(t,e,i,r){this[0]=n.defaultValue(t,0),this[1]=n.defaultValue(i,0),this[2]=n.defaultValue(e,0),this[3]=n.defaultValue(r,0)}Wt.subsample=function(t,e,r,a){e=n.defaultValue(e,Y.WGS84),r=n.defaultValue(r,0),n.defined(a)||(a=[]);let o=0;const u=t.north,s=t.south,l=t.east,c=t.west,f=Ft;f.height=r,f.longitude=c,f.latitude=u,a[o]=e.cartographicToCartesian(f,a[o]),o++,f.longitude=l,a[o]=e.cartographicToCartesian(f,a[o]),o++,f.latitude=s,a[o]=e.cartographicToCartesian(f,a[o]),o++,f.longitude=c,a[o]=e.cartographicToCartesian(f,a[o]),o++,f.latitude=u<0?u:s>0?s:0;for(let n=1;n<8;++n)f.longitude=-Math.PI+n*i.CesiumMath.PI_OVER_TWO,Wt.contains(t,f)&&(a[o]=e.cartographicToCartesian(f,a[o]),o++);return 0===f.latitude&&(f.longitude=c,a[o]=e.cartographicToCartesian(f,a[o]),o++,f.longitude=l,a[o]=e.cartographicToCartesian(f,a[o]),o++),a.length=o,a},Wt.subsection=function(t,e,r,a,o,u){if(n.defined(u)||(u=new Wt),t.west<=t.east){const n=t.east-t.west;u.west=t.west+e*n,u.east=t.west+a*n}else{const n=i.CesiumMath.TWO_PI+t.east-t.west;u.west=i.CesiumMath.negativePiToPi(t.west+e*n),u.east=i.CesiumMath.negativePiToPi(t.west+a*n)}const s=t.north-t.south;return u.south=t.south+r*s,u.north=t.south+o*s,1===e&&(u.west=t.east),1===a&&(u.east=t.east),1===r&&(u.south=t.north),1===o&&(u.north=t.north),u},Wt.MAX_VALUE=Object.freeze(new Wt(-Math.PI,-i.CesiumMath.PI_OVER_TWO,Math.PI,i.CesiumMath.PI_OVER_TWO)),vt.packedLength=4,vt.pack=function(t,e,i){return i=n.defaultValue(i,0),e[i++]=t[0],e[i++]=t[1],e[i++]=t[2],e[i++]=t[3],e},vt.unpack=function(t,e,i){return e=n.defaultValue(e,0),n.defined(i)||(i=new vt),i[0]=t[e++],i[1]=t[e++],i[2]=t[e++],i[3]=t[e++],i},vt.packArray=function(t,e){const i=t.length,r=4*i;n.defined(e)?(Array.isArray(e)||e.length===r)&&e.length!==r&&(e.length=r):e=new Array(r);for(let n=0;n<i;++n)vt.pack(t[n],e,4*n);return e},vt.unpackArray=function(t,e){const i=t.length;n.defined(e)?e.length=i/4:e=new Array(i/4);for(let n=0;n<i;n+=4){const i=n/4;e[i]=vt.unpack(t,n,e[i])}return e},vt.clone=function(t,e){if(n.defined(t))return n.defined(e)?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):new vt(t[0],t[2],t[1],t[3])},vt.fromArray=vt.unpack,vt.fromColumnMajorArray=function(t,e){return vt.clone(t,e)},vt.fromRowMajorArray=function(t,e){return n.defined(e)?(e[0]=t[0],e[1]=t[2],e[2]=t[1],e[3]=t[3],e):new vt(t[0],t[1],t[2],t[3])},vt.fromScale=function(t,e){return n.defined(e)?(e[0]=t.x,e[1]=0,e[2]=0,e[3]=t.y,e):new vt(t.x,0,0,t.y)},vt.fromUniformScale=function(t,e){return n.defined(e)?(e[0]=t,e[1]=0,e[2]=0,e[3]=t,e):new vt(t,0,0,t)},vt.fromRotation=function(t,e){const i=Math.cos(t),r=Math.sin(t);return n.defined(e)?(e[0]=i,e[1]=r,e[2]=-r,e[3]=i,e):new vt(i,-r,r,i)},vt.toArray=function(t,e){return n.defined(e)?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):[t[0],t[1],t[2],t[3]]},vt.getElementIndex=function(t,e){return 2*t+e},vt.getColumn=function(t,e,n){const i=2*e,r=t[i],a=t[i+1];return n.x=r,n.y=a,n},vt.setColumn=function(t,e,n,i){const r=2*e;return(i=vt.clone(t,i))[r]=n.x,i[r+1]=n.y,i},vt.getRow=function(t,e,n){const i=t[e],r=t[e+2];return n.x=i,n.y=r,n},vt.setRow=function(t,e,n,i){return(i=vt.clone(t,i))[e]=n.x,i[e+2]=n.y,i};const Bt=new u;vt.setScale=function(t,e,n){const i=vt.getScale(t,Bt),r=e.x/i.x,a=e.y/i.y;return n[0]=t[0]*r,n[1]=t[1]*r,n[2]=t[2]*a,n[3]=t[3]*a,n};const Dt=new u;vt.setUniformScale=function(t,e,n){const i=vt.getScale(t,Dt),r=e/i.x,a=e/i.y;return n[0]=t[0]*r,n[1]=t[1]*r,n[2]=t[2]*a,n[3]=t[3]*a,n};const Gt=new u;vt.getScale=function(t,e){return e.x=u.magnitude(u.fromElements(t[0],t[1],Gt)),e.y=u.magnitude(u.fromElements(t[2],t[3],Gt)),e};const kt=new u;vt.getMaximumScale=function(t){return vt.getScale(t,kt),u.maximumComponent(kt)};const jt=new u;vt.setRotation=function(t,e,n){const i=vt.getScale(t,jt);return n[0]=e[0]*i.x,n[1]=e[1]*i.x,n[2]=e[2]*i.y,n[3]=e[3]*i.y,n};const Yt=new u;vt.getRotation=function(t,e){const n=vt.getScale(t,Yt);return e[0]=t[0]/n.x,e[1]=t[1]/n.x,e[2]=t[2]/n.y,e[3]=t[3]/n.y,e},vt.multiply=function(t,e,n){const i=t[0]*e[0]+t[2]*e[1],r=t[0]*e[2]+t[2]*e[3],a=t[1]*e[0]+t[3]*e[1],o=t[1]*e[2]+t[3]*e[3];return n[0]=i,n[1]=a,n[2]=r,n[3]=o,n},vt.add=function(t,e,n){return n[0]=t[0]+e[0],n[1]=t[1]+e[1],n[2]=t[2]+e[2],n[3]=t[3]+e[3],n},vt.subtract=function(t,e,n){return n[0]=t[0]-e[0],n[1]=t[1]-e[1],n[2]=t[2]-e[2],n[3]=t[3]-e[3],n},vt.multiplyByVector=function(t,e,n){const i=t[0]*e.x+t[2]*e.y,r=t[1]*e.x+t[3]*e.y;return n.x=i,n.y=r,n},vt.multiplyByScalar=function(t,e,n){return n[0]=t[0]*e,n[1]=t[1]*e,n[2]=t[2]*e,n[3]=t[3]*e,n},vt.multiplyByScale=function(t,e,n){return n[0]=t[0]*e.x,n[1]=t[1]*e.x,n[2]=t[2]*e.y,n[3]=t[3]*e.y,n},vt.multiplyByUniformScale=function(t,e,n){return n[0]=t[0]*e,n[1]=t[1]*e,n[2]=t[2]*e,n[3]=t[3]*e,n},vt.negate=function(t,e){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e},vt.transpose=function(t,e){const n=t[0],i=t[2],r=t[1],a=t[3];return e[0]=n,e[1]=i,e[2]=r,e[3]=a,e},vt.abs=function(t,e){return e[0]=Math.abs(t[0]),e[1]=Math.abs(t[1]),e[2]=Math.abs(t[2]),e[3]=Math.abs(t[3]),e},vt.equals=function(t,e){return t===e||n.defined(t)&&n.defined(e)&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]},vt.equalsArray=function(t,e,n){return t[0]===e[n]&&t[1]===e[n+1]&&t[2]===e[n+2]&&t[3]===e[n+3]},vt.equalsEpsilon=function(t,e,i){return i=n.defaultValue(i,0),t===e||n.defined(t)&&n.defined(e)&&Math.abs(t[0]-e[0])<=i&&Math.abs(t[1]-e[1])<=i&&Math.abs(t[2]-e[2])<=i&&Math.abs(t[3]-e[3])<=i},vt.IDENTITY=Object.freeze(new vt(1,0,0,1)),vt.ZERO=Object.freeze(new vt(0,0,0,0)),vt.COLUMN0ROW0=0,vt.COLUMN0ROW1=1,vt.COLUMN1ROW0=2,vt.COLUMN1ROW1=3,Object.defineProperties(vt.prototype,{length:{get:function(){return vt.packedLength}}}),vt.prototype.clone=function(t){return vt.clone(this,t)},vt.prototype.equals=function(t){return vt.equals(this,t)},vt.prototype.equalsEpsilon=function(t,e){return vt.equalsEpsilon(this,t,e)},vt.prototype.toString=function(){return`(${this[0]}, ${this[2]})\n(${this[1]}, ${this[3]})`},t.Cartesian2=u,t.Cartesian3=C,t.Cartesian4=xt,t.Cartographic=W,t.Ellipsoid=Y,t.Matrix2=vt,t.Matrix3=et,t.Matrix4=At,t.Rectangle=Wt,t.clone=o}));