1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5114],{6577:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(71847).A)("loader-pinwheel",[["path",{d:"M22 12a1 1 0 0 1-10 0 1 1 0 0 0-10 0",key:"1lzz15"}],["path",{d:"M7 20.7a1 1 0 1 1 5-8.7 1 1 0 1 0 5-8.6",key:"1gnrpi"}],["path",{d:"M7 3.3a1 1 0 1 1 5 8.6 1 1 0 1 0 5 8.6",key:"u9yy5q"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]])},42348:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(71847).A)("loader",[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]])},44009:(e,t,n)=>{n.d(t,{y:()=>v});var r=n(95155),s=n(33931),i=n(42348),l=n(35299),a=n(6577);let o=e=>{let{className:t,...n}=e;return(0,r.jsx)(i.A,{className:(0,s.cn)("animate-spin",t),...n})},c=e=>{let{className:t,...n}=e;return(0,r.jsx)(l.A,{className:(0,s.cn)("animate-spin",t),...n})},d=e=>{let{className:t,...n}=e;return(0,r.jsx)(a.A,{className:(0,s.cn)("animate-spin",t),...n})},u=e=>{let{className:t,size:n=24,...i}=e;return(0,r.jsxs)("div",{className:"relative",style:{width:n,height:n},children:[(0,r.jsx)("div",{className:"absolute inset-0 rotate-180",children:(0,r.jsx)(l.A,{className:(0,s.cn)("animate-spin",t,"text-foreground opacity-20"),size:n,...i})}),(0,r.jsx)(l.A,{className:(0,s.cn)("relative animate-spin",t),size:n,...i})]})},m=e=>{let{size:t=24,...n}=e;return(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 24 24",...n,children:[(0,r.jsx)("title",{children:"Loading..."}),(0,r.jsx)("circle",{cx:"4",cy:"12",r:"2",fill:"currentColor",children:(0,r.jsx)("animate",{id:"ellipsis1",begin:"0;ellipsis3.end+0.25s",attributeName:"cy",calcMode:"spline",dur:"0.6s",values:"12;6;12",keySplines:".33,.66,.66,1;.33,0,.66,.33"})}),(0,r.jsx)("circle",{cx:"12",cy:"12",r:"2",fill:"currentColor",children:(0,r.jsx)("animate",{begin:"ellipsis1.begin+0.1s",attributeName:"cy",calcMode:"spline",dur:"0.6s",values:"12;6;12",keySplines:".33,.66,.66,1;.33,0,.66,.33"})}),(0,r.jsx)("circle",{cx:"20",cy:"12",r:"2",fill:"currentColor",children:(0,r.jsx)("animate",{id:"ellipsis3",begin:"ellipsis1.begin+0.2s",attributeName:"cy",calcMode:"spline",dur:"0.6s",values:"12;6;12",keySplines:".33,.66,.66,1;.33,0,.66,.33"})})]})},h=e=>{let{size:t=24,...n}=e;return(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 44 44",stroke:"currentColor",...n,children:[(0,r.jsx)("title",{children:"Loading..."}),(0,r.jsxs)("g",{fill:"none",fillRule:"evenodd",strokeWidth:"2",children:[(0,r.jsxs)("circle",{cx:"22",cy:"22",r:"1",children:[(0,r.jsx)("animate",{attributeName:"r",begin:"0s",dur:"1.8s",values:"1; 20",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.165, 0.84, 0.44, 1",repeatCount:"indefinite"}),(0,r.jsx)("animate",{attributeName:"stroke-opacity",begin:"0s",dur:"1.8s",values:"1; 0",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.3, 0.61, 0.355, 1",repeatCount:"indefinite"})]}),(0,r.jsxs)("circle",{cx:"22",cy:"22",r:"1",children:[(0,r.jsx)("animate",{attributeName:"r",begin:"-0.9s",dur:"1.8s",values:"1; 20",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.165, 0.84, 0.44, 1",repeatCount:"indefinite"}),(0,r.jsx)("animate",{attributeName:"stroke-opacity",begin:"-0.9s",dur:"1.8s",values:"1; 0",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.3, 0.61, 0.355, 1",repeatCount:"indefinite"})]})]})]})},x=e=>{let{size:t=24,...n}=e;return(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 24 24",...n,children:[(0,r.jsx)("title",{children:"Loading..."}),(0,r.jsx)("style",{children:"\n .spinner-bar {\n animation: spinner-bars-animation .8s linear infinite;\n animation-delay: -.8s;\n }\n .spinner-bars-2 {\n animation-delay: -.65s;\n }\n .spinner-bars-3 {\n animation-delay: -0.5s;\n }\n @keyframes spinner-bars-animation {\n 0% {\n y: 1px;\n height: 22px;\n }\n 93.75% {\n y: 5px;\n height: 14px;\n opacity: 0.2;\n }\n }\n "}),(0,r.jsx)("rect",{className:"spinner-bar",x:"1",y:"1",width:"6",height:"22",fill:"
1currentColor"}),(0,r.jsx)("rect",{className:"spinner-bar spinner-bars-2",x:"9",y:"1",width:"6",height:"22",fill:"currentColor"}),(0,r.jsx)("rect",{className:"spinner-bar spinner-bars-3",x:"17",y:"1",width:"6",height:"22",fill:"currentColor"})]})},p=e=>{let{size:t=24,...n}=e;return(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid",...n,children:[(0,r.jsx)("title",{children:"Loading..."}),(0,r.jsx)("path",{fill:"none",stroke:"currentColor",strokeWidth:"10",strokeDasharray:"205.271142578125 51.317785644531256",d:"M24.3 30C11.4 30 5 43.3 5 50s6.4 20 19.3 20c19.3 0 32.1-40 51.4-40 C88.6 30 95 43.3 95 50s-6.4 20-19.3 20C56.4 70 43.6 30 24.3 30z",strokeLinecap:"round",style:{transform:"scale(0.8)",transformOrigin:"50px 50px"},children:(0,r.jsx)("animate",{attributeName:"stroke-dashoffset",repeatCount:"indefinite",dur:"2s",keyTimes:"0;1",values:"0;256.58892822265625"})})]})},v=e=>{let{variant:t,...n}=e;switch(t){case"circle":return(0,r.jsx)(c,{...n});case"pinwheel":return(0,r.jsx)(d,{...n});case"circle-filled":return(0,r.jsx)(u,{...n});case"ellipsis":return(0,r.jsx)(m,{...n});case"ring":return(0,r.jsx)(h,{...n});case"bars":return(0,r.jsx)(x,{...n});case"infinite":return(0,r.jsx)(p,{...n});default:return(0,r.jsx)(o,{...n})}}},85114:(e,t,n)=>{n.r(t),n.d(t,{default:()=>l});var r=n(95155),s=n(12115),i=n(44009);let l=(0,s.forwardRef)(function(e,t){let{worldUrl:l,className:a="",thumbnailUrl:o}=e,c=(0,s.useRef)(null),d=(0,s.useRef)(null),u=(0,s.useRef)(null),m=(0,s.useRef)(null),h=(0,s.useRef)(null),x=(0,s.useRef)(null),p=(0,s.useRef)(0),v=(0,s.useRef)(0),[g,y]=(0,s.useState)(!1),[f,j]=(0,s.useState)(null),[w,b]=(0,s.useState)(!1),[k,N]=(0,s.useState)(!1);return(0,s.useImperativeHandle)(t,()=>({resetCamera:()=>{let e=m.current;e&&(e.position.set(0,0,0),e.rotation.set(0,0,0),p.current=0,v.current=0)}})),(0,s.useEffect)(()=>{b(!0)},[]),(0,s.useEffect)(()=>{let e,t;l&&c.current&&w&&k&&(y(!0),Promise.all([Promise.all([n.e(1831),n.e(9367)]).then(n.bind(n,87548)).then(t=>e=t.default||t),Promise.all([n.e(1831),n.e(9367),n.e(474),n.e(1900)]).then(n.bind(n,87546)).then(e=>(t=e.SplatMesh,e))]).then(()=>{var n;let r=new e.Scene;d.current=r;let s=c.current.clientWidth/c.current.clientHeight,i=new e.PerspectiveCamera(75,s,.01,1e3);i.position.set(0,0,0),m.current=i;let a=new e.WebGLRenderer({antialias:!1});a.setSize(c.current.clientWidth,c.current.clientHeight),a.setPixelRatio(Math.min(window.devicePixelRatio,2)),c.current.appendChild(a.domElement),u.current=a;let o=(null==l?void 0:l.endsWith(".spz"))?"spz":void 0,g=new t({url:l,...o&&{fileType:o},onLoad:e=>{console.log("World loaded successfully"),y(!1),j(null)},onProgress:e=>{if(e.total>0){let t=Math.round(e.loaded/e.total*100);console.log("Loading world: ".concat(t,"%"))}}});g.rotation.x=Math.PI,h.current=g,null==(n=g.addEventListener)||n.call(g,"error",e=>{var t;y(!1),j((null==(t=e.error)?void 0:t.message)||e.message||"Failed to load world")}),r.add(g);let f=!1,w={x:0,y:0},b=e=>{f=!0,w={x:e.clientX,y:e.clientY}},k=e=>{if(!f)return;let t=e.clientX-w.x,n=e.clientY-w.y;p.current-=.003*t,v.current-=.003*n,v.current=Math.max(-Math.PI/2,Math.min(Math.PI/2,v.current)),i.rotation.order="YXZ",i.rotation.y=p.current,i.rotation.x=v.current,w={x:e.clientX,y:e.clientY}},N=()=>{f=!1},E=t=>{t.preventDefault();let n=new e.Vector3;i.getWorldDirection(n),i.position.addScaledVector(n,-(.01*t.deltaY))};a.domElement.addEventListener("mousedown",b),a.domElement.addEventListener("mousemove",k),a.domElement.addEventListener("mouseup",N),a.domElement.addEventListener("mouseleave",N),a.domElement.addEventListener("wheel",E);let M=()=>{x.current=requestAnimationFrame(M),a.render(r,i)};M();let C=()=>{if(!c.current||!i||!a)return;let e=c.current.clientWidth,t=c.current.clientHeight;i.aspect=e/t,i.updateProjectionMatrix(),a.setSize(e,t)};return window.addEventListener("resize",C),()=>{if(window.removeEventListener("resize",C),a.domElement.removeEventListener("mousedown",b),a.domElement.removeEventListener("mousemove",k),a.domElement.removeEventListener("mouseup",N),a.domElement.removeEventListener("mouseleave",N),a.domElement.removeEventListener("wheel",E),x.current&&cancelAnimationFrame(x.current),g){var e;r.remove(g),null==(e=g.dispose)||e.call(g)}a&&(a.dispose(),c.current&&a.domElement.parentNode&&a.domElement.parentNode.removeChild(a.domElement))}}).catch(e=>{console.error("Failed to load THREE.js or SparkJS:",e),y(!1),j("Failed to initialize 3D viewer")}))},[l,w,k]),(0,r.jsxs)("div",{ref:c,className:"relative w-full h-full group ".concat(a),children:[!k&&(0,r.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center z-20 transition-all duration-300",children:[(0,r.jsx)("div",{className:"absolute inset-0 bg-cover bg-center bg-no-repeat",style:{backgroundImage:'url("'.concat(o||"/worlds/thumbnail.jpg",'")')}}),(0,r.jsx)("div",{className:"absolute inset-0 bg-background/20 backdrop-blur-[2px]"}),(0,r.jsxs)("button",{onClick:()=>N(!0),className:"relative z-30 group/btn px-8 py-4 bg-background border border-border rounded-full shadow-2xl hover:scale-105 active:scale-95 transition-all flex items-center gap-3",children:[(0,r.jsx)("div",{className:"w-10 h-10 rounded-full bg-secondary/10 flex items-center justify-center group-hover/btn:bg-secondary/20 transition-colors",children:(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-secondary",children:[(0,r.jsx)("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"}),(0,r.jsx)("path",{d:"M22 10V4h-6"}),(0,r.jsx)("path",{d:"m22 4-10.1 10.1"})]})}),(0,r.jsxs)("div",{className:"flex flex-col items-start",children:[(0,r.jsx)("span",{className:"text-sm font-bold text-primary",children:"View in 3D"}),(0,r.jsx)("span",{className:"text-[10px] text-muted-foreground font-medium",children:"Click to load immersive experience"})]})]})]}),g&&(0,r.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-gray-100 dark:bg-gray-900",children:(0,r.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[(0,r.jsx)(i.y,{}),(0,r.jsx)("p",{className:"text-sm text-gray-500",children:"Loading world..."})]})}),f&&(0,r.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-gray-100 dark:bg-gray-900",children:(0,r.jsxs)("p",{className:"text-sm text-red-500",children:["Error: ",f]})})]})})}}]);
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.