ally-widget 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ally-widget.min.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Ally Widget v1.0.
|
|
2
|
+
* Ally Widget v1.0.3
|
|
3
3
|
* Released under the MIT License
|
|
4
4
|
*/
|
|
5
|
-
var AllyWidget=function(){"use strict";const t={primaryColor:"#1976d2",primaryColorLight:"#42a5f5",primaryColorDark:"#0d47a1",backgroundColor:"#f5f7fa",textColor:"#222222",textColorInverted:"#ffffff",buttonSize:"52px",cardBackground:"#ffffff",borderColor:"#d1d5db",focusRingColor:"#1976d2",hoverColor:"#42a5f5",activeColor:"#0d47a1",successColor:"#2e7d32",errorColor:"#c62828",warningColor:"#f57c00",headerHeight:"54px",borderRadius:"8px",buttonBorderRadius:"0.4rem",menuPosition:"right",zIndex:1e5,focusBorderWidth:"3px",focusOutlineOffset:"2px"},e={accessibility:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path d="M423.5-743.5Q400-767 400-800t23.5-56.5Q447-880 480-880t56.5 23.5Q560-833 560-800t-23.5 56.5Q513-720 480-720t-56.5-23.5ZM360-80v-520q-60-5-122-15t-118-25l20-80q78 21 166 30.5t174 9.5q86 0 174-9.5T820-720l20 80q-56 15-118 25t-122 15v520h-80v-240h-80v240h-80Z"/></svg>',accessibilityVariants:{default:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path d="M423.5-743.5Q400-767 400-800t23.5-56.5Q447-880 480-880t56.5 23.5Q560-833 560-800t-23.5 56.5Q513-720 480-720t-56.5-23.5ZM360-80v-520q-60-5-122-15t-118-25l20-80q78 21 166 30.5t174 9.5q86 0 174-9.5T820-720l20 80q-56 15-118 25t-122 15v520h-80v-240h-80v240h-80Z"/></svg>',"icon-2":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path d="M423.5-743.5Q400-767 400-800t23.5-56.5Q447-880 480-880t56.5 23.5Q560-833 560-800t-23.5 56.5Q513-720 480-720t-56.5-23.5ZM360-80v-520H120v-80h720v80H600v520h-80v-240h-80v240h-80Z"/></svg>',"icon-3":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path d="M423.5-743.5Q400-767 400-800t23.5-56.5Q447-880 480-880t56.5 23.5Q560-833 560-800t-23.5 56.5Q513-720 480-720t-56.5-23.5ZM680-80v-200H480q-33 0-56.5-23.5T400-360v-240q0-33 23.5-56.5T480-680q24 0 41.5 10.5T559-636q55 66 99.5 90.5T760-520v80q-53 0-107-23t-93-55v138h120q33 0 56.5 23.5T760-300v220h-80Zm-280 0q-83 0-141.5-58.5T200-280q0-72 45.5-127T360-476v82q-35 14-57.5 44.5T280-280q0 50 35 85t85 35q39 0 69.5-22.5T514-240h82q-14 69-69 114.5T400-80Z"/></svg>',"icon-4":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path d="M320-80q-83 0-141.5-58.5T120-280q0-83 58.5-141.5T320-480v80q-50 0-85 35t-35 85q0 50 35 85t85 35q50 0 85-35t35-85h80q0 83-58.5 141.5T320-80Zm360-40v-200H440q-44 0-68-37.5t-6-78.5l74-164h-91l-24 62-77-22 28-72q9-23 29.5-35.5T350-680h208q45 0 68.5 36.5T632-566l-66 146h114q33 0 56.5 23.5T760-340v220h-80Zm-96.5-603.5Q560-747 560-780t23.5-56.5Q607-860 640-860t56.5 23.5Q720-813 720-780t-23.5 56.5Q673-700 640-700t-56.5-23.5Z"/></svg>'},largePointer:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px"><path d="m320-410 79-110h170L320-716v306ZM551-80 406-392 240-160v-720l560 440H516l144 309-109 51ZM399-520Z"/></svg>',pauseMotion:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="m791-55-91-91q-49 32-104.5 49T480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 17-115.5T146-700l-91-91 57-57 736 736-57 57ZM480-160q43 0 83.5-11t78.5-33L204-642q-22 38-33 78.5T160-480q0 133 93.5 226.5T480-160Zm334-100-58-58q22-38 33-78.5t11-83.5q0-133-93.5-226.5T480-800q-43 0-83.5 11T318-756l-58-58q49-32 104.5-49T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 60-17 115.5T814-260ZM537-537ZM423-423Z"/></svg>',readingAid:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="M320-80v-440l-80-120v-240h480v240l-80 120v440H320Zm160-260q-25 0-42.5-17.5T420-400q0-25 17.5-42.5T480-460q25 0 42.5 17.5T540-400q0 25-17.5 42.5T480-340ZM320-760h320v-40H320v40Zm320 80H320v16l80 120v384h160v-384l80-120v-16ZM480-480Z"/></svg>',boldText:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="M272-200v-560h221q65 0 120 40t55 111q0 51-23 78.5T602-491q25 11 55.5 41t30.5 90q0 89-65 124.5T501-200H272Zm121-112h104q48 0 58.5-24.5T566-372q0-11-10.5-35.5T494-432H393v120Zm0-228h93q33 0 48-17t15-38q0-24-17-39t-44-15h-95v109Z"/></svg>',lineSpacing:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="M240-160 80-320l56-56 64 62v-332l-64 62-56-56 160-160 160 160-56 56-64-62v332l64-62 56 56-160 160Zm240-40v-80h400v80H480Zm0-240v-80h400v80H480Zm0-240v-80h400v80H480Z"/></svg>',letterSpacing:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="M320-80 160-240l160-160 57 56-64 64h334l-63-64 56-56 160 160L640-80l-57-56 64-64H313l63 64-56 56ZM200-480v-400h80v400h-80Zm240 0v-400h80v400h-80Zm240 0v-400h80v400h-80Z"/></svg>',dyslexiaFont:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="m131-252 165-440h79l165 440h-76l-39-112H247l-40 112h-76Zm139-176h131l-64-182h-4l-63 182Zm395 186q-51 0-81-27.5T554-342q0-44 34.5-72.5T677-443q23 0 45 4t38 11v-12q0-29-20.5-47T685-505q-23 0-42 9.5T610-468l-47-35q24-29 54.5-43t68.5-14q69 0 103 32.5t34 97.5v178h-63v-37h-4q-14 23-38 35t-53 12Zm12-54q35 0 59.5-24t24.5-56q-14-8-33.5-12.5T689-393q-32 0-50 14t-18 37q0 20 16 33t40 13Z"/></svg>',highlightLinks:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="M440-280H280q-83 0-141.5-58.5T80-480q0-83 58.5-141.5T280-680h160v80H280q-50 0-85 35t-35 85q0 50 35 85t85 35h160v80ZM320-440v-80h320v80H320Zm200 160v-80h160q50 0 85-35t35-85q0-50-35-85t-85-35H520v-80h160q83 0 141.5 58.5T880-480q0 83-58.5 141.5T680-280H520Z"/></svg>',highlightTitle:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="M320-280q17 0 28.5-11.5T360-320q0-17-11.5-28.5T320-360q-17 0-28.5 11.5T280-320q0 17 11.5 28.5T320-280Zm0-160q17 0 28.5-11.5T360-480q0-17-11.5-28.5T320-520q-17 0-28.5 11.5T280-480q0 17 11.5 28.5T320-440Zm0-160q17 0 28.5-11.5T360-640q0-17-11.5-28.5T320-680q-17 0-28.5 11.5T280-640q0 17 11.5 28.5T320-600Zm120 320h240v-80H440v80Zm0-160h240v-80H440v80Zm0-160h240v-80H440v80ZM200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h560v-560H200v560Zm0-560v560-560Z"/></svg>',contrast:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="m480-260 60-60h100v-100l60-60-60-60v-100H540l-60-60-60 60H320v100l-60 60 60 60v100h100l60 60Zm0-100v-240q50 0 85 35t35 85q0 50-35 85t-85 35ZM160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h640q33 0 56.5 23.5T880-720v480q0 33-23.5 56.5T800-160H160Zm0-80h640v-480H160v480Zm0 0v-480 480Z"/></svg>',darkContrast:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="M484-80q-84 0-157.5-32t-128-86.5Q144-253 112-326.5T80-484q0-146 93-257.5T410-880q-18 99 11 193.5T521-521q71 71 165.5 100T880-410q-26 144-138 237T484-80Zm0-80q88 0 163-44t118-121q-86-8-163-43.5T464-465q-61-61-97-138t-43-163q-77 43-120.5 118.5T160-484q0 135 94.5 229.5T484-160Zm-20-305Z"/></svg>',lightContrast:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="M440-800v-120h80v120h-80Zm0 760v-120h80v120h-80Zm360-400v-80h120v80H800Zm-760 0v-80h120v80H40Zm708-252-56-56 70-72 58 58-72 70ZM198-140l-58-58 72-70 56 56-70 72Zm564 0-70-72 56-56 72 70-58 58ZM212-692l-72-70 58-58 70 72-56 56Zm268 452q-100 0-170-70t-70-170q0-100 70-170t170-70q100 0 170 70t70 170q0 100-70 170t-170 70Zm0-80q67 0 113.5-46.5T640-480q0-67-46.5-113.5T480-640q-67 0-113.5 46.5T320-480q0 67 46.5 113.5T480-320Zm0-160Z"/></svg>',invertColors:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="M480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-64-24.5-122.5T706-706L254-254q45 45 103.5 69.5T480-160Zm0-160v-60h200v60H480ZM320-500h60v-80h80v-60h-80v-80h-60v80h-80v60h80v80Z"/></svg>',saturation:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="M480-120q-133 0-226.5-92.5T160-436q0-66 25-122t69-100l226-222 226 222q44 44 69 100t25 122q0 131-93.5 223.5T480-120Zm0-80v-568L310-600q-35 33-52.5 74.5T240-436q0 97 70 166.5T480-200Z"/></svg>',lowSaturation:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="M480-120q-133 0-226.5-92T160-436q0-65 25-121.5T254-658l226-222 226 222q44 44 69 100.5T800-436q0 132-93.5 224T480-120ZM242-400h474q12-72-13.5-123T650-600L480-768 310-600q-27 26-53 77t-15 123Z"/></svg>',highSaturation:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="M480-80q-82 0-155-31.5t-127.5-86Q143-252 111.5-325T80-480q0-83 32.5-156t88-127Q256-817 330-848.5T488-880q80 0 151 27.5t124.5 76q53.5 48.5 85 115T880-518q0 115-70 176.5T640-280h-74q-9 0-12.5 5t-3.5 11q0 12 15 34.5t15 51.5q0 50-27.5 74T480-80Zm0-400Zm-220 40q26 0 43-17t17-43q0-26-17-43t-43-17q-26 0-43 17t-17 43q0 26 17 43t43 17Zm120-160q26 0 43-17t17-43q0-26-17-43t-43-17q-26 0-43 17t-17 43q0 26 17 43t43 17Zm200 0q26 0 43-17t17-43q0-26-17-43t-43-17q-26 0-43 17t-17 43q0 26 17 43t43 17Zm120 160q26 0 43-17t17-43q0-26-17-43t-43-17q-26 0-43 17t-17 43q0 26 17 43t43 17ZM480-160q9 0 14.5-5t5.5-13q0-14-15-33t-15-57q0-42 29-67t71-25h70q66 0 113-38.5T800-518q0-121-92.5-201.5T488-800q-136 0-232 93t-96 227q0 133 93.5 226.5T480-160Z"/></svg>',reset:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="M440-122q-121-15-200.5-105.5T160-440q0-66 26-126.5T260-672l57 57q-38 34-57.5 79T240-440q0 88 56 155.5T440-202v80Zm80 0v-80q87-16 143.5-83T720-440q0-100-70-170t-170-70h-3l44 44-56 56-140-140 140-140 56 56-44 44h3q134 0 227 93t93 227q0 121-79.5 211.5T520-122Z"/></svg>',close:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41Z"/></svg>',increase:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2Z"/></svg>',decrease:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2Z"/></svg>',arrowBack:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="currentColor"><path d="M400-80 0-480l400-400 71 71-329 329 329 329-71 71Z"/></svg>',adjustFontSize:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2 4v3h5v12h3V7h5V4H2m19 5h-9v3h3v7h3v-7h3V9Z"/></svg>',language:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="currentColor"><path d="M480-80q-82 0-155-31.5t-127.5-86Q143-252 111.5-325T80-480q0-83 31.5-155.5t86-127Q252-817 325-848.5T480-880q83 0 155.5 31.5t127 86q54.5 54.5 86 127T880-480q0 82-31.5 155t-86 127.5q-54.5 54.5-127 86T480-80Zm0-82q26-36 45-75t31-83H404q12 44 31 83t45 75Zm-104-16q-18-33-31.5-68.5T322-320H204q29 50 72.5 87t99.5 55Zm208 0q56-18 99.5-55t72.5-87H638q-9 38-22.5 73.5T584-178ZM170-400h136q-3-20-4.5-39.5T300-480q0-21 1.5-40.5T306-560H170q-5 20-7.5 39.5T160-480q0 21 2.5 40.5T170-400Zm216 0h188q3-20 4.5-39.5T580-480q0-21-1.5-40.5T574-560H386q-3 20-4.5 39.5T380-480q0 21 1.5 40.5T386-400Zm268 0h136q5-20 7.5-39.5T800-480q0-21-2.5-40.5T790-560H654q3 20 4.5 39.5T660-480q0 21-1.5 40.5T654-400Zm-16-240h118q-29-50-72.5-87T584-782q18 33 31.5 68.5T638-640Zm-234 0h152q-12-44-31-83t-45-75q-26 36-45 75t-31 83Zm-200 0h118q9-38 22.5-73.5T376-782q-56 18-99.5 55T204-640Z"/></svg>',hideImages:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="m840-234-80-80v-446H314l-80-80h526q33 0 56.5 23.5T840-760v526ZM792-56l-64-64H200q-33 0-56.5-23.5T120-200v-528l-64-64 56-56 736 736-56 56ZM240-280l120-160 90 120 33-44-283-283v447h447l-80-80H240Zm297-257ZM424-424Z"/></svg>',accessibilityReport:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h168q13-36 43.5-58t68.5-22q38 0 68.5 22t43.5 58h168q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h560v-560H200v560Zm80-80h280v-80H280v80Zm0-160h400v-80H280v80Zm0-160h400v-80H280v80Zm221.5-198.5Q510-807 510-820t-8.5-21.5Q493-850 480-850t-21.5 8.5Q450-833 450-820t8.5 21.5Q467-790 480-790t21.5-8.5ZM200-200v-560 560Z"/></svg>',annotations:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v268q-19-9-39-15.5t-41-9.5v-243H200v560h242q3 22 9.5 42t15.5 38H200Zm0-120v40-560 243-3 280Zm80-40h163q3-21 9.5-41t14.5-39H280v80Zm0-160h244q32-30 71.5-50t84.5-27v-3H280v80Zm0-160h400v-80H280v80ZM720-40q-83 0-141.5-58.5T520-240q0-83 58.5-141.5T720-440q83 0 141.5 58.5T920-240q0 83-58.5 141.5T720-40Zm-20-80h40v-100h100v-40H740v-100h-40v100H600v40h100v100Z"/></svg>',textToSpeech:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="M560-131v-82q90-26 145-100t55-168q0-94-55-168T560-749v-82q124 28 202 125.5T840-481q0 127-78 224.5T560-131ZM120-360v-240h160l200-200v640L280-360H120Zm440 40v-322q47 22 73.5 66t26.5 96q0 51-26.5 94.5T560-320ZM400-606l-86 86H200v80h114l86 86v-252ZM300-480Z"/></svg>',highContrast:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="M480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93v640Z"/></svg>',simplifyLayout:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="M760-360v-80H200v80h560Zm0-160v-80H200v80h560Zm0-160v-80H200v80h560ZM200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm560-80v-80H200v80h560Z"/></svg>'},n={ALL:["","*:not(.material-icons,.acc-menu,.acc-menu *)"],LINKS:["a[href]"],HEADERS:["h1","h2","h3","h4","h5","h6",".wsite-headline",".wsite-content-title"],TEXT:["h1","h2","h3","h4","h5","h6",".wsite-headline",".wsite-content-title","img","p","i","svg","a","button:not(.acc-btn)","label","li","ol"]},i="body > *:not(.acc-container):not(.acc-rg-container):not(#acc-skip-link)",a={en:{"Accessibility Menu":"Accessibility Menu","Reset settings":"Reset settings","Reset All Settings":"Reset All Settings",Close:"Close","Content Adjustments":"Content Adjustments","Adjust Font Size":"Adjust Font Size","Highlight Title":"Highlight Title","Highlight Links":"Highlight Links","Readable Font":"Readable Font","Color Adjustments":"Color Adjustments","Invert Colors":"Invert Colors","Light Contrast":"Light Contrast","Dark Contrast":"Dark Contrast","High Contrast":"High Contrast","High Saturation":"High Saturation","Low Saturation":"Low Saturation",Monochrome:"Monochrome",Tools:"Tools","Reading Guide":"Reading Guide","Stop Animations":"Stop Animations","Big Cursor":"Big Cursor","Increase Font Size":"Increase Font Size","Decrease Font Size":"Decrease Font Size","Letter Spacing":"Letter Spacing","Line Height":"Line Height","Font Weight":"Font Weight","Dyslexia Font":"Dyslexia Font",Language:"Language","Open Accessibility Menu":"Open Accessibility Menu","Hide Images":"Hide Images","Skip to accessibility menu":"Skip to accessibility menu","Accessibility Report":"Accessibility Report","Run Accessibility Check":"Run Accessibility Check","Loading...":"Loading...","Analyzing page...":"Analyzing page...",Critical:"Critical",Serious:"Serious",Moderate:"Moderate",Minor:"Minor","Violations Found":"Violations Found","No Issues Found":"No Issues Found",Element:"Element",Issue:"Issue","How to Fix":"How to Fix","Close Report":"Close Report","Passed Tests":"Passed Tests","Items Need Review":"Items Need Review",Annotations:"Annotations","Text to Speech":"Text to Speech","Text to Speech On":"Text to Speech On","Text to Speech Off":"Text to Speech Off","Simplify Layout":"Simplify Layout",Play:"Play",Pause:"Pause",Stop:"Stop","Loading voice...":"Loading voice...","Reading...":"Reading...","All Languages":"All Languages","Search language":"Search language","Font Size":"Font Size",Contrast:"Contrast",Saturation:"Saturation",Accessibility:"Accessibility"},ne:{"Accessibility Menu":"पहुँच मेनु","Reset settings":"सेटिङ रिसेट गर्नुहोस्","Reset All Settings":"सबै सेटिङ रिसेट गर्नुहोस्",Close:"बन्द गर्नुहोस्","Content Adjustments":"सामग्री समायोजन","Adjust Font Size":"फन्ट आकार समायोजन","Highlight Title":"शीर्षक हाइलाइट","Highlight Links":"लिङ्क हाइलाइट","Readable Font":"पठनीय फन्ट","Color Adjustments":"रङ समायोजन","Invert Colors":"रङ उल्टाउनुहोस्","Light Contrast":"हल्का कन्ट्रास्ट","Dark Contrast":"गाढा कन्ट्रास्ट","High Contrast":"उच्च कन्ट्रास्ट","High Saturation":"उच्च संतृप्तता","Low Saturation":"कम संतृप्तता",Monochrome:"एकरङी",Tools:"उपकरणहरू","Reading Guide":"पठन सहायक","Stop Animations":"एनिमेसन रोक्नुहोस्","Big Cursor":"ठूलो कर्सर","Increase Font Size":"फन्ट आकार बढाउनुहोस्","Decrease Font Size":"फन्ट आकार घटाउनुहोस्","Letter Spacing":"अक्षर दूरी","Line Height":"लाइन उचाइ","Font Weight":"फन्ट वजन","Dyslexia Font":"डिस्लेक्सिया फन्ट",Language:"भाषा","Open Accessibility Menu":"पहुँच मेनु खोल्नुहोस्","Hide Images":"तस्बिर लुकाउनुहोस्","Skip to accessibility menu":"पहुँच मेनुमा जानुहोस्","Accessibility Report":"पहुँच प्रतिवेदन","Run Accessibility Check":"पहुँच जाँच चलाउनुहोस्","Loading...":"लोड हुँदैछ...","Analyzing page...":"पृष्ठ विश्लेषण हुँदैछ...",Critical:"गम्भीर",Serious:"साँघुरो",Moderate:"मध्यम",Minor:"सामान्य","Violations Found":"उल्लंघनहरू फेला परे","No Issues Found":"कुनै समस्या फेला परेन",Element:"तत्व",Issue:"समस्या","How to Fix":"कसरी ठीक गर्ने","Close Report":"प्रतिवेदन बन्द गर्नुहोस्","Passed Tests":"पास भएका परीक्षणहरू","Items Need Review":"समीक्षा आवश्यक वस्तुहरू",Annotations:"टिप्पणीहरू","Text to Speech":"पाठ वाचन","Text to Speech On":"पाठ वाचन सक्रिय","Text to Speech Off":"पाठ वाचन निष्क्रिय","Simplify Layout":"लेआउट सरल बनाउनुहोस्",Play:"प्ले",Pause:"पज",Stop:"रोक्नुहोस्","Loading voice...":"आवाज लोड हुँदैछ...","Reading...":"पढिँदैछ...","All Languages":"सबै भाषाहरू","Search language":"भाषा खोज्नुहोस्","Font Size":"फन्ट आकार",Contrast:"कन्ट्रास्ट",Saturation:"संतृप्तता",Accessibility:"पहुँचयोग्यता"}},o=[{code:"en",label:"English (English)"},{code:"ne",label:"नेपाली (Nepali)"}],r={storageAvailable(){try{const t="__ally_test__";return localStorage.setItem(t,t),localStorage.removeItem(t),!0}catch{return!1}},fetchCookie(t){const e=t+"=";try{const t=decodeURIComponent(document.cookie);return t.split(";").map(t=>t.trim()).find(t=>t.startsWith(e))?.substring(e.length)||"{}"}catch(t){return console.warn("[AllyWidget] Error reading cookie:",t),"{}"}},storeCookie(t,e,n){try{const i=new Date;i.setTime(i.getTime()+24*n*60*60*1e3);const a="expires="+i.toUTCString(),o="https:"===window.location.protocol;document.cookie=t+"="+e+";"+a+";path=/;SameSite=Strict"+(o?";Secure":"")}catch(t){console.warn("[AllyWidget] Error setting cookie:",t)}},getSavedLanguage(){try{if(this.storageAvailable()){const t=localStorage.getItem(this.storageKey);if(t){const e=JSON.parse(t);if(e.lang)return e.lang}}const t=this.fetchCookie(this.storageKey);if(t&&""!==t){const e=JSON.parse(t);if(e.lang)return e.lang}}catch{}return null},getBrowserLanguage(){if("undefined"==typeof navigator)return"en";const t=this.supportedLanguages.map(t=>t.code),e=navigator.languages?[...navigator.languages]:[navigator.language||"en"];for(const n of e){const e=n.split("-")[0].toLowerCase();if(t.includes(e))return e}return"en"},getDefaultLanguage(){const t=this.getSavedLanguage();if(t){if(this.supportedLanguages.map(t=>t.code).includes(t))return t}return this.getBrowserLanguage()},isDevMode(){if("undefined"==typeof window)return!1;try{const t=new URLSearchParams(window.location.search);return"true"===t.get("ally-dev")||"true"===t.get("acc-dev")}catch{return!1}},getDataAttributeOptions(){const t={};if("undefined"==typeof document)return t;const e=["lang","position","offset","size","icon"],n=(e,n)=>{if(null!=n&&""!==n)switch(e){case"lang":{const e=String(n).trim();e&&(t.lang=e);break}case"position":{const e=String(n).trim();e&&(t.position=e);break}case"offset":{const e=this.normalizeOffset(n);e&&(t.offset=e);break}case"size":{const e=this.normalizeButtonSize(n);e&&(t.size=e);break}case"icon":{const e=String(n).trim();e&&(t.icon=e);break}}},i=[];return document.currentScript&&i.push(document.currentScript),document.querySelectorAll("script[data-ally-lang],script[data-ally-position],script[data-ally-offset],script[data-ally-size],script[data-ally-icon]").forEach(t=>{i.includes(t)||i.push(t)}),i.forEach(t=>{t&&e.forEach(e=>{const i=`data-ally-${e}`,a=`data-acc-${e}`,o=t.getAttribute?t.getAttribute(i)||t.getAttribute(a):null;n(e,o)})}),e.forEach(e=>{if(void 0!==t[e])return;const i=document.querySelector(`[data-ally-${e}]`)||document.querySelector(`[data-acc-${e}]`);i&&n(e,i.getAttribute(`data-ally-${e}`)||i.getAttribute(`data-acc-${e}`))}),t},normalizeOffset(t){if(!t&&0!==t)return;let e=[];e=Array.isArray(t)?t:"string"==typeof t?t.split(/[, ]+/):[t];const n=e.map(t=>{const e=Number(t);return Number.isFinite(e)?Math.round(e):null}).filter(t=>null!==t);return n.length?(1===n.length&&n.push(n[0]),[n[0],void 0!==n[1]?n[1]:n[0]]):void 0},normalizeButtonSize(t){const e=this.widgetTheme?.buttonSize||"52px";if("number"==typeof t&&Number.isFinite(t))return`${Math.max(24,Math.round(t))}px`;if("string"==typeof t){const n=t.trim();if(!n)return e;if(/^\d+(\.\d+)?(px|em|rem|%)$/i.test(n))return n;const i=Number(n);return Number.isFinite(i)?`${Math.max(24,Math.round(i))}px`:n}return e},toggleDisplay(t,e){if(t)try{t.style.display=void 0===e?"none"===t.style.display?"block":"none":e?"block":"none"}catch(t){console.warn("[AllyWidget] Error toggling element:",t)}},isSystemControlledPreference(t){const e=this.widgetConfig?.systemDefaults||{};return Object.prototype.hasOwnProperty.call(e,t)},hasExplicitStatePreference(t){const e=this.widgetConfig?.states||{};return!!Object.prototype.hasOwnProperty.call(e,t)&&!this.isSystemControlledPreference(t)},hasExplicitColorFilterPreference(){const t=this.widgetConfig?.states||{},e=this.widgetConfig?.systemDefaults||{};return(Array.isArray(this.colorFilterKeys)?this.colorFilterKeys:[]).some(n=>Object.prototype.hasOwnProperty.call(t,n)&&!Object.prototype.hasOwnProperty.call(e,n))},updateState(t,e={}){const n=e.source||"user",i=this.widgetConfig.states||{},a=this.widgetConfig.systemDefaults||{},o={...i,...t},r={...a},s=Object.keys(t||{});"system"===n?s.forEach(e=>{r[e]=t[e]}):s.forEach(t=>{Object.prototype.hasOwnProperty.call(r,t)&&delete r[t]});const c={...this.widgetConfig,states:o,systemDefaults:r};return this.saveConfig(c),c},saveConfig(t){this.widgetConfig={...this.widgetConfig,...t};const e=JSON.stringify(this.widgetConfig);if(this.storageAvailable())try{localStorage.setItem(this.storageKey,e)}catch{this.storeCookie(this.storageKey,e,365)}else this.storeCookie(this.storageKey,e,365)},retrieveState(t){return this.widgetConfig.states?this.widgetConfig.states[t]:void 0},loadConfig(t=!0){if(t)return this.widgetConfig;const e=this.fetchSavedConfig();if(e)try{this.widgetConfig=JSON.parse(e)}catch(t){console.warn("[AllyWidget] Error parsing config:",t),this.widgetConfig={}}return this.widgetConfig},fetchSavedConfig(){if(this.storageAvailable())try{const t=localStorage.getItem(this.storageKey);if(t)return t}catch(t){console.warn("[AllyWidget] localStorage failed, falling back to cookies:",t)}const t=this.fetchCookie(this.storageKey);return t&&""!==t?t:"{}"}};const s=["/* Base styles */\n.acc-menu {\n position: fixed;\n left: var(--acc-menu-inline-gap, 12px);\n top: var(--acc-menu-block-gap, 12px);\n bottom: var(--acc-menu-block-gap, 12px);\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);\n opacity: 1;\n transition: 0.3s;\n z-index: var(--acc-widget-z-index, 100000);\n overflow: hidden;\n background: var(--acc-bg-color);\n width: min(430px, calc(100vw - (var(--acc-menu-inline-gap, 12px) * 2)));\n line-height: 1.5;\n font-size: 16px;\n height: auto;\n letter-spacing: 0.015em;\n color: var(--acc-text-color);\n --acc-content-inline-padding: 14px;\n --acc-menu-inline-gap: clamp(8px, 2.3vw, 18px);\n --acc-menu-block-gap: clamp(10px, 2.2vh, 20px);\n border-radius: 16px;\n box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2);\n}\n\n/* Ensure all elements inherit proper colors for accessibility */\n.acc-menu * {\n color: var(--acc-text-color);\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;\n padding: 0;\n margin: 0;\n line-height: 1.5 !important;\n letter-spacing: normal !important;\n}\n\n/* Header section */\n.acc-menu-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0 var(--acc-content-inline-padding);\n height: var(--acc-header-height);\n font-weight: 700 !important;\n background-color: var(--acc-primary-color) !important;\n}\n\n.acc-menu-title {\n display: flex;\n align-items: center;\n gap: 10px;\n font-size: 18px !important;\n color: var(--acc-text-color-inverted) !important;\n font-weight: bold;\n}\n\n.acc-menu-title .acc-label {\n color: var(--acc-text-color-inverted) !important;\n}\n\n.acc-menu-title-icon {\n width: 30px;\n height: 30px;\n border-radius: 8px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n\n.acc-menu-title-icon svg {\n fill: var(--acc-text-color-inverted) !important;\n width: 18px !important;\n height: 18px !important;\n min-width: 18px !important;\n min-height: 18px !important;\n max-width: 18px !important;\n max-height: 18px !important;\n}\n\n.acc-header-back {\n display: flex;\n align-items: center;\n}\n\n.acc-back-btn {\n display: flex;\n align-items: center;\n gap: 8px;\n background: transparent;\n border: none;\n padding: 8px;\n cursor: pointer;\n font-size: 16px;\n font-weight: 600;\n color: var(--acc-text-color-inverted) !important;\n transition: background-color 0.2s ease;\n border-radius: 4px;\n visibility: hidden;\n}\n\n.acc-back-btn > span {\n color: var(--acc-text-color-inverted) !important;\n}\n\n.acc-back-btn.visible {\n visibility: visible;\n}\n\n.acc-back-btn:hover {\n background-color: rgba(255, 255, 255, 0.18);\n}\n\n.acc-back-btn:focus {\n outline: 2px solid var(--acc-text-color-inverted);\n outline-offset: 1px;\n}\n\n.acc-back-btn svg {\n fill: var(--acc-text-color-inverted) !important;\n width: 24px !important;\n height: 24px !important;\n}\n\n.acc-menu-title-dynamic {\n display: none !important;\n}\n\n.acc-menu-title-dynamic.visible {\n display: block !important;\n}\n\n.acc-menu-title-default {\n display: block !important;\n}\n\n.acc-menu-title-default.hidden {\n display: none !important;\n}\n\n.acc-menu-header svg {\n fill: var(--acc-text-color-inverted) !important;\n width: 28px !important;\n height: 28px !important;\n min-width: 28px !important;\n min-height: 28px !important;\n max-width: 28px !important;\n max-height: 28px !important;\n}\n\n.acc-menu-header > div {\n display: flex;\n align-items: center;\n}\n\n/* Interactive elements */\n.acc-menu-header div[role=\"button\"] {\n cursor: pointer;\n padding: 8px;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 36px;\n height: 36px;\n transition: background-color 0.2s ease;\n}\n\n.acc-menu-header div[role=\"button\"]:hover {\n background-color: rgba(255, 255, 255, 0.18);\n}\n\n.acc-menu-header div[role=\"button\"]:focus {\n outline: 2px solid var(--acc-text-color-inverted);\n outline-offset: 1px;\n}\n\n.acc-menu-header .acc-header-actions {\n display: flex;\n align-items: center;\n}\n\n.acc-language-container {\n margin: 0 var(--acc-content-inline-padding) 24px;\n}\n\n.acc-lang-details {\n border: 1px solid rgba(0, 0, 0, 0.1);\n border-radius: var(--acc-button-border-radius);\n background: var(--acc-card-bg);\n}\n\n.acc-lang-summary {\n list-style: none;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n padding: 12px 14px;\n cursor: pointer;\n border-radius: var(--acc-button-border-radius);\n}\n\n.acc-lang-summary::-webkit-details-marker {\n display: none;\n}\n\n.acc-lang-summary::marker {\n content: '';\n}\n\n.acc-lang-summary-main {\n display: flex;\n align-items: center;\n gap: 10px;\n min-width: 0;\n}\n\n.acc-lang-current-label {\n font-size: 16px !important;\n font-weight: 600 !important;\n}\n\n.acc-lang-summary:hover {\n background-color: rgba(25, 118, 210, 0.06);\n}\n\n.acc-lang-summary:focus {\n outline: var(--acc-focus-outline-width) solid var(--acc-focus-ring-color);\n outline-offset: var(--acc-focus-outline-offset);\n}\n\n.acc-lang-summary-arrow {\n width: 10px;\n height: 10px;\n border-right: 2px solid var(--acc-text-color);\n border-bottom: 2px solid var(--acc-text-color);\n transform: rotate(-45deg);\n transition: transform 0.2s ease;\n}\n\n.acc-lang-details[open] .acc-lang-summary-arrow {\n transform: rotate(45deg);\n}\n\n.acc-lang-details[open] .acc-lang-summary {\n border-bottom: 1px solid var(--acc-border-color);\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n}\n\n.acc-lang-details-panel {\n padding: 12px 0 8px;\n}\n\n.acc-lang-details-panel .acc-section-title {\n font-size: 16px !important;\n padding: 0 16px 10px;\n}\n\n.acc-lang-flag {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 22px;\n font-size: 18px !important;\n line-height: 1;\n}\n\n.acc-lang-search-wrapper {\n padding: 0 16px 8px;\n}\n\n.acc-lang-search {\n width: 100%;\n padding: 10px 16px;\n border: 1.5px solid var(--acc-border-color);\n border-radius: var(--acc-button-border-radius);\n font-size: 16px;\n background-color: var(--acc-card-bg);\n transition: border-color 0.2s ease;\n}\n\n.acc-lang-search:focus {\n outline: var(--acc-focus-outline-width) solid var(--acc-focus-ring-color);\n outline-offset: var(--acc-focus-outline-offset);\n border-color: var(--acc-primary-color) !important;\n}\n\n.acc-lang-list {\n padding: 6px 8px 12px;\n max-height: 280px;\n overflow-y: auto;\n}\n\n.acc-lang-item {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n width: 100%;\n text-align: left;\n padding: 11px 10px;\n margin-bottom: 4px;\n background-color: transparent;\n border: none;\n border-radius: var(--acc-button-border-radius);\n cursor: pointer;\n font-size: 16px;\n color: var(--acc-text-color);\n transition: background-color 0.12s ease;\n}\n\n.acc-lang-item:hover {\n background-color: rgba(25, 118, 210, 0.06);\n}\n\n.acc-lang-item:focus {\n outline: var(--acc-focus-outline-width) solid var(--acc-focus-ring-color);\n outline-offset: var(--acc-focus-outline-offset);\n}\n\n.acc-lang-item.selected {\n background-color: rgba(25, 118, 210, 0.08);\n font-weight: 600;\n}\n\n.acc-lang-item-main {\n display: flex;\n align-items: center;\n gap: 10px;\n min-width: 0;\n}\n\n.acc-lang-item-label {\n font-size: 16px !important;\n line-height: 1.4 !important;\n}\n\n.acc-icon-check {\n display: inline-block;\n width: 18px;\n height: 18px;\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23886f60' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n background-position: center;\n opacity: 0;\n transition: opacity 0.15s ease;\n}\n\n.acc-lang-item.selected .acc-icon-check {\n opacity: 1;\n}\n\n.acc-menu .acc-lang-select {\n width: 100% !important;\n padding: 0 16px !important;\n font-size: 16px !important;\n font-family: inherit !important;\n font-weight: 600 !important;\n border-radius: var(--acc-button-border-radius) !important;\n background: var(--acc-card-bg) !important;\n border: 1.5px solid var(--acc-border-color) !important;\n min-height: 48px !important;\n max-height: 48px !important;\n height: 48px !important;\n color: var(--acc-text-color) !important;\n -webkit-appearance: none !important;\n -moz-appearance: none !important;\n appearance: none !important;\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0%20-960%20960%20960' width='24px' fill='%231f1f1f'%3E%3Cpath d='M480-344%20240-584l56-56%20184 184%20184-184%2056 56-240 240Z'/%3E%3C/svg%3E\") !important;\n background-repeat: no-repeat !important;\n background-position: right 12px center !important;\n background-size: 20px !important;\n padding-right: 44px !important;\n}\n\n/* Hide default arrows in Firefox and IE */\n.acc-menu .acc-lang-select::-ms-expand {\n display: none !important;\n}\n\n.acc-menu .acc-lang-select:focus {\n outline: var(--acc-focus-outline-width) solid var(--acc-focus-ring-color);\n outline-offset: var(--acc-focus-outline-offset);\n border-color: var(--acc-primary-color) !important;\n}\n\n/* Option grid layout */\n.acc-options-all {\n display: flex;\n flex-direction: column;\n gap: 16px;\n padding: 0 var(--acc-content-inline-padding) 12px;\n}\n\n.acc-option-category {\n display: flex;\n flex-direction: column;\n gap: 10px;\n}\n\n.acc-option-category-interaction {\n padding-bottom: 12px;\n}\n\n.acc-option-category .acc-section-title {\n font-size: 14px !important;\n font-weight: 700 !important;\n letter-spacing: 0.01em !important;\n text-transform: none;\n color: #6b7280 !important;\n padding: 0 2px;\n}\n\n.acc-options {\n display: grid;\n grid-template-columns: repeat(3, minmax(0, 1fr));\n gap: 12px;\n margin: 0;\n}\n\n.acc-options-text {\n grid-template-columns: repeat(3, minmax(0, 1fr));\n}\n\n.acc-options-text-inline {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n}\n\n.acc-btn.acc-text-inline {\n min-height: 54px;\n aspect-ratio: auto;\n flex-direction: row;\n align-items: center;\n justify-content: flex-start;\n text-align: left;\n gap: 10px;\n padding: 12px 14px;\n}\n\n.acc-btn.acc-text-inline .acc-label {\n font-size: 14px !important;\n flex: 1 1 auto;\n min-width: 0;\n}\n\n.acc-btn.acc-text-inline .acc-progress-indicator {\n margin-top: 0;\n margin-left: auto;\n justify-content: flex-end;\n min-width: 24px;\n}\n\n@media only screen and (max-width: 430px) {\n .acc-options-text-inline {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n\n .acc-btn.acc-text-inline {\n min-height: auto;\n aspect-ratio: 11 / 8;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n gap: 6px;\n padding: 10px;\n }\n\n .acc-btn.acc-text-inline .acc-label {\n font-size: 13px !important;\n flex: 0 1 auto;\n }\n\n .acc-btn.acc-text-inline .acc-progress-indicator {\n margin-top: 8px;\n margin-left: 0;\n justify-content: center;\n }\n}\n\n.acc-tts-toggle-container {\n margin: 0;\n}\n\n.acc-text-scale-control {\n width: 100%;\n background: var(--acc-card-bg) !important;\n border: 1px solid rgba(0, 0, 0, 0.1) !important;\n border-radius: var(--acc-border-radius);\n padding: 12px 14px;\n display: flex;\n flex-direction: column;\n gap: 10px;\n}\n\n.acc-text-scale-meta {\n display: flex;\n align-items: center;\n gap: 10px;\n}\n\n.acc-text-scale-icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n\n.acc-text-scale-icon svg {\n width: 22px !important;\n height: 22px !important;\n min-width: 22px !important;\n min-height: 22px !important;\n max-width: 22px !important;\n max-height: 22px !important;\n fill: var(--acc-text-color);\n}\n\n.acc-text-scale-meta .acc-label {\n font-size: 15px !important;\n font-weight: 600 !important;\n}\n\n.acc-text-scale-percent {\n margin-left: auto;\n font-size: 15px !important;\n font-weight: 700 !important;\n color: var(--acc-primary-color) !important;\n}\n\n.acc-text-scale-range {\n width: 100%;\n appearance: none;\n -webkit-appearance: none;\n background: transparent;\n height: 20px;\n cursor: pointer;\n margin: 0;\n}\n\n.acc-text-scale-range:focus {\n outline: none;\n}\n\n.acc-text-scale-range::-webkit-slider-runnable-track {\n width: 100%;\n height: 4px;\n border-radius: 999px;\n background: linear-gradient(\n to right,\n var(--acc-primary-color) 0%,\n var(--acc-primary-color) var(--acc-text-scale-progress, 0%),\n #d8d8d8 var(--acc-text-scale-progress, 0%),\n #d8d8d8 100%\n );\n}\n\n.acc-text-scale-range::-webkit-slider-thumb {\n appearance: none;\n -webkit-appearance: none;\n width: 18px;\n height: 18px;\n border-radius: 50%;\n background: #fff;\n border: 2px solid var(--acc-primary-color);\n margin-top: -7px;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);\n}\n\n.acc-text-scale-range::-moz-range-track {\n width: 100%;\n height: 4px;\n border-radius: 999px;\n background: #d8d8d8;\n}\n\n.acc-text-scale-range::-moz-range-progress {\n height: 4px;\n border-radius: 999px;\n background: var(--acc-primary-color);\n}\n\n.acc-text-scale-range::-moz-range-thumb {\n width: 18px;\n height: 18px;\n border-radius: 50%;\n background: #fff;\n border: 2px solid var(--acc-primary-color);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);\n}\n\n.acc-btn.acc-tts-toggle {\n width: 100%;\n min-height: 54px;\n aspect-ratio: auto;\n flex-direction: row;\n align-items: center;\n justify-content: flex-start;\n gap: 10px;\n text-align: left;\n padding: 12px 76px 12px 14px;\n}\n\n.acc-btn.acc-tts-toggle .acc-label {\n font-size: 15px !important;\n}\n\n.acc-btn.acc-tts-toggle svg {\n width: 22px !important;\n height: 22px !important;\n min-width: 22px !important;\n min-height: 22px !important;\n max-width: 22px !important;\n max-height: 22px !important;\n}\n\n.acc-btn.acc-tts-toggle::before {\n content: \"\";\n position: absolute;\n right: 14px;\n top: 50%;\n width: 44px;\n height: 24px;\n border-radius: 999px;\n transform: translateY(-50%);\n background: #dbd7d2;\n border: 1px solid rgba(0, 0, 0, 0.08);\n}\n\n.acc-btn.acc-tts-toggle::after {\n content: \"\";\n position: absolute;\n right: 38px;\n top: 50%;\n width: 18px;\n height: 18px;\n border-radius: 50%;\n transform: translateY(-50%);\n background: #fff;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);\n}\n\n.acc-btn.acc-tts-toggle.acc-selected::before {\n background: var(--acc-primary-color);\n border-color: var(--acc-primary-color);\n}\n\n.acc-btn.acc-tts-toggle.acc-selected::after {\n right: 16px;\n}\n\n/* Button styling */\n.acc-btn {\n aspect-ratio: 11 / 8;\n border-radius: var(--acc-border-radius);\n padding: 10px;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n text-align: center;\n font-size: 15px !important;\n background: var(--acc-card-bg) !important;\n border: 1px solid rgba(0, 0, 0, 0.1) !important;\n transition: background-color 0.2s ease;\n cursor: pointer;\n word-break: break-word;\n gap: 6px;\n position: relative;\n}\n\n.acc-btn:hover {\n border-color: var(--acc-hover-color) !important;\n border-width: 1px !important;\n box-shadow: inset 0 0 0 1px var(--acc-hover-color);\n}\n\n.acc-btn:focus {\n outline: var(--acc-focus-outline-width) solid var(--acc-focus-ring-color);\n outline-offset: var(--acc-focus-outline-offset);\n border-color: var(--acc-primary-color) !important;\n}\n\n.acc-btn .acc-label, .acc-text-adjust .acc-label div {\n font-size: 13px !important;\n font-weight: 600 !important;\n}\n\n/* SVG icons */\n.acc-text-adjust svg {\n width: 20px !important;\n height: 20px !important;\n min-width: 20px !important;\n min-height: 20px !important;\n max-width: 20px !important;\n max-height: 20px !important;\n}\n\n.acc-btn svg {\n width: 24px !important;\n height: 24px !important;\n min-width: 24px !important;\n min-height: 24px !important;\n max-width: 24px !important;\n max-height: 24px !important;\n fill: var(--acc-text-color);\n}\n\n/* Selected state */\n.acc-btn.acc-selected {\n background-color: var(--acc-primary-color) !important;\n border-color: var(--acc-primary-color) !important;\n}\n\n.acc-btn.acc-selected .acc-progress-dot {\n background-color: rgba(255, 255, 255, 0.5);\n}\n\n.acc-btn.acc-selected .acc-progress-dot.active {\n background-color: var(--acc-text-color-inverted) !important;\n}\n\n.acc-btn.acc-selected svg,\n.acc-btn.acc-selected span,\n.acc-btn.acc-selected .acc-label {\n fill: var(--acc-text-color-inverted) !important;\n color: var(--acc-text-color-inverted) !important;\n}\n\n.acc-btn.acc-tts-toggle.acc-selected {\n background-color: var(--acc-card-bg) !important;\n border-color: rgba(0, 0, 0, 0.1) !important;\n}\n\n.acc-btn.acc-tts-toggle.acc-selected svg,\n.acc-btn.acc-tts-toggle.acc-selected span,\n.acc-btn.acc-tts-toggle.acc-selected .acc-label {\n fill: var(--acc-text-color) !important;\n color: var(--acc-text-color) !important;\n}\n\n/* Footer section */\n.acc-footer {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n background: var(--acc-card-bg);\n padding: 12px 16px;\n display: flex;\n flex-direction: column;\n align-items: stretch;\n gap: 10px;\n border-top: 1px solid var(--acc-border-color);\n z-index: 100;\n overflow: visible;\n}\n\n.acc-footer-meta {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n width: 100%;\n flex-wrap: nowrap;\n}\n\n.acc-footer-reset {\n display: flex;\n width: 100%;\n align-items: center;\n justify-content: center;\n gap: 8px;\n padding: 12px 16px;\n border: none;\n border-radius: var(--acc-button-border-radius);\n background-color: var(--acc-primary-color) !important;\n cursor: pointer;\n transition: background-color 0.2s ease;\n white-space: nowrap;\n}\n\n.acc-footer-reset svg {\n width: 24px !important;\n height: 24px !important;\n fill: var(--acc-text-color-inverted) !important;\n}\n\n.acc-footer-reset .acc-label {\n font-size: 16px !important;\n font-weight: 600 !important;\n color: var(--acc-text-color-inverted) !important;\n line-height: 1.2 !important;\n}\n\n.acc-footer-reset:hover {\n background-color: var(--acc-primary-color-dark) !important;\n}\n\n.acc-footer-reset:focus {\n outline: var(--acc-focus-outline-width) solid var(--acc-focus-ring-color);\n outline-offset: var(--acc-focus-outline-offset);\n}\n\n.acc-footer a {\n font-size: 12px !important;\n text-decoration: none !important;\n color: #6b7280 !important;\n background: transparent !important;\n font-weight: 500 !important;\n padding: 4px 0;\n border-radius: 4px;\n transition: color 0.15s ease;\n letter-spacing: 0.01em !important;\n align-self: center;\n display: inline-flex;\n align-items: center;\n white-space: nowrap;\n line-height: 1.2 !important;\n}\n\n.acc-footer a:hover {\n text-decoration: none !important;\n color: var(--acc-primary-color) !important;\n}\n\n.acc-footer a:focus {\n outline: var(--acc-focus-outline-width) solid var(--acc-focus-ring-color);\n outline-offset: var(--acc-focus-outline-offset);\n}\n\n.acc-footer-lang-toggle {\n display: inline-flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n min-width: 84px;\n padding: 7px 10px 7px 12px;\n border: 1px solid var(--acc-border-color);\n border-radius: var(--acc-button-border-radius);\n background: var(--acc-card-bg);\n cursor: pointer;\n transition: border-color 0.2s ease, background-color 0.2s ease;\n}\n\n.acc-footer-lang-toggle:hover {\n border-color: var(--acc-hover-color);\n}\n\n.acc-footer-lang-toggle:focus {\n outline: var(--acc-focus-outline-width) solid var(--acc-focus-ring-color);\n outline-offset: var(--acc-focus-outline-offset);\n}\n\n.acc-footer-lang-current {\n display: inline-block;\n min-width: 2ch;\n text-align: left;\n font-size: 14px !important;\n font-weight: 600 !important;\n line-height: 1 !important;\n}\n\n.acc-footer-lang-arrow {\n width: 8px;\n height: 8px;\n border-right: 1.5px solid var(--acc-text-color);\n border-bottom: 1.5px solid var(--acc-text-color);\n transform: rotate(45deg) translateY(-1px);\n transition: transform 0.2s ease;\n}\n\n.acc-footer-lang-toggle[aria-expanded=\"true\"] .acc-footer-lang-arrow {\n transform: rotate(-135deg) translateY(-1px);\n}\n\n.acc-lang-modal {\n position: absolute;\n right: 16px;\n bottom: calc(100% + 10px);\n width: min(320px, calc(100% - 32px));\n border: 1px solid var(--acc-border-color);\n border-radius: 14px;\n background: var(--acc-card-bg);\n box-shadow: 0 16px 32px rgba(0, 0, 0, 0.2);\n z-index: 120;\n padding: 10px 0 8px;\n}\n\n.acc-lang-modal[hidden] {\n display: none;\n}\n\n.acc-lang-modal-header {\n padding: 0 14px 8px;\n}\n\n.acc-lang-modal .acc-section-title {\n font-size: 14px !important;\n font-weight: 700 !important;\n color: #6b7280 !important;\n}\n\n.acc-lang-modal .acc-lang-search-wrapper {\n padding: 0 12px 8px;\n}\n\n.acc-lang-modal .acc-lang-list {\n padding: 6px 8px 8px;\n max-height: 240px;\n}\n\n/* Content area */\n.acc-menu-content {\n overflow: auto;\n max-height: calc(100% - 122px);\n padding: 24px 0 36px;\n}\n\n/* Text adjustments */\n.acc-text-adjust {\n background: var(--acc-card-bg);\n padding: 18px 20px;\n margin-bottom: 20px;\n border-radius: var(--acc-border-radius);\n border: 1px solid rgba(0, 0, 0, 0.1);\n}\n\n.acc-text-adjust .acc-label {\n display: flex;\n justify-content: flex-start;\n}\n\n.acc-text-adjust > div {\n display: flex;\n justify-content: space-between;\n margin-top: 20px;\n align-items: center;\n font-size: 16px;\n}\n\n.acc-text-adjust .acc-label div {\n font-size: 16px !important;\n}\n\n.acc-text-adjust div[role=\"button\"] {\n background: var(--acc-bg-color) !important;\n border-radius: 50%;\n width: 40px;\n height: 40px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n border: 1px solid rgba(0, 0, 0, 0.1);\n transition: border-color 0.2s ease;\n}\n\n.acc-text-adjust div[role=\"button\"]:hover {\n border-color: var(--acc-primary-color);\n}\n\n.acc-text-adjust div[role=\"button\"]:focus {\n outline: var(--acc-focus-outline-width) solid var(--acc-focus-ring-color);\n outline-offset: var(--acc-focus-outline-offset);\n}\n\n/* Overlay */\n.acc-overlay {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: calc(var(--acc-widget-z-index, 100000) - 1);\n}\n\n/* Progress indicator */\n.acc-progress-indicator {\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 4px;\n margin-top: 8px;\n height: 8px;\n}\n\n.acc-progress-dot {\n width: 6px;\n height: 6px;\n border-radius: 50%;\n background-color: var(--acc-border-color);\n transition: background-color 0.2s ease;\n}\n\n.acc-progress-dot.active {\n background-color: var(--acc-primary-color);\n}\n\n/* Selected state updates indicator colors */\n.acc-btn.acc-selected .acc-progress-dot.active {\n background-color: var(--acc-bg-color);\n}\n\n/* Responsive adjustments */\n@media only screen and (max-width: 560px) {\n .acc-menu {\n width: calc(100vw - (var(--acc-menu-inline-gap, 8px) * 2));\n }\n}\n\n@media only screen and (max-width: 420px) {\n .acc-options {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 12px;\n }\n .acc-btn {\n padding: 8px;\n }\n}\n\n/* Ensure proper focus visibility for assistive technology */\n@media (prefers-reduced-motion: reduce) {\n .acc-menu,\n .acc-btn,\n .acc-lang-select,\n .acc-progress-dot,\n .acc-menu-header div[role=\"button\"],\n .acc-lang-toggle,\n .acc-back-btn,\n .acc-footer-reset,\n .acc-footer-lang-toggle,\n .acc-footer-lang-arrow,\n .acc-text-adjust div[role=\"button\"] {\n transition: none;\n }\n}\n",' /* Base styles for the widget */\n .acc-widget, .acc-menu {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n font-weight: 400;\n -webkit-font-smoothing: antialiased;\n }\n \n .acc-widget *, .acc-menu * { \n box-sizing: border-box !important; \n }\n \n /* Accessibility toggle button */\n .acc-toggle-btn {\n position: fixed;\n z-index: var(--acc-widget-z-index, 100000);\n left: 30px;\n bottom: 30px;\n border-radius: 50%;\n align-items: center;\n justify-content: center;\n width: var(--acc-button-size, 48px);\n height: var(--acc-button-size, 48px);\n display: flex;\n cursor: pointer;\n outline: none !important;\n border: none !important;\n box-shadow: inset 0 0 0 4px var(--acc-primary-color, #1976d2), inset 0 0 0 6px white, 0 2px 5px rgba(0,0,0,0.2) !important;\n background: var(--acc-primary-color, #1976d2) !important;\n transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;\n overflow: visible;\n }\n \n .acc-toggle-btn .acc-toggle-icon {\n width: 60%;\n height: 60%;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n }\n\n .acc-toggle-btn .acc-toggle-icon svg {\n width: 100%;\n height: 100%;\n fill: white;\n transition: none;\n }\n \n .acc-toggle-btn:hover {\n transform: scale(1.12);\n }\n\n .acc-toggle-btn::before,\n .acc-toggle-btn::after {\n content: "";\n position: absolute;\n top: 50%;\n left: 50%;\n width: 44%;\n height: 2.6px;\n border-radius: 999px;\n background: var(--acc-text-color-inverted, #fff);\n opacity: 0;\n pointer-events: none;\n transform: translate(-50%, -50%) rotate(0deg);\n transition: none;\n }\n\n .acc-toggle-btn[aria-expanded="true"] {\n background: var(--acc-primary-color, #1976d2) !important;\n box-shadow: inset 0 0 0 4px var(--acc-primary-color, #1976d2), inset 0 0 0 6px white, 0 6px 14px rgba(0, 0, 0, 0.24) !important;\n }\n\n .acc-toggle-btn[aria-expanded="true"] .acc-toggle-icon svg {\n opacity: 0;\n }\n\n .acc-toggle-btn[aria-expanded="true"]::before,\n .acc-toggle-btn[aria-expanded="true"]::after {\n opacity: 1;\n }\n\n .acc-toggle-btn[aria-expanded="true"]::before {\n transform: translate(-50%, -50%) rotate(45deg);\n }\n\n .acc-toggle-btn[aria-expanded="true"]::after {\n transform: translate(-50%, -50%) rotate(-45deg);\n }\n\n .acc-violation-bubble {\n position: absolute;\n top: -8px;\n right: -8px;\n min-width: 24px;\n height: 24px;\n border-radius: 12px;\n font-size: 11px;\n font-weight: 700;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 4px;\n pointer-events: none;\n z-index: 1;\n color: #fff;\n border: none;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);\n }\n\n .acc-violation-bubble[data-severity="critical"] {\n background: #d32f2f;\n color: #fff;\n }\n\n .acc-violation-bubble[data-severity="serious"] {\n background: #f57c00;\n color: #fff;\n }\n\n .acc-violation-bubble[data-severity="moderate"] {\n background: #fbc02d;\n color: #333;\n }\n\n .acc-violation-bubble[hidden] {\n display: none;\n }\n\n .acc-toggle-btn:focus {\n outline: none !important;\n }\n\n .acc-toggle-btn:focus-visible {\n outline: 3px solid var(--acc-primary-color, #1976d2) !important;\n outline-offset: 2px;\n }\n\n body.acc-tts-click-mode :is(h1, h2, h3, h4, h5, h6, p, li, dt, dd, blockquote, figcaption, caption, th, td, div, section):not(.acc-container *):hover {\n cursor: pointer;\n }\n\n .acc-tts-active-block {\n outline: 2px solid var(--acc-primary-color, #1976d2) !important;\n outline-offset: 3px !important;\n border-radius: 4px;\n }\n \n @media (prefers-reduced-motion: reduce) {\n .acc-toggle-btn {\n transition: none;\n }\n\n .acc-toggle-btn .acc-toggle-icon svg,\n .acc-toggle-btn::before,\n .acc-toggle-btn::after {\n transition: none;\n }\n\n }\n','.acc-report-panel {\n display: none;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: calc(var(--acc-widget-z-index, 100000) + 10);\n font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;\n}\n.acc-report-panel.acc-report-visible {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.acc-report-overlay {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(0, 0, 0, 0.6);\n}\n.acc-report-dialog {\n position: relative;\n background: #fff;\n border-radius: 12px;\n width: 90%;\n max-width: 800px;\n max-height: 85vh;\n display: flex;\n flex-direction: column;\n box-shadow: 0 20px 60px rgba(0,0,0,0.3);\n}\n.acc-report-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 16px 20px;\n border-bottom: 1px solid #e0e0e0;\n}\n.acc-report-title {\n margin: 0;\n font-size: 18px;\n font-weight: 600;\n color: #1a1a1a;\n}\n.acc-report-close {\n background: none;\n border: none;\n padding: 8px;\n cursor: pointer;\n border-radius: 6px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.acc-report-close:hover {\n background: #f0f0f0;\n}\n.acc-report-close svg {\n width: 20px;\n height: 20px;\n fill: #666;\n}\n.acc-report-status {\n padding: 8px 20px;\n font-size: 14px;\n color: #666;\n background: #f8f9fa;\n}\n.acc-report-content {\n flex: 1;\n overflow-y: auto;\n padding: 16px 20px;\n}\n.acc-report-loading {\n text-align: center;\n padding: 40px;\n color: #666;\n}\n.acc-report-error {\n color: #d32f2f;\n padding: 20px;\n text-align: center;\n}\n.acc-report-summary {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));\n gap: 12px;\n margin-bottom: 20px;\n}\n.acc-report-stat {\n background: #f8f9fa;\n border-radius: 8px;\n padding: 16px;\n text-align: center;\n}\n.acc-report-stat-value {\n font-size: 28px;\n font-weight: 700;\n display: block;\n}\n.acc-report-stat-label {\n font-size: 12px;\n color: #666;\n text-transform: uppercase;\n margin-top: 4px;\n}\n.acc-report-stat.critical .acc-report-stat-value { color: #d32f2f; }\n.acc-report-stat.serious .acc-report-stat-value { color: #f57c00; }\n.acc-report-stat.moderate .acc-report-stat-value { color: #fbc02d; }\n.acc-report-stat.minor .acc-report-stat-value { color: #7cb342; }\n.acc-report-stat.passed .acc-report-stat-value { color: #43a047; }\n.acc-report-section {\n margin-bottom: 20px;\n}\n.acc-report-section-title {\n font-size: 14px;\n font-weight: 600;\n color: #333;\n margin-bottom: 12px;\n padding-bottom: 8px;\n border-bottom: 2px solid #e0e0e0;\n}\n.acc-report-violation {\n background: #fff;\n border: 1px solid #e0e0e0;\n border-radius: 8px;\n margin-bottom: 12px;\n overflow: hidden;\n}\n.acc-report-violation-header {\n padding: 12px 16px;\n background: #f8f9fa;\n cursor: pointer;\n display: flex;\n align-items: center;\n gap: 12px;\n}\n.acc-report-violation-header:hover {\n background: #f0f0f0;\n}\n.acc-report-violation-impact {\n font-size: 11px;\n font-weight: 600;\n text-transform: uppercase;\n padding: 4px 8px;\n border-radius: 4px;\n color: #fff;\n}\n.acc-report-violation-impact.critical { background: #d32f2f; }\n.acc-report-violation-impact.serious { background: #f57c00; }\n.acc-report-violation-impact.moderate { background: #fbc02d; color: #333; }\n.acc-report-violation-impact.minor { background: #7cb342; }\n.acc-report-violation-title {\n flex: 1;\n font-weight: 500;\n color: #333;\n}\n.acc-report-violation-count {\n font-size: 12px;\n color: #666;\n background: #e0e0e0;\n padding: 2px 8px;\n border-radius: 12px;\n}\n.acc-report-violation-details {\n display: none;\n padding: 16px;\n border-top: 1px solid #e0e0e0;\n}\n.acc-report-violation.expanded .acc-report-violation-details {\n display: block;\n}\n.acc-report-violation-desc {\n color: #666;\n font-size: 14px;\n margin-bottom: 12px;\n}\n.acc-report-violation-help {\n font-size: 13px;\n margin-bottom: 12px;\n}\n.acc-report-violation-help a {\n color: #1976d2;\n}\n.acc-report-node {\n background: #f8f9fa;\n border-radius: 6px;\n padding: 12px;\n margin-top: 8px;\n}\n.acc-report-node-html {\n font-family: monospace;\n font-size: 12px;\n background: #263238;\n color: #80cbc4;\n padding: 8px 12px;\n border-radius: 4px;\n overflow-x: auto;\n white-space: pre-wrap;\n word-break: break-all;\n}\n.acc-report-node-fix {\n margin-top: 8px;\n font-size: 13px;\n color: #333;\n}\n.acc-report-node-fix strong {\n color: #1976d2;\n}\n.acc-report-success {\n text-align: center;\n padding: 40px;\n}\n.acc-report-success-icon {\n width: 64px;\n height: 64px;\n background: #43a047;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n margin: 0 auto 16px;\n}\n.acc-report-success-icon svg {\n width: 32px;\n height: 32px;\n fill: #fff;\n}\n.acc-report-footer {\n padding: 12px 20px;\n border-top: 1px solid #e0e0e0;\n text-align: center;\n}\n.acc-report-powered {\n font-size: 12px;\n}\n@media (max-width: 600px) {\n .acc-report-dialog {\n width: 95%;\n max-height: 90vh;\n }\n .acc-report-summary {\n grid-template-columns: repeat(2, 1fr);\n }\n}\n',".acc-rg {\n position: fixed;\n left: 0;\n right: 0;\n width: 100%;\n pointer-events: none;\n background-color: rgba(0, 0, 0, 0.4);\n z-index: calc(var(--acc-widget-z-index, 100000) + 1);\n}\n.acc-rg-top {\n top: 0;\n}\n.acc-rg-bottom {\n bottom: 0;\n}\n/* Softer overlay when high contrast is active */\nbody.acc-high-contrast-mode .acc-rg {\n background-color: rgba(0, 0, 0, 0.25);\n}\n",".acc-skip-link {\n font-family: inherit;\n position: fixed;\n top: 16px;\n left: 16px;\n background: var(--acc-card-bg, #ffffff);\n color: var(--acc-text-color, #222222);\n border: 3px solid var(--acc-primary-color, #1976d2);\n border-radius: var(--acc-button-border-radius, 0.4rem);\n padding: 8px 16px;\n z-index: calc(var(--acc-widget-z-index, 100000) + 2);\n transform: translateY(-140%);\n opacity: 0;\n pointer-events: none;\n transition: transform 0.2s ease, opacity 0.2s ease;\n font-size: 16px;\n line-height: 1.2;\n font-weight: 600;\n background-clip: padding-box;\n}\n.acc-skip-link:focus,\n.acc-skip-link:active {\n transform: translateY(0);\n opacity: 1;\n pointer-events: auto;\n outline: var(--acc-focus-outline-width, 3px) solid var(--acc-focus-ring-color, #1976d2);\n outline-offset: var(--acc-focus-outline-offset, 2px);\n}\n",'.acc-annotation-layer {\n position: absolute;\n top: 0;\n left: 0;\n width: 0;\n height: 0;\n z-index: calc(var(--acc-widget-z-index, 100000) + 5);\n pointer-events: none;\n}\n\n.acc-annotation-marker {\n position: absolute;\n width: 20px;\n height: 20px;\n border: none;\n border-radius: 999px;\n color: #fff;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);\n cursor: pointer;\n pointer-events: auto;\n transform: translate(-40%, -50%);\n}\n\n.acc-annotation-marker svg {\n width: 12px;\n height: 12px;\n fill: currentColor;\n}\n\n.acc-annotation-marker[data-impact="critical"] {\n background: #b71c1c;\n}\n\n.acc-annotation-marker[data-impact="serious"] {\n background: #d84315;\n}\n\n.acc-annotation-marker[data-impact="moderate"] {\n background: #ef6c00;\n}\n\n.acc-annotation-marker[data-impact="minor"] {\n background: #1565c0;\n}\n\n.acc-annotation-popup {\n position: absolute;\n width: min(320px, 92vw);\n background: #fff;\n color: #1a1a1a;\n border: 1px solid #d7d7d7;\n border-radius: 10px;\n box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);\n padding: 12px;\n pointer-events: auto;\n}\n\n.acc-annotation-popup-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 10px;\n}\n\n.acc-annotation-popup-title {\n margin: 0;\n font-size: 14px;\n line-height: 1.3;\n}\n\n.acc-annotation-popup-close {\n border: 0;\n background: transparent;\n padding: 2px;\n width: 24px;\n height: 24px;\n color: #444;\n cursor: pointer;\n}\n\n.acc-annotation-popup-close svg {\n width: 20px;\n height: 20px;\n fill: currentColor;\n}\n\n.acc-annotation-popup p {\n margin: 8px 0;\n font-size: 13px;\n line-height: 1.45;\n}\n\n.acc-annotation-popup a {\n color: #0d47a1;\n font-weight: 600;\n text-decoration: underline;\n}\n'].join("\n"),c={findElement(t,e=document){try{return e.querySelector(t)}catch(e){return console.warn(`[AllyWidget] Failed to query selector: ${t}`,e),null}},injectStyle(t,e){if(e&&"undefined"!=typeof document)try{let n=document.getElementById(t)||document.createElement("style");n.innerHTML=e,n.id||(n.id=t,document.head.appendChild(n))}catch(t){console.warn("[AllyWidget] Error adding stylesheet:",t)}},createCSS(t){let e="";if(!t)return e;const n=["-o-","-ms-","-moz-","-webkit-",""],i=["filter"];for(let a in t){if(!Object.prototype.hasOwnProperty.call(t,a))continue;(i.includes(a)?n:[""]).forEach(n=>{e+=`${n}${a}:${t[a]} !important;`})}return e},wrapCSS(t,e,n){let i="";return e.forEach(e=>{i+=`${t} ${e}{${n}}`}),i},buildCSS(t){if(!t)return"";let e="";return e+=this.createCSS(t.styles||{}),e.length&&t.selector&&(e=this.wrapCSS(t.selector,t.childrenSelector||[""],e)),e+=t.css||"",e},applyToolStyle(t){let{id:e="",enable:n=!1}=t,i=`acc-${e}`;if(n){let e=this.buildCSS(t);this.injectStyle(i,e)}else{let t=document.getElementById(i);t&&t.remove()}document.documentElement.classList.toggle(i,n)},applyThemeVariables(){if("undefined"==typeof document)return;const t={"--acc-primary-color":this.widgetTheme.primaryColor,"--acc-primary-color-light":this.widgetTheme.primaryColorLight,"--acc-primary-color-dark":this.widgetTheme.primaryColorDark,"--acc-bg-color":this.widgetTheme.backgroundColor,"--acc-text-color":this.widgetTheme.textColor,"--acc-text-color-inverted":this.widgetTheme.textColorInverted,"--acc-card-bg":this.widgetTheme.cardBackground,"--acc-border-color":this.widgetTheme.borderColor,"--acc-focus-ring-color":this.widgetTheme.focusRingColor,"--acc-hover-color":this.widgetTheme.hoverColor,"--acc-active-color":this.widgetTheme.activeColor,"--acc-border-radius":this.widgetTheme.borderRadius,"--acc-button-border-radius":this.widgetTheme.buttonBorderRadius,"--acc-header-height":this.widgetTheme.headerHeight,"--acc-focus-outline-width":this.widgetTheme.focusBorderWidth,"--acc-focus-outline-offset":this.widgetTheme.focusOutlineOffset,"--acc-widget-z-index":String(this.widgetTheme.zIndex),"--acc-button-size":this.widgetTheme.buttonSize};Object.entries(t).forEach(([t,e])=>{document.documentElement.style.setProperty(t,e)})},registerStaticStyles(){this.staticStylesRegistered||(this.injectStyle("ally-static-styles",s),this.staticStylesRegistered=!0)}},l="4.11.1",d=`https://cdn.jsdelivr.net/npm/axe-core@${l}/axe.min.js`,p={runOnly:["wcag2a","wcag2aa","wcag21a","wcag21aa","best-practice"]},h="(prefers-reduced-motion: reduce)",u={getContrastToggleDisplay(t){return 0===t?{key:"light-contrast",label:"Light",icon:this.widgetIcons.lightContrast}:1===t?{key:"dark-contrast",label:"Dark",icon:this.widgetIcons.darkContrast}:{key:null,label:"Contrast",icon:this.widgetIcons.contrast}},updateContrastToggleButton(t,e){if(!t)return;const n=this.getContrastToggleDisplay(e),i=t.querySelector("svg");i?i.outerHTML=n.icon:t.insertAdjacentHTML("afterbegin",n.icon);const a=this.translate(n.label),o=t.querySelector(".acc-label");o&&(o.setAttribute("data-acc-text",n.label),o.innerText=a),t.setAttribute("title",a),t.setAttribute("aria-label",a),t.setAttribute("data-contrast-mode",n.key||"off")},getSaturationToggleDisplay(t){return 0===t?{key:"low-saturation",label:"Low",icon:this.widgetIcons.lowSaturation}:1===t?{key:"high-saturation",label:"High",icon:this.widgetIcons.highSaturation}:{key:null,label:"Saturation",icon:this.widgetIcons.saturation}},updateSaturationToggleButton(t,e){if(!t)return;const n=this.getSaturationToggleDisplay(e),i=t.querySelector("svg");i?i.outerHTML=n.icon:t.insertAdjacentHTML("afterbegin",n.icon);const a=this.translate(n.label),o=t.querySelector(".acc-label");o&&(o.setAttribute("data-acc-text",n.label),o.innerText=a),t.setAttribute("title",a),t.setAttribute("aria-label",a),t.setAttribute("data-saturation-mode",n.key||"off")},ensureSkipLink(){if("undefined"==typeof document)return null;if(this.skipLinkElement&&document.body.contains(this.skipLinkElement))return this.updateSkipLinkLabel(),this.skipLinkElement;const t=document.getElementById("acc-skip-link");if(t)return this.skipLinkElement=t,t.getAttribute("data-acc-text")||t.setAttribute("data-acc-text","Skip to accessibility menu"),this.updateSkipLinkLabel(),t;const e=document.createElement("button");return e.type="button",e.id="acc-skip-link",e.className="acc-skip-link",e.setAttribute("tabindex","0"),e.setAttribute("data-acc-text","Skip to accessibility menu"),e.setAttribute("aria-label",this.translate("Skip to accessibility menu")),e.textContent=this.translate("Skip to accessibility menu"),e.addEventListener("click",t=>{t.preventDefault();const e=this.widgetToggleButton;if(!e)return;const n=this.activeMenuContainer||this.menuContainer,i=()=>{const t=this.activeMenuContainer||this.menuContainer;if(!t)return;const e=this.getFocusableElements(t);e.length&&e[0].focus()};n&&"none"!==n.style.display?i():(e.click(),requestAnimationFrame(i))}),document.body.insertBefore(e,document.body.firstChild),this.skipLinkElement=e,e},updateSkipLinkLabel(){if(!this.skipLinkElement)return;const t=this.skipLinkElement.getAttribute("data-acc-text")||"Skip to accessibility menu",e=this.translate(t);this.skipLinkElement.textContent=e,this.skipLinkElement.setAttribute("aria-label",e)},shouldSkipScaling:t=>t.closest(".acc-menu, .acc-container, .acc-widget"),collectDirectTextParents(t=document.body){const e=new Set;if("undefined"==typeof document||"undefined"==typeof NodeFilter)return e;const n=t instanceof Element?t:document.body;if(!n)return e;const i=document.createTreeWalker(n,NodeFilter.SHOW_TEXT,{acceptNode:t=>{if(!t||!t.textContent||!t.textContent.trim())return NodeFilter.FILTER_REJECT;const e=t.parentElement;return e?this.shouldSkipScaling(e)||e.closest("script,style,noscript,textarea,pre,code,svg")||e.matches(this.textScaleSelectors)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}});let a=i.nextNode();for(;a;){const t=a.parentElement;t&&e.add(t),a=i.nextNode()}return e},applyScaleToElement(t,e){if(!t||!(t instanceof Element)||this.shouldSkipScaling(t)||t.classList.contains("material-icons")||t.classList.contains("fa"))return;const n="data-acc-baseSize";if(!t.hasAttribute(n)){const e=parseFloat(window.getComputedStyle(t).fontSize);if(Number.isNaN(e)||e<=0)return;t.setAttribute(n,String(e))}const i=parseFloat(t.getAttribute(n));Number.isNaN(i)||i<=0||(t.style.fontSize=i*e+"px")},ensureTextScaleObserver(){!this.textScaleObserver&&document.body&&(this.textScaleObserver=new MutationObserver(t=>{if(Math.abs(this.currentTextScaleMultiplier-1)<.001)return;const e=new Set;t.forEach(t=>{t.addedNodes.forEach(t=>{t instanceof Element&&(t.matches&&t.matches(this.textScaleSelectors)&&e.add(t),t.querySelectorAll?.(this.textScaleSelectors).forEach(t=>e.add(t)),this.collectDirectTextParents(t).forEach(t=>e.add(t)))})}),e.size&&e.forEach(t=>this.applyScaleToElement(t,this.currentTextScaleMultiplier))}),this.textScaleObserver.observe(document.body,{childList:!0,subtree:!0}))},disconnectTextScaleObserver(){this.textScaleObserver&&(this.textScaleObserver.disconnect(),this.textScaleObserver=null)},scaleText(t=1){try{const e=Number(t),n=Number.isFinite(e)&&e>0?e:1,i=Math.abs(n-1)<.001;if(this.currentTextScaleMultiplier=n,i){this.disconnectTextScaleObserver();document.querySelectorAll("[data-acc-baseSize]").forEach(t=>{this.shouldSkipScaling(t)||(t.style.fontSize="",t.removeAttribute("data-acc-baseSize"))})}else{this.ensureTextScaleObserver();document.querySelectorAll(this.textScaleSelectors).forEach(t=>this.applyScaleToElement(t,n)),this.collectDirectTextParents(document.body).forEach(t=>this.applyScaleToElement(t,n))}}catch(t){console.warn("Error scaling text:",t)}},clampTextScalePercent(t){const e=Number(this.textScaleMinPercent)||80,n=Number(this.textScaleMaxPercent)||150,i=Number(this.textScaleStepPercent)||5,a=Number(t);if(!Number.isFinite(a))return 100;const o=Math.round((a-e)/i)*i+e;return Math.min(n,Math.max(e,o))},getTextScalePercent(t=1){if(!1===t||null==t)return this.clampTextScalePercent(100);const e=Number(t);if(!Number.isFinite(e))return this.clampTextScalePercent(100);if(e<=0)return this.clampTextScalePercent(100);const n=e>10?e:100*e;return this.clampTextScalePercent(n)},syncTextScaleControlUI(t,e=1){if(!t||!t.querySelector)return;const n=t.querySelector(".acc-text-scale-range"),i=t.querySelector(".acc-text-scale-percent"),a=this.getTextScalePercent(e);if(n){const t=Number(this.textScaleMinPercent)||80,e=(a-t)/((Number(this.textScaleMaxPercent)||150)-t)*100;n.value=String(a),n.style.setProperty("--acc-text-scale-progress",`${Math.max(0,Math.min(100,e))}%`)}i&&(i.textContent=`${a}%`)},setTextScaleFromPercent(t,e={}){const n=!1!==e.persist,i=this.getTextScalePercent(t),a=Number((i/100).toFixed(2)),o=this.textScaleValues.indexOf(a);if(this.multiLevelFeatures["text-scale"]&&(this.multiLevelFeatures["text-scale"].currentIndex=o),o>-1)this.textScaleIndex=o;else{let t=0,e=1/0;this.textScaleValues.forEach((n,i)=>{const o=Math.abs(n-a);o<e&&(e=o,t=i)}),this.textScaleIndex=t}return this.scaleText(a),n&&this.updateState({"text-scale":a}),a},enableBoldText(t=!1){const e={id:"bold-text",selector:"body",childrenSelector:[["*",":not(.material-icons)",":not(.material-icons-outlined)",":not(.material-icons-round)",":not(.material-symbols-outlined)",":not(.material-symbols-rounded)",":not(.fa)",":not(.fas)",":not(.far)",":not(.fab)",":not(.fa-solid)",":not(.fa-regular)",":not(.fa-brands)",":not(.glyphicon)",":not(.icon)",":not(.icons)",':not([class*="icon-"])',":not([data-icon])"].join("")],styles:{"font-weight":"700"},css:"\n .acc-container, .acc-container *, .acc-menu, .acc-menu * {\n font-weight: inherit !important;\n }\n input::placeholder, textarea::placeholder {\n font-weight: 700 !important;\n }\n "};this.applyToolStyle({...e,enable:t})},adjustLetterSpacing(t=!1){this.applyToolStyle({id:"letter-spacing",selector:"html",childrenSelector:["","*:not(.material-icons,.acc-menu,.acc-menu *, .acc-widget, .acc-widget *)"],styles:{"letter-spacing":"2px"},enable:t})},adjustLineSpacing(t=!1){this.applyToolStyle({id:"line-spacing",selector:"html",childrenSelector:["","*:not(.material-icons,.acc-menu,.acc-menu *, .acc-widget, .acc-widget *)"],styles:{"line-height":"3"},enable:t})},enableLargePointer(t=!1){const e={id:"large-pointer",selector:"body",childrenSelector:["*"],styles:{cursor:"url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='98px' height='98px' viewBox='0 0 48 48'%3E%3Cpath fill='%23FFFFFF' d='M27.8 39.7c-.1 0-.2 0-.4-.1s-.4-.3-.6-.5l-3.7-8.6-4.5 4.2c-.1.2-.3.3-.6.3-.1 0-.3 0-.4-.1-.3-.1-.6-.5-.6-.9V12c0-.4.2-.8.6-.9.1-.1.3-.1.4-.1.2 0 .5.1.7.3l16 15c.3.3.4.7.3 1.1-.1.4-.5.6-.9.7l-6.3.6 3.9 8.5c.1.2.1.5 0 .8-.1.2-.3.5-.5.6l-2.9 1.3c-.2-.2-.4-.2-.5-.2z'/%3E%3Cpath fill='%23212121' d='m18 12 16 15-7.7.7 4.5 9.8-2.9 1.3-4.3-9.9L18 34V12m0-2c-.3 0-.5.1-.8.2-.7.3-1.2 1-1.2 1.8v22c0 .8.5 1.5 1.2 1.8.3.2.6.2.8.2.5 0 1-.2 1.4-.5l3.4-3.2 3.1 7.3c.2.5.6.9 1.1 1.1.2.1.5.1.7.1.3 0 .5-.1.8-.2l2.9-1.3c.5-.2.9-.6 1.1-1.1.2-.5.2-1.1 0-1.5l-3.3-7.2 4.9-.4c.8-.1 1.5-.6 1.7-1.3.3-.7.1-1.6-.5-2.1l-16-15c-.3-.5-.8-.7-1.3-.7z'/%3E%3C/svg%3E\") 40 15, auto"}};this.applyToolStyle({...e,enable:t})},highlightLinks(t=!1){const e={id:"highlight-links",selector:"html",childrenSelector:["a[href]:not(.acc-menu a, .acc-widget a)","summary.header__menu-item:not(.acc-menu summary, .acc-widget summary)","summary.link:not(.acc-menu summary, .acc-widget summary)","summary[role='button']:not(.acc-menu summary, .acc-widget summary)","details > summary.list-menu__item:not(.acc-menu summary, .acc-widget summary)",".header__menu-item[role='button']:not(.acc-menu *, .acc-widget *)"],styles:{outline:`3px solid ${this.widgetTheme.primaryColor}`,"outline-offset":"2px"}};this.applyToolStyle({...e,enable:t})},highlightTitles(t=!1){const e={id:"highlight-title",selector:"html",childrenSelector:this.targetSelectors.HEADERS,styles:{outline:`3px solid ${this.widgetTheme.primaryColor}`,"outline-offset":"2px"}};this.applyToolStyle({...e,enable:t})},ensureReadableFontLoaded(){if(this.readableFontLoaded)return;if(document.getElementById("acc-readable-text-font"))return void(this.readableFontLoaded=!0);const t=document.createElement("style");t.id="acc-readable-text-font",t.textContent='\n @font-face {\n font-family: "OpenDyslexic3";\n src: url("https://website-widgets.pages.dev/fonts/OpenDyslexic3-Regular.woff") format("woff"),\n url("https://website-widgets.pages.dev/fonts/OpenDyslexic3-Regular.ttf") format("truetype");\n font-display: swap;\n }\n ',document.head.appendChild(t),this.readableFontLoaded=!0},enableReadableText(t=!1){const e=!!t;e&&this.ensureReadableFontLoaded();const n={id:"readable-text",selector:"body",childrenSelector:[["*",":not(.material-icons)",":not(.material-icons-outlined)",":not(.material-icons-round)",":not(.material-symbols-outlined)",":not(.material-symbols-rounded)",":not(.fa)",":not(.fas)",":not(.far)",":not(.fab)",":not(.fa-solid)",":not(.fa-regular)",":not(.fa-brands)",":not(.glyphicon)",":not(.icon)",":not(.icons)",':not([class*="icon-"])',":not([data-icon])"].join("")],styles:{"font-family":'"OpenDyslexic3", "Comic Sans MS", Arial, Helvetica, sans-serif'},css:'\n .acc-container, .acc-container *, .acc-menu, .acc-menu * {\n font-family: inherit !important;\n }\n input::placeholder, textarea::placeholder {\n font-family: "OpenDyslexic3", "Comic Sans MS", Arial, Helvetica, sans-serif !important;\n }\n '};this.applyToolStyle({...n,enable:e})},pauseMotion(t=!1){this.applyToolStyle({id:"pause-motion",selector:"html",childrenSelector:["*"],styles:{transition:"none","animation-fill-mode":"forwards","animation-iteration-count":"1","animation-duration":".01s"},enable:t})},enableHighContrastMode(t=!1){const e=":not(.acc-container):not(.acc-container *):not(.acc-rg-container):not(.acc-rg-container *)",n={id:"high-contrast-mode",css:`\n /* ── Base: force black on white ── */\n body.acc-high-contrast-mode *${e} {\n color: #000 !important;\n background-color: #fff !important;\n background-image: none !important;\n text-shadow: none !important;\n box-shadow: none !important;\n }\n\n body.acc-high-contrast-mode {\n background: #fff !important;\n }\n\n /* ── Borders: solid and visible ── */\n body.acc-high-contrast-mode *${e} {\n border-color: #000 !important;\n }\n\n /* ── Links: underlined, distinct color ── */\n body.acc-high-contrast-mode a${e} {\n color: #00e !important;\n text-decoration: underline !important;\n }\n\n body.acc-high-contrast-mode a:visited${e} {\n color: #551a8b !important;\n }\n\n /* ── Headings: bold black ── */\n body.acc-high-contrast-mode :where(h1,h2,h3,h4,h5,h6)${e} {\n color: #000 !important;\n font-weight: 700 !important;\n }\n\n /* ── Images: keep visible, add border ── */\n body.acc-high-contrast-mode img${e} {\n border: 1px solid #000 !important;\n }\n\n /* ── Inputs & buttons: high-contrast borders ── */\n body.acc-high-contrast-mode :where(input, textarea, select, button)${e} {\n border: 2px solid #000 !important;\n background: #fff !important;\n color: #000 !important;\n }\n\n /* ── Focus rings: thick, high-visibility ── */\n body.acc-high-contrast-mode :focus-visible${e} {\n outline: 3px solid #000 !important;\n outline-offset: 2px !important;\n }\n\n /* ── Tables: visible cell borders ── */\n body.acc-high-contrast-mode :where(table, th, td)${e} {\n border: 1px solid #000 !important;\n }\n `};this.applyToolStyle({...n,enable:t}),document.body?.classList.toggle("acc-high-contrast-mode",!!t)},enableReadingAid(t=!1){try{let e=this.findElement(".acc-rg-container");const n=100;if(t){window.__accweb__scrollGuide&&(document.removeEventListener("mousemove",window.__accweb__scrollGuide),delete window.__accweb__scrollGuide),e||(e=document.createElement("div"),e.setAttribute("class","acc-rg-container"),e.setAttribute("aria-hidden","true"),e.innerHTML=this.readingAidTemplate,document.body.prepend(e));const t=e.querySelector(".acc-rg-top"),i=e.querySelector(".acc-rg-bottom");t.style.display="none",i.style.display="none",this.readingAidVisible=!1;const a=this.throttle(e=>{this.readingAidVisible||(t.style.display="block",i.style.display="block",this.readingAidVisible=!0);const a=e.clientY,o=Math.max(0,a-n/2),r=Math.max(0,window.innerHeight-(a+n/2));t.style.height=`${o}px`,i.style.height=`${r}px`},16);window.__accweb__scrollGuide=a,document.addEventListener("mousemove",a,{passive:!0})}else this.readingAidVisible=!1,window.__accweb__scrollGuide&&(document.removeEventListener("mousemove",window.__accweb__scrollGuide),delete window.__accweb__scrollGuide),e&&e.remove()}catch(t){console.warn("Error with reading aid:",t)}},loadAxeCore(){return this.axeCoreLoaded&&window.axe?Promise.resolve(window.axe):(this.axeCorePromise||(this.axeCoreLoading=!0,this.axeCorePromise=new Promise((t,e)=>{let n=document.querySelector('script[data-acc-axe-core="true"]'),i=!1,a=null;const o=()=>{if(!i){if(i=!0,a&&clearTimeout(a),!window.axe)return this.axeCoreLoading=!1,this.axeCoreLoaded=!1,this.axeCorePromise=null,void e(new Error("axe-core loaded but window.axe is unavailable"));this.axeCoreLoading=!1,this.axeCoreLoaded=!0,n&&n.setAttribute("data-acc-axe-core-loaded","true"),t(window.axe)}},r=t=>{i||(i=!0,a&&clearTimeout(a),this.axeCoreLoading=!1,this.axeCoreLoaded=!1,this.axeCorePromise=null,e(t))};window.axe?o():(n&&!n.src.includes(`/axe-core@${l}/`)&&(n.remove(),n=null),n||(n=document.createElement("script"),n.src=d,n.async=!0,n.integrity="sha384-wb3zgvLcZeMFSec08dk7g8K8yDFFAX2uNKVwOUuowwc/wIfE2t6XVUjTEgPrOJCS",n.crossOrigin="anonymous",n.setAttribute("data-acc-axe-core","true"),document.head.appendChild(n)),n.addEventListener("load",o,{once:!0}),n.addEventListener("error",()=>r(new Error("Failed to load axe-core")),{once:!0}),a=setTimeout(()=>{r(new Error("Timed out loading axe-core"))},15e3))})),this.axeCorePromise)},getAxeRunOptions:()=>({...p}),getViolationCounts(t={}){const e={critical:0,serious:0,moderate:0,minor:0};return(Array.isArray(t.violations)?t.violations:[]).forEach(t=>{const n=t?.impact;n&&void 0!==e[n]&&(e[n]+=Array.isArray(t.nodes)?t.nodes.length:0)}),e},updateViolationBubble(t=null){const e=this.violationBubble||this.findElement(".acc-violation-bubble");if(!e)return;const n=this.getViolationCounts(t||this.axeScanResults||{}),i=this.isDevMode();let a=0,o="";if(n.critical>0?(a=n.critical,o="critical"):i&&n.serious>0?(a=n.serious,o="serious"):i&&n.moderate>0&&(a=n.moderate,o="moderate"),a<=0)return e.textContent="",e.hidden=!0,void e.removeAttribute("data-severity");e.hidden=!1,e.dataset.severity=o,e.textContent=a>99?"99+":String(a)},async runBackgroundAxeScan({force:t=!1}={}){return!t&&this.axeScanResults?(this.updateViolationBubble(this.axeScanResults),this.axeScanResults):(!t&&this.axeScanPromise||(this.axeScanPromise=(async()=>{try{const t=await this.loadAxeCore(),e=await t.run(document,this.getAxeRunOptions());return this.axeScanResults=e,this.updateViolationBubble(e),e}catch(t){throw this.updateViolationBubble({violations:[]}),t}finally{this.axeScanPromise=null}})()),this.axeScanPromise)},ensureMediaQuery(t){return t&&"undefined"!=typeof window&&"function"==typeof window.matchMedia?(this.systemPreferenceMediaQueries||(this.systemPreferenceMediaQueries={}),this.systemPreferenceMediaQueries[t]||(this.systemPreferenceMediaQueries[t]=window.matchMedia(t)),this.systemPreferenceMediaQueries[t]):null},applySystemMotionPreference(t){if(this.loadConfig(),this.hasExplicitStatePreference("pause-motion"))return!1;return(!!this.retrieveState("pause-motion")!==t||!this.isSystemControlledPreference("pause-motion"))&&(this.updateState({"pause-motion":t},{source:"system"}),!0)},detectSystemPreferences(){if("undefined"==typeof window||"function"!=typeof window.matchMedia)return;const t=this.ensureMediaQuery(h),e=!!t?.matches;this.applySystemMotionPreference(e)&&this.applyEnhancements()},clearSystemPreferenceListeners(){(Array.isArray(this.systemPreferenceListeners)?this.systemPreferenceListeners:[]).forEach(t=>{"function"==typeof t&&t()}),this.systemPreferenceListeners=[]},setupMediaQueryListeners(){if(this.clearSystemPreferenceListeners(),"undefined"==typeof window||"function"!=typeof window.matchMedia)return;((t,e)=>{t&&"function"==typeof e&&("function"==typeof t.addEventListener?(t.addEventListener("change",e),this.systemPreferenceListeners.push(()=>t.removeEventListener("change",e))):"function"==typeof t.addListener&&(t.addListener(e),this.systemPreferenceListeners.push(()=>t.removeListener(e))))})(this.ensureMediaQuery(h),t=>{this.applySystemMotionPreference(!!t.matches)&&this.applyEnhancements()})},async runAccessibilityReport(){let t=this.findElement(".acc-report-panel");t||(t=this.createReportPanel(),document.body.appendChild(t)),this.openReportPanel(t);const e=this.findElement(".acc-report-content",t),n=this.findElement(".acc-report-status",t);n.textContent=this.translate("Loading..."),e.innerHTML=`<div class="acc-report-loading">${this.translate("Analyzing page...")}</div>`;try{const e=await this.runBackgroundAxeScan({force:!0});this.displayReportResults(t,e)}catch(t){e.innerHTML=`<div class="acc-report-error">Error: ${t.message}</div>`,n.textContent=""}},getReportFocusableElements(t){if(!t)return[];const e=this.findElement(".acc-report-dialog",t);return this.getFocusableElements(e||t)},openReportPanel(t){if(!t)return;this.reportPreviousFocus=document.activeElement&&"function"==typeof document.activeElement.focus?document.activeElement:null,t.classList.add("acc-report-visible"),t.setAttribute("aria-hidden","false");const e=this.findElement(".acc-report-dialog",t)||t;e.hasAttribute("tabindex")||e.setAttribute("tabindex","-1"),this.reportKeyListener&&document.removeEventListener("keydown",this.reportKeyListener,!0),this.reportKeyListener=n=>{if(!t.classList.contains("acc-report-visible"))return;if("Escape"===n.key||"Esc"===n.key)return n.preventDefault(),n.stopPropagation(),void this.closeReportPanel();if("Tab"!==n.key)return;const i=this.getReportFocusableElements(t);if(!i.length)return n.preventDefault(),void e.focus();const a=i[0],o=i[i.length-1],r=document.activeElement,s=!t.contains(r);n.shiftKey?(r===a||s)&&(n.preventDefault(),o.focus()):(r===o||s)&&(n.preventDefault(),a.focus())},document.addEventListener("keydown",this.reportKeyListener,!0),requestAnimationFrame(()=>{const n=this.getReportFocusableElements(t);n.length?n[0].focus():e.focus()})},createReportPanel(){const t=document.createElement("div");t.className="acc-report-panel acc-container",t.setAttribute("role","dialog"),t.setAttribute("aria-modal","true"),t.setAttribute("aria-hidden","true"),t.setAttribute("aria-labelledby","acc-report-title"),t.innerHTML=`\n <div class="acc-report-overlay"></div>\n <div class="acc-report-dialog">\n <div class="acc-report-header">\n <h2 id="acc-report-title" class="acc-report-title">${this.translate("Accessibility Report")}</h2>\n <button type="button" class="acc-report-close" aria-label="${this.translate("Close")}">${this.widgetIcons.close}</button>\n </div>\n <div class="acc-report-status"></div>\n <div class="acc-report-content"></div>\n <div class="acc-report-footer">\n <span class="acc-report-powered">Powered by axe-core</span>\n </div>\n </div>\n `;const e=t.querySelector(".acc-report-close"),n=t.querySelector(".acc-report-overlay");return e.addEventListener("click",()=>this.closeReportPanel()),n.addEventListener("click",()=>this.closeReportPanel()),t},displayReportResults(t,e){const n=this.findElement(".acc-report-content",t),i=this.findElement(".acc-report-status",t),a=e.violations||[],o=e.passes||[],r=e.incomplete||[],s={critical:0,serious:0,moderate:0,minor:0};a.forEach(t=>{void 0!==s[t.impact]&&(s[t.impact]+=t.nodes.length)});const c=Object.values(s).reduce((t,e)=>t+e,0);i.textContent=c>0?`${c} ${this.translate("Violations Found")}`:this.translate("No Issues Found");let l=`\n <div class="acc-report-summary">\n <div class="acc-report-stat critical">\n <span class="acc-report-stat-value">${s.critical}</span>\n <span class="acc-report-stat-label">${this.translate("Critical")}</span>\n </div>\n <div class="acc-report-stat serious">\n <span class="acc-report-stat-value">${s.serious}</span>\n <span class="acc-report-stat-label">${this.translate("Serious")}</span>\n </div>\n <div class="acc-report-stat moderate">\n <span class="acc-report-stat-value">${s.moderate}</span>\n <span class="acc-report-stat-label">${this.translate("Moderate")}</span>\n </div>\n <div class="acc-report-stat minor">\n <span class="acc-report-stat-value">${s.minor}</span>\n <span class="acc-report-stat-label">${this.translate("Minor")}</span>\n </div>\n <div class="acc-report-stat passed">\n <span class="acc-report-stat-value">${o.length}</span>\n <span class="acc-report-stat-label">${this.translate("Passed Tests")}</span>\n </div>\n </div>\n `;if(0===a.length)l+=`\n <div class="acc-report-success">\n <div class="acc-report-success-icon">\n <svg viewBox="0 0 24 24"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"/></svg>\n </div>\n <h3>${this.translate("No Issues Found")}</h3>\n </div>\n `;else{l+=`<div class="acc-report-section">\n <div class="acc-report-section-title">${this.translate("Violations Found")} (${a.length})</div>\n `;const t={critical:0,serious:1,moderate:2,minor:3};a.sort((e,n)=>(t[e.impact]||4)-(t[n.impact]||4)),a.forEach((t,e)=>{l+=`\n <div class="acc-report-violation" data-index="${e}">\n <div class="acc-report-violation-header">\n <span class="acc-report-violation-impact ${t.impact}">${this.translate(this.capitalizeFirst(t.impact))}</span>\n <span class="acc-report-violation-title">${this.escapeHtml(t.help)}</span>\n <span class="acc-report-violation-count">${t.nodes.length} ${this.translate("Element")}${t.nodes.length>1?"s":""}</span>\n </div>\n <div class="acc-report-violation-details">\n <p class="acc-report-violation-desc">${this.escapeHtml(t.description)}</p>\n <p class="acc-report-violation-help">\n <a href="${t.helpUrl}" target="_blank" rel="noopener">${this.translate("How to Fix")} →</a>\n </p>\n ${t.nodes.slice(0,5).map(t=>`\n <div class="acc-report-node">\n <div class="acc-report-node-html">${this.escapeHtml(t.html)}</div>\n ${t.failureSummary?`<div class="acc-report-node-fix"><strong>${this.translate("Issue")}:</strong> ${this.escapeHtml(t.failureSummary)}</div>`:""}\n </div>\n `).join("")}\n ${t.nodes.length>5?`<p style="color:#666;font-size:13px;margin-top:12px;">... and ${t.nodes.length-5} more elements</p>`:""}\n </div>\n </div>\n `}),l+="</div>"}r.length>0&&(l+=`\n <div class="acc-report-section">\n <div class="acc-report-section-title">${this.translate("Items Need Review")} (${r.length})</div>\n <p style="color:#666;font-size:14px;">These items require manual verification.</p>\n </div>\n `),n.innerHTML=l,n.querySelectorAll(".acc-report-violation-header").forEach(t=>{t.addEventListener("click",()=>{t.parentElement.classList.toggle("expanded")})})},capitalizeFirst:t=>t?t.charAt(0).toUpperCase()+t.slice(1):"",escapeHtml(t){if(!t)return"";const e=document.createElement("div");return e.textContent=t,e.innerHTML},closeReportPanel(){const t=this.findElement(".acc-report-panel");t&&(t.classList.remove("acc-report-visible"),t.setAttribute("aria-hidden","true")),this.reportKeyListener&&(document.removeEventListener("keydown",this.reportKeyListener,!0),this.reportKeyListener=null);const e=this.reportPreviousFocus;this.reportPreviousFocus=null,e&&"function"==typeof e.focus&&e.focus()},concealImages(t=!1){const e="acc-hide-images",n=document.getElementById(e);if(n&&n.remove(),document.documentElement.classList.toggle(e,t),t){const t="\n body > *:not(.acc-container) img,\n body > *:not(.acc-container) picture,\n body > *:not(.acc-container) svg:not(.acc-container svg),\n body > *:not(.acc-container) video,\n body > *:not(.acc-container) iframe,\n body > *:not(.acc-container) canvas,\n body > *:not(.acc-container) .video,\n body > *:not(.acc-container) .image {\n display: none !important;\n }\n ";this.injectStyle(e,t)}},supportsSpeechSynthesis:()=>"undefined"!=typeof window&&("speechSynthesis"in window&&void 0!==window.SpeechSynthesisUtterance),supportsTextToSpeech(){return this.supportsSpeechSynthesis()},normalizeSpeechLanguage(t="en"){const e=String(t||"en").toLowerCase();return{en:"en-US",ne:"ne-NP"}[e]||e},getNativeTtsRate(){const t=Number(this.nativeTtsConfig?.rate);return Number.isFinite(t)?Math.min(2,Math.max(.5,t)):1},getNativeTtsPitch(){const t=Number(this.nativeTtsConfig?.pitch);return Number.isFinite(t)?Math.min(2,Math.max(0,t)):1},isElementVisibleForTts(t){if(!(t instanceof Element))return!1;const e=window.getComputedStyle(t);if("none"===e.display||"hidden"===e.visibility)return!1;const n=t.getBoundingClientRect();return n.width>0&&n.height>0},isTtsExcludedElement:(t,{allowLandmarkRegions:e=!1}={})=>!(t instanceof Element)||(!!t.closest(".acc-container")||(!!t.closest("script,style,noscript,template")||(!!t.closest('[aria-hidden="true"]')||!(e||!t.closest('nav,header,footer,aside,form,dialog,[role="navigation"],[role="complementary"],[role="search"],[role="menu"],[role="dialog"],[role="alert"],[aria-live]'))))),normalizeReadableText:(t="")=>String(t).replace(/\s+/g," ").replace(/[ \t]+([,.;!?])/g,"$1").trim(),getTtsCandidateRoots(){const t=[],e=new Set;return["article","main",'[role="main"]',".content",".post",".entry-content","#content"].forEach(n=>{document.querySelectorAll(n).forEach(n=>{n instanceof Element&&!this.isTtsExcludedElement(n)&&this.isElementVisibleForTts(n)&&(e.has(n)||(e.add(n),t.push(n)))})}),t},getPrimaryContentRoot(){if("undefined"==typeof document)return null;const t=this.getTtsCandidateRoots();if(!t.length){const t=Array.from(document.querySelectorAll('main,article,[role="main"],#content,.content,.post,.entry-content')).filter(t=>t instanceof Element&&!this.isTtsExcludedElement(t)&&this.isElementVisibleForTts(t));if(t.length){let e=t[0],n=-1;return t.forEach(t=>{const i=this.normalizeReadableText(t.innerText||t.textContent||"").length,a=t.getBoundingClientRect(),o=i+a.width*a.height*.0025;o>n&&(n=o,e=t)}),e}if(document.body){const t=Array.from(document.body.children).filter(t=>t instanceof Element&&!t.classList.contains("acc-container")&&this.isElementVisibleForTts(t));if(t.length){let e=t[0],n=-1;return t.forEach(t=>{const i=this.normalizeReadableText(t.innerText||t.textContent||"").length,a=t.getBoundingClientRect(),o=i+a.width*a.height*.0025;o>n&&(n=o,e=t)}),e}}return document.body}let e=t[0],n=-1;return t.forEach(t=>{const i=this.extractReadableBlocks(t).join(" ").length;i>n&&(n=i,e=t)}),e},extractReadableBlocks(t){if(!(t instanceof Element))return[];const e=[];return t.querySelectorAll("h1,h2,h3,h4,h5,h6,p,li,dt,dd,blockquote,figcaption,caption,th,td").forEach(t=>{if(!(t instanceof Element))return;if(this.isTtsExcludedElement(t)||!this.isElementVisibleForTts(t))return;const n=this.normalizeReadableText(t.innerText||t.textContent||"");n.length<15||e.push(n)}),e},getReadableContent(){if("undefined"==typeof document)return"";const t=this.getTtsCandidateRoots();let e=[],n=-1;if(t.forEach(t=>{const i=this.extractReadableBlocks(t);if(!i.length)return;const a=i.join(" ").length,o=60*i.length+a;o>n&&(n=o,e=i)}),!e.length&&document.body&&(e=this.extractReadableBlocks(document.body)),!e.length&&document.body){return this.normalizeReadableText(document.body.innerText||document.body.textContent||"").slice(0,3e4)}return e.join("\n\n").slice(0,3e4)},splitLongSpeechSegment(t,e=240){if(!t)return[];if(t.length<=e)return[t];const n=[];let i=t;for(;i.length>e;){let t=i.lastIndexOf(",",e);t<Math.floor(.5*e)&&(t=i.lastIndexOf(" ",e)),t<Math.floor(.5*e)&&(t=e),n.push(i.slice(0,t).trim()),i=i.slice(t).trim()}return i.length&&n.push(i),n.filter(Boolean)},buildSpeechQueue(t=""){const e=this.normalizeReadableText(t);if(!e)return[];const n=t.split(/\n{2,}/).map(t=>this.normalizeReadableText(t)).filter(Boolean),i=n.length?n:[e],a=[];return i.forEach(t=>{const e=t.split(/(?<=[.!?])\s+/).filter(Boolean),n=e.length?e:[t];let i="";n.forEach(t=>{const e=i?`${i} ${t}`:t;e.length<=240?i=e:(i&&a.push(...this.splitLongSpeechSegment(i,240)),i=t)}),i&&a.push(...this.splitLongSpeechSegment(i,240))}),a.slice(0,300)},resolveSpeechVoice(t){if(!this.supportsSpeechSynthesis())return null;const e=window.speechSynthesis,n=e.getVoices?.()||[];if(!n.length)return null;const i=String(this.nativeTtsConfig?.preferredVoiceName||"").trim().toLowerCase();if(i){const t=n.find(t=>String(t.name||"").trim().toLowerCase()===i);if(t)return t;const e=n.find(t=>String(t.name||"").toLowerCase().includes(i));if(e)return e}const a=String(this.nativeTtsConfig?.preferredVoiceLang||"").trim()||t,o=this.normalizeSpeechLanguage(a).toLowerCase(),r=o.split("-")[0],s=n.find(t=>t.localService&&String(t.lang||"").toLowerCase()===o),c=n.find(t=>String(t.lang||"").toLowerCase()===o),l=n.find(t=>t.localService&&String(t.lang||"").toLowerCase().startsWith(r)),d=n.find(t=>String(t.lang||"").toLowerCase().startsWith(r)),p=n.find(t=>t.default);return s||c||l||d||p||n[0]},getSpeechTargetFromEvent(t){const e=t?.target;if(!(e instanceof Element))return null;if(e.closest(".acc-container"))return null;const n=e.closest("h1,h2,h3,h4,h5,h6,p,li,dt,dd,blockquote,figcaption,caption,th,td,div,section");if(!(n instanceof Element))return null;if(this.isTtsExcludedElement(n,{allowLandmarkRegions:!0})||!this.isElementVisibleForTts(n))return null;const i=this.normalizeReadableText(n.innerText||n.textContent||"");return i.length<2?null:{element:n,text:i.slice(0,3e4)}},setActiveSpeechTarget(t=null){this.ttsActiveTarget&&this.ttsActiveTarget!==t&&this.ttsActiveTarget.classList.remove("acc-tts-active-block"),this.ttsActiveTarget=t,this.ttsActiveTarget&&this.ttsActiveTarget.classList.add("acc-tts-active-block")},startTtsClickMode(){"undefined"==typeof document||this.ttsClickListener||(this.ttsClickListener=t=>{this.handleTtsClick(t)},document.addEventListener("click",this.ttsClickListener,!0),document.body?.classList.add("acc-tts-click-mode"))},stopTtsClickMode(){"undefined"!=typeof document&&(this.ttsClickListener&&(document.removeEventListener("click",this.ttsClickListener,!0),this.ttsClickListener=null),document.body?.classList.remove("acc-tts-click-mode"),this.setActiveSpeechTarget(null))},handleTtsClick(t){if(!this.retrieveState("text-to-speech"))return;const e=this.getSpeechTargetFromEvent(t);e&&(this.setActiveSpeechTarget(e.element),this.ttsTextCache=e.text,this.startSpeechPlayback({restart:!0}))},ensureTtsQueue(){const t=this.ttsTextCache||this.getReadableContent();return t?(this.ttsTextCache=t,this.ttsQueue=this.buildSpeechQueue(t),this.ttsQueueIndex=0,this.ttsQueue.length>0):(this.ttsQueue=[],this.ttsQueueIndex=0,!1)},speakNextTtsChunk(t){if(!this.supportsSpeechSynthesis())return;if(t!==this.ttsSessionId)return;if(this.ttsQueueIndex>=this.ttsQueue.length)return this.ttsStatus="stopped",void this.setActiveSpeechTarget(null);const e=window.speechSynthesis,n=this.ttsQueue[this.ttsQueueIndex];if(!n)return this.ttsQueueIndex+=1,void this.speakNextTtsChunk(t);const i=new window.SpeechSynthesisUtterance(n);i.lang=this.normalizeSpeechLanguage(this.loadConfig().lang||"en"),this.ttsVoice&&this.ttsVoice.lang?.toLowerCase()===i.lang.toLowerCase()||(this.ttsVoice=this.resolveSpeechVoice(i.lang)),this.ttsVoice&&(i.voice=this.ttsVoice),i.rate=this.getNativeTtsRate(),i.pitch=this.getNativeTtsPitch(),i.onstart=()=>{t===this.ttsSessionId&&(this.ttsStatus="reading")},i.onpause=()=>{t===this.ttsSessionId&&(this.ttsStatus="paused")},i.onresume=()=>{t===this.ttsSessionId&&(this.ttsStatus="reading")},i.onend=()=>{t===this.ttsSessionId&&(this.ttsQueueIndex+=1,this.speakNextTtsChunk(t))},i.onerror=()=>{t===this.ttsSessionId&&(this.ttsStatus="stopped",this.setActiveSpeechTarget(null))},this.ttsUtterance=i,e.speak(i)},startNativeSpeechPlayback({restart:t=!1}={}){if(!this.supportsSpeechSynthesis())return;const e=window.speechSynthesis;if(!t&&e.paused)return e.resume(),void(this.ttsStatus="reading");if(!(!(t||!this.ttsQueue.length||this.ttsQueueIndex>=this.ttsQueue.length)||this.ensureTtsQueue()))return void this.stopSpeech();const n=this.ttsSessionId+1;this.ttsSessionId=n,e.cancel(),this.ttsStatus="reading",this.speakNextTtsChunk(n)},startSpeechPlayback({restart:t=!1}={}){this.startNativeSpeechPlayback({restart:t})},pauseSpeech(){if(!this.supportsSpeechSynthesis())return;const t=window.speechSynthesis;t.speaking&&!t.paused&&(t.pause(),this.ttsStatus="paused")},resumeSpeech(){if(!this.supportsSpeechSynthesis())return;const t=window.speechSynthesis;if(t.paused)return t.resume(),void(this.ttsStatus="reading");this.startSpeechPlayback({restart:!1})},stopSpeech(){const t=this.supportsSpeechSynthesis()?window.speechSynthesis:null;this.ttsSessionId+=1,t&&(t.speaking||t.paused)&&t.cancel(),this.ttsUtterance=null,this.ttsQueueIndex=0,this.ttsStatus="stopped",this.setActiveSpeechTarget(null)},enableTextToSpeech(t=!1){if(!this.supportsTextToSpeech())return;const e="text-to-speech"===this.userInitiatedToggleKey;if(!t)return e&&this.announceTtsState(!1),this.stopSpeech(),void this.stopTtsClickMode();const n=window.speechSynthesis;n?.getVoices&&n.getVoices(),this.startTtsClickMode(),this.ttsStatus="idle",e&&this.announceTtsState(!0)},announceTtsState(t){if(!this.supportsTextToSpeech())return;const e=window.speechSynthesis;if(!e)return;const n=t?this.translate("Text to Speech On"):this.translate("Text to Speech Off");e.cancel();const i=new SpeechSynthesisUtterance(n),a=this.normalizeSpeechLanguage(this.loadConfig().lang||"en");i.lang=a;const o=this.resolveSpeechVoice(a);o&&(i.voice=o),i.rate=this.getNativeTtsRate(),i.pitch=this.getNativeTtsPitch(),e.speak(i)},ensureAnnotationLayer(){if(this.annotationLayer&&document.body.contains(this.annotationLayer))return this.annotationLayer;const t=document.createElement("div");return t.className="acc-annotation-layer acc-container",t.setAttribute("aria-hidden","true"),document.body.appendChild(t),this.annotationLayer=t,t},resolveAnnotationTarget(t){if(!t||"string"!=typeof t)return null;try{const e=document.querySelector(t);return!e||e.closest(".acc-container")?null:e}catch{return null}},buildAnnotationEntries(t={}){const e=Array.isArray(t.violations)?t.violations:[],n=[],i=new Set;return e.forEach(t=>{(Array.isArray(t.nodes)?t.nodes:[]).forEach(e=>{const a=(Array.isArray(e.target)?e.target:[]).find(t=>"string"==typeof t&&t.trim().length);if(!a)return;const o=`${a}::${t.id||t.help||""}`;if(i.has(o))return;const r=this.resolveAnnotationTarget(a);r&&(i.add(o),n.push({selector:a,element:r,impact:t.impact||"minor",title:t.help||this.translate("Issue"),description:t.description||"",helpUrl:t.helpUrl||"",failureSummary:e.failureSummary||""}))})}),n.slice(0,50)},createAnnotationMarker(t){const e=document.createElement("button");return e.type="button",e.className="acc-annotation-marker",e.dataset.impact=t.impact||"minor",e.setAttribute("aria-label",t.title),e.title=t.title,e.innerHTML="",e.addEventListener("click",n=>{n.preventDefault(),n.stopPropagation(),this.showAnnotationPopup(t,e)}),e},positionAnnotationPopup(t,e){if(!t||!e)return;const n=e.getBoundingClientRect(),i=t.offsetWidth||300,a=t.offsetHeight||180,o=window.innerWidth,r=window.innerHeight,s=10;let c=window.scrollX+n.left+s,l=window.scrollY+n.bottom+s;c+i>window.scrollX+o-s&&(c=window.scrollX+o-i-s),c<window.scrollX+s&&(c=window.scrollX+s),l+a>window.scrollY+r-s&&(l=window.scrollY+n.top-a-s),l<window.scrollY+s&&(l=window.scrollY+s),t.style.left=`${c}px`,t.style.top=`${l}px`},clearAnnotationPopup(){this.annotationPopup&&(this.annotationPopup.remove(),this.annotationPopup=null)},showAnnotationPopup(t,e){if(!t||!e||!this.annotationLayer)return;this.clearAnnotationPopup();const n=document.createElement("div");n.className="acc-annotation-popup",n.innerHTML=`\n <div class="acc-annotation-popup-header">\n <h3 class="acc-annotation-popup-title">${this.escapeHtml(t.title)}</h3>\n <button type="button" class="acc-annotation-popup-close" aria-label="${this.translate("Close")}">${this.widgetIcons.close}</button>\n </div>\n <p><strong>${this.translate(this.capitalizeFirst(t.impact))}</strong></p>\n <p>${this.escapeHtml(t.description)}</p>\n ${t.failureSummary?`<p><strong>${this.translate("Issue")}:</strong> ${this.escapeHtml(t.failureSummary)}</p>`:""}\n ${t.helpUrl?`<p><a href="${t.helpUrl}" target="_blank" rel="noopener">${this.translate("How to Fix")} →</a></p>`:""}\n `,n.__accMarker=e;const i=n.querySelector(".acc-annotation-popup-close");i?.addEventListener("click",()=>this.clearAnnotationPopup()),this.annotationLayer.appendChild(n),this.annotationPopup=n,this.positionAnnotationPopup(n,e)},positionAnnotations(){Array.isArray(this.annotationItems)&&this.annotationItems.length&&(this.annotationItems.forEach(t=>{if(!t?.target||!t?.marker)return;if(!document.contains(t.target))return void(t.marker.hidden=!0);const e=t.target.getBoundingClientRect();e.width<=0||e.height<=0||e.bottom<0||e.top>window.innerHeight||e.right<0||e.left>window.innerWidth?t.marker.hidden=!0:(t.marker.hidden=!1,t.marker.style.top=`${window.scrollY+e.top+Math.min(16,e.height/2)}px`,t.marker.style.left=`${window.scrollX+e.right}px`)}),this.annotationPopup?.__accMarker&&!this.annotationPopup.__accMarker.hidden&&this.positionAnnotationPopup(this.annotationPopup,this.annotationPopup.__accMarker))},enableAnnotations(t=!1){if(!t)return void this.disableAnnotations();const e=++this.annotationRequestId;this.disableAnnotations({cancelPending:!1});const n=this.ensureAnnotationLayer();this.runBackgroundAxeScan().then(t=>{if(e!==this.annotationRequestId||!this.retrieveState("annotations"))return;const i=this.buildAnnotationEntries(t);this.annotationItems=i.map(t=>{const e=this.createAnnotationMarker(t);return n.appendChild(e),{marker:e,target:t.element,data:t}}),this.annotationRepositionHandler||(this.annotationRepositionHandler=this.throttle(()=>this.positionAnnotations(),80)),window.addEventListener("scroll",this.annotationRepositionHandler,{passive:!0}),window.addEventListener("resize",this.annotationRepositionHandler,{passive:!0}),this.annotationOutsideHandler||(this.annotationOutsideHandler=t=>{if(!this.annotationPopup)return;const e=this.annotationPopup.contains(t.target),n=t.target?.closest?.(".acc-annotation-marker");e||n||this.clearAnnotationPopup()}),document.addEventListener("click",this.annotationOutsideHandler,!0),this.positionAnnotations()}).catch(t=>{console.warn("Failed to render annotations:",t)})},disableAnnotations({cancelPending:t=!0}={}){t&&(this.annotationRequestId+=1),this.clearAnnotationPopup(),this.annotationOutsideHandler&&document.removeEventListener("click",this.annotationOutsideHandler,!0),this.annotationRepositionHandler&&(window.removeEventListener("scroll",this.annotationRepositionHandler),window.removeEventListener("resize",this.annotationRepositionHandler)),this.annotationLayer&&(this.annotationLayer.remove(),this.annotationLayer=null),this.annotationItems=[]},clearSimpleLayoutDomMutations(){this.simpleLayoutRoot&&(this.simpleLayoutRoot.classList.remove("acc-simple-layout-root"),this.simpleLayoutRoot=null),Array.isArray(this.simpleLayoutHiddenElements)&&this.simpleLayoutHiddenElements.forEach(t=>{t&&t.classList&&t.classList.remove("acc-simple-layout-hidden")}),this.simpleLayoutHiddenElements=[]},applySimpleLayoutDomMutations(){const t=this.getPrimaryContentRoot();if(!t||!document.body)return;this.simpleLayoutRoot=t,t.classList.add("acc-simple-layout-root");const e=[];Array.from(document.body.children).forEach(n=>{n instanceof Element&&(n.classList.contains("acc-container")||n===t||n.contains(t)||(n.classList.add("acc-simple-layout-hidden"),e.push(n)))});const n=["aside","nav","form","footer",'[role="complementary"]','[role="search"]','[role="contentinfo"]','[aria-hidden="true"]','[class*="cookie"]','[id*="cookie"]','[class*="banner"]','[id*="banner"]','[class*="popup"]','[id*="popup"]','[class*="modal"]','[id*="modal"]','[class*="advert"]','[id*="advert"]','[class*="ads"]','[id*="ads"]','[class*="sidebar"]','[id*="sidebar"]','[class*="social"]','[id*="social"]','[class*="share"]','[id*="share"]','[class*="newsletter"]','[id*="newsletter"]','[class*="related"]','[id*="related"]','[class*="comment"]','[id*="comment"]','[class*="footer"]','[id*="footer"]','[class*="promo"]','[id*="promo"]'].join(",");t.querySelectorAll(n).forEach(n=>{n instanceof Element&&(n.closest(".acc-container")||n!==t&&(n.classList.add("acc-simple-layout-hidden"),e.push(n)))}),this.simpleLayoutHiddenElements=e},enableSimpleLayout(t=!1){const e="body.acc-simple-layout-enabled",n=`${e} .acc-simple-layout-root`,i=":not(.acc-container):not(.acc-container *)",a={id:"simple-layout",css:`\n /* ── Body & root container ── */\n ${e} {\n background: #fff !important;\n }\n\n ${e} .acc-simple-layout-hidden {\n display: none !important;\n }\n\n ${n} {\n max-width: 72ch !important;\n margin: 0 auto !important;\n padding: clamp(20px, 4vw, 40px) 20px !important;\n position: relative !important;\n border-radius: 0 !important;\n box-shadow: none !important;\n }\n\n /* ── Universal decoration strip ── */\n ${n} :where(*)${i} {\n background-color: transparent !important;\n background-image: none !important;\n box-shadow: none !important;\n text-shadow: none !important;\n border-color: transparent !important;\n }\n\n /* ── Layout linearization ── */\n ${n} :where(div, section, article, header, main, footer, figure, figcaption, details, summary, hgroup, search)${i} {\n display: block !important;\n position: static !important;\n float: none !important;\n transform: none !important;\n columns: auto !important;\n column-count: auto !important;\n width: auto !important;\n min-width: 0 !important;\n max-width: 100% !important;\n margin-left: 0 !important;\n margin-right: 0 !important;\n padding-left: 0 !important;\n padding-right: 0 !important;\n }\n\n /* ── Color reset ── */\n ${n} :where(h1, h2, h3, h4, h5, h6)${i} {\n color: #111 !important;\n }\n\n ${n} :where(p, li, dt, dd, td, th, span, blockquote, figcaption, label, summary, details)${i} {\n color: #222 !important;\n }\n\n ${n} :where(a)${i} {\n color: #1a0dab !important;\n }\n\n ${n} :where(a:visited)${i} {\n color: #681da8 !important;\n }\n\n /* ── Typography ── */\n ${n} :where(*)${i} {\n font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;\n }\n\n ${n} :where(p, li, dt, dd, blockquote, figcaption, td, th, label, summary)${i} {\n font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem) !important;\n line-height: 1.8 !important;\n letter-spacing: 0.01em !important;\n max-width: 70ch !important;\n }\n\n ${n} :where(h1)${i} {\n font-size: 2em !important;\n line-height: 1.2 !important;\n margin: 0.67em 0 !important;\n font-weight: 700 !important;\n }\n\n ${n} :where(h2)${i} {\n font-size: 1.5em !important;\n line-height: 1.25 !important;\n margin: 0.83em 0 !important;\n font-weight: 700 !important;\n }\n\n ${n} :where(h3)${i} {\n font-size: 1.25em !important;\n line-height: 1.3 !important;\n margin: 1em 0 !important;\n font-weight: 600 !important;\n }\n\n ${n} :where(h4, h5, h6)${i} {\n font-size: 1.1em !important;\n line-height: 1.35 !important;\n margin: 1em 0 !important;\n font-weight: 600 !important;\n }\n\n /* ── Decorative images hidden ── */\n ${n} :where(img[role="presentation"], img[alt=""], img:not([alt]), svg[aria-hidden="true"])${i} {\n display: none !important;\n }\n\n /* ── Meaningful borders restored ── */\n ${n} :where(hr)${i} {\n border: none !important;\n border-top: 1px solid #d1d5db !important;\n margin: 1.5em 0 !important;\n }\n\n ${n} :where(blockquote)${i} {\n border-left: 4px solid #d1d5db !important;\n padding-left: 1em !important;\n margin-left: 0 !important;\n font-style: italic !important;\n }\n\n ${n} :where(table)${i} {\n border-collapse: collapse !important;\n max-width: 100% !important;\n overflow-x: auto !important;\n display: table !important;\n }\n\n ${n} :where(th, td)${i} {\n border: 1px solid #d1d5db !important;\n padding: 8px 12px !important;\n text-align: left !important;\n }\n\n ${n} :where(th)${i} {\n font-weight: 600 !important;\n background: #f8f9fa !important;\n }\n\n /* ── Lists ── */\n ${n} :where(ul, ol)${i} {\n padding-left: 1.5em !important;\n margin: 0.75em 0 !important;\n }\n\n ${n} :where(li)${i} {\n display: list-item !important;\n margin: 0.25em 0 !important;\n }\n\n /* ── Code blocks ── */\n ${n} :where(pre)${i} {\n background: #f6f8fa !important;\n border-radius: 6px !important;\n padding: 1em !important;\n overflow-x: auto !important;\n max-width: 100% !important;\n }\n\n ${n} :where(code, kbd, samp)${i} {\n font-family: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace !important;\n font-size: 0.9em !important;\n }\n\n ${n} :where(code):not(pre code)${i} {\n background: #f0f2f5 !important;\n padding: 0.15em 0.4em !important;\n border-radius: 3px !important;\n }\n\n /* ── Empty wrapper collapse ── */\n ${n} :where(div:empty)${i} {\n display: none !important;\n }\n\n /* ── Media ── */\n ${n} :where(img, video, iframe)${i} {\n max-width: 100% !important;\n height: auto !important;\n border-radius: 4px !important;\n }\n `};this.applyToolStyle({...a,enable:t}),document.body?.classList.toggle("acc-simple-layout-enabled",!!t),this.clearSimpleLayoutDomMutations(),t&&this.applySimpleLayoutDomMutations()},applyEnhancements(){const{states:t}=this.loadConfig();if(!(!t||!Object.prototype.hasOwnProperty.call(t,"text-scale"))){const e=!1===t["text-scale"]?1:t["text-scale"],n=this.setTextScaleFromPercent(e,{persist:!1});this.syncTextScaleControlUI(document.querySelector(".acc-menu"),n)}else this.textScaleIndex=0,this.multiLevelFeatures["text-scale"]&&(this.multiLevelFeatures["text-scale"].currentIndex=-1),this.scaleText(1),this.syncTextScaleControlUI(document.querySelector(".acc-menu"),1);this.concealImages(t&&t["hide-images"]),this.highlightTitles(t&&t["highlight-title"]),this.highlightLinks(t&&t["highlight-links"]),this.adjustLetterSpacing(t&&t["letter-spacing"]),this.adjustLineSpacing(t&&t["line-spacing"]),this.enableBoldText(t&&t["bold-text"]),this.enableReadableText(t&&t["readable-text"]),this.enableReadingAid(t&&t["reading-aid"]),this.pauseMotion(t&&t["pause-motion"]),this.enableLargePointer(t&&t["large-pointer"]),this.enableHighContrastMode(t&&t["high-contrast-mode"]),this.enableAnnotations(t&&t.annotations),this.enableTextToSpeech(t&&t["text-to-speech"]),this.enableSimpleLayout(t&&t["simple-layout"])},isColorFilterKey(t){return Array.isArray(this.colorFilterKeys)&&this.colorFilterKeys.includes(t)},getActiveColorFilterKey(t=this.widgetConfig.states){if(!this.colorFilterKeys||!this.colorFilterKeys.length)return null;if(!t)return this.activeColorFilterKey||null;for(const e of this.colorFilterKeys)if(t[e])return e;return null},setColorFilterUI(t,e=null){if(!t||!t.querySelectorAll)return;const n=this.multiLevelFeatures?.["contrast-toggle"],i=t.querySelector('.acc-btn[data-key="contrast-toggle"]');if(n){const t=n.values.indexOf(e);if(n.currentIndex=t,this.updateContrastToggleButton(i,t),i){const e=t>=0;i.classList.toggle("acc-selected",e),i.setAttribute("aria-pressed",e?"true":"false");const n=i.querySelector('.acc-progress-indicator[data-feature="contrast-toggle"]');if(n){n.querySelectorAll(".acc-progress-dot").forEach((e,n)=>{e.classList.toggle("active",n===t)})}}}const a=this.multiLevelFeatures?.["saturation-toggle"],o=t.querySelector('.acc-btn[data-key="saturation-toggle"]');if(a){const t=a.values.indexOf(e);if(a.currentIndex=t,this.updateSaturationToggleButton(o,t),o){const e=t>=0;o.classList.toggle("acc-selected",e),o.setAttribute("aria-pressed",e?"true":"false");const n=o.querySelector('.acc-progress-indicator[data-feature="saturation-toggle"]');if(n){n.querySelectorAll(".acc-progress-dot").forEach((e,n)=>{e.classList.toggle("active",n===t)})}}}this.colorFilterKeys.forEach(n=>{const i=t.querySelector(`.acc-btn[data-key="${n}"]`);if(!i)return;const a=n===e;i.classList.toggle("acc-selected",a),i.setAttribute("aria-pressed",a?"true":"false")})},updateColorFilterState(t=null,e="user"){if(!this.colorFilterKeys||!this.colorFilterKeys.length)return void(this.activeColorFilterKey=null);const n=this.widgetConfig.states||{},i={};let a=!1;this.colorFilterKeys.forEach(e=>{const o=n[e];t===e?!0!==o&&(i[e]=!0,a=!0):o&&(i[e]=!1,a=!0)}),a&&this.updateState(i,{source:e}),this.activeColorFilterKey=t},computeFilteredBodyColor(t){const e=window.getComputedStyle(document.body).backgroundColor.match(/rgba?\(\s*(\d+),\s*(\d+),\s*(\d+)/);if(!e)return null;let n=+e[1],i=+e[2],a=+e[3];const o=t=>Math.min(255,Math.max(0,Math.round(t)));switch(t){case"invert-colors":n=255-n,i=255-i,a=255-a;break;case"dark-contrast":n=128+1.5*(n-128),i=128+1.5*(i-128),a=128+1.5*(a-128),n*=.8,i*=.8,a*=.8;break;case"light-contrast":n=128+1.25*(n-128),i=128+1.25*(i-128),a=128+1.25*(a-128),n*=1.2,i*=1.2,a*=1.2;break;case"low-saturation":{const t=.5,e=(.213-.213*t)*n+(.715+.285*t)*i+(.072-.072*t)*a,o=(.213-.213*t)*n+(.715-.715*t)*i+(.072+.928*t)*a;n=(.213+.787*t)*n+(.715-.715*t)*i+(.072-.072*t)*a,i=e,a=o;break}case"high-saturation":{const t=2,e=(.213-.213*t)*n+(.715+.285*t)*i+(.072-.072*t)*a,o=(.213-.213*t)*n+(.715-.715*t)*i+(.072+.928*t)*a;n=(.213+.787*t)*n+(.715-.715*t)*i+(.072-.072*t)*a,i=e,a=o;break}default:return null}return n=o(n),i=o(i),a=o(a),n===+e[1]&&i===+e[2]&&a===+e[3]?null:`rgb(${n},${i},${a})`},applyVisualFilters(){const{states:t}=this.loadConfig(),e=this.getActiveColorFilterKey(t);if(this.activeColorFilterKey=e,!e){const t=document.getElementById("acc-filter-style");return void(t&&t.remove())}const n=this.visualFilters[e];if(!n){const t=document.getElementById("acc-filter-style");return void(t&&t.remove())}const i={...n,selector:n.selector||"body > *:not(.acc-container):not(.acc-rg-container):not(#acc-skip-link)"};let a=this.buildCSS(i);const o=this.computeFilteredBodyColor(e);o&&(a+=`body{background-color:${o}!important;}`),this.injectStyle("acc-filter-style",a)},cycleTextScale(t=!1){t?(this.textScaleIndex=(this.textScaleIndex+1)%this.textScaleValues.length,this.multiLevelFeatures["text-scale"]&&(this.multiLevelFeatures["text-scale"].currentIndex=this.textScaleIndex)):(this.textScaleIndex=0,this.multiLevelFeatures["text-scale"]&&(this.multiLevelFeatures["text-scale"].currentIndex=-1));const e=document.querySelector('.acc-progress-indicator[data-feature="text-scale"]');if(e){const n=e.querySelectorAll(".acc-progress-dot");n.forEach(t=>t.classList.remove("active")),t&&this.textScaleIndex<n.length&&n[this.textScaleIndex].classList.add("active")}const n=t?this.textScaleValues[this.textScaleIndex]:1;return this.scaleText(n),this.updateState({"text-scale":n}),this.textScaleIndex},cycleMultiLevelFeature(t,e){const n=this.multiLevelFeatures[t];if(!n||!e)return;if("contrast-toggle"===t||"saturation-toggle"===t){const t=n.currentIndex+1,i=t>=n.levels?null:n.values[t];return this.updateColorFilterState(i),this.setColorFilterUI(e.closest(".acc-menu"),i),void this.applyVisualFilters()}const i=n.currentIndex+1;if(i>=n.levels)n.currentIndex=-1,e.classList.remove("acc-selected"),e.setAttribute("aria-pressed","false"),this.updateState({[t]:"text-scale"===t&&1}),"text-scale"===t&&(this.textScaleIndex=0);else{n.currentIndex=i,e.classList.add("acc-selected"),e.setAttribute("aria-pressed","true");const a=n.values[i];this.updateState({[t]:a}),"text-scale"===t&&(this.textScaleIndex=i)}const a=e.querySelector(`.acc-progress-indicator[data-feature="${t}"]`);if(a){a.querySelectorAll(".acc-progress-dot").forEach((t,e)=>{t.classList.toggle("active",e===n.currentIndex)})}if("text-scale"===t){const t=n.currentIndex>=0?n.values[n.currentIndex]:1;this.scaleText(t)}else this.applyVisualFilters()},resetEnhancements(){this.saveConfig({states:{},systemDefaults:{}}),this.textScaleIndex=0,this.activeColorFilterKey=null,Object.keys(this.multiLevelFeatures).forEach(t=>{this.multiLevelFeatures[t].currentIndex=-1});document.querySelectorAll(".acc-selected").forEach(t=>{t.classList.remove("acc-selected"),t.setAttribute("aria-pressed","false")});document.querySelectorAll(".acc-progress-indicator").forEach(t=>{t.querySelectorAll(".acc-progress-dot").forEach(t=>t.classList.remove("active"))});const t=document.querySelector(".acc-menu");t&&(this.setColorFilterUI(t,null),this.syncTextScaleControlUI(t,1)),document.activeElement&&document.activeElement.blur();["acc-bold-text","acc-letter-spacing","acc-line-spacing","acc-large-pointer","acc-highlight-links","acc-highlight-title","acc-readable-text","acc-pause-motion","acc-hide-images","acc-filter-style","acc-simple-layout"].forEach(t=>{const e=document.getElementById(t);e&&e.remove()}),this.clearSimpleLayoutDomMutations(),document.documentElement.classList.remove("acc-filter","acc-saturation","acc-bold-text","acc-letter-spacing","acc-line-spacing","acc-large-pointer","acc-highlight-links","acc-highlight-title","acc-readable-text","acc-pause-motion","acc-hide-images","acc-high-contrast-mode","acc-simple-layout"),document.body?.classList.remove("acc-simple-layout-enabled"),document.body?.classList.remove("acc-high-contrast-mode"),this.disconnectTextScaleObserver(),this.currentTextScaleMultiplier=1;document.querySelectorAll("[data-acc-baseSize]").forEach(t=>{t instanceof Element&&!this.shouldSkipScaling(t)&&(t.style.fontSize="",t.removeAttribute("data-acc-baseSize"))});let e=this.findElement(".acc-rg-container");e&&(e.remove(),window.__accweb__scrollGuide&&(document.removeEventListener("mousemove",window.__accweb__scrollGuide),delete window.__accweb__scrollGuide)),this.disableAnnotations(),this.stopSpeech(),this.stopTtsClickMode(),this.clearSystemPreferenceListeners(),this.detectSystemPreferences(),this.setupMediaQueryListeners(),this.updateViolationBubble(this.axeScanResults),this._fireCallback("onReset")}},g={_fireCallback(t,...e){const n=this.options&&this.options[t];if("function"==typeof n)try{n(...e)}catch(e){console.warn(`[AllyWidget] Callback "${t}" threw:`,e)}},translate(t){const{lang:e}=this.loadConfig();return(this.translations[e]||this.translations.en)[t]||t},getLanguageCountryLabel:t=>({en:"USA",ne:"Nepal"}[t]||String(t||"").toUpperCase()),getLanguageFlag(t){const e=({en:"US",ne:"NP"}[t]||String(t||"").slice(0,2)).toUpperCase();return/^[A-Z]{2}$/.test(e)?String.fromCodePoint(...e.split("").map(t=>127397+t.charCodeAt(0))):""},formatLanguageLabel(t){if(!t)return"English (USA)";return`${String(t.label||t.code||"").split("(")[0].trim()||String(t.code||"en").toUpperCase()} (${this.getLanguageCountryLabel(t.code)})`},getWidgetIconMarkup(t){const e="string"==typeof t?t.trim().toLowerCase():"",n=this.widgetIcons?.accessibilityVariants||{};return n[e]||n.default||this.widgetIcons.accessibility},throttle(t,e){let n;return function(...i){n||(t.apply(this,i),n=!0,setTimeout(()=>n=!1,e))}},getFocusableElements(t){if(!t)return[];const e=["a[href]","button:not([disabled])","input:not([disabled])","textarea:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),n="undefined"!=typeof document,i=n?document.activeElement:null;return Array.from(t.querySelectorAll(e)).filter(t=>{if(t.hasAttribute("disabled"))return!1;if("true"===t.getAttribute("aria-hidden"))return!1;if(t.closest('[aria-hidden="true"]'))return!1;const e=t.getBoundingClientRect(),a="undefined"!=typeof window&&window.getComputedStyle?window.getComputedStyle(t):{visibility:"visible",display:"block"};return(e.width>0||e.height>0||n&&t===i)&&"hidden"!==a.visibility&&"none"!==a.display})},openMenu(t,e){if(!t)return;const n=this.findElement(".acc-menu",t);this.activeMenuContainer=t,this.activeMenuToggle=e||this.activeMenuToggle,this.previousFocus=document.activeElement&&"function"==typeof document.activeElement.focus?document.activeElement:null,t.style.display="block",n&&(n.setAttribute("aria-hidden","false"),n.setAttribute("aria-modal","true"),n.hasAttribute("tabindex")||n.setAttribute("tabindex","-1")),this.activeMenuToggle&&this.activeMenuToggle.setAttribute("aria-expanded","true");const i=this.getFocusableElements(t);i.length?i[0].focus():n&&n.focus(),this.menuKeyListener&&document.removeEventListener("keydown",this.menuKeyListener,!0),this.menuKeyListener=t=>{if(this.activeMenuContainer){if("Escape"===t.key||"Esc"===t.key)return t.preventDefault(),void this.closeMenu(this.activeMenuContainer);if("Tab"===t.key){const e=this.getFocusableElements(this.activeMenuContainer);if(!e.length)return void t.preventDefault();const n=e[0],i=e[e.length-1];t.shiftKey?document.activeElement===n&&(t.preventDefault(),i.focus()):document.activeElement===i&&(t.preventDefault(),n.focus())}}},document.addEventListener("keydown",this.menuKeyListener,!0),this._fireCallback("onOpen")},closeMenu(t,e){const n=t||this.activeMenuContainer;if(!n)return;const i=this.findElement(".acc-menu",n);n.style.display="none",i&&(i.setAttribute("aria-hidden","true"),i.setAttribute("aria-modal","false"));const a=this.findElement("#acc-lang-modal",n);a&&a.setAttribute("hidden","");const o=this.findElement(".acc-footer-lang-toggle",n);o&&o.setAttribute("aria-expanded","false");const r=this.findElement("#acc-lang-search",n);r&&(r.value=""),n.querySelectorAll(".acc-lang-item").forEach(t=>{t.style.display=""}),this.menuKeyListener&&(document.removeEventListener("keydown",this.menuKeyListener,!0),this.menuKeyListener=null);const s=e||this.activeMenuToggle;s&&s.setAttribute("aria-expanded","false");const c=s||this.previousFocus;c&&"function"==typeof c.focus&&c.focus(),this.stopSpeech(),this.activeMenuContainer=null,this.activeMenuToggle=null,this.previousFocus=null,this._fireCallback("onClose")},renderOptions(t,e){let n="";for(let i=0;i<t.length;i++){const a=t[i];if(a.requiresSpeechSynthesis&&!this.supportsTextToSpeech())continue;const o=!0===a.multiLevel,r=[e,a.optionClass].filter(Boolean).join(" ");let s="";if(o){const t=this.multiLevelFeatures[a.key];if(t){s=`<div class="acc-progress-indicator" data-feature="${a.key}">`;for(let e=0;e<t.levels;e++){s+=`<div class="acc-progress-dot${t.currentIndex===e?" active":""}" data-level="${e}"> </div>`}s+=" </div>"}}n+=`<button\n class="acc-btn ${r} ${this.multiLevelFeatures[a.key]?.currentIndex>=0?"acc-selected":""}"\n type="button"\n data-key="${a.key}"\n data-multi-level="${o}"\n title="${a.label}"\n aria-label="${a.label}"\n aria-pressed="${this.multiLevelFeatures[a.key]?.currentIndex>=0||!1}"\n aria-controls="acc-menu-content">\n ${a.icon}\n <span class="acc-label">${a.label}</span>\n ${s}\n </button>`}return n},renderTextScaleControl(t=1){const e=this.getTextScalePercent(t),n=Number(this.textScaleMinPercent)||80,i=Number(this.textScaleMaxPercent)||150,a=Number(this.textScaleStepPercent)||5,o=(e-n)/(i-n)*100;return`\n <div class="acc-text-scale-control" data-key="text-scale">\n <div class="acc-text-scale-meta">\n <span class="acc-text-scale-icon" aria-hidden="true">${this.widgetIcons.adjustFontSize}</span>\n <span class="acc-label" data-acc-text="Font Size">Font Size</span>\n <span class="acc-text-scale-percent">${e}%</span>\n </div>\n <input\n type="range"\n class="acc-text-scale-range"\n min="${n}"\n max="${i}"\n step="${a}"\n value="${e}"\n data-acc-text="Font Size"\n aria-label="Font Size"\n style="--acc-text-scale-progress: ${Math.max(0,Math.min(100,o))}%">\n </div>\n `},getTranslatedText(t,e){let n=t.getAttribute("data-acc-text");return!n&&e&&(n=e,t.setAttribute("data-acc-text",n)),this.translate(n)},translateMenuUI(t){t.querySelectorAll(".acc-section-title, .acc-label").forEach(t=>{t.innerText=this.getTranslatedText(t,t.innerText.trim())}),t.querySelectorAll("[title]").forEach(t=>{t.setAttribute("title",this.getTranslatedText(t,t.getAttribute("title")))}),t.querySelectorAll("[aria-label]").forEach(t=>{t.setAttribute("aria-label",this.getTranslatedText(t,t.getAttribute("aria-label")))}),this.updateSkipLinkLabel()},displayMenu({container:t,lang:e,position:n="bottom-right",offset:i=[20,20],size:a,icon:o}){try{this.applyThemeVariables(),this.registerStaticStyles();const r=String(e||"en").split(/[_-]/)[0].toLowerCase(),s=this.options?.poweredByText||"Ally Widget",c=this.options?.poweredByUrl||"",l=`\n <div class="acc-menu" role="dialog" aria-labelledby="accessibility-title">\n <div class="acc-menu-header">\n <div id="accessibility-title" class="acc-menu-title">\n <span class="acc-menu-title-icon" aria-hidden="true">${this.getWidgetIconMarkup(o)}</span>\n <span class="acc-label">Accessibility</span>\n </div>\n <div class="acc-header-actions"></div>\n </div>\n <div id="acc-menu-content" class="acc-menu-content">\n <div class="acc-options-all"> </div>\n </div>\n <div class="acc-footer">\n <button type="button" class="acc-footer-reset" title="Reset settings" aria-label="Reset settings">\n ${this.widgetIcons.reset}\n <span class="acc-label">Reset settings</span>\n </button>\n <div class="acc-footer-meta">\n <a href="${c}" target="_blank" rel="noopener noreferrer">${s}</a>\n <button type="button" class="acc-footer-lang-toggle" title="Language" aria-label="Language" aria-expanded="false" aria-controls="acc-lang-modal">\n <span id="acc-current-language" class="acc-footer-lang-current">${String(r||"en").toUpperCase()}</span>\n <span class="acc-footer-lang-arrow" aria-hidden="true"> </span>\n </button>\n </div>\n <div id="acc-lang-modal" class="acc-lang-modal" hidden>\n <div class="acc-lang-modal-header">\n <div class="acc-section-title acc-label">All Languages</div>\n </div>\n <div class="acc-lang-search-wrapper">\n <input type="text" id="acc-lang-search" class="acc-lang-search" placeholder="Search language" aria-label="Search language">\n </div>\n <div class="acc-lang-list">\n ${this.supportedLanguages.map(t=>{const e=this.formatLanguageLabel(t),n=this.getLanguageFlag(t.code);return`<button type="button" class="acc-lang-item${t.code===r?" selected":""}" data-lang="${t.code}" aria-label="${e}">\n <span class="acc-lang-item-main">\n <span class="acc-lang-flag" aria-hidden="true">${n}</span>\n <span class="acc-lang-item-label">${e}</span>\n </span>\n <span class="acc-icon-check" aria-hidden="true"> </span>\n </button>`}).join("")}\n </div>\n </div>\n </div>\n </div>\n <div class="acc-overlay"> </div>\n `,d=document.createElement("div");d.innerHTML=l,d.style.display="none";const p=this.findElement(".acc-menu",d);p&&(p.setAttribute("aria-hidden","true"),p.hasAttribute("tabindex")||p.setAttribute("tabindex","-1"));"bottom-right"===n||"top-right"===n||"right"===this.widgetTheme.menuPosition?(p.style.right="var(--acc-menu-inline-gap, 12px)",p.style.left="auto"):(p.style.left="var(--acc-menu-inline-gap, 12px)",p.style.right="auto");const h=(this.normalizeOffset(i)||[20,20])[1]??25,u=null!=a&&""!==String(a).trim()?this.normalizeButtonSize(a):this.widgetTheme?.buttonSize||"52px";"bottom-right"===n||"bottom-left"===n?p.style.bottom=`calc(${h}px + ${u} + 16px)`:"top-right"!==n&&"top-left"!==n||(p.style.top=`calc(${h}px + ${u} + 16px)`);const g=this.loadConfig(),m=new Set(["text-scale","bold-text","line-spacing","letter-spacing","readable-text"]),f=new Set(["contrast-toggle","invert-colors","saturation-toggle","high-contrast-mode"]),x=new Set(["reading-aid","highlight-links","highlight-title","simple-layout"]),b=[...this.contentOptions.map(t=>({...t})),...this.colorOptions.map(t=>({...t,optionClass:"acc-filter"})),...this.accessTools.map(t=>({...t,optionClass:"acc-tools"}))],v={speech:[],text:[],color:[],reading:[],interaction:[]},y=new Set;b.forEach(t=>{t?.key&&!y.has(t.key)&&(y.add(t.key),"text-to-speech"!==t.key?m.has(t.key)?v.text.push(t):f.has(t.key)?v.color.push(t):x.has(t.key)?v.reading.push(t):v.interaction.push(t):v.speech.push(t))});const w=[{key:"speech",label:"Speech",containerClass:"acc-tts-toggle-container",optionClass:"acc-tts-toggle"},{key:"text",label:"Text",containerClass:"acc-options acc-options-text"},{key:"color",label:"Color & Contrast",containerClass:"acc-options"},{key:"reading",label:"Reading Aids",containerClass:"acc-options"},{key:"interaction",label:"Interaction",containerClass:"acc-options"}].map(t=>{let e=v[t.key],n="";if("text"===t.key){const i=e.find(t=>"text-scale"===t.key);e=e.filter(t=>"text-scale"!==t.key);const a=["line-spacing","letter-spacing","bold-text","readable-text"];e.sort((t,e)=>{const n=a.indexOf(t.key),i=a.indexOf(e.key);return(-1===n?Number.MAX_SAFE_INTEGER:n)-(-1===i?Number.MAX_SAFE_INTEGER:i)}),i&&(n=this.renderTextScaleControl(g.states?.["text-scale"]||1));const o=new Set(["line-spacing","letter-spacing"]),r=new Set(["bold-text","readable-text"]),s=e.filter(t=>o.has(t.key)),c=e.filter(t=>r.has(t.key)),l=e.filter(t=>!o.has(t.key)&&!r.has(t.key)),d=s.length?`<div class="acc-options acc-options-text-inline">${this.renderOptions(s,"acc-text-inline")}</div>`:"",p=c.length?`<div class="acc-options acc-options-text-inline">${this.renderOptions(c,"acc-text-inline")}</div>`:"",h=l.length?`<div class="${t.containerClass}">${this.renderOptions(l,t.optionClass||"")}</div>`:"";return n||d||p||h?`<section class="acc-option-category acc-option-category-${t.key}"><div class="acc-section-title acc-label">${t.label}</div>${n}${d}${p}${h}</section>`:""}if("color"===t.key){const n=["contrast-toggle","saturation-toggle","invert-colors","high-contrast-mode"];e.sort((t,e)=>{const i=n.indexOf(t.key),a=n.indexOf(e.key);return(-1===i?Number.MAX_SAFE_INTEGER:i)-(-1===a?Number.MAX_SAFE_INTEGER:a)});const i=new Set(["contrast-toggle","saturation-toggle"]),a=new Set(["invert-colors","high-contrast-mode"]),o=e.filter(t=>i.has(t.key)),r=e.filter(t=>a.has(t.key)),s=e.filter(t=>!i.has(t.key)&&!a.has(t.key)),c=o.length?`<div class="acc-options acc-options-text-inline">${this.renderOptions(o,"acc-text-inline")}</div>`:"",l=r.length?`<div class="acc-options acc-options-text-inline">${this.renderOptions(r,"acc-text-inline")}</div>`:"",d=s.length?`<div class="${t.containerClass}">${this.renderOptions(s,t.optionClass||"")}</div>`:"";return c||l||d?`<section class="acc-option-category acc-option-category-${t.key}"><div class="acc-section-title acc-label">Color & Contrast</div>${c}${l}${d}</section>`:""}if("reading"===t.key){const n=["highlight-links","highlight-title","reading-aid","simple-layout"];e.sort((t,e)=>{const i=n.indexOf(t.key),a=n.indexOf(e.key);return(-1===i?Number.MAX_SAFE_INTEGER:i)-(-1===a?Number.MAX_SAFE_INTEGER:a)});const i=new Set(["highlight-links","highlight-title"]),a=new Set(["reading-aid","simple-layout"]),o=e.filter(t=>i.has(t.key)),r=e.filter(t=>a.has(t.key)),s=e.filter(t=>!i.has(t.key)&&!a.has(t.key)),c=o.length?`<div class="acc-options acc-options-text-inline">${this.renderOptions(o,"acc-text-inline")}</div>`:"",l=r.length?`<div class="acc-options acc-options-text-inline">${this.renderOptions(r,"acc-text-inline")}</div>`:"",d=s.length?`<div class="${t.containerClass}">${this.renderOptions(s,t.optionClass||"")}</div>`:"";return c||l||d?`<section class="acc-option-category acc-option-category-${t.key}"><div class="acc-section-title acc-label">Reading Aids</div>${c}${l}${d}</section>`:""}const i=e.length?this.renderOptions(e,t.optionClass||""):"";if(!n&&!i.trim())return"";const a=i.trim()?`<div class="${t.containerClass}">${i}</div>`:"";return`<section class="acc-option-category acc-option-category-${t.key}"><div class="acc-section-title acc-label">${t.label}</div>${n}${a}</section>`}).join("");p.querySelector(".acc-options-all").innerHTML=w;const S=this.findElement("#acc-lang-modal",p),k=this.findElement(".acc-footer-lang-toggle",p),T=this.findElement("#acc-lang-search",p),C=p.querySelectorAll(".acc-lang-item"),L=()=>{S&&S.setAttribute("hidden",""),k&&k.setAttribute("aria-expanded","false"),T&&(T.value=""),C.forEach(t=>{t.style.display=""})},E=()=>{S&&S.removeAttribute("hidden"),k&&k.setAttribute("aria-expanded","true"),T&&T.focus()};k&&S&&k.addEventListener("click",t=>{t.stopPropagation(),S.hasAttribute("hidden")?E():L()}),T&&T.addEventListener("input",()=>{const t=T.value.toLowerCase();C.forEach(e=>{const n=e.querySelector(".acc-lang-item-label"),i=(n?.textContent||e.textContent).toLowerCase();e.style.display=i.includes(t)?"":"none"})}),C.forEach(t=>{t.addEventListener("click",()=>{const e=t.getAttribute("data-lang");if(!e)return;C.forEach(t=>t.classList.remove("selected")),t.classList.add("selected");const n=this.findElement("#acc-current-language",p);n&&(n.textContent=String(e).toUpperCase()),L(),this.saveConfig({lang:e}),this.translateMenuUI(d)})});const q=this.findElement(".acc-text-scale-range",p);q&&(q.addEventListener("input",()=>{const t=this.setTextScaleFromPercent(q.value,{persist:!1});this.syncTextScaleControlUI(p,t)}),q.addEventListener("change",()=>{const t=this.setTextScaleFromPercent(q.value,{persist:!0});this.syncTextScaleControlUI(p,t),this._fireCallback("onFeatureToggle","text-scale",t)}),this.syncTextScaleControlUI(p,g.states?.["text-scale"]||1)),p.addEventListener("click",t=>{if(S&&!S.hasAttribute("hidden")){const e=Boolean(t.target.closest(".acc-lang-modal")),n=Boolean(t.target.closest(".acc-footer-lang-toggle"));e||n||L()}const e=t.target.closest('[role="button"], button, .acc-overlay');if(!e)return;if(e.classList.contains("acc-overlay"))return void this.closeMenu(d);if(e.classList.contains("acc-footer-reset"))return void this.resetEnhancements();const n=e.classList.contains("acc-btn")?e:null;if(n){const t=n.dataset.key;if("accessibility-report"===t)this.runAccessibilityReport();else if(this.multiLevelFeatures[t])this.cycleMultiLevelFeature(t,n),this._fireCallback("onFeatureToggle",t,this.multiLevelFeatures[t].currentIndex>=0);else if(this.isColorFilterKey(t)){const e=n.classList.contains("acc-selected")?null:t;this.setColorFilterUI(p,e),this.updateColorFilterState(e),this.applyVisualFilters(),this._fireCallback("onFeatureToggle",t,!!e)}else{const e=!n.classList.contains("acc-selected");n.classList.toggle("acc-selected",e),n.setAttribute("aria-pressed",e),this.userInitiatedToggleKey=t;try{this.updateState({[t]:e}),this.applyEnhancements(),this._fireCallback("onFeatureToggle",t,e)}finally{this.userInitiatedToggleKey=null}}}}),p.querySelectorAll('[role="button"], button').forEach(t=>{t.addEventListener("keydown",e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),t.click())})}),this.translateMenuUI(d);const A=this.getActiveColorFilterKey(g.states);if(this.setColorFilterUI(p,A),this.updateColorFilterState(A),g.states)for(let t in g.states)if(!this.isColorFilterKey(t)&&g.states[t]&&"text-scale"!==t){const e=this.findElement(`.acc-btn[data-key="${t}"]`,p);e&&(e.classList.add("acc-selected"),e.setAttribute("aria-pressed","true"))}return t.appendChild(d),d}catch(t){return console.error("[AllyWidget] Error displaying menu:",t),null}},displayWidget(t){try{this.applyThemeVariables(),this.registerStaticStyles();const e=`\n <div class="acc-widget">\n <a href="#" id="allyWidget" class="acc-toggle-btn" title="Open Accessibility Menu" role="button" aria-label="Open accessibility menu" aria-expanded="false">\n <span class="acc-toggle-icon" aria-hidden="true">${this.getWidgetIconMarkup(t?.icon)}</span>\n <span class="acc-violation-bubble" data-severity="warning" hidden> </span>\n </a>\n </div>\n `,n=document.createElement("div");n.innerHTML=e,n.classList.add("acc-container");const i=this.findElement(".acc-toggle-btn",n);this.violationBubble=this.findElement(".acc-violation-bubble",n),this.widgetToggleButton=i;const{position:a="bottom-right",offset:o=[20,20],size:r}=t,s=this.normalizeOffset(o)||[20,20],c=s[0]??20,l=s[1]??25;let d,p={left:`${c}px`,bottom:`${l}px`};if("bottom-right"===a?p={right:`${c}px`,left:"auto",bottom:`${l}px`}:"top-left"===a?p={top:`${l}px`,bottom:"auto",left:`${c}px`}:"top-right"===a&&(p={top:`${l}px`,right:`${c}px`,bottom:"auto",left:"auto"}),Object.assign(i.style,p),null!=r&&""!==String(r).trim()){const t=this.normalizeButtonSize(r);i.style.setProperty("--acc-button-size",t)}if(i.addEventListener("click",e=>{if(e.preventDefault(),!d){if(d=this.displayMenu({...t,container:n}),!d)return;this.menuContainer=d;const e=d.querySelector(".acc-overlay");e&&e.addEventListener("click",t=>{t.stopPropagation(),this.closeMenu(d,i)})}"none"===d.style.display||"none"===window.getComputedStyle(d).display?this.openMenu(d,i):this.closeMenu(d,i)}),i.addEventListener("keydown",t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),i.click())}),document.body.appendChild(n),this.translateMenuUI(n),this.ensureSkipLink(),!1!==this.options?.keyboardShortcut&&document.addEventListener("keydown",t=>{t.altKey&&"a"===t.key&&(t.preventDefault(),i.click())}),this.runBackgroundAxeScan().catch(()=>{this.updateViolationBubble({violations:[]})}),this.isDevMode()){const t=()=>{this.runBackgroundAxeScan({force:!0}).catch(()=>{this.updateViolationBubble(this.axeScanResults||{violations:[]})})};"complete"===document.readyState?setTimeout(t,250):window.addEventListener("load",()=>{setTimeout(t,150)},{once:!0})}return document.addEventListener("click",t=>{if(!i)return;const e=t.target===i||i.contains(t.target),n=t.target.closest(".acc-container");if(d&&this.activeMenuContainer===d&&"none"!==d.style.display){const a=d.contains(t.target);e||a||n||this.closeMenu(d,i)}else e||i.blur()}),n}catch(t){return console.error("[AllyWidget] Error displaying widget:",t),null}},startAccessibleWebWidget(){try{if(document.querySelector(".acc-widget .acc-toggle-btn"))return;const t=this.getDataAttributeOptions();t&&Object.keys(t).length&&(this.dataOptions=t,this.options={...this.options,...t});const e={...this.options},n=e.lang||document.querySelector("html")?.getAttribute("lang")?.replace(/[_-].*/,"")||navigator.language||"en";e.lang=n,e.position=e.position||"bottom-right",e.offset&&(e.offset=this.normalizeOffset(e.offset)),e.size&&(e.size=this.normalizeButtonSize(e.size),this.widgetTheme.buttonSize=e.size),this.options={...e},this.applyThemeOverrides(e),this.applyThemeVariables(),this.registerStaticStyles(),this.loadConfig(!1),this.detectSystemPreferences(),this.setupMediaQueryListeners();const i=this.getActiveColorFilterKey(this.widgetConfig.states);this.updateColorFilterState(i),this.applyEnhancements(),this.applyVisualFilters(),this.launchWidget(e)}catch(t){console.error("[AllyWidget] Error starting widget:",t)}},launchWidget(t={}){try{let e={lang:this.getDefaultLanguage(),position:"bottom-right",offset:[20,20]};try{const t=this.fetchSavedConfig();t&&(e={...e,...JSON.parse(t)})}catch(t){console.warn("[AllyWidget] Error loading saved config:",t)}e={...e,...t},this.saveConfig(e),this.displayWidget(e)}catch(t){console.error("[AllyWidget] Error in widget launch:",t)}}};
|
|
5
|
+
var AllyWidget=function(){"use strict";const t={primaryColor:"#1976d2",primaryColorLight:"#42a5f5",primaryColorDark:"#0d47a1",backgroundColor:"#f5f7fa",textColor:"#222222",textColorInverted:"#ffffff",buttonSize:"52px",cardBackground:"#ffffff",borderColor:"#d1d5db",focusRingColor:"#1976d2",hoverColor:"#42a5f5",activeColor:"#0d47a1",successColor:"#2e7d32",errorColor:"#c62828",warningColor:"#f57c00",headerHeight:"54px",borderRadius:"8px",buttonBorderRadius:"0.4rem",menuPosition:"right",zIndex:1e5,focusBorderWidth:"3px",focusOutlineOffset:"2px"},e={accessibility:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path d="M423.5-743.5Q400-767 400-800t23.5-56.5Q447-880 480-880t56.5 23.5Q560-833 560-800t-23.5 56.5Q513-720 480-720t-56.5-23.5ZM360-80v-520q-60-5-122-15t-118-25l20-80q78 21 166 30.5t174 9.5q86 0 174-9.5T820-720l20 80q-56 15-118 25t-122 15v520h-80v-240h-80v240h-80Z"/></svg>',accessibilityVariants:{default:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path d="M423.5-743.5Q400-767 400-800t23.5-56.5Q447-880 480-880t56.5 23.5Q560-833 560-800t-23.5 56.5Q513-720 480-720t-56.5-23.5ZM360-80v-520q-60-5-122-15t-118-25l20-80q78 21 166 30.5t174 9.5q86 0 174-9.5T820-720l20 80q-56 15-118 25t-122 15v520h-80v-240h-80v240h-80Z"/></svg>',"icon-2":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path d="M423.5-743.5Q400-767 400-800t23.5-56.5Q447-880 480-880t56.5 23.5Q560-833 560-800t-23.5 56.5Q513-720 480-720t-56.5-23.5ZM360-80v-520H120v-80h720v80H600v520h-80v-240h-80v240h-80Z"/></svg>',"icon-3":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path d="M423.5-743.5Q400-767 400-800t23.5-56.5Q447-880 480-880t56.5 23.5Q560-833 560-800t-23.5 56.5Q513-720 480-720t-56.5-23.5ZM680-80v-200H480q-33 0-56.5-23.5T400-360v-240q0-33 23.5-56.5T480-680q24 0 41.5 10.5T559-636q55 66 99.5 90.5T760-520v80q-53 0-107-23t-93-55v138h120q33 0 56.5 23.5T760-300v220h-80Zm-280 0q-83 0-141.5-58.5T200-280q0-72 45.5-127T360-476v82q-35 14-57.5 44.5T280-280q0 50 35 85t85 35q39 0 69.5-22.5T514-240h82q-14 69-69 114.5T400-80Z"/></svg>',"icon-4":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path d="M320-80q-83 0-141.5-58.5T120-280q0-83 58.5-141.5T320-480v80q-50 0-85 35t-35 85q0 50 35 85t85 35q50 0 85-35t35-85h80q0 83-58.5 141.5T320-80Zm360-40v-200H440q-44 0-68-37.5t-6-78.5l74-164h-91l-24 62-77-22 28-72q9-23 29.5-35.5T350-680h208q45 0 68.5 36.5T632-566l-66 146h114q33 0 56.5 23.5T760-340v220h-80Zm-96.5-603.5Q560-747 560-780t23.5-56.5Q607-860 640-860t56.5 23.5Q720-813 720-780t-23.5 56.5Q673-700 640-700t-56.5-23.5Z"/></svg>'},largePointer:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px"><path d="m320-410 79-110h170L320-716v306ZM551-80 406-392 240-160v-720l560 440H516l144 309-109 51ZM399-520Z"/></svg>',pauseMotion:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="m791-55-91-91q-49 32-104.5 49T480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 17-115.5T146-700l-91-91 57-57 736 736-57 57ZM480-160q43 0 83.5-11t78.5-33L204-642q-22 38-33 78.5T160-480q0 133 93.5 226.5T480-160Zm334-100-58-58q22-38 33-78.5t11-83.5q0-133-93.5-226.5T480-800q-43 0-83.5 11T318-756l-58-58q49-32 104.5-49T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 60-17 115.5T814-260ZM537-537ZM423-423Z"/></svg>',readingAid:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="M320-80v-440l-80-120v-240h480v240l-80 120v440H320Zm160-260q-25 0-42.5-17.5T420-400q0-25 17.5-42.5T480-460q25 0 42.5 17.5T540-400q0 25-17.5 42.5T480-340ZM320-760h320v-40H320v40Zm320 80H320v16l80 120v384h160v-384l80-120v-16ZM480-480Z"/></svg>',boldText:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="M272-200v-560h221q65 0 120 40t55 111q0 51-23 78.5T602-491q25 11 55.5 41t30.5 90q0 89-65 124.5T501-200H272Zm121-112h104q48 0 58.5-24.5T566-372q0-11-10.5-35.5T494-432H393v120Zm0-228h93q33 0 48-17t15-38q0-24-17-39t-44-15h-95v109Z"/></svg>',lineSpacing:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="M240-160 80-320l56-56 64 62v-332l-64 62-56-56 160-160 160 160-56 56-64-62v332l64-62 56 56-160 160Zm240-40v-80h400v80H480Zm0-240v-80h400v80H480Zm0-240v-80h400v80H480Z"/></svg>',letterSpacing:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="M320-80 160-240l160-160 57 56-64 64h334l-63-64 56-56 160 160L640-80l-57-56 64-64H313l63 64-56 56ZM200-480v-400h80v400h-80Zm240 0v-400h80v400h-80Zm240 0v-400h80v400h-80Z"/></svg>',dyslexiaFont:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="m131-252 165-440h79l165 440h-76l-39-112H247l-40 112h-76Zm139-176h131l-64-182h-4l-63 182Zm395 186q-51 0-81-27.5T554-342q0-44 34.5-72.5T677-443q23 0 45 4t38 11v-12q0-29-20.5-47T685-505q-23 0-42 9.5T610-468l-47-35q24-29 54.5-43t68.5-14q69 0 103 32.5t34 97.5v178h-63v-37h-4q-14 23-38 35t-53 12Zm12-54q35 0 59.5-24t24.5-56q-14-8-33.5-12.5T689-393q-32 0-50 14t-18 37q0 20 16 33t40 13Z"/></svg>',highlightLinks:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="M440-280H280q-83 0-141.5-58.5T80-480q0-83 58.5-141.5T280-680h160v80H280q-50 0-85 35t-35 85q0 50 35 85t85 35h160v80ZM320-440v-80h320v80H320Zm200 160v-80h160q50 0 85-35t35-85q0-50-35-85t-85-35H520v-80h160q83 0 141.5 58.5T880-480q0 83-58.5 141.5T680-280H520Z"/></svg>',highlightTitle:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="M320-280q17 0 28.5-11.5T360-320q0-17-11.5-28.5T320-360q-17 0-28.5 11.5T280-320q0 17 11.5 28.5T320-280Zm0-160q17 0 28.5-11.5T360-480q0-17-11.5-28.5T320-520q-17 0-28.5 11.5T280-480q0 17 11.5 28.5T320-440Zm0-160q17 0 28.5-11.5T360-640q0-17-11.5-28.5T320-680q-17 0-28.5 11.5T280-640q0 17 11.5 28.5T320-600Zm120 320h240v-80H440v80Zm0-160h240v-80H440v80Zm0-160h240v-80H440v80ZM200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h560v-560H200v560Zm0-560v560-560Z"/></svg>',contrast:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="m480-260 60-60h100v-100l60-60-60-60v-100H540l-60-60-60 60H320v100l-60 60 60 60v100h100l60 60Zm0-100v-240q50 0 85 35t35 85q0 50-35 85t-85 35ZM160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h640q33 0 56.5 23.5T880-720v480q0 33-23.5 56.5T800-160H160Zm0-80h640v-480H160v480Zm0 0v-480 480Z"/></svg>',darkContrast:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="M484-80q-84 0-157.5-32t-128-86.5Q144-253 112-326.5T80-484q0-146 93-257.5T410-880q-18 99 11 193.5T521-521q71 71 165.5 100T880-410q-26 144-138 237T484-80Zm0-80q88 0 163-44t118-121q-86-8-163-43.5T464-465q-61-61-97-138t-43-163q-77 43-120.5 118.5T160-484q0 135 94.5 229.5T484-160Zm-20-305Z"/></svg>',lightContrast:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="M440-800v-120h80v120h-80Zm0 760v-120h80v120h-80Zm360-400v-80h120v80H800Zm-760 0v-80h120v80H40Zm708-252-56-56 70-72 58 58-72 70ZM198-140l-58-58 72-70 56 56-70 72Zm564 0-70-72 56-56 72 70-58 58ZM212-692l-72-70 58-58 70 72-56 56Zm268 452q-100 0-170-70t-70-170q0-100 70-170t170-70q100 0 170 70t70 170q0 100-70 170t-170 70Zm0-80q67 0 113.5-46.5T640-480q0-67-46.5-113.5T480-640q-67 0-113.5 46.5T320-480q0 67 46.5 113.5T480-320Zm0-160Z"/></svg>',invertColors:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="M480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-64-24.5-122.5T706-706L254-254q45 45 103.5 69.5T480-160Zm0-160v-60h200v60H480ZM320-500h60v-80h80v-60h-80v-80h-60v80h-80v60h80v80Z"/></svg>',saturation:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="M480-120q-133 0-226.5-92.5T160-436q0-66 25-122t69-100l226-222 226 222q44 44 69 100t25 122q0 131-93.5 223.5T480-120Zm0-80v-568L310-600q-35 33-52.5 74.5T240-436q0 97 70 166.5T480-200Z"/></svg>',lowSaturation:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="M480-120q-133 0-226.5-92T160-436q0-65 25-121.5T254-658l226-222 226 222q44 44 69 100.5T800-436q0 132-93.5 224T480-120ZM242-400h474q12-72-13.5-123T650-600L480-768 310-600q-27 26-53 77t-15 123Z"/></svg>',highSaturation:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="M480-80q-82 0-155-31.5t-127.5-86Q143-252 111.5-325T80-480q0-83 32.5-156t88-127Q256-817 330-848.5T488-880q80 0 151 27.5t124.5 76q53.5 48.5 85 115T880-518q0 115-70 176.5T640-280h-74q-9 0-12.5 5t-3.5 11q0 12 15 34.5t15 51.5q0 50-27.5 74T480-80Zm0-400Zm-220 40q26 0 43-17t17-43q0-26-17-43t-43-17q-26 0-43 17t-17 43q0 26 17 43t43 17Zm120-160q26 0 43-17t17-43q0-26-17-43t-43-17q-26 0-43 17t-17 43q0 26 17 43t43 17Zm200 0q26 0 43-17t17-43q0-26-17-43t-43-17q-26 0-43 17t-17 43q0 26 17 43t43 17Zm120 160q26 0 43-17t17-43q0-26-17-43t-43-17q-26 0-43 17t-17 43q0 26 17 43t43 17ZM480-160q9 0 14.5-5t5.5-13q0-14-15-33t-15-57q0-42 29-67t71-25h70q66 0 113-38.5T800-518q0-121-92.5-201.5T488-800q-136 0-232 93t-96 227q0 133 93.5 226.5T480-160Z"/></svg>',reset:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="M440-122q-121-15-200.5-105.5T160-440q0-66 26-126.5T260-672l57 57q-38 34-57.5 79T240-440q0 88 56 155.5T440-202v80Zm80 0v-80q87-16 143.5-83T720-440q0-100-70-170t-170-70h-3l44 44-56 56-140-140 140-140 56 56-44 44h3q134 0 227 93t93 227q0 121-79.5 211.5T520-122Z"/></svg>',close:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41Z"/></svg>',increase:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2Z"/></svg>',decrease:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2Z"/></svg>',arrowBack:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="currentColor"><path d="M400-80 0-480l400-400 71 71-329 329 329 329-71 71Z"/></svg>',adjustFontSize:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2 4v3h5v12h3V7h5V4H2m19 5h-9v3h3v7h3v-7h3V9Z"/></svg>',language:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="currentColor"><path d="M480-80q-82 0-155-31.5t-127.5-86Q143-252 111.5-325T80-480q0-83 31.5-155.5t86-127Q252-817 325-848.5T480-880q83 0 155.5 31.5t127 86q54.5 54.5 86 127T880-480q0 82-31.5 155t-86 127.5q-54.5 54.5-127 86T480-80Zm0-82q26-36 45-75t31-83H404q12 44 31 83t45 75Zm-104-16q-18-33-31.5-68.5T322-320H204q29 50 72.5 87t99.5 55Zm208 0q56-18 99.5-55t72.5-87H638q-9 38-22.5 73.5T584-178ZM170-400h136q-3-20-4.5-39.5T300-480q0-21 1.5-40.5T306-560H170q-5 20-7.5 39.5T160-480q0 21 2.5 40.5T170-400Zm216 0h188q3-20 4.5-39.5T580-480q0-21-1.5-40.5T574-560H386q-3 20-4.5 39.5T380-480q0 21 1.5 40.5T386-400Zm268 0h136q5-20 7.5-39.5T800-480q0-21-2.5-40.5T790-560H654q3 20 4.5 39.5T660-480q0 21-1.5 40.5T654-400Zm-16-240h118q-29-50-72.5-87T584-782q18 33 31.5 68.5T638-640Zm-234 0h152q-12-44-31-83t-45-75q-26 36-45 75t-31 83Zm-200 0h118q9-38 22.5-73.5T376-782q-56 18-99.5 55T204-640Z"/></svg>',hideImages:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="m840-234-80-80v-446H314l-80-80h526q33 0 56.5 23.5T840-760v526ZM792-56l-64-64H200q-33 0-56.5-23.5T120-200v-528l-64-64 56-56 736 736-56 56ZM240-280l120-160 90 120 33-44-283-283v447h447l-80-80H240Zm297-257ZM424-424Z"/></svg>',accessibilityReport:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h168q13-36 43.5-58t68.5-22q38 0 68.5 22t43.5 58h168q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h560v-560H200v560Zm80-80h280v-80H280v80Zm0-160h400v-80H280v80Zm0-160h400v-80H280v80Zm221.5-198.5Q510-807 510-820t-8.5-21.5Q493-850 480-850t-21.5 8.5Q450-833 450-820t8.5 21.5Q467-790 480-790t21.5-8.5ZM200-200v-560 560Z"/></svg>',annotations:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v268q-19-9-39-15.5t-41-9.5v-243H200v560h242q3 22 9.5 42t15.5 38H200Zm0-120v40-560 243-3 280Zm80-40h163q3-21 9.5-41t14.5-39H280v80Zm0-160h244q32-30 71.5-50t84.5-27v-3H280v80Zm0-160h400v-80H280v80ZM720-40q-83 0-141.5-58.5T520-240q0-83 58.5-141.5T720-440q83 0 141.5 58.5T920-240q0 83-58.5 141.5T720-40Zm-20-80h40v-100h100v-40H740v-100h-40v100H600v40h100v100Z"/></svg>',textToSpeech:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="M560-131v-82q90-26 145-100t55-168q0-94-55-168T560-749v-82q124 28 202 125.5T840-481q0 127-78 224.5T560-131ZM120-360v-240h160l200-200v640L280-360H120Zm440 40v-322q47 22 73.5 66t26.5 96q0 51-26.5 94.5T560-320ZM400-606l-86 86H200v80h114l86 86v-252ZM300-480Z"/></svg>',highContrast:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="M480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93v640Z"/></svg>',simplifyLayout:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="M760-360v-80H200v80h560Zm0-160v-80H200v80h560Zm0-160v-80H200v80h560ZM200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm560-80v-80H200v80h560Z"/></svg>'},n={ALL:["","*:not(.material-icons,.acc-menu,.acc-menu *)"],LINKS:["a[href]"],HEADERS:["h1","h2","h3","h4","h5","h6",".wsite-headline",".wsite-content-title"],TEXT:["h1","h2","h3","h4","h5","h6",".wsite-headline",".wsite-content-title","img","p","i","svg","a","button:not(.acc-btn)","label","li","ol"]},i="body > *:not(.acc-container):not(.acc-rg-container):not(#acc-skip-link)",a={en:{"Accessibility Menu":"Accessibility Menu","Reset settings":"Reset settings","Reset All Settings":"Reset All Settings",Close:"Close","Content Adjustments":"Content Adjustments","Adjust Font Size":"Adjust Font Size","Highlight Title":"Highlight Title","Highlight Links":"Highlight Links","Readable Font":"Readable Font","Color Adjustments":"Color Adjustments","Invert Colors":"Invert Colors","Light Contrast":"Light Contrast","Dark Contrast":"Dark Contrast","High Contrast":"High Contrast","High Saturation":"High Saturation","Low Saturation":"Low Saturation",Monochrome:"Monochrome",Tools:"Tools","Reading Guide":"Reading Guide","Stop Animations":"Stop Animations","Big Cursor":"Big Cursor","Increase Font Size":"Increase Font Size","Decrease Font Size":"Decrease Font Size","Letter Spacing":"Letter Spacing","Line Height":"Line Height","Font Weight":"Font Weight","Dyslexia Font":"Dyslexia Font",Language:"Language","Open Accessibility Menu":"Open Accessibility Menu","Hide Images":"Hide Images","Skip to accessibility menu":"Skip to accessibility menu","Accessibility Report":"Accessibility Report","Run Accessibility Check":"Run Accessibility Check","Loading...":"Loading...","Analyzing page...":"Analyzing page...",Critical:"Critical",Serious:"Serious",Moderate:"Moderate",Minor:"Minor","Violations Found":"Violations Found","No Issues Found":"No Issues Found",Element:"Element",Issue:"Issue","How to Fix":"How to Fix","Close Report":"Close Report","Passed Tests":"Passed Tests","Items Need Review":"Items Need Review",Annotations:"Annotations","Text to Speech":"Text to Speech","Text to Speech On":"Text to Speech On","Text to Speech Off":"Text to Speech Off","Simplify Layout":"Simplify Layout",Play:"Play",Pause:"Pause",Stop:"Stop","Loading voice...":"Loading voice...","Reading...":"Reading...","All Languages":"All Languages","Search language":"Search language","Font Size":"Font Size",Contrast:"Contrast",Saturation:"Saturation",Accessibility:"Accessibility"},ne:{"Accessibility Menu":"पहुँच मेनु","Reset settings":"सेटिङ रिसेट गर्नुहोस्","Reset All Settings":"सबै सेटिङ रिसेट गर्नुहोस्",Close:"बन्द गर्नुहोस्","Content Adjustments":"सामग्री समायोजन","Adjust Font Size":"फन्ट आकार समायोजन","Highlight Title":"शीर्षक हाइलाइट","Highlight Links":"लिङ्क हाइलाइट","Readable Font":"पठनीय फन्ट","Color Adjustments":"रङ समायोजन","Invert Colors":"रङ उल्टाउनुहोस्","Light Contrast":"हल्का कन्ट्रास्ट","Dark Contrast":"गाढा कन्ट्रास्ट","High Contrast":"उच्च कन्ट्रास्ट","High Saturation":"उच्च संतृप्तता","Low Saturation":"कम संतृप्तता",Monochrome:"एकरङी",Tools:"उपकरणहरू","Reading Guide":"पठन सहायक","Stop Animations":"एनिमेसन रोक्नुहोस्","Big Cursor":"ठूलो कर्सर","Increase Font Size":"फन्ट आकार बढाउनुहोस्","Decrease Font Size":"फन्ट आकार घटाउनुहोस्","Letter Spacing":"अक्षर दूरी","Line Height":"लाइन उचाइ","Font Weight":"फन्ट वजन","Dyslexia Font":"डिस्लेक्सिया फन्ट",Language:"भाषा","Open Accessibility Menu":"पहुँच मेनु खोल्नुहोस्","Hide Images":"तस्बिर लुकाउनुहोस्","Skip to accessibility menu":"पहुँच मेनुमा जानुहोस्","Accessibility Report":"पहुँच प्रतिवेदन","Run Accessibility Check":"पहुँच जाँच चलाउनुहोस्","Loading...":"लोड हुँदैछ...","Analyzing page...":"पृष्ठ विश्लेषण हुँदैछ...",Critical:"गम्भीर",Serious:"साँघुरो",Moderate:"मध्यम",Minor:"सामान्य","Violations Found":"उल्लंघनहरू फेला परे","No Issues Found":"कुनै समस्या फेला परेन",Element:"तत्व",Issue:"समस्या","How to Fix":"कसरी ठीक गर्ने","Close Report":"प्रतिवेदन बन्द गर्नुहोस्","Passed Tests":"पास भएका परीक्षणहरू","Items Need Review":"समीक्षा आवश्यक वस्तुहरू",Annotations:"टिप्पणीहरू","Text to Speech":"पाठ वाचन","Text to Speech On":"पाठ वाचन सक्रिय","Text to Speech Off":"पाठ वाचन निष्क्रिय","Simplify Layout":"लेआउट सरल बनाउनुहोस्",Play:"प्ले",Pause:"पज",Stop:"रोक्नुहोस्","Loading voice...":"आवाज लोड हुँदैछ...","Reading...":"पढिँदैछ...","All Languages":"सबै भाषाहरू","Search language":"भाषा खोज्नुहोस्","Font Size":"फन्ट आकार",Contrast:"कन्ट्रास्ट",Saturation:"संतृप्तता",Accessibility:"पहुँचयोग्यता"}},o=[{code:"en",label:"English (English)"},{code:"ne",label:"नेपाली (Nepali)"}],r={storageAvailable(){try{const t="__ally_test__";return localStorage.setItem(t,t),localStorage.removeItem(t),!0}catch{return!1}},fetchCookie(t){const e=t+"=";try{const t=decodeURIComponent(document.cookie);return t.split(";").map(t=>t.trim()).find(t=>t.startsWith(e))?.substring(e.length)||"{}"}catch(t){return console.warn("[AllyWidget] Error reading cookie:",t),"{}"}},storeCookie(t,e,n){try{const i=new Date;i.setTime(i.getTime()+24*n*60*60*1e3);const a="expires="+i.toUTCString(),o="https:"===window.location.protocol;document.cookie=t+"="+e+";"+a+";path=/;SameSite=Strict"+(o?";Secure":"")}catch(t){console.warn("[AllyWidget] Error setting cookie:",t)}},getSavedLanguage(){try{if(this.storageAvailable()){const t=localStorage.getItem(this.storageKey);if(t){const e=JSON.parse(t);if(e.lang)return e.lang}}const t=this.fetchCookie(this.storageKey);if(t&&""!==t){const e=JSON.parse(t);if(e.lang)return e.lang}}catch{}return null},getBrowserLanguage(){if("undefined"==typeof navigator)return"en";const t=this.supportedLanguages.map(t=>t.code),e=navigator.languages?[...navigator.languages]:[navigator.language||"en"];for(const n of e){const e=n.split("-")[0].toLowerCase();if(t.includes(e))return e}return"en"},getDefaultLanguage(){const t=this.getSavedLanguage();if(t){if(this.supportedLanguages.map(t=>t.code).includes(t))return t}return this.getBrowserLanguage()},isDevMode(){if("undefined"==typeof window)return!1;try{const t=new URLSearchParams(window.location.search);return"true"===t.get("ally-dev")||"true"===t.get("acc-dev")}catch{return!1}},getDataAttributeOptions(){const t={};if("undefined"==typeof document)return t;const e=["lang","position","offset","size","icon"],n=(e,n)=>{if(null!=n&&""!==n)switch(e){case"lang":{const e=String(n).trim();e&&(t.lang=e);break}case"position":{const e=String(n).trim();e&&(t.position=e);break}case"offset":{const e=this.normalizeOffset(n);e&&(t.offset=e);break}case"size":{const e=this.normalizeButtonSize(n);e&&(t.size=e);break}case"icon":{const e=String(n).trim();e&&(t.icon=e);break}}},i=[];return document.currentScript&&i.push(document.currentScript),document.querySelectorAll("script[data-ally-lang],script[data-ally-position],script[data-ally-offset],script[data-ally-size],script[data-ally-icon]").forEach(t=>{i.includes(t)||i.push(t)}),i.forEach(t=>{t&&e.forEach(e=>{const i=`data-ally-${e}`,a=`data-acc-${e}`,o=t.getAttribute?t.getAttribute(i)||t.getAttribute(a):null;n(e,o)})}),e.forEach(e=>{if(void 0!==t[e])return;const i=document.querySelector(`[data-ally-${e}]`)||document.querySelector(`[data-acc-${e}]`);i&&n(e,i.getAttribute(`data-ally-${e}`)||i.getAttribute(`data-acc-${e}`))}),t},normalizeOffset(t){if(!t&&0!==t)return;let e=[];e=Array.isArray(t)?t:"string"==typeof t?t.split(/[, ]+/):[t];const n=e.map(t=>{const e=Number(t);return Number.isFinite(e)?Math.round(e):null}).filter(t=>null!==t);return n.length?(1===n.length&&n.push(n[0]),[n[0],void 0!==n[1]?n[1]:n[0]]):void 0},normalizeButtonSize(t){const e=this.widgetTheme?.buttonSize||"52px";if("number"==typeof t&&Number.isFinite(t))return`${Math.max(24,Math.round(t))}px`;if("string"==typeof t){const n=t.trim();if(!n)return e;if(/^\d+(\.\d+)?(px|em|rem|%)$/i.test(n))return n;const i=Number(n);return Number.isFinite(i)?`${Math.max(24,Math.round(i))}px`:n}return e},toggleDisplay(t,e){if(t)try{t.style.display=void 0===e?"none"===t.style.display?"block":"none":e?"block":"none"}catch(t){console.warn("[AllyWidget] Error toggling element:",t)}},isSystemControlledPreference(t){const e=this.widgetConfig?.systemDefaults||{};return Object.prototype.hasOwnProperty.call(e,t)},hasExplicitStatePreference(t){const e=this.widgetConfig?.states||{};return!!Object.prototype.hasOwnProperty.call(e,t)&&!this.isSystemControlledPreference(t)},hasExplicitColorFilterPreference(){const t=this.widgetConfig?.states||{},e=this.widgetConfig?.systemDefaults||{};return(Array.isArray(this.colorFilterKeys)?this.colorFilterKeys:[]).some(n=>Object.prototype.hasOwnProperty.call(t,n)&&!Object.prototype.hasOwnProperty.call(e,n))},updateState(t,e={}){const n=e.source||"user",i=this.widgetConfig.states||{},a=this.widgetConfig.systemDefaults||{},o={...i,...t},r={...a},s=Object.keys(t||{});"system"===n?s.forEach(e=>{r[e]=t[e]}):s.forEach(t=>{Object.prototype.hasOwnProperty.call(r,t)&&delete r[t]});const c={...this.widgetConfig,states:o,systemDefaults:r};return this.saveConfig(c),c},saveConfig(t){this.widgetConfig={...this.widgetConfig,...t};const e=JSON.stringify(this.widgetConfig);if(this.storageAvailable())try{localStorage.setItem(this.storageKey,e)}catch{this.storeCookie(this.storageKey,e,365)}else this.storeCookie(this.storageKey,e,365)},retrieveState(t){return this.widgetConfig.states?this.widgetConfig.states[t]:void 0},loadConfig(t=!0){if(t)return this.widgetConfig;const e=this.fetchSavedConfig();if(e)try{this.widgetConfig=JSON.parse(e)}catch(t){console.warn("[AllyWidget] Error parsing config:",t),this.widgetConfig={}}return this.widgetConfig},fetchSavedConfig(){if(this.storageAvailable())try{const t=localStorage.getItem(this.storageKey);if(t)return t}catch(t){console.warn("[AllyWidget] localStorage failed, falling back to cookies:",t)}const t=this.fetchCookie(this.storageKey);return t&&""!==t?t:"{}"}};const s=["/* Base styles */\n.acc-menu {\n position: fixed;\n left: var(--acc-menu-inline-gap, 12px);\n top: var(--acc-menu-block-gap, 12px);\n bottom: var(--acc-menu-block-gap, 12px);\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);\n opacity: 1;\n transition: 0.3s;\n z-index: var(--acc-widget-z-index, 100000);\n overflow: hidden;\n background: var(--acc-bg-color);\n width: min(430px, calc(100vw - (var(--acc-menu-inline-gap, 12px) * 2)));\n line-height: 1.5;\n font-size: 16px;\n height: auto;\n letter-spacing: 0.015em;\n color: var(--acc-text-color);\n --acc-content-inline-padding: 14px;\n --acc-menu-inline-gap: clamp(8px, 2.3vw, 18px);\n --acc-menu-block-gap: clamp(10px, 2.2vh, 20px);\n border-radius: 16px;\n box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2);\n}\n\n/* Ensure all elements inherit proper colors for accessibility */\n.acc-menu * {\n color: var(--acc-text-color);\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;\n padding: 0;\n margin: 0;\n line-height: 1.5 !important;\n letter-spacing: normal !important;\n}\n\n/* Header section */\n.acc-menu-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0 var(--acc-content-inline-padding);\n height: var(--acc-header-height);\n font-weight: 700 !important;\n background-color: var(--acc-primary-color) !important;\n}\n\n.acc-menu-title {\n display: flex;\n align-items: center;\n gap: 10px;\n font-size: 18px !important;\n color: var(--acc-text-color-inverted) !important;\n font-weight: bold;\n}\n\n.acc-menu-title .acc-label {\n color: var(--acc-text-color-inverted) !important;\n}\n\n.acc-menu-title-icon {\n width: 30px;\n height: 30px;\n border-radius: 8px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n\n.acc-menu-title-icon svg {\n fill: var(--acc-text-color-inverted) !important;\n width: 18px !important;\n height: 18px !important;\n min-width: 18px !important;\n min-height: 18px !important;\n max-width: 18px !important;\n max-height: 18px !important;\n}\n\n.acc-header-back {\n display: flex;\n align-items: center;\n}\n\n.acc-back-btn {\n display: flex;\n align-items: center;\n gap: 8px;\n background: transparent;\n border: none;\n padding: 8px;\n cursor: pointer;\n font-size: 16px;\n font-weight: 600;\n color: var(--acc-text-color-inverted) !important;\n transition: background-color 0.2s ease;\n border-radius: 4px;\n visibility: hidden;\n}\n\n.acc-back-btn > span {\n color: var(--acc-text-color-inverted) !important;\n}\n\n.acc-back-btn.visible {\n visibility: visible;\n}\n\n.acc-back-btn:hover {\n background-color: rgba(255, 255, 255, 0.18);\n}\n\n.acc-back-btn:focus {\n outline: 2px solid var(--acc-text-color-inverted);\n outline-offset: 1px;\n}\n\n.acc-back-btn svg {\n fill: var(--acc-text-color-inverted) !important;\n width: 24px !important;\n height: 24px !important;\n}\n\n.acc-menu-title-dynamic {\n display: none !important;\n}\n\n.acc-menu-title-dynamic.visible {\n display: block !important;\n}\n\n.acc-menu-title-default {\n display: block !important;\n}\n\n.acc-menu-title-default.hidden {\n display: none !important;\n}\n\n.acc-menu-header svg {\n fill: var(--acc-text-color-inverted) !important;\n width: 28px !important;\n height: 28px !important;\n min-width: 28px !important;\n min-height: 28px !important;\n max-width: 28px !important;\n max-height: 28px !important;\n}\n\n.acc-menu-header > div {\n display: flex;\n align-items: center;\n}\n\n/* Interactive elements */\n.acc-menu-header div[role=\"button\"] {\n cursor: pointer;\n padding: 8px;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 36px;\n height: 36px;\n transition: background-color 0.2s ease;\n}\n\n.acc-menu-header div[role=\"button\"]:hover {\n background-color: rgba(255, 255, 255, 0.18);\n}\n\n.acc-menu-header div[role=\"button\"]:focus {\n outline: 2px solid var(--acc-text-color-inverted);\n outline-offset: 1px;\n}\n\n.acc-menu-header .acc-header-actions {\n display: flex;\n align-items: center;\n}\n\n.acc-language-container {\n margin: 0 var(--acc-content-inline-padding) 24px;\n}\n\n.acc-lang-details {\n border: 1px solid rgba(0, 0, 0, 0.1);\n border-radius: var(--acc-button-border-radius);\n background: var(--acc-card-bg);\n}\n\n.acc-lang-summary {\n list-style: none;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n padding: 12px 14px;\n cursor: pointer;\n border-radius: var(--acc-button-border-radius);\n}\n\n.acc-lang-summary::-webkit-details-marker {\n display: none;\n}\n\n.acc-lang-summary::marker {\n content: '';\n}\n\n.acc-lang-summary-main {\n display: flex;\n align-items: center;\n gap: 10px;\n min-width: 0;\n}\n\n.acc-lang-current-label {\n font-size: 16px !important;\n font-weight: 600 !important;\n}\n\n.acc-lang-summary:hover {\n background-color: rgba(25, 118, 210, 0.06);\n}\n\n.acc-lang-summary:focus {\n outline: var(--acc-focus-outline-width) solid var(--acc-focus-ring-color);\n outline-offset: var(--acc-focus-outline-offset);\n}\n\n.acc-lang-summary-arrow {\n width: 10px;\n height: 10px;\n border-right: 2px solid var(--acc-text-color);\n border-bottom: 2px solid var(--acc-text-color);\n transform: rotate(-45deg);\n transition: transform 0.2s ease;\n}\n\n.acc-lang-details[open] .acc-lang-summary-arrow {\n transform: rotate(45deg);\n}\n\n.acc-lang-details[open] .acc-lang-summary {\n border-bottom: 1px solid var(--acc-border-color);\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n}\n\n.acc-lang-details-panel {\n padding: 12px 0 8px;\n}\n\n.acc-lang-details-panel .acc-section-title {\n font-size: 16px !important;\n padding: 0 16px 10px;\n}\n\n.acc-lang-flag {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 22px;\n font-size: 18px !important;\n line-height: 1;\n}\n\n.acc-lang-search-wrapper {\n padding: 0 16px 8px;\n}\n\n.acc-lang-search {\n width: 100%;\n padding: 10px 16px;\n border: 1.5px solid var(--acc-border-color);\n border-radius: var(--acc-button-border-radius);\n font-size: 16px;\n background-color: var(--acc-card-bg);\n transition: border-color 0.2s ease;\n}\n\n.acc-lang-search:focus {\n outline: var(--acc-focus-outline-width) solid var(--acc-focus-ring-color);\n outline-offset: var(--acc-focus-outline-offset);\n border-color: var(--acc-primary-color) !important;\n}\n\n.acc-lang-list {\n padding: 6px 8px 12px;\n max-height: 280px;\n overflow-y: auto;\n}\n\n.acc-lang-item {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n width: 100%;\n text-align: left;\n padding: 11px 10px;\n margin-bottom: 4px;\n background-color: transparent;\n border: none;\n border-radius: var(--acc-button-border-radius);\n cursor: pointer;\n font-size: 16px;\n color: var(--acc-text-color);\n transition: background-color 0.12s ease;\n}\n\n.acc-lang-item:hover {\n background-color: rgba(25, 118, 210, 0.06);\n}\n\n.acc-lang-item:focus {\n outline: var(--acc-focus-outline-width) solid var(--acc-focus-ring-color);\n outline-offset: var(--acc-focus-outline-offset);\n}\n\n.acc-lang-item.selected {\n background-color: rgba(25, 118, 210, 0.08);\n font-weight: 600;\n}\n\n.acc-lang-item-main {\n display: flex;\n align-items: center;\n gap: 10px;\n min-width: 0;\n}\n\n.acc-lang-item-label {\n font-size: 16px !important;\n line-height: 1.4 !important;\n}\n\n.acc-icon-check {\n display: inline-block;\n width: 18px;\n height: 18px;\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23886f60' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n background-position: center;\n opacity: 0;\n transition: opacity 0.15s ease;\n}\n\n.acc-lang-item.selected .acc-icon-check {\n opacity: 1;\n}\n\n.acc-menu .acc-lang-select {\n width: 100% !important;\n padding: 0 16px !important;\n font-size: 16px !important;\n font-family: inherit !important;\n font-weight: 600 !important;\n border-radius: var(--acc-button-border-radius) !important;\n background: var(--acc-card-bg) !important;\n border: 1.5px solid var(--acc-border-color) !important;\n min-height: 48px !important;\n max-height: 48px !important;\n height: 48px !important;\n color: var(--acc-text-color) !important;\n -webkit-appearance: none !important;\n -moz-appearance: none !important;\n appearance: none !important;\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0%20-960%20960%20960' width='24px' fill='%231f1f1f'%3E%3Cpath d='M480-344%20240-584l56-56%20184 184%20184-184%2056 56-240 240Z'/%3E%3C/svg%3E\") !important;\n background-repeat: no-repeat !important;\n background-position: right 12px center !important;\n background-size: 20px !important;\n padding-right: 44px !important;\n}\n\n/* Hide default arrows in Firefox and IE */\n.acc-menu .acc-lang-select::-ms-expand {\n display: none !important;\n}\n\n.acc-menu .acc-lang-select:focus {\n outline: var(--acc-focus-outline-width) solid var(--acc-focus-ring-color);\n outline-offset: var(--acc-focus-outline-offset);\n border-color: var(--acc-primary-color) !important;\n}\n\n/* Option grid layout */\n.acc-options-all {\n display: flex;\n flex-direction: column;\n gap: 16px;\n padding: 0 var(--acc-content-inline-padding) 12px;\n}\n\n.acc-option-category {\n display: flex;\n flex-direction: column;\n gap: 10px;\n}\n\n.acc-option-category-interaction {\n padding-bottom: 12px;\n}\n\n.acc-option-category .acc-section-title {\n font-size: 14px !important;\n font-weight: 700 !important;\n letter-spacing: 0.01em !important;\n text-transform: none;\n color: #6b7280 !important;\n padding: 0 2px;\n}\n\n.acc-options {\n display: grid;\n grid-template-columns: repeat(3, minmax(0, 1fr));\n gap: 12px;\n margin: 0;\n}\n\n.acc-options-text {\n grid-template-columns: repeat(3, minmax(0, 1fr));\n}\n\n.acc-options-text-inline {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n}\n\n.acc-btn.acc-text-inline {\n min-height: 54px;\n aspect-ratio: auto;\n flex-direction: row;\n align-items: center;\n justify-content: flex-start;\n text-align: left;\n gap: 10px;\n padding: 12px 14px;\n}\n\n.acc-btn.acc-text-inline .acc-label {\n font-size: 14px !important;\n flex: 1 1 auto;\n min-width: 0;\n}\n\n.acc-btn.acc-text-inline .acc-progress-indicator {\n margin-top: 0;\n margin-left: auto;\n justify-content: flex-end;\n min-width: 24px;\n}\n\n@media only screen and (max-width: 430px) {\n .acc-options-text-inline {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n\n .acc-btn.acc-text-inline {\n min-height: auto;\n aspect-ratio: 11 / 8;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n gap: 6px;\n padding: 10px;\n }\n\n .acc-btn.acc-text-inline .acc-label {\n font-size: 13px !important;\n flex: 0 1 auto;\n }\n\n .acc-btn.acc-text-inline .acc-progress-indicator {\n margin-top: 8px;\n margin-left: 0;\n justify-content: center;\n }\n}\n\n.acc-tts-toggle-container {\n margin: 0;\n}\n\n.acc-text-scale-control {\n width: 100%;\n background: var(--acc-card-bg) !important;\n border: 1px solid rgba(0, 0, 0, 0.1) !important;\n border-radius: var(--acc-border-radius);\n padding: 12px 14px;\n display: flex;\n flex-direction: column;\n gap: 10px;\n}\n\n.acc-text-scale-meta {\n display: flex;\n align-items: center;\n gap: 10px;\n}\n\n.acc-text-scale-icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n\n.acc-text-scale-icon svg {\n width: 22px !important;\n height: 22px !important;\n min-width: 22px !important;\n min-height: 22px !important;\n max-width: 22px !important;\n max-height: 22px !important;\n fill: var(--acc-text-color);\n}\n\n.acc-text-scale-meta .acc-label {\n font-size: 15px !important;\n font-weight: 600 !important;\n}\n\n.acc-text-scale-percent {\n margin-left: auto;\n font-size: 15px !important;\n font-weight: 700 !important;\n color: var(--acc-primary-color) !important;\n}\n\n.acc-text-scale-range {\n width: 100%;\n appearance: none;\n -webkit-appearance: none;\n background: transparent;\n height: 20px;\n cursor: pointer;\n margin: 0;\n}\n\n.acc-text-scale-range:focus {\n outline: none;\n}\n\n.acc-text-scale-range::-webkit-slider-runnable-track {\n width: 100%;\n height: 4px;\n border-radius: 999px;\n background: linear-gradient(\n to right,\n var(--acc-primary-color) 0%,\n var(--acc-primary-color) var(--acc-text-scale-progress, 0%),\n #d8d8d8 var(--acc-text-scale-progress, 0%),\n #d8d8d8 100%\n );\n}\n\n.acc-text-scale-range::-webkit-slider-thumb {\n appearance: none;\n -webkit-appearance: none;\n width: 18px;\n height: 18px;\n border-radius: 50%;\n background: #fff;\n border: 2px solid var(--acc-primary-color);\n margin-top: -7px;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);\n}\n\n.acc-text-scale-range::-moz-range-track {\n width: 100%;\n height: 4px;\n border-radius: 999px;\n background: #d8d8d8;\n}\n\n.acc-text-scale-range::-moz-range-progress {\n height: 4px;\n border-radius: 999px;\n background: var(--acc-primary-color);\n}\n\n.acc-text-scale-range::-moz-range-thumb {\n width: 18px;\n height: 18px;\n border-radius: 50%;\n background: #fff;\n border: 2px solid var(--acc-primary-color);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);\n}\n\n.acc-btn.acc-tts-toggle {\n width: 100%;\n min-height: 54px;\n aspect-ratio: auto;\n flex-direction: row;\n align-items: center;\n justify-content: flex-start;\n gap: 10px;\n text-align: left;\n padding: 12px 76px 12px 14px;\n}\n\n.acc-btn.acc-tts-toggle .acc-label {\n font-size: 15px !important;\n}\n\n.acc-btn.acc-tts-toggle svg {\n width: 22px !important;\n height: 22px !important;\n min-width: 22px !important;\n min-height: 22px !important;\n max-width: 22px !important;\n max-height: 22px !important;\n}\n\n.acc-btn.acc-tts-toggle::before {\n content: \"\";\n position: absolute;\n right: 14px;\n top: 50%;\n width: 44px;\n height: 24px;\n border-radius: 999px;\n transform: translateY(-50%);\n background: #dbd7d2;\n border: 1px solid rgba(0, 0, 0, 0.08);\n}\n\n.acc-btn.acc-tts-toggle::after {\n content: \"\";\n position: absolute;\n right: 38px;\n top: 50%;\n width: 18px;\n height: 18px;\n border-radius: 50%;\n transform: translateY(-50%);\n background: #fff;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);\n}\n\n.acc-btn.acc-tts-toggle.acc-selected::before {\n background: var(--acc-primary-color);\n border-color: var(--acc-primary-color);\n}\n\n.acc-btn.acc-tts-toggle.acc-selected::after {\n right: 16px;\n}\n\n/* Button styling */\n.acc-btn {\n aspect-ratio: 11 / 8;\n border-radius: var(--acc-border-radius);\n padding: 10px;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n text-align: center;\n font-size: 15px !important;\n background: var(--acc-card-bg) !important;\n border: 1px solid rgba(0, 0, 0, 0.1) !important;\n transition: background-color 0.2s ease;\n cursor: pointer;\n word-break: break-word;\n gap: 6px;\n position: relative;\n}\n\n.acc-btn:hover {\n border-color: var(--acc-hover-color) !important;\n border-width: 1px !important;\n box-shadow: inset 0 0 0 1px var(--acc-hover-color);\n}\n\n.acc-btn:focus {\n outline: var(--acc-focus-outline-width) solid var(--acc-focus-ring-color);\n outline-offset: var(--acc-focus-outline-offset);\n border-color: var(--acc-primary-color) !important;\n}\n\n.acc-btn .acc-label, .acc-text-adjust .acc-label div {\n font-size: 13px !important;\n font-weight: 600 !important;\n}\n\n/* SVG icons */\n.acc-text-adjust svg {\n width: 20px !important;\n height: 20px !important;\n min-width: 20px !important;\n min-height: 20px !important;\n max-width: 20px !important;\n max-height: 20px !important;\n}\n\n.acc-btn svg {\n width: 24px !important;\n height: 24px !important;\n min-width: 24px !important;\n min-height: 24px !important;\n max-width: 24px !important;\n max-height: 24px !important;\n fill: var(--acc-text-color);\n}\n\n/* Selected state */\n.acc-btn.acc-selected {\n background-color: var(--acc-primary-color) !important;\n border-color: var(--acc-primary-color) !important;\n}\n\n.acc-btn.acc-selected .acc-progress-dot {\n background-color: rgba(255, 255, 255, 0.5);\n}\n\n.acc-btn.acc-selected .acc-progress-dot.active {\n background-color: var(--acc-text-color-inverted) !important;\n}\n\n.acc-btn.acc-selected svg,\n.acc-btn.acc-selected span,\n.acc-btn.acc-selected .acc-label {\n fill: var(--acc-text-color-inverted) !important;\n color: var(--acc-text-color-inverted) !important;\n}\n\n.acc-btn.acc-tts-toggle.acc-selected {\n background-color: var(--acc-card-bg) !important;\n border-color: rgba(0, 0, 0, 0.1) !important;\n}\n\n.acc-btn.acc-tts-toggle.acc-selected svg,\n.acc-btn.acc-tts-toggle.acc-selected span,\n.acc-btn.acc-tts-toggle.acc-selected .acc-label {\n fill: var(--acc-text-color) !important;\n color: var(--acc-text-color) !important;\n}\n\n/* Footer section */\n.acc-footer {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n background: var(--acc-card-bg);\n padding: 12px 16px;\n display: flex;\n flex-direction: column;\n align-items: stretch;\n gap: 10px;\n border-top: 1px solid var(--acc-border-color);\n z-index: 100;\n overflow: visible;\n}\n\n.acc-footer-meta {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n width: 100%;\n flex-wrap: nowrap;\n}\n\n.acc-footer-reset {\n display: flex;\n width: 100%;\n align-items: center;\n justify-content: center;\n gap: 8px;\n padding: 12px 16px;\n border: none;\n border-radius: var(--acc-button-border-radius);\n background-color: var(--acc-primary-color) !important;\n cursor: pointer;\n transition: background-color 0.2s ease;\n white-space: nowrap;\n}\n\n.acc-footer-reset svg {\n width: 24px !important;\n height: 24px !important;\n fill: var(--acc-text-color-inverted) !important;\n}\n\n.acc-footer-reset .acc-label {\n font-size: 16px !important;\n font-weight: 600 !important;\n color: var(--acc-text-color-inverted) !important;\n line-height: 1.2 !important;\n}\n\n.acc-footer-reset:hover {\n background-color: var(--acc-primary-color-dark) !important;\n}\n\n.acc-footer-reset:focus {\n outline: var(--acc-focus-outline-width) solid var(--acc-focus-ring-color);\n outline-offset: var(--acc-focus-outline-offset);\n}\n\n.acc-footer a {\n font-size: 12px !important;\n text-decoration: none !important;\n color: #6b7280 !important;\n background: transparent !important;\n font-weight: 500 !important;\n padding: 4px 0;\n border-radius: 4px;\n transition: color 0.15s ease;\n letter-spacing: 0.01em !important;\n align-self: center;\n display: inline-flex;\n align-items: center;\n white-space: nowrap;\n line-height: 1.2 !important;\n}\n\n.acc-footer a:hover {\n text-decoration: none !important;\n color: var(--acc-primary-color) !important;\n}\n\n.acc-footer a:focus {\n outline: var(--acc-focus-outline-width) solid var(--acc-focus-ring-color);\n outline-offset: var(--acc-focus-outline-offset);\n}\n\n.acc-footer-lang-toggle {\n display: inline-flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n min-width: 84px;\n padding: 7px 10px 7px 12px;\n border: 1px solid var(--acc-border-color);\n border-radius: var(--acc-button-border-radius);\n background: var(--acc-card-bg);\n cursor: pointer;\n transition: border-color 0.2s ease, background-color 0.2s ease;\n}\n\n.acc-footer-lang-toggle:hover {\n border-color: var(--acc-hover-color);\n}\n\n.acc-footer-lang-toggle:focus {\n outline: var(--acc-focus-outline-width) solid var(--acc-focus-ring-color);\n outline-offset: var(--acc-focus-outline-offset);\n}\n\n.acc-footer-lang-current {\n display: inline-block;\n min-width: 2ch;\n text-align: left;\n font-size: 14px !important;\n font-weight: 600 !important;\n line-height: 1 !important;\n}\n\n.acc-footer-lang-arrow {\n width: 8px;\n height: 8px;\n border-right: 1.5px solid var(--acc-text-color);\n border-bottom: 1.5px solid var(--acc-text-color);\n transform: rotate(45deg) translateY(-1px);\n transition: transform 0.2s ease;\n}\n\n.acc-footer-lang-toggle[aria-expanded=\"true\"] .acc-footer-lang-arrow {\n transform: rotate(-135deg) translateY(-1px);\n}\n\n.acc-lang-modal {\n position: absolute;\n right: 16px;\n bottom: calc(100% + 10px);\n width: min(320px, calc(100% - 32px));\n border: 1px solid var(--acc-border-color);\n border-radius: 14px;\n background: var(--acc-card-bg);\n box-shadow: 0 16px 32px rgba(0, 0, 0, 0.2);\n z-index: 120;\n padding: 10px 0 8px;\n}\n\n.acc-lang-modal[hidden] {\n display: none;\n}\n\n.acc-lang-modal-header {\n padding: 0 14px 8px;\n}\n\n.acc-lang-modal .acc-section-title {\n font-size: 14px !important;\n font-weight: 700 !important;\n color: #6b7280 !important;\n}\n\n.acc-lang-modal .acc-lang-search-wrapper {\n padding: 0 12px 8px;\n}\n\n.acc-lang-modal .acc-lang-list {\n padding: 6px 8px 8px;\n max-height: 240px;\n}\n\n/* Content area */\n.acc-menu-content {\n overflow: auto;\n max-height: calc(100% - 122px);\n padding: 24px 0 36px;\n}\n\n/* Text adjustments */\n.acc-text-adjust {\n background: var(--acc-card-bg);\n padding: 18px 20px;\n margin-bottom: 20px;\n border-radius: var(--acc-border-radius);\n border: 1px solid rgba(0, 0, 0, 0.1);\n}\n\n.acc-text-adjust .acc-label {\n display: flex;\n justify-content: flex-start;\n}\n\n.acc-text-adjust > div {\n display: flex;\n justify-content: space-between;\n margin-top: 20px;\n align-items: center;\n font-size: 16px;\n}\n\n.acc-text-adjust .acc-label div {\n font-size: 16px !important;\n}\n\n.acc-text-adjust div[role=\"button\"] {\n background: var(--acc-bg-color) !important;\n border-radius: 50%;\n width: 40px;\n height: 40px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n border: 1px solid rgba(0, 0, 0, 0.1);\n transition: border-color 0.2s ease;\n}\n\n.acc-text-adjust div[role=\"button\"]:hover {\n border-color: var(--acc-primary-color);\n}\n\n.acc-text-adjust div[role=\"button\"]:focus {\n outline: var(--acc-focus-outline-width) solid var(--acc-focus-ring-color);\n outline-offset: var(--acc-focus-outline-offset);\n}\n\n/* Overlay */\n.acc-overlay {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: calc(var(--acc-widget-z-index, 100000) - 1);\n}\n\n/* Progress indicator */\n.acc-progress-indicator {\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 4px;\n margin-top: 8px;\n height: 8px;\n}\n\n.acc-progress-dot {\n width: 6px;\n height: 6px;\n border-radius: 50%;\n background-color: var(--acc-border-color);\n transition: background-color 0.2s ease;\n}\n\n.acc-progress-dot.active {\n background-color: var(--acc-primary-color);\n}\n\n/* Selected state updates indicator colors */\n.acc-btn.acc-selected .acc-progress-dot.active {\n background-color: var(--acc-bg-color);\n}\n\n/* Responsive adjustments */\n@media only screen and (max-width: 560px) {\n .acc-menu {\n width: calc(100vw - (var(--acc-menu-inline-gap, 8px) * 2));\n }\n}\n\n@media only screen and (max-width: 420px) {\n .acc-options {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 12px;\n }\n .acc-btn {\n padding: 8px;\n }\n}\n\n/* Ensure proper focus visibility for assistive technology */\n@media (prefers-reduced-motion: reduce) {\n .acc-menu,\n .acc-btn,\n .acc-lang-select,\n .acc-progress-dot,\n .acc-menu-header div[role=\"button\"],\n .acc-lang-toggle,\n .acc-back-btn,\n .acc-footer-reset,\n .acc-footer-lang-toggle,\n .acc-footer-lang-arrow,\n .acc-text-adjust div[role=\"button\"] {\n transition: none;\n }\n}\n",' /* Base styles for the widget */\n .acc-widget, .acc-menu {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n font-weight: 400;\n -webkit-font-smoothing: antialiased;\n }\n \n .acc-widget *, .acc-menu * { \n box-sizing: border-box !important; \n }\n \n /* Accessibility toggle button */\n .acc-toggle-btn {\n position: fixed;\n z-index: var(--acc-widget-z-index, 100000);\n left: 30px;\n bottom: 30px;\n border-radius: 50%;\n align-items: center;\n justify-content: center;\n width: var(--acc-button-size, 48px);\n height: var(--acc-button-size, 48px);\n display: flex;\n cursor: pointer;\n outline: none !important;\n border: none !important;\n box-shadow: inset 0 0 0 4px var(--acc-primary-color, #1976d2), inset 0 0 0 6px white, 0 2px 5px rgba(0,0,0,0.2) !important;\n background: var(--acc-primary-color, #1976d2) !important;\n transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;\n overflow: visible;\n }\n \n .acc-toggle-btn .acc-toggle-icon {\n width: 60%;\n height: 60%;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n }\n\n .acc-toggle-btn .acc-toggle-icon svg {\n width: 100%;\n height: 100%;\n fill: white;\n transition: none;\n }\n \n .acc-toggle-btn:hover {\n transform: scale(1.12);\n }\n\n .acc-toggle-btn::before,\n .acc-toggle-btn::after {\n content: "";\n position: absolute;\n top: 50%;\n left: 50%;\n width: 44%;\n height: 2.6px;\n border-radius: 999px;\n background: var(--acc-text-color-inverted, #fff);\n opacity: 0;\n pointer-events: none;\n transform: translate(-50%, -50%) rotate(0deg);\n transition: none;\n }\n\n .acc-toggle-btn[aria-expanded="true"] {\n background: var(--acc-primary-color, #1976d2) !important;\n box-shadow: inset 0 0 0 4px var(--acc-primary-color, #1976d2), inset 0 0 0 6px white, 0 6px 14px rgba(0, 0, 0, 0.24) !important;\n }\n\n .acc-toggle-btn[aria-expanded="true"] .acc-toggle-icon svg {\n opacity: 0;\n }\n\n .acc-toggle-btn[aria-expanded="true"]::before,\n .acc-toggle-btn[aria-expanded="true"]::after {\n opacity: 1;\n }\n\n .acc-toggle-btn[aria-expanded="true"]::before {\n transform: translate(-50%, -50%) rotate(45deg);\n }\n\n .acc-toggle-btn[aria-expanded="true"]::after {\n transform: translate(-50%, -50%) rotate(-45deg);\n }\n\n .acc-violation-bubble {\n position: absolute;\n top: -8px;\n right: -8px;\n min-width: 24px;\n height: 24px;\n border-radius: 12px;\n font-size: 11px;\n font-weight: 700;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 4px;\n pointer-events: none;\n z-index: 1;\n color: #fff;\n border: none;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);\n }\n\n .acc-violation-bubble[data-severity="critical"] {\n background: #d32f2f;\n color: #fff;\n }\n\n .acc-violation-bubble[data-severity="serious"] {\n background: #f57c00;\n color: #fff;\n }\n\n .acc-violation-bubble[data-severity="moderate"] {\n background: #fbc02d;\n color: #333;\n }\n\n .acc-violation-bubble[hidden] {\n display: none;\n }\n\n .acc-toggle-btn:focus {\n outline: none !important;\n }\n\n .acc-toggle-btn:focus-visible {\n outline: 3px solid var(--acc-primary-color, #1976d2) !important;\n outline-offset: 2px;\n }\n\n body.acc-tts-click-mode :is(h1, h2, h3, h4, h5, h6, p, li, dt, dd, blockquote, figcaption, caption, th, td, div, section):not(.acc-container *):hover {\n cursor: pointer;\n }\n\n .acc-tts-active-block {\n outline: 2px solid var(--acc-primary-color, #1976d2) !important;\n outline-offset: 3px !important;\n border-radius: 4px;\n }\n \n @media (prefers-reduced-motion: reduce) {\n .acc-toggle-btn {\n transition: none;\n }\n\n .acc-toggle-btn .acc-toggle-icon svg,\n .acc-toggle-btn::before,\n .acc-toggle-btn::after {\n transition: none;\n }\n\n }\n','.acc-report-panel {\n display: none;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: calc(var(--acc-widget-z-index, 100000) + 10);\n font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;\n}\n.acc-report-panel.acc-report-visible {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.acc-report-overlay {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(0, 0, 0, 0.6);\n}\n.acc-report-dialog {\n position: relative;\n background: #fff;\n border-radius: 12px;\n width: 90%;\n max-width: 800px;\n max-height: 85vh;\n display: flex;\n flex-direction: column;\n box-shadow: 0 20px 60px rgba(0,0,0,0.3);\n}\n.acc-report-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 16px 20px;\n border-bottom: 1px solid #e0e0e0;\n}\n.acc-report-title {\n margin: 0;\n font-size: 18px;\n font-weight: 600;\n color: #1a1a1a;\n}\n.acc-report-close {\n background: none;\n border: none;\n padding: 8px;\n cursor: pointer;\n border-radius: 6px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.acc-report-close:hover {\n background: #f0f0f0;\n}\n.acc-report-close svg {\n width: 20px;\n height: 20px;\n fill: #666;\n}\n.acc-report-status {\n padding: 8px 20px;\n font-size: 14px;\n color: #666;\n background: #f8f9fa;\n}\n.acc-report-content {\n flex: 1;\n overflow-y: auto;\n padding: 16px 20px;\n}\n.acc-report-loading {\n text-align: center;\n padding: 40px;\n color: #666;\n}\n.acc-report-error {\n color: #d32f2f;\n padding: 20px;\n text-align: center;\n}\n.acc-report-summary {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));\n gap: 12px;\n margin-bottom: 20px;\n}\n.acc-report-stat {\n background: #f8f9fa;\n border-radius: 8px;\n padding: 16px;\n text-align: center;\n}\n.acc-report-stat-value {\n font-size: 28px;\n font-weight: 700;\n display: block;\n}\n.acc-report-stat-label {\n font-size: 12px;\n color: #666;\n text-transform: uppercase;\n margin-top: 4px;\n}\n.acc-report-stat.critical .acc-report-stat-value { color: #d32f2f; }\n.acc-report-stat.serious .acc-report-stat-value { color: #f57c00; }\n.acc-report-stat.moderate .acc-report-stat-value { color: #fbc02d; }\n.acc-report-stat.minor .acc-report-stat-value { color: #7cb342; }\n.acc-report-stat.passed .acc-report-stat-value { color: #43a047; }\n.acc-report-section {\n margin-bottom: 20px;\n}\n.acc-report-section-title {\n font-size: 14px;\n font-weight: 600;\n color: #333;\n margin-bottom: 12px;\n padding-bottom: 8px;\n border-bottom: 2px solid #e0e0e0;\n}\n.acc-report-violation {\n background: #fff;\n border: 1px solid #e0e0e0;\n border-radius: 8px;\n margin-bottom: 12px;\n overflow: hidden;\n}\n.acc-report-violation-header {\n padding: 12px 16px;\n background: #f8f9fa;\n cursor: pointer;\n display: flex;\n align-items: center;\n gap: 12px;\n}\n.acc-report-violation-header:hover {\n background: #f0f0f0;\n}\n.acc-report-violation-impact {\n font-size: 11px;\n font-weight: 600;\n text-transform: uppercase;\n padding: 4px 8px;\n border-radius: 4px;\n color: #fff;\n}\n.acc-report-violation-impact.critical { background: #d32f2f; }\n.acc-report-violation-impact.serious { background: #f57c00; }\n.acc-report-violation-impact.moderate { background: #fbc02d; color: #333; }\n.acc-report-violation-impact.minor { background: #7cb342; }\n.acc-report-violation-title {\n flex: 1;\n font-weight: 500;\n color: #333;\n}\n.acc-report-violation-count {\n font-size: 12px;\n color: #666;\n background: #e0e0e0;\n padding: 2px 8px;\n border-radius: 12px;\n}\n.acc-report-violation-details {\n display: none;\n padding: 16px;\n border-top: 1px solid #e0e0e0;\n}\n.acc-report-violation.expanded .acc-report-violation-details {\n display: block;\n}\n.acc-report-violation-desc {\n color: #666;\n font-size: 14px;\n margin-bottom: 12px;\n}\n.acc-report-violation-help {\n font-size: 13px;\n margin-bottom: 12px;\n}\n.acc-report-violation-help a {\n color: #1976d2;\n}\n.acc-report-node {\n background: #f8f9fa;\n border-radius: 6px;\n padding: 12px;\n margin-top: 8px;\n}\n.acc-report-node-html {\n font-family: monospace;\n font-size: 12px;\n background: #263238;\n color: #80cbc4;\n padding: 8px 12px;\n border-radius: 4px;\n overflow-x: auto;\n white-space: pre-wrap;\n word-break: break-all;\n}\n.acc-report-node-fix {\n margin-top: 8px;\n font-size: 13px;\n color: #333;\n}\n.acc-report-node-fix strong {\n color: #1976d2;\n}\n.acc-report-success {\n text-align: center;\n padding: 40px;\n}\n.acc-report-success-icon {\n width: 64px;\n height: 64px;\n background: #43a047;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n margin: 0 auto 16px;\n}\n.acc-report-success-icon svg {\n width: 32px;\n height: 32px;\n fill: #fff;\n}\n.acc-report-footer {\n padding: 12px 20px;\n border-top: 1px solid #e0e0e0;\n text-align: center;\n}\n.acc-report-powered {\n font-size: 12px;\n}\n@media (max-width: 600px) {\n .acc-report-dialog {\n width: 95%;\n max-height: 90vh;\n }\n .acc-report-summary {\n grid-template-columns: repeat(2, 1fr);\n }\n}\n',".acc-rg {\n position: fixed;\n left: 0;\n right: 0;\n width: 100%;\n pointer-events: none;\n background-color: rgba(0, 0, 0, 0.4);\n z-index: calc(var(--acc-widget-z-index, 100000) + 1);\n}\n.acc-rg-top {\n top: 0;\n}\n.acc-rg-bottom {\n bottom: 0;\n}\n/* Softer overlay when high contrast is active */\nbody.acc-high-contrast-mode .acc-rg {\n background-color: rgba(0, 0, 0, 0.25);\n}\n",".acc-skip-link {\n font-family: inherit;\n position: fixed;\n top: 16px;\n left: 16px;\n background: var(--acc-card-bg, #ffffff);\n color: var(--acc-text-color, #222222);\n border: 3px solid var(--acc-primary-color, #1976d2);\n border-radius: var(--acc-button-border-radius, 0.4rem);\n padding: 8px 16px;\n z-index: calc(var(--acc-widget-z-index, 100000) + 2);\n transform: translateY(-140%);\n opacity: 0;\n pointer-events: none;\n transition: transform 0.2s ease, opacity 0.2s ease;\n font-size: 16px;\n line-height: 1.2;\n font-weight: 600;\n background-clip: padding-box;\n}\n.acc-skip-link:focus,\n.acc-skip-link:active {\n transform: translateY(0);\n opacity: 1;\n pointer-events: auto;\n outline: var(--acc-focus-outline-width, 3px) solid var(--acc-focus-ring-color, #1976d2);\n outline-offset: var(--acc-focus-outline-offset, 2px);\n}\n",'.acc-annotation-layer {\n position: absolute;\n top: 0;\n left: 0;\n width: 0;\n height: 0;\n z-index: calc(var(--acc-widget-z-index, 100000) + 5);\n pointer-events: none;\n}\n\n.acc-annotation-marker {\n position: absolute;\n width: 20px;\n height: 20px;\n border: none;\n border-radius: 999px;\n color: #fff;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);\n cursor: pointer;\n pointer-events: auto;\n transform: translate(-40%, -50%);\n}\n\n.acc-annotation-marker svg {\n width: 12px;\n height: 12px;\n fill: currentColor;\n}\n\n.acc-annotation-marker[data-impact="critical"] {\n background: #b71c1c;\n}\n\n.acc-annotation-marker[data-impact="serious"] {\n background: #d84315;\n}\n\n.acc-annotation-marker[data-impact="moderate"] {\n background: #ef6c00;\n}\n\n.acc-annotation-marker[data-impact="minor"] {\n background: #1565c0;\n}\n\n.acc-annotation-popup {\n position: absolute;\n width: min(320px, 92vw);\n background: #fff;\n color: #1a1a1a;\n border: 1px solid #d7d7d7;\n border-radius: 10px;\n box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);\n padding: 12px;\n pointer-events: auto;\n}\n\n.acc-annotation-popup-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 10px;\n}\n\n.acc-annotation-popup-title {\n margin: 0;\n font-size: 14px;\n line-height: 1.3;\n}\n\n.acc-annotation-popup-close {\n border: 0;\n background: transparent;\n padding: 2px;\n width: 24px;\n height: 24px;\n color: #444;\n cursor: pointer;\n}\n\n.acc-annotation-popup-close svg {\n width: 20px;\n height: 20px;\n fill: currentColor;\n}\n\n.acc-annotation-popup p {\n margin: 8px 0;\n font-size: 13px;\n line-height: 1.45;\n}\n\n.acc-annotation-popup a {\n color: #0d47a1;\n font-weight: 600;\n text-decoration: underline;\n}\n'].join("\n"),c={findElement(t,e=document){try{return e.querySelector(t)}catch(e){return console.warn(`[AllyWidget] Failed to query selector: ${t}`,e),null}},injectStyle(t,e){if(e&&"undefined"!=typeof document)try{let n=document.getElementById(t)||document.createElement("style");n.innerHTML=e,n.id||(n.id=t,document.head.appendChild(n))}catch(t){console.warn("[AllyWidget] Error adding stylesheet:",t)}},createCSS(t){let e="";if(!t)return e;const n=["-o-","-ms-","-moz-","-webkit-",""],i=["filter"];for(let a in t){if(!Object.prototype.hasOwnProperty.call(t,a))continue;(i.includes(a)?n:[""]).forEach(n=>{e+=`${n}${a}:${t[a]} !important;`})}return e},wrapCSS(t,e,n){let i="";return e.forEach(e=>{i+=`${t} ${e}{${n}}`}),i},buildCSS(t){if(!t)return"";let e="";return e+=this.createCSS(t.styles||{}),e.length&&t.selector&&(e=this.wrapCSS(t.selector,t.childrenSelector||[""],e)),e+=t.css||"",e},applyToolStyle(t){let{id:e="",enable:n=!1}=t,i=`acc-${e}`;if(n){let e=this.buildCSS(t);this.injectStyle(i,e)}else{let t=document.getElementById(i);t&&t.remove()}document.documentElement.classList.toggle(i,n)},applyThemeVariables(){if("undefined"==typeof document)return;const t={"--acc-primary-color":this.widgetTheme.primaryColor,"--acc-primary-color-light":this.widgetTheme.primaryColorLight,"--acc-primary-color-dark":this.widgetTheme.primaryColorDark,"--acc-bg-color":this.widgetTheme.backgroundColor,"--acc-text-color":this.widgetTheme.textColor,"--acc-text-color-inverted":this.widgetTheme.textColorInverted,"--acc-card-bg":this.widgetTheme.cardBackground,"--acc-border-color":this.widgetTheme.borderColor,"--acc-focus-ring-color":this.widgetTheme.focusRingColor,"--acc-hover-color":this.widgetTheme.hoverColor,"--acc-active-color":this.widgetTheme.activeColor,"--acc-border-radius":this.widgetTheme.borderRadius,"--acc-button-border-radius":this.widgetTheme.buttonBorderRadius,"--acc-header-height":this.widgetTheme.headerHeight,"--acc-focus-outline-width":this.widgetTheme.focusBorderWidth,"--acc-focus-outline-offset":this.widgetTheme.focusOutlineOffset,"--acc-widget-z-index":String(this.widgetTheme.zIndex),"--acc-button-size":this.widgetTheme.buttonSize};Object.entries(t).forEach(([t,e])=>{document.documentElement.style.setProperty(t,e)})},registerStaticStyles(){this.staticStylesRegistered||(this.injectStyle("ally-static-styles",s),this.staticStylesRegistered=!0)}},l="4.11.1",d=`https://cdn.jsdelivr.net/npm/axe-core@${l}/axe.min.js`,p={runOnly:["wcag2a","wcag2aa","wcag21a","wcag21aa","best-practice"]},h="(prefers-reduced-motion: reduce)",u={getContrastToggleDisplay(t){return 0===t?{key:"light-contrast",label:"Light",icon:this.widgetIcons.lightContrast}:1===t?{key:"dark-contrast",label:"Dark",icon:this.widgetIcons.darkContrast}:{key:null,label:"Contrast",icon:this.widgetIcons.contrast}},updateContrastToggleButton(t,e){if(!t)return;const n=this.getContrastToggleDisplay(e),i=t.querySelector("svg");i?i.outerHTML=n.icon:t.insertAdjacentHTML("afterbegin",n.icon);const a=this.translate(n.label),o=t.querySelector(".acc-label");o&&(o.setAttribute("data-acc-text",n.label),o.innerText=a),t.setAttribute("title",a),t.setAttribute("aria-label",a),t.setAttribute("data-contrast-mode",n.key||"off")},getSaturationToggleDisplay(t){return 0===t?{key:"low-saturation",label:"Low",icon:this.widgetIcons.lowSaturation}:1===t?{key:"high-saturation",label:"High",icon:this.widgetIcons.highSaturation}:{key:null,label:"Saturation",icon:this.widgetIcons.saturation}},updateSaturationToggleButton(t,e){if(!t)return;const n=this.getSaturationToggleDisplay(e),i=t.querySelector("svg");i?i.outerHTML=n.icon:t.insertAdjacentHTML("afterbegin",n.icon);const a=this.translate(n.label),o=t.querySelector(".acc-label");o&&(o.setAttribute("data-acc-text",n.label),o.innerText=a),t.setAttribute("title",a),t.setAttribute("aria-label",a),t.setAttribute("data-saturation-mode",n.key||"off")},ensureSkipLink(){if("undefined"==typeof document)return null;if(this.skipLinkElement&&document.body.contains(this.skipLinkElement))return this.updateSkipLinkLabel(),this.skipLinkElement;const t=document.getElementById("acc-skip-link");if(t)return this.skipLinkElement=t,t.getAttribute("data-acc-text")||t.setAttribute("data-acc-text","Skip to accessibility menu"),this.updateSkipLinkLabel(),t;const e=document.createElement("button");return e.type="button",e.id="acc-skip-link",e.className="acc-skip-link",e.setAttribute("tabindex","0"),e.setAttribute("data-acc-text","Skip to accessibility menu"),e.setAttribute("aria-label",this.translate("Skip to accessibility menu")),e.textContent=this.translate("Skip to accessibility menu"),e.addEventListener("click",t=>{t.preventDefault();const e=this.widgetToggleButton;if(!e)return;const n=this.activeMenuContainer||this.menuContainer,i=()=>{const t=this.activeMenuContainer||this.menuContainer;if(!t)return;const e=this.getFocusableElements(t);e.length&&e[0].focus()};n&&"none"!==n.style.display?i():(e.click(),requestAnimationFrame(i))}),document.body.insertBefore(e,document.body.firstChild),this.skipLinkElement=e,e},updateSkipLinkLabel(){if(!this.skipLinkElement)return;const t=this.skipLinkElement.getAttribute("data-acc-text")||"Skip to accessibility menu",e=this.translate(t);this.skipLinkElement.textContent=e,this.skipLinkElement.setAttribute("aria-label",e)},shouldSkipScaling:t=>t.closest(".acc-menu, .acc-container, .acc-widget"),collectDirectTextParents(t=document.body){const e=new Set;if("undefined"==typeof document||"undefined"==typeof NodeFilter)return e;const n=t instanceof Element?t:document.body;if(!n)return e;const i=document.createTreeWalker(n,NodeFilter.SHOW_TEXT,{acceptNode:t=>{if(!t||!t.textContent||!t.textContent.trim())return NodeFilter.FILTER_REJECT;const e=t.parentElement;return e?this.shouldSkipScaling(e)||e.closest("script,style,noscript,textarea,pre,code,svg")||e.matches(this.textScaleSelectors)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}});let a=i.nextNode();for(;a;){const t=a.parentElement;t&&e.add(t),a=i.nextNode()}return e},applyScaleToElement(t,e){if(!t||!(t instanceof Element)||this.shouldSkipScaling(t)||t.classList.contains("material-icons")||t.classList.contains("fa"))return;const n="data-acc-baseSize";if(!t.hasAttribute(n)){const e=parseFloat(window.getComputedStyle(t).fontSize);if(Number.isNaN(e)||e<=0)return;t.setAttribute(n,String(e))}const i=parseFloat(t.getAttribute(n));Number.isNaN(i)||i<=0||(t.style.fontSize=i*e+"px")},ensureTextScaleObserver(){!this.textScaleObserver&&document.body&&(this.textScaleObserver=new MutationObserver(t=>{if(Math.abs(this.currentTextScaleMultiplier-1)<.001)return;const e=new Set;t.forEach(t=>{t.addedNodes.forEach(t=>{t instanceof Element&&(t.matches&&t.matches(this.textScaleSelectors)&&e.add(t),t.querySelectorAll?.(this.textScaleSelectors).forEach(t=>e.add(t)),this.collectDirectTextParents(t).forEach(t=>e.add(t)))})}),e.size&&e.forEach(t=>this.applyScaleToElement(t,this.currentTextScaleMultiplier))}),this.textScaleObserver.observe(document.body,{childList:!0,subtree:!0}))},disconnectTextScaleObserver(){this.textScaleObserver&&(this.textScaleObserver.disconnect(),this.textScaleObserver=null)},scaleText(t=1){try{const e=Number(t),n=Number.isFinite(e)&&e>0?e:1,i=Math.abs(n-1)<.001;if(this.currentTextScaleMultiplier=n,i){this.disconnectTextScaleObserver();document.querySelectorAll("[data-acc-baseSize]").forEach(t=>{this.shouldSkipScaling(t)||(t.style.fontSize="",t.removeAttribute("data-acc-baseSize"))})}else{this.ensureTextScaleObserver();document.querySelectorAll(this.textScaleSelectors).forEach(t=>this.applyScaleToElement(t,n)),this.collectDirectTextParents(document.body).forEach(t=>this.applyScaleToElement(t,n))}}catch(t){console.warn("Error scaling text:",t)}},clampTextScalePercent(t){const e=Number(this.textScaleMinPercent)||80,n=Number(this.textScaleMaxPercent)||150,i=Number(this.textScaleStepPercent)||5,a=Number(t);if(!Number.isFinite(a))return 100;const o=Math.round((a-e)/i)*i+e;return Math.min(n,Math.max(e,o))},getTextScalePercent(t=1){if(!1===t||null==t)return this.clampTextScalePercent(100);const e=Number(t);if(!Number.isFinite(e))return this.clampTextScalePercent(100);if(e<=0)return this.clampTextScalePercent(100);const n=e>10?e:100*e;return this.clampTextScalePercent(n)},syncTextScaleControlUI(t,e=1){if(!t||!t.querySelector)return;const n=t.querySelector(".acc-text-scale-range"),i=t.querySelector(".acc-text-scale-percent"),a=this.getTextScalePercent(e);if(n){const t=Number(this.textScaleMinPercent)||80,e=(a-t)/((Number(this.textScaleMaxPercent)||150)-t)*100;n.value=String(a),n.style.setProperty("--acc-text-scale-progress",`${Math.max(0,Math.min(100,e))}%`)}i&&(i.textContent=`${a}%`)},setTextScaleFromPercent(t,e={}){const n=!1!==e.persist,i=this.getTextScalePercent(t),a=Number((i/100).toFixed(2)),o=this.textScaleValues.indexOf(a);if(this.multiLevelFeatures["text-scale"]&&(this.multiLevelFeatures["text-scale"].currentIndex=o),o>-1)this.textScaleIndex=o;else{let t=0,e=1/0;this.textScaleValues.forEach((n,i)=>{const o=Math.abs(n-a);o<e&&(e=o,t=i)}),this.textScaleIndex=t}return this.scaleText(a),n&&this.updateState({"text-scale":a}),a},enableBoldText(t=!1){const e={id:"bold-text",selector:"body",childrenSelector:[["*",":not(.material-icons)",":not(.material-icons-outlined)",":not(.material-icons-round)",":not(.material-symbols-outlined)",":not(.material-symbols-rounded)",":not(.fa)",":not(.fas)",":not(.far)",":not(.fab)",":not(.fa-solid)",":not(.fa-regular)",":not(.fa-brands)",":not(.glyphicon)",":not(.icon)",":not(.icons)",':not([class*="icon-"])',":not([data-icon])"].join("")],styles:{"font-weight":"700"},css:"\n .acc-container, .acc-container *, .acc-menu, .acc-menu * {\n font-weight: inherit !important;\n }\n input::placeholder, textarea::placeholder {\n font-weight: 700 !important;\n }\n "};this.applyToolStyle({...e,enable:t})},adjustLetterSpacing(t=!1){this.applyToolStyle({id:"letter-spacing",selector:"html",childrenSelector:["","*:not(.material-icons,.acc-menu,.acc-menu *, .acc-widget, .acc-widget *)"],styles:{"letter-spacing":"2px"},enable:t})},adjustLineSpacing(t=!1){this.applyToolStyle({id:"line-spacing",selector:"html",childrenSelector:["","*:not(.material-icons,.acc-menu,.acc-menu *, .acc-widget, .acc-widget *)"],styles:{"line-height":"3"},enable:t})},enableLargePointer(t=!1){const e={id:"large-pointer",selector:"body",childrenSelector:["*"],styles:{cursor:"url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='98px' height='98px' viewBox='0 0 48 48'%3E%3Cpath fill='%23FFFFFF' d='M27.8 39.7c-.1 0-.2 0-.4-.1s-.4-.3-.6-.5l-3.7-8.6-4.5 4.2c-.1.2-.3.3-.6.3-.1 0-.3 0-.4-.1-.3-.1-.6-.5-.6-.9V12c0-.4.2-.8.6-.9.1-.1.3-.1.4-.1.2 0 .5.1.7.3l16 15c.3.3.4.7.3 1.1-.1.4-.5.6-.9.7l-6.3.6 3.9 8.5c.1.2.1.5 0 .8-.1.2-.3.5-.5.6l-2.9 1.3c-.2-.2-.4-.2-.5-.2z'/%3E%3Cpath fill='%23212121' d='m18 12 16 15-7.7.7 4.5 9.8-2.9 1.3-4.3-9.9L18 34V12m0-2c-.3 0-.5.1-.8.2-.7.3-1.2 1-1.2 1.8v22c0 .8.5 1.5 1.2 1.8.3.2.6.2.8.2.5 0 1-.2 1.4-.5l3.4-3.2 3.1 7.3c.2.5.6.9 1.1 1.1.2.1.5.1.7.1.3 0 .5-.1.8-.2l2.9-1.3c.5-.2.9-.6 1.1-1.1.2-.5.2-1.1 0-1.5l-3.3-7.2 4.9-.4c.8-.1 1.5-.6 1.7-1.3.3-.7.1-1.6-.5-2.1l-16-15c-.3-.5-.8-.7-1.3-.7z'/%3E%3C/svg%3E\") 40 15, auto"}};this.applyToolStyle({...e,enable:t})},highlightLinks(t=!1){const e={id:"highlight-links",selector:"html",childrenSelector:["a[href]:not(.acc-menu a, .acc-widget a)","summary.header__menu-item:not(.acc-menu summary, .acc-widget summary)","summary.link:not(.acc-menu summary, .acc-widget summary)","summary[role='button']:not(.acc-menu summary, .acc-widget summary)","details > summary.list-menu__item:not(.acc-menu summary, .acc-widget summary)",".header__menu-item[role='button']:not(.acc-menu *, .acc-widget *)"],styles:{outline:`3px solid ${this.widgetTheme.primaryColor}`,"outline-offset":"2px"}};this.applyToolStyle({...e,enable:t})},highlightTitles(t=!1){const e={id:"highlight-title",selector:"html",childrenSelector:this.targetSelectors.HEADERS,styles:{outline:`3px solid ${this.widgetTheme.primaryColor}`,"outline-offset":"2px"}};this.applyToolStyle({...e,enable:t})},ensureReadableFontLoaded(){if(this.readableFontLoaded)return;if(document.getElementById("acc-readable-text-font"))return void(this.readableFontLoaded=!0);const t=document.createElement("style");t.id="acc-readable-text-font",t.textContent='\n @font-face {\n font-family: "OpenDyslexic3";\n src: url("https://website-widgets.pages.dev/fonts/OpenDyslexic3-Regular.woff") format("woff"),\n url("https://website-widgets.pages.dev/fonts/OpenDyslexic3-Regular.ttf") format("truetype");\n font-display: swap;\n }\n ',document.head.appendChild(t),this.readableFontLoaded=!0},enableReadableText(t=!1){const e=!!t;e&&this.ensureReadableFontLoaded();const n={id:"readable-text",selector:"body",childrenSelector:[["*",":not(.material-icons)",":not(.material-icons-outlined)",":not(.material-icons-round)",":not(.material-symbols-outlined)",":not(.material-symbols-rounded)",":not(.fa)",":not(.fas)",":not(.far)",":not(.fab)",":not(.fa-solid)",":not(.fa-regular)",":not(.fa-brands)",":not(.glyphicon)",":not(.icon)",":not(.icons)",':not([class*="icon-"])',":not([data-icon])"].join("")],styles:{"font-family":'"OpenDyslexic3", "Comic Sans MS", Arial, Helvetica, sans-serif'},css:'\n .acc-container, .acc-container *, .acc-menu, .acc-menu * {\n font-family: inherit !important;\n }\n input::placeholder, textarea::placeholder {\n font-family: "OpenDyslexic3", "Comic Sans MS", Arial, Helvetica, sans-serif !important;\n }\n '};this.applyToolStyle({...n,enable:e})},pauseMotion(t=!1){this.applyToolStyle({id:"pause-motion",selector:"html",childrenSelector:["*"],styles:{transition:"none","animation-fill-mode":"forwards","animation-iteration-count":"1","animation-duration":".01s"},enable:t})},enableHighContrastMode(t=!1){const e=":not(.acc-container):not(.acc-container *):not(.acc-rg-container):not(.acc-rg-container *)",n={id:"high-contrast-mode",css:`\n /* ── Base: force black on white ── */\n body.acc-high-contrast-mode *${e} {\n color: #000 !important;\n background-color: #fff !important;\n background-image: none !important;\n text-shadow: none !important;\n box-shadow: none !important;\n }\n\n body.acc-high-contrast-mode {\n background: #fff !important;\n }\n\n /* ── Borders: solid and visible ── */\n body.acc-high-contrast-mode *${e} {\n border-color: #000 !important;\n }\n\n /* ── Links: underlined, distinct color ── */\n body.acc-high-contrast-mode a${e} {\n color: #00e !important;\n text-decoration: underline !important;\n }\n\n body.acc-high-contrast-mode a:visited${e} {\n color: #551a8b !important;\n }\n\n /* ── Headings: bold black ── */\n body.acc-high-contrast-mode :where(h1,h2,h3,h4,h5,h6)${e} {\n color: #000 !important;\n font-weight: 700 !important;\n }\n\n /* ── Images: keep visible, add border ── */\n body.acc-high-contrast-mode img${e} {\n border: 1px solid #000 !important;\n }\n\n /* ── Inputs & buttons: high-contrast borders ── */\n body.acc-high-contrast-mode :where(input, textarea, select, button)${e} {\n border: 2px solid #000 !important;\n background: #fff !important;\n color: #000 !important;\n }\n\n /* ── Focus rings: thick, high-visibility ── */\n body.acc-high-contrast-mode :focus-visible${e} {\n outline: 3px solid #000 !important;\n outline-offset: 2px !important;\n }\n\n /* ── Tables: visible cell borders ── */\n body.acc-high-contrast-mode :where(table, th, td)${e} {\n border: 1px solid #000 !important;\n }\n `};this.applyToolStyle({...n,enable:t}),document.body?.classList.toggle("acc-high-contrast-mode",!!t)},enableReadingAid(t=!1){try{let e=this.findElement(".acc-rg-container");const n=100;if(t){window.__accweb__scrollGuide&&(document.removeEventListener("mousemove",window.__accweb__scrollGuide),delete window.__accweb__scrollGuide),e||(e=document.createElement("div"),e.setAttribute("class","acc-rg-container"),e.setAttribute("aria-hidden","true"),e.innerHTML=this.readingAidTemplate,document.body.prepend(e));const t=e.querySelector(".acc-rg-top"),i=e.querySelector(".acc-rg-bottom");t.style.display="none",i.style.display="none",this.readingAidVisible=!1;const a=this.throttle(e=>{this.readingAidVisible||(t.style.display="block",i.style.display="block",this.readingAidVisible=!0);const a=e.clientY,o=Math.max(0,a-n/2),r=Math.max(0,window.innerHeight-(a+n/2));t.style.height=`${o}px`,i.style.height=`${r}px`},16);window.__accweb__scrollGuide=a,document.addEventListener("mousemove",a,{passive:!0})}else this.readingAidVisible=!1,window.__accweb__scrollGuide&&(document.removeEventListener("mousemove",window.__accweb__scrollGuide),delete window.__accweb__scrollGuide),e&&e.remove()}catch(t){console.warn("Error with reading aid:",t)}},loadAxeCore(){return this.axeCoreLoaded&&window.axe?Promise.resolve(window.axe):(this.axeCorePromise||(this.axeCoreLoading=!0,this.axeCorePromise=new Promise((t,e)=>{let n=document.querySelector('script[data-acc-axe-core="true"]'),i=!1,a=null;const o=()=>{if(!i){if(i=!0,a&&clearTimeout(a),!window.axe)return this.axeCoreLoading=!1,this.axeCoreLoaded=!1,this.axeCorePromise=null,void e(new Error("axe-core loaded but window.axe is unavailable"));this.axeCoreLoading=!1,this.axeCoreLoaded=!0,n&&n.setAttribute("data-acc-axe-core-loaded","true"),t(window.axe)}},r=t=>{i||(i=!0,a&&clearTimeout(a),this.axeCoreLoading=!1,this.axeCoreLoaded=!1,this.axeCorePromise=null,e(t))};window.axe?o():(n&&!n.src.includes(`/axe-core@${l}/`)&&(n.remove(),n=null),n||(n=document.createElement("script"),n.src=d,n.async=!0,n.integrity="sha384-wb3zgvLcZeMFSec08dk7g8K8yDFFAX2uNKVwOUuowwc/wIfE2t6XVUjTEgPrOJCS",n.crossOrigin="anonymous",n.setAttribute("data-acc-axe-core","true"),document.head.appendChild(n)),n.addEventListener("load",o,{once:!0}),n.addEventListener("error",()=>r(new Error("Failed to load axe-core")),{once:!0}),a=setTimeout(()=>{r(new Error("Timed out loading axe-core"))},15e3))})),this.axeCorePromise)},getAxeRunOptions:()=>({...p}),getViolationCounts(t={}){const e={critical:0,serious:0,moderate:0,minor:0};return(Array.isArray(t.violations)?t.violations:[]).forEach(t=>{const n=t?.impact;n&&void 0!==e[n]&&(e[n]+=Array.isArray(t.nodes)?t.nodes.length:0)}),e},updateViolationBubble(t=null){const e=this.violationBubble||this.findElement(".acc-violation-bubble");if(!e)return;const n=this.getViolationCounts(t||this.axeScanResults||{}),i=this.isDevMode();let a=0,o="";if(n.critical>0?(a=n.critical,o="critical"):i&&n.serious>0?(a=n.serious,o="serious"):i&&n.moderate>0&&(a=n.moderate,o="moderate"),a<=0||!1===this.options?.showViolationBubble)return e.textContent="",e.hidden=!0,void e.removeAttribute("data-severity");e.hidden=!1,e.dataset.severity=o,e.textContent=a>99?"99+":String(a)},async runBackgroundAxeScan({force:t=!1}={}){return!t&&this.axeScanResults?(this.updateViolationBubble(this.axeScanResults),this.axeScanResults):(!t&&this.axeScanPromise||(this.axeScanPromise=(async()=>{try{const t=await this.loadAxeCore(),e=await t.run(document,this.getAxeRunOptions());return this.axeScanResults=e,this.updateViolationBubble(e),e}catch(t){throw this.updateViolationBubble({violations:[]}),t}finally{this.axeScanPromise=null}})()),this.axeScanPromise)},ensureMediaQuery(t){return t&&"undefined"!=typeof window&&"function"==typeof window.matchMedia?(this.systemPreferenceMediaQueries||(this.systemPreferenceMediaQueries={}),this.systemPreferenceMediaQueries[t]||(this.systemPreferenceMediaQueries[t]=window.matchMedia(t)),this.systemPreferenceMediaQueries[t]):null},applySystemMotionPreference(t){if(this.loadConfig(),this.hasExplicitStatePreference("pause-motion"))return!1;return(!!this.retrieveState("pause-motion")!==t||!this.isSystemControlledPreference("pause-motion"))&&(this.updateState({"pause-motion":t},{source:"system"}),!0)},detectSystemPreferences(){if("undefined"==typeof window||"function"!=typeof window.matchMedia)return;const t=this.ensureMediaQuery(h),e=!!t?.matches;this.applySystemMotionPreference(e)&&this.applyEnhancements()},clearSystemPreferenceListeners(){(Array.isArray(this.systemPreferenceListeners)?this.systemPreferenceListeners:[]).forEach(t=>{"function"==typeof t&&t()}),this.systemPreferenceListeners=[]},setupMediaQueryListeners(){if(this.clearSystemPreferenceListeners(),"undefined"==typeof window||"function"!=typeof window.matchMedia)return;((t,e)=>{t&&"function"==typeof e&&("function"==typeof t.addEventListener?(t.addEventListener("change",e),this.systemPreferenceListeners.push(()=>t.removeEventListener("change",e))):"function"==typeof t.addListener&&(t.addListener(e),this.systemPreferenceListeners.push(()=>t.removeListener(e))))})(this.ensureMediaQuery(h),t=>{this.applySystemMotionPreference(!!t.matches)&&this.applyEnhancements()})},async runAccessibilityReport(){let t=this.findElement(".acc-report-panel");t||(t=this.createReportPanel(),document.body.appendChild(t)),this.openReportPanel(t);const e=this.findElement(".acc-report-content",t),n=this.findElement(".acc-report-status",t);n.textContent=this.translate("Loading..."),e.innerHTML=`<div class="acc-report-loading">${this.translate("Analyzing page...")}</div>`;try{const e=await this.runBackgroundAxeScan({force:!0});this.displayReportResults(t,e)}catch(t){e.innerHTML=`<div class="acc-report-error">Error: ${t.message}</div>`,n.textContent=""}},getReportFocusableElements(t){if(!t)return[];const e=this.findElement(".acc-report-dialog",t);return this.getFocusableElements(e||t)},openReportPanel(t){if(!t)return;this.reportPreviousFocus=document.activeElement&&"function"==typeof document.activeElement.focus?document.activeElement:null,t.classList.add("acc-report-visible"),t.setAttribute("aria-hidden","false");const e=this.findElement(".acc-report-dialog",t)||t;e.hasAttribute("tabindex")||e.setAttribute("tabindex","-1"),this.reportKeyListener&&document.removeEventListener("keydown",this.reportKeyListener,!0),this.reportKeyListener=n=>{if(!t.classList.contains("acc-report-visible"))return;if("Escape"===n.key||"Esc"===n.key)return n.preventDefault(),n.stopPropagation(),void this.closeReportPanel();if("Tab"!==n.key)return;const i=this.getReportFocusableElements(t);if(!i.length)return n.preventDefault(),void e.focus();const a=i[0],o=i[i.length-1],r=document.activeElement,s=!t.contains(r);n.shiftKey?(r===a||s)&&(n.preventDefault(),o.focus()):(r===o||s)&&(n.preventDefault(),a.focus())},document.addEventListener("keydown",this.reportKeyListener,!0),requestAnimationFrame(()=>{const n=this.getReportFocusableElements(t);n.length?n[0].focus():e.focus()})},createReportPanel(){const t=document.createElement("div");t.className="acc-report-panel acc-container",t.setAttribute("role","dialog"),t.setAttribute("aria-modal","true"),t.setAttribute("aria-hidden","true"),t.setAttribute("aria-labelledby","acc-report-title"),t.innerHTML=`\n <div class="acc-report-overlay"></div>\n <div class="acc-report-dialog">\n <div class="acc-report-header">\n <h2 id="acc-report-title" class="acc-report-title">${this.translate("Accessibility Report")}</h2>\n <button type="button" class="acc-report-close" aria-label="${this.translate("Close")}">${this.widgetIcons.close}</button>\n </div>\n <div class="acc-report-status"></div>\n <div class="acc-report-content"></div>\n <div class="acc-report-footer">\n <span class="acc-report-powered">Powered by axe-core</span>\n </div>\n </div>\n `;const e=t.querySelector(".acc-report-close"),n=t.querySelector(".acc-report-overlay");return e.addEventListener("click",()=>this.closeReportPanel()),n.addEventListener("click",()=>this.closeReportPanel()),t},displayReportResults(t,e){const n=this.findElement(".acc-report-content",t),i=this.findElement(".acc-report-status",t),a=e.violations||[],o=e.passes||[],r=e.incomplete||[],s={critical:0,serious:0,moderate:0,minor:0};a.forEach(t=>{void 0!==s[t.impact]&&(s[t.impact]+=t.nodes.length)});const c=Object.values(s).reduce((t,e)=>t+e,0);i.textContent=c>0?`${c} ${this.translate("Violations Found")}`:this.translate("No Issues Found");let l=`\n <div class="acc-report-summary">\n <div class="acc-report-stat critical">\n <span class="acc-report-stat-value">${s.critical}</span>\n <span class="acc-report-stat-label">${this.translate("Critical")}</span>\n </div>\n <div class="acc-report-stat serious">\n <span class="acc-report-stat-value">${s.serious}</span>\n <span class="acc-report-stat-label">${this.translate("Serious")}</span>\n </div>\n <div class="acc-report-stat moderate">\n <span class="acc-report-stat-value">${s.moderate}</span>\n <span class="acc-report-stat-label">${this.translate("Moderate")}</span>\n </div>\n <div class="acc-report-stat minor">\n <span class="acc-report-stat-value">${s.minor}</span>\n <span class="acc-report-stat-label">${this.translate("Minor")}</span>\n </div>\n <div class="acc-report-stat passed">\n <span class="acc-report-stat-value">${o.length}</span>\n <span class="acc-report-stat-label">${this.translate("Passed Tests")}</span>\n </div>\n </div>\n `;if(0===a.length)l+=`\n <div class="acc-report-success">\n <div class="acc-report-success-icon">\n <svg viewBox="0 0 24 24"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"/></svg>\n </div>\n <h3>${this.translate("No Issues Found")}</h3>\n </div>\n `;else{l+=`<div class="acc-report-section">\n <div class="acc-report-section-title">${this.translate("Violations Found")} (${a.length})</div>\n `;const t={critical:0,serious:1,moderate:2,minor:3};a.sort((e,n)=>(t[e.impact]||4)-(t[n.impact]||4)),a.forEach((t,e)=>{l+=`\n <div class="acc-report-violation" data-index="${e}">\n <div class="acc-report-violation-header">\n <span class="acc-report-violation-impact ${t.impact}">${this.translate(this.capitalizeFirst(t.impact))}</span>\n <span class="acc-report-violation-title">${this.escapeHtml(t.help)}</span>\n <span class="acc-report-violation-count">${t.nodes.length} ${this.translate("Element")}${t.nodes.length>1?"s":""}</span>\n </div>\n <div class="acc-report-violation-details">\n <p class="acc-report-violation-desc">${this.escapeHtml(t.description)}</p>\n <p class="acc-report-violation-help">\n <a href="${t.helpUrl}" target="_blank" rel="noopener">${this.translate("How to Fix")} →</a>\n </p>\n ${t.nodes.slice(0,5).map(t=>`\n <div class="acc-report-node">\n <div class="acc-report-node-html">${this.escapeHtml(t.html)}</div>\n ${t.failureSummary?`<div class="acc-report-node-fix"><strong>${this.translate("Issue")}:</strong> ${this.escapeHtml(t.failureSummary)}</div>`:""}\n </div>\n `).join("")}\n ${t.nodes.length>5?`<p style="color:#666;font-size:13px;margin-top:12px;">... and ${t.nodes.length-5} more elements</p>`:""}\n </div>\n </div>\n `}),l+="</div>"}r.length>0&&(l+=`\n <div class="acc-report-section">\n <div class="acc-report-section-title">${this.translate("Items Need Review")} (${r.length})</div>\n <p style="color:#666;font-size:14px;">These items require manual verification.</p>\n </div>\n `),n.innerHTML=l,n.querySelectorAll(".acc-report-violation-header").forEach(t=>{t.addEventListener("click",()=>{t.parentElement.classList.toggle("expanded")})})},capitalizeFirst:t=>t?t.charAt(0).toUpperCase()+t.slice(1):"",escapeHtml(t){if(!t)return"";const e=document.createElement("div");return e.textContent=t,e.innerHTML},closeReportPanel(){const t=this.findElement(".acc-report-panel");t&&(t.classList.remove("acc-report-visible"),t.setAttribute("aria-hidden","true")),this.reportKeyListener&&(document.removeEventListener("keydown",this.reportKeyListener,!0),this.reportKeyListener=null);const e=this.reportPreviousFocus;this.reportPreviousFocus=null,e&&"function"==typeof e.focus&&e.focus()},concealImages(t=!1){const e="acc-hide-images",n=document.getElementById(e);if(n&&n.remove(),document.documentElement.classList.toggle(e,t),t){const t="\n body > *:not(.acc-container) img,\n body > *:not(.acc-container) picture,\n body > *:not(.acc-container) svg:not(.acc-container svg),\n body > *:not(.acc-container) video,\n body > *:not(.acc-container) iframe,\n body > *:not(.acc-container) canvas,\n body > *:not(.acc-container) .video,\n body > *:not(.acc-container) .image {\n display: none !important;\n }\n ";this.injectStyle(e,t)}},supportsSpeechSynthesis:()=>"undefined"!=typeof window&&("speechSynthesis"in window&&void 0!==window.SpeechSynthesisUtterance),supportsTextToSpeech(){return this.supportsSpeechSynthesis()},normalizeSpeechLanguage(t="en"){const e=String(t||"en").toLowerCase();return{en:"en-US",ne:"ne-NP"}[e]||e},getNativeTtsRate(){const t=Number(this.nativeTtsConfig?.rate);return Number.isFinite(t)?Math.min(2,Math.max(.5,t)):1},getNativeTtsPitch(){const t=Number(this.nativeTtsConfig?.pitch);return Number.isFinite(t)?Math.min(2,Math.max(0,t)):1},isElementVisibleForTts(t){if(!(t instanceof Element))return!1;const e=window.getComputedStyle(t);if("none"===e.display||"hidden"===e.visibility)return!1;const n=t.getBoundingClientRect();return n.width>0&&n.height>0},isTtsExcludedElement:(t,{allowLandmarkRegions:e=!1}={})=>!(t instanceof Element)||(!!t.closest(".acc-container")||(!!t.closest("script,style,noscript,template")||(!!t.closest('[aria-hidden="true"]')||!(e||!t.closest('nav,header,footer,aside,form,dialog,[role="navigation"],[role="complementary"],[role="search"],[role="menu"],[role="dialog"],[role="alert"],[aria-live]'))))),normalizeReadableText:(t="")=>String(t).replace(/\s+/g," ").replace(/[ \t]+([,.;!?])/g,"$1").trim(),getTtsCandidateRoots(){const t=[],e=new Set;return["article","main",'[role="main"]',".content",".post",".entry-content","#content"].forEach(n=>{document.querySelectorAll(n).forEach(n=>{n instanceof Element&&!this.isTtsExcludedElement(n)&&this.isElementVisibleForTts(n)&&(e.has(n)||(e.add(n),t.push(n)))})}),t},getPrimaryContentRoot(){if("undefined"==typeof document)return null;const t=this.getTtsCandidateRoots();if(!t.length){const t=Array.from(document.querySelectorAll('main,article,[role="main"],#content,.content,.post,.entry-content')).filter(t=>t instanceof Element&&!this.isTtsExcludedElement(t)&&this.isElementVisibleForTts(t));if(t.length){let e=t[0],n=-1;return t.forEach(t=>{const i=this.normalizeReadableText(t.innerText||t.textContent||"").length,a=t.getBoundingClientRect(),o=i+a.width*a.height*.0025;o>n&&(n=o,e=t)}),e}if(document.body){const t=Array.from(document.body.children).filter(t=>t instanceof Element&&!t.classList.contains("acc-container")&&this.isElementVisibleForTts(t));if(t.length){let e=t[0],n=-1;return t.forEach(t=>{const i=this.normalizeReadableText(t.innerText||t.textContent||"").length,a=t.getBoundingClientRect(),o=i+a.width*a.height*.0025;o>n&&(n=o,e=t)}),e}}return document.body}let e=t[0],n=-1;return t.forEach(t=>{const i=this.extractReadableBlocks(t).join(" ").length;i>n&&(n=i,e=t)}),e},extractReadableBlocks(t){if(!(t instanceof Element))return[];const e=[];return t.querySelectorAll("h1,h2,h3,h4,h5,h6,p,li,dt,dd,blockquote,figcaption,caption,th,td").forEach(t=>{if(!(t instanceof Element))return;if(this.isTtsExcludedElement(t)||!this.isElementVisibleForTts(t))return;const n=this.normalizeReadableText(t.innerText||t.textContent||"");n.length<15||e.push(n)}),e},getReadableContent(){if("undefined"==typeof document)return"";const t=this.getTtsCandidateRoots();let e=[],n=-1;if(t.forEach(t=>{const i=this.extractReadableBlocks(t);if(!i.length)return;const a=i.join(" ").length,o=60*i.length+a;o>n&&(n=o,e=i)}),!e.length&&document.body&&(e=this.extractReadableBlocks(document.body)),!e.length&&document.body){return this.normalizeReadableText(document.body.innerText||document.body.textContent||"").slice(0,3e4)}return e.join("\n\n").slice(0,3e4)},splitLongSpeechSegment(t,e=240){if(!t)return[];if(t.length<=e)return[t];const n=[];let i=t;for(;i.length>e;){let t=i.lastIndexOf(",",e);t<Math.floor(.5*e)&&(t=i.lastIndexOf(" ",e)),t<Math.floor(.5*e)&&(t=e),n.push(i.slice(0,t).trim()),i=i.slice(t).trim()}return i.length&&n.push(i),n.filter(Boolean)},buildSpeechQueue(t=""){const e=this.normalizeReadableText(t);if(!e)return[];const n=t.split(/\n{2,}/).map(t=>this.normalizeReadableText(t)).filter(Boolean),i=n.length?n:[e],a=[];return i.forEach(t=>{const e=t.split(/(?<=[.!?])\s+/).filter(Boolean),n=e.length?e:[t];let i="";n.forEach(t=>{const e=i?`${i} ${t}`:t;e.length<=240?i=e:(i&&a.push(...this.splitLongSpeechSegment(i,240)),i=t)}),i&&a.push(...this.splitLongSpeechSegment(i,240))}),a.slice(0,300)},resolveSpeechVoice(t){if(!this.supportsSpeechSynthesis())return null;const e=window.speechSynthesis,n=e.getVoices?.()||[];if(!n.length)return null;const i=String(this.nativeTtsConfig?.preferredVoiceName||"").trim().toLowerCase();if(i){const t=n.find(t=>String(t.name||"").trim().toLowerCase()===i);if(t)return t;const e=n.find(t=>String(t.name||"").toLowerCase().includes(i));if(e)return e}const a=String(this.nativeTtsConfig?.preferredVoiceLang||"").trim()||t,o=this.normalizeSpeechLanguage(a).toLowerCase(),r=o.split("-")[0],s=n.find(t=>t.localService&&String(t.lang||"").toLowerCase()===o),c=n.find(t=>String(t.lang||"").toLowerCase()===o),l=n.find(t=>t.localService&&String(t.lang||"").toLowerCase().startsWith(r)),d=n.find(t=>String(t.lang||"").toLowerCase().startsWith(r)),p=n.find(t=>t.default);return s||c||l||d||p||n[0]},getSpeechTargetFromEvent(t){const e=t?.target;if(!(e instanceof Element))return null;if(e.closest(".acc-container"))return null;const n=e.closest("h1,h2,h3,h4,h5,h6,p,li,dt,dd,blockquote,figcaption,caption,th,td,div,section");if(!(n instanceof Element))return null;if(this.isTtsExcludedElement(n,{allowLandmarkRegions:!0})||!this.isElementVisibleForTts(n))return null;const i=this.normalizeReadableText(n.innerText||n.textContent||"");return i.length<2?null:{element:n,text:i.slice(0,3e4)}},setActiveSpeechTarget(t=null){this.ttsActiveTarget&&this.ttsActiveTarget!==t&&this.ttsActiveTarget.classList.remove("acc-tts-active-block"),this.ttsActiveTarget=t,this.ttsActiveTarget&&this.ttsActiveTarget.classList.add("acc-tts-active-block")},startTtsClickMode(){"undefined"==typeof document||this.ttsClickListener||(this.ttsClickListener=t=>{this.handleTtsClick(t)},document.addEventListener("click",this.ttsClickListener,!0),document.body?.classList.add("acc-tts-click-mode"))},stopTtsClickMode(){"undefined"!=typeof document&&(this.ttsClickListener&&(document.removeEventListener("click",this.ttsClickListener,!0),this.ttsClickListener=null),document.body?.classList.remove("acc-tts-click-mode"),this.setActiveSpeechTarget(null))},handleTtsClick(t){if(!this.retrieveState("text-to-speech"))return;const e=this.getSpeechTargetFromEvent(t);e&&(this.setActiveSpeechTarget(e.element),this.ttsTextCache=e.text,this.startSpeechPlayback({restart:!0}))},ensureTtsQueue(){const t=this.ttsTextCache||this.getReadableContent();return t?(this.ttsTextCache=t,this.ttsQueue=this.buildSpeechQueue(t),this.ttsQueueIndex=0,this.ttsQueue.length>0):(this.ttsQueue=[],this.ttsQueueIndex=0,!1)},speakNextTtsChunk(t){if(!this.supportsSpeechSynthesis())return;if(t!==this.ttsSessionId)return;if(this.ttsQueueIndex>=this.ttsQueue.length)return this.ttsStatus="stopped",void this.setActiveSpeechTarget(null);const e=window.speechSynthesis,n=this.ttsQueue[this.ttsQueueIndex];if(!n)return this.ttsQueueIndex+=1,void this.speakNextTtsChunk(t);const i=new window.SpeechSynthesisUtterance(n);i.lang=this.normalizeSpeechLanguage(this.loadConfig().lang||"en"),this.ttsVoice&&this.ttsVoice.lang?.toLowerCase()===i.lang.toLowerCase()||(this.ttsVoice=this.resolveSpeechVoice(i.lang)),this.ttsVoice&&(i.voice=this.ttsVoice),i.rate=this.getNativeTtsRate(),i.pitch=this.getNativeTtsPitch(),i.onstart=()=>{t===this.ttsSessionId&&(this.ttsStatus="reading")},i.onpause=()=>{t===this.ttsSessionId&&(this.ttsStatus="paused")},i.onresume=()=>{t===this.ttsSessionId&&(this.ttsStatus="reading")},i.onend=()=>{t===this.ttsSessionId&&(this.ttsQueueIndex+=1,this.speakNextTtsChunk(t))},i.onerror=()=>{t===this.ttsSessionId&&(this.ttsStatus="stopped",this.setActiveSpeechTarget(null))},this.ttsUtterance=i,e.speak(i)},startNativeSpeechPlayback({restart:t=!1}={}){if(!this.supportsSpeechSynthesis())return;const e=window.speechSynthesis;if(!t&&e.paused)return e.resume(),void(this.ttsStatus="reading");if(!(!(t||!this.ttsQueue.length||this.ttsQueueIndex>=this.ttsQueue.length)||this.ensureTtsQueue()))return void this.stopSpeech();const n=this.ttsSessionId+1;this.ttsSessionId=n,e.cancel(),this.ttsStatus="reading",this.speakNextTtsChunk(n)},startSpeechPlayback({restart:t=!1}={}){this.startNativeSpeechPlayback({restart:t})},pauseSpeech(){if(!this.supportsSpeechSynthesis())return;const t=window.speechSynthesis;t.speaking&&!t.paused&&(t.pause(),this.ttsStatus="paused")},resumeSpeech(){if(!this.supportsSpeechSynthesis())return;const t=window.speechSynthesis;if(t.paused)return t.resume(),void(this.ttsStatus="reading");this.startSpeechPlayback({restart:!1})},stopSpeech(){const t=this.supportsSpeechSynthesis()?window.speechSynthesis:null;this.ttsSessionId+=1,t&&(t.speaking||t.paused)&&t.cancel(),this.ttsUtterance=null,this.ttsQueueIndex=0,this.ttsStatus="stopped",this.setActiveSpeechTarget(null)},enableTextToSpeech(t=!1){if(!this.supportsTextToSpeech())return;const e="text-to-speech"===this.userInitiatedToggleKey;if(!t)return e&&this.announceTtsState(!1),this.stopSpeech(),void this.stopTtsClickMode();const n=window.speechSynthesis;n?.getVoices&&n.getVoices(),this.startTtsClickMode(),this.ttsStatus="idle",e&&this.announceTtsState(!0)},announceTtsState(t){if(!this.supportsTextToSpeech())return;const e=window.speechSynthesis;if(!e)return;const n=t?this.translate("Text to Speech On"):this.translate("Text to Speech Off");e.cancel();const i=new SpeechSynthesisUtterance(n),a=this.normalizeSpeechLanguage(this.loadConfig().lang||"en");i.lang=a;const o=this.resolveSpeechVoice(a);o&&(i.voice=o),i.rate=this.getNativeTtsRate(),i.pitch=this.getNativeTtsPitch(),e.speak(i)},ensureAnnotationLayer(){if(this.annotationLayer&&document.body.contains(this.annotationLayer))return this.annotationLayer;const t=document.createElement("div");return t.className="acc-annotation-layer acc-container",t.setAttribute("aria-hidden","true"),document.body.appendChild(t),this.annotationLayer=t,t},resolveAnnotationTarget(t){if(!t||"string"!=typeof t)return null;try{const e=document.querySelector(t);return!e||e.closest(".acc-container")?null:e}catch{return null}},buildAnnotationEntries(t={}){const e=Array.isArray(t.violations)?t.violations:[],n=[],i=new Set;return e.forEach(t=>{(Array.isArray(t.nodes)?t.nodes:[]).forEach(e=>{const a=(Array.isArray(e.target)?e.target:[]).find(t=>"string"==typeof t&&t.trim().length);if(!a)return;const o=`${a}::${t.id||t.help||""}`;if(i.has(o))return;const r=this.resolveAnnotationTarget(a);r&&(i.add(o),n.push({selector:a,element:r,impact:t.impact||"minor",title:t.help||this.translate("Issue"),description:t.description||"",helpUrl:t.helpUrl||"",failureSummary:e.failureSummary||""}))})}),n.slice(0,50)},createAnnotationMarker(t){const e=document.createElement("button");return e.type="button",e.className="acc-annotation-marker",e.dataset.impact=t.impact||"minor",e.setAttribute("aria-label",t.title),e.title=t.title,e.innerHTML="",e.addEventListener("click",n=>{n.preventDefault(),n.stopPropagation(),this.showAnnotationPopup(t,e)}),e},positionAnnotationPopup(t,e){if(!t||!e)return;const n=e.getBoundingClientRect(),i=t.offsetWidth||300,a=t.offsetHeight||180,o=window.innerWidth,r=window.innerHeight,s=10;let c=window.scrollX+n.left+s,l=window.scrollY+n.bottom+s;c+i>window.scrollX+o-s&&(c=window.scrollX+o-i-s),c<window.scrollX+s&&(c=window.scrollX+s),l+a>window.scrollY+r-s&&(l=window.scrollY+n.top-a-s),l<window.scrollY+s&&(l=window.scrollY+s),t.style.left=`${c}px`,t.style.top=`${l}px`},clearAnnotationPopup(){this.annotationPopup&&(this.annotationPopup.remove(),this.annotationPopup=null)},showAnnotationPopup(t,e){if(!t||!e||!this.annotationLayer)return;this.clearAnnotationPopup();const n=document.createElement("div");n.className="acc-annotation-popup",n.innerHTML=`\n <div class="acc-annotation-popup-header">\n <h3 class="acc-annotation-popup-title">${this.escapeHtml(t.title)}</h3>\n <button type="button" class="acc-annotation-popup-close" aria-label="${this.translate("Close")}">${this.widgetIcons.close}</button>\n </div>\n <p><strong>${this.translate(this.capitalizeFirst(t.impact))}</strong></p>\n <p>${this.escapeHtml(t.description)}</p>\n ${t.failureSummary?`<p><strong>${this.translate("Issue")}:</strong> ${this.escapeHtml(t.failureSummary)}</p>`:""}\n ${t.helpUrl?`<p><a href="${t.helpUrl}" target="_blank" rel="noopener">${this.translate("How to Fix")} →</a></p>`:""}\n `,n.__accMarker=e;const i=n.querySelector(".acc-annotation-popup-close");i?.addEventListener("click",()=>this.clearAnnotationPopup()),this.annotationLayer.appendChild(n),this.annotationPopup=n,this.positionAnnotationPopup(n,e)},positionAnnotations(){Array.isArray(this.annotationItems)&&this.annotationItems.length&&(this.annotationItems.forEach(t=>{if(!t?.target||!t?.marker)return;if(!document.contains(t.target))return void(t.marker.hidden=!0);const e=t.target.getBoundingClientRect();e.width<=0||e.height<=0||e.bottom<0||e.top>window.innerHeight||e.right<0||e.left>window.innerWidth?t.marker.hidden=!0:(t.marker.hidden=!1,t.marker.style.top=`${window.scrollY+e.top+Math.min(16,e.height/2)}px`,t.marker.style.left=`${window.scrollX+e.right}px`)}),this.annotationPopup?.__accMarker&&!this.annotationPopup.__accMarker.hidden&&this.positionAnnotationPopup(this.annotationPopup,this.annotationPopup.__accMarker))},enableAnnotations(t=!1){if(!t)return void this.disableAnnotations();const e=++this.annotationRequestId;this.disableAnnotations({cancelPending:!1});const n=this.ensureAnnotationLayer();this.runBackgroundAxeScan().then(t=>{if(e!==this.annotationRequestId||!this.retrieveState("annotations"))return;const i=this.buildAnnotationEntries(t);this.annotationItems=i.map(t=>{const e=this.createAnnotationMarker(t);return n.appendChild(e),{marker:e,target:t.element,data:t}}),this.annotationRepositionHandler||(this.annotationRepositionHandler=this.throttle(()=>this.positionAnnotations(),80)),window.addEventListener("scroll",this.annotationRepositionHandler,{passive:!0}),window.addEventListener("resize",this.annotationRepositionHandler,{passive:!0}),this.annotationOutsideHandler||(this.annotationOutsideHandler=t=>{if(!this.annotationPopup)return;const e=this.annotationPopup.contains(t.target),n=t.target?.closest?.(".acc-annotation-marker");e||n||this.clearAnnotationPopup()}),document.addEventListener("click",this.annotationOutsideHandler,!0),this.positionAnnotations()}).catch(t=>{console.warn("Failed to render annotations:",t)})},disableAnnotations({cancelPending:t=!0}={}){t&&(this.annotationRequestId+=1),this.clearAnnotationPopup(),this.annotationOutsideHandler&&document.removeEventListener("click",this.annotationOutsideHandler,!0),this.annotationRepositionHandler&&(window.removeEventListener("scroll",this.annotationRepositionHandler),window.removeEventListener("resize",this.annotationRepositionHandler)),this.annotationLayer&&(this.annotationLayer.remove(),this.annotationLayer=null),this.annotationItems=[]},clearSimpleLayoutDomMutations(){this.simpleLayoutRoot&&(this.simpleLayoutRoot.classList.remove("acc-simple-layout-root"),this.simpleLayoutRoot=null),Array.isArray(this.simpleLayoutHiddenElements)&&this.simpleLayoutHiddenElements.forEach(t=>{t&&t.classList&&t.classList.remove("acc-simple-layout-hidden")}),this.simpleLayoutHiddenElements=[]},applySimpleLayoutDomMutations(){const t=this.getPrimaryContentRoot();if(!t||!document.body)return;this.simpleLayoutRoot=t,t.classList.add("acc-simple-layout-root");const e=[];Array.from(document.body.children).forEach(n=>{n instanceof Element&&(n.classList.contains("acc-container")||n===t||n.contains(t)||(n.classList.add("acc-simple-layout-hidden"),e.push(n)))});const n=["aside","nav","form","footer",'[role="complementary"]','[role="search"]','[role="contentinfo"]','[aria-hidden="true"]','[class*="cookie"]','[id*="cookie"]','[class*="banner"]','[id*="banner"]','[class*="popup"]','[id*="popup"]','[class*="modal"]','[id*="modal"]','[class*="advert"]','[id*="advert"]','[class*="ads"]','[id*="ads"]','[class*="sidebar"]','[id*="sidebar"]','[class*="social"]','[id*="social"]','[class*="share"]','[id*="share"]','[class*="newsletter"]','[id*="newsletter"]','[class*="related"]','[id*="related"]','[class*="comment"]','[id*="comment"]','[class*="footer"]','[id*="footer"]','[class*="promo"]','[id*="promo"]'].join(",");t.querySelectorAll(n).forEach(n=>{n instanceof Element&&(n.closest(".acc-container")||n!==t&&(n.classList.add("acc-simple-layout-hidden"),e.push(n)))}),this.simpleLayoutHiddenElements=e},enableSimpleLayout(t=!1){const e="body.acc-simple-layout-enabled",n=`${e} .acc-simple-layout-root`,i=":not(.acc-container):not(.acc-container *)",a={id:"simple-layout",css:`\n /* ── Body & root container ── */\n ${e} {\n background: #fff !important;\n }\n\n ${e} .acc-simple-layout-hidden {\n display: none !important;\n }\n\n ${n} {\n max-width: 72ch !important;\n margin: 0 auto !important;\n padding: clamp(20px, 4vw, 40px) 20px !important;\n position: relative !important;\n border-radius: 0 !important;\n box-shadow: none !important;\n }\n\n /* ── Universal decoration strip ── */\n ${n} :where(*)${i} {\n background-color: transparent !important;\n background-image: none !important;\n box-shadow: none !important;\n text-shadow: none !important;\n border-color: transparent !important;\n }\n\n /* ── Layout linearization ── */\n ${n} :where(div, section, article, header, main, footer, figure, figcaption, details, summary, hgroup, search)${i} {\n display: block !important;\n position: static !important;\n float: none !important;\n transform: none !important;\n columns: auto !important;\n column-count: auto !important;\n width: auto !important;\n min-width: 0 !important;\n max-width: 100% !important;\n margin-left: 0 !important;\n margin-right: 0 !important;\n padding-left: 0 !important;\n padding-right: 0 !important;\n }\n\n /* ── Color reset ── */\n ${n} :where(h1, h2, h3, h4, h5, h6)${i} {\n color: #111 !important;\n }\n\n ${n} :where(p, li, dt, dd, td, th, span, blockquote, figcaption, label, summary, details)${i} {\n color: #222 !important;\n }\n\n ${n} :where(a)${i} {\n color: #1a0dab !important;\n }\n\n ${n} :where(a:visited)${i} {\n color: #681da8 !important;\n }\n\n /* ── Typography ── */\n ${n} :where(*)${i} {\n font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;\n }\n\n ${n} :where(p, li, dt, dd, blockquote, figcaption, td, th, label, summary)${i} {\n font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem) !important;\n line-height: 1.8 !important;\n letter-spacing: 0.01em !important;\n max-width: 70ch !important;\n }\n\n ${n} :where(h1)${i} {\n font-size: 2em !important;\n line-height: 1.2 !important;\n margin: 0.67em 0 !important;\n font-weight: 700 !important;\n }\n\n ${n} :where(h2)${i} {\n font-size: 1.5em !important;\n line-height: 1.25 !important;\n margin: 0.83em 0 !important;\n font-weight: 700 !important;\n }\n\n ${n} :where(h3)${i} {\n font-size: 1.25em !important;\n line-height: 1.3 !important;\n margin: 1em 0 !important;\n font-weight: 600 !important;\n }\n\n ${n} :where(h4, h5, h6)${i} {\n font-size: 1.1em !important;\n line-height: 1.35 !important;\n margin: 1em 0 !important;\n font-weight: 600 !important;\n }\n\n /* ── Decorative images hidden ── */\n ${n} :where(img[role="presentation"], img[alt=""], img:not([alt]), svg[aria-hidden="true"])${i} {\n display: none !important;\n }\n\n /* ── Meaningful borders restored ── */\n ${n} :where(hr)${i} {\n border: none !important;\n border-top: 1px solid #d1d5db !important;\n margin: 1.5em 0 !important;\n }\n\n ${n} :where(blockquote)${i} {\n border-left: 4px solid #d1d5db !important;\n padding-left: 1em !important;\n margin-left: 0 !important;\n font-style: italic !important;\n }\n\n ${n} :where(table)${i} {\n border-collapse: collapse !important;\n max-width: 100% !important;\n overflow-x: auto !important;\n display: table !important;\n }\n\n ${n} :where(th, td)${i} {\n border: 1px solid #d1d5db !important;\n padding: 8px 12px !important;\n text-align: left !important;\n }\n\n ${n} :where(th)${i} {\n font-weight: 600 !important;\n background: #f8f9fa !important;\n }\n\n /* ── Lists ── */\n ${n} :where(ul, ol)${i} {\n padding-left: 1.5em !important;\n margin: 0.75em 0 !important;\n }\n\n ${n} :where(li)${i} {\n display: list-item !important;\n margin: 0.25em 0 !important;\n }\n\n /* ── Code blocks ── */\n ${n} :where(pre)${i} {\n background: #f6f8fa !important;\n border-radius: 6px !important;\n padding: 1em !important;\n overflow-x: auto !important;\n max-width: 100% !important;\n }\n\n ${n} :where(code, kbd, samp)${i} {\n font-family: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace !important;\n font-size: 0.9em !important;\n }\n\n ${n} :where(code):not(pre code)${i} {\n background: #f0f2f5 !important;\n padding: 0.15em 0.4em !important;\n border-radius: 3px !important;\n }\n\n /* ── Empty wrapper collapse ── */\n ${n} :where(div:empty)${i} {\n display: none !important;\n }\n\n /* ── Media ── */\n ${n} :where(img, video, iframe)${i} {\n max-width: 100% !important;\n height: auto !important;\n border-radius: 4px !important;\n }\n `};this.applyToolStyle({...a,enable:t}),document.body?.classList.toggle("acc-simple-layout-enabled",!!t),this.clearSimpleLayoutDomMutations(),t&&this.applySimpleLayoutDomMutations()},applyEnhancements(){const{states:t}=this.loadConfig();if(!(!t||!Object.prototype.hasOwnProperty.call(t,"text-scale"))){const e=!1===t["text-scale"]?1:t["text-scale"],n=this.setTextScaleFromPercent(e,{persist:!1});this.syncTextScaleControlUI(document.querySelector(".acc-menu"),n)}else this.textScaleIndex=0,this.multiLevelFeatures["text-scale"]&&(this.multiLevelFeatures["text-scale"].currentIndex=-1),this.scaleText(1),this.syncTextScaleControlUI(document.querySelector(".acc-menu"),1);this.concealImages(t&&t["hide-images"]),this.highlightTitles(t&&t["highlight-title"]),this.highlightLinks(t&&t["highlight-links"]),this.adjustLetterSpacing(t&&t["letter-spacing"]),this.adjustLineSpacing(t&&t["line-spacing"]),this.enableBoldText(t&&t["bold-text"]),this.enableReadableText(t&&t["readable-text"]),this.enableReadingAid(t&&t["reading-aid"]),this.pauseMotion(t&&t["pause-motion"]),this.enableLargePointer(t&&t["large-pointer"]),this.enableHighContrastMode(t&&t["high-contrast-mode"]),this.enableAnnotations(t&&t.annotations),this.enableTextToSpeech(t&&t["text-to-speech"]),this.enableSimpleLayout(t&&t["simple-layout"])},isColorFilterKey(t){return Array.isArray(this.colorFilterKeys)&&this.colorFilterKeys.includes(t)},getActiveColorFilterKey(t=this.widgetConfig.states){if(!this.colorFilterKeys||!this.colorFilterKeys.length)return null;if(!t)return this.activeColorFilterKey||null;for(const e of this.colorFilterKeys)if(t[e])return e;return null},setColorFilterUI(t,e=null){if(!t||!t.querySelectorAll)return;const n=this.multiLevelFeatures?.["contrast-toggle"],i=t.querySelector('.acc-btn[data-key="contrast-toggle"]');if(n){const t=n.values.indexOf(e);if(n.currentIndex=t,this.updateContrastToggleButton(i,t),i){const e=t>=0;i.classList.toggle("acc-selected",e),i.setAttribute("aria-pressed",e?"true":"false");const n=i.querySelector('.acc-progress-indicator[data-feature="contrast-toggle"]');if(n){n.querySelectorAll(".acc-progress-dot").forEach((e,n)=>{e.classList.toggle("active",n===t)})}}}const a=this.multiLevelFeatures?.["saturation-toggle"],o=t.querySelector('.acc-btn[data-key="saturation-toggle"]');if(a){const t=a.values.indexOf(e);if(a.currentIndex=t,this.updateSaturationToggleButton(o,t),o){const e=t>=0;o.classList.toggle("acc-selected",e),o.setAttribute("aria-pressed",e?"true":"false");const n=o.querySelector('.acc-progress-indicator[data-feature="saturation-toggle"]');if(n){n.querySelectorAll(".acc-progress-dot").forEach((e,n)=>{e.classList.toggle("active",n===t)})}}}this.colorFilterKeys.forEach(n=>{const i=t.querySelector(`.acc-btn[data-key="${n}"]`);if(!i)return;const a=n===e;i.classList.toggle("acc-selected",a),i.setAttribute("aria-pressed",a?"true":"false")})},updateColorFilterState(t=null,e="user"){if(!this.colorFilterKeys||!this.colorFilterKeys.length)return void(this.activeColorFilterKey=null);const n=this.widgetConfig.states||{},i={};let a=!1;this.colorFilterKeys.forEach(e=>{const o=n[e];t===e?!0!==o&&(i[e]=!0,a=!0):o&&(i[e]=!1,a=!0)}),a&&this.updateState(i,{source:e}),this.activeColorFilterKey=t},computeFilteredBodyColor(t){const e=window.getComputedStyle(document.body).backgroundColor.match(/rgba?\(\s*(\d+),\s*(\d+),\s*(\d+)/);if(!e)return null;let n=+e[1],i=+e[2],a=+e[3];const o=t=>Math.min(255,Math.max(0,Math.round(t)));switch(t){case"invert-colors":n=255-n,i=255-i,a=255-a;break;case"dark-contrast":n=128+1.5*(n-128),i=128+1.5*(i-128),a=128+1.5*(a-128),n*=.8,i*=.8,a*=.8;break;case"light-contrast":n=128+1.25*(n-128),i=128+1.25*(i-128),a=128+1.25*(a-128),n*=1.2,i*=1.2,a*=1.2;break;case"low-saturation":{const t=.5,e=(.213-.213*t)*n+(.715+.285*t)*i+(.072-.072*t)*a,o=(.213-.213*t)*n+(.715-.715*t)*i+(.072+.928*t)*a;n=(.213+.787*t)*n+(.715-.715*t)*i+(.072-.072*t)*a,i=e,a=o;break}case"high-saturation":{const t=2,e=(.213-.213*t)*n+(.715+.285*t)*i+(.072-.072*t)*a,o=(.213-.213*t)*n+(.715-.715*t)*i+(.072+.928*t)*a;n=(.213+.787*t)*n+(.715-.715*t)*i+(.072-.072*t)*a,i=e,a=o;break}default:return null}return n=o(n),i=o(i),a=o(a),n===+e[1]&&i===+e[2]&&a===+e[3]?null:`rgb(${n},${i},${a})`},applyVisualFilters(){const{states:t}=this.loadConfig(),e=this.getActiveColorFilterKey(t);if(this.activeColorFilterKey=e,!e){const t=document.getElementById("acc-filter-style");return void(t&&t.remove())}const n=this.visualFilters[e];if(!n){const t=document.getElementById("acc-filter-style");return void(t&&t.remove())}const i={...n,selector:n.selector||"body > *:not(.acc-container):not(.acc-rg-container):not(#acc-skip-link)"};let a=this.buildCSS(i);const o=this.computeFilteredBodyColor(e);o&&(a+=`body{background-color:${o}!important;}`),this.injectStyle("acc-filter-style",a)},cycleTextScale(t=!1){t?(this.textScaleIndex=(this.textScaleIndex+1)%this.textScaleValues.length,this.multiLevelFeatures["text-scale"]&&(this.multiLevelFeatures["text-scale"].currentIndex=this.textScaleIndex)):(this.textScaleIndex=0,this.multiLevelFeatures["text-scale"]&&(this.multiLevelFeatures["text-scale"].currentIndex=-1));const e=document.querySelector('.acc-progress-indicator[data-feature="text-scale"]');if(e){const n=e.querySelectorAll(".acc-progress-dot");n.forEach(t=>t.classList.remove("active")),t&&this.textScaleIndex<n.length&&n[this.textScaleIndex].classList.add("active")}const n=t?this.textScaleValues[this.textScaleIndex]:1;return this.scaleText(n),this.updateState({"text-scale":n}),this.textScaleIndex},cycleMultiLevelFeature(t,e){const n=this.multiLevelFeatures[t];if(!n||!e)return;if("contrast-toggle"===t||"saturation-toggle"===t){const t=n.currentIndex+1,i=t>=n.levels?null:n.values[t];return this.updateColorFilterState(i),this.setColorFilterUI(e.closest(".acc-menu"),i),void this.applyVisualFilters()}const i=n.currentIndex+1;if(i>=n.levels)n.currentIndex=-1,e.classList.remove("acc-selected"),e.setAttribute("aria-pressed","false"),this.updateState({[t]:"text-scale"===t&&1}),"text-scale"===t&&(this.textScaleIndex=0);else{n.currentIndex=i,e.classList.add("acc-selected"),e.setAttribute("aria-pressed","true");const a=n.values[i];this.updateState({[t]:a}),"text-scale"===t&&(this.textScaleIndex=i)}const a=e.querySelector(`.acc-progress-indicator[data-feature="${t}"]`);if(a){a.querySelectorAll(".acc-progress-dot").forEach((t,e)=>{t.classList.toggle("active",e===n.currentIndex)})}if("text-scale"===t){const t=n.currentIndex>=0?n.values[n.currentIndex]:1;this.scaleText(t)}else this.applyVisualFilters()},resetEnhancements(){this.saveConfig({states:{},systemDefaults:{}}),this.textScaleIndex=0,this.activeColorFilterKey=null,Object.keys(this.multiLevelFeatures).forEach(t=>{this.multiLevelFeatures[t].currentIndex=-1});document.querySelectorAll(".acc-selected").forEach(t=>{t.classList.remove("acc-selected"),t.setAttribute("aria-pressed","false")});document.querySelectorAll(".acc-progress-indicator").forEach(t=>{t.querySelectorAll(".acc-progress-dot").forEach(t=>t.classList.remove("active"))});const t=document.querySelector(".acc-menu");t&&(this.setColorFilterUI(t,null),this.syncTextScaleControlUI(t,1)),document.activeElement&&document.activeElement.blur();["acc-bold-text","acc-letter-spacing","acc-line-spacing","acc-large-pointer","acc-highlight-links","acc-highlight-title","acc-readable-text","acc-pause-motion","acc-hide-images","acc-filter-style","acc-simple-layout"].forEach(t=>{const e=document.getElementById(t);e&&e.remove()}),this.clearSimpleLayoutDomMutations(),document.documentElement.classList.remove("acc-filter","acc-saturation","acc-bold-text","acc-letter-spacing","acc-line-spacing","acc-large-pointer","acc-highlight-links","acc-highlight-title","acc-readable-text","acc-pause-motion","acc-hide-images","acc-high-contrast-mode","acc-simple-layout"),document.body?.classList.remove("acc-simple-layout-enabled"),document.body?.classList.remove("acc-high-contrast-mode"),this.disconnectTextScaleObserver(),this.currentTextScaleMultiplier=1;document.querySelectorAll("[data-acc-baseSize]").forEach(t=>{t instanceof Element&&!this.shouldSkipScaling(t)&&(t.style.fontSize="",t.removeAttribute("data-acc-baseSize"))});let e=this.findElement(".acc-rg-container");e&&(e.remove(),window.__accweb__scrollGuide&&(document.removeEventListener("mousemove",window.__accweb__scrollGuide),delete window.__accweb__scrollGuide)),this.disableAnnotations(),this.stopSpeech(),this.stopTtsClickMode(),this.clearSystemPreferenceListeners(),this.detectSystemPreferences(),this.setupMediaQueryListeners(),this.updateViolationBubble(this.axeScanResults),this._fireCallback("onReset")}},g={_fireCallback(t,...e){const n=this.options&&this.options[t];if("function"==typeof n)try{n(...e)}catch(e){console.warn(`[AllyWidget] Callback "${t}" threw:`,e)}},translate(t){const{lang:e}=this.loadConfig();return(this.translations[e]||this.translations.en)[t]||t},getLanguageCountryLabel:t=>({en:"USA",ne:"Nepal"}[t]||String(t||"").toUpperCase()),getLanguageFlag(t){const e=({en:"US",ne:"NP"}[t]||String(t||"").slice(0,2)).toUpperCase();return/^[A-Z]{2}$/.test(e)?String.fromCodePoint(...e.split("").map(t=>127397+t.charCodeAt(0))):""},formatLanguageLabel(t){if(!t)return"English (USA)";return`${String(t.label||t.code||"").split("(")[0].trim()||String(t.code||"en").toUpperCase()} (${this.getLanguageCountryLabel(t.code)})`},getWidgetIconMarkup(t){const e="string"==typeof t?t.trim().toLowerCase():"",n=this.widgetIcons?.accessibilityVariants||{};return n[e]||n.default||this.widgetIcons.accessibility},throttle(t,e){let n;return function(...i){n||(t.apply(this,i),n=!0,setTimeout(()=>n=!1,e))}},getFocusableElements(t){if(!t)return[];const e=["a[href]","button:not([disabled])","input:not([disabled])","textarea:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),n="undefined"!=typeof document,i=n?document.activeElement:null;return Array.from(t.querySelectorAll(e)).filter(t=>{if(t.hasAttribute("disabled"))return!1;if("true"===t.getAttribute("aria-hidden"))return!1;if(t.closest('[aria-hidden="true"]'))return!1;const e=t.getBoundingClientRect(),a="undefined"!=typeof window&&window.getComputedStyle?window.getComputedStyle(t):{visibility:"visible",display:"block"};return(e.width>0||e.height>0||n&&t===i)&&"hidden"!==a.visibility&&"none"!==a.display})},openMenu(t,e){if(!t)return;const n=this.findElement(".acc-menu",t);this.activeMenuContainer=t,this.activeMenuToggle=e||this.activeMenuToggle,this.previousFocus=document.activeElement&&"function"==typeof document.activeElement.focus?document.activeElement:null,t.style.display="block",n&&(n.setAttribute("aria-hidden","false"),n.setAttribute("aria-modal","true"),n.hasAttribute("tabindex")||n.setAttribute("tabindex","-1")),this.activeMenuToggle&&this.activeMenuToggle.setAttribute("aria-expanded","true");const i=this.getFocusableElements(t);i.length?i[0].focus():n&&n.focus(),this.menuKeyListener&&document.removeEventListener("keydown",this.menuKeyListener,!0),this.menuKeyListener=t=>{if(this.activeMenuContainer){if("Escape"===t.key||"Esc"===t.key)return t.preventDefault(),void this.closeMenu(this.activeMenuContainer);if("Tab"===t.key){const e=this.getFocusableElements(this.activeMenuContainer);if(!e.length)return void t.preventDefault();const n=e[0],i=e[e.length-1];t.shiftKey?document.activeElement===n&&(t.preventDefault(),i.focus()):document.activeElement===i&&(t.preventDefault(),n.focus())}}},document.addEventListener("keydown",this.menuKeyListener,!0),this._fireCallback("onOpen")},closeMenu(t,e){const n=t||this.activeMenuContainer;if(!n)return;const i=this.findElement(".acc-menu",n);n.style.display="none",i&&(i.setAttribute("aria-hidden","true"),i.setAttribute("aria-modal","false"));const a=this.findElement("#acc-lang-modal",n);a&&a.setAttribute("hidden","");const o=this.findElement(".acc-footer-lang-toggle",n);o&&o.setAttribute("aria-expanded","false");const r=this.findElement("#acc-lang-search",n);r&&(r.value=""),n.querySelectorAll(".acc-lang-item").forEach(t=>{t.style.display=""}),this.menuKeyListener&&(document.removeEventListener("keydown",this.menuKeyListener,!0),this.menuKeyListener=null);const s=e||this.activeMenuToggle;s&&s.setAttribute("aria-expanded","false");const c=s||this.previousFocus;c&&"function"==typeof c.focus&&c.focus(),this.stopSpeech(),this.activeMenuContainer=null,this.activeMenuToggle=null,this.previousFocus=null,this._fireCallback("onClose")},renderOptions(t,e){let n="";for(let i=0;i<t.length;i++){const a=t[i];if(a.requiresSpeechSynthesis&&!this.supportsTextToSpeech())continue;const o=!0===a.multiLevel,r=[e,a.optionClass].filter(Boolean).join(" ");let s="";if(o){const t=this.multiLevelFeatures[a.key];if(t){s=`<div class="acc-progress-indicator" data-feature="${a.key}">`;for(let e=0;e<t.levels;e++){s+=`<div class="acc-progress-dot${t.currentIndex===e?" active":""}" data-level="${e}"> </div>`}s+=" </div>"}}n+=`<button\n class="acc-btn ${r} ${this.multiLevelFeatures[a.key]?.currentIndex>=0?"acc-selected":""}"\n type="button"\n data-key="${a.key}"\n data-multi-level="${o}"\n title="${a.label}"\n aria-label="${a.label}"\n aria-pressed="${this.multiLevelFeatures[a.key]?.currentIndex>=0||!1}"\n aria-controls="acc-menu-content">\n ${a.icon}\n <span class="acc-label">${a.label}</span>\n ${s}\n </button>`}return n},renderTextScaleControl(t=1){const e=this.getTextScalePercent(t),n=Number(this.textScaleMinPercent)||80,i=Number(this.textScaleMaxPercent)||150,a=Number(this.textScaleStepPercent)||5,o=(e-n)/(i-n)*100;return`\n <div class="acc-text-scale-control" data-key="text-scale">\n <div class="acc-text-scale-meta">\n <span class="acc-text-scale-icon" aria-hidden="true">${this.widgetIcons.adjustFontSize}</span>\n <span class="acc-label" data-acc-text="Font Size">Font Size</span>\n <span class="acc-text-scale-percent">${e}%</span>\n </div>\n <input\n type="range"\n class="acc-text-scale-range"\n min="${n}"\n max="${i}"\n step="${a}"\n value="${e}"\n data-acc-text="Font Size"\n aria-label="Font Size"\n style="--acc-text-scale-progress: ${Math.max(0,Math.min(100,o))}%">\n </div>\n `},getTranslatedText(t,e){let n=t.getAttribute("data-acc-text");return!n&&e&&(n=e,t.setAttribute("data-acc-text",n)),this.translate(n)},translateMenuUI(t){t.querySelectorAll(".acc-section-title, .acc-label").forEach(t=>{t.innerText=this.getTranslatedText(t,t.innerText.trim())}),t.querySelectorAll("[title]").forEach(t=>{t.setAttribute("title",this.getTranslatedText(t,t.getAttribute("title")))}),t.querySelectorAll("[aria-label]").forEach(t=>{t.setAttribute("aria-label",this.getTranslatedText(t,t.getAttribute("aria-label")))}),this.updateSkipLinkLabel()},displayMenu({container:t,lang:e,position:n="bottom-right",offset:i=[20,20],size:a,icon:o}){try{this.applyThemeVariables(),this.registerStaticStyles();const r=String(e||"en").split(/[_-]/)[0].toLowerCase(),s=this.options?.poweredByText||"Ally Widget",c=this.options?.poweredByUrl||"",l=`\n <div class="acc-menu" role="dialog" aria-labelledby="accessibility-title">\n <div class="acc-menu-header">\n <div id="accessibility-title" class="acc-menu-title">\n <span class="acc-menu-title-icon" aria-hidden="true">${this.getWidgetIconMarkup(o)}</span>\n <span class="acc-label">Accessibility</span>\n </div>\n <div class="acc-header-actions"></div>\n </div>\n <div id="acc-menu-content" class="acc-menu-content">\n <div class="acc-options-all"> </div>\n </div>\n <div class="acc-footer">\n <button type="button" class="acc-footer-reset" title="Reset settings" aria-label="Reset settings">\n ${this.widgetIcons.reset}\n <span class="acc-label">Reset settings</span>\n </button>\n <div class="acc-footer-meta">\n <a href="${c}" target="_blank" rel="noopener noreferrer">${s}</a>\n <button type="button" class="acc-footer-lang-toggle" title="Language" aria-label="Language" aria-expanded="false" aria-controls="acc-lang-modal">\n <span id="acc-current-language" class="acc-footer-lang-current">${String(r||"en").toUpperCase()}</span>\n <span class="acc-footer-lang-arrow" aria-hidden="true"> </span>\n </button>\n </div>\n <div id="acc-lang-modal" class="acc-lang-modal" hidden>\n <div class="acc-lang-modal-header">\n <div class="acc-section-title acc-label">All Languages</div>\n </div>\n <div class="acc-lang-search-wrapper">\n <input type="text" id="acc-lang-search" class="acc-lang-search" placeholder="Search language" aria-label="Search language">\n </div>\n <div class="acc-lang-list">\n ${this.supportedLanguages.map(t=>{const e=this.formatLanguageLabel(t),n=this.getLanguageFlag(t.code);return`<button type="button" class="acc-lang-item${t.code===r?" selected":""}" data-lang="${t.code}" aria-label="${e}">\n <span class="acc-lang-item-main">\n <span class="acc-lang-flag" aria-hidden="true">${n}</span>\n <span class="acc-lang-item-label">${e}</span>\n </span>\n <span class="acc-icon-check" aria-hidden="true"> </span>\n </button>`}).join("")}\n </div>\n </div>\n </div>\n </div>\n <div class="acc-overlay"> </div>\n `,d=document.createElement("div");d.innerHTML=l,d.style.display="none";const p=this.findElement(".acc-menu",d);p&&(p.setAttribute("aria-hidden","true"),p.hasAttribute("tabindex")||p.setAttribute("tabindex","-1"));"bottom-right"===n||"top-right"===n||"right"===this.widgetTheme.menuPosition?(p.style.right="var(--acc-menu-inline-gap, 12px)",p.style.left="auto"):(p.style.left="var(--acc-menu-inline-gap, 12px)",p.style.right="auto");const h=(this.normalizeOffset(i)||[20,20])[1]??25,u=null!=a&&""!==String(a).trim()?this.normalizeButtonSize(a):this.widgetTheme?.buttonSize||"52px";"bottom-right"===n||"bottom-left"===n?p.style.bottom=`calc(${h}px + ${u} + 16px)`:"top-right"!==n&&"top-left"!==n||(p.style.top=`calc(${h}px + ${u} + 16px)`);const g=this.loadConfig(),m=new Set(["text-scale","bold-text","line-spacing","letter-spacing","readable-text"]),f=new Set(["contrast-toggle","invert-colors","saturation-toggle","high-contrast-mode"]),x=new Set(["reading-aid","highlight-links","highlight-title","simple-layout"]),b=[...this.contentOptions.map(t=>({...t})),...this.colorOptions.map(t=>({...t,optionClass:"acc-filter"})),...this.accessTools.map(t=>({...t,optionClass:"acc-tools"}))],v={speech:[],text:[],color:[],reading:[],interaction:[]},y=new Set;b.forEach(t=>{t?.key&&!y.has(t.key)&&(y.add(t.key),"text-to-speech"!==t.key?m.has(t.key)?v.text.push(t):f.has(t.key)?v.color.push(t):x.has(t.key)?v.reading.push(t):v.interaction.push(t):v.speech.push(t))});const w=[{key:"speech",label:"Speech",containerClass:"acc-tts-toggle-container",optionClass:"acc-tts-toggle"},{key:"text",label:"Text",containerClass:"acc-options acc-options-text"},{key:"color",label:"Color & Contrast",containerClass:"acc-options"},{key:"reading",label:"Reading Aids",containerClass:"acc-options"},{key:"interaction",label:"Interaction",containerClass:"acc-options"}].map(t=>{let e=v[t.key],n="";if("text"===t.key){const i=e.find(t=>"text-scale"===t.key);e=e.filter(t=>"text-scale"!==t.key);const a=["line-spacing","letter-spacing","bold-text","readable-text"];e.sort((t,e)=>{const n=a.indexOf(t.key),i=a.indexOf(e.key);return(-1===n?Number.MAX_SAFE_INTEGER:n)-(-1===i?Number.MAX_SAFE_INTEGER:i)}),i&&(n=this.renderTextScaleControl(g.states?.["text-scale"]||1));const o=new Set(["line-spacing","letter-spacing"]),r=new Set(["bold-text","readable-text"]),s=e.filter(t=>o.has(t.key)),c=e.filter(t=>r.has(t.key)),l=e.filter(t=>!o.has(t.key)&&!r.has(t.key)),d=s.length?`<div class="acc-options acc-options-text-inline">${this.renderOptions(s,"acc-text-inline")}</div>`:"",p=c.length?`<div class="acc-options acc-options-text-inline">${this.renderOptions(c,"acc-text-inline")}</div>`:"",h=l.length?`<div class="${t.containerClass}">${this.renderOptions(l,t.optionClass||"")}</div>`:"";return n||d||p||h?`<section class="acc-option-category acc-option-category-${t.key}"><div class="acc-section-title acc-label">${t.label}</div>${n}${d}${p}${h}</section>`:""}if("color"===t.key){const n=["contrast-toggle","saturation-toggle","invert-colors","high-contrast-mode"];e.sort((t,e)=>{const i=n.indexOf(t.key),a=n.indexOf(e.key);return(-1===i?Number.MAX_SAFE_INTEGER:i)-(-1===a?Number.MAX_SAFE_INTEGER:a)});const i=new Set(["contrast-toggle","saturation-toggle"]),a=new Set(["invert-colors","high-contrast-mode"]),o=e.filter(t=>i.has(t.key)),r=e.filter(t=>a.has(t.key)),s=e.filter(t=>!i.has(t.key)&&!a.has(t.key)),c=o.length?`<div class="acc-options acc-options-text-inline">${this.renderOptions(o,"acc-text-inline")}</div>`:"",l=r.length?`<div class="acc-options acc-options-text-inline">${this.renderOptions(r,"acc-text-inline")}</div>`:"",d=s.length?`<div class="${t.containerClass}">${this.renderOptions(s,t.optionClass||"")}</div>`:"";return c||l||d?`<section class="acc-option-category acc-option-category-${t.key}"><div class="acc-section-title acc-label">Color & Contrast</div>${c}${l}${d}</section>`:""}if("reading"===t.key){const n=["highlight-links","highlight-title","reading-aid","simple-layout"];e.sort((t,e)=>{const i=n.indexOf(t.key),a=n.indexOf(e.key);return(-1===i?Number.MAX_SAFE_INTEGER:i)-(-1===a?Number.MAX_SAFE_INTEGER:a)});const i=new Set(["highlight-links","highlight-title"]),a=new Set(["reading-aid","simple-layout"]),o=e.filter(t=>i.has(t.key)),r=e.filter(t=>a.has(t.key)),s=e.filter(t=>!i.has(t.key)&&!a.has(t.key)),c=o.length?`<div class="acc-options acc-options-text-inline">${this.renderOptions(o,"acc-text-inline")}</div>`:"",l=r.length?`<div class="acc-options acc-options-text-inline">${this.renderOptions(r,"acc-text-inline")}</div>`:"",d=s.length?`<div class="${t.containerClass}">${this.renderOptions(s,t.optionClass||"")}</div>`:"";return c||l||d?`<section class="acc-option-category acc-option-category-${t.key}"><div class="acc-section-title acc-label">Reading Aids</div>${c}${l}${d}</section>`:""}const i=e.length?this.renderOptions(e,t.optionClass||""):"";if(!n&&!i.trim())return"";const a=i.trim()?`<div class="${t.containerClass}">${i}</div>`:"";return`<section class="acc-option-category acc-option-category-${t.key}"><div class="acc-section-title acc-label">${t.label}</div>${n}${a}</section>`}).join("");p.querySelector(".acc-options-all").innerHTML=w;const S=this.findElement("#acc-lang-modal",p),k=this.findElement(".acc-footer-lang-toggle",p),T=this.findElement("#acc-lang-search",p),C=p.querySelectorAll(".acc-lang-item"),L=()=>{S&&S.setAttribute("hidden",""),k&&k.setAttribute("aria-expanded","false"),T&&(T.value=""),C.forEach(t=>{t.style.display=""})},E=()=>{S&&S.removeAttribute("hidden"),k&&k.setAttribute("aria-expanded","true"),T&&T.focus()};k&&S&&k.addEventListener("click",t=>{t.stopPropagation(),S.hasAttribute("hidden")?E():L()}),T&&T.addEventListener("input",()=>{const t=T.value.toLowerCase();C.forEach(e=>{const n=e.querySelector(".acc-lang-item-label"),i=(n?.textContent||e.textContent).toLowerCase();e.style.display=i.includes(t)?"":"none"})}),C.forEach(t=>{t.addEventListener("click",()=>{const e=t.getAttribute("data-lang");if(!e)return;C.forEach(t=>t.classList.remove("selected")),t.classList.add("selected");const n=this.findElement("#acc-current-language",p);n&&(n.textContent=String(e).toUpperCase()),L(),this.saveConfig({lang:e}),this.translateMenuUI(d)})});const q=this.findElement(".acc-text-scale-range",p);q&&(q.addEventListener("input",()=>{const t=this.setTextScaleFromPercent(q.value,{persist:!1});this.syncTextScaleControlUI(p,t)}),q.addEventListener("change",()=>{const t=this.setTextScaleFromPercent(q.value,{persist:!0});this.syncTextScaleControlUI(p,t),this._fireCallback("onFeatureToggle","text-scale",t)}),this.syncTextScaleControlUI(p,g.states?.["text-scale"]||1)),p.addEventListener("click",t=>{if(S&&!S.hasAttribute("hidden")){const e=Boolean(t.target.closest(".acc-lang-modal")),n=Boolean(t.target.closest(".acc-footer-lang-toggle"));e||n||L()}const e=t.target.closest('[role="button"], button, .acc-overlay');if(!e)return;if(e.classList.contains("acc-overlay"))return void this.closeMenu(d);if(e.classList.contains("acc-footer-reset"))return void this.resetEnhancements();const n=e.classList.contains("acc-btn")?e:null;if(n){const t=n.dataset.key;if("accessibility-report"===t)this.runAccessibilityReport();else if(this.multiLevelFeatures[t])this.cycleMultiLevelFeature(t,n),this._fireCallback("onFeatureToggle",t,this.multiLevelFeatures[t].currentIndex>=0);else if(this.isColorFilterKey(t)){const e=n.classList.contains("acc-selected")?null:t;this.setColorFilterUI(p,e),this.updateColorFilterState(e),this.applyVisualFilters(),this._fireCallback("onFeatureToggle",t,!!e)}else{const e=!n.classList.contains("acc-selected");n.classList.toggle("acc-selected",e),n.setAttribute("aria-pressed",e),this.userInitiatedToggleKey=t;try{this.updateState({[t]:e}),this.applyEnhancements(),this._fireCallback("onFeatureToggle",t,e)}finally{this.userInitiatedToggleKey=null}}}}),p.querySelectorAll('[role="button"], button').forEach(t=>{t.addEventListener("keydown",e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),t.click())})}),this.translateMenuUI(d);const A=this.getActiveColorFilterKey(g.states);if(this.setColorFilterUI(p,A),this.updateColorFilterState(A),g.states)for(let t in g.states)if(!this.isColorFilterKey(t)&&g.states[t]&&"text-scale"!==t){const e=this.findElement(`.acc-btn[data-key="${t}"]`,p);e&&(e.classList.add("acc-selected"),e.setAttribute("aria-pressed","true"))}return t.appendChild(d),d}catch(t){return console.error("[AllyWidget] Error displaying menu:",t),null}},displayWidget(t){try{this.applyThemeVariables(),this.registerStaticStyles();const e=`\n <div class="acc-widget">\n <a href="#" id="allyWidget" class="acc-toggle-btn" title="Open Accessibility Menu" role="button" aria-label="Open accessibility menu" aria-expanded="false">\n <span class="acc-toggle-icon" aria-hidden="true">${this.getWidgetIconMarkup(t?.icon)}</span>\n <span class="acc-violation-bubble" data-severity="warning" hidden> </span>\n </a>\n </div>\n `,n=document.createElement("div");n.innerHTML=e,n.classList.add("acc-container");const i=this.findElement(".acc-toggle-btn",n);this.violationBubble=this.findElement(".acc-violation-bubble",n),this.widgetToggleButton=i;const{position:a="bottom-right",offset:o=[20,20],size:r}=t,s=this.normalizeOffset(o)||[20,20],c=s[0]??20,l=s[1]??25;let d,p={left:`${c}px`,bottom:`${l}px`};if("bottom-right"===a?p={right:`${c}px`,left:"auto",bottom:`${l}px`}:"top-left"===a?p={top:`${l}px`,bottom:"auto",left:`${c}px`}:"top-right"===a&&(p={top:`${l}px`,right:`${c}px`,bottom:"auto",left:"auto"}),Object.assign(i.style,p),null!=r&&""!==String(r).trim()){const t=this.normalizeButtonSize(r);i.style.setProperty("--acc-button-size",t)}if(i.addEventListener("click",e=>{if(e.preventDefault(),!d){if(d=this.displayMenu({...t,container:n}),!d)return;this.menuContainer=d;const e=d.querySelector(".acc-overlay");e&&e.addEventListener("click",t=>{t.stopPropagation(),this.closeMenu(d,i)})}"none"===d.style.display||"none"===window.getComputedStyle(d).display?this.openMenu(d,i):this.closeMenu(d,i)}),i.addEventListener("keydown",t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),i.click())}),document.body.appendChild(n),this.translateMenuUI(n),this.ensureSkipLink(),!1!==this.options?.keyboardShortcut&&document.addEventListener("keydown",t=>{t.altKey&&"a"===t.key&&(t.preventDefault(),i.click())}),this.runBackgroundAxeScan().catch(()=>{this.updateViolationBubble({violations:[]})}),this.isDevMode()){const t=()=>{this.runBackgroundAxeScan({force:!0}).catch(()=>{this.updateViolationBubble(this.axeScanResults||{violations:[]})})};"complete"===document.readyState?setTimeout(t,250):window.addEventListener("load",()=>{setTimeout(t,150)},{once:!0})}return document.addEventListener("click",t=>{if(!i)return;const e=t.target===i||i.contains(t.target),n=t.target.closest(".acc-container");if(d&&this.activeMenuContainer===d&&"none"!==d.style.display){const a=d.contains(t.target);e||a||n||this.closeMenu(d,i)}else e||i.blur()}),n}catch(t){return console.error("[AllyWidget] Error displaying widget:",t),null}},startAccessibleWebWidget(){try{if(document.querySelector(".acc-widget .acc-toggle-btn"))return;const t=this.getDataAttributeOptions();t&&Object.keys(t).length&&(this.dataOptions=t,this.options={...this.options,...t});const e={...this.options},n=e.lang||document.querySelector("html")?.getAttribute("lang")?.replace(/[_-].*/,"")||navigator.language||"en";e.lang=n,e.position=e.position||"bottom-right",e.offset&&(e.offset=this.normalizeOffset(e.offset)),e.size&&(e.size=this.normalizeButtonSize(e.size),this.widgetTheme.buttonSize=e.size),this.options={...e},this.applyThemeOverrides(e),this.applyThemeVariables(),this.registerStaticStyles(),this.loadConfig(!1),this.detectSystemPreferences(),this.setupMediaQueryListeners();const i=this.getActiveColorFilterKey(this.widgetConfig.states);this.updateColorFilterState(i),this.applyEnhancements(),this.applyVisualFilters(),this.launchWidget(e)}catch(t){console.error("[AllyWidget] Error starting widget:",t)}},launchWidget(t={}){try{let e={lang:this.getDefaultLanguage(),position:"bottom-right",offset:[20,20]};try{const t=this.fetchSavedConfig();t&&(e={...e,...JSON.parse(t)})}catch(t){console.warn("[AllyWidget] Error loading saved config:",t)}e={...e,...t},this.saveConfig(e),this.displayWidget(e)}catch(t){console.error("[AllyWidget] Error in widget launch:",t)}}};
|
|
6
6
|
/*!
|
|
7
|
-
* Ally Widget v1.0.
|
|
7
|
+
* Ally Widget v1.0.2
|
|
8
8
|
* Released under the MIT License
|
|
9
9
|
*
|
|
10
10
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.
|
|
@@ -18,6 +18,7 @@ var AllyWidget=function(){"use strict";const t={primaryColor:"#1976d2",primaryCo
|
|
|
18
18
|
* offset: [20, 20] // [horizontal, vertical] px from edge
|
|
19
19
|
* size: '52px' // toggle button size (px / em / rem / %)
|
|
20
20
|
* keyboardShortcut: true // Alt+A to toggle (set false to disable)
|
|
21
|
+
* showViolationBubble: true // red badge on toggle button (set false to hide)
|
|
21
22
|
*
|
|
22
23
|
* // ── Language ─────────────────────────────────────────────────────────────
|
|
23
24
|
* lang: 'en' | 'ne'
|