@ansible/ansible-ui-framework 2.4.371 → 2.4.373
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +268 -274
- package/index.umd.cjs +1 -1
- package/package.json +1 -1
package/index.umd.cjs
CHANGED
@@ -336,7 +336,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
336
336
|
font-size: var(--pf-global--FontSize--sm);
|
337
337
|
--pf-c-form__group-label-help--Color: var(--pf-global--Color--200);
|
338
338
|
--pf-c-form__group-label-help--hover--Color: var(--pf-global--Color--100);
|
339
|
-
`;function UBe(n){const{ariaLabel:e="",content:t,header:i,id:r="",maxWidth:o="",...s}=n,[a]=Ci();return t?x.jsx(P.Popover,{bodyContent:t,headerContent:i,hideOnOutsideClick:!0,id:r,"data-cy":r,maxWidth:o,...s,children:x.jsx(zBe,{"aria-label":e??a.moreInformation,"aria-haspopup":"true",className:"pf-c-form__group-label-help",onClick:l=>l.preventDefault(),type:"button",children:x.jsx(Ct.HelpIcon,{noVerticalAlign:!0})})}):null}function G_(n){const{label:e,children:t,helpText:i,isEmpty:r}=n;return t===null||typeof t>"u"||t===""?x.jsx(x.Fragment,{}):r?x.jsx(x.Fragment,{}):x.jsxs(P.DescriptionListGroup,{children:[e&&x.jsxs(P.DescriptionListTerm,{children:[e,i?x.jsx(UBe,{header:e,content:i}):null]}),x.jsx(P.DescriptionListDescription,{id:e==null?void 0:e.toLowerCase().split(" ").join("-"),children:t})]})}function RU(n){const{disablePadding:e}=n,t=Tg(),i=t.formLayout,r=n.numberOfColumns?n.numberOfColumns:t.formColumns,o=!1;return x.jsx(P.PageSection,{variant:"light",padding:{default:"noPadding"},className:"dark-1",children:x.jsx(P.DescriptionList,{orientation:{sm:i,md:i,lg:i,xl:i,"2xl":i},columnModifier:r==="multiple"?{default:"1Col",sm:"1Col",md:"2Col",lg:"2Col",xl:"3Col","2xl":"3Col"}:void 0,style:{maxWidth:1200,padding:e?void 0:24},isCompact:o,children:n.children})})}var Xn=(n=>(n.Table="table",n.List="list",n.Cards="cards",n))(Xn||{}),Uu=(n=>(n.Description="description",n.Expanded="expanded",n.Hidden="hidden",n))(Uu||{}),FU=(n=>(n.Name="name",n.Subtitle="subtitle",n.Description="description",n.Hidden="hidden",n.Primary="primary",n.Secondary="secondary",n))(FU||{}),BU=(n=>(n.Name="name",n.Subtitle="subtitle",n.Description="description",n.Hidden="hidden",n))(BU||{}),VU=(n=>(n.Hidden="hidden",n))(VU||{});function jr(n){const{item:e,column:t}=n;if(!t)return x.jsx(x.Fragment,{});switch(t.type){case"text":return x.jsx(qD,{text:t.value(e)});case"description":return x.jsx(qD,{text:t.value(e)});case"datetime":return x.jsx(z8,{format:"since",value:t.value(e)});case"count":return x.jsx(x.Fragment,{children:t.value(e)??"-"});case"labels":return x.jsx(U8,{labels:t.value(e)??[]});default:return x.jsx(x.Fragment,{children:t.cell(e)})}}function pA(n){return E.useMemo(()=>n.filter(e=>!(e.table==="hidden"||e.table==="description"||e.table==="expanded")),[n])}function WU(n){return E.useMemo(()=>n.filter(e=>e.list!=="hidden"),[n])}function $U(n){return E.useMemo(()=>n.filter(e=>e.card!=="hidden"),[n])}function _A(n){return E.useMemo(()=>n.filter(e=>e.modal!=="hidden"),[n])}function qBe(n,e){const t=pA(n),i=WU(n),r=$U(n);switch(e){case Xn.Table:return t;case Xn.List:return i;case Xn.Cards:return r}}function jU(n){return E.useMemo(()=>n.filter(e=>e.table==="hidden"?!1:e.table==="description"),[n])}function HU(n){return E.useMemo(()=>n.filter(e=>e.table==="hidden"?!1:e.table==="expanded"),[n])}function KBe(n){return E.useMemo(()=>n.map(e=>({...e,sort:void 0})),[n])}function GBe(n){return E.useMemo(()=>n.map(e=>({...e,table:e.table==="expanded"?void 0:e.table})),[n])}function zU(n){const{item:e,columns:t,disablePadding:i,numberOfColumns:r}=n;return e?x.jsx(RU,{disablePadding:i,numberOfColumns:r,children:t.map(o=>"value"in o&&o.value&&!o.value(e)?x.jsx(E.Fragment,{},o.id??o.header):x.jsx(G_,{label:o.header,children:x.jsx(jr,{column:o,item:e})},o.id??o.header))}):x.jsx(x.Fragment,{})}let YBe=class{constructor(e){x7(this,"value");x7(this,"next");this.value=e}};class ZBe{constructor(){iD(this,oc,void 0);iD(this,hg,void 0);iD(this,fg,void 0);this.clear()}enqueue(e){const t=new YBe(e);oh(this,oc)?(oh(this,hg).next=t,Cu(this,hg,t)):(Cu(this,oc,t),Cu(this,hg,t)),L7(this,fg)._++}dequeue(){const e=oh(this,oc);if(e)return Cu(this,oc,oh(this,oc).next),L7(this,fg)._--,e.value}clear(){Cu(this,oc,void 0),Cu(this,hg,void 0),Cu(this,fg,0)}get size(){return oh(this,fg)}*[Symbol.iterator](){let e=oh(this,oc);for(;e;)yield e.value,e=e.next}}oc=new WeakMap,hg=new WeakMap,fg=new WeakMap;function XBe(n){if(!((Number.isInteger(n)||n===Number.POSITIVE_INFINITY)&&n>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");const e=new ZBe;let t=0;const i=()=>{t--,e.size>0&&e.dequeue()()},r=async(a,l,c)=>{t++;const u=(async()=>a(...c))();l(u);try{await u}catch{}i()},o=(a,l,c)=>{e.enqueue(r.bind(void 0,a,l,c)),(async()=>(await Promise.resolve(),t<n&&e.size>0&&e.dequeue()()))()},s=(a,...l)=>new Promise(c=>{o(a,c,l)});return Object.defineProperties(s,{activeCount:{get:()=>t},pendingCount:{get:()=>e.size},clearQueue:{value:()=>{e.clear()}}}),s}function UU(n){const[e,t]=E.useState(!1),i=Do("sm"),[r]=Ci(),{pageItems:o,selectedItems:s,selectItems:a,unselectAll:l}=n,c=n.itemCount!==void 0&&n.itemCount>0&&o&&o.length>0&&(o??[]).every(p=>s==null?void 0:s.includes(p)),u=E.useCallback(()=>{c?l==null||l():a==null||a(o??[])},[c,l,a,o]),d=E.useMemo(()=>i?s&&s.length>0?`${s.length} selected`:"":s&&s.length>0?`${s.length}`:"",[i,s]),h=E.useMemo(()=>{const p=s?s.length:0;return x.jsx(P.DropdownToggle,{splitButtonItems:[x.jsx(P.DropdownToggleCheckbox,{id:"select-all","aria-label":"Select all",isChecked:c?!0:p>0?null:!1,onChange:u,children:d},"select-all")],onToggle:v=>t(v)})},[s,c,u,d]),f=E.useMemo(()=>x.jsx(P.DropdownItem,{id:"select-none",onClick:()=>{l==null||l(),t(!1)},children:n.selectNoneText??r.selectNone},"select-none"),[n.selectNoneText,r.selectNone,l]),g=E.useMemo(()=>x.jsx(P.DropdownItem,{id:"select-page",onClick:()=>{a==null||a(o??[]),t(!1)},children:`Select ${(o==null?void 0:o.length)??0} page items`},"select-page"),[a,o]),m=E.useMemo(()=>[f,g],[f,g]);return x.jsx(P.Dropdown,{isOpen:e,toggle:h,dropdownItems:m,style:{zIndex:400}})}const e_t="";function Pn(...n){const e=[],t={}.hasOwnProperty;return n.filter(Boolean).forEach(i=>{const r=typeof i;if(r==="string"||r==="number")e.push(i);else if(Array.isArray(i)&&i.length){const o=Pn(...i);o&&e.push(o)}else if(r==="object")for(const o in i)t.call(i,o)&&i[o]&&e.push(o)}),e.join(" ")}const t_t="",rn={breadcrumb:"pf-c-breadcrumb",divider:"pf-c-divider",menu:"pf-c-menu",menuBreadcrumb:"pf-c-menu__breadcrumb",menuContent:"pf-c-menu__content",menuFooter:"pf-c-menu__footer",menuGroup:"pf-c-menu__group",menuGroupTitle:"pf-c-menu__group-title",menuHeader:"pf-c-menu__header",menuItem:"pf-c-menu__item",menuItemAction:"pf-c-menu__item-action",menuItemActionIcon:"pf-c-menu__item-action-icon",menuItemCheck:"pf-c-menu__item-check",menuItemDescription:"pf-c-menu__item-description",menuItemExternalIcon:"pf-c-menu__item-external-icon",menuItemIcon:"pf-c-menu__item-icon",menuItemMain:"pf-c-menu__item-main",menuItemSelectIcon:"pf-c-menu__item-select-icon",menuItemText:"pf-c-menu__item-text",menuItemToggleIcon:"pf-c-menu__item-toggle-icon",menuList:"pf-c-menu__list",menuListItem:"pf-c-menu__list-item",menuSearch:"pf-c-menu__search",modifiers:{hidden:"pf-m-hidden",hiddenOnSm:"pf-m-hidden-on-sm",visibleOnSm:"pf-m-visible-on-sm",hiddenOnMd:"pf-m-hidden-on-md",visibleOnMd:"pf-m-visible-on-md",hiddenOnLg:"pf-m-hidden-on-lg",visibleOnLg:"pf-m-visible-on-lg",hiddenOnXl:"pf-m-hidden-on-xl",visibleOnXl:"pf-m-visible-on-xl",hiddenOn_2xl:"pf-m-hidden-on-2xl",visibleOn_2xl:"pf-m-visible-on-2xl",flyout:"pf-m-flyout",top:"pf-m-top",left:"pf-m-left",drilldown:"pf-m-drilldown",drilledIn:"pf-m-drilled-in",currentPath:"pf-m-current-path",static:"pf-m-static",plain:"pf-m-plain",scrollable:"pf-m-scrollable",nav:"pf-m-nav",focus:"pf-m-focus",disabled:"pf-m-disabled",load:"pf-m-load",loading:"pf-m-loading",danger:"pf-m-danger",selected:"pf-m-selected",favorite:"pf-m-favorite",favorited:"pf-m-favorited"},themeDark:"pf-theme-dark"};let QBe=0;class vA extends ie.Component{constructor(){super(...arguments),this.id=`${this.props.prefix}${QBe++}`}render(){return this.props.children(this.id)}}vA.displayName="GenerateId",vA.defaultProps={prefix:"pf-random-id-"};const JBe="*";let eVe=0;const qU="OUIA-Generated-",bA={};function yA(n,e,t=!0){return{"data-ouia-component-type":`PF4/${n}`,"data-ouia-safe":t,"data-ouia-component-id":e}}function wA(n,e){try{let t;return typeof window<"u"?t=`${window.location.href}-${n}-${e||""}`:t=`${n}-${e||""}`,bA[t]||(bA[t]=0),`${qU}${n}-${e?`${e}-`:""}${++bA[t]}`}catch{return`${qU}${n}-${e?`${e}-`:""}${++eVe}`}}const bm=!!(typeof window<"u"&&window.document&&window.document.createElement);function Y_(n){const e=n.getBoundingClientRect();return{width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left,x:e.left,y:e.top}}function ml(n){if(n.toString()!=="[object Window]"){const e=n.ownerDocument;return e?e.defaultView:window}return n}function CA(n){const e=ml(n),t=e.pageXOffset,i=e.pageYOffset;return{scrollLeft:t,scrollTop:i}}function Z_(n){const e=ml(n).Element;return n instanceof e||n instanceof Element}function pl(n){const e=ml(n).HTMLElement;return n instanceof e||n instanceof HTMLElement}function tVe(n){return{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}}function nVe(n){return n===ml(n)||!pl(n)?CA(n):tVe(n)}function xa(n){return n?(n.nodeName||"").toLowerCase():null}function Ic(n){return(Z_(n)?n.ownerDocument:n.document).documentElement}function SA(n){return Y_(Ic(n)).left+CA(n).scrollLeft}function Ac(n){return ml(n).getComputedStyle(n)}function xA(n){const{overflow:e,overflowX:t,overflowY:i}=Ac(n);return/auto|scroll|overlay|hidden/.test(e+i+t)}function iVe(n,e,t=!1){const i=Ic(e),r=Y_(n),o=pl(e);let s={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(o||!o&&!t)&&((xa(e)!=="body"||xA(i))&&(s=nVe(e)),pl(e)?(a=Y_(e),a.x+=e.clientLeft,a.y+=e.clientTop):i&&(a.x=SA(i))),{x:r.left+s.scrollLeft-a.x,y:r.top+s.scrollTop-a.y,width:r.width,height:r.height}}function LA(n){return{x:n.offsetLeft,y:n.offsetTop,width:n.offsetWidth,height:n.offsetHeight}}function IS(n){return xa(n)==="html"?n:n.assignedSlot||n.parentNode||n.host||Ic(n)}function KU(n){return["html","body","#document"].indexOf(xa(n))>=0?n.ownerDocument.body:pl(n)&&xA(n)?n:KU(IS(n))}function X_(n,e=[]){const t=KU(n),i=xa(t)==="body",r=ml(t),o=i?[r].concat(r.visualViewport||[],xA(t)?t:[]):t,s=e.concat(o);return i?s:s.concat(X_(IS(o)))}function rVe(n){return["table","td","th"].indexOf(xa(n))>=0}function GU(n){if(!pl(n)||Ac(n).position==="fixed")return null;const e=n.offsetParent;if(e){const t=Ic(e);if(xa(e)==="body"&&Ac(e).position==="static"&&Ac(t).position!=="static")return t}return e}function oVe(n){let e=IS(n);for(;pl(e)&&["html","body"].indexOf(xa(e))<0;){const t=Ac(e);if(t.transform!=="none"||t.perspective!=="none"||t.willChange&&t.willChange!=="auto")return e;e=e.parentNode}return null}function Q_(n){const e=ml(n);let t=GU(n);for(;t&&rVe(t)&&Ac(t).position==="static";)t=GU(t);return t&&xa(t)==="body"&&Ac(t).position==="static"?e:t||oVe(n)||e}const Hs="top",La="bottom",ka="right",zs="left",kA="auto",J_=[Hs,La,ka,zs],ym="start",DA="end",sVe="clippingParents",YU="viewport",ev="popper",aVe="reference",ZU=J_.reduce((n,e)=>n.concat([`${e}-${ym}`,`${e}-${DA}`]),[]),XU=[...J_,kA].reduce((n,e)=>n.concat([e,`${e}-${ym}`,`${e}-${DA}`]),[]),lVe=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function cVe(n){const e=new Map,t=new Set,i=[];n.forEach(o=>{e.set(o.name,o)});function r(o){t.add(o.name),[...o.requires||[],...o.requiresIfExists||[]].forEach(a=>{if(!t.has(a)){const l=e.get(a);l&&r(l)}}),i.push(o)}return n.forEach(o=>{t.has(o.name)||r(o)}),i}function uVe(n){const e=cVe(n);return lVe.reduce((t,i)=>t.concat(e.filter(r=>r.phase===i)),[])}function dVe(n){let e;return()=>(e||(e=new Promise(t=>{Promise.resolve().then(()=>{e=void 0,t(n())})})),e)}function _l(n){return n.split("-")[0]}function hVe(n){const e=n.reduce((t,i)=>{const r=t[i.name];return t[i.name]=r?Object.assign(Object.assign(Object.assign({},r),i),{options:Object.assign(Object.assign({},r.options),i.options),data:Object.assign(Object.assign({},r.data),i.data)}):i,t},{});return Object.keys(e).map(t=>e[t])}function fVe(n){const e=ml(n),t=Ic(n),i=e.visualViewport;let r=t.clientWidth,o=t.clientHeight,s=0,a=0;return i&&(r=i.width,o=i.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=i.offsetLeft,a=i.offsetTop)),{width:r,height:o,x:s+SA(n),y:a}}function gVe(n){const e=Ic(n),t=CA(n),i=n.ownerDocument.body,r=Math.max(e.scrollWidth,e.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=Math.max(e.scrollHeight,e.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let s=-t.scrollLeft+SA(n);const a=-t.scrollTop;return Ac(i||e).direction==="rtl"&&(s+=Math.max(e.clientWidth,i?i.clientWidth:0)-r),{width:r,height:o,x:s,y:a}}function QU(n,e){const t=!!(e.getRootNode&&e.getRootNode().host);if(n.contains(e))return!0;if(t){let i=e;do{if(i&&n.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function EA(n){return Object.assign(Object.assign({},n),{left:n.x,top:n.y,right:n.x+n.width,bottom:n.y+n.height})}function mVe(n){const e=Y_(n);return e.top=e.top+n.clientTop,e.left=e.left+n.clientLeft,e.bottom=e.top+n.clientHeight,e.right=e.left+n.clientWidth,e.width=n.clientWidth,e.height=n.clientHeight,e.x=e.left,e.y=e.top,e}function JU(n,e){return e===YU?EA(fVe(n)):pl(e)?mVe(e):EA(gVe(Ic(n)))}function pVe(n){const e=X_(IS(n)),i=["absolute","fixed"].indexOf(Ac(n).position)>=0&&pl(n)?Q_(n):n;return Z_(i)?e.filter(r=>Z_(r)&&QU(r,i)&&xa(r)!=="body"):[]}function _Ve(n,e,t){const r=[...e==="clippingParents"?pVe(n):[].concat(e),t],o=r[0],s=r.reduce((a,l)=>{const c=JU(n,l);return a.top=Math.max(c.top,a.top),a.right=Math.min(c.right,a.right),a.bottom=Math.min(c.bottom,a.bottom),a.left=Math.max(c.left,a.left),a},JU(n,o));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function tv(n){return n.split("-")[1]}function TA(n){return["top","bottom"].indexOf(n)>=0?"x":"y"}function eq({reference:n,element:e,placement:t}){const i=t?_l(t):null,r=t?tv(t):null,o=n.x+n.width/2-e.width/2,s=n.y+n.height/2-e.height/2;let a;switch(i){case Hs:a={x:o,y:n.y-e.height};break;case La:a={x:o,y:n.y+n.height};break;case ka:a={x:n.x+n.width,y:s};break;case zs:a={x:n.x-e.width,y:s};break;default:a={x:n.x,y:n.y}}const l=i?TA(i):null;if(l!=null){const c=l==="y"?"height":"width";switch(r){case ym:a[l]=Math.floor(a[l])-Math.floor(n[c]/2-e[c]/2);break;case DA:a[l]=Math.floor(a[l])+Math.ceil(n[c]/2-e[c]/2);break}}return a}function tq(){return{top:0,right:0,bottom:0,left:0}}function nq(n){return Object.assign(Object.assign({},tq()),n)}function iq(n,e){return e.reduce((t,i)=>(t[i]=n,t),{})}function nv(n,e={}){const{placement:t=n.placement,boundary:i=sVe,rootBoundary:r=YU,elementContext:o=ev,altBoundary:s=!1,padding:a=0}=e,l=nq(typeof a!="number"?a:iq(a,J_)),c=o===ev?aVe:ev,u=n.elements.reference,d=n.rects.popper,h=n.elements[s?c:o],f=_Ve(Z_(h)?h:h.contextElement||Ic(n.elements.popper),i,r),g=Y_(u),m=eq({reference:g,element:d,strategy:"absolute",placement:t}),p=EA(Object.assign(Object.assign({},d),m)),v=o===ev?p:g,_={top:f.top-v.top+l.top,bottom:v.bottom-f.bottom+l.bottom,left:f.left-v.left+l.left,right:v.right-f.right+l.right},b=n.modifiersData.offset;if(o===ev&&b){const y=b[t];Object.keys(_).forEach(C=>{const k=[ka,La].indexOf(C)>=0?1:-1,L=[Hs,La].indexOf(C)>=0?"y":"x";_[C]+=y[L]*k})}return _}const rq={placement:"bottom",modifiers:[],strategy:"absolute"};function oq(...n){return!n.some(e=>!(e&&typeof e.getBoundingClientRect=="function"))}function vVe(n={}){const{defaultModifiers:e=[],defaultOptions:t=rq}=n;return function(r,o,s=t){let a={placement:"bottom",orderedModifiers:[],options:Object.assign(Object.assign({},rq),t),modifiersData:{},elements:{reference:r,popper:o},attributes:{},styles:{}},l=[],c=!1;const u={state:a,setOptions(f){h(),a.options=Object.assign(Object.assign(Object.assign({},t),a.options),f),a.scrollParents={reference:Z_(r)?X_(r):r.contextElement?X_(r.contextElement):[],popper:X_(o)};const g=uVe(hVe([...e,...a.options.modifiers]));return a.orderedModifiers=g.filter(m=>m.enabled),d(),u.update()},forceUpdate(){if(c)return;const{reference:f,popper:g}=a.elements;if(oq(f,g)){a.rects={reference:iVe(f,Q_(g),a.options.strategy==="fixed"),popper:LA(g)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach(m=>a.modifiersData[m.name]=Object.assign({},m.data));for(let m=0;m<a.orderedModifiers.length;m++){if(a.reset===!0){a.reset=!1,m=-1;continue}const{fn:p,options:v={},name:_}=a.orderedModifiers[m];typeof p=="function"&&(a=p({state:a,options:v,name:_,instance:u})||a)}}},update:dVe(()=>new Promise(f=>{u.forceUpdate(),f(a)})),destroy(){h(),c=!0}};if(!oq(r,o))return u;u.setOptions(s).then(f=>{!c&&s.onFirstUpdate&&s.onFirstUpdate(f)});function d(){a.orderedModifiers.forEach(({name:f,options:g={},effect:m})=>{if(typeof m=="function"){const p=m({state:a,name:f,instance:u,options:g}),v=()=>{};l.push(p||v)}})}function h(){l.forEach(f=>f()),l=[]}return u}}const AS={passive:!0};function bVe({state:n,instance:e,options:t}){const{scroll:i=!0,resize:r=!0}=t,o=ml(n.elements.popper),s=[...n.scrollParents.reference,...n.scrollParents.popper];return i&&s.forEach(a=>{a.addEventListener("scroll",e.update,AS)}),r&&o.addEventListener("resize",e.update,AS),()=>{i&&s.forEach(a=>{a.removeEventListener("scroll",e.update,AS)}),r&&o.removeEventListener("resize",e.update,AS)}}const yVe={name:"eventListeners",enabled:!0,phase:"write",fn:()=>{},effect:bVe,data:{}};function wVe({state:n,name:e}){n.modifiersData[e]=eq({reference:n.rects.reference,element:n.rects.popper,strategy:"absolute",placement:n.placement})}const CVe={name:"popperOffsets",enabled:!0,phase:"read",fn:wVe,data:{}},SVe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function xVe({x:n,y:e}){const i=window.devicePixelRatio||1;return{x:Math.round(n*i)/i||0,y:Math.round(e*i)/i||0}}function sq({popper:n,popperRect:e,placement:t,offsets:i,position:r,gpuAcceleration:o,adaptive:s}){let{x:a,y:l}=xVe(i);const c=i.hasOwnProperty("x"),u=i.hasOwnProperty("y");let d=zs,h=Hs;const f=window;if(s){let m=Q_(n);m===ml(n)&&(m=Ic(n)),t===Hs&&(h=La,l-=m.clientHeight-e.height,l*=o?1:-1),t===zs&&(d=ka,a-=m.clientWidth-e.width,a*=o?1:-1)}const g=Object.assign({position:r},s&&SVe);return o?Object.assign(Object.assign({},g),{[h]:u?"0":"",[d]:c?"0":"",transform:(f.devicePixelRatio||1)<2?`translate(${a}px, ${l}px)`:`translate3d(${a}px, ${l}px, 0)`}):Object.assign(Object.assign({},g),{[h]:u?`${l}px`:"",[d]:c?`${a}px`:"",transform:""})}function LVe({state:n,options:e}){const{gpuAcceleration:t=!0,adaptive:i=!0}=e,r={placement:_l(n.placement),popper:n.elements.popper,popperRect:n.rects.popper,gpuAcceleration:t};n.modifiersData.popperOffsets!=null&&(n.styles.popper=Object.assign(Object.assign({},n.styles.popper),sq(Object.assign(Object.assign({},r),{offsets:n.modifiersData.popperOffsets,position:n.options.strategy,adaptive:i})))),n.modifiersData.arrow!=null&&(n.styles.arrow=Object.assign(Object.assign({},n.styles.arrow),sq(Object.assign(Object.assign({},r),{offsets:n.modifiersData.arrow,position:"absolute",adaptive:!1})))),n.attributes.popper=Object.assign(Object.assign({},n.attributes.popper),{"data-popper-placement":n.placement})}const kVe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:LVe,data:{}};function DVe({state:n}){Object.keys(n.elements).forEach(e=>{const t=n.styles[e]||{},i=n.attributes[e]||{},r=n.elements[e];!pl(r)||!xa(r)||(Object.assign(r.style,t),Object.keys(i).forEach(o=>{const s=i[o];s===!1?r.removeAttribute(o):r.setAttribute(o,s===!0?"":s)}))})}function EVe({state:n}){const e={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(n.elements.popper.style,e.popper),n.elements.arrow&&Object.assign(n.elements.arrow.style,e.arrow),()=>{Object.keys(n.elements).forEach(t=>{const i=n.elements[t],r=n.attributes[t]||{},s=Object.keys(n.styles.hasOwnProperty(t)?n.styles[t]:e[t]).reduce((a,l)=>(a[l]="",a),{});!pl(i)||!xa(i)||(Object.assign(i.style,s),Object.keys(r).forEach(a=>{i.removeAttribute(a)}))})}}const TVe={name:"applyStyles",enabled:!0,phase:"write",fn:DVe,effect:EVe,requires:["computeStyles"]};function IVe(n,e,t){const i=_l(n),r=[zs,Hs].indexOf(i)>=0?-1:1;let[o,s]=typeof t=="function"?t(Object.assign(Object.assign({},e),{placement:n})):t;return o=o||0,s=(s||0)*r,[zs,ka].indexOf(i)>=0?{x:s,y:o}:{x:o,y:s}}function AVe({state:n,options:e,name:t}){const{offset:i=[0,0]}=e,r=XU.reduce((a,l)=>(a[l]=IVe(l,n.rects,i),a),{}),{x:o,y:s}=r[n.placement];n.modifiersData.popperOffsets!=null&&(n.modifiersData.popperOffsets.x+=o,n.modifiersData.popperOffsets.y+=s),n.modifiersData[t]=r}const OVe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:AVe},NVe={left:"right",right:"left",bottom:"top",top:"bottom"};function OS(n){return n.replace(/left|right|bottom|top/g,e=>NVe[e])}const MVe={start:"end",end:"start"};function aq(n){return n.replace(/start|end/g,e=>MVe[e])}function PVe(n,e={}){const{placement:t,boundary:i,rootBoundary:r,padding:o,flipVariations:s,allowedAutoPlacements:a=XU}=e,l=tv(t),c=l?s?ZU:ZU.filter(h=>tv(h)===l):J_;let u=c.filter(h=>a.indexOf(h)>=0);u.length===0&&(u=c);const d=u.reduce((h,f)=>(h[f]=nv(n,{placement:f,boundary:i,rootBoundary:r,padding:o})[_l(f)],h),{});return Object.keys(d).sort((h,f)=>d[h]-d[f])}function RVe(n){if(_l(n)===kA)return[];const e=OS(n);return[aq(n),e,aq(e)]}function FVe({state:n,options:e,name:t}){if(n.modifiersData[t]._skip)return;const{mainAxis:i=!0,altAxis:r=!0,fallbackPlacements:o,padding:s,boundary:a,rootBoundary:l,altBoundary:c,flipVariations:u=!0,allowedAutoPlacements:d}=e,h=n.options.placement,g=_l(h)===h,m=o||(g||!u?[OS(h)]:RVe(h)),p=[h,...m].reduce((k,L)=>k.concat(_l(L)===kA?PVe(n,{placement:L,boundary:a,rootBoundary:l,padding:s,flipVariations:u,allowedAutoPlacements:d}):L),[]),v=n.rects.reference,_=n.rects.popper,b=new Map;let y=!0,C=p[0];for(let k=0;k<p.length;k++){const L=p[k],D=_l(L),T=tv(L)===ym,O=[Hs,La].indexOf(D)>=0,N=O?"width":"height",I=nv(n,{placement:L,boundary:a,rootBoundary:l,altBoundary:c,padding:s});let M=O?T?ka:zs:T?La:Hs;v[N]>_[N]&&(M=OS(M));const B=OS(M),V=[];if(i&&V.push(I[D]<=0),r&&V.push(I[M]<=0,I[B]<=0),V.every(ee=>ee)){C=L,y=!1;break}b.set(L,V)}if(y){const k=u?3:1;for(let L=k;L>0;L--){const D=p.find(T=>{const O=b.get(T);if(O)return O.slice(0,L).every(N=>N)});if(D){C=D;break}}}n.placement!==C&&(n.modifiersData[t]._skip=!0,n.placement=C,n.reset=!0)}const BVe={name:"flip",enabled:!0,phase:"main",fn:FVe,requiresIfExists:["offset"],data:{_skip:!1}};function VVe(n){return n==="x"?"y":"x"}function NS(n,e,t){return Math.max(n,Math.min(e,t))}function WVe({state:n,options:e,name:t}){const{mainAxis:i=!0,altAxis:r=!1,boundary:o,rootBoundary:s,altBoundary:a,padding:l,tether:c=!0,tetherOffset:u=0}=e,d=nv(n,{boundary:o,rootBoundary:s,padding:l,altBoundary:a}),h=_l(n.placement),f=tv(n.placement),g=!f,m=TA(h),p=VVe(m),v=n.modifiersData.popperOffsets,_=n.rects.reference,b=n.rects.popper,y=typeof u=="function"?u(Object.assign(Object.assign({},n.rects),{placement:n.placement})):u,C={x:0,y:0};if(v){if(i){const k=m==="y"?Hs:zs,L=m==="y"?La:ka,D=m==="y"?"height":"width",T=v[m],O=v[m]+d[k],N=v[m]-d[L],I=c?-b[D]/2:0,M=f===ym?_[D]:b[D],B=f===ym?-b[D]:-_[D],V=n.elements.arrow,ee=c&&V?LA(V):{width:0,height:0},se=n.modifiersData["arrow#persistent"]?n.modifiersData["arrow#persistent"].padding:tq(),ae=se[k],re=se[L],J=NS(0,_[D],ee[D]),ue=g?_[D]/2-I-J-ae-y:M-J-ae-y,Z=g?-_[D]/2+I+J+re+y:B+J+re+y,X=n.elements.arrow&&Q_(n.elements.arrow),ce=X?m==="y"?X.clientTop||0:X.clientLeft||0:0,De=n.modifiersData.offset?n.modifiersData.offset[n.placement][m]:0,te=v[m]+ue-De-ce,xe=v[m]+Z-De,ge=NS(c?Math.min(O,te):O,T,c?Math.max(N,xe):N);v[m]=ge,C[m]=ge-T}if(r){const k=m==="x"?Hs:zs,L=m==="x"?La:ka,D=v[p],T=D+d[k],O=D-d[L],N=NS(T,D,O);v[p]=N,C[p]=N-D}n.modifiersData[t]=C}}const $Ve={name:"preventOverflow",enabled:!0,phase:"main",fn:WVe,requiresIfExists:["offset"]};function jVe({state:n,name:e}){const t=n.elements.arrow,i=n.modifiersData.popperOffsets,r=_l(n.placement),o=TA(r),a=[zs,ka].indexOf(r)>=0?"height":"width";if(!t||!i)return;const l=n.modifiersData[`${e}#persistent`].padding,c=LA(t),u=o==="y"?Hs:zs,d=o==="y"?La:ka,h=n.rects.reference[a]+n.rects.reference[o]-i[o]-n.rects.popper[a],f=i[o]-n.rects.reference[o],g=Q_(t),m=g?o==="y"?g.clientHeight||0:g.clientWidth||0:0,p=h/2-f/2,v=l[u],_=m-c[a]-l[d],b=m/2-c[a]/2+p,y=NS(v,b,_),C=o;n.modifiersData[e]={[C]:y,centerOffset:y-b}}function HVe({state:n,options:e,name:t}){let{element:i="[data-popper-arrow]",padding:r=0}=e;i!=null&&(typeof i=="string"&&(i=n.elements.popper.querySelector(i),!i)||QU(n.elements.popper,i)&&(n.elements.arrow=i,n.modifiersData[`${t}#persistent`]={padding:nq(typeof r!="number"?r:iq(r,J_))}))}const zVe={name:"arrow",enabled:!0,phase:"main",fn:jVe,effect:HVe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function lq(n,e,t={x:0,y:0}){return{top:n.top-e.height-t.y,right:n.right-e.width+t.x,bottom:n.bottom-e.height+t.y,left:n.left-e.width-t.x}}function cq(n){return[Hs,ka,La,zs].some(e=>n[e]>=0)}function UVe({state:n,name:e}){const t=n.rects.reference,i=n.rects.popper,r=n.modifiersData.preventOverflow,o=nv(n,{elementContext:"reference"}),s=nv(n,{altBoundary:!0}),a=lq(o,t),l=lq(s,i,r),c=cq(a),u=cq(l);n.modifiersData[e]={referenceClippingOffsets:a,popperEscapeOffsets:l,isReferenceHidden:c,hasPopperEscaped:u},n.attributes.popper=Object.assign(Object.assign({},n.attributes.popper),{"data-popper-reference-hidden":c,"data-popper-escaped":u})}const qVe=vVe({defaultModifiers:[yVe,CVe,kVe,TVe,OVe,BVe,$Ve,zVe,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:UVe}]}),IA=bm?ie.useLayoutEffect:ie.useEffect,KVe=(n,e)=>JSON.stringify(n)===JSON.stringify(e),uq=n=>n.reduce((e,[t,i])=>(e[t]=i,e),{}),GVe=[],YVe=(n,e,t={})=>{const i=ie.useRef(null),r={onFirstUpdate:t.onFirstUpdate,placement:t.placement||"bottom",strategy:t.strategy||"absolute",modifiers:t.modifiers||GVe},[o,s]=ie.useState({styles:{popper:{position:r.strategy,left:"0",top:"0"}},attributes:{}}),a=ie.useMemo(()=>({name:"updateState",enabled:!0,phase:"write",fn:({state:u})=>{const d=Object.keys(u.elements);s({styles:uq(d.map(h=>[h,u.styles[h]||{}])),attributes:uq(d.map(h=>[h,u.attributes[h]]))})},requires:["computeStyles"]}),[]),l=ie.useMemo(()=>{const u={onFirstUpdate:r.onFirstUpdate,placement:r.placement,strategy:r.strategy,modifiers:[...r.modifiers,a,{name:"applyStyles",enabled:!1}]};return KVe(i.current,u)?i.current||u:(i.current=u,u)},[r.onFirstUpdate,r.placement,r.strategy,r.modifiers,a]),c=ie.useRef();return IA(()=>{c&&c.current&&c.current.setOptions(l)},[l]),IA(()=>{if(n==null||e==null)return;const d=(t.createPopper||qVe)(n,e,l);return c.current=d,()=>{d.destroy(),c.current=null}},[n,e,t.createPopper]),{state:c.current?c.current.state:null,styles:o.styles,attributes:o.attributes,update:c.current?c.current.update:null,forceUpdate:c.current?c.current.forceUpdate:null}};class AA extends ie.Component{componentDidMount(){const e=T7.findDOMNode(this);this.props.onFoundRef(e)}render(){return this.props.children||null}}AA.displayName="FindRefWrapper";const f_t="",ZVe={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"},XVe=n=>n.replace(/left|right|bottom|top|top-start|top-end|bottom-start|bottom-end|right-start|right-end|left-start|left-end/g,e=>ZVe[e]),dq=({trigger:n,popper:e,popperMatchesTriggerWidth:t=!0,direction:i="down",position:r="left",placement:o,appendTo:s=()=>document.body,zIndex:a=9999,isVisible:l=!0,positionModifiers:c,distance:u=0,onMouseEnter:d,onMouseLeave:h,onFocus:f,onBlur:g,onDocumentClick:m,onTriggerClick:p,onTriggerEnter:v,onPopperClick:_,onPopperMouseEnter:b,onPopperMouseLeave:y,onDocumentKeyDown:C,enableFlip:k=!0,flipBehavior:L="flip",reference:D,removeFindDomNode:T=!1,popperRef:O})=>{const[N,I]=ie.useState(null),[M,B]=ie.useState(null),[V,ee]=ie.useState(null),[se,ae]=ie.useState(!1),re=M||N,J=ie.useCallback(H=>m(H,re,V),[l,N,M,V,m]);ie.useEffect(()=>{ae(!0)},[]),ie.useEffect(()=>{D&&(D.current?B(D.current):typeof D=="function"&&B(D()))},[D]),ie.useEffect(()=>{O&&(O.current?ee(O.current):typeof O=="function"&&ee(O()))},[l,O]);const ue=(H,le,be,je=!1)=>{H&&le&&le.addEventListener(be,H,{capture:je})},Z=(H,le,be,je=!1)=>{H&&le&&le.removeEventListener(be,H,{capture:je})};ie.useEffect(()=>{ue(d,re,"mouseenter"),ue(h,re,"mouseleave"),ue(f,re,"focus"),ue(g,re,"blur"),ue(p,re,"click"),ue(v,re,"keydown"),ue(_,V,"click"),ue(b,V,"mouseenter"),ue(y,V,"mouseleave"),m&&ue(J,document,"click",!0),ue(C,document,"keydown",!0);const H=new MutationObserver(()=>{we&&we()});return V&&H.observe(V,{attributes:!0,childList:!0,subtree:!0}),()=>{Z(d,re,"mouseenter"),Z(h,re,"mouseleave"),Z(f,re,"focus"),Z(g,re,"blur"),Z(p,re,"click"),Z(v,re,"keydown"),Z(_,V,"click"),Z(b,V,"mouseenter"),Z(y,V,"mouseleave"),m&&Z(J,document,"click",!0),Z(C,document,"keydown",!0),H.disconnect()}},[N,V,d,h,f,g,p,v,_,b,y,m,C,M]);const X=()=>{if(o)return o;let H=i==="up"?"top":"bottom";return r!=="center"&&(H=`${H}-${r==="right"?"end":"start"}`),H},ce=ie.useMemo(X,[i,r,o]),De=ie.useMemo(()=>XVe(X()),[i,r,o]),te=ie.useMemo(()=>({name:"sameWidth",enabled:t,phase:"beforeWrite",requires:["computeStyles"],fn:({state:H})=>{H.styles.popper.width=`${H.rects.reference.width}px`},effect:({state:H})=>(H.elements.popper.style.width=`${H.elements.reference.offsetWidth}px`,()=>{})}),[t]),{styles:xe,attributes:ge,update:we,forceUpdate:Se}=YVe(re,V,{placement:ce,modifiers:[{name:"offset",options:{offset:[0,u]}},{name:"preventOverflow",enabled:!1},{name:"hide",enabled:!0},{name:"flip",enabled:ce.startsWith("auto")||k,options:{fallbackPlacements:L==="flip"?[De]:L}},te]});ie.useEffect(()=>{Se&&Se()},[e]);const pe=()=>{if(ge&&ge.popper&&ge.popper["data-popper-placement"]){const H=ge.popper["data-popper-placement"];return c[H]}return c.top},Q=Object.assign({className:Pn(e.props&&e.props.className,c&&pe()),style:Object.assign(Object.assign(Object.assign({},e.props&&e.props.style||{}),xe.popper),{zIndex:a})},ge.popper),Xe=ie.cloneElement(e,Q),et=()=>typeof s=="function"?s():s;let Ve;return T?Ve=ie.createElement("div",{style:{display:"contents"},ref:H=>ee(H==null?void 0:H.firstElementChild)},Xe):O?Ve=Xe:Ve=ie.createElement(AA,{onFoundRef:H=>ee(H)},Xe),ie.createElement(ie.Fragment,null,!D&&n&&ie.isValidElement(n)&&!T&&ie.createElement(AA,{onFoundRef:H=>I(H)},n),!D&&n&&ie.isValidElement(n)&&T&&ie.createElement("div",{style:{display:"contents"},ref:H=>I(H==null?void 0:H.firstElementChild)},n),se&&l&&T7.createPortal(Ve,et()))};dq.displayName="Popper";const QVe=(n,e,t=c=>document.activeElement.contains(c),i=c=>c,r=["A","BUTTON","INPUT"],o=!1,s=!1,a=!0,l=!0)=>{const c=document.activeElement,u=n.key;let d=null;if(!o&&["ArrowUp","ArrowDown"].includes(u)){n.preventDefault(),n.stopImmediatePropagation();let h=-1;e.forEach((f,g)=>{if(t(f)){let m=0;for(;!d&&m<e.length&&m*-1<e.length;)u==="ArrowUp"?m--:m++,h=g+m,h>=e.length&&(h=0),h<0&&(h=e.length-1),d=i(e[h])}})}if(!s&&["ArrowLeft","ArrowRight"].includes(u)){n.preventDefault(),n.stopImmediatePropagation();let h=-1;e.forEach((f,g)=>{if(t(f)){const m=e[g].querySelectorAll(r.join(","));if(!m.length||l){let p=c;for(;p;)if(p=u==="ArrowLeft"?p.previousElementSibling:p.nextElementSibling,p&&r.includes(p.tagName)){d=p;break}}else m.forEach((p,v)=>{n.target===p&&(h=v+(u==="ArrowLeft"?-1:1),h>=m.length&&(h=0),h<0&&(h=m.length-1),d=m[h])})}})}d&&(a&&(c.tabIndex=-1,d.tabIndex=0),d.focus())};class OA extends ie.Component{constructor(){super(...arguments),this.keyHandler=e=>{const{isEventFromContainer:t}=this.props;if(t?!t(e):!this._isEventFromContainer(e))return;const{isActiveElement:i,getFocusableElement:r,noVerticalArrowHandling:o,noHorizontalArrowHandling:s,noEnterHandling:a,noSpaceHandling:l,updateTabIndex:c,validSiblingTags:u,additionalKeyHandler:d,createNavigableElements:h,onlyTraverseSiblings:f}=this.props;d&&d(e);const g=h();if(!g){console.warn("No navigable elements have been passed to the KeyboardHandler. Keyboard navigation provided by this component will be ignored.");return}const m=e.key;a||m==="Enter"&&(e.preventDefault(),e.stopImmediatePropagation(),document.activeElement.click()),l||m===" "&&(e.preventDefault(),e.stopImmediatePropagation(),document.activeElement.click()),QVe(e,g,i,r,u,o,s,c,f)},this._isEventFromContainer=e=>{const{containerRef:t}=this.props;return t.current&&t.current.contains(e.target)}}componentDidMount(){bm&&window.addEventListener("keydown",this.keyHandler)}componentWillUnmount(){bm&&window.removeEventListener("keydown",this.keyHandler)}render(){return null}}OA.displayName="KeyboardHandler",OA.defaultProps={containerRef:null,createNavigableElements:()=>null,isActiveElement:n=>document.activeElement===n,getFocusableElement:n=>n,validSiblingTags:["BUTTON","A"],onlyTraverseSiblings:!0,updateTabIndex:!0,noHorizontalArrowHandling:!1,noVerticalArrowHandling:!1,noEnterHandling:!1,noSpaceHandling:!1};const Wh=ie.createContext({menuId:null,parentMenu:null,onActionClick:()=>null,onSelect:()=>null,activeItemId:null,selected:null,drilledInMenus:[],drilldownItemPath:[],onDrillIn:null,onDrillOut:null,onGetMenuHeight:()=>null,flyoutRef:null,setFlyoutRef:()=>null,disableHover:!1,role:"menu"}),hq=ie.createContext({itemId:null,isDisabled:!1});class MS extends ie.Component{constructor(e){super(e),this.menuRef=ie.createRef(),this.activeMenu=null,this.state={ouiaStateId:wA(PS.displayName),searchInputValue:"",transitionMoveTarget:null,flyoutRef:null,disableHover:!1,currentDrilldownMenuId:this.props.id},this.handleDrilldownTransition=t=>{const i=this.menuRef.current;if(!(!i||i!==t.target.closest(".pf-c-menu")&&!Array.from(i.getElementsByClassName("pf-c-menu")).includes(t.target.closest(".pf-c-menu"))))if(this.state.transitionMoveTarget)this.state.transitionMoveTarget.focus(),this.setState({transitionMoveTarget:null});else{const r=i.querySelector("#"+this.props.activeMenu)||i||null,o=Array.from(r.getElementsByTagName("UL")[0].children);if(!this.state.currentDrilldownMenuId||r.id!==this.state.currentDrilldownMenuId)this.setState({currentDrilldownMenuId:r.id});else return;const s=o.filter(a=>!(a.classList.contains("pf-m-disabled")||a.classList.contains("pf-c-divider")))[0].firstChild;s.focus(),s.tabIndex=0}},this.handleExtraKeys=t=>{const i=this.props.containsDrilldown,r=document.activeElement;if(t.target.closest(".pf-c-menu")!==this.activeMenu&&!t.target.classList.contains("pf-c-breadcrumb__link")&&(this.activeMenu=t.target.closest(".pf-c-menu"),this.setState({disableHover:!0})),t.target.tagName==="INPUT")return;const o=this.activeMenu,s=t.key,a=r.classList.contains("pf-c-breadcrumb__link")||r.classList.contains("pf-c-dropdown__toggle");if(s===" "||s==="Enter"){if(t.preventDefault(),i&&!a){if(r.closest("li").classList.contains("pf-m-current-path")&&o.parentElement.tagName==="LI")r.tabIndex=-1,o.parentElement.firstChild.tabIndex=0,this.setState({transitionMoveTarget:o.parentElement.firstChild});else if(r.nextElementSibling&&r.nextElementSibling.classList.contains("pf-c-menu")){const c=Array.from(r.nextElementSibling.getElementsByTagName("UL")[0].children).filter(u=>!(u.classList.contains("pf-m-disabled")||u.classList.contains("pf-c-divider")));r.tabIndex=-1,c[0].firstChild.tabIndex=0,this.setState({transitionMoveTarget:c[0].firstChild})}}document.activeElement.click()}},this.createNavigableElements=()=>this.props.containsDrilldown?this.activeMenu?Array.from(this.activeMenu.getElementsByTagName("UL")[0].children).filter(i=>!(i.classList.contains("pf-m-disabled")||i.classList.contains("pf-c-divider"))):[]:this.menuRef.current?Array.from(this.menuRef.current.getElementsByTagName("LI")).filter(i=>!(i.classList.contains("pf-m-disabled")||i.classList.contains("pf-c-divider"))):[],e.innerRef&&(this.menuRef=e.innerRef)}allowTabFirstItem(){const e=this.menuRef.current;if(e){const t=e.querySelector("ul button:not(:disabled), ul a:not(:disabled)");t&&(t.tabIndex=0)}}componentDidMount(){this.context&&this.setState({disableHover:this.context.disableHover}),bm&&window.addEventListener("transitionend",this.props.isRootMenu?this.handleDrilldownTransition:null),this.allowTabFirstItem()}componentWillUnmount(){bm&&window.removeEventListener("transitionend",this.handleDrilldownTransition)}componentDidUpdate(e){e.children!==this.props.children&&this.allowTabFirstItem()}render(){const e=this.props,{"aria-label":t,id:i,children:r,className:o,onSelect:s,selected:a=null,onActionClick:l,ouiaId:c,ouiaSafe:u,containsFlyout:d,isNavFlyout:h,containsDrilldown:f,isMenuDrilledIn:g,isPlain:m,isScrollable:p,drilldownItemPath:v,drilledInMenus:_,onDrillIn:b,onDrillOut:y,onGetMenuHeight:C,parentMenu:k=null,activeItemId:L=null,innerRef:D,isRootMenu:T,activeMenu:O,role:N}=e,I=hn(e,["aria-label","id","children","className","onSelect","selected","onActionClick","ouiaId","ouiaSafe","containsFlyout","isNavFlyout","containsDrilldown","isMenuDrilledIn","isPlain","isScrollable","drilldownItemPath","drilledInMenus","onDrillIn","onDrillOut","onGetMenuHeight","parentMenu","activeItemId","innerRef","isRootMenu","activeMenu","role"]),M=g||_&&_.includes(i)||!1;return ie.createElement(Wh.Provider,{value:{menuId:i,parentMenu:k||i,onSelect:s,onActionClick:l,activeItemId:L,selected:a,drilledInMenus:_,drilldownItemPath:v,onDrillIn:b,onDrillOut:y,onGetMenuHeight:C,flyoutRef:this.state.flyoutRef,setFlyoutRef:B=>this.setState({flyoutRef:B}),disableHover:this.state.disableHover,role:N}},T&&ie.createElement(OA,{containerRef:this.menuRef||null,additionalKeyHandler:this.handleExtraKeys,createNavigableElements:this.createNavigableElements,isActiveElement:B=>document.activeElement.closest("li")===B||document.activeElement.parentElement===B||document.activeElement.closest(".pf-c-menu__search")===B||document.activeElement.closest("ol")&&document.activeElement.closest("ol").firstChild===B,getFocusableElement:B=>B.tagName==="DIV"&&B.querySelector("input")||B.firstChild.tagName==="LABEL"&&B.querySelector("input")||B.firstChild,noHorizontalArrowHandling:document.activeElement&&(document.activeElement.classList.contains("pf-c-breadcrumb__link")||document.activeElement.classList.contains("pf-c-dropdown__toggle")),noEnterHandling:!0,noSpaceHandling:!0}),ie.createElement("div",Object.assign({id:i,className:Pn(rn.menu,m&&rn.modifiers.plain,p&&rn.modifiers.scrollable,d&&rn.modifiers.flyout,h&&rn.modifiers.nav,f&&rn.modifiers.drilldown,M&&rn.modifiers.drilledIn,o),"aria-label":t,ref:this.menuRef},yA(PS.displayName,c!==void 0?c:this.state.ouiaStateId,u),I),r))}}MS.displayName="Menu",MS.contextType=Wh,MS.defaultProps={ouiaSafe:!0,isRootMenu:!0,isPlain:!1,isScrollable:!1,role:"menu"};const PS=ie.forwardRef((n,e)=>ie.createElement(MS,Object.assign({},n,{innerRef:e})));PS.displayName="Menu";const fq=ie.forwardRef((n,e)=>{const{getHeight:t,children:i,menuHeight:r,maxMenuHeight:o}=n,s=hn(n,["getHeight","children","menuHeight","maxMenuHeight"]),a=ie.createRef(),l=(c,u,d)=>{if(c){let h=c.clientHeight,f=null,g=c.closest(`.${rn.menuList}`);for(;g!==null&&g.nodeType===1;)g.classList.contains(rn.menuList)&&(f=g),g=g.parentElement;if(f){const m=getComputedStyle(f),p=parseFloat(m.getPropertyValue("padding-top").replace(/px/g,""))+parseFloat(m.getPropertyValue("padding-bottom").replace(/px/g,""))+parseFloat(getComputedStyle(f.parentElement).getPropertyValue("border-bottom-width").replace(/px/g,""));h=h+p}d&&d(u,h),t&&t(h.toString())}return e||a};return ie.createElement(Wh.Consumer,null,({menuId:c,onGetMenuHeight:u})=>ie.createElement("div",Object.assign({},s,{className:Pn(rn.menuContent,n.className),ref:d=>l(d,c,u),style:Object.assign(Object.assign({},r&&{"--pf-c-menu__content--Height":r}),o&&{"--pf-c-menu__content--MaxHeight":o})}),i))});fq.displayName="MenuContent";const JVe={name:"--pf-c-menu--m-flyout__menu--top-offset",value:"0px",var:"var(--pf-c-menu--m-flyout__menu--top-offset)"},eWe={name:"--pf-c-menu--m-flyout__menu--m-left--right-offset",value:"0px",var:"var(--pf-c-menu--m-flyout__menu--m-left--right-offset)"},tWe={name:"--pf-c-menu--m-flyout__menu--left-offset",value:"0px",var:"var(--pf-c-menu--m-flyout__menu--left-offset)"};var $h;(function(n){n.sm="sm",n.md="md",n.lg="lg",n.xl="xl"})($h||($h={}));const nWe=n=>{switch(n){case $h.sm:return"1em";case $h.md:return"1.5em";case $h.lg:return"2em";case $h.xl:return"3em";default:return"1em"}};let iWe=0;function iv({name:n,xOffset:e=0,yOffset:t=0,width:i,height:r,svgPath:o}){var s;return s=class extends ie.Component{constructor(){super(...arguments),this.id=`icon-title-${iWe++}`}render(){const l=this.props,{size:c,color:u,title:d,noVerticalAlign:h}=l,f=hn(l,["size","color","title","noVerticalAlign"]),g=!!d,m=nWe(c),p=-.125*Number.parseFloat(m),v=h?null:{verticalAlign:`${p}em`},_=[e,t,i,r].join(" ");return ie.createElement("svg",Object.assign({style:v,fill:u,height:m,width:m,viewBox:_,"aria-labelledby":g?this.id:null,"aria-hidden":g?null:!0,role:"img"},f),g&&ie.createElement("title",{id:this.id},d),ie.createElement("path",{d:o}))}},s.displayName=n,s.defaultProps={color:"currentColor",size:$h.sm,noVerticalAlign:!1},s}const rWe=iv({name:"ExternalLinkAltIcon",height:512,width:512,svgPath:"M432,320H400a16,16,0,0,0-16,16V448H64V128H208a16,16,0,0,0,16-16V80a16,16,0,0,0-16-16H48A48,48,0,0,0,0,112V464a48,48,0,0,0,48,48H400a48,48,0,0,0,48-48V336A16,16,0,0,0,432,320ZM488,0h-128c-21.37,0-32.05,25.91-17,41l35.73,35.73L135,320.37a24,24,0,0,0,0,34L157.67,377a24,24,0,0,0,34,0L435.28,133.32,471,169c15,15,41,4.5,41-17V24A24,24,0,0,0,488,0Z",yOffset:0,xOffset:0}),oWe=iv({name:"AngleRightIcon",height:512,width:256,svgPath:"M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z",yOffset:0,xOffset:0}),sWe=iv({name:"AngleLeftIcon",height:512,width:256,svgPath:"M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z",yOffset:0,xOffset:0}),aWe=iv({name:"CheckIcon",height:512,width:512,svgPath:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z",yOffset:0,xOffset:0}),L_t="",qu={check:"pf-c-check",checkBody:"pf-c-check__body",checkDescription:"pf-c-check__description",checkInput:"pf-c-check__input",checkLabel:"pf-c-check__label",checkLabelRequired:"pf-c-check__label-required",modifiers:{standalone:"pf-m-standalone",disabled:"pf-m-disabled"}},gq=()=>{};class wm extends ie.Component{constructor(e){super(e),this.handleChange=t=>{this.props.onChange(t.currentTarget.checked,t)},this.state={ouiaStateId:wA(wm.displayName)}}render(){const e=this.props,{"aria-label":t,className:i,onChange:r,isValid:o,isDisabled:s,isRequired:a,isChecked:l,label:c,checked:u,defaultChecked:d,description:h,body:f,ouiaId:g,ouiaSafe:m,component:p}=e,v=hn(e,["aria-label","className","onChange","isValid","isDisabled","isRequired","isChecked","label","checked","defaultChecked","description","body","ouiaId","ouiaSafe","component"]);v.id||console.error("Checkbox:","id is required to make input accessible");const _={};return([!0,!1].includes(u)||l===!0)&&(_.checked=u||l),r!==gq&&(_.checked=l),[!1,!0].includes(d)&&(_.defaultChecked=d),_.checked=_.checked===null?!1:_.checked,ie.createElement(p,{className:Pn(qu.check,!c&&qu.modifiers.standalone,i)},ie.createElement("input",Object.assign({},v,{className:Pn(qu.checkInput),type:"checkbox",onChange:this.handleChange,"aria-invalid":!o,"aria-label":t,disabled:s,required:a,ref:b=>b&&(b.indeterminate=l===null)},_,yA(wm.displayName,g!==void 0?g:this.state.ouiaStateId,m))),c&&ie.createElement("label",{className:Pn(qu.checkLabel,s&&qu.modifiers.disabled),htmlFor:v.id},c,a&&ie.createElement("span",{className:Pn(qu.checkLabelRequired),"aria-hidden":"true"},JBe)),h&&ie.createElement("span",{className:Pn(qu.checkDescription)},h),f&&ie.createElement("span",{className:Pn(qu.checkBody)},f))}}wm.displayName="Checkbox",wm.defaultProps={className:"",isValid:!0,isDisabled:!1,isRequired:!1,isChecked:!1,onChange:gq,ouiaSafe:!0,component:"div"};const lWe=iv({name:"StarIcon",height:512,width:576,svgPath:"M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z",yOffset:0,xOffset:0}),cWe=n=>{var{className:e="",icon:t,onClick:i,"aria-label":r,isFavorited:o=null,isDisabled:s,actionId:a,innerRef:l}=n,c=hn(n,["className","icon","onClick","aria-label","isFavorited","isDisabled","actionId","innerRef"]);return ie.createElement(Wh.Consumer,null,({onActionClick:u})=>ie.createElement(hq.Consumer,null,({itemId:d,isDisabled:h})=>{const f=g=>{i&&i(g),u&&u(g,d,a)};return ie.createElement("button",Object.assign({className:Pn(rn.menuItemAction,o!==null&&rn.modifiers.favorite,o&&rn.modifiers.favorited,e),"aria-label":r,onClick:f},(s===!0||h===!0)&&{disabled:!0},{ref:l,tabIndex:-1},c),ie.createElement("span",{className:Pn(rn.menuItemActionIcon)},t==="favorites"||o!==null?ie.createElement(lWe,{"aria-hidden":!0}):t))}))},mq=ie.forwardRef((n,e)=>ie.createElement(cWe,Object.assign({},n,{innerRef:e})));mq.displayName="MenuItemAction";const pq=ie.createContext({direction:"right"}),uWe=n=>{var{children:e,className:t,itemId:i=null,to:r,hasCheck:o=!1,isActive:s=null,isFavorited:a=null,isLoadButton:l=!1,isLoading:c=!1,flyoutMenu:u,direction:d,description:h=null,onClick:f=()=>{},component:g="button",isDisabled:m=!1,isExternalLink:p=!1,isSelected:v=null,isFocused:_,isDanger:b=!1,icon:y,actions:C,onShowFlyout:k,drilldownMenu:L,isOnPath:D,innerRef:T}=n,O=hn(n,["children","className","itemId","to","hasCheck","isActive","isFavorited","isLoadButton","isLoading","flyoutMenu","direction","description","onClick","component","isDisabled","isExternalLink","isSelected","isFocused","isDanger","icon","actions","onShowFlyout","drilldownMenu","isOnPath","innerRef"]);const{menuId:N,parentMenu:I,onSelect:M,onActionClick:B,activeItemId:V,selected:ee,drilldownItemPath:se,onDrillIn:ae,onDrillOut:re,flyoutRef:J,setFlyoutRef:ue,disableHover:Z,role:X}=ie.useContext(Wh);let ce=r?"a":g;o&&!r&&(ce="label");const[De,te]=ie.useState(null),xe=ie.useContext(pq),[ge,we]=ie.useState(xe.direction),Se=ie.useRef(),pe=Se===J,Q=u!==void 0,Xe=R=>{!pe&&R?ue(Se):pe&&!R&&ue(null),k&&R&&k()};IA(()=>{if(Q&&Se.current&&bm){const R=Se.current.lastElementChild;if(R&&R.classList.contains(rn.menu)){const F=Se.current.getClientRects()[0],z=R.getClientRects()[0];if(F&&z){const U=F.x-z.width,fe=window.innerWidth-F.x-F.width-z.width;let ke=ge;fe<0&&ke!=="left"?(we("left"),ke="left"):U<0&&ke!=="right"&&(we("right"),ke="right");let Ae=0;U<0&&fe<0&&(Ae=ke==="right"?-fe:-U),ke==="left"?(R.classList.add(rn.modifiers.left),R.style.setProperty(eWe.name,`-${Ae}px`)):R.style.setProperty(tWe.name,`-${Ae}px`);const Fe=window.innerHeight-F.y-z.height;window.innerHeight-z.height<0&&Fe<0||Fe<0&&R.style.setProperty(JVe.name,`${Fe}px`)}}}},[pe,u]),ie.useEffect(()=>{we(xe.direction)},[xe]),ie.useEffect(()=>{if(De)if(pe){const R=De.nextElementSibling;Array.from(R.getElementsByTagName("UL")[0].children).filter(z=>!(z.classList.contains("pf-m-disabled")||z.classList.contains("pf-c-divider")))[0].firstChild.focus()}else De.focus()},[pe,De]);const et=R=>{const F=R.key,z=R.target,U=R.type;(F===" "||F==="Enter"||F==="ArrowRight"||U==="click")&&(R.stopPropagation(),R.preventDefault(),pe||(Xe(!0),te(z))),(F==="Escape"||F==="ArrowLeft")&&pe&&(R.stopPropagation(),Xe(!1))},Ve=(R,F)=>{F&&F(R,i),f&&f(R)},H=D&&D||se&&se.includes(i)||!1;let le;d&&(d==="down"?le=R=>ae&&ae(R,N,typeof L=="function"?L().props.id:L.props.id,i):le=R=>re&&re(R,I,i));let be={};ce==="a"?be={href:r,"aria-disabled":m?!0:null,disabled:null}:ce==="button"&&(be={type:"button"}),D?be["aria-expanded"]=!0:Q&&(be["aria-haspopup"]="menu",be["aria-expanded"]=pe);const je=()=>s!==null?s?"page":null:i!==null&&V!==null?i===V:null,Y=()=>v!==null?v:ee!==null&&i!==null?Array.isArray(ee)&&ee.includes(i)||i===ee:!1,j=()=>{Z||(Q?Xe(!0):ue(null))},q=X==="listbox";return ie.createElement("li",Object.assign({className:Pn(rn.menuListItem,m&&rn.modifiers.disabled,H&&rn.modifiers.currentPath,l&&rn.modifiers.load,c&&rn.modifiers.loading,_&&rn.modifiers.focus,b&&rn.modifiers.danger,t),onMouseOver:j},u&&{onKeyDown:et},{ref:Se,role:o?"menuitem":"none"},O),ie.createElement(vA,null,R=>ie.createElement(ce,Object.assign({tabIndex:-1,className:Pn(rn.menuItem,Y()&&!o&&rn.modifiers.selected,t),"aria-current":je()},!o&&{disabled:m},!o&&!u&&{role:q?"option":"menuitem"},!o&&!u&&q&&{"aria-selected":Y()},{ref:T},!o&&{onClick:F=>{Ve(F,M),le&&le(F),u&&et(F)}},o&&{htmlFor:R},be),ie.createElement("span",{className:Pn(rn.menuItemMain)},d==="up"&&ie.createElement("span",{className:Pn(rn.menuItemToggleIcon)},ie.createElement(sWe,{"aria-hidden":!0})),y&&ie.createElement("span",{className:Pn(rn.menuItemIcon)},y),o&&ie.createElement("span",{className:Pn("pf-c-menu__item-check")},ie.createElement(wm,{id:R,component:"span",isChecked:v||!1,onChange:F=>Ve(F,M),isDisabled:m})),ie.createElement("span",{className:Pn(rn.menuItemText)},e),p&&ie.createElement("span",{className:Pn(rn.menuItemExternalIcon)},ie.createElement(rWe,{"aria-hidden":!0})),(u||d==="down")&&ie.createElement("span",{className:Pn(rn.menuItemToggleIcon)},ie.createElement(oWe,{"aria-hidden":!0})),Y()&&ie.createElement("span",{className:Pn(rn.menuItemSelectIcon)},ie.createElement(aWe,{"aria-hidden":!0}))),h&&d!=="up"&&ie.createElement("span",{className:Pn(rn.menuItemDescription)},ie.createElement("span",null,h)))),pe&&ie.createElement(Wh.Provider,{value:{disableHover:Z}},ie.createElement(pq.Provider,{value:{direction:ge}},u)),typeof L=="function"?L():L,ie.createElement(hq.Provider,{value:{itemId:i,isDisabled:m}},C,a!==null&&ie.createElement(mq,{icon:"favorites",isFavorited:a,"aria-label":a?"starred":"not starred",onClick:R=>B(R,i),tabIndex:-1,actionId:"fav"})))},_q=ie.forwardRef((n,e)=>ie.createElement(uWe,Object.assign({},n,{innerRef:e})));_q.displayName="MenuItem";const vq=n=>{var{children:e=null,className:t,isAriaMultiselectable:i=!1}=n,r=hn(n,["children","className","isAriaMultiselectable"]);const{role:o}=ie.useContext(Wh);return ie.createElement("ul",Object.assign({role:o},o==="listbox"&&{"aria-multiselectable":i},{className:Pn(rn.menuList,t)},r),e)};vq.displayName="MenuList";const dWe=n=>{var{children:e,className:t,onSelect:i,isOpen:r,selected:o,toggle:s,onOpenChange:a,isPlain:l,minWidth:c,innerRef:u,zIndex:d=9999,role:h="listbox"}=n,f=hn(n,["children","className","onSelect","isOpen","selected","toggle","onOpenChange","isPlain","minWidth","innerRef","zIndex","role"]);const g=E.useRef(),m=E.useRef(),p=E.useRef(),v=u||g;E.useEffect(()=>{const b=C=>{var k,L,D;(r&&a&&(!((k=v.current)===null||k===void 0)&&k.contains(C.target))||!((L=m.current)===null||L===void 0)&&L.contains(C.target))&&(C.key==="Escape"||C.key==="Tab")&&(a(!1),(D=m.current)===null||D===void 0||D.focus())},y=C=>{var k,L,D;r&&(!((k=m.current)===null||k===void 0)&&k.contains(C.target))&&C.detail===0&&setTimeout(()=>{var T;const O=(T=v==null?void 0:v.current)===null||T===void 0?void 0:T.querySelector("li button:not(:disabled),li input:not(:disabled)");O&&O.focus()},0),r&&a&&!(!((L=m==null?void 0:m.current)===null||L===void 0)&&L.contains(C.target))&&r&&!(!((D=v.current)===null||D===void 0)&&D.contains(C.target))&&a(!1)};return window.addEventListener("keydown",b),window.addEventListener("click",y),()=>{window.removeEventListener("keydown",b),window.removeEventListener("click",y)}},[r,v,a]);const _=E.createElement(PS,Object.assign({role:h,className:Pn(t),ref:v,onSelect:(b,y)=>i(b,y),isPlain:l,selected:o},c&&{style:{"--pf-c-menu--MinWidth":c}},yA(rv.displayName,f.ouiaId!==void 0?f.ouiaId:wA(rv.displayName),f.ouiaSafe!==void 0?f.ouiaSafe:!0),f),E.createElement(fq,null,e));return E.createElement("div",{ref:p},E.createElement(dq,{trigger:s(m),removeFindDomNode:!0,popper:_,appendTo:p.current||void 0,isVisible:r,zIndex:d}))},rv=E.forwardRef((n,e)=>E.createElement(dWe,Object.assign({innerRef:e},n)));rv.displayName="Select";const NA=n=>{var{children:e,className:t,isAriaMultiselectable:i=!1}=n,r=hn(n,["children","className","isAriaMultiselectable"]);return E.createElement(vq,Object.assign({isAriaMultiselectable:i,className:Pn(t)},r),e)};NA.displayName="SelectList";const MA=n=>{var{children:e,className:t}=n,i=hn(n,["children","className"]);return E.createElement(_q,Object.assign({className:Pn(t)},i),e)};MA.displayName="SelectOption";const E_t="",T_t="";function Ku(n){const{t:e}=$r(),{id:t,icon:i,value:r,onSelect:o,options:s,placeholder:a}=n,[l,c]=E.useState(!1),u=E.useMemo(()=>s.find(_=>r===_.value),[s,r]),d=_=>x.jsxs(P.MenuToggle,{id:t,ref:_,onClick:()=>c(b=>!b),isExpanded:l,onKeyDown:b=>{switch(b.key){default:c(!0);break}},children:[i&&x.jsx("span",{style:{paddingLeft:4,paddingRight:12},children:i}),u?u.label:x.jsx("span",{className:"page-select-placeholder",children:a})]}),h=E.useCallback((_,b)=>{const y=s.find(C=>C.key!==void 0?C.key===b:C.label===b);y&&(o(y.value),c(!1))},[o,s]),[f,g]=E.useState(""),m=E.useRef(null);E.useEffect(()=>{g(""),l&&m.current&&m.current.focus()},[l]),E.useEffect(()=>{n.isRequired&&!u&&s.length>0&&o(s[0].value)},[o,s,n.isRequired,u]);const p=E.useMemo(()=>s.filter(_=>f===""?!0:_.label.toLowerCase().includes(f.toLowerCase())),[s,f]),v=E.useMemo(()=>p.length>10||f,[f,p.length]);return x.jsx("div",{className:"page-single-select",children:x.jsxs(rv,{selected:u==null?void 0:u.label,onSelect:h,isOpen:l,onOpenChange:c,toggle:d,style:{zIndex:l?9999:void 0},children:[v&&x.jsx("div",{className:"page-select-header",children:x.jsx(P.SearchInput,{id:t?`${t}-search`:void 0,ref:m,value:f,onChange:(_,b)=>g(b),onClear:_=>{_.stopPropagation(),g("")}})}),p.length===0?x.jsx("div",{style:{margin:16},children:e("No results found")}):x.jsx(NA,{className:"page-select-list",children:p.map(_=>x.jsx(MA,{itemId:_.key!==void 0?_.key:_.label,description:_.description,children:_.label},_.key!==void 0?_.key:_.label))}),n.footer&&x.jsx("div",{className:"page-select-footer",children:n.footer})]})})}function hWe(n){const{t:e}=$r(),[t,i]=E.useState(!1),[r,o]=E.useState(),[s,a]=E.useState(0),[l,c]=E.useState(),[u,d]=E.useState(1),h=E.useRef(new AbortController).current;E.useEffect(()=>()=>h.abort(),[h]);const f=E.useRef(n.onSelect).current,g=E.useRef(n.queryOptions).current,m=E.useCallback(v=>{i(_=>{if(_)return _;o(void 0),c(b=>{if(b)return b});try{g(v,h.signal).then(b=>{h.signal.aborted||(c(y=>{let C;return y?C=[...y,...b.options]:C=b.options,b.total===1&&f(C[0].value),C}),a(b.total))}).catch(b=>{h.signal.aborted||(b instanceof Error?o(b):o(new Error(e("Unknown error"))))}).finally(()=>{h.signal.aborted||i(!1)})}catch(b){b instanceof Error?o(b):o(new Error(e("Unknown error"))),i(!1)}return!0})},[h.signal,f,g,e]);E.useEffect(()=>m(u),[u,m]);const p=x.jsxs(P.Stack,{hasGutter:!0,children:[t?x.jsxs(P.Flex,{alignItems:{default:"alignItemsCenter"},spaceItems:{default:"spaceItemsMd"},children:[x.jsx(P.FlexItem,{children:x.jsx(P.Spinner,{size:"md"})}),x.jsx(P.FlexItem,{children:e("Loading...")})]}):x.jsxs(P.Split,{hasGutter:!0,children:[x.jsx(P.SplitItem,{isFilled:!0,children:(l==null?void 0:l.length)!==s&&x.jsx(P.Button,{variant:"link",isInline:!0,onClick:v=>{v.preventDefault(),v.stopPropagation(),d(_=>_+1)},isSmall:!0,children:e("Load more")})}),x.jsx(P.SplitItem,{children:e("{{count}} of {{total}}",{count:(l==null?void 0:l.length)??0,total:s})})]}),n.footer]});return l?x.jsx(Ku,{id:n.id,icon:n.icon,placeholder:n.placeholder,options:l??[],value:n.value,onSelect:n.onSelect,footer:p}):r?x.jsx(P.Button,{id:n.id,variant:"secondary",isDanger:!0,icon:x.jsx(Ct.SyncAltIcon,{}),iconPosition:"right",onClick:v=>{d(_=>(_===1&&m(1),1))},children:typeof n.queryErrorText=="function"?n.queryErrorText(r):n.queryErrorText??e("Error loading options")}):x.jsx(P.Button,{id:n.id,variant:"control",isLoading:!0,children:n.queryPlaceholder??e("Loading options...")})}const I_t="";function bq(n){const{t:e}=$r(),{id:t,icon:i,placeholder:r,values:o,onSelect:s,options:a,variant:l,disableClearSelection:c}=n,[u,d]=E.useState(!1),h=E.useMemo(()=>a.filter(C=>o==null?!1:o.includes(C.value)),[a,o]),f=C=>x.jsxs(P.MenuToggle,{isFullWidth:!0,id:t,ref:C,onClick:()=>d(k=>!k),isExpanded:u,onKeyDown:k=>{switch(k.key){default:d(!0);break}},children:[i&&x.jsx("span",{style:{paddingLeft:4,paddingRight:12},children:i}),h.length>0?x.jsx(x.Fragment,{children:l==="count"?x.jsx(P.Chip,{isReadOnly:c,onClick:()=>s(()=>[]),style:{marginTop:-2,marginBottom:-2},children:h.length}):x.jsxs(x.Fragment,{children:[x.jsx(P.ChipGroup,{children:h.map(k=>x.jsx(P.Chip,{isReadOnly:!0,style:{marginTop:-2,marginBottom:-2},children:k.label},k.label))}),!c&&x.jsx(Ct.TimesIcon,{role:"button","aria-hidden":!0,onClick:()=>s(()=>[]),style:{verticalAlign:"middle",marginLeft:8},size:"sm"})]})}):x.jsx("span",{className:"page-select-placeholder",children:r})]}),g=E.useMemo(()=>h.map(C=>C.label),[h]),m=E.useCallback((C,k)=>{s(L=>{const D=a.find(T=>T.key!==void 0?T.key===k:T.label===k);return D&&((L==null?void 0:L.find(T=>T===D.value))!==void 0?L=L.filter(T=>T!==D.value):(L=L?[...L]:[],L.push(D.value))),L})},[s,a]),[p,v]=E.useState(""),_=E.useRef(null);E.useEffect(()=>{v(""),u&&_.current&&_.current.focus()},[u]);const b=E.useMemo(()=>a.filter(C=>p===""?!0:C.label.toLowerCase().includes(p.toLowerCase())),[a,p]),y=E.useMemo(()=>b.length>10||p,[p,b.length]);return x.jsx("div",{className:"page-multi-select",children:x.jsxs(rv,{selected:g,onSelect:m,isOpen:u,onOpenChange:d,toggle:f,style:{zIndex:u?9999:void 0},children:[y&&x.jsx("div",{className:"page-select-header",children:x.jsx(P.SearchInput,{id:t?`${t}-search`:void 0,ref:_,value:p,onChange:(C,k)=>v(k),onClear:C=>{C.stopPropagation(),v("")}})}),b.length===0?x.jsx("div",{style:{margin:16},children:e("No results found")}):x.jsx(NA,{className:"page-select-list",children:b.map(C=>x.jsx(MA,{itemId:C.key!==void 0?C.key:C.label,description:C.description?x.jsx("div",{style:{maxWidth:300},children:C.description}):void 0,hasCheck:!0,isSelected:h.includes(C),children:C.label},C.key!==void 0?C.key:C.label))}),n.footer&&x.jsx("div",{className:"page-select-footer",children:n.footer})]})})}function fWe(n){const{t:e}=$r(),[t,i]=E.useState(!1),[r,o]=E.useState(),[s,a]=E.useState(0),[l,c]=E.useState(),[u,d]=E.useState(1),h=E.useRef(new AbortController).current;E.useEffect(()=>()=>h.abort(),[h]);const f=E.useRef(n.onSelect).current,g=E.useRef(n.queryOptions).current,m=E.useCallback(v=>{i(_=>{if(_)return _;o(void 0),c(b=>{if(b)return b});try{g(v,h.signal).then(b=>{h.signal.aborted||(c(y=>{let C;return y?C=[...y,...b.options]:C=b.options,b.total===1&&f(()=>C.map(k=>k.value)),C}),a(b.total))}).catch(b=>{h.signal.aborted||(b instanceof Error?o(b):o(new Error(e("Unknown error"))))}).finally(()=>{h.signal.aborted||i(!1)})}catch(b){b instanceof Error?o(b):o(new Error(e("Unknown error"))),i(!1)}return!0})},[h.signal,f,g,e]);E.useEffect(()=>m(u),[u,m]);const p=x.jsxs(P.Stack,{hasGutter:!0,children:[t?x.jsxs(P.Flex,{alignItems:{default:"alignItemsCenter"},spaceItems:{default:"spaceItemsMd"},children:[x.jsx(P.FlexItem,{children:x.jsx(P.Spinner,{size:"md"})}),x.jsx(P.FlexItem,{children:e("Loading...")})]}):x.jsxs(P.Split,{hasGutter:!0,children:[x.jsx(P.SplitItem,{isFilled:!0,children:(l==null?void 0:l.length)!==s&&x.jsx(P.Button,{variant:"link",isInline:!0,onClick:v=>{v.preventDefault(),v.stopPropagation(),d(_=>_+1)},isSmall:!0,children:e("Load more")})}),x.jsx(P.SplitItem,{children:e("{{count}} of {{total}}",{count:(l==null?void 0:l.length)??0,total:s})})]}),n.footer]});return l?x.jsx(bq,{id:n.id,icon:n.icon,placeholder:n.placeholder,options:l??[],values:n.values,onSelect:n.onSelect,variant:n.variant,footer:p}):r?x.jsx(P.Button,{id:n.id,variant:"secondary",isDanger:!0,icon:x.jsx(Ct.SyncAltIcon,{}),iconPosition:"right",onClick:v=>{d(_=>(_===1&&m(1),1))},children:typeof n.queryErrorText=="function"?n.queryErrorText(r):n.queryErrorText??e("Error loading options")}):x.jsx(P.Button,{id:n.id,variant:"control",isLoading:!0,children:n.queryPlaceholder??e("Loading options...")})}function gWe(n){const{filterValues:e,setFilterValues:t,placeholder:i,isRequired:r,defaultValue:o}=n,s=e&&e.length>0?e[0]:void 0,a=n.options.find(f=>f.value===s);r&&!a&&t(()=>[o??n.options[0].value]);function l(f){n.options.find(m=>m.value===f)&&t(()=>[f])}const[c,u]=E.useState(()=>{if(e&&e.length>1)return e[1]}),[d,h]=E.useState(()=>{if(e&&e.length>2)return e[2]});return E.useEffect(()=>{if(a&&a.isCustom){const f=[a.value];c&&(f.push(c),d&&f.push(d)),t(()=>f)}},[a,c,d,t]),x.jsxs(P.ToolbarItem,{children:[x.jsx(Ku,{value:(a==null?void 0:a.value)??"",onSelect:l,options:n.options,placeholder:i}),a&&a.isCustom&&x.jsx(mWe,{to:d,setTo:h,from:c,setFrom:u})]})}function mWe(n){const{to:e,setTo:t,from:i,setFrom:r}=n,{t:o}=$r(),s=(u,d)=>{r(d)},a=(u,d)=>{t(d)},l=i?new Date(i):void 0,c=u=>l?P.isValidDate(l)&&u>=l?"":o('The "to" date must be after the "from" date'):"";return x.jsxs(x.Fragment,{children:[x.jsx(P.DatePicker,{value:i,onChange:s,"aria-label":"Start date",placeholder:"YYYY-MM-DD"}),x.jsx("div",{style:{alignSelf:"baseline",padding:6},children:o("to")}),x.jsx(P.DatePicker,{value:e,onChange:a,isDisabled:!l||!P.isValidDate(l),rangeStart:l,validators:[c],"aria-label":"End date",placeholder:o("now"),invalidFormatText:o("Invalid date format")}),e!==void 0&&x.jsx(P.Button,{variant:"control",style:{alignSelf:"flex-start"},onClick:()=>t(void 0),children:x.jsx(Ct.TimesCircleIcon,{})})]})}function pWe(n){const{t:e}=$r(),[t,i]=E.useState("");let r=n.placeholder;if(!r)switch(n.comparison){case"contains":r=e("contains");break;case"startsWith":r=e("starts with");break;case"endsWith":r=e("ends with");break;case"equals":r=e("equals");break}return x.jsxs(P.InputGroup,{children:[x.jsxs(P.TextInputGroup,{style:{minWidth:220},children:[x.jsx(P.TextInputGroupMain,{id:n.id,value:t,onChange:(o,s)=>{i(typeof o=="string"?o:s)},onKeyUp:o=>{t&&o.key==="Enter"&&(n.addFilter(t),i(""))},placeholder:r}),t!==""&&x.jsx(P.TextInputGroupUtilities,{children:x.jsx(P.Button,{variant:"plain","aria-label":"clear filter",onClick:()=>i(""),style:{opacity:t?void 0:0},tabIndex:-1,children:x.jsx(Ct.TimesIcon,{})})})]}),x.jsx(P.Button,{variant:t?"primary":"control","aria-label":"apply filter",onClick:()=>{n.addFilter(t),i("")},tabIndex:-1,isDisabled:!t,children:x.jsx(Ct.ArrowRightIcon,{})})]})}var yq=(n=>(n[n.Text=0]="Text",n[n.SingleSelect=1]="SingleSelect",n[n.MultiSelect=2]="MultiSelect",n[n.DateRange=3]="DateRange",n[n.AsyncSingleSelect=4]="AsyncSingleSelect",n[n.AsyncMultiSelect=5]="AsyncMultiSelect",n))(yq||{});function wq(n){var l;const{toolbarFilters:e,filterState:t,setFilterState:i}=n,[r,o]=E.useState(()=>e&&(e==null?void 0:e.length)>0?e[0].key:""),s=e==null?void 0:e.find(c=>c.key===r);if(!s)return x.jsx(x.Fragment,{});if(!e)return x.jsx(x.Fragment,{});if(e.length===0)return x.jsx(x.Fragment,{});let a=e.length===1;return e.length>=1&&(e[0].type===2&&e[0].isPinned||e[0].type===1&&e[0].isPinned&&(t[e[0].key]==null||((l=t[e[0].key])==null?void 0:l.length)===0))&&(a=!1),x.jsx(x.Fragment,{children:e.length===1?x.jsxs(P.ToolbarItem,{children:[a&&x.jsx("div",{style:{marginTop:6,marginRight:6,whiteSpace:"nowrap"},children:e[0].label}),x.jsx(Sq,{id:"filter-input",filter:s,filterState:t,setFilterState:i})]}):x.jsxs(P.ToolbarItem,{children:[x.jsx(Ku,{id:"filter",value:r,onSelect:o,icon:x.jsx(Ct.FilterIcon,{}),options:e.map(c=>({label:c.label,value:c.key})),placeholder:""}),x.jsx(Sq,{id:"filter-input",filter:s,filterState:t,setFilterState:i})]})})}function Cq(n){const{toolbarFilters:e,setFilterState:t,filterState:i}=n,[r]=Ci(),o=!Do("md");if(!e)return x.jsx(x.Fragment,{});if(e.length===0)return x.jsx(x.Fragment,{});const s=e.filter(l=>!l.isPinned),a=e.filter(l=>!!l.isPinned);return x.jsx(P.ToolbarToggleGroup,{toggleIcon:x.jsx(Ct.FilterIcon,{}),breakpoint:"md",children:x.jsxs(P.ToolbarGroup,{variant:"filter-group",style:{flexWrap:"wrap",gap:16},children:[o&&x.jsx(P.ToolbarItem,{variant:"label",children:r.filter}),x.jsx(wq,{toolbarFilters:s,setFilterState:t,filterState:i}),a==null?void 0:a.map(l=>x.jsx(wq,{toolbarFilters:[l],setFilterState:t,filterState:i},l.key)),e==null?void 0:e.map(l=>{const c=(i==null?void 0:i[l.key])||[];return l.isPinned&&l.type===1?x.jsx(x.Fragment,{}):l.isPinned&&l.type===3?x.jsx(x.Fragment,{}):x.jsx(P.ToolbarFilter,{categoryName:l.label,chips:c.map(u=>{var d;switch(l.type){case 1:case 2:return((d=l.options.find(h=>h.value===u))==null?void 0:d.label)??u;default:return u}}),deleteChip:(u,d)=>{t==null||t(h=>{var m;const f={...h};switch(d=typeof d=="string"?d:d.key,l.type){case 1:case 2:d=((m=l.options.find(p=>p.value===d))==null?void 0:m.label)??d;break}let g=h[l.key];return g&&(g=g.filter(p=>p!==d),g.length===0?delete f[l.key]:f[l.key]=g),f})},deleteChipGroup:()=>{t==null||t(u=>{const d={...u};return delete d[l.key],d})},showToolbarItem:!1,children:x.jsx(x.Fragment,{})},l.label)})]})})}function Sq(n){const{filter:e,filterState:t,setFilterState:i}=n,r=t==null?void 0:t[e.key],o=E.useCallback(a=>{i(l=>{const c={...l},u=c[e.key]??[];return c[e.key]=a(u),c})},[e.key,i]),s=E.useCallback(a=>{i(l=>{const c={...l},u=c[e.key]??[];return c[e.key]=[...u,a],c})},[e.key,i]);switch(e.type){case 0:return x.jsx(pWe,{id:n.id??e.key,addFilter:s,placeholder:e.placeholder,comparison:e.comparison});case 1:return x.jsx(Ku,{id:n.id??e.key,placeholder:e.placeholder,value:r&&(r==null?void 0:r.length)>0?r[0]:"",onSelect:a=>o(()=>[a]),options:e.options,isRequired:e.isRequired});case 4:return x.jsx(hWe,{id:n.id??e.key,value:r&&(r==null?void 0:r.length)>0?r[0]:"",onSelect:a=>o(()=>[a]),placeholder:e.placeholder||"",queryOptions:e.queryOptions,queryErrorText:e.queryErrorText,queryPlaceholder:e.queryPlaceholder,isRequired:e.isRequired,footer:e.openBrowse?x.jsx(P.Button,{variant:"link",onClick:()=>{var a;(a=e.openBrowse)==null||a.call(e,l=>o(()=>[l]),r&&r.length>0?r[0]:void 0)},children:"Browse"}):void 0});case 5:return x.jsx(fWe,{id:n.id??e.key,values:r,onSelect:o,placeholder:e.placeholder||"",queryOptions:e.queryOptions,queryErrorText:e.queryErrorText,queryPlaceholder:e.queryPlaceholder,footer:e.openBrowse?x.jsx(P.Button,{variant:"link",onClick:()=>{var a;(a=e.openBrowse)==null||a.call(e,l=>o(()=>l),r)},children:"Browse"}):void 0});case 2:return x.jsx(bq,{id:n.id??e.key,placeholder:e.placeholder,values:r,onSelect:o,options:e.options,variant:"count",disableClearSelection:!0});case 3:return x.jsx(gWe,{id:n.id??e.key,label:e.label,placeholder:e.placeholder??"",filterValues:r,setFilterValues:o,options:e.options,isRequired:e.isRequired,defaultValue:e.defaultValue})}}function _We(n){const{sort:e,setSort:t,sortDirection:i,setSortDirection:r,sortOptions:o}=n,s=o==null?void 0:o.find(u=>u.value===e),a=s?s.type:void 0,[l]=Ci(),c=E.useMemo(()=>{switch(a){case"text":switch(i){case"asc":return x.jsx(Ct.SortAlphaUpIcon,{});case"desc":return x.jsx(Ct.SortAlphaDownAltIcon,{})}break;case"number":switch(i){case"asc":return x.jsx(Ct.SortNumericUpIcon,{});case"desc":return x.jsx(Ct.SortNumericDownAltIcon,{})}break;default:switch(i){case"asc":return x.jsx(Ct.SortAmountUpIcon,{});case"desc":return x.jsx(Ct.SortAmountDownIcon,{})}break}return x.jsx(x.Fragment,{})},[i,a]);return!o||o.length<=0?x.jsx(x.Fragment,{}):x.jsx(P.ToolbarToggleGroup,{breakpoint:"md",toggleIcon:void 0,children:x.jsxs(P.ToolbarGroup,{variant:"filter-group",children:[x.jsx(P.ToolbarItem,{variant:"label",children:l.sort}),x.jsx(P.ToolbarItem,{children:x.jsxs(P.Split,{children:[x.jsx(vWe,{sortOptions:o,sort:e,setSort:t,setSortDirection:r}),x.jsx(P.Button,{variant:"control",icon:c,onClick:()=>{i==="asc"?r==null||r("desc"):r==null||r("asc")}})]})})]})})}function vWe(n){const{sortOptions:e,sort:t,setSort:i,setSortDirection:r}=n,o=E.useCallback(s=>{if(s){const a=e.find(l=>l.value===s);a&&t!==s&&a.defaultDirection&&(r==null||r(a.defaultDirection)),i==null||i(s)}},[e,i,r,t]);return x.jsx(Ku,{placeholder:"",value:t,onSelect:o,options:e.map(s=>({label:s.label,value:s.value}))})}function bWe(n){return E.useMemo(()=>{const t=[];for(const i of n)if(i.sort){if(i.defaultSort){t.push({label:i.header,value:i.sort,type:"text",defaultDirection:i.defaultSortDirection});continue}switch(i.type){case"count":t.push({label:i.header,value:i.sort,type:"number",defaultDirection:i.defaultSortDirection});break;case"text":t.push({label:i.header,value:i.sort,type:"text",defaultDirection:i.defaultSortDirection});break;default:t.push({label:i.header,value:i.sort,defaultDirection:i.defaultSortDirection});break}}return t},[n])}function yWe(n){const{viewType:e,setViewType:t,openColumnModal:i}=n,[r]=Ci();let o=0;return n.disableTableView||o++,n.disableCardView||o++,n.disableListView||o++,x.jsxs(P.ToolbarGroup,{variant:"button-group",style:{justifyContent:"end",marginRight:0},children:[i&&x.jsx(P.ToolbarItem,{children:x.jsx(P.Tooltip,{content:r.manageColumns,children:x.jsx(P.Button,{variant:"plain",icon:x.jsx(Ct.ColumnsIcon,{}),onClick:i})})}),o>1&&x.jsx(P.ToolbarItem,{children:x.jsx(P.ToggleGroup,{"aria-label":"table view toggle",children:[!n.disableTableView&&Xn.Table,!n.disableListView&&Xn.List,!n.disableCardView&&Xn.Cards].filter(s=>s).map(s=>{switch(s){case Xn.Cards:return x.jsx(P.Tooltip,{content:r.cardView,position:"top-end",enableFlip:!1,children:x.jsx(P.ToggleGroupItem,{icon:x.jsx(Ct.ThLargeIcon,{}),isSelected:e===Xn.Cards,onClick:()=>t==null?void 0:t(Xn.Cards),"aria-label":"card view"})},s);case Xn.List:return x.jsx(P.Tooltip,{content:r.listView,position:"top-end",enableFlip:!1,children:x.jsx(P.ToggleGroupItem,{icon:x.jsx(Ct.ListIcon,{}),isSelected:e===Xn.List,onClick:()=>t==null?void 0:t(Xn.List),"aria-label":"list view"})},s);case Xn.Table:return x.jsx(P.Tooltip,{content:r.tableView,position:"top-end",enableFlip:!1,children:x.jsx(P.ToggleGroupItem,{icon:x.jsx(Ct.TableIcon,{}),isSelected:e===Xn.Table,onClick:()=>t==null?void 0:t(Xn.Table),"aria-label":"table view"})},s)}})})})]})}const wWe=un.div`
|
339
|
+
`;function UBe(n){const{ariaLabel:e="",content:t,header:i,id:r="",maxWidth:o="",...s}=n,[a]=Ci();return t?x.jsx(P.Popover,{bodyContent:t,headerContent:i,hideOnOutsideClick:!0,id:r,"data-cy":r,maxWidth:o,...s,children:x.jsx(zBe,{"aria-label":e??a.moreInformation,"aria-haspopup":"true",className:"pf-c-form__group-label-help",onClick:l=>l.preventDefault(),type:"button",children:x.jsx(Ct.HelpIcon,{noVerticalAlign:!0})})}):null}function G_(n){const{label:e,children:t,helpText:i,isEmpty:r}=n;return t===null||typeof t>"u"||t===""?x.jsx(x.Fragment,{}):r?x.jsx(x.Fragment,{}):x.jsxs(P.DescriptionListGroup,{children:[e&&x.jsxs(P.DescriptionListTerm,{children:[e,i?x.jsx(UBe,{header:e,content:i}):null]}),x.jsx(P.DescriptionListDescription,{id:e==null?void 0:e.toLowerCase().split(" ").join("-"),children:t})]})}function RU(n){const{disablePadding:e}=n,t=Tg(),i=t.formLayout,r=n.numberOfColumns?n.numberOfColumns:t.formColumns,o=!1;return x.jsx(P.PageSection,{variant:"light",padding:{default:"noPadding"},className:"dark-1",children:x.jsx(P.DescriptionList,{orientation:{sm:i,md:i,lg:i,xl:i,"2xl":i},columnModifier:r==="multiple"?{default:"1Col",sm:"1Col",md:"2Col",lg:"2Col",xl:"3Col","2xl":"3Col"}:void 0,style:{maxWidth:1200,padding:e?void 0:24},isCompact:o,children:n.children})})}var Xn=(n=>(n.Table="table",n.List="list",n.Cards="cards",n))(Xn||{}),Uu=(n=>(n.Description="description",n.Expanded="expanded",n.Hidden="hidden",n))(Uu||{}),FU=(n=>(n.Name="name",n.Subtitle="subtitle",n.Description="description",n.Hidden="hidden",n.Primary="primary",n.Secondary="secondary",n))(FU||{}),BU=(n=>(n.Name="name",n.Subtitle="subtitle",n.Description="description",n.Hidden="hidden",n))(BU||{}),VU=(n=>(n.Hidden="hidden",n))(VU||{});function jr(n){const{item:e,column:t}=n;if(!t)return x.jsx(x.Fragment,{});switch(t.type){case"text":return x.jsx(qD,{text:t.value(e)});case"description":return x.jsx(qD,{text:t.value(e)});case"datetime":return x.jsx(z8,{format:"since",value:t.value(e)});case"count":return x.jsx(x.Fragment,{children:t.value(e)??"-"});case"labels":return x.jsx(U8,{labels:t.value(e)??[]});default:return x.jsx(x.Fragment,{children:t.cell(e)})}}function pA(n){return E.useMemo(()=>n.filter(e=>!(e.table==="hidden"||e.table==="description"||e.table==="expanded")),[n])}function WU(n){return E.useMemo(()=>n.filter(e=>e.list!=="hidden"),[n])}function $U(n){return E.useMemo(()=>n.filter(e=>e.card!=="hidden"),[n])}function _A(n){return E.useMemo(()=>n.filter(e=>e.modal!=="hidden"),[n])}function qBe(n,e){const t=pA(n),i=WU(n),r=$U(n);switch(e){case Xn.Table:return t;case Xn.List:return i;case Xn.Cards:return r}}function jU(n){return E.useMemo(()=>n.filter(e=>e.table==="hidden"?!1:e.table==="description"),[n])}function HU(n){return E.useMemo(()=>n.filter(e=>e.table==="hidden"?!1:e.table==="expanded"),[n])}function KBe(n){return E.useMemo(()=>n.map(e=>({...e,sort:void 0})),[n])}function GBe(n){return E.useMemo(()=>n.map(e=>({...e,table:e.table==="expanded"?void 0:e.table})),[n])}function zU(n){const{item:e,columns:t,disablePadding:i,numberOfColumns:r}=n;return e?x.jsx(RU,{disablePadding:i,numberOfColumns:r,children:t.map(o=>"value"in o&&o.value&&!o.value(e)?x.jsx(E.Fragment,{},o.id??o.header):x.jsx(G_,{label:o.header,children:x.jsx(jr,{column:o,item:e})},o.id??o.header))}):x.jsx(x.Fragment,{})}let YBe=class{constructor(e){x7(this,"value");x7(this,"next");this.value=e}};class ZBe{constructor(){iD(this,oc,void 0);iD(this,hg,void 0);iD(this,fg,void 0);this.clear()}enqueue(e){const t=new YBe(e);oh(this,oc)?(oh(this,hg).next=t,Cu(this,hg,t)):(Cu(this,oc,t),Cu(this,hg,t)),L7(this,fg)._++}dequeue(){const e=oh(this,oc);if(e)return Cu(this,oc,oh(this,oc).next),L7(this,fg)._--,e.value}clear(){Cu(this,oc,void 0),Cu(this,hg,void 0),Cu(this,fg,0)}get size(){return oh(this,fg)}*[Symbol.iterator](){let e=oh(this,oc);for(;e;)yield e.value,e=e.next}}oc=new WeakMap,hg=new WeakMap,fg=new WeakMap;function XBe(n){if(!((Number.isInteger(n)||n===Number.POSITIVE_INFINITY)&&n>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");const e=new ZBe;let t=0;const i=()=>{t--,e.size>0&&e.dequeue()()},r=async(a,l,c)=>{t++;const u=(async()=>a(...c))();l(u);try{await u}catch{}i()},o=(a,l,c)=>{e.enqueue(r.bind(void 0,a,l,c)),(async()=>(await Promise.resolve(),t<n&&e.size>0&&e.dequeue()()))()},s=(a,...l)=>new Promise(c=>{o(a,c,l)});return Object.defineProperties(s,{activeCount:{get:()=>t},pendingCount:{get:()=>e.size},clearQueue:{value:()=>{e.clear()}}}),s}function UU(n){const[e,t]=E.useState(!1),i=Do("sm"),[r]=Ci(),{pageItems:o,selectedItems:s,selectItems:a,unselectAll:l}=n,c=n.itemCount!==void 0&&n.itemCount>0&&o&&o.length>0&&(o??[]).every(p=>s==null?void 0:s.includes(p)),u=E.useCallback(()=>{c?l==null||l():a==null||a(o??[])},[c,l,a,o]),d=E.useMemo(()=>i?s&&s.length>0?`${s.length} selected`:"":s&&s.length>0?`${s.length}`:"",[i,s]),h=E.useMemo(()=>{const p=s?s.length:0;return x.jsx(P.DropdownToggle,{splitButtonItems:[x.jsx(P.DropdownToggleCheckbox,{id:"select-all","aria-label":"Select all",isChecked:c?!0:p>0?null:!1,onChange:u,children:d},"select-all")],onToggle:v=>t(v)})},[s,c,u,d]),f=E.useMemo(()=>x.jsx(P.DropdownItem,{id:"select-none",onClick:()=>{l==null||l(),t(!1)},children:n.selectNoneText??r.selectNone},"select-none"),[n.selectNoneText,r.selectNone,l]),g=E.useMemo(()=>x.jsx(P.DropdownItem,{id:"select-page",onClick:()=>{a==null||a(o??[]),t(!1)},children:`Select ${(o==null?void 0:o.length)??0} page items`},"select-page"),[a,o]),m=E.useMemo(()=>[f,g],[f,g]);return x.jsx(P.Dropdown,{isOpen:e,toggle:h,dropdownItems:m,style:{zIndex:400}})}const e_t="";function Pn(...n){const e=[],t={}.hasOwnProperty;return n.filter(Boolean).forEach(i=>{const r=typeof i;if(r==="string"||r==="number")e.push(i);else if(Array.isArray(i)&&i.length){const o=Pn(...i);o&&e.push(o)}else if(r==="object")for(const o in i)t.call(i,o)&&i[o]&&e.push(o)}),e.join(" ")}const t_t="",rn={breadcrumb:"pf-c-breadcrumb",divider:"pf-c-divider",menu:"pf-c-menu",menuBreadcrumb:"pf-c-menu__breadcrumb",menuContent:"pf-c-menu__content",menuFooter:"pf-c-menu__footer",menuGroup:"pf-c-menu__group",menuGroupTitle:"pf-c-menu__group-title",menuHeader:"pf-c-menu__header",menuItem:"pf-c-menu__item",menuItemAction:"pf-c-menu__item-action",menuItemActionIcon:"pf-c-menu__item-action-icon",menuItemCheck:"pf-c-menu__item-check",menuItemDescription:"pf-c-menu__item-description",menuItemExternalIcon:"pf-c-menu__item-external-icon",menuItemIcon:"pf-c-menu__item-icon",menuItemMain:"pf-c-menu__item-main",menuItemSelectIcon:"pf-c-menu__item-select-icon",menuItemText:"pf-c-menu__item-text",menuItemToggleIcon:"pf-c-menu__item-toggle-icon",menuList:"pf-c-menu__list",menuListItem:"pf-c-menu__list-item",menuSearch:"pf-c-menu__search",modifiers:{hidden:"pf-m-hidden",hiddenOnSm:"pf-m-hidden-on-sm",visibleOnSm:"pf-m-visible-on-sm",hiddenOnMd:"pf-m-hidden-on-md",visibleOnMd:"pf-m-visible-on-md",hiddenOnLg:"pf-m-hidden-on-lg",visibleOnLg:"pf-m-visible-on-lg",hiddenOnXl:"pf-m-hidden-on-xl",visibleOnXl:"pf-m-visible-on-xl",hiddenOn_2xl:"pf-m-hidden-on-2xl",visibleOn_2xl:"pf-m-visible-on-2xl",flyout:"pf-m-flyout",top:"pf-m-top",left:"pf-m-left",drilldown:"pf-m-drilldown",drilledIn:"pf-m-drilled-in",currentPath:"pf-m-current-path",static:"pf-m-static",plain:"pf-m-plain",scrollable:"pf-m-scrollable",nav:"pf-m-nav",focus:"pf-m-focus",disabled:"pf-m-disabled",load:"pf-m-load",loading:"pf-m-loading",danger:"pf-m-danger",selected:"pf-m-selected",favorite:"pf-m-favorite",favorited:"pf-m-favorited"},themeDark:"pf-theme-dark"};let QBe=0;class vA extends ie.Component{constructor(){super(...arguments),this.id=`${this.props.prefix}${QBe++}`}render(){return this.props.children(this.id)}}vA.displayName="GenerateId",vA.defaultProps={prefix:"pf-random-id-"};const JBe="*";let eVe=0;const qU="OUIA-Generated-",bA={};function yA(n,e,t=!0){return{"data-ouia-component-type":`PF4/${n}`,"data-ouia-safe":t,"data-ouia-component-id":e}}function wA(n,e){try{let t;return typeof window<"u"?t=`${window.location.href}-${n}-${e||""}`:t=`${n}-${e||""}`,bA[t]||(bA[t]=0),`${qU}${n}-${e?`${e}-`:""}${++bA[t]}`}catch{return`${qU}${n}-${e?`${e}-`:""}${++eVe}`}}const bm=!!(typeof window<"u"&&window.document&&window.document.createElement);function Y_(n){const e=n.getBoundingClientRect();return{width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left,x:e.left,y:e.top}}function ml(n){if(n.toString()!=="[object Window]"){const e=n.ownerDocument;return e?e.defaultView:window}return n}function CA(n){const e=ml(n),t=e.pageXOffset,i=e.pageYOffset;return{scrollLeft:t,scrollTop:i}}function Z_(n){const e=ml(n).Element;return n instanceof e||n instanceof Element}function pl(n){const e=ml(n).HTMLElement;return n instanceof e||n instanceof HTMLElement}function tVe(n){return{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}}function nVe(n){return n===ml(n)||!pl(n)?CA(n):tVe(n)}function xa(n){return n?(n.nodeName||"").toLowerCase():null}function Ic(n){return(Z_(n)?n.ownerDocument:n.document).documentElement}function SA(n){return Y_(Ic(n)).left+CA(n).scrollLeft}function Ac(n){return ml(n).getComputedStyle(n)}function xA(n){const{overflow:e,overflowX:t,overflowY:i}=Ac(n);return/auto|scroll|overlay|hidden/.test(e+i+t)}function iVe(n,e,t=!1){const i=Ic(e),r=Y_(n),o=pl(e);let s={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(o||!o&&!t)&&((xa(e)!=="body"||xA(i))&&(s=nVe(e)),pl(e)?(a=Y_(e),a.x+=e.clientLeft,a.y+=e.clientTop):i&&(a.x=SA(i))),{x:r.left+s.scrollLeft-a.x,y:r.top+s.scrollTop-a.y,width:r.width,height:r.height}}function LA(n){return{x:n.offsetLeft,y:n.offsetTop,width:n.offsetWidth,height:n.offsetHeight}}function IS(n){return xa(n)==="html"?n:n.assignedSlot||n.parentNode||n.host||Ic(n)}function KU(n){return["html","body","#document"].indexOf(xa(n))>=0?n.ownerDocument.body:pl(n)&&xA(n)?n:KU(IS(n))}function X_(n,e=[]){const t=KU(n),i=xa(t)==="body",r=ml(t),o=i?[r].concat(r.visualViewport||[],xA(t)?t:[]):t,s=e.concat(o);return i?s:s.concat(X_(IS(o)))}function rVe(n){return["table","td","th"].indexOf(xa(n))>=0}function GU(n){if(!pl(n)||Ac(n).position==="fixed")return null;const e=n.offsetParent;if(e){const t=Ic(e);if(xa(e)==="body"&&Ac(e).position==="static"&&Ac(t).position!=="static")return t}return e}function oVe(n){let e=IS(n);for(;pl(e)&&["html","body"].indexOf(xa(e))<0;){const t=Ac(e);if(t.transform!=="none"||t.perspective!=="none"||t.willChange&&t.willChange!=="auto")return e;e=e.parentNode}return null}function Q_(n){const e=ml(n);let t=GU(n);for(;t&&rVe(t)&&Ac(t).position==="static";)t=GU(t);return t&&xa(t)==="body"&&Ac(t).position==="static"?e:t||oVe(n)||e}const Hs="top",La="bottom",ka="right",zs="left",kA="auto",J_=[Hs,La,ka,zs],ym="start",DA="end",sVe="clippingParents",YU="viewport",ev="popper",aVe="reference",ZU=J_.reduce((n,e)=>n.concat([`${e}-${ym}`,`${e}-${DA}`]),[]),XU=[...J_,kA].reduce((n,e)=>n.concat([e,`${e}-${ym}`,`${e}-${DA}`]),[]),lVe=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function cVe(n){const e=new Map,t=new Set,i=[];n.forEach(o=>{e.set(o.name,o)});function r(o){t.add(o.name),[...o.requires||[],...o.requiresIfExists||[]].forEach(a=>{if(!t.has(a)){const l=e.get(a);l&&r(l)}}),i.push(o)}return n.forEach(o=>{t.has(o.name)||r(o)}),i}function uVe(n){const e=cVe(n);return lVe.reduce((t,i)=>t.concat(e.filter(r=>r.phase===i)),[])}function dVe(n){let e;return()=>(e||(e=new Promise(t=>{Promise.resolve().then(()=>{e=void 0,t(n())})})),e)}function _l(n){return n.split("-")[0]}function hVe(n){const e=n.reduce((t,i)=>{const r=t[i.name];return t[i.name]=r?Object.assign(Object.assign(Object.assign({},r),i),{options:Object.assign(Object.assign({},r.options),i.options),data:Object.assign(Object.assign({},r.data),i.data)}):i,t},{});return Object.keys(e).map(t=>e[t])}function fVe(n){const e=ml(n),t=Ic(n),i=e.visualViewport;let r=t.clientWidth,o=t.clientHeight,s=0,a=0;return i&&(r=i.width,o=i.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=i.offsetLeft,a=i.offsetTop)),{width:r,height:o,x:s+SA(n),y:a}}function gVe(n){const e=Ic(n),t=CA(n),i=n.ownerDocument.body,r=Math.max(e.scrollWidth,e.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=Math.max(e.scrollHeight,e.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let s=-t.scrollLeft+SA(n);const a=-t.scrollTop;return Ac(i||e).direction==="rtl"&&(s+=Math.max(e.clientWidth,i?i.clientWidth:0)-r),{width:r,height:o,x:s,y:a}}function QU(n,e){const t=!!(e.getRootNode&&e.getRootNode().host);if(n.contains(e))return!0;if(t){let i=e;do{if(i&&n.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function EA(n){return Object.assign(Object.assign({},n),{left:n.x,top:n.y,right:n.x+n.width,bottom:n.y+n.height})}function mVe(n){const e=Y_(n);return e.top=e.top+n.clientTop,e.left=e.left+n.clientLeft,e.bottom=e.top+n.clientHeight,e.right=e.left+n.clientWidth,e.width=n.clientWidth,e.height=n.clientHeight,e.x=e.left,e.y=e.top,e}function JU(n,e){return e===YU?EA(fVe(n)):pl(e)?mVe(e):EA(gVe(Ic(n)))}function pVe(n){const e=X_(IS(n)),i=["absolute","fixed"].indexOf(Ac(n).position)>=0&&pl(n)?Q_(n):n;return Z_(i)?e.filter(r=>Z_(r)&&QU(r,i)&&xa(r)!=="body"):[]}function _Ve(n,e,t){const r=[...e==="clippingParents"?pVe(n):[].concat(e),t],o=r[0],s=r.reduce((a,l)=>{const c=JU(n,l);return a.top=Math.max(c.top,a.top),a.right=Math.min(c.right,a.right),a.bottom=Math.min(c.bottom,a.bottom),a.left=Math.max(c.left,a.left),a},JU(n,o));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function tv(n){return n.split("-")[1]}function TA(n){return["top","bottom"].indexOf(n)>=0?"x":"y"}function eq({reference:n,element:e,placement:t}){const i=t?_l(t):null,r=t?tv(t):null,o=n.x+n.width/2-e.width/2,s=n.y+n.height/2-e.height/2;let a;switch(i){case Hs:a={x:o,y:n.y-e.height};break;case La:a={x:o,y:n.y+n.height};break;case ka:a={x:n.x+n.width,y:s};break;case zs:a={x:n.x-e.width,y:s};break;default:a={x:n.x,y:n.y}}const l=i?TA(i):null;if(l!=null){const c=l==="y"?"height":"width";switch(r){case ym:a[l]=Math.floor(a[l])-Math.floor(n[c]/2-e[c]/2);break;case DA:a[l]=Math.floor(a[l])+Math.ceil(n[c]/2-e[c]/2);break}}return a}function tq(){return{top:0,right:0,bottom:0,left:0}}function nq(n){return Object.assign(Object.assign({},tq()),n)}function iq(n,e){return e.reduce((t,i)=>(t[i]=n,t),{})}function nv(n,e={}){const{placement:t=n.placement,boundary:i=sVe,rootBoundary:r=YU,elementContext:o=ev,altBoundary:s=!1,padding:a=0}=e,l=nq(typeof a!="number"?a:iq(a,J_)),c=o===ev?aVe:ev,u=n.elements.reference,d=n.rects.popper,h=n.elements[s?c:o],f=_Ve(Z_(h)?h:h.contextElement||Ic(n.elements.popper),i,r),g=Y_(u),m=eq({reference:g,element:d,strategy:"absolute",placement:t}),p=EA(Object.assign(Object.assign({},d),m)),v=o===ev?p:g,_={top:f.top-v.top+l.top,bottom:v.bottom-f.bottom+l.bottom,left:f.left-v.left+l.left,right:v.right-f.right+l.right},b=n.modifiersData.offset;if(o===ev&&b){const y=b[t];Object.keys(_).forEach(C=>{const k=[ka,La].indexOf(C)>=0?1:-1,L=[Hs,La].indexOf(C)>=0?"y":"x";_[C]+=y[L]*k})}return _}const rq={placement:"bottom",modifiers:[],strategy:"absolute"};function oq(...n){return!n.some(e=>!(e&&typeof e.getBoundingClientRect=="function"))}function vVe(n={}){const{defaultModifiers:e=[],defaultOptions:t=rq}=n;return function(r,o,s=t){let a={placement:"bottom",orderedModifiers:[],options:Object.assign(Object.assign({},rq),t),modifiersData:{},elements:{reference:r,popper:o},attributes:{},styles:{}},l=[],c=!1;const u={state:a,setOptions(f){h(),a.options=Object.assign(Object.assign(Object.assign({},t),a.options),f),a.scrollParents={reference:Z_(r)?X_(r):r.contextElement?X_(r.contextElement):[],popper:X_(o)};const g=uVe(hVe([...e,...a.options.modifiers]));return a.orderedModifiers=g.filter(m=>m.enabled),d(),u.update()},forceUpdate(){if(c)return;const{reference:f,popper:g}=a.elements;if(oq(f,g)){a.rects={reference:iVe(f,Q_(g),a.options.strategy==="fixed"),popper:LA(g)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach(m=>a.modifiersData[m.name]=Object.assign({},m.data));for(let m=0;m<a.orderedModifiers.length;m++){if(a.reset===!0){a.reset=!1,m=-1;continue}const{fn:p,options:v={},name:_}=a.orderedModifiers[m];typeof p=="function"&&(a=p({state:a,options:v,name:_,instance:u})||a)}}},update:dVe(()=>new Promise(f=>{u.forceUpdate(),f(a)})),destroy(){h(),c=!0}};if(!oq(r,o))return u;u.setOptions(s).then(f=>{!c&&s.onFirstUpdate&&s.onFirstUpdate(f)});function d(){a.orderedModifiers.forEach(({name:f,options:g={},effect:m})=>{if(typeof m=="function"){const p=m({state:a,name:f,instance:u,options:g}),v=()=>{};l.push(p||v)}})}function h(){l.forEach(f=>f()),l=[]}return u}}const AS={passive:!0};function bVe({state:n,instance:e,options:t}){const{scroll:i=!0,resize:r=!0}=t,o=ml(n.elements.popper),s=[...n.scrollParents.reference,...n.scrollParents.popper];return i&&s.forEach(a=>{a.addEventListener("scroll",e.update,AS)}),r&&o.addEventListener("resize",e.update,AS),()=>{i&&s.forEach(a=>{a.removeEventListener("scroll",e.update,AS)}),r&&o.removeEventListener("resize",e.update,AS)}}const yVe={name:"eventListeners",enabled:!0,phase:"write",fn:()=>{},effect:bVe,data:{}};function wVe({state:n,name:e}){n.modifiersData[e]=eq({reference:n.rects.reference,element:n.rects.popper,strategy:"absolute",placement:n.placement})}const CVe={name:"popperOffsets",enabled:!0,phase:"read",fn:wVe,data:{}},SVe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function xVe({x:n,y:e}){const i=window.devicePixelRatio||1;return{x:Math.round(n*i)/i||0,y:Math.round(e*i)/i||0}}function sq({popper:n,popperRect:e,placement:t,offsets:i,position:r,gpuAcceleration:o,adaptive:s}){let{x:a,y:l}=xVe(i);const c=i.hasOwnProperty("x"),u=i.hasOwnProperty("y");let d=zs,h=Hs;const f=window;if(s){let m=Q_(n);m===ml(n)&&(m=Ic(n)),t===Hs&&(h=La,l-=m.clientHeight-e.height,l*=o?1:-1),t===zs&&(d=ka,a-=m.clientWidth-e.width,a*=o?1:-1)}const g=Object.assign({position:r},s&&SVe);return o?Object.assign(Object.assign({},g),{[h]:u?"0":"",[d]:c?"0":"",transform:(f.devicePixelRatio||1)<2?`translate(${a}px, ${l}px)`:`translate3d(${a}px, ${l}px, 0)`}):Object.assign(Object.assign({},g),{[h]:u?`${l}px`:"",[d]:c?`${a}px`:"",transform:""})}function LVe({state:n,options:e}){const{gpuAcceleration:t=!0,adaptive:i=!0}=e,r={placement:_l(n.placement),popper:n.elements.popper,popperRect:n.rects.popper,gpuAcceleration:t};n.modifiersData.popperOffsets!=null&&(n.styles.popper=Object.assign(Object.assign({},n.styles.popper),sq(Object.assign(Object.assign({},r),{offsets:n.modifiersData.popperOffsets,position:n.options.strategy,adaptive:i})))),n.modifiersData.arrow!=null&&(n.styles.arrow=Object.assign(Object.assign({},n.styles.arrow),sq(Object.assign(Object.assign({},r),{offsets:n.modifiersData.arrow,position:"absolute",adaptive:!1})))),n.attributes.popper=Object.assign(Object.assign({},n.attributes.popper),{"data-popper-placement":n.placement})}const kVe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:LVe,data:{}};function DVe({state:n}){Object.keys(n.elements).forEach(e=>{const t=n.styles[e]||{},i=n.attributes[e]||{},r=n.elements[e];!pl(r)||!xa(r)||(Object.assign(r.style,t),Object.keys(i).forEach(o=>{const s=i[o];s===!1?r.removeAttribute(o):r.setAttribute(o,s===!0?"":s)}))})}function EVe({state:n}){const e={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(n.elements.popper.style,e.popper),n.elements.arrow&&Object.assign(n.elements.arrow.style,e.arrow),()=>{Object.keys(n.elements).forEach(t=>{const i=n.elements[t],r=n.attributes[t]||{},s=Object.keys(n.styles.hasOwnProperty(t)?n.styles[t]:e[t]).reduce((a,l)=>(a[l]="",a),{});!pl(i)||!xa(i)||(Object.assign(i.style,s),Object.keys(r).forEach(a=>{i.removeAttribute(a)}))})}}const TVe={name:"applyStyles",enabled:!0,phase:"write",fn:DVe,effect:EVe,requires:["computeStyles"]};function IVe(n,e,t){const i=_l(n),r=[zs,Hs].indexOf(i)>=0?-1:1;let[o,s]=typeof t=="function"?t(Object.assign(Object.assign({},e),{placement:n})):t;return o=o||0,s=(s||0)*r,[zs,ka].indexOf(i)>=0?{x:s,y:o}:{x:o,y:s}}function AVe({state:n,options:e,name:t}){const{offset:i=[0,0]}=e,r=XU.reduce((a,l)=>(a[l]=IVe(l,n.rects,i),a),{}),{x:o,y:s}=r[n.placement];n.modifiersData.popperOffsets!=null&&(n.modifiersData.popperOffsets.x+=o,n.modifiersData.popperOffsets.y+=s),n.modifiersData[t]=r}const OVe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:AVe},NVe={left:"right",right:"left",bottom:"top",top:"bottom"};function OS(n){return n.replace(/left|right|bottom|top/g,e=>NVe[e])}const MVe={start:"end",end:"start"};function aq(n){return n.replace(/start|end/g,e=>MVe[e])}function PVe(n,e={}){const{placement:t,boundary:i,rootBoundary:r,padding:o,flipVariations:s,allowedAutoPlacements:a=XU}=e,l=tv(t),c=l?s?ZU:ZU.filter(h=>tv(h)===l):J_;let u=c.filter(h=>a.indexOf(h)>=0);u.length===0&&(u=c);const d=u.reduce((h,f)=>(h[f]=nv(n,{placement:f,boundary:i,rootBoundary:r,padding:o})[_l(f)],h),{});return Object.keys(d).sort((h,f)=>d[h]-d[f])}function RVe(n){if(_l(n)===kA)return[];const e=OS(n);return[aq(n),e,aq(e)]}function FVe({state:n,options:e,name:t}){if(n.modifiersData[t]._skip)return;const{mainAxis:i=!0,altAxis:r=!0,fallbackPlacements:o,padding:s,boundary:a,rootBoundary:l,altBoundary:c,flipVariations:u=!0,allowedAutoPlacements:d}=e,h=n.options.placement,g=_l(h)===h,m=o||(g||!u?[OS(h)]:RVe(h)),p=[h,...m].reduce((k,L)=>k.concat(_l(L)===kA?PVe(n,{placement:L,boundary:a,rootBoundary:l,padding:s,flipVariations:u,allowedAutoPlacements:d}):L),[]),v=n.rects.reference,_=n.rects.popper,b=new Map;let y=!0,C=p[0];for(let k=0;k<p.length;k++){const L=p[k],D=_l(L),T=tv(L)===ym,O=[Hs,La].indexOf(D)>=0,N=O?"width":"height",I=nv(n,{placement:L,boundary:a,rootBoundary:l,altBoundary:c,padding:s});let M=O?T?ka:zs:T?La:Hs;v[N]>_[N]&&(M=OS(M));const B=OS(M),V=[];if(i&&V.push(I[D]<=0),r&&V.push(I[M]<=0,I[B]<=0),V.every(ee=>ee)){C=L,y=!1;break}b.set(L,V)}if(y){const k=u?3:1;for(let L=k;L>0;L--){const D=p.find(T=>{const O=b.get(T);if(O)return O.slice(0,L).every(N=>N)});if(D){C=D;break}}}n.placement!==C&&(n.modifiersData[t]._skip=!0,n.placement=C,n.reset=!0)}const BVe={name:"flip",enabled:!0,phase:"main",fn:FVe,requiresIfExists:["offset"],data:{_skip:!1}};function VVe(n){return n==="x"?"y":"x"}function NS(n,e,t){return Math.max(n,Math.min(e,t))}function WVe({state:n,options:e,name:t}){const{mainAxis:i=!0,altAxis:r=!1,boundary:o,rootBoundary:s,altBoundary:a,padding:l,tether:c=!0,tetherOffset:u=0}=e,d=nv(n,{boundary:o,rootBoundary:s,padding:l,altBoundary:a}),h=_l(n.placement),f=tv(n.placement),g=!f,m=TA(h),p=VVe(m),v=n.modifiersData.popperOffsets,_=n.rects.reference,b=n.rects.popper,y=typeof u=="function"?u(Object.assign(Object.assign({},n.rects),{placement:n.placement})):u,C={x:0,y:0};if(v){if(i){const k=m==="y"?Hs:zs,L=m==="y"?La:ka,D=m==="y"?"height":"width",T=v[m],O=v[m]+d[k],N=v[m]-d[L],I=c?-b[D]/2:0,M=f===ym?_[D]:b[D],B=f===ym?-b[D]:-_[D],V=n.elements.arrow,ee=c&&V?LA(V):{width:0,height:0},se=n.modifiersData["arrow#persistent"]?n.modifiersData["arrow#persistent"].padding:tq(),ae=se[k],re=se[L],J=NS(0,_[D],ee[D]),ue=g?_[D]/2-I-J-ae-y:M-J-ae-y,Z=g?-_[D]/2+I+J+re+y:B+J+re+y,X=n.elements.arrow&&Q_(n.elements.arrow),ce=X?m==="y"?X.clientTop||0:X.clientLeft||0:0,De=n.modifiersData.offset?n.modifiersData.offset[n.placement][m]:0,te=v[m]+ue-De-ce,xe=v[m]+Z-De,ge=NS(c?Math.min(O,te):O,T,c?Math.max(N,xe):N);v[m]=ge,C[m]=ge-T}if(r){const k=m==="x"?Hs:zs,L=m==="x"?La:ka,D=v[p],T=D+d[k],O=D-d[L],N=NS(T,D,O);v[p]=N,C[p]=N-D}n.modifiersData[t]=C}}const $Ve={name:"preventOverflow",enabled:!0,phase:"main",fn:WVe,requiresIfExists:["offset"]};function jVe({state:n,name:e}){const t=n.elements.arrow,i=n.modifiersData.popperOffsets,r=_l(n.placement),o=TA(r),a=[zs,ka].indexOf(r)>=0?"height":"width";if(!t||!i)return;const l=n.modifiersData[`${e}#persistent`].padding,c=LA(t),u=o==="y"?Hs:zs,d=o==="y"?La:ka,h=n.rects.reference[a]+n.rects.reference[o]-i[o]-n.rects.popper[a],f=i[o]-n.rects.reference[o],g=Q_(t),m=g?o==="y"?g.clientHeight||0:g.clientWidth||0:0,p=h/2-f/2,v=l[u],_=m-c[a]-l[d],b=m/2-c[a]/2+p,y=NS(v,b,_),C=o;n.modifiersData[e]={[C]:y,centerOffset:y-b}}function HVe({state:n,options:e,name:t}){let{element:i="[data-popper-arrow]",padding:r=0}=e;i!=null&&(typeof i=="string"&&(i=n.elements.popper.querySelector(i),!i)||QU(n.elements.popper,i)&&(n.elements.arrow=i,n.modifiersData[`${t}#persistent`]={padding:nq(typeof r!="number"?r:iq(r,J_))}))}const zVe={name:"arrow",enabled:!0,phase:"main",fn:jVe,effect:HVe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function lq(n,e,t={x:0,y:0}){return{top:n.top-e.height-t.y,right:n.right-e.width+t.x,bottom:n.bottom-e.height+t.y,left:n.left-e.width-t.x}}function cq(n){return[Hs,ka,La,zs].some(e=>n[e]>=0)}function UVe({state:n,name:e}){const t=n.rects.reference,i=n.rects.popper,r=n.modifiersData.preventOverflow,o=nv(n,{elementContext:"reference"}),s=nv(n,{altBoundary:!0}),a=lq(o,t),l=lq(s,i,r),c=cq(a),u=cq(l);n.modifiersData[e]={referenceClippingOffsets:a,popperEscapeOffsets:l,isReferenceHidden:c,hasPopperEscaped:u},n.attributes.popper=Object.assign(Object.assign({},n.attributes.popper),{"data-popper-reference-hidden":c,"data-popper-escaped":u})}const qVe=vVe({defaultModifiers:[yVe,CVe,kVe,TVe,OVe,BVe,$Ve,zVe,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:UVe}]}),IA=bm?ie.useLayoutEffect:ie.useEffect,KVe=(n,e)=>JSON.stringify(n)===JSON.stringify(e),uq=n=>n.reduce((e,[t,i])=>(e[t]=i,e),{}),GVe=[],YVe=(n,e,t={})=>{const i=ie.useRef(null),r={onFirstUpdate:t.onFirstUpdate,placement:t.placement||"bottom",strategy:t.strategy||"absolute",modifiers:t.modifiers||GVe},[o,s]=ie.useState({styles:{popper:{position:r.strategy,left:"0",top:"0"}},attributes:{}}),a=ie.useMemo(()=>({name:"updateState",enabled:!0,phase:"write",fn:({state:u})=>{const d=Object.keys(u.elements);s({styles:uq(d.map(h=>[h,u.styles[h]||{}])),attributes:uq(d.map(h=>[h,u.attributes[h]]))})},requires:["computeStyles"]}),[]),l=ie.useMemo(()=>{const u={onFirstUpdate:r.onFirstUpdate,placement:r.placement,strategy:r.strategy,modifiers:[...r.modifiers,a,{name:"applyStyles",enabled:!1}]};return KVe(i.current,u)?i.current||u:(i.current=u,u)},[r.onFirstUpdate,r.placement,r.strategy,r.modifiers,a]),c=ie.useRef();return IA(()=>{c&&c.current&&c.current.setOptions(l)},[l]),IA(()=>{if(n==null||e==null)return;const d=(t.createPopper||qVe)(n,e,l);return c.current=d,()=>{d.destroy(),c.current=null}},[n,e,t.createPopper]),{state:c.current?c.current.state:null,styles:o.styles,attributes:o.attributes,update:c.current?c.current.update:null,forceUpdate:c.current?c.current.forceUpdate:null}};class AA extends ie.Component{componentDidMount(){const e=T7.findDOMNode(this);this.props.onFoundRef(e)}render(){return this.props.children||null}}AA.displayName="FindRefWrapper";const f_t="",ZVe={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"},XVe=n=>n.replace(/left|right|bottom|top|top-start|top-end|bottom-start|bottom-end|right-start|right-end|left-start|left-end/g,e=>ZVe[e]),dq=({trigger:n,popper:e,popperMatchesTriggerWidth:t=!0,direction:i="down",position:r="left",placement:o,appendTo:s=()=>document.body,zIndex:a=9999,isVisible:l=!0,positionModifiers:c,distance:u=0,onMouseEnter:d,onMouseLeave:h,onFocus:f,onBlur:g,onDocumentClick:m,onTriggerClick:p,onTriggerEnter:v,onPopperClick:_,onPopperMouseEnter:b,onPopperMouseLeave:y,onDocumentKeyDown:C,enableFlip:k=!0,flipBehavior:L="flip",reference:D,removeFindDomNode:T=!1,popperRef:O})=>{const[N,I]=ie.useState(null),[M,B]=ie.useState(null),[V,ee]=ie.useState(null),[se,ae]=ie.useState(!1),re=M||N,J=ie.useCallback(H=>m(H,re,V),[l,N,M,V,m]);ie.useEffect(()=>{ae(!0)},[]),ie.useEffect(()=>{D&&(D.current?B(D.current):typeof D=="function"&&B(D()))},[D]),ie.useEffect(()=>{O&&(O.current?ee(O.current):typeof O=="function"&&ee(O()))},[l,O]);const ue=(H,le,be,je=!1)=>{H&&le&&le.addEventListener(be,H,{capture:je})},Z=(H,le,be,je=!1)=>{H&&le&&le.removeEventListener(be,H,{capture:je})};ie.useEffect(()=>{ue(d,re,"mouseenter"),ue(h,re,"mouseleave"),ue(f,re,"focus"),ue(g,re,"blur"),ue(p,re,"click"),ue(v,re,"keydown"),ue(_,V,"click"),ue(b,V,"mouseenter"),ue(y,V,"mouseleave"),m&&ue(J,document,"click",!0),ue(C,document,"keydown",!0);const H=new MutationObserver(()=>{we&&we()});return V&&H.observe(V,{attributes:!0,childList:!0,subtree:!0}),()=>{Z(d,re,"mouseenter"),Z(h,re,"mouseleave"),Z(f,re,"focus"),Z(g,re,"blur"),Z(p,re,"click"),Z(v,re,"keydown"),Z(_,V,"click"),Z(b,V,"mouseenter"),Z(y,V,"mouseleave"),m&&Z(J,document,"click",!0),Z(C,document,"keydown",!0),H.disconnect()}},[N,V,d,h,f,g,p,v,_,b,y,m,C,M]);const X=()=>{if(o)return o;let H=i==="up"?"top":"bottom";return r!=="center"&&(H=`${H}-${r==="right"?"end":"start"}`),H},ce=ie.useMemo(X,[i,r,o]),De=ie.useMemo(()=>XVe(X()),[i,r,o]),te=ie.useMemo(()=>({name:"sameWidth",enabled:t,phase:"beforeWrite",requires:["computeStyles"],fn:({state:H})=>{H.styles.popper.width=`${H.rects.reference.width}px`},effect:({state:H})=>(H.elements.popper.style.width=`${H.elements.reference.offsetWidth}px`,()=>{})}),[t]),{styles:xe,attributes:ge,update:we,forceUpdate:Se}=YVe(re,V,{placement:ce,modifiers:[{name:"offset",options:{offset:[0,u]}},{name:"preventOverflow",enabled:!1},{name:"hide",enabled:!0},{name:"flip",enabled:ce.startsWith("auto")||k,options:{fallbackPlacements:L==="flip"?[De]:L}},te]});ie.useEffect(()=>{Se&&Se()},[e]);const pe=()=>{if(ge&&ge.popper&&ge.popper["data-popper-placement"]){const H=ge.popper["data-popper-placement"];return c[H]}return c.top},Q=Object.assign({className:Pn(e.props&&e.props.className,c&&pe()),style:Object.assign(Object.assign(Object.assign({},e.props&&e.props.style||{}),xe.popper),{zIndex:a})},ge.popper),Xe=ie.cloneElement(e,Q),et=()=>typeof s=="function"?s():s;let Ve;return T?Ve=ie.createElement("div",{style:{display:"contents"},ref:H=>ee(H==null?void 0:H.firstElementChild)},Xe):O?Ve=Xe:Ve=ie.createElement(AA,{onFoundRef:H=>ee(H)},Xe),ie.createElement(ie.Fragment,null,!D&&n&&ie.isValidElement(n)&&!T&&ie.createElement(AA,{onFoundRef:H=>I(H)},n),!D&&n&&ie.isValidElement(n)&&T&&ie.createElement("div",{style:{display:"contents"},ref:H=>I(H==null?void 0:H.firstElementChild)},n),se&&l&&T7.createPortal(Ve,et()))};dq.displayName="Popper";const QVe=(n,e,t=c=>document.activeElement.contains(c),i=c=>c,r=["A","BUTTON","INPUT"],o=!1,s=!1,a=!0,l=!0)=>{const c=document.activeElement,u=n.key;let d=null;if(!o&&["ArrowUp","ArrowDown"].includes(u)){n.preventDefault(),n.stopImmediatePropagation();let h=-1;e.forEach((f,g)=>{if(t(f)){let m=0;for(;!d&&m<e.length&&m*-1<e.length;)u==="ArrowUp"?m--:m++,h=g+m,h>=e.length&&(h=0),h<0&&(h=e.length-1),d=i(e[h])}})}if(!s&&["ArrowLeft","ArrowRight"].includes(u)){n.preventDefault(),n.stopImmediatePropagation();let h=-1;e.forEach((f,g)=>{if(t(f)){const m=e[g].querySelectorAll(r.join(","));if(!m.length||l){let p=c;for(;p;)if(p=u==="ArrowLeft"?p.previousElementSibling:p.nextElementSibling,p&&r.includes(p.tagName)){d=p;break}}else m.forEach((p,v)=>{n.target===p&&(h=v+(u==="ArrowLeft"?-1:1),h>=m.length&&(h=0),h<0&&(h=m.length-1),d=m[h])})}})}d&&(a&&(c.tabIndex=-1,d.tabIndex=0),d.focus())};class OA extends ie.Component{constructor(){super(...arguments),this.keyHandler=e=>{const{isEventFromContainer:t}=this.props;if(t?!t(e):!this._isEventFromContainer(e))return;const{isActiveElement:i,getFocusableElement:r,noVerticalArrowHandling:o,noHorizontalArrowHandling:s,noEnterHandling:a,noSpaceHandling:l,updateTabIndex:c,validSiblingTags:u,additionalKeyHandler:d,createNavigableElements:h,onlyTraverseSiblings:f}=this.props;d&&d(e);const g=h();if(!g){console.warn("No navigable elements have been passed to the KeyboardHandler. Keyboard navigation provided by this component will be ignored.");return}const m=e.key;a||m==="Enter"&&(e.preventDefault(),e.stopImmediatePropagation(),document.activeElement.click()),l||m===" "&&(e.preventDefault(),e.stopImmediatePropagation(),document.activeElement.click()),QVe(e,g,i,r,u,o,s,c,f)},this._isEventFromContainer=e=>{const{containerRef:t}=this.props;return t.current&&t.current.contains(e.target)}}componentDidMount(){bm&&window.addEventListener("keydown",this.keyHandler)}componentWillUnmount(){bm&&window.removeEventListener("keydown",this.keyHandler)}render(){return null}}OA.displayName="KeyboardHandler",OA.defaultProps={containerRef:null,createNavigableElements:()=>null,isActiveElement:n=>document.activeElement===n,getFocusableElement:n=>n,validSiblingTags:["BUTTON","A"],onlyTraverseSiblings:!0,updateTabIndex:!0,noHorizontalArrowHandling:!1,noVerticalArrowHandling:!1,noEnterHandling:!1,noSpaceHandling:!1};const Wh=ie.createContext({menuId:null,parentMenu:null,onActionClick:()=>null,onSelect:()=>null,activeItemId:null,selected:null,drilledInMenus:[],drilldownItemPath:[],onDrillIn:null,onDrillOut:null,onGetMenuHeight:()=>null,flyoutRef:null,setFlyoutRef:()=>null,disableHover:!1,role:"menu"}),hq=ie.createContext({itemId:null,isDisabled:!1});class MS extends ie.Component{constructor(e){super(e),this.menuRef=ie.createRef(),this.activeMenu=null,this.state={ouiaStateId:wA(PS.displayName),searchInputValue:"",transitionMoveTarget:null,flyoutRef:null,disableHover:!1,currentDrilldownMenuId:this.props.id},this.handleDrilldownTransition=t=>{const i=this.menuRef.current;if(!(!i||i!==t.target.closest(".pf-c-menu")&&!Array.from(i.getElementsByClassName("pf-c-menu")).includes(t.target.closest(".pf-c-menu"))))if(this.state.transitionMoveTarget)this.state.transitionMoveTarget.focus(),this.setState({transitionMoveTarget:null});else{const r=i.querySelector("#"+this.props.activeMenu)||i||null,o=Array.from(r.getElementsByTagName("UL")[0].children);if(!this.state.currentDrilldownMenuId||r.id!==this.state.currentDrilldownMenuId)this.setState({currentDrilldownMenuId:r.id});else return;const s=o.filter(a=>!(a.classList.contains("pf-m-disabled")||a.classList.contains("pf-c-divider")))[0].firstChild;s.focus(),s.tabIndex=0}},this.handleExtraKeys=t=>{const i=this.props.containsDrilldown,r=document.activeElement;if(t.target.closest(".pf-c-menu")!==this.activeMenu&&!t.target.classList.contains("pf-c-breadcrumb__link")&&(this.activeMenu=t.target.closest(".pf-c-menu"),this.setState({disableHover:!0})),t.target.tagName==="INPUT")return;const o=this.activeMenu,s=t.key,a=r.classList.contains("pf-c-breadcrumb__link")||r.classList.contains("pf-c-dropdown__toggle");if(s===" "||s==="Enter"){if(t.preventDefault(),i&&!a){if(r.closest("li").classList.contains("pf-m-current-path")&&o.parentElement.tagName==="LI")r.tabIndex=-1,o.parentElement.firstChild.tabIndex=0,this.setState({transitionMoveTarget:o.parentElement.firstChild});else if(r.nextElementSibling&&r.nextElementSibling.classList.contains("pf-c-menu")){const c=Array.from(r.nextElementSibling.getElementsByTagName("UL")[0].children).filter(u=>!(u.classList.contains("pf-m-disabled")||u.classList.contains("pf-c-divider")));r.tabIndex=-1,c[0].firstChild.tabIndex=0,this.setState({transitionMoveTarget:c[0].firstChild})}}document.activeElement.click()}},this.createNavigableElements=()=>this.props.containsDrilldown?this.activeMenu?Array.from(this.activeMenu.getElementsByTagName("UL")[0].children).filter(i=>!(i.classList.contains("pf-m-disabled")||i.classList.contains("pf-c-divider"))):[]:this.menuRef.current?Array.from(this.menuRef.current.getElementsByTagName("LI")).filter(i=>!(i.classList.contains("pf-m-disabled")||i.classList.contains("pf-c-divider"))):[],e.innerRef&&(this.menuRef=e.innerRef)}allowTabFirstItem(){const e=this.menuRef.current;if(e){const t=e.querySelector("ul button:not(:disabled), ul a:not(:disabled)");t&&(t.tabIndex=0)}}componentDidMount(){this.context&&this.setState({disableHover:this.context.disableHover}),bm&&window.addEventListener("transitionend",this.props.isRootMenu?this.handleDrilldownTransition:null),this.allowTabFirstItem()}componentWillUnmount(){bm&&window.removeEventListener("transitionend",this.handleDrilldownTransition)}componentDidUpdate(e){e.children!==this.props.children&&this.allowTabFirstItem()}render(){const e=this.props,{"aria-label":t,id:i,children:r,className:o,onSelect:s,selected:a=null,onActionClick:l,ouiaId:c,ouiaSafe:u,containsFlyout:d,isNavFlyout:h,containsDrilldown:f,isMenuDrilledIn:g,isPlain:m,isScrollable:p,drilldownItemPath:v,drilledInMenus:_,onDrillIn:b,onDrillOut:y,onGetMenuHeight:C,parentMenu:k=null,activeItemId:L=null,innerRef:D,isRootMenu:T,activeMenu:O,role:N}=e,I=hn(e,["aria-label","id","children","className","onSelect","selected","onActionClick","ouiaId","ouiaSafe","containsFlyout","isNavFlyout","containsDrilldown","isMenuDrilledIn","isPlain","isScrollable","drilldownItemPath","drilledInMenus","onDrillIn","onDrillOut","onGetMenuHeight","parentMenu","activeItemId","innerRef","isRootMenu","activeMenu","role"]),M=g||_&&_.includes(i)||!1;return ie.createElement(Wh.Provider,{value:{menuId:i,parentMenu:k||i,onSelect:s,onActionClick:l,activeItemId:L,selected:a,drilledInMenus:_,drilldownItemPath:v,onDrillIn:b,onDrillOut:y,onGetMenuHeight:C,flyoutRef:this.state.flyoutRef,setFlyoutRef:B=>this.setState({flyoutRef:B}),disableHover:this.state.disableHover,role:N}},T&&ie.createElement(OA,{containerRef:this.menuRef||null,additionalKeyHandler:this.handleExtraKeys,createNavigableElements:this.createNavigableElements,isActiveElement:B=>document.activeElement.closest("li")===B||document.activeElement.parentElement===B||document.activeElement.closest(".pf-c-menu__search")===B||document.activeElement.closest("ol")&&document.activeElement.closest("ol").firstChild===B,getFocusableElement:B=>B.tagName==="DIV"&&B.querySelector("input")||B.firstChild.tagName==="LABEL"&&B.querySelector("input")||B.firstChild,noHorizontalArrowHandling:document.activeElement&&(document.activeElement.classList.contains("pf-c-breadcrumb__link")||document.activeElement.classList.contains("pf-c-dropdown__toggle")),noEnterHandling:!0,noSpaceHandling:!0}),ie.createElement("div",Object.assign({id:i,className:Pn(rn.menu,m&&rn.modifiers.plain,p&&rn.modifiers.scrollable,d&&rn.modifiers.flyout,h&&rn.modifiers.nav,f&&rn.modifiers.drilldown,M&&rn.modifiers.drilledIn,o),"aria-label":t,ref:this.menuRef},yA(PS.displayName,c!==void 0?c:this.state.ouiaStateId,u),I),r))}}MS.displayName="Menu",MS.contextType=Wh,MS.defaultProps={ouiaSafe:!0,isRootMenu:!0,isPlain:!1,isScrollable:!1,role:"menu"};const PS=ie.forwardRef((n,e)=>ie.createElement(MS,Object.assign({},n,{innerRef:e})));PS.displayName="Menu";const fq=ie.forwardRef((n,e)=>{const{getHeight:t,children:i,menuHeight:r,maxMenuHeight:o}=n,s=hn(n,["getHeight","children","menuHeight","maxMenuHeight"]),a=ie.createRef(),l=(c,u,d)=>{if(c){let h=c.clientHeight,f=null,g=c.closest(`.${rn.menuList}`);for(;g!==null&&g.nodeType===1;)g.classList.contains(rn.menuList)&&(f=g),g=g.parentElement;if(f){const m=getComputedStyle(f),p=parseFloat(m.getPropertyValue("padding-top").replace(/px/g,""))+parseFloat(m.getPropertyValue("padding-bottom").replace(/px/g,""))+parseFloat(getComputedStyle(f.parentElement).getPropertyValue("border-bottom-width").replace(/px/g,""));h=h+p}d&&d(u,h),t&&t(h.toString())}return e||a};return ie.createElement(Wh.Consumer,null,({menuId:c,onGetMenuHeight:u})=>ie.createElement("div",Object.assign({},s,{className:Pn(rn.menuContent,n.className),ref:d=>l(d,c,u),style:Object.assign(Object.assign({},r&&{"--pf-c-menu__content--Height":r}),o&&{"--pf-c-menu__content--MaxHeight":o})}),i))});fq.displayName="MenuContent";const JVe={name:"--pf-c-menu--m-flyout__menu--top-offset",value:"0px",var:"var(--pf-c-menu--m-flyout__menu--top-offset)"},eWe={name:"--pf-c-menu--m-flyout__menu--m-left--right-offset",value:"0px",var:"var(--pf-c-menu--m-flyout__menu--m-left--right-offset)"},tWe={name:"--pf-c-menu--m-flyout__menu--left-offset",value:"0px",var:"var(--pf-c-menu--m-flyout__menu--left-offset)"};var $h;(function(n){n.sm="sm",n.md="md",n.lg="lg",n.xl="xl"})($h||($h={}));const nWe=n=>{switch(n){case $h.sm:return"1em";case $h.md:return"1.5em";case $h.lg:return"2em";case $h.xl:return"3em";default:return"1em"}};let iWe=0;function iv({name:n,xOffset:e=0,yOffset:t=0,width:i,height:r,svgPath:o}){var s;return s=class extends ie.Component{constructor(){super(...arguments),this.id=`icon-title-${iWe++}`}render(){const l=this.props,{size:c,color:u,title:d,noVerticalAlign:h}=l,f=hn(l,["size","color","title","noVerticalAlign"]),g=!!d,m=nWe(c),p=-.125*Number.parseFloat(m),v=h?null:{verticalAlign:`${p}em`},_=[e,t,i,r].join(" ");return ie.createElement("svg",Object.assign({style:v,fill:u,height:m,width:m,viewBox:_,"aria-labelledby":g?this.id:null,"aria-hidden":g?null:!0,role:"img"},f),g&&ie.createElement("title",{id:this.id},d),ie.createElement("path",{d:o}))}},s.displayName=n,s.defaultProps={color:"currentColor",size:$h.sm,noVerticalAlign:!1},s}const rWe=iv({name:"ExternalLinkAltIcon",height:512,width:512,svgPath:"M432,320H400a16,16,0,0,0-16,16V448H64V128H208a16,16,0,0,0,16-16V80a16,16,0,0,0-16-16H48A48,48,0,0,0,0,112V464a48,48,0,0,0,48,48H400a48,48,0,0,0,48-48V336A16,16,0,0,0,432,320ZM488,0h-128c-21.37,0-32.05,25.91-17,41l35.73,35.73L135,320.37a24,24,0,0,0,0,34L157.67,377a24,24,0,0,0,34,0L435.28,133.32,471,169c15,15,41,4.5,41-17V24A24,24,0,0,0,488,0Z",yOffset:0,xOffset:0}),oWe=iv({name:"AngleRightIcon",height:512,width:256,svgPath:"M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z",yOffset:0,xOffset:0}),sWe=iv({name:"AngleLeftIcon",height:512,width:256,svgPath:"M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z",yOffset:0,xOffset:0}),aWe=iv({name:"CheckIcon",height:512,width:512,svgPath:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z",yOffset:0,xOffset:0}),L_t="",qu={check:"pf-c-check",checkBody:"pf-c-check__body",checkDescription:"pf-c-check__description",checkInput:"pf-c-check__input",checkLabel:"pf-c-check__label",checkLabelRequired:"pf-c-check__label-required",modifiers:{standalone:"pf-m-standalone",disabled:"pf-m-disabled"}},gq=()=>{};class wm extends ie.Component{constructor(e){super(e),this.handleChange=t=>{this.props.onChange(t.currentTarget.checked,t)},this.state={ouiaStateId:wA(wm.displayName)}}render(){const e=this.props,{"aria-label":t,className:i,onChange:r,isValid:o,isDisabled:s,isRequired:a,isChecked:l,label:c,checked:u,defaultChecked:d,description:h,body:f,ouiaId:g,ouiaSafe:m,component:p}=e,v=hn(e,["aria-label","className","onChange","isValid","isDisabled","isRequired","isChecked","label","checked","defaultChecked","description","body","ouiaId","ouiaSafe","component"]);v.id||console.error("Checkbox:","id is required to make input accessible");const _={};return([!0,!1].includes(u)||l===!0)&&(_.checked=u||l),r!==gq&&(_.checked=l),[!1,!0].includes(d)&&(_.defaultChecked=d),_.checked=_.checked===null?!1:_.checked,ie.createElement(p,{className:Pn(qu.check,!c&&qu.modifiers.standalone,i)},ie.createElement("input",Object.assign({},v,{className:Pn(qu.checkInput),type:"checkbox",onChange:this.handleChange,"aria-invalid":!o,"aria-label":t,disabled:s,required:a,ref:b=>b&&(b.indeterminate=l===null)},_,yA(wm.displayName,g!==void 0?g:this.state.ouiaStateId,m))),c&&ie.createElement("label",{className:Pn(qu.checkLabel,s&&qu.modifiers.disabled),htmlFor:v.id},c,a&&ie.createElement("span",{className:Pn(qu.checkLabelRequired),"aria-hidden":"true"},JBe)),h&&ie.createElement("span",{className:Pn(qu.checkDescription)},h),f&&ie.createElement("span",{className:Pn(qu.checkBody)},f))}}wm.displayName="Checkbox",wm.defaultProps={className:"",isValid:!0,isDisabled:!1,isRequired:!1,isChecked:!1,onChange:gq,ouiaSafe:!0,component:"div"};const lWe=iv({name:"StarIcon",height:512,width:576,svgPath:"M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z",yOffset:0,xOffset:0}),cWe=n=>{var{className:e="",icon:t,onClick:i,"aria-label":r,isFavorited:o=null,isDisabled:s,actionId:a,innerRef:l}=n,c=hn(n,["className","icon","onClick","aria-label","isFavorited","isDisabled","actionId","innerRef"]);return ie.createElement(Wh.Consumer,null,({onActionClick:u})=>ie.createElement(hq.Consumer,null,({itemId:d,isDisabled:h})=>{const f=g=>{i&&i(g),u&&u(g,d,a)};return ie.createElement("button",Object.assign({className:Pn(rn.menuItemAction,o!==null&&rn.modifiers.favorite,o&&rn.modifiers.favorited,e),"aria-label":r,onClick:f},(s===!0||h===!0)&&{disabled:!0},{ref:l,tabIndex:-1},c),ie.createElement("span",{className:Pn(rn.menuItemActionIcon)},t==="favorites"||o!==null?ie.createElement(lWe,{"aria-hidden":!0}):t))}))},mq=ie.forwardRef((n,e)=>ie.createElement(cWe,Object.assign({},n,{innerRef:e})));mq.displayName="MenuItemAction";const pq=ie.createContext({direction:"right"}),uWe=n=>{var{children:e,className:t,itemId:i=null,to:r,hasCheck:o=!1,isActive:s=null,isFavorited:a=null,isLoadButton:l=!1,isLoading:c=!1,flyoutMenu:u,direction:d,description:h=null,onClick:f=()=>{},component:g="button",isDisabled:m=!1,isExternalLink:p=!1,isSelected:v=null,isFocused:_,isDanger:b=!1,icon:y,actions:C,onShowFlyout:k,drilldownMenu:L,isOnPath:D,innerRef:T}=n,O=hn(n,["children","className","itemId","to","hasCheck","isActive","isFavorited","isLoadButton","isLoading","flyoutMenu","direction","description","onClick","component","isDisabled","isExternalLink","isSelected","isFocused","isDanger","icon","actions","onShowFlyout","drilldownMenu","isOnPath","innerRef"]);const{menuId:N,parentMenu:I,onSelect:M,onActionClick:B,activeItemId:V,selected:ee,drilldownItemPath:se,onDrillIn:ae,onDrillOut:re,flyoutRef:J,setFlyoutRef:ue,disableHover:Z,role:X}=ie.useContext(Wh);let ce=r?"a":g;o&&!r&&(ce="label");const[De,te]=ie.useState(null),xe=ie.useContext(pq),[ge,we]=ie.useState(xe.direction),Se=ie.useRef(),pe=Se===J,Q=u!==void 0,Xe=R=>{!pe&&R?ue(Se):pe&&!R&&ue(null),k&&R&&k()};IA(()=>{if(Q&&Se.current&&bm){const R=Se.current.lastElementChild;if(R&&R.classList.contains(rn.menu)){const F=Se.current.getClientRects()[0],z=R.getClientRects()[0];if(F&&z){const U=F.x-z.width,fe=window.innerWidth-F.x-F.width-z.width;let ke=ge;fe<0&&ke!=="left"?(we("left"),ke="left"):U<0&&ke!=="right"&&(we("right"),ke="right");let Ae=0;U<0&&fe<0&&(Ae=ke==="right"?-fe:-U),ke==="left"?(R.classList.add(rn.modifiers.left),R.style.setProperty(eWe.name,`-${Ae}px`)):R.style.setProperty(tWe.name,`-${Ae}px`);const Fe=window.innerHeight-F.y-z.height;window.innerHeight-z.height<0&&Fe<0||Fe<0&&R.style.setProperty(JVe.name,`${Fe}px`)}}}},[pe,u]),ie.useEffect(()=>{we(xe.direction)},[xe]),ie.useEffect(()=>{if(De)if(pe){const R=De.nextElementSibling;Array.from(R.getElementsByTagName("UL")[0].children).filter(z=>!(z.classList.contains("pf-m-disabled")||z.classList.contains("pf-c-divider")))[0].firstChild.focus()}else De.focus()},[pe,De]);const et=R=>{const F=R.key,z=R.target,U=R.type;(F===" "||F==="Enter"||F==="ArrowRight"||U==="click")&&(R.stopPropagation(),R.preventDefault(),pe||(Xe(!0),te(z))),(F==="Escape"||F==="ArrowLeft")&&pe&&(R.stopPropagation(),Xe(!1))},Ve=(R,F)=>{F&&F(R,i),f&&f(R)},H=D&&D||se&&se.includes(i)||!1;let le;d&&(d==="down"?le=R=>ae&&ae(R,N,typeof L=="function"?L().props.id:L.props.id,i):le=R=>re&&re(R,I,i));let be={};ce==="a"?be={href:r,"aria-disabled":m?!0:null,disabled:null}:ce==="button"&&(be={type:"button"}),D?be["aria-expanded"]=!0:Q&&(be["aria-haspopup"]="menu",be["aria-expanded"]=pe);const je=()=>s!==null?s?"page":null:i!==null&&V!==null?i===V:null,Y=()=>v!==null?v:ee!==null&&i!==null?Array.isArray(ee)&&ee.includes(i)||i===ee:!1,j=()=>{Z||(Q?Xe(!0):ue(null))},q=X==="listbox";return ie.createElement("li",Object.assign({className:Pn(rn.menuListItem,m&&rn.modifiers.disabled,H&&rn.modifiers.currentPath,l&&rn.modifiers.load,c&&rn.modifiers.loading,_&&rn.modifiers.focus,b&&rn.modifiers.danger,t),onMouseOver:j},u&&{onKeyDown:et},{ref:Se,role:o?"menuitem":"none"},O),ie.createElement(vA,null,R=>ie.createElement(ce,Object.assign({tabIndex:-1,className:Pn(rn.menuItem,Y()&&!o&&rn.modifiers.selected,t),"aria-current":je()},!o&&{disabled:m},!o&&!u&&{role:q?"option":"menuitem"},!o&&!u&&q&&{"aria-selected":Y()},{ref:T},!o&&{onClick:F=>{Ve(F,M),le&&le(F),u&&et(F)}},o&&{htmlFor:R},be),ie.createElement("span",{className:Pn(rn.menuItemMain)},d==="up"&&ie.createElement("span",{className:Pn(rn.menuItemToggleIcon)},ie.createElement(sWe,{"aria-hidden":!0})),y&&ie.createElement("span",{className:Pn(rn.menuItemIcon)},y),o&&ie.createElement("span",{className:Pn("pf-c-menu__item-check")},ie.createElement(wm,{id:R,component:"span",isChecked:v||!1,onChange:F=>Ve(F,M),isDisabled:m})),ie.createElement("span",{className:Pn(rn.menuItemText)},e),p&&ie.createElement("span",{className:Pn(rn.menuItemExternalIcon)},ie.createElement(rWe,{"aria-hidden":!0})),(u||d==="down")&&ie.createElement("span",{className:Pn(rn.menuItemToggleIcon)},ie.createElement(oWe,{"aria-hidden":!0})),Y()&&ie.createElement("span",{className:Pn(rn.menuItemSelectIcon)},ie.createElement(aWe,{"aria-hidden":!0}))),h&&d!=="up"&&ie.createElement("span",{className:Pn(rn.menuItemDescription)},ie.createElement("span",null,h)))),pe&&ie.createElement(Wh.Provider,{value:{disableHover:Z}},ie.createElement(pq.Provider,{value:{direction:ge}},u)),typeof L=="function"?L():L,ie.createElement(hq.Provider,{value:{itemId:i,isDisabled:m}},C,a!==null&&ie.createElement(mq,{icon:"favorites",isFavorited:a,"aria-label":a?"starred":"not starred",onClick:R=>B(R,i),tabIndex:-1,actionId:"fav"})))},_q=ie.forwardRef((n,e)=>ie.createElement(uWe,Object.assign({},n,{innerRef:e})));_q.displayName="MenuItem";const vq=n=>{var{children:e=null,className:t,isAriaMultiselectable:i=!1}=n,r=hn(n,["children","className","isAriaMultiselectable"]);const{role:o}=ie.useContext(Wh);return ie.createElement("ul",Object.assign({role:o},o==="listbox"&&{"aria-multiselectable":i},{className:Pn(rn.menuList,t)},r),e)};vq.displayName="MenuList";const dWe=n=>{var{children:e,className:t,onSelect:i,isOpen:r,selected:o,toggle:s,onOpenChange:a,isPlain:l,minWidth:c,innerRef:u,zIndex:d=9999,role:h="listbox"}=n,f=hn(n,["children","className","onSelect","isOpen","selected","toggle","onOpenChange","isPlain","minWidth","innerRef","zIndex","role"]);const g=E.useRef(),m=E.useRef(),p=E.useRef(),v=u||g;E.useEffect(()=>{const b=C=>{var k,L,D;(r&&a&&(!((k=v.current)===null||k===void 0)&&k.contains(C.target))||!((L=m.current)===null||L===void 0)&&L.contains(C.target))&&(C.key==="Escape"||C.key==="Tab")&&(a(!1),(D=m.current)===null||D===void 0||D.focus())},y=C=>{var k,L,D;r&&(!((k=m.current)===null||k===void 0)&&k.contains(C.target))&&C.detail===0&&setTimeout(()=>{var T;const O=(T=v==null?void 0:v.current)===null||T===void 0?void 0:T.querySelector("li button:not(:disabled),li input:not(:disabled)");O&&O.focus()},0),r&&a&&!(!((L=m==null?void 0:m.current)===null||L===void 0)&&L.contains(C.target))&&r&&!(!((D=v.current)===null||D===void 0)&&D.contains(C.target))&&a(!1)};return window.addEventListener("keydown",b),window.addEventListener("click",y),()=>{window.removeEventListener("keydown",b),window.removeEventListener("click",y)}},[r,v,a]);const _=E.createElement(PS,Object.assign({role:h,className:Pn(t),ref:v,onSelect:(b,y)=>i(b,y),isPlain:l,selected:o},c&&{style:{"--pf-c-menu--MinWidth":c}},yA(rv.displayName,f.ouiaId!==void 0?f.ouiaId:wA(rv.displayName),f.ouiaSafe!==void 0?f.ouiaSafe:!0),f),E.createElement(fq,null,e));return E.createElement("div",{ref:p},E.createElement(dq,{trigger:s(m),removeFindDomNode:!0,popper:_,appendTo:p.current||void 0,isVisible:r,zIndex:d}))},rv=E.forwardRef((n,e)=>E.createElement(dWe,Object.assign({innerRef:e},n)));rv.displayName="Select";const NA=n=>{var{children:e,className:t,isAriaMultiselectable:i=!1}=n,r=hn(n,["children","className","isAriaMultiselectable"]);return E.createElement(vq,Object.assign({isAriaMultiselectable:i,className:Pn(t)},r),e)};NA.displayName="SelectList";const MA=n=>{var{children:e,className:t}=n,i=hn(n,["children","className"]);return E.createElement(_q,Object.assign({className:Pn(t)},i),e)};MA.displayName="SelectOption";const E_t="",T_t="";function Ku(n){const{t:e}=$r(),{id:t,icon:i,value:r,onSelect:o,options:s,placeholder:a}=n,[l,c]=E.useState(!1),u=E.useMemo(()=>s.find(v=>r===v.value),[s,r]),d=v=>x.jsxs(P.MenuToggle,{id:t,ref:v,onClick:()=>c(_=>!_),isExpanded:l,onKeyDown:_=>{switch(_.key){default:c(!0);break}},children:[i&&x.jsx("span",{style:{paddingLeft:4,paddingRight:12},children:i}),u?u.label:x.jsx("span",{className:"page-select-placeholder",children:a})]}),h=E.useCallback((v,_)=>{const b=s.find(y=>y.key!==void 0?y.key===_:y.label===_);b&&(o(b.value),c(!1))},[o,s]),[f,g]=E.useState(""),m=E.useRef(null);E.useEffect(()=>{g(""),l&&m.current&&m.current.focus()},[l]),E.useEffect(()=>{n.isRequired&&!u&&s.length>0&&o(s[0].value)},[o,s,n.isRequired,u]);const p=E.useMemo(()=>s.filter(v=>f===""?!0:v.label.toLowerCase().includes(f.toLowerCase())),[s,f]);return x.jsx("div",{className:"page-single-select",children:x.jsxs(rv,{selected:u==null?void 0:u.label,onSelect:h,isOpen:l,onOpenChange:c,toggle:d,style:{zIndex:l?9999:void 0},children:[x.jsx("div",{className:"page-select-header",children:x.jsx(P.SearchInput,{id:t?`${t}-search`:void 0,ref:m,value:f,onChange:(v,_)=>g(_),onClear:v=>{v.stopPropagation(),g("")}})}),p.length===0?x.jsx("div",{style:{margin:16},children:e("No results found")}):x.jsx(NA,{className:"page-select-list",children:p.map(v=>x.jsx(MA,{itemId:v.key!==void 0?v.key:v.label,description:v.description,children:v.label},v.key!==void 0?v.key:v.label))}),n.footer&&x.jsx("div",{className:"page-select-footer",children:n.footer})]})})}function hWe(n){const{t:e}=$r(),[t,i]=E.useState(!1),[r,o]=E.useState(),[s,a]=E.useState(0),[l,c]=E.useState(),[u,d]=E.useState(1),h=E.useRef(new AbortController).current;E.useEffect(()=>()=>h.abort(),[h]);const f=E.useRef(n.onSelect).current,g=E.useRef(n.queryOptions).current,m=E.useCallback(v=>{i(_=>{if(_)return _;o(void 0),c(b=>{if(b)return b});try{g(v,h.signal).then(b=>{h.signal.aborted||(c(y=>{let C;return y?C=[...y,...b.options]:C=b.options,b.total===1&&f(C[0].value),C}),a(b.total))}).catch(b=>{h.signal.aborted||(b instanceof Error?o(b):o(new Error(e("Unknown error"))))}).finally(()=>{h.signal.aborted||i(!1)})}catch(b){b instanceof Error?o(b):o(new Error(e("Unknown error"))),i(!1)}return!0})},[h.signal,f,g,e]);E.useEffect(()=>m(u),[u,m]);const p=x.jsxs(P.Stack,{hasGutter:!0,children:[t?x.jsxs(P.Flex,{alignItems:{default:"alignItemsCenter"},spaceItems:{default:"spaceItemsMd"},children:[x.jsx(P.FlexItem,{children:x.jsx(P.Spinner,{size:"md"})}),x.jsx(P.FlexItem,{children:e("Loading...")})]}):x.jsxs(P.Split,{hasGutter:!0,children:[x.jsx(P.SplitItem,{isFilled:!0,children:(l==null?void 0:l.length)!==s&&x.jsx(P.Button,{variant:"link",isInline:!0,onClick:v=>{v.preventDefault(),v.stopPropagation(),d(_=>_+1)},isSmall:!0,children:e("Load more")})}),x.jsx(P.SplitItem,{children:e("{{count}} of {{total}}",{count:(l==null?void 0:l.length)??0,total:s})})]}),n.footer]});return l?x.jsx(Ku,{id:n.id,icon:n.icon,placeholder:n.placeholder,options:l??[],value:n.value,onSelect:n.onSelect,footer:p}):r?x.jsx(P.Button,{id:n.id,variant:"secondary",isDanger:!0,icon:x.jsx(Ct.SyncAltIcon,{}),iconPosition:"right",onClick:v=>{d(_=>(_===1&&m(1),1))},children:typeof n.queryErrorText=="function"?n.queryErrorText(r):n.queryErrorText??e("Error loading options")}):x.jsx(P.Button,{id:n.id,variant:"control",isLoading:!0,children:n.queryPlaceholder??e("Loading options...")})}const I_t="";function bq(n){const{t:e}=$r(),{id:t,icon:i,placeholder:r,values:o,onSelect:s,options:a,variant:l,disableClearSelection:c}=n,[u,d]=E.useState(!1),h=E.useMemo(()=>a.filter(y=>o==null?!1:o.includes(y.value)),[a,o]),f=y=>x.jsxs(P.MenuToggle,{isFullWidth:!0,id:t,ref:y,onClick:()=>d(C=>!C),isExpanded:u,onKeyDown:C=>{switch(C.key){default:d(!0);break}},children:[i&&x.jsx("span",{style:{paddingLeft:4,paddingRight:12},children:i}),h.length>0?x.jsx(x.Fragment,{children:l==="count"?x.jsx(P.Chip,{isReadOnly:c,onClick:()=>s(()=>[]),style:{marginTop:-2,marginBottom:-2},children:h.length}):x.jsxs(x.Fragment,{children:[x.jsx(P.ChipGroup,{children:h.map(C=>x.jsx(P.Chip,{isReadOnly:!0,style:{marginTop:-2,marginBottom:-2},children:C.label},C.label))}),!c&&x.jsx(Ct.TimesIcon,{role:"button","aria-hidden":!0,onClick:()=>s(()=>[]),style:{verticalAlign:"middle",marginLeft:8},size:"sm"})]})}):x.jsx("span",{className:"page-select-placeholder",children:r})]}),g=E.useMemo(()=>h.map(y=>y.label),[h]),m=E.useCallback((y,C)=>{s(k=>{const L=a.find(D=>D.key!==void 0?D.key===C:D.label===C);return L&&((k==null?void 0:k.find(D=>D===L.value))!==void 0?k=k.filter(D=>D!==L.value):(k=k?[...k]:[],k.push(L.value))),k})},[s,a]),[p,v]=E.useState(""),_=E.useRef(null);E.useEffect(()=>{v(""),u&&_.current&&_.current.focus()},[u]);const b=E.useMemo(()=>a.filter(y=>p===""?!0:y.label.toLowerCase().includes(p.toLowerCase())),[a,p]);return x.jsx("div",{className:"page-multi-select",children:x.jsxs(rv,{selected:g,onSelect:m,isOpen:u,onOpenChange:d,toggle:f,style:{zIndex:u?9999:void 0},children:[x.jsx("div",{className:"page-select-header",children:x.jsx(P.SearchInput,{id:t?`${t}-search`:void 0,ref:_,value:p,onChange:(y,C)=>v(C),onClear:y=>{y.stopPropagation(),v("")}})}),b.length===0?x.jsx("div",{style:{margin:16},children:e("No results found")}):x.jsx(NA,{className:"page-select-list",children:b.map(y=>x.jsx(MA,{itemId:y.key!==void 0?y.key:y.label,description:y.description?x.jsx("div",{style:{maxWidth:300},children:y.description}):void 0,hasCheck:!0,isSelected:h.includes(y),children:y.label},y.key!==void 0?y.key:y.label))}),n.footer&&x.jsx("div",{className:"page-select-footer",children:n.footer})]})})}function fWe(n){const{t:e}=$r(),[t,i]=E.useState(!1),[r,o]=E.useState(),[s,a]=E.useState(0),[l,c]=E.useState(),[u,d]=E.useState(1),h=E.useRef(new AbortController).current;E.useEffect(()=>()=>h.abort(),[h]);const f=E.useRef(n.onSelect).current,g=E.useRef(n.queryOptions).current,m=E.useCallback(v=>{i(_=>{if(_)return _;o(void 0),c(b=>{if(b)return b});try{g(v,h.signal).then(b=>{h.signal.aborted||(c(y=>{let C;return y?C=[...y,...b.options]:C=b.options,b.total===1&&f(()=>C.map(k=>k.value)),C}),a(b.total))}).catch(b=>{h.signal.aborted||(b instanceof Error?o(b):o(new Error(e("Unknown error"))))}).finally(()=>{h.signal.aborted||i(!1)})}catch(b){b instanceof Error?o(b):o(new Error(e("Unknown error"))),i(!1)}return!0})},[h.signal,f,g,e]);E.useEffect(()=>m(u),[u,m]);const p=x.jsxs(P.Stack,{hasGutter:!0,children:[t?x.jsxs(P.Flex,{alignItems:{default:"alignItemsCenter"},spaceItems:{default:"spaceItemsMd"},children:[x.jsx(P.FlexItem,{children:x.jsx(P.Spinner,{size:"md"})}),x.jsx(P.FlexItem,{children:e("Loading...")})]}):x.jsxs(P.Split,{hasGutter:!0,children:[x.jsx(P.SplitItem,{isFilled:!0,children:(l==null?void 0:l.length)!==s&&x.jsx(P.Button,{variant:"link",isInline:!0,onClick:v=>{v.preventDefault(),v.stopPropagation(),d(_=>_+1)},isSmall:!0,children:e("Load more")})}),x.jsx(P.SplitItem,{children:e("{{count}} of {{total}}",{count:(l==null?void 0:l.length)??0,total:s})})]}),n.footer]});return l?x.jsx(bq,{id:n.id,icon:n.icon,placeholder:n.placeholder,options:l??[],values:n.values,onSelect:n.onSelect,variant:n.variant,footer:p}):r?x.jsx(P.Button,{id:n.id,variant:"secondary",isDanger:!0,icon:x.jsx(Ct.SyncAltIcon,{}),iconPosition:"right",onClick:v=>{d(_=>(_===1&&m(1),1))},children:typeof n.queryErrorText=="function"?n.queryErrorText(r):n.queryErrorText??e("Error loading options")}):x.jsx(P.Button,{id:n.id,variant:"control",isLoading:!0,children:n.queryPlaceholder??e("Loading options...")})}function gWe(n){const{filterValues:e,setFilterValues:t,placeholder:i,isRequired:r,defaultValue:o}=n,s=e&&e.length>0?e[0]:void 0,a=n.options.find(f=>f.value===s);r&&!a&&t(()=>[o??n.options[0].value]);function l(f){n.options.find(m=>m.value===f)&&t(()=>[f])}const[c,u]=E.useState(()=>{if(e&&e.length>1)return e[1]}),[d,h]=E.useState(()=>{if(e&&e.length>2)return e[2]});return E.useEffect(()=>{if(a&&a.isCustom){const f=[a.value];c&&(f.push(c),d&&f.push(d)),t(()=>f)}},[a,c,d,t]),x.jsxs(P.ToolbarItem,{children:[x.jsx(Ku,{value:(a==null?void 0:a.value)??"",onSelect:l,options:n.options,placeholder:i}),a&&a.isCustom&&x.jsx(mWe,{to:d,setTo:h,from:c,setFrom:u})]})}function mWe(n){const{to:e,setTo:t,from:i,setFrom:r}=n,{t:o}=$r(),s=(u,d)=>{r(d)},a=(u,d)=>{t(d)},l=i?new Date(i):void 0,c=u=>l?P.isValidDate(l)&&u>=l?"":o('The "to" date must be after the "from" date'):"";return x.jsxs(x.Fragment,{children:[x.jsx(P.DatePicker,{value:i,onChange:s,"aria-label":"Start date",placeholder:"YYYY-MM-DD"}),x.jsx("div",{style:{alignSelf:"baseline",padding:6},children:o("to")}),x.jsx(P.DatePicker,{value:e,onChange:a,isDisabled:!l||!P.isValidDate(l),rangeStart:l,validators:[c],"aria-label":"End date",placeholder:o("now"),invalidFormatText:o("Invalid date format")}),e!==void 0&&x.jsx(P.Button,{variant:"control",style:{alignSelf:"flex-start"},onClick:()=>t(void 0),children:x.jsx(Ct.TimesCircleIcon,{})})]})}function pWe(n){const{t:e}=$r(),[t,i]=E.useState("");let r=n.placeholder;if(!r)switch(n.comparison){case"contains":r=e("contains");break;case"startsWith":r=e("starts with");break;case"endsWith":r=e("ends with");break;case"equals":r=e("equals");break}return x.jsxs(P.InputGroup,{children:[x.jsxs(P.TextInputGroup,{style:{minWidth:220},children:[x.jsx(P.TextInputGroupMain,{id:n.id,value:t,onChange:(o,s)=>{i(typeof o=="string"?o:s)},onKeyUp:o=>{t&&o.key==="Enter"&&(n.addFilter(t),i(""))},placeholder:r}),t!==""&&x.jsx(P.TextInputGroupUtilities,{children:x.jsx(P.Button,{variant:"plain","aria-label":"clear filter",onClick:()=>i(""),style:{opacity:t?void 0:0},tabIndex:-1,children:x.jsx(Ct.TimesIcon,{})})})]}),x.jsx(P.Button,{variant:t?"primary":"control","aria-label":"apply filter",onClick:()=>{n.addFilter(t),i("")},tabIndex:-1,isDisabled:!t,children:x.jsx(Ct.ArrowRightIcon,{})})]})}var yq=(n=>(n[n.Text=0]="Text",n[n.SingleSelect=1]="SingleSelect",n[n.MultiSelect=2]="MultiSelect",n[n.DateRange=3]="DateRange",n[n.AsyncSingleSelect=4]="AsyncSingleSelect",n[n.AsyncMultiSelect=5]="AsyncMultiSelect",n))(yq||{});function wq(n){var l;const{toolbarFilters:e,filterState:t,setFilterState:i}=n,[r,o]=E.useState(()=>e&&(e==null?void 0:e.length)>0?e[0].key:""),s=e==null?void 0:e.find(c=>c.key===r);if(!s)return x.jsx(x.Fragment,{});if(!e)return x.jsx(x.Fragment,{});if(e.length===0)return x.jsx(x.Fragment,{});let a=e.length===1;return e.length>=1&&(e[0].type===2&&e[0].isPinned||e[0].type===1&&e[0].isPinned&&(t[e[0].key]==null||((l=t[e[0].key])==null?void 0:l.length)===0))&&(a=!1),x.jsx(x.Fragment,{children:e.length===1?x.jsxs(P.ToolbarItem,{children:[a&&x.jsx("div",{style:{marginTop:6,marginRight:6,whiteSpace:"nowrap"},children:e[0].label}),x.jsx(Sq,{id:"filter-input",filter:s,filterState:t,setFilterState:i})]}):x.jsxs(P.ToolbarItem,{children:[x.jsx(Ku,{id:"filter",value:r,onSelect:o,icon:x.jsx(Ct.FilterIcon,{}),options:e.map(c=>({label:c.label,value:c.key})),placeholder:""}),x.jsx(Sq,{id:"filter-input",filter:s,filterState:t,setFilterState:i})]})})}function Cq(n){const{toolbarFilters:e,setFilterState:t,filterState:i}=n,[r]=Ci(),o=!Do("md");if(!e)return x.jsx(x.Fragment,{});if(e.length===0)return x.jsx(x.Fragment,{});const s=e.filter(l=>!l.isPinned),a=e.filter(l=>!!l.isPinned);return x.jsx(P.ToolbarToggleGroup,{toggleIcon:x.jsx(Ct.FilterIcon,{}),breakpoint:"md",children:x.jsxs(P.ToolbarGroup,{variant:"filter-group",style:{flexWrap:"wrap",gap:16},children:[o&&x.jsx(P.ToolbarItem,{variant:"label",children:r.filter}),x.jsx(wq,{toolbarFilters:s,setFilterState:t,filterState:i}),a==null?void 0:a.map(l=>x.jsx(wq,{toolbarFilters:[l],setFilterState:t,filterState:i},l.key)),e==null?void 0:e.map(l=>{const c=(i==null?void 0:i[l.key])||[];return l.isPinned&&l.type===1?x.jsx(x.Fragment,{}):l.isPinned&&l.type===3?x.jsx(x.Fragment,{}):x.jsx(P.ToolbarFilter,{categoryName:l.label,chips:c.map(u=>{var d;switch(l.type){case 1:case 2:return((d=l.options.find(h=>h.value===u))==null?void 0:d.label)??u;default:return u}}),deleteChip:(u,d)=>{t==null||t(h=>{var m;const f={...h};switch(d=typeof d=="string"?d:d.key,l.type){case 1:case 2:d=((m=l.options.find(p=>p.value===d))==null?void 0:m.label)??d;break}let g=h[l.key];return g&&(g=g.filter(p=>p!==d),g.length===0?delete f[l.key]:f[l.key]=g),f})},deleteChipGroup:()=>{t==null||t(u=>{const d={...u};return delete d[l.key],d})},showToolbarItem:!1,children:x.jsx(x.Fragment,{})},l.label)})]})})}function Sq(n){const{filter:e,filterState:t,setFilterState:i}=n,r=t==null?void 0:t[e.key],o=E.useCallback(a=>{i(l=>{const c={...l},u=c[e.key]??[];return c[e.key]=a(u),c})},[e.key,i]),s=E.useCallback(a=>{i(l=>{const c={...l},u=c[e.key]??[];return c[e.key]=[...u,a],c})},[e.key,i]);switch(e.type){case 0:return x.jsx(pWe,{id:n.id??e.key,addFilter:s,placeholder:e.placeholder,comparison:e.comparison});case 1:return x.jsx(Ku,{id:n.id??e.key,placeholder:e.placeholder,value:r&&(r==null?void 0:r.length)>0?r[0]:"",onSelect:a=>o(()=>[a]),options:e.options,isRequired:e.isRequired});case 4:return x.jsx(hWe,{id:n.id??e.key,value:r&&(r==null?void 0:r.length)>0?r[0]:"",onSelect:a=>o(()=>[a]),placeholder:e.placeholder||"",queryOptions:e.queryOptions,queryErrorText:e.queryErrorText,queryPlaceholder:e.queryPlaceholder,isRequired:e.isRequired,footer:e.openBrowse?x.jsx(P.Button,{variant:"link",onClick:()=>{var a;(a=e.openBrowse)==null||a.call(e,l=>o(()=>[l]),r&&r.length>0?r[0]:void 0)},children:"Browse"}):void 0});case 5:return x.jsx(fWe,{id:n.id??e.key,values:r,onSelect:o,placeholder:e.placeholder||"",queryOptions:e.queryOptions,queryErrorText:e.queryErrorText,queryPlaceholder:e.queryPlaceholder,footer:e.openBrowse?x.jsx(P.Button,{variant:"link",onClick:()=>{var a;(a=e.openBrowse)==null||a.call(e,l=>o(()=>l),r)},children:"Browse"}):void 0});case 2:return x.jsx(bq,{id:n.id??e.key,placeholder:e.placeholder,values:r,onSelect:o,options:e.options,variant:"count",disableClearSelection:!0});case 3:return x.jsx(gWe,{id:n.id??e.key,label:e.label,placeholder:e.placeholder??"",filterValues:r,setFilterValues:o,options:e.options,isRequired:e.isRequired,defaultValue:e.defaultValue})}}function _We(n){const{sort:e,setSort:t,sortDirection:i,setSortDirection:r,sortOptions:o}=n,s=o==null?void 0:o.find(u=>u.value===e),a=s?s.type:void 0,[l]=Ci(),c=E.useMemo(()=>{switch(a){case"text":switch(i){case"asc":return x.jsx(Ct.SortAlphaUpIcon,{});case"desc":return x.jsx(Ct.SortAlphaDownAltIcon,{})}break;case"number":switch(i){case"asc":return x.jsx(Ct.SortNumericUpIcon,{});case"desc":return x.jsx(Ct.SortNumericDownAltIcon,{})}break;default:switch(i){case"asc":return x.jsx(Ct.SortAmountUpIcon,{});case"desc":return x.jsx(Ct.SortAmountDownIcon,{})}break}return x.jsx(x.Fragment,{})},[i,a]);return!o||o.length<=0?x.jsx(x.Fragment,{}):x.jsx(P.ToolbarToggleGroup,{breakpoint:"md",toggleIcon:void 0,children:x.jsxs(P.ToolbarGroup,{variant:"filter-group",children:[x.jsx(P.ToolbarItem,{variant:"label",children:l.sort}),x.jsx(P.ToolbarItem,{children:x.jsxs(P.Split,{children:[x.jsx(vWe,{sortOptions:o,sort:e,setSort:t,setSortDirection:r}),x.jsx(P.Button,{variant:"control",icon:c,onClick:()=>{i==="asc"?r==null||r("desc"):r==null||r("asc")}})]})})]})})}function vWe(n){const{sortOptions:e,sort:t,setSort:i,setSortDirection:r}=n,o=E.useCallback(s=>{if(s){const a=e.find(l=>l.value===s);a&&t!==s&&a.defaultDirection&&(r==null||r(a.defaultDirection)),i==null||i(s)}},[e,i,r,t]);return x.jsx(Ku,{placeholder:"",value:t,onSelect:o,options:e.map(s=>({label:s.label,value:s.value}))})}function bWe(n){return E.useMemo(()=>{const t=[];for(const i of n)if(i.sort){if(i.defaultSort){t.push({label:i.header,value:i.sort,type:"text",defaultDirection:i.defaultSortDirection});continue}switch(i.type){case"count":t.push({label:i.header,value:i.sort,type:"number",defaultDirection:i.defaultSortDirection});break;case"text":t.push({label:i.header,value:i.sort,type:"text",defaultDirection:i.defaultSortDirection});break;default:t.push({label:i.header,value:i.sort,defaultDirection:i.defaultSortDirection});break}}return t},[n])}function yWe(n){const{viewType:e,setViewType:t,openColumnModal:i}=n,[r]=Ci();let o=0;return n.disableTableView||o++,n.disableCardView||o++,n.disableListView||o++,x.jsxs(P.ToolbarGroup,{variant:"button-group",style:{justifyContent:"end",marginRight:0},children:[i&&x.jsx(P.ToolbarItem,{children:x.jsx(P.Tooltip,{content:r.manageColumns,children:x.jsx(P.Button,{variant:"plain",icon:x.jsx(Ct.ColumnsIcon,{}),onClick:i})})}),o>1&&x.jsx(P.ToolbarItem,{children:x.jsx(P.ToggleGroup,{"aria-label":"table view toggle",children:[!n.disableTableView&&Xn.Table,!n.disableListView&&Xn.List,!n.disableCardView&&Xn.Cards].filter(s=>s).map(s=>{switch(s){case Xn.Cards:return x.jsx(P.Tooltip,{content:r.cardView,position:"top-end",enableFlip:!1,children:x.jsx(P.ToggleGroupItem,{icon:x.jsx(Ct.ThLargeIcon,{}),isSelected:e===Xn.Cards,onClick:()=>t==null?void 0:t(Xn.Cards),"aria-label":"card view"})},s);case Xn.List:return x.jsx(P.Tooltip,{content:r.listView,position:"top-end",enableFlip:!1,children:x.jsx(P.ToggleGroupItem,{icon:x.jsx(Ct.ListIcon,{}),isSelected:e===Xn.List,onClick:()=>t==null?void 0:t(Xn.List),"aria-label":"list view"})},s);case Xn.Table:return x.jsx(P.Tooltip,{content:r.tableView,position:"top-end",enableFlip:!1,children:x.jsx(P.ToggleGroupItem,{icon:x.jsx(Ct.TableIcon,{}),isSelected:e===Xn.Table,onClick:()=>t==null?void 0:t(Xn.Table),"aria-label":"table view"})},s)}})})})]})}const wWe=un.div`
|
340
340
|
display: flex;
|
341
341
|
flex-grow: 1;
|
342
342
|
justify-content: end;
|