PageSourceSearch

https://marisul-mobilidade.san286.chatgpt.site/_next/static/chunks/AccessibilityTools-CYwMQIQE.js

js marisul-mobilidade.san286.chatgpt.site collected 2026-10-03 03:59:47 UTC 2,063 bytes, 1 lines download raw bytes

1import{r as e}from"./rolldown-runtime-C60lm6uB.js";import{i as t,r as n}from"./framework-BgSIrAUN.js";var r=e(n(),1),i=t(),a=`marisul-accessibility`,o={largeText:!1,highContrast:!1,reducedMotion:!1};function s(){let[e,t]=(0,r.useState)(o);(0,r.useEffect)(()=>{let e={};try{e=JSON.parse(window.localStorage.getItem(a)??`{}`)}catch{e={}}let n={...o,...e,reducedMotion:e.reducedMotion??window.matchMedia(`(prefers-reduced-motion: reduce)`).matches};c(n);let r=window.requestAnimationFrame(()=>t(n));return()=>window.cancelAnimationFrame(r)},[]);function n(n){let r={...e,[n]:!e[n]};t(r),c(r),window.localStorage.setItem(a,JSON.stringify(r))}function s(){t(o),c(o),window.localStorage.removeItem(a)}return(0,i.jsxs)(`section`,{className:`accessibility-tools`,"aria-labelledby":`accessibility-title`,children:[(0,i.jsxs)(`div`,{children:[(0,i.jsx)(`p`,{children:`Acessibilidade`}),(0,i.jsx)(`h2`,{id:`accessibility-title`,children:`Ajuste o site para navegar melhor.`}),(0,i.jsx)(`span`,{children:`Suas preferências ficam salvas somente neste dispositivo.`})]}),(0,i.jsxs)(`div`,{className:`accessibility-actions`,role:`group`,"aria-label":`Preferências de acessibilidade`,children:[(0,i.jsxs)(`button`,{type:`button`,"aria-pressed":e.largeText,onClick:()=>n(`largeText`),children:[(0,i.jsx)(`b`,{"aria-hidden":`true`,children:`A+`}),`Texto maior`]}),(0,i.jsxs)(`button`,{type:`button`,"aria-pressed":e.highContrast,onClick:()=>n(`highContrast`),children:[(0,i.jsx)(`b`,{"aria-hidden":`true`,children:`◐`}),`Alto contraste`]}),(0,i.jsxs)(`button`,{type:`button`,"aria-pressed":e.reducedMotion,onClick:()=>n(`reducedMotion`),children:[(0,i.jsx)(`b`,{"aria-hidden":`true`,children:`—`}),`Reduzir movimento`]}),(0,i.jsx)(`button`,{type:`button`,className:`accessibility-reset`,onClick:s,children:`Restaurar padrão`})]})]})}function c(e){let t=document.documentElement;t.classList.toggle(`a11y-large-text`,e.largeText),t.classList.toggle(`a11y-high-contrast`,e.highContrast),t.classList.toggle(`a11y-reduced-motion`,e.reducedMotion)}export{s as AccessibilityTools};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.