import{aasw}from"./chunk-DKG6YEMN.js";import{aasN,casE}from"./chunk-VMIASSRO.js";import"./chunk-AKRPIQPN.js";import"./chunk-NHNM56MI.js";import"./chunk-P73YILG6.js";import"./chunk-VYMAIP2A.js";import{aasv,basG}from"./chunk-ZMGESOEZ.js";import{aasq}from"./chunk-OKWGJEQO.js";import"./chunk-ZBEWS6NN.js";import"./chunk-V7XARCCV.js";import"./chunk-SACP225T.js";import{aask}from"./chunk-YFQNY2YN.js";import{aasO}from"./chunk-NT26NNVH.js";import{basA,casR,dasS}from"./chunk-NW2YE576.js";import{dasC}from"./chunk-2NIQ5ECB.js";import"./chunk-7YEOLR2L.js";import{aasb}from"./chunk-QHHYYTCM.js";import{a,cas_,dass}from"./chunk-RH3GFHG2.js";import{aasD}from"./chunk-FRWNWNYJ.js";import"./chunk-UKWFHLUK.js";import"./chunk-UAWOHN7R.js";import{aasd}from"./chunk-TA3RE4KQ.js";import{aasy}from"./chunk-RTY3VPG6.js";import{easu}from"./chunk-LRNH5AEO.js";functionW(o,i){lett=newO;t.position=newS({componentDatatype:b.DOUBLE,componentsPerAttribute:3,values:o});lete=i.length,r=t.position.values.length/3,f=o.length/3/e,p=k.createTypedArray(r,2*e*(f+1)),m,n,l=0;m=0;leth=m*e;for(n=0;n<e-1;n++)p[l++]=n+h,p[l++]=n+h+1;for(p[l++]=e-1+h,p[l++]=h,m=f-1,h=m*e,n=0;n<e-1;n++)p[l++]=n+h,p[l++]=n+h+1;for(p[l++]=e-1+h,p[l++]=h,m=0;m<f-1;m++){letT=e*m,U=T+e;for(n=0;n<e;n++)p[l++]=n+T,p[l++]=n+U}returnnewR({attributes:t,indices:k.createTypedArray(r,p),boundingSphere:C.fromVertices(o),primitiveType:A.LINES})}functiong(o){o=d(o,d.EMPTY_OBJECT);leti=o.polylinePositions,t=o.shapePositions;if(!u(i))thrownewy("options.polylinePositions is required.");if(!u(t))thrownewy("options.shapePositions is required.");this._positions=i,this._shape=t,this._ellipsoid=s.clone(d(o.ellipsoid,s.default)),this._cornerType=d(o.cornerType,N.ROUNDED),this._granularity=d(o.granularity,D.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeOutlineGeometry";lete=1+i.length*a.packedLength;e+=1+t.length*_.packedLength,this.packedLength=e+s.packedLength+2}g.pack=function(o,i,t){if(!u(o))thrownewy("value is required");if(!u(i))thrownewy("array is required");t=d(t,0);lete,r=o._positions,c=r.length;for(i[t++]=c,e=0;e<c;++e,t+=a.packedLength)a.pack(r[e],i,t);letf=o._shape;for(c=f.length,i[t++]=c,e=0;e<c;++e,t+=_.packedLength)_.pack(f[e],i,t);returns.pack(o._ellipsoid,i,t),t+=s.packedLength,i[t++]=o._cornerType,i[t]=o._granularity,i};varB=s.clone(s.UNIT_SPHERE),P={polylinePositions:void0,shapePositions:void0,ellipsoid:B,height:void0,cornerType:void0,granularity:void0};g.unpack=function(o,i,t){if(!u(o))thrownewy("array is required");i=d(i,0);lete,r=o[i++],c=newArray(r);for(e=0;e<r;++e,i+=a.packedLength)c[e]=a.unpack(o,i);r=o[i++];letf=newArray(r);for(e=0;e<r;++e,i+=_.packedLength)f[e]=_.unpack(o,i);letp=s.unpack(o,i,B);i+=s.packedLength;letm=o[i++],n=o[i];returnu(t)?(t._positions=c,t._shape=f,t._ellipsoid=s.clone(p,t._ellipsoid),t._cornerType=m,t._granularity=n,t):(P.polylinePositions=c,P.shapePositions=f,P.cornerType=m,P.granularity=n,newg(P))};varM=neww;g.createGeometry=function(o){leti=o._positions,t=q(i,a.equalsEpsilon),e=o._shape;if(e=E.removeDuplicatesFromShape(e),t.length<2||e.length<3)return;G.computeWindingOrder2D(e)===v.CLOCKWISE&&e.reverse();letr=w.fromPoints(e,M),c=E.computePositions(t,e,r,o,!1);returnW(c,e)};varL=g;functionj(o,i){returnu(i)&&(o=L.unpack(o,i)),o._ellipsoid=s.clone(o._ellipsoid),L.createGeometry(o)}varhe=j;export{heasdefault};