wangjuncheng
3 天以前 8adbf886a8062a0c96feadfe701a266601acd134
1
2
3
4
5
6
/**
 * SmartEarth WebSDK - https://websdk.terra-it.cn
 * Version 5.4.1
 */
 
import{a as Oe}from"./chunk-JOO5BKHH.js";import{a as W}from"./chunk-R6MANQZ2.js";import{a as Nt}from"./chunk-YCO6GHZ4.js";import{a as De}from"./chunk-YME4CS4F.js";import{a as Le}from"./chunk-DA6K763I.js";import{a as ee}from"./chunk-TWEYJPY7.js";import{b as te}from"./chunk-5HPENZ6M.js";import{a as Ft}from"./chunk-SY6XZLBE.js";import{c as Ce,d as jt}from"./chunk-6SNQZF7I.js";import{a as Pt,d as U}from"./chunk-CLGTNV2A.js";import{d as _e,e as Ne,f as Qt,h as Y}from"./chunk-RQCJJCAO.js";import{a as zt}from"./chunk-7J4RJR4J.js";import{a as Rt,b as t,c as u,d as At,e as B,f as vt,g as Bt}from"./chunk-UMC5CP2H.js";import{a as p}from"./chunk-72V3KRTJ.js";import"./chunk-7M2TDEJ6.js";import"./chunk-W5CDIT4C.js";import{a as wt,b as tt}from"./chunk-VJ26MOOM.js";import{e as m}from"./chunk-E3YQ3WWZ.js";function it(e){e=e??Bt.EMPTY_OBJECT,this._ellipsoid=e.ellipsoid??B.default,this._rectangle=e.rectangle??Y.MAX_VALUE,this._bounds=e.bounds??[],this._projection=new Pt(this._ellipsoid),this._numberOfLevelZeroTilesX=e.numberOfLevelZeroTilesX??2,this._numberOfLevelZeroTilesY=e.numberOfLevelZeroTilesY??1,this._tileInfo=e.tileInfo}Object.defineProperties(it.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},bounds:{get:function(){return this._bounds}},projection:{get:function(){return this._projection}}});it.prototype.getNumberOfXTilesAtLevel=function(e){if(!m(this._tileInfo))return this._numberOfLevelZeroTilesX<<e;let r=this._tileInfo.lods.filter(function(n){return n.level===e})[0].resolution;return Math.round(360/(this._tileInfo.rows*r))};it.prototype.getNumberOfYTilesAtLevel=function(e){if(!m(this._tileInfo))return this._numberOfLevelZeroTilesY<<e;let r=this._tileInfo.lods.filter(function(n){return n.level===e})[0].resolution;return Math.round(180/(this._tileInfo.cols*r))};it.prototype.rectangleToNativeRectangle=function(e,o){tt.defined("rectangle",e);let r=p.toDegrees(e.west),n=p.toDegrees(e.south),i=p.toDegrees(e.east),a=p.toDegrees(e.north);return m(o)?(o.west=r,o.south=n,o.east=i,o.north=a,o):new Y(r,n,i,a)};it.prototype.tileXYToNativeRectangle=function(e,o,r,n){let i=this.tileXYToRectangle(e,o,r,n);return i.west=p.toDegrees(i.west),i.south=p.toDegrees(i.south),i.east=p.toDegrees(i.east),i.north=p.toDegrees(i.north),i};it.prototype.tileXYToRectangle=function(e,o,r,n){let i=this._rectangle,a=this.getNumberOfXTilesAtLevel(r),c=this.getNumberOfYTilesAtLevel(r),l=i.width/a,s=e*l+i.west,d=(e+1)*l+i.west,h=i.height/c,_=i.north-o*h,S=i.north-(o+1)*h;return m(n)||(n=new Y(s,S,d,_)),n.west=s,n.south=S,n.east=d,n.north=_,n};it.prototype.positionToTileXY=function(e,o,r){let n=this._rectangle;if(!Y.contains(n,e))return;let i=this.getNumberOfXTilesAtLevel(o),a=this.getNumberOfYTilesAtLevel(o),c=n.width/i,l=n.height/a,s=e.longitude;n.east<n.west&&(s+=p.TWO_PI);let d=(s-n.west)/c|0;d>=i&&(d=i-1);let h=(n.north-e.latitude)/l|0;return h>=a&&(h=a-1),m(r)?(r.x=d,r.y=h,r):new At(d,h)};var Ie=it;var He=new t,ye=new t,ke=new u,ne=new t,pn=new t,Me=new U,dn=new Ie,Ct=[new u,new u,new u,new u],Ot=new At,w={};w.initialize=function(){let e=w._initPromise;return m(e)||(e=_e.fetchJson(Ne("Assets/approximateTerrainHeights.json")).then(function(o){if(Rt.changeApproximateTerrainHeights===!0)for(let r in o)o.hasOwnProperty(r)&&(o[r][0]=Rt.minTerrainHeight,o[r][1]=Rt.maxTerrainHeight);w._terrainHeights=o}),w._initPromise=e),e};w.getMinimumMaximumHeights=function(e,o){if(tt.defined("rectangle",e),!m(w._terrainHeights))throw new wt("You must call ApproximateTerrainHeights.initialize and wait for the promise to resolve before using this function");o=o??B.default;let r=be(e),n=w._defaultMinTerrainHeight,i=w._defaultMaxTerrainHeight;if(m(r)){let a=`${r.level}-${r.x}-${r.y}`,c=w._terrainHeights[a];m(c)&&(n=c[0],i=c[1]),o.cartographicToCartesian(Y.northeast(e,ke),He),o.cartographicToCartesian(Y.southwest(e,ke),ye),t.midpoint(ye,He,ne);let l=o.scaleToGeodeticSurface(ne,pn);if(m(l)){let s=t.distance(ne,l);n=Math.min(n,-s)}else n=w._defaultMinTerrainHeight}return n=Math.max(w._defaultMinTerrainHeight,n),{minimumTerrainHeight:n,maximumTerrainHeight:i}};w.getBoundingSphere=function(e,o){if(tt.defined("rectangle",e),!m(w._terrainHeights))throw new wt("You must call ApproximateTerrainHeights.initialize and wait for the promise to resolve before using this function");o=o??B.default;let r=be(e),n=w._defaultMaxTerrainHeight;if(m(r)){let a=`${r.level}-${r.x}-${r.y}`,c=w._terrainHeights[a];m(c)&&(n=c[1])}let i=U.fromRectangle3D(e,o,0);return U.fromRectangle3D(e,o,n,Me),U.union(i,Me,i)};function be(e){u.fromRadians(e.east,e.north,0,Ct[0]),u.fromRadians(e.west,e.north,0,Ct[1]),u.fromRadians(e.east,e.south,0,Ct[2]),u.fromRadians(e.west,e.south,0,Ct[3]);let o=0,r=0,n=0,i=0,a=w._terrainHeightsMaxLevel,c;for(c=0;c<=a;++c){let l=!1;for(let s=0;s<4;++s){let d=Ct[s];if(dn.positionToTileXY(d,c,Ot),s===0)n=Ot.x,i=Ot.y;else if(n!==Ot.x||i!==Ot.y){l=!0;break}}if(l)break;o=n,r=i}if(c!==0)return{x:o,y:r,level:c>a?a:c-1}}w._terrainHeightsMaxLevel=6;w._defaultMaxTerrainHeight=9e3;w._defaultMinTerrainHeight=-1e5;w._terrainHeights=void 0;w._initPromise=void 0;Object.defineProperties(w,{initialized:{get:function(){return m(w._terrainHeights)}}});var Xt=w;var he=[Pt,Oe],fn=he.length,Qe=Math.cos(p.toRadians(30)),Re=Math.cos(p.toRadians(150)),tn=0,en=1e3;function at(e){e=e??Bt.EMPTY_OBJECT;let o=e.positions;if(!m(o)||o.length<2)throw new wt("At least two positions are required.");if(m(e.arcType)&&e.arcType!==W.GEODESIC&&e.arcType!==W.RHUMB)throw new wt("Valid options for arcType are ArcType.GEODESIC and ArcType.RHUMB.");this.width=e.width??1,this._positions=o,this.granularity=e.granularity??9999,this.loop=e.loop??!1,this.arcType=e.arcType??W.GEODESIC,this._ellipsoid=B.default,this._projectionIndex=0,this._workerName="createGroundPolylineGeometry",this._scene3DOnly=!1}Object.defineProperties(at.prototype,{packedLength:{get:function(){return 1+this._positions.length*3+1+1+1+B.packedLength+1+1}}});at.setProjectionAndEllipsoid=function(e,o){let r=0;for(let n=0;n<fn;n++)if(o instanceof he[n]){r=n;break}e._projectionIndex=r,e._ellipsoid=o.ellipsoid};var mn=new t,Ae=new t,Pe=new t;function le(e,o,r,n,i){let a=R(n,e,0,mn),c=R(n,e,r,Ae),l=R(n,o,0,Pe),s=et(c,a,Ae),d=et(l,a,Pe);return t.cross(d,s,i),t.normalize(i,i)}var gn=new u,un=new t,wn=new t,Sn=new t;function oe(e,o,r,n,i,a,c,l,s,d,h){if(i===0)return;let _;a===W.GEODESIC?_=new De(e,o,c):a===W.RHUMB&&(_=new ee(e,o,c));let S=_.surfaceDistance;if(S<i)return;let b=le(e,o,n,c,Sn),L=Math.ceil(S/i),D=S/L,z=D,G=L-1,f=l.length;for(let j=0;j<G;j++){let P=_.interpolateUsingSurfaceDistance(z,gn),y=R(c,P,r,un),I=R(c,P,n,wn);t.pack(b,l,f),t.pack(y,s,f),t.pack(I,d,f),h.push(P.latitude),h.push(P.longitude),f+=3,z+=D}}var ie=new u;function R(e,o,r,n){return u.clone(o,ie),ie.height=r,u.toCartesian(ie,e,n)}at.pack=function(e,o,r){tt.typeOf.object("value",e),tt.defined("array",o);let n=r??0,i=e._positions,a=i.length;o[n++]=a;for(let c=0;c<a;++c){let l=i[c];t.pack(l,o,n),n+=3}return o[n++]=e.granularity,o[n++]=e.loop?1:0,o[n++]=e.arcType,B.pack(e._ellipsoid,o,n),n+=B.packedLength,o[n++]=e._projectionIndex,o[n++]=e._scene3DOnly?1:0,o};at.unpack=function(e,o,r){tt.defined("array",e);let n=o??0,i=e[n++],a=new Array(i);for(let S=0;S<i;S++)a[S]=t.unpack(e,n),n+=3;let c=e[n++],l=e[n++]===1,s=e[n++],d=B.unpack(e,n);n+=B.packedLength;let h=e[n++],_=e[n++]===1;return m(r)||(r=new at({positions:a})),r._positions=a,r.granularity=c,r.loop=l,r.arcType=s,r._ellipsoid=d,r._projectionIndex=h,r._scene3DOnly=_,r};function et(e,o,r){return t.subtract(e,o,r),t.normalize(r,r),r}function ve(e,o,r,n){return n=et(e,o,n),n=t.cross(n,r,n),n=t.normalize(n,n),n=t.cross(r,n,n),n}var Tn=new t,En=new t,xn=new t,nn=new t,_n=0,Nn=-1;function re(e,o,r,n,i){let a=et(r,o,nn),c=ve(e,o,a,Tn),l=ve(n,o,a,En);if(p.equalsEpsilon(t.dot(c,l),Nn,p.EPSILON5))return i=t.cross(a,c,i),i=t.normalize(i,i),i;i=t.add(l,c,i),i=t.normalize(i,i);let s=t.cross(a,i,xn);return t.dot(l,s)<_n&&(i=t.negate(i,i)),i}var qt=Ft.fromPointNormal(t.ZERO,t.UNIT_Y),Cn=new t,On=new t,Ln=new t,Dn=new t,In=new t,Yt=new t,Ut=new u,Be=new u,ze=new u;at.createGeometry=function(e){let o=!e._scene3DOnly,r=e.loop,n=e._ellipsoid,i=e.granularity,a=e.arcType,c=new he[e._projectionIndex](n),l=tn,s=en,d,h,_=e._positions,S=_.length;S===2&&(r=!1);let b,L,D,z,G=new ee(void 0,void 0,n),f,j,P,y=[_[0]];for(h=0;h<S-1;h++)b=_[h],L=_[h+1],f=te.lineSegmentPlane(b,L,qt,Yt),m(f)&&!t.equalsEpsilon(f,b,p.EPSILON7)&&!t.equalsEpsilon(f,L,p.EPSILON7)&&(e.arcType===W.GEODESIC?y.push(t.clone(f)):e.arcType===W.RHUMB&&(P=n.cartesianToCartographic(f,Ut).longitude,D=n.cartesianToCartographic(b,Ut),z=n.cartesianToCartographic(L,Be),G.setEndPoints(D,z),j=G.findIntersectionWithLongitude(P,ze),f=n.cartographicToCartesian(j,Yt),m(f)&&!t.equalsEpsilon(f,b,p.EPSILON7)&&!t.equalsEpsilon(f,L,p.EPSILON7)&&y.push(t.clone(f)))),y.push(L);r&&(b=_[S-1],L=_[0],f=te.lineSegmentPlane(b,L,qt,Yt),m(f)&&!t.equalsEpsilon(f,b,p.EPSILON7)&&!t.equalsEpsilon(f,L,p.EPSILON7)&&(e.arcType===W.GEODESIC?y.push(t.clone(f)):e.arcType===W.RHUMB&&(P=n.cartesianToCartographic(f,Ut).longitude,D=n.cartesianToCartographic(b,Ut),z=n.cartesianToCartographic(L,Be),G.setEndPoints(D,z),j=G.findIntersectionWithLongitude(P,ze),f=n.cartographicToCartesian(j,Yt),m(f)&&!t.equalsEpsilon(f,b,p.EPSILON7)&&!t.equalsEpsilon(f,L,p.EPSILON7)&&y.push(t.clone(f)))));let I=y.length,N=new Array(I);for(h=0;h<I;h++){let X=u.fromCartesian(y[h],n);X.height=0,N[h]=X}if(N=Le(N,u.equalsEpsilon),I=N.length,I<2)return;let H=[],A=[],v=[],E=[],x=Cn,O=On,C=Ln,F=Dn,k=In,g=N[0],Z=N[1],Dt=N[I-1];for(x=R(n,Dt,l,x),F=R(n,Z,l,F),O=R(n,g,l,O),C=R(n,g,s,C),r?k=re(x,O,C,F,k):k=le(g,Z,s,n,k),t.pack(k,A,0),t.pack(O,v,0),t.pack(C,E,0),H.push(g.latitude),H.push(g.longitude),oe(g,Z,l,s,i,a,n,A,v,E,H),h=1;h<I-1;++h){x=t.clone(O,x),O=t.clone(F,O);let X=N[h];R(n,X,s,C),R(n,N[h+1],l,F),re(x,O,C,F,k),d=A.length,t.pack(k,A,d),t.pack(O,v,d),t.pack(C,E,d),H.push(X.latitude),H.push(X.longitude),oe(N[h],N[h+1],l,s,i,a,n,A,v,E,H)}let M=N[I-1],St=N[I-2];if(O=R(n,M,l,O),C=R(n,M,s,C),r){let X=N[0];x=R(n,St,l,x),F=R(n,X,l,F),k=re(x,O,C,F,k)}else k=le(St,M,s,n,k);if(d=A.length,t.pack(k,A,d),t.pack(O,v,d),t.pack(C,E,d),H.push(M.latitude),H.push(M.longitude),r){for(oe(M,g,l,s,i,a,n,A,v,E,H),d=A.length,h=0;h<3;++h)A[d+h]=A[h],v[d+h]=v[h],E[d+h]=E[h];H.push(g.latitude),H.push(g.longitude)}return to(r,c,v,E,A,H,o)};var Hn=new t,yn=new vt,kn=new Qt;function je(e,o,r,n){let i=et(r,o,Hn),a=t.dot(i,e);if(a>Qe||a<Re){let c=et(n,r,nn),l=a<Re?p.PI_OVER_TWO:-p.PI_OVER_TWO,s=Qt.fromAxisAngle(c,l,kn),d=vt.fromQuaternion(s,yn);return vt.multiplyByVector(d,e,e),!0}return!1}var Fe=new u,Mn=new t,Xe=new t;function Lt(e,o,r,n,i){let a=u.toCartesian(o,e._ellipsoid,Mn),c=t.add(a,r,Xe),l=!1,s=e._ellipsoid,d=s.cartesianToCartographic(c,Fe);Math.abs(o.longitude-d.longitude)>p.PI_OVER_TWO&&(l=!0,c=t.subtract(a,r,Xe),d=s.cartesianToCartographic(c,Fe)),d.height=0;let h=e.project(d,i);return i=t.subtract(h,n,i),i.z=0,i=t.normalize(i,i),l&&t.negate(i,i),i}var bn=new t,Ye=new t;function Ue(e,o,r,n,i,a){let c=t.subtract(o,e,bn);t.normalize(c,c);let l=r-tn,s=t.multiplyByScalar(c,l,Ye);t.add(e,s,i);let d=n-en;s=t.multiplyByScalar(c,d,Ye),t.add(o,s,a)}var Rn=new t;function Gt(e,o){let r=Ft.getPointDistance(qt,e),n=Ft.getPointDistance(qt,o),i=Rn;p.equalsEpsilon(r,0,p.EPSILON2)?(i=et(o,e,i),t.multiplyByScalar(i,p.EPSILON2,i),t.add(e,i,e)):p.equalsEpsilon(n,0,p.EPSILON2)&&(i=et(e,o,i),t.multiplyByScalar(i,p.EPSILON2,i),t.add(o,i,o))}function An(e,o){let r=Math.abs(e.longitude),n=Math.abs(o.longitude);if(p.equalsEpsilon(r,p.PI,p.EPSILON11)){let i=p.sign(o.longitude);return e.longitude=i*(r-p.EPSILON11),1}else if(p.equalsEpsilon(n,p.PI,p.EPSILON11)){let i=p.sign(e.longitude);return o.longitude=i*(n-p.EPSILON11),2}return 0}var on=new u,rn=new u,Ge=new t,ae=new t,qe=new t,We=new t,Pn=new t,Ze=new t,vn=[on,rn],Bn=new Y,zn=new t,jn=new t,Fn=new t,Xn=new t,Yn=new t,Un=new t,ce=new t,se=new t,Gn=new t,qn=new t,Wn=new t,Ve=new t,Zn=new t,Vn=new t,$n=new Nt,Jn=new Nt,$e=new t,Kn=new t,Je=new t,Qn=[new U,new U],an=[0,2,1,0,3,2,0,7,3,0,4,7,0,5,4,0,1,5,5,7,4,5,6,7,5,2,6,5,1,2,3,6,2,3,7,6],Ke=an.length;function to(e,o,r,n,i,a,c){let l,s,d=o._ellipsoid,h=r.length/3-1,_=h*8,S=_*4,b=h*36,L=_>65535?new Uint32Array(b):new Uint16Array(b),D=new Float64Array(_*3),z=new Float32Array(S),G=new Float32Array(S),f=new Float32Array(S),j=new Float32Array(S),P=new Float32Array(S),y,I,N,H;c&&(y=new Float32Array(S),I=new Float32Array(S),N=new Float32Array(S),H=new Float32Array(_*2));let A=a.length/2,v=0,E=on;E.height=0;let x=rn;x.height=0;let O=Ge,C=ae;if(c)for(s=0,l=1;l<A;l++)E.latitude=a[s],E.longitude=a[s+1],x.latitude=a[s+2],x.longitude=a[s+3],O=o.project(E,O),C=o.project(x,C),v+=t.distance(O,C),s+=2;let F=n.length/3;C=t.unpack(n,0,C);let k=0;for(s=3,l=1;l<F;l++)O=t.clone(C,O),C=t.unpack(n,s,C),k+=t.distance(O,C),s+=3;let g;s=3;let Z=0,Dt=0,M=0,St=0,X=!1,ct=t.unpack(r,0,We),st=t.unpack(n,0,ae),q=t.unpack(i,0,Ze);if(e){let lt=t.unpack(r,r.length-6,qe);je(q,lt,ct,st)&&(q=t.negate(q,q))}let de=0,fe=0,Wt=0;for(l=0;l<h;l++){let lt=t.clone(ct,qe),Vt=t.clone(st,Ge),ft=t.clone(q,Pn);X&&(ft=t.negate(ft,ft)),ct=t.unpack(r,s,We),st=t.unpack(n,s,ae),q=t.unpack(i,s,Ze),X=je(q,lt,ct,st),E.latitude=a[Z],E.longitude=a[Z+1],x.latitude=a[Z+2],x.longitude=a[Z+3];let ht,mt,nt,ot;if(c){let T=An(E,x);ht=o.project(E,Yn),mt=o.project(x,Un);let ut=et(mt,ht,$e);ut.y=Math.abs(ut.y),nt=ce,ot=se,T===0||t.dot(ut,t.UNIT_Y)>Qe?(nt=Lt(o,E,ft,ht,ce),ot=Lt(o,x,q,mt,se)):T===1?(ot=Lt(o,x,q,mt,se),nt.x=0,nt.y=p.sign(E.longitude-Math.abs(x.longitude)),nt.z=0):(nt=Lt(o,E,ft,ht,ce),ot.x=0,ot.y=p.sign(E.longitude-x.longitude),ot.z=0)}let ue=t.distance(Vt,st),we=Nt.fromCartesian(lt,$n),It=t.subtract(ct,lt,Gn),cn=t.normalize(It,Ve),Et=t.subtract(Vt,lt,qn);Et=t.normalize(Et,Et);let gt=t.cross(cn,Et,Ve);gt=t.normalize(gt,gt);let Ht=t.cross(Et,ft,Zn);Ht=t.normalize(Ht,Ht);let yt=t.subtract(st,ct,Wn);yt=t.normalize(yt,yt);let kt=t.cross(q,yt,Vn);kt=t.normalize(kt,kt);let sn=ue/k,ln=de/k,$t=0,xt,Mt,pt,Se=0,Te=0;if(c){$t=t.distance(ht,mt),xt=Nt.fromCartesian(ht,Jn),Mt=t.subtract(mt,ht,$e),pt=t.normalize(Mt,Kn);let T=pt.x;pt.x=pt.y,pt.y=-T,Se=$t/v,Te=fe/v}for(g=0;g<8;g++){let T=St+g*4,ut=Dt+g*2,_t=T+3,xe=g<4?1:-1,bt=g===2||g===3||g===6||g===7?1:-1;t.pack(we.high,z,T),z[_t]=It.x,t.pack(we.low,G,T),G[_t]=It.y,t.pack(Ht,f,T),f[_t]=It.z,t.pack(kt,j,T),j[_t]=sn*xe,t.pack(gt,P,T);let dt=ln*bt;dt===0&&bt<0&&(dt=9),P[_t]=dt,c&&(y[T]=xt.high.x,y[T+1]=xt.high.y,y[T+2]=xt.low.x,y[T+3]=xt.low.y,N[T]=-nt.y,N[T+1]=nt.x,N[T+2]=ot.y,N[T+3]=-ot.x,I[T]=Mt.x,I[T+1]=Mt.y,I[T+2]=pt.x,I[T+3]=pt.y,H[ut]=Se*xe,dt=Te*bt,dt===0&&bt<0&&(dt=9),H[ut+1]=dt)}let V=Fn,$=Xn,J=zn,K=jn,hn=Y.fromCartographicArray(vn,Bn),Ee=Xt.getMinimumMaximumHeights(hn,d),Jt=Ee.minimumTerrainHeight,Kt=Ee.maximumTerrainHeight;Wt+=Math.abs(Jt),Wt+=Math.abs(Kt),Ue(lt,Vt,Jt,Kt,V,J),Ue(ct,st,Jt,Kt,$,K);let Q=t.multiplyByScalar(gt,p.EPSILON5,Je);t.add(V,Q,V),t.add($,Q,$),t.add(J,Q,J),t.add(K,Q,K),Gt(V,$),Gt(J,K),t.pack(V,D,M),t.pack($,D,M+3),t.pack(K,D,M+6),t.pack(J,D,M+9),Q=t.multiplyByScalar(gt,-2*p.EPSILON5,Je),t.add(V,Q,V),t.add($,Q,$),t.add(J,Q,J),t.add(K,Q,K),Gt(V,$),Gt(J,K),t.pack(V,D,M+12),t.pack($,D,M+15),t.pack(K,D,M+18),t.pack(J,D,M+21),Z+=2,s+=3,Dt+=16,M+=24,St+=32,de+=ue,fe+=$t}s=0;let me=0;for(l=0;l<h;l++){for(g=0;g<Ke;g++)L[s+g]=an[g]+me;me+=8,s+=Ke}let Zt=Qn;U.fromVertices(r,t.ZERO,3,Zt[0]),U.fromVertices(n,t.ZERO,3,Zt[1]);let ge=U.fromBoundingSpheres(Zt);ge.radius+=Wt/(h*2);let Tt={position:new jt({componentDatatype:zt.DOUBLE,componentsPerAttribute:3,normalize:!1,values:D}),startHiAndForwardOffsetX:rt(z),startLoAndForwardOffsetY:rt(G),startNormalAndForwardOffsetZ:rt(f),endNormalAndTextureCoordinateNormalizationX:rt(j),rightNormalAndTextureCoordinateNormalizationY:rt(P)};return c&&(Tt.startHiLo2D=rt(y),Tt.offsetAndRight2D=rt(I),Tt.startEndNormals2D=rt(N),Tt.texcoordNormalization2D=new jt({componentDatatype:zt.FLOAT,componentsPerAttribute:2,normalize:!1,values:H})),new Ce({attributes:Tt,indices:L,boundingSphere:ge})}function rt(e){return new jt({componentDatatype:zt.FLOAT,componentsPerAttribute:4,normalize:!1,values:e})}at._projectNormal=Lt;var pe=at;function eo(e,o){return Xt.initialize().then(function(){return m(o)&&(e=pe.unpack(e,o)),pe.createGeometry(e)})}var ei=eo;export{ei as default};