/** * @license * Cesium - https://github.com/CesiumGS/cesium * Version 1.110.1 * * 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 L,b as x,c as dn,d as cn}from"./chunk-4ZQSV4FU.js";import{a as E}from"./chunk-CLQ5X6HS.js";import{a as Rn}from"./chunk-7DENS74L.js";import{a as T}from"./chunk-FOJGNIAW.js";import{a as H,b as f}from"./chunk-UGI536VH.js";import{e as M}from"./chunk-BQUQ5TPM.js";function b(n,o,c,y){this.x=T(n,0),this.y=T(o,0),this.z=T(c,0),this.w=T(y,0)}b.fromElements=function(n,o,c,y,p){return M(p)?(p.x=n,p.y=o,p.z=c,p.w=y,p):new b(n,o,c,y)};b.fromColor=function(n,o){return f.typeOf.object("color",n),M(o)?(o.x=n.red,o.y=n.green,o.z=n.blue,o.w=n.alpha,o):new b(n.red,n.green,n.blue,n.alpha)};b.clone=function(n,o){if(M(n))return M(o)?(o.x=n.x,o.y=n.y,o.z=n.z,o.w=n.w,o):new b(n.x,n.y,n.z,n.w)};b.packedLength=4;b.pack=function(n,o,c){return f.typeOf.object("value",n),f.defined("array",o),c=T(c,0),o[c++]=n.x,o[c++]=n.y,o[c++]=n.z,o[c]=n.w,o};b.unpack=function(n,o,c){return f.defined("array",n),o=T(o,0),M(c)||(c=new b),c.x=n[o++],c.y=n[o++],c.z=n[o++],c.w=n[o],c};b.packArray=function(n,o){f.defined("array",n);let c=n.length,y=c*4;if(!M(o))o=new Array(y);else{if(!Array.isArray(o)&&o.length!==y)throw new H("If result is a typed array, it must have exactly array.length * 4 elements");o.length!==y&&(o.length=y)}for(let p=0;p=0?R.longitude:R.longitude+E.TWO_PI;p=Math.min(p,m),O=Math.max(O,m)}return y-c>O-p&&(c=p,y=O,y>E.PI&&(y=y-E.TWO_PI),c>E.PI&&(c=c-E.TWO_PI)),M(o)?(o.west=c,o.south=e,o.east=y,o.north=h,o):new q(c,e,y,h)};q.fromCartesianArray=function(n,o,c){f.defined("cartesians",n),o=T(o,dn.WGS84);let y=Number.MAX_VALUE,p=-Number.MAX_VALUE,O=Number.MAX_VALUE,e=-Number.MAX_VALUE,h=Number.MAX_VALUE,d=-Number.MAX_VALUE;for(let j=0,R=n.length;j=0?m.longitude:m.longitude+E.TWO_PI;O=Math.min(O,A),e=Math.max(e,A)}return p-y>e-O&&(y=O,p=e,p>E.PI&&(p=p-E.TWO_PI),y>E.PI&&(y=y-E.TWO_PI)),M(c)?(c.west=y,c.south=h,c.east=p,c.north=d,c):new q(y,h,p,d)};q.clone=function(n,o){if(M(n))return M(o)?(o.west=n.west,o.south=n.south,o.east=n.east,o.north=n.north,o):new q(n.west,n.south,n.east,n.north)};q.equalsEpsilon=function(n,o,c){return c=T(c,0),n===o||M(n)&&M(o)&&Math.abs(n.west-o.west)<=c&&Math.abs(n.south-o.south)<=c&&Math.abs(n.east-o.east)<=c&&Math.abs(n.north-o.north)<=c};q.prototype.clone=function(n){return q.clone(this,n)};q.prototype.equals=function(n){return q.equals(this,n)};q.equals=function(n,o){return n===o||M(n)&&M(o)&&n.west===o.west&&n.south===o.south&&n.east===o.east&&n.north===o.north};q.prototype.equalsEpsilon=function(n,o){return q.equalsEpsilon(this,n,o)};q.validate=function(n){f.typeOf.object("rectangle",n);let o=n.north;f.typeOf.number.greaterThanOrEquals("north",o,-E.PI_OVER_TWO),f.typeOf.number.lessThanOrEquals("north",o,E.PI_OVER_TWO);let c=n.south;f.typeOf.number.greaterThanOrEquals("south",c,-E.PI_OVER_TWO),f.typeOf.number.lessThanOrEquals("south",c,E.PI_OVER_TWO);let y=n.west;f.typeOf.number.greaterThanOrEquals("west",y,-Math.PI),f.typeOf.number.lessThanOrEquals("west",y,Math.PI);let p=n.east;f.typeOf.number.greaterThanOrEquals("east",p,-Math.PI),f.typeOf.number.lessThanOrEquals("east",p,Math.PI)};q.southwest=function(n,o){return f.typeOf.object("rectangle",n),M(o)?(o.longitude=n.west,o.latitude=n.south,o.height=0,o):new x(n.west,n.south)};q.northwest=function(n,o){return f.typeOf.object("rectangle",n),M(o)?(o.longitude=n.west,o.latitude=n.north,o.height=0,o):new x(n.west,n.north)};q.northeast=function(n,o){return f.typeOf.object("rectangle",n),M(o)?(o.longitude=n.east,o.latitude=n.north,o.height=0,o):new x(n.east,n.north)};q.southeast=function(n,o){return f.typeOf.object("rectangle",n),M(o)?(o.longitude=n.east,o.latitude=n.south,o.height=0,o):new x(n.east,n.south)};q.center=function(n,o){f.typeOf.object("rectangle",n);let c=n.east,y=n.west;c0?y+=E.TWO_PI:O0&&(O+=E.TWO_PI),y=R))return M(c)?(c.west=h,c.south=j,c.east=d,c.north=R,c):new q(h,j,d,R)};q.simpleIntersection=function(n,o,c){f.typeOf.object("rectangle",n),f.typeOf.object("otherRectangle",o);let y=Math.max(n.west,o.west),p=Math.max(n.south,o.south),O=Math.min(n.east,o.east),e=Math.min(n.north,o.north);if(!(p>=e||y>=O))return M(c)?(c.west=y,c.south=p,c.east=O,c.north=e,c):new q(y,p,O,e)};q.union=function(n,o,c){f.typeOf.object("rectangle",n),f.typeOf.object("otherRectangle",o),M(c)||(c=new q);let y=n.east,p=n.west,O=o.east,e=o.west;y0?y+=E.TWO_PI:O0&&(O+=E.TWO_PI),yp||E.equalsEpsilon(c,p,E.EPSILON14))&&(c=n.south&&y<=n.north};var Jn=new x;q.subsample=function(n,o,c,y){f.typeOf.object("rectangle",n),o=T(o,dn.WGS84),c=T(c,0),M(y)||(y=[]);let p=0,O=n.north,e=n.south,h=n.east,d=n.west,j=Jn;j.height=c,j.longitude=d,j.latitude=O,y[p]=o.cartographicToCartesian(j,y[p]),p++,j.longitude=h,y[p]=o.cartographicToCartesian(j,y[p]),p++,j.latitude=e,y[p]=o.cartographicToCartesian(j,y[p]),p++,j.longitude=d,y[p]=o.cartographicToCartesian(j,y[p]),p++,O<0?j.latitude=O:e>0?j.latitude=e:j.latitude=0;for(let R=1;R<8;++R)j.longitude=-Math.PI+R*E.PI_OVER_TWO,q.contains(n,j)&&(y[p]=o.cartographicToCartesian(j,y[p]),p++);return j.latitude===0&&(j.longitude=d,y[p]=o.cartographicToCartesian(j,y[p]),p++,j.longitude=h,y[p]=o.cartographicToCartesian(j,y[p]),p++),y.length=p,y};q.subsection=function(n,o,c,y,p,O){if(f.typeOf.object("rectangle",n),f.typeOf.number.greaterThanOrEquals("westLerp",o,0),f.typeOf.number.lessThanOrEquals("westLerp",o,1),f.typeOf.number.greaterThanOrEquals("southLerp",c,0),f.typeOf.number.lessThanOrEquals("southLerp",c,1),f.typeOf.number.greaterThanOrEquals("eastLerp",y,0),f.typeOf.number.lessThanOrEquals("eastLerp",y,1),f.typeOf.number.greaterThanOrEquals("northLerp",p,0),f.typeOf.number.lessThanOrEquals("northLerp",p,1),f.typeOf.number.lessThanOrEquals("westLerp",o,y),f.typeOf.number.lessThanOrEquals("southLerp",c,p),M(O)||(O=new q),n.west<=n.east){let h=n.east-n.west;O.west=n.west+o*h,O.east=n.west+y*h}else{let h=E.TWO_PI+n.east-n.west;O.west=E.negativePiToPi(n.west+o*h),O.east=E.negativePiToPi(n.west+y*h)}let e=n.north-n.south;return O.south=n.south+c*e,O.north=n.south+p*e,o===1&&(O.west=n.east),y===1&&(O.east=n.east),c===1&&(O.south=n.north),p===1&&(O.north=n.north),O};q.MAX_VALUE=Object.freeze(new q(-Math.PI,-E.PI_OVER_TWO,Math.PI,E.PI_OVER_TWO));var mo=q;function w(n,o){this.x=T(n,0),this.y=T(o,0)}w.fromElements=function(n,o,c){return M(c)?(c.x=n,c.y=o,c):new w(n,o)};w.clone=function(n,o){if(M(n))return M(o)?(o.x=n.x,o.y=n.y,o):new w(n.x,n.y)};w.fromCartesian3=w.clone;w.fromCartesian4=w.clone;w.packedLength=2;w.pack=function(n,o,c){return f.typeOf.object("value",n),f.defined("array",o),c=T(c,0),o[c++]=n.x,o[c]=n.y,o};w.unpack=function(n,o,c){return f.defined("array",n),o=T(o,0),M(c)||(c=new w),c.x=n[o++],c.y=n[o],c};w.packArray=function(n,o){f.defined("array",n);let c=n.length,y=c*2;if(!M(o))o=new Array(y);else{if(!Array.isArray(o)&&o.length!==y)throw new H("If result is a typed array, it must have exactly array.length * 2 elements");o.length!==y&&(o.length=y)}for(let p=0;p