ape-accessibility 0.4.0 → 0.5.0

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.
@@ -13,208 +13,208 @@ Error generating stack: `+n.message+`
13
13
  background: rgba(0, 0, 0, 0.65);
14
14
  pointer-events: none;
15
15
  z-index: 9998;
16
- `,Ge=null,hl=null;function rv(){Ge||(Ge=document.createElement("div"),Ge.id="ape-reading-guide-top",Ge.style.cssText=C2+"top: 0;",hl=document.createElement("div"),hl.id="ape-reading-guide-bottom",hl.style.cssText=C2+"bottom: 0;",document.body.appendChild(Ge),document.body.appendChild(hl),T2(window.innerHeight/2),document.addEventListener("mousemove",M2))}function dv(){document.removeEventListener("mousemove",M2),Ge?.remove(),hl?.remove(),Ge=null,hl=null}function M2(t){T2(t.clientY)}function T2(t){let l=Math.max(0,t-40),n=t+40;Ge&&(Ge.style.height=`${l}px`),hl&&(hl.style.top=`${n}px`)}function z2(){let[t,e]=(0,Kl.useState)(()=>O().stopAnimations??!1);(0,Kl.useEffect)(()=>{Qu(t)},[]),(0,Kl.useEffect)(()=>{let n=a=>{let{settings:i}=a.detail,u=i.stopAnimations??!1;u!==t&&(e(u),Qu(u))};return window.addEventListener("accessibilitySettingsChanged",n),()=>window.removeEventListener("accessibilitySettingsChanged",n)},[t]);let l=(0,Kl.useCallback)(()=>{let n=!t;e(n),Qu(n),q("stopAnimations",n)},[t]);return{isActive:t,toggle:l}}var Jl=_(k(),1);function x2(){let[t,e]=(0,Jl.useState)(()=>O().bigCursor??!1);(0,Jl.useEffect)(()=>{wu(t)},[]),(0,Jl.useEffect)(()=>{let n=a=>{let{settings:i}=a.detail,u=i.bigCursor??!1;u!==t&&(e(u),wu(u))};return window.addEventListener("accessibilitySettingsChanged",n),()=>window.removeEventListener("accessibilitySettingsChanged",n)},[t]);let l=(0,Jl.useCallback)(()=>{let n=!t;e(n),wu(n),q("bigCursor",n)},[t]);return{isActive:t,toggle:l}}var kl=_(k(),1);function _2(){let[t,e]=(0,kl.useState)(()=>O().readingGuide??!1);(0,kl.useEffect)(()=>{Zu(t)},[]),(0,kl.useEffect)(()=>{let n=a=>{let{settings:i}=a.detail,u=i.readingGuide??!1;u!==t&&(e(u),Zu(u))};return window.addEventListener("accessibilitySettingsChanged",n),()=>window.removeEventListener("accessibilitySettingsChanged",n)},[t]);let l=(0,kl.useCallback)(()=>{let n=!t;e(n),Zu(n),q("readingGuide",n)},[t]);return{isActive:t,toggle:l}}var Wl=_(k(),1);var O2="accessibility-hide-images";function Vu(t){let e=document.documentElement;t?e.classList.add(O2):e.classList.remove(O2)}function L2(){let[t,e]=(0,Wl.useState)(()=>O().hideImages??!1);(0,Wl.useEffect)(()=>{Vu(t)},[]),(0,Wl.useEffect)(()=>{let n=a=>{let{settings:i}=a.detail,u=i.hideImages??!1;u!==t&&(e(u),Vu(u))};return window.addEventListener("accessibilitySettingsChanged",n),()=>window.removeEventListener("accessibilitySettingsChanged",n)},[t]);let l=(0,Wl.useCallback)(()=>{let n=!t;e(n),Vu(n),q("hideImages",n)},[t]);return{isActive:t,toggle:l}}var Sl=_(k(),1);function Ia(t){let e=document.documentElement;t==="default"?e.removeAttribute("data-text-align"):e.setAttribute("data-text-align",t)}var Qo=["default","left","center","right"];function N2(){let[t,e]=(0,Sl.useState)(()=>O().textAlign??"default");(0,Sl.useEffect)(()=>{Ia(t)},[]),(0,Sl.useEffect)(()=>{let a=i=>{let{settings:u}=i.detail,c=u.textAlign??"default";c!==t&&(e(c),Ia(c))};return window.addEventListener("accessibilitySettingsChanged",a),()=>window.removeEventListener("accessibilitySettingsChanged",a)},[t]);let l=(0,Sl.useCallback)(()=>{let a=Qo.indexOf(t),i=Qo[(a+1)%Qo.length]??"default";e(i),Ia(i),q("textAlign",i)},[t]),n=(0,Sl.useCallback)(a=>{e(a),Ia(a),q("textAlign",a)},[]);return{mode:t,cycle:l,setMode:n,isActive:t!=="default",label:t==="default"?"Por defecto":t==="left"?"Izquierda":t==="center"?"Centrado":"Derecha"}}var pl=_(k(),1);var kn=null;function Ku(){return typeof window<"u"&&"speechSynthesis"in window}function D2(t="es"){if(!Ku())return;Pa();let l=(document.querySelector("main")??document.body).innerText;l.trim()&&(kn=new SpeechSynthesisUtterance(l),kn.lang=t==="es"?"es-ES":"en-US",kn.rate=1,window.speechSynthesis.speak(kn))}function Pa(){Ku()&&(window.speechSynthesis.cancel(),kn=null)}function H2(){return kn}function U2(){let[t,e]=(0,pl.useState)(!1),[l]=(0,pl.useState)(()=>Ku());(0,pl.useEffect)(()=>()=>{Pa()},[]),(0,pl.useEffect)(()=>{let a=()=>{Pa(),e(!1)};return window.addEventListener("accessibilityReset",a),()=>window.removeEventListener("accessibilityReset",a)},[]);let n=(0,pl.useCallback)(()=>{if(t)Pa(),e(!1);else{let a=O().language??"es";D2(a),e(!0);let i=H2();i&&(i.onend=()=>e(!1),i.onerror=()=>e(!1))}},[t]);return{isReading:t,isSupported:l,toggle:n}}var Fl=_(k(),1);var R2={visionImpaired:{contrast:"high",fontSize:120,highlightMode:"both",bigCursor:!0},cognitive:{dyslexiaFont:!0,lineHeight:2,letterSpacing:1,stopAnimations:!0},motorImpaired:{bigCursor:!0,stopAnimations:!0,fontSize:110},seniorFriendly:{fontSize:120,lineHeight:2,contrast:"high",bigCursor:!0}},wo={visionImpaired:"Visi\xF3n reducida",cognitive:"Cognitivo",motorImpaired:"Motor",seniorFriendly:"Adulto mayor"};function Vo(t){for(let[e,l]of Object.entries(R2))if(Object.entries(l).every(([a,i])=>t[a]===i))return e;return"none"}function B2(t){return t==="none"?{...ae}:R2[t]}function q2(){let[t,e]=(0,Fl.useState)(()=>Vo(O()));(0,Fl.useEffect)(()=>{let n=a=>{let{settings:i}=a.detail;e(Vo(i))};return window.addEventListener("accessibilitySettingsChanged",n),()=>window.removeEventListener("accessibilitySettingsChanged",n)},[]),(0,Fl.useEffect)(()=>{let n=()=>e("none");return window.addEventListener("accessibilityReset",n),()=>window.removeEventListener("accessibilityReset",n)},[]);let l=(0,Fl.useCallback)(n=>{if(n===t){Vn(),window.dispatchEvent(new CustomEvent("accessibilityReset",{detail:{timestamp:Date.now()}}));return}let a=B2(n);Zo(a)},[t]);return{activeProfile:t,applyProfile:l}}var bl=_(k(),1);var mv=["H1","H2","H3","H4","H5","H6"],gv=["main","nav","aside","footer","header",'[role="banner"]','[role="navigation"]','[role="main"]','[role="complementary"]','[role="contentinfo"]'];function Y2(){let t=[],e=new Set;return document.querySelectorAll(gv.join(",")).forEach(a=>{if(e.has(a))return;e.add(a);let i=a.getAttribute("role")||a.tagName.toLowerCase(),u=a.getAttribute("aria-label")||i;t.push({tag:i,text:u,level:0,element:a})}),document.querySelectorAll("h1, h2, h3, h4, h5, h6").forEach(a=>{let i=a.tagName;if(!mv.includes(i))return;let u=parseInt(i.charAt(1),10),c=(a.textContent??"").trim().slice(0,80);c&&t.push({tag:i.toLowerCase(),text:c,level:u,element:a})}),t}function G2(t){t.scrollIntoView({behavior:"smooth",block:"center"}),t.focus({preventScroll:!0})}function X2(){let[t,e]=(0,bl.useState)(!1),[l,n]=(0,bl.useState)([]),a=(0,bl.useCallback)(()=>{n(Y2()),e(!0)},[]),i=(0,bl.useCallback)(()=>{e(!1)},[]),u=(0,bl.useCallback)(()=>{t?i():a()},[t,a,i]),c=(0,bl.useCallback)(f=>{G2(f.element)},[]);return{isOpen:t,structure:l,toggle:u,open:a,close:i,navigateTo:c}}function Ju(){let t=l2(),e=i2(),l=u2(),n=c2(),a=o2(),i=r2(),u=v2(),c=S2(),f=p2(),r=b2(),y=z2(),h=x2(),g=_2(),v=L2(),A=N2(),C=U2(),L=q2(),s=X2(),o=O(),d=e2(o);return{contrast:t,textSize:e,language:l,colorblind:n,saturation:a,dyslexia:i,letterSpacing:u,lineHeight:c,fontWeight:f,highlight:r,animations:y,cursor:h,readingGuide:g,hideImages:v,textAlign:A,tts:C,profiles:L,pageStructure:s,hasActiveFeatures:d,resetAllFeatures:()=>{Vn(),window.dispatchEvent(new CustomEvent("accessibilityReset",{detail:{timestamp:Date.now()}}))},currentSettings:o}}var Q2=_(k(),1);var Wu=_(pt(),1);function ku({title:t,children:e}){return(0,Wu.jsxs)("section",{className:"px-4 py-3",children:[(0,Wu.jsx)("h3",{className:"text-xs font-semibold text-blue-700 uppercase tracking-wider mb-3",children:t}),e]})}var ti=_(pt(),1);function mt({icon:t,label:e,isActive:l,onClick:n,disabled:a=!1,className:i}){return(0,ti.jsxs)("button",{type:"button",onClick:a?void 0:n,disabled:a,"aria-pressed":l,"aria-label":e,className:ge("flex flex-col items-center justify-center gap-1.5 rounded-3xl p-3 shadow-lg text-center cursor-pointer transition-all","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-1 focus:bg-blue-50",l?"ring-2 ring-green-500 bg-green-50 text-blue-900":"border-gray-200 bg-white text-gray-700 hover:ring-2 hover:ring-blue-300 hover:bg-blue-50",a&&"cursor-not-allowed opacity-40",i),children:[(0,ti.jsx)("span",{className:ge("h-6 w-6",l?"text-blue-700":"text-gray-500"),children:t}),(0,ti.jsx)("span",{className:"text-base font-medium leading-tight",children:e})]})}var Wn=_(pt(),1);function j2({percentage:t,onIncrease:e,onDecrease:l,onReset:n,canIncrease:a,canDecrease:i}){return(0,Wn.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Wn.jsx)("button",{type:"button",onClick:l,disabled:!i,"aria-label":"Reducir tama\xF1o de texto",className:"flex h-9 w-9 items-center justify-center rounded-lg border border-gray-200 bg-white text-lg font-bold text-blue-700 cursor-pointer transition hover:border-blue-400 hover:bg-blue-50 disabled:cursor-not-allowed disabled:opacity-40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500",children:"\u2212"}),(0,Wn.jsxs)("button",{type:"button",onClick:n,"aria-label":"Restablecer tama\xF1o de texto",className:"flex-1 rounded-lg border border-gray-200 bg-white py-2 text-center text-sm font-semibold text-blue-900 cursor-pointer transition hover:border-blue-400 hover:bg-blue-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500",children:[t,"%"]}),(0,Wn.jsx)("button",{type:"button",onClick:e,disabled:!a,"aria-label":"Aumentar tama\xF1o de texto",className:"flex h-9 w-9 items-center justify-center rounded-lg border border-gray-200 bg-white text-lg font-bold text-blue-700 cursor-pointer transition hover:border-blue-400 hover:bg-blue-50 disabled:cursor-not-allowed disabled:opacity-40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500",children:"+"})]})}var m=_(pt(),1);function w2({onClose:t}){let[e,l]=(0,Q2.useState)(!1),{contrast:n,textSize:a,saturation:i,dyslexia:u,letterSpacing:c,lineHeight:f,fontWeight:r,highlight:y,animations:h,cursor:g,readingGuide:v,colorblind:A,hideImages:C,textAlign:L,tts:s,profiles:o,pageStructure:d,resetAllFeatures:S}=Ju();return(0,m.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":"Men\xFA de Accesibilidad",className:"flex flex-col h-full overflow-hidden",style:{backgroundColor:"var(--apea-color-panel-bg, #f9fafb)"},children:[(0,m.jsxs)("div",{className:"flex items-center justify-between apea-gradient px-4 py-3 shrink-0",children:[(0,m.jsx)("h2",{className:"text-sm font-bold text-white tracking-wide",children:"Men\xFA de Accesibilidad"}),(0,m.jsx)("div",{className:"flex items-center gap-2",children:(0,m.jsx)("button",{type:"button",onClick:t,"aria-label":"Cerrar men\xFA de accesibilidad",className:"flex h-8 w-8 items-center justify-center rounded-full border border-white/30 text-white cursor-pointer transition hover:bg-white/20 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white",children:(0,m.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2.2,className:"h-4 w-4","data-a11y-icon":!0,children:(0,m.jsx)("path",{d:"M18 6 6 18M6 6l12 12",strokeLinecap:"round",strokeLinejoin:"round"})})})})]}),(0,m.jsxs)("div",{className:"flex-1 overflow-y-auto",children:[(0,m.jsxs)("section",{className:"px-4 py-3",children:[(0,m.jsxs)("button",{type:"button",onClick:()=>l(b=>!b),"aria-expanded":e,className:"flex w-full items-center justify-between text-xs font-semibold text-blue-700 uppercase tracking-wider cursor-pointer",children:["Perfiles de accesibilidad",(0,m.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:`h-4 w-4 transition-transform duration-300 ease-in-out ${e?"rotate-180":""}`,"data-a11y-icon":!0,children:(0,m.jsx)("path",{d:"M6 9l6 6 6-6",strokeLinecap:"round",strokeLinejoin:"round"})})]}),(0,m.jsx)("div",{className:`grid transition-[grid-template-rows] duration-300 ease-in-out ${e?"grid-rows-[1fr]":"grid-rows-[0fr]"}`,children:(0,m.jsx)("div",{className:"overflow-hidden pb-5 px-2 -mx-2",children:(0,m.jsx)("div",{className:`grid grid-cols-2 gap-2 pt-3 transition-opacity duration-300 ease-in-out ${e?"opacity-100":"opacity-0"}`,children:Object.keys(wo).map(b=>(0,m.jsx)(mt,{icon:(0,m.jsx)(Hv,{profile:b}),label:wo[b],isActive:o.activeProfile===b,onClick:()=>o.applyProfile(b)},b))})})})]}),(0,m.jsxs)(ku,{title:"Ajustes de contenido",children:[(0,m.jsxs)("div",{className:"mb-3 rounded-xl border border-gray-200 bg-white p-3",children:[(0,m.jsxs)("div",{className:"mb-2 flex items-center gap-2 text-sm font-medium text-gray-700",children:[(0,m.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-4 w-4 shrink-0","data-a11y-icon":!0,children:(0,m.jsx)("path",{d:"M4 7V4h16v3M9 20h6M12 4v16",strokeLinecap:"round",strokeLinejoin:"round"})}),"Tama\xF1o de fuente"]}),(0,m.jsx)(j2,{percentage:a.textSizePercentage,onIncrease:a.increaseTextSize,onDecrease:a.decreaseTextSize,onReset:a.resetTextSize,canIncrease:a.canIncrease,canDecrease:a.canDecrease})]}),(0,m.jsxs)("div",{className:"grid grid-cols-3 gap-2",children:[(0,m.jsx)(mt,{icon:(0,m.jsx)(yv,{}),label:"Resaltar t\xEDtulos",isActive:y.isTitlesActive,onClick:y.toggleTitles}),(0,m.jsx)(mt,{icon:(0,m.jsx)(vv,{}),label:"Resaltar enlaces",isActive:y.isLinksActive,onClick:y.toggleLinks}),(0,m.jsx)(mt,{icon:(0,m.jsx)(hv,{}),label:"Fuente dislexia",isActive:u.isActive,onClick:u.toggle}),(0,m.jsx)(Z2,{icon:(0,m.jsx)(Sv,{}),label:"Esp. de letras",level:c.level,onIncrease:c.increase,onDecrease:c.decrease,canIncrease:c.canIncrease,canDecrease:c.canDecrease}),(0,m.jsx)(Z2,{icon:(0,m.jsx)(pv,{}),label:"Interlineado",level:f.level,onIncrease:f.increase,onDecrease:f.decrease,canIncrease:f.canIncrease,canDecrease:f.canDecrease}),(0,m.jsx)(mt,{icon:(0,m.jsx)(bv,{}),label:"Fuente negrita",isActive:r.isBold,onClick:r.toggle}),(0,m.jsx)(mt,{icon:(0,m.jsx)(_v,{}),label:"Ocultar im\xE1genes",isActive:C.isActive,onClick:C.toggle}),(0,m.jsx)(mt,{icon:(0,m.jsx)(Ov,{mode:L.mode}),label:`Alinear: ${L.label}`,isActive:L.isActive,onClick:L.cycle})]})]}),(0,m.jsxs)(ku,{title:"Ajustes de color",children:[(0,m.jsxs)("div",{className:"grid grid-cols-3 gap-2 mb-3",children:[(0,m.jsx)(mt,{icon:(0,m.jsx)(Av,{}),label:"Alto contraste",isActive:n.isHighContrast,onClick:()=>n.setContrastMode(n.isHighContrast?"normal":"high")}),(0,m.jsx)(mt,{icon:(0,m.jsx)(Ev,{}),label:"Alta saturaci\xF3n",isActive:i.saturationMode==="high",onClick:()=>i.setSaturationMode(i.saturationMode==="high"?"normal":"high")}),(0,m.jsx)(mt,{icon:(0,m.jsx)(Cv,{}),label:"Baja saturaci\xF3n",isActive:i.saturationMode==="low",onClick:()=>i.setSaturationMode(i.saturationMode==="low"?"normal":"low")}),(0,m.jsx)(mt,{icon:(0,m.jsx)(Mv,{}),label:"Monocromo",isActive:i.saturationMode==="mono",onClick:()=>i.setSaturationMode(i.saturationMode==="mono"?"normal":"mono")})]}),(0,m.jsx)("p",{className:"mb-2 text-xs font-medium text-gray-500 uppercase tracking-wide hidden",children:"Daltonismo"}),(0,m.jsx)("div",{className:"grid grid-cols-2 gap-2 hidden",children:[["protanopia","Protanop\xEDa"],["deuteranopia","Deuteranop\xEDa"],["tritanopia","Tritanop\xEDa"],["achromatopsia","Acromatopsia"]].map(([b,H])=>(0,m.jsx)(mt,{icon:(0,m.jsx)(Dv,{mode:b}),label:H,isActive:A.colorblindMode===b,onClick:()=>A.setColorblindMode(A.colorblindMode===b?"normal":b)},b))})]}),(0,m.jsxs)(ku,{title:"Herramientas",children:[(0,m.jsxs)("div",{className:"grid grid-cols-3 gap-2",children:[(0,m.jsx)(mt,{icon:(0,m.jsx)(Tv,{}),label:"Gu\xEDa de lectura",isActive:v.isActive,onClick:v.toggle}),(0,m.jsx)(mt,{icon:(0,m.jsx)(zv,{}),label:"Pausar animaciones",isActive:h.isActive,onClick:h.toggle}),(0,m.jsx)(mt,{icon:(0,m.jsx)(xv,{}),label:"Cursor grande",isActive:g.isActive,onClick:g.toggle}),(0,m.jsx)(mt,{icon:(0,m.jsx)(Lv,{}),label:s.isReading?"Detener lectura":"Leer p\xE1gina",isActive:s.isReading,onClick:s.toggle,disabled:!s.isSupported}),(0,m.jsx)(mt,{icon:(0,m.jsx)(Nv,{}),label:"Estructura",isActive:d.isOpen,onClick:d.toggle})]}),d.isOpen&&d.structure.length>0&&(0,m.jsxs)("div",{className:"mt-3 rounded-xl border border-gray-200 bg-white p-3 max-h-60 overflow-y-auto",children:[(0,m.jsx)("p",{className:"mb-2 text-xs font-medium text-gray-500 uppercase tracking-wide",children:"Estructura de la p\xE1gina"}),(0,m.jsx)("ul",{className:"space-y-1",children:d.structure.map((b,H)=>(0,m.jsx)("li",{children:(0,m.jsxs)("button",{type:"button",onClick:()=>d.navigateTo(b),className:"w-full text-left px-2 py-1.5 rounded-lg text-sm hover:bg-blue-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 transition-colors",style:{paddingLeft:`${(b.level||1)*12}px`},children:[(0,m.jsx)("span",{className:"inline-block mr-2 text-xs font-mono text-blue-600 bg-blue-100 px-1.5 py-0.5 rounded",children:b.tag}),(0,m.jsx)("span",{className:"text-gray-700",children:b.text})]})},`${b.tag}-${H}`))})]}),d.isOpen&&d.structure.length===0&&(0,m.jsx)("div",{className:"mt-3 rounded-xl border border-gray-200 bg-white p-3",children:(0,m.jsx)("p",{className:"text-sm text-gray-500 text-center",children:"No se encontraron encabezados"})})]})]}),(0,m.jsx)("section",{className:"px-4 pb-6 pt-2",children:(0,m.jsx)("button",{type:"button",onClick:S,className:"w-full rounded-xl apea-gradient py-3 text-sm font-semibold text-white cursor-pointer transition hover:bg-none hover:bg-green-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2",children:"Restablecer configuraci\xF3n"})})]})}function Z2({icon:t,label:e,level:l,onIncrease:n,onDecrease:a,canIncrease:i,canDecrease:u}){let c=l>0;return(0,m.jsxs)("div",{className:`flex flex-col items-center justify-between gap-1 rounded-3xl border p-2 shadow-md/20 text-center transition-all ${c?"border-yellow-500 bg-yellow-50 text-blue-900":"border-gray-200 bg-white text-gray-700"}`,children:[(0,m.jsx)("span",{className:"h-5 w-5 text-gray-500",children:t}),(0,m.jsx)("span",{className:"text-sm font-medium leading-tight",children:e}),(0,m.jsxs)("div",{className:"flex items-center gap-1 w-full justify-center",children:[(0,m.jsx)("button",{type:"button",onClick:a,disabled:!u,"aria-label":`Reducir ${e}`,className:"flex h-5 w-5 items-center justify-center rounded text-xs font-bold text-blue-700 cursor-pointer hover:bg-blue-100 disabled:opacity-30 focus-visible:outline-none",children:"\u2212"}),(0,m.jsx)("span",{className:"w-4 text-center text-sm font-semibold tabular-nums",children:l}),(0,m.jsx)("button",{type:"button",onClick:n,disabled:!i,"aria-label":`Aumentar ${e}`,className:"flex h-5 w-5 items-center justify-center rounded text-xs font-bold text-blue-700 cursor-pointer hover:bg-blue-100 disabled:opacity-30 focus-visible:outline-none",children:"+"})]})]})}function yv(){return(0,m.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[(0,m.jsx)("path",{d:"M4 6h16M4 12h8M4 18h12",strokeLinecap:"round"}),(0,m.jsx)("path",{d:"M15 14l5 5M20 14l-5 5",strokeLinecap:"round",strokeLinejoin:"round"})]})}function vv(){return(0,m.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[(0,m.jsx)("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",strokeLinecap:"round",strokeLinejoin:"round"}),(0,m.jsx)("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",strokeLinecap:"round",strokeLinejoin:"round"})]})}function hv(){return(0,m.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:(0,m.jsx)("path",{d:"M4 7l4 10 4-10M20 7v10M17 7h6",strokeLinecap:"round",strokeLinejoin:"round"})})}function Sv(){return(0,m.jsx)("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-a11y-icon":!0,children:(0,m.jsx)("path",{d:"m20.003 16.975-2.027 2.028m.113-3.943 1.914 1.915m-16.006 0 2.027-2.029m-.113 3.944-1.914-1.915m0 0h16.006m-2-5.975L15.16 4.997 12.317 11m.568-1.2h4.547M4.997 4.997 7.84 11l2.843-6.003",stroke:"#000",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})}function pv(){return(0,m.jsxs)("svg",{width:25,height:24,viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-a11y-icon":!0,children:[(0,m.jsx)("path",{d:"M12.754 4a.75.75 0 0 1 .75-.75H20.5a.75.75 0 0 1 0 1.5h-6.996a.75.75 0 0 1-.75-.75m7.746 9.917h-6.996a.75.75 0 0 0 0 1.5H20.5a.75.75 0 0 0 0-1.5m-6.996 5.333a.75.75 0 0 0 0 1.5H20.5a.75.75 0 0 0 0-1.5zm6.996-9.167h-6.996a.75.75 0 0 1 0-1.5H20.5a.75.75 0 0 1 0 1.5",opacity:.4,fill:"#323544"}),(0,m.jsx)("path",{d:"m9.974 16.47-1.722 1.72V5.81l1.722 1.72a.75.75 0 0 0 1.06-1.06l-3.002-3a.75.75 0 0 0-1.06 0l-3.002 3a.75.75 0 0 0 1.06 1.06l1.722-1.72v12.38L5.03 16.47a.75.75 0 0 0-1.06 1.06l3.002 3a.75.75 0 0 0 1.06 0l3.002-3a.75.75 0 0 0-1.06-1.06",fill:"#323544"})]})}function bv(){return(0,m.jsxs)("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:"h-full w-full","data-a11y-icon":!0,children:[(0,m.jsx)("path",{d:"M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"}),(0,m.jsx)("path",{d:"M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"})]})}function Av(){return(0,m.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[(0,m.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,m.jsx)("path",{d:"M12 3v18"}),(0,m.jsx)("path",{d:"M12 3a9 9 0 0 1 0 18V3z",fill:"currentColor",stroke:"none"})]})}function Ev(){return(0,m.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[(0,m.jsx)("circle",{cx:"12",cy:"12",r:"8"}),(0,m.jsx)("path",{d:"M12 4v16M8 8l8 8M4 12h16",strokeLinecap:"round",strokeOpacity:.4}),(0,m.jsx)("circle",{cx:"12",cy:"12",r:"4",fill:"currentColor"})]})}function Cv(){return(0,m.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[(0,m.jsx)("circle",{cx:"12",cy:"12",r:"8"}),(0,m.jsx)("circle",{cx:"12",cy:"12",r:"3",strokeDasharray:"2 2"})]})}function Mv(){return(0,m.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[(0,m.jsx)("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),(0,m.jsx)("path",{d:"M3 12h18M12 5v14"}),(0,m.jsx)("path",{d:"M3 5h9v14H3z",fill:"currentColor",fillOpacity:.15,stroke:"none"})]})}function Tv(){return(0,m.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[(0,m.jsx)("path",{d:"M4 6h16M4 10h16M4 14h10",strokeLinecap:"round"}),(0,m.jsx)("path",{d:"M3 18h18",strokeWidth:3,strokeLinecap:"round"})]})}function zv(){return(0,m.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[(0,m.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,m.jsx)("rect",{x:"9",y:"9",width:"2",height:"6",fill:"currentColor",stroke:"none"}),(0,m.jsx)("rect",{x:"13",y:"9",width:"2",height:"6",fill:"currentColor",stroke:"none"})]})}function xv(){return(0,m.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:"h-full w-full","data-a11y-icon":!0,children:(0,m.jsx)("path",{d:"M5 3l14 9-7.5 1.5L9 20l-4-17z"})})}function _v(){return(0,m.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[(0,m.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),(0,m.jsx)("circle",{cx:"8.5",cy:"8.5",r:"1.5",fill:"currentColor",stroke:"none"}),(0,m.jsx)("path",{d:"M21 15l-5-5L5 21",strokeLinecap:"round",strokeLinejoin:"round"}),(0,m.jsx)("path",{d:"M2 2l20 20",strokeLinecap:"round",strokeWidth:2.5})]})}function Ov({mode:t}){return t==="center"?(0,m.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:(0,m.jsx)("path",{d:"M6 6h12M8 10h8M6 14h12M8 18h8",strokeLinecap:"round"})}):t==="right"?(0,m.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:(0,m.jsx)("path",{d:"M4 6h16M8 10h12M4 14h16M8 18h12",strokeLinecap:"round"})}):(0,m.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:(0,m.jsx)("path",{d:"M4 6h16M4 10h12M4 14h16M4 18h12",strokeLinecap:"round"})})}function Lv(){return(0,m.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[(0,m.jsx)("path",{d:"M11 5L6 9H2v6h4l5 4V5z",fill:"currentColor",stroke:"none"}),(0,m.jsx)("path",{d:"M15.54 8.46a5 5 0 0 1 0 7.07",strokeLinecap:"round"}),(0,m.jsx)("path",{d:"M19.07 4.93a10 10 0 0 1 0 14.14",strokeLinecap:"round"})]})}function Nv(){return(0,m.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[(0,m.jsx)("path",{d:"M4 6h16M4 10h12M8 14h12M8 18h8",strokeLinecap:"round"}),(0,m.jsx)("circle",{cx:"4",cy:"14",r:"1",fill:"currentColor",stroke:"none"}),(0,m.jsx)("circle",{cx:"4",cy:"18",r:"1",fill:"currentColor",stroke:"none"})]})}function Dv({mode:t}){return(0,m.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[(0,m.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,m.jsx)("path",{d:"M12 3c-3 4-3 10 0 18",strokeLinecap:"round"}),(0,m.jsx)("path",{d:"M12 3c3 4 3 10 0 18",strokeLinecap:"round"}),t==="achromatopsia"?(0,m.jsx)("path",{d:"M3 12h18"}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("path",{d:"M4 8h16",strokeOpacity:.4}),(0,m.jsx)("path",{d:"M4 16h16",strokeOpacity:.4})]})]})}function Hv({profile:t}){switch(t){case"visionImpaired":return(0,m.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[(0,m.jsx)("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),(0,m.jsx)("circle",{cx:"12",cy:"12",r:"3",fill:"currentColor"})]});case"cognitive":return(0,m.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[(0,m.jsx)("path",{d:"M12 2a7 7 0 0 1 7 7c0 3-2 5-3 7h-8c-1-2-3-4-3-7a7 7 0 0 1 7-7z"}),(0,m.jsx)("path",{d:"M9 16v2a3 3 0 0 0 6 0v-2"})]});case"motorImpaired":return(0,m.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[(0,m.jsx)("circle",{cx:"12",cy:"4",r:"2",fill:"currentColor"}),(0,m.jsx)("path",{d:"M12 6v6l4 4M12 12l-4 4",strokeLinecap:"round",strokeLinejoin:"round"}),(0,m.jsx)("circle",{cx:"8",cy:"20",r:"2"}),(0,m.jsx)("circle",{cx:"16",cy:"20",r:"2"})]});case"seniorFriendly":return(0,m.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[(0,m.jsx)("circle",{cx:"12",cy:"4",r:"2",fill:"currentColor"}),(0,m.jsx)("path",{d:"M12 6v8M12 14l-3 6M12 14l3 6M12 10h-2l-3 4M12 10h2",strokeLinecap:"round",strokeLinejoin:"round"})]});default:return null}}var ie=_(pt(),1);function Ko({position:t="bottom-left",className:e}={}){let[l,n]=(0,Fu.useState)(!0),{hasActiveFeatures:a}=Ju();(0,Fu.useEffect)(()=>{if(!l)return;let c=f=>{f.key==="Escape"&&n(!1)};return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[l]);let i=l||a?"var(--apea-color-fab-active, #FFD54F)":"var(--apea-color-fab-inactive, #F6F6F6)";return(0,ie.jsxs)(ie.Fragment,{children:[(0,ie.jsx)("div",{className:ge("fixed z-50 apea-fab",t==="bottom-right"?"bottom-8 right-5":"bottom-8 left-5",e),style:{filter:a?"drop-shadow(0 4px 12px rgba(255, 213, 79, 0.3))":"none"},onClick:()=>n(c=>!c),children:(0,ie.jsx)(Go,{size:"lg","aria-expanded":l,"aria-haspopup":"dialog","aria-label":`Accesibilidad - ${a?"Funciones activas":"Sin funciones activas"}`,leftIcon:(0,ie.jsx)($d,{className:"w-full z-50",color:i,stroke:i})})}),(0,ie.jsx)("div",{className:"fixed inset-0 z-40 apea-backdrop",style:{backgroundColor:"var(--apea-color-backdrop, rgba(0, 0, 0, 0.2))"},"data-visible":l?"true":"false",onClick:()=>n(!1),"aria-hidden":"true"}),(0,ie.jsx)("div",{role:"none",className:"fixed inset-y-0 right-0 z-50 w-full max-w-sm shadow-2xl apea-panel","data-open":l?"true":"false",children:(0,ie.jsx)(w2,{onClose:()=>n(!1)})})]})}var ko=_(pt(),1),Uv={primary500:"#005dca",primary600:"#004faf",primary700:"#003b8a",panelBackground:"#f9fafb",fabActive:"#ffd54f",fabInactive:"#f6f6f6",backdrop:"rgba(0, 0, 0, 0.2)"};function Jo(t){return{...Uv,...t}}function Rv(t,e){return{...t,...e,theme:{...t.theme??{},...e.theme??{}}}}function V2(t,e){t.style.setProperty("--apea-color-primary-500",e.primary500),t.style.setProperty("--apea-color-primary-600",e.primary600),t.style.setProperty("--apea-color-primary-700",e.primary700),t.style.setProperty("--apea-color-panel-bg",e.panelBackground),t.style.setProperty("--apea-color-fab-active",e.fabActive),t.style.setProperty("--apea-color-fab-inactive",e.fabInactive),t.style.setProperty("--apea-color-backdrop",e.backdrop)}function J2(t={}){let e={position:t.position||"bottom-left",zIndex:t.zIndex||9999,containerId:t.containerId||"ape-accessibility-root",theme:Jo(t.theme)},l=Jo(e.theme),n=e.containerId||"ape-accessibility-root";if(document.getElementById(n))return console.warn("[ape-accessibility] Widget already mounted. Call destroy() first."),{destroy:()=>{},updateConfig:()=>{},config:t};let a=document.createElement("style");a.id="ape-accessibility-tools-css",a.textContent=`/* ============================================= */\r
17
- /* Accessibility Feature Styles */\r
18
- /* ============================================= */\r
19
- \r
20
- /* High Contrast Mode */\r
21
- .high-contrast {\r
22
- --color-background: #000000;\r
23
- --color-foreground: #ffffff;\r
24
- }\r
25
- \r
26
- .high-contrast * {\r
27
- border-color: currentColor !important;\r
28
- }\r
29
- \r
30
- .high-contrast button,\r
31
- .high-contrast input,\r
32
- .high-contrast select,\r
33
- .high-contrast textarea {\r
34
- background-color: #000000 !important;\r
35
- color: #ffffff !important;\r
36
- border: 2px solid #ffffff !important;\r
37
- }\r
38
- \r
39
- .high-contrast a {\r
40
- color: #ffff00 !important;\r
41
- text-decoration: underline !important;\r
42
- }\r
43
- \r
44
- /* Text Size Scaling */\r
45
- :root {\r
46
- --accessibility-text-scale: 1;\r
47
- --accessibility-letter-spacing: 0;\r
48
- --accessibility-line-height: 0;\r
49
- }\r
50
- \r
51
- .accessibility-text-scaled * {\r
52
- font-size: calc(1em * var(--accessibility-text-scale)) !important;\r
53
- line-height: calc(1.4 * var(--accessibility-text-scale)) !important;\r
54
- }\r
55
- \r
56
- /* Colorblind Modes */\r
57
- :root[data-colorblind-mode='protanopia'],\r
58
- :root[data-colorblind-mode='deuteranopia'] {\r
59
- --color-blue-500: #0072b2;\r
60
- --color-green-500: #009e73;\r
61
- --color-yellow-500: #e69f00;\r
62
- --color-red-500: #d55e00;\r
63
- }\r
64
- \r
65
- :root[data-colorblind-mode='tritanopia'] {\r
66
- --color-blue-500: #9b2335;\r
67
- --color-yellow-500: #cc79a7;\r
68
- --color-green-500: #009e73;\r
69
- }\r
70
- \r
71
- :root[data-colorblind-mode='achromatopsia'] {\r
72
- filter: grayscale(1);\r
73
- }\r
74
- \r
75
- /* Saturation Modes */\r
76
- .accessibility-saturation-high {\r
77
- filter: saturate(2);\r
78
- }\r
79
- \r
80
- .accessibility-saturation-low {\r
81
- filter: saturate(0.3);\r
82
- }\r
83
- \r
84
- .accessibility-saturation-mono {\r
85
- filter: grayscale(1) contrast(1.2);\r
86
- }\r
87
- \r
88
- /* Dyslexia Font */\r
89
- @font-face {\r
90
- font-family: OpenDyslexic3;\r
91
- src: url('https://website-widgets.pages.dev/fonts/OpenDyslexic3-Regular.woff') format('woff');\r
92
- font-display: swap;\r
93
- }\r
94
- \r
95
- .accessibility-dyslexia,\r
96
- .accessibility-dyslexia * {\r
97
- font-family: OpenDyslexic3, 'Comic Sans MS', Arial, sans-serif !important;\r
98
- }\r
99
- \r
100
- /* Letter Spacing & Line Height */\r
101
- .accessibility-letter-spacing * {\r
102
- letter-spacing: calc(0.1em * var(--accessibility-letter-spacing)) !important;\r
103
- }\r
104
- \r
105
- .accessibility-line-height * {\r
106
- line-height: calc(1.4 + 0.3 * var(--accessibility-line-height)) !important;\r
107
- }\r
108
- \r
109
- .accessibility-font-weight * {\r
110
- font-weight: 700 !important;\r
111
- }\r
112
- \r
113
- /* Highlight Titles & Links */\r
114
- :root[data-highlight='titles'] h1,\r
115
- :root[data-highlight='titles'] h2,\r
116
- :root[data-highlight='titles'] h3,\r
117
- :root[data-highlight='titles'] h4,\r
118
- :root[data-highlight='titles'] h5,\r
119
- :root[data-highlight='titles'] h6,\r
120
- :root[data-highlight='both'] h1,\r
121
- :root[data-highlight='both'] h2,\r
122
- :root[data-highlight='both'] h3,\r
123
- :root[data-highlight='both'] h4,\r
124
- :root[data-highlight='both'] h5,\r
125
- :root[data-highlight='both'] h6 {\r
126
- background-color: rgba(254, 201, 5, 0.2) !important;\r
127
- border-radius: 2px;\r
128
- padding: 0 2px;\r
129
- }\r
130
- \r
131
- :root[data-highlight='links'] a,\r
132
- :root[data-highlight='both'] a {\r
133
- background-color: rgba(0, 93, 202, 0.12) !important;\r
134
- text-decoration: underline !important;\r
135
- }\r
136
- \r
137
- /* Stop Animations */\r
138
- .accessibility-stop-animations *,\r
139
- .accessibility-stop-animations *::before,\r
140
- .accessibility-stop-animations *::after {\r
141
- animation: none !important;\r
142
- transition: none !important;\r
143
- }\r
144
- \r
145
- /* Big Cursor */\r
146
- .accessibility-big-cursor,\r
147
- .accessibility-big-cursor * {\r
148
- cursor:\r
149
- url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M6 2L6 26L12 20L16 30L19 29L15 19L24 19Z' fill='%23000' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E")\r
150
- 6 2,\r
151
- auto !important;\r
152
- }\r
153
- \r
154
- /* Hide Images */\r
155
- .accessibility-hide-images img,\r
156
- .accessibility-hide-images svg:not([data-a11y-icon]),\r
157
- .accessibility-hide-images video,\r
158
- .accessibility-hide-images picture {\r
159
- visibility: hidden !important;\r
160
- }\r
161
- \r
162
- /* Text Alignment */\r
163
- :root[data-text-align='left'] * {\r
164
- text-align: left !important;\r
165
- }\r
166
- \r
167
- :root[data-text-align='center'] * {\r
168
- text-align: center !important;\r
169
- }\r
170
- \r
171
- :root[data-text-align='right'] * {\r
172
- text-align: right !important;\r
173
- }\r
16
+ `,Ge=null,hl=null;function rv(){Ge||(Ge=document.createElement("div"),Ge.id="ape-reading-guide-top",Ge.style.cssText=C2+"top: 0;",hl=document.createElement("div"),hl.id="ape-reading-guide-bottom",hl.style.cssText=C2+"bottom: 0;",document.body.appendChild(Ge),document.body.appendChild(hl),T2(window.innerHeight/2),document.addEventListener("mousemove",M2))}function dv(){document.removeEventListener("mousemove",M2),Ge?.remove(),hl?.remove(),Ge=null,hl=null}function M2(t){T2(t.clientY)}function T2(t){let l=Math.max(0,t-40),n=t+40;Ge&&(Ge.style.height=`${l}px`),hl&&(hl.style.top=`${n}px`)}function z2(){let[t,e]=(0,Kl.useState)(()=>O().stopAnimations??!1);(0,Kl.useEffect)(()=>{Qu(t)},[]),(0,Kl.useEffect)(()=>{let n=a=>{let{settings:i}=a.detail,u=i.stopAnimations??!1;u!==t&&(e(u),Qu(u))};return window.addEventListener("accessibilitySettingsChanged",n),()=>window.removeEventListener("accessibilitySettingsChanged",n)},[t]);let l=(0,Kl.useCallback)(()=>{let n=!t;e(n),Qu(n),q("stopAnimations",n)},[t]);return{isActive:t,toggle:l}}var Jl=_(k(),1);function x2(){let[t,e]=(0,Jl.useState)(()=>O().bigCursor??!1);(0,Jl.useEffect)(()=>{wu(t)},[]),(0,Jl.useEffect)(()=>{let n=a=>{let{settings:i}=a.detail,u=i.bigCursor??!1;u!==t&&(e(u),wu(u))};return window.addEventListener("accessibilitySettingsChanged",n),()=>window.removeEventListener("accessibilitySettingsChanged",n)},[t]);let l=(0,Jl.useCallback)(()=>{let n=!t;e(n),wu(n),q("bigCursor",n)},[t]);return{isActive:t,toggle:l}}var kl=_(k(),1);function _2(){let[t,e]=(0,kl.useState)(()=>O().readingGuide??!1);(0,kl.useEffect)(()=>{Zu(t)},[]),(0,kl.useEffect)(()=>{let n=a=>{let{settings:i}=a.detail,u=i.readingGuide??!1;u!==t&&(e(u),Zu(u))};return window.addEventListener("accessibilitySettingsChanged",n),()=>window.removeEventListener("accessibilitySettingsChanged",n)},[t]);let l=(0,kl.useCallback)(()=>{let n=!t;e(n),Zu(n),q("readingGuide",n)},[t]);return{isActive:t,toggle:l}}var Wl=_(k(),1);var O2="accessibility-hide-images";function Vu(t){let e=document.documentElement;t?e.classList.add(O2):e.classList.remove(O2)}function L2(){let[t,e]=(0,Wl.useState)(()=>O().hideImages??!1);(0,Wl.useEffect)(()=>{Vu(t)},[]),(0,Wl.useEffect)(()=>{let n=a=>{let{settings:i}=a.detail,u=i.hideImages??!1;u!==t&&(e(u),Vu(u))};return window.addEventListener("accessibilitySettingsChanged",n),()=>window.removeEventListener("accessibilitySettingsChanged",n)},[t]);let l=(0,Wl.useCallback)(()=>{let n=!t;e(n),Vu(n),q("hideImages",n)},[t]);return{isActive:t,toggle:l}}var Sl=_(k(),1);function Ia(t){let e=document.documentElement;t==="default"?e.removeAttribute("data-text-align"):e.setAttribute("data-text-align",t)}var Qo=["default","left","center","right"];function N2(){let[t,e]=(0,Sl.useState)(()=>O().textAlign??"default");(0,Sl.useEffect)(()=>{Ia(t)},[]),(0,Sl.useEffect)(()=>{let a=i=>{let{settings:u}=i.detail,c=u.textAlign??"default";c!==t&&(e(c),Ia(c))};return window.addEventListener("accessibilitySettingsChanged",a),()=>window.removeEventListener("accessibilitySettingsChanged",a)},[t]);let l=(0,Sl.useCallback)(()=>{let a=Qo.indexOf(t),i=Qo[(a+1)%Qo.length]??"default";e(i),Ia(i),q("textAlign",i)},[t]),n=(0,Sl.useCallback)(a=>{e(a),Ia(a),q("textAlign",a)},[]);return{mode:t,cycle:l,setMode:n,isActive:t!=="default",label:t==="default"?"Por defecto":t==="left"?"Izquierda":t==="center"?"Centrado":"Derecha"}}var pl=_(k(),1);var kn=null;function Ku(){return typeof window<"u"&&"speechSynthesis"in window}function D2(t="es"){if(!Ku())return;Pa();let l=(document.querySelector("main")??document.body).innerText;l.trim()&&(kn=new SpeechSynthesisUtterance(l),kn.lang=t==="es"?"es-ES":"en-US",kn.rate=1,window.speechSynthesis.speak(kn))}function Pa(){Ku()&&(window.speechSynthesis.cancel(),kn=null)}function H2(){return kn}function U2(){let[t,e]=(0,pl.useState)(!1),[l]=(0,pl.useState)(()=>Ku());(0,pl.useEffect)(()=>()=>{Pa()},[]),(0,pl.useEffect)(()=>{let a=()=>{Pa(),e(!1)};return window.addEventListener("accessibilityReset",a),()=>window.removeEventListener("accessibilityReset",a)},[]);let n=(0,pl.useCallback)(()=>{if(t)Pa(),e(!1);else{let a=O().language??"es";D2(a),e(!0);let i=H2();i&&(i.onend=()=>e(!1),i.onerror=()=>e(!1))}},[t]);return{isReading:t,isSupported:l,toggle:n}}var Fl=_(k(),1);var R2={visionImpaired:{contrast:"high",fontSize:120,highlightMode:"both",bigCursor:!0},cognitive:{dyslexiaFont:!0,lineHeight:2,letterSpacing:1,stopAnimations:!0},motorImpaired:{bigCursor:!0,stopAnimations:!0,fontSize:110},seniorFriendly:{fontSize:120,lineHeight:2,contrast:"high",bigCursor:!0}},wo={visionImpaired:"Visi\xF3n reducida",cognitive:"Cognitivo",motorImpaired:"Motor",seniorFriendly:"Adulto mayor"};function Vo(t){for(let[e,l]of Object.entries(R2))if(Object.entries(l).every(([a,i])=>t[a]===i))return e;return"none"}function B2(t){return t==="none"?{...ae}:R2[t]}function q2(){let[t,e]=(0,Fl.useState)(()=>Vo(O()));(0,Fl.useEffect)(()=>{let n=a=>{let{settings:i}=a.detail;e(Vo(i))};return window.addEventListener("accessibilitySettingsChanged",n),()=>window.removeEventListener("accessibilitySettingsChanged",n)},[]),(0,Fl.useEffect)(()=>{let n=()=>e("none");return window.addEventListener("accessibilityReset",n),()=>window.removeEventListener("accessibilityReset",n)},[]);let l=(0,Fl.useCallback)(n=>{if(n===t){Vn(),window.dispatchEvent(new CustomEvent("accessibilityReset",{detail:{timestamp:Date.now()}}));return}let a=B2(n);Zo(a)},[t]);return{activeProfile:t,applyProfile:l}}var bl=_(k(),1);var mv=["H1","H2","H3","H4","H5","H6"],gv=["main","nav","aside","footer","header",'[role="banner"]','[role="navigation"]','[role="main"]','[role="complementary"]','[role="contentinfo"]'];function Y2(){let t=[],e=new Set;return document.querySelectorAll(gv.join(",")).forEach(a=>{if(e.has(a))return;e.add(a);let i=a.getAttribute("role")||a.tagName.toLowerCase(),u=a.getAttribute("aria-label")||i;t.push({tag:i,text:u,level:0,element:a})}),document.querySelectorAll("h1, h2, h3, h4, h5, h6").forEach(a=>{let i=a.tagName;if(!mv.includes(i))return;let u=parseInt(i.charAt(1),10),c=(a.textContent??"").trim().slice(0,80);c&&t.push({tag:i.toLowerCase(),text:c,level:u,element:a})}),t}function G2(t){t.scrollIntoView({behavior:"smooth",block:"center"}),t.focus({preventScroll:!0})}function X2(){let[t,e]=(0,bl.useState)(!1),[l,n]=(0,bl.useState)([]),a=(0,bl.useCallback)(()=>{n(Y2()),e(!0)},[]),i=(0,bl.useCallback)(()=>{e(!1)},[]),u=(0,bl.useCallback)(()=>{t?i():a()},[t,a,i]),c=(0,bl.useCallback)(f=>{G2(f.element)},[]);return{isOpen:t,structure:l,toggle:u,open:a,close:i,navigateTo:c}}function Ju(){let t=l2(),e=i2(),l=u2(),n=c2(),a=o2(),i=r2(),u=v2(),c=S2(),f=p2(),r=b2(),y=z2(),h=x2(),g=_2(),v=L2(),A=N2(),C=U2(),L=q2(),s=X2(),o=O(),d=e2(o);return{contrast:t,textSize:e,language:l,colorblind:n,saturation:a,dyslexia:i,letterSpacing:u,lineHeight:c,fontWeight:f,highlight:r,animations:y,cursor:h,readingGuide:g,hideImages:v,textAlign:A,tts:C,profiles:L,pageStructure:s,hasActiveFeatures:d,resetAllFeatures:()=>{Vn(),window.dispatchEvent(new CustomEvent("accessibilityReset",{detail:{timestamp:Date.now()}}))},currentSettings:o}}var Q2=_(k(),1);var Wu=_(pt(),1);function ku({title:t,children:e}){return(0,Wu.jsxs)("section",{className:"px-4 py-3",children:[(0,Wu.jsx)("h3",{className:"text-xs font-semibold text-blue-700 uppercase tracking-wider mb-3",children:t}),e]})}var ti=_(pt(),1);function mt({icon:t,label:e,isActive:l,onClick:n,disabled:a=!1,className:i}){return(0,ti.jsxs)("button",{type:"button",onClick:a?void 0:n,disabled:a,"aria-pressed":l,"aria-label":e,className:ge("flex flex-col items-center justify-center gap-1.5 rounded-3xl p-3 shadow-lg text-center cursor-pointer transition-all","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-1 focus:bg-blue-50",l?"ring-2 ring-green-500 bg-green-50 text-blue-900":"border-gray-200 bg-white text-gray-700 hover:ring-2 hover:ring-blue-300 hover:bg-blue-50",a&&"cursor-not-allowed opacity-40",i),children:[(0,ti.jsx)("span",{className:ge("h-6 w-6",l?"text-blue-700":"text-gray-500"),children:t}),(0,ti.jsx)("span",{className:"text-base font-medium leading-tight",children:e})]})}var Wn=_(pt(),1);function j2({percentage:t,onIncrease:e,onDecrease:l,onReset:n,canIncrease:a,canDecrease:i}){return(0,Wn.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Wn.jsx)("button",{type:"button",onClick:l,disabled:!i,"aria-label":"Reducir tama\xF1o de texto",className:"flex h-9 w-9 items-center justify-center rounded-lg border border-gray-200 bg-white text-lg font-bold text-blue-700 cursor-pointer transition hover:border-blue-400 hover:bg-blue-50 disabled:cursor-not-allowed disabled:opacity-40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500",children:"\u2212"}),(0,Wn.jsxs)("button",{type:"button",onClick:n,"aria-label":"Restablecer tama\xF1o de texto",className:"flex-1 rounded-lg border border-gray-200 bg-white py-2 text-center text-sm font-semibold text-blue-900 cursor-pointer transition hover:border-blue-400 hover:bg-blue-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500",children:[t,"%"]}),(0,Wn.jsx)("button",{type:"button",onClick:e,disabled:!a,"aria-label":"Aumentar tama\xF1o de texto",className:"flex h-9 w-9 items-center justify-center rounded-lg border border-gray-200 bg-white text-lg font-bold text-blue-700 cursor-pointer transition hover:border-blue-400 hover:bg-blue-50 disabled:cursor-not-allowed disabled:opacity-40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500",children:"+"})]})}var m=_(pt(),1);function w2({onClose:t}){let[e,l]=(0,Q2.useState)(!1),{contrast:n,textSize:a,saturation:i,dyslexia:u,letterSpacing:c,lineHeight:f,fontWeight:r,highlight:y,animations:h,cursor:g,readingGuide:v,colorblind:A,hideImages:C,textAlign:L,tts:s,profiles:o,pageStructure:d,resetAllFeatures:S}=Ju();return(0,m.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":"Men\xFA de Accesibilidad",className:"flex flex-col h-full overflow-hidden",style:{backgroundColor:"var(--apea-color-panel-bg, #f9fafb)"},children:[(0,m.jsxs)("div",{className:"flex items-center justify-between apea-gradient px-4 py-3 shrink-0",children:[(0,m.jsx)("h2",{className:"text-sm font-bold text-white tracking-wide",children:"Men\xFA de Accesibilidad"}),(0,m.jsx)("div",{className:"flex items-center gap-2",children:(0,m.jsx)("button",{type:"button",onClick:t,"aria-label":"Cerrar men\xFA de accesibilidad",className:"flex h-8 w-8 items-center justify-center rounded-full border border-white/30 text-white cursor-pointer transition hover:bg-white/20 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white",children:(0,m.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2.2,className:"h-4 w-4","data-a11y-icon":!0,children:(0,m.jsx)("path",{d:"M18 6 6 18M6 6l12 12",strokeLinecap:"round",strokeLinejoin:"round"})})})})]}),(0,m.jsxs)("div",{className:"flex-1 overflow-y-auto",children:[(0,m.jsxs)("section",{className:"px-4 py-3",children:[(0,m.jsxs)("button",{type:"button",onClick:()=>l(b=>!b),"aria-expanded":e,className:"flex w-full items-center justify-between text-xs font-semibold text-blue-700 uppercase tracking-wider cursor-pointer",children:["Perfiles de accesibilidad",(0,m.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:`h-4 w-4 transition-transform duration-300 ease-in-out ${e?"rotate-180":""}`,"data-a11y-icon":!0,children:(0,m.jsx)("path",{d:"M6 9l6 6 6-6",strokeLinecap:"round",strokeLinejoin:"round"})})]}),(0,m.jsx)("div",{className:`grid transition-[grid-template-rows] duration-300 ease-in-out ${e?"grid-rows-[1fr]":"grid-rows-[0fr]"}`,children:(0,m.jsx)("div",{className:"overflow-hidden pb-5 px-2 -mx-2",children:(0,m.jsx)("div",{className:`grid grid-cols-2 gap-2 pt-3 transition-opacity duration-300 ease-in-out ${e?"opacity-100":"opacity-0"}`,children:Object.keys(wo).map(b=>(0,m.jsx)(mt,{icon:(0,m.jsx)(Hv,{profile:b}),label:wo[b],isActive:o.activeProfile===b,onClick:()=>o.applyProfile(b)},b))})})})]}),(0,m.jsxs)(ku,{title:"Ajustes de contenido",children:[(0,m.jsxs)("div",{className:"mb-3 rounded-xl border border-gray-200 bg-white p-3",children:[(0,m.jsxs)("div",{className:"mb-2 flex items-center gap-2 text-sm font-medium text-gray-700",children:[(0,m.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-4 w-4 shrink-0","data-a11y-icon":!0,children:(0,m.jsx)("path",{d:"M4 7V4h16v3M9 20h6M12 4v16",strokeLinecap:"round",strokeLinejoin:"round"})}),"Tama\xF1o de fuente"]}),(0,m.jsx)(j2,{percentage:a.textSizePercentage,onIncrease:a.increaseTextSize,onDecrease:a.decreaseTextSize,onReset:a.resetTextSize,canIncrease:a.canIncrease,canDecrease:a.canDecrease})]}),(0,m.jsxs)("div",{className:"grid grid-cols-3 gap-2",children:[(0,m.jsx)(mt,{icon:(0,m.jsx)(yv,{}),label:"Resaltar t\xEDtulos",isActive:y.isTitlesActive,onClick:y.toggleTitles}),(0,m.jsx)(mt,{icon:(0,m.jsx)(vv,{}),label:"Resaltar enlaces",isActive:y.isLinksActive,onClick:y.toggleLinks}),(0,m.jsx)(mt,{icon:(0,m.jsx)(hv,{}),label:"Fuente dislexia",isActive:u.isActive,onClick:u.toggle}),(0,m.jsx)(Z2,{icon:(0,m.jsx)(Sv,{}),label:"Esp. de letras",level:c.level,onIncrease:c.increase,onDecrease:c.decrease,canIncrease:c.canIncrease,canDecrease:c.canDecrease}),(0,m.jsx)(Z2,{icon:(0,m.jsx)(pv,{}),label:"Interlineado",level:f.level,onIncrease:f.increase,onDecrease:f.decrease,canIncrease:f.canIncrease,canDecrease:f.canDecrease}),(0,m.jsx)(mt,{icon:(0,m.jsx)(bv,{}),label:"Fuente negrita",isActive:r.isBold,onClick:r.toggle}),(0,m.jsx)(mt,{icon:(0,m.jsx)(_v,{}),label:"Ocultar im\xE1genes",isActive:C.isActive,onClick:C.toggle}),(0,m.jsx)(mt,{icon:(0,m.jsx)(Ov,{mode:L.mode}),label:`Alinear: ${L.label}`,isActive:L.isActive,onClick:L.cycle})]})]}),(0,m.jsxs)(ku,{title:"Ajustes de color",children:[(0,m.jsxs)("div",{className:"grid grid-cols-3 gap-2 mb-3",children:[(0,m.jsx)(mt,{icon:(0,m.jsx)(Av,{}),label:"Alto contraste",isActive:n.isHighContrast,onClick:()=>n.setContrastMode(n.isHighContrast?"normal":"high")}),(0,m.jsx)(mt,{icon:(0,m.jsx)(Ev,{}),label:"Alta saturaci\xF3n",isActive:i.saturationMode==="high",onClick:()=>i.setSaturationMode(i.saturationMode==="high"?"normal":"high")}),(0,m.jsx)(mt,{icon:(0,m.jsx)(Cv,{}),label:"Baja saturaci\xF3n",isActive:i.saturationMode==="low",onClick:()=>i.setSaturationMode(i.saturationMode==="low"?"normal":"low")}),(0,m.jsx)(mt,{icon:(0,m.jsx)(Mv,{}),label:"Monocromo",isActive:i.saturationMode==="mono",onClick:()=>i.setSaturationMode(i.saturationMode==="mono"?"normal":"mono")})]}),(0,m.jsx)("p",{className:"mb-2 text-xs font-medium text-gray-500 uppercase tracking-wide hidden",children:"Daltonismo"}),(0,m.jsx)("div",{className:"grid grid-cols-2 gap-2 hidden",children:[["protanopia","Protanop\xEDa"],["deuteranopia","Deuteranop\xEDa"],["tritanopia","Tritanop\xEDa"],["achromatopsia","Acromatopsia"]].map(([b,H])=>(0,m.jsx)(mt,{icon:(0,m.jsx)(Dv,{mode:b}),label:H,isActive:A.colorblindMode===b,onClick:()=>A.setColorblindMode(A.colorblindMode===b?"normal":b)},b))})]}),(0,m.jsxs)(ku,{title:"Herramientas",children:[(0,m.jsxs)("div",{className:"grid grid-cols-3 gap-2",children:[(0,m.jsx)(mt,{icon:(0,m.jsx)(Tv,{}),label:"Gu\xEDa de lectura",isActive:v.isActive,onClick:v.toggle}),(0,m.jsx)(mt,{icon:(0,m.jsx)(zv,{}),label:"Pausar animaciones",isActive:h.isActive,onClick:h.toggle}),(0,m.jsx)(mt,{icon:(0,m.jsx)(xv,{}),label:"Cursor grande",isActive:g.isActive,onClick:g.toggle}),(0,m.jsx)(mt,{icon:(0,m.jsx)(Lv,{}),label:s.isReading?"Detener lectura":"Leer p\xE1gina",isActive:s.isReading,onClick:s.toggle,disabled:!s.isSupported}),(0,m.jsx)(mt,{icon:(0,m.jsx)(Nv,{}),label:"Estructura",isActive:d.isOpen,onClick:d.toggle})]}),d.isOpen&&d.structure.length>0&&(0,m.jsxs)("div",{className:"mt-3 rounded-xl border border-gray-200 bg-white p-3 max-h-60 overflow-y-auto",children:[(0,m.jsx)("p",{className:"mb-2 text-xs font-medium text-gray-500 uppercase tracking-wide",children:"Estructura de la p\xE1gina"}),(0,m.jsx)("ul",{className:"space-y-1",children:d.structure.map((b,H)=>(0,m.jsx)("li",{children:(0,m.jsxs)("button",{type:"button",onClick:()=>d.navigateTo(b),className:"w-full text-left px-2 py-1.5 rounded-lg text-sm hover:bg-blue-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 transition-colors",style:{paddingLeft:`${(b.level||1)*12}px`},children:[(0,m.jsx)("span",{className:"inline-block mr-2 text-xs font-mono text-blue-600 bg-blue-100 px-1.5 py-0.5 rounded",children:b.tag}),(0,m.jsx)("span",{className:"text-gray-700",children:b.text})]})},`${b.tag}-${H}`))})]}),d.isOpen&&d.structure.length===0&&(0,m.jsx)("div",{className:"mt-3 rounded-xl border border-gray-200 bg-white p-3",children:(0,m.jsx)("p",{className:"text-sm text-gray-500 text-center",children:"No se encontraron encabezados"})})]})]}),(0,m.jsx)("section",{className:"px-4 pb-6 pt-2",children:(0,m.jsx)("button",{type:"button",onClick:S,className:"w-full rounded-xl apea-gradient py-3 text-sm font-semibold text-white cursor-pointer transition hover:bg-none hover:bg-green-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2",children:"Restablecer configuraci\xF3n"})})]})}function Z2({icon:t,label:e,level:l,onIncrease:n,onDecrease:a,canIncrease:i,canDecrease:u}){let c=l>0;return(0,m.jsxs)("div",{className:`flex flex-col items-center justify-between gap-1 rounded-3xl border p-2 shadow-md/20 text-center transition-all ${c?"border-yellow-500 bg-yellow-50 text-blue-900":"border-gray-200 bg-white text-gray-700"}`,children:[(0,m.jsx)("span",{className:"h-5 w-5 text-gray-500",children:t}),(0,m.jsx)("span",{className:"text-sm font-medium leading-tight",children:e}),(0,m.jsxs)("div",{className:"flex items-center gap-1 w-full justify-center",children:[(0,m.jsx)("button",{type:"button",onClick:a,disabled:!u,"aria-label":`Reducir ${e}`,className:"flex h-5 w-5 items-center justify-center rounded text-xs font-bold text-blue-700 cursor-pointer hover:bg-blue-100 disabled:opacity-30 focus-visible:outline-none",children:"\u2212"}),(0,m.jsx)("span",{className:"w-4 text-center text-sm font-semibold tabular-nums",children:l}),(0,m.jsx)("button",{type:"button",onClick:n,disabled:!i,"aria-label":`Aumentar ${e}`,className:"flex h-5 w-5 items-center justify-center rounded text-xs font-bold text-blue-700 cursor-pointer hover:bg-blue-100 disabled:opacity-30 focus-visible:outline-none",children:"+"})]})]})}function yv(){return(0,m.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[(0,m.jsx)("path",{d:"M4 6h16M4 12h8M4 18h12",strokeLinecap:"round"}),(0,m.jsx)("path",{d:"M15 14l5 5M20 14l-5 5",strokeLinecap:"round",strokeLinejoin:"round"})]})}function vv(){return(0,m.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[(0,m.jsx)("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",strokeLinecap:"round",strokeLinejoin:"round"}),(0,m.jsx)("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",strokeLinecap:"round",strokeLinejoin:"round"})]})}function hv(){return(0,m.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:(0,m.jsx)("path",{d:"M4 7l4 10 4-10M20 7v10M17 7h6",strokeLinecap:"round",strokeLinejoin:"round"})})}function Sv(){return(0,m.jsx)("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-a11y-icon":!0,children:(0,m.jsx)("path",{d:"m20.003 16.975-2.027 2.028m.113-3.943 1.914 1.915m-16.006 0 2.027-2.029m-.113 3.944-1.914-1.915m0 0h16.006m-2-5.975L15.16 4.997 12.317 11m.568-1.2h4.547M4.997 4.997 7.84 11l2.843-6.003",stroke:"#000",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})}function pv(){return(0,m.jsxs)("svg",{width:25,height:24,viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-a11y-icon":!0,children:[(0,m.jsx)("path",{d:"M12.754 4a.75.75 0 0 1 .75-.75H20.5a.75.75 0 0 1 0 1.5h-6.996a.75.75 0 0 1-.75-.75m7.746 9.917h-6.996a.75.75 0 0 0 0 1.5H20.5a.75.75 0 0 0 0-1.5m-6.996 5.333a.75.75 0 0 0 0 1.5H20.5a.75.75 0 0 0 0-1.5zm6.996-9.167h-6.996a.75.75 0 0 1 0-1.5H20.5a.75.75 0 0 1 0 1.5",opacity:.4,fill:"#323544"}),(0,m.jsx)("path",{d:"m9.974 16.47-1.722 1.72V5.81l1.722 1.72a.75.75 0 0 0 1.06-1.06l-3.002-3a.75.75 0 0 0-1.06 0l-3.002 3a.75.75 0 0 0 1.06 1.06l1.722-1.72v12.38L5.03 16.47a.75.75 0 0 0-1.06 1.06l3.002 3a.75.75 0 0 0 1.06 0l3.002-3a.75.75 0 0 0-1.06-1.06",fill:"#323544"})]})}function bv(){return(0,m.jsxs)("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:"h-full w-full","data-a11y-icon":!0,children:[(0,m.jsx)("path",{d:"M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"}),(0,m.jsx)("path",{d:"M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"})]})}function Av(){return(0,m.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[(0,m.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,m.jsx)("path",{d:"M12 3v18"}),(0,m.jsx)("path",{d:"M12 3a9 9 0 0 1 0 18V3z",fill:"currentColor",stroke:"none"})]})}function Ev(){return(0,m.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[(0,m.jsx)("circle",{cx:"12",cy:"12",r:"8"}),(0,m.jsx)("path",{d:"M12 4v16M8 8l8 8M4 12h16",strokeLinecap:"round",strokeOpacity:.4}),(0,m.jsx)("circle",{cx:"12",cy:"12",r:"4",fill:"currentColor"})]})}function Cv(){return(0,m.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[(0,m.jsx)("circle",{cx:"12",cy:"12",r:"8"}),(0,m.jsx)("circle",{cx:"12",cy:"12",r:"3",strokeDasharray:"2 2"})]})}function Mv(){return(0,m.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[(0,m.jsx)("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),(0,m.jsx)("path",{d:"M3 12h18M12 5v14"}),(0,m.jsx)("path",{d:"M3 5h9v14H3z",fill:"currentColor",fillOpacity:.15,stroke:"none"})]})}function Tv(){return(0,m.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[(0,m.jsx)("path",{d:"M4 6h16M4 10h16M4 14h10",strokeLinecap:"round"}),(0,m.jsx)("path",{d:"M3 18h18",strokeWidth:3,strokeLinecap:"round"})]})}function zv(){return(0,m.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[(0,m.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,m.jsx)("rect",{x:"9",y:"9",width:"2",height:"6",fill:"currentColor",stroke:"none"}),(0,m.jsx)("rect",{x:"13",y:"9",width:"2",height:"6",fill:"currentColor",stroke:"none"})]})}function xv(){return(0,m.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:"h-full w-full","data-a11y-icon":!0,children:(0,m.jsx)("path",{d:"M5 3l14 9-7.5 1.5L9 20l-4-17z"})})}function _v(){return(0,m.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[(0,m.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),(0,m.jsx)("circle",{cx:"8.5",cy:"8.5",r:"1.5",fill:"currentColor",stroke:"none"}),(0,m.jsx)("path",{d:"M21 15l-5-5L5 21",strokeLinecap:"round",strokeLinejoin:"round"}),(0,m.jsx)("path",{d:"M2 2l20 20",strokeLinecap:"round",strokeWidth:2.5})]})}function Ov({mode:t}){return t==="center"?(0,m.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:(0,m.jsx)("path",{d:"M6 6h12M8 10h8M6 14h12M8 18h8",strokeLinecap:"round"})}):t==="right"?(0,m.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:(0,m.jsx)("path",{d:"M4 6h16M8 10h12M4 14h16M8 18h12",strokeLinecap:"round"})}):(0,m.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:(0,m.jsx)("path",{d:"M4 6h16M4 10h12M4 14h16M4 18h12",strokeLinecap:"round"})})}function Lv(){return(0,m.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[(0,m.jsx)("path",{d:"M11 5L6 9H2v6h4l5 4V5z",fill:"currentColor",stroke:"none"}),(0,m.jsx)("path",{d:"M15.54 8.46a5 5 0 0 1 0 7.07",strokeLinecap:"round"}),(0,m.jsx)("path",{d:"M19.07 4.93a10 10 0 0 1 0 14.14",strokeLinecap:"round"})]})}function Nv(){return(0,m.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[(0,m.jsx)("path",{d:"M4 6h16M4 10h12M8 14h12M8 18h8",strokeLinecap:"round"}),(0,m.jsx)("circle",{cx:"4",cy:"14",r:"1",fill:"currentColor",stroke:"none"}),(0,m.jsx)("circle",{cx:"4",cy:"18",r:"1",fill:"currentColor",stroke:"none"})]})}function Dv({mode:t}){return(0,m.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[(0,m.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,m.jsx)("path",{d:"M12 3c-3 4-3 10 0 18",strokeLinecap:"round"}),(0,m.jsx)("path",{d:"M12 3c3 4 3 10 0 18",strokeLinecap:"round"}),t==="achromatopsia"?(0,m.jsx)("path",{d:"M3 12h18"}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("path",{d:"M4 8h16",strokeOpacity:.4}),(0,m.jsx)("path",{d:"M4 16h16",strokeOpacity:.4})]})]})}function Hv({profile:t}){switch(t){case"visionImpaired":return(0,m.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[(0,m.jsx)("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),(0,m.jsx)("circle",{cx:"12",cy:"12",r:"3",fill:"currentColor"})]});case"cognitive":return(0,m.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[(0,m.jsx)("path",{d:"M12 2a7 7 0 0 1 7 7c0 3-2 5-3 7h-8c-1-2-3-4-3-7a7 7 0 0 1 7-7z"}),(0,m.jsx)("path",{d:"M9 16v2a3 3 0 0 0 6 0v-2"})]});case"motorImpaired":return(0,m.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[(0,m.jsx)("circle",{cx:"12",cy:"4",r:"2",fill:"currentColor"}),(0,m.jsx)("path",{d:"M12 6v6l4 4M12 12l-4 4",strokeLinecap:"round",strokeLinejoin:"round"}),(0,m.jsx)("circle",{cx:"8",cy:"20",r:"2"}),(0,m.jsx)("circle",{cx:"16",cy:"20",r:"2"})]});case"seniorFriendly":return(0,m.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[(0,m.jsx)("circle",{cx:"12",cy:"4",r:"2",fill:"currentColor"}),(0,m.jsx)("path",{d:"M12 6v8M12 14l-3 6M12 14l3 6M12 10h-2l-3 4M12 10h2",strokeLinecap:"round",strokeLinejoin:"round"})]});default:return null}}var ie=_(pt(),1);function Ko({position:t="bottom-left",className:e}={}){let[l,n]=(0,Fu.useState)(!0),{hasActiveFeatures:a}=Ju();(0,Fu.useEffect)(()=>{if(!l)return;let c=f=>{f.key==="Escape"&&n(!1)};return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[l]);let i=l||a?"var(--apea-color-fab-active, #FFD54F)":"var(--apea-color-fab-inactive, #F6F6F6)";return(0,ie.jsxs)(ie.Fragment,{children:[(0,ie.jsx)("div",{className:ge("fixed z-50 apea-fab",t==="bottom-right"?"bottom-8 right-5":"bottom-8 left-5",e),style:{filter:a?"drop-shadow(0 4px 12px rgba(255, 213, 79, 0.3))":"none"},onClick:()=>n(c=>!c),children:(0,ie.jsx)(Go,{size:"lg","aria-expanded":l,"aria-haspopup":"dialog","aria-label":`Accesibilidad - ${a?"Funciones activas":"Sin funciones activas"}`,leftIcon:(0,ie.jsx)($d,{className:"w-full z-50",color:i,stroke:i})})}),(0,ie.jsx)("div",{className:"fixed inset-0 z-40 apea-backdrop",style:{backgroundColor:"var(--apea-color-backdrop, rgba(0, 0, 0, 0.2))"},"data-visible":l?"true":"false",onClick:()=>n(!1),"aria-hidden":"true"}),(0,ie.jsx)("div",{role:"none",className:"fixed inset-y-0 right-0 z-50 w-full max-w-sm shadow-2xl apea-panel","data-open":l?"true":"false",children:(0,ie.jsx)(w2,{onClose:()=>n(!1)})})]})}var ko=_(pt(),1),Uv={primary500:"#005dca",primary600:"#004faf",primary700:"#003b8a",panelBackground:"#f9fafb",fabActive:"#ffd54f",fabInactive:"#f6f6f6",backdrop:"rgba(0, 0, 0, 0.2)"};function Jo(t){return{...Uv,...t}}function Rv(t,e){return{...t,...e,theme:{...t.theme??{},...e.theme??{}}}}function V2(t,e){t.style.setProperty("--apea-color-primary-500",e.primary500),t.style.setProperty("--apea-color-primary-600",e.primary600),t.style.setProperty("--apea-color-primary-700",e.primary700),t.style.setProperty("--apea-color-panel-bg",e.panelBackground),t.style.setProperty("--apea-color-fab-active",e.fabActive),t.style.setProperty("--apea-color-fab-inactive",e.fabInactive),t.style.setProperty("--apea-color-backdrop",e.backdrop)}function J2(t={}){let e={position:t.position||"bottom-left",zIndex:t.zIndex||9999,containerId:t.containerId||"ape-accessibility-root",theme:Jo(t.theme)},l=Jo(e.theme),n=e.containerId||"ape-accessibility-root";if(document.getElementById(n))return console.warn("[ape-accessibility] Widget already mounted. Call destroy() first."),{destroy:()=>{},updateConfig:()=>{},config:t};let a=document.createElement("style");a.id="ape-accessibility-tools-css",a.textContent=`/* ============================================= */
17
+ /* Accessibility Feature Styles */
18
+ /* ============================================= */
19
+
20
+ /* High Contrast Mode */
21
+ .high-contrast {
22
+ --color-background: #000000;
23
+ --color-foreground: #ffffff;
24
+ }
25
+
26
+ .high-contrast * {
27
+ border-color: currentColor !important;
28
+ }
29
+
30
+ .high-contrast button,
31
+ .high-contrast input,
32
+ .high-contrast select,
33
+ .high-contrast textarea {
34
+ background-color: #000000 !important;
35
+ color: #ffffff !important;
36
+ border: 2px solid #ffffff !important;
37
+ }
38
+
39
+ .high-contrast a {
40
+ color: #ffff00 !important;
41
+ text-decoration: underline !important;
42
+ }
43
+
44
+ /* Text Size Scaling */
45
+ :root {
46
+ --accessibility-text-scale: 1;
47
+ --accessibility-letter-spacing: 0;
48
+ --accessibility-line-height: 0;
49
+ }
50
+
51
+ .accessibility-text-scaled * {
52
+ font-size: calc(1em * var(--accessibility-text-scale)) !important;
53
+ line-height: calc(1.4 * var(--accessibility-text-scale)) !important;
54
+ }
55
+
56
+ /* Colorblind Modes */
57
+ :root[data-colorblind-mode='protanopia'],
58
+ :root[data-colorblind-mode='deuteranopia'] {
59
+ --color-blue-500: #0072b2;
60
+ --color-green-500: #009e73;
61
+ --color-yellow-500: #e69f00;
62
+ --color-red-500: #d55e00;
63
+ }
64
+
65
+ :root[data-colorblind-mode='tritanopia'] {
66
+ --color-blue-500: #9b2335;
67
+ --color-yellow-500: #cc79a7;
68
+ --color-green-500: #009e73;
69
+ }
70
+
71
+ :root[data-colorblind-mode='achromatopsia'] {
72
+ filter: grayscale(1);
73
+ }
74
+
75
+ /* Saturation Modes */
76
+ .accessibility-saturation-high {
77
+ filter: saturate(2);
78
+ }
79
+
80
+ .accessibility-saturation-low {
81
+ filter: saturate(0.3);
82
+ }
83
+
84
+ .accessibility-saturation-mono {
85
+ filter: grayscale(1) contrast(1.2);
86
+ }
87
+
88
+ /* Dyslexia Font */
89
+ @font-face {
90
+ font-family: OpenDyslexic3;
91
+ src: url('https://website-widgets.pages.dev/fonts/OpenDyslexic3-Regular.woff') format('woff');
92
+ font-display: swap;
93
+ }
94
+
95
+ .accessibility-dyslexia,
96
+ .accessibility-dyslexia * {
97
+ font-family: OpenDyslexic3, 'Comic Sans MS', Arial, sans-serif !important;
98
+ }
99
+
100
+ /* Letter Spacing & Line Height */
101
+ .accessibility-letter-spacing * {
102
+ letter-spacing: calc(0.1em * var(--accessibility-letter-spacing)) !important;
103
+ }
104
+
105
+ .accessibility-line-height * {
106
+ line-height: calc(1.4 + 0.3 * var(--accessibility-line-height)) !important;
107
+ }
108
+
109
+ .accessibility-font-weight * {
110
+ font-weight: 700 !important;
111
+ }
112
+
113
+ /* Highlight Titles & Links */
114
+ :root[data-highlight='titles'] h1,
115
+ :root[data-highlight='titles'] h2,
116
+ :root[data-highlight='titles'] h3,
117
+ :root[data-highlight='titles'] h4,
118
+ :root[data-highlight='titles'] h5,
119
+ :root[data-highlight='titles'] h6,
120
+ :root[data-highlight='both'] h1,
121
+ :root[data-highlight='both'] h2,
122
+ :root[data-highlight='both'] h3,
123
+ :root[data-highlight='both'] h4,
124
+ :root[data-highlight='both'] h5,
125
+ :root[data-highlight='both'] h6 {
126
+ background-color: rgba(254, 201, 5, 0.2) !important;
127
+ border-radius: 2px;
128
+ padding: 0 2px;
129
+ }
130
+
131
+ :root[data-highlight='links'] a,
132
+ :root[data-highlight='both'] a {
133
+ background-color: rgba(0, 93, 202, 0.12) !important;
134
+ text-decoration: underline !important;
135
+ }
136
+
137
+ /* Stop Animations */
138
+ .accessibility-stop-animations *,
139
+ .accessibility-stop-animations *::before,
140
+ .accessibility-stop-animations *::after {
141
+ animation: none !important;
142
+ transition: none !important;
143
+ }
144
+
145
+ /* Big Cursor */
146
+ .accessibility-big-cursor,
147
+ .accessibility-big-cursor * {
148
+ cursor:
149
+ url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M6 2L6 26L12 20L16 30L19 29L15 19L24 19Z' fill='%23000' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E")
150
+ 6 2,
151
+ auto !important;
152
+ }
153
+
154
+ /* Hide Images */
155
+ .accessibility-hide-images img,
156
+ .accessibility-hide-images svg:not([data-a11y-icon]),
157
+ .accessibility-hide-images video,
158
+ .accessibility-hide-images picture {
159
+ visibility: hidden !important;
160
+ }
161
+
162
+ /* Text Alignment */
163
+ :root[data-text-align='left'] * {
164
+ text-align: left !important;
165
+ }
166
+
167
+ :root[data-text-align='center'] * {
168
+ text-align: center !important;
169
+ }
170
+
171
+ :root[data-text-align='right'] * {
172
+ text-align: right !important;
173
+ }
174
174
  `,document.head.appendChild(a);let i=document.createElement("div");i.id=n,i.setAttribute("data-a11y-icon",""),i.style.position="fixed",i.style.zIndex=String(e.zIndex||9999),i.style.top="0",i.style.left="0",i.style.width="0",i.style.height="0",i.style.overflow="visible",V2(i,l),document.body.appendChild(i);let u=i.attachShadow({mode:"open"}),c=document.createElement("style");c.textContent=`/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */
175
175
  @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-yellow-50:oklch(98.7% .026 102.212);--color-yellow-500:#fec905;--color-green-50:oklch(98.2% .018 155.826);--color-green-500:#0a0;--color-blue-50:#eef5ff;--color-blue-100:#cfe5ff;--color-blue-300:oklch(80.9% .105 251.813);--color-blue-400:#7cb8ff;--color-blue-500:#005dca;--color-blue-600:#004faf;--color-blue-700:#003b8a;--color-blue-900:#002e64;--color-gray-200:oklch(92.8% .006 264.531);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-700:oklch(37.3% .034 259.733);--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-wide:.025em;--tracking-wider:.05em;--leading-tight:1.25;--radius-lg:.5rem;--radius-xl:.75rem;--radius-3xl:1.5rem;--ease-in-out:cubic-bezier(.4, 0, .2, 1);--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.invisible{visibility:hidden}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:calc(var(--spacing) * 0)}.inset-y-0{inset-block:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.right-0{right:calc(var(--spacing) * 0)}.right-5{right:calc(var(--spacing) * 5)}.bottom-8{bottom:calc(var(--spacing) * 8)}.left-5{left:calc(var(--spacing) * 5)}.z-40{z-index:40}.z-50{z-index:50}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.-mx-2{margin-inline:calc(var(--spacing) * -2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.ml-2{margin-left:calc(var(--spacing) * 2)}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-\\[40px\\]{height:40px}.h-\\[60px\\]{height:60px}.h-full{height:100%}.max-h-60{max-height:calc(var(--spacing) * 60)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-\\[40px\\]{width:40px}.w-\\[60px\\]{width:60px}.w-full{width:100%}.max-w-sm{max-width:var(--container-sm)}.flex-1{flex:1}.shrink-0{flex-shrink:0}.rotate-180{rotate:180deg}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-rows-\\[0fr\\]{grid-template-rows:0fr}.grid-rows-\\[1fr\\]{grid-template-rows:1fr}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse)))}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-3xl{border-radius:var(--radius-3xl)}.rounded-\\[30px\\]{border-radius:30px}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-gray-200{border-color:var(--color-gray-200)}.border-white\\/30{border-color:#ffffff4d}@supports (color:color-mix(in lab, red, red)){.border-white\\/30{border-color:color-mix(in oklab, var(--color-white) 30%, transparent)}}.border-yellow-500{border-color:var(--color-yellow-500)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-green-50{background-color:var(--color-green-50)}.bg-white{background-color:var(--color-white)}.bg-yellow-50{background-color:var(--color-yellow-50)}.p-0{padding:calc(var(--spacing) * 0)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.px-1\\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pb-5{padding-bottom:calc(var(--spacing) * 5)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.whitespace-nowrap{white-space:nowrap}.text-blue-600{color:var(--color-blue-600)}.text-blue-700{color:var(--color-blue-700)}.text-blue-900{color:var(--color-blue-900)}.text-gray-500{color:var(--color-gray-500)}.text-gray-700{color:var(--color-gray-700)}.text-white{color:var(--color-white)}.uppercase{text-transform:uppercase}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.opacity-0{opacity:0}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-100{opacity:1}.shadow-md\\/20{--tw-shadow-alpha:20%;--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,oklab(0% 0 0/.2)), 0 2px 4px -2px var(--tw-shadow-color,oklab(0% 0 0/.2));box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-green-500{--tw-ring-color:var(--color-green-500)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[grid-template-rows\\]{transition-property:grid-template-rows;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}@media (hover:hover){.hover\\:border-blue-400:hover{border-color:var(--color-blue-400)}.hover\\:bg-blue-50:hover{background-color:var(--color-blue-50)}.hover\\:bg-blue-100:hover{background-color:var(--color-blue-100)}.hover\\:bg-green-500:hover{background-color:var(--color-green-500)}.hover\\:bg-white\\/20:hover{background-color:#fff3}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-white\\/20:hover{background-color:color-mix(in oklab, var(--color-white) 20%, transparent)}}.hover\\:bg-none:hover{background-image:none}.hover\\:font-semibold:hover{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.hover\\:ring-2:hover{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.hover\\:ring-blue-300:hover{--tw-ring-color:var(--color-blue-300)}.hover\\:ring-yellow-500:hover{--tw-ring-color:var(--color-yellow-500)}}.focus\\:bg-blue-50:focus{background-color:var(--color-blue-50)}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\\:ring-blue-500:focus-visible{--tw-ring-color:var(--color-blue-500)}.focus-visible\\:ring-white:focus-visible{--tw-ring-color:var(--color-white)}.focus-visible\\:ring-offset-1:focus-visible{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\\:scale-90:active{--tw-scale-x:90%;--tw-scale-y:90%;--tw-scale-z:90%;scale:var(--tw-scale-x) var(--tw-scale-y)}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-30:disabled{opacity:.3}.disabled\\:opacity-40:disabled{opacity:.4}}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}
176
- /* Widget animation styles */\r
177
- \r
178
- /* FAB button */\r
179
- .apea-fab {\r
180
- transition: transform 0.15s ease, filter 0.2s ease;\r
181
- }\r
182
- .apea-fab:hover {\r
183
- transform: scale(1.05);\r
184
- }\r
185
- .apea-fab:active {\r
186
- transform: scale(0.95);\r
187
- }\r
188
- \r
189
- /* Backdrop */\r
190
- .apea-backdrop {\r
191
- opacity: 0;\r
192
- transition: opacity 0.25s ease;\r
193
- pointer-events: none;\r
194
- }\r
195
- .apea-backdrop[data-visible='true'] {\r
196
- opacity: 1;\r
197
- pointer-events: auto;\r
198
- }\r
199
- \r
200
- /* Slide-in panel */\r
201
- .apea-panel {\r
202
- transform: translateX(100%);\r
203
- transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);\r
204
- }\r
205
- .apea-panel[data-open='true'] {\r
206
- transform: translateX(0);\r
207
- }\r
208
- \r
209
- /* Blue gradient for FAB button */\r
210
- .apea-gradient {\r
211
- background-image: linear-gradient(\r
212
- 135deg,\r
213
- var(--apea-color-primary-500, var(--color-blue-500)) 0%,\r
214
- var(--apea-color-primary-600, var(--color-blue-600)) 50%,\r
215
- var(--apea-color-primary-700, var(--color-blue-700)) 80%\r
216
- );\r
217
- }\r
176
+ /* Widget animation styles */
177
+
178
+ /* FAB button */
179
+ .apea-fab {
180
+ transition: transform 0.15s ease, filter 0.2s ease;
181
+ }
182
+ .apea-fab:hover {
183
+ transform: scale(1.05);
184
+ }
185
+ .apea-fab:active {
186
+ transform: scale(0.95);
187
+ }
188
+
189
+ /* Backdrop */
190
+ .apea-backdrop {
191
+ opacity: 0;
192
+ transition: opacity 0.25s ease;
193
+ pointer-events: none;
194
+ }
195
+ .apea-backdrop[data-visible='true'] {
196
+ opacity: 1;
197
+ pointer-events: auto;
198
+ }
199
+
200
+ /* Slide-in panel */
201
+ .apea-panel {
202
+ transform: translateX(100%);
203
+ transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
204
+ }
205
+ .apea-panel[data-open='true'] {
206
+ transform: translateX(0);
207
+ }
208
+
209
+ /* Blue gradient for FAB button */
210
+ .apea-gradient {
211
+ background-image: linear-gradient(
212
+ 135deg,
213
+ var(--apea-color-primary-500, var(--color-blue-500)) 0%,
214
+ var(--apea-color-primary-600, var(--color-blue-600)) 50%,
215
+ var(--apea-color-primary-700, var(--color-blue-700)) 80%
216
+ );
217
+ }
218
218
  `,u.appendChild(c);let f=document.createElement("div");u.appendChild(f);let r=(0,K2.createRoot)(f);return r.render((0,ko.jsx)(Ko,{position:e.position})),{updateConfig(y){e=Rv(e,y),l=Jo(e.theme),i.style.zIndex=String(e.zIndex||9999),V2(i,l),r&&r.render((0,ko.jsx)(Ko,{position:e.position}))},destroy(){r&&(r.unmount(),r=null),i.remove(),a.remove()},get config(){return e}}}var Xe=null,Al={};function k2(t,e){return{...t,...e,theme:{...t.theme??{},...e.theme??{}}}}function Wo(t={}){return Xe?(console.warn("[ape-accessibility] Already initialized. Call destroy() first."),Xe):(Al=k2(Al,t),Xe=J2(Al),Xe)}function Fo(){Xe&&(Xe.destroy(),Xe=null)}function $o(){return O()}function Io(t={}){return Al=k2(Al,t),Xe&&Xe.updateConfig(Al),$u()}function $u(){return{...Al,theme:{...Al.theme??{}}}}function Po(){Vn(),typeof window<"u"&&window.dispatchEvent(new CustomEvent("accessibilityReset",{detail:{timestamp:Date.now()}}))}var ei={init:Wo,destroy:Fo,getSettings:$o,resetAllSettings:Po,configure:Io,getConfig:$u};var Fn=_(k(),1);function W2({config:t={}}){let e=(0,Fn.useRef)(null),l=(0,Fn.useRef)(!1);return(0,Fn.useEffect)(()=>(l.current=!1,e.current=ei.init(t),()=>{l.current=!0,e.current?.destroy(),e.current=null}),[]),(0,Fn.useEffect)(()=>{l.current||ei.configure(t)},[t]),null}return nm(Bv);})();
219
219
  /*! Bundled license information:
220
220