Module 111975

5,156 characters · in 514.d733764d42c2ab66.js
Dependencies
Required by (1)
Lazily required by (0)none
Requires (0)none
Lazily requires (0)none
Source Raw
function(e,t,n){"use strict";n.d(t,{AO:()=>A,Kr:()=>C,nq:()=>P});var r='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])',i="u"<typeof Element,a=i?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,o=!i&&Element.prototype.getRootNode?function(e){var t;return null==e||null==(t=e.getRootNode)?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},s=function e(t,n){void 0===n&&(n=!0);var r,i=null==t||null==(r=t.getAttribute)?void 0:r.call(t,"inert");return""===i||"true"===i||n&&t&&e(t.parentNode)},l=function(e){var t,n=null==e||null==(t=e.getAttribute)?void 0:t.call(e,"contenteditable");return""===n||"true"===n},u=function(e,t,n){if(s(e))return[];var i=Array.prototype.slice.apply(e.querySelectorAll(r));return t&&a.call(e,r)&&i.unshift(e),i=i.filter(n)},c=function e(t,n,i){for(var o=[],l=Array.from(t);l.length;){var u=l.shift();if(!s(u,!1))if("SLOT"===u.tagName){var c=u.assignedElements(),d=e(c.length?c:u.children,!0,i);i.flatten?o.push.apply(o,d):o.push({scopeParent:u,candidates:d})}else{a.call(u,r)&&i.filter(u)&&(n||!t.includes(u))&&o.push(u);var f=u.shadowRoot||"function"==typeof i.getShadowRoot&&i.getShadowRoot(u),p=!s(f,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(u));if(f&&p){var h=e(!0===f?u.children:f.children,!0,i);i.flatten?o.push.apply(o,h):o.push({scopeParent:u,candidates:h})}else l.unshift.apply(l,u.children)}}return o},d=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},f=function(e){if(!e)throw Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||l(e))&&!d(e)?0:e.tabIndex},p=function(e,t){var n=f(e);return n<0&&t&&!d(e)?0:n},h=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},m=function(e){return"INPUT"===e.tagName},g=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},v=function(e){if(!e.name)return!0;var t,n=e.form||o(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("u">typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.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}var i=g(t,e.form);return!i||i===e},y=function(e){return m(e)&&"radio"===e.type&&!v(e)},b=function(e){var t,n,r,i,a,s,l,u=e&&o(e),c=null==(t=u)?void 0:t.host,d=!1;if(u&&u!==e)for(d=!!(null!=(n=c)&&null!=(r=n.ownerDocument)&&r.contains(c)||null!=e&&null!=(i=e.ownerDocument)&&i.contains(e));!d&&c;)d=!!(null!=(s=c=null==(a=u=o(c))?void 0:a.host)&&null!=(l=s.ownerDocument)&&l.contains(c));return d},_=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},w=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var i=a.call(e,"details>summary:first-of-type")?e.parentElement:e;if(a.call(i,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return _(e)}else{if("function"==typeof r){for(var s=e;e;){var l=e.parentElement,u=o(e);if(l&&!l.shadowRoot&&!0===r(l))return _(e);e=e.assignedSlot?e.assignedSlot:l||u===e.ownerDocument?l:u.host}e=s}if(b(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1},x=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!a.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1},E=function(e,t){return!(t.disabled||s(t)||m(t)&&"hidden"===t.type||w(t,e)||"DETAILS"===t.tagName&&Array.prototype.slice.apply(t.children).some(function(e){return"SUMMARY"===e.tagName})||x(t))},S=function(e,t){return!(y(t)||0>f(t))&&!!E(e,t)},k=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!isNaN(t)||!!(t>=0)},T=function e(t){var n=[],r=[];return t.forEach(function(t,i){var a=!!t.scopeParent,o=a?t.scopeParent:t,s=p(o,a),l=a?e(t.candidates):o;0===s?a?n.push.apply(n,l):n.push(o):r.push({documentOrder:i,tabIndex:s,item:t,isScope:a,content:l})}),r.sort(h).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(n)},C=function(e,t){return T((t=t||{}).getShadowRoot?c([e],t.includeContainer,{filter:S.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:k}):u(e,t.includeContainer,S.bind(null,t)))},P=function(e,t){return(t=t||{}).getShadowRoot?c([e],t.includeContainer,{filter:E.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):u(e,t.includeContainer,E.bind(null,t))},A=function(e,t){if(t=t||{},!e)throw Error("No node provided");return!1!==a.call(e,r)&&S(t,e)}}