import{aasd}from"./chunk-N5SNKJ43.js";import{aasl}from"./chunk-NT26NNVH.js";import{basO,cash,dasp}from"./chunk-NW2YE576.js";import{dasA}from"./chunk-2NIQ5ECB.js";import"./chunk-7YEOLR2L.js";import{a}from"./chunk-QHHYYTCM.js";import{aasm}from"./chunk-RH3GFHG2.js";import"./chunk-FRWNWNYJ.js";import"./chunk-UKWFHLUK.js";import"./chunk-UAWOHN7R.js";import{aasu}from"./chunk-TA3RE4KQ.js";import{aasb,basr}from"./chunk-RTY3VPG6.js";import{easc}from"./chunk-LRNH5AEO.js";varg=newm;functionf(e){e=u(e,u.EMPTY_OBJECT);lett=e.minimum,n=e.maximum;if(r.typeOf.object("min",t),r.typeOf.object("max",n),c(e.offsetAttribute)&&e.offsetAttribute===d.TOP)thrownewb("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._min=m.clone(t),this._max=m.clone(n),this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxOutlineGeometry"}f.fromDimensions=function(e){e=u(e,u.EMPTY_OBJECT);lett=e.dimensions;r.typeOf.object("dimensions",t),r.typeOf.number.greaterThanOrEquals("dimensions.x",t.x,0),r.typeOf.number.greaterThanOrEquals("dimensions.y",t.y,0),r.typeOf.number.greaterThanOrEquals("dimensions.z",t.z,0);letn=m.multiplyByScalar(t,.5,newm);returnnewf({minimum:m.negate(n,newm),maximum:n,offsetAttribute:e.offsetAttribute})};f.fromAxisAlignedBoundingBox=function(e){returnr.typeOf.object("boundindBox",e),newf({minimum:e.minimum,maximum:e.maximum})};f.packedLength=2*m.packedLength+1;f.pack=function(e,t,n){returnr.typeOf.object("value",e),r.defined("array",t),n=u(n,0),m.pack(e._min,t,n),m.pack(e._max,t,n+m.packedLength),t[n+m.packedLength*2]=u(e._offsetAttribute,-1),t};varw=newm,x=newm,_={minimum:w,maximum:x,offsetAttribute:void0};f.unpack=function(e,t,n){r.defined("array",e),t=u(t,0);lets=m.unpack(e,t,w),o=m.unpack(e,t+m.packedLength,x),i=e[t+m.packedLength*2];returnc(n)?(n._min=m.clone(s,n._min),n._max=m.clone(o,n._max),n._offsetAttribute=i===-1?void0:i,n):(_.offsetAttribute=i===-1?void0:i,newf(_))};f.createGeometry=function(e){lett=e._min,n=e._max;if(m.equals(t,n))return;lets=newl,o=newUint16Array(12*2),i=newFloat64Array(8*3);i[0]=t.x,i[1]=t.y,i[2]=t.z,i[3]=n.x,i[4]=t.y,i[5]=t.z,i[6]=n.x,i[7]=n.y,i[8]=t.z,i[9]=t.x,i[10]=n.y,i[11]=t.z,i[12]=t.x,i[13]=t.y,i[14]=n.z,i[15]=n.x,i[16]=t.y,i[17]=n.z,i[18]=n.x,i[19]=n.y,i[20]=n.z,i[21]=t.x,i[22]=n.y,i[23]=n.z,s.position=newp({componentDatatype:a.DOUBLE,componentsPerAttribute:3,values:i}),o[0]=4,o[1]=5,o[2]=5,o[3]=6,o[4]=6,o[5]=7,o[6]=7,o[7]=4,o[8]=0,o[9]=1,o[10]=1,o[11]=2,o[12]=2,o[13]=3,o[14]=3,o[15]=0,o[16]=0,o[17]=4,o[18]=1,o[19]=5,o[20]=2,o[21]=6,o[22]=3,o[23]=7;letk=m.subtract(n,t,g),E=m.magnitude(k)*.5;if(c(e._offsetAttribute)){letT=i.length,B=e._offsetAttribute===d.NONE?0:1,z=newUint8Array(T/3).fill(B);s.applyOffset=newp({componentDatatype:a.UNSIGNED_BYTE,componentsPerAttribute:1,values:z})}returnnewh({attributes:s,indices:o,primitiveType:O.LINES,boundingSphere:newA(m.ZERO,E),offsetAttribute:e._offsetAttribute})};vary=f;functionL(e,t){returnc(t)&&(e=y.unpack(e,t)),y.createGeometry(e)}varR=L;export{Rasdefault};