@scattered-light/loomiere-base-ui 0.6.0 → 0.6.1
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/design-system/components/bundle.js +1 -1
- package/dist/design-system/components/styles.css +42 -42
- package/dist/styles/components/Accordion.css +1 -1
- package/dist/styles/components/AlertDialog.css +1 -1
- package/dist/styles/components/Autocomplete.css +1 -1
- package/dist/styles/components/Avatar.css +1 -1
- package/dist/styles/components/Button.css +1 -1
- package/dist/styles/components/Checkbox.css +1 -1
- package/dist/styles/components/CheckboxGroup.css +1 -1
- package/dist/styles/components/Collapsible.css +1 -1
- package/dist/styles/components/Combobox.css +1 -1
- package/dist/styles/components/ContextMenu.css +1 -1
- package/dist/styles/components/Dialog.css +1 -1
- package/dist/styles/components/Drawer.css +1 -1
- package/dist/styles/components/Field.css +1 -1
- package/dist/styles/components/Fieldset.css +1 -1
- package/dist/styles/components/Form.css +1 -1
- package/dist/styles/components/Input.css +1 -1
- package/dist/styles/components/Menu.css +1 -1
- package/dist/styles/components/Menubar.css +1 -1
- package/dist/styles/components/Meter.css +1 -1
- package/dist/styles/components/NavigationMenu.css +1 -1
- package/dist/styles/components/NumberField.css +1 -1
- package/dist/styles/components/OTPField.css +1 -1
- package/dist/styles/components/Popover.css +1 -1
- package/dist/styles/components/PreviewCard.css +1 -1
- package/dist/styles/components/Progress.css +1 -1
- package/dist/styles/components/Radio.css +1 -1
- package/dist/styles/components/ScrollArea.css +1 -1
- package/dist/styles/components/Select.css +1 -1
- package/dist/styles/components/Separator.css +1 -1
- package/dist/styles/components/Slider.css +1 -1
- package/dist/styles/components/Switch.css +1 -1
- package/dist/styles/components/Table.css +1 -1
- package/dist/styles/components/Tabs.css +1 -1
- package/dist/styles/components/Toast.css +1 -1
- package/dist/styles/components/Toggle.css +1 -1
- package/dist/styles/components/ToggleGroup.css +1 -1
- package/dist/styles/components/Toolbar.css +1 -1
- package/dist/styles/components/Tooltip.css +1 -1
- package/dist/styles/index.css +1 -1
- package/dist/styles/reset/accessibility.css +1 -1
- package/dist/styles/reset/reset-accessibility.css +1 -1
- package/dist/styles/reset/reset-tailwind.css +1 -1
- package/dist/styles/reset/reset.css +1 -1
- package/dist/styles/tailwind.css +1 -1
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* @ds-bundle: {"format":4,"namespace":"Loomiere","components":[{"name":"Accordion"},{"name":"AlertDialog"},{"name":"Autocomplete"},{"name":"Avatar"},{"name":"Button"},{"name":"Checkbox"},{"name":"CheckboxGroup"},{"name":"Collapsible"},{"name":"Combobox"},{"name":"ContextMenu"},{"name":"Dialog"},{"name":"Drawer"},{"name":"Field"},{"name":"Fieldset"},{"name":"Form"},{"name":"Input"},{"name":"Menu"},{"name":"Menubar"},{"name":"Meter"},{"name":"NavigationMenu"},{"name":"NumberField"},{"name":"OTPField"},{"name":"Popover"},{"name":"PreviewCard"},{"name":"Progress"},{"name":"Radio"},{"name":"ScrollArea"},{"name":"Select"},{"name":"Separator"},{"name":"Slider"},{"name":"Switch"},{"name":"Table"},{"name":"Tabs"},{"name":"Toast"},{"name":"Toggle"},{"name":"ToggleGroup"},{"name":"Toolbar"},{"name":"Tooltip"}]} */
|
|
2
|
-
/* @scattered-light/loomiere-base-ui 0.6.
|
|
2
|
+
/* @scattered-light/loomiere-base-ui 0.6.1 with @base-ui/react 1.9.0. window.Loomiere: Accordion, AccordionHeaderDataAttributes, AccordionItemDataAttributes, AccordionPanelCssVariables, AccordionPanelDataAttributes, AccordionRootDataAttributes, AccordionTriggerDataAttributes, AlertDialog, AlertDialogBackdropDataAttributes, AlertDialogCloseDataAttributes, AlertDialogPopupCssVariables, AlertDialogPopupDataAttributes, AlertDialogTriggerDataAttributes, AlertDialogViewportDataAttributes, Autocomplete, AutocompleteArrowDataAttributes, AutocompleteBackdropDataAttributes, AutocompleteClearDataAttributes, AutocompleteInputDataAttributes, AutocompleteInputGroupDataAttributes, AutocompleteItemDataAttributes, AutocompletePopupDataAttributes, AutocompletePositionerCssVariables, AutocompletePositionerDataAttributes, AutocompleteSeparatorDataAttributes, AutocompleteTriggerDataAttributes, Avatar, AvatarImageDataAttributes, Button, ButtonDataAttributes, CSPProvider, Checkbox, CheckboxGroup, CheckboxGroupDataAttributes, CheckboxIndicatorDataAttributes, CheckboxRootDataAttributes, Collapsible, CollapsiblePanelCssVariables, CollapsiblePanelDataAttributes, CollapsibleRootDataAttributes, CollapsibleTriggerDataAttributes, Combobox, ComboboxArrowDataAttributes, ComboboxBackdropDataAttributes, ComboboxClearDataAttributes, ComboboxInputDataAttributes, ComboboxInputGroupDataAttributes, ComboboxItemDataAttributes, ComboboxItemIndicatorDataAttributes, ComboboxPopupDataAttributes, ComboboxPositionerCssVariables, ComboboxPositionerDataAttributes, ComboboxSeparatorDataAttributes, ComboboxTriggerDataAttributes, ContextMenu, ContextMenuArrowDataAttributes, ContextMenuBackdropDataAttributes, ContextMenuCheckboxItemDataAttributes, ContextMenuCheckboxItemIndicatorDataAttributes, ContextMenuItemDataAttributes, ContextMenuLinkItemDataAttributes, ContextMenuPopupDataAttributes, ContextMenuPositionerCssVariables, ContextMenuPositionerDataAttributes, ContextMenuRadioItemDataAttributes, ContextMenuRadioItemIndicatorDataAttributes, ContextMenuSeparatorDataAttributes, ContextMenuSubmenuTriggerDataAttributes, ContextMenuTriggerDataAttributes, Dialog, DialogBackdropDataAttributes, DialogCloseDataAttributes, DialogPopupCssVariables, DialogPopupDataAttributes, DialogTriggerDataAttributes, DialogViewportDataAttributes, DirectionProvider, Drawer, DrawerBackdropCssVariables, DrawerBackdropDataAttributes, DrawerCloseDataAttributes, DrawerPopupCssVariables, DrawerPopupDataAttributes, DrawerSwipeAreaDataAttributes, DrawerTriggerDataAttributes, DrawerViewportCssVariables, DrawerViewportDataAttributes, Field, FieldControlDataAttributes, FieldDescriptionDataAttributes, FieldErrorDataAttributes, FieldItemDataAttributes, FieldLabelDataAttributes, FieldRootDataAttributes, Fieldset, FieldsetLegendDataAttributes, Form, Input, InputDataAttributes, MaterialSymbol, Menu, MenuArrowDataAttributes, MenuBackdropDataAttributes, MenuCheckboxItemDataAttributes, MenuCheckboxItemIndicatorDataAttributes, MenuClearDataAttributes, MenuInputDataAttributes, MenuItemDataAttributes, MenuLinkItemDataAttributes, MenuPopupDataAttributes, MenuPositionerCssVariables, MenuPositionerDataAttributes, MenuRadioItemDataAttributes, MenuRadioItemIndicatorDataAttributes, MenuSeparatorDataAttributes, MenuSubmenuTriggerDataAttributes, MenuTriggerDataAttributes, MenuViewportCssVariables, MenuViewportDataAttributes, Menubar, MenubarDataAttributes, Meter, NavigationMenu, NavigationMenuArrowDataAttributes, NavigationMenuBackdropDataAttributes, NavigationMenuContentDataAttributes, NavigationMenuIconDataAttributes, NavigationMenuLinkDataAttributes, NavigationMenuPopupCssVariables, NavigationMenuPopupDataAttributes, NavigationMenuPositionerCssVariables, NavigationMenuPositionerDataAttributes, NavigationMenuTriggerDataAttributes, NumberField, NumberFieldDecrementDataAttributes, NumberFieldGroupDataAttributes, NumberFieldIncrementDataAttributes, NumberFieldInputDataAttributes, NumberFieldRootDataAttributes, NumberFieldScrubAreaCursorDataAttributes, NumberFieldScrubAreaDataAttributes, OTPField, OTPFieldInputDataAttributes, OTPFieldRootDataAttributes, OTPFieldSeparatorDataAttributes, Popover, PopoverArrowDataAttributes, PopoverBackdropDataAttributes, PopoverPopupCssVariables, PopoverPopupDataAttributes, PopoverPositionerCssVariables, PopoverPositionerDataAttributes, PopoverTriggerDataAttributes, PopoverViewportCssVariables, PopoverViewportDataAttributes, PreviewCard, PreviewCardArrowDataAttributes, PreviewCardBackdropDataAttributes, PreviewCardPopupDataAttributes, PreviewCardPositionerCssVariables, PreviewCardPositionerDataAttributes, PreviewCardTriggerDataAttributes, PreviewCardViewportCssVariables, PreviewCardViewportDataAttributes, Progress, ProgressIndicatorDataAttributes, ProgressLabelDataAttributes, ProgressRootDataAttributes, ProgressTrackDataAttributes, ProgressValueDataAttributes, Radio, RadioGroup, RadioGroupDataAttributes, RadioIndicatorDataAttributes, RadioRootDataAttributes, ScrollArea, ScrollAreaContentDataAttributes, ScrollAreaRootCssVariables, ScrollAreaRootDataAttributes, ScrollAreaScrollbarCssVariables, ScrollAreaScrollbarDataAttributes, ScrollAreaThumbDataAttributes, ScrollAreaViewportCssVariables, ScrollAreaViewportDataAttributes, Select, SelectArrowDataAttributes, SelectBackdropDataAttributes, SelectIconDataAttributes, SelectItemDataAttributes, SelectItemIndicatorDataAttributes, SelectPopupDataAttributes, SelectPositionerCssVariables, SelectPositionerDataAttributes, SelectScrollDownArrowDataAttributes, SelectScrollUpArrowDataAttributes, SelectSeparatorDataAttributes, SelectTriggerDataAttributes, SelectValueDataAttributes, Separator, SeparatorDataAttributes, Slider, SliderControlDataAttributes, SliderIndicatorDataAttributes, SliderRootDataAttributes, SliderThumbDataAttributes, SliderTrackDataAttributes, SliderValueDataAttributes, Switch, SwitchRootDataAttributes, SwitchThumbDataAttributes, Tabs, TabsIndicatorCssVariables, TabsIndicatorDataAttributes, TabsListDataAttributes, TabsPanelDataAttributes, TabsRootDataAttributes, TabsTabDataAttributes, Toast, ToastActionDataAttributes, ToastArrowDataAttributes, ToastCloseDataAttributes, ToastContentDataAttributes, ToastDescriptionDataAttributes, ToastPositionerCssVariables, ToastPositionerDataAttributes, ToastRootCssVariables, ToastRootDataAttributes, ToastTitleDataAttributes, ToastViewportCssVariables, ToastViewportDataAttributes, Toggle, ToggleDataAttributes, ToggleGroup, ToggleGroupDataAttributes, Toolbar, ToolbarButtonDataAttributes, ToolbarGroupDataAttributes, ToolbarInputDataAttributes, ToolbarLinkDataAttributes, ToolbarRootDataAttributes, ToolbarSeparatorDataAttributes, Tooltip, TooltipArrowDataAttributes, TooltipPopupDataAttributes, TooltipPositionerCssVariables, TooltipPositionerDataAttributes, TooltipTriggerDataAttributes, TooltipViewportCssVariables, TooltipViewportDataAttributes; Loomiere.Base holds the bare Base UI parts. */
|
|
3
3
|
(()=>{var Q0=Object.create;var cf=Object.defineProperty;var Z0=Object.getOwnPropertyDescriptor;var eB=Object.getOwnPropertyNames;var tB=Object.getPrototypeOf,oB=Object.prototype.hasOwnProperty;var rB=(e,t,o)=>t in e?cf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var Tc=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ae=(e,t)=>{for(var o in t)cf(e,o,{get:t[o],enumerable:!0})},nB=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of eB(t))!oB.call(e,n)&&n!==o&&cf(e,n,{get:()=>t[n],enumerable:!(r=Z0(t,n))||r.enumerable});return e};var T=(e,t,o)=>(o=e!=null?Q0(tB(e)):{},nB(t||!e||!e.__esModule?cf(o,"default",{value:e,enumerable:!0}):o,e));var ot=(e,t,o)=>rB(e,typeof t!="symbol"?t+"":t,o);var M=Tc((yee,OT)=>{OT.exports=window.React});var $o=Tc((qoe,lw)=>{lw.exports=window.ReactDOM});var cI=Tc(aI=>{"use strict";var _c=M();function L1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var k1=typeof Object.is=="function"?Object.is:L1,_1=_c.useState,B1=_c.useEffect,H1=_c.useLayoutEffect,U1=_c.useDebugValue;function G1(e,t){var o=t(),r=_1({inst:{value:o,getSnapshot:t}}),n=r[0].inst,s=r[1];return H1(function(){n.value=o,n.getSnapshot=t,jb(n)&&s({inst:n})},[e,o,t]),B1(function(){return jb(n)&&s({inst:n}),e(function(){jb(n)&&s({inst:n})})},[e]),U1(o),o}function jb(e){var t=e.getSnapshot;e=e.value;try{var o=t();return!k1(e,o)}catch{return!0}}function W1(e,t){return t()}var j1=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?W1:G1;aI.useSyncExternalStore=_c.useSyncExternalStore!==void 0?_c.useSyncExternalStore:j1});var Vu=Tc((eae,lI)=>{"use strict";lI.exports=cI()});var pI=Tc(uI=>{"use strict";var ld=M(),Y1=Vu();function K1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var z1=typeof Object.is=="function"?Object.is:K1,$1=Y1.useSyncExternalStore,X1=ld.useRef,q1=ld.useEffect,J1=ld.useMemo,Q1=ld.useDebugValue;uI.useSyncExternalStoreWithSelector=function(e,t,o,r,n){var s=X1(null);if(s.current===null){var i={hasValue:!1,value:null};s.current=i}else i=s.current;s=J1(function(){function a(m){if(!c){if(c=!0,u=m,m=r(m),n!==void 0&&i.hasValue){var d=i.value;if(n(d,m))return p=d}return p=m}if(d=p,z1(u,m))return d;var R=r(m);return n!==void 0&&n(d,R)?(u=m,d):(u=m,p=R)}var c=!1,u,p,f=o===void 0?null:o;return[function(){return a(t())},f===null?void 0:function(){return a(f())}]},[t,o,r,n]);var l=$1(e,s[0],s[1]);return q1(function(){i.hasValue=!0,i.value=l},[l]),Q1(l),l}});var dI=Tc((oae,fI)=>{"use strict";fI.exports=pI()});var _P={};ae(_P,{Accordion:()=>Zs,AccordionHeaderDataAttributes:()=>lb,AccordionItemDataAttributes:()=>wf,AccordionPanelCssVariables:()=>_f,AccordionPanelDataAttributes:()=>pb,AccordionRootDataAttributes:()=>cb,AccordionTriggerDataAttributes:()=>ub,AlertDialog:()=>Lr,AlertDialogBackdropDataAttributes:()=>Dd,AlertDialogCloseDataAttributes:()=>Ku,AlertDialogPopupCssVariables:()=>Hu,AlertDialogPopupDataAttributes:()=>Uu,AlertDialogTriggerDataAttributes:()=>xC,AlertDialogViewportDataAttributes:()=>zu,Autocomplete:()=>Zt,AutocompleteArrowDataAttributes:()=>Vm,AutocompleteBackdropDataAttributes:()=>Dm,AutocompleteClearDataAttributes:()=>KC,AutocompleteInputDataAttributes:()=>ep,AutocompleteInputGroupDataAttributes:()=>jC,AutocompleteItemDataAttributes:()=>XC,AutocompletePopupDataAttributes:()=>Om,AutocompletePositionerCssVariables:()=>Nm,AutocompletePositionerDataAttributes:()=>Am,AutocompleteSeparatorDataAttributes:()=>ai,AutocompleteTriggerDataAttributes:()=>WC,Avatar:()=>rc,AvatarImageDataAttributes:()=>JC,Button:()=>_m,ButtonDataAttributes:()=>QC,CSPProvider:()=>Jy,Checkbox:()=>hl,CheckboxGroup:()=>Ym,CheckboxGroupDataAttributes:()=>ay,CheckboxIndicatorDataAttributes:()=>ny,CheckboxRootDataAttributes:()=>Bm,Collapsible:()=>sc,CollapsiblePanelCssVariables:()=>zm,CollapsiblePanelDataAttributes:()=>du,CollapsibleRootDataAttributes:()=>py,CollapsibleTriggerDataAttributes:()=>Sf,Combobox:()=>Ut,ComboboxArrowDataAttributes:()=>Vm,ComboboxBackdropDataAttributes:()=>Dm,ComboboxClearDataAttributes:()=>YC,ComboboxInputDataAttributes:()=>ep,ComboboxInputGroupDataAttributes:()=>xy,ComboboxItemDataAttributes:()=>Fm,ComboboxItemIndicatorDataAttributes:()=>hy,ComboboxPopupDataAttributes:()=>Om,ComboboxPositionerCssVariables:()=>Nm,ComboboxPositionerDataAttributes:()=>Am,ComboboxSeparatorDataAttributes:()=>ai,ComboboxTriggerDataAttributes:()=>Ry,ContextMenu:()=>yo,ContextMenuArrowDataAttributes:()=>tx,ContextMenuBackdropDataAttributes:()=>ox,ContextMenuCheckboxItemDataAttributes:()=>cp,ContextMenuCheckboxItemIndicatorDataAttributes:()=>rx,ContextMenuItemDataAttributes:()=>nx,ContextMenuLinkItemDataAttributes:()=>sx,ContextMenuPopupDataAttributes:()=>ix,ContextMenuPositionerCssVariables:()=>ax,ContextMenuPositionerDataAttributes:()=>cx,ContextMenuRadioItemDataAttributes:()=>lx,ContextMenuRadioItemIndicatorDataAttributes:()=>ux,ContextMenuSeparatorDataAttributes:()=>ai,ContextMenuSubmenuTriggerDataAttributes:()=>px,ContextMenuTriggerDataAttributes:()=>Xy,Dialog:()=>kr,DialogBackdropDataAttributes:()=>Dd,DialogCloseDataAttributes:()=>Ku,DialogPopupCssVariables:()=>Hu,DialogPopupDataAttributes:()=>Uu,DialogTriggerDataAttributes:()=>dx,DialogViewportDataAttributes:()=>zu,DirectionProvider:()=>ky,Drawer:()=>Do,DrawerBackdropCssVariables:()=>Ca,DrawerBackdropDataAttributes:()=>hv,DrawerCloseDataAttributes:()=>Ku,DrawerPopupCssVariables:()=>ba,DrawerPopupDataAttributes:()=>Al,DrawerSwipeAreaDataAttributes:()=>Tx,DrawerTriggerDataAttributes:()=>dx,DrawerViewportCssVariables:()=>Mx,DrawerViewportDataAttributes:()=>bv,Field:()=>mn,FieldControlDataAttributes:()=>_d,FieldDescriptionDataAttributes:()=>Sv,FieldErrorDataAttributes:()=>Ev,FieldItemDataAttributes:()=>Pv,FieldLabelDataAttributes:()=>vv,FieldRootDataAttributes:()=>yv,Fieldset:()=>Fl,FieldsetLegendDataAttributes:()=>Tv,Form:()=>_x,Input:()=>Bx,InputDataAttributes:()=>wv,Menu:()=>Bt,MenuArrowDataAttributes:()=>tx,MenuBackdropDataAttributes:()=>ox,MenuCheckboxItemDataAttributes:()=>cp,MenuCheckboxItemIndicatorDataAttributes:()=>rx,MenuClearDataAttributes:()=>$y,MenuInputDataAttributes:()=>zy,MenuItemDataAttributes:()=>nx,MenuLinkItemDataAttributes:()=>sx,MenuPopupDataAttributes:()=>ix,MenuPositionerCssVariables:()=>ax,MenuPositionerDataAttributes:()=>cx,MenuRadioItemDataAttributes:()=>lx,MenuRadioItemIndicatorDataAttributes:()=>ux,MenuSeparatorDataAttributes:()=>ai,MenuSubmenuTriggerDataAttributes:()=>px,MenuTriggerDataAttributes:()=>jy,MenuViewportCssVariables:()=>Yy,MenuViewportDataAttributes:()=>Ky,Menubar:()=>Ux,MenubarDataAttributes:()=>Hx,Meter:()=>mi,NavigationMenu:()=>xr,NavigationMenuArrowDataAttributes:()=>Hv,NavigationMenuBackdropDataAttributes:()=>_v,NavigationMenuContentDataAttributes:()=>Xx,NavigationMenuIconDataAttributes:()=>Gv,NavigationMenuLinkDataAttributes:()=>Uv,NavigationMenuPopupCssVariables:()=>Mp,NavigationMenuPopupDataAttributes:()=>Bv,NavigationMenuPositionerCssVariables:()=>_l,NavigationMenuPositionerDataAttributes:()=>kv,NavigationMenuTriggerDataAttributes:()=>Lv,NumberField:()=>ns,NumberFieldDecrementDataAttributes:()=>tE,NumberFieldGroupDataAttributes:()=>Zv,NumberFieldIncrementDataAttributes:()=>eE,NumberFieldInputDataAttributes:()=>oE,NumberFieldRootDataAttributes:()=>Qv,NumberFieldScrubAreaCursorDataAttributes:()=>nE,NumberFieldScrubAreaDataAttributes:()=>rE,OTPField:()=>Rc,OTPFieldInputDataAttributes:()=>cE,OTPFieldRootDataAttributes:()=>aE,OTPFieldSeparatorDataAttributes:()=>ai,Popover:()=>Rr,PopoverArrowDataAttributes:()=>hE,PopoverBackdropDataAttributes:()=>bE,PopoverPopupCssVariables:()=>xE,PopoverPopupDataAttributes:()=>RE,PopoverPositionerCssVariables:()=>mE,PopoverPositionerDataAttributes:()=>gE,PopoverTriggerDataAttributes:()=>dE,PopoverViewportCssVariables:()=>CE,PopoverViewportDataAttributes:()=>yE,PreviewCard:()=>Jr,PreviewCardArrowDataAttributes:()=>ME,PreviewCardBackdropDataAttributes:()=>DE,PreviewCardPopupDataAttributes:()=>IE,PreviewCardPositionerCssVariables:()=>TE,PreviewCardPositionerDataAttributes:()=>wE,PreviewCardTriggerDataAttributes:()=>PE,PreviewCardViewportCssVariables:()=>NE,PreviewCardViewportDataAttributes:()=>AE,Progress:()=>Ei,ProgressIndicatorDataAttributes:()=>_E,ProgressLabelDataAttributes:()=>HE,ProgressRootDataAttributes:()=>bR,ProgressTrackDataAttributes:()=>kE,ProgressValueDataAttributes:()=>BE,Radio:()=>Yl,RadioGroup:()=>SR,RadioGroupDataAttributes:()=>KE,RadioIndicatorDataAttributes:()=>YE,RadioRootDataAttributes:()=>CR,ScrollArea:()=>zs,ScrollAreaContentDataAttributes:()=>cS,ScrollAreaRootCssVariables:()=>Wp,ScrollAreaRootDataAttributes:()=>wR,ScrollAreaScrollbarCssVariables:()=>Kp,ScrollAreaScrollbarDataAttributes:()=>IR,ScrollAreaThumbDataAttributes:()=>lS,ScrollAreaViewportCssVariables:()=>DR,ScrollAreaViewportDataAttributes:()=>aS,Select:()=>vo,SelectArrowDataAttributes:()=>ES,SelectBackdropDataAttributes:()=>hS,SelectIconDataAttributes:()=>RS,SelectItemDataAttributes:()=>yS,SelectItemIndicatorDataAttributes:()=>vS,SelectPopupDataAttributes:()=>CS,SelectPositionerCssVariables:()=>BR,SelectPositionerDataAttributes:()=>bS,SelectScrollDownArrowDataAttributes:()=>SS,SelectScrollUpArrowDataAttributes:()=>PS,SelectSeparatorDataAttributes:()=>ai,SelectTriggerDataAttributes:()=>FR,SelectValueDataAttributes:()=>xS,Separator:()=>wn,SeparatorDataAttributes:()=>ai,Slider:()=>cs,SliderControlDataAttributes:()=>NS,SliderIndicatorDataAttributes:()=>OS,SliderRootDataAttributes:()=>MS,SliderThumbDataAttributes:()=>th,SliderTrackDataAttributes:()=>AS,SliderValueDataAttributes:()=>DS,Switch:()=>tu,SwitchRootDataAttributes:()=>rh,SwitchThumbDataAttributes:()=>kS,Tabs:()=>Ii,TabsIndicatorCssVariables:()=>lh,TabsIndicatorDataAttributes:()=>qS,TabsListDataAttributes:()=>JS,TabsPanelDataAttributes:()=>uh,TabsRootDataAttributes:()=>ih,TabsTabDataAttributes:()=>XS,Toast:()=>hr,ToastActionDataAttributes:()=>mP,ToastArrowDataAttributes:()=>RP,ToastCloseDataAttributes:()=>dP,ToastContentDataAttributes:()=>uP,ToastDescriptionDataAttributes:()=>pP,ToastPositionerCssVariables:()=>gP,ToastPositionerDataAttributes:()=>xP,ToastRootCssVariables:()=>qp,ToastRootDataAttributes:()=>hh,ToastTitleDataAttributes:()=>fP,ToastViewportCssVariables:()=>xh,ToastViewportDataAttributes:()=>lP,Toggle:()=>wh,ToggleDataAttributes:()=>bP,ToggleGroup:()=>Dh,ToggleGroupDataAttributes:()=>yP,Toolbar:()=>qs,ToolbarButtonDataAttributes:()=>PP,ToolbarGroupDataAttributes:()=>SP,ToolbarInputDataAttributes:()=>wP,ToolbarLinkDataAttributes:()=>TP,ToolbarRootDataAttributes:()=>EP,ToolbarSeparatorDataAttributes:()=>vP,Tooltip:()=>Zr,TooltipArrowDataAttributes:()=>FP,TooltipPopupDataAttributes:()=>VP,TooltipPositionerCssVariables:()=>AP,TooltipPositionerDataAttributes:()=>OP,TooltipTriggerDataAttributes:()=>Cu,TooltipViewportCssVariables:()=>LP,TooltipViewportDataAttributes:()=>kP,makeEventPreventable:()=>Ic,mergeClassNames:()=>gf,mergeProps:()=>Pt,mergePropsN:()=>Kh,useDirection:()=>At,useRender:()=>UQ});var Zs={};ae(Zs,{Header:()=>ow,Item:()=>ew,Panel:()=>fw,Root:()=>qT,Trigger:()=>cw});var Ai=T(M(),1);var Oa=T(M(),1);function Nt({controlled:e,default:t,name:o,state:r="value"}){let{current:n}=Oa.useRef(e!==void 0),[s,i]=Oa.useState(()=>t),l=n&&e!==void 0?e:s,a=Oa.useCallback(c=>{n||i(c)},[]);return[l,a]}var sB=T(M(),1),cu={...sB};var FT=T(M(),1),VT={};function ut(e,t){let o=FT.useRef(VT);return o.current===VT&&(o.current=e(t)),o}var Gh=cu.useInsertionEffect,iB=Gh&&Gh!==cu.useLayoutEffect?Gh:e=>e();function j(e){let t=ut(aB).current;return t.next=e,iB(t.effect),t.trampoline}function aB(){let e={next:void 0,callback:cB,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function cB(){}function Qe(){}var yt=Object.freeze([]),qe=Object.freeze({});var Qs=T(M(),1);var LT=T(M(),1),lB=()=>{},z=typeof document<"u"?LT.useLayoutEffect:lB;var lf=T(M(),1),Wh=lf.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function uf(){return lf.useContext(Wh)}var pf=window.React;function v(e,t,o){let{children:r,...n}=t||{};return o!==void 0&&(n.key=o),r===void 0?pf.createElement(e,n):Array.isArray(r)?pf.createElement(e,n,...r):pf.createElement(e,n,r)}var Nee=pf.Fragment;function Jo(e){let{children:t,elementsRef:o,labelsRef:r,onMapChange:n}=e,s=j(n),[,i]=Qs.useState(0),l=ut(pB).current,a=ut(uB).current,c=Qs.useRef(0),u=Qs.useRef(!0),p=Qs.useRef(null),f=Qs.useRef(null),m=j(()=>{u.current||(u.current=!0,i(C=>C+1))}),d=j((C,S)=>{a.set(C,S),m()}),R=j(C=>{a.delete(C),m()}),g=j(C=>{let S=new Map;return o.current.length=0,r&&(r.current.length=0),C.forEach(E=>{S.set(E.element,{...E.registration.metadata??{},index:E.index}),o.current[E.index]=E.element,r&&(r.current[E.index]=E.registration.label!==void 0?E.registration.label:E.registration.textRef?.current?.textContent??E.element.textContent)}),c.current=o.current.length,S});function b(C){if(f.current?.disconnect(),f.current=null,typeof MutationObserver!="function"||C.length<2)return;let S=new MutationObserver(P=>{if(!mB(P))return;let N=null;for(let w of C)if(w.isConnected){if(N&&kT(N,w)>0){S.disconnect(),m();return}N=w}});f.current=S;let E=new Set;for(let P=1;P<C.length;P+=1){let N=dB(C[P-1],C[P]);N&&E.add(N)}E.forEach(P=>S.observe(P,{childList:!0}))}let x=j(()=>{let[C,S]=fB(a),E=g(C),P=p.current,N=!P||P.length!==C.length||C.some((w,D)=>{let G=P[D];return w.index!==G.index||w.element!==G.element||w.registration.index!==G.registration.index||w.registration.metadata!==G.registration.metadata});b(S),p.current=C,u.current=!1,N&&(l.forEach(w=>w(E)),s(E))});z(()=>(!u.current&&p.current&&g(p.current),()=>{o.current=[],r&&(r.current=[])}),[o,r,g]),z(()=>{u.current&&x()}),z(()=>()=>{f.current?.disconnect(),u.current=!0},[]);let h=j(C=>(l.add(C),()=>{l.delete(C)})),y=Qs.useMemo(()=>({register:d,unregister:R,subscribeMapChange:h,nextIndexRef:c}),[d,R,h,c]);return v(Wh.Provider,{value:y,children:t})}function uB(){return new Map}function pB(){return new Set}function fB(e){let t=new Set,o=[],r=[];e.forEach((s,i)=>{if(!i.isConnected)return;let l=s.index,a={index:l??-1,element:i,registration:s};l===null?r.push(a):l>=0&&(t.add(l),o.push(a))});let n=0;return r.sort((s,i)=>kT(s.element,i.element)),r.forEach(s=>{for(;t.has(n);)n+=1;s.index=n,o.push(s),n+=1}),t.size>0&&o.sort((s,i)=>s.index-i.index),[o,r.map(s=>s.element)]}function dB(e,t){let o=e.parentElement;for(;o&&!o.contains(t);)o=o.parentElement;return o}function mB(e){for(let t of e)for(let o=0;o<t.removedNodes.length;o+=1)if(t.removedNodes[o].isConnected)return!0;return!1}function kT(e,t){return e.nextElementSibling===t?-1:t.nextElementSibling===e?1:e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}function gB(e,t){return function(r,...n){let s=new URL(e);return s.searchParams.set("code",r.toString()),n.forEach(i=>s.searchParams.append("args[]",i)),`${t} error #${r}; visit ${s} for the full message.`}}var xB=gB("https://base-ui.com/production-error","Base UI"),Me=xB;var ff=T(M(),1),jh=ff.createContext(void 0);function df(){let e=ff.useContext(jh);if(e===void 0)throw new Error(Me(10));return e}var Ni=T(M(),1);function kt(e,t,o,r){let n=ut(BT).current;return RB(n,e,t,o,r)&&HT(n,[e,t,o,r]),n.callback}function _T(e){let t=ut(BT).current;return hB(t,e)&&HT(t,e),t.callback}function BT(){return{callback:null,cleanup:null,refs:[]}}function RB(e,t,o,r,n){return e.refs[0]!==t||e.refs[1]!==o||e.refs[2]!==r||e.refs[3]!==n}function hB(e,t){return e.refs.length!==t.length||e.refs.some((o,r)=>o!==t[r])}function HT(e,t){if(e.refs=t,t.every(o=>o==null)){e.callback=null;return}e.callback=o=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),o!=null){let r=Array(t.length).fill(null);for(let n=0;n<t.length;n+=1){let s=t[n];if(s!=null)switch(typeof s){case"function":{let i=s(o);typeof i=="function"&&(r[n]=i);break}case"object":{s.current=o;break}default:}}e.cleanup=()=>{for(let n=0;n<t.length;n+=1){let s=t[n];if(s!=null)switch(typeof s){case"function":{let i=r[n];typeof i=="function"?i():s(null);break}case"object":{s.current=null;break}default:}}}}}}var GT=T(M(),1);var UT=T(M(),1),bB=parseInt(UT.version,10);function Di(e){return bB>=e}function Yh(e){if(!GT.isValidElement(e))return null;let t=e,o=t.props;return(Di(19)?o?.ref:t.ref)??null}function lu(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function WT(e,t){let o={};for(let r in e){let n=e[r];if(t?.hasOwnProperty(r)){let s=t[r](n);s!=null&&Object.assign(o,s);continue}n===!0?o[`data-${r.toLowerCase()}`]="":n&&(o[`data-${r.toLowerCase()}`]=n.toString())}return o}function jT(e,t){return typeof e=="function"?e(t):e}function wc(e,t){return typeof e=="function"?e(t):e}var YT={};function Pt(e,t,o,r,n){if(!o&&!r&&!n&&!e)return mf(t);let s=mf(e);return t&&(s=uu(s,t)),o&&(s=uu(s,o)),r&&(s=uu(s,r)),n&&(s=uu(s,n)),s}function Kh(e){if(e.length===0)return YT;if(e.length===1)return mf(e[0]);let t=mf(e[0]);for(let o=1;o<e.length;o+=1)t=uu(t,e[o]);return t}function mf(e){return zT(e)?{...e(YT)}:CB(e)}function uu(e,t){return zT(t)?t(e):yB(e,t)}function CB(e){let t={...e};for(let o in t){let r=t[o];KT(o,r)&&(t[o]=$T(r))}return t}function yB(e,t){if(!t)return e;for(let o in t){let r=t[o];switch(o){case"style":{e[o]=lu(e.style,r);break}case"className":{e[o]=gf(e.className,r);break}default:KT(o,r)?e[o]=vB(e[o],r):e[o]=r}}return e}function KT(e,t){let o=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2);return o===111&&r===110&&n>=65&&n<=90&&(typeof t=="function"||typeof t>"u")}function zT(e){return typeof e=="function"}function vB(e,t){return t?e?(...o)=>{let r=o[0];if(XT(r)){let s=r;Ic(s);let i=t(...o);return s.baseUIHandlerPrevented||e?.(...o),i}let n=t(...o);return e?.(...o),n}:$T(t):e}function $T(e){return e&&((...t)=>{let o=t[0];return XT(o)&&Ic(o),e(...t)})}function Ic(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function gf(e,t){return t?e?t+" "+e:t:e}function XT(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}var zh=T(M(),1);function _(e,t,o={}){let r=t.render;o.enabled!==!1&&(r=Va(r));let n=EB(t,o,r);if(o.enabled===!1)return null;let s=o.state??qe;return TB(e,r,n,s)}function EB(e,t,o){let{className:r,style:n}=e,{state:s=qe,ref:i,props:l,stateAttributesMapping:a,enabled:c=!0}=t,u=c?jT(r,s):void 0,p=c?wc(n,s):void 0,f=c?WT(s,a):qe,m=c&&l?SB(l):void 0,d=c?lu(f,m)??{}:qe;return typeof document<"u"&&(c?Array.isArray(i)?d.ref=_T([d.ref,Yh(o),...i]):d.ref=kt(d.ref,Yh(o),i):kt(null,null)),c?(u!==void 0&&(d.className=gf(d.className,u)),p!==void 0&&(d.style=lu(d.style,p)),d):qe}function SB(e){return Array.isArray(e)?Kh(e):Pt(void 0,e)}var PB=Symbol.for("react.lazy");function Va(e){if(e?.$$typeof!==PB)return e;let t=Ni.Children.toArray(e)[0];return Ni.isValidElement(t)?t:e}function TB(e,t,o,r){if(t){if(typeof t=="function")return t(o,r);let n=Pt(o,t.props);return n.ref=o.ref,Ni.cloneElement(t,n)}return wB(e,o)}function wB(e,t){return e==="button"?(0,zh.createElement)("button",{type:"button",...t,key:t.key}):e==="img"?(0,zh.createElement)("img",{alt:"",...t,key:t.key}):Ni.createElement(e,t)}var IB={value:()=>null},qT=Ai.forwardRef(function(t,o){let{render:r,className:n,disabled:s=!1,hiddenUntilFound:i,keepMounted:l,loopFocus:a,onValueChange:c,multiple:u=!1,orientation:p="vertical",value:f,defaultValue:m,style:d,...R}=t,g=m??yt,b=Ai.useRef([]),[x,h]=Nt({controlled:f,default:g,name:"Accordion",state:"value"}),y=j((P,N,w)=>{let D;u?N?D=[...x,P]:D=x.filter(G=>G!==P):D=x[0]===P?[]:[P],c?.(D,w),!w.isCanceled&&h(D)}),C=Ai.useMemo(()=>({value:x,disabled:s,orientation:p}),[x,s,p]),S=Ai.useMemo(()=>({disabled:s,handleValueChange:y,hiddenUntilFound:i??!1,keepMounted:l??!1,state:C,value:x}),[s,y,i,l,C,x]),E=_("div",t,{state:C,ref:o,props:R,stateAttributesMapping:IB});return v(jh.Provider,{value:S,children:v(Jo,{elementsRef:b,children:E})})});var Li=T(M(),1);var Rf=T(M(),1);var xf=T(M(),1);function Oi(){let[,e]=xf.useState({});return xf.useCallback(()=>{e({})},[])}var JT=0;function MB(e,t="mui"){let o=Rf.useRef(void 0),r=Oi(),n=e??o.current;return Rf.useEffect(()=>{o.current==null&&(JT+=1,o.current=`${t}-${JT}`,e==null&&r())},[e,t,r]),n}var QT=cu.useId;function br(e,t){if(QT!==void 0){let o=QT();return e??(t?`${t}-${o}`:o)}return MB(e,t)}function je(e){return br(e,"base-ui")}var Cf=T(M(),1);function fe(e,t,o,r){let n=!1,s=!1,i=r??qe;return{reason:e,event:t??new Event("base-ui"),cancel(){n=!0},allowPropagation(){s=!0},get isCanceled(){return n},get isPropagationAllowed(){return s},trigger:o,...i}}function to(e,t,o){let r=o??qe;return{reason:e,event:t??new Event("base-ui"),...r}}var U={};ae(U,{cancelOpen:()=>nH,chipRemovePress:()=>BB,clearPress:()=>_B,closePress:()=>LB,closeWatcher:()=>qB,decrementPress:()=>GB,disabled:()=>iH,drag:()=>eH,escapeKey:()=>XB,focusOut:()=>$B,imperativeAction:()=>lH,incrementPress:()=>UB,initial:()=>cH,inputBlur:()=>YB,inputChange:()=>WB,inputClear:()=>jB,inputPaste:()=>KB,inputPress:()=>zB,itemPress:()=>FB,keyboard:()=>QB,linkPress:()=>kB,listNavigation:()=>JB,missing:()=>aH,none:()=>DB,outsidePress:()=>VB,pointer:()=>ZB,popupClose:()=>rH,scrub:()=>oH,siblingOpen:()=>sH,swipe:()=>uH,trackPress:()=>HB,triggerFocus:()=>OB,triggerHover:()=>AB,triggerPress:()=>NB,wheel:()=>tH,windowResize:()=>pH});var DB="none",NB="trigger-press",AB="trigger-hover",OB="trigger-focus",VB="outside-press",FB="item-press",LB="close-press",kB="link-press",_B="clear-press",BB="chip-remove-press",HB="track-press",UB="increment-press",GB="decrement-press",WB="input-change",jB="input-clear",YB="input-blur",KB="input-paste",zB="input-press",$B="focus-out",XB="escape-key",qB="close-watcher",JB="list-navigation",QB="keyboard",ZB="pointer",eH="drag",tH="wheel",oH="scrub",rH="popup-close",nH="cancel-open",sH="sibling-open",iH="disabled",aH="missing",cH="initial",lH="imperative-action",uH="swipe",pH="window-resize";var Xh=T(M(),1);var ZT=T(M(),1);function fs(e){ZT.useEffect(e,yt)}var hf=null,Mte=globalThis.requestAnimationFrame,$h=class{constructor(){ot(this,"callbacks",[]);ot(this,"callbacksCount",0);ot(this,"nextId",1);ot(this,"startId",1);ot(this,"isScheduled",!1);ot(this,"tick",t=>{this.isScheduled=!1;let o=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let n=0;n<o.length;n+=1)o[n]?.(t)})}request(t){let o=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,(!this.isScheduled||!1)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),o}cancel(t){let o=t-this.startId;o<0||o>=this.callbacks.length||this.callbacks[o]!==null&&(this.callbacks[o]=null,this.callbacksCount-=1)}},bf=new $h;var Ko=class e{constructor(){ot(this,"currentId",hf);ot(this,"cancel",()=>{this.currentId!==hf&&(bf.cancel(this.currentId),this.currentId=hf)});ot(this,"disposeEffect",()=>this.cancel)}static create(){return new e}static request(t){return bf.request(t)}static cancel(t){return bf.cancel(t)}request(t){this.cancel(),this.currentId=bf.request(()=>{this.currentId=hf,t()})}};function ao(){let e=ut(Ko.create).current;return fs(e.disposeEffect),e}function Xt(e,t=!1,o=!1,r=!1){let[n,s]=Xh.useState(e&&t?"idle":void 0),[i,l]=Xh.useState(e&&!r);return e&&!i&&(l(!0),s("starting")),!e&&i&&n!=="ending"&&!o&&s("ending"),!e&&!i&&n==="ending"&&s(void 0),z(()=>{if(!e&&i&&n!=="ending"&&o){let a=Ko.request(()=>{s("ending")});return()=>{Ko.cancel(a)}}},[e,i,n,o]),z(()=>{if(!e||t||n===void 0)return;let a=Ko.request(()=>{s(void 0)});return()=>{Ko.cancel(a)}},[t,e,n]),z(()=>{if(!e||!t)return;e&&i&&n!=="idle"&&s("starting");let a=Ko.request(()=>{s("idle")});return()=>{Ko.cancel(a)}},[t,e,i,n]),{mounted:i,setMounted:l,transitionStatus:n}}function yf(e){let{open:t,defaultOpen:o=!1,onOpenChange:r,disabled:n}=e,[s,i]=Nt({controlled:t,default:o,name:"Collapsible",state:"open"}),{mounted:l,setMounted:a,transitionStatus:c}=Xt(s,!0,!0),u=je(),[p,f]=Cf.useState(),m=p===null?void 0:p??u,d=j(R=>{let g=!s,b=fe(U.triggerPress,R.nativeEvent);r(g,b),!b.isCanceled&&i(g)});return Cf.useMemo(()=>({defaultPanelId:u,disabled:n,handleTrigger:d,mounted:l,open:s,panelId:m,setMounted:a,setOpen:i,setPanelIdState:f,transitionStatus:c}),[u,n,d,l,s,m,a,i,f,c])}var vf=T(M(),1),pu=vf.createContext(void 0);function Vi(){let e=vf.useContext(pu);if(e===void 0)throw new Error(Me(15));return e}var Fa=T(M(),1);function oo(e={}){let{guess:t,label:o,metadata:r,textRef:n,index:s}=e,{register:i,unregister:l,subscribeMapChange:a,nextIndexRef:c}=uf(),u=Fa.useRef(-1),[p,f]=Fa.useState(s==null&&t?()=>{if(u.current===-1){let g=c.current;c.current+=1,u.current=g}return u.current}:-1),m=s??p,d=Fa.useRef(null),R=Fa.useCallback(g=>{let b=d.current;b&&l(b),d.current=g,g&&i(g,{metadata:r??null,index:s??null,label:o,textRef:n})},[s,i,l,r,o,n]);return z(()=>{if(s==null)return a(g=>{let b=d.current?g.get(d.current)?.index:null;b!=null&&f(b)})},[s,a]),{ref:R,index:m}}var Ef=T(M(),1),qh=Ef.createContext(void 0);function Mc(){let e=Ef.useContext(qh);if(e===void 0)throw new Error(Me(9));return e}var du={};ae(du,{closed:()=>Qh,endingStyle:()=>mH,open:()=>Jh,startingStyle:()=>Dc});var bt={};ae(bt,{endingStyle:()=>fu,startingStyle:()=>La});var La="data-starting-style",fu="data-ending-style";var fH={[La]:""},dH={[fu]:""},Ot={transitionStatus(e){return e==="starting"?fH:e==="ending"?dH:null}};var Jh="data-open",Qh="data-closed",Dc=bt.startingStyle,mH=bt.endingStyle;var Sf={};ae(Sf,{panelOpen:()=>Zh});var Zh="data-panel-open";var gH={[Jh]:""},xH={[Qh]:""},Pf={open(e){return e?{[Zh]:""}:null}},Tf={open(e){return e?gH:xH}};var wf={};ae(wf,{disabled:()=>RH,index:()=>eb,open:()=>hH});var eb="data-index",RH="data-disabled",hH="data-open";var Fi={...Tf,index:e=>({[eb]:String(e)}),...Ot,value:()=>null};var ew=Li.forwardRef(function(t,o){let{className:r,disabled:n=!1,onOpenChange:s,render:i,value:l,style:a,...c}=t,{ref:u,index:p}=oo(),{disabled:f,handleValueChange:m,state:d,value:R}=df(),g=je(),b=l??g,x=n||f,h=R.includes(b),y=j((O,A)=>{s?.(O,A),!A.isCanceled&&m(b,O,A)}),C=yf({open:h,onOpenChange:y,disabled:x}),S=Li.useMemo(()=>({...C,onOpenChange:y,state:{open:C.open,disabled:C.disabled,transitionStatus:C.transitionStatus}}),[C,y]),E=Li.useMemo(()=>({...d,hidden:!h&&!C.mounted,index:p,disabled:x,open:h}),[C.mounted,x,p,h,d]),P=je(),[N,w]=Li.useState(),D=N===null?void 0:N??P,G=Li.useMemo(()=>({defaultTriggerId:P,open:h,state:E,setTriggerId:w,triggerId:D}),[P,h,E,w,D]),I=_("div",t,{state:E,ref:[o,u],props:c,stateAttributesMapping:Fi});return v(pu.Provider,{value:S,children:v(qh.Provider,{value:G,children:I})})});var tw=T(M(),1);var ow=tw.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,{state:l}=Mc();return _("h3",t,{state:l,ref:o,props:i,stateAttributesMapping:Fi})});var aw=T(M(),1);var Nc=T(M(),1);function If(){return typeof window<"u"}function Io(e){return Mf(e)?(e.nodeName||"").toLowerCase():"#document"}function Ze(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ds(e){var t;return(t=(Mf(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Mf(e){return If()?e instanceof Node||e instanceof Ze(e).Node:!1}function st(e){return If()?e instanceof Element||e instanceof Ze(e).Element:!1}function tt(e){return If()?e instanceof HTMLElement||e instanceof Ze(e).HTMLElement:!1}function tn(e){return!If()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ze(e).ShadowRoot}function _a(e){let{overflow:t,overflowX:o,overflowY:r,display:n}=fo(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+o)&&n!=="inline"&&n!=="contents"}function rw(e){return/^(table|td|th)$/.test(Io(e))}function mu(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var bH=/transform|translate|scale|rotate|perspective|filter/,CH=/paint|layout|strict|content/,ka=e=>!!e&&e!=="none",tb;function Df(e){let t=st(e)?fo(e):e;return ka(t.transform)||ka(t.translate)||ka(t.scale)||ka(t.rotate)||ka(t.perspective)||!Nf()&&(ka(t.backdropFilter)||ka(t.filter))||bH.test(t.willChange||"")||CH.test(t.contain||"")}function nw(e){let t=zo(e);for(;tt(t)&&!Cr(t);){if(Df(t))return t;if(mu(t))return null;t=zo(t)}return null}function Nf(){return tb==null&&(tb=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),tb}function Cr(e){return/^(html|body|#document)$/.test(Io(e))}function fo(e){return Ze(e).getComputedStyle(e)}function gu(e){return st(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function zo(e){if(Io(e)==="html")return e;let t=e.assignedSlot||e.parentNode||tn(e)&&e.host||ds(e);return tn(t)?t.host:t}function sw(e){let t=zo(e);return Cr(t)?(e.ownerDocument||e).body:tt(t)&&_a(t)?t:sw(t)}function _n(e,t,o){var r;t===void 0&&(t=[]),o===void 0&&(o=!0);let n=sw(e),s=n===((r=e.ownerDocument)==null?void 0:r.body),i=Ze(n);if(s){let l=Af(i);return t.concat(i,i.visualViewport||[],_a(n)?n:[],l&&o?_n(l):[])}else return t.concat(n,_n(n,[],o))}function Af(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var Of=T(M(),1),ob=Of.createContext(void 0);function ki(e=!1){let t=Of.useContext(ob);if(t===void 0&&!e)throw new Error(Me(16));return t}var iw=T(M(),1);function Vf(e){let{focusableWhenDisabled:t,disabled:o,composite:r=!1,tabIndex:n=0,isNativeButton:s}=e,i=r&&t!==!1,l=r&&t===!1;return{props:iw.useMemo(()=>{let c={onKeyDown(u){o&&t&&u.key!=="Tab"&&u.preventDefault()}};return r||(c.tabIndex=n,!s&&o&&(c.tabIndex=t?n:-1)),(s&&(t||i)||!s&&o)&&(c["aria-disabled"]=o),s&&(!t||l)&&(c.disabled=o),c},[r,o,t,i,l,s,n])}}function Fe(e){return e?.ownerDocument||document}function Wr(e,t,{detail:o=0,pointerType:r=""}={}){e.dispatchEvent(new(Ze(e)).PointerEvent("click",{bubbles:!0,cancelable:!0,composed:!0,detail:o,pointerType:r,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey}))}function ft(e={}){let{disabled:t=!1,focusableWhenDisabled:o,tabIndex:r=0,native:n=!0,composite:s}=e,i=Nc.useRef(null),l=ki(!0),a=s??l!==void 0,{props:c}=Vf({focusableWhenDisabled:o,disabled:t,composite:a,tabIndex:r,isNativeButton:n}),u=Nc.useCallback(()=>{let m=i.current;rb(m)&&a&&t&&c.disabled===void 0&&m.disabled&&(m.disabled=!1)},[t,c.disabled,a]);z(u,[u]);let p=Nc.useCallback((m={})=>{let{onClick:d,onMouseDown:R,onKeyUp:g,onKeyDown:b,onPointerDown:x,...h}=m;return Pt({onClick(y){if(t){y.preventDefault();return}d?.(y)},onMouseDown(y){t||R?.(y)},onKeyDown(y){if(t||(Ic(y),b?.(y),y.baseUIHandlerPrevented))return;let C=y.target===y.currentTarget,S=y.currentTarget,E=rb(S),P=!n&&yH(S),N=C&&(n?E:!P),w=y.key==="Enter",D=y.key===" ",G=S.getAttribute("role"),I=G?.startsWith("menuitem")||G==="option"||G==="gridcell";if(C&&a&&D){if(y.defaultPrevented&&I)return;y.preventDefault(),(!n||E)&&(y.preventBaseUIHandler(),Wr(S,y));return}if(!N||n||!D&&!w){C&&P&&D&&y.preventDefault();return}y.defaultPrevented||(y.preventDefault(),w&&(y.preventBaseUIHandler(),Wr(S,y)))},onKeyUp(y){if(!t){if(Ic(y),g?.(y),y.target===y.currentTarget&&n&&a&&rb(y.currentTarget)&&y.key===" "){y.preventDefault();return}y.baseUIHandlerPrevented||y.target===y.currentTarget&&!n&&!a&&!y.defaultPrevented&&y.key===" "&&(y.preventBaseUIHandler(),Wr(y.currentTarget,y))}},onPointerDown(y){if(t){y.preventDefault();return}x?.(y)}},n?{type:"button"}:{role:"button"},c,h)},[t,c,a,n]),f=j(m=>{i.current=m,u()});return{getButtonProps:p,buttonRef:f}}function rb(e){return tt(e)&&e.tagName==="BUTTON"}function yH(e){return tt(e)&&e.tagName==="A"&&!!e.href}var vH={...Fi,...Pf},cw=aw.forwardRef(function(t,o){let{disabled:r,className:n,id:s,render:i,nativeButton:l=!0,style:a,...c}=t,{panelId:u,open:p,handleTrigger:f,disabled:m}=Vi(),d=r||m,{getButtonProps:R,buttonRef:g}=ft({disabled:d,native:l}),{defaultTriggerId:b,state:x,setTriggerId:h}=Mc(),y=s||void 0,C=y??b;return z(()=>(h(P=>y??(P===null?void 0:P)),()=>{h(P=>P===y?null:P)}),[y,h]),_("button",t,{state:x,ref:[o,g],props:[{"aria-controls":p?u:void 0,"aria-expanded":p,id:C,onClick:f},c,R],stateAttributesMapping:vH})});var ab=T(M(),1);var Ar=T(M(),1);function Ye(e,t,o,r){return e.addEventListener(t,o,r),()=>{e.removeEventListener(t,o,r)}}var xu=0,mo=class e{constructor(){ot(this,"currentId",xu);ot(this,"clear",()=>{this.currentId!==xu&&(clearTimeout(this.currentId),this.currentId=xu)});ot(this,"disposeEffect",()=>this.clear)}static create(){return new e}start(t,o){this.clear(),this.currentId=setTimeout(()=>{this.currentId=xu,o()},t)}isStarted(){return this.currentId!==xu}};function it(){let e=ut(mo.create).current;return fs(e.disposeEffect),e}function Et(e){let t=ut(EH,e).current;return t.next=e,z(t.effect),t}function EH(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var uw=T(M(),1);var nb=T($o(),1);function Bn(e){return e==null?e:"current"in e?e.current:e}function Ru(e,t){return e.getAnimations(t).filter(o=>{let r=o.effect?.getTiming();return r?.duration!==1/0&&r?.iterations!==1/0})}var Ff=null;function SH(e){if(!Ff){let t=[];Ff=t,queueMicrotask(()=>{Ff=null,nb.flushSync(()=>{for(let o of t)o()})})}Ff.push(e)}function jr(e,t=!1,o=!1){let r=ao();return j((n,s=null)=>{r.cancel();let i=Bn(e);if(i==null)return;let l=i,a=()=>{if(!o){nb.flushSync(n);return}SH(()=>{s?.aborted||n()})};if(typeof l.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){n();return}function c(){Promise.all(Ru(l).map(u=>u.finished.then(Qe))).then(()=>{s?.aborted||a()},()=>{if(s?.aborted)return;if(Ru(l).some(p=>p.pending||p.playState!=="finished")){c();return}a()})}if(t){let u=La;if(!l.hasAttribute(u)){r.request(c);return}let p=new MutationObserver(()=>{l.hasAttribute(u)||(p.disconnect(),c())});p.observe(l,{attributes:!0,attributeFilter:[u]}),s?.addEventListener("abort",()=>p.disconnect(),{once:!0});return}r.request(c)})}function St(e){let{enabled:t=!0,open:o,ref:r,batch:n=!1,onComplete:s}=e,i=j(s),l=jr(r,o,n);uw.useEffect(()=>{if(!t)return;let a=new AbortController;return l(i,a.signal),()=>{a.abort()}},[t,o,i,l])}var Ac={height:void 0,width:void 0};function kf(e){let{externalRef:t,hiddenUntilFound:o,id:r,keepMounted:n,mounted:s,onOpenChange:i,open:l,setMounted:a,setOpen:c,transitionStatus:u}=e,p=Ar.useRef(null),f=Ar.useRef(null),[m,d]=Ar.useState(Ac),R=Ar.useRef(Ac),g=Ar.useRef(!1),b=Ar.useRef(l),x=Ar.useRef(!1),[h,y]=Ar.useState(!1),C=Ar.useRef(null),S=kt(t,p),E=Et(l),P=jr(p),N=!l&&!s,w=h?"idle":u,D=l&&(b.current||x.current),G=!l&&s&&f.current==="css-animation"&&m.height===void 0&&m.width===void 0?R.current:m,I=o&&N&&f.current!=="css-animation",O=j((B,k=!0)=>{k&&(R.current=B),d(B)}),A=j(()=>{C.current?.(),C.current=null}),L=j(B=>{A(),C.current=()=>{C.current=null,B()}}),X=j(()=>{l&&s&&f.current==="css-animation"&&(x.current=!0)});z(()=>{!h||u==="starting"||y(!1)},[h,u]),Ar.useEffect(()=>()=>{X(),A()},[X,A]),z(()=>{l||(b.current=!1,x.current=!1);let B=p.current;if(!B)return;!l&&C.current&&A();let k=PH(B,D);if(f.current=k,l&&u==="idle"&&b.current&&k==="css-animation"){R.current=Oc(B);return}if(l&&u==="starting"){let q=g.current;if(g.current=!1,k==="none"){O(Oc(B)),y(!0);return}if(k==="css-transition"){let Z=TH(B);if(O(Oc(B)),!q)return Z;let ee=Lf(B,"transition-duration","0s");return L(ee),y(!0),Z}O(Oc(B));let H=Lf(B,"animation-name","none");if(!q){H();return}let K=Lf(B,"animation-duration","0s");H(),L(K),y(!0);return}if(!l&&s&&(u==="idle"||u==="starting")){if(k==="none"){O(Ac,!1),a(!1);return}O(Oc(B));return}if(u!=="ending")return;if(k==="none"){a(!1);return}let Y=Oc(B);if(!(Y.height>0||Y.width>0)){a(!1);return}O(Y),k==="css-animation"&&Lf(B,"animation-name","none")()},[s,l,A,O,a,L,D,u]),St({enabled:l&&s&&w==="idle",open:!0,ref:p,onComplete(){l&&O(Ac,!1)}}),Ar.useEffect(()=>{if(l||!s||w!=="ending")return;if(!p.current){a(!1),O(Ac,!1);return}let k=new AbortController,Y=-1;function V(){E.current||(a(!1),O(Ac,!1))}return Y=Ko.request(()=>{P(V,k.signal)}),()=>{Ko.cancel(Y),k.abort()}},[E,s,l,w,P,O,a]),z(()=>{let B=p.current;!B||!o||!N||B.setAttribute("hidden","until-found")},[N,o]),Ar.useEffect(function(){let k=p.current;if(!k)return;let Y=mo.create(),V=-1,q=(Z,ee)=>{Y.start(0,()=>{E.current||(V=Ko.request(()=>{E.current||(Z&&(g.current=!1),ee&&k.setAttribute(Dc,""),k.setAttribute("hidden","until-found"))}))})},K=Ye(k,"beforematch",Z=>{let ee=fe(U.none,Z);if(i(!0,ee),ee.isCanceled){q(!1,!1);return}g.current=!0;let Q=k.hasAttribute(Dc);k.removeAttribute(Dc),c(!0),q(!0,Q)});return()=>{Y.clear(),Ko.cancel(V),K()}},[E,i,c]);let F=n||o||s||l;return{height:G.height,props:{...I?{[Dc]:""}:void 0,hidden:N,id:r},ref:S,shouldPreventOpenAnimation:D,shouldRender:F,transitionStatus:w,width:G.width}}function Oc(e){return{height:e.scrollHeight,width:e.scrollWidth}}function PH(e,t){let o=Ze(e).getComputedStyle(e),r=(o.animationName.split(",").map(s=>s.trim()).some(s=>s!==""&&s!=="none")||t)&&pw(o.animationDuration),n=pw(o.transitionDuration);return r&&n||n?"css-transition":r?"css-animation":"none"}function pw(e){return e.split(",").map(t=>t.trim()).some(t=>t!==""&&Number.parseFloat(t)>0)}function Lf(e,t,o){let r=e.style.getPropertyValue(t),n=e.style.getPropertyPriority(t);return e.style.setProperty(t,o),()=>{if(r===""){e.style.removeProperty(t);return}e.style.setProperty(t,r,n)}}function TH(e){let t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(n=>{e.style.setProperty(n,"initial","important")});function o(){Object.entries(t).forEach(([n,s])=>{if(s===""){e.style.removeProperty(n);return}e.style.setProperty(n,s)})}let r=Ko.request(o);return()=>{Ko.cancel(r),o()}}var _f={};ae(_f,{accordionPanelHeight:()=>sb,accordionPanelWidth:()=>ib});var sb="--accordion-panel-height",ib="--accordion-panel-width";var fw=ab.forwardRef(function(t,o){let{className:r,hiddenUntilFound:n,keepMounted:s,id:i,render:l,style:a,...c}=t,{hiddenUntilFound:u,keepMounted:p}=df(),{defaultPanelId:f,mounted:m,onOpenChange:d,open:R,setMounted:g,setOpen:b,setPanelIdState:x,transitionStatus:h}=Vi(),y=n??u,C=s??p,S=i||void 0,E=i??f;z(()=>(x(k=>S??(k===null?void 0:k)),()=>{x(k=>k===S?null:k)}),[S,x]);let{height:P,props:N,ref:w,shouldPreventOpenAnimation:D,shouldRender:G,transitionStatus:I,width:O}=kf({externalRef:o,hiddenUntilFound:y,id:E,keepMounted:C,mounted:m,onOpenChange:d,open:R,setMounted:g,setOpen:b,transitionStatus:h}),{state:A,triggerId:L}=Mc(),X={...A,transitionStatus:I},F=wc(a,X),B=_("div",{...t,style:void 0},{state:X,ref:w,props:[N,{"aria-labelledby":L,role:"region",style:{[sb]:P===void 0?"auto":`${P}px`,[ib]:O===void 0?"auto":`${O}px`}},c,F?{style:F}:void 0,D?{style:{animationName:"none"}}:void 0],stateAttributesMapping:Fi});return G?B:null});var cb={};ae(cb,{disabled:()=>wH,orientation:()=>IH});var wH="data-disabled",IH="data-orientation";var lb={};ae(lb,{disabled:()=>DH,index:()=>MH,open:()=>NH});var MH="data-index",DH="data-disabled",NH="data-open";var ub={};ae(ub,{disabled:()=>VH,index:()=>AH,panelOpen:()=>OH});var AH="data-index",OH="data-panel-open",VH="data-disabled";var pb={};ae(pb,{disabled:()=>_H,endingStyle:()=>HH,index:()=>FH,open:()=>LH,orientation:()=>kH,startingStyle:()=>BH});var FH="data-index",LH="data-open",kH="data-orientation",_H="data-disabled",BH=bt.startingStyle,HH=bt.endingStyle;var Lr={};ae(Lr,{Backdrop:()=>Sd,Close:()=>Gc,Description:()=>Wc,Handle:()=>Yu,Popup:()=>Id,Portal:()=>Jc,Root:()=>rM,Title:()=>Qc,Trigger:()=>gM,Viewport:()=>tl,createHandle:()=>hM});var oM=T(M(),1);var iC=T(M(),1);var dt={};ae(dt,{engine:()=>xb,env:()=>hb,mediaQuery:()=>bb,os:()=>mb,screenReader:()=>Rb});var mb={};ae(mb,{android:()=>gw,apple:()=>db,ios:()=>fb,linux:()=>YH,mac:()=>xw,windows:()=>jH});function UH(){return typeof navigator>"u"?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:GH,platform:WH,maxTouchPoints:dw}=UH(),Ba=GH.toLowerCase(),Ha=WH.toLowerCase();var fb=/^i(os$|p)/.test(Ha)||Ha==="macintel"&&dw>1,mw="android",gw=Ha===mw||Ba.includes(mw),xw=!fb&&Ha.startsWith("mac"),jH=Ha.startsWith("win"),YH=!gw&&/^(linux|chrome os)/.test(Ha),db=xw||fb;var xb={};ae(xb,{blink:()=>zH,gecko:()=>KH,webkit:()=>gb});var gb=typeof CSS<"u"&&!!CSS.supports?.("-webkit-backdrop-filter:none"),KH=!gb&&Ba.includes("firefox"),zH=!gb&&Ba.includes("chrom");var Rb={};ae(Rb,{voiceOver:()=>$H});var $H=db;var hb={};ae(hb,{jsdom:()=>XH});var XH=/jsdom|happydom/.test(Ba);var bb={};ae(bb,{iOS:()=>qH});var qH="@supports (-webkit-touch-callout: none)";var Rw={},hw={},bw="";function Bf(e,t){return _a(e)?e:t}function Cw(e,t,o){return/hidden|clip/.test(e.getComputedStyle(Bf(t,o)).overflowY)}function JH(e){if(typeof document>"u")return!1;let t=Fe(e);return Ze(t).innerWidth-t.documentElement.clientWidth>0}function QH(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;let o=Fe(e),r=o.documentElement,n=o.body,s=Bf(r,n),i=s.style.overflowY,l=r.style.scrollbarGutter;r.style.scrollbarGutter="stable",s.style.overflowY="scroll";let a=s.offsetWidth;s.style.overflowY="hidden";let c=s.offsetWidth;return s.style.overflowY=i,r.style.scrollbarGutter=l,a===c}function ZH(e){let t=Fe(e),o=t.documentElement,r=t.body,n=Bf(o,r),s={overflowY:n.style.overflowY,overflowX:n.style.overflowX};return Object.assign(n.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(n.style,s)}}function e1(e){let t=Fe(e),o=t.documentElement,r=t.body,n=Ze(o),s=0,i=0,l=!1,a=Ko.create();if(dt.engine.webkit&&(n.visualViewport?.scale??1)!==1)return()=>{};function c(){let m=n.getComputedStyle(o),d=n.getComputedStyle(r),b=(m.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";s=o.scrollTop,i=o.scrollLeft,Rw={scrollbarGutter:o.style.scrollbarGutter,overflowY:o.style.overflowY,overflowX:o.style.overflowX},bw=o.style.scrollBehavior,hw={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let x=o.scrollHeight>o.clientHeight,h=o.scrollWidth>o.clientWidth,y=m.overflowY==="scroll"||d.overflowY==="scroll",C=m.overflowX==="scroll"||d.overflowX==="scroll",S=Math.max(0,n.innerWidth-r.clientWidth),E=Math.max(0,n.innerHeight-r.clientHeight),P=parseFloat(d.marginTop)+parseFloat(d.marginBottom),N=parseFloat(d.marginLeft)+parseFloat(d.marginRight),w=Bf(o,r);if(l=QH(e),l){o.style.scrollbarGutter=b,w.style.overflowY="hidden",w.style.overflowX="hidden";return}Object.assign(o.style,{scrollbarGutter:b,overflowY:"hidden",overflowX:"hidden"}),(x||y)&&(o.style.overflowY="scroll"),(h||C)&&(o.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:P||E?`calc(100dvh - ${P+E}px)`:"100dvh",width:N||S?`calc(100vw - ${N+S}px)`:"100vw",boxSizing:"border-box",overflowY:"hidden",overflowX:"hidden",scrollBehavior:"unset"}),r.scrollTop=s,r.scrollLeft=i,o.setAttribute("data-base-ui-scroll-locked",""),o.style.scrollBehavior="unset"}function u(){Object.assign(o.style,Rw),Object.assign(r.style,hw),l||(o.scrollTop=s,o.scrollLeft=i,o.removeAttribute("data-base-ui-scroll-locked"),o.style.scrollBehavior=bw)}function p(){u(),a.request(c)}c();let f=Ye(n,"resize",p);return()=>{a.cancel(),u(),typeof n.removeEventListener=="function"&&f()}}var Cb=class{constructor(){ot(this,"lockCount",0);ot(this,"restore",null);ot(this,"timeoutLock",mo.create());ot(this,"timeoutUnlock",mo.create());ot(this,"release",()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)});ot(this,"unlock",()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)})}acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}lock(t){if(this.lockCount===0||this.restore!==null)return;let o=Fe(t),r=o.documentElement,n=o.body,s=Ze(r);if(Cw(s,r,n)){let l=new s.MutationObserver(()=>{Cw(s,r,n)||(l.disconnect(),this.restore=null,this.lock(t))}),a={attributes:!0};l.observe(r,a),l.observe(n,a),this.restore=()=>l.disconnect();return}let i=dt.os.ios||!JH(t);this.restore=i?ZH(t):e1(t)}},t1=new Cb;function Hf(e=!0,t=null){z(()=>{if(e)return t1.acquire(t)},[e,t])}var Or=T(M(),1);function xt(e){e.preventDefault(),e.stopPropagation()}function yw(e){return"nativeEvent"in e}function hn(e){return e.pointerType===""&&e.isTrusted?!0:dt.os.android&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function ms(e){return dt.env.jsdom?!1:!dt.os.android&&e.width===0&&e.height===0||e.type==="pointerdown"&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"&&(dt.os.android||e.buttons===0)||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function on(e,t){let o=["mouse","pen"];return t||o.push("",void 0),o.includes(e)}function vw(e){let t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}function ct(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Ee(e,t){if(!e||!t)return!1;let o=t.getRootNode?.();if(e.contains(t))return!0;if(o&&tn(o)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Wt(e,t){let o=e;for(;o;){if(st(o)&&o.matches(t))return o;o=o.assignedSlot??o.parentNode??(tn(o)?o.host:null)}return null}function $e(e){return"composedPath"in e?e.composedPath()[0]??e.target:e.target}var hu="data-base-ui-focusable";var yb="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",ei="ArrowLeft",ti="ArrowRight",bu="ArrowUp",Vc="ArrowDown";var Cu={};ae(Cu,{popupOpen:()=>p1,triggerDisabled:()=>Fc});var ce={};ae(ce,{align:()=>s1,anchorHidden:()=>Sb,closed:()=>Eb,endingStyle:()=>r1,open:()=>vb,side:()=>n1,startingStyle:()=>o1});var vb="data-open",Eb="data-closed",o1=La,r1=fu,Sb="data-anchor-hidden",n1="data-side",s1="data-align";var Mt={};ae(Mt,{popupOpen:()=>Uf,pressed:()=>Pb});var Uf="data-popup-open",Pb="data-pressed";var i1={[Uf]:""},a1={[Uf]:"",[Pb]:""},c1={[vb]:""},l1={[Eb]:""},u1={[Sb]:""},yr={open(e){return e?i1:null}},rn={open(e){return e?a1:null}},Qt={open(e){return e?c1:l1},anchorHidden(e){return e?u1:null}},ro={...Qt,...Ot};var p1=Mt.popupOpen,Fc="data-trigger-disabled";function _i(e,t){if(!st(e))return!1;let o=e;if(t.hasElement(o))return!o.hasAttribute(Fc);for(let[,r]of t.entries())if(Ee(r,o))return!r.hasAttribute(Fc);return!1}function Gf(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);let o=e;return o.target!=null&&t.contains(o.target)}function Ew(e){return e.matches("html,body")}function Hn(e){return tt(e)&&e.matches(yb)}function Ua(e){return Wt(e,`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${yb}`)!=null}function yu(e){return e?e.getAttribute("role")==="combobox"&&Hn(e):!1}function gs(e){if(!e||dt.env.jsdom)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Ga(e){return e?e.hasAttribute(hu)?e:e.querySelector(`[${hu}]`)||e:null}function f1(e,t){return t!=null&&!on(t)?0:typeof e=="function"?e():e}function Un(e,t,o){let r=f1(e,o);return typeof r=="number"?r:r?.[t]}function Tb(e){return typeof e=="function"?e():e}function Wf(e,t){return t||e==="click"||e==="mousedown"}function Sw(e){return e?.includes("mouse")&&e!=="mousedown"}var Pw=Or.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new mo,currentIdRef:{current:null},currentContextRef:{current:null}});function d1(e,t){e.current=t.current}function wb(e){let{children:t,delay:o,timeoutMs:r=0}=e,n=Or.useRef(o),s=Or.useRef(o),i=Or.useRef(null),l=Or.useRef(null),a=it();return z(()=>{if(s.current=o,!i.current){n.current=o;return}n.current={open:Un(n.current,"open"),close:Un(o,"close")}},[o,i,n,s]),v(Pw.Provider,{value:Or.useMemo(()=>({hasProvider:!0,delayRef:n,initialDelayRef:s,currentIdRef:i,timeoutMs:r,currentContextRef:l,timeout:a}),[r,a]),children:t})}function Ib(e,t={open:!1}){let{open:o}=t,r=e.useState("floatingId"),n=Or.useContext(Pw),{currentIdRef:s,delayRef:i,timeoutMs:l,initialDelayRef:a,currentContextRef:c,hasProvider:u,timeout:p}=n,[f,m]=Or.useState(!1),d=Or.useRef(o);return z(()=>{d.current=o},[o]),z(()=>{function R(){c.current?.setIsInstantPhase(!1),s.current=null,c.current=null,i.current=a.current,p.clear()}if(s.current&&!o&&s.current===r){if(m(!1),l){let g=r;return p.start(l,()=>{e.select("open")||s.current&&s.current!==g||R()}),()=>{(d.current||s.current!==g)&&p.clear()}}R()}},[o,r,s,i,l,a,c,p,e]),z(()=>{if(!o)return;let R=c.current,g=s.current;p.clear(),c.current={onOpenChange:e.setOpen,setIsInstantPhase:m},s.current=r,i.current={open:0,close:Un(a.current,"close")},g!==null&&g!==r?(m(!0),R?.setIsInstantPhase(!0),R?.onOpenChange(!1,fe(U.none))):(m(!1),R?.setIsInstantPhase(!1))},[o,r,e,s,i,a,c,p]),z(()=>()=>{if(s.current===r){if(c.current=null,!d.current)return;s.current=null,d1(i,a),p.clear()}},[c,s,i,r,a,p]),Or.useMemo(()=>({activeIdRef:s,hasProvider:u,delayRef:i,isInstantPhase:f}),[s,u,i,f])}var cr=T(M(),1);function So(...e){return()=>{for(let t=0;t<e.length;t+=1){let o=e[t];o&&o()}}}var jf=T(M(),1);var Tw={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},co={...Tw,position:"fixed",margin:0,top:0,left:0},vr={...Tw,position:"absolute"};var Fo=jf.forwardRef(function(t,o){let[r,n]=jf.useState();return z(()=>{dt.screenReader.voiceOver&&dt.engine.webkit&&n("button")},[]),v("span",{...t,ref:o,style:co,"aria-hidden":r?void 0:!0,...{tabIndex:0,role:r},"data-base-ui-focus-guard":""})});var Bi=Math.min,Gn=Math.max,Hi=Math.round,oi=Math.floor,xs=e=>({x:e,y:e}),m1={left:"right",right:"left",bottom:"top",top:"bottom"};function Kf(e,t,o){return Gn(e,Bi(t,o))}function Rs(e,t){return typeof e=="function"?e(t):e}function nr(e){return e.split("-")[0]}function nn(e){return e.split("-")[1]}function zf(e){return e==="x"?"y":"x"}function Eu(e){return e==="y"?"height":"width"}function Yr(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function Su(e){return zf(Yr(e))}function Mw(e,t,o){o===void 0&&(o=!1);let r=nn(e),n=Su(e),s=Eu(n),i=n==="x"?r===(o?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=vu(i)),[i,vu(i)]}function Dw(e){let t=vu(e);return[Yf(e),t,Yf(t)]}function Yf(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var ww=["left","right"],Iw=["right","left"],g1=["top","bottom"],x1=["bottom","top"];function R1(e,t,o){switch(e){case"top":case"bottom":return o?t?Iw:ww:t?ww:Iw;case"left":case"right":return t?g1:x1;default:return[]}}function Nw(e,t,o,r){let n=nn(e),s=R1(nr(e),o==="start",r);return n&&(s=s.map(i=>i+"-"+n),t&&(s=s.concat(s.map(Yf)))),s}function vu(e){let t=nr(e);return m1[t]+e.slice(t.length)}function h1(e){var t,o,r,n;return{top:(t=e.top)!=null?t:0,right:(o=e.right)!=null?o:0,bottom:(r=e.bottom)!=null?r:0,left:(n=e.left)!=null?n:0}}function $f(e){return typeof e!="number"?h1(e):{top:e,right:e,bottom:e,left:e}}function ri(e){let{x:t,y:o,width:r,height:n}=e;return{width:r,height:n,top:o,left:t,right:t+r,bottom:o+n,x:t,y:o}}function Xf(e,t,o){return Math.floor(e/t)!==o}function sn(e,t){return t<0||t>=e.length}function jn(e,t){return sr(e.current,{disabledIndices:t})}function hs(e,t){return sr(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function qf(e,t,o){let{decrement:r,loopFocus:n,allowEscape:s,disabledIndices:i,minIndex:l,maxIndex:a}=o,c=()=>sr(e,{startingIndex:t,decrement:r,disabledIndices:i}),u,p=!1;if(!n)u=r?Math.max(l,c()):Math.min(a,c());else if(r?t<=l:t>=a){let f=r?-1:e.length;s&&t!==f?u=-1:(u=r?a:l,p=!0)}else u=c();return{index:sn(e,u)?-1:u,wrapped:p}}function sr(e,{startingIndex:t=-1,decrement:o=!1,disabledIndices:r,amount:n=1}={}){let s=t;do s+=o?-n:n;while(s>=0&&s<=e.length-1&&Wn(e,s,r));return s}function Aw(e,{event:t,orientation:o,loopFocus:r,onLoop:n,rtl:s,cols:i,disabledIndices:l,minIndex:a,maxIndex:c,prevIndex:u,stopEvent:p=!1}){let f=u,m;if(t.key===bu?m="up":t.key===Vc&&(m="down"),m){let d=[],R=[],g=!1,b=0;{let N=null,w=-1;e.forEach((D,G)=>{if(D==null)return;b+=1;let I=Wt(D,'[role="row"]');I&&(g=!0),(I!==N||w===-1)&&(N=I,w+=1,d[w]=[]),d[w].push(G),R[G]=w})}let x=!1,h=0;if(g)for(let N of d){let w=N.length;w>h&&(h=w),w!==i&&(x=!0)}let y=x&&b<e.length,C=h||i,S=N=>{if(!x||u===-1)return;let w=R[u];if(w==null)return;let D=d[w].indexOf(u),G=N==="up"?-1:1;for(let I=w+G,O=0;O<d.length;O+=1,I+=G){if(I<0||I>=d.length){if(!r||y)return;if(I=I<0?d.length-1:0,n){let L=Math.min(D,d[I].length-1),X=d[I][L]??d[I][0],F=n(t,u,X);I=R[F]??I}}let A=d[I];for(let L=Math.min(D,A.length-1);L>=0;L-=1){let X=A[L];if(!Wn(e,X,l))return X}}},E=N=>{if(!y||u===-1)return;let w=u%C,D=N==="up"?-C:C,G=c-c%C,I=oi(c/C)+1;for(let O=u-w+D,A=0;A<I;A+=1,O+=D){if(O<0||O>c){if(!r)return;O=O<0?G:0}let L=Math.min(O+C-1,c);for(let X=Math.min(O+w,L);X>=O;X-=1)if(!Wn(e,X,l))return X}};p&&xt(t);let P=S(m)??E(m);if(P!==void 0)f=P;else if(u===-1)f=m==="up"?c:a;else if(f=sr(e,{startingIndex:u,amount:C,decrement:m==="up",disabledIndices:l}),r){if(m==="up"&&(u-C<a||f<0)){let N=u%C,w=c%C,D=c-(w-N);w===N?f=c:f=w>N?D:D-C,n&&(f=n(t,u,f))}m==="down"&&u+C>c&&(f=sr(e,{startingIndex:u%C-C,amount:C,disabledIndices:l}),n&&(f=n(t,u,f)))}sn(e,f)&&(f=u)}if(o==="both"){let d=oi(u/i);t.key===(s?ei:ti)&&(p&&xt(t),u%i!==i-1?(f=sr(e,{startingIndex:u,disabledIndices:l}),r&&Xf(f,i,d)&&(f=sr(e,{startingIndex:u-u%i-1,disabledIndices:l}),n&&(f=n(t,u,f)))):r&&(f=sr(e,{startingIndex:u-u%i-1,disabledIndices:l}),n&&(f=n(t,u,f))),Xf(f,i,d)&&(f=u)),t.key===(s?ti:ei)&&(p&&xt(t),u%i!==0?(f=sr(e,{startingIndex:u,decrement:!0,disabledIndices:l}),r&&Xf(f,i,d)&&(f=sr(e,{startingIndex:u+(i-u%i),decrement:!0,disabledIndices:l}),n&&(f=n(t,u,f)))):r&&(f=sr(e,{startingIndex:u+(i-u%i),decrement:!0,disabledIndices:l}),n&&(f=n(t,u,f))),Xf(f,i,d)&&(f=u));let R=oi(c/i)===d;sn(e,f)&&(r&&R?(f=t.key===(s?ti:ei)?c:sr(e,{startingIndex:u-u%i-1,disabledIndices:l}),n&&(f=n(t,u,f))):f=u)}return f}function Wn(e,t,o){if(typeof o=="function"?o(t):o?.includes(t)??!1)return!0;let n=e[t];return n?!Wa(n)||n.matches(":disabled")?!0:!o&&(n.hasAttribute("disabled")||n.getAttribute("aria-disabled")==="true"):!1}function b1(e){return e.visibility==="hidden"||e.visibility==="collapse"}function Wa(e,t=e?fo(e):null){return!e||!e.isConnected||!t||b1(t)?!1:typeof e.checkVisibility=="function"?e.checkVisibility():t.display!=="none"&&t.display!=="contents"}var C1='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function y1(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let o=e.getRootNode();return tn(o)?o.host:null}function Db(e){for(let t of Array.from(e.children))if(Io(t)==="summary")return t;return null}function v1(e,t){let o=Db(t);return!!o&&(e===o||Ee(o,e))}function Ow(e){let t=e?Io(e):"";return e!=null&&e.matches(C1)&&(t!=="summary"||e.parentElement!=null&&Io(e.parentElement)==="details"&&Db(e.parentElement)===e)&&(t!=="details"||Db(e)==null)&&(t!=="input"||e.type!=="hidden")}function Nb(e){if(!Ow(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let t=e;t;t=y1(t)){let o=t!==e,r=Io(t)==="slot";if(t.hasAttribute("inert")||o&&Io(t)==="details"&&!t.open&&!v1(e,t)||t.hasAttribute("hidden")||!r&&!E1(t,o))return!1}return!0}function E1(e,t){let o=fo(e);return t?o.display!=="none":Wa(e,o)}function Vw(e){let t=e.tabIndex;if(t<0){let o=Io(e);if(o==="details"||o==="audio"||o==="video"||tt(e)&&e.isContentEditable)return 0}return t}function Mb(e){if(Io(e)!=="input")return null;let t=e;return t.type==="radio"&&t.name!==""?t:null}function Fw(e,t){let o=Mb(e);if(!o)return!0;let r=t.find(n=>{let s=Mb(n);return s?.name===o.name&&s.form===o.form&&s.checked});return r?r===o:t.find(n=>{let s=Mb(n);return s?.name===o.name&&s.form===o.form})===o}function Lw(e){if(tt(e)&&Io(e)==="slot"){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return tt(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Ab(e,t){Lw(e).forEach(o=>{Ow(o)&&t.push(o),Ab(o,t)})}function kw(e,t,o){Lw(e).forEach(r=>{tt(r)&&r.matches(t)&&o.push(r),kw(r,t,o)})}function Pu(e){return Nb(e)&&Vw(e)>=0}function Ob(e){let t=[];return Ab(e,t),t.filter(Nb)}function Tu(e){let t=Ob(e);return t.filter(o=>Vw(o)>=0&&Fw(o,t))}function _w(e,t){let o=Tu(e),r=o.length;if(r===0)return;let n=ct(Fe(e)),s=o.indexOf(n),i=s===-1?t===1?0:r-1:s+t;return o[i]}function Ui(e){return _w(Fe(e).body,1)||e}function Gi(e){return _w(Fe(e).body,-1)||e}function Jf(e,t,o){if(!e)return null;let r=[];Ab(Fe(e).body,r);let n=r.indexOf(e);if(n===-1)return null;let s=r.filter(Nb);for(let i=1;i<r.length;i+=1){let l=r[(n+t*i+r.length)%r.length];if(!Ee(o,l)&&Pu(l)&&Fw(l,s))return l}return r[n]}function ir(e,t){let o=t||e.currentTarget,r=e.relatedTarget;return!r||!Ee(o,r)}function Qf(e){Tu(e).forEach(o=>{o.dataset.tabindex=o.getAttribute("tabindex")||"",o.setAttribute("tabindex","-1")})}function wu(e){let t=[];kw(e,"[data-tabindex]",t),t.forEach(o=>{let r=o.dataset.tabindex;delete o.dataset.tabindex,r?o.setAttribute("tabindex",r):o.removeAttribute("tabindex")})}function Kr(e,t,o=!0){return e.filter(n=>n.parentId===t).flatMap(n=>[...!o||n.context?.open?[n]:[],...Kr(e,n.id,o)])}function Vb(e,t){let o=[],r=e.find(n=>n.id===t)?.parentId;for(;r;){let n=e.find(s=>s.id===r);r=n?.parentId,n&&(o=o.concat(n))}return o}function bs(e){return`data-base-ui-${e}`}var Zf=0;function Lc(e,t={}){let{preventScroll:o=!1,sync:r=!1,shouldFocus:n}=t;cancelAnimationFrame(Zf);function s(){n&&!n()||e?.focus({preventScroll:o})}if(r)return s(),Qe;let i=requestAnimationFrame(s);return Zf=i,()=>{Zf===i&&(cancelAnimationFrame(i),Zf=0)}}var Bw="data-base-ui-inert",Iu=new WeakMap,ed=new WeakSet,Mu=new WeakMap,Fb=0;function Ww(e){return e?tn(e)?e.host:Ww(e.parentNode):null}var Hw=(e,t)=>t.map(o=>{if(e.contains(o))return o;let r=Ww(o);return e.contains(r)?r:null}).filter(o=>o!=null),Uw=e=>{let t=new Set;return e.forEach(o=>{let r=o;for(;r&&!t.has(r);)t.add(r),r=r.parentNode}),t},Gw=(e,t,o)=>{let r=[],n=s=>{!s||o.has(s)||Array.from(s.children).forEach(i=>{Io(i)!=="script"&&(t.has(i)?n(i):r.push(i))})};return n(e),r};function S1(e,t,o,{mark:r=!0}){let n=Hw(t,e),s=r?Gw(t,Uw(n),new Set(n)):[],i=[],l=[];if(o){let a=Hw(t,Array.from(t.querySelectorAll("[aria-live]"))),c=n.concat(a);Gw(t,Uw(c),new Set(c)).forEach(p=>{let f=p.getAttribute("aria-hidden"),m=f!==null&&f!=="false",d=(Iu.get(p)||0)+1;Iu.set(p,d),i.push(p),d===1&&m&&ed.add(p),m||p.setAttribute("aria-hidden","true")})}return r&&s.forEach(a=>{let c=(Mu.get(a)||0)+1;Mu.set(a,c),l.push(a),c===1&&a.setAttribute(Bw,"")}),Fb+=1,()=>{i.forEach(a=>{let c=(Iu.get(a)||0)-1;Iu.set(a,c),c||(ed.has(a)||a.removeAttribute("aria-hidden"),ed.delete(a))}),r&&l.forEach(a=>{let c=(Mu.get(a)||0)-1;Mu.set(a,c),c||a.removeAttribute(Bw)}),Fb-=1,Fb||(Iu=new WeakMap,ed=new WeakSet,Mu=new WeakMap)}}function Lb(e,t={}){let{ariaHidden:o=!1,mark:r=!0}=t,n=Fe(e[0]).body;return S1(e,n,o,{mark:r})}var lo=T(M(),1),kb=T($o(),1);var jw={style:{transition:"none"}},kc="data-base-ui-click-trigger",td="data-base-ui-swipe-ignore",P1="data-swipe-ignore",Du=`[${td}]`,Yw=`[${P1}]`,Wi={fallbackAxisSide:"none"},bn={fallbackAxisSide:"end"},od={clipPath:"inset(50%)",position:"fixed",top:0,left:0};var Kw=lo.createContext(null),_b=()=>lo.useContext(Kw),T1=bs("portal");function rd(e={}){let{ref:t,container:o,componentProps:r=qe,elementProps:n}=e,s=br(),l=_b()?.portalNode,[a,c]=lo.useState(null),[u,p]=lo.useState(null),f=j(g=>{g!==null&&p(g)}),m=lo.useRef(null);z(()=>{if(o===null){m.current&&(m.current=null,p(null),c(null));return}let g=(o&&(Mf(o)?o:o.current))??l??document.body;if(g==null){m.current&&(m.current=null,p(null),c(null));return}m.current!==g&&(m.current=g,p(null),c(g))},[o,l]);let d=_("div",r,{ref:[t,f],props:[{id:s,[T1]:""},n]}),R=a&&d?kb.createPortal(d,a):null;return{node:u,nodeId:lo.isValidElement(d)?d.props.id:void 0,subtree:R}}var an=lo.forwardRef(function(t,o){let{render:r,className:n,style:s,children:i,container:l,portalOwnerRole:a,...c}=t,{node:u,nodeId:p,subtree:f}=rd({container:l,ref:o,componentProps:t,elementProps:c}),m=lo.useRef(null),d=lo.useRef(null),R=lo.useRef(null),g=lo.useRef(null),[b,x]=lo.useState(null),h=lo.useRef(!1),y=b?.modal,C=b?.open,S=!!b&&!b.modal&&b.open&&!!u;lo.useEffect(()=>{if(!u||y)return;function P(N){u&&N.relatedTarget&&ir(N)&&(N.type==="focusin"?h.current&&(wu(u),h.current=!1):(Qf(u),h.current=!0))}return So(Ye(u,"focusin",P,!0),Ye(u,"focusout",P,!0))},[u,y]),z(()=>{!u||C!==!0||!h.current||(wu(u),h.current=!1)},[C,u]);let E=lo.useMemo(()=>({beforeOutsideRef:m,afterOutsideRef:d,beforeInsideRef:R,afterInsideRef:g,portalNode:u,setFocusManagerState:x}),[u]);return v(lo.Fragment,{children:[f,v(Kw.Provider,{value:E,children:[S&&u&&v(Fo,{"data-type":"outside",ref:m,onFocus:P=>{if(ir(P,u))R.current?.focus();else{let N=b?b.domReference:null;Gi(N)?.focus()}}}),S&&u&&v("span",{role:a,"aria-owns":p,style:od}),u&&kb.createPortal(i,u),S&&u&&v(Fo,{"data-type":"outside",ref:d,onFocus:P=>{if(ir(P,u))g.current?.focus();else{let N=b?b.domReference:null;Ui(N)?.focus(),b?.closeOnFocusOut&&b?.onOpenChange(!1,fe(U.focusOut,P.nativeEvent))}}})]})]})});var Yi=T(M(),1);function nd(){let e=new Map;return{emit(t,o){e.get(t)?.forEach(r=>r(o))},on(t,o){e.has(t)||e.set(t,new Set),e.get(t).add(o)},off(t,o){e.get(t)?.delete(o)}}}var ji=class{constructor(){ot(this,"nodesRef",{current:[]});ot(this,"events",nd())}addNode(t){this.nodesRef.current.push(t)}removeNode(t){let o=this.nodesRef.current.findIndex(r=>r===t);o!==-1&&this.nodesRef.current.splice(o,1)}};var zw=Yi.createContext(null),$w=Yi.createContext(null),ar=()=>Yi.useContext(zw)?.id||null,Po=e=>{let t=Yi.useContext($w);return e??t};function cn(e){let t=br(),o=Po(e),r=ar();return z(()=>{if(!t)return;let n={id:t,parentId:r};return o?.addNode(n),()=>{o?.removeNode(n)}},[o,t,r]),t}function ln(e){let{children:t,id:o}=e,r=ar();return v(zw.Provider,{value:Yi.useMemo(()=>({id:o,parentId:r}),[o,r]),children:t})}function Yn(e){let{children:t,externalTree:o}=e,r=ut(()=>o??new ji).current;return v($w.Provider,{value:r,children:t})}function w1(e,t){let o=Ze($e(e));return e instanceof o.KeyboardEvent?"keyboard":e instanceof o.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||(hn(e)?"keyboard":t||"mouse"):"touches"in e?"touch":e instanceof o.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}var Xw=20,Ki=[];function Bb(){Ki=Ki.filter(e=>e.deref()?.isConnected)}function qw(e){Bb(),e&&Io(e)!=="body"&&(Ki.push(new WeakRef(e)),Ki.length>Xw&&(Ki=Ki.slice(-Xw)))}function Jw(){return Bb(),Ki[Ki.length-1]?.deref()}function I1(e){return e?Pu(e)?e:Tu(e)[0]||e:null}function Qw(e){if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex")||!e.getAttribute("role")?.includes("dialog"))return;let o=Ob(e).filter(n=>{let s=n.getAttribute("data-tabindex")||"";return Pu(n)||n.hasAttribute("data-tabindex")&&!s.startsWith("-")}),r=e.getAttribute("tabindex");o.length===0?r!=="0"&&(e.setAttribute("tabindex","0"),e.setAttribute("data-tabindex","0")):(r!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function un(e){let{context:t,children:o,disabled:r=!1,initialFocus:n=!0,returnFocus:s=!0,explicitReturnFocus:i,restoreFocus:l=!1,modal:a=!0,closeOnFocusOut:c=!0,openInteractionType:u="",nextFocusableElement:p,previousFocusableElement:f,beforeContentFocusGuardRef:m,externalTree:d,getInsideElements:R}=e,g=t.useState("open"),b=t.useState("domReferenceElement"),x=t.useState("floatingElement"),{events:h,dataRef:y}=t.context,C=j(()=>y.current.floatingContext?.nodeId),S=n===!1,E=yu(b)&&S,P=Et(n),N=Et(s),w=Et(i),D=Et(u),G=Et(g),I=Po(d),O=_b(),A=cr.useRef(!1),L=cr.useRef(!1),X=cr.useRef(!1),F=cr.useRef(null),B=cr.useRef(""),k=cr.useRef(""),Y=cr.useRef(null),V=cr.useRef(null),q=kt(Y,m,O?.beforeInsideRef),H=kt(V,O?.afterInsideRef),K=it(),Z=it(),ee=ao(),Q=O!=null,te=Ga(x),de=j(($=te)=>$?Tu($):[]),ue=j(()=>R?.().filter($=>$!=null)??[]);cr.useEffect(()=>{if(r||!a)return;function $(le){le.key==="Tab"&&Ee(te,ct(Fe(te)))&&de().length===0&&!E&&xt(le)}let ie=Fe(te);return Ye(ie,"keydown",$)},[r,te,a,E,de]),cr.useEffect(()=>{if(r||!g)return;let $=Fe(te);function ie(){X.current=!1}function le(Pe){let ge=$e(Pe),Ce=ue(),W=Ee(x,ge)||Ee(b,ge)||Ee(O?.portalNode,ge)||Ce.some(me=>me===ge||Ee(me,ge));X.current=!W,k.current=Pe.pointerType||"keyboard",Wt(ge,`[${kc}]`)&&(L.current=!0,Z.start(0,()=>{L.current=!1}))}function he(){k.current="keyboard"}return So(Ye($,"pointerdown",le,!0),Ye($,"pointerup",ie,!0),Ye($,"pointercancel",ie,!0),Ye($,"keydown",he,!0),ie)},[r,x,b,te,g,O,Z,ue]),cr.useEffect(()=>{if(r||!c)return;let $=Fe(te);function ie(){L.current=!0,Z.start(0,()=>{L.current=!1})}function le(Ce){let W=$e(Ce);Pu(W)&&(F.current=W)}function he(Ce){let W=Ce.relatedTarget,me=Ce.currentTarget,xe=$e(Ce);a&&W==null&&xe!=null&&Ee(x,xe)&&qw(xe),queueMicrotask(()=>{let ve=C(),ne=t.context.triggerElements,oe=ue(),ye=W?.hasAttribute(bs("focus-guard"))&&[Y.current,V.current,O?.beforeInsideRef.current,O?.afterInsideRef.current,O?.beforeOutsideRef.current,O?.afterOutsideRef.current,Bn(f),Bn(p)].includes(W),be=!(Ee(b,W)||Ee(x,W)||Ee(W,x)||Ee(O?.portalNode,W)||oe.some(se=>se===W||Ee(se,W))||ne.hasMatchingElement(se=>Ee(se,W))||ye||I&&(Kr(I.nodesRef.current,ve).find(se=>Ee(se.context?.elements.floating,W)||Ee(se.context?.elements.domReference,W))||Vb(I.nodesRef.current,ve).find(se=>[se.context?.elements.floating,Ga(se.context?.elements.floating)].includes(W)||se.context?.elements.domReference===W)));if(me===b&&te&&Qw(te),l&&me!==b&&!Wa(xe)&&ct($)===$.body){if(tt(te)&&(te.focus(),l==="popup")){ee.request(()=>{te.focus()});return}let se=de(),Ne=F.current,Ae=(Ne&&se.includes(Ne)?Ne:null)||se[se.length-1]||te;tt(Ae)&&Ae.focus()}if(y.current.insideReactTree){y.current.insideReactTree=!1;return}(E||!a)&&W&&be&&!L.current&&(E||W!==Jw())&&(A.current=!0,t.setOpen(!1,fe(U.focusOut,Ce)))})}function Pe(){X.current||(y.current.insideReactTree=!0,K.start(0,()=>{y.current.insideReactTree=!1}))}let ge=tt(b)?b:null;if(!(!x&&!ge))return So(ge&&Ye(ge,"focusout",he),ge&&Ye(ge,"pointerdown",ie),x&&Ye(x,"focusin",le),x&&Ye(x,"focusout",he),x&&O&&Ye(x,"focusout",Pe,!0))},[r,b,x,te,a,I,O,t,c,l,de,E,C,y,K,Z,ee,p,f,ue]),cr.useEffect(()=>{if(r||!x||!g)return;let $=Array.from(O?.portalNode?.querySelectorAll(`[${bs("portal")}]`)||[]),le=(I?Vb(I.nodesRef.current,C()):[]).find(me=>yu(me.context?.elements.domReference||null))?.context?.elements.domReference,Pe=[...[x,...$,Y.current,V.current,O?.beforeOutsideRef.current,O?.afterOutsideRef.current,...ue()],le,Bn(f),Bn(p),E?b:null].filter(me=>me!=null),ge=Lb(Pe,{ariaHidden:a||E,mark:!1}),Ce=[x,...$].filter(me=>me!=null),W=Lb(Ce);return()=>{W(),ge()}},[g,r,b,x,a,O,E,I,C,p,f,ue]),z(()=>{if(!g||r||!tt(te))return;B.current="",k.current="";let $=Fe(te),ie=ct($);queueMicrotask(()=>{let le=P.current,he=typeof le=="function"?le(D.current||""):le;if(he===void 0||he===!1||Ee(te,ie))return;let ge=null,Ce=()=>(ge==null&&(ge=de(te)),ge[0]||te),W;he===!0||he===null?W=Ce():W=Bn(he),W=W||Ce();let me=Ee(te,ct($)),xe=y.current.openEvent,ve=xe?.type==="mousedown"&&hn(xe);Lc(W,{sync:ve,preventScroll:W===te,shouldFocus(){if(!G.current)return!1;if(me)return!0;let ne=ct($);return!(ne!==W&&Ee(te,ne))}})})},[r,g,te,de,P,D,G,y]);let J=cr.useRef(null);z(()=>{if(r||!te){J.current=null;return}J.current&&(J.current.cancelled=!0,J.current=null);let $=Fe(te),ie=ct($),le=D.current==null;qw(ie);function he(ge){if(ge.open||(B.current=w1(ge.nativeEvent,k.current)),(ge.reason===U.focusOut&&ge.triggerElement?.hasAttribute(bs("focus-guard"))||ge.reason===U.triggerHover&&ge.nativeEvent.type==="mouseleave")&&(A.current=!0),ge.reason===U.outsidePress)if(ge.nested)A.current=!1;else if(hn(ge.nativeEvent)||ms(ge.nativeEvent))A.current=!1;else{let Ce=!1;Fe(te).createElement("div").focus({get preventScroll(){return Ce=!0,!1}}),Ce?A.current=!1:A.current=!0}}h.on("openchange",he);function Pe(ge){let Ce=N.current,W=typeof Ce=="function"?Ce(ge):Ce;if(W===void 0||W===!1)return null;W===null&&(W=!0);let me=b?.isConnected?b:null,xe=ie?.isConnected&&Io(ie)!=="body"?ie:null,ve=le?xe||me:me||xe;return ve||(ve=Jw()||null),typeof W=="boolean"?ve:Bn(W)||ve||null}return()=>{h.off("openchange",he);let ge=ct($),Ce=ue(),W=Ee(x,ge)||Ce.some(oe=>oe===ge||Ee(oe,ge))||I&&Kr(I.nodesRef.current,C(),!1).some(oe=>Ee(oe.context?.elements.floating,ge)),me=N.current,xe=B.current,ve=Pe(xe),ne={cancelled:!1};J.current=ne,queueMicrotask(()=>{J.current===ne&&(J.current=null);let oe=I1(ve),ye=w.current??typeof me!="boolean";if(!ne.cancelled&&me&&!A.current&&tt(oe)&&(!(!ye&&oe!==ge&&ge!==$.body)||W)){let be={preventScroll:!0};xe==="keyboard"&&(be.focusVisible=!0),oe.focus(be)}A.current=!1})}},[r,x,te,N,w,D,h,I,b,C,ue]),z(()=>{if(!dt.engine.webkit||g||!x)return;let $=ct(Fe(x));!tt($)||!Hn($)||Ee(x,$)&&$.blur()},[g,x]),z(()=>{if(!(r||!O))return O.setFocusManagerState({modal:a,closeOnFocusOut:c,open:g,onOpenChange:t.setOpen,domReference:b}),()=>{O.setFocusManagerState(null)}},[r,O,a,g,t,c,b]),z(()=>{if(!(r||!te))return Qw(te),()=>{queueMicrotask(Bb)}},[r,te]);let re=!r&&(a?!E:!0)&&(Q||a);return v(cr.Fragment,{children:[re&&v(Fo,{"data-type":"inside",ref:q,onFocus:$=>{if(a){let ie=de();Lc(ie[ie.length-1])}else O?.portalNode&&(A.current=!1,ir($,O.portalNode)?Ui(b)?.focus():Bn(f??O.beforeOutsideRef)?.focus())}}),o,re&&v(Fo,{"data-type":"inside",ref:H,onFocus:$=>{a?Lc(de()[0]):O?.portalNode&&(c&&(A.current=!0),ir($,O.portalNode)?Gi(b)?.focus():Bn(p??O.afterOutsideRef)?.focus())}})]})}var Nu=T(M(),1);function lr(e,t={}){let{enabled:o=!0,event:r="click",toggle:n=!0,ignoreMouse:s=!1,stickIfOpen:i=!0,touchOpenDelay:l=0,reason:a=U.triggerPress}=t,c=e.context.dataRef,u=Nu.useRef(void 0),p=ao(),f=it(),m=Nu.useMemo(()=>{function d(g,b,x,h){let y=fe(a,b,x);g&&h==="touch"&&l>0?f.start(l,()=>{e.setOpen(!0,y)}):e.setOpen(g,y)}function R(g,b,x){let h=c.current.openEvent,y=e.select("domReferenceElement")!==b;return g&&y||!g||!n?!0:h&&(typeof i=="function"?i():i)?!x(h.type):!1}return{onPointerDown(g){u.current=on(g.pointerType,!0)&&ms(g.nativeEvent)?"virtual":g.pointerType},onMouseDown(g){let b=u.current,x=g.nativeEvent,h=e.select("open");if(g.button!==0||r==="click"||on(b,!0)&&s)return;let y=R(h,g.currentTarget,P=>P==="click"||P==="mousedown"),C=$e(x),S=Hn(C);if(S||b==="virtual"){d(y,x,S?C:g.currentTarget,b);return}let E=g.currentTarget;p.request(()=>{d(y,x,E,b)})},onClick(g){if(r==="mousedown-only")return;let b=u.current;if(r==="mousedown"&&b){u.current=void 0;return}if(on(b,!0)&&s)return;let x=e.select("open"),h=R(x,g.currentTarget,y=>y==="click"||y==="mousedown"||y==="keydown"||y==="keyup");d(h,g.nativeEvent,g.currentTarget,b)},onKeyDown(){u.current=void 0}}},[c,r,s,a,e,i,n,p,f,l]);return Nu.useMemo(()=>o?{reference:m}:qe,[o,m])}var zr=T(M(),1);function M1(e,t){let o=null,r=null,n=!1;return{contextElement:e||void 0,getBoundingClientRect(){let s=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},i=t.axis==="x"||t.axis==="both",l=t.axis==="y"||t.axis==="both",a=["mouseenter","mousemove"].includes(t.dataRef.current.openEvent?.type||"")&&t.pointerType!=="touch",c=t.axis==="y"?s.width:0,u=t.axis==="x"?s.height:0,p=s.x,f=s.y;return o==null&&t.x&&i&&(o=s.x-t.x),r==null&&t.y&&l&&(r=s.y-t.y),p-=o||0,f-=r||0,(!n||a)&&(p=i&&t.x!=null?t.x:p,f=l&&t.y!=null?t.y:f),n=!0,{width:c,height:u,x:p,y:f,top:f,right:p+c,bottom:f+u,left:p}}}}function Zw(e){return e!=null&&e.clientX!=null}function Hb(e,t={}){let{enabled:o=!0,axis:r="both"}=t,n=e.useState("open"),s=e.useState("floatingElement"),i=e.useState("domReferenceElement"),l=e.context.dataRef,a=zr.useRef(!1),c=zr.useRef(null),[u,p]=zr.useState(),[f,m]=zr.useState([]),d=j(h=>{e.set("positionReference",h)}),R=j((h,y,C)=>{a.current||l.current.openEvent&&!Zw(l.current.openEvent)||e.set("positionReference",M1(C??i,{x:h,y,axis:r,dataRef:l,pointerType:u}))}),g=j(h=>{n?c.current||(R(h.clientX,h.clientY,h.currentTarget),m([])):R(h.clientX,h.clientY,h.currentTarget)}),b=on(u)?s:n;zr.useEffect(()=>{if(!o){d(i);return}if(!b)return;function h(){c.current?.(),c.current=null}let y=Ze(s);function C(S){let E=$e(S);Ee(s,E)?h():R(S.clientX,S.clientY)}return!l.current.openEvent||Zw(l.current.openEvent)?c.current=Ye(y,"mousemove",C):d(i),h},[b,o,s,l,i,e,R,d,f]),zr.useEffect(()=>()=>{e.set("positionReference",null)},[e]),zr.useEffect(()=>{o&&!s&&(a.current=!1)},[o,s]),zr.useEffect(()=>{!o&&n&&(a.current=!0)},[o,n]);let x=zr.useMemo(()=>{function h(y){p(y.pointerType)}return{onPointerDown:h,onPointerEnter:h,onMouseMove:g,onMouseEnter:g}},[g]);return zr.useMemo(()=>o?{reference:x,trigger:x}:{},[o,x])}var Er=T(M(),1);function D1(){return!1}function N1(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function ur(e,t={}){let{enabled:o=!0,escapeKey:r=!0,outsidePress:n=!0,outsidePressEvent:s="sloppy",referencePress:i=D1,bubbles:l,externalTree:a}=t,c=e.useState("open"),u=e.useState("floatingElement"),{dataRef:p,events:f}=e.context,m=Po(a),d=j(typeof n=="function"?n:()=>!1),R=typeof n=="function"?d:n,g=R!==!1,b=j(()=>s),{escapeKey:x,outsidePress:h}=N1(l),y=Er.useRef(!1),C=Er.useRef(!1),S=Er.useRef(!1),E=Er.useRef(!1),P=Er.useRef(!1),N=Er.useRef(""),w=Er.useRef(null),D=it(),G=it(),I=it(),O=j(()=>{G.clear(),p.current.insideReactTree=!1}),A=j(H=>{let K=p.current.floatingContext?.nodeId;return(m?Kr(m.nodesRef.current,K):[]).some(ee=>ee.context?.open&&!ee.context.dataRef.current[H])}),L=j(H=>Gf(H,e.select("floatingElement"))||Gf(H,e.select("domReferenceElement"))),X=j(H=>{i()&&e.setOpen(!1,fe(U.triggerPress,H.nativeEvent))}),F=j(H=>{if(!c||!o||!r||H.key!=="Escape")return;let K=yw(H)?H.nativeEvent:H;if(P.current||K.isComposing||!x&&A("__escapeKeyBubbles"))return;let Z=fe(U.escapeKey,K);e.setOpen(!1,Z),Z.isCanceled||H.preventDefault(),!x&&!Z.isPropagationAllowed&&H.stopPropagation()}),B=j(()=>{p.current.insideReactTree=!0,G.start(0,O)}),k=j(H=>{if(!c||!o||H.button!==0)return;let K=$e(H.nativeEvent);Ee(e.select("floatingElement"),K)&&(y.current||(y.current=!0,C.current=!1))}),Y=j(H=>{!c||!o||(H.defaultPrevented||H.nativeEvent.defaultPrevented)&&y.current&&(C.current=!0)});Er.useEffect(()=>{function H(K){K.open||(E.current=!1)}return f.on("openchange",H),()=>{f.off("openchange",H)}},[f]),Er.useEffect(()=>O,[O]),Er.useEffect(()=>{if(!c||!o)return c||(E.current=!1,P.current=!1,N.current="",w.current=null),O;p.current.__escapeKeyBubbles=x,p.current.__outsidePressBubbles=h;let H=new mo,K=Fe(u);function Z(){I.clear(),P.current=!0}function ee(){P.current=!0,I.start(dt.engine.webkit?5:0,()=>{P.current=!1})}function Q(){S.current=!0,H.start(0,()=>{S.current=!1})}function te(){y.current=!1,C.current=!1}function de(){let ne=N.current,oe=ne==="pen"||!ne?"mouse":ne,ye=b(),be=typeof ye=="function"?ye():ye;return typeof be=="string"?be:be[oe]}function ue(ne){let oe=de();return oe==="intentional"&&ne.type!=="click"||oe==="sloppy"&&ne.type==="click"}function J(ne){let oe=p.current.floatingContext?.nodeId,ye=m&&Kr(m.nodesRef.current,oe).some(be=>Gf(ne,be.context?.elements.floating));return L(ne)||ye}function re(ne){if(ue(ne)){ne.type!=="click"&&!L(ne)&&(H.clear(),S.current=!1),O();return}if(p.current.insideReactTree){O();return}let oe=$e(ne),ye=`[${bs("inert")}]`,be=st(oe)?oe.getRootNode():null,se=Array.from((tn(be)?be:Fe(e.select("floatingElement"))).querySelectorAll(ye)),Ne=e.context.triggerElements;if(oe&&(Ne.hasElement(oe)||Ne.hasMatchingElement(Ve=>Ee(Ve,oe))))return;let Ae=st(oe)?oe:null;for(;Ae&&!Cr(Ae);){let Ve=zo(Ae);if(Cr(Ve)||!st(Ve))break;Ae=Ve}if(!(se.length&&st(oe)&&!Ew(oe)&&!Ee(oe,e.select("floatingElement"))&&se.every(Ve=>!Ee(Ae,Ve)))){if(tt(oe)&&!("touches"in ne)){let Ve=Cr(oe),Te=fo(oe),De=/auto|scroll/,ze=Ve||De.test(Te.overflowX),We=Ve||De.test(Te.overflowY),Ge=ze&&oe.clientWidth>0&&oe.scrollWidth>oe.clientWidth,He=We&&oe.clientHeight>0&&oe.scrollHeight>oe.clientHeight,Ue=Te.direction==="rtl",rt=He&&(Ue?ne.offsetX<=oe.offsetWidth-oe.clientWidth:ne.offsetX>oe.clientWidth),et=Ge&&ne.offsetY>oe.clientHeight;if(rt||et)return}if(!J(ne)){if(de()==="intentional"){if(ne.detail!==0&&!hn(ne)&&!E.current)return;if(S.current){H.clear(),S.current=!1;return}}typeof R=="function"&&!R(ne)||A("__outsidePressBubbles")||(e.setOpen(!1,fe(U.outsidePress,ne)),O())}}}function $(ne){de()!=="sloppy"||ne.pointerType==="touch"||!e.select("open")||!o||L(ne)||re(ne)}function ie(ne){if(de()!=="sloppy"||!e.select("open")||!o||L(ne))return;let oe=ne.touches[0];oe&&(w.current={startTime:Date.now(),startX:oe.clientX,startY:oe.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},D.start(1e3,()=>{w.current&&(w.current.dismissOnTouchEnd=!1,w.current.dismissOnMouseDown=!1)}))}function le(ne,oe){let ye=$e(ne);if(!ye)return;let be=Ye(ye,ne.type,()=>{oe(ne),be()})}function he(ne){N.current="touch",le(ne,ie)}function Pe(ne){D.clear(),ne.type==="pointerdown"&&(ne.button===0&&(E.current=!0),N.current=ne.pointerType),!(ne.type==="mousedown"&&w.current&&!w.current.dismissOnMouseDown)&&le(ne,oe=>{oe.type==="pointerdown"?$(oe):re(oe)})}function ge(ne){if(ne.type==="pointercancel"&&(E.current=!1),!y.current)return;let oe=C.current;if(te(),de()==="intentional"){if(ne.type==="pointercancel"){oe&&Q();return}if(!J(ne)){if(oe){Q();return}typeof R=="function"&&!R(ne)||(H.clear(),S.current=!0,O())}}}function Ce(ne){if(de()!=="sloppy"||!w.current||L(ne))return;let oe=ne.touches[0];if(!oe)return;let ye=Math.abs(oe.clientX-w.current.startX),be=Math.abs(oe.clientY-w.current.startY),se=Math.sqrt(ye*ye+be*be);se>5&&(w.current.dismissOnTouchEnd=!0),se>10&&(re(ne),D.clear(),w.current=null)}function W(ne){le(ne,Ce)}function me(ne){de()!=="sloppy"||!w.current||L(ne)||(w.current.dismissOnTouchEnd&&re(ne),D.clear(),w.current=null)}function xe(ne){le(ne,me)}let ve=So(r&&So(Ye(K,"keydown",F),Ye(K,"compositionstart",Z),Ye(K,"compositionend",ee)),g&&So(Ye(K,"click",Pe,!0),Ye(K,"pointerdown",Pe,!0),Ye(K,"pointerup",ge,!0),Ye(K,"pointercancel",ge,!0),Ye(K,"mousedown",Pe,!0),Ye(K,"mouseup",ge,!0),Ye(K,"touchstart",he,{capture:!0,passive:!0}),Ye(K,"touchmove",W,{capture:!0,passive:!0}),Ye(K,"touchend",xe,{capture:!0,passive:!0})));return()=>{ve(),H.clear(),te(),S.current=!1}},[p,u,r,g,R,c,o,x,h,F,O,b,A,L,m,e,D,I]);let V=Er.useMemo(()=>({onKeyDown:F,onPointerDown:X,onClick:X}),[F,X]),q=Er.useMemo(()=>({onKeyDown:F,onPointerDown:Y,onMouseDown:Y,onClickCapture:B,onMouseDownCapture(H){B(),k(H)},onPointerDownCapture(H){B(),k(H)},onMouseUpCapture:B,onTouchEndCapture:B,onTouchMoveCapture:B}),[F,B,k,Y]);return Er.useMemo(()=>o?{reference:V,floating:q,trigger:V}:{},[o,V,q])}function sd(e,t,o,r){return{left:e,top:t,right:o,bottom:r,x:e,y:t,width:o-e,height:r-t}}function A1(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}}function tI(e){let t=[],o,r=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,i=Number.NEGATIVE_INFINITY;for(let l of Array.from(e).sort((a,c)=>a.top-c.top)){if(r=Math.min(r,l.left),n=Math.min(n,l.top),s=Math.max(s,l.right),i=Math.max(i,l.bottom),!o||l.top-o.top>o.height/2)t.push(A1(l));else{let a=t[t.length-1];a.left=Math.min(a.left,l.left),a.right=Math.max(a.right,l.right),a.bottom=Math.max(a.bottom,l.bottom),a.width=a.right-a.left,a.height=a.bottom-a.top}o=l}return{lines:t,fallback:sd(r,n,s,i)}}function oI(e,t,o){return e.findIndex(r=>t>r.left-2&&t<r.right+2&&o>r.top-2&&o<r.bottom+2)}function eI(e){return sd(e.left,e.top,e.right,e.bottom)}function O1(e,t,o){let{lines:r}=tI(e.getClientRects());if(r.length<2)return;let n=oI(r,t,o);return{x:t,y:o,lineIndex:n===-1?void 0:n,element:e}}function V1(e,t,o){let{lines:r,fallback:n}=tI(e.getClientRects());if(r.length<2)return null;let s=o?.x,i=o?.y,l=t[0];if(o?.lineIndex!=null&&r[o.lineIndex])return eI(r[o.lineIndex]);if(s!=null&&i!=null){let d=oI(r,s,i);if(d!==-1)return eI(r[d])}if(r.length===2&&r[0].left>r[1].right&&s!=null&&i!=null)return n;if(l==="t"||l==="b"){let d=r[0],R=r[r.length-1],g=l==="t"?d:R;return sd(g.left,d.top,g.right,R.bottom)}let a=l==="l",c=r[0].left,u=r[0].right,p=a?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY,f=r[0],m=r[0];for(let d of r){c=Math.min(c,d.left),u=Math.max(u,d.right);let R=a?d.left:d.right;a&&R<p||!a&&R>p?(p=R,f=d,m=d):R===p&&(m=d)}return sd(c,f.top,u,m.bottom)}function F1(e){return"contextElement"in e&&e.contextElement?e.contextElement:st(e)?e:void 0}function rI(e,t){function o(n){Ub(e,n.currentTarget,n.clientX,n.clientY)}function r(n){t||o(n)}return{onFocus(){e.current=void 0},onMouseEnter:r,onMouseMove:r}}function Ub(e,t,o,r){let n=O1(t,o,r);return e.current=n,n}function nI(e){return{name:"inline",async fn(t){let o=t.elements.reference;if(typeof o?.getClientRects!="function")return{};let r=F1(o),n=e.current,s=n?.element===o||n?.element===r?n:void 0,i=V1(o,t.placement,s);if(!i||typeof t.platform.getElementRects!="function")return{};let l=await t.platform.getElementRects({reference:{contextElement:r,getBoundingClientRect(){return i}},floating:t.elements.floating,strategy:t.strategy});return t.rects.reference.x===l.reference.x&&t.rects.reference.y===l.reference.y&&t.rects.reference.width===l.reference.width&&t.rects.reference.height===l.reference.height?{}:{reset:{rects:l}}}}}var Cn=class{constructor(t,o,r=!0){ot(this,"attachedStores",[]);ot(this,"attachedStoreValue",null);ot(this,"storeListeners",new Set);this.fallbackStore=t,this.componentName=o,this.throwOnMissingTrigger=r}get attachedStore(){return this.attachedStoreValue}get store(){return this.attachedStoreValue??this.fallbackStore}get serverStore(){return this.fallbackStore}subscribeStore(t){return this.storeListeners.add(t),()=>{this.storeListeners.delete(t)}}attachStore(t){return this.attachedStores.push(t),this.setActiveStore(t),()=>{let o=this.attachedStores.lastIndexOf(t);o!==-1&&this.attachedStores.splice(o,1),this.setActiveStore(this.attachedStores[this.attachedStores.length-1]??null)}}setActiveStore(t){this.attachedStoreValue!==t&&(this.attachedStoreValue=t,this.storeListeners.forEach(o=>{o()}))}openByTrigger(t){let o=this.attachedStore;if(o===null)return;let r;if(t){for(let n=this.attachedStores.length-1;n>=0&&!r;n-=1)r=this.attachedStores[n].context.triggerElements.getById(t);r??(r=this.fallbackStore.context.triggerElements.getById(t))}if(t&&!r&&this.throwOnMissingTrigger)throw new Error(Me(99,this.componentName,t,this.componentName));o.setOpen(!0,fe(U.imperativeAction,void 0,r))}closePopup(){let t=this.attachedStore;t!==null&&t.setOpen(!1,fe(U.imperativeAction))}};var Wb=T(M(),1),iI=T($o(),1);function Au(e){let{popupStore:t,treatPopupAsFloatingElement:o=!1,floatingRootContext:r,floatingId:n,nested:s,onOpenChange:i}=e,l=t.useState("open"),a=t.useState("activeTriggerElement"),c=t.useState(o?"popupElement":"positionerElement"),u=i;return t.useSyncedValue("floatingId",n),z(()=>{let p={open:l,floatingId:n,referenceElement:a,floatingElement:c};st(a)&&(p.domReferenceElement=a),r.state.positionReference===r.state.referenceElement&&(p.positionReference=a),r.update(p)},[l,n,a,c,r]),r.context.onOpenChange=u,r.context.nested=s,r}var Gb=T(M(),1);function zi(e){let{open:t,ref:o,preventUnmountOnClose:r,setPreventUnmountOnClose:n,onUnmount:s,animateInitialOpen:i}=e,l=j(n),{mounted:a,setMounted:c,transitionStatus:u}=Xt(t,!1,!1,i),p=t?!1:r;z(()=>{t&&l(!1)},[t,l]);let f=Gb.useRef(a),m=Gb.useRef(!1),d=Oi(),R=()=>{f.current=!1,c(!1),s()};z(()=>{f.current=a,m.current&&(m.current=!1,!t&&a&&R())});let g=j(()=>{if(f.current){if(t){m.current=!0,d();return}R()}});return St({enabled:a&&!t&&!p,open:t,ref:o,onComplete(){t||g()}}),{mounted:a,transitionStatus:u,preventUnmountingOnClose:p,forceUnmount:g}}var Sr={tabIndex:-1,[hu]:""};function id(e){return t=>t==="touch"?e.current:!0}function $i(e,t=!1){let o=br(),r=ar()!=null,n=ut(()=>e(o,r)).current;return Au({popupStore:n,treatPopupAsFloatingElement:t,floatingRootContext:n.state.floatingRootContext,floatingId:o,nested:r,onOpenChange:n.setOpen}),n}function Cs({handle:e,store:t}){return z(()=>e.attachStore(t),[e,t]),null}function sI(e){let t=e.context.triggerElements.size;e.select("open")&&e.state.triggerCount!==t&&e.set("triggerCount",t)}function Ou(e,t){let o=Wb.useRef(null);return j(r=>{let n=o.current;if(n!==null){if(n.element===r&&n.store===t&&n.id===e)return;o.current=null;let s=n.store;s.context.triggerElements.getById(n.id)===n.element&&(s.context.triggerElements.delete(n.id),sI(s))}r!==null&&e!==void 0&&(o.current={store:t,id:e,element:r},t.context.triggerElements.add(e,r),sI(t))})}function ja(e,t,o,r=!1){let n=e.preventUnmountingOnClose;t?n=!1:r&&(n=!0);let s=o?.id??null,i=e.activeTriggerId,l=e.activeTriggerElement;return(s||t)&&(i=s,l=o??null),{open:t,preventUnmountingOnClose:n,activeTriggerId:i,activeTriggerElement:l,openedWithoutTrigger:t?o==null:e.openedWithoutTrigger}}function Kn(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function ad(e,t,o,r={}){let n=o.reason,s=n===U.triggerHover,i=t&&n===U.triggerFocus,l=!t&&(n===U.triggerPress||n===U.escapeKey),a=Kn(o);if(e.context.onOpenChange?.(t,o),o.isCanceled)return;r.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,o);let c=()=>{let u=ja(e.state,t,o.trigger,a()),p={...r.extraState,...u};i?p.instantType="focus":l?p.instantType="dismiss":s&&(p.instantType=void 0),e.update(p)};s?iI.flushSync(c):c()}function ys(e,t,o,r){let n=o.useState("isMountedByTrigger",e),s=Ou(e,o),i=j(a=>{let c=o.select("open"),u=o.select("activeTriggerId");if(u===e){let p={activeTriggerElement:a,...c?r:null};o.update(p);return}if(u==null&&c&&!o.state.openedWithoutTrigger){let p={activeTriggerId:e??null,activeTriggerElement:a,...r};o.update(p)}}),l=j(a=>{s(a),a&&i(a)});return z(()=>(l(t.current),()=>l(null)),[l,t,o,e]),z(()=>{if(n){let a={activeTriggerElement:t.current,...r};o.update(a)}},[n,o,t,...Object.values(r)]),{registerTrigger:l,isMountedByThisTrigger:n}}function vs(e,t={}){let{closeOnActiveTriggerUnmount:o=!1}=t,r=Wb.useRef(null),n=e.useState("open"),s=e.useState("triggerCount"),i=e.useState("activeTriggerId"),l=e.useState("activeTriggerElement");z(()=>{if(!n){r.current=null,e.state.triggerCount!==0&&e.set("triggerCount",0),e.state.openedWithoutTrigger&&e.set("openedWithoutTrigger",!1);return}let a=e.context.triggerElements.size,c={};e.state.triggerCount!==a&&(c.triggerCount=a);let u=e.select("activeTriggerId"),p=null;if(u){let f=e.context.triggerElements.getById(u);if(f)r.current=u,f!==e.state.activeTriggerElement&&(c.activeTriggerElement=f);else{for(let[m,d]of e.context.triggerElements.entries())if(d===e.state.activeTriggerElement){c.activeTriggerId=m,c.activeTriggerElement=d,r.current=m;break}c.activeTriggerId===void 0&&(r.current===u?p=u:r.current=null)}}else r.current=null;if(!p&&!u&&!e.state.openedWithoutTrigger&&a===1){let f=e.context.triggerElements.entries().next();if(!f.done){let[m,d]=f.value;c.activeTriggerId=m,c.activeTriggerElement=d,r.current=m}}(c.triggerCount!==void 0||c.activeTriggerId!==void 0||c.activeTriggerElement!==void 0)&&e.update(c),p&&o&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===p&&!e.context.triggerElements.getById(p)){let f=fe(U.none);e.setOpen(!1,f),f.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[n,e,s,i,l,o])}function Es(e,t,o,r){let{mounted:n,transitionStatus:s,forceUnmount:i}=zi({open:e,ref:t.context.popupRef,preventUnmountOnClose:t.useState("preventUnmountingOnClose"),setPreventUnmountOnClose:l=>t.set("preventUnmountingOnClose",l),animateInitialOpen:r,onUnmount(){t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),o?.(),t.context.onOpenChangeComplete?.(!1)}});return ut(()=>(t.set("mounted",n),null)),t.useSyncedValues({mounted:n,transitionStatus:s}),{forceUnmount:i,transitionStatus:s}}function Ss(e,t){e.useSyncedValues(t),z(()=>()=>{e.update({activeTriggerProps:qe,inactiveTriggerProps:qe,popupProps:qe})},[e])}function cd(e,t){z(()=>{!t&&e.state.openMethod!==null&&e.set("openMethod",null)},[t,e]),z(()=>()=>{e.state.openMethod!==null&&e.set("openMethod",null)},[e])}var Mo=class{constructor(){ot(this,"idMap",new Map)}add(t,o){this.idMap.set(t,o)}delete(t){this.idMap.delete(t)}hasElement(t){for(let o of this.idMap.values())if(o===t)return!0;return!1}hasMatchingElement(t){for(let o of this.idMap.values())if(t(o))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}};var RI=T(M(),1),zb=T(Vu(),1),hI=T(dI(),1);var mI=T(M(),1);var Yb=[],Kb;function gI(){return Kb}function xI(e){Yb.push(e)}function zn(e){let t=(o,r)=>{let n=ut(Z1).current,s;try{Kb=n;for(let i of Yb)i.before(n);s=e(o,r);for(let i of Yb)i.after(n);n.didInitialize=!0}finally{Kb=void 0}return s};return t.displayName=e.displayName||e.name,t}function Ps(e){return mI.forwardRef(zn(e))}function Z1(){return{didInitialize:!1}}var eU=Di(19),tU=eU?rU:nU;function Ts(e,t,o,r,n){return tU(e,t,o,r,n)}function oU(e,t,o,r,n){let s=RI.useCallback(()=>t(e.getSnapshot(),o,r,n),[e,t,o,r,n]);return(0,zb.useSyncExternalStore)(e.subscribe,s,s)}xI({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let o=0;o<e.syncHooks.length;o+=1){let r=e.syncHooks[o],n=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,n)||(t=!0,r.value=n)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let o=new Set;for(let n of e.syncHooks)o.add(n.store);let r=[];for(let n of o)r.push(n.subscribe(t));return()=>{for(let n of r)n()}}),(0,zb.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function rU(e,t,o,r,n){let s=gI();if(!s)return oU(e,t,o,r,n);let i=s.syncIndex;s.syncIndex+=1;let l;return s.didInitialize?(l=s.syncHooks[i],(l.store!==e||l.selector!==t||!Object.is(l.a1,o)||!Object.is(l.a2,r)||!Object.is(l.a3,n))&&(l.store!==e&&(s.didChangeStore=!0),l.store=e,l.selector=t,l.a1=o,l.a2=r,l.a3=n,l.value=t(e.getSnapshot(),o,r,n))):(l={store:e,selector:t,a1:o,a2:r,a3:n,value:t(e.getSnapshot(),o,r,n)},s.syncHooks.push(l)),l.value}function nU(e,t,o,r,n){return(0,hI.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,s=>t(s,o,r,n))}var ud=class{constructor(t){ot(this,"subscribe",t=>(this.listeners.add(t),()=>{this.listeners.delete(t)}));ot(this,"getSnapshot",()=>this.state);this.state=t,this.listeners=new Set,this.updateTick=0}static create(t){return new this(t)}setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;let o=this.updateTick;for(let r of this.listeners){if(o!==this.updateTick)return;r(t)}}update(t){for(let o in t)if(!Object.is(this.state[o],t[o])){this.setState({...this.state,...t});return}}set(t,o){Object.is(this.state[t],o)||this.setState({...this.state,[t]:o})}notifyAll(){let t={...this.state};this.setState(t)}use(t,o,r,n){return Ts(this,t,o,r,n)}};var Ya=T(M(),1);var go=class extends ud{constructor(t,o={},r){super(t),this.context=o,this.selectors=r}useSyncedValue(t,o){Ya.useDebugValue(t);let r=this;z(()=>{r.state[t]!==o&&r.set(t,o)},[r,t,o])}useSyncedValueWithCleanup(t,o){let r=this;z(()=>(r.state[t]!==o&&r.set(t,o),()=>{r.set(t,void 0)}),[r,t,o])}useSyncedValues(t){let o=this,r=Object.values(t);z(()=>{o.update(t)},[o,...r])}useControlledProp(t,o){Ya.useDebugValue(t);let r=this,n=o!==void 0;z(()=>{n&&!Object.is(r.state[t],o)&&r.setState({...r.state,[t]:o})},[r,t,o,n])}select(t,o,r,n){let s=this.selectors[t];return s(this.state,o,r,n)}useState(t,o,r,n){return Ya.useDebugValue(t),Ts(this,this.selectors[t],o,r,n)}useContextCallback(t,o){Ya.useDebugValue(t);let r=j(o??Qe);this.context[t]=r}useStateSetter(t){let o=Ya.useRef(void 0);return o.current===void 0&&(o.current=r=>{this.set(t,r)}),o.current}observe(t,o){let r;typeof t=="function"?r=t:r=this.selectors[t];let n=r(this.state);return o(n,n,this),this.subscribe(s=>{let i=r(s);if(!Object.is(n,i)){let l=n;n=i,o(i,l,this)}})}};var sU={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId},Xi=class extends go{constructor(o){let{syncOnly:r,nested:n,onOpenChange:s,triggerElements:i,...l}=o;super({...l,positionReference:l.referenceElement,domReferenceElement:l.referenceElement},{onOpenChange:s,dataRef:{current:{}},events:nd(),nested:n,triggerElements:i},sU);ot(this,"syncOpenEvent",(o,r)=>{(!o||!this.state.open||r!=null&&vw(r))&&(this.context.dataRef.current.openEvent=o?r:void 0)});ot(this,"dispatchOpenChange",(o,r)=>{this.syncOpenEvent(o,r.event);let n={open:o,reason:r.reason,nativeEvent:r.event,nested:this.context.nested,triggerElement:r.trigger};this.context.events.emit("openchange",n)});ot(this,"setOpen",(o,r)=>{if(this.syncOnly){this.context.onOpenChange?.(o,r);return}this.dispatchOpenChange(o,r),this.context.onOpenChange?.(o,r)});this.syncOnly=r}};function ws(e,t,o=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new Xi({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:o,onOpenChange:void 0}),floatingId:t,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,openedWithoutTrigger:!1,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:qe,inactiveTriggerProps:qe,popupProps:qe}}var Fu=e=>e.triggerIdProp??e.activeTriggerId,pd=e=>e.openProp??e.open,bI=e=>(e.popupElement?.id??e.floatingId)||void 0;function CI(e,t){return t!==void 0&&pd(e)&&Fu(e)===t}function iU(e,t){return CI(e,t)?!0:t!==void 0&&pd(e)&&Fu(e)==null&&!e.openedWithoutTrigger&&e.triggerCount===1}var Vr={open:pd,mounted:e=>e.mounted,transitionStatus:e=>pd(e)&&!e.mounted?"starting":e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:Fu,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:bI,isTriggerActive:(e,t)=>t!==void 0&&Fu(e)===t,isOpenedByTrigger:(e,t)=>CI(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&Fu(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>iU(e,t)?bI(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};var $b=T(M(),1),yI=T(Vu(),1);function Is(e){let t=$b.useCallback(r=>e===void 0?Qe:e.subscribeStore(r),[e]),o=$b.useCallback(()=>e===void 0?void 0:e.store,[e]);return(0,yI.useSyncExternalStore)(t,o,()=>e?.serverStore)}function $n(e){let{open:t=!1,onOpenChange:o,elements:r={}}=e,n=br(),s=ar()!=null,i=ut(()=>new Xi({open:t,transitionStatus:void 0,onOpenChange:o,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new Mo,floatingId:n,syncOnly:!1,nested:s})).current;return z(()=>{let l={open:t,floatingId:n};r.reference!==void 0&&(l.referenceElement=r.reference,l.domReferenceElement=st(r.reference)?r.reference:null),r.floating!==void 0&&(l.floatingElement=r.floating),i.update(l)},[t,n,r.reference,r.floating,i]),i.context.onOpenChange=o,i.context.nested=s,i}var Ms=T(M(),1);var Xb=dt.os.mac&&dt.engine.webkit;function Ka(e,t={}){let{enabled:o=!0,delay:r}=t,{events:n,dataRef:s}=e.context,i=Ms.useRef(!1),l=Ms.useRef(null),a=Ms.useRef(!0),c=it();Ms.useEffect(()=>{let p=e.select("domReferenceElement");if(!o)return;let f=Ze(p);function m(){let g=e.select("domReferenceElement");!e.select("open")&&tt(g)&&g===ct(Fe(g))&&(i.current=!0,l.current=g)}function d(){a.current=!0}function R(){a.current=!1}return So(Ye(f,"blur",m),Xb&&Ye(f,"keydown",d,!0),Xb&&Ye(f,"pointerdown",R,!0))},[e,o]),Ms.useEffect(()=>{if(!o)return;function p(f){if(f.reason===U.triggerPress||f.reason===U.escapeKey){let m=e.select("domReferenceElement");st(m)&&(l.current=m,i.current=!0)}}return n.on("openchange",p),()=>{n.off("openchange",p)}},[n,o,e]);let u=Ms.useMemo(()=>{function p(){i.current=!1,l.current=null}return{onMouseLeave(){p()},onFocus(f){let m=f.currentTarget;if(i.current){if(l.current===m)return;p()}let d=$e(f.nativeEvent);if(st(d)){if(Xb&&!f.relatedTarget){if(!a.current&&!Hn(d))return}else if(!gs(d))return}let R=_i(f.relatedTarget,e.context.triggerElements),{nativeEvent:g,currentTarget:b}=f;if(e.select("open")&&R||!r){e.setOpen(!0,fe(U.triggerFocus,g,b));return}c.start(r,()=>{i.current||e.setOpen(!0,fe(U.triggerFocus,g,b))})},onBlur(f){p();let m=f.relatedTarget,d=f.nativeEvent,R=st(m)&&m.hasAttribute(bs("focus-guard"))&&m.getAttribute("data-type")==="outside";c.start(0,()=>{let g=e.select("domReferenceElement"),b=ct(Fe(g));!m&&b===g||Ee(s.current.floatingContext?.refs.floating.current,b)||Ee(g,b)||R||_i(m??b,e.context.triggerElements)||e.setOpen(!1,fe(U.triggerFocus,d))})}}},[s,r,e,c]);return Ms.useMemo(()=>o?{reference:u,trigger:u}:{},[o,u])}var Jb=T(M(),1);var qb=class e{constructor(){ot(this,"pointerType");ot(this,"interactedInside",!1);ot(this,"handler");ot(this,"blockMouseMove",!0);ot(this,"performedPointerEventsMutation",!1);ot(this,"pointerEventsScopeElement",null);ot(this,"pointerEventsReferenceElement",null);ot(this,"pointerEventsFloatingElement",null);ot(this,"restTimeoutPending",!1);ot(this,"openChangeTimeout",new mo);ot(this,"restTimeout",new mo);ot(this,"handleCloseOptions");ot(this,"dispose",()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()});ot(this,"disposeEffect",()=>this.dispose)}static create(){return new e}},fd=new WeakMap;function Ds(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&fd.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),fd.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function Bc(e,t){let{scopeElement:o,referenceElement:r,floatingElement:n}=t,s=fd.get(o);s&&s!==e&&Ds(s),Ds(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=o,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=n,fd.set(o,e),o.style.pointerEvents="none",r.style.pointerEvents="auto",n.style.pointerEvents="auto"}function qi(e){let t=e.context.dataRef.current,o=ut(()=>t.hoverInteractionState??qb.create()).current;return t.hoverInteractionState||(t.hoverInteractionState=o),fs(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function Xn(e,t={}){let{enabled:o=!0,closeDelay:r=0,nodeId:n}=t,s=e.useState("open"),i=e.useState("floatingElement"),l=e.useState("domReferenceElement"),{dataRef:a}=e.context,c=Po(),u=ar(),p=qi(e),f=it(),m=j(()=>Wf(a.current.openEvent?.type,p.interactedInside)),d=j(()=>Sw(a.current.openEvent?.type)),R=j(()=>{Ds(p)});z(()=>{s||(p.pointerType=void 0,p.restTimeoutPending=!1,p.interactedInside=!1,R())},[s,p,R]),Jb.useEffect(()=>R,[R]),z(()=>{if(o&&s&&p.handleCloseOptions?.blockPointerEvents&&d()&&st(l)&&i){let g=l,b=i,x=Fe(i),h=c?.nodesRef.current.find(E=>E.id===u)?.context?.elements.floating;h&&(h.style.pointerEvents="");let y=p.pointerEventsScopeElement!==b?p.pointerEventsScopeElement:null,C=h!==b?h:null,S=p.handleCloseOptions?.getScope?.()??y??C??Wt(g,"[data-rootownerid]")??x.body;return Bc(p,{scopeElement:S,referenceElement:g,floatingElement:b}),()=>{R()}}},[o,s,l,i,p,d,c,u,R]),Jb.useEffect(()=>{if(!o)return;function g(){return!!(c&&u&&Kr(c.nodesRef.current,u).length>0)}function b(E){let P=Un(r,"close",p.pointerType),N=()=>{e.setOpen(!1,fe(U.triggerHover,E)),c?.events.emit("floating.closed",E)};P?p.openChangeTimeout.start(P,N):(p.openChangeTimeout.clear(),N())}function x(E){let P=$e(E);if(!Ua(P)){p.interactedInside=!1;return}p.interactedInside=Wt(P,"[aria-haspopup]")!=null}function h(){p.openChangeTimeout.clear(),f.clear(),c?.events.off("floating.closed",C),R()}function y(E){if(g()&&c){c.events.on("floating.closed",C);return}if(_i(E.relatedTarget,e.context.triggerElements))return;let P=a.current.floatingContext?.nodeId??n,N=E.relatedTarget;if(!(c&&P&&st(N)&&Kr(c.nodesRef.current,P,!1).some(D=>Ee(D.context?.elements.floating,N)))){if(p.handler){p.handler(E);return}R(),d()&&!m()&&b(E)}}function C(E){!c||!u||g()||f.start(0,()=>{c.events.off("floating.closed",C),e.setOpen(!1,fe(U.triggerHover,E)),c.events.emit("floating.closed",E)})}let S=i;return So(S&&Ye(S,"mouseenter",h),S&&Ye(S,"mouseleave",y),S&&Ye(S,"pointerdown",x,!0),()=>{c?.events.off("floating.closed",C)})},[o,i,e,a,r,n,d,m,R,p,c,u,f])}var Ji=T(M(),1),vI=T($o(),1);var aU={current:null};function pn(e,t={}){let{enabled:o=!0,delay:r=0,handleClose:n=null,mouseOnly:s=!1,restMs:i=0,move:l=!0,triggerElementRef:a=aU,externalTree:c,isActiveTrigger:u=!0,getHandleCloseContext:p,isClosing:f,shouldOpen:m,guardStaleOpen:d=!1}=t,{dataRef:R,events:g}=e.context,b=Po(c),x=qi(e),h=Ji.useRef(!1),y=Et(n),C=Et(r),S=Et(i),E=Et(o),P=Et(m),N=Et(f),w=j(()=>Wf(R.current.openEvent?.type,x.interactedInside)),D=j(()=>P.current?.()!==!1),G=j((A,L,X)=>{let F=e.context.triggerElements;if(F.hasElement(L))return!A||!Ee(A,L);if(!st(X))return!1;let B=X;return F.hasMatchingElement(k=>Ee(k,B))&&(!A||!Ee(A,B))}),I=j(()=>{if(!x.handler)return;Fe(e.select("domReferenceElement")).removeEventListener("mousemove",x.handler),x.handler=void 0}),O=j(()=>{Ds(x)});return u&&(x.handleCloseOptions=n?.__options),Ji.useEffect(()=>I,[I]),Ji.useEffect(()=>{if(!o)return;function A(L){L.open?h.current=!1:(h.current=L.reason===U.triggerHover,I(),x.openChangeTimeout.clear(),x.restTimeout.clear(),x.blockMouseMove=!0,x.restTimeoutPending=!1)}return g.on("openchange",A),()=>{g.off("openchange",A)}},[o,g,x,I]),Ji.useEffect(()=>{if(!o)return;function A(Y,V=!0){let q=Un(C.current,"close",x.pointerType);q?x.openChangeTimeout.start(q,()=>{e.setOpen(!1,fe(U.triggerHover,Y)),b?.events.emit("floating.closed",Y)}):V&&(x.openChangeTimeout.clear(),e.setOpen(!1,fe(U.triggerHover,Y)),b?.events.emit("floating.closed",Y))}let L=a.current??(u?e.select("domReferenceElement"):null);if(!st(L))return;function X(Y){if(x.openChangeTimeout.clear(),x.blockMouseMove=!1,s&&!on(x.pointerType))return;let V=Tb(S.current),q=Un(C.current,"open",x.pointerType),H=$e(Y),K=Y.currentTarget??null,Z=e.select("domReferenceElement"),ee=K;if(st(H)&&!e.context.triggerElements.hasElement(H)){for(let le of e.context.triggerElements.elements())if(Ee(le,H)){ee=le;break}}st(K)&&st(Z)&&!e.context.triggerElements.hasElement(K)&&Ee(K,Z)&&(ee=Z);let Q=ee==null?!1:G(Z,ee,H),te=e.select("open"),de=N.current?.()??e.select("transitionStatus")==="ending",ue=!te&&de&&h.current,J=!Q&&st(ee)&&st(Z)&&Ee(Z,ee)&&ue,re=V>0&&!q,$=Q&&(te||ue)||J,ie=!te||Q;if($){D()&&e.setOpen(!0,fe(U.triggerHover,Y,ee));return}re||(q?x.openChangeTimeout.start(q,()=>{ie&&D()&&e.setOpen(!0,fe(U.triggerHover,Y,ee))}):ie&&D()&&e.setOpen(!0,fe(U.triggerHover,Y,ee)))}function F(Y){if(w()){O();return}I();let V=e.select("domReferenceElement"),q=Fe(V);x.restTimeout.clear(),x.restTimeoutPending=!1;let H=R.current.floatingContext??p?.();if(_i(Y.relatedTarget,e.context.triggerElements))return;if(y.current&&H){e.select("open")||x.openChangeTimeout.clear();let Z=a.current;x.handler=y.current({...H,tree:b,x:Y.clientX,y:Y.clientY,onClose(){O(),I(),E.current&&!w()&&Z===e.select("domReferenceElement")&&A(Y,!0)}}),q.addEventListener("mousemove",x.handler),x.handler(Y);return}(x.pointerType==="touch"?!Ee(e.select("floatingElement"),Y.relatedTarget):!0)&&A(Y)}function B(Y){Ee(L,Y.relatedTarget)||(x.openChangeTimeout.clear(),x.restTimeout.clear(),x.restTimeoutPending=!1)}let k=d?Ye(L,"mouseout",B):void 0;return l?So(Ye(L,"mousemove",X,{once:!0}),Ye(L,"mouseenter",X),Ye(L,"mouseleave",F),k):So(Ye(L,"mouseenter",X),Ye(L,"mouseleave",F),k)},[I,O,R,C,e,o,y,x,u,G,w,s,l,S,a,b,E,p,N,D,d]),Ji.useMemo(()=>{if(!o)return;function A(L){x.pointerType=L.pointerType}return{onPointerDown:A,onPointerEnter:A,onMouseMove(L){let{nativeEvent:X}=L,F=L.currentTarget,B=e.select("domReferenceElement"),k=e.select("open"),Y=G(B,F,L.target);if(s&&!on(x.pointerType))return;if(k&&Y&&x.handleCloseOptions?.blockPointerEvents){let H=e.select("floatingElement");if(H){let K=x.handleCloseOptions?.getScope?.()??F.ownerDocument.body;Bc(x,{scopeElement:K,referenceElement:F,floatingElement:H})}}let V=Tb(S.current);if(k&&!Y||V===0||!Y&&x.restTimeoutPending&&L.movementX**2+L.movementY**2<2)return;x.restTimeout.clear();function q(){if(x.restTimeoutPending=!1,w())return;let H=e.select("open");!x.blockMouseMove&&(!H||Y)&&D()&&e.setOpen(!0,fe(U.triggerHover,X,F))}x.pointerType==="touch"?vI.flushSync(()=>{q()}):Y&&k?q():(x.restTimeoutPending=!0,x.restTimeout.start(V,q))}}},[o,x,w,G,s,e,S,D])}var pr=T(M(),1);function EI(e){return dt.engine.webkit&&e.movementX===0&&e.movementY===0}function dd(e,t,o){switch(e){case"vertical":return t;case"horizontal":return o;default:return t||o}}function yn(e,t){return dd(t,e===bu||e===Vc,e===ei||e===ti)}function Lu(e,t,o){return dd(t,e===Vc,o?e===ei:e===ti)||e==="Enter"||e===" "||e===""}function ku(e,t,o){return dd(t,o?e===ei:e===ti,e===Vc)}function Qi(e,t,o,r){let n=o?e===ti:e===ei,s=e===bu;return t==="both"||t==="horizontal"&&r?e==="Escape":dd(t,n,s)}function za(e,t){let{listRef:o,activeIndex:r,onNavigate:n=()=>{},enabled:s=!0,selectedIndex:i=null,allowEscape:l=!1,loopFocus:a=!1,nested:c=!1,rtl:u=!1,virtual:p=!1,focusItemOnOpen:f="auto",focusItemOnHover:m=!0,openOnArrowKeyDown:d=!0,disabledIndices:R=void 0,orientation:g="vertical",triggerOrientation:b=g,parentOrientation:x,id:h,resetOnPointerLeave:y=!0,externalTree:C,nestedReturnFocusRef:S,grid:E}=t,P=E!=null,N=e.useState("open"),w=e.useState("floatingElement"),D=e.useState("domReferenceElement"),G=e.context.dataRef,I=Ga(w),O=yu(D),A=Et(I),L=ar(),X=Po(C),F=pr.useRef(f),B=pr.useRef(i??-1),k=pr.useRef(null),Y=pr.useRef(!0),V=j(ne=>{n(B.current===-1?null:B.current,ne)}),q=pr.useRef(!!w),H=pr.useRef(N),K=pr.useRef(!1),Z=pr.useRef(!1),ee=pr.useRef(null),Q=Et(R),te=Et(N),de=Et(i),ue=Et(y),J=ao(),re=ao(),$=j(()=>{J.cancel();function ne(se){p||(ee.current=Lc(se,{sync:K.current,preventScroll:!0}))}let oe=o.current[B.current],ye=Z.current;oe&&ne(oe),(K.current?se=>se():se=>J.request(se))(()=>{let se=o.current[B.current]||oe;if(!se)return;oe||ne(se),Ce&&(ye||!Y.current)&&se.scrollIntoView?.({block:"nearest",inline:"nearest"})})});z(()=>{G.current.orientation=g},[G,g]),z(()=>{N||(k.current=null),(!N||f!=="auto")&&(F.current=f)},[N,f]),z(()=>{s&&(N&&w?(B.current=i??-1,F.current&&i!=null&&(Z.current=!0,V())):q.current&&(B.current=-1,V()))},[s,N,w,i,V]),z(()=>{if(s){if(!N){K.current=!1;return}if(w)if(r==null){if(K.current=!1,de.current!=null)return;if(q.current&&(B.current=-1,$()),(!H.current||!q.current)&&F.current&&(k.current!=null||F.current===!0&&k.current==null)){let ne=0,oe=()=>{o.current[0]==null?(ne<2&&(ne?be=>re.request(be):queueMicrotask)(oe),ne+=1):(B.current=k.current==null||Lu(k.current,b,u)||c?jn(o):hs(o),k.current=null,V())};oe()}}else sn(o.current,r)||(B.current=r,$(),Z.current=!1)}},[s,N,w,r,de,c,o,b,u,V,$,re]),z(()=>{if(!s||w||!X||p||!q.current)return;let ne=X.nodesRef.current,oe=ne.find(se=>se.id===L)?.context?.elements.floating,ye=ct(Fe(D??oe??null)),be=ne.some(se=>se.context&&Ee(se.context.elements.floating,ye));oe&&!be&&Y.current&&oe.focus({preventScroll:!0})},[s,w,D,X,L,p]),z(()=>{H.current=N,q.current=!!w});let ie=r!=null,le=j(ne=>{if(!te.current)return;let oe=o.current.indexOf(ne.currentTarget);oe!==-1&&(B.current!==oe||r!==oe)&&(B.current=oe,V(ne))}),he=j(()=>x??X?.nodesRef.current.find(ne=>ne.id===L)?.context?.dataRef?.current.orientation),Pe=j(()=>jn(o,Q.current)),ge=j(ne=>{if(Y.current=!1,K.current=!0,ne.which===229||!te.current&&ne.currentTarget===A.current)return;if(c&&Qi(ne.key,g,u,P)){yn(ne.key,he())||xt(ne),e.setOpen(!1,fe(U.listNavigation,ne.nativeEvent));let se=S?.current??D;tt(se)&&se.focus();return}r!=null&&r!==B.current&&!sn(o.current,r)&&(B.current=r);let oe=B.current,ye=jn(o,R),be=hs(o,R);if(O||(ne.key==="Home"&&(xt(ne),B.current=ye,V(ne)),ne.key==="End"&&(xt(ne),B.current=be,V(ne))),E!=null){let se=E(ne,B.current,o,g,a,u,R,ye,be);if(se!=null&&se!==B.current&&(B.current=se,V(ne)),g==="both")return}if(yn(ne.key,g)){xt(ne);let se=ct(ne.currentTarget.ownerDocument);if(N&&!p&&Ee(ne.currentTarget,se)&&!o.current.some(Ve=>Ve!=null&&Ee(Ve,se))){B.current=Lu(ne.key,g,u)?ye:be,V(ne),r===B.current&&$();return}let{index:Ne,wrapped:Ae}=qf(o.current,oe,{decrement:!Lu(ne.key,g,u),loopFocus:a,allowEscape:l,disabledIndices:R,minIndex:ye,maxIndex:be});Ae&&(K.current=!1),B.current=Ne,V(ne)}}),Ce=pr.useMemo(()=>({onFocus(oe){K.current=!0,le(oe)},onClick({currentTarget:oe}){p||oe.focus({preventScroll:!0})},onMouseMove(oe){EI(oe)||(K.current=!0,Z.current=!1,m&&le(oe))},onPointerLeave(oe){if(!te.current||!Y.current||oe.pointerType==="touch")return;K.current=!0;let ye=oe.relatedTarget;if(!(!m||o.current.includes(ye))&&ue.current&&(ee.current?.(),ee.current=null,B.current=-1,V(oe),!p)){let be=A.current,se=ct(Fe(be));be&&Ee(be,se)&&be.focus({preventScroll:!0})}}}),[le,te,A,m,o,V,ue,p]),W=pr.useMemo(()=>p&&N&&ie&&{"aria-activedescendant":`${h}-${r}`},[p,N,ie,h,r]),me=pr.useMemo(()=>({...O?{}:W,onKeyDown(ne){if(ne.key==="Tab"&&ne.shiftKey&&N&&!p){let oe=$e(ne.nativeEvent);if(oe&&!Ee(A.current,oe))return;xt(ne);let ye=fe(U.focusOut,ne.nativeEvent);e.setOpen(!1,ye);let be=S?.current??D;!ye.isCanceled&&tt(be)&&be.focus();return}ge(ne)},onPointerMove(ne){EI(ne)||(Y.current=!0)}}),[W,ge,A,O,e,N,p,D,S]),xe=pr.useMemo(()=>{function ne(be){e.setOpen(!0,fe(U.listNavigation,be.nativeEvent,be.currentTarget))}function oe(be){f==="auto"&&hn(be.nativeEvent)&&(F.current=!p)}function ye(be){F.current=f,f==="auto"&&ms(be.nativeEvent)&&(F.current=!0)}return{onKeyDown(be){let se=e.select("open");Y.current=!1;let Ne=be.key.startsWith("Arrow"),Ae=ku(be.key,he(),u),Ve=yn(be.key,se?g:b),Te=(c?Ae:Ve)||be.key==="Enter"||be.key.trim()==="";if(p&&se&&(!c||Hn(be.currentTarget)))return ge(be);if(!(!se&&!d&&Ne)){if(Te){let De=yn(be.key,he());k.current=c&&De?null:be.key}if(c){Ae&&(xt(be),se?(B.current=Pe(),V(be),p&&A.current?.focus()):ne(be));return}Ve&&(de.current!=null&&(B.current=de.current),xt(be),!se&&d?ne(be):ge(be),se&&V(be))}},onFocus(be){be.target===be.currentTarget&&e.select("open")&&!p&&(B.current=-1,V(be))},onPointerDown:ye,onPointerEnter:ye,onMouseDown:oe,onClick:oe}},[ge,f,Pe,c,V,e,d,g,b,he,u,de,p,A]),ve=pr.useMemo(()=>({...W,...xe}),[W,xe]);return pr.useMemo(()=>s?{reference:ve,floating:me,item:Ce,trigger:xe}:{},[s,ve,me,xe,Ce])}var $a=T(M(),1);function Xa(e,t){let{listRef:o,elementsRef:r,activeIndex:n,onMatch:s,disabledIndices:i,onTyping:l,enabled:a=!0,resetMs:c=750,selectedIndex:u=null}=t,p=j(l),f=e.useState("open"),m=it(),d=$a.useRef(""),R=$a.useRef(u??n??-1),g=$a.useRef(null),b=j(y=>{function C(O){return r?.current[O]}function S(O){let A=C(O);return A&&!Wa(A)||A?.matches(":disabled")?!1:i==null||!Wn(yt,O,i)}function E(O,A,L=0){if(O.length===0)return-1;let X=(L%O.length+O.length)%O.length,F=A.toLowerCase();for(let B=0;B<O.length;B+=1){let k=(X+B)%O.length;if(!(!O[k]?.toLowerCase().startsWith(F)||!S(k)))return k}return-1}let P=o.current;if(d.current.length>0&&y.key===" "&&(xt(y),p?.(!0)),d.current.length>0&&d.current[0]!==" "&&E(P,d.current)===-1&&y.key!==" "&&p?.(!1),P==null||y.key.length!==1||y.ctrlKey||y.metaKey||y.altKey)return;f&&y.key!==" "&&(xt(y),p?.(!0));let N=d.current==="";N&&(R.current=u??n??-1),P.every((O,A)=>O&&S(A)?O[0]?.toLowerCase()!==O[1]?.toLowerCase():!0)&&d.current===y.key&&(d.current="",R.current=g.current),d.current+=y.key,m.start(c,()=>{d.current="",R.current=g.current,p?.(!1)});let G=((N?u??n??-1:R.current)??0)+1,I=E(P,d.current,G);I!==-1?(s?.(I,y),g.current=I):y.key!==" "&&(d.current="",p?.(!1))}),x=j(y=>{let C=y.relatedTarget,S=e.select("domReferenceElement"),E=e.select("floatingElement");Ee(S,C)||Ee(E,C)||(m.clear(),d.current="",R.current=g.current,p?.(!1))});z(()=>{!f&&u!==null||(m.clear(),g.current=null,d.current!==""&&(d.current="",p?.(!1)))},[f,u,m,p]);let h=$a.useMemo(()=>({onKeyDown:b,onBlur:x}),[b,x]);return $a.useMemo(()=>a?{reference:h,floating:h}:{},[a,h])}var SI=.1,cU=SI*SI,qt=.5;function md(e,t,o,r,n,s){return r>=t!=s>=t&&e<=(n-o)*(t-r)/(s-r)+o}function gd(e,t,o,r,n,s,i,l,a,c){let u=!1;return md(e,t,o,r,n,s)&&(u=!u),md(e,t,n,s,i,l)&&(u=!u),md(e,t,i,l,a,c)&&(u=!u),md(e,t,a,c,o,r)&&(u=!u),u}function lU(e,t,o){return e>=o.x&&e<=o.x+o.width&&t>=o.y&&t<=o.y+o.height}function xd(e,t,o,r,n,s){let i=Math.min(o,n),l=Math.max(o,n),a=Math.min(r,s),c=Math.max(r,s);return e>=i&&e<=l&&t>=a&&t<=c}function fn(e={}){let{blockPointerEvents:t=!1}=e,o=new mo,r=({x:n,y:s,placement:i,elements:l,onClose:a,nodeId:c,tree:u})=>{let p=i?.split("-")[0],f=!1,m=null,d=null,R=typeof performance<"u"?performance.now():0;function g(x,h){let y=performance.now(),C=y-R;if(m===null||d===null||C===0)return m=x,d=h,R=y,!1;let S=x-m,E=h-d,P=S*S+E*E,N=C*C*cU;return m=x,d=h,R=y,P<N}function b(){o.clear(),a()}return function(h){o.clear();let y=l.domReference,C=l.floating;if(!y||!C||p==null||n==null||s==null)return;let{clientX:S,clientY:E}=h,P=$e(h),N=h.type==="mouseleave",w=Ee(C,P),D=Ee(y,P);if(w&&(f=!0,!N))return;if(D&&(f=!1,!N)){f=!0;return}if(N&&st(h.relatedTarget)&&Ee(C,h.relatedTarget))return;function G(){return!!(u&&Kr(u.nodesRef.current,c).length>0)}function I(){G()||b()}if(G())return;let O=y.getBoundingClientRect(),A=C.getBoundingClientRect(),L=n>A.right-A.width/2,X=s>A.bottom-A.height/2,F=A.width>O.width,B=A.height>O.height,k=(F?O:A).left,Y=(F?O:A).right,V=(B?O:A).top,q=(B?O:A).bottom;if(p==="top"&&s>=O.bottom-1||p==="bottom"&&s<=O.top+1||p==="left"&&n>=O.right-1||p==="right"&&n<=O.left+1){I();return}let H=!1;switch(p){case"top":H=xd(S,E,k,O.top+1,Y,A.bottom-1);break;case"bottom":H=xd(S,E,k,A.top+1,Y,O.bottom-1);break;case"left":H=xd(S,E,A.right-1,q,O.left+1,V);break;case"right":H=xd(S,E,O.right-1,q,A.left+1,V);break;default:}if(H)return;if(f&&!lU(S,E,O)){I();return}if(!N&&g(S,E)){I();return}let K=!1;switch(p){case"top":{let Z=F?qt/2:qt*4,ee=F||L?n+Z:n-Z,Q=F?n-Z:L?n+Z:n-Z,te=s+qt+1,de=L||F?A.bottom-qt:A.top,ue=L?F?A.bottom-qt:A.top:A.bottom-qt;K=gd(S,E,ee,te,Q,te,A.left,de,A.right,ue);break}case"bottom":{let Z=F?qt/2:qt*4,ee=F||L?n+Z:n-Z,Q=F?n-Z:L?n+Z:n-Z,te=s-qt,de=L||F?A.top+qt:A.bottom,ue=L?F?A.top+qt:A.bottom:A.top+qt;K=gd(S,E,ee,te,Q,te,A.left,de,A.right,ue);break}case"left":{let Z=B?qt/2:qt*4,ee=B||X?s+Z:s-Z,Q=B?s-Z:X?s+Z:s-Z,te=n+qt+1,de=X||B?A.right-qt:A.left,ue=X?B?A.right-qt:A.left:A.right-qt;K=gd(S,E,de,A.top,ue,A.bottom,te,ee,te,Q);break}case"right":{let Z=B?qt/2:qt*4,ee=B||X?s+Z:s-Z,Q=B?s-Z:X?s+Z:s-Z,te=n-qt,de=X||B?A.left+qt:A.right,ue=X?B?A.left+qt:A.right:A.left+qt;K=gd(S,E,te,ee,te,Q,de,A.top,ue,A.bottom);break}default:}K?f||o.start(40,I):I()}};return r.__options={...e,blockPointerEvents:t},r}function PI(e,t,o){let{reference:r,floating:n}=e,s=Yr(t),i=Su(t),l=Eu(i),a=nr(t),c=s==="y",u=r.x+r.width/2-n.width/2,p=r.y+r.height/2-n.height/2,f=r[l]/2-n[l]/2,m;switch(a){case"top":m={x:u,y:r.y-n.height};break;case"bottom":m={x:u,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:p};break;case"left":m={x:r.x-n.width,y:p};break;default:m={x:r.x,y:r.y}}let d=nn(t);return d&&(m[i]+=f*(d==="end"?1:-1)*(o&&c?-1:1)),m}async function TI(e,t){var o;t===void 0&&(t={});let{x:r,y:n,platform:s,rects:i,elements:l,strategy:a}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:p="floating",altBoundary:f=!1,padding:m=0}=Rs(t,e),d=$f(m),g=l[f?p==="floating"?"reference":"floating":p],b=ri(await s.getClippingRect({element:(o=await(s.isElement==null?void 0:s.isElement(g)))==null||o?g:g.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:a})),x=p==="floating"?{x:r,y:n,width:i.floating.width,height:i.floating.height}:i.reference,h=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),y=await(s.isElement==null?void 0:s.isElement(h))&&await(s.getScale==null?void 0:s.getScale(h))||{x:1,y:1},C=ri(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:x,offsetParent:h,strategy:a}):x);return{top:(b.top-C.top+d.top)/y.y,bottom:(C.bottom-b.bottom+d.bottom)/y.y,left:(b.left-C.left+d.left)/y.x,right:(C.right-b.right+d.right)/y.x}}var uU=50,wI=async(e,t,o)=>{let{placement:r="bottom",strategy:n="absolute",middleware:s=[],platform:i}=o,l=i.detectOverflow?i:{...i,detectOverflow:TI},a=await(i.isRTL==null?void 0:i.isRTL(t)),c=await i.getElementRects({reference:e,floating:t,strategy:n}),{x:u,y:p}=PI(c,r,a),f=r,m=0,d={};for(let R=0;R<s.length;R++){let g=s[R];if(!g)continue;let{name:b,fn:x}=g,{x:h,y,data:C,reset:S}=await x({x:u,y:p,initialPlacement:r,placement:f,strategy:n,middlewareData:d,rects:c,platform:l,elements:{reference:e,floating:t}});u=h??u,p=y??p,d[b]={...d[b],...C},S&&m<uU&&(m++,typeof S=="object"&&(S.placement&&(f=S.placement),S.rects&&(c=S.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:n}):S.rects),{x:u,y:p}=PI(c,f,a)),R=-1)}return{x:u,y:p,placement:f,strategy:n,middlewareData:d}};var II=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var o,r;let{placement:n,middlewareData:s,rects:i,initialPlacement:l,platform:a,elements:c}=t,{mainAxis:u=!0,crossAxis:p=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:d="none",flipAlignment:R=!0,...g}=Rs(e,t);if((o=s.arrow)!=null&&o.alignmentOffset)return{};let b=nr(n),x=Yr(l),h=nr(l)===l,y=await(a.isRTL==null?void 0:a.isRTL(c.floating)),C=f||(h||!R?[vu(l)]:Dw(l)),S=d!=="none";!f&&S&&C.push(...Nw(l,R,d,y));let E=[l,...C],P=await a.detectOverflow(t,g),N=[],w=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&N.push(P[b]),p){let O=Mw(n,i,y);N.push(P[O[0]],P[O[1]])}if(w=[...w,{placement:n,overflows:N}],!N.every(O=>O<=0)){var D,G;let O=(((D=s.flip)==null?void 0:D.index)||0)+1,A=E[O];if(A&&(!(p==="alignment"?x!==Yr(A):!1)||w.every(F=>Yr(F.placement)===x?F.overflows[0]>0:!0)))return{data:{index:O,overflows:w},reset:{placement:A}};let L=(G=w.filter(X=>X.overflows[0]<=0).sort((X,F)=>X.overflows[1]-F.overflows[1])[0])==null?void 0:G.placement;if(!L)switch(m){case"bestFit":{var I;let X=(I=w.filter(F=>{if(S){let B=Yr(F.placement);return B===x||B==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(B=>B>0).reduce((B,k)=>B+k,0)]).sort((F,B)=>F[1]-B[1])[0])==null?void 0:I[0];X&&(L=X);break}case"initialPlacement":L=l;break}if(n!==L)return{reset:{placement:L}}}return{}}}};var MI=new Set(["left","top"]);async function pU(e,t){let{placement:o,platform:r,elements:n}=e,s=await(r.isRTL==null?void 0:r.isRTL(n.floating)),i=nr(o),l=nn(o),a=Yr(o)==="y",c=MI.has(i)?-1:1,u=s&&a?-1:1,p=Rs(t,e),{mainAxis:f,crossAxis:m,alignmentAxis:d}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return l&&typeof d=="number"&&(m=l==="end"?d*-1:d),a?{x:m*u,y:f*c}:{x:f*c,y:m*u}}var DI=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var o,r;let{x:n,y:s,placement:i,middlewareData:l}=t,a=await pU(t,e);return i===((o=l.offset)==null?void 0:o.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:n+a.x,y:s+a.y,data:{...a,placement:i}}}}},NI=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:o,y:r,placement:n,platform:s}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:a={fn:x=>{let{x:h,y}=x;return{x:h,y}}},...c}=Rs(e,t),u={x:o,y:r},p=await s.detectOverflow(t,c),f=Yr(n),m=zf(f),d=u[m],R=u[f],g=(x,h)=>Kf(h+p[x==="y"?"top":"left"],h,h-p[x==="y"?"bottom":"right"]);i&&(d=g(m,d)),l&&(R=g(f,R));let b=a.fn({...t,[m]:d,[f]:R});return{...b,data:{x:b.x-o,y:b.y-r,enabled:{[m]:i,[f]:l}}}}}},AI=function(e){return e===void 0&&(e={}),{options:e,fn(t){var o,r;let{x:n,y:s,placement:i,rects:l,middlewareData:a}=t,{offset:c=0,mainAxis:u=!0,crossAxis:p=!0}=Rs(e,t),f={x:n,y:s},m=Yr(i),d=zf(m),R=f[d],g=f[m],b=Rs(c,t),x=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:(o=b.mainAxis)!=null?o:0,crossAxis:(r=b.crossAxis)!=null?r:0};if(u){let C=d==="y"?"height":"width",S=l.reference[d]-l.floating[C]+x.mainAxis,E=l.reference[d]+l.reference[C]-x.mainAxis;R<S?R=S:R>E&&(R=E)}if(p){var h,y;let C=d==="y"?"width":"height",S=MI.has(nr(i)),E=l.reference[m]-l.floating[C]+(S&&((h=a.offset)==null?void 0:h[m])||0)+(S?0:x.crossAxis),P=l.reference[m]+l.reference[C]+(S?0:((y=a.offset)==null?void 0:y[m])||0)-(S?x.crossAxis:0);g<E?g=E:g>P&&(g=P)}return{[d]:R,[m]:g}}}},OI=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){let{placement:o,rects:r,platform:n,elements:s}=t,{apply:i=()=>{},...l}=Rs(e,t),a=await n.detectOverflow(t,l),c=nr(o),u=nn(o),p=Yr(o)==="y",{width:f,height:m}=r.floating,d,R;c==="top"||c==="bottom"?(d=c,R=u===(await(n.isRTL==null?void 0:n.isRTL(s.floating))?"start":"end")?"left":"right"):(R=c,d=u==="end"?"top":"bottom");let g=m-a.top-a.bottom,b=f-a.left-a.right,x=Bi(m-a[d],g),h=Bi(f-a[R],b),y=t.middlewareData.shift,C=!y,S=x,E=h;y!=null&&y.enabled.x&&(E=b),y!=null&&y.enabled.y&&(S=g),C&&!u&&(p?E=f-2*Gn(a.left,a.right):S=m-2*Gn(a.top,a.bottom)),await i({...t,availableWidth:E,availableHeight:S});let P=await n.getDimensions(s.floating);return f!==P.width||m!==P.height?{reset:{rects:!0}}:{}}}};function LI(e){let t=fo(e),o=parseFloat(t.width)||0,r=parseFloat(t.height)||0,n=tt(e),s=n?e.offsetWidth:o,i=n?e.offsetHeight:r,l=Hi(o)!==s||Hi(r)!==i;return l&&(o=s,r=i),{width:o,height:r,$:l}}function Zb(e){return st(e)?e:e.contextElement}function Hc(e){let t=Zb(e);if(!tt(t))return xs(1);let o=t.getBoundingClientRect(),{width:r,height:n,$:s}=LI(t),i=(s?Hi(o.width):o.width)/r,l=(s?Hi(o.height):o.height)/n;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}var fU=xs(0);function kI(e){let t=Ze(e);return!Nf()||!t.visualViewport?fU:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function dU(e,t,o){return t===void 0&&(t=!1),!!o&&t&&o===Ze(e)}function qa(e,t,o,r){t===void 0&&(t=!1),o===void 0&&(o=!1);let n=e.getBoundingClientRect(),s=Zb(e),i=xs(1);t&&(r?st(r)&&(i=Hc(r)):i=Hc(e));let l=dU(s,o,r)?kI(s):xs(0),a=(n.left+l.x)/i.x,c=(n.top+l.y)/i.y,u=n.width/i.x,p=n.height/i.y;if(s&&r){let f=Ze(s),m=st(r)?Ze(r):r,d=f,R=Af(d);for(;R&&m!==d;){let g=Hc(R),b=R.getBoundingClientRect(),x=fo(R),h=b.left+(R.clientLeft+parseFloat(x.paddingLeft))*g.x,y=b.top+(R.clientTop+parseFloat(x.paddingTop))*g.y;a*=g.x,c*=g.y,u*=g.x,p*=g.y,a+=h,c+=y,d=Ze(R),R=Af(d)}}return ri({width:u,height:p,x:a,y:c})}function Rd(e,t){let o=gu(e).scrollLeft;return t?t.left+o:qa(ds(e)).left+o}function _I(e,t){let o=e.getBoundingClientRect(),r=o.left+t.scrollLeft-Rd(e,o),n=o.top+t.scrollTop;return{x:r,y:n}}function mU(e){let{elements:t,rect:o,offsetParent:r,strategy:n}=e,s=n==="fixed",i=ds(r),l=t?mu(t.floating):!1;if(r===i||l&&s)return o;let a={scrollLeft:0,scrollTop:0},c=xs(1),u=xs(0),p=tt(r);if((p||!s)&&((Io(r)!=="body"||_a(i))&&(a=gu(r)),p)){let m=qa(r);c=Hc(r),u.x=m.x+r.clientLeft,u.y=m.y+r.clientTop}let f=i&&!p&&!s?_I(i,a):xs(0);return{width:o.width*c.x,height:o.height*c.y,x:o.x*c.x-a.scrollLeft*c.x+u.x+f.x,y:o.y*c.y-a.scrollTop*c.y+u.y+f.y}}function gU(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function xU(e){let t=gu(e),o=e.ownerDocument.body,r=Gn(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),n=Gn(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight),s=-t.scrollLeft+Rd(e),i=-t.scrollTop;return fo(o).direction==="rtl"&&(s+=Gn(e.clientWidth,o.clientWidth)-r),{width:r,height:n,x:s,y:i}}var RU=25;function hU(e,t,o){o===void 0&&(o="viewport");let r=o==="layoutViewport",n=Ze(e),s=ds(e),i=n.visualViewport,l=s.clientWidth,a=s.clientHeight,c=0,u=0;if(i){let f=!Nf()||t==="fixed";r?f||(c=-i.offsetLeft,u=-i.offsetTop):(l=i.width,a=i.height,f&&(c=i.offsetLeft,u=i.offsetTop))}if(Rd(s)<=0){let f=s.ownerDocument,m=f.body,d=getComputedStyle(m),R=f.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,g=Math.abs(s.clientWidth-m.clientWidth-R),b=getComputedStyle(s).scrollbarGutter==="stable both-edges"?g/2:g;b<=RU&&(l-=b)}return{width:l,height:a,x:c,y:u}}function bU(e,t){let o=qa(e,!0,t==="fixed"),r=o.top+e.clientTop,n=o.left+e.clientLeft,s=Hc(e),i=e.clientWidth*s.x,l=e.clientHeight*s.y,a=n*s.x,c=r*s.y;return{width:i,height:l,x:a,y:c}}function VI(e,t,o){let r;if(t==="viewport"||t==="layoutViewport")r=hU(e,o,t);else if(t==="document")r=xU(ds(e));else if(st(t))r=bU(t,o);else{let n=kI(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return ri(r)}function CU(e,t){let o=t.get(e);if(o)return o;let r=_n(e,[],!1).filter(l=>st(l)&&Io(l)!=="body"),n=null,s=fo(e).position==="fixed",i=s?zo(e):e;for(;st(i)&&!Cr(i);){let l=fo(i),a=Df(i),c=n?n.position:s?"fixed":"";!a&&(c==="fixed"||c==="absolute"&&l.position==="static")?r=r.filter(p=>p!==i):n=l,i=zo(i)}return t.set(e,r),r}function yU(e){let{element:t,boundary:o,rootBoundary:r,strategy:n}=e,i=[...o==="clippingAncestors"?mu(t)?[]:CU(t,this._c):[].concat(o),r],l=VI(t,i[0],n),a=l.top,c=l.right,u=l.bottom,p=l.left;for(let f=1;f<i.length;f++){let m=VI(t,i[f],n);a=Gn(m.top,a),c=Bi(m.right,c),u=Bi(m.bottom,u),p=Gn(m.left,p)}return{width:c-p,height:u-a,x:p,y:a}}function vU(e){let{width:t,height:o}=LI(e);return{width:t,height:o}}function EU(e,t,o){let r=tt(t),n=ds(t),s=o==="fixed",i=qa(e,!0,s,t),l={scrollLeft:0,scrollTop:0},a=xs(0);if((r||!s)&&((Io(t)!=="body"||_a(n))&&(l=gu(t)),r)){let f=qa(t,!0,s,t);a.x=f.x+t.clientLeft,a.y=f.y+t.clientTop}!r&&n&&(a.x=Rd(n));let c=n&&!r&&!s?_I(n,l):xs(0),u=i.left+l.scrollLeft-a.x-c.x,p=i.top+l.scrollTop-a.y-c.y;return{x:u,y:p,width:i.width,height:i.height}}function Qb(e){return fo(e).position==="static"}function FI(e,t){if(!tt(e)||fo(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return ds(e)===o&&(o=o.ownerDocument.body),o}function BI(e,t){let o=Ze(e);if(mu(e))return o;if(!tt(e)){let n=zo(e);for(;n&&!Cr(n);){if(st(n)&&!Qb(n))return n;n=zo(n)}return o}let r=FI(e,t);for(;r&&rw(r)&&Qb(r);)r=FI(r,t);return r&&Cr(r)&&Qb(r)&&!Df(r)?o:r||nw(e)||o}var SU=async function(e){let t=this.getOffsetParent||BI,o=this.getDimensions,r=await o(e.floating);return{reference:EU(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function PU(e){return fo(e).direction==="rtl"}var _u={convertOffsetParentRelativeRectToViewportRelativeRect:mU,getDocumentElement:ds,getClippingRect:yU,getOffsetParent:BI,getElementRects:SU,getClientRects:gU,getDimensions:vU,getScale:Hc,isElement:st,isRTL:PU};function HI(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function TU(e,t,o){let r=null,n,s=ds(e);function i(){var u;clearTimeout(n),(u=r)==null||u.disconnect(),r=null}function l(u,p){u===void 0&&(u=!1),p===void 0&&(p=1),i();let f=e.getBoundingClientRect(),{left:m,top:d,width:R,height:g}=f;if(u||t(),!R||!g)return;let b=oi(d),x=oi(s.clientWidth-(m+R)),h=oi(s.clientHeight-(d+g)),y=oi(m),S={rootMargin:-b+"px "+-x+"px "+-h+"px "+-y+"px",threshold:Gn(0,Bi(1,p))||1},E=!0;function P(N){let w=N[0].intersectionRatio;if(!HI(f,e.getBoundingClientRect()))return l();if(w!==p){if(!E)return l();w?l(!1,w):n=setTimeout(()=>{l(!1,1e-7)},1e3)}E=!1}try{r=new IntersectionObserver(P,{...S,root:s.ownerDocument})}catch{r=new IntersectionObserver(P,S)}r.observe(e)}let a=Ze(e),c=()=>l(o);return a.addEventListener("resize",c),l(!0),()=>{a.removeEventListener("resize",c),i()}}function Bu(e,t,o,r){r===void 0&&(r={});let{ancestorScroll:n=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:a=!1}=r,c=Zb(e),u=n||s?[...c?_n(c):[],...t?_n(t):[]]:[];u.forEach(b=>{n&&b.addEventListener("scroll",o),s&&b.addEventListener("resize",o)});let p=c&&l?TU(c,o,s):null,f=-1,m=null;i&&(m=new ResizeObserver(b=>{let[x]=b;x&&x.target===c&&m&&t&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var h;(h=m)==null||h.observe(t)})),o()}),c&&!a&&m.observe(c),t&&m.observe(t));let d,R=a?qa(e):null;a&&g();function g(){let b=qa(e);R&&!HI(R,b)&&o(),R=b,d=requestAnimationFrame(g)}return o(),()=>{var b;u.forEach(x=>{n&&x.removeEventListener("scroll",o),s&&x.removeEventListener("resize",o)}),p?.(),(b=m)==null||b.disconnect(),m=null,a&&cancelAnimationFrame(d)}}var UI=DI;var GI=NI,WI=II,jI=OI;var YI=AI,hd=(e,t,o)=>{let r=new Map,n=o??{},s={..._u,...n.platform,_c:r};return wI(e,t,{...n,platform:s})};var Lo=T(M(),1),zI=T(M(),1),$I=T($o(),1),IU=typeof document<"u",MU=function(){},bd=IU?zI.useLayoutEffect:MU;function Cd(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let o,r,n;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(o=e.length,o!==t.length)return!1;for(r=o;r--!==0;)if(!Cd(e[r],t[r]))return!1;return!0}if(n=Object.keys(e),o=n.length,o!==Object.keys(t).length)return!1;for(r=o;r--!==0;)if(!{}.hasOwnProperty.call(t,n[r]))return!1;for(r=o;r--!==0;){let s=n[r];if(!(s==="_owner"&&e.$$typeof)&&!Cd(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function XI(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function KI(e,t){let o=XI(e);return Math.round(t*o)/o}function eC(e){let t=Lo.useRef(e);return bd(()=>{t.current=e}),t}function qI(e){e===void 0&&(e={});let{placement:t="bottom",strategy:o="absolute",middleware:r=[],platform:n,elements:{reference:s,floating:i}={},transform:l=!0,whileElementsMounted:a,open:c}=e,[u,p]=Lo.useState({x:0,y:0,strategy:o,placement:t,middlewareData:{},isPositioned:!1}),[f,m]=Lo.useState(r);Cd(f,r)||m(r);let[d,R]=Lo.useState(null),[g,b]=Lo.useState(null),x=Lo.useCallback(F=>{F!==S.current&&(S.current=F,R(F))},[]),h=Lo.useCallback(F=>{F!==E.current&&(E.current=F,b(F))},[]),y=s||d,C=i||g,S=Lo.useRef(null),E=Lo.useRef(null),P=Lo.useRef(u),N=a!=null,w=eC(a),D=eC(n),G=eC(c),I=Lo.useCallback(()=>{if(!S.current||!E.current)return;let F={placement:t,strategy:o,middleware:f};D.current&&(F.platform=D.current),hd(S.current,E.current,F).then(B=>{let k={...B,isPositioned:G.current!==!1};O.current&&!Cd(P.current,k)&&(P.current=k,$I.flushSync(()=>{p(k)}))})},[f,t,o,D,G]);bd(()=>{c===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,p(F=>({...F,isPositioned:!1})))},[c]);let O=Lo.useRef(!1);bd(()=>(O.current=!0,()=>{O.current=!1}),[]),bd(()=>{if(y&&(S.current=y),C&&(E.current=C),y&&C){if(w.current)return w.current(y,C,I);I()}},[y,C,I,w,N]);let A=Lo.useMemo(()=>({reference:S,floating:E,setReference:x,setFloating:h}),[x,h]),L=Lo.useMemo(()=>({reference:y,floating:C}),[y,C]),X=Lo.useMemo(()=>{let F={position:o,left:0,top:0};if(!L.floating)return F;let B=KI(L.floating,u.x),k=KI(L.floating,u.y);return l?{...F,transform:"translate("+B+"px, "+k+"px)",...XI(L.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:B,top:k}},[o,l,L.floating,u.x,u.y]);return Lo.useMemo(()=>({...u,update:I,refs:A,elements:L,floatingStyles:X}),[u,I,A,L,X])}var tC=(e,t)=>{let o=UI(e);return{name:o.name,fn:o.fn,options:[e,t]}},oC=(e,t)=>{let o=GI(e);return{name:o.name,fn:o.fn,options:[e,t]}},rC=(e,t)=>({fn:YI(e).fn,options:[e,t]}),nC=(e,t)=>{let o=WI(e);return{name:o.name,fn:o.fn,options:[e,t]}},sC=(e,t)=>{let o=jI(e);return{name:o.name,fn:o.fn,options:[e,t]}};function JI({store:e,parentContext:t,isDrawer:o}){let r=e.useState("open"),n=e.useState("mounted"),s=e.useState("disablePointerDismissal"),i=e.useState("modal"),l=e.useState("popupElement"),a=e.useState("floatingRootContext"),[c,u]=iC.useState(0),[p,f]=iC.useState(0),m=c===0,d=ur(a,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?"intentional":{mouse:i==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(R){if(!e.context.outsidePressEnabledRef.current||"button"in R&&R.button!==0)return!1;if("touches"in R){if(R.type==="touchend"){if(R.changedTouches.length!==1||R.touches.length!==0)return!1}else if(R.touches.length!==1)return!1}let g=$e(R);if(m&&!s){if(i){let b=e.context.internalBackdropRef.current,x=e.context.backdropRef.current;return b||x?b===g||x===g||Ee(g,l)&&!g?.hasAttribute("data-base-ui-portal"):!0}return!0}return!1},escapeKey:m});return Hf(r&&i===!0,l),e.useContextCallback("onNestedDialogOpen",(R,g)=>{!e.select("open")&&!e.select("mounted")||(u(R),f(g))}),z(()=>{!r&&!n&&(u(0),f(0))},[r,n]),z(()=>(t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(c+1,p+(o?1:0)),()=>{t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(0,0)}),[o,r,c,p,t]),Ss(e,{activeTriggerProps:d.reference,inactiveTriggerProps:d.trigger,popupProps:d.floating,nestedOpenDialogCount:c,nestedOpenDrawerCount:p}),null}var yd=T(M(),1),aC=yd.createContext(void 0);function _t(e){let t=yd.useContext(aC);if(!e&&t===void 0)throw new Error(Me(27));return t}var vd=T(M(),1);var vn=class extends go{setState(t){}update(t){}set(t,o){}notifyAll(){}};var QI={...Vr,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role},Ed=class extends go{constructor(o,r,n){let s=new Mo,i=eM(o,s,r,n);super(i,tM(s),QI);ot(this,"setOpen",(o,r)=>{r.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!o&&r.trigger==null&&this.state.activeTriggerId!=null&&(r.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(o,r),!r.isCanceled&&(this.state.floatingRootContext.dispatchOpenChange(o,r),this.update(ja(this.state,o,r.trigger)))})}};function ZI(){let e=new Mo;return new vn(Object.freeze(eM(void 0,e)),Object.freeze(tM(e)),QI)}function eM(e,t,o,r=!1){return{...ws(t,o,r),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...e}}function tM(e){return{popupRef:vd.createRef(),backdropRef:vd.createRef(),internalBackdropRef:vd.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function Uc(e,t){let{children:o,open:r,defaultOpen:n=!1,onOpenChange:s,onOpenChangeComplete:i,disablePointerDismissal:l=!1,modal:a=!0,actionsRef:c,handle:u,triggerId:p,defaultTriggerId:f=null}=t,m=e==="drawer",d=e==="alert-dialog",R=d?!0:a,g=d||l,b=d?"alertdialog":"dialog",x=_t(!0),h=x!=null,y={modal:R,disablePointerDismissal:g,nested:h,role:b},C=$i((D,G)=>new Ed({open:n,openProp:r,activeTriggerId:f,triggerIdProp:p,...y},D,G),!0);C.useControlledProp("openProp",r),C.useControlledProp("triggerIdProp",p),C.useSyncedValues(y),C.useContextCallback("onOpenChange",s),C.useContextCallback("onOpenChangeComplete",i);let S=C.useState("open"),E=C.useState("mounted"),P=C.useState("payload");cd(C,S),vs(C);let{forceUnmount:N}=Es(S,C);oM.useImperativeHandle(c,()=>({unmount:N,close:()=>C.setOpen(!1,fe(U.imperativeAction))}),[N,C]);let w=S||E||u!=null;return v(aC.Provider,{value:C,children:[u&&v(Cs,{handle:u,store:C}),w&&v(JI,{store:C,parentContext:x?.context,isDrawer:m}),typeof o=="function"?o({payload:P}):o]})}function rM(e){return Uc("alert-dialog",e)}var nM=T(M(),1);var Sd=nM.forwardRef(function(t,o){let{render:r,className:n,style:s,forceRender:i=!1,...l}=t,a=_t(),c=a.useState("open"),u=a.useState("nested"),p=a.useState("mounted"),f=a.useState("transitionStatus");return _("div",t,{state:{open:c,transitionStatus:f},ref:[a.context.backdropRef,o],stateAttributesMapping:ro,props:[{role:"presentation",hidden:!p,style:{userSelect:"none",WebkitUserSelect:"none"}},l],enabled:i||!u})});var sM=T(M(),1);var Gc=sM.forwardRef(function(t,o){let{render:r,className:n,style:s,disabled:i=!1,nativeButton:l=!0,...a}=t,c=_t(),u=c.useState("open"),{getButtonProps:p,buttonRef:f}=ft({disabled:i,native:l}),m={disabled:i};function d(R){u&&c.setOpen(!1,fe(U.closePress,R.nativeEvent))}return _("button",t,{state:m,ref:[o,f],props:[{onClick:d},a,p]})});var iM=T(M(),1);var Wc=iM.forwardRef(function(t,o){let{render:r,className:n,style:s,id:i,...l}=t,a=_t(),c=je(i);return a.useSyncedValueWithCleanup("descriptionElementId",c),_("p",t,{ref:o,props:[{id:c},l]})});var lM=T(M(),1);var Pd=T(M(),1),cC=Pd.createContext(void 0);function jc(){let e=Pd.useContext(cC);if(e===void 0)throw new Error(Me(26));return e}var Yc="ArrowUp",Kc="ArrowDown",zc="ArrowLeft",$c="ArrowRight",Xc="Home",qc="End",lC="PageUp",uC="PageDown",Fr=new Set([Yc,Kc,zc,$c,Xc,qc]),pC="Shift",cM=[pC,"Control","Alt","Meta"];function DU(e){return tt(e)&&e.tagName==="INPUT"}function fC(e){return!!(DU(e)&&e.selectionStart!=null||tt(e)&&e.tagName==="TEXTAREA")}function dC(e,t,o,r){if(!e||!t||!t.scrollTo)return;let n=e.scrollLeft,s=e.scrollTop,i=e.clientWidth<e.scrollWidth,l=e.clientHeight<e.scrollHeight;if(i&&r!=="vertical"){let a=aM(e,t,"left"),c=Td(e),u=Td(t);o==="ltr"&&(a+t.offsetWidth+u.scrollMarginRight>e.scrollLeft+e.clientWidth-c.scrollPaddingRight?n=a+t.offsetWidth+u.scrollMarginRight-e.clientWidth+c.scrollPaddingRight:a-u.scrollMarginLeft<e.scrollLeft+c.scrollPaddingLeft&&(n=a-u.scrollMarginLeft-c.scrollPaddingLeft)),o==="rtl"&&(a-u.scrollMarginLeft<e.scrollLeft+c.scrollPaddingLeft?n=a-u.scrollMarginLeft-c.scrollPaddingLeft:a+t.offsetWidth+u.scrollMarginRight>e.scrollLeft+e.clientWidth-c.scrollPaddingRight&&(n=a+t.offsetWidth+u.scrollMarginRight-e.clientWidth+c.scrollPaddingRight))}if(l&&r!=="horizontal"){let a=aM(e,t,"top"),c=Td(e),u=Td(t);a-u.scrollMarginTop<e.scrollTop+c.scrollPaddingTop?s=a-u.scrollMarginTop-c.scrollPaddingTop:a+t.offsetHeight+u.scrollMarginBottom>e.scrollTop+e.clientHeight-c.scrollPaddingBottom&&(s=a+t.offsetHeight+u.scrollMarginBottom-e.clientHeight+c.scrollPaddingBottom)}e.scrollTo({left:n,top:s,behavior:"auto"})}function aM(e,t,o){let r=o==="left"?"offsetLeft":"offsetTop",n=0;for(;t.offsetParent&&(n+=t[r],t.offsetParent!==e);)t=t.offsetParent;return n}function Td(e){let t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}var Hu={};ae(Hu,{nestedDialogs:()=>mC});var mC="--nested-dialogs";var Uu={};ae(Uu,{closed:()=>AU,endingStyle:()=>VU,nested:()=>FU,nestedDialogOpen:()=>gC,open:()=>NU,startingStyle:()=>OU});var NU=ce.open,AU=ce.closed,OU=ce.startingStyle,VU=ce.endingStyle,FU="data-nested",gC="data-nested-dialog-open";var wd={...Qt,...Ot,nestedDialogOpen(e){return e?{[gC]:""}:null}};var Id=lM.forwardRef(function(t,o){let{render:r,className:n,style:s,finalFocus:i,initialFocus:l,...a}=t,c=_t(),u=c.useState("descriptionElementId"),p=c.useState("disablePointerDismissal"),f=c.useState("floatingRootContext"),m=c.useState("popupProps"),d=c.useState("modal"),R=c.useState("mounted"),g=c.useState("nested"),b=c.useState("nestedOpenDialogCount"),x=c.useState("open"),h=c.useState("openMethod"),y=c.useState("titleElementId"),C=c.useState("transitionStatus"),S=c.useState("role"),E=f.useState("floatingId");jc(),St({open:x,ref:c.context.popupRef,onComplete(){x&&c.context.onOpenChangeComplete?.(!0)}});let P=l===void 0?id(c.context.popupRef):l,N=b>0,w=c.useStateSetter("popupElement"),G=_("div",t,{state:{open:x,nested:g,transitionStatus:C,nestedDialogOpen:N},props:[m,{id:E,"aria-labelledby":y,"aria-describedby":u,role:S,...Sr,hidden:!R,onKeyDown(I){Fr.has(I.key)&&I.stopPropagation()},style:{[mC]:b}},a],ref:[o,c.context.popupRef,w],stateAttributesMapping:wd});return v(un,{context:f,openInteractionType:h,disabled:!R,closeOnFocusOut:!p,initialFocus:P,returnFocus:i,modal:d!==!1,restoreFocus:"popup",children:G})});var pM=T(M(),1);function ko(e){return Di(19)?e:e?"true":void 0}var uM=T(M(),1);var Ns=uM.forwardRef(function(t,o){let{cutout:r,...n}=t,s;if(r){let i=r.getBoundingClientRect();s=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${i.left}px ${i.top}px,${i.left}px ${i.bottom}px,${i.right}px ${i.bottom}px,${i.right}px ${i.top}px,${i.left}px ${i.top}px)`}return v("div",{ref:o,role:"presentation","data-base-ui-inert":"",...n,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:s}})});var Jc=pM.forwardRef(function(t,o){let{keepMounted:r=!1,...n}=t,s=_t(),i=s.useState("mounted"),l=s.useState("modal"),a=s.useState("open");return i||r?v(cC.Provider,{value:r,children:v(an,{ref:o,...n,children:[i&&l===!0&&v(Ns,{ref:s.context.internalBackdropRef,inert:ko(!a)}),t.children]})}):null});var fM=T(M(),1);var Qc=fM.forwardRef(function(t,o){let{render:r,className:n,style:s,id:i,...l}=t,a=_t(),c=je(i);return a.useSyncedValueWithCleanup("titleElementId",c),_("h2",t,{ref:o,props:[{id:c},l]})});var mM=T(M(),1);var Wu=T(M(),1);var Gu=T(M(),1);function Md(e){let t=Gu.useRef(""),o=Gu.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:Gu.useCallback(n=>{if(n.detail===0){e(n,"keyboard");return}"pointerType"in n?e(n,n.pointerType):e(n,t.current),t.current=""},[e]),onPointerDown:o}}var dM=T(M(),1);function $t(e,t){let o=dM.useRef(e),r=j(t);z(()=>{o.current!==e&&r(o.current),o.current=e},[e,r])}function ju(e,t){let o=j((s,i)=>{(typeof e=="function"?e():e)||t(i||(dt.os.ios?"touch":""))}),{onClick:r,onPointerDown:n}=Md(o);return Wu.useMemo(()=>({onClick:r,onPointerDown:n}),[r,n])}function Zc(e){let[t,o]=Wu.useState(null),r=ju(e,o);return $t(e,n=>{n&&!e&&o(null)}),Wu.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}var el=Ps(function(t,o){let{render:r,className:n,style:s,disabled:i=!1,nativeButton:l=!0,id:a,payload:c,handle:u,...p}=t,f=_t(!0),d=Is(u)??f;if(!d)throw new Error(Me(79));let R=je(a),g=d.useState("floatingRootContext"),b=d.useState("isOpenedByTrigger",R),x=d.useState("triggerPopupId",R),h=mM.useRef(null),{registerTrigger:y,isMountedByThisTrigger:C}=ys(R,h,d,{payload:c}),{getButtonProps:S,buttonRef:E}=ft({disabled:i,native:l}),P=lr(g),N=ju(()=>d.select("open"),G=>{d.set("openMethod",G)}),w={disabled:i,open:b},D=d.useState("triggerProps",C);return _("button",t,{state:w,ref:[E,o,y,h],props:[P.reference,D,N,{[kc]:"",id:R,"aria-haspopup":"dialog","aria-expanded":b,"aria-controls":x},p,S],stateAttributesMapping:yr})});var gM=el;var xM=T(M(),1);var tl=xM.forwardRef(function(t,o){let{render:r,className:n,style:s,children:i,...l}=t,a=jc(),c=_t(),u=c.useState("open"),p=c.useState("nested"),f=c.useState("transitionStatus"),m=c.useState("nestedOpenDialogCount"),d=c.useState("mounted"),R=c.useStateSetter("viewportElement"),g=m>0;return _("div",t,{enabled:a||d,state:{open:u,nested:p,transitionStatus:f,nestedDialogOpen:g},ref:[o,R],stateAttributesMapping:wd,props:[{role:"presentation",hidden:!d,style:{pointerEvents:u?void 0:"none"},children:i},l]})});var ni=class extends Cn{constructor(){super(ZI(),"Dialog",!1)}open(t){this.openByTrigger(t)}openWithPayload(t){let o=this.attachedStore;o!==null&&(o.set("payload",t),o.setOpen(!0,fe(U.imperativeAction)))}close(){this.closePopup()}get isOpen(){return this.attachedStore?.select("open")??!1}};function RM(){return new ni}var Yu=class extends ni{};function hM(){return new Yu}var Dd={};ae(Dd,{closed:()=>kU,endingStyle:()=>BU,open:()=>LU,startingStyle:()=>_U});var LU=ce.open,kU=ce.closed,_U=ce.startingStyle,BU=ce.endingStyle;var Ku={};ae(Ku,{disabled:()=>HU});var HU="data-disabled";var xC={};ae(xC,{disabled:()=>UU,popupOpen:()=>GU});var UU="data-disabled",GU=Mt.popupOpen;var zu={};ae(zu,{closed:()=>jU,endingStyle:()=>KU,nested:()=>zU,nestedDialogOpen:()=>RC,open:()=>WU,startingStyle:()=>YU});var WU=ce.open,jU=ce.closed,YU=ce.startingStyle,KU=ce.endingStyle,zU="data-nested",RC="data-nested-dialog-open";var Zt={};ae(Zt,{Arrow:()=>Cm,Backdrop:()=>dm,Clear:()=>im,Collection:()=>ul,Empty:()=>Im,Group:()=>vm,GroupLabel:()=>Em,Icon:()=>sm,Input:()=>om,InputGroup:()=>LM,Item:()=>gD,List:()=>cm,Popup:()=>bm,Portal:()=>fm,Positioner:()=>Rm,Root:()=>MM,Row:()=>wm,Separator:()=>bD,Status:()=>um,Trigger:()=>OM,Value:()=>NM,useFilter:()=>rl,useFilteredItems:()=>Mm});var Zu=T(M(),1);var Tt=T(M(),1);var bM=T(M(),1);function Nd(e){let t=bM.useRef(!0);t.current&&(t.current=!1,e())}function CM(e,t,o,r,n,s,i,l,a,c=2){let u=Aw(o.current,{event:e,orientation:r,loopFocus:n,rtl:s,cols:c,disabledIndices:i,minIndex:l,maxIndex:a,prevIndex:t>a?l:t,stopEvent:!0});return sn(o.current,u)?void 0:u}function As(e){return e==null?U.none:e.type.startsWith("key")?U.keyboard:e.type.startsWith("mouse")||e.type.startsWith("pointer")?U.pointer:U.none}var En=T(M(),1),hC=En.createContext(void 0),bC=En.createContext(void 0),CC=En.createContext(void 0),yC=En.createContext(!1),vC=En.createContext("");function Vt(){let e=En.useContext(hC);if(!e)throw new Error(Me(22));return e}function Zi(){let e=En.useContext(bC);if(!e)throw new Error(Me(23));return e}function Sn(){let e=En.useContext(CC);if(!e)throw new Error(Me(24));return e}function ea(){return En.useContext(vC)}function yM(){return En.useContext(yC)}function Ja(e,t,o=Object.is){let{length:r}=e;if(r!==t.length)return!1;for(let n=0;n<r;n+=1)if(!o(e[n],t[n]))return!1;return!0}var Qa=(e,t)=>Object.is(e,t);function Qo(e,t,o){return e==null||t==null?Object.is(e,t):o(e,t)}function Ad(e,t,o){return Array.isArray(e)&&Array.isArray(t)?!Ja(e,t,(r,n)=>Qo(r,n,o)):e!==t}function $u(e,t,o){return e?e.some(r=>r===void 0?!1:Qo(t,r,o)):!1}function qn(e,t,o){return e?e.findIndex(r=>r===void 0?!1:Qo(r,t,o)):-1}function $U(e,t){if(t!==Qa)return r=>$u(e,r,t);let o=new Set(e);return o.delete(void 0),r=>o.has(r)&&(r!==0||e.some(n=>Object.is(r,n)))}function Za(e,t,o,r){let n=r&&Array.isArray(t)?e.findIndex($U(t,o)):qn(e,t,o);return n===-1?null:n}function Od(e,t,o,r,n,s){return $u(r,t,n)?s!=null&&e>s&&$u(r,o[s],n)?s:e:e===s?Za(o,r,n,!0):s}function Vd(e,t,o){return e.filter(r=>!Qo(t,r,o))}var vM=T(M(),1);function ol(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function XU(e){return typeof e=="object"&&e!=null&&Array.isArray(e.items)}function Fd(e){return XU(e?.[0])}function ec(e){return Fd(e)?e.flatMap(t=>t.items):e}function Ld(e){if(!Array.isArray(e))return e!=null&&"null"in e;let t=e;if(Fd(t)){for(let o of t)for(let r of o.items)if(r&&r.value==null&&r.label!=null)return!0;return!1}for(let o of t)if(o&&o.value==null&&o.label!=null)return!0;return!1}function fr(e,t){if(t&&e!=null)return t(e)??"";if(e&&typeof e=="object"){if("label"in e&&e.label!=null)return String(e.label);if("value"in e)return String(e.value)}return ol(e)}function $r(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?ol(e.value):ol(e)}function Xu(e,t,o){function r(){return fr(e,o)}if(o&&e!=null)return o(e);if(e&&typeof e=="object"&&"label"in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return(Object.hasOwn(t,e)?t[e]:void 0)??r();if(Array.isArray(t)){let s=ec(t);if(e==null||typeof e!="object"){let i=s.find(l=>l.value===e);return i&&i.label!=null?i.label:r()}if("value"in e){let i=s.find(l=>l&&l.value===e.value);if(i&&i.label!=null)return i.label}}return r()}function kd(e,t,o){return e.reduce((r,n,s)=>(s>0&&r.push(", "),r.push(v(vM.Fragment,{children:Xu(n,t,o)},s)),r),[])}var EM={id:e=>e.id,labelId:e=>e.labelId,items:e=>e.items,selectedValue:e=>e.selectedValue,hasSelectionChips:e=>{let t=e.selectedValue;return Array.isArray(t)&&t.length>0},hasSelectedValue:e=>{let{selectedValue:t,selectionMode:o}=e;return t==null?!1:o==="multiple"&&Array.isArray(t)?t.length>0:!0},hasNullItemLabel:(e,t)=>t?Ld(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMounted:e=>e.forceMounted,inline:e=>e.inline,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{let o=e.isItemEqualToValue,r=e.selectedValue;return Array.isArray(r)?r.some(n=>Qo(t,n,o)):Qo(t,r,o)},transitionStatus:e=>e.transitionStatus,popupProps:e=>e.popupProps,listProps:e=>e.listProps,inputProps:e=>e.inputProps,triggerProps:e=>e.triggerProps,itemRoot:e=>e.itemRoot,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupId:e=>e.popupId,triggerElement:e=>e.triggerElement,inputElement:e=>e.inputElement,inputGroupElement:e=>e.inputGroupElement,popupSide:e=>e.popupSide,openMethod:e=>e.openMethod,inputInsidePopup:e=>e.inputInsidePopup,inputOwnsFormValue:e=>e.inputOwnsFormValue,selectionMode:e=>e.selectionMode,name:e=>e.name,form:e=>e.form,disabled:e=>e.disabled,readOnly:e=>e.readOnly,required:e=>e.required,grid:e=>e.grid,virtualized:e=>e.virtualized,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,modal:e=>e.modal,autoHighlight:e=>e.autoHighlight};var Bd=T(M(),1);var _d={};ae(_d,{dirty:()=>QU,disabled:()=>qU,filled:()=>ZU,focused:()=>eG,invalid:()=>SC,touched:()=>JU,valid:()=>EC});var qU="data-disabled",EC="data-valid",SC="data-invalid",JU="data-touched",QU="data-dirty",ZU="data-filled",eG="data-focused";var tc={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},PC={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},SM={disabled:!1,...PC},Lt={valid(e){return e===null?null:e?{[EC]:""}:{[SC]:""}}};var TC={invalid:void 0,name:void 0,validityData:{state:tc,errors:[],error:"",value:"",initialValue:null},setValidityData:Qe,disabled:void 0,setTouched:Qe,setDirty:Qe,setFilled:Qe,setFocused:Qe,focusOwnerRef:{current:void 0},validationMode:"onSubmit",shouldValidateOnChange:()=>!1,state:SM,registerFieldControl:Qe,validation:{getValidationProps:(e,t=qe)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:Qe,getInputControl:()=>null,commit:async()=>{},change:Qe}},qu=Bd.createContext(TC);function mt(e=!0){let t=Bd.useContext(qu);if(t.setValidityData===Qe&&!e)throw new Error(Me(28));return t}function _o(e,t,o,r,n=!0,s){let{registerFieldControl:i}=mt(),l=ut(()=>Symbol());z(()=>{let a=l.current;if(!n){i(a,void 0);return}i(a,{controlRef:e,getValue:r,id:t,name:s,value:o})},[e,n,r,t,s,i,l,o]),z(()=>{let a=l.current;return()=>{i(a,void 0)}},[i,l])}var Hd=T(M(),1);var wC=Hd.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:Qe,validationMode:"onSubmit",submitCountRef:{current:0}});function Kt(){return Hd.useContext(wC)}var MC=T(M(),1);var Ud=T(M(),1);var IC=Ud.createContext({controlId:void 0,registerControlId:Qe,resetControlId:Qe,labelId:void 0,setLabelId:Qe,messageIds:[],setMessageIds:Qe,getDescriptionProps:e=>e});function Ft(){return Ud.useContext(IC)}function xo(e={}){let{id:t,enabled:o=!0}=e,{controlId:r,registerControlId:n,resetControlId:s}=Ft(),i=je(),l=ut(()=>Symbol()),a=MC.useRef(!1),c=MC.useRef(!1),u=j(()=>{!a.current||n===Qe||(a.current=!1,n(l.current,void 0))});return z(()=>{if(!o||n===Qe){u();return}let p;if(t!==void 0)c.current=!0,p=t;else if(c.current)p=i;else{s();return}if(p===void 0){u();return}a.current=!0,n(l.current,p)},[t,o,n,s,i,l,u]),z(()=>u,[u]),(o?r:void 0)??t??i}function Gd(e){return e==null?void 0:`${e}-popup`}function Wd(e,t){return(o,r)=>o==null?!1:e.contains(o,r,t)}function PM(e,t,o){return(r,n)=>{if(r==null)return!1;if(!n)return!0;let s=t?.selected??t,i=o!=null?fr(o,s):"";return i&&e.contains(i,n)&&i.length===n.length?!0:e.contains(r,n,t)}}var jd=T(M(),1);function Ju(e){return Array.isArray(e)?e.map(t=>Ju(t)).join(","):e==null?"":String(e)}var TM=new Map;function oc(e={}){let{locale:t,...o}=e,r={usage:"search",sensitivity:"base",ignorePunctuation:!0,...o},n=`${Ju(t)}|${JSON.stringify(r)}`,s=TM.get(n);if(s)return s;let i=new Intl.Collator(t,r),l={contains(a,c,u){if(!c)return!0;let p=fr(a,u);for(let f=0;f<=p.length-c.length;f+=1)if(i.compare(p.slice(f,f+c.length),c)===0)return!0;return!1},startsWith(a,c,u){if(!c)return!0;let p=fr(a,u);return i.compare(p.slice(0,c.length),c)===0},endsWith(a,c,u){if(!c)return!0;let p=fr(a,u),f=c.length;return p.length>=f&&i.compare(p.slice(p.length-f),c)===0}};return TM.set(n,l),l}var rl=oc;function wM(e={}){let{multiple:t=!1,value:o,...r}=e,n=oc(r),s=jd.useCallback((i,l,a)=>t?Wd(n,a)(i,l):PM(n,a,o)(i,l),[n,o,t]);return jd.useMemo(()=>({...n,contains:s}),[s,n])}function DC(e,t=!1){let{overflowY:o}=fo(e);return o!=="auto"&&o!=="scroll"?!1:t?e.clientHeight>0:e.scrollHeight>e.clientHeight}function tG(e,t=!1){let{overflowX:o}=fo(e);return o!=="auto"&&o!=="scroll"?!1:t?e.clientWidth>0:e.scrollWidth>e.clientWidth}function IM(e,t,o=!1){return t==="vertical"?DC(e,o):tG(e,o)}function NC(e,t,o,r=!1){let n=e;for(;st(n)&&n!==t&&!Cr(n);){if(tt(n)&&IM(n,o,r))return n;n=zo(n)}return null}function ta(e,t,o="vertical",r=!1){return NC(e,t,o,r)??(IM(t,o,r)?t:null)}var AC=Symbol("none"),Yd={value:AC,index:-1};var Kd=T(M(),1),OC=Kd.createContext(void 0);function At(){return Kd.useContext(OC)?.direction??"ltr"}function Qu(e,t,o){let r=e.get(t);if(r!==void 0||o===Qa)return r;for(let[n,s]of e)if(Qo(n,t,o))return s}function zd(e){let{id:t,onOpenChangeComplete:o,defaultSelectedValue:r=null,selectedValue:n,onSelectedValueChange:s,defaultInputValue:i,inputValue:l,open:a,defaultOpen:c=!1,selectionMode:u,onItemHighlighted:p,name:f,form:m,disabled:d=!1,readOnly:R=!1,required:g=!1,inputRef:b,grid:x=!1,items:h,filteredItems:y,filter:C,filterQuery:S,openOnInputClick:E=!0,autoHighlight:P=!1,keepHighlight:N=!1,highlightItemOnHover:w=!0,loopFocus:D=!0,itemToStringLabel:G,itemToStringValue:I,isItemEqualToValue:O=Qa,virtualized:A=!1,inline:L=!1,fillInputOnItemPress:X=!0,modal:F=!1,limit:B=-1,autoComplete:k="list",formAutoComplete:Y,locale:V,submitOnItemClick:q=!1}=e,{clearErrors:H}=Kt(),{setDirty:K,validityData:Z,setFilled:ee,name:Q,disabled:te,setTouched:de,setFocused:ue,validationMode:J,validation:re}=mt(),$=At(),ie=xo({id:t}),le=rl({locale:V}),he=Array.isArray(h)?null:h;if(he&&typeof he.label!="function")throw new Error(Me(100));let Pe=he?he.data:h,ge=he?.value,Ce=ge?void 0:Pe,W=Tt.useMemo(()=>{if(!y||!ge)return;let Ke=ec(y),Xe=Ke.map(ge),Dt;return{values:Xe,findItem(jt,Co){if(!Dt){Dt=new Map;for(let Yo=0;Yo<Xe.length;Yo+=1)Dt.has(Xe[Yo])||Dt.set(Xe[Yo],Ke[Yo])}return Qu(Dt,jt,Co)}}},[y,ge]),me=Tt.useMemo(()=>he?Ke=>he.label(Ke,O,Xe=>{let Dt=W?.findItem(Xe,O);return Dt!=null?he.itemLabel(Dt):fr(Xe,G)}):G,[he,G,W,O]),xe=Tt.useMemo(()=>he?Object.assign(Ke=>he.itemLabel(Ke),{selected:Ke=>fr(Ke,me)}):G,[he,me,G]);function ve(Ke){return fr(Ke,me)}let[ne,oe]=Tt.useState(!1),[ye,be]=Tt.useState(null),se=Tt.useRef(ye),Ne=Tt.useRef([]),Ae=Tt.useRef([]),Ve=Tt.useRef(null),Te=Tt.useRef(null),De=Tt.useRef(null),ze=Tt.useRef(null),We=Tt.useRef(null),Ge=Tt.useRef(!1),He=Tt.useRef(null),Ue=Tt.useRef(null),rt=Tt.useRef(null),et=Tt.useRef(Yd),pt=Tt.useRef(null),wt=Tt.useRef([]),Se=Tt.useRef(null),ke=te||d,Ie=Q??f,_e=u==="multiple",pe=u==="single",we=l!==void 0||i!==void 0,Oe=Pe!==void 0,Le=y!==void 0,Je;P==="always"?Je="always":Je=P?"input-change":!1;let[Be,nt]=Nt({controlled:n,default:_e?r??yt:r,name:"Combobox",state:"selectedValue"}),at=Tt.useMemo(()=>C===null?()=>!0:C!==void 0?C:Wd(le,xe),[C,le,xe]),vt=ut(()=>we?i??"":pe?ve(Be):"").current,[It,zt]=Nt({controlled:l,default:vt,name:"Combobox",state:"inputValue"}),[Rt,ho]=Nt({controlled:a,default:c,name:"Combobox",state:"open"}),qo=Fd(Pe),bo=!Rt&&ye!==null?ye:String(It).trim(),Dr=pe?ve(Be):"",Nr=pe&&!ne&&bo!==""&&Dr.length===bo.length&&le.contains(Dr,bo),Eo=Nr?"":S??bo,Ur=Oe&&Le&&Nr&&(!he||he.hasValue(Be,O)),jo=Tt.useMemo(()=>Pe?ec(Pe):yt,[Pe]),Gr=Tt.useMemo(()=>{if(y&&!Ur)return y;if(!Pe)return yt;if(qo){let Xe=Pe,Dt=[],jt=0;for(let Co of Xe){if(B>-1&&jt>=B)break;let Yo=B>-1?B-jt:1/0,po=Eo===""?Co.items.slice(0,Yo):[];if(Eo!=="")for(let Vo of Co.items){if(po.length>=Yo)break;at(Vo,Eo,xe)&&po.push(Vo)}if(po.length>0){let Vo={...Co,items:po};Dt.push(Vo),jt+=po.length}}return Dt}if(Eo==="")return B>-1?jo.slice(0,B):jo;let Ke=[];for(let Xe of jo){if(B>-1&&Ke.length>=B)break;at(Xe,Eo,xe)&&Ke.push(Xe)}return Ke},[y,Ur,Pe,qo,Eo,B,at,xe,jo]),wo=Tt.useMemo(()=>{if(W&&Gr===y)return W.values;let Ke=ec(Gr);return ge?Ke.map(Xe=>ge(Xe)):Ke},[Gr,y,W,ge]),lt=ut(()=>{let Ke=null;return L&&Rt&&Oe&&u!=="none"&&(Ke=Za(wo,Be,O,_e)),new go({id:ie,labelId:void 0,selectedValue:Be,open:Rt,items:Ce,selectionMode:u,name:Ie,form:m,disabled:ke,readOnly:R,required:g,grid:x,virtualized:A,openOnInputClick:E,itemToStringLabel:me,isItemEqualToValue:O,modal:F,autoHighlight:Je,submitOnItemClick:q,hasInputValue:we,mounted:!1,forceMounted:!1,transitionStatus:"idle",inline:L,activeIndex:null,selectedIndex:Ke,popupProps:{},listProps:{},inputProps:{},triggerProps:{},itemRoot:{props:qe,id:ie,selectionMode:u,disabled:ke,readOnly:R,isItemEqualToValue:O},positionerElement:null,listElement:null,popupId:void 0,triggerElement:null,inputElement:null,inputGroupElement:null,popupSide:null,openMethod:null,inputInsidePopup:!0,inputOwnsFormValue:u==="none"},{onOpenChangeComplete:Qe,setOpen:Qe,setInputValue:Qe,setSelectedValue:Qe,setIndices:Qe,handleSelection:Qe,forceMount:Qe,requestSubmit:Qe,listRef:Ne,labelsRef:Ae,popupRef:Ve,emptyRef:We,inputRef:Te,startDismissRef:De,endDismissRef:ze,chipsContainerRef:He,clearRef:Ue,valuesRef:wt,pointerDownItemRef:Se,selectionEventRef:rt},EM)}).current,Mi=u==="none"?It:Be,I0=Tt.useMemo(()=>u==="none"?Mi:Array.isArray(Be)?Be.map(Ke=>$r(Ke,I)):$r(Be,I),[Mi,I,u,Be]),M0=j(p),D0=j(o),pT=lt.useState("activeIndex"),N0=lt.useState("selectedIndex"),Zp=lt.useState("positionerElement"),fT=lt.useState("listElement"),iu=lt.useState("triggerElement"),ef=lt.useState("inputElement"),A0=lt.useState("inputGroupElement"),rr=lt.useState("inline"),kn=lt.useState("inputInsidePopup"),O0=lt.useState("inputOwnsFormValue"),dT=pe&&!kn&&It===Dr,V0=Et(iu),{openMethod:F0,triggerProps:mT}=Zc(Rt),L0=j(()=>I0);_o(kn?V0:Te,ie,Mi,L0,!ke,f);let gT=j(()=>{Pe?Ae.current=wo.map(ve):lt.set("forceMounted",!0)}),Ec=j((Ke,Xe,Dt,jt)=>{if(Xe===-1){if(et.current===Yd)return;et.current=Yd}else et.current={value:Ke,index:Xe};M0(Ke,to(Dt,jt,{index:Xe}))}),Js=j(Ke=>{let Xe={};Ke.activeIndex!==void 0&&(Xe.activeIndex=Ke.activeIndex),Ke.selectedIndex!==void 0&&(Xe.selectedIndex=Ke.selectedIndex),lt.update(Xe);let Dt=Ke.activeIndex;if(Dt===void 0)return;let jt=Ke.type||U.none;Dt===null?Ec(void 0,-1,jt,Ke.event):Ec(wt.current[Dt],Dt,jt,Ke.event)}),ps=j((Ke,Xe)=>{if(e.onInputValueChange?.(Ke,Xe),!Xe.isCanceled){if(Ge.current=Xe.reason===U.inputClear,Xe.reason===U.inputChange){Rt&&ye!==null&&be(null);let Dt=Xe.event,jt=Dt.inputType;if(Dt.type==="compositionend"||jt!=null&&jt!==""&&jt!=="insertReplacementText"){let Yo=Ke.trim()!=="";Yo&&oe(!0),pt.current={hasQuery:Yo};let po=lt.state.listElement;if(!lt.state.virtualized&&po){let Vo=Ve.current;for(let en of _n(po.firstElementChild??po)){if(!tt(en)||(Vo?!Ee(Vo,en):en.getAttribute("role")==="dialog"))break;if(DC(en)){en.scrollTop=0;break}}}Yo&&Je&<.state.activeIndex==null&&(Rt||rr)&<.set("activeIndex",0)}}else Xe.reason===U.inputClear&&Ke===""&<.state.inputInsidePopup&&(pt.current={hasQuery:!1,selection:!0});zt(Ke)}}),xT=j(Ke=>{let Xe=!Ke&&kn&&!rr&&It!==""&&(String(It).trim()===ye||It===Dr);!Ke&&(Xe||It===""||dT)&&oe(!1),be(null),Xe&&ps("",fe(U.inputClear))}),[k0,RT]=Tt.useState(!1),Aa=j((Ke,Xe)=>{if(Rt===Ke)return;Xe.reason===U.escapeKey&&Oe&&wo.length===0&&!We.current&&Xe.allowPropagation();let Dt=Xe,jt=Kn(Dt);if(e.onOpenChange?.(Ke,Dt),pt.current?.hasQuery&&Xe.reason===U.inputChange===Xe.isCanceled&&(pt.current=null),!Xe.isCanceled&&(Ke&&ye!==null&&xT(Xe.reason===U.inputChange),!Ke&&ne&&(pe?(rr||be(bo),bo===""&&oe(!1)):_e&&(rr||be(bo),kn&&Js({activeIndex:null}),(!kn||rr)&&ps("",fe(U.inputClear,Xe.event,void 0,{isItemPress:Xe.reason===U.itemPress})))),Ke||RT(jt()),ho(Ke),!Ke&&kn&&(Xe.reason===U.focusOut||Xe.reason===U.outsidePress)&&(de(!0),ue(!1),J==="onBlur"))){let Co=u==="none"?It:Be;re.commit(Co)}}),tf=j((Ke,Xe)=>{if(s?.(Ke,Xe),Xe.isCanceled)return;nt(Ke),(u==="none"&&Ve.current&&X||pe&&!lt.state.inputInsidePopup)&&ps(ve(Ke),fe(Xe.reason,Xe.event))}),_0=j((Ke,Xe)=>{let Dt=$e(Ke),jt=rt.current??Ke;rt.current=null;let Co=fe(U.itemPress,jt),Yo=Wt(Dt,"a")?.getAttribute("href");if(Yo){Yo.startsWith("#")&&Aa(!1,Co);return}if(_e){let po=Array.isArray(Be)?Be:[],Vo=$u(po,Xe,O),en=Vo?Vd(po,Xe,O):[...po,Xe];if(tf(en,Co),Co.isCanceled||!(Te.current?Te.current.value.trim()!=="":!1))return;if(lt.state.inputInsidePopup){ps("",fe(U.inputClear,Co.event,void 0,{isItemPress:!0}));let Pc=pt.current;Pc&&!Vo&&(Pc.toggledValue=Xe)}else Aa(!1,Co)}else{if(tf(Xe,Co),Co.isCanceled)return;Aa(!1,Co)}}),B0=j(()=>{let Ke=re.inputRef.current?.form??lt.state.inputElement?.form;Ke&&typeof Ke.requestSubmit=="function"&&Ke.requestSubmit()}),H0=j(()=>{if(D0?.(!1),oe(!1),be(null),Js(u==="none"?{activeIndex:null,selectedIndex:null}:{activeIndex:null}),_e&&Te.current&&Te.current.value!==""&&!Ge.current&&ps("",fe(U.inputClear)),pe)if(lt.state.inputInsidePopup)Te.current&&Te.current.value!==""&&ps("",fe(U.inputClear));else{let Ke=ve(Be);if(Te.current&&Te.current.value!==Ke){let Xe=Ke===""?U.inputClear:U.none;ps(Ke,fe(Xe))}}}),of=Tt.useMemo(()=>rr&&Zp?{current:Wt(Zp,'[role="dialog"]')}:Ve,[rr,Zp]),{mounted:U0,transitionStatus:hT,forceUnmount:bT}=zi({open:Rt,ref:of,preventUnmountOnClose:k0,setPreventUnmountOnClose:RT,onUnmount:H0});Tt.useImperativeHandle(e.actionsRef,()=>({unmount:bT,close:()=>Aa(!1,fe(U.imperativeAction))}),[bT,Aa]),z(function(){let Xe=se.current!==null&&ye===null;if(se.current=ye,Rt&&(!Xe||!Oe)||(Rt||(Se.current=null),u==="none"))return;let Dt=Oe?wo:wt.current;Js({selectedIndex:Za(Dt,Be,O,_e)})},[Rt,ye,Be,u,_e,Oe,wo,O,Js]),z(()=>{Pe&&(wt.current=wo,Ne.current.length=wo.length)},[Pe,wo]),z(()=>{!Rt&&pt.current?.hasQuery&&(pt.current=null)},[Rt]),z(()=>{if(!Rt&&rr&&of.current){pt.current=null;return}let Ke=Oe||Le?wo:wt.current,Xe=pt.current;if(Xe){let po=Rt||rr||lt.state.positionerElement?.hidden===!1;if(Xe.hasQuery){let Vo=Te.current;!Je||String(It).trim()===""||rr&&Je!=="always"&&(!Vo||ct(Vo.ownerDocument)!==Vo)?pt.current=null:po&&(Ke[0]!==void 0||!Oe&&!Le)&&(lt.set("activeIndex",0),pt.current=null)}else if(String(It).trim()===""&&(pt.current=null,po)){let Vo=Xe.selection;Je==="always"&&!Vo&<.state.selectionMode==="none"&<.set("activeIndex",0),queueMicrotask(()=>{if(!lt.state.open&&(!lt.state.inline||of.current)||Te.current&&Te.current.value.trim()!=="")return;let en=lt.state.selectedValue,au=lt.state.selectionMode==="multiple";if(au&&Array.isArray(en)?en.length>0:lt.state.selectionMode!=="none"&&en!=null){let NT=Oe||Le?wo:wt.current,AT=qn(NT,Xe.toggledValue,lt.state.isItemEqualToValue);lt.set("activeIndex",AT!==-1?AT:Za(NT,en,lt.state.isItemEqualToValue,au))}else Vo?lt.set("activeIndex",null):Je==="always"&<.set("activeIndex",0)})}}if(!Rt&&!rr)return;let Dt=lt.state.activeIndex;if(Dt==null){if(Je==="always"&&Ke.length>0){lt.set("activeIndex",0);return}Ec(void 0,-1,U.none);return}if(Dt>=Ke.length){Ec(void 0,-1,U.none),lt.set("activeIndex",null);return}let jt=Ke[Dt],Co=et.current.value,Yo=Co!==AC&&Qo(jt,Co,lt.state.isItemEqualToValue);(et.current.index!==Dt||!Yo)&&Ec(jt,Dt,U.none)},[pT,Je,Ec,Le,Oe,wo,rr,Rt,of,lt,It]),z(()=>{if(u==="none"){ee(String(It)!=="");return}ee(_e?Array.isArray(Be)&&Be.length>0:Be!=null)},[ee,u,It,Be,_e]),Tt.useEffect(()=>{Oe&&Je&&wo.length===0&&Js({activeIndex:null})},[Oe,Je,wo.length,Js]);function G0(){Rt&&bo!==""&&bo!==String(vt)&&!dT&&oe(!0)}function W0(){Rt&&ye!==null&&xT(!1)}let CT=!1;function yT(){!CT&&It!==Dr&&(CT=!0,ps(Dr,fe(U.none)))}function j0(){u!=="none"&&(H(Ie),K(Ad(Be,Z.initialValue,O)),re.change(Be),pe&&!we&&!kn&&yT())}function vT(){pe&&!we&&!kn&&!ne&&yT()}function Y0(){u==="none"&&(H(Ie),K(It!==Z.initialValue),re.change(It))}$t(bo,G0),$t(Rt,W0),$t(Be,j0),$t(Dr,vT),$t(Pe,vT),$t(It,Y0);let rf=$n({open:rr?!0:Rt,onOpenChange:Aa,elements:{reference:kn?iu:ef,floating:Zp}}),ET=x?"grid":"listbox",nf=Rt||rr,ST=nf?"true":"false",sf=Tt.useMemo(()=>{let Ke=ef?.tagName==="INPUT",Xe=ef==null||Ke,Dt=Xe||nf,jt=Xe?{autoComplete:"off",spellCheck:"false",autoCorrect:"off",autoCapitalize:"none"}:{};return Dt&&(jt.role="combobox",jt["aria-expanded"]=ST,jt["aria-haspopup"]=ET,jt["aria-controls"]=nf?fT?.id:void 0,jt["aria-autocomplete"]=R?"none":k),{reference:jt,floating:{role:"presentation"}}},[ef,nf,ST,ET,fT?.id,k,R]),PT=lr(rf,{enabled:!ke&&E,event:"mousedown-only",toggle:!1,touchOpenDelay:kn?0:100,reason:U.inputPress}),af=ur(rf,{enabled:!ke&&!rr,outsidePressEvent:{mouse:"sloppy",touch:"intentional"},bubbles:rr?!0:void 0,outsidePress(Ke){let Xe=$e(Ke);return!Ee(iu,Xe)&&!Ee(Ue.current,Xe)&&!Ee(He.current,Xe)&&!Ee(A0,Xe)}}),Sc=za(rf,{enabled:!ke,id:ie,listRef:Ne,activeIndex:pT,selectedIndex:N0,virtual:!0,loopFocus:D,allowEscape:D&&!Je,focusItemOnOpen:ne||u==="none"&&!Je?!1:"auto",focusItemOnHover:w,resetOnPointerLeave:!N,orientation:x?"horizontal":void 0,rtl:$==="rtl",disabledIndices:yt,grid:x?CM:void 0,onNavigate(Ke,Xe){!Xe&&!Rt&&!(rr&&Ke===null)||hT==="ending"||Js({activeIndex:Ke,type:As(Xe),event:Xe?.nativeEvent})}}),TT=Tt.useMemo(()=>Pt(Sc.reference,{onKeyDown(Ke){x&<.state.activeIndex==null&&(Ke.key==="ArrowLeft"||Ke.key==="ArrowRight")&&Ke.preventBaseUIHandler()}},af.reference,PT.reference,sf.reference),[Sc.reference,af.reference,PT.reference,sf.reference,x,lt]),wT=Tt.useMemo(()=>Pt(Sr,af.floating),[af.floating]),IT=Tt.useMemo(()=>Pt(Sc.floating,sf.floating),[Sc.floating,sf.floating]),MT=Tt.useMemo(()=>{let Ke=Sc.item;return{props:Ke?{...Ke,onFocus:void 0}:qe,id:ie,selectionMode:u,disabled:ke,readOnly:R,isItemEqualToValue:O}},[Sc.item,ie,u,ke,R,O]);lt.useContextCallback("setOpen",Aa),lt.useContextCallback("setInputValue",ps),lt.useContextCallback("setSelectedValue",tf),lt.useContextCallback("setIndices",Js),lt.useContextCallback("handleSelection",_0),lt.useContextCallback("forceMount",gT),lt.useContextCallback("requestSubmit",B0),lt.useContextCallback("onOpenChangeComplete",o),Nd(()=>{lt.update({inline:L,popupProps:wT,listProps:IT,inputProps:TT,triggerProps:mT,itemRoot:MT})});let DT={id:ie,selectedValue:Be,open:Rt,mounted:U0,transitionStatus:hT,items:Ce,inline:L,popupProps:wT,listProps:IT,inputProps:TT,triggerProps:mT,itemRoot:MT,openMethod:F0,selectionMode:u,name:Ie,form:m,disabled:ke,readOnly:R,required:g,grid:x,virtualized:A,openOnInputClick:E,itemToStringLabel:me,modal:F,autoHighlight:Je,isItemEqualToValue:O,submitOnItemClick:q,hasInputValue:we};z(()=>{lt.update({...DT,inputOwnsFormValue:u==="none"&&(L||!lt.state.inputInsidePopup)})},[lt,...Object.values(DT)]);let K0=kt(b,re.inputRef),z0=Tt.useMemo(()=>({query:bo,hasItems:Oe,filteredItems:Gr,flatFilteredValues:wo}),[bo,Oe,Gr,wo]),$0=Tt.useMemo(()=>Array.isArray(Mi)?"":$r(Mi,I),[Mi,I]),X0=_e&&Array.isArray(Be)&&Be.length>0,Uh=_e||u==="none"&&O0?void 0:Ie,q0=Tt.useMemo(()=>!_e||!Array.isArray(Be)||!Ie?null:Be.map(Ke=>{let Xe=$r(Ke,I);return v("input",{type:"hidden",form:m,name:Ie,value:Xe,disabled:ke},Xe)}),[_e,Be,m,Ie,I,ke]),J0=v(Tt.Fragment,{children:[e.children,v("input",{...re.getValidationProps(ke,{onFocus(){if(kn){iu?.focus();return}(Te.current||iu)?.focus()},onChange(Ke){if(Ke.nativeEvent.defaultPrevented||ke||R)return;let Xe=Ke.currentTarget.value,Dt=Xe.toLowerCase(),jt=fe(U.none,Ke.nativeEvent),Co=()=>wt.current.findIndex(po=>$r(po,I).toLowerCase()===Dt||ve(po).toLowerCase()===Dt);function Yo(){if(_e)return;if(u==="none"){ps(Xe,jt);return}let po=Co();po===-1&&(po=wt.current.findIndex((en,au)=>{let Pc=Ae.current[au];return Pc!=null&&Pc.toLowerCase()===Dt}));let Vo=po===-1?void 0:wt.current[po];Vo!=null&&tf?.(Vo,jt)}pe&&(gT(),Pe&&Co()===-1&<.set("forceMounted",!0)),queueMicrotask(Yo)}}),id:ie&&Uh==null?`${ie}-hidden-input`:void 0,form:m,name:Uh,autoComplete:Y,disabled:ke,required:g&&!X0,readOnly:R,value:$0,ref:K0,style:Uh?vr:co,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),q0]});return v(hC.Provider,{value:lt,children:v(bC.Provider,{value:rf,children:v(yC.Provider,{value:Oe,children:v(CC.Provider,{value:z0,children:v(vC.Provider,{value:It,children:J0})})})})})}function MM(e){let{openOnInputClick:t=!1,value:o,defaultValue:r,onValueChange:n,mode:s="list",itemToStringValue:i,...l}=e,a=(s==="inline"||s==="both")&&!e.readOnly,c=s==="inline"||s==="none",u=o!==void 0,[p,f]=Zu.useState(r??""),[m,d]=Zu.useState("");Zu.useEffect(()=>{(u||!a)&&d("")},[o,u,a]);let R;a&&m!==""?R=m:u?R=o??"":R=p;let g=rl({locale:l.locale}),b=String((u?o:p)??"").trim(),x=c||l.filter===null?null:l.filter??g.contains;function h(C,S){d(""),u||f(C),n?.(C,S)}function y(C,S){e.onItemHighlighted?.(C,S),S.reason!==U.pointer&&d(a&&C!=null?fr(C,i):"")}return v(zd,{...l,itemToStringLabel:i,openOnInputClick:t,selectionMode:"none",fillInputOnItemPress:!0,filter:x,filterQuery:s==="both"?b:void 0,autoComplete:s,inputValue:R,defaultInputValue:r,onInputValueChange:h,onItemHighlighted:y})}var DM=T(M(),1);function NM(e){let{children:t}=e,o=ea(),r=null;return typeof t=="function"?r=t(String(o)):t!=null?r=t:r=o,v(DM.Fragment,{children:r})}var tp=T(M(),1);var ep={};ae(ep,{dirty:()=>uG,disabled:()=>nG,filled:()=>pG,focused:()=>fG,invalid:()=>cG,listEmpty:()=>FC,popupOpen:()=>oG,popupSide:()=>VC,pressed:()=>rG,readonly:()=>sG,required:()=>iG,touched:()=>lG,valid:()=>aG});var oG=Mt.popupOpen,rG=Mt.pressed,nG="data-disabled",sG="data-readonly",VC="data-popup-side",iG="data-required",aG="data-valid",cG="data-invalid",lG="data-touched",uG="data-dirty",pG="data-filled",fG="data-focused",FC="data-list-empty";var nl={...rn,...Lt,popupSide:e=>e?{[VC]:e}:null,listEmpty:e=>e?{[FC]:""}:null};function Bo(e,t,o){let{setFocused:r,focusOwnerRef:n}=mt(),s=j(i=>{(i?!e:n.current===s)&&(n.current=i&&s,o?.(i),r(i))});return z(()=>{let i=t.current;return i?.getRootNode()?.activeElement===i&&s(!0),()=>s(!1)},[e,t,s]),s}var $d=5;function sl(e,t){let o=dG(t);return e.clientX>=o.left-$d&&e.clientX<=o.right+$d&&e.clientY>=o.top-$d&&e.clientY<=o.bottom+$d}function dG(e){let t=e.getBoundingClientRect(),o=Ze(e);if(dt.env.jsdom)return t;let r=o.getComputedStyle(e,"::before"),n=o.getComputedStyle(e,"::after");if(!(r.content!=="none"||n.content!=="none"))return t;let i=parseFloat(r.width)||0,l=parseFloat(r.height)||0,a=parseFloat(n.width)||0,c=parseFloat(n.height)||0,u=Math.max(t.width,i,a),p=Math.max(t.height,l,c),f=u-t.width,m=p-t.height;return{left:t.left-f/2,right:t.right+f/2,top:t.top-m/2,bottom:t.bottom+m/2}}function il(e){return e==null?void 0:`${e}-label`}function al(e,t){return e??t}function cl(e){let t=e.useState("mounted"),o=e.useState("popupSide"),r=e.useState("positionerElement");return t&&r?o:null}function Os(){return Sn().filteredItems.length===0}function Xd(e){return e==="rtl"?["ArrowRight","ArrowLeft"]:["ArrowLeft","ArrowRight"]}function AM(e,t){let o=e>=t-1?t-2:e;return o>=0?o:void 0}function qd(e,t,o){let r=e.context.listRef.current[t];r&&(e.context.selectionEventRef.current=o,r.click(),e.context.selectionEventRef.current=null)}var Jd=tp.forwardRef(function(t,o){let{render:r,className:n,nativeButton:s=!0,disabled:i=!1,id:l,style:a,...c}=t,{state:u,disabled:p,setTouched:f,validationMode:m,validation:d}=mt(),{labelId:R}=Ft(),g=Vt(),b=g.useState("selectionMode"),x=g.useState("disabled"),h=g.useState("readOnly"),y=g.useState("required"),C=g.useState("positionerElement"),S=g.useState("listElement"),E=g.useState("popupId"),P=g.useState("triggerProps"),N=g.useState("inputInsidePopup"),w=g.useState("id"),D=g.useState("labelId"),G=g.useState("open"),I=g.useState("selectedValue"),O=g.useState("activeIndex"),A=g.useState("selectedIndex"),L=g.useState("hasSelectedValue"),X=Zi(),F=ea(),B=it(),k=p||x||i,Y=Os(),V=cl(g),q=tp.useRef(null),H=Bo(k,q);xo({id:N?l:void 0});let K=N?l??w:l,Z=al(R,D),ee;G&&N?ee=E??Gd(w):G&&(ee=S?.id);let Q=tp.useRef("");function te(he){Q.current=he.pointerType}let{reference:de}=Xa(X,{enabled:!G&&!h&&!x&&b==="single",listRef:g.context.labelsRef,activeIndex:O,selectedIndex:A,onMatch(he){let Pe=g.context.valuesRef.current[he];Pe!==void 0&&g.context.setSelectedValue(Pe,fe(U.none))}}),{reference:ue}=lr(X,{enabled:!x,event:"mousedown"}),{buttonRef:J,getButtonProps:re}=ft({native:s,disabled:k}),$={...u,readOnly:h,open:G,disabled:k,popupSide:V,listEmpty:Y,placeholder:b==="none"?!1:!L},ie=j(he=>{g.set("triggerElement",he)});return _("button",t,{ref:[o,J,q,ie],state:$,props:[P,ue,de,{id:K,tabIndex:N?0:-1,role:N?"combobox":void 0,"aria-expanded":G,"aria-haspopup":N?"dialog":"listbox","aria-controls":ee,"aria-required":N&&y||void 0,"aria-readonly":N&&h||void 0,"aria-labelledby":Z,onPointerDown:te,onPointerEnter:te,onFocus(){H(!0),!k&&B.start(0,g.context.forceMount)},onBlur(he){if(!Ee(C,he.relatedTarget)&&(f(!0),H(!1),m==="onBlur")){let Pe=b==="none"?F:I;d.commit(Pe)}},onMouseDown(he){if(k||(N||X.set("domReferenceElement",he.currentTarget),g.context.forceMount(),Q.current!=="touch"&&(g.context.inputRef.current?.focus(),N||he.preventDefault()),G))return;let Pe=Fe(he.currentTarget);function ge(Ce){let W=g.state.triggerElement;if(!W)return;let me=$e(Ce),xe=g.state.positionerElement,ve=g.state.listElement;Ee(W,me)||Ee(xe,me)||Ee(ve,me)||sl(Ce,W)||g.context.setOpen(!1,fe(U.cancelOpen,Ce))}N&&Pe.addEventListener("mouseup",ge,{once:!0})},onKeyDown(he){(he.key==="ArrowDown"||he.key==="ArrowUp")&&(xt(he),g.context.setOpen(!0,fe(U.listNavigation,he.nativeEvent)),g.context.inputRef.current?.focus())}},d.getValidationProps(k,c),re],stateAttributesMapping:nl})});var OM=Jd;var si=T(M(),1);var Qd=T(M(),1),LC=Qd.createContext(void 0);function Zd(){return Qd.useContext(LC)}var em=T(M(),1),kC=em.createContext(void 0);function oa(e){let t=em.useContext(kC);if(t===void 0&&!e)throw new Error(Me(21));return t}var VM=T(M(),1);var tm=VM.forwardRef(function(t,o){let r=Vt(),{buttonRef:n,getButtonProps:s}=ft({native:!1}),i=kt(o,n);function l(c){r.context.setOpen(!1,fe(U.closePress,c.nativeEvent,c.currentTarget))}let a=s({onClick:l});return v("span",{ref:i,...a,"aria-label":"Dismiss",tabIndex:void 0,style:vr})});var om=si.forwardRef(function(t,o){let{render:r,className:n,disabled:s=!1,id:i,style:l,...a}=t,{state:c,disabled:u,setTouched:p,validationMode:f,validation:m}=mt(),{labelId:d}=Ft(),R=Zd(),b=!!oa(!0),x=Vt(),h=ea(),y=At(),C=x.useState("required"),S=x.useState("disabled"),E=x.useState("readOnly"),P=x.useState("name"),N=x.useState("form"),w=x.useState("selectionMode"),D=x.useState("autoHighlight"),G=x.useState("inputProps"),I=x.useState("triggerProps"),O=x.useState("open"),A=x.useState("mounted"),L=x.useState("selectedValue"),X=x.useState("id"),F=x.useState("inline"),B=x.useState("modal"),k=!!D,Y=cl(x),V=u||S||s,q=Os(),H=Bo(V,x.context.inputRef),K=b||F,Z=!K||B,ee=je(i??(K?void 0:X)),Q=b?PC:c,[te,de]=si.useState(null),ue=si.useRef(!1),J=si.useRef(null);z(()=>{O||(J.current=null)},[O]);let re=w==="none"&&!b,$=j(W=>{let me=b||x.state.inline;me&&!x.state.hasInputValue&&x.context.setInputValue("",fe(U.none)),x.update({inputElement:W,inputInsidePopup:me,inputOwnsFormValue:re})}),ie=b?a:m.getValidationProps(V,a);function le(W){x.context.setIndices({activeIndex:null,selectedIndex:null,type:As(W),event:W})}let he={...Q,open:O,disabled:V,readOnly:E,popupSide:Y,listEmpty:q};function Pe(W){if(!R)return;let me,xe=R.chipsRef.current.length,[ve]=Xd(y);return W.key===ve&&(W.currentTarget.selectionStart??0)===0&&L.length>0&&(W.preventDefault(),me=xe>0?xe-1:void 0),me}let ge=_("input",t,{state:he,ref:[o,x.context.inputRef,$],props:[G,I,{value:te??h,"aria-readonly":E||void 0,"aria-required":C||void 0,"aria-labelledby":d,disabled:V,readOnly:E,required:w==="none"?C:void 0,form:N,...re&&P&&{name:P},id:ee,onFocus(){if(H(!0),!F)return;let W=J.current;J.current=null,!(W==null||!Object.hasOwn(x.context.valuesRef.current,W))&&x.context.setIndices({activeIndex:W})},onBlur(){p(!0),H(!1);let W=x.state.activeIndex;if(F&&W!==null&&D!=="always"&&(J.current=W,x.context.setIndices({activeIndex:null})),f==="onBlur"){let me=w==="none"?h:L;m.commit(me)}},onCompositionStart(W){dt.os.android||(ue.current=!0,de(W.currentTarget.value))},onCompositionEnd(W){ue.current=!1;let me=W.currentTarget.value;de(null),x.context.setInputValue(me,fe(U.inputChange,W.nativeEvent))},onChange(W){let me=W.nativeEvent,xe=me.inputType,ve=!xe||xe==="insertReplacementText",ne=ue.current||!ve;function oe(Ne){E||V||!Ne||!ne||(x.context.setOpen(!0,fe(U.inputChange,me)),k||le(me))}if(ue.current){let Ne=W.currentTarget.value;de(Ne),Ne===""&&!x.state.openOnInputClick&&!x.state.inputInsidePopup&&x.context.setOpen(!1,fe(U.inputClear,me));let Ae=Ne.trim(),Ve=k&&Ae!=="";oe(Ae),O&&x.state.activeIndex!==null&&!Ve&&le(me);return}let ye=fe(U.inputChange,me);if(x.context.setInputValue(W.currentTarget.value,ye),ye.isCanceled)return;let be=W.currentTarget.value==="",se=fe(U.inputClear,me);be&&!x.state.inputInsidePopup&&(w==="single"&&x.context.setSelectedValue(null,se),x.state.openOnInputClick||x.context.setOpen(!1,se)),oe(W.currentTarget.value.trim()),O&&x.state.activeIndex!==null&&!k&&le(me)},onKeyDown(W){if(W.ctrlKey||W.shiftKey||W.altKey||W.metaKey)return;if(V||E){E&&W.key==="Enter"&&O&&x.state.activeIndex!==null&&xt(W);return}let me=W.currentTarget,xe=me.scrollWidth-me.clientWidth,ve=y==="rtl";if(W.key==="Home"){xt(W);let oe=dt.engine.gecko&&ve?me.value.length:0;me.setSelectionRange(oe,oe),me.scrollLeft=0;return}if(W.key==="End"){xt(W);let oe=dt.engine.gecko&&ve?0:me.value.length;me.setSelectionRange(oe,oe),me.scrollLeft=ve?-xe:xe;return}if(!A&&W.key==="Escape"){let oe=w==="multiple"&&Array.isArray(L)?L.length===0:L===null,ye=fe(U.escapeKey,W.nativeEvent),be=w==="multiple"?[]:null;x.context.setInputValue("",ye),x.context.setSelectedValue(be,ye),!oe&&!x.state.inline&&!ye.isPropagationAllowed&&W.stopPropagation();return}if(R&&W.key==="Backspace"&&me.value===""&&Array.isArray(L)&&L.length>0){let oe=R.chipsRef.current.length,ye=oe>0?oe-1:L.length-1,be=L.filter((se,Ne)=>Ne!==ye);le(W.nativeEvent),x.context.setSelectedValue(be,fe(U.none,W.nativeEvent));return}let ne=Pe(W);if(ne!==void 0&&R?.chipsRef.current[ne]?.focus(),W.which!==229&&W.key==="Enter"&&O){let oe=x.state.activeIndex,ye=W.nativeEvent;if(oe===null){if(F)return;x.context.setOpen(!1,fe(U.none,ye));return}xt(W),qd(x,oe,ye)}}},ie],stateAttributesMapping:nl}),Ce=b?v(qu.Provider,{value:TC,children:ge}):ge;return v(si.Fragment,{children:[O&&Z&&v(tm,{ref:x.context.startDismissRef}),Ce]})});var FM=T(M(),1);function rm(e,t,o,r){if(e.baseUIHandlerPrevented)return;let n=$e(e.nativeEvent),s=st(n)?n:null;s!==e.currentTarget&&(r?.(s)||Ua(s))||(e.preventDefault(),!o&&(t.context.inputRef.current?.focus(),t.state.openOnInputClick&&t.context.setOpen(!0,fe(U.inputPress,e.nativeEvent))))}var nm=FM.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,{state:l}=mt(),a=Vt(),c=a.useState("open"),u=a.useState("disabled"),p=a.useState("readOnly"),f=a.useState("hasSelectedValue"),m=a.useState("selectionMode"),d=cl(a),R=u,g=Os(),x={...l,open:c,disabled:R,readOnly:p,popupSide:d,listEmpty:g,placeholder:m==="none"?!1:!f},h=j(y=>{a.set("inputGroupElement",y)});return _("div",t,{ref:[o,h],props:[{role:"group",onMouseDown(y){rm(y,a,R,C=>Ee(a.context.chipsContainerRef.current,C))}},i],state:x,stateAttributesMapping:nl})});var LM=nm;var kM=T(M(),1);var sm=kM.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t;return _("span",t,{ref:o,props:[{"aria-hidden":!0,children:"\u25BC"},i]})});var _M=T(M(),1);var mG={...Ot,...yr},im=_M.forwardRef(function(t,o){let{render:r,className:n,disabled:s=!1,nativeButton:i=!0,keepMounted:l=!1,style:a,...c}=t,{disabled:u}=mt(),p=Vt(),f=p.useState("selectionMode"),m=p.useState("disabled"),d=p.useState("readOnly"),R=p.useState("open"),g=p.useState("selectedValue"),b=p.useState("hasSelectionChips"),x=ea(),h=!1;f==="none"?h=x!=="":f==="single"?h=g!=null:h=b;let y=u||m||s,{buttonRef:C,getButtonProps:S}=ft({native:i,disabled:y}),{mounted:E,transitionStatus:P,setMounted:N}=Xt(h),w={disabled:y,visible:h,open:R,transitionStatus:P};St({open:h,ref:p.context.clearRef,onComplete(){h||N(!1)}});let D=_("button",t,{state:w,ref:[o,C,p.context.clearRef],props:[{tabIndex:-1,children:"x",onMouseDown(I){I.preventDefault()},onClick(I){if(y||d)return;let O=As(I);p.context.setInputValue("",fe(U.clearPress,I.nativeEvent)),f!=="none"?(p.context.setSelectedValue(Array.isArray(g)?[]:null,fe(U.clearPress,I.nativeEvent)),p.context.setIndices({activeIndex:null,selectedIndex:null,type:O,event:I.nativeEvent})):p.context.setIndices({activeIndex:null,type:O,event:I.nativeEvent}),p.context.inputRef.current?.focus()}},c,S],stateAttributesMapping:mG});return l||E?D:null});var am=T(M(),1);var GM=T(M(),1);var ll=T(M(),1);var BM=ll.createContext(null);function HM(){return ll.useContext(BM)}function UM(e){let{children:t,items:o}=e,r=ll.useMemo(()=>({items:o}),[o]);return v(BM.Provider,{value:r,children:t})}function ul(e){let{children:t}=e,{filteredItems:o}=Sn(),r=HM(),n=r?r.items:o;return v(GM.Fragment,{children:n.map(t)})}var cm=am.forwardRef(function(t,o){var r;let{render:n,className:s,style:i,children:l,...a}=t,c=Vt(),u=Zi(),p=!!oa(!0),{filteredItems:f,hasItems:m}=Sn(),d=c.useState("selectionMode"),R=c.useState("grid"),g=c.useState("readOnly"),b=c.useState("listProps"),x=c.useState("virtualized"),h=c.useState("forceMounted"),y=d==="multiple",C=f.length===0,S=j(I=>{c.set("positionerElement",I)}),E=j(I=>{c.set("listElement",I)}),P=am.useMemo(()=>typeof l=="function"?r||(r=v(ul,{children:l})):l,[l]),N={empty:C},w=u.useState("floatingId"),D=_("div",t,{state:N,ref:[o,E,p?null:S],props:[b,{children:P,tabIndex:-1,id:w,role:R?"grid":"listbox","aria-multiselectable":y?"true":void 0,"aria-readonly":!R&&g?!0:void 0,onKeyDown(I){if(!(c.state.disabled||c.state.readOnly)&&I.key==="Enter"){let O=c.state.activeIndex;if(O==null)return;xt(I),qd(c,O,I.nativeEvent)}}},a]});if(x)return D;let G=m&&!h?void 0:c.context.labelsRef;return v(Jo,{elementsRef:c.context.listRef,labelsRef:G,children:D})});var WM=T(M(),1);var lm=T(M(),1);var gG="\u2060",xG=200;function RG(e){let t=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT),o=null;for(;t.nextNode();){let r=t.currentNode;r.nodeValue!==""&&(o=r)}return o}function pl(e=!0){let t=it(),o=lm.useRef(null);return lm.useEffect(()=>{if(!e||dt.os.ios)return;let r=o.current;if(r==null)return;let n=RG(r);if(n==null)return;let s=n.data,i=`${s}${gG}`;return n.nodeValue=i,t.start(xG,()=>{n.nodeValue===i&&(n.nodeValue=s)}),()=>{t.clear(),n.nodeValue===i&&(n.nodeValue=s)}},[e,o,t]),o}var um=WM.forwardRef(function(t,o){let{render:r,className:n,style:s,children:i,...l}=t,a=pl();return _("div",t,{ref:[o,a],props:[{children:i,role:"status","aria-live":"polite","aria-atomic":!0},l]})});var YM=T(M(),1);var pm=T(M(),1),_C=pm.createContext(void 0);function jM(){let e=pm.useContext(_C);if(e===void 0)throw new Error(Me(20));return e}var fm=YM.forwardRef(function(t,o){let{keepMounted:r=!1,...n}=t,s=Vt(),i=s.useState("mounted"),l=s.useState("forceMounted");return i||r||l?v(_C.Provider,{value:r,children:v(an,{ref:o,...n})}):null});var KM=T(M(),1);var hG={...Qt,...Ot},dm=KM.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,l=Vt(),a=l.useState("open"),c=l.useState("mounted"),u=l.useState("transitionStatus");return _("div",t,{state:{open:a,transitionStatus:u},ref:o,stateAttributesMapping:hG,props:[{role:"presentation",hidden:!c,style:{userSelect:"none",WebkitUserSelect:"none"}},i]})});var aD=T(M(),1);var dn=T(M(),1);var Pn=T(M(),1);function mm(e){let{nodeId:t,externalTree:o,rootContext:r}=e,n=r.useState("referenceElement"),s=r.useState("floatingElement"),i=r.useState("domReferenceElement"),l=r.useState("open"),a=r.useState("floatingId"),[c,u]=Pn.useState(null),p=Pn.useRef(null),f=Po(o),m=Pn.useMemo(()=>({reference:n,floating:s,domReference:i}),[n,s,i]),d=qI({...e,elements:{...m,...c&&{reference:c}}}),R=Pn.useCallback(h=>{let y=st(h)?{getBoundingClientRect:()=>h.getBoundingClientRect(),getClientRects:()=>h.getClientRects(),contextElement:h}:h;u(y),d.refs.setReference(y)},[d.refs]),g=Pn.useMemo(()=>({...d.refs,setPositionReference:R,domReference:p}),[d.refs,R]),b=Pn.useMemo(()=>({...d.elements,domReference:i}),[d.elements,i]),x=Pn.useMemo(()=>({...d,dataRef:r.context.dataRef,open:l,onOpenChange:r.setOpen,events:r.context.events,floatingId:a,refs:g,elements:b,nodeId:t,rootStore:r}),[d,g,b,t,r,l,a]);return z(()=>{i&&(p.current=i)},[i]),z(()=>{r.context.dataRef.current.floatingContext=x;let h=f?.nodesRef.current.find(y=>y.id===t);h&&(h.context=x)}),Pn.useMemo(()=>({...d,context:x,refs:g,elements:b,rootStore:r}),[d,g,b,x,r])}var bG=e=>({name:"arrow",options:e,async fn(t){let{x:o,y:r,placement:n,rects:s,platform:i,elements:l,middlewareData:a}=t,{element:c,padding:u=0}=Rs(e,t)||{};if(c==null)return{};let p=$f(u),f={x:o,y:r},m=Su(n),d=Eu(m),R=await i.getDimensions(c),g=m==="y",b=g?"top":"left",x=g?"bottom":"right",h=g?"clientHeight":"clientWidth",y=s.reference[d]+s.reference[m]-f[m]-s.floating[d],C=f[m]-s.reference[m],S=l.floating[h]||s.floating[d],E=y/2-C/2,P=S/2-R[d]/2-1,N=Math.min(p[b],P),w=Math.min(p[x],P),D=N,G=S-R[d]-w,I=S/2-R[d]/2+E,O=Kf(D,I,G),A=!a.arrow&&nn(n)!=null&&I!==O&&s.reference[d]/2-(I<D?N:w)-R[d]/2<0,L=A?I<D?I-D:I-G:0;return{[m]:f[m]+L,data:{[m]:O,centerOffset:I-O-L,...A&&{alignmentOffset:L}},reset:A}}}),zM=(e,t)=>{let{name:o,fn:r}=bG(e);return{name:o,fn:r,options:[e,t]}};var $M={name:"hide",async fn(e){let{width:t,height:o,x:r,y:n}=e.rects.reference,s=t===0&&o===0&&r===0&&n===0,i=await e.platform.detectOverflow(e,{elementContext:"reference"});return{data:{referenceHidden:i.top-o>=0||i.right-t>=0||i.bottom-o>=0||i.left-t>=0||s}}}};var fl={sideX:"left",sideY:"top"};var gm="--available-width",xm="--available-height",XM="--anchor-width",qM="--anchor-height",JM="--transform-origin",QM="--positioner-width",ZM="--positioner-height";var tD=gm,oD=xm;function sD(e,t,o){let r=e==="inline-start"||e==="inline-end";return{top:"top",right:r?o?"inline-start":"inline-end":"right",bottom:"bottom",left:r?o?"inline-end":"inline-start":"left"}[t]}function rD(e,t,o){let{rects:r,placement:n}=e;return{side:sD(t,nr(n),o),align:nn(n)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function Xr(e){return BC(e,mm)}function BC(e,t){let{anchor:o,positionMethod:r="absolute",side:n="bottom",sideOffset:s=0,align:i="center",alignOffset:l=0,collisionBoundary:a,collisionPadding:c=5,sticky:u=!1,arrowPadding:p=5,disableAnchorTracking:f=!1,inline:m,keepMounted:d=!1,floatingRootContext:R,mounted:g,collisionAvoidance:b,shift:x,nodeId:h,adaptiveOrigin:y,lazyFlip:C=!1,externalTree:S}=e,E=b.side||"flip",P=b.align||"flip",N=b.fallbackAxisSide||"end",w=x?.crossAxis??!1,D=x?.rootBoundary,G=typeof o=="function"?o:void 0,I=j(G),O=G?I:o,A=Et(o),L=Et(g),F=At()==="rtl",[B,k]=dn.useState(null);!g&&B!==null&&k(null);let Y=C==="placement",V=B?nr(B):null,q=B&&Y?nn(B)||"center":null,H=V||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":F?"left":"right","inline-start":F?"right":"left"}[n],K=q||i,Z=K==="center"?H:`${H}-${K}`,ee=c;typeof ee=="number"?ee={top:ee,right:ee,bottom:ee,left:ee}:ee&&(ee={top:ee.top||0,right:ee.right||0,bottom:ee.bottom||0,left:ee.left||0});let Q=1,te=n==="bottom"?Q:0,de=n==="top"?Q:0,ue=n==="right"?Q:0,J=n==="left"?Q:0,re={boundary:a==="clipping-ancestors"?"clippingAncestors":a,padding:ee},$=dn.useRef(null),ie=Et(s),le=Et(l),he=typeof s!="function"?s:0,Pe=typeof l!="function"?l:0,ge=[];m&&ge.push(m),ge.push(tC(Ie=>{let _e=rD(Ie,n,F),pe=typeof ie.current=="function"?ie.current(_e):ie.current,we=typeof le.current=="function"?le.current(_e):le.current;return{mainAxis:pe,crossAxis:we,alignmentAxis:we}},[he,Pe,F,n]));let Ce=P==="none"&&E!=="shift",W=!Ce&&(u||w||E==="shift"),me=E==="none"?null:nC({...re,padding:{top:ee.top+Q+te,right:ee.right+Q+J,bottom:ee.bottom+Q+de,left:ee.left+Q+ue},mainAxis:!w&&E==="flip",crossAxis:P==="flip"?"alignment":!1,fallbackAxisSideDirection:N}),xe=Ce?null:oC({...re,rootBoundary:D,mainAxis:P!=="none",crossAxis:W,limiter:u||w?void 0:rC(Ie=>{if(!$.current)return{};let{width:_e,height:pe}=$.current.getBoundingClientRect(),we=Yr(nr(Ie.placement)),Oe=we==="y"?_e:pe,Le=we==="y"?ee.left+ee.right:ee.top+ee.bottom;return{offset:Oe/2+Le/2}})},[re,u,w,D,ee,P]);E==="shift"||P==="shift"||K==="center"?ge.push(xe,me):ge.push(me,xe),ge.push(sC({...re,apply({elements:{floating:Ie},availableWidth:_e,availableHeight:pe,rects:we}){if(!L.current)return;let Oe=Ie.style;Oe.setProperty(tD,`${_e}px`),Oe.setProperty(oD,`${pe}px`);let Le=Ze(Ie).devicePixelRatio||1,{x:Je,y:Be,width:nt,height:at}=we.reference,vt=(Math.round((Je+nt)*Le)-Math.round(Je*Le))/Le,It=(Math.round((Be+at)*Le)-Math.round(Be*Le))/Le;Oe.setProperty(XM,`${vt}px`),Oe.setProperty(qM,`${It}px`)}}),zM(Ie=>({element:$.current||Fe(Ie.elements.floating).createElement("div"),padding:$.current?p:0}),[p]),{name:"transformOrigin",fn(Ie){let{elements:{floating:_e},middlewareData:pe,placement:we,platform:Oe,rects:Le,y:Je}=Ie,Be=nr(we),nt=nn(we),at=Yr(Be)==="y",vt=$.current,It=typeof s=="function"?s(rD(Ie,n,F)):s,zt;if(!vt&&nt&&Math.abs(at?pe.shift?.x||0:pe.shift?.y||0)<=1)zt=nt==="start"===(at&&Oe.isRTL?.(_e)===!0)?"100%":"0%";else{let ho=at?pe.arrow?.x||0:pe.arrow?.y||0,qo=at?vt?.clientWidth||0:vt?.clientHeight||0;zt=`${ho+qo/2}px`}let Rt=Be==="top"||Be==="left"?`calc(100% + ${It}px)`:`${-It}px`;return W&&at&&Math.abs(pe.shift?.y||0)>It&&(Rt=`${Le.reference.y+Le.reference.height/2-Je}px`),_e.style.setProperty(JM,at?`${zt} ${Rt}`:`${Rt} ${zt}`),{}}},$M,y),z(()=>{!g&&R&&R.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[g,R]);let ve=dn.useMemo(()=>({ancestorScroll:!f,elementResize:!f&&typeof ResizeObserver<"u",layoutShift:!f&&typeof IntersectionObserver<"u"}),[f]),{refs:ne,elements:oe,x:ye,y:be,middlewareData:se,update:Ne,placement:Ae,context:Ve,isPositioned:Te,floatingStyles:De}=t({rootContext:R,open:d?g:void 0,placement:Z,middleware:ge,strategy:r,whileElementsMounted:d?void 0:(...Ie)=>Bu(...Ie,ve),nodeId:h,externalTree:S}),{sideX:ze,sideY:We}=se.adaptiveOrigin||fl,Ge=Te?r:"fixed",He=dn.useMemo(()=>{let Ie;return Te?y?Ie={position:Ge,[ze]:ye,[We]:be}:Ie={...De,position:Ge}:Ie={position:Ge,top:0,left:0},Ie[tD]="100vw",Ie[oD]="100vh",Te||(Ie.opacity=0),Ie},[y,Ge,ze,ye,We,be,De,Te]),Ue=dn.useRef(null);z(()=>{if(!g)return;let Ie=A.current,_e=typeof Ie=="function"?Ie():Ie,we=(nD(_e)?_e.current:_e)||null||null;we!==Ue.current&&(ne.setPositionReference(we),Ue.current=we)},[g,ne,O,A]),dn.useEffect(()=>{if(!g)return;let Ie=A.current;typeof Ie!="function"&&nD(Ie)&&Ie.current!==Ue.current&&(ne.setPositionReference(Ie.current),Ue.current=Ie.current)},[g,ne,O,A]),dn.useEffect(()=>{if(d&&g&&oe.reference&&oe.floating)return Bu(oe.reference,oe.floating,Ne,ve)},[d,g,oe,Ne,ve]);let rt=nr(Ae),et=sD(n,rt,F),pt=nn(Ae)||"center",wt=!!se.hide?.referenceHidden;z(()=>{C&&g&&Te&&(rt!==H||Y&&pt!==K)&&k(Ae)},[C,Y,g,Te,Ae,rt,pt,H,K]);let Se=dn.useMemo(()=>({position:"absolute",top:se.arrow?.y,left:se.arrow?.x}),[se.arrow]),ke=se.arrow?.centerOffset!==0;return dn.useMemo(()=>({positionerStyles:He,arrowStyles:Se,arrowRef:$,arrowUncentered:ke,side:et,align:pt,physicalSide:rt,anchorHidden:wt,refs:ne,context:Ve,isPositioned:Te,update:Ne}),[He,Se,$,ke,et,pt,rt,wt,ne,Ve,Te,Ne])}function nD(e){return e!=null&&"current"in e}function Zo(e){return e==="starting"?jw:qe}function Pr(e,t,{styles:o,transitionStatus:r,props:n,refs:s,hidden:i,inert:l=!1}){let a={...o};return l&&(a.pointerEvents="none"),_("div",e,{state:t,ref:s,props:[{role:"presentation",hidden:i,style:a},Zo(r),n],stateAttributesMapping:Qt})}var iD=T(M(),1);var CG=20;function ra(e,t,o,r){let[n,s]=iD.useState(!1);z(()=>{if(!e||!t||o==null){s(!1);return}let i=Fe(o).documentElement.clientWidth,l=o.offsetWidth;s(i>0&&l>0&&l>=i-CG)},[e,t,o]),Hf(e&&(!t||n),r)}var Rm=aD.forwardRef(function(t,o){let{render:r,className:n,anchor:s,positionMethod:i,side:l,align:a,sideOffset:c,alignOffset:u,collisionBoundary:p="clipping-ancestors",collisionPadding:f,arrowPadding:m,sticky:d,disableAnchorTracking:R=!1,collisionAvoidance:g=Wi,style:b,...x}=t,h=Vt(),y=Zi(),C=jM(),S=h.useState("modal"),E=h.useState("open"),P=h.useState("mounted"),N=h.useState("openMethod"),w=h.useState("positionerElement"),D=h.useState("triggerElement"),G=h.useState("inputElement"),I=h.useState("inputGroupElement"),O=h.useState("inputInsidePopup"),A=h.useState("transitionStatus"),L=Os(),F=Xr({anchor:s??(O?D:I??G),floatingRootContext:y,positionMethod:i,mounted:P,side:l,sideOffset:c,align:a,alignOffset:u,arrowPadding:m,collisionBoundary:p,collisionPadding:f,sticky:d,disableAnchorTracking:R,keepMounted:C,collisionAvoidance:g,lazyFlip:!0});ra(E&&S,N==="touch",w,D);let B={open:E,side:F.side,align:F.align,anchorHidden:F.anchorHidden,empty:L};z(()=>{h.set("popupSide",F.side)},[h,F.side]);let k=j(V=>{h.set("positionerElement",V)}),Y=Pr(t,B,{styles:F.positionerStyles,transitionStatus:A,props:x,refs:[o,k],hidden:!P,inert:!E});return v(kC.Provider,{value:F,children:[P&&S&&v(Ns,{inert:ko(!E),cutout:I??G??D}),Y]})});var hm=T(M(),1);var yG={...Qt,...Ot},bm=hm.forwardRef(function(t,o){let{render:r,className:n,style:s,initialFocus:i,finalFocus:l,...a}=t,c=Vt(),u=oa(),p=Zi(),f=c.useState("mounted"),m=c.useState("open"),d=c.useState("openMethod"),R=c.useState("popupProps"),g=c.useState("transitionStatus"),b=c.useState("inputInsidePopup"),x=c.useState("inputElement"),h=c.useState("modal"),y=c.useState("id"),C=Os(),S=a.id??(b?Gd(y):void 0);z(()=>(c.set("popupId",c.context.popupRef.current?.id||S),()=>{c.set("popupId",void 0)}),[c,S]),St({open:m,ref:c.context.popupRef,onComplete(){m&&c.context.onOpenChangeComplete(!0)}});let E={open:m,side:u.side,align:u.align,anchorHidden:u.anchorHidden,transitionStatus:g,empty:C},P=_("div",t,{state:E,ref:[o,c.context.popupRef],props:[R,{id:S,role:b?"dialog":"presentation",onFocus(I){let O=$e(I.nativeEvent);d!=="touch"&&(Ee(c.state.listElement,O)||O===I.currentTarget)&&c.context.inputRef.current?.focus()}},Zo(g),a],stateAttributesMapping:yG}),w=i===void 0?b?I=>I==="touch"?c.context.popupRef.current:x:!1:i,D;l!=null?D=l:D=b?void 0:!1;let G=!b||h;return v(un,{context:p,disabled:!f,modal:G,openInteractionType:d,initialFocus:w,returnFocus:D,getInsideElements:()=>[c.context.startDismissRef.current,c.context.endDismissRef.current],children:v(hm.Fragment,{children:[P,G&&v(tm,{ref:c.context.endDismissRef})]})})});var cD=T(M(),1);var Cm=cD.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,l=Vt(),{arrowRef:a,side:c,align:u,arrowUncentered:p,arrowStyles:f}=oa(),d={open:l.useState("open"),side:c,align:u,uncentered:p};return _("div",t,{ref:[a,o],stateAttributesMapping:Qt,state:d,props:{style:f,"aria-hidden":!0,...i}})});var dl=T(M(),1);var ym=T(M(),1),HC=ym.createContext(void 0);function lD(){let e=ym.useContext(HC);if(e===void 0)throw new Error(Me(18));return e}var vm=dl.forwardRef(function(t,o){let{render:r,className:n,style:s,items:i,...l}=t,c=Vt().useState("grid"),[u,p]=dl.useState(),f=dl.useMemo(()=>({labelId:u,setLabelId:p,items:i}),[u,p,i]),m=_("div",t,{ref:o,props:[{role:c?"rowgroup":"group","aria-labelledby":u},l]}),d=v(HC.Provider,{value:f,children:m});return i?v(UM,{items:i,children:d}):d});var uD=T(M(),1);var Em=uD.forwardRef(function(t,o){let{render:r,className:n,style:s,id:i,...l}=t,{setLabelId:a}=lD(),c=je(i);return z(()=>(a(c),()=>{a(p=>p===c?void 0:p)}),[c,a]),_("div",t,{ref:o,props:[{id:c,"aria-hidden":!0},l]})});var ii=T(M(),1),dD=T($o(),1);var Sm=T(M(),1),UC=Sm.createContext(void 0);function pD(){let e=Sm.useContext(UC);if(!e)throw new Error(Me(19));return e}var Pm=T(M(),1),GC=Pm.createContext(!1);function fD(){return Pm.useContext(GC)}function mD(e){let{componentProps:t,forwardedRef:o,virtualized:r,indexFromFilter:n}=e,{render:s,className:i,style:l,value:a=null,index:c,disabled:u=!1,nativeButton:p=!1,...f}=t,m=ii.useRef(null),d=oo({guess:!0,index:c,textRef:m}),R=Vt(),g=fD(),b=yM(),{props:x,id:h,selectionMode:y,disabled:C,readOnly:S,isItemEqualToValue:E}=R.useState("itemRoot"),P=C||u,N=y!=="none",w=c??n??d.index,D=w!==-1,G=R.useState("isActive",w),I=R.useState("isSelected",a),O=ii.useRef(null),A=h!=null&&D?`${h}-${w}`:void 0,L=I&&N;z(()=>{if(!(D&&(r||c!=null)))return;let K=R.context.listRef.current;return K[w]=O.current,()=>{delete K[w]}},[D,r,w,c,R]),z(()=>{if(!D||b)return;let H=R.context.valuesRef.current;return H[w]=a,()=>{delete H[w]}},[D,b,w,a,R]),z(()=>{if(!D||b)return;let H=R.state.selectedValue,K=R.state.selectedIndex;R.state.selectionMode==="multiple"&&Array.isArray(H)?K=Od(w,a,R.context.valuesRef.current,H,E,K):Qo(a,H,E)&&(K=w),R.set("selectedIndex",K)},[D,b,R,w,a,E]);let{getButtonProps:X,buttonRef:F}=ft({disabled:P,focusableWhenDisabled:!0,native:p,composite:!0}),B={disabled:P,selected:L,highlighted:G};function k(H){function K(){R.context.handleSelection(H,a)}R.state.submitOnItemClick?(dD.flushSync(K),R.context.requestSubmit()):K()}let Y={id:A,role:g?"gridcell":"option","aria-selected":N?L:void 0,tabIndex:void 0,onPointerDownCapture(H){H.isPrimary&&(R.context.pointerDownItemRef.current=H.currentTarget),H.preventDefault()},onMouseDown(H){H.preventDefault()},onClick(H){P||S||k(H.nativeEvent)},onMouseUp(H){let K=R.context.pointerDownItemRef.current===H.currentTarget;R.context.pointerDownItemRef.current=null,!(P||S||H.button!==0||K||!G)&&k(H.nativeEvent)}},V=_("div",t,{ref:[F,o,d.ref,O],state:B,props:[x,Y,f,X]}),q=ii.useMemo(()=>({selected:L,textRef:m}),[L,m]);return v(UC.Provider,{value:q,children:V})}function vG(e){let{componentProps:t,forwardedRef:o}=e,n=Vt().useState("isItemEqualToValue"),{flatFilteredValues:s}=Sn(),i=t.value??null,l=qn(s,i,n);return v(mD,{componentProps:t,forwardedRef:o,virtualized:!0,indexFromFilter:l})}var Tm=ii.memo(ii.forwardRef(function(t,o){let n=Vt().useState("virtualized");return n&&t.index==null?v(vG,{componentProps:t,forwardedRef:o}):v(mD,{componentProps:t,forwardedRef:o,virtualized:n,indexFromFilter:void 0})}));var gD=Tm;var xD=T(M(),1);var wm=xD.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,l=_("div",t,{ref:o,props:[{role:"row"},i]});return v(GC.Provider,{value:!0,children:l})});var RD=T(M(),1);var Im=RD.forwardRef(function(t,o){let{render:r,className:n,style:s,children:i,...l}=t,{filteredItems:a}=Sn(),c=Vt(),u=pl(),p=a.length===0?i:null;return _("div",t,{ref:[o,c.context.emptyRef,u],props:[{children:p,role:"status","aria-live":"polite","aria-atomic":!0},l]})});var hD=T(M(),1);var ml=hD.forwardRef(function(t,o){let{className:r,render:n,orientation:s="horizontal",style:i,...l}=t;return _("div",t,{state:{orientation:s},ref:o,props:[{role:"presentation"},l]})});var bD=ml;function Mm(){return Sn().filteredItems}var WC={};ae(WC,{dirty:()=>AG,disabled:()=>PG,filled:()=>OG,focused:()=>VG,invalid:()=>DG,listEmpty:()=>FG,popupOpen:()=>EG,popupSide:()=>wG,pressed:()=>SG,readonly:()=>TG,required:()=>IG,touched:()=>NG,valid:()=>MG});var EG=Mt.popupOpen,SG=Mt.pressed,PG="data-disabled",TG="data-readonly",wG="data-popup-side",IG="data-required",MG="data-valid",DG="data-invalid",NG="data-touched",AG="data-dirty",OG="data-filled",VG="data-focused",FG="data-list-empty";var jC={};ae(jC,{dirty:()=>jG,disabled:()=>_G,filled:()=>YG,focused:()=>KG,invalid:()=>GG,listEmpty:()=>zG,popupOpen:()=>LG,popupSide:()=>HG,pressed:()=>kG,readonly:()=>BG,touched:()=>WG,valid:()=>UG});var LG="data-popup-open",kG="data-pressed",_G="data-disabled",BG="data-readonly",HG="data-popup-side",UG="data-valid",GG="data-invalid",WG="data-touched",jG="data-dirty",YG="data-filled",KG="data-focused",zG="data-list-empty";var KC={};ae(KC,{disabled:()=>yD,endingStyle:()=>SD,popupOpen:()=>CD,startingStyle:()=>ED,visible:()=>vD});var YC={};ae(YC,{disabled:()=>yD,endingStyle:()=>SD,popupOpen:()=>CD,startingStyle:()=>ED,visible:()=>vD});var CD=Mt.popupOpen,yD="data-disabled",vD="data-visible",ED=ce.startingStyle,SD=ce.endingStyle;var Dm={};ae(Dm,{closed:()=>XG,endingStyle:()=>JG,open:()=>$G,startingStyle:()=>qG});var $G=ce.open,XG=ce.closed,qG=ce.startingStyle,JG=ce.endingStyle;var Nm={};ae(Nm,{anchorHeight:()=>tW,anchorWidth:()=>eW,availableHeight:()=>ZG,availableWidth:()=>QG,transformOrigin:()=>oW});var QG="--available-width",ZG="--available-height",eW="--anchor-width",tW="--anchor-height",oW="--transform-origin";var Am={};ae(Am,{align:()=>aW,anchorHidden:()=>sW,closed:()=>nW,empty:()=>cW,open:()=>rW,side:()=>iW});var rW=ce.open,nW=ce.closed,sW=ce.anchorHidden,iW=ce.side,aW=ce.align,cW="data-empty";var Om={};ae(Om,{align:()=>mW,anchorHidden:()=>gW,closed:()=>uW,empty:()=>xW,endingStyle:()=>fW,open:()=>lW,side:()=>dW,startingStyle:()=>pW});var lW=ce.open,uW=ce.closed,pW=ce.startingStyle,fW=ce.endingStyle,dW=ce.side,mW=ce.align,gW=ce.anchorHidden,xW="data-empty";var Vm={};ae(Vm,{align:()=>CW,closed:()=>hW,open:()=>RW,side:()=>bW,uncentered:()=>yW});var RW=ce.open,hW=ce.closed,bW=ce.side,CW=ce.align,yW="data-uncentered";var XC={};ae(XC,{disabled:()=>SW,highlighted:()=>EW});var Fm={};ae(Fm,{disabled:()=>$C,highlighted:()=>zC,selected:()=>vW});var vW="data-selected",zC="data-highlighted",$C="data-disabled";var EW=zC,SW=$C;var ai={};ae(ai,{orientation:()=>PW});var PW="data-orientation";var rc={};ae(rc,{Fallback:()=>MD,Image:()=>ID,Root:()=>PD});var xl=T(M(),1);var Lm=T(M(),1),qC=Lm.createContext(void 0);function km(){let e=Lm.useContext(qC);if(e===void 0)throw new Error(Me(13));return e}var gl={imageLoadingStatus:()=>null};var PD=xl.forwardRef(function(t,o){let{className:r,render:n,style:s,...i}=t,[l,a]=xl.useState("idle"),c={imageLoadingStatus:l},u=xl.useMemo(()=>({imageLoadingStatus:l,setImageLoadingStatus:a}),[l,a]),p=_("span",t,{state:c,ref:o,props:i,stateAttributesMapping:gl});return v(qC.Provider,{value:u,children:p})});var op=T(M(),1);var TD=T(M(),1);function wD(e,{referrerPolicy:t,crossOrigin:o,sizes:r,srcSet:n},s){let i=TD.useState("idle"),l=i[1];return z(()=>{if(!s)return Qe;if(!e&&!n)return l("error"),Qe;let a=!0,c=new window.Image,u=p=>()=>{a&&l(p)};return l("loading"),c.onload=u("loaded"),c.onerror=u("error"),t&&(c.referrerPolicy=t),c.crossOrigin=o??null,r&&(c.sizes=r),n&&(c.srcset=n),e&&(c.src=e),c.complete&&l(c.naturalWidth>0?"loaded":"error"),()=>{a=!1}},[s,e,n,r,o,t,l]),i}var TW={...gl,...Ot},ID=op.forwardRef(function(t,o){let{className:r,render:n,onLoadingStatusChange:s,keepMounted:i=!1,style:l,sizes:a,srcSet:c,src:u,...p}=t,{setImageLoadingStatus:f}=km(),[m,d]=wD(u,t,!i),R=m==="loaded",{mounted:g,transitionStatus:b,setMounted:x}=Xt(R),h=op.useRef(null),y=op.useRef(!0);z(()=>{if(!i)return;let D=y.current;y.current=!1;let G=h.current;if(!G)return;if(!G.complete){d("loading");return}let I=G.naturalWidth>0?"loaded":"error";d(I),I==="loaded"&&D&&x(!0)},[i,u,c,a,p.crossOrigin,p.referrerPolicy,n,d,x]);let C=i?{"data-loading":m==="loading"?"":void 0,"data-error":m==="error"?"":void 0,"aria-hidden":m!=="loaded"||void 0,onLoad(){d("loaded")},onError(){d("error")}}:void 0,S=j(D=>{s?.(D),f(D)});z(()=>{m!=="idle"&&S(m)},[m,S]),z(()=>()=>f("idle"),[f]),St({enabled:!R,open:R,ref:h,onComplete(){R||x(!1)}});let E={imageLoadingStatus:m,transitionStatus:i&&b==="ending"?void 0:b},P=i||g,N={};a!==void 0&&(N.sizes=a),c!==void 0&&(N.srcSet=c),u!==void 0&&(N.src=u);let w=_("img",t,{state:E,ref:[o,h],props:[C,p,N],stateAttributesMapping:TW,enabled:P});return P?w:null});var Rl=T(M(),1);var MD=Rl.forwardRef(function(t,o){let{className:r,render:n,delay:s=0,style:i,...l}=t,{imageLoadingStatus:a}=km(),[c,u]=Rl.useState(s===0),p=it();return Rl.useEffect(()=>(s>0?p.start(s,()=>u(!0)):u(!0),p.clear),[p,s]),_("span",t,{state:{imageLoadingStatus:a},ref:o,props:l,stateAttributesMapping:gl,enabled:a!=="loaded"&&(s===0||c)})});var JC={};ae(JC,{endingStyle:()=>DW,error:()=>IW,loading:()=>wW,startingStyle:()=>MW});var wW="data-loading",IW="data-error",MW=bt.startingStyle,DW=bt.endingStyle;var DD=T(M(),1);var _m=DD.forwardRef(function(t,o){let{render:r,className:n,disabled:s=!1,focusableWhenDisabled:i=!1,nativeButton:l=!0,style:a,...c}=t,{getButtonProps:u,buttonRef:p}=ft({disabled:s,focusableWhenDisabled:i,native:l});return _("button",t,{state:{disabled:s},ref:[o,p],props:[c,u]})});var QC={};ae(QC,{disabled:()=>NW});var NW="data-disabled";var hl={};ae(hl,{Indicator:()=>LD,Root:()=>FD});var Jn=T(M(),1);function ND(e){if(!e)return null;for(let t of e.elements){let o=t.tagName;if(o==="BUTTON"||o==="INPUT"){let r=t;if(r.type==="submit")return r}}return null}var Bm={};ae(Bm,{checked:()=>ZC,dirty:()=>BW,disabled:()=>OW,filled:()=>HW,focused:()=>UW,indeterminate:()=>AW,invalid:()=>kW,readonly:()=>VW,required:()=>FW,touched:()=>_W,unchecked:()=>ey,valid:()=>LW});var ZC="data-checked",ey="data-unchecked",AW="data-indeterminate",OW="data-disabled",VW="data-readonly",FW="data-required",LW="data-valid",kW="data-invalid",_W="data-touched",BW="data-dirty",HW="data-filled",UW="data-focused";function Hm(e){return{checked(t){return e.indeterminate?{}:t?{[ZC]:""}:{[ey]:""}},...Lt}}var Um=T(M(),1),ty=Um.createContext({disabled:!1});function na(){return Um.useContext(ty)}var AD=T(M(),1);function sa(e,t,o,r=!0,n,s){let[i,l]=AD.useState(),a=je(n?`${n}-label`:void 0),c=!!s?.trim(),p=e??(c?void 0:t)??i;return z(()=>{let f=e||t||c||!r?void 0:GW(o.current,a);i!==f&&l(f)}),p}function GW(e,t){let o=WW(e);if(o)return!o.id&&t&&(o.id=t),o.id||void 0}function WW(e){if(!e)return;let t=e.parentElement;if(t&&t.tagName==="LABEL")return t;let o=e.id;if(o){let n=e.nextElementSibling;if(n&&n.htmlFor===o)return n}let r=e.labels;return r&&r[0]}var Gm=T(M(),1),oy=Gm.createContext(void 0);function OD(){return Gm.useContext(oy)}var Wm=T(M(),1),ry=Wm.createContext(void 0);function VD(){let e=Wm.useContext(ry);if(e===void 0)throw new Error(Me(14));return e}var jW="data-parent",FD=Jn.forwardRef(function(t,o){let{checked:r,className:n,defaultChecked:s=!1,"aria-labelledby":i,disabled:l=!1,form:a,id:c,indeterminate:u=!1,inputRef:p,name:f,onCheckedChange:m,parent:d=!1,readOnly:R=!1,render:g,required:b=!1,uncheckedValue:x,value:h,nativeButton:y=!1,style:C,...S}=t,{clearErrors:E}=Kt(),{disabled:P,name:N,setDirty:w,setFilled:D,setTouched:G,state:I,validationMode:O,validityData:A,validation:L}=mt(),X=na(),{labelId:F,registerControlId:B,getDescriptionProps:k}=Ft(),Y=OD(),V=Y?.allValues===void 0?void 0:Y.parent,q=V!==void 0,H=P||X.disabled||Y?.disabled||l,K=N??f,Z=h??K,ee=je(),Q=Y?.registerControlId!==B,te=xo({id:c||void 0,enabled:Q}),de=y?te:ee,ue={};q&&(d?ue=V.getParentProps():Z!==void 0&&(ue=V.getChildProps(Z)));let{checked:J=r,indeterminate:re=u,onCheckedChange:$,...ie}=ue,le=Y?.value,he=Jn.useRef(null),Pe=Bo(H,he),{getButtonProps:ge,buttonRef:Ce}=ft({disabled:H,native:y}),W=Y?.validation??L,[me,xe]=Nt({controlled:Z!==void 0&&le!==void 0&&!d?le.includes(Z):J,default:s,name:"Checkbox",state:"checked"}),ve=q?!!J:me,ne=q&&re||u;_o(he,ee,me,void 0,!Y&&!H,f);let oe=V?.registerChildId,ye=Jn.useRef(null),be=W.registerInput,se=Y?Z:void 0,Ne=Jn.useCallback(He=>be(He,{controlRef:he,value:se}),[be,se]),Ae=kt(p,ye,d?void 0:Ne),Ve=sa(i,F,ye,!y,te,S["aria-label"]);z(()=>{ye.current&&(ye.current.indeterminate=ne),Y||D(me)},[me,ne,Y,D]),$t(me,()=>{Y||(E(K),w(me!==A.initialValue),W.change(me))});let Te=Pt({checked:me,disabled:H,form:a,name:d?void 0:K,id:y?void 0:te,required:b,ref:Ae,style:K?vr:co,tabIndex:-1,type:"checkbox","aria-hidden":!0,onChange(He){if(He.nativeEvent.defaultPrevented)return;if(R){He.preventDefault();return}let Ue=He.currentTarget.checked,rt=fe(U.none,He.nativeEvent);if(m?.(Ue,rt),!rt.isCanceled&&($?.(Ue,rt),!rt.isCanceled&&(xe(Ue),Z!==void 0&&Y!==void 0&&!d&&!q))){let et=Ue?[...Y.value,Z]:Y.value.filter(pt=>pt!==Z);Y.setValue(et,rt)}},onClick(He){He.stopPropagation()},onFocus(){he.current?.focus()}},h!==void 0?{value:(Y?me&&h:h)||""}:qe,k,He=>W.getValidationProps(H,He));Jn.useEffect(()=>{if(!V||Z===void 0)return;let He=V.disabledStatesRef.current;return He.set(Z,H),()=>{He.delete(Z)}},[V,H,Z]);let De=Jn.useMemo(()=>({...I,checked:ve,disabled:H,readOnly:R,required:b,indeterminate:ne}),[I,ve,H,R,b,ne]),ze=Hm(De),We=_("span",t,{state:De,ref:[Ce,he,o],props:[{id:de,role:"checkbox","aria-checked":ne?"mixed":ve,"aria-readonly":R||void 0,"aria-required":b||void 0,"aria-labelledby":Ve,[jW]:d?"":void 0,onFocus(){Pe(!0)},onBlur(){let He=ye.current;He&&(G(!0),Pe(!1),O==="onBlur"&&W.commit(Y?le:He.checked))},onKeyDown(He){if(He.key!=="Enter"||(He.preventBaseUIHandler(),He.defaultPrevented))return;let Ue=ye.current?.form??null,rt=He.currentTarget,et=He.nativeEvent,pt=He.preventDefault,wt=et.preventDefault,Se=!1;He.preventDefault=()=>{Se=!0,pt.call(He)},et.preventDefault=()=>{Se=!0,wt.call(et)},wt.call(et),Ze(rt).queueMicrotask(()=>{He.preventDefault=pt,et.preventDefault=wt,Se||ND(Ue)?.click()})},onClick(He){if(R||H)return;He.preventDefault();let Ue=ye.current;Ue&&Wr(Ue,He)}},S,ie,ge,k,He=>W.getValidationProps(H,He)],stateAttributesMapping:ze}),Ge=We.props.id;return z(()=>{if(!(!oe||d||Z===void 0||Ge===void 0))return oe(Z,Ge)},[oe,d,Z,Ge]),v(ry.Provider,{value:De,children:[We,!me&&!Y&&K&&!d&&x!==void 0&&v("input",{type:"hidden",form:a,name:K,value:x,disabled:H}),v("input",{...Te,suppressHydrationWarning:!0})]})});var jm=T(M(),1);var LD=jm.forwardRef(function(t,o){let{render:r,className:n,style:s,keepMounted:i=!1,...l}=t,a=VD(),c=a.checked||a.indeterminate,{mounted:u,transitionStatus:p,setMounted:f}=Xt(c),m=jm.useRef(null),d={...a,transitionStatus:p};St({batch:!0,enabled:!c,open:c,ref:m,onComplete(){c||f(!1)}});let g={...Hm(a),...Ot},b=i||u,x=_("span",t,{ref:[o,m],state:d,stateAttributesMapping:g,props:l});return b?x:null});var ny={};ae(ny,{checked:()=>YW,dirty:()=>oj,disabled:()=>$W,endingStyle:()=>QW,filled:()=>rj,focused:()=>nj,indeterminate:()=>zW,invalid:()=>ej,readonly:()=>XW,required:()=>qW,startingStyle:()=>JW,touched:()=>tj,unchecked:()=>KW,valid:()=>ZW});var YW="data-checked",KW="data-unchecked",zW="data-indeterminate",$W="data-disabled",XW="data-readonly",qW="data-required",JW=bt.startingStyle,QW=bt.endingStyle,ZW="data-valid",ej="data-invalid",tj="data-touched",oj="data-dirty",rj="data-filled",nj="data-focused";var np=T(M(),1);var ci=T(M(),1);function nc(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}var sy=Object.keys(tc);function rp(e,t){return e.matches(":disabled")?!1:!t||e.form===t?!0:e.form===null&&!e.hasAttribute("form")}function kD(e,t){let o=null;for(let r of e.keys())if(rp(r,t)){if(!r.validity.valid)return r;o??(o=r)}return o}function _D(e){return{...tc,valid:!e,customError:e}}function iy(e){return e&&e.validationMessage?[e.validationMessage]:[]}function BD(e){let{elementRef:t,formRef:o}=Kt(),{setValidityData:r,validate:n,validityData:s,validationDebounceTime:i,invalid:l,markedDirtyRef:a,state:c,shouldValidateOnChange:u,validationMode:p,registeredFieldIdRef:f}=e,{controlId:m,getDescriptionProps:d}=Ft(),R=it(),g=ci.useRef(null),b=ut(()=>new Map).current,x=ci.useRef(0),h=ci.useRef(null),y=ci.useCallback((N,w)=>(b.set(N,w),()=>{b.delete(N)}),[b]),C=j(()=>{let N=kD(b,t.current);return N&&b.get(N)?.controlRef.current||null}),S=j(async(N,w=!1)=>{x.current+=1;let D=x.current;function G(H,K=l){let Z=f.current??m;if(Z==null)return;let ee=o.current.fields.get(Z);if(!ee)return;let Q=nc(H,K);o.current.fields.set(Z,{...ee,validityData:Q})}function I(H,K){let Z=H.valid===!1?K:[];return{value:N,state:H,error:Z[0]??"",errors:Z,initialValue:s.initialValue}}function O(H,K){let Z=H.validity.customError?H.validationMessage:"",ee=K.replace(/\r\n?/g,`
|
|
4
4
|
`);H.setCustomValidity(ee),h.current=[H,ee,Z]}function A(){let H=h.current;h.current=null,H&&(!H[0].willValidate||H[0].validationMessage===H[1])&&H[0].setCustomValidity(H[2])}function L(H,K,Z){let ee=I(H,K);G(ee,Z),r(ee)}function X(H){let K=sy.reduce((ee,Q)=>(ee[Q]=H.validity[Q],ee),{}),Z=!1;for(let ee of sy)if(ee!=="valid"){if(ee==="valueMissing"&&K[ee])Z=!0;else if(K[ee])return K}return Z&&!a.current&&(K.valid=!0,K.valueMissing=!1),K}function F(){return b.size>0?kD(b,t.current):g.current}let B=F();function k(){return B=F(),B?.willValidate?X(B):_D(!1)}if(w){if(c.valid!==!1||!B)return;if(!B.validity.valueMissing){A();let H=F(),K=H?.validity.customError?iy(H):[];L(_D(K.length>0),K,!1);return}for(let H of sy)if(H!=="valid"&&H!=="valueMissing"&&H!=="customError"&&B.validity[H])return}R.clear(),A();let Y=k(),V=iy(B),q=u();if(V.length===0||q){let H=Array.from(o.current.fields.values()).reduce((ee,Q)=>(Q.name&&(ee[Q.name]=Q.getValue()),ee),{}),K=n(N,H),Z;if(typeof K=="object"&&K!==null&&"then"in K){if(Y.valid===!1?L(Y,V):(p==="onSubmit"||!s.state.customError)&&(Y.valid=null,L(Y,V)),Z=await K,D!==x.current)return;Y=k()}else Z=K;V=Z?[].concat(Z).filter(Boolean):[],V.length>0?(Y.valid=!1,Y.customError=!0,B?.willValidate&&O(B,V.join(`
|
|
5
5
|
`))):V=iy(B)}L(Y,V)}),E=j((N,w=!1)=>{if(R.clear(),x.current+=1,w)return;let D=u();D&&N!==""&&i?R.start(i,()=>{S(N)}):S(N,!D)}),P=ci.useCallback((N,w={})=>Pt(d(w),c.valid===!1&&!c.disabled&&!N?{"aria-invalid":!0}:qe),[d,c.disabled,c.valid]);return ci.useMemo(()=>({getValidationProps:P,inputRef:g,registeredInputs:b,registerInput:y,getInputControl:C,commit:S,change:E}),[P,b,y,C,S,E])}var Qn=T(M(),1);function HD(e){let{allValues:t=yt,value:o,onValueChange:r}=e,n=Qn.useRef(o),s=Qn.useRef(new Map),[i,l]=Qn.useState("mixed"),[a,c]=Qn.useState(()=>({registry:new Map})),u=o.length===t.length,p=o.length!==t.length&&o.length>0,f=j(r),m=j((g,b)=>{let x=a.registry;return x.set(g,(x.get(g)??yt).concat(b)),c({registry:x}),()=>{let h=(x.get(g)??yt).filter(y=>y!==b);h.length===0?x.delete(g):x.set(g,h),c({registry:x})}}),d=Qn.useCallback(()=>({indeterminate:p,checked:u,"aria-controls":t.flatMap(g=>a.registry.get(g)??yt).join(" ")||void 0,onCheckedChange(g,b){let x=n.current,h=t.filter(P=>s.current.get(P)&&x.includes(P)),y=t.filter(P=>!s.current.get(P)||x.includes(P));if(x.length===y.length||x.length===0){o.length===y.length?f(h,b):f(y,b);return}let S="mixed",E=x;i==="mixed"?(S="on",E=y):i==="on"&&(S="off",E=h),f(E,b),b.isCanceled||l(S)}}),[t,u,a,p,f,i,o.length]),R=Qn.useCallback(g=>({checked:o.includes(g),onCheckedChange(b,x){let h=o.slice();b?h.push(g):h.splice(h.indexOf(g),1),f(h,x),x.isCanceled||(n.current=h,l("mixed"))}}),[f,o]);return Qn.useMemo(()=>({getParentProps:d,getChildProps:R,registerChildId:m,disabledStatesRef:s}),[d,R,m])}var Ym=np.forwardRef(function(t,o){let{allValues:r,className:n,defaultValue:s,disabled:i=!1,id:l,onValueChange:a,render:c,value:u,style:p,...f}=t,{disabled:m,name:d,state:R,validation:g,setFilled:b,setDirty:x,validityData:h}=mt(),{labelId:y,registerControlId:C,getDescriptionProps:S}=Ft(),{clearErrors:E,elementRef:P}=Kt(),N=m||i,w=s??yt,[D,G]=Nt({controlled:u,default:w,name:"CheckboxGroup",state:"value"}),I=j((V,q)=>{a?.(V,q),!q.isCanceled&&G(V)}),O=HD({allValues:r,value:D,onValueChange:I});xo({id:null});let A=je(l),L=g.getInputControl,X=np.useMemo(()=>({get current(){return L()}}),[L]),F=j(()=>{let V=P.current;if(!V)return D;let q=new Set;for(let[H,K]of g.registeredInputs)K.value!==void 0&&H.checked&&rp(H,V)&&q.add(K.value);return D.filter(H=>q.has(H))});_o(X,A,D,F,!!d&&!N,d),z(()=>{b(D.length>0)},[D,b]),$t(D,()=>{d&&E(d);let V=Array.isArray(h.initialValue)?h.initialValue:yt;x(!Ja(D,V)),g.change(D)});let B={...R,disabled:N},k=np.useMemo(()=>({allValues:r,value:D,setValue:I,parent:O,disabled:N,validation:g,registerControlId:C}),[r,D,I,O,N,g,C]),Y=_("div",t,{state:B,ref:o,props:[{id:l,role:"group","aria-labelledby":y},f,S],stateAttributesMapping:Lt});return v(oy.Provider,{value:k,children:Y})});var ay={};ae(ay,{disabled:()=>sj});var sj="data-disabled";var sc={};ae(sc,{Panel:()=>jD,Root:()=>UD,Trigger:()=>WD});var sp=T(M(),1);var Km={...Tf,...Ot};var UD=sp.forwardRef(function(t,o){let{render:r,className:n,defaultOpen:s=!1,disabled:i=!1,onOpenChange:l,open:a,style:c,...u}=t,p=j(l),f=yf({open:a,defaultOpen:s,onOpenChange:p,disabled:i}),m=sp.useMemo(()=>({open:f.open,disabled:f.disabled,transitionStatus:f.transitionStatus}),[f.open,f.disabled,f.transitionStatus]),d=sp.useMemo(()=>({...f,onOpenChange:p,state:m}),[f,p,m]),R=_("div",t,{state:m,ref:o,props:u,stateAttributesMapping:Km});return v(pu.Provider,{value:d,children:R})});var GD=T(M(),1);var ij={...Pf,...Ot},WD=GD.forwardRef(function(t,o){let{panelId:r,open:n,handleTrigger:s,state:i,disabled:l}=Vi(),{className:a,disabled:c=l,render:u,nativeButton:p=!0,style:f,...m}=t,{getButtonProps:d,buttonRef:R}=ft({disabled:c,native:p});return _("button",t,{state:i,ref:[o,R],props:[{"aria-controls":n?r:void 0,"aria-expanded":n,onClick:s},m,d],stateAttributesMapping:ij})});var uy=T(M(),1);var zm={};ae(zm,{collapsiblePanelHeight:()=>cy,collapsiblePanelWidth:()=>ly});var cy="--collapsible-panel-height",ly="--collapsible-panel-width";var jD=uy.forwardRef(function(t,o){let{className:r,hiddenUntilFound:n,keepMounted:s,render:i,id:l,style:a,...c}=t,{defaultPanelId:u,mounted:p,onOpenChange:f,open:m,setMounted:d,setPanelIdState:R,setOpen:g,state:b,transitionStatus:x}=Vi(),h=n??!1,y=s??!1,C=l||void 0,S=C??u;z(()=>(R(X=>C??(X===null?void 0:X)),()=>{R(X=>X===C?null:X)}),[C,R]);let{height:E,props:P,ref:N,shouldPreventOpenAnimation:w,shouldRender:D,transitionStatus:G,width:I}=kf({externalRef:o,hiddenUntilFound:h,id:S,keepMounted:y,mounted:p,onOpenChange:f,open:m,setMounted:d,setOpen:g,transitionStatus:x}),O={...b,transitionStatus:G},A=wc(a,O),L=_("div",{...t,style:void 0},{state:O,ref:N,props:[P,{style:{[cy]:E===void 0?"auto":`${E}px`,[ly]:I===void 0?"auto":`${I}px`}},c,A?{style:A}:void 0,w?{style:{animationName:"none"}}:void 0],stateAttributesMapping:Km});return D?L:null});var py={};ae(py,{closed:()=>cj,endingStyle:()=>uj,open:()=>aj,startingStyle:()=>lj});var aj="data-open",cj="data-closed",lj=bt.startingStyle,uj=bt.endingStyle;var Ut={};ae(Ut,{Arrow:()=>Cm,Backdrop:()=>dm,Chip:()=>ZD,ChipRemove:()=>tN,Chips:()=>JD,Clear:()=>im,Collection:()=>ul,Empty:()=>Im,Group:()=>vm,GroupLabel:()=>Em,Icon:()=>sm,Input:()=>om,InputGroup:()=>nm,Item:()=>Tm,ItemIndicator:()=>qD,Label:()=>KD,List:()=>cm,Popup:()=>bm,Portal:()=>fm,Positioner:()=>Rm,Root:()=>YD,Row:()=>wm,Separator:()=>oN,Status:()=>um,Trigger:()=>Jd,Value:()=>$D,createItems:()=>rN,useFilter:()=>wM,useFilteredItems:()=>Mm});var Wye=T(M(),1);function YD(e){let{multiple:t=!1,defaultValue:o,value:r,onValueChange:n,autoComplete:s,...i}=e;return v(zd,{...i,selectionMode:t?"multiple":"single",selectedValue:r,defaultSelectedValue:o,onSelectedValueChange:n,formAutoComplete:s})}var dy=T(M(),1);function ia(e,t){let o=je(e);return z(()=>(t(o),()=>{t(r=>r===o?void 0:r)}),[o,t]),o}function aa(e={}){let{id:t,fallbackControlId:o,native:r=!1,setLabelId:n,focusControl:s}=e,{controlId:i,setLabelId:l}=Ft(),a=j(m=>{l(m),n?.(m)}),c=ia(t,a),u=i??o;function p(m){if(s){s(m,u);return}if(!u)return;let d=fy(m.currentTarget,u);tt(d)&&$m(d)}function f(m){let d=$e(m.nativeEvent);Wt(d,"button,input,select,textarea")||(!m.defaultPrevented&&m.detail>1&&m.preventDefault(),!r&&p(m))}return r?{id:c,htmlFor:u,onMouseDown:f}:{id:c,onClick:f,onPointerDown(m){m.preventDefault()}}}function fy(e,t){let o=e.getRootNode();for(;tn(o);){let r=o.getElementById(t);if(r)return r;o=o.host.getRootNode()}return Fe(e).getElementById(t)}function $m(e){e.focus({focusVisible:!0})}var KD=dy.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,l=i;delete l.id;let a=mt(),c=Vt(),u=c.useState("inputInsidePopup"),p=c.useState("triggerElement"),f=c.useState("inputElement"),m=c.useState("id"),d=il(m),R=p?.id??(u?m:void 0),g=aa({id:d,fallbackControlId:R,setLabelId(b){let x=typeof b=="function"?b(c.state.labelId):b;c.set("labelId",x)}});return _("div",t,{ref:o,state:a.state,props:[g,i],stateAttributesMapping:Lt})});var zD=T(M(),1);function $D(e){let{children:t,placeholder:o}=e,r=Vt(),n=r.useState("itemToStringLabel"),s=r.useState("selectedValue"),i=r.useState("items"),l=r.useState("selectionMode")==="multiple",a=r.useState("hasSelectedValue"),c=!a&&o!=null&&t==null,u=r.useState("hasNullItemLabel",c),p=null;return typeof t=="function"?p=t(s):t!=null?p=t:!a&&o!=null&&!u?p=o:l&&Array.isArray(s)?p=kd(s,i,n):p=Xu(s,i,n),v(zD.Fragment,{children:p})}var XD=T(M(),1);var bl=T(M(),1);var Xm=bl.memo(bl.forwardRef(function(t,o){let{render:r,className:n,style:s,keepMounted:i,selected:l,...a}=t,c=bl.useRef(null),{transitionStatus:u,setMounted:p}=Xt(l),m=_("span",t,{ref:[o,c],state:{selected:l,transitionStatus:u},props:[{"aria-hidden":!0,children:"\u2714\uFE0F"},a],stateAttributesMapping:Ot});return St({batch:!0,enabled:!l,open:l,ref:c,onComplete(){l||p(!1)}}),m}));var qD=XD.forwardRef(function(t,o){let{selected:r}=pD();return t.keepMounted||r?v(Xm,{...t,selected:r,ref:o}):null});var Cl=T(M(),1);var JD=Cl.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,l=Vt(),a=l.useState("hasSelectionChips"),c=Cl.useRef([]),u=_("div",t,{ref:[o,l.context.chipsContainerRef],props:[a?{role:"toolbar"}:qe,{onMouseDown(f){rm(f,l,l.state.disabled)}},i]}),p=Cl.useMemo(()=>({chipsRef:c}),[]);return v(LC.Provider,{value:p,children:v(Jo,{elementsRef:c,children:u})})});var Jm=T(M(),1),gy=T($o(),1);var qm=T(M(),1),my=qm.createContext(void 0);function QD(){let e=qm.useContext(my);if(!e)throw new Error(Me(17));return e}var ZD=Jm.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,l=Vt(),{chipsRef:a}=Zd(),c=At(),u=l.useState("disabled"),p=l.useState("readOnly"),f=l.useState("selectedValue"),{ref:m,index:d}=oo();function R(h){let y=d,[C,S]=Xd(c);return h.key===C?(h.preventDefault(),d>0?y=d-1:y=void 0):h.key===S?(h.preventDefault(),d<a.current.length-1?y=d+1:y=void 0):h.key==="Backspace"||h.key==="Delete"?(y=AM(d,f.length),xt(h),gy.flushSync(()=>{l.context.setIndices({activeIndex:null,selectedIndex:null,type:U.keyboard,event:h.nativeEvent}),l.context.setSelectedValue(f.filter((E,P)=>P!==d),fe(U.none,h.nativeEvent))})):h.key==="Enter"||h.key===" "?(xt(h),y=void 0):h.key==="ArrowDown"||h.key==="ArrowUp"?(xt(h),gy.flushSync(()=>{l.context.setOpen(!0,fe(U.listNavigation,h.nativeEvent))}),y=void 0):h.key.length===1&&!h.ctrlKey&&!h.metaKey&&!h.altKey&&(y=void 0),y}let b=_("div",t,{ref:[o,m],state:{disabled:u},props:[{tabIndex:-1,"aria-disabled":u||void 0,"aria-readonly":p||void 0,onKeyDown(h){if(u||p)return;let y=R(h);y===void 0?l.context.inputRef.current?.focus():a.current[y]?.focus()}},i]}),x=Jm.useMemo(()=>({index:d}),[d]);return v(my.Provider,{value:x,children:b})});var eN=T(M(),1);var tN=eN.forwardRef(function(t,o){let{render:r,className:n,disabled:s=!1,nativeButton:i=!0,style:l,...a}=t,c=Vt(),{index:u}=QD(),p=c.useState("disabled"),f=c.useState("readOnly"),m=c.useState("selectedValue"),d=c.useState("isItemEqualToValue"),R=p||s,{buttonRef:g,getButtonProps:b}=ft({native:i,disabled:R||f,focusableWhenDisabled:!0}),x={disabled:R};function h(S,E){let P=c.state.activeIndex;if(P==null)return;let N=qn(c.context.valuesRef.current,S,d);N!==-1&&P===N&&c.context.setIndices({activeIndex:null,type:As(E),event:E})}function y(S){let E=fe(U.chipRemovePress,S.nativeEvent),P=m[u];return h(P,S.nativeEvent),c.context.setSelectedValue(m.filter((N,w)=>w!==u),E),c.context.inputRef.current?.focus(),E}return _("button",t,{ref:[o,g],state:x,props:[{tabIndex:-1,onMouseDown(S){S.preventDefault()},onClick(S){y(S).isPropagationAllowed||S.stopPropagation()},onKeyDown(S){(S.key==="Enter"||S.key===" ")&&(y(S).isPropagationAllowed||xt(S))}},a,b]})});var oN=ml;function rN(e,t){let{getValue:o,getLabel:r}=t,n=null;function s(){if(n===null){let l=new Map,a=e?ec(e):yt;for(let c of a){if(c==null)continue;let u=o(c);l.has(u)||l.set(u,c)}n=l}return n}function i(l){return l==null?l:o(l)}return{data:e,value:i,hasValue(l,a){return Qu(s(),l,a)!==void 0},itemLabel:r,label(l,a,c){let u=Qu(s(),l,a);return u!==void 0?r(u):fr(l,c)}}}var xy={};ae(xy,{dirty:()=>bj,disabled:()=>dj,filled:()=>Cj,focused:()=>yj,invalid:()=>Rj,listEmpty:()=>vj,placeholder:()=>Ej,popupOpen:()=>pj,popupSide:()=>gj,pressed:()=>fj,readonly:()=>mj,touched:()=>hj,valid:()=>xj});var pj="data-popup-open",fj="data-pressed",dj="data-disabled",mj="data-readonly",gj="data-popup-side",xj="data-valid",Rj="data-invalid",hj="data-touched",bj="data-dirty",Cj="data-filled",yj="data-focused",vj="data-list-empty",Ej="data-placeholder";var Ry={};ae(Ry,{dirty:()=>Oj,disabled:()=>Tj,filled:()=>Vj,focused:()=>Fj,invalid:()=>Nj,listEmpty:()=>Lj,placeholder:()=>kj,popupOpen:()=>Sj,popupSide:()=>Ij,pressed:()=>Pj,readonly:()=>wj,required:()=>Mj,touched:()=>Aj,valid:()=>Dj});var Sj=Mt.popupOpen,Pj=Mt.pressed,Tj="data-disabled",wj="data-readonly",Ij="data-popup-side",Mj="data-required",Dj="data-valid",Nj="data-invalid",Aj="data-touched",Oj="data-dirty",Vj="data-filled",Fj="data-focused",Lj="data-list-empty",kj="data-placeholder";var hy={};ae(hy,{endingStyle:()=>Bj,startingStyle:()=>_j});var _j=bt.startingStyle,Bj=bt.endingStyle;var yo={};ae(yo,{Arrow:()=>tg,Backdrop:()=>og,CheckboxItem:()=>sg,CheckboxItemIndicator:()=>ag,Group:()=>lg,GroupLabel:()=>ug,Item:()=>pg,LinkItem:()=>fg,Popup:()=>Rg,Portal:()=>bg,Positioner:()=>CA,RadioGroup:()=>Eg,RadioItem:()=>Pg,RadioItemIndicator:()=>wg,Root:()=>RA,Separator:()=>wn,SubmenuRoot:()=>Ng,SubmenuTrigger:()=>Ug,Trigger:()=>bA});var ts=T(M(),1);var Qm=T(M(),1),by=Qm.createContext(void 0);function Vs(e=!0){let t=Qm.useContext(by);if(t===void 0&&!e)throw new Error(Me(25));return t}var Bt={};ae(Bt,{Arrow:()=>tg,Backdrop:()=>og,CheckboxItem:()=>sg,CheckboxItemIndicator:()=>ag,Clear:()=>dA,Empty:()=>xA,FilterProvider:()=>iA,Group:()=>lg,GroupLabel:()=>ug,Handle:()=>hp,Input:()=>cA,Item:()=>pg,LinkItem:()=>fg,List:()=>lA,Popup:()=>Rg,Portal:()=>bg,Positioner:()=>yg,RadioGroup:()=>Eg,RadioItem:()=>Pg,RadioItemIndicator:()=>wg,Root:()=>CN,Separator:()=>wn,SubmenuRoot:()=>Ng,SubmenuTrigger:()=>Ug,Trigger:()=>PN,Viewport:()=>FN,createHandle:()=>kN,useFilter:()=>oc});var nN=T(M(),1);var Zm=T(M(),1),Cy=Zm.createContext(void 0);function ca(e){let t=Zm.useContext(Cy);if(t===void 0&&!e)throw new Error(Me(33));return t}var eg=T(M(),1),ic=eg.createContext(void 0);function ht(e){let t=eg.useContext(ic);if(t===void 0&&!e)throw new Error(Me(36));return t}var tg=nN.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,{store:l}=ht(),{arrowRef:a,side:c,align:u,arrowUncentered:p,arrowStyles:f}=ca(),d={open:l.useState("open"),side:c,align:u,uncentered:p};return _("div",t,{ref:[a,o],stateAttributesMapping:Qt,state:d,props:{style:f,"aria-hidden":!0,...i}})});var sN=T(M(),1);var og=sN.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,{store:l}=ht(),a=l.useState("open"),c=l.useState("mounted"),u=l.useState("transitionStatus"),p=l.useState("lastOpenChangeReason"),f=Vs(),m={open:a,transitionStatus:u};return _("div",t,{ref:f?.backdropRef?[o,f.backdropRef]:o,state:m,stateAttributesMapping:ro,props:[{role:"presentation",hidden:!c,style:{pointerEvents:p===U.triggerHover?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},i]})});var lp=T(M(),1);var ip=T(M(),1);var ap=ip.createContext(null);function Fs(e="root"){let t=ip.useContext(ap),o=ip.useContext(ic);return t===null||o===void 0?null:(e==="submenu-trigger"?o.virtualFocus||o.parentVirtualFocus:o.virtualFocus)?t:null}function yl(e){if(Fs()===null)throw new Error(Me(104,e))}var Hj={visible:!0,ref:null};function Uj(){return Hj}function Ls(e,t,o="root"){let r=Fs(o),s=((o==="submenu-trigger"?r?.useSubmenuTrigger:r?.useItem)??Uj)({label:e.label,children:e.children,render:e.render}),i=kt(t,s.ref);return{visible:s.visible,ref:i,props:s.props}}var rg=T(M(),1),yy=rg.createContext(void 0);function iN(){let e=rg.useContext(yy);if(e===void 0)throw new Error(Me(30));return e}var vl=T(M(),1);var aN=T(M(),1);function Gj(e){e.preventDefault()}function ng(e){let{closeOnClick:t,highlighted:o,id:r,nodeId:n,store:s,typingRef:i,itemRef:l,itemMetadata:a}=e,c=ht(),u=Vs(!0),p=a.type==="submenu-trigger",f=p?c.parentVirtualFocus:c.virtualFocus,d=(p&&c.parent.type==="menu"?c.parent.store:c.store).useState("webkitAriaSelected",o),{events:R}=s.useState("floatingTreeRoot"),g=s.useState("open"),b=u!==void 0,x=!f&&g&&o?0:-1;return aN.useMemo(()=>({id:r,role:"menuitem",tabIndex:x,"aria-selected":d,onMouseDown:f?Gj:void 0,onKeyDown(h){h.key===" "&&i?.current&&h.preventDefault()},onMouseMove(h){n&&R.emit("itemhover",{nodeId:n,target:h.currentTarget})},onClick(h){t&&R.emit("close",{domEvent:h.nativeEvent,reason:U.itemPress})},onMouseUp(h){if(u){let y=u.initialCursorPointRef.current;if(u.initialCursorPointRef.current=null,b&&y&&Math.abs(h.clientX-y.x)<=1&&Math.abs(h.clientY-y.y)<=1||b&&!dt.os.mac&&h.button===2)return}l.current&&s.context.allowMouseUpTriggerRef.current&&(!b||h.button===2)&&a.type==="regular-item"&&Wr(l.current,h,{detail:1,pointerType:"mouse"})}}),[t,x,r,R,n,s.context.allowMouseUpTriggerRef,i,l,u,b,a.type,d,f])}var la={type:"regular-item"};function ua(e){let{closeOnClick:t,disabled:o,highlighted:r,id:n,store:s,typingRef:i=s.context.typingRef,nativeButton:l,itemMetadata:a,nodeId:c}=e,u=vl.useRef(null),{getButtonProps:p,buttonRef:f}=ft({disabled:o,focusableWhenDisabled:!0,native:l,composite:!0}),m=ng({closeOnClick:t,highlighted:r,id:n,nodeId:c,store:s,typingRef:i,itemRef:u,itemMetadata:a}),d=vl.useCallback(g=>Pt(m,{onMouseEnter(b){a.type==="submenu-trigger"&&a.setActive(b.nativeEvent)}},g,p),[m,p,a]),R=kt(u,f);return vl.useMemo(()=>({getItemProps:d,itemRef:R}),[d,R])}var cp={};ae(cp,{checked:()=>vy,disabled:()=>Wj,highlighted:()=>jj,unchecked:()=>Ey});var vy="data-checked",Ey="data-unchecked",Wj="data-disabled",jj="data-highlighted";var pa={checked(e){return e?{[vy]:""}:{[Ey]:""}},...Ot};var Yj=lp.forwardRef(function(t,o){let{render:r,className:n,id:s,label:i,nativeButton:l=!1,disabled:a=!1,closeOnClick:c=!1,checked:u=!1,onCheckedChange:p,style:f,...m}=t,{store:d}=ht(),R=oo({guess:!0,label:i}),g=je(s),b=d.useState("disabled"),x=d.useState("isActive",R.index),h=d.useState("floatingNodeId"),y=d.useState("itemProps"),C=a||b,{getItemProps:S,itemRef:E}=ua({closeOnClick:c,disabled:C,highlighted:x,id:g,store:d,nativeButton:l,nodeId:h,itemMetadata:la}),P=lp.useMemo(()=>({disabled:C,highlighted:x,checked:u}),[C,x,u]);function N(D){let G=fe(U.itemPress,D.nativeEvent,void 0,{preventUnmountOnClose:Qe});p?.(!u,G)}let w=_("div",t,{state:P,stateAttributesMapping:pa,props:[y,{role:"menuitemcheckbox","aria-checked":u,onClick:N},m,S],ref:[E,o,R.ref]});return v(yy.Provider,{value:P,children:w})}),sg=lp.forwardRef(function(t,o){let{checked:r,defaultChecked:n,onCheckedChange:s,...i}=t,[l,a]=Nt({controlled:r,default:n??!1,name:"MenuCheckboxItem",state:"checked"}),c=Ls(t,o);function u(p,f){s?.(p,f),f.isCanceled||a(p)}return c.visible?v(Yj,{...i,checked:l,onCheckedChange:u,ref:c.ref}):null});var ig=T(M(),1);var ag=ig.forwardRef(function(t,o){let{render:r,className:n,style:s,keepMounted:i=!1,...l}=t,a=iN(),c=ig.useRef(null),{transitionStatus:u,mounted:p,setMounted:f}=Xt(a.checked);St({batch:!0,enabled:!a.checked,open:a.checked,ref:c,onComplete(){a.checked||f(!1)}});let m={checked:a.checked,disabled:a.disabled,highlighted:a.highlighted,transitionStatus:u};return _("span",t,{state:m,ref:[o,c],stateAttributesMapping:pa,props:{"aria-hidden":!0,...l},enabled:i||p})});var pp=T(M(),1);var cg=T(M(),1),up=cg.createContext(void 0);function cN(){let e=cg.useContext(up);if(e===void 0)throw new Error(Me(31));return e}var Sy=pp.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,[l,a]=pp.useState(void 0),c=_("div",t,{ref:o,props:{role:"group","aria-labelledby":l,...i}});return v(up.Provider,{value:a,children:c})}),lg=pp.forwardRef(function(t,o){let r=Fs()?.Group??Sy;return v(r,{...t,ref:o})});var lN=T(M(),1);var ug=lN.forwardRef(function(t,o){let{render:r,className:n,style:s,id:i,...l}=t,a=je(i),c=cN();return z(()=>(c(a),()=>{c(u=>u===a?void 0:u)}),[c,a]),_("div",t,{ref:o,props:{id:a,"aria-hidden":!0,...l}})});var Py=T(M(),1);var Kj=Py.forwardRef(function(t,o){let{render:r,className:n,id:s,label:i,nativeButton:l=!1,disabled:a=!1,closeOnClick:c=!0,style:u,...p}=t,{store:f}=ht(),m=oo({guess:!0,label:i}),d=je(s),R=f.useState("disabled"),g=f.useState("isActive",m.index),b=f.useState("floatingNodeId"),x=f.useState("itemProps"),h=a||R,{getItemProps:y,itemRef:C}=ua({closeOnClick:c,disabled:h,highlighted:g,id:d,store:f,nativeButton:l,nodeId:b,itemMetadata:la});return _("div",t,{state:{disabled:h,highlighted:g},props:[x,p,y],ref:[C,o,m.ref]})}),pg=Py.forwardRef(function(t,o){let r=Ls(t,o);return r.visible?v(Kj,{...t,ref:r.ref}):null});var fp=T(M(),1);var zj=fp.forwardRef(function(t,o){let{render:r,className:n,id:s,label:i,closeOnClick:l=!1,style:a,...c}=t,{store:u}=ht(),p=fp.useRef(null),f=oo({guess:!0,label:i}),m=je(s),d=u.useState("isActive",f.index),R=u.useState("floatingNodeId"),g=u.useState("itemProps"),b=u.context.typingRef,{getButtonProps:x,buttonRef:h}=ft({native:!1,composite:!0}),y=ng({closeOnClick:l,highlighted:d,id:m,nodeId:R,store:u,typingRef:b,itemRef:p,itemMetadata:la});function C(E){return Pt(y,E,x)}return _("a",t,{state:{highlighted:d},props:[g,c,C],ref:[p,h,o,f.ref]})}),fg=fp.forwardRef(function(t,o){let r=Ls(t,o);return r.visible?v(zj,{...t,ref:r.ref}):null});var ac=T(M(),1);var dg=T(M(),1),Ty=dg.createContext(void 0);function er(e){let t=dg.useContext(Ty);if(t===void 0&&!e)throw new Error(Me(69));return t}var mg=T(M(),1),dp=mg.createContext(void 0);function El(){return mg.useContext(dp)}var gg=T(M(),1);function $j(e,t){let o=Va(e.render);if(gg.isValidElement(o)){let r=o.props;if(Object.hasOwn(r,"id"))return r.id??""}return e.id??t}function xg(e,t,o){let r=$j(e,t),n=r===t?void 0:r,s=gg.useCallback(i=>o?.(i?n:void 0),[n,o]);return[r,s]}var uN=T(M(),1);function Sl(e,t,o){let r=Va(e.render),n=uN.isValidElement(r)?r.props:void 0,s=e["aria-label"]??n?.["aria-label"],i=e["aria-labelledby"]??n?.["aria-labelledby"];return i==null&&!s&&(i=t?t.id||void 0:o||void 0),i}var wy=ac.forwardRef(function(t,o){let{render:r,className:n,style:s,finalFocus:i,id:l,initialFocus:a,...c}=t,{store:u,defaultFloatingId:p,setRenderedFloatingId:f,virtualFocus:m,orientation:d}=ht(),R=El(),{side:g,align:b}=ca(),x=er(!0)!=null,h=u.useState("open"),y=u.useState("transitionStatus"),C=u.useState("popupProps"),S=u.useState("mounted"),E=u.useState("instantType"),P=u.useState("activeTriggerElement"),N=u.useState("parent"),w=u.useState("lastOpenChangeReason"),D=u.useState("rootId"),G=u.useState("floatingRootContext"),I=u.useState("floatingTreeRoot"),O=u.useState("closeDelay"),A=u.useState("hoverEnabled"),L=u.useState("disabled"),X=u.useState("openMethod"),F=u.useState("activeTriggerId"),B=u.useState("listElement"),[k,Y]=xg(t,p,f),V=Sl(t,P,F),q=N.type==="menu"?R:void 0,H=N.type==="context-menu",K=a??N.type!=="menu";a===void 0&&B&&N.type!=="menu"&&(K=()=>u.state.activeIndex!==null?!1:B),St({open:h,ref:u.context.popupRef,onComplete(){h&&u.context.onOpenChangeComplete?.(!0)}}),ac.useEffect(()=>{function $(ie){u.setOpen(!1,fe(ie.reason,ie.domEvent))}return I.events.on("close",$),()=>{I.events.off("close",$)}},[I.events,u]),Xn(G,{enabled:A&&!L&&!H&&N.type!=="menubar",closeDelay:O});let Z=u.useStateSetter("popupElement"),ee=ac.useContext(ap)?.useParentHandoff??qj,{parentVirtualFocusRef:Q,handleFocus:te}=ee(u,N,h,m),de={transitionStatus:y,side:g,align:b,open:h,nested:N.type==="menu",instant:E},ue=_("div",t,{state:de,ref:[o,u.context.popupRef,Z,Y],stateAttributesMapping:ro,props:[C,{id:k,...B?{role:"presentation"}:{role:"menu","aria-orientation":d==="horizontal"?"horizontal":void 0,"aria-labelledby":V},onKeyDown($){q?.onPopupKeyDown?.($),x&&Fr.has($.key)&&$.stopPropagation()},onFocus:te},Zo(y),c,{"data-rootownerid":D}]}),J=N.type===void 0||H;(P||N.type==="menubar"&&w!==U.outsidePress)&&(J=!0);let re=q?.getReturnElement??Q;return v(un,{context:G,openInteractionType:X,modal:H,disabled:!S,returnFocus:i??re??J,explicitReturnFocus:i===void 0&&re?!1:void 0,initialFocus:K,restoreFocus:!0,getInsideElements:N.type===void 0?()=>[u.context.beforeTriggerFocusGuardRef.current]:void 0,externalTree:N.type!=="menubar"?I:void 0,previousFocusableElement:P,nextFocusableElement:N.type===void 0?u.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:u.context.beforeContentFocusGuardRef,children:ue})}),Xj={parentVirtualFocusRef:void 0,handleFocus:void 0};function qj(){return Xj}var Rg=ac.forwardRef(function(t,o){let r=Fs()?.Popup??wy;return v(r,{...t,ref:o})});var fN=T(M(),1);var hg=T(M(),1),Iy=hg.createContext(void 0);function pN(){let e=hg.useContext(Iy);if(e===void 0)throw new Error(Me(32));return e}var bg=fN.forwardRef(function(t,o){let{keepMounted:r=!1,...n}=t,{store:s,parent:i}=ht();if(!(s.useState("mounted")||r))return null;let c=i.type==="menu"||i.type==="menubar"?"group":void 0;return v(Iy.Provider,{value:r,children:v(an,{ref:o,...n,portalOwnerRole:c})})});var fa=T(M(),1);var My=T(M(),1);function Cg(e){let{store:t,domReference:o,positionerElement:r,open:n}=e,s=My.useRef(null),i=My.useRef(null),l=jr(r);z(()=>{n||(i.current?.abort(),i.current=null,t.state.instantType==="trigger-change"&&t.set("instantType",void 0))},[n,t]),z(()=>{let a=o,c=s.current;if(a&&(s.current=a),!c||!a||a===c||!t.select("open"))return;t.set("instantType",void 0);let u=new AbortController;return i.current=u,l(()=>{t.select("open")&&t.set("instantType","trigger-change")},u.signal),()=>{u.abort()}},[o,l,t])}var yg=fa.forwardRef(function(t,o){let{anchor:r,positionMethod:n="absolute",className:s,render:i,side:l,align:a,sideOffset:c=0,alignOffset:u=0,collisionBoundary:p="clipping-ancestors",collisionPadding:f=5,arrowPadding:m=5,sticky:d=!1,disableAnchorTracking:R=!1,collisionAvoidance:g=Wi,style:b,...x}=t,{store:h,virtualFocus:y,syncHighlightedItem:C}=ht(),S=pN(),E=Vs(!0),P=h.useState("parent"),N=h.useState("floatingRootContext"),w=h.useState("floatingTreeRoot"),D=h.useState("mounted"),G=h.useState("open"),I=h.useState("modal"),O=h.useState("openMethod"),A=h.useState("activeTriggerElement"),L=h.useState("transitionStatus"),X=h.useState("positionerElement"),F=h.useState("instantType"),B=h.useState("adaptiveOrigin"),k=h.useState("lastOpenChangeReason"),Y=h.useState("floatingNodeId"),V=h.useState("floatingParentNodeId"),q=N.useState("domReferenceElement"),H=r,K=c,Z=u,ee=a,Q=g;P.type==="context-menu"&&(H=r??P.context?.anchor,ee=ee??"start",!l&&ee!=="center"&&(Z=t.alignOffset??2,K=t.sideOffset??-5));let te=l,de=ee;P.type==="menu"?(te=te??"inline-end",de=de??"start",Q=t.collisionAvoidance??bn):P.type==="menubar"&&(te=te??(P.context.orientation==="vertical"?"inline-end":"bottom"),de=de??"start");let ue=P.type==="context-menu",J=Xr({anchor:H,floatingRootContext:N,positionMethod:E?"fixed":n,mounted:D,side:te,sideOffset:K,align:de,alignOffset:Z,arrowPadding:ue?0:m,collisionBoundary:p,collisionPadding:f,sticky:d,nodeId:Y,keepMounted:S,disableAnchorTracking:R,collisionAvoidance:Q,shift:ue?{crossAxis:!("side"in Q&&Q.side==="flip"),rootBoundary:"layoutViewport"}:void 0,externalTree:w,adaptiveOrigin:B,lazyFlip:y?"placement":!1});fa.useEffect(()=>{function Ce(W){W.open&&(W.parentNodeId===Y&&h.set("hoverEnabled",!1),W.nodeId!==Y&&W.parentNodeId===h.select("floatingParentNodeId")&&h.setOpen(!1,fe(U.siblingOpen)))}return w.events.on("menuopenchange",Ce),()=>{w.events.off("menuopenchange",Ce)}},[h,w.events,Y]),fa.useEffect(()=>{if(h.select("floatingParentNodeId")==null)return;function Ce(W){if(W.open||W.nodeId!==h.select("floatingParentNodeId"))return;let me=W.reason??U.siblingOpen;h.setOpen(!1,fe(me))}return w.events.on("menuopenchange",Ce),()=>{w.events.off("menuopenchange",Ce)}},[w.events,h]);let re=it();fa.useEffect(()=>{G||re.clear()},[G,re]),fa.useEffect(()=>{function Ce(W){if(!(!G||W.nodeId!==h.select("floatingParentNodeId")))if(W.target&&A&&A!==W.target){let me=h.select("closeDelay");me>0?re.isStarted()||re.start(me,()=>{h.setOpen(!1,fe(U.siblingOpen))}):h.setOpen(!1,fe(U.siblingOpen))}else re.clear()}return w.events.on("itemhover",Ce),()=>{w.events.off("itemhover",Ce)}},[w.events,G,A,h,re]),fa.useEffect(()=>{let Ce={open:G,nodeId:Y,parentNodeId:V,reason:h.select("lastOpenChangeReason")};w.events.emit("menuopenchange",Ce)},[w.events,G,h,Y,V]),Cg({store:h,domReference:q,positionerElement:X,open:G});let $={open:G,side:J.side,align:J.align,anchorHidden:J.anchorHidden,nested:P.type==="menu",instant:F},ie=P.type==="menubar"&&P.context.modal,le=I&&k!==U.triggerHover;ra(G&&(ie||le),O==="touch",X,A);let he=Pr(t,$,{styles:J.positionerStyles,transitionStatus:L,props:x,refs:[o,h.useStateSetter("positionerElement")],hidden:!D,inert:!G}),Pe=D&&P.type!=="menu"&&(P.type!=="menubar"&&I&&k!==U.triggerHover||P.type==="menubar"&&P.context.modal),ge=null;return P.type==="menubar"?ge=P.context.contentElement:P.type===void 0&&(ge=A),v(Cy.Provider,{value:J,children:[Pe&&v(Ns,{ref:P.type==="context-menu"||P.type==="nested-context-menu"?P.context.internalBackdropRef:null,inert:ko(!G),cutout:ge}),v(ln,{id:Y,children:v(Jo,{elementsRef:h.context.itemDomElements,labelsRef:h.context.itemLabels,onMapChange:C,children:he})})]})});var li=T(M(),1);var vg=T(M(),1),Dy=vg.createContext(void 0);function dN(){let e=vg.useContext(Dy);if(e===void 0)throw new Error(Me(34));return e}var Ny=li.forwardRef(function(t,o){let{render:r,className:n,value:s,defaultValue:i,onValueChange:l,disabled:a=!1,style:c,"aria-labelledby":u,...p}=t,[f,m]=li.useState(void 0),[d,R]=Nt({controlled:s,default:i,name:"MenuRadioGroup"}),g=j((y,C)=>{l?.(y,C),!C.isCanceled&&R(y)}),x=_("div",t,{state:{disabled:a},ref:o,props:{role:"group","aria-labelledby":u??f,"aria-disabled":a||void 0,...p}}),h=li.useMemo(()=>({value:d,setValue:g,disabled:a}),[d,g,a]);return v(up.Provider,{value:m,children:v(Dy.Provider,{value:h,children:x})})}),Eg=li.memo(li.forwardRef(function(t,o){let r=Fs()?.RadioGroup??Ny;return v(r,{...t,ref:o})}));var mp=T(M(),1);var Sg=T(M(),1),Ay=Sg.createContext(void 0);function mN(){let e=Sg.useContext(Ay);if(e===void 0)throw new Error(Me(35));return e}var Jj=mp.forwardRef(function(t,o){let{render:r,className:n,id:s,label:i,nativeButton:l=!1,disabled:a=!1,closeOnClick:c=!1,value:u,style:p,...f}=t,{store:m}=ht(),{value:d,setValue:R,disabled:g}=dN(),b=oo({guess:!0,label:i}),x=je(s),h=m.useState("isActive",b.index),y=m.useState("floatingNodeId"),C=m.useState("itemProps"),S=m.useState("disabled"),E=a||g||S,P=d===u,{getItemProps:N,itemRef:w}=ua({closeOnClick:c,disabled:E,highlighted:h,id:x,store:m,nativeButton:l,nodeId:y,itemMetadata:la}),D=mp.useMemo(()=>({disabled:E,highlighted:h,checked:P}),[E,h,P]);function G(O){let A=fe(U.itemPress,O.nativeEvent,void 0,{preventUnmountOnClose:Qe});R(u,A)}let I=_("div",t,{state:D,stateAttributesMapping:pa,props:[C,{role:"menuitemradio","aria-checked":P,onClick:G},f,N],ref:[w,o,b.ref]});return v(Ay.Provider,{value:D,children:I})}),Pg=mp.forwardRef(function(t,o){let r=Ls(t,o);return r.visible?v(Jj,{...t,ref:r.ref}):null});var Tg=T(M(),1);var wg=Tg.forwardRef(function(t,o){let{render:r,className:n,style:s,keepMounted:i=!1,...l}=t,a=mN(),c=Tg.useRef(null),{transitionStatus:u,mounted:p,setMounted:f}=Xt(a.checked);St({batch:!0,enabled:!a.checked,open:a.checked,ref:c,onComplete(){a.checked||f(!1)}});let m={checked:a.checked,disabled:a.disabled,highlighted:a.highlighted,transitionStatus:u};return _("span",t,{state:m,stateAttributesMapping:pa,ref:[o,c],props:{"aria-hidden":!0,...l},enabled:i||p})});var no=T(M(),1);var Ig=T(M(),1),Oy=Ig.createContext(null);function da(e){let t=Ig.useContext(Oy);if(t===null&&!e)throw new Error(Me(5));return t}var Pl=T(M(),1);var gN={...Vr,disabled:e=>e.parent.type==="menubar"&&e.parent.context.disabled||e.disabled,modal:e=>(e.parent.type===void 0||e.parent.type==="context-menu")&&(e.modal??!0),openMethod:e=>e.openMethod,keyboardOpen:e=>e.keyboardOpen,allowMouseEnter:e=>e.allowMouseEnter,highlightItemOnHover:e=>e.highlightItemOnHover,parent:e=>e.parent,rootId:e=>e.parent.type==="menu"?e.parent.store.select("rootId"):e.parent.type!==void 0?e.parent.context.rootId:e.rootId,activeIndex:e=>e.activeIndex,listElement:e=>e.listElement,triggerControlsId:(e,t)=>{let o=Vr.triggerPopupId(e,t);return o?e.listElement?.id||o:void 0},filterTriggerProps:e=>e.filterTriggerProps,inputProps:e=>e.inputProps,webkitAriaSelected:(e,t)=>dt.engine.webkit&&e.inputFocused&&t?!0:void 0,highlightedItemId:e=>e.highlightedItem?.id||void 0,isActive:(e,t)=>e.activeIndex===t,hoverEnabled:e=>e.hoverEnabled,instantType:e=>e.instantType==="trigger-change"&&!Vr.open(e)?void 0:e.instantType,lastOpenChangeReason:e=>e.openChangeReason,floatingTreeRoot:e=>e.parent.type==="menu"?e.parent.store.select("floatingTreeRoot"):e.floatingTreeRoot,floatingNodeId:e=>e.floatingNodeId,floatingParentNodeId:e=>e.floatingParentNodeId,itemProps:e=>e.itemProps,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin,keyboardEventRelay:e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type==="menu")return e.parent.store.select("keyboardEventRelay")}},Mg=class extends go{constructor(t,o,r=!1){let n=new Mo,s=hN(n,o,r,t);super(s,RN(n),gN),this.observe("parent",i=>{i.type==="menu"?this.context.allowMouseUpTriggerRef=i.store.context.allowMouseUpTriggerRef:i.type!==void 0&&(this.context.allowMouseUpTriggerRef=i.context.allowMouseUpTriggerRef)})}subscribeToParentMenu(){let t=this.state.parent;if(t.type!=="menu")return;let o=t.store.select("rootId"),r=t.store.select("floatingTreeRoot"),n=t.store.select("keyboardEventRelay");return t.store.subscribe(()=>{let s=t.store.select("rootId"),i=t.store.select("floatingTreeRoot"),l=t.store.select("keyboardEventRelay");o===s&&r===i&&n===l||(o=s,r=i,n=l,this.notifyAll())})}setOpen(t,o){this.state.floatingRootContext.context.events.emit("setOpen",{open:t,eventDetails:o})}setActiveIndex(t,o,r){if(this.state.activeIndex!==t){let s=(t===null?void 0:this.context.itemDomElements.current[t])===this.context.reportedItem;this.context.highlightReason=s?"none":o,this.context.highlightEvent=s?void 0:r}this.set("activeIndex",t)}highlightItem(t,o,r){let n=this.context.itemDomElements.current.indexOf(t);n>-1&&this.setActiveIndex(n,o,r)}};function xN(){let e=new Mo,t=new vn(Object.freeze(hN(e)),Object.freeze(RN(e)),gN);return Object.assign(t,{setOpen:Qe})}function RN(e){return{positionerRef:Pl.createRef(),popupRef:Pl.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},highlightReason:"none",highlightEvent:void 0,reportedItem:void 0,allowMouseUpTriggerRef:{current:!1},virtualFocusRef:void 0,triggerFocusTargetRef:Pl.createRef(),beforeTriggerFocusGuardRef:Pl.createRef(),beforeContentFocusGuardRef:Pl.createRef(),onOpenChangeComplete:void 0,triggerElements:e}}function hN(e,t,o=!1,r){return{...ws(e,t,o),disabled:!1,modal:!0,openMethod:null,keyboardOpen:!1,allowMouseEnter:!1,highlightItemOnHover:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,listElement:null,filterTriggerProps:qe,inputProps:qe,inputFocused:!1,highlightedItem:void 0,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new ji,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:qe,keyboardEventRelay:void 0,closeDelay:0,adaptiveOrigin:void 0,...r}}var bN=T(M(),1),ma=bN.createContext(null);function Vy(e,t){return(e===U.triggerPress||e===U.itemPress)&&t?.detail===0}function Dg(e,t){return e===U.listNavigation||Vy(e,t)}var cc=zn(function(t){let{children:o,open:r,onOpenChange:n,onOpenChangeComplete:s,onItemHighlighted:i,defaultOpen:l=!1,disabled:a=!1,modal:c,loopFocus:u=!0,orientation:p="vertical",actionsRef:f,closeParentOnEsc:m=!1,handle:d,triggerId:R,defaultTriggerId:g=null,highlightItemOnHover:b=!0,isSubmenu:x=!1,virtualFocus:h=!1,virtualFocusRef:y,allowEscape:C=!0,resetOnPointerLeave:S=!0}=t,E=Vs(!0),P=ht(!0),N=da(!0),w=P?.store,D=P?.virtualFocus??!1,G=no.useMemo(()=>x&&w?{type:"menu",store:w}:N?{type:"menubar",context:N}:E&&!w?{type:"context-menu",context:E}:{type:void 0},[E,w,N,x]),I=je(),O=je(),[A,L]=no.useState(void 0),X=(A??O)||void 0,F=ar(),B=G.type==="menu"?G.store:void 0,k=(r??l)&&B?.state.transitionStatus==="starting",Y=ut(()=>k?B?.state.instantType:void 0).current,V=ut(()=>{let pe=new Mg({open:l,openProp:r,activeTriggerId:g,triggerIdProp:R,parent:G,disabled:a,highlightItemOnHover:b,modal:G.type===void 0?c:void 0,rootId:I,instantType:Y},X,F!=null);return pe.context.virtualFocusRef=y,pe}).current;V.useControlledProp("openProp",r),V.useControlledProp("triggerIdProp",R),V.useContextCallback("onOpenChangeComplete",s);let q=V.useState("floatingTreeRoot"),H=cn(q),K=V.useState("open"),Z=V.useState("activeTriggerElement"),ee=V.useState("positionerElement"),Q=V.useState("hoverEnabled"),te=V.useState("disabled"),de=V.useState("lastOpenChangeReason"),ue=V.useState("parent"),J=V.useState("activeIndex"),re=V.useState("keyboardOpen"),$=V.useState("payload"),ie=V.useState("floatingParentNodeId"),le=no.useRef(null),he=no.useRef(ue.type!=="context-menu"),Pe=it(),ge=no.useRef(!0),Ce=it(),W=ie!=null,{openMethod:me,triggerProps:xe}=Zc(K);V.useSyncedValues({disabled:a,highlightItemOnHover:b,modal:ue.type===void 0?c:void 0,openMethod:me,rootId:I}),vs(V);let{forceUnmount:ve,transitionStatus:ne}=Es(K,V,()=>{V.set("allowMouseEnter",!1)},k),oe=jr(V.context.popupRef);no.useEffect(()=>{if(Y===void 0)return;let pe=()=>{V.state.instantType===Y&&V.set("instantType",void 0)};if(!K){pe();return}if(ne!==void 0)return;if(V.context.popupRef.current==null){pe();return}let we=new AbortController;return oe(pe,we.signal),()=>{we.abort()}},[Y,K,ne,oe,V]),z(()=>{E&&!P?V.update({parent:{type:"context-menu",context:E},floatingNodeId:H,floatingParentNodeId:F}):(P||!V.select("activeTriggerElement"))&&V.update({floatingNodeId:H,floatingParentNodeId:F})},[E,P,H,F,Z,V]),no.useEffect(()=>{if(K||(le.current=null),ue.type==="context-menu"){if(!K){Pe.clear(),he.current=!1;return}Pe.start(500,()=>{he.current=!0})}},[Pe,K,ue.type]),z(()=>{!K&&!Q&&V.set("hoverEnabled",!0)},[K,Q,V]);let ye=j((pe,we)=>{let Oe=we.reason;if(!pe&&!V.select("open")||K===pe&&we.trigger===Z&&de===Oe)return;let Le=Kn(we);if(!pe&&we.trigger==null&&(we.trigger=Z??void 0),n?.(pe,we),we.isCanceled)return;V.state.floatingRootContext.dispatchOpenChange(pe,we);let Je=we.event;if(pe===!1&&Oe!==U.itemPress&&Je?.type==="click"&&Je.pointerType==="touch"&&!ge.current)return;pe&&Oe===U.triggerFocus?(ge.current=!1,Ce.start(300,()=>{ge.current=!0})):(ge.current=!0,Ce.clear());let Be=!pe&&(Oe===U.escapeKey||Oe==null);le.current=we.event;let nt=ja(V.state,pe,we.trigger,Le());nt.openChangeReason=Oe,nt.keyboardOpen=pe&&Dg(Oe,Je),ue.type==="menubar"&&(Oe===U.triggerFocus||Oe===U.focusOut||Oe===U.triggerHover||Oe===U.listNavigation||Oe===U.siblingOpen)?nt.instantType="group":Vy(Oe,Je)?nt.instantType="click":Be?nt.instantType="dismiss":nt.instantType=void 0,V.update(nt)}),be=Au({popupStore:V,floatingRootContext:V.state.floatingRootContext,floatingId:X,nested:F!=null,onOpenChange:ye}),se=be.context.events;z(()=>{let pe=({open:we,eventDetails:Oe})=>ye(we,Oe);return se.on("setOpen",pe),()=>{se?.off("setOpen",pe)}},[se,ye]),z(()=>V.subscribeToParentMenu(),[V]);let Ne=no.useCallback(()=>{V.setOpen(!1,fe(U.imperativeAction))},[V]);no.useImperativeHandle(f,()=>({unmount:ve,close:Ne}),[ve,Ne]);let Ae;ue.type==="context-menu"&&(Ae=ue.context),no.useImperativeHandle(Ae?.positionerRef,()=>ee,[ee]),no.useImperativeHandle(Ae?.actionsRef,()=>({setOpen:ye}),[ye]);let Ve=ur(be,{enabled:!te,bubbles:{escapeKey:m&&ue.type==="menu"},outsidePress(){return ue.type!=="context-menu"||le.current?.type==="contextmenu"?!0:he.current},externalTree:W?q:void 0}),Te=At(),De=za(be,{enabled:!te,listRef:V.context.itemDomElements,activeIndex:J,virtual:h,nested:ue.type==="menubar"||!h&&ue.type!==void 0,parentOrientation:ue.type==="menubar"?ue.context.orientation:void 0,loopFocus:u,focusItemOnOpen:h?re:void 0,allowEscape:h&&u&&C,orientation:p,triggerOrientation:h?"vertical":p,rtl:Te==="rtl",disabledIndices:yt,onNavigate(pe,we){V.setActiveIndex(pe,As(we),we?.nativeEvent)},openOnArrowKeyDown:ue.type!=="context-menu"&&!(h&&x),externalTree:!h&&W?q:void 0,nestedReturnFocusRef:B?.context.virtualFocusRef,focusItemOnHover:b,resetOnPointerLeave:S}),ze=no.useCallback(pe=>{V.context.typingRef.current=pe},[V]),We=Xa(be,{enabled:!te&&!h,listRef:V.context.itemLabels,elementsRef:V.context.itemDomElements,activeIndex:J,resetMs:500,onMatch:(pe,we)=>{K&&pe!==J&&V.setActiveIndex(pe,U.keyboard,we.nativeEvent)},onTyping:ze}),Ge=j(i),He=no.useRef(-1),Ue=j(()=>{let pe=V.state.activeIndex,we=pe===null?void 0:V.context.itemDomElements.current[pe]??void 0;if(we?.isConnected===!1)return;let Oe=we===void 0?-1:pe;if(He.current===Oe&&V.context.reportedItem===we)return;He.current=Oe,V.context.reportedItem=we,h&&V.set("highlightedItem",we);let{highlightReason:Le,highlightEvent:Je}=V.context;V.context.highlightReason=U.none,V.context.highlightEvent=void 0,i&&Ge(we,to(Le,Je,{label:we===void 0?void 0:V.context.itemLabels.current[Oe]??void 0}))});z(()=>{Ue()},[J,Ue]);let rt=no.useMemo(()=>{if(!h)return De.reference;if(!De.trigger)return qe;let{onFocus:pe,...we}=De.trigger;return we},[h,De.reference,De.trigger]);V.useSyncedValue("inputProps",h?De.reference??qe:qe);let et=no.useMemo(()=>{let pe=Pt(We.reference,rt,Ve.reference,{onMouseMove(){V.set("allowMouseEnter",!0)}},xe);return pe["aria-haspopup"]="menu",pe["aria-expanded"]=K,pe},[V,We.reference,rt,Ve.reference,xe,K]),pt=no.useMemo(()=>{let pe=Pt(De.trigger,Ve.trigger,xe);return pe["aria-haspopup"]="menu",pe["aria-expanded"]=!1,pe},[De.trigger,Ve.trigger,xe]);ut(()=>(V.update({inactiveTriggerProps:pt}),null));let wt=no.useMemo(()=>Pt(Sr,{onMouseMove(){V.set("allowMouseEnter",!0),ue.type==="menu"&&V.set("hoverEnabled",!1)},onClick(){V.select("hoverEnabled")&&V.set("hoverEnabled",!1)},onKeyDown(pe){let we=V.select("keyboardEventRelay");we&&!pe.isPropagationStopped()&&we(pe)}},We.floating,De.floating,Ve.floating),[ue.type,V,We.floating,De.floating,Ve.floating]),Se=De.item??qe;Ss(V,{floatingRootContext:be,activeTriggerProps:et,inactiveTriggerProps:pt,popupProps:wt,itemProps:Se});let ke=no.useMemo(()=>({store:V,parent:G,orientation:p,loopFocus:u,allowEscape:C,defaultFloatingId:O,setRenderedFloatingId:L,virtualFocus:h,parentVirtualFocus:D,syncHighlightedItem:Ue}),[V,G,p,u,C,O,h,D,Ue]),Ie=typeof o=="function"?o({payload:$}):o,_e=v(ic.Provider,{value:ke,children:[d&&v(Cs,{handle:d,store:V}),Ie]});return(ue.type===void 0||ue.type==="context-menu")&&(_e=v(Yn,{externalTree:q,children:_e})),_e});function CN(e){let t=no.useContext(ma);if(t===null)return v(cc,{...e});let o=t.Root;return v(ma.Provider,{value:null,children:v(o,{...t.options,...e})})}var yN=T(M(),1);var Qj={};function Ng(e){ht();let t=yN.useContext(ma);if(t!==null){let o=t.SubmenuRoot;return v(ma.Provider,{value:null,children:v(o,{...t.options,...e})})}return v(dp.Provider,{value:Qj,children:v(cc,{...e,isSubmenu:!0})})}var wr=T(M(),1);var vN=T(M(),1);function Ag(e={}){let{highlightItemOnHover:t,highlightedIndex:o,onHighlightedIndexChange:r}=ki(),{ref:n,index:s}=oo(e),i=o===s,l=vN.useRef(null),a=kt(n,l);return{compositeProps:{tabIndex:i?0:-1,onFocus(){r(s)},onMouseMove(){let u=l.current;if(!t||!u)return;let p=u.hasAttribute("disabled")||u.ariaDisabled==="true";!i&&!p&&u.focus()}},compositeRef:a,index:s}}function Tr(e){let{render:t,className:o,style:r,state:n=qe,props:s=yt,refs:i=yt,metadata:l,stateAttributesMapping:a,tag:c="div",...u}=e,{compositeProps:p,compositeRef:f}=Ag({metadata:l});return _(c,e,{state:n,ref:[f,...i],props:[p,...s,u],stateAttributesMapping:a})}function gp(e){if(tt(e)&&e.hasAttribute("data-rootownerid"))return e.getAttribute("data-rootownerid");if(!Cr(e))return gp(zo(e))}var EN=T($o(),1);function Og(e,t){function o(s,i,l){let a=s.currentTarget;EN.flushSync(()=>{e.setOpen(!1,fe(U.focusOut,s.nativeEvent,a))}),Jf(a.isConnected?a:t.current,i,l)?.focus()}function r(s){o(s,-1,e.select("positionerElement"))}function n(s){let i=e.select("positionerElement");i&&ir(s,i)?e.context.beforeContentFocusGuardRef.current?.focus():o(s,1,i)}return{handlePreFocusGuardFocus:r,handleFocusTargetFocus:n}}var Vg=T(M(),1);function SN(e){let{enabled:t=!0,mouseDownAction:o,open:r}=e,n=Vg.useRef(!1);return Vg.useMemo(()=>t?{onMouseDown:s=>{(o==="open"&&!r||o==="close"&&r)&&(n.current=!0,Fe(s.currentTarget).addEventListener("click",()=>{n.current=!1},{once:!0}))},onClick:s=>{n.current&&(n.current=!1,s.preventBaseUIHandler())}}:qe,[t,o,r])}var PN=Ps(function(t,o){let{render:r,className:n,style:s,disabled:i=!1,nativeButton:l=!0,id:a,openOnHover:c,delay:u=100,closeDelay:p=0,handle:f,payload:m,...d}=t,R=ht(!0),b=Is(f)??R?.store;if(!b)throw new Error(Me(85));let x=je(a),h=b.useState("isTriggerActive",x),y=b.useState("floatingRootContext"),C=b.useState("isOpenedByTrigger",x),S=b.useState("triggerControlsId",x),E=wr.useRef(null),P=eY(),N=ki(!0),w=Po(),D=wr.useMemo(()=>w??new ji,[w]),G=cn(D),I=ar(),{registerTrigger:O,isMountedByThisTrigger:A}=ys(x,E,b,{payload:m,closeDelay:p,parent:P,floatingTreeRoot:D,floatingNodeId:G,floatingParentNodeId:I,keyboardEventRelay:N?.relayKeyboardEvent}),L=P.type==="menubar",X=b.useState("disabled"),F=i||X||L&&P.context.disabled,{getButtonProps:B,buttonRef:k}=ft({disabled:F,native:l});wr.useEffect(()=>{!C&&P.type===void 0&&(b.context.allowMouseUpTriggerRef.current=!1)},[b,C,P.type]);let Y=wr.useRef(null),V=it(),q=j(Ce=>{if(!Y.current)return;V.clear(),b.context.allowMouseUpTriggerRef.current=!1;let W=Ce.target;Ee(Y.current,W)||Ee(b.select("positionerElement"),W)||W===Y.current||W!=null&&gp(W)===b.select("rootId")||sl(Ce,Y.current)||D.events.emit("close",{domEvent:Ce,reason:U.cancelOpen})});wr.useEffect(()=>{let Ce=Fe(Y.current);if(C&&b.select("lastOpenChangeReason")===U.triggerHover)return Ce.addEventListener("mouseup",q,{once:!0}),()=>{Ce.removeEventListener("mouseup",q)}},[C,q,b]);let H=L&&P.context.hasSubmenuOpen,Z=pn(y,{enabled:(c??H)&&!F&&(!L||H&&!A),handleClose:fn({blockPointerEvents:!L}),mouseOnly:!0,move:!1,restMs:P.type===void 0?u:void 0,delay:{close:p},triggerElementRef:E,externalTree:D,isActiveTrigger:h,isClosing:()=>b.select("transitionStatus")==="ending"}),ee=Zj(C,b.select("lastOpenChangeReason")),Q=lr(y,{enabled:!F,event:C&&L?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:P.type===void 0?ee:!1}),te=Ka(y,{enabled:!F&&H}),de=SN({open:C,enabled:L,mouseDownAction:"open"}),ue=wr.useMemo(()=>Pt(te.reference,Q.reference),[te.reference,Q.reference]),J=b.useState("triggerProps",A),re=b.useState("filterTriggerProps"),{handlePreFocusGuardFocus:$,handleFocusTargetFocus:ie}=Og(b,E),le={disabled:F,open:C},he=[Y,o,k,O,E],Pe=[ue,Z??qe,J,{"aria-haspopup":"menu","aria-controls":S,id:x,onMouseDown:Ce=>{if(b.select("open"))return;V.start(200,()=>{b.context.allowMouseUpTriggerRef.current=!0}),Fe(Ce.currentTarget).addEventListener("mouseup",q,{once:!0})}},re,L?{role:"menuitem"}:{},de,d,B],ge=_("button",t,{enabled:!L,stateAttributesMapping:rn,state:le,ref:he,props:Pe});return L?v(Tr,{tag:"button",render:r,className:n,style:s,state:le,refs:he,props:Pe,stateAttributesMapping:rn}):C?v(wr.Fragment,{children:[v(Fo,{ref:b.context.beforeTriggerFocusGuardRef,onFocus:$},`${x}-pre-focus-guard`),v(wr.Fragment,{children:ge},x),v(Fo,{ref:b.context.triggerFocusTargetRef,onFocus:ie},`${x}-post-focus-guard`)]}):v(wr.Fragment,{children:ge},x)});function Zj(e,t){let o=it(),[r,n]=wr.useState(!1);return z(()=>{e&&t===U.triggerHover?(n(!0),o.start(500,()=>{n(!1)})):e||(o.clear(),n(!1))},[e,t,o]),r}function eY(){let e=da(!0);return wr.useMemo(()=>e?{type:"menubar",context:e}:{type:void 0},[e])}var VN=T(M(),1);var dr=T(M(),1),ON=T($o(),1);var TN=T(M(),1);function Fg(e){let[t,o]=TN.useState({current:e,previous:null});return Object.is(e,t.current)||o({current:e,previous:t.current}),t.previous}var _g=T(M(),1);function Tn(e){let t=fo(e),o=parseFloat(t.width)||0,r=parseFloat(t.height)||0,n=tt(e),s=n?e.offsetWidth:o,i=n?e.offsetHeight:r;return(Hi(o)!==s||Hi(r)!==i)&&(o=s,r=i),{width:o,height:r}}var xp="--popup-width",Rp="--popup-height";function MN(e){let{popupElement:t,positionerElement:o,content:r,mounted:n,onMeasureLayout:s,onMeasureLayoutComplete:i,side:l,direction:a}=e,c=jr(t,!0),u=ao(),p=_g.useRef(null),f=j(s),m=j(i),d=_g.useMemo(()=>tY(l,a),[l,a]);z(()=>{if(!n){p.current=null;return}if(!t||!o)return;let R=IN(t,d);Ly(t,"auto");let g=kg(t,"position","static"),b=kg(t,"transform","none"),x=kg(t,"scale","1"),h=IN(o,{[gm]:"max-content",[xm]:"max-content"});function y(){g(),b(),h(),x()}if(f?.(),p.current===null){Lg(o,"max-content");let P=Tn(t);return p.current=P,Lg(o,P),y(),m?.(null,P),R}Lg(o,"max-content");let C=p.current,S=Tn(t);p.current=S,Ly(t,C),y(),m?.(C,S),Lg(o,S);let E=new AbortController;return u.request(()=>{Ly(t,S),c(()=>{t.style.setProperty(xp,"auto"),t.style.setProperty(Rp,"auto")},E.signal)}),()=>{E.abort(),u.cancel(),R()}},[r,t,o,c,u,n,f,m,d])}function tY(e,t){let o=e==="top",r=e==="left"||e===(t==="rtl"?"inline-end":"inline-start");return!o&&!r?qe:{position:"absolute",[o?"bottom":"top"]:"0",[r?"right":"left"]:"0"}}function kg(e,t,o){let r=e.style.getPropertyValue(t);return e.style.setProperty(t,o),()=>{e.style.setProperty(t,r)}}function IN(e,t){let o=[];for(let[r,n]of Object.entries(t))o.push(kg(e,r,n));return o.length?()=>{o.forEach(r=>r())}:Qe}function Ly(e,t){let o=t==="auto"?"auto":`${t.width}px`,r=t==="auto"?"auto":`${t.height}px`;e.style.setProperty(xp,o),e.style.setProperty(Rp,r)}function Lg(e,t){let o=t==="max-content"?"max-content":`${t.width}px`,r=t==="max-content"?"max-content":`${t.height}px`;e.style.setProperty(QM,o),e.style.setProperty(ZM,r)}var DN=T(M(),1);var ky=function(t){let{direction:o="ltr"}=t,r=DN.useMemo(()=>({direction:o}),[o]);return v(OC.Provider,{value:r,children:t.children})};var Bg={name:"adaptiveOrigin",async fn(e){let{x:t,y:o,rects:{floating:r},elements:{floating:n},platform:s,strategy:i,placement:l}=e,a=Ze(n),c=a.getComputedStyle(n);if(!(c.transitionDuration!=="0s"&&c.transitionDuration!==""))return{x:t,y:o,data:fl};let p=await s.getOffsetParent?.(n),f={width:0,height:0};if(i==="fixed"&&a?.visualViewport)f={width:a.visualViewport.width,height:a.visualViewport.height};else if(p===a){let x=Fe(n);f={width:x.documentElement.clientWidth,height:x.documentElement.clientHeight}}else await s.isElement?.(p)&&(f=await s.getDimensions(p));let m=nr(l),d=t,R=o;m==="left"&&(d=f.width-(t+r.width)),m==="top"&&(R=f.height-(o+r.height));let g=m==="left"?"right":fl.sideX,b=m==="top"?"bottom":fl.sideY;return{x:d,y:R,data:{sideX:g,sideY:b}}}};var NN="data-activation-direction";var ga={activationDirection:e=>e?{[NN]:e}:null};function xa(e){let{store:t,side:o,children:r}=e,n=At(),s=t.useState("activeTriggerElement"),i=t.useState("activeTriggerId"),l=t.useState("open"),a=t.useState("payload"),c=t.useState("mounted"),u=t.useState("popupElement"),p=t.useState("positionerElement"),f=Fg(l?s:null),m=sY(i,a),d=dr.useRef(null),[R,g]=dr.useState(null),[b,x]=dr.useState(null),h=dr.useRef(null),y=dr.useRef(null),C=jr(h,!0),S=ao(),E=dr.useRef(null),[P,N]=dr.useState(null),[w,D]=dr.useState(!1);z(()=>(t.set("adaptiveOrigin",Bg),()=>{t.set("adaptiveOrigin",void 0)}),[t]);let G=j(()=>{h.current?.style.setProperty("animation","none"),h.current?.style.setProperty("transition","none"),y.current?.style.setProperty("display","none")}),I=j(B=>{h.current?.style.removeProperty("animation"),h.current?.style.removeProperty("transition"),y.current?.style.removeProperty("display"),B&&N(B)}),O=j(()=>{E.current?.abort();let B=new AbortController;E.current=B,C(()=>{g(null),N(null),d.current=null},B.signal)}),A=dr.useRef(null);z(()=>{(!l||!c)&&(A.current=null)},[l,c]),z(()=>{if(l&&s&&f&&s!==f&&A.current!==s&&d.current){g(d.current),D(!0);let B=nY(f,s);x(B),A.current=s}},[l,s,f]),z(()=>{R!=null&&(E.current?.abort(),D(!0),S.request(()=>{ON.flushSync(()=>{D(!1)}),O()}))},[m,R,O,S]),z(()=>{let B=h.current;if(!B)return;let k=Fe(B).createElement("div");for(let Y of Array.from(B.childNodes))k.appendChild(Y.cloneNode(!0));d.current=k});let L=R!=null,X;L?X=v(dr.Fragment,{children:[v("div",{"data-previous":!0,inert:ko(!0),ref:y,style:{...P?{[xp]:`${P.width}px`,[Rp]:`${P.height}px`}:null,position:"absolute"},"data-ending-style":w?void 0:""},"previous"),v("div",{"data-current":!0,ref:h,"data-starting-style":w?"":void 0,children:r},m)]}):X=v("div",{"data-current":!0,ref:h,children:r},m),z(()=>{let B=y.current;!B||!R||B.replaceChildren(...Array.from(R.childNodes))},[R]),MN({popupElement:u,positionerElement:p,mounted:c,content:a,onMeasureLayout:G,onMeasureLayoutComplete:I,side:o,direction:n});let F={activationDirection:rY(b),transitioning:L};return{children:X,state:F}}function rY(e){if(e)return`${AN(e.horizontal,5,"right","left")} ${AN(e.vertical,5,"down","up")}`}function AN(e,t,o,r){return e>t?o:e<-t?r:""}function nY(e,t){let o=e.getBoundingClientRect(),r=t.getBoundingClientRect(),n={x:o.left+o.width/2,y:o.top+o.height/2},s={x:r.left+r.width/2,y:r.top+r.height/2};return{horizontal:s.x-n.x,vertical:s.y-n.y}}function sY(e,t){let[o,r]=dr.useState(0),n=dr.useRef(e),s=dr.useRef(t),i=dr.useRef(!1);return z(()=>{let l=n.current,a=s.current,c=e!==l,u=t!==a;c?(r(p=>p+1),i.current=!u):i.current&&u&&(r(p=>p+1),i.current=!1),n.current=e,s.current=t},[e,t]),`${e??"current"}-${o}`}var FN=VN.forwardRef(function(t,o){let{render:r,className:n,style:s,children:i,...l}=t,{store:a}=ht(),{side:c}=ca(),u=a.useState("instantType"),{children:p,state:f}=xa({store:a,side:c,children:i}),m={activationDirection:f.activationDirection,transitioning:f.transitioning,instant:u};return _("div",t,{state:m,ref:o,props:[l,{children:p}],stateAttributesMapping:ga})});var LN=T(M(),1);var wn=LN.forwardRef(function(t,o){let{className:r,render:n,orientation:s="horizontal",style:i,...l}=t;return _("div",t,{state:{orientation:s},ref:o,props:[{role:"separator","aria-orientation":s},l]})});var Zn=T(M(),1);function Hg(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}var iY={"aria-expanded":void 0},aY=Zn.forwardRef(function(t,o){let{render:r,className:n,style:s,label:i,id:l,nativeButton:a=!1,openOnHover:c=!0,delay:u=100,closeDelay:p=0,disabled:f=!1,...m}=t,d=ht(!0);if(d?.parent.type!=="menu")throw new Error(Me(37));let R=ca(),g=El(),{store:b,parentVirtualFocus:x}=d,h=d.parent.store,y=oo({guess:!0,label:i}),C=je(l),S=b.useState("open"),E=Zn.useRef(!1),P=b.useState("positionerElement"),N=b.useState("floatingRootContext"),w=b.useState("floatingTreeRoot"),D=b.useState("triggerPopupId",C),G=Ou(C,b),I=j(le=>{G(le);let he=b.select("activeTriggerElement");le!==null&&b.select("open")&&(he===le||b.select("activeTriggerId")==null)&&b.update({activeTriggerId:C??null,activeTriggerElement:le,closeDelay:p})}),O=Zn.useRef(null),A=Zn.useCallback(le=>{O.current=le,b.set("activeTriggerElement",le)},[b]);z(()=>(I(O.current),()=>I(null)),[I,C,b]),z(()=>{if(!S||!P)return;function le(he){$e(he)===b.context.beforeContentFocusGuardRef.current&&(E.current=he.relatedTarget===O.current)}return P.addEventListener("focusout",le,!0),()=>{E.current=!1,P.removeEventListener("focusout",le,!0)}},[S,P,b]),b.useSyncedValue("closeDelay",p);let L=b.useState("disabled"),X=h.useState("disabled"),F=f||L||X,B=h.useState("itemProps"),k=h.useState("isActive",y.index),Y=Zn.useMemo(()=>({type:"submenu-trigger",setActive(le){h.select("highlightItemOnHover")&&h.setActiveIndex(y.index,U.pointer,le)}}),[h,y.index]),{getItemProps:V,itemRef:q}=ua({closeOnClick:!1,disabled:F,highlighted:k,id:C,store:b,typingRef:h.context.typingRef,nativeButton:a,itemMetadata:Y,nodeId:R?.context.nodeId}),H=b.useState("hoverEnabled"),K=pn(N,{enabled:H&&c&&!F,handleClose:fn({blockPointerEvents:!0}),mouseOnly:!0,move:!0,restMs:u,delay:{open:u,close:p},shouldOpen:u>0?()=>h.select("allowMouseEnter"):void 0,triggerElementRef:O,externalTree:w,isClosing:()=>b.select("transitionStatus")==="ending",guardStaleOpen:!0}),ee=lr(N,{enabled:!F,event:"mousedown",toggle:!0,ignoreMouse:c,stickIfOpen:c}).reference??qe,Q=b.useState("triggerProps",!0);delete Q.id;let te={disabled:F,highlighted:k,open:S},de=b.useState("openMethod"),J=b.useState("lastOpenChangeReason")===U.listNavigation||de==="keyboard",re=S&&J&&dt.screenReader.voiceOver,$=g?.onTriggerKeyDown?{onKeyDown:g.onTriggerKeyDown}:void 0;return _("div",t,{state:te,stateAttributesMapping:yr,props:[ee,K,Q,$,B,re?iY:void 0,{"aria-controls":D,tabIndex:x||!(S||k)?-1:0,onFocus(le){b.select("open")&&E.current&&(E.current=!1,b.setOpen(!1,fe(U.focusOut,le.nativeEvent)))},onBlur(){k&&h.setActiveIndex(null,U.none)}},m,V],ref:[o,y.ref,q,I,A]})}),Ug=Zn.forwardRef(function(t,o){let r=Ls(t,o,"submenu-trigger");if(!r.visible)return null;let n=r.props?Pt(r.props,t):t;return v(aY,{...n,ref:r.ref})});var hp=class extends Cn{constructor(){super(xN(),"Menu")}open(t){this.openByTrigger(t)}close(){this.closePopup()}get isOpen(){return this.attachedStore?.select("open")??!1}};function kN(){return new hp}var sA=T(M(),1);var TAe=T(M(),1);var tA=T(M(),1);var qr=T(M(),1);var Tl=T(M(),1);function Gg(){let e=ut(()=>new Map).current,[t,o]=Tl.useState(0),r=Tl.useRef(!1),n=j(()=>{r.current||(r.current=!0,o(l=>l+1))}),s=j((l,a)=>(e.set(l,a),n(),()=>{e.delete(l),n()})),i=Tl.useMemo(()=>new Map(e),[t]);return z(()=>{r.current=!1},[t]),{items:i,registerItem:s,liveItems:e}}var ui=T(M(),1);function _N(){throw new Error(Me(103))}var bp=ui.createContext(null);function ks(e=!1){let t=ui.useContext(bp);return t===null&&!e&&_N(),t}var _y=ui.createContext(null);function _s(e=!1){let t=ui.useContext(_y);return t===null&&!e&&_N(),t}function BN(e){let t=ui.useContext(bp);if(e===null)return null;for(;t!==null&&t.listRef!==e;)t=t.parent;return t}var By=ui.createContext("");function Ra(){return ui.useContext(By)}var yp={isEmpty:e=>e.visibleItemIds===null?e.registeredItemCount===0:e.visibleItemIds.size===0,isItemVisible:(e,t)=>e.visibleItemIds===null||e.visibleItemIds.has(t)},Cp=class extends go{constructor(){super({visibleItemIds:null,registeredItemCount:0},qe,yp)}},HN={registerItem:()=>Qe,store:new Cp};function UN(e){let{children:t,open:o,disabled:r=!1,openedByKeyboard:n=!1,locale:s,value:i,query:l,onValueChange:a,filter:c,autoHighlight:u=!1,triggerId:p,listRef:f,getActiveIndex:m,setActiveIndex:d,focusOwnerRef:R}=e,g=qr.useContext(bp),[b,x]=qr.useState(void 0),[h,y]=qr.useState(n),[C,S]=qr.useState(n),[E,P]=qr.useState(n);n!==E&&(P(n),y(n),S(n));let{items:N,registerItem:w,liveItems:D}=Gg(),G=je(),I=ut(()=>new Cp).current,O=j((te,de)=>{let ue=w(te,de);return I.set("registeredItemCount",D.size),()=>{ue(),I.set("registeredItemCount",D.size)}}),A=qr.useRef(null),L=qr.useRef(null),X=qr.useMemo(()=>oc({locale:s}).contains,[s]),F=R??A,B=(l??i).trim(),k=B===""||c===null?null:c??X,Y=o&&(u==="always"||u&&B!==""),V=G?`${G}-list`:void 0,q=(b??V)||void 0,H=p||void 0,K=j((te,de)=>{a?.(te,de),!de.isCanceled&&!u&&d(null)}),Z=j(te=>{let de=f.current,ue=m();ue!=null&&de[ue]!=null&&de[ue]===te[ue]||d(Y&&de.length>0?0:null)});z(()=>{if(!o&&l===void 0)return;let te=L.current!==null&&L.current!==B;if(L.current=B,k===null){I.set("visibleItemIds",null),Y&&D.size>0?(te||m()==null)&&d(0):B===""&&te&&d(null);return}let de=I.state.visibleItemIds;if(de===null&&D.size===0)return;let ue=new Set,J=de===null;D.forEach(({getText:re},$)=>{let ie=re();ie!=null&&k(ie,B)&&(ue.add($),J||(J=!de?.has($)))}),J||de?.size!==ue.size?(Y&&ue.size>0?d(0):(de!==null||te)&&d(null),I.set("visibleItemIds",ue)):Y&&te&&ue.size>0&&d(0)},[o,l,B,N,D,k,Y,I,d,m]);let ee=qr.useMemo(()=>({open:o,disabled:r,inputFocusVisible:h,setInputFocusVisible:y,keyboardModality:C,setKeyboardModality:S,autoHighlight:u,triggerId:H,defaultListId:V,listId:q,setRenderedListId:x,focusOwnerRef:F,setActiveIndex:d,onItemsChange:Z,onValueChange:K}),[o,r,h,C,u,H,V,q,F,d,Z,K]),Q=qr.useMemo(()=>({parent:g,store:I,registerItem:O,listRef:f}),[g,I,O,f]);return v(bp.Provider,{value:Q,children:v(_y.Provider,{value:ee,children:v(By.Provider,{value:l??i,children:t})})})}var Wg=T(M(),1);function GN(e){let{open:t,mounted:o,value:r,onValueChange:n}=e,[s,i]=Wg.useState(null),l=Wg.useRef(t);return z(()=>{let a=l.current;l.current=t,a&&!t&&r!==""?(i(r),n("",fe(U.popupClose))):(t||!o)&&s!==null&&i(null)},[t,o,r,s,n]),!t&&s!==null?s:r}var jN=T(M(),1);var Yg=T(M(),1);var Hy=!1;function ha(e){Hy=!0;try{e.focus({preventScroll:!0})}finally{Hy=!1}}function jg(){return Hy}function WN(e){let t=_s(),o=At(),{focusOwnerRef:r}=t,n=Yg.useRef(null),s=Yg.useRef("mouse");function i(a){s.current=a.pointerType||"mouse"}function l(a,c){let u=r.current;if(!t.open||!u)return;let p=ct(Fe(a.currentTarget));if(p===u||Ee(a.currentTarget,p))return;let f=null;a.nativeEvent.composedPath().find(d=>tt(d)?d.getAttribute("role")==="dialog"||d.hasAttribute("data-rootownerid")?!0:(d.hasAttribute("aria-haspopup")&&(f=d),!1):!1)===a.currentTarget&&(n.current&&!(c&&f)||c&&f&&st(a.relatedTarget)&&Ee(f,a.relatedTarget)||ha(u))}return{"aria-activedescendant":void 0,"aria-orientation":void 0,onMouseDown(a){$e(a.nativeEvent)===a.currentTarget&&a.preventDefault()},onPointerDown:i,onPointerOver:i,onPointerMove:i,onMouseMove(a){s.current==="mouse"&&l(a,!1)},onMouseOver(a){s.current==="mouse"&&n.current&&l(a,!0)},onFocus(a){let c=$e(a.nativeEvent);c===r.current?n.current=null:tt(c)&&!Ee(a.currentTarget,c)&&!jg()&&(n.current=c),t.open&&c===a.currentTarget&&r.current?.focus({preventScroll:!0})},onKeyDown(a){let c=$e(a.nativeEvent);c===r.current||Hn(c)||Qi(a.key,e,o==="rtl",!1)&&(r.current?.focus({preventScroll:!0}),a.stopPropagation())}}}var YN=jN.forwardRef(function(t,o){let{store:r,orientation:n}=ht(),s=r.useState("open"),i=r.useState("parent"),l=r.useState("openMethod"),a=r.useState("lastOpenChangeReason"),c=WN(n),u=s&&a===U.triggerHover,p=i.type!=="menu"||s&&(l==="keyboard"||a===U.listNavigation||a===U.triggerHover||a===U.triggerPress),f=!1;p&&(f=()=>{let d=(l==="touch"||l==="pen")&&!r.context.virtualPress;return u||d?!1:r.context.virtualFocusRef?.current??!1});let m=Pt(c,t);return v(wy,{...m,role:"dialog",initialFocus:f,ref:o})});var Xg=T(M(),1);var KN=T(M(),1);var Kg=T(M(),1),wl=Kg.createContext(null);function zg(){return Kg.useContext(wl)}var zN=KN.forwardRef(function(t,o){let{render:r,className:n,style:s,id:i,...l}=t,a=_s(),[c,u]=xg(t,a.defaultListId,a.setRenderedListId);return _("div",t,{ref:[o,u],props:[{tabIndex:-1,id:c,onFocus(f){let m=a.focusOwnerRef.current;m&&f.relatedTarget===m&&$e(f.nativeEvent)===f.currentTarget&&ha(m)},onPointerMove(){a.setKeyboardModality(!1)},onPointerDown(){a.setKeyboardModality(!1)}},l,{children:v(wl.Provider,{value:null,children:l.children})}]})});function cY(e,t){let{orientation:o,rtl:r,hasActiveItem:n,activeItemOpensSubmenu:s,hasValue:i}=t,{key:l}=e;if(e.which===229)return"ignore";if(l==="Tab")return e.shiftKey?"close":"ignore";if(l==="Enter")return n?"activate":"navigate";let a=l.startsWith("Arrow"),c=l==="Home"||l==="End";return e.shiftKey||e.ctrlKey||e.altKey||e.metaKey?a||c||l.length===1?"edit":"navigate":l.length===1?"edit":c?n&&!i?"navigate":"edit":a?yn(l,o)?o==="horizontal"&&!n&&i?"edit":"navigate":s&&(ku(l,o,r)||Qi(l,o,r,!1))?"submenu":o==="horizontal"&&!n?"enter-list":i?"edit":"navigate":"navigate"}function Il(e){let{orientation:t,store:o}=ht(),r=El(),n=At();return j(s=>{if(!o.select("open"))return;let i=o.state.highlightedItem;switch(cY(s,{orientation:t,rtl:n==="rtl",hasActiveItem:i!=null,activeItemOpensSubmenu:i?.hasAttribute("aria-haspopup")??!1,hasValue:e})){case"edit":s.stopPropagation(),s.key.length===1&&!s.ctrlKey&&!s.metaKey&&!s.altKey&&o.state.inputProps.onKeyDown?.(s);break;case"navigate":{yn(s.key,t)&&s.stopPropagation(),o.state.inputProps.onKeyDown?.(s);break}case"enter-list":{s.stopPropagation();let a=o.context.itemDomElements,c=s.key==="ArrowDown"?jn(a,yt):hs(a,yt);a.current[c]&&(s.preventDefault(),o.setActiveIndex(c,U.keyboard,s.nativeEvent));break}case"submenu":{xt(s);let a=Ze(i).KeyboardEvent;i.dispatchEvent(new a(s.type,s.nativeEvent));break}case"activate":s.preventDefault(),Wr(i,s);break;case"close":{xt(s);let a=o.state.parent.type==="menu"&&r?.getReturnElement?.()||o.state.activeTriggerElement,c=fe(U.focusOut,s.nativeEvent);o.setOpen(!1,c),!c.isCanceled&&tt(a)&&a.focus();break}default:break}})}function $g(e,t,o,r){let{orientation:n,rtl:s,loopFocus:i,allowEscape:l}=r,a=e.context.itemDomElements,c=a.current,{index:u}=qf(c,c.indexOf(t),{decrement:!Lu(o.key,n,s),loopFocus:i,allowEscape:l,disabledIndices:yt,minIndex:jn(a,yt),maxIndex:hs(a,yt)}),p=c[u];return p&&(e.setActiveIndex(u,U.keyboard,o.nativeEvent),p.scrollIntoView?.({block:"nearest",inline:"nearest"})),p??void 0}var $N=Xg.forwardRef(function(t,o){let{store:r,orientation:n,loopFocus:s,allowEscape:i}=ht(),l=At(),{onItemsChange:a,focusOwnerRef:c,triggerId:u}=_s(),{listRef:p}=ks(),{subscribeMapChange:f}=uf(),m=Ra(),d=Il(m!==""),R=j(C=>{let S=c.current,E=$e(C.nativeEvent),P=S!=null&&ct(Fe(S))===S,N=!Ee(C.currentTarget,E);if(S==null||P||N){if(C.which!==229&&!C.shiftKey&&!C.ctrlKey&&!C.metaKey&&!C.altKey&&yn(C.key,n)){C.stopPropagation();let w=N&&P?g(E):void 0;w&&$g(r,w,C,{orientation:n,rtl:l==="rtl",loopFocus:s,allowEscape:i})}return}C.defaultPrevented||(ha(S),d(C))});function g(C){let S=C.getRootNode();return p.current.find(E=>{let P=E?.getAttribute("aria-controls");return P!=null&&tt(E)&&Ee(S.getElementById(P),C)})}let b=Xg.useRef(null),x=j(()=>{let C=[...p.current],S=b.current;(S===null||S.length!==C.length||C.some((P,N)=>P!==S[N]))&&S!==null&&a(S),b.current=C});z(()=>f(x),[f,x]);let h=Sl(t,null,u??null),y=Pt({role:"menu","aria-labelledby":h,"aria-orientation":n==="horizontal"?"horizontal":void 0,onKeyDown:R},t);return v(zN,{...y,ref:o})});var Gy=T(M(),1);var XN=T(M(),1);function lY(e,t){if(e.visibleItemIds===null||t.size===0)return!1;for(let[o,r]of t)if(r||e.visibleItemIds.has(o))return!1;return!0}function Uy(){let{store:e}=ks(),t=zg(),{items:o,registerItem:r}=Gg(),n=Ts(e,lY,o),s=ut(()=>Symbol("filter-dropdown-group")).current,i=t?.registerItem;z(()=>i?.(s,!n),[i,s,n]);let l=XN.useMemo(()=>({registerItem:r}),[r]);return{hidden:n,context:l}}var qN=Gy.forwardRef(function(t,o){let{hidden:r,context:n}=Uy();return v(wl.Provider,{value:n,children:v(Sy,{...t,hidden:r||t.hidden||void 0,ref:o})})}),JN=Gy.forwardRef(function(t,o){let{hidden:r,context:n}=Uy();return v(wl.Provider,{value:n,children:v(Ny,{...t,hidden:r||t.hidden||void 0,ref:o})})});var es=T(M(),1);function Wy(e){return typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(Wy).join(""):es.isValidElement(e)?Wy(e.props.children):""}function qg(e){let{label:t,retainGroup:o=!1,children:r,render:n,context:s}=e,i=ks(s!==void 0),l=zg(),a=s===void 0?i:s,{registerItem:c,store:u}=a??HN,p=l?.registerItem,f=ut(()=>Symbol("filter-dropdown-item")).current,m=es.useRef(null),d=es.useRef(void 0),R=Ts(u,yp.isItemVisible,f),[g,b]=es.useState(R),x=Et(r),h=Et(n),y=es.useRef(void 0),C=es.useCallback(()=>{if(t!=null)return t;let E=Wy(x.current??Va(h.current)),P=y.current;return y.current=E,m.current!==null?m.current.textContent??"":d.current!==void 0&&E===P?d.current:E},[t,x,h]),S=es.useCallback(E=>{let P=E??C();return P&&(d.current=P),c(f,{getText(){return t==null&&m.current&&(d.current=m.current.textContent??""),d.current}})},[f,t,c,C]);return z(()=>{let E=S();return b(!0),E},[S]),z(()=>p?.(f,o),[p,f,o]),z(()=>{let E=C();E!==d.current&&(d.current=E,S(E))},[S,C,r,n,t]),{visible:!g||R,ref:m}}function QN(e){let{store:t,virtualFocus:o}=ht(),r=t.useState("open"),n=t.useState("mounted"),s=t.useState("parent"),i=s.type==="menu"?s.store.context.itemDomElements:null,l=BN(i),{visible:a,ref:c}=qg({...e,context:l,retainGroup:n});z(()=>{a||!r||t.setOpen(!1,fe(U.none))},[a,r,t]);let u=Md((f,m)=>{f.type==="click"&&t.select("open")&&(m==="keyboard"||m==="mouse"&&t.select("lastOpenChangeReason")===U.triggerPress)&&t.context.virtualFocusRef?.current?.focus({preventScroll:!0})}),p={...o?{"aria-haspopup":"dialog"}:void 0,...u,onPointerDown(f){u.onPointerDown(f),t.context.virtualPress=ms(f.nativeEvent)},onFocus(f){let m=t.context.virtualFocusRef?.current;m&&t.select("open")&&f.relatedTarget===m&&(f.preventBaseUIHandler(),m.focus({preventScroll:!0}))}};return l===null?{visible:!0,ref:null,props:p}:{visible:a||n,ref:c,props:p}}function ZN(e,t,o,r){let n=t.type==="menu"?t.store:null,s=n?.context.virtualFocusRef,i=j((a,c)=>{let u=s?.current;r||e.select("open")||!n?.select("open")||!u||(Ee(e.context.popupRef.current,ct(Fe(u)))&&u.focus({preventScroll:!0}),(c===U.listNavigation||c===U.escapeKey)&&n.state.activeIndex==null&&n.highlightItem(a,U.none))});z(()=>{if(!o){let a=e.state.activeTriggerElement,c=e.select("lastOpenChangeReason");queueMicrotask(()=>i(a,c))}},[o,e,i]);function l(){!r&&s&&n?.state.activeIndex!=null&&n.setActiveIndex(null,U.none)}return{parentVirtualFocusRef:s,handleFocus:l}}var eA={Popup:YN,List:$N,Group:qN,RadioGroup:JN,useItem:qg,useSubmenuTrigger:QN,useParentHandoff:ZN};function Jg(e){let{value:t,defaultValue:o="",onValueChange:r,...n}=e,{store:s}=ht(),i=s.useState("open"),l=s.useState("mounted"),a=s.useState("keyboardOpen"),c=s.useState("activeTriggerId"),u=s.useState("activeTriggerElement"),p=s.useState("disabled"),[f,m]=Nt({controlled:t,default:o,name:"MenuFilterProvider",state:"value"}),d=j((y,C)=>{r?.(y,C),C.isCanceled||m(y)}),R=j(()=>s.state.activeIndex),g=j(y=>{s.setActiveIndex(y,U.none)}),b=GN({open:i,mounted:l,value:f,onValueChange:d}),x=uY(f!=="");ut(()=>(s.set("filterTriggerProps",x),null)),s.useSyncedValue("filterTriggerProps",x),z(()=>{i||s.set("keyboardOpen",!1)},[i,s]);let h=u?u.id||null:c;return v(ap.Provider,{value:eA,children:v(UN,{...n,open:i,openedByKeyboard:a,disabled:p,value:f,query:b,onValueChange:d,triggerId:h,listRef:s.context.itemDomElements,getActiveIndex:R,setActiveIndex:g,focusOwnerRef:s.context.virtualFocusRef})})}function uY(e){let{store:t}=ht(),o=da(!0)!=null,r=Il(e);return tA.useMemo(()=>({"aria-haspopup":"dialog",onPointerDown(n){t.context.virtualPress=ms(n.nativeEvent)},onKeyDown(n){let s=t.context.virtualFocusRef?.current;!t.select("open")||!s||o||(n.key==="ArrowUp"||n.key==="ArrowDown"?(s.focus({preventScroll:!0}),r(n),n.preventDefault(),n.preventBaseUIHandler()):n.key==="ArrowLeft"||n.key==="ArrowRight"?n.preventBaseUIHandler():pY(n)&&s.focus({preventScroll:!0}))}}),[t,o,r])}function pY(e){return e.key.length===1&&e.key!==" "&&!e.ctrlKey&&!e.metaKey&&!e.altKey}var oA=T(M(),1);function Qg(e){let{children:t,value:o,defaultValue:r,onValueChange:n,filter:s,autoHighlight:i=!1,locale:l,...a}=e,c=oA.useRef(null);return{children:t,rootProps:{...a,virtualFocus:!0,virtualFocusRef:c,allowEscape:!i,resetOnPointerLeave:i!=="always"},dropdownProps:{value:o,defaultValue:r,onValueChange:n,filter:s,autoHighlight:i,locale:l}}}function rA(e){let{children:t,rootProps:o,dropdownProps:r}=Qg(e);return v(cc,{...o,children:n=>v(Jg,{...r,children:typeof t=="function"?t(n):t})})}var vp=T(M(),1);function nA(e){let t=ht(),o=t.store,r=o.useState("disabled"),{rootProps:n,dropdownProps:s}=Qg(e),i=vp.useRef(null);function l(p,f){let m=t.virtualFocus?o.context.virtualFocusRef?.current:ct(Fe(p));tt(m)&&(i.current={reference:m,trigger:p},o.setActiveIndex(null,f?U.keyboard:U.none,f))}function a(p,f){o.highlightItem(p,U.keyboard,f)}function c(p){let f=i.current;f&&(f.reference.focus({preventScroll:!0}),a(f.trigger,p))}function u(p,f){if(n.onOpenChange?.(p,f),!f.isCanceled){if(!p){f.reason===U.escapeKey&&tt(f.trigger)&&(a(f.trigger,f.event),i.current={reference:t.virtualFocus?o.context.virtualFocusRef?.current??f.trigger:f.trigger,trigger:f.trigger});return}i.current=null,tt(f.trigger)&&Dg(f.reason,f.event)&&l(f.trigger,f.reason===U.listNavigation?f.event:void 0)}}return v(cc,{...n,isSubmenu:!0,disabled:r||e.disabled,onOpenChange:u,children:v(fY,{parentStore:o,parentVirtualFocus:t.virtualFocus,parentAllowEscape:t.virtualFocus&&t.allowEscape,parentOrientation:t.orientation,parentLoopFocus:t.loopFocus,getReturnElement:()=>i.current?.reference??(t.virtualFocus?o.context.virtualFocusRef?.current:null)??null,onSubmenuEnter:l,onSubmenuExit:c,children:v(Jg,{...s,children:e.children})})})}function fY(e){let{children:t,parentStore:o,parentVirtualFocus:r,parentAllowEscape:n,parentOrientation:s,parentLoopFocus:i,onSubmenuEnter:l,onSubmenuExit:a,getReturnElement:c}=e,{store:u,orientation:p}=ht(),f=At(),m=u.useState("mounted"),d=vp.useRef(!1),R=j(()=>{let[C]=u.context.triggerElements.elements();return c()??(tt(C)?C:null)});z(()=>{let C=d.current;if(d.current=m,m||!C)return;let S=R();if(!S||!o.select("open"))return;let E=Fe(S),P=ct(E);(P===E.body||Ee(u.select("popupElement"),P))&&S.focus({preventScroll:!0})},[m,u,o,R]);function g(C,S){let E=$g(o,C,S,{orientation:s,rtl:f==="rtl",loopFocus:i,allowEscape:n});r||E?.focus({preventScroll:!0})}function b(C){if(!u.select("open"))return;xt(C);let S=u.select("activeTriggerElement"),E=fe(U.listNavigation,C.nativeEvent);u.setOpen(!1,E),E.isCanceled||a(C.nativeEvent);let P=c()??u.select("activeTriggerElement");!u.select("open")&&tt(P)&&ct(Fe(P))!==P&&P.focus(),!u.select("open")&&tt(S)&&yn(C.key,s)&&g(S,C)}let x=j(C=>{if(yn(C.key,s)){g(C.currentTarget,C),C.preventBaseUIHandler(),xt(C);return}let S=u.select("open"),E=f==="rtl",P=Qi(C.key,p,E,!1);if(S&&P){b(C);return}if(ku(C.key,s,E)){if(xt(C),S){l(C.currentTarget,C.nativeEvent),u.context.virtualFocusRef?.current?.focus({preventScroll:!0});return}u.setOpen(!0,fe(U.listNavigation,C.nativeEvent,C.currentTarget))}}),h=j(C=>{if(C.which===229)return;Qi(C.key,p,f==="rtl",!1)&&b(C)}),y=vp.useMemo(()=>({getReturnElement:R,onTriggerKeyDown:x,onPopupKeyDown:h}),[R,x,h]);return v(dp.Provider,{value:y,children:t})}function iA(e){let{children:t,filter:o,value:r,defaultValue:n,onValueChange:s,autoHighlight:i,locale:l}=e,a=sA.useMemo(()=>({Root:rA,SubmenuRoot:nA,options:{filter:o,value:r,defaultValue:n,onValueChange:s,autoHighlight:i,locale:l}}),[o,r,n,s,i,l]);return v(ma.Provider,{value:a,children:t})}var Zg=T(M(),1);var Ml=T(M(),1);var aA=Ml.forwardRef(function(t,o){let{render:r,className:n,style:s,id:i,disabled:l,activeItemId:a,navigationProps:c,...u}=t,p=je(i),f=_s(),{listRef:m}=ks(),d=Ra(),[R,g]=Ml.useState(null),b=Ml.useRef(!1);function x(y,C){if(!f.open)return;let S=y===""?U.inputClear:U.inputChange;f.onValueChange(y,fe(S,C))}let h={highlighted:f.inputFocusVisible&&(!f.keyboardModality||a==null)};return _("input",t,{state:h,ref:[o,f.focusOwnerRef],props:[c,{id:p,type:"text",disabled:f.disabled||l,"aria-activedescendant":a,role:"searchbox",inputMode:"search",autoComplete:"off",spellCheck:"false",autoCorrect:"off",autoCapitalize:"none","aria-autocomplete":void 0,"aria-controls":f.listId,value:R??d,onCompositionStart(y){dt.os.android||(b.current=!0,g(y.currentTarget.value))},onCompositionEnd(y){b.current&&(b.current=!1,g(null),x(y.currentTarget.value,y.nativeEvent))},onChange(y){if(b.current){g(y.currentTarget.value);return}x(y.currentTarget.value,y.nativeEvent)},onKeyDown(){f.setKeyboardModality(!0)},onPointerDown(){f.setKeyboardModality(!1)},onMouseEnter(y){f.setKeyboardModality(!1),f.open&&ha(y.currentTarget)},onFocus(y){if(f.setInputFocusVisible(!0),f.autoHighlight==="always"||jg())return;let C=y.relatedTarget;C!==null&&m.current.includes(C)&&f.setActiveIndex(null)},onBlur(){f.setInputFocusVisible(!1)}},u]})});var cA=Zg.forwardRef(function(t,o){yl("Input");let{store:r}=ht(),n=Ra(),{onKeyDown:s,...i}=r.useState("inputProps"),l=r.useState("highlightedItemId"),a=Il(n!==""),c=Zg.useCallback(f=>{r.set("inputFocused",f!==null&&ct(Fe(f))===f)},[r]),u=kt(o,c),p=Pt({onKeyDown:a,onFocus(){r.set("inputFocused",!0)},onBlur(){r.set("inputFocused",!1)}},t);return v(aA,{...p,activeItemId:l,navigationProps:i,ref:u})});var Ep=T(M(),1);var dY=Ep.forwardRef(function(t,o){let{render:r,className:n,style:s,id:i,...l}=t,{store:a,orientation:c}=ht(),u=a.useState("activeTriggerId"),p=a.useState("activeTriggerElement"),f=a.useStateSetter("listElement"),m=je(i),d=Ep.useRef(m);z(()=>{d.current!==m&&(d.current=m,a.notifyAll())},[m,a]);let R=Sl(t,p,u);return _("div",t,{ref:[o,f],props:[{id:m,role:"menu",tabIndex:-1,"aria-orientation":c==="horizontal"?"horizontal":void 0,"aria-labelledby":R},l]})}),lA=Ep.forwardRef(function(t,o){let r=Fs()?.List??dY;return v(r,{...t,ref:o})});var fA=T(M(),1);var uA=T(M(),1);var pA=uA.forwardRef(function(t,o){let{render:r,className:n,style:s,disabled:i=!1,nativeButton:l=!0,...a}=t,c=_s(),u=Ra(),p=c.disabled||i,f=u!=="",{buttonRef:m,getButtonProps:d}=ft({disabled:p,native:l});return _("button",t,{enabled:f,state:{disabled:p},ref:[o,m],props:[{tabIndex:-1,"aria-hidden":!0,onMouseDown(g){g.preventDefault()},onClick(g){let b=fe(U.clearPress,g.nativeEvent);c.onValueChange("",b),c.focusOwnerRef.current?.focus({preventScroll:!0})}},a,d]})});var dA=fA.forwardRef(function(t,o){return yl("Clear"),v(pA,{...t,ref:o})});var gA=T(M(),1);var ex=T(M(),1);var mA=ex.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,{store:l}=ks(),a=Ts(l,yp.isEmpty),[c,u]=ex.useState(!1);z(()=>{u(!0)},[]);let p=c&&a,f=pl(p);return _("div",t,{enabled:p,ref:[o,f],props:[{role:"status","aria-live":"polite","aria-atomic":!0},i]})});var xA=gA.forwardRef(function(t,o){return yl("Empty"),v(mA,{...t,ref:o})});var tx={};ae(tx,{align:()=>RY,closed:()=>gY,open:()=>mY,side:()=>xY,uncentered:()=>hY});var mY=ce.open,gY=ce.closed,xY=ce.side,RY=ce.align,hY="data-uncentered";var ox={};ae(ox,{closed:()=>CY,endingStyle:()=>vY,open:()=>bY,startingStyle:()=>yY});var bY=ce.open,CY=ce.closed,yY=ce.startingStyle,vY=ce.endingStyle;var rx={};ae(rx,{checked:()=>EY,disabled:()=>PY,endingStyle:()=>wY,startingStyle:()=>TY,unchecked:()=>SY});var EY="data-checked",SY="data-unchecked",PY="data-disabled",TY=bt.startingStyle,wY=bt.endingStyle;var nx={};ae(nx,{disabled:()=>MY,highlighted:()=>IY});var IY="data-highlighted",MY="data-disabled";var sx={};ae(sx,{highlighted:()=>DY});var DY="data-highlighted";var ix={};ae(ix,{align:()=>LY,closed:()=>AY,endingStyle:()=>VY,instant:()=>kY,open:()=>NY,side:()=>FY,startingStyle:()=>OY});var NY=ce.open,AY=ce.closed,OY=ce.startingStyle,VY=ce.endingStyle,FY=ce.side,LY=ce.align,kY="data-instant";var ax={};ae(ax,{anchorHeight:()=>UY,anchorWidth:()=>HY,availableHeight:()=>BY,availableWidth:()=>_Y,positionerHeight:()=>jY,positionerWidth:()=>WY,transformOrigin:()=>GY});var _Y="--available-width",BY="--available-height",HY="--anchor-width",UY="--anchor-height",GY="--transform-origin",WY="--positioner-width",jY="--positioner-height";var cx={};ae(cx,{align:()=>XY,anchorHidden:()=>zY,closed:()=>KY,open:()=>YY,side:()=>$Y});var YY=ce.open,KY=ce.closed,zY=ce.anchorHidden,$Y=ce.side,XY=ce.align;var lx={};ae(lx,{checked:()=>qY,disabled:()=>QY,highlighted:()=>ZY,unchecked:()=>JY});var qY="data-checked",JY="data-unchecked",QY="data-disabled",ZY="data-highlighted";var ux={};ae(ux,{checked:()=>eK,disabled:()=>oK,endingStyle:()=>nK,startingStyle:()=>rK,unchecked:()=>tK});var eK="data-checked",tK="data-unchecked",oK="data-disabled",rK=bt.startingStyle,nK=bt.endingStyle;var jy={};ae(jy,{disabled:()=>aK,popupOpen:()=>sK,pressed:()=>iK});var sK=Mt.popupOpen,iK=Mt.pressed,aK="data-disabled";var Yy={};ae(Yy,{popupHeight:()=>lK,popupWidth:()=>cK});var cK="--popup-width",lK="--popup-height";var Ky={};ae(Ky,{activationDirection:()=>fK,current:()=>uK,instant:()=>mK,previous:()=>pK,transitioning:()=>dK});var uK="data-current",pK="data-previous",fK="data-activation-direction",dK="data-transitioning",mK="data-instant";var px={};ae(px,{disabled:()=>RK,highlighted:()=>xK,popupOpen:()=>gK});var gK=Mt.popupOpen,xK="data-highlighted",RK="data-disabled";var zy={};ae(zy,{highlighted:()=>hK});var hK="data-highlighted";var $y={};ae($y,{disabled:()=>bK});var bK="data-disabled";function RA(e){let[t,o]=ts.useState({getBoundingClientRect(){return DOMRect.fromRect({width:0,height:0,x:0,y:0})}}),r=ts.useRef(null),n=ts.useRef(null),s=ts.useRef(null),i=ts.useRef(null),l=ts.useRef(!0),a=ts.useRef(null),c=br(),u=ts.useMemo(()=>({anchor:t,setAnchor:o,actionsRef:s,backdropRef:r,internalBackdropRef:n,positionerRef:i,allowMouseUpTriggerRef:l,initialCursorPointRef:a,rootId:c}),[t,c]);return v(by.Provider,{value:u,children:v(ic.Provider,{value:void 0,children:v(Bt.Root,{...e})})})}var Bs=T(M(),1);var hA=500,bA=Bs.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,{setAnchor:l,actionsRef:a,internalBackdropRef:c,backdropRef:u,positionerRef:p,allowMouseUpTriggerRef:f,initialCursorPointRef:m,rootId:d}=Vs(!1),{store:R}=ht(!1),g=R.useState("open"),b=R.useState("disabled"),x=Bs.useRef(null),h=Bs.useRef(null),y=it(),C=it(),S=Bs.useRef(!1),E=Bs.useRef(null);function P(A,L,X){let F=X.type.startsWith("touch");m.current={x:A,y:L},l({getBoundingClientRect(){return DOMRect.fromRect({width:F?10:0,height:F?10:0,x:A,y:L})}}),S.current=!1,a.current?.setOpen(!0,fe(U.triggerPress,X)),C.start(hA,()=>{S.current=!0})}function N(A){if(b)return;f.current=!0,xt(A),P(A.clientX,A.clientY,A.nativeEvent);let L=Fe(x.current);E.current?.abort();let X=new AbortController;E.current=X,L.addEventListener("mouseup",F=>{if(f.current=!1,!S.current)return;C.clear(),S.current=!1;let B=$e(F);Ee(p.current,B)||d&&B&&gp(B)===d||a.current?.setOpen(!1,fe(U.cancelOpen,F))},{once:!0,signal:X.signal})}function w(){y.clear(),h.current=null}function D(A){if(b){w();return}if(f.current=!1,A.touches.length!==1){w();return}A.stopPropagation();let L=A.touches[0],X={x:L.clientX,y:L.clientY};h.current=X,y.start(hA,()=>{P(X.x,X.y,A.nativeEvent)})}function G(A){if(A.touches.length!==1){w();return}if(y.isStarted()&&h.current){let L=A.touches[0],X=10,F=Math.abs(L.clientX-h.current.x),B=Math.abs(L.clientY-h.current.y);(F>X||B>X)&&w()}}return Bs.useEffect(()=>()=>{E.current?.abort()},[]),Bs.useEffect(()=>{function A(X){if(b)return;let B=$e(X);(Ee(x.current,B)||Ee(c.current,B)||Ee(u.current,B))&&X.preventDefault()}let L=Fe(x.current);return Ye(L,"contextmenu",A)},[u,b,c]),_("div",t,{state:{open:g},ref:[x,o],props:[{onContextMenu:N,onTouchStart:D,onTouchMove:G,onTouchEnd:w,onTouchCancel:w,style:{WebkitTouchCallout:"none"}},i],stateAttributesMapping:rn})});var CA=yg;var Xy={};ae(Xy,{popupOpen:()=>CK,pressed:()=>yK});var CK=Mt.popupOpen,yK=Mt.pressed;var yA=T(M(),1);var fx=T(M(),1),qy=fx.createContext(void 0),vK={disableStyleElements:!1};function Dl(){return fx.useContext(qy)??vK}function Jy(e){let{children:t,nonce:o,disableStyleElements:r}=e,n=yA.useMemo(()=>({nonce:o,disableStyleElements:r}),[o,r]);return v(qy.Provider,{value:n,children:t})}var kr={};ae(kr,{Backdrop:()=>Sd,Close:()=>Gc,Description:()=>Wc,Handle:()=>ni,Popup:()=>Id,Portal:()=>Jc,Root:()=>vA,Title:()=>Qc,Trigger:()=>el,Viewport:()=>tl,createHandle:()=>RM});var vA=zn(function(t){return Uc("dialog",t)});var dx={};ae(dx,{disabled:()=>EK,popupOpen:()=>SK});var EK="data-disabled",SK=Mt.popupOpen;var Do={};ae(Do,{Backdrop:()=>SA,Close:()=>PA,Content:()=>wA,Description:()=>IA,Handle:()=>Tp,Indent:()=>MA,IndentBackground:()=>NA,Popup:()=>FA,Portal:()=>LA,Provider:()=>kA,Root:()=>UA,SwipeArea:()=>YA,Title:()=>KA,Trigger:()=>zA,Viewport:()=>iO,VirtualKeyboardProvider:()=>gO,createHandle:()=>RO});var EA=T(M(),1);var ba={};ae(ba,{frontmostHeight:()=>Zy,height:()=>_r,nestedDrawers:()=>Qy,snapPointOffset:()=>mx,swipeMovementX:()=>pi,swipeMovementY:()=>In,swipeStrength:()=>Nl});var Qy="--nested-drawers",_r="--drawer-height",Zy="--drawer-frontmost-height",pi="--drawer-swipe-movement-x",In="--drawer-swipe-movement-y",mx="--drawer-snap-point-offset",Nl="--drawer-swipe-strength";var Ca={};ae(Ca,{swipeProgress:()=>Ho});var Ho="--drawer-swipe-progress";var SA=EA.forwardRef(function(t,o){let{render:r,className:n,style:s,forceRender:i=!1,...l}=t,a=_t(),c=a.useState("open"),u=a.useState("nested"),p=a.useState("mounted"),f=a.useState("transitionStatus");return _("div",t,{state:{open:c,transitionStatus:f},ref:[a.context.backdropRef,o],stateAttributesMapping:ro,props:[{role:"presentation",hidden:!p,style:{pointerEvents:c?void 0:"none",userSelect:"none",WebkitUserSelect:"none",[Ho]:"0",[Nl]:"1"}},l],enabled:i||!u})});var PA=Gc;var TA=T(M(),1);var gx="data-drawer-content";var wA=TA.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t;return _t(),_("div",t,{ref:o,props:[{[gx]:""},i]})});var IA=Wc;var Rx=T(M(),1);var xx=T(M(),1),ev=xx.createContext(void 0);function Hs(){return xx.useContext(ev)}var PK={active(e){return e?{"data-active":""}:{"data-inactive":""}}},MA=Rx.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,l=Hs(),a=l?.active??!1,c=l?.visualStateStore,u=Rx.useRef(null);return z(()=>{let f=u.current;if(!f||!c)return;let m=()=>{let{swipeProgress:R,frontmostHeight:g}=c.getSnapshot();R<=0?f.style.setProperty(Ho,"0"):f.style.setProperty(Ho,`${R}`),g<=0?f.style.removeProperty(_r):f.style.setProperty(_r,`${g}px`)};m();let d=c.subscribe(m);return()=>{d(),f.style.setProperty(Ho,"0"),f.style.removeProperty(_r)}},[c]),_("div",t,{ref:[o,u],state:{active:a},props:[{style:{[Ho]:"0"}},i],stateAttributesMapping:PK})});var DA=T(M(),1);var TK={active(e){return e?{"data-active":""}:{"data-inactive":""}}},NA=DA.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,c={active:Hs()?.active??!1};return _("div",t,{ref:o,state:c,props:i,stateAttributesMapping:TK})});var lc=T(M(),1);var Al={};ae(Al,{closed:()=>IK,endingStyle:()=>DK,expanded:()=>tv,nestedDrawerOpen:()=>ov,nestedDrawerSwiping:()=>rv,open:()=>wK,startingStyle:()=>MK,swipeDirection:()=>nv,swipeDismiss:()=>hx,swiping:()=>Us});var wK=ce.open,IK=ce.closed,MK=ce.startingStyle,DK=ce.endingStyle,tv="data-expanded",ov="data-nested-drawer-open",rv="data-nested-drawer-swiping",hx="data-swipe-dismiss",nv="data-swipe-direction",Us="data-swiping";var bx=T(M(),1),sv=bx.createContext(void 0);function Gs(e){let t=bx.useContext(sv);if(e!==!0&&t===void 0)throw new Error(Me(90));return t}var Ol=T(M(),1);function gt(e,t=Number.MIN_SAFE_INTEGER,o=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,o))}function Cx(e,t){let o=e+t;return o>=0?t:-Math.sqrt(-o)-e}function AA(e,t,o){if(!Number.isFinite(t)||t<=0)return null;if(typeof e=="number")return Number.isFinite(e)?e<=1?gt(e,0,1)*t:e:null;let r=e.trim();if(r.endsWith("px")){let n=Number.parseFloat(r);return Number.isFinite(n)?n:null}if(r.endsWith("rem")){let n=Number.parseFloat(r);return Number.isFinite(n)?n*o:null}return null}function Sp(e,t){let o=-1,r=1/0;for(let n=0;n<e.length;n+=1){let s=Math.abs(e[n]-t);s<r&&(r=s,o=n)}return o}function yx(){let e=_t(),{snapPoints:t,activeSnapPoint:o,setActiveSnapPoint:r,popupHeight:n}=Gs(),s=e.useState("viewportElement"),[i,l]=Ol.useState(0),[a,c]=Ol.useState(16),u=j(()=>{let d=Fe(s).documentElement;l(s?s.offsetHeight:d.clientHeight);let R=parseFloat(getComputedStyle(d).fontSize);Number.isFinite(R)&&c(R)});z(()=>{if(u(),!s||typeof ResizeObserver!="function")return;let m=new ResizeObserver(u);return m.observe(s),()=>{m.disconnect()}},[u,s]);let p=Ol.useMemo(()=>{if(!t||t.length===0||i<=0||n<=0)return[];let m=Math.min(n,i),d=t.map(b=>{let x=AA(b,i,a);if(x===null)return null;let h=gt(x,0,m);return{value:b,height:h,offset:Math.max(0,n-h)}}).filter(b=>!!b);if(d.length<=1)return d;let R=[],g=[];for(let b=d.length-1;b>=0;b-=1){let x=d[b];g.some(y=>Math.abs(y-x.height)<=1)||(g.push(x.height),R.push(x))}return R.reverse(),R},[n,a,t,i]),f=Ol.useMemo(()=>{if(o===null)return;let m=p.find(b=>Object.is(b.value,o));if(m)return m;let d=Math.min(n,i),R=AA(o,i,a);if(R===null)return;let g=gt(R,0,d);return p[Sp(p.map(b=>b.height),g)]},[o,n,p,a,i]);return{snapPoints:t,activeSnapPoint:o,setActiveSnapPoint:r,popupHeight:n,viewportHeight:i,resolvedSnapPoints:p,activeSnapPointOffset:f?.offset??null}}var vx=T(M(),1),iv=vx.createContext(null);function OA(){return vx.useContext(iv)}var VA=!1;function NK(){VA||(typeof CSS<"u"&&"registerProperty"in CSS&&([pi,In,mx].forEach(e=>{try{CSS.registerProperty({name:e,syntax:"<length>",inherits:!1,initialValue:"0px"})}catch{}}),[{name:Ho,initialValue:"0"},{name:Nl,initialValue:"1"}].forEach(({name:e,initialValue:t})=>{try{CSS.registerProperty({name:e,syntax:"<number>",inherits:!1,initialValue:t})}catch{}})),VA=!0)}var AK={...ro,expanded(e){return e?{[tv]:""}:null},nestedDrawerOpen(e){return e?{[ov]:""}:null},nestedDrawerSwiping(e){return e?{[rv]:""}:null},swipeDirection(e){return{[nv]:e}},swiping(e){return e?{[Us]:""}:null}},FA=lc.forwardRef(function(t,o){let{render:r,className:n,style:s,finalFocus:i,initialFocus:l,...a}=t,c=_t(),u=c.context.popupRef,{swipeDirection:p,frontmostHeight:f,hasNestedDrawer:m,nestedSwiping:d,nestedSwipeProgressStore:R,onPopupHeightChange:g,notifyParentFrontmostHeight:b,notifyParentHasNestedDrawer:x}=Gs(),h=c.useState("descriptionElementId"),y=c.useState("disablePointerDismissal"),C=c.useState("floatingRootContext"),S=c.useState("popupProps"),E=c.useState("modal"),P=c.useState("mounted"),N=c.useState("nested"),w=c.useState("nestedOpenDrawerCount"),D=c.useState("transitionStatus"),G=c.useState("open"),I=c.useState("openMethod"),O=c.useState("titleElementId"),A=c.useState("role"),L=C.useState("floatingId"),X=a.id??L,F=OA();jc();let{snapPoints:B,activeSnapPoint:k,activeSnapPointOffset:Y}=yx(),V=w>0,q=F?.swiping??!1,H=F?.swipeStrength??null,[K,Z]=lc.useState(0),ee=lc.useRef(0),Q=j(()=>{let Pe=u.current;if(!Pe)return;let ge=Pe.offsetHeight;if(ee.current>0&&f>ee.current&&ge>ee.current)return;if(ee.current>0&&m){let me=ee.current;Z(me),g(me);return}let W=ge;W!==ee.current&&(ee.current=W,Z(W),g(W))});z(()=>{if(!P){ee.current=0,Z(0),g(0);return}let Pe=u.current;if(!Pe||(NK(),Q(),typeof ResizeObserver!="function"))return;let ge=new ResizeObserver(Q);return ge.observe(Pe),()=>{ge.disconnect()}},[Q,P,V,g,u]),z(()=>{let Pe=()=>{let W=u.current;if(!W)return;let me=R.getSnapshot();me>0?W.style.setProperty(Ho,`${me}`):W.style.setProperty(Ho,"0")};Pe();let ge=R.subscribe(Pe),Ce=u.current;return()=>{ge(),Ce&&Ce.style.setProperty(Ho,"0")}},[R,u]),z(()=>{if(G)return b?.(f),()=>{b?.(0)}},[f,G,b]),z(()=>x?(x(G||D==="ending"),()=>{x(!1)}):void 0,[x,G,D]),St({open:G,ref:u,onComplete(){G&&c.context.onOpenChangeComplete?.(!0)}});let te=l===void 0?u:l,de=c.useStateSetter("popupElement"),ue={open:G,nested:N,transitionStatus:D,expanded:k===1,nestedDrawerOpen:V,nestedDrawerSwiping:d,swipeDirection:p,swiping:q},J;K&&!(!m&&D!=="ending")&&(J=`${K}px`);let $=B&&B.length>0&&(p==="down"||p==="up"),ie=null;$&&Y!==null&&(ie=p==="up"?-Y:Y);let le=F?F.getDragStyles():qe;if($&&p==="down"){let Pe=Y??0,ge=Number.parseFloat(String(le[In]));q&&Number.isFinite(ge)?le={...le,transform:void 0,[In]:`${Cx(Pe,ge)}px`}:le={...le,transform:void 0}}let he=_("div",t,{state:ue,props:[S,{id:X,"aria-labelledby":O,"aria-describedby":h,role:A,...Sr,hidden:!P,onKeyDown(Pe){Fr.has(Pe.key)&&Pe.stopPropagation()},style:{...le,[Ho]:"0",[Qy]:w,[_r]:J,[mx]:typeof ie=="number"?`${ie}px`:"0px",[Zy]:f?`${f}px`:void 0,[Nl]:typeof H=="number"&&Number.isFinite(H)&&H>0?`${H}`:"1"}},a],ref:[o,u,de],stateAttributesMapping:AK});return v(un,{context:C,openInteractionType:I,disabled:!P,closeOnFocusOut:!y,initialFocus:te,returnFocus:i,modal:E!==!1,restoreFocus:"popup",children:he})});var LA=Jc;var Pp=T(M(),1);function kA(e){let{children:t}=e,o=ut(()=>new Set),[r,n]=Pp.useState(!1),[s]=Pp.useState(OK),i=j((c,u)=>{let p=o.current;if(p.has(c)===u)return;let f=p.size>0;u?p.add(c):p.delete(c);let m=p.size>0;m!==f&&n(m)}),l=j(c=>{i(c,!1)}),a=Pp.useMemo(()=>({setDrawerOpen:i,removeDrawer:l,active:r,visualStateStore:s}),[r,l,i,s]);return v(ev.Provider,{value:a,children:t})}function OK(){let e={swipeProgress:0,frontmostHeight:0},t=new Set;return{getSnapshot:()=>e,set(o){let r=e.swipeProgress;o.swipeProgress!==void 0&&(r=Number.isFinite(o.swipeProgress)?o.swipeProgress:0);let n=e.frontmostHeight;o.frontmostHeight!==void 0&&(n=Number.isFinite(o.frontmostHeight)?o.frontmostHeight:0),!(r===e.swipeProgress&&n===e.frontmostHeight)&&(e={swipeProgress:r,frontmostHeight:n},t.forEach(s=>{s()}))},subscribe(o){return t.add(o),()=>{t.delete(o)}}}}var mr=T(M(),1);var _A,BA;function UA(e){let{children:t,open:o,defaultOpen:r=!1,onOpenChange:n,onOpenChangeComplete:s,disablePointerDismissal:i=!1,modal:l=!0,actionsRef:a,handle:c,triggerId:u,defaultTriggerId:p=null,swipeDirection:f="down",snapToSequentialPoints:m=!1,snapPoints:d,snapPoint:R,defaultSnapPoint:g,onSnapPointChange:b}=e,x=Gs(!0),h=x?.onNestedSwipeProgressChange,y=x?.onNestedFrontmostHeightChange,C=x?.onNestedSwipingChange,S=x?.onNestedDrawerPresenceChange,[E,P]=mr.useState(0),[N,w]=mr.useState(0),[D,G]=mr.useState(!1),[I,O]=mr.useState(!1),[A]=mr.useState(VK),L=g!==void 0?g:d?.[0]??null,X=R!==void 0,[F,B]=Nt({controlled:R,default:L,name:"Drawer",state:"snapPoint"}),k=mr.useRef(!1),Y=mr.useRef(!1),V=j((re,$)=>{let ie=$??fe(U.none);b?.(re,ie),!ie.isCanceled&&B(re)}),q=mr.useMemo(()=>X||!d||d.length===0?F:F===null||!d.some(re=>Object.is(re,F))?L:F,[F,X,L,d]),H=j(re=>{P(re),!k.current&&re>0&&w(re)}),K=j(re=>{if(re>0){k.current=!0,w(re);return}k.current=!1,E>0&&w(E)}),Z=j(re=>{G(re)}),ee=j(re=>{A.set(re),h?.(re)}),Q=j(re=>{O(re),C?.(re)}),te=j((re,$)=>{n?.(re,$),!$.isCanceled&&!re&&d&&d.length>0&&V(L,fe($.reason,$.event,$.trigger))}),de=mr.useMemo(()=>({swipeDirection:f,swipeAreaActiveRef:Y,snapToSequentialPoints:m,snapPoints:d,activeSnapPoint:q,setActiveSnapPoint:V,frontmostHeight:N,popupHeight:E,hasNestedDrawer:D,nestedSwiping:I,nestedSwipeProgressStore:A,onNestedDrawerPresenceChange:Z,onPopupHeightChange:H,onNestedFrontmostHeightChange:K,onNestedSwipingChange:Q,onNestedSwipeProgressChange:ee,notifyParentFrontmostHeight:y,notifyParentSwipingChange:C,notifyParentSwipeProgressChange:h,notifyParentHasNestedDrawer:S}),[q,N,D,I,A,S,h,C,y,Z,K,ee,Q,H,E,V,d,m,Y,f]),ue=typeof t=="function"?re=>v(mr.Fragment,{children:[_A||(_A=v(HA,{})),t(re)]}):v(mr.Fragment,{children:[BA||(BA=v(HA,{})),t]}),J=Uc("drawer",{open:o,defaultOpen:r,onOpenChange:te,onOpenChangeComplete:s,disablePointerDismissal:i,modal:l,actionsRef:a,handle:c,triggerId:u,defaultTriggerId:p,children:ue});return v(sv.Provider,{value:de,children:J})}function VK(){let e=0,t=new Set;return{getSnapshot:()=>e,set(o){let r=Number.isFinite(o)?o:0;r!==e&&(e=r,t.forEach(n=>{n()}))},subscribe(o){return t.add(o),()=>{t.delete(o)}}}}function HA(){let e=Hs(),t=_t(!1),o=e?.setDrawerOpen,r=e?.removeDrawer,n=t.useState("open"),s=t.useState("nestedOpenDialogCount"),i=t.useState("popupElement"),l=s===0;return z(()=>{if(r)return()=>{r(t)}},[r,t]),z(()=>{o?.(t,n)},[n,o,t]),mr.useEffect(()=>{if(!n||!l||!dt.os.android)return;let c=Ze(i).CloseWatcher;if(!c)return;function u(m){if(!t.select("open"))return;let d=fe(U.closeWatcher,m);m.cancelable||(d.cancel=Qe),t.setOpen(!1,d),d.isCanceled&&m.preventDefault()}let p=new c,f=Ye(p,"cancel",u);return()=>{f(),p.destroy()}},[t,l,n,i]),null}var gr=T(M(),1);var Ht=T(M(),1);function fi(e,t,o){return typeof e?.elementFromPoint=="function"?e.elementFromPoint(t,o):null}function ya(e,t){let o=(t??Ze(e).getComputedStyle(e)).transform,r=0,n=0,s=1;if(o&&o!=="none"){let i=o.match(/matrix(?:3d)?\(([^)]+)\)/);if(i){let l=i[1].split(", ").map(parseFloat);l.length===6?(r=l[4],n=l[5],s=Math.sqrt(l[0]*l[0]+l[1]*l[1])):l.length===16&&(r=l[12],n=l[13],s=l[0])}}return{x:r,y:n,scale:s}}var FK=40,LK=10,kK=50,GA=4,_K=80,Ex=1,BK='button,a,input,select,textarea,label,[role="button"]';function Uo(e,t,o){switch(e){case"up":return-o;case"down":return o;case"left":return-t;case"right":return t;default:return 0}}function Sx(e){return Number.isFinite(e)&&e>0?e:null}function WA(e,t){return`translate3d(${e.x}px,${e.y}px,0) scale(${t})`}function HK(e){return e%2===1}function av(e,t,o){let r=e[o];if(typeof r=="function")try{r.call(e,t)}catch(n){if(n&&typeof n=="object"&&"name"in n&&n.name==="NotFoundError")return;throw n}}function Px(e){let{enabled:t,directions:o,elementRef:r,movementCssVars:n,canStart:s,ignoreSelectorWhenTouch:i=!0,ignoreScrollableAncestors:l=!1,swipeThreshold:a,onDismiss:c,onProgress:u,onCancel:p,onSwipeStart:f,onRelease:m,onSwipingChange:d,trackDrag:R=!0}=e,g=BK,b=o.length===1?o[0]:void 0,x=Math.max(0,typeof a=="number"?a:FK),h=o.includes("left"),y=o.includes("right"),C=o.includes("up"),S=o.includes("down"),E=h||y,P=C||S,N=E?"horizontal":"vertical",[w,D]=Ht.useState(void 0),[G,I]=Ht.useState(!1),[O,A]=Ht.useState(!1),L=Ht.useRef({x:0,y:0}),X=Ht.useRef({x:0,y:0}),F=Ht.useRef(null),B=Ht.useRef({x:0,y:0,scale:1}),k=Ht.useRef(void 0),Y=Ht.useRef(0),V=Ht.useRef(!1),q=Ht.useRef({x:0,y:0}),H=Ht.useRef(!1),K=Ht.useRef(!1),Z=Ht.useRef(null),ee=Ht.useRef(!1),Q=Ht.useRef(!1),te=Ht.useRef({width:0,height:0}),de=Ht.useRef(0),ue=Ht.useRef(x),J=Ht.useRef(null),re=Ht.useRef(null),$=Ht.useRef(null),ie=Ht.useRef(!1),le=Ht.useRef({x:0,y:0}),he=Ht.useRef(null),Pe=Ht.useRef(!1),ge=Ht.useRef(null),Ce=j(Se=>{Pe.current!==Se&&(Pe.current=Se,I(Se),d?.(Se))});function W(Se){if(!Se)return;let ke=r.current,Ie=J.current;if(!ke||!Ie)return;let _e=Ie({element:ke,direction:Se});ue.current=Math.max(0,_e)}let me=j((Se,ke)=>{let Ie=Number.isFinite(Se)?gt(Se,0,1):0,_e=Ie!==de.current,pe=!1;if(ke){let we=he.current;pe=!we||we.deltaX!==ke.deltaX||we.deltaY!==ke.deltaY||we.direction!==ke.direction}!_e&&!pe||(de.current=Ie,ke?he.current=ke:_e&&(he.current=null),u?.(Ie,ke))}),xe=j(Se=>{let ke=r.current;if(!R||!ke){Se||(ge.current=null);return}let Ie=ke.style,_e=ge.current;Se?(_e||(ge.current=[Ie.transition,Ie.transform]),Ie.transition="none"):_e&&([Ie.transition,Ie.transform]=_e,ge.current=null);let pe=X.current,we=B.current,Oe=pe.x-we.x,Le=pe.y-we.y;Se&&(Ie.transform=WA(pe,we.scale)),Ie.setProperty(n.x,`${Oe}px`),Ie.setProperty(n.y,`${Le}px`)});function ve(Se,ke){if(ke===null)return;let Ie=$.current;if(Ie&&ke>Ie.time){let _e=Math.abs(Se.x-Ie.x)<Ex&&Math.abs(Se.y-Ie.y)<Ex,pe=_e&&!ie.current;if(ie.current=_e,pe)return;let we=Math.max(ke-Ie.time,GA);le.current={x:(Se.x-Ie.x)/we,y:(Se.y-Ie.y)/we}}$.current={x:Se.x,y:Se.y,time:ke}}let ne=Ht.useCallback(()=>{D(void 0),Ce(!1),A(!1),me(0),ue.current=x,J.current=null,L.current={x:0,y:0},X.current={x:0,y:0},B.current={x:0,y:0,scale:1},k.current=void 0,Y.current=0,V.current=!1,q.current={x:0,y:0},H.current=!1,F.current=null,K.current=!1,Z.current=null,ee.current=!1,Q.current=!1,te.current={width:0,height:0},re.current=null,$.current=null,ie.current=!1,le.current={x:0,y:0},he.current=null,xe(!1)},[Ce,x,xe,me]);function oe(Se){if("touches"in Se){let ke=Se.touches[0];return ke?{x:ke.clientX,y:ke.clientY}:null}return{x:Se.clientX,y:Se.clientY}}function ye(Se){return"touches"in Se?!0:Se.pointerType==="touch"}function be(Se,ke){let Ie=r.current?.getRootNode();return fi(Ie,Se.x,Se.y)??$e(ke)}function se(Se,ke){return(_e=>{let pe=ta(Se,ke,_e),we=Fe(pe);return pe===we.body||pe===we.documentElement?null:pe})(N)}function Ne(Se,ke,Ie){ee.current=!1;let _e=ye(Se),pe=be(ke,Se.nativeEvent),Oe=Fe(r.current).body,Le=_e&&Oe?se(pe,Oe):null,Je=Ie?.ignoreScrollableTarget??!1;if(Le&&!Je||(ee.current=!!(Le&&Je),Wt(pe,g)&&(!_e||i)))return!1;let nt=r.current;if(l&&nt&&pe&&!(Ie?.ignoreScrollableAncestors??!1)&&NC(pe,nt,N)!=null)return!1;if(V.current=!1,k.current=void 0,Y.current=0,L.current=ke,re.current=Sx(Se.timeStamp),$.current=null,ie.current=!1,le.current={x:0,y:0},q.current=ke,F.current=ke,ue.current=x,J.current=typeof a=="function"?a:null,nt){te.current={width:nt.offsetWidth,height:nt.offsetHeight},W(b);let at=ya(nt);B.current=at,X.current={x:at.x,y:at.y},ve({x:at.x,y:at.y},re.current),"touches"in Se||av(nt,Se.pointerId,"setPointerCapture")}return f?.(Se.nativeEvent),Ce(!0),H.current=!0,me(0),xe(!0),!0}function Ae(){Ve(),ee.current=!1,F.current=null}function Ve(){K.current=!1,Z.current=null}function Te(Se){if(Ae(),!Pe.current)return;Ce(!1);let ke=B.current;X.current={x:ke.x,y:ke.y},D(void 0),Q.current=!1,xe(!1);let Ie=r.current;Ie&&av(Ie,Se.pointerId,"releasePointerCapture"),me(0,{deltaX:0,deltaY:0,direction:void 0}),p?.(Se.nativeEvent)}function De(Se,ke){let Ie=Oe=>Math.sign(Oe)*Math.abs(Oe)**.5,_e=(Oe,Le,Je)=>!Le&&Oe<0||!Je&&Oe>0?Ie(Oe):Oe,pe=E?_e(Se,h,y):Ie(Se),we=P?_e(ke,C,S):Ie(ke);return{x:pe,y:we}}function ze(Se,ke,Ie){let _e=(pe,we,Oe,Le,Je)=>pe>0&&we<=0&&Le||pe<0&&we>=Math.max(0,Oe)&&Je;return P&&Ie!==0?_e(Ie,Se.scrollTop,Se.scrollHeight-Se.clientHeight,S,C):E&&ke!==0?_e(ke,Se.scrollLeft,Se.scrollWidth-Se.clientWidth,y,h):null}let We=j(Se=>{if(!t||Se.defaultPrevented||Se.nativeEvent.defaultPrevented||!("touches"in Se)&&Se.button!==0)return;let ke=oe(Se);!ke||(K.current=!0,Z.current=ke,ee.current=!1,Q.current=!("touches"in Se),!(s?s(ke,{nativeEvent:Se.nativeEvent,direction:b}):!0))||Ne(Se,ke)&&Ve()});function Ge(Se,ke,Ie){if(!t||!Pe.current)return;let _e=$e(Se.nativeEvent);if(ye(Se)&&!ee.current){let jo=Se.currentTarget;if(se(_e,jo))return}if("touches"in Se||Se.preventDefault(),H.current&&(H.current=!1,R)){L.current=ke;let jo=Sx(Se.timeStamp);jo!==null&&(re.current=jo),$.current=null,ie.current=!1}let pe=ke.x,we=ke.y,Oe=Ie.x,Le=Ie.y;(Le<0&&we>q.current.y||Le>0&&we<q.current.y)&&(q.current={x:q.current.x,y:we}),(Oe<0&&pe>q.current.x||Oe>0&&pe<q.current.x)&&(q.current={x:pe,y:q.current.y});let Je=pe-L.current.x,Be=we-L.current.y,nt=we-q.current.y,at=pe-q.current.x,vt;if(!k.current)Math.abs(Je)>=Math.abs(Be)?vt=Je>0?"right":"left":vt=Be>0?"down":"up",vt&&(vt==="left"&&h||vt==="right"&&y||vt==="up"&&C||vt==="down"&&S)&&(k.current=vt,Y.current=Uo(vt,Je,Be),D(vt),W(vt));else{let jo=k.current,Gr=Uo(jo,at,nt);Gr>ue.current?(V.current=!1,D(jo)):!(h&&y)&&!(C&&S)&&Y.current-Gr>=LK&&(V.current=!0)}let It=De(Je,Be),zt=B.current.x,Rt=B.current.y;E&&(zt+=It.x),P&&(Rt+=It.y);let ho=X.current,qo=zt!==ho.x||Rt!==ho.y;X.current={x:zt,y:Rt},qo&&xe(!0),ve({x:zt,y:Rt},Sx(Se.timeStamp));let bo=zt-B.current.x,Dr=Rt-B.current.y,Nr={deltaX:bo,deltaY:Dr,direction:k.current},Eo=0,Ur=b??k.current;if(Ur){let jo=Ur==="left"||Ur==="right"?te.current.width:te.current.height,Gr=B.current.scale||1,wo=Uo(Ur,bo,Dr);jo>0&&Gr>0&&wo>0&&(Eo=wo/(jo*Gr))}me(Eo,Nr)}let He=j(Se=>{if(!t)return;let ke=X.current,Ie=B.current,_e=ke.x-Ie.x,pe=ke.y-Ie.y,we={deltaX:_e,deltaY:pe,direction:k.current};if(!Pe.current){Ae(),me(0,we);return}Ce(!1),Ae(),Q.current=!1;let Oe=r.current;Oe&&("touches"in Se||av(Oe,Se.pointerId,"releasePointerCapture"));let Le=_e,Je=pe,Be=re.current,nt=Sx(Se.timeStamp),at=Be!==null&&nt!==null&&nt>Be?nt-Be:0,vt=at>0?Math.max(at,kK):0,It=vt>0?Le/vt:0,zt=vt>0?Je/vt:0,Rt=le.current.x,ho=le.current.y,qo=$.current;if(qo&&nt!==null&&nt>=qo.time){let Ur=nt-qo.time;if(Ur<=_K){let jo=Math.max(Ur,GA),Gr=ke.x-qo.x,wo=ke.y-qo.y,lt=Gr/jo,Mi=wo/jo;Math.abs(Gr)>=Ex&&(Rt=lt),Math.abs(wo)>=Ex&&(ho=Mi)}else Rt=0,ho=0}let bo=m?.({event:Se.nativeEvent,direction:k.current,deltaX:Le,deltaY:Je,velocityX:It,velocityY:zt,releaseVelocityX:Rt,releaseVelocityY:ho}),Dr=typeof bo=="boolean";if(V.current&&!Dr){X.current={x:Ie.x,y:Ie.y},D(void 0),xe(!1),me(0,we);return}let Nr=!1,Eo;if(Dr)Nr=bo,Eo=k.current??b;else for(let Ur of o)if(Uo(Ur,Le,Je)>ue.current){Nr=!0,Eo=Ur;break}Nr&&Eo?(D(Eo),A(!0),xe(!1),c?.(Se.nativeEvent,{direction:Eo})):(X.current={x:Ie.x,y:Ie.y},D(void 0),xe(!1),me(0,we))}),Ue=j(Se=>{let ke=oe(Se);if(!ke)return;let Ie=!1;if(!("touches"in Se)){let we=HK(Se.buttons);if(we&&(Q.current=!0),Se.buttons!==0&&!we){Te(Se);return}if(Se.buttons===0&&Q.current){if(!Pe.current){He(Se);return}Ie=!0}}if(!G&&K.current){if(!ye(Se)&&(Se.defaultPrevented||Se.nativeEvent.defaultPrevented)){Ae();return}if(s?s(ke,{nativeEvent:Se.nativeEvent,direction:b}):!0){let Oe=Z.current,Le=!1;if(ye(Se)){let Be=r.current;if(Oe&&Be){let nt=be(ke,Se.nativeEvent),vt=Fe(Be).body,It=vt?se(nt,vt):null;if(It&&(Ee(Be,It)||Ee(It,Be))){let zt=ke.x-Oe.x,Rt=ke.y-Oe.y,ho=ze(It,zt,Rt);if(ho===!1)return;ho===!0&&(Le=!0)}}}Ne(Se,ke,{ignoreScrollableTarget:Le,ignoreScrollableAncestors:Le})&&(Oe&&Le?(Ve(),L.current=Oe,q.current=Oe,F.current=Oe,H.current=!1):(Ve(),ee.current=!1))}}let _e=F.current,pe=_e===null?{x:0,y:0}:{x:ke.x-_e.x,y:ke.y-_e.y};F.current=ke,Ge(Se,ke,pe),Ie&&!("touches"in Se)&&He(Se)}),rt=j((Se,ke)=>{Ue({touches:Se.touches,currentTarget:ke,nativeEvent:Se,defaultPrevented:Se.defaultPrevented,timeStamp:Se.timeStamp})}),et=Ht.useCallback(()=>{let Se=Pe.current,ke=X.current,Ie=B.current,_e=ke.x-Ie.x,pe=ke.y-Ie.y;return!Se&&_e===0&&pe===0&&!O?{[n.x]:"0px",[n.y]:"0px"}:{transition:Se?"none":void 0,transform:Se?WA(ke,Ie.scale):void 0,[n.x]:`${_e}px`,[n.y]:`${pe}px`}},[O,n]),pt=Ht.useCallback(()=>t?{onPointerDown:We,onPointerMove:Ue,onPointerUp:He,onPointerCancel:He}:{},[t,He,Ue,We]),wt=Ht.useCallback(()=>t?{onTouchStart:We,onTouchMove:Ue,onTouchEnd:He,onTouchCancel:He}:{},[t,He,Ue,We]);return{swiping:G,swipeDirection:w,dragDismissed:O,getPointerProps:pt,getTouchProps:wt,moveNative:rt,getDragStyles:et,reset:ne}}var Tx={};ae(Tx,{closed:()=>lv,disabled:()=>uv,open:()=>cv,swipeDirection:()=>pv,swiping:()=>fv});var cv=ce.open,lv=ce.closed,uv="data-disabled",pv="data-swipe-direction",fv="data-swiping";var UK=.5,GK=1,WK=.1,jK=40,YK={[cv]:""},KK={[lv]:""},zK={[fv]:""},$K={[uv]:""},XK={open(e){return e?YK:KK},swiping(e){return e?zK:null},swipeDirection(e){return{[pv]:e}},disabled(e){return e?$K:null}},jA={up:"down",down:"up",left:"right",right:"left"};function qK(e){return e==="left"||e==="right"?"pan-y":"pan-x"}var YA=gr.forwardRef(function(t,o){let{render:r,className:n,style:s,disabled:i=!1,swipeDirection:l,...a}=t,c=_t(),{swipeDirection:u,frontmostHeight:p,swipeAreaActiveRef:f}=Gs(),m=Hs(),[d,R]=gr.useState(!1),g=gr.useRef(null),b=gr.useRef(null),x=gr.useRef(!1),h=gr.useRef({x:0,y:0}),y=gr.useRef(null),C=gr.useRef(!1),S=gr.useRef(null),E=gr.useRef(null),P=gr.useRef(null),N=gr.useRef(Qe),w=je(t.id),D=Ou(w,c);z(()=>(D(g.current),()=>D(null)),[D,w,c]);let G=c.useState("open"),I=j(()=>{h.current.x=0,h.current.y=0}),O=l??jA[u],A=jA[O],L=!i&&(!G||d);function X(){N.current(),c.context.outsidePressEnabledRef.current=!1}let F=j(()=>{N.current();let $=Fe(g.current);function ie(le){le?.type==="click"&&le.detail!==0&&!hn(le)||(N.current=Qe,$.removeEventListener("pointerdown",ie,!0),$.removeEventListener("click",ie,!0),c.context.outsidePressEnabledRef.current=!0)}N.current=ie,$.addEventListener("pointerdown",ie,!0),$.addEventListener("click",ie,!0)});function B($){let le=A==="left"||A==="right"?$.offsetWidth:$.offsetHeight;return le<=0?null:le}function k(){let $=c.context.popupRef.current;return $?B($):null}function Y($){let ie=B($);if(ie==null)return null;let le=A==="left"||A==="right",he=ya($),Pe=le?he.x:he.y;return Number.isFinite(Pe)&&Math.abs(Pe)>.5?Math.min(ie,Math.abs(Pe)):ie}function V(){let $=k();return $==null?jK:$*UK}function q(){let $=c.context.popupRef.current;if(!$||!c.select("open")||!c.select("mounted"))return;y.current==null&&(y.current=Y($));let ie=y.current;if(ie===null)return;let{x:le,y:he}=h.current,Pe=Uo(O,le,he),ge=Math.max(0,Pe),Ce=ge>ie?ie+Math.sqrt(ge-ie):ge,xe=(ie-Ce)*(A==="left"||A==="up"?-1:1),ve=A==="left"||A==="right",ne=ve?xe:0,oe=ve?0:xe,ye=Math.max(0,Math.min(1,ge/ie)),be=Math.max(0,Math.min(1,1-ye));$.style.setProperty(pi,`${ne}px`),$.style.setProperty(In,`${oe}px`),$.setAttribute(Us,""),S.current=$,P.current===null&&(P.current=$.style.transition),$.style.transition="none";let se=c.context.backdropRef.current;se&&(se.setAttribute(Us,""),E.current=se,se.style.setProperty(Ho,`${be}`),ye>0&&p>0?se.style.setProperty(_r,`${p}px`):se.style.removeProperty(_r)),m?.visualStateStore.set({swipeProgress:ye,frontmostHeight:ye>0?p:0}),C.current=!0,f.current=!0}let H=j(()=>{let $=S.current;$&&($.style.removeProperty(pi),$.style.removeProperty(In),$.removeAttribute(Us)),$&&P.current!==null&&($.style.transition=P.current,P.current=null);let ie=E.current;ie&&(ie.removeAttribute(Us),ie.style.setProperty(Ho,"0"),ie.style.removeProperty(_r)),m?.visualStateStore.set({swipeProgress:0,frontmostHeight:0}),C.current=!1,S.current=null,E.current=null,f.current=!1});function K($){x.current=!0,c.setOpen(!0,fe(U.swipe,$,g.current))}function Z($){c.setOpen(!1,fe(U.swipe,$,g.current))}function ee(){b.current=null,x.current=!1,y.current=null,R(!1)}function Q(){ee(),F(),I(),H()}let te=Px({enabled:L,directions:[O],elementRef:g,trackDrag:!1,movementCssVars:{x:pi,y:In},onSwipeStart($){X(),b.current=$,x.current=!1,R(!0),I()},onProgress($,ie){if(!ie||!b.current||(h.current.x=ie.deltaX,h.current.y=ie.deltaY,ie.direction!==O))return;let le=Uo(O,ie.deltaX,ie.deltaY);!x.current&&le<GK||(!x.current&&!c.select("open")&&K(b.current),q())},onRelease({event:$,direction:ie,deltaX:le,deltaY:he,releaseVelocityX:Pe,releaseVelocityY:ge}){let Ce=Uo(O,le,he),W=Uo(O,Pe,ge),me=V(),xe=Ce>=me,ve=W>=WK;return ie===O&&(xe||ve)&&!i?c.select("open")||K($):x.current&&c.select("open")&&Z($),Q(),!1},onCancel:Q}),de=te.getPointerProps(),ue=te.getTouchProps(),J=te.reset;z(()=>{d&&C.current&&q()}),z(()=>{L||(d&&F(),J(),I(),H(),ee())},[H,F,L,I,J,d]),gr.useEffect(()=>()=>{N.current(),c.context.outsidePressEnabledRef.current=!0},[c]);let re={open:G,swiping:te.swiping,swipeDirection:O,disabled:i};return _("div",t,{state:re,ref:[o,g,D],stateAttributesMapping:XK,props:[{role:"presentation","aria-hidden":!0,style:{pointerEvents:L?void 0:"none",touchAction:qK(O)},onPointerDown($){$.pointerType!=="touch"&&(de.onPointerDown?.($),$.cancelable&&$.preventDefault())},onPointerMove($){$.pointerType!=="touch"&&de.onPointerMove?.($)},onPointerUp($){$.pointerType!=="touch"&&de.onPointerUp?.($)},onPointerCancel($){$.pointerType!=="touch"&&de.onPointerCancel?.($)}},ue,w?{id:w}:void 0,a]})});var KA=Qc;var zA=el;var Go=T(M(),1),sO=T($o(),1);var wx=T(M(),1),dv=wx.createContext(void 0);function $A(){return wx.useContext(dv)}var xv=10,XA=.5,qA=.5,JK=300,JA=4,QA=.2,QK=4,mv=80,ZA=360,eO=.1,ZK=1,tO=6,ez=2,tz=`[${gx}]`,oO={horizontal:`[${td}="x"]`,vertical:`[${td}="y"]`},iO=Go.forwardRef(function(t,o){let{render:r,className:n,style:s,children:i,...l}=t,a=_t(),c=a.context.popupRef,u=a.context.backdropRef,{swipeDirection:p,notifyParentSwipingChange:f,notifyParentSwipeProgressChange:m,frontmostHeight:d,snapToSequentialPoints:R,swipeAreaActiveRef:g}=Gs(),b=Hs(),{snapPoints:x,resolvedSnapPoints:h,activeSnapPoint:y,activeSnapPointOffset:C,setActiveSnapPoint:S,popupHeight:E}=yx(),P=a.useState("open"),N=a.useState("mounted"),w=a.useState("nested"),D=a.useState("nestedOpenDrawerCount"),G=a.useState("viewportElement"),I=a.useState("popupElement"),O=b?.visualStateStore,A=D>0,L=p==="left"||p==="right"?"horizontal":"vertical",X=L==="vertical",F=X?"horizontal":"vertical",[B,k]=Go.useState(null),Y=Go.useRef(void 0),V=Go.useRef(null),q=ao(),H=Go.useRef(!1),K=Go.useRef(!1),Z=Go.useRef(""),ee=Go.useRef(!1),Q=Go.useRef(!1),te=Go.useRef(null),de=$A(),ue=Go.useMemo(()=>{if(!x||x.length<2||h.length<2||p!=="down"&&p!=="up")return null;let se=h.map(Te=>Te.offset).sort((Te,De)=>Te-De),Ne=se[0],Ve=se[1]-Ne;return{minOffset:Ne,range:Ve}},[h,x,p]),J=Go.useMemo(()=>!ue||C===null?null:gt((C-ue.minOffset)/ue.range,0,1),[C,ue]),re=Go.useMemo(()=>x&&x.length>0&&(p==="down"||p==="up")?p==="down"?["down","up"]:["up","down"]:[p],[x,p]),$=j(se=>{c.current?.toggleAttribute(hx,se),u.current?.toggleAttribute(hx,se)}),ie=j(()=>{$(!1),c.current?.removeAttribute(bt.endingStyle),k(null)}),le=j(()=>{K.current&&(K.current=!1,f?.(!1))}),he=j((se,Ne,Ae)=>{let Ve=P&&!w&&Ne,Te=Ve?se:0,De=P&&Ne?se:0;Ae&&m&&(m(De),De<=0&&le()),O?.set({swipeProgress:Te,frontmostHeight:Te>0?d:0});let ze=u.current;if(!ze)return;let We=Ve&&Te>0;ze.style.setProperty(Ho,We?`${Te}`:"0"),We&&d>0?ze.style.setProperty(_r,`${d}px`):ze.style.removeProperty(_r)});function Pe(se,Ne,Ae,Ve,Te,De,ze,We){let Ge=aO(se,Ne);if(Ge<=0)return null;let Ue=((Ne==="down"||Ne==="up")&&x&&x.length>0?C??0:0)+Uo(Ne,Ae,Ve),rt=Math.max(0,Ge-Ue);if(rt<=0)return null;let et=Uo(Ne,ze,We),pt=Math.abs(et)>0?et:Uo(Ne,Te,De);if(pt<=QA)return null;let wt=gt(pt,QA,QK),ke=(gt(rt/wt,mv,ZA)-mv)/(ZA-mv);return eO+ke*(ZK-eO)}function ge(se){if(K.current||!se)return;let Ne=se.direction??p,Ae=Uo(Ne,se.deltaX,se.deltaY);Math.abs(Ae)<xv||(K.current=!0,f?.(!0))}let Ce=Px({enabled:N&&!A,directions:re,elementRef:a.context.popupRef,ignoreSelectorWhenTouch:!1,ignoreScrollableAncestors:!0,movementCssVars:{x:pi,y:In},onSwipeStart(se){if("touches"in se||se.pointerType==="touch")return;let Ne=c.current,Ve=Fe(Ne).getSelection?.();if(!Ve||Ve.isCollapsed)return;let Te=st(Ve.anchorNode)?Ve.anchorNode:Ve.anchorNode?.parentElement,De=st(Ve.focusNode)?Ve.focusNode:Ve.focusNode?.parentElement;!Ee(Ne,Te)&&!Ee(Ne,De)||Ve.removeAllRanges()},onSwipingChange(se){H.current=se,gv(a.context.backdropRef.current,se),!se&&!m&&le()},swipeThreshold({element:se,direction:Ne}){return rO(se,Ne)},canStart(se,Ne){let Ae=a.context.popupRef.current;if(!Ae)return!1;let Ve=Ne.nativeEvent,Te="touches"in Ve||Ve.pointerType==="touch",De=Te?te.current:null,ze=Ae.ownerDocument,We=fi(Ae.getRootNode(),se.x,se.y);return!(!De?.startedInPopup&&!Ee(Ae,We)||Te&&nO(ze,Ae)||De?.hasCrossAxisGestureTarget&&!De.drawerAxisAttributed&&De.allowSwipe!==!0)},onProgress(se,Ne){let Ae=H.current;Ae&&ge(Ne);let Ve=!!(x&&x.length>0);if(Ae&&p==="down"&&Ve&&Ne){let De=a.context.popupRef.current;De&&(De.style.removeProperty("transform"),De.style.setProperty(In,`${Cx(C??0,Ne.deltaY)}px`))}let Te=se;if(ue&&E>0){let De=C??ue.minOffset,ze=We=>gt((We-ue.minOffset)/ue.range,0,1);Ae&&Ne&&Number.isFinite(Ne.deltaY)?Te=ze(gt(De+Ne.deltaY,0,E)):J!==null&&(Te=J)}Ae||(m?.(0),le()),he(Te,!0,Ae)},onRelease({event:se,deltaX:Ne,deltaY:Ae,direction:Ve,velocityX:Te,velocityY:De,releaseVelocityX:ze,releaseVelocityY:We}){let Ge=a.context.popupRef.current;if(!Ge){ie();return}let He=Ge;function Ue(at){le(),$(!0),He.style.removeProperty("transition"),He.setAttribute(bt.endingStyle,""),sO.flushSync(()=>{k(Pe(He,at,Ne,Ae,Te,De,ze,We))})}if(!x||x.length===0){if(!Ve){ie();return}let at=Uo(Ve,Ne,Ae);if(at<=0)return ie(),!1;if(Uo(Ve,Te,De)>=XA)return Ue(Ve),!0;let vt=at>rO(He,Ve);return vt?Ue(Ve):ie(),vt}if(p!=="down"&&p!=="up"){ie();return}if(!E)return ie(),!1;if(h.length===0){ie();return}let rt=p==="down"?Ae:-Ae,et=Math.sign(rt),pt=p==="down"?We:-We,wt=p==="down"?De:-De,Se=pt;if(et!==0&&Math.abs(rt)>=xv){let at=Math.sign(Se);at!==0&&at!==et&&(Se=wt)}let ke=C??0,Ie=gt(ke+rt,0,E),_e=Math.abs(Se)>=qA?gt(Se,-JA,JA)*JK:0,pe=R?Ie:gt(Ie+_e,0,E),we=fe(U.swipe,se),Oe=()=>(he(0,!0,!0),ie(),!1),Le=at=>(S(at.value,we),Oe()),Je=at=>Ve?(S(null,we),we.isCanceled?Oe():(Y.current=y,Ue(p),!0)):Le(at);if(R){let at=[...h].sort((Nr,Eo)=>Nr.offset-Eo.offset),vt=at.map(Nr=>Nr.offset),It=Sp(vt,ke),zt=at[Sp(vt,pe)],Rt=Math.sign(Se),ho=et!==0&&Rt!==0&&Rt===et&&Math.abs(Se)>=qA,qo=pe;if(ho){let Nr=gt(It+et,0,at.length-1);if(Nr!==It){let Eo=at[Nr];(et>0?pe<Eo.offset:pe>Eo.offset)&&(zt=Eo,qo=Eo.offset)}else if(et>0)return Je(zt)}let bo=Math.abs(qo-E),Dr=Math.abs(qo-zt.offset);return bo<Dr?Je(zt):Le(zt)}let Be=h[Sp(h.map(at=>at.offset),pe)];return Se>=XA&&rt>0||Math.abs(pe-E)<Math.abs(pe-Be.offset)?Je(Be):Le(Be)},onDismiss(se){O?.set({swipeProgress:0,frontmostHeight:0});let Ne=a.context.backdropRef.current;Ne&&(Ne.style.setProperty(Ho,"0"),Ne.style.removeProperty(_r));let Ae=fe(U.swipe,se);if(a.setOpen(!1,Ae),Ae.isCanceled){let Ve=Y.current;Ve!==void 0&&S(Ve,fe(U.swipe,se)),Y.current=void 0,V.current?.(),ie();return}if(a.select("open")){let Ve=se;q.request(()=>{if(a.select("open")){let Te=Y.current;Te!==void 0&&S(Te,fe(U.swipe,Ve)),Y.current=void 0,ie(),V.current?.()}else Y.current=void 0});return}Y.current=void 0,$(!0)}}),W=Ce.getPointerProps(),me=Ce.getTouchProps(),{moveNative:xe,reset:ve}=Ce;V.current=ve,Go.useEffect(()=>{let se=G??I;if(!se||!P||!N)return;let Ne=se,Ae=Fe(Ne);function Ve(De,ze,We){let Ge=X?We.clientY-ze.lastY:We.clientX-ze.lastX;if(De.touches.length===2||nO(Ae,Ne)||A||uz(ze,De,We,X))return;let Ue=ze.scrollTarget;if(!Ue||Ue===Ae.documentElement||Ue===Ae.body){De.cancelable&&De.preventDefault(),De.stopPropagation(),xe(De,Ne);return}if(!pz(Ue,L)){De.cancelable&&De.preventDefault(),De.stopPropagation();return}if(Ge!==0){let rt=fz(Ue,L,p,Ge);ze.allowSwipe?De.cancelable&&De.preventDefault():De.cancelable&&rt?(ze.allowSwipe=!0,De.preventDefault()):ze.allowSwipe=!1}ze.allowSwipe===!0&&(De.stopPropagation(),xe(De,Ne))}function Te(De){if(de?.onTouchMove(De),Q.current)return;let ze=te.current,We=De.touches[0];!We||!ze||(Ve(De,ze,We),lz(ze,We))}return Ye(Ae,"touchmove",Te,{passive:!1,capture:!0})},[N,A,P,I,X,L,p,xe,G,de]),z(()=>{!ue||Ce.swiping||he(!P||w?0:J??0,!0,!1)},[he,d,w,m,P,J,ue,Ce.swiping,a,O]),z(()=>{if(m)return P||m(0),()=>{m(0)}},[m,P]),z(()=>{P&&(g.current||ve(),ie())},[ie,P,ve,g]),z(()=>{let se=u.current;return()=>{O?.set({swipeProgress:0,frontmostHeight:0}),gv(se,!1);let Ne=u.current;Ne!==se&&gv(Ne,!1),le()}},[u,le,O]);let ne=Go.useMemo(()=>({swiping:Ce.swiping,getDragStyles:Ce.getDragStyles,swipeStrength:B??null,setSwipeDismissed:$}),[$,Ce.getDragStyles,Ce.swiping,B]);function oe(se){Q.current=se,te.current=null}function ye(){oe(!1),Z.current="",ee.current=!1}function be(se){return Z.current="",se.pointerType!=="touch"}return v(tl,{ref:o,className:n,style:s,render:r,...Pt(l,{onPointerDown(se){if(Z.current=se.pointerType,ee.current=se.pointerType==="pen",!P||!N||A)return;let Ne=fi(se.currentTarget.getRootNode(),se.clientX,se.clientY);oz(Ne)||rz(Ne)||se.pointerType!=="touch"&&W.onPointerDown?.(se)},onPointerMove(se){se.pointerType!=="touch"&&W.onPointerMove?.(se)},onPointerUp(se){be(se)&&W.onPointerUp?.(se)},onPointerCancel(se){be(se)&&W.onPointerCancel?.(se)},onTouchStart(se){if(Z.current==="pen"&&ee.current){ee.current=!1,oe(!1);return}if(!P||!N||A){oe(!1);return}let Ae=se.touches[0];if(!Ae)return;if(cz(se)){oe(!1);return}let Ve=se.currentTarget,Te=fi(Ve.getRootNode(),Ae.clientX,Ae.clientY),De=$e(se.nativeEvent),ze=st(De)?De:Ve;if(!Ee(Ve,ze)){oe(!0);return}if(de?.onTouchStart(se),Wt(Te,`${Du}:not(${oO[F]})`)){oe(!0);return}Q.current=!1;let We=ta(ze,Ve,L),Ge=ta(ze,Ve,F)!=null||Wt(Te,oO[F])!=null,He=null;We&&(He=lO(We,L,p)?null:!1),te.current={startX:Ae.clientX,startY:Ae.clientY,lastX:Ae.clientX,lastY:Ae.clientY,startedInPopup:Ee(c.current,Te),scrollTarget:We,hasCrossAxisGestureTarget:Ge,allowSwipe:He,preserveNativeCrossAxisScroll:!1,drawerAxisAttributed:!1},me.onTouchStart?.(se)},onTouchEnd(se){de?.onTouchEnd(se),ye(),me.onTouchEnd?.(se)},onTouchCancel(se){de?.onTouchCancel(),ye(),me.onTouchCancel?.(se)},[RC]:void 0}),children:v(iv.Provider,{value:ne,children:i})})});function gv(e,t){e?.toggleAttribute(Us,t)}function oz(e){return!!Wt(e,Du)}function rz(e){return!!Wt(e,tz)}function aO(e,t){return t==="left"||t==="right"?e.offsetWidth:e.offsetHeight}function rO(e,t){return Math.max(aO(e,t)*.5,xv)}function nz(e,t){return e instanceof t.HTMLInputElement&&e.type==="range"}function sz(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"}function iz(e,t){let o=st(e.anchorNode)?e.anchorNode:e.anchorNode?.parentElement,r=st(e.focusNode)?e.focusNode:e.focusNode?.parentElement;return e.containsNode(t,!0)||Ee(t,o)||Ee(t,r)}function nO(e,t){let o=ct(e);if(o&&Ee(t,o)&&sz(o)){let{selectionStart:n,selectionEnd:s}=o;if(n!=null&&s!=null&&n<s)return!0}let r=e.getSelection?.();return!r||r.isCollapsed?!1:iz(r,t)}function az(e,t){return e.composedPath().some(o=>nz(o,t))}function cz(e){return az(e.nativeEvent,Ze(e.currentTarget))}function lz(e,t){e.lastX=t.clientX,e.lastY=t.clientY}function uz(e,t,o,r){if(e.preserveNativeCrossAxisScroll)return!0;if(e.drawerAxisAttributed||e.allowSwipe===!0||!e.hasCrossAxisGestureTarget)return!1;if(!t.cancelable)return e.preserveNativeCrossAxisScroll=!0,!0;let n=r?o.clientY-e.startY:o.clientX-e.startX,s=r?o.clientX-e.startX:o.clientY-e.startY,i=Math.abs(n),l=Math.abs(s);return l>=tO&&l>i+ez?(e.preserveNativeCrossAxisScroll=!0,!0):i>=tO?(e.drawerAxisAttributed=!0,!1):!0}function pz(e,t){return cO(e,t).max>0}function cO(e,t){if(t==="vertical"){let r=Math.max(0,e.scrollHeight-e.clientHeight);return{offset:e.scrollTop,max:r}}let o=Math.max(0,e.scrollWidth-e.clientWidth);return{offset:e.scrollLeft,max:o}}function lO(e,t,o){let r=uO(o,t),{offset:n,max:s}=cO(e,t);return r?n<=0:n>=s}function fz(e,t,o,r){return(uO(o,t)?r>0:r<0)?lO(e,t,o):!1}function uO(e,t){return t==="vertical"?e==="down":e==="right"}var os=T(M(),1);var Mx={};ae(Mx,{keyboardInset:()=>Ix});var Ix="--drawer-keyboard-inset";var Rv=60,Dx=16,pO=150,dz=4,mz=60,fO=10,Nx=16,gz=new Set(["email","number","password","search","tel","text","url"]),mO=Symbol("KeyboardTapBlocked");function gO(e){let{children:t}=e,o=_t(),r=o.useState("open"),n=o.useState("mounted"),s=o.useState("modal"),i=o.useState("nestedOpenDialogCount"),a=o.useState("viewportElement"),c=i>0,u=os.useRef(!1),p=os.useRef(null),f=os.useRef(null),m=os.useRef(null),d=os.useRef(!1),R=os.useRef(null),g=ao(),b=it(),x=j(()=>{let w=m.current;w&&(w.element.style.overflowAnchor=w.overflowAnchor,w.element.style.paddingBottom=w.paddingBottom,w.element.style.scrollPaddingBottom=w.scrollPaddingBottom,m.current=null)}),h=j((w,D)=>{let G=Math.max(0,Math.ceil(D)),I=m.current;if(I&&!I.element.isConnected&&(x(),I=null),G===0){x();return}if(I&&I.element!==w&&(x(),I=null),!I){let O=fo(w);I={element:w,overflowAnchor:w.style.overflowAnchor,paddingBottom:w.style.paddingBottom,scrollPaddingBottom:w.style.scrollPaddingBottom,computedPaddingBottom:Number.parseFloat(O.paddingBottom)||0,computedScrollPaddingBottom:Number.parseFloat(O.scrollPaddingBottom)||0},m.current=I}w.style.overflowAnchor="none",w.style.paddingBottom=`${G+Math.max(I.computedPaddingBottom,Dx)}px`,w.style.scrollPaddingBottom=`${I.computedScrollPaddingBottom+Dx}px`}),y=j((w,D)=>{let I=Ze(w).matchMedia?.("(prefers-reduced-motion: reduce)")?.matches?"auto":"smooth";w.scrollTo({top:D,behavior:I})}),C=j(()=>{u.current=!1,p.current=null});os.useEffect(()=>{if(!n||!r){f.current=null,x(),g.cancel();return}if(!a){x();return}let w=Fe(a),D=Ze(a),G=D.visualViewport,I=null,O=0,A=0,L=-1,X=-1,F=null,B=()=>{if(!G||G.scale!==1)return null;let ge=D.innerHeight,Ce=G.height;if(ge-Ce>Rv)X=Ce;else if(Math.abs(Ce-X)>Rv)return X=-1,null;F||(F=w.createElement("div"),F.style.cssText="position:fixed;top:0;height:100svh;visibility:hidden",w.body.appendChild(F));let W=F.offsetHeight-Ce<=Rv,me=Math.max(0,G.offsetTop);return{top:me,bottom:W?ge:Math.min(ge,me+Ce),resizing:W&&Math.abs(ge-Ce)>=1}};R.current=B;let k=ge=>{a.style.setProperty(Ix,`${Math.max(0,Math.ceil(ge))}px`)},Y=D.scrollX,V=D.scrollY,q=()=>s!==!0||c||!f.current||D.scrollX===Y&&D.scrollY===V||B()==null?!1:(D.scrollTo({left:Y,top:V,behavior:"instant"}),!0),H=null,K=()=>{H?.(),H=null},Z=(ge,Ce)=>{K();let W=ge.getBoundingClientRect();H=xO(ge,(Ce.top+Ce.bottom-W.top-W.bottom)/2)},ee=()=>{K();let ge=f.current;if(c||!ge||!Ee(a,ge)){k(0),x();return}q();let Ce=B();if(!Ce){k(0),x();return}k(Math.max(0,D.innerHeight-Ce.bottom));let W=yz(ge,a);if(!W){x();return}let me=W.getBoundingClientRect(),xe=Math.min(me.bottom,Ce.bottom),ve=Math.max(0,me.bottom-Ce.bottom);h(W,ve);let ne=Math.max(0,W.scrollHeight-W.clientHeight);if(ne<=0)return;let ye=Math.max(me.top,Ce.top)+Dx,be=xe-Dx;if(be<=ye)return;let se=ge.getBoundingClientRect(),Ne=W.scrollTop+(se.top+se.bottom-ye-be)/2,Ae=Math.round(gt(Ne,0,ne));if(I===W&&!Ce.resizing&&Math.abs(O-Ae)<=1){if(L>=0){let Te=W.scrollTop;if(Math.abs(Te-Ae)<=1)return;if(Te!==L){L=Te;return}}}else{let Te=I===W?A+1:1;if(I=W,O=Ae,A=Te,L=-1,Te<=mz){g.request(ee);return}}I=W,O=Ae,A=0,L=W.scrollTop,y(W,Ae)},Q=()=>{g.request(ee)},te=()=>{let ge=dz,Ce=()=>{ee(),ge-=1,ge>0&&b.start(pO,Ce)};b.start(pO,Ce)},de=()=>{f.current=null,X=-1,b.clear(),Q()},ue=ge=>{if(c)return!1;let Ce=Ax(ge);return!Ce||!Ee(a,Ce)?!1:(f.current!==Ce&&(I=null),f.current=Ce,!0)},J=ge=>{let Ce=f.current;H&&Ce&&Ce===$e(ge)&&Ce.focus({preventScroll:!0})},re=ge=>{if(d.current=!1,K(),!ue($e(ge))){de();return}B()!=null&&te(),Q()},$=ge=>{if(!d.current){if(ue(ge.relatedTarget)){let Ce=f.current,W=B();Ce&&W&&Z(Ce,W),Q();return}de()}},ie=()=>{(f.current||ue(ct(w)))&&Q()},le=[];G&&le.push(Ye(G,"resize",ie),Ye(G,"scroll",ie),Ye(D,"resize",ie));let he=()=>{q()&&Q()},Pe=()=>{f.current&&g.cancel(),b.clear(),I=null};return le.push(Ye(w,"focus",J,!0),Ye(w,"focusin",re,!0),Ye(w,"focusout",$,!0),Ye(D,"scroll",he),Ye(w,"pointerdown",Pe,!0)),ue(ct(w))&&Q(),()=>{le.forEach(ge=>ge()),K(),f.current=null,x(),g.cancel(),b.clear(),R.current=null,F?.remove(),a.style.removeProperty(Ix)}},[y,g,b,s,n,c,r,x,a,h]);let S=j(w=>{let D=w.touches[0];u.current=!1,p.current={x:D.clientX,y:D.clientY}}),E=j(w=>{let D=w.touches[0],G=p.current;!D||!G||u.current||(Math.abs(D.clientX-G.x)>fO||Math.abs(D.clientY-G.y)>fO)&&(u.current=!0)}),P=j(w=>{if(!r||!n||c||!a||!p.current||u.current){C();return}let D=w.changedTouches[0]??w.touches[0],G=a.getRootNode(),I=$e(w.nativeEvent),O=D?hz(G,D.clientX,D.clientY):null;if(O===mO){C();return}let A=D&&(O??xz(I));if(A&&(!Ee(a,A.focusTarget)||!Ee(a,A.clickTarget))){C();return}if(A){let{clickTarget:L,focusTarget:X}=A,F=Ze(X);if(F.visualViewport&&F.visualViewport.scale!==1){C();return}if(ct(Fe(X))===X&&(!F.visualViewport||R.current?.()!=null)){C();return}w.preventDefault(),d.current=!0;try{Cz(X)}finally{d.current=!1}bz(L,D),L!==X&&ct(Fe(X))===X&&X.focus({preventScroll:!0}),C();return}C()}),N=os.useMemo(()=>({onTouchStart:S,onTouchMove:E,onTouchEnd:P,onTouchCancel:C}),[P,E,S,C]);return v(dv.Provider,{value:N,children:t})}function dO(e){if(e.isContentEditable)return!0;let t=Ze(e);return e instanceof t.HTMLTextAreaElement||e instanceof t.HTMLInputElement&&gz.has(e.type)?!e.matches(":disabled"):!1}function Ax(e){if(!tt(e))return null;if(dO(e))return e.isContentEditable?Rz(e):e;let o=Wt(e,"label")?.control??null;return tt(o)&&dO(o)?o:null}function xz(e){if(!tt(e))return null;let t=Ax(e);return t?{focusTarget:t,clickTarget:e}:null}function Rz(e){let t=e;for(;t.parentElement?.isContentEditable;)t=t.parentElement;return t}function hz(e,t,o){let r=fi(e,t,o);if(tt(r)){let n=Ax(r);if(n)return{focusTarget:n,clickTarget:r}}if(Ua(r)||Wt(r,"label")!=null)return mO;for(let[n,s]of[[0,Nx],[0,-Nx],[Nx,0],[-Nx,0]]){let i=Ax(fi(e,t+n,o+s));if(i)return{focusTarget:i,clickTarget:i}}return null}function bz(e,t){let o=Ze(e),r=o.PointerEvent??o.MouseEvent;e.dispatchEvent(new r("click",{bubbles:!0,cancelable:!0,clientX:t.clientX,clientY:t.clientY,detail:1,view:o}))}function Cz(e){let t=ct(Fe(e))===e,o=xO(e,-2e3);try{t&&e.blur(),e.focus({preventScroll:!0})}finally{o()}}function xO(e,t){let o=e.style.opacity,r=e.style.transform,n=e.style.transition;return e.style.transition="none",e.style.opacity="0",e.style.transform=`translateY(${t}px)`,()=>{e.style.opacity=o,e.style.transform=r,e.style.transition=n}}function yz(e,t){let o=zo(e);return ta(o,t,"vertical")??ta(o,t,"vertical",!0)}var Tp=class extends ni{};function RO(){return new Tp}var hv={};ae(hv,{closed:()=>Ez,endingStyle:()=>Pz,open:()=>vz,startingStyle:()=>Sz});var vz=ce.open,Ez=ce.closed,Sz=ce.startingStyle,Pz=ce.endingStyle;var bv={};ae(bv,{closed:()=>wz,endingStyle:()=>Mz,nested:()=>Dz,open:()=>Tz,startingStyle:()=>Iz});var Tz=ce.open,wz=ce.closed,Iz=ce.startingStyle,Mz=ce.endingStyle,Dz="data-nested";var mn={};ae(mn,{Control:()=>SO,Description:()=>EO,Error:()=>yO,Item:()=>TO,Label:()=>CO,Root:()=>bO,Validity:()=>PO});var Xo=T(M(),1);var Ox=T(M(),1),Cv=Ox.createContext(void 0);function va(e=!1){let t=Ox.useContext(Cv);if(!t&&!e)throw new Error(Me(86));return t}var Ea=T(M(),1);var Vx=function(t){let o=je(),[r,n]=Ea.useState(o),[s,i]=Ea.useState(),[l,a]=Ea.useState([]),c=r===void 0?o:r,u=ut(()=>new Map),{messageIds:p}=Ft(),f=j((g,b)=>{let x=u.current;b===void 0?x.delete(g):x.set(g,b),n(h=>{if(x.size===0)return h;let y;for(let C of x.values()){if(C===h)return h;y===void 0&&(y=C)}return y})}),m=j(()=>{u.current.size===0&&n(o)}),d=Ea.useCallback(g=>{let b=g["aria-describedby"]?g["aria-describedby"].split(" "):[];return b.push(...p,...l),{...g,"aria-describedby":Array.from(new Set(b)).join(" ")||void 0}},[p,l]),R=Ea.useMemo(()=>({controlId:c,registerControlId:f,resetControlId:m,labelId:s,setLabelId:i,messageIds:l,setMessageIds:a,getDescriptionProps:d}),[c,f,m,s,i,l,a,d]);return v(IC.Provider,{value:R,children:t.children})};var Fx=T(M(),1);function hO(e){let{change:t,commit:o,invalid:r,markedDirtyRef:n,name:s,setRegisteredFieldName:i,registeredFieldIdRef:l,setValidityData:a,validityData:c}=e,{formRef:u}=Kt(),p=Fx.useRef(null),f=Fx.useRef(null),m=Fx.useRef(!1),d=j(()=>{let C=f.current;if(C)return C.getValue?C.getValue():C.value});function R(C){return C.value===void 0?d():C.value}let g=j(()=>{let C=f.current;if(n.current=!0,!C){o(c.value);return}o(R(C))});function b(){let C=f.current;!C||!C.id||u.current.fields.set(C.id,{getValue:d,name:s??C.name,controlRef:C.controlRef,validityData:nc(c,r),validate:g})}function x(C=f.current?.id){C&&u.current.fields.delete(C)}function h(C){if(m.current)return;m.current=!0;let S=R(C);a(E=>E.initialValue===S?E:{...E,initialValue:S})}z(()=>{let C=f.current;!C||!C.id||(i(s?void 0:C.name),u.current.fields.set(C.id,{getValue:d,name:s??C.name,controlRef:C.controlRef,validityData:nc(c,r),validate:g}))},[u,d,r,s,i,g,c]),z(()=>{let C=u.current.fields;return()=>{let S=f.current?.id;S&&C.delete(S)}},[u]);let y=j((C,S)=>{if(!S){p.current===C&&(p.current=null,t(void 0,!0),x(),f.current=null,i(void 0),l.current=void 0);return}let E=f.current?.id,P=p.current;P&&P!==C&&t(void 0,!0),p.current=C,f.current=S,s||i(S.name),l.current=S.id,E&&E!==S.id&&x(E),h(S),b()});return[g,y]}var Nz=Xo.forwardRef(function(t,o){let{errors:r,validationMode:n,submitCountRef:s}=Kt(),{render:i,className:l,validate:a,validationDebounceTime:c=0,validationMode:u=n,name:p,disabled:f=!1,invalid:m,dirty:d,touched:R,actionsRef:g,style:b,...x}=t,h=va(!0)?.disabled,y=j(a||(()=>null)),C=h||f,[S,E]=Xo.useState(!1),[P,N]=Xo.useState(!1),[w,D]=Xo.useState(!1),[G,I]=Xo.useState(!1),O=Xo.useRef(void 0),A=d??P,L=R??S,X=Xo.useRef(A),F=Xo.useRef(void 0),[B,k]=Xo.useState(),Y=p??B;z(()=>{d!==void 0&&(X.current=d)},[d]);let V=j(he=>{d===void 0&&(he&&(X.current=!0),N(he))}),q=j(he=>{R===void 0&&E(he)}),H=j(()=>u==="onChange"||u==="onSubmit"&&s.current>0),K=Y&&Object.hasOwn(r,Y)?r[Y]:null,Z=!!(Array.isArray(K)?K.length:K),ee=m===!0||Z,[Q,te]=Xo.useState({state:tc,error:"",errors:[],value:null,initialValue:null}),de=!ee&&(C?null:Q.state.valid),ue=Xo.useMemo(()=>({disabled:C,touched:L,dirty:A,valid:de,filled:w,focused:G}),[C,L,A,de,w,G]),J=BD({setValidityData:te,validate:y,validityData:Q,validationDebounceTime:c,invalid:ee,markedDirtyRef:X,state:ue,shouldValidateOnChange:H,validationMode:u,registeredFieldIdRef:F}),[re,$]=hO({change:J.change,commit:J.commit,invalid:ee,markedDirtyRef:X,name:p,setRegisteredFieldName:k,registeredFieldIdRef:F,setValidityData:te,validityData:Q});Xo.useImperativeHandle(g,()=>({validate:re}),[re]);let ie=Xo.useMemo(()=>({invalid:ee,name:Y,validityData:Q,setValidityData:te,disabled:C,setTouched:q,setDirty:V,setFilled:D,setFocused:I,focusOwnerRef:O,validationMode:u,shouldValidateOnChange:H,state:ue,registerFieldControl:$,validation:J}),[ee,Y,Q,C,q,V,D,I,u,H,ue,$,J]),le=_("div",t,{ref:o,state:ue,props:x,stateAttributesMapping:Lt});return v(qu.Provider,{value:ie,children:le})}),bO=Xo.forwardRef(function(t,o){return v(Vx,{children:v(Nz,{...t,ref:o})})});var wp=T(M(),1);var CO=wp.forwardRef(function(t,o){let{render:r,className:n,style:s,id:i,nativeLabel:l=!0,...a}=t,c=mt(!1),u=na(),{labelId:p}=Ft(),f={...c.state,disabled:c.disabled||u.disabled},m=wp.useRef(null),d=aa({id:p??i,native:l});return _("label",t,{ref:[o,m],state:f,props:[d,a],stateAttributesMapping:Lt})});var uc=T(M(),1);var Az={...Lt,...Ot},yO=uc.forwardRef(function(t,o){let{render:r,id:n,className:s,match:i,style:l,...a}=t,c=je(n),{validityData:u,state:p,name:f}=mt(!1),{setMessageIds:m}=Ft(),{errors:d}=Kt(),R=f&&Object.hasOwn(d,f)?d[f]:null,g=!!(Array.isArray(R)?R.length:R),b=typeof i=="string",x=!1;i===!0?x=!0:p.disabled?x=!1:b?x=!!u.state[i]:x=g||u.state.valid===!1;let{mounted:h,transitionStatus:y,setMounted:C}=Xt(x);z(()=>{if(!(!x||!c))return m(L=>L.concat(c)),()=>{m(L=>L.filter(X=>X!==c))}},[x,c,m]);let S=uc.useRef(null),[E,P]=uc.useState(null),[N,w]=uc.useState(null),D=u.error;!b&&g?D=R:u.errors.length>1&&(D=u.errors);let G=D;Array.isArray(D)&&(G=D.length>1?v("ul",{children:D.map(L=>v("li",{children:L},L))}):D[0]);let I=Array.isArray(D)?JSON.stringify(D):D;x&&I!==N&&(w(I),P(G)),St({open:x,ref:S,onComplete(){x||C(!1)}});let O={...p,transitionStatus:y},A=_("div",t,{ref:[o,S],state:O,props:[{id:c,children:x?G:E},a],stateAttributesMapping:Az,enabled:h});return h?A:null});var vO=T(M(),1);var EO=vO.forwardRef(function(t,o){let{render:r,id:n,className:s,style:i,...l}=t,a=je(n),c=mt(!1),u=na(),{setMessageIds:p}=Ft(),f={...c.state,disabled:c.disabled||u.disabled};return z(()=>{if(a)return p(d=>d.concat(a)),()=>{p(d=>d.filter(R=>R!==a))}},[a,p]),_("p",t,{ref:o,state:f,props:[{id:a},l],stateAttributesMapping:Lt})});var Lx=T(M(),1);var SO=Lx.forwardRef(function(t,o){let{render:r,className:n,id:s,name:i,value:l,disabled:a=!1,onValueChange:c,defaultValue:u,autoFocus:p=!1,style:f,...m}=t,{state:d,name:R,disabled:g,setTouched:b,setDirty:x,validityData:h,setFilled:y,validationMode:C,validation:S}=mt(),{clearErrors:E,elementRef:P,submitCountRef:N}=Kt(),w=g||a,D=R??i,G={...d,disabled:w},{labelId:I}=Ft(),O=xo({id:s}),A=l!==void 0,L=l==null?void 0:String(l),X=j(()=>S.inputRef.current?.value);_o(S.inputRef,O,L,X,!w,i),z(()=>{let V=L??S.inputRef.current?.value;V!==void 0&&y(V!=="")},[L,u,S.inputRef,y]),$t(L,()=>{L!==void 0&&(E(D),x(L!==(h.initialValue??"")),S.change(L))});let F=Lx.useRef(null),B=Bo(w,F),k=it();return _("input",t,{ref:[o,F],state:G,props:[{id:O,disabled:w,name:D,ref:S.inputRef,"aria-labelledby":I,autoFocus:p,...A?{value:l}:{defaultValue:u},onChange(V){let q=V.currentTarget.value,H=fe(U.none,V.nativeEvent);c?.(q,H),!A&&(x(q!==(h.initialValue??"")),y(q!==""),!V.nativeEvent.defaultPrevented&&!H.isCanceled&&(E(D),S.change(q)))},onFocus(){B(!0)},onBlur(V){if(b(!0),B(!1),C==="onBlur"){let q=V.currentTarget.value;S.commit(q),A&&queueMicrotask(()=>{let H=S.inputRef.current?.value;H!==void 0&&H!==q&&H!==(h.initialValue??"")&&S.commit(H)})}},onKeyDown(V){if(V.currentTarget.tagName==="INPUT"&&V.key==="Enter"){b(!0);let q=V.currentTarget.value,H=V.currentTarget.form;if(H&&H===P.current&&!V.defaultPrevented){let K=V.currentTarget,Z=N.current;k.start(0,()=>{N.current===Z&&S.commit(K.value)})}else S.commit(q)}}},m,V=>S.getValidationProps(w,V)],stateAttributesMapping:Lt})});var Ip=T(M(),1);var PO=function(t){let{children:o}=t,{validityData:r,invalid:n}=mt(!1),s=Ip.useMemo(()=>nc(r,n),[r,n]),i=s.state.valid===!1,{transitionStatus:l}=Xt(i),a=Ip.useMemo(()=>({...s,validity:s.state,transitionStatus:l}),[s,l]);return v(Ip.Fragment,{children:o(a)})};var kx=T(M(),1);var TO=kx.forwardRef(function(t,o){let{render:r,className:n,style:s,disabled:i=!1,...l}=t,{state:a,disabled:c}=mt(!1),u=c||i,p={...a,disabled:u},f=kx.useMemo(()=>({disabled:u}),[u]),m=_("div",t,{ref:o,state:p,props:l,stateAttributesMapping:Lt});return v(Vx,{children:v(ty.Provider,{value:f,children:m})})});var yv={};ae(yv,{dirty:()=>Fz,disabled:()=>Oz,filled:()=>_z,focused:()=>Bz,invalid:()=>kz,touched:()=>Vz,valid:()=>Lz});var Oz="data-disabled",Vz="data-touched",Fz="data-dirty",Lz="data-valid",kz="data-invalid",_z="data-filled",Bz="data-focused";var vv={};ae(vv,{dirty:()=>jz,disabled:()=>Hz,filled:()=>Yz,focused:()=>Kz,invalid:()=>Gz,touched:()=>Wz,valid:()=>Uz});var Hz="data-disabled",Uz="data-valid",Gz="data-invalid",Wz="data-touched",jz="data-dirty",Yz="data-filled",Kz="data-focused";var Ev={};ae(Ev,{dirty:()=>Jz,disabled:()=>zz,endingStyle:()=>t$,filled:()=>Qz,focused:()=>Zz,invalid:()=>Xz,startingStyle:()=>e$,touched:()=>qz,valid:()=>$z});var zz="data-disabled",$z="data-valid",Xz="data-invalid",qz="data-touched",Jz="data-dirty",Qz="data-filled",Zz="data-focused",e$=bt.startingStyle,t$=bt.endingStyle;var Sv={};ae(Sv,{dirty:()=>i$,disabled:()=>o$,filled:()=>a$,focused:()=>c$,invalid:()=>n$,touched:()=>s$,valid:()=>r$});var o$="data-disabled",r$="data-valid",n$="data-invalid",s$="data-touched",i$="data-dirty",a$="data-filled",c$="data-focused";var Pv={};ae(Pv,{dirty:()=>d$,disabled:()=>l$,filled:()=>m$,focused:()=>g$,invalid:()=>p$,touched:()=>f$,valid:()=>u$});var l$="data-disabled",u$="data-valid",p$="data-invalid",f$="data-touched",d$="data-dirty",m$="data-filled",g$="data-focused";var Fl={};ae(Fl,{Legend:()=>MO,Root:()=>wO});var Vl=T(M(),1);var wO=Vl.forwardRef(function(t,o){let{render:r,className:n,style:s,disabled:i=!1,...l}=t,[a,c]=Vl.useState(void 0),p=va(!0)?.disabled||i,m=_("fieldset",t,{ref:o,state:{disabled:p},props:[{"aria-labelledby":a,disabled:p},l]}),d=Vl.useMemo(()=>({legendId:a,setLegendId:c,disabled:p}),[a,c,p]);return v(Cv.Provider,{value:d,children:m})});var IO=T(M(),1);var MO=IO.forwardRef(function(t,o){let{render:r,className:n,style:s,id:i,...l}=t,{disabled:a,setLegendId:c}=va(),u=ia(i,c);return _("div",t,{state:{disabled:a},ref:o,props:[{id:u},l]})});var Tv={};ae(Tv,{disabled:()=>x$});var x$="data-disabled";var Br=T(M(),1);var _x=Br.forwardRef(function(t,o){let{render:r,className:n,validationMode:s="onSubmit",errors:i,onSubmit:l,onFormSubmit:a,actionsRef:c,style:u,...p}=t,f=Br.useRef({fields:new Map}),m=Br.useRef(null),d=Br.useRef(!1),R=Br.useRef(0),g=j(()=>{let S=!1,E=null;for(let P of f.current.fields.values()){if(P.validityData.state.valid!==!1)continue;S=!0;let N=P.controlRef.current;N&&(!E||R$(N,E))&&(E=N)}return E?(E.focus(),E.tagName==="INPUT"&&E.select(),!0):S}),[b,x]=Br.useState(i);$t(i,()=>{x(i)}),Br.useEffect(()=>{d.current&&(d.current=!1,g())},[b,g]),Br.useImperativeHandle(c,()=>({validate(S){S?Array.from(f.current.fields.values()).find(E=>E.name===S)?.validate():f.current.fields.forEach(E=>{E.validate()})}}),[]);let h=_("form",t,{ref:[o,m],props:[{noValidate:!0,onSubmit(S){if(R.current+=1,f.current.fields.forEach(E=>{E.validate()}),g()){S.preventDefault();return}if(d.current=!0,l?.(S),a){S.preventDefault();let E={};f.current.fields.forEach(P=>{P.name&&(E[P.name]=P.getValue())}),a(E,to(U.none,S.nativeEvent))}}},p]}),y=j(S=>{S&&x(E=>{if(!E||!Object.hasOwn(E,S))return E;let P={...E};return delete P[S],P})}),C=Br.useMemo(()=>({elementRef:m,formRef:f,validationMode:s,errors:b??qe,clearErrors:y,submitCountRef:R}),[f,s,b,y]);return v(wC.Provider,{value:C,children:h})});function R$(e,t){let o=e.compareDocumentPosition(t);return(o&Node.DOCUMENT_POSITION_DISCONNECTED)===0&&(o&Node.DOCUMENT_POSITION_FOLLOWING)!==0}var DO=T(M(),1);var Bx=DO.forwardRef(function(t,o){return v(mn.Control,{ref:o,...t})});var wv={};ae(wv,{dirty:()=>v$,disabled:()=>h$,filled:()=>E$,focused:()=>S$,invalid:()=>C$,touched:()=>y$,valid:()=>b$});var h$="data-disabled",b$="data-valid",C$="data-invalid",y$="data-touched",v$="data-dirty",E$="data-filled",S$="data-focused";var rs=T(M(),1);var AO=T(M(),1);var fc=T(M(),1);var pc="data-composite-item-active";function NO(e){let{loopFocus:t=!0,orientation:o="both",grid:r,onLoop:n,direction:s,highlightedIndex:i,onHighlightedIndexChange:l,rootRef:a,enableHomeAndEndKeys:c=!1,stopEventPropagation:u,disabledIndices:p,modifierKeys:f=yt}=e,[m,d]=fc.useState(0),R=r!=null,g=fc.useRef(null),b=kt(g,a),x=fc.useRef([]),h=fc.useRef(!1),y=fc.useRef(null),C=i??m,S=j((D,G=!1)=>{if(y.current=x.current[D]??null,(l??d)(D),G){let I=x.current[D];dC(g.current,I,s,o)}}),E=j(D=>{if(D.size===0)return;if(h.current){let A=x.current,L=A.indexOf(y.current);if(L===-1){let X=A[C];!X||Wn(A,C,p)?S(P$(A,p)):y.current=X}else L!==C&&S(L);return}h.current=!0;let G=Array.from(D.keys()),I=G.find(A=>A?.hasAttribute(pc))??null,O=I?D.get(I)?.index??-1:-1;if(O!==-1)S(O);else if(Wn(G,C,p)){let A=sr(G,{disabledIndices:p});sn(G,A)||S(A)}dC(g.current,I,s,o)});z(()=>{if(p==null||i!=null||!h.current)return;let D=x.current;if(Wn(D,C,p)){let G=sr(D,{disabledIndices:p});sn(D,G)||S(G)}},[p,i,C,x,S]);let P=j((D,G,I)=>n?n(D,G,I,x):I),N=j(D=>{let G=D.key===Xc||D.key===qc;if(!Fr.has(D.key)||!c&&G||T$(D,f)||!g.current)return;let O=s==="rtl",A=O?zc:$c,L=O?$c:zc,X=o==="vertical"?Kc:A,F=o==="vertical"?Yc:L,B=$e(D.nativeEvent);if(B!=null&&fC(B)&&!Hg(B)){let K=B.selectionStart,Z=B.selectionEnd,ee=B.value;if(K==null||D.shiftKey||K!==Z||D.key!==F&&K<ee.length||D.key!==X&&K>0)return}let k=C,Y=jn(x,p),V=hs(x,p);r!=null&&(k=r({disabledIndices:p,elementsRef:x,event:D,highlightedIndex:C,loopFocus:t,maxIndex:V,minIndex:Y,onLoop:P,orientation:o,rtl:O}));let q=o!=="vertical"&&D.key===A||o!=="horizontal"&&D.key===Kc,H=o!=="vertical"&&D.key===L||o!=="horizontal"&&D.key===Yc;c&&(D.key===Xc?k=Y:D.key===qc&&(k=V)),k===C&&(q||H)&&(t&&k===V&&q?(k=Y,n&&(k=n(D,C,k,x))):t&&k===Y&&H?(k=V,n&&(k=n(D,C,k,x))):k=sr(x.current,{startingIndex:k,decrement:H,disabledIndices:p})),k!==C&&!sn(x.current,k)&&(u&&D.stopPropagation(),(R||G||q||H)&&D.preventDefault(),S(k,!0),queueMicrotask(()=>{x.current[k]?.focus()}))});return{props:{ref:b,onFocus(D){let G=g.current,I=$e(D.nativeEvent);!G||I==null||!fC(I)||I.setSelectionRange(0,I.value.length)},onKeyDown:N},highlightedIndex:C,onHighlightedIndexChange:S,elementsRef:x,onMapChange:E,relayKeyboardEvent:N}}function P$(e,t){let o=-1;for(let r=0;r<e.length;r+=1){let n=e[r];if(!(!n||Wn(e,r,t))){if(n.hasAttribute(pc))return r;o===-1&&(o=r)}}return Math.max(o,0)}function T$(e,t){for(let o of cM)if(!t.includes(o)&&e.getModifierState(o))return!0;return!1}function Hr(e){let{render:t,className:o,style:r,refs:n=yt,props:s=yt,state:i=qe,stateAttributesMapping:l,highlightedIndex:a,onHighlightedIndexChange:c,orientation:u,grid:p,loopFocus:f,onLoop:m,enableHomeAndEndKeys:d,onMapChange:R,stopEventPropagation:g=!0,rootRef:b,disabledIndices:x,modifierKeys:h,highlightItemOnHover:y=!1,tag:C="div",...S}=e,E=At(),{props:P,highlightedIndex:N,onHighlightedIndexChange:w,elementsRef:D,onMapChange:G,relayKeyboardEvent:I}=NO({grid:p,loopFocus:f,onLoop:m,orientation:u,highlightedIndex:a,onHighlightedIndexChange:c,rootRef:b,stopEventPropagation:g,enableHomeAndEndKeys:d,direction:E,disabledIndices:x,modifierKeys:h}),O=_(C,e,{state:i,ref:n,props:[P,...s,S],stateAttributesMapping:l}),A=AO.useMemo(()=>({highlightedIndex:N,onHighlightedIndexChange:w,highlightItemOnHover:y,relayKeyboardEvent:I}),[N,w,y,I]);return v(ob.Provider,{value:A,children:v(Jo,{elementsRef:D,onMapChange:L=>{R?.(L),G(L)},children:O})})}var Hx={};ae(Hx,{hasSubmenuOpen:()=>Iv,modal:()=>w$,orientation:()=>I$});var w$="data-modal",I$="data-orientation",Iv="data-has-submenu-open";var M$={hasSubmenuOpen(e){return e?{[Iv]:""}:null}},Ux=rs.forwardRef(function(t,o){let{orientation:r="horizontal",loopFocus:n=!0,render:s,className:i,modal:l=!0,disabled:a=!1,id:c,style:u,...p}=t,[f,m]=rs.useState(null),[d,R]=rs.useState(!1),g=je(c),b={orientation:r,modal:l,hasSubmenuOpen:d},x=rs.useRef(!1),h=rs.useMemo(()=>({contentElement:f,setContentElement:m,setHasSubmenuOpen:R,hasSubmenuOpen:d,modal:l,disabled:a,orientation:r,allowMouseUpTriggerRef:x,rootId:g}),[f,d,l,a,r,g]);return v(Oy.Provider,{value:h,children:v(Yn,{children:v(D$,{children:v(Hr,{render:s,className:i,style:u,state:b,stateAttributesMapping:M$,refs:[o,m],props:[{role:"menubar",id:g,"aria-orientation":r},p],orientation:r,loopFocus:n,enableHomeAndEndKeys:!0,highlightItemOnHover:d})})})})});function D$(e){let t=cn(),{events:o}=Po(),r=da();return rs.useEffect(()=>{function n(s){!s.nodeId||s.parentNodeId!==t||(s.open?r.hasSubmenuOpen||r.setHasSubmenuOpen(!0):s.reason!==U.siblingOpen&&s.reason!==U.listNavigation&&r.setHasSubmenuOpen(!1))}return o.on("menuopenchange",n),()=>{o.off("menuopenchange",n)}},[o,t,r]),v(ln,{id:t,children:e.children})}var mi={};ae(mi,{Indicator:()=>_O,Label:()=>GO,Root:()=>VO,Track:()=>LO,Value:()=>HO});var Sa=T(M(),1);var OO=new Map;function dc(e,t){let o=JSON.stringify({locale:Ju(e),options:t}),r=OO.get(o);if(r)return r;let n=new Intl.NumberFormat(e,t);return OO.set(o,n),n}function tr(e,t,o){return e==null?"":dc(t,o).format(e)}var Gx=T(M(),1),Mv=Gx.createContext(void 0);function Ll(){let e=Gx.useContext(Mv);if(e===void 0)throw new Error(Me(38));return e}function di(e,t,o){return(e-t)*100/(o-t)}var VO=Sa.forwardRef(function(t,o){let{format:r,getAriaValueText:n,locale:s,max:i=100,min:l=0,value:a,render:c,className:u,children:p,style:f,...m}=t,[d,R]=Sa.useState(),g=di(a,l,i),b=gt(Number.isNaN(g)?0:g,0,100),x=gt(Number.isNaN(a)?l:a,l,i),h=r?tr(x,s,r):tr(b/100,s,{style:"percent"}),y=h;n&&(y=n(h,a));let C={"aria-labelledby":d,"aria-valuemax":i,"aria-valuemin":l,"aria-valuenow":x,"aria-valuetext":y,role:"meter",children:v(Sa.Fragment,{children:[p,v("span",{role:"presentation",style:co,children:"x"})]})},S=Sa.useMemo(()=>({formattedValue:h,percentageValue:b,setLabelId:R,value:a}),[h,b,R,a]),E=_("div",t,{ref:o,props:[C,m]});return v(Mv.Provider,{value:S,children:E})});var FO=T(M(),1);var LO=FO.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t;return _("div",t,{ref:o,props:i})});var kO=T(M(),1);var _O=kO.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,{percentageValue:l}=Ll();return _("div",t,{ref:o,props:[{style:{insetInlineStart:0,height:"inherit",width:`${l}%`}},i]})});var BO=T(M(),1);var HO=BO.forwardRef(function(t,o){let{className:r,render:n,children:s,style:i,...l}=t,{value:a,formattedValue:c}=Ll();return _("span",t,{ref:o,props:[{"aria-hidden":!0,children:typeof s=="function"?s(c,a):c},l]})});var UO=T(M(),1);var GO=UO.forwardRef(function(t,o){let{render:r,className:n,style:s,id:i,...l}=t,{setLabelId:a}=Ll(),c=ia(i,a);return _("span",t,{ref:o,props:[{id:c,role:"presentation"},l]})});var xr={};ae(xr,{Arrow:()=>pV,Backdrop:()=>aV,Content:()=>XO,Icon:()=>gV,Item:()=>KO,Link:()=>dV,List:()=>YO,Popup:()=>lV,Portal:()=>eV,Positioner:()=>rV,Root:()=>WO,Trigger:()=>JO,Viewport:()=>sV});var eo=T(M(),1);var kl=T(M(),1),Dv=kl.createContext(void 0);function so(e){let t=kl.useContext(Dv);if(t===void 0&&!e)throw new Error(Me(41));return t}var Nv=kl.createContext(void 0);function Ws(){return kl.useContext(Nv)}var _l={};ae(_l,{anchorHeight:()=>V$,anchorWidth:()=>O$,availableHeight:()=>A$,availableWidth:()=>N$,positionerHeight:()=>xi,positionerWidth:()=>gi,transformOrigin:()=>F$});var N$="--available-width",A$="--available-height",O$="--anchor-width",V$="--anchor-height",F$="--transform-origin",gi="--positioner-width",xi="--positioner-height";var Mp={};ae(Mp,{popupHeight:()=>hi,popupWidth:()=>Ri});var Ri="--popup-width",hi="--popup-height";function Bl(e,t,o,r){e.style.setProperty(Ri,`${o}px`),e.style.setProperty(hi,`${r}px`),t.style.setProperty(gi,`${o}px`),t.style.setProperty(xi,`${r}px`)}var L$=new Set([U.triggerHover,U.outsidePress,U.focusOut]);function k$(e){let t=parseFloat(e.style.getPropertyValue(gi))||0,o=parseFloat(e.style.getPropertyValue(xi))||0;return t<=0||o<=0?null:{width:t,height:o}}var WO=eo.forwardRef(function(t,o){let{defaultValue:r=null,value:n,onValueChange:s,actionsRef:i,delay:l=50,closeDelay:a=50,orientation:c="horizontal",onOpenChangeComplete:u}=t,p=ar()!=null,f=so(!0),[m,d]=Nt({controlled:n,default:r,name:"NavigationMenu",state:"value"}),R=m!=null,g=eo.useRef(void 0),b=eo.useRef(null),[x,h]=eo.useState(null),[y,C]=eo.useState(null),[S,E]=eo.useState(null),[P,N]=eo.useState(null),[w,D]=eo.useState(null),[G,I]=eo.useState(void 0),[O,A]=eo.useState(!1),L=eo.useRef(null),X=eo.useRef(null),F=eo.useRef(null),B=eo.useRef(null),k=eo.useRef(null),Y=eo.useRef(null),V=eo.useRef({abortController:null,owner:null}),[q,H]=eo.useState(!1),{mounted:K,transitionStatus:Z,preventUnmountingOnClose:ee,forceUnmount:Q}=zi({open:R,ref:{current:y},preventUnmountOnClose:q,setPreventUnmountOnClose:H,onUnmount(){let re=Fe(b.current),$=ct(re);!(g.current?L$.has(g.current):!1)&&tt(L.current)&&($===Fe(y).body||Ee(y,$))&&y&&(L.current.focus({preventScroll:!0}),L.current=void 0),u?.(!1),D(null),I(void 0),X.current=null,g.current=void 0}});St({enabled:K&&!R&&!ee,open:R,ref:{current:P},onComplete(){R||Q()}}),z(()=>{if(R||!x||!y)return;let re=k$(x);re&&Bl(y,x,re.width,re.height)},[R,y,x]),eo.useEffect(()=>{A(!1)},[m]);let te=j((re,$)=>{re==null&&(g.current=$.reason);let ie=$,le=Kn(ie);re!==m&&s?.(re,ie),!$.isCanceled&&(re==null&&(m!=null&&H(le()),D(null),I(void 0)),d(re),p&&re==null&&$.reason===U.linkPress&&f&&f.setValue(null,$))});eo.useImperativeHandle(i,()=>({unmount:Q,close:()=>te(null,fe(U.imperativeAction))}),[Q,te]);let de=R?w:null,ue=eo.useMemo(()=>({open:R,value:m,setValue:te,mounted:K,transitionStatus:Z,positionerElement:x,setPositionerElement:h,popupElement:y,setPopupElement:C,viewportElement:S,setViewportElement:E,viewportTargetElement:P,setViewportTargetElement:N,activationDirection:de,setActivationDirection:D,floatingRootContext:G,setFloatingRootContext:I,currentContentRef:X,nested:p,rootRef:b,beforeInsideRef:F,afterInsideRef:B,beforeOutsideRef:k,afterOutsideRef:Y,prevTriggerElementRef:L,popupAutoSizeResetRef:V,delay:l,closeDelay:a,orientation:c,viewportInert:O,setViewportInert:A}),[R,m,te,K,Z,x,y,S,P,de,G,p,l,a,c,O]),J=v(Dv.Provider,{value:ue,children:v(_$,{componentProps:t,forwardedRef:o,children:t.children})});return p?J:v(Yn,{children:J})});function _$(e){let{className:t,render:o,defaultValue:r,value:n,onValueChange:s,actionsRef:i,delay:l,closeDelay:a,orientation:c,onOpenChangeComplete:u,style:p,...f}=e.componentProps,m=cn(),{rootRef:d,nested:R,open:g}=so(),b={open:g,nested:R},x=_(R?"div":"nav",e.componentProps,{state:b,ref:[e.forwardedRef,d],props:f});return v(Nv.Provider,{value:m,children:v(ln,{id:m,children:x})})}var Kx=T(M(),1);var Wx="data-base-ui-navigation-menu-trigger";var jx=T(M(),1),Yx=jx.createContext(void 0);function jO(){return jx.useContext(Yx)}function Hl(){return new Xi({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new Mo,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}var YO=Kx.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,l=Ws(),{orientation:a,open:c,floatingRootContext:u,positionerElement:p,value:f,closeDelay:m,viewportElement:d,nested:R}=so(),g=Kx.useMemo(()=>Hl(),[]),b=u||g,x=p!=null||f==null,h=p!=null||d!=null||f==null;Xn(b,{enabled:!!u&&h,closeDelay:m,nodeId:l});let y=ur(b,{enabled:x,outsidePressEvent:"intentional",outsidePress(w){let D=$e(w);return Wt(D,`[${Wx}]`)===null}}),C=u?y:void 0,S={open:c},E=R?qe:{onKeyDown(w){(a==="horizontal"&&(w.key==="ArrowLeft"||w.key==="ArrowRight")||a==="vertical"&&(w.key==="ArrowUp"||w.key==="ArrowDown"))&&w.stopPropagation()}},P=[C?.floating||qe,E,i],N=_("ul",t,{state:S,ref:o,props:P,enabled:R});return R?v(Yx.Provider,{value:C,children:N}):v(Yx.Provider,{value:C,children:v(Hr,{render:r,className:n,style:s,state:S,refs:[o],props:P,loopFocus:!1,orientation:a,tag:"ul"})})});var $x=T(M(),1);var zx=T(M(),1),Av=zx.createContext(void 0);function Ul(){let e=zx.useContext(Av);if(!e)throw new Error(Me(39));return e}var KO=$x.forwardRef(function(t,o){let{render:r,className:n,style:s,value:i,...l}=t,a=je(),c=i??a,u=_("li",t,{ref:o,props:l}),p=$x.useMemo(()=>({value:c}),[c]);return v(Av.Provider,{value:p,children:u})});var mc=T(M(),1),$O=T($o(),1);var Xx={};ae(Xx,{activationDirection:()=>Ov,closed:()=>H$,endingStyle:()=>G$,open:()=>B$,startingStyle:()=>U$});var B$=ce.open,H$=ce.closed,U$=ce.startingStyle,G$=ce.endingStyle,Ov="data-activation-direction";var zO={...Qt,...Ot,activationDirection(e){return e?{[Ov]:e}:null}},XO=mc.forwardRef(function(t,o){let{render:r,className:n,style:s,keepMounted:i=!1,...l}=t,{mounted:a,viewportElement:c,value:u,activationDirection:p,currentContentRef:f,viewportTargetElement:m}=so(),{value:d}=Ul(),R=Ws(),g=a&&u===d,b=mc.useRef(null),[x,h]=mc.useState(!1),[y,C]=mc.useState(!1),{mounted:S,setMounted:E,transitionStatus:P}=Xt(g);S&&!a&&E(!1),St({ref:b,open:g,onComplete(){g||E(!1)}}),z(()=>{g&&b.current&&(f.current=b.current)},[g,f]);let N={open:g,transitionStatus:P,activationDirection:p},w=j(L=>{L&&g&&(f.current=L)}),D={onFocus(L){$e(L.nativeEvent)?.hasAttribute("data-base-ui-focus-guard")||C(!0)},onBlur(L){Ee(L.currentTarget,L.relatedTarget)||C(!1)}},G=!g&&S?{style:{position:"absolute",top:0,left:0},inert:ko(!y),...D}:D,I=m||c,O=i&&!S,A=i&&!I&&!x;return i&&I&&!x&&h(!0),A?v(Hr,{render:r,className:n,style:s,state:N,refs:[o],props:[G,{hidden:!0},l],stateAttributesMapping:zO}):!I||!S&&!i?null:$O.createPortal(v(ln,{id:R,children:v(Hr,{render:r,className:n,style:s,state:N,refs:[o,b,w],props:[G,O?{hidden:!0}:qe,l],stateAttributesMapping:zO})}),I)});var Ro=T(M(),1),Jx=T($o(),1);function qx({currentTarget:e,relatedTarget:t},o){let{popupElement:r,rootRef:n,tree:s,nodeId:i}=o,l=s?Kr(s.nodesRef.current,i).some(a=>Ee(a.context?.elements.floating,t)):!1;return r?!Ee(r,e)&&!Ee(r,t)&&!Ee(n.current,t)&&!l:!Ee(n.current,t)&&!l}var qO={width:0,height:0},JO=Ro.forwardRef(function(t,o){let{render:r,className:n,style:s,nativeButton:i=!0,disabled:l=!1,...a}=t,{value:c,setValue:u,mounted:p,open:f,positionerElement:m,setActivationDirection:d,setFloatingRootContext:R,popupElement:g,viewportElement:b,transitionStatus:x,rootRef:h,beforeOutsideRef:y,afterOutsideRef:C,afterInsideRef:S,beforeInsideRef:E,prevTriggerElementRef:P,popupAutoSizeResetRef:N,currentContentRef:w,delay:D,closeDelay:G,orientation:I,setViewportInert:O,nested:A}=so(),{value:L}=Ul(),X=Ws(),F=Po(),B=jO(),k=At(),Y=it(),V=ao(),q=ao(),H=ao(),[K,Z]=Ro.useState(null),[ee,Q]=Ro.useState(!0),[te,de]=Ro.useState(""),ue=Ro.useRef(null),J=Ro.useRef(qO),re=Ro.useRef(!1),$=f&&c===L,ie=Et($),le=(m!=null||c==null)&&!l,he=m||b,Pe=(he!=null||c==null)&&!l,ge=jr(g),Ce=Ro.useCallback(pe=>{ue.current=pe,Z(pe)},[]),W=j((pe=!1)=>{!pe&&N.current.owner!==L||(N.current.abortController?.abort(),N.current.abortController=null,N.current.owner=null)});z(()=>{$||(V.cancel(),H.cancel(),W())},[$,V,H,W]);function me(pe){pe.style.setProperty(Ri,"auto"),pe.style.setProperty(hi,"auto")}function xe(pe,we){pe.style.removeProperty(Ri),pe.style.removeProperty(hi),we.style.removeProperty(gi),we.style.removeProperty(xi)}function ve(pe){W(!0);let we=new AbortController;N.current.abortController=we,N.current.owner=L,ge(()=>{N.current.abortController=null,N.current.owner=null,me(pe)},we.signal)}let ne=j((pe,we,Oe,Le)=>{W(!0),xe(pe,we);let{width:Je,height:Be}=Tn(pe),nt=Je||J.current.width,at=Be||J.current.height;(Le===0||Oe===0)&&(Oe=nt,Le=at),pe.style.setProperty(Ri,`${Oe}px`),pe.style.setProperty(hi,`${Le}px`),we.style.setProperty(gi,`${nt}px`),we.style.setProperty(xi,`${at}px`),H.request(()=>{ie.current&&(pe.style.setProperty(Ri,`${nt}px`),pe.style.setProperty(hi,`${at}px`),ve(pe))})}),oe=j((pe,we,Oe,Le)=>{H.cancel(),V.cancel(),W(!0),!(Oe===0||Le===0)&&(Bl(pe,we,Oe,Le),V.request(()=>{V.request(()=>{xe(pe,we);let{width:Je,height:Be}=Tn(pe),nt=Je||Oe,at=Be||Le;Bl(pe,we,Oe,Le),H.request(()=>{ie.current&&(Bl(pe,we,nt,at),ve(pe))})})}))}),ye=j((pe,we)=>{H.cancel(),W(!0),xe(pe,we);let{width:Oe,height:Le}=Tn(pe);Oe===0||Le===0||(J.current={width:Oe,height:Le},me(pe),we.style.setProperty(gi,`${Oe}px`),we.style.setProperty(xi,`${Le}px`))}),be=j(pe=>{let we=pe.style.getPropertyValue(Ri),Oe=pe.style.getPropertyValue(hi);return we!==""&&we!=="auto"&&Oe!==""&&Oe!=="auto"?{size:{width:pe.offsetWidth||J.current.width,height:pe.offsetHeight||J.current.height},syncPositioner:!0}:{size:J.current,syncPositioner:!1}});Ro.useEffect(()=>{f||(Y.clear(),V.cancel(),q.cancel(),H.cancel(),W(!0),re.current=!1,de(""))},[Y,f,V,q,H,W]),Ro.useEffect(()=>{p||(J.current=qO)},[p]),z(()=>{if(!g||typeof ResizeObserver!="function")return;let pe=new ResizeObserver(()=>{J.current={width:g.offsetWidth,height:g.offsetHeight}});return pe.observe(g),()=>{pe.disconnect()}},[g]),Ro.useEffect(()=>{if(!f||!$||!g||!m)return;let pe=g,we=m,Oe=Ze(we);function Le(){q.cancel(),q.request(()=>ye(pe,we))}let Je=Ye(Oe,"resize",Le);return()=>{q.cancel(),Je()}},[f,$,g,m,q,ye]),Ro.useEffect(()=>{let pe=w.current;if(!pe||!g||!m||!$||typeof MutationObserver!="function")return;let we=new MutationObserver(()=>{if(x==="starting"||g.hasAttribute(bt.startingStyle)){ye(g,m);return}let{size:Oe,syncPositioner:Le}=be(g);if(Le){oe(g,m,Oe.width,Oe.height);return}ne(g,m,Oe.width,Oe.height)});return we.observe(pe,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:["hidden"]}),()=>{we.disconnect()}},[w,g,m,$,x,be,oe,ne,ye]),z(()=>{if(ie.current&&f&&g&&m){if(re.current){re.current=!1;return}let{width:pe,height:we}=Tn(g);ne(g,m,pe,we)}},[w,ne,ie,f,g,m,x]);function se(pe,we){let Oe=we.reason===U.triggerHover;if(!le||te==="touch"&&Oe||!pe&&c!==L)return;function Le(){Oe&&(Q(!0),Y.clear(),Y.start(500,()=>{Q(!1)})),pe?u(L,we):(u(null,we),de(""))}Oe?Jx.flushSync(Le):Le()}let Ne=$n({open:f,onOpenChange:se,elements:{reference:K,floating:he}}),Ae=qi(Ne),Ve=te!=="touch";Ro.useEffect(()=>(f||(Ne.context.dataRef.current.openEvent=void 0,Ae.pointerType=void 0,Ae.interactedInside=!1,Ae.restTimeoutPending=!1,Ae.openChangeTimeout.clear(),Ae.restTimeout.clear()),()=>{Ds(Ae)}),[Ne,Ae,f]);let Te=j(()=>!A||m||!ue.current||!he?null:j$(ue.current,he,X));function De(){return A&&m?null:Wt(ue.current,"ul")}let ze=pn(Ne,{enabled:Pe,move:!1,handleClose:fn({blockPointerEvents:Ve,getScope:De}),restMs:p&&m?0:D,delay:{close:G},triggerElementRef:ue,getHandleCloseContext:Te}),We=Ro.useMemo(()=>ze?{reference:ze}:void 0,[ze]),Ge=lr(Ne,{enabled:le,stickIfOpen:ee,toggle:$}),He=Ro.useMemo(()=>Pt(Ge.reference,We?.reference),[Ge.reference,We]);z(()=>{$&&(R(Ne),P.current=K)},[$,Ne,R,P,K]);function Ue(pe){Jx.flushSync(()=>{let we=pe.currentTarget,Oe=P.current?.getBoundingClientRect();if(p&&Oe&&K){let Le=K.getBoundingClientRect(),Je=Le.left>Oe.left,Be=Le.top>Oe.top;I==="horizontal"&&Le.left!==Oe.left?d(Je?"right":"left"):I==="vertical"&&Le.top!==Oe.top&&d(Be?"down":"up")}if(pe.type!=="click"&&c!=null&&(Ne.context.dataRef.current.openEvent=void 0),!(te==="touch"&&pe.type!=="click")&&(c!=null&&pe.type!=="keydown"&&u(L,fe(pe.type==="mouseenter"?U.triggerHover:U.triggerPress,pe.nativeEvent)),pe.type==="mouseenter"&&Ve&&(!A||!m)&&he)){let Le=()=>{let Je=De()??we.ownerDocument.body;Bc(Ae,{scopeElement:Je,referenceElement:we,floatingElement:he})};c!=null&&c!==L?queueMicrotask(Le):Le()}})}let rt=j(pe=>{if(l)return;if(!g||!m){Ue(pe);return}let{width:we,height:Oe}=Tn(g),Le=c!=null&&c!==L&&(pe.type==="click"||te!=="touch");Ue(pe),Le&&(re.current=!0),ne(g,m,we,Oe)}),et={open:$,disabled:l};function pt(pe){de(pe.pointerType)}function wt(pe){pt(pe),Ds(Ae)}let Se={tabIndex:0,onMouseEnter:rt,onClick:rt,onPointerEnter:pt,onPointerDown:wt,"aria-expanded":$,"aria-controls":$?g?.id:void 0,[Wx]:"",onFocus(){$&&O(!1)},onMouseLeave(){c==null&&Ds(Ae)},onKeyDown(pe){if(A)return;let we=k==="rtl"?"ArrowLeft":"ArrowRight",Oe=I==="horizontal"&&pe.key==="ArrowDown",Le=I==="vertical"&&pe.key===we;(Oe||Le)&&(u(L,fe(U.listNavigation,pe.nativeEvent)),rt(pe),xt(pe))},onBlur(pe){m&&g&&qx({currentTarget:pe.currentTarget,relatedTarget:pe.relatedTarget},{popupElement:g,rootRef:h,tree:F,nodeId:X})&&u(null,fe(U.focusOut,pe.nativeEvent))}},{getButtonProps:ke,buttonRef:Ie}=ft({disabled:l,focusableWhenDisabled:!0,native:i}),_e=he;return v(Ro.Fragment,{children:[v(Tr,{tag:"button",render:r,className:n,style:s,state:et,stateAttributesMapping:rn,refs:[o,Ce,Ie],props:[He,B?.reference||yt,Se,a,ke]}),$&&v(Ro.Fragment,{children:[v(Fo,{ref:y,onFocus:pe=>{_e&&ir(pe,_e)?E.current?.focus():Gi(K)?.focus()}}),v("span",{"aria-owns":b?.id,style:od}),v(Fo,{ref:C,onFocus:pe=>{if(_e&&ir(pe,_e))Jx.flushSync(()=>{O(!1)}),(S.current||K)?.focus();else{let we=Ui(K);A&&!m&&_e&&we&&Ee(_e,we)&&(we=Jf(S.current,1)),we?.focus(),(!A||m)&&!Ee(h.current,we)&&u(null,fe(U.focusOut,pe.nativeEvent))}}})]})]})});function W$(e,t){let o=e.getBoundingClientRect(),r=t.getBoundingClientRect(),n=o.left+o.width/2,s=o.top+o.height/2,i=r.left+r.width/2,l=r.top+r.height/2,a=i-n,c=l-s;return Math.abs(a)>=Math.abs(c)?a>=0?"right":"left":c>=0?"bottom":"top"}function j$(e,t,o){return{placement:W$(e,t),elements:{domReference:e,floating:t},nodeId:o}}var ZO=T(M(),1);var Qx=T(M(),1),Vv=Qx.createContext(void 0);function QO(){let e=Qx.useContext(Vv);if(e===void 0)throw new Error(Me(40));return e}var eV=ZO.forwardRef(function(t,o){let{keepMounted:r=!1,...n}=t,{mounted:s}=so();return s||r?v(Vv.Provider,{value:r,children:v(an,{ref:o,...n})}):null});var bi=T(M(),1),oV=T($o(),1);function Y$(e){let t=$n(e);return mm({...e,rootContext:e.rootContext||t})}function tV(e){return BC(e,Y$)}var Zx=T(M(),1),Fv=Zx.createContext(void 0);function gc(e=!1){let t=Zx.useContext(Fv);if(!t&&!e)throw new Error(Me(42));return t}var K$=Hl(),rV=bi.forwardRef(function(t,o){let{open:r,mounted:n,positionerElement:s,setPositionerElement:i,floatingRootContext:l,nested:a,transitionStatus:c}=so(),{className:u,render:p,anchor:f,positionMethod:m="absolute",side:d="bottom",align:R="center",sideOffset:g=0,alignOffset:b=0,collisionBoundary:x="clipping-ancestors",collisionPadding:h=5,collisionAvoidance:y=a?bn:Wi,arrowPadding:C=5,sticky:S=!1,disableAnchorTracking:E=!1,style:P,...N}=t,w=QO(),D=Ws(),G=it(),I=it(),[O,A]=bi.useState(r),L=bi.useRef(r);bi.useEffect(()=>{if(!s)return;function Y(V){s&&ir(V)&&(V.type==="focusin"?wu:Qf)(s)}return So(Ye(s,"focusin",Y,!0),Ye(s,"focusout",Y,!0))},[s]);let X=(l||K$).useState("domReferenceElement"),F=tV({anchor:f??X,positionMethod:m,mounted:n,side:d,sideOffset:g,align:R,alignOffset:b,arrowPadding:C,collisionBoundary:x,collisionPadding:h,sticky:S,disableAnchorTracking:E,keepMounted:w,floatingRootContext:l,collisionAvoidance:y,shift:{rootBoundary:"layoutViewport"},nodeId:D,adaptiveOrigin:Bg}),B={open:r,side:F.side,align:F.align,anchorHidden:F.anchorHidden,instant:O};bi.useEffect(()=>{if(!r)return;L.current&&G.start(0,()=>{L.current=!1,I.isStarted()||A(!1)});function Y(){oV.flushSync(()=>{A(!0)}),I.start(100,()=>{A(!1)})}let V=Ze(s);return Ye(V,"resize",Y)},[r,G,I,s]);let k=Pr(t,B,{styles:F.positionerStyles,transitionStatus:c,props:N,refs:[o,i],hidden:!n,inert:!r});return v(Fv.Provider,{value:F,children:k})});var eR=T(M(),1);var z$=Hl();function nV({children:e}){let{beforeInsideRef:t,beforeOutsideRef:o,afterInsideRef:r,afterOutsideRef:n,positionerElement:s,viewportElement:i,floatingRootContext:l}=so(),a=!!gc(!0),c=s||i;return!l&&!a?e:v(eR.Fragment,{children:[v(Fo,{ref:t,onFocus:u=>{c&&ir(u,c)?Ui(c)?.focus():o.current?.focus()}}),e,v(Fo,{ref:r,onFocus:u=>{c&&ir(u,c)?Gi(c)?.focus():n.current?.focus()}})]})}var sV=eR.forwardRef(function(t,o){let{render:r,className:n,style:s,children:i,id:l,...a}=t,c=br(l),{setViewportElement:u,setViewportTargetElement:p,floatingRootContext:f,prevTriggerElementRef:m,viewportInert:d,setViewportInert:R}=so(),b=!!gc(!0),x=(f||z$).useState("domReferenceElement");z(()=>{x&&(m.current=x)},[x,m]);let h=_("div",t,{ref:[o,u],props:[{id:c,onBlur(y){let C=y.relatedTarget,S=y.currentTarget;C&&!Ee(S,C)&&C!==x&&R(!0)},...!b&&d&&{inert:ko(!0)},children:b?i:v(nV,{children:v("div",{ref:p,children:i})})},a]});return b?v(nV,{children:h}):h});var iV=T(M(),1);var aV=iV.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,{open:l,mounted:a,transitionStatus:c}=so();return _("div",t,{state:{open:l,transitionStatus:c},ref:o,props:[{role:"presentation",hidden:!a,style:{userSelect:"none",WebkitUserSelect:"none"}},i],stateAttributesMapping:ro})});var cV=T(M(),1);var lV=cV.forwardRef(function(t,o){let{render:r,className:n,style:s,id:i,...l}=t,{open:a,transitionStatus:c,setPopupElement:u}=so(),p=gc(),f=At(),m=je(i),d={open:a,transitionStatus:c,side:p.side,align:p.align,anchorHidden:p.anchorHidden},R=p.side==="left";f==="rtl"?R=R||p.side==="inline-end":R=R||p.side==="inline-start";let g=p.side==="top"||R;return _("nav",t,{state:d,ref:[o,u],props:[{id:m,tabIndex:-1,style:g?{position:"absolute",[p.side==="top"?"bottom":"top"]:"0",[R?"right":"left"]:"0"}:{}},Zo(c),l],stateAttributesMapping:ro})});var uV=T(M(),1);var pV=uV.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,{open:l,transitionStatus:a}=so(),{arrowRef:c,side:u,align:p,arrowUncentered:f,arrowStyles:m}=gc();return _("div",t,{state:{open:l,side:u,align:p,uncentered:f},ref:[o,c],props:[{style:m,"aria-hidden":!0},Zo(a),i],stateAttributesMapping:Qt})});var fV=T(M(),1);var dV=fV.forwardRef(function(t,o){let{className:r,render:n,active:s=!1,closeOnClick:i=!1,style:l,...a}=t,{setValue:c,popupElement:u,positionerElement:p,rootRef:f}=so(),m=Ws(),d=Po();return v(Tr,{tag:"a",render:n,className:r,style:l,state:{active:s},refs:[o],props:[{"aria-current":s?"page":void 0,tabIndex:void 0,onClick(b){i&&c(null,fe(U.linkPress,b.nativeEvent))},onBlur(b){p&&u&&qx({currentTarget:b.currentTarget,relatedTarget:b.relatedTarget},{popupElement:u,rootRef:f,tree:d,nodeId:m})&&c(null,fe(U.focusOut,b.nativeEvent))}},a]})});var mV=T(M(),1);var gV=mV.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,{value:l}=Ul(),{open:a,value:c}=so();return _("span",t,{state:{open:a&&c===l},ref:o,props:[{"aria-hidden":!0,children:"\u25BC"},i],stateAttributesMapping:yr})});var Lv={};ae(Lv,{disabled:()=>q$,popupOpen:()=>$$,pressed:()=>X$});var $$=Mt.popupOpen,X$=Mt.pressed,q$="data-disabled";var kv={};ae(kv,{align:()=>tX,anchorHidden:()=>Z$,closed:()=>Q$,instant:()=>oX,open:()=>J$,side:()=>eX});var J$=ce.open,Q$=ce.closed,Z$=ce.anchorHidden,eX=ce.side,tX=ce.align,oX="data-instant";var _v={};ae(_v,{closed:()=>nX,endingStyle:()=>iX,open:()=>rX,startingStyle:()=>sX});var rX=ce.open,nX=ce.closed,sX=ce.startingStyle,iX=ce.endingStyle;var Bv={};ae(Bv,{align:()=>dX,anchorHidden:()=>pX,closed:()=>cX,endingStyle:()=>uX,open:()=>aX,side:()=>fX,startingStyle:()=>lX});var aX=ce.open,cX=ce.closed,lX=ce.startingStyle,uX=ce.endingStyle,pX=ce.anchorHidden,fX=ce.side,dX=ce.align;var Hv={};ae(Hv,{align:()=>RX,closed:()=>gX,open:()=>mX,side:()=>xX,uncentered:()=>hX});var mX=ce.open,gX=ce.closed,xX=ce.side,RX=ce.align,hX="data-uncentered";var Uv={};ae(Uv,{active:()=>bX});var bX="data-active";var Gv={};ae(Gv,{popupOpen:()=>CX});var CX=Mt.popupOpen;var ns={};ae(ns,{Decrement:()=>VV,Group:()=>wV,Increment:()=>AV,Input:()=>FV,Root:()=>PV,ScrubArea:()=>BV,ScrubAreaCursor:()=>UV});var Ir=T(M(),1);var tR=T(M(),1),Wv=tR.createContext(void 0);function js(){let e=tR.useContext(Wv);if(e===void 0)throw new Error(Me(43));return e}var Mn={inputValue:()=>null,value:()=>null,...Lt};var yX="\u96F6\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",vX=/[٠-٩۰-۹0-9]/g,EX=/[零〇一二三四五六七八九]/g,RV=["%","\u066A","\uFF05","\uFE6A"],hV=["\u2030","\u0609"],SX="\uFF0E",PX="\uFF0C",TX=/[%٪%﹪]/,wX=/[‰؉]/,IX=/[%٪%﹪]/g,MX=/[‰؉]/g,DX=/[٠-٩۰-۹]/,NX=/[零〇一二三四五六七八九]/,AX=/[0-9٠-٩۰-۹0-9零〇一二三四五六七八九]/;function jv(e){return AX.test(e)}var bV=[".",",",SX,PX,"\u066B","\u066C"],CV=/\p{Zs}/u,yV=/\p{Cf}/u,OX=/\p{Cf}/gu,vV=["+","\uFF0B","\uFE62"],EV=["-","\u2212","\uFF0D","\u2012","\u2013","\u2014","\uFE63"],Dp=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");function xV(e,t){let[o,r="0"]=String(e).split("e");return+`${o}e${Number(r)+t}`}var Yv=/[-−-‒–—﹣]/gu,Kv=/[++﹢]/gu,oR=/[-−-‒–—﹣]/,zv=/[++﹢]/,VX=11111.1;function $v(e,t){return dc(e,t).formatToParts(VX)}function Np(e,t){let o=$v(e,t),r={};o.forEach(s=>{r[s.type]=s.value});let n=".";return dc(e).formatToParts(.1).forEach(s=>{s.type==="decimal"&&(n=s.value)}),{...r,decimal:n}}function Ci(e,t,o){let r=e.replace(OX,"").trim();r=r.replace(Yv,"-").replace(Kv,"+");let n=!1,s=(E,P)=>(P==="-"&&(n=!0),"");r=r.replace(/([+-])\s*$/,s).replace(/^\s*([+-])/,s);let i=t;i===void 0&&(DX.test(r)?i="ar":NX.test(r)&&(i="zh"));let{group:l,decimal:a,currency:c,exponentSeparator:u}=Np(i,o),p=dc(i,o).formatToParts(1).filter(E=>E.type==="unit").map(E=>Dp(E.value)),f=p.length?new RegExp(p.join("|"),"g"):null,m=null;l&&(/\p{Zs}/u.test(l)?m=/\p{Zs}/gu:l==="'"||l==="\u2019"?m=/['’]/g:m=new RegExp(Dp(l),"g"));let R=[[m,""],[new RegExp(Dp(a),"g"),"."],[/[.٫]/g,"."],[/[,٬]/g,""],[c?new RegExp(Dp(c),"g"):null,""],[f,""],[IX,""],[MX,""],[u?new RegExp(Dp(u),"g"):null,"e"],[vX,E=>String(E.charCodeAt(0)%16)],[EX,E=>String(Math.max(yX.indexOf(E)-1,0))]].reduce((E,[P,N])=>P?E.replace(P,N):E,r),g=R.lastIndexOf(".");if(g!==-1&&(R=`${R.slice(0,g).replace(/\./g,"")}.${R.slice(g+1).replace(/\./g,"")}`),/^[-+]?Infinity$/i.test(r)||r.includes("\u221E"))return null;let b=(n?"-":"")+R,x=parseFloat(b),h=o?.style,y=h==="unit"&&o?.unit==="percent",C=TX.test(e)||h==="percent";return wX.test(e)?x=xV(x,-3):!y&&C&&(x=xV(x,-2)),Number.isFinite(x)?x:null}var FX=1e-10,LX=1e-10;function rR(e){return e?.maximumFractionDigits!=null||e?.minimumFractionDigits!=null||e?.maximumSignificantDigits!=null||e?.minimumSignificantDigits!=null||e?.roundingIncrement!=null||e?.roundingMode!=null||e?.roundingPriority!=null}function Xv(e,t){if(!Number.isFinite(e))return e;if(!rR(t)){let s=parseFloat(e.toPrecision(15)),i=Math.abs(s-e),l=Math.min(Number.EPSILON*Math.max(1,Math.abs(e)),LX);return i<=l?s:e}let o=dc("en-US",{...t,signDisplay:"auto",currencySign:"standard",notation:t.notation==="compact"?"standard":t.notation,useGrouping:!1}),r=o.format(e),n=Ci(r,"en-US",t);return n===null?e:o.format(n)===r?n:e}function kX(e,t,o,r){let n=Math.abs(o),s=Math.sign(o),i=n*FX*s,l=e-t+i;if(r)return t+Math.round(l/o)*o;let a=s>0?Math.floor(l/n):Math.ceil(l/n);return t+a*n}function SV(e,t,o,r,n,s,i,l,a){if(e===null)return e;let c=e;if(t!=null&&i&&t!==0){let p=l||o===Number.MIN_SAFE_INTEGER?n:o;c=kX(c,p,t,l)}if(a&&(c=gt(c,o,r)),t==null&&!rR(s))return c;let u=Xv(c,s);return a?gt(u,o,r):u}var PV=Ir.forwardRef(function(t,o){let{id:r,min:n,max:s,smallStep:i=.1,step:l=1,largeStep:a=10,required:c=!1,disabled:u=!1,readOnly:p=!1,form:f,name:m,defaultValue:d=null,value:R,onValueChange:g,onValueCommitted:b,allowWheelScrub:x=!1,snapOnStep:h=!1,allowOutOfRange:y=!1,format:C,locale:S,render:E,className:P,inputRef:N,style:w,...D}=t,{setDirty:G,validityData:I,disabled:O,setFilled:A,name:L,state:X,validation:F}=mt(),{clearErrors:B}=Kt(),k=O||u,Y=L??m,V=l==="any"?1:l,[q,H]=Ir.useState(!1),K=n??Number.MIN_SAFE_INTEGER,Z=s??Number.MAX_SAFE_INTEGER,ee=n??0,Q=C?.style,te=Ir.useRef(null),de=kt(N,F.inputRef),ue=xo({id:r}),[J,re]=Nt({controlled:R,default:d,name:"NumberField",state:"value"}),$=Et(J);z(()=>{A(J!==null)},[A,J]);let ie=Oi(),le=Et(C),he=Ir.useRef(!1),Pe=j((Te,De)=>{he.current=!1,b?.(Te,De)}),ge=Ir.useRef(!0),Ce=Ir.useRef(null),[W,me]=Ir.useState(()=>tr(J,S,C)),[xe,ve]=Ir.useState("numeric"),ne=j(()=>{let Te=$v(S,C),De=new Set(bV),ze=Ue=>Ue.forEach(rt=>De.add(rt)),We=Te.find(Ue=>Ue.type==="decimal")?.value??Np(S,C).decimal;De.add(We),Te.forEach(Ue=>{Ue.type==="integer"||Ue.type==="fraction"||Ue.type==="exponentInteger"||Ue.type==="compact"||(ze(Array.from(Ue.value)),CV.test(Ue.value)&&De.add(" "))});let Ge=Q==="percent"||Q==="unit"&&C?.unit==="percent",He=Q==="percent"||Q==="unit"&&C?.unit==="permille";return Ge&&ze(RV),He&&ze(hV),ze(vV),(K<0||y)&&ze(EV),De}),oe=j(Te=>Te?.altKey?i:Te?.shiftKey?a:V),ye=j((Te,De)=>{let ze=De.event,We=De.direction,Ge=De.reason.startsWith("input-")||De.reason===U.none,He=!y||!Ge,Ue=SV(Te,We?oe(ze)*We:void 0,K,Z,ee,le.current,h,ze?.altKey??!1,He),rt=Ue!==J||Ge&&(Te!==J||ge.current===!1);if(rt){if(g?.(Ue,De),De.isCanceled)return!1;re(Ue),G(Ue!==I.initialValue),he.current=!0}return Ce.current=Ue,ge.current&&me(tr(Ue,S,C)),ie(),rt}),be=j((Te,{direction:De,currentValue:ze,event:We,reason:Ge})=>{let He=ze??$.current,Ue=We;return typeof He!="number"?ye(0,fe(Ge,Ue)):ye(He+Te*De,fe(Ge,Ue,void 0,{direction:De}))});z(function(){if(!ge.current)return;let De=tr(J,S,C);De!==W&&me(De)}),z(function(){if(!dt.os.ios)return;let De="text";K>=0&&(De="decimal"),ve(De)},[K]);let se=j(()=>{let Te=te.current;if(!Te)return;let De=Te.value.length;Te.setSelectionRange(De,De),Te.focus()});Ir.useEffect(function(){let De=te.current;if(k||p||!x||!De)return;function ze(We){if(We.ctrlKey||ct(Fe(te.current))!==te.current)return;let Ge=Math.abs(We.deltaX)>Math.abs(We.deltaY),He=We.shiftKey&&Ge?We.deltaX:We.deltaY;if(He===0||!We.shiftKey&&Ge)return;We.preventDefault(),ge.current=!0;let Ue=oe(We);be(Ue,{direction:He>0?-1:1,event:We,reason:U.wheel})&&Pe(Ce.current,to(U.wheel,We))}return Ye(De,"wheel",ze)},[x,be,k,p,oe,Pe,Ce,$]);let Ne=Ir.useMemo(()=>({...X,disabled:k,readOnly:p,required:c,value:J,inputValue:W,scrubbing:q}),[X,k,p,c,J,W,q]),Ae=Ir.useMemo(()=>({inputRef:te,focusInput:se,minWithDefault:K,maxWithDefault:Z,id:ue,setValue:ye,incrementValue:be,getStepAmount:oe,allowInputSyncRef:ge,formatOptionsRef:le,valueRef:$,lastChangedValueRef:Ce,hasPendingCommitRef:he,name:Y,nameProp:m,inputMode:xe,getAllowedNonNumericKeys:ne,min:n,max:s,setInputValue:me,locale:S,setIsScrubbing:H,state:Ne,onValueCommitted:Pe}),[te,se,K,Z,ue,ye,be,oe,le,$,Y,m,xe,ne,n,s,me,S,Ne,Pe]),Ve=_("div",t,{ref:o,state:Ne,props:D,stateAttributesMapping:Mn});return v(Wv.Provider,{value:Ae,children:[Ve,v("input",{...F.getValidationProps(k,{onFocus(){se()},onChange(Te){if(Te.nativeEvent.defaultPrevented||k||p)return;let De=Te.currentTarget.valueAsNumber,ze=Number.isNaN(De)?null:De,We=fe(U.none,Te.nativeEvent);ye(ze,We),B(Y),F.change(Ce.current??ze)}}),ref:de,type:"number",form:f,name:Y,value:J??"",min:n,max:s,step:l,disabled:k,readOnly:p,required:c,"aria-hidden":!0,tabIndex:-1,style:Y?vr:co,suppressHydrationWarning:!0})]})});var TV=T(M(),1);var wV=TV.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,{state:l}=js();return _("div",t,{ref:o,state:l,props:[{role:"group"},i],stateAttributesMapping:Mn})});var NV=T(M(),1);var Dn=T(M(),1);var IV=0,qv=class e extends mo{constructor(){super(...arguments);ot(this,"clear",()=>{this.currentId!==IV&&(clearInterval(this.currentId),this.currentId=IV)})}static create(){return new e}start(o,r){this.clear(),this.currentId=setInterval(()=>{r()},o)}};function MV(){let e=ut(qv.create).current;return fs(e.disposeEffect),e}var _X=60,BX=400,HX=8,UX=50,GX=3;function yi(e){return e==="touch"||e==="pen"}function DV(e){let{disabled:t,tick:o,onStop:r,tickDelay:n=_X,startDelay:s=BX,scrollDistance:i=HX,elementRef:l}=e,a=it(),c=MV(),u=it(),p=Dn.useRef(!1),f=Dn.useRef(0),m=Dn.useRef({x:0,y:0}),d=Dn.useRef(!1),R=Dn.useRef(!1),g=Dn.useRef(""),b=Dn.useRef(Qe),x=Dn.useRef(Qe),h=j(()=>{u.clear(),a.clear(),c.clear(),b.current(),f.current=0});function y(E){h();let P=l.current;if(!P)return;let N=Ze(P);function w(D){D.preventDefault()}if(b.current=Ye(N,"contextmenu",w),x.current(),x.current=Ye(N,"pointerup",D=>{p.current=!1,h(),r?.(D)},{once:!0}),!o(E)){h();return}a.start(s,()=>{c.start(n,()=>{o(E)||h()})})}Dn.useEffect(()=>()=>{h(),x.current()},[h]),Dn.useEffect(()=>{t&&(p.current=!1,d.current=!1,g.current="",h())},[t,h]);let C={onTouchStart(){d.current=!0},onTouchEnd(){d.current=!1},onPointerDown(E){if(E.defaultPrevented||E.button||t)return;g.current=E.pointerType,R.current=!1,p.current=!0,m.current={x:E.clientX,y:E.clientY},yi(E.pointerType)?u.start(UX,()=>{let N=f.current;f.current=0,p.current&&N<GX?(y(E.nativeEvent),R.current=!0):(R.current=!1,h())}):(E.preventDefault(),y(E.nativeEvent))},onPointerUp(E){yi(E.pointerType)&&(p.current=!1)},onPointerMove(E){if(t||!yi(E.pointerType)||!p.current)return;f.current+=1;let{x:P,y:N}=m.current,w=P-E.clientX,D=N-E.clientY;w**2+D**2>i**2&&h()},onMouseEnter(E){E.defaultPrevented||t||!p.current||d.current||yi(g.current)||y(E.nativeEvent)},onMouseLeave(){d.current||h()},onMouseUp(){d.current||h()}},S=j(E=>E.defaultPrevented?!0:yi(g.current)?R.current:E.detail!==0);return{pointerHandlers:C,shouldSkipClick:S}}var WX={WebkitUserSelect:"none",userSelect:"none"};function nR(e,t,o){let{render:r,className:n,disabled:s=!1,nativeButton:i=!0,style:l,...a}=e,{allowInputSyncRef:c,formatOptionsRef:u,getStepAmount:p,id:f,incrementValue:m,inputRef:d,focusInput:R,maxWithDefault:g,minWithDefault:b,setValue:x,state:h,valueRef:y,locale:C,lastChangedValueRef:S,onValueCommitted:E}=js(),{disabled:P,readOnly:N,value:w,inputValue:D}=h,G=w!=null&&(o?w>=g:w<=b),I=s||P||G,O=o?U.incrementPress:U.decrementPress;function A(V){let q=!c.current;if(c.current=!0,!q){S.current=y.current;return}let H=Ci(D,C,u.current);if(H!==null){let K=fe(O,V);x(H,K),K.isCanceled||(y.current=H)}}let{pointerHandlers:L,shouldSkipClick:X}=DV({disabled:I||N,elementRef:d,tick(V){let q=p(V);return m(q,{direction:o?1:-1,event:V,reason:O})},onStop(V){let q=S.current??y.current;E(q,to(O,V))}}),F={disabled:I,"aria-label":o?"Increase":"Decrease","aria-controls":f,tabIndex:-1,style:WX,...L,onClick(V){let q=I||N;if(V.defaultPrevented||q||X(V))return;A(V.nativeEvent);let H=p(V),K=y.current;m(H,{direction:o?1:-1,event:V.nativeEvent,reason:O});let Z=S.current??y.current;Z!==K&&E(Z,to(O,V.nativeEvent))},onPointerDown(V){V.defaultPrevented||N||V.button||I||(A(V.nativeEvent),S.current=null,yi(V.pointerType)||R(),L.onPointerDown(V))}},{getButtonProps:B,buttonRef:k}=ft({disabled:I||N,native:i,focusableWhenDisabled:!0}),Y={...h,disabled:I};return _("button",e,{ref:[t,k],state:Y,props:[F,a,B],stateAttributesMapping:Mn})}var AV=NV.forwardRef(function(t,o){return nR(t,o,!0)});var OV=T(M(),1);var VV=OV.forwardRef(function(t,o){return nR(t,o,!1)});var Ap=T(M(),1);var jX=new Set(["Backspace","Delete","ArrowLeft","ArrowRight","Tab","Enter","Escape"]),FV=Ap.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,{allowInputSyncRef:l,formatOptionsRef:a,getAllowedNonNumericKeys:c,getStepAmount:u,id:p,incrementValue:f,inputMode:m,max:d,min:R,name:g,nameProp:b,setValue:x,state:h,setInputValue:y,locale:C,inputRef:S,onValueCommitted:E,lastChangedValueRef:P,hasPendingCommitRef:N,valueRef:w}=js(),{disabled:D,readOnly:G,required:I,value:O,inputValue:A}=h,{clearErrors:L}=Kt(),{validationMode:X,setTouched:F,invalid:B,shouldValidateOnChange:k,validation:Y}=mt(),{labelId:V}=Ft(),q=Bo(D,S),H=Ap.useRef(!1),K=Ap.useRef(null);return _o(S,p,O,void 0,!D,b),z(()=>{if(K.current!=null){let Q=K.current;K.current=null,S.current?.setSelectionRange(Q,Q)}}),$t(O,()=>{if(L(g),H.current&&!k()){H.current=!1;return}Y.change(O)}),_("input",t,{ref:[o,S],state:h,props:[{id:p,required:I,disabled:D,readOnly:G,inputMode:m,value:A,type:"text",autoComplete:"off",autoCorrect:"off",spellCheck:"false","aria-roledescription":"Number field","aria-invalid":!D&&B?!0:void 0,"aria-labelledby":V,suppressHydrationWarning:!0,onFocus(Q){Q.defaultPrevented||D||q(!0)},onBlur(Q){if(Q.defaultPrevented||D||(F(!0),q(!1),G))return;let te=!l.current,de=N.current;if(l.current=!0,A.trim()===""){let Ce=fe(U.inputClear,Q.nativeEvent);if(x(null,Ce),Ce.isCanceled)return;X==="onBlur"&&Y.commit(null),(te||de||O!==null)&&E(null,to(U.inputClear,Q.nativeEvent));return}let ue=a.current,J=Ci(A,C,ue);if(J===null)return;let re=rR(ue),$;!te&&!re?$=O:re?$=Xv(J,ue):$=J;let ie=to(U.inputBlur,Q.nativeEvent),le=O!==$,he=te||le||de,Pe=$;if(le){let Ce=fe(U.inputBlur,Q.nativeEvent);if(H.current=!0,x($,Ce),Ce.isCanceled){H.current=!1;return}Pe=P.current,Pe===O&&(H.current=!1)}X==="onBlur"&&Y.commit(Pe),he&&E(Pe,ie);let ge=tr(Pe,C,ue);A!==ge&&y(ge)},onChange(Q){if(Q.nativeEvent.defaultPrevented)return;l.current=!1;let te=Q.currentTarget.value;if(te.trim()===""){y(te),x(null,fe(U.inputClear,Q.nativeEvent));return}let de=c();if(!Array.from(te).every(re=>jv(re)||oR.test(re)||de.has(re)||yV.test(re)))return;let J=Ci(te,C,a.current);y(te),J!==null&&x(J,fe(U.inputChange,Q.nativeEvent))},onKeyDown(Q){if(Q.defaultPrevented||G||D)return;let te=Q.nativeEvent,de=!l.current,ue=c(),J=ue.has(Q.key),{decimal:re,currency:$,percentSign:ie}=Np(C,a.current),le=Q.currentTarget.selectionStart,he=Q.currentTarget.selectionEnd,Pe=le===0&&he===A.length,ge=be=>le!=null&&he!=null&&be>=le&&be<he;[[oR,Yv],[zv,Kv]].forEach(([be,se])=>{if(be.test(Q.key)&&Array.from(ue).some(Ne=>be.test(Ne))){let Ne=A.search(se),Ae=Ne!==-1&&ge(Ne);J=!(oR.test(A)||zv.test(A))||Pe||Ae}}),[re,$,ie].forEach(be=>{if(Q.key===be){let se=A.indexOf(be),Ne=ge(se);J=se===-1||Pe||Ne}});let W=jX.has(Q.key),me=Q.key==="ArrowUp"||Q.key==="ArrowDown";if(Q.which===229||Q.altKey&&!me||Q.ctrlKey||Q.metaKey||J||jv(Q.key)||W)return;let xe=null;if(Q.key==="Home"&&R!=null?xe=R:Q.key==="End"&&d!=null&&(xe=d),Q.key.length>1&&!me&&xe===null)return;let ve=de?Ci(A,C,a.current):null,ne=u(Q);Q.preventDefault(),Q.stopPropagation();let oe=to(U.keyboard,te),ye=!1;(me||xe!==null)&&(l.current=!0),me?(de||(P.current=w.current),ye=f(ne,{direction:Q.key==="ArrowUp"?1:-1,currentValue:ve,event:te,reason:U.keyboard})):xe!==null&&(ye=x(xe,fe(U.keyboard,te))),ye&&E(P.current,oe)},onPaste(Q){if(Q.defaultPrevented||G||D)return;let te="";try{te=Q.clipboardData?.getData("text/plain")??""}catch{return}Q.preventDefault();let de=Q.currentTarget,ue=de.selectionStart,J=de.selectionEnd,re=A.slice(0,ue)+te+A.slice(J),$=Ci(re,C,a.current);$!==null&&(l.current=!1,K.current=ue+te.length,x($,fe(U.inputPaste,Q.nativeEvent)),y(re))}},i,Q=>Y.getValidationProps(D,Q)],stateAttributesMapping:Mn})});var Wo=T(M(),1),_V=T($o(),1);var sR=T(M(),1),Jv=sR.createContext(void 0);function LV(){let e=sR.useContext(Jv);if(e===void 0)throw new Error(Me(44));return e}function kV(e,t){let o=Ze(t);if(e!=null){let n=t.getBoundingClientRect();return{left:n.left-e/2,top:n.top-e/2,right:n.right+e/2,bottom:n.bottom+e/2}}let r=o.visualViewport;return r?{left:r.offsetLeft,top:r.offsetTop,right:r.offsetLeft+r.width,bottom:r.offsetTop+r.height}:{left:0,top:0,right:o.document.documentElement.clientWidth,bottom:o.document.documentElement.clientHeight}}var YX={touchAction:"none",WebkitUserSelect:"none",userSelect:"none"},BV=Wo.forwardRef(function(t,o){let{render:r,className:n,direction:s="horizontal",pixelSensitivity:i=2,teleportDistance:l,style:a,...c}=t,{state:u,setIsScrubbing:p,inputRef:f,focusInput:m,incrementValue:d,allowInputSyncRef:R,getStepAmount:g,onValueCommitted:b,lastChangedValueRef:x,valueRef:h}=js(),{disabled:y,readOnly:C}=u,S=Wo.useRef(null),E=Wo.useRef(!1),P=Wo.useRef(!1),N=Wo.useRef(null),w=Wo.useRef(!1),D=Wo.useRef(null),G=Wo.useRef({x:0,y:0}),I=it(),O=it(),[A,L]=Wo.useState(!1),[X,F]=Wo.useState(!1),[B,k]=Wo.useState(!1);function Y(ee,Q,te){let de=Ze(ee).visualViewport?.scale??1;ee.style.transform=`translate3d(${Q}px,${te}px,0) scale(${1/de})`}let V=j(({movementX:ee,movementY:Q})=>{let te=D.current,de=S.current;if(!te||!de)return;let ue=kV(l,de),J=G.current,re=(ie,le,he,Pe)=>ie+le<he?Pe-le:ie+le>Pe?he-le:ie,$={x:re(Math.round(J.x+ee),te.offsetWidth/2,ue.left,ue.right),y:re(Math.round(J.y+Q),te.offsetHeight/2,ue.top,ue.bottom)};G.current=$,Y(te,$.x,$.y)}),q=j((ee,{clientX:Q,clientY:te})=>{_V.flushSync(()=>{k(ee),p(ee)});let de=D.current;if(!de||!ee)return;let ue={x:Q-de.offsetWidth/2,y:te-de.offsetHeight/2};G.current=ue,Y(de,ue.x,ue.y)});Wo.useEffect(function(){if(!f.current||y||C||!B)return;let Q=0;function te(re){function $(){try{Fe(S.current).exitPointerLock()}catch{}finally{E.current=!1,q(!1,re),b(x.current??h.current,to(U.scrub,re));let ie=N.current,le=f.current;if(!P.current&&ie!=null&&le){let he=Ze(le).MouseEvent;O.start(0,()=>{w.current||ie.dispatchEvent(new he("click",{bubbles:!0,cancelable:!0}))})}P.current=!1,N.current=null}}dt.engine.gecko?I.start(20,$):$()}function de(re){if(!E.current)return;re.preventDefault(),V(re);let{movementX:$,movementY:ie}=re;if(Q+=s==="vertical"?ie:$,Math.abs(Q)>=i){Q=0,P.current=!0;let le=s==="vertical"?-ie:$,he=g(re),Pe=le*he;Pe!==0&&(R.current=!0,d(Math.abs(Pe),{direction:Pe>=0?1:-1,event:re,reason:U.scrub}))}}let ue=Ze(f.current),J=So(Ye(ue,"pointerup",te,!0),Ye(ue,"pointermove",de,!0));return()=>{I.clear(),J()}},[y,C,R,d,B,g,f,q,V,s,i,x,b,h,I,O]),Wo.useEffect(()=>()=>{if(E.current){E.current=!1,p(!1);try{Fe(S.current).exitPointerLock()}catch{}}},[p]),Wo.useEffect(function(){let Q=S.current;if(!Q||y||C)return;function te(de){de.touches.length===1&&de.preventDefault()}return Ye(Q,"touchstart",te)},[y,C]);let K=_("span",t,{ref:[o,S],state:u,props:[{role:"presentation",style:YX,onClickCapture(){w.current=!0},async onPointerDown(ee){if(ee.defaultPrevented||C||ee.button||y)return;let Q=ee.pointerType==="touch";if(L(Q),ee.pointerType==="mouse"&&(ee.preventDefault(),m()),E.current=!0,P.current=!1,w.current=!1,O.clear(),N.current=$e(ee.nativeEvent),q(!0,ee.nativeEvent),!Q&&!dt.engine.webkit)try{await Fe(S.current).body.requestPointerLock(),F(!1)}catch{F(!0)}finally{E.current&&q(!0,ee.nativeEvent)}}},c],stateAttributesMapping:Mn}),Z=Wo.useMemo(()=>({isScrubbing:B,isTouchInput:A,isPointerLockDenied:X,scrubAreaCursorRef:D}),[B,A,X]);return v(Jv.Provider,{value:Z,children:K})});var iR=T(M(),1),HV=T($o(),1);var KX={position:"fixed",top:0,left:0,pointerEvents:"none"},UV=iR.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,{state:l}=js(),{isScrubbing:a,isTouchInput:c,isPointerLockDenied:u,scrubAreaCursorRef:p}=LV(),[f,m]=iR.useState(null),d=a&&!dt.engine.webkit&&!c&&!u,R=_("span",t,{enabled:d,ref:[o,p,m],state:l,props:[{role:"presentation",style:KX},i],stateAttributesMapping:Mn});return R&&HV.createPortal(R,Fe(f).body)});var Qv={};ae(Qv,{dirty:()=>eq,disabled:()=>$X,filled:()=>tq,focused:()=>oq,invalid:()=>QX,readonly:()=>XX,required:()=>qX,scrubbing:()=>zX,touched:()=>ZX,valid:()=>JX});var zX="data-scrubbing",$X="data-disabled",XX="data-readonly",qX="data-required",JX="data-valid",QX="data-invalid",ZX="data-touched",eq="data-dirty",tq="data-filled",oq="data-focused";var Zv={};ae(Zv,{dirty:()=>uq,disabled:()=>nq,filled:()=>pq,focused:()=>fq,invalid:()=>cq,readonly:()=>sq,required:()=>iq,scrubbing:()=>rq,touched:()=>lq,valid:()=>aq});var rq="data-scrubbing",nq="data-disabled",sq="data-readonly",iq="data-required",aq="data-valid",cq="data-invalid",lq="data-touched",uq="data-dirty",pq="data-filled",fq="data-focused";var eE={};ae(eE,{dirty:()=>Cq,disabled:()=>mq,filled:()=>yq,focused:()=>vq,invalid:()=>hq,readonly:()=>gq,required:()=>xq,scrubbing:()=>dq,touched:()=>bq,valid:()=>Rq});var dq="data-scrubbing",mq="data-disabled",gq="data-readonly",xq="data-required",Rq="data-valid",hq="data-invalid",bq="data-touched",Cq="data-dirty",yq="data-filled",vq="data-focused";var tE={};ae(tE,{dirty:()=>Dq,disabled:()=>Sq,filled:()=>Nq,focused:()=>Aq,invalid:()=>Iq,readonly:()=>Pq,required:()=>Tq,scrubbing:()=>Eq,touched:()=>Mq,valid:()=>wq});var Eq="data-scrubbing",Sq="data-disabled",Pq="data-readonly",Tq="data-required",wq="data-valid",Iq="data-invalid",Mq="data-touched",Dq="data-dirty",Nq="data-filled",Aq="data-focused";var oE={};ae(oE,{dirty:()=>Hq,disabled:()=>Vq,filled:()=>Uq,focused:()=>Gq,invalid:()=>_q,readonly:()=>Fq,required:()=>Lq,scrubbing:()=>Oq,touched:()=>Bq,valid:()=>kq});var Oq="data-scrubbing",Vq="data-disabled",Fq="data-readonly",Lq="data-required",kq="data-valid",_q="data-invalid",Bq="data-touched",Hq="data-dirty",Uq="data-filled",Gq="data-focused";var rE={};ae(rE,{dirty:()=>qq,disabled:()=>jq,filled:()=>Jq,focused:()=>Qq,invalid:()=>$q,readonly:()=>Yq,required:()=>Kq,scrubbing:()=>Wq,touched:()=>Xq,valid:()=>zq});var Wq="data-scrubbing",jq="data-disabled",Yq="data-readonly",Kq="data-required",zq="data-valid",$q="data-invalid",Xq="data-touched",qq="data-dirty",Jq="data-filled",Qq="data-focused";var nE={};ae(nE,{dirty:()=>i2,disabled:()=>e2,filled:()=>a2,focused:()=>c2,invalid:()=>n2,readonly:()=>t2,required:()=>o2,scrubbing:()=>Zq,touched:()=>s2,valid:()=>r2});var Zq="data-scrubbing",e2="data-disabled",t2="data-readonly",o2="data-required",r2="data-valid",n2="data-invalid",s2="data-touched",i2="data-dirty",a2="data-filled",c2="data-focused";var Rc={};ae(Rc,{Input:()=>XV,Root:()=>$V,Separator:()=>wn});var or=T(M(),1);var aR=T(M(),1),sE=aR.createContext(void 0);function GV(){let e=aR.useContext(sE);if(e===void 0)throw new Error(Me(98));return e}function WV(e,t,o){return{...e,value:t,index:o,filled:t!==""}}var jV={value:()=>null,length:()=>null,...Lt},YV={value:()=>null,index:()=>null,...Lt};var l2={numeric:{slotPattern:"\\d{1}",getRootPattern:e=>`\\d{${e}}`,regexp:/[^\d]/g,inputMode:"numeric"},alpha:{slotPattern:"[a-zA-Z]{1}",getRootPattern:e=>`[a-zA-Z]{${e}}`,regexp:/[^a-zA-Z]/g,inputMode:"text"},alphanumeric:{slotPattern:"[a-zA-Z0-9]{1}",getRootPattern:e=>`[a-zA-Z0-9]{${e}}`,regexp:/[^a-zA-Z0-9]/g,inputMode:"text"}};function iE(e){return e==="none"?null:l2[e]}function u2(e){return(e??"").replace(/\s/g,"")}function KV(e,t){return t?e.replace(t.regexp,""):e}function Vp(e,t,o,r){let n=u2(e),s=iE(o),i=KV(n,s),l=n.length>i.length;if(r){let u=r(i);l||(l=i.length>u.length),i=KV(u,s),l||(l=u.length>i.length)}let a=t<0?0:t,c=Array.from(i);return[c.slice(0,a).join(""),l||c.length>a]}function Op(e,t,o,r){return Vp(e,t,o,r)[0]}function zV(e,t,o,r,n,s){let i=Op(o,r,n,s),l=e.slice(0,t),a=e.slice(t+i.length);return Op(`${l}${i}${a}`,r,n,s)}function cR(e,t){return t<0||t>=e.length?e:`${e.slice(0,t)}${e.slice(t+1)}`}var $V=or.forwardRef(function(t,o){let{"aria-describedby":r,"aria-labelledby":n,id:s,autoComplete:i="one-time-code",defaultValue:l="",value:a,onValueChange:c,onValueComplete:u,form:p,length:f,autoSubmit:m=!1,mask:d=!1,inputMode:R,validationType:g="numeric",normalizeValue:b,disabled:x=!1,readOnly:h=!1,required:y=!1,name:C,onValueInvalid:S,render:E,className:P,style:N,...w}=t,{setDirty:D,validityData:G,disabled:I,setFilled:O,invalid:A,name:L,state:X,validation:F,validationMode:B,setFocused:k,setTouched:Y}=mt(),{clearErrors:V}=Kt(),{getDescriptionProps:q,labelId:H}=Ft(),K=I||x,Z=L??C,[ee,Q]=Nt({controlled:a,default:l,name:"OTPField",state:"value"}),te=or.useRef(null),de=or.useRef([]),ue=or.useRef(null),J=or.useRef(null),re=or.useMemo(()=>({get current(){return de.current[0]??null}}),[]),$=xo({id:s}),ie=sa(n,H,re,!0,$),le=n==null?ie:void 0,he=q({}),Pe=p2(r,he["aria-describedby"]),ge=iE(g),Ce=ge?.slotPattern,W=ge?.getRootPattern(f),me=R??ge?.inputMode,xe=Number.isInteger(f)&&f>0,ve=Op(ee,f,g,b),ne=Et(ve),oe=ve!=="",[ye,be]=or.useState(0),[se,Ne]=or.useState(()=>Math.min(ve.length,f-1)),[Ae,Ve]=or.useState(!1),Te=Ae?Math.min(se,Math.max(f-1,0)):Math.min(ve.length,f-1);z(()=>{O(oe)},[oe,O]),_o(re,$,ve,void 0,!K,C);let De=j(Ie=>{let _e=Math.min(Math.max(Ie,0),Math.max(de.current.length-1,0)),pe=de.current[_e];pe?.focus(),pe?.select()}),ze=j((Ie,_e)=>{ue.current={index:Ie,value:_e}});function We(){let Ie=F.inputRef.current?.form??de.current[0]?.form??null;if(p){let _e=Fe(te.current).getElementById(p);_e?.tagName==="FORM"&&(Ie=_e)}Ie&&typeof Ie.requestSubmit=="function"&&Ie.requestSubmit()}function Ge(Ie,_e){u?.(Ie,_e),m&&We()}$t(ve,()=>{V(Z),D(ve!==G.initialValue),F.change(ve);let Ie=ue.current;Ie!=null&&(ue.current=null,Ie.value===ve&&De(Ie.index));let _e=J.current;_e!=null&&(J.current=null,_e.value===ve&&Ge(ve,_e.eventDetails))});let He=j((Ie,_e)=>{let pe=Op(Ie,f,g,b),Oe=(_e.reason===U.inputChange||_e.reason===U.inputPaste)&&pe.length===f&&(ne.current.length!==f||_e.reason===U.inputPaste)?to(_e.reason,_e.event):null;return pe===ne.current?(Oe!=null&&Ge(pe,Oe),null):(c?.(pe,_e),_e.isCanceled?null:(Q(pe),Oe!=null?J.current={value:pe,eventDetails:Oe}:pe.length!==f&&(J.current=null),pe))}),Ue=j((Ie,_e)=>{S?.(Ie,_e)}),rt=j((Ie,_e)=>{if(Ie>ne.current.length){De(Math.min(ne.current.length,f-1));return}Ne(Ie),_e.currentTarget.select()}),et=j(Ie=>{Ee(te.current,Ie.relatedTarget)||(Y(!0),Ve(!1),k(!1),B==="onBlur"&&F.commit(ne.current))}),pt=or.useCallback(Ie=>{if($!=null)return Ie===0?$:`${$}-${Ie+1}`},[$]),wt=or.useMemo(()=>({...X,complete:ve.length===f,disabled:K,filled:oe,focused:Ae,length:f,readOnly:h,required:y,value:ve}),[K,X,oe,Ae,f,h,y,ve]),Se=or.useMemo(()=>({autoComplete:i,activeIndex:Te,disabled:K,form:p,focusInput:De,queueFocusInput:ze,getInputId:pt,handleInputBlur:et,handleInputFocus:rt,inputMode:me,inputAriaLabelledBy:le,invalid:A,length:f,mask:d,pattern:Ce,reportValueInvalid:Ue,readOnly:h,required:y,normalizeValue:b,setValue:He,setFocused:Ve,state:wt,validationType:g,value:ve}),[Te,i,K,De,p,pt,et,rt,me,le,A,f,d,Ce,ze,h,Ue,y,b,He,Ve,wt,g,ve]),ke=_("div",t,{ref:[o,te],state:wt,props:[{role:"group","aria-describedby":Pe,"aria-labelledby":ie},w],stateAttributesMapping:jV});return v(Jo,{elementsRef:de,onMapChange:Ie=>{be(Ie.size)},children:v(sE.Provider,{value:Se,children:[ke,xe&&v("input",{...F.getValidationProps(K,{onFocus(){De(0)},onChange(Ie){if(Ie.nativeEvent.defaultPrevented||K||h)return;let _e=Ie.currentTarget.value,[pe,we]=Vp(_e,f,g,b);we&&Ue(_e,to(U.inputChange,Ie.nativeEvent));let Oe=He(pe,fe(U.inputChange,Ie.nativeEvent));Oe!=null&&Oe!==""&&ze(Oe.length-1,Oe)}}),ref:F.inputRef,type:"text",id:$&&Z==null?`${$}-hidden-input`:void 0,form:p,name:Z,value:ve,autoComplete:i,inputMode:me,minLength:f,maxLength:f,pattern:W,disabled:K,readOnly:h,required:y,"aria-hidden":!0,tabIndex:-1,style:Z?vr:co})]})})});function p2(...e){let t=e.flatMap(o=>o?.split(/\s+/).filter(Boolean)??[]);return t.length>0?Array.from(new Set(t)).join(" "):void 0}var xc=T(M(),1);var XV=xc.forwardRef(function(t,o){let{"aria-label":r,"aria-labelledby":n,render:s,className:i,style:l,...a}=t,{activeIndex:c,autoComplete:u,disabled:p,form:f,focusInput:m,queueFocusInput:d,getInputId:R,handleInputBlur:g,handleInputFocus:b,inputMode:x,inputAriaLabelledBy:h,invalid:y,length:C,mask:S,pattern:E,reportValueInvalid:P,readOnly:N,required:w,normalizeValue:D,setFocused:G,setValue:I,state:O,validationType:A,value:L}=GV(),{ref:X,index:F}=oo({guess:!0}),B=xc.useRef(null),k=Bo(p,B,G),Y=At(),[V,q]=xc.useState(null),H=L[F]??"",K=WV(O,H,F),Z=r,ee=n??h,Q=F===0?void 0:Z;function te(J,re,$){let[ie,le]=Vp(J,C,A,D);if(le&&P(J,to(re,$.nativeEvent)),ie===""){re===U.inputChange&&(J===""?I(cR(L,F),fe(U.inputClear,$.nativeEvent)):H!==""&&($.currentTarget.value=H,$.currentTarget.select()));return}let he=I(zV(L,F,ie,C,A,D),fe(re,$.nativeEvent));he!=null&&d(Math.min(F+ie.length,C-1),he)}let de={id:R(F),value:V??H,type:S?"password":"text",inputMode:x,autoComplete:F===0?u:"off",autoCorrect:"off",spellCheck:"false",enterKeyHint:F===C-1?"done":"next",maxLength:F===0?C:void 0,tabIndex:c===F?0:-1,disabled:p,form:f,pattern:E,readOnly:N,required:w,"aria-labelledby":Q==null?ee:void 0,"aria-invalid":!p&&y?!0:void 0,"aria-label":Q,onMouseDown(J){J.defaultPrevented||p||(J.preventDefault(),m(F))},onFocus(J){J.defaultPrevented||p||(k(!0),b(F,J))},onBlur(J){J.defaultPrevented||g(J)},onCompositionStart(){dt.os.android||q(H)},onCompositionEnd(J){V!=null&&(q(null),!p&&!N&&te(J.currentTarget.value,U.inputChange,J))},onChange(J){if(!(J.defaultPrevented||p||N)){if(V!=null){q(J.currentTarget.value);return}te(J.currentTarget.value,U.inputChange,J)}},onKeyDown(J){if(J.defaultPrevented||p||V!=null)return;let re=0,$=Math.max(C-1,re),ie=Math.min(L.length,$),le=(J.ctrlKey||J.metaKey)&&!J.altKey,he=Y==="rtl",Pe=he?"ArrowRight":"ArrowLeft",ge=he?"ArrowLeft":"ArrowRight";if(J.key===Pe){xt(J),m(le?re:Math.max(re,F-1));return}if(J.key===ge){xt(J),m(le?ie:Math.min($,F+1));return}if(J.key==="Home"||J.key==="ArrowUp"){xt(J),m(re);return}if(J.key==="End"||J.key==="ArrowDown"){xt(J),m(ie);return}if(N)return;function Ce(xe,ve){let ne=I(xe,fe(U.keyboard,J.nativeEvent));ne!=null&&d(ve,ne)}if(J.key==="Backspace"&&le){xt(J),Ce("",re);return}if(J.key==="Delete"){xt(J),Ce(cR(L,F),F);return}let W=J.currentTarget.value,me=J.currentTarget.selectionStart===0&&J.currentTarget.selectionEnd===W.length;if(J.key.length===1&&me&&H===J.key){xt(J),F<C-1&&m(F+1);return}if(J.key==="Backspace"){xt(J);let xe=Math.max(re,F-1);Ce(cR(L,H===""?xe:F),xe)}},onPaste(J){if(J.defaultPrevented||p||N)return;let re="";try{re=J.clipboardData?.getData("text/plain")??""}catch{return}J.preventDefault(),te(re,U.inputPaste,J)}};return _("input",t,{ref:[o,X,B],state:K,props:[de,a],stateAttributesMapping:YV})});var aE={};ae(aE,{complete:()=>f2,dirty:()=>b2,disabled:()=>d2,filled:()=>C2,focused:()=>y2,invalid:()=>R2,readonly:()=>m2,required:()=>g2,touched:()=>h2,valid:()=>x2});var f2="data-complete",d2="data-disabled",m2="data-readonly",g2="data-required",x2="data-valid",R2="data-invalid",h2="data-touched",b2="data-dirty",C2="data-filled",y2="data-focused";var cE={};ae(cE,{complete:()=>v2,dirty:()=>D2,disabled:()=>S2,filled:()=>E2,focused:()=>N2,invalid:()=>I2,readonly:()=>P2,required:()=>T2,touched:()=>M2,valid:()=>w2});var v2="data-complete",E2="data-filled",S2="data-disabled",P2="data-readonly",T2="data-required",w2="data-valid",I2="data-invalid",M2="data-touched",D2="data-dirty",N2="data-focused";var Rr={};ae(Rr,{Arrow:()=>mF,Backdrop:()=>xF,Close:()=>vF,Description:()=>CF,Handle:()=>_p,Popup:()=>fF,Portal:()=>iF,Positioner:()=>cF,Root:()=>oF,Title:()=>hF,Trigger:()=>rF,Viewport:()=>SF,createHandle:()=>PF});var Lp=T(M(),1);var lR=T(M(),1),lE=lR.createContext(void 0);function To(e){let t=lR.useContext(lE);if(t===void 0&&!e)throw new Error(Me(47));return t}var Fp=T(M(),1),qV=T($o(),1);var JV={...Vr,disabled:e=>e.disabled,instantType:e=>e.instantType==="trigger-change"&&!Vr.open(e)?void 0:e.instantType,openMethod:e=>e.openMethod,openChangeReason:e=>e.openChangeReason,isPressOpenedByTrigger:(e,t)=>e.openChangeReason===U.triggerPress&&Vr.isOpenedByTrigger(e,t),isTouchPressOpen:(e,t)=>t&&e.openMethod==="touch"&&e.openChangeReason===U.triggerPress,hasTriggerFocusGuards:(e,t)=>Vr.isOpenedByTrigger(e,t)&&!e.focusManagerModal,modal:e=>e.modal,titleElementId:e=>e.titleElementId,descriptionElementId:e=>e.descriptionElementId,openOnHover:e=>e.openOnHover,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin},uR=class extends go{constructor(o,r,n){let s=new Mo;super(ZV(o,s,r,n),eF(s),JV);ot(this,"setOpen",(o,r)=>{let n=r.reason===U.triggerHover,s=r.reason===U.triggerPress&&r.event.detail===0,i=!o&&(r.reason===U.escapeKey||r.reason==null),l=Kn(r),a=this.select("activeTriggerId");if(!o&&r.reason===U.closePress&&r.trigger==null&&a!=null&&(r.trigger=this.context.triggerElements.getById(a)??this.select("activeTriggerElement")??void 0),this.context.onOpenChange?.(o,r),r.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(o,r);let c=()=>{let p=ja(this.state,o,r.trigger,l());p.openChangeReason=r.reason,this.update(p)};n?(this.context.stickIfOpen=!0,this.context.stickIfOpenTimeout.start(500,()=>{this.context.stickIfOpen=!1}),qV.flushSync(c)):c();let u;s?u="click":i?u="dismiss":r.reason===U.focusOut&&(u="focus"),this.set("instantType",u)})}};function QV(){let e=new Mo,t=new vn(Object.freeze(ZV(void 0,e)),Object.freeze(eF(e)),JV);return Object.assign(t,{setOpen:Qe})}function ZV(e,t,o,r=!1){let n={...ws(t,o,r),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,openOnHover:!1,closeDelay:0,adaptiveOrigin:void 0,...e};return n.open&&e?.mounted===void 0&&(n.mounted=!0),n}function eF(e){return{popupRef:Fp.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:Fp.createRef(),beforeTriggerFocusGuardRef:Fp.createRef(),beforeContentFocusGuardRef:Fp.createRef(),stickIfOpenTimeout:new mo,stickIfOpen:!0,triggerElements:e}}var tF=zn(function({props:t}){let{children:o,open:r,defaultOpen:n=!1,onOpenChange:s,onOpenChangeComplete:i,modal:l=!1,handle:a,triggerId:c,defaultTriggerId:u=null}=t,p=A2(a,{modal:l,open:n,openProp:r,activeTriggerId:u,triggerIdProp:c});p.useControlledProp("openProp",r),p.useControlledProp("triggerIdProp",c);let f=p.useState("open"),m=p.useState("mounted"),d=p.useState("payload");p.useContextCallback("onOpenChange",s),p.useContextCallback("onOpenChangeComplete",i),cd(p,f),vs(p);let{forceUnmount:R}=Es(f,p,()=>{p.context.stickIfOpen=!0,p.set("openChangeReason",null)});p.useSyncedValues({modal:l}),Lp.useEffect(()=>{f||p.context.stickIfOpenTimeout.clear()},[p,f]),Lp.useImperativeHandle(t.actionsRef,()=>({unmount:R,close:()=>p.setOpen(!1,fe(U.imperativeAction))}),[R,p]);let g=f||m||a!=null;return v(lE.Provider,{value:p,children:[a&&v(Cs,{handle:a,store:p}),g&&v(O2,{store:p,modal:l}),typeof o=="function"?o({payload:d}):o]})});function oF(e){return To(!0)?v(tF,{props:e}):v(Yn,{children:v(tF,{props:e})})}function A2(e,t){let o=$i((r,n)=>new uR(t,r,n));return Lp.useEffect(()=>o.context.stickIfOpenTimeout.disposeEffect(),[o]),o}function O2({store:e,modal:t}){let o=e.useState("floatingRootContext"),r=ur(o,{outsidePressEvent:{mouse:t==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}}),n=r.reference,s=r.floating;return Ss(e,{activeTriggerProps:n,inactiveTriggerProps:n,popupProps:s}),null}var kp=T(M(),1);var rF=Ps(function(t,o){let{render:r,className:n,style:s,disabled:i=!1,nativeButton:l=!0,handle:a,payload:c,openOnHover:u=!1,delay:p=300,closeDelay:f=0,id:m,...d}=t,R=To(!0),b=Is(a)??R;if(!b)throw new Error(Me(74));let x=je(m),h=b.useState("isTriggerActive",x),y=b.useState("floatingRootContext"),C=b.useState("isOpenedByTrigger",x),S=b.useState("triggerPopupId",x),E=kp.useRef(null),{registerTrigger:P,isMountedByThisTrigger:N}=ys(x,E,b,{payload:c,disabled:i,openOnHover:u,closeDelay:f}),w=b.useState("isPressOpenedByTrigger",x),D=b.useState("isTouchPressOpen",u),G=b.useState("hasTriggerFocusGuards",x),I=pn(y,{enabled:!i&&u&&!D,mouseOnly:!0,move:!1,handleClose:fn(),restMs:p,delay:{close:f},triggerElementRef:E,isActiveTrigger:h,isClosing:()=>b.select("transitionStatus")==="ending"}),O=j(()=>b.context.stickIfOpen),A=lr(y,{stickIfOpen:O}),L=ju(()=>b.select("open"),Z=>{b.set("openMethod",Z)}),X=b.useState("triggerProps",N),{getButtonProps:F,buttonRef:B}=ft({disabled:i,native:l}),k={open(Z){return w?rn.open(Z):yr.open(Z)}},{handlePreFocusGuardFocus:Y,handleFocusTargetFocus:V}=Og(b,E),H=_("button",t,{state:{disabled:i,open:C},ref:[B,o,P,E],props:[A.reference,I,X,L,{[kc]:"",id:x,"aria-haspopup":"dialog","aria-expanded":C,"aria-controls":S},d,F],stateAttributesMapping:k}),K=v(kp.Fragment,{children:H},x);return G?v(kp.Fragment,{children:[v(Fo,{ref:b.context.beforeTriggerFocusGuardRef,onFocus:Y}),K,v(Fo,{ref:b.context.triggerFocusTargetRef,onFocus:V})]}):K});var sF=T(M(),1);var pR=T(M(),1),uE=pR.createContext(void 0);function nF(){let e=pR.useContext(uE);if(e===void 0)throw new Error(Me(45));return e}var iF=sF.forwardRef(function(t,o){let{keepMounted:r=!1,...n}=t;return To().useState("mounted")||r?v(uE.Provider,{value:r,children:v(an,{ref:o,...n})}):null});var aF=T(M(),1);var fR=T(M(),1),pE=fR.createContext(void 0);function Gl(){let e=fR.useContext(pE);if(!e)throw new Error(Me(46));return e}var cF=aF.forwardRef(function(t,o){let{render:r,className:n,style:s,anchor:i,positionMethod:l,side:a,align:c,sideOffset:u,alignOffset:p,collisionBoundary:f="clipping-ancestors",collisionPadding:m,arrowPadding:d,sticky:R,disableAnchorTracking:g=!1,collisionAvoidance:b=bn,...x}=t,h=To(),y=nF(),C=cn(),S=h.useState("floatingRootContext"),E=h.useState("mounted"),P=h.useState("open"),N=h.useState("openChangeReason"),w=h.useState("activeTriggerElement"),D=h.useState("modal"),G=h.useState("openMethod"),I=h.useState("positionerElement"),O=h.useState("instantType"),A=h.useState("transitionStatus"),L=h.useState("adaptiveOrigin"),X=Xr({anchor:i,floatingRootContext:S,positionMethod:l,mounted:E,side:a,sideOffset:u,align:c,alignOffset:p,arrowPadding:d,collisionBoundary:f,collisionPadding:m,sticky:R,disableAnchorTracking:g,keepMounted:y,nodeId:C,collisionAvoidance:b,adaptiveOrigin:L}),F=S.useState("domReferenceElement");Cg({store:h,domReference:F,positionerElement:I,open:P});let B=D===!0&&N!==U.triggerHover;ra(P&&B,G==="touch",I,w);let k=h.useStateSetter("positionerElement"),Y={open:P,side:X.side,align:X.align,anchorHidden:X.anchorHidden,instant:O},V=Pr(t,Y,{styles:X.positionerStyles,transitionStatus:A,props:x,refs:[o,k],hidden:!E,inert:!P});return v(pE.Provider,{value:X,children:[E&&B&&v(Ns,{inert:ko(!P),cutout:w}),v(ln,{id:C,children:V})]})});var pF=T(M(),1);var Pa=T(M(),1);var fE=Pa.createContext(void 0);function lF(){let[e,t]=Pa.useState(0),o=j(()=>(t(n=>n+1),()=>{t(n=>Math.max(0,n-1))}));return{context:Pa.useMemo(()=>({register:o}),[o]),hasClosePart:e>0}}function uF(){let e=Pa.useContext(fE);z(()=>e?.register(),[e])}var fF=pF.forwardRef(function(t,o){let{render:r,className:n,style:s,initialFocus:i,finalFocus:l,...a}=t,c=To(),u=Gl(),p=er(!0)!=null,{context:f,hasClosePart:m}=lF(),d=c.useState("open"),R=c.useState("openMethod"),g=c.useState("instantType"),b=c.useState("transitionStatus"),x=c.useState("popupProps"),h=c.useState("titleElementId"),y=c.useState("descriptionElementId"),C=c.useState("modal"),S=c.useState("mounted"),E=c.useState("openChangeReason"),P=c.useState("activeTriggerElement"),N=c.useState("floatingRootContext"),w=N.useState("floatingId"),D=c.useState("disabled"),G=c.useState("openOnHover"),I=c.useState("closeDelay");St({open:d,ref:c.context.popupRef,onComplete(){d&&c.context.onOpenChangeComplete?.(!0)}}),Xn(N,{enabled:G&&!D,closeDelay:I});let O=i===void 0?id(c.context.popupRef):i,A=C!==!1&&m;c.useSyncedValue("focusManagerModal",A);let L=c.useStateSetter("popupElement"),X={open:d,side:u.side,align:u.align,instant:g,transitionStatus:b},F=_("div",t,{state:X,ref:[o,c.context.popupRef,L],props:[x,{id:w,role:"dialog",...Sr,"aria-labelledby":h,"aria-describedby":y,onKeyDown(B){p&&Fr.has(B.key)&&B.stopPropagation()}},Zo(b),a],stateAttributesMapping:ro});return v(un,{context:N,openInteractionType:R,modal:A,disabled:!S||E===U.triggerHover,initialFocus:O,returnFocus:l,restoreFocus:"popup",getInsideElements:()=>[c.context.beforeTriggerFocusGuardRef.current],previousFocusableElement:tt(P)?P:void 0,nextFocusableElement:c.context.triggerFocusTargetRef,beforeContentFocusGuardRef:c.context.beforeContentFocusGuardRef,children:v(fE.Provider,{value:f,children:F})})});var dF=T(M(),1);var mF=dF.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,a=To().useState("open"),{arrowRef:c,side:u,align:p,arrowUncentered:f,arrowStyles:m}=Gl();return _("div",t,{state:{open:a,side:u,align:p,uncentered:f},ref:[o,c],props:[{style:m,"aria-hidden":!0},i],stateAttributesMapping:Qt})});var gF=T(M(),1);var xF=gF.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,l=To(),a=l.useState("open"),c=l.useState("mounted"),u=l.useState("transitionStatus"),p=l.useState("openChangeReason");return _("div",t,{state:{open:a,transitionStatus:u},ref:o,props:[{role:"presentation",hidden:!c,style:{pointerEvents:p===U.triggerHover?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},i],stateAttributesMapping:ro})});var RF=T(M(),1);var hF=RF.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,l=To(),a=je(i.id);return l.useSyncedValueWithCleanup("titleElementId",a),_("h2",t,{ref:o,props:[{id:a},i]})});var bF=T(M(),1);var CF=bF.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,l=To(),a=je(i.id);return l.useSyncedValueWithCleanup("descriptionElementId",a),_("p",t,{ref:o,props:[{id:a},i]})});var yF=T(M(),1);var vF=yF.forwardRef(function(t,o){let{render:r,className:n,style:s,disabled:i=!1,nativeButton:l=!0,...a}=t,{buttonRef:c,getButtonProps:u}=ft({disabled:i,focusableWhenDisabled:!1,native:l}),p=To();return uF(),_("button",t,{ref:[o,c],props:[{onClick(m){p.setOpen(!1,fe(U.closePress,m.nativeEvent))}},a,u]})});var EF=T(M(),1);var SF=EF.forwardRef(function(t,o){let{render:r,className:n,style:s,children:i,...l}=t,a=To(),{side:c}=Gl(),u=a.useState("instantType"),{children:p,state:f}=xa({store:a,side:c,children:i}),m={activationDirection:f.activationDirection,transitioning:f.transitioning,instant:u};return _("div",t,{state:m,ref:o,props:[l,{children:p}],stateAttributesMapping:ga})});var _p=class extends Cn{constructor(){super(QV(),"Popover")}open(t){this.openByTrigger(t)}close(){this.closePopup()}get isOpen(){return this.attachedStore?.select("open")??!1}};function PF(){return new _p}var dE={};ae(dE,{disabled:()=>L2,popupOpen:()=>V2,pressed:()=>F2});var V2=Mt.popupOpen,F2=Mt.pressed,L2="data-disabled";var mE={};ae(mE,{anchorHeight:()=>H2,anchorWidth:()=>B2,availableHeight:()=>_2,availableWidth:()=>k2,positionerHeight:()=>W2,positionerWidth:()=>G2,transformOrigin:()=>U2});var k2="--available-width",_2="--available-height",B2="--anchor-width",H2="--anchor-height",U2="--transform-origin",G2="--positioner-width",W2="--positioner-height";var gE={};ae(gE,{align:()=>$2,anchorHidden:()=>K2,closed:()=>Y2,open:()=>j2,side:()=>z2});var j2=ce.open,Y2=ce.closed,K2=ce.anchorHidden,z2=ce.side,$2=ce.align;var xE={};ae(xE,{popupHeight:()=>q2,popupWidth:()=>X2});var X2="--popup-width",q2="--popup-height";var RE={};ae(RE,{align:()=>o5,closed:()=>Q2,endingStyle:()=>e5,instant:()=>r5,open:()=>J2,side:()=>t5,startingStyle:()=>Z2});var J2=ce.open,Q2=ce.closed,Z2=ce.startingStyle,e5=ce.endingStyle,t5=ce.side,o5=ce.align,r5="data-instant";var hE={};ae(hE,{align:()=>a5,closed:()=>s5,open:()=>n5,side:()=>i5,uncentered:()=>c5});var n5=ce.open,s5=ce.closed,i5=ce.side,a5=ce.align,c5="data-uncentered";var bE={};ae(bE,{closed:()=>u5,endingStyle:()=>f5,open:()=>l5,startingStyle:()=>p5});var l5=ce.open,u5=ce.closed,p5=ce.startingStyle,f5=ce.endingStyle;var CE={};ae(CE,{popupHeight:()=>m5,popupWidth:()=>d5});var d5="--popup-width",m5="--popup-height";var yE={};ae(yE,{activationDirection:()=>R5,current:()=>g5,instant:()=>b5,previous:()=>x5,transitioning:()=>h5});var g5="data-current",x5="data-previous",R5="data-activation-direction",h5="data-transitioning",b5="data-instant";var Jr={};ae(Jr,{Arrow:()=>YF,Backdrop:()=>zF,Handle:()=>Bp,Popup:()=>WF,Portal:()=>kF,Positioner:()=>UF,Root:()=>OF,Trigger:()=>BF,Viewport:()=>XF,createHandle:()=>qF});var AF=T(M(),1);var dR=T(M(),1),vE=dR.createContext(void 0);function Mr(e){let t=dR.useContext(vE);if(t===void 0&&!e)throw new Error(Me(50));return t}var TF=T(M(),1);var wF={...Vr,instantType:e=>e.instantType,adaptiveOrigin:e=>e.adaptiveOrigin,closeDelay:e=>e.closeDelay},mR=class extends go{constructor(o,r,n){let s=new Mo;super(MF(o,s,r,n),DF(s),wF);ot(this,"setOpen",(o,r)=>{let{inlineRectCoordsRef:n}=this.context;ad(this,o,r,{onBeforeDispatch(){let s=r.event;o&&r.reason===U.triggerHover&&r.trigger&&"clientX"in s&&"clientY"in s&&n.current?.element!==r.trigger&&Ub(n,r.trigger,s.clientX,s.clientY)}})})}};function IF(){let e=new Mo;return new vn(Object.freeze(MF(void 0,e)),Object.freeze(DF(e)),wF)}function MF(e,t,o,r=!1){return{...ws(t,o,r),instantType:void 0,adaptiveOrigin:void 0,closeDelay:300,...e}}function DF(e){return{popupRef:TF.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e,inlineRectCoordsRef:{current:void 0}}}function NF(e){let{open:t,defaultOpen:o=!1,onOpenChange:r,onOpenChangeComplete:n,actionsRef:s,handle:i,triggerId:l,defaultTriggerId:a=null,children:c}=e,u=$i((b,x)=>new mR({open:o,openProp:t,activeTriggerId:a,triggerIdProp:l},b,x));u.useControlledProp("openProp",t),u.useControlledProp("triggerIdProp",l),u.useContextCallback("onOpenChange",r),u.useContextCallback("onOpenChangeComplete",n);let p=u.useState("open"),f=u.useState("activeTriggerId"),m=u.useState("mounted"),d=u.useState("payload");vs(u,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:R}=Es(p,u,()=>{u.context.inlineRectCoordsRef.current=void 0});z(()=>{p&&f==null&&u.set("payload",void 0)},[u,f,p]),AF.useImperativeHandle(s,()=>({unmount:R,close:()=>u.setOpen(!1,fe(U.imperativeAction))}),[R,u]);let g=p||m||i!=null;return v(vE.Provider,{value:u,children:[i&&v(Cs,{handle:i,store:u}),g&&v(y5,{store:u}),typeof c=="function"?c({payload:d}):c]})}function y5({store:e}){let t=e.useState("floatingRootContext"),o=ur(t);return Ss(e,{activeTriggerProps:o.reference,inactiveTriggerProps:o.trigger,popupProps:o.floating}),null}var OF=zn(function(t){return Mr(!0)?v(NF,{...t}):v(Yn,{children:v(NF,{...t})})});var LF=T(M(),1);var gR=T(M(),1),EE=gR.createContext(void 0);function VF(){let e=gR.useContext(EE);if(e===void 0)throw new Error(Me(48));return e}var xR=T(M(),1),FF=T($o(),1);var Wl=xR.forwardRef(function(t,o){let{children:r,container:n,className:s,render:i,style:l,...a}=t,{node:c,subtree:u}=rd({container:n,ref:o,componentProps:t,elementProps:a});return!u&&!c?null:v(xR.Fragment,{children:[u,c&&FF.createPortal(r,c)]})});var kF=LF.forwardRef(function(t,o){let{keepMounted:r=!1,...n}=t;return Mr().useState("mounted")||r?v(EE.Provider,{value:r,children:v(Wl,{ref:o,...n})}):null});var _F=T(M(),1);var BF=Ps(function(t,o){let{render:r,className:n,delay:s,closeDelay:i,id:l,payload:a,handle:c,style:u,...p}=t,f=Mr(!0),d=Is(c)??f;if(!d)throw new Error(Me(89));let R=je(l),g=d.useState("isTriggerActive",R),b=d.useState("isOpenedByTrigger",R),x=d.useState("floatingRootContext"),h=d.context.inlineRectCoordsRef,y=_F.useRef(null),C=s??600,S=i??300,{registerTrigger:E,isMountedByThisTrigger:P}=ys(R,y,d,{payload:a,closeDelay:S}),N=pn(x,{mouseOnly:!0,move:!1,handleClose:fn(),delay:()=>({open:C,close:S}),triggerElementRef:y,isActiveTrigger:g,isClosing:()=>d.select("transitionStatus")==="ending"}),w=Ka(x,{delay:C}),D={open:b},G=d.useState("triggerProps",P),I=rI(h,b);return _("a",t,{state:D,ref:[o,E,y],props:[N,w.reference,G,I,{id:R},p],stateAttributesMapping:yr})});var HF=T(M(),1);var RR=T(M(),1),SE=RR.createContext(void 0);function jl(){let e=RR.useContext(SE);if(e===void 0)throw new Error(Me(49));return e}var UF=HF.forwardRef(function(t,o){let{render:r,className:n,anchor:s,positionMethod:i="absolute",side:l="bottom",align:a="center",sideOffset:c=0,alignOffset:u=0,collisionBoundary:p="clipping-ancestors",collisionPadding:f=5,arrowPadding:m=5,sticky:d=!1,disableAnchorTracking:R=!1,collisionAvoidance:g=bn,style:b,...x}=t,h=Mr(),y=VF(),C=cn(),S=h.useState("open"),E=h.useState("mounted"),P=h.useState("floatingRootContext"),N=h.useState("instantType"),w=h.useState("transitionStatus"),D=h.useState("adaptiveOrigin"),G=h.context.inlineRectCoordsRef,I=Xr({anchor:s,floatingRootContext:P,positionMethod:i,mounted:E,side:l,sideOffset:c,align:a,alignOffset:u,arrowPadding:m,collisionBoundary:p,collisionPadding:f,sticky:d,disableAnchorTracking:R,keepMounted:y,nodeId:C,collisionAvoidance:g,adaptiveOrigin:D,inline:nI(G)}),O=I.update;z(()=>{S&&E&&O()},[S,E,O]);let A={open:S,side:I.side,align:I.align,anchorHidden:I.anchorHidden,instant:N},L=Pr(t,A,{styles:I.positionerStyles,transitionStatus:w,props:x,refs:[o,h.useStateSetter("positionerElement")],hidden:!E,inert:!S});return v(SE.Provider,{value:I,children:v(ln,{id:C,children:L})})});var GF=T(M(),1);var WF=GF.forwardRef(function(t,o){let{className:r,render:n,style:s,...i}=t,l=Mr(),{side:a,align:c}=jl(),u=l.useState("open"),p=l.useState("instantType"),f=l.useState("transitionStatus"),m=l.useState("popupProps"),d=l.useState("floatingRootContext"),R=l.useState("closeDelay");return St({open:u,ref:l.context.popupRef,onComplete(){u&&l.context.onOpenChangeComplete?.(!0)}}),Xn(d,{closeDelay:R}),_("div",t,{state:{open:u,side:a,align:c,instant:p,transitionStatus:f},ref:[o,l.context.popupRef,l.useStateSetter("popupElement")],props:[Sr,m,Zo(f),i],stateAttributesMapping:ro})});var jF=T(M(),1);var YF=jF.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,l=Mr(),{arrowRef:a,side:c,align:u,arrowUncentered:p,arrowStyles:f}=jl(),d={open:l.useState("open"),side:c,align:u,uncentered:p};return _("div",t,{state:d,ref:[a,o],props:[{style:f,"aria-hidden":!0},i],stateAttributesMapping:Qt})});var KF=T(M(),1);var zF=KF.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,l=Mr(),a=l.useState("open"),c=l.useState("mounted"),u=l.useState("transitionStatus");return _("div",t,{state:{open:a,transitionStatus:u},ref:[o],props:[{role:"presentation",hidden:!c,style:{pointerEvents:"none",userSelect:"none",WebkitUserSelect:"none"}},i],stateAttributesMapping:ro})});var $F=T(M(),1);var XF=$F.forwardRef(function(t,o){let{render:r,className:n,style:s,children:i,...l}=t,a=Mr(),c=jl(),u=a.useState("instantType"),{children:p,state:f}=xa({store:a,side:c.side,children:i}),m={activationDirection:f.activationDirection,transitioning:f.transitioning,instant:u};return _("div",t,{state:m,ref:o,props:[l,{children:p}],stateAttributesMapping:ga})});var Bp=class extends Cn{constructor(){super(IF(),"PreviewCard")}open(t){this.openByTrigger(t)}close(){this.closePopup()}get isOpen(){return this.attachedStore?.select("open")??!1}};function qF(){return new Bp}var PE={};ae(PE,{popupOpen:()=>v5});var v5=Mt.popupOpen;var TE={};ae(TE,{anchorHeight:()=>T5,anchorWidth:()=>P5,availableHeight:()=>S5,availableWidth:()=>E5,positionerHeight:()=>M5,positionerWidth:()=>I5,transformOrigin:()=>w5});var E5="--available-width",S5="--available-height",P5="--anchor-width",T5="--anchor-height",w5="--transform-origin",I5="--positioner-width",M5="--positioner-height";var wE={};ae(wE,{align:()=>V5,anchorHidden:()=>A5,closed:()=>N5,open:()=>D5,side:()=>O5});var D5=ce.open,N5=ce.closed,A5=ce.anchorHidden,O5=ce.side,V5=ce.align;var IE={};ae(IE,{align:()=>H5,closed:()=>L5,endingStyle:()=>_5,open:()=>F5,side:()=>B5,startingStyle:()=>k5});var F5=ce.open,L5=ce.closed,k5=ce.startingStyle,_5=ce.endingStyle,B5=ce.side,H5=ce.align;var ME={};ae(ME,{align:()=>j5,closed:()=>G5,open:()=>U5,side:()=>W5,uncentered:()=>Y5});var U5=ce.open,G5=ce.closed,W5=ce.side,j5=ce.align,Y5="data-uncentered";var DE={};ae(DE,{closed:()=>z5,endingStyle:()=>X5,open:()=>K5,startingStyle:()=>$5});var K5=ce.open,z5=ce.closed,$5=ce.startingStyle,X5=ce.endingStyle;var NE={};ae(NE,{popupHeight:()=>J5,popupWidth:()=>q5});var q5="--popup-width",J5="--popup-height";var AE={};ae(AE,{activationDirection:()=>eJ,current:()=>Q5,instant:()=>oJ,previous:()=>Z5,transitioning:()=>tJ});var Q5="data-current",Z5="data-previous",eJ="data-activation-direction",tJ="data-transitioning",oJ="data-instant";var Ei={};ae(Ei,{Indicator:()=>tL,Label:()=>sL,Root:()=>JF,Track:()=>ZF,Value:()=>rL});var vi=T(M(),1);var hR=T(M(),1),OE=hR.createContext(void 0);function Ta(){let e=hR.useContext(OE);if(e===void 0)throw new Error(Me(51));return e}var bR={};ae(bR,{complete:()=>VE,indeterminate:()=>FE,progressing:()=>LE});var VE="data-complete",FE="data-indeterminate",LE="data-progressing";var Ys={status(e){return e==="progressing"?{[LE]:""}:e==="complete"?{[VE]:""}:e==="indeterminate"?{[FE]:""}:null}};var JF=vi.forwardRef(function(t,o){let{format:r,getAriaValueText:n,locale:s,max:i=100,min:l=0,value:a,render:c,className:u,children:p,style:f,...m}=t,[d,R]=vi.useState(),g="indeterminate",b=null,x=null,h="",y="indeterminate progress";if(a!=null&&Number.isFinite(a)){let N=di(a,l,i);b=gt(Number.isNaN(N)?0:N,0,100),x=gt(a,l,i),g=x===i?"complete":"progressing",h=r?tr(x,s,r):tr(b/100,s,{style:"percent"}),y=h}let C=vi.useMemo(()=>({status:g}),[g]),S={"aria-labelledby":d,"aria-valuemax":i,"aria-valuemin":l,"aria-valuenow":x??void 0,"aria-valuetext":n?n(h,a):y,role:"progressbar",children:v(vi.Fragment,{children:[p,v("span",{role:"presentation",style:co,children:"x"})]})},E=vi.useMemo(()=>({formattedValue:h,percentageValue:b,setLabelId:R,state:C,value:a}),[h,b,R,C,a]),P=_("div",t,{state:C,ref:o,props:[S,m],stateAttributesMapping:Ys});return v(OE.Provider,{value:E,children:P})});var QF=T(M(),1);var ZF=QF.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,{state:l}=Ta();return _("div",t,{state:l,ref:o,props:i,stateAttributesMapping:Ys})});var eL=T(M(),1);var tL=eL.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,{percentageValue:l,state:a}=Ta(),c=l==null?{}:{insetInlineStart:0,height:"inherit",width:`${l}%`};return _("div",t,{state:a,ref:o,props:[{style:c},i],stateAttributesMapping:Ys})});var oL=T(M(),1);var rL=oL.forwardRef(function(t,o){let{className:r,render:n,children:s,style:i,...l}=t,{value:a,formattedValue:c,state:u}=Ta(),p=u.status==="indeterminate";return _("span",t,{state:u,ref:o,props:[{"aria-hidden":!0,children:typeof s=="function"?s(p?"indeterminate":c,a):p?null:c},l],stateAttributesMapping:Ys})});var nL=T(M(),1);var sL=nL.forwardRef(function(t,o){let{render:r,className:n,style:s,id:i,...l}=t,{setLabelId:a,state:c}=Ta(),u=ia(i,a);return _("span",t,{state:c,ref:o,props:[{id:u,role:"presentation"},l],stateAttributesMapping:Ys})});var kE={};ae(kE,{complete:()=>rJ,indeterminate:()=>nJ,progressing:()=>sJ});var rJ="data-complete",nJ="data-indeterminate",sJ="data-progressing";var _E={};ae(_E,{complete:()=>iJ,indeterminate:()=>aJ,progressing:()=>cJ});var iJ="data-complete",aJ="data-indeterminate",cJ="data-progressing";var BE={};ae(BE,{complete:()=>lJ,indeterminate:()=>uJ,progressing:()=>pJ});var lJ="data-complete",uJ="data-indeterminate",pJ="data-progressing";var HE={};ae(HE,{complete:()=>fJ,indeterminate:()=>dJ,progressing:()=>mJ});var fJ="data-complete",dJ="data-indeterminate",mJ="data-progressing";var Yl={};ae(Yl,{Indicator:()=>lL,Root:()=>cL});var Si=T(M(),1);var CR={};ae(CR,{checked:()=>UE,dirty:()=>yJ,disabled:()=>gJ,filled:()=>vJ,focused:()=>EJ,invalid:()=>bJ,readonly:()=>xJ,required:()=>RJ,touched:()=>CJ,unchecked:()=>GE,valid:()=>hJ});var UE="data-checked",GE="data-unchecked",gJ="data-disabled",xJ="data-readonly",RJ="data-required",hJ="data-valid",bJ="data-invalid",CJ="data-touched",yJ="data-dirty",vJ="data-filled",EJ="data-focused";var Hp={checked(e){return e?{[UE]:""}:{[GE]:""}},...Ot,...Lt};var yR=T(M(),1),WE=yR.createContext(void 0);function iL(){return yR.useContext(WE)}var vR=T(M(),1),jE=vR.createContext(void 0);function aL(){let e=vR.useContext(jE);if(e===void 0)throw new Error(Me(52));return e}var cL=Si.forwardRef(function(t,o){let{render:r,className:n,disabled:s=!1,readOnly:i=!1,required:l=!1,"aria-labelledby":a,value:c,inputRef:u,nativeButton:p=!1,id:f,style:m,...d}=t,R=iL(),{disabled:g,readOnly:b,required:x,form:h,checkedValue:y,touched:C=!1,validation:S,name:E,setCheckedValue:P=Qe,setTouched:N=Qe,registerInputRef:w=Qe}=R??{},{setTouched:D,setFilled:G,state:I,disabled:O}=mt(),A=na(),{labelId:L,getDescriptionProps:X}=Ft(),F=O||A.disabled||g||s,B=b||i,k=x||l,Y=h,V=R?y===c:c==="",q=Si.useRef(null),H=Bo(F,q),K=Si.useRef(null),Z=S?.registerInput,ee=Si.useCallback(xe=>Z?.(xe,{controlRef:q,value:void 0}),[Z]),Q=kt(u,K,w,ee);z(()=>{K.current?.checked&&G(!0)},[G]),z(()=>{if(K.current){if(F&&V){w(null);return}w(K.current)}},[V,F,w]);let te=je(),de=xo({id:f}),ue=p?void 0:de,J=sa(a,L,K,!p,ue,d["aria-label"]),re={role:"radio","aria-checked":V,"aria-labelledby":J,[pc]:V?"":void 0,id:p?de:te,onKeyDown(xe){xe.key==="Enter"&&xe.preventDefault()},onClick(xe){if(xe.defaultPrevented||F||B)return;xe.preventDefault();let ve=K.current;ve&&Wr(ve,xe)},onFocus(xe){H(!0),!(xe.defaultPrevented||F||B||!C)&&(K.current?.click(),N(!1))},onBlur(){R||H(!1)}},{getButtonProps:$,buttonRef:ie}=ft({disabled:F,native:p,composite:!1}),le={type:"radio",ref:Q,form:Y,id:ue,name:E,tabIndex:-1,style:E?vr:co,"aria-hidden":!0,...c!==void 0?{value:ol(c)}:qe,disabled:F,checked:V,required:k,readOnly:B,onChange(xe){if(xe.nativeEvent.defaultPrevented||F||B||c===void 0)return;let ve=fe(U.none,xe.nativeEvent);P(c,ve),!ve.isCanceled&&D(!0)},onClick(xe){xe.stopPropagation()},onFocus(){q.current?.focus()}},he=Si.useMemo(()=>({...I,required:k,disabled:F,readOnly:B,checked:V}),[I,F,B,V,k]),Pe=he,ge=R!==void 0,Ce=[o,q,ie],W=[re,d,$,X,S?xe=>S.getValidationProps(F,xe):qe],me=_("span",t,{enabled:!ge,state:he,ref:Ce,props:W,stateAttributesMapping:Hp});return v(jE.Provider,{value:Pe,children:[ge?v(Tr,{tag:"span",render:r,className:n,style:m,state:he,refs:Ce,props:W,stateAttributesMapping:Hp}):me,v("input",{...le,suppressHydrationWarning:!0})]})});var ER=T(M(),1);var lL=ER.forwardRef(function(t,o){let{render:r,className:n,style:s,keepMounted:i=!1,...l}=t,a=aL(),c=a.checked,{mounted:u,transitionStatus:p,setMounted:f}=Xt(c),m={...a,transitionStatus:p},d=ER.useRef(null),R=i||u,g=_("span",t,{ref:[o,d],state:m,props:l,stateAttributesMapping:Hp});return St({batch:!0,enabled:!c,open:c,ref:d,onComplete(){c||f(!1)}}),R?g:null});var YE={};ae(YE,{checked:()=>SJ,dirty:()=>VJ,disabled:()=>TJ,endingStyle:()=>DJ,filled:()=>FJ,focused:()=>LJ,invalid:()=>AJ,readonly:()=>wJ,required:()=>IJ,startingStyle:()=>MJ,touched:()=>OJ,unchecked:()=>PJ,valid:()=>NJ});var SJ="data-checked",PJ="data-unchecked",TJ="data-disabled",wJ="data-readonly",IJ="data-required",MJ=bt.startingStyle,DJ=bt.endingStyle,NJ="data-valid",AJ="data-invalid",OJ="data-touched",VJ="data-dirty",FJ="data-filled",LJ="data-focused";var ss=T(M(),1);var kJ=[pC],SR=ss.forwardRef(function(t,o){let{render:r,className:n,disabled:s,readOnly:i,required:l,onValueChange:a,value:c,defaultValue:u,form:p,name:f,inputRef:m,id:d,style:R,...g}=t,{setTouched:b,setFocused:x,validationMode:h,name:y,disabled:C,state:S,validation:E,setDirty:P,setFilled:N,validityData:w}=mt(),{labelId:D}=Ft(),{clearErrors:G,elementRef:I}=Kt(),O=va(!0),A=C||s,L=y??f,X=je(d),[F,B]=Nt({controlled:c,default:u,name:"RadioGroup",state:"value"}),[k,Y]=ss.useState(!1),V=j((le,he)=>{a?.(le,he),!he.isCanceled&&B(le)}),q=E.getInputControl,H=ss.useMemo(()=>({get current(){return q()}}),[q]),K=ss.useRef(null),Z=ss.useRef(null),ee=kt(K,m),Q=ss.useRef(ee),te=j(le=>{K.current===le&&Q.current===ee||(Q.current=ee,ee?.(le))});z(()=>{te(K.current)},[ee,te]);let de=j(le=>{if(le){if(!le.disabled){Z.current||(Z.current=le);let he=K.current;(le.checked||he==null||he.disabled)&&te(le)}return()=>{Z.current===le&&(Z.current=null),K.current===le&&te(null)}}}),ue=j(()=>{let le=I.current;if(!le)return F??null;for(let he of E.registeredInputs.keys())if(he.checked&&rp(he,le))return F??null;return null});_o(H,X,F??null,ue,!A,f),$t(F,()=>{G(L),P(F!==w.initialValue),N(F!=null),E.change(F);let le=Z.current;F==null&&le&&!le.disabled&&te(le)});let J=D??O?.legendId,re={...S,disabled:A??!1,required:l??!1,readOnly:i??!1},$=ss.useMemo(()=>({checkedValue:F,disabled:A,form:p,validation:E,name:L,readOnly:i,registerInputRef:de,required:l,setCheckedValue:V,setTouched:Y,touched:k}),[F,A,p,E,L,i,de,l,V,Y,k]),ie={id:d,role:"radiogroup","aria-required":l||void 0,"aria-disabled":A||void 0,"aria-readonly":i||void 0,"aria-labelledby":J,onBlur(le){Ee(le.currentTarget,le.relatedTarget)||(Y(!1),b(!0),x(!1),h==="onBlur"&&E.commit(F))},onKeyDownCapture(le){le.key.startsWith("Arrow")&&Y(!0)}};return v(WE.Provider,{value:$,children:v(Hr,{render:r,className:n,style:R,state:re,props:[ie,g,le=>E.getValidationProps(A??!1,le)],refs:[o],stateAttributesMapping:Lt,enableHomeAndEndKeys:!1,modifierKeys:kJ})})});var KE={};ae(KE,{disabled:()=>_J});var _J="data-disabled";var zs={};ae(zs,{Content:()=>CL,Corner:()=>SL,Root:()=>pL,Scrollbar:()=>bL,Thumb:()=>vL,Viewport:()=>RL});var Yt=T(M(),1);var PR=T(M(),1),zE=PR.createContext(void 0);function Ks(){let e=PR.useContext(zE);if(e===void 0)throw new Error(Me(53));return e}function is(e,t,o){if(!e)return 0;let r=getComputedStyle(e),n=`${t}${o==="x"?"Inline":"Block"}`,s=parseFloat(r[`${n}Start`]);return o==="x"&&t==="margin"?s*2:s+parseFloat(r[`${n}End`])}var TR="base-ui-disable-scrollbar",Pi={className:TR,getElement(e){return v("style",{nonce:e,href:TR,precedence:"base-ui:low",children:`.${TR}{scrollbar-width:none}.${TR}::-webkit-scrollbar{display:none}`})}};var wR={};ae(wR,{hasOverflowX:()=>$E,hasOverflowY:()=>XE,overflowXEnd:()=>JE,overflowXStart:()=>qE,overflowYEnd:()=>ZE,overflowYStart:()=>QE,scrolling:()=>BJ});var BJ="data-scrolling",$E="data-has-overflow-x",XE="data-has-overflow-y",qE="data-overflow-x-start",JE="data-overflow-x-end",QE="data-overflow-y-start",ZE="data-overflow-y-end";var Kl=e=>t=>t?{[e]:""}:null,wa={hasOverflowX:Kl($E),hasOverflowY:Kl(XE),overflowXStart:Kl(qE),overflowXEnd:Kl(JE),overflowYStart:Kl(QE),overflowYEnd:Kl(ZE),cornerHidden:()=>null};var Wp={};ae(Wp,{scrollAreaCornerHeight:()=>Up,scrollAreaCornerWidth:()=>Gp});var Up="--scroll-area-corner-height",Gp="--scroll-area-corner-width";var IR={};ae(IR,{hasOverflowX:()=>GJ,hasOverflowY:()=>WJ,hovering:()=>HJ,orientation:()=>eS,overflowXEnd:()=>YJ,overflowXStart:()=>jJ,overflowYEnd:()=>zJ,overflowYStart:()=>KJ,scrolling:()=>UJ});var eS="data-orientation",HJ="data-hovering",UJ="data-scrolling",GJ="data-has-overflow-x",WJ="data-has-overflow-y",jJ="data-overflow-x-start",YJ="data-overflow-x-end",KJ="data-overflow-y-start",zJ="data-overflow-y-end";var $J={x:0,y:0},uL={width:0,height:0},XJ={xStart:!1,xEnd:!1,yStart:!1,yEnd:!1},qJ={x:!0,y:!0,corner:!0},pL=Yt.forwardRef(function(t,o){let{render:r,className:n,overflowEdgeThreshold:s,style:i,...l}=t,{xStart:a,xEnd:c,yStart:u,yEnd:p}=JJ(s),f=je(),m=it(),d=it(),{nonce:R,disableStyleElements:g}=Dl(),[b,x]=Yt.useState(!1),[h,y]=Yt.useState(!1),[C,S]=Yt.useState(!1),[E,P]=Yt.useState(!1),[N,w]=Yt.useState(!1),[D,G]=Yt.useState(uL),[I,O]=Yt.useState(uL),[A,L]=Yt.useState(XJ),[X,F]=Yt.useState(qJ),B=Yt.useRef(null),k=Yt.useRef(null),Y=Yt.useRef(null),V=Yt.useRef(null),q=Yt.useRef(null),H=Yt.useRef(null),K=Yt.useRef(null),Z=Yt.useRef(null),ee=Yt.useRef(0),Q=Yt.useRef(0),te=Yt.useRef(0),de=Yt.useRef(0),ue=Yt.useRef("vertical"),J=Yt.useRef($J),re=Yt.useRef(null);function $(oe){let ye=oe?S:y,be=oe?m:d;ye(!0),be.start(500,()=>{ye(!1)})}let ie=j(oe=>{let ye=oe.x-J.current.x,be=oe.y-J.current.y;J.current=oe,be!==0&&$(!0),ye!==0&&$(!1)}),le=j(()=>{let oe=k.current;oe&&re.current===null&&(re.current=oe.style.scrollSnapType,oe.style.scrollSnapType="none")}),he=j(oe=>{if(oe.button!==0||Z.current!==null&&(ue.current==="vertical"?q.current:H.current)?.hasPointerCapture(Z.current))return;Z.current=oe.pointerId,ee.current=oe.clientY,Q.current=oe.clientX,ue.current=oe.currentTarget.getAttribute(eS);let ye=k.current;ye&&(te.current=ye.scrollTop,de.current=ye.scrollLeft,le()),(ue.current==="vertical"?q.current:H.current)?.setPointerCapture(oe.pointerId)}),Pe=j(oe=>{if(oe.pointerId!==Z.current)return;Z.current=null,(ue.current==="vertical"?S:y)(!1),re.current!==null&&(k.current&&(k.current.style.scrollSnapType=re.current),re.current=null);let ye=ue.current==="vertical"?q.current:H.current;ye?.hasPointerCapture(oe.pointerId)&&ye.releasePointerCapture(oe.pointerId)}),ge=j(oe=>{if(oe.pointerId!==Z.current)return;if(oe.buttons%2===0){Pe(oe);return}let ye=k.current;if(!ye)return;let be=ue.current==="vertical",se=be?q.current:H.current,Ne=be?Y.current:V.current;if(!se||!Ne)return;let Ae=be?"y":"x",Ve=is(Ne,"padding",Ae),Te=is(se,"margin",Ae),De=be?se.offsetHeight:se.offsetWidth,We=(be?Ne.offsetHeight:Ne.offsetWidth)-De-Ve-Te,Ge=be?oe.clientY-ee.current:oe.clientX-Q.current,He=We<=0?0:Ge/We,Ue=be?ye.scrollHeight:ye.scrollWidth,rt=be?ye.clientHeight:ye.clientWidth,pt=(be?te.current:de.current)+He*(Ue-rt);be?ye.scrollTop=pt:ye.scrollLeft=pt,oe.preventDefault(),$(be)});function Ce(oe){P(oe.pointerType==="touch")}function W(oe){if(Ce(oe),oe.pointerType!=="touch"){let ye=Ee(B.current,oe.target);x(ye)}}let me=Yt.useMemo(()=>({scrolling:h||C,hasOverflowX:!X.x,hasOverflowY:!X.y,overflowXStart:A.xStart,overflowXEnd:A.xEnd,overflowYStart:A.yStart,overflowYEnd:A.yEnd,cornerHidden:X.corner}),[h,C,X.x,X.y,X.corner,A]),xe={role:"presentation",onPointerEnter:W,onPointerMove:W,onPointerDown:Ce,onPointerLeave(){x(!1)},style:{position:"relative",[Up]:`${D.height}px`,[Gp]:`${D.width}px`}},ve=_("div",t,{state:me,ref:[o,B],props:[xe,l],stateAttributesMapping:wa}),ne=Yt.useMemo(()=>({handlePointerDown:he,handlePointerMove:ge,handlePointerUp:Pe,handleScroll:ie,disableViewportSnap:le,cornerSize:D,setCornerSize:G,thumbSize:I,setThumbSize:O,hasMeasuredScrollbar:N,setHasMeasuredScrollbar:w,touchModality:E,cornerRef:K,scrollingX:h,scrollingY:C,hovering:b,setHovering:x,viewportRef:k,scrollbarYRef:Y,scrollbarXRef:V,thumbYRef:q,thumbXRef:H,rootId:f,hiddenState:X,setHiddenState:F,overflowEdges:A,setOverflowEdges:L,viewportState:me,overflowEdgeThreshold:{xStart:a,xEnd:c,yStart:u,yEnd:p}}),[he,ge,Pe,ie,le,D,I,N,E,h,C,b,f,X,A,me,a,c,u,p]);return v(zE.Provider,{value:ne,children:[!g&&Pi.getElement(R),ve]})});function JJ(e){let t=typeof e=="number"?{xStart:e,xEnd:e,yStart:e,yEnd:e}:e;return{xStart:Math.max(0,t?.xStart||0),xEnd:Math.max(0,t?.xEnd||0),yStart:Math.max(0,t?.yStart||0),yEnd:Math.max(0,t?.yEnd||0)}}var hc=T(M(),1);var MR=T(M(),1),tS=MR.createContext(void 0);function fL(){let e=MR.useContext(tS);if(e===void 0)throw new Error(Me(55));return e}var gn=1;function zl(e,t){return Math.max(0,e-t)}function Ti(e,t){if(t<=0)return 0;let o=gt(e,0,t),r=o,n=t-o,s=r<=gn,i=n<=gn;return s&&i?r<=n?0:t:s?0:i?t:o}var DR={};ae(DR,{scrollAreaOverflowXEnd:()=>rS,scrollAreaOverflowXStart:()=>oS,scrollAreaOverflowYEnd:()=>sS,scrollAreaOverflowYStart:()=>nS});var oS="--scroll-area-overflow-x-start",rS="--scroll-area-overflow-x-end",nS="--scroll-area-overflow-y-start",sS="--scroll-area-overflow-y-end";var Kp={};ae(Kp,{scrollAreaThumbHeight:()=>jp,scrollAreaThumbWidth:()=>Yp});var jp="--scroll-area-thumb-height",Yp="--scroll-area-thumb-width";var xL=[oS,rS,nS,sS],mL=!1;function QJ(){mL||dt.engine.webkit||(typeof CSS<"u"&&"registerProperty"in CSS&&xL.forEach(e=>{try{CSS.registerProperty({name:e,syntax:"<length>",inherits:!1,initialValue:"0px"})}catch{}}),mL=!0)}var RL=hc.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,{viewportRef:l,scrollbarYRef:a,scrollbarXRef:c,thumbYRef:u,thumbXRef:p,cornerRef:f,cornerSize:m,setCornerSize:d,setThumbSize:R,rootId:g,setHiddenState:b,hiddenState:x,setHasMeasuredScrollbar:h,handleScroll:y,touchModality:C,setHovering:S,setOverflowEdges:E,overflowEdgeThreshold:P,viewportState:N}=Ks(),w=At(),D=hc.useRef(!0),G=hc.useRef([NaN,NaN,NaN,NaN]),I=it(),O=it(),A=j(()=>{let k=l.current,Y=a.current,V=c.current,q=u.current,H=p.current,K=f.current;if(!k)return;let Z=k.scrollHeight,ee=k.scrollWidth,Q=k.clientHeight,te=k.clientWidth,de=k.scrollTop,ue=k.scrollLeft,J=G.current,re=Number.isNaN(J[0]);if(J[0]=Q,J[1]=Z,J[2]=te,J[3]=ee,re&&h(!0),Z===0||ee===0)return;let $=ZJ(k),ie=$.y,le=$.x,he=te/ee,Pe=Q/Z,ge=Math.max(0,ee-te),Ce=Math.max(0,Z-Q),W=0,me=0;le||(W=Ti(w==="rtl"?-ue:ue,ge),me=ge-W);let xe=ie?0:Ti(de,Ce),ve=ie?0:Ce-xe,ne=le?0:te,oe=ie?0:Q,ye=0,be=0;!le&&!ie&&(ye=Y?.offsetWidth||0,be=V?.offsetHeight||0);let se=m.width===0&&m.height===0,Ne=se?ye:0,Ae=se?be:0,Ve=is(V,"padding","x"),Te=is(Y,"padding","y"),De=is(H,"margin","x"),ze=is(q,"margin","y"),We=ne-Ve-De,Ge=oe-Te-ze,He=V?Math.min(V.offsetWidth-Ne,We):We,Ue=Y?Math.min(Y.offsetHeight-Ae,Ge):Ge,rt=Math.max(16,He*he),et=Math.max(16,Ue*Pe);if(R(Se=>NR(Se,{width:rt,height:et})),Y&&q){let Se=Y.offsetHeight-et-Te-ze,ke=gL(q,jp,de,Ce,Z,et,Se);q.style.transform=`translate3d(0,${ke}px,0)`}if(V&&H){let Se=V.offsetWidth-rt-Ve-De,ke=w==="rtl"?-ue:ue,Ie=gL(H,Yp,ke,ge,ee,rt,Se);H.style.transform=`translate3d(${w==="rtl"?-Ie:Ie}px,0,0)`}let pt=[W,me,xe,ve];xL.forEach((Se,ke)=>{k.style.setProperty(Se,`${pt[ke]}px`)}),K&&d(Se=>NR(Se,{width:ye,height:be})),b(Se=>NR(Se,$));let wt={xStart:!le&&W>P.xStart,xEnd:!le&&me>P.xEnd,yStart:!ie&&xe>P.yStart,yEnd:!ie&&ve>P.yEnd};E(Se=>NR(Se,wt))});z(()=>{QJ()},[]),z(()=>{queueMicrotask(A)},[A,x,w,P.xStart,P.xEnd,P.yStart,P.yEnd]),z(()=>{l.current?.matches(":hover")&&S(!0)},[l,S]),z(()=>{let k=l.current;if(typeof ResizeObserver>"u"||!k)return;let Y=!1,V=new ResizeObserver(()=>{if(!Y){Y=!0;let q=G.current;if(q[0]===k.clientHeight&&q[1]===k.scrollHeight&&q[2]===k.clientWidth&&q[3]===k.scrollWidth)return}A()});return V.observe(k),O.start(0,()=>{let q=Ru(k,{subtree:!0});q.length!==0&&Promise.allSettled(q.map(H=>H.finished.then(Qe))).then(A).catch(()=>{})}),()=>{V.disconnect(),O.clear()}},[A,l,O]);function L(){D.current=!1}let X={...g&&{"data-id":`${g}-viewport`},tabIndex:x.x&&x.y?-1:0,className:Pi.className,style:{overflow:"scroll"},onScroll(){l.current&&(A(),(C||!D.current)&&y({x:l.current.scrollLeft,y:l.current.scrollTop}),I.start(100,()=>{D.current=!0}))},onWheel:L,onPointerMove:L,onPointerEnter:L,onKeyDown:L},F=_("div",t,{ref:[o,l],state:N,props:[X,i],stateAttributesMapping:wa}),B=hc.useMemo(()=>({computeThumbPosition:A}),[A]);return v(tS.Provider,{value:B,children:F})});function ZJ(e){let t=e.clientHeight>=e.scrollHeight,o=e.clientWidth>=e.scrollWidth;return{y:t,x:o,corner:t||o}}function NR(e,t){for(let o in t)if(e[o]!==t[o])return t;return e}function gL(e,t,o,r,n,s,i){let l=gt(o,0,r),a=o-l,c=Math.max(16,s*n/(n+Math.abs(a)));return e.style.setProperty(t,a?`${c}px`:""),(r?l/r*i:0)+(a>0?s-c:0)}var OR=T(M(),1);var AR=T(M(),1),iS=AR.createContext(void 0);function hL(){let e=AR.useContext(iS);if(e===void 0)throw new Error(Me(54));return e}var bL=OR.forwardRef(function(t,o){let{render:r,className:n,orientation:s="vertical",keepMounted:i=!1,style:l,...a}=t,{hovering:c,scrollingX:u,scrollingY:p,hiddenState:f,scrollbarYRef:m,scrollbarXRef:d,viewportRef:R,thumbYRef:g,thumbXRef:b,handlePointerDown:x,handlePointerUp:h,handleScroll:y,disableViewportSnap:C,rootId:S,thumbSize:E,hasMeasuredScrollbar:P,viewportState:N}=Ks(),w=s==="vertical",D={...N,hovering:c,scrolling:w?p:u,orientation:s},G=At(),I=!P&&!i,O=w?f.y:f.x,A=i||!O;OR.useEffect(()=>{if(!A)return;let F=R.current,B=w?m.current:d.current;if(!B)return;function k(Y){if(!F||Y.ctrlKey)return;let V=!w,q=V?"scrollLeft":"scrollTop",H=V?Y.deltaX:Y.deltaY;if(H===0)return;let K=V?F.scrollWidth-F.clientWidth:F.scrollHeight-F.clientHeight,Z=V&&G==="rtl"?-K:0,ee=V&&G==="rtl"?0:K,Q=F[q];Q<=Z&&H<0||Q>=ee&&H>0||(Y.preventDefault(),F[q]=Math.min(ee,Math.max(Z,Q+H)),y({x:F.scrollLeft,y:F.scrollTop}))}return Ye(B,"wheel",k,{passive:!1})},[G,y,w,d,m,A,R]);let L={...S&&{"data-id":`${S}-scrollbar`},"aria-hidden":!0,onPointerDown(F){if(F.button!==0)return;let B=$e(F.nativeEvent),k=w?g.current:b.current;if(k&&Ee(k,B))return;let Y=R.current;if(!Y)return;let V=w?m.current:d.current;if(!k||!V)return;let q=w?"y":"x",H=is(k,"margin",q),K=is(V,"padding",q),Z=w?k.offsetHeight:k.offsetWidth,ee=V.getBoundingClientRect(),Q=w?F.clientY-ee.top-Z/2-K+H/2:F.clientX-ee.left-Z/2-K+H/2,te=w?Y.scrollHeight:Y.scrollWidth,de=w?Y.clientHeight:Y.clientWidth,J=(w?V.offsetHeight:V.offsetWidth)-Z-K-H;if(J<=0)return;let re=Q/J,$=te-de;C(),w?Y.scrollTop=re*$:G==="rtl"?Y.scrollLeft=-(1-re)*$:Y.scrollLeft=re*$,y({x:Y.scrollLeft,y:Y.scrollTop}),x(F)},onMouseDown(F){F.preventDefault()},onPointerUp:h,onPointerCancel:h,style:{position:"absolute",touchAction:"none",WebkitUserSelect:"none",userSelect:"none",visibility:I?"hidden":void 0,...w?{top:0,bottom:`var(${Up})`,insetInlineEnd:0,[jp]:`${E.height}px`}:{insetInlineStart:0,insetInlineEnd:`var(${Gp})`,bottom:0,[Yp]:`${E.width}px`}}},X=_("div",t,{ref:[o,w?m:d],state:D,props:[L,a],stateAttributesMapping:wa});return A?v(iS.Provider,{value:s,children:X}):null});var zp=T(M(),1);var CL=zp.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,{computeThumbPosition:l}=fL(),{hasMeasuredScrollbar:a,viewportState:c}=Ks(),u=zp.useRef(null),p=zp.useRef(a);return z(()=>{if(typeof ResizeObserver>"u")return;let m=!1,d=new ResizeObserver(()=>{!m&&(m=!0,!p.current)||l()});return u.current&&d.observe(u.current),()=>{d.disconnect()}},[l]),_("div",t,{ref:[o,u],state:c,stateAttributesMapping:wa,props:[{role:"presentation",style:{minWidth:"fit-content"}},i]})});var yL=T(M(),1);var vL=yL.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,{thumbYRef:l,thumbXRef:a,handlePointerDown:c,handlePointerMove:u,handlePointerUp:p,scrollingX:f,scrollingY:m,hasMeasuredScrollbar:d}=Ks(),R=hL(),g=R==="vertical";return _("div",t,{ref:[o,g?l:a],state:{scrolling:g?m:f,orientation:R},props:[{onPointerDown:c,onPointerMove:u,onPointerUp:p,onPointerCancel:p,style:{visibility:d?void 0:"hidden",...g?{height:"var(--scroll-area-thumb-height)"}:{width:"var(--scroll-area-thumb-width)"}}},i]})});var EL=T(M(),1);var SL=EL.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,{cornerRef:l,cornerSize:a,hiddenState:c}=Ks(),u=_("div",t,{ref:[o,l],props:[{"aria-hidden":!0,style:{position:"absolute",bottom:0,insetInlineEnd:0,width:a.width,height:a.height}},i]});return c.corner?null:u});var aS={};ae(aS,{hasOverflowX:()=>t4,hasOverflowY:()=>o4,overflowXEnd:()=>n4,overflowXStart:()=>r4,overflowYEnd:()=>i4,overflowYStart:()=>s4,scrolling:()=>e4});var e4="data-scrolling",t4="data-has-overflow-x",o4="data-has-overflow-y",r4="data-overflow-x-start",n4="data-overflow-x-end",s4="data-overflow-y-start",i4="data-overflow-y-end";var cS={};ae(cS,{hasOverflowX:()=>c4,hasOverflowY:()=>l4,overflowXEnd:()=>p4,overflowXStart:()=>u4,overflowYEnd:()=>d4,overflowYStart:()=>f4,scrolling:()=>a4});var a4="data-scrolling",c4="data-has-overflow-x",l4="data-has-overflow-y",u4="data-overflow-x-start",p4="data-overflow-x-end",f4="data-overflow-y-start",d4="data-overflow-y-end";var lS={};ae(lS,{orientation:()=>m4,scrolling:()=>g4});var m4="data-orientation",g4="data-scrolling";var vo={};ae(vo,{Arrow:()=>qL,Backdrop:()=>kL,Group:()=>rk,GroupLabel:()=>sk,Icon:()=>OL,Item:()=>YL,ItemIndicator:()=>zL,ItemText:()=>$L,Label:()=>IL,List:()=>jL,Popup:()=>GL,Portal:()=>FL,Positioner:()=>_L,Root:()=>TL,ScrollDownArrow:()=>ZL,ScrollUpArrow:()=>tk,Separator:()=>ik,Trigger:()=>ML,Value:()=>NL});var uo=T(M(),1);var $l=T(M(),1),uS=$l.createContext(void 0),pS=$l.createContext(void 0);function io(){let e=$l.useContext(uS);if(e===void 0)throw new Error(Me(60));return e}function VR(){let e=$l.useContext(pS);if(e===void 0)throw new Error(Me(61));return e}var PL={id:e=>e.id,labelId:e=>e.labelId,modal:e=>e.modal,multiple:e=>e.multiple,disabled:e=>e.disabled,readOnly:e=>e.readOnly,required:e=>e.required,highlightItemOnHover:e=>e.highlightItemOnHover,items:e=>e.items,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,value:e=>e.value,hasSelectedValue:e=>{let{value:t,multiple:o,itemToStringValue:r}=e;return t==null?!1:o&&Array.isArray(t)?t.length>0:$r(t,r)!==""},hasNullItemLabel:(e,t)=>t?Ld(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMount:e=>e.forceMount,transitionStatus:e=>e.transitionStatus,openMethod:e=>e.openMethod,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{let o=e.isItemEqualToValue,r=e.value;return e.multiple?Array.isArray(r)&&r.some(n=>Qo(t,n,o)):Qo(t,r,o)},isSelectedByFocus:(e,t)=>e.selectedIndex===t,popupProps:e=>e.popupProps,triggerProps:e=>e.triggerProps,itemRoot:e=>e.itemRoot,triggerElement:e=>e.triggerElement,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupSide:e=>e.popupSide,scrollUpArrowVisible:e=>e.scrollUpArrowVisible,scrollDownArrowVisible:e=>e.scrollDownArrowVisible,hasScrollArrows:e=>e.hasScrollArrows};function TL(e){let{id:t,value:o,defaultValue:r=null,onValueChange:n,open:s,defaultOpen:i=!1,onOpenChange:l,name:a,form:c,autoComplete:u,disabled:p=!1,readOnly:f=!1,required:m=!1,modal:d=!0,actionsRef:R,inputRef:g,onOpenChangeComplete:b,items:x,multiple:h=!1,itemToStringLabel:y,itemToStringValue:C,isItemEqualToValue:S=Qa,highlightItemOnHover:E=!0,children:P}=e,{clearErrors:N}=Kt(),{setDirty:w,setTouched:D,setFocused:G,validityData:I,setFilled:O,name:A,disabled:L,validation:X,validationMode:F}=mt(),B=xo({id:t}),k=L||p,Y=A??a,[V,q]=Nt({controlled:o,default:h?r??yt:r,name:"Select",state:"value"}),[H,K]=Nt({controlled:s,default:i,name:"Select",state:"open"}),Z=uo.useRef([]),ee=uo.useRef([]),Q=uo.useRef(null),te=uo.useRef(null),de=uo.useRef(0),ue=uo.useRef(null),J=uo.useRef([]),re=uo.useRef(!1),$=uo.useRef(null),ie=uo.useRef(null),le=uo.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),he=uo.useRef(!1),Pe=uo.useRef(V),{openMethod:ge,triggerProps:Ce}=Zc(H),W=ut(()=>new go({id:B,labelId:void 0,modal:d,multiple:h,disabled:k,readOnly:f,required:m,highlightItemOnHover:E,itemToStringLabel:y,itemToStringValue:C,isItemEqualToValue:S,value:V,open:H,mounted:H,transitionStatus:void 0,items:x,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:qe,triggerProps:qe,itemRoot:{props:qe,multiple:h,disabled:k,readOnly:f,isItemEqualToValue:S},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1},{setValue:Qe,setOpen:Qe,handleScrollArrowVisibility:Qe,onOpenChangeComplete:Qe,listRef:Z,popupRef:Q,scrollHandlerRef:te,scrollArrowsMountedCountRef:de,valueRef:ue,valuesRef:J,labelsRef:ee,typingRef:re,selectionRef:le,firstItemTextRef:$,selectedItemTextRef:ie,alignItemWithTriggerActiveRef:he,initialValueRef:Pe},PL)).current,[me,xe]=uo.useState(!1),{mounted:ve,transitionStatus:ne,forceUnmount:oe}=zi({open:H,ref:Q,preventUnmountOnClose:me,setPreventUnmountOnClose:xe,onUnmount(){W.update({activeIndex:null,openMethod:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1}),b?.(!1)}}),ye=W.useState("activeIndex"),be=W.useState("selectedIndex"),se=W.useState("triggerElement"),Ne=W.useState("positionerElement"),Ae=Fg(ge),Ve=ge??Ae,Te=uo.useMemo(()=>h?"":$r(V,C),[h,V,C]),De=uo.useMemo(()=>h&&Array.isArray(V)?V.map(Be=>$r(Be,C)):$r(V,C),[h,V,C]),ze=Et(se),We=j(()=>De);_o(ze,B,V,We,!k,a);let Ge=h?Array.isArray(V)&&V.length>0:V!=null&&Te!=="";z(()=>{O(Ge)},[Ge,O]),z(function(){let nt=Za(J.current,V,S,h);nt===null&&(ie.current=null),!H&&W.set("selectedIndex",nt)},[h,H,V,S,W]),$t(V,()=>{N(Y),w(Ad(V,I.initialValue,S)),X.change(V)});let He=j((Be,nt)=>{let at=nt,vt=Kn(at);l?.(Be,at),!nt.isCanceled&&(Be||xe(vt()),K(Be),!Be&&(nt.reason===U.focusOut||nt.reason===U.outsidePress)&&(D(!0),G(!1),F==="onBlur"&&X.commit(V)))});uo.useImperativeHandle(R,()=>({unmount:oe,close:()=>{W.state.open&&He(!1,fe(U.imperativeAction))}}),[oe,He,W]);let Ue=j((Be,nt)=>{n?.(Be,nt),!nt.isCanceled&&q(Be)}),rt=j(Be=>{let nt=zl(Be.scrollHeight,Be.clientHeight),at=Ti(Be.scrollTop,nt),vt=at>0,It=at<nt;W.set("scrollUpArrowVisible",vt),W.set("scrollDownArrowVisible",It)}),et=$n({open:H,onOpenChange:He,elements:{reference:se,floating:Ne}}),pt=lr(et,{enabled:!k,event:"mousedown"}),wt=ur(et),Se=za(et,{enabled:!k,listRef:Z,activeIndex:ye,selectedIndex:be,disabledIndices:yt,onNavigate(Be){Be===null&&!H||W.set("activeIndex",Be)},focusItemOnHover:E}),ke=Xa(et,{enabled:!k&&(H||!f&&!h),listRef:ee,activeIndex:ye,selectedIndex:be,disabledIndices:Be=>Hg(Z.current[Be]),onMatch(Be){H?W.set("activeIndex",Be):Ue(J.current[Be],fe(U.none))},onTyping(Be){re.current=Be}}),Ie=uo.useMemo(()=>Pt(ke.reference,Se.reference,wt.reference,pt.reference,Ce),[pt.reference,ke.reference,Se.reference,wt.reference,Ce]),_e=uo.useMemo(()=>Pt(Sr,ke.floating,Se.floating,wt.floating),[ke.floating,Se.floating,wt.floating]),pe=Se.item??qe,we=uo.useMemo(()=>({props:pe,multiple:h,disabled:k,readOnly:f,isItemEqualToValue:S}),[pe,h,k,f,S]);W.useContextCallback("setValue",Ue),W.useContextCallback("setOpen",He),W.useContextCallback("handleScrollArrowVisibility",rt),W.useContextCallback("onOpenChangeComplete",b),Nd(()=>{W.update({popupProps:_e,triggerProps:Ie,itemRoot:we})}),W.useSyncedValues({id:B,modal:d,multiple:h,disabled:k,readOnly:f,required:m,highlightItemOnHover:E,value:V,open:H,mounted:ve,transitionStatus:ne,popupProps:_e,triggerProps:Ie,itemRoot:we,items:x,itemToStringLabel:y,itemToStringValue:C,isItemEqualToValue:S,openMethod:Ve});let Oe=kt(g,X.inputRef),Le=h?void 0:Y,Je=uo.useMemo(()=>!h||!Array.isArray(V)||!Y?null:V.map(Be=>{let nt=$r(Be,C);return v("input",{type:"hidden",form:c,name:Y,value:nt,disabled:k},nt)}),[h,V,c,Y,C,k]);return v(uS.Provider,{value:W,children:[v(pS.Provider,{value:et,children:P}),v("input",{...X.getValidationProps(k,{onFocus(){W.state.triggerElement?.focus({focusVisible:!0})},onChange(Be){if(Be.nativeEvent.defaultPrevented||k||f)return;let nt=Be.currentTarget.value,at=fe(U.none,Be.nativeEvent);function vt(){if(h)return;let It=nt.toLowerCase(),zt=J.current.findIndex(ho=>$r(ho,C).toLowerCase()===It||fr(ho,y).toLowerCase()===It);zt===-1&&(zt=J.current.findIndex((ho,qo)=>{let bo=ee.current[qo];return bo!=null&&bo.toLowerCase()===It}));let Rt=J.current[zt];Rt!=null&&Ue(Rt,at)}W.set("forceMount",!0),queueMicrotask(vt)}}),id:B&&Le==null?`${B}-hidden-input`:void 0,form:c,name:Le,autoComplete:u,value:Te,disabled:k,required:m&&!(h&&Ge),readOnly:f,ref:Oe,style:Y?vr:co,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Je]})}var wL=T(M(),1);var IL=wL.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,l=i;delete l.id;let a=mt(),c=io(),u=c.useState("triggerElement"),p=c.useState("id"),f=il(p),m=aa({id:f,fallbackControlId:u?.id??p,setLabelId(d){let R=typeof d=="function"?d(c.state.labelId):d;c.set("labelId",R)}});return _("div",t,{ref:o,state:a.state,props:[m,i],stateAttributesMapping:Lt})});var Xl=T(M(),1);var FR={};ae(FR,{dirty:()=>S4,disabled:()=>h4,filled:()=>P4,focused:()=>T4,invalid:()=>v4,placeholder:()=>w4,popupOpen:()=>x4,popupSide:()=>fS,pressed:()=>R4,readonly:()=>b4,required:()=>C4,touched:()=>E4,valid:()=>y4});var x4=Mt.popupOpen,R4=Mt.pressed,h4="data-disabled",b4="data-readonly",fS="data-popup-side",C4="data-required",y4="data-valid",v4="data-invalid",E4="data-touched",S4="data-dirty",P4="data-filled",T4="data-focused",w4="data-placeholder";var I4=400,M4={...rn,...Lt,popupSide:e=>e?{[fS]:e}:null,value:()=>null},ML=Xl.forwardRef(function(t,o){let{render:r,className:n,id:s,disabled:i=!1,nativeButton:l=!0,style:a,...c}=t,{setTouched:u,validationMode:p,validation:f,state:m,disabled:d}=mt(),{labelId:R}=Ft(),g=io(),b=g.useState("readOnly"),x=g.useState("required"),h=g.useState("disabled"),y=d||h||i,C=g.useState("open"),S=g.useState("mounted"),E=g.useState("value"),P=g.useState("triggerProps"),N=g.useState("positionerElement"),w=g.useState("listElement"),D=g.useState("popupSide"),G=g.useState("id"),I=g.useState("labelId"),O=g.useState("hasSelectedValue"),A=S&&N?D:null,L=s??G,X=al(R,I);xo({id:s});let F=Et(N),B=Xl.useRef(null),k=Bo(y,B),{getButtonProps:Y,buttonRef:V}=ft({disabled:y,native:l}),q=g.useStateSetter("triggerElement"),H=it(),K=it(),Z=it();Xl.useEffect(()=>{if(C)return Z.start(I4,()=>{g.context.selectionRef.current.allowUnselectedMouseUp=!0,g.context.selectionRef.current.allowSelectedMouseUp=!0}),()=>{Z.clear()};g.context.selectionRef.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},K.clear()},[C,g,K,Z]);let ee=Pt(P,{id:L,role:"combobox","aria-expanded":C,"aria-haspopup":"listbox","aria-controls":C?w?.id??Ga(N)?.id:void 0,"aria-labelledby":X,"aria-readonly":b||void 0,"aria-required":x||void 0,tabIndex:y?-1:0,onFocus(de){k(!0),C&&g.context.alignItemWithTriggerActiveRef.current&&g.context.setOpen(!1,fe(U.none,de.nativeEvent)),H.start(0,()=>{g.set("forceMount",!0)})},onBlur(de){Ee(N,de.relatedTarget)||(u(!0),k(!1),p==="onBlur"&&f.commit(E))},onMouseDown(de){if(C)return;let ue=Fe(de.currentTarget);function J(re){if(!B.current)return;let $=re.target;Ee(B.current,$)||Ee(F.current,$)||sl(re,B.current)||g.context.setOpen(!1,fe(U.cancelOpen,re))}K.start(0,()=>{ue.addEventListener("mouseup",J,{once:!0})})}},c,Y),Q=f.getValidationProps(y,ee);Q.role="combobox";let te={...m,open:C,disabled:y,value:E,readOnly:b,popupSide:A,placeholder:!O};return _("button",t,{ref:[o,B,V,q],state:te,stateAttributesMapping:M4,props:Q})});var DL=T(M(),1);var D4={value:()=>null},NL=DL.forwardRef(function(t,o){let{className:r,render:n,children:s,placeholder:i,style:l,...a}=t,c=io(),u=c.useState("value"),p=c.useState("items"),f=c.useState("itemToStringLabel"),m=c.useState("hasSelectedValue"),d=!m&&i!=null&&s==null,R=c.useState("hasNullItemLabel",d),g={value:u,placeholder:!m},b=null;return typeof s=="function"?b=s(u):s!=null?b=s:d&&!R?b=i:Array.isArray(u)?b=kd(u,p,f):b=Xu(u,p,f),_("span",t,{state:g,ref:[o,c.context.valueRef],props:[{children:b},a],stateAttributesMapping:D4})});var AL=T(M(),1);var OL=AL.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,c={open:io().useState("open")};return _("span",t,{state:c,ref:o,props:[{"aria-hidden":!0,children:"\u25BC"},i],stateAttributesMapping:yr})});var VL=T(M(),1);var FL=VL.forwardRef(function(t,o){let r=io(),n=r.useState("mounted"),s=r.useState("forceMount");return n||s?v(an,{ref:o,...t}):null});var LL=T(M(),1);var N4={...Qt,...Ot},kL=LL.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,l=io(),a=l.useState("open"),c=l.useState("mounted"),u=l.useState("transitionStatus");return _("div",t,{state:{open:a,transitionStatus:u},ref:o,props:[{role:"presentation",hidden:!c,style:{userSelect:"none",WebkitUserSelect:"none"}},i],stateAttributesMapping:N4})});var Nn=T(M(),1);var LR=T(M(),1),dS=LR.createContext(void 0);function Ia(){let e=LR.useContext(dS);if(!e)throw new Error(Me(59));return e}function ql(e,t){e&&Object.assign(e.style,t)}var kR={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"};var A4={position:"fixed"},_L=Nn.forwardRef(function(t,o){let{anchor:r,className:n,render:s,positionMethod:i,side:l,align:a,sideOffset:c,alignOffset:u,collisionBoundary:p="clipping-ancestors",collisionPadding:f,arrowPadding:m,sticky:d,disableAnchorTracking:R,alignItemWithTrigger:g=!0,collisionAvoidance:b=Wi,style:x,...h}=t,y=io(),C=VR(),S=y.useState("open"),E=y.useState("mounted"),P=y.useState("modal"),N=y.useState("value"),w=y.useState("openMethod"),D=y.useState("positionerElement"),G=y.useState("triggerElement"),I=y.useState("isItemEqualToValue"),O=y.useState("transitionStatus"),A=Nn.useRef(null),L=Nn.useRef(null),[X,F]=Nn.useState(g),B=E&&X&&w!=="touch";!E&&X!==g&&F(g),Nn.useImperativeHandle(y.context.alignItemWithTriggerActiveRef,()=>B),ra((B||P)&&S,w==="touch",D,G);let k=Xr({anchor:r,floatingRootContext:C,positionMethod:i,mounted:E,side:l,sideOffset:c,align:a,alignOffset:u,arrowPadding:m,collisionBoundary:p,collisionPadding:f,sticky:d,disableAnchorTracking:R??B,collisionAvoidance:b,keepMounted:!0}),Y=B?"none":k.side,V=B?A4:k.positionerStyles,q={open:S,side:Y,align:k.align,anchorHidden:k.anchorHidden};z(()=>{y.set("popupSide",k.side)},[y,k.side]);let H=y.useStateSetter("positionerElement"),K=Pr(t,q,{styles:V,transitionStatus:O,props:h,refs:[o,H],hidden:!E,inert:!S}),Z=Nn.useRef(0),ee=j(te=>{if(y.context.valuesRef.current.length===0)return;let de=Z.current;Z.current=te.size;let ue=fe(U.none);if(de!==0&&!y.state.multiple&&N!==null&&qn(y.context.valuesRef.current,N,I)===-1){let re=y.context.initialValueRef.current,ie=re!=null&&qn(y.context.valuesRef.current,re,I)!==-1?re:null;y.context.setValue(ie,ue),ie===null&&(y.set("selectedIndex",null),y.context.selectedItemTextRef.current=null)}if(de!==0&&y.state.multiple&&Array.isArray(N)){let J=N.filter(re=>qn(y.context.valuesRef.current,re,I)!==-1);J.length!==N.length&&(y.context.setValue(J,ue),J.length===0&&(y.set("selectedIndex",null),y.context.selectedItemTextRef.current=null))}if(S&&B){y.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let J={height:""};ql(D,J),ql(y.context.popupRef.current,J)}}),Q=Nn.useMemo(()=>({...k,side:Y,alignItemWithTriggerActive:B,setControlledAlignItemWithTrigger:F,scrollUpArrowRef:A,scrollDownArrowRef:L}),[k,Y,B,F]);return v(Jo,{elementsRef:y.context.listRef,labelsRef:y.context.labelsRef,onMapChange:ee,children:v(dS.Provider,{value:Q,children:[E&&P&&v(Ns,{inert:ko(!S),cutout:G}),K]})})});var An=T(M(),1);var BR={};ae(BR,{anchorHeight:()=>L4,anchorWidth:()=>F4,availableHeight:()=>V4,availableWidth:()=>O4,transformOrigin:()=>_R});var O4="--available-width",V4="--available-height",F4="--anchor-width",L4="--anchor-height",_R="--transform-origin";var k4={...Qt,...Ot},GL=An.forwardRef(function(t,o){let{render:r,className:n,style:s,finalFocus:i,...l}=t,a=io(),c=a.useState("multiple"),u=a.useState("readOnly"),p=a.useState("highlightItemOnHover"),f=VR(),{side:m,align:d,alignItemWithTriggerActive:R,isPositioned:g,setControlledAlignItemWithTrigger:b}=Ia(),x=er(!0)!=null,h=At(),{nonce:y,disableStyleElements:C}=Dl(),S=a.useState("id"),E=a.useState("open"),P=a.useState("openMethod"),N=a.useState("mounted"),w=a.useState("popupProps"),D=a.useState("transitionStatus"),G=a.useState("triggerElement"),I=a.useState("positionerElement"),O=a.useState("listElement"),A=An.useRef(!1),L=An.useRef(!1),X=An.useRef({}),F=ao(),B=j(q=>{if(!I||!a.context.popupRef.current||!L.current)return;let H=I.style.top==="0px",K=I.style.bottom==="0px";if(A.current||!R||!H&&!K){a.context.handleScrollArrowVisibility(q);return}let Z=HL(I),ee=$p(I.getBoundingClientRect().height,"y",Z),Q=Fe(I),te=Ze(I),de=te.getComputedStyle(I),ue=parseFloat(de.marginTop),J=parseFloat(de.marginBottom),re=BL(te.getComputedStyle(a.context.popupRef.current)),$=Math.min(Q.documentElement.clientHeight-ue-J,re),ie=q.scrollTop,le=HR(q),he=null,Pe=me=>{I.style.height=`${me}px`},ge=H?le-ie:ie,Ce=Math.min(ee+ge,$);if(ge<=gn){let me=gt(ge,0,$-ee);me>0&&Pe(ee+me),q.scrollTop=H?le:0,$-(ee+me)<=gn&&(A.current=!0),a.context.handleScrollArrowVisibility(q);return}if($-Ce>gn)he=H?1/0:0;else if(K&&ie<le){let me=ee+ge-$;he=ie-(ge-me)}let W=Math.ceil(Ce);if(W!==0&&Pe(W),he!=null){let me=gt(he,0,HR(q));Math.abs(q.scrollTop-me)>gn&&(q.scrollTop=me)}W>=$-gn&&(A.current=!0),a.context.handleScrollArrowVisibility(q)});An.useImperativeHandle(a.context.scrollHandlerRef,()=>B,[B]),St({open:E,ref:a.context.popupRef,onComplete(){E&&a.context.onOpenChangeComplete(!0)}});let k={open:E,transitionStatus:D,side:m,align:d};z(()=>{!I||!a.context.popupRef.current||Object.keys(X.current).length||(X.current={top:I.style.top||"0",left:I.style.left||"0",right:I.style.right,height:I.style.height,bottom:I.style.bottom,minHeight:I.style.minHeight,maxHeight:I.style.maxHeight,marginTop:I.style.marginTop,marginBottom:I.style.marginBottom})},[a,I]),z(()=>{E||R||(L.current=!1,A.current=!1,ql(I,X.current))},[E,R,I]),z(()=>{let q=a.context.popupRef.current;if(!E||!G||!I||!q||R&&!g||a.state.transitionStatus==="ending")return;if(L.current=!0,q.style.removeProperty(_R),!R){F.request(()=>a.context.handleScrollArrowVisibility(O||q));return}let H=_4(q);try{let K=a.context.selectedItemTextRef.current;K?.isConnected||(K=!a.select("hasSelectedValue")&&a.context.firstItemTextRef.current?.isConnected?a.context.firstItemTextRef.current:null);let Z=a.context.valueRef.current,ee=Ze(I),Q=ee.getComputedStyle(I),te=ee.getComputedStyle(q),de=Fe(G),ue=HL(G),J=UR(G.getBoundingClientRect(),ue),re=UR(I.getBoundingClientRect(),ue),$=J.height,ie=O||q,le=ie.scrollHeight,he=parseFloat(te.borderBottomWidth),Pe=parseFloat(Q.marginTop)||10,ge=parseFloat(Q.marginBottom)||10,Ce=parseFloat(Q.minHeight)||100,W=BL(te),me=5,xe=5,ve=20,ne=de.documentElement.clientHeight-Pe-ge,oe=de.documentElement.clientWidth,ye=ne-J.bottom+$,be,se=h==="rtl"?J.right-re.width:J.left,Ne=0;if(K&&Z){let et=UR(Z.getBoundingClientRect(),ue);be=UR(K.getBoundingClientRect(),ue),se=re.left+(h==="rtl"?et.right-be.right:et.left-be.left);let pt=et.top-J.top+et.height/2;Ne=be.top-re.top+be.height/2-pt}let Ae=ye+Ne+ge+he,Ve=Math.min(ne,Ae),Te=ne-Pe-ge,De=Ae-Ve,ze=oe-xe;I.style.left=`${gt(se,me,ze-re.width)}px`,I.style.height=`${Ve}px`,I.style.maxHeight="none",I.style.marginTop=`${Pe}px`,I.style.marginBottom=`${ge}px`,q.style.height="100%";let We=HR(ie),Ge=De>=We-gn;Ge&&(Ve=Math.min(ne,re.height)-(De-We));let He=J.top<ve||J.bottom>ne-ve||Math.ceil(Ve)+gn<Math.min(le,Ce),Ue=(ee.visualViewport?.scale??1)!==1&&dt.engine.webkit;if(He||Ue){ql(I,X.current),b(!1);return}let rt=Math.max(Ce,Ve);if(Ge){let et=Math.max(0,ne-Ae);I.style.top=re.height>=Te?"0":`${et}px`,I.style.height=`${Ve}px`,ie.scrollTop=HR(ie)}else I.style.bottom="0",ie.scrollTop=De;if(be){let et=re.top,pt=re.height,wt=be.top+be.height/2,Se=gt(pt>0?(wt-et)/pt*100:50,0,100);q.style.setProperty(_R,`50% ${Se}%`)}(rt===ne||Ve>=W)&&(A.current=!0),a.context.handleScrollArrowVisibility(ie),p&&a.state.selectedIndex===null&&a.state.activeIndex===null&&a.context.listRef.current[0]!=null&&a.set("activeIndex",0)}finally{H()}},[a,E,I,G,R,b,F,O,p,h,g]),An.useEffect(()=>{if(!R||!I||!E)return;let q=Ze(I);function H(K){a.context.setOpen(!1,fe(U.windowResize,K))}return Ye(q,"resize",H)},[a,R,I,E]);let Y={...O?{role:"presentation"}:{role:"listbox","aria-multiselectable":c||void 0,"aria-readonly":u||void 0,id:`${S}-list`},onKeyDown(q){x&&Fr.has(q.key)&&q.stopPropagation()},onScroll(q){O||B(q.currentTarget)},...R&&{style:O?{height:"100%"}:kR},className:!O&&R?Pi.className:void 0},V=_("div",t,{ref:[o,a.context.popupRef],state:k,stateAttributesMapping:k4,props:[w,Y,Zo(D),l]});return v(An.Fragment,{children:[!C&&Pi.getElement(y),v(un,{context:f,modal:!1,disabled:!N,openInteractionType:P,returnFocus:i,restoreFocus:!0,children:V})]})});function BL(e){let t=e.maxHeight;return t.endsWith("px")&&parseFloat(t)||1/0}function HR(e){return zl(e.scrollHeight,e.clientHeight)}function HL(e){return _u.getScale(e)}function $p(e,t,o){return e/o[t]}function UR(e,t){return ri({x:$p(e.x,"x",t),y:$p(e.y,"y",t),width:$p(e.width,"x",t),height:$p(e.height,"y",t)})}var UL=[["transform","none"],["scale","1"],["translate","0 0"]];function _4(e){let{style:t}=e,o={};for(let[r,n]of UL)o[r]=t.getPropertyValue(r),t.setProperty(r,n,"important");return()=>{for(let[r]of UL){let n=o[r];n?t.setProperty(r,n):t.removeProperty(r)}}}var WL=T(M(),1);var jL=WL.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,l=io(),a=l.useState("multiple"),c=l.useState("readOnly"),{alignItemWithTriggerActive:u}=Ia(),p=l.useState("hasScrollArrows"),f=l.useState("openMethod"),d={id:`${l.useState("id")}-list`,role:"listbox","aria-multiselectable":a||void 0,"aria-readonly":c||void 0,onScroll(g){l.context.scrollHandlerRef.current?.(g.currentTarget)},...u&&{style:kR},className:p&&f!=="touch"?Pi.className:void 0},R=l.useStateSetter("listElement");return _("div",t,{ref:[o,R],props:[d,i]})});var as=T(M(),1);var GR=T(M(),1),mS=GR.createContext(void 0);function WR(){let e=GR.useContext(mS);if(!e)throw new Error(Me(57));return e}var YL=as.memo(as.forwardRef(function(t,o){let{render:r,className:n,style:s,value:i=null,label:l,disabled:a=!1,nativeButton:c=!1,...u}=t,p=as.useRef(null),f=oo({guess:!0,label:l,textRef:p}),m=io(),{props:d,multiple:R,disabled:g,readOnly:b,isItemEqualToValue:x}=m.useState("itemRoot"),h=g||a,y=m.useState("isActive",f.index),C=m.useState("open"),S=m.useState("isSelected",i),E=m.useState("isSelectedByFocus",f.index),P=f.index,N=as.useRef(null);z(()=>{let k=m.context.valuesRef.current;return k[P]=i,()=>{delete k[P]}},[P,i,m]),z(()=>{let k=m.state.value,Y=m.state.selectedIndex,V=Y,q;R&&Array.isArray(k)?(V=Od(P,i,m.context.valuesRef.current,k,x,Y),q=V===P,P===Y&&!q&&(m.context.selectedItemTextRef.current=null)):(q=k!==void 0&&Qo(i,k,x),q&&(V=P)),m.set("selectedIndex",V),q&&p.current&&(m.context.selectedItemTextRef.current=p.current)},[P,R,x,m,i]);let w=as.useRef("mouse"),D=as.useRef(!1),{getButtonProps:G,buttonRef:I}=ft({disabled:h,focusableWhenDisabled:!0,native:c,composite:!0}),O={disabled:h,selected:S,highlighted:y};function A(k){if(g||b)return;let Y=m.state.value;if(R){let V=Array.isArray(Y)?Y:[],q=S?Vd(V,i,x):[...V,i];m.context.setValue(q,fe(U.itemPress,k))}else m.context.setValue(i,fe(U.itemPress,k)),m.context.setOpen(!1,fe(U.itemPress,k))}function L(){m.context.selectionRef.current.dragY=0}let X={role:"option","aria-selected":S,tabIndex:C&&y?0:-1,onKeyDown(k){m.set("activeIndex",P),k.key===" "&&m.context.typingRef.current&&k.preventDefault()},onClick(k){let Y=w.current!=="touch",V=k.nativeEvent.pointerType,q=Y&&hn(k.nativeEvent)&&(V!==void 0||y),H=Y&&!q&&!D.current;D.current=!1,!(h||H)&&A(k.nativeEvent)},onPointerEnter(k){w.current=k.pointerType},onPointerMove(k){if(k.pointerType==="mouse"&&k.buttons===1){let Y=m.context.selectionRef.current;Y.dragY+=k.movementY,Y.dragY**2>=64&&(Y.allowUnselectedMouseUp=!0)}},onPointerDown(k){w.current=k.pointerType,D.current=!0,L()},onMouseUp(){if(L(),h||w.current==="touch"||D.current)return;let k=!m.context.selectionRef.current.allowSelectedMouseUp&&S,Y=!m.context.selectionRef.current.allowUnselectedMouseUp&&!S;k||Y||(D.current=!0,N.current?.click(),D.current=!1)}},F=_("div",t,{ref:[I,o,f.ref,N],state:O,props:[d,X,u,G]}),B=as.useMemo(()=>({selected:S,index:P,textRef:p,selectedByFocus:E}),[S,P,p,E]);return v(mS.Provider,{value:B,children:F})}));var KL=T(M(),1);var zL=KL.forwardRef(function(t,o){let{selected:r}=WR();return t.keepMounted||r?v(Xm,{...t,selected:r,ref:o}):null});var Jl=T(M(),1);var $L=Jl.memo(Jl.forwardRef(function(t,o){let{index:r,textRef:n,selectedByFocus:s}=WR(),i=io(),{render:l,className:a,style:c,...u}=t,p=Jl.useCallback(m=>{m&&(r===0&&(i.context.firstItemTextRef.current=m),s&&(i.context.selectedItemTextRef.current=m))},[i,r,s]);return _("div",t,{ref:[p,o,n],props:u})}));var XL=T(M(),1);var qL=XL.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,l=io(),{side:a,align:c,arrowRef:u,arrowStyles:p,arrowUncentered:f,alignItemWithTriggerActive:m}=Ia(),R={open:l.useState("open"),side:a,align:c,uncentered:f},g=_("div",t,{state:R,ref:[u,o],props:[{style:p,"aria-hidden":!0},i],stateAttributesMapping:ro});return m?null:g});var QL=T(M(),1);var JL=T(M(),1);var jR=JL.forwardRef(function(t,o){let{render:r,className:n,style:s,direction:i,keepMounted:l,...a}=t,c=i==="up",u=io(),{side:p,scrollDownArrowRef:f,scrollUpArrowRef:m}=Ia(),d=c?"scrollUpArrowVisible":"scrollDownArrowVisible",R=u.useState(d),g=u.useState("openMethod"),b=R&&g!=="touch",x=it(),h=c?m:f,{mounted:y,transitionStatus:C,setMounted:S}=Xt(b);z(()=>(u.context.scrollArrowsMountedCountRef.current+=1,u.set("hasScrollArrows",!0),()=>{u.context.scrollArrowsMountedCountRef.current=Math.max(0,u.context.scrollArrowsMountedCountRef.current-1),u.context.scrollArrowsMountedCountRef.current===0&&u.set("hasScrollArrows",!1)}),[u]),St({open:b,ref:h,onComplete(){b||S(!1)}});let N=_("div",t,{ref:[o,h],state:{direction:i,visible:b,side:p,transitionStatus:C},props:[{"aria-hidden":!0,children:c?"\u25B2":"\u25BC",style:{position:"absolute"},onMouseMove(D){if(D.movementX===0&&D.movementY===0||x.isStarted())return;u.set("activeIndex",null);function G(){let I=u.state.listElement??u.context.popupRef.current;if(!I)return;u.set("activeIndex",null),u.context.handleScrollArrowVisibility(I);let O=zl(I.scrollHeight,I.clientHeight),A=Ti(I.scrollTop,O),L=A===(c?0:O),X=u.context.listRef.current;if(A!==I.scrollTop&&(I.scrollTop=A),L){x.clear();return}if(X.length>0){let F=h.current?.offsetHeight||0;I.scrollTop=B4(X,c,A,I.clientHeight,F,O)}x.start(40,G)}x.start(40,G)},onMouseLeave(){x.clear()}},a],stateAttributesMapping:Ot});return y||l?N:null});function B4(e,t,o,r,n,s){if(t){let u=0,p=o+n-gn;for(let d=0;d<e.length;d+=1){let R=e[d];if(R&&R.offsetTop>=p){u=d;break}}let f=Math.max(0,u-1),m=e[f];return f<u&&m?Ti(m.offsetTop-n,s):0}let i=e.length-1,l=o+r-n+gn;for(let u=0;u<e.length;u+=1){let p=e[u];if(p&&p.offsetTop+p.offsetHeight>l){i=Math.max(0,u-1);break}}let a=Math.min(e.length-1,i+1),c=e[a];return a>i&&c?Ti(c.offsetTop+c.offsetHeight-r+n,s):s}var ZL=QL.forwardRef(function(t,o){return v(jR,{...t,ref:o,direction:"down"})});var ek=T(M(),1);var tk=ek.forwardRef(function(t,o){return v(jR,{...t,ref:o,direction:"up"})});var Ql=T(M(),1);var YR=T(M(),1),gS=YR.createContext(void 0);function ok(){let e=YR.useContext(gS);if(e===void 0)throw new Error(Me(56));return e}var rk=Ql.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,[l,a]=Ql.useState(),c=Ql.useMemo(()=>({labelId:l,setLabelId:a}),[l,a]),u=_("div",t,{ref:o,props:[{role:"group","aria-labelledby":l},i]});return v(gS.Provider,{value:c,children:u})});var nk=T(M(),1);var sk=nk.forwardRef(function(t,o){let{render:r,className:n,style:s,id:i,...l}=t,{setLabelId:a}=ok(),c=je(i);return z(()=>(a(c),()=>{a(p=>p===c?void 0:p)}),[c,a]),_("div",t,{ref:o,props:[{id:c,"aria-hidden":!0},l]})});var ik=ml;var xS={};ae(xS,{placeholder:()=>H4});var H4="data-placeholder";var RS={};ae(RS,{popupOpen:()=>U4});var U4=Mt.popupOpen;var hS={};ae(hS,{closed:()=>W4,endingStyle:()=>Y4,open:()=>G4,startingStyle:()=>j4});var G4=ce.open,W4=ce.closed,j4=ce.startingStyle,Y4=ce.endingStyle;var bS={};ae(bS,{align:()=>q4,anchorHidden:()=>$4,closed:()=>z4,open:()=>K4,side:()=>X4});var K4=ce.open,z4=ce.closed,$4=ce.anchorHidden,X4=ce.side,q4=ce.align;var CS={};ae(CS,{align:()=>o3,closed:()=>Q4,endingStyle:()=>e3,open:()=>J4,side:()=>t3,startingStyle:()=>Z4});var J4=ce.open,Q4=ce.closed,Z4=ce.startingStyle,e3=ce.endingStyle,t3=ce.side,o3=ce.align;var yS={};ae(yS,{disabled:()=>s3,highlighted:()=>n3,selected:()=>r3});var r3="data-selected",n3="data-highlighted",s3="data-disabled";var vS={};ae(vS,{endingStyle:()=>a3,startingStyle:()=>i3});var i3=bt.startingStyle,a3=bt.endingStyle;var ES={};ae(ES,{align:()=>p3,closed:()=>l3,open:()=>c3,side:()=>u3,uncentered:()=>f3});var c3=ce.open,l3=ce.closed,u3=ce.side,p3=ce.align,f3="data-uncentered";var SS={};ae(SS,{direction:()=>g3,endingStyle:()=>m3,side:()=>R3,startingStyle:()=>d3,visible:()=>x3});var d3=ce.startingStyle,m3=ce.endingStyle,g3="data-direction",x3="data-visible",R3=ce.side;var PS={};ae(PS,{direction:()=>C3,endingStyle:()=>b3,side:()=>v3,startingStyle:()=>h3,visible:()=>y3});var h3=ce.startingStyle,b3=ce.endingStyle,C3="data-direction",y3="data-visible",v3=ce.side;var cs={};ae(cs,{Control:()=>dk,Indicator:()=>Ck,Label:()=>lk,Root:()=>ak,Thumb:()=>hk,Track:()=>gk,Value:()=>uk});var No=T(M(),1);function KR(e,t){return e-t}function zR(e,t,o,r,n,s){let i=gt(e,o,r);if(!n)return i;let l=s.slice();return l[t]=gt(i,s[t-1]??-1/0,s[t+1]??1/0),l.sort(KR)}function $R(e,t,o){if(!Array.isArray(e))return!0;let r=t*o;for(let n=0;n<e.length-1;n+=1)if(!(Math.abs(e[n]-e[n+1])>=r))return!1;return!0}var Zl=()=>null,Qr={activeThumbIndex:Zl,max:Zl,min:Zl,minStepsBetweenValues:Zl,step:Zl,values:Zl,...Lt};var XR=T(M(),1),TS=XR.createContext(void 0);function On(){let e=XR.useContext(TS);if(e===void 0)throw new Error(Me(62));return e}function E3(e,t){return e===t||Array.isArray(e)&&Array.isArray(t)&&Ja(e,t)}var ak=No.forwardRef(function(t,o){let{"aria-labelledby":r,className:n,defaultValue:s,disabled:i=!1,id:l,format:a,largeStep:c=10,locale:u,render:p,max:f=100,min:m=0,minStepsBetweenValues:d=0,form:R,name:g,onValueChange:b,onValueCommitted:x,orientation:h="horizontal",step:y=1,thumbCollisionBehavior:C="push",thumbAlignment:S="center",value:E,style:P,...N}=t,w=je(l),D=il(w),G=j(b),I=j(x),{clearErrors:O}=Kt(),{state:A,disabled:L,name:X,setTouched:F,setDirty:B,validityData:k,validation:Y}=mt(),{labelId:V}=Ft(),[q,H]=No.useState(),K=r??al(V,q),Z=L||i,ee=X??g,[Q,te]=Nt({controlled:E,default:s??m,name:"Slider"}),de=No.useRef(null),ue=No.useRef(null),J=No.useRef([]),re=No.useRef(null),$=No.useRef(-1),ie=No.useRef(null),le=No.useRef(U.none),[he,Pe]=No.useState(-1),[ge,Ce]=No.useState(-1),[W,me]=No.useState(!1),[xe,ve]=No.useState(()=>new Map),[ne,oe]=No.useState([void 0,void 0]),ye=j(Ge=>{Pe(Ge),Ge!==-1&&Ce(Ge)}),be=j(Ge=>{Ge&&(ue.current=Ge)}),se=Array.isArray(Q),Ne=No.useMemo(()=>se?Q.map(Ge=>gt(Ge,m,f)).sort(KR):[gt(Q,m,f)],[f,m,se,Q]),Ae=se?Ne:Ne[0];_o(Y.inputRef,w,Ae,void 0,!Z,g),$t(Ae,()=>{O(ee),Y.change(Ae);let Ge=k.initialValue,He;Array.isArray(Ae)&&Array.isArray(Ge)?He=!Ja(Ae,Ge):He=Ae!==Ge,B(He)});let Ve=j((Ge,He)=>{if(Number.isNaN(Ge)||E3(Ge,Q))return!1;let Ue=He.event,rt=Ue.constructor,et=new rt(Ue.type,Ue);return Object.defineProperty(et,"target",{writable:!0,value:{value:Ge,name:ee}}),He.event=et,G(Ge,He),He.isCanceled?!1:(le.current=He.reason,te(Ge),!0)}),Te=j((Ge,He,Ue)=>{let rt=zR(Ge,He,m,f,se,Ne);if($R(rt,y,d)){let et="key"in Ue?U.keyboard:U.inputChange,pt=Ve(rt,fe(et,Ue.nativeEvent,void 0,{activeThumbIndex:He}));F(!0),pt&&I(rt,to(et,Ue.nativeEvent))}});z(()=>{if(!Z)return;let Ge=ct(Fe(de.current));Ee(de.current,Ge)&&Ge.blur(),he!==-1&&ye(-1)},[he,Z,ye]);let De=No.useMemo(()=>({...A,activeThumbIndex:he,disabled:Z,dragging:W,orientation:h,max:f,min:m,minStepsBetweenValues:d,step:y,values:Ne}),[A,he,Z,W,f,m,d,h,y,Ne]),ze=No.useMemo(()=>({active:he,controlRef:ue,disabled:Z,dragging:W,validation:Y,format:a,handleInputChange:Te,indicatorPosition:ne,inset:S!=="center",isArrayValue:se,labelId:K,rootLabelId:D,largeStep:c,lastUsedThumbIndex:ge,lastChangeReasonRef:le,form:R,locale:u,max:f,min:m,minStepsBetweenValues:d,name:ee,onValueCommitted:I,orientation:h,pressedThumbCenterOffsetRef:re,pressedThumbIndexRef:$,pressedValuesRef:ie,registerFieldControlRef:be,renderBeforeHydration:S==="edge",setActive:ye,setDragging:me,setIndicatorPosition:oe,setLabelId:H,setValue:Ve,state:De,step:y,thumbCollisionBehavior:C,thumbMap:xe,thumbRefs:J,values:Ne}),[he,K,D,Z,W,Y,a,Te,ne,c,ge,R,u,f,m,d,ee,I,h,se,be,ye,Ve,De,y,C,S,xe,Ne]),We=_("div",t,{state:De,ref:[o,de],props:[{"aria-labelledby":K,id:w,role:"group"},N,Ge=>Y.getValidationProps(Z,Ge)],stateAttributesMapping:Qr});return v(TS.Provider,{value:ze,children:v(Jo,{elementsRef:J,onMapChange:ve,children:We})})});var ck=T(M(),1);var lk=ck.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,l=i;delete l.id;let{state:a,setLabelId:c,controlRef:u,rootLabelId:p}=On();function f(d,R){if(R){let x=fy(d.currentTarget,R);if(tt(x)){$m(x);return}}let g=u.current?.querySelectorAll('input[type="range"]'),b=g?.length===1?g[0]:null;tt(b)&&$m(b)}let m=aa({id:p,setLabelId:c,focusControl:f});return _("div",t,{ref:o,state:a,props:[m,i],stateAttributesMapping:Qr})});var qR=T(M(),1);var uk=qR.forwardRef(function(t,o){let{"aria-live":r="off",render:n,className:s,children:i,style:l,...a}=t,{thumbMap:c,state:u,values:p,format:f,locale:m}=On(),d=Array.from(c.values(),({inputId:x})=>x).join(" ").trim()||void 0,R=qR.useMemo(()=>p.map(x=>tr(x,m,f)),[f,m,p]),g=R.join(" \u2013 ");return _("output",t,{state:u,ref:o,props:[{"aria-live":r,children:typeof i=="function"?i(R,p):g,htmlFor:d},a],stateAttributesMapping:Qr})});var xn=T(M(),1);function JR(e,t){let o=e.getBoundingClientRect();return t?(o.top+o.bottom)/2:(o.left+o.right)/2}function eu(e){if(e===0)return 0;if(Math.abs(e)<1){let o=e.toExponential().split("e-"),r=o[0].split(".")[1];return(r?r.length:0)+parseInt(o[1],10)}let t=e.toString().split(".")[1];return t?t.length:0}function QR(e,t,o){let r=Math.round((e-o)/t)*t+o;return Number(r.toFixed(Math.max(eu(t),eu(o))))}function wS(e,t,o,r,n,s,i,l){let a=e.slice(),c=s*i,u=a.length-1,p=l??e,f=r+t*c,m=n-(u-t)*c;a[t]=gt(o,f,m);for(let d=t+1;d<=u;d+=1){let R=a[d-1]+c,g=n-(u-d)*c,b=p[d],x=Math.max(a[d],R);b<x&&(x=Math.max(b,R)),a[d]=gt(x,R,g)}for(let d=t-1;d>=0;d-=1){let R=a[d+1]-c,g=r+d*c,b=p[d],x=Math.min(a[d],R);b>x&&(x=Math.min(b,R)),a[d]=gt(x,g,R)}for(let d=0;d<=u;d+=1)a[d]=Number(a[d].toFixed(12));return a}function pk(e,t,o,r,n,s,i,l,a,c){let u=o??t,p=r??t;if(!(u.length>1))return{value:s,thumbIndex:0,didSwap:!1};let m=a*c;if(e==="push")return{value:wS(u,n,s,i,l,a,c),thumbIndex:n,didSwap:!1};let d=u.slice(),R=d[n-1],g=d[n+1],b=R!=null?R+m:i,x=g!=null?g-m:l,h=Number(gt(s,b,x).toFixed(12));switch(d[n]=h,e){case"swap":{let y=u[n],C=1e-7,S=s>y,E=s<y,P=S&&g!=null&&s>=g-C,N=E&&R!=null&&s<=R+C;if(!P&&!N)return{value:d,thumbIndex:n,didSwap:!1};let w=P?n+1:n-1,D=d.map((k,Y)=>{if(Y===n)return h;let V=p[Y];return V??u[Y]}),G=s;P?G=Math.max(s,d[w]):G=Math.min(s,d[w]);let I=wS(d,w,G,i,l,a,c,D),O=P?w-1:w+1,A=I[O-1],L=I[O+1],X=A!=null?A+m:i;X=Math.max(X,i+O*m);let F=L!=null?L-m:l;F=Math.min(F,l-(I.length-1-O)*m);let B=gt(h,X,F);return I[O]=Number(B.toFixed(12)),{value:I,thumbIndex:w,didSwap:!0}}case"none":default:return{value:d,thumbIndex:n,didSwap:!1}}}var S3=2;function P3(e,t){if(!e)return{start:0,end:0};function o(s){let i=s!=null?parseFloat(s):0;return Number.isNaN(i)?0:i}let r=t?"Top":"InlineStart",n=t?"Bottom":"InlineEnd";return{start:o(e[`border${r}Width`])+o(e[`padding${r}`]),end:o(e[`border${n}Width`])+o(e[`padding${n}`])}}function fk(e,t){if(t.current!=null&&e.changedTouches){let o=e;for(let r=0;r<o.changedTouches.length;r+=1){let n=o.changedTouches[r];if(n.identifier===t.current)return{x:n.clientX,y:n.clientY}}return null}return{x:e.clientX,y:e.clientY}}var dk=xn.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,{disabled:l,dragging:a,inset:c,isArrayValue:u,lastChangeReasonRef:p,max:f,min:m,minStepsBetweenValues:d,onValueCommitted:R,orientation:g,pressedThumbCenterOffsetRef:b,pressedThumbIndexRef:x,pressedValuesRef:h,registerFieldControlRef:y,renderBeforeHydration:C,setActive:S,setDragging:E,setValue:P,state:N,step:w,thumbCollisionBehavior:D,thumbRefs:G,values:I}=On(),O=At(),A=I.length>1,L=g==="vertical",X=xn.useRef(null),F=xn.useRef(null),B=j(W=>{W&&F.current==null&&(F.current=Ze(W).getComputedStyle(W))}),k=xn.useRef(null),Y=xn.useRef(0),V=xn.useRef(0),q=xn.useRef(null),H=xn.useRef(!1),K=Et(I);function Z(W){return W?.querySelector('input[type="range"]')}function ee(W){x.current=W,G.current[W]||(b.current=null)}function Q(){x.current=-1,b.current=null}function te(W){return st(W)?G.current.some(me=>!st(me)||!Ee(me,W)?!1:Z(me)?.disabled===!0):!1}function de(W){let me=X.current,xe=x.current;if(!me||xe<0||xe>=I.length)return xe>=I.length&&(q.current=null),null;let{width:ve,height:ne,bottom:oe,left:ye,right:be}=me.getBoundingClientRect(),se=P3(F.current,L),Ne=V.current,Ae=(L?ne:ve)-se.start-se.end-Ne*2,Ve=b.current??0,Te=W.x-Ve,De=W.y-Ve,ze=L?oe-De-se.end:(O==="rtl"?be-Te:Te-ye)-se.start,We=gt((ze-Ne)/Ae,0,1),Ge=(f-m)*We+m;return Ge=QR(Ge,w,m),Ge=gt(Ge,m,f),A?pk(D,I,K.current,h.current,xe,Ge,m,f,w,d):{value:u?[Ge]:Ge,thumbIndex:xe,didSwap:!1}}function ue(W){h.current=A?I.slice():null,q.current=null,K.current=I;let me=x.current,xe=me;if(me>-1&&me<I.length){if(I[me]===f){let ve=me;for(;ve>0&&I[ve-1]===f;)ve-=1;xe=ve}}else{let ve=L?"y":"x",ne;xe=-1;for(let oe=0;oe<G.current.length;oe+=1){let ye=G.current[oe];if(st(ye)&&!Z(ye)?.disabled){let be=JR(ye,L),se=Math.abs(W[ve]-be);(ne===void 0||se<=ne)&&(xe=oe,ne=se)}}}if(xe>-1&&xe!==me&&ee(xe),c){let ve=G.current[xe];if(st(ve)){let ne=ve.getBoundingClientRect(),oe=L?"height":"width";V.current=ne[oe]/2}}}function J(W){let me=Z(G.current?.[W]);me&&me.focus({preventScroll:!0,focusVisible:!1})}function re(W,me,xe){let ve=P(W.value,fe(me,xe,void 0,{activeThumbIndex:W.thumbIndex}));return ve&&(q.current=W.value,K.current=Array.isArray(W.value)?W.value:[W.value],W.didSwap&&(ee(W.thumbIndex),J(W.thumbIndex))),ve}let $=j(W=>{let me=fk(W,k);if(me==null)return;if(Y.current+=1,W.type==="pointermove"&&W.buttons===0){ie(W);return}let xe=de(me);xe!=null&&$R(xe.value,w,d)&&(!a&&Y.current>S3&&E(!0),re(xe,U.drag,W))}),ie=j(W=>{if(fk(W,k)==null)return;S(-1),E(!1),b.current=null;let me=q.current;if(Array.isArray(me)&&me.length!==I.length&&(q.current=null),q.current!=null){let xe=p.current;R(q.current,to(xe,W))}"pointerType"in W&&X.current?.hasPointerCapture(W.pointerId)&&X.current?.releasePointerCapture(W.pointerId),x.current=-1,Pe()}),le=j(W=>{k.current==null&&ie(W)}),he=j(W=>{let me=H.current;if(H.current=!1,l)return;if(te($e(W))){Q();return}let xe=W.changedTouches[0];if(xe==null)return;if(k.current=xe.identifier,!me){let ne={x:xe.clientX,y:xe.clientY};ue(ne);let oe=de(ne);if(oe==null)return;J(oe.thumbIndex),re(oe,U.trackPress,W),Y.current=0}let ve=Fe(X.current);ve.addEventListener("touchmove",$,{passive:!0}),ve.addEventListener("touchend",ie,{passive:!0}),ve.addEventListener("touchcancel",ie,{passive:!0})}),Pe=j(()=>{let W=Fe(X.current);W.removeEventListener("pointermove",$),W.removeEventListener("pointerup",ie),W.removeEventListener("pointercancel",le),W.removeEventListener("touchmove",$),W.removeEventListener("touchend",ie),W.removeEventListener("touchcancel",ie),k.current=null,h.current=null,q.current=null,H.current=!1}),ge=ao();return xn.useEffect(()=>{let W=X.current;if(!W)return()=>Pe();let me=Ye(W,"touchstart",he,{passive:!0});return()=>{me(),ge.cancel(),Pe()}},[Pe,he,X,ge]),xn.useEffect(()=>{l&&Pe()},[l,Pe]),_("div",t,{state:N,ref:[o,y,X,B],props:[{"data-base-ui-slider-control":C?"":void 0,onPointerDown(W){H.current=!1;let me=X.current,xe=$e(W.nativeEvent);if(!me||l||W.defaultPrevented||!st(xe)||W.button!==0)return;if(te(xe)){Q();return}let ve={x:W.clientX,y:W.clientY};ue(ve);let ne=de(ve);if(ne==null)return;Ee(G.current[ne.thumbIndex],ct(Fe(me)))?W.preventDefault():ge.request(()=>{J(ne.thumbIndex)}),E(!0),b.current!=null||re(ne,U.trackPress,W.nativeEvent),W.nativeEvent.pointerId&&me.setPointerCapture(W.nativeEvent.pointerId),Y.current=0,H.current=yi(W.pointerType);let be=Fe(me);be.addEventListener("pointermove",$,{passive:!0}),be.addEventListener("pointerup",ie,{once:!0}),be.addEventListener("pointercancel",le,{once:!0})}},i],stateAttributesMapping:Qr})});var mk=T(M(),1);var gk=mk.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,{state:l}=On();return _("div",t,{state:l,ref:o,props:[{style:{position:"relative"}},i],stateAttributesMapping:Qr})});var Vn=T(M(),1);var ZR=T(M(),1),xk=T(Vu(),1);var T3=()=>()=>{},w3=()=>!0,I3=()=>!1;function M3(){return(0,xk.useSyncExternalStore)(T3,w3,I3)}function D3(){let[e,t]=ZR.useState(!1);return ZR.useEffect(()=>{t(!0)},[]),e}var N3=Di(18)?M3:D3;function bc(){return!N3()}var sZe=T(M(),1);function eh(e){let{script:t}=e,{nonce:o}=Dl();return bc()?v("script",{nonce:o,dangerouslySetInnerHTML:{__html:t},suppressHydrationWarning:!0}):null}var th={};ae(th,{dirty:()=>_3,disabled:()=>V3,dragging:()=>A3,focused:()=>B3,index:()=>IS,invalid:()=>L3,orientation:()=>O3,touched:()=>k3,valid:()=>F3});var IS="data-index",A3="data-dragging",O3="data-orientation",V3="data-disabled",F3="data-valid",L3="data-invalid",k3="data-touched",_3="data-dirty",B3="data-focused";var Rk,U3=new Set([...Fr,lC,uC]);function G3(e,t,o,r){if(!(t<0))return e.length===2?`${tr(e[t],r,o)} ${t===0?"start":"end"} range`:o?tr(e[t],r,o):void 0}function W3(e,t,o,r,n){let s=e+t*o,i=Number(s.toFixed(Math.max(eu(e),eu(t),eu(r))));return gt(i,r,n)}var hk=Vn.forwardRef(function(t,o){let{render:r,children:n,className:s,"aria-describedby":i,"aria-label":l,"aria-labelledby":a,"aria-valuetext":c,disabled:u=!1,getAriaLabel:p,getAriaValueText:f,id:m,index:d,inputRef:R,onBlur:g,onFocus:b,onKeyDown:x,tabIndex:h,style:y,...C}=t,S=je(m),{active:E,lastUsedThumbIndex:P,controlRef:N,disabled:w,validation:D,format:G,handleInputChange:I,inset:O,isArrayValue:A,labelId:L,largeStep:X,locale:F,max:B,min:k,minStepsBetweenValues:Y,form:V,name:q,orientation:H,pressedThumbCenterOffsetRef:K,pressedThumbIndexRef:Z,renderBeforeHydration:ee,setActive:Q,setIndicatorPosition:te,state:de,step:ue,thumbRefs:J,values:re}=On(),$=At(),ie=u||w,le=re.length>1,he=H==="vertical",Pe=$==="rtl",{setTouched:ge,validationMode:Ce}=mt(),W=Vn.useRef(null),me=Vn.useRef(null),xe=Bo(ie,me),ve=Vn.useRef(!1),ne=j(Le=>{ve.current||b?.(Le)}),oe=j(Le=>{ve.current||g?.(Le)}),ye=je(),be=xo(),se=le?ye:be,Ne=Vn.useMemo(()=>({inputId:se}),[se]),{ref:Ae,index:Ve}=oo({metadata:Ne}),Te=le?d??Ve:0,De=Te===re.length-1,ze=re[Te],We=di(ze,k,B),[Ge,He]=Vn.useState(),Ue=bc(),rt=P>=0&&P<re.length?P:-1,et=j(()=>{let Le=N.current,Je=W.current;if(!Le||!Je)return;let Be=Je.getBoundingClientRect(),nt=Le.getBoundingClientRect(),at=he?"height":"width",vt=nt[at]-Be[at],zt=(Be[at]/2+vt*We/100)/nt[at]*100,Rt=Number.isFinite(zt)?zt:void 0;He(Rt),Te===0?te(ho=>[Rt,ho[1]]):De&&te(ho=>[ho[0],Rt])});z(()=>{O&&queueMicrotask(et)},[et,O]),z(()=>{O&&et()},[et,O,We]),z(()=>{if(!O)return;let Le=N.current,Je=W.current;if(!Le||!Je)return;let Be=Ze(Le).ResizeObserver;if(typeof Be!="function")return;let nt=new Be(et);return nt.observe(Le),nt.observe(Je),()=>{nt.disconnect()}},[N,et,O]);let pt=he?"bottom":"insetInlineStart",wt=he?"left":"top",Se;le?E===Te?Se=2:rt===Te&&(Se=1):E===Te&&(Se=1);let ke;!O&&!Number.isFinite(We)?ke=co:ke={position:"absolute",[pt]:O?"var(--position)":`${We}%`,[wt]:"50%",translate:`${(he||!Pe?-1:1)*50}% ${(he?1:-1)*50}%`,zIndex:Se,...O&&{"--position":`${Ge??0}%`,visibility:ee&&Ue||Ge===void 0?"hidden":void 0}};let Ie;he&&(Ie=Pe?"vertical-rl":"vertical-lr");let _e=typeof p=="function"?p(Te):l,pe=Pt({"aria-label":_e,"aria-labelledby":a??(_e==null?L:void 0),"aria-describedby":i,"aria-orientation":H,"aria-valuenow":ze,"aria-valuetext":typeof f=="function"?f(tr(ze,F,G),ze,Te):c??G3(re,Te,G,F),disabled:ie,form:V,id:se,max:B,min:k,name:q,onChange(Le){I(Le.currentTarget.valueAsNumber,Te,Le)},onFocus(Le){let Je=ve.current;ve.current=!1,Q(Te),xe(!0),Je&&Le.stopPropagation()},onBlur(Le){if(ve.current){Le.stopPropagation();return}Q(-1),!J.current.some(Je=>Ee(Je,Le.relatedTarget))&&(ge(!0),xe(!1),Ce==="onBlur"&&D.commit(zR(ze,Te,k,B,A,re)))},onKeyDown(Le){if(Le.defaultPrevented||!U3.has(Le.key))return;Fr.has(Le.key)&&Le.stopPropagation();let Je=null,Be=0,nt=Le.shiftKey?X:ue,at=QR(ze,ue,k);switch(Le.key){case Yc:Be=1;break;case $c:Be=Pe?-1:1;break;case Kc:Be=-1;break;case zc:Be=Pe?1:-1;break;case lC:nt=X,Be=1;break;case uC:nt=X,Be=-1;break;case qc:Je=le&&Number.isFinite(re[Te+1])?re[Te+1]-ue*Y:B;break;case Xc:Je=le&&Number.isFinite(re[Te-1])?re[Te-1]+ue*Y:k;break;default:break}if(Be!==0&&(Je=W3(at,nt,Be,k,B)),Je!==null){let vt=Le.currentTarget;gs(vt)||(ve.current=!0,vt.blur(),vt.focus({preventScroll:!0,focusVisible:!0})),I(Je,Te,Le),Le.preventDefault()}},step:ue,style:{...co,width:"100%",height:"100%",writingMode:Ie},tabIndex:h,type:"range",value:ze??""},Le=>D.getValidationProps(ie,Le),{onFocus:ne,onBlur:oe,onKeyDown:x}),we=kt(me,D.inputRef,R);return _("div",t,{state:de,ref:[o,Ae,W],props:[{[IS]:Te,children:v(Vn.Fragment,{children:[n,v("input",{ref:we,...pe,suppressHydrationWarning:!0}),O&&De&&ee&&(Rk||(Rk=v(eh,{script:""})))]}),id:S,onPointerDown(Le){if(ie)return;Z.current=Te;let Je=JR(Le.currentTarget,he);K.current=(he?Le.clientY:Le.clientX)-Je},style:ke,suppressHydrationWarning:ee||void 0},C],stateAttributesMapping:Qr})});var bk=T(M(),1);function j3(e,t,o,r,n,s){let i={visibility:s||o&&(r===void 0||t&&n===void 0)?"hidden":void 0,position:e?"absolute":"relative",[e?"width":"height"]:"inherit"},l=`${r??0}%`,a=`${(n??0)-(r??0)}%`;return o&&(i["--start-position"]=l,l="var(--start-position)",t&&(i["--relative-size"]=a,a="var(--relative-size)")),i[e?"bottom":"insetInlineStart"]=t?l:0,i[e?"height":"width"]=t?a:l,i}var Ck=bk.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,{indicatorPosition:l,inset:a,max:c,min:u,orientation:p,renderBeforeHydration:f,state:m,values:d}=On(),R=bc(),g=p==="vertical",b=d.length>1,x=j3(g,b,a,a?l[0]:di(d[0],u,c),a?l[1]:di(d[d.length-1],u,c),a&&f&&R);return _("div",t,{state:m,ref:o,props:[{"data-base-ui-slider-indicator":f?"":void 0,style:x,suppressHydrationWarning:f||void 0},i],stateAttributesMapping:Qr})});var MS={};ae(MS,{dirty:()=>J3,disabled:()=>z3,dragging:()=>Y3,focused:()=>Q3,invalid:()=>X3,orientation:()=>K3,touched:()=>q3,valid:()=>$3});var Y3="data-dragging",K3="data-orientation",z3="data-disabled",$3="data-valid",X3="data-invalid",q3="data-touched",J3="data-dirty",Q3="data-focused";var DS={};ae(DS,{dirty:()=>s6,disabled:()=>t6,dragging:()=>Z3,focused:()=>i6,invalid:()=>r6,orientation:()=>e6,touched:()=>n6,valid:()=>o6});var Z3="data-dragging",e6="data-orientation",t6="data-disabled",o6="data-valid",r6="data-invalid",n6="data-touched",s6="data-dirty",i6="data-focused";var NS={};ae(NS,{dirty:()=>d6,disabled:()=>l6,dragging:()=>a6,focused:()=>m6,invalid:()=>p6,orientation:()=>c6,touched:()=>f6,valid:()=>u6});var a6="data-dragging",c6="data-orientation",l6="data-disabled",u6="data-valid",p6="data-invalid",f6="data-touched",d6="data-dirty",m6="data-focused";var AS={};ae(AS,{dirty:()=>y6,disabled:()=>R6,dragging:()=>g6,focused:()=>v6,invalid:()=>b6,orientation:()=>x6,touched:()=>C6,valid:()=>h6});var g6="data-dragging",x6="data-orientation",R6="data-disabled",h6="data-valid",b6="data-invalid",C6="data-touched",y6="data-dirty",v6="data-focused";var OS={};ae(OS,{dirty:()=>M6,disabled:()=>P6,dragging:()=>E6,focused:()=>D6,invalid:()=>w6,orientation:()=>S6,touched:()=>I6,valid:()=>T6});var E6="data-dragging",S6="data-orientation",P6="data-disabled",T6="data-valid",w6="data-invalid",I6="data-touched",M6="data-dirty",D6="data-focused";var tu={};ae(tu,{Root:()=>vk,Thumb:()=>Sk});var Cc=T(M(),1);var oh=T(M(),1),VS=oh.createContext(void 0);function yk(){let e=oh.useContext(VS);if(e===void 0)throw new Error(Me(63));return e}var rh={};ae(rh,{checked:()=>FS,dirty:()=>k6,disabled:()=>N6,filled:()=>_6,focused:()=>B6,invalid:()=>F6,readonly:()=>A6,required:()=>O6,touched:()=>L6,unchecked:()=>LS,valid:()=>V6});var FS="data-checked",LS="data-unchecked",N6="data-disabled",A6="data-readonly",O6="data-required",V6="data-valid",F6="data-invalid",L6="data-touched",k6="data-dirty",_6="data-filled",B6="data-focused";var nh={...Lt,checked(e){return e?{[FS]:""}:{[LS]:""}}};var vk=Cc.forwardRef(function(t,o){let{checked:r,className:n,defaultChecked:s,"aria-labelledby":i,form:l,id:a,inputRef:c,name:u,nativeButton:p=!1,onCheckedChange:f,readOnly:m=!1,required:d=!1,disabled:R=!1,render:g,uncheckedValue:b,value:x,style:h,...y}=t,{clearErrors:C}=Kt(),{state:S,setTouched:E,setDirty:P,validityData:N,setFilled:w,validationMode:D,disabled:G,name:I,validation:O}=mt(),{labelId:A}=Ft(),L=G||R,X=I??u,F=Cc.useRef(null),B=kt(F,c,O.inputRef),k=Cc.useRef(null),Y=Bo(L,k),V=je(),q=xo({id:a}),H=p?void 0:q,[K,Z]=Nt({controlled:r,default:!!s,name:"Switch",state:"checked"});_o(k,V,K,void 0,!L,u),z(()=>{w(K)},[K,w]),$t(K,()=>{C(X),P(K!==N.initialValue),O.change(K)});let{getButtonProps:ee,buttonRef:Q}=ft({disabled:L,native:p}),te=sa(i,A,F,!p,H,y["aria-label"]),de={id:p?q:V,role:"switch","aria-checked":K,"aria-readonly":m||void 0,"aria-required":d||void 0,"aria-labelledby":te,onFocus(){Y(!0)},onBlur(){let $=F.current;!$||L||(E(!0),Y(!1),D==="onBlur"&&O.commit($.checked))},onClick($){if(m||L)return;$.preventDefault();let ie=F.current;ie&&Wr(ie,$)}},ue={...O.getValidationProps(L),checked:K,disabled:L,form:l,id:H,name:X,required:d,style:X?vr:co,tabIndex:-1,type:"checkbox","aria-hidden":!0,ref:B,onChange($){if($.nativeEvent.defaultPrevented)return;if(m){$.preventDefault();return}let ie=$.currentTarget.checked,le=fe(U.none,$.nativeEvent);f?.(ie,le),!le.isCanceled&&Z(ie)},onClick($){$.stopPropagation()},onFocus(){k.current?.focus()},...x!==void 0?{value:x}:qe},J=Cc.useMemo(()=>({...S,checked:K,disabled:L,readOnly:m,required:d}),[S,K,L,m,d]),re=_("span",t,{state:J,ref:[o,k,Q],props:[de,y,ee,$=>O.getValidationProps(L,$)],stateAttributesMapping:nh});return v(VS.Provider,{value:J,children:[re,!K&&X&&b!==void 0&&v("input",{type:"hidden",form:l,name:X,value:b,disabled:L}),v("input",{...ue,suppressHydrationWarning:!0})]})});var Ek=T(M(),1);var Sk=Ek.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,l=yk();return _("span",t,{state:l,ref:o,stateAttributesMapping:nh,props:i})});var kS={};ae(kS,{checked:()=>H6,dirty:()=>$6,disabled:()=>G6,filled:()=>X6,focused:()=>q6,invalid:()=>K6,readonly:()=>W6,required:()=>j6,touched:()=>z6,unchecked:()=>U6,valid:()=>Y6});var H6="data-checked",U6="data-unchecked",G6="data-disabled",W6="data-readonly",j6="data-required",Y6="data-valid",K6="data-invalid",z6="data-touched",$6="data-dirty",X6="data-filled",q6="data-focused";var Ii={};ae(Ii,{Indicator:()=>Ak,List:()=>Vk,Panel:()=>Ok,Root:()=>Tk,Tab:()=>wk});var Ao=T(M(),1);var sh=T(M(),1),_S=sh.createContext(void 0);function Ma(){let e=sh.useContext(_S);if(e===void 0)throw new Error(Me(64));return e}var ih={};ae(ih,{activationDirection:()=>BS,orientation:()=>J6});var BS="data-activation-direction",J6="data-orientation";var $s={tabActivationDirection:e=>({[BS]:e})};var Tk=Ao.forwardRef(function(t,o){let{className:r,defaultValue:n=0,onValueChange:s,orientation:i="horizontal",render:l,value:a,style:c,...u}=t,p=t.defaultValue!==void 0,f=Ao.useRef([]),[m,d]=Ao.useState(()=>new Map),[R,g]=Nt({controlled:a,default:n,name:"Tabs",state:"value"}),b=a!==void 0,[x,h]=Ao.useState(()=>new Map),y=Ao.useRef(void 0),C=Ao.useCallback(Q=>HS(x,Q),[x]),[S,E]=Ao.useState(()=>({previousValue:R,tabActivationDirection:"none"})),{previousValue:P,tabActivationDirection:N}=S,w=N,D=!1;P!==R&&(w=Pk(P,R,i,x),D=P!=null&&R!=null&&C(R)==null);let G=D?P:R,I=P!==G||N!==w;z(()=>{I&&E({previousValue:G,tabActivationDirection:w})},[G,I,w]);let O=j((Q,te)=>{let de=Pk(R,Q,i,x);te.activationDirection=de,s?.(Q,te),!te.isCanceled&&g(()=>Q)}),A=j((Q,te)=>{s?.(Q,fe(te,void 0,void 0,{activationDirection:"none"}))}),L=j((Q,te)=>(d(de=>{let ue=new Map(de);return ue.set(Q,te),ue}),()=>{d(de=>{if(de.get(Q)!==te)return de;let ue=new Map(de);return ue.delete(Q),ue})})),X=Ao.useCallback(Q=>m.get(Q),[m]),F=Ao.useCallback(Q=>{for(let te of x.values())if(Q===te.value)return te.id},[x]),B=Ao.useMemo(()=>({getTabElementBySelectedValue:C,getTabIdByPanelValue:F,getTabPanelIdByValue:X,onValueChange:O,orientation:i,registerMountedTabPanel:L,setTabMap:h,tabActivationDirection:w,value:R}),[C,F,X,O,i,L,h,w,R]),k=Ao.useMemo(()=>{for(let Q of x.values())if(Q.value===R)return Q},[x,R]),Y=Ao.useMemo(()=>{for(let Q of x.values())if(!Q.disabled)return Q.value},[x]),V=Ao.useRef(!p),q=Ao.useRef(n),H=Ao.useRef(p),K=Ao.useRef(!1);z(()=>{if(b)return;function Q(J,re){g(()=>J),E({previousValue:J,tabActivationDirection:"none"}),A(J,re),V.current=!1}if(x.size===0){K.current&&R!==null&&!y.current?.isConnected&&Q(null,U.missing);return}K.current=!0,y.current=x.keys().next().value;let te=k?.disabled,de=k==null&&R!==null;if(!te&&R===q.current&&(H.current=!1),H.current&&te&&R===q.current)return;let ue=V.current;if(te||de){let J=Y??null;if(R===J){V.current=!1;return}let re=U.missing;ue?re=U.initial:te&&(re=U.disabled),Q(J,re);return}ue&&k!=null&&(A(R,U.initial),V.current=!1)},[Y,b,A,k,g,x,R]);let ee=_("div",t,{state:{orientation:i,tabActivationDirection:w},ref:o,props:u,stateAttributesMapping:$s});return v(_S.Provider,{value:B,children:v(Jo,{elementsRef:f,children:ee})})});function HS(e,t){for(let[o,r]of e.entries())if(t===r.value)return o;return null}function Pk(e,t,o,r){if(e==null||t==null)return"none";let[n,s,i]=o==="horizontal"?["left","left","right"]:["top","up","down"],l=HS(r,e),a=HS(r,t);if(l==null||a==null)return l!==a&&(typeof e=="number"||typeof e=="string")&&typeof e==typeof t?t>e?i:s:"none";let c=l.getBoundingClientRect()[n],u=a.getBoundingClientRect()[n];return u<c?s:u>c?i:"none"}var wi=T(M(),1);var ah=T(M(),1),US=ah.createContext(void 0);function ch(){let e=ah.useContext(US);if(e===void 0)throw new Error(Me(65));return e}var wk=wi.forwardRef(function(t,o){let{className:r,disabled:n=!1,render:s,value:i,id:l,nativeButton:a=!0,style:c,...u}=t,{value:p,getTabPanelIdByValue:f,onValueChange:m,orientation:d,tabActivationDirection:R}=Ma(),{activateOnFocus:g,registerTabResizeObserverElement:b,tabsListElement:x}=ch(),{highlightedIndex:h,onHighlightedIndexChange:y}=ki(),C=je(l),S=wi.useMemo(()=>({disabled:n,id:C,value:i}),[n,C,i]),{compositeProps:E,compositeRef:P,index:N}=Ag({metadata:S}),w=i===p,D=wi.useRef(!1),G=wi.useRef(null),I=j(K=>{G.current?.(),G.current=K?b(K):null});z(()=>{if(D.current){D.current=!1;return}if(!(w&&N>-1&&h!==N))return;let K=x;if(K!=null){let Z=ct(Fe(K));if(Z&&Ee(K,Z))return}n||y(N)},[w,N,h,y,n,x]);let{getButtonProps:O,buttonRef:A}=ft({disabled:n,native:a,focusableWhenDisabled:!0}),L=f(i),X=wi.useRef(!1),F=wi.useRef(!1);function B(K){m(i,fe(U.none,K.nativeEvent,void 0,{activationDirection:"none"}))}function k(K){w||n||B(K)}function Y(K){w||n||g&&(!X.current||F.current)&&B(K)}function V(K){if(w||n)return;X.current=!0,F.current=K.button===0;let Z=Fe(K.currentTarget);function ee(){X.current=!1,F.current=!1,Z.removeEventListener("pointerup",ee),Z.removeEventListener("pointercancel",ee)}Z.addEventListener("pointerup",ee),Z.addEventListener("pointercancel",ee)}return _("button",t,{state:{disabled:n,active:w,orientation:d,tabActivationDirection:R},ref:[o,A,P,I],props:[E,{role:"tab","aria-controls":L,"aria-selected":w,id:C,onClick:k,onFocus:Y,onPointerDown:V,[pc]:w?"":void 0,onKeyDownCapture(){D.current=!0}},u,O],stateAttributesMapping:$s})});var ou=T(M(),1);var lh={};ae(lh,{activeTabBottom:()=>YS,activeTabHeight:()=>zS,activeTabLeft:()=>GS,activeTabRight:()=>WS,activeTabTop:()=>jS,activeTabWidth:()=>KS});var GS="--active-tab-left",WS="--active-tab-right",jS="--active-tab-top",YS="--active-tab-bottom",KS="--active-tab-width",zS="--active-tab-height";var Ik,Q6={...$s,activeTabPosition:()=>null,activeTabSize:()=>null},Mk=2,Ak=ou.forwardRef(function(t,o){let{className:r,render:n,renderBeforeHydration:s=!1,style:i,...l}=t,{getTabElementBySelectedValue:a,orientation:c,tabActivationDirection:u,value:p}=Ma(),{tabsListElement:f,registerIndicatorUpdateListener:m}=ch(),d=Oi();ou.useEffect(()=>m(d),[m,d]);let R=0,g=0,b=0,x=0,h=0,y=0,C=!1;if(p!=null&&f!=null){let G=a(p);if(G!=null){C=!0;let{width:I,height:O}=Tn(G),{width:A,height:L}=Tn(f),X=G.getBoundingClientRect(),F=f.getBoundingClientRect(),B=A>0?F.width/A:1,k=L>0?F.height/L:1,Y=Z6(G,f);R=Y.left,b=Y.top;let V=(X.left-F.left)/B+f.scrollLeft-f.clientLeft,q=(X.top-F.top)/k+f.scrollTop-f.clientTop,H=e9(G);Math.abs(V-H.x-R)<=Mk&&Math.abs(q-H.y-b)<=Mk&&(R=V,b=q),h=I,y=O,g=f.scrollWidth-R-h,x=f.scrollHeight-b-y}}let S=C?{left:R,right:g,top:b,bottom:x}:null,E=C?{width:h,height:y}:null,P=C?{[GS]:`${R}px`,[WS]:`${g}px`,[jS]:`${b}px`,[YS]:`${x}px`,[KS]:`${h}px`,[zS]:`${y}px`}:void 0,N=C&&h>0&&y>0,D=_("span",t,{state:{orientation:c,activeTabPosition:S,activeTabSize:E,tabActivationDirection:u},ref:o,props:[{role:"presentation",style:P,hidden:!N},l,{suppressHydrationWarning:!0}],stateAttributesMapping:Q6});return p==null?null:v(ou.Fragment,{children:[D,s&&(Ik||(Ik=v(eh,{script:""})))]})});function Z6(e,t){let o=Dk(e),r=Dk(t),n=o.left-r.left-t.clientLeft,s=o.top-r.top-t.clientTop,i=zo(e);for(;tt(i)&&i!==t&&!Cr(i);)n-=i.scrollLeft,s-=i.scrollTop,i=zo(i);return{left:n,top:s}}function Dk(e){let t=0,o=0,r=e;for(;r!=null;){t+=r.offsetLeft,o+=r.offsetTop;let n=r.offsetParent;n!=null&&(t+=n.clientLeft,o+=n.clientTop),r=n}return{left:t,top:o}}function e9(e){let t=Ze(e).getComputedStyle(e),{x:o,y:r}=ya(e,t),n=o,s=r,{translate:i}=t;if(i&&i!=="none"){let l=i.split(" ");n+=Nk(l[0],e.offsetWidth),s+=Nk(l[1],e.offsetHeight)}return{x:n,y:s}}function Nk(e,t){if(!e)return 0;let o=parseFloat(e);return Number.isFinite(o)?e.endsWith("%")?o/100*t:o:0}var ph=T(M(),1);var uh={};ae(uh,{activationDirection:()=>t9,endingStyle:()=>s9,hidden:()=>r9,index:()=>$S,orientation:()=>o9,startingStyle:()=>n9});var $S="data-index",t9="data-activation-direction",o9="data-orientation",r9="data-hidden",n9=bt.startingStyle,s9=bt.endingStyle;var i9={...$s,...Ot},Ok=ph.forwardRef(function(t,o){let{className:r,value:n,render:s,keepMounted:i=!1,style:l,...a}=t,{value:c,getTabIdByPanelValue:u,orientation:p,tabActivationDirection:f,registerMountedTabPanel:m}=Ma(),d=je(),{ref:R,index:g}=oo(),b=n===c,{mounted:x,transitionStatus:h,setMounted:y}=Xt(b),C=!x,S=u(n),E={hidden:C,orientation:p,tabActivationDirection:f,transitionStatus:h},P=ph.useRef(null),N=_("div",t,{state:E,ref:[o,R,P],props:[{"aria-labelledby":S,hidden:C,id:d,role:"tabpanel",tabIndex:b?0:-1,inert:ko(!b),[$S]:g},a],stateAttributesMapping:i9});return St({open:b,ref:P,onComplete(){b||y(!1)}}),z(()=>{if(!(d==null||C&&!i))return m(n,d)},[C,i,n,d,m]),i||x?N:null});var ls=T(M(),1);var Vk=ls.forwardRef(function(t,o){let{activateOnFocus:r=!1,className:n,loopFocus:s=!0,render:i,style:l,...a}=t,{orientation:c,setTabMap:u,tabActivationDirection:p}=Ma(),[f,m]=ls.useState(0),[d,R]=ls.useState(null),g=ls.useRef(new Set),b=ls.useRef(new Set),x=ls.useRef(null);z(()=>{if(typeof ResizeObserver>"u")return;let P=new ResizeObserver(()=>{g.current.forEach(N=>{N()})});return x.current=P,d&&P.observe(d),b.current.forEach(N=>{P.observe(N)}),()=>{P.disconnect(),x.current=null}},[d]);let h=j(P=>(g.current.add(P),()=>{g.current.delete(P)})),y=j(P=>(b.current.add(P),x.current?.observe(P),()=>{b.current.delete(P),x.current?.unobserve(P)})),C={orientation:c,tabActivationDirection:p},S={"aria-orientation":c==="vertical"?"vertical":void 0,role:"tablist"},E=ls.useMemo(()=>({activateOnFocus:r,registerIndicatorUpdateListener:h,registerTabResizeObserverElement:y,tabsListElement:d}),[r,h,y,d]);return v(US.Provider,{value:E,children:v(Hr,{render:i,className:n,style:l,state:C,refs:[o,R],props:[S,a],stateAttributesMapping:$s,highlightedIndex:f,enableHomeAndEndKeys:!0,loopFocus:s,orientation:c,onHighlightedIndexChange:m,onMapChange:u,disabledIndices:yt})})});var XS={};ae(XS,{activationDirection:()=>a9,active:()=>u9,disabled:()=>l9,orientation:()=>c9});var a9="data-activation-direction",c9="data-orientation",l9="data-disabled",u9="data-active";var qS={};ae(qS,{activationDirection:()=>p9,orientation:()=>f9});var p9="data-activation-direction",f9="data-orientation";var JS={};ae(JS,{activationDirection:()=>d9,orientation:()=>m9});var d9="data-activation-direction",m9="data-orientation";var hr={};ae(hr,{Action:()=>Qk,Arrow:()=>n_,Close:()=>qk,Content:()=>Wk,Description:()=>zk,Portal:()=>e_,Positioner:()=>o_,Provider:()=>kk,Root:()=>Gk,Title:()=>Xk,Viewport:()=>_k,createToastManager:()=>a_,useToastManager:()=>i_});var Lk=T(M(),1);var fh=T(M(),1),QS=fh.createContext(void 0);function Xs(){let e=fh.useContext(QS);if(!e)throw new Error(Me(73));return e}var Fk=0;function dh(e){return Fk+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${Fk}`}function mh(e,t){if(typeof e=="string")return{description:e};if(typeof e=="function"){let o=e(t);return typeof o=="string"?{description:o}:o}return e}function ZS(e){let t=new Map,o=0,r=0;return e.forEach((n,s)=>{let i=n.transitionStatus==="ending";t.set(n.id,{value:n,domIndex:s,visibleIndex:i?-1:o,offsetY:r}),r+=n.height||0,i||(o+=1)}),t}function eP(e,t){let o=0;return e.map(r=>{if(r.transitionStatus==="ending")return r;let n=o>=t;return o+=1,r.limited===n?r:{...r,limited:n}})}var us={toasts:e=>e.toasts,isEmpty:e=>e.toasts.length===0,toast:(e,t)=>e.toastMetadata.get(t)?.value,toastIndex:(e,t)=>e.toastMetadata.get(t)?.domIndex??-1,toastOffsetY:(e,t)=>e.toastMetadata.get(t)?.offsetY??0,toastVisibleIndex:(e,t)=>e.toastMetadata.get(t)?.visibleIndex??-1,focused:e=>e.focused,expanded:e=>e.hovering||e.focused,expandedOrOutOfFocus:e=>e.hovering||e.focused||!e.isWindowFocused,prevFocusElement:e=>e.prevFocusElement},gh=class extends go{constructor(o){super({...o,toastMetadata:ZS(o.toasts)},{},us);ot(this,"timers",new Map);ot(this,"areTimersPaused",!1);ot(this,"setViewport",o=>{this.set("viewport",o)});ot(this,"disposeEffect",()=>()=>{this.timers.forEach(o=>{o.timeout?.clear()}),this.timers.clear()});ot(this,"addToast",o=>{let{timeout:r,limit:n}=this.state,s=o.id||dh("toast");if(o.id){let c=us.toast(this.state,o.id);if(c)if(c.transitionStatus==="ending")this.removeToast(o.id,!0);else{let{id:u,transitionStatus:p,...f}=o;return this.updateToastInternal(o.id,f,!0,!0),o.id}}let i={...o,id:s,updateKey:0,transitionStatus:"starting"},l=[i,...this.state.toasts];this.setToasts(eP(l,n));let a=i.timeout??r;return i.type!=="loading"&&a>0&&this.scheduleTimer(s,a,()=>this.closeToast(s)),us.expandedOrOutOfFocus(this.state)&&this.pauseTimers(),s});ot(this,"updateToast",(o,r)=>{let n=us.toast(this.state,o);!n||n.transitionStatus==="ending"||this.updateToastInternal(o,typeof r=="function"?r(n):r,!1,!0)});ot(this,"updateToastInternal",(o,r,n=!1,s=!1)=>{let{timeout:i,toasts:l}=this.state,a=us.toast(this.state,o);if(!a||a.transitionStatus==="ending")return;let c={...a,...r,...s&&{updateKey:a.updateKey+1}};this.setToasts(l.map(b=>b.id===o?c:b));let u=c.timeout??i,p=a.timeout??i,f=Object.hasOwn(r,"timeout"),m=c.transitionStatus!=="ending"&&c.type!=="loading"&&u>0,d=this.timers.has(o),R=p!==u,g=a.type==="loading";if(!m&&d){this.clearTimer(o);return}m&&(!d||R||f||g||n)&&(this.clearTimer(o),this.scheduleTimer(o,u,()=>this.closeToast(o)),us.expandedOrOutOfFocus(this.state)&&this.pauseTimers())});ot(this,"closeToast",o=>{let r=o===void 0,{limit:n,toasts:s}=this.state,i;if(r)i=s,this.clearTimers();else{let c=us.toast(this.state,o);if(!c)return;i=[c],this.clearTimer(o)}let l=s.map(c=>r||c.id===o?{...c,transitionStatus:"ending",height:0}:c),a=eP(l,n);this.setToasts(a,!a.some(c=>c.transitionStatus!=="ending")),i.forEach(c=>{c.transitionStatus!=="ending"&&c.onClose?.()}),this.handleFocusManagement(o)});ot(this,"promiseToast",(o,r)=>{let n=mh(r.loading),s=this.addToast({...n,type:"loading"}),i=o.then(l=>{let a=mh(r.success,l);return this.updateToast(s,{...a,type:"success",timeout:a.timeout}),l}).catch(l=>{let a=mh(r.error,l);return this.updateToast(s,{...a,type:"error",timeout:a.timeout}),Promise.reject(l)});return{}.hasOwnProperty.call(r,"setPromise")&&r.setPromise(i),i});ot(this,"handleDocumentPointerDown",o=>{if(o.pointerType!=="touch")return;let r=$e(o);Ee(this.state.viewport,r)||(this.resumeTimers(),this.update({hovering:!1,focused:!1}))})}syncProviderProps(o,r){let n=this.state.limit!==r;if(this.state.timeout===o&&!n)return;let s={timeout:o,limit:r};if(n){let i=eP(this.state.toasts,r);s.toasts=i,s.toastMetadata=ZS(i)}this.update(s)}removeToast(o,r=!1){let n=us.toastIndex(this.state,o);if(n===-1)return;let s=this.state.toasts[n];r||s?.onRemove?.();let i=[...this.state.toasts];i.splice(n,1),this.setToasts(i)}pauseTimers(){this.areTimersPaused||(this.areTimersPaused=!0,this.timers.forEach(o=>{o.timeout&&(o.timeout.clear(),o.remaining=Math.max(o.remaining-(Date.now()-o.start),0))}))}resumeTimers(){this.areTimersPaused&&(this.areTimersPaused=!1,this.timers.forEach((o,r)=>{o.remaining=o.remaining>0?o.remaining:o.delay,o.timeout??(o.timeout=mo.create()),o.timeout.start(o.remaining,()=>{this.handleTimerFired(r),o.callback()}),o.start=Date.now()}))}restoreFocusToPrevElement(){this.state.prevFocusElement?.focus({preventScroll:!0})}scheduleTimer(o,r,n){let s=Date.now(),l=!us.expandedOrOutOfFocus(this.state)?mo.create():void 0;l?.start(r,()=>{this.handleTimerFired(o),n()}),this.timers.set(o,{timeout:l,start:s,delay:r,remaining:r,callback:n})}clearTimers(){this.timers.forEach(o=>{o.timeout?.clear()}),this.timers.clear(),this.areTimersPaused=!1}clearTimer(o){this.timers.get(o)?.timeout?.clear(),this.timers.delete(o),this.resetPausedStateIfNoTimersRemain()}handleTimerFired(o){this.timers.delete(o),this.resetPausedStateIfNoTimersRemain()}resetPausedStateIfNoTimersRemain(){this.timers.size===0&&(this.areTimersPaused=!1)}setToasts(o,r=o.length===0){let n={toasts:o,toastMetadata:ZS(o)};r&&(n.hovering=!1,n.focused=!1),this.update(n)}handleFocusManagement(o){let r=ct(Fe(this.state.viewport));if(!this.state.viewport||!Ee(this.state.viewport,r)||!gs(r))return;if(o===void 0){this.restoreFocusToPrevElement();return}let n=us.toasts(this.state),s=us.toastIndex(this.state,o),i=(a,c)=>{for(let u=a;u>=0&&u<n.length;u+=c)if(n[u].transitionStatus!=="ending")return n[u];return null},l=i(s+1,1)??i(s-1,-1);l?l.ref?.current?.focus():this.restoreFocusToPrevElement()}};var kk=function(t){let{children:o,timeout:r=5e3,limit:n=3,toastManager:s}=t,i=ut(()=>new gh({timeout:r,limit:n,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return fs(i.disposeEffect),Lk.useEffect(function(){return s?s[" subscribe"](({action:c,options:u})=>{let p=u.id;c==="promise"&&u.promise?i.promiseToast(u.promise,u):c==="update"&&p?i.updateToast(p,u.updates):c==="close"?i.closeToast(p):i.addToast(u)}):void 0},[i,s]),v(QS.Provider,{value:i,children:[v(g9,{store:i,timeout:r,limit:n}),o]})};function g9(e){let{store:t,timeout:o,limit:r}=e;return z(()=>{t.syncProviderProps(o,r)},[t,o,r]),null}var Fn=T(M(),1);var xh={};ae(xh,{frontmostHeight:()=>tP});var tP="--toast-frontmost-height";var _k=Fn.forwardRef(function(t,o){let{render:r,className:n,style:s,children:i,...l}=t,a=Xs(),c=it(),u=Fn.useRef(!1),p=Fn.useRef(!1),f=Fn.useRef(!1),m=a.useState("isEmpty"),d=a.useState("toasts"),R=a.useState("focused"),g=a.useState("expanded"),b=a.useState("prevFocusElement"),x=d[0]?.height,h=d.some(F=>F.transitionStatus==="ending"),y=d.filter(F=>F.priority==="high");Fn.useEffect(()=>{let F=a.state.viewport;if(!F||m)return;let B=Ze(F),k=Fe(F);function Y(H){H.key==="F6"&&$e(H)!==F&&(H.preventDefault(),a.set("prevFocusElement",ct(k)),F?.focus({preventScroll:!0}),a.pauseTimers(),a.set("focused",!0))}function V(H){$e(H)===B&&(a.set("isWindowFocused",!1),a.pauseTimers())}function q(H){if(H.relatedTarget)return;let K=$e(H),Z=ct(Fe(F));(K===B||!Ee(F,K)||!gs(Z))&&a.resumeTimers(),c.start(0,()=>a.set("isWindowFocused",!0))}return So(Ye(B,"keydown",Y),Ye(B,"blur",V,!0),Ye(B,"focus",q,!0),Ye(k,"pointerdown",a.handleDocumentPointerDown,!0))},[a,c,m]);function C(F){u.current=!0;let B=F.relatedTarget===a.state.viewport?d.find(k=>k.transitionStatus!=="ending"&&!k.limited):void 0;B?B.ref?.current?.focus():a.restoreFocusToPrevElement()}function S(F){F.key==="Tab"&&F.shiftKey&&$e(F.nativeEvent)===a.state.viewport&&(F.preventDefault(),a.restoreFocusToPrevElement())}function E(){a.state.toasts.some(B=>B.transitionStatus==="ending")||f.current||!p.current||(a.set("hovering",!1),a.select("expandedOrOutOfFocus")||a.resumeTimers(),p.current=!1)}Fn.useEffect(E,[h,a]);function P(){a.pauseTimers(),a.set("hovering",!0),p.current=!1}function N(){p.current=!0,E()}function w(F){F.pointerType==="touch"&&(f.current=!0)}function D(F){F.pointerType==="touch"&&(f.current=!1,E())}function G(){if(u.current){u.current=!1;return}R||gs(ct(Fe(a.state.viewport)))&&(a.set("focused",!0),a.pauseTimers())}function I(F){!R||Ee(a.state.viewport,F.relatedTarget)||(a.set("focused",!1),a.select("expandedOrOutOfFocus")||a.resumeTimers())}let O={tabIndex:-1,role:"region","aria-live":"polite","aria-atomic":!1,"aria-relevant":"additions text","aria-label":"Notifications",onMouseEnter:P,onMouseMove:P,onMouseLeave:N,onFocus:G,onBlur:I,onKeyDown:S,onClick:G,onPointerDown:w,onPointerUp:D,onPointerCancel:D,style:{[tP]:x?`${x}px`:void 0}},A={expanded:g},L=!m&&b&&v(Fo,{onFocus:C}),X=_("div",t,{ref:[o,a.setViewport],state:A,props:[O,l,{children:v(Fn.Fragment,{children:[L,i,L]})}]});return v(Fn.Fragment,{children:[L,X,!R&&y.length>0&&v("div",{style:co,children:y.map(F=>v("div",{role:"alert","aria-atomic":!0,children:[v("div",{children:F.title}),v("div",{children:F.description})]},F.id))})]})});var Jt=T(M(),1),Uk=T($o(),1);var Rh=T(M(),1),oP=Rh.createContext(void 0);function Da(){let e=Rh.useContext(oP);if(!e)throw new Error(Me(66));return e}var qp={};ae(qp,{height:()=>nP,index:()=>Xp,offsetY:()=>rP,swipeMovementX:()=>sP,swipeMovementY:()=>iP});var Xp="--toast-index",rP="--toast-offset-y",nP="--toast-height",sP="--toast-swipe-movement-x",iP="--toast-swipe-movement-y";var hh={};ae(hh,{endingStyle:()=>y9,expanded:()=>x9,limited:()=>R9,startingStyle:()=>C9,swipeDirection:()=>aP,swiping:()=>b9,type:()=>h9});var x9="data-expanded",R9="data-limited",h9="data-type",b9="data-swiping",aP="data-swipe-direction",C9=bt.startingStyle,y9=bt.endingStyle;var v9={...Ot,swipeDirection(e){return e?{[aP]:e}:null}},Bk=40,E9=10,Hk=.5,S9=1,P9=`${Du},${Yw}`,Gk=Jt.forwardRef(function(t,o){let{toast:r,render:n,className:s,swipeDirection:i=["down","right"],style:l,...a}=t,c=r.positionerProps?.anchor!==void 0,u=[];c||(u=Array.isArray(i)?i:[i]);let p=u.length>0,f=Xs(),[m,d]=Jt.useState(void 0),[R,g]=Jt.useState(!1),[b,x]=Jt.useState(!1),[h,y]=Jt.useState({x:0,y:0}),[C,S]=Jt.useState({x:0,y:0,scale:1}),[E,P]=Jt.useState(),[N,w]=Jt.useState(),[D,G]=Jt.useState(null),I=Jt.useRef(null),O=Jt.useRef(void 0),A=Jt.useRef({x:0,y:0}),L=Jt.useRef({x:0,y:0,scale:1}),X=Jt.useRef(void 0),F=Jt.useRef(0),B=Jt.useRef(!1),k=Jt.useRef({x:0,y:0}),Y=Jt.useRef(!1),V=Jt.useRef({x:0,y:0}),q=Jt.useRef(null),H=Jt.useRef(null),K=f.useState("toastIndex",r.id),Z=f.useState("toastVisibleIndex",r.id),ee=f.useState("toastOffsetY",r.id),Q=f.useState("focused"),te=f.useState("expanded");St({open:r.transitionStatus!=="ending",ref:I,onComplete(){r.transitionStatus==="ending"&&f.removeToast(r.id)}});let de=j((xe=!1)=>{let ve=I.current;if(!ve)return;let ne=ve.style.height;ve.style.height="auto";let oe=ve.offsetHeight;ve.style.height=ne;function ye(){f.updateToastInternal(r.id,{ref:I,height:oe,transitionStatus:void 0})}xe?Uk.flushSync(ye):ye()});z(()=>{let xe=O.current;r.transitionStatus!=="starting"&&xe===r.id||(xe!==void 0&&(d(void 0),S({x:0,y:0,scale:1}),ue({x:0,y:0})),O.current=r.id,de())},[de,r.id,r.transitionStatus]);function ue(xe){V.current=xe,y(xe)}z(()=>()=>{H.current?.abort()},[]);function J(xe,ve){let ne=be=>be>0?be**Hk:-(Math.abs(be)**Hk),oe=xe>0&&!u.includes("right")||xe<0&&!u.includes("left"),ye=ve>0&&!u.includes("down")||ve<0&&!u.includes("up");return{x:oe?ne(xe):xe,y:ye?ne(ve):ve}}let re=j(xe=>{if(xe.pointerId!==q.current)return;q.current=null,H.current?.abort(),H.current=null,g(!1),x(!1),G(null);let ve=L.current;if(xe.type==="pointercancel"||B.current){ue({x:ve.x,y:ve.y}),d(void 0);return}let ne=V.current,oe=ne.x-ve.x,ye=ne.y-ve.y,be;for(let se of u)if(Uo(se,oe,ye)>Bk){be=se;break}be?(d(be),f.closeToast(r.id)):(ue({x:ve.x,y:ve.y}),d(void 0))});function $(xe){if(xe.button!==0)return;xe.pointerType==="touch"&&f.pauseTimers();let ve=$e(xe.nativeEvent);if(Wt(ve,`button,a,input,textarea,[role="button"],${P9}`))return;B.current=!1,X.current=void 0,F.current=0,q.current=xe.pointerId,A.current={x:xe.clientX,y:xe.clientY},k.current=A.current;let oe=xe.currentTarget,ye=ya(oe);L.current=ye,S(ye),ue({x:ye.x,y:ye.y}),f.set("hovering",!0),g(!0),x(!1),G(null),Y.current=!0,H.current?.abort();let be=new AbortController;H.current=be;let se=Fe(oe);se.addEventListener("pointerup",re,{signal:be.signal}),se.addEventListener("pointercancel",re,{signal:be.signal}),oe.setPointerCapture?.(xe.pointerId)}function ie(xe){if(xe.pointerId!==q.current)return;xe.preventDefault(),Y.current&&(A.current={x:xe.clientX,y:xe.clientY},Y.current=!1);let{clientY:ve,clientX:ne,movementX:oe,movementY:ye}=xe;(ye<0&&ve>k.current.y||ye>0&&ve<k.current.y)&&(k.current={x:k.current.x,y:ve}),(oe<0&&ne>k.current.x||oe>0&&ne<k.current.x)&&(k.current={x:ne,y:k.current.y});let be=ne-A.current.x,se=ve-A.current.y,Ne=ve-k.current.y,Ae=ne-k.current.x,Ve=D;if(!b&&Math.sqrt(be*be+se*se)>=S9){x(!0);let rt=u.includes("left")||u.includes("right"),et=u.includes("up")||u.includes("down");if(rt&&et){let pt=Math.abs(be),wt=Math.abs(se);Ve=pt>wt?"horizontal":"vertical",G(Ve)}}let Te;if(!X.current)Ve==="vertical"?se>0?Te="down":se<0&&(Te="up"):Ve==="horizontal"?be>0?Te="right":be<0&&(Te="left"):Math.abs(be)>=Math.abs(se)?Te=be>0?"right":"left":Te=se>0?"down":"up",Te&&u.includes(Te)&&(X.current=Te,F.current=Uo(Te,be,se),d(Te));else{let Ue=X.current,rt=Uo(Ue,Ae,Ne);rt>Bk?(B.current=!1,d(Ue)):!(u.includes("left")&&u.includes("right"))&&!(u.includes("up")&&u.includes("down"))&&F.current-rt>=E9&&(B.current=!0)}let De=J(be,se),ze=L.current.x,We=L.current.y,Ge=u.includes("left")||u.includes("right"),He=u.includes("up")||u.includes("down");Ve!=="vertical"&&Ge&&(ze+=De.x),Ve!=="horizontal"&&He&&(We+=De.y),ue({x:ze,y:We})}function le(xe){if(xe.key==="Escape"){if(!I.current||!Ee(I.current,ct(Fe(I.current))))return;f.closeToast(r.id)}}Jt.useEffect(()=>{let xe=I.current;if(!p||!xe)return;function ve(ne){q.current===null||!Ee(xe,$e(ne))||ne.preventDefault()}return Ye(xe,"touchmove",ve,{passive:!1})},[p]);function he(){let xe=h.x-C.x,ve=h.y-C.y;return{transition:R?"none":void 0,transform:R?`translateX(${h.x}px) translateY(${h.y}px) scale(${C.scale})`:void 0,[sP]:`${xe}px`,[iP]:`${ve}px`}}let Pe=r.priority==="high",ge={role:Pe?"alertdialog":"dialog",tabIndex:0,"aria-modal":!1,"aria-labelledby":E,"aria-describedby":N,"aria-hidden":Pe&&!Q?!0:void 0,onPointerDown:p?$:void 0,onPointerMove:p?ie:void 0,onPointerUp:p?re:void 0,onPointerCancel:p?re:void 0,onKeyDown:le,inert:ko(r.limited),style:{...he(),[Xp]:r.transitionStatus==="ending"?K:Z,[rP]:`${ee}px`,[nP]:r.height?`${r.height}px`:void 0}},Ce=Jt.useMemo(()=>({toast:r,setTitleId:P,setDescriptionId:w,recalculateHeight:de,visibleIndex:Z,expanded:te}),[r,P,w,de,Z,te]),W={transitionStatus:r.transitionStatus,expanded:te,limited:r.limited||!1,type:r.type,swiping:R,swipeDirection:m},me=_("div",t,{ref:[o,I],state:W,stateAttributesMapping:v9,props:[ge,a]});return v(oP.Provider,{value:Ce,children:me})});var bh=T(M(),1);var Wk=bh.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,{visibleIndex:l,expanded:a,recalculateHeight:c}=Da(),u=bh.useRef(null);z(()=>{c();let m=u.current;if(!m||typeof ResizeObserver!="function"||typeof MutationObserver!="function")return;let d=new ResizeObserver(()=>c(!0)),R=new MutationObserver(()=>c(!0));return d.observe(m),R.observe(m,{childList:!0,subtree:!0,characterData:!0}),()=>{d.disconnect(),R.disconnect()}},[c]);let p=l>0;return _("div",t,{ref:[o,u],state:{expanded:a,behind:p},props:i})});var Kk=T(M(),1);var jk=T(M(),1);function Yk(e){return e==null||typeof e=="boolean"||e===""?!1:Array.isArray(e)?e.some(Yk):!0}function Ch(e){return jk.isValidElement(e)&&Yk(e.props.children)}function yh(e,t,o){let{toast:r,setTitleId:n,setDescriptionId:s}=Da(),i=o==="title"?n:s,l=t??(o==="title"?r.title:r.description);return{id:br(e),children:l,type:r.type,setId:i}}function vh(e,t,o){let r=Ch(e);return z(()=>{if(r)return o(t),()=>{o(n=>n===t?void 0:n)}},[r,t,o]),r?e:null}var zk=Kk.forwardRef(function(t,o){let{render:r,className:n,style:s,id:i,children:l,...a}=t,{id:c,children:u,type:p,setId:f}=yh(i,l,"description"),d=_("p",t,{ref:o,state:{type:p},props:{...a,id:c,children:u}});return vh(d,c,f)});var $k=T(M(),1);var Xk=$k.forwardRef(function(t,o){let{render:r,className:n,style:s,id:i,children:l,...a}=t,{id:c,children:u,type:p,setId:f}=yh(i,l,"title"),d=_("h2",t,{ref:o,state:{type:p},props:{...a,id:c,children:u}});return vh(d,c,f)});var Eh=T(M(),1);var qk=Eh.forwardRef(function(t,o){let{render:r,className:n,style:s,disabled:i,nativeButton:l=!0,...a}=t,c=Xs(),{toast:u,expanded:p}=Da(),[f,m]=Eh.useState(!1),{getButtonProps:d,buttonRef:R}=ft({disabled:i,native:l}),g={type:u.type};return _("button",t,{ref:[o,R],state:g,props:[{"aria-hidden":!p&&!f,onClick(){c.closeToast(u.id)},onFocus(){m(!0)},onBlur(){m(!1)}},a,d]})});var Jk=T(M(),1);var Qk=Jk.forwardRef(function(t,o){let{render:r,className:n,style:s,disabled:i,nativeButton:l=!0,...a}=t,{toast:c}=Da(),u=c.actionProps?.children??a.children,{getButtonProps:p,buttonRef:f}=ft({disabled:i,native:l}),m={type:c.type},d=_("button",t,{ref:[o,f],state:m,props:[a,c.actionProps,p,{children:u}]});return Ch(d)?d:null});var Zk=T(M(),1);var e_=Zk.forwardRef(function(t,o){return v(Wl,{ref:o,...t})});var Ph=T(M(),1);var Sh=T(M(),1),cP=Sh.createContext(void 0);function t_(){let e=Sh.useContext(cP);if(e===void 0)throw new Error(Me(84));return e}var o_=Ph.forwardRef(function(t,o){let{toast:r,...n}=t,s=Xs(),i=r.positionerProps??qe,{render:l,className:a,anchor:c=i.anchor,positionMethod:u=i.positionMethod??"absolute",side:p=i.side??"top",align:f=i.align??"center",sideOffset:m=i.sideOffset??0,alignOffset:d=i.alignOffset??0,collisionBoundary:R=i.collisionBoundary??"clipping-ancestors",collisionPadding:g=i.collisionPadding??5,arrowPadding:b=i.arrowPadding??5,sticky:x=i.sticky??!1,disableAnchorTracking:h=i.disableAnchorTracking??!1,collisionAvoidance:y=i.collisionAvoidance??bn,style:C,...S}=n,[E,P]=Ph.useState(null),N=s.useState("toastIndex",r.id),w=s.useState("toastVisibleIndex",r.id),D=st(c)?c:null,G=$n({open:!0,onOpenChange:Qe,elements:{floating:E,reference:D}}),I=Xr({anchor:D,positionMethod:u,floatingRootContext:G,mounted:!0,side:p,sideOffset:m,align:f,alignOffset:d,collisionBoundary:R,collisionPadding:g,sticky:x,arrowPadding:b,disableAnchorTracking:h,keepMounted:!0,collisionAvoidance:y}),O={side:I.side,align:I.align,anchorHidden:I.anchorHidden},A=Pr(t,O,{styles:{...I.positionerStyles,[Xp]:r.transitionStatus==="ending"?N:w},transitionStatus:r.transitionStatus,props:S,refs:[o,P]});return v(cP.Provider,{value:I,children:A})});var r_=T(M(),1);var n_=r_.forwardRef(function(t,o){let{className:r,render:n,style:s,...i}=t,{arrowRef:l,side:a,align:c,arrowUncentered:u,arrowStyles:p}=t_();return _("div",t,{state:{side:a,align:c,uncentered:u},ref:[o,l],props:[{style:p,"aria-hidden":!0},i]})});var s_=T(M(),1);function i_(){let e=Xs(),t=e.useState("toasts");return s_.useMemo(()=>({toasts:t,add:e.addToast,close:e.closeToast,update:e.updateToast,promise:e.promiseToast}),[t,e])}function a_(){let e=new Set;function t(o){e.forEach(r=>r(o))}return{" subscribe":function(r){return e.add(r),()=>{e.delete(r)}},add(o){let r=o.id||dh("toast"),n={...o,id:r,transitionStatus:"starting"};return t({action:"add",options:n}),r},close(o){t({action:"close",options:{id:o}})},update(o,r){t({action:"update",options:{id:o,updates:r}})},promise(o,r){let n=o;return t({action:"promise",options:{...r,promise:o,setPromise(s){n=s}}}),n}}}var lP={};ae(lP,{expanded:()=>T9});var T9="data-expanded";var uP={};ae(uP,{behind:()=>I9,expanded:()=>w9});var w9="data-expanded",I9="data-behind";var pP={};ae(pP,{type:()=>M9});var M9="data-type";var fP={};ae(fP,{type:()=>D9});var D9="data-type";var dP={};ae(dP,{type:()=>N9});var N9="data-type";var mP={};ae(mP,{type:()=>A9});var A9="data-type";var gP={};ae(gP,{anchorHeight:()=>L9,anchorWidth:()=>F9,availableHeight:()=>V9,availableWidth:()=>O9,transformOrigin:()=>k9});var O9="--available-width",V9="--available-height",F9="--anchor-width",L9="--anchor-height",k9="--transform-origin";var xP={};ae(xP,{align:()=>H9,anchorHidden:()=>_9,side:()=>B9});var _9=ce.anchorHidden,B9=ce.side,H9=ce.align;var RP={};ae(RP,{align:()=>G9,side:()=>U9,uncentered:()=>W9});var U9=ce.side,G9=ce.align,W9="data-uncentered";var Jp=T(M(),1);var Th=T(M(),1),hP=Th.createContext(void 0);function c_(){return Th.useContext(hP)}var wh=Jp.forwardRef(function(t,o){let{className:r,defaultPressed:n=!1,disabled:s=!1,form:i,onPressedChange:l,pressed:a,render:c,type:u,value:p,nativeButton:f=!0,style:m,...d}=t,R=je(p||void 0),g=c_(),b=g?.value??[],x=(s||g?.disabled)??!1,[h,y]=Nt({controlled:g?R!==void 0&&b.indexOf(R)>-1:a,default:n,name:"Toggle",state:"pressed"}),{getButtonProps:C,buttonRef:S}=ft({disabled:x,native:f}),E={disabled:x,pressed:h},P=[S,o],N=[{"aria-pressed":h,onClick(G){let I=!h,O=fe(U.none,G.nativeEvent);l?.(I,O),!O.isCanceled&&(R&&g?.setGroupValue?.(R,I,O),!O.isCanceled&&y(I))}},d,C],w=_("button",t,{enabled:!g,state:E,ref:P,props:N}),D=Jp.useMemo(()=>({disabled:x,focusableWhenDisabled:!1}),[x]);return g?v(Tr,{tag:"button",render:c,className:r,style:m,metadata:D,state:E,refs:P,props:N}):w});var bP={};ae(bP,{disabled:()=>Y9,pressed:()=>j9});var j9="data-pressed",Y9="data-disabled";var Mh=T(M(),1);var Ih=T(M(),1),CP=Ih.createContext(void 0);function ru(){return Ih.useContext(CP)}var Dh=Mh.forwardRef(function(t,o){let{defaultValue:r,disabled:n=!1,loopFocus:s=!0,onValueChange:i,orientation:l="horizontal",multiple:a=!1,value:c,className:u,render:p,style:f,...m}=t,d=er(!0),R=ru(),g=r??yt,b=c!==void 0||r!==void 0,x=(d?.disabled??!1)||(R?.disabled??!1)||n,[h,y]=Nt({controlled:c,default:g,name:"ToggleGroup",state:"value"}),C=j((w,D,G)=>{let I;a?(I=h.slice(),D?I.push(w):I.splice(h.indexOf(w),1)):I=D?[w]:[],i?.(I,G),!G.isCanceled&&y(I)}),S={disabled:x,multiple:a,orientation:l},E=Mh.useMemo(()=>({disabled:x,setGroupValue:C,value:h,isValueInitialized:b}),[x,C,h,b]),P={role:"group"},N=_("div",t,{enabled:!!d,state:S,ref:o,props:[P,m]});return v(hP.Provider,{value:E,children:d?N:v(Hr,{render:p,className:u,style:f,state:S,refs:[o],props:[P,m],loopFocus:s,enableHomeAndEndKeys:!0,orientation:l})})});var yP={};ae(yP,{disabled:()=>K9,multiple:()=>$9,orientation:()=>z9});var K9="data-disabled",z9="data-orientation",$9="data-multiple";var qs={};ae(qs,{Button:()=>d_,Group:()=>f_,Input:()=>x_,Link:()=>g_,Root:()=>p_,Separator:()=>u_});var l_=T(M(),1);var u_=l_.forwardRef(function(t,o){let n=er().orientation==="vertical"?"horizontal":"vertical";return v(wn,{orientation:n,...t,ref:o})});var yc=T(M(),1);var p_=yc.forwardRef(function(t,o){let{disabled:r=!1,loopFocus:n,orientation:s="horizontal",className:i,render:l,style:a,...c}=t,[u,p]=yc.useState(()=>new Map),f=yc.useMemo(()=>{let g=[];for(let b of u.values())b.disabled&&!b.focusableWhenDisabled&&g.push(b.index);return g},[u]),m=yc.useMemo(()=>({disabled:r,orientation:s}),[r,s]),d={disabled:r,orientation:s},R={"aria-orientation":s,role:"toolbar"};return v(Ty.Provider,{value:m,children:v(Hr,{render:l,className:i,style:a,state:d,refs:[o],props:[R,c],disabledIndices:f,loopFocus:n,onMapChange:p,orientation:s})})});var Nh=T(M(),1);var f_=Nh.forwardRef(function(t,o){let{className:r,disabled:n=!1,render:s,style:i,...l}=t,{orientation:a,disabled:c}=er(),u=c||n,p=Nh.useMemo(()=>({disabled:u}),[u]),m=_("div",t,{state:{disabled:u,orientation:a},ref:o,props:[{role:"group"},l]});return v(CP.Provider,{value:p,children:m})});var Ah=T(M(),1);var d_=Ah.forwardRef(function(t,o){let{className:r,disabled:n=!1,focusableWhenDisabled:s=!0,render:i,nativeButton:l,style:a,...c}=t,{disabled:u,orientation:p}=er(),f=ru(),m=u||(f?.disabled??!1)||n,d=Ah.useMemo(()=>({disabled:m,focusableWhenDisabled:s}),[m,s]),{getButtonProps:R,buttonRef:g}=ft({disabled:m,focusableWhenDisabled:s,native:l});return v(Tr,{tag:"button",render:i,className:r,style:a,metadata:d,state:{disabled:m,orientation:p,focusable:s},refs:[o,g],props:[c,i?{disabled:m}:qe,R]})});var m_=T(M(),1);var X9={disabled:!1,focusableWhenDisabled:!0},g_=m_.forwardRef(function(t,o){let{className:r,render:n,style:s,...i}=t,{orientation:l}=er();return v(Tr,{tag:"a",render:n,className:r,style:s,metadata:X9,state:{orientation:l},refs:[o],props:[i]})});var Oh=T(M(),1);var x_=Oh.forwardRef(function(t,o){let{className:r,focusableWhenDisabled:n=!0,render:s,disabled:i=!1,style:l,...a}=t,{disabled:c,orientation:u}=er(),p=ru(),f=c||(p?.disabled??!1)||i,m=Oh.useMemo(()=>({disabled:f,focusableWhenDisabled:n}),[f,n]),{props:d}=Vf({composite:!0,disabled:f,focusableWhenDisabled:n,isNativeButton:!1}),R={disabled:f,orientation:u,focusable:n},g=x=>{f&&x.preventDefault()};return v(Tr,{tag:"input",render:s,className:r,style:l,metadata:m,state:R,refs:[o],props:[{onClick:g,onPointerDown:g},a,d]})});var vP={};ae(vP,{orientation:()=>q9});var q9="data-orientation";var EP={};ae(EP,{disabled:()=>J9,orientation:()=>Q9});var J9="data-disabled",Q9="data-orientation";var SP={};ae(SP,{disabled:()=>Z9,orientation:()=>eQ});var Z9="data-disabled",eQ="data-orientation";var PP={};ae(PP,{disabled:()=>tQ,focusable:()=>rQ,orientation:()=>oQ});var tQ="data-disabled",oQ="data-orientation",rQ="data-focusable";var TP={};ae(TP,{orientation:()=>nQ});var nQ="data-orientation";var wP={};ae(wP,{disabled:()=>sQ,focusable:()=>aQ,orientation:()=>iQ});var sQ="data-disabled",iQ="data-orientation",aQ="data-focusable";var Zr={};ae(Zr,{Arrow:()=>V_,Handle:()=>Qp,Popup:()=>A_,Portal:()=>M_,Positioner:()=>D_,Provider:()=>L_,Root:()=>v_,Trigger:()=>T_,Viewport:()=>__,createHandle:()=>B_});var nu=T(M(),1);var Vh=T(M(),1),IP=Vh.createContext(void 0);function Ln(e){let t=Vh.useContext(IP);if(t===void 0&&!e)throw new Error(Me(72));return t}var R_=T(M(),1);var h_={...Vr,disabled:e=>e.disabled,instantType:e=>e.instantType,isInstantPhase:e=>e.isInstantPhase,trackCursorAxis:e=>e.trackCursorAxis,disableHoverablePopup:e=>e.disableHoverablePopup,lastOpenChangeReason:e=>e.openChangeReason,closeOnClick:e=>e.closeOnClick,appliedTriggerProps:(e,t)=>t?e.activeTriggerProps:void 0,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin},Fh=class extends go{constructor(o,r,n){let s=new Mo;super(C_(o,s,r,n),y_(s),h_);ot(this,"setOpen",(o,r)=>{ad(this,o,r,{extraState:{openChangeReason:r.reason}})})}cancelPendingOpen(o){this.state.floatingRootContext.dispatchOpenChange(!1,fe(U.triggerPress,o))}};function b_(){let e=new Mo,t=new vn(Object.freeze(C_(void 0,e)),Object.freeze(y_(e)),h_);return Object.assign(t,{setOpen:Qe,cancelPendingOpen:Qe})}function C_(e,t,o,r=!1){return{...ws(t,o,r),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...e}}function y_(e){return{popupRef:R_.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e}}var v_=zn(function(t){let{disabled:o=!1,defaultOpen:r=!1,open:n,disableHoverablePopup:s=!1,trackCursorAxis:i="none",actionsRef:l,onOpenChange:a,onOpenChangeComplete:c,handle:u,triggerId:p,defaultTriggerId:f=null,children:m}=t,d=$i((D,G)=>new Fh({open:r,openProp:n,activeTriggerId:f,triggerIdProp:p},D,G));d.useControlledProp("openProp",n),d.useControlledProp("triggerIdProp",p),d.useContextCallback("onOpenChange",a),d.useContextCallback("onOpenChangeComplete",c);let R=d.useState("open"),g=!o&&R,b=d.useState("activeTriggerId"),x=d.useState("mounted"),h=d.useState("payload");d.useSyncedValues({trackCursorAxis:i,disableHoverablePopup:s,disabled:o}),vs(d,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:y,transitionStatus:C}=Es(g,d),S=d.useState("isInstantPhase"),E=d.useState("instantType"),P=d.useState("lastOpenChangeReason"),N=nu.useRef(null);z(()=>{R&&o&&d.setOpen(!1,fe(U.disabled))},[R,o,d]),z(()=>{C==="ending"&&P===U.none||C!=="ending"&&S?(E!=="delay"&&(N.current=E),d.set("instantType","delay")):N.current!==null&&(d.set("instantType",N.current),N.current=null)},[C,S,P,E,d]),z(()=>{g&&b==null&&d.set("payload",void 0)},[d,b,g]),nu.useImperativeHandle(l,()=>({unmount:y,close:()=>d.setOpen(!1,fe(U.imperativeAction))}),[y,d]);let w=g||x||!o&&i!=="none";return v(IP.Provider,{value:d,children:[u&&v(Cs,{handle:u,store:d}),w&&v(cQ,{store:d,disabled:o,trackCursorAxis:i}),typeof m=="function"?m({payload:h}):m]})});function cQ({store:e,disabled:t,trackCursorAxis:o}){let r=e.useState("floatingRootContext"),n=ur(r,{enabled:!t,referencePress:()=>e.select("closeOnClick")}),s=Hb(r,{enabled:!t&&o!=="none",axis:o==="none"?void 0:o}),i=nu.useMemo(()=>Pt(s.reference,n.reference),[s.reference,n.reference]);return Ss(e,{activeTriggerProps:i,inactiveTriggerProps:i,popupProps:n.floating??qe}),null}var kh=T(M(),1);var Lh=T(M(),1),MP=Lh.createContext(void 0);function E_(){return Lh.useContext(MP)}var S_="data-base-ui-tooltip-trigger";function P_(e){let t=$e(e);return st(t)?t:null}var T_=Ps(function(t,o){let{render:r,className:n,style:s,handle:i,payload:l,disabled:a,delay:c,closeOnClick:u=!0,closeDelay:p,id:f,...m}=t,d=Ln(!0),g=Is(i)??d;if(!g)throw new Error(Me(82));let b=je(f),x=g.useState("isTriggerActive",b),h=g.useState("isOpenedByTrigger",b),y=g.useState("floatingRootContext"),C=kh.useRef(null),S=p??0,{registerTrigger:E,isMountedByThisTrigger:P}=ys(b,C,g,{payload:l,closeOnClick:u,closeDelay:S}),N=E_(),{activeIdRef:w,delayRef:D,isInstantPhase:G,hasProvider:I}=Ib(y,{open:h}),O=qi(y);g.useSyncedValue("isInstantPhase",G);let A=g.useState("disabled"),L=a??A,X=Et(L),F=g.useState("trackCursorAxis"),B=g.useState("disableHoverablePopup"),k=kh.useRef(!1),Y=it(),V=kh.useRef(void 0);function q(){return I&&w.current!=null?0:c??N??600}function H(J){let re=C.current;if(!re||!J)return!1;let $=Wt(J,`[${S_}]`);return $!==null&&$!==re&&Ee(re,$)}function K(J){let re=H(J);return k.current=re,re&&(O.openChangeTimeout.clear(),O.restTimeout.clear(),O.restTimeoutPending=!1,Y.clear()),re}let Z=pn(y,{enabled:!L,mouseOnly:!0,move:!1,handleClose:!B&&F!=="both"?fn():null,restMs:q,delay(){return p==null&&I?{close:Un(D.current,"close")}:{close:S}},triggerElementRef:C,isActiveTrigger:x,isClosing:()=>g.select("transitionStatus")==="ending",shouldOpen(){return!k.current}}),ee=Ka(y,{enabled:!L}).reference,Q=J=>{let re=k.current,$=P_(J),ie=K($),le=C.current,he=le&&$&&Ee(le,$);if(ie&&g.select("open")&&g.select("lastOpenChangeReason")===U.triggerHover){g.setOpen(!1,fe(U.triggerHover,J));return}if(re&&!ie&&he&&!X.current&&!g.select("open")&&le&&on(V.current)){let Pe=()=>{!k.current&&!X.current&&!g.select("open")&&g.setOpen(!0,fe(U.triggerHover,J,le))},ge=q();ge===0?(Y.clear(),Pe()):Y.start(ge,Pe)}},te=g.useState("appliedTriggerProps",P||F!=="none");return _("button",t,{state:{open:h},ref:[o,E,C],props:[Z,ee,te,{onMouseOver(J){Q(J.nativeEvent)},onFocus(J){H(P_(J.nativeEvent))&&J.preventBaseUIHandler()},onMouseLeave(){k.current=!1,Y.clear(),V.current=void 0},onPointerEnter(J){V.current=J.pointerType},onPointerDown(J){V.current=J.pointerType,g.set("closeOnClick",u),u&&!g.select("open")&&g.cancelPendingOpen(J.nativeEvent)},onClick(J){u&&!g.select("open")&&g.cancelPendingOpen(J.nativeEvent)},id:b,[Fc]:L?"":void 0,[S_]:L?void 0:""},m],stateAttributesMapping:yr})});var I_=T(M(),1);var _h=T(M(),1),DP=_h.createContext(void 0);function w_(){let e=_h.useContext(DP);if(e===void 0)throw new Error(Me(70));return e}var M_=I_.forwardRef(function(t,o){let{keepMounted:r=!1,...n}=t;return Ln().useState("mounted")||r?v(DP.Provider,{value:r,children:v(Wl,{ref:o,...n})}):null});var Hh=T(M(),1);var Bh=T(M(),1),NP=Bh.createContext(void 0);function su(){let e=Bh.useContext(NP);if(e===void 0)throw new Error(Me(71));return e}var D_=Hh.forwardRef(function(t,o){let{render:r,className:n,anchor:s,positionMethod:i="absolute",side:l="top",align:a="center",sideOffset:c=0,alignOffset:u=0,collisionBoundary:p="clipping-ancestors",collisionPadding:f=5,arrowPadding:m=5,sticky:d=!1,disableAnchorTracking:R=!1,collisionAvoidance:g=bn,style:b,...x}=t,h=Ln(),y=w_(),C=h.useState("open"),S=h.useState("mounted"),E=h.useState("trackCursorAxis"),P=h.useState("disableHoverablePopup"),N=h.useState("floatingRootContext"),w=h.useState("instantType"),D=h.useState("transitionStatus"),G=h.useState("adaptiveOrigin"),I=Xr({anchor:s,positionMethod:i,floatingRootContext:N,mounted:S,side:l,sideOffset:c,align:a,alignOffset:u,collisionBoundary:p,collisionPadding:f,sticky:d,arrowPadding:m,disableAnchorTracking:R,keepMounted:y,collisionAvoidance:g,adaptiveOrigin:G}),O=Hh.useMemo(()=>({open:C,side:I.side,align:I.align,anchorHidden:I.anchorHidden,instant:E!=="none"?"tracking-cursor":w}),[C,I.side,I.align,I.anchorHidden,E,w]),A=Pr(t,O,{styles:I.positionerStyles,transitionStatus:D,props:x,refs:[o,h.useStateSetter("positionerElement")],hidden:!S,inert:!C||E==="both"||P});return v(NP.Provider,{value:I,children:A})});var N_=T(M(),1);var A_=N_.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,l=Ln(),{side:a,align:c}=su(),u=l.useState("open"),p=l.useState("instantType"),f=l.useState("transitionStatus"),m=l.useState("popupProps"),d=l.useState("floatingRootContext"),R=l.useState("disabled"),g=l.useState("closeDelay");St({open:u,ref:l.context.popupRef,onComplete(){u&&l.context.onOpenChangeComplete?.(!0)}}),Xn(d,{enabled:!R,closeDelay:g});let b=l.useStateSetter("popupElement");return _("div",t,{state:{open:u,side:a,align:c,instant:p,transitionStatus:f},ref:[o,l.context.popupRef,b],props:[Sr,m,Zo(f),i],stateAttributesMapping:ro})});var O_=T(M(),1);var V_=O_.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,l=Ln(),{arrowRef:a,side:c,align:u,arrowUncentered:p,arrowStyles:f}=su(),m=l.useState("open"),d=l.useState("instantType");return _("div",t,{state:{open:m,side:c,align:u,uncentered:p,instant:d},ref:[o,a],props:[{style:f,"aria-hidden":!0},i],stateAttributesMapping:Qt})});var F_=T(M(),1);var L_=function(t){let{delay:o,closeDelay:r,timeout:n=400}=t,s=F_.useMemo(()=>({open:o,close:r}),[o,r]);return v(MP.Provider,{value:o,children:v(wb,{delay:s,timeoutMs:n,children:t.children})})};var k_=T(M(),1);var __=k_.forwardRef(function(t,o){let{render:r,className:n,style:s,children:i,...l}=t,a=Ln(),c=su(),u=a.useState("instantType"),{children:p,state:f}=xa({store:a,side:c.side,children:i}),m={activationDirection:f.activationDirection,transitioning:f.transitioning,instant:u};return _("div",t,{state:m,ref:o,props:[l,{children:p}],stateAttributesMapping:ga})});var Qp=class extends Cn{constructor(){super(b_(),"Tooltip")}open(t){this.openByTrigger(t)}close(){this.closePopup()}get isOpen(){return this.attachedStore?.select("open")??!1}};function B_(){return new Qp}var AP={};ae(AP,{anchorHeight:()=>fQ,anchorWidth:()=>pQ,availableHeight:()=>uQ,availableWidth:()=>lQ,positionerHeight:()=>gQ,positionerWidth:()=>mQ,transformOrigin:()=>dQ});var lQ="--available-width",uQ="--available-height",pQ="--anchor-width",fQ="--anchor-height",dQ="--transform-origin",mQ="--positioner-width",gQ="--positioner-height";var OP={};ae(OP,{align:()=>CQ,anchorHidden:()=>hQ,closed:()=>RQ,open:()=>xQ,side:()=>bQ});var xQ=ce.open,RQ=ce.closed,hQ=ce.anchorHidden,bQ=ce.side,CQ=ce.align;var VP={};ae(VP,{align:()=>TQ,closed:()=>vQ,endingStyle:()=>SQ,instant:()=>wQ,open:()=>yQ,side:()=>PQ,startingStyle:()=>EQ});var yQ=ce.open,vQ=ce.closed,EQ=ce.startingStyle,SQ=ce.endingStyle,PQ=ce.side,TQ=ce.align,wQ="data-instant";var FP={};ae(FP,{align:()=>NQ,closed:()=>MQ,instant:()=>OQ,open:()=>IQ,side:()=>DQ,uncentered:()=>AQ});var IQ=ce.open,MQ=ce.closed,DQ=ce.side,NQ=ce.align,AQ="data-uncentered",OQ="data-instant";var LP={};ae(LP,{popupHeight:()=>FQ,popupWidth:()=>VQ});var VQ="--popup-width",FQ="--popup-height";var kP={};ae(kP,{activationDirection:()=>_Q,current:()=>LQ,instant:()=>HQ,previous:()=>kQ,transitioning:()=>BQ});var LQ="data-current",kQ="data-previous",_Q="data-activation-direction",BQ="data-transitioning",HQ="data-instant";function UQ(e){return _(e.defaultTagName??"div",e,e)}var lT={};ae(lT,{Accordion:()=>h0,AccordionContent:()=>nT,AlertDialog:()=>a0,AlertDialogActions:()=>qP,Autocomplete:()=>Q_,Avatar:()=>E0,AvatarGroup:()=>cT,Button:()=>HP,Checkbox:()=>t0,CheckboxGroup:()=>r0,CheckboxLabel:()=>jP,Collapsible:()=>b0,CollapsibleContent:()=>sT,Combobox:()=>e0,ContextMenu:()=>f0,Dialog:()=>i0,DialogActions:()=>XP,DialogContent:()=>$P,Drawer:()=>R0,Field:()=>W_,Fieldset:()=>Y_,FieldsetDescription:()=>j_,Form:()=>WP,FormActions:()=>z_,Input:()=>UP,Menu:()=>p0,Menubar:()=>d0,Meter:()=>c0,MeterHeader:()=>JP,NavigationMenu:()=>$_,NumberField:()=>q_,OTPField:()=>J_,Popover:()=>m0,PreviewCard:()=>g0,PreviewCardContent:()=>tT,PreviewCardDescription:()=>rT,PreviewCardImage:()=>eT,PreviewCardTitle:()=>oT,Progress:()=>l0,ProgressHeader:()=>QP,Radio:()=>o0,RadioGroup:()=>YP,RadioLabel:()=>zP,RadioRow:()=>KP,ScrollArea:()=>P0,Select:()=>X_,Separator:()=>T0,Slider:()=>u0,SliderHeader:()=>ZP,Switch:()=>y0,SwitchContainer:()=>iT,SwitchLabel:()=>aT,Tabs:()=>C0,Toast:()=>v0,Toggle:()=>n0,ToggleGroup:()=>s0,Toolbar:()=>S0,Tooltip:()=>x0,cn:()=>Ct,cnState:()=>Gt});function Ct(...e){let t=[];for(let o of e)if(!(o==null||o===!1)){if(typeof o=="string"||typeof o=="number")t.push(String(o));else if(Array.isArray(o)){let r=Ct(...o);r&&t.push(r)}else if(typeof o=="object")for(let[r,n]of Object.entries(o))n&&t.push(r)}return t.join(" ")}function Gt(e,t,o){return Ct(e,typeof t=="function"?t(o):t)}var U_=T(M(),1);var Na=T(M(),1);function Re(e,t,o){let r=Na.forwardRef(function(s,i){let{className:l,...a}=s;return v(e,{ref:i,...a,className:c=>Gt(o,l,c)})});return r.displayName=t,r}function H_(e,t,o,r){let n=Na.forwardRef(function(i,l){let{className:a,...c}=i;return v(e,{ref:l,...c,className:u=>{let p=typeof a=="function"?a(u):a,f=p?.split(/\s+/).includes(r);return Ct(f?void 0:o,p)}})});return n.displayName=t,n}function BP(e){let t=Na.Children.toArray(e);return t.length===1&&Na.isValidElement(t[0])}function Oo(e,t,{partClass:o,optIn:r=!1,otherClass:n,skipClass:s}={}){let i=Na.forwardRef(function(a,c){let{className:u,emphasis:p,palette:f,...m}=a,d=p!==void 0||f!==void 0;return v(e,{ref:c,"data-emphasis":p,"data-color":f,"data-icon-only":BP(m.children)?"":void 0,...m,className:R=>{let g=typeof u=="function"?u(R):u,b=g?.split(/\s+/)??[],x=!(s&&b.includes(s))&&(!r||d||b.includes("Button"));return Ct(o,x&&!b.includes("Button")?"Button":void 0,x?void 0:n,g)}})});return i.displayName=t,i}var HP=U_.forwardRef(function({className:t,emphasis:o,palette:r,children:n,...s},i){return v(_m,{ref:i,"data-emphasis":o,"data-color":r,"data-icon-only":BP(n)?"":void 0,...s,className:l=>Gt("Button",t,l),children:n})});HP.displayName="Button";var G_=T(M(),1);var UP=G_.forwardRef(function({className:t,...o},r){return v(Bx,{ref:r,...o,className:n=>Gt("Input",t,n)})});UP.displayName="Input";var vc=T(M(),1);var GQ=vc.forwardRef(function({className:t,...o},r){return v(mn.Root,{ref:r,...o,className:n=>Gt("FieldRoot",t,n)})}),WQ=vc.forwardRef(function({className:t,...o},r){return v(mn.Label,{ref:r,...o,className:n=>Gt("FieldLabel",t,n)})}),jQ=vc.forwardRef(function({className:t,...o},r){return v(mn.Description,{ref:r,...o,className:n=>Gt("FieldDescription",t,n)})}),YQ=vc.forwardRef(function({className:t,...o},r){return v(mn.Error,{ref:r,...o,className:n=>Gt("FieldError",t,n)})}),KQ=vc.forwardRef(function({className:t,...o},r){return v(mn.Control,{ref:r,...o,className:n=>Gt("FieldControl",t,n)})}),zQ=mn.Validity,$Q=vc.forwardRef(function({className:t,...o},r){return v(mn.Item,{ref:r,...o,className:n=>Gt("",t,n)})}),W_={Root:GQ,Label:WQ,Description:jQ,Error:YQ,Control:KQ,Validity:zQ,Item:$Q};var GP=T(M(),1);var XQ=GP.forwardRef(function({className:t,...o},r){return v(Fl.Root,{ref:r,...o,className:n=>Gt("Fieldset",t,n)})}),qQ=GP.forwardRef(function({className:t,...o},r){return v(Fl.Legend,{ref:r,...o,className:n=>Gt("FieldsetLegend",t,n)})});function j_({className:e,...t}){return v("div",{className:Ct("FieldsetDescription",e),...t})}var Y_={Root:XQ,Legend:qQ};var K_=T(M(),1);var WP=K_.forwardRef(function({className:t,...o},r){return v(_x,{ref:r,...o,className:n=>Gt("Form",t,n)})});WP.displayName="Form";function z_({className:e,...t}){return v("div",{className:Ct("FormActions",e),...t})}var Rn=T(M(),1);var JQ=Rn.forwardRef(function({className:t,...o},r){return v(xr.Root,{ref:r,...o,className:n=>Gt("NavigationMenuRoot",t,n)})}),QQ=Rn.forwardRef(function({className:t,...o},r){return v(xr.List,{ref:r,...o,className:n=>Gt("NavigationMenuList",t,n)})}),ZQ=Rn.forwardRef(function({className:t,...o},r){return v(xr.Item,{ref:r,...o,className:n=>Gt("",t,n)})}),eZ=Rn.forwardRef(function({className:t,...o},r){return v(xr.Content,{ref:r,...o,className:n=>Gt("NavigationMenuContent",t,n)})}),tZ=Rn.forwardRef(function({className:t,...o},r){return v(xr.Trigger,{ref:r,...o,className:n=>Gt("NavigationMenuTrigger",t,n)})}),oZ=Rn.forwardRef(function({className:t,...o},r){return v(xr.Icon,{ref:r,...o,className:n=>Gt("NavigationMenuIcon",t,n)})}),rZ=xr.Portal,nZ=Rn.forwardRef(function({className:t,...o},r){return v(xr.Positioner,{ref:r,...o,className:n=>Gt("NavigationMenuPositioner",t,n)})}),sZ=Rn.forwardRef(function({className:t,...o},r){return v(xr.Popup,{ref:r,...o,className:n=>Gt("NavigationMenuPopup",t,n)})}),iZ=Rn.forwardRef(function({className:t,...o},r){return v(xr.Arrow,{ref:r,...o,className:n=>Gt("NavigationMenuArrow",t,n)})}),aZ=Rn.forwardRef(function({className:t,...o},r){return v(xr.Viewport,{ref:r,...o,className:n=>Gt("NavigationMenuViewport",t,n)})}),cZ=Rn.forwardRef(function({className:t,...o},r){return v(xr.Link,{ref:r,...o,className:n=>Gt("NavigationMenuLink",t,n)})}),lZ=Rn.forwardRef(function({className:t,...o},r){return v(xr.Backdrop,{ref:r,...o,className:n=>Gt("",t,n)})}),$_={Root:JQ,List:QQ,Item:ZQ,Content:eZ,Trigger:tZ,Icon:oZ,Portal:rZ,Positioner:nZ,Popup:sZ,Arrow:iZ,Viewport:aZ,Link:cZ,Backdrop:lZ};var uZ=Oo(vo.Trigger,"SelectTrigger",{optIn:!0,otherClass:"SelectTrigger"}),pZ=Re(vo.Value,"SelectValue","SelectValue"),fZ=Re(vo.Icon,"SelectIcon","SelectIcon"),dZ=Re(vo.Backdrop,"SelectBackdrop","SelectBackdrop"),mZ=Re(vo.Positioner,"SelectPositioner","SelectPositioner"),gZ=Re(vo.Popup,"SelectPopup","SelectPopup"),xZ=Re(vo.List,"SelectList","SelectList"),RZ=Re(vo.Item,"SelectItem","SelectItem"),hZ=Re(vo.ItemIndicator,"SelectItemIndicator","SelectItemIndicator"),bZ=Re(vo.ItemText,"SelectItemText","SelectItemText"),CZ=Re(vo.Arrow,"SelectArrow","SelectArrow"),yZ=Re(vo.ScrollDownArrow,"SelectScrollDownArrow","SelectScrollArrow"),vZ=Re(vo.ScrollUpArrow,"SelectScrollUpArrow","SelectScrollArrow"),EZ=Re(vo.Group,"SelectGroup","SelectGroup"),SZ=Re(vo.GroupLabel,"SelectGroupLabel","SelectGroupLabel"),PZ=Re(vo.Separator,"SelectSeparator","SelectSeparator"),X_={Root:vo.Root,Label:vo.Label,Trigger:uZ,Value:pZ,Icon:fZ,Portal:vo.Portal,Backdrop:dZ,Positioner:mZ,Popup:gZ,List:xZ,Item:RZ,ItemIndicator:hZ,ItemText:bZ,Arrow:CZ,ScrollDownArrow:yZ,ScrollUpArrow:vZ,Group:EZ,GroupLabel:SZ,Separator:PZ};var TZ=Re(ns.Root,"NumberFieldRoot","NumberFieldRoot"),wZ=Re(ns.Group,"NumberFieldGroup","NumberFieldGroup"),IZ=Re(ns.Input,"NumberFieldInput","NumberFieldInput"),MZ=Re(ns.Increment,"NumberFieldIncrement","NumberFieldIncrement"),DZ=Re(ns.Decrement,"NumberFieldDecrement","NumberFieldDecrement"),NZ=Re(ns.ScrubArea,"NumberFieldScrubArea","NumberFieldScrubArea");function AZ({className:e,htmlFor:t,...o}){return v("label",{htmlFor:t,className:Ct("NumberFieldLabel",e),...o})}var q_={Root:TZ,Group:wZ,Input:IZ,Increment:MZ,Decrement:DZ,ScrubArea:NZ,ScrubAreaCursor:ns.ScrubAreaCursor,Label:AZ};var OZ=Re(Rc.Root,"OTPFieldRoot","OTPFieldRoot"),VZ=Re(Rc.Input,"OTPFieldInput","OTPFieldInput"),FZ=Re(Rc.Separator,"OTPFieldSeparator","OTPFieldSeparator"),J_={Root:OZ,Input:VZ,Separator:FZ};function LZ({className:e,style:t,...o}){return v("div",{className:Ct("AutocompleteRoot",e),style:t,children:v(Zt.Root,{...o})})}var kZ=Re(Zt.Input,"AutocompleteInput","AutocompleteInput"),_Z=Re(Zt.Clear,"AutocompleteClear","AutocompleteClear"),BZ=Re(Zt.Positioner,"AutocompletePositioner","AutocompletePositioner"),HZ=Re(Zt.Popup,"AutocompletePopup","AutocompletePopup"),UZ=Re(Zt.List,"AutocompleteList","AutocompleteList"),GZ=Re(Zt.Item,"AutocompleteItem","AutocompleteItem"),WZ=Re(Zt.GroupLabel,"AutocompleteGroupLabel","AutocompleteGroupLabel"),jZ=Re(Zt.Separator,"AutocompleteSeparator","AutocompleteSeparator"),YZ=Re(Zt.Empty,"AutocompleteEmpty","AutocompleteEmpty"),Q_={Root:LZ,Value:Zt.Value,Trigger:Zt.Trigger,Input:kZ,InputGroup:Zt.InputGroup,Icon:Zt.Icon,Clear:_Z,List:UZ,Status:Zt.Status,Portal:Zt.Portal,Backdrop:Zt.Backdrop,Positioner:BZ,Popup:HZ,Arrow:Zt.Arrow,Group:Zt.Group,GroupLabel:WZ,Item:GZ,Row:Zt.Row,Collection:Zt.Collection,Empty:YZ,Separator:jZ,useFilter:Zt.useFilter,useFilteredItems:Zt.useFilteredItems};var Z_=T(M(),1);function KZ({className:e,style:t,...o}){return v("div",{className:Ct("ComboboxRoot",e),style:t,children:v(Ut.Root,{...o})})}var zZ=Z_.forwardRef(function({className:t,...o},r){return v(Ut.Trigger,{ref:r,...o,className:n=>{let s=typeof t=="function"?t(n):t,i=s?.split(/\s+/).includes("ComboboxSelectTrigger");return Ct(i?void 0:"ComboboxTrigger",s)}})}),$Z=Re(Ut.Label,"ComboboxLabel","ComboboxLabel"),XZ=Re(Ut.Input,"ComboboxInput","ComboboxInput"),qZ=Re(Ut.Clear,"ComboboxClear","ComboboxClear"),JZ=Re(Ut.Icon,"ComboboxIcon","ComboboxIcon"),QZ=Re(Ut.Chips,"ComboboxChips","ComboboxChips"),ZZ=Re(Ut.Chip,"ComboboxChip","ComboboxChip"),e7=Re(Ut.ChipRemove,"ComboboxChipRemove","ComboboxChipRemove"),t7=Re(Ut.Positioner,"ComboboxPositioner","ComboboxPositioner"),o7=Re(Ut.Popup,"ComboboxPopup","ComboboxPopup"),r7=Re(Ut.List,"ComboboxList","ComboboxList"),n7=Re(Ut.Item,"ComboboxItem","ComboboxItem"),s7=Re(Ut.ItemIndicator,"ComboboxItemIndicator","ComboboxItemIndicator"),i7=Re(Ut.GroupLabel,"ComboboxGroupLabel","ComboboxGroupLabel"),a7=Re(Ut.Separator,"ComboboxSeparator","ComboboxSeparator"),c7=Re(Ut.Empty,"ComboboxEmpty","ComboboxEmpty"),l7=Re(Ut.Status,"ComboboxStatus","ComboboxStatus"),e0={Root:KZ,Label:$Z,Value:Ut.Value,Input:XZ,InputGroup:Ut.InputGroup,Trigger:zZ,List:r7,Status:l7,Portal:Ut.Portal,Backdrop:Ut.Backdrop,Positioner:t7,Popup:o7,Arrow:Ut.Arrow,Icon:JZ,Group:Ut.Group,GroupLabel:i7,Item:n7,ItemIndicator:s7,Chips:QZ,Chip:ZZ,ChipRemove:e7,Row:Ut.Row,Collection:Ut.Collection,Empty:c7,Clear:qZ,Separator:a7,useFilter:Ut.useFilter,useFilteredItems:Ut.useFilteredItems,createItems:Ut.createItems};var u7=Re(hl.Root,"CheckboxRoot","CheckboxRoot"),p7=Re(hl.Indicator,"CheckboxIndicator","CheckboxIndicator");function jP({className:e,...t}){return v("label",{className:Ct("CheckboxLabel",e),...t})}var t0={Root:u7,Indicator:p7,Label:jP};var f7=Re(Yl.Root,"RadioRoot","RadioButton"),d7=Re(Yl.Indicator,"RadioIndicator","RadioIndicator"),YP=Re(SR,"RadioGroup","RadioGroup");function KP({className:e,...t}){return v("label",{className:Ct("RadioRoot",e),...t})}function zP({className:e,...t}){return v("span",{className:Ct("RadioLabel",e),...t})}var o0={Root:f7,Indicator:d7,Group:YP,Row:KP,Label:zP};var r0=Re(Ym,"CheckboxGroup","CheckboxGroup");var n0=Re(wh,"Toggle","Toggle");var s0=H_(Dh,"ToggleGroup","ToggleGroup","ToolbarGroup");var m7=Oo(kr.Trigger,"DialogTrigger"),g7=Re(kr.Backdrop,"DialogBackdrop","DialogBackdrop"),x7=Re(kr.Popup,"DialogPopup","DialogPopup"),R7=Re(kr.Title,"DialogTitle","DialogTitle"),h7=Re(kr.Description,"DialogDescription","DialogDescription"),b7=Oo(kr.Close,"DialogClose",{optIn:!0,otherClass:"DialogClose"});function $P({className:e,...t}){return v("div",{className:Ct("DialogContent",e),...t})}function XP({className:e,...t}){return v("div",{className:Ct("DialogActions",e),...t})}var i0={Root:kr.Root,Trigger:m7,Portal:kr.Portal,Backdrop:g7,Popup:x7,Title:R7,Description:h7,Close:b7,Viewport:kr.Viewport,Content:$P,Actions:XP,Handle:kr.Handle,createHandle:kr.createHandle};var C7=Oo(Lr.Trigger,"AlertDialogTrigger"),y7=Re(Lr.Backdrop,"AlertDialogBackdrop","AlertDialogBackdrop"),v7=Re(Lr.Popup,"AlertDialogPopup","AlertDialogPopup"),E7=Re(Lr.Title,"AlertDialogTitle","AlertDialogTitle"),S7=Re(Lr.Description,"AlertDialogDescription","AlertDialogDescription"),P7=Oo(Lr.Close,"AlertDialogClose");function qP({className:e,...t}){return v("div",{className:Ct("AlertDialogActions",e),...t})}var a0={Root:Lr.Root,Trigger:C7,Portal:Lr.Portal,Backdrop:y7,Popup:v7,Title:E7,Description:S7,Close:P7,Viewport:Lr.Viewport,Actions:qP,Handle:Lr.Handle,createHandle:Lr.createHandle};var T7=Re(mi.Root,"MeterRoot","MeterRoot"),w7=Re(mi.Label,"MeterLabel","MeterLabel"),I7=Re(mi.Value,"MeterValue","MeterValue"),M7=Re(mi.Track,"MeterTrack","MeterTrack"),D7=Re(mi.Indicator,"MeterIndicator","MeterIndicator");function JP({className:e,...t}){return v("div",{className:Ct("MeterHeader",e),...t})}var c0={Root:T7,Label:w7,Header:JP,Value:I7,Track:M7,Indicator:D7};var N7=Re(Ei.Root,"ProgressRoot","ProgressRoot"),A7=Re(Ei.Label,"ProgressLabel","ProgressLabel"),O7=Re(Ei.Value,"ProgressValue","ProgressValue"),V7=Re(Ei.Track,"ProgressTrack","ProgressTrack"),F7=Re(Ei.Indicator,"ProgressIndicator","ProgressIndicator");function QP({className:e,...t}){return v("div",{className:Ct("ProgressHeader",e),...t})}var l0={Root:N7,Label:A7,Header:QP,Value:O7,Track:V7,Indicator:F7};var L7=Re(cs.Root,"SliderRoot","SliderRoot"),k7=Re(cs.Label,"SliderLabel","SliderLabel"),_7=Re(cs.Value,"SliderValue","SliderValue"),B7=Re(cs.Control,"SliderControl","SliderControl"),H7=Re(cs.Track,"SliderTrack","SliderTrack"),U7=Re(cs.Indicator,"SliderIndicator","SliderIndicator"),G7=Re(cs.Thumb,"SliderThumb","SliderThumb");function ZP({className:e,...t}){return v("div",{className:Ct("SliderHeader",e),...t})}var u0={Root:L7,Label:k7,Header:ZP,Value:_7,Control:B7,Track:H7,Indicator:U7,Thumb:G7};var W7=Oo(Bt.Trigger,"MenuTrigger",{skipClass:"MenubarTrigger"}),j7=Re(Bt.Positioner,"MenuPositioner","MenuPositioner"),Y7=Re(Bt.Popup,"MenuPopup","MenuPopup"),K7=Re(Bt.Item,"MenuItem","MenuItem"),z7=Re(Bt.CheckboxItem,"MenuCheckboxItem","MenuCheckboxItem"),$7=Re(Bt.CheckboxItemIndicator,"MenuCheckboxItemIndicator","MenuCheckboxItemIndicator"),X7=Re(Bt.RadioItem,"MenuRadioItem","MenuRadioItem"),q7=Re(Bt.RadioItemIndicator,"MenuRadioItemIndicator","MenuRadioItemIndicator"),J7=Re(Bt.SubmenuTrigger,"MenuSubmenuTrigger","MenuSubmenuTrigger"),Q7=Re(Bt.Group,"MenuGroup","MenuGroup"),Z7=Re(Bt.GroupLabel,"MenuGroupLabel","MenuGroupLabel"),e8=Re(Bt.Separator,"MenuSeparator","MenuSeparator"),p0={Root:Bt.Root,Trigger:W7,Portal:Bt.Portal,Backdrop:Bt.Backdrop,Positioner:j7,Popup:Y7,Arrow:Bt.Arrow,Item:K7,LinkItem:Bt.LinkItem,CheckboxItem:z7,CheckboxItemIndicator:$7,RadioGroup:Bt.RadioGroup,RadioItem:X7,RadioItemIndicator:q7,Group:Q7,GroupLabel:Z7,Separator:e8,SubmenuRoot:Bt.SubmenuRoot,SubmenuTrigger:J7,Viewport:Bt.Viewport,Input:Bt.Input,List:Bt.List,Clear:Bt.Clear,Empty:Bt.Empty,FilterProvider:Bt.FilterProvider,Handle:Bt.Handle,createHandle:Bt.createHandle,useFilter:Bt.useFilter};var t8=Re(yo.Trigger,"ContextMenuTrigger","ContextMenuTrigger"),o8=Re(yo.Positioner,"ContextMenuPositioner","ContextMenuPositioner"),r8=Re(yo.Popup,"ContextMenuPopup","ContextMenuPopup"),n8=Re(yo.Item,"ContextMenuItem","ContextMenuItem"),s8=Re(yo.CheckboxItem,"ContextMenuCheckboxItem","ContextMenuCheckboxItem"),i8=Re(yo.CheckboxItemIndicator,"ContextMenuCheckboxItemIndicator","ContextMenuCheckboxItemIndicator"),a8=Re(yo.RadioItem,"ContextMenuRadioItem","ContextMenuRadioItem"),c8=Re(yo.RadioItemIndicator,"ContextMenuRadioItemIndicator","ContextMenuRadioItemIndicator"),l8=Re(yo.SubmenuTrigger,"ContextMenuSubmenuTrigger","ContextMenuSubmenuTrigger"),u8=Re(yo.Group,"ContextMenuGroup","ContextMenuGroup"),p8=Re(yo.GroupLabel,"ContextMenuGroupLabel","ContextMenuGroupLabel"),f8=Re(yo.Separator,"ContextMenuSeparator","ContextMenuSeparator"),d8=Re(yo.Arrow,"ContextMenuArrow","ContextMenuArrow"),f0={Root:yo.Root,Trigger:t8,Portal:yo.Portal,Backdrop:yo.Backdrop,Positioner:o8,Popup:r8,Arrow:d8,Item:n8,LinkItem:yo.LinkItem,CheckboxItem:s8,CheckboxItemIndicator:i8,RadioGroup:yo.RadioGroup,RadioItem:a8,RadioItemIndicator:c8,Group:u8,GroupLabel:p8,Separator:f8,SubmenuRoot:yo.SubmenuRoot,SubmenuTrigger:l8};var d0=Re(Ux,"Menubar","MenubarRoot");var m8=Oo(Rr.Trigger,"PopoverTrigger",{partClass:"PopoverTrigger",optIn:!0}),g8=Re(Rr.Backdrop,"PopoverBackdrop","PopoverBackdrop"),x8=Re(Rr.Positioner,"PopoverPositioner","PopoverPositioner"),R8=Re(Rr.Popup,"PopoverPopup","PopoverPopup"),h8=Re(Rr.Title,"PopoverTitle","PopoverTitle"),b8=Re(Rr.Description,"PopoverDescription","PopoverDescription"),C8=Re(Rr.Close,"PopoverClose","PopoverClose"),y8=Re(Rr.Arrow,"PopoverArrow","PopoverArrow"),m0={Root:Rr.Root,Trigger:m8,Portal:Rr.Portal,Backdrop:g8,Positioner:x8,Popup:R8,Title:h8,Description:b8,Close:C8,Arrow:y8,Viewport:Rr.Viewport,Handle:Rr.Handle,createHandle:Rr.createHandle};var v8=Re(Jr.Trigger,"PreviewCardTrigger","PreviewCardTrigger"),E8=Re(Jr.Positioner,"PreviewCardPositioner","PreviewCardPositioner"),S8=Re(Jr.Popup,"PreviewCardPopup","PreviewCardPopup"),P8=Re(Jr.Arrow,"PreviewCardArrow","PreviewCardArrow");function eT({className:e,alt:t="",...o}){return v("img",{className:Ct("PreviewCardImage",e),alt:t,...o})}function tT({className:e,...t}){return v("div",{className:Ct("PreviewCardContent",e),...t})}function oT({className:e,children:t,...o}){return v("h3",{className:Ct("PreviewCardTitle",e),...o,children:t})}function rT({className:e,...t}){return v("p",{className:Ct("PreviewCardDescription",e),...t})}var g0={Root:Jr.Root,Trigger:v8,Portal:Jr.Portal,Positioner:E8,Popup:S8,Arrow:P8,Backdrop:Jr.Backdrop,Viewport:Jr.Viewport,Image:eT,Content:tT,Title:oT,Description:rT,Handle:Jr.Handle,createHandle:Jr.createHandle};var T8=Oo(Zr.Trigger,"TooltipTrigger",{partClass:"TooltipTrigger",optIn:!0}),w8=Re(Zr.Positioner,"TooltipPositioner","TooltipPositioner"),I8=Re(Zr.Popup,"TooltipPopup","TooltipPopup"),M8=Re(Zr.Arrow,"TooltipArrow","TooltipArrow"),x0={Root:Zr.Root,Trigger:T8,Portal:Zr.Portal,Positioner:w8,Popup:I8,Arrow:M8,Provider:Zr.Provider,Viewport:Zr.Viewport,Handle:Zr.Handle,createHandle:Zr.createHandle};var D8=Oo(Do.Trigger,"DrawerTrigger"),N8=Re(Do.Backdrop,"DrawerBackdrop","DrawerBackdrop"),A8=Re(Do.Viewport,"DrawerViewport","DrawerViewport"),O8=Re(Do.Popup,"DrawerPopup","DrawerPopup"),V8=Re(Do.Title,"DrawerTitle","DrawerTitle"),F8=Re(Do.Description,"DrawerDescription","DrawerDescription"),L8=Re(Do.Content,"DrawerContent","DrawerContent"),k8=Oo(Do.Close,"DrawerClose"),R0={Root:Do.Root,Trigger:D8,Portal:Do.Portal,Backdrop:N8,Viewport:A8,Popup:O8,Title:V8,Description:F8,Content:L8,Close:k8,Indent:Do.Indent,IndentBackground:Do.IndentBackground,SwipeArea:Do.SwipeArea,Provider:Do.Provider,VirtualKeyboardProvider:Do.VirtualKeyboardProvider,Handle:Do.Handle,createHandle:Do.createHandle};var _8=Re(Zs.Root,"AccordionRoot","Accordion"),B8=Re(Zs.Item,"AccordionItem","AccordionItem"),H8=Re(Zs.Header,"AccordionHeader","AccordionHeader"),U8=Re(Zs.Trigger,"AccordionTrigger","AccordionTrigger"),G8=Re(Zs.Panel,"AccordionPanel","AccordionPanel");function nT({className:e,...t}){return v("div",{className:Ct("AccordionContent",e),...t})}var h0={Root:_8,Item:B8,Header:H8,Trigger:U8,Panel:G8,Content:nT};var W8=Re(sc.Root,"CollapsibleRoot","Collapsible"),j8=Re(sc.Trigger,"CollapsibleTrigger","CollapsibleTrigger"),Y8=Re(sc.Panel,"CollapsiblePanel","CollapsiblePanel");function sT({className:e,...t}){return v("div",{className:Ct("CollapsibleContent",e),...t})}var b0={Root:W8,Trigger:j8,Panel:Y8,Content:sT};var K8=Re(Ii.Root,"TabsRoot","TabsRoot"),z8=Re(Ii.List,"TabsList","TabsList"),$8=Re(Ii.Tab,"TabsTab","TabsTab"),X8=Re(Ii.Panel,"TabsPanel","TabsPanel"),C0={Root:K8,List:z8,Tab:$8,Panel:X8,Indicator:Ii.Indicator};var q8=Re(tu.Root,"SwitchRoot","SwitchRoot"),J8=Re(tu.Thumb,"SwitchThumb","SwitchThumb");function iT({className:e,...t}){return v("div",{className:Ct("SwitchContainer",e),...t})}function aT({className:e,...t}){return v("label",{className:Ct("SwitchLabel",e),...t})}var y0={Root:q8,Thumb:J8,Container:iT,Label:aT};var Q8=Re(hr.Viewport,"ToastViewport","Viewport"),Z8=Re(hr.Root,"ToastRoot","Toast"),eee=Re(hr.Content,"ToastContent","Content"),tee=Re(hr.Title,"ToastTitle","Title"),oee=Re(hr.Description,"ToastDescription","Description"),ree=Re(hr.Close,"ToastClose","Close"),nee=Oo(hr.Action,"ToastAction"),v0={Provider:hr.Provider,Portal:hr.Portal,Viewport:Q8,Root:Z8,Content:eee,Title:tee,Description:oee,Close:ree,Action:nee,Positioner:hr.Positioner,Arrow:hr.Arrow,useToastManager:hr.useToastManager,createToastManager:hr.createToastManager};var see=Re(rc.Root,"AvatarRoot","AvatarRoot"),iee=Re(rc.Image,"AvatarImage","AvatarImage"),aee=Re(rc.Fallback,"AvatarFallback","AvatarFallback");function cT({className:e,...t}){return v("div",{className:Ct("AvatarGroup",e),...t})}var E0={Root:see,Image:iee,Fallback:aee,Group:cT};var cee=Re(qs.Root,"ToolbarRoot","Toolbar"),lee=Re(qs.Group,"ToolbarGroup","ToolbarGroup"),uee=Re(qs.Separator,"ToolbarSeparator","ToolbarSeparator"),pee=Oo(qs.Button,"ToolbarButton"),fee=Re(qs.Link,"ToolbarLink","ToolbarLink"),dee=Re(qs.Input,"ToolbarInput","ToolbarInput"),S0={Root:cee,Group:lee,Separator:uee,Button:pee,Link:fee,Input:dee};var mee=Re(zs.Root,"ScrollAreaRoot","ScrollAreaRoot"),gee=Re(zs.Viewport,"ScrollAreaViewport","ScrollAreaViewport"),xee=Re(zs.Scrollbar,"ScrollAreaScrollbar","ScrollAreaScrollbar"),Ree=Re(zs.Thumb,"ScrollAreaThumb","ScrollAreaThumb"),hee=Re(zs.Corner,"ScrollAreaCorner","ScrollAreaCorner"),P0={Root:mee,Viewport:gee,Content:zs.Content,Scrollbar:xee,Thumb:Ree,Corner:hee};var T0=Re(wn,"Separator","Separator");var w0=T(M());function bee({name:e,className:t,...o}){return w0.createElement("span",{className:["material-symbols-outlined",t].filter(Boolean).join(" "),...o},e)}var uT={};for(let[e,t]of Object.entries(_P))/^[A-Z]/.test(e)&&(uT[e]=t);window.Loomiere={...uT,...lT,MaterialSymbol:bee,Base:uT};})();
|