import{a}from"./chunk-V7BDYEN7.js";import{aasb}from"./chunk-GMMUK6QU.js";import{aasF}from"./chunk-4MYAYFOP.js";import{aasV}from"./chunk-FG3CL3AH.js";import"./chunk-VMXXQ6B4.js";import"./chunk-XCRMBS5M.js";import{aasD}from"./chunk-N5SNKJ43.js";import{aasW}from"./chunk-P73YILG6.js";import"./chunk-VYMAIP2A.js";import{aasj,bask}from"./chunk-ZMGESOEZ.js";import"./chunk-OKWGJEQO.js";import"./chunk-ZBEWS6NN.js";import"./chunk-V7XARCCV.js";import"./chunk-SACP225T.js";import{aasM}from"./chunk-YFQNY2YN.js";import{aasG}from"./chunk-NT26NNVH.js";import{basB,casC,dasv}from"./chunk-NW2YE576.js";import{dasz}from"./chunk-2NIQ5ECB.js";import"./chunk-7YEOLR2L.js";import{aasw}from"./chunk-QHHYYTCM.js";import{aasS,dasy}from"./chunk-RH3GFHG2.js";import{aasT}from"./chunk-FRWNWNYJ.js";import"./chunk-UKWFHLUK.js";import"./chunk-UAWOHN7R.js";import{aasP}from"./chunk-TA3RE4KQ.js";import{aasU,basA}from"./chunk-RTY3VPG6.js";import{easO}from"./chunk-LRNH5AEO.js";varY=[],R=[];functionK(e,t,r,H,l){letp=W.fromPoints(t,e).projectPointsOntoPlane(t,Y);k.computeWindingOrder2D(p)===j.CLOCKWISE&&(p.reverse(),t=t.slice().reverse());letn,i,o=t.length,c=0;if(H)for(n=newFloat64Array(o*2*3),i=0;i<o;i++){letu=t[i],h=t[(i+1)%o];n[c++]=u.x,n[c++]=u.y,n[c++]=u.z,n[c++]=h.x,n[c++]=h.y,n[c++]=h.z}else{letu=0;if(l===b.GEODESIC)for(i=0;i<o;i++)u+=a.subdivideLineCount(t[i],t[(i+1)%o],r);elseif(l===b.RHUMB)for(i=0;i<o;i++)u+=a.subdivideRhumbLineCount(e,t[i],t[(i+1)%o],r);for(n=newFloat64Array(u*3),i=0;i<o;i++){leth;l===b.GEODESIC?h=a.subdivideLine(t[i],t[(i+1)%o],r,R):l===b.RHUMB&&(h=a.subdivideRhumbLine(e,t[i],t[(i+1)%o],r,R));letg=h.length;for(letd=0;d<g;++d)n[c++]=h[d]}}o=n.length/3;letf=o*2,m=M.createTypedArray(o,f);for(c=0,i=0;i<o-1;i++)m[c++]=i,m[c++]=i+1;returnm[c++]=o-1,m[c++]=0,newF({geometry:newC({attributes:newG({position:newv({componentDatatype:w.DOUBLE,componentsPerAttribute:3,values:n})}),indices:m,primitiveType:B.LINES})})}functionq(e,t,r,H,l){letp=W.fromPoints(t,e).projectPointsOntoPlane(t,Y);k.computeWindingOrder2D(p)===j.CLOCKWISE&&(p.reverse(),t=t.slice().reverse());letn,i,o=t.length,c=newArray(o),f=0;if(H)for(n=newFloat64Array(o*2*3*2),i=0;i<o;++i){c[i]=f/3;letg=t[i],d=t[(i+1)%o];n[f++]=g.x,n[f++]=g.y,n[f++]=g.z,n[f++]=d.x,n[f++]=d.y,n[f++]=d.z}else{letg=0;if(l===b.GEODESIC)for(i=0;i<o;i++)g+=a.subdivideLineCount(t[i],t[(i+1)%o],r);elseif(l===b.RHUMB)for(i=0;i<o;i++)g+=a.subdivideRhumbLineCount(e,t[i],t[(i+1)%o],r);for(n=newFloat64Array(g*3*2),i=0;i<o;++i){c[i]=f/3;letd;l===b.GEODESIC?d=a.subdivideLine(t[i],t[(i+1)%o],r,R):l===b.RHUMB&&(d=a.subdivideRhumbLine(e,t[i],t[(i+1)%o],r,R));letE=d.length;for(letN=0;N<E;++N)n[f++]=d[N]}}o=n.length/(3*2);letm=c.length,u=(o*2+m)*2,h=M.createTypedArray(o+m,u);for(f=0,i=0;i<o;++i)h[f++]=i,h[f++]=(i+1)%o,h[f++]=i+o,h[f++]=(i+1)%o+o;for(i=0;i<m;i++){letg=c[i];h[f++]=g,h[f++]=g+o}returnnewF({geometry:newC({attributes:newG({position:newv({componentDatatype:w.DOUBLE,componentsPerAttribute:3,values:n})}),indices:h,primitiveType:B.LINES})})}functionL(e){if(A.typeOf.object("options",e),A.typeOf.object("options.polygonHierarchy",e.polygonHierarchy),e.perPositionHeight&&O(e.height))thrownewU("Cannot use both options.perPositionHeight and options.height");if(O(e.arcType)&&e.arcType!==b.GEODESIC&&e.arcType!==b.RHUMB)thrownewU("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");lett=e.polygonHierarchy,r=P(e.ellipsoid,y.default),H=P(e.granularity,T.RADIANS_PER_DEGREE),l=P(e.perPositionHeight,!1),_=l&&O(e.extrudedHeight),p=P(e.arcType,b.GEODESIC),s=P(e.height,0),n=P(e.extrudedHeight,s);if(!_){leti=Math.max(s,n);n=Math.min(s,n),s=i}this._ellipsoid=y.clone(r),this._granularity=H,this._height=s,this._extrudedHeight=n,this._arcType=p,this._polygonHierarchy=t,this._perPositionHeight=l,this._perPositionHeightExtrude=_,this._offsetAttribute=e.offsetAttribute,this._workerName="createPolygonOutlineGeometry",this.packedLength=a.computeHierarchyPackedLength(t,S)+y.packedLength+8}L.pack=function(e,t,r){returnA.typeOf.object("value",e)