PageSourceSearch

https://www.g-atai.com/assets/dist/assets/js-accessibility-CbHkt0aF.js

js g-atai.com collected 2026-10-08 06:02:22 UTC 14,925 bytes, 170 lines download raw bytes

1window.addEventListener(`DOMContentLoaded`,()=>{let e=`a11y-settings-v1`,t=document.documentElement,n=document.getElementById(`a11yPanel`),r=document.getElementById(`a11yBackdrop`),i=document.querySelectorAll(`[data-a11y-toggle]`);if(!n||!r||!i.length)return;(function(){if(!document.head||document.head.querySelector(`style[data-a11y-style]`))return;let e=document.createElement(`style`);e.setAttribute(`data-a11y-style`,`true`),e.textContent=`
2      /* Reading guide overlay */
3      #a11yReadingGuide {
4        position: fixed;
5        inset: 0;
6        pointer-events: none;
7        z-index: 9998;
8        display: none;
9      }
10      #a11yReadingGuide.is-on { display: block; }
11      #a11yReadingGuide .a11y-guide-vertical {
12        position: absolute;
13        top: 0;
14        bottom: 0;
15        width: 2px;
16        background: rgba(255, 255, 0, 0.7);
17      }
18      #a11yReadingGuide .a11y-guide-horizontal {
19        position: absolute;
20        left: 0;
21        right: 0;
22        height: 40px;
23        background: rgba(255, 255, 0, 0.15);
24      }
25
26      /* Bigger text & spacing */
27      html.a11y-text-large { font-size: 112.5%; }
28      html.a11y-text-spacing body {
29        line-height: 1.7;
30        letter-spacing: 0.03em;
31        word-spacing: 0.05em;
32      }
33
34      /* Highlight links */
35      html.a11y-highlight-links a {
36        text-decoration: underline !important;
37        outline: 2px dashed #ffeb3b;
38        outline-offset: 2px;
39      }
40
41      /* Hide / fade images */
42      html.a11y-hide-images img,
43      html.a11y-hide-images picture,
44      html.a11y-hide-images video {
45        filter: grayscale(1) opacity(.12) !important;
46      }
47
48      /* Reduce motion */
49      html.a11y-reduced-motion * {
50        animation-duration: 0.001s !important;
51        animation-iteration-count: 1 !important;
52        transition-duration: 0.001s !important;
53        scroll-behavior: auto !important;
54      }
55
56      /* Smart contrast (very simple, override with your own tokens) */
57      html.a11y-smart-contrast body {
58        background-color: #ffffff;
59        color: #111111;
60      }
61
62      /* Invert colors */
63      html.a11y-invert {
64        filter: invert(1) hue-rotate(180deg);
65      }
66
67      /* Contrast theme (multi-state) */
68      html.a11y-theme-light body {
69        background: #ffffff;
70        color: #111111;
71      }
72      html.a11y-theme-dark body {
73        background: #050505;
74        color: #f5f5f5;
75      }
76      html.a11y-theme-invert body {
77        filter: invert(1) hue-rotate(180deg);
78      }
79
80      /* Page structure outlines */
81      html.a11y-page-structure h1,
82      html.a11y-page-structure h2,
83      html.a11y-page-structure h3,
84      html.a11y-page-structure h4,
85      html.a11y-page-structure h5,
86      html.a11y-page-structure h6 {
87        outline: 2px solid rgba(33,150,243,0.8);
88        outline-offset: 2px;
89      }
90      html.a11y-page-structure main,
91      html.a11y-page-structure nav,
92      html.a11y-page-structure aside,
93      html.a11y-page-structure footer {
94        outline: 2px dashed rgba(255,152,0,0.8);
95        outline-offset: 1px;
96      }
97
98      /* Line-height multi-state */
99      html.a11y-line-1_5 body { line-height: 1.5; }
100      html.a11y-line-2   body { line-height: 2;   }
101
102      /* Text align multi-state */
103      html.a11y-align-left body    { text-align: left; }
104      html.a11y-align-justify body { text-align: justify; }
105
106      /* Saturation multi-state (images + video) */
107      html.a11y-sat-low img,
108      html.a11y-sat-low video {
109        filter: saturate(0.35) !important;
110      }
111      html.a11y-sat-high img,
112      html.a11y-sat-high video {
113        filter: saturate(1.4) !important;
114      }
115
116      /* Big cursor overlay */
117      #a11yBigCursor {
118        position: fixed;
119        width: 32px;
120        height: 32px;
121        border-radius: 50%;
122        border: 2px solid rgba(0,188,212,0.9);
123        pointer-events: none;
124        transform: translate(-9999px, -9999px);
125        z-index: 9999;
126        box-shadow: 0 0 0 2px rgba(0,0,0,0.2);
127      }
128      html.a11y-big-cursor body,
129      html.a11y-big-cursor * {
130        cursor: none !important;
131      }
132
133      /* Tooltips */
134      #a11yTooltip {
135        position: fixed;
136        max-width: 260px;
137        padding: 6px 10px;
138        font-size: 12px;
139        line-height: 1.4;
140        border-radius: 4px;
141        background: rgba(0,0,0,0.9);
142        color: #fff;
143        z-index: 9999;
144        pointer-events: none;
145        transform: translate(-9999px, -9999px);
146      }
147      html.a11y-tooltips [data-a11y-has-tip] {
148        outline-offset: 2px;
149      }
150
151      /* Tile state dots */
152      .a11y-state-bars span {
153        display: inline-block;
154        width: 8px;
155        height: 8px;
156        border-radius: 999px;
157        background: rgba(255,255,255,0.3);
158        margin-left: 2px;
159      }
160      .a11y-state-bars span.is-active {
161        background: #ffffff;
162      }
163
164      /* Selection highlight for screen-reader/dictionary users */
165      html.a11y-screen-reader ::selection,
166      html.a11y-dictionary ::selection {
167        background: #fff59d;
168        color: #000;
169      }
170    `,document.head.appendChild(e)})(),n.parentElement!==document.body&&document.body.appendChild(n),r.parentElement!==document.body&&document.body.appendChild(r),n.setAttribute(`tabindex`,`-1`);let a=n.querySelector(`[data-a11y-close]`),o=n.querySelector(`[data-a11y-reset]`),s=Array.from(n.querySelectorAll(`[data-a11y-action]`)||[]),c=null,l=null,u=null,d=null,f=null,p=null,m=null,h=null,g=null,_=null,v={toggles:{},cycles:{}};function y(){if(!v.toggles[`screen-reader`])return;if(!(`speechSynthesis`in window)){alert(`Screen reader needs the SpeechSynthesis API (modern browser).`);return}let e=window.getSelection&&window.getSelection(),t=((e?e.toString():``)||``).trim();if(!t){alert(`Select some text on the page, then try again (or use Alt+Shift+S).`);return}window.speechSynthesis.cancel();let n=new SpeechSynthesisUtterance(t.slice(0,4e3));n.rate=1,window.speechSynthesis.speak(n)}let b={"bigger-text":{className:`a11y-text-large`},"highlight-links":{className:`a11y-highlight-links`},"big-cursor":{className:`a11y-big-cursor`,onEnable:w,onDisable:T},"text-spacing":{className:`a11y-text-spacing`},"pause-animations":{className:`a11y-reduced-motion`},"hide-images":{className:`a11y-hide-images`},"smart-contrast":{className:`a11y-smart-contrast`},"reading-guide":{className:`a11y-reading-guide-on`,onEnable:S,onDisable:C},"invert-colors":{className:`a11y-invert`},"screen-reader":{className:`a11y-screen-reader`,onDisable:()=>{`speechSynthesis`in window&&window.speechSynthesis.cancel()}},"voice-nav":{className:`a11y-voice-nav`,onEnable:N,onDisable:P},tooltips:{className:`a11y-tooltips`,onEnable:k,onDisable:A},"page-structure":{className:`a11y-page-structure`},dictionary:{className:`a11y-dictionary`,onEnable:j,onDisable:M}},x={"contrast-theme":{labelSelector:`.js-a11y-label-contrast`,states:[{id:`default`,label:`Default`},{id:`light`,label:`Light`},{id:`dark`,label:`Dark`},{id:`invert`,label:`Invert`}]},"line-height":{labelSelector:`.js-a11y-label-line`,states:[{id:`default`,label:`Default`},{id:`1_5`,label:`1.5×`},{id:`2`,label:`2×`}]},"text-align":{labelSelector:`.js-a11y-label-align`,states:[{id:`default`,label:`Default`},{id:`left`,label:`Left`},{id:`justify`,label:`Justified`}]},saturation:{labelSelector:`.js-a11y-label-sat`,states:[{id:`default`,label:`Normal`},{id:`low`,label:`Low`},{id:`high`,label:`High`}]}};function S(){l||(l=document.createElement(`div`),l.id=`a11yReadingGuide`,l.innerHTML=`<div class='a11y-guide-vertical'></div><div class='a11y-guide-horizontal'></div>`,document.body.appendChild(l)),l.classList.add(`is-on`),u||(u=e=>{let t=l.querySelector(`.a11y-guide-vertical`),n=l.querySelector(`.a11y-guide-horizontal`);t&&(t.style.left=e.clientX+`px`),n&&(n.style.top=e.clientY-20+`px`)},document.addEventListener(`mousemove`,u))}function C(){l&&l.classList.remove(`is-on`),u&&=(document.removeEventListener(`mousemove`,u),null)}function w(){d||(d=document.createElement(`div`),d.id=`a11yBigCursor`,document.body.appendChild(d)),f||(f=e=>{d.style.transform=`translate(`+(e.clientX-16)+`px,`+(e.clientY-16)+`px)`},document.addEventListener(`mousemove`,f))}function T(){f&&=(document.removeEventListener(`mousemove`,f),null),d&&(d.style.transform=`translate(-9999px,-9999px)`)}function E(){p||(p=document.createElement(`div`),p.id=`a11yTooltip`,document.body.appendChild(p))}function D(e){E();let t=e.getAttribute(`data-a11y-tip`)||e.getAttribute(`aria-label`)||e.getAttribute(`title`);
170if(!t)return;p.textContent=t;let n=e.getBoundingClientRect(),r=n.left+n.width/2,i=n.top-10;i<0&&(i=n.bottom+10);let a=window.innerWidth;r<60&&(r=60),r>a-60&&(r=a-60),p.style.transform=`translate(`+r+`px,`+i+`px) translate(-50%,-100%)`,e.setAttribute(`data-a11y-has-tip`,`true`)}function O(){p&&(p.style.transform=`translate(-9999px,-9999px)`)}function k(){E(),!m&&(m=e=>{if(!v.toggles.tooltips)return;let t=e.target.closest(`[data-a11y-tip],[aria-label],[title]`);if(!t){O();return}D(t)},h=()=>O(),document.addEventListener(`focusin`,m),document.addEventListener(`mouseover`,m),document.addEventListener(`focusout`,h),document.addEventListener(`mouseout`,h))}function A(){m&&=(document.removeEventListener(`focusin`,m),document.removeEventListener(`mouseover`,m),null),h&&=(document.removeEventListener(`focusout`,h),document.removeEventListener(`mouseout`,h),null),O()}function j(){g||(g=()=>{if(!v.toggles.dictionary)return;let e=(window.getSelection&&window.getSelection().toString()||``).trim().split(/\s+/)[0];if(!e)return;let t=`https://www.merriam-webster.com/dictionary/`+encodeURIComponent(e);window.open(t,`_blank`,`noopener`)},document.addEventListener(`dblclick`,g))}function M(){g&&=(document.removeEventListener(`dblclick`,g),null)}function N(){if(!(`SpeechRecognition`in window)&&!(`webkitSpeechRecognition`in window)){alert(`Voice navigation needs a browser with SpeechRecognition (Chrome Desktop).`),v.toggles[`voice-nav`]=!1;let e=s.find(e=>e.dataset.a11yAction===`voice-nav`);e&&e.setAttribute(`aria-pressed`,`false`),t.classList.remove(`a11y-voice-nav`),I();return}_=new(window.SpeechRecognition||window.webkitSpeechRecognition),_.lang=document.documentElement.lang||`en-US`,_.continuous=!0,_.interimResults=!1,_.onresult=e=>{let t=e.results[e.results.length-1];if(!t||!t.isFinal)return;let n=t[0].transcript.toLowerCase().trim();n&&(n.includes(`scroll down`)||n.endsWith(`down`)?window.scrollBy({top:window.innerHeight*.8,behavior:`smooth`}):n.includes(`scroll up`)||n.endsWith(`up`)?window.scrollBy({top:-window.innerHeight*.8,behavior:`smooth`}):n.includes(`top`)?window.scrollTo({top:0,behavior:`smooth`}):n.includes(`bottom`)&&window.scrollTo({top:document.body.scrollHeight,behavior:`smooth`}))},_.onend=()=>{if(v.toggles[`voice-nav`])try{_.start()}catch{}};try{_.start()}catch{}}function P(){if(_){try{_.onresult=null}catch{}try{_.onend=null}catch{}try{_.stop()}catch{}_=null}}function F(){try{let t=localStorage.getItem(e);if(!t)return;let n=JSON.parse(t);n&&typeof n==`object`&&(v.toggles=n.toggles||{},v.cycles=n.cycles||{})}catch{}}function I(){try{localStorage.setItem(e,JSON.stringify(v))}catch{}}function L(e,n,r){let i=b[e];if(i&&(i.className&&t.classList.toggle(i.className,n),v.toggles[e]=!!n,n&&i.onEnable&&i.onEnable(),!n&&i.onDisable&&i.onDisable(),r)){let t=s.find(t=>t.dataset.a11yAction===e);t&&t.setAttribute(`aria-pressed`,n?`true`:`false`)}}function R(e,t){let r=x[e];if(!r)return;let i=s.find(t=>t.dataset.a11yAction===e);if(!i)return;let a=r.states.find(e=>e.id===t)||r.states[0],o=r.labelSelector?n.querySelector(r.labelSelector):null;o&&a.label&&(o.textContent=a.label),i.querySelectorAll(`.a11y-state-bars span`).forEach(e=>{let n=e.dataset.state===t;e.classList.toggle(`is-active`,n)}),i.setAttribute(`aria-pressed`,t===r.states[0].id?`false`:`true`)}function z(e,n,r){x[e]&&(v.cycles[e]=n,e===`contrast-theme`&&(t.classList.remove(`a11y-theme-light`,`a11y-theme-dark`,`a11y-theme-invert`),n===`light`&&t.classList.add(`a11y-theme-light`),n===`dark`&&t.classList.add(`a11y-theme-dark`),n===`invert`&&t.classList.add(`a11y-theme-invert`)),e===`line-height`&&(t.classList.remove(`a11y-line-1_5`,`a11y-line-2`),n===`1_5`&&t.classList.add(`a11y-line-1_5`),n===`2`&&t.classList.add(`a11y-line-2`)),e===`text-align`&&(t.classList.remove(`a11y-align-left`,`a11y-align-justify`),n===`left`&&t.classList.add(`a11y-align-left`),n===`justify`&&t.classList.add(`a11y-align-justify`)),e===`saturation`&&(t.classList.remove(`a11y-sat-low`,`a11y-sat-high`),n===`low`&&t.classList.add(`a11y-sat-low`),n===`high`&&t.classList.add(`a11y-sat-high`)),r&&R(e,n))}
170function B(){Object.keys(b).forEach(e=>{L(e,!!v.toggles[e],!0)}),Object.keys(x).forEach(e=>{let t=x[e];z(e,v.cycles[e]||t.states[0]&&t.states[0].id,!0)})}function V(){Object.keys(b).forEach(e=>{L(e,!1,!0)}),Object.keys(x).forEach(e=>{let t=x[e].states[0].id;z(e,t,!0)}),v={toggles:{},cycles:{}},I()}function H(e){i.forEach(t=>{t.setAttribute(`aria-expanded`,e?`true`:`false`)})}function U(){n.hasAttribute(`hidden`)&&(c=document.activeElement,n.removeAttribute(`hidden`),r.removeAttribute(`hidden`),n.setAttribute(`data-open`,`true`),r.setAttribute(`data-open`,`true`),t.classList.add(`a11y-open`),document.body.classList.add(`a11y-open`),H(!0),(s[0]||a||n).focus())}function W(){n.hasAttribute(`hidden`)||(n.setAttribute(`data-open`,`false`),r.setAttribute(`data-open`,`false`),t.classList.remove(`a11y-open`),document.body.classList.remove(`a11y-open`),H(!1),setTimeout(()=>{n.setAttribute(`hidden`,``),r.setAttribute(`hidden`,``)},260),c&&typeof c.focus==`function`&&c.focus())}function G(e){if(e.key===`Escape`){e.preventDefault(),W();return}if(e.key===`Tab`&&!n.hasAttribute(`hidden`)){let t=n.querySelectorAll(`button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])`),r=Array.from(t).filter(e=>!e.hasAttribute(`disabled`));if(!r.length)return;let i=r[0],a=r[r.length-1];e.shiftKey&&document.activeElement===i?(e.preventDefault(),a.focus()):!e.shiftKey&&document.activeElement===a&&(e.preventDefault(),i.focus())}}function K(e){e.altKey&&e.shiftKey&&(e.key===`A`||e.key===`a`||e.code===`KeyA`)&&(e.preventDefault(),n.hasAttribute(`hidden`)?U():W()),v.toggles[`screen-reader`]&&e.altKey&&e.shiftKey&&(e.code===`KeyS`||e.key===`S`||e.key===`s`)&&(e.preventDefault(),y())}i.forEach(e=>{e.addEventListener(`click`,e=>{e.preventDefault(),n.hasAttribute(`hidden`)?U():W()})}),a&&a.addEventListener(`click`,W),r.addEventListener(`click`,W),s.forEach(e=>{e.addEventListener(`click`,()=>{let t=e.dataset.a11yAction;if((e.dataset.a11yType||`toggle`)===`cycle`&&x[t]){let e=x[t],n=v.cycles[t]||e.states[0].id,r=e.states.findIndex(e=>e.id===n),i=e.states[(r+1)%e.states.length];z(t,i.id,!0),I();return}let n=!v.toggles[t];L(t,n,!0),I(),t===`screen-reader`&&n&&y()})}),o&&o.addEventListener(`click`,V),document.addEventListener(`keydown`,G),document.addEventListener(`keydown`,K),F(),B()});

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.