UNPKG

@patternfly/react-core

Version:

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

11 lines • 585 kB
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["exports","react","react-dom"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).PatternFlyReact={},e.React,e.ReactDOM)}(this,(function(e,n,t){"use strict";function a(e){var n=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,a.get?a:{enumerable:!0,get:function(){return e[t]}})}})),n.default=e,Object.freeze(n)}var i=a(t);function s(e,n){var t={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&n.indexOf(a)<0&&(t[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(a=Object.getOwnPropertySymbols(e);i<a.length;i++)n.indexOf(a[i])<0&&Object.prototype.propertyIsEnumerable.call(e,a[i])&&(t[a[i]]=e[a[i]])}return t}function l(e,n,t,a){return new(t||(t=Promise))((function(i,s){function l(e){try{r(a.next(e))}catch(e){s(e)}}function o(e){try{r(a.throw(e))}catch(e){s(e)}}function r(e){var n;e.done?i(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(l,o)}r((a=a.apply(e,n||[])).next())}))}function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}"function"==typeof SuppressedError&&SuppressedError;var r={exports:{}},c={},d=n,p=Symbol.for("react.element"),m=Symbol.for("react.fragment"),f=Object.prototype.hasOwnProperty,u=d.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,g={key:!0,ref:!0,__self:!0,__source:!0};function h(e,n,t){var a,i={},s=null,l=null;for(a in void 0!==t&&(s=""+t),void 0!==n.key&&(s=""+n.key),void 0!==n.ref&&(l=n.ref),n)f.call(n,a)&&!g.hasOwnProperty(a)&&(i[a]=n[a]);if(e&&e.defaultProps)for(a in n=e.defaultProps)void 0===i[a]&&(i[a]=n[a]);return{$$typeof:p,type:e,key:s,ref:l,props:i,_owner:u.current}}c.Fragment=m,c.jsx=h,c.jsxs=h,r.exports=c;var x=r.exports;function v(...e){const n=[],t={}.hasOwnProperty;return e.filter(Boolean).forEach((e=>{const a=typeof e;if("string"===a||"number"===a)n.push(e);else if(Array.isArray(e)&&e.length){const t=v(...e);t&&n.push(t)}else if("object"===a)for(const a in e)t.call(e,a)&&e[a]&&n.push(a)})),n.join(" ")}const b="--pf-v6-c-about-modal-box--BackgroundImage";var y="pf-v6-c-about-modal-box",O="pf-v6-c-about-modal-box__brand",w="pf-v6-c-about-modal-box__brand-image",j="pf-v6-c-about-modal-box__close",N="pf-v6-c-about-modal-box__content",C="pf-v6-c-about-modal-box__header",S="pf-v6-c-about-modal-box__strapline",_="pf-v6-c-content",k="pf-v6-c-content--a",L="pf-v6-c-content--blockquote",I="pf-v6-c-content--dd",T="pf-v6-c-content--dl",E="pf-v6-c-content--dt",D="pf-v6-c-content--h1",M="pf-v6-c-content--h2",R="pf-v6-c-content--h3",P="pf-v6-c-content--h4",A="pf-v6-c-content--h5",B="pf-v6-c-content--h6",F="pf-v6-c-content--hr",z="pf-v6-c-content--li",G="pf-v6-c-content--ol",H="pf-v6-c-content--p",V="pf-v6-c-content--pre",X="pf-v6-c-content--small",$="pf-v6-c-content--ul",W={editorial:"pf-m-editorial",visited:"pf-m-visited",plain:"pf-m-plain"};const U=e=>{var{children:n,trademark:t,hasNoContentContainer:a=!1}=e,i=s(e,["children","trademark","hasNoContentContainer"]);return x.jsxs("div",Object.assign({className:v(N)},i,{children:[x.jsx("div",{className:v(`${y}__body`),children:a?n:x.jsx("div",{className:v(_),children:n})}),x.jsx("p",{className:v(S),children:t})]}))};U.displayName="AboutModalBoxContent";var q={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",h1:"pf-m-h1",h2:"pf-m-h2",h3:"pf-m-h3",h4:"pf-m-h4",h5:"pf-m-h5",h6:"pf-m-h6",pageTitle:"pf-m-page-title"},title:"pf-v6-c-title"};const K=n.createContext({hasAnimations:!1}),Z=({config:e,children:n})=>x.jsx(K.Provider,{value:e,children:n}),Y=()=>{const e=n.useContext(K);return void 0===e?{hasAnimations:!1}:e},J=e=>{var n;const{hasAnimations:t}=Y();return null!==(n=null!=e?e:t)&&void 0!==n&&n};Z.displayName="AnimationsProvider";const Q="48rem",ee="62rem",ne="75rem",te="90.625rem";let ae=0;function ie(e){return e&&Array.isArray(e)?e.map(((e,n)=>x.jsx("path",{className:e.className,d:e.path},`${e.path}-${n}`))):x.jsx("path",{d:e})}const se=(e,n)=>{const{xOffset:t,yOffset:a,width:i,height:s,svgPathData:l,svgClassName:o}=null!=e?e:{},r=[null!=t?t:0,null!=a?a:0,i,s].join(" "),c=[];return o&&c.push(o),n&&c.push(n),x.jsx("svg",{viewBox:r,className:c.join(" "),children:ie(l)})};function le({name:e,icon:t,rhUiIcon:a=null}){var i;return null==t&&console.warn(`@patternfly/react-icons: createIconBase is missing an \`icon\` definition (name: ${null!=e?e:"unknown"}).`),i=class extends n.Component{constructor(){super(...arguments),this.id="icon-title-"+ae++}render(){const n=this.props,{title:i,className:l,set:o,noDefaultStyle:r}=n,c=s(n,["title","className","set","noDefaultStyle"]),d=Boolean(i),p=["pf-v6-svg"];if(l&&p.push(l),"rh-ui"===o&&null===a&&console.warn(`Set "rh-ui" was provided for ${e}, but no rh-ui icon data exists for this icon. The default icon will be rendered.`),void 0===o&&null===a||void 0!==o){const e=void 0!==o&&"rh-ui"===o&&null!==a?a:t,{xOffset:n,yOffset:s,width:l,height:m,svgPathData:f,svgClassName:u}=null!=e?e:{},g=[null!=n?n:0,null!=s?s:0,l,m].join(" ");return u&&!r&&p.push(u),x.jsxs("svg",Object.assign({className:p.join(" "),fill:"currentColor",viewBox:g,"aria-labelledby":d?this.id:null,"aria-hidden":!d||null,role:"img",width:"1em",height:"1em"},c,{children:[d&&x.jsx("title",{id:this.id,children:i}),ie(f)]}))}return x.jsxs("svg",Object.assign({className:p.join(" "),fill:"currentColor","aria-labelledby":d?this.id:null,"aria-hidden":!d||null,role:"img",width:"1em",height:"1em"},c,{children:[d&&x.jsx("title",{id:this.id,children:i}),t&&se(t,"pf-v6-icon-default"),a&&se(a,"pf-v6-icon-rh-ui")]}))}},i.displayName=e,i.defaultProps={noDefaultStyle:!1},i}const oe=le({name:"RhUiCheckCircleFillIcon",icon:{xOffset:0,yOffset:0,width:32,height:32,svgPathData:"M16 1C7.729 1 1 7.729 1 16s6.729 15 15 15 15-6.729 15-15S24.271 1 16 1Zm7.795 11.795-8.646 8.646c-.317.317-.733.475-1.149.475s-.832-.158-1.149-.475l-4.646-4.646a1.126 1.126 0 0 1 1.591-1.591l4.205 4.205 8.205-8.205a1.126 1.126 0 0 1 1.591 1.591Z"},rhUiIcon:null}),re=le({name:"RhUiErrorFillIcon",icon:{xOffset:0,yOffset:0,width:32,height:32,svgPathData:"M16 1C7.729 1 1 7.729 1 16s6.729 15 15 15 15-6.729 15-15S24.271 1 16 1Zm-1.5 8a1.5 1.5 0 1 1 3 0v7a1.5 1.5 0 1 1-3 0V9ZM16 25.001a2 2 0 1 1-.001-3.999A2 2 0 0 1 16 25.001Z"},rhUiIcon:null}),ce=le({name:"RhUiWarningFillIcon",icon:{xOffset:0,yOffset:0,width:32,height:32,svgPathData:"m31.874 28.514-15.011-27a1.001 1.001 0 0 0-1.748 0l-15.011 27A1 1 0 0 0 .978 30H31a1 1 0 0 0 .874-1.486ZM14.5 12a1.5 1.5 0 0 1 3 0v5a1.5 1.5 0 0 1-3 0v-5ZM16 26.001a2 2 0 1 1-.001-3.999A2 2 0 0 1 16 26.001Z"},rhUiIcon:null}),de=le({name:"RhUiInformationFillIcon",icon:{xOffset:0,yOffset:0,width:32,height:32,svgPathData:"M16 1C7.729 1 1 7.729 1 16s6.729 15 15 15 15-6.729 15-15S24.271 1 16 1Zm1.5 22a1.5 1.5 0 1 1-3 0v-5.157l-.188.04a1.5 1.5 0 0 1-.625-2.934l1.956-.416c.112-.024.223-.032.333-.03l.024-.002a1.5 1.5 0 0 1 1.5 1.5v7Zm-.08-12.58c-.38.37-.89.58-1.42.58a1.998 1.998 0 0 1-1.851-2.76c.051-.13.11-.24.19-.35.07-.11.15-.21.25-.3.74-.75 2.08-.75 2.83 0 .09.09.17.19.24.3.08.11.14.22.189.35.05.12.09.24.11.37.03.13.04.26.04.39 0 .53-.21 1.04-.58 1.42Z"},rhUiIcon:null}),pe=le({name:"RhUiNotificationFillIcon",icon:{xOffset:0,yOffset:0,width:32,height:32,svgPathData:"M28.75 22v3.5c0 .689-.561 1.25-1.25 1.25h-7.521c.005.084.021.166.021.25 0 2.206-1.794 4-4 4s-4-1.794-4-4c0-.084.016-.166.021-.25H4.5c-.689 0-1.25-.561-1.25-1.25V22a.75.75 0 0 1 .75-.75c1.24 0 2.25-1.009 2.25-2.25v-4c0-4.826 3.528-8.833 8.138-9.605A2.482 2.482 0 0 1 13.5 3.5C13.5 2.122 14.621 1 16 1s2.5 1.122 2.5 2.5c0 .761-.349 1.436-.888 1.895 4.61.772 8.138 4.779 8.138 9.605v4c0 1.241 1.01 2.25 2.25 2.25a.75.75 0 0 1 .75.75Z"},rhUiIcon:null}),me={RIGHT:"right",LEFT:"left",BOTH:"both",NONE:"none"};var fe;e.ValidatedOptions=void 0,(fe=e.ValidatedOptions||(e.ValidatedOptions={})).success="success",fe.error="error",fe.warning="warning",fe.default="default";const ue={Tab:"Tab",Space:" ",Escape:"Escape",Enter:"Enter",ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight"},ge={sm:16*parseInt("36rem"),md:16*parseInt(Q),lg:16*parseInt(ee),xl:16*parseInt(ne),"2xl":16*parseInt(te)},he={sm:16*parseInt("0rem"),md:16*parseInt("40rem"),lg:16*parseInt("48rem"),xl:16*parseInt("60rem"),"2xl":16*parseInt("80rem")},xe={success:oe,danger:re,warning:ce,info:de,custom:pe}; /*! * tabbable 6.3.0 * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE */ var ve=["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])"],be=ve.join(","),ye="undefined"==typeof Element,Oe=ye?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,we=!ye&&Element.prototype.getRootNode?function(e){var n;return null==e||null===(n=e.getRootNode)||void 0===n?void 0:n.call(e)}:function(e){return null==e?void 0:e.ownerDocument},je=function(e,n){var t;void 0===n&&(n=!0);var a=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"inert");return""===a||"true"===a||n&&e&&je(e.parentNode)},Ne=function(e,n,t){if(je(e))return[];var a=Array.prototype.slice.apply(e.querySelectorAll(be));return n&&Oe.call(e,be)&&a.unshift(e),a=a.filter(t)},Ce=function(e,n,t){for(var a=[],i=Array.from(e);i.length;){var s=i.shift();if(!je(s,!1))if("SLOT"===s.tagName){var l=s.assignedElements(),o=l.length?l:s.children,r=Ce(o,!0,t);t.flatten?a.push.apply(a,r):a.push({scopeParent:s,candidates:r})}else{Oe.call(s,be)&&t.filter(s)&&(n||!e.includes(s))&&a.push(s);var c=s.shadowRoot||"function"==typeof t.getShadowRoot&&t.getShadowRoot(s),d=!je(c,!1)&&(!t.shadowRootFilter||t.shadowRootFilter(s));if(c&&d){var p=Ce(!0===c?s.children:c.children,!0,t);t.flatten?a.push.apply(a,p):a.push({scopeParent:s,candidates:p})}else i.unshift.apply(i,s.children)}}return a},Se=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},_e=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var n,t=null==e||null===(n=e.getAttribute)||void 0===n?void 0:n.call(e,"contenteditable");return""===t||"true"===t}(e))&&!Se(e)?0:e.tabIndex},ke=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},Le=function(e){return"INPUT"===e.tagName},Ie=function(e){return function(e){return Le(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var n,t=e.form||we(e),a=function(e){return t.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)n=a(window.CSS.escape(e.name));else try{n=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,n){for(var t=0;t<e.length;t++)if(e[t].checked&&e[t].form===n)return e[t]}(n,e.form);return!i||i===e}(e)},Te=function(e){var n=e.getBoundingClientRect(),t=n.width,a=n.height;return 0===t&&0===a},Ee=function(e,n){var t=n.displayCheck,a=n.getShadowRoot;if("full-native"===t&&"checkVisibility"in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if("hidden"===getComputedStyle(e).visibility)return!0;var i=Oe.call(e,"details>summary:first-of-type")?e.parentElement:e;if(Oe.call(i,"details:not([open]) *"))return!0;if(t&&"full"!==t&&"full-native"!==t&&"legacy-full"!==t){if("non-zero-area"===t)return Te(e)}else{if("function"==typeof a){for(var s=e;e;){var l=e.parentElement,o=we(e);if(l&&!l.shadowRoot&&!0===a(l))return Te(e);e=e.assignedSlot?e.assignedSlot:l||o===e.ownerDocument?l:o.host}e=s}if(function(e){var n,t,a,i,s=e&&we(e),l=null===(n=s)||void 0===n?void 0:n.host,o=!1;if(s&&s!==e)for(o=!!(null!==(t=l)&&void 0!==t&&null!==(a=t.ownerDocument)&&void 0!==a&&a.contains(l)||null!=e&&null!==(i=e.ownerDocument)&&void 0!==i&&i.contains(e));!o&&l;){var r,c,d;o=!(null===(c=l=null===(r=s=we(l))||void 0===r?void 0:r.host)||void 0===c||null===(d=c.ownerDocument)||void 0===d||!d.contains(l))}return o}(e))return!e.getClientRects().length;if("legacy-full"!==t)return!0}return!1},De=function(e,n){return!(n.disabled||je(n)||function(e){return Le(e)&&"hidden"===e.type}(n)||Ee(n,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(n)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.parentElement;n;){if("FIELDSET"===n.tagName&&n.disabled){for(var t=0;t<n.children.length;t++){var a=n.children.item(t);if("LEGEND"===a.tagName)return!!Oe.call(n,"fieldset[disabled] *")||!a.contains(e)}return!0}n=n.parentElement}return!1}(n))},Me=function(e,n){return!(Ie(n)||_e(n)<0||!De(e,n))},Re=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Pe=function(e){var n=[],t=[];return e.forEach((function(e,a){var i=!!e.scopeParent,s=i?e.scopeParent:e,l=function(e,n){var t=_e(e);return t<0&&n&&!Se(e)?0:t}(s,i),o=i?Pe(e.candidates):s;0===l?i?n.push.apply(n,o):n.push(s):t.push({documentOrder:a,tabIndex:l,item:e,isScope:i,content:o})})),t.sort(ke).reduce((function(e,n){return n.isScope?e.push.apply(e,n.content):e.push(n.content),e}),[]).concat(n)},Ae=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return!1!==Oe.call(e,be)&&Me(n,e)},Be=ve.concat("iframe").join(","),Fe=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return!1!==Oe.call(e,Be)&&De(n,e)}; /*! * focus-trap 7.6.6 * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE */ function ze(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,a=Array(n);t<n;t++)a[t]=e[t];return a}function Ge(e,n,t){return(n=function(e){var n=function(e,n){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var a=t.call(e,n);if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function He(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function Ve(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?He(Object(t),!0).forEach((function(n){Ge(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):He(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function Xe(e){return function(e){if(Array.isArray(e))return ze(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(e){if("string"==typeof e)return ze(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ze(e,n):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var $e=function(e,n){if(e.length>0){var t=e[e.length-1];t!==n&&t._setPausedState(!0)}var a=e.indexOf(n);-1===a||e.splice(a,1),e.push(n)},We=function(e,n){var t=e.indexOf(n);-1!==t&&e.splice(t,1),e.length>0&&!e[e.length-1]._isManuallyPaused()&&e[e.length-1]._setPausedState(!1)},Ue=function(e){return"Tab"===(null==e?void 0:e.key)||9===(null==e?void 0:e.keyCode)},qe=function(e){return Ue(e)&&!e.shiftKey},Ke=function(e){return Ue(e)&&e.shiftKey},Ze=function(e){return setTimeout(e,0)},Ye=function(e){for(var n=arguments.length,t=new Array(n>1?n-1:0),a=1;a<n;a++)t[a-1]=arguments[a];return"function"==typeof e?e.apply(void 0,t):e},Je=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},Qe=[],en=function(e,n){var t,a=(null==n?void 0:n.document)||document,i=(null==n?void 0:n.trapStack)||Qe,s=Ve({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:qe,isKeyBackward:Ke},n),l={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},o=function(e,n,t){return e&&void 0!==e[n]?e[n]:s[t||n]},r=function(e,n){var t="function"==typeof(null==n?void 0:n.composedPath)?n.composedPath():void 0;return l.containerGroups.findIndex((function(n){var a=n.container,i=n.tabbableNodes;return a.contains(e)||(null==t?void 0:t.includes(a))||i.find((function(n){return n===e}))}))},c=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.hasFallback,i=void 0!==t&&t,l=n.params,o=void 0===l?[]:l,r=s[e];if("function"==typeof r&&(r=r.apply(void 0,Xe(o))),!0===r&&(r=void 0),!r){if(void 0===r||!1===r)return r;throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}var c=r;if("string"==typeof r){try{c=a.querySelector(r)}catch(n){throw new Error("`".concat(e,'` appears to be an invalid selector; error="').concat(n.message,'"'))}if(!c&&!i)throw new Error("`".concat(e,"` as selector refers to no known node"))}return c},d=function(){var e=c("initialFocus",{hasFallback:!0});if(!1===e)return!1;if(void 0===e||e&&!Fe(e,s.tabbableOptions))if(r(a.activeElement)>=0)e=a.activeElement;else{var n=l.tabbableGroups[0];e=n&&n.firstTabbableNode||c("fallbackFocus")}else null===e&&(e=c("fallbackFocus"));if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");return e},p=function(){if(l.containerGroups=l.containers.map((function(e){var n=function(e,n){var t;return t=(n=n||{}).getShadowRoot?Ce([e],n.includeContainer,{filter:Me.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Re}):Ne(e,n.includeContainer,Me.bind(null,n)),Pe(t)}(e,s.tabbableOptions),t=function(e,n){return(n=n||{}).getShadowRoot?Ce([e],n.includeContainer,{filter:De.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):Ne(e,n.includeContainer,De.bind(null,n))}(e,s.tabbableOptions),a=n.length>0?n[0]:void 0,i=n.length>0?n[n.length-1]:void 0,l=t.find((function(e){return Ae(e)})),o=t.slice().reverse().find((function(e){return Ae(e)})),r=!!n.find((function(e){return _e(e)>0}));return{container:e,tabbableNodes:n,focusableNodes:t,posTabIndexesFound:r,firstTabbableNode:a,lastTabbableNode:i,firstDomTabbableNode:l,lastDomTabbableNode:o,nextTabbableNode:function(e){var a=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=n.indexOf(e);return i<0?a?t.slice(t.indexOf(e)+1).find((function(e){return Ae(e)})):t.slice(0,t.indexOf(e)).reverse().find((function(e){return Ae(e)})):n[i+(a?1:-1)]}}})),l.tabbableGroups=l.containerGroups.filter((function(e){return e.tabbableNodes.length>0})),l.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(l.containerGroups.find((function(e){return e.posTabIndexesFound}))&&l.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){var n=e.activeElement;if(n)return n.shadowRoot&&null!==n.shadowRoot.activeElement?m(n.shadowRoot):n},f=function(e){!1!==e&&e!==m(document)&&(e&&e.focus?(e.focus({preventScroll:!!s.preventScroll}),l.mostRecentlyFocusedNode=e,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(e)&&e.select()):f(d()))},u=function(e){var n=c("setReturnFocus",{params:[e]});return n||!1!==n&&e},g=function(e){var n=e.target,t=e.event,a=e.isBackward,i=void 0!==a&&a;n=n||Je(t),p();var o=null;if(l.tabbableGroups.length>0){var d=r(n,t),m=d>=0?l.containerGroups[d]:void 0;if(d<0)o=i?l.tabbableGroups[l.tabbableGroups.length-1].lastTabbableNode:l.tabbableGroups[0].firstTabbableNode;else if(i){var f=l.tabbableGroups.findIndex((function(e){var t=e.firstTabbableNode;return n===t}));if(f<0&&(m.container===n||Fe(n,s.tabbableOptions)&&!Ae(n,s.tabbableOptions)&&!m.nextTabbableNode(n,!1))&&(f=d),f>=0){var u=0===f?l.tabbableGroups.length-1:f-1,g=l.tabbableGroups[u];o=_e(n)>=0?g.lastTabbableNode:g.lastDomTabbableNode}else Ue(t)||(o=m.nextTabbableNode(n,!1))}else{var h=l.tabbableGroups.findIndex((function(e){var t=e.lastTabbableNode;return n===t}));if(h<0&&(m.container===n||Fe(n,s.tabbableOptions)&&!Ae(n,s.tabbableOptions)&&!m.nextTabbableNode(n))&&(h=d),h>=0){var x=h===l.tabbableGroups.length-1?0:h+1,v=l.tabbableGroups[x];o=_e(n)>=0?v.firstTabbableNode:v.firstDomTabbableNode}else Ue(t)||(o=m.nextTabbableNode(n))}}else o=c("fallbackFocus");return o},h=function(e){var n=Je(e);r(n,e)>=0||(Ye(s.clickOutsideDeactivates,e)?t.deactivate({returnFocus:s.returnFocusOnDeactivate}):Ye(s.allowOutsideClick,e)||e.preventDefault())},x=function(e){var n=Je(e),t=r(n,e)>=0;if(t||n instanceof Document)t&&(l.mostRecentlyFocusedNode=n);else{var a;e.stopImmediatePropagation();var i=!0;if(l.mostRecentlyFocusedNode)if(_e(l.mostRecentlyFocusedNode)>0){var o=r(l.mostRecentlyFocusedNode),c=l.containerGroups[o].tabbableNodes;if(c.length>0){var p=c.findIndex((function(e){return e===l.mostRecentlyFocusedNode}));p>=0&&(s.isKeyForward(l.recentNavEvent)?p+1<c.length&&(a=c[p+1],i=!1):p-1>=0&&(a=c[p-1],i=!1))}}else l.containerGroups.some((function(e){return e.tabbableNodes.some((function(e){return _e(e)>0}))}))||(i=!1);else i=!1;i&&(a=g({target:l.mostRecentlyFocusedNode,isBackward:s.isKeyBackward(l.recentNavEvent)})),f(a||(l.mostRecentlyFocusedNode||d()))}l.recentNavEvent=void 0},v=function(e){(s.isKeyForward(e)||s.isKeyBackward(e))&&function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];l.recentNavEvent=e;var t=g({event:e,isBackward:n});t&&(Ue(e)&&e.preventDefault(),f(t))}(e,s.isKeyBackward(e))},b=function(e){var n;"Escape"!==(null==(n=e)?void 0:n.key)&&"Esc"!==(null==n?void 0:n.key)&&27!==(null==n?void 0:n.keyCode)||!1===Ye(s.escapeDeactivates,e)||(e.preventDefault(),t.deactivate())},y=function(e){var n=Je(e);r(n,e)>=0||Ye(s.clickOutsideDeactivates,e)||Ye(s.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},O=function(){if(l.active)return $e(i,t),l.delayInitialFocusTimer=s.delayInitialFocus?Ze((function(){f(d())})):f(d()),a.addEventListener("focusin",x,!0),a.addEventListener("mousedown",h,{capture:!0,passive:!1}),a.addEventListener("touchstart",h,{capture:!0,passive:!1}),a.addEventListener("click",y,{capture:!0,passive:!1}),a.addEventListener("keydown",v,{capture:!0,passive:!1}),a.addEventListener("keydown",b),t},w=function(){if(l.active)return a.removeEventListener("focusin",x,!0),a.removeEventListener("mousedown",h,!0),a.removeEventListener("touchstart",h,!0),a.removeEventListener("click",y,!0),a.removeEventListener("keydown",v,!0),a.removeEventListener("keydown",b),t},j="undefined"!=typeof window&&"MutationObserver"in window?new MutationObserver((function(e){e.some((function(e){return Array.from(e.removedNodes).some((function(e){return e===l.mostRecentlyFocusedNode}))}))&&f(d())})):void 0,N=function(){j&&(j.disconnect(),l.active&&!l.paused&&l.containers.map((function(e){j.observe(e,{subtree:!0,childList:!0})})))};return t={get active(){return l.active},get paused(){return l.paused},activate:function(e){if(l.active)return this;var n=o(e,"onActivate"),t=o(e,"onPostActivate"),i=o(e,"checkCanFocusTrap");i||p(),l.active=!0,l.paused=!1,l.nodeFocusedBeforeActivation=m(a),null==n||n();var s=function(){i&&p(),O(),N(),null==t||t()};return i?(i(l.containers.concat()).then(s,s),this):(s(),this)},deactivate:function(e){if(!l.active)return this;var n=Ve({onDeactivate:s.onDeactivate,onPostDeactivate:s.onPostDeactivate,checkCanReturnFocus:s.checkCanReturnFocus},e);clearTimeout(l.delayInitialFocusTimer),l.delayInitialFocusTimer=void 0,w(),l.active=!1,l.paused=!1,N(),We(i,t);var a=o(n,"onDeactivate"),r=o(n,"onPostDeactivate"),c=o(n,"checkCanReturnFocus"),d=o(n,"returnFocus","returnFocusOnDeactivate");null==a||a();var p=function(){Ze((function(){d&&f(u(l.nodeFocusedBeforeActivation)),null==r||r()}))};return d&&c?(c(u(l.nodeFocusedBeforeActivation)).then(p,p),this):(p(),this)},pause:function(e){return l.active?(l.manuallyPaused=!0,this._setPausedState(!0,e)):this},unpause:function(e){return l.active?(l.manuallyPaused=!1,i[i.length-1]!==this?this:this._setPausedState(!1,e)):this},updateContainerElements:function(e){var n=[].concat(e).filter(Boolean);return l.containers=n.map((function(e){return"string"==typeof e?a.querySelector(e):e})),l.active&&p(),N(),this}},Object.defineProperties(t,{_isManuallyPaused:{value:function(){return l.manuallyPaused}},_setPausedState:{value:function(e,n){if(l.paused===e)return this;if(l.paused=e,e){var t=o(n,"onPause"),a=o(n,"onPostPause");null==t||t(),w(),N(),null==a||a()}else{var i=o(n,"onUnpause"),s=o(n,"onPostUnpause");null==i||i(),p(),O(),N(),null==s||s()}return this}}}),t.updateContainerElements(e),t};const nn=n.forwardRef((function(e,t){var{active:a=!0,paused:i=!1,focusTrapOptions:l={},preventScrollOnDeactivate:o=!1}=e,r=s(e,["active","paused","focusTrapOptions","preventScrollOnDeactivate"]);const c=n.useRef(null);n.useImperativeHandle(t,(()=>c.current));const d=n.useRef(null);n.useEffect((()=>{const e=en(c.current,Object.assign(Object.assign({},l),{returnFocusOnDeactivate:!1}));return d.current=e,()=>{e.deactivate()}}),[]),n.useEffect((()=>{const e=d.current;a?null==e||e.activate():null==e||e.deactivate()}),[a]),n.useEffect((()=>{const e=d.current;i?null==e||e.pause():null==e||e.unpause()}),[i]);const p=n.useRef("undefined"!=typeof document?document.activeElement:null);return function(e){const t=n.useRef(e);t.current=e,n.useEffect((()=>()=>{t.current()}),[])}((()=>{!1!==l.returnFocusOnDeactivate&&p.current instanceof HTMLElement&&p.current.focus({preventScroll:o})})),x.jsx("div",Object.assign({ref:c},r))}));nn.displayName="FocusTrap";const tn="function"==typeof n.useId?n.useId:void 0;let an=0;const sn=tn?function(e="pf-"){return`${e}${tn()}`}:function(e="pf-"){const[t]=n.useState((()=>`${e}${++an}`));return t},ln=({prefix:e="pf-random-id-",children:n})=>n(sn(e));ln.displayName="GenerateId";const on="OUIA-Generated-";function rn(e,n,t=!0){return{"data-ouia-component-type":`PF6/${e}`,"data-ouia-safe":t,"data-ouia-component-id":n}}const cn=(e,n,t=!0,a)=>({"data-ouia-component-type":`PF6/${e}`,"data-ouia-safe":t,"data-ouia-component-id":dn(e,n,a)}),dn=(e,n,t)=>{const a=sn(`${on}${e}-${t?`${t}-`:""}`);return null!=n?n:a};let pn=0;function mn(e){return e[0].toUpperCase()+e.substring(1)}function fn(e,n){let t;return(...a)=>{clearTimeout(t),t=setTimeout((()=>e.apply(this,a)),n)}}function un(e,n,t,a=!1){if(!e||!n)return!1;const i=e.getBoundingClientRect(),s=n.getBoundingClientRect(),l=Math.ceil(i.left),o=Math.floor(i.right),r=Math.ceil(s.left),c=Math.floor(s.right),d=r>=l&&c<=o,p=(t||!a&&i.width<s.width)&&(r<l&&c>l||c>o&&r<o);return d||p}function gn(e,n){return e.replace(/\${(.*?)}/g,((e,t)=>n[t]||""))}function hn(e,n,t){return t||(t=`${n}s`),`${e||0} ${1===e?n:t}`}const xn=(e,n)=>Object.entries(e||{}).reduce(((e,[t,a])=>"default"===t?Object.assign(Object.assign({},e),{[n]:a}):Object.assign(Object.assign({},e),{[`${n}-on-${t}`]:a})),{}),vn=(e,n,t="",a,i)=>{if(!e)return"";if(a&&!i){if(a in e)return n.modifiers[wn(`${t}${e[a]}`)];const i=["2xl","xl","lg","md","sm","default"];for(let s=i.indexOf(a);s<i.length;s++)if(i[s]in e)return n.modifiers[wn(`${t}${e[i[s]]}`)];return""}return Object.entries(e||{}).map((([e,n])=>`${t}${n}${"default"!==e?`-on-${e}`:""}${i&&"default"!==e?"-height":""}`)).map(wn).map((e=>e.replace(/-?(\dxl)/gi,((e,n)=>`_${n}`)))).map((e=>n.modifiers[e])).filter(Boolean).join(" ")},bn=e=>null===e?null:e>=he["2xl"]?"2xl":e>=he.xl?"xl":e>=he.lg?"lg":e>=he.md?"md":e>=he.sm?"sm":"default",yn=e=>null===e?null:e>=ge["2xl"]?"2xl":e>=ge.xl?"xl":e>=ge.lg?"lg":e>=ge.md?"md":e>=ge.sm?"sm":"default",On=e=>e.toUpperCase().replace("-","").replace("_",""),wn=e=>e.replace(/([-_][a-z])/gi,On),jn=!("undefined"==typeof window||!window.document||!window.document.createElement),Nn=(e,n)=>{const t=getComputedStyle(n),a=document.createElement("canvas").getContext("2d");return a.font=t.font||(()=>{let e="";const n={"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=t.fontStretch in n?n[t.fontStretch]:"normal",e=t.fontStyle+" "+t.fontVariant+" "+t.fontWeight+" "+a+" "+t.fontSize+"/"+t.lineHeight+" "+t.fontFamily,e})(),a.measureText(e).width},Cn=e=>{const n=getComputedStyle(e);let t=e.clientWidth,a=e.clientHeight;return a-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom),t-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),{height:a,width:t}},Sn=(e,n)=>{const t=Cn(e).width;let a=n;if(Nn(n,e)>t){for(;Nn(`...${a}`,e)>t;)a=a.substring(1);e.value?e.value=`...${a}`:e.innerText=`...${a}`}else e.value?e.value=n:e.innerText=n},_n=e=>{e.forEach((e=>{e.current&&clearTimeout(e.current)}))},kn=(e,n="ltr")=>{if(!e)return n;const t=getComputedStyle(e).getPropertyValue("direction");return["ltr","rtl"].includes(t)?t:n},Ln=e=>e instanceof HTMLElement?e:"function"==typeof e?e():null==e?void 0:e.current,In=(e,n,t="offset")=>{if(!e)return;const a=`${t}Left`;if(!("rtl"===kn(e)))return e[a];const i=`${t}Width`;return n[i]-(e[a]+e[i])};function Tn(e){const n=e.getBoundingClientRect();return{width:n.width,height:n.height,top:n.top,right:n.right,bottom:n.bottom,left:n.left,x:n.left,y:n.top}}function En(e){if("[object Window]"!==e.toString()){const n=e.ownerDocument;return n?n.defaultView:window}return e}function Dn(e){const n=En(e);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function Mn(e){return e instanceof En(e).Element||e instanceof Element}function Rn(e){return e instanceof En(e).HTMLElement||e instanceof HTMLElement}function Pn(e){return e?(e.nodeName||"").toLowerCase():null}function An(e){return((Mn(e)?e.ownerDocument:e.document)||window.document).documentElement}function Bn(e){return Tn(An(e)).left+Dn(e).scrollLeft}function Fn(e){return En(e).getComputedStyle(e)}function zn(e){const{overflow:n,overflowX:t,overflowY:a}=Fn(e);return/auto|scroll|overlay|hidden/.test(n+a+t)}function Gn(e,n,t=!1){const a=An(n),i=Tn(e),s=Rn(n);let l={scrollLeft:0,scrollTop:0},o={x:0,y:0};var r,c;return(s||!s&&!t)&&(("body"!==Pn(n)||zn(a))&&(l=(r=n)!==En(r)&&Rn(r)?{scrollLeft:(c=r).scrollLeft,scrollTop:c.scrollTop}:Dn(r)),Rn(n)?(o=Tn(n),o.x+=n.clientLeft,o.y+=n.clientTop):a&&(o.x=Bn(a))),{x:i.left+l.scrollLeft-o.x,y:i.top+l.scrollTop-o.y,width:i.width,height:i.height}}function Hn(e){return{x:e.offsetLeft,y:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}}function Vn(e){return"html"===Pn(e)?e:e.assignedSlot||e.parentNode||e.host||An(e)}function Xn(e){return["html","body","#document"].indexOf(Pn(e))>=0?e.ownerDocument.body:Rn(e)&&zn(e)?e:Xn(Vn(e))}function $n(e,n=[]){const t=Xn(e),a="body"===Pn(t),i=En(t),s=a?[i].concat(i.visualViewport||[],zn(t)?t:[]):t,l=n.concat(s);return a?l:l.concat($n(Vn(s)))}function Wn(e){return["table","td","th"].indexOf(Pn(e))>=0}function Un(e){if(!Rn(e)||"fixed"===Fn(e).position)return null;const n=e.offsetParent;if(n){const e=An(n);if("body"===Pn(n)&&"static"===Fn(n).position&&"static"!==Fn(e).position)return e}return n}function qn(e){const n=En(e);let t=Un(e);for(;t&&Wn(t)&&"static"===Fn(t).position;)t=Un(t);return t&&"body"===Pn(t)&&"static"===Fn(t).position?n:t||function(e){let n=Vn(e);for(;Rn(n)&&["html","body"].indexOf(Pn(n))<0;){const e=Fn(n);if("none"!==e.transform||"none"!==e.perspective||e.willChange&&"auto"!==e.willChange)return n;n=n.parentNode}return null}(e)||n}const Kn="top",Zn="bottom",Yn="right",Jn="left",Qn="auto",et=[Kn,Zn,Yn,Jn],nt="start",tt="end",at="clippingParents",it="viewport",st="popper",lt="reference",ot=et.reduce(((e,n)=>e.concat([`${n}-${nt}`,`${n}-${tt}`])),[]),rt=[...et,Qn].reduce(((e,n)=>e.concat([n,`${n}-${nt}`,`${n}-${tt}`])),[]),ct=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function dt(e){const n=new Map,t=new Set,a=[];function i(e){t.add(e.name);[...e.requires||[],...e.requiresIfExists||[]].forEach((e=>{if(!t.has(e)){const t=n.get(e);t&&i(t)}})),a.push(e)}return e.forEach((e=>{n.set(e.name,e)})),e.forEach((e=>{t.has(e.name)||i(e)})),a}function pt(e){let n;return()=>(n||(n=new Promise((t=>{Promise.resolve().then((()=>{n=void 0,t(e())}))}))),n)}function mt(e){return e.split("-")[0]}function ft(e,n){const t=Boolean(n.getRootNode&&n.getRootNode().host);if(e.contains(n))return!0;if(t){let t=n;do{if(t&&e.isSameNode(t))return!0;t=t.parentNode||t.host}while(t)}return!1}function ut(e){return Object.assign(Object.assign({},e),{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function gt(e,n){return n===it?ut(function(e){const n=En(e),t=An(e),a=n.visualViewport;let i=t.clientWidth,s=t.clientHeight,l=0,o=0;return a&&(i=a.width,s=a.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(l=a.offsetLeft,o=a.offsetTop)),{width:i,height:s,x:l+Bn(e),y:o}}(e)):Rn(n)?function(e){const n=Tn(e);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(n):ut(function(e){const n=An(e),t=Dn(e),a=e.ownerDocument.body,i=Math.max(n.scrollWidth,n.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),s=Math.max(n.scrollHeight,n.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0);let l=-t.scrollLeft+Bn(e);const o=-t.scrollTop;return"rtl"===Fn(a||n).direction&&(l+=Math.max(n.clientWidth,a?a.clientWidth:0)-i),{width:i,height:s,x:l,y:o}}(An(e)))}function ht(e,n,t){const a="clippingParents"===n?function(e){const n=$n(Vn(e)),t=["absolute","fixed"].indexOf(Fn(e).position)>=0&&Rn(e)?qn(e):e;return Mn(t)?n.filter((e=>Mn(e)&&ft(e,t)&&"body"!==Pn(e))):[]}(e):[].concat(n),i=[...a,t],s=i[0],l=i.reduce(((n,t)=>{const a=gt(e,t);return n.top=Math.max(a.top,n.top),n.right=Math.min(a.right,n.right),n.bottom=Math.min(a.bottom,n.bottom),n.left=Math.max(a.left,n.left),n}),gt(e,s));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function xt(e){return e.split("-")[1]}function vt(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function bt({reference:e,element:n,placement:t}){const a=t?mt(t):null,i=t?xt(t):null,s=e.x+e.width/2-n.width/2,l=e.y+e.height/2-n.height/2;let o;switch(a){case Kn:o={x:s,y:e.y-n.height};break;case Zn:o={x:s,y:e.y+e.height};break;case Yn:o={x:e.x+e.width,y:l};break;case Jn:o={x:e.x-n.width,y:l};break;default:o={x:e.x,y:e.y}}const r=a?vt(a):null;if(null!=r){const t="y"===r?"height":"width";switch(i){case nt:o[r]=Math.floor(o[r])-Math.floor(e[t]/2-n[t]/2);break;case tt:o[r]=Math.floor(o[r])+Math.ceil(e[t]/2-n[t]/2)}}return o}function yt(e){return Object.assign(Object.assign({},{top:0,right:0,bottom:0,left:0}),e)}function Ot(e,n){return n.reduce(((n,t)=>(n[t]=e,n)),{})}function wt(e,n={}){const{placement:t=e.placement,boundary:a=at,rootBoundary:i=it,elementContext:s=st,altBoundary:l=!1,padding:o=0}=n,r=yt("number"!=typeof o?o:Ot(o,et)),c=s===st?lt:st,d=e.elements.reference,p=e.rects.popper,m=e.elements[l?c:s],f=ht(Mn(m)?m:m.contextElement||An(e.elements.popper),a,i),u=Tn(d),g=bt({reference:u,element:p,placement:t}),h=ut(Object.assign(Object.assign({},p),g)),x=s===st?h:u,v={top:f.top-x.top+r.top,bottom:x.bottom-f.bottom+r.bottom,left:f.left-x.left+r.left,right:x.right-f.right+r.right},b=e.modifiersData.offset;if(s===st&&b){const e=b[t];Object.keys(v).forEach((n=>{const t=[Yn,Zn].indexOf(n)>=0?1:-1,a=[Kn,Zn].indexOf(n)>=0?"y":"x";v[n]+=e[a]*t}))}return v}const jt={placement:"bottom",modifiers:[],strategy:"absolute"};function Nt(...e){return!e.some((e=>!(e&&"function"==typeof e.getBoundingClientRect)))}function Ct(e={}){const{defaultModifiers:n=[],defaultOptions:t=jt}=e;return function(e,a,i=t){let s={placement:"bottom",orderedModifiers:[],options:Object.assign(Object.assign({},jt),t),modifiersData:{},elements:{reference:e,popper:a},attributes:{},styles:{}},l=[],o=!1;const r={state:s,setOptions(i){c(),s.options=Object.assign(Object.assign(Object.assign({},t),s.options),i),s.scrollParents={reference:Mn(e)?$n(e):e.contextElement?$n(e.contextElement):[],popper:$n(a)};const o=function(e){const n=dt(e);return ct.reduce(((e,t)=>e.concat(n.filter((e=>e.phase===t)))),[])}(function(e){const n=e.reduce(((e,n)=>{const t=e[n.name];return e[n.name]=t?Object.assign(Object.assign(Object.assign({},t),n),{options:Object.assign(Object.assign({},t.options),n.options),data:Object.assign(Object.assign({},t.data),n.data)}):n,e}),{});return Object.keys(n).map((e=>n[e]))}([...n,...s.options.modifiers]));return s.orderedModifiers=o.filter((e=>e.enabled)),s.orderedModifiers.forEach((({name:e,options:n={},effect:t})=>{if("function"==typeof t){const a=t({state:s,name:e,instance:r,options:n}),i=()=>{};l.push(a||i)}})),r.update()},forceUpdate(){if(o)return;const{reference:e,popper:n}=s.elements;if(Nt(e,n)){s.rects={reference:Gn(e,qn(n),"fixed"===s.options.strategy),popper:Hn(n)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((e=>s.modifiersData[e.name]=Object.assign({},e.data)));for(let e=0;e<s.orderedModifiers.length;e++){if(!0===s.reset){s.reset=!1,e=-1;continue}const{fn:n,options:t={},name:a}=s.orderedModifiers[e];"function"==typeof n&&(s=n({state:s,options:t,name:a,instance:r})||s)}}},update:pt((()=>new Promise((e=>{r.forceUpdate(),e(s)})))),destroy(){c(),o=!0}};if(!Nt(e,a))return r;function c(){l.forEach((e=>e())),l=[]}return r.setOptions(i).then((e=>{!o&&i.onFirstUpdate&&i.onFirstUpdate(e)})),r}}Ct();const St={passive:!0};const _t={top:"auto",right:"auto",bottom:"auto",left:"auto"};function kt({popper:e,popperRect:n,placement:t,offsets:a,position:i,gpuAcceleration:s,adaptive:l}){let{x:o,y:r}=function({x:e,y:n}){const t=window.devicePixelRatio||1;return{x:Math.round(e*t)/t||0,y:Math.round(n*t)/t||0}}(a);const c=a.hasOwnProperty("x"),d=a.hasOwnProperty("y");let p=Jn,m=Kn;const f=window;if(l){let a=qn(e);a===En(e)&&(a=An(e)),t===Kn&&(m=Zn,r-=a.clientHeight-n.height,r*=s?1:-1),t===Jn&&(p=Yn,o-=a.clientWidth-n.width,o*=s?1:-1)}const u=Object.assign({position:i},l&&_t);return s?Object.assign(Object.assign({},u),{[m]:d?"0":"",[p]:c?"0":"",transform:(f.devicePixelRatio||1)<2?`translate(${o}px, ${r}px)`:`translate3d(${o}px, ${r}px, 0)`}):Object.assign(Object.assign({},u),{[m]:d?`${r}px`:"",[p]:c?`${o}px`:"",transform:""})}var Lt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function({state:e,options:n,name:t}){const{offset:a=[0,0]}=n,i=rt.reduce(((n,t)=>(n[t]=function(e,n,t){const a=mt(e),i=[Jn,Kn].indexOf(a)>=0?-1:1;let[s,l]="function"==typeof t?t(Object.assign(Object.assign({},n),{placement:e})):t;return s=s||0,l=(l||0)*i,[Jn,Yn].indexOf(a)>=0?{x:l,y:s}:{x:s,y:l}}(t,e.rects,a),n)),{}),{x:s,y:l}=i[e.placement];null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=s,e.modifiersData.popperOffsets.y+=l),e.modifiersData[t]=i}};const It={left:"right",right:"left",bottom:"top",top:"bottom"};function Tt(e){return e.replace(/left|right|bottom|top/g,(e=>It[e]))}const Et={start:"end",end:"start"};function Dt(e){return e.replace(/start|end/g,(e=>Et[e]))}function Mt(e,n={}){const{placement:t,boundary:a,rootBoundary:i,padding:s,flipVariations:l,allowedAutoPlacements:o=rt}=n,r=xt(t),c=r?l?ot:ot.filter((e=>xt(e)===r)):et;let d=c.filter((e=>o.indexOf(e)>=0));0===d.length&&(d=c);const p=d.reduce(((n,t)=>(n[t]=wt(e,{placement:t,boundary:a,rootBoundary:i,padding:s})[mt(t)],n)),{});return Object.keys(p).sort(((e,n)=>p[e]-p[n]))}var Rt={name:"flip",enabled:!0,phase:"main",fn:function({state:e,options:n,name:t}){if(e.modifiersData[t]._skip)return;const{mainAxis:a=!0,altAxis:i=!0,fallbackPlacements:s,padding:l,boundary:o,rootBoundary:r,altBoundary:c,flipVariations:d=!0,allowedAutoPlacements:p}=n,m=e.options.placement,f=mt(m),u=[m,...s||(f===m||!d?[Tt(m)]:function(e){if(mt(e)===Qn)return[];const n=Tt(e);return[Dt(e),n,Dt(n)]}(m))].reduce(((n,t)=>n.concat(mt(t)===Qn?Mt(e,{placement:t,boundary:o,rootBoundary:r,padding:l,flipVariations:d,allowedAutoPlacements:p}):t)),[]),g=e.rects.reference,h=e.rects.popper,x=new Map;let v=!0,b=u[0];for(let n=0;n<u.length;n++){const t=u[n],s=mt(t),d=xt(t)===nt,p=[Kn,Zn].indexOf(s)>=0,m=p?"width":"height",f=wt(e,{placement:t,boundary:o,rootBoundary:r,altBoundary:c,padding:l});let y=p?d?Yn:Jn:d?Zn:Kn;g[m]>h[m]&&(y=Tt(y));const O=Tt(y),w=[];if(a&&w.push(f[s]<=0),i&&w.push(f[y]<=0,f[O]<=0),w.every((e=>e))){b=t,v=!1;break}x.set(t,w)}if(v){for(let e=d?3:1;e>0;e--){const n=u.find((n=>{const t=x.get(n);if(t)return t.slice(0,e).every((e=>e))}));if(n){b=n;break}}}e.placement!==b&&(e.modifiersData[t]._skip=!0,e.placement=b,e.reset=!0)},requiresIfExists:["offset"],data:{_skip:!1}};function Pt(e,n,t){return Math.max(e,Math.min(n,t))}var At={name:"preventOverflow",enabled:!0,phase:"main",fn:function({state:e,options:n,name:t}){const{mainAxis:a=!0,altAxis:i=!1,boundary:s,rootBoundary:l,altBoundary:o,padding:r,tether:c=!0,tetherOffset:d=0}=n,p=wt(e,{boundary:s,rootBoundary:l,padding:r,altBoundary:o}),m=mt(e.placement),f=xt(e.placement),u=!f,g=vt(m),h="x"===g?"y":"x",x=e.modifiersData.popperOffsets,v=e.rects.reference,b=e.rects.popper,y="function"==typeof d?d(Object.assign(Object.assign({},e.rects),{placement:e.placement})):d,O={x:0,y:0};if(x){if(a){const n="y"===g?Kn:Jn,t="y"===g?Zn:Yn,a="y"===g?"height":"width",i=x[g],s=x[g]+p[n],l=x[g]-p[t],o=c?-b[a]/2:0,r=f===nt?v[a]:b[a],d=f===nt?-b[a]:-v[a],m=e.elements.arrow,h=c&&m?Hn(m):{width:0,height:0},w=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},j=w[n],N=w[t],C=Pt(0,v[a],h[a]),S=u?v[a]/2-o-C-j-y:r-C-j-y,_=u?-v[a]/2+o+C+N+y:d+C+N+y,k=e.elements.arrow&&qn(e.elements.arrow),L=k?"y"===g?k.clientTop||0:k.clientLeft||0:0,I=e.modifiersData.offset?e.modifiersData.offset[e.placement][g]:0,T=x[g]+S-I-L,E=x[g]+_-I,D=Pt(c?Math.min(s,T):s,i,c?Math.max(l,E):l);x[g]=D,O[g]=D-i}if(i){const e="x"===g?Kn:Jn,n="x"===g?Zn:Yn,t=x[h],a=Pt(t+p[e],t,t-p[n]);x[h]=a,O[h]=a-t}e.modifiersData[t]=O}},requiresIfExists:["offset"]};var Bt={name:"arrow",enabled:!0,phase:"main",fn:function({state:e,name:n}){const t=e.elements.arrow,a=e.modifiersData.popperOffsets,i=mt(e.placement),s=vt(i),l=[Jn,Yn].indexOf(i)>=0?"height":"width";if(!t||!a)return;const o=e.modifiersData[`${n}#persistent`].padding,r=Hn(t),c="y"===s?Kn:Jn,d="y"===s?Zn:Yn,p=e.rects.reference[l]+e.rects.reference[s]-a[s]-e.rects.popper[l],m=a[s]-e.rects.reference[s],f=qn(t),u=f?"y"===s?f.clientHeight||0:f.clientWidth||0:0,g=p/2-m/2,h=o[c],x=u-r[l]-o[d],v=u/2-r[l]/2+g,b=Pt(h,v,x),y=s;e.modifiersData[n]={[y]:b,centerOffset:b-v}},effect:function({state:e,options:n,name:t}){let{element:a="[data-popper-arrow]",padding:i=0}=n;null!=a&&("string"!=typeof a||(a=e.elements.popper.querySelector(a),a))&&ft(e.elements.popper,a)&&(e.elements.arrow=a,e.modifiersData[`${t}#persistent`]={padding:yt("number"!=typeof i?i:Ot(i,et))})},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ft(e,n,t={x:0,y:0}){return{top:e.top-n.height-t.y,right:e.right-n.width+t.x,bottom:e.bottom-n.height+t.y,left:e.left-n.width-t.x}}function zt(e){return[Kn,Yn,Zn,Jn].some((n=>e[n]>=0))}const Gt=Ct({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:()=>{},effect:function({state:e,instance:n,options:t}){const{scroll:a=!0,resize:i=!0}=t,s=En(e.elements.popper),l=[...e.scrollParents.reference,...e.scrollParents.popper];return a&&l.forEach((e=>{e.addEventListener("scroll",n.update,St)})),i&&s.addEventListener("resize",n.update,St),()=>{a&&l.forEach((e=>{e.removeEventListener("scroll",n.update,St)})),i&&s.removeEventListener("resize",n.update,St)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function({state:e,name:n}){e.modifiersData[n]=bt({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function({state:e,options:n}){const{gpuAcceleration:t=!0,adaptive:a=!0}=n,i={placement:mt(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:t};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign(Object.assign({},e.styles.popper),kt(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),kt(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((n=>{const t=e.styles[n]||{},a=e.attributes[n]||{},i=e.elements[n];Rn(i)&&Pn(i)&&(Object.assign(i.style,t),Object.keys(a).forEach((e=>{const n=a[e];!1===n?i.removeAttribute(e):i.setAttribute(e,!0===n?"":n)})))}))},effect:function({state:e}){const n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),()=>{Object.keys(e.elements).forEach((t=>{const a=e.elements[t],i=e.attributes[t]||{},s=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]).reduce(((e,n)=>(e[n]="",e)),{});Rn(a)&&Pn(a)&&(Object.assign(a.style,s),Object.keys(i).forEach((e=>{a.removeAttribute(e)})))}))}},requires:["computeStyles"]},Lt,Rt,At,Bt,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function({state:e,name:n}){const t=e.rects.reference,a=e.rects.popper,i=e.modifiersData.preventOverflow,s=wt(e,{elementContext:"reference"}),l=wt(e,{altBoundary:!0}),o=Ft(s,t),r=Ft(l,a,i),c=zt(o),d=zt(r);e.modifiersData[n]={referenceClippingOffsets:o,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})}}]}),Ht=jn?n.useLayoutEffect:n.useEffect,Vt=e=>e.reduce(((e,[n,t])=>(e[n]=t,e)),{}),Xt=[];const $t=(e,t,a={})=>{const i=n.useRef(null),s={onFirstUpdate:a.onFirstUpdate,placement:a.placement||"bottom",strategy:a.strategy||"absolute",modifiers:a.modifiers||Xt},[l,o]=n.useState({styles:{popper:{position:s.strategy,left:"0",top:"0"}},attributes:{}}),r=n.useMemo((()=>({name:"updateState",enabled:!0,phase:"write",fn:({state:e})=>{const n=Object.keys(e.elements);o({styles:Vt(n.map((n=>[n,e.styles[n]||{}]))),attributes:Vt(n.map((n=>[n,e.attributes[n]])))})},requires:["computeStyles"]})),[]),c=n.useMemo((()=>{const e={onFirstUpdate:s.onFirstUpdate,placement:s.placement,strategy:s.strategy,modifiers:[...s.modifiers,r,{name:"applyStyles",enabled:!1}]};return n=i.current,t=e,JSON.stringify(n)===JSON.stringify(t)?i.current||e:(i.current=e,e);var n,t}),[s.onFirstUpdate,s.placement,s.strategy,s.modifiers,r]),d=n.useRef(void 0);return Ht((()=>{d&&d.current&&d.current.setOptions(c)}),[c]),Ht((()=>{if(null==e||null==t)return;if(!function(e){if(e instanceof Element)return e.isConnected;const{contextElement:n}=e;return!(n instanceof Element)||n.isConnected}(e)||!t.isConnected)return;const n=(a.createPopper||Gt)(e,t,c);return d.current=n,()=>{n.destroy(),d.current=null}}),[e,t,a.createPopper]),{state:d.current?d.current.state:null,styles:l.styles,attributes:l.attributes,update:d.current?d.current.update:null,forceUpdate:d.current?d.current.forceUpdate:null}},Wt={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"},Ut=e=>`opacity ${e}ms cubic-bezier(.54, 1.5, .38, 1.11)`,qt=({trigger:e,popper:t,direction:a="down",position:s="start",placement:l,width:o,minWidth:r="trigger",maxWidth:c,appendTo:d=(()=>document.body),zIndex:p=9999,isVisible:m=!0,positionModifiers:f,distance:u=0,offset:g,onMouseEnter:h,onMouseLeave:b,onFocus:y,onBlur:O,onDocumentClick:w,onTriggerClick:j,onTriggerEnter:N,onPopperClick:C,onPopperMouseEnter:S,onPopperMouseLeave:_,onDocumentKeyDown:k,enableFlip:L=!0,flipBehavior:I="flip",triggerRef:T,popperRef:E,animationDuration:D=0,entryDelay:M=0,exitDelay:R=0,onHidden:P=(()=>{}),onHide:A=(()=>{}),onMount:B=(()=>{}),onShow:F=(()=>{}),onShown:z=(()=>{}),preventOverflow:G=!1})=>{var H;const[V,X]=n.useState(null),[$,W]=n.useState(null),[U,q]=n.useState(null),[K,Z]=n.useState(null),[Y,J]=n.useState(!1),[Q,ee]=n.useState(0),[ne,te]=n.useState(m),ae=n.useRef(null),ie=n.useRef(null),se=n.useRef(null),le=n.useRef(void 0),oe=$||V,re=m||ne,ce=null===(H=(null==T?void 0:T.current)||V)||void 0===H?void 0:H.parentElement,de=kn(ce),pe=n.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)}[de][s]}),[s,de]),me=n.useCallback((e=>w(e,oe,U)),[re,V