UNPKG

@patternfly/react-core

Version:

This library provides a set of common React components for use with the PatternFly reference implementation.

11 lines • 523 kB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["exports","react","react-dom"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).PatternFlyReact={},e.React,e.ReactDOM)}(this,(function(e,t,n){"use strict";function a(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,a.get?a:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var i=a(t),l=a(n);function o(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(a=Object.getOwnPropertySymbols(e);i<a.length;i++)t.indexOf(a[i])<0&&Object.prototype.propertyIsEnumerable.call(e,a[i])&&(n[a[i]]=e[a[i]])}return n}function s(e,t,n,a){return new(n||(n=Promise))((function(i,l){function o(e){try{r(a.next(e))}catch(e){l(e)}}function s(e){try{r(a.throw(e))}catch(e){l(e)}}function r(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}r((a=a.apply(e,t||[])).next())}))}function r(...e){const t=[],n={}.hasOwnProperty;return e.filter(Boolean).forEach((e=>{const a=typeof e;if("string"===a||"number"===a)t.push(e);else if(Array.isArray(e)&&e.length){const n=r(...e);n&&t.push(n)}else if("object"===a)for(const a in e)n.call(e,a)&&e[a]&&t.push(a)})),t.join(" ")}"function"==typeof SuppressedError&&SuppressedError;const c="--pf-v5-c-about-modal-box--BackgroundImage";var d="pf-v5-c-about-modal-box",p="pf-v5-c-about-modal-box__brand",m="pf-v5-c-about-modal-box__brand-image",u="pf-v5-c-about-modal-box__close",f="pf-v5-c-about-modal-box__content",g="pf-v5-c-about-modal-box__header",h="pf-v5-c-about-modal-box__strapline",b="pf-v5-c-content",v={visited:"pf-m-visited",plain:"pf-m-plain"};const x=e=>{var{children:t,trademark:n,hasNoContentContainer:a=!1}=e,l=o(e,["children","trademark","hasNoContentContainer"]);return i.createElement("div",Object.assign({className:r(f)},l),i.createElement("div",{className:r(`${d}__body`)},a?t:i.createElement("div",{className:r(b)},t)),i.createElement("p",{className:r(h)},n))};x.displayName="AboutModalBoxContent";var O={modifiers:{"4xl":"pf-m-4xl","3xl":"pf-m-3xl","2xl":"pf-m-2xl",xl:"pf-m-xl",lg:"pf-m-lg",md:"pf-m-md"},title:"pf-v5-c-title"};const y="768px",E="992px",N="1200px",C="1450px",w={RIGHT:"right",LEFT:"left",BOTH:"both",NONE:"none"};var S;e.ValidatedOptions=void 0,(S=e.ValidatedOptions||(e.ValidatedOptions={})).success="success",S.error="error",S.warning="warning",S.default="default";const _={Tab:"Tab",Space:" ",Escape:"Escape",Enter:"Enter",ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight"},L={sm:parseInt("576px"),md:parseInt(y),lg:parseInt(E),xl:parseInt(N),"2xl":parseInt(C)},I={sm:parseInt("0"),md:parseInt("40rem"),lg:parseInt("48rem"),xl:parseInt("60rem"),"2xl":parseInt("80rem")}; /*! * tabbable 6.2.0 * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE */ var k=["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])"],T=k.join(","),D="undefined"==typeof Element,R=D?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,M=!D&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},P=function e(t,n){var a;void 0===n&&(n=!0);var i=null==t||null===(a=t.getAttribute)||void 0===a?void 0:a.call(t,"inert");return""===i||"true"===i||n&&t&&e(t.parentNode)},A=function(e,t,n){if(P(e))return[];var a=Array.prototype.slice.apply(e.querySelectorAll(T));return t&&R.call(e,T)&&a.unshift(e),a=a.filter(n)},j=function e(t,n,a){for(var i=[],l=Array.from(t);l.length;){var o=l.shift();if(!P(o,!1))if("SLOT"===o.tagName){var s=o.assignedElements(),r=e(s.length?s:o.children,!0,a);a.flatten?i.push.apply(i,r):i.push({scopeParent:o,candidates:r})}else{R.call(o,T)&&a.filter(o)&&(n||!t.includes(o))&&i.push(o);var c=o.shadowRoot||"function"==typeof a.getShadowRoot&&a.getShadowRoot(o),d=!P(c,!1)&&(!a.shadowRootFilter||a.shadowRootFilter(o));if(c&&d){var p=e(!0===c?o.children:c.children,!0,a);a.flatten?i.push.apply(i,p):i.push({scopeParent:o,candidates:p})}else l.unshift.apply(l,o.children)}}return i},B=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},F=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!B(e)?0:e.tabIndex},z=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},V=function(e){return"INPUT"===e.tagName},$=function(e){return function(e){return V(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||M(e),a=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=a(window.CSS.escape(e.name));else try{t=a(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=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!i||i===e}(e)},H=function(e){var t=e.getBoundingClientRect(),n=t.width,a=t.height;return 0===n&&0===a},W=function(e,t){var n=t.displayCheck,a=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var i=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)return H(e)}else{if("function"==typeof a){for(var l=e;e;){var o=e.parentElement,s=M(e);if(o&&!o.shadowRoot&&!0===a(o))return H(e);e=e.assignedSlot?e.assignedSlot:o||s===e.ownerDocument?o:s.host}e=l}if(function(e){var t,n,a,i,l=e&&M(e),o=null===(t=l)||void 0===t?void 0:t.host,s=!1;if(l&&l!==e)for(s=!!(null!==(n=o)&&void 0!==n&&null!==(a=n.ownerDocument)&&void 0!==a&&a.contains(o)||null!=e&&null!==(i=e.ownerDocument)&&void 0!==i&&i.contains(e));!s&&o;){var r,c,d;s=!(null===(c=o=null===(r=l=M(o))||void 0===r?void 0:r.host)||void 0===c||null===(d=c.ownerDocument)||void 0===d||!d.contains(o))}return s}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1},G=function(e,t){return!(t.disabled||P(t)||function(e){return V(e)&&"hidden"===e.type}(t)||W(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(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var a=t.children.item(n);if("LEGEND"===a.tagName)return!!R.call(t,"fieldset[disabled] *")||!a.contains(e)}return!0}t=t.parentElement}return!1}(t))},X=function(e,t){return!($(t)||F(t)<0||!G(e,t))},U=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},K=function e(t){var n=[],a=[];return t.forEach((function(t,i){var l=!!t.scopeParent,o=l?t.scopeParent:t,s=function(e,t){var n=F(e);return n<0&&t&&!B(e)?0:n}(o,l),r=l?e(t.candidates):o;0===s?l?n.push.apply(n,r):n.push(o):a.push({documentOrder:i,tabIndex:s,item:t,isScope:l,content:r})})),a.sort(z).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},q=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==R.call(e,T)&&X(t,e)},Y=k.concat("iframe").join(","),J=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==R.call(e,Y)&&G(t,e)}; /*! * focus-trap 7.5.4 * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE */ function Z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function Q(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Z(Object(n),!0).forEach((function(t){ee(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Z(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ee(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var te=function(e,t){if(e.length>0){var n=e[e.length-1];n!==t&&n.pause()}var a=e.indexOf(t);-1===a||e.splice(a,1),e.push(t)},ne=function(e,t){var n=e.indexOf(t);-1!==n&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()},ae=function(e){return"Tab"===(null==e?void 0:e.key)||9===(null==e?void 0:e.keyCode)},ie=function(e){return ae(e)&&!e.shiftKey},le=function(e){return ae(e)&&e.shiftKey},oe=function(e){return setTimeout(e,0)},se=function(e,t){var n=-1;return e.every((function(e,a){return!t(e)||(n=a,!1)})),n},re=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];return"function"==typeof e?e.apply(void 0,n):e},ce=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},de=[],pe=function(e,t){var n,a=(null==t?void 0:t.document)||document,i=(null==t?void 0:t.trapStack)||de,l=Q({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:ie,isKeyBackward:le},t),o={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},s=function(e,t,n){return e&&void 0!==e[t]?e[t]:l[n||t]},r=function(e,t){var n="function"==typeof(null==t?void 0:t.composedPath)?t.composedPath():void 0;return o.containerGroups.findIndex((function(t){var a=t.container,i=t.tabbableNodes;return a.contains(e)||(null==n?void 0:n.includes(a))||i.find((function(t){return t===e}))}))},c=function(e){var t=l[e];if("function"==typeof t){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];t=t.apply(void 0,i)}if(!0===t&&(t=void 0),!t){if(void 0===t||!1===t)return t;throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}var s=t;if("string"==typeof t&&!(s=a.querySelector(t)))throw new Error("`".concat(e,"` as selector refers to no known node"));return s},d=function(){var e=c("initialFocus");if(!1===e)return!1;if(void 0===e||!J(e,l.tabbableOptions))if(r(a.activeElement)>=0)e=a.activeElement;else{var t=o.tabbableGroups[0];e=t&&t.firstTabbableNode||c("fallbackFocus")}if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");return e},p=function(){if(o.containerGroups=o.containers.map((function(e){var t=function(e,t){var n;return n=(t=t||{}).getShadowRoot?j([e],t.includeContainer,{filter:X.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:U}):A(e,t.includeContainer,X.bind(null,t)),K(n)}(e,l.tabbableOptions),n=function(e,t){return(t=t||{}).getShadowRoot?j([e],t.includeContainer,{filter:G.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):A(e,t.includeContainer,G.bind(null,t))}(e,l.tabbableOptions),a=t.length>0?t[0]:void 0,i=t.length>0?t[t.length-1]:void 0,o=n.find((function(e){return q(e)})),s=n.slice().reverse().find((function(e){return q(e)})),r=!!t.find((function(e){return F(e)>0}));return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:r,firstTabbableNode:a,lastTabbableNode:i,firstDomTabbableNode:o,lastDomTabbableNode:s,nextTabbableNode:function(e){var a=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=t.indexOf(e);return i<0?a?n.slice(n.indexOf(e)+1).find((function(e){return q(e)})):n.slice(0,n.indexOf(e)).reverse().find((function(e){return q(e)})):t[i+(a?1:-1)]}}})),o.tabbableGroups=o.containerGroups.filter((function(e){return e.tabbableNodes.length>0})),o.tabbableGroups.length<=0&&!c("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(o.containerGroups.find((function(e){return e.posTabIndexesFound}))&&o.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},m=function e(t){var n=t.activeElement;if(n)return n.shadowRoot&&null!==n.shadowRoot.activeElement?e(n.shadowRoot):n},u=function e(t){!1!==t&&t!==m(document)&&(t&&t.focus?(t.focus({preventScroll:!!l.preventScroll}),o.mostRecentlyFocusedNode=t,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(t)&&t.select()):e(d()))},f=function(e){var t=c("setReturnFocus",e);return t||!1!==t&&e},g=function(e){var t=e.target,n=e.event,a=e.isBackward,i=void 0!==a&&a;t=t||ce(n),p();var s=null;if(o.tabbableGroups.length>0){var d=r(t,n),m=d>=0?o.containerGroups[d]:void 0;if(d<0)s=i?o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode:o.tabbableGroups[0].firstTabbableNode;else if(i){var u=se(o.tabbableGroups,(function(e){var n=e.firstTabbableNode;return t===n}));if(u<0&&(m.container===t||J(t,l.tabbableOptions)&&!q(t,l.tabbableOptions)&&!m.nextTabbableNode(t,!1))&&(u=d),u>=0){var f=0===u?o.tabbableGroups.length-1:u-1,g=o.tabbableGroups[f];s=F(t)>=0?g.lastTabbableNode:g.lastDomTabbableNode}else ae(n)||(s=m.nextTabbableNode(t,!1))}else{var h=se(o.tabbableGroups,(function(e){var n=e.lastTabbableNode;return t===n}));if(h<0&&(m.container===t||J(t,l.tabbableOptions)&&!q(t,l.tabbableOptions)&&!m.nextTabbableNode(t))&&(h=d),h>=0){var b=h===o.tabbableGroups.length-1?0:h+1,v=o.tabbableGroups[b];s=F(t)>=0?v.firstTabbableNode:v.firstDomTabbableNode}else ae(n)||(s=m.nextTabbableNode(t))}}else s=c("fallbackFocus");return s},h=function(e){var t=ce(e);r(t,e)>=0||(re(l.clickOutsideDeactivates,e)?n.deactivate({returnFocus:l.returnFocusOnDeactivate}):re(l.allowOutsideClick,e)||e.preventDefault())},b=function(e){var t=ce(e),n=r(t,e)>=0;if(n||t instanceof Document)n&&(o.mostRecentlyFocusedNode=t);else{var a;e.stopImmediatePropagation();var i=!0;if(o.mostRecentlyFocusedNode)if(F(o.mostRecentlyFocusedNode)>0){var s=r(o.mostRecentlyFocusedNode),c=o.containerGroups[s].tabbableNodes;if(c.length>0){var p=c.findIndex((function(e){return e===o.mostRecentlyFocusedNode}));p>=0&&(l.isKeyForward(o.recentNavEvent)?p+1<c.length&&(a=c[p+1],i=!1):p-1>=0&&(a=c[p-1],i=!1))}}else o.containerGroups.some((function(e){return e.tabbableNodes.some((function(e){return F(e)>0}))}))||(i=!1);else i=!1;i&&(a=g({target:o.mostRecentlyFocusedNode,isBackward:l.isKeyBackward(o.recentNavEvent)})),u(a||(o.mostRecentlyFocusedNode||d()))}o.recentNavEvent=void 0},v=function(e){if(!(t=e,"Escape"!==(null==t?void 0:t.key)&&"Esc"!==(null==t?void 0:t.key)&&27!==(null==t?void 0:t.keyCode)||!1===re(l.escapeDeactivates,e)))return e.preventDefault(),void n.deactivate();var t;(l.isKeyForward(e)||l.isKeyBackward(e))&&function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];o.recentNavEvent=e;var n=g({event:e,isBackward:t});n&&(ae(e)&&e.preventDefault(),u(n))}(e,l.isKeyBackward(e))},x=function(e){var t=ce(e);r(t,e)>=0||re(l.clickOutsideDeactivates,e)||re(l.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},O=function(){if(o.active)return te(i,n),o.delayInitialFocusTimer=l.delayInitialFocus?oe((function(){u(d())})):u(d()),a.addEventListener("focusin",b,!0),a.addEventListener("mousedown",h,{capture:!0,passive:!1}),a.addEventListener("touchstart",h,{capture:!0,passive:!1}),a.addEventListener("click",x,{capture:!0,passive:!1}),a.addEventListener("keydown",v,{capture:!0,passive:!1}),n},y=function(){if(o.active)return a.removeEventListener("focusin",b,!0),a.removeEventListener("mousedown",h,!0),a.removeEventListener("touchstart",h,!0),a.removeEventListener("click",x,!0),a.removeEventListener("keydown",v,!0),n},E="undefined"!=typeof window&&"MutationObserver"in window?new MutationObserver((function(e){e.some((function(e){return Array.from(e.removedNodes).some((function(e){return e===o.mostRecentlyFocusedNode}))}))&&u(d())})):void 0,N=function(){E&&(E.disconnect(),o.active&&!o.paused&&o.containers.map((function(e){E.observe(e,{subtree:!0,childList:!0})})))};return(n={get active(){return o.active},get paused(){return o.paused},activate:function(e){if(o.active)return this;var t=s(e,"onActivate"),n=s(e,"onPostActivate"),i=s(e,"checkCanFocusTrap");i||p(),o.active=!0,o.paused=!1,o.nodeFocusedBeforeActivation=a.activeElement,null==t||t();var l=function(){i&&p(),O(),N(),null==n||n()};return i?(i(o.containers.concat()).then(l,l),this):(l(),this)},deactivate:function(e){if(!o.active)return this;var t=Q({onDeactivate:l.onDeactivate,onPostDeactivate:l.onPostDeactivate,checkCanReturnFocus:l.checkCanReturnFocus},e);clearTimeout(o.delayInitialFocusTimer),o.delayInitialFocusTimer=void 0,y(),o.active=!1,o.paused=!1,N(),ne(i,n);var a=s(t,"onDeactivate"),r=s(t,"onPostDeactivate"),c=s(t,"checkCanReturnFocus"),d=s(t,"returnFocus","returnFocusOnDeactivate");null==a||a();var p=function(){oe((function(){d&&u(f(o.nodeFocusedBeforeActivation)),null==r||r()}))};return d&&c?(c(f(o.nodeFocusedBeforeActivation)).then(p,p),this):(p(),this)},pause:function(e){if(o.paused||!o.active)return this;var t=s(e,"onPause"),n=s(e,"onPostPause");return o.paused=!0,null==t||t(),y(),N(),null==n||n(),this},unpause:function(e){if(!o.paused||!o.active)return this;var t=s(e,"onUnpause"),n=s(e,"onPostUnpause");return o.paused=!1,null==t||t(),p(),O(),N(),null==n||n(),this},updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return o.containers=t.map((function(e){return"string"==typeof e?a.querySelector(e):e})),o.active&&p(),N(),this}}).updateContainerElements(e),n};const me=t.forwardRef((function(e,n){var{active:a=!0,paused:i=!1,focusTrapOptions:l={},preventScrollOnDeactivate:s=!1}=e,r=o(e,["active","paused","focusTrapOptions","preventScrollOnDeactivate"]);const c=t.useRef(null);t.useImperativeHandle(n,(()=>c.current));const d=t.useRef(null);t.useEffect((()=>{const e=pe(c.current,Object.assign(Object.assign({},l),{returnFocusOnDeactivate:!1}));return d.current=e,()=>{e.deactivate()}}),[]),t.useEffect((()=>{const e=d.current;a?null==e||e.activate():null==e||e.deactivate()}),[a]),t.useEffect((()=>{const e=d.current;i?null==e||e.pause():null==e||e.unpause()}),[i]);const p=t.useRef("undefined"!=typeof document?document.activeElement:null);return function(e){const n=t.useRef(e);n.current=e,t.useEffect((()=>()=>{n.current()}),[])}((()=>{!1!==l.returnFocusOnDeactivate&&p.current instanceof HTMLElement&&p.current.focus({preventScroll:s})})),t.createElement("div",Object.assign({ref:c},r))}));function ue(e){return e[0].toUpperCase()+e.substring(1)}function fe(e="pf"){return`${e}-${(new Date).getTime()+Math.random().toString(36).slice(2)}`}function ge(e,t){let n;return(...a)=>{clearTimeout(n),n=setTimeout((()=>e.apply(this,a)),t)}}function he(e,t,n,a=!1){if(!e||!t)return!1;const i=e.getBoundingClientRect(),l=t.getBoundingClientRect(),o=Math.ceil(i.left),s=Math.floor(i.right),r=Math.ceil(l.left),c=Math.floor(l.right),d=r>=o&&c<=s,p=(n||!a&&i.width<l.width)&&(r<o&&c>o||c>s&&r<s);return d||p}function be(e,t){return e.replace(/\${(.*?)}/g,((e,n)=>t[n]||""))}function ve(e,t,n){return n||(n=`${t}s`),`${e||0} ${1===e?t:n}`}me.displayName="FocusTrap";const xe=(e,t)=>Object.entries(e||{}).reduce(((e,[n,a])=>"default"===n?Object.assign(Object.assign({},e),{[t]:a}):Object.assign(Object.assign({},e),{[`${t}-on-${n}`]:a})),{}),Oe=(e,t,n="",a,i)=>{if(!e)return"";if(a&&!i){if(a in e)return t.modifiers[Ce(`${n}${e[a]}`)];const i=["2xl","xl","lg","md","sm","default"];for(let l=i.indexOf(a);l<i.length;l++)if(i[l]in e)return t.modifiers[Ce(`${n}${e[i[l]]}`)];return""}return Object.entries(e||{}).map((([e,t])=>`${n}${t}${"default"!==e?`-on-${e}`:""}${i&&"default"!==e?"-height":""}`)).map(Ce).map((e=>e.replace(/-?(\dxl)/gi,((e,t)=>`_${t}`)))).map((e=>t.modifiers[e])).filter(Boolean).join(" ")},ye=e=>null===e?null:e>=I["2xl"]?"2xl":e>=I.xl?"xl":e>=I.lg?"lg":e>=I.md?"md":e>=I.sm?"sm":"default",Ee=e=>null===e?null:e>=L["2xl"]?"2xl":e>=L.xl?"xl":e>=L.lg?"lg":e>=L.md?"md":e>=L.sm?"sm":"default",Ne=e=>e.toUpperCase().replace("-","").replace("_",""),Ce=e=>e.replace(/([-_][a-z])/gi,Ne),we=!("undefined"==typeof window||!window.document||!window.document.createElement),Se=(e,t)=>{const n=getComputedStyle(t),a=document.createElement("canvas").getContext("2d");return a.font=n.font||(()=>{let e="";const t={"50%":"ultra-condensed","62.5%":"extra-condensed","75%":"condensed","87.5%":"semi-condensed","100%":"normal","112.5%":"semi-expanded","125%":"expanded","150%":"extra-expanded","200%":"ultra-expanded"};let a;return a=n.fontStretch in t?t[n.fontStretch]:"normal",e=n.fontStyle+" "+n.fontVariant+" "+n.fontWeight+" "+a+" "+n.fontSize+"/"+n.lineHeight+" "+n.fontFamily,e})(),a.measureText(e).width},_e=e=>{const t=getComputedStyle(e);let n=e.clientWidth,a=e.clientHeight;return a-=parseFloat(t.paddingTop)+parseFloat(t.paddingBottom),n-=parseFloat(t.paddingLeft)+parseFloat(t.paddingRight),{height:a,width:n}},Le=(e,t)=>{const n=_e(e).width;let a=t;if(Se(t,e)>n){for(;Se(`...${a}`,e)>n;)a=a.substring(1);e.value?e.value=`...${a}`:e.innerText=`...${a}`}else e.value?e.value=t:e.innerText=t},Ie=e=>{e.forEach((e=>{e.current&&clearTimeout(e.current)}))},ke=(e,t="ltr")=>{if(!e)return t;const n=getComputedStyle(e).getPropertyValue("direction");return["ltr","rtl"].includes(n)?n:t};let Te=0;class De extends i.Component{constructor(){super(...arguments),this.uniqueElement=this.props.isRandom?"undefined"!=typeof crypto&&crypto.randomUUID?crypto.randomUUID():fe():Te++,this.id=`${this.props.prefix}${this.uniqueElement}`}render(){return this.props.children(this.id)}}De.displayName="GenerateId",De.defaultProps={prefix:"pf-random-id-",isRandom:!1};let Re=0;const Me="OUIA-Generated-",Pe={};function Ae(e,t,n=!0){return{"data-ouia-component-type":`PF5/${e}`,"data-ouia-safe":n,"data-ouia-component-id":t}}const je=(e,t,n=!0,a)=>({"data-ouia-component-type":`PF5/${e}`,"data-ouia-safe":n,"data-ouia-component-id":Be(e,t,a)}),Be=(e,n,a)=>{const i=t.useMemo((()=>Fe(e,a)),[e,a]);return null!=n?n:i};function Fe(e,t){try{let n;return n="undefined"!=typeof window?`${window.location.href}-${e}-${t||""}`:`${e}-${t||""}`,Pe[n]||(Pe[n]=0),`${Me}${e}-${t?`${t}-`:""}${++Pe[n]}`}catch(n){return`${Me}${e}-${t?`${t}-`:""}${++Re}`}}function ze(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left,x:t.left,y:t.top}}function Ve(e){if("[object Window]"!==e.toString()){const t=e.ownerDocument;return t?t.defaultView:window}return e}function $e(e){const t=Ve(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function He(e){return e instanceof Ve(e).Element||e instanceof Element}function We(e){return e instanceof Ve(e).HTMLElement||e instanceof HTMLElement}function Ge(e){return e?(e.nodeName||"").toLowerCase():null}function Xe(e){return(He(e)?e.ownerDocument:e.document).documentElement}function Ue(e){return ze(Xe(e)).left+$e(e).scrollLeft}function Ke(e){return Ve(e).getComputedStyle(e)}function qe(e){const{overflow:t,overflowX:n,overflowY:a}=Ke(e);return/auto|scroll|overlay|hidden/.test(t+a+n)}function Ye(e,t,n=!1){const a=Xe(t),i=ze(e),l=We(t);let o={scrollLeft:0,scrollTop:0},s={x:0,y:0};var r,c;return(l||!l&&!n)&&(("body"!==Ge(t)||qe(a))&&(o=(r=t)!==Ve(r)&&We(r)?{scrollLeft:(c=r).scrollLeft,scrollTop:c.scrollTop}:$e(r)),We(t)?(s=ze(t),s.x+=t.clientLeft,s.y+=t.clientTop):a&&(s.x=Ue(a))),{x:i.left+o.scrollLeft-s.x,y:i.top+o.scrollTop-s.y,width:i.width,height:i.height}}function Je(e){return{x:e.offsetLeft,y:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}}function Ze(e){return"html"===Ge(e)?e:e.assignedSlot||e.parentNode||e.host||Xe(e)}function Qe(e){return["html","body","#document"].indexOf(Ge(e))>=0?e.ownerDocument.body:We(e)&&qe(e)?e:Qe(Ze(e))}function et(e,t=[]){const n=Qe(e),a="body"===Ge(n),i=Ve(n),l=a?[i].concat(i.visualViewport||[],qe(n)?n:[]):n,o=t.concat(l);return a?o:o.concat(et(Ze(l)))}function tt(e){return["table","td","th"].indexOf(Ge(e))>=0}function nt(e){if(!We(e)||"fixed"===Ke(e).position)return null;const t=e.offsetParent;if(t){const e=Xe(t);if("body"===Ge(t)&&"static"===Ke(t).position&&"static"!==Ke(e).position)return e}return t}function at(e){const t=Ve(e);let n=nt(e);for(;n&&tt(n)&&"static"===Ke(n).position;)n=nt(n);return n&&"body"===Ge(n)&&"static"===Ke(n).position?t:n||function(e){let t=Ze(e);for(;We(t)&&["html","body"].indexOf(Ge(t))<0;){const e=Ke(t);if("none"!==e.transform||"none"!==e.perspective||e.willChange&&"auto"!==e.willChange)return t;t=t.parentNode}return null}(e)||t}const it="top",lt="bottom",ot="right",st="left",rt="auto",ct=[it,lt,ot,st],dt="start",pt="end",mt="clippingParents",ut="viewport",ft="popper",gt="reference",ht=ct.reduce(((e,t)=>e.concat([`${t}-${dt}`,`${t}-${pt}`])),[]),bt=[...ct,rt].reduce(((e,t)=>e.concat([t,`${t}-${dt}`,`${t}-${pt}`])),[]),vt=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function xt(e){const t=new Map,n=new Set,a=[];function i(e){n.add(e.name);[...e.requires||[],...e.requiresIfExists||[]].forEach((e=>{if(!n.has(e)){const n=t.get(e);n&&i(n)}})),a.push(e)}return e.forEach((e=>{t.set(e.name,e)})),e.forEach((e=>{n.has(e.name)||i(e)})),a}function Ot(e){let t;return()=>(t||(t=new Promise((n=>{Promise.resolve().then((()=>{t=void 0,n(e())}))}))),t)}function yt(e){return e.split("-")[0]}function Et(e,t){const n=Boolean(t.getRootNode&&t.getRootNode().host);if(e.contains(t))return!0;if(n){let n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Nt(e){return Object.assign(Object.assign({},e),{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Ct(e,t){return t===ut?Nt(function(e){const t=Ve(e),n=Xe(e),a=t.visualViewport;let i=n.clientWidth,l=n.clientHeight,o=0,s=0;return a&&(i=a.width,l=a.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(o=a.offsetLeft,s=a.offsetTop)),{width:i,height:l,x:o+Ue(e),y:s}}(e)):We(t)?function(e){const t=ze(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):Nt(function(e){const t=Xe(e),n=$e(e),a=e.ownerDocument.body,i=Math.max(t.scrollWidth,t.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),l=Math.max(t.scrollHeight,t.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0);let o=-n.scrollLeft+Ue(e);const s=-n.scrollTop;return"rtl"===Ke(a||t).direction&&(o+=Math.max(t.clientWidth,a?a.clientWidth:0)-i),{width:i,height:l,x:o,y:s}}(Xe(e)))}function wt(e,t,n){const a="clippingParents"===t?function(e){const t=et(Ze(e)),n=["absolute","fixed"].indexOf(Ke(e).position)>=0&&We(e)?at(e):e;return He(n)?t.filter((e=>He(e)&&Et(e,n)&&"body"!==Ge(e))):[]}(e):[].concat(t),i=[...a,n],l=i[0],o=i.reduce(((t,n)=>{const a=Ct(e,n);return t.top=Math.max(a.top,t.top),t.right=Math.min(a.right,t.right),t.bottom=Math.min(a.bottom,t.bottom),t.left=Math.max(a.left,t.left),t}),Ct(e,l));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function St(e){return e.split("-")[1]}function _t(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Lt({reference:e,element:t,placement:n}){const a=n?yt(n):null,i=n?St(n):null,l=e.x+e.width/2-t.width/2,o=e.y+e.height/2-t.height/2;let s;switch(a){case it:s={x:l,y:e.y-t.height};break;case lt:s={x:l,y:e.y+e.height};break;case ot:s={x:e.x+e.width,y:o};break;case st:s={x:e.x-t.width,y:o};break;default:s={x:e.x,y:e.y}}const r=a?_t(a):null;if(null!=r){const n="y"===r?"height":"width";switch(i){case dt:s[r]=Math.floor(s[r])-Math.floor(e[n]/2-t[n]/2);break;case pt:s[r]=Math.floor(s[r])+Math.ceil(e[n]/2-t[n]/2)}}return s}function It(e){return Object.assign(Object.assign({},{top:0,right:0,bottom:0,left:0}),e)}function kt(e,t){return t.reduce(((t,n)=>(t[n]=e,t)),{})}function Tt(e,t={}){const{placement:n=e.placement,boundary:a=mt,rootBoundary:i=ut,elementContext:l=ft,altBoundary:o=!1,padding:s=0}=t,r=It("number"!=typeof s?s:kt(s,ct)),c=l===ft?gt:ft,d=e.elements.reference,p=e.rects.popper,m=e.elements[o?c:l],u=wt(He(m)?m:m.contextElement||Xe(e.elements.popper),a,i),f=ze(d),g=Lt({reference:f,element:p,strategy:"absolute",placement:n}),h=Nt(Object.assign(Object.assign({},p),g)),b=l===ft?h:f,v={top:u.top-b.top+r.top,bottom:b.bottom-u.bottom+r.bottom,left:u.left-b.left+r.left,right:b.right-u.right+r.right},x=e.modifiersData.offset;if(l===ft&&x){const e=x[n];Object.keys(v).forEach((t=>{const n=[ot,lt].indexOf(t)>=0?1:-1,a=[it,lt].indexOf(t)>=0?"y":"x";v[t]+=e[a]*n}))}return v}const Dt={placement:"bottom",modifiers:[],strategy:"absolute"};function Rt(...e){return!e.some((e=>!(e&&"function"==typeof e.getBoundingClientRect)))}const Mt={passive:!0};const Pt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function At({popper:e,popperRect:t,placement:n,offsets:a,position:i,gpuAcceleration:l,adaptive:o}){let{x:s,y:r}=function({x:e,y:t}){const n=window.devicePixelRatio||1;return{x:Math.round(e*n)/n||0,y:Math.round(t*n)/n||0}}(a);const c=a.hasOwnProperty("x"),d=a.hasOwnProperty("y");let p=st,m=it;const u=window;if(o){let a=at(e);a===Ve(e)&&(a=Xe(e)),n===it&&(m=lt,r-=a.clientHeight-t.height,r*=l?1:-1),n===st&&(p=ot,s-=a.clientWidth-t.width,s*=l?1:-1)}const f=Object.assign({position:i},o&&Pt);return l?Object.assign(Object.assign({},f),{[m]:d?"0":"",[p]:c?"0":"",transform:(u.devicePixelRatio||1)<2?`translate(${s}px, ${r}px)`:`translate3d(${s}px, ${r}px, 0)`}):Object.assign(Object.assign({},f),{[m]:d?`${r}px`:"",[p]:c?`${s}px`:"",transform:""})}var jt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function({state:e,options:t,name:n}){const{offset:a=[0,0]}=t,i=bt.reduce(((t,n)=>(t[n]=function(e,t,n){const a=yt(e),i=[st,it].indexOf(a)>=0?-1:1;let[l,o]="function"==typeof n?n(Object.assign(Object.assign({},t),{placement:e})):n;return l=l||0,o=(o||0)*i,[st,ot].indexOf(a)>=0?{x:o,y:l}:{x:l,y:o}}(n,e.rects,a),t)),{}),{x:l,y:o}=i[e.placement];null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=o),e.modifiersData[n]=i}};const Bt={left:"right",right:"left",bottom:"top",top:"bottom"};function Ft(e){return e.replace(/left|right|bottom|top/g,(e=>Bt[e]))}const zt={start:"end",end:"start"};function Vt(e){return e.replace(/start|end/g,(e=>zt[e]))}function $t(e,t={}){const{placement:n,boundary:a,rootBoundary:i,padding:l,flipVariations:o,allowedAutoPlacements:s=bt}=t,r=St(n),c=r?o?ht:ht.filter((e=>St(e)===r)):ct;let d=c.filter((e=>s.indexOf(e)>=0));0===d.length&&(d=c);const p=d.reduce(((t,n)=>(t[n]=Tt(e,{placement:n,boundary:a,rootBoundary:i,padding:l})[yt(n)],t)),{});return Object.keys(p).sort(((e,t)=>p[e]-p[t]))}var Ht={name:"flip",enabled:!0,phase:"main",fn:function({state:e,options:t,name:n}){if(e.modifiersData[n]._skip)return;const{mainAxis:a=!0,altAxis:i=!0,fallbackPlacements:l,padding:o,boundary:s,rootBoundary:r,altBoundary:c,flipVariations:d=!0,allowedAutoPlacements:p}=t,m=e.options.placement,u=yt(m),f=[m,...l||(u===m||!d?[Ft(m)]:function(e){if(yt(e)===rt)return[];const t=Ft(e);return[Vt(e),t,Vt(t)]}(m))].reduce(((t,n)=>t.concat(yt(n)===rt?$t(e,{placement:n,boundary:s,rootBoundary:r,padding:o,flipVariations:d,allowedAutoPlacements:p}):n)),[]),g=e.rects.reference,h=e.rects.popper,b=new Map;let v=!0,x=f[0];for(let t=0;t<f.length;t++){const n=f[t],l=yt(n),d=St(n)===dt,p=[it,lt].indexOf(l)>=0,m=p?"width":"height",u=Tt(e,{placement:n,boundary:s,rootBoundary:r,altBoundary:c,padding:o});let O=p?d?ot:st:d?lt:it;g[m]>h[m]&&(O=Ft(O));const y=Ft(O),E=[];if(a&&E.push(u[l]<=0),i&&E.push(u[O]<=0,u[y]<=0),E.every((e=>e))){x=n,v=!1;break}b.set(n,E)}if(v){for(let e=d?3:1;e>0;e--){const t=f.find((t=>{const n=b.get(t);if(n)return n.slice(0,e).every((e=>e))}));if(t){x=t;break}}}e.placement!==x&&(e.modifiersData[n]._skip=!0,e.placement=x,e.reset=!0)},requiresIfExists:["offset"],data:{_skip:!1}};function Wt(e,t,n){return Math.max(e,Math.min(t,n))}var Gt={name:"preventOverflow",enabled:!0,phase:"main",fn:function({state:e,options:t,name:n}){const{mainAxis:a=!0,altAxis:i=!1,boundary:l,rootBoundary:o,altBoundary:s,padding:r,tether:c=!0,tetherOffset:d=0}=t,p=Tt(e,{boundary:l,rootBoundary:o,padding:r,altBoundary:s}),m=yt(e.placement),u=St(e.placement),f=!u,g=_t(m),h="x"===g?"y":"x",b=e.modifiersData.popperOffsets,v=e.rects.reference,x=e.rects.popper,O="function"==typeof d?d(Object.assign(Object.assign({},e.rects),{placement:e.placement})):d,y={x:0,y:0};if(b){if(a){const t="y"===g?it:st,n="y"===g?lt:ot,a="y"===g?"height":"width",i=b[g],l=b[g]+p[t],o=b[g]-p[n],s=c?-x[a]/2:0,r=u===dt?v[a]:x[a],d=u===dt?-x[a]:-v[a],m=e.elements.arrow,h=c&&m?Je(m):{width:0,height:0},E=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},N=E[t],C=E[n],w=Wt(0,v[a],h[a]),S=f?v[a]/2-s-w-N-O:r-w-N-O,_=f?-v[a]/2+s+w+C+O:d+w+C+O,L=e.elements.arrow&&at(e.elements.arrow),I=L?"y"===g?L.clientTop||0:L.clientLeft||0:0,k=e.modifiersData.offset?e.modifiersData.offset[e.placement][g]:0,T=b[g]+S-k-I,D=b[g]+_-k,R=Wt(c?Math.min(l,T):l,i,c?Math.max(o,D):o);b[g]=R,y[g]=R-i}if(i){const e="x"===g?it:st,t="x"===g?lt:ot,n=b[h],a=Wt(n+p[e],n,n-p[t]);b[h]=a,y[h]=a-n}e.modifiersData[n]=y}},requiresIfExists:["offset"]};var Xt={name:"arrow",enabled:!0,phase:"main",fn:function({state:e,name:t}){const n=e.elements.arrow,a=e.modifiersData.popperOffsets,i=yt(e.placement),l=_t(i),o=[st,ot].indexOf(i)>=0?"height":"width";if(!n||!a)return;const s=e.modifiersData[`${t}#persistent`].padding,r=Je(n),c="y"===l?it:st,d="y"===l?lt:ot,p=e.rects.reference[o]+e.rects.reference[l]-a[l]-e.rects.popper[o],m=a[l]-e.rects.reference[l],u=at(n),f=u?"y"===l?u.clientHeight||0:u.clientWidth||0:0,g=p/2-m/2,h=s[c],b=f-r[o]-s[d],v=f/2-r[o]/2+g,x=Wt(h,v,b),O=l;e.modifiersData[t]={[O]:x,centerOffset:x-v}},effect:function({state:e,options:t,name:n}){let{element:a="[data-popper-arrow]",padding:i=0}=t;null!=a&&("string"!=typeof a||(a=e.elements.popper.querySelector(a),a))&&Et(e.elements.popper,a)&&(e.elements.arrow=a,e.modifiersData[`${n}#persistent`]={padding:It("number"!=typeof i?i:kt(i,ct))})},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ut(e,t,n={x:0,y:0}){return{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Kt(e){return[it,ot,lt,st].some((t=>e[t]>=0))}const qt=function(e={}){const{defaultModifiers:t=[],defaultOptions:n=Dt}=e;return function(e,a,i=n){let l={placement:"bottom",orderedModifiers:[],options:Object.assign(Object.assign({},Dt),n),modifiersData:{},elements:{reference:e,popper:a},attributes:{},styles:{}},o=[],s=!1;const r={state:l,setOptions(i){c(),l.options=Object.assign(Object.assign(Object.assign({},n),l.options),i),l.scrollParents={reference:He(e)?et(e):e.contextElement?et(e.contextElement):[],popper:et(a)};const s=function(e){const t=xt(e);return vt.reduce(((e,n)=>e.concat(t.filter((e=>e.phase===n)))),[])}(function(e){const t=e.reduce(((e,t)=>{const n=e[t.name];return e[t.name]=n?Object.assign(Object.assign(Object.assign({},n),t),{options:Object.assign(Object.assign({},n.options),t.options),data:Object.assign(Object.assign({},n.data),t.data)}):t,e}),{});return Object.keys(t).map((e=>t[e]))}([...t,...l.options.modifiers]));return l.orderedModifiers=s.filter((e=>e.enabled)),l.orderedModifiers.forEach((({name:e,options:t={},effect:n})=>{if("function"==typeof n){const a=n({state:l,name:e,instance:r,options:t}),i=()=>{};o.push(a||i)}})),r.update()},forceUpdate(){if(s)return;const{reference:e,popper:t}=l.elements;if(Rt(e,t)){l.rects={reference:Ye(e,at(t),"fixed"===l.options.strategy),popper:Je(t)},l.reset=!1,l.placement=l.options.placement,l.orderedModifiers.forEach((e=>l.modifiersData[e.name]=Object.assign({},e.data)));for(let e=0;e<l.orderedModifiers.length;e++){if(!0===l.reset){l.reset=!1,e=-1;continue}const{fn:t,options:n={},name:a}=l.orderedModifiers[e];"function"==typeof t&&(l=t({state:l,options:n,name:a,instance:r})||l)}}},update:Ot((()=>new Promise((e=>{r.forceUpdate(),e(l)})))),destroy(){c(),s=!0}};if(!Rt(e,a))return r;function c(){o.forEach((e=>e())),o=[]}return r.setOptions(i).then((e=>{!s&&i.onFirstUpdate&&i.onFirstUpdate(e)})),r}}({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:()=>{},effect:function({state:e,instance:t,options:n}){const{scroll:a=!0,resize:i=!0}=n,l=Ve(e.elements.popper),o=[...e.scrollParents.reference,...e.scrollParents.popper];return a&&o.forEach((e=>{e.addEventListener("scroll",t.update,Mt)})),i&&l.addEventListener("resize",t.update,Mt),()=>{a&&o.forEach((e=>{e.removeEventListener("scroll",t.update,Mt)})),i&&l.removeEventListener("resize",t.update,Mt)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function({state:e,name:t}){e.modifiersData[t]=Lt({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function({state:e,options:t}){const{gpuAcceleration:n=!0,adaptive:a=!0}=t,i={placement:yt(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:n};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign(Object.assign({},e.styles.popper),At(Object.assign(Object.assign({},i),{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign(Object.assign({},e.styles.arrow),At(Object.assign(Object.assign({},i),{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1})))),e.attributes.popper=Object.assign(Object.assign({},e.attributes.popper),{"data-popper-placement":e.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function({state:e}){Object.keys(e.elements).forEach((t=>{const n=e.styles[t]||{},a=e.attributes[t]||{},i=e.elements[t];We(i)&&Ge(i)&&(Object.assign(i.style,n),Object.keys(a).forEach((e=>{const t=a[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)})))}))},effect:function({state:e}){const t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),()=>{Object.keys(e.elements).forEach((n=>{const a=e.elements[n],i=e.attributes[n]||{},l=Object.keys(e.styles.hasOwnProperty(n)?e.styles[n]:t[n]).reduce(((e,t)=>(e[t]="",e)),{});We(a)&&Ge(a)&&(Object.assign(a.style,l),Object.keys(i).forEach((e=>{a.removeAttribute(e)})))}))}},requires:["computeStyles"]},jt,Ht,Gt,Xt,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function({state:e,name:t}){const n=e.rects.reference,a=e.rects.popper,i=e.modifiersData.preventOverflow,l=Tt(e,{elementContext:"reference"}),o=Tt(e,{altBoundary:!0}),s=Ut(l,n),r=Ut(o,a,i),c=Kt(s),d=Kt(r);e.modifiersData[t]={referenceClippingOffsets:s,popperEscapeOffsets:r,isReferenceHidden:c,hasPopperEscaped:d},e.attributes.popper=Object.assign(Object.assign({},e.attributes.popper),{"data-popper-reference-hidden":c,"data-popper-escaped":d})}}]}),Yt=we?i.useLayoutEffect:i.useEffect,Jt=e=>e.reduce(((e,[t,n])=>(e[t]=n,e)),{}),Zt=[],Qt=(e,t,n={})=>{const a=i.useRef(null),l={onFirstUpdate:n.onFirstUpdate,placement:n.placement||"bottom",strategy:n.strategy||"absolute",modifiers:n.modifiers||Zt},[o,s]=i.useState({styles:{popper:{position:l.strategy,left:"0",top:"0"}},attributes:{}}),r=i.useMemo((()=>({name:"updateState",enabled:!0,phase:"write",fn:({state:e})=>{const t=Object.keys(e.elements);s({styles:Jt(t.map((t=>[t,e.styles[t]||{}]))),attributes:Jt(t.map((t=>[t,e.attributes[t]])))})},requires:["computeStyles"]})),[]),c=i.useMemo((()=>{const e={onFirstUpdate:l.onFirstUpdate,placement:l.placement,strategy:l.strategy,modifiers:[...l.modifiers,r,{name:"applyStyles",enabled:!1}]};return t=a.current,n=e,JSON.stringify(t)===JSON.stringify(n)?a.current||e:(a.current=e,e);var t,n}),[l.onFirstUpdate,l.placement,l.strategy,l.modifiers,r]),d=i.useRef();return Yt((()=>{d&&d.current&&d.current.setOptions(c)}),[c]),Yt((()=>{if(null==e||null==t)return;const a=(n.createPopper||qt)(e,t,c);return d.current=a,()=>{a.destroy(),d.current=null}}),[e,t,n.createPopper]),{state:d.current?d.current.state:null,styles:o.styles,attributes:o.attributes,update:d.current?d.current.update:null,forceUpdate:d.current?d.current.forceUpdate:null}},en={left:"right",right:"left",bottom:"top",top:"bottom","top-start":"bottom-end","top-end":"bottom-start","bottom-start":"top-end","bottom-end":"top-start","left-start":"right-end","left-end":"right-start","right-start":"left-end","right-end":"left-start"},tn=e=>`opacity ${e}ms cubic-bezier(.54, 1.5, .38, 1.11)`,nn=({trigger:e,popper:t,direction:n="down",position:a="start",placement:o,width:s,minWidth:c="trigger",maxWidth:d,appendTo:p="inline",zIndex:m=9999,isVisible:u=!0,positionModifiers:f,distance:g=0,onMouseEnter:h,onMouseLeave:b,onFocus:v,onBlur:x,onDocumentClick:O,onTriggerClick:y,onTriggerEnter:E,onPopperClick:N,onPopperMouseEnter:C,onPopperMouseLeave:w,onDocumentKeyDown:S,enableFlip:_=!0,flipBehavior:L="flip",triggerRef:I,popperRef:k,animationDuration:T=0,entryDelay:D=0,exitDelay:R=0,onHidden:M=(()=>{}),onHide:P=(()=>{}),onMount:A=(()=>{}),onShow:j=(()=>{}),onShown:B=(()=>{}),preventOverflow:F=!1})=>{var z;const[V,$]=i.useState(null),[H,W]=i.useState(null),[G,X]=i.useState(null),[U,K]=i.useState(null),[q,Y]=i.useState(!1),[J,Z]=i.useState(0),[Q,ee]=i.useState(u),te=i.useRef(null),ne=i.useRef(null),ae=i.useRef(null),ie=i.useRef(),le=H||V,oe=u||Q,se=null===(z=(null==I?void 0:I.current)||V)||void 0===z?void 0:z.parentElement,re=ke(se),ce=i.useMemo((()=>{const e={left:"left",right:"right",center:"center"};return{ltr:Object.assign({start:"left",end:"right"},e),rtl:Object.assign({start:"right",end:"left"},e)}[re][a]}),[a,re]),de=i.useCallback((e=>O(e,le,G)),[oe,V,H,G,O]);i.useEffect((()=>{Y(!0),A()}),[]),i.useEffect((()=>()=>{Ie([te,ae,ne])}),[]),i.useEffect((()=>{I&&(I.current?W(I.current):"function"==typeof I&&W(I()))}),[I,e]),i.useEffect((()=>{k&&(k.current?X(k.current):"function"==typeof k&&X(k()))}),[oe,k]),i.useEffect((()=>{const e=new MutationObserver((()=>{xe&&xe()}));return G&&e.observe(G,{attributes:!0,childList:!0,subtree:!0}),()=>{e.disconnect()}}),[G]);const pe=(e,t,n,a=!1)=>{e&&t&&t.addEventListener(n,e,{capture:a})},me=(e,t,n,a=!1)=>{e&&t&&t.removeEventListener(n,e,{capture:a})};i.useEffect((()=>(pe(h,le,"mouseenter"),pe(b,le,"mouseleave"),pe(v,le,"focus"),pe(x,le,"blur"),pe(y,le,"click"),pe(E,le,"keydown"),pe(N,G,"click"),pe(C,G,"mouseenter"),pe(w,G,"mouseleave"),O&&pe(de,document,"click",!0),pe(S,document,"keydown",!0),()=>{me(h,le,"mouseenter"),me(b,le,"mouseleave"),me(v,le,"focus"),me(x,le,"blur"),me(y,le,"click"),me(E,le,"keydown"),me(N,G,"click"),me(C,G,"mouseenter"),me(w,G,"mouseleave"),O&&me(de,document,"click",!0),me(S,document,"keydown",!0)})),[V,G,h,b,v,x,y,E,N,C,w,O,S,H]);const ue=()=>{if(o)return o;let e="up"===n?"top":"bottom";return"center"!==ce&&(e=`${e}-${"right"===ce?"end":"start"}`),e},fe=i.useMemo(ue,[n,ce,o]),ge=i.useMemo((()=>(e=>e.replace(/left|right|bottom|top|top-start|top-end|bottom-start|bottom-end|right-start|right-end|left-start|left-end/g,(e=>en[e])))(ue())),[n,ce,o]),he=i.useMemo((()=>({name:"widthMods",enabled:void 0!==s||void 0!==c||void 0!==d,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{const t=e.rects.reference.width;s&&(e.styles.popper.width="trigger"===s?`${t}px`:s),c&&(e.styles.popper.minWidth="trigger"===c?`${t}px`:c),d&&(e.styles.popper.maxWidth="trigger"===d?`${t}px`:d)},effect:({state:e})=>{const t=e.elements.reference.offsetWidth;return s&&(e.elements.popper.style.width="trigger"===s?`${t}px`:s),c&&(e.elements.popper.style.minWidth="trigger"===c?`${t}px`:c),d&&(e.elements.popper.style.maxWidth="trigger"===d?`${t}px`:d),()=>{}}})),[s,c,d]),{styles:be,attributes:ve,update:xe,forceUpdate:Oe}=Qt(le,G,{placement:fe,modifiers:[{name:"offset",options:{offset:[0,g]}},{name:"preventOverflow",enabled:F},{name:"hide",enabled:!0},{name:"flip",enabled:fe.startsWith("auto")||_,options:{fallbackPlacements:"flip"===L?[ge]:L}},he]});i.useEffect((()=>{var e,n,a,i,l,o,s;const r=(null===(i=null===(a=null===(n=null===(e=null==t?void 0:t.props)||void 0===e?void 0:e.children)||void 0===n?void 0:n[1])||void 0===a?void 0:a.props)||void 0===i?void 0:i.children)||(null===(s=null===(o=null===(l=null==t?void 0:t.props)||void 0===l?void 0:l.children)||void 0===o?void 0:o.props)||void 0===s?void 0:s.children);K(r),r&&U&&r!==U&&Oe&&Oe()}),[t]),i.useEffect((()=>{ie.current<R&&(Ie([te,ae]),ae.current=setTimeout((()=>{te.current=setTimeout((()=>{ee(!1)}),T)}),R)),ie.current=R}),[R]);i.useEffect((()=>{u?(j(),Ie([te,ae]),ne.current=setTimeout((()=>{ee(!0),Z(1),B()}),D)):(P(),Ie([ne]),ae.current=setTimeout((()=>{Z(0),te.current=setTimeout((()=>{ee(!1),M()}),T)}),R))}),[u]);const ye=Object.assign({className:r(t.props&&t.props.className,f&&(()=>{if(ve&&ve.popper&&ve.popper["data-popper-placement"]){const e=ve.popper["data-popper-placement"];return f[e]}return f.top})()),style:Object.assign(Object.assign(Object.assign({},t.props&&t.props.style||{}),be.popper),{zIndex:m,opacity:J,transition:tn(T)})},ve.popper),Ee=()=>{const e=i.cloneElement(t,ye);return k?e:i.createElement("div",{style:{display:"contents"},ref:e=>X(null==e?void 0:e.firstElementChild)},e)};return i.createElement(i.Fragment,null,!I&&e&&i.isValidElement(e)&&i.createElement("div",{style:{display:"contents"},ref:e=>$(null==e?void 0:e.firstElementChild)},e),I&&e&&i.isValidElement(e)&&e,q&&oe&&(()=>{if("inline"===p)return Ee();{const e="function"==typeof p?p():p;return l.createPortal(Ee(),e)}})())};nn.displayName="Popper";const an=(e,t,n=(e=>document.activeElement.contains(e)),a=(e=>e),i=["A","BUTTON","INPUT"],l=!1,o=!1,s=!0,r=!0)=>{const c=document.activeElement,d=e.key;let p=null;if(!l&&["ArrowUp","ArrowDown"].includes(d)){e.preventDefault(),e.stopImmediatePropagation();let i=-1;t.forEach(((e,l)=>{if(n(e)){let e=0;for(;!p&&e<t.length&&-1*e<t.length;)"ArrowUp"===d?e--:e++,i=l+e,i>=t.length&&(i=0),i<0&&(i=t.length-1),p=a(t[i])}}))}if(!o&&["ArrowLeft","ArrowRight"].includes(d)){e.preventDefault(),e.stopImmediatePropagation();let a=-1;t.forEach(((l,o)=>{if(n(l)){const n=t[o].querySelectorAll(i.join(","));if(!n.length||r){let e=c;for(;e;)if(e="ArrowLeft"===d?e.previousElementSibling:e.nextElementSibling,e&&i.includes(e.tagName)){p=e;break}}else n.forEach(((t,i)=>{if(e.target===t){a=i+("ArrowLeft"===d?-1:1),a>=n.length&&(a=0),a<0&&(a=n.length-1),p=n[a]}}))}}))}p&&(s&&(c.tabIndex=-1,p.tabIndex=0),p.focus())};class ln extends i.Component{constructor(){super(...arguments),this.keyHandler=e=>{const{isEventFromContainer:t}=this.props;if(t?!t(e):!this._isEventFromContainer(e))return;const{isActiveElement:n,getFocusableElement:a,noVerticalArrowHandling:i,noHorizontalArrowHandling:l,noEnterHandling:o,noSpaceHandling:s,updateTabIndex:r,validSiblingTags:c,additionalKeyHandler:d,createNavigableElements:p,onlyTraverseSiblings:m}=this.props;d&&d(e);const u=p();if(!u)return void console.warn("No navigable elements have been passed to the KeyboardHandler. Keyboard navigation provided by this component will be ignored.");const f=e.key;o||"Enter"===f&&(e.preventDefault(),e.stopImmediatePropagation(),document.activeElement.click()),s||" "===f&&(e.preventDefault(),e.stopImmediatePropagation(),document.activeElement.click()),an(e,u,n,a,c,i,l,r,m)},this._isEventFromContainer=e=>{const{containerRef:t}=this.props;return t.current&&t.current.contains(e.target)}}componentDidMount(){we&&window.addEventListener("keydown",this.keyHandler)}componentWillUnmount(){we&&window.removeEventListener("keydown",this.keyHandler)}render(){return null}}ln.displayName="KeyboardHandler",ln.defaultProps={containerRef:null,createNavigableElements:()=>null,isActiveElement:e=>document.activeElement===e,getFocusableElement:e=>e,validSiblingTags:["BUTTON","A"],onlyTraverseSiblings:!0,updateTabIndex:!0,noHorizontalArrowHandling:!1,noVerticalArrowHandling:!1,noEnterHandling:!1,noSpaceHandling:!1};const on=(e,t,n)=>{let a;if(we){const{ResizeObserver:i}=window;if(e&&i){const l=new i((e=>{n?window.requestAnimationFrame((()=>{Array.isArray(e)&&e.length>0&&t()})):Array.isArray(e)&&e.length>0&&t()}));l.observe(e),a=()=>l.unobserve(e)}else window.addEventListener("resize",t),a=()=>window.removeEventListener("resize",t)}return()=>{a&&a()}};const sn=e=>Boolean(e&&!isNaN(e));var rn,cn;e.TitleSizes=void 0,(rn=e.TitleSizes||(e.TitleSizes={})).md="md",rn.lg="lg",rn.xl="xl",rn["2xl"]="2xl",rn["3xl"]="3xl",rn["4xl"]="4xl",function(e){e.h1="2xl",e.h2="xl",e.h3="lg",e.h4="md",e.h5="md",e.h6="md"}(cn||(cn={}));const dn=e=>{var{className:t="",children:n="",headingLevel:a,size:l=cn[a],ouiaId:s,ouiaSafe:c=!0}=e,d=o(e,["className","children","headingLevel","size","ouiaId","ouiaSafe"]);const p=je(dn.displayName,s,c);return i.createElement(a,Object.assign({},p,d,{clas