PageSourceSearch

https://www.tabakhero.de/theme/8a4bf1e3ac4590f5ff8a1944ef093c77/js…/tcinn-a11y-toolbar-app.js?1791188713

js tabakhero.de collected 2026-10-07 23:08:07 UTC 25,111 bytes, 1 lines download raw bytes

1(()=>{"use strict";var t={406:t=>{var e=function(t){var e;return!!t&&"object"==typeof t&&"[object RegExp]"!==(e=Object.prototype.toString.call(t))&&"[object Date]"!==e&&t.$$typeof!==o},o="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function i(t,e){return!1!==e.clone&&e.isMergeableObject(t)?a(Array.isArray(t)?[]:{},t,e):t}function n(t,e,o){return t.concat(e).map(function(t){return i(t,o)})}function r(t){return Object.keys(t).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[])}function s(t,e){try{return e in t}catch(t){return!1}}function a(t,o,l){(l=l||{}).arrayMerge=l.arrayMerge||n,l.isMergeableObject=l.isMergeableObject||e,l.cloneUnlessOtherwiseSpecified=i;var c,d,u=Array.isArray(o);return u!==Array.isArray(t)?i(o,l):u?l.arrayMerge(t,o,l):(d={},(c=l).isMergeableObject(t)&&r(t).forEach(function(e){d[e]=i(t[e],c)}),r(o).forEach(function(e){(!s(t,e)||Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))&&(s(t,e)&&c.isMergeableObject(o[e])?d[e]=(function(t,e){if(!e.customMerge)return a;var o=e.customMerge(t);return"function"==typeof o?o:a})(e,c)(t[e],o[e],c):d[e]=i(o[e],c))}),d)}a.all=function(t,e){if(!Array.isArray(t))throw Error("first argument should be an array");return t.reduce(function(t,o){return a(t,o,e)},{})},t.exports=a}},e={};function o(i){var n=e[i];if(void 0!==n)return n.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,o),r.exports}(()=>{o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e}})(),(()=>{o.d=(t,e)=>{for(var i in e)o.o(e,i)&&!o.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})}})(),(()=>{o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e)})(),(()=>{var t=o(406),e=o.n(t);class i{static ucFirst(t){return t.charAt(0).toUpperCase()+t.slice(1)}static lcFirst(t){return t.charAt(0).toLowerCase()+t.slice(1)}static toDashCase(t){return t.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase()}static toLowerCamelCase(t,e){let o=i.toUpperCamelCase(t,e);return i.lcFirst(o)}static toUpperCamelCase(t,e){return e?t.split(e).map(t=>i.ucFirst(t.toLowerCase())).join(""):i.ucFirst(t.toLowerCase())}static parsePrimitive(t){try{return/^\d+(.|,)\d+$/.test(t)&&(t=t.replace(",",".")),JSON.parse(t)}catch(e){return t.toString()}}}class n{static isNode(t){return"object"==typeof t&&null!==t&&(t===document||t===window||t instanceof Node)}static hasAttribute(t,e){if(!n.isNode(t))throw Error("The element must be a valid HTML Node!");return"function"==typeof t.hasAttribute&&t.hasAttribute(e)}static getAttribute(t,e){let o=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(o&&!1===n.hasAttribute(t,e))throw Error('The required property "'.concat(e,'" does not exist!'));if("function"!=typeof t.getAttribute){if(o)throw Error("This node doesn't support the getAttribute function!");return}return t.getAttribute(e)}static getDataAttribute(t,e){let o=!(arguments.length>2)||void 0===arguments[2]||arguments[2],r=e.replace(/^data(|-)/,""),s=i.toLowerCamelCase(r,"-");if(!n.isNode(t)){if(o)throw Error("The passed node is not a valid HTML Node!");return}if(void 0===t.dataset){if(o)throw Error("This node doesn't support the dataset attribute!");return}let a=t.dataset[s];if(void 0===a){if(o)throw Error('The required data attribute "'.concat(e,'" does not exist on ').concat(t,"!"));return a}return i.parsePrimitive(a)}static querySelector(t,e){let o=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(o&&!n.isNode(t))throw Error("The parent node is not a valid HTML Node!");let i=t.querySelector(e)||!1;if(o&&!1===i)throw Error('The required element "'.concat(e,'" does not exist in parent node!'));return i}static querySelectorAll(t,e){let o=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(o&&!n.isNode(t))throw Error("The parent node is not a valid HTML Node!");let i=t.querySelectorAll(e);if(0===i.length&&(i=!1),o&&!1===i)throw Error('At least one item of "'.concat(e,'" must exist in parent node!'));return i}}class r{publish(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=new CustomEvent(t,{detail:e,cancelable:o});return this.el.dispatchEvent(i),i}subscribe(t,e){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this,n=t.split("."),r=o.scope?e.bind(o.scope):e;if(o.once&&!0===o.once){let e=r;r=function(o){i.unsubscribe(t),e(o)}}return this.el.addEventListener(n[0],r),this.listeners.push({splitEventName:n,opts:o,cb:r}),!0}unsubscribe(t){let e=t.split(".");return this.listeners=this.listeners.reduce((t,o)=>([...o.splitEventName].sort().toString()===e.sort().toString()?this.el.removeEventListener(o.splitEventName[0],o.cb):t.push(o),t),[]),!0}
1reset(){return this.listeners.forEach(t=>{this.el.removeEventListener(t.splitEventName[0],t.cb)}),this.listeners=[],!0}get el(){return this._el}set el(t){this._el=t}get listeners(){return this._listeners}set listeners(t){this._listeners=t}constructor(t=document){this._el=t,t.$emitter=this,this._listeners=[]}}class s{init(){throw Error('The "init" method for the plugin "'.concat(this._pluginName,'" is not defined.'))}update(){}_init(){this._initialized||(this.init(),this._initialized=!0)}_update(){this._initialized&&this.update()}_mergeOptions(t){let o=i.toDashCase(this._pluginName),r=n.getDataAttribute(this.el,"data-".concat(o,"-config"),!1),s=n.getAttribute(this.el,"data-".concat(o,"-options"),!1),a=[this.constructor.options,this.options,t];r&&a.push(window.PluginConfigManager.get(this._pluginName,r));try{s&&a.push(JSON.parse(s))}catch(t){throw console.error(this.el),Error('The data attribute "data-'.concat(o,'-options" could not be parsed to json: ').concat(t.message))}return e().all(a.filter(t=>t instanceof Object&&!(t instanceof Array)).map(t=>t||{}))}_registerInstance(){window.PluginManager.getPluginInstancesFromElement(this.el).set(this._pluginName,this),window.PluginManager.getPlugin(this._pluginName,!1).get("instances").push(this)}_getPluginName(t){return t||(t=this.constructor.name),t}constructor(t,e={},o=!1){if(!n.isNode(t))throw Error("There is no valid element given.");this.el=t,this.$emitter=new r(this.el),this._pluginName=this._getPluginName(o),this.options=this._mergeOptions(e),this._initialized=!1,this._registerInstance(),this._init()}}window.PluginManager.register("TcinnA11yToolbarPlugin",class extends s{init(){if(this.toolbar=document.getElementById("tcinn-a11y-toolbar"),!this.toolbar)return;setTimeout(()=>{this.toolbar.classList.add("visible")},100);let t="tcinn-a11y-overlay";if(!document.getElementById(t)){let e=document.createElement("div");e.id=t,document.body.appendChild(e)}this.t=window.TcinnA11ySnippets||{},this.contrastLevel=this.toolbar.dataset.contrastLevel||"AA",this.excludedClasses=(this.toolbar.dataset.excludedClasses||"").split(",").map(t=>t.trim()).filter(t=>""!==t),this.threshold="AAA"===this.contrastLevel?7:4.5,this.minFontPx=12,this.showButton=document.getElementById("show-toolbar-button"),this.closeButton=document.getElementById("close-toolbar-button"),this.cookieGroup=this.toolbar.dataset.cookieGroup,this.cookieConsentMap={basic:"cookie-preference",comfort:"youtube-video"},this.consentCookieName=this.cookieConsentMap[this.cookieGroup],this.storageKey="tcinnA11y.contrastActive",this.contrastActive="true"===localStorage.getItem(this.storageKey),this.modifiedContrastElements=new Set,this.placeholderStyleElement=null,this.svgExcludeContainers=[".twt-communities-list"],this.a11yToggles=[{btnId:"underline-links-toggle-button",bodyClass:"tcinn-a11y-underline-links",storageKey:"tcinnA11y.underlineLinks"},{btnId:"readable-font-toggle-button",bodyClass:"tcinn-a11y-readable-font",storageKey:"tcinnA11y.readableFont"},{btnId:"no-animations-toggle-button",bodyClass:"tcinn-a11y-no-animations",storageKey:"tcinnA11y.noAnimations"},{btnId:"large-cursor-toggle-button",bodyClass:"tcinn-a11y-large-cursor",storageKey:"tcinnA11y.largeCursor"},{btnId:"inverted-toggle-button",bodyClass:"tcinn-a11y-inverted",storageKey:"tcinnA11y.inverted"},{btnId:"monochrome-toggle-button",bodyClass:"tcinn-a11y-monochrome",storageKey:"tcinnA11y.monochrome"},{btnId:"desaturate-toggle-button",bodyClass:"tcinn-a11y-desaturate",storageKey:"tcinnA11y.desaturate"},{btnId:"saturate-toggle-button",bodyClass:"tcinn-a11y-saturate",storageKey:"tcinnA11y.saturate"},{btnId:"headings-outline-toggle-button",bodyClass:"tcinn-a11y-headings-outline",storageKey:"tcinnA11y.headingsOutline"},{btnId:"reading-guide-toggle-button",bodyClass:"tcinn-a11y-reading-guide",storageKey:"tcinnA11y.readingGuide"}],this.a11yToggles.push({btnId:"reset-toggle-button",handler:"resetAll"}),this.initToolbarLogic(),this._initToolbarPlacement()}initToolbarLogic(){this.initToolbarToggle(),this.initFontSizeToggle(),this.initContrastToggle(),this.initA11yGenericToggles(),this.initNoImagesToggle(),this.initUniversalAccessibilityObserver(),"1"===this.toolbar.dataset.dev&&this.initDevTools(),this.initAriaSync()}_initToolbarPlacement(){let t="has-moved",e=this.toolbar.parentNode,o=this.toolbar.nextSibling,i=document.createElement("div");i.id="tcinn-a11y-toolbar-placeholder",e.insertBefore(i,o);let n=()=>{let o=document.querySelector("footer.footer-main");window.innerWidth<992?o&&this.toolbar.parentNode!==o.parentNode&&(o.insertAdjacentElement("afterend",this.toolbar),this.toolbar.classList.add(t)):this.toolbar.parentNode!==e&&(e.insertBefore(this.toolbar,i),this.toolbar.classList.remove(t))};window.addEventListener("resize",n),n()}initToolbarToggle(){this.closeButton&&this.showButton&&(this.closeButton.addEventListener("click",this.toggleToolbar.bind(this)),this.showButton.addEventListener("click",this.toggleToolbar.bind(this)),"false"===localStorage.getItem("tcinnA11y.toolbarVisible")&&(this.toolbar.classList.add("hidden"),this.showButton.classList.remove("hidden")))}initFontSizeToggle(){let t=document.getElementById("font-toggle-button");t&&(t.addEventListener("click",this.toggleFontSize.bind(this)),"true"===localStorage.getItem("tcinnA11y.fontSize16")&&(t.classList.add("active"),this.setFontSize()))}initContrastToggle(){let t=document.getElementById("contrast-toggle-button");t&&(this.contrastActive&&(t.classList.add("active"),this.adjustPageTextContrast(),this.applyPlaceholderContrast()),t.addEventListener("click",()=>{this.contrastActive=!this.contrastActive,this.safeSetItem(this.storageKey,this.contrastActive),t.classList.toggle("active",this.contrastActive),this.contrastActive?(this.adjustPageTextContrast(),this.applyPlaceholderContrast()):(this.revertPlaceholderContrast(),this.revertContrastAdjustments())}))}
1initA11yGenericToggles(){this.a11yToggles.forEach(t=>{let{btnId:e,bodyClass:o,storageKey:i,handler:n}=t,r=document.getElementById(e);if(r){if(n){r.addEventListener("click",this[n].bind(this));return}"true"===localStorage.getItem(i)&&(document.body.classList.add(o),r.classList.add("active"),this.runSpecial(i,!0)),r.addEventListener("click",()=>{let t=!r.classList.contains("active");r.classList.toggle("active",t),document.body.classList.toggle(o,t),this.safeSetItem(i,t?"true":"false"),this.runSpecial(i,t)})}})}initNoImagesToggle(){let t=document.getElementById("no-images-toggle-button");if(!t)return;let e="true"===localStorage.getItem("tcinnA11y.noImagesActive");e&&(t.classList.add("active"),this.runNoImages(!0)),t.addEventListener("click",()=>{e=!e,this.safeSetItem("tcinnA11y.noImagesActive",e?"true":"false"),t.classList.toggle("active",e),this.runNoImages(e)})}toggleToolbar(){let t=this.toolbar.classList.toggle("hidden");this.showButton.classList.toggle("hidden",!t),this.safeSetItem("tcinnA11y.toolbarVisible",t?"false":"true")}isExcluded(t){if(!t)return!1;if("tcinn-a11y-toolbar"===t.id)return!0;for(;t;){if(t.classList){for(let e of this.excludedClasses)if(t.classList.contains(e))return!0}t=t.parentElement}return!1}setFontSize(){document.querySelectorAll("*").forEach(t=>{let e=parseFloat(window.getComputedStyle(t).fontSize);e>0&&!t.closest("#tcinn-a11y-toolbar, #show-toolbar-button")&&e<16&&(t.hasAttribute("data-original-font-size")||t.setAttribute("data-original-font-size",t.style.fontSize||""),t.style.fontSize="16px")})}resetFontSize(){document.querySelectorAll("[data-original-font-size]").forEach(t=>{t.style.fontSize=t.getAttribute("data-original-font-size"),t.removeAttribute("data-original-font-size")})}toggleFontSize(){let t=document.getElementById("font-toggle-button");t&&(t.classList.contains("active")?(this.resetFontSize(),t.classList.remove("active"),this.safeRemoveItem("tcinnA11y.fontSize16")):(this.setFontSize(),t.classList.add("active"),this.safeSetItem("tcinnA11y.fontSize16","true")))}adjustPageTextContrast(){let t=document.querySelectorAll("body *"),e=new Map;t.forEach(t=>{for(let e of this.svgExcludeContainers)if(t.closest(e))return;if(this.isExcluded(t))return;let o=this.getEffectiveBackgroundColorWithFallback(t);o&&(e.set(t,o),Array.from(t.children).forEach(t=>{if(!e.has(t)){let i=window.getComputedStyle(t),n=this.parseColor(i.backgroundColor);n&&0!==n.a&&(0!==n.r||0!==n.g||0!==n.b||0!==n.a)||e.set(t,o)}}))}),t.forEach(t=>{for(let e of this.svgExcludeContainers)if(t.closest(e))return;if(this.isExcluded(t))return;let o=window.getComputedStyle(t);if("hidden"===o.visibility||"none"===o.display||0===parseFloat(o.fontSize))return;let i=t.classList&&t.classList.contains("icon")&&t.querySelector("svg");if(!(t.innerText&&t.innerText.trim()||i))return;let n=e.get(t);if(!n){let o=t.parentElement;for(;o&&!n;)n=e.get(o),o=o.parentElement}if(n||(n=this.getEffectiveBackgroundColorWithFallback(t)),!n)return;let r=this.parseColor(o.color)||this.parseRGB(o.color);if(r&&this.getContrastRatio(r,n)<this.threshold){let e=this.adjustTextContrast(r,n,this.threshold);e&&(t.dataset.originalColor||(t.dataset.originalColor=o.color,this.modifiedContrastElements.add(t)),t.style.color=e)}})}getEffectiveBackgroundColorWithFallback(t){let e=t,o=new Set;for(;e&&e!==document.documentElement&&!o.has(e);){o.add(e);let t=window.getComputedStyle(e),i=t.backgroundImage;if(i&&"none"!==i&&i.includes("gradient")){let t=this.getAverageColorFromGradient(i);if(t)return t}let n=this.parseColor(t.backgroundColor);if(n&&null!==n.a&&n.a>0)return{r:n.r,g:n.g,b:n.b};for(let t of["::before","::after"])try{let o=getComputedStyle(e,t);if(!o)continue;let i=o.backgroundImage;if(i&&"none"!==i&&i.includes("gradient")){let t=this.getAverageColorFromGradient(i);if(t)return t}let n=this.parseColor(o.backgroundColor);if(n&&null!==n.a&&n.a>0)return{r:n.r,g:n.g,b:n.b}}catch(t){return null}e=e.parentElement}return window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?{r:0,g:0,b:0}:{r:255,g:255,b:255}}extractColorsFromGradient(t){return t.match(/(#[0-9a-fA-F]{3,8}|rgba?\([^)]+\)|hsla?\([^)]+\))/g)||[]}
1hexToRgb(t){return(3===(t=t.replace("#","")).length&&(t=t.split("").map(t=>t+t).join("")),6!==t.length)?null:{r:parseInt(t.substring(0,2),16),g:parseInt(t.substring(2,4),16),b:parseInt(t.substring(4,6),16)}}parseRGB(t){if(!t)return null;let e=this.parseColor(t);return e?{r:e.r,g:e.g,b:e.b}:null}revertContrastAdjustments(){this.modifiedContrastElements.forEach(t=>{t.dataset.originalColor&&(t.style.color=t.dataset.originalColor,delete t.dataset.originalColor),t.dataset.originalBackgroundColor&&(t.style.backgroundColor=t.dataset.originalBackgroundColor,delete t.dataset.originalBackgroundColor)}),this.modifiedContrastElements.clear()}adjustTextContrast(t,e,o){let i=this.getLuminance(e);this.getLuminance(t);let n=i>.5,r=null,s=0,a=0,l=this.rgbToHsl(t.r,t.g,t.b);for(let t=.01;t<=.99&&!(++a>100);t+=.01){let i=n?t:1-t,a=this.hslToRgb(l.h,l.s,i),c={r:Math.round(a.r),g:Math.round(a.g),b:Math.round(a.b)},d=this.getContrastRatio(c,e);if(d>=o)return"rgb(".concat(c.r,", ").concat(c.g,", ").concat(c.b,")");d>s&&(s=d,r="rgb(".concat(c.r,", ").concat(c.g,", ").concat(c.b,")"))}let c=n?{r:0,g:0,b:0}:{r:255,g:255,b:255};for(let i=.1;i<=1;i+=.1){let n={r:Math.round(t.r+(c.r-t.r)*i),g:Math.round(t.g+(c.g-t.g)*i),b:Math.round(t.b+(c.b-t.b)*i)},a=this.getContrastRatio(n,e);if(a>=o)return"rgb(".concat(n.r,", ").concat(n.g,", ").concat(n.b,")");a>s&&(s=a,r="rgb(".concat(n.r,", ").concat(n.g,", ").concat(n.b,")"))}let d=this.getContrastRatio({r:0,g:0,b:0},e),u=this.getContrastRatio({r:255,g:255,b:255},e);return d>=o&&d>=u?"rgb(0, 0, 0)":u>=o?"rgb(255, 255, 255)":r}getEffectiveBackgroundColor(t){let e=window.getComputedStyle(t);if(e.backgroundImage&&"none"!==e.backgroundImage)return t.parentElement?this.getEffectiveBackgroundColor(t.parentElement):"rgb(255, 255, 255)";let o=e.backgroundColor;return this.isTransparent(o)&&t.parentElement?this.getEffectiveBackgroundColor(t.parentElement):o||"rgb(255, 255, 255)"}isTransparent(t){return!t||(t.startsWith("rgba")?0===parseFloat(t.split(",")[3]):"transparent"===t)}getLuminance(t){let e=["r","g","b"].map(e=>{let o=t[e]/255;return o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4)});return .2126*e[0]+.7152*e[1]+.0722*e[2]}getContrastRatio(t,e){let o=this.getLuminance(t),i=this.getLuminance(e);return(Math.max(o,i)+.05)/(Math.min(o,i)+.05)}rgbToHsl(t,e,o){t/=255,e/=255,o/=255;let i=Math.max(t,e,o),n=Math.min(t,e,o),r,s,a=(i+n)/2;if(i===n)r=s=0;else{let l=i-n;switch(s=a>.5?l/(2-i-n):l/(i+n),i){case t:r=(e-o)/l+(e<o?6:0);break;case e:r=(o-t)/l+2;break;case o:r=(t-e)/l+4}r/=6}return{h:r,s,l:a}}hslToRgb(t,e,o){let i,n,r;if(0===e)i=n=r=o;else{let s=(t,e,o)=>(o<0&&(o+=1),o>1&&(o-=1),o<1/6)?t+(e-t)*6*o:o<.5?e:o<2/3?t+(e-t)*(2/3-o)*6:t,a=o<.5?o*(1+e):o+e-o*e,l=2*o-a;i=s(l,a,t+1/3),n=s(l,a,t),r=s(l,a,t-1/3)}return{r:Math.round(255*i),g:Math.round(255*n),b:Math.round(255*r)}}runSpecial(t,e){"noImages"===t&&this.runNoImages(e),"largeCursor"===t&&this.runLargeCursor(e),"tcinnA11y.readingGuide"===t&&this.runReadingGuide(e)}moveCursorOverlay(t){let e=document.getElementById("tcinn-a11y-large-cursor-overlay");e&&(e.style.left="".concat(t.pageX,"px"),e.style.top="".concat(t.pageY,"px"))}runLargeCursor(t){let e="tcinn-a11y-large-cursor-overlay",o=document.getElementById(e);t?o||((o=document.createElement("div")).id=e,document.body.appendChild(o),document.addEventListener("mousemove",this.moveCursorOverlay)):o&&(document.removeEventListener("mousemove",this.moveCursorOverlay),o.remove())}highlightEmptyLinks(){document.querySelectorAll("a").forEach(t=>{if(t.closest("#tcinn-a11y-toolbar")||this.isExcluded(t))return;let e=t.textContent.trim(),o=!!t.getAttribute("aria-label"),i=!!t.querySelector("img, svg");e||o||i||(t.style.boxShadow="0 0 0 3px purple",t.title="\uD83D\uDED1 ".concat(window.TcinnA11ySnippets.emptyLinks))})}highlightInputsWithoutLabel(){document.querySelectorAll("input, textarea, select").forEach(t=>{let e=t.id;e&&document.querySelector('label[for="'.concat(e,'"]'))||(t.style.boxShadow="0 0 0 3px teal",t.title="⚠️ ".concat(window.TcinnA11ySnippets.inputsNoLabel))})}highlightMissingLangAttr(){let t=document.documentElement;t.hasAttribute("lang")&&""!==t.getAttribute("lang").trim()||(t.style.boxShadow="inset 0 0 0 5px crimson",t.title="❗ ".concat(window.TcinnA11ySnippets.missingLang))}highlightImgsWithoutAlt(){document.querySelectorAll("img").forEach(t=>{t.alt&&""!==t.alt.trim()||(t.style.boxShadow="0 0 0 4px red",t.title="\uD83D\uDED1 ".concat(window.TcinnA11ySnippets.imgsNoAlt))})}highlightSmallFonts(){document.querySelectorAll("body *").forEach(t=>{if(t.closest("#tcinn-a11y-toolbar")||this.isExcluded(t))return;let e=parseFloat(getComputedStyle(t).fontSize),o=t.textContent.trim();e&&e<this.minFontPx&&o&&(t.style.boxShadow="0 0 0 3px orange",t.title="⚠️ ".concat(window.TcinnA11ySnippets.smallFonts," (").concat(e.toFixed(1),"px)"))})}highlightLowContrastText(){document.querySelectorAll("body *").forEach(t=>{if(t.closest("#tcinn-a11y-toolbar")||this.isExcluded(t))return;let e=window.getComputedStyle(t),o=e.backgroundImage,i=this.parseRGB(e.color);if(!i||/url\(/.test(o)||t.querySelector("img"))return;
1let n=this.parseRGB(this.getEffectiveBackgroundColor(t));if(!n)return;let r=this.getContrastRatio(i,n);r<this.threshold&&(t.style.boxShadow="0 0 0 2px blue",t.title="❗ ".concat(window.TcinnA11ySnippets.lowContrast," (").concat(r.toFixed(2),":1)"))})}runNoImages(t){document.querySelectorAll("img").forEach(e=>{if(e.closest(".js-magnifier-container")){e.style.visibility=t?"hidden":"";return}if(t){e.style.display="none";let t=document.createElement("div");t.className="tcinn-a11y-no-img-placeholder",t.textContent=e.alt||"",e.__a11yPh=t,e.parentNode.insertBefore(t,e.nextSibling)}else e.style.display="",e.__a11yPh&&(e.__a11yPh.remove(),delete e.__a11yPh)})}applyPlaceholderContrast(){if(this.placeholderStyleElement)return;let t=document.createElement("style");t.id="tcinn-a11y-placeholder-styles";let e=window.getComputedStyle(document.body).backgroundColor,o=this.parseRGB(e)||{r:255,g:255,b:255},i=this.getContrastRatio({r:255,g:255,b:255},o)>=this.threshold?"rgb(255,255,255)":"rgb(0,0,0)";t.textContent="\n            input::placeholder,\n            textarea::placeholder {\n            color: ".concat(i," !important;\n            opacity: 1 !important;\n            }\n        "),document.head.appendChild(t),this.placeholderStyleElement=t}revertPlaceholderContrast(){this.placeholderStyleElement&&(this.placeholderStyleElement.remove(),this.placeholderStyleElement=null)}hasConsentCookie(){return document.cookie.split("; ").some(t=>t.split("=")[0]===this.consentCookieName)}safeSetItem(t,e){("basic"===this.cookieGroup||this.hasConsentCookie())&&localStorage.setItem(t,e)}safeRemoveItem(t){("basic"===this.cookieGroup||this.hasConsentCookie())&&localStorage.removeItem(t)}initAriaSync(){document.querySelectorAll('#tcinn-a11y-toolbar [role="switch"]').forEach(t=>{t.setAttribute("aria-checked",t.classList.contains("active")),t.addEventListener("click",()=>{t.setAttribute("aria-checked",t.classList.contains("active"))})})}runReadingGuide(t){let e="tcinn-a11y-reading-guide-line",o=document.getElementById(e);t?(o||((o=document.createElement("div")).id=e,Object.assign(o.style,{position:"fixed",left:"0",width:"100vw",height:"2px",background:"var(--bs-focus-ring-color)",pointerEvents:"none",zIndex:"9999"}),document.body.appendChild(o)),document.addEventListener("mousemove",this.moveReadingGuide)):(document.removeEventListener("mousemove",this.moveReadingGuide),o&&o.remove())}moveReadingGuide(t){let e=document.getElementById("tcinn-a11y-reading-guide-line");e&&(e.style.top="".concat(t.clientY,"px"))}initDevTools(){this.highlightImgsWithoutAlt(),this.highlightSmallFonts(),this.highlightLowContrastText(),this.highlightEmptyLinks(),this.highlightInputsWithoutLabel(),this.highlightMissingLangAttr()}resetAll(){this.resetFontSize();let t=document.getElementById("font-toggle-button");t&&t.classList.remove("active"),this.safeRemoveItem("tcinnA11y.fontSize16"),this.revertPlaceholderContrast(),this.revertContrastAdjustments();let e=document.getElementById("contrast-toggle-button");e&&e.classList.remove("active"),this.safeRemoveItem(this.storageKey),this.runNoImages(!1);let o=document.getElementById("no-images-toggle-button");o&&o.classList.remove("active"),this.safeRemoveItem("tcinnA11y.noImagesActive"),this.runReadingGuide(!1);let i=document.getElementById("reading-guide-toggle-button");i&&i.classList.remove("active"),this.safeRemoveItem("tcinnA11y.readingGuide"),this.a11yToggles.forEach(t=>{let{btnId:e,bodyClass:o,storageKey:i,handler:n}=t;if(n)return;document.body.classList.remove(o),this.safeRemoveItem(i);let r=document.getElementById(e);r&&r.classList.remove("active")})}initUniversalAccessibilityObserver(){new MutationObserver(t=>{let e=!1;for(let n of t){for(let t of n.addedNodes){var o,i;if(1===t.nodeType&&(((o=t.matches)===null||void 0===o?void 0:o.call(t,'.modal, .offcanvas, .dropdown, .plugin, [class*="popup"], [data-modal], [data-plugin]'))||((i=t.querySelectorAll)===null||void 0===i?void 0:i.call(t,"*").length)>10)){e=!0;break}}if(e)break}e&&(this.contrastActive&&this.adjustPageTextContrast(),"true"===localStorage.getItem("tcinnA11y.fontSize16")&&this.setFontSize())}).observe(document.body,{childList:!0,subtree:!0})}getAverageColorFromGradient(t){try{let e=this.extractColorsFromGradient(t);if(0===e.length)return null;let o=[];for(let t of e){let e=null;t.startsWith("#")?e=this.hexToRgb(t):t.startsWith("rgb")&&(e=this.parseColor(t)),e&&o.push(e)}if(0===o.length)return null;let i=Math.round(o.reduce((t,e)=>t+e.r,0)/o.length),n=Math.round(o.reduce((t,e)=>
1t+e.g,0)/o.length),r=Math.round(o.reduce((t,e)=>t+e.b,0)/o.length);return{r:i,g:n,b:r}}catch(t){return console.error("Error processing gradient:",t),null}}parseColor(t){let e=t.match(/rgba?\(\s*(\d{1,3})(?:\s*,\s*|\s+)(\d{1,3})(?:\s*,\s*|\s+)(\d{1,3})(?:\s*(?:\/|,)\s*([\d.]+))?\s*\)/i);if(e)return{r:+e[1],g:+e[2],b:+e[3],a:null==e[4]?1:+e[4]};let o=t.match(/^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i);if(o){let t=o[1];(3===t.length||4===t.length)&&(t=t.split("").map(t=>t+t).join(""));let e=parseInt(t.slice(0,2),16);return{r:e,g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16),a:8===t.length?parseInt(t.slice(6,8),16)/255:1}}return null}},"#tcinn-a11y-toolbar")})()})();

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