UNPKG

@patternfly/react-core

Version:

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

40 lines (36 loc) • 545 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){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function i(e){if(e&&e.__esModule)return 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 l=i(t),s=a(t),o=i(n); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ function r(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 c(e,t,n,a){return new(n||(n=Promise))((function(i,l){function s(e){try{r(a.next(e))}catch(e){l(e)}}function o(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(s,o)}r((a=a.apply(e,t||[])).next())}))}function d(...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=d(...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(" ")}Promise.resolve().then((function(){return LC}));var p="pf-c-backdrop",m="pf-c-backdrop__open";const u={ARROW_UP:38,ARROW_DOWN:40,ESCAPE_KEY:27,TAB:9,ENTER:13,SPACE:32},f={RIGHT:"right",LEFT:"left",BOTH:"both",NONE:"none"},h={UP:"up",DOWN:"down",RIGHT:"right",LEFT:"left"};var g;e.ValidatedOptions=void 0,(g=e.ValidatedOptions||(e.ValidatedOptions={})).success="success",g.error="error",g.warning="warning",g.default="default";const b={Tab:"Tab",Space:" ",Escape:"Escape",Enter:"Enter",ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight"}; /*! * tabbable 5.1.4 * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE */var v,x=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],y=x.join(","),O="undefined"==typeof Element?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,C=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return isNaN(t)?function(e){return"true"===e.contentEditable}(e)?0:"AUDIO"!==e.nodeName&&"VIDEO"!==e.nodeName&&"DETAILS"!==e.nodeName||null!==e.getAttribute("tabindex")?e.tabIndex:0:t},E=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},N=function(e){return"INPUT"===e.tagName},_=function(e){return function(e){return N(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}((e.form||e.ownerDocument).querySelectorAll('input[type="radio"][name="'+e.name+'"]'),e.form);return!t||t===e}(e)},w=function(e){return!(e.disabled||function(e){return N(e)&&"hidden"===e.type}(e)||function(e){if("hidden"===getComputedStyle(e).visibility)return!0;var t=O.call(e,"details>summary:first-of-type")?e.parentElement:e;if(O.call(t,"details:not([open]) *"))return!0;for(;e;){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}(e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(e))},S=function(e){return!(!w(e)||_(e)||C(e)<0)},T=function(e,t){var n=[],a=[],i=function(e,t,n){var a=Array.prototype.slice.apply(e.querySelectorAll(y));return t&&O.call(e,y)&&a.unshift(e),a.filter(n)}(e,(t=t||{}).includeContainer,S);return i.forEach((function(e,t){var i=C(e);0===i?n.push(e):a.push({documentOrder:t,tabIndex:i,node:e})})),a.sort(E).map((function(e){return e.node})).concat(n)},I=x.concat("iframe").join(","),L=function(e){if(!e)throw new Error("No node provided");return!1!==O.call(e,I)&&w(e)}; /*! * focus-trap 6.2.2 * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE */ function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D(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}var P,R=(P=[],{activateTrap:function(e){if(P.length>0){var t=P[P.length-1];t!==e&&t.pause()}var n=P.indexOf(e);-1===n||P.splice(n,1),P.push(e)},deactivateTrap:function(e){var t=P.indexOf(e);-1!==t&&P.splice(t,1),P.length>0&&P[P.length-1].unpause()}}),M=function(e){return setTimeout(e,0)},A=function(e,t){var n,a=document,i=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D(Object(n),!0).forEach((function(t){k(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},t),l={containers:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1},s=function(e){return l.containers.some((function(t){return t.contains(e)}))},o=function(e){var t=i[e];if(!t)return null;var n=t;if("string"==typeof t&&!(n=a.querySelector(t)))throw new Error("`".concat(e,"` refers to no known node"));if("function"==typeof t&&!(n=t()))throw new Error("`".concat(e,"` did not return a node"));return n},r=function(){var e;if(null!==o("initialFocus"))e=o("initialFocus");else if(s(a.activeElement))e=a.activeElement;else{var t=l.tabbableGroups[0];e=t&&t.firstTabbableNode||o("fallbackFocus")}if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");return e},c=function(){if(l.tabbableGroups=l.containers.map((function(e){var t=T(e);if(t.length>0)return{firstTabbableNode:t[0],lastTabbableNode:t[t.length-1]}})).filter((function(e){return!!e})),l.tabbableGroups.length<=0&&!o("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},d=function e(t){t!==a.activeElement&&(t&&t.focus?(t.focus({preventScroll:!!i.preventScroll}),l.mostRecentlyFocusedNode=t,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(t)&&t.select()):e(r()))},p=function(e){s(e.target)||(i.clickOutsideDeactivates?n.deactivate({returnFocus:i.returnFocusOnDeactivate&&!L(e.target)}):i.allowOutsideClick&&("boolean"==typeof i.allowOutsideClick?i.allowOutsideClick:i.allowOutsideClick(e))||e.preventDefault())},m=function(e){var t=s(e.target);t||e.target instanceof Document?t&&(l.mostRecentlyFocusedNode=e.target):(e.stopImmediatePropagation(),d(l.mostRecentlyFocusedNode||r()))},u=function(e){if(!1!==i.escapeDeactivates&&function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e))return e.preventDefault(),void n.deactivate();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){c();var t=null;if(l.tabbableGroups.length>0)if(e.shiftKey){var n=l.tabbableGroups.findIndex((function(t){var n=t.firstTabbableNode;return e.target===n}));if(n>=0){var a=0===n?l.tabbableGroups.length-1:n-1;t=l.tabbableGroups[a].lastTabbableNode}}else{var i=l.tabbableGroups.findIndex((function(t){var n=t.lastTabbableNode;return e.target===n}));if(i>=0){var s=i===l.tabbableGroups.length-1?0:i+1;t=l.tabbableGroups[s].firstTabbableNode}}else t=o("fallbackFocus");t&&(e.preventDefault(),d(t))}(e)},f=function(e){i.clickOutsideDeactivates||s(e.target)||i.allowOutsideClick&&("boolean"==typeof i.allowOutsideClick?i.allowOutsideClick:i.allowOutsideClick(e))||(e.preventDefault(),e.stopImmediatePropagation())},h=function(){if(l.active)return R.activateTrap(n),v=i.delayInitialFocus?M((function(){d(r())})):d(r()),a.addEventListener("focusin",m,!0),a.addEventListener("mousedown",p,{capture:!0,passive:!1}),a.addEventListener("touchstart",p,{capture:!0,passive:!1}),a.addEventListener("click",f,{capture:!0,passive:!1}),a.addEventListener("keydown",u,{capture:!0,passive:!1}),n},g=function(){if(l.active)return a.removeEventListener("focusin",m,!0),a.removeEventListener("mousedown",p,!0),a.removeEventListener("touchstart",p,!0),a.removeEventListener("click",f,!0),a.removeEventListener("keydown",u,!0),n};return(n={activate:function(e){if(l.active)return this;c(),l.active=!0,l.paused=!1,l.nodeFocusedBeforeActivation=a.activeElement;var t=e&&e.onActivate?e.onActivate:i.onActivate;return t&&t(),h(),this},deactivate:function(e){if(!l.active)return this;clearTimeout(v),g(),l.active=!1,l.paused=!1,R.deactivateTrap(n);var t=e&&void 0!==e.onDeactivate?e.onDeactivate:i.onDeactivate;return t&&t(),(e&&void 0!==e.returnFocus?e.returnFocus:i.returnFocusOnDeactivate)&&M((function(){var e;d((e=l.nodeFocusedBeforeActivation,o("setReturnFocus")||e))})),this},pause:function(){return l.paused||!l.active||(l.paused=!0,g()),this},unpause:function(){return l.paused&&l.active?(l.paused=!1,c(),h(),this):this},updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return l.containers=t.map((function(e){return"string"==typeof e?a.querySelector(e):e})),l.active&&c(),this}}).updateContainerElements(e),n};class j extends l.Component{constructor(e){super(e),this.divRef=l.createRef(),"undefined"!=typeof document&&(this.previouslyFocusedElement=document.activeElement)}componentDidMount(){this.focusTrap=A(this.divRef.current,Object.assign(Object.assign({},this.props.focusTrapOptions),{returnFocusOnDeactivate:!1})),this.props.active&&this.focusTrap.activate(),this.props.paused&&this.focusTrap.pause()}componentDidUpdate(e){e.active&&!this.props.active?this.focusTrap.deactivate():!e.active&&this.props.active&&this.focusTrap.activate(),e.paused&&!this.props.paused?this.focusTrap.unpause():!e.paused&&this.props.paused&&this.focusTrap.pause()}componentWillUnmount(){this.focusTrap.deactivate(),!1!==this.props.focusTrapOptions.returnFocusOnDeactivate&&this.previouslyFocusedElement&&this.previouslyFocusedElement.focus&&this.previouslyFocusedElement.focus({preventScroll:this.props.preventScrollOnDeactivate})}render(){const e=this.props,{children:t,className:n,focusTrapOptions:a,active:i,paused:s,preventScrollOnDeactivate:o}=e,c=r(e,["children","className","focusTrapOptions","active","paused","preventScrollOnDeactivate"]);return l.createElement("div",Object.assign({ref:this.divRef,className:n},c),t)}}j.displayName="FocusTrap",j.defaultProps={active:!0,paused:!1,focusTrapOptions:{},preventScrollOnDeactivate:!1};let B=0;class F extends l.Component{constructor(){super(...arguments),this.id=`${this.props.prefix}${B++}`}render(){return this.props.children(this.id)}}F.displayName="GenerateId",F.defaultProps={prefix:"pf-random-id-"};let z=0;const V="OUIA-Generated-",H={};function $(e,t,n=!0){return{"data-ouia-component-type":`PF4/${e}`,"data-ouia-safe":n,"data-ouia-component-id":t}}const W=(e,t,n=!0,a)=>({"data-ouia-component-type":`PF4/${e}`,"data-ouia-safe":n,"data-ouia-component-id":G(e,t,a)}),G=(e,n,a)=>void 0!==n?n:t.useMemo((()=>X(e,a)),[e,a]);function X(e,t){try{let n;return n="undefined"!=typeof window?`${window.location.href}-${e}-${t||""}`:`${e}-${t||""}`,H[n]||(H[n]=0),`${V}${e}-${t?`${t}-`:""}${++H[n]}`}catch(n){return`${V}${e}-${t?`${t}-`:""}${++z}`}}function K(e){return e[0].toUpperCase()+e.substring(1)}function U(e="pf"){return`${e}-${(new Date).getTime()+Math.random().toString(36).slice(2)}`}function q(e,t){let n;return(...a)=>{clearTimeout(n),n=setTimeout((()=>e.apply(this,a)),t)}}function Y(e,t,n,a=!1){if(!e||!t)return!1;const i=e.getBoundingClientRect(),l=t.getBoundingClientRect(),s=Math.ceil(i.left),o=Math.floor(i.right),r=Math.ceil(l.left),c=Math.floor(l.right),d=r>=s&&c<=o,p=(n||!a&&i.width<l.width)&&(r<s&&c>s||c>o&&r<o);return d||p}function J(e,t){return e.replace(/\${(.*?)}/g,((e,n)=>t[n]||""))}function Z(e,t,n,a,i,l=!1){if(!Array.isArray(i))return;const s=a.filter((e=>e))[0].constructor===Array;let r=e,c=t;if("up"===n?r=0===e?i.length-1:e-1:"down"===n?r=e===i.length-1?0:e+1:"left"===n?c=0===t?a[e].length-1:t-1:"right"===n&&(c=t===a[e].length-1?0:t+1),null===a[r]||void 0===a[r]||s&&(null===a[r][c]||void 0===a[r][c]))Z(r,c,n,a,i,l);else if(l){a[r].focus&&a[r].focus();o.findDOMNode(a[r]).focus()}else"tab"!==n&&(s?a[r][c].focus():a[r].focus())}function Q(e,t){const n=e.current.querySelectorAll(t);return Array.prototype.filter.call(n,(function(e){return e.tabIndex>="0"}))}function ee(e,t,n){let a;return a="up"===t?0===e?n.length-1:e-1:e===n.length-1?0:e+1,void 0===n[a]||null===n[a][0]?ee(a,t,n):a}function te(e,t,n){return n||(n=`${t}s`),`${e||0} ${1===e?t:n}`}const ne=(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})),{}),ae=(e,t,n="",a)=>{if(!e)return"";if(a){if(a in e)return t.modifiers[se(`${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[se(`${n}${e[i[l]]}`)];return""}return Object.entries(e||{}).map((([e,t])=>`${n}${t}${"default"!==e?`-on-${e}`:""}`)).map(se).map((e=>e.replace(/-?(\dxl)/gi,((e,t)=>`_${t}`)))).map((e=>t.modifiers[e])).filter(Boolean).join(" ")},ie=e=>null===e?null:e>=1450?"2xl":e>=1200?"xl":e>=992?"lg":e>=768?"md":e>=576?"sm":"default",le=e=>e.toUpperCase().replace("-","").replace("_",""),se=e=>e.replace(/([-_][a-z])/gi,le),oe=!("undefined"==typeof window||!window.document||!window.document.createElement),re=(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},ce=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}},de=(e,t)=>{const n=ce(e).width;let a=t;if(re(t,e)>n){for(;re(`...${a}`,e)>n;)a=a.substring(1);e.value?e.value=`...${a}`:e.innerText=`...${a}`}else e.value?e.value=t:e.innerText=t},pe=e=>e.reduce(((e,t)=>Object.assign(Object.assign({},e),{[t]:e=>{e.preventDefault()}})),{});class me extends l.Component{componentDidMount(){const e=o.findDOMNode(this);this.props.onFoundRef(e)}render(){return this.props.children||null}}function ue(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 fe(e){if("[object Window]"!==e.toString()){const t=e.ownerDocument;return t?t.defaultView:window}return e}function he(e){const t=fe(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function ge(e){return e instanceof fe(e).Element||e instanceof Element}function be(e){return e instanceof fe(e).HTMLElement||e instanceof HTMLElement}function ve(e){return e?(e.nodeName||"").toLowerCase():null}function xe(e){return(ge(e)?e.ownerDocument:e.document).documentElement}function ye(e){return ue(xe(e)).left+he(e).scrollLeft}function Oe(e){return fe(e).getComputedStyle(e)}function Ce(e){const{overflow:t,overflowX:n,overflowY:a}=Oe(e);return/auto|scroll|overlay|hidden/.test(t+a+n)}function Ee(e,t,n=!1){const a=xe(t),i=ue(e),l=be(t);let s={scrollLeft:0,scrollTop:0},o={x:0,y:0};var r,c;return(l||!l&&!n)&&(("body"!==ve(t)||Ce(a))&&(s=(r=t)!==fe(r)&&be(r)?{scrollLeft:(c=r).scrollLeft,scrollTop:c.scrollTop}:he(r)),be(t)?(o=ue(t),o.x+=t.clientLeft,o.y+=t.clientTop):a&&(o.x=ye(a))),{x:i.left+s.scrollLeft-o.x,y:i.top+s.scrollTop-o.y,width:i.width,height:i.height}}function Ne(e){return{x:e.offsetLeft,y:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}}function _e(e){return"html"===ve(e)?e:e.assignedSlot||e.parentNode||e.host||xe(e)}function we(e){return["html","body","#document"].indexOf(ve(e))>=0?e.ownerDocument.body:be(e)&&Ce(e)?e:we(_e(e))}function Se(e,t=[]){const n=we(e),a="body"===ve(n),i=fe(n),l=a?[i].concat(i.visualViewport||[],Ce(n)?n:[]):n,s=t.concat(l);return a?s:s.concat(Se(_e(l)))}function Te(e){return["table","td","th"].indexOf(ve(e))>=0}function Ie(e){if(!be(e)||"fixed"===Oe(e).position)return null;const t=e.offsetParent;if(t){const e=xe(t);if("body"===ve(t)&&"static"===Oe(t).position&&"static"!==Oe(e).position)return e}return t}function Le(e){const t=fe(e);let n=Ie(e);for(;n&&Te(n)&&"static"===Oe(n).position;)n=Ie(n);return n&&"body"===ve(n)&&"static"===Oe(n).position?t:n||function(e){let t=_e(e);for(;be(t)&&["html","body"].indexOf(ve(t))<0;){const e=Oe(t);if("none"!==e.transform||"none"!==e.perspective||e.willChange&&"auto"!==e.willChange)return t;t=t.parentNode}return null}(e)||t}me.displayName="FindRefWrapper";const ke="top",De="bottom",Pe="right",Re="left",Me="auto",Ae=[ke,De,Pe,Re],je="start",Be="end",Fe="clippingParents",ze="viewport",Ve="popper",He=Ae.reduce(((e,t)=>e.concat([`${t}-start`,`${t}-end`])),[]),$e=[...Ae,Me].reduce(((e,t)=>e.concat([t,`${t}-start`,`${t}-end`])),[]),We=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Ge(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 Xe(e){let t;return()=>(t||(t=new Promise((n=>{Promise.resolve().then((()=>{t=void 0,n(e())}))}))),t)}function Ke(e){return e.split("-")[0]}function Ue(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 qe(e){return Object.assign(Object.assign({},e),{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Ye(e,t){return t===ze?qe(function(e){const t=fe(e),n=xe(e),a=t.visualViewport;let i=n.clientWidth,l=n.clientHeight,s=0,o=0;return a&&(i=a.width,l=a.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=a.offsetLeft,o=a.offsetTop)),{width:i,height:l,x:s+ye(e),y:o}}(e)):be(t)?function(e){const t=ue(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):qe(function(e){const t=xe(e),n=he(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 s=-n.scrollLeft+ye(e);const o=-n.scrollTop;return"rtl"===Oe(a||t).direction&&(s+=Math.max(t.clientWidth,a?a.clientWidth:0)-i),{width:i,height:l,x:s,y:o}}(xe(e)))}function Je(e,t,n){const a="clippingParents"===t?function(e){const t=Se(_e(e)),n=["absolute","fixed"].indexOf(Oe(e).position)>=0&&be(e)?Le(e):e;return ge(n)?t.filter((e=>ge(e)&&Ue(e,n)&&"body"!==ve(e))):[]}(e):[].concat(t),i=[...a,n],l=i[0],s=i.reduce(((t,n)=>{const a=Ye(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}),Ye(e,l));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Ze(e){return e.split("-")[1]}function Qe(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function et({reference:e,element:t,placement:n}){const a=n?Ke(n):null,i=n?Ze(n):null,l=e.x+e.width/2-t.width/2,s=e.y+e.height/2-t.height/2;let o;switch(a){case ke:o={x:l,y:e.y-t.height};break;case De:o={x:l,y:e.y+e.height};break;case Pe:o={x:e.x+e.width,y:s};break;case Re:o={x:e.x-t.width,y:s};break;default:o={x:e.x,y:e.y}}const r=a?Qe(a):null;if(null!=r){const n="y"===r?"height":"width";switch(i){case je:o[r]=Math.floor(o[r])-Math.floor(e[n]/2-t[n]/2);break;case Be:o[r]=Math.floor(o[r])+Math.ceil(e[n]/2-t[n]/2)}}return o}function tt(e){return Object.assign(Object.assign({},{top:0,right:0,bottom:0,left:0}),e)}function nt(e,t){return t.reduce(((t,n)=>(t[n]=e,t)),{})}function at(e,t={}){const{placement:n=e.placement,boundary:a=Fe,rootBoundary:i=ze,elementContext:l=Ve,altBoundary:s=!1,padding:o=0}=t,r=tt("number"!=typeof o?o:nt(o,Ae)),c=l===Ve?"reference":Ve,d=e.elements.reference,p=e.rects.popper,m=e.elements[s?c:l],u=Je(ge(m)?m:m.contextElement||xe(e.elements.popper),a,i),f=ue(d),h=et({reference:f,element:p,strategy:"absolute",placement:n}),g=qe(Object.assign(Object.assign({},p),h)),b=l===Ve?g: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===Ve&&x){const e=x[n];Object.keys(v).forEach((t=>{const n=[Pe,De].indexOf(t)>=0?1:-1,a=[ke,De].indexOf(t)>=0?"y":"x";v[t]+=e[a]*n}))}return v}const it={placement:"bottom",modifiers:[],strategy:"absolute"};function lt(...e){return!e.some((e=>!(e&&"function"==typeof e.getBoundingClientRect)))}const st={passive:!0};const ot={top:"auto",right:"auto",bottom:"auto",left:"auto"};function rt({popper:e,popperRect:t,placement:n,offsets:a,position:i,gpuAcceleration:l,adaptive:s}){let{x:o,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=Re,m=ke;const u=window;if(s){let a=Le(e);a===fe(e)&&(a=xe(e)),n===ke&&(m=De,r-=a.clientHeight-t.height,r*=l?1:-1),n===Re&&(p=Pe,o-=a.clientWidth-t.width,o*=l?1:-1)}const f=Object.assign({position:i},s&&ot);return l?Object.assign(Object.assign({},f),{[m]:d?"0":"",[p]:c?"0":"",transform:(u.devicePixelRatio||1)<2?`translate(${o}px, ${r}px)`:`translate3d(${o}px, ${r}px, 0)`}):Object.assign(Object.assign({},f),{[m]:d?`${r}px`:"",[p]:c?`${o}px`:"",transform:""})}var ct={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function({state:e,options:t,name:n}){const{offset:a=[0,0]}=t,i=$e.reduce(((t,n)=>(t[n]=function(e,t,n){const a=Ke(e),i=[Re,ke].indexOf(a)>=0?-1:1;let[l,s]="function"==typeof n?n(Object.assign(Object.assign({},t),{placement:e})):n;return l=l||0,s=(s||0)*i,[Re,Pe].indexOf(a)>=0?{x:s,y:l}:{x:l,y:s}}(n,e.rects,a),t)),{}),{x:l,y:s}=i[e.placement];null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=s),e.modifiersData[n]=i}};const dt={left:"right",right:"left",bottom:"top",top:"bottom"};function pt(e){return e.replace(/left|right|bottom|top/g,(e=>dt[e]))}const mt={start:"end",end:"start"};function ut(e){return e.replace(/start|end/g,(e=>mt[e]))}function ft(e,t={}){const{placement:n,boundary:a,rootBoundary:i,padding:l,flipVariations:s,allowedAutoPlacements:o=$e}=t,r=Ze(n),c=r?s?He:He.filter((e=>Ze(e)===r)):Ae;let d=c.filter((e=>o.indexOf(e)>=0));0===d.length&&(d=c);const p=d.reduce(((t,n)=>(t[n]=at(e,{placement:n,boundary:a,rootBoundary:i,padding:l})[Ke(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:s,boundary:o,rootBoundary:r,altBoundary:c,flipVariations:d=!0,allowedAutoPlacements:p}=t,m=e.options.placement,u=Ke(m),f=[m,...l||(u===m||!d?[pt(m)]:function(e){if(Ke(e)===Me)return[];const t=pt(e);return[ut(e),t,ut(t)]}(m))].reduce(((t,n)=>t.concat(Ke(n)===Me?ft(e,{placement:n,boundary:o,rootBoundary:r,padding:s,flipVariations:d,allowedAutoPlacements:p}):n)),[]),h=e.rects.reference,g=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=Ke(n),d=Ze(n)===je,p=[ke,De].indexOf(l)>=0,m=p?"width":"height",u=at(e,{placement:n,boundary:o,rootBoundary:r,altBoundary:c,padding:s});let y=p?d?Pe:Re:d?De:ke;h[m]>g[m]&&(y=pt(y));const O=pt(y),C=[];if(a&&C.push(u[l]<=0),i&&C.push(u[y]<=0,u[O]<=0),C.every((e=>e))){x=n,v=!1;break}b.set(n,C)}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 gt(e,t,n){return Math.max(e,Math.min(t,n))}var bt={name:"preventOverflow",enabled:!0,phase:"main",fn:function({state:e,options:t,name:n}){const{mainAxis:a=!0,altAxis:i=!1,boundary:l,rootBoundary:s,altBoundary:o,padding:r,tether:c=!0,tetherOffset:d=0}=t,p=at(e,{boundary:l,rootBoundary:s,padding:r,altBoundary:o}),m=Ke(e.placement),u=Ze(e.placement),f=!u,h=Qe(m),g="x"===h?"y":"x",b=e.modifiersData.popperOffsets,v=e.rects.reference,x=e.rects.popper,y="function"==typeof d?d(Object.assign(Object.assign({},e.rects),{placement:e.placement})):d,O={x:0,y:0};if(b){if(a){const t="y"===h?ke:Re,n="y"===h?De:Pe,a="y"===h?"height":"width",i=b[h],l=b[h]+p[t],s=b[h]-p[n],o=c?-x[a]/2:0,r=u===je?v[a]:x[a],d=u===je?-x[a]:-v[a],m=e.elements.arrow,g=c&&m?Ne(m):{width:0,height:0},C=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},E=C[t],N=C[n],_=gt(0,v[a],g[a]),w=f?v[a]/2-o-_-E-y:r-_-E-y,S=f?-v[a]/2+o+_+N+y:d+_+N+y,T=e.elements.arrow&&Le(e.elements.arrow),I=T?"y"===h?T.clientTop||0:T.clientLeft||0:0,L=e.modifiersData.offset?e.modifiersData.offset[e.placement][h]:0,k=b[h]+w-L-I,D=b[h]+S-L,P=gt(c?Math.min(l,k):l,i,c?Math.max(s,D):s);b[h]=P,O[h]=P-i}if(i){const e="x"===h?ke:Re,t="x"===h?De:Pe,n=b[g],a=gt(n+p[e],n,n-p[t]);b[g]=a,O[g]=a-n}e.modifiersData[n]=O}},requiresIfExists:["offset"]};var vt={name:"arrow",enabled:!0,phase:"main",fn:function({state:e,name:t}){const n=e.elements.arrow,a=e.modifiersData.popperOffsets,i=Ke(e.placement),l=Qe(i),s=[Re,Pe].indexOf(i)>=0?"height":"width";if(!n||!a)return;const o=e.modifiersData[`${t}#persistent`].padding,r=Ne(n),c="y"===l?ke:Re,d="y"===l?De:Pe,p=e.rects.reference[s]+e.rects.reference[l]-a[l]-e.rects.popper[s],m=a[l]-e.rects.reference[l],u=Le(n),f=u?"y"===l?u.clientHeight||0:u.clientWidth||0:0,h=p/2-m/2,g=o[c],b=f-r[s]-o[d],v=f/2-r[s]/2+h,x=gt(g,v,b),y=l;e.modifiersData[t]={[y]: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))&&Ue(e.elements.popper,a)&&(e.elements.arrow=a,e.modifiersData[`${n}#persistent`]={padding:tt("number"!=typeof i?i:nt(i,Ae))})},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function xt(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 yt(e){return[ke,Pe,De,Re].some((t=>e[t]>=0))}const Ot=function(e={}){const{defaultModifiers:t=[],defaultOptions:n=it}=e;return function(e,a,i=n){let l={placement:"bottom",orderedModifiers:[],options:Object.assign(Object.assign({},it),n),modifiersData:{},elements:{reference:e,popper:a},attributes:{},styles:{}},s=[],o=!1;const r={state:l,setOptions(i){c(),l.options=Object.assign(Object.assign(Object.assign({},n),l.options),i),l.scrollParents={reference:ge(e)?Se(e):e.contextElement?Se(e.contextElement):[],popper:Se(a)};const o=function(e){const t=Ge(e);return We.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=o.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=()=>{};s.push(a||i)}})),r.update()},forceUpdate(){if(o)return;const{reference:e,popper:t}=l.elements;if(lt(e,t)){l.rects={reference:Ee(e,Le(t),"fixed"===l.options.strategy),popper:Ne(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:Xe((()=>new Promise((e=>{r.forceUpdate(),e(l)})))),destroy(){c(),o=!0}};if(!lt(e,a))return r;function c(){s.forEach((e=>e())),s=[]}return r.setOptions(i).then((e=>{!o&&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=fe(e.elements.popper),s=[...e.scrollParents.reference,...e.scrollParents.popper];return a&&s.forEach((e=>{e.addEventListener("scroll",t.update,st)})),i&&l.addEventListener("resize",t.update,st),()=>{a&&s.forEach((e=>{e.removeEventListener("scroll",t.update,st)})),i&&l.removeEventListener("resize",t.update,st)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function({state:e,name:t}){e.modifiersData[t]=et({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:Ke(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),rt(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),rt(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];be(i)&&ve(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)),{});be(a)&&ve(a)&&(Object.assign(a.style,l),Object.keys(i).forEach((e=>{a.removeAttribute(e)})))}))}},requires:["computeStyles"]},ct,ht,bt,vt,{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=at(e,{elementContext:"reference"}),s=at(e,{altBoundary:!0}),o=xt(l,n),r=xt(s,a,i),c=yt(o),d=yt(r);e.modifiersData[t]={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})}}]}),Ct=oe?l.useLayoutEffect:l.useEffect,Et=e=>e.reduce(((e,[t,n])=>(e[t]=n,e)),{}),Nt=[],_t=(e,t,n={})=>{const a=l.useRef(null),i={onFirstUpdate:n.onFirstUpdate,placement:n.placement||"bottom",strategy:n.strategy||"absolute",modifiers:n.modifiers||Nt},[s,o]=l.useState({styles:{popper:{position:i.strategy,left:"0",top:"0"}},attributes:{}}),r=l.useMemo((()=>({name:"updateState",enabled:!0,phase:"write",fn:({state:e})=>{const t=Object.keys(e.elements);o({styles:Et(t.map((t=>[t,e.styles[t]||{}]))),attributes:Et(t.map((t=>[t,e.attributes[t]])))})},requires:["computeStyles"]})),[]),c=l.useMemo((()=>{const e={onFirstUpdate:i.onFirstUpdate,placement:i.placement,strategy:i.strategy,modifiers:[...i.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}),[i.onFirstUpdate,i.placement,i.strategy,i.modifiers,r]),d=l.useRef();return Ct((()=>{d&&d.current&&d.current.setOptions(c)}),[c]),Ct((()=>{if(null==e||null==t)return;const a=(n.createPopper||Ot)(e,t,c);return d.current=a,()=>{a.destroy(),d.current=null}}),[e,t,n.createPopper]),{state:d.current?d.current.state:null,styles:s.styles,attributes:s.attributes,update:d.current?d.current.update:null,forceUpdate:d.current?d.current.forceUpdate:null}},wt={left:"right",right:"left",bottom:"top",top:"bottom"},St=e=>`opacity ${e}ms cubic-bezier(.54, 1.5, .38, 1.11)`,Tt=({trigger:e,popper:t,popperMatchesTriggerWidth:n=!0,direction:a="down",position:i="left",placement:s,appendTo:r=(()=>document.body),zIndex:c=9999,isVisible:p=!0,positionModifiers:m,distance:u=0,onMouseEnter:f,onMouseLeave:h,onFocus:g,onBlur:b,onDocumentClick:v,onTriggerClick:x,onTriggerEnter:y,onPopperClick:O,onDocumentKeyDown:C,enableFlip:E=!0,flipBehavior:N="flip",reference:_})=>{const[w,S]=l.useState(null),[T,I]=l.useState(null),[L,k]=l.useState(null),[D,P]=l.useState(!1),R=T||w,M=l.useCallback((e=>v(e,R,L)),[p,w,T,L,v]);l.useEffect((()=>{P(!0)}),[]),l.useEffect((()=>{_&&(_.current?I(_.current):"function"==typeof _&&I(_()))}),[_]);const A=(e,t,n)=>{e&&t&&t.addEventListener(n,e)},j=(e,t,n)=>{e&&t&&t.removeEventListener(n,e)};l.useEffect((()=>{A(f,R,"mouseenter"),A(h,R,"mouseleave"),A(g,R,"focus"),A(b,R,"blur"),A(x,R,"click"),A(y,R,"keydown"),A(O,L,"click"),v&&A(M,document,"click"),A(C,document,"keydown");const e=new MutationObserver((()=>{W&&W()}));return L&&e.observe(L,{attributes:!0,childList:!0,subtree:!0}),()=>{j(f,R,"mouseenter"),j(h,R,"mouseleave"),j(g,R,"focus"),j(b,R,"blur"),j(x,R,"click"),j(y,R,"keydown"),j(O,L,"click"),v&&j(M,document,"click"),j(C,document,"keydown"),e.disconnect()}}),[w,L,f,h,g,b,x,y,O,v,C,T]);const B=()=>{if(s)return s;let e="up"===a?"top":"bottom";return"center"!==i&&(e=`${e}-${"right"===i?"end":"start"}`),e},F=l.useMemo(B,[a,i,s]),z=l.useMemo((()=>(e=>e.replace(/left|right|bottom|top/g,(e=>wt[e])))(B())),[a,i,s]),V=l.useMemo((()=>({name:"sameWidth",enabled:n,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>(e.elements.popper.style.width=`${e.elements.reference.offsetWidth}px`,()=>{})})),[n]),{styles:H,attributes:$,update:W}=_t(R,L,{placement:F,modifiers:[{name:"offset",options:{offset:[0,u]}},{name:"preventOverflow",enabled:!1},{name:"hide",enabled:!0},{name:"flip",enabled:F.startsWith("auto")||E,options:{fallbackPlacements:"flip"===N?[z]:N}},V]}),G=l.cloneElement(t,Object.assign({className:d(t.props&&t.props.className,m&&(()=>{if($&&$.popper&&$.popper["data-popper-placement"]){const e=$.popper["data-popper-placement"];return m[e]}return m.top})()),style:Object.assign(Object.assign(Object.assign({},t.props&&t.props.style||{}),H.popper),{zIndex:c})},$.popper));return l.createElement(l.Fragment,null,!_&&e&&l.createElement(me,{onFoundRef:e=>S(e)},e),D&&p&&o.createPortal(l.createElement(me,{onFoundRef:e=>k(e)},G),"function"==typeof r?r():r))};Tt.displayName="Popper";const It=(e,t,n=(e=>document.activeElement.contains(e)),a=(e=>e),i=["A","BUTTON","INPUT"],l=!1,s=!1,o=!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(!s&&["ArrowLeft","ArrowRight"].includes(d)){e.preventDefault(),e.stopImmediatePropagation();let a=-1;t.forEach(((l,s)=>{if(n(l)){const n=t[s].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&&(o&&(c.tabIndex=-1,p.tabIndex=0),p.focus())};class Lt extends l.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:s,noSpaceHandling:o,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;s||"Enter"===f&&(e.preventDefault(),e.stopImmediatePropagation(),document.activeElement.click()),o||" "===f&&(e.preventDefault(),e.stopImmediatePropagation(),document.activeElement.click()),It(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(){oe&&window.addEventListener("keydown",this.keyHandler)}componentWillUnmount(){oe&&window.removeEventListener("keydown",this.keyHandler)}render(){return null}}Lt.displayName="KeyboardHandler",Lt.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 kt=(e,t)=>{let n;if(oe){const{ResizeObserver:a}=window;if(e&&a){const i=new a((e=>{window.requestAnimationFrame((()=>{Array.isArray(e)&&e.length>0&&t()}))}));i.observe(e),n=()=>i.unobserve(e)}else window.addEventListener("resize",t),n=()=>window.removeEventListener("resize",t)}return()=>{n&&n()}};Promise.resolve().then((function(){return kC}));var Dt="pf-l-bullseye";Promise.resolve().then((function(){return DC}));var Pt="pf-c-about-modal-box",Rt="pf-c-about-modal-box__brand",Mt="pf-c-about-modal-box__brand-image",At="pf-c-about-modal-box__close",jt="pf-c-about-modal-box__content",Bt="pf-c-about-modal-box__header",Ft="pf-c-about-modal-box__hero",zt="pf-c-about-modal-box__strapline";Promise.resolve().then((function(){return PC}));var Vt="pf-c-content",Ht={visited:"pf-m-visited",overpassFont:"pf-m-overpass-font"};const $t=e=>{var{children:t,className:n="",trademark:a,id:i,noAboutModalBoxContentContainer:s=!1}=e,o=r(e,["children","className","trademark","id","noAboutModalBoxContentContainer"]);return l.createElement("div",Object.assign({className:d(jt,n),id:i},o),l.createElement("div",{className:d("pf-c-about-modal-box__body")},s?t:l.createElement("div",{className:d(Vt)},t)),l.createElement("p",{className:d(zt)},a))};$t.displayName="AboutModalBoxContent",Promise.resolve().then((function(){return RC}));var Wt,Gt,Xt={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",overpassFont:"pf-m-overpass-font"},title:"pf-c-title"};e.TitleSizes=void 0,(Wt=e.TitleSizes||(e.TitleSizes={})).md="md",Wt.lg="lg",Wt.xl="xl",Wt["2xl"]="2xl",Wt["3xl"]="3xl",Wt["4xl"]="4xl",function(e){e.h1="2xl",e.h2="xl",e.h3="lg",e.h4="md",e.h5="md",e.h6="md"}(Gt||(Gt={}));const Kt=e=>{var{className:t="",children:n="",headingLevel:a,size:i=Gt[a],ouiaId:s,ouiaSafe:o=!0}=e,c=r(e,["className","children","headingLevel","size","ouiaId","ouiaSafe"]);const p=W(Kt.displayName,s,o);return l.createElement(a,Object.assign({},p,c,{className:d(Xt.title,i&&Xt.modifiers[i],t)}),n)};Kt.displayName="Title";const Ut=e=>{var{className:t="",productName:n="",id:a}=e,i=r(e,["className","productName","id"]);return l.createElement("div",Object.assign({className:d(Bt,t)},i),l.createElement(Kt,{headingLevel:"h1",size:"4xl",id:a},n))};Ut.displayName="AboutModalBoxHeader";var qt={name:"--pf-c-about-modal-box__hero--sm--BackgroundImage",value:'url("../../assets/images/pfbg_992@2x.jpg")',var:"var(--pf-c-about-modal-box__hero--sm--BackgroundImage)"};const Yt=e=>{var{className:t,backgroundImageSrc:n}=e,a=r(e,["className","backgroundImageSrc"]);return l.createElement("div",Object.assign({style:""!==n?{[qt.name]:`url(${n})`}:{},className:d(Ft,t)},a))};Yt.displayName="AboutModalBoxHero";const Jt=e=>{var{className:t="",src:n="",alt:a}=e,i=r(e,["className","src","alt"]);return l.createElement("div",Object.assign({className:d(Rt,t)},i),l.createElement("img",{className:d(Mt),src:n,alt:a}))};Jt.displayName="AboutModalBoxBrand",Promise.resolve().then((function(){return MC}));var Zt={button:"pf-c-button",buttonIcon:"pf-c-button__icon",buttonProgress:"pf-c-button__progress",modifiers:{active:"pf-m-active",block:"pf-m-block",small:"pf-m-small",primary:"pf-m-primary",displayLg:"pf-m-display-lg",secondary:"pf-m-secondary",tertiary:"pf-m-tertiary",link:"pf-m-link",inline:"pf-m-inline",danger:"pf-m-danger",warning:"pf-m-warning",control:"pf-m-control",expanded:"pf-m-expanded",plain:"pf-m-plain",disabled:"pf-m-disabled",ariaDisabled:"pf-m-aria-disabled",progress:"pf-m-progress",inProgress:"pf-m-in-progress",start:"pf-m-start",end:"pf-m-end",overpassFont:"pf-m-overpass-font"},spinner:"pf-c-spinner"};Promise.resolve().then((function(){return AC}));var Qt,en={modifiers:{sm:"pf-m-sm",md:"pf-m-md",lg:"pf-m-lg",xl:"pf-m-xl"},spinner:"pf-c-spinner",spinnerClipper:"pf-c-spinner__clipper",spinnerLeadBall:"pf-c-spinner__lead-ball",spinnerPath:"pf-c-spinner__path",spinnerTailBall:"pf-c-spinner__tail-ball"};e.spinnerSize=void 0,(Qt=e.spinnerSize||(e.spinnerSize={})).sm="sm",Qt.md="md",Qt.lg="lg",Qt.xl="xl";const tn=e=>{var{className:t="",size:n="xl","aria-valuetext":a="Loading...",isSVG:i=!1,diameter:s,"aria-label":o,"aria-labelledBy":c}=e,p=r(e,["className","size","aria-valuetext","isSVG","diameter","aria-label","aria-labelledBy"]);const m=i?"svg":"span";return l.createElement(m,Object.assign({className:d(en.spinner,en.modifiers[n],t),role:"progressbar","aria-valuetext":a},i&&{viewBox:"0 0 100 100"},s&&{style:{"--pf-c-spinner--diameter":s}},o&&{"aria-label":o},c&&{"aria-labelledBy":c},!o&&!c&&{"aria-label":"Contents"},p),i?l.createElement("circle",{className:en.spinnerPath,cx:"50",cy:"50",r:"45",fill:"none"}):l.createElement(l.Fragment,null,l.createElement("span",{className:d(en.spinnerClipper)}),l.createElement("span",{className:d(en.spinnerLeadBall)}),l.createElement("span",{className:d(en.spinnerTailBall)})))};var nn,an;tn.displayName="Spinner",e.ButtonVariant=void 0,(nn=e.ButtonVariant||(e.ButtonVariant={})).primary="primary",nn.secondary="secondary",nn.tertiary="tertiary",nn.danger="danger",nn.warning="warning",nn.link="link",nn.plain="plain",nn.control="control",e.ButtonType=void 0,(an=e.ButtonType||(e.ButtonType={})).button="button",an.submit="submit",an.reset="reset";const ln=t=>{var{children:n=null,className:a="",component:i="button",isActive:s=!1,isBlock:o=!1,isDisabled:c=!1,isAriaDisabled:p=!1,isLoading:m=null,isDanger:u=!1,spinnerAriaValueText:f,spinnerAriaLabelledBy:h,spinnerAriaLabel:g,isSmall:b=!1,isLarge:v=!1,inoperableEvents:x=["onClick","onKeyPress"],isInline:y=!1,type:O=e.ButtonType.button,variant:C=e.ButtonVariant.primary,iconPosition:E="left","aria-label":N=null,icon:_=null,ouiaId:w,ouiaSafe:S=!0,tabIndex:T=null,innerRef:I}=t,L=r(t,["children","className","component","isActive","isBlock","isDisabled","isAriaDisabled","isLoading","isDanger","spinnerAriaValueText","spinnerAriaLabelledBy","spinnerAriaLabel","isSmall","isLarge","inoperableEvents","isInline","type","variant","iconPosition","aria-label","icon","ouiaId","ouiaSafe","tabIndex","innerRef"]);const k=W(sn.displayName,w,S,C),D=i,P="button"===D,R=y&&"span"===D,M=x.reduce(((e,t)=>Object.assign(Object.assign({},e),{[t]:e=>{e.preventDefault()}})),{});return l.createElement(D,Object.assign({},L,p?M:null,{"aria-disabled":c||p,"aria-label":N,className:d(Zt.button,Zt.modifiers[C],o&&Zt.modifiers.block,c&&Zt.modifiers.disabled,p&&Zt.modifiers.ariaDisabled,s&&Zt.modifiers.active,y&&C===e.ButtonVariant.link&&Zt.modifiers.inline,u&&(C===e.ButtonVariant.secondary||C===e.ButtonVariant.link)&&Zt.modifiers.danger,null!==m&&null!==n&&Zt.modifiers.progress,m&&Zt.modifiers.inProgress,b&&Zt.modifiers.small,v&&Zt.modifiers.displayLg,a),disabled:P?c:null,tabIndex:null!==T?T:c?P?null:-1:p?null:R?0:void 0,type:P||R?O:null,role:R?"button":null,ref:I},k),m&&l.createElement("span",{className:d(Zt.buttonProgress)},l.createElement(tn,{size:e.spinnerSize.md,"aria-valuetext":f,"aria-label":g,"aria-labelledby":h})),C===e.ButtonVariant.plain&&null===n&&_?_:null,C!==e.ButtonVariant.plain&&_&&"left"===E&&l.createElement("span",{className:d(Zt.buttonIcon,Zt.modifiers.start)},_),n,C!==e.ButtonVariant.plain&&_&&"right"===E&&l.createElement("span",{className:d(Zt.buttonIcon,Zt.modifiers.end)},_))},sn=l.forwardRef(((e,t)=>l.createElement(ln,Object.assign({innerRef:t},e))));var on;sn.displayName="Button",function(e){e.sm="sm",e.md="md",e.lg="lg",e.xl="xl"}(on||(on={}));let rn=0;function cn({name:e,xOffset:t=0,yOffset:n=0,width:a,height:i,svgPath:s}){var o;return o=class extends l.Component{constructor(){super(...arguments),this.id="icon-title-"+rn++}render(){const e=this.props,{size:o,color:r,title:c,noVerticalAlign:d}=e,p= /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ function(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}(e,["size","color","title","noVerticalAlign"]),m=Boolean(c),u=(e=>{switch(e){case on.sm:return"1em";case on.md:return"1.5em";case on.lg:return"2em";case on.xl:return"3em";default:return"1em"}})(o),f=-.125*Number.parseFloat(u),h=d?null:{verticalAlign:`${f}em`},g=[t,n,a,i].join(" ");return l.createElement("svg",Object.assign({style:h,fill:r,height:u,width:u,viewBox:g,"aria-labelledby":m?this.id:null,"aria-hidden":!m||null,role:"img"},p),m&&l.createElement("title",{id:this.id},c),l.createElement("path",{d:s}))}},o.displayName=e,o.defaultProps={color:"currentColor",size:on.sm,noVerticalAlign:!1},o}var dn=cn({name:"TimesIcon",height:512,width:352,svgPath:"M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z",yOffset:0,xOffset:0});const pn=e=>{var{className:t="",onClose:n=(()=>{}),"aria-label":a="Close Dialog"}=e,i=r(e,["className","onClose","aria-label"]);return l.createElement("div",Object.assign({className:d(At,t)},i),l.createElement(sn,{variant:"plain",onClick:n,"aria-label":a},l.createElement(dn,null)))};pn.displayName="AboutModalBoxCloseButton";const mn=e=>{var{children:t,className:n=""}=e,a=r(e,["children","className"]);return l.createElement("div",Object.assign({role:"dialog","aria-modal":"true",className:d(Pt,n)},a),t)};mn.displayName="AboutModalBox";const un=e=>{var{children:t=null,className:n=""}=e,a=r(e,["children","className"]);return l.createElement("div",Object.assign({},a,{className:d(p,n)}),t)};un.displayName="Backdrop";const fn=e=>{var{children:t,className:n="",isOpen:a=!1,onClose:i=(()=>{}),productName:s="",trademark:o,brandImageSrc:c,brandImageAlt:p,backgroundImageSrc:m,closeButtonAriaLabel