"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[1878],{42617:(n,e,t)=>{t.d(e,{Ay:()=>Sn});var r=t(93449),o=t(92198),u=t(40099),i="data-focus-lock",c="data-focus-lock-disabled",a=t(81888),d={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},f=t(14555),l=(0,f.C)({},(function(n){return{target:n.target,currentTarget:n.currentTarget}})),s=(0,f.C)(),v=(0,f.C)(),m=(0,f.f)({async:!0,ssr:"undefined"!=typeof document}),p=(0,u.createContext)(void 0),b=[],h=u.forwardRef((function(n,e){var t,r=u.useState(),f=r[0],v=r[1],h=u.useRef(),g=u.useRef(!1),y=u.useRef(null),E=u.useState({})[1],x=n.children,O=n.disabled,w=void 0!==O&&O,N=n.noFocusGuards,A=void 0!==N&&N,T=n.persistentFocus,M=void 0!==T&&T,I=n.crossFrame,D=void 0===I||I,S=n.autoFocus,F=void 0===S||S,C=(n.allowTextSelection,n.group),k=n.className,_=n.whiteList,L=n.hasPositiveIndices,P=n.shards,R=void 0===P?b:P,B=n.as,U=void 0===B?"div":B,W=n.lockProps,j=void 0===W?{}:W,G=n.sideCar,q=n.returnFocus,H=void 0!==q&&q,K=n.focusOptions,V=n.onActivation,Y=n.onDeactivation,z=u.useState({})[0],J=u.useCallback((function(n){var e=n.captureFocusRestore;if(!y.current){var t,r=null==(t=document)?void 0:t.activeElement;y.current=r,r!==document.body&&(y.current=e(r))}h.current&&V&&V(h.current),g.current=!0,E()}),[V]),Q=u.useCallback((function(){g.current=!1,Y&&Y(h.current),E()}),[Y]),X=u.useCallback((function(n){var e=y.current;if(e){var t=("function"==typeof e?e():e)||document.body,r="function"==typeof H?H(t):H;if(r){var o="object"==typeof r?r:void 0;y.current=null,n?Promise.resolve().then((function(){return t.focus(o)})):t.focus(o)}}}),[H]),Z=u.useCallback((function(n){g.current&&l.useMedium(n)}),[]),$=s.useMedium,nn=u.useCallback((function(n){h.current!==n&&(h.current=n,v(n))}),[]),en=(0,o.A)(((t={})[c]=w&&"disabled",t[i]=C,t),j),tn=!0!==A,rn=tn&&"tail"!==A,on=(0,a.S)([e,nn]),un=u.useMemo((function(){return{observed:h,shards:R,enabled:!w,active:g.current}}),[w,g.current,R,f]);return u.createElement(u.Fragment,null,tn&&[u.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:w?-1:0,style:d}),L?u.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:w?-1:1,style:d}):null],!w&&u.createElement(G,{id:z,sideCar:m,observed:f,disabled:w,persistentFocus:M,crossFrame:D,autoFocus:F,whiteList:_,shards:R,onActivation:J,onDeactivation:Q,returnFocus:X,focusOptions:K}),u.createElement(U,(0,o.A)({ref:on},en,{className:k,onBlur:$,onFocus:Z}),u.createElement(p.Provider,{value:un},x)),rn&&u.createElement("div",{"data-focus-guard":!0,tabIndex:w?-1:0,style:d}))}));h.propTypes={};const g=h;var y=t(93536),E=function(n){for(var e=Array(n.length),t=0;t=0})).sort(_)},P=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"].join(","),R="".concat(P,", [data-focus-guard]"),B=function(n,e){return E((n.shadowRoot||n).children).reduce((function(n,t){return n.concat(t.matches(e?R:P)?[t]:[],B(t))}),[])},U=function(n,e){return n.reduce((function(n,t){var r,o=B(t,e),u=(r=[]).concat.apply(r,o.map((function(n){return function(n,e){var t;return n instanceof HTMLIFrameElement&&(null===(t=n.contentDocument)||void 0===t?void 0:t.body)?U([n.contentDocument.body],e):[n]}(n,e)})));return n.concat(u,t.parentNode?E(t.parentNode.querySelectorAll(P)).filter((function(n){return n===t})):[])}),[])},W=function(n,e){return E(n).filter((function(n){return A(e,n)})).filter((function(n){return function(n){return!((I(n)||function(n){return"BUTTON"===n.tagName}(n))&&("hidden"===n.type||n.disabled))}(n)}))},j=function(n,e){return void 0===e&&(e=new Map),E(n).filter((function(n){return T(e,n)}))},G=function(n,e,t){return L(W(U(n,t),e),!0,t)},q=function(n,e){return L(W(U(n),e),!1)},H=function(n,e){return n.shadowRoot?H(n.shadowRoot,e):!(void 0===Object.getPrototypeOf(n).contains||!Object.getPrototypeOf(n).contains.call(n,e))||E(n.children).some((function(n){var t;if(n instanceof HTMLIFrameElement){var r=null===(t=n.contentDocument)||void 0===t?void 0:t.body;return!!r&&H(r,e)}return H(n,e)}))},K=function(n){if(void 0===n&&(n=document),n&&n.activeElement){var e=n.activeElement;return e.shadowRoot?K(e.shadowRoot):e instanceof HTMLIFrameElement&&function(){try{return e.contentWindow.document}catch(n){return}}()?K(e.contentWindow.document):e}},V=function(n){return n.parentNode?V(n.parentNode):n},Y=function(n){return x(n).filter(Boolean).reduce((function(n,e){var t=e.getAttribute(i);return n.push.apply(n,t?function(n){for(var e=new Set,t=n.length,r=0;r0&&e.add(o),(u&Node.DOCUMENT_POSITION_CONTAINS)>0&&e.add(r)}return n.filter((function(n,t){return!e.has(t)}))}(E(V(e).querySelectorAll("[".concat(i,'="').concat(t,'"]:not([').concat(c,'="disabled"])')))):[e]),n}),[])},z=function(n,e){return void 0===e&&(e=K(O(n).ownerDocument)),!(!e||e.dataset&&e.dataset.focusGuard)&&Y(n).some((function(n){return H(n,e)||function(n,e){return Boolean(E(n.querySelectorAll("iframe")).some((function(n){return function(n,e){return n===e}(n,e)})))}(n,e)}))},J=function(n,e){n&&("focus"in n&&n.focus(e),"contentWindow"in n&&n.contentWindow&&n.contentWindow.focus())},Q=function(n,e){return D(n)&&n.name?function(n,e){return e.filter(D).filter((function(e){return e.name===n.name})).filter((function(n){return n.checked}))[0]||n}(n,e):n},X=function(n){return n[0]&&n.length>1?Q(n[0],n):n[0]},Z=function(n,e){return n.indexOf(Q(e,n))},$="NEW_FOCUS",nn=function(n,e,t){var r,o=n.map((function(n){return n.node})),u=j(o.filter((r=t,function(n){var e,t=null===(e=M(n))||void 0===e?void 0:e.autofocus;return n.autofocus||void 0!==t&&"false"!==t||r.indexOf(n)>=0})));return u&&u.length?X(u):X(j(e))},en=function(n,e){return void 0===e&&(e=[]),e.push(n),n.parentNode&&en(n.parentNode.host||n.parentNode,e),e},tn=function(n,e){for(var t=en(n),r=en(e),o=0;o=0)return u}return!1},rn=function(n,e,t){var r=x(n),o=x(e),u=r[0],i=!1;return o.filter(Boolean).forEach((function(n){i=tn(i||n,n)||i,t.filter(Boolean).forEach((function(n){var e=tn(u,n);e&&(i=!i||H(e,i)?e:tn(e,i))}))})),i},on=function(n,e){return n.reduce((function(n,t){return n.concat(function(n,e){return W((t=n.querySelectorAll("[".concat("data-autofocus-inside","]")),E(t).map((function(n){return U([n])})).reduce((function(n,e){return n.concat(e)}),[])),e);var t}(t,e))}),[])},un=function(n,e){var t=K(x(n).length>0?document:O(n).ownerDocument),r=Y(n).filter(C),o=rn(t||n,n,r),u=new Map,i=q(r,u),c=i.filter((function(n){var e=n.node;return C(e)}));if(c[0]){var a,d,f,l=q([o],u).map((function(n){return n.node})),s=(a=l,d=c,f=new Map,d.forEach((function(n){return f.set(n.node,n)})),a.map((function(n){return f.get(n)})).filter(k)),v=s.map((function(n){return n.node})),m=s.filter((function(n){return n.tabIndex>=0})).map((function(n){return n.node})),p=function(n,e,t,r,o){var u=n.length,i=n[0],c=n[u-1],a=F(r);if(!(r&&n.indexOf(r)>=0)){var d=void 0!==r?t.indexOf(r):-1,f=o?t.indexOf(o):d,l=o?n.indexOf(o):-1;if(-1===d)return-1!==l?l:$;if(-1===l)return $;var s,v,m=d-f,p=t.indexOf(i),b=t.indexOf(c),h=(s=t,v=new Set,s.forEach((function(n){return v.add(Q(n,s))})),s.filter((function(n){return v.has(n)}))),g=(void 0!==r?h.indexOf(r):-1)-(o?h.indexOf(o):d);if(!m&&l>=0)return l;if(0===e.length)return l;var y=Z(n,e[0]),E=Z(n,e[e.length-1]);return d<=p&&a&&Math.abs(m)>1?E:d>=b&&a&&Math.abs(m)>1?y:m&&Math.abs(g)>1?l:d<=p?E:d>b?y:m?Math.abs(m)>1?l:(u+l+m)%u:void 0}}(v,m,l,t,e);if(p===$){var b=nn(i,m,on(r,u))||nn(i,v,on(r,u));return b?{node:b}:void console.warn("focus-lock: cannot find any node to move focus into")}return void 0===p?p:s[p]}},cn=0,an=!1,dn=function(n,e,t){void 0===t&&(t={});var r=un(n,e);if(!an&&r){if(cn>2)return console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),an=!0,void setTimeout((function(){an=!1}),1);cn++,J(r.node,t.focusOptions),cn--}},fn=function(n,e,t){void 0===e&&(e={});var r=function(n){return Object.assign({scope:document.body,cycle:!0,onlyTabbable:!0},n)}(e),o=function(n,e,t){if(!n||!e)return console.error("no element or scope given"),{};var r=x(e);if(r.every((function(e){return!H(e,n)})))return console.error("Active element is not contained in the scope"),{};var o=t?G(r,new Map):q(r,new Map),u=o.findIndex((function(e){return e.node===n}));return-1!==u?{prev:o[u-1],next:o[u+1],first:o[0],last:o[o.length-1]}:void 0}(n,r.scope,r.onlyTabbable);if(o){var u=t(o,r.cycle);u&&J(u.node,r.focusOptions)}},ln=function(n,e,t){var r,o,u,i,c=(o=n,u=null===(r=e.onlyTabbable)||void 0===r||r,{first:(i=u?G(x(o),new Map):q(x(o),new Map))[0],last:i[i.length-1]})[t];c&&J(c.node,e.focusOptions)};function sn(n){if(!n)return null;if("undefined"==typeof WeakRef)return function(){return n||null};var e=n?new WeakRef(n):null;return function(){return(null==e?void 0:e.deref())||null}}function vn(n){setTimeout(n,1)}var mn=function(n){return n&&"current"in n?n.current:n},pn=null,bn=null,hn=null,gn=!1,yn=function(){return!0};function En(n,e,t,r){var o=null,u=n;do{var i=r[u];if(i.guard)i.node.dataset.focusAutoGuard&&(o=i);else{if(!i.lockItem)break;if(u!==n)return;o=null}}while((u+=t)!==e);o&&(o.node.tabIndex=0)}var xn=function n(e,t,r){return t&&(t.host===e&&(!t.activeElement||r.contains(t.activeElement))||t.parentNode&&n(e,t.parentNode,r))},On=function(){var n,e,t,r,o,u,i=!1;if(pn){var c=pn,a=c.observed,d=c.persistentFocus,f=c.autoFocus,l=c.shards,s=c.crossFrame,v=c.focusOptions,m=a||hn&&hn.portaledElement,p=document&&document.activeElement;if(m){var b=[m].concat(l.map(mn).filter(Boolean));if(p&&!function(n){return(pn.whiteList||yn)(n)}(p)||(d||(s?Boolean(gn):"meanwhile"===gn)||!(document&&document.activeElement===document.body||function(n){void 0===n&&(n=document);var e=K(n);return!!e&&E(n.querySelectorAll("[".concat("data-no-focus-lock","]"))).some((function(n){return H(n,e)}))}())||!bn&&f)&&(m&&!(z(b)||p&&function(n,e){return e.some((function(e){return xn(n,e,e)}))}(p,b)||(u=p,hn&&hn.portaledElement===u))&&(document&&!bn&&p&&!f?(p.blur&&p.blur(),document.body.focus()):(i=dn(b,bn,{focusOptions:v}),hn={})),gn=!1,bn=document&&document.activeElement),document&&p!==document.activeElement&&document.querySelector("[data-focus-auto-guard]")){var h=document&&document.activeElement,g=(e=Y(n=b).filter(C),t=rn(n,n,e),r=L(U([t],!0),!0,!0),o=U(e,!1),r.map((function(n){var e=n.node;return{node:e,index:n.index,lockItem:o.indexOf(e)>=0,guard:F(e)}}))),y=g.map((function(n){return n.node})).indexOf(h);y>-1&&(g.filter((function(n){var e=n.guard,t=n.node;return e&&t.dataset.focusAutoGuard})).forEach((function(n){return n.node.removeAttribute("tabIndex")})),En(y,g.length,1,g),En(y,-1,-1,g))}}}return i},wn=function(n){On()&&n&&(n.stopPropagation(),n.preventDefault())},Nn=function(){return vn(On)},An=function(){gn="just",vn((function(){gn="meanwhile"}))},Tn={moveFocusInside:dn,focusInside:z,focusNextElement:function(n,e){void 0===e&&(e={}),fn(n,e,(function(n,e){var t=n.next,r=n.first;return t||e&&r}))},focusPrevElement:function(n,e){void 0===e&&(e={}),fn(n,e,(function(n,e){var t=n.prev,r=n.last;return t||e&&r}))},focusFirstElement:function(n,e){void 0===e&&(e={}),ln(n,e,"first")},focusLastElement:function(n,e){void 0===e&&(e={}),ln(n,e,"last")},captureFocusRestore:function(n){var e=function(n){if(!n)return null;for(var e=[],t=n;t&&t!==document.body;)e.push({current:sn(t),parent:sn(t.parentElement),left:sn(t.previousElementSibling),right:sn(t.nextElementSibling)}),t=t.parentElement;return{element:sn(n),stack:e,ownerDocument:n.ownerDocument}}(n);return function(){return function(n){var e,t,r,o,u;if(n)for(var i=n.stack,c=n.ownerDocument,a=new Map,d=0,f=i;d