3d-effect-cinema 0.5.0 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,3 +1,4 @@
1
- 'use client';
2
- var Et=Object.defineProperty,Tt=Object.defineProperties;var kt=Object.getOwnPropertyDescriptors;var le=Object.getOwnPropertySymbols;var Ie=Object.prototype.hasOwnProperty,ze=Object.prototype.propertyIsEnumerable;var Be=(r,e,t)=>e in r?Et(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,N=(r,e)=>{for(var t in e||(e={}))Ie.call(e,t)&&Be(r,t,e[t]);if(le)for(var t of le(e))ze.call(e,t)&&Be(r,t,e[t]);return r},D=(r,e)=>Tt(r,kt(e));var _e=(r,e)=>{var t={};for(var n in r)Ie.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&le)for(var n of le(r))e.indexOf(n)<0&&ze.call(r,n)&&(t[n]=r[n]);return t};import{Suspense as Mr,useMemo as ae,useState as Re,useEffect as Ce}from"react";import{Canvas as Er}from"@react-three/fiber";import{Environment as Tr,Center as kr}from"@react-three/drei";import{EffectComposer as Rr,Bloom as Cr,Vignette as Sr,Noise as Lr}from"@react-three/postprocessing";import{useRef as Oe,useMemo as Rt}from"react";import{useFrame as Ct}from"@react-three/fiber";import{Text3D as St}from"@react-three/drei";import*as K from"three";import{jsx as De,jsxs as Nt}from"react/jsx-runtime";var Lt={gold:{color:"#FFD700",metalness:1,roughness:.15,clearcoat:1,emissive:"#1a0f00",emissiveIntensity:.3,envMapIntensity:2},neon:{color:"#00ffff",metalness:0,roughness:1,clearcoat:0,emissive:"#00ffff",emissiveIntensity:2.5,envMapIntensity:.5},emerald:{color:"#10b981",metalness:.9,roughness:.1,clearcoat:1,emissive:"#065f46",emissiveIntensity:1.2,envMapIntensity:2.5},crimson:{color:"#ff1744",metalness:.8,roughness:.15,clearcoat:1,emissive:"#880e4f",emissiveIntensity:1.8,envMapIntensity:2},obsidian:{color:"#1a1a2e",metalness:1,roughness:.05,clearcoat:1,emissive:"#0a0a1a",emissiveIntensity:.1,envMapIntensity:3},glass:{color:"#ffffff",metalness:0,roughness:0,clearcoat:0,emissive:"#000000",emissiveIntensity:0,envMapIntensity:1.5,transmission:.95,ior:1.5,thickness:.5,transparent:!0}};function X({char:r,index:e,totalLetters:t,position:n,phase:s,theme:m,fontUrl:f}){let c=Oe(null),d=Oe(null),o=Rt(()=>{let l=e/t*Math.PI*2;return{x:Math.cos(l)*4+(Math.random()-.5)*2,y:-3+Math.random()*-3,z:-5+Math.random()*-3,rotX:(Math.random()-.5)*Math.PI*2,rotY:(Math.random()-.5)*Math.PI*2}},[e,t]),a=Lt[m];return Ct(l=>{if(!c.current)return;let i=l.clock.getElapsedTime();d.current===null&&(d.current=i);let v=i-d.current,u=e*.12;if(s==="loading"){c.current.position.set(n[0]+o.x,n[1]+o.y,n[2]+o.z),c.current.rotation.set(o.rotX,o.rotY,0),c.current.scale.setScalar(0);return}if(s==="entering"){let y=Math.max(0,v-u),p=1-Math.exp(-y*3),M=1+Math.sin(y*8)*Math.max(0,.15-y*.1);c.current.position.set(K.MathUtils.lerp(n[0]+o.x,n[0],p),K.MathUtils.lerp(n[1]+o.y,n[1],p),K.MathUtils.lerp(n[2]+o.z,n[2],p)),c.current.rotation.set(K.MathUtils.lerp(o.rotX,0,p),K.MathUtils.lerp(o.rotY,0,p),0),c.current.scale.setScalar(Math.min(p*M,1.05));return}if(s==="idle"){let y=Math.sin(i*1.2+e*.5)*.015,p=Math.sin(i*.8+e*.3)*.008;c.current.position.set(n[0]+p,n[1]+y,n[2]),c.current.rotation.set(Math.sin(i*.5+e)*.01,Math.sin(i*.3+e*.7)*.01,0),c.current.scale.setScalar(1);return}if(s==="exiting"){let y=Math.max(0,v-u*.5),p=Math.min(y*2,1),M=p*p;c.current.position.set(n[0]+o.x*M*.5,n[1],n[2]-M*8),c.current.scale.setScalar(Math.max(1-M,0)),c.current.rotation.y+=.05}}),r===" "?null:De("group",{ref:c,position:n,children:Nt(St,{font:f,size:.8,height:.35,bevelEnabled:!0,bevelSize:.02,bevelThickness:.01,bevelSegments:3,curveSegments:12,children:[r,De("meshPhysicalMaterial",{color:a.color,metalness:a.metalness,roughness:a.roughness,clearcoat:a.clearcoat,emissive:a.emissive,emissiveIntensity:a.emissiveIntensity,envMapIntensity:a.envMapIntensity,transmission:a.transmission,ior:a.ior,thickness:a.thickness,transparent:a.transparent,toneMapped:m!=="neon"})]})})}import{useRef as ce,useMemo as Pt}from"react";import{useFrame as Ht}from"@react-three/fiber";import{Sparkles as We}from"@react-three/drei";import*as Ye from"three";import{jsx as re,jsxs as Ve}from"react/jsx-runtime";var Xe={gold:"#FFD700",neon:"#00ffff",emerald:"#10b981",crimson:"#ff1744",obsidian:"#a855f7",glass:"#ffffff"},Ue={azul:"#00e5ff",verde:"#00e676",rojo:"#ff3d00",dorado:"#ffb300",purpura:"#d500f9",magenta:"#ff007f",esmeralda:"#10b981"};function At({color:r,speedMultiplier:e=.5,count:t=60}){let n=ce(null),s=ce(new Ye.Object3D),m=ce(null),f=ce(null);if(!m.current){m.current=new Float32Array(t),f.current=new Float32Array(t*3);for(let c=0;c<t;c++)m.current[c]=.1+Math.random()*.3,f.current[c*3]=(Math.random()-.5)*16,f.current[c*3+1]=(Math.random()-.5)*10,f.current[c*3+2]=(Math.random()-.5)*12}return Ht(c=>{if(!n.current||!m.current||!f.current)return;let d=c.clock.getElapsedTime()*e;for(let o=0;o<t;o++){let a=m.current[o],l=f.current[o*3],i=f.current[o*3+1],v=f.current[o*3+2];s.current.position.set(l+Math.sin(d*a+o)*2,i+Math.cos(d*a*.7+o*.5)*1.5,v+Math.sin(d*a*.5+o*.3)*2),s.current.scale.setScalar(.015+Math.sin(d+o)*.005),s.current.updateMatrix(),n.current.setMatrixAt(o,s.current.matrix)}n.current.instanceMatrix.needsUpdate=!0}),Ve("instancedMesh",{ref:n,args:[void 0,void 0,t],children:[re("sphereGeometry",{args:[1,6,6]}),re("meshBasicMaterial",{color:r,transparent:!0,opacity:.3,toneMapped:!1})]})}function U({theme:r,effectColor:e,effectSpeed:t=.5,visible:n}){let s=Pt(()=>{if(!e)return Xe[r]||Xe.gold;let m=e.toLowerCase().trim();return Ue[m]?Ue[m]:e},[e,r]);return n?Ve("group",{children:[re(We,{count:150,scale:10,size:4,speed:.3*t,opacity:.8,color:s,noise:.6}),re(We,{count:80,scale:16,size:2,speed:.15*t,opacity:.4,color:"#ffffff",noise:.8}),re(At,{color:s,speedMultiplier:t,count:50})]}):null}import{useRef as $e}from"react";import{useFrame as Ft,useThree as Bt}from"@react-three/fiber";import*as q from"three";function Y({phase:r,effectSpeed:e=.5}){let{camera:t,pointer:n}=Bt(),s=$e(null),m=$e(r);return m.current!==r&&(m.current=r,s.current=null),Ft(f=>{let c=f.clock.getElapsedTime()*e;s.current===null&&(s.current=c);let d=c-s.current;if(r==="loading"){t.position.set(0,0,14),t.lookAt(0,0,0);return}if(r==="entering"){let l=Math.min(d/3,1),i=1-Math.pow(1-l,3),v=q.MathUtils.lerp(14,6,i),u=q.MathUtils.lerp(1,.2,i);t.position.set(0,u,v),t.lookAt(0,0,0);return}let o=f.viewport.width/(f.viewport.height||1),a=o<1?Math.max(6,6/Math.max(.45,o*.85)):6;if(r==="idle"){let l=Math.sin(c*.1)*.2,i=Math.cos(c*.08)*.1+.2,v=n.x*.2,u=n.y*.1;t.position.x=q.MathUtils.damp(t.position.x,l+v,3,.016),t.position.y=q.MathUtils.damp(t.position.y,i+u,3,.016),t.position.z=q.MathUtils.damp(t.position.z,a,3,.016),t.lookAt(0,0,0);return}if(r==="exiting"){let l=Math.min(d/1.5,1),i=l*l*l,v=q.MathUtils.lerp(6,-8,i);t.position.set(0,0,v),t.lookAt(0,0,0)}}),null}import{useState as It,useRef as zt,useCallback as _t,useEffect as Ot,useMemo as Dt}from"react";import{useFrame as Wt,useThree as Xt}from"@react-three/fiber";import*as _ from"three";import{jsx as me,jsxs as je}from"react/jsx-runtime";var Ge={gold:["#FFD700","#FF8C00","#FF4500","#FFF8DC"],neon:["#00ffff","#0088ff","#ff00ff","#ffffff"],emerald:["#00ff88","#10b981","#059669","#a7f3d0"],crimson:["#ff1744","#d50000","#ff5252","#ffb74d"],obsidian:["#a855f7","#6366f1","#3b82f6","#ffffff"],glass:["#ffffff","#e0e7ff","#93c5fd","#60a5fa"]},Ut={azul:"#00e5ff",verde:"#00e676",rojo:"#ff3d00",dorado:"#ffb300",purpura:"#d500f9",magenta:"#ff007f",esmeralda:"#10b981"};function V({theme:r="gold",effectColor:e,effectSpeed:t=.5,enabled:n=!0}){let{camera:s,raycaster:m}=Xt(),[f,c]=It([]),d=zt(0),o=Dt(()=>{if(!e)return Ge[r]||Ge.gold;let l=e.toLowerCase().trim(),i=Ut[l]||e;return[i,"#ffffff",i]},[e,r]),a=_t(l=>{if(!n)return;let i=0,v=0;if("touches"in l&&l.touches.length>0)i=l.touches[0].clientX,v=l.touches[0].clientY;else if("clientX"in l)i=l.clientX,v=l.clientY;else return;let u=new _.Vector2(i/window.innerWidth*2-1,-(v/window.innerHeight)*2+1);m.setFromCamera(u,s);let y=new _.Plane(new _.Vector3(0,0,1),0),p=new _.Vector3;if(m.ray.intersectPlane(y,p),!p)return;let M=35,b=[];for(let h=0;h<M;h++){let x=Math.random()*Math.PI*2,E=(1.5+Math.random()*4.5)*t,g=(Math.random()-.3)*3*t,k=new _.Vector3(Math.cos(x)*E,Math.sin(x)*E+g,(Math.random()-.5)*E*.8),P=o[Math.floor(Math.random()*o.length)];b.push({id:h,position:p.clone(),velocity:k,color:new _.Color(P),size:.08+Math.random()*.12,life:1,maxLife:(.6+Math.random()*.8)/Math.max(.2,t)})}let w={id:d.current++,origin:p.clone(),sparks:b,color:o[0],lightIntensity:4,time:0};c(h=>[...h.slice(-4),w])},[s,m,o,t,n]);return Ot(()=>(window.addEventListener("pointerdown",a),()=>{window.removeEventListener("pointerdown",a)}),[a]),Wt((l,i)=>{f.length!==0&&c(v=>v.map(u=>{let y=u.time+i*t,p=Math.max(0,u.lightIntensity-i*8*t),M=u.sparks.map(b=>{let w=b.life-i*t/b.maxLife;if(w<=0)return null;let h=b.position.clone().addScaledVector(b.velocity,i*t);return b.velocity.y-=i*3.5*t,b.velocity.multiplyScalar(.96),D(N({},b),{position:h,life:w})}).filter(Boolean);return M.length===0&&p<=0?null:D(N({},u),{time:y,lightIntensity:p,sparks:M})}).filter(Boolean))}),me("group",{children:f.map(l=>je("group",{children:[l.lightIntensity>.05&&me("pointLight",{position:l.origin,intensity:l.lightIntensity*3,distance:6,color:l.color}),l.sparks.map(i=>je("mesh",{position:i.position,children:[me("sphereGeometry",{args:[i.size*i.life,6,6]}),me("meshBasicMaterial",{color:i.color,transparent:!0,opacity:i.life,toneMapped:!1})]},i.id))]},l.id))})}import{useState as Yt,useRef as Vt,useCallback as $t,useEffect as Gt,useMemo as jt}from"react";import{useFrame as Zt,useThree as qt}from"@react-three/fiber";import*as I from"three";import{jsx as ve,jsxs as Kt}from"react/jsx-runtime";var Ze={gold:"#FFD700",neon:"#00ffff",emerald:"#10b981",crimson:"#ff1744",obsidian:"#a855f7",glass:"#ffffff"},qe={azul:"#00e5ff",verde:"#00e676",rojo:"#ff3d00",dorado:"#ffb300",purpura:"#d500f9",magenta:"#ff007f",esmeralda:"#10b981"};function $({theme:r="gold",effectColor:e,effectSpeed:t=.5,enabled:n=!0}){let{camera:s,raycaster:m}=qt(),[f,c]=Yt([]),d=Vt(0),o=jt(()=>{if(!e)return Ze[r]||Ze.gold;let l=e.toLowerCase().trim();return qe[l]?qe[l]:e},[e,r]),a=$t(l=>{if(!n)return;let i=0,v=0;if("touches"in l&&l.touches.length>0)i=l.touches[0].clientX,v=l.touches[0].clientY;else if("clientX"in l)i=l.clientX,v=l.clientY;else return;let u=new I.Vector2(i/window.innerWidth*2-1,-(v/window.innerHeight)*2+1);m.setFromCamera(u,s);let y=new I.Plane(new I.Vector3(0,0,1),0),p=new I.Vector3;if(m.ray.intersectPlane(y,p),!p)return;let M={id:d.current++,origin:p.clone(),radius:.1,maxRadius:3.5,life:1,color:new I.Color(o)};c(b=>[...b.slice(-4),M])},[s,m,o,n]);return Gt(()=>(window.addEventListener("pointerdown",a),()=>{window.removeEventListener("pointerdown",a)}),[a]),Zt((l,i)=>{f.length!==0&&c(v=>v.map(u=>{let y=u.life-i*1.8*t;if(y<=0)return null;let p=u.radius+i*5*t;return D(N({},u),{life:y,radius:p})}).filter(Boolean))}),n?ve("group",{children:f.map(l=>Kt("mesh",{position:l.origin,rotation:[0,0,0],children:[ve("ringGeometry",{args:[l.radius*.9,l.radius,48]}),ve("meshBasicMaterial",{color:l.color,transparent:!0,opacity:l.life*.75,side:I.DoubleSide,toneMapped:!1})]},l.id))}):null}import{useRef as Jt,useMemo as Ke}from"react";import{useFrame as Qt,useThree as er}from"@react-three/fiber";import*as de from"three";import{jsx as et}from"react/jsx-runtime";var Je={gold:"#ffaa00",neon:"#00ffff",emerald:"#00ffaa",crimson:"#ff0055",obsidian:"#9900ff",glass:"#88ccff"},Qe={azul:"#00e5ff",verde:"#00e676",rojo:"#ff3d00",dorado:"#ffb300",purpura:"#d500f9",magenta:"#ff007f",esmeralda:"#10b981"};function G({theme:r="neon",effectColor:e,effectSpeed:t=.5,enabled:n=!0}){let{pointer:s}=er(),m=Jt(null),f=Ke(()=>{if(!e)return Je[r]||Je.neon;let o=e.toLowerCase().trim();return Qe[o]?Qe[o]:e},[e,r]),c=30,d=Ke(()=>{let o=new de.BufferGeometry,a=new Float32Array(c*2*3);return o.setAttribute("position",new de.BufferAttribute(a,3)),o},[c]);return Qt(o=>{if(!m.current||!n)return;let a=o.clock.getElapsedTime()*t,l=m.current.geometry.attributes.position,i=l.array,v=s.x*6,u=s.y*3;for(let y=0;y<c;y++){let p=y*6,M=y/c*Math.PI*2+a*1.5,b=2.5+Math.sin(a*3+y)*.5,w=Math.cos(M)*b,h=Math.sin(M)*b,x=(Math.random()-.5)*1.5,E=w+(v-w)*.3+(Math.random()-.5)*.8,g=h+(u-h)*.3+(Math.random()-.5)*.8,k=x+(Math.random()-.5)*.8;i[p]=w,i[p+1]=h,i[p+2]=x,i[p+3]=E,i[p+4]=g,i[p+5]=k}l.needsUpdate=!0}),n?et("lineSegments",{ref:m,geometry:d,children:et("lineBasicMaterial",{color:f,transparent:!0,opacity:.75,linewidth:2,toneMapped:!1})}):null}import{useRef as J,useMemo as ye,useEffect as tr,useCallback as tt}from"react";import{useFrame as rr,useThree as nr}from"@react-three/fiber";import*as W from"three";import{jsx as ne,jsxs as we}from"react/jsx-runtime";var rt={crimson:{color1:"#ff3d00",color2:"#ff9100",light:"#ff1744"},gold:{color1:"#ffb300",color2:"#ffe082",light:"#FFD700"},emerald:{color1:"#00e676",color2:"#a7f3d0",light:"#10b981"},neon:{color1:"#00e5ff",color2:"#80d8ff",light:"#00ffff"},obsidian:{color1:"#d500f9",color2:"#ea80fc",light:"#a855f7"},glass:{color1:"#80d8ff",color2:"#ffffff",light:"#60a5fa"}},nt={azul:"#00e5ff",verde:"#00e676",rojo:"#ff3d00",dorado:"#ffb300",purpura:"#d500f9",magenta:"#ff007f",esmeralda:"#10b981"};function or(){let r=document.createElement("canvas");r.width=128,r.height=128;let e=r.getContext("2d");if(e){let n=e.createRadialGradient(64,64,0,64,64,64);n.addColorStop(0,"rgba(255, 255, 255, 1)"),n.addColorStop(.3,"rgba(255, 255, 255, 0.9)"),n.addColorStop(.65,"rgba(255, 255, 255, 0.35)"),n.addColorStop(1,"rgba(0, 0, 0, 0)"),e.fillStyle=n,e.fillRect(0,0,128,128)}let t=new W.CanvasTexture(r);return t.needsUpdate=!0,t}function fe({theme:r="crimson",effectColor:e,effectSpeed:t=.5,effectDensity:n=.3,mode:s="fluid",enabled:m=!0}){let{pointer:f}=nr(),c=J(null),d=J(null),o=J(null),a=J(new W.Object3D),l=J(!1),i=J([]),v=Math.max(.1,Math.min(1,n)),u=Math.round(110*v),y=ye(()=>or(),[]),p=ye(()=>{if(!e)return(rt[r]||rt.crimson).color1;let h=e.toLowerCase().trim();return nt[h]?nt[h]:e},[e,r]),M=ye(()=>{let h=[],x=.4+Math.sqrt(v)*.55;for(let E=0;E<u;E++)h.push({x:(Math.random()-.5)*10,y:-2+Math.random()*.4,z:(Math.random()-.5)*2-.5,speedY:.8+Math.random()*1.8,speedX:(Math.random()-.5)*.5,size:(.4+Math.random()*.6)*x,phase:Math.random()*Math.PI*2,life:Math.random()});return h},[u,v]),b=tt(()=>{l.current=!0},[]),w=tt(()=>{l.current=!1},[]);return tr(()=>(window.addEventListener("pointerdown",b),window.addEventListener("pointerup",w),()=>{window.removeEventListener("pointerdown",b),window.removeEventListener("pointerup",w)}),[b,w]),rr((h,x)=>{if(!m)return;let E=h.clock.getElapsedTime()*t;if(l.current){let g=f.x*7,k=f.y*4;i.current.length<25&&i.current.push({x:g+(Math.random()-.5)*.8,y:k+(Math.random()-.5)*.8,z:(Math.random()-.5)*1.5,life:1,size:(.5+Math.random()*.6)*Math.sqrt(v)})}i.current=i.current.map(g=>(g.life-=x*1.8*t,g.y+=x*1.2*t,g)).filter(g=>g.life>0),o.current&&(o.current.intensity=2.2+Math.sin(E*10)*.6+Math.cos(E*15)*.3,o.current.position.y=-1+Math.sin(E*3)*.2),(s==="fluid"||s==="all")&&c.current&&(M.forEach((g,k)=>{g.life+=x*g.speedY*.35*t,g.life>1&&(g.life=0,g.x=(Math.random()-.5)*10,g.y=-2+Math.random()*.4);let P=g.life,B=g.y+P*3.8,te=g.x+Math.sin(E*2.5+g.phase)*.5+g.speedX*P,Z=g.z+Math.cos(E*1.8+g.phase)*.2,O=Math.sin(P*Math.PI)*g.size*(1.2-P*.3);a.current.position.set(te,B,Z),a.current.rotation.set(0,0,Math.sin(E*1.5+k)*.2),a.current.scale.set(O,O*1.3,O),a.current.updateMatrix(),c.current.setMatrixAt(k,a.current.matrix)}),i.current.forEach((g,k)=>{let P=(u-1-k+u)%u,B=Math.sin(g.life*Math.PI)*g.size;a.current.position.set(g.x,g.y,g.z),a.current.rotation.set(0,0,Math.sin(E*3+k)*.3),a.current.scale.set(B,B*1.4,B),a.current.updateMatrix(),c.current.setMatrixAt(P,a.current.matrix)}),c.current.instanceMatrix.needsUpdate=!0),(s==="crystal"||s==="all")&&d.current&&(M.forEach((g,k)=>{let P=g.life,B=g.y+P*3.8,te=g.x+Math.sin(E*2.8+g.phase)*.5+g.speedX*P,Z=g.z+Math.cos(E*2+g.phase)*.3,O=Math.sin(P*Math.PI)*g.size*.6;a.current.position.set(te,B,Z),a.current.rotation.set(E*1.5+k,E*2,k),a.current.scale.set(O,O*2,O),a.current.updateMatrix(),d.current.setMatrixAt(k,a.current.matrix)}),d.current.instanceMatrix.needsUpdate=!0)}),m?we("group",{children:[ne("pointLight",{ref:o,position:[0,-1,1.5],color:p,intensity:2.5,distance:10}),(s==="fluid"||s==="all")&&we("instancedMesh",{ref:c,args:[void 0,void 0,u],children:[ne("planeGeometry",{args:[1.2,1.2]}),ne("meshBasicMaterial",{map:y,color:p,transparent:!0,blending:W.AdditiveBlending,depthWrite:!1,side:W.DoubleSide})]}),(s==="crystal"||s==="all")&&we("instancedMesh",{ref:d,args:[void 0,void 0,u],children:[ne("coneGeometry",{args:[.3,1.2,5]}),ne("meshBasicMaterial",{color:p,transparent:!0,opacity:.65,blending:W.AdditiveBlending,depthWrite:!1})]})]}):null}import{useRef as oe,useMemo as Me,useEffect as ar,useCallback as ot}from"react";import{useFrame as sr,useThree as ir}from"@react-three/fiber";import*as j from"three";import{jsx as Ee,jsxs as st}from"react/jsx-runtime";var at={azul:"#00e5ff",verde:"#00e676",rojo:"#ff3d00",dorado:"#ffb300",purpura:"#d500f9",magenta:"#ff007f",esmeralda:"#10b981"};function lr(){let r=document.createElement("canvas");r.width=256,r.height=256;let e=r.getContext("2d");if(e){let n=e.createRadialGradient(128,128,0,128,128,128);n.addColorStop(0,"rgba(255, 255, 255, 1)"),n.addColorStop(.2,"rgba(0, 240, 200, 0.95)"),n.addColorStop(.5,"rgba(0, 200, 140, 0.6)"),n.addColorStop(.8,"rgba(0, 150, 100, 0.2)"),n.addColorStop(1,"rgba(0, 0, 0, 0)"),e.fillStyle=n,e.fillRect(0,0,256,256)}let t=new j.CanvasTexture(r);return t.needsUpdate=!0,t}function ue({theme:r="emerald",effectColor:e="#00e676",effectSpeed:t=.5,effectDensity:n=.5,enabled:s=!0}){let{pointer:m}=ir(),f=oe(null),c=oe(null),d=oe(new j.Object3D),o=oe(!1),a=oe([]),l=Math.max(.1,Math.min(1,n)),i=Math.round(60*l),v=Me(()=>lr(),[]),u=Me(()=>{if(!e)return"#00e676";let b=e.toLowerCase().trim();return at[b]?at[b]:e},[e]),y=Me(()=>{let b=[],w=1+Math.sqrt(l)*.8;for(let h=0;h<i;h++)b.push({x:(Math.random()-.5)*12,y:(Math.random()-.5)*6,z:(Math.random()-.5)*3,speedY:(Math.random()-.5)*.8,speedX:(Math.random()-.5)*.8,size:(.8+Math.random()*1.2)*w,phase:Math.random()*Math.PI*2,life:Math.random()});return b},[i,l]),p=ot(()=>{o.current=!0},[]),M=ot(()=>{o.current=!1},[]);return ar(()=>(window.addEventListener("pointerdown",p),window.addEventListener("pointerup",M),()=>{window.removeEventListener("pointerdown",p),window.removeEventListener("pointerup",M)}),[p,M]),sr((b,w)=>{if(!f.current||!s)return;let h=b.clock.getElapsedTime()*t;if(o.current){let x=m.x*7,E=m.y*4;a.current.length<15&&a.current.push({x:x+(Math.random()-.5)*.5,y:E+(Math.random()-.5)*.5,z:(Math.random()-.5)*1,life:1,size:(1.2+Math.random()*.8)*Math.sqrt(l)})}a.current=a.current.map(x=>(x.life-=w*1.2*t,x)).filter(x=>x.life>0),c.current&&(c.current.intensity=2.5+Math.sin(h*6)*.5),y.forEach((x,E)=>{let g=x.x+Math.sin(h*1.2+x.phase)*1.5,k=x.y+Math.cos(h*.9+x.phase*1.3)*1.2,P=x.z+Math.sin(h*.7+x.phase*.8)*.8,B=x.size*(1+Math.sin(h*2+E)*.25);d.current.position.set(g,k,P),d.current.scale.set(B,B,B),d.current.updateMatrix(),f.current.setMatrixAt(E,d.current.matrix)}),a.current.forEach((x,E)=>{let g=(i-1-E+i)%i,k=Math.sin(x.life*Math.PI)*x.size;d.current.position.set(x.x,x.y,x.z),d.current.scale.set(k,k,k),d.current.updateMatrix(),f.current.setMatrixAt(g,d.current.matrix)}),f.current.instanceMatrix.needsUpdate=!0}),s?st("group",{children:[Ee("pointLight",{ref:c,position:[0,0,2],color:u,intensity:3,distance:12}),st("instancedMesh",{ref:f,args:[void 0,void 0,i],children:[Ee("planeGeometry",{args:[1.8,1.8]}),Ee("meshBasicMaterial",{map:v,color:u,transparent:!0,opacity:.85,blending:j.NormalBlending,depthWrite:!1,side:j.DoubleSide})]})]}):null}import{useState as wr}from"react";import{useTranslations as cr}from"next-intl";var Te={"nav.schedule":"Schedule","nav.experiences":"Experiences","nav.membership":"Membership","nav.login":"Log In","nav.bookTickets":"Book Tickets","hero.genreImax":"IMAX 3D","hero.genreAction":"ACTION / SCI-FI","hero.title":"AVATAR: THE WAY OF WATER","hero.synopsis":"Set more than a decade after the events of the first film, learn the story of the Sully family, the trouble that follows them, the lengths they go to keep each other safe, the battles they fight to stay alive, and the tragedies they endure.","hero.getTickets":"GET TICKETS","hero.watchTrailer":"WATCH TRAILER"};function it(){try{let r=cr();return e=>{try{return r(e)||Te[e]||e}catch(t){return Te[e]||e}}}catch(r){return e=>Te[e]||e}}import{useState as mr}from"react";import{useLocale as dr}from"next-intl";import{Globe as fr}from"lucide-react";import{jsx as ur,jsxs as pr}from"react/jsx-runtime";function ke(){let r="en";try{let s=dr();s&&(r=s)}catch(s){}let[e,t]=mr(r);return pr("button",{onClick:()=>{t(e==="en"?"es":"en")},className:"flex items-center gap-2 text-sm font-medium text-white/70 hover:text-white transition-colors uppercase tracking-wider cursor-pointer",children:[ur(fr,{className:"w-4 h-4"}),e==="en"?"ES":"EN"]})}import*as ct from"react";import{Slot as br}from"@radix-ui/react-slot";import{cva as xr}from"class-variance-authority";import{clsx as hr}from"clsx";import{twMerge as gr}from"tailwind-merge";function lt(...r){return gr(hr(r))}import{jsx as yr}from"react/jsx-runtime";var vr=xr("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium cursor-pointer transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Q=ct.forwardRef((f,m)=>{var c=f,{className:r,variant:e,size:t,asChild:n=!1}=c,s=_e(c,["className","variant","size","asChild"]);return yr(n?br:"button",N({className:lt(vr({variant:e,size:t,className:r})),ref:m},s))});Q.displayName="Button";import{jsx as R,jsxs as F}from"react/jsx-runtime";function pe({cinemaName:r="NOVA",webTheme:e="neon"}){let t=it(),[n,s]=wr(!1),m=e==="noir"?"bg-slate-900/40 mix-blend-color":e==="crimson"?"bg-red-900/30 mix-blend-color":"bg-blue-900/20 mix-blend-color";return F("div",{className:`min-h-screen bg-black text-white selection:bg-white/30 font-sans transition-colors duration-1000 group theme-${e}`,children:[F("nav",{className:"absolute top-0 left-0 right-0 z-50 flex items-center justify-between px-4 sm:px-8 py-4 sm:py-6 bg-black/40 sm:bg-transparent backdrop-blur-md sm:backdrop-blur-none border-b border-white/10 sm:border-none",children:[F("div",{className:"flex items-center gap-6 lg:gap-12",children:[F("a",{href:"#",className:"text-2xl sm:text-3xl font-bold tracking-tighter uppercase font-display text-white",children:[r,"."]}),F("div",{className:"hidden md:flex items-center gap-6 lg:gap-8 text-sm font-semibold tracking-widest text-white/70",children:[R("a",{href:"#schedule",className:"hover:text-white transition-colors",children:t("nav.schedule")}),R("a",{href:"#experiences",className:"hover:text-white transition-colors",children:t("nav.experiences")}),R("a",{href:"#membership",className:"hover:text-white transition-colors",children:t("nav.membership")})]})]}),F("div",{className:"flex items-center gap-3 sm:gap-6",children:[R(ke,{}),F("div",{className:"hidden sm:flex items-center gap-4",children:[R("a",{href:"#login",className:"text-sm font-semibold tracking-widest text-white/70 hover:text-white transition-colors",children:t("nav.login")}),R(Q,{variant:"outline",className:"rounded-none border-white/40 text-white bg-transparent hover:bg-white hover:text-black transition-colors font-semibold tracking-widest text-xs px-6 py-5 uppercase",children:t("nav.bookTickets")})]}),R("button",{onClick:()=>s(!n),className:"md:hidden p-2 rounded-lg bg-white/10 hover:bg-white/20 text-white text-lg focus:outline-none transition-colors cursor-pointer","aria-label":"Toggle Navigation Menu",children:n?"\u2715":"\u2630"})]})]}),n&&F("div",{className:"fixed inset-0 z-40 bg-black/95 backdrop-blur-2xl md:hidden flex flex-col justify-between p-8 pt-24 animate-fade-in",children:[F("div",{className:"flex flex-col gap-6 text-xl font-bold tracking-wider uppercase font-display",children:[R("a",{href:"#schedule",onClick:()=>s(!1),className:"py-2 border-b border-white/10 hover:text-amber-400 transition-colors",children:t("nav.schedule")}),R("a",{href:"#experiences",onClick:()=>s(!1),className:"py-2 border-b border-white/10 hover:text-amber-400 transition-colors",children:t("nav.experiences")}),R("a",{href:"#membership",onClick:()=>s(!1),className:"py-2 border-b border-white/10 hover:text-amber-400 transition-colors",children:t("nav.membership")}),R("a",{href:"#login",onClick:()=>s(!1),className:"py-2 border-b border-white/10 text-white/70 hover:text-white transition-colors",children:t("nav.login")})]}),R("div",{className:"flex flex-col gap-3 pt-6 border-t border-white/10",children:R(Q,{onClick:()=>s(!1),className:"w-full rounded-none bg-amber-400 text-black hover:bg-amber-300 font-extrabold tracking-widest text-sm py-4 uppercase",children:t("nav.bookTickets")})})]}),F("div",{className:"relative h-screen w-full flex flex-col justify-end pb-28 sm:pb-24 px-4 sm:px-8 md:px-16 overflow-hidden",children:[F("div",{className:"absolute inset-0 z-0",children:[R("div",{className:"absolute inset-0 bg-[url('https://images.unsplash.com/photo-1605810230434-7631ac76ec81?q=80&w=2560&auto=format&fit=crop')] bg-cover bg-center"}),R("div",{className:"absolute inset-0 bg-gradient-to-t from-black via-black/50 to-transparent z-10"}),R("div",{className:`absolute inset-0 ${m} z-10`})]}),F("div",{className:"relative z-20 max-w-5xl",children:[F("div",{className:"flex items-center gap-2 sm:gap-3 mb-4 sm:mb-6 flex-wrap",children:[R("span",{className:"bg-blue-600 text-white text-[9px] sm:text-[10px] font-bold px-2.5 sm:px-3 py-1 tracking-widest",children:t("hero.genreImax")}),R("span",{className:"border border-white/20 text-white/80 text-[9px] sm:text-[10px] font-bold px-2.5 sm:px-3 py-1 tracking-widest",children:t("hero.genreAction")})]}),R("h1",{className:"text-4xl sm:text-6xl md:text-7xl lg:text-[8rem] leading-[0.9] sm:leading-[0.85] font-display font-black tracking-tighter mb-4 sm:mb-6 uppercase drop-shadow-2xl",children:t("hero.title")}),R("p",{className:"max-w-2xl text-sm sm:text-lg md:text-xl text-white/70 font-medium mb-6 sm:mb-10 leading-relaxed drop-shadow-md line-clamp-3 sm:line-clamp-none",children:t("hero.synopsis")}),F("div",{className:"flex flex-col sm:flex-row items-stretch sm:items-center gap-3 sm:gap-4 w-full sm:w-auto",children:[R(Q,{className:"rounded-none bg-white text-black hover:bg-white/90 font-bold tracking-widest text-xs px-6 sm:px-8 py-5 sm:py-6 uppercase transition-transform hover:scale-105 active:scale-95 w-full sm:w-auto",children:t("hero.getTickets")}),R(Q,{variant:"outline",className:"rounded-none border-white/30 text-white bg-black/20 backdrop-blur-md hover:bg-white/10 transition-colors font-bold tracking-widest text-xs px-6 sm:px-8 py-5 sm:py-6 uppercase w-full sm:w-auto",children:t("hero.watchTrailer")})]})]})]})]})}import{jsx as T,jsxs as he}from"react/jsx-runtime";var mt="https://threejs.org/examples/fonts/helvetiker_bold.typeface.json",dt={cinema:mt,helvetiker:mt,gentilis:"https://threejs.org/examples/fonts/gentilis_bold.typeface.json",optimer:"https://threejs.org/examples/fonts/optimer_bold.typeface.json"},ft={rojo:"#3b0712",azul:"#021a38",verde:"#032117",esmeralda:"#032117",dorado:"#1c1503",negro:"#07080c",purpura:"#21032a"},ut={gold:"radial-gradient(circle at center, #1c1503 0%, #080601 60%, #020201 100%)",neon:"radial-gradient(circle at center, #021a1e 0%, #030d14 60%, #010408 100%)",emerald:"radial-gradient(circle at center, #032117 0%, #02120d 60%, #010705 100%)",crimson:"radial-gradient(circle at center, #240409 0%, #120205 60%, #060102 100%)",obsidian:"radial-gradient(circle at center, #120d24 0%, #080512 60%, #030206 100%)",glass:"radial-gradient(circle at center, #0f172a 0%, #070b14 60%, #020205 100%)"};function Nr(r,e=.85){let n=-(r.length*e)/2+e/2;return r.split("").map((s,m)=>[n+m*e,0,0])}function Pr(r){let e=[];r?Array.isArray(r)?e=r.map(a=>String(a).toLowerCase().trim()):typeof r=="string"&&(e=r.toLowerCase().split(",").map(a=>a.trim())):e=["flames"];let t=e.includes("all")||e.includes("todos")||e.includes("supernova")||e.includes("inferno"),n=t||e.includes("flames")||e.includes("fluid-flames")||e.includes("llamas")||e.includes("llamas-organicas"),s=t||e.includes("fire")||e.includes("crystal-flames")||e.includes("cristales")||e.includes("fuego"),m=t||e.includes("blobs")||e.includes("energy-blobs")||e.includes("plasma-blobs")||e.includes("nubes"),f=t||e.includes("sparks")||e.includes("chispas"),c=t||e.includes("shockwave")||e.includes("wave")||e.includes("onda")||e.includes("onda-3d"),d=t||e.includes("plasma")||e.includes("electric"),o=t||e.includes("embers")||e.includes("ascuas")||n||s||m;return{enableFluidFlames:n,enableCrystalFlames:s,enableBlobs:m,enableSparks:f,enableShockwave:c,enablePlasma:d,enableEmbers:o}}function Se({containerToDisplay:r,containerSelector:e,effect:t="flames",title:n,backgroundColor:s,effectColor:m,effectSpeed:f=.5,effectDensity:c=.3,autoFitText:d=!0,loaderDuration:o,redirectUrl:a,onComplete:l,fontFamily:i="cinema",fontUrl:v,theme:u="crimson",letterSpacing:y=.85,className:p="",style:M,children:b}){let w=n!=null?n.trim().toUpperCase():"",h=w?w.split(""):[],x=ae(()=>Nr(w,y),[w,y]),[E,g]=Re(!1);Ce(()=>{g(!0)},[]);let k=!!(o&&o>0&&(a||l)),[P,B]=Re(0);Ce(()=>{if(!k||!o)return;let L=o*1e3,H=50,xe=0,Fe=setInterval(()=>{xe+=H;let Mt=Math.min(100,xe/L*100);B(Mt),xe>=L&&(clearInterval(Fe),l==null||l(),a&&(window.location.href=a))},H);return()=>clearInterval(Fe)},[k,o,a,l]);let te=ae(()=>{if(v)return v;let L=String(i).toLowerCase().trim();return dt[L]||dt.cinema},[i,v]),[Z,O]=Re(typeof window!="undefined"?window.innerWidth:1200);Ce(()=>{let L=()=>O(window.innerWidth);return window.addEventListener("resize",L),()=>window.removeEventListener("resize",L)},[]);let vt=ae(()=>{if(!d||!h.length)return 1;let L=h.length,H=1;return L<=4?H=1:L<=7?H=.85:L<=10?H=.7:L<=14?H=.55:H=.45,Z<480?H*.55:Z<768?H*.75:H},[d,h.length,Z]),He=ae(()=>{if(!s)return ut[u]||ut.gold;let L=s.toLowerCase().trim();return ft[L]?ft[L]:(s.startsWith("#")||s.startsWith("rgb")||s.includes("gradient"),s)},[s,u]),z=ae(()=>Pr(t),[t]),yt=z.enableFluidFlames&&z.enableCrystalFlames?"all":z.enableCrystalFlames?"crystal":"fluid",wt=z.enableFluidFlames||z.enableCrystalFlames,Ae=e||(typeof r=="string"?r:void 0),ie=()=>Ae==="lhome"||Ae==="home"||r==="lhome"||r==="home"?T(pe,{cinemaName:w||"NOVA",webTheme:u}):typeof r=="string"&&r!=="lhome"&&r!=="home"?he("div",{className:"text-center text-white p-8 bg-black/40 backdrop-blur-md rounded-2xl border border-white/10",children:[T("h2",{className:"text-3xl font-bold tracking-widest uppercase mb-2",children:r}),T("p",{className:"text-sm text-white/60",children:"3D Interactive WebGL Background"})]}):r&&typeof r!="string"?r:b;return E?he("div",{id:e,"data-container-selector":e,className:`relative w-full h-full overflow-hidden select-none ${p}`,style:N({background:He},M),children:[k&&T("div",{className:"absolute top-0 left-0 right-0 z-30 h-1 bg-white/10 pointer-events-none",children:T("div",{className:"h-full bg-gradient-to-r from-amber-400 via-rose-500 to-cyan-400 transition-all duration-75",style:{width:`${P}%`}})}),T("div",{className:"absolute inset-0 z-0 pointer-events-auto",children:T(Er,{camera:{position:[0,0,14],fov:45,near:.1,far:50},dpr:[1,2],gl:{antialias:!0,toneMapping:4,toneMappingExposure:1.2},children:he(Mr,{fallback:null,children:[T(Tr,{preset:"studio"}),T("ambientLight",{intensity:.3}),T("directionalLight",{position:[5,8,5],intensity:1.5,color:"#ffffff"}),T("pointLight",{position:[-5,-3,-5],intensity:.6,color:u==="emerald"?"#10b981":u==="crimson"?"#ff1744":u==="neon"?"#00ffff":"#FFD700"}),T(Y,{phase:k?"entering":"idle",effectSpeed:f}),T(fe,{enabled:wt,theme:u,effectColor:m,effectSpeed:f,effectDensity:c,mode:yt}),T(ue,{enabled:z.enableBlobs,theme:u,effectColor:m,effectSpeed:f,effectDensity:c}),T(V,{enabled:z.enableSparks,theme:u,effectColor:m,effectSpeed:f}),T($,{enabled:z.enableShockwave,theme:u,effectColor:m,effectSpeed:f}),T(G,{enabled:z.enablePlasma,theme:u,effectColor:m,effectSpeed:f}),h.length>0&&T(kr,{disableY:!0,disableZ:!0,children:T("group",{scale:vt,children:h.map((L,H)=>T(X,{char:L,index:H,totalLetters:h.length,position:x[H],phase:k?"entering":"idle",theme:u,fontUrl:te},`${L}-${H}`))})}),T(U,{theme:u,effectColor:m,effectSpeed:f,visible:z.enableEmbers}),he(Rr,{children:[T(Cr,{luminanceThreshold:.7,luminanceSmoothing:.9,intensity:u==="neon"||u==="crimson"?1.4:.9,mipmapBlur:!0}),T(Sr,{offset:.3,darkness:.85}),T(Lr,{opacity:.025})]})]})})}),ie()&&T("div",{className:"relative z-10 w-full h-full pointer-events-none flex flex-col items-center justify-center",children:T("div",{className:"pointer-events-auto w-full h-full",children:ie()})})]}):T("div",{id:e,"data-container-selector":e,className:`relative w-full h-full overflow-hidden select-none bg-black ${p}`,style:N({background:He},M),children:ie()&&T("div",{className:"relative z-10 w-full h-full pointer-events-none flex flex-col items-center justify-center",children:T("div",{className:"pointer-events-auto w-full h-full",children:ie()})})})}import{Suspense as Hr,useMemo as Ar,useState as Le,useEffect as Fr}from"react";import{Canvas as Br}from"@react-three/fiber";import{Environment as Ir,Center as zr}from"@react-three/drei";import{EffectComposer as _r,Bloom as Or,Vignette as Dr,Noise as Wr}from"@react-three/postprocessing";import{jsx as S,jsxs as Ne}from"react/jsx-runtime";var pt={gold:"radial-gradient(circle at center, #1c1503 0%, #080601 60%, #020201 100%)",neon:"radial-gradient(circle at center, #021a1e 0%, #030d14 60%, #010408 100%)",emerald:"radial-gradient(circle at center, #032117 0%, #02120d 60%, #010705 100%)",crimson:"radial-gradient(circle at center, #240409 0%, #120205 60%, #060102 100%)",obsidian:"radial-gradient(circle at center, #120d24 0%, #080512 60%, #030206 100%)",glass:"radial-gradient(circle at center, #0f172a 0%, #070b14 60%, #020205 100%)"},Xr="https://threejs.org/examples/fonts/helvetiker_bold.typeface.json";function Ur(r){let n=-(r.length*.65)/2;return r.split("").map((s,m)=>[n+m*.65,0,0])}function ge({text:r="CINEMA",theme:e="emerald",customBackground:t,interactiveSparks:n=!0,interactiveShockwave:s=!0,interactivePlasma:m=!0,showParticles:f=!0,enableBloom:c=!0,className:d="",style:o,children:a}){let[l,i]=Le(!1),[v]=Le(r),[u]=Le(e);Fr(()=>{i(!0)},[]);let y=(v||r||"CINEMA").toUpperCase(),p=y.split(""),M=Ar(()=>Ur(y),[y]),b=u||e||"emerald",w=t||pt[b]||pt.emerald;return l?Ne("div",{className:`relative w-full h-full min-h-[350px] overflow-hidden select-none ${d}`,style:N({background:w},o),children:[S("div",{className:"absolute inset-0 z-0 pointer-events-auto",children:S(Br,{camera:{position:[0,0,14],fov:45,near:.1,far:50},dpr:[1,2],gl:{antialias:!0,toneMapping:4,toneMappingExposure:1.2},children:Ne(Hr,{fallback:null,children:[S(Ir,{preset:"studio"}),S("ambientLight",{intensity:.3}),S("directionalLight",{position:[5,8,5],intensity:1.5,color:"#ffffff"}),S("pointLight",{position:[-5,-3,-5],intensity:.6,color:b==="emerald"?"#10b981":b==="crimson"?"#ff1744":b==="neon"?"#00ffff":"#FFD700"}),S(Y,{phase:"idle"}),S(V,{enabled:n,theme:b}),S($,{enabled:s,theme:b}),S(G,{enabled:m,theme:b}),S(zr,{disableY:!0,disableZ:!0,children:S("group",{children:p.map((h,x)=>S(X,{char:h,index:x,totalLetters:p.length,position:M[x],phase:"idle",theme:b,fontUrl:Xr},`${h}-${x}`))})}),f&&S(U,{theme:b,visible:!0}),Ne(_r,{children:[S(Or,{luminanceThreshold:.7,luminanceSmoothing:.9,intensity:c?.9:0,mipmapBlur:!0}),S(Dr,{offset:.3,darkness:.85}),S(Wr,{opacity:.025})]})]})})}),a&&S("div",{className:"relative z-10 w-full h-full pointer-events-none flex flex-col items-center justify-center",children:a})]}):S("div",{className:`relative w-full h-full min-h-[350px] overflow-hidden select-none bg-black ${d}`,style:N({background:w},o),children:a&&S("div",{className:"relative z-10 w-full h-full pointer-events-none flex flex-col items-center justify-center",children:a})})}import{jsx as ht}from"react/jsx-runtime";function Yr(r,e={}){let t=n=>ht(ge,D(N({},e),{children:ht(r,N({},n))}));return t.displayName=`WithCinema3D(${r.displayName||r.name||"Component"})`,t}import{Suspense as $r,useState as se,useEffect as gt,useCallback as Gr,useMemo as jr}from"react";import{Canvas as Zr}from"@react-three/fiber";import{Environment as qr,Center as Kr}from"@react-three/drei";import{EffectComposer as Jr,Bloom as Qr,Vignette as en,Noise as tn}from"@react-three/postprocessing";import{jsx as A,jsxs as ee}from"react/jsx-runtime";var Vr=[{key:"gold",label:"Gold",color:"#FFD700"},{key:"neon",label:"Neon",color:"#00ffff"},{key:"emerald",label:"Emerald",color:"#10b981"},{key:"crimson",label:"Crimson",color:"#ff1744"},{key:"obsidian",label:"Obsidian",color:"#a855f7"},{key:"glass",label:"Glass",color:"#ffffff"}];function be({phase:r,cinemaName:e,theme:t,effects:n,onTitleChange:s,onThemeChange:m,onToggleEffect:f}){return ee("div",{className:"absolute inset-0 pointer-events-none z-10 flex flex-col items-center justify-between p-6 md:p-10",style:{opacity:r==="exiting"?0:1,transition:"opacity 0.8s ease-out"},children:[ee("div",{className:"w-full max-w-xl flex flex-col items-center gap-2 pointer-events-auto",style:{opacity:r==="idle"||r==="entering"?1:0,transform:r==="idle"||r==="entering"?"translateY(0)":"translateY(-20px)",transition:"all 1s ease-out 0.3s"},children:[A("label",{className:"text-[10px] tracking-[0.3em] uppercase text-white/50 font-bold",children:"Live 3D Title Control"}),A("div",{className:"relative w-full",children:A("input",{type:"text",value:e,onChange:o=>s(o.target.value),maxLength:18,placeholder:"Type any title...",className:"w-full px-6 py-3 rounded-full text-center text-sm md:text-base font-bold tracking-widest uppercase outline-none transition-all duration-300",style:{background:"rgba(255, 255, 255, 0.08)",backdropFilter:"blur(16px)",border:"1px solid rgba(255, 255, 255, 0.2)",color:"#ffffff",boxShadow:"0 8px 32px rgba(0, 0, 0, 0.37)"}})})]}),r==="loading"&&A("div",{className:"absolute inset-0 flex items-center justify-center",children:A("div",{className:"w-16 h-16 rounded-full border-2 animate-spin",style:{borderColor:"transparent",borderTopColor:"rgba(255, 215, 0, 0.8)",borderRightColor:"rgba(255, 215, 0, 0.3)"}})}),ee("div",{className:"w-full max-w-3xl flex flex-col items-center gap-5",children:[ee("div",{className:"flex flex-wrap items-center justify-center gap-2 pointer-events-auto",style:{opacity:r==="idle"||r==="entering"?1:0,transition:"opacity 1s ease-out 0.8s"},children:[A("span",{className:"text-[9px] uppercase tracking-[0.25em] text-white/40 mr-2 font-bold",children:"Effects"}),A("button",{onClick:()=>f("sparks"),className:`px-4 py-1.5 rounded-full text-[11px] font-bold tracking-wider uppercase transition-all duration-300 cursor-pointer ${n.sparks?"bg-amber-500/30 text-amber-200 border-amber-400/60 shadow-[0_0_15px_rgba(245,158,11,0.4)]":"bg-white/5 text-white/40 border-white/10 hover:text-white/70"} border`,children:"\u{1F525} Sparks"}),A("button",{onClick:()=>f("shockwave"),className:`px-4 py-1.5 rounded-full text-[11px] font-bold tracking-wider uppercase transition-all duration-300 cursor-pointer ${n.shockwave?"bg-cyan-500/30 text-cyan-200 border-cyan-400/60 shadow-[0_0_15px_rgba(6,182,212,0.4)]":"bg-white/5 text-white/40 border-white/10 hover:text-white/70"} border`,children:"\u{1F30A} Wave"}),A("button",{onClick:()=>f("plasma"),className:`px-4 py-1.5 rounded-full text-[11px] font-bold tracking-wider uppercase transition-all duration-300 cursor-pointer ${n.plasma?"bg-purple-500/30 text-purple-200 border-purple-400/60 shadow-[0_0_15px_rgba(168,85,247,0.4)]":"bg-white/5 text-white/40 border-white/10 hover:text-white/70"} border`,children:"\u26A1 Plasma"}),A("button",{onClick:()=>f("embers"),className:`px-4 py-1.5 rounded-full text-[11px] font-bold tracking-wider uppercase transition-all duration-300 cursor-pointer ${n.embers?"bg-emerald-500/30 text-emerald-200 border-emerald-400/60 shadow-[0_0_15px_rgba(16,185,129,0.4)]":"bg-white/5 text-white/40 border-white/10 hover:text-white/70"} border`,children:"\u2728 Embers"})]}),ee("div",{className:"flex items-center gap-3 pointer-events-auto",style:{opacity:r==="idle"||r==="entering"?1:0,transition:"opacity 1s ease-out 1.2s"},children:[A("span",{className:"text-[10px] uppercase tracking-[0.3em] text-white/40 mr-2 font-bold",children:"Theme"}),A("div",{className:"flex items-center gap-2 md:gap-3",children:Vr.map(o=>{let a=t===o.key;return ee("button",{onClick:()=>m(o.key),className:"group relative flex flex-col items-center gap-1.5 cursor-pointer outline-none","aria-label":`Switch to ${o.label} theme`,children:[A("div",{className:"relative w-11 h-7 md:w-14 md:h-9 rounded-md overflow-hidden transition-all duration-300",style:{border:a?`2px solid ${o.color}`:"1px solid rgba(255, 255, 255, 0.15)",transform:a?"scale(1.1) translateY(-2px)":"scale(1) translateY(0)",boxShadow:a?`0 4px 20px ${o.color}60`:"0 2px 10px rgba(0,0,0,0.5)"},children:A("div",{className:"absolute inset-0 opacity-80",style:{backgroundColor:o.color}})}),A("span",{className:"text-[9px] uppercase tracking-widest font-semibold transition-colors duration-300",style:{color:a?"#ffffff":"rgba(255, 255, 255, 0.4)"},children:o.label})]},o.key)})})]})]})]})}import{jsx as C,jsxs as Pe}from"react/jsx-runtime";var rn="https://threejs.org/examples/fonts/helvetiker_bold.typeface.json",bt={gold:"radial-gradient(circle at center, #1c1503 0%, #080601 60%, #020201 100%)",neon:"radial-gradient(circle at center, #021a1e 0%, #030d14 60%, #010408 100%)",emerald:"radial-gradient(circle at center, #032117 0%, #02120d 60%, #010705 100%)",crimson:"radial-gradient(circle at center, #240409 0%, #120205 60%, #060102 100%)",obsidian:"radial-gradient(circle at center, #120d24 0%, #080512 60%, #030206 100%)",glass:"radial-gradient(circle at center, #0f172a 0%, #070b14 60%, #020205 100%)"};function nn(r){let n=-(r.length*.65)/2;return r.split("").map((s,m)=>[n+m*.65,0,0])}function xt({cinemaName:r="CINEMULTIPLEX",defaultTheme:e="emerald",customBackground:t,onEnterCinema:n}){let[s,m]=se(!1),[f,c]=se("loading"),[d,o]=se(e),[a,l]=se(r),[i,v]=se({sparks:!0,shockwave:!0,plasma:!0,embers:!0});gt(()=>{m(!0)},[]);let u=(a||"CINEMA").toUpperCase(),y=u.split(""),p=jr(()=>nn(u),[u]);gt(()=>{let w=setTimeout(()=>c("entering"),800),h=y.length*120+1500,x=setTimeout(()=>c("idle"),800+h);return()=>{clearTimeout(w),clearTimeout(x)}},[y.length]);let M=Gr(w=>{v(h=>D(N({},h),{[w]:!h[w]}))},[]),b=t||bt[d]||bt.emerald;return s?Pe("div",{className:"fixed inset-0 w-screen h-screen transition-all duration-1000 select-none overflow-hidden",style:{background:b},children:[C(Zr,{camera:{position:[0,0,14],fov:45,near:.1,far:50},dpr:[1,2],gl:{antialias:!0,toneMapping:4,toneMappingExposure:1.2},children:Pe($r,{fallback:null,children:[C(qr,{preset:"studio"}),C("ambientLight",{intensity:.3}),C("directionalLight",{position:[5,8,5],intensity:1.5,color:"#ffffff"}),C("pointLight",{position:[-5,-3,-5],intensity:.6,color:d==="emerald"?"#10b981":d==="crimson"?"#ff1744":d==="neon"?"#00ffff":"#FFD700"}),C("spotLight",{position:[0,10,0],angle:.4,penumbra:.8,intensity:.9,color:"#ffffff"}),C("pointLight",{position:[0,0,-5],intensity:.4,color:"#ffffff"}),C(Y,{phase:f}),i.sparks&&C(V,{theme:d}),C($,{theme:d,enabled:i.shockwave}),C(G,{theme:d,enabled:i.plasma}),C(Kr,{disableY:!0,disableZ:!0,children:C("group",{children:y.map((w,h)=>C(X,{char:w,index:h,totalLetters:y.length,position:p[h],phase:f,theme:d,fontUrl:rn},`${w}-${h}`))})}),C(U,{theme:d,visible:f!=="loading"&&i.embers}),Pe(Jr,{children:[C(Qr,{luminanceThreshold:.7,luminanceSmoothing:.9,intensity:d==="neon"||d==="emerald"||d==="crimson"?1.4:.7,mipmapBlur:!0}),C(en,{offset:.3,darkness:.85}),C(tn,{opacity:.025})]})]})}),C(be,{phase:f,cinemaName:a,theme:d,effects:i,onTitleChange:l,onThemeChange:o,onToggleEffect:M})]}):C("div",{className:"fixed inset-0 w-screen h-screen transition-all duration-1000 select-none overflow-hidden bg-black flex items-center justify-center",style:{background:b},children:C("div",{className:"w-16 h-16 rounded-full border-2 animate-spin border-t-amber-400 border-r-amber-400/30 border-b-transparent border-l-transparent"})})}export{Se as AnimatedBackground,X as AnimatedLetter,Y as CameraRig,ge as CinemaBackground,pe as CinemaHome,xt as CinemaLoader,V as ClickFireSparks,$ as ClickShockwave,G as ElectricPlasma,fe as FireFlames,be as LoaderOverlay,ue as PlasmaBlobs,U as SceneParticles,Se as default,Yr as withCinema3D};
1
+ "use client";
2
+ import React from "react";
3
+ var Mt=Object.defineProperty,Et=Object.defineProperties;var Tt=Object.getOwnPropertyDescriptors;var le=Object.getOwnPropertySymbols;var Be=Object.prototype.hasOwnProperty,Ie=Object.prototype.propertyIsEnumerable;var Fe=(t,e,r)=>e in t?Mt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,N=(t,e)=>{for(var r in e||(e={}))Be.call(e,r)&&Fe(t,r,e[r]);if(le)for(var r of le(e))Ie.call(e,r)&&Fe(t,r,e[r]);return t},D=(t,e)=>Et(t,Tt(e));var ze=(t,e)=>{var r={};for(var n in t)Be.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&le)for(var n of le(t))e.indexOf(n)<0&&Ie.call(t,n)&&(r[n]=t[n]);return r};import{Suspense as wr,useMemo as ae,useState as ke,useEffect as Re}from"react";import{Canvas as Mr}from"@react-three/fiber";import{Environment as Er,Center as Tr}from"@react-three/drei";import{EffectComposer as kr,Bloom as Rr,Vignette as Cr,Noise as Sr}from"@react-three/postprocessing";import{useRef as _e,useMemo as kt}from"react";import{useFrame as Rt}from"@react-three/fiber";import{Text3D as Ct}from"@react-three/drei";import*as K from"three";import{jsx as Oe,jsxs as Lt}from"react/jsx-runtime";var St={gold:{color:"#FFD700",metalness:1,roughness:.15,clearcoat:1,emissive:"#1a0f00",emissiveIntensity:.3,envMapIntensity:2},neon:{color:"#00ffff",metalness:0,roughness:1,clearcoat:0,emissive:"#00ffff",emissiveIntensity:2.5,envMapIntensity:.5},emerald:{color:"#10b981",metalness:.9,roughness:.1,clearcoat:1,emissive:"#065f46",emissiveIntensity:1.2,envMapIntensity:2.5},crimson:{color:"#ff1744",metalness:.8,roughness:.15,clearcoat:1,emissive:"#880e4f",emissiveIntensity:1.8,envMapIntensity:2},obsidian:{color:"#1a1a2e",metalness:1,roughness:.05,clearcoat:1,emissive:"#0a0a1a",emissiveIntensity:.1,envMapIntensity:3},glass:{color:"#ffffff",metalness:0,roughness:0,clearcoat:0,emissive:"#000000",emissiveIntensity:0,envMapIntensity:1.5,transmission:.95,ior:1.5,thickness:.5,transparent:!0}};function X({char:t,index:e,totalLetters:r,position:n,phase:s,theme:m,fontUrl:f}){let c=_e(null),d=_e(null),o=kt(()=>{let l=e/r*Math.PI*2;return{x:Math.cos(l)*4+(Math.random()-.5)*2,y:-3+Math.random()*-3,z:-5+Math.random()*-3,rotX:(Math.random()-.5)*Math.PI*2,rotY:(Math.random()-.5)*Math.PI*2}},[e,r]),a=St[m];return Rt(l=>{if(!c.current)return;let i=l.clock.getElapsedTime();d.current===null&&(d.current=i);let v=i-d.current,u=e*.12;if(s==="loading"){c.current.position.set(n[0]+o.x,n[1]+o.y,n[2]+o.z),c.current.rotation.set(o.rotX,o.rotY,0),c.current.scale.setScalar(0);return}if(s==="entering"){let y=Math.max(0,v-u),p=1-Math.exp(-y*3),M=1+Math.sin(y*8)*Math.max(0,.15-y*.1);c.current.position.set(K.MathUtils.lerp(n[0]+o.x,n[0],p),K.MathUtils.lerp(n[1]+o.y,n[1],p),K.MathUtils.lerp(n[2]+o.z,n[2],p)),c.current.rotation.set(K.MathUtils.lerp(o.rotX,0,p),K.MathUtils.lerp(o.rotY,0,p),0),c.current.scale.setScalar(Math.min(p*M,1.05));return}if(s==="idle"){let y=Math.sin(i*1.2+e*.5)*.015,p=Math.sin(i*.8+e*.3)*.008;c.current.position.set(n[0]+p,n[1]+y,n[2]),c.current.rotation.set(Math.sin(i*.5+e)*.01,Math.sin(i*.3+e*.7)*.01,0),c.current.scale.setScalar(1);return}if(s==="exiting"){let y=Math.max(0,v-u*.5),p=Math.min(y*2,1),M=p*p;c.current.position.set(n[0]+o.x*M*.5,n[1],n[2]-M*8),c.current.scale.setScalar(Math.max(1-M,0)),c.current.rotation.y+=.05}}),t===" "?null:Oe("group",{ref:c,position:n,children:Lt(Ct,{font:f,size:.8,height:.35,bevelEnabled:!0,bevelSize:.02,bevelThickness:.01,bevelSegments:3,curveSegments:12,children:[t,Oe("meshPhysicalMaterial",{color:a.color,metalness:a.metalness,roughness:a.roughness,clearcoat:a.clearcoat,emissive:a.emissive,emissiveIntensity:a.emissiveIntensity,envMapIntensity:a.envMapIntensity,transmission:a.transmission,ior:a.ior,thickness:a.thickness,transparent:a.transparent,toneMapped:m!=="neon"})]})})}import{useRef as ce,useMemo as Nt}from"react";import{useFrame as Pt}from"@react-three/fiber";import{Sparkles as De}from"@react-three/drei";import*as Ue from"three";import{jsx as re,jsxs as Ye}from"react/jsx-runtime";var We={gold:"#FFD700",neon:"#00ffff",emerald:"#10b981",crimson:"#ff1744",obsidian:"#a855f7",glass:"#ffffff"},Xe={azul:"#00e5ff",verde:"#00e676",rojo:"#ff3d00",dorado:"#ffb300",purpura:"#d500f9",magenta:"#ff007f",esmeralda:"#10b981"};function Ht({color:t,speedMultiplier:e=.5,count:r=60}){let n=ce(null),s=ce(new Ue.Object3D),m=ce(null),f=ce(null);if(!m.current){m.current=new Float32Array(r),f.current=new Float32Array(r*3);for(let c=0;c<r;c++)m.current[c]=.1+Math.random()*.3,f.current[c*3]=(Math.random()-.5)*16,f.current[c*3+1]=(Math.random()-.5)*10,f.current[c*3+2]=(Math.random()-.5)*12}return Pt(c=>{if(!n.current||!m.current||!f.current)return;let d=c.clock.getElapsedTime()*e;for(let o=0;o<r;o++){let a=m.current[o],l=f.current[o*3],i=f.current[o*3+1],v=f.current[o*3+2];s.current.position.set(l+Math.sin(d*a+o)*2,i+Math.cos(d*a*.7+o*.5)*1.5,v+Math.sin(d*a*.5+o*.3)*2),s.current.scale.setScalar(.015+Math.sin(d+o)*.005),s.current.updateMatrix(),n.current.setMatrixAt(o,s.current.matrix)}n.current.instanceMatrix.needsUpdate=!0}),Ye("instancedMesh",{ref:n,args:[void 0,void 0,r],children:[re("sphereGeometry",{args:[1,6,6]}),re("meshBasicMaterial",{color:t,transparent:!0,opacity:.3,toneMapped:!1})]})}function U({theme:t,effectColor:e,effectSpeed:r=.5,visible:n}){let s=Nt(()=>{if(!e)return We[t]||We.gold;let m=e.toLowerCase().trim();return Xe[m]?Xe[m]:e},[e,t]);return n?Ye("group",{children:[re(De,{count:150,scale:10,size:4,speed:.3*r,opacity:.8,color:s,noise:.6}),re(De,{count:80,scale:16,size:2,speed:.15*r,opacity:.4,color:"#ffffff",noise:.8}),re(Ht,{color:s,speedMultiplier:r,count:50})]}):null}import{useRef as Ve}from"react";import{useFrame as At,useThree as Ft}from"@react-three/fiber";import*as q from"three";function Y({phase:t,effectSpeed:e=.5}){let{camera:r,pointer:n}=Ft(),s=Ve(null),m=Ve(t);return m.current!==t&&(m.current=t,s.current=null),At(f=>{let c=f.clock.getElapsedTime()*e;s.current===null&&(s.current=c);let d=c-s.current;if(t==="loading"){r.position.set(0,0,14),r.lookAt(0,0,0);return}if(t==="entering"){let l=Math.min(d/3,1),i=1-Math.pow(1-l,3),v=q.MathUtils.lerp(14,6,i),u=q.MathUtils.lerp(1,.2,i);r.position.set(0,u,v),r.lookAt(0,0,0);return}let o=f.viewport.width/(f.viewport.height||1),a=o<1?Math.max(6,6/Math.max(.45,o*.85)):6;if(t==="idle"){let l=Math.sin(c*.1)*.2,i=Math.cos(c*.08)*.1+.2,v=n.x*.2,u=n.y*.1;r.position.x=q.MathUtils.damp(r.position.x,l+v,3,.016),r.position.y=q.MathUtils.damp(r.position.y,i+u,3,.016),r.position.z=q.MathUtils.damp(r.position.z,a,3,.016),r.lookAt(0,0,0);return}if(t==="exiting"){let l=Math.min(d/1.5,1),i=l*l*l,v=q.MathUtils.lerp(6,-8,i);r.position.set(0,0,v),r.lookAt(0,0,0)}}),null}import{useState as Bt,useRef as It,useCallback as zt,useEffect as _t,useMemo as Ot}from"react";import{useFrame as Dt,useThree as Wt}from"@react-three/fiber";import*as _ from"three";import{jsx as me,jsxs as Ge}from"react/jsx-runtime";var $e={gold:["#FFD700","#FF8C00","#FF4500","#FFF8DC"],neon:["#00ffff","#0088ff","#ff00ff","#ffffff"],emerald:["#00ff88","#10b981","#059669","#a7f3d0"],crimson:["#ff1744","#d50000","#ff5252","#ffb74d"],obsidian:["#a855f7","#6366f1","#3b82f6","#ffffff"],glass:["#ffffff","#e0e7ff","#93c5fd","#60a5fa"]},Xt={azul:"#00e5ff",verde:"#00e676",rojo:"#ff3d00",dorado:"#ffb300",purpura:"#d500f9",magenta:"#ff007f",esmeralda:"#10b981"};function V({theme:t="gold",effectColor:e,effectSpeed:r=.5,enabled:n=!0}){let{camera:s,raycaster:m}=Wt(),[f,c]=Bt([]),d=It(0),o=Ot(()=>{if(!e)return $e[t]||$e.gold;let l=e.toLowerCase().trim(),i=Xt[l]||e;return[i,"#ffffff",i]},[e,t]),a=zt(l=>{if(!n)return;let i=0,v=0;if("touches"in l&&l.touches.length>0)i=l.touches[0].clientX,v=l.touches[0].clientY;else if("clientX"in l)i=l.clientX,v=l.clientY;else return;let u=new _.Vector2(i/window.innerWidth*2-1,-(v/window.innerHeight)*2+1);m.setFromCamera(u,s);let y=new _.Plane(new _.Vector3(0,0,1),0),p=new _.Vector3;if(m.ray.intersectPlane(y,p),!p)return;let M=35,b=[];for(let h=0;h<M;h++){let x=Math.random()*Math.PI*2,E=(1.5+Math.random()*4.5)*r,g=(Math.random()-.3)*3*r,k=new _.Vector3(Math.cos(x)*E,Math.sin(x)*E+g,(Math.random()-.5)*E*.8),P=o[Math.floor(Math.random()*o.length)];b.push({id:h,position:p.clone(),velocity:k,color:new _.Color(P),size:.08+Math.random()*.12,life:1,maxLife:(.6+Math.random()*.8)/Math.max(.2,r)})}let w={id:d.current++,origin:p.clone(),sparks:b,color:o[0],lightIntensity:4,time:0};c(h=>[...h.slice(-4),w])},[s,m,o,r,n]);return _t(()=>(window.addEventListener("pointerdown",a),()=>{window.removeEventListener("pointerdown",a)}),[a]),Dt((l,i)=>{f.length!==0&&c(v=>v.map(u=>{let y=u.time+i*r,p=Math.max(0,u.lightIntensity-i*8*r),M=u.sparks.map(b=>{let w=b.life-i*r/b.maxLife;if(w<=0)return null;let h=b.position.clone().addScaledVector(b.velocity,i*r);return b.velocity.y-=i*3.5*r,b.velocity.multiplyScalar(.96),D(N({},b),{position:h,life:w})}).filter(Boolean);return M.length===0&&p<=0?null:D(N({},u),{time:y,lightIntensity:p,sparks:M})}).filter(Boolean))}),me("group",{children:f.map(l=>Ge("group",{children:[l.lightIntensity>.05&&me("pointLight",{position:l.origin,intensity:l.lightIntensity*3,distance:6,color:l.color}),l.sparks.map(i=>Ge("mesh",{position:i.position,children:[me("sphereGeometry",{args:[i.size*i.life,6,6]}),me("meshBasicMaterial",{color:i.color,transparent:!0,opacity:i.life,toneMapped:!1})]},i.id))]},l.id))})}import{useState as Ut,useRef as Yt,useCallback as Vt,useEffect as $t,useMemo as Gt}from"react";import{useFrame as jt,useThree as Zt}from"@react-three/fiber";import*as I from"three";import{jsx as ve,jsxs as qt}from"react/jsx-runtime";var je={gold:"#FFD700",neon:"#00ffff",emerald:"#10b981",crimson:"#ff1744",obsidian:"#a855f7",glass:"#ffffff"},Ze={azul:"#00e5ff",verde:"#00e676",rojo:"#ff3d00",dorado:"#ffb300",purpura:"#d500f9",magenta:"#ff007f",esmeralda:"#10b981"};function $({theme:t="gold",effectColor:e,effectSpeed:r=.5,enabled:n=!0}){let{camera:s,raycaster:m}=Zt(),[f,c]=Ut([]),d=Yt(0),o=Gt(()=>{if(!e)return je[t]||je.gold;let l=e.toLowerCase().trim();return Ze[l]?Ze[l]:e},[e,t]),a=Vt(l=>{if(!n)return;let i=0,v=0;if("touches"in l&&l.touches.length>0)i=l.touches[0].clientX,v=l.touches[0].clientY;else if("clientX"in l)i=l.clientX,v=l.clientY;else return;let u=new I.Vector2(i/window.innerWidth*2-1,-(v/window.innerHeight)*2+1);m.setFromCamera(u,s);let y=new I.Plane(new I.Vector3(0,0,1),0),p=new I.Vector3;if(m.ray.intersectPlane(y,p),!p)return;let M={id:d.current++,origin:p.clone(),radius:.1,maxRadius:3.5,life:1,color:new I.Color(o)};c(b=>[...b.slice(-4),M])},[s,m,o,n]);return $t(()=>(window.addEventListener("pointerdown",a),()=>{window.removeEventListener("pointerdown",a)}),[a]),jt((l,i)=>{f.length!==0&&c(v=>v.map(u=>{let y=u.life-i*1.8*r;if(y<=0)return null;let p=u.radius+i*5*r;return D(N({},u),{life:y,radius:p})}).filter(Boolean))}),n?ve("group",{children:f.map(l=>qt("mesh",{position:l.origin,rotation:[0,0,0],children:[ve("ringGeometry",{args:[l.radius*.9,l.radius,48]}),ve("meshBasicMaterial",{color:l.color,transparent:!0,opacity:l.life*.75,side:I.DoubleSide,toneMapped:!1})]},l.id))}):null}import{useRef as Kt,useMemo as qe}from"react";import{useFrame as Jt,useThree as Qt}from"@react-three/fiber";import*as de from"three";import{jsx as Qe}from"react/jsx-runtime";var Ke={gold:"#ffaa00",neon:"#00ffff",emerald:"#00ffaa",crimson:"#ff0055",obsidian:"#9900ff",glass:"#88ccff"},Je={azul:"#00e5ff",verde:"#00e676",rojo:"#ff3d00",dorado:"#ffb300",purpura:"#d500f9",magenta:"#ff007f",esmeralda:"#10b981"};function G({theme:t="neon",effectColor:e,effectSpeed:r=.5,enabled:n=!0}){let{pointer:s}=Qt(),m=Kt(null),f=qe(()=>{if(!e)return Ke[t]||Ke.neon;let o=e.toLowerCase().trim();return Je[o]?Je[o]:e},[e,t]),c=30,d=qe(()=>{let o=new de.BufferGeometry,a=new Float32Array(c*2*3);return o.setAttribute("position",new de.BufferAttribute(a,3)),o},[c]);return Jt(o=>{if(!m.current||!n)return;let a=o.clock.getElapsedTime()*r,l=m.current.geometry.attributes.position,i=l.array,v=s.x*6,u=s.y*3;for(let y=0;y<c;y++){let p=y*6,M=y/c*Math.PI*2+a*1.5,b=2.5+Math.sin(a*3+y)*.5,w=Math.cos(M)*b,h=Math.sin(M)*b,x=(Math.random()-.5)*1.5,E=w+(v-w)*.3+(Math.random()-.5)*.8,g=h+(u-h)*.3+(Math.random()-.5)*.8,k=x+(Math.random()-.5)*.8;i[p]=w,i[p+1]=h,i[p+2]=x,i[p+3]=E,i[p+4]=g,i[p+5]=k}l.needsUpdate=!0}),n?Qe("lineSegments",{ref:m,geometry:d,children:Qe("lineBasicMaterial",{color:f,transparent:!0,opacity:.75,linewidth:2,toneMapped:!1})}):null}import{useRef as J,useMemo as ye,useEffect as er,useCallback as et}from"react";import{useFrame as tr,useThree as rr}from"@react-three/fiber";import*as W from"three";import{jsx as ne,jsxs as we}from"react/jsx-runtime";var tt={crimson:{color1:"#ff3d00",color2:"#ff9100",light:"#ff1744"},gold:{color1:"#ffb300",color2:"#ffe082",light:"#FFD700"},emerald:{color1:"#00e676",color2:"#a7f3d0",light:"#10b981"},neon:{color1:"#00e5ff",color2:"#80d8ff",light:"#00ffff"},obsidian:{color1:"#d500f9",color2:"#ea80fc",light:"#a855f7"},glass:{color1:"#80d8ff",color2:"#ffffff",light:"#60a5fa"}},rt={azul:"#00e5ff",verde:"#00e676",rojo:"#ff3d00",dorado:"#ffb300",purpura:"#d500f9",magenta:"#ff007f",esmeralda:"#10b981"};function nr(){let t=document.createElement("canvas");t.width=128,t.height=128;let e=t.getContext("2d");if(e){let n=e.createRadialGradient(64,64,0,64,64,64);n.addColorStop(0,"rgba(255, 255, 255, 1)"),n.addColorStop(.3,"rgba(255, 255, 255, 0.9)"),n.addColorStop(.65,"rgba(255, 255, 255, 0.35)"),n.addColorStop(1,"rgba(0, 0, 0, 0)"),e.fillStyle=n,e.fillRect(0,0,128,128)}let r=new W.CanvasTexture(t);return r.needsUpdate=!0,r}function fe({theme:t="crimson",effectColor:e,effectSpeed:r=.5,effectDensity:n=.3,mode:s="fluid",enabled:m=!0}){let{pointer:f}=rr(),c=J(null),d=J(null),o=J(null),a=J(new W.Object3D),l=J(!1),i=J([]),v=Math.max(.1,Math.min(1,n)),u=Math.round(110*v),y=ye(()=>nr(),[]),p=ye(()=>{if(!e)return(tt[t]||tt.crimson).color1;let h=e.toLowerCase().trim();return rt[h]?rt[h]:e},[e,t]),M=ye(()=>{let h=[],x=.4+Math.sqrt(v)*.55;for(let E=0;E<u;E++)h.push({x:(Math.random()-.5)*10,y:-2+Math.random()*.4,z:(Math.random()-.5)*2-.5,speedY:.8+Math.random()*1.8,speedX:(Math.random()-.5)*.5,size:(.4+Math.random()*.6)*x,phase:Math.random()*Math.PI*2,life:Math.random()});return h},[u,v]),b=et(()=>{l.current=!0},[]),w=et(()=>{l.current=!1},[]);return er(()=>(window.addEventListener("pointerdown",b),window.addEventListener("pointerup",w),()=>{window.removeEventListener("pointerdown",b),window.removeEventListener("pointerup",w)}),[b,w]),tr((h,x)=>{if(!m)return;let E=h.clock.getElapsedTime()*r;if(l.current){let g=f.x*7,k=f.y*4;i.current.length<25&&i.current.push({x:g+(Math.random()-.5)*.8,y:k+(Math.random()-.5)*.8,z:(Math.random()-.5)*1.5,life:1,size:(.5+Math.random()*.6)*Math.sqrt(v)})}i.current=i.current.map(g=>(g.life-=x*1.8*r,g.y+=x*1.2*r,g)).filter(g=>g.life>0),o.current&&(o.current.intensity=2.2+Math.sin(E*10)*.6+Math.cos(E*15)*.3,o.current.position.y=-1+Math.sin(E*3)*.2),(s==="fluid"||s==="all")&&c.current&&(M.forEach((g,k)=>{g.life+=x*g.speedY*.35*r,g.life>1&&(g.life=0,g.x=(Math.random()-.5)*10,g.y=-2+Math.random()*.4);let P=g.life,B=g.y+P*3.8,te=g.x+Math.sin(E*2.5+g.phase)*.5+g.speedX*P,Z=g.z+Math.cos(E*1.8+g.phase)*.2,O=Math.sin(P*Math.PI)*g.size*(1.2-P*.3);a.current.position.set(te,B,Z),a.current.rotation.set(0,0,Math.sin(E*1.5+k)*.2),a.current.scale.set(O,O*1.3,O),a.current.updateMatrix(),c.current.setMatrixAt(k,a.current.matrix)}),i.current.forEach((g,k)=>{let P=(u-1-k+u)%u,B=Math.sin(g.life*Math.PI)*g.size;a.current.position.set(g.x,g.y,g.z),a.current.rotation.set(0,0,Math.sin(E*3+k)*.3),a.current.scale.set(B,B*1.4,B),a.current.updateMatrix(),c.current.setMatrixAt(P,a.current.matrix)}),c.current.instanceMatrix.needsUpdate=!0),(s==="crystal"||s==="all")&&d.current&&(M.forEach((g,k)=>{let P=g.life,B=g.y+P*3.8,te=g.x+Math.sin(E*2.8+g.phase)*.5+g.speedX*P,Z=g.z+Math.cos(E*2+g.phase)*.3,O=Math.sin(P*Math.PI)*g.size*.6;a.current.position.set(te,B,Z),a.current.rotation.set(E*1.5+k,E*2,k),a.current.scale.set(O,O*2,O),a.current.updateMatrix(),d.current.setMatrixAt(k,a.current.matrix)}),d.current.instanceMatrix.needsUpdate=!0)}),m?we("group",{children:[ne("pointLight",{ref:o,position:[0,-1,1.5],color:p,intensity:2.5,distance:10}),(s==="fluid"||s==="all")&&we("instancedMesh",{ref:c,args:[void 0,void 0,u],children:[ne("planeGeometry",{args:[1.2,1.2]}),ne("meshBasicMaterial",{map:y,color:p,transparent:!0,blending:W.AdditiveBlending,depthWrite:!1,side:W.DoubleSide})]}),(s==="crystal"||s==="all")&&we("instancedMesh",{ref:d,args:[void 0,void 0,u],children:[ne("coneGeometry",{args:[.3,1.2,5]}),ne("meshBasicMaterial",{color:p,transparent:!0,opacity:.65,blending:W.AdditiveBlending,depthWrite:!1})]})]}):null}import{useRef as oe,useMemo as Me,useEffect as or,useCallback as nt}from"react";import{useFrame as ar,useThree as sr}from"@react-three/fiber";import*as j from"three";import{jsx as Ee,jsxs as at}from"react/jsx-runtime";var ot={azul:"#00e5ff",verde:"#00e676",rojo:"#ff3d00",dorado:"#ffb300",purpura:"#d500f9",magenta:"#ff007f",esmeralda:"#10b981"};function ir(){let t=document.createElement("canvas");t.width=256,t.height=256;let e=t.getContext("2d");if(e){let n=e.createRadialGradient(128,128,0,128,128,128);n.addColorStop(0,"rgba(255, 255, 255, 1)"),n.addColorStop(.2,"rgba(0, 240, 200, 0.95)"),n.addColorStop(.5,"rgba(0, 200, 140, 0.6)"),n.addColorStop(.8,"rgba(0, 150, 100, 0.2)"),n.addColorStop(1,"rgba(0, 0, 0, 0)"),e.fillStyle=n,e.fillRect(0,0,256,256)}let r=new j.CanvasTexture(t);return r.needsUpdate=!0,r}function ue({theme:t="emerald",effectColor:e="#00e676",effectSpeed:r=.5,effectDensity:n=.5,enabled:s=!0}){let{pointer:m}=sr(),f=oe(null),c=oe(null),d=oe(new j.Object3D),o=oe(!1),a=oe([]),l=Math.max(.1,Math.min(1,n)),i=Math.round(60*l),v=Me(()=>ir(),[]),u=Me(()=>{if(!e)return"#00e676";let b=e.toLowerCase().trim();return ot[b]?ot[b]:e},[e]),y=Me(()=>{let b=[],w=1+Math.sqrt(l)*.8;for(let h=0;h<i;h++)b.push({x:(Math.random()-.5)*12,y:(Math.random()-.5)*6,z:(Math.random()-.5)*3,speedY:(Math.random()-.5)*.8,speedX:(Math.random()-.5)*.8,size:(.8+Math.random()*1.2)*w,phase:Math.random()*Math.PI*2,life:Math.random()});return b},[i,l]),p=nt(()=>{o.current=!0},[]),M=nt(()=>{o.current=!1},[]);return or(()=>(window.addEventListener("pointerdown",p),window.addEventListener("pointerup",M),()=>{window.removeEventListener("pointerdown",p),window.removeEventListener("pointerup",M)}),[p,M]),ar((b,w)=>{if(!f.current||!s)return;let h=b.clock.getElapsedTime()*r;if(o.current){let x=m.x*7,E=m.y*4;a.current.length<15&&a.current.push({x:x+(Math.random()-.5)*.5,y:E+(Math.random()-.5)*.5,z:(Math.random()-.5)*1,life:1,size:(1.2+Math.random()*.8)*Math.sqrt(l)})}a.current=a.current.map(x=>(x.life-=w*1.2*r,x)).filter(x=>x.life>0),c.current&&(c.current.intensity=2.5+Math.sin(h*6)*.5),y.forEach((x,E)=>{let g=x.x+Math.sin(h*1.2+x.phase)*1.5,k=x.y+Math.cos(h*.9+x.phase*1.3)*1.2,P=x.z+Math.sin(h*.7+x.phase*.8)*.8,B=x.size*(1+Math.sin(h*2+E)*.25);d.current.position.set(g,k,P),d.current.scale.set(B,B,B),d.current.updateMatrix(),f.current.setMatrixAt(E,d.current.matrix)}),a.current.forEach((x,E)=>{let g=(i-1-E+i)%i,k=Math.sin(x.life*Math.PI)*x.size;d.current.position.set(x.x,x.y,x.z),d.current.scale.set(k,k,k),d.current.updateMatrix(),f.current.setMatrixAt(g,d.current.matrix)}),f.current.instanceMatrix.needsUpdate=!0}),s?at("group",{children:[Ee("pointLight",{ref:c,position:[0,0,2],color:u,intensity:3,distance:12}),at("instancedMesh",{ref:f,args:[void 0,void 0,i],children:[Ee("planeGeometry",{args:[1.8,1.8]}),Ee("meshBasicMaterial",{map:v,color:u,transparent:!0,opacity:.85,blending:j.NormalBlending,depthWrite:!1,side:j.DoubleSide})]})]}):null}import{useState as yr}from"react";var lr={"nav.schedule":"Schedule","nav.experiences":"Experiences","nav.membership":"Membership","nav.login":"Log In","nav.bookTickets":"Book Tickets","hero.genreImax":"IMAX 3D","hero.genreAction":"ACTION / SCI-FI","hero.title":"AVATAR: THE WAY OF WATER","hero.synopsis":"Set more than a decade after the events of the first film, learn the story of the Sully family, the trouble that follows them, the lengths they go to keep each other safe, the battles they fight to stay alive, and the tragedies they endure.","hero.getTickets":"GET TICKETS","hero.watchTrailer":"WATCH TRAILER"};function st(){return t=>lr[t]||t}import{useState as cr}from"react";import{useLocale as mr}from"next-intl";import{Globe as dr}from"lucide-react";import{jsx as fr,jsxs as ur}from"react/jsx-runtime";function Te(){let t="en";try{let s=mr();s&&(t=s)}catch(s){}let[e,r]=cr(t);return ur("button",{onClick:()=>{r(e==="en"?"es":"en")},className:"flex items-center gap-2 text-sm font-medium text-white/70 hover:text-white transition-colors uppercase tracking-wider cursor-pointer",children:[fr(dr,{className:"w-4 h-4"}),e==="en"?"ES":"EN"]})}import*as lt from"react";import{Slot as gr}from"@radix-ui/react-slot";import{cva as br}from"class-variance-authority";import{clsx as pr}from"clsx";import{twMerge as hr}from"tailwind-merge";function it(...t){return hr(pr(t))}import{jsx as vr}from"react/jsx-runtime";var xr=br("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium cursor-pointer transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Q=lt.forwardRef((f,m)=>{var c=f,{className:t,variant:e,size:r,asChild:n=!1}=c,s=ze(c,["className","variant","size","asChild"]);return vr(n?gr:"button",N({className:it(xr({variant:e,size:r,className:t})),ref:m},s))});Q.displayName="Button";import{jsx as R,jsxs as F}from"react/jsx-runtime";function pe({cinemaName:t="NOVA",webTheme:e="neon"}){let r=st(),[n,s]=yr(!1),m=e==="noir"?"bg-slate-900/40 mix-blend-color":e==="crimson"?"bg-red-900/30 mix-blend-color":"bg-blue-900/20 mix-blend-color";return F("div",{className:`min-h-screen bg-black text-white selection:bg-white/30 font-sans transition-colors duration-1000 group theme-${e}`,children:[F("nav",{className:"absolute top-0 left-0 right-0 z-50 flex items-center justify-between px-4 sm:px-8 py-4 sm:py-6 bg-black/40 sm:bg-transparent backdrop-blur-md sm:backdrop-blur-none border-b border-white/10 sm:border-none",children:[F("div",{className:"flex items-center gap-6 lg:gap-12",children:[F("a",{href:"#",className:"text-2xl sm:text-3xl font-bold tracking-tighter uppercase font-display text-white",children:[t,"."]}),F("div",{className:"hidden md:flex items-center gap-6 lg:gap-8 text-sm font-semibold tracking-widest text-white/70",children:[R("a",{href:"#schedule",className:"hover:text-white transition-colors",children:r("nav.schedule")}),R("a",{href:"#experiences",className:"hover:text-white transition-colors",children:r("nav.experiences")}),R("a",{href:"#membership",className:"hover:text-white transition-colors",children:r("nav.membership")})]})]}),F("div",{className:"flex items-center gap-3 sm:gap-6",children:[R(Te,{}),F("div",{className:"hidden sm:flex items-center gap-4",children:[R("a",{href:"#login",className:"text-sm font-semibold tracking-widest text-white/70 hover:text-white transition-colors",children:r("nav.login")}),R(Q,{variant:"outline",className:"rounded-none border-white/40 text-white bg-transparent hover:bg-white hover:text-black transition-colors font-semibold tracking-widest text-xs px-6 py-5 uppercase",children:r("nav.bookTickets")})]}),R("button",{onClick:()=>s(!n),className:"md:hidden p-2 rounded-lg bg-white/10 hover:bg-white/20 text-white text-lg focus:outline-none transition-colors cursor-pointer","aria-label":"Toggle Navigation Menu",children:n?"\u2715":"\u2630"})]})]}),n&&F("div",{className:"fixed inset-0 z-40 bg-black/95 backdrop-blur-2xl md:hidden flex flex-col justify-between p-8 pt-24 animate-fade-in",children:[F("div",{className:"flex flex-col gap-6 text-xl font-bold tracking-wider uppercase font-display",children:[R("a",{href:"#schedule",onClick:()=>s(!1),className:"py-2 border-b border-white/10 hover:text-amber-400 transition-colors",children:r("nav.schedule")}),R("a",{href:"#experiences",onClick:()=>s(!1),className:"py-2 border-b border-white/10 hover:text-amber-400 transition-colors",children:r("nav.experiences")}),R("a",{href:"#membership",onClick:()=>s(!1),className:"py-2 border-b border-white/10 hover:text-amber-400 transition-colors",children:r("nav.membership")}),R("a",{href:"#login",onClick:()=>s(!1),className:"py-2 border-b border-white/10 text-white/70 hover:text-white transition-colors",children:r("nav.login")})]}),R("div",{className:"flex flex-col gap-3 pt-6 border-t border-white/10",children:R(Q,{onClick:()=>s(!1),className:"w-full rounded-none bg-amber-400 text-black hover:bg-amber-300 font-extrabold tracking-widest text-sm py-4 uppercase",children:r("nav.bookTickets")})})]}),F("div",{className:"relative h-screen w-full flex flex-col justify-end pb-28 sm:pb-24 px-4 sm:px-8 md:px-16 overflow-hidden",children:[F("div",{className:"absolute inset-0 z-0",children:[R("div",{className:"absolute inset-0 bg-[url('https://images.unsplash.com/photo-1605810230434-7631ac76ec81?q=80&w=2560&auto=format&fit=crop')] bg-cover bg-center"}),R("div",{className:"absolute inset-0 bg-gradient-to-t from-black via-black/50 to-transparent z-10"}),R("div",{className:`absolute inset-0 ${m} z-10`})]}),F("div",{className:"relative z-20 max-w-5xl",children:[F("div",{className:"flex items-center gap-2 sm:gap-3 mb-4 sm:mb-6 flex-wrap",children:[R("span",{className:"bg-blue-600 text-white text-[9px] sm:text-[10px] font-bold px-2.5 sm:px-3 py-1 tracking-widest",children:r("hero.genreImax")}),R("span",{className:"border border-white/20 text-white/80 text-[9px] sm:text-[10px] font-bold px-2.5 sm:px-3 py-1 tracking-widest",children:r("hero.genreAction")})]}),R("h1",{className:"text-4xl sm:text-6xl md:text-7xl lg:text-[8rem] leading-[0.9] sm:leading-[0.85] font-display font-black tracking-tighter mb-4 sm:mb-6 uppercase drop-shadow-2xl",children:r("hero.title")}),R("p",{className:"max-w-2xl text-sm sm:text-lg md:text-xl text-white/70 font-medium mb-6 sm:mb-10 leading-relaxed drop-shadow-md line-clamp-3 sm:line-clamp-none",children:r("hero.synopsis")}),F("div",{className:"flex flex-col sm:flex-row items-stretch sm:items-center gap-3 sm:gap-4 w-full sm:w-auto",children:[R(Q,{className:"rounded-none bg-white text-black hover:bg-white/90 font-bold tracking-widest text-xs px-6 sm:px-8 py-5 sm:py-6 uppercase transition-transform hover:scale-105 active:scale-95 w-full sm:w-auto",children:r("hero.getTickets")}),R(Q,{variant:"outline",className:"rounded-none border-white/30 text-white bg-black/20 backdrop-blur-md hover:bg-white/10 transition-colors font-bold tracking-widest text-xs px-6 sm:px-8 py-5 sm:py-6 uppercase w-full sm:w-auto",children:r("hero.watchTrailer")})]})]})]})]})}import{jsx as T,jsxs as he}from"react/jsx-runtime";var ct="https://threejs.org/examples/fonts/helvetiker_bold.typeface.json",mt={cinema:ct,helvetiker:ct,gentilis:"https://threejs.org/examples/fonts/gentilis_bold.typeface.json",optimer:"https://threejs.org/examples/fonts/optimer_bold.typeface.json"},dt={rojo:"#3b0712",azul:"#021a38",verde:"#032117",esmeralda:"#032117",dorado:"#1c1503",negro:"#07080c",purpura:"#21032a"},ft={gold:"radial-gradient(circle at center, #1c1503 0%, #080601 60%, #020201 100%)",neon:"radial-gradient(circle at center, #021a1e 0%, #030d14 60%, #010408 100%)",emerald:"radial-gradient(circle at center, #032117 0%, #02120d 60%, #010705 100%)",crimson:"radial-gradient(circle at center, #240409 0%, #120205 60%, #060102 100%)",obsidian:"radial-gradient(circle at center, #120d24 0%, #080512 60%, #030206 100%)",glass:"radial-gradient(circle at center, #0f172a 0%, #070b14 60%, #020205 100%)"};function Lr(t,e=.85){let n=-(t.length*e)/2+e/2;return t.split("").map((s,m)=>[n+m*e,0,0])}function Nr(t){let e=[];t?Array.isArray(t)?e=t.map(a=>String(a).toLowerCase().trim()):typeof t=="string"&&(e=t.toLowerCase().split(",").map(a=>a.trim())):e=["flames"];let r=e.includes("all")||e.includes("todos")||e.includes("supernova")||e.includes("inferno"),n=r||e.includes("flames")||e.includes("fluid-flames")||e.includes("llamas")||e.includes("llamas-organicas"),s=r||e.includes("fire")||e.includes("crystal-flames")||e.includes("cristales")||e.includes("fuego"),m=r||e.includes("blobs")||e.includes("energy-blobs")||e.includes("plasma-blobs")||e.includes("nubes"),f=r||e.includes("sparks")||e.includes("chispas"),c=r||e.includes("shockwave")||e.includes("wave")||e.includes("onda")||e.includes("onda-3d"),d=r||e.includes("plasma")||e.includes("electric"),o=r||e.includes("embers")||e.includes("ascuas")||n||s||m;return{enableFluidFlames:n,enableCrystalFlames:s,enableBlobs:m,enableSparks:f,enableShockwave:c,enablePlasma:d,enableEmbers:o}}function Ce({containerToDisplay:t,containerSelector:e,effect:r="flames",title:n,backgroundColor:s,effectColor:m,effectSpeed:f=.5,effectDensity:c=.3,autoFitText:d=!0,loaderDuration:o,redirectUrl:a,onComplete:l,fontFamily:i="cinema",fontUrl:v,theme:u="crimson",letterSpacing:y=.85,className:p="",style:M,children:b}){let w=n!=null?n.trim().toUpperCase():"",h=w?w.split(""):[],x=ae(()=>Lr(w,y),[w,y]),[E,g]=ke(!1);Re(()=>{g(!0)},[]);let k=!!(o&&o>0&&(a||l)),[P,B]=ke(0);Re(()=>{if(!k||!o)return;let L=o*1e3,H=50,xe=0,Ae=setInterval(()=>{xe+=H;let wt=Math.min(100,xe/L*100);B(wt),xe>=L&&(clearInterval(Ae),l==null||l(),a&&(window.location.href=a))},H);return()=>clearInterval(Ae)},[k,o,a,l]);let te=ae(()=>{if(v)return v;let L=String(i).toLowerCase().trim();return mt[L]||mt.cinema},[i,v]),[Z,O]=ke(typeof window!="undefined"?window.innerWidth:1200);Re(()=>{let L=()=>O(window.innerWidth);return window.addEventListener("resize",L),()=>window.removeEventListener("resize",L)},[]);let xt=ae(()=>{if(!d||!h.length)return 1;let L=h.length,H=1;return L<=4?H=1:L<=7?H=.85:L<=10?H=.7:L<=14?H=.55:H=.45,Z<480?H*.55:Z<768?H*.75:H},[d,h.length,Z]),Pe=ae(()=>{if(!s)return ft[u]||ft.gold;let L=s.toLowerCase().trim();return dt[L]?dt[L]:(s.startsWith("#")||s.startsWith("rgb")||s.includes("gradient"),s)},[s,u]),z=ae(()=>Nr(r),[r]),vt=z.enableFluidFlames&&z.enableCrystalFlames?"all":z.enableCrystalFlames?"crystal":"fluid",yt=z.enableFluidFlames||z.enableCrystalFlames,He=e||(typeof t=="string"?t:void 0),ie=()=>He==="lhome"||He==="home"||t==="lhome"||t==="home"?T(pe,{cinemaName:w||"NOVA",webTheme:u}):typeof t=="string"&&t!=="lhome"&&t!=="home"?he("div",{className:"text-center text-white p-8 bg-black/40 backdrop-blur-md rounded-2xl border border-white/10",children:[T("h2",{className:"text-3xl font-bold tracking-widest uppercase mb-2",children:t}),T("p",{className:"text-sm text-white/60",children:"3D Interactive WebGL Background"})]}):t&&typeof t!="string"?t:b;return E?he("div",{id:e,"data-container-selector":e,className:`relative w-full h-full overflow-hidden select-none ${p}`,style:N({background:Pe},M),children:[k&&T("div",{className:"absolute top-0 left-0 right-0 z-30 h-1 bg-white/10 pointer-events-none",children:T("div",{className:"h-full bg-gradient-to-r from-amber-400 via-rose-500 to-cyan-400 transition-all duration-75",style:{width:`${P}%`}})}),T("div",{className:"absolute inset-0 z-0 pointer-events-auto",children:T(Mr,{camera:{position:[0,0,14],fov:45,near:.1,far:50},dpr:[1,2],gl:{antialias:!0,toneMapping:4,toneMappingExposure:1.2},children:he(wr,{fallback:null,children:[T(Er,{preset:"studio"}),T("ambientLight",{intensity:.3}),T("directionalLight",{position:[5,8,5],intensity:1.5,color:"#ffffff"}),T("pointLight",{position:[-5,-3,-5],intensity:.6,color:u==="emerald"?"#10b981":u==="crimson"?"#ff1744":u==="neon"?"#00ffff":"#FFD700"}),T(Y,{phase:k?"entering":"idle",effectSpeed:f}),T(fe,{enabled:yt,theme:u,effectColor:m,effectSpeed:f,effectDensity:c,mode:vt}),T(ue,{enabled:z.enableBlobs,theme:u,effectColor:m,effectSpeed:f,effectDensity:c}),T(V,{enabled:z.enableSparks,theme:u,effectColor:m,effectSpeed:f}),T($,{enabled:z.enableShockwave,theme:u,effectColor:m,effectSpeed:f}),T(G,{enabled:z.enablePlasma,theme:u,effectColor:m,effectSpeed:f}),h.length>0&&T(Tr,{disableY:!0,disableZ:!0,children:T("group",{scale:xt,children:h.map((L,H)=>T(X,{char:L,index:H,totalLetters:h.length,position:x[H],phase:k?"entering":"idle",theme:u,fontUrl:te},`${L}-${H}`))})}),T(U,{theme:u,effectColor:m,effectSpeed:f,visible:z.enableEmbers}),he(kr,{children:[T(Rr,{luminanceThreshold:.7,luminanceSmoothing:.9,intensity:u==="neon"||u==="crimson"?1.4:.9,mipmapBlur:!0}),T(Cr,{offset:.3,darkness:.85}),T(Sr,{opacity:.025})]})]})})}),ie()&&T("div",{className:"relative z-10 w-full h-full pointer-events-none flex flex-col items-center justify-center",children:T("div",{className:"pointer-events-auto w-full h-full",children:ie()})})]}):T("div",{id:e,"data-container-selector":e,className:`relative w-full h-full overflow-hidden select-none bg-black ${p}`,style:N({background:Pe},M),children:ie()&&T("div",{className:"relative z-10 w-full h-full pointer-events-none flex flex-col items-center justify-center",children:T("div",{className:"pointer-events-auto w-full h-full",children:ie()})})})}import{Suspense as Pr,useMemo as Hr,useState as Se,useEffect as Ar}from"react";import{Canvas as Fr}from"@react-three/fiber";import{Environment as Br,Center as Ir}from"@react-three/drei";import{EffectComposer as zr,Bloom as _r,Vignette as Or,Noise as Dr}from"@react-three/postprocessing";import{jsx as S,jsxs as Le}from"react/jsx-runtime";var ut={gold:"radial-gradient(circle at center, #1c1503 0%, #080601 60%, #020201 100%)",neon:"radial-gradient(circle at center, #021a1e 0%, #030d14 60%, #010408 100%)",emerald:"radial-gradient(circle at center, #032117 0%, #02120d 60%, #010705 100%)",crimson:"radial-gradient(circle at center, #240409 0%, #120205 60%, #060102 100%)",obsidian:"radial-gradient(circle at center, #120d24 0%, #080512 60%, #030206 100%)",glass:"radial-gradient(circle at center, #0f172a 0%, #070b14 60%, #020205 100%)"},Wr="https://threejs.org/examples/fonts/helvetiker_bold.typeface.json";function Xr(t){let n=-(t.length*.65)/2;return t.split("").map((s,m)=>[n+m*.65,0,0])}function ge({text:t="CINEMA",theme:e="emerald",customBackground:r,interactiveSparks:n=!0,interactiveShockwave:s=!0,interactivePlasma:m=!0,showParticles:f=!0,enableBloom:c=!0,className:d="",style:o,children:a}){let[l,i]=Se(!1),[v]=Se(t),[u]=Se(e);Ar(()=>{i(!0)},[]);let y=(v||t||"CINEMA").toUpperCase(),p=y.split(""),M=Hr(()=>Xr(y),[y]),b=u||e||"emerald",w=r||ut[b]||ut.emerald;return l?Le("div",{className:`relative w-full h-full min-h-[350px] overflow-hidden select-none ${d}`,style:N({background:w},o),children:[S("div",{className:"absolute inset-0 z-0 pointer-events-auto",children:S(Fr,{camera:{position:[0,0,14],fov:45,near:.1,far:50},dpr:[1,2],gl:{antialias:!0,toneMapping:4,toneMappingExposure:1.2},children:Le(Pr,{fallback:null,children:[S(Br,{preset:"studio"}),S("ambientLight",{intensity:.3}),S("directionalLight",{position:[5,8,5],intensity:1.5,color:"#ffffff"}),S("pointLight",{position:[-5,-3,-5],intensity:.6,color:b==="emerald"?"#10b981":b==="crimson"?"#ff1744":b==="neon"?"#00ffff":"#FFD700"}),S(Y,{phase:"idle"}),S(V,{enabled:n,theme:b}),S($,{enabled:s,theme:b}),S(G,{enabled:m,theme:b}),S(Ir,{disableY:!0,disableZ:!0,children:S("group",{children:p.map((h,x)=>S(X,{char:h,index:x,totalLetters:p.length,position:M[x],phase:"idle",theme:b,fontUrl:Wr},`${h}-${x}`))})}),f&&S(U,{theme:b,visible:!0}),Le(zr,{children:[S(_r,{luminanceThreshold:.7,luminanceSmoothing:.9,intensity:c?.9:0,mipmapBlur:!0}),S(Or,{offset:.3,darkness:.85}),S(Dr,{opacity:.025})]})]})})}),a&&S("div",{className:"relative z-10 w-full h-full pointer-events-none flex flex-col items-center justify-center",children:a})]}):S("div",{className:`relative w-full h-full min-h-[350px] overflow-hidden select-none bg-black ${d}`,style:N({background:w},o),children:a&&S("div",{className:"relative z-10 w-full h-full pointer-events-none flex flex-col items-center justify-center",children:a})})}import{jsx as pt}from"react/jsx-runtime";function Ur(t,e={}){let r=n=>pt(ge,D(N({},e),{children:pt(t,N({},n))}));return r.displayName=`WithCinema3D(${t.displayName||t.name||"Component"})`,r}import{Suspense as Vr,useState as se,useEffect as ht,useCallback as $r,useMemo as Gr}from"react";import{Canvas as jr}from"@react-three/fiber";import{Environment as Zr,Center as qr}from"@react-three/drei";import{EffectComposer as Kr,Bloom as Jr,Vignette as Qr,Noise as en}from"@react-three/postprocessing";import{jsx as A,jsxs as ee}from"react/jsx-runtime";var Yr=[{key:"gold",label:"Gold",color:"#FFD700"},{key:"neon",label:"Neon",color:"#00ffff"},{key:"emerald",label:"Emerald",color:"#10b981"},{key:"crimson",label:"Crimson",color:"#ff1744"},{key:"obsidian",label:"Obsidian",color:"#a855f7"},{key:"glass",label:"Glass",color:"#ffffff"}];function be({phase:t,cinemaName:e,theme:r,effects:n,onTitleChange:s,onThemeChange:m,onToggleEffect:f}){return ee("div",{className:"absolute inset-0 pointer-events-none z-10 flex flex-col items-center justify-between p-6 md:p-10",style:{opacity:t==="exiting"?0:1,transition:"opacity 0.8s ease-out"},children:[ee("div",{className:"w-full max-w-xl flex flex-col items-center gap-2 pointer-events-auto",style:{opacity:t==="idle"||t==="entering"?1:0,transform:t==="idle"||t==="entering"?"translateY(0)":"translateY(-20px)",transition:"all 1s ease-out 0.3s"},children:[A("label",{className:"text-[10px] tracking-[0.3em] uppercase text-white/50 font-bold",children:"Live 3D Title Control"}),A("div",{className:"relative w-full",children:A("input",{type:"text",value:e,onChange:o=>s(o.target.value),maxLength:18,placeholder:"Type any title...",className:"w-full px-6 py-3 rounded-full text-center text-sm md:text-base font-bold tracking-widest uppercase outline-none transition-all duration-300",style:{background:"rgba(255, 255, 255, 0.08)",backdropFilter:"blur(16px)",border:"1px solid rgba(255, 255, 255, 0.2)",color:"#ffffff",boxShadow:"0 8px 32px rgba(0, 0, 0, 0.37)"}})})]}),t==="loading"&&A("div",{className:"absolute inset-0 flex items-center justify-center",children:A("div",{className:"w-16 h-16 rounded-full border-2 animate-spin",style:{borderColor:"transparent",borderTopColor:"rgba(255, 215, 0, 0.8)",borderRightColor:"rgba(255, 215, 0, 0.3)"}})}),ee("div",{className:"w-full max-w-3xl flex flex-col items-center gap-5",children:[ee("div",{className:"flex flex-wrap items-center justify-center gap-2 pointer-events-auto",style:{opacity:t==="idle"||t==="entering"?1:0,transition:"opacity 1s ease-out 0.8s"},children:[A("span",{className:"text-[9px] uppercase tracking-[0.25em] text-white/40 mr-2 font-bold",children:"Effects"}),A("button",{onClick:()=>f("sparks"),className:`px-4 py-1.5 rounded-full text-[11px] font-bold tracking-wider uppercase transition-all duration-300 cursor-pointer ${n.sparks?"bg-amber-500/30 text-amber-200 border-amber-400/60 shadow-[0_0_15px_rgba(245,158,11,0.4)]":"bg-white/5 text-white/40 border-white/10 hover:text-white/70"} border`,children:"\u{1F525} Sparks"}),A("button",{onClick:()=>f("shockwave"),className:`px-4 py-1.5 rounded-full text-[11px] font-bold tracking-wider uppercase transition-all duration-300 cursor-pointer ${n.shockwave?"bg-cyan-500/30 text-cyan-200 border-cyan-400/60 shadow-[0_0_15px_rgba(6,182,212,0.4)]":"bg-white/5 text-white/40 border-white/10 hover:text-white/70"} border`,children:"\u{1F30A} Wave"}),A("button",{onClick:()=>f("plasma"),className:`px-4 py-1.5 rounded-full text-[11px] font-bold tracking-wider uppercase transition-all duration-300 cursor-pointer ${n.plasma?"bg-purple-500/30 text-purple-200 border-purple-400/60 shadow-[0_0_15px_rgba(168,85,247,0.4)]":"bg-white/5 text-white/40 border-white/10 hover:text-white/70"} border`,children:"\u26A1 Plasma"}),A("button",{onClick:()=>f("embers"),className:`px-4 py-1.5 rounded-full text-[11px] font-bold tracking-wider uppercase transition-all duration-300 cursor-pointer ${n.embers?"bg-emerald-500/30 text-emerald-200 border-emerald-400/60 shadow-[0_0_15px_rgba(16,185,129,0.4)]":"bg-white/5 text-white/40 border-white/10 hover:text-white/70"} border`,children:"\u2728 Embers"})]}),ee("div",{className:"flex items-center gap-3 pointer-events-auto",style:{opacity:t==="idle"||t==="entering"?1:0,transition:"opacity 1s ease-out 1.2s"},children:[A("span",{className:"text-[10px] uppercase tracking-[0.3em] text-white/40 mr-2 font-bold",children:"Theme"}),A("div",{className:"flex items-center gap-2 md:gap-3",children:Yr.map(o=>{let a=r===o.key;return ee("button",{onClick:()=>m(o.key),className:"group relative flex flex-col items-center gap-1.5 cursor-pointer outline-none","aria-label":`Switch to ${o.label} theme`,children:[A("div",{className:"relative w-11 h-7 md:w-14 md:h-9 rounded-md overflow-hidden transition-all duration-300",style:{border:a?`2px solid ${o.color}`:"1px solid rgba(255, 255, 255, 0.15)",transform:a?"scale(1.1) translateY(-2px)":"scale(1) translateY(0)",boxShadow:a?`0 4px 20px ${o.color}60`:"0 2px 10px rgba(0,0,0,0.5)"},children:A("div",{className:"absolute inset-0 opacity-80",style:{backgroundColor:o.color}})}),A("span",{className:"text-[9px] uppercase tracking-widest font-semibold transition-colors duration-300",style:{color:a?"#ffffff":"rgba(255, 255, 255, 0.4)"},children:o.label})]},o.key)})})]})]})]})}import{jsx as C,jsxs as Ne}from"react/jsx-runtime";var tn="https://threejs.org/examples/fonts/helvetiker_bold.typeface.json",gt={gold:"radial-gradient(circle at center, #1c1503 0%, #080601 60%, #020201 100%)",neon:"radial-gradient(circle at center, #021a1e 0%, #030d14 60%, #010408 100%)",emerald:"radial-gradient(circle at center, #032117 0%, #02120d 60%, #010705 100%)",crimson:"radial-gradient(circle at center, #240409 0%, #120205 60%, #060102 100%)",obsidian:"radial-gradient(circle at center, #120d24 0%, #080512 60%, #030206 100%)",glass:"radial-gradient(circle at center, #0f172a 0%, #070b14 60%, #020205 100%)"};function rn(t){let n=-(t.length*.65)/2;return t.split("").map((s,m)=>[n+m*.65,0,0])}function bt({cinemaName:t="CINEMULTIPLEX",defaultTheme:e="emerald",customBackground:r,onEnterCinema:n}){let[s,m]=se(!1),[f,c]=se("loading"),[d,o]=se(e),[a,l]=se(t),[i,v]=se({sparks:!0,shockwave:!0,plasma:!0,embers:!0});ht(()=>{m(!0)},[]);let u=(a||"CINEMA").toUpperCase(),y=u.split(""),p=Gr(()=>rn(u),[u]);ht(()=>{let w=setTimeout(()=>c("entering"),800),h=y.length*120+1500,x=setTimeout(()=>c("idle"),800+h);return()=>{clearTimeout(w),clearTimeout(x)}},[y.length]);let M=$r(w=>{v(h=>D(N({},h),{[w]:!h[w]}))},[]),b=r||gt[d]||gt.emerald;return s?Ne("div",{className:"fixed inset-0 w-screen h-screen transition-all duration-1000 select-none overflow-hidden",style:{background:b},children:[C(jr,{camera:{position:[0,0,14],fov:45,near:.1,far:50},dpr:[1,2],gl:{antialias:!0,toneMapping:4,toneMappingExposure:1.2},children:Ne(Vr,{fallback:null,children:[C(Zr,{preset:"studio"}),C("ambientLight",{intensity:.3}),C("directionalLight",{position:[5,8,5],intensity:1.5,color:"#ffffff"}),C("pointLight",{position:[-5,-3,-5],intensity:.6,color:d==="emerald"?"#10b981":d==="crimson"?"#ff1744":d==="neon"?"#00ffff":"#FFD700"}),C("spotLight",{position:[0,10,0],angle:.4,penumbra:.8,intensity:.9,color:"#ffffff"}),C("pointLight",{position:[0,0,-5],intensity:.4,color:"#ffffff"}),C(Y,{phase:f}),i.sparks&&C(V,{theme:d}),C($,{theme:d,enabled:i.shockwave}),C(G,{theme:d,enabled:i.plasma}),C(qr,{disableY:!0,disableZ:!0,children:C("group",{children:y.map((w,h)=>C(X,{char:w,index:h,totalLetters:y.length,position:p[h],phase:f,theme:d,fontUrl:tn},`${w}-${h}`))})}),C(U,{theme:d,visible:f!=="loading"&&i.embers}),Ne(Kr,{children:[C(Jr,{luminanceThreshold:.7,luminanceSmoothing:.9,intensity:d==="neon"||d==="emerald"||d==="crimson"?1.4:.7,mipmapBlur:!0}),C(Qr,{offset:.3,darkness:.85}),C(en,{opacity:.025})]})]})}),C(be,{phase:f,cinemaName:a,theme:d,effects:i,onTitleChange:l,onThemeChange:o,onToggleEffect:M})]}):C("div",{className:"fixed inset-0 w-screen h-screen transition-all duration-1000 select-none overflow-hidden bg-black flex items-center justify-center",style:{background:b},children:C("div",{className:"w-16 h-16 rounded-full border-2 animate-spin border-t-amber-400 border-r-amber-400/30 border-b-transparent border-l-transparent"})})}export{Ce as AnimatedBackground,X as AnimatedLetter,Y as CameraRig,ge as CinemaBackground,pe as CinemaHome,bt as CinemaLoader,V as ClickFireSparks,$ as ClickShockwave,G as ElectricPlasma,fe as FireFlames,be as LoaderOverlay,ue as PlasmaBlobs,U as SceneParticles,Ce as default,Ur as withCinema3D};
3
4
  //# sourceMappingURL=index.mjs.map