@devstgo/stgo-salta-components-react 0.1.7 → 0.1.8
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.
|
@@ -516,4 +516,4 @@ React keys must be passed directly to JSX without using spread:
|
|
|
516
516
|
bottom: 0;
|
|
517
517
|
z-index: 999999;
|
|
518
518
|
}
|
|
519
|
-
`})]})})}const bu="app-font-size",bb="100",yb=()=>{const[e,t]=Se.useSearchParams(),n=e.get("size"),s=localStorage.getItem(bu);let i=bb;return n&&!isNaN(parseInt(n))?i=n:s&&!isNaN(parseInt(s))&&(i=s),b.useEffect(()=>{document.documentElement.style.fontSize=`${i}%`,n&&localStorage.setItem(bu,n)},[i,n,e,t]),null},yu=b.createContext(void 0),xb=({children:e})=>{const[t,n]=b.useState(!1),s=()=>n(i=>!i);return a.jsx(yu.Provider,{value:{isAutoMode:t,setIsAutoMode:n,toggleAutoMode:s},children:e})},lo=()=>{const e=b.useContext(yu);if(!e)throw new Error("useShowcase debe usarse dentro de un ShowcaseProvider");return e};function co(){const[e,t]=b.useState("physical"),[n,s]=b.useState(!1),[i,r]=b.useState(!1),[o,l]=b.useState("Navantia Global"),[c,u]=b.useState("high"),[d,f]=b.useState("es"),[h,m]=b.useState(!0),p=xe().controlPanelLevels,y=["physical","hybrid","digital"],v=["high","medium","low"],{t:x,i18n:C}=jt.useTranslation(),N=Se.useNavigate(),I=Se.useLocation(),{sendMessage:A}=Ut(),k=xe().wsRoom,{isAutoMode:E,toggleAutoMode:w}=lo();b.useEffect(()=>{C.changeLanguage(d)},[d]),b.useEffect(()=>{if(console.log("Location en control-panel: "+I.pathname),I.pathname!=="/"){const P=p.filter(_=>_.slug.length>1).find(_=>I.pathname.startsWith(_.slug));P&&(console.log("Se va a seleccionar "+P.title),l(P.title))}},[I]),b.useEffect(()=>{A({type:"publish",room:k,payload:{type:"layer",target:e}})},[e]);const j=()=>{t(P=>{const M=(y.indexOf(P)+1)%y.length;return y[M]})},$=()=>{f(P=>P==="es"?"en":"es")},z=()=>{w()},Q=()=>{switch(e){case"physical":return F.Box;case"hybrid":return F.GitMerge;case"digital":return F.Cpu;default:return F.Layers}},R=P=>{switch(P){case"low":return F.Zap;case"medium":return F.Scale;case"high":return F.Flame;default:return F.Gauge}},se=P=>{switch(P){case"Navantia Global":return F.Globe;case"Smart Catalogue":return F.BookOpen;case"Coex":return F.Network;case"Plataformas Navales":return F.Ship;case"Desarrollos tecnológicos":return F.Zap;default:return F.Layers}},U=()=>{switch(e){case"physical":return{bg:"bg-slate-700/90 hover:bg-slate-600/90",text:"text-blue-200",border:"border-slate-400/30 hover:border-slate-400/60",shadow:"shadow-lg hover:shadow-slate-500/50",badgeBg:"bg-slate-600/20",badgeText:"text-blue-200",badgeBorder:"border-slate-400/30"};case"hybrid":return{bg:"bg-teal-900/90 hover:bg-teal-800/90",text:"text-teal-300",border:"border-teal-400/30 hover:border-teal-400/60",shadow:"shadow-lg hover:shadow-teal-500/50",badgeBg:"bg-teal-500/20",badgeText:"text-teal-300",badgeBorder:"border-teal-400/30"};case"digital":return{bg:"bg-sky-900/90 hover:bg-sky-800/90",text:"text-sky-300",border:"border-sky-400/30 hover:border-sky-400/60",shadow:"shadow-lg hover:shadow-sky-500/50",badgeBg:"bg-sky-500/20",badgeText:"text-sky-300",badgeBorder:"border-sky-400/30"};default:return{bg:"bg-slate-800/90 hover:bg-slate-700/90",text:"text-cyan-300",border:"border-cyan-400/30 hover:border-cyan-400/60",shadow:"shadow-lg hover:shadow-cyan-500/50",badgeBg:"bg-cyan-500/20",badgeText:"text-cyan-300",badgeBorder:"border-cyan-400/30"}}},J=Q(),V=U();return a.jsxs(a.Fragment,{children:[a.jsxs(S.div,{className:"fixed bottom-8 left-8 z-40",initial:{opacity:0,y:50},animate:{opacity:h?0:1,y:0,x:h?-400:0,pointerEvents:h?"none":"auto"},transition:{delay:h?0:.3,duration:.6,ease:[.34,1.56,.64,1]},children:[a.jsx(Ce,{children:i&&a.jsx(S.div,{className:"absolute bottom-full left-0 mb-3 w-80",initial:{opacity:0,y:20,scale:.9},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:20,scale:.9},transition:{duration:.4,ease:[.34,1.56,.64,1]},children:a.jsxs("div",{className:"relative",children:[a.jsx(S.div,{className:"absolute inset-0 bg-gradient-to-t from-red-500/20 via-amber-500/10 to-transparent rounded-3xl blur-xl",animate:{opacity:[.5,.8,.5],scale:[1,1.05,1]},transition:{duration:3,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}}),a.jsxs("div",{className:"relative bg-gradient-to-b from-slate-900/98 via-slate-800/95 to-slate-900/98 backdrop-blur-xl rounded-3xl border border-red-400/40 shadow-2xl overflow-hidden",children:[a.jsx("div",{className:"px-6 py-4 border-b border-red-400/20 bg-gradient-to-r from-red-500/10 to-amber-500/10",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("h3",{className:"text-red-300 font-semibold text-sm tracking-wider",children:"MODO DE RENDERIZADO"}),a.jsx(S.div,{className:"w-2 h-2 rounded-full bg-red-400",animate:{boxShadow:["0 0 10px rgba(248, 113, 113, 0.5)","0 0 20px rgba(248, 113, 113, 1)","0 0 10px rgba(248, 113, 113, 0.5)"]},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}})]})}),a.jsx("div",{className:"p-4 space-y-3",children:v.map((P,_)=>{const M=c===P,T=R(P),O=(()=>{switch(P){case"low":return{bg:M?"bg-gradient-to-r from-green-500/30 via-emerald-500/30 to-green-500/30":"bg-slate-800/60",border:M?"border-2 border-green-400":"border border-green-400/20 hover:border-green-400/50",shadow:M?"shadow-lg shadow-green-500/50":"",iconBg:M?"bg-green-500":"bg-slate-700/80 group-hover:bg-slate-700",iconText:M?"text-slate-900":"text-green-300 group-hover:text-green-200",text:M?"text-white":"text-green-200 group-hover:text-green-100",indicator:"bg-green-400",glowColor:"rgba(34, 197, 94, 0.5)"};case"medium":return{bg:M?"bg-gradient-to-r from-amber-500/30 via-yellow-500/30 to-amber-500/30":"bg-slate-800/60",border:M?"border-2 border-amber-400":"border border-amber-400/20 hover:border-amber-400/50",shadow:M?"shadow-lg shadow-amber-500/50":"",iconBg:M?"bg-amber-500":"bg-slate-700/80 group-hover:bg-slate-700",iconText:M?"text-slate-900":"text-amber-300 group-hover:text-amber-200",text:M?"text-white":"text-amber-200 group-hover:text-amber-100",indicator:"bg-amber-400",glowColor:"rgba(251, 191, 36, 0.5)"};case"high":return{bg:M?"bg-gradient-to-r from-red-500/30 via-orange-500/30 to-red-500/30":"bg-slate-800/60",border:M?"border-2 border-red-400":"border border-red-400/20 hover:border-red-400/50",shadow:M?"shadow-lg shadow-red-500/50":"",iconBg:M?"bg-red-500":"bg-slate-700/80 group-hover:bg-slate-700",iconText:M?"text-slate-900":"text-red-300 group-hover:text-red-200",text:M?"text-white":"text-red-200 group-hover:text-red-100",indicator:"bg-red-400",glowColor:"rgba(239, 68, 68, 0.5)"}}})();return a.jsx(S.button,{onClick:()=>{u(P),r(!1)},className:`w-full text-left relative group ${M?"z-10":"z-0"}`,initial:{opacity:0,x:-50,rotateY:-20},animate:{opacity:1,x:0,rotateY:0},transition:{delay:_*.08,duration:.5,ease:[.34,1.56,.64,1]},whileHover:{scale:1.02,x:8},whileTap:{scale:.98},children:a.jsxs("div",{className:`relative rounded-2xl transition-all duration-500 ${O.bg} ${O.border} ${O.shadow} hover:bg-slate-800/80`,children:[M&&a.jsx(S.div,{className:"absolute inset-0 rounded-2xl",style:{background:`radial-gradient(circle at center, ${O.glowColor} 0%, transparent 70%)`},animate:{opacity:[.3,.6,.3]},transition:{duration:3,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}}),a.jsxs("div",{className:"relative flex items-center gap-4 px-4 py-3",children:[a.jsxs(S.div,{className:`flex-shrink-0 w-10 h-10 rounded-xl flex items-center justify-center font-bold text-lg relative ${O.iconBg} ${O.iconText}`,animate:M?{boxShadow:[`0 0 15px ${O.glowColor}`,`0 0 25px ${O.glowColor}`,`0 0 15px ${O.glowColor}`]}:{},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"},children:[a.jsx(T,{className:"w-5 h-5"}),M&&a.jsxs(a.Fragment,{children:[a.jsx(S.div,{className:"absolute inset-0 border-2 rounded-xl opacity-50",style:{borderColor:O.glowColor},animate:{scale:[1,1.3,1],opacity:[.5,0,.5]},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeOut"}}),a.jsx(S.div,{className:"absolute inset-0 border-2 rounded-xl opacity-50",style:{borderColor:O.glowColor},animate:{scale:[1,1.5,1],opacity:[.5,0,.5]},transition:{duration:2,delay:.5,repeat:Number.POSITIVE_INFINITY,ease:"easeOut"}})]})]}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx(S.p,{className:`font-semibold text-sm transition-colors duration-300 ${O.text}`,animate:M?{textShadow:[`0 0 10px ${O.glowColor}`,`0 0 20px ${O.glowColor}`,`0 0 10px ${O.glowColor}`]}:{},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"},children:P}),M&&a.jsx(S.div,{className:"mt-1.5 h-1 bg-slate-700/50 rounded-full overflow-hidden",initial:{width:0},animate:{width:"100%"},transition:{duration:.5,delay:.2},children:a.jsx(S.div,{className:`h-full ${O.indicator}`,initial:{x:"-100%"},animate:{x:"0%"},transition:{duration:.8,delay:.3,ease:"easeOut"}})})]}),a.jsx(S.div,{className:`flex-shrink-0 w-3 h-3 rounded-full ${M?O.indicator:"bg-slate-600 group-hover:bg-slate-500"}`,animate:M?{scale:[1,1.3,1],boxShadow:[`0 0 10px ${O.glowColor}`,`0 0 20px ${O.glowColor}`,`0 0 10px ${O.glowColor}`]}:{},transition:{duration:1.5,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}})]}),a.jsx(S.div,{className:"absolute inset-0 rounded-2xl opacity-0 group-hover:opacity-100 transition-opacity duration-300",style:{background:`radial-gradient(circle at center, ${O.glowColor} 0%, transparent 70%)`}})]})},P)})}),a.jsx(S.div,{className:"px-6 py-3 border-t border-red-400/20 bg-gradient-to-r from-slate-900/50 to-slate-800/50",initial:{opacity:0},animate:{opacity:1},transition:{delay:.4},children:a.jsxs("p",{className:"text-xs text-red-300/80 text-center",children:[v.length," modos disponibles"]})})]})]})})}),a.jsx(Ce,{children:n&&a.jsx(S.div,{className:"absolute bottom-full left-0 mb-3 w-80",initial:{opacity:0,y:20,scale:.9},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:20,scale:.9},transition:{duration:.4,ease:[.34,1.56,.64,1]},children:a.jsxs("div",{className:"relative",children:[a.jsx(S.div,{className:"absolute inset-0 bg-gradient-to-t from-cyan-500/20 via-teal-500/10 to-transparent rounded-3xl blur-xl",animate:{opacity:[.5,.8,.5],scale:[1,1.05,1]},transition:{duration:3,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}}),a.jsxs("div",{className:"relative bg-gradient-to-b from-slate-900/98 via-slate-800/95 to-slate-900/98 backdrop-blur-xl rounded-3xl border border-cyan-400/40 shadow-2xl overflow-hidden",children:[a.jsx("div",{className:"px-6 py-4 border-b border-cyan-400/20 bg-gradient-to-r from-cyan-500/10 to-teal-500/10",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("h3",{className:"text-cyan-300 font-semibold text-sm tracking-wider",children:"SELECCIONAR NIVEL"}),a.jsx(S.div,{className:"w-2 h-2 rounded-full bg-cyan-400",animate:{boxShadow:["0 0 10px rgba(34, 211, 238, 0.5)","0 0 20px rgba(34, 211, 238, 1)","0 0 10px rgba(34, 211, 238, 0.5)"]},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}})]})}),a.jsxs("div",{className:"p-4 space-y-3 relative",children:[a.jsx(S.div,{className:"absolute left-10 top-8 bottom-8 w-0.5 bg-gradient-to-b from-cyan-500/50 via-teal-500/50 to-cyan-500/50",initial:{scaleY:0},animate:{scaleY:1},transition:{duration:.8,ease:"easeOut"}}),p.map((P,_)=>{const M=o===P.title,T=se(P.title);return a.jsx(S.button,{onClick:()=>{N(P.slug),l(P.title),s(!1)},className:`w-full text-left relative group ${M?"z-10":"z-0"}`,initial:{opacity:0,x:-50,rotateY:-20},animate:{opacity:1,x:0,rotateY:0},transition:{delay:_*.08,duration:.5,ease:[.34,1.56,.64,1]},whileHover:{scale:1.02,x:8},whileTap:{scale:.98},children:a.jsxs("div",{className:`relative rounded-2xl transition-all duration-500 ${M?"bg-gradient-to-r from-cyan-500/30 via-teal-500/30 to-cyan-500/30 border-2 border-cyan-400 shadow-lg shadow-cyan-500/50":"bg-slate-800/60 border border-cyan-400/20 hover:border-cyan-400/50 hover:bg-slate-800/80"}`,children:[M&&a.jsx(S.div,{className:"absolute inset-0 bg-gradient-to-r from-cyan-500/20 via-teal-500/20 to-cyan-500/20 rounded-2xl",animate:{opacity:[.5,.8,.5]},transition:{duration:3,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}}),a.jsxs("div",{className:"relative flex items-center gap-4 px-4 py-3",children:[a.jsxs(S.div,{className:`flex-shrink-0 w-10 h-10 rounded-xl flex items-center justify-center font-bold text-lg relative ${M?"bg-cyan-500 text-slate-900":"bg-slate-700/80 text-cyan-300 group-hover:bg-slate-700 group-hover:text-cyan-200"}`,animate:M?{boxShadow:["0 0 15px rgba(34, 211, 238, 0.5)","0 0 25px rgba(34, 211, 238, 0.8)","0 0 15px rgba(34, 211, 238, 0.5)"]}:{},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"},children:[a.jsx(T,{className:"w-5 h-5"}),M&&a.jsxs(a.Fragment,{children:[a.jsx(S.div,{className:"absolute inset-0 border-2 border-cyan-400/50 rounded-xl",animate:{scale:[1,1.3,1],opacity:[.5,0,.5]},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeOut"}}),a.jsx(S.div,{className:"absolute inset-0 border-2 border-teal-400/50 rounded-xl",animate:{scale:[1,1.5,1],opacity:[.5,0,.5]},transition:{duration:2,delay:.5,repeat:Number.POSITIVE_INFINITY,ease:"easeOut"}})]})]}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx(S.p,{className:`font-semibold text-sm transition-colors duration-300 ${M?"text-white":"text-cyan-200 group-hover:text-cyan-100"}`,animate:M?{textShadow:["0 0 10px rgba(34, 211, 238, 0.3)","0 0 20px rgba(34, 211, 238, 0.6)","0 0 10px rgba(34, 211, 238, 0.3)"]}:{},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"},children:P.title}),M&&a.jsx(S.div,{className:"mt-1.5 h-1 bg-slate-700/50 rounded-full overflow-hidden",initial:{width:0},animate:{width:"100%"},transition:{duration:.5,delay:.2},children:a.jsx(S.div,{className:"h-full bg-gradient-to-r from-cyan-400 to-teal-400",initial:{x:"-100%"},animate:{x:"0%"},transition:{duration:.8,delay:.3,ease:"easeOut"}})})]}),a.jsx(S.div,{className:`flex-shrink-0 w-3 h-3 rounded-full ${M?"bg-cyan-400":"bg-slate-600 group-hover:bg-cyan-500/50"}`,animate:M?{scale:[1,1.3,1],boxShadow:["0 0 10px rgba(34, 211, 238, 0.5)","0 0 20px rgba(34, 211, 238, 1)","0 0 10px rgba(34, 211, 238, 0.5)"]}:{},transition:{duration:1.5,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}})]}),a.jsx(S.div,{className:"absolute inset-0 rounded-2xl opacity-0 group-hover:opacity-100 transition-opacity duration-300",style:{background:"radial-gradient(circle at center, rgba(34, 211, 238, 0.1) 0%, transparent 70%)"}})]})},P.title)})]}),a.jsx(S.div,{className:"px-6 py-3 border-t border-cyan-400/20 bg-gradient-to-r from-slate-900/50 to-slate-800/50",initial:{opacity:0},animate:{opacity:1},transition:{delay:.6},children:a.jsxs("p",{className:"text-xs text-cyan-300/80 text-center",children:[p.length," niveles disponibles"]})})]})]})})}),a.jsxs(S.button,{onClick:()=>s(!n),className:"flex items-center gap-3 px-6 py-3 bg-slate-800/90 hover:bg-slate-700/90 text-cyan-300 font-medium text-sm rounded-full transition-all duration-300 shadow-lg hover:shadow-cyan-500/50 border border-cyan-400/30 hover:border-cyan-400/60 mb-3 w-60",whileHover:{scale:1.02},whileTap:{scale:.98},animate:{borderColor:n?["rgba(34, 211, 238, 0.3)","rgba(34, 211, 238, 0.6)","rgba(34, 211, 238, 0.3)"]:"rgba(34, 211, 238, 0.3)"},transition:{borderColor:{duration:2,repeat:n?Number.POSITIVE_INFINITY:0,ease:"easeInOut"}},children:[a.jsx(Ce,{mode:"wait",children:a.jsx(S.div,{initial:{scale:0,rotate:-180,opacity:0,filter:"blur(10px)"},animate:{scale:1,rotate:0,opacity:1,filter:"blur(0px)"},exit:{scale:0,rotate:180,opacity:0,filter:"blur(10px)"},transition:{duration:.5,ease:[.34,1.56,.64,1],scale:{type:"spring",stiffness:300,damping:20}},children:a.jsx(F.Layers,{className:"w-5 h-5"})},n?"open":"closed")}),a.jsx("span",{children:x("control-panel.nivel")}),a.jsx(S.span,{className:"px-3 py-1 bg-cyan-500/20 text-cyan-300 rounded-full text-xs font-semibold border border-cyan-400/30 leading-3",initial:{opacity:0,scale:.8,y:-10},animate:{opacity:1,scale:1,y:0},transition:{duration:.4,ease:[.34,1.56,.64,1]},children:o},`level-badge-${o}`)]}),a.jsxs(S.button,{onClick:j,className:`flex items-center gap-3 px-6 py-3 ${V.bg} ${V.text} font-medium text-sm rounded-full transition-all duration-300 ${V.shadow} border ${V.border} mb-3`,whileHover:{scale:1.05},whileTap:{scale:.95,rotate:15},animate:{scale:[1,1.02,1]},transition:{scale:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}},children:[a.jsx(Ce,{mode:"wait",children:a.jsx(S.div,{initial:{scale:0,rotate:-180,opacity:0,filter:"blur(10px)"},animate:{scale:1,rotate:0,opacity:1,filter:"blur(0px)"},exit:{scale:0,rotate:180,opacity:0,filter:"blur(10px)"},transition:{duration:.5,ease:[.34,1.56,.64,1],scale:{type:"spring",stiffness:300,damping:20}},children:a.jsx(J,{className:"w-5 h-5"})},e)}),a.jsx("span",{children:"Layer Switch"}),a.jsx(S.span,{className:`px-3 py-1 ${V.badgeBg} ${V.badgeText} rounded-full text-xs font-semibold border ${V.badgeBorder}`,initial:{opacity:0,scale:.8,y:-10},animate:{opacity:1,scale:1,y:0},transition:{duration:.4,ease:[.34,1.56,.64,1]},children:x(`control-panel.layer.${e}`)},`badge-${e}`)]}),a.jsxs(S.button,{onClick:$,className:"flex items-center gap-3 px-6 py-3 bg-slate-800/90 hover:bg-slate-700/90 text-cyan-300 font-medium text-sm rounded-full transition-all duration-300 shadow-lg hover:shadow-cyan-500/50 border border-cyan-400/30 hover:border-cyan-400/60 mb-3",whileHover:{scale:1.05},whileTap:{scale:.95,rotate:15},animate:{scale:[1,1.02,1]},transition:{scale:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}},children:[a.jsx(Ce,{mode:"wait",children:a.jsx(S.div,{initial:{scale:0,rotate:-180,opacity:0,filter:"blur(10px)"},animate:{scale:1,rotate:0,opacity:1,filter:"blur(0px)"},exit:{scale:0,rotate:180,opacity:0,filter:"blur(10px)"},transition:{duration:.5,ease:[.34,1.56,.64,1],scale:{type:"spring",stiffness:300,damping:20}},children:a.jsx(F.Languages,{className:"w-5 h-5"})},d)}),a.jsx("span",{children:x("control-panel.idioma")}),a.jsx(S.span,{className:"px-3 py-1 bg-cyan-500/20 text-cyan-300 rounded-full text-xs font-semibold border border-cyan-400/30",initial:{opacity:0,scale:.8,y:-10},animate:{opacity:1,scale:1,y:0},transition:{duration:.4,ease:[.34,1.56,.64,1]},children:d==="es"?"Español":"English"},`language-badge-${d}`)]}),a.jsxs(S.button,{onClick:z,className:"flex items-center gap-3 px-6 py-3 bg-slate-800/90 hover:bg-slate-700/90 text-cyan-300 font-medium text-sm rounded-full transition-all duration-300 shadow-lg hover:shadow-cyan-500/50 border border-cyan-400/30 hover:border-cyan-400/60",whileHover:{scale:1.05},whileTap:{scale:.95,rotate:15},animate:{scale:[1,1.02,1]},transition:{scale:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}},children:[a.jsx(Ce,{mode:"wait",children:a.jsx(S.div,{initial:{scale:0,rotate:-180,opacity:0,filter:"blur(10px)"},animate:{scale:1,rotate:0,opacity:1,filter:"blur(0px)"},exit:{scale:0,rotate:180,opacity:0,filter:"blur(10px)"},transition:{duration:.5,ease:[.34,1.56,.64,1],scale:{type:"spring",stiffness:300,damping:20}},children:a.jsx(F.Presentation,{className:"w-5 h-5"})},d)}),a.jsx("span",{children:x("control-panel.showcasemode")}),a.jsx(S.span,{className:"px-3 py-1 bg-cyan-500/20 text-cyan-300 rounded-full text-xs font-semibold border border-cyan-400/30",initial:{opacity:0,scale:.8,y:-10},animate:{opacity:1,scale:1,y:0},transition:{duration:.4,ease:[.34,1.56,.64,1]},children:E?"ON":"OFF"},`showcase-badge-${E}`)]}),a.jsx(S.button,{onClick:()=>m(!h),className:"mt-3 p-2.5 bg-white/30 hover:bg-white/40 text-white rounded-full transition-all duration-300 backdrop-blur-md border-2 border-white/40 hover:border-white/60 z-[60] shadow-xl",animate:{x:[0,5,0]},transition:{x:{repeat:Number.POSITIVE_INFINITY,duration:1.5,ease:"easeInOut"}},whileHover:{scale:1.15},whileTap:{scale:.95},children:a.jsx(S.div,{animate:{rotate:h?180:0},transition:{duration:.4,ease:[.34,1.56,.64,1]},children:a.jsx(F.ChevronLeft,{className:"w-5 h-5"})})})]}),a.jsx(Ce,{children:h&&a.jsx(S.button,{onClick:()=>m(!1),className:"fixed bottom-8 left-8 p-3 bg-white/10 hover:bg-white/20 text-white rounded-full transition-all duration-300 backdrop-blur-sm border border-white/10 hover:border-white/30 z-40",initial:{opacity:0,x:-50,scale:0},animate:{opacity:.6,x:0,scale:1},exit:{opacity:0,x:-50,scale:0},transition:{duration:.5,ease:[.34,1.56,.64,1]},whileHover:{scale:1.1,opacity:1,x:5},whileTap:{scale:.95},children:a.jsx(S.div,{animate:{x:[0,8,0]},transition:{repeat:Number.POSITIVE_INFINITY,duration:1.5,ease:"easeInOut"},children:a.jsx(F.ChevronRight,{className:"w-6 h-6"})})})})]})}function uo(){const{isConnected:e,reconnect:t}=Ut(),s={connected:{color:"bg-emerald-500",ringColor:"ring-emerald-500/30",label:"Conectado",animate:!0},connecting:{color:"bg-amber-500",ringColor:"ring-amber-500/30",label:"Conectando...",animate:!0},disconnected:{color:"bg-red-500",ringColor:"ring-red-500/30",label:"Desconectado",animate:!1}}[e?"connected":"disconnected"],i=!e&&t;return a.jsxs("div",{className:bn("fixed z-50 flex items-center gap-2 rounded-full bg-background/80 backdrop-blur-sm px-3 py-2 shadow-lg","top-1 right-2",i&&"cursor-pointer hover:bg-accent transition-colors"),onClick:i?t:void 0,role:i?"button":void 0,"aria-label":i?"Reconectar WebSocket":`Estado: ${s.label}`,children:[a.jsxs("div",{className:"relative flex items-center justify-center",children:[a.jsx("div",{className:bn("w-2.5 h-2.5 rounded-full",s.color,s.animate&&"animate-pulse")}),s.animate&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:bn("absolute w-2.5 h-2.5 rounded-full ring-2",s.ringColor,"animate-ping")}),a.jsx("div",{className:bn("absolute w-4 h-4 rounded-full ring-1",s.ringColor)})]})]}),a.jsx("div",{className:"flex items-center gap-1",children:a.jsx("div",{className:"h-0.5 w-8 relative overflow-hidden transition-all duration-500 bg-emerald-500",children:a.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-transparent via-green-300 to-transparent animate-flow-right"})})}),a.jsx("div",{className:"relative flex items-center justify-center",children:a.jsx("div",{className:"w-2.5 h-2.5"})}),!1,!1]})}function fo({children:e}){const t=Ii();if(!t)return a.jsx(a.Fragment,{children:e});const{isMinimized:n}=t;return a.jsxs(a.Fragment,{children:[a.jsx(S.div,{className:"relative w-full h-full",initial:!1,animate:{scaleY:n?0:1,opacity:n?0:1},transition:{duration:.6,ease:[.4,0,.2,1]},style:{transformOrigin:"bottom"},children:e}),a.jsx(Np,{})]})}const ho=()=>{const{isAutoMode:e}=lo(),{pathname:t}=Se.useLocation(),n=Se.useNavigate(),s=b.useRef(null),i=xe()?.showcasesUrl??[],r=xe().showcasesWait??12e4,o=()=>{const d=(i.indexOf(t)+1)%i.length;n(i[d])},l=()=>{s.current&&clearInterval(s.current),s.current=setInterval(o,r)},c=()=>{s.current&&(clearInterval(s.current),s.current=null)};b.useEffect(()=>(e?l():c(),()=>c()),[e]),b.useEffect(()=>{e&&l()},[t,e])};function vb({showControlPanel:e=!0,iframeSrc:t=""}){return ho(),a.jsxs("div",{className:"relative w-full h-screen overflow-hidden bg-transparent",children:[a.jsx("div",{className:"z-1 fixed inset-0",children:a.jsx("iframe",{id:"vagonFrame",allow:"microphone *; clipboard-read *; clipboard-write *; encrypted-media *; fullscreen *;",className:"z-1 w-full h-screen",src:t})}),a.jsx(fo,{children:a.jsxs("div",{className:"relative z-10 h-full bg-transparent",children:[a.jsx(Se.Outlet,{}),e&&a.jsx(co,{})]})}),a.jsx(uo,{})]})}function wb({showControlPanel:e=!0}){return ho(),a.jsxs("div",{className:"relative w-full h-screen overflow-hidden bg-transparent",children:[a.jsx("div",{className:"pointer-events-none absolute top-0 left-0 w-full h-50 bg-gradient-to-b from-black/70 to-transparent"}),a.jsx("div",{className:"pointer-events-none absolute bottom-0 left-0 w-full h-80 bg-gradient-to-t from-black/70 to-transparent"}),a.jsx(fo,{children:a.jsxs("div",{className:"relative z-10 h-full bg-transparent",children:[a.jsx(Se.Outlet,{}),e&&a.jsx(co,{})]})}),a.jsx(uo,{})]})}function mo({items:e,parent:t,selectedShip:n,onShipSelect:s}){const[i,r]=b.useState(0),[o,l]=b.useState(!1),[c,u]=b.useState(6),[d,f]=b.useState(!0),[h,m]=b.useState(0),[p,y]=b.useState("slide"),[v,x]=b.useState(160),{t:C}=jt.useTranslation(),{lastEvent:N,internalEvent:I,setInternalEvent:A}=vt(),k=xe().cinematics??!1,E=xe().cinematicsOnChangeLocation??!1;k&&(b.useEffect(()=>{N?.payload?.type==="cinematics"&&N?.payload?.action==="end"&&f(!0)},[N]),b.useEffect(()=>{if(I?.payload?.type==="cinematics"){const V=I?.payload?.action;V==="start"&&f(!1),V==="end"&&f(!0)}},[I]));const w=V=>{const _=(Math.ceil(R.length/c)-1)*c*v;return V>0?0:Math.abs(V)>_?-_:V},j=V=>-(V*c*v),$=V=>{const P=Math.floor(c/2),_=Math.floor(V/c),M=(V-_*c-P)*v,T=-(_*c*v+M);return w(T)},z=Se.useNavigate(),Q=xe().baseUrl??"",R=e;b.useEffect(()=>{const V=()=>{let P;window.innerWidth<640?(u(2),P=120):window.innerWidth<768?(u(3),P=140):window.innerWidth<1024?(u(4),P=160):(u(6),P=180),x(P)};return V(),window.addEventListener("resize",V),()=>window.removeEventListener("resize",V)},[]),b.useEffect(()=>{if(!n){r(0),y("center"),m($(0));return}const V=R.findIndex(_=>_.slug===n);if(V===-1){r(0),y("center"),m($(0));return}const P=Math.floor(V/c);P!==i&&r(P),y("center"),m($(V))},[n,c,v,R]),b.useEffect(()=>{if(p==="slide")m(j(i));else{const V=R.findIndex(P=>P.slug===n);V!==-1&&m($(V))}},[c,v]);const se=V=>{s(V),y("center");const P=R.findIndex(_=>_.slug===V);P!==-1&&m($(P)),z(`${t?`/${t}/`:"/"}${V}`),k&&E&&A({...Yt})},U=()=>{const V=Math.ceil(R.length/c),P=(i+1)%V;y("slide"),r(P),m(j(P))},J=()=>{const V=Math.ceil(R.length/c),P=(i-1+V)%V;y("slide"),r(P),m(j(P))};return a.jsxs(Ce,{children:[d&&a.jsxs(S.div,{className:"absolute top-0 left-0 right-0 flex flex-col items-center justify-center z-10",initial:{opacity:0,y:-50},animate:{opacity:o?0:1,y:o?-200:0,pointerEvents:o?"none":"auto"},transition:{duration:.6,ease:[.34,1.56,.64,1]},exit:{opacity:0,y:-50,scale:.8},children:[a.jsxs(S.div,{className:"relative flex items-center justify-center w-full max-w-7xl",animate:{y:0},transition:{duration:.3,ease:"easeInOut"},children:[a.jsx(S.button,{className:"absolute left-1 sm:left-2 md:left-4 z-20 w-8 h-8 sm:w-10 sm:h-10 bg-slate-900/40 backdrop-blur-sm rounded-full border border-blue-400/20 hover:border-blue-400/40 flex items-center justify-center text-white/60 hover:text-white transition-all duration-300 hover:bg-slate-800/60",onClick:J,whileHover:{scale:1.05,x:-2},whileTap:{scale:.95},disabled:i===0,style:{opacity:i===0?.3:1,pointerEvents:i===0?"none":"auto"},children:a.jsx(F.ArrowLeft,{className:"w-3 h-3 sm:w-4 sm:h-4"})}),a.jsx("div",{className:"flex p-2 sm:p-4 mx-10 sm:mx-16 overflow-hidden",children:a.jsx(S.div,{className:"flex space-x-2 sm:space-x-4 md:space-x-8",animate:{x:h},transition:{duration:.6,ease:[.25,.46,.45,.94]},children:R.map((V,P)=>a.jsxs(S.div,{className:`flex flex-col gap-1 items-center cursor-pointer group min-w-[100px] sm:min-w-[120px] md:min-w-[144px] ${n===V.slug?"scale-110":""}`,onClick:()=>se(V.slug),whileHover:{scale:1.05,y:-4},whileTap:{scale:.98},initial:{opacity:0,y:20},animate:{opacity:1,y:0,transition:{delay:P*.1}},children:[a.jsxs("div",{className:`relative w-24 h-24 sm:w-28 sm:h-28 md:w-32 md:h-32 flex flex-col gap-1 align-bottom items-center justify-end py-2 sm:pt-4 rounded-lg transition-all duration-500 ${n===V.slug?"bg-blue-700/80 shadow-lg shadow-blue-500/30 border border-blue-400/50":"bg-zinc-500/1 hover:bg-blue-900/40 border border-transparent hover:border-blue-600/30"}`,children:[a.jsx("div",{className:"w-full h-12 sm:h-16 relative flex items-center justify-center px-4",children:a.jsx("img",{src:`${Q.replace(/\/$/,"")}/images/shapes/${V.icon??V.slug}.png`,alt:V.name,width:120,height:40,className:"object-contain brightness-200 filter transition-all duration-300 group-hover:brightness-300"})}),a.jsx("div",{className:" text-center",children:a.jsx("div",{className:"text-cyan-300 text-xs sm:text-sm font-medium transition-colors duration-300 group-hover:text-cyan-200",children:C(V.name)})})]}),V.label&&a.jsx("div",{className:"mt-1",children:a.jsx("span",{className:`text-[10px] sm:text-xs px-2 sm:px-3 py-1 rounded-md transition-all duration-300 ${n===V.slug?"bg-cyan-500/80 text-blue-900 shadow-md":"bg-blue-900/60 text-cyan-300 group-hover:bg-blue-800/70 group-hover:text-cyan-200"}`,children:V.label})})]},V.slug))})}),a.jsx(S.button,{className:"absolute right-1 sm:right-2 md:right-4 z-20 w-8 h-8 sm:w-10 sm:h-10 bg-slate-900/40 backdrop-blur-sm rounded-full border border-blue-400/20 hover:border-blue-400/40 flex items-center justify-center text-white/60 hover:text-white transition-all duration-300 hover:bg-slate-800/60",onClick:U,whileHover:{scale:1.05,x:2},whileTap:{scale:.95},disabled:i===Math.ceil(R.length/c)-1,style:{opacity:i===Math.ceil(R.length/c)-1?.3:1,pointerEvents:i===Math.ceil(R.length/c)-1?"none":"auto"},children:a.jsx(F.ArrowLeft,{className:"w-3 h-3 sm:w-4 sm:h-4 rotate-180"})})]}),a.jsx(S.button,{onClick:()=>l(!0),className:"p-2 bg-white/10 hover:bg-white/20 text-white rounded-full transition-all duration-300 backdrop-blur-sm border border-white/10 hover:border-white/30 z-50",initial:{opacity:0,scale:0},animate:{opacity:.6,scale:1,y:[0,5,0]},exit:{opacity:0,y:-50,scale:0},transition:{duration:.5,ease:[.34,1.56,.64,1]},whileHover:{scale:1.1,opacity:1},whileTap:{scale:.95},children:a.jsx(S.div,{animate:{rotate:o?180:0},transition:{duration:.4,ease:[.34,1.56,.64,1]},children:a.jsx(F.ChevronUp,{className:"w-5 h-5"})})})]}),o&&a.jsx(S.button,{onClick:()=>l(!1),className:"absolute top-8 left-1/2 -translate-x-1/2 p-3 bg-white/10 hover:bg-white/20 text-white rounded-full transition-all duration-300 backdrop-blur-sm border border-white/10 hover:border-white/30 z-40",initial:{opacity:0,y:-50,scale:0},animate:{opacity:.6,y:0,scale:1},exit:{opacity:0,y:-50,scale:0},transition:{duration:.5,ease:[.34,1.56,.64,1]},whileHover:{scale:1.1,opacity:1,y:5},whileTap:{scale:.95},children:a.jsx(S.div,{animate:{y:[0,8,0]},transition:{repeat:Number.POSITIVE_INFINITY,duration:1.5,ease:"easeInOut"},children:a.jsx(F.ChevronDown,{className:"w-6 h-6"})})})]})}const Sb=({items:e,world:t,worldSlug:n=t})=>{const[s,i]=b.useState(""),r={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},o=Se.useLocation(),l=Se.useNavigate(),{t:c}=jt.useTranslation(),{setInternalEvent:u}=vt(),d=xe().cinematics??!1,f=xe().cinematicsOnChangeLocation??!1;b.useEffect(()=>{o.pathname===`/${n}`?i(""):o.pathname.startsWith(n?`/${n}/`:"/")&&i(o.pathname.replace(n?`/${n}/`:"/",""))},[o]),b.useEffect(()=>{const v=x=>{const C=["INPUT","TEXTAREA"].includes(x.target.tagName),N=document.querySelector(".yarl__container"),I=document.querySelector(".simulation-mode");C||N||I||(x.key==="ArrowLeft"?(x.preventDefault(),y()):x.key==="ArrowRight"&&(x.preventDefault(),p()))};return window.addEventListener("keydown",v),()=>{window.removeEventListener("keydown",v)}},[s]),b.useEffect(()=>{let v=0,x=0,C=!1;const N=k=>{const E=k.target,w=document.getElementById("ItemPage");C=E===w,C&&(v=k.changedTouches[0].screenX)},I=k=>{C&&(x=k.changedTouches[0].screenX,A())},A=()=>{const k=x-v;Math.abs(k)<50||(k>0?y():p())};return window.addEventListener("touchstart",N),window.addEventListener("touchend",I),()=>{window.removeEventListener("touchstart",N),window.removeEventListener("touchend",I)}},[s]);const h=()=>{const x=(e.findIndex(C=>C.slug===s)+1)%e.length;return e[x]},m=()=>{const x=(e.findIndex(C=>C.slug===s)-1+e.length)%e.length;return e[x]},p=()=>{const v=h();i(v.slug),l(`${n}/${v.slug}`),d&&f&&u({...Yt})},y=()=>{const v=m();i(v.slug),l(`${n}/${v.slug}`),d&&f&&u({...Yt})};return a.jsxs(S.div,{className:"relative w-full h-full",variants:r,initial:"initial",animate:"animate",exit:"exit",transition:{duration:.8},children:[a.jsx(mo,{parent:n,items:e,onShipSelect:i,selectedShip:s}),s&&a.jsxs(a.Fragment,{children:[a.jsxs(S.button,{className:"absolute left-4 top-1/2 transform -translate-y-1/2 w-12 h-12 bg-slate-900/40 backdrop-blur-sm rounded-full border border-blue-400/20 hover:border-blue-400/60 flex items-center justify-center text-white/60 hover:text-white transition-all duration-300 hover:bg-slate-800/60 group z-30",initial:"initial",animate:"animate",whileHover:"hover",whileTap:{scale:.95},onClick:y,children:[a.jsx(F.ArrowLeft,{className:"w-6 h-6 transition-transform duration-300 group-hover:scale-110"}),a.jsxs(S.div,{className:"absolute left-16 top-1/2 transform -translate-y-1/2 bg-slate-900/95 backdrop-blur-md rounded-lg px-3 py-2 border border-blue-400/30 shadow-xl opacity-0 group-hover:opacity-100 transition-opacity duration-300 pointer-events-none whitespace-nowrap",children:[a.jsx("span",{className:"text-blue-100 font-medium text-sm",children:c("layout.anterior")}),a.jsx("div",{className:"absolute right-full top-1/2 transform -translate-y-1/2 w-0 h-0 border-t-4 border-b-4 border-r-4 border-transparent border-r-slate-900/95"})]}),a.jsx("div",{className:"absolute inset-0 rounded-full border border-blue-400/30 scale-0 group-hover:scale-125 opacity-0 group-hover:opacity-100 transition-all duration-500"})]}),a.jsxs(S.button,{className:"absolute right-4 top-1/2 transform -translate-y-1/2 w-12 h-12 bg-slate-900/40 backdrop-blur-sm rounded-full border border-blue-400/20 hover:border-blue-400/60 flex items-center justify-center text-white/60 hover:text-white transition-all duration-300 hover:bg-slate-800/60 group z-30",initial:"initial",animate:"animate",whileHover:"hover",whileTap:{scale:.95},onClick:p,children:[a.jsx(F.ArrowLeft,{className:"w-6 h-6 rotate-180 transition-transform duration-300 group-hover:scale-110"}),a.jsxs(S.div,{className:"absolute right-16 top-1/2 transform -translate-y-1/2 bg-slate-900/95 backdrop-blur-md rounded-lg px-3 py-2 border border-blue-400/30 shadow-xl opacity-0 group-hover:opacity-100 transition-opacity duration-300 pointer-events-none whitespace-nowrap",children:[a.jsx("span",{className:"text-blue-100 font-medium text-sm",children:c("layout.siguiente")}),a.jsx("div",{className:"absolute left-full top-1/2 transform -translate-y-1/2 w-0 h-0 border-t-4 border-b-4 border-l-4 border-transparent border-l-slate-900/95"})]}),a.jsx("div",{className:"absolute inset-0 rounded-full border border-blue-400/30 scale-0 group-hover:scale-125 opacity-0 group-hover:opacity-100 transition-all duration-500"})]})]}),a.jsx(Se.Outlet,{})]})},xu=b.createContext(void 0);function Tb({children:e}){const{isMobile:t}=Li(),n=xe().videosBaseUrl,s=t?"videos/movil":"videos",[i,r]=b.useState(""),[o,l]=b.useState(!1),c=(u,d=!0)=>{const f=`${n.replace(/\/$/,"")}/${s}/${u}`;f!==i&&(d?(l(!0),setTimeout(()=>{r(f),setTimeout(()=>l(!1),300)},150)):r(f))};return a.jsx(xu.Provider,{value:{currentVideo:i,setVideo:c,isTransitioning:o},children:e})}function vu(){const e=b.useContext(xu);return e===void 0?{currentVideo:"",setVideo:()=>{},isTransitioning:!1}:e}const po=({returnUrlOnEnded:e})=>{const{currentVideo:t,isTransitioning:n}=vu(),s=Se.useNavigate(),i=b.useRef(null),[r,o]=b.useState(t),l=()=>{e&&s(e)},c=u=>u.replace(/\.mp4$/i,".webp");return b.useEffect(()=>{t!==r&&(i.current&&(i.current.pause(),i.current.removeAttribute("src"),i.current.load()),o(t))},[t,r]),b.useEffect(()=>{i.current&&r&&i.current.play().catch(u=>{console.warn("Error al intentar autoPlay del video:",u)})},[r]),a.jsxs("div",{className:"absolute inset-0 w-full h-full",children:[a.jsx(Ce,{children:n&&a.jsx(S.div,{className:"absolute inset-0 bg-black z-10",initial:{opacity:0},animate:{opacity:.3},exit:{opacity:0},transition:{duration:.15}})}),a.jsx(S.video,{ref:i,autoPlay:!0,loop:!e,muted:!0,playsInline:!0,className:"absolute inset-0 w-full h-full object-cover",onEnded:l,initial:{opacity:0},animate:{opacity:1},transition:{duration:.3},src:r,poster:c(r)},r)]})};function Eb({className:e}){const n=e!==void 0?e:"fixed inset-0 overflow-hidden bg-slate-900";return a.jsxs("div",{className:n,children:[a.jsx(po,{}),a.jsx("div",{className:"relative z-10 h-full",children:a.jsx(Se.Outlet,{})})]})}function Cb({x:e,y:t,dest:n}){const s=Se.useNavigate(),i=r=>{s(`/product/${r}`)};return a.jsxs(S.button,{className:`absolute ${e} ${t} w-8 h-8 bg-gradient-to-br from-blue-500 to-indigo-700 rounded-full shadow-2xl border-2 border-blue-300/50 backdrop-blur-sm flex items-center justify-center group overflow-hidden`,initial:"initial",animate:"animate",whileHover:"hover",whileTap:"tap",onClick:()=>i(n),children:[a.jsx("div",{className:"absolute inset-1 bg-gradient-to-br from-blue-300/30 to-transparent rounded-full"}),a.jsx("div",{className:"relative w-2.5 h-2.5 bg-white rounded-full group-hover:scale-125 transition-all duration-300 shadow-lg",children:a.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-blue-200 to-white rounded-full animate-pulse"})}),a.jsx("div",{className:"absolute inset-0 rounded-full border border-blue-300/60 animate-ping"}),a.jsx("div",{className:"absolute inset-1 rounded-full border border-blue-400/40 animate-pulse"}),a.jsx("div",{className:"absolute inset-0 rounded-full border border-transparent border-t-blue-300 animate-spin",style:{animationDuration:"3s"}}),a.jsxs(S.div,{className:"absolute right-12 top-1/2 transform -translate-y-1/2 bg-slate-900/95 backdrop-blur-md rounded-lg p-4 border border-blue-400/30 shadow-xl min-w-64 group-hover:opacity-100 transition-opacity duration-300",initial:{opacity:0,x:20,scale:.8},animate:{opacity:0,x:20,scale:.8},whileHover:{opacity:1,x:0,scale:1},transition:{duration:.3},style:{pointerEvents:"none"},children:[a.jsx("h3",{className:"text-blue-300 font-bold text-lg mb-1",children:"SUBMARINO S80"}),a.jsx("p",{className:"text-blue-100/80 text-sm leading-relaxed",children:"Submarino de propulsión AIP con capacidades stealth y sistemas de combate integrados de última generación."}),a.jsx("div",{className:"absolute left-full top-1/2 transform -translate-y-1/2 w-0 h-0 border-t-8 border-b-8 border-l-8 border-transparent border-l-slate-900/95"})]})]})}function go({home:e,item:t}){const[n,s]=b.useState({width:0,height:0}),[i,r]=b.useState(!0),[o,l]=b.useState(!1),[c,u]=b.useState(!1),[d,f]=b.useState(""),[h,m]=b.useState(!1),[p,y]=b.useState(!1),[v,x]=b.useState(!1),[C,N]=b.useState(!1),[I,A]=b.useState(!1),[k,E]=b.useState(""),[w,j]=b.useState(!1),$=Se.useNavigate(),{lastEvent:z,internalEvent:Q,setInternalEvent:R}=vt(),se=xe().cinematics??!1,U=xe().cinematicsOnChangeLocation??!1;se&&(b.useEffect(()=>{z?.payload?.type==="cinematics"&&z?.payload?.action==="end"&&r(!0)},[z]),b.useEffect(()=>{if(Q?.payload?.type==="cinematics"){const T=Q?.payload?.action;T==="start"&&r(!1),T==="end"&&r(!0)}},[Q])),b.useEffect(()=>{const T=()=>{s({width:window.innerWidth,height:window.innerHeight})};return T(),window.addEventListener("resize",T),()=>window.removeEventListener("resize",T)},[]);const J=()=>{l(!0),r(!1)},V=()=>{l(!1),r(!0)},P=T=>{$(T),se&&U&&R({...Yt})},_=T=>!!T?.trim(),M=T=>T?.endsWith(".webm")||T?.endsWith(".mp4");return a.jsxs(Ce,{children:[i&&a.jsx(S.div,{className:"absolute bottom-4 sm:bottom-6 md:bottom-10 left-1/2 transform -translate-x-1/2 w-full max-w-[90%] sm:max-w-[85%] md:max-w-4xl px-4 sm:px-6 md:px-8 z-9999",initial:{opacity:0,y:50},animate:{opacity:1,y:0},transition:{delay:.8,duration:.6},exit:{opacity:0,y:50,scale:.8,transition:{delay:0,duration:.6}},children:a.jsxs("div",{className:"flex flex-col gap-6 backdrop-blur-xs rounded-xl sm:rounded-2xl border p-3 sm:p-4 md:p-6 text-center border-transparent max-w-6xl mx-auto title-section",children:[a.jsx("h1",{className:"text-xl sm:text-3xl md:text-4xl lg:text-5xl font-light text-white mb-2 sm:mb-4 tracking-wide",children:t?.title}),a.jsx("p",{className:"text-xs sm:text-sm md:text-base text-blue-100/90 font-light leading-relaxed max-w-5xl mx-auto mb-3 sm:mb-4 md:mb-6",children:t?.subtitle}),a.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-2 sm:gap-3 md:gap-4",children:[!1,e&&a.jsxs(a.Fragment,{children:[a.jsx(S.button,{className:"inline-flex items-center gap-1 sm:gap-2 px-3 sm:px-4 md:px-6 py-2 sm:py-3 bg-slate-800/80 hover:bg-slate-700/80 text-cyan-300 font-medium text-xs sm:text-sm rounded-full transition-all duration-300 shadow-lg hover:shadow-slate-500/25 border border-cyan-400/30 hover:border-cyan-400/60",whileHover:{scale:1.05},whileTap:{scale:.95},initial:{opacity:0},animate:{opacity:1},transition:{delay:0,duration:.6},onClick:()=>{P(e)},children:a.jsx(F.Home,{className:"w-3 h-3 sm:w-4 sm:h-4"})}),t?.simulation&&a.jsx(xc,{onClick:()=>m(!0)}),_(t?.playMedia?.url)&&a.jsx(Pi,{Icon:F.Video,onClick:()=>{f(t.playMedia.url),u(!0)}}),t?.webUrl&&a.jsx(Pi,{Icon:F.ExternalLink,onClick:()=>x(!0)}),(t?.links?.length??0)>0&&t?.links?.map(T=>a.jsx(Un,{item:T,onClick:()=>{M(T.url)?(f(T.url.trim()),u(!0)):(E(T.url),A(T.transparent),N(!0)),T.transparent===!0&&se&&R({...Yt})}})),(t?.cards?.length??0)>0&&a.jsx(Wl,{onClick:()=>y(!0)}),(t?.nodesId??0)>0&&a.jsx(yc,{label:t?.shortName??t.title,onClick:J})]})]})]})}),o&&t?.nodesId&&a.jsx(gb,{isOpen:o,onClose:V,size:n,hotspot:t.nodesId}),c&&a.jsx(mu,{source:d,onClose:()=>u(!1)}),h&&a.jsx(gu,{item:t.simulation,onClose:()=>m(!1)},t?.slug),p&&a.jsx(vc,{cards:t.cards,onClose:()=>y(!1)}),v&&a.jsx(Ht,{src:t.webUrl,onClose:()=>x(!1)}),C&&a.jsx(Ht,{src:k,transparent:I,onClose:()=>{const T=I;N(!1),E(""),A(!1),T===!0&&se&&R({...gc})}}),w&&a.jsx(Pp,{onClose:()=>j(!1)})]})}const Nb=({video:e,returnUrl:t})=>{console.log(e);const n=Se.useNavigate(),s={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},i=()=>{n(t)},{t:r}=jt.useTranslation();return a.jsx(a.Fragment,{children:a.jsxs("div",{className:"fixed inset-0 overflow-hidden bg-slate-900",children:[a.jsx(po,{returnUrlOnEnded:t}),a.jsx("div",{className:"relative z-10 h-full",children:a.jsx(S.div,{className:"relative w-full h-full",variants:s,initial:"initial",animate:"animate",exit:"exit",transition:{duration:.8},children:a.jsx(S.div,{className:"absolute inset-0 bg-black/20 flex items-center justify-center",initial:{opacity:0},animate:{opacity:1},transition:{duration:.5},children:a.jsx(S.button,{className:"absolute bottom-8 right-8 px-4 py-2 bg-slate-900/80 backdrop-blur-md rounded-lg text-white/90 text-sm border border-white/20 hover:border-white/40 hover:bg-slate-800/90 transition-all duration-300 hover:text-white",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:1},whileHover:{scale:1.05},whileTap:{scale:.95},onClick:i,children:r("layout.skip")})})})})]})})},kb=({world:e,worldSlug:t=e,overlay:n=!1,itemsData:s})=>{const[i,r]=b.useState(null),{itemSlug:o}=Se.useParams();b.useEffect(()=>{if(o){const c=s.find(u=>u.slug===o);c&&r(c)}},[o]);const l={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}};return i?a.jsx(a.Fragment,{children:a.jsxs(S.div,{className:"relative w-full h-full",variants:l,initial:"initial",animate:"animate",exit:"exit",transition:{duration:.8},children:[n&&a.jsx("div",{id:"ItemPage",className:"absolute inset-0 bg-gradient-to-b from-slate-900/30 via-transparent to-slate-900/50"}),a.jsx(go,{home:`/${t}`,item:i})]})}):a.jsx("div",{className:"relative w-full h-screen overflow-hidden bg-slate-900 flex items-center justify-center",children:a.jsx("div",{className:"text-white text-2xl",children:"Producto no encontrado"})})},Pb=({world:e,worldSlug:t=e,overlay:n=!1,itemsData:s})=>{const[i,r]=b.useState(null),{itemSlug:o}=Se.useParams(),l=Se.useNavigate();b.useEffect(()=>{if(o){const u=s.find(d=>d.slug===o);u&&(r(u),console.log(JSON.stringify(u)))}},[o]);const c={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}};return i?a.jsx(a.Fragment,{children:a.jsxs(S.div,{className:"relative w-full h-full",variants:c,initial:"initial",animate:"animate",exit:"exit",transition:{duration:.8},children:[n&&a.jsx("div",{id:"ItemPage",className:"absolute inset-0 bg-gradient-to-b from-slate-900/30 via-transparent to-slate-900/50"}),a.jsx(gu,{item:i.simulation,onClose:()=>l(`/${t}`)},o)]})}):a.jsx("div",{className:"relative w-full h-screen overflow-hidden bg-slate-900 flex items-center justify-center",children:a.jsx("div",{className:"text-white text-2xl",children:"Producto no encontrado"})})},jb=({items:e,world:t,overlay:n=!1,title:s})=>{const[i,r]=b.useState(""),o={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}};return a.jsx(Ce,{children:a.jsxs(S.div,{className:"relative w-full h-full",variants:o,initial:"initial",animate:"animate",exit:"exit",transition:{duration:.8},children:[n&&a.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-slate-900/20 via-transparent to-slate-900/40"}),e&&a.jsx(mo,{parent:t,items:e,onShipSelect:r,selectedShip:i}),a.jsx(go,{home:"/",item:s})]})})},Ib=()=>{const e=Se.useLocation(),{sendMessage:t}=Ut(),n=xe().wsRoom;return b.useEffect(()=>{console.log("RouteListener: "+e.pathname+e.hash),t({type:"publish",room:n,payload:{type:"camera",target:pc(e.pathname)}})},[e]),null};q.CardsButton=Wl,q.ControlPanel=co,q.DynamicLucideIcon=Yl,q.EventProvider=Om,q.FontSizeManager=yb,q.FullScreenPage=Nb,q.IconButton=Pi,q.InfoCard=ao,q.ItemPage=kb,q.Layout=Eb,q.LayoutIframe=vb,q.LayoutTransparent=wb,q.LayoutWorld=Sb,q.LinkItemButton=Un,q.MinimizeProvider=Am,q.MinimizeWrapper=fo,q.NodosButton=yc,q.PointButton=Cb,q.RouteListener=Ib,q.ShipNavigation=mo,q.ShowcaseProvider=xb,q.SimulacionButton=xc,q.SlidePage=Pb,q.TabView=pu,q.TitleSection=go,q.VideoBackground=po,q.VideoProvider=Tb,q.WebSocketProvider=Cp,q.WebSocketStatusWidget=uo,q.WorldPage=jb,q.cinematicsEndEvent=gc,q.cinematicsStartEvent=Yt,q.cn=bn,q.codigoANombre=Tp,q.getConfig=xe,q.initLibConfig=Su,q.nombreACodigo=mc,q.toTarget=pc,q.toVideo=Ep,q.useAutoModeTimer=ho,q.useEvent=vt,q.useMinimize=Vm,q.useOptionalMinimize=Ii,q.useScreenSize=Li,q.useShowcase=lo,q.useVideo=vu,q.useWebSocket=Ut,Object.defineProperty(q,Symbol.toStringTag,{value:"Module"})}));
|
|
519
|
+
`})]})})}const bu="app-font-size",bb="100",yb=()=>{const[e,t]=Se.useSearchParams(),n=e.get("size"),s=localStorage.getItem(bu);let i=bb;return n&&!isNaN(parseInt(n))?i=n:s&&!isNaN(parseInt(s))&&(i=s),b.useEffect(()=>{document.documentElement.style.fontSize=`${i}%`,n&&localStorage.setItem(bu,n)},[i,n,e,t]),null},yu=b.createContext(void 0),xb=({children:e})=>{const[t,n]=b.useState(!1),s=()=>n(i=>!i);return a.jsx(yu.Provider,{value:{isAutoMode:t,setIsAutoMode:n,toggleAutoMode:s},children:e})},lo=()=>{const e=b.useContext(yu);if(!e)throw new Error("useShowcase debe usarse dentro de un ShowcaseProvider");return e};function co(){const[e,t]=b.useState("physical"),[n,s]=b.useState(!1),[i,r]=b.useState(!1),[o,l]=b.useState("Navantia Global"),[c,u]=b.useState("high"),[d,f]=b.useState("es"),[h,m]=b.useState(!0),p=xe().controlPanelLevels,y=["physical","hybrid","digital"],v=["high","medium","low"],{t:x,i18n:C}=jt.useTranslation(),N=Se.useNavigate(),I=Se.useLocation(),{sendMessage:A}=Ut(),k=xe().wsRoom,{isAutoMode:E,toggleAutoMode:w}=lo();b.useEffect(()=>{C.changeLanguage(d)},[d]),b.useEffect(()=>{if(console.log("Location en control-panel: "+I.pathname),I.pathname!=="/"){const P=p.filter(_=>_.slug.length>1).find(_=>I.pathname.startsWith(_.slug));P&&(console.log("Se va a seleccionar "+P.title),l(P.title))}},[I]),b.useEffect(()=>{A({type:"publish",room:k,payload:{type:"layer",target:e}})},[e]);const j=()=>{t(P=>{const M=(y.indexOf(P)+1)%y.length;return y[M]})},$=()=>{f(P=>P==="es"?"en":"es")},z=()=>{w()},Q=()=>{switch(e){case"physical":return F.Box;case"hybrid":return F.GitMerge;case"digital":return F.Cpu;default:return F.Layers}},R=P=>{switch(P){case"low":return F.Zap;case"medium":return F.Scale;case"high":return F.Flame;default:return F.Gauge}},se=P=>{switch(P){case"Navantia Global":return F.Globe;case"Smart Catalogue":return F.BookOpen;case"Coex":return F.Network;case"Plataformas Navales":return F.Ship;case"Desarrollos tecnológicos":return F.Zap;default:return F.Layers}},U=()=>{switch(e){case"physical":return{bg:"bg-slate-700/90 hover:bg-slate-600/90",text:"text-blue-200",border:"border-slate-400/30 hover:border-slate-400/60",shadow:"shadow-lg hover:shadow-slate-500/50",badgeBg:"bg-slate-600/20",badgeText:"text-blue-200",badgeBorder:"border-slate-400/30"};case"hybrid":return{bg:"bg-teal-900/90 hover:bg-teal-800/90",text:"text-teal-300",border:"border-teal-400/30 hover:border-teal-400/60",shadow:"shadow-lg hover:shadow-teal-500/50",badgeBg:"bg-teal-500/20",badgeText:"text-teal-300",badgeBorder:"border-teal-400/30"};case"digital":return{bg:"bg-sky-900/90 hover:bg-sky-800/90",text:"text-sky-300",border:"border-sky-400/30 hover:border-sky-400/60",shadow:"shadow-lg hover:shadow-sky-500/50",badgeBg:"bg-sky-500/20",badgeText:"text-sky-300",badgeBorder:"border-sky-400/30"};default:return{bg:"bg-slate-800/90 hover:bg-slate-700/90",text:"text-cyan-300",border:"border-cyan-400/30 hover:border-cyan-400/60",shadow:"shadow-lg hover:shadow-cyan-500/50",badgeBg:"bg-cyan-500/20",badgeText:"text-cyan-300",badgeBorder:"border-cyan-400/30"}}},J=Q(),V=U();return a.jsxs(a.Fragment,{children:[a.jsxs(S.div,{className:"fixed bottom-8 left-8 z-40",initial:{opacity:0,y:50},animate:{opacity:h?0:1,y:0,x:h?-400:0,pointerEvents:h?"none":"auto"},transition:{delay:h?0:.3,duration:.6,ease:[.34,1.56,.64,1]},children:[a.jsx(Ce,{children:i&&a.jsx(S.div,{className:"absolute bottom-full left-0 mb-3 w-80",initial:{opacity:0,y:20,scale:.9},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:20,scale:.9},transition:{duration:.4,ease:[.34,1.56,.64,1]},children:a.jsxs("div",{className:"relative",children:[a.jsx(S.div,{className:"absolute inset-0 bg-gradient-to-t from-red-500/20 via-amber-500/10 to-transparent rounded-3xl blur-xl",animate:{opacity:[.5,.8,.5],scale:[1,1.05,1]},transition:{duration:3,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}}),a.jsxs("div",{className:"relative bg-gradient-to-b from-slate-900/98 via-slate-800/95 to-slate-900/98 backdrop-blur-xl rounded-3xl border border-red-400/40 shadow-2xl overflow-hidden",children:[a.jsx("div",{className:"px-6 py-4 border-b border-red-400/20 bg-gradient-to-r from-red-500/10 to-amber-500/10",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("h3",{className:"text-red-300 font-semibold text-sm tracking-wider",children:"MODO DE RENDERIZADO"}),a.jsx(S.div,{className:"w-2 h-2 rounded-full bg-red-400",animate:{boxShadow:["0 0 10px rgba(248, 113, 113, 0.5)","0 0 20px rgba(248, 113, 113, 1)","0 0 10px rgba(248, 113, 113, 0.5)"]},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}})]})}),a.jsx("div",{className:"p-4 space-y-3",children:v.map((P,_)=>{const M=c===P,T=R(P),O=(()=>{switch(P){case"low":return{bg:M?"bg-gradient-to-r from-green-500/30 via-emerald-500/30 to-green-500/30":"bg-slate-800/60",border:M?"border-2 border-green-400":"border border-green-400/20 hover:border-green-400/50",shadow:M?"shadow-lg shadow-green-500/50":"",iconBg:M?"bg-green-500":"bg-slate-700/80 group-hover:bg-slate-700",iconText:M?"text-slate-900":"text-green-300 group-hover:text-green-200",text:M?"text-white":"text-green-200 group-hover:text-green-100",indicator:"bg-green-400",glowColor:"rgba(34, 197, 94, 0.5)"};case"medium":return{bg:M?"bg-gradient-to-r from-amber-500/30 via-yellow-500/30 to-amber-500/30":"bg-slate-800/60",border:M?"border-2 border-amber-400":"border border-amber-400/20 hover:border-amber-400/50",shadow:M?"shadow-lg shadow-amber-500/50":"",iconBg:M?"bg-amber-500":"bg-slate-700/80 group-hover:bg-slate-700",iconText:M?"text-slate-900":"text-amber-300 group-hover:text-amber-200",text:M?"text-white":"text-amber-200 group-hover:text-amber-100",indicator:"bg-amber-400",glowColor:"rgba(251, 191, 36, 0.5)"};case"high":return{bg:M?"bg-gradient-to-r from-red-500/30 via-orange-500/30 to-red-500/30":"bg-slate-800/60",border:M?"border-2 border-red-400":"border border-red-400/20 hover:border-red-400/50",shadow:M?"shadow-lg shadow-red-500/50":"",iconBg:M?"bg-red-500":"bg-slate-700/80 group-hover:bg-slate-700",iconText:M?"text-slate-900":"text-red-300 group-hover:text-red-200",text:M?"text-white":"text-red-200 group-hover:text-red-100",indicator:"bg-red-400",glowColor:"rgba(239, 68, 68, 0.5)"}}})();return a.jsx(S.button,{onClick:()=>{u(P),r(!1)},className:`w-full text-left relative group ${M?"z-10":"z-0"}`,initial:{opacity:0,x:-50,rotateY:-20},animate:{opacity:1,x:0,rotateY:0},transition:{delay:_*.08,duration:.5,ease:[.34,1.56,.64,1]},whileHover:{scale:1.02,x:8},whileTap:{scale:.98},children:a.jsxs("div",{className:`relative rounded-2xl transition-all duration-500 ${O.bg} ${O.border} ${O.shadow} hover:bg-slate-800/80`,children:[M&&a.jsx(S.div,{className:"absolute inset-0 rounded-2xl",style:{background:`radial-gradient(circle at center, ${O.glowColor} 0%, transparent 70%)`},animate:{opacity:[.3,.6,.3]},transition:{duration:3,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}}),a.jsxs("div",{className:"relative flex items-center gap-4 px-4 py-3",children:[a.jsxs(S.div,{className:`flex-shrink-0 w-10 h-10 rounded-xl flex items-center justify-center font-bold text-lg relative ${O.iconBg} ${O.iconText}`,animate:M?{boxShadow:[`0 0 15px ${O.glowColor}`,`0 0 25px ${O.glowColor}`,`0 0 15px ${O.glowColor}`]}:{},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"},children:[a.jsx(T,{className:"w-5 h-5"}),M&&a.jsxs(a.Fragment,{children:[a.jsx(S.div,{className:"absolute inset-0 border-2 rounded-xl opacity-50",style:{borderColor:O.glowColor},animate:{scale:[1,1.3,1],opacity:[.5,0,.5]},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeOut"}}),a.jsx(S.div,{className:"absolute inset-0 border-2 rounded-xl opacity-50",style:{borderColor:O.glowColor},animate:{scale:[1,1.5,1],opacity:[.5,0,.5]},transition:{duration:2,delay:.5,repeat:Number.POSITIVE_INFINITY,ease:"easeOut"}})]})]}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx(S.p,{className:`font-semibold text-sm transition-colors duration-300 ${O.text}`,animate:M?{textShadow:[`0 0 10px ${O.glowColor}`,`0 0 20px ${O.glowColor}`,`0 0 10px ${O.glowColor}`]}:{},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"},children:P}),M&&a.jsx(S.div,{className:"mt-1.5 h-1 bg-slate-700/50 rounded-full overflow-hidden",initial:{width:0},animate:{width:"100%"},transition:{duration:.5,delay:.2},children:a.jsx(S.div,{className:`h-full ${O.indicator}`,initial:{x:"-100%"},animate:{x:"0%"},transition:{duration:.8,delay:.3,ease:"easeOut"}})})]}),a.jsx(S.div,{className:`flex-shrink-0 w-3 h-3 rounded-full ${M?O.indicator:"bg-slate-600 group-hover:bg-slate-500"}`,animate:M?{scale:[1,1.3,1],boxShadow:[`0 0 10px ${O.glowColor}`,`0 0 20px ${O.glowColor}`,`0 0 10px ${O.glowColor}`]}:{},transition:{duration:1.5,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}})]}),a.jsx(S.div,{className:"absolute inset-0 rounded-2xl opacity-0 group-hover:opacity-100 transition-opacity duration-300",style:{background:`radial-gradient(circle at center, ${O.glowColor} 0%, transparent 70%)`}})]})},P)})}),a.jsx(S.div,{className:"px-6 py-3 border-t border-red-400/20 bg-gradient-to-r from-slate-900/50 to-slate-800/50",initial:{opacity:0},animate:{opacity:1},transition:{delay:.4},children:a.jsxs("p",{className:"text-xs text-red-300/80 text-center",children:[v.length," modos disponibles"]})})]})]})})}),a.jsx(Ce,{children:n&&a.jsx(S.div,{className:"absolute bottom-full left-0 mb-3 w-80",initial:{opacity:0,y:20,scale:.9},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:20,scale:.9},transition:{duration:.4,ease:[.34,1.56,.64,1]},children:a.jsxs("div",{className:"relative",children:[a.jsx(S.div,{className:"absolute inset-0 bg-gradient-to-t from-cyan-500/20 via-teal-500/10 to-transparent rounded-3xl blur-xl",animate:{opacity:[.5,.8,.5],scale:[1,1.05,1]},transition:{duration:3,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}}),a.jsxs("div",{className:"relative bg-gradient-to-b from-slate-900/98 via-slate-800/95 to-slate-900/98 backdrop-blur-xl rounded-3xl border border-cyan-400/40 shadow-2xl overflow-hidden",children:[a.jsx("div",{className:"px-6 py-4 border-b border-cyan-400/20 bg-gradient-to-r from-cyan-500/10 to-teal-500/10",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("h3",{className:"text-cyan-300 font-semibold text-sm tracking-wider",children:"SELECCIONAR NIVEL"}),a.jsx(S.div,{className:"w-2 h-2 rounded-full bg-cyan-400",animate:{boxShadow:["0 0 10px rgba(34, 211, 238, 0.5)","0 0 20px rgba(34, 211, 238, 1)","0 0 10px rgba(34, 211, 238, 0.5)"]},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}})]})}),a.jsxs("div",{className:"p-4 space-y-3 relative",children:[a.jsx(S.div,{className:"absolute left-10 top-8 bottom-8 w-0.5 bg-gradient-to-b from-cyan-500/50 via-teal-500/50 to-cyan-500/50",initial:{scaleY:0},animate:{scaleY:1},transition:{duration:.8,ease:"easeOut"}}),p.map((P,_)=>{const M=o===P.title,T=se(P.title);return a.jsx(S.button,{onClick:()=>{N(P.slug),l(P.title),s(!1)},className:`w-full text-left relative group ${M?"z-10":"z-0"}`,initial:{opacity:0,x:-50,rotateY:-20},animate:{opacity:1,x:0,rotateY:0},transition:{delay:_*.08,duration:.5,ease:[.34,1.56,.64,1]},whileHover:{scale:1.02,x:8},whileTap:{scale:.98},children:a.jsxs("div",{className:`relative rounded-2xl transition-all duration-500 ${M?"bg-gradient-to-r from-cyan-500/30 via-teal-500/30 to-cyan-500/30 border-2 border-cyan-400 shadow-lg shadow-cyan-500/50":"bg-slate-800/60 border border-cyan-400/20 hover:border-cyan-400/50 hover:bg-slate-800/80"}`,children:[M&&a.jsx(S.div,{className:"absolute inset-0 bg-gradient-to-r from-cyan-500/20 via-teal-500/20 to-cyan-500/20 rounded-2xl",animate:{opacity:[.5,.8,.5]},transition:{duration:3,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}}),a.jsxs("div",{className:"relative flex items-center gap-4 px-4 py-3",children:[a.jsxs(S.div,{className:`flex-shrink-0 w-10 h-10 rounded-xl flex items-center justify-center font-bold text-lg relative ${M?"bg-cyan-500 text-slate-900":"bg-slate-700/80 text-cyan-300 group-hover:bg-slate-700 group-hover:text-cyan-200"}`,animate:M?{boxShadow:["0 0 15px rgba(34, 211, 238, 0.5)","0 0 25px rgba(34, 211, 238, 0.8)","0 0 15px rgba(34, 211, 238, 0.5)"]}:{},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"},children:[a.jsx(T,{className:"w-5 h-5"}),M&&a.jsxs(a.Fragment,{children:[a.jsx(S.div,{className:"absolute inset-0 border-2 border-cyan-400/50 rounded-xl",animate:{scale:[1,1.3,1],opacity:[.5,0,.5]},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeOut"}}),a.jsx(S.div,{className:"absolute inset-0 border-2 border-teal-400/50 rounded-xl",animate:{scale:[1,1.5,1],opacity:[.5,0,.5]},transition:{duration:2,delay:.5,repeat:Number.POSITIVE_INFINITY,ease:"easeOut"}})]})]}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx(S.p,{className:`font-semibold text-sm transition-colors duration-300 ${M?"text-white":"text-cyan-200 group-hover:text-cyan-100"}`,animate:M?{textShadow:["0 0 10px rgba(34, 211, 238, 0.3)","0 0 20px rgba(34, 211, 238, 0.6)","0 0 10px rgba(34, 211, 238, 0.3)"]}:{},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"},children:P.title}),M&&a.jsx(S.div,{className:"mt-1.5 h-1 bg-slate-700/50 rounded-full overflow-hidden",initial:{width:0},animate:{width:"100%"},transition:{duration:.5,delay:.2},children:a.jsx(S.div,{className:"h-full bg-gradient-to-r from-cyan-400 to-teal-400",initial:{x:"-100%"},animate:{x:"0%"},transition:{duration:.8,delay:.3,ease:"easeOut"}})})]}),a.jsx(S.div,{className:`flex-shrink-0 w-3 h-3 rounded-full ${M?"bg-cyan-400":"bg-slate-600 group-hover:bg-cyan-500/50"}`,animate:M?{scale:[1,1.3,1],boxShadow:["0 0 10px rgba(34, 211, 238, 0.5)","0 0 20px rgba(34, 211, 238, 1)","0 0 10px rgba(34, 211, 238, 0.5)"]}:{},transition:{duration:1.5,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}})]}),a.jsx(S.div,{className:"absolute inset-0 rounded-2xl opacity-0 group-hover:opacity-100 transition-opacity duration-300",style:{background:"radial-gradient(circle at center, rgba(34, 211, 238, 0.1) 0%, transparent 70%)"}})]})},P.title)})]}),a.jsx(S.div,{className:"px-6 py-3 border-t border-cyan-400/20 bg-gradient-to-r from-slate-900/50 to-slate-800/50",initial:{opacity:0},animate:{opacity:1},transition:{delay:.6},children:a.jsxs("p",{className:"text-xs text-cyan-300/80 text-center",children:[p.length," niveles disponibles"]})})]})]})})}),a.jsxs(S.button,{onClick:()=>s(!n),className:"flex items-center gap-3 px-6 py-3 bg-slate-800/90 hover:bg-slate-700/90 text-cyan-300 font-medium text-sm rounded-full transition-all duration-300 shadow-lg hover:shadow-cyan-500/50 border border-cyan-400/30 hover:border-cyan-400/60 mb-3 w-60",whileHover:{scale:1.02},whileTap:{scale:.98},animate:{borderColor:n?["rgba(34, 211, 238, 0.3)","rgba(34, 211, 238, 0.6)","rgba(34, 211, 238, 0.3)"]:"rgba(34, 211, 238, 0.3)"},transition:{borderColor:{duration:2,repeat:n?Number.POSITIVE_INFINITY:0,ease:"easeInOut"}},children:[a.jsx(Ce,{mode:"wait",children:a.jsx(S.div,{initial:{scale:0,rotate:-180,opacity:0,filter:"blur(10px)"},animate:{scale:1,rotate:0,opacity:1,filter:"blur(0px)"},exit:{scale:0,rotate:180,opacity:0,filter:"blur(10px)"},transition:{duration:.5,ease:[.34,1.56,.64,1],scale:{type:"spring",stiffness:300,damping:20}},children:a.jsx(F.Layers,{className:"w-5 h-5"})},n?"open":"closed")}),a.jsx("span",{children:x("control-panel.nivel")}),a.jsx(S.span,{className:"px-3 py-1 bg-cyan-500/20 text-cyan-300 rounded-full text-xs font-semibold border border-cyan-400/30 leading-3",initial:{opacity:0,scale:.8,y:-10},animate:{opacity:1,scale:1,y:0},transition:{duration:.4,ease:[.34,1.56,.64,1]},children:o},`level-badge-${o}`)]}),a.jsxs(S.button,{onClick:j,className:`flex items-center gap-3 px-6 py-3 ${V.bg} ${V.text} font-medium text-sm rounded-full transition-all duration-300 ${V.shadow} border ${V.border} mb-3`,whileHover:{scale:1.05},whileTap:{scale:.95,rotate:15},animate:{scale:[1,1.02,1]},transition:{scale:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}},children:[a.jsx(Ce,{mode:"wait",children:a.jsx(S.div,{initial:{scale:0,rotate:-180,opacity:0,filter:"blur(10px)"},animate:{scale:1,rotate:0,opacity:1,filter:"blur(0px)"},exit:{scale:0,rotate:180,opacity:0,filter:"blur(10px)"},transition:{duration:.5,ease:[.34,1.56,.64,1],scale:{type:"spring",stiffness:300,damping:20}},children:a.jsx(J,{className:"w-5 h-5"})},e)}),a.jsx("span",{children:"Layer Switch"}),a.jsx(S.span,{className:`px-3 py-1 ${V.badgeBg} ${V.badgeText} rounded-full text-xs font-semibold border ${V.badgeBorder}`,initial:{opacity:0,scale:.8,y:-10},animate:{opacity:1,scale:1,y:0},transition:{duration:.4,ease:[.34,1.56,.64,1]},children:x(`control-panel.layer.${e}`)},`badge-${e}`)]}),a.jsxs(S.button,{onClick:$,className:"flex items-center gap-3 px-6 py-3 bg-slate-800/90 hover:bg-slate-700/90 text-cyan-300 font-medium text-sm rounded-full transition-all duration-300 shadow-lg hover:shadow-cyan-500/50 border border-cyan-400/30 hover:border-cyan-400/60 mb-3",whileHover:{scale:1.05},whileTap:{scale:.95,rotate:15},animate:{scale:[1,1.02,1]},transition:{scale:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}},children:[a.jsx(Ce,{mode:"wait",children:a.jsx(S.div,{initial:{scale:0,rotate:-180,opacity:0,filter:"blur(10px)"},animate:{scale:1,rotate:0,opacity:1,filter:"blur(0px)"},exit:{scale:0,rotate:180,opacity:0,filter:"blur(10px)"},transition:{duration:.5,ease:[.34,1.56,.64,1],scale:{type:"spring",stiffness:300,damping:20}},children:a.jsx(F.Languages,{className:"w-5 h-5"})},d)}),a.jsx("span",{children:x("control-panel.idioma")}),a.jsx(S.span,{className:"px-3 py-1 bg-cyan-500/20 text-cyan-300 rounded-full text-xs font-semibold border border-cyan-400/30",initial:{opacity:0,scale:.8,y:-10},animate:{opacity:1,scale:1,y:0},transition:{duration:.4,ease:[.34,1.56,.64,1]},children:d==="es"?"Español":"English"},`language-badge-${d}`)]}),a.jsxs(S.button,{onClick:z,className:"flex items-center gap-3 px-6 py-3 bg-slate-800/90 hover:bg-slate-700/90 text-cyan-300 font-medium text-sm rounded-full transition-all duration-300 shadow-lg hover:shadow-cyan-500/50 border border-cyan-400/30 hover:border-cyan-400/60",whileHover:{scale:1.05},whileTap:{scale:.95,rotate:15},animate:{scale:[1,1.02,1]},transition:{scale:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}},children:[a.jsx(Ce,{mode:"wait",children:a.jsx(S.div,{initial:{scale:0,rotate:-180,opacity:0,filter:"blur(10px)"},animate:{scale:1,rotate:0,opacity:1,filter:"blur(0px)"},exit:{scale:0,rotate:180,opacity:0,filter:"blur(10px)"},transition:{duration:.5,ease:[.34,1.56,.64,1],scale:{type:"spring",stiffness:300,damping:20}},children:a.jsx(F.Presentation,{className:"w-5 h-5"})},d)}),a.jsx("span",{children:x("control-panel.showcasemode")}),a.jsx(S.span,{className:"px-3 py-1 bg-cyan-500/20 text-cyan-300 rounded-full text-xs font-semibold border border-cyan-400/30",initial:{opacity:0,scale:.8,y:-10},animate:{opacity:1,scale:1,y:0},transition:{duration:.4,ease:[.34,1.56,.64,1]},children:E?"ON":"OFF"},`showcase-badge-${E}`)]}),a.jsx(S.button,{onClick:()=>m(!h),className:"mt-3 p-2.5 bg-white/30 hover:bg-white/40 text-white rounded-full transition-all duration-300 backdrop-blur-md border-2 border-white/40 hover:border-white/60 z-[60] shadow-xl",animate:{x:[0,5,0]},transition:{x:{repeat:Number.POSITIVE_INFINITY,duration:1.5,ease:"easeInOut"}},whileHover:{scale:1.15},whileTap:{scale:.95},children:a.jsx(S.div,{animate:{rotate:h?180:0},transition:{duration:.4,ease:[.34,1.56,.64,1]},children:a.jsx(F.ChevronLeft,{className:"w-5 h-5"})})})]}),a.jsx(Ce,{children:h&&a.jsx(S.button,{onClick:()=>m(!1),className:"fixed bottom-8 left-8 p-3 bg-white/10 hover:bg-white/20 text-white rounded-full transition-all duration-300 backdrop-blur-sm border border-white/10 hover:border-white/30 z-40",initial:{opacity:0,x:-50,scale:0},animate:{opacity:.6,x:0,scale:1},exit:{opacity:0,x:-50,scale:0},transition:{duration:.5,ease:[.34,1.56,.64,1]},whileHover:{scale:1.1,opacity:1,x:5},whileTap:{scale:.95},children:a.jsx(S.div,{animate:{x:[0,8,0]},transition:{repeat:Number.POSITIVE_INFINITY,duration:1.5,ease:"easeInOut"},children:a.jsx(F.ChevronRight,{className:"w-6 h-6"})})})})]})}function uo(){const{isConnected:e,reconnect:t}=Ut(),s={connected:{color:"bg-emerald-500",ringColor:"ring-emerald-500/30",label:"Conectado",animate:!0},connecting:{color:"bg-amber-500",ringColor:"ring-amber-500/30",label:"Conectando...",animate:!0},disconnected:{color:"bg-red-500",ringColor:"ring-red-500/30",label:"Desconectado",animate:!1}}[e?"connected":"disconnected"],i=!e&&t;return a.jsxs("div",{className:bn("fixed z-50 flex items-center gap-2 rounded-full bg-background/80 backdrop-blur-sm px-3 py-2 shadow-lg","top-1 right-2",i&&"cursor-pointer hover:bg-accent transition-colors"),onClick:i?t:void 0,role:i?"button":void 0,"aria-label":i?"Reconectar WebSocket":`Estado: ${s.label}`,children:[a.jsxs("div",{className:"relative flex items-center justify-center",children:[a.jsx("div",{className:bn("w-2.5 h-2.5 rounded-full",s.color,s.animate&&"animate-pulse")}),s.animate&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:bn("absolute w-2.5 h-2.5 rounded-full ring-2",s.ringColor,"animate-ping")}),a.jsx("div",{className:bn("absolute w-4 h-4 rounded-full ring-1",s.ringColor)})]})]}),a.jsx("div",{className:"flex items-center gap-1",children:a.jsx("div",{className:"h-0.5 w-8 relative overflow-hidden transition-all duration-500 bg-emerald-500",children:a.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-transparent via-green-300 to-transparent animate-flow-right"})})}),a.jsx("div",{className:"relative flex items-center justify-center",children:a.jsx("div",{className:"w-2.5 h-2.5"})}),!1,!1]})}function fo({children:e}){const t=Ii();if(!t)return a.jsx(a.Fragment,{children:e});const{isMinimized:n}=t;return a.jsxs(a.Fragment,{children:[a.jsx(S.div,{className:"relative w-full h-full",initial:!1,animate:{scaleY:n?0:1,opacity:n?0:1},transition:{duration:.6,ease:[.4,0,.2,1]},style:{transformOrigin:"bottom"},children:e}),a.jsx(Np,{})]})}const ho=()=>{const{isAutoMode:e}=lo(),{pathname:t}=Se.useLocation(),n=Se.useNavigate(),s=b.useRef(null),i=xe()?.showcasesUrl??[],r=xe().showcasesWait??12e4,o=()=>{const d=(i.indexOf(t)+1)%i.length;n(i[d])},l=()=>{s.current&&clearInterval(s.current),s.current=setInterval(o,r)},c=()=>{s.current&&(clearInterval(s.current),s.current=null)};b.useEffect(()=>(e?l():c(),()=>c()),[e]),b.useEffect(()=>{e&&l()},[t,e])};function vb({showControlPanel:e=!0,iframeSrc:t=""}){return ho(),a.jsxs("div",{className:"relative w-full h-screen overflow-hidden bg-transparent",children:[a.jsx("div",{className:"z-1 fixed inset-0",children:a.jsx("iframe",{id:"vagonFrame",allow:"microphone *; clipboard-read *; clipboard-write *; encrypted-media *; fullscreen *;",className:"z-1 w-full h-screen",src:t})}),a.jsx(fo,{children:a.jsxs("div",{className:"relative z-10 h-full bg-transparent",children:[a.jsx(Se.Outlet,{}),e&&a.jsx(co,{})]})}),a.jsx(uo,{})]})}function wb({showControlPanel:e=!0}){return ho(),a.jsxs("div",{className:"relative w-full h-screen overflow-hidden bg-transparent",children:[a.jsx("div",{className:"pointer-events-none absolute top-0 left-0 w-full h-50 bg-gradient-to-b from-[#17252c]/70 to-transparent"}),a.jsx(fo,{children:a.jsxs("div",{className:"relative z-10 h-full bg-transparent",children:[a.jsx(Se.Outlet,{}),e&&a.jsx(co,{})]})}),a.jsx(uo,{})]})}function mo({items:e,parent:t,selectedShip:n,onShipSelect:s}){const[i,r]=b.useState(0),[o,l]=b.useState(!1),[c,u]=b.useState(6),[d,f]=b.useState(!0),[h,m]=b.useState(0),[p,y]=b.useState("slide"),[v,x]=b.useState(160),{t:C}=jt.useTranslation(),{lastEvent:N,internalEvent:I,setInternalEvent:A}=vt(),k=xe().cinematics??!1,E=xe().cinematicsOnChangeLocation??!1;k&&(b.useEffect(()=>{N?.payload?.type==="cinematics"&&N?.payload?.action==="end"&&f(!0)},[N]),b.useEffect(()=>{if(I?.payload?.type==="cinematics"){const V=I?.payload?.action;V==="start"&&f(!1),V==="end"&&f(!0)}},[I]));const w=V=>{const _=(Math.ceil(R.length/c)-1)*c*v;return V>0?0:Math.abs(V)>_?-_:V},j=V=>-(V*c*v),$=V=>{const P=Math.floor(c/2),_=Math.floor(V/c),M=(V-_*c-P)*v,T=-(_*c*v+M);return w(T)},z=Se.useNavigate(),Q=xe().baseUrl??"",R=e;b.useEffect(()=>{const V=()=>{let P;window.innerWidth<640?(u(2),P=120):window.innerWidth<768?(u(3),P=140):window.innerWidth<1024?(u(4),P=160):(u(6),P=180),x(P)};return V(),window.addEventListener("resize",V),()=>window.removeEventListener("resize",V)},[]),b.useEffect(()=>{if(!n){r(0),y("center"),m($(0));return}const V=R.findIndex(_=>_.slug===n);if(V===-1){r(0),y("center"),m($(0));return}const P=Math.floor(V/c);P!==i&&r(P),y("center"),m($(V))},[n,c,v,R]),b.useEffect(()=>{if(p==="slide")m(j(i));else{const V=R.findIndex(P=>P.slug===n);V!==-1&&m($(V))}},[c,v]);const se=V=>{s(V),y("center");const P=R.findIndex(_=>_.slug===V);P!==-1&&m($(P)),z(`${t?`/${t}/`:"/"}${V}`),k&&E&&A({...Yt})},U=()=>{const V=Math.ceil(R.length/c),P=(i+1)%V;y("slide"),r(P),m(j(P))},J=()=>{const V=Math.ceil(R.length/c),P=(i-1+V)%V;y("slide"),r(P),m(j(P))};return a.jsxs(Ce,{children:[d&&a.jsxs(S.div,{className:"absolute top-0 left-0 right-0 flex flex-col items-center justify-center z-10",initial:{opacity:0,y:-50},animate:{opacity:o?0:1,y:o?-200:0,pointerEvents:o?"none":"auto"},transition:{duration:.6,ease:[.34,1.56,.64,1]},exit:{opacity:0,y:-50,scale:.8},children:[a.jsxs(S.div,{className:"relative flex items-center justify-center w-full max-w-7xl",animate:{y:0},transition:{duration:.3,ease:"easeInOut"},children:[a.jsx(S.button,{className:"absolute left-1 sm:left-2 md:left-4 z-20 w-8 h-8 sm:w-10 sm:h-10 bg-slate-900/40 backdrop-blur-sm rounded-full border border-blue-400/20 hover:border-blue-400/40 flex items-center justify-center text-white/60 hover:text-white transition-all duration-300 hover:bg-slate-800/60",onClick:J,whileHover:{scale:1.05,x:-2},whileTap:{scale:.95},disabled:i===0,style:{opacity:i===0?.3:1,pointerEvents:i===0?"none":"auto"},children:a.jsx(F.ArrowLeft,{className:"w-3 h-3 sm:w-4 sm:h-4"})}),a.jsx("div",{className:"flex p-2 sm:p-4 mx-10 sm:mx-16 overflow-hidden",children:a.jsx(S.div,{className:"flex space-x-2 sm:space-x-4 md:space-x-8",animate:{x:h},transition:{duration:.6,ease:[.25,.46,.45,.94]},children:R.map((V,P)=>a.jsxs(S.div,{className:`flex flex-col gap-1 items-center cursor-pointer group min-w-[100px] sm:min-w-[120px] md:min-w-[144px] ${n===V.slug?"scale-110":""}`,onClick:()=>se(V.slug),whileHover:{scale:1.05,y:-4},whileTap:{scale:.98},initial:{opacity:0,y:20},animate:{opacity:1,y:0,transition:{delay:P*.1}},children:[a.jsxs("div",{className:`relative w-24 h-24 sm:w-28 sm:h-28 md:w-32 md:h-32 flex flex-col gap-1 align-bottom items-center justify-end py-2 sm:pt-4 rounded-lg transition-all duration-500 ${n===V.slug?"bg-blue-700/80 shadow-lg shadow-blue-500/30 border border-blue-400/50":"bg-zinc-500/1 hover:bg-blue-900/40 border border-transparent hover:border-blue-600/30"}`,children:[a.jsx("div",{className:"w-full h-12 sm:h-16 relative flex items-center justify-center px-4",children:a.jsx("img",{src:`${Q.replace(/\/$/,"")}/images/shapes/${V.icon??V.slug}.png`,alt:V.name,width:120,height:40,className:"object-contain brightness-200 filter transition-all duration-300 group-hover:brightness-300"})}),a.jsx("div",{className:" text-center",children:a.jsx("div",{className:"text-cyan-300 text-xs sm:text-sm font-medium transition-colors duration-300 group-hover:text-cyan-200",children:C(V.name)})})]}),V.label&&a.jsx("div",{className:"mt-1",children:a.jsx("span",{className:`text-[10px] sm:text-xs px-2 sm:px-3 py-1 rounded-md transition-all duration-300 ${n===V.slug?"bg-cyan-500/80 text-blue-900 shadow-md":"bg-blue-900/60 text-cyan-300 group-hover:bg-blue-800/70 group-hover:text-cyan-200"}`,children:V.label})})]},V.slug))})}),a.jsx(S.button,{className:"absolute right-1 sm:right-2 md:right-4 z-20 w-8 h-8 sm:w-10 sm:h-10 bg-slate-900/40 backdrop-blur-sm rounded-full border border-blue-400/20 hover:border-blue-400/40 flex items-center justify-center text-white/60 hover:text-white transition-all duration-300 hover:bg-slate-800/60",onClick:U,whileHover:{scale:1.05,x:2},whileTap:{scale:.95},disabled:i===Math.ceil(R.length/c)-1,style:{opacity:i===Math.ceil(R.length/c)-1?.3:1,pointerEvents:i===Math.ceil(R.length/c)-1?"none":"auto"},children:a.jsx(F.ArrowLeft,{className:"w-3 h-3 sm:w-4 sm:h-4 rotate-180"})})]}),a.jsx(S.button,{onClick:()=>l(!0),className:"p-2 bg-white/10 hover:bg-white/20 text-white rounded-full transition-all duration-300 backdrop-blur-sm border border-white/10 hover:border-white/30 z-50",initial:{opacity:0,scale:0},animate:{opacity:.6,scale:1,y:[0,5,0]},exit:{opacity:0,y:-50,scale:0},transition:{duration:.5,ease:[.34,1.56,.64,1]},whileHover:{scale:1.1,opacity:1},whileTap:{scale:.95},children:a.jsx(S.div,{animate:{rotate:o?180:0},transition:{duration:.4,ease:[.34,1.56,.64,1]},children:a.jsx(F.ChevronUp,{className:"w-5 h-5"})})})]}),o&&a.jsx(S.button,{onClick:()=>l(!1),className:"absolute top-8 left-1/2 -translate-x-1/2 p-3 bg-white/10 hover:bg-white/20 text-white rounded-full transition-all duration-300 backdrop-blur-sm border border-white/10 hover:border-white/30 z-40",initial:{opacity:0,y:-50,scale:0},animate:{opacity:.6,y:0,scale:1},exit:{opacity:0,y:-50,scale:0},transition:{duration:.5,ease:[.34,1.56,.64,1]},whileHover:{scale:1.1,opacity:1,y:5},whileTap:{scale:.95},children:a.jsx(S.div,{animate:{y:[0,8,0]},transition:{repeat:Number.POSITIVE_INFINITY,duration:1.5,ease:"easeInOut"},children:a.jsx(F.ChevronDown,{className:"w-6 h-6"})})})]})}const Sb=({items:e,world:t,worldSlug:n=t})=>{const[s,i]=b.useState(""),r={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},o=Se.useLocation(),l=Se.useNavigate(),{t:c}=jt.useTranslation(),{setInternalEvent:u}=vt(),d=xe().cinematics??!1,f=xe().cinematicsOnChangeLocation??!1;b.useEffect(()=>{o.pathname===`/${n}`?i(""):o.pathname.startsWith(n?`/${n}/`:"/")&&i(o.pathname.replace(n?`/${n}/`:"/",""))},[o]),b.useEffect(()=>{const v=x=>{const C=["INPUT","TEXTAREA"].includes(x.target.tagName),N=document.querySelector(".yarl__container"),I=document.querySelector(".simulation-mode");C||N||I||(x.key==="ArrowLeft"?(x.preventDefault(),y()):x.key==="ArrowRight"&&(x.preventDefault(),p()))};return window.addEventListener("keydown",v),()=>{window.removeEventListener("keydown",v)}},[s]),b.useEffect(()=>{let v=0,x=0,C=!1;const N=k=>{const E=k.target,w=document.getElementById("ItemPage");C=E===w,C&&(v=k.changedTouches[0].screenX)},I=k=>{C&&(x=k.changedTouches[0].screenX,A())},A=()=>{const k=x-v;Math.abs(k)<50||(k>0?y():p())};return window.addEventListener("touchstart",N),window.addEventListener("touchend",I),()=>{window.removeEventListener("touchstart",N),window.removeEventListener("touchend",I)}},[s]);const h=()=>{const x=(e.findIndex(C=>C.slug===s)+1)%e.length;return e[x]},m=()=>{const x=(e.findIndex(C=>C.slug===s)-1+e.length)%e.length;return e[x]},p=()=>{const v=h();i(v.slug),l(`${n}/${v.slug}`),d&&f&&u({...Yt})},y=()=>{const v=m();i(v.slug),l(`${n}/${v.slug}`),d&&f&&u({...Yt})};return a.jsxs(S.div,{className:"relative w-full h-full",variants:r,initial:"initial",animate:"animate",exit:"exit",transition:{duration:.8},children:[a.jsx(mo,{parent:n,items:e,onShipSelect:i,selectedShip:s}),s&&a.jsxs(a.Fragment,{children:[a.jsxs(S.button,{className:"absolute left-4 top-1/2 transform -translate-y-1/2 w-12 h-12 bg-slate-900/40 backdrop-blur-sm rounded-full border border-blue-400/20 hover:border-blue-400/60 flex items-center justify-center text-white/60 hover:text-white transition-all duration-300 hover:bg-slate-800/60 group z-30",initial:"initial",animate:"animate",whileHover:"hover",whileTap:{scale:.95},onClick:y,children:[a.jsx(F.ArrowLeft,{className:"w-6 h-6 transition-transform duration-300 group-hover:scale-110"}),a.jsxs(S.div,{className:"absolute left-16 top-1/2 transform -translate-y-1/2 bg-slate-900/95 backdrop-blur-md rounded-lg px-3 py-2 border border-blue-400/30 shadow-xl opacity-0 group-hover:opacity-100 transition-opacity duration-300 pointer-events-none whitespace-nowrap",children:[a.jsx("span",{className:"text-blue-100 font-medium text-sm",children:c("layout.anterior")}),a.jsx("div",{className:"absolute right-full top-1/2 transform -translate-y-1/2 w-0 h-0 border-t-4 border-b-4 border-r-4 border-transparent border-r-slate-900/95"})]}),a.jsx("div",{className:"absolute inset-0 rounded-full border border-blue-400/30 scale-0 group-hover:scale-125 opacity-0 group-hover:opacity-100 transition-all duration-500"})]}),a.jsxs(S.button,{className:"absolute right-4 top-1/2 transform -translate-y-1/2 w-12 h-12 bg-slate-900/40 backdrop-blur-sm rounded-full border border-blue-400/20 hover:border-blue-400/60 flex items-center justify-center text-white/60 hover:text-white transition-all duration-300 hover:bg-slate-800/60 group z-30",initial:"initial",animate:"animate",whileHover:"hover",whileTap:{scale:.95},onClick:p,children:[a.jsx(F.ArrowLeft,{className:"w-6 h-6 rotate-180 transition-transform duration-300 group-hover:scale-110"}),a.jsxs(S.div,{className:"absolute right-16 top-1/2 transform -translate-y-1/2 bg-slate-900/95 backdrop-blur-md rounded-lg px-3 py-2 border border-blue-400/30 shadow-xl opacity-0 group-hover:opacity-100 transition-opacity duration-300 pointer-events-none whitespace-nowrap",children:[a.jsx("span",{className:"text-blue-100 font-medium text-sm",children:c("layout.siguiente")}),a.jsx("div",{className:"absolute left-full top-1/2 transform -translate-y-1/2 w-0 h-0 border-t-4 border-b-4 border-l-4 border-transparent border-l-slate-900/95"})]}),a.jsx("div",{className:"absolute inset-0 rounded-full border border-blue-400/30 scale-0 group-hover:scale-125 opacity-0 group-hover:opacity-100 transition-all duration-500"})]})]}),a.jsx(Se.Outlet,{})]})},xu=b.createContext(void 0);function Tb({children:e}){const{isMobile:t}=Li(),n=xe().videosBaseUrl,s=t?"videos/movil":"videos",[i,r]=b.useState(""),[o,l]=b.useState(!1),c=(u,d=!0)=>{const f=`${n.replace(/\/$/,"")}/${s}/${u}`;f!==i&&(d?(l(!0),setTimeout(()=>{r(f),setTimeout(()=>l(!1),300)},150)):r(f))};return a.jsx(xu.Provider,{value:{currentVideo:i,setVideo:c,isTransitioning:o},children:e})}function vu(){const e=b.useContext(xu);return e===void 0?{currentVideo:"",setVideo:()=>{},isTransitioning:!1}:e}const po=({returnUrlOnEnded:e})=>{const{currentVideo:t,isTransitioning:n}=vu(),s=Se.useNavigate(),i=b.useRef(null),[r,o]=b.useState(t),l=()=>{e&&s(e)},c=u=>u.replace(/\.mp4$/i,".webp");return b.useEffect(()=>{t!==r&&(i.current&&(i.current.pause(),i.current.removeAttribute("src"),i.current.load()),o(t))},[t,r]),b.useEffect(()=>{i.current&&r&&i.current.play().catch(u=>{console.warn("Error al intentar autoPlay del video:",u)})},[r]),a.jsxs("div",{className:"absolute inset-0 w-full h-full",children:[a.jsx(Ce,{children:n&&a.jsx(S.div,{className:"absolute inset-0 bg-black z-10",initial:{opacity:0},animate:{opacity:.3},exit:{opacity:0},transition:{duration:.15}})}),a.jsx(S.video,{ref:i,autoPlay:!0,loop:!e,muted:!0,playsInline:!0,className:"absolute inset-0 w-full h-full object-cover",onEnded:l,initial:{opacity:0},animate:{opacity:1},transition:{duration:.3},src:r,poster:c(r)},r)]})};function Eb({className:e}){const n=e!==void 0?e:"fixed inset-0 overflow-hidden bg-slate-900";return a.jsxs("div",{className:n,children:[a.jsx(po,{}),a.jsx("div",{className:"relative z-10 h-full",children:a.jsx(Se.Outlet,{})})]})}function Cb({x:e,y:t,dest:n}){const s=Se.useNavigate(),i=r=>{s(`/product/${r}`)};return a.jsxs(S.button,{className:`absolute ${e} ${t} w-8 h-8 bg-gradient-to-br from-blue-500 to-indigo-700 rounded-full shadow-2xl border-2 border-blue-300/50 backdrop-blur-sm flex items-center justify-center group overflow-hidden`,initial:"initial",animate:"animate",whileHover:"hover",whileTap:"tap",onClick:()=>i(n),children:[a.jsx("div",{className:"absolute inset-1 bg-gradient-to-br from-blue-300/30 to-transparent rounded-full"}),a.jsx("div",{className:"relative w-2.5 h-2.5 bg-white rounded-full group-hover:scale-125 transition-all duration-300 shadow-lg",children:a.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-blue-200 to-white rounded-full animate-pulse"})}),a.jsx("div",{className:"absolute inset-0 rounded-full border border-blue-300/60 animate-ping"}),a.jsx("div",{className:"absolute inset-1 rounded-full border border-blue-400/40 animate-pulse"}),a.jsx("div",{className:"absolute inset-0 rounded-full border border-transparent border-t-blue-300 animate-spin",style:{animationDuration:"3s"}}),a.jsxs(S.div,{className:"absolute right-12 top-1/2 transform -translate-y-1/2 bg-slate-900/95 backdrop-blur-md rounded-lg p-4 border border-blue-400/30 shadow-xl min-w-64 group-hover:opacity-100 transition-opacity duration-300",initial:{opacity:0,x:20,scale:.8},animate:{opacity:0,x:20,scale:.8},whileHover:{opacity:1,x:0,scale:1},transition:{duration:.3},style:{pointerEvents:"none"},children:[a.jsx("h3",{className:"text-blue-300 font-bold text-lg mb-1",children:"SUBMARINO S80"}),a.jsx("p",{className:"text-blue-100/80 text-sm leading-relaxed",children:"Submarino de propulsión AIP con capacidades stealth y sistemas de combate integrados de última generación."}),a.jsx("div",{className:"absolute left-full top-1/2 transform -translate-y-1/2 w-0 h-0 border-t-8 border-b-8 border-l-8 border-transparent border-l-slate-900/95"})]})]})}function go({home:e,item:t}){const[n,s]=b.useState({width:0,height:0}),[i,r]=b.useState(!0),[o,l]=b.useState(!1),[c,u]=b.useState(!1),[d,f]=b.useState(""),[h,m]=b.useState(!1),[p,y]=b.useState(!1),[v,x]=b.useState(!1),[C,N]=b.useState(!1),[I,A]=b.useState(!1),[k,E]=b.useState(""),[w,j]=b.useState(!1),$=Se.useNavigate(),{lastEvent:z,internalEvent:Q,setInternalEvent:R}=vt(),se=xe().cinematics??!1,U=xe().cinematicsOnChangeLocation??!1;se&&(b.useEffect(()=>{z?.payload?.type==="cinematics"&&z?.payload?.action==="end"&&r(!0)},[z]),b.useEffect(()=>{if(Q?.payload?.type==="cinematics"){const T=Q?.payload?.action;T==="start"&&r(!1),T==="end"&&r(!0)}},[Q])),b.useEffect(()=>{const T=()=>{s({width:window.innerWidth,height:window.innerHeight})};return T(),window.addEventListener("resize",T),()=>window.removeEventListener("resize",T)},[]);const J=()=>{l(!0),r(!1)},V=()=>{l(!1),r(!0)},P=T=>{$(T),se&&U&&R({...Yt})},_=T=>!!T?.trim(),M=T=>T?.endsWith(".webm")||T?.endsWith(".mp4");return a.jsxs(Ce,{children:[i&&a.jsx(S.div,{className:"absolute bottom-4 sm:bottom-6 md:bottom-10 left-1/2 transform -translate-x-1/2 w-full max-w-[90%] sm:max-w-[85%] md:max-w-4xl px-4 sm:px-6 md:px-8 z-9999",initial:{opacity:0,y:50},animate:{opacity:1,y:0},transition:{delay:.8,duration:.6},exit:{opacity:0,y:50,scale:.8,transition:{delay:0,duration:.6}},children:a.jsxs("div",{className:"flex flex-col gap-6 backdrop-blur-xs border p-3 sm:p-4 md:p-6 text-center border-transparent max-w-6xl mx-auto title-section bg-gradient-to-t from-[#17252c]/70 to-[#17252c]/5 rounded-xl sm:rounded-2xl",children:[a.jsx("h1",{className:"text-xl sm:text-3xl md:text-4xl lg:text-5xl font-light text-white mb-2 sm:mb-4 tracking-wide",children:t?.title}),a.jsx("p",{className:"text-xs sm:text-sm md:text-base text-blue-100/90 font-light leading-relaxed max-w-5xl mx-auto mb-3 sm:mb-4 md:mb-6",children:t?.subtitle}),a.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-2 sm:gap-3 md:gap-4",children:[!1,e&&a.jsxs(a.Fragment,{children:[a.jsx(S.button,{className:"inline-flex items-center gap-1 sm:gap-2 px-3 sm:px-4 md:px-6 py-2 sm:py-3 bg-slate-800/80 hover:bg-slate-700/80 text-cyan-300 font-medium text-xs sm:text-sm rounded-full transition-all duration-300 shadow-lg hover:shadow-slate-500/25 border border-cyan-400/30 hover:border-cyan-400/60",whileHover:{scale:1.05},whileTap:{scale:.95},initial:{opacity:0},animate:{opacity:1},transition:{delay:0,duration:.6},onClick:()=>{P(e)},children:a.jsx(F.Home,{className:"w-3 h-3 sm:w-4 sm:h-4"})}),t?.simulation&&a.jsx(xc,{onClick:()=>m(!0)}),_(t?.playMedia?.url)&&a.jsx(Pi,{Icon:F.Video,onClick:()=>{f(t.playMedia.url),u(!0)}}),t?.webUrl&&a.jsx(Pi,{Icon:F.ExternalLink,onClick:()=>x(!0)}),(t?.links?.length??0)>0&&t?.links?.map(T=>a.jsx(Un,{item:T,onClick:()=>{M(T.url)?(f(T.url.trim()),u(!0)):(E(T.url),A(T.transparent),N(!0)),T.transparent===!0&&se&&R({...Yt})}})),(t?.cards?.length??0)>0&&a.jsx(Wl,{onClick:()=>y(!0)}),(t?.nodesId??0)>0&&a.jsx(yc,{label:t?.shortName??t.title,onClick:J})]})]})]})}),o&&t?.nodesId&&a.jsx(gb,{isOpen:o,onClose:V,size:n,hotspot:t.nodesId}),c&&a.jsx(mu,{source:d,onClose:()=>u(!1)}),h&&a.jsx(gu,{item:t.simulation,onClose:()=>m(!1)},t?.slug),p&&a.jsx(vc,{cards:t.cards,onClose:()=>y(!1)}),v&&a.jsx(Ht,{src:t.webUrl,onClose:()=>x(!1)}),C&&a.jsx(Ht,{src:k,transparent:I,onClose:()=>{const T=I;N(!1),E(""),A(!1),T===!0&&se&&R({...gc})}}),w&&a.jsx(Pp,{onClose:()=>j(!1)})]})}const Nb=({video:e,returnUrl:t})=>{console.log(e);const n=Se.useNavigate(),s={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},i=()=>{n(t)},{t:r}=jt.useTranslation();return a.jsx(a.Fragment,{children:a.jsxs("div",{className:"fixed inset-0 overflow-hidden bg-slate-900",children:[a.jsx(po,{returnUrlOnEnded:t}),a.jsx("div",{className:"relative z-10 h-full",children:a.jsx(S.div,{className:"relative w-full h-full",variants:s,initial:"initial",animate:"animate",exit:"exit",transition:{duration:.8},children:a.jsx(S.div,{className:"absolute inset-0 bg-black/20 flex items-center justify-center",initial:{opacity:0},animate:{opacity:1},transition:{duration:.5},children:a.jsx(S.button,{className:"absolute bottom-8 right-8 px-4 py-2 bg-slate-900/80 backdrop-blur-md rounded-lg text-white/90 text-sm border border-white/20 hover:border-white/40 hover:bg-slate-800/90 transition-all duration-300 hover:text-white",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:1},whileHover:{scale:1.05},whileTap:{scale:.95},onClick:i,children:r("layout.skip")})})})})]})})},kb=({world:e,worldSlug:t=e,overlay:n=!1,itemsData:s})=>{const[i,r]=b.useState(null),{itemSlug:o}=Se.useParams();b.useEffect(()=>{if(o){const c=s.find(u=>u.slug===o);c&&r(c)}},[o]);const l={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}};return i?a.jsx(a.Fragment,{children:a.jsxs(S.div,{className:"relative w-full h-full",variants:l,initial:"initial",animate:"animate",exit:"exit",transition:{duration:.8},children:[n&&a.jsx("div",{id:"ItemPage",className:"absolute inset-0 bg-gradient-to-b from-slate-900/30 via-transparent to-slate-900/50"}),a.jsx(go,{home:`/${t}`,item:i})]})}):a.jsx("div",{className:"relative w-full h-screen overflow-hidden bg-slate-900 flex items-center justify-center",children:a.jsx("div",{className:"text-white text-2xl",children:"Producto no encontrado"})})},Pb=({world:e,worldSlug:t=e,overlay:n=!1,itemsData:s})=>{const[i,r]=b.useState(null),{itemSlug:o}=Se.useParams(),l=Se.useNavigate();b.useEffect(()=>{if(o){const u=s.find(d=>d.slug===o);u&&(r(u),console.log(JSON.stringify(u)))}},[o]);const c={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}};return i?a.jsx(a.Fragment,{children:a.jsxs(S.div,{className:"relative w-full h-full",variants:c,initial:"initial",animate:"animate",exit:"exit",transition:{duration:.8},children:[n&&a.jsx("div",{id:"ItemPage",className:"absolute inset-0 bg-gradient-to-b from-slate-900/30 via-transparent to-slate-900/50"}),a.jsx(gu,{item:i.simulation,onClose:()=>l(`/${t}`)},o)]})}):a.jsx("div",{className:"relative w-full h-screen overflow-hidden bg-slate-900 flex items-center justify-center",children:a.jsx("div",{className:"text-white text-2xl",children:"Producto no encontrado"})})},jb=({items:e,world:t,overlay:n=!1,title:s})=>{const[i,r]=b.useState(""),o={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}};return a.jsx(Ce,{children:a.jsxs(S.div,{className:"relative w-full h-full",variants:o,initial:"initial",animate:"animate",exit:"exit",transition:{duration:.8},children:[n&&a.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-slate-900/20 via-transparent to-slate-900/40"}),e&&a.jsx(mo,{parent:t,items:e,onShipSelect:r,selectedShip:i}),a.jsx(go,{home:"/",item:s})]})})},Ib=()=>{const e=Se.useLocation(),{sendMessage:t}=Ut(),n=xe().wsRoom;return b.useEffect(()=>{console.log("RouteListener: "+e.pathname+e.hash),t({type:"publish",room:n,payload:{type:"camera",target:pc(e.pathname)}})},[e]),null};q.CardsButton=Wl,q.ControlPanel=co,q.DynamicLucideIcon=Yl,q.EventProvider=Om,q.FontSizeManager=yb,q.FullScreenPage=Nb,q.IconButton=Pi,q.InfoCard=ao,q.ItemPage=kb,q.Layout=Eb,q.LayoutIframe=vb,q.LayoutTransparent=wb,q.LayoutWorld=Sb,q.LinkItemButton=Un,q.MinimizeProvider=Am,q.MinimizeWrapper=fo,q.NodosButton=yc,q.PointButton=Cb,q.RouteListener=Ib,q.ShipNavigation=mo,q.ShowcaseProvider=xb,q.SimulacionButton=xc,q.SlidePage=Pb,q.TabView=pu,q.TitleSection=go,q.VideoBackground=po,q.VideoProvider=Tb,q.WebSocketProvider=Cp,q.WebSocketStatusWidget=uo,q.WorldPage=jb,q.cinematicsEndEvent=gc,q.cinematicsStartEvent=Yt,q.cn=bn,q.codigoANombre=Tp,q.getConfig=xe,q.initLibConfig=Su,q.nombreACodigo=mc,q.toTarget=pc,q.toVideo=Ep,q.useAutoModeTimer=ho,q.useEvent=vt,q.useMinimize=Vm,q.useOptionalMinimize=Ii,q.useScreenSize=Li,q.useShowcase=lo,q.useVideo=vu,q.useWebSocket=Ut,Object.defineProperty(q,Symbol.toStringTag,{value:"Module"})}));
|
package/package.json
CHANGED