!function(e,t){"object"==typeofexports&&"undefined"!=typeofmodule?t(exports):"function"==typeofdefine&&define.amd?define(["exports"],t):(e="undefined"!=typeofglobalThis?globalThis:e||self,function(){varn=e.tabbable,o=e.tabbable={};t(o),o.noConflict=function(){returne.tabbable=n,o}}())}(this,(function(e){"use strict";vart=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],n=t.join(","),o="undefined"==typeofElement,r=o?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,a=!o&&Element.prototype.getRootNode?function(e){returne.getRootNode()}:function(e){returne.ownerDocument},i=function(e,t,o){vara=Array.prototype.slice.apply(e.querySelectorAll(n));returnt&&r.call(e,n)&&a.unshift(e),a=a.filter(o)},l=functione(t,o,a){for(vari=[],l=Array.from(t);l.length;){varu=l.shift();if("SLOT"===u.tagName){varc=u.assignedElements(),d=e(c.length?c:u.children,!0,a);a.flatten?i.push.apply(i,d):i.push({scopeParent:u,candidates:d})}else{r.call(u,n)&&a.filter(u)&&(o||!t.includes(u))&&i.push(u);varf=u.shadowRoot||"function"==typeofa.getShadowRoot&&a.getShadowRoot(u),s=!a.shadowRootFilter||a.shadowRootFilter(u);if(f&&s){varp=e(!0===f?u.children:f.children,!0,a);a.flatten?i.push.apply(i,p):i.push({scopeParent:u,candidates:p})}elsel.unshift.apply(l,u.children)}}returni},u=function(e,t){returne.tabIndex<0&&(t||/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||e.isContentEditable)&&isNaN(parseInt(e.getAttribute("tabindex"),10))?0:e.tabIndex},c=function(e,t){returne.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},d=function(e){return"INPUT"===e.tagName},f=function(e){returnfunction(e){returnd(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;vart,n=e.form||a(e),o=function(e){returnn.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeofwindow&&void0!==window.CSS&&"function"==typeofwindow.CSS.escape)t=o(window.CSS.escape(e.name));elsetry{t=o(e.name)}catch(e){returnconsole.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}varr=function(e,t){for(varn=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)returne[n]}(t,e.form);return!r||r===e}(e)},s=function(e){vart=e.getBoundingClientRect(),n=t.width,o=t.height;return0===n&&0===o},p=function(e,t){varn=t.displayCheck,o=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;vari=r.call(e,"details>summary:first-of-type")?e.parentElement:e;if(r.call(i,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)returns(e)}else{if("function"==typeofo){for(varl=e;e;){varu=e.parentElement,c=a(e);if(u&&!u.shadowRoot&&!0===o(u))returns(e);e=e.assignedSlot?e.assignedSlot:u||c===e.ownerDocument?u:c.host}e=l}if(function(e){for(vart,n=a(e).host,o=!!(null!==(t=n)&&void0!==t&&t.ownerDocument.contains(n)||e.ownerDocument.contains(e));!o&&n;){varr;o=!(null===(r=n=a(n).host)||void0===r||!r.ownerDocument.contains(n))}returno}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1},h=function(e,t){return!(t.disabled||function(e){returnd(e)&&"hidden"===e.type}(t)||p(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(vart=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(varn=0;n<t.children.length;n++){varo=t.children.item(n);if("LEGEND"===o.tagName)return!!r.call(t,"fieldset[disabled] *")||!o.contains(e)}return!0}t=t.parentElement}return!1}(t))},m=function(e,t){return!(f(t)||u(t)<0||!h(e,t))},b=function(e){vart=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},y=functione(t){varn=[],o=[];returnt.forEach((function(t,r){vara=!!t.scopeParent,i=a?t.scopeParent:t,l=u(i,a),c=a?e(t.candidates):i;0===l?a?n.push.apply(n,c):n.push(i):o.push({documentOrder:r,tabIndex:l,item:t,isScope:a,content:c})})),o.sort(c).reduce((function(e,t){returnt.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},g=t.concat("iframe").join(",");e.focusable=function(e,t){return(t=t||{}).getShadowRoot?l([e],t.includeContainer,{filter:h.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):i(e,t.includeContainer,h.bind(null,t))},e.isFocusable=function(e,t){if(t=t||{},!e)thrownewError("No node provided");return!1!==r.call(e,g)&&h(t,e)},e.isTabbable=function(e,t){if(t=t||{},!e)thrownewError("No node provided");return!1!==r.call(e,n)&&m(t,e)},e.tabbable=function(e,t){varn;returnn=(t=t||{}).getShadowRoot?l([e],t.includeContainer,{filter:m.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:b}):i(e,t.includeContainer,m.bind(null,t)),y(n)},Object.defineProperty(e,"__esModule",{value:!0})}));
!function(t,e){"object"==typeofexports&&"undefined"!=typeofmodule?e(exports):"function"==typeofdefine&&define.amd?define(["exports"],e):(t="undefined"!=typeofglobalThis?globalThis:t||self,function(){varn=t.tabbable,o=t.tabbable={};e(o),o.noConflict=function(){returnt.tabbable=n,o}}())}(this,(function(t){"use strict";vare=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],n=e.join(","),o="undefined"==typeofElement,r=o?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,i=!o&&Element.prototype.getRootNode?function(t){vare;returnnull==t||null===(e=t.getRootNode)||void0===e?void0:e.call(t)}:function(t){returnnull==t?void0:t.ownerDocument},a=functiont(e,n){varo;void0===n&&(n=!0);varr=null==e||null===(o=e.getAttribute)||void0===o?void0:o.call(e,"inert");return""===r||"true"===r||n&&e&&t(e.parentNode)},l=function(t,e,o){if(a(t))return[];vari=Array.prototype.slice.apply(t.querySelectorAll(n));returne&&r.call(t,n)&&i.unshift(t),i=i.filter(o)},u=functiont(e,o,i){for(varl=[],u=Array.from(e);u.length;){vard=u.shift();if(!a(d,!1))if("SLOT"===d.tagName){varc=d.assignedElements(),f=t(c.length?c:d.children,!0,i);i.flatten?l.push.apply(l,f):l.push({scopeParent:d,candidates:f})}else{r.call(d,n)&&i.filter(d)&&(o||!e.includes(d))&&l.push(d);vars=d.shadowRoot||"function"==typeofi.getShadowRoot&&i.getShadowRoot(d),p=!a(s,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(d));if(s&&p){varh=t(!0===s?d.children:s.children,!0,i);i.flatten?l.push.apply(l,h):l.push({scopeParent:d,candidates:h})}elseu.unshift.apply(u,d.children)}}returnl},d=function(t,e){returnt.tabIndex<0&&(e||/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||function(t){vare,n=null==t||null===(e=t.getAttribute)||void0===e?void0:e.call(t,"contenteditable");return""===n||"true"===n}(t))&&isNaN(parseInt(t.getAttribute("tabindex"),10))?0:t.tabIndex},c=function(t,e){returnt.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},f=function(t){return"INPUT"===t.tagName},s=function(t){returnfunction(t){returnf(t)&&"radio"===t.type}(t)&&!function(t){if(!t.name)return!0;vare,n=t.form||i(t),o=function(t){returnn.querySelectorAll('input[type="radio"][name="'+t+'"]')};if("undefined"!=typeofwindow&&void0!==window.CSS&&"function"==typeofwindow.CSS.escape)e=o(window.CSS.escape(t.name));elsetry{e=o(t.name)}catch(t){returnconsole.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",t.message),!1}varr=function(t,e){for(varn=0;n<t.length;n++)if(t[n].checked&&t[n].form===e)returnt[n]}(e,t.form);return!r||r===t}(t)},p=function(t){vare=t.getBoundingClientRect(),n=e.width,o=e.height;return0===n&&0===o},h=function(t,e){varn=e.displayCheck,o=e.getShadowRoot;if("hidden"===getComputedStyle(t).visibility)return!0;vara=r.call(t,"details>summary:first-of-type")?t.parentElement:t;if(r.call(a,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)returnp(t)}else{if("function"==typeofo){for(varl=t;t;){varu=t.parentElement,d=i(t);if(u&&!u.shadowRoot&&!0===o(u))returnp(t);t=t.assignedSlot?t.assignedSlot:u||d===t.ownerDocument?u:d.host}t=l}if(function(t){vare,n,o,r,a=t&&i(t),l=null===(e=a)||void0===e?void0:e.host,u=!1;if(a&&a!==t)for(u=!!(null!==(n=l)&&void0!==n&&null!==(o=n.ownerDocument)&&void0!==o&&o.contains(l)||null!=t&&null!==(r=t.ownerDocument)&&void0!==r&&r.contains(t));!u&&l;){vard,c,f;u=!(null===(c=l=null===(d=a=i(l))||void0===d?void0:d.host)||void0===c||null===(f=c.ownerDocument)||void0===f||!f.contains(l))}returnu}(t))return!t.getClientRects().length;if("legacy-full"!==n)return!0}return!1},v=function(t,e){return!(e.disabled||a(e)||function(t){returnf(t)&&"hidden"===t.type}(e)||h(e,t)||function(t){return"DETAILS"===t.tagName&&Array.prototype.slice.apply(t.children).some((function(t){return"SUMMARY"===t.tagName}))}(e)||function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(vare=t.parentElement;e;){if("FIELDSET"===e.tagName&&e.disabled){for(varn=0;n<e.children.length;n++){varo=e.children.item(n);if("LEGEND"===o.tagName)return!!r.call(e,"fieldset[disabled] *")||!o.contains(t)}return!0}e=e.parentElement}return!1}(e))},b=function(t,e){return!(s(e)||d(e)<0||!v(t,e))},m=function(t){vare=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},y=functiont(e){varn=[],o=[];returne.forEach((function(e,r){vari=!!e.scopeParent,a=i?e.scopeParent:e,l=d(a,i),u=i?t(e.candidates):a;0===l?i?n.push.apply(n,u):n.push(a):o.push({documentOrder:r,tabIndex:l,item:e,isScope:i,content:u})})),o.sort(c).reduce((function(t,e){returne.isScope?t.push.apply(t,e.content):t.push(e.content),t}),[]).concat(n)},g=e.concat("iframe").join(",");t.focusable=function(t,e){return(e=e||{}).getShadowRoot?u([t],e.includeContainer,{filter:v.bind(null,e),flatten:!0,getShadowRoot:e.getShadowRoot}):l(t,e.includeContainer,v.bind(null,e))},t.isFocusable=function(t,e){if(e=e||{},!t)thrownewError("No node provided");return!1!==r.call(t,g)&&v(e,t)},t.isTabbable=function(t,e){if(e=e||{},!t)thrownewError("No node provided");return!1!==r.call(t,n)&&b(e,t)},t.tabbable=function(t,e){varn;returnn=(e=e||{}).getShadowRoot?u([t],e.includeContainer,{filter:b.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:m}):l(t,e.includeContainer,b.bind(null,e)),y(n)},Object.defineProperty(t,"__esModule",{value:!0})}));