1import{r as n,j as o,q as F}from"./chunk-7c95c149.js";import{f as S,a as G,_ as I,O as ce,b as $,R as ue,E as le,g as fe,e as pe,G as de,u as me,C as ge,D as he}from"./chunk-87cee1fa.js";import{h as xe,E as ye,i as be,j as ve,W as je,H as Me,e as T,f as se,V as Re,C as oe,L as Ae,F as we,B as Ee,k as B,O as _e}from"./chunk-5e59878c.js";import{u as k,A as Pe}from"../entries/pages_sites_abrigo.2873ecc5.js";import{u as Ce,m as X,P as Q}from"./chunk-aa898620.js";import{u as Se,a as ze}from"./chunk-c7147f70.js";import{u as V,l as N}from"./chunk-a256095a.js";import{H as U}from"./chunk-8b458796.js";import"./chunk-56865e9e.js";import"./chunk-cf010ec4.js";import"./chunk-7e6dec72.js";import"./chunk-ab25de1f.js";import"./chunk-ab9dfbfe.js";import"./chunk-bd799850.js";import"./chunk-c92baa57.js";const ke=t=>typeof t=="function",Z=n.forwardRef(({envMap:t,resolution:u=256,frames:p=1/0,children:a,makeDefault:h,...i},g)=>{const v=S(({set:e})=>e),b=S(({camera:e})=>e),y=S(({size:e})=>e),j=n.useRef(null),s=n.useRef(null),M=Ce(u);n.useLayoutEffect(()=>{i.manual||j.current.updateProjectionMatrix()},[y,i]),n.useLayoutEffect(()=>{j.current.updateProjectionMatrix()}),n.useLayoutEffect(()=>{if(h){const e=b;return v(()=>({camera:j.current})),()=>v(()=>({camera:e}))}},[j,h,v]);let E=0,_=null;const w=ke(a);return G(e=>{w&&(p===1/0||E<p)&&(s.current.visible=!1,e.gl.setRenderTarget(M),_=e.scene.background,t&&(e.scene.background=t),e.gl.render(e.scene,j.current),e.scene.background=_,e.gl.setRenderTarget(null),s.current.visible=!0,E++)}),n.createElement(n.Fragment,null,n.createElement("orthographicCamera",I({left:y.width/-2,right:y.width/2,top:y.height/2,bottom:y.height/-2,ref:X([j,g])},i),!w&&a),n.createElement("group",{ref:s},w&&a(M.texture)))}),H=n.forwardRef(({makeDefault:t,camera:u,regress:p,domElement:a,enableDamping:h=!0,keyEvents:i=!1,onChange:g,onStart:v,onEnd:b,...y},j)=>{const s=S(m=>m.invalidate),M=S(m=>m.camera),E=S(m=>m.gl),_=S(m=>m.events),w=S(m=>m.setEvents),e=S(m=>m.set),f=S(m=>m.get),c=S(m=>m.performance),r=u||M,d=a||_.connected||E.domElement,l=n.useMemo(()=>new ce(r),[r]);return G(()=>{l.enabled&&l.update()},-1),n.useEffect(()=>(i&&l.connect(i===!0?d:i),l.connect(d),()=>void l.dispose()),[i,d,p,l,s]),n.useEffect(()=>{const m=R=>{s(),p&&c.regress(),g&&g(R)},x=R=>{v&&v(R)},P=R=>{b&&b(R)};return l.addEventListener("change",m),l.addEventListener("start",x),l.addEventListener("end",P),()=>{l.removeEventListener("start",x),l.removeEventListener("end",P),l.removeEventListener("change",m)}},[g,v,b,l,s,w]),n.useEffect(()=>{if(t){const m=f().controls;return e({controls:l}),()=>e({controls:m})}},[t,l]),n.createElement("primitive",I({ref:j,object:l,enableDamping:h},y))}),W={apartment:"lebombo_1k.hdr",city:"potsdamer_platz_1k.hdr",dawn:"kiara_1_dawn_1k.hdr",forest:"forest_slope_1k.hdr",lobby:"st_fagans_interior_1k.hdr",night:"dikhololo_night_1k.hdr",park:"rooitou_park_1k.hdr",studio:"studio_small_03_1k.hdr",sunset:"venice_sunset_1k.hdr",warehouse:"empty_warehouse_01_1k.hdr"},Be="https://raw.githack.com/pmndrs/drei-assets/456060a26bbeb8fdf79326f224b6d99b8bcce736/hdri/",ee=t=>Array.isArray(t);function ae({files:t=["/px.png","/nx.png","/py.png","/ny.png","/pz.png","/nz.png"],path:u="",preset:p=void 0,encoding:a=void 0,extensions:h}={}){var i,g,v;let b=null,y=!1,j;if(p){if(!(p in W))throw new Error("Preset must be one of: "+Object.keys(W).join(", "));t=W[p],u=Be}if(y=ee(t),j=ee(t)?"cube":t.startsWith("data:application/exr")?"exr":t.startsWith("data:application/hdr")?"hdr":(i=t.split(".").pop())==null||(g=i.split("?"))==null||(v=g.shift())==null?void 0:v.toLowerCase(),b=y?be:j==="hdr"?ue:j==="exr"?le:null,!b)throw new Error("useEnvironment: Unrecognized file extension: "+t);const s=$(b,y?[t]:t,w=>{w.setPath==null||w.setPath(u),h&&h(w)}),M=y?s[0]:s;M.mapping=y?xe:ye;const E=3001,_=3e3;return"colorSpace"in M?M.colorSpace=a??y?"srgb":"srgb-linear":M.encoding=a??y?E:_,M}const Le=t=>t.current&&t.current.isScene,Ie=t=>Le(t)?t.current:t;function Y(t,u,p,a,h=0){const i=Ie(u||p),g=i.background,v=i.environment,b=i.backgroundBlurriness||0;return t!=="only"&&(i.environment=a),t&&(i.background=a),t&&i.backgroundBlurriness!==void 0&&(i.backgroundBlurriness=h),()=>{t!=="only"&&(i.environment=v),t&&(i.background=g),t&&i.backgroundBlurriness!==void 0&&(i.backgroundBlurriness=b)}}function q({scene:t,background:u=!1,blur:p,map:a}){const h=S(i=>i.scene);return n.useLayoutEffect(()=>{if(a)return Y(u,t,h,a,p)},[h,t,a,u,p]),null}function ie({background:t=!1,scene:u,blur:p,...a}){const h=ae(a),i=S(g=>g.scene);return n.useLayoutEffect(()=>Y(t,u,i,h,p),[h,t,u,i,p]),null}function Te({children:t,near:u=1,far:p=1e3,resolution:a=256,frames:h=1,map:i,background:g=!1,blur:v,scene:b,files:y,path:j,preset
1:s=void 0,extensions:M}){const E=S(r=>r.gl),_=S(r=>r.scene),w=n.useRef(null),[e]=n.useState(()=>new ve),f=n.useMemo(()=>{const r=new je(a);return r.texture.type=Me,r},[a]);n.useLayoutEffect(()=>(h===1&&w.current.update(E,e),Y(g,b,_,f.texture,v)),[t,e,f.texture,b,_,g,h,E]);let c=1;return G(()=>{(h===1/0||c<h)&&(w.current.update(E,e),c++)}),n.createElement(n.Fragment,null,fe(n.createElement(n.Fragment,null,t,n.createElement("cubeCamera",{ref:w,args:[u,p,f]}),y||s?n.createElement(ie,{background:!0,files:y,preset:s,path:j,extensions:M}):i?n.createElement(q,{background:!0,map:i,extensions:M}):null),e))}function Fe(t){var u,p,a,h;const i=ae(t),g=t.map||i;n.useMemo(()=>pe({GroundProjectedEnvImpl:de}),[]);const v=n.useMemo(()=>[g],[g]),b=(u=t.ground)==null?void 0:u.height,y=(p=t.ground)==null?void 0:p.radius,j=(a=(h=t.ground)==null?void 0:h.scale)!==null&&a!==void 0?a:1e3;return n.createElement(n.Fragment,null,n.createElement(q,I({},t,{map:g})),n.createElement("groundProjectedEnvImpl",{args:v,scale:j,height:b,radius:y}))}function Ne(t){return t.ground?n.createElement(Fe,t):t.map?n.createElement(q,t):t.children?n.createElement(Te,t):n.createElement(ie,t)}let L,D;const Ue=n.createContext(null),te=new se,re=new Re,De=n.forwardRef(({children:t,range:u,limit:p=1e3,...a},h)=>{const i=n.useRef(null),[g,v]=n.useState([]),[[b,y,j]]=n.useState(()=>[new Float32Array(p*3),Float32Array.from({length:p*3},()=>1),Float32Array.from({length:p},()=>1)]);n.useEffect(()=>{i.current.geometry.attributes.position.needsUpdate=!0}),G(()=>{for(i.current.updateMatrix(),i.current.updateMatrixWorld(),te.copy(i.current.matrixWorld).invert(),i.current.geometry.drawRange.count=Math.min(p,u!==void 0?u:p,g.length),L=0;L<g.length;L++)D=g[L].current,D.getWorldPosition(re).applyMatrix4(te),re.toArray(b,L*3),i.current.geometry.attributes.position.needsUpdate=!0,D.matrixWorldNeedsUpdate=!0,D.color.toArray(y,L*3),i.current.geometry.attributes.color.needsUpdate=!0,j.set([D.size],L),i.current.geometry.attributes.size.needsUpdate=!0});const s=n.useMemo(()=>({getParent:()=>i,subscribe:M=>(v(E=>[...E,M]),()=>v(E=>E.filter(_=>_.current!==M.current)))}),[]);return n.createElement("points",I({userData:{instances:g},matrixAutoUpdate:!1,ref:X([h,i]),raycast:()=>null},a),n.createElement("bufferGeometry",null,n.createElement("bufferAttribute",{attach:"attributes-position",count:b.length/3,array:b,itemSize:3,usage:T}),n.createElement("bufferAttribute",{attach:"attributes-color",count:y.length/3,array:y,itemSize:3,usage:T}),n.createElement("bufferAttribute",{attach:"attributes-size",count:j.length,array:j,itemSize:1,usage:T})),n.createElement(Ue.Provider,{value:s},t))}),Ge=n.forwardRef(({children:t,positions:u,colors:p,sizes:a,stride:h=3,...i},g)=>{const v=n.useRef(null);return G(()=>{const b=v.current.geometry.attributes;b.position.needsUpdate=!0,p&&(b.color.needsUpdate=!0),a&&(b.size.needsUpdate=!0)}),n.createElement("points",I({ref:X([g,v])},i),n.createElement("bufferGeometry",null,n.createElement("bufferAttribute",{attach:"attributes-position",count:u.length/h,array:u,itemSize:h,usage:T}),p&&n.createElement("bufferAttribute",{attach:"attributes-color",count:p.length/h,array:p,itemSize:3,usage:T}),a&&n.createElement("bufferAttribute",{attach:"attributes-size",count:a.length/h,array:a,itemSize:1,usage:T})),t)}),J=n.forwardRef((t,u)=>t.positions instanceof Float32Array?n.createElement(Ge,I({},t,{ref:u})):n.createElement(De,I({},t,{ref:u}))),z=new oe;class K extends Ae{constructor(u){super(u),this.propertyNameMapping={},this.customPropertyMapping={}}load(u,p,a,h){const i=this,g=new we(this.manager);g.setPath(this.path),g.setResponseType("arraybuffer"),g.setRequestHeader(this.requestHeader),g.setWithCredentials(this.withCredentials),g.load(u,function(v){try{p(i.parse(v))}catch(b){h?h(b):console.error(b),i.manager.itemError(u)}},a,h)}setPropertyNameMapping(u){this.propertyNameMapping=u}setCustomPropertyNameMapping(u){this.customPropertyMapping=u}parse(u){function p(e,f=0){const c=/^ply([\s\S]*)end_header(\r\n|\r|\n)/;let r="";const d=c.exec(e);d!==null&&(r=d[1]);const l={comments:[],elements:[],headerLength:f,objInfo:""},m=r.split(/\r\n|\r|\n/);let x;
1function P(R,C){const A={type:R[0]};return A.type==="list"?(A.name=R[3],A.countType=R[1],A.itemType=R[2]):A.name=R[1],A.name in C&&(A.name=C[A.name]),A}for(let R=0;R<m.length;R++){let C=m[R];if(C=C.trim(),C==="")continue;const A=C.split(/\s+/),O=A.shift();switch(C=A.join(" "),O){case"format":l.format=A[0],l.version=A[1];break;case"comment":l.comments.push(C);break;case"element":x!==void 0&&l.elements.push(x),x={},x.name=A[0],x.count=parseInt(A[1]),x.properties=[];break;case"property":x.properties.push(P(A,w.propertyNameMapping));break;case"obj_info":l.objInfo=C;break;default:console.log("unhandled",O,A)}}return x!==void 0&&l.elements.push(x),l}function a(e,f){switch(f){case"char":case"uchar":case"short":case"ushort":case"int":case"uint":case"int8":case"uint8":case"int16":case"uint16":case"int32":case"uint32":return parseInt(e);case"float":case"double":case"float32":case"float64":return parseFloat(e)}}function h(e,f){const c={};for(let r=0;r<e.length;r++){if(f.empty())return null;if(e[r].type==="list"){const d=[],l=a(f.next(),e[r].countType);for(let m=0;m<l;m++){if(f.empty())return null;d.push(a(f.next(),e[r].itemType))}c[e[r].name]=d}else c[e[r].name]=a(f.next(),e[r].type)}return c}function i(){const e={indices:[],vertices:[],normals:[],uvs:[],faceVertexUvs:[],colors:[],faceVertexColors:[]};for(const f of Object.keys(w.customPropertyMapping))e[f]=[];return e}function g(e){const f=e.map(r=>r.name);function c(r){for(let d=0,l=r.length;d<l;d++){const m=r[d];if(f.includes(m))return m}return null}return{attrX:c(["x","px","posx"])||"x",attrY:c(["y","py","posy"])||"y",attrZ:c(["z","pz","posz"])||"z",attrNX:c(["nx","normalx"]),attrNY:c(["ny","normaly"]),attrNZ:c(["nz","normalz"]),attrS:c(["s","u","texture_u","tx"]),attrT:c(["t","v","texture_v","ty"]),attrR:c(["red","diffuse_red","r","diffuse_r"]),attrG:c(["green","diffuse_green","g","diffuse_g"]),attrB:c(["blue","diffuse_blue","b","diffuse_b"])}}function v(e,f){const c=i(),r=/end_header\s+(\S[\s\S]*\S|\S)\s*$/;let d,l;(l=r.exec(e))!==null?d=l[1].split(/\s+/):d=[];const m=new Oe(d);e:for(let x=0;x<f.elements.length;x++){const P=f.elements[x],R=g(P.properties);for(let C=0;C<P.count;C++){const A=h(P.properties,m);if(!A)break e;y(c,P.name,A,R)}}return b(c)}function b(e){let f=new Ee;e.indices.length>0&&f.setIndex(e.indices),f.setAttribute("position",new B(e.vertices,3)),e.normals.length>0&&f.setAttribute("normal",new B(e.normals,3)),e.uvs.length>0&&f.setAttribute("uv",new B(e.uvs,2)),e.colors.length>0&&f.setAttribute("color",new B(e.colors,3)),(e.faceVertexUvs.length>0||e.faceVertexColors.length>0)&&(f=f.toNonIndexed(),e.faceVertexUvs.length>0&&f.setAttribute("uv",new B(e.faceVertexUvs,2)),e.faceVertexColors.length>0&&f.setAttribute("color",new B(e.faceVertexColors,3)));for(const c of Object.keys(w.customPropertyMapping))e[c].length>0&&f.setAttribute(c,new B(e[c],w.customPropertyMapping[c].length));return f.computeBoundingSphere(),f}function y(e,f,c,r){if(f==="vertex"){e.vertices.push(c[r.attrX],c[r.attrY],c[r.attrZ]),r.attrNX!==null&&r.attrNY!==null&&r.attrNZ!==null&&e.normals.push(c[r.attrNX],c[r.attrNY],c[r.attrNZ]),r.attrS!==null&&r.attrT!==null&&e.uvs.push(c[r.attrS],c[r.attrT]),r.attrR!==null&&r.attrG!==null&&r.attrB!==null&&(z.setRGB(c[r.attrR]/255,c[r.attrG]/255,c[r.attrB]/255).convertSRGBToLinear(),e.colors.push(z.r,z.g,z.b));for(const d of Object.keys(w.customPropertyMapping))for(const l of w.customPropertyMapping[d])e[d].push(c[l])}else if(f==="face"){const d=c.vertex_indices||c.vertex_index,l=c.texcoord;d.length===3?(e.indices.push(d[0],d[1],d[2]),l&&l.length===6&&(e.faceVertexUvs.push(l[0],l[1]),e.faceVertexUvs.push(l[2],l[3]),e.faceVertexUvs.push(l[4],l[5]))):d.length===4&&(e.indices.push(d[0],d[1],d[3]),e.indices.push(d[1],d[2],d[3])),r.attrR!==null&&r.attrG!==null&&r.attrB!==null&&(z.setRGB(c[r.attrR]/255,c[r.attrG]/255,c[r.attrB]/255).convertSRGBToLinear(),e.faceVertexColors.push(z.r,z.g,z.b),e.faceVertexColors.push(z.r,z.g,z.b),e.faceVertexColors.push(z.r,z.g,z.b))}}function j(e,f){const c={};let r=0;for(let d=0;d<f.length;d++){const l=f[d],m=l.valueReader;if(l.type==="list"){const x=[],P=l.countReader.read(e+r);r+=l.countReader.size;
1for(let R=0;R<P;R++)x.push(m.read(e+r)),r+=m.size;c[l.name]=x}else c[l.name]=m.read(e+r),r+=m.size}return[c,r]}function s(e,f,c){function r(d,l,m){switch(l){case"int8":case"char":return{read:x=>d.getInt8(x),size:1};case"uint8":case"uchar":return{read:x=>d.getUint8(x),size:1};case"int16":case"short":return{read:x=>d.getInt16(x,m),size:2};case"uint16":case"ushort":return{read:x=>d.getUint16(x,m),size:2};case"int32":case"int":return{read:x=>d.getInt32(x,m),size:4};case"uint32":case"uint":return{read:x=>d.getUint32(x,m),size:4};case"float32":case"float":return{read:x=>d.getFloat32(x,m),size:4};case"float64":case"double":return{read:x=>d.getFloat64(x,m),size:8}}}for(let d=0,l=e.length;d<l;d++){const m=e[d];m.type==="list"?(m.countReader=r(f,m.countType,c),m.valueReader=r(f,m.itemType,c)):m.valueReader=r(f,m.type,c)}}function M(e,f){const c=i(),r=f.format==="binary_little_endian",d=new DataView(e,f.headerLength);let l,m=0;for(let x=0;x<f.elements.length;x++){const P=f.elements[x],R=P.properties,C=g(R);s(R,d,r);for(let A=0;A<P.count;A++){l=j(m,R),m+=l[1];const O=l[0];y(c,P.name,O,C)}}return b(c)}function E(e){let f=0,c=!0,r="";const d=[],l=new TextDecoder().decode(e.subarray(0,5)),m=/^ply\r\n/.test(l);do{const x=String.fromCharCode(e[f++]);x!==` 2`&&x!=="\r"?r+=x:(r==="end_header"&&(c=!1),r!==""&&(d.push(r),r=""))}while(c&&f<e.length);return m===!0&&f++,{headerText:d.join("\r")+"\r",headerLength:f}}let _;const w=this;if(u instanceof ArrayBuffer){const e=new Uint8Array(u),{headerText:f,headerLength:c}=E(e),r=p(f,c);if(r.format==="ascii"){const d=new TextDecoder().decode(e);_=v(d,r)}else _=M(u,r)}else _=v(u,p(u));return _}}class Oe{constructor(u){this.arr=u,this.i=0}empty(){return this.i>=this.arr.length}next(){return this.arr[this.i++]}}function He({progress:t,...u}){const p=n.useRef(null),a=$(K,"/sites/abrigo/site/context.ply"),h=k(i=>i.isOpen);return o.jsx("group",{ref:p,...u,"rotation-x":-90*Math.PI/180,dispose:null,children:o.jsx(J,{positions:a.attributes.position.array,colors:a.attributes.color.array,visible:!h,children:o.jsx("pointsMaterial",{vertexColors:!0,fog:!1,sizeAttenuation:!1,size:2,toneMapped:!1})})})}function Ve({progress:t,...u}){const p=n.useRef(null),a=$(K,"/sites/abrigo/site/cliff.ply"),h=k(i=>i.isOpen);return o.jsx("group",{ref:p,...u,"rotation-x":-90*Math.PI/180,dispose:null,children:o.jsx(J,{positions:a.attributes.position.array,colors:a.attributes.color.array,visible:!h,children:o.jsx("pointsMaterial",{vertexColors:!0,fog:!1,sizeAttenuation:!1,size:2,toneMapped:!1})})})}function $e({progress:t,...u}){const p=n.useRef(null),a=$(K,"/sites/abrigo/site/site.ply");return o.jsx("group",{ref:p,"rotation-x":-90*Math.PI/180,...u,dispose:null,children:o.jsx(J,{positions:a.attributes.position.array,colors:a.attributes.color.array,children:o.jsx("pointsMaterial",{vertexColors:!0,fog:!1,sizeAttenuation:!1,size:2,toneMapped:!1})})})}function Ze({...t}){const u=k(s=>s.isOpen),p=k(s=>s.view),a=V(s=>s.progress),h=V(s=>s.toAbsolute),i=n.useRef(null),{nodes:g,materials:v,animations:b}=me("/sites/abrigo/site/scene.glb"),{actions:y,mixer:j}=Se(b,i);return ze("Animation",y,j,()=>a.get()),o.jsxs("group",{ref:i,...t,dispose:null,children:[u&&p=="perspective"&&o.jsxs(o.Fragment,{children:[o.jsx(H,{target:[18.4199,-1.92938,-19.7173],minDistance:20,maxDistance:70,makeDefault:!0}),o.jsx(Q,{name:"Perspective",makeDefault:!0,far:1e3,near:.1,fov:22.895,position:[17.485,18.048,-42.708],rotation:[-2.426,.007,3.136]})]}),u&&p=="top"&&o.jsxs(o.Fragment,{children:[o.jsx(H,{target:[18.486,0,-22.707],makeDefault:!0,minAzimuthAngle:180*Math.PI/180,maxAzimuthAngle:180*Math.PI/180,minZoom:40,maxZoom:160,enableRotate:!1}),o.jsx(Z,{name:"Top",makeDefault:!0,far:1e3,near:.1,zoom:60,position:[18.486,62.981,-22.707],rotation:[-Math.PI/2,0,-Math.PI]})]}),u&&p=="front"&&o.jsxs(o.Fragment,{children:[o.jsx(H,{target:[17.82,-2.309,0],makeDefault:!0,minZoom:40,maxZoom:160,enableRotate:!1}),o.jsx(Z,{name:"Front",makeDefault:!0,far:1e3,near:.1,zoom:60,position:[17.82,-2.309,-24.597],rotation:[Math.PI,0,Math.PI]})]}),u&&p=="left"&&o.jsxs(o.Fragment,{children:[o.jsx(H,{target:[0,-1.5,-20.597],makeDefault:!0,minZoom:40,maxZoom:160,enableRotate:!1}),o.jsx(Z,{name:"Side",makeDefault:!0,far:1e3,near:.1,zoom:60,position:[43.96,-1.5,-20.597],rotation:[0,Math.PI/2,0]})]}),o.jsxs("group",{name:"Scene",children:[o.jsx("group",{name:"Target",position:[20.177,-2.8,-17.977],rotation:[-2.091,.061,3.036],children:o.jsx("group",{name:"Distance",position:[1.143,0,148.08],children:!u&&o.jsx(Q,{name:"Camera",makeDefault:!0,far:1e3,near:.1,fov:22.895})})}),o.jsxs("group",{name:"Awning",position:[262.997,-1.841,-160.622],rotation:[-.003,-.261,0],children:[o.jsx("mesh",{name:"Extrusion_2f0a364a-7570-4bf0-87a4-619718866611",castShadow:!0,receiveShadow:!0,geometry:g["Extrusion_2f0a364a-7570-4bf0-87a4-619718866611"].geometry,material:v.Metal}),o.jsx("mesh",{name:"Extrusion_2f0a364a-7570-4bf0-87a4-619718866611_1",castShadow:!0,receiveShadow:!0,geometry:g["Extrusion_2f0a364a-7570-4bf0-87a4-619718866611_1"].geometry,material:v["Corrugated Metal"]})]}),o.jsxs("group",{position:[0,1,0],children:[o.jsx("group",{name:"Hanging_Remnant",position:[9.754,-1.572,-19.077],children:o.jsx(U,{className:"whitespace-nowrap",center:!0,children:o.jsx(F.div,{className:"-m-4 p-4 bg-background",style:{opacity:a.to(s=>N([4,4.25,5.9,6],[0,1,1,0])(h(s)))},children:"Hanging Remnant"})})}),o.jsx("group",{name:"Hearth_1",position:[10.265,-3.352,-21.2],children:o.jsx(U,{className:"whitespace-nowrap",center:!0,children:o.jsx(F.div,{className:"-m-4 p-4 bg-background",style:{opacity:a.to(s=>N([4.25,4.5,5.9,6],[0,1,1,0])(h(s)))},children:"Hearth 2"})})}),o.jsx("group",{name:"Hearth_2",position:[14.488,-3.236,-19.825],children:o.jsx(U,{className:"whitespace-nowrap",center:!0,children:o.jsx(F.div,{className:"-m-4 p-4 bg-background",style:{opacity:a.to(s=>N([4.5,4.75,5.9,6],[0,1,1,0])(h(s)))},children:"Hearth 1"})})}),o.jsx("group",{name:"Burial",position:[26.517,-3.076,-16.727],children:o.jsx(U,{className:"whitespace-nowrap",center:!0,children:o.jsx(F.div,{className:"-m-4 p-4 bg-background",style:{opacity:a.to(s=>N([4.75,5,5.9,6],[0,1,1,0])(h(s)))},children:"Burial"})})}),o.jsx("group",{name:"Debris_Field",position:[29.821,-3.001,-17.012],children:o.jsx(U,{className:"whitespace-nowrap",center:!0,children:o.jsx(F.div,{className:"-m-4 p-4 bg-background",style:{opacity:a.to(s=>N([5,5.25,5.9,6],[0,1,1,0])(h(s)))},children:"Debris Field"})})})]})]})]})}const ne=new oe,We=new se;function Xe({accentColor:t="#00FF00"}){const u=k(s=>s.active),p=k(s=>s.hovered),a=k(s=>s.setActive),h=k(s=>s.setHovered),i=k(s=>s.filters),g=k(s=>s.artifacts);n.useEffect(()=>{document.body.style.cursor=p?"pointer":"auto"},[p]);const v=n.useMemo(()=>Float32Array.from(new Array(g.length).fill(0).flatMap((s,M)=>[...ne.set("white").toArray(),1])),[g]),b=n.useMemo(()=>Float32Array.from(new Array(g.length).fill(0).flatMap((s,M)=>[...ne.set(t).toArray(),0])),[g]),y=n.useRef(null),j=n.useRef(null);return n.useLayoutEffect(()=>{const s=new _e;for(let M=0;M<g.length;M++){const{X:E,Y:_,Z:w}=g[M];s.position.set(E/100,w/100,-_/100),s.updateMatrix(),y.current&&y.current.setMatr
2ixAt(M,s.matrix),j.current&&j.current.setMatrixAt(M,i.includes(g[M].Sort)?s.matrix:We)}y.current&&(y.current.instanceMatrix.needsUpdate=!0),j.current&&(j.current.instanceMatrix.needsUpdate=!0)},[g,i]),n.useLayoutEffect(()=>{for(let s=0;s<g.length;s++)v[s*4+3]=i.includes(g[s].Sort)?1:0,b[s*4+3]=i.includes(g[s].Sort)&&(s===p||s===u)?1:0;y.current&&(y.current.geometry.attributes.color.needsUpdate=!0),j.current&&(j.current.geometry.attributes.color.needsUpdate=!0)},[g,p,i,u]),o.jsxs(o.Fragment,{children:[o.jsxs("instancedMesh",{ref:y,args:[void 0,void 0,g.length],children:[o.jsx("sphereGeometry",{args:[.05,6,6],children:o.jsx("instancedBufferAttribute",{attach:"attributes-color",args:[v,4]})}),o.jsx("meshBasicMaterial",{toneMapped:!1,vertexColors:!0,alphaTest:.5})]}),o.jsxs("instancedMesh",{renderOrder:1,ref:j,args:[void 0,void 0,g.length],onPointerEnter:s=>{s.stopPropagation(),s.instanceId&&h(s.instanceId)},onClick:s=>{s.stopPropagation(),s.instanceId&&a(s.instanceId)},onPointerMissed:()=>{a(void 0),h(void 0)},onPointerLeave:s=>h(void 0),children:[o.jsx("sphereGeometry",{args:[.1,12,12],children:o.jsx("instancedBufferAttribute",{attach:"attributes-color",args:[b,4]})}),o.jsx("meshBasicMaterial",{toneMapped:!1,vertexColors:!0,alphaTest:.5})]})]})}function Ye({progress:t,render:u=!0}){return o.jsxs(ge,{gl:{alpha:!1},dpr:1,style:{pointerEvents:"inherit"},children:[!u&&o.jsx(he,{}),o.jsxs(n.Suspense,{fallback:null,children:[o.jsx(He,{progress:t}),o.jsx(Ve,{progress:t}),o.jsx($e,{progress:t}),o.jsx(Ze,{}),o.jsx(Xe,{})]}),o.jsx(Ne,{files:"/sites/abrigo/site/grotto.exr"})]})}function ft(){const t=V(a=>a.progress),u=k(a=>a.artifacts),p=V(a=>a.inView);return o.jsxs(o.Fragment,{children:[u&&o.jsx(Ye,{progress:t,render:p}),o.jsx(Pe,{})]})}export{ft as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.