/** * @license * Cesium - https://github.com/CesiumGS/cesium * Version 1.137.0 * * 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 u}from"./chunk-G2EMNOST.js";import{a as l}from"./chunk-4VFKVGYI.js";import{a as g,b as r}from"./chunk-3WJNS2B6.js";import{e as a}from"./chunk-XCN226AA.js";var ve=new u,Fe=new u;function Me(e,n,t,i,s){if(!a(e))throw new g("cartesian is required.");if(!a(n))throw new g("oneOverRadii is required.");if(!a(t))throw new g("oneOverRadiiSquared is required.");if(!a(i))throw new g("centerToleranceSquared is required.");let f=e.x,p=e.y,y=e.z,q=n.x,R=n.y,S=n.z,_=f*f*q*q,E=p*p*R*R,j=y*y*S*S,N=_+E+j,C=Math.sqrt(1/N),P=u.multiplyByScalar(e,C,ve);if(Nl.EPSILON12);return a(s)?(s.x=f*T,s.y=p*v,s.z=y*F,s):new u(f*T,p*v,y*F)}var V=Me;function d(e,n,t){this.longitude=e??0,this.latitude=n??0,this.height=t??0}d.fromRadians=function(e,n,t,i){return r.typeOf.number("longitude",e),r.typeOf.number("latitude",n),t=t??0,a(i)?(i.longitude=e,i.latitude=n,i.height=t,i):new d(e,n,t)};d.fromDegrees=function(e,n,t,i){return r.typeOf.number("longitude",e),r.typeOf.number("latitude",n),e=l.toRadians(e),n=l.toRadians(n),d.fromRadians(e,n,t,i)};var Ne=new u,ze=new u,Ie=new u;d._ellipsoidOneOverRadii=new u(1/6378137,1/6378137,1/6356752314245179e-9);d._ellipsoidOneOverRadiiSquared=new u(1/(6378137*6378137),1/(6378137*6378137),1/(6356752314245179e-9*6356752314245179e-9));d._ellipsoidCenterToleranceSquared=l.EPSILON1;d.fromCartesian=function(e,n,t){let i=a(n)?n.oneOverRadii:d._ellipsoidOneOverRadii,s=a(n)?n.oneOverRadiiSquared:d._ellipsoidOneOverRadiiSquared,f=a(n)?n._centerToleranceSquared:d._ellipsoidCenterToleranceSquared,p=V(e,i,s,f,ze);if(!a(p))return;let y=u.multiplyComponents(p,s,Ne);y=u.normalize(y,y);let q=u.subtract(e,p,Ie),R=Math.atan2(y.y,y.x),S=Math.asin(y.z),_=l.sign(u.dot(q,e))*u.magnitude(q);return a(t)?(t.longitude=R,t.latitude=S,t.height=_,t):new d(R,S,_)};d.toCartesian=function(e,n,t){return r.defined("cartographic",e),u.fromRadians(e.longitude,e.latitude,e.height,n,t)};d.clone=function(e,n){if(a(e))return a(n)?(n.longitude=e.longitude,n.latitude=e.latitude,n.height=e.height,n):new d(e.longitude,e.latitude,e.height)};d.equals=function(e,n){return e===n||a(e)&&a(n)&&e.longitude===n.longitude&&e.latitude===n.latitude&&e.height===n.height};d.equalsEpsilon=function(e,n,t){return t=t??0,e===n||a(e)&&a(n)&&Math.abs(e.longitude-n.longitude)<=t&&Math.abs(e.latitude-n.latitude)<=t&&Math.abs(e.height-n.height)<=t};d.ZERO=Object.freeze(new d(0,0,0));d.prototype.clone=function(e){return d.clone(this,e)};d.prototype.equals=function(e){return d.equals(this,e)};d.prototype.equalsEpsilon=function(e,n){return d.equalsEpsilon(this,e,n)};d.prototype.toString=function(){return`(${this.longitude}, ${this.latitude}, ${this.height})`};var z=d;function o(e,n){this.x=e??0,this.y=n??0}o.fromElements=function(e,n,t){return a(t)?(t.x=e,t.y=n,t):new o(e,n)};o.clone=function(e,n){if(a(e))return a(n)?(n.x=e.x,n.y=e.y,n):new o(e.x,e.y)};o.fromCartesian3=o.clone;o.fromCartesian4=o.clone;o.packedLength=2;o.pack=function(e,n,t){return r.typeOf.object("value",e),r.defined("array",n),t=t??0,n[t++]=e.x,n[t]=e.y,n};o.unpack=function(e,n,t){return r.defined("array",e),n=n??0,a(t)||(t=new o),t.x=e[n++],t.y=e[n],t};o.packArray=function(e,n){r.defined("array",e);let t=e.length,i=t*2;if(!a(n))n=new Array(i);else{if(!Array.isArray(n)&&n.length!==i)throw new g("If result is a typed array, it must have exactly array.length * 2 elements");n.length!==i&&(n.length=i)}for(let s=0;s=this._radii.z-n))return t};var Le=new u;c.prototype.getLocalCurvature=function(e,n){r.typeOf.object("surfacePosition",e),a(n)||(n=new ie);let t=this.getSurfaceNormalIntersectionWithZAxis(e,0,Le),i=u.distance(e,t),s=this.minimumRadius*i/this.maximumRadius**2,f=i*s**2;return ie.fromElements(1/i,1/f,n)};var $e=[.14887433898163,.43339539412925,.67940956829902,.86506336668898,.97390652851717,0],De=[.29552422471475,.26926671930999,.21908636251598,.14945134915058,.066671344308684,0];function be(e,n,t){r.typeOf.number("a",e),r.typeOf.number("b",n),r.typeOf.func("func",t);let i=.5*(n+e),s=.5*(n-e),f=0;for(let p=0;p<5;p++){let y=s*$e[p];f+=De[p]*(t(i+y)+t(i-y))}return f*=s,f}c.prototype.surfaceArea=function(e){r.typeOf.object("rectangle",e);let n=e.west,t=e.east,i=e.south,s=e.north;for(;t{let n=new Image;n.onload=function(){h._result=n.width>0&&n.height>0,e(h._result)},n.onerror=function(){h._result=!1,e(h._result)},n.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA"})),h._promise};Object.defineProperties(h,{initialized:{get:function(){return a(h._result)}}});var M=[];typeof ArrayBuffer<"u"&&(M.push(Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array),typeof Uint8ClampedArray<"u"&&M.push(Uint8ClampedArray),typeof Uint8ClampedArray<"u"&&M.push(Uint8ClampedArray),typeof BigInt64Array<"u"&&M.push(BigInt64Array),typeof BigUint64Array<"u"&&M.push(BigUint64Array));var x={isChrome:fe,chromeVersion:Ze,isSafari:qe,safariVersion:Ge,isWebkit:Re,webkitVersion:Xe,isInternetExplorer:Ae,internetExplorerVersion:Ye,isEdge:X,edgeVersion:Qe,isFirefox:Y,firefoxVersion:Ke,isWindows:He,isIPadOrIOS:Je,hardwareConcurrency:O.hardwareConcurrency??3,supportsPointerEvents:en,supportsImageRenderingPixelated:Ce,supportsWebP:h,imageRenderingValue:nn,typedArrayTypes:M};x.supportsBasis=function(e){return x.supportsWebAssembly()&&e.context.supportsBasis};x.supportsFullscreen=function(){return Se.supportsFullscreen()};x.supportsTypedArrays=function(){return typeof ArrayBuffer<"u"};x.supportsBigInt64Array=function(){return typeof BigInt64Array<"u"};x.supportsBigUint64Array=function(){return typeof BigUint64Array<"u"};x.supportsBigInt=function(){return typeof BigInt<"u"};x.supportsWebWorkers=function(){return typeof Worker<"u"};x.supportsWebAssembly=function(){return typeof WebAssembly<"u"};x.supportsWebgl2=function(e){return r.defined("scene",e),e.context.webgl2};x.supportsEsmWebWorkers=function(){return!Y()||parseInt(se)>=114};var zn=x;export{z as a,ie as b,En as c,zn as d};