{"version":3,"file":"MenuSolarD.CSbRCEKm.mjs","names":["React.useRef","React.useState","_Fragment"],"sources":["https:/framerusercontent.com/modules/ooWjspFrdOwDMpnuoq8m/DR0TOWcOnmogIbUS35Vy/MenuSolarD.js"],"sourcesContent":["// RSV_SolarMenuBar.tsx\nimport{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import*as React from\"react\";import{createPortal}from\"react-dom\";import{motion,AnimatePresence}from\"framer-motion\";import{addPropertyControls,ControlType}from\"framer\";const navItems=[{id:\"origen\",label:\"Origen\",href:\"/\",allowHoverNavigate:true},{id:\"fragmentos\",label:\"Fragmentos del Sol\",href:\"/fragmentosdelsol\",allowHoverNavigate:true},{id:\"libros\",label:\"Libros\",href:\"/libros\",allowHoverNavigate:true},{id:\"servicios\",label:\"Servicios\",href:\"/servicios\",allowHoverNavigate:true},{id:\"afinaciones\",label:\"Afinaciones\",href:\"/afinaciones\",allowHoverNavigate:true},{id:\"musica\",label:\"M\\xfasica\",href:\"https://open.spotify.com/artist/6BSsXgmAnoie8tUgLtIbqb?si=ocwJ-gOJR7WbJHscyW05-A\",openInNewTabOnClick:true}];/* ───────── Estilos ───────── */const styles={navigation:textColor=>({position:\"sticky\",top:0,zIndex:900,width:\"100%\",minHeight:56,padding:\"12px 5% 12px 0\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",gap:12,backgroundColor:\"rgba(10,10,30,0.6)\",backdropFilter:\"blur(15px)\",borderBottom:\"1px solid color-mix(in oklab, var(--accent, #00C2FF) 27%, transparent)\"}),leftSlot:{display:\"flex\",alignItems:\"center\",justifyContent:\"flex-start\",minWidth:110},leftSlotAbs:{position:\"absolute\",left:\"calc(env(safe-area-inset-left, 0px) + 12px)\",top:\"50%\",transform:\"translateY(-50%)\",zIndex:1},linksWrap:{display:\"flex\",flexWrap:\"wrap\",justifyContent:\"center\",alignItems:\"center\",gap:\"15px 25px\",flex:1},navLink:textColor=>({color:textColor,textDecoration:\"none\",fontSize:\"15px\",padding:\"6px 10px\",borderRadius:\"4px\",transition:\"color .2s ease, text-shadow .2s ease, box-shadow .2s ease\",opacity:.85,cursor:\"pointer\"}),navLinkHover:()=>({color:\"var(--accent, #00C2FF)\",opacity:1,textShadow:\"0 0 8px color-mix(in oklab, var(--accent, #00C2FF) 60%, transparent), 0 0 15px color-mix(in oklab, var(--accent, #00C2FF) 33%, transparent)\"}),navLinkActive:()=>({color:\"var(--accent, #00C2FF)\",opacity:1,textShadow:\"0 0 8px color-mix(in oklab, var(--accent, #00C2FF) 60%, transparent), 0 0 15px color-mix(in oklab, var(--accent, #00C2FF) 33%, transparent)\",cursor:\"default\",pointerEvents:\"none\"})};/* ───────── Item de link ───────── */function NavLinkItem({item,textColor,hoverDelaySec,isActive}){const{label,href,allowHoverNavigate=true,openInNewTabOnClick}=item;const hoverTimeoutRef=React.useRef(null);const isExternal=/^https?:\\/\\//i.test(href);const[isHovered,setIsHovered]=React.useState(false);const baseStyle={...styles.navLink(textColor)};const animateStyle=isActive?styles.navLinkActive():isHovered?styles.navLinkHover():{};const clearHoverTimer=()=>{if(hoverTimeoutRef.current){window.clearTimeout(hoverTimeoutRef.current);hoverTimeoutRef.current=null;}};return /*#__PURE__*/_jsx(motion.a,{href:href,target:!isActive&&openInNewTabOnClick?\"_blank\":undefined,rel:!isActive&&openInNewTabOnClick?\"noopener noreferrer\":undefined,\"aria-current\":isActive?\"page\":undefined,style:baseStyle,animate:animateStyle,transition:{duration:.2},onMouseEnter:()=>{if(isActive)return;setIsHovered(true);if(!isExternal&&allowHoverNavigate&&hoverDelaySec>0){hoverTimeoutRef.current=window.setTimeout(()=>{window.location.href=href;},hoverDelaySec*1e3);}},onMouseLeave:()=>{clearHoverTimer();setIsHovered(false);},onClick:()=>{if(isExternal)setIsHovered(false);},children:label});}function useGlobalTheme(){const getSaved=()=>{try{const attr=document?.documentElement?.getAttribute(\"data-theme\");if(attr===\"neon\"||attr===\"matrix\")return attr;const ls=localStorage?.getItem(\"holo-theme\");return ls===\"neon\"?\"neon\":\"matrix\";}catch{return\"matrix\";}};const[theme,setTheme]=React.useState(getSaved);React.useLayoutEffect(()=>{setTheme(getSaved());},[])// anti-flash\n;React.useEffect(()=>{const onStorage=e=>{if(e.key===\"holo-theme\"){const t=e.newValue===\"neon\"?\"neon\":\"matrix\";document.documentElement.setAttribute(\"data-theme\",t);setTheme(t);}};window.addEventListener(\"storage\",onStorage);const mo=new MutationObserver(()=>{const t=document.documentElement.getAttribute(\"data-theme\");setTheme(t===\"neon\"?\"neon\":\"matrix\");});mo.observe(document.documentElement,{attributes:true,attributeFilter:[\"data-theme\"]});return()=>{window.removeEventListener(\"storage\",onStorage);mo.disconnect();};},[]);return{theme,setTheme};}/* ───────── Portal simple al <body> ───────── */function InBody({children}){const[mounted,setMounted]=React.useState(false);React.useEffect(()=>setMounted(true),[]);if(!mounted||typeof document===\"undefined\")return null;return /*#__PURE__*/createPortal(children,document.body);}function ThemeToggle({theme,setTheme}){const[ready,setReady]=React.useState(false);React.useEffect(()=>setReady(true),[]);return /*#__PURE__*/_jsx(\"button\",{className:\"menu-theme-toggle\",\"data-ready\":ready?\"1\":\"0\",\"data-theme\":theme,\"aria-label\":\"Cambiar tema\",\"aria-pressed\":theme===\"neon\",onClick:()=>{const next=theme===\"matrix\"?\"neon\":\"matrix\";const root=document.documentElement;root.setAttribute(\"data-theme\",next);// Mantén el acento coherente aunque la página no defina el style global\nroot.style.setProperty(\"--accent\",next===\"neon\"?\"#00C2FF\":\"#00FF41\");try{localStorage.setItem(\"holo-theme\",next);}catch{}setTheme(next);},children:/*#__PURE__*/_jsx(\"span\",{className:\"dot\"})});}function MenuSolarD({currentTabId=\"origen\",textColor=\"#FFFFFF\",hoverDelaySec=2,collapsedByDefault=false}){const[collapsed,setCollapsed]=React.useState(collapsedByDefault);const{theme,setTheme}=useGlobalTheme();return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsxs(InBody,{children:[/*#__PURE__*/_jsx(\"style\",{children:`\n    :root{ --btn-accent: var(--accent, #00C2FF); }\n\n    /* Bot\\xf3n fijo arriba-derecha, SIEMPRE visible */\n    .solar-menu-btn{\n      position:fixed;\n      right:calc(env(safe-area-inset-right, 0px) + 12px);\n      top:calc(env(safe-area-inset-top, 0px) + 12px);\n      z-index:10000;\n      width:42px; height:40px; border-radius:12px;\n      background:\n        radial-gradient(140% 120% at 100% 0%, rgba(255,255,255,.14), rgba(255,255,255,0) 60%),\n        rgba(8,12,20,.55);\n      border:1px solid color-mix(in oklab, var(--btn-accent) 60%, transparent);\n      backdrop-filter: blur(8px);\n      box-shadow: 0 0 10px color-mix(in oklab, var(--btn-accent) 35%, transparent),\n                  inset 0 0 10px rgba(0,0,0,.35);\n      cursor:pointer; display:grid; place-items:center;\n      opacity:1 !important; visibility:visible !important; pointer-events:auto !important;\n    }\n    .solar-menu-btn:focus-visible{ outline:2px solid var(--btn-accent); outline-offset:2px; }\n\n    /* Iconos puros (sin transforms dependientes de estado) */\n    .icon-bars, .icon-x{ position:relative; width:22px; height:18px; display:block; }\n    .icon-bars i, .icon-x i{\n      position:absolute; left:0; right:0; height:2px; border-radius:999px;\n      background: var(--btn-accent);\n      box-shadow: 0 0 6px color-mix(in oklab, var(--btn-accent) 70%, transparent);\n      content:\"\"; display:block;\n    }\n    .icon-bars i:nth-child(1){ top:0; }\n    .icon-bars i:nth-child(2){ top:8px; width:18px; margin:0 auto; }\n    .icon-bars i:nth-child(3){ bottom:0; }\n\n    .icon-x i:nth-child(1){ top:8px; transform:rotate(45deg); }\n    .icon-x i:nth-child(2){ top:8px; transform:rotate(-45deg); }\n  `}),/*#__PURE__*/_jsx(\"button\",{className:\"solar-menu-btn\",type:\"button\",\"aria-label\":collapsed?\"Abrir men\\xfa\":\"Cerrar men\\xfa\",\"aria-expanded\":!collapsed,onClick:()=>setCollapsed(v=>!v),children:collapsed?/*#__PURE__*/_jsxs(\"span\",{className:\"icon-bars\",children:[/*#__PURE__*/_jsx(\"i\",{}),/*#__PURE__*/_jsx(\"i\",{}),/*#__PURE__*/_jsx(\"i\",{})]}):/*#__PURE__*/_jsxs(\"span\",{className:\"icon-x\",children:[/*#__PURE__*/_jsx(\"i\",{}),/*#__PURE__*/_jsx(\"i\",{})]})})]}),/*#__PURE__*/_jsx(AnimatePresence,{initial:false,children:!collapsed&&/*#__PURE__*/_jsxs(motion.nav,{style:styles.navigation(textColor),initial:{y:-8,opacity:0},animate:{y:0,opacity:1},exit:{y:-8,opacity:0},transition:{duration:.18,ease:\"easeOut\"},children:[/*#__PURE__*/_jsx(\"style\",{children:`\n              .menu-theme-toggle{\n                display:grid; place-items:center;\n                width:78px; height:38px; border-radius:999px; cursor:pointer;\n                background:linear-gradient(90deg,rgba(255,255,255,.14),rgba(255,255,255,.02));\n                border:1px solid color-mix(in oklab, var(--accent, #00C2FF) 53%, transparent);\n                box-shadow:inset 0 0 10px rgba(0,0,0,.45), 0 0 16px color-mix(in oklab, var(--accent, #00C2FF) 25%, transparent);\n                position:relative;\n              }\n              .menu-theme-toggle .dot{\n                position:absolute; top:50%; left:6px; transform:translate(0,-50%);\n                width:28px; height:28px; border-radius:50%;\n                background:radial-gradient(circle,#fff 10%, var(--accent, #00C2FF) 60%, transparent 75%);\n                box-shadow:0 0 12px var(--accent, #00C2FF), 0 0 26px color-mix(in oklab, var(--accent, #00C2FF) 25%, transparent);\n                transition:left .22s ease;\n              }\n              .menu-theme-toggle[data-theme=\"neon\"] .dot{ left:calc(100% - 34px); }\n              .menu-theme-toggle[data-ready=\"0\"] .dot{ transition:none; }\n            `}),/*#__PURE__*/_jsx(\"div\",{style:styles.leftSlotAbs,children:/*#__PURE__*/_jsx(ThemeToggle,{theme:theme,setTheme:setTheme})}),/*#__PURE__*/_jsx(\"div\",{style:styles.linksWrap,children:navItems.map(it=>/*#__PURE__*/_jsx(NavLinkItem,{item:it,textColor:textColor,hoverDelaySec:hoverDelaySec,isActive:it.id===currentTabId},it.id))})]},\"nav\")})]});}export default MenuSolarD;/* ───────── Property Controls (Framer) ───────── */addPropertyControls(MenuSolarD,{currentTabId:{type:ControlType.Enum,title:\"Pesta\\xf1a actual\",options:[\"origen\",\"fragmentos\",\"libros\",\"musica\",\"servicios\",\"afinaciones\"],optionTitles:[\"Origen\",\"Fragmentos del Sol\",\"Libros\",\"M\\xfasica\",\"Servicios\",\"Afinaciones\"],defaultValue:\"origen\"},textColor:{type:ControlType.Color,title:\"Color Texto\",defaultValue:\"#FFFFFF\"},hoverDelaySec:{type:ControlType.Number,title:\"Delay Hover (s)\",defaultValue:2,min:0,max:10,step:.1},collapsedByDefault:{type:ControlType.Boolean,title:\"Colapsado por defecto\",defaultValue:false}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"MenuSolarD\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./MenuSolarD.map"],"mappings":"qdAC4qE,SAAS,EAAY,CAAC,OAAK,YAAU,gBAAc,YAAU,CAAC,GAAK,CAAC,QAAM,OAAK,qBAAmB,GAAK,uBAAqB,EAAW,EAAgBA,EAAa,KAAK,CAAO,EAAW,gBAAgB,KAAK,EAAK,CAAM,CAAC,EAAU,GAAcC,EAAe,GAAM,CAAO,EAAU,CAAC,GAAG,EAAO,QAAQ,EAAU,CAAC,CAAO,EAAa,EAAS,EAAO,eAAe,CAAC,EAAU,EAAO,cAAc,CAAC,EAAE,CAAO,MAAoB,CAAC,AAAyE,EAAgB,WAA7D,EAAO,aAAa,EAAgB,QAAQ,CAAyB,OAAQ,OAAoB,EAAK,EAAO,EAAE,CAAM,OAAK,OAAO,CAAC,GAAU,EAAoB,SAAS,IAAA,GAAU,IAAI,CAAC,GAAU,EAAoB,sBAAsB,IAAA,GAAU,eAAe,EAAS,OAAO,IAAA,GAAU,MAAM,EAAU,QAAQ,EAAa,WAAW,CAAC,SAAS,GAAG,CAAC,iBAAiB,CAAI,IAAgB,EAAa,G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