From 6077514135979f53018e696e8e27e51b0b5305c3 Mon Sep 17 00:00:00 2001 From: Ran Buchnik Date: Fri, 29 Mar 2024 22:08:02 +0300 Subject: [PATCH] master - improve README --- README.md | 316 +++++++++++++++---- dist/interfaces/accessibility.interface.d.ts | 1 - dist/main.bundle.js | 2 +- dist/main.js | 3 +- src/interfaces/accessibility.interface.ts | 1 - src/main.ts | 3 +- 6 files changed, 256 insertions(+), 70 deletions(-) diff --git a/README.md b/README.md index d34049f..f7b1d9c 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ initialize component: new Accessibility(); }, false);` -### Full Documentation [here](https://ranbuch.github.io/accessibility/site/) +### Full Documentation and [demo](https://ranbuch.github.io/accessibility/site/) >We are proud to announce that [Joomla!](https://www.joomdev.com/blog/entry/enable-joomla-4-accessibility) are now using this repo as there built-in accessibility tool. @@ -46,86 +46,276 @@ Easy to use! ### MULTI LANGUAGE EXAMPLE: -`var labels = {` -    `resetTitle: 'reset (in my language)',` -    `closeTitle: 'close (in my language)',` -    `menuTitle: 'title (in my language)',` -    `increaseText: 'increase text size (in my language)',` -    `decreaseText: 'decrease text size (in my language)',` -    `increaseTextSpacing: 'increase text spacing (in my language)',` -    `decreaseTextSpacing: 'decrease text spacing (in my language)',` -    `increaseLineHeight: 'increase line height (in my language)',` -    `decreaseLineHeight: 'decrease line height (in my language)',` -    `invertColors: 'invert colors (in my language)',` -    `grayHues: 'gray hues (in my language)',` -    `underlineLinks: 'underline links (in my language)',` -    `bigCursor: 'big cursor (in my language)',` -    `readingGuide: 'reading guide (in my language)',` -    `textToSpeech: 'text to speech (in my language)',` -    `speechToText: 'speech to text (in my language)'` -    `disableAnimations: 'disable animations (in my language)'` -`};` - -`var options = { labels: labels };` -`options.textToSpeechLang = 'en-US'; // or any other language` -`options.speechToTextLang = 'en-US'; // or any other language` -`new Accessibility(options);` +```javascript +var labels = { + resetTitle: 'reset (in my language)', + closeTitle: 'close (in my language)', + menuTitle: 'title (in my language)', + increaseText: 'increase text size (in my language)', + decreaseText: 'decrease text size (in my language)', + increaseTextSpacing: 'increase text spacing (in my language)', + decreaseTextSpacing: 'decrease text spacing (in my language)', + increaseLineHeight: 'increase line height (in my language)', + decreaseLineHeight: 'decrease line height (in my language)', + invertColors: 'invert colors (in my language)', + grayHues: 'gray hues (in my language)', + underlineLinks: 'underline links (in my language)', + bigCursor: 'big cursor (in my language)', + readingGuide: 'reading guide (in my language)', + textToSpeech: 'text to speech (in my language)', + speechToText: 'speech to text (in my language)', + disableAnimations: 'disable animations (in my language)' +}; +``` + +```javascript +var options = { labels: labels }; +options.textToSpeechLang = 'en-US'; // or any other language +options.speechToTextLang = 'en-US'; // or any other language +new Accessibility(options); +``` ### DISABLE FEATURES EXAMPLE: -`options.modules = {` -    `decreaseText: [true/false],` -    `increaseText: [true/false],` -    `invertColors: [true/false],` -    `increaseTextSpacing: [true/false],` -    `decreaseTextSpacing: [true/false],` -    `increaseLineHeight: [true/false],` -    `decreaseLineHeight: [true/false],` -    `grayHues: [true/false],` -    `underlineLinks: [true/false],` -    `bigCursor: [true/false],` -    `readingGuide: [true/false],` -    `textToSpeech: [true/false],` -    `speechToText: [true/false]` -    `disableAnimations: [true/false]` -`};` +```javascript +options.modules = { + decreaseText: [true/false], + increaseText: [true/false], + invertColors: [true/false], + increaseTextSpacing: [true/false], + decreaseTextSpacing: [true/false], + increaseLineHeight: [true/false], + decreaseLineHeight: [true/false], + grayHues: [true/false], + underlineLinks: [true/false], + bigCursor: [true/false], + readingGuide: [true/false], + textToSpeech: [true/false], + speechToText: [true/false], + disableAnimations: [true/false] +}; +``` >When the default is **true** ### TEXT SIZE MANIPULATION APPROACHES: If text increase / decrease isn't working for your size your probably not using responsive font size units (such as em, rem etc.). In that case you can initialize the accessibility tool like this: -`new Accessibility({textPixelMode: true})` +```javascript +new Accessibility({textPixelMode: true}) +``` ### ANIMATIONS: Cancel all buttons animations: -`new Accessibility({animations: {buttons: false}})` +```javascript +new Accessibility({animations: {buttons: false}}) +``` ### POSITIONING: You can position the accessibility icon in any place on the screen. The default position is bottom right: -`var options = {` -    `icon: {` -        `position: {` -            `bottom: { size: 50, units: 'px' },` -            `right: { size: 0, units: 'px' },` -            `type: 'fixed'` -        `}` -    `}` -`}` -`new Accessibility(options);` +```javascript +var options = { + icon: { + position: { + bottom: { size: 50, units: 'px' }, + right: { size: 0, units: 'px' }, + type: 'fixed' + } + } +}; +new Accessibility(options); +``` But you can also position the icon in the upper left corner of the screen and cancel the fixed positioning: -`var options = {` -    `icon: {` -        `position: {` -            `top: { size: 2, units: 'vh' },` -            `left: { size: 2, units: '%' },` -            `type: 'absolute'` -        `}` -    `}` -`}` -`new Accessibility(options);` +```javascript +var options = { + icon: { + position: { + top: { size: 2, units: 'vh' }, + left: { size: 2, units: '%' }, + type: 'absolute' + } + } +}; +new Accessibility(options); +``` + + ### ICON IMAGE: You can change the default icon as described [here](https://ranbuch.github.io/accessibility/site/#icon-image) +### PERSISTENT SESSION: +From version 3.0.1 the session will be persistent even after the user will refresh the page. +To disable this feature use: +```javascript +const options = { + session: { + persistent: false + } +}; +new Accessibility(options); +``` + + +### DIRECT ACCESS TO THE API: +You can toggle the menu buttons directly via the exposed API: +```javascript +var instance = new Accessibility(); + +instance.menuInterface.increaseText(); + +instance.menuInterface.decreaseText(); + +instance.menuInterface.increaseTextSpacing(); + +instance.menuInterface.decreaseTextSpacing(); + +instance.menuInterface.invertColors(); + +instance.menuInterface.grayHues(); + +instance.menuInterface.underlineLinks(); + +instance.menuInterface.bigCursor(); + +instance.menuInterface.readingGuide(); + +instance.menuInterface.textToSpeech(); + +instance.menuInterface.speechToText(); + +instance.menuInterface.disableAnimations(); +``` + +You can also override the functionality like this: +```javascript +instance.menuInterface.increaseText = function() { + // My own way to increase text size . . . +} +``` + +### ADD CUSTOM IFRAME: +You can add buttons that will open a model with custom iframes (for accessibility terms for example) like so: +```javascript +const options = { + iframeModals: [{ + iframeUrl: 'https://github.com/ranbuch/accessibility', + buttonText: 'terms', + icon: 'favorite', + emoji: '❤️' + } +}; +new Accessibility(options); +``` + +In case you will not provide the "icon" and the "emoji" we will use this setup: + +icon: 'policy', +emoji: '⚖️' + +You can find icons [here](https://mui.com/material-ui/material-icons/) + +### ADD CUSTOM FUNCTIONS: +You can add buttons that will invoke custom functions like so: +```javascript +const options = { + customFunctions: [{ + method: (cf, state) => { + console.log('The provided customFunctions object:', cf); + console.log('Toggle state:', state); + }, + buttonText: 'my foo', + id: 1, + toggle: true, + icon: 'psychology_alt', + emoji: '❓' + } +}; +new Accessibility(options); +``` + +In case you will not provide the "icon" and the "emoji" we will use this setup: + +icon: 'psychology_alt', +emoji: '❓' + +You can find icons [here](https://mui.com/material-ui/material-icons/) + +You have to provide the "id" parameter. This would also be your way to identify the button in case you are using more then on function while using the same custom function. + +You have to provide the "toggle" parameter. This will determine whether the button will toggle his state active state (on and off) or not. + + + + + + + +### CUSTOMIZE STYLING: +You can use CSS variables to change the styling of the menu. Here is an example of how you can change the exposed variables in order to change the theme to dark mode: +```css +:root { + --_access-menu-background-color: #000; + --_access-menu-item-button-background: #222; + --_access-menu-item-color: rgba(255,255,255,.6); + --_access-menu-header-color: rgba(255,255,255,.87); + --_access-menu-item-button-active-color: #000; + --_access-menu-item-button-active-background-color: #fff; + --_access-menu-div-active-background-color: #fff; + --_access-menu-item-button-hover-color: rgba(255,255,255,.8); + --_access-menu-item-button-hover-background-color: #121212; + --_access-menu-item-icon-color: rgba(255,255,255,.6); + --_access-menu-item-hover-icon-color: rgba(255,255,255,.8); + --_access-menu-item-active-icon-color: #000; +} +``` + +Alternatively, you can suppress the default CSS injection altogether (not recommended): +```javascript +new Accessibility({suppressCssInjection: true}); +``` +You can also replace the icons by replacing the content attribute with the CSS variables currently being used. + +You might need to replace the font-face-src: +```javascript +const options = { + icon: { + fontFaceSrc: ['https://fonts.bunny.net/icon?family=Material+Icons'] + } +}; +new Accessibility(options); +``` + +Another example with font-awesome icons: +```javascript +const options = { + icon: { + fontFaceSrc: ['https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/v4-font-face.min.css'], + fontFamily: '"FontAwesome"' + } +}; +new Accessibility(options); +``` +```css +:root { + --_access-menu-item-icon-increase-text: "\f062"; + --_access-menu-item-icon-decrease-text: "\f063"; +} +``` +Obviously you will need to add the missing variables for the rest of the fonts. + +### CHANGE MODULES ORDER: +You can determine the order of the modules: +```javascript +new Accessibility({ + modulesOrder: [ + { + type: AccessibilityModulesType.textToSpeech, + order: 0 + } + ] +}); +``` + + ### LICENSE: [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)](https://spdx.org/licenses/MIT) diff --git a/dist/interfaces/accessibility.interface.d.ts b/dist/interfaces/accessibility.interface.d.ts index 9d7c4f3..c976592 100644 --- a/dist/interfaces/accessibility.interface.d.ts +++ b/dist/interfaces/accessibility.interface.d.ts @@ -141,7 +141,6 @@ export interface IAccessibilityMenuLabelsOptions { disableAnimations: string; increaseLineHeight: string; decreaseLineHeight: string; - screenReader: string; } export interface IAccessibilityAnimationsOptions { buttons: boolean; diff --git a/dist/main.bundle.js b/dist/main.bundle.js index 424bd0e..b6e7ac0 100644 --- a/dist/main.bundle.js +++ b/dist/main.bundle.js @@ -1,2 +1,2 @@ -!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var s=t();for(var n in s)("object"==typeof exports?exports:e)[n]=s[n]}}(self,(()=>(()=>{var e={696:e=>{var t=function(e){"use strict";var t,s=Object.prototype,n=s.hasOwnProperty,i=Object.defineProperty||function(e,t,s){e[t]=s.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",r=o.toStringTag||"@@toStringTag";function l(e,t,s){return Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,s){return e[t]=s}}function u(e,t,s,n){var o=t&&t.prototype instanceof _?t:_,a=Object.create(o.prototype),c=new A(n||[]);return i(a,"_invoke",{value:k(e,s,c)}),a}function d(e,t,s){try{return{type:"normal",arg:e.call(t,s)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var h="suspendedStart",p="suspendedYield",m="executing",g="completed",y={};function _(){}function b(){}function f(){}var x={};l(x,a,(function(){return this}));var v=Object.getPrototypeOf,w=v&&v(v(I([])));w&&w!==s&&n.call(w,a)&&(x=w);var S=f.prototype=_.prototype=Object.create(x);function L(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function T(e,t){function s(i,o,a,c){var r=d(e[i],e,o);if("throw"!==r.type){var l=r.arg,u=l.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){s("next",e,a,c)}),(function(e){s("throw",e,a,c)})):t.resolve(u).then((function(e){l.value=e,a(l)}),(function(e){return s("throw",e,a,c)}))}c(r.arg)}var o;i(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,i){s(e,n,t,i)}))}return o=o?o.then(i,i):i()}})}function k(e,s,n){var i=h;return function(o,a){if(i===m)throw new Error("Generator is already running");if(i===g){if("throw"===o)throw a;return{value:t,done:!0}}for(n.method=o,n.arg=a;;){var c=n.delegate;if(c){var r=E(c,n);if(r){if(r===y)continue;return r}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===h)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var l=d(e,s,n);if("normal"===l.type){if(i=n.done?g:p,l.arg===y)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(i=g,n.method="throw",n.arg=l.arg)}}}function E(e,s){var n=s.method,i=e.iterator[n];if(i===t)return s.delegate=null,"throw"===n&&e.iterator.return&&(s.method="return",s.arg=t,E(e,s),"throw"===s.method)||"return"!==n&&(s.method="throw",s.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var o=d(i,e.iterator,s.arg);if("throw"===o.type)return s.method="throw",s.arg=o.arg,s.delegate=null,y;var a=o.arg;return a?a.done?(s[e.resultName]=a.value,s.next=e.nextLoc,"return"!==s.method&&(s.method="next",s.arg=t),s.delegate=null,y):a:(s.method="throw",s.arg=new TypeError("iterator result is not an object"),s.delegate=null,y)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function I(e){if(null!=e){var s=e[a];if(s)return s.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function s(){for(;++i=0;--o){var a=this.tryEntries[o],c=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var r=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(r&&l){if(this.prev=0;--s){var i=this.tryEntries[s];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--t){var s=this.tryEntries[t];if(s.finallyLoc===e)return this.complete(s.completion,s.afterLoc),C(s),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var s=this.tryEntries[t];if(s.tryLoc===e){var n=s.completion;if("throw"===n.type){var i=n.arg;C(s)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,s,n){return this.delegate={iterator:I(e),resultName:s,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}}},t={};function s(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,s),o.exports}s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{"use strict";s.r(n),s.d(n,{Accessibility:()=>l}),s(696);var e;class t{constructor(){this.body=document.body||document.querySelector("body"),this.deployedMap=new Map}isIOS(){return"boolean"==typeof this._isIOS||(this._isIOS=(()=>{var e=["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"];if(navigator.platform)for(;e.length;)if(navigator.platform===e.pop())return!0;return!1})()),this._isIOS}jsonToHtml(e){let t=document.createElement(e.type);for(let s in e.attrs)t.setAttribute(s,e.attrs[s]);for(let s in e.children){let n=null;n="#text"===e.children[s].type?document.createTextNode(e.children[s].text):this.jsonToHtml(e.children[s]),(n&&n.tagName&&"undefined"!==n.tagName.toLowerCase()||3===n.nodeType)&&t.appendChild(n)}return t}injectStyle(e,t={}){let s=document.createElement("style");return s.appendChild(document.createTextNode(e)),t.className&&s.classList.add(t.className),this.body.appendChild(s),s}getFormattedDim(e){if(!e)return null;let t=function(e,t){return{size:e.substring(0,e.indexOf(t)),suffix:t}};return(e=String(e)).indexOf("%")>-1?t(e,"%"):e.indexOf("px")>-1?t(e,"px"):e.indexOf("em")>-1?t(e,"em"):e.indexOf("rem")>-1?t(e,"rem"):e.indexOf("pt")>-1?t(e,"pt"):"auto"===e?t(e,""):void 0}extend(e,t){for(let s in e)"object"==typeof e[s]?t&&t[s]&&(t[s]instanceof Array?e[s]=t[s]:e[s]=this.extend(e[s],t[s])):"object"==typeof t&&void 0!==t[s]&&(e[s]=t[s]);return e}injectIconsFont(e,t){if(e&&e.length){let s=document.getElementsByTagName("head")[0],n=0,i=!1,o=e=>{i=i||""===e.type,--n||t(i)};e.forEach((e=>{let t=document.createElement("link");t.type="text/css",t.rel="stylesheet",t.href=e,t.className="_access-font-icon-"+n++,t.onload=o,t.onerror=o,this.deployedObjects.set("."+t.className,!0),s.appendChild(t)}))}}getFixedFont(e){return this.isIOS()?e.replaceAll(" ","+"):e}getFixedPseudoFont(e){return this.isIOS()?e.replaceAll("+"," "):e}isFontLoaded(e,t){try{const s=()=>t(document.fonts.check(`1em ${e.replaceAll("+"," ")}`));document.fonts.ready.then((()=>{s()}),(()=>{s()}))}catch(e){return t(!0)}}warn(e){let t="Accessibility: ";console.warn?console.warn(t+e):console.log(t+e)}get deployedObjects(){return{get:e=>this.deployedMap.get(e),contains:e=>this.deployedMap.has(e),set:(e,t)=>{this.deployedMap.set(e,t)},remove:e=>{this.deployedMap.delete(e)},getAll:()=>this.deployedMap}}createScreenshot(e){return new Promise(((s,n)=>{this._canvas||(this._canvas=document.createElement("canvas"));const i=new Image;this._canvas.style.position="fixed",this._canvas.style.top="0",this._canvas.style.left="0",this._canvas.style.opacity="0.05",this._canvas.style.transform="scale(0.05)",i.crossOrigin="anonymous",i.onload=()=>{return e=this,n=void 0,a=function*(){document.body.appendChild(this._canvas);const e=this._canvas.getContext("2d");this._canvas.width=i.naturalWidth,this._canvas.height=i.naturalHeight,e.clearRect(0,0,this._canvas.width,this._canvas.height),e.drawImage(i,0,0);let n=t.DEFAULT_PIXEL;try{n=this._canvas.toDataURL("image/png")}catch(e){}s(n),this._canvas.remove()},new((o=void 0)||(o=Promise))((function(t,s){function i(e){try{r(a.next(e))}catch(e){s(e)}}function c(e){try{r(a.throw(e))}catch(e){s(e)}}function r(e){e.done?t(e.value):new o((function(t){t(e.value)})).then(i,c)}r((a=a.apply(e,n||[])).next())}));var e,n,o,a},i.onerror=()=>{s(t.DEFAULT_PIXEL)},i.src=e}))}getFileExtension(e){return e.substring(e.lastIndexOf(".")+1,e.length)||e}}t.DEFAULT_PIXEL="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAA1JREFUGFdj+P///38ACfsD/QVDRcoAAAAASUVORK5CYII=",function(e){e[e.increaseText=1]="increaseText",e[e.decreaseText=2]="decreaseText",e[e.increaseTextSpacing=3]="increaseTextSpacing",e[e.decreaseTextSpacing=4]="decreaseTextSpacing",e[e.increaseLineHeight=5]="increaseLineHeight",e[e.decreaseLineHeight=6]="decreaseLineHeight",e[e.invertColors=7]="invertColors",e[e.grayHues=8]="grayHues",e[e.bigCursor=9]="bigCursor",e[e.readingGuide=10]="readingGuide",e[e.underlineLinks=11]="underlineLinks",e[e.textToSpeech=12]="textToSpeech",e[e.speechToText=13]="speechToText",e[e.disableAnimations=14]="disableAnimations",e[e.iframeModals=15]="iframeModals",e[e.customFunctions=16]="customFunctions"}(e||(e={}));var i=function(e,t,s,n){return new(s||(s=Promise))((function(i,o){function a(e){try{r(n.next(e))}catch(e){o(e)}}function c(e){try{r(n.throw(e))}catch(e){o(e)}}function r(e){e.done?i(e.value):new s((function(t){t(e.value)})).then(a,c)}r((n=n.apply(e,t||[])).next())}))};class o{constructor(e){this._acc=e,this.readBind=this._acc.read.bind(this._acc)}increaseText(){this._acc.alterTextSize(!0)}decreaseText(){this._acc.alterTextSize(!1)}increaseTextSpacing(){this._acc.alterTextSpace(!0)}decreaseTextSpacing(){this._acc.alterTextSpace(!1)}invertColors(e){if(void 0===this._acc.stateValues.html.backgroundColor&&(this._acc.stateValues.html.backgroundColor=getComputedStyle(this._acc.html).backgroundColor),void 0===this._acc.stateValues.html.color&&(this._acc.stateValues.html.color=getComputedStyle(this._acc.html).color),e)return this._acc.resetIfDefined(this._acc.stateValues.html.backgroundColor,this._acc.html.style,"backgroundColor"),this._acc.resetIfDefined(this._acc.stateValues.html.color,this._acc.html.style,"color"),document.querySelector('._access-menu [data-access-action="invertColors"]').classList.remove("active"),this._acc.stateValues.invertColors=!1,this._acc.sessionState.invertColors=this._acc.stateValues.invertColors,this._acc.onChange(!0),void(this._acc.html.style.filter="");this._acc.stateValues.invertColors&&this._acc.stateValues.textToSpeech&&this._acc.textToSpeech("Colors Set To Normal"),document.querySelector('._access-menu [data-access-action="invertColors"]').classList.toggle("active"),this._acc.stateValues.invertColors=!this._acc.stateValues.invertColors,this._acc.sessionState.invertColors=this._acc.stateValues.invertColors,this._acc.onChange(!0),this._acc.stateValues.invertColors?(this._acc.stateValues.grayHues&&this._acc.menuInterface.grayHues(!0),this._acc.html.style.filter="invert(1)",this._acc.stateValues.textToSpeech&&this._acc.textToSpeech("Colors Inverted")):this._acc.html.style.filter=""}grayHues(e){if(void 0===this._acc.stateValues.html.filter&&(this._acc.stateValues.html.filter=getComputedStyle(this._acc.html).filter),void 0===this._acc.stateValues.html.webkitFilter&&(this._acc.stateValues.html.webkitFilter=getComputedStyle(this._acc.html).webkitFilter),void 0===this._acc.stateValues.html.mozFilter&&(this._acc.stateValues.html.mozFilter=getComputedStyle(this._acc.html).mozFilter),void 0===this._acc.stateValues.html.msFilter&&(this._acc.stateValues.html.msFilter=getComputedStyle(this._acc.html).msFilter),e)return document.querySelector('._access-menu [data-access-action="grayHues"]').classList.remove("active"),this._acc.stateValues.grayHues=!1,this._acc.sessionState.grayHues=this._acc.stateValues.grayHues,this._acc.onChange(!0),this._acc.resetIfDefined(this._acc.stateValues.html.filter,this._acc.html.style,"filter"),this._acc.resetIfDefined(this._acc.stateValues.html.webkitFilter,this._acc.html.style,"webkitFilter"),this._acc.resetIfDefined(this._acc.stateValues.html.mozFilter,this._acc.html.style,"mozFilter"),void this._acc.resetIfDefined(this._acc.stateValues.html.msFilter,this._acc.html.style,"msFilter");let t;document.querySelector('._access-menu [data-access-action="grayHues"]').classList.toggle("active"),this._acc.stateValues.grayHues=!this._acc.stateValues.grayHues,this._acc.sessionState.grayHues=this._acc.stateValues.grayHues,this._acc.onChange(!0),this._acc.stateValues.textToSpeech&&!this._acc.stateValues.grayHues&&this._acc.textToSpeech("Gray Hues Disabled."),this._acc.stateValues.grayHues?(t="grayscale(1)",this._acc.stateValues.invertColors&&this.invertColors(!0),this._acc.stateValues.textToSpeech&&this._acc.textToSpeech("Gray Hues Enabled.")):t="",this._acc.html.style.webkitFilter=t,this._acc.html.style.mozFilter=t,this._acc.html.style.msFilter=t,this._acc.html.style.filter=t}underlineLinks(e){let t="_access-underline",s=()=>{let e=document.querySelector("."+t);e&&(e.parentElement.removeChild(e),this._acc.common.deployedObjects.remove("."+t))};if(e)return this._acc.stateValues.underlineLinks=!1,this._acc.sessionState.underlineLinks=this._acc.stateValues.underlineLinks,this._acc.onChange(!0),document.querySelector('._access-menu [data-access-action="underlineLinks"]').classList.remove("active"),s();if(document.querySelector('._access-menu [data-access-action="underlineLinks"]').classList.toggle("active"),this._acc.stateValues.underlineLinks=!this._acc.stateValues.underlineLinks,this._acc.sessionState.underlineLinks=this._acc.stateValues.underlineLinks,this._acc.onChange(!0),this._acc.stateValues.underlineLinks){let e="\n body a {\n text-decoration: underline !important;\n }\n ";this._acc.common.injectStyle(e,{className:t}),this._acc.common.deployedObjects.set("."+t,!0),this._acc.stateValues.textToSpeech&&this._acc.textToSpeech("Links UnderLined")}else this._acc.stateValues.textToSpeech&&this._acc.textToSpeech("Links UnderLine Removed"),s()}bigCursor(e){if(e)return this._acc.html.classList.remove("_access_cursor"),document.querySelector('._access-menu [data-access-action="bigCursor"]').classList.remove("active"),this._acc.stateValues.bigCursor=!1,this._acc.sessionState.bigCursor=!1,void this._acc.onChange(!0);document.querySelector('._access-menu [data-access-action="bigCursor"]').classList.toggle("active"),this._acc.stateValues.bigCursor=!this._acc.stateValues.bigCursor,this._acc.sessionState.bigCursor=this._acc.stateValues.bigCursor,this._acc.onChange(!0),this._acc.html.classList.toggle("_access_cursor"),this._acc.stateValues.textToSpeech&&this._acc.stateValues.bigCursor&&this._acc.textToSpeech("Big Cursor Enabled"),this._acc.stateValues.textToSpeech&&!this._acc.stateValues.bigCursor&&this._acc.textToSpeech("Big Cursor Disabled")}readingGuide(e){if(e)return document.getElementById("access_read_guide_bar")&&document.getElementById("access_read_guide_bar").remove(),document.querySelector('._access-menu [data-access-action="readingGuide"]').classList.remove("active"),this._acc.stateValues.readingGuide=!1,this._acc.sessionState.readingGuide=this._acc.stateValues.readingGuide,this._acc.onChange(!0),document.body.removeEventListener("touchmove",this._acc.updateReadGuide,!1),document.body.removeEventListener("mousemove",this._acc.updateReadGuide,!1),void(this._acc.stateValues.textToSpeech&&this._acc.textToSpeech("Reading Guide Enabled"));if(document.querySelector('._access-menu [data-access-action="readingGuide"]').classList.toggle("active"),this._acc.stateValues.readingGuide=!this._acc.stateValues.readingGuide,this._acc.sessionState.readingGuide=this._acc.stateValues.readingGuide,this._acc.onChange(!0),this._acc.stateValues.readingGuide){let e=document.createElement("div");e.id="access_read_guide_bar",e.classList.add("access_read_guide_bar"),document.body.append(e),document.body.addEventListener("touchmove",this._acc.updateReadGuide,!1),document.body.addEventListener("mousemove",this._acc.updateReadGuide,!1)}else void 0!==document.getElementById("access_read_guide_bar")&&document.getElementById("access_read_guide_bar").remove(),document.body.removeEventListener("touchmove",this._acc.updateReadGuide,!1),document.body.removeEventListener("mousemove",this._acc.updateReadGuide,!1),this._acc.stateValues.textToSpeech&&this._acc.textToSpeech("Reading Guide Disabled")}textToSpeech(e){const t=document.querySelector('._access-menu [data-access-action="textToSpeech"]');if(!t)return;let s=document.getElementsByClassName("screen-reader-wrapper-step-1"),n=document.getElementsByClassName("screen-reader-wrapper-step-2"),i=document.getElementsByClassName("screen-reader-wrapper-step-3");this._acc.onChange(!1);const o="_access-text-to-speech";let a=()=>{let e=document.querySelector("."+o);e&&(e.parentElement.removeChild(e),document.removeEventListener("click",this.readBind,!1),document.removeEventListener("keyup",this.readBind,!1),this._acc.common.deployedObjects.remove("."+o)),window.speechSynthesis&&window.speechSynthesis.cancel(),this._acc.isReading=!1};if(e)return t.classList.remove("active"),s[0].classList.remove("active"),n[0].classList.remove("active"),i[0].classList.remove("active"),this._acc.stateValues.textToSpeech=!1,window.speechSynthesis.cancel(),a();if(1!==this._acc.stateValues.speechRate||t.classList.contains("active"))if(1===this._acc.stateValues.speechRate&&t.classList.contains("active"))this._acc.stateValues.speechRate=1.5,this._acc.textToSpeech("Reading Pace - Fast"),s[0].classList.remove("active");else{if(1.5!==this._acc.stateValues.speechRate||!t.classList.contains("active")){this._acc.stateValues.speechRate=1,this._acc.textToSpeech("Screen Reader - Disabled"),t.classList.remove("active"),i[0].classList.remove("active");let e=setInterval((()=>{this._acc.isReading||(this._acc.stateValues.textToSpeech=!1,a(),clearTimeout(e))}),500);return}this._acc.stateValues.speechRate=.7,this._acc.textToSpeech("Reading Pace - Slow"),n[0].classList.remove("active")}else this._acc.stateValues.textToSpeech=!0,this._acc.textToSpeech("Screen Reader enabled. Reading Pace - Normal"),t.classList.add("active"),s[0].classList.add("active"),n[0].classList.add("active"),i[0].classList.add("active");t.classList.contains("active")&&1===this._acc.stateValues.speechRate&&(this._acc.common.injectStyle("\n *:hover {\n box-shadow: 2px 2px 2px rgba(180,180,180,0.7);\n }\n ",{className:o}),this._acc.common.deployedObjects.set("."+o,!0),document.addEventListener("click",this.readBind,!1),document.addEventListener("keyup",this.readBind,!1))}speechToText(e){const t=document.querySelector('._access-menu [data-access-action="speechToText"]');if(!t)return;this._acc.onChange(!1);let s="_access-speech-to-text",n=()=>{this._acc.recognition&&(this._acc.recognition.stop(),this._acc.body.classList.remove("_access-listening"));let e=document.querySelector("."+s);e&&(e.parentElement.removeChild(e),this._acc.common.deployedObjects.remove("."+s));let n=document.querySelectorAll("._access-mic");for(let e=0;e{"object"==typeof this._acc.recognition&&"function"==typeof this._acc.recognition.stop&&this._acc.recognition.stop()}),!1),n[e].addEventListener("focus",this._acc.listen.bind(this._acc),!1),n[e].parentElement.classList.add("_access-mic");t.classList.add("active")}else n()}disableAnimations(e){const t="_access-disable-animations",s="data-autoplay-stopped",n=()=>{document.querySelector('._access-menu [data-access-action="disableAnimations"]').classList.remove("active"),this._acc.stateValues.disableAnimations=!1;let e=document.querySelector("."+t);e&&(e.parentElement.removeChild(e),this._acc.common.deployedObjects.remove("."+t)),document.querySelectorAll("[data-org-src]").forEach((e=>i(this,void 0,void 0,(function*(){const t=e.src;e.setAttribute("src",e.getAttribute("data-org-src")),e.setAttribute("data-org-src",t)})))),document.querySelectorAll(`video[${s}]`).forEach((e=>{e.setAttribute("autoplay",""),e.removeAttribute(s),e.play()}))};e?n():(this._acc.stateValues.disableAnimations=!this._acc.stateValues.disableAnimations,this._acc.stateValues.disableAnimations?(document.querySelector('._access-menu [data-access-action="disableAnimations"]').classList.add("active"),this._acc.common.injectStyle("\n body * {\n animation-duration: 0.0ms !important;\n transition-duration: 0.0ms !important;\n }\n ",{className:t}),this._acc.common.deployedObjects.set("."+t,!0),document.querySelectorAll("img").forEach((e=>i(this,void 0,void 0,(function*(){let t=this._acc.common.getFileExtension(e.src);if(t&&"gif"===t.toLowerCase()){let t=e.getAttribute("data-org-src");t||(t=yield this._acc.common.createScreenshot(e.src)),e.setAttribute("data-org-src",e.src),e.src=t}})))),document.querySelectorAll("video[autoplay]").forEach((e=>{e.setAttribute(s,""),e.removeAttribute("autoplay"),e.pause()}))):n())}iframeModals(e,t){t||(e=!0);const s=()=>{this._dialog&&(this._dialog.classList.add("closing"),setTimeout((()=>{this._dialog.classList.remove("closing"),this._dialog.close(),this._dialog.remove()}),350),i()),t&&t.classList.remove("active")},n=()=>{s()},i=()=>{this._dialog.querySelector("button").removeEventListener("click",n,!1),this._dialog.removeEventListener("close",n)};e?s():(t.classList.add("active"),this._dialog||(this._dialog=document.createElement("dialog")),this._dialog.classList.add("_access"),this._dialog.innerHTML="",this._dialog.appendChild(this._acc.common.jsonToHtml({type:"div",children:[{type:"div",children:[{type:"button",attrs:{role:"button",class:this._acc.options.icon.useEmojis?"":"material-icons",style:"position: absolute;\n top: 5px;\n cursor: pointer;\n font-size: 24px !important;\n font-weight: bold;\n background: transparent;\n border: none;\n left: 5px;\n color: #d63c3c;\n padding: 0;"},children:[{type:"#text",text:this._acc.options.icon.useEmojis?"X":"close"}]}]},{type:"div",children:[{type:"iframe",attrs:{src:t.getAttribute("data-access-url"),style:"width: 50vw;height: 50vh;padding: 30px;"}}]}]})),document.body.appendChild(this._dialog),this._dialog.querySelector("button").addEventListener("click",n,!1),this._dialog.addEventListener("close",n),this._dialog.showModal())}customFunctions(e,t){if(!t)return;const s=this._acc.options.customFunctions[parseInt(t.getAttribute("data-access-custom-index"))];s.toggle&&t.classList.contains("active")&&(e=!0),e?(s.toggle&&t.classList.remove("active"),s.method(s,!1)):(s.toggle&&t.classList.add("active"),s.method(s,!0))}increaseLineHeight(){this._acc.alterLineHeight(!0)}decreaseLineHeight(){this._acc.alterLineHeight(!1)}}class a{constructor(){}has(e){return window.localStorage.hasOwnProperty(e)}set(e,t){window.localStorage.setItem(e,JSON.stringify(t))}get(e){let t=window.localStorage.getItem(e);try{return JSON.parse(t)}catch(e){return t}}clear(){window.localStorage.clear()}remove(e){window.localStorage.removeItem(e)}isSupported(){let e="_test";try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return!1}}}var c=function(e,t,s,n){return new(s||(s=Promise))((function(i,o){function a(e){try{r(n.next(e))}catch(e){o(e)}}function c(e){try{r(n.throw(e))}catch(e){o(e)}}function r(e){e.done?i(e.value):new s((function(t){t(e.value)})).then(a,c)}r((n=n.apply(e,t||[])).next())}))};class r{constructor(e={}){this._common=new t,this._storage=new a,this._options=this.defaultOptions,e=this.deleteOppositesIfDefined(e),this.options=this._common.extend(this._options,e),this.addModuleOrderIfNotDefined(),this.disabledUnsupportedFeatures(),this._sessionState={textSize:0,textSpace:0,lineHeight:0,invertColors:!1,grayHues:!1,underlineLinks:!1,bigCursor:!1,readingGuide:!1},this.options.icon.useEmojis?(this.fontFallback(),this.build()):this._common.injectIconsFont(this.options.icon.fontFaceSrc,(e=>{this.build(),this.options.icon.forceFont||setTimeout((()=>{this._common.isFontLoaded(this.options.icon.fontFamily,(t=>{t&&!e||(this._common.warn(`${this.options.icon.fontFamily} font was not loaded, using emojis instead`),this.fontFallback(),this.destroy(),this.build())}))}))})),this.options.modules.speechToText&&window.addEventListener("beforeunload",(()=>{this._isReading&&(window.speechSynthesis.cancel(),this._isReading=!1)}))}get stateValues(){return this._stateValues}set stateValues(e){this._stateValues=e}get html(){return this._html}get body(){return this._body}get sessionState(){return this._sessionState}set sessionState(e){this._sessionState=e}get common(){return this._common}get recognition(){return this._recognition}get isReading(){return this._isReading}set isReading(e){this._isReading=e}get defaultOptions(){const t={icon:{position:{bottom:{size:50,units:"px"},right:{size:10,units:"px"},type:"fixed"},dimensions:{width:{size:50,units:"px"},height:{size:50,units:"px"}},zIndex:"9999",backgroundColor:"#4054b2",color:"#fff",img:"accessibility",circular:!1,circularBorder:!1,fontFaceSrc:["https://fonts.googleapis.com/icon?family=Material+Icons"],fontFamily:this._common.getFixedFont("Material Icons"),fontClass:"material-icons",useEmojis:!1},hotkeys:{enabled:!1,helpTitles:!0,keys:{toggleMenu:["ctrlKey","altKey",65],invertColors:["ctrlKey","altKey",73],grayHues:["ctrlKey","altKey",71],underlineLinks:["ctrlKey","altKey",85],bigCursor:["ctrlKey","altKey",67],readingGuide:["ctrlKey","altKey",82],textToSpeech:["ctrlKey","altKey",84],speechToText:["ctrlKey","altKey",83],disableAnimations:["ctrlKey","altKey",81]}},buttons:{font:{size:18,units:"px"}},guide:{cBorder:"#20ff69",cBackground:"#000000",height:"12px"},menu:{dimensions:{width:{size:25,units:"vw"},height:{size:"auto",units:""}},fontFamily:"RobotoDraft, Roboto, sans-serif, Arial"},suppressCssInjection:!1,labels:{resetTitle:"Reset",closeTitle:"Close",menuTitle:"Accessibility Options",increaseText:"increase text size",decreaseText:"decrease text size",increaseTextSpacing:"increase text spacing",decreaseTextSpacing:"decrease text spacing",invertColors:"invert colors",grayHues:"gray hues",bigCursor:"big cursor",readingGuide:"reading guide",underlineLinks:"underline links",textToSpeech:"text to speech",speechToText:"speech to text",disableAnimations:"disable animations",increaseLineHeight:"increase line height",decreaseLineHeight:"decrease line height",screenReader:"screen reader"},textPixelMode:!1,textEmlMode:!0,animations:{buttons:!0},modules:{increaseText:!0,decreaseText:!0,increaseTextSpacing:!0,decreaseTextSpacing:!0,increaseLineHeight:!0,decreaseLineHeight:!0,invertColors:!0,grayHues:!0,bigCursor:!0,readingGuide:!0,underlineLinks:!0,textToSpeech:!0,speechToText:!0,disableAnimations:!0,iframeModals:!0,customFunctions:!0},modulesOrder:[],session:{persistent:!0},iframeModals:[],customFunctions:[],statement:{url:""},feedback:{url:""},language:{textToSpeechLang:"",speechToTextLang:""}};return Object.keys(e).forEach(((e,s)=>{const n=parseInt(e);isNaN(n)||t.modulesOrder.push({type:n,order:n})})),t}initFontSize(){if(!this._htmlInitFS){let e=this._common.getFormattedDim(getComputedStyle(this._html).fontSize),t=this._common.getFormattedDim(getComputedStyle(this._body).fontSize);this._html.style.fontSize=e.size/16*100+"%",this._htmlOrgFontSize=this._html.style.fontSize,this._body.style.fontSize=t.size/e.size+"em"}}fontFallback(){this.options.icon.useEmojis=!0,this.options.icon.fontFamily=null,this.options.icon.img="♿",this.options.icon.fontClass=""}deleteOppositesIfDefined(e){return e.icon&&e.icon.position&&(e.icon.position.left&&(delete this._options.icon.position.right,this._options.icon.position.left=e.icon.position.left),e.icon.position.top&&(delete this._options.icon.position.bottom,this._options.icon.position.top=e.icon.position.top)),e}addModuleOrderIfNotDefined(){this.defaultOptions.modulesOrder.forEach((e=>{this.options.modulesOrder.find((t=>t.type===e.type))||this.options.modulesOrder.push(e)}))}disabledUnsupportedFeatures(){"webkitSpeechRecognition"in window&&"https:"===location.protocol||(this._common.warn("speech to text isn't supported in this browser or in http protocol (https required)"),this.options.modules.speechToText=!1);const e=window;e.SpeechSynthesisUtterance&&e.speechSynthesis||(this._common.warn("text to speech isn't supported in this browser"),this.options.modules.textToSpeech=!1)}injectCss(){let e=`\n ._access-scrollbar::-webkit-scrollbar-track, .mat-autocomplete-panel::-webkit-scrollbar-track, .mat-tab-body-content::-webkit-scrollbar-track, .mat-select-panel:not([class*='mat-elevation-z'])::-webkit-scrollbar-track, .mat-menu-panel::-webkit-scrollbar-track {\n -webkit-box-shadow: var(--_access-scrollbar-track-box-shadow, inset 0 0 6px rgba(0,0,0,0.3));\n background-color: var(--_access-scrollbar-track-background-color, #F5F5F5);\n }\n ._access-scrollbar::-webkit-scrollbar, .mat-autocomplete-panel::-webkit-scrollbar, .mat-tab-body-content::-webkit-scrollbar, .mat-select-panel:not([class*='mat-elevation-z'])::-webkit-scrollbar, .mat-menu-panel::-webkit-scrollbar {\n width: var(--_access-scrollbar-width, 6px);\n background-color: var(--_access-scrollbar-background-color, #F5F5F5);\n }\n ._access-scrollbar::-webkit-scrollbar-thumb, .mat-autocomplete-panel::-webkit-scrollbar-thumb, .mat-tab-body-content::-webkit-scrollbar-thumb, .mat-select-panel:not([class*='mat-elevation-z'])::-webkit-scrollbar-thumb, .mat-menu-panel::-webkit-scrollbar-thumb {\n background-color: var(--_access-scrollbar-thumb-background-color, #999999);\n }\n ._access-icon {\n position: ${this.options.icon.position.type};\n background-repeat: no-repeat;\n background-size: contain;\n cursor: pointer;\n opacity: 0;\n transition-duration: .35s;\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n ${this.options.icon.useEmojis?"":"box-shadow: 1px 1px 5px rgba(0,0,0,.5);"}\n transform: ${this.options.icon.useEmojis?"skewX(14deg)":"scale(1)"};\n }\n ._access-icon:hover {\n `+(this.options.animations.buttons&&!this.options.icon.useEmojis?"\n box-shadow: 1px 1px 10px rgba(0,0,0,.9);\n transform: scale(1.1);\n ":"")+"\n }\n .circular._access-icon {\n border-radius: 50%;\n border: .5px solid white;\n }\n "+(this.options.animations.buttons&&this.options.icon.circularBorder?"\n .circular._access-icon:hover {\n border: 5px solid white;\n border-style: double;\n font-size: 35px!important;\n vertical-align: middle;\n padding-top: 2px;\n text-align: center;\n }\n ":"")+`\n .access_read_guide_bar {\n box-sizing: border-box;\n background: ${this.options.guide.cBackground};\n width: 100%!important;\n min-width: 100%!important;\n position: fixed!important;\n height: ${this.options.guide.height} !important;\n border: solid 3px ${this.options.guide.cBorder};\n border-radius: 5px;\n top: 15px;\n z-index: 2147483647;\n }\n .access-high-contrast * {\n background-color: #000 !important;\n background-image: none !important;\n border-color: #fff !important;\n -webkit-box-shadow: none !important;\n box-shadow: none !important;\n color: #fff !important;\n text-indent: 0 !important;\n text-shadow: none !important;\n }\n ._access-menu {\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n position: fixed;\n width: ${this.options.menu.dimensions.width.size+this.options.menu.dimensions.width.units};\n height: ${this.options.menu.dimensions.height.size+this.options.menu.dimensions.height.units};\n transition-duration: var(--_access-menu-transition-duration, .35s);\n z-index: ${this.options.icon.zIndex+1};\n opacity: 1;\n background-color: var(--_access-menu-background-color, #fff);\n color: var(--_access-menu-color, #000);\n border-radius: var(--_access-menu-border-radius, 3px);\n border: var(--_access-menu-border, solid 1px #f1f0f1);\n font-family: ${this.options.menu.fontFamily};\n min-width: var(--_access-menu-min-width, 300px);\n box-shadow: var(--_access-menu-box-shadow, 0px 0px 1px #aaa);\n max-height: calc(100vh - 80px);\n ${"rtl"===getComputedStyle(this._body).direction?"text-indent: -5px":""}\n }\n ._access-menu.close {\n z-index: -1;\n width: 0;\n opacity: 0;\n background-color: transparent;\n }\n ._access-menu.bottom {\n bottom: 0;\n }\n ._access-menu.top {\n top: 0;\n }\n ._access-menu.left {\n left: 0;\n }\n ._access-menu.close.left {\n left: -${this.options.menu.dimensions.width.size+this.options.menu.dimensions.width.units};\n }\n ._access-menu.right {\n right: 0;\n }\n ._access-menu.close.right {\n right: -${this.options.menu.dimensions.width.size+this.options.menu.dimensions.width.units};\n }\n ._access-menu ._text-center {\n font-size: var(--_access-menu-header-font-size, 22px);\n font-weight: var(--_access-menu-header-font-weight, nornal);\n margin: var(--_access-menu-header-margin, 20px 0 10px);\n padding: 0;\n color: var(--_access-menu-header-color, rgba(0,0,0,.87));\n letter-spacing: var(--_access-menu-header-letter-spacing, initial);\n word-spacing: var(--_access-menu-header-word-spacing, initial);\n text-align: var(--_access-menu-header-text-align, center);\n }\n ._access-menu ._menu-close-btn {\n left: 5px;\n color: #d63c3c;\n transition: .3s ease;\n transform: rotate(0deg);\n font-style: normal !important;\n }\n ._access-menu ._menu-reset-btn:hover,._access-menu ._menu-close-btn:hover {\n ${this.options.animations.buttons?"transform: rotate(180deg);":""}\n }\n ._access-menu ._menu-reset-btn {\n right: 5px;\n color: #4054b2;\n transition: .3s ease;\n transform: rotate(0deg);\n font-style: normal !important;\n }\n ._access-menu ._menu-btn {\n position: absolute;\n top: 5px;\n cursor: pointer;\n font-size: 24px !important;\n font-weight: bold;\n background: transparent;\n border: none;\n }\n ._access-menu ul {\n padding: 0 0 5px;\n position: relative;\n font-size: var(--_access-menu-font-size, 18px);\n margin: 0;\n overflow: auto;\n max-height: var(--_access-menu-max-height, calc(100vh - 145px));\n display: flex;\n flex-flow: column;\n gap: 5px;\n }\n html._access_cursor * {\n cursor: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIyOS4xODhweCIgaGVpZ2h0PSI0My42MjVweCIgdmlld0JveD0iMCAwIDI5LjE4OCA0My42MjUiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI5LjE4OCA0My42MjUiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxnPjxwb2x5Z29uIGZpbGw9IiNGRkZGRkYiIHN0cm9rZT0iI0Q5REFEOSIgc3Ryb2tlLXdpZHRoPSIxLjE0MDYiIHN0cm9rZS1taXRlcmxpbWl0PSIxMCIgcG9pbnRzPSIyLjgsNC41NDkgMjYuODQ3LDE5LjkwMiAxNi45NjQsMjIuNzAxIDI0LjIzOSwzNy43NDkgMTguMjc4LDQyLjAxNyA5Ljc0MSwzMC43MjQgMS4xMzgsMzUuODA5ICIvPjxnPjxnPjxnPjxwYXRoIGZpbGw9IiMyMTI2MjciIGQ9Ik0yOS4xNzUsMjEuMTU1YzAuMDcxLTAuNjEzLTAuMTY1LTEuMjUzLTAuNjM1LTEuNTczTDIuMTY1LDAuMjU4Yy0wLjQyNC0wLjMyLTAuOTg4LTAuMzQ2LTEuNDM1LTAuMDUzQzAuMjgyLDAuNDk3LDAsMS4wMywwLDEuNjE3djM0LjE3MWMwLDAuNjEzLDAuMzA2LDEuMTQ2LDAuNzc2LDEuNDM5YzAuNDcxLDAuMjY3LDEuMDU5LDAuMjEzLDEuNDgyLTAuMTZsNy40ODItNi4zNDRsNi44NDcsMTIuMTU1YzAuMjU5LDAuNDgsMC43MjksMC43NDYsMS4yLDAuNzQ2YzAuMjM1LDAsMC40OTQtMC4wOCwwLjcwNi0wLjIxM2w2Ljk4OC00LjU4NWMwLjMyOS0wLjIxMywwLjU2NS0wLjU4NiwwLjY1OS0xLjAxM2MwLjA5NC0wLjQyNiwwLjAyNC0wLjg4LTAuMTg4LTEuMjI2bC02LjM3Ni0xMS4zODJsOC42MTEtMi43NDVDMjguNzA1LDIyLjI3NCwyOS4xMDUsMjEuNzY4LDI5LjE3NSwyMS4xNTV6IE0xNi45NjQsMjIuNzAxYy0wLjQyNCwwLjEzMy0wLjc3NiwwLjUwNi0wLjk0MSwwLjk2Yy0wLjE2NSwwLjQ4LTAuMTE4LDEuMDEzLDAuMTE4LDEuNDM5bDYuNTg4LDExLjc4MWwtNC41NDEsMi45ODVsLTYuODk0LTEyLjMxNWMtMC4yMTItMC4zNzMtMC41NDEtMC42NC0wLjk0MS0wLjcyYy0wLjA5NC0wLjAyNy0wLjE2NS0wLjAyNy0wLjI1OS0wLjAyN2MtMC4zMDYsMC0wLjU4OCwwLjEwNy0wLjg0NywwLjMyTDIuOCwzMi41OVY0LjU0OWwyMS41OTksMTUuODA2TDE2Ljk2NCwyMi43MDF6Ii8+PC9nPjwvZz48L2c+PC9nPjwvc3ZnPg==),auto!important;\n }\n .texting {\n height:50px;\n text-align: center;\n border: solid 2.4px #f1f0f1;\n border-radius: 4px;\n width: 100%;\n display: inline-block;\n }\n .screen-reader-wrapper {\n margin: 0;\n position: absolute;\n bottom: -4px;\n width: calc(100% - 2px);\n left: 1px;\n }\n .screen-reader-wrapper-step-1, .screen-reader-wrapper-step-2,.screen-reader-wrapper-step-3 {\n float: left;\n background: var(--_access-menu-background-color, #fff);\n width: 33.33%;\n height: 3px;\n border-radius: 10px;\n }\n .screen-reader-wrapper-step-1.active, .screen-reader-wrapper-step-2.active,.screen-reader-wrapper-step-3.active {\n background: var(--_access-menu-item-button-background, #f9f9f9);\n }\n ._access-menu ul li {\n position: relative;\n list-style-type: none;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n margin: 0 5px 0 8px;\n font-size: ${this.options.buttons.font.size+this.options.buttons.font.units} !important;\n line-height: ${this.options.buttons.font.size+this.options.buttons.font.units} !important;\n color: var(--_access-menu-item-color, rgba(0,0,0,.6));\n letter-spacing: var(--_access-menu-item-letter-spacing, initial);\n word-spacing: var(--_access-menu-item-word-spacing, initial);\n width: calc(100% - 17px);\n }\n ._access-menu ul li button {\n background: var(--_access-menu-item-button-background, #f9f9f9);\n padding: var(--_access-menu-item-button-padding, 10px 0);\n width: 100%;\n text-indent: var(--_access-menu-item-button-text-indent, 35px);\n text-align: start;\n position: relative;\n transition-duration: var(--_access-menu-item-button-transition-duration, .35s);\n transition-timing-function: var(--_access-menu-item-button-transition-timing-function, ease-in-out);\n border: var(--_access-menu-item-button-border, solid 1px #f1f0f1);\n border-radius: var(--_access-menu-item-button-border-radius, 4px);\n cursor: pointer;\n }\n ._access-menu ul li.position {\n display: inline-block;\n width: auto;\n }\n ._access-menu ul.before-collapse li button {\n opacity: 0.05;\n }\n ._access-menu ul li button.active, ._access-menu ul li button.active:hover {\n background-color: var(--_access-menu-item-button-active-background-color, #000);\n }\n ._access-menu div.active {\n color: var(--_access-menu-div-active-color, #fff);\n background-color: var(--_access-menu-div-active-background-color, #000);\n }\n ._access-menu ul li button.active, ._access-menu ul li button.active:hover, ._access-menu ul li button.active:before, ._access-menu ul li button.active:hover:before {\n color: var(--_access-menu-item-button-active-color, #fff);\n }\n ._access-menu ul li button:hover {\n color: var(--_access-menu-item-button-hover-color, rgba(0,0,0,.8));\n background-color: var(--_access-menu-item-button-hover-background-color, #eaeaea);\n }\n ._access-menu ul li.not-supported {\n display: none;\n }\n ._access-menu ul li button:before {\n content: ' ';\n ${this.options.icon.useEmojis?"":"font-family: "+this._common.getFixedPseudoFont(this.options.icon.fontFamily)+";"}\n text-rendering: optimizeLegibility;\n font-feature-settings: "liga" 1;\n font-style: normal;\n text-transform: none;\n line-height: ${this.options.icon.useEmojis?"1.1":"1"};\n font-size: ${this.options.icon.useEmojis?"20px":"24px"} !important;\n width: 30px;\n height: 30px;\n display: inline-block;\n overflow: hidden;\n -webkit-font-smoothing: antialiased;\n top: 7px;\n left: 5px;\n position: absolute;\n color: var(--_access-menu-item-icon-color, rgba(0,0,0,.6));\n direction: ltr;\n text-indent: 0;\n transition-duration: .35s;\n transition-timing-function: ease-in-out;\n }\n @keyframes _access-dialog-backdrop {\n 0% {\n background: var(--_access-menu-dialog-backdrop-background-start, rgba(0, 0, 0, 0.1))\n }\n 100% {\n background: var(--_access-menu-dialog-backdrop-background-end, rgba(0, 0, 0, 0.5))\n }\n }\n dialog._access::backdrop, dialog._access {\n transition-duration: var(--_access-menu-dialog-backdrop-transition-duration, 0.35s);\n transition-timing-function: var(--_access-menu-dialog-backdrop-transition-timing-function, ease-in-out);\n }\n dialog._access:modal {\n border-color: transparent;\n border-width: 0;\n padding: 0;\n }\n dialog._access[open]::backdrop {\n background: var(--_access-menu-dialog-backdrop-background-end, rgba(0, 0, 0, 0.5))\n animation: _access-dialog-backdrop var(--_access-menu-dialog-backdrop-transition-duration, 0.35s) ease-in-out;\n }\n dialog._access.closing[open]::backdrop {\n background: var(--_access-menu-dialog-backdrop-background-start, rgba(0, 0, 0, 0.1));\n }\n dialog._access.closing[open] {\n opacity: 0;\n }\n ._access-menu ul li button svg path {\n fill: var(--_access-menu-item-icon-color, rgba(0,0,0,.6));\n transition-duration: .35s;\n transition-timing-function: ease-in-out;\n }\n ._access-menu ul li button:hover svg path {\n fill: var(--_access-menu-item-hover-icon-color, rgba(0,0,0,.8));\n }\n ._access-menu ul li button.active svg path {\n fill: var(--_access-menu-item-active-icon-color, #fff);\n }\n ._access-menu ul li:hover button:before {\n color: var(--_access-menu-item-hover-icon-color, rgba(0,0,0,.8));\n }\n ._access-menu ul li button.active button:before {\n color: var(--_access-menu-item-active-icon-color, #fff);\n }\n ._access-menu ul li button[data-access-action="increaseText"]:before {\n content: var(--_access-menu-item-icon-increase-text, ${this.options.icon.useEmojis?'"🔼"':'"zoom_in"'});\n }\n ._access-menu ul li button[data-access-action="decreaseText"]:before {\n content: var(--_access-menu-item-icon-decrease-text, ${this.options.icon.useEmojis?'"🔽"':'"zoom_out"'});\n }\n ._access-menu ul li button[data-access-action="increaseTextSpacing"]:before {\n content: var(--_access-menu-item-icon-increase-text-spacing, ${this.options.icon.useEmojis?'"🔼"':'"unfold_more"'});\n transform: rotate(90deg) translate(-7px, 2px);\n top: 14px;\n left: 0;\n }\n ._access-menu ul li button[data-access-action="decreaseTextSpacing"]:before {\n content: var(--_access-menu-item-icon-decrease-text-spacing, ${this.options.icon.useEmojis?'"🔽"':'"unfold_less"'});\n transform: rotate(90deg) translate(-7px, 2px);\n top: 14px;\n left: 0;\n }\n ._access-menu ul li button[data-access-action="invertColors"]:before {\n content: var(--_access-menu-item-icon-invert-colors, ${this.options.icon.useEmojis?'"🎆"':'"invert_colors"'});\n }\n ._access-menu ul li button[data-access-action="grayHues"]:before {\n content: var(--_access-menu-item-icon-gray-hues, ${this.options.icon.useEmojis?'"🌫️"':'"format_color_reset"'});\n }\n ._access-menu ul li button[data-access-action="underlineLinks"]:before {\n content: var(--_access-menu-item-icon-underline-links, ${this.options.icon.useEmojis?'"🔗"':'"format_underlined"'});\n }\n ._access-menu ul li button[data-access-action="bigCursor"]:before {\n /*content: 'touch_app';*/\n }\n ._access-menu ul li button[data-access-action="readingGuide"]:before {\n content: var(--_access-menu-item-icon-reading-guide, ${this.options.icon.useEmojis?'"↔️"':'"border_horizontal"'});\n }\n ._access-menu ul li button[data-access-action="textToSpeech"]:before {\n content: var(--_access-menu-item-icon-text-to-speech, ${this.options.icon.useEmojis?'"⏺️"':'"record_voice_over"'});\n }\n ._access-menu ul li button[data-access-action="speechToText"]:before {\n content: var(--_access-menu-item-icon-speech-to-text, ${this.options.icon.useEmojis?'"🎤"':'"mic"'});\n }\n ._access-menu ul li button[data-access-action="disableAnimations"]:before {\n content: var(--_access-menu-item-icon-disable-animations, ${this.options.icon.useEmojis?'"🏃‍♂️"':'"animation"'});\n }\n ._access-menu ul li button[data-access-action="iframeModals"]:before {\n content: var(--_access-menu-item-icon-iframe-modals, ${this.options.icon.useEmojis?'"⚖️"':'"policy"'});\n }\n ._access-menu ul li button[data-access-action="customFunctions"]:before {\n content: var(--_access-menu-item-icon-custom-functions, ${this.options.icon.useEmojis?'"❓"':'"psychology_alt"'});\n }\n ._access-menu ul li button[data-access-action="increaseLineHeight"]:before {\n content: var(--_access-menu-item-icon-increase-line-height, ${this.options.icon.useEmojis?'"🔼"':'"unfold_more"'});\n }\n ._access-menu ul li button[data-access-action="decreaseLineHeight"]:before {\n content: var(--_access-menu-item-icon-increase-decrease-line-height, ${this.options.icon.useEmojis?'"🔽"':'"unfold_less"'});\n }`;const t=r.CSS_CLASS_NAME;this._common.injectStyle(e,{className:t}),this._common.deployedObjects.set(`.${t}`,!1)}removeCSS(){const e=document.querySelector(`.${r.CSS_CLASS_NAME}`);e&&e.remove()}injectIcon(){let e=.8*this.options.icon.dimensions.width.size,t=.9*this.options.icon.dimensions.width.size,s=.1*this.options.icon.dimensions.width.size,n=`width: ${this.options.icon.dimensions.width.size+this.options.icon.dimensions.width.units}\n ;height: ${this.options.icon.dimensions.height.size+this.options.icon.dimensions.height.units}\n ;font-size: ${e+this.options.icon.dimensions.width.units}\n ;line-height: ${t+this.options.icon.dimensions.width.units}\n ;text-indent: ${s+this.options.icon.dimensions.width.units}\n ;background-color: ${this.options.icon.useEmojis?"transparent":this.options.icon.backgroundColor};color: ${this.options.icon.color}`;for(let e in this.options.icon.position){let t=this.options.icon.position;t=t[e],n+=";"+e+":"+t.size+t.units}n+=`;z-index: ${this.options.icon.zIndex}`;let i=`_access-icon ${this.options.icon.fontClass} _access`+(this.options.icon.circular?" circular":""),o=this._common.jsonToHtml({type:"i",attrs:{class:i,style:n,title:this.options.labels.menuTitle,tabIndex:0},children:[{type:"#text",text:this.options.icon.img}]});return this._body.appendChild(o),this._common.deployedObjects.set("._access-icon",!1),o}parseKeys(e){return this.options.hotkeys.enabled&&this.options.hotkeys.helpTitles?"Hotkey: "+e.map((function(e){return Number.isInteger(e)?String.fromCharCode(e).toLowerCase():e.replace("Key","")})).join("+"):""}injectMenu(){const e={type:"div",attrs:{class:"_access-menu close _access"},children:[{type:"p",attrs:{class:"_text-center",role:"presentation"},children:[{type:"button",attrs:{class:`_menu-close-btn _menu-btn ${this.options.icon.fontClass}`,title:this.options.labels.closeTitle},children:[{type:"#text",text:this.options.icon.useEmojis?"X":"close"}]},{type:"#text",text:this.options.labels.menuTitle},{type:"button",attrs:{class:`_menu-reset-btn _menu-btn ${this.options.icon.fontClass}`,title:this.options.labels.resetTitle},children:[{type:"#text",text:this.options.icon.useEmojis?"♲":"refresh"}]}]},{type:"ul",attrs:{class:this.options.animations.buttons?"before-collapse _access-scrollbar":"_access-scrollbar"},children:[{type:"li",children:[{type:"button",attrs:{"data-access-action":"increaseText",tabIndex:"-1"},children:[{type:"#text",text:this.options.labels.increaseText}]}]},{type:"li",children:[{type:"button",attrs:{"data-access-action":"decreaseText",tabIndex:"-1"},children:[{type:"#text",text:this.options.labels.decreaseText}]}]},{type:"li",children:[{type:"button",attrs:{"data-access-action":"increaseTextSpacing",tabIndex:"-1"},children:[{type:"#text",text:this.options.labels.increaseTextSpacing}]}]},{type:"li",children:[{type:"button",attrs:{"data-access-action":"decreaseTextSpacing",tabIndex:"-1"},children:[{type:"#text",text:this.options.labels.decreaseTextSpacing}]}]},{type:"li",children:[{type:"button",attrs:{"data-access-action":"increaseLineHeight",tabIndex:"-1"},children:[{type:"#text",text:this.options.labels.increaseLineHeight}]}]},{type:"li",children:[{type:"button",attrs:{"data-access-action":"decreaseLineHeight",tabIndex:"-1"},children:[{type:"#text",text:this.options.labels.decreaseLineHeight}]}]},{type:"li",children:[{type:"button",attrs:{"data-access-action":"invertColors",title:this.parseKeys(this.options.hotkeys.keys.invertColors),tabIndex:"-1"},children:[{type:"#text",text:this.options.labels.invertColors}]}]},{type:"li",children:[{type:"button",attrs:{"data-access-action":"grayHues",title:this.parseKeys(this.options.hotkeys.keys.grayHues),tabIndex:"-1"},children:[{type:"#text",text:this.options.labels.grayHues}]}]},{type:"li",children:[{type:"button",attrs:{"data-access-action":"underlineLinks",title:this.parseKeys(this.options.hotkeys.keys.underlineLinks),tabIndex:"-1"},children:[{type:"#text",text:this.options.labels.underlineLinks}]}]},{type:"li",children:[{type:"button",attrs:{"data-access-action":"bigCursor",title:this.parseKeys(this.options.hotkeys.keys.bigCursor),tabIndex:"-1"},children:[{type:"div",attrs:{id:"iconBigCursor"}},{type:"#text",text:this.options.labels.bigCursor}]}]},{type:"li",children:[{type:"button",attrs:{"data-access-action":"readingGuide",title:this.parseKeys(this.options.hotkeys.keys.readingGuide),tabIndex:"-1"},children:[{type:"#text",text:this.options.labels.readingGuide}]}]},{type:"li",children:[{type:"button",attrs:{"data-access-action":"disableAnimations"},children:[{type:"#text",text:this.options.labels.disableAnimations}]}]}]}]};this.options.iframeModals&&this.options.iframeModals.forEach(((t,s)=>{const n={type:"li",children:[{type:"button",attrs:{"data-access-action":"iframeModals","data-access-url":t.iframeUrl},children:[{type:"#text",text:t.buttonText}]}]};let i=null;if(t.icon&&!this.options.icon.useEmojis?i=t.icon:t.emoji&&this.options.icon.useEmojis&&(i=t.emoji),i){n.children[0].attrs["data-access-iframe-index"]=s;const e=`._access-menu ul li button[data-access-action="iframeModals"][data-access-iframe-index="${s}"]:before {\n content: "${i}";\n }`;let t="_data-access-iframe-index-"+s;this._common.injectStyle(e,{className:t}),this._common.deployedObjects.set("."+t,!1)}this.options.modules.textToSpeech?e.children[1].children.splice(e.children[1].children.length-2,0,n):e.children[1].children.push(n)})),this.options.customFunctions&&this.options.customFunctions.forEach(((t,s)=>{const n={type:"li",children:[{type:"button",attrs:{"data-access-action":"customFunctions","data-access-custom-id":t.id,"data-access-custom-index":s},children:[{type:"#text",text:t.buttonText}]}]};let i=null;if(t.icon&&!this.options.icon.useEmojis?i=t.icon:t.emoji&&this.options.icon.useEmojis&&(i=t.emoji),i){const e=`._access-menu ul li button[data-access-action="customFunctions"][data-access-custom-id="${t.id}"]:before {\n content: "${i}";\n }`;let s="_data-access-custom-id-"+t.id;this._common.injectStyle(e,{className:s}),this._common.deployedObjects.set("."+s,!1)}this.options.modules.textToSpeech?e.children[1].children.splice(e.children[1].children.length-2,0,n):e.children[1].children.push(n)}));let t=this._common.jsonToHtml(e);for(let e in this.options.icon.position)t.classList.add(e);this._body.appendChild(t),setTimeout((function(){let e=document.getElementById("iconBigCursor");e&&(e.outerHTML=e.outerHTML+'',document.getElementById("iconBigCursor").remove())}),1),this._common.deployedObjects.set("._access-menu",!1);let s=document.querySelector("._access-menu ._menu-close-btn");["click","keyup"].forEach((e=>{s.addEventListener(e,(e=>{let t=e||window.event;0===t.detail&&"Enter"!==t.key||this.toggleMenu()}),!1)}));let n=document.querySelector("._access-menu ._menu-reset-btn");return["click","keyup"].forEach((e=>{n.addEventListener(e,(e=>{let t=e||window.event;0===t.detail&&"Enter"!==t.key||this.resetAll()}),!1)})),t}getVoices(){return new Promise((e=>{let t,s=window.speechSynthesis;t=setInterval((()=>{0!==s.getVoices().length&&(e(s.getVoices()),clearInterval(t))}),10)}))}injectTts(){return c(this,void 0,void 0,(function*(){let e=yield this.getVoices(),t=!1;for(let s=0;se[t].addEventListener(s,(e=>{let t=e||window.event;0===t.detail&&"Enter"!==t.key||this.invoke(t.target.getAttribute("data-access-action"),t.target)}))));[...Array.from(t),...Array.from(s),...Array.from(n)].forEach((e=>e.addEventListener("click",(e=>{let t=e||window.event;this.invoke(t.target.parentElement.parentElement.getAttribute("data-access-action"),t.target)}),!1)))}sortModuleTypes(){this.options.modulesOrder.sort(((e,t)=>e.order-t.order))}disableUnsupportedModulesAndSort(){this.sortModuleTypes();let t=document.querySelector("._access-menu ul");this.options.modulesOrder.forEach((s=>{const n=s.type,i=e[n];let o=this.options.modules;o=o[i];let a=document.querySelector('button[data-access-action="'+i+'"]');a&&(a.parentElement.remove(),t.appendChild(a.parentElement),o||a.parentElement.classList.add("not-supported"))}))}resetAll(){this.menuInterface.textToSpeech(!0),this.menuInterface.speechToText(!0),this.menuInterface.disableAnimations(!0),this.menuInterface.underlineLinks(!0),this.menuInterface.grayHues(!0),this.menuInterface.invertColors(!0),this.menuInterface.bigCursor(!0),this.menuInterface.readingGuide(!0),this.resetTextSize(),this.resetTextSpace(),this.resetLineHeight()}resetTextSize(){this.resetIfDefined(this._stateValues.body.fontSize,this._body.style,"fontSize"),void 0!==this._htmlOrgFontSize&&(this._html.style.fontSize=this._htmlOrgFontSize);let e=document.querySelectorAll("[data-init-font-size]");for(let t=0;t-1&&(s[n].getAttribute("data-init-font-size")||s[n].setAttribute("data-init-font-size",i),i=parseInt(i.replace("px",""))+t,s[n].style.fontSize=i+"px"),this._stateValues.textToSpeech&&this.textToSpeech("Text Size "+(e?"Increased":"Decreased"))}}else if(this.options.textEmlMode){let s=this._html.style.fontSize;s.indexOf("%")?(s=parseInt(s.replace("%","")),this._html.style.fontSize=s+t+"%",this._stateValues.textToSpeech&&this.textToSpeech("Text Size "+(e?"Increased":"Decreased"))):this._common.warn("Accessibility.textEmlMode, html element is not set in %.")}else{let e=this._common.getFormattedDim(getComputedStyle(this._body).fontSize);void 0===this._stateValues.body.fontSize&&(this._stateValues.body.fontSize=e.size+e.suffix),e&&e.suffix&&!isNaN(1*e.size)&&(this._body.style.fontSize=1*e.size+t+e.suffix)}}alterLineHeight(e){this.sessionState.lineHeight+=e?1:-1,this.onChange(!0);let t=2;e||(t*=-1),this.options.textEmlMode&&(t*=10);let s=document.querySelectorAll("*:not(._access)"),n=Array.prototype.slice.call(document.querySelectorAll("._access-menu *"));for(let i=0;i-1){s[i].getAttribute("data-init-line-height")||s[i].setAttribute("data-init-line-height",n);const e=parseInt(n.replace("px",""))+t;s[i].style.lineHeight=`${e}px`}this._stateValues.textToSpeech&&this.textToSpeech("Line Height "+(e?"Increased":"Decreased"))}else if(this.options.textEmlMode){let n=getComputedStyle(s[i]).fontSize,o=getComputedStyle(s[i]).lineHeight;"normal"===o&&(o=(1.2*parseInt(n.replace("px",""))).toString()+"px");let a=o.replace("px",""),c=n.replace("px",""),r=100*parseInt(a)/parseInt(c);o&&o.indexOf("px")>-1&&(s[i].getAttribute("data-init-line-height")||s[i].setAttribute("data-init-line-height",r+"%"),r+=t,s[i].style.lineHeight=r+"%"),this._stateValues.textToSpeech&&this.textToSpeech("Line height "+(e?"Increased":"Decreased"))}}alterTextSpace(e){this._sessionState.textSpace+=e?1:-1,this.onChange(!0);let t=2;if(e||(t*=-1),this.options.textPixelMode){let s=document.querySelectorAll("*:not(._access)"),n=Array.prototype.slice.call(document.querySelectorAll("._access-menu *"));for(let e=0;e-1?(s[e].getAttribute("data-init-word-spacing")||s[e].setAttribute("data-init-word-spacing",i),i=1*i.replace("px","")+t,s[e].style.wordSpacing=i+"px"):(s[e].setAttribute("data-init-word-spacing",i),s[e].style.wordSpacing=t+"px");let o=s[e].style.letterSpacing;o&&o.indexOf("px")>-1?(s[e].getAttribute("data-init-letter-spacing")||s[e].setAttribute("data-init-letter-spacing",o),o=1*o.replace("px","")+t,s[e].style.letterSpacing=o+"px"):(s[e].setAttribute("data-init-letter-spacing",o),s[e].style.letterSpacing=t+"px")}this._stateValues.textToSpeech&&this.textToSpeech("Text Spacing "+(e?"Increased":"Decreased"))}else{let s=this._common.getFormattedDim(getComputedStyle(this._body).wordSpacing);void 0===this._stateValues.body.wordSpacing&&(this._stateValues.body.wordSpacing=""),s&&s.suffix&&!isNaN(1*s.size)&&(this._body.style.wordSpacing=1*s.size+t+s.suffix);let n=this._common.getFormattedDim(getComputedStyle(this._body).letterSpacing);void 0===this._stateValues.body.letterSpacing&&(this._stateValues.body.letterSpacing=""),n&&n.sufix&&!isNaN(1*n.size)&&(this._body.style.letterSpacing=1*n.size+t+n.sufix),this._stateValues.textToSpeech&&this.textToSpeech("Text Spacing "+(e?"Increased":"Decreased"))}}speechToText(){("webkitSpeechRecognition"in window||"SpeechRecognition"in window)&&(this._recognition=new(window.SpeechRecognition||window.webkitSpeechRecognition),this._recognition.continuous=!0,this._recognition.interimResults=!0,this._recognition.onstart=()=>{this._body.classList.add("_access-listening")},this._recognition.onend=()=>{this._body.classList.remove("_access-listening")},this._recognition.onresult=e=>{let t="";if(void 0!==e.results){for(let s=e.resultIndex;s{this._isReading=!1};let n=t.speechSynthesis.getVoices(),i=!1;for(let e=0;e{let n=document.createElement("canvas"),i=new Image;n.style.position="fixed",n.style.top="0",n.style.left="0",n.style.opacity="0",n.style.transform="scale(0.05)",i.crossOrigin="anonymous",i.onload=()=>c(this,void 0,void 0,(function*(){document.body.appendChild(n);const e=n.getContext("2d");let t;n.width=i.naturalWidth,n.height=i.naturalHeight,e.clearRect(0,0,n.width,n.height),e.drawImage(i,0,0);try{t=n.toDataURL("image/png")}catch(e){}s(t),n.remove()})),i.onerror=()=>{s(t.DEFAULT_PIXEL)},i.src=e}))}listen(){"object"==typeof this._recognition&&"function"==typeof this._recognition.stop&&this._recognition.stop(),this._speechToTextTarget=window.event.target,this.speechToText()}read(e){try{(e=window.event||e||arguments[0])&&e.preventDefault&&(e.preventDefault(),e.stopPropagation())}catch(e){}let t=Array.prototype.slice.call(document.querySelectorAll("._access-menu *"));for(const s in t)if(t[s]===window.event.target&&e instanceof MouseEvent)return;e instanceof KeyboardEvent&&(e.shiftKey&&"Tab"===e.key||"Tab"===e.key)?this.textToSpeech(window.event.target.innerText):this._isReading?(window.speechSynthesis.cancel(),this._isReading=!1):this.textToSpeech(window.event.target.innerText)}runHotkey(e){"toggleMenu"===e?this.toggleMenu():this.menuInterface.hasOwnProperty(e)&&this._options.modules[e]&&this.menuInterface[e](!1)}toggleMenu(){const e=this._menu.classList.contains("close");this.options.animations&&this.options.animations.buttons&&setTimeout((()=>{this._menu.querySelector("ul").classList.toggle("before-collapse")}),e?500:10),this._menu.classList.toggle("close"),this.options.icon.tabIndex=e?0:-1,this._menu.childNodes.forEach((t=>{t.tabIndex=0,t.hasChildNodes()&&(t.tabIndex=-1,t.childNodes.forEach((t=>{t.tabIndex=e?0:-1})))}))}invoke(e,t){"function"==typeof this.menuInterface[e]&&this.menuInterface[e](void 0,t)}build(){this._stateValues={underlineLinks:!1,textToSpeech:!1,bigCursor:!1,readingGuide:!1,speechRate:1,body:{},html:{}},this._body=document.body||document.getElementsByTagName("body")[0],this._html=document.documentElement||document.getElementsByTagName("html")[0],this.options.textEmlMode&&this.initFontSize(),this.options.suppressCssInjection||this.injectCss(),this._icon=this.injectIcon(),this._menu=this.injectMenu(),this.injectTts(),setTimeout((()=>{this.addListeners(),this.disableUnsupportedModulesAndSort()}),10),this.options.hotkeys.enabled&&(document.onkeydown=e=>{let t=Object.entries(this.options.hotkeys.keys).find((function(t){let s=!0;for(var n=0;n{this.toggleMenu()}),!1),this._icon.addEventListener("keyup",(e=>{"Enter"===e.key&&this.toggleMenu()}),!1),setTimeout((()=>{this._icon.style.opacity="1"}),10),this.updateReadGuide=e=>{let t=0;t="touchmove"===e.type?e.changedTouches[0].clientY:e.y,document.getElementById("access_read_guide_bar").style.top=t-(parseInt(this.options.guide.height.replace("px",""))+5)+"px"},this.menuInterface=new o(this),this.options.session.persistent&&this.setSessionFromCache()}updateReadGuide(e){let t=0;t="touchmove"===e.type?e.changedTouches[0].clientY:e.y,document.getElementById("access_read_guide_bar").style.top=t-(parseInt(this.options.guide.height.replace("px",""))+5)+"px"}resetIfDefined(e,t,s){void 0!==e&&(t[s]=e)}onChange(e){e&&this.options.session.persistent&&this.saveSession()}saveSession(){this._storage.set("_accessState",this.sessionState)}setSessionFromCache(){let e=this._storage.get("_accessState");if(e){if(e.textSize){let t=e.textSize;if(t>0)for(;t--;)this.alterTextSize(!0);else for(;t++;)this.alterTextSize(!1)}if(e.textSpace){let t=e.textSpace;if(t>0)for(;t--;)this.alterTextSpace(!0);else for(;t++;)this.alterTextSpace(!1)}if(e.lineHeight){let t=e.lineHeight;if(t>0)for(;t--;)this.alterLineHeight(!0);else for(;t--;)this.alterLineHeight(!1)}e.invertColors&&this.menuInterface.invertColors(),e.grayHues&&this.menuInterface.grayHues(),e.underlineLinks&&this.menuInterface.underlineLinks(),e.bigCursor&&this.menuInterface.bigCursor(),e.readingGuide&&this.menuInterface.readingGuide(),this.sessionState=e}}destroy(){this._common.deployedObjects.getAll().forEach(((e,t)=>{const s=document.querySelector(t);s&&s.parentElement.removeChild(s)}))}}r.CSS_CLASS_NAME="_access-main-css",r.init=e=>{console.warn('"Accessibility.init()" is deprecated! Please use "new Accessibility()" instead'),new r(e)};const l=r;window&&(window.Accessibility=l)})(),n})())); +!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var s=t();for(var n in s)("object"==typeof exports?exports:e)[n]=s[n]}}(self,(()=>(()=>{var e={696:e=>{var t=function(e){"use strict";var t,s=Object.prototype,n=s.hasOwnProperty,i=Object.defineProperty||function(e,t,s){e[t]=s.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",r=o.toStringTag||"@@toStringTag";function l(e,t,s){return Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,s){return e[t]=s}}function u(e,t,s,n){var o=t&&t.prototype instanceof _?t:_,a=Object.create(o.prototype),c=new A(n||[]);return i(a,"_invoke",{value:k(e,s,c)}),a}function d(e,t,s){try{return{type:"normal",arg:e.call(t,s)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var h="suspendedStart",p="suspendedYield",m="executing",g="completed",y={};function _(){}function b(){}function f(){}var x={};l(x,a,(function(){return this}));var v=Object.getPrototypeOf,w=v&&v(v(I([])));w&&w!==s&&n.call(w,a)&&(x=w);var S=f.prototype=_.prototype=Object.create(x);function L(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function T(e,t){function s(i,o,a,c){var r=d(e[i],e,o);if("throw"!==r.type){var l=r.arg,u=l.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){s("next",e,a,c)}),(function(e){s("throw",e,a,c)})):t.resolve(u).then((function(e){l.value=e,a(l)}),(function(e){return s("throw",e,a,c)}))}c(r.arg)}var o;i(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,i){s(e,n,t,i)}))}return o=o?o.then(i,i):i()}})}function k(e,s,n){var i=h;return function(o,a){if(i===m)throw new Error("Generator is already running");if(i===g){if("throw"===o)throw a;return{value:t,done:!0}}for(n.method=o,n.arg=a;;){var c=n.delegate;if(c){var r=E(c,n);if(r){if(r===y)continue;return r}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===h)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var l=d(e,s,n);if("normal"===l.type){if(i=n.done?g:p,l.arg===y)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(i=g,n.method="throw",n.arg=l.arg)}}}function E(e,s){var n=s.method,i=e.iterator[n];if(i===t)return s.delegate=null,"throw"===n&&e.iterator.return&&(s.method="return",s.arg=t,E(e,s),"throw"===s.method)||"return"!==n&&(s.method="throw",s.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var o=d(i,e.iterator,s.arg);if("throw"===o.type)return s.method="throw",s.arg=o.arg,s.delegate=null,y;var a=o.arg;return a?a.done?(s[e.resultName]=a.value,s.next=e.nextLoc,"return"!==s.method&&(s.method="next",s.arg=t),s.delegate=null,y):a:(s.method="throw",s.arg=new TypeError("iterator result is not an object"),s.delegate=null,y)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function I(e){if(null!=e){var s=e[a];if(s)return s.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function s(){for(;++i=0;--o){var a=this.tryEntries[o],c=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var r=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(r&&l){if(this.prev=0;--s){var i=this.tryEntries[s];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--t){var s=this.tryEntries[t];if(s.finallyLoc===e)return this.complete(s.completion,s.afterLoc),C(s),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var s=this.tryEntries[t];if(s.tryLoc===e){var n=s.completion;if("throw"===n.type){var i=n.arg;C(s)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,s,n){return this.delegate={iterator:I(e),resultName:s,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}}},t={};function s(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,s),o.exports}s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{"use strict";s.r(n),s.d(n,{Accessibility:()=>l}),s(696);var e;class t{constructor(){this.body=document.body||document.querySelector("body"),this.deployedMap=new Map}isIOS(){return"boolean"==typeof this._isIOS||(this._isIOS=(()=>{var e=["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"];if(navigator.platform)for(;e.length;)if(navigator.platform===e.pop())return!0;return!1})()),this._isIOS}jsonToHtml(e){let t=document.createElement(e.type);for(let s in e.attrs)t.setAttribute(s,e.attrs[s]);for(let s in e.children){let n=null;n="#text"===e.children[s].type?document.createTextNode(e.children[s].text):this.jsonToHtml(e.children[s]),(n&&n.tagName&&"undefined"!==n.tagName.toLowerCase()||3===n.nodeType)&&t.appendChild(n)}return t}injectStyle(e,t={}){let s=document.createElement("style");return s.appendChild(document.createTextNode(e)),t.className&&s.classList.add(t.className),this.body.appendChild(s),s}getFormattedDim(e){if(!e)return null;let t=function(e,t){return{size:e.substring(0,e.indexOf(t)),suffix:t}};return(e=String(e)).indexOf("%")>-1?t(e,"%"):e.indexOf("px")>-1?t(e,"px"):e.indexOf("em")>-1?t(e,"em"):e.indexOf("rem")>-1?t(e,"rem"):e.indexOf("pt")>-1?t(e,"pt"):"auto"===e?t(e,""):void 0}extend(e,t){for(let s in e)"object"==typeof e[s]?t&&t[s]&&(t[s]instanceof Array?e[s]=t[s]:e[s]=this.extend(e[s],t[s])):"object"==typeof t&&void 0!==t[s]&&(e[s]=t[s]);return e}injectIconsFont(e,t){if(e&&e.length){let s=document.getElementsByTagName("head")[0],n=0,i=!1,o=e=>{i=i||""===e.type,--n||t(i)};e.forEach((e=>{let t=document.createElement("link");t.type="text/css",t.rel="stylesheet",t.href=e,t.className="_access-font-icon-"+n++,t.onload=o,t.onerror=o,this.deployedObjects.set("."+t.className,!0),s.appendChild(t)}))}}getFixedFont(e){return this.isIOS()?e.replaceAll(" ","+"):e}getFixedPseudoFont(e){return this.isIOS()?e.replaceAll("+"," "):e}isFontLoaded(e,t){try{const s=()=>t(document.fonts.check(`1em ${e.replaceAll("+"," ")}`));document.fonts.ready.then((()=>{s()}),(()=>{s()}))}catch(e){return t(!0)}}warn(e){let t="Accessibility: ";console.warn?console.warn(t+e):console.log(t+e)}get deployedObjects(){return{get:e=>this.deployedMap.get(e),contains:e=>this.deployedMap.has(e),set:(e,t)=>{this.deployedMap.set(e,t)},remove:e=>{this.deployedMap.delete(e)},getAll:()=>this.deployedMap}}createScreenshot(e){return new Promise(((s,n)=>{this._canvas||(this._canvas=document.createElement("canvas"));const i=new Image;this._canvas.style.position="fixed",this._canvas.style.top="0",this._canvas.style.left="0",this._canvas.style.opacity="0.05",this._canvas.style.transform="scale(0.05)",i.crossOrigin="anonymous",i.onload=()=>{return e=this,n=void 0,a=function*(){document.body.appendChild(this._canvas);const e=this._canvas.getContext("2d");this._canvas.width=i.naturalWidth,this._canvas.height=i.naturalHeight,e.clearRect(0,0,this._canvas.width,this._canvas.height),e.drawImage(i,0,0);let n=t.DEFAULT_PIXEL;try{n=this._canvas.toDataURL("image/png")}catch(e){}s(n),this._canvas.remove()},new((o=void 0)||(o=Promise))((function(t,s){function i(e){try{r(a.next(e))}catch(e){s(e)}}function c(e){try{r(a.throw(e))}catch(e){s(e)}}function r(e){e.done?t(e.value):new o((function(t){t(e.value)})).then(i,c)}r((a=a.apply(e,n||[])).next())}));var e,n,o,a},i.onerror=()=>{s(t.DEFAULT_PIXEL)},i.src=e}))}getFileExtension(e){return e.substring(e.lastIndexOf(".")+1,e.length)||e}}t.DEFAULT_PIXEL="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAA1JREFUGFdj+P///38ACfsD/QVDRcoAAAAASUVORK5CYII=",function(e){e[e.increaseText=1]="increaseText",e[e.decreaseText=2]="decreaseText",e[e.increaseTextSpacing=3]="increaseTextSpacing",e[e.decreaseTextSpacing=4]="decreaseTextSpacing",e[e.increaseLineHeight=5]="increaseLineHeight",e[e.decreaseLineHeight=6]="decreaseLineHeight",e[e.invertColors=7]="invertColors",e[e.grayHues=8]="grayHues",e[e.bigCursor=9]="bigCursor",e[e.readingGuide=10]="readingGuide",e[e.underlineLinks=11]="underlineLinks",e[e.textToSpeech=12]="textToSpeech",e[e.speechToText=13]="speechToText",e[e.disableAnimations=14]="disableAnimations",e[e.iframeModals=15]="iframeModals",e[e.customFunctions=16]="customFunctions"}(e||(e={}));var i=function(e,t,s,n){return new(s||(s=Promise))((function(i,o){function a(e){try{r(n.next(e))}catch(e){o(e)}}function c(e){try{r(n.throw(e))}catch(e){o(e)}}function r(e){e.done?i(e.value):new s((function(t){t(e.value)})).then(a,c)}r((n=n.apply(e,t||[])).next())}))};class o{constructor(e){this._acc=e,this.readBind=this._acc.read.bind(this._acc)}increaseText(){this._acc.alterTextSize(!0)}decreaseText(){this._acc.alterTextSize(!1)}increaseTextSpacing(){this._acc.alterTextSpace(!0)}decreaseTextSpacing(){this._acc.alterTextSpace(!1)}invertColors(e){if(void 0===this._acc.stateValues.html.backgroundColor&&(this._acc.stateValues.html.backgroundColor=getComputedStyle(this._acc.html).backgroundColor),void 0===this._acc.stateValues.html.color&&(this._acc.stateValues.html.color=getComputedStyle(this._acc.html).color),e)return this._acc.resetIfDefined(this._acc.stateValues.html.backgroundColor,this._acc.html.style,"backgroundColor"),this._acc.resetIfDefined(this._acc.stateValues.html.color,this._acc.html.style,"color"),document.querySelector('._access-menu [data-access-action="invertColors"]').classList.remove("active"),this._acc.stateValues.invertColors=!1,this._acc.sessionState.invertColors=this._acc.stateValues.invertColors,this._acc.onChange(!0),void(this._acc.html.style.filter="");this._acc.stateValues.invertColors&&this._acc.stateValues.textToSpeech&&this._acc.textToSpeech("Colors Set To Normal"),document.querySelector('._access-menu [data-access-action="invertColors"]').classList.toggle("active"),this._acc.stateValues.invertColors=!this._acc.stateValues.invertColors,this._acc.sessionState.invertColors=this._acc.stateValues.invertColors,this._acc.onChange(!0),this._acc.stateValues.invertColors?(this._acc.stateValues.grayHues&&this._acc.menuInterface.grayHues(!0),this._acc.html.style.filter="invert(1)",this._acc.stateValues.textToSpeech&&this._acc.textToSpeech("Colors Inverted")):this._acc.html.style.filter=""}grayHues(e){if(void 0===this._acc.stateValues.html.filter&&(this._acc.stateValues.html.filter=getComputedStyle(this._acc.html).filter),void 0===this._acc.stateValues.html.webkitFilter&&(this._acc.stateValues.html.webkitFilter=getComputedStyle(this._acc.html).webkitFilter),void 0===this._acc.stateValues.html.mozFilter&&(this._acc.stateValues.html.mozFilter=getComputedStyle(this._acc.html).mozFilter),void 0===this._acc.stateValues.html.msFilter&&(this._acc.stateValues.html.msFilter=getComputedStyle(this._acc.html).msFilter),e)return document.querySelector('._access-menu [data-access-action="grayHues"]').classList.remove("active"),this._acc.stateValues.grayHues=!1,this._acc.sessionState.grayHues=this._acc.stateValues.grayHues,this._acc.onChange(!0),this._acc.resetIfDefined(this._acc.stateValues.html.filter,this._acc.html.style,"filter"),this._acc.resetIfDefined(this._acc.stateValues.html.webkitFilter,this._acc.html.style,"webkitFilter"),this._acc.resetIfDefined(this._acc.stateValues.html.mozFilter,this._acc.html.style,"mozFilter"),void this._acc.resetIfDefined(this._acc.stateValues.html.msFilter,this._acc.html.style,"msFilter");let t;document.querySelector('._access-menu [data-access-action="grayHues"]').classList.toggle("active"),this._acc.stateValues.grayHues=!this._acc.stateValues.grayHues,this._acc.sessionState.grayHues=this._acc.stateValues.grayHues,this._acc.onChange(!0),this._acc.stateValues.textToSpeech&&!this._acc.stateValues.grayHues&&this._acc.textToSpeech("Gray Hues Disabled."),this._acc.stateValues.grayHues?(t="grayscale(1)",this._acc.stateValues.invertColors&&this.invertColors(!0),this._acc.stateValues.textToSpeech&&this._acc.textToSpeech("Gray Hues Enabled.")):t="",this._acc.html.style.webkitFilter=t,this._acc.html.style.mozFilter=t,this._acc.html.style.msFilter=t,this._acc.html.style.filter=t}underlineLinks(e){let t="_access-underline",s=()=>{let e=document.querySelector("."+t);e&&(e.parentElement.removeChild(e),this._acc.common.deployedObjects.remove("."+t))};if(e)return this._acc.stateValues.underlineLinks=!1,this._acc.sessionState.underlineLinks=this._acc.stateValues.underlineLinks,this._acc.onChange(!0),document.querySelector('._access-menu [data-access-action="underlineLinks"]').classList.remove("active"),s();if(document.querySelector('._access-menu [data-access-action="underlineLinks"]').classList.toggle("active"),this._acc.stateValues.underlineLinks=!this._acc.stateValues.underlineLinks,this._acc.sessionState.underlineLinks=this._acc.stateValues.underlineLinks,this._acc.onChange(!0),this._acc.stateValues.underlineLinks){let e="\n body a {\n text-decoration: underline !important;\n }\n ";this._acc.common.injectStyle(e,{className:t}),this._acc.common.deployedObjects.set("."+t,!0),this._acc.stateValues.textToSpeech&&this._acc.textToSpeech("Links UnderLined")}else this._acc.stateValues.textToSpeech&&this._acc.textToSpeech("Links UnderLine Removed"),s()}bigCursor(e){if(e)return this._acc.html.classList.remove("_access_cursor"),document.querySelector('._access-menu [data-access-action="bigCursor"]').classList.remove("active"),this._acc.stateValues.bigCursor=!1,this._acc.sessionState.bigCursor=!1,void this._acc.onChange(!0);document.querySelector('._access-menu [data-access-action="bigCursor"]').classList.toggle("active"),this._acc.stateValues.bigCursor=!this._acc.stateValues.bigCursor,this._acc.sessionState.bigCursor=this._acc.stateValues.bigCursor,this._acc.onChange(!0),this._acc.html.classList.toggle("_access_cursor"),this._acc.stateValues.textToSpeech&&this._acc.stateValues.bigCursor&&this._acc.textToSpeech("Big Cursor Enabled"),this._acc.stateValues.textToSpeech&&!this._acc.stateValues.bigCursor&&this._acc.textToSpeech("Big Cursor Disabled")}readingGuide(e){if(e)return document.getElementById("access_read_guide_bar")&&document.getElementById("access_read_guide_bar").remove(),document.querySelector('._access-menu [data-access-action="readingGuide"]').classList.remove("active"),this._acc.stateValues.readingGuide=!1,this._acc.sessionState.readingGuide=this._acc.stateValues.readingGuide,this._acc.onChange(!0),document.body.removeEventListener("touchmove",this._acc.updateReadGuide,!1),document.body.removeEventListener("mousemove",this._acc.updateReadGuide,!1),void(this._acc.stateValues.textToSpeech&&this._acc.textToSpeech("Reading Guide Enabled"));if(document.querySelector('._access-menu [data-access-action="readingGuide"]').classList.toggle("active"),this._acc.stateValues.readingGuide=!this._acc.stateValues.readingGuide,this._acc.sessionState.readingGuide=this._acc.stateValues.readingGuide,this._acc.onChange(!0),this._acc.stateValues.readingGuide){let e=document.createElement("div");e.id="access_read_guide_bar",e.classList.add("access_read_guide_bar"),document.body.append(e),document.body.addEventListener("touchmove",this._acc.updateReadGuide,!1),document.body.addEventListener("mousemove",this._acc.updateReadGuide,!1)}else void 0!==document.getElementById("access_read_guide_bar")&&document.getElementById("access_read_guide_bar").remove(),document.body.removeEventListener("touchmove",this._acc.updateReadGuide,!1),document.body.removeEventListener("mousemove",this._acc.updateReadGuide,!1),this._acc.stateValues.textToSpeech&&this._acc.textToSpeech("Reading Guide Disabled")}textToSpeech(e){const t=document.querySelector('._access-menu [data-access-action="textToSpeech"]');if(!t)return;let s=document.getElementsByClassName("screen-reader-wrapper-step-1"),n=document.getElementsByClassName("screen-reader-wrapper-step-2"),i=document.getElementsByClassName("screen-reader-wrapper-step-3");this._acc.onChange(!1);const o="_access-text-to-speech";let a=()=>{let e=document.querySelector("."+o);e&&(e.parentElement.removeChild(e),document.removeEventListener("click",this.readBind,!1),document.removeEventListener("keyup",this.readBind,!1),this._acc.common.deployedObjects.remove("."+o)),window.speechSynthesis&&window.speechSynthesis.cancel(),this._acc.isReading=!1};if(e)return t.classList.remove("active"),s[0].classList.remove("active"),n[0].classList.remove("active"),i[0].classList.remove("active"),this._acc.stateValues.textToSpeech=!1,window.speechSynthesis.cancel(),a();if(1!==this._acc.stateValues.speechRate||t.classList.contains("active"))if(1===this._acc.stateValues.speechRate&&t.classList.contains("active"))this._acc.stateValues.speechRate=1.5,this._acc.textToSpeech("Reading Pace - Fast"),s[0].classList.remove("active");else{if(1.5!==this._acc.stateValues.speechRate||!t.classList.contains("active")){this._acc.stateValues.speechRate=1,this._acc.textToSpeech("Screen Reader - Disabled"),t.classList.remove("active"),i[0].classList.remove("active");let e=setInterval((()=>{this._acc.isReading||(this._acc.stateValues.textToSpeech=!1,a(),clearTimeout(e))}),500);return}this._acc.stateValues.speechRate=.7,this._acc.textToSpeech("Reading Pace - Slow"),n[0].classList.remove("active")}else this._acc.stateValues.textToSpeech=!0,this._acc.textToSpeech("Screen Reader enabled. Reading Pace - Normal"),t.classList.add("active"),s[0].classList.add("active"),n[0].classList.add("active"),i[0].classList.add("active");t.classList.contains("active")&&1===this._acc.stateValues.speechRate&&(this._acc.common.injectStyle("\n *:hover {\n box-shadow: 2px 2px 2px rgba(180,180,180,0.7);\n }\n ",{className:o}),this._acc.common.deployedObjects.set("."+o,!0),document.addEventListener("click",this.readBind,!1),document.addEventListener("keyup",this.readBind,!1))}speechToText(e){const t=document.querySelector('._access-menu [data-access-action="speechToText"]');if(!t)return;this._acc.onChange(!1);let s="_access-speech-to-text",n=()=>{this._acc.recognition&&(this._acc.recognition.stop(),this._acc.body.classList.remove("_access-listening"));let e=document.querySelector("."+s);e&&(e.parentElement.removeChild(e),this._acc.common.deployedObjects.remove("."+s));let n=document.querySelectorAll("._access-mic");for(let e=0;e{"object"==typeof this._acc.recognition&&"function"==typeof this._acc.recognition.stop&&this._acc.recognition.stop()}),!1),n[e].addEventListener("focus",this._acc.listen.bind(this._acc),!1),n[e].parentElement.classList.add("_access-mic");t.classList.add("active")}else n()}disableAnimations(e){const t="_access-disable-animations",s="data-autoplay-stopped",n=()=>{document.querySelector('._access-menu [data-access-action="disableAnimations"]').classList.remove("active"),this._acc.stateValues.disableAnimations=!1;let e=document.querySelector("."+t);e&&(e.parentElement.removeChild(e),this._acc.common.deployedObjects.remove("."+t)),document.querySelectorAll("[data-org-src]").forEach((e=>i(this,void 0,void 0,(function*(){const t=e.src;e.setAttribute("src",e.getAttribute("data-org-src")),e.setAttribute("data-org-src",t)})))),document.querySelectorAll(`video[${s}]`).forEach((e=>{e.setAttribute("autoplay",""),e.removeAttribute(s),e.play()}))};e?n():(this._acc.stateValues.disableAnimations=!this._acc.stateValues.disableAnimations,this._acc.stateValues.disableAnimations?(document.querySelector('._access-menu [data-access-action="disableAnimations"]').classList.add("active"),this._acc.common.injectStyle("\n body * {\n animation-duration: 0.0ms !important;\n transition-duration: 0.0ms !important;\n }\n ",{className:t}),this._acc.common.deployedObjects.set("."+t,!0),document.querySelectorAll("img").forEach((e=>i(this,void 0,void 0,(function*(){let t=this._acc.common.getFileExtension(e.src);if(t&&"gif"===t.toLowerCase()){let t=e.getAttribute("data-org-src");t||(t=yield this._acc.common.createScreenshot(e.src)),e.setAttribute("data-org-src",e.src),e.src=t}})))),document.querySelectorAll("video[autoplay]").forEach((e=>{e.setAttribute(s,""),e.removeAttribute("autoplay"),e.pause()}))):n())}iframeModals(e,t){t||(e=!0);const s=()=>{this._dialog&&(this._dialog.classList.add("closing"),setTimeout((()=>{this._dialog.classList.remove("closing"),this._dialog.close(),this._dialog.remove()}),350),i()),t&&t.classList.remove("active")},n=()=>{s()},i=()=>{this._dialog.querySelector("button").removeEventListener("click",n,!1),this._dialog.removeEventListener("close",n)};e?s():(t.classList.add("active"),this._dialog||(this._dialog=document.createElement("dialog")),this._dialog.classList.add("_access"),this._dialog.innerHTML="",this._dialog.appendChild(this._acc.common.jsonToHtml({type:"div",children:[{type:"div",children:[{type:"button",attrs:{role:"button",class:this._acc.options.icon.useEmojis?"":"material-icons",style:"position: absolute;\n top: 5px;\n cursor: pointer;\n font-size: 24px !important;\n font-weight: bold;\n background: transparent;\n border: none;\n left: 5px;\n color: #d63c3c;\n padding: 0;"},children:[{type:"#text",text:this._acc.options.icon.useEmojis?"X":"close"}]}]},{type:"div",children:[{type:"iframe",attrs:{src:t.getAttribute("data-access-url"),style:"width: 50vw;height: 50vh;padding: 30px;"}}]}]})),document.body.appendChild(this._dialog),this._dialog.querySelector("button").addEventListener("click",n,!1),this._dialog.addEventListener("close",n),this._dialog.showModal())}customFunctions(e,t){if(!t)return;const s=this._acc.options.customFunctions[parseInt(t.getAttribute("data-access-custom-index"))];s.toggle&&t.classList.contains("active")&&(e=!0),e?(s.toggle&&t.classList.remove("active"),s.method(s,!1)):(s.toggle&&t.classList.add("active"),s.method(s,!0))}increaseLineHeight(){this._acc.alterLineHeight(!0)}decreaseLineHeight(){this._acc.alterLineHeight(!1)}}class a{constructor(){}has(e){return window.localStorage.hasOwnProperty(e)}set(e,t){window.localStorage.setItem(e,JSON.stringify(t))}get(e){let t=window.localStorage.getItem(e);try{return JSON.parse(t)}catch(e){return t}}clear(){window.localStorage.clear()}remove(e){window.localStorage.removeItem(e)}isSupported(){let e="_test";try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return!1}}}var c=function(e,t,s,n){return new(s||(s=Promise))((function(i,o){function a(e){try{r(n.next(e))}catch(e){o(e)}}function c(e){try{r(n.throw(e))}catch(e){o(e)}}function r(e){e.done?i(e.value):new s((function(t){t(e.value)})).then(a,c)}r((n=n.apply(e,t||[])).next())}))};class r{constructor(e={}){this._common=new t,this._storage=new a,this._options=this.defaultOptions,e=this.deleteOppositesIfDefined(e),this.options=this._common.extend(this._options,e),this.addModuleOrderIfNotDefined(),this.disabledUnsupportedFeatures(),this._sessionState={textSize:0,textSpace:0,lineHeight:0,invertColors:!1,grayHues:!1,underlineLinks:!1,bigCursor:!1,readingGuide:!1},this.options.icon.useEmojis?(this.fontFallback(),this.build()):this._common.injectIconsFont(this.options.icon.fontFaceSrc,(e=>{this.build(),this.options.icon.forceFont||setTimeout((()=>{this._common.isFontLoaded(this.options.icon.fontFamily,(t=>{t&&!e||(this._common.warn(`${this.options.icon.fontFamily} font was not loaded, using emojis instead`),this.fontFallback(),this.destroy(),this.build())}))}))})),this.options.modules.speechToText&&window.addEventListener("beforeunload",(()=>{this._isReading&&(window.speechSynthesis.cancel(),this._isReading=!1)}))}get stateValues(){return this._stateValues}set stateValues(e){this._stateValues=e}get html(){return this._html}get body(){return this._body}get sessionState(){return this._sessionState}set sessionState(e){this._sessionState=e}get common(){return this._common}get recognition(){return this._recognition}get isReading(){return this._isReading}set isReading(e){this._isReading=e}get defaultOptions(){const t={icon:{position:{bottom:{size:50,units:"px"},right:{size:10,units:"px"},type:"fixed"},dimensions:{width:{size:50,units:"px"},height:{size:50,units:"px"}},zIndex:"9999",backgroundColor:"#4054b2",color:"#fff",img:"accessibility",circular:!1,circularBorder:!1,fontFaceSrc:["https://fonts.googleapis.com/icon?family=Material+Icons"],fontFamily:this._common.getFixedFont("Material Icons"),fontClass:"material-icons",useEmojis:!1},hotkeys:{enabled:!1,helpTitles:!0,keys:{toggleMenu:["ctrlKey","altKey",65],invertColors:["ctrlKey","altKey",73],grayHues:["ctrlKey","altKey",71],underlineLinks:["ctrlKey","altKey",85],bigCursor:["ctrlKey","altKey",67],readingGuide:["ctrlKey","altKey",82],textToSpeech:["ctrlKey","altKey",84],speechToText:["ctrlKey","altKey",83],disableAnimations:["ctrlKey","altKey",81]}},buttons:{font:{size:18,units:"px"}},guide:{cBorder:"#20ff69",cBackground:"#000000",height:"12px"},menu:{dimensions:{width:{size:25,units:"vw"},height:{size:"auto",units:""}},fontFamily:"RobotoDraft, Roboto, sans-serif, Arial"},suppressCssInjection:!1,labels:{resetTitle:"Reset",closeTitle:"Close",menuTitle:"Accessibility Options",increaseText:"increase text size",decreaseText:"decrease text size",increaseTextSpacing:"increase text spacing",decreaseTextSpacing:"decrease text spacing",invertColors:"invert colors",grayHues:"gray hues",bigCursor:"big cursor",readingGuide:"reading guide",underlineLinks:"underline links",textToSpeech:"text to speech",speechToText:"speech to text",disableAnimations:"disable animations",increaseLineHeight:"increase line height",decreaseLineHeight:"decrease line height"},textPixelMode:!1,textEmlMode:!0,animations:{buttons:!0},modules:{increaseText:!0,decreaseText:!0,increaseTextSpacing:!0,decreaseTextSpacing:!0,increaseLineHeight:!0,decreaseLineHeight:!0,invertColors:!0,grayHues:!0,bigCursor:!0,readingGuide:!0,underlineLinks:!0,textToSpeech:!0,speechToText:!0,disableAnimations:!0,iframeModals:!0,customFunctions:!0},modulesOrder:[],session:{persistent:!0},iframeModals:[],customFunctions:[],statement:{url:""},feedback:{url:""},language:{textToSpeechLang:"",speechToTextLang:""}};return Object.keys(e).forEach(((e,s)=>{const n=parseInt(e);isNaN(n)||t.modulesOrder.push({type:n,order:n})})),t}initFontSize(){if(!this._htmlInitFS){let e=this._common.getFormattedDim(getComputedStyle(this._html).fontSize),t=this._common.getFormattedDim(getComputedStyle(this._body).fontSize);this._html.style.fontSize=e.size/16*100+"%",this._htmlOrgFontSize=this._html.style.fontSize,this._body.style.fontSize=t.size/e.size+"em"}}fontFallback(){this.options.icon.useEmojis=!0,this.options.icon.fontFamily=null,this.options.icon.img="♿",this.options.icon.fontClass=""}deleteOppositesIfDefined(e){return e.icon&&e.icon.position&&(e.icon.position.left&&(delete this._options.icon.position.right,this._options.icon.position.left=e.icon.position.left),e.icon.position.top&&(delete this._options.icon.position.bottom,this._options.icon.position.top=e.icon.position.top)),e}addModuleOrderIfNotDefined(){this.defaultOptions.modulesOrder.forEach((e=>{this.options.modulesOrder.find((t=>t.type===e.type))||this.options.modulesOrder.push(e)}))}disabledUnsupportedFeatures(){"webkitSpeechRecognition"in window&&"https:"===location.protocol||(this._common.warn("speech to text isn't supported in this browser or in http protocol (https required)"),this.options.modules.speechToText=!1);const e=window;e.SpeechSynthesisUtterance&&e.speechSynthesis||(this._common.warn("text to speech isn't supported in this browser"),this.options.modules.textToSpeech=!1)}injectCss(){let e=`\n ._access-scrollbar::-webkit-scrollbar-track, .mat-autocomplete-panel::-webkit-scrollbar-track, .mat-tab-body-content::-webkit-scrollbar-track, .mat-select-panel:not([class*='mat-elevation-z'])::-webkit-scrollbar-track, .mat-menu-panel::-webkit-scrollbar-track {\n -webkit-box-shadow: var(--_access-scrollbar-track-box-shadow, inset 0 0 6px rgba(0,0,0,0.3));\n background-color: var(--_access-scrollbar-track-background-color, #F5F5F5);\n }\n ._access-scrollbar::-webkit-scrollbar, .mat-autocomplete-panel::-webkit-scrollbar, .mat-tab-body-content::-webkit-scrollbar, .mat-select-panel:not([class*='mat-elevation-z'])::-webkit-scrollbar, .mat-menu-panel::-webkit-scrollbar {\n width: var(--_access-scrollbar-width, 6px);\n background-color: var(--_access-scrollbar-background-color, #F5F5F5);\n }\n ._access-scrollbar::-webkit-scrollbar-thumb, .mat-autocomplete-panel::-webkit-scrollbar-thumb, .mat-tab-body-content::-webkit-scrollbar-thumb, .mat-select-panel:not([class*='mat-elevation-z'])::-webkit-scrollbar-thumb, .mat-menu-panel::-webkit-scrollbar-thumb {\n background-color: var(--_access-scrollbar-thumb-background-color, #999999);\n }\n ._access-icon {\n position: ${this.options.icon.position.type};\n background-repeat: no-repeat;\n background-size: contain;\n cursor: pointer;\n opacity: 0;\n transition-duration: .35s;\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n ${this.options.icon.useEmojis?"":"box-shadow: 1px 1px 5px rgba(0,0,0,.5);"}\n transform: ${this.options.icon.useEmojis?"skewX(14deg)":"scale(1)"};\n }\n ._access-icon:hover {\n `+(this.options.animations.buttons&&!this.options.icon.useEmojis?"\n box-shadow: 1px 1px 10px rgba(0,0,0,.9);\n transform: scale(1.1);\n ":"")+"\n }\n .circular._access-icon {\n border-radius: 50%;\n border: .5px solid white;\n }\n "+(this.options.animations.buttons&&this.options.icon.circularBorder?"\n .circular._access-icon:hover {\n border: 5px solid white;\n border-style: double;\n font-size: 35px!important;\n vertical-align: middle;\n padding-top: 2px;\n text-align: center;\n }\n ":"")+`\n .access_read_guide_bar {\n box-sizing: border-box;\n background: ${this.options.guide.cBackground};\n width: 100%!important;\n min-width: 100%!important;\n position: fixed!important;\n height: ${this.options.guide.height} !important;\n border: solid 3px ${this.options.guide.cBorder};\n border-radius: 5px;\n top: 15px;\n z-index: 2147483647;\n }\n .access-high-contrast * {\n background-color: #000 !important;\n background-image: none !important;\n border-color: #fff !important;\n -webkit-box-shadow: none !important;\n box-shadow: none !important;\n color: #fff !important;\n text-indent: 0 !important;\n text-shadow: none !important;\n }\n ._access-menu {\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n position: fixed;\n width: ${this.options.menu.dimensions.width.size+this.options.menu.dimensions.width.units};\n height: ${this.options.menu.dimensions.height.size+this.options.menu.dimensions.height.units};\n transition-duration: var(--_access-menu-transition-duration, .35s);\n z-index: ${this.options.icon.zIndex+1};\n opacity: 1;\n background-color: var(--_access-menu-background-color, #fff);\n color: var(--_access-menu-color, #000);\n border-radius: var(--_access-menu-border-radius, 3px);\n border: var(--_access-menu-border, solid 1px #f1f0f1);\n font-family: ${this.options.menu.fontFamily};\n min-width: var(--_access-menu-min-width, 300px);\n box-shadow: var(--_access-menu-box-shadow, 0px 0px 1px #aaa);\n max-height: calc(100vh - 80px);\n ${"rtl"===getComputedStyle(this._body).direction?"text-indent: -5px":""}\n }\n ._access-menu.close {\n z-index: -1;\n width: 0;\n opacity: 0;\n background-color: transparent;\n }\n ._access-menu.bottom {\n bottom: 0;\n }\n ._access-menu.top {\n top: 0;\n }\n ._access-menu.left {\n left: 0;\n }\n ._access-menu.close.left {\n left: -${this.options.menu.dimensions.width.size+this.options.menu.dimensions.width.units};\n }\n ._access-menu.right {\n right: 0;\n }\n ._access-menu.close.right {\n right: -${this.options.menu.dimensions.width.size+this.options.menu.dimensions.width.units};\n }\n ._access-menu ._text-center {\n font-size: var(--_access-menu-header-font-size, 22px);\n font-weight: var(--_access-menu-header-font-weight, nornal);\n margin: var(--_access-menu-header-margin, 20px 0 10px);\n padding: 0;\n color: var(--_access-menu-header-color, rgba(0,0,0,.87));\n letter-spacing: var(--_access-menu-header-letter-spacing, initial);\n word-spacing: var(--_access-menu-header-word-spacing, initial);\n text-align: var(--_access-menu-header-text-align, center);\n }\n ._access-menu ._menu-close-btn {\n left: 5px;\n color: #d63c3c;\n transition: .3s ease;\n transform: rotate(0deg);\n font-style: normal !important;\n }\n ._access-menu ._menu-reset-btn:hover,._access-menu ._menu-close-btn:hover {\n ${this.options.animations.buttons?"transform: rotate(180deg);":""}\n }\n ._access-menu ._menu-reset-btn {\n right: 5px;\n color: #4054b2;\n transition: .3s ease;\n transform: rotate(0deg);\n font-style: normal !important;\n }\n ._access-menu ._menu-btn {\n position: absolute;\n top: 5px;\n cursor: pointer;\n font-size: 24px !important;\n font-weight: bold;\n background: transparent;\n border: none;\n }\n ._access-menu ul {\n padding: 0 0 5px;\n position: relative;\n font-size: var(--_access-menu-font-size, 18px);\n margin: 0;\n overflow: auto;\n max-height: var(--_access-menu-max-height, calc(100vh - 145px));\n display: flex;\n flex-flow: column;\n gap: 5px;\n }\n html._access_cursor * {\n cursor: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIyOS4xODhweCIgaGVpZ2h0PSI0My42MjVweCIgdmlld0JveD0iMCAwIDI5LjE4OCA0My42MjUiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI5LjE4OCA0My42MjUiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxnPjxwb2x5Z29uIGZpbGw9IiNGRkZGRkYiIHN0cm9rZT0iI0Q5REFEOSIgc3Ryb2tlLXdpZHRoPSIxLjE0MDYiIHN0cm9rZS1taXRlcmxpbWl0PSIxMCIgcG9pbnRzPSIyLjgsNC41NDkgMjYuODQ3LDE5LjkwMiAxNi45NjQsMjIuNzAxIDI0LjIzOSwzNy43NDkgMTguMjc4LDQyLjAxNyA5Ljc0MSwzMC43MjQgMS4xMzgsMzUuODA5ICIvPjxnPjxnPjxnPjxwYXRoIGZpbGw9IiMyMTI2MjciIGQ9Ik0yOS4xNzUsMjEuMTU1YzAuMDcxLTAuNjEzLTAuMTY1LTEuMjUzLTAuNjM1LTEuNTczTDIuMTY1LDAuMjU4Yy0wLjQyNC0wLjMyLTAuOTg4LTAuMzQ2LTEuNDM1LTAuMDUzQzAuMjgyLDAuNDk3LDAsMS4wMywwLDEuNjE3djM0LjE3MWMwLDAuNjEzLDAuMzA2LDEuMTQ2LDAuNzc2LDEuNDM5YzAuNDcxLDAuMjY3LDEuMDU5LDAuMjEzLDEuNDgyLTAuMTZsNy40ODItNi4zNDRsNi44NDcsMTIuMTU1YzAuMjU5LDAuNDgsMC43MjksMC43NDYsMS4yLDAuNzQ2YzAuMjM1LDAsMC40OTQtMC4wOCwwLjcwNi0wLjIxM2w2Ljk4OC00LjU4NWMwLjMyOS0wLjIxMywwLjU2NS0wLjU4NiwwLjY1OS0xLjAxM2MwLjA5NC0wLjQyNiwwLjAyNC0wLjg4LTAuMTg4LTEuMjI2bC02LjM3Ni0xMS4zODJsOC42MTEtMi43NDVDMjguNzA1LDIyLjI3NCwyOS4xMDUsMjEuNzY4LDI5LjE3NSwyMS4xNTV6IE0xNi45NjQsMjIuNzAxYy0wLjQyNCwwLjEzMy0wLjc3NiwwLjUwNi0wLjk0MSwwLjk2Yy0wLjE2NSwwLjQ4LTAuMTE4LDEuMDEzLDAuMTE4LDEuNDM5bDYuNTg4LDExLjc4MWwtNC41NDEsMi45ODVsLTYuODk0LTEyLjMxNWMtMC4yMTItMC4zNzMtMC41NDEtMC42NC0wLjk0MS0wLjcyYy0wLjA5NC0wLjAyNy0wLjE2NS0wLjAyNy0wLjI1OS0wLjAyN2MtMC4zMDYsMC0wLjU4OCwwLjEwNy0wLjg0NywwLjMyTDIuOCwzMi41OVY0LjU0OWwyMS41OTksMTUuODA2TDE2Ljk2NCwyMi43MDF6Ii8+PC9nPjwvZz48L2c+PC9nPjwvc3ZnPg==),auto!important;\n }\n .texting {\n height:50px;\n text-align: center;\n border: solid 2.4px #f1f0f1;\n border-radius: 4px;\n width: 100%;\n display: inline-block;\n }\n .screen-reader-wrapper {\n margin: 0;\n position: absolute;\n bottom: -4px;\n width: calc(100% - 2px);\n left: 1px;\n }\n .screen-reader-wrapper-step-1, .screen-reader-wrapper-step-2,.screen-reader-wrapper-step-3 {\n float: left;\n background: var(--_access-menu-background-color, #fff);\n width: 33.33%;\n height: 3px;\n border-radius: 10px;\n }\n .screen-reader-wrapper-step-1.active, .screen-reader-wrapper-step-2.active,.screen-reader-wrapper-step-3.active {\n background: var(--_access-menu-item-button-background, #f9f9f9);\n }\n ._access-menu ul li {\n position: relative;\n list-style-type: none;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n margin: 0 5px 0 8px;\n font-size: ${this.options.buttons.font.size+this.options.buttons.font.units} !important;\n line-height: ${this.options.buttons.font.size+this.options.buttons.font.units} !important;\n color: var(--_access-menu-item-color, rgba(0,0,0,.6));\n letter-spacing: var(--_access-menu-item-letter-spacing, initial);\n word-spacing: var(--_access-menu-item-word-spacing, initial);\n width: calc(100% - 17px);\n }\n ._access-menu ul li button {\n background: var(--_access-menu-item-button-background, #f9f9f9);\n padding: var(--_access-menu-item-button-padding, 10px 0);\n width: 100%;\n text-indent: var(--_access-menu-item-button-text-indent, 35px);\n text-align: start;\n position: relative;\n transition-duration: var(--_access-menu-item-button-transition-duration, .35s);\n transition-timing-function: var(--_access-menu-item-button-transition-timing-function, ease-in-out);\n border: var(--_access-menu-item-button-border, solid 1px #f1f0f1);\n border-radius: var(--_access-menu-item-button-border-radius, 4px);\n cursor: pointer;\n }\n ._access-menu ul li.position {\n display: inline-block;\n width: auto;\n }\n ._access-menu ul.before-collapse li button {\n opacity: 0.05;\n }\n ._access-menu ul li button.active, ._access-menu ul li button.active:hover {\n background-color: var(--_access-menu-item-button-active-background-color, #000);\n }\n ._access-menu div.active {\n color: var(--_access-menu-div-active-color, #fff);\n background-color: var(--_access-menu-div-active-background-color, #000);\n }\n ._access-menu ul li button.active, ._access-menu ul li button.active:hover, ._access-menu ul li button.active:before, ._access-menu ul li button.active:hover:before {\n color: var(--_access-menu-item-button-active-color, #fff);\n }\n ._access-menu ul li button:hover {\n color: var(--_access-menu-item-button-hover-color, rgba(0,0,0,.8));\n background-color: var(--_access-menu-item-button-hover-background-color, #eaeaea);\n }\n ._access-menu ul li.not-supported {\n display: none;\n }\n ._access-menu ul li button:before {\n content: ' ';\n ${this.options.icon.useEmojis?"":"font-family: "+this._common.getFixedPseudoFont(this.options.icon.fontFamily)+";"}\n text-rendering: optimizeLegibility;\n font-feature-settings: "liga" 1;\n font-style: normal;\n text-transform: none;\n line-height: ${this.options.icon.useEmojis?"1.1":"1"};\n font-size: ${this.options.icon.useEmojis?"20px":"24px"} !important;\n width: 30px;\n height: 30px;\n display: inline-block;\n overflow: hidden;\n -webkit-font-smoothing: antialiased;\n top: 7px;\n left: 5px;\n position: absolute;\n color: var(--_access-menu-item-icon-color, rgba(0,0,0,.6));\n direction: ltr;\n text-indent: 0;\n transition-duration: .35s;\n transition-timing-function: ease-in-out;\n }\n @keyframes _access-dialog-backdrop {\n 0% {\n background: var(--_access-menu-dialog-backdrop-background-start, rgba(0, 0, 0, 0.1))\n }\n 100% {\n background: var(--_access-menu-dialog-backdrop-background-end, rgba(0, 0, 0, 0.5))\n }\n }\n dialog._access::backdrop, dialog._access {\n transition-duration: var(--_access-menu-dialog-backdrop-transition-duration, 0.35s);\n transition-timing-function: var(--_access-menu-dialog-backdrop-transition-timing-function, ease-in-out);\n }\n dialog._access:modal {\n border-color: transparent;\n border-width: 0;\n padding: 0;\n }\n dialog._access[open]::backdrop {\n background: var(--_access-menu-dialog-backdrop-background-end, rgba(0, 0, 0, 0.5))\n animation: _access-dialog-backdrop var(--_access-menu-dialog-backdrop-transition-duration, 0.35s) ease-in-out;\n }\n dialog._access.closing[open]::backdrop {\n background: var(--_access-menu-dialog-backdrop-background-start, rgba(0, 0, 0, 0.1));\n }\n dialog._access.closing[open] {\n opacity: 0;\n }\n ._access-menu ul li button svg path {\n fill: var(--_access-menu-item-icon-color, rgba(0,0,0,.6));\n transition-duration: .35s;\n transition-timing-function: ease-in-out;\n }\n ._access-menu ul li button:hover svg path {\n fill: var(--_access-menu-item-hover-icon-color, rgba(0,0,0,.8));\n }\n ._access-menu ul li button.active svg path {\n fill: var(--_access-menu-item-active-icon-color, #fff);\n }\n ._access-menu ul li:hover button:before {\n color: var(--_access-menu-item-hover-icon-color, rgba(0,0,0,.8));\n }\n ._access-menu ul li button.active button:before {\n color: var(--_access-menu-item-active-icon-color, #fff);\n }\n ._access-menu ul li button[data-access-action="increaseText"]:before {\n content: var(--_access-menu-item-icon-increase-text, ${this.options.icon.useEmojis?'"🔼"':'"zoom_in"'});\n }\n ._access-menu ul li button[data-access-action="decreaseText"]:before {\n content: var(--_access-menu-item-icon-decrease-text, ${this.options.icon.useEmojis?'"🔽"':'"zoom_out"'});\n }\n ._access-menu ul li button[data-access-action="increaseTextSpacing"]:before {\n content: var(--_access-menu-item-icon-increase-text-spacing, ${this.options.icon.useEmojis?'"🔼"':'"unfold_more"'});\n transform: rotate(90deg) translate(-7px, 2px);\n top: 14px;\n left: 0;\n }\n ._access-menu ul li button[data-access-action="decreaseTextSpacing"]:before {\n content: var(--_access-menu-item-icon-decrease-text-spacing, ${this.options.icon.useEmojis?'"🔽"':'"unfold_less"'});\n transform: rotate(90deg) translate(-7px, 2px);\n top: 14px;\n left: 0;\n }\n ._access-menu ul li button[data-access-action="invertColors"]:before {\n content: var(--_access-menu-item-icon-invert-colors, ${this.options.icon.useEmojis?'"🎆"':'"invert_colors"'});\n }\n ._access-menu ul li button[data-access-action="grayHues"]:before {\n content: var(--_access-menu-item-icon-gray-hues, ${this.options.icon.useEmojis?'"🌫️"':'"format_color_reset"'});\n }\n ._access-menu ul li button[data-access-action="underlineLinks"]:before {\n content: var(--_access-menu-item-icon-underline-links, ${this.options.icon.useEmojis?'"🔗"':'"format_underlined"'});\n }\n ._access-menu ul li button[data-access-action="bigCursor"]:before {\n /*content: 'touch_app';*/\n }\n ._access-menu ul li button[data-access-action="readingGuide"]:before {\n content: var(--_access-menu-item-icon-reading-guide, ${this.options.icon.useEmojis?'"↔️"':'"border_horizontal"'});\n }\n ._access-menu ul li button[data-access-action="textToSpeech"]:before {\n content: var(--_access-menu-item-icon-text-to-speech, ${this.options.icon.useEmojis?'"⏺️"':'"record_voice_over"'});\n }\n ._access-menu ul li button[data-access-action="speechToText"]:before {\n content: var(--_access-menu-item-icon-speech-to-text, ${this.options.icon.useEmojis?'"🎤"':'"mic"'});\n }\n ._access-menu ul li button[data-access-action="disableAnimations"]:before {\n content: var(--_access-menu-item-icon-disable-animations, ${this.options.icon.useEmojis?'"🏃‍♂️"':'"animation"'});\n }\n ._access-menu ul li button[data-access-action="iframeModals"]:before {\n content: var(--_access-menu-item-icon-iframe-modals, ${this.options.icon.useEmojis?'"⚖️"':'"policy"'});\n }\n ._access-menu ul li button[data-access-action="customFunctions"]:before {\n content: var(--_access-menu-item-icon-custom-functions, ${this.options.icon.useEmojis?'"❓"':'"psychology_alt"'});\n }\n ._access-menu ul li button[data-access-action="increaseLineHeight"]:before {\n content: var(--_access-menu-item-icon-increase-line-height, ${this.options.icon.useEmojis?'"🔼"':'"unfold_more"'});\n }\n ._access-menu ul li button[data-access-action="decreaseLineHeight"]:before {\n content: var(--_access-menu-item-icon-increase-decrease-line-height, ${this.options.icon.useEmojis?'"🔽"':'"unfold_less"'});\n }`;const t=r.CSS_CLASS_NAME;this._common.injectStyle(e,{className:t}),this._common.deployedObjects.set(`.${t}`,!1)}removeCSS(){const e=document.querySelector(`.${r.CSS_CLASS_NAME}`);e&&e.remove()}injectIcon(){let e=.8*this.options.icon.dimensions.width.size,t=.9*this.options.icon.dimensions.width.size,s=.1*this.options.icon.dimensions.width.size,n=`width: ${this.options.icon.dimensions.width.size+this.options.icon.dimensions.width.units}\n ;height: ${this.options.icon.dimensions.height.size+this.options.icon.dimensions.height.units}\n ;font-size: ${e+this.options.icon.dimensions.width.units}\n ;line-height: ${t+this.options.icon.dimensions.width.units}\n ;text-indent: ${s+this.options.icon.dimensions.width.units}\n ;background-color: ${this.options.icon.useEmojis?"transparent":this.options.icon.backgroundColor};color: ${this.options.icon.color}`;for(let e in this.options.icon.position){let t=this.options.icon.position;t=t[e],n+=";"+e+":"+t.size+t.units}n+=`;z-index: ${this.options.icon.zIndex}`;let i=`_access-icon ${this.options.icon.fontClass} _access`+(this.options.icon.circular?" circular":""),o=this._common.jsonToHtml({type:"i",attrs:{class:i,style:n,title:this.options.labels.menuTitle,tabIndex:0},children:[{type:"#text",text:this.options.icon.img}]});return this._body.appendChild(o),this._common.deployedObjects.set("._access-icon",!1),o}parseKeys(e){return this.options.hotkeys.enabled&&this.options.hotkeys.helpTitles?"Hotkey: "+e.map((function(e){return Number.isInteger(e)?String.fromCharCode(e).toLowerCase():e.replace("Key","")})).join("+"):""}injectMenu(){const e={type:"div",attrs:{class:"_access-menu close _access"},children:[{type:"p",attrs:{class:"_text-center",role:"presentation"},children:[{type:"button",attrs:{class:`_menu-close-btn _menu-btn ${this.options.icon.fontClass}`,title:this.options.labels.closeTitle},children:[{type:"#text",text:this.options.icon.useEmojis?"X":"close"}]},{type:"#text",text:this.options.labels.menuTitle},{type:"button",attrs:{class:`_menu-reset-btn _menu-btn ${this.options.icon.fontClass}`,title:this.options.labels.resetTitle},children:[{type:"#text",text:this.options.icon.useEmojis?"♲":"refresh"}]}]},{type:"ul",attrs:{class:this.options.animations.buttons?"before-collapse _access-scrollbar":"_access-scrollbar"},children:[{type:"li",children:[{type:"button",attrs:{"data-access-action":"increaseText",tabIndex:"-1"},children:[{type:"#text",text:this.options.labels.increaseText}]}]},{type:"li",children:[{type:"button",attrs:{"data-access-action":"decreaseText",tabIndex:"-1"},children:[{type:"#text",text:this.options.labels.decreaseText}]}]},{type:"li",children:[{type:"button",attrs:{"data-access-action":"increaseTextSpacing",tabIndex:"-1"},children:[{type:"#text",text:this.options.labels.increaseTextSpacing}]}]},{type:"li",children:[{type:"button",attrs:{"data-access-action":"decreaseTextSpacing",tabIndex:"-1"},children:[{type:"#text",text:this.options.labels.decreaseTextSpacing}]}]},{type:"li",children:[{type:"button",attrs:{"data-access-action":"increaseLineHeight",tabIndex:"-1"},children:[{type:"#text",text:this.options.labels.increaseLineHeight}]}]},{type:"li",children:[{type:"button",attrs:{"data-access-action":"decreaseLineHeight",tabIndex:"-1"},children:[{type:"#text",text:this.options.labels.decreaseLineHeight}]}]},{type:"li",children:[{type:"button",attrs:{"data-access-action":"invertColors",title:this.parseKeys(this.options.hotkeys.keys.invertColors),tabIndex:"-1"},children:[{type:"#text",text:this.options.labels.invertColors}]}]},{type:"li",children:[{type:"button",attrs:{"data-access-action":"grayHues",title:this.parseKeys(this.options.hotkeys.keys.grayHues),tabIndex:"-1"},children:[{type:"#text",text:this.options.labels.grayHues}]}]},{type:"li",children:[{type:"button",attrs:{"data-access-action":"underlineLinks",title:this.parseKeys(this.options.hotkeys.keys.underlineLinks),tabIndex:"-1"},children:[{type:"#text",text:this.options.labels.underlineLinks}]}]},{type:"li",children:[{type:"button",attrs:{"data-access-action":"bigCursor",title:this.parseKeys(this.options.hotkeys.keys.bigCursor),tabIndex:"-1"},children:[{type:"div",attrs:{id:"iconBigCursor"}},{type:"#text",text:this.options.labels.bigCursor}]}]},{type:"li",children:[{type:"button",attrs:{"data-access-action":"readingGuide",title:this.parseKeys(this.options.hotkeys.keys.readingGuide),tabIndex:"-1"},children:[{type:"#text",text:this.options.labels.readingGuide}]}]},{type:"li",children:[{type:"button",attrs:{"data-access-action":"disableAnimations"},children:[{type:"#text",text:this.options.labels.disableAnimations}]}]}]}]};this.options.iframeModals&&this.options.iframeModals.forEach(((t,s)=>{const n={type:"li",children:[{type:"button",attrs:{"data-access-action":"iframeModals","data-access-url":t.iframeUrl},children:[{type:"#text",text:t.buttonText}]}]};let i=null;if(t.icon&&!this.options.icon.useEmojis?i=t.icon:t.emoji&&this.options.icon.useEmojis&&(i=t.emoji),i){n.children[0].attrs["data-access-iframe-index"]=s;const e=`._access-menu ul li button[data-access-action="iframeModals"][data-access-iframe-index="${s}"]:before {\n content: "${i}";\n }`;let t="_data-access-iframe-index-"+s;this._common.injectStyle(e,{className:t}),this._common.deployedObjects.set("."+t,!1)}this.options.modules.textToSpeech?e.children[1].children.splice(e.children[1].children.length-2,0,n):e.children[1].children.push(n)})),this.options.customFunctions&&this.options.customFunctions.forEach(((t,s)=>{const n={type:"li",children:[{type:"button",attrs:{"data-access-action":"customFunctions","data-access-custom-id":t.id,"data-access-custom-index":s},children:[{type:"#text",text:t.buttonText}]}]};let i=null;if(t.icon&&!this.options.icon.useEmojis?i=t.icon:t.emoji&&this.options.icon.useEmojis&&(i=t.emoji),i){const e=`._access-menu ul li button[data-access-action="customFunctions"][data-access-custom-id="${t.id}"]:before {\n content: "${i}";\n }`;let s="_data-access-custom-id-"+t.id;this._common.injectStyle(e,{className:s}),this._common.deployedObjects.set("."+s,!1)}this.options.modules.textToSpeech?e.children[1].children.splice(e.children[1].children.length-2,0,n):e.children[1].children.push(n)}));let t=this._common.jsonToHtml(e);for(let e in this.options.icon.position)t.classList.add(e);this._body.appendChild(t),setTimeout((function(){let e=document.getElementById("iconBigCursor");e&&(e.outerHTML=e.outerHTML+'',document.getElementById("iconBigCursor").remove())}),1),this._common.deployedObjects.set("._access-menu",!1);let s=document.querySelector("._access-menu ._menu-close-btn");["click","keyup"].forEach((e=>{s.addEventListener(e,(e=>{let t=e||window.event;0===t.detail&&"Enter"!==t.key||this.toggleMenu()}),!1)}));let n=document.querySelector("._access-menu ._menu-reset-btn");return["click","keyup"].forEach((e=>{n.addEventListener(e,(e=>{let t=e||window.event;0===t.detail&&"Enter"!==t.key||this.resetAll()}),!1)})),t}getVoices(){return new Promise((e=>{let t,s=window.speechSynthesis;t=setInterval((()=>{0!==s.getVoices().length&&(e(s.getVoices()),clearInterval(t))}),10)}))}injectTts(){return c(this,void 0,void 0,(function*(){let e=yield this.getVoices(),t=!1;for(let s=0;se[t].addEventListener(s,(e=>{let t=e||window.event;0===t.detail&&"Enter"!==t.key||this.invoke(t.target.getAttribute("data-access-action"),t.target)}))));[...Array.from(t),...Array.from(s),...Array.from(n)].forEach((e=>e.addEventListener("click",(e=>{let t=e||window.event;this.invoke(t.target.parentElement.parentElement.getAttribute("data-access-action"),t.target)}),!1)))}sortModuleTypes(){this.options.modulesOrder.sort(((e,t)=>e.order-t.order))}disableUnsupportedModulesAndSort(){this.sortModuleTypes();let t=document.querySelector("._access-menu ul");this.options.modulesOrder.forEach((s=>{const n=s.type,i=e[n];let o=this.options.modules;o=o[i];let a=document.querySelector('button[data-access-action="'+i+'"]');a&&(a.parentElement.remove(),t.appendChild(a.parentElement),o||a.parentElement.classList.add("not-supported"))}))}resetAll(){this.menuInterface.textToSpeech(!0),this.menuInterface.speechToText(!0),this.menuInterface.disableAnimations(!0),this.menuInterface.underlineLinks(!0),this.menuInterface.grayHues(!0),this.menuInterface.invertColors(!0),this.menuInterface.bigCursor(!0),this.menuInterface.readingGuide(!0),this.resetTextSize(),this.resetTextSpace(),this.resetLineHeight()}resetTextSize(){this.resetIfDefined(this._stateValues.body.fontSize,this._body.style,"fontSize"),void 0!==this._htmlOrgFontSize&&(this._html.style.fontSize=this._htmlOrgFontSize);let e=document.querySelectorAll("[data-init-font-size]");for(let t=0;t-1&&(s[n].getAttribute("data-init-font-size")||s[n].setAttribute("data-init-font-size",i),i=parseInt(i.replace("px",""))+t,s[n].style.fontSize=i+"px"),this._stateValues.textToSpeech&&this.textToSpeech("Text Size "+(e?"Increased":"Decreased"))}}else if(this.options.textEmlMode){let s=this._html.style.fontSize;s.indexOf("%")?(s=parseInt(s.replace("%","")),this._html.style.fontSize=s+t+"%",this._stateValues.textToSpeech&&this.textToSpeech("Text Size "+(e?"Increased":"Decreased"))):this._common.warn("Accessibility.textEmlMode, html element is not set in %.")}else{let e=this._common.getFormattedDim(getComputedStyle(this._body).fontSize);void 0===this._stateValues.body.fontSize&&(this._stateValues.body.fontSize=e.size+e.suffix),e&&e.suffix&&!isNaN(1*e.size)&&(this._body.style.fontSize=1*e.size+t+e.suffix)}}alterLineHeight(e){this.sessionState.lineHeight+=e?1:-1,this.onChange(!0);let t=2;e||(t*=-1),this.options.textEmlMode&&(t*=10);let s=document.querySelectorAll("*:not(._access)"),n=Array.prototype.slice.call(document.querySelectorAll("._access-menu *"));for(let i=0;i-1){s[i].getAttribute("data-init-line-height")||s[i].setAttribute("data-init-line-height",n);const e=parseInt(n.replace("px",""))+t;s[i].style.lineHeight=`${e}px`}this._stateValues.textToSpeech&&this.textToSpeech("Line Height "+(e?"Increased":"Decreased"))}else if(this.options.textEmlMode){let n=getComputedStyle(s[i]).fontSize,o=getComputedStyle(s[i]).lineHeight;"normal"===o&&(o=(1.2*parseInt(n.replace("px",""))).toString()+"px");let a=o.replace("px",""),c=n.replace("px",""),r=100*parseInt(a)/parseInt(c);o&&o.indexOf("px")>-1&&(s[i].getAttribute("data-init-line-height")||s[i].setAttribute("data-init-line-height",r+"%"),r+=t,s[i].style.lineHeight=r+"%"),this._stateValues.textToSpeech&&this.textToSpeech("Line height "+(e?"Increased":"Decreased"))}}alterTextSpace(e){this._sessionState.textSpace+=e?1:-1,this.onChange(!0);let t=2;if(e||(t*=-1),this.options.textPixelMode){let s=document.querySelectorAll("*:not(._access)"),n=Array.prototype.slice.call(document.querySelectorAll("._access-menu *"));for(let e=0;e-1?(s[e].getAttribute("data-init-word-spacing")||s[e].setAttribute("data-init-word-spacing",i),i=1*i.replace("px","")+t,s[e].style.wordSpacing=i+"px"):(s[e].setAttribute("data-init-word-spacing",i),s[e].style.wordSpacing=t+"px");let o=s[e].style.letterSpacing;o&&o.indexOf("px")>-1?(s[e].getAttribute("data-init-letter-spacing")||s[e].setAttribute("data-init-letter-spacing",o),o=1*o.replace("px","")+t,s[e].style.letterSpacing=o+"px"):(s[e].setAttribute("data-init-letter-spacing",o),s[e].style.letterSpacing=t+"px")}this._stateValues.textToSpeech&&this.textToSpeech("Text Spacing "+(e?"Increased":"Decreased"))}else{let s=this._common.getFormattedDim(getComputedStyle(this._body).wordSpacing);void 0===this._stateValues.body.wordSpacing&&(this._stateValues.body.wordSpacing=""),s&&s.suffix&&!isNaN(1*s.size)&&(this._body.style.wordSpacing=1*s.size+t+s.suffix);let n=this._common.getFormattedDim(getComputedStyle(this._body).letterSpacing);void 0===this._stateValues.body.letterSpacing&&(this._stateValues.body.letterSpacing=""),n&&n.sufix&&!isNaN(1*n.size)&&(this._body.style.letterSpacing=1*n.size+t+n.sufix),this._stateValues.textToSpeech&&this.textToSpeech("Text Spacing "+(e?"Increased":"Decreased"))}}speechToText(){("webkitSpeechRecognition"in window||"SpeechRecognition"in window)&&(this._recognition=new(window.SpeechRecognition||window.webkitSpeechRecognition),this._recognition.continuous=!0,this._recognition.interimResults=!0,this._recognition.onstart=()=>{this._body.classList.add("_access-listening")},this._recognition.onend=()=>{this._body.classList.remove("_access-listening")},this._recognition.onresult=e=>{let t="";if(void 0!==e.results){for(let s=e.resultIndex;s{this._isReading=!1};let n=t.speechSynthesis.getVoices(),i=!1;for(let e=0;e{let n=document.createElement("canvas"),i=new Image;n.style.position="fixed",n.style.top="0",n.style.left="0",n.style.opacity="0",n.style.transform="scale(0.05)",i.crossOrigin="anonymous",i.onload=()=>c(this,void 0,void 0,(function*(){document.body.appendChild(n);const e=n.getContext("2d");let t;n.width=i.naturalWidth,n.height=i.naturalHeight,e.clearRect(0,0,n.width,n.height),e.drawImage(i,0,0);try{t=n.toDataURL("image/png")}catch(e){}s(t),n.remove()})),i.onerror=()=>{s(t.DEFAULT_PIXEL)},i.src=e}))}listen(){"object"==typeof this._recognition&&"function"==typeof this._recognition.stop&&this._recognition.stop(),this._speechToTextTarget=window.event.target,this.speechToText()}read(e){try{(e=window.event||e||arguments[0])&&e.preventDefault&&(e.preventDefault(),e.stopPropagation())}catch(e){}let t=Array.prototype.slice.call(document.querySelectorAll("._access-menu *"));for(const s in t)if(t[s]===window.event.target&&e instanceof MouseEvent)return;e instanceof KeyboardEvent&&(e.shiftKey&&"Tab"===e.key||"Tab"===e.key)?this.textToSpeech(window.event.target.innerText):this._isReading?(window.speechSynthesis.cancel(),this._isReading=!1):this.textToSpeech(window.event.target.innerText)}runHotkey(e){"toggleMenu"===e?this.toggleMenu():this.menuInterface.hasOwnProperty(e)&&this._options.modules[e]&&this.menuInterface[e](!1)}toggleMenu(){const e=this._menu.classList.contains("close");this.options.animations&&this.options.animations.buttons&&setTimeout((()=>{this._menu.querySelector("ul").classList.toggle("before-collapse")}),e?500:10),this._menu.classList.toggle("close"),this.options.icon.tabIndex=e?0:-1,this._menu.childNodes.forEach((t=>{t.tabIndex=0,t.hasChildNodes()&&(t.tabIndex=-1,t.childNodes.forEach((t=>{t.tabIndex=e?0:-1})))}))}invoke(e,t){"function"==typeof this.menuInterface[e]&&this.menuInterface[e](void 0,t)}build(){this._stateValues={underlineLinks:!1,textToSpeech:!1,bigCursor:!1,readingGuide:!1,speechRate:1,body:{},html:{}},this._body=document.body||document.getElementsByTagName("body")[0],this._html=document.documentElement||document.getElementsByTagName("html")[0],this.options.textEmlMode&&this.initFontSize(),this.options.suppressCssInjection||this.injectCss(),this._icon=this.injectIcon(),this._menu=this.injectMenu(),this.injectTts(),setTimeout((()=>{this.addListeners(),this.disableUnsupportedModulesAndSort()}),10),this.options.hotkeys.enabled&&(document.onkeydown=e=>{let t=Object.entries(this.options.hotkeys.keys).find((function(t){let s=!0;for(var n=0;n{this.toggleMenu()}),!1),this._icon.addEventListener("keyup",(e=>{"Enter"===e.key&&this.toggleMenu()}),!1),setTimeout((()=>{this._icon.style.opacity="1"}),10),this.updateReadGuide=e=>{let t=0;t="touchmove"===e.type?e.changedTouches[0].clientY:e.y,document.getElementById("access_read_guide_bar").style.top=t-(parseInt(this.options.guide.height.replace("px",""))+5)+"px"},this.menuInterface=new o(this),this.options.session.persistent&&this.setSessionFromCache()}updateReadGuide(e){let t=0;t="touchmove"===e.type?e.changedTouches[0].clientY:e.y,document.getElementById("access_read_guide_bar").style.top=t-(parseInt(this.options.guide.height.replace("px",""))+5)+"px"}resetIfDefined(e,t,s){void 0!==e&&(t[s]=e)}onChange(e){e&&this.options.session.persistent&&this.saveSession()}saveSession(){this._storage.set("_accessState",this.sessionState)}setSessionFromCache(){let e=this._storage.get("_accessState");if(e){if(e.textSize){let t=e.textSize;if(t>0)for(;t--;)this.alterTextSize(!0);else for(;t++;)this.alterTextSize(!1)}if(e.textSpace){let t=e.textSpace;if(t>0)for(;t--;)this.alterTextSpace(!0);else for(;t++;)this.alterTextSpace(!1)}if(e.lineHeight){let t=e.lineHeight;if(t>0)for(;t--;)this.alterLineHeight(!0);else for(;t--;)this.alterLineHeight(!1)}e.invertColors&&this.menuInterface.invertColors(),e.grayHues&&this.menuInterface.grayHues(),e.underlineLinks&&this.menuInterface.underlineLinks(),e.bigCursor&&this.menuInterface.bigCursor(),e.readingGuide&&this.menuInterface.readingGuide(),this.sessionState=e}}destroy(){this._common.deployedObjects.getAll().forEach(((e,t)=>{const s=document.querySelector(t);s&&s.parentElement.removeChild(s)}))}}r.CSS_CLASS_NAME="_access-main-css",r.init=e=>{console.warn('"Accessibility.init()" is deprecated! Please use "new Accessibility()" instead'),new r(e)};const l=r;window&&(window.Accessibility=l)})(),n})())); //# sourceMappingURL=main.bundle.js.map \ No newline at end of file diff --git a/dist/main.js b/dist/main.js index cd9e83f..c958488 100644 --- a/dist/main.js +++ b/dist/main.js @@ -238,8 +238,7 @@ var Accessibility = /*#__PURE__*/function () { speechToText: 'speech to text', disableAnimations: 'disable animations', increaseLineHeight: 'increase line height', - decreaseLineHeight: 'decrease line height', - screenReader: 'screen reader' + decreaseLineHeight: 'decrease line height' }, textPixelMode: false, textEmlMode: true, diff --git a/src/interfaces/accessibility.interface.ts b/src/interfaces/accessibility.interface.ts index dfe8155..31e58fd 100644 --- a/src/interfaces/accessibility.interface.ts +++ b/src/interfaces/accessibility.interface.ts @@ -155,7 +155,6 @@ export interface IAccessibilityMenuLabelsOptions { disableAnimations: string; increaseLineHeight: string; decreaseLineHeight: string; - screenReader: string; } export interface IAccessibilityAnimationsOptions { diff --git a/src/main.ts b/src/main.ts index fccd822..52a04d9 100644 --- a/src/main.ts +++ b/src/main.ts @@ -229,8 +229,7 @@ export class Accessibility implements IAccessibility { speechToText: 'speech to text', disableAnimations: 'disable animations', increaseLineHeight: 'increase line height', - decreaseLineHeight: 'decrease line height', - screenReader: 'screen reader' + decreaseLineHeight: 'decrease line height' }, textPixelMode: false, textEmlMode: true,