1System.register(["c-c-accessibility-page-settings-menu--main.css"],(function(){"use strict";var t;return{setters:[function(e){t=e.default}],execute:function(){function e(t){"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.click())}function i(t=$(document)){return t.find('a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])')}document.adoptedStyleSheets=[...document.adoptedStyleSheets,t];const s={WINDOWS:"windows",MACOS:"macos",IOS:"ios",ANDROID:"android",LINUX:"linux",CHROMEOS:"chromeos",BSD:"bsd",UNKNOWN:"unknown"},n=[{regex:/android/i,os:s.ANDROID},{regex:/iphone|ipad|ipod/i,os:s.IOS},{regex:/macintosh/i,os:navigator.maxTouchPoints>1?s.IOS:s.MACOS},{regex:/windows nt/i,os:s.WINDOWS},{regex:/cros/i,os:s.CHROMEOS},{regex:/freebsd|openbsd|netbsd/i,os:s.BSD},{regex:/linux|x11/i,os:s.LINUX}];class o{constructor(t){this.eyeAbleModuleIsEnabled=t,this.dialogTriggerElement=null,this.$dialog=$(document.getElementById("c-c-accessibility-page-settings-modal")),this.applyOSVisibility(),this.registerEvents(),function(t){const e=i(t),s=e.first(),n=e.last();
1t.on("keydown.focustrap",(function(t){"Tab"===t.key&&(t.shiftKey?$(document.activeElement).is(s)&&(t.preventDefault(),n.focus()):$(document.activeElement).is(n)&&(t.preventDefault(),s.focus()))}))}(this.$dialog)}applyOSVisibility(){const t=function(){const t=navigator.userAgent;return n.find((({regex:e})=>e.test(t)))?.os??s.UNKNOWN}(),e=this.$dialog;e.find("[data-page-settings-show-on-start]").each((function(){const i=$(this).data("page-settings-os").toString().trim().toLowerCase().split(/\s+/).includes(t),s=$(this).data("page-settings-show-on-start"),n=e.find(`[data-page-settings-show-on-end="${s}"]`),o=$(this).nextUntil(n);i||o.remove(),$(this).remove(),n.remove()})),e.find("[data-page-settings-hide-on-start]").each((function(){const i=$(this).data("page-settings-os").toString().trim().toLowerCase().split(/\s+/).includes(t),s=$(this).data("page-settings-hide-on-start"),n=e.find(`[data-page-settings-hide-on-end="${s}"]`),o=$(this).nextUntil(n);i&&o.remove(),$(this).remove(),n.remove()}))}registerEvents(){$(document).on("keydown",(t=>{if("Escape"===t.key||"Esc"===t.key){($(t.target).closest(this.$dialog).length||t.target===document.body)&&this.close()}})),$("body").on("click","[data-page-settings-toggle]",(()=>this.open())),$("body").on("click","[data-page-settings-close]",(()=>this.close()))}isOpen(){return this.$dialog.is("[open]")}open(){this.dialogTriggerElement=document.activeElement||$("[data-page-settings-toggle]:visible").first().get(0),this.$dialog[0].show(),this.updateToggleButtonAttributes(!0),setTimeout((()=>{i(this.$dialog).first().focus()}),0)}close(){this.$dialog[0].close(),this.updateToggleButtonAttributes(!1),this.dialogTriggerElement&&(this.dialogTriggerElement.focus(),this.dialogTriggerElement=null)}toggle(){this.$dialog.is("[open]")?this.close():this.open()}updateToggleButtonAttributes(t){t?$("[data-page-settings-toggle]").attr("aria-expanded","true"):$("[data-page-settings-toggle]").attr("aria-expanded","false")}}class a{constructor(t){this.container=document.getElementById(t),this.button=this.container.querySelector(".page-settings-menu-accordion-button");(function(t){const i=()=>{t.button.setAttribute("aria-expanded",!JSON.parse(t.button.getAttribute("aria-expanded")))},s=()=>{t.button.addEventListener("click",(()=>{i()})),t.button.addEventListener("keydown",e)};return{init:()=>{s()},togglePanel:i,expandPanel:()=>{t.button.setAttribute("aria-expanded","true")},collapsePanel:()=>{t.button.setAttribute("aria-expanded","false")},setExpandState:e=>{t.button.setAttribute("aria-expanded",e)},registerClickHandler:s}})(this).init()}}(function(){(function(){(function(){(function(){(function(){this.Modal=o,this.AccordionPanel=a}).call(this.PageSettingsMenu||(this.PageSettingsMenu={}))}).call(this.Accessibility||(this.Accessibility={}))}).call(this.Common||(this.Common={}))}).call(this.Common||(this.Common={}))}).call(window.Pegasus||(window.Pegasus={}))}}})); 2//# sourceMappingURL=c-c-accessibility-page-settings-menu--main.system.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.