1this.BX=this.BX||{};this.BX.UI=this.BX.UI||{};(function(t,e){"use strict";const s=["a[href]","input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"[tabindex]:not([disabled]):not([hidden])"];const i=s.join(",");const n=!e.Type.isUndefined(window.Element)&&"checkVisibility"in window.Element.prototype;class o{static isDisabled(t){return e.Type.isElementNode(t)&&(t.hasAttribute("disabled")||t.getAttribute("aria-disabled")==="true")}static isVisible(t){if(!e.Type.isElementNode(t)||!t.isConnected){return false}if(n){return t.checkVisibility({visibilityProperty:true,opacityProperty:true})}const s=t.offsetWidth>0||t.offsetHeight>0||t.getClientRects().length>0;return s&&getComputedStyle(t).visibility==="visible"}static isTabbable(t){if(!this.isFocusable(t)){return false}return!this.hasNegativeTabIndex(t)}static hasNegativeTabIndex(t){const e=t?.getAttribute("tabindex");if(e===null){return false}return Number.parseInt(e,10)<0}static isFocusable(t){if(!e.Type.isElementNode(t)||t.closest("[inert]")||!t.isConnected){return false}return t.matches(i)&&this.isVisible(t)}}const r="bx:a11y:debug";const a="*";const c={"focus-monitor":"FocusMonitor","focus-trap":"FocusTrap","focus-zone":"FocusZone","input-modality":"InputModality","live-announcer":"LiveAnnouncer"};class l{static#t=new Set;static#e=false;static#s=false;static#i(){if(this.#s){return}this.#s=true;try{const t=localStorage.getItem(r);if(t===a){this.#e=true}else if(t){const e=JSON.parse(t);if(Array.isArray(e)){for(const t of e){this.#t.add(t)}}}}catch{}}static enable(t){this.#i();if(t){this.#t.add(t)}else{this.#e=true}this.#n()}static disable(t){this.#i();if(t){this.#t.delete(t)}else{this.#e=false;this.#t.clear()}this.#n()}static isEnabled(t){this.#i();return this.#e||this.#t.has(t)}static log(t,e,...s){if(!this.isEnabled(t)){return}const i=c[t]||t;console.log(`%c[${i}]%c ${e}`,"color: #0075ff; font-weight: bold;","color: inherit; font-weight: normal;",...s)}static logNode(t,s,i){if(!this.isEnabled(t)||!e.Type.isElementNode(i)){return}const n=i.tagName.toLowerCase();const o=i.className?`.${[...i.classList].join(".")}`:"";const r=i.id?`#${i.id}`:"";const a=`${n}${o}${r}`;const l=i.getAttribute("role");const u=i.getAttribute("aria-labelledby");const d=u?u.split(/\s+/).map((t=>document.getElementById(t)?.textContent?.trim())).filter(Boolean).join(" "):"";const h=(i.getAttribute("aria-label")||d||i.textContent.trim().slice(0,30)||"\u2014").replaceAll(/\s+/g," ");const f=[l&&`role="${l}"`,i.getAttribute("aria-expanded")!==null&&`aria-expanded="${i.getAttribute("aria-expanded")}"`,i.getAttribute("href")&&`href="${i.getAttribute("href")}"`,i.getAttribute("tabindex")&&`tabindex="${i.getAttribute("tabindex")}"`].filter(Boolean).join(" ");const m=c[t]||t;const p=[`%c[${m}]%c ${s}`,`%c${a}%c`,`"%c${h}%c"`,f&&`%c${f}%c`].filter(Boolean).join(" ");console.log(p,"color: #0075ff; font-weight: bold;","color: inherit; font-weight: normal;","color: #0075ff; font-weight: bold;","color: inherit; font-weight: normal;","color: #e36209; font-style: italic;","color: inherit; font-style: normal;",...f?["color: #9b59b6;","color: inherit;"]:[])}static warn(t,e,...s){if(!this.isEnabled(t)){return}const i=c[t]||t;console.warn(`[${i}] ${e}`,...s)}static#n(){try{if(this.#e){localStorage.setItem(r,a)}else if(this.#t.size>0){localStorage.setItem(r,JSON.stringify([...this.#t]))}else{localStorage.removeItem(r)}}catch{}}}const u="a11y:restore-focus";class d{static get FOCUSABLE_SELECTOR(){return i}static getFirst(t,e){return this.#o(t,"first",e)}static getLast(t,e){return this.#o(t,"last",e)}static getNext(t,e){return this.#o(t,"next",e)}static getPrevious(t,e){return this.#o(t,"previous",e)}static focusFirst(t,e){return this.focusTarget(this.#o(t,"first",e),e)}static focusLast(t,e){return this.focusTarget(this.#o(t,"last",e),e)}static focusNext(t,e){return this.focusTarget(this.#o(t,"next",e),e)}static focusPrevious(t,e){return this.focusTarget(this.#o(t,"previous",e),e)}static focusContainer(t,e){if(!t.hasAttribute("tabindex")){t.setAttribute("tabindex","-1")}this.focusTarget(t,e);return t}static getActiveElement(t){const{activeElement:s}=this.#r(t);if(s?.tagName==="IFRAME"&&s.contentDocument?.body){const t=s;return this.getActiveElement(t.contentDocument?.body)}if(e.Type.isElementNode(s)){return s}return null}static createWalker(t,e){const{tabbableOnly:s=false,accept:i}=e??{};const n=t.ownerDocument??document;return n.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode(t){const e=t;if(!o.isFocusable(e)){return NodeFilter.FILTER_SKIP}if(s&&e.tabIndex<0){return NodeFilter.FILTER_SKIP}if(i&&!i(e)&&e.tagName!=="IFRAME"){return NodeFilter.FILTER_SKIP}return NodeFilter.FILTER_ACCEPT}})}static*#a(t,e){const s=this.createWalker(t,e);for(let t=s.nextNode();t!==null;t=s.nextNode()){const s=t;if(s.tagName==="IFRAME"){try{const t=s;const i=t.contentDocument?.body;if(i){yield*this.#a(i,e);continue}}catch{}}yield s}}static#o(t,e,s){const i={tabbableOnly:s?.tabbableOnly??true,accept:s?.accept};switch(e){case"first":{return this.#a(t,i).next().value??null}case"last":{let e=null;for(const s of this.#a(t,i)){e=s}return e}case"next":{const e=this.#c(t,s);let n=e===null;for(const s of this.#a(t,i)){if(n){return s}if(s===e){n=true}}if(s?.wrap){return this.#a(t,i).next().value??null}return null}case"previous":{const e=this.#c(t,s);let n=null;for(const s of this.#a(t,i)){if(s===e){break}n=s}if(n){return n}if(s?.wrap){return this.#o(t,"last",s)}return null}}return null}static focusBySelector(t,e,s){const{accept:i,...n}=s??{};const o=t=>t.matches(e)&&(i?i(t):true);const r=this.#c(t,s);let a=r===null;for(const e of this.#a(t,{...n,accept:o})){if(a){return this.focusTarget(e,s)}if(e===r){a=true}}if(s?.wrap){const e=this.#a(t,{...n,accept:o}).next().value;if(e){return this.focusTarget(e,s)}}return null}static#c(t,e){const s=e?.from??this.getActiveElement(t);if(!s||t===s){return null}if(t.contains(s)){return s}let i=s.ownerDocument;while(i!==null){const e=i.defaultView?.frameElement;if(!e){return null}if(t.contains(e)){return s}i=e.ownerDocument}return null}static focusTarget(t,e){if(!t){return null}const{preventScroll:s,focusVisible:i}=e??{};t.focus({preventScroll:s,focusVisible:i});return t}static restoreFocus(t,s){if(!e.Type.isElementNode(t)){return null}try{const e=new CustomEvent(u,{bubbles:true,cancelable:true});const i=t.dispatchEvent(e);
1if(i){this.focusTarget(t,s);l.log("focus-monitor","restored focus to",t);return t}}catch{l.warn("focus-monitor","failed to restore focus to",t)}return null}static#r(t){if(!t){return document}if(t.window===t){return t.document}return t.ownerDocument??document}}class h{#l;#u=[];constructor(t=25){this.#l=t}record(t){if(!o.isFocusable(t)){return}if(this.#u[this.#u.length-1]?.deref()===t){return}for(let e=this.#u.length-1;e>=0;e--){const s=this.#u[e].deref();if(!s){this.#u.splice(e,1);continue}if(s===t){this.#u.splice(e,1);break}}l.logNode("focus-monitor","recorded",t);this.#u.push(new WeakRef(t));this.#d(t.ownerDocument)}getLastValid(){for(let t=this.#u.length-1;t>=0;t--){const e=this.#u[t].deref();if(!e){this.#u.splice(t,1);continue}if(o.isFocusable(e)){this.#u.length=t+1;return e}this.#u.splice(t,1)}return null}#d(t){const e=[];for(let s=this.#u.length-1;s>=0;s--){const i=this.#u[s].deref();if(!i){this.#u.splice(s,1);continue}if(i.ownerDocument===t){e.push(s)}}const s=e.length-this.#l;if(s<=0){return}for(let t=e.length-s;t<e.length;t++){this.#u.splice(e[t],1)}}}const f=new Set(["Tab","Escape","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End"]);const m=new Set(["mouse","pen","touch"]);class p{#h="unknown";#f=null;#m=null;#p=false;#g=[];#y=new WeakMap;attach(t){if(this.#y.has(t)){return}const s=t=>{if(f.has(t.key)){this.#m=t.key;this.#p=t.shiftKey;this.#b("keyboard")}};const i=t=>{this.#f=m.has(t.pointerType)?t.pointerType:"mouse";this.#b("pointer")};e.Event.bind(t,"keydown",s,true);e.Event.bind(t,"pointerdown",i,true);const n=()=>{e.Event.unbind(t,"keydown",s,true);e.Event.unbind(t,"pointerdown",i,true)};this.#g.push(new WeakRef(t));this.#y.set(t,n);t.documentElement.dataset.inputModality=this.#h}detach(t){const e=this.#y.get(t);if(e){e();this.#y.delete(t);this.#v()}}static enableDebug(){l.enable("input-modality")}static disableDebug(){l.disable("input-modality")}#b(t){if(this.#h!==t){l.log("input-modality",`${this.#h} -> ${t}`);this.#h=t;this.#F()}}#F(){const t=[];for(const e of this.#g){const s=e.deref();if(s){s.documentElement.dataset.inputModality=this.#h;t.push(e)}}this.#g=t}#v(){this.#g=this.#g.filter((t=>{const e=t.deref();return e&&this.#y.has(e)}))}getLastModality(){return this.#h}getLastPointerType(){return this.#h==="pointer"?this.#f:null}getLastNavigationKey(){return this.#h==="keyboard"?this.#m:null}isLastNavigationReversed(){return this.#h==="keyboard"&&this.#m==="Tab"&&this.#p}}class g{static useFocusTrapInDialogs(){const t=e.Extension.getSettings("ui.a11y");return t.get("useFocusTrapInDialogs")===true}static restoreLostFocus(){const t=e.Extension.getSettings("ui.a11y");return t.get("restoreLostFocus")===true}static suppressFocusOnRestore(){const t=e.Extension.getSettings("ui.a11y");return t.get("suppressFocusOnRestore")===true}}class y{static#E=null;#T;#h;#A=new WeakMap;constructor(){this.#T=new h(25);this.#h=new p;this.#I(document)}static get Instance(){return this.initialize()}static initialize(){const t=e.Page.getRootWindow();if(t!==window){const t=e.Reflection.getClass("top.BX.UI.Accessibility.FocusMonitor");if(t!==null){return t.Instance}}if(this.#E===null){this.#E=new y}return this.#E}static enableDebug(){l.enable("focus-monitor")}static disableDebug(){l.disable("focus-monitor")}static shouldRestoreLostFocus(){return g.restoreLostFocus()}#I(t){if(this.#A.has(t)){return}let s=null;const i=t=>{if(s!==null){clearTimeout(s);s=null}const i=t.target;if(e.Type.isElementNode(i)){this.#T.record(i);if(i.tagName==="IFRAME"){this.attachIframe(i)}}};const n=()=>
1{if(s!==null){return}s=window.setTimeout((()=>{s=null;this.#S(t)}),0)};t.addEventListener("focusin",i,true);t.addEventListener("focusout",n,true);const o=this.#w(t);this.#h.attach(t);this.#A.set(t,{detach:()=>{if(s!==null){clearTimeout(s)}t.removeEventListener("focusin",i,true);t.removeEventListener("focusout",n,true);this.#h.detach(t);o?.disconnect()}})}attachIframe(t){if(!e.Type.isElementNode(t)||t.tagName!=="IFRAME"){return}try{const e=t.contentDocument;if(!e){return}const s=this.#A.get(e);if(s){return}this.#I(e)}catch{}}detachIframe(t){try{const e=t.contentDocument;if(!e){return}const s=this.#A.get(e);if(s){s.detach();this.#A.delete(e)}}catch{}}#S(t){if(!y.shouldRestoreLostFocus()){return}const e=t.activeElement;if(e&&e!==t.body){return}if(this.#h.getLastModality()!=="keyboard"){return}const s=this.#T.getLastValid();if(s){this.#D(s);return}this.#N(t)}restoreFocus(){const t=this.#T.getLastValid();if(t){this.#D(t);return}this.#N(document)}#N(t){l.log("focus-monitor","restoring focus to root");d.restoreFocus(this.getRoot(t),{preventScroll:true})}getRoot(t=document){return t.querySelector("[data-focus-root]")||t.querySelector("main")||t.body}#D(t){if(!t.isConnected){return}const e=t.ownerDocument.defaultView;if(!e){return}const s=d.getActiveElement(t);if(s===t){return}if(e===window){d.restoreFocus(t,{preventScroll:true});return}e.requestAnimationFrame((()=>{d.restoreFocus(t,{preventScroll:true})}))}getLastInputModality(){return this.#h.getLastModality()}getModalityTracker(){return this.#h}#w(t){if(!y.shouldRestoreLostFocus()){return null}if(e.Browser.isFirefox()||e.Browser.isSafari()){const e=new MutationObserver((e=>{this.#S(t)}));const s=()=>e.observe(t.body,{childList:true,subtree:true,characterData:false});if(t.readyState==="loading"){t.addEventListener("DOMContentLoaded",s)}else{s()}return e}return null}}const b=Node.DOCUMENT_POSITION_PRECEDING|Node.DOCUMENT_POSITION_CONTAINS;const v=Node.DOCUMENT_POSITION_FOLLOWING|Node.DOCUMENT_POSITION_CONTAINED_BY;class F{#x=`focus-trap-${e.Text.getRandom()}`;#L;#k;#O=false;#C=true;#s=false;#B=null;#R=true;#M=null;#P=null;#H=null;#_=new WeakSet;#z=this.#$.bind(this);#K=this.#W.bind(this);constructor(t,s={}){this.#L=t;this.#k=e.Type.isPlainObject(s)?s:{};this.setRestoreFocus(this.#k.restoreFocus??null);if(this.#k.looped!==undefined){this.setLooped(this.#k.looped)}if(this.#k.preventScroll!==undefined){this.setPreventScroll(this.#k.preventScroll)}}static enableDebug(){l.enable("focus-trap")}static disableDebug(){l.disable("focus-trap")}activate(t={}){if(this.#O){return}if(!this.#s){this.#i()}if(this.#H===null){this.captureActiveElement()}this.#O=true;if(this.#C){this.#U(true)}const{initialFocus:e}={initialFocus:true,...t};if(e){this.applyInitialFocus()}this.#q(true)}deactivate(){if(!this.#O){return}this.#O=false;this.#U(false);this.#q(false);this.restoreFocus()}destroy(){this.deactivate();if(!this.#s){return}e.Event.unbind(this.#M,"focus",this.#z);e.Event.unbind(this.#P,"focus",this.#K);e.Dom.remove(this.#M);e.Dom.remove(this.#P);this.#s=false}setLooped(t){if(!e.Type.isBoolean(t)){return}this.#C=t;if(this.#O){this.#U(t)}}setPreventScroll(t){this.#R=e.Type.isBoolean(t)?t:true}isLooped(){return this.#C}isActive(){return this.#O}setLastFocusedElement(t){if(e.Type.isElementNode(t)&&t.tagName!=="BODY"&&!this.contains(t)){this.#H=t;l.logNode("focus-trap","set last focus",t)}}captureActiveElement(){const t=d.getActiveElement();if(t!==null){this.setLastFocusedElement(t)}return t}contains(t){return this.#L.contains(t)}focusFirst(t){return d.focusFirst(this.#L,this.#j(t))}focusLast(t){return d.focusLast(this.#L,this.#j(t))}focusNext(t){return d.focusNext(this.#L,this.#j(t))}focusPrevious(t){return d.focusPrevious(this.#L,this.#j(t))}focusContainer(t){return d.focusContainer(this.#L,this.#j(t))}focusBySelector(t,e){return d.focusBySelector(this.#L,t,this.#j(e))}#j(t){const s=e.Type.isPlainObject(t)?{...t}:{};if(e.Type.isNil(s.preventScroll)){s.preventScroll=this.#R}return s}getId(){return this.#x}#i(){this.#M=this.#V();this.#P=this.#V();e.Event.bind(this.#M,"focus",this.#z);e.Event.bind(this.#P,"focus",this.#K);this.#L.insertAdjacentElement("beforebegin",this.#M);this.#L.insertAdjacentElement("afterend",this.#P);this.#s=true}#V(){const t=document.createElement("div");t.setAttribute("aria-hidden","true");t.setAttribute("data-focus-trap",this.getId());e.Dom.style(t,{position:"fixed",width:0,height:0,opacity:"0",pointerEvents:"none",outline:"none"});return t}#$(t){if(!this.#O||!this.#M){return}const e=t.relatedTarget?this.#M.compareDocumentPosition(t.relatedTarget):0;const s=e&v;
1if(!s){if(!this.focusFirst()){this.focusContainer()}return}const i=this.#k.startBoundary?this.#X(this.#k.startBoundary):null;if(i){d.focusTarget(i,{preventScroll:this.#R});return}if(!this.focusLast()){this.focusContainer()}}#W(t){if(!this.#O||!this.#P){return}const e=t.relatedTarget?this.#P.compareDocumentPosition(t.relatedTarget):0;const s=e&b;if(!s){if(!this.focusLast()){this.focusContainer()}return}const i=this.#k.endBoundary?this.#X(this.#k.endBoundary):null;if(i){d.focusTarget(i,{preventScroll:this.#R});return}if(!this.focusFirst()){this.focusContainer()}}#X(t){if(e.Type.isStringFilled(t)){const s=document.querySelector(t);return s!==null&&e.Type.isElementNode(s)&&o.isFocusable(s)?s:null}if(e.Type.isElementNode(t)&&o.isFocusable(t)){return t}if(e.Type.isFunction(t)){const s=t();return e.Type.isElementNode(s)&&o.isFocusable(s)?s:null}return null}#U(t){const e=t?"0":"-1";this.#M?.setAttribute("tabindex",e);this.#P?.setAttribute("tabindex",e)}applyInitialFocus(){const t=this.#k.initialFocus??true;if(t===false){return}if(!this.#k.forceInitialFocus){const t=d.getActiveElement(this.#L);if(t&&this.#L.contains(t)&&t!==this.#L){return}}const e=Array.isArray(t)?t:[t];for(const t of e){if(this.#J(t)){return}}this.focusContainer()}#J(t){if(t===false){return false}if(t==="container"){this.focusContainer();return true}if(e.Type.isStringFilled(t)){return this.focusBySelector(t)!==null}if(e.Type.isFunction(t)){const e=t();if(o.isFocusable(e)){d.focusTarget(e,{preventScroll:this.#R});return true}return false}if(t===true||t==="first-tabbable"||e.Type.isNil(t)){return Boolean(this.focusFirst())}return false}setRestoreFocus(t){if(e.Type.isBoolean(t)||e.Type.isNull(t)||e.Type.isStringFilled(t)||e.Type.isFunction(t)||e.Type.isElementNode(t)){this.#B=t}}restoreFocus(){try{const t=this.#B??true;if(t===false){return}if(e.Type.isStringFilled(t)){const e=this.#L.ownerDocument??document;let s=null;try{s=e.querySelector(t)}catch{console.error("FocusTrap: invalid restoreFocus selector provided")}if(s!==null&&o.isFocusable(s)){d.restoreFocus(s,{preventScroll:true});return}}if(e.Type.isElementNode(t)&&o.isFocusable(t)){d.restoreFocus(t,{preventScroll:true});return}if(e.Type.isFunction(t)){const e=t();if(o.isFocusable(e)){d.restoreFocus(e,{preventScroll:true});return}}if(this.#H!==null&&o.isFocusable(this.#H)){let t=[];const s=e.Type.isBoolean(this.#k.suppressFocusOnRestore)?this.#k.suppressFocusOnRestore:g.suppressFocusOnRestore();try{if(s){t=e.Event.getEventListeners(this.#H,"focus");if(t.length>0){e.Event.unbindAll(this.#H,"focus")}}l.logNode("focus-trap","back to last focus",this.#H);d.restoreFocus(this.#H,{preventScroll:true})}finally{if(s){for(const s of t){e.Event.bind(this.#H,"focus",s.listener)}}}return}y.Instance.restoreFocus()}finally{this.#H=null}}#q(t){if(this.#k.isolateOutside!==true){return}const e=[this.#L,...this.#Y()];const s=e.filter((t=>!e.some((e=>e!==t&&e.contains(t)))));const i=this.#G(s);if(t){this.#_=new WeakSet;for(const t of i){if(t===this.#L||this.#L.contains(t)||t.getAttribute("data-focus-trap")===this.getId()){continue}if(t.parentNode?.nodeName==="BODY"&&t.offsetWidth===0&&t.offsetHeight===0){continue}if(t.inert||t.hasAttribute("inert")){this.#_.add(t)}t.setAttribute("inert","true")}}else{for(const t of i){if(this.#_.has(t)){continue}t.removeAttribute("inert")}this.#_=new WeakSet}}#G(t){const s=new Set;const i=new Set;for(const n of t){let t=n;while(t&&t.tagName!=="BODY"){i.add(t);const n=t.parentElement;const o=n?n.children:[];for(const t of o){if(t.tagName!=="SCRIPT"&&t.tagName!=="STYLE"&&!t.getAttribute("data-a11y-ignore-inert")&&e.Type.isElementNode(t)){s.add(t)}}t=n}}i.forEach((t=>{s.delete(t)}));return s}#Y(){if(!e.Type.isArrayFilled(this.#k.outsideExceptionSelectors)){return[]}try{const t=this.#k.outsideExceptionSelectors.join(",");return[...document.querySelectorAll(t)]}catch{console.error("FocusTrap: invalid outsideExceptionSelectors provided");return[]}}}const E={mounted(t,e){const{active:s,options:i}=T(e.value);t.__focusTrap=new F(t,i);if(s){t.__focusTrap.activate()}},updated(t,e){const{active:s,options:i}=T(e.value);const{active:n,options:o}=T(e.oldValue);if(i!==o&&i){t.__focusTrap?.destroy();t.__focusTrap=new F(t,i)}const r=t.__focusTrap;if(!r){return}if(s){r.activate()}else{r.deactivate()}},unmounted(t){t.__focusTrap?.destroy();delete t.__focusTrap}};function T(t){if(e.Type.isBoolean(t)){return{active:t}}if(e.Type.isPlainObject(t)){return{active:t.active!==false,options:t.options}}return{active:false}}class A{static#E=null;#Z;#Q=[];#tt=false;#et=null;#st=null;#it=false;#nt=null;#ot=500;#rt=30;#at=4e3;#ct=160;static enableDebug(){l.enable("live-announcer")}static disableDebug(){l.disable("live-announcer")}static announce(t,e="polite"){if(!A.#E){A.#E=new A}A.#E.announce(t,e)}static destroy(){A.#E?.destroy();A.#E=null}constructor(t){const{politeness:s="polite",container:i=document.body||document.documentElement,baseDelay:n,charDelay:o,maxDelay:r,maxMessageLength:a}=t??{};if(e.Type.isNumber(n)){this.#ot=n}if(e.Type.isNumber(o)){this.#rt=o}if(e.Type.isNumber(r)){this.#at=r}if(e.Type.isNumber(a)){this.#ct=a}this.#Z=this.#lt(s);e.Dom.append(this.#Z,i);this.#nt=requestAnimationFrame((()=>{this.#nt=null;this.#it=true;this.#ut()}))}announce(t,e="polite"){const s=this.#dt(t);if(!s){return}l.log("live-announcer",`[${e}] ${s}`);const i=this.#Q[this.#Q.length-1];if(i&&i.message===s&&i.politeness===e){return}if(e==="assertive"){this.#ht();this.#Q.unshift({message:s,politeness:e})}else{this.#Q.push({message:s,politeness:e})}this.#ut()}destroy(){if(this.#nt!==null){cancelAnimationFrame(this.#nt);this.#nt=null}this.#Q.length=0;this.#ht();this.#Z.remove()}#ut(){if(!this.#it||this.#tt||this.#Q.length===0){return}const t=this.#Q.shift();if(!t){return}this.#tt=true;const{message:e,politeness:s}=t;const i=this.#ft(e);this.#Z.setAttribute("aria-live",s);this.#Z.textContent="";this.#et=requestAnimationFrame((()=>{this.#et=null;this.#Z.textContent=e;this.#st=setTimeout((()=>{this.#st=null;this.#tt=false;if(this.#Q.length===0){this.#Z.textContent=""}this.#ut()}),i)}))}#ht(){this.#tt=false;if(this.#et!==null){cancelAnimationFrame(this.#et);this.#et=null}if(this.#st!==null){clearTimeout(this.#st);this.#st=null}this.#Z.textContent=""}#ft(t){const e=this.#ot+t.length*this.#rt;return Math.min(e,this.#at)}#dt(t){if(!e.Type.isStringFilled(t)){return""}const s=t.trim();if(!s){return""}if(s.length<=this.#ct){return s}const i=s.slice(0,this.#ct-1);const n=i.replace(/\s+\S*$/,"");return`${n||i}\u2026`}#lt(t){const s=document.createElement("div");s.setAttribute("aria-live",t);s.setAttribute("aria-atomic","true");s.setAttribute("data-a11y-ignore-inert","true");e.Dom.style(s,{position:"absolute",width:"1px",height:"1px",margin:"-1px",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)",whiteSpace:"nowrap",border:"0"});return s}}const I=1;const S=2;const w=4;const D=8;const N=16;const x=32;const L=64;
1const k=128;const O=256;const C=512;const B={ArrowHorizontal:I,ArrowVertical:S,JK:w,HL:D,HomeAndEnd:N,WS:x,AD:L,Tab:k,PageUpDown:O,Backspace:C,ArrowAll:I|S,HJKL:D|w,WASD:x|L,All:I|S|w|D|N|x|L|k|O|C};const R={ELEMENT_ATTR:"data-active-descendant",CONTAINER_ATTR:"data-has-active-descendant",EXPLICIT:"activated-by-keyboard",IMPLICIT:"activated-by-other"};const M={ArrowLeft:B.ArrowHorizontal,ArrowDown:B.ArrowVertical,ArrowUp:B.ArrowVertical,ArrowRight:B.ArrowHorizontal,h:B.HL,j:B.JK,k:B.JK,l:B.HL,a:B.AD,s:B.WS,w:B.WS,d:B.AD,Tab:B.Tab,Home:B.HomeAndEnd,End:B.HomeAndEnd,PageUp:B.PageUpDown,PageDown:B.PageUpDown,Backspace:B.Backspace};const P={ArrowLeft:"previous",ArrowDown:"next",ArrowUp:"previous",ArrowRight:"next",h:"previous",j:"next",k:"previous",l:"next",a:"previous",s:"next",w:"previous",d:"next",Tab:"next",Home:"start",End:"end",PageUp:"start",PageDown:"end",Backspace:"previous"};const H=new Set(["button","checkbox","file","hidden","image","radio","range","reset","submit"]);class _{#L;#k;#O=false;#mt;#pt;#gt;#R;#yt;#bt;#vt=new Set;#Ft=new WeakMap;#Et=null;#Tt=null;#At=null;#It=null;#St=[];#wt=false;#Dt=new WeakSet;#Nt=this.#xt.bind(this);#Lt=this.#kt.bind(this);#Ot=this.#Ct.bind(this);#Bt=this.#Rt.bind(this);#Mt=this.#Pt.bind(this);constructor(t,s={}){this.#L=t;this.#k=e.Type.isPlainObject(s)?s:{};this.#Tt=this.#k.activeDescendantControl??null;this.#pt=this.#k.focusOutBehavior??"stop";this.#gt=this.#k.focusInStrategy??"previous";this.#R=this.#k.preventScroll??false;this.#yt=this.#k.ignoreHoverEvents??false;this.#bt=this.#k.tabbableOnly??false;this.#mt=this.#k.bindKeys??(this.#k.getNextFocusable?B.ArrowAll:B.ArrowVertical)|B.HomeAndEnd}static enableDebug(){l.enable("focus-zone")}static disableDebug(){l.disable("focus-zone")}activate(){if(this.#O){return}this.#O=true;this.#vt=this.#Ht();for(const t of this.#vt){this.#_t(t)}if(this.#Tt){if(!this.#L.id){this.#L.setAttribute("id",`fz-${e.Text.getRandom()}`);this.#wt=true}this.#Tt.setAttribute("aria-controls",this.#L.id)}const t=this.#gt==="initial"&&this.#Tt;if(!t){this.#zt(this.#$t())}this.#Kt();this.#w();l.log("focus-zone",`activated with ${this.#vt.size} elements`)}deactivate(){if(!this.#O){return}this.#O=false;if(this.#At){this.#At.disconnect();this.#At=null}if(this.#It!==null){cancelAnimationFrame(this.#It);this.#It=null}this.#Wt();for(const t of this.#vt){this.#Ut(t);if(this.#Dt.has(t)){t.removeAttribute("id");this.#Dt.delete(t)}}if(this.#Tt){this.#qt();this.#Tt.removeAttribute("aria-controls")}if(this.#wt){this.#L.removeAttribute("id");this.#wt=false}this.#vt.clear();this.#Et=null;l.log("focus-zone","deactivated")}isActive(){return this.#O}getCurrentFocusedElement(){return this.#Et}refreshElements(){if(this.#O){this.#jt()}}#Ht(){const t=new Set;const e=d.createWalker(this.#L,{tabbableOnly:this.#bt,accept:this.#k.focusableElementFilter});for(let s=e.nextNode();s!==null;s=e.nextNode()){t.add(s)}return t}#Vt(t=null,e=false){return{from:t??undefined,tabbableOnly:false,accept:t=>this.#vt.has(t),wrap:e}}#Xt(t){let s=e.Type.isElementNode(t)?t:t.parentElement;while(s&&s!==this.#L){if(this.#vt.has(s)){return s}s=s.parentElement}return null}#_t(t){if(!this.#Ft.has(t)){this.#Ft.set(t,t.getAttribute("tabindex"))}t.setAttribute("tabindex","-1")}#Ut(t){const e=this.#Ft.get(t);if(e!==undefined){if(e===null){t.removeAttribute("tabindex")}else{t.setAttribute("tabindex",e)}this.#Ft.delete(t)}}#zt(t=null,e=false){const s=this.#Et;this.#Et=t;if(this.#Tt){if(t&&d.getActiveElement()===this.#Tt){this.#Jt(s,t,e)}else{this.#qt()}return}if(s&&s!==t&&this.#Ft.has(s)){s.setAttribute("tabindex","-1")}if(t){t.setAttribute("tabindex","0")}}#Jt(t,s,i=false){if(!s.id){s.setAttribute("id",`fz-${e.Text.getRandom()}`);this.#Dt.add(s)}if(t&&t!==s){t.removeAttribute(R.ELEMENT_ATTR)}if(!this.#Tt){return}const n=this.#Tt.getAttribute("aria-activedescendant");const o=i?R.EXPLICIT:R.IMPLICIT;const r=s.getAttribute(R.ELEMENT_ATTR);if(n===s.id&&r===o){return}this.#Tt.setAttribute("aria-activedescendant",s.id);this.#L.setAttribute(R.CONTAINER_ATTR,s.id);s.setAttribute(R.ELEMENT_ATTR,o);l.logNode("focus-zone","active descendant ->",s);
1this.#k.onActiveDescendantChanged?.(s,t,i)}#qt(t=this.#Et){if(this.#gt==="first"){this.#Et=null}this.#Tt?.removeAttribute("aria-activedescendant");this.#L.removeAttribute(R.CONTAINER_ATTR);if(t){t.removeAttribute(R.ELEMENT_ATTR)}const e=this.#L.querySelectorAll(`[${R.ELEMENT_ATTR}]`);for(const t of e){t.removeAttribute(R.ELEMENT_ATTR)}this.#k.onActiveDescendantChanged?.(null,t,false)}#xt(t){const e=M[t.key];if(e===undefined||this.#vt.size===0){return}if(t.defaultPrevented||(e&this.#mt)===0||_.#Yt(t,d.getActiveElement())){return}const s=_.#Gt(t);let i=null;if(this.#k.getNextFocusable){i=this.#k.getNextFocusable(s,d.getActiveElement()??null,t)}if(!i){const e=this.#pt==="wrap"&&t.key!=="Tab";const n=this.#Vt(this.#Et,e);switch(s){case"previous":{i=d.getPrevious(this.#L,n);break}case"next":{i=d.getNext(this.#L,n);break}case"start":{i=d.getFirst(this.#L,n);break}default:{i=d.getLast(this.#L,n)}}}if(this.#Tt){this.#zt(i||this.#Et,true)}else if(i){i.focus({preventScroll:this.#R})}if(t.key!=="Tab"||i){t.preventDefault()}}#kt(t){if(!e.Type.isElementNode(t.target)){return}if(this.#Tt){this.#Zt(t)}else{this.#Qt(t)}}#Zt(t){const e=t.target;if(this.#vt.has(e)){this.#Tt?.focus({preventScroll:this.#R});this.#zt(e)}}#Qt(t){const s=t.target;const i=y.Instance.getModalityTracker();const n=i.getLastModality()==="pointer";if(n){if(this.#vt.has(s)){this.#zt(s)}return}if(!this.#vt.has(s)){return}if(this.#gt==="previous"){this.#zt(s)}else if(this.#gt==="closest"||this.#gt==="first"){if(this.#te(t.relatedTarget)){const t=this.#ee();if(t){t.focus({preventScroll:this.#R})}return}this.#zt(s)}else if(e.Type.isFunction(this.#gt)){if(this.#te(t.relatedTarget)){const e=this.#gt(t.relatedTarget);if(e&&this.#vt.has(e)){e.focus({preventScroll:this.#R});return}l.warn("focus-zone","focusInStrategy returned an element outside the managed focus set.")}this.#zt(s)}}#$t(){if(e.Type.isFunction(this.#gt)){const t=this.#gt(this.#Et);return t&&this.#vt.has(t)?t:null}return d.getFirst(this.#L,this.#Vt())}#ee(){const t=this.#Vt();return y.Instance.getModalityTracker().isLastNavigationReversed()?d.getLast(this.#L,t):d.getFirst(this.#L,t)}#te(t){return e.Type.isElementNode(t)&&!this.#L.contains(t)}#Ct(t){const{target:s}=t;if(!e.Type.isElementNode(s)){return}const i=this.#Xt(s);if(i){this.#zt(i)}}#Rt(){const t=this.#gt==="initial"&&this.#Tt;if(this.#Et){this.#Jt(null,this.#Et)}else if(!t){this.#zt(d.getFirst(this.#L,this.#Vt()))}}#Pt(){this.#qt()}#se(t,s,i,n=false){e.Event.bind(t,s,i,n);this.#St.push([t,s,i,n])}#Kt(){const t=this.#Tt??this.#L;this.#se(t,"keydown",this.#Nt);this.#se(this.#L,"focusin",this.#Lt);if(this.#Tt){if(!this.#yt){this.#se(this.#L,"mousemove",this.#Ot,true)}this.#se(this.#Tt,"focusin",this.#Bt);this.#se(this.#Tt,"focusout",this.#Mt)}}#Wt(){for(const[t,s,i,n]of this.#St){e.Event.unbind(t,s,i,n)}this.#St=[]}#w(){this.#At=new MutationObserver((()=>{this.#ie()}));this.#At.observe(this.#L,{attributes:true,subtree:true,childList:true,attributeFilter:["hidden","disabled","tabindex","inert","contenteditable","aria-disabled"]})}#ie(){if(!this.#O||this.#It!==null){return}this.#It=requestAnimationFrame((()=>{this.#It=null;this.#jt()}))}#jt(){if(!this.#O){return}const t=this.#Ht();const e=this.#vt;for(const s of e){if(!t.has(s)){this.#Ut(s)}}for(const s of t){if(!e.has(s)){this.#_t(s)}}this.#vt=t;if(this.#Et&&!t.has(this.#Et)){this.#zt(d.getFirst(this.#L,this.#Vt()))}else if(!this.#Et&&t.size>0){const t=this.#gt==="initial"&&this.#Tt;if(!t){this.#zt(d.getFirst(this.#L,this.#Vt()))}}}static#Gt(t){const s=P[t.key];if(t.key==="Tab"&&t.shiftKey){return"previous"}const i=e.Browser.isMac();if(i&&t.metaKey||!i&&t.ctrlKey){if(t.key==="ArrowLeft"||t.key==="ArrowUp"){return"start"}if(t.key==="ArrowRight"||t.key==="ArrowDown"){return"end"}}return s}static#ne(t){if(!e.Type.isElementNode(t)){return false}const s=t;if(s.tagName==="INPUT"){return!H.has(t.type)}if(s.tagName==="TEXTAREA"||s.tagName==="SELECT"){return true}return s.isContentEditable}static#Yt(t,s){const{key:i,metaKey:n,altKey:o}=t;const r=i.codePointAt(0)??0;const a=i.length===1||i.length===2&&r>=55296&&r<=56319;const c=_.#ne(s);const l=s?.tagName==="SELECT";if(c&&(a||i==="Home"||i==="End")){return true}if(l){const t=e.Browser.isMac();if(i==="ArrowDown"&&t&&!n){return true}return i==="ArrowDown"&&!t&&o}if(c){const t=s?.tagName==="TEXTAREA"||s?.tagName==="INPUT";const n=s;const o=t&&n.selectionStart===0&&n.selectionEnd===0;const r=t&&n.selectionStart===n.value.length&&n.selectionEnd===n.value.length;if(i==="ArrowLeft"&&!o){return true}if(i==="ArrowRight"&&!r){return true}const a=e.Type.isElementNode(s)&&s.isContentEditable;if(s?.tagName==="TEXTAREA"||a){if(i==="PageUp"||i==="PageDown"){return true}if(i==="ArrowUp"&&!o){return true}if(i==="ArrowDown"&&!r){return true}}}return false}}class z extends HTMLElement{connectedCallback(){Object.assign(this.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"})}}if(!customElements.get("visually-hidden")){customElements.define("visually-hidden",z)}y.initialize();t.AccessibilityLogger=l;t.AccessibilitySettings=g;t.ActiveDescendant=R;t.FocusKeys=B;t.FocusMonitor=y;t.FocusNavigator=d;t.FocusTrap=F;t.FocusTrapDirective=E;t.FocusZone=_;t.InputModalityTracker=p;t.InteractivityChecker=o;t.LiveAnnouncer=A;t.RESTORE_FOCUS_EVENT=u;t.VisuallyHidden=z})(this.BX.UI.Accessibility=this.BX.UI.Accessibility||{},BX); 2//# sourceMappingURL=a11y.bundle.map.js
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.