@worldresources/wri-design-systems 2.211.2 → 2.211.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -2067,12 +2067,14 @@
2067
2067
  }
2068
2068
  `,zv=i.css`
2069
2069
  ${Pv}
2070
+ justify-content: flex-start;
2070
2071
 
2071
2072
  svg {
2072
2073
  width: ${k(200)};
2073
2074
  height: ${k(200)};
2074
2075
  flex-shrink: 0;
2075
2076
  color: ${w("neutral",900)};
2077
+ margin-top: -0.1875rem;
2076
2078
  }
2077
2079
  `,Vv=i.css`
2078
2080
  color: ${w("neutral",700)};
@@ -4531,7 +4533,7 @@ function IE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
4531
4533
  0 -0.25rem 0.375rem -0.25rem #0000001a,
4532
4534
  0 -0.625rem 0.9375rem -0.1875rem #0000001a;
4533
4535
  }
4534
- `),"data-nav-source":J,onPointerMove:Y,children:[r.jsx(e.Combobox.Empty,{css:Vv,children:N.noItemsFoundLabel}),H?r.jsxs(e.Combobox.Item,{css:zv,item:{label:V,value:B},children:[r.jsx(sm,{}),N.createOptionLabel(V)]},B):null,_.items.map((t=>r.jsxs(e.Combobox.Item,{css:Pv,item:t,children:[t.label,r.jsx(e.Combobox.ItemIndicator,{})]},t.value)))]})})}),g&&q.length>0?r.jsx("div",{css:Bv,children:q.map((e=>r.jsx(bv,{label:e.label,variant:"info-white",onClose:()=>R(A.filter((t=>t!==e.value))),closable:!0},e.value)))}):null]})});var Q},exports.DesignSystemLocaleProvider=({labels:e,children:r})=>{const o=n.useMemo((()=>({labels:e})),[e]);return t.jsx(M.Provider,{value:o,children:r})},exports.ExtendableCard=({children:t,header:n,footer:o})=>r.jsx(e.Box,{css:WC,children:r.jsx(e.Accordion.Root,{multiple:!0,children:r.jsxs(e.Accordion.Item,{value:"extendable-card-item",children:[r.jsxs(e.Accordion.ItemTrigger,{css:UC,alignItems:"center",children:[r.jsx(e.Flex,{gap:3,flex:"1",overflow:"hidden",alignItems:"center",children:n}),r.jsx(e.Accordion.ItemIndicator,{children:r.jsx(Gf,{color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]}),r.jsxs(e.Accordion.ItemContent,{children:[t,o]})]})})}),exports.FieldWrapper=lg,exports.Footer=({children:e,label:t="© World Resources Institute",fixed:n,filled:o,maxWidth:i,additionalLogos:s})=>{const a=(new Date).getFullYear();return r.jsx("footer",{css:FO(n,o),children:r.jsxs("div",{css:qO(i),children:[r.jsxs("div",{css:KO,children:[r.jsx(om,{height:"2rem",width:"5.6875rem"}),s&&s.map(((e,t)=>r.jsx("div",{children:e},t)))]}),r.jsx("div",{css:WO,children:e}),r.jsx("div",{children:r.jsxs("p",{css:UO,children:[t," ",a]})})]})})},exports.FormContainer=({label:e,error:t,children:o})=>{const i=n.useId(),s=e?`${i}-label`:void 0,a=t?`${i}-error`:void 0;return r.jsxs("div",{css:sb,role:"group","aria-labelledby":s,"aria-describedby":a,children:[t?r.jsx("div",{css:lb}):null,r.jsxs("div",{children:[e?r.jsx("p",{id:s,css:ab,children:e}):null,t?r.jsx("p",{id:a,css:cb,children:t}):null,o]})]})},exports.GuidedTour=({open:e,onOpenChange:t,steps:n,activeStepIndex:o,onStepChange:s,onFinish:a,onSkip:l,variant:c="dark",closeOnEscape:d=!0,closeOnOutsideClick:u=!1,labels:h})=>{const p=Vf("GuidedTour",h),f=n.length,m=n[o];if(!e||!m||0===f)return null;const g=0===o,b=o===f-1,v="dark"===c,y=()=>{a?a():t(!1)},x=r.jsxs("div",{children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"0.25rem"},children:[m.icon,r.jsx("p",{style:{fontSize:"1rem",lineHeight:"1.5rem",fontWeight:"bold",marginBottom:m.caption?"0.25rem":0,color:w("neutral",v?100:800)},children:m.title})]}),m.caption?r.jsx("p",{style:{fontSize:"0.875rem",lineHeight:"1.25rem",color:w("neutral",v?200:700)},children:m.caption}):null]}),C=r.jsxs("div",{css:sw,children:[r.jsxs("div",{css:aw,children:[r.jsxs("div",{css:lw,children:[r.jsx(_f,{css:dw(v),icon:r.jsx(Jf,{}),"aria-label":p.previousStepLabel,disabled:g,onClick:()=>s(o-1)}),r.jsx("p",{css:cw(v),children:p.stepCounterLabel(o+1,f)}),r.jsx(_f,{css:[dw(v),i.css`
4536
+ `),"data-nav-source":J,onPointerMove:Y,children:[r.jsx(e.Combobox.Empty,{css:Vv,children:N.noItemsFoundLabel}),H?r.jsxs(e.Combobox.Item,{css:zv,item:{label:V,value:B},children:[r.jsx(sm,{}),N.createOptionLabel(V)]},B):null,_.items.filter((e=>!Fv(e.value))).map((t=>r.jsxs(e.Combobox.Item,{css:Pv,item:t,children:[t.label,r.jsx(e.Combobox.ItemIndicator,{})]},t.value)))]})})}),g&&q.length>0?r.jsx("div",{css:Bv,children:q.map((e=>r.jsx(bv,{label:e.label,variant:"info-white",onClose:()=>R(A.filter((t=>t!==e.value))),closable:!0},e.value)))}):null]})});var Q},exports.DesignSystemLocaleProvider=({labels:e,children:r})=>{const o=n.useMemo((()=>({labels:e})),[e]);return t.jsx(M.Provider,{value:o,children:r})},exports.ExtendableCard=({children:t,header:n,footer:o})=>r.jsx(e.Box,{css:WC,children:r.jsx(e.Accordion.Root,{multiple:!0,children:r.jsxs(e.Accordion.Item,{value:"extendable-card-item",children:[r.jsxs(e.Accordion.ItemTrigger,{css:UC,alignItems:"center",children:[r.jsx(e.Flex,{gap:3,flex:"1",overflow:"hidden",alignItems:"center",children:n}),r.jsx(e.Accordion.ItemIndicator,{children:r.jsx(Gf,{color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]}),r.jsxs(e.Accordion.ItemContent,{children:[t,o]})]})})}),exports.FieldWrapper=lg,exports.Footer=({children:e,label:t="© World Resources Institute",fixed:n,filled:o,maxWidth:i,additionalLogos:s})=>{const a=(new Date).getFullYear();return r.jsx("footer",{css:FO(n,o),children:r.jsxs("div",{css:qO(i),children:[r.jsxs("div",{css:KO,children:[r.jsx(om,{height:"2rem",width:"5.6875rem"}),s&&s.map(((e,t)=>r.jsx("div",{children:e},t)))]}),r.jsx("div",{css:WO,children:e}),r.jsx("div",{children:r.jsxs("p",{css:UO,children:[t," ",a]})})]})})},exports.FormContainer=({label:e,error:t,children:o})=>{const i=n.useId(),s=e?`${i}-label`:void 0,a=t?`${i}-error`:void 0;return r.jsxs("div",{css:sb,role:"group","aria-labelledby":s,"aria-describedby":a,children:[t?r.jsx("div",{css:lb}):null,r.jsxs("div",{children:[e?r.jsx("p",{id:s,css:ab,children:e}):null,t?r.jsx("p",{id:a,css:cb,children:t}):null,o]})]})},exports.GuidedTour=({open:e,onOpenChange:t,steps:n,activeStepIndex:o,onStepChange:s,onFinish:a,onSkip:l,variant:c="dark",closeOnEscape:d=!0,closeOnOutsideClick:u=!1,labels:h})=>{const p=Vf("GuidedTour",h),f=n.length,m=n[o];if(!e||!m||0===f)return null;const g=0===o,b=o===f-1,v="dark"===c,y=()=>{a?a():t(!1)},x=r.jsxs("div",{children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"0.25rem"},children:[m.icon,r.jsx("p",{style:{fontSize:"1rem",lineHeight:"1.5rem",fontWeight:"bold",marginBottom:m.caption?"0.25rem":0,color:w("neutral",v?100:800)},children:m.title})]}),m.caption?r.jsx("p",{style:{fontSize:"0.875rem",lineHeight:"1.25rem",color:w("neutral",v?200:700)},children:m.caption}):null]}),C=r.jsxs("div",{css:sw,children:[r.jsxs("div",{css:aw,children:[r.jsxs("div",{css:lw,children:[r.jsx(_f,{css:dw(v),icon:r.jsx(Jf,{}),"aria-label":p.previousStepLabel,disabled:g,onClick:()=>s(o-1)}),r.jsx("p",{css:cw(v),children:p.stepCounterLabel(o+1,f)}),r.jsx(_f,{css:[dw(v),i.css`
4535
4537
  color: ${w("primary",600)};
4536
4538
  `],icon:r.jsx(Zf,{}),"aria-label":b?p.finishLabel:p.nextStepLabel,onClick:b?y:()=>s(o+1)})]}),b?r.jsx(Bf,{variant:"primary",size:"small",label:p.startExploringLabel,onClick:y}):r.jsx(Bf,{css:uw(v),variant:"borderless",size:"small",label:p.skipAllLabel,onClick:()=>{l?l():t(!1)}})]}),m.footer]});return r.jsx(iw,{open:e,onOpenChange:t,anchorRef:m.anchorRef,placement:m.placement,offset:m.offset,variant:c,closeOnEscape:d,closeOnOutsideClick:u,header:x,content:m.content,footer:C,labels:m.labels})},exports.IconButton=_f,exports.InlineMessage=MO,exports.InputWithUnits=({label:t,caption:o,errorMessage:i,units:s,unitsPosition:a="end",defaultUnit:l="",defaultValue:c="",onChange:d,required:u,disabled:h})=>{const[p,f]=n.useState(c),[m,g]=n.useState(l?[l]:[s[0].value]),b=(e,t)=>{d&&d("end"===a?""+(t?`${p} ${e}`:`${e} ${m}`):""+(t?`${e} ${p}`:`${m} ${e}`))};return r.jsx("div",{css:Yb,children:r.jsx(lg,{label:t,caption:o,errorMessage:i,required:u,disabled:h,showOptionalLabel:!1,noMarginBottom:!0,semantics:"group",children:r.jsxs(e.Group,{css:Qb(!!i,a),attached:!0,children:["start"===a?r.jsx(xv,{placeholder:"","aria-label":`${t} unit`,value:m,items:s,disabled:h,onChange:e=>{g(e),b(e?.[0],!0)}}):null,r.jsx(bg,{type:"number","aria-label":`${t} value`,value:p,disabled:h,noMarginBottom:!0,onChange:e=>{f(e.target.value),b(e.target.value)}}),"end"===a?r.jsx(xv,{placeholder:"","aria-label":`${t} unit`,value:m,items:s,disabled:h,onChange:e=>{g(e),b(e?.[0],!0)}}):null]})})})},exports.ItemCount=fC,exports.LayerGroup=({label:t,caption:o,value:i,layerItems:s,onChangeForRadioVariant:a,labels:l})=>{const c=Vf("LayerGroup",l),[d,u]=n.useState({}),[h,p]=n.useState((e=>{const t=e.find((e=>"radio"===e.variant&&e.isDefaultSelected));return t?.name})(s));n.useEffect((()=>{let e={...d};s.forEach((n=>{n.isDefaultSelected&&(e={...e,["radio"===n.variant?t:n.name]:n.isDefaultSelected})})),u(e)}),[]);const f=(e,t,n,r)=>{const o={...d,[e]:t};u(o),n&&n(e,t,r)},m=Object.values(d).filter((e=>!0===e)).length,g=c.groupAriaLabel(t,m,o);return r.jsxs(e.Accordion.Item,{value:i,width:"100%",children:[r.jsxs(e.Accordion.ItemTrigger,{css:Sw,alignItems:"flex-start","aria-label":g,children:[r.jsxs(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:[r.jsxs("span",{css:$w,children:[t,r.jsx(bv,{label:c.activeTagLabel(m),size:"small",variant:m>0?"success":"info-grey"})]}),r.jsx("div",{css:jw,children:o})]}),r.jsx(e.Accordion.ItemIndicator,{display:"flex",children:r.jsx(Gf,{color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]}),r.jsx(e.Accordion.ItemContent,{paddingLeft:"1rem",paddingRight:"1rem",children:r.jsx(Eb,{name:t,value:h,customGap:"0",onChange:(e,t)=>{p(t),f(e,!!t,a,t)},children:s.map((e=>r.jsx(Aw,{...e,onChange:(t,n)=>f(t,n,e.onChange)},e.label)))})})]})},exports.LayerGroupContainer=({children:t,defaultValue:n,...o})=>r.jsx("div",{css:kw,style:{width:"100%"},children:r.jsx(e.Accordion.Root,{css:{},defaultValue:n,multiple:!0,...o,children:t})}),exports.LayerItem=Aw,exports.LayerParameters=({label:t,children:o,openedByDefault:i})=>r.jsx("div",{children:r.jsx(e.Accordion.Root,{defaultValue:i?[t]:[],multiple:!0,children:r.jsxs(e.Accordion.Item,{css:Rw,value:t,children:[r.jsxs(e.Accordion.ItemTrigger,{css:Nw,children:[r.jsx(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:r.jsx("p",{css:Dw,children:t})}),r.jsx(e.Accordion.ItemIndicator,{display:"flex",children:r.jsx(Gf,{color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]}),r.jsx(e.Accordion.ItemContent,{css:Iw,children:n.Children.map(o,(e=>r.jsx("div",{className:"ds-layer-parameters-item-child",children:e})))})]})})}),exports.LegendItem=({layerName:e,dataUnit:t,onDrag:n,onUpClick:o,onDownClick:i,onRemoveClick:s,children:a,onInfoClick:l,onOpacityChanged:c,labels:d})=>{const u=Vf("LegendItem",d);return r.jsxs("div",{css:Pw,children:[r.jsx("div",{css:zw,children:r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"0.75rem"},children:[r.jsx(_f,{icon:r.jsx(Gf,{rotate:"180"}),"aria-label":u.upLabel,onClick:o}),r.jsx(_f,{icon:r.jsx(Gf,{}),"aria-label":u.downLabel,onClick:i})]})}),r.jsxs("div",{style:{width:"100%"},children:[r.jsxs("div",{css:Vw,children:[r.jsxs("div",{children:[r.jsx("h3",{css:Hw,children:e}),r.jsx("p",{css:_w,children:t})]}),r.jsx(Bf,{label:u.removeLabel,size:"small",variant:"secondary",rightIcon:r.jsx(Xf,{}),onClick:s})]}),a?r.jsx("div",{css:Bw,children:a}):null,r.jsxs("div",{css:Fw,children:[r.jsx(Bf,{label:u.aboutDataLabel,size:"small",variant:"secondary",leftIcon:r.jsx(Kf,{}),onClick:l}),r.jsx(Zw,{defaultValue:80,onOpacityChanged:c})]})]})]})},exports.List=kC,exports.MapControlsToolbar=({onZoomInClick:e,onZoomOutClick:n,onExpandClick:r,onShareClick:o,onPrintClick:i,onSettingsClick:s,onQuestionClick:a,vertical:l,expanded:c,showExpandedToggle:d,ariaLabel:u,labels:h})=>{const p=Vf("MapControlsToolbar",h),f=[{icon:t.jsx(sm,{}),label:p.zoomInLabel,ariaLabel:p.zoomInAriaLabel,onClick:e},{icon:t.jsx(am,{}),label:p.zoomOutLabel,ariaLabel:p.zoomOutAriaLabel,onClick:n,gap:!0},{icon:t.jsx(lm,{}),label:p.expandLabel,ariaLabel:p.expandAriaLabel,onClick:r,gap:!0},{icon:t.jsx(cm,{}),label:p.shareLabel,ariaLabel:p.shareAriaLabel,onClick:o,gap:!0},{icon:t.jsx(dm,{}),label:p.printLabel,ariaLabel:p.printAriaLabel,onClick:i,gap:!0},{icon:t.jsx(um,{}),label:p.settingsLabel,ariaLabel:p.settingsAriaLabel,onClick:s,gap:!0},{icon:t.jsx(hm,{}),label:p.helpLabel,ariaLabel:p.helpAriaLabel,onClick:a}];return t.jsx(Xg,{items:f,vertical:l,expanded:c,showExpandedToggle:d,ariaLabel:u||p.toolbarAriaLabel})},exports.MapMarker=ww,exports.MapMarkers=Cw,exports.MapPopUp=iw,exports.Menu=Hm,exports.MobileSearch=({value:t,placeholder:o,showInfoMessage:i=!0,items:s=[],disabled:a,readOnly:l,id:c,name:d,autoFocus:u,autoComplete:h,onBlur:p,onFocus:f,onQueryChange:m,onCancel:g,onItemClick:b,onChange:v,labels:y})=>{const x=Vf("MobileSearch",y),[C,k]=n.useState(t??""),[S,$]=n.useState(!0),[j,M]=n.useState(!1),E=n.useRef(null),T="string"==typeof t,O=T?t:C;n.useEffect((()=>{T&&k(t)}),[T,t]),n.useEffect((()=>{m?.(O)}),[O,m]);const L=n.useMemo((()=>{const e=O.trim().toLowerCase();return e?s.filter((t=>`${t.id??""} ${t.label} ${t.caption??""}`.toLowerCase().includes(e))):s}),[s,O]),A=O.trim().length?x.matchingResultsTitle(L.length):x.recentSearchesTitle,R=O.length?r.jsx($g,{onClick:()=>{T||k("");const e=E.current?.querySelector("input");e&&(e.value="",e.focus()),$(!0)}}):null;let N=w("neutral",500);return a?N=w("neutral",500):j&&(N=w("primary",700)),r.jsxs("div",{ref:E,css:EO,children:[r.jsxs("div",{css:TO,children:[r.jsx("div",{css:OO,children:r.jsx(e.InputGroup,{startElement:r.jsx(Sm,{width:"1.25rem",height:"1.25rem",fill:N,"aria-hidden":"true"}),endElement:R,children:r.jsx(bg,{label:"",value:O,placeholder:o??x.inputAriaLabel,onChange:e=>{T||k(e.target.value),$(!0),v?.(e)},onFocus:e=>{M(!0),$(!0),f?.(e)},onBlur:e=>{M(!1),p?.(e)},noMarginBottom:!0,type:"search","aria-label":o??x.inputAriaLabel,disabled:a,readOnly:l,id:c,name:d,autoFocus:u??!0,autoComplete:h,style:{paddingLeft:"2.5rem"}})})}),r.jsx(Bf,{css:LO,variant:"borderless",label:x.cancelLabel,onClick:()=>{T||k(""),$(!1);const e=E.current?.querySelector("input");e&&(e.value="",e.blur()),g?.()}})]}),S?r.jsxs("div",{css:AO,children:[r.jsx("h3",{css:RO,children:A}),i?r.jsx("div",{css:NO,children:r.jsx(MO,{label:x.infoLabel,variant:"info-white",size:"full-width"})}):null,r.jsx("ul",{css:DO,"aria-label":A,children:L.map((t=>r.jsx("li",{children:r.jsxs(e.chakra.button,{type:"button",css:IO,onClick:()=>(e=>{b?.(e)})(t),"aria-label":`${t.label}, ${t.caption??""}`,style:{width:"100%"},children:[t.icon??null,r.jsxs("div",{css:PO,children:[r.jsx("p",{css:zO,children:t.label}),r.jsx("p",{css:VO,children:t.caption})]})]})},t.id)))})]}):null]})},exports.MobileTabBar=({defaultValue:t,tabs:o,onTabClick:i,hideLabels:s,activationMode:a="manual",labels:l})=>{const c=Vf("MobileTabBar",l),d=o.length,[u,h]=n.useState((()=>YO(o,t)));return r.jsx("div",{css:GO,children:r.jsx(e.Tabs.Root,{width:"full",defaultValue:t||o?.[0]?.value,onValueChange:({value:e})=>(e=>{const t=YO(o,e);h(t),i&&i(e)})(e),activationMode:a,children:r.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:o.map(((t,n)=>{const{label:o,icon:i,bagdeCount:a,"aria-label":l,"aria-describedby":h,disabled:p,...f}=t,m=`${t.value}-str-status`,g=u===n,b=[c.tabPositionStatus(n+1,d),g?c.selectedStatus:c.notSelectedStatus];p&&b.push(c.disabledStatus);const v=[h,m].filter(Boolean).join(" ")||void 0;return r.jsxs(e.Tabs.Trigger,{css:ZO,"aria-label":l||o,"aria-disabled":!!p||void 0,"aria-describedby":v,disabled:p,...f,children:[r.jsxs("div",{css:JO,children:[i,a?r.jsx("div",{css:XO,className:"ds-badge-count",children:a}):null]}),s?null:r.jsx("p",{children:o}),r.jsx(e.VisuallyHidden,{id:m,children:b.join(", ")})]},t.value)}))})})})},exports.Modal=({header:t,content:o,footer:i,size:s="medium",width:a,height:l,maxHeight:c,draggable:d,blocking:u,open:h,onClose:p,labels:f,lazyMount:m,unmountOnExit:g,restoreFocus:b,modal:v,initialFocusEl:y,finalFocusEl:x,trapFocus:w})=>{const C=Vf("Modal",f),k=n.useRef(null);return h?r.jsx(e.Dialog.Root,{open:h,onOpenChange:p,placement:"center",scrollBehavior:"inside",closeOnInteractOutside:!d&&!u,preventScroll:!d&&!u,closeOnEscape:!u,defaultOpen:!0,trapFocus:w,lazyMount:m,unmountOnExit:g,restoreFocus:b,modal:v,initialFocusEl:y,finalFocusEl:x,children:r.jsxs(e.Portal,{children:[d?null:r.jsx(e.Dialog.Backdrop,{css:{background:"rgba(0, 0, 0, 0.64)"}}),r.jsx(Wk,{disabled:!d,nodeRef:k,children:r.jsx(e.Dialog.Positioner,{ref:k,children:r.jsxs(e.Dialog.Content,{"aria-label":C.dialogAriaLabel,css:Uk(s,a,l,c),children:[r.jsxs(e.Dialog.Header,{css:Kk,children:[t,u?null:r.jsx(e.Dialog.CloseTrigger,{css:Gk,asChild:!0,children:r.jsx($g,{})})]}),r.jsx(e.Dialog.Body,{css:Zk,children:o}),i?r.jsx(e.Dialog.Footer,{padding:"0.75rem",children:i}):null]})})})]})}):null},exports.MultiActionButton=({variant:t="primary",size:o="default",mainActionLabel:i,mainActionOnClick:s=()=>{},otherActions:a=[],disabled:l,mainActionLeftIcon:c,mainActionRightIcon:d,labels:u,...h})=>{const p=Vf("MultiActionButton",u),[f,m]=n.useState(!1),g=l?p.disabledAriaLabel(i):void 0;return r.jsxs(e.Group,{css:rb,attached:!0,tabIndex:l?0:void 0,"aria-disabled":l,"aria-label":g,role:"group",children:[r.jsx(Bf,{...h,label:i,variant:t,size:o,onClick:s,disabled:l,leftIcon:c,rightIcon:d}),r.jsxs(e.Menu.Root,{onOpenChange:({open:e})=>m(e),positioning:{placement:"bottom-end"},onSelect:({value:e})=>{const t=a.find((t=>t.value===e));t&&!t.disabled&&t.onClick()},children:[r.jsx(e.Menu.Trigger,{css:tb(t),"data-group-item":!0,"data-last":!0,asChild:!0,children:r.jsx(Bf,{style:ob(o),"aria-label":p.openOptionsLabel(i),"aria-haspopup":"menu","aria-expanded":f,variant:t,size:o,leftIcon:r.jsx(Gf,{"aria-hidden":"true",rotate:f?"180":"0",color:eb(t,l)}),disabled:l})}),r.jsx(ib,{children:a.map((({label:t,value:n,disabled:i})=>r.jsx(e.Menu.Item,{css:nb(o),value:n,disabled:i,children:t},n)))})]})]})},exports.Navbar=({variant:e="default",theme:t="light",logo:o,linkRouter:i,pathname:s,navigationSection:a,utilitySection:l,actionsSection:c,maxWidth:d,fixed:u,onNavbarHeightChange:h,backgroundColor:p,labels:f})=>{const m=Vf("Navbar",f),g=n.useRef(null),b=n.useRef(null),v=n.useRef(null),[y,x]=n.useState(!1),[w,C]=n.useState(-1),[k,S]=n.useState("undefined"!=typeof window&&window?.innerWidth<=wL),[$,j]=n.useState(!1),M=i,E=n.useCallback((()=>{if(b.current&&g.current&&v.current){const e=g.current.getBoundingClientRect(),t=b.current.getBoundingClientRect(),n=v.current.getBoundingClientRect();t.width,e.width,window.innerWidth<=wL||window.innerWidth<=w?(h?.(96),x(!0)):window.innerWidth>wL&&window.innerWidth<=1440?e.right>=t.left?(h?.(96),x(!0),C(window.innerWidth)):window.innerWidth>w&&(h?.(48),x(!1),C(-1)):(h?.(48),x(!1),C(-1)),y&&(window.innerWidth<=wL||n.right>=t.left?(S(!0),h?.(48)):(S(!1),h?.(96)))}}),[w,y]);n.useEffect((()=>(E(),window.addEventListener("resize",E),()=>{window.removeEventListener("resize",E)})),[E]);const T="condensed"===e;return r.jsxs("nav",{css:QO(y&&!k,u,p,t,T),children:[r.jsxs("div",{css:tL(y&&!k,d,T),children:[r.jsxs("div",{css:nL(y&&!k||"dark"===t,T),ref:g,children:[o?r.jsx("div",{ref:v,css:rL,children:o}):null,r.jsx("div",{css:oL(y),children:a?.map((e=>e.link?r.jsx(M,{to:e.link,href:e.link,css:iL(s===e.link,t,T),children:e.label},e.label):r.jsx(Hm,{theme:t,label:e.label,fontSize:T?"0.875rem":"1rem",items:e.items||[]},e.label)))})]}),r.jsx("div",{css:sL(T),ref:b,children:k?r.jsxs("button",{type:"button",onClick:()=>j(!$),"aria-label":$?m.closeMenuLabel:m.openMenuLabel,"aria-expanded":$,css:cL(t),children:[$?m.closeLabel:m.menuLabel,$?r.jsx(Xf,{height:T?"0.75rem":"1rem",width:T?"0.75rem":"1rem"}):r.jsx(wm,{height:T?"0.75rem":"1rem",width:T?"0.75rem":"1rem"})]}):r.jsxs(r.Fragment,{children:[r.jsx("div",{css:sL(T),children:l?.map(((e,t)=>r.jsx("div",{css:aL(y),children:e},t)))}),c?.length?r.jsx("div",{css:lL(y),children:c.map((e=>r.jsx(Bf,{...e},e.ariaLabel)))}):null]})})]}),y&&!k?r.jsx("div",{css:eL(t,T),children:a?.map((e=>e.link?r.jsx(M,{to:e.link,href:e.link,css:iL(s===e.link,t,T),children:e.label},e.label):r.jsx(Hm,{theme:t,label:e.label,fontSize:T?"0.875rem":"1rem",items:e.items||[]},e.label)))}):null,k?r.jsx(xL,{theme:t,variant:e,navigationSection:a,utilitySection:l,actionsSection:c,linkRouter:i,isOpen:$,setIsOpen:j,pathname:s,resolvedLabels:m}):null]})},exports.NavigationRail=({tabs:t=[],defaultValue:o,onTabClick:i,children:s,onOpenChange:a,labels:l})=>{const c=Vf("NavigationRail",l),[d,u]=n.useState(!1),[h,p]=n.useState(o||t?.[0]?.value),f=e=>{p(e),i&&i(e)},[m]=e.useMediaQuery(["(max-width: 48rem)"]);return m?r.jsxs(e.Tabs.Root,{defaultValue:h,onValueChange:({value:e})=>f(e),children:[r.jsx(e.Tabs.List,{style:{display:"flex",overflowX:"auto",whiteSpace:"nowrap",padding:"0.5rem",gap:"0.5rem"},children:t.map((t=>r.jsx(e.Tabs.Trigger,{value:t.value,css:{"--indicator-color":w("primary",500),flexShrink:0,padding:"0.625rem 1rem",color:w("neutral",600),"&[data-selected]":{color:w("neutral",800),fontWeight:600}},children:t.label},t.value)))}),t.map((t=>r.jsx(e.Tabs.Content,{value:t.value,children:s},t.value)))]}):r.jsxs("div",{style:{height:"calc(100vh - 3rem - 3.5rem)",position:"fixed",top:"3rem",left:0,display:"flex"},children:[r.jsxs("div",{css:CL,children:[r.jsx(e.Tabs.Root,{defaultValue:o||t?.[0]?.value,orientation:"horizontal",width:"full",onValueChange:({value:e})=>{f(e)},children:r.jsx(e.Tabs.List,{alignItems:"center",border:"none",style:{flexDirection:"column"},children:t.map((t=>r.jsx(e.Tabs.Trigger,{css:kL,"aria-label":t["aria-label"]||t.label,...t,children:r.jsxs(e.Box,{display:"flex",alignItems:"center",flexDirection:"column",gap:"0.3125rem",className:"ds-tab-label",children:[t.icon?r.jsx("div",{css:SL,children:t.icon}):null,r.jsx("p",{children:t.label})]})},t.label)))})}),s?r.jsx(e.Collapsible.Root,{onOpenChange:({open:e})=>{u(e),a&&a(!e)},children:r.jsxs(e.Collapsible.Trigger,{css:$L,children:[r.jsx("div",{css:SL,children:d?r.jsx(qf,{}):r.jsx(Ff,{})}),r.jsxs("div",{className:"ds-tab-label",children:[r.jsx("p",{children:d?c.showLabel:c.hideLabel}),r.jsx("p",{children:c.sidebarLabel})]})]})}):null]}),s?r.jsx(e.Collapsible.Root,{defaultOpen:!0,open:!d,children:r.jsx(e.Collapsible.Content,{height:"100%",children:r.jsx("div",{css:jL,role:"tabpanel","aria-labelledby":h,children:s})})}):null]})},exports.OpacityControl=Zw,exports.OptionCard=({defaultValue:t,items:n,onValueChange:o,variant:s,itemWidth:a,hideControl:l})=>r.jsx(e.RadioCard.Root,{defaultValue:t,onValueChange:o,children:r.jsx(e.HStack,{alignItems:"flex-start",flexWrap:"wrap",gap:"0.75rem",children:n?.map((t=>{return r.jsxs(e.RadioCard.Item,{css:(o=a,c=t.selectedColor,d=t.selectedBackgroundColor,i.css`
4537
4539
  width: ${o||"15.0625rem"};
package/dist/index.esm.js CHANGED
@@ -2159,12 +2159,14 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as o,Ic
2159
2159
  }
2160
2160
  `,pw=ke`
2161
2161
  ${hw}
2162
+ justify-content: flex-start;
2162
2163
 
2163
2164
  svg {
2164
2165
  width: ${Ve(200)};
2165
2166
  height: ${Ve(200)};
2166
2167
  flex-shrink: 0;
2167
2168
  color: ${Ie("neutral",900)};
2169
+ margin-top: -0.1875rem;
2168
2170
  }
2169
2171
  `,fw=ke`
2170
2172
  color: ${Ie("neutral",700)};
@@ -2208,7 +2210,7 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as o,Ic
2208
2210
  0 -0.25rem 0.375rem -0.25rem #0000001a,
2209
2211
  0 -0.625rem 0.9375rem -0.1875rem #0000001a;
2210
2212
  }
2211
- `),"data-nav-source":K,onPointerMove:Z,children:[ve(L.Empty,{css:fw,children:A.noItemsFoundLabel}),V?be(L.Item,{css:pw,item:{label:I,value:z},children:[ve(Cg,{}),A.createOptionLabel(I)]},z):null,H.items.map((e=>be(L.Item,{css:hw,item:e,children:[e.label,ve(L.ItemIndicator,{})]},e.value)))]})})}),p&&_.length>0?ve("div",{css:mw,children:_.map((e=>ve(_y,{label:e.label,variant:"info-white",onClose:()=>E(S.filter((t=>t!==e.value))),closable:!0},e.value)))}):null]})});var J};function ww(){return"undefined"!=typeof window}function xw(e){return $w(e)?(e.nodeName||"").toLowerCase():"#document"}function Cw(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function kw(e){var t;return null==(t=($w(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function $w(e){return!!ww()&&(e instanceof Node||e instanceof Cw(e).Node)}function Sw(e){return!!ww()&&(e instanceof Element||e instanceof Cw(e).Element)}function Mw(e){return!!ww()&&(e instanceof HTMLElement||e instanceof Cw(e).HTMLElement)}function Ew(e){return!(!ww()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Cw(e).ShadowRoot)}const Tw=new Set(["inline","contents"]);function Ow(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=_w(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Tw.has(o)}const Lw=new Set(["table","td","th"]);function Aw(e){return Lw.has(xw(e))}const Nw=[":popover-open",":modal"];function Rw(e){return Nw.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}const Dw=["transform","translate","scale","rotate","perspective"],Pw=["transform","translate","scale","rotate","perspective","filter"],Iw=["paint","layout","strict","content"];function zw(e){const t=Vw(),n=Sw(e)?_w(e):e;return Dw.some((e=>!!n[e]&&"none"!==n[e]))||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||Pw.some((e=>(n.willChange||"").includes(e)))||Iw.some((e=>(n.contain||"").includes(e)))}function Vw(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const Hw=new Set(["html","body","#document"]);function Bw(e){return Hw.has(xw(e))}function _w(e){return Cw(e).getComputedStyle(e)}function jw(e){return Sw(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Fw(e){if("html"===xw(e))return e;const t=e.assignedSlot||e.parentNode||Ew(e)&&e.host||kw(e);return Ew(t)?t.host:t}function qw(e){const t=Fw(e);return Bw(t)?e.ownerDocument?e.ownerDocument.body:e.body:Mw(t)&&Ow(t)?t:qw(t)}function Ww(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=qw(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),s=Cw(o);if(i){const e=Uw(s);return t.concat(s,s.visualViewport||[],Ow(o)?o:[],e&&n?Ww(e):[])}return t.concat(o,Ww(o,[],n))}function Uw(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Kw=Math.min,Gw=Math.max,Zw=Math.round,Jw=Math.floor,Xw=e=>({x:e,y:e}),Yw={left:"right",right:"left",bottom:"top",top:"bottom"},Qw={start:"end",end:"start"};function ex(e,t,n){return Gw(e,Kw(t,n))}function tx(e,t){return"function"==typeof e?e(t):e}function nx(e){return e.split("-")[0]}function rx(e){return e.split("-")[1]}function ox(e){return"x"===e?"y":"x"}function ix(e){return"y"===e?"height":"width"}const sx=new Set(["top","bottom"]);function ax(e){return sx.has(nx(e))?"y":"x"}function lx(e){return ox(ax(e))}function cx(e){return e.replace(/start|end/g,(e=>Qw[e]))}const dx=["left","right"],ux=["right","left"],hx=["top","bottom"],px=["bottom","top"];function fx(e,t,n,r){const o=rx(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?ux:dx:t?dx:ux;case"left":case"right":return t?hx:px;default:return[]}}(nx(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(cx)))),i}function mx(e){return e.replace(/left|right|bottom|top/g,(e=>Yw[e]))}function gx(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function bx(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}const vx="data-floating-ui-focusable";function yx(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Ew(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function wx(e){return"composedPath"in e?e.composedPath()[0]:e.target}function xx(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return null!=n.target&&t.contains(n.target)}function Cx(e){return(null==e?void 0:e.ownerDocument)||document}function kx(e,t,n){void 0===n&&(n=!0);return e.filter((e=>{var r;return e.parentId===t&&(!n||(null==(r=e.context)?void 0:r.open))})).flatMap((t=>[t,...kx(e,t.id,n)]))}var $x="undefined"!=typeof document?de:function(){};const Sx={...ee}.useInsertionEffect||(e=>e());function Mx(e){const t=ee.useRef((()=>{if("production"!==process.env.NODE_ENV)throw new Error("Cannot call an event handler while rendering.")}));return Sx((()=>{t.current=e})),ee.useCallback((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}function Ex(e,t,n){let{reference:r,floating:o}=e;const i=ax(t),s=lx(t),a=ix(s),l=nx(t),c="y"===i,d=r.x+r.width/2-o.width/2,u=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let p;switch(l){case"top":p={x:d,y:r.y-o.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:u};break;case"left":p={x:r.x-o.width,y:u};break;default:p={x:r.x,y:r.y}}switch(rx(t)){case"start":p[s]-=h*(n&&c?-1:1);break;case"end":p[s]+=h*(n&&c?-1:1)}return p}async function Tx(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:h=!1,padding:p=0}=tx(t,e),f=gx(p),m=a[h?"floating"===u?"reference":"floating":u],g=bx(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),b="floating"===u?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,v=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),y=await(null==i.isElement?void 0:i.isElement(v))&&await(null==i.getScale?void 0:i.getScale(v))||{x:1,y:1},w=bx(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:v,strategy:l}):b);return{top:(g.top-w.top+f.top)/y.y,bottom:(w.bottom-g.bottom+f.bottom)/y.y,left:(g.left-w.left+f.left)/y.x,right:(w.right-g.right+f.right)/y.x}}const Ox=new Set(["left","top"]);function Lx(e){const t=_w(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Mw(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Zw(n)!==i||Zw(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function Ax(e){return Sw(e)?e:e.contextElement}function Nx(e){const t=Ax(e);if(!Mw(t))return Xw(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Lx(t);let s=(i?Zw(n.width):n.width)/r,a=(i?Zw(n.height):n.height)/o;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const Rx=Xw(0);function Dx(e){const t=Cw(e);return Vw()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Rx}function Px(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=Ax(e);let s=Xw(1);t&&(r?Sw(r)&&(s=Nx(r)):s=Nx(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Cw(e))&&t}(i,n,r)?Dx(i):Xw(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,d=o.width/s.x,u=o.height/s.y;if(i){const e=Cw(i),t=r&&Sw(r)?Cw(r):r;let n=e,o=Uw(n);for(;o&&r&&t!==n;){const e=Nx(o),t=o.getBoundingClientRect(),r=_w(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,s=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,d*=e.x,u*=e.y,l+=i,c+=s,n=Cw(o),o=Uw(n)}}return bx({width:d,height:u,x:l,y:c})}function Ix(e,t){const n=jw(e).scrollLeft;return t?t.left+n:Px(kw(e)).left+n}function zx(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Ix(e,n),y:n.top+t.scrollTop}}const Vx=new Set(["absolute","fixed"]);function Hx(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Cw(e),r=kw(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const e=Vw();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,l=o.offsetTop)}const c=Ix(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,s=Math.abs(r.clientWidth-t.clientWidth-o);s<=25&&(i-=s)}else c<=25&&(i+=c);return{width:i,height:s,x:a,y:l}}(e,n);else if("document"===t)r=function(e){const t=kw(e),n=jw(e),r=e.ownerDocument.body,o=Gw(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Gw(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Ix(e);const a=-n.scrollTop;return"rtl"===_w(r).direction&&(s+=Gw(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}(kw(e));else if(Sw(t))r=function(e,t){const n=Px(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Mw(e)?Nx(e):Xw(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=Dx(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return bx(r)}function Bx(e,t){const n=Fw(e);return!(n===t||!Sw(n)||Bw(n))&&("fixed"===_w(n).position||Bx(n,t))}function _x(e,t,n){const r=Mw(t),o=kw(t),i="fixed"===n,s=Px(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Xw(0);function c(){l.x=Ix(o)}if(r||!r&&!i)if(("body"!==xw(t)||Ow(o))&&(a=jw(t)),r){const e=Px(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&c();i&&!r&&o&&c();const d=!o||r||i?Xw(0):zx(o,a);return{x:s.left+a.scrollLeft-l.x-d.x,y:s.top+a.scrollTop-l.y-d.y,width:s.width,height:s.height}}function jx(e){return"static"===_w(e).position}function Fx(e,t){if(!Mw(e)||"fixed"===_w(e).position)return null;if(t)return t(e);let n=e.offsetParent;return kw(e)===n&&(n=n.ownerDocument.body),n}function qx(e,t){const n=Cw(e);if(Rw(e))return n;if(!Mw(e)){let t=Fw(e);for(;t&&!Bw(t);){if(Sw(t)&&!jx(t))return t;t=Fw(t)}return n}let r=Fx(e,t);for(;r&&Aw(r)&&jx(r);)r=Fx(r,t);return r&&Bw(r)&&jx(r)&&!zw(r)?n:r||function(e){let t=Fw(e);for(;Mw(t)&&!Bw(t);){if(zw(t))return t;if(Rw(t))return null;t=Fw(t)}return null}(e)||n}const Wx={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,s=kw(r),a=!!t&&Rw(t.floating);if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Xw(1);const d=Xw(0),u=Mw(r);if((u||!u&&!i)&&(("body"!==xw(r)||Ow(s))&&(l=jw(r)),Mw(r))){const e=Px(r);c=Nx(r),d.x=e.x+r.clientLeft,d.y=e.y+r.clientTop}const h=!s||u||i?Xw(0):zx(s,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+h.x,y:n.y*c.y-l.scrollTop*c.y+d.y+h.y}},getDocumentElement:kw,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?Rw(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Ww(e,[],!1).filter((e=>Sw(e)&&"body"!==xw(e))),o=null;const i="fixed"===_w(e).position;let s=i?Fw(e):e;for(;Sw(s)&&!Bw(s);){const t=_w(s),n=zw(s);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&Vx.has(o.position)||Ow(s)&&!n&&Bx(e,s))?r=r.filter((e=>e!==s)):o=t,s=Fw(s)}return t.set(e,r),r}(t,this._c):[].concat(n),s=[...i,r],a=s[0],l=s.reduce(((e,n)=>{const r=Hx(t,n,o);return e.top=Gw(r.top,e.top),e.right=Kw(r.right,e.right),e.bottom=Kw(r.bottom,e.bottom),e.left=Gw(r.left,e.left),e}),Hx(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:qx,getElementRects:async function(e){const t=this.getOffsetParent||qx,n=this.getDimensions,r=await n(e.floating);return{reference:_x(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Lx(e);return{width:t,height:n}},getScale:Nx,isElement:Sw,isRTL:function(e){return"rtl"===_w(e).direction}};function Ux(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Kx(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=Ax(e),d=o||i?[...c?Ww(c):[],...Ww(t)]:[];d.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const u=c&&a?function(e,t){let n,r=null;const o=kw(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),i();const c=e.getBoundingClientRect(),{left:d,top:u,width:h,height:p}=c;if(a||t(),!h||!p)return;const f={rootMargin:-Jw(u)+"px "+-Jw(o.clientWidth-(d+h))+"px "+-Jw(o.clientHeight-(u+p))+"px "+-Jw(d)+"px",threshold:Gw(0,Kw(1,l))||1};let m=!0;function g(t){const r=t[0].intersectionRatio;if(r!==l){if(!m)return s();r?s(!1,r):n=setTimeout((()=>{s(!1,1e-7)}),1e3)}1!==r||Ux(c,e.getBoundingClientRect())||s(),m=!1}try{r=new IntersectionObserver(g,{...f,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,f)}r.observe(e)}(!0),i}(c,n):null;let h,p=-1,f=null;s&&(f=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=f)||e.observe(t)}))),n()})),c&&!l&&f.observe(c),f.observe(t));let m=l?Px(e):null;return l&&function t(){const r=Px(e);m&&!Ux(m,r)&&n();m=r,h=requestAnimationFrame(t)}(),n(),()=>{var e;d.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==u||u(),null==(e=f)||e.disconnect(),f=null,l&&cancelAnimationFrame(h)}}const Gx=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),s=nx(n),a=rx(n),l="y"===ax(n),c=Ox.has(s)?-1:1,d=i&&l?-1:1,u=tx(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:f}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&"number"==typeof f&&(p="end"===a?-1*f:f),l?{x:p*d,y:h*c}:{x:h*c,y:p*d}}(t,e);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},Zx=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=tx(e,t),c={x:n,y:r},d=await Tx(t,l),u=ax(nx(o)),h=ox(u);let p=c[h],f=c[u];if(i){const e="y"===h?"bottom":"right";p=ex(p+d["y"===h?"top":"left"],p,p-d[e])}if(s){const e="y"===u?"bottom":"right";f=ex(f+d["y"===u?"top":"left"],f,f-d[e])}const m=a.fn({...t,[h]:p,[u]:f});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[h]:i,[u]:s}}}}}},Jx=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...g}=tx(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const b=nx(o),v=ax(a),y=nx(a)===a,w=await(null==l.isRTL?void 0:l.isRTL(c.floating)),x=h||(y||!m?[mx(a)]:function(e){const t=mx(e);return[cx(e),t,cx(t)]}(a)),C="none"!==f;!h&&C&&x.push(...fx(a,m,f,w));const k=[a,...x],$=await Tx(t,g),S=[];let M=(null==(r=i.flip)?void 0:r.overflows)||[];if(d&&S.push($[b]),u){const e=function(e,t,n){void 0===n&&(n=!1);const r=rx(e),o=lx(e),i=ix(o);let s="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=mx(s)),[s,mx(s)]}(o,s,w);S.push($[e[0]],$[e[1]])}if(M=[...M,{placement:o,overflows:S}],!S.every((e=>e<=0))){var E,T;const e=((null==(E=i.flip)?void 0:E.index)||0)+1,t=k[e];if(t){if(!("alignment"===u&&v!==ax(t))||M.every((e=>ax(e.placement)!==v||e.overflows[0]>0)))return{data:{index:e,overflows:M},reset:{placement:t}}}let n=null==(T=M.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:T.placement;if(!n)switch(p){case"bestFit":{var O;const e=null==(O=M.filter((e=>{if(C){const t=ax(e.placement);return t===v||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:O[0];e&&(n=e);break}case"initialPlacement":n=a}if(o!==n)return{reset:{placement:n}}}return{}}}},Xx=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:d=0}=tx(e,t)||{};if(null==c)return{};const u=gx(d),h={x:n,y:r},p=lx(o),f=ix(p),m=await s.getDimensions(c),g="y"===p,b=g?"top":"left",v=g?"bottom":"right",y=g?"clientHeight":"clientWidth",w=i.reference[f]+i.reference[p]-h[p]-i.floating[f],x=h[p]-i.reference[p],C=await(null==s.getOffsetParent?void 0:s.getOffsetParent(c));let k=C?C[y]:0;k&&await(null==s.isElement?void 0:s.isElement(C))||(k=a.floating[y]||i.floating[f]);const $=w/2-x/2,S=k/2-m[f]/2-1,M=Kw(u[b],S),E=Kw(u[v],S),T=M,O=k-m[f]-E,L=k/2-m[f]/2+$,A=ex(T,L,O),N=!l.arrow&&null!=rx(o)&&L!==A&&i.reference[f]/2-(L<T?M:E)-m[f]/2<0,R=N?L<T?L-T:L-O:0;return{[p]:h[p]+R,data:{[p]:A,centerOffset:L-A-R,...N&&{alignmentOffset:R}},reset:N}}}),Yx=(e,t,n)=>{const r=new Map,o={platform:Wx,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:u}=Ex(c,r,l),h=r,p={},f=0;for(let n=0;n<a.length;n++){const{name:i,fn:m}=a[n],{x:g,y:b,data:v,reset:y}=await m({x:d,y:u,initialPlacement:r,placement:h,strategy:o,middlewareData:p,rects:c,platform:s,elements:{reference:e,floating:t}});d=null!=g?g:d,u=null!=b?b:u,p={...p,[i]:{...p[i],...v}},y&&f<=50&&(f++,"object"==typeof y&&(y.placement&&(h=y.placement),y.rects&&(c=!0===y.rects?await s.getElementRects({reference:e,floating:t,strategy:o}):y.rects),({x:d,y:u}=Ex(c,h,l))),n=-1)}return{x:d,y:u,placement:h,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})};var Qx="undefined"!=typeof document?de:function(){};function eC(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!eC(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!eC(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function tC(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function nC(e,t){const n=tC(e);return Math.round(t*n)/n}function rC(e){const t=ee.useRef(e);return Qx((()=>{t.current=e})),t}const oC=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?Xx({element:n.current,padding:r}).fn(t):{}:n?Xx({element:n,padding:r}).fn(t):{};var o}}),iC=(e,t)=>({...Gx(e),options:[e,t]}),sC=(e,t)=>({...Zx(e),options:[e,t]}),aC=(e,t)=>({...oC(e),options:[e,t]}),lC="data-floating-ui-focusable",cC="active",dC="selected",uC={...ee};let hC=!1,pC=0;const fC=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+pC++;const mC=uC.useId||function(){const[e,t]=ee.useState((()=>hC?fC():void 0));return $x((()=>{null==e&&t(fC())}),[]),ee.useEffect((()=>{hC=!0}),[]),e};let gC;"production"!==process.env.NODE_ENV&&(gC=new Set);const bC=ee.createContext(null),vC=ee.createContext(null),yC=()=>{var e;return(null==(e=ee.useContext(bC))?void 0:e.id)||null},wC=()=>ee.useContext(vC);const xC={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},CC={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},kC=e=>{var t,n;return{escapeKey:"boolean"==typeof e?e:null!=(t=null==e?void 0:e.escapeKey)&&t,outsidePress:"boolean"==typeof e?e:null==(n=null==e?void 0:e.outsidePress)||n}};function $C(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=mC(),i=ee.useRef({}),[s]=ee.useState((()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;null==(r=e.get(t))||r.delete(n)}}}())),a=null!=yC();if("production"!==process.env.NODE_ENV){const e=r.reference;e&&!Sw(e)&&function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");var i;null!=(e=gC)&&e.has(o)||(null==(i=gC)||i.add(o),console.error(o))}("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=ee.useState(r.reference),d=Mx(((e,t,r)=>{i.current.openEvent=e?t:void 0,s.emit("openchange",{open:e,event:t,reason:r,nested:a}),null==n||n(e,t,r)})),u=ee.useMemo((()=>({setPositionReference:c})),[]),h=ee.useMemo((()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference})),[l,r.reference,r.floating]);return ee.useMemo((()=>({dataRef:i,open:t,onOpenChange:d,elements:h,events:s,floatingId:o,refs:u})),[t,d,h,s,o,u])}function SC(e){void 0===e&&(e={});const{nodeId:t}=e,n=$C({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,s]=ee.useState(null),[a,l]=ee.useState(null),c=(null==o?void 0:o.domReference)||i,d=ee.useRef(null),u=wC();$x((()=>{c&&(d.current=c)}),[c]);const h=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[d,u]=ee.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=ee.useState(r);eC(h,r)||p(r);const[f,m]=ee.useState(null),[g,b]=ee.useState(null),v=ee.useCallback((e=>{e!==C.current&&(C.current=e,m(e))}),[]),y=ee.useCallback((e=>{e!==k.current&&(k.current=e,b(e))}),[]),w=i||f,x=s||g,C=ee.useRef(null),k=ee.useRef(null),$=ee.useRef(d),S=null!=l,M=rC(l),E=rC(o),T=rC(c),O=ee.useCallback((()=>{if(!C.current||!k.current)return;const e={placement:t,strategy:n,middleware:h};E.current&&(e.platform=E.current),Yx(C.current,k.current,e).then((e=>{const t={...e,isPositioned:!1!==T.current};L.current&&!eC($.current,t)&&($.current=t,we.flushSync((()=>{u(t)})))}))}),[h,t,n,E,T]);Qx((()=>{!1===c&&$.current.isPositioned&&($.current.isPositioned=!1,u((e=>({...e,isPositioned:!1}))))}),[c]);const L=ee.useRef(!1);Qx((()=>(L.current=!0,()=>{L.current=!1})),[]),Qx((()=>{if(w&&(C.current=w),x&&(k.current=x),w&&x){if(M.current)return M.current(w,x,O);O()}}),[w,x,O,M,S]);const A=ee.useMemo((()=>({reference:C,floating:k,setReference:v,setFloating:y})),[v,y]),N=ee.useMemo((()=>({reference:w,floating:x})),[w,x]),R=ee.useMemo((()=>{const e={position:n,left:0,top:0};if(!N.floating)return e;const t=nC(N.floating,d.x),r=nC(N.floating,d.y);return a?{...e,transform:"translate("+t+"px, "+r+"px)",...tC(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,a,N.floating,d.x,d.y]);return ee.useMemo((()=>({...d,update:O,refs:A,elements:N,floatingStyles:R})),[d,O,A,N,R])}({...e,elements:{...o,...a&&{reference:a}}}),p=ee.useCallback((e=>{const t=Sw(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;l(t),h.refs.setReference(t)}),[h.refs]),f=ee.useCallback((e=>{(Sw(e)||null===e)&&(d.current=e,s(e)),(Sw(h.refs.reference.current)||null===h.refs.reference.current||null!==e&&!Sw(e))&&h.refs.setReference(e)}),[h.refs]),m=ee.useMemo((()=>({...h.refs,setReference:f,setPositionReference:p,domReference:d})),[h.refs,f,p]),g=ee.useMemo((()=>({...h.elements,domReference:c})),[h.elements,c]),b=ee.useMemo((()=>({...h,...r,refs:m,elements:g,nodeId:t})),[h,m,g,t,r]);return $x((()=>{r.dataRef.current.floatingContext=b;const e=null==u?void 0:u.nodesRef.current.find((e=>e.id===t));e&&(e.context=b)})),ee.useMemo((()=>({...h,context:b,refs:m,elements:g})),[h,m,g,b])}function MC(e,t,n){const r=new Map,o="item"===n;let i=e;if(o&&e){const{[cC]:t,[dC]:n,...r}=e;i=r}return{..."floating"===n&&{tabIndex:-1,[lC]:""},...i,...t.map((t=>{const r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r})).concat(e).reduce(((e,t)=>t?(Object.entries(t).forEach((t=>{let[n,i]=t;var s;o&&[cC,dC].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof i&&(null==(s=r.get(n))||s.push(i),e[n]=function(){for(var e,t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return null==(e=r.get(n))?void 0:e.map((e=>e(...o))).find((e=>void 0!==e))})):e[n]=i)})),e):e),{})}}const EC=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function TC(e,t){var n,r;void 0===t&&(t={});const{open:o,elements:i,floatingId:s}=e,{enabled:a=!0,role:l="dialog"}=t,c=mC(),d=(null==(n=i.domReference)?void 0:n.id)||c,u=ee.useMemo((()=>{var e,t;return(null==(e=(t=i.floating)?t.hasAttribute(vx)?t:t.querySelector("["+vx+"]")||t:null)?void 0:e.id)||s}),[i.floating,s]),h=null!=(r=EC.get(l))?r:l,p=null!=yC(),f=ee.useMemo((()=>"tooltip"===h||"label"===l?{["aria-"+("label"===l?"labelledby":"describedby")]:o?u:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":"alertdialog"===h?"dialog":h,"aria-controls":o?u:void 0,..."listbox"===h&&{role:"combobox"},..."menu"===h&&{id:d},..."menu"===h&&p&&{role:"menuitem"},..."select"===l&&{"aria-autocomplete":"none"},..."combobox"===l&&{"aria-autocomplete":"list"}}),[h,u,p,o,d,l]),m=ee.useMemo((()=>{const e={id:u,...h&&{role:h}};return"tooltip"===h||"label"===l?e:{...e,..."menu"===h&&{"aria-labelledby":d}}}),[h,u,d,l]),g=ee.useCallback((e=>{let{active:t,selected:n}=e;const r={role:"option",...t&&{id:u+"-fui-option"}};switch(l){case"select":case"combobox":return{...r,"aria-selected":n}}return{}}),[u,l]);return ee.useMemo((()=>a?{reference:f,floating:m,item:g}:{}),[a,f,m,g])}const OC=e=>Ie("neutral","dark"===e?900:300),LC=e=>ke`
2213
+ `),"data-nav-source":K,onPointerMove:Z,children:[ve(L.Empty,{css:fw,children:A.noItemsFoundLabel}),V?be(L.Item,{css:pw,item:{label:I,value:z},children:[ve(Cg,{}),A.createOptionLabel(I)]},z):null,H.items.filter((e=>!vw(e.value))).map((e=>be(L.Item,{css:hw,item:e,children:[e.label,ve(L.ItemIndicator,{})]},e.value)))]})})}),p&&_.length>0?ve("div",{css:mw,children:_.map((e=>ve(_y,{label:e.label,variant:"info-white",onClose:()=>E(S.filter((t=>t!==e.value))),closable:!0},e.value)))}):null]})});var J};function ww(){return"undefined"!=typeof window}function xw(e){return $w(e)?(e.nodeName||"").toLowerCase():"#document"}function Cw(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function kw(e){var t;return null==(t=($w(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function $w(e){return!!ww()&&(e instanceof Node||e instanceof Cw(e).Node)}function Sw(e){return!!ww()&&(e instanceof Element||e instanceof Cw(e).Element)}function Mw(e){return!!ww()&&(e instanceof HTMLElement||e instanceof Cw(e).HTMLElement)}function Ew(e){return!(!ww()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Cw(e).ShadowRoot)}const Tw=new Set(["inline","contents"]);function Ow(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=_w(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Tw.has(o)}const Lw=new Set(["table","td","th"]);function Aw(e){return Lw.has(xw(e))}const Nw=[":popover-open",":modal"];function Rw(e){return Nw.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}const Dw=["transform","translate","scale","rotate","perspective"],Pw=["transform","translate","scale","rotate","perspective","filter"],Iw=["paint","layout","strict","content"];function zw(e){const t=Vw(),n=Sw(e)?_w(e):e;return Dw.some((e=>!!n[e]&&"none"!==n[e]))||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||Pw.some((e=>(n.willChange||"").includes(e)))||Iw.some((e=>(n.contain||"").includes(e)))}function Vw(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const Hw=new Set(["html","body","#document"]);function Bw(e){return Hw.has(xw(e))}function _w(e){return Cw(e).getComputedStyle(e)}function jw(e){return Sw(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Fw(e){if("html"===xw(e))return e;const t=e.assignedSlot||e.parentNode||Ew(e)&&e.host||kw(e);return Ew(t)?t.host:t}function qw(e){const t=Fw(e);return Bw(t)?e.ownerDocument?e.ownerDocument.body:e.body:Mw(t)&&Ow(t)?t:qw(t)}function Ww(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=qw(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),s=Cw(o);if(i){const e=Uw(s);return t.concat(s,s.visualViewport||[],Ow(o)?o:[],e&&n?Ww(e):[])}return t.concat(o,Ww(o,[],n))}function Uw(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Kw=Math.min,Gw=Math.max,Zw=Math.round,Jw=Math.floor,Xw=e=>({x:e,y:e}),Yw={left:"right",right:"left",bottom:"top",top:"bottom"},Qw={start:"end",end:"start"};function ex(e,t,n){return Gw(e,Kw(t,n))}function tx(e,t){return"function"==typeof e?e(t):e}function nx(e){return e.split("-")[0]}function rx(e){return e.split("-")[1]}function ox(e){return"x"===e?"y":"x"}function ix(e){return"y"===e?"height":"width"}const sx=new Set(["top","bottom"]);function ax(e){return sx.has(nx(e))?"y":"x"}function lx(e){return ox(ax(e))}function cx(e){return e.replace(/start|end/g,(e=>Qw[e]))}const dx=["left","right"],ux=["right","left"],hx=["top","bottom"],px=["bottom","top"];function fx(e,t,n,r){const o=rx(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?ux:dx:t?dx:ux;case"left":case"right":return t?hx:px;default:return[]}}(nx(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(cx)))),i}function mx(e){return e.replace(/left|right|bottom|top/g,(e=>Yw[e]))}function gx(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function bx(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}const vx="data-floating-ui-focusable";function yx(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Ew(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function wx(e){return"composedPath"in e?e.composedPath()[0]:e.target}function xx(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return null!=n.target&&t.contains(n.target)}function Cx(e){return(null==e?void 0:e.ownerDocument)||document}function kx(e,t,n){void 0===n&&(n=!0);return e.filter((e=>{var r;return e.parentId===t&&(!n||(null==(r=e.context)?void 0:r.open))})).flatMap((t=>[t,...kx(e,t.id,n)]))}var $x="undefined"!=typeof document?de:function(){};const Sx={...ee}.useInsertionEffect||(e=>e());function Mx(e){const t=ee.useRef((()=>{if("production"!==process.env.NODE_ENV)throw new Error("Cannot call an event handler while rendering.")}));return Sx((()=>{t.current=e})),ee.useCallback((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}function Ex(e,t,n){let{reference:r,floating:o}=e;const i=ax(t),s=lx(t),a=ix(s),l=nx(t),c="y"===i,d=r.x+r.width/2-o.width/2,u=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let p;switch(l){case"top":p={x:d,y:r.y-o.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:u};break;case"left":p={x:r.x-o.width,y:u};break;default:p={x:r.x,y:r.y}}switch(rx(t)){case"start":p[s]-=h*(n&&c?-1:1);break;case"end":p[s]+=h*(n&&c?-1:1)}return p}async function Tx(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:h=!1,padding:p=0}=tx(t,e),f=gx(p),m=a[h?"floating"===u?"reference":"floating":u],g=bx(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),b="floating"===u?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,v=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),y=await(null==i.isElement?void 0:i.isElement(v))&&await(null==i.getScale?void 0:i.getScale(v))||{x:1,y:1},w=bx(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:v,strategy:l}):b);return{top:(g.top-w.top+f.top)/y.y,bottom:(w.bottom-g.bottom+f.bottom)/y.y,left:(g.left-w.left+f.left)/y.x,right:(w.right-g.right+f.right)/y.x}}const Ox=new Set(["left","top"]);function Lx(e){const t=_w(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Mw(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Zw(n)!==i||Zw(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function Ax(e){return Sw(e)?e:e.contextElement}function Nx(e){const t=Ax(e);if(!Mw(t))return Xw(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Lx(t);let s=(i?Zw(n.width):n.width)/r,a=(i?Zw(n.height):n.height)/o;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const Rx=Xw(0);function Dx(e){const t=Cw(e);return Vw()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Rx}function Px(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=Ax(e);let s=Xw(1);t&&(r?Sw(r)&&(s=Nx(r)):s=Nx(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Cw(e))&&t}(i,n,r)?Dx(i):Xw(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,d=o.width/s.x,u=o.height/s.y;if(i){const e=Cw(i),t=r&&Sw(r)?Cw(r):r;let n=e,o=Uw(n);for(;o&&r&&t!==n;){const e=Nx(o),t=o.getBoundingClientRect(),r=_w(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,s=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,d*=e.x,u*=e.y,l+=i,c+=s,n=Cw(o),o=Uw(n)}}return bx({width:d,height:u,x:l,y:c})}function Ix(e,t){const n=jw(e).scrollLeft;return t?t.left+n:Px(kw(e)).left+n}function zx(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Ix(e,n),y:n.top+t.scrollTop}}const Vx=new Set(["absolute","fixed"]);function Hx(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Cw(e),r=kw(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const e=Vw();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,l=o.offsetTop)}const c=Ix(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,s=Math.abs(r.clientWidth-t.clientWidth-o);s<=25&&(i-=s)}else c<=25&&(i+=c);return{width:i,height:s,x:a,y:l}}(e,n);else if("document"===t)r=function(e){const t=kw(e),n=jw(e),r=e.ownerDocument.body,o=Gw(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Gw(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Ix(e);const a=-n.scrollTop;return"rtl"===_w(r).direction&&(s+=Gw(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}(kw(e));else if(Sw(t))r=function(e,t){const n=Px(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Mw(e)?Nx(e):Xw(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=Dx(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return bx(r)}function Bx(e,t){const n=Fw(e);return!(n===t||!Sw(n)||Bw(n))&&("fixed"===_w(n).position||Bx(n,t))}function _x(e,t,n){const r=Mw(t),o=kw(t),i="fixed"===n,s=Px(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Xw(0);function c(){l.x=Ix(o)}if(r||!r&&!i)if(("body"!==xw(t)||Ow(o))&&(a=jw(t)),r){const e=Px(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&c();i&&!r&&o&&c();const d=!o||r||i?Xw(0):zx(o,a);return{x:s.left+a.scrollLeft-l.x-d.x,y:s.top+a.scrollTop-l.y-d.y,width:s.width,height:s.height}}function jx(e){return"static"===_w(e).position}function Fx(e,t){if(!Mw(e)||"fixed"===_w(e).position)return null;if(t)return t(e);let n=e.offsetParent;return kw(e)===n&&(n=n.ownerDocument.body),n}function qx(e,t){const n=Cw(e);if(Rw(e))return n;if(!Mw(e)){let t=Fw(e);for(;t&&!Bw(t);){if(Sw(t)&&!jx(t))return t;t=Fw(t)}return n}let r=Fx(e,t);for(;r&&Aw(r)&&jx(r);)r=Fx(r,t);return r&&Bw(r)&&jx(r)&&!zw(r)?n:r||function(e){let t=Fw(e);for(;Mw(t)&&!Bw(t);){if(zw(t))return t;if(Rw(t))return null;t=Fw(t)}return null}(e)||n}const Wx={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,s=kw(r),a=!!t&&Rw(t.floating);if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Xw(1);const d=Xw(0),u=Mw(r);if((u||!u&&!i)&&(("body"!==xw(r)||Ow(s))&&(l=jw(r)),Mw(r))){const e=Px(r);c=Nx(r),d.x=e.x+r.clientLeft,d.y=e.y+r.clientTop}const h=!s||u||i?Xw(0):zx(s,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+h.x,y:n.y*c.y-l.scrollTop*c.y+d.y+h.y}},getDocumentElement:kw,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?Rw(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Ww(e,[],!1).filter((e=>Sw(e)&&"body"!==xw(e))),o=null;const i="fixed"===_w(e).position;let s=i?Fw(e):e;for(;Sw(s)&&!Bw(s);){const t=_w(s),n=zw(s);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&Vx.has(o.position)||Ow(s)&&!n&&Bx(e,s))?r=r.filter((e=>e!==s)):o=t,s=Fw(s)}return t.set(e,r),r}(t,this._c):[].concat(n),s=[...i,r],a=s[0],l=s.reduce(((e,n)=>{const r=Hx(t,n,o);return e.top=Gw(r.top,e.top),e.right=Kw(r.right,e.right),e.bottom=Kw(r.bottom,e.bottom),e.left=Gw(r.left,e.left),e}),Hx(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:qx,getElementRects:async function(e){const t=this.getOffsetParent||qx,n=this.getDimensions,r=await n(e.floating);return{reference:_x(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Lx(e);return{width:t,height:n}},getScale:Nx,isElement:Sw,isRTL:function(e){return"rtl"===_w(e).direction}};function Ux(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Kx(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=Ax(e),d=o||i?[...c?Ww(c):[],...Ww(t)]:[];d.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const u=c&&a?function(e,t){let n,r=null;const o=kw(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),i();const c=e.getBoundingClientRect(),{left:d,top:u,width:h,height:p}=c;if(a||t(),!h||!p)return;const f={rootMargin:-Jw(u)+"px "+-Jw(o.clientWidth-(d+h))+"px "+-Jw(o.clientHeight-(u+p))+"px "+-Jw(d)+"px",threshold:Gw(0,Kw(1,l))||1};let m=!0;function g(t){const r=t[0].intersectionRatio;if(r!==l){if(!m)return s();r?s(!1,r):n=setTimeout((()=>{s(!1,1e-7)}),1e3)}1!==r||Ux(c,e.getBoundingClientRect())||s(),m=!1}try{r=new IntersectionObserver(g,{...f,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,f)}r.observe(e)}(!0),i}(c,n):null;let h,p=-1,f=null;s&&(f=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=f)||e.observe(t)}))),n()})),c&&!l&&f.observe(c),f.observe(t));let m=l?Px(e):null;return l&&function t(){const r=Px(e);m&&!Ux(m,r)&&n();m=r,h=requestAnimationFrame(t)}(),n(),()=>{var e;d.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==u||u(),null==(e=f)||e.disconnect(),f=null,l&&cancelAnimationFrame(h)}}const Gx=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),s=nx(n),a=rx(n),l="y"===ax(n),c=Ox.has(s)?-1:1,d=i&&l?-1:1,u=tx(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:f}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&"number"==typeof f&&(p="end"===a?-1*f:f),l?{x:p*d,y:h*c}:{x:h*c,y:p*d}}(t,e);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},Zx=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=tx(e,t),c={x:n,y:r},d=await Tx(t,l),u=ax(nx(o)),h=ox(u);let p=c[h],f=c[u];if(i){const e="y"===h?"bottom":"right";p=ex(p+d["y"===h?"top":"left"],p,p-d[e])}if(s){const e="y"===u?"bottom":"right";f=ex(f+d["y"===u?"top":"left"],f,f-d[e])}const m=a.fn({...t,[h]:p,[u]:f});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[h]:i,[u]:s}}}}}},Jx=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...g}=tx(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const b=nx(o),v=ax(a),y=nx(a)===a,w=await(null==l.isRTL?void 0:l.isRTL(c.floating)),x=h||(y||!m?[mx(a)]:function(e){const t=mx(e);return[cx(e),t,cx(t)]}(a)),C="none"!==f;!h&&C&&x.push(...fx(a,m,f,w));const k=[a,...x],$=await Tx(t,g),S=[];let M=(null==(r=i.flip)?void 0:r.overflows)||[];if(d&&S.push($[b]),u){const e=function(e,t,n){void 0===n&&(n=!1);const r=rx(e),o=lx(e),i=ix(o);let s="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=mx(s)),[s,mx(s)]}(o,s,w);S.push($[e[0]],$[e[1]])}if(M=[...M,{placement:o,overflows:S}],!S.every((e=>e<=0))){var E,T;const e=((null==(E=i.flip)?void 0:E.index)||0)+1,t=k[e];if(t){if(!("alignment"===u&&v!==ax(t))||M.every((e=>ax(e.placement)!==v||e.overflows[0]>0)))return{data:{index:e,overflows:M},reset:{placement:t}}}let n=null==(T=M.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:T.placement;if(!n)switch(p){case"bestFit":{var O;const e=null==(O=M.filter((e=>{if(C){const t=ax(e.placement);return t===v||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:O[0];e&&(n=e);break}case"initialPlacement":n=a}if(o!==n)return{reset:{placement:n}}}return{}}}},Xx=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:d=0}=tx(e,t)||{};if(null==c)return{};const u=gx(d),h={x:n,y:r},p=lx(o),f=ix(p),m=await s.getDimensions(c),g="y"===p,b=g?"top":"left",v=g?"bottom":"right",y=g?"clientHeight":"clientWidth",w=i.reference[f]+i.reference[p]-h[p]-i.floating[f],x=h[p]-i.reference[p],C=await(null==s.getOffsetParent?void 0:s.getOffsetParent(c));let k=C?C[y]:0;k&&await(null==s.isElement?void 0:s.isElement(C))||(k=a.floating[y]||i.floating[f]);const $=w/2-x/2,S=k/2-m[f]/2-1,M=Kw(u[b],S),E=Kw(u[v],S),T=M,O=k-m[f]-E,L=k/2-m[f]/2+$,A=ex(T,L,O),N=!l.arrow&&null!=rx(o)&&L!==A&&i.reference[f]/2-(L<T?M:E)-m[f]/2<0,R=N?L<T?L-T:L-O:0;return{[p]:h[p]+R,data:{[p]:A,centerOffset:L-A-R,...N&&{alignmentOffset:R}},reset:N}}}),Yx=(e,t,n)=>{const r=new Map,o={platform:Wx,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:u}=Ex(c,r,l),h=r,p={},f=0;for(let n=0;n<a.length;n++){const{name:i,fn:m}=a[n],{x:g,y:b,data:v,reset:y}=await m({x:d,y:u,initialPlacement:r,placement:h,strategy:o,middlewareData:p,rects:c,platform:s,elements:{reference:e,floating:t}});d=null!=g?g:d,u=null!=b?b:u,p={...p,[i]:{...p[i],...v}},y&&f<=50&&(f++,"object"==typeof y&&(y.placement&&(h=y.placement),y.rects&&(c=!0===y.rects?await s.getElementRects({reference:e,floating:t,strategy:o}):y.rects),({x:d,y:u}=Ex(c,h,l))),n=-1)}return{x:d,y:u,placement:h,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})};var Qx="undefined"!=typeof document?de:function(){};function eC(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!eC(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!eC(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function tC(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function nC(e,t){const n=tC(e);return Math.round(t*n)/n}function rC(e){const t=ee.useRef(e);return Qx((()=>{t.current=e})),t}const oC=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?Xx({element:n.current,padding:r}).fn(t):{}:n?Xx({element:n,padding:r}).fn(t):{};var o}}),iC=(e,t)=>({...Gx(e),options:[e,t]}),sC=(e,t)=>({...Zx(e),options:[e,t]}),aC=(e,t)=>({...oC(e),options:[e,t]}),lC="data-floating-ui-focusable",cC="active",dC="selected",uC={...ee};let hC=!1,pC=0;const fC=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+pC++;const mC=uC.useId||function(){const[e,t]=ee.useState((()=>hC?fC():void 0));return $x((()=>{null==e&&t(fC())}),[]),ee.useEffect((()=>{hC=!0}),[]),e};let gC;"production"!==process.env.NODE_ENV&&(gC=new Set);const bC=ee.createContext(null),vC=ee.createContext(null),yC=()=>{var e;return(null==(e=ee.useContext(bC))?void 0:e.id)||null},wC=()=>ee.useContext(vC);const xC={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},CC={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},kC=e=>{var t,n;return{escapeKey:"boolean"==typeof e?e:null!=(t=null==e?void 0:e.escapeKey)&&t,outsidePress:"boolean"==typeof e?e:null==(n=null==e?void 0:e.outsidePress)||n}};function $C(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=mC(),i=ee.useRef({}),[s]=ee.useState((()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;null==(r=e.get(t))||r.delete(n)}}}())),a=null!=yC();if("production"!==process.env.NODE_ENV){const e=r.reference;e&&!Sw(e)&&function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");var i;null!=(e=gC)&&e.has(o)||(null==(i=gC)||i.add(o),console.error(o))}("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=ee.useState(r.reference),d=Mx(((e,t,r)=>{i.current.openEvent=e?t:void 0,s.emit("openchange",{open:e,event:t,reason:r,nested:a}),null==n||n(e,t,r)})),u=ee.useMemo((()=>({setPositionReference:c})),[]),h=ee.useMemo((()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference})),[l,r.reference,r.floating]);return ee.useMemo((()=>({dataRef:i,open:t,onOpenChange:d,elements:h,events:s,floatingId:o,refs:u})),[t,d,h,s,o,u])}function SC(e){void 0===e&&(e={});const{nodeId:t}=e,n=$C({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,s]=ee.useState(null),[a,l]=ee.useState(null),c=(null==o?void 0:o.domReference)||i,d=ee.useRef(null),u=wC();$x((()=>{c&&(d.current=c)}),[c]);const h=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[d,u]=ee.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=ee.useState(r);eC(h,r)||p(r);const[f,m]=ee.useState(null),[g,b]=ee.useState(null),v=ee.useCallback((e=>{e!==C.current&&(C.current=e,m(e))}),[]),y=ee.useCallback((e=>{e!==k.current&&(k.current=e,b(e))}),[]),w=i||f,x=s||g,C=ee.useRef(null),k=ee.useRef(null),$=ee.useRef(d),S=null!=l,M=rC(l),E=rC(o),T=rC(c),O=ee.useCallback((()=>{if(!C.current||!k.current)return;const e={placement:t,strategy:n,middleware:h};E.current&&(e.platform=E.current),Yx(C.current,k.current,e).then((e=>{const t={...e,isPositioned:!1!==T.current};L.current&&!eC($.current,t)&&($.current=t,we.flushSync((()=>{u(t)})))}))}),[h,t,n,E,T]);Qx((()=>{!1===c&&$.current.isPositioned&&($.current.isPositioned=!1,u((e=>({...e,isPositioned:!1}))))}),[c]);const L=ee.useRef(!1);Qx((()=>(L.current=!0,()=>{L.current=!1})),[]),Qx((()=>{if(w&&(C.current=w),x&&(k.current=x),w&&x){if(M.current)return M.current(w,x,O);O()}}),[w,x,O,M,S]);const A=ee.useMemo((()=>({reference:C,floating:k,setReference:v,setFloating:y})),[v,y]),N=ee.useMemo((()=>({reference:w,floating:x})),[w,x]),R=ee.useMemo((()=>{const e={position:n,left:0,top:0};if(!N.floating)return e;const t=nC(N.floating,d.x),r=nC(N.floating,d.y);return a?{...e,transform:"translate("+t+"px, "+r+"px)",...tC(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,a,N.floating,d.x,d.y]);return ee.useMemo((()=>({...d,update:O,refs:A,elements:N,floatingStyles:R})),[d,O,A,N,R])}({...e,elements:{...o,...a&&{reference:a}}}),p=ee.useCallback((e=>{const t=Sw(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;l(t),h.refs.setReference(t)}),[h.refs]),f=ee.useCallback((e=>{(Sw(e)||null===e)&&(d.current=e,s(e)),(Sw(h.refs.reference.current)||null===h.refs.reference.current||null!==e&&!Sw(e))&&h.refs.setReference(e)}),[h.refs]),m=ee.useMemo((()=>({...h.refs,setReference:f,setPositionReference:p,domReference:d})),[h.refs,f,p]),g=ee.useMemo((()=>({...h.elements,domReference:c})),[h.elements,c]),b=ee.useMemo((()=>({...h,...r,refs:m,elements:g,nodeId:t})),[h,m,g,t,r]);return $x((()=>{r.dataRef.current.floatingContext=b;const e=null==u?void 0:u.nodesRef.current.find((e=>e.id===t));e&&(e.context=b)})),ee.useMemo((()=>({...h,context:b,refs:m,elements:g})),[h,m,g,b])}function MC(e,t,n){const r=new Map,o="item"===n;let i=e;if(o&&e){const{[cC]:t,[dC]:n,...r}=e;i=r}return{..."floating"===n&&{tabIndex:-1,[lC]:""},...i,...t.map((t=>{const r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r})).concat(e).reduce(((e,t)=>t?(Object.entries(t).forEach((t=>{let[n,i]=t;var s;o&&[cC,dC].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof i&&(null==(s=r.get(n))||s.push(i),e[n]=function(){for(var e,t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return null==(e=r.get(n))?void 0:e.map((e=>e(...o))).find((e=>void 0!==e))})):e[n]=i)})),e):e),{})}}const EC=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function TC(e,t){var n,r;void 0===t&&(t={});const{open:o,elements:i,floatingId:s}=e,{enabled:a=!0,role:l="dialog"}=t,c=mC(),d=(null==(n=i.domReference)?void 0:n.id)||c,u=ee.useMemo((()=>{var e,t;return(null==(e=(t=i.floating)?t.hasAttribute(vx)?t:t.querySelector("["+vx+"]")||t:null)?void 0:e.id)||s}),[i.floating,s]),h=null!=(r=EC.get(l))?r:l,p=null!=yC(),f=ee.useMemo((()=>"tooltip"===h||"label"===l?{["aria-"+("label"===l?"labelledby":"describedby")]:o?u:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":"alertdialog"===h?"dialog":h,"aria-controls":o?u:void 0,..."listbox"===h&&{role:"combobox"},..."menu"===h&&{id:d},..."menu"===h&&p&&{role:"menuitem"},..."select"===l&&{"aria-autocomplete":"none"},..."combobox"===l&&{"aria-autocomplete":"list"}}),[h,u,p,o,d,l]),m=ee.useMemo((()=>{const e={id:u,...h&&{role:h}};return"tooltip"===h||"label"===l?e:{...e,..."menu"===h&&{"aria-labelledby":d}}}),[h,u,d,l]),g=ee.useCallback((e=>{let{active:t,selected:n}=e;const r={role:"option",...t&&{id:u+"-fui-option"}};switch(l){case"select":case"combobox":return{...r,"aria-selected":n}}return{}}),[u,l]);return ee.useMemo((()=>a?{reference:f,floating:m,item:g}:{}),[a,f,m,g])}const OC=e=>Ie("neutral","dark"===e?900:300),LC=e=>ke`
2212
2214
  height: auto;
2213
2215
  max-height: 32rem;
2214
2216
  width: 100%;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@worldresources/wri-design-systems",
3
- "version": "2.211.2",
3
+ "version": "2.211.3",
4
4
  "description": "WRI UI Library",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",