@scattered-light/loomiere-base-ui 0.20.0 → 0.20.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.
Files changed (70) hide show
  1. package/dist/design-system/components/SplitButton/README.md +0 -1
  2. package/dist/design-system/components/bundle.js +1 -1
  3. package/dist/design-system/components/styles.css +68 -66
  4. package/dist/styles/components/Accordion.css +1 -1
  5. package/dist/styles/components/AlertDialog.css +1 -1
  6. package/dist/styles/components/Autocomplete.css +1 -1
  7. package/dist/styles/components/Avatar.css +1 -1
  8. package/dist/styles/components/Button.css +1 -1
  9. package/dist/styles/components/Checkbox.css +1 -1
  10. package/dist/styles/components/CheckboxGroup.css +1 -1
  11. package/dist/styles/components/Collapsible.css +1 -1
  12. package/dist/styles/components/Combobox.css +1 -1
  13. package/dist/styles/components/ContextMenu.css +1 -1
  14. package/dist/styles/components/Dialog.css +1 -1
  15. package/dist/styles/components/Drawer.css +1 -1
  16. package/dist/styles/components/Field.css +1 -1
  17. package/dist/styles/components/Fieldset.css +1 -1
  18. package/dist/styles/components/Form.css +1 -1
  19. package/dist/styles/components/Input.css +1 -1
  20. package/dist/styles/components/Menu.css +1 -1
  21. package/dist/styles/components/Menubar.css +1 -1
  22. package/dist/styles/components/Meter.css +1 -1
  23. package/dist/styles/components/NavigationMenu.css +1 -1
  24. package/dist/styles/components/NumberField.css +1 -1
  25. package/dist/styles/components/OTPField.css +1 -1
  26. package/dist/styles/components/Popover.css +1 -1
  27. package/dist/styles/components/PreviewCard.css +1 -1
  28. package/dist/styles/components/Progress.css +1 -1
  29. package/dist/styles/components/Radio.css +1 -1
  30. package/dist/styles/components/ScrollArea.css +1 -1
  31. package/dist/styles/components/Select.css +1 -1
  32. package/dist/styles/components/Separator.css +1 -1
  33. package/dist/styles/components/Slider.css +1 -1
  34. package/dist/styles/components/Switch.css +1 -1
  35. package/dist/styles/components/Tabs.css +1 -1
  36. package/dist/styles/components/Toast.css +1 -1
  37. package/dist/styles/components/Toggle.css +1 -1
  38. package/dist/styles/components/ToggleGroup.css +1 -1
  39. package/dist/styles/components/Toolbar.css +1 -1
  40. package/dist/styles/components/Tooltip.css +1 -1
  41. package/dist/styles/custom/AppBar.css +1 -1
  42. package/dist/styles/custom/Badge.css +1 -1
  43. package/dist/styles/custom/Collection.css +1 -1
  44. package/dist/styles/custom/CollectionCards.css +1 -1
  45. package/dist/styles/custom/CollectionPagination.css +1 -1
  46. package/dist/styles/custom/CollectionToolbar.css +1 -1
  47. package/dist/styles/custom/DataList.css +1 -1
  48. package/dist/styles/custom/DataTable.css +1 -1
  49. package/dist/styles/custom/DatePicker.css +1 -1
  50. package/dist/styles/custom/DescriptionList.css +1 -1
  51. package/dist/styles/custom/EditableList.css +1 -1
  52. package/dist/styles/custom/EmptyState.css +1 -1
  53. package/dist/styles/custom/ListDetail.css +1 -1
  54. package/dist/styles/custom/MoneyField.css +1 -1
  55. package/dist/styles/custom/PickerButton.css +1 -1
  56. package/dist/styles/custom/PickerSplit.css +1 -1
  57. package/dist/styles/custom/Sheet.css +1 -1
  58. package/dist/styles/custom/SideNav.css +1 -1
  59. package/dist/styles/custom/SplitButton.css +5 -3
  60. package/dist/styles/custom/Splitter.css +1 -1
  61. package/dist/styles/custom/StatCard.css +1 -1
  62. package/dist/styles/custom/StatFigure.css +1 -1
  63. package/dist/styles/custom/Table.css +1 -1
  64. package/dist/styles/index.css +1 -1
  65. package/dist/styles/reset/accessibility.css +1 -1
  66. package/dist/styles/reset/reset-accessibility.css +1 -1
  67. package/dist/styles/reset/reset-tailwind.css +1 -1
  68. package/dist/styles/reset/reset.css +1 -1
  69. package/dist/styles/tailwind.css +1 -1
  70. package/package.json +2 -2
@@ -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":"Tabs"},{"name":"Toast"},{"name":"Toggle"},{"name":"ToggleGroup"},{"name":"Toolbar"},{"name":"Tooltip"},{"name":"AppBar"},{"name":"Badge"},{"name":"Collection"},{"name":"CollectionCards"},{"name":"CollectionPagination"},{"name":"CollectionToolbar"},{"name":"DataList"},{"name":"DataTable"},{"name":"DatePicker"},{"name":"DescriptionList"},{"name":"EditableList"},{"name":"EmptyState"},{"name":"ListDetail"},{"name":"MoneyField"},{"name":"PickerButton"},{"name":"PickerSplit"},{"name":"Sheet"},{"name":"SideNav"},{"name":"SplitButton"},{"name":"Splitter"},{"name":"StatCard"},{"name":"StatFigure"},{"name":"Table"}]} */
2
- /* @scattered-light/loomiere-base-ui 0.20.0 with @base-ui/react 1.9.0. window.Loomiere: Accordion, AccordionHeaderDataAttributes, AccordionItemDataAttributes, AccordionPanelCssVariables, AccordionPanelDataAttributes, AccordionRootDataAttributes, AccordionTriggerDataAttributes, AlertDialog, AlertDialogBackdropDataAttributes, AlertDialogCloseDataAttributes, AlertDialogPopupCssVariables, AlertDialogPopupDataAttributes, AlertDialogTriggerDataAttributes, AlertDialogViewportDataAttributes, AppBar, Autocomplete, AutocompleteArrowDataAttributes, AutocompleteBackdropDataAttributes, AutocompleteClearDataAttributes, AutocompleteInputDataAttributes, AutocompleteInputGroupDataAttributes, AutocompleteItemDataAttributes, AutocompletePopupDataAttributes, AutocompletePositionerCssVariables, AutocompletePositionerDataAttributes, AutocompleteSeparatorDataAttributes, AutocompleteTriggerDataAttributes, Avatar, AvatarImageDataAttributes, Badge, Button, ButtonDataAttributes, CSPProvider, Checkbox, CheckboxGroup, CheckboxGroupDataAttributes, CheckboxIndicatorDataAttributes, CheckboxRootDataAttributes, Collapsible, CollapsiblePanelCssVariables, CollapsiblePanelDataAttributes, CollapsibleRootDataAttributes, CollapsibleTriggerDataAttributes, CollectionCards, CollectionPagination, CollectionToolbar, 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, DataList, DataTable, DatePicker, DescriptionList, Dialog, DialogBackdropDataAttributes, DialogCloseDataAttributes, DialogPopupCssVariables, DialogPopupDataAttributes, DialogTriggerDataAttributes, DialogViewportDataAttributes, DirectionProvider, Drawer, DrawerBackdropCssVariables, DrawerBackdropDataAttributes, DrawerCloseDataAttributes, DrawerPopupCssVariables, DrawerPopupDataAttributes, DrawerSwipeAreaDataAttributes, DrawerTriggerDataAttributes, DrawerViewportCssVariables, DrawerViewportDataAttributes, EditableList, EmptyState, Field, FieldControlDataAttributes, FieldDescriptionDataAttributes, FieldErrorDataAttributes, FieldItemDataAttributes, FieldLabelDataAttributes, FieldRootDataAttributes, Fieldset, FieldsetLegendDataAttributes, Form, Input, InputDataAttributes, ListDetail, MaterialSymbol, Menu, MenuArrowDataAttributes, MenuBackdropDataAttributes, MenuCheckboxItemDataAttributes, MenuCheckboxItemIndicatorDataAttributes, MenuClearDataAttributes, MenuInputDataAttributes, MenuItemDataAttributes, MenuLinkItemDataAttributes, MenuPopupDataAttributes, MenuPositionerCssVariables, MenuPositionerDataAttributes, MenuRadioItemDataAttributes, MenuRadioItemIndicatorDataAttributes, MenuSeparatorDataAttributes, MenuSubmenuTriggerDataAttributes, MenuTriggerDataAttributes, MenuViewportCssVariables, MenuViewportDataAttributes, Menubar, MenubarDataAttributes, Meter, MoneyField, NavigationMenu, NavigationMenuArrowDataAttributes, NavigationMenuBackdropDataAttributes, NavigationMenuContentDataAttributes, NavigationMenuIconDataAttributes, NavigationMenuLinkDataAttributes, NavigationMenuPopupCssVariables, NavigationMenuPopupDataAttributes, NavigationMenuPositionerCssVariables, NavigationMenuPositionerDataAttributes, NavigationMenuTriggerDataAttributes, NumberField, NumberFieldDecrementDataAttributes, NumberFieldGroupDataAttributes, NumberFieldIncrementDataAttributes, NumberFieldInputDataAttributes, NumberFieldRootDataAttributes, NumberFieldScrubAreaCursorDataAttributes, NumberFieldScrubAreaDataAttributes, OTPField, OTPFieldInputDataAttributes, OTPFieldRootDataAttributes, OTPFieldSeparatorDataAttributes, PickerButton, PickerSplit, 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, Sheet, SideNav, Slider, SliderControlDataAttributes, SliderIndicatorDataAttributes, SliderRootDataAttributes, SliderThumbDataAttributes, SliderTrackDataAttributes, SliderValueDataAttributes, SplitButton, Splitter, StatCard, StatFigure, 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. */
2
+ /* @scattered-light/loomiere-base-ui 0.20.1 with @base-ui/react 1.9.0. window.Loomiere: Accordion, AccordionHeaderDataAttributes, AccordionItemDataAttributes, AccordionPanelCssVariables, AccordionPanelDataAttributes, AccordionRootDataAttributes, AccordionTriggerDataAttributes, AlertDialog, AlertDialogBackdropDataAttributes, AlertDialogCloseDataAttributes, AlertDialogPopupCssVariables, AlertDialogPopupDataAttributes, AlertDialogTriggerDataAttributes, AlertDialogViewportDataAttributes, AppBar, Autocomplete, AutocompleteArrowDataAttributes, AutocompleteBackdropDataAttributes, AutocompleteClearDataAttributes, AutocompleteInputDataAttributes, AutocompleteInputGroupDataAttributes, AutocompleteItemDataAttributes, AutocompletePopupDataAttributes, AutocompletePositionerCssVariables, AutocompletePositionerDataAttributes, AutocompleteSeparatorDataAttributes, AutocompleteTriggerDataAttributes, Avatar, AvatarImageDataAttributes, Badge, Button, ButtonDataAttributes, CSPProvider, Checkbox, CheckboxGroup, CheckboxGroupDataAttributes, CheckboxIndicatorDataAttributes, CheckboxRootDataAttributes, Collapsible, CollapsiblePanelCssVariables, CollapsiblePanelDataAttributes, CollapsibleRootDataAttributes, CollapsibleTriggerDataAttributes, CollectionCards, CollectionPagination, CollectionToolbar, 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, DataList, DataTable, DatePicker, DescriptionList, Dialog, DialogBackdropDataAttributes, DialogCloseDataAttributes, DialogPopupCssVariables, DialogPopupDataAttributes, DialogTriggerDataAttributes, DialogViewportDataAttributes, DirectionProvider, Drawer, DrawerBackdropCssVariables, DrawerBackdropDataAttributes, DrawerCloseDataAttributes, DrawerPopupCssVariables, DrawerPopupDataAttributes, DrawerSwipeAreaDataAttributes, DrawerTriggerDataAttributes, DrawerViewportCssVariables, DrawerViewportDataAttributes, EditableList, EmptyState, Field, FieldControlDataAttributes, FieldDescriptionDataAttributes, FieldErrorDataAttributes, FieldItemDataAttributes, FieldLabelDataAttributes, FieldRootDataAttributes, Fieldset, FieldsetLegendDataAttributes, Form, Input, InputDataAttributes, ListDetail, MaterialSymbol, Menu, MenuArrowDataAttributes, MenuBackdropDataAttributes, MenuCheckboxItemDataAttributes, MenuCheckboxItemIndicatorDataAttributes, MenuClearDataAttributes, MenuInputDataAttributes, MenuItemDataAttributes, MenuLinkItemDataAttributes, MenuPopupDataAttributes, MenuPositionerCssVariables, MenuPositionerDataAttributes, MenuRadioItemDataAttributes, MenuRadioItemIndicatorDataAttributes, MenuSeparatorDataAttributes, MenuSubmenuTriggerDataAttributes, MenuTriggerDataAttributes, MenuViewportCssVariables, MenuViewportDataAttributes, Menubar, MenubarDataAttributes, Meter, MoneyField, NavigationMenu, NavigationMenuArrowDataAttributes, NavigationMenuBackdropDataAttributes, NavigationMenuContentDataAttributes, NavigationMenuIconDataAttributes, NavigationMenuLinkDataAttributes, NavigationMenuPopupCssVariables, NavigationMenuPopupDataAttributes, NavigationMenuPositionerCssVariables, NavigationMenuPositionerDataAttributes, NavigationMenuTriggerDataAttributes, NumberField, NumberFieldDecrementDataAttributes, NumberFieldGroupDataAttributes, NumberFieldIncrementDataAttributes, NumberFieldInputDataAttributes, NumberFieldRootDataAttributes, NumberFieldScrubAreaCursorDataAttributes, NumberFieldScrubAreaDataAttributes, OTPField, OTPFieldInputDataAttributes, OTPFieldRootDataAttributes, OTPFieldSeparatorDataAttributes, PickerButton, PickerSplit, 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, Sheet, SideNav, Slider, SliderControlDataAttributes, SliderIndicatorDataAttributes, SliderRootDataAttributes, SliderThumbDataAttributes, SliderTrackDataAttributes, SliderValueDataAttributes, SplitButton, Splitter, StatCard, StatFigure, 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 MY=Object.create;var Hm=Object.defineProperty;var DY=Object.getOwnPropertyDescriptor;var NY=Object.getOwnPropertyNames;var AY=Object.getPrototypeOf,OY=Object.prototype.hasOwnProperty;var FY=(e,t,o)=>t in e?Hm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var eu=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),me=(e,t)=>{for(var o in t)Hm(e,o,{get:t[o],enumerable:!0})},_Y=(e,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of NY(t))!OY.call(e,r)&&r!==o&&Hm(e,r,{get:()=>t[r],enumerable:!(n=DY(t,r))||n.enumerable});return e};var T=(e,t,o)=>(o=e!=null?MY(AY(e)):{},_Y(t||!e||!e.__esModule?Hm(o,"default",{value:e,enumerable:!0}):o,e));var it=(e,t,o)=>FY(e,typeof t!="symbol"?t+"":t,o);var D=eu((ofe,HA)=>{HA.exports=window.React});var on=eu((Dge,bO)=>{bO.exports=window.ReactDOM});var gF=eu(mF=>{"use strict";var du=D();function fX(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var mX=typeof Object.is=="function"?Object.is:fX,gX=du.useState,bX=du.useEffect,RX=du.useLayoutEffect,hX=du.useDebugValue;function xX(e,t){var o=t(),n=gX({inst:{value:o,getSnapshot:t}}),r=n[0].inst,s=n[1];return RX(function(){r.value=o,r.getSnapshot=t,Gv(r)&&s({inst:r})},[e,o,t]),bX(function(){return Gv(r)&&s({inst:r}),e(function(){Gv(r)&&s({inst:r})})},[e]),hX(o),o}function Gv(e){var t=e.getSnapshot;e=e.value;try{var o=t();return!mX(e,o)}catch{return!0}}function CX(e,t){return t()}var yX=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?CX:xX;mF.useSyncExternalStore=du.useSyncExternalStore!==void 0?du.useSyncExternalStore:yX});var Nd=eu((Fxe,bF)=>{"use strict";bF.exports=gF()});var hF=eu(RF=>{"use strict";var Gg=D(),SX=Nd();function vX(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var wX=typeof Object.is=="function"?Object.is:vX,PX=SX.useSyncExternalStore,EX=Gg.useRef,TX=Gg.useEffect,IX=Gg.useMemo,MX=Gg.useDebugValue;RF.useSyncExternalStoreWithSelector=function(e,t,o,n,r){var s=EX(null);if(s.current===null){var i={hasValue:!1,value:null};s.current=i}else i=s.current;s=IX(function(){function l(m){if(!c){if(c=!0,u=m,m=n(m),r!==void 0&&i.hasValue){var g=i.value;if(r(g,m))return p=g}return p=m}if(g=p,wX(u,m))return g;var R=n(m);return r!==void 0&&r(g,R)?(u=m,g):(u=m,p=R)}var c=!1,u,p,d=o===void 0?null:o;return[function(){return l(t())},d===null?void 0:function(){return l(d())}]},[t,o,n,r]);var a=PX(e,s[0],s[1]);return TX(function(){i.hasValue=!0,i.value=a},[a]),MX(a),a}});var Uv=eu((Vxe,xF)=>{"use strict";xF.exports=hF()});var VM={};me(VM,{Accordion:()=>Xi,AccordionHeaderDataAttributes:()=>iv,AccordionItemDataAttributes:()=>sg,AccordionPanelCssVariables:()=>bg,AccordionPanelDataAttributes:()=>lv,AccordionRootDataAttributes:()=>sv,AccordionTriggerDataAttributes:()=>av,AlertDialog:()=>pr,AlertDialogBackdropDataAttributes:()=>lb,AlertDialogCloseDataAttributes:()=>Wd,AlertDialogPopupCssVariables:()=>kd,AlertDialogPopupDataAttributes:()=>Ld,AlertDialogTriggerDataAttributes:()=>mw,AlertDialogViewportDataAttributes:()=>jd,Autocomplete:()=>co,AutocompleteArrowDataAttributes:()=>dR,AutocompleteBackdropDataAttributes:()=>lR,AutocompleteClearDataAttributes:()=>jw,AutocompleteInputDataAttributes:()=>Xd,AutocompleteInputGroupDataAttributes:()=>Uw,AutocompleteItemDataAttributes:()=>Kw,AutocompletePopupDataAttributes:()=>pR,AutocompletePositionerCssVariables:()=>cR,AutocompletePositionerDataAttributes:()=>uR,AutocompleteSeparatorDataAttributes:()=>ra,AutocompleteTriggerDataAttributes:()=>Gw,Avatar:()=>mc,AvatarImageDataAttributes:()=>qw,Button:()=>bR,ButtonDataAttributes:()=>Xw,CSPProvider:()=>qP,Checkbox:()=>Ku,CheckboxGroup:()=>vR,CheckboxGroupDataAttributes:()=>sP,CheckboxIndicatorDataAttributes:()=>oP,CheckboxRootDataAttributes:()=>RR,Collapsible:()=>bc,CollapsiblePanelCssVariables:()=>PR,CollapsiblePanelDataAttributes:()=>ud,CollapsibleRootDataAttributes:()=>cP,CollapsibleTriggerDataAttributes:()=>og,Combobox:()=>Yt,ComboboxArrowDataAttributes:()=>dR,ComboboxBackdropDataAttributes:()=>lR,ComboboxClearDataAttributes:()=>Ww,ComboboxInputDataAttributes:()=>Xd,ComboboxInputGroupDataAttributes:()=>mP,ComboboxItemDataAttributes:()=>fR,ComboboxItemIndicatorDataAttributes:()=>bP,ComboboxPopupDataAttributes:()=>pR,ComboboxPositionerCssVariables:()=>cR,ComboboxPositionerDataAttributes:()=>uR,ComboboxSeparatorDataAttributes:()=>ra,ComboboxTriggerDataAttributes:()=>gP,ContextMenu:()=>Lo,ContextMenuArrowDataAttributes:()=>Oh,ContextMenuBackdropDataAttributes:()=>Fh,ContextMenuCheckboxItemDataAttributes:()=>rf,ContextMenuCheckboxItemIndicatorDataAttributes:()=>_h,ContextMenuItemDataAttributes:()=>Vh,ContextMenuLinkItemDataAttributes:()=>kh,ContextMenuPopupDataAttributes:()=>Lh,ContextMenuPositionerCssVariables:()=>Bh,ContextMenuPositionerDataAttributes:()=>Hh,ContextMenuRadioItemDataAttributes:()=>Gh,ContextMenuRadioItemIndicatorDataAttributes:()=>Uh,ContextMenuSeparatorDataAttributes:()=>ra,ContextMenuSubmenuTriggerDataAttributes:()=>Wh,ContextMenuTriggerDataAttributes:()=>KP,Dialog:()=>dr,DialogBackdropDataAttributes:()=>lb,DialogCloseDataAttributes:()=>Wd,DialogPopupCssVariables:()=>kd,DialogPopupDataAttributes:()=>Ld,DialogTriggerDataAttributes:()=>zh,DialogViewportDataAttributes:()=>jd,DirectionProvider:()=>_P,Drawer:()=>Xo,DrawerBackdropCssVariables:()=>yl,DrawerBackdropDataAttributes:()=>bE,DrawerCloseDataAttributes:()=>Wd,DrawerPopupCssVariables:()=>Cl,DrawerPopupDataAttributes:()=>ap,DrawerSwipeAreaDataAttributes:()=>rx,DrawerTriggerDataAttributes:()=>zh,DrawerViewportCssVariables:()=>ax,DrawerViewportDataAttributes:()=>RE,Field:()=>Wr,FieldControlDataAttributes:()=>bb,FieldDescriptionDataAttributes:()=>SE,FieldErrorDataAttributes:()=>yE,FieldItemDataAttributes:()=>vE,FieldLabelDataAttributes:()=>CE,FieldRootDataAttributes:()=>xE,Fieldset:()=>up,FieldsetLegendDataAttributes:()=>wE,Form:()=>bx,Input:()=>Rx,InputDataAttributes:()=>PE,Menu:()=>$t,MenuArrowDataAttributes:()=>Oh,MenuBackdropDataAttributes:()=>Fh,MenuCheckboxItemDataAttributes:()=>rf,MenuCheckboxItemIndicatorDataAttributes:()=>_h,MenuClearDataAttributes:()=>$P,MenuInputDataAttributes:()=>zP,MenuItemDataAttributes:()=>Vh,MenuLinkItemDataAttributes:()=>kh,MenuPopupDataAttributes:()=>Lh,MenuPositionerCssVariables:()=>Bh,MenuPositionerDataAttributes:()=>Hh,MenuRadioItemDataAttributes:()=>Gh,MenuRadioItemIndicatorDataAttributes:()=>Uh,MenuSeparatorDataAttributes:()=>ra,MenuSubmenuTriggerDataAttributes:()=>Wh,MenuTriggerDataAttributes:()=>UP,MenuViewportCssVariables:()=>WP,MenuViewportDataAttributes:()=>jP,Menubar:()=>xx,MenubarDataAttributes:()=>hx,Meter:()=>pa,NavigationMenu:()=>Un,NavigationMenuArrowDataAttributes:()=>LE,NavigationMenuBackdropDataAttributes:()=>VE,NavigationMenuContentDataAttributes:()=>Tx,NavigationMenuIconDataAttributes:()=>HE,NavigationMenuLinkDataAttributes:()=>BE,NavigationMenuPopupCssVariables:()=>Ef,NavigationMenuPopupDataAttributes:()=>kE,NavigationMenuPositionerCssVariables:()=>fp,NavigationMenuPositionerDataAttributes:()=>_E,NavigationMenuTriggerDataAttributes:()=>FE,NumberField:()=>Ls,NumberFieldDecrementDataAttributes:()=>QE,NumberFieldGroupDataAttributes:()=>JE,NumberFieldIncrementDataAttributes:()=>ZE,NumberFieldInputDataAttributes:()=>eT,NumberFieldRootDataAttributes:()=>XE,NumberFieldScrubAreaCursorDataAttributes:()=>oT,NumberFieldScrubAreaDataAttributes:()=>tT,OTPField:()=>Ic,OTPFieldInputDataAttributes:()=>iT,OTPFieldRootDataAttributes:()=>sT,OTPFieldSeparatorDataAttributes:()=>ra,Popover:()=>Wn,PopoverArrowDataAttributes:()=>bT,PopoverBackdropDataAttributes:()=>RT,PopoverPopupCssVariables:()=>mT,PopoverPopupDataAttributes:()=>gT,PopoverPositionerCssVariables:()=>dT,PopoverPositionerDataAttributes:()=>fT,PopoverTriggerDataAttributes:()=>pT,PopoverViewportCssVariables:()=>hT,PopoverViewportDataAttributes:()=>xT,PreviewCard:()=>Er,PreviewCardArrowDataAttributes:()=>TT,PreviewCardBackdropDataAttributes:()=>IT,PreviewCardPopupDataAttributes:()=>ET,PreviewCardPositionerCssVariables:()=>wT,PreviewCardPositionerDataAttributes:()=>PT,PreviewCardTriggerDataAttributes:()=>vT,PreviewCardViewportCssVariables:()=>MT,PreviewCardViewportDataAttributes:()=>DT,Progress:()=>Ca,ProgressIndicatorDataAttributes:()=>VT,ProgressLabelDataAttributes:()=>LT,ProgressRootDataAttributes:()=>Jx,ProgressTrackDataAttributes:()=>_T,ProgressValueDataAttributes:()=>kT,Radio:()=>Cp,RadioGroup:()=>oC,RadioGroupDataAttributes:()=>jT,RadioIndicatorDataAttributes:()=>WT,RadioRootDataAttributes:()=>Zx,ScrollArea:()=>Ni,ScrollAreaContentDataAttributes:()=>iI,ScrollAreaRootCssVariables:()=>Hf,ScrollAreaRootDataAttributes:()=>sC,ScrollAreaScrollbarCssVariables:()=>Wf,ScrollAreaScrollbarDataAttributes:()=>iC,ScrollAreaThumbDataAttributes:()=>aI,ScrollAreaViewportCssVariables:()=>lC,ScrollAreaViewportDataAttributes:()=>sI,Select:()=>Bo,SelectArrowDataAttributes:()=>yI,SelectBackdropDataAttributes:()=>bI,SelectIconDataAttributes:()=>gI,SelectItemDataAttributes:()=>xI,SelectItemIndicatorDataAttributes:()=>CI,SelectPopupDataAttributes:()=>hI,SelectPositionerCssVariables:()=>RC,SelectPositionerDataAttributes:()=>RI,SelectScrollDownArrowDataAttributes:()=>SI,SelectScrollUpArrowDataAttributes:()=>vI,SelectSeparatorDataAttributes:()=>ra,SelectTriggerDataAttributes:()=>fC,SelectValueDataAttributes:()=>mI,Separator:()=>rs,SeparatorDataAttributes:()=>ra,Slider:()=>Us,SliderControlDataAttributes:()=>MI,SliderIndicatorDataAttributes:()=>NI,SliderRootDataAttributes:()=>TI,SliderThumbDataAttributes:()=>OC,SliderTrackDataAttributes:()=>DI,SliderValueDataAttributes:()=>II,Switch:()=>Dp,SwitchRootDataAttributes:()=>_C,SwitchThumbDataAttributes:()=>_I,Tabs:()=>Pa,TabsIndicatorCssVariables:()=>GC,TabsIndicatorDataAttributes:()=>YI,TabsListDataAttributes:()=>qI,TabsPanelDataAttributes:()=>UC,TabsRootDataAttributes:()=>LC,TabsTabDataAttributes:()=>KI,Toast:()=>jn,ToastActionDataAttributes:()=>dM,ToastArrowDataAttributes:()=>gM,ToastCloseDataAttributes:()=>pM,ToastContentDataAttributes:()=>lM,ToastDescriptionDataAttributes:()=>cM,ToastPositionerCssVariables:()=>fM,ToastPositionerDataAttributes:()=>mM,ToastRootCssVariables:()=>Kf,ToastRootDataAttributes:()=>XC,ToastTitleDataAttributes:()=>uM,ToastViewportCssVariables:()=>YC,ToastViewportDataAttributes:()=>aM,Toggle:()=>sy,ToggleDataAttributes:()=>RM,ToggleGroup:()=>ly,ToggleGroupDataAttributes:()=>xM,Toolbar:()=>Fi,ToolbarButtonDataAttributes:()=>vM,ToolbarGroupDataAttributes:()=>SM,ToolbarInputDataAttributes:()=>PM,ToolbarLinkDataAttributes:()=>wM,ToolbarRootDataAttributes:()=>yM,ToolbarSeparatorDataAttributes:()=>CM,Tooltip:()=>Ir,TooltipArrowDataAttributes:()=>OM,TooltipPopupDataAttributes:()=>AM,TooltipPositionerCssVariables:()=>DM,TooltipPositionerDataAttributes:()=>NM,TooltipTriggerDataAttributes:()=>Rd,TooltipViewportCssVariables:()=>FM,TooltipViewportDataAttributes:()=>_M,makeEventPreventable:()=>ou,mergeClassNames:()=>Km,mergeProps:()=>Mt,mergePropsN:()=>WS,useDirection:()=>kt,useRender:()=>hae});var Xi={};me(Xi,{Header:()=>cO,Item:()=>aO,Panel:()=>xO,Root:()=>nO,Trigger:()=>gO});var Oa=T(D(),1);var jl=T(D(),1);function _t({controlled:e,default:t,name:o,state:n="value"}){let{current:r}=jl.useRef(e!==void 0),[s,i]=jl.useState(()=>t),a=r&&e!==void 0?e:s,l=jl.useCallback(c=>{r||i(c)},[]);return[a,l]}var VY=T(D(),1),sd={...VY};var UA=T(D(),1),GA={};function gt(e,t){let o=UA.useRef(GA);return o.current===GA&&(o.current=e(t)),o}var BS=sd.useInsertionEffect,kY=BS&&BS!==sd.useLayoutEffect?BS:e=>e();function q(e){let t=gt(LY).current;return t.next=e,kY(t.effect),t.trampoline}function LY(){let e={next:void 0,callback:BY,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function BY(){}function nt(){}var Et=Object.freeze([]),ot=Object.freeze({});var qi=T(D(),1);var WA=T(D(),1),HY=()=>{},J=typeof document<"u"?WA.useLayoutEffect:HY;var Gm=T(D(),1),HS=Gm.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function Um(){return Gm.useContext(HS)}var Wm=window.React;function f(e,t,o){let{children:n,...r}=t||{};return o!==void 0&&(r.key=o),n===void 0?Wm.createElement(e,r):Array.isArray(n)?Wm.createElement(e,r,...n):Wm.createElement(e,r,n)}var $n=Wm.Fragment;function Cn(e){let{children:t,elementsRef:o,labelsRef:n,onMapChange:r}=e,s=q(r),[,i]=qi.useState(0),a=gt(UY).current,l=gt(GY).current,c=qi.useRef(0),u=qi.useRef(!0),p=qi.useRef(null),d=qi.useRef(null),m=q(()=>{u.current||(u.current=!0,i(S=>S+1))}),g=q((S,w)=>{l.set(S,w),m()}),R=q(S=>{l.delete(S),m()}),b=q(S=>{let w=new Map;return o.current.length=0,n&&(n.current.length=0),S.forEach(v=>{w.set(v.element,{...v.registration.metadata??{},index:v.index}),o.current[v.index]=v.element,n&&(n.current[v.index]=v.registration.label!==void 0?v.registration.label:v.registration.textRef?.current?.textContent??v.element.textContent)}),c.current=o.current.length,w});function x(S){if(d.current?.disconnect(),d.current=null,typeof MutationObserver!="function"||S.length<2)return;let w=new MutationObserver(P=>{if(!zY(P))return;let N=null;for(let E of S)if(E.isConnected){if(N&&jA(N,E)>0){w.disconnect(),m();return}N=E}});d.current=w;let v=new Set;for(let P=1;P<S.length;P+=1){let N=jY(S[P-1],S[P]);N&&v.add(N)}v.forEach(P=>w.observe(P,{childList:!0}))}let h=q(()=>{let[S,w]=WY(l),v=b(S),P=p.current,N=!P||P.length!==S.length||S.some((E,M)=>{let W=P[M];return E.index!==W.index||E.element!==W.element||E.registration.index!==W.registration.index||E.registration.metadata!==W.registration.metadata});x(w),p.current=S,u.current=!1,N&&(a.forEach(E=>E(v)),s(v))});J(()=>(!u.current&&p.current&&b(p.current),()=>{o.current=[],n&&(n.current=[])}),[o,n,b]),J(()=>{u.current&&h()}),J(()=>()=>{d.current?.disconnect(),u.current=!0},[]);let C=q(S=>(a.add(S),()=>{a.delete(S)})),y=qi.useMemo(()=>({register:g,unregister:R,subscribeMapChange:C,nextIndexRef:c}),[g,R,C,c]);return f(HS.Provider,{value:y,children:t})}function GY(){return new Map}function UY(){return new Set}function WY(e){let t=new Set,o=[],n=[];e.forEach((s,i)=>{if(!i.isConnected)return;let a=s.index,l={index:a??-1,element:i,registration:s};a===null?n.push(l):a>=0&&(t.add(a),o.push(l))});let r=0;return n.sort((s,i)=>jA(s.element,i.element)),n.forEach(s=>{for(;t.has(r);)r+=1;s.index=r,o.push(s),r+=1}),t.size>0&&o.sort((s,i)=>s.index-i.index),[o,n.map(s=>s.element)]}function jY(e,t){let o=e.parentElement;for(;o&&!o.contains(t);)o=o.parentElement;return o}function zY(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 jA(e,t){return e.nextElementSibling===t?-1:t.nextElementSibling===e?1:e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}function $Y(e,t){return function(n,...r){let s=new URL(e);return s.searchParams.set("code",n.toString()),r.forEach(i=>s.searchParams.append("args[]",i)),`${t} error #${n}; visit ${s} for the full message.`}}var KY=$Y("https://base-ui.com/production-error","Base UI"),_e=KY;var jm=T(D(),1),GS=jm.createContext(void 0);function zm(){let e=jm.useContext(GS);if(e===void 0)throw new Error(_e(10));return e}var Aa=T(D(),1);function Wt(e,t,o,n){let r=gt($A).current;return YY(r,e,t,o,n)&&KA(r,[e,t,o,n]),r.callback}function zA(e){let t=gt($A).current;return qY(t,e)&&KA(t,e),t.callback}function $A(){return{callback:null,cleanup:null,refs:[]}}function YY(e,t,o,n,r){return e.refs[0]!==t||e.refs[1]!==o||e.refs[2]!==n||e.refs[3]!==r}function qY(e,t){return e.refs.length!==t.length||e.refs.some((o,n)=>o!==t[n])}function KA(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 n=Array(t.length).fill(null);for(let r=0;r<t.length;r+=1){let s=t[r];if(s!=null)switch(typeof s){case"function":{let i=s(o);typeof i=="function"&&(n[r]=i);break}case"object":{s.current=o;break}default:}}e.cleanup=()=>{for(let r=0;r<t.length;r+=1){let s=t[r];if(s!=null)switch(typeof s){case"function":{let i=n[r];typeof i=="function"?i():s(null);break}case"object":{s.current=null;break}default:}}}}}}var qA=T(D(),1);var YA=T(D(),1),XY=parseInt(YA.version,10);function Na(e){return XY>=e}function US(e){if(!qA.isValidElement(e))return null;let t=e,o=t.props;return(Na(19)?o?.ref:t.ref)??null}function id(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function XA(e,t){let o={};for(let n in e){let r=e[n];if(t?.hasOwnProperty(n)){let s=t[n](r);s!=null&&Object.assign(o,s);continue}r===!0?o[`data-${n.toLowerCase()}`]="":r&&(o[`data-${n.toLowerCase()}`]=r.toString())}return o}function JA(e,t){return typeof e=="function"?e(t):e}function tu(e,t){return typeof e=="function"?e(t):e}var ZA={};function Mt(e,t,o,n,r){if(!o&&!n&&!r&&!e)return $m(t);let s=$m(e);return t&&(s=ad(s,t)),o&&(s=ad(s,o)),n&&(s=ad(s,n)),r&&(s=ad(s,r)),s}function WS(e){if(e.length===0)return ZA;if(e.length===1)return $m(e[0]);let t=$m(e[0]);for(let o=1;o<e.length;o+=1)t=ad(t,e[o]);return t}function $m(e){return eO(e)?{...e(ZA)}:JY(e)}function ad(e,t){return eO(t)?t(e):ZY(e,t)}function JY(e){let t={...e};for(let o in t){let n=t[o];QA(o,n)&&(t[o]=tO(n))}return t}function ZY(e,t){if(!t)return e;for(let o in t){let n=t[o];switch(o){case"style":{e[o]=id(e.style,n);break}case"className":{e[o]=Km(e.className,n);break}default:QA(o,n)?e[o]=QY(e[o],n):e[o]=n}}return e}function QA(e,t){let o=e.charCodeAt(0),n=e.charCodeAt(1),r=e.charCodeAt(2);return o===111&&n===110&&r>=65&&r<=90&&(typeof t=="function"||typeof t>"u")}function eO(e){return typeof e=="function"}function QY(e,t){return t?e?(...o)=>{let n=o[0];if(oO(n)){let s=n;ou(s);let i=t(...o);return s.baseUIHandlerPrevented||e?.(...o),i}let r=t(...o);return e?.(...o),r}:tO(t):e}function tO(e){return e&&((...t)=>{let o=t[0];return oO(o)&&ou(o),e(...t)})}function ou(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Km(e,t){return t?e?t+" "+e:t:e}function oO(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}var jS=T(D(),1);function j(e,t,o={}){let n=t.render;o.enabled!==!1&&(n=zl(n));let r=eq(t,o,n);if(o.enabled===!1)return null;let s=o.state??ot;return nq(e,n,r,s)}function eq(e,t,o){let{className:n,style:r}=e,{state:s=ot,ref:i,props:a,stateAttributesMapping:l,enabled:c=!0}=t,u=c?JA(n,s):void 0,p=c?tu(r,s):void 0,d=c?XA(s,l):ot,m=c&&a?tq(a):void 0,g=c?id(d,m)??{}:ot;return typeof document<"u"&&(c?Array.isArray(i)?g.ref=zA([g.ref,US(o),...i]):g.ref=Wt(g.ref,US(o),i):Wt(null,null)),c?(u!==void 0&&(g.className=Km(g.className,u)),p!==void 0&&(g.style=id(g.style,p)),g):ot}function tq(e){return Array.isArray(e)?WS(e):Mt(void 0,e)}var oq=Symbol.for("react.lazy");function zl(e){if(e?.$$typeof!==oq)return e;let t=Aa.Children.toArray(e)[0];return Aa.isValidElement(t)?t:e}function nq(e,t,o,n){if(t){if(typeof t=="function")return t(o,n);let r=Mt(o,t.props);return r.ref=o.ref,Aa.cloneElement(t,r)}return rq(e,o)}function rq(e,t){return e==="button"?(0,jS.createElement)("button",{type:"button",...t,key:t.key}):e==="img"?(0,jS.createElement)("img",{alt:"",...t,key:t.key}):Aa.createElement(e,t)}var sq={value:()=>null},nO=Oa.forwardRef(function(t,o){let{render:n,className:r,disabled:s=!1,hiddenUntilFound:i,keepMounted:a,loopFocus:l,onValueChange:c,multiple:u=!1,orientation:p="vertical",value:d,defaultValue:m,style:g,...R}=t,b=m??Et,x=Oa.useRef([]),[h,C]=_t({controlled:d,default:b,name:"Accordion",state:"value"}),y=q((P,N,E)=>{let M;u?N?M=[...h,P]:M=h.filter(W=>W!==P):M=h[0]===P?[]:[P],c?.(M,E),!E.isCanceled&&C(M)}),S=Oa.useMemo(()=>({value:h,disabled:s,orientation:p}),[h,s,p]),w=Oa.useMemo(()=>({disabled:s,handleValueChange:y,hiddenUntilFound:i??!1,keepMounted:a??!1,state:S,value:h}),[s,y,i,a,S,h]),v=j("div",t,{state:S,ref:o,props:R,stateAttributesMapping:sq});return f(GS.Provider,{value:w,children:f(Cn,{elementsRef:x,children:v})})});var ka=T(D(),1);var qm=T(D(),1);var Ym=T(D(),1);function Fa(){let[,e]=Ym.useState({});return Ym.useCallback(()=>{e({})},[])}var rO=0;function iq(e,t="mui"){let o=qm.useRef(void 0),n=Fa(),r=e??o.current;return qm.useEffect(()=>{o.current==null&&(rO+=1,o.current=`${t}-${rO}`,e==null&&n())},[e,t,n]),r}var sO=sd.useId;function Kn(e,t){if(sO!==void 0){let o=sO();return e??(t?`${t}-${o}`:o)}return iq(e,t)}function Ye(e){return Kn(e,"base-ui")}var Zm=T(D(),1);function Ce(e,t,o,n){let r=!1,s=!1,i=n??ot;return{reason:e,event:t??new Event("base-ui"),cancel(){r=!0},allowPropagation(){s=!0},get isCanceled(){return r},get isPropagationAllowed(){return s},trigger:o,...i}}function go(e,t,o){let n=o??ot;return{reason:e,event:t??new Event("base-ui"),...n}}var $={};me($,{cancelOpen:()=>_q,chipRemovePress:()=>bq,clearPress:()=>gq,closePress:()=>fq,closeWatcher:()=>Tq,decrementPress:()=>xq,disabled:()=>kq,drag:()=>Nq,escapeKey:()=>Eq,focusOut:()=>Pq,imperativeAction:()=>Hq,incrementPress:()=>hq,initial:()=>Bq,inputBlur:()=>Sq,inputChange:()=>Cq,inputClear:()=>yq,inputPaste:()=>vq,inputPress:()=>wq,itemPress:()=>dq,keyboard:()=>Mq,linkPress:()=>mq,listNavigation:()=>Iq,missing:()=>Lq,none:()=>aq,outsidePress:()=>pq,pointer:()=>Dq,popupClose:()=>Fq,scrub:()=>Oq,siblingOpen:()=>Vq,swipe:()=>Gq,trackPress:()=>Rq,triggerFocus:()=>uq,triggerHover:()=>cq,triggerPress:()=>lq,wheel:()=>Aq,windowResize:()=>Uq});var aq="none",lq="trigger-press",cq="trigger-hover",uq="trigger-focus",pq="outside-press",dq="item-press",fq="close-press",mq="link-press",gq="clear-press",bq="chip-remove-press",Rq="track-press",hq="increment-press",xq="decrement-press",Cq="input-change",yq="input-clear",Sq="input-blur",vq="input-paste",wq="input-press",Pq="focus-out",Eq="escape-key",Tq="close-watcher",Iq="list-navigation",Mq="keyboard",Dq="pointer",Nq="drag",Aq="wheel",Oq="scrub",Fq="popup-close",_q="cancel-open",Vq="sibling-open",kq="disabled",Lq="missing",Bq="initial",Hq="imperative-action",Gq="swipe",Uq="window-resize";var $S=T(D(),1);var iO=T(D(),1);function Xs(e){iO.useEffect(e,Et)}var Xm=null,cme=globalThis.requestAnimationFrame,zS=class{constructor(){it(this,"callbacks",[]);it(this,"callbacksCount",0);it(this,"nextId",1);it(this,"startId",1);it(this,"isScheduled",!1);it(this,"tick",t=>{this.isScheduled=!1;let o=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let r=0;r<o.length;r+=1)o[r]?.(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)}},Jm=new zS;var gn=class e{constructor(){it(this,"currentId",Xm);it(this,"cancel",()=>{this.currentId!==Xm&&(Jm.cancel(this.currentId),this.currentId=Xm)});it(this,"disposeEffect",()=>this.cancel)}static create(){return new e}static request(t){return Jm.request(t)}static cancel(t){return Jm.cancel(t)}request(t){this.cancel(),this.currentId=Jm.request(()=>{this.currentId=Xm,t()})}};function vo(){let e=gt(gn.create).current;return Xs(e.disposeEffect),e}function so(e,t=!1,o=!1,n=!1){let[r,s]=$S.useState(e&&t?"idle":void 0),[i,a]=$S.useState(e&&!n);return e&&!i&&(a(!0),s("starting")),!e&&i&&r!=="ending"&&!o&&s("ending"),!e&&!i&&r==="ending"&&s(void 0),J(()=>{if(!e&&i&&r!=="ending"&&o){let l=gn.request(()=>{s("ending")});return()=>{gn.cancel(l)}}},[e,i,r,o]),J(()=>{if(!e||t||r===void 0)return;let l=gn.request(()=>{s(void 0)});return()=>{gn.cancel(l)}},[t,e,r]),J(()=>{if(!e||!t)return;e&&i&&r!=="idle"&&s("starting");let l=gn.request(()=>{s("idle")});return()=>{gn.cancel(l)}},[t,e,i,r]),{mounted:i,setMounted:a,transitionStatus:r}}function Qm(e){let{open:t,defaultOpen:o=!1,onOpenChange:n,disabled:r}=e,[s,i]=_t({controlled:t,default:o,name:"Collapsible",state:"open"}),{mounted:a,setMounted:l,transitionStatus:c}=so(s,!0,!0),u=Ye(),[p,d]=Zm.useState(),m=p===null?void 0:p??u,g=q(R=>{let b=!s,x=Ce($.triggerPress,R.nativeEvent);n(b,x),!x.isCanceled&&i(b)});return Zm.useMemo(()=>({defaultPanelId:u,disabled:r,handleTrigger:g,mounted:a,open:s,panelId:m,setMounted:l,setOpen:i,setPanelIdState:d,transitionStatus:c}),[u,r,g,a,s,m,l,i,d,c])}var eg=T(D(),1),ld=eg.createContext(void 0);function _a(){let e=eg.useContext(ld);if(e===void 0)throw new Error(_e(15));return e}var $l=T(D(),1);function bo(e={}){let{guess:t,label:o,metadata:n,textRef:r,index:s}=e,{register:i,unregister:a,subscribeMapChange:l,nextIndexRef:c}=Um(),u=$l.useRef(-1),[p,d]=$l.useState(s==null&&t?()=>{if(u.current===-1){let b=c.current;c.current+=1,u.current=b}return u.current}:-1),m=s??p,g=$l.useRef(null),R=$l.useCallback(b=>{let x=g.current;x&&a(x),g.current=b,b&&i(b,{metadata:n??null,index:s??null,label:o,textRef:r})},[s,i,a,n,o,r]);return J(()=>{if(s==null)return l(b=>{let x=g.current?b.get(g.current)?.index:null;x!=null&&d(x)})},[s,l]),{ref:R,index:m}}var tg=T(D(),1),KS=tg.createContext(void 0);function nu(){let e=tg.useContext(KS);if(e===void 0)throw new Error(_e(9));return e}var ud={};me(ud,{closed:()=>qS,endingStyle:()=>zq,open:()=>YS,startingStyle:()=>ru});var Pt={};me(Pt,{endingStyle:()=>cd,startingStyle:()=>Kl});var Kl="data-starting-style",cd="data-ending-style";var Wq={[Kl]:""},jq={[cd]:""},Lt={transitionStatus(e){return e==="starting"?Wq:e==="ending"?jq:null}};var YS="data-open",qS="data-closed",ru=Pt.startingStyle,zq=Pt.endingStyle;var og={};me(og,{panelOpen:()=>XS});var XS="data-panel-open";var $q={[YS]:""},Kq={[qS]:""},ng={open(e){return e?{[XS]:""}:null}},rg={open(e){return e?$q:Kq}};var sg={};me(sg,{disabled:()=>Yq,index:()=>JS,open:()=>qq});var JS="data-index",Yq="data-disabled",qq="data-open";var Va={...rg,index:e=>({[JS]:String(e)}),...Lt,value:()=>null};var aO=ka.forwardRef(function(t,o){let{className:n,disabled:r=!1,onOpenChange:s,render:i,value:a,style:l,...c}=t,{ref:u,index:p}=bo(),{disabled:d,handleValueChange:m,state:g,value:R}=zm(),b=Ye(),x=a??b,h=r||d,C=R.includes(x),y=q((O,F)=>{s?.(O,F),!F.isCanceled&&m(x,O,F)}),S=Qm({open:C,onOpenChange:y,disabled:h}),w=ka.useMemo(()=>({...S,onOpenChange:y,state:{open:S.open,disabled:S.disabled,transitionStatus:S.transitionStatus}}),[S,y]),v=ka.useMemo(()=>({...g,hidden:!C&&!S.mounted,index:p,disabled:h,open:C}),[S.mounted,h,p,C,g]),P=Ye(),[N,E]=ka.useState(),M=N===null?void 0:N??P,W=ka.useMemo(()=>({defaultTriggerId:P,open:C,state:v,setTriggerId:E,triggerId:M}),[P,C,v,E,M]),I=j("div",t,{state:v,ref:[o,u],props:c,stateAttributesMapping:Va});return f(ld.Provider,{value:w,children:f(KS.Provider,{value:W,children:I})})});var lO=T(D(),1);var cO=lO.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t,{state:a}=nu();return j("h3",t,{state:a,ref:o,props:i,stateAttributesMapping:Va})});var mO=T(D(),1);var su=T(D(),1);function ig(){return typeof window<"u"}function Yo(e){return ag(e)?(e.nodeName||"").toLowerCase():"#document"}function rt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Js(e){var t;return(t=(ag(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ag(e){return ig()?e instanceof Node||e instanceof rt(e).Node:!1}function lt(e){return ig()?e instanceof Element||e instanceof rt(e).Element:!1}function st(e){return ig()?e instanceof HTMLElement||e instanceof rt(e).HTMLElement:!1}function Nr(e){return!ig()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof rt(e).ShadowRoot}function ql(e){let{overflow:t,overflowX:o,overflowY:n,display:r}=Mo(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+o)&&r!=="inline"&&r!=="contents"}function uO(e){return/^(table|td|th)$/.test(Yo(e))}function pd(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var Xq=/transform|translate|scale|rotate|perspective|filter/,Jq=/paint|layout|strict|content/,Yl=e=>!!e&&e!=="none",ZS;function lg(e){let t=lt(e)?Mo(e):e;return Yl(t.transform)||Yl(t.translate)||Yl(t.scale)||Yl(t.rotate)||Yl(t.perspective)||!cg()&&(Yl(t.backdropFilter)||Yl(t.filter))||Xq.test(t.willChange||"")||Jq.test(t.contain||"")}function pO(e){let t=bn(e);for(;st(t)&&!Yn(t);){if(lg(t))return t;if(pd(t))return null;t=bn(t)}return null}function cg(){return ZS==null&&(ZS=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ZS}function Yn(e){return/^(html|body|#document)$/.test(Yo(e))}function Mo(e){return rt(e).getComputedStyle(e)}function dd(e){return lt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function bn(e){if(Yo(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Nr(e)&&e.host||Js(e);return Nr(t)?t.host:t}function dO(e){let t=bn(e);return Yn(t)?(e.ownerDocument||e).body:st(t)&&ql(t)?t:dO(t)}function hs(e,t,o){var n;t===void 0&&(t=[]),o===void 0&&(o=!0);let r=dO(e),s=r===((n=e.ownerDocument)==null?void 0:n.body),i=rt(r);if(s){let a=ug(i);return t.concat(i,i.visualViewport||[],ql(r)?r:[],a&&o?hs(a):[])}else return t.concat(r,hs(r,[],o))}function ug(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var pg=T(D(),1),QS=pg.createContext(void 0);function La(e=!1){let t=pg.useContext(QS);if(t===void 0&&!e)throw new Error(_e(16));return t}var fO=T(D(),1);function dg(e){let{focusableWhenDisabled:t,disabled:o,composite:n=!1,tabIndex:r=0,isNativeButton:s}=e,i=n&&t!==!1,a=n&&t===!1;return{props:fO.useMemo(()=>{let c={onKeyDown(u){o&&t&&u.key!=="Tab"&&u.preventDefault()}};return n||(c.tabIndex=r,!s&&o&&(c.tabIndex=t?r:-1)),(s&&(t||i)||!s&&o)&&(c["aria-disabled"]=o),s&&(!t||a)&&(c.disabled=o),c},[n,o,t,i,a,s,r])}}function Be(e){return e?.ownerDocument||document}function hr(e,t,{detail:o=0,pointerType:n=""}={}){e.dispatchEvent(new(rt(e)).PointerEvent("click",{bubbles:!0,cancelable:!0,composed:!0,detail:o,pointerType:n,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey}))}function bt(e={}){let{disabled:t=!1,focusableWhenDisabled:o,tabIndex:n=0,native:r=!0,composite:s}=e,i=su.useRef(null),a=La(!0),l=s??a!==void 0,{props:c}=dg({focusableWhenDisabled:o,disabled:t,composite:l,tabIndex:n,isNativeButton:r}),u=su.useCallback(()=>{let m=i.current;ev(m)&&l&&t&&c.disabled===void 0&&m.disabled&&(m.disabled=!1)},[t,c.disabled,l]);J(u,[u]);let p=su.useCallback((m={})=>{let{onClick:g,onMouseDown:R,onKeyUp:b,onKeyDown:x,onPointerDown:h,...C}=m;return Mt({onClick(y){if(t){y.preventDefault();return}g?.(y)},onMouseDown(y){t||R?.(y)},onKeyDown(y){if(t||(ou(y),x?.(y),y.baseUIHandlerPrevented))return;let S=y.target===y.currentTarget,w=y.currentTarget,v=ev(w),P=!r&&Zq(w),N=S&&(r?v:!P),E=y.key==="Enter",M=y.key===" ",W=w.getAttribute("role"),I=W?.startsWith("menuitem")||W==="option"||W==="gridcell";if(S&&l&&M){if(y.defaultPrevented&&I)return;y.preventDefault(),(!r||v)&&(y.preventBaseUIHandler(),hr(w,y));return}if(!N||r||!M&&!E){S&&P&&M&&y.preventDefault();return}y.defaultPrevented||(y.preventDefault(),E&&(y.preventBaseUIHandler(),hr(w,y)))},onKeyUp(y){if(!t){if(ou(y),b?.(y),y.target===y.currentTarget&&r&&l&&ev(y.currentTarget)&&y.key===" "){y.preventDefault();return}y.baseUIHandlerPrevented||y.target===y.currentTarget&&!r&&!l&&!y.defaultPrevented&&y.key===" "&&(y.preventBaseUIHandler(),hr(y.currentTarget,y))}},onPointerDown(y){if(t){y.preventDefault();return}h?.(y)}},r?{type:"button"}:{role:"button"},c,C)},[t,c,l,r]),d=q(m=>{i.current=m,u()});return{getButtonProps:p,buttonRef:d}}function ev(e){return st(e)&&e.tagName==="BUTTON"}function Zq(e){return st(e)&&e.tagName==="A"&&!!e.href}var Qq={...Va,...ng},gO=mO.forwardRef(function(t,o){let{disabled:n,className:r,id:s,render:i,nativeButton:a=!0,style:l,...c}=t,{panelId:u,open:p,handleTrigger:d,disabled:m}=_a(),g=n||m,{getButtonProps:R,buttonRef:b}=bt({disabled:g,native:a}),{defaultTriggerId:x,state:h,setTriggerId:C}=nu(),y=s||void 0,S=y??x;return J(()=>(C(P=>y??(P===null?void 0:P)),()=>{C(P=>P===y?null:P)}),[y,C]),j("button",t,{state:h,ref:[o,b],props:[{"aria-controls":p?u:void 0,"aria-expanded":p,id:S,onClick:d},c,R],stateAttributesMapping:Qq})});var rv=T(D(),1);var ar=T(D(),1);function qe(e,t,o,n){return e.addEventListener(t,o,n),()=>{e.removeEventListener(t,o,n)}}var fd=0,Do=class e{constructor(){it(this,"currentId",fd);it(this,"clear",()=>{this.currentId!==fd&&(clearTimeout(this.currentId),this.currentId=fd)});it(this,"disposeEffect",()=>this.clear)}static create(){return new e}start(t,o){this.clear(),this.currentId=setTimeout(()=>{this.currentId=fd,o()},t)}isStarted(){return this.currentId!==fd}};function ct(){let e=gt(Do.create).current;return Xs(e.disposeEffect),e}function Tt(e){let t=gt(e2,e).current;return t.next=e,J(t.effect),t}function e2(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var RO=T(D(),1);var tv=T(on(),1);function xs(e){return e==null?e:"current"in e?e.current:e}function md(e,t){return e.getAnimations(t).filter(o=>{let n=o.effect?.getTiming();return n?.duration!==1/0&&n?.iterations!==1/0})}var fg=null;function t2(e){if(!fg){let t=[];fg=t,queueMicrotask(()=>{fg=null,tv.flushSync(()=>{for(let o of t)o()})})}fg.push(e)}function xr(e,t=!1,o=!1){let n=vo();return q((r,s=null)=>{n.cancel();let i=xs(e);if(i==null)return;let a=i,l=()=>{if(!o){tv.flushSync(r);return}t2(()=>{s?.aborted||r()})};if(typeof a.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){r();return}function c(){Promise.all(md(a).map(u=>u.finished.then(nt))).then(()=>{s?.aborted||l()},()=>{if(s?.aborted)return;if(md(a).some(p=>p.pending||p.playState!=="finished")){c();return}l()})}if(t){let u=Kl;if(!a.hasAttribute(u)){n.request(c);return}let p=new MutationObserver(()=>{a.hasAttribute(u)||(p.disconnect(),c())});p.observe(a,{attributes:!0,attributeFilter:[u]}),s?.addEventListener("abort",()=>p.disconnect(),{once:!0});return}n.request(c)})}function It(e){let{enabled:t=!0,open:o,ref:n,batch:r=!1,onComplete:s}=e,i=q(s),a=xr(n,o,r);RO.useEffect(()=>{if(!t)return;let l=new AbortController;return a(i,l.signal),()=>{l.abort()}},[t,o,i,a])}var iu={height:void 0,width:void 0};function gg(e){let{externalRef:t,hiddenUntilFound:o,id:n,keepMounted:r,mounted:s,onOpenChange:i,open:a,setMounted:l,setOpen:c,transitionStatus:u}=e,p=ar.useRef(null),d=ar.useRef(null),[m,g]=ar.useState(iu),R=ar.useRef(iu),b=ar.useRef(!1),x=ar.useRef(a),h=ar.useRef(!1),[C,y]=ar.useState(!1),S=ar.useRef(null),w=Wt(t,p),v=Tt(a),P=xr(p),N=!a&&!s,E=C?"idle":u,M=a&&(x.current||h.current),W=!a&&s&&d.current==="css-animation"&&m.height===void 0&&m.width===void 0?R.current:m,I=o&&N&&d.current!=="css-animation",O=q((B,L=!0)=>{L&&(R.current=B),g(B)}),F=q(()=>{S.current?.(),S.current=null}),k=q(B=>{F(),S.current=()=>{S.current=null,B()}}),U=q(()=>{a&&s&&d.current==="css-animation"&&(h.current=!0)});J(()=>{!C||u==="starting"||y(!1)},[C,u]),ar.useEffect(()=>()=>{U(),F()},[U,F]),J(()=>{a||(x.current=!1,h.current=!1);let B=p.current;if(!B)return;!a&&S.current&&F();let L=o2(B,M);if(d.current=L,a&&u==="idle"&&x.current&&L==="css-animation"){R.current=au(B);return}if(a&&u==="starting"){let K=b.current;if(b.current=!1,L==="none"){O(au(B)),y(!0);return}if(L==="css-transition"){let oe=n2(B);if(O(au(B)),!K)return oe;let ee=mg(B,"transition-duration","0s");return k(ee),y(!0),oe}O(au(B));let H=mg(B,"animation-name","none");if(!K){H();return}let G=mg(B,"animation-duration","0s");H(),k(G),y(!0);return}if(!a&&s&&(u==="idle"||u==="starting")){if(L==="none"){O(iu,!1),l(!1);return}O(au(B));return}if(u!=="ending")return;if(L==="none"){l(!1);return}let V=au(B);if(!(V.height>0||V.width>0)){l(!1);return}O(V),L==="css-animation"&&mg(B,"animation-name","none")()},[s,a,F,O,l,k,M,u]),It({enabled:a&&s&&E==="idle",open:!0,ref:p,onComplete(){a&&O(iu,!1)}}),ar.useEffect(()=>{if(a||!s||E!=="ending")return;if(!p.current){l(!1),O(iu,!1);return}let L=new AbortController,V=-1;function A(){v.current||(l(!1),O(iu,!1))}return V=gn.request(()=>{P(A,L.signal)}),()=>{gn.cancel(V),L.abort()}},[v,s,a,E,P,O,l]),J(()=>{let B=p.current;!B||!o||!N||B.setAttribute("hidden","until-found")},[N,o]),ar.useEffect(function(){let L=p.current;if(!L)return;let V=Do.create(),A=-1,K=(oe,ee)=>{V.start(0,()=>{v.current||(A=gn.request(()=>{v.current||(oe&&(b.current=!1),ee&&L.setAttribute(ru,""),L.setAttribute("hidden","until-found"))}))})},G=qe(L,"beforematch",oe=>{let ee=Ce($.none,oe);if(i(!0,ee),ee.isCanceled){K(!1,!1);return}b.current=!0;let X=L.hasAttribute(ru);L.removeAttribute(ru),c(!0),K(!0,X)});return()=>{V.clear(),gn.cancel(A),G()}},[v,i,c]);let _=r||o||s||a;return{height:W.height,props:{...I?{[ru]:""}:void 0,hidden:N,id:n},ref:w,shouldPreventOpenAnimation:M,shouldRender:_,transitionStatus:E,width:W.width}}function au(e){return{height:e.scrollHeight,width:e.scrollWidth}}function o2(e,t){let o=rt(e).getComputedStyle(e),n=(o.animationName.split(",").map(s=>s.trim()).some(s=>s!==""&&s!=="none")||t)&&hO(o.animationDuration),r=hO(o.transitionDuration);return n&&r||r?"css-transition":n?"css-animation":"none"}function hO(e){return e.split(",").map(t=>t.trim()).some(t=>t!==""&&Number.parseFloat(t)>0)}function mg(e,t,o){let n=e.style.getPropertyValue(t),r=e.style.getPropertyPriority(t);return e.style.setProperty(t,o),()=>{if(n===""){e.style.removeProperty(t);return}e.style.setProperty(t,n,r)}}function n2(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(r=>{e.style.setProperty(r,"initial","important")});function o(){Object.entries(t).forEach(([r,s])=>{if(s===""){e.style.removeProperty(r);return}e.style.setProperty(r,s)})}let n=gn.request(o);return()=>{gn.cancel(n),o()}}var bg={};me(bg,{accordionPanelHeight:()=>ov,accordionPanelWidth:()=>nv});var ov="--accordion-panel-height",nv="--accordion-panel-width";var xO=rv.forwardRef(function(t,o){let{className:n,hiddenUntilFound:r,keepMounted:s,id:i,render:a,style:l,...c}=t,{hiddenUntilFound:u,keepMounted:p}=zm(),{defaultPanelId:d,mounted:m,onOpenChange:g,open:R,setMounted:b,setOpen:x,setPanelIdState:h,transitionStatus:C}=_a(),y=r??u,S=s??p,w=i||void 0,v=i??d;J(()=>(h(L=>w??(L===null?void 0:L)),()=>{h(L=>L===w?null:L)}),[w,h]);let{height:P,props:N,ref:E,shouldPreventOpenAnimation:M,shouldRender:W,transitionStatus:I,width:O}=gg({externalRef:o,hiddenUntilFound:y,id:v,keepMounted:S,mounted:m,onOpenChange:g,open:R,setMounted:b,setOpen:x,transitionStatus:C}),{state:F,triggerId:k}=nu(),U={...F,transitionStatus:I},_=tu(l,U),B=j("div",{...t,style:void 0},{state:U,ref:E,props:[N,{"aria-labelledby":k,role:"region",style:{[ov]:P===void 0?"auto":`${P}px`,[nv]:O===void 0?"auto":`${O}px`}},c,_?{style:_}:void 0,M?{style:{animationName:"none"}}:void 0],stateAttributesMapping:Va});return W?B:null});var sv={};me(sv,{disabled:()=>r2,orientation:()=>s2});var r2="data-disabled",s2="data-orientation";var iv={};me(iv,{disabled:()=>a2,index:()=>i2,open:()=>l2});var i2="data-index",a2="data-disabled",l2="data-open";var av={};me(av,{disabled:()=>p2,index:()=>c2,panelOpen:()=>u2});var c2="data-index",u2="data-panel-open",p2="data-disabled";var lv={};me(lv,{disabled:()=>g2,endingStyle:()=>R2,index:()=>d2,open:()=>f2,orientation:()=>m2,startingStyle:()=>b2});var d2="data-index",f2="data-open",m2="data-orientation",g2="data-disabled",b2=Pt.startingStyle,R2=Pt.endingStyle;var pr={};me(pr,{Backdrop:()=>ob,Close:()=>bu,Description:()=>Ru,Handle:()=>Ud,Popup:()=>ib,Portal:()=>Pu,Root:()=>c_,Title:()=>Eu,Trigger:()=>y_,Viewport:()=>Mu,createHandle:()=>w_});var l_=T(D(),1);var rw=T(D(),1);var Rt={};me(Rt,{engine:()=>fv,env:()=>gv,mediaQuery:()=>bv,os:()=>pv,screenReader:()=>mv});var pv={};me(pv,{android:()=>SO,apple:()=>uv,ios:()=>cv,linux:()=>S2,mac:()=>vO,windows:()=>y2});function h2(){return typeof navigator>"u"?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:x2,platform:C2,maxTouchPoints:CO}=h2(),Xl=x2.toLowerCase(),Jl=C2.toLowerCase();var cv=/^i(os$|p)/.test(Jl)||Jl==="macintel"&&CO>1,yO="android",SO=Jl===yO||Xl.includes(yO),vO=!cv&&Jl.startsWith("mac"),y2=Jl.startsWith("win"),S2=!SO&&/^(linux|chrome os)/.test(Jl),uv=vO||cv;var fv={};me(fv,{blink:()=>w2,gecko:()=>v2,webkit:()=>dv});var dv=typeof CSS<"u"&&!!CSS.supports?.("-webkit-backdrop-filter:none"),v2=!dv&&Xl.includes("firefox"),w2=!dv&&Xl.includes("chrom");var mv={};me(mv,{voiceOver:()=>P2});var P2=uv;var gv={};me(gv,{jsdom:()=>E2});var E2=/jsdom|happydom/.test(Xl);var bv={};me(bv,{iOS:()=>T2});var T2="@supports (-webkit-touch-callout: none)";var wO={},PO={},EO="";function Rg(e,t){return ql(e)?e:t}function TO(e,t,o){return/hidden|clip/.test(e.getComputedStyle(Rg(t,o)).overflowY)}function I2(e){if(typeof document>"u")return!1;let t=Be(e);return rt(t).innerWidth-t.documentElement.clientWidth>0}function M2(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;let o=Be(e),n=o.documentElement,r=o.body,s=Rg(n,r),i=s.style.overflowY,a=n.style.scrollbarGutter;n.style.scrollbarGutter="stable",s.style.overflowY="scroll";let l=s.offsetWidth;s.style.overflowY="hidden";let c=s.offsetWidth;return s.style.overflowY=i,n.style.scrollbarGutter=a,l===c}function D2(e){let t=Be(e),o=t.documentElement,n=t.body,r=Rg(o,n),s={overflowY:r.style.overflowY,overflowX:r.style.overflowX};return Object.assign(r.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(r.style,s)}}function N2(e){let t=Be(e),o=t.documentElement,n=t.body,r=rt(o),s=0,i=0,a=!1,l=gn.create();if(Rt.engine.webkit&&(r.visualViewport?.scale??1)!==1)return()=>{};function c(){let m=r.getComputedStyle(o),g=r.getComputedStyle(n),x=(m.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";s=o.scrollTop,i=o.scrollLeft,wO={scrollbarGutter:o.style.scrollbarGutter,overflowY:o.style.overflowY,overflowX:o.style.overflowX},EO=o.style.scrollBehavior,PO={position:n.style.position,height:n.style.height,width:n.style.width,boxSizing:n.style.boxSizing,overflowY:n.style.overflowY,overflowX:n.style.overflowX,scrollBehavior:n.style.scrollBehavior};let h=o.scrollHeight>o.clientHeight,C=o.scrollWidth>o.clientWidth,y=m.overflowY==="scroll"||g.overflowY==="scroll",S=m.overflowX==="scroll"||g.overflowX==="scroll",w=Math.max(0,r.innerWidth-n.clientWidth),v=Math.max(0,r.innerHeight-n.clientHeight),P=parseFloat(g.marginTop)+parseFloat(g.marginBottom),N=parseFloat(g.marginLeft)+parseFloat(g.marginRight),E=Rg(o,n);if(a=M2(e),a){o.style.scrollbarGutter=x,E.style.overflowY="hidden",E.style.overflowX="hidden";return}Object.assign(o.style,{scrollbarGutter:x,overflowY:"hidden",overflowX:"hidden"}),(h||y)&&(o.style.overflowY="scroll"),(C||S)&&(o.style.overflowX="scroll"),Object.assign(n.style,{position:"relative",height:P||v?`calc(100dvh - ${P+v}px)`:"100dvh",width:N||w?`calc(100vw - ${N+w}px)`:"100vw",boxSizing:"border-box",overflowY:"hidden",overflowX:"hidden",scrollBehavior:"unset"}),n.scrollTop=s,n.scrollLeft=i,o.setAttribute("data-base-ui-scroll-locked",""),o.style.scrollBehavior="unset"}function u(){Object.assign(o.style,wO),Object.assign(n.style,PO),a||(o.scrollTop=s,o.scrollLeft=i,o.removeAttribute("data-base-ui-scroll-locked"),o.style.scrollBehavior=EO)}function p(){u(),l.request(c)}c();let d=qe(r,"resize",p);return()=>{l.cancel(),u(),typeof r.removeEventListener=="function"&&d()}}var Rv=class{constructor(){it(this,"lockCount",0);it(this,"restore",null);it(this,"timeoutLock",Do.create());it(this,"timeoutUnlock",Do.create());it(this,"release",()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)});it(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=Be(t),n=o.documentElement,r=o.body,s=rt(n);if(TO(s,n,r)){let a=new s.MutationObserver(()=>{TO(s,n,r)||(a.disconnect(),this.restore=null,this.lock(t))}),l={attributes:!0};a.observe(n,l),a.observe(r,l),this.restore=()=>a.disconnect();return}let i=Rt.os.ios||!I2(t);this.restore=i?D2(t):N2(t)}},A2=new Rv;function hg(e=!0,t=null){J(()=>{if(e)return A2.acquire(t)},[e,t])}var lr=T(D(),1);function St(e){e.preventDefault(),e.stopPropagation()}function IO(e){return"nativeEvent"in e}function qr(e){return e.pointerType===""&&e.isTrusted?!0:Rt.os.android&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Zs(e){return Rt.env.jsdom?!1:!Rt.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"&&(Rt.os.android||e.buttons===0)||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Ar(e,t){let o=["mouse","pen"];return t||o.push("",void 0),o.includes(e)}function MO(e){let t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}function ft(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Ne(e,t){if(!e||!t)return!1;let o=t.getRootNode?.();if(e.contains(t))return!0;if(o&&Nr(o)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Xt(e,t){let o=e;for(;o;){if(lt(o)&&o.matches(t))return o;o=o.assignedSlot??o.parentNode??(Nr(o)?o.host:null)}return null}function Je(e){return"composedPath"in e?e.composedPath()[0]??e.target:e.target}var gd="data-base-ui-focusable";var hv="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Ji="ArrowLeft",Zi="ArrowRight",bd="ArrowUp",lu="ArrowDown";var Rd={};me(Rd,{popupOpen:()=>U2,triggerDisabled:()=>cu});var ge={};me(ge,{align:()=>V2,anchorHidden:()=>yv,closed:()=>Cv,endingStyle:()=>F2,open:()=>xv,side:()=>_2,startingStyle:()=>O2});var xv="data-open",Cv="data-closed",O2=Kl,F2=cd,yv="data-anchor-hidden",_2="data-side",V2="data-align";var At={};me(At,{popupOpen:()=>xg,pressed:()=>Sv});var xg="data-popup-open",Sv="data-pressed";var k2={[xg]:""},L2={[xg]:"",[Sv]:""},B2={[xv]:""},H2={[Cv]:""},G2={[yv]:""},qn={open(e){return e?k2:null}},Or={open(e){return e?L2:null}},lo={open(e){return e?B2:H2},anchorHidden(e){return e?G2:null}},Ro={...lo,...Lt};var U2=At.popupOpen,cu="data-trigger-disabled";function Ba(e,t){if(!lt(e))return!1;let o=e;if(t.hasElement(o))return!o.hasAttribute(cu);for(let[,n]of t.entries())if(Ne(n,o))return!n.hasAttribute(cu);return!1}function Cg(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 DO(e){return e.matches("html,body")}function Cs(e){return st(e)&&e.matches(hv)}function Zl(e){return Xt(e,`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${hv}`)!=null}function hd(e){return e?e.getAttribute("role")==="combobox"&&Cs(e):!1}function Qs(e){if(!e||Rt.env.jsdom)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Ql(e){return e?e.hasAttribute(gd)?e:e.querySelector(`[${gd}]`)||e:null}function W2(e,t){return t!=null&&!Ar(t)?0:typeof e=="function"?e():e}function ys(e,t,o){let n=W2(e,o);return typeof n=="number"?n:n?.[t]}function vv(e){return typeof e=="function"?e():e}function yg(e,t){return t||e==="click"||e==="mousedown"}function NO(e){return e?.includes("mouse")&&e!=="mousedown"}var AO=lr.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Do,currentIdRef:{current:null},currentContextRef:{current:null}});function j2(e,t){e.current=t.current}function wv(e){let{children:t,delay:o,timeoutMs:n=0}=e,r=lr.useRef(o),s=lr.useRef(o),i=lr.useRef(null),a=lr.useRef(null),l=ct();return J(()=>{if(s.current=o,!i.current){r.current=o;return}r.current={open:ys(r.current,"open"),close:ys(o,"close")}},[o,i,r,s]),f(AO.Provider,{value:lr.useMemo(()=>({hasProvider:!0,delayRef:r,initialDelayRef:s,currentIdRef:i,timeoutMs:n,currentContextRef:a,timeout:l}),[n,l]),children:t})}function Pv(e,t={open:!1}){let{open:o}=t,n=e.useState("floatingId"),r=lr.useContext(AO),{currentIdRef:s,delayRef:i,timeoutMs:a,initialDelayRef:l,currentContextRef:c,hasProvider:u,timeout:p}=r,[d,m]=lr.useState(!1),g=lr.useRef(o);return J(()=>{g.current=o},[o]),J(()=>{function R(){c.current?.setIsInstantPhase(!1),s.current=null,c.current=null,i.current=l.current,p.clear()}if(s.current&&!o&&s.current===n){if(m(!1),a){let b=n;return p.start(a,()=>{e.select("open")||s.current&&s.current!==b||R()}),()=>{(g.current||s.current!==b)&&p.clear()}}R()}},[o,n,s,i,a,l,c,p,e]),J(()=>{if(!o)return;let R=c.current,b=s.current;p.clear(),c.current={onOpenChange:e.setOpen,setIsInstantPhase:m},s.current=n,i.current={open:0,close:ys(l.current,"close")},b!==null&&b!==n?(m(!0),R?.setIsInstantPhase(!0),R?.onOpenChange(!1,Ce($.none))):(m(!1),R?.setIsInstantPhase(!1))},[o,n,e,s,i,l,c,p]),J(()=>()=>{if(s.current===n){if(c.current=null,!g.current)return;s.current=null,j2(i,l),p.clear()}},[c,s,i,n,l,p]),lr.useMemo(()=>({activeIdRef:s,hasProvider:u,delayRef:i,isInstantPhase:d}),[s,u,i,d])}var Fn=T(D(),1);function Wo(...e){return()=>{for(let t=0;t<e.length;t+=1){let o=e[t];o&&o()}}}var Sg=T(D(),1);var OO={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},wo={...OO,position:"fixed",margin:0,top:0,left:0},Xn={...OO,position:"absolute"};var nn=Sg.forwardRef(function(t,o){let[n,r]=Sg.useState();return J(()=>{Rt.screenReader.voiceOver&&Rt.engine.webkit&&r("button")},[]),f("span",{...t,ref:o,style:wo,"aria-hidden":n?void 0:!0,...{tabIndex:0,role:n},"data-base-ui-focus-guard":""})});var Ha=Math.min,Ss=Math.max,Ga=Math.round,Qi=Math.floor,ei=e=>({x:e,y:e}),z2={left:"right",right:"left",bottom:"top",top:"bottom"};function wg(e,t,o){return Ss(e,Ha(t,o))}function ti(e,t){return typeof e=="function"?e(t):e}function Dn(e){return e.split("-")[0]}function Fr(e){return e.split("-")[1]}function Pg(e){return e==="x"?"y":"x"}function Cd(e){return e==="y"?"height":"width"}function Cr(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function yd(e){return Pg(Cr(e))}function VO(e,t,o){o===void 0&&(o=!1);let n=Fr(e),r=yd(e),s=Cd(r),i=r==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=xd(i)),[i,xd(i)]}function kO(e){let t=xd(e);return[vg(e),t,vg(t)]}function vg(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var FO=["left","right"],_O=["right","left"],$2=["top","bottom"],K2=["bottom","top"];function Y2(e,t,o){switch(e){case"top":case"bottom":return o?t?_O:FO:t?FO:_O;case"left":case"right":return t?$2:K2;default:return[]}}function LO(e,t,o,n){let r=Fr(e),s=Y2(Dn(e),o==="start",n);return r&&(s=s.map(i=>i+"-"+r),t&&(s=s.concat(s.map(vg)))),s}function xd(e){let t=Dn(e);return z2[t]+e.slice(t.length)}function q2(e){var t,o,n,r;return{top:(t=e.top)!=null?t:0,right:(o=e.right)!=null?o:0,bottom:(n=e.bottom)!=null?n:0,left:(r=e.left)!=null?r:0}}function Eg(e){return typeof e!="number"?q2(e):{top:e,right:e,bottom:e,left:e}}function ea(e){let{x:t,y:o,width:n,height:r}=e;return{width:n,height:r,top:o,left:t,right:t+n,bottom:o+r,x:t,y:o}}function Tg(e,t,o){return Math.floor(e/t)!==o}function _r(e,t){return t<0||t>=e.length}function ws(e,t){return Nn(e.current,{disabledIndices:t})}function oi(e,t){return Nn(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Ig(e,t,o){let{decrement:n,loopFocus:r,allowEscape:s,disabledIndices:i,minIndex:a,maxIndex:l}=o,c=()=>Nn(e,{startingIndex:t,decrement:n,disabledIndices:i}),u,p=!1;if(!r)u=n?Math.max(a,c()):Math.min(l,c());else if(n?t<=a:t>=l){let d=n?-1:e.length;s&&t!==d?u=-1:(u=n?l:a,p=!0)}else u=c();return{index:_r(e,u)?-1:u,wrapped:p}}function Nn(e,{startingIndex:t=-1,decrement:o=!1,disabledIndices:n,amount:r=1}={}){let s=t;do s+=o?-r:r;while(s>=0&&s<=e.length-1&&vs(e,s,n));return s}function BO(e,{event:t,orientation:o,loopFocus:n,onLoop:r,rtl:s,cols:i,disabledIndices:a,minIndex:l,maxIndex:c,prevIndex:u,stopEvent:p=!1}){let d=u,m;if(t.key===bd?m="up":t.key===lu&&(m="down"),m){let g=[],R=[],b=!1,x=0;{let N=null,E=-1;e.forEach((M,W)=>{if(M==null)return;x+=1;let I=Xt(M,'[role="row"]');I&&(b=!0),(I!==N||E===-1)&&(N=I,E+=1,g[E]=[]),g[E].push(W),R[W]=E})}let h=!1,C=0;if(b)for(let N of g){let E=N.length;E>C&&(C=E),E!==i&&(h=!0)}let y=h&&x<e.length,S=C||i,w=N=>{if(!h||u===-1)return;let E=R[u];if(E==null)return;let M=g[E].indexOf(u),W=N==="up"?-1:1;for(let I=E+W,O=0;O<g.length;O+=1,I+=W){if(I<0||I>=g.length){if(!n||y)return;if(I=I<0?g.length-1:0,r){let k=Math.min(M,g[I].length-1),U=g[I][k]??g[I][0],_=r(t,u,U);I=R[_]??I}}let F=g[I];for(let k=Math.min(M,F.length-1);k>=0;k-=1){let U=F[k];if(!vs(e,U,a))return U}}},v=N=>{if(!y||u===-1)return;let E=u%S,M=N==="up"?-S:S,W=c-c%S,I=Qi(c/S)+1;for(let O=u-E+M,F=0;F<I;F+=1,O+=M){if(O<0||O>c){if(!n)return;O=O<0?W:0}let k=Math.min(O+S-1,c);for(let U=Math.min(O+E,k);U>=O;U-=1)if(!vs(e,U,a))return U}};p&&St(t);let P=w(m)??v(m);if(P!==void 0)d=P;else if(u===-1)d=m==="up"?c:l;else if(d=Nn(e,{startingIndex:u,amount:S,decrement:m==="up",disabledIndices:a}),n){if(m==="up"&&(u-S<l||d<0)){let N=u%S,E=c%S,M=c-(E-N);E===N?d=c:d=E>N?M:M-S,r&&(d=r(t,u,d))}m==="down"&&u+S>c&&(d=Nn(e,{startingIndex:u%S-S,amount:S,disabledIndices:a}),r&&(d=r(t,u,d)))}_r(e,d)&&(d=u)}if(o==="both"){let g=Qi(u/i);t.key===(s?Ji:Zi)&&(p&&St(t),u%i!==i-1?(d=Nn(e,{startingIndex:u,disabledIndices:a}),n&&Tg(d,i,g)&&(d=Nn(e,{startingIndex:u-u%i-1,disabledIndices:a}),r&&(d=r(t,u,d)))):n&&(d=Nn(e,{startingIndex:u-u%i-1,disabledIndices:a}),r&&(d=r(t,u,d))),Tg(d,i,g)&&(d=u)),t.key===(s?Zi:Ji)&&(p&&St(t),u%i!==0?(d=Nn(e,{startingIndex:u,decrement:!0,disabledIndices:a}),n&&Tg(d,i,g)&&(d=Nn(e,{startingIndex:u+(i-u%i),decrement:!0,disabledIndices:a}),r&&(d=r(t,u,d)))):n&&(d=Nn(e,{startingIndex:u+(i-u%i),decrement:!0,disabledIndices:a}),r&&(d=r(t,u,d))),Tg(d,i,g)&&(d=u));let R=Qi(c/i)===g;_r(e,d)&&(n&&R?(d=t.key===(s?Zi:Ji)?c:Nn(e,{startingIndex:u-u%i-1,disabledIndices:a}),r&&(d=r(t,u,d))):d=u)}return d}function vs(e,t,o){if(typeof o=="function"?o(t):o?.includes(t)??!1)return!0;let r=e[t];return r?!ec(r)||r.matches(":disabled")?!0:!o&&(r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"):!1}function X2(e){return e.visibility==="hidden"||e.visibility==="collapse"}function ec(e,t=e?Mo(e):null){return!e||!e.isConnected||!t||X2(t)?!1:typeof e.checkVisibility=="function"?e.checkVisibility():t.display!=="none"&&t.display!=="contents"}var J2='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function Z2(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let o=e.getRootNode();return Nr(o)?o.host:null}function Tv(e){for(let t of Array.from(e.children))if(Yo(t)==="summary")return t;return null}function Q2(e,t){let o=Tv(t);return!!o&&(e===o||Ne(o,e))}function HO(e){let t=e?Yo(e):"";return e!=null&&e.matches(J2)&&(t!=="summary"||e.parentElement!=null&&Yo(e.parentElement)==="details"&&Tv(e.parentElement)===e)&&(t!=="details"||Tv(e)==null)&&(t!=="input"||e.type!=="hidden")}function Iv(e){if(!HO(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let t=e;t;t=Z2(t)){let o=t!==e,n=Yo(t)==="slot";if(t.hasAttribute("inert")||o&&Yo(t)==="details"&&!t.open&&!Q2(e,t)||t.hasAttribute("hidden")||!n&&!eX(t,o))return!1}return!0}function eX(e,t){let o=Mo(e);return t?o.display!=="none":ec(e,o)}function GO(e){let t=e.tabIndex;if(t<0){let o=Yo(e);if(o==="details"||o==="audio"||o==="video"||st(e)&&e.isContentEditable)return 0}return t}function Ev(e){if(Yo(e)!=="input")return null;let t=e;return t.type==="radio"&&t.name!==""?t:null}function UO(e,t){let o=Ev(e);if(!o)return!0;let n=t.find(r=>{let s=Ev(r);return s?.name===o.name&&s.form===o.form&&s.checked});return n?n===o:t.find(r=>{let s=Ev(r);return s?.name===o.name&&s.form===o.form})===o}function WO(e){if(st(e)&&Yo(e)==="slot"){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return st(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Mv(e,t){WO(e).forEach(o=>{HO(o)&&t.push(o),Mv(o,t)})}function jO(e,t,o){WO(e).forEach(n=>{st(n)&&n.matches(t)&&o.push(n),jO(n,t,o)})}function Sd(e){return Iv(e)&&GO(e)>=0}function Dv(e){let t=[];return Mv(e,t),t.filter(Iv)}function vd(e){let t=Dv(e);return t.filter(o=>GO(o)>=0&&UO(o,t))}function zO(e,t){let o=vd(e),n=o.length;if(n===0)return;let r=ft(Be(e)),s=o.indexOf(r),i=s===-1?t===1?0:n-1:s+t;return o[i]}function Ua(e){return zO(Be(e).body,1)||e}function Wa(e){return zO(Be(e).body,-1)||e}function Mg(e,t,o){if(!e)return null;let n=[];Mv(Be(e).body,n);let r=n.indexOf(e);if(r===-1)return null;let s=n.filter(Iv);for(let i=1;i<n.length;i+=1){let a=n[(r+t*i+n.length)%n.length];if(!Ne(o,a)&&Sd(a)&&UO(a,s))return a}return n[r]}function An(e,t){let o=t||e.currentTarget,n=e.relatedTarget;return!n||!Ne(o,n)}function Dg(e){vd(e).forEach(o=>{o.dataset.tabindex=o.getAttribute("tabindex")||"",o.setAttribute("tabindex","-1")})}function wd(e){let t=[];jO(e,"[data-tabindex]",t),t.forEach(o=>{let n=o.dataset.tabindex;delete o.dataset.tabindex,n?o.setAttribute("tabindex",n):o.removeAttribute("tabindex")})}function yr(e,t,o=!0){return e.filter(r=>r.parentId===t).flatMap(r=>[...!o||r.context?.open?[r]:[],...yr(e,r.id,o)])}function Nv(e,t){let o=[],n=e.find(r=>r.id===t)?.parentId;for(;n;){let r=e.find(s=>s.id===n);n=r?.parentId,r&&(o=o.concat(r))}return o}function ni(e){return`data-base-ui-${e}`}var Ng=0;function uu(e,t={}){let{preventScroll:o=!1,sync:n=!1,shouldFocus:r}=t;cancelAnimationFrame(Ng);function s(){r&&!r()||e?.focus({preventScroll:o})}if(n)return s(),nt;let i=requestAnimationFrame(s);return Ng=i,()=>{Ng===i&&(cancelAnimationFrame(i),Ng=0)}}var $O="data-base-ui-inert",Pd=new WeakMap,Ag=new WeakSet,Ed=new WeakMap,Av=0;function XO(e){return e?Nr(e)?e.host:XO(e.parentNode):null}var KO=(e,t)=>t.map(o=>{if(e.contains(o))return o;let n=XO(o);return e.contains(n)?n:null}).filter(o=>o!=null),YO=e=>{let t=new Set;return e.forEach(o=>{let n=o;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},qO=(e,t,o)=>{let n=[],r=s=>{!s||o.has(s)||Array.from(s.children).forEach(i=>{Yo(i)!=="script"&&(t.has(i)?r(i):n.push(i))})};return r(e),n};function tX(e,t,o,{mark:n=!0}){let r=KO(t,e),s=n?qO(t,YO(r),new Set(r)):[],i=[],a=[];if(o){let l=KO(t,Array.from(t.querySelectorAll("[aria-live]"))),c=r.concat(l);qO(t,YO(c),new Set(c)).forEach(p=>{let d=p.getAttribute("aria-hidden"),m=d!==null&&d!=="false",g=(Pd.get(p)||0)+1;Pd.set(p,g),i.push(p),g===1&&m&&Ag.add(p),m||p.setAttribute("aria-hidden","true")})}return n&&s.forEach(l=>{let c=(Ed.get(l)||0)+1;Ed.set(l,c),a.push(l),c===1&&l.setAttribute($O,"")}),Av+=1,()=>{i.forEach(l=>{let c=(Pd.get(l)||0)-1;Pd.set(l,c),c||(Ag.has(l)||l.removeAttribute("aria-hidden"),Ag.delete(l))}),n&&a.forEach(l=>{let c=(Ed.get(l)||0)-1;Ed.set(l,c),c||l.removeAttribute($O)}),Av-=1,Av||(Pd=new WeakMap,Ag=new WeakSet,Ed=new WeakMap)}}function Ov(e,t={}){let{ariaHidden:o=!1,mark:n=!0}=t,r=Be(e[0]).body;return tX(e,r,o,{mark:n})}var Po=T(D(),1),Fv=T(on(),1);var JO={style:{transition:"none"}},pu="data-base-ui-click-trigger",Og="data-base-ui-swipe-ignore",oX="data-swipe-ignore",Td=`[${Og}]`,ZO=`[${oX}]`,ja={fallbackAxisSide:"none"},Xr={fallbackAxisSide:"end"},Fg={clipPath:"inset(50%)",position:"fixed",top:0,left:0};var QO=Po.createContext(null),_v=()=>Po.useContext(QO),nX=ni("portal");function _g(e={}){let{ref:t,container:o,componentProps:n=ot,elementProps:r}=e,s=Kn(),a=_v()?.portalNode,[l,c]=Po.useState(null),[u,p]=Po.useState(null),d=q(b=>{b!==null&&p(b)}),m=Po.useRef(null);J(()=>{if(o===null){m.current&&(m.current=null,p(null),c(null));return}let b=(o&&(ag(o)?o:o.current))??a??document.body;if(b==null){m.current&&(m.current=null,p(null),c(null));return}m.current!==b&&(m.current=b,p(null),c(b))},[o,a]);let g=j("div",n,{ref:[t,d],props:[{id:s,[nX]:""},r]}),R=l&&g?Fv.createPortal(g,l):null;return{node:u,nodeId:Po.isValidElement(g)?g.props.id:void 0,subtree:R}}var Vr=Po.forwardRef(function(t,o){let{render:n,className:r,style:s,children:i,container:a,portalOwnerRole:l,...c}=t,{node:u,nodeId:p,subtree:d}=_g({container:a,ref:o,componentProps:t,elementProps:c}),m=Po.useRef(null),g=Po.useRef(null),R=Po.useRef(null),b=Po.useRef(null),[x,h]=Po.useState(null),C=Po.useRef(!1),y=x?.modal,S=x?.open,w=!!x&&!x.modal&&x.open&&!!u;Po.useEffect(()=>{if(!u||y)return;function P(N){u&&N.relatedTarget&&An(N)&&(N.type==="focusin"?C.current&&(wd(u),C.current=!1):(Dg(u),C.current=!0))}return Wo(qe(u,"focusin",P,!0),qe(u,"focusout",P,!0))},[u,y]),J(()=>{!u||S!==!0||!C.current||(wd(u),C.current=!1)},[S,u]);let v=Po.useMemo(()=>({beforeOutsideRef:m,afterOutsideRef:g,beforeInsideRef:R,afterInsideRef:b,portalNode:u,setFocusManagerState:h}),[u]);return f(Po.Fragment,{children:[d,f(QO.Provider,{value:v,children:[w&&u&&f(nn,{"data-type":"outside",ref:m,onFocus:P=>{if(An(P,u))R.current?.focus();else{let N=x?x.domReference:null;Wa(N)?.focus()}}}),w&&u&&f("span",{role:l,"aria-owns":p,style:Fg}),u&&Fv.createPortal(i,u),w&&u&&f(nn,{"data-type":"outside",ref:g,onFocus:P=>{if(An(P,u))b.current?.focus();else{let N=x?x.domReference:null;Ua(N)?.focus(),x?.closeOnFocusOut&&x?.onOpenChange(!1,Ce($.focusOut,P.nativeEvent))}}})]})]})});var $a=T(D(),1);function Vg(){let e=new Map;return{emit(t,o){e.get(t)?.forEach(n=>n(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 za=class{constructor(){it(this,"nodesRef",{current:[]});it(this,"events",Vg())}addNode(t){this.nodesRef.current.push(t)}removeNode(t){let o=this.nodesRef.current.findIndex(n=>n===t);o!==-1&&this.nodesRef.current.splice(o,1)}};var eF=$a.createContext(null),tF=$a.createContext(null),On=()=>$a.useContext(eF)?.id||null,jo=e=>{let t=$a.useContext(tF);return e??t};function kr(e){let t=Kn(),o=jo(e),n=On();return J(()=>{if(!t)return;let r={id:t,parentId:n};return o?.addNode(r),()=>{o?.removeNode(r)}},[o,t,n]),t}function Lr(e){let{children:t,id:o}=e,n=On();return f(eF.Provider,{value:$a.useMemo(()=>({id:o,parentId:n}),[o,n]),children:t})}function Ps(e){let{children:t,externalTree:o}=e,n=gt(()=>o??new za).current;return f(tF.Provider,{value:n,children:t})}function rX(e,t){let o=rt(Je(e));return e instanceof o.KeyboardEvent?"keyboard":e instanceof o.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||(qr(e)?"keyboard":t||"mouse"):"touches"in e?"touch":e instanceof o.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}var oF=20,Ka=[];function Vv(){Ka=Ka.filter(e=>e.deref()?.isConnected)}function nF(e){Vv(),e&&Yo(e)!=="body"&&(Ka.push(new WeakRef(e)),Ka.length>oF&&(Ka=Ka.slice(-oF)))}function rF(){return Vv(),Ka[Ka.length-1]?.deref()}function sX(e){return e?Sd(e)?e:vd(e)[0]||e:null}function sF(e){if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex")||!e.getAttribute("role")?.includes("dialog"))return;let o=Dv(e).filter(r=>{let s=r.getAttribute("data-tabindex")||"";return Sd(r)||r.hasAttribute("data-tabindex")&&!s.startsWith("-")}),n=e.getAttribute("tabindex");o.length===0?n!=="0"&&(e.setAttribute("tabindex","0"),e.setAttribute("data-tabindex","0")):(n!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function Br(e){let{context:t,children:o,disabled:n=!1,initialFocus:r=!0,returnFocus:s=!0,explicitReturnFocus:i,restoreFocus:a=!1,modal:l=!0,closeOnFocusOut:c=!0,openInteractionType:u="",nextFocusableElement:p,previousFocusableElement:d,beforeContentFocusGuardRef:m,externalTree:g,getInsideElements:R}=e,b=t.useState("open"),x=t.useState("domReferenceElement"),h=t.useState("floatingElement"),{events:C,dataRef:y}=t.context,S=q(()=>y.current.floatingContext?.nodeId),w=r===!1,v=hd(x)&&w,P=Tt(r),N=Tt(s),E=Tt(i),M=Tt(u),W=Tt(b),I=jo(g),O=_v(),F=Fn.useRef(!1),k=Fn.useRef(!1),U=Fn.useRef(!1),_=Fn.useRef(null),B=Fn.useRef(""),L=Fn.useRef(""),V=Fn.useRef(null),A=Fn.useRef(null),K=Wt(V,m,O?.beforeInsideRef),H=Wt(A,O?.afterInsideRef),G=ct(),oe=ct(),ee=vo(),X=O!=null,te=Ql(h),ce=q((Y=te)=>Y?vd(Y):[]),le=q(()=>R?.().filter(Y=>Y!=null)??[]);Fn.useEffect(()=>{if(n||!l)return;function Y(Z){Z.key==="Tab"&&Ne(te,ft(Be(te)))&&ce().length===0&&!v&&St(Z)}let ae=Be(te);return qe(ae,"keydown",Y)},[n,te,l,v,ce]),Fn.useEffect(()=>{if(n||!b)return;let Y=Be(te);function ae(){U.current=!1}function Z(Te){let fe=Je(Te),ve=le(),z=Ne(h,fe)||Ne(x,fe)||Ne(O?.portalNode,fe)||ve.some(Re=>Re===fe||Ne(Re,fe));U.current=!z,L.current=Te.pointerType||"keyboard",Xt(fe,`[${pu}]`)&&(k.current=!0,oe.start(0,()=>{k.current=!1}))}function ue(){L.current="keyboard"}return Wo(qe(Y,"pointerdown",Z,!0),qe(Y,"pointerup",ae,!0),qe(Y,"pointercancel",ae,!0),qe(Y,"keydown",ue,!0),ae)},[n,h,x,te,b,O,oe,le]),Fn.useEffect(()=>{if(n||!c)return;let Y=Be(te);function ae(){k.current=!0,oe.start(0,()=>{k.current=!1})}function Z(ve){let z=Je(ve);Sd(z)&&(_.current=z)}function ue(ve){let z=ve.relatedTarget,Re=ve.currentTarget,xe=Je(ve);l&&z==null&&xe!=null&&Ne(h,xe)&&nF(xe),queueMicrotask(()=>{let Pe=S(),ie=t.context.triggerElements,re=le(),Ee=z?.hasAttribute(ni("focus-guard"))&&[V.current,A.current,O?.beforeInsideRef.current,O?.afterInsideRef.current,O?.beforeOutsideRef.current,O?.afterOutsideRef.current,xs(d),xs(p)].includes(z),ye=!(Ne(x,z)||Ne(h,z)||Ne(z,h)||Ne(O?.portalNode,z)||re.some(se=>se===z||Ne(se,z))||ie.hasMatchingElement(se=>Ne(se,z))||Ee||I&&(yr(I.nodesRef.current,Pe).find(se=>Ne(se.context?.elements.floating,z)||Ne(se.context?.elements.domReference,z))||Nv(I.nodesRef.current,Pe).find(se=>[se.context?.elements.floating,Ql(se.context?.elements.floating)].includes(z)||se.context?.elements.domReference===z)));if(Re===x&&te&&sF(te),a&&Re!==x&&!ec(xe)&&ft(Y)===Y.body){if(st(te)&&(te.focus(),a==="popup")){ee.request(()=>{te.focus()});return}let se=ce(),Fe=_.current,ke=(Fe&&se.includes(Fe)?Fe:null)||se[se.length-1]||te;st(ke)&&ke.focus()}if(y.current.insideReactTree){y.current.insideReactTree=!1;return}(v||!l)&&z&&ye&&!k.current&&(v||z!==rF())&&(F.current=!0,t.setOpen(!1,Ce($.focusOut,ve)))})}function Te(){U.current||(y.current.insideReactTree=!0,G.start(0,()=>{y.current.insideReactTree=!1}))}let fe=st(x)?x:null;if(!(!h&&!fe))return Wo(fe&&qe(fe,"focusout",ue),fe&&qe(fe,"pointerdown",ae),h&&qe(h,"focusin",Z),h&&qe(h,"focusout",ue),h&&O&&qe(h,"focusout",Te,!0))},[n,x,h,te,l,I,O,t,c,a,ce,v,S,y,G,oe,ee,p,d,le]),Fn.useEffect(()=>{if(n||!h||!b)return;let Y=Array.from(O?.portalNode?.querySelectorAll(`[${ni("portal")}]`)||[]),Z=(I?Nv(I.nodesRef.current,S()):[]).find(Re=>hd(Re.context?.elements.domReference||null))?.context?.elements.domReference,Te=[...[h,...Y,V.current,A.current,O?.beforeOutsideRef.current,O?.afterOutsideRef.current,...le()],Z,xs(d),xs(p),v?x:null].filter(Re=>Re!=null),fe=Ov(Te,{ariaHidden:l||v,mark:!1}),ve=[h,...Y].filter(Re=>Re!=null),z=Ov(ve);return()=>{z(),fe()}},[b,n,x,h,l,O,v,I,S,p,d,le]),J(()=>{if(!b||n||!st(te))return;B.current="",L.current="";let Y=Be(te),ae=ft(Y);queueMicrotask(()=>{let Z=P.current,ue=typeof Z=="function"?Z(M.current||""):Z;if(ue===void 0||ue===!1||Ne(te,ae))return;let fe=null,ve=()=>(fe==null&&(fe=ce(te)),fe[0]||te),z;ue===!0||ue===null?z=ve():z=xs(ue),z=z||ve();let Re=Ne(te,ft(Y)),xe=y.current.openEvent,Pe=xe?.type==="mousedown"&&qr(xe);uu(z,{sync:Pe,preventScroll:z===te,shouldFocus(){if(!W.current)return!1;if(Re)return!0;let ie=ft(Y);return!(ie!==z&&Ne(te,ie))}})})},[n,b,te,ce,P,M,W,y]);let Q=Fn.useRef(null);J(()=>{if(n||!te){Q.current=null;return}Q.current&&(Q.current.cancelled=!0,Q.current=null);let Y=Be(te),ae=ft(Y),Z=M.current==null;nF(ae);function ue(fe){if(fe.open||(B.current=rX(fe.nativeEvent,L.current)),(fe.reason===$.focusOut&&fe.triggerElement?.hasAttribute(ni("focus-guard"))||fe.reason===$.triggerHover&&fe.nativeEvent.type==="mouseleave")&&(F.current=!0),fe.reason===$.outsidePress)if(fe.nested)F.current=!1;else if(qr(fe.nativeEvent)||Zs(fe.nativeEvent))F.current=!1;else{let ve=!1;Be(te).createElement("div").focus({get preventScroll(){return ve=!0,!1}}),ve?F.current=!1:F.current=!0}}C.on("openchange",ue);function Te(fe){let ve=N.current,z=typeof ve=="function"?ve(fe):ve;if(z===void 0||z===!1)return null;z===null&&(z=!0);let Re=x?.isConnected?x:null,xe=ae?.isConnected&&Yo(ae)!=="body"?ae:null,Pe=Z?xe||Re:Re||xe;return Pe||(Pe=rF()||null),typeof z=="boolean"?Pe:xs(z)||Pe||null}return()=>{C.off("openchange",ue);let fe=ft(Y),ve=le(),z=Ne(h,fe)||ve.some(re=>re===fe||Ne(re,fe))||I&&yr(I.nodesRef.current,S(),!1).some(re=>Ne(re.context?.elements.floating,fe)),Re=N.current,xe=B.current,Pe=Te(xe),ie={cancelled:!1};Q.current=ie,queueMicrotask(()=>{Q.current===ie&&(Q.current=null);let re=sX(Pe),Ee=E.current??typeof Re!="boolean";if(!ie.cancelled&&Re&&!F.current&&st(re)&&(!(!Ee&&re!==fe&&fe!==Y.body)||z)){let ye={preventScroll:!0};xe==="keyboard"&&(ye.focusVisible=!0),re.focus(ye)}F.current=!1})}},[n,h,te,N,E,M,C,I,x,S,le]),J(()=>{if(!Rt.engine.webkit||b||!h)return;let Y=ft(Be(h));!st(Y)||!Cs(Y)||Ne(h,Y)&&Y.blur()},[b,h]),J(()=>{if(!(n||!O))return O.setFocusManagerState({modal:l,closeOnFocusOut:c,open:b,onOpenChange:t.setOpen,domReference:x}),()=>{O.setFocusManagerState(null)}},[n,O,l,b,t,c,x]),J(()=>{if(!(n||!te))return sF(te),()=>{queueMicrotask(Vv)}},[n,te]);let ne=!n&&(l?!v:!0)&&(X||l);return f(Fn.Fragment,{children:[ne&&f(nn,{"data-type":"inside",ref:K,onFocus:Y=>{if(l){let ae=ce();uu(ae[ae.length-1])}else O?.portalNode&&(F.current=!1,An(Y,O.portalNode)?Ua(x)?.focus():xs(d??O.beforeOutsideRef)?.focus())}}),o,ne&&f(nn,{"data-type":"inside",ref:H,onFocus:Y=>{l?uu(ce()[0]):O?.portalNode&&(c&&(F.current=!0),An(Y,O.portalNode)?Wa(x)?.focus():xs(p??O.afterOutsideRef)?.focus())}})]})}var Id=T(D(),1);function _n(e,t={}){let{enabled:o=!0,event:n="click",toggle:r=!0,ignoreMouse:s=!1,stickIfOpen:i=!0,touchOpenDelay:a=0,reason:l=$.triggerPress}=t,c=e.context.dataRef,u=Id.useRef(void 0),p=vo(),d=ct(),m=Id.useMemo(()=>{function g(b,x,h,C){let y=Ce(l,x,h);b&&C==="touch"&&a>0?d.start(a,()=>{e.setOpen(!0,y)}):e.setOpen(b,y)}function R(b,x,h){let C=c.current.openEvent,y=e.select("domReferenceElement")!==x;return b&&y||!b||!r?!0:C&&(typeof i=="function"?i():i)?!h(C.type):!1}return{onPointerDown(b){u.current=Ar(b.pointerType,!0)&&Zs(b.nativeEvent)?"virtual":b.pointerType},onMouseDown(b){let x=u.current,h=b.nativeEvent,C=e.select("open");if(b.button!==0||n==="click"||Ar(x,!0)&&s)return;let y=R(C,b.currentTarget,P=>P==="click"||P==="mousedown"),S=Je(h),w=Cs(S);if(w||x==="virtual"){g(y,h,w?S:b.currentTarget,x);return}let v=b.currentTarget;p.request(()=>{g(y,h,v,x)})},onClick(b){if(n==="mousedown-only")return;let x=u.current;if(n==="mousedown"&&x){u.current=void 0;return}if(Ar(x,!0)&&s)return;let h=e.select("open"),C=R(h,b.currentTarget,y=>y==="click"||y==="mousedown"||y==="keydown"||y==="keyup");g(C,b.nativeEvent,b.currentTarget,x)},onKeyDown(){u.current=void 0}}},[c,n,s,l,e,i,r,p,d,a]);return Id.useMemo(()=>o?{reference:m}:ot,[o,m])}var Sr=T(D(),1);function iX(e,t){let o=null,n=null,r=!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",a=t.axis==="y"||t.axis==="both",l=["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,d=s.y;return o==null&&t.x&&i&&(o=s.x-t.x),n==null&&t.y&&a&&(n=s.y-t.y),p-=o||0,d-=n||0,(!r||l)&&(p=i&&t.x!=null?t.x:p,d=a&&t.y!=null?t.y:d),r=!0,{width:c,height:u,x:p,y:d,top:d,right:p+c,bottom:d+u,left:p}}}}function iF(e){return e!=null&&e.clientX!=null}function kv(e,t={}){let{enabled:o=!0,axis:n="both"}=t,r=e.useState("open"),s=e.useState("floatingElement"),i=e.useState("domReferenceElement"),a=e.context.dataRef,l=Sr.useRef(!1),c=Sr.useRef(null),[u,p]=Sr.useState(),[d,m]=Sr.useState([]),g=q(C=>{e.set("positionReference",C)}),R=q((C,y,S)=>{l.current||a.current.openEvent&&!iF(a.current.openEvent)||e.set("positionReference",iX(S??i,{x:C,y,axis:n,dataRef:a,pointerType:u}))}),b=q(C=>{r?c.current||(R(C.clientX,C.clientY,C.currentTarget),m([])):R(C.clientX,C.clientY,C.currentTarget)}),x=Ar(u)?s:r;Sr.useEffect(()=>{if(!o){g(i);return}if(!x)return;function C(){c.current?.(),c.current=null}let y=rt(s);function S(w){let v=Je(w);Ne(s,v)?C():R(w.clientX,w.clientY)}return!a.current.openEvent||iF(a.current.openEvent)?c.current=qe(y,"mousemove",S):g(i),C},[x,o,s,a,i,e,R,g,d]),Sr.useEffect(()=>()=>{e.set("positionReference",null)},[e]),Sr.useEffect(()=>{o&&!s&&(l.current=!1)},[o,s]),Sr.useEffect(()=>{!o&&r&&(l.current=!0)},[o,r]);let h=Sr.useMemo(()=>{function C(y){p(y.pointerType)}return{onPointerDown:C,onPointerEnter:C,onMouseMove:b,onMouseEnter:b}},[b]);return Sr.useMemo(()=>o?{reference:h,trigger:h}:{},[o,h])}var Jn=T(D(),1);function aX(){return!1}function lX(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function Vn(e,t={}){let{enabled:o=!0,escapeKey:n=!0,outsidePress:r=!0,outsidePressEvent:s="sloppy",referencePress:i=aX,bubbles:a,externalTree:l}=t,c=e.useState("open"),u=e.useState("floatingElement"),{dataRef:p,events:d}=e.context,m=jo(l),g=q(typeof r=="function"?r:()=>!1),R=typeof r=="function"?g:r,b=R!==!1,x=q(()=>s),{escapeKey:h,outsidePress:C}=lX(a),y=Jn.useRef(!1),S=Jn.useRef(!1),w=Jn.useRef(!1),v=Jn.useRef(!1),P=Jn.useRef(!1),N=Jn.useRef(""),E=Jn.useRef(null),M=ct(),W=ct(),I=ct(),O=q(()=>{W.clear(),p.current.insideReactTree=!1}),F=q(H=>{let G=p.current.floatingContext?.nodeId;return(m?yr(m.nodesRef.current,G):[]).some(ee=>ee.context?.open&&!ee.context.dataRef.current[H])}),k=q(H=>Cg(H,e.select("floatingElement"))||Cg(H,e.select("domReferenceElement"))),U=q(H=>{i()&&e.setOpen(!1,Ce($.triggerPress,H.nativeEvent))}),_=q(H=>{if(!c||!o||!n||H.key!=="Escape")return;let G=IO(H)?H.nativeEvent:H;if(P.current||G.isComposing||!h&&F("__escapeKeyBubbles"))return;let oe=Ce($.escapeKey,G);e.setOpen(!1,oe),oe.isCanceled||H.preventDefault(),!h&&!oe.isPropagationAllowed&&H.stopPropagation()}),B=q(()=>{p.current.insideReactTree=!0,W.start(0,O)}),L=q(H=>{if(!c||!o||H.button!==0)return;let G=Je(H.nativeEvent);Ne(e.select("floatingElement"),G)&&(y.current||(y.current=!0,S.current=!1))}),V=q(H=>{!c||!o||(H.defaultPrevented||H.nativeEvent.defaultPrevented)&&y.current&&(S.current=!0)});Jn.useEffect(()=>{function H(G){G.open||(v.current=!1)}return d.on("openchange",H),()=>{d.off("openchange",H)}},[d]),Jn.useEffect(()=>O,[O]),Jn.useEffect(()=>{if(!c||!o)return c||(v.current=!1,P.current=!1,N.current="",E.current=null),O;p.current.__escapeKeyBubbles=h,p.current.__outsidePressBubbles=C;let H=new Do,G=Be(u);function oe(){I.clear(),P.current=!0}function ee(){P.current=!0,I.start(Rt.engine.webkit?5:0,()=>{P.current=!1})}function X(){w.current=!0,H.start(0,()=>{w.current=!1})}function te(){y.current=!1,S.current=!1}function ce(){let ie=N.current,re=ie==="pen"||!ie?"mouse":ie,Ee=x(),ye=typeof Ee=="function"?Ee():Ee;return typeof ye=="string"?ye:ye[re]}function le(ie){let re=ce();return re==="intentional"&&ie.type!=="click"||re==="sloppy"&&ie.type==="click"}function Q(ie){let re=p.current.floatingContext?.nodeId,Ee=m&&yr(m.nodesRef.current,re).some(ye=>Cg(ie,ye.context?.elements.floating));return k(ie)||Ee}function ne(ie){if(le(ie)){ie.type!=="click"&&!k(ie)&&(H.clear(),w.current=!1),O();return}if(p.current.insideReactTree){O();return}let re=Je(ie),Ee=`[${ni("inert")}]`,ye=lt(re)?re.getRootNode():null,se=Array.from((Nr(ye)?ye:Be(e.select("floatingElement"))).querySelectorAll(Ee)),Fe=e.context.triggerElements;if(re&&(Fe.hasElement(re)||Fe.hasMatchingElement(de=>Ne(de,re))))return;let ke=lt(re)?re:null;for(;ke&&!Yn(ke);){let de=bn(ke);if(Yn(de)||!lt(de))break;ke=de}if(!(se.length&&lt(re)&&!DO(re)&&!Ne(re,e.select("floatingElement"))&&se.every(de=>!Ne(ke,de)))){if(st(re)&&!("touches"in ie)){let de=Yn(re),Ie=Mo(re),Me=/auto|scroll/,We=de||Me.test(Ie.overflowX),Ue=de||Me.test(Ie.overflowY),ze=We&&re.clientWidth>0&&re.scrollWidth>re.clientWidth,He=Ue&&re.clientHeight>0&&re.scrollHeight>re.clientHeight,je=Ie.direction==="rtl",Qe=He&&(je?ie.offsetX<=re.offsetWidth-re.clientWidth:ie.offsetX>re.clientWidth),et=ze&&ie.offsetY>re.clientHeight;if(Qe||et)return}if(!Q(ie)){if(ce()==="intentional"){if(ie.detail!==0&&!qr(ie)&&!v.current)return;if(w.current){H.clear(),w.current=!1;return}}typeof R=="function"&&!R(ie)||F("__outsidePressBubbles")||(e.setOpen(!1,Ce($.outsidePress,ie)),O())}}}function Y(ie){ce()!=="sloppy"||ie.pointerType==="touch"||!e.select("open")||!o||k(ie)||ne(ie)}function ae(ie){if(ce()!=="sloppy"||!e.select("open")||!o||k(ie))return;let re=ie.touches[0];re&&(E.current={startTime:Date.now(),startX:re.clientX,startY:re.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},M.start(1e3,()=>{E.current&&(E.current.dismissOnTouchEnd=!1,E.current.dismissOnMouseDown=!1)}))}function Z(ie,re){let Ee=Je(ie);if(!Ee)return;let ye=qe(Ee,ie.type,()=>{re(ie),ye()})}function ue(ie){N.current="touch",Z(ie,ae)}function Te(ie){M.clear(),ie.type==="pointerdown"&&(ie.button===0&&(v.current=!0),N.current=ie.pointerType),!(ie.type==="mousedown"&&E.current&&!E.current.dismissOnMouseDown)&&Z(ie,re=>{re.type==="pointerdown"?Y(re):ne(re)})}function fe(ie){if(ie.type==="pointercancel"&&(v.current=!1),!y.current)return;let re=S.current;if(te(),ce()==="intentional"){if(ie.type==="pointercancel"){re&&X();return}if(!Q(ie)){if(re){X();return}typeof R=="function"&&!R(ie)||(H.clear(),w.current=!0,O())}}}function ve(ie){if(ce()!=="sloppy"||!E.current||k(ie))return;let re=ie.touches[0];if(!re)return;let Ee=Math.abs(re.clientX-E.current.startX),ye=Math.abs(re.clientY-E.current.startY),se=Math.sqrt(Ee*Ee+ye*ye);se>5&&(E.current.dismissOnTouchEnd=!0),se>10&&(ne(ie),M.clear(),E.current=null)}function z(ie){Z(ie,ve)}function Re(ie){ce()!=="sloppy"||!E.current||k(ie)||(E.current.dismissOnTouchEnd&&ne(ie),M.clear(),E.current=null)}function xe(ie){Z(ie,Re)}let Pe=Wo(n&&Wo(qe(G,"keydown",_),qe(G,"compositionstart",oe),qe(G,"compositionend",ee)),b&&Wo(qe(G,"click",Te,!0),qe(G,"pointerdown",Te,!0),qe(G,"pointerup",fe,!0),qe(G,"pointercancel",fe,!0),qe(G,"mousedown",Te,!0),qe(G,"mouseup",fe,!0),qe(G,"touchstart",ue,{capture:!0,passive:!0}),qe(G,"touchmove",z,{capture:!0,passive:!0}),qe(G,"touchend",xe,{capture:!0,passive:!0})));return()=>{Pe(),H.clear(),te(),w.current=!1}},[p,u,n,b,R,c,o,h,C,_,O,x,F,k,m,e,M,I]);let A=Jn.useMemo(()=>({onKeyDown:_,onPointerDown:U,onClick:U}),[_,U]),K=Jn.useMemo(()=>({onKeyDown:_,onPointerDown:V,onMouseDown:V,onClickCapture:B,onMouseDownCapture(H){B(),L(H)},onPointerDownCapture(H){B(),L(H)},onMouseUpCapture:B,onTouchEndCapture:B,onTouchMoveCapture:B}),[_,B,L,V]);return Jn.useMemo(()=>o?{reference:A,floating:K,trigger:A}:{},[o,A,K])}function kg(e,t,o,n){return{left:e,top:t,right:o,bottom:n,x:e,y:t,width:o-e,height:n-t}}function cX(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}}function lF(e){let t=[],o,n=Number.POSITIVE_INFINITY,r=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,i=Number.NEGATIVE_INFINITY;for(let a of Array.from(e).sort((l,c)=>l.top-c.top)){if(n=Math.min(n,a.left),r=Math.min(r,a.top),s=Math.max(s,a.right),i=Math.max(i,a.bottom),!o||a.top-o.top>o.height/2)t.push(cX(a));else{let l=t[t.length-1];l.left=Math.min(l.left,a.left),l.right=Math.max(l.right,a.right),l.bottom=Math.max(l.bottom,a.bottom),l.width=l.right-l.left,l.height=l.bottom-l.top}o=a}return{lines:t,fallback:kg(n,r,s,i)}}function cF(e,t,o){return e.findIndex(n=>t>n.left-2&&t<n.right+2&&o>n.top-2&&o<n.bottom+2)}function aF(e){return kg(e.left,e.top,e.right,e.bottom)}function uX(e,t,o){let{lines:n}=lF(e.getClientRects());if(n.length<2)return;let r=cF(n,t,o);return{x:t,y:o,lineIndex:r===-1?void 0:r,element:e}}function pX(e,t,o){let{lines:n,fallback:r}=lF(e.getClientRects());if(n.length<2)return null;let s=o?.x,i=o?.y,a=t[0];if(o?.lineIndex!=null&&n[o.lineIndex])return aF(n[o.lineIndex]);if(s!=null&&i!=null){let g=cF(n,s,i);if(g!==-1)return aF(n[g])}if(n.length===2&&n[0].left>n[1].right&&s!=null&&i!=null)return r;if(a==="t"||a==="b"){let g=n[0],R=n[n.length-1],b=a==="t"?g:R;return kg(b.left,g.top,b.right,R.bottom)}let l=a==="l",c=n[0].left,u=n[0].right,p=l?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY,d=n[0],m=n[0];for(let g of n){c=Math.min(c,g.left),u=Math.max(u,g.right);let R=l?g.left:g.right;l&&R<p||!l&&R>p?(p=R,d=g,m=g):R===p&&(m=g)}return kg(c,d.top,u,m.bottom)}function dX(e){return"contextElement"in e&&e.contextElement?e.contextElement:lt(e)?e:void 0}function uF(e,t){function o(r){Lv(e,r.currentTarget,r.clientX,r.clientY)}function n(r){t||o(r)}return{onFocus(){e.current=void 0},onMouseEnter:n,onMouseMove:n}}function Lv(e,t,o,n){let r=uX(t,o,n);return e.current=r,r}function pF(e){return{name:"inline",async fn(t){let o=t.elements.reference;if(typeof o?.getClientRects!="function")return{};let n=dX(o),r=e.current,s=r?.element===o||r?.element===n?r:void 0,i=pX(o,t.placement,s);if(!i||typeof t.platform.getElementRects!="function")return{};let a=await t.platform.getElementRects({reference:{contextElement:n,getBoundingClientRect(){return i}},floating:t.elements.floating,strategy:t.strategy});return t.rects.reference.x===a.reference.x&&t.rects.reference.y===a.reference.y&&t.rects.reference.width===a.reference.width&&t.rects.reference.height===a.reference.height?{}:{reset:{rects:a}}}}}var Jr=class{constructor(t,o,n=!0){it(this,"attachedStores",[]);it(this,"attachedStoreValue",null);it(this,"storeListeners",new Set);this.fallbackStore=t,this.componentName=o,this.throwOnMissingTrigger=n}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 n;if(t){for(let r=this.attachedStores.length-1;r>=0&&!n;r-=1)n=this.attachedStores[r].context.triggerElements.getById(t);n??(n=this.fallbackStore.context.triggerElements.getById(t))}if(t&&!n&&this.throwOnMissingTrigger)throw new Error(_e(99,this.componentName,t,this.componentName));o.setOpen(!0,Ce($.imperativeAction,void 0,n))}closePopup(){let t=this.attachedStore;t!==null&&t.setOpen(!1,Ce($.imperativeAction))}};var Hv=T(D(),1),fF=T(on(),1);function Md(e){let{popupStore:t,treatPopupAsFloatingElement:o=!1,floatingRootContext:n,floatingId:r,nested:s,onOpenChange:i}=e,a=t.useState("open"),l=t.useState("activeTriggerElement"),c=t.useState(o?"popupElement":"positionerElement"),u=i;return t.useSyncedValue("floatingId",r),J(()=>{let p={open:a,floatingId:r,referenceElement:l,floatingElement:c};lt(l)&&(p.domReferenceElement=l),n.state.positionReference===n.state.referenceElement&&(p.positionReference=l),n.update(p)},[a,r,l,c,n]),n.context.onOpenChange=u,n.context.nested=s,n}var Bv=T(D(),1);function Ya(e){let{open:t,ref:o,preventUnmountOnClose:n,setPreventUnmountOnClose:r,onUnmount:s,animateInitialOpen:i}=e,a=q(r),{mounted:l,setMounted:c,transitionStatus:u}=so(t,!1,!1,i),p=t?!1:n;J(()=>{t&&a(!1)},[t,a]);let d=Bv.useRef(l),m=Bv.useRef(!1),g=Fa(),R=()=>{d.current=!1,c(!1),s()};J(()=>{d.current=l,m.current&&(m.current=!1,!t&&l&&R())});let b=q(()=>{if(d.current){if(t){m.current=!0,g();return}R()}});return It({enabled:l&&!t&&!p,open:t,ref:o,onComplete(){t||b()}}),{mounted:l,transitionStatus:u,preventUnmountingOnClose:p,forceUnmount:b}}var Zn={tabIndex:-1,[gd]:""};function Lg(e){return t=>t==="touch"?e.current:!0}function qa(e,t=!1){let o=Kn(),n=On()!=null,r=gt(()=>e(o,n)).current;return Md({popupStore:r,treatPopupAsFloatingElement:t,floatingRootContext:r.state.floatingRootContext,floatingId:o,nested:n,onOpenChange:r.setOpen}),r}function ri({handle:e,store:t}){return J(()=>e.attachStore(t),[e,t]),null}function dF(e){let t=e.context.triggerElements.size;e.select("open")&&e.state.triggerCount!==t&&e.set("triggerCount",t)}function Dd(e,t){let o=Hv.useRef(null);return q(n=>{let r=o.current;if(r!==null){if(r.element===n&&r.store===t&&r.id===e)return;o.current=null;let s=r.store;s.context.triggerElements.getById(r.id)===r.element&&(s.context.triggerElements.delete(r.id),dF(s))}n!==null&&e!==void 0&&(o.current={store:t,id:e,element:n},t.context.triggerElements.add(e,n),dF(t))})}function tc(e,t,o,n=!1){let r=e.preventUnmountingOnClose;t?r=!1:n&&(r=!0);let s=o?.id??null,i=e.activeTriggerId,a=e.activeTriggerElement;return(s||t)&&(i=s,a=o??null),{open:t,preventUnmountingOnClose:r,activeTriggerId:i,activeTriggerElement:a,openedWithoutTrigger:t?o==null:e.openedWithoutTrigger}}function Es(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function Bg(e,t,o,n={}){let r=o.reason,s=r===$.triggerHover,i=t&&r===$.triggerFocus,a=!t&&(r===$.triggerPress||r===$.escapeKey),l=Es(o);if(e.context.onOpenChange?.(t,o),o.isCanceled)return;n.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,o);let c=()=>{let u=tc(e.state,t,o.trigger,l()),p={...n.extraState,...u};i?p.instantType="focus":a?p.instantType="dismiss":s&&(p.instantType=void 0),e.update(p)};s?fF.flushSync(c):c()}function si(e,t,o,n){let r=o.useState("isMountedByTrigger",e),s=Dd(e,o),i=q(l=>{let c=o.select("open"),u=o.select("activeTriggerId");if(u===e){let p={activeTriggerElement:l,...c?n:null};o.update(p);return}if(u==null&&c&&!o.state.openedWithoutTrigger){let p={activeTriggerId:e??null,activeTriggerElement:l,...n};o.update(p)}}),a=q(l=>{s(l),l&&i(l)});return J(()=>(a(t.current),()=>a(null)),[a,t,o,e]),J(()=>{if(r){let l={activeTriggerElement:t.current,...n};o.update(l)}},[r,o,t,...Object.values(n)]),{registerTrigger:a,isMountedByThisTrigger:r}}function ii(e,t={}){let{closeOnActiveTriggerUnmount:o=!1}=t,n=Hv.useRef(null),r=e.useState("open"),s=e.useState("triggerCount"),i=e.useState("activeTriggerId"),a=e.useState("activeTriggerElement");J(()=>{if(!r){n.current=null,e.state.triggerCount!==0&&e.set("triggerCount",0),e.state.openedWithoutTrigger&&e.set("openedWithoutTrigger",!1);return}let l=e.context.triggerElements.size,c={};e.state.triggerCount!==l&&(c.triggerCount=l);let u=e.select("activeTriggerId"),p=null;if(u){let d=e.context.triggerElements.getById(u);if(d)n.current=u,d!==e.state.activeTriggerElement&&(c.activeTriggerElement=d);else{for(let[m,g]of e.context.triggerElements.entries())if(g===e.state.activeTriggerElement){c.activeTriggerId=m,c.activeTriggerElement=g,n.current=m;break}c.activeTriggerId===void 0&&(n.current===u?p=u:n.current=null)}}else n.current=null;if(!p&&!u&&!e.state.openedWithoutTrigger&&l===1){let d=e.context.triggerElements.entries().next();if(!d.done){let[m,g]=d.value;c.activeTriggerId=m,c.activeTriggerElement=g,n.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 d=Ce($.none);e.setOpen(!1,d),d.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[r,e,s,i,a,o])}function ai(e,t,o,n){let{mounted:r,transitionStatus:s,forceUnmount:i}=Ya({open:e,ref:t.context.popupRef,preventUnmountOnClose:t.useState("preventUnmountingOnClose"),setPreventUnmountOnClose:a=>t.set("preventUnmountingOnClose",a),animateInitialOpen:n,onUnmount(){t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),o?.(),t.context.onOpenChangeComplete?.(!1)}});return gt(()=>(t.set("mounted",r),null)),t.useSyncedValues({mounted:r,transitionStatus:s}),{forceUnmount:i,transitionStatus:s}}function li(e,t){e.useSyncedValues(t),J(()=>()=>{e.update({activeTriggerProps:ot,inactiveTriggerProps:ot,popupProps:ot})},[e])}function Hg(e,t){J(()=>{!t&&e.state.openMethod!==null&&e.set("openMethod",null)},[t,e]),J(()=>()=>{e.state.openMethod!==null&&e.set("openMethod",null)},[e])}var qo=class{constructor(){it(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 vF=T(D(),1),zv=T(Nd(),1),wF=T(Uv(),1);var CF=T(D(),1);var Wv=[],jv;function yF(){return jv}function SF(e){Wv.push(e)}function Ts(e){let t=(o,n)=>{let r=gt(DX).current,s;try{jv=r;for(let i of Wv)i.before(r);s=e(o,n);for(let i of Wv)i.after(r);r.didInitialize=!0}finally{jv=void 0}return s};return t.displayName=e.displayName||e.name,t}function ci(e){return CF.forwardRef(Ts(e))}function DX(){return{didInitialize:!1}}var NX=Na(19),AX=NX?FX:_X;function ui(e,t,o,n,r){return AX(e,t,o,n,r)}function OX(e,t,o,n,r){let s=vF.useCallback(()=>t(e.getSnapshot(),o,n,r),[e,t,o,n,r]);return(0,zv.useSyncExternalStore)(e.subscribe,s,s)}SF({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 n=e.syncHooks[o],r=n.selector(n.store.state,n.a1,n.a2,n.a3);Object.is(n.value,r)||(t=!0,n.value=r)}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 r of e.syncHooks)o.add(r.store);let n=[];for(let r of o)n.push(r.subscribe(t));return()=>{for(let r of n)r()}}),(0,zv.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function FX(e,t,o,n,r){let s=yF();if(!s)return OX(e,t,o,n,r);let i=s.syncIndex;s.syncIndex+=1;let a;return s.didInitialize?(a=s.syncHooks[i],(a.store!==e||a.selector!==t||!Object.is(a.a1,o)||!Object.is(a.a2,n)||!Object.is(a.a3,r))&&(a.store!==e&&(s.didChangeStore=!0),a.store=e,a.selector=t,a.a1=o,a.a2=n,a.a3=r,a.value=t(e.getSnapshot(),o,n,r))):(a={store:e,selector:t,a1:o,a2:n,a3:r,value:t(e.getSnapshot(),o,n,r)},s.syncHooks.push(a)),a.value}function _X(e,t,o,n,r){return(0,wF.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,s=>t(s,o,n,r))}var Ug=class{constructor(t){it(this,"subscribe",t=>(this.listeners.add(t),()=>{this.listeners.delete(t)}));it(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 n of this.listeners){if(o!==this.updateTick)return;n(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,n,r){return ui(this,t,o,n,r)}};var oc=T(D(),1);var No=class extends Ug{constructor(t,o={},n){super(t),this.context=o,this.selectors=n}useSyncedValue(t,o){oc.useDebugValue(t);let n=this;J(()=>{n.state[t]!==o&&n.set(t,o)},[n,t,o])}useSyncedValueWithCleanup(t,o){let n=this;J(()=>(n.state[t]!==o&&n.set(t,o),()=>{n.set(t,void 0)}),[n,t,o])}useSyncedValues(t){let o=this,n=Object.values(t);J(()=>{o.update(t)},[o,...n])}useControlledProp(t,o){oc.useDebugValue(t);let n=this,r=o!==void 0;J(()=>{r&&!Object.is(n.state[t],o)&&n.setState({...n.state,[t]:o})},[n,t,o,r])}select(t,o,n,r){let s=this.selectors[t];return s(this.state,o,n,r)}useState(t,o,n,r){return oc.useDebugValue(t),ui(this,this.selectors[t],o,n,r)}useContextCallback(t,o){oc.useDebugValue(t);let n=q(o??nt);this.context[t]=n}useStateSetter(t){let o=oc.useRef(void 0);return o.current===void 0&&(o.current=n=>{this.set(t,n)}),o.current}observe(t,o){let n;typeof t=="function"?n=t:n=this.selectors[t];let r=n(this.state);return o(r,r,this),this.subscribe(s=>{let i=n(s);if(!Object.is(r,i)){let a=r;r=i,o(i,a,this)}})}};var VX={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},Xa=class extends No{constructor(o){let{syncOnly:n,nested:r,onOpenChange:s,triggerElements:i,...a}=o;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:s,dataRef:{current:{}},events:Vg(),nested:r,triggerElements:i},VX);it(this,"syncOpenEvent",(o,n)=>{(!o||!this.state.open||n!=null&&MO(n))&&(this.context.dataRef.current.openEvent=o?n:void 0)});it(this,"dispatchOpenChange",(o,n)=>{this.syncOpenEvent(o,n.event);let r={open:o,reason:n.reason,nativeEvent:n.event,nested:this.context.nested,triggerElement:n.trigger};this.context.events.emit("openchange",r)});it(this,"setOpen",(o,n)=>{if(this.syncOnly){this.context.onOpenChange?.(o,n);return}this.dispatchOpenChange(o,n),this.context.onOpenChange?.(o,n)});this.syncOnly=n}};function pi(e,t,o=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new Xa({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:ot,inactiveTriggerProps:ot,popupProps:ot}}var Ad=e=>e.triggerIdProp??e.activeTriggerId,Wg=e=>e.openProp??e.open,PF=e=>(e.popupElement?.id??e.floatingId)||void 0;function EF(e,t){return t!==void 0&&Wg(e)&&Ad(e)===t}function kX(e,t){return EF(e,t)?!0:t!==void 0&&Wg(e)&&Ad(e)==null&&!e.openedWithoutTrigger&&e.triggerCount===1}var cr={open:Wg,mounted:e=>e.mounted,transitionStatus:e=>Wg(e)&&!e.mounted?"starting":e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:Ad,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:PF,isTriggerActive:(e,t)=>t!==void 0&&Ad(e)===t,isOpenedByTrigger:(e,t)=>EF(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&Ad(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>kX(e,t)?PF(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};var $v=T(D(),1),TF=T(Nd(),1);function di(e){let t=$v.useCallback(n=>e===void 0?nt:e.subscribeStore(n),[e]),o=$v.useCallback(()=>e===void 0?void 0:e.store,[e]);return(0,TF.useSyncExternalStore)(t,o,()=>e?.serverStore)}function Is(e){let{open:t=!1,onOpenChange:o,elements:n={}}=e,r=Kn(),s=On()!=null,i=gt(()=>new Xa({open:t,transitionStatus:void 0,onOpenChange:o,referenceElement:n.reference??null,floatingElement:n.floating??null,triggerElements:new qo,floatingId:r,syncOnly:!1,nested:s})).current;return J(()=>{let a={open:t,floatingId:r};n.reference!==void 0&&(a.referenceElement=n.reference,a.domReferenceElement=lt(n.reference)?n.reference:null),n.floating!==void 0&&(a.floatingElement=n.floating),i.update(a)},[t,r,n.reference,n.floating,i]),i.context.onOpenChange=o,i.context.nested=s,i}var fi=T(D(),1);var Kv=Rt.os.mac&&Rt.engine.webkit;function nc(e,t={}){let{enabled:o=!0,delay:n}=t,{events:r,dataRef:s}=e.context,i=fi.useRef(!1),a=fi.useRef(null),l=fi.useRef(!0),c=ct();fi.useEffect(()=>{let p=e.select("domReferenceElement");if(!o)return;let d=rt(p);function m(){let b=e.select("domReferenceElement");!e.select("open")&&st(b)&&b===ft(Be(b))&&(i.current=!0,a.current=b)}function g(){l.current=!0}function R(){l.current=!1}return Wo(qe(d,"blur",m),Kv&&qe(d,"keydown",g,!0),Kv&&qe(d,"pointerdown",R,!0))},[e,o]),fi.useEffect(()=>{if(!o)return;function p(d){if(d.reason===$.triggerPress||d.reason===$.escapeKey){let m=e.select("domReferenceElement");lt(m)&&(a.current=m,i.current=!0)}}return r.on("openchange",p),()=>{r.off("openchange",p)}},[r,o,e]);let u=fi.useMemo(()=>{function p(){i.current=!1,a.current=null}return{onMouseLeave(){p()},onFocus(d){let m=d.currentTarget;if(i.current){if(a.current===m)return;p()}let g=Je(d.nativeEvent);if(lt(g)){if(Kv&&!d.relatedTarget){if(!l.current&&!Cs(g))return}else if(!Qs(g))return}let R=Ba(d.relatedTarget,e.context.triggerElements),{nativeEvent:b,currentTarget:x}=d;if(e.select("open")&&R||!n){e.setOpen(!0,Ce($.triggerFocus,b,x));return}c.start(n,()=>{i.current||e.setOpen(!0,Ce($.triggerFocus,b,x))})},onBlur(d){p();let m=d.relatedTarget,g=d.nativeEvent,R=lt(m)&&m.hasAttribute(ni("focus-guard"))&&m.getAttribute("data-type")==="outside";c.start(0,()=>{let b=e.select("domReferenceElement"),x=ft(Be(b));!m&&x===b||Ne(s.current.floatingContext?.refs.floating.current,x)||Ne(b,x)||R||Ba(m??x,e.context.triggerElements)||e.setOpen(!1,Ce($.triggerFocus,g))})}}},[s,n,e,c]);return fi.useMemo(()=>o?{reference:u,trigger:u}:{},[o,u])}var qv=T(D(),1);var Yv=class e{constructor(){it(this,"pointerType");it(this,"interactedInside",!1);it(this,"handler");it(this,"blockMouseMove",!0);it(this,"performedPointerEventsMutation",!1);it(this,"pointerEventsScopeElement",null);it(this,"pointerEventsReferenceElement",null);it(this,"pointerEventsFloatingElement",null);it(this,"restTimeoutPending",!1);it(this,"openChangeTimeout",new Do);it(this,"restTimeout",new Do);it(this,"handleCloseOptions");it(this,"dispose",()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()});it(this,"disposeEffect",()=>this.dispose)}static create(){return new e}},jg=new WeakMap;function mi(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&jg.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),jg.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function fu(e,t){let{scopeElement:o,referenceElement:n,floatingElement:r}=t,s=jg.get(o);s&&s!==e&&mi(s),mi(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=o,e.pointerEventsReferenceElement=n,e.pointerEventsFloatingElement=r,jg.set(o,e),o.style.pointerEvents="none",n.style.pointerEvents="auto",r.style.pointerEvents="auto"}function Ja(e){let t=e.context.dataRef.current,o=gt(()=>t.hoverInteractionState??Yv.create()).current;return t.hoverInteractionState||(t.hoverInteractionState=o),Xs(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function Ms(e,t={}){let{enabled:o=!0,closeDelay:n=0,nodeId:r}=t,s=e.useState("open"),i=e.useState("floatingElement"),a=e.useState("domReferenceElement"),{dataRef:l}=e.context,c=jo(),u=On(),p=Ja(e),d=ct(),m=q(()=>yg(l.current.openEvent?.type,p.interactedInside)),g=q(()=>NO(l.current.openEvent?.type)),R=q(()=>{mi(p)});J(()=>{s||(p.pointerType=void 0,p.restTimeoutPending=!1,p.interactedInside=!1,R())},[s,p,R]),qv.useEffect(()=>R,[R]),J(()=>{if(o&&s&&p.handleCloseOptions?.blockPointerEvents&&g()&&lt(a)&&i){let b=a,x=i,h=Be(i),C=c?.nodesRef.current.find(v=>v.id===u)?.context?.elements.floating;C&&(C.style.pointerEvents="");let y=p.pointerEventsScopeElement!==x?p.pointerEventsScopeElement:null,S=C!==x?C:null,w=p.handleCloseOptions?.getScope?.()??y??S??Xt(b,"[data-rootownerid]")??h.body;return fu(p,{scopeElement:w,referenceElement:b,floatingElement:x}),()=>{R()}}},[o,s,a,i,p,g,c,u,R]),qv.useEffect(()=>{if(!o)return;function b(){return!!(c&&u&&yr(c.nodesRef.current,u).length>0)}function x(v){let P=ys(n,"close",p.pointerType),N=()=>{e.setOpen(!1,Ce($.triggerHover,v)),c?.events.emit("floating.closed",v)};P?p.openChangeTimeout.start(P,N):(p.openChangeTimeout.clear(),N())}function h(v){let P=Je(v);if(!Zl(P)){p.interactedInside=!1;return}p.interactedInside=Xt(P,"[aria-haspopup]")!=null}function C(){p.openChangeTimeout.clear(),d.clear(),c?.events.off("floating.closed",S),R()}function y(v){if(b()&&c){c.events.on("floating.closed",S);return}if(Ba(v.relatedTarget,e.context.triggerElements))return;let P=l.current.floatingContext?.nodeId??r,N=v.relatedTarget;if(!(c&&P&&lt(N)&&yr(c.nodesRef.current,P,!1).some(M=>Ne(M.context?.elements.floating,N)))){if(p.handler){p.handler(v);return}R(),g()&&!m()&&x(v)}}function S(v){!c||!u||b()||d.start(0,()=>{c.events.off("floating.closed",S),e.setOpen(!1,Ce($.triggerHover,v)),c.events.emit("floating.closed",v)})}let w=i;return Wo(w&&qe(w,"mouseenter",C),w&&qe(w,"mouseleave",y),w&&qe(w,"pointerdown",h,!0),()=>{c?.events.off("floating.closed",S)})},[o,i,e,l,n,r,g,m,R,p,c,u,d])}var Za=T(D(),1),IF=T(on(),1);var LX={current:null};function Hr(e,t={}){let{enabled:o=!0,delay:n=0,handleClose:r=null,mouseOnly:s=!1,restMs:i=0,move:a=!0,triggerElementRef:l=LX,externalTree:c,isActiveTrigger:u=!0,getHandleCloseContext:p,isClosing:d,shouldOpen:m,guardStaleOpen:g=!1}=t,{dataRef:R,events:b}=e.context,x=jo(c),h=Ja(e),C=Za.useRef(!1),y=Tt(r),S=Tt(n),w=Tt(i),v=Tt(o),P=Tt(m),N=Tt(d),E=q(()=>yg(R.current.openEvent?.type,h.interactedInside)),M=q(()=>P.current?.()!==!1),W=q((F,k,U)=>{let _=e.context.triggerElements;if(_.hasElement(k))return!F||!Ne(F,k);if(!lt(U))return!1;let B=U;return _.hasMatchingElement(L=>Ne(L,B))&&(!F||!Ne(F,B))}),I=q(()=>{if(!h.handler)return;Be(e.select("domReferenceElement")).removeEventListener("mousemove",h.handler),h.handler=void 0}),O=q(()=>{mi(h)});return u&&(h.handleCloseOptions=r?.__options),Za.useEffect(()=>I,[I]),Za.useEffect(()=>{if(!o)return;function F(k){k.open?C.current=!1:(C.current=k.reason===$.triggerHover,I(),h.openChangeTimeout.clear(),h.restTimeout.clear(),h.blockMouseMove=!0,h.restTimeoutPending=!1)}return b.on("openchange",F),()=>{b.off("openchange",F)}},[o,b,h,I]),Za.useEffect(()=>{if(!o)return;function F(V,A=!0){let K=ys(S.current,"close",h.pointerType);K?h.openChangeTimeout.start(K,()=>{e.setOpen(!1,Ce($.triggerHover,V)),x?.events.emit("floating.closed",V)}):A&&(h.openChangeTimeout.clear(),e.setOpen(!1,Ce($.triggerHover,V)),x?.events.emit("floating.closed",V))}let k=l.current??(u?e.select("domReferenceElement"):null);if(!lt(k))return;function U(V){if(h.openChangeTimeout.clear(),h.blockMouseMove=!1,s&&!Ar(h.pointerType))return;let A=vv(w.current),K=ys(S.current,"open",h.pointerType),H=Je(V),G=V.currentTarget??null,oe=e.select("domReferenceElement"),ee=G;if(lt(H)&&!e.context.triggerElements.hasElement(H)){for(let Z of e.context.triggerElements.elements())if(Ne(Z,H)){ee=Z;break}}lt(G)&&lt(oe)&&!e.context.triggerElements.hasElement(G)&&Ne(G,oe)&&(ee=oe);let X=ee==null?!1:W(oe,ee,H),te=e.select("open"),ce=N.current?.()??e.select("transitionStatus")==="ending",le=!te&&ce&&C.current,Q=!X&&lt(ee)&&lt(oe)&&Ne(oe,ee)&&le,ne=A>0&&!K,Y=X&&(te||le)||Q,ae=!te||X;if(Y){M()&&e.setOpen(!0,Ce($.triggerHover,V,ee));return}ne||(K?h.openChangeTimeout.start(K,()=>{ae&&M()&&e.setOpen(!0,Ce($.triggerHover,V,ee))}):ae&&M()&&e.setOpen(!0,Ce($.triggerHover,V,ee)))}function _(V){if(E()){O();return}I();let A=e.select("domReferenceElement"),K=Be(A);h.restTimeout.clear(),h.restTimeoutPending=!1;let H=R.current.floatingContext??p?.();if(Ba(V.relatedTarget,e.context.triggerElements))return;if(y.current&&H){e.select("open")||h.openChangeTimeout.clear();let oe=l.current;h.handler=y.current({...H,tree:x,x:V.clientX,y:V.clientY,onClose(){O(),I(),v.current&&!E()&&oe===e.select("domReferenceElement")&&F(V,!0)}}),K.addEventListener("mousemove",h.handler),h.handler(V);return}(h.pointerType==="touch"?!Ne(e.select("floatingElement"),V.relatedTarget):!0)&&F(V)}function B(V){Ne(k,V.relatedTarget)||(h.openChangeTimeout.clear(),h.restTimeout.clear(),h.restTimeoutPending=!1)}let L=g?qe(k,"mouseout",B):void 0;return a?Wo(qe(k,"mousemove",U,{once:!0}),qe(k,"mouseenter",U),qe(k,"mouseleave",_),L):Wo(qe(k,"mouseenter",U),qe(k,"mouseleave",_),L)},[I,O,R,S,e,o,y,h,u,W,E,s,a,w,l,x,v,p,N,M,g]),Za.useMemo(()=>{if(!o)return;function F(k){h.pointerType=k.pointerType}return{onPointerDown:F,onPointerEnter:F,onMouseMove(k){let{nativeEvent:U}=k,_=k.currentTarget,B=e.select("domReferenceElement"),L=e.select("open"),V=W(B,_,k.target);if(s&&!Ar(h.pointerType))return;if(L&&V&&h.handleCloseOptions?.blockPointerEvents){let H=e.select("floatingElement");if(H){let G=h.handleCloseOptions?.getScope?.()??_.ownerDocument.body;fu(h,{scopeElement:G,referenceElement:_,floatingElement:H})}}let A=vv(w.current);if(L&&!V||A===0||!V&&h.restTimeoutPending&&k.movementX**2+k.movementY**2<2)return;h.restTimeout.clear();function K(){if(h.restTimeoutPending=!1,E())return;let H=e.select("open");!h.blockMouseMove&&(!H||V)&&M()&&e.setOpen(!0,Ce($.triggerHover,U,_))}h.pointerType==="touch"?IF.flushSync(()=>{K()}):V&&L?K():(h.restTimeoutPending=!0,h.restTimeout.start(A,K))}}},[o,h,E,W,s,e,w,M])}var kn=T(D(),1);function MF(e){return Rt.engine.webkit&&e.movementX===0&&e.movementY===0}function zg(e,t,o){switch(e){case"vertical":return t;case"horizontal":return o;default:return t||o}}function Zr(e,t){return zg(t,e===bd||e===lu,e===Ji||e===Zi)}function Od(e,t,o){return zg(t,e===lu,o?e===Ji:e===Zi)||e==="Enter"||e===" "||e===""}function Fd(e,t,o){return zg(t,o?e===Ji:e===Zi,e===lu)}function Qa(e,t,o,n){let r=o?e===Zi:e===Ji,s=e===bd;return t==="both"||t==="horizontal"&&n?e==="Escape":zg(t,r,s)}function rc(e,t){let{listRef:o,activeIndex:n,onNavigate:r=()=>{},enabled:s=!0,selectedIndex:i=null,allowEscape:a=!1,loopFocus:l=!1,nested:c=!1,rtl:u=!1,virtual:p=!1,focusItemOnOpen:d="auto",focusItemOnHover:m=!0,openOnArrowKeyDown:g=!0,disabledIndices:R=void 0,orientation:b="vertical",triggerOrientation:x=b,parentOrientation:h,id:C,resetOnPointerLeave:y=!0,externalTree:S,nestedReturnFocusRef:w,grid:v}=t,P=v!=null,N=e.useState("open"),E=e.useState("floatingElement"),M=e.useState("domReferenceElement"),W=e.context.dataRef,I=Ql(E),O=hd(M),F=Tt(I),k=On(),U=jo(S),_=kn.useRef(d),B=kn.useRef(i??-1),L=kn.useRef(null),V=kn.useRef(!0),A=q(ie=>{r(B.current===-1?null:B.current,ie)}),K=kn.useRef(!!E),H=kn.useRef(N),G=kn.useRef(!1),oe=kn.useRef(!1),ee=kn.useRef(null),X=Tt(R),te=Tt(N),ce=Tt(i),le=Tt(y),Q=vo(),ne=vo(),Y=q(()=>{Q.cancel();function ie(se){p||(ee.current=uu(se,{sync:G.current,preventScroll:!0}))}let re=o.current[B.current],Ee=oe.current;re&&ie(re),(G.current?se=>se():se=>Q.request(se))(()=>{let se=o.current[B.current]||re;if(!se)return;re||ie(se),ve&&(Ee||!V.current)&&se.scrollIntoView?.({block:"nearest",inline:"nearest"})})});J(()=>{W.current.orientation=b},[W,b]),J(()=>{N||(L.current=null),(!N||d!=="auto")&&(_.current=d)},[N,d]),J(()=>{s&&(N&&E?(B.current=i??-1,_.current&&i!=null&&(oe.current=!0,A())):K.current&&(B.current=-1,A()))},[s,N,E,i,A]),J(()=>{if(s){if(!N){G.current=!1;return}if(E)if(n==null){if(G.current=!1,ce.current!=null)return;if(K.current&&(B.current=-1,Y()),(!H.current||!K.current)&&_.current&&(L.current!=null||_.current===!0&&L.current==null)){let ie=0,re=()=>{o.current[0]==null?(ie<2&&(ie?ye=>ne.request(ye):queueMicrotask)(re),ie+=1):(B.current=L.current==null||Od(L.current,x,u)||c?ws(o):oi(o),L.current=null,A())};re()}}else _r(o.current,n)||(B.current=n,Y(),oe.current=!1)}},[s,N,E,n,ce,c,o,x,u,A,Y,ne]),J(()=>{if(!s||E||!U||p||!K.current)return;let ie=U.nodesRef.current,re=ie.find(se=>se.id===k)?.context?.elements.floating,Ee=ft(Be(M??re??null)),ye=ie.some(se=>se.context&&Ne(se.context.elements.floating,Ee));re&&!ye&&V.current&&re.focus({preventScroll:!0})},[s,E,M,U,k,p]),J(()=>{H.current=N,K.current=!!E});let ae=n!=null,Z=q(ie=>{if(!te.current)return;let re=o.current.indexOf(ie.currentTarget);re!==-1&&(B.current!==re||n!==re)&&(B.current=re,A(ie))}),ue=q(()=>h??U?.nodesRef.current.find(ie=>ie.id===k)?.context?.dataRef?.current.orientation),Te=q(()=>ws(o,X.current)),fe=q(ie=>{if(V.current=!1,G.current=!0,ie.which===229||!te.current&&ie.currentTarget===F.current)return;if(c&&Qa(ie.key,b,u,P)){Zr(ie.key,ue())||St(ie),e.setOpen(!1,Ce($.listNavigation,ie.nativeEvent));let se=w?.current??M;st(se)&&se.focus();return}n!=null&&n!==B.current&&!_r(o.current,n)&&(B.current=n);let re=B.current,Ee=ws(o,R),ye=oi(o,R);if(O||(ie.key==="Home"&&(St(ie),B.current=Ee,A(ie)),ie.key==="End"&&(St(ie),B.current=ye,A(ie))),v!=null){let se=v(ie,B.current,o,b,l,u,R,Ee,ye);if(se!=null&&se!==B.current&&(B.current=se,A(ie)),b==="both")return}if(Zr(ie.key,b)){St(ie);let se=ft(ie.currentTarget.ownerDocument);if(N&&!p&&Ne(ie.currentTarget,se)&&!o.current.some(de=>de!=null&&Ne(de,se))){B.current=Od(ie.key,b,u)?Ee:ye,A(ie),n===B.current&&Y();return}let{index:Fe,wrapped:ke}=Ig(o.current,re,{decrement:!Od(ie.key,b,u),loopFocus:l,allowEscape:a,disabledIndices:R,minIndex:Ee,maxIndex:ye});ke&&(G.current=!1),B.current=Fe,A(ie)}}),ve=kn.useMemo(()=>({onFocus(re){G.current=!0,Z(re)},onClick({currentTarget:re}){p||re.focus({preventScroll:!0})},onMouseMove(re){MF(re)||(G.current=!0,oe.current=!1,m&&Z(re))},onPointerLeave(re){if(!te.current||!V.current||re.pointerType==="touch")return;G.current=!0;let Ee=re.relatedTarget;if(!(!m||o.current.includes(Ee))&&le.current&&(ee.current?.(),ee.current=null,B.current=-1,A(re),!p)){let ye=F.current,se=ft(Be(ye));ye&&Ne(ye,se)&&ye.focus({preventScroll:!0})}}}),[Z,te,F,m,o,A,le,p]),z=kn.useMemo(()=>p&&N&&ae&&{"aria-activedescendant":`${C}-${n}`},[p,N,ae,C,n]),Re=kn.useMemo(()=>({...O?{}:z,onKeyDown(ie){if(ie.key==="Tab"&&ie.shiftKey&&N&&!p){let re=Je(ie.nativeEvent);if(re&&!Ne(F.current,re))return;St(ie);let Ee=Ce($.focusOut,ie.nativeEvent);e.setOpen(!1,Ee);let ye=w?.current??M;!Ee.isCanceled&&st(ye)&&ye.focus();return}fe(ie)},onPointerMove(ie){MF(ie)||(V.current=!0)}}),[z,fe,F,O,e,N,p,M,w]),xe=kn.useMemo(()=>{function ie(ye){e.setOpen(!0,Ce($.listNavigation,ye.nativeEvent,ye.currentTarget))}function re(ye){d==="auto"&&qr(ye.nativeEvent)&&(_.current=!p)}function Ee(ye){_.current=d,d==="auto"&&Zs(ye.nativeEvent)&&(_.current=!0)}return{onKeyDown(ye){let se=e.select("open");V.current=!1;let Fe=ye.key.startsWith("Arrow"),ke=Fd(ye.key,ue(),u),de=Zr(ye.key,se?b:x),Ie=(c?ke:de)||ye.key==="Enter"||ye.key.trim()==="";if(p&&se&&(!c||Cs(ye.currentTarget)))return fe(ye);if(!(!se&&!g&&Fe)){if(Ie){let Me=Zr(ye.key,ue());L.current=c&&Me?null:ye.key}if(c){ke&&(St(ye),se?(B.current=Te(),A(ye),p&&F.current?.focus()):ie(ye));return}de&&(ce.current!=null&&(B.current=ce.current),St(ye),!se&&g?ie(ye):fe(ye),se&&A(ye))}},onFocus(ye){ye.target===ye.currentTarget&&e.select("open")&&!p&&(B.current=-1,A(ye))},onPointerDown:Ee,onPointerEnter:Ee,onMouseDown:re,onClick:re}},[fe,d,Te,c,A,e,g,b,x,ue,u,ce,p,F]),Pe=kn.useMemo(()=>({...z,...xe}),[z,xe]);return kn.useMemo(()=>s?{reference:Pe,floating:Re,item:ve,trigger:xe}:{},[s,Pe,Re,xe,ve])}var sc=T(D(),1);function ic(e,t){let{listRef:o,elementsRef:n,activeIndex:r,onMatch:s,disabledIndices:i,onTyping:a,enabled:l=!0,resetMs:c=750,selectedIndex:u=null}=t,p=q(a),d=e.useState("open"),m=ct(),g=sc.useRef(""),R=sc.useRef(u??r??-1),b=sc.useRef(null),x=q(y=>{function S(O){return n?.current[O]}function w(O){let F=S(O);return F&&!ec(F)||F?.matches(":disabled")?!1:i==null||!vs(Et,O,i)}function v(O,F,k=0){if(O.length===0)return-1;let U=(k%O.length+O.length)%O.length,_=F.toLowerCase();for(let B=0;B<O.length;B+=1){let L=(U+B)%O.length;if(!(!O[L]?.toLowerCase().startsWith(_)||!w(L)))return L}return-1}let P=o.current;if(g.current.length>0&&y.key===" "&&(St(y),p?.(!0)),g.current.length>0&&g.current[0]!==" "&&v(P,g.current)===-1&&y.key!==" "&&p?.(!1),P==null||y.key.length!==1||y.ctrlKey||y.metaKey||y.altKey)return;d&&y.key!==" "&&(St(y),p?.(!0));let N=g.current==="";N&&(R.current=u??r??-1),P.every((O,F)=>O&&w(F)?O[0]?.toLowerCase()!==O[1]?.toLowerCase():!0)&&g.current===y.key&&(g.current="",R.current=b.current),g.current+=y.key,m.start(c,()=>{g.current="",R.current=b.current,p?.(!1)});let W=((N?u??r??-1:R.current)??0)+1,I=v(P,g.current,W);I!==-1?(s?.(I,y),b.current=I):y.key!==" "&&(g.current="",p?.(!1))}),h=q(y=>{let S=y.relatedTarget,w=e.select("domReferenceElement"),v=e.select("floatingElement");Ne(w,S)||Ne(v,S)||(m.clear(),g.current="",R.current=b.current,p?.(!1))});J(()=>{!d&&u!==null||(m.clear(),b.current=null,g.current!==""&&(g.current="",p?.(!1)))},[d,u,m,p]);let C=sc.useMemo(()=>({onKeyDown:x,onBlur:h}),[x,h]);return sc.useMemo(()=>l?{reference:C,floating:C}:{},[l,C])}var DF=.1,BX=DF*DF,io=.5;function $g(e,t,o,n,r,s){return n>=t!=s>=t&&e<=(r-o)*(t-n)/(s-n)+o}function Kg(e,t,o,n,r,s,i,a,l,c){let u=!1;return $g(e,t,o,n,r,s)&&(u=!u),$g(e,t,r,s,i,a)&&(u=!u),$g(e,t,i,a,l,c)&&(u=!u),$g(e,t,l,c,o,n)&&(u=!u),u}function HX(e,t,o){return e>=o.x&&e<=o.x+o.width&&t>=o.y&&t<=o.y+o.height}function Yg(e,t,o,n,r,s){let i=Math.min(o,r),a=Math.max(o,r),l=Math.min(n,s),c=Math.max(n,s);return e>=i&&e<=a&&t>=l&&t<=c}function Gr(e={}){let{blockPointerEvents:t=!1}=e,o=new Do,n=({x:r,y:s,placement:i,elements:a,onClose:l,nodeId:c,tree:u})=>{let p=i?.split("-")[0],d=!1,m=null,g=null,R=typeof performance<"u"?performance.now():0;function b(h,C){let y=performance.now(),S=y-R;if(m===null||g===null||S===0)return m=h,g=C,R=y,!1;let w=h-m,v=C-g,P=w*w+v*v,N=S*S*BX;return m=h,g=C,R=y,P<N}function x(){o.clear(),l()}return function(C){o.clear();let y=a.domReference,S=a.floating;if(!y||!S||p==null||r==null||s==null)return;let{clientX:w,clientY:v}=C,P=Je(C),N=C.type==="mouseleave",E=Ne(S,P),M=Ne(y,P);if(E&&(d=!0,!N))return;if(M&&(d=!1,!N)){d=!0;return}if(N&&lt(C.relatedTarget)&&Ne(S,C.relatedTarget))return;function W(){return!!(u&&yr(u.nodesRef.current,c).length>0)}function I(){W()||x()}if(W())return;let O=y.getBoundingClientRect(),F=S.getBoundingClientRect(),k=r>F.right-F.width/2,U=s>F.bottom-F.height/2,_=F.width>O.width,B=F.height>O.height,L=(_?O:F).left,V=(_?O:F).right,A=(B?O:F).top,K=(B?O:F).bottom;if(p==="top"&&s>=O.bottom-1||p==="bottom"&&s<=O.top+1||p==="left"&&r>=O.right-1||p==="right"&&r<=O.left+1){I();return}let H=!1;switch(p){case"top":H=Yg(w,v,L,O.top+1,V,F.bottom-1);break;case"bottom":H=Yg(w,v,L,F.top+1,V,O.bottom-1);break;case"left":H=Yg(w,v,F.right-1,K,O.left+1,A);break;case"right":H=Yg(w,v,O.right-1,K,F.left+1,A);break;default:}if(H)return;if(d&&!HX(w,v,O)){I();return}if(!N&&b(w,v)){I();return}let G=!1;switch(p){case"top":{let oe=_?io/2:io*4,ee=_||k?r+oe:r-oe,X=_?r-oe:k?r+oe:r-oe,te=s+io+1,ce=k||_?F.bottom-io:F.top,le=k?_?F.bottom-io:F.top:F.bottom-io;G=Kg(w,v,ee,te,X,te,F.left,ce,F.right,le);break}case"bottom":{let oe=_?io/2:io*4,ee=_||k?r+oe:r-oe,X=_?r-oe:k?r+oe:r-oe,te=s-io,ce=k||_?F.top+io:F.bottom,le=k?_?F.top+io:F.bottom:F.top+io;G=Kg(w,v,ee,te,X,te,F.left,ce,F.right,le);break}case"left":{let oe=B?io/2:io*4,ee=B||U?s+oe:s-oe,X=B?s-oe:U?s+oe:s-oe,te=r+io+1,ce=U||B?F.right-io:F.left,le=U?B?F.right-io:F.left:F.right-io;G=Kg(w,v,ce,F.top,le,F.bottom,te,ee,te,X);break}case"right":{let oe=B?io/2:io*4,ee=B||U?s+oe:s-oe,X=B?s-oe:U?s+oe:s-oe,te=r-io,ce=U||B?F.left+io:F.right,le=U?B?F.left+io:F.right:F.left+io;G=Kg(w,v,te,ee,te,X,ce,F.top,le,F.bottom);break}default:}G?d||o.start(40,I):I()}};return n.__options={...e,blockPointerEvents:t},n}function NF(e,t,o){let{reference:n,floating:r}=e,s=Cr(t),i=yd(t),a=Cd(i),l=Dn(t),c=s==="y",u=n.x+n.width/2-r.width/2,p=n.y+n.height/2-r.height/2,d=n[a]/2-r[a]/2,m;switch(l){case"top":m={x:u,y:n.y-r.height};break;case"bottom":m={x:u,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:p};break;case"left":m={x:n.x-r.width,y:p};break;default:m={x:n.x,y:n.y}}let g=Fr(t);return g&&(m[i]+=d*(g==="end"?1:-1)*(o&&c?-1:1)),m}async function AF(e,t){var o;t===void 0&&(t={});let{x:n,y:r,platform:s,rects:i,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:p="floating",altBoundary:d=!1,padding:m=0}=ti(t,e),g=Eg(m),b=a[d?p==="floating"?"reference":"floating":p],x=ea(await s.getClippingRect({element:(o=await(s.isElement==null?void 0:s.isElement(b)))==null||o?b:b.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),h=p==="floating"?{x:n,y:r,width:i.floating.width,height:i.floating.height}:i.reference,C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),y=await(s.isElement==null?void 0:s.isElement(C))&&await(s.getScale==null?void 0:s.getScale(C))||{x:1,y:1},S=ea(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:h,offsetParent:C,strategy:l}):h);return{top:(x.top-S.top+g.top)/y.y,bottom:(S.bottom-x.bottom+g.bottom)/y.y,left:(x.left-S.left+g.left)/y.x,right:(S.right-x.right+g.right)/y.x}}var GX=50,OF=async(e,t,o)=>{let{placement:n="bottom",strategy:r="absolute",middleware:s=[],platform:i}=o,a=i.detectOverflow?i:{...i,detectOverflow:AF},l=await(i.isRTL==null?void 0:i.isRTL(t)),c=await i.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:p}=NF(c,n,l),d=n,m=0,g={};for(let R=0;R<s.length;R++){let b=s[R];if(!b)continue;let{name:x,fn:h}=b,{x:C,y,data:S,reset:w}=await h({x:u,y:p,initialPlacement:n,placement:d,strategy:r,middlewareData:g,rects:c,platform:a,elements:{reference:e,floating:t}});u=C??u,p=y??p,g[x]={...g[x],...S},w&&m<GX&&(m++,typeof w=="object"&&(w.placement&&(d=w.placement),w.rects&&(c=w.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:r}):w.rects),{x:u,y:p}=NF(c,d,l)),R=-1)}return{x:u,y:p,placement:d,strategy:r,middlewareData:g}};var FF=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var o,n;let{placement:r,middlewareData:s,rects:i,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:p=!0,fallbackPlacements:d,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:R=!0,...b}=ti(e,t);if((o=s.arrow)!=null&&o.alignmentOffset)return{};let x=Dn(r),h=Cr(a),C=Dn(a)===a,y=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=d||(C||!R?[xd(a)]:kO(a)),w=g!=="none";!d&&w&&S.push(...LO(a,R,g,y));let v=[a,...S],P=await l.detectOverflow(t,b),N=[],E=((n=s.flip)==null?void 0:n.overflows)||[];if(u&&N.push(P[x]),p){let O=VO(r,i,y);N.push(P[O[0]],P[O[1]])}if(E=[...E,{placement:r,overflows:N}],!N.every(O=>O<=0)){var M,W;let O=(((M=s.flip)==null?void 0:M.index)||0)+1,F=v[O];if(F&&(!(p==="alignment"?h!==Cr(F):!1)||E.every(_=>Cr(_.placement)===h?_.overflows[0]>0:!0)))return{data:{index:O,overflows:E},reset:{placement:F}};let k=(W=E.filter(U=>U.overflows[0]<=0).sort((U,_)=>U.overflows[1]-_.overflows[1])[0])==null?void 0:W.placement;if(!k)switch(m){case"bestFit":{var I;let U=(I=E.filter(_=>{if(w){let B=Cr(_.placement);return B===h||B==="y"}return!0}).map(_=>[_.placement,_.overflows.filter(B=>B>0).reduce((B,L)=>B+L,0)]).sort((_,B)=>_[1]-B[1])[0])==null?void 0:I[0];U&&(k=U);break}case"initialPlacement":k=a;break}if(r!==k)return{reset:{placement:k}}}return{}}}};var _F=new Set(["left","top"]);async function UX(e,t){let{placement:o,platform:n,elements:r}=e,s=await(n.isRTL==null?void 0:n.isRTL(r.floating)),i=Dn(o),a=Fr(o),l=Cr(o)==="y",c=_F.has(i)?-1:1,u=s&&l?-1:1,p=ti(t,e),{mainAxis:d,crossAxis:m,alignmentAxis:g}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return a&&typeof g=="number"&&(m=a==="end"?g*-1:g),l?{x:m*u,y:d*c}:{x:d*c,y:m*u}}var VF=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var o,n;let{x:r,y:s,placement:i,middlewareData:a}=t,l=await UX(t,e);return i===((o=a.offset)==null?void 0:o.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:r+l.x,y:s+l.y,data:{...l,placement:i}}}}},kF=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:o,y:n,placement:r,platform:s}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:h=>{let{x:C,y}=h;return{x:C,y}}},...c}=ti(e,t),u={x:o,y:n},p=await s.detectOverflow(t,c),d=Cr(r),m=Pg(d),g=u[m],R=u[d],b=(h,C)=>wg(C+p[h==="y"?"top":"left"],C,C-p[h==="y"?"bottom":"right"]);i&&(g=b(m,g)),a&&(R=b(d,R));let x=l.fn({...t,[m]:g,[d]:R});return{...x,data:{x:x.x-o,y:x.y-n,enabled:{[m]:i,[d]:a}}}}}},LF=function(e){return e===void 0&&(e={}),{options:e,fn(t){var o,n;let{x:r,y:s,placement:i,rects:a,middlewareData:l}=t,{offset:c=0,mainAxis:u=!0,crossAxis:p=!0}=ti(e,t),d={x:r,y:s},m=Cr(i),g=Pg(m),R=d[g],b=d[m],x=ti(c,t),h=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:(o=x.mainAxis)!=null?o:0,crossAxis:(n=x.crossAxis)!=null?n:0};if(u){let S=g==="y"?"height":"width",w=a.reference[g]-a.floating[S]+h.mainAxis,v=a.reference[g]+a.reference[S]-h.mainAxis;R<w?R=w:R>v&&(R=v)}if(p){var C,y;let S=g==="y"?"width":"height",w=_F.has(Dn(i)),v=a.reference[m]-a.floating[S]+(w&&((C=l.offset)==null?void 0:C[m])||0)+(w?0:h.crossAxis),P=a.reference[m]+a.reference[S]+(w?0:((y=l.offset)==null?void 0:y[m])||0)-(w?h.crossAxis:0);b<v?b=v:b>P&&(b=P)}return{[g]:R,[m]:b}}}},BF=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){let{placement:o,rects:n,platform:r,elements:s}=t,{apply:i=()=>{},...a}=ti(e,t),l=await r.detectOverflow(t,a),c=Dn(o),u=Fr(o),p=Cr(o)==="y",{width:d,height:m}=n.floating,g,R;c==="top"||c==="bottom"?(g=c,R=u===(await(r.isRTL==null?void 0:r.isRTL(s.floating))?"start":"end")?"left":"right"):(R=c,g=u==="end"?"top":"bottom");let b=m-l.top-l.bottom,x=d-l.left-l.right,h=Ha(m-l[g],b),C=Ha(d-l[R],x),y=t.middlewareData.shift,S=!y,w=h,v=C;y!=null&&y.enabled.x&&(v=x),y!=null&&y.enabled.y&&(w=b),S&&!u&&(p?v=d-2*Ss(l.left,l.right):w=m-2*Ss(l.top,l.bottom)),await i({...t,availableWidth:v,availableHeight:w});let P=await r.getDimensions(s.floating);return d!==P.width||m!==P.height?{reset:{rects:!0}}:{}}}};function UF(e){let t=Mo(e),o=parseFloat(t.width)||0,n=parseFloat(t.height)||0,r=st(e),s=r?e.offsetWidth:o,i=r?e.offsetHeight:n,a=Ga(o)!==s||Ga(n)!==i;return a&&(o=s,n=i),{width:o,height:n,$:a}}function Jv(e){return lt(e)?e:e.contextElement}function mu(e){let t=Jv(e);if(!st(t))return ei(1);let o=t.getBoundingClientRect(),{width:n,height:r,$:s}=UF(t),i=(s?Ga(o.width):o.width)/n,a=(s?Ga(o.height):o.height)/r;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}var WX=ei(0);function WF(e){let t=rt(e);return!cg()||!t.visualViewport?WX:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function jX(e,t,o){return t===void 0&&(t=!1),!!o&&t&&o===rt(e)}function ac(e,t,o,n){t===void 0&&(t=!1),o===void 0&&(o=!1);let r=e.getBoundingClientRect(),s=Jv(e),i=ei(1);t&&(n?lt(n)&&(i=mu(n)):i=mu(e));let a=jX(s,o,n)?WF(s):ei(0),l=(r.left+a.x)/i.x,c=(r.top+a.y)/i.y,u=r.width/i.x,p=r.height/i.y;if(s&&n){let d=rt(s),m=lt(n)?rt(n):n,g=d,R=ug(g);for(;R&&m!==g;){let b=mu(R),x=R.getBoundingClientRect(),h=Mo(R),C=x.left+(R.clientLeft+parseFloat(h.paddingLeft))*b.x,y=x.top+(R.clientTop+parseFloat(h.paddingTop))*b.y;l*=b.x,c*=b.y,u*=b.x,p*=b.y,l+=C,c+=y,g=rt(R),R=ug(g)}}return ea({width:u,height:p,x:l,y:c})}function qg(e,t){let o=dd(e).scrollLeft;return t?t.left+o:ac(Js(e)).left+o}function jF(e,t){let o=e.getBoundingClientRect(),n=o.left+t.scrollLeft-qg(e,o),r=o.top+t.scrollTop;return{x:n,y:r}}function zX(e){let{elements:t,rect:o,offsetParent:n,strategy:r}=e,s=r==="fixed",i=Js(n),a=t?pd(t.floating):!1;if(n===i||a&&s)return o;let l={scrollLeft:0,scrollTop:0},c=ei(1),u=ei(0),p=st(n);if((p||!s)&&((Yo(n)!=="body"||ql(i))&&(l=dd(n)),p)){let m=ac(n);c=mu(n),u.x=m.x+n.clientLeft,u.y=m.y+n.clientTop}let d=i&&!p&&!s?jF(i,l):ei(0);return{width:o.width*c.x,height:o.height*c.y,x:o.x*c.x-l.scrollLeft*c.x+u.x+d.x,y:o.y*c.y-l.scrollTop*c.y+u.y+d.y}}function $X(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function KX(e){let t=dd(e),o=e.ownerDocument.body,n=Ss(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=Ss(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight),s=-t.scrollLeft+qg(e),i=-t.scrollTop;return Mo(o).direction==="rtl"&&(s+=Ss(e.clientWidth,o.clientWidth)-n),{width:n,height:r,x:s,y:i}}var YX=25;function qX(e,t,o){o===void 0&&(o="viewport");let n=o==="layoutViewport",r=rt(e),s=Js(e),i=r.visualViewport,a=s.clientWidth,l=s.clientHeight,c=0,u=0;if(i){let d=!cg()||t==="fixed";n?d||(c=-i.offsetLeft,u=-i.offsetTop):(a=i.width,l=i.height,d&&(c=i.offsetLeft,u=i.offsetTop))}if(qg(s)<=0){let d=s.ownerDocument,m=d.body,g=getComputedStyle(m),R=d.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,b=Math.abs(s.clientWidth-m.clientWidth-R),x=getComputedStyle(s).scrollbarGutter==="stable both-edges"?b/2:b;x<=YX&&(a-=x)}return{width:a,height:l,x:c,y:u}}function XX(e,t){let o=ac(e,!0,t==="fixed"),n=o.top+e.clientTop,r=o.left+e.clientLeft,s=mu(e),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=r*s.x,c=n*s.y;return{width:i,height:a,x:l,y:c}}function HF(e,t,o){let n;if(t==="viewport"||t==="layoutViewport")n=qX(e,o,t);else if(t==="document")n=KX(Js(e));else if(lt(t))n=XX(t,o);else{let r=WF(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return ea(n)}function JX(e,t){let o=t.get(e);if(o)return o;let n=hs(e,[],!1).filter(a=>lt(a)&&Yo(a)!=="body"),r=null,s=Mo(e).position==="fixed",i=s?bn(e):e;for(;lt(i)&&!Yn(i);){let a=Mo(i),l=lg(i),c=r?r.position:s?"fixed":"";!l&&(c==="fixed"||c==="absolute"&&a.position==="static")?n=n.filter(p=>p!==i):r=a,i=bn(i)}return t.set(e,n),n}function ZX(e){let{element:t,boundary:o,rootBoundary:n,strategy:r}=e,i=[...o==="clippingAncestors"?pd(t)?[]:JX(t,this._c):[].concat(o),n],a=HF(t,i[0],r),l=a.top,c=a.right,u=a.bottom,p=a.left;for(let d=1;d<i.length;d++){let m=HF(t,i[d],r);l=Ss(m.top,l),c=Ha(m.right,c),u=Ha(m.bottom,u),p=Ss(m.left,p)}return{width:c-p,height:u-l,x:p,y:l}}function QX(e){let{width:t,height:o}=UF(e);return{width:t,height:o}}function e5(e,t,o){let n=st(t),r=Js(t),s=o==="fixed",i=ac(e,!0,s,t),a={scrollLeft:0,scrollTop:0},l=ei(0);if((n||!s)&&((Yo(t)!=="body"||ql(r))&&(a=dd(t)),n)){let d=ac(t,!0,s,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}!n&&r&&(l.x=qg(r));let c=r&&!n&&!s?jF(r,a):ei(0),u=i.left+a.scrollLeft-l.x-c.x,p=i.top+a.scrollTop-l.y-c.y;return{x:u,y:p,width:i.width,height:i.height}}function Xv(e){return Mo(e).position==="static"}function GF(e,t){if(!st(e)||Mo(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return Js(e)===o&&(o=o.ownerDocument.body),o}function zF(e,t){let o=rt(e);if(pd(e))return o;if(!st(e)){let r=bn(e);for(;r&&!Yn(r);){if(lt(r)&&!Xv(r))return r;r=bn(r)}return o}let n=GF(e,t);for(;n&&uO(n)&&Xv(n);)n=GF(n,t);return n&&Yn(n)&&Xv(n)&&!lg(n)?o:n||pO(e)||o}var t5=async function(e){let t=this.getOffsetParent||zF,o=this.getDimensions,n=await o(e.floating);return{reference:e5(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function o5(e){return Mo(e).direction==="rtl"}var _d={convertOffsetParentRelativeRectToViewportRelativeRect:zX,getDocumentElement:Js,getClippingRect:ZX,getOffsetParent:zF,getElementRects:t5,getClientRects:$X,getDimensions:QX,getScale:mu,isElement:lt,isRTL:o5};function $F(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function n5(e,t,o){let n=null,r,s=Js(e);function i(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function a(u,p){u===void 0&&(u=!1),p===void 0&&(p=1),i();let d=e.getBoundingClientRect(),{left:m,top:g,width:R,height:b}=d;if(u||t(),!R||!b)return;let x=Qi(g),h=Qi(s.clientWidth-(m+R)),C=Qi(s.clientHeight-(g+b)),y=Qi(m),w={rootMargin:-x+"px "+-h+"px "+-C+"px "+-y+"px",threshold:Ss(0,Ha(1,p))||1},v=!0;function P(N){let E=N[0].intersectionRatio;if(!$F(d,e.getBoundingClientRect()))return a();if(E!==p){if(!v)return a();E?a(!1,E):r=setTimeout(()=>{a(!1,1e-7)},1e3)}v=!1}try{n=new IntersectionObserver(P,{...w,root:s.ownerDocument})}catch{n=new IntersectionObserver(P,w)}n.observe(e)}let l=rt(e),c=()=>a(o);return l.addEventListener("resize",c),a(!0),()=>{l.removeEventListener("resize",c),i()}}function Vd(e,t,o,n){n===void 0&&(n={});let{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=Jv(e),u=r||s?[...c?hs(c):[],...t?hs(t):[]]:[];u.forEach(x=>{r&&x.addEventListener("scroll",o),s&&x.addEventListener("resize",o)});let p=c&&a?n5(c,o,s):null,d=-1,m=null;i&&(m=new ResizeObserver(x=>{let[h]=x;h&&h.target===c&&m&&t&&(m.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var C;(C=m)==null||C.observe(t)})),o()}),c&&!l&&m.observe(c),t&&m.observe(t));let g,R=l?ac(e):null;l&&b();function b(){let x=ac(e);R&&!$F(R,x)&&o(),R=x,g=requestAnimationFrame(b)}return o(),()=>{var x;u.forEach(h=>{r&&h.removeEventListener("scroll",o),s&&h.removeEventListener("resize",o)}),p?.(),(x=m)==null||x.disconnect(),m=null,l&&cancelAnimationFrame(g)}}var KF=VF;var YF=kF,qF=FF,XF=BF;var JF=LF,Xg=(e,t,o)=>{let n=new Map,r=o??{},s={..._d,...r.platform,_c:n};return OF(e,t,{...r,platform:s})};var rn=T(D(),1),QF=T(D(),1),e_=T(on(),1),s5=typeof document<"u",i5=function(){},Jg=s5?QF.useLayoutEffect:i5;function Zg(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,n,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(o=e.length,o!==t.length)return!1;for(n=o;n--!==0;)if(!Zg(e[n],t[n]))return!1;return!0}if(r=Object.keys(e),o=r.length,o!==Object.keys(t).length)return!1;for(n=o;n--!==0;)if(!{}.hasOwnProperty.call(t,r[n]))return!1;for(n=o;n--!==0;){let s=r[n];if(!(s==="_owner"&&e.$$typeof)&&!Zg(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function t_(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ZF(e,t){let o=t_(e);return Math.round(t*o)/o}function Zv(e){let t=rn.useRef(e);return Jg(()=>{t.current=e}),t}function o_(e){e===void 0&&(e={});let{placement:t="bottom",strategy:o="absolute",middleware:n=[],platform:r,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,p]=rn.useState({x:0,y:0,strategy:o,placement:t,middlewareData:{},isPositioned:!1}),[d,m]=rn.useState(n);Zg(d,n)||m(n);let[g,R]=rn.useState(null),[b,x]=rn.useState(null),h=rn.useCallback(_=>{_!==w.current&&(w.current=_,R(_))},[]),C=rn.useCallback(_=>{_!==v.current&&(v.current=_,x(_))},[]),y=s||g,S=i||b,w=rn.useRef(null),v=rn.useRef(null),P=rn.useRef(u),N=l!=null,E=Zv(l),M=Zv(r),W=Zv(c),I=rn.useCallback(()=>{if(!w.current||!v.current)return;let _={placement:t,strategy:o,middleware:d};M.current&&(_.platform=M.current),Xg(w.current,v.current,_).then(B=>{let L={...B,isPositioned:W.current!==!1};O.current&&!Zg(P.current,L)&&(P.current=L,e_.flushSync(()=>{p(L)}))})},[d,t,o,M,W]);Jg(()=>{c===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,p(_=>({..._,isPositioned:!1})))},[c]);let O=rn.useRef(!1);Jg(()=>(O.current=!0,()=>{O.current=!1}),[]),Jg(()=>{if(y&&(w.current=y),S&&(v.current=S),y&&S){if(E.current)return E.current(y,S,I);I()}},[y,S,I,E,N]);let F=rn.useMemo(()=>({reference:w,floating:v,setReference:h,setFloating:C}),[h,C]),k=rn.useMemo(()=>({reference:y,floating:S}),[y,S]),U=rn.useMemo(()=>{let _={position:o,left:0,top:0};if(!k.floating)return _;let B=ZF(k.floating,u.x),L=ZF(k.floating,u.y);return a?{..._,transform:"translate("+B+"px, "+L+"px)",...t_(k.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:B,top:L}},[o,a,k.floating,u.x,u.y]);return rn.useMemo(()=>({...u,update:I,refs:F,elements:k,floatingStyles:U}),[u,I,F,k,U])}var Qv=(e,t)=>{let o=KF(e);return{name:o.name,fn:o.fn,options:[e,t]}},ew=(e,t)=>{let o=YF(e);return{name:o.name,fn:o.fn,options:[e,t]}},tw=(e,t)=>({fn:JF(e).fn,options:[e,t]}),ow=(e,t)=>{let o=qF(e);return{name:o.name,fn:o.fn,options:[e,t]}},nw=(e,t)=>{let o=XF(e);return{name:o.name,fn:o.fn,options:[e,t]}};function n_({store:e,parentContext:t,isDrawer:o}){let n=e.useState("open"),r=e.useState("mounted"),s=e.useState("disablePointerDismissal"),i=e.useState("modal"),a=e.useState("popupElement"),l=e.useState("floatingRootContext"),[c,u]=rw.useState(0),[p,d]=rw.useState(0),m=c===0,g=Vn(l,{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 b=Je(R);if(m&&!s){if(i){let x=e.context.internalBackdropRef.current,h=e.context.backdropRef.current;return x||h?x===b||h===b||Ne(b,a)&&!b?.hasAttribute("data-base-ui-portal"):!0}return!0}return!1},escapeKey:m});return hg(n&&i===!0,a),e.useContextCallback("onNestedDialogOpen",(R,b)=>{!e.select("open")&&!e.select("mounted")||(u(R),d(b))}),J(()=>{!n&&!r&&(u(0),d(0))},[n,r]),J(()=>(t?.onNestedDialogOpen&&n&&t.onNestedDialogOpen(c+1,p+(o?1:0)),()=>{t?.onNestedDialogOpen&&n&&t.onNestedDialogOpen(0,0)}),[o,n,c,p,t]),li(e,{activeTriggerProps:g.reference,inactiveTriggerProps:g.trigger,popupProps:g.floating,nestedOpenDialogCount:c,nestedOpenDrawerCount:p}),null}var Qg=T(D(),1),sw=Qg.createContext(void 0);function zt(e){let t=Qg.useContext(sw);if(!e&&t===void 0)throw new Error(_e(27));return t}var eb=T(D(),1);var Qr=class extends No{setState(t){}update(t){}set(t,o){}notifyAll(){}};var r_={...cr,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},tb=class extends No{constructor(o,n,r){let s=new qo,i=i_(o,s,n,r);super(i,a_(s),r_);it(this,"setOpen",(o,n)=>{n.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!o&&n.trigger==null&&this.state.activeTriggerId!=null&&(n.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(o,n),!n.isCanceled&&(this.state.floatingRootContext.dispatchOpenChange(o,n),this.update(tc(this.state,o,n.trigger)))})}};function s_(){let e=new qo;return new Qr(Object.freeze(i_(void 0,e)),Object.freeze(a_(e)),r_)}function i_(e,t,o,n=!1){return{...pi(t,o,n),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...e}}function a_(e){return{popupRef:eb.createRef(),backdropRef:eb.createRef(),internalBackdropRef:eb.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function gu(e,t){let{children:o,open:n,defaultOpen:r=!1,onOpenChange:s,onOpenChangeComplete:i,disablePointerDismissal:a=!1,modal:l=!0,actionsRef:c,handle:u,triggerId:p,defaultTriggerId:d=null}=t,m=e==="drawer",g=e==="alert-dialog",R=g?!0:l,b=g||a,x=g?"alertdialog":"dialog",h=zt(!0),C=h!=null,y={modal:R,disablePointerDismissal:b,nested:C,role:x},S=qa((M,W)=>new tb({open:r,openProp:n,activeTriggerId:d,triggerIdProp:p,...y},M,W),!0);S.useControlledProp("openProp",n),S.useControlledProp("triggerIdProp",p),S.useSyncedValues(y),S.useContextCallback("onOpenChange",s),S.useContextCallback("onOpenChangeComplete",i);let w=S.useState("open"),v=S.useState("mounted"),P=S.useState("payload");Hg(S,w),ii(S);let{forceUnmount:N}=ai(w,S);l_.useImperativeHandle(c,()=>({unmount:N,close:()=>S.setOpen(!1,Ce($.imperativeAction))}),[N,S]);let E=w||v||u!=null;return f(sw.Provider,{value:S,children:[u&&f(ri,{handle:u,store:S}),E&&f(n_,{store:S,parentContext:h?.context,isDrawer:m}),typeof o=="function"?o({payload:P}):o]})}function c_(e){return gu("alert-dialog",e)}var u_=T(D(),1);var ob=u_.forwardRef(function(t,o){let{render:n,className:r,style:s,forceRender:i=!1,...a}=t,l=zt(),c=l.useState("open"),u=l.useState("nested"),p=l.useState("mounted"),d=l.useState("transitionStatus");return j("div",t,{state:{open:c,transitionStatus:d},ref:[l.context.backdropRef,o],stateAttributesMapping:Ro,props:[{role:"presentation",hidden:!p,style:{userSelect:"none",WebkitUserSelect:"none"}},a],enabled:i||!u})});var p_=T(D(),1);var bu=p_.forwardRef(function(t,o){let{render:n,className:r,style:s,disabled:i=!1,nativeButton:a=!0,...l}=t,c=zt(),u=c.useState("open"),{getButtonProps:p,buttonRef:d}=bt({disabled:i,native:a}),m={disabled:i};function g(R){u&&c.setOpen(!1,Ce($.closePress,R.nativeEvent))}return j("button",t,{state:m,ref:[o,d],props:[{onClick:g},l,p]})});var d_=T(D(),1);var Ru=d_.forwardRef(function(t,o){let{render:n,className:r,style:s,id:i,...a}=t,l=zt(),c=Ye(i);return l.useSyncedValueWithCleanup("descriptionElementId",c),j("p",t,{ref:o,props:[{id:c},a]})});var g_=T(D(),1);var nb=T(D(),1),iw=nb.createContext(void 0);function hu(){let e=nb.useContext(iw);if(e===void 0)throw new Error(_e(26));return e}var xu="ArrowUp",Cu="ArrowDown",yu="ArrowLeft",Su="ArrowRight",vu="Home",wu="End",aw="PageUp",lw="PageDown",ur=new Set([xu,Cu,yu,Su,vu,wu]),cw="Shift",m_=[cw,"Control","Alt","Meta"];function a5(e){return st(e)&&e.tagName==="INPUT"}function uw(e){return!!(a5(e)&&e.selectionStart!=null||st(e)&&e.tagName==="TEXTAREA")}function pw(e,t,o,n){if(!e||!t||!t.scrollTo)return;let r=e.scrollLeft,s=e.scrollTop,i=e.clientWidth<e.scrollWidth,a=e.clientHeight<e.scrollHeight;if(i&&n!=="vertical"){let l=f_(e,t,"left"),c=rb(e),u=rb(t);o==="ltr"&&(l+t.offsetWidth+u.scrollMarginRight>e.scrollLeft+e.clientWidth-c.scrollPaddingRight?r=l+t.offsetWidth+u.scrollMarginRight-e.clientWidth+c.scrollPaddingRight:l-u.scrollMarginLeft<e.scrollLeft+c.scrollPaddingLeft&&(r=l-u.scrollMarginLeft-c.scrollPaddingLeft)),o==="rtl"&&(l-u.scrollMarginLeft<e.scrollLeft+c.scrollPaddingLeft?r=l-u.scrollMarginLeft-c.scrollPaddingLeft:l+t.offsetWidth+u.scrollMarginRight>e.scrollLeft+e.clientWidth-c.scrollPaddingRight&&(r=l+t.offsetWidth+u.scrollMarginRight-e.clientWidth+c.scrollPaddingRight))}if(a&&n!=="horizontal"){let l=f_(e,t,"top"),c=rb(e),u=rb(t);l-u.scrollMarginTop<e.scrollTop+c.scrollPaddingTop?s=l-u.scrollMarginTop-c.scrollPaddingTop:l+t.offsetHeight+u.scrollMarginBottom>e.scrollTop+e.clientHeight-c.scrollPaddingBottom&&(s=l+t.offsetHeight+u.scrollMarginBottom-e.clientHeight+c.scrollPaddingBottom)}e.scrollTo({left:r,top:s,behavior:"auto"})}function f_(e,t,o){let n=o==="left"?"offsetLeft":"offsetTop",r=0;for(;t.offsetParent&&(r+=t[n],t.offsetParent!==e);)t=t.offsetParent;return r}function rb(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 kd={};me(kd,{nestedDialogs:()=>dw});var dw="--nested-dialogs";var Ld={};me(Ld,{closed:()=>c5,endingStyle:()=>p5,nested:()=>d5,nestedDialogOpen:()=>fw,open:()=>l5,startingStyle:()=>u5});var l5=ge.open,c5=ge.closed,u5=ge.startingStyle,p5=ge.endingStyle,d5="data-nested",fw="data-nested-dialog-open";var sb={...lo,...Lt,nestedDialogOpen(e){return e?{[fw]:""}:null}};var ib=g_.forwardRef(function(t,o){let{render:n,className:r,style:s,finalFocus:i,initialFocus:a,...l}=t,c=zt(),u=c.useState("descriptionElementId"),p=c.useState("disablePointerDismissal"),d=c.useState("floatingRootContext"),m=c.useState("popupProps"),g=c.useState("modal"),R=c.useState("mounted"),b=c.useState("nested"),x=c.useState("nestedOpenDialogCount"),h=c.useState("open"),C=c.useState("openMethod"),y=c.useState("titleElementId"),S=c.useState("transitionStatus"),w=c.useState("role"),v=d.useState("floatingId");hu(),It({open:h,ref:c.context.popupRef,onComplete(){h&&c.context.onOpenChangeComplete?.(!0)}});let P=a===void 0?Lg(c.context.popupRef):a,N=x>0,E=c.useStateSetter("popupElement"),W=j("div",t,{state:{open:h,nested:b,transitionStatus:S,nestedDialogOpen:N},props:[m,{id:v,"aria-labelledby":y,"aria-describedby":u,role:w,...Zn,hidden:!R,onKeyDown(I){ur.has(I.key)&&I.stopPropagation()},style:{[dw]:x}},l],ref:[o,c.context.popupRef,E],stateAttributesMapping:sb});return f(Br,{context:d,openInteractionType:C,disabled:!R,closeOnFocusOut:!p,initialFocus:P,returnFocus:i,modal:g!==!1,restoreFocus:"popup",children:W})});var R_=T(D(),1);function sn(e){return Na(19)?e:e?"true":void 0}var b_=T(D(),1);var gi=b_.forwardRef(function(t,o){let{cutout:n,...r}=t,s;if(n){let i=n.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 f("div",{ref:o,role:"presentation","data-base-ui-inert":"",...r,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:s}})});var Pu=R_.forwardRef(function(t,o){let{keepMounted:n=!1,...r}=t,s=zt(),i=s.useState("mounted"),a=s.useState("modal"),l=s.useState("open");return i||n?f(iw.Provider,{value:n,children:f(Vr,{ref:o,...r,children:[i&&a===!0&&f(gi,{ref:s.context.internalBackdropRef,inert:sn(!l)}),t.children]})}):null});var h_=T(D(),1);var Eu=h_.forwardRef(function(t,o){let{render:n,className:r,style:s,id:i,...a}=t,l=zt(),c=Ye(i);return l.useSyncedValueWithCleanup("titleElementId",c),j("h2",t,{ref:o,props:[{id:c},a]})});var C_=T(D(),1);var Hd=T(D(),1);var Bd=T(D(),1);function ab(e){let t=Bd.useRef(""),o=Bd.useCallback(r=>{r.defaultPrevented||(t.current=r.pointerType,e(r,r.pointerType))},[e]);return{onClick:Bd.useCallback(r=>{if(r.detail===0){e(r,"keyboard");return}"pointerType"in r?e(r,r.pointerType):e(r,t.current),t.current=""},[e]),onPointerDown:o}}var x_=T(D(),1);function oo(e,t){let o=x_.useRef(e),n=q(t);J(()=>{o.current!==e&&n(o.current),o.current=e},[e,n])}function Gd(e,t){let o=q((s,i)=>{(typeof e=="function"?e():e)||t(i||(Rt.os.ios?"touch":""))}),{onClick:n,onPointerDown:r}=ab(o);return Hd.useMemo(()=>({onClick:n,onPointerDown:r}),[n,r])}function Tu(e){let[t,o]=Hd.useState(null),n=Gd(e,o);return oo(e,r=>{r&&!e&&o(null)}),Hd.useMemo(()=>({openMethod:t,triggerProps:n}),[t,n])}var Iu=ci(function(t,o){let{render:n,className:r,style:s,disabled:i=!1,nativeButton:a=!0,id:l,payload:c,handle:u,...p}=t,d=zt(!0),g=di(u)??d;if(!g)throw new Error(_e(79));let R=Ye(l),b=g.useState("floatingRootContext"),x=g.useState("isOpenedByTrigger",R),h=g.useState("triggerPopupId",R),C=C_.useRef(null),{registerTrigger:y,isMountedByThisTrigger:S}=si(R,C,g,{payload:c}),{getButtonProps:w,buttonRef:v}=bt({disabled:i,native:a}),P=_n(b),N=Gd(()=>g.select("open"),W=>{g.set("openMethod",W)}),E={disabled:i,open:x},M=g.useState("triggerProps",S);return j("button",t,{state:E,ref:[v,o,y,C],props:[P.reference,M,N,{[pu]:"",id:R,"aria-haspopup":"dialog","aria-expanded":x,"aria-controls":h},p,w],stateAttributesMapping:qn})});var y_=Iu;var S_=T(D(),1);var Mu=S_.forwardRef(function(t,o){let{render:n,className:r,style:s,children:i,...a}=t,l=hu(),c=zt(),u=c.useState("open"),p=c.useState("nested"),d=c.useState("transitionStatus"),m=c.useState("nestedOpenDialogCount"),g=c.useState("mounted"),R=c.useStateSetter("viewportElement"),b=m>0;return j("div",t,{enabled:l||g,state:{open:u,nested:p,transitionStatus:d,nestedDialogOpen:b},ref:[o,R],stateAttributesMapping:sb,props:[{role:"presentation",hidden:!g,style:{pointerEvents:u?void 0:"none"},children:i},a]})});var ta=class extends Jr{constructor(){super(s_(),"Dialog",!1)}open(t){this.openByTrigger(t)}openWithPayload(t){let o=this.attachedStore;o!==null&&(o.set("payload",t),o.setOpen(!0,Ce($.imperativeAction)))}close(){this.closePopup()}get isOpen(){return this.attachedStore?.select("open")??!1}};function v_(){return new ta}var Ud=class extends ta{};function w_(){return new Ud}var lb={};me(lb,{closed:()=>m5,endingStyle:()=>b5,open:()=>f5,startingStyle:()=>g5});var f5=ge.open,m5=ge.closed,g5=ge.startingStyle,b5=ge.endingStyle;var Wd={};me(Wd,{disabled:()=>R5});var R5="data-disabled";var mw={};me(mw,{disabled:()=>h5,popupOpen:()=>x5});var h5="data-disabled",x5=At.popupOpen;var jd={};me(jd,{closed:()=>y5,endingStyle:()=>v5,nested:()=>w5,nestedDialogOpen:()=>gw,open:()=>C5,startingStyle:()=>S5});var C5=ge.open,y5=ge.closed,S5=ge.startingStyle,v5=ge.endingStyle,w5="data-nested",gw="data-nested-dialog-open";var co={};me(co,{Arrow:()=>Zb,Backdrop:()=>zb,Clear:()=>Lb,Collection:()=>Bu,Empty:()=>iR,Group:()=>eR,GroupLabel:()=>tR,Icon:()=>kb,Input:()=>Fb,InputGroup:()=>U_,Item:()=>yV,List:()=>Hb,Popup:()=>Jb,Portal:()=>jb,Positioner:()=>qb,Root:()=>__,Row:()=>sR,Separator:()=>PV,Status:()=>Ub,Trigger:()=>B_,Value:()=>k_,useFilter:()=>Au,useFilteredItems:()=>aR});var qd=T(D(),1);var Dt=T(D(),1);var P_=T(D(),1);function cb(e){let t=P_.useRef(!0);t.current&&(t.current=!1,e())}function E_(e,t,o,n,r,s,i,a,l,c=2){let u=BO(o.current,{event:e,orientation:n,loopFocus:r,rtl:s,cols:c,disabledIndices:i,minIndex:a,maxIndex:l,prevIndex:t>l?a:t,stopEvent:!0});return _r(o.current,u)?void 0:u}function bi(e){return e==null?$.none:e.type.startsWith("key")?$.keyboard:e.type.startsWith("mouse")||e.type.startsWith("pointer")?$.pointer:$.none}var es=T(D(),1),bw=es.createContext(void 0),Rw=es.createContext(void 0),hw=es.createContext(void 0),xw=es.createContext(!1),Cw=es.createContext("");function Bt(){let e=es.useContext(bw);if(!e)throw new Error(_e(22));return e}function el(){let e=es.useContext(Rw);if(!e)throw new Error(_e(23));return e}function ts(){let e=es.useContext(hw);if(!e)throw new Error(_e(24));return e}function tl(){return es.useContext(Cw)}function T_(){return es.useContext(xw)}function lc(e,t,o=Object.is){let{length:n}=e;if(n!==t.length)return!1;for(let r=0;r<n;r+=1)if(!o(e[r],t[r]))return!1;return!0}var cc=(e,t)=>Object.is(e,t);function yn(e,t,o){return e==null||t==null?Object.is(e,t):o(e,t)}function ub(e,t,o){return Array.isArray(e)&&Array.isArray(t)?!lc(e,t,(n,r)=>yn(n,r,o)):e!==t}function zd(e,t,o){return e?e.some(n=>n===void 0?!1:yn(t,n,o)):!1}function Ds(e,t,o){return e?e.findIndex(n=>n===void 0?!1:yn(n,t,o)):-1}function P5(e,t){if(t!==cc)return n=>zd(e,n,t);let o=new Set(e);return o.delete(void 0),n=>o.has(n)&&(n!==0||e.some(r=>Object.is(n,r)))}function uc(e,t,o,n){let r=n&&Array.isArray(t)?e.findIndex(P5(t,o)):Ds(e,t,o);return r===-1?null:r}function pb(e,t,o,n,r,s){return zd(n,t,r)?s!=null&&e>s&&zd(n,o[s],r)?s:e:e===s?uc(o,n,r,!0):s}function db(e,t,o){return e.filter(n=>!yn(t,n,o))}var I_=T(D(),1);function Du(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function E5(e){return typeof e=="object"&&e!=null&&Array.isArray(e.items)}function fb(e){return E5(e?.[0])}function pc(e){return fb(e)?e.flatMap(t=>t.items):e}function mb(e){if(!Array.isArray(e))return e!=null&&"null"in e;let t=e;if(fb(t)){for(let o of t)for(let n of o.items)if(n&&n.value==null&&n.label!=null)return!0;return!1}for(let o of t)if(o&&o.value==null&&o.label!=null)return!0;return!1}function Ln(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 Du(e)}function vr(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?Du(e.value):Du(e)}function $d(e,t,o){function n(){return Ln(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)??n();if(Array.isArray(t)){let s=pc(t);if(e==null||typeof e!="object"){let i=s.find(a=>a.value===e);return i&&i.label!=null?i.label:n()}if("value"in e){let i=s.find(a=>a&&a.value===e.value);if(i&&i.label!=null)return i.label}}return n()}function gb(e,t,o){return e.reduce((n,r,s)=>(s>0&&n.push(", "),n.push(f(I_.Fragment,{children:$d(r,t,o)},s)),n),[])}var M_={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?mb(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,n=e.selectedValue;return Array.isArray(n)?n.some(r=>yn(t,r,o)):yn(t,n,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 Rb=T(D(),1);var bb={};me(bb,{dirty:()=>M5,disabled:()=>T5,filled:()=>D5,focused:()=>N5,invalid:()=>Sw,touched:()=>I5,valid:()=>yw});var T5="data-disabled",yw="data-valid",Sw="data-invalid",I5="data-touched",M5="data-dirty",D5="data-filled",N5="data-focused";var dc={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},vw={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},D_={disabled:!1,...vw},Ut={valid(e){return e===null?null:e?{[yw]:""}:{[Sw]:""}}};var ww={invalid:void 0,name:void 0,validityData:{state:dc,errors:[],error:"",value:"",initialValue:null},setValidityData:nt,disabled:void 0,setTouched:nt,setDirty:nt,setFilled:nt,setFocused:nt,focusOwnerRef:{current:void 0},validationMode:"onSubmit",shouldValidateOnChange:()=>!1,state:D_,registerFieldControl:nt,validation:{getValidationProps:(e,t=ot)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:nt,getInputControl:()=>null,commit:async()=>{},change:nt}},Nu=Rb.createContext(ww);function ht(e=!0){let t=Rb.useContext(Nu);if(t.setValidityData===nt&&!e)throw new Error(_e(28));return t}function an(e,t,o,n,r=!0,s){let{registerFieldControl:i}=ht(),a=gt(()=>Symbol());J(()=>{let l=a.current;if(!r){i(l,void 0);return}i(l,{controlRef:e,getValue:n,id:t,name:s,value:o})},[e,r,n,t,s,i,a,o]),J(()=>{let l=a.current;return()=>{i(l,void 0)}},[i,a])}var hb=T(D(),1);var Pw=hb.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:nt,validationMode:"onSubmit",submitCountRef:{current:0}});function eo(){return hb.useContext(Pw)}var Tw=T(D(),1);var xb=T(D(),1);var Ew=xb.createContext({controlId:void 0,registerControlId:nt,resetControlId:nt,labelId:void 0,setLabelId:nt,messageIds:[],setMessageIds:nt,getDescriptionProps:e=>e});function Vt(){return xb.useContext(Ew)}function Ao(e={}){let{id:t,enabled:o=!0}=e,{controlId:n,registerControlId:r,resetControlId:s}=Vt(),i=Ye(),a=gt(()=>Symbol()),l=Tw.useRef(!1),c=Tw.useRef(!1),u=q(()=>{!l.current||r===nt||(l.current=!1,r(a.current,void 0))});return J(()=>{if(!o||r===nt){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}l.current=!0,r(a.current,p)},[t,o,r,s,i,a,u]),J(()=>u,[u]),(o?n:void 0)??t??i}function Cb(e){return e==null?void 0:`${e}-popup`}function yb(e,t){return(o,n)=>o==null?!1:e.contains(o,n,t)}function N_(e,t,o){return(n,r)=>{if(n==null)return!1;if(!r)return!0;let s=t?.selected??t,i=o!=null?Ln(o,s):"";return i&&e.contains(i,r)&&i.length===r.length?!0:e.contains(n,r,t)}}var Sb=T(D(),1);function Kd(e){return Array.isArray(e)?e.map(t=>Kd(t)).join(","):e==null?"":String(e)}var A_=new Map;function fc(e={}){let{locale:t,...o}=e,n={usage:"search",sensitivity:"base",ignorePunctuation:!0,...o},r=`${Kd(t)}|${JSON.stringify(n)}`,s=A_.get(r);if(s)return s;let i=new Intl.Collator(t,n),a={contains(l,c,u){if(!c)return!0;let p=Ln(l,u);for(let d=0;d<=p.length-c.length;d+=1)if(i.compare(p.slice(d,d+c.length),c)===0)return!0;return!1},startsWith(l,c,u){if(!c)return!0;let p=Ln(l,u);return i.compare(p.slice(0,c.length),c)===0},endsWith(l,c,u){if(!c)return!0;let p=Ln(l,u),d=c.length;return p.length>=d&&i.compare(p.slice(p.length-d),c)===0}};return A_.set(r,a),a}var Au=fc;function O_(e={}){let{multiple:t=!1,value:o,...n}=e,r=fc(n),s=Sb.useCallback((i,a,l)=>t?yb(r,l)(i,a):N_(r,l,o)(i,a),[r,o,t]);return Sb.useMemo(()=>({...r,contains:s}),[s,r])}function Iw(e,t=!1){let{overflowY:o}=Mo(e);return o!=="auto"&&o!=="scroll"?!1:t?e.clientHeight>0:e.scrollHeight>e.clientHeight}function A5(e,t=!1){let{overflowX:o}=Mo(e);return o!=="auto"&&o!=="scroll"?!1:t?e.clientWidth>0:e.scrollWidth>e.clientWidth}function F_(e,t,o=!1){return t==="vertical"?Iw(e,o):A5(e,o)}function Mw(e,t,o,n=!1){let r=e;for(;lt(r)&&r!==t&&!Yn(r);){if(st(r)&&F_(r,o,n))return r;r=bn(r)}return null}function ol(e,t,o="vertical",n=!1){return Mw(e,t,o,n)??(F_(t,o,n)?t:null)}var Dw=Symbol("none"),vb={value:Dw,index:-1};var wb=T(D(),1),Nw=wb.createContext(void 0);function kt(){return wb.useContext(Nw)?.direction??"ltr"}function Yd(e,t,o){let n=e.get(t);if(n!==void 0||o===cc)return n;for(let[r,s]of e)if(yn(r,t,o))return s}function Pb(e){let{id:t,onOpenChangeComplete:o,defaultSelectedValue:n=null,selectedValue:r,onSelectedValueChange:s,defaultInputValue:i,inputValue:a,open:l,defaultOpen:c=!1,selectionMode:u,onItemHighlighted:p,name:d,form:m,disabled:g=!1,readOnly:R=!1,required:b=!1,inputRef:x,grid:h=!1,items:C,filteredItems:y,filter:S,filterQuery:w,openOnInputClick:v=!0,autoHighlight:P=!1,keepHighlight:N=!1,highlightItemOnHover:E=!0,loopFocus:M=!0,itemToStringLabel:W,itemToStringValue:I,isItemEqualToValue:O=cc,virtualized:F=!1,inline:k=!1,fillInputOnItemPress:U=!0,modal:_=!1,limit:B=-1,autoComplete:L="list",formAutoComplete:V,locale:A,submitOnItemClick:K=!1}=e,{clearErrors:H}=eo(),{setDirty:G,validityData:oe,setFilled:ee,name:X,disabled:te,setTouched:ce,setFocused:le,validationMode:Q,validation:ne}=ht(),Y=kt(),ae=Ao({id:t}),Z=Au({locale:A}),ue=Array.isArray(C)?null:C;if(ue&&typeof ue.label!="function")throw new Error(_e(100));let Te=ue?ue.data:C,fe=ue?.value,ve=fe?void 0:Te,z=Dt.useMemo(()=>{if(!y||!fe)return;let Xe=pc(y),tt=Xe.map(fe),Ft;return{values:tt,findItem(Zt,ko){if(!Ft){Ft=new Map;for(let mn=0;mn<tt.length;mn+=1)Ft.has(tt[mn])||Ft.set(tt[mn],Xe[mn])}return Yd(Ft,Zt,ko)}}},[y,fe]),Re=Dt.useMemo(()=>ue?Xe=>ue.label(Xe,O,tt=>{let Ft=z?.findItem(tt,O);return Ft!=null?ue.itemLabel(Ft):Ln(tt,W)}):W,[ue,W,z,O]),xe=Dt.useMemo(()=>ue?Object.assign(Xe=>ue.itemLabel(Xe),{selected:Xe=>Ln(Xe,Re)}):W,[ue,Re,W]);function Pe(Xe){return Ln(Xe,Re)}let[ie,re]=Dt.useState(!1),[Ee,ye]=Dt.useState(null),se=Dt.useRef(Ee),Fe=Dt.useRef([]),ke=Dt.useRef([]),de=Dt.useRef(null),Ie=Dt.useRef(null),Me=Dt.useRef(null),We=Dt.useRef(null),Ue=Dt.useRef(null),ze=Dt.useRef(!1),He=Dt.useRef(null),je=Dt.useRef(null),Qe=Dt.useRef(null),et=Dt.useRef(vb),ut=Dt.useRef(null),vt=Dt.useRef([]),De=Dt.useRef(null),he=te||g,be=X??d,Le=u==="multiple",pe=u==="single",Ae=a!==void 0||i!==void 0,we=Te!==void 0,Oe=y!==void 0,$e;P==="always"?$e="always":$e=P?"input-change":!1;let[Ve,Ze]=_t({controlled:r,default:Le?n??Et:n,name:"Combobox",state:"selectedValue"}),at=Dt.useMemo(()=>S===null?()=>!0:S!==void 0?S:yb(Z,xe),[S,Z,xe]),Ke=gt(()=>Ae?i??"":pe?Pe(Ve):"").current,[dt,jt]=_t({controlled:a,default:Ke,name:"Combobox",state:"inputValue"}),[xt,mo]=_t({controlled:l,default:c,name:"Combobox",state:"open"}),xn=fb(Te),Vo=!xt&&Ee!==null?Ee:String(dt).trim(),sr=pe?Pe(Ve):"",ir=pe&&!ie&&Vo!==""&&sr.length===Vo.length&&Z.contains(sr,Vo),Uo=ir?"":w??Vo,br=we&&Oe&&ir&&(!ue||ue.hasValue(Ve,O)),fn=Dt.useMemo(()=>Te?pc(Te):Et,[Te]),Rr=Dt.useMemo(()=>{if(y&&!br)return y;if(!Te)return Et;if(xn){let tt=Te,Ft=[],Zt=0;for(let ko of tt){if(B>-1&&Zt>=B)break;let mn=B>-1?B-Zt:1/0,Io=Uo===""?ko.items.slice(0,mn):[];if(Uo!=="")for(let tn of ko.items){if(Io.length>=mn)break;at(tn,Uo,xe)&&Io.push(tn)}if(Io.length>0){let tn={...ko,items:Io};Ft.push(tn),Zt+=Io.length}}return Ft}if(Uo==="")return B>-1?fn.slice(0,B):fn;let Xe=[];for(let tt of fn){if(B>-1&&Xe.length>=B)break;at(tt,Uo,xe)&&Xe.push(tt)}return Xe},[y,br,Te,xn,Uo,B,at,xe,fn]),Ko=Dt.useMemo(()=>{if(z&&Rr===y)return z.values;let Xe=pc(Rr);return fe?Xe.map(tt=>fe(tt)):Xe},[Rr,y,z,fe]),mt=gt(()=>{let Xe=null;return k&&xt&&we&&u!=="none"&&(Xe=uc(Ko,Ve,O,Le)),new No({id:ae,labelId:void 0,selectedValue:Ve,open:xt,items:ve,selectionMode:u,name:be,form:m,disabled:he,readOnly:R,required:b,grid:h,virtualized:F,openOnInputClick:v,itemToStringLabel:Re,isItemEqualToValue:O,modal:_,autoHighlight:$e,submitOnItemClick:K,hasInputValue:Ae,mounted:!1,forceMounted:!1,transitionStatus:"idle",inline:k,activeIndex:null,selectedIndex:Xe,popupProps:{},listProps:{},inputProps:{},triggerProps:{},itemRoot:{props:ot,id:ae,selectionMode:u,disabled:he,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:nt,setOpen:nt,setInputValue:nt,setSelectedValue:nt,setIndices:nt,handleSelection:nt,forceMount:nt,requestSubmit:nt,listRef:Fe,labelsRef:ke,popupRef:de,emptyRef:Ue,inputRef:Ie,startDismissRef:Me,endDismissRef:We,chipsContainerRef:He,clearRef:je,valuesRef:vt,pointerDownItemRef:De,selectionEventRef:Qe},M_)}).current,Da=u==="none"?dt:Ve,sY=Dt.useMemo(()=>u==="none"?Da:Array.isArray(Ve)?Ve.map(Xe=>vr(Xe,I)):vr(Ve,I),[Da,I,u,Ve]),iY=q(p),aY=q(o),hA=mt.useState("activeIndex"),lY=mt.useState("selectedIndex"),Am=mt.useState("positionerElement"),xA=mt.useState("listElement"),nd=mt.useState("triggerElement"),Om=mt.useState("inputElement"),cY=mt.useState("inputGroupElement"),Mn=mt.useState("inline"),Rs=mt.useState("inputInsidePopup"),uY=mt.useState("inputOwnsFormValue"),CA=pe&&!Rs&&dt===sr,pY=Tt(nd),{openMethod:dY,triggerProps:yA}=Tu(xt),fY=q(()=>sY);an(Rs?pY:Ie,ae,Da,fY,!he,d);let SA=q(()=>{Te?ke.current=Ko.map(Pe):mt.set("forceMounted",!0)}),Jc=q((Xe,tt,Ft,Zt)=>{if(tt===-1){if(et.current===vb)return;et.current=vb}else et.current={value:Xe,index:tt};iY(Xe,go(Ft,Zt,{index:tt}))}),Yi=q(Xe=>{let tt={};Xe.activeIndex!==void 0&&(tt.activeIndex=Xe.activeIndex),Xe.selectedIndex!==void 0&&(tt.selectedIndex=Xe.selectedIndex),mt.update(tt);let Ft=Xe.activeIndex;if(Ft===void 0)return;let Zt=Xe.type||$.none;Ft===null?Jc(void 0,-1,Zt,Xe.event):Jc(vt.current[Ft],Ft,Zt,Xe.event)}),qs=q((Xe,tt)=>{if(e.onInputValueChange?.(Xe,tt),!tt.isCanceled){if(ze.current=tt.reason===$.inputClear,tt.reason===$.inputChange){xt&&Ee!==null&&ye(null);let Ft=tt.event,Zt=Ft.inputType;if(Ft.type==="compositionend"||Zt!=null&&Zt!==""&&Zt!=="insertReplacementText"){let mn=Xe.trim()!=="";mn&&re(!0),ut.current={hasQuery:mn};let Io=mt.state.listElement;if(!mt.state.virtualized&&Io){let tn=de.current;for(let Dr of hs(Io.firstElementChild??Io)){if(!st(Dr)||(tn?!Ne(tn,Dr):Dr.getAttribute("role")==="dialog"))break;if(Iw(Dr)){Dr.scrollTop=0;break}}}mn&&$e&&mt.state.activeIndex==null&&(xt||Mn)&&mt.set("activeIndex",0)}}else tt.reason===$.inputClear&&Xe===""&&mt.state.inputInsidePopup&&(ut.current={hasQuery:!1,selection:!0});jt(Xe)}}),vA=q(Xe=>{let tt=!Xe&&Rs&&!Mn&&dt!==""&&(String(dt).trim()===Ee||dt===sr);!Xe&&(tt||dt===""||CA)&&re(!1),ye(null),tt&&qs("",Ce($.inputClear))}),[mY,wA]=Dt.useState(!1),Wl=q((Xe,tt)=>{if(xt===Xe)return;tt.reason===$.escapeKey&&we&&Ko.length===0&&!Ue.current&&tt.allowPropagation();let Ft=tt,Zt=Es(Ft);if(e.onOpenChange?.(Xe,Ft),ut.current?.hasQuery&&tt.reason===$.inputChange===tt.isCanceled&&(ut.current=null),!tt.isCanceled&&(Xe&&Ee!==null&&vA(tt.reason===$.inputChange),!Xe&&ie&&(pe?(Mn||ye(Vo),Vo===""&&re(!1)):Le&&(Mn||ye(Vo),Rs&&Yi({activeIndex:null}),(!Rs||Mn)&&qs("",Ce($.inputClear,tt.event,void 0,{isItemPress:tt.reason===$.itemPress})))),Xe||wA(Zt()),mo(Xe),!Xe&&Rs&&(tt.reason===$.focusOut||tt.reason===$.outsidePress)&&(ce(!0),le(!1),Q==="onBlur"))){let ko=u==="none"?dt:Ve;ne.commit(ko)}}),Fm=q((Xe,tt)=>{if(s?.(Xe,tt),tt.isCanceled)return;Ze(Xe),(u==="none"&&de.current&&U||pe&&!mt.state.inputInsidePopup)&&qs(Pe(Xe),Ce(tt.reason,tt.event))}),gY=q((Xe,tt)=>{let Ft=Je(Xe),Zt=Qe.current??Xe;Qe.current=null;let ko=Ce($.itemPress,Zt),mn=Xt(Ft,"a")?.getAttribute("href");if(mn){mn.startsWith("#")&&Wl(!1,ko);return}if(Le){let Io=Array.isArray(Ve)?Ve:[],tn=zd(Io,tt,O),Dr=tn?db(Io,tt,O):[...Io,tt];if(Fm(Dr,ko),ko.isCanceled||!(Ie.current?Ie.current.value.trim()!=="":!1))return;if(mt.state.inputInsidePopup){qs("",Ce($.inputClear,ko.event,void 0,{isItemPress:!0}));let Qc=ut.current;Qc&&!tn&&(Qc.toggledValue=tt)}else Wl(!1,ko)}else{if(Fm(tt,ko),ko.isCanceled)return;Wl(!1,ko)}}),bY=q(()=>{let Xe=ne.inputRef.current?.form??mt.state.inputElement?.form;Xe&&typeof Xe.requestSubmit=="function"&&Xe.requestSubmit()}),RY=q(()=>{if(aY?.(!1),re(!1),ye(null),Yi(u==="none"?{activeIndex:null,selectedIndex:null}:{activeIndex:null}),Le&&Ie.current&&Ie.current.value!==""&&!ze.current&&qs("",Ce($.inputClear)),pe)if(mt.state.inputInsidePopup)Ie.current&&Ie.current.value!==""&&qs("",Ce($.inputClear));else{let Xe=Pe(Ve);if(Ie.current&&Ie.current.value!==Xe){let tt=Xe===""?$.inputClear:$.none;qs(Xe,Ce(tt))}}}),_m=Dt.useMemo(()=>Mn&&Am?{current:Xt(Am,'[role="dialog"]')}:de,[Mn,Am]),{mounted:hY,transitionStatus:PA,forceUnmount:EA}=Ya({open:xt,ref:_m,preventUnmountOnClose:mY,setPreventUnmountOnClose:wA,onUnmount:RY});Dt.useImperativeHandle(e.actionsRef,()=>({unmount:EA,close:()=>Wl(!1,Ce($.imperativeAction))}),[EA,Wl]),J(function(){let tt=se.current!==null&&Ee===null;if(se.current=Ee,xt&&(!tt||!we)||(xt||(De.current=null),u==="none"))return;let Ft=we?Ko:vt.current;Yi({selectedIndex:uc(Ft,Ve,O,Le)})},[xt,Ee,Ve,u,Le,we,Ko,O,Yi]),J(()=>{Te&&(vt.current=Ko,Fe.current.length=Ko.length)},[Te,Ko]),J(()=>{!xt&&ut.current?.hasQuery&&(ut.current=null)},[xt]),J(()=>{if(!xt&&Mn&&_m.current){ut.current=null;return}let Xe=we||Oe?Ko:vt.current,tt=ut.current;if(tt){let Io=xt||Mn||mt.state.positionerElement?.hidden===!1;if(tt.hasQuery){let tn=Ie.current;!$e||String(dt).trim()===""||Mn&&$e!=="always"&&(!tn||ft(tn.ownerDocument)!==tn)?ut.current=null:Io&&(Xe[0]!==void 0||!we&&!Oe)&&(mt.set("activeIndex",0),ut.current=null)}else if(String(dt).trim()===""&&(ut.current=null,Io)){let tn=tt.selection;$e==="always"&&!tn&&mt.state.selectionMode==="none"&&mt.set("activeIndex",0),queueMicrotask(()=>{if(!mt.state.open&&(!mt.state.inline||_m.current)||Ie.current&&Ie.current.value.trim()!=="")return;let Dr=mt.state.selectedValue,rd=mt.state.selectionMode==="multiple";if(rd&&Array.isArray(Dr)?Dr.length>0:mt.state.selectionMode!=="none"&&Dr!=null){let LA=we||Oe?Ko:vt.current,BA=Ds(LA,tt.toggledValue,mt.state.isItemEqualToValue);mt.set("activeIndex",BA!==-1?BA:uc(LA,Dr,mt.state.isItemEqualToValue,rd))}else tn?mt.set("activeIndex",null):$e==="always"&&mt.set("activeIndex",0)})}}if(!xt&&!Mn)return;let Ft=mt.state.activeIndex;if(Ft==null){if($e==="always"&&Xe.length>0){mt.set("activeIndex",0);return}Jc(void 0,-1,$.none);return}if(Ft>=Xe.length){Jc(void 0,-1,$.none),mt.set("activeIndex",null);return}let Zt=Xe[Ft],ko=et.current.value,mn=ko!==Dw&&yn(Zt,ko,mt.state.isItemEqualToValue);(et.current.index!==Ft||!mn)&&Jc(Zt,Ft,$.none)},[hA,$e,Jc,Oe,we,Ko,Mn,xt,_m,mt,dt]),J(()=>{if(u==="none"){ee(String(dt)!=="");return}ee(Le?Array.isArray(Ve)&&Ve.length>0:Ve!=null)},[ee,u,dt,Ve,Le]),Dt.useEffect(()=>{we&&$e&&Ko.length===0&&Yi({activeIndex:null})},[we,$e,Ko.length,Yi]);function xY(){xt&&Vo!==""&&Vo!==String(Ke)&&!CA&&re(!0)}function CY(){xt&&Ee!==null&&vA(!1)}let TA=!1;function IA(){!TA&&dt!==sr&&(TA=!0,qs(sr,Ce($.none)))}function yY(){u!=="none"&&(H(be),G(ub(Ve,oe.initialValue,O)),ne.change(Ve),pe&&!Ae&&!Rs&&IA())}function MA(){pe&&!Ae&&!Rs&&!ie&&IA()}function SY(){u==="none"&&(H(be),G(dt!==oe.initialValue),ne.change(dt))}oo(Vo,xY),oo(xt,CY),oo(Ve,yY),oo(sr,MA),oo(Te,MA),oo(dt,SY);let Vm=Is({open:Mn?!0:xt,onOpenChange:Wl,elements:{reference:Rs?nd:Om,floating:Am}}),DA=h?"grid":"listbox",km=xt||Mn,NA=km?"true":"false",Lm=Dt.useMemo(()=>{let Xe=Om?.tagName==="INPUT",tt=Om==null||Xe,Ft=tt||km,Zt=tt?{autoComplete:"off",spellCheck:"false",autoCorrect:"off",autoCapitalize:"none"}:{};return Ft&&(Zt.role="combobox",Zt["aria-expanded"]=NA,Zt["aria-haspopup"]=DA,Zt["aria-controls"]=km?xA?.id:void 0,Zt["aria-autocomplete"]=R?"none":L),{reference:Zt,floating:{role:"presentation"}}},[Om,km,NA,DA,xA?.id,L,R]),AA=_n(Vm,{enabled:!he&&v,event:"mousedown-only",toggle:!1,touchOpenDelay:Rs?0:100,reason:$.inputPress}),Bm=Vn(Vm,{enabled:!he&&!Mn,outsidePressEvent:{mouse:"sloppy",touch:"intentional"},bubbles:Mn?!0:void 0,outsidePress(Xe){let tt=Je(Xe);return!Ne(nd,tt)&&!Ne(je.current,tt)&&!Ne(He.current,tt)&&!Ne(cY,tt)}}),Zc=rc(Vm,{enabled:!he,id:ae,listRef:Fe,activeIndex:hA,selectedIndex:lY,virtual:!0,loopFocus:M,allowEscape:M&&!$e,focusItemOnOpen:ie||u==="none"&&!$e?!1:"auto",focusItemOnHover:E,resetOnPointerLeave:!N,orientation:h?"horizontal":void 0,rtl:Y==="rtl",disabledIndices:Et,grid:h?E_:void 0,onNavigate(Xe,tt){!tt&&!xt&&!(Mn&&Xe===null)||PA==="ending"||Yi({activeIndex:Xe,type:bi(tt),event:tt?.nativeEvent})}}),OA=Dt.useMemo(()=>Mt(Zc.reference,{onKeyDown(Xe){h&&mt.state.activeIndex==null&&(Xe.key==="ArrowLeft"||Xe.key==="ArrowRight")&&Xe.preventBaseUIHandler()}},Bm.reference,AA.reference,Lm.reference),[Zc.reference,Bm.reference,AA.reference,Lm.reference,h,mt]),FA=Dt.useMemo(()=>Mt(Zn,Bm.floating),[Bm.floating]),_A=Dt.useMemo(()=>Mt(Zc.floating,Lm.floating),[Zc.floating,Lm.floating]),VA=Dt.useMemo(()=>{let Xe=Zc.item;return{props:Xe?{...Xe,onFocus:void 0}:ot,id:ae,selectionMode:u,disabled:he,readOnly:R,isItemEqualToValue:O}},[Zc.item,ae,u,he,R,O]);mt.useContextCallback("setOpen",Wl),mt.useContextCallback("setInputValue",qs),mt.useContextCallback("setSelectedValue",Fm),mt.useContextCallback("setIndices",Yi),mt.useContextCallback("handleSelection",gY),mt.useContextCallback("forceMount",SA),mt.useContextCallback("requestSubmit",bY),mt.useContextCallback("onOpenChangeComplete",o),cb(()=>{mt.update({inline:k,popupProps:FA,listProps:_A,inputProps:OA,triggerProps:yA,itemRoot:VA})});let kA={id:ae,selectedValue:Ve,open:xt,mounted:hY,transitionStatus:PA,items:ve,inline:k,popupProps:FA,listProps:_A,inputProps:OA,triggerProps:yA,itemRoot:VA,openMethod:dY,selectionMode:u,name:be,form:m,disabled:he,readOnly:R,required:b,grid:h,virtualized:F,openOnInputClick:v,itemToStringLabel:Re,modal:_,autoHighlight:$e,isItemEqualToValue:O,submitOnItemClick:K,hasInputValue:Ae};J(()=>{mt.update({...kA,inputOwnsFormValue:u==="none"&&(k||!mt.state.inputInsidePopup)})},[mt,...Object.values(kA)]);let vY=Wt(x,ne.inputRef),wY=Dt.useMemo(()=>({query:Vo,hasItems:we,filteredItems:Rr,flatFilteredValues:Ko}),[Vo,we,Rr,Ko]),PY=Dt.useMemo(()=>Array.isArray(Da)?"":vr(Da,I),[Da,I]),EY=Le&&Array.isArray(Ve)&&Ve.length>0,LS=Le||u==="none"&&uY?void 0:be,TY=Dt.useMemo(()=>!Le||!Array.isArray(Ve)||!be?null:Ve.map(Xe=>{let tt=vr(Xe,I);return f("input",{type:"hidden",form:m,name:be,value:tt,disabled:he},tt)}),[Le,Ve,m,be,I,he]),IY=f(Dt.Fragment,{children:[e.children,f("input",{...ne.getValidationProps(he,{onFocus(){if(Rs){nd?.focus();return}(Ie.current||nd)?.focus()},onChange(Xe){if(Xe.nativeEvent.defaultPrevented||he||R)return;let tt=Xe.currentTarget.value,Ft=tt.toLowerCase(),Zt=Ce($.none,Xe.nativeEvent),ko=()=>vt.current.findIndex(Io=>vr(Io,I).toLowerCase()===Ft||Pe(Io).toLowerCase()===Ft);function mn(){if(Le)return;if(u==="none"){qs(tt,Zt);return}let Io=ko();Io===-1&&(Io=vt.current.findIndex((Dr,rd)=>{let Qc=ke.current[rd];return Qc!=null&&Qc.toLowerCase()===Ft}));let tn=Io===-1?void 0:vt.current[Io];tn!=null&&Fm?.(tn,Zt)}pe&&(SA(),Te&&ko()===-1&&mt.set("forceMounted",!0)),queueMicrotask(mn)}}),id:ae&&LS==null?`${ae}-hidden-input`:void 0,form:m,name:LS,autoComplete:V,disabled:he,required:b&&!EY,readOnly:R,value:PY,ref:vY,style:LS?Xn:wo,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),TY]});return f(bw.Provider,{value:mt,children:f(Rw.Provider,{value:Vm,children:f(xw.Provider,{value:we,children:f(hw.Provider,{value:wY,children:f(Cw.Provider,{value:dt,children:IY})})})})})}function __(e){let{openOnInputClick:t=!1,value:o,defaultValue:n,onValueChange:r,mode:s="list",itemToStringValue:i,...a}=e,l=(s==="inline"||s==="both")&&!e.readOnly,c=s==="inline"||s==="none",u=o!==void 0,[p,d]=qd.useState(n??""),[m,g]=qd.useState("");qd.useEffect(()=>{(u||!l)&&g("")},[o,u,l]);let R;l&&m!==""?R=m:u?R=o??"":R=p;let b=Au({locale:a.locale}),x=String((u?o:p)??"").trim(),h=c||a.filter===null?null:a.filter??b.contains;function C(S,w){g(""),u||d(S),r?.(S,w)}function y(S,w){e.onItemHighlighted?.(S,w),w.reason!==$.pointer&&g(l&&S!=null?Ln(S,i):"")}return f(Pb,{...a,itemToStringLabel:i,openOnInputClick:t,selectionMode:"none",fillInputOnItemPress:!0,filter:h,filterQuery:s==="both"?x:void 0,autoComplete:s,inputValue:R,defaultInputValue:n,onInputValueChange:C,onItemHighlighted:y})}var V_=T(D(),1);function k_(e){let{children:t}=e,o=tl(),n=null;return typeof t=="function"?n=t(String(o)):t!=null?n=t:n=o,f(V_.Fragment,{children:n})}var Jd=T(D(),1);var Xd={};me(Xd,{dirty:()=>G5,disabled:()=>_5,filled:()=>U5,focused:()=>W5,invalid:()=>B5,listEmpty:()=>Ow,popupOpen:()=>O5,popupSide:()=>Aw,pressed:()=>F5,readonly:()=>V5,required:()=>k5,touched:()=>H5,valid:()=>L5});var O5=At.popupOpen,F5=At.pressed,_5="data-disabled",V5="data-readonly",Aw="data-popup-side",k5="data-required",L5="data-valid",B5="data-invalid",H5="data-touched",G5="data-dirty",U5="data-filled",W5="data-focused",Ow="data-list-empty";var Ou={...Or,...Ut,popupSide:e=>e?{[Aw]:e}:null,listEmpty:e=>e?{[Ow]:""}:null};function ln(e,t,o){let{setFocused:n,focusOwnerRef:r}=ht(),s=q(i=>{(i?!e:r.current===s)&&(r.current=i&&s,o?.(i),n(i))});return J(()=>{let i=t.current;return i?.getRootNode()?.activeElement===i&&s(!0),()=>s(!1)},[e,t,s]),s}var Eb=5;function Fu(e,t){let o=j5(t);return e.clientX>=o.left-Eb&&e.clientX<=o.right+Eb&&e.clientY>=o.top-Eb&&e.clientY<=o.bottom+Eb}function j5(e){let t=e.getBoundingClientRect(),o=rt(e);if(Rt.env.jsdom)return t;let n=o.getComputedStyle(e,"::before"),r=o.getComputedStyle(e,"::after");if(!(n.content!=="none"||r.content!=="none"))return t;let i=parseFloat(n.width)||0,a=parseFloat(n.height)||0,l=parseFloat(r.width)||0,c=parseFloat(r.height)||0,u=Math.max(t.width,i,l),p=Math.max(t.height,a,c),d=u-t.width,m=p-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-m/2,bottom:t.bottom+m/2}}function _u(e){return e==null?void 0:`${e}-label`}function Vu(e,t){return e??t}function ku(e){let t=e.useState("mounted"),o=e.useState("popupSide"),n=e.useState("positionerElement");return t&&n?o:null}function Ri(){return ts().filteredItems.length===0}function Tb(e){return e==="rtl"?["ArrowRight","ArrowLeft"]:["ArrowLeft","ArrowRight"]}function L_(e,t){let o=e>=t-1?t-2:e;return o>=0?o:void 0}function Ib(e,t,o){let n=e.context.listRef.current[t];n&&(e.context.selectionEventRef.current=o,n.click(),e.context.selectionEventRef.current=null)}var Mb=Jd.forwardRef(function(t,o){let{render:n,className:r,nativeButton:s=!0,disabled:i=!1,id:a,style:l,...c}=t,{state:u,disabled:p,setTouched:d,validationMode:m,validation:g}=ht(),{labelId:R}=Vt(),b=Bt(),x=b.useState("selectionMode"),h=b.useState("disabled"),C=b.useState("readOnly"),y=b.useState("required"),S=b.useState("positionerElement"),w=b.useState("listElement"),v=b.useState("popupId"),P=b.useState("triggerProps"),N=b.useState("inputInsidePopup"),E=b.useState("id"),M=b.useState("labelId"),W=b.useState("open"),I=b.useState("selectedValue"),O=b.useState("activeIndex"),F=b.useState("selectedIndex"),k=b.useState("hasSelectedValue"),U=el(),_=tl(),B=ct(),L=p||h||i,V=Ri(),A=ku(b),K=Jd.useRef(null),H=ln(L,K);Ao({id:N?a:void 0});let G=N?a??E:a,oe=Vu(R,M),ee;W&&N?ee=v??Cb(E):W&&(ee=w?.id);let X=Jd.useRef("");function te(ue){X.current=ue.pointerType}let{reference:ce}=ic(U,{enabled:!W&&!C&&!h&&x==="single",listRef:b.context.labelsRef,activeIndex:O,selectedIndex:F,onMatch(ue){let Te=b.context.valuesRef.current[ue];Te!==void 0&&b.context.setSelectedValue(Te,Ce($.none))}}),{reference:le}=_n(U,{enabled:!h,event:"mousedown"}),{buttonRef:Q,getButtonProps:ne}=bt({native:s,disabled:L}),Y={...u,readOnly:C,open:W,disabled:L,popupSide:A,listEmpty:V,placeholder:x==="none"?!1:!k},ae=q(ue=>{b.set("triggerElement",ue)});return j("button",t,{ref:[o,Q,K,ae],state:Y,props:[P,le,ce,{id:G,tabIndex:N?0:-1,role:N?"combobox":void 0,"aria-expanded":W,"aria-haspopup":N?"dialog":"listbox","aria-controls":ee,"aria-required":N&&y||void 0,"aria-readonly":N&&C||void 0,"aria-labelledby":oe,onPointerDown:te,onPointerEnter:te,onFocus(){H(!0),!L&&B.start(0,b.context.forceMount)},onBlur(ue){if(!Ne(S,ue.relatedTarget)&&(d(!0),H(!1),m==="onBlur")){let Te=x==="none"?_:I;g.commit(Te)}},onMouseDown(ue){if(L||(N||U.set("domReferenceElement",ue.currentTarget),b.context.forceMount(),X.current!=="touch"&&(b.context.inputRef.current?.focus(),N||ue.preventDefault()),W))return;let Te=Be(ue.currentTarget);function fe(ve){let z=b.state.triggerElement;if(!z)return;let Re=Je(ve),xe=b.state.positionerElement,Pe=b.state.listElement;Ne(z,Re)||Ne(xe,Re)||Ne(Pe,Re)||Fu(ve,z)||b.context.setOpen(!1,Ce($.cancelOpen,ve))}N&&Te.addEventListener("mouseup",fe,{once:!0})},onKeyDown(ue){(ue.key==="ArrowDown"||ue.key==="ArrowUp")&&(St(ue),b.context.setOpen(!0,Ce($.listNavigation,ue.nativeEvent)),b.context.inputRef.current?.focus())}},g.getValidationProps(L,c),ne],stateAttributesMapping:Ou})});var B_=Mb;var oa=T(D(),1);var Db=T(D(),1),Fw=Db.createContext(void 0);function Nb(){return Db.useContext(Fw)}var Ab=T(D(),1),_w=Ab.createContext(void 0);function nl(e){let t=Ab.useContext(_w);if(t===void 0&&!e)throw new Error(_e(21));return t}var H_=T(D(),1);var Ob=H_.forwardRef(function(t,o){let n=Bt(),{buttonRef:r,getButtonProps:s}=bt({native:!1}),i=Wt(o,r);function a(c){n.context.setOpen(!1,Ce($.closePress,c.nativeEvent,c.currentTarget))}let l=s({onClick:a});return f("span",{ref:i,...l,"aria-label":"Dismiss",tabIndex:void 0,style:Xn})});var Fb=oa.forwardRef(function(t,o){let{render:n,className:r,disabled:s=!1,id:i,style:a,...l}=t,{state:c,disabled:u,setTouched:p,validationMode:d,validation:m}=ht(),{labelId:g}=Vt(),R=Nb(),x=!!nl(!0),h=Bt(),C=tl(),y=kt(),S=h.useState("required"),w=h.useState("disabled"),v=h.useState("readOnly"),P=h.useState("name"),N=h.useState("form"),E=h.useState("selectionMode"),M=h.useState("autoHighlight"),W=h.useState("inputProps"),I=h.useState("triggerProps"),O=h.useState("open"),F=h.useState("mounted"),k=h.useState("selectedValue"),U=h.useState("id"),_=h.useState("inline"),B=h.useState("modal"),L=!!M,V=ku(h),A=u||w||s,K=Ri(),H=ln(A,h.context.inputRef),G=x||_,oe=!G||B,ee=Ye(i??(G?void 0:U)),X=x?vw:c,[te,ce]=oa.useState(null),le=oa.useRef(!1),Q=oa.useRef(null);J(()=>{O||(Q.current=null)},[O]);let ne=E==="none"&&!x,Y=q(z=>{let Re=x||h.state.inline;Re&&!h.state.hasInputValue&&h.context.setInputValue("",Ce($.none)),h.update({inputElement:z,inputInsidePopup:Re,inputOwnsFormValue:ne})}),ae=x?l:m.getValidationProps(A,l);function Z(z){h.context.setIndices({activeIndex:null,selectedIndex:null,type:bi(z),event:z})}let ue={...X,open:O,disabled:A,readOnly:v,popupSide:V,listEmpty:K};function Te(z){if(!R)return;let Re,xe=R.chipsRef.current.length,[Pe]=Tb(y);return z.key===Pe&&(z.currentTarget.selectionStart??0)===0&&k.length>0&&(z.preventDefault(),Re=xe>0?xe-1:void 0),Re}let fe=j("input",t,{state:ue,ref:[o,h.context.inputRef,Y],props:[W,I,{value:te??C,"aria-readonly":v||void 0,"aria-required":S||void 0,"aria-labelledby":g,disabled:A,readOnly:v,required:E==="none"?S:void 0,form:N,...ne&&P&&{name:P},id:ee,onFocus(){if(H(!0),!_)return;let z=Q.current;Q.current=null,!(z==null||!Object.hasOwn(h.context.valuesRef.current,z))&&h.context.setIndices({activeIndex:z})},onBlur(){p(!0),H(!1);let z=h.state.activeIndex;if(_&&z!==null&&M!=="always"&&(Q.current=z,h.context.setIndices({activeIndex:null})),d==="onBlur"){let Re=E==="none"?C:k;m.commit(Re)}},onCompositionStart(z){Rt.os.android||(le.current=!0,ce(z.currentTarget.value))},onCompositionEnd(z){le.current=!1;let Re=z.currentTarget.value;ce(null),h.context.setInputValue(Re,Ce($.inputChange,z.nativeEvent))},onChange(z){let Re=z.nativeEvent,xe=Re.inputType,Pe=!xe||xe==="insertReplacementText",ie=le.current||!Pe;function re(Fe){v||A||!Fe||!ie||(h.context.setOpen(!0,Ce($.inputChange,Re)),L||Z(Re))}if(le.current){let Fe=z.currentTarget.value;ce(Fe),Fe===""&&!h.state.openOnInputClick&&!h.state.inputInsidePopup&&h.context.setOpen(!1,Ce($.inputClear,Re));let ke=Fe.trim(),de=L&&ke!=="";re(ke),O&&h.state.activeIndex!==null&&!de&&Z(Re);return}let Ee=Ce($.inputChange,Re);if(h.context.setInputValue(z.currentTarget.value,Ee),Ee.isCanceled)return;let ye=z.currentTarget.value==="",se=Ce($.inputClear,Re);ye&&!h.state.inputInsidePopup&&(E==="single"&&h.context.setSelectedValue(null,se),h.state.openOnInputClick||h.context.setOpen(!1,se)),re(z.currentTarget.value.trim()),O&&h.state.activeIndex!==null&&!L&&Z(Re)},onKeyDown(z){if(z.ctrlKey||z.shiftKey||z.altKey||z.metaKey)return;if(A||v){v&&z.key==="Enter"&&O&&h.state.activeIndex!==null&&St(z);return}let Re=z.currentTarget,xe=Re.scrollWidth-Re.clientWidth,Pe=y==="rtl";if(z.key==="Home"){St(z);let re=Rt.engine.gecko&&Pe?Re.value.length:0;Re.setSelectionRange(re,re),Re.scrollLeft=0;return}if(z.key==="End"){St(z);let re=Rt.engine.gecko&&Pe?0:Re.value.length;Re.setSelectionRange(re,re),Re.scrollLeft=Pe?-xe:xe;return}if(!F&&z.key==="Escape"){let re=E==="multiple"&&Array.isArray(k)?k.length===0:k===null,Ee=Ce($.escapeKey,z.nativeEvent),ye=E==="multiple"?[]:null;h.context.setInputValue("",Ee),h.context.setSelectedValue(ye,Ee),!re&&!h.state.inline&&!Ee.isPropagationAllowed&&z.stopPropagation();return}if(R&&z.key==="Backspace"&&Re.value===""&&Array.isArray(k)&&k.length>0){let re=R.chipsRef.current.length,Ee=re>0?re-1:k.length-1,ye=k.filter((se,Fe)=>Fe!==Ee);Z(z.nativeEvent),h.context.setSelectedValue(ye,Ce($.none,z.nativeEvent));return}let ie=Te(z);if(ie!==void 0&&R?.chipsRef.current[ie]?.focus(),z.which!==229&&z.key==="Enter"&&O){let re=h.state.activeIndex,Ee=z.nativeEvent;if(re===null){if(_)return;h.context.setOpen(!1,Ce($.none,Ee));return}St(z),Ib(h,re,Ee)}}},ae],stateAttributesMapping:Ou}),ve=x?f(Nu.Provider,{value:ww,children:fe}):fe;return f(oa.Fragment,{children:[O&&oe&&f(Ob,{ref:h.context.startDismissRef}),ve]})});var G_=T(D(),1);function _b(e,t,o,n){if(e.baseUIHandlerPrevented)return;let r=Je(e.nativeEvent),s=lt(r)?r:null;s!==e.currentTarget&&(n?.(s)||Zl(s))||(e.preventDefault(),!o&&(t.context.inputRef.current?.focus(),t.state.openOnInputClick&&t.context.setOpen(!0,Ce($.inputPress,e.nativeEvent))))}var Vb=G_.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t,{state:a}=ht(),l=Bt(),c=l.useState("open"),u=l.useState("disabled"),p=l.useState("readOnly"),d=l.useState("hasSelectedValue"),m=l.useState("selectionMode"),g=ku(l),R=u,b=Ri(),h={...a,open:c,disabled:R,readOnly:p,popupSide:g,listEmpty:b,placeholder:m==="none"?!1:!d},C=q(y=>{l.set("inputGroupElement",y)});return j("div",t,{ref:[o,C],props:[{role:"group",onMouseDown(y){_b(y,l,R,S=>Ne(l.context.chipsContainerRef.current,S))}},i],state:h,stateAttributesMapping:Ou})});var U_=Vb;var W_=T(D(),1);var kb=W_.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t;return j("span",t,{ref:o,props:[{"aria-hidden":!0,children:"\u25BC"},i]})});var j_=T(D(),1);var z5={...Lt,...qn},Lb=j_.forwardRef(function(t,o){let{render:n,className:r,disabled:s=!1,nativeButton:i=!0,keepMounted:a=!1,style:l,...c}=t,{disabled:u}=ht(),p=Bt(),d=p.useState("selectionMode"),m=p.useState("disabled"),g=p.useState("readOnly"),R=p.useState("open"),b=p.useState("selectedValue"),x=p.useState("hasSelectionChips"),h=tl(),C=!1;d==="none"?C=h!=="":d==="single"?C=b!=null:C=x;let y=u||m||s,{buttonRef:S,getButtonProps:w}=bt({native:i,disabled:y}),{mounted:v,transitionStatus:P,setMounted:N}=so(C),E={disabled:y,visible:C,open:R,transitionStatus:P};It({open:C,ref:p.context.clearRef,onComplete(){C||N(!1)}});let M=j("button",t,{state:E,ref:[o,S,p.context.clearRef],props:[{tabIndex:-1,children:"x",onMouseDown(I){I.preventDefault()},onClick(I){if(y||g)return;let O=bi(I);p.context.setInputValue("",Ce($.clearPress,I.nativeEvent)),d!=="none"?(p.context.setSelectedValue(Array.isArray(b)?[]:null,Ce($.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,w],stateAttributesMapping:z5});return a||v?M:null});var Bb=T(D(),1);var Y_=T(D(),1);var Lu=T(D(),1);var z_=Lu.createContext(null);function $_(){return Lu.useContext(z_)}function K_(e){let{children:t,items:o}=e,n=Lu.useMemo(()=>({items:o}),[o]);return f(z_.Provider,{value:n,children:t})}function Bu(e){let{children:t}=e,{filteredItems:o}=ts(),n=$_(),r=n?n.items:o;return f(Y_.Fragment,{children:r.map(t)})}var Hb=Bb.forwardRef(function(t,o){var n;let{render:r,className:s,style:i,children:a,...l}=t,c=Bt(),u=el(),p=!!nl(!0),{filteredItems:d,hasItems:m}=ts(),g=c.useState("selectionMode"),R=c.useState("grid"),b=c.useState("readOnly"),x=c.useState("listProps"),h=c.useState("virtualized"),C=c.useState("forceMounted"),y=g==="multiple",S=d.length===0,w=q(I=>{c.set("positionerElement",I)}),v=q(I=>{c.set("listElement",I)}),P=Bb.useMemo(()=>typeof a=="function"?n||(n=f(Bu,{children:a})):a,[a]),N={empty:S},E=u.useState("floatingId"),M=j("div",t,{state:N,ref:[o,v,p?null:w],props:[x,{children:P,tabIndex:-1,id:E,role:R?"grid":"listbox","aria-multiselectable":y?"true":void 0,"aria-readonly":!R&&b?!0:void 0,onKeyDown(I){if(!(c.state.disabled||c.state.readOnly)&&I.key==="Enter"){let O=c.state.activeIndex;if(O==null)return;St(I),Ib(c,O,I.nativeEvent)}}},l]});if(h)return M;let W=m&&!C?void 0:c.context.labelsRef;return f(Cn,{elementsRef:c.context.listRef,labelsRef:W,children:M})});var q_=T(D(),1);var Gb=T(D(),1);var $5="\u2060",K5=200;function Y5(e){let t=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT),o=null;for(;t.nextNode();){let n=t.currentNode;n.nodeValue!==""&&(o=n)}return o}function Hu(e=!0){let t=ct(),o=Gb.useRef(null);return Gb.useEffect(()=>{if(!e||Rt.os.ios)return;let n=o.current;if(n==null)return;let r=Y5(n);if(r==null)return;let s=r.data,i=`${s}${$5}`;return r.nodeValue=i,t.start(K5,()=>{r.nodeValue===i&&(r.nodeValue=s)}),()=>{t.clear(),r.nodeValue===i&&(r.nodeValue=s)}},[e,o,t]),o}var Ub=q_.forwardRef(function(t,o){let{render:n,className:r,style:s,children:i,...a}=t,l=Hu();return j("div",t,{ref:[o,l],props:[{children:i,role:"status","aria-live":"polite","aria-atomic":!0},a]})});var J_=T(D(),1);var Wb=T(D(),1),Vw=Wb.createContext(void 0);function X_(){let e=Wb.useContext(Vw);if(e===void 0)throw new Error(_e(20));return e}var jb=J_.forwardRef(function(t,o){let{keepMounted:n=!1,...r}=t,s=Bt(),i=s.useState("mounted"),a=s.useState("forceMounted");return i||n||a?f(Vw.Provider,{value:n,children:f(Vr,{ref:o,...r})}):null});var Z_=T(D(),1);var q5={...lo,...Lt},zb=Z_.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t,a=Bt(),l=a.useState("open"),c=a.useState("mounted"),u=a.useState("transitionStatus");return j("div",t,{state:{open:l,transitionStatus:u},ref:o,stateAttributesMapping:q5,props:[{role:"presentation",hidden:!c,style:{userSelect:"none",WebkitUserSelect:"none"}},i]})});var fV=T(D(),1);var Ur=T(D(),1);var os=T(D(),1);function $b(e){let{nodeId:t,externalTree:o,rootContext:n}=e,r=n.useState("referenceElement"),s=n.useState("floatingElement"),i=n.useState("domReferenceElement"),a=n.useState("open"),l=n.useState("floatingId"),[c,u]=os.useState(null),p=os.useRef(null),d=jo(o),m=os.useMemo(()=>({reference:r,floating:s,domReference:i}),[r,s,i]),g=o_({...e,elements:{...m,...c&&{reference:c}}}),R=os.useCallback(C=>{let y=lt(C)?{getBoundingClientRect:()=>C.getBoundingClientRect(),getClientRects:()=>C.getClientRects(),contextElement:C}:C;u(y),g.refs.setReference(y)},[g.refs]),b=os.useMemo(()=>({...g.refs,setPositionReference:R,domReference:p}),[g.refs,R]),x=os.useMemo(()=>({...g.elements,domReference:i}),[g.elements,i]),h=os.useMemo(()=>({...g,dataRef:n.context.dataRef,open:a,onOpenChange:n.setOpen,events:n.context.events,floatingId:l,refs:b,elements:x,nodeId:t,rootStore:n}),[g,b,x,t,n,a,l]);return J(()=>{i&&(p.current=i)},[i]),J(()=>{n.context.dataRef.current.floatingContext=h;let C=d?.nodesRef.current.find(y=>y.id===t);C&&(C.context=h)}),os.useMemo(()=>({...g,context:h,refs:b,elements:x,rootStore:n}),[g,b,x,h,n])}var X5=e=>({name:"arrow",options:e,async fn(t){let{x:o,y:n,placement:r,rects:s,platform:i,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=ti(e,t)||{};if(c==null)return{};let p=Eg(u),d={x:o,y:n},m=yd(r),g=Cd(m),R=await i.getDimensions(c),b=m==="y",x=b?"top":"left",h=b?"bottom":"right",C=b?"clientHeight":"clientWidth",y=s.reference[g]+s.reference[m]-d[m]-s.floating[g],S=d[m]-s.reference[m],w=a.floating[C]||s.floating[g],v=y/2-S/2,P=w/2-R[g]/2-1,N=Math.min(p[x],P),E=Math.min(p[h],P),M=N,W=w-R[g]-E,I=w/2-R[g]/2+v,O=wg(M,I,W),F=!l.arrow&&Fr(r)!=null&&I!==O&&s.reference[g]/2-(I<M?N:E)-R[g]/2<0,k=F?I<M?I-M:I-W:0;return{[m]:d[m]+k,data:{[m]:O,centerOffset:I-O-k,...F&&{alignmentOffset:k}},reset:F}}}),Q_=(e,t)=>{let{name:o,fn:n}=X5(e);return{name:o,fn:n,options:[e,t]}};var eV={name:"hide",async fn(e){let{width:t,height:o,x:n,y:r}=e.rects.reference,s=t===0&&o===0&&n===0&&r===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 Gu={sideX:"left",sideY:"top"};var Kb="--available-width",Yb="--available-height",tV="--anchor-width",oV="--anchor-height",nV="--transform-origin",rV="--positioner-width",sV="--positioner-height";var aV=Kb,lV=Yb;function pV(e,t,o){let n=e==="inline-start"||e==="inline-end";return{top:"top",right:n?o?"inline-start":"inline-end":"right",bottom:"bottom",left:n?o?"inline-end":"inline-start":"left"}[t]}function cV(e,t,o){let{rects:n,placement:r}=e;return{side:pV(t,Dn(r),o),align:Fr(r)||"center",anchor:{width:n.reference.width,height:n.reference.height},positioner:{width:n.floating.width,height:n.floating.height}}}function wr(e){return kw(e,$b)}function kw(e,t){let{anchor:o,positionMethod:n="absolute",side:r="bottom",sideOffset:s=0,align:i="center",alignOffset:a=0,collisionBoundary:l,collisionPadding:c=5,sticky:u=!1,arrowPadding:p=5,disableAnchorTracking:d=!1,inline:m,keepMounted:g=!1,floatingRootContext:R,mounted:b,collisionAvoidance:x,shift:h,nodeId:C,adaptiveOrigin:y,lazyFlip:S=!1,externalTree:w}=e,v=x.side||"flip",P=x.align||"flip",N=x.fallbackAxisSide||"end",E=h?.crossAxis??!1,M=h?.rootBoundary,W=typeof o=="function"?o:void 0,I=q(W),O=W?I:o,F=Tt(o),k=Tt(b),_=kt()==="rtl",[B,L]=Ur.useState(null);!b&&B!==null&&L(null);let V=S==="placement",A=B?Dn(B):null,K=B&&V?Fr(B)||"center":null,H=A||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":_?"left":"right","inline-start":_?"right":"left"}[r],G=K||i,oe=G==="center"?H:`${H}-${G}`,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 X=1,te=r==="bottom"?X:0,ce=r==="top"?X:0,le=r==="right"?X:0,Q=r==="left"?X:0,ne={boundary:l==="clipping-ancestors"?"clippingAncestors":l,padding:ee},Y=Ur.useRef(null),ae=Tt(s),Z=Tt(a),ue=typeof s!="function"?s:0,Te=typeof a!="function"?a:0,fe=[];m&&fe.push(m),fe.push(Qv(be=>{let Le=cV(be,r,_),pe=typeof ae.current=="function"?ae.current(Le):ae.current,Ae=typeof Z.current=="function"?Z.current(Le):Z.current;return{mainAxis:pe,crossAxis:Ae,alignmentAxis:Ae}},[ue,Te,_,r]));let ve=P==="none"&&v!=="shift",z=!ve&&(u||E||v==="shift"),Re=v==="none"?null:ow({...ne,padding:{top:ee.top+X+te,right:ee.right+X+Q,bottom:ee.bottom+X+ce,left:ee.left+X+le},mainAxis:!E&&v==="flip",crossAxis:P==="flip"?"alignment":!1,fallbackAxisSideDirection:N}),xe=ve?null:ew({...ne,rootBoundary:M,mainAxis:P!=="none",crossAxis:z,limiter:u||E?void 0:tw(be=>{if(!Y.current)return{};let{width:Le,height:pe}=Y.current.getBoundingClientRect(),Ae=Cr(Dn(be.placement)),we=Ae==="y"?Le:pe,Oe=Ae==="y"?ee.left+ee.right:ee.top+ee.bottom;return{offset:we/2+Oe/2}})},[ne,u,E,M,ee,P]);v==="shift"||P==="shift"||G==="center"?fe.push(xe,Re):fe.push(Re,xe),fe.push(nw({...ne,apply({elements:{floating:be},availableWidth:Le,availableHeight:pe,rects:Ae}){if(!k.current)return;let we=be.style;we.setProperty(aV,`${Le}px`),we.setProperty(lV,`${pe}px`);let Oe=rt(be).devicePixelRatio||1,{x:$e,y:Ve,width:Ze,height:at}=Ae.reference,Ke=(Math.round(($e+Ze)*Oe)-Math.round($e*Oe))/Oe,dt=(Math.round((Ve+at)*Oe)-Math.round(Ve*Oe))/Oe;we.setProperty(tV,`${Ke}px`),we.setProperty(oV,`${dt}px`)}}),Q_(be=>({element:Y.current||Be(be.elements.floating).createElement("div"),padding:Y.current?p:0}),[p]),{name:"transformOrigin",fn(be){let{elements:{floating:Le},middlewareData:pe,placement:Ae,platform:we,rects:Oe,y:$e}=be,Ve=Dn(Ae),Ze=Fr(Ae),at=Cr(Ve)==="y",Ke=Y.current,dt=typeof s=="function"?s(cV(be,r,_)):s,jt;if(!Ke&&Ze&&Math.abs(at?pe.shift?.x||0:pe.shift?.y||0)<=1)jt=Ze==="start"===(at&&we.isRTL?.(Le)===!0)?"100%":"0%";else{let mo=at?pe.arrow?.x||0:pe.arrow?.y||0,xn=at?Ke?.clientWidth||0:Ke?.clientHeight||0;jt=`${mo+xn/2}px`}let xt=Ve==="top"||Ve==="left"?`calc(100% + ${dt}px)`:`${-dt}px`;return z&&at&&Math.abs(pe.shift?.y||0)>dt&&(xt=`${Oe.reference.y+Oe.reference.height/2-$e}px`),Le.style.setProperty(nV,at?`${jt} ${xt}`:`${xt} ${jt}`),{}}},eV,y),J(()=>{!b&&R&&R.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[b,R]);let Pe=Ur.useMemo(()=>({ancestorScroll:!d,elementResize:!d&&typeof ResizeObserver<"u",layoutShift:!d&&typeof IntersectionObserver<"u"}),[d]),{refs:ie,elements:re,x:Ee,y:ye,middlewareData:se,update:Fe,placement:ke,context:de,isPositioned:Ie,floatingStyles:Me}=t({rootContext:R,open:g?b:void 0,placement:oe,middleware:fe,strategy:n,whileElementsMounted:g?void 0:(...be)=>Vd(...be,Pe),nodeId:C,externalTree:w}),{sideX:We,sideY:Ue}=se.adaptiveOrigin||Gu,ze=Ie?n:"fixed",He=Ur.useMemo(()=>{let be;return Ie?y?be={position:ze,[We]:Ee,[Ue]:ye}:be={...Me,position:ze}:be={position:ze,top:0,left:0},be[aV]="100vw",be[lV]="100vh",Ie||(be.opacity=0),be},[y,ze,We,Ee,Ue,ye,Me,Ie]),je=Ur.useRef(null);J(()=>{if(!b)return;let be=F.current,Le=typeof be=="function"?be():be,Ae=(uV(Le)?Le.current:Le)||null||null;Ae!==je.current&&(ie.setPositionReference(Ae),je.current=Ae)},[b,ie,O,F]),Ur.useEffect(()=>{if(!b)return;let be=F.current;typeof be!="function"&&uV(be)&&be.current!==je.current&&(ie.setPositionReference(be.current),je.current=be.current)},[b,ie,O,F]),Ur.useEffect(()=>{if(g&&b&&re.reference&&re.floating)return Vd(re.reference,re.floating,Fe,Pe)},[g,b,re,Fe,Pe]);let Qe=Dn(ke),et=pV(r,Qe,_),ut=Fr(ke)||"center",vt=!!se.hide?.referenceHidden;J(()=>{S&&b&&Ie&&(Qe!==H||V&&ut!==G)&&L(ke)},[S,V,b,Ie,ke,Qe,ut,H,G]);let De=Ur.useMemo(()=>({position:"absolute",top:se.arrow?.y,left:se.arrow?.x}),[se.arrow]),he=se.arrow?.centerOffset!==0;return Ur.useMemo(()=>({positionerStyles:He,arrowStyles:De,arrowRef:Y,arrowUncentered:he,side:et,align:ut,physicalSide:Qe,anchorHidden:vt,refs:ie,context:de,isPositioned:Ie,update:Fe}),[He,De,Y,he,et,ut,Qe,vt,ie,de,Ie,Fe])}function uV(e){return e!=null&&"current"in e}function Sn(e){return e==="starting"?JO:ot}function Qn(e,t,{styles:o,transitionStatus:n,props:r,refs:s,hidden:i,inert:a=!1}){let l={...o};return a&&(l.pointerEvents="none"),j("div",e,{state:t,ref:s,props:[{role:"presentation",hidden:i,style:l},Sn(n),r],stateAttributesMapping:lo})}var dV=T(D(),1);var J5=20;function rl(e,t,o,n){let[r,s]=dV.useState(!1);J(()=>{if(!e||!t||o==null){s(!1);return}let i=Be(o).documentElement.clientWidth,a=o.offsetWidth;s(i>0&&a>0&&a>=i-J5)},[e,t,o]),hg(e&&(!t||r),n)}var qb=fV.forwardRef(function(t,o){let{render:n,className:r,anchor:s,positionMethod:i,side:a,align:l,sideOffset:c,alignOffset:u,collisionBoundary:p="clipping-ancestors",collisionPadding:d,arrowPadding:m,sticky:g,disableAnchorTracking:R=!1,collisionAvoidance:b=ja,style:x,...h}=t,C=Bt(),y=el(),S=X_(),w=C.useState("modal"),v=C.useState("open"),P=C.useState("mounted"),N=C.useState("openMethod"),E=C.useState("positionerElement"),M=C.useState("triggerElement"),W=C.useState("inputElement"),I=C.useState("inputGroupElement"),O=C.useState("inputInsidePopup"),F=C.useState("transitionStatus"),k=Ri(),_=wr({anchor:s??(O?M:I??W),floatingRootContext:y,positionMethod:i,mounted:P,side:a,sideOffset:c,align:l,alignOffset:u,arrowPadding:m,collisionBoundary:p,collisionPadding:d,sticky:g,disableAnchorTracking:R,keepMounted:S,collisionAvoidance:b,lazyFlip:!0});rl(v&&w,N==="touch",E,M);let B={open:v,side:_.side,align:_.align,anchorHidden:_.anchorHidden,empty:k};J(()=>{C.set("popupSide",_.side)},[C,_.side]);let L=q(A=>{C.set("positionerElement",A)}),V=Qn(t,B,{styles:_.positionerStyles,transitionStatus:F,props:h,refs:[o,L],hidden:!P,inert:!v});return f(_w.Provider,{value:_,children:[P&&w&&f(gi,{inert:sn(!v),cutout:I??W??M}),V]})});var Xb=T(D(),1);var Z5={...lo,...Lt},Jb=Xb.forwardRef(function(t,o){let{render:n,className:r,style:s,initialFocus:i,finalFocus:a,...l}=t,c=Bt(),u=nl(),p=el(),d=c.useState("mounted"),m=c.useState("open"),g=c.useState("openMethod"),R=c.useState("popupProps"),b=c.useState("transitionStatus"),x=c.useState("inputInsidePopup"),h=c.useState("inputElement"),C=c.useState("modal"),y=c.useState("id"),S=Ri(),w=l.id??(x?Cb(y):void 0);J(()=>(c.set("popupId",c.context.popupRef.current?.id||w),()=>{c.set("popupId",void 0)}),[c,w]),It({open:m,ref:c.context.popupRef,onComplete(){m&&c.context.onOpenChangeComplete(!0)}});let v={open:m,side:u.side,align:u.align,anchorHidden:u.anchorHidden,transitionStatus:b,empty:S},P=j("div",t,{state:v,ref:[o,c.context.popupRef],props:[R,{id:w,role:x?"dialog":"presentation",onFocus(I){let O=Je(I.nativeEvent);g!=="touch"&&(Ne(c.state.listElement,O)||O===I.currentTarget)&&c.context.inputRef.current?.focus()}},Sn(b),l],stateAttributesMapping:Z5}),E=i===void 0?x?I=>I==="touch"?c.context.popupRef.current:h:!1:i,M;a!=null?M=a:M=x?void 0:!1;let W=!x||C;return f(Br,{context:p,disabled:!d,modal:W,openInteractionType:g,initialFocus:E,returnFocus:M,getInsideElements:()=>[c.context.startDismissRef.current,c.context.endDismissRef.current],children:f(Xb.Fragment,{children:[P,W&&f(Ob,{ref:c.context.endDismissRef})]})})});var mV=T(D(),1);var Zb=mV.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t,a=Bt(),{arrowRef:l,side:c,align:u,arrowUncentered:p,arrowStyles:d}=nl(),g={open:a.useState("open"),side:c,align:u,uncentered:p};return j("div",t,{ref:[l,o],stateAttributesMapping:lo,state:g,props:{style:d,"aria-hidden":!0,...i}})});var Uu=T(D(),1);var Qb=T(D(),1),Lw=Qb.createContext(void 0);function gV(){let e=Qb.useContext(Lw);if(e===void 0)throw new Error(_e(18));return e}var eR=Uu.forwardRef(function(t,o){let{render:n,className:r,style:s,items:i,...a}=t,c=Bt().useState("grid"),[u,p]=Uu.useState(),d=Uu.useMemo(()=>({labelId:u,setLabelId:p,items:i}),[u,p,i]),m=j("div",t,{ref:o,props:[{role:c?"rowgroup":"group","aria-labelledby":u},a]}),g=f(Lw.Provider,{value:d,children:m});return i?f(K_,{items:i,children:g}):g});var bV=T(D(),1);var tR=bV.forwardRef(function(t,o){let{render:n,className:r,style:s,id:i,...a}=t,{setLabelId:l}=gV(),c=Ye(i);return J(()=>(l(c),()=>{l(p=>p===c?void 0:p)}),[c,l]),j("div",t,{ref:o,props:[{id:c,"aria-hidden":!0},a]})});var na=T(D(),1),xV=T(on(),1);var oR=T(D(),1),Bw=oR.createContext(void 0);function RV(){let e=oR.useContext(Bw);if(!e)throw new Error(_e(19));return e}var nR=T(D(),1),Hw=nR.createContext(!1);function hV(){return nR.useContext(Hw)}function CV(e){let{componentProps:t,forwardedRef:o,virtualized:n,indexFromFilter:r}=e,{render:s,className:i,style:a,value:l=null,index:c,disabled:u=!1,nativeButton:p=!1,...d}=t,m=na.useRef(null),g=bo({guess:!0,index:c,textRef:m}),R=Bt(),b=hV(),x=T_(),{props:h,id:C,selectionMode:y,disabled:S,readOnly:w,isItemEqualToValue:v}=R.useState("itemRoot"),P=S||u,N=y!=="none",E=c??r??g.index,M=E!==-1,W=R.useState("isActive",E),I=R.useState("isSelected",l),O=na.useRef(null),F=C!=null&&M?`${C}-${E}`:void 0,k=I&&N;J(()=>{if(!(M&&(n||c!=null)))return;let G=R.context.listRef.current;return G[E]=O.current,()=>{delete G[E]}},[M,n,E,c,R]),J(()=>{if(!M||x)return;let H=R.context.valuesRef.current;return H[E]=l,()=>{delete H[E]}},[M,x,E,l,R]),J(()=>{if(!M||x)return;let H=R.state.selectedValue,G=R.state.selectedIndex;R.state.selectionMode==="multiple"&&Array.isArray(H)?G=pb(E,l,R.context.valuesRef.current,H,v,G):yn(l,H,v)&&(G=E),R.set("selectedIndex",G)},[M,x,R,E,l,v]);let{getButtonProps:U,buttonRef:_}=bt({disabled:P,focusableWhenDisabled:!0,native:p,composite:!0}),B={disabled:P,selected:k,highlighted:W};function L(H){function G(){R.context.handleSelection(H,l)}R.state.submitOnItemClick?(xV.flushSync(G),R.context.requestSubmit()):G()}let V={id:F,role:b?"gridcell":"option","aria-selected":N?k:void 0,tabIndex:void 0,onPointerDownCapture(H){H.isPrimary&&(R.context.pointerDownItemRef.current=H.currentTarget),H.preventDefault()},onMouseDown(H){H.preventDefault()},onClick(H){P||w||L(H.nativeEvent)},onMouseUp(H){let G=R.context.pointerDownItemRef.current===H.currentTarget;R.context.pointerDownItemRef.current=null,!(P||w||H.button!==0||G||!W)&&L(H.nativeEvent)}},A=j("div",t,{ref:[_,o,g.ref,O],state:B,props:[h,V,d,U]}),K=na.useMemo(()=>({selected:k,textRef:m}),[k,m]);return f(Bw.Provider,{value:K,children:A})}function Q5(e){let{componentProps:t,forwardedRef:o}=e,r=Bt().useState("isItemEqualToValue"),{flatFilteredValues:s}=ts(),i=t.value??null,a=Ds(s,i,r);return f(CV,{componentProps:t,forwardedRef:o,virtualized:!0,indexFromFilter:a})}var rR=na.memo(na.forwardRef(function(t,o){let r=Bt().useState("virtualized");return r&&t.index==null?f(Q5,{componentProps:t,forwardedRef:o}):f(CV,{componentProps:t,forwardedRef:o,virtualized:r,indexFromFilter:void 0})}));var yV=rR;var SV=T(D(),1);var sR=SV.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t,a=j("div",t,{ref:o,props:[{role:"row"},i]});return f(Hw.Provider,{value:!0,children:a})});var vV=T(D(),1);var iR=vV.forwardRef(function(t,o){let{render:n,className:r,style:s,children:i,...a}=t,{filteredItems:l}=ts(),c=Bt(),u=Hu(),p=l.length===0?i:null;return j("div",t,{ref:[o,c.context.emptyRef,u],props:[{children:p,role:"status","aria-live":"polite","aria-atomic":!0},a]})});var wV=T(D(),1);var Wu=wV.forwardRef(function(t,o){let{className:n,render:r,orientation:s="horizontal",style:i,...a}=t;return j("div",t,{state:{orientation:s},ref:o,props:[{role:"presentation"},a]})});var PV=Wu;function aR(){return ts().filteredItems}var Gw={};me(Gw,{dirty:()=>c6,disabled:()=>o6,filled:()=>u6,focused:()=>p6,invalid:()=>a6,listEmpty:()=>d6,popupOpen:()=>e6,popupSide:()=>r6,pressed:()=>t6,readonly:()=>n6,required:()=>s6,touched:()=>l6,valid:()=>i6});var e6=At.popupOpen,t6=At.pressed,o6="data-disabled",n6="data-readonly",r6="data-popup-side",s6="data-required",i6="data-valid",a6="data-invalid",l6="data-touched",c6="data-dirty",u6="data-filled",p6="data-focused",d6="data-list-empty";var Uw={};me(Uw,{dirty:()=>y6,disabled:()=>g6,filled:()=>S6,focused:()=>v6,invalid:()=>x6,listEmpty:()=>w6,popupOpen:()=>f6,popupSide:()=>R6,pressed:()=>m6,readonly:()=>b6,touched:()=>C6,valid:()=>h6});var f6="data-popup-open",m6="data-pressed",g6="data-disabled",b6="data-readonly",R6="data-popup-side",h6="data-valid",x6="data-invalid",C6="data-touched",y6="data-dirty",S6="data-filled",v6="data-focused",w6="data-list-empty";var jw={};me(jw,{disabled:()=>TV,endingStyle:()=>DV,popupOpen:()=>EV,startingStyle:()=>MV,visible:()=>IV});var Ww={};me(Ww,{disabled:()=>TV,endingStyle:()=>DV,popupOpen:()=>EV,startingStyle:()=>MV,visible:()=>IV});var EV=At.popupOpen,TV="data-disabled",IV="data-visible",MV=ge.startingStyle,DV=ge.endingStyle;var lR={};me(lR,{closed:()=>E6,endingStyle:()=>I6,open:()=>P6,startingStyle:()=>T6});var P6=ge.open,E6=ge.closed,T6=ge.startingStyle,I6=ge.endingStyle;var cR={};me(cR,{anchorHeight:()=>A6,anchorWidth:()=>N6,availableHeight:()=>D6,availableWidth:()=>M6,transformOrigin:()=>O6});var M6="--available-width",D6="--available-height",N6="--anchor-width",A6="--anchor-height",O6="--transform-origin";var uR={};me(uR,{align:()=>L6,anchorHidden:()=>V6,closed:()=>_6,empty:()=>B6,open:()=>F6,side:()=>k6});var F6=ge.open,_6=ge.closed,V6=ge.anchorHidden,k6=ge.side,L6=ge.align,B6="data-empty";var pR={};me(pR,{align:()=>z6,anchorHidden:()=>$6,closed:()=>G6,empty:()=>K6,endingStyle:()=>W6,open:()=>H6,side:()=>j6,startingStyle:()=>U6});var H6=ge.open,G6=ge.closed,U6=ge.startingStyle,W6=ge.endingStyle,j6=ge.side,z6=ge.align,$6=ge.anchorHidden,K6="data-empty";var dR={};me(dR,{align:()=>J6,closed:()=>q6,open:()=>Y6,side:()=>X6,uncentered:()=>Z6});var Y6=ge.open,q6=ge.closed,X6=ge.side,J6=ge.align,Z6="data-uncentered";var Kw={};me(Kw,{disabled:()=>t3,highlighted:()=>e3});var fR={};me(fR,{disabled:()=>$w,highlighted:()=>zw,selected:()=>Q6});var Q6="data-selected",zw="data-highlighted",$w="data-disabled";var e3=zw,t3=$w;var ra={};me(ra,{orientation:()=>o3});var o3="data-orientation";var mc={};me(mc,{Fallback:()=>_V,Image:()=>FV,Root:()=>NV});var zu=T(D(),1);var mR=T(D(),1),Yw=mR.createContext(void 0);function gR(){let e=mR.useContext(Yw);if(e===void 0)throw new Error(_e(13));return e}var ju={imageLoadingStatus:()=>null};var NV=zu.forwardRef(function(t,o){let{className:n,render:r,style:s,...i}=t,[a,l]=zu.useState("idle"),c={imageLoadingStatus:a},u=zu.useMemo(()=>({imageLoadingStatus:a,setImageLoadingStatus:l}),[a,l]),p=j("span",t,{state:c,ref:o,props:i,stateAttributesMapping:ju});return f(Yw.Provider,{value:u,children:p})});var Zd=T(D(),1);var AV=T(D(),1);function OV(e,{referrerPolicy:t,crossOrigin:o,sizes:n,srcSet:r},s){let i=AV.useState("idle"),a=i[1];return J(()=>{if(!s)return nt;if(!e&&!r)return a("error"),nt;let l=!0,c=new window.Image,u=p=>()=>{l&&a(p)};return a("loading"),c.onload=u("loaded"),c.onerror=u("error"),t&&(c.referrerPolicy=t),c.crossOrigin=o??null,n&&(c.sizes=n),r&&(c.srcset=r),e&&(c.src=e),c.complete&&a(c.naturalWidth>0?"loaded":"error"),()=>{l=!1}},[s,e,r,n,o,t,a]),i}var n3={...ju,...Lt},FV=Zd.forwardRef(function(t,o){let{className:n,render:r,onLoadingStatusChange:s,keepMounted:i=!1,style:a,sizes:l,srcSet:c,src:u,...p}=t,{setImageLoadingStatus:d}=gR(),[m,g]=OV(u,t,!i),R=m==="loaded",{mounted:b,transitionStatus:x,setMounted:h}=so(R),C=Zd.useRef(null),y=Zd.useRef(!0);J(()=>{if(!i)return;let M=y.current;y.current=!1;let W=C.current;if(!W)return;if(!W.complete){g("loading");return}let I=W.naturalWidth>0?"loaded":"error";g(I),I==="loaded"&&M&&h(!0)},[i,u,c,l,p.crossOrigin,p.referrerPolicy,r,g,h]);let S=i?{"data-loading":m==="loading"?"":void 0,"data-error":m==="error"?"":void 0,"aria-hidden":m!=="loaded"||void 0,onLoad(){g("loaded")},onError(){g("error")}}:void 0,w=q(M=>{s?.(M),d(M)});J(()=>{m!=="idle"&&w(m)},[m,w]),J(()=>()=>d("idle"),[d]),It({enabled:!R,open:R,ref:C,onComplete(){R||h(!1)}});let v={imageLoadingStatus:m,transitionStatus:i&&x==="ending"?void 0:x},P=i||b,N={};l!==void 0&&(N.sizes=l),c!==void 0&&(N.srcSet=c),u!==void 0&&(N.src=u);let E=j("img",t,{state:v,ref:[o,C],props:[S,p,N],stateAttributesMapping:n3,enabled:P});return P?E:null});var $u=T(D(),1);var _V=$u.forwardRef(function(t,o){let{className:n,render:r,delay:s=0,style:i,...a}=t,{imageLoadingStatus:l}=gR(),[c,u]=$u.useState(s===0),p=ct();return $u.useEffect(()=>(s>0?p.start(s,()=>u(!0)):u(!0),p.clear),[p,s]),j("span",t,{state:{imageLoadingStatus:l},ref:o,props:a,stateAttributesMapping:ju,enabled:l!=="loaded"&&(s===0||c)})});var qw={};me(qw,{endingStyle:()=>a3,error:()=>s3,loading:()=>r3,startingStyle:()=>i3});var r3="data-loading",s3="data-error",i3=Pt.startingStyle,a3=Pt.endingStyle;var VV=T(D(),1);var bR=VV.forwardRef(function(t,o){let{render:n,className:r,disabled:s=!1,focusableWhenDisabled:i=!1,nativeButton:a=!0,style:l,...c}=t,{getButtonProps:u,buttonRef:p}=bt({disabled:s,focusableWhenDisabled:i,native:a});return j("button",t,{state:{disabled:s},ref:[o,p],props:[c,u]})});var Xw={};me(Xw,{disabled:()=>l3});var l3="data-disabled";var Ku={};me(Ku,{Indicator:()=>UV,Root:()=>GV});var Ns=T(D(),1);function kV(e){if(!e)return null;for(let t of e.elements){let o=t.tagName;if(o==="BUTTON"||o==="INPUT"){let n=t;if(n.type==="submit")return n}}return null}var RR={};me(RR,{checked:()=>Jw,dirty:()=>b3,disabled:()=>u3,filled:()=>R3,focused:()=>h3,indeterminate:()=>c3,invalid:()=>m3,readonly:()=>p3,required:()=>d3,touched:()=>g3,unchecked:()=>Zw,valid:()=>f3});var Jw="data-checked",Zw="data-unchecked",c3="data-indeterminate",u3="data-disabled",p3="data-readonly",d3="data-required",f3="data-valid",m3="data-invalid",g3="data-touched",b3="data-dirty",R3="data-filled",h3="data-focused";function hR(e){return{checked(t){return e.indeterminate?{}:t?{[Jw]:""}:{[Zw]:""}},...Ut}}var xR=T(D(),1),Qw=xR.createContext({disabled:!1});function sl(){return xR.useContext(Qw)}var LV=T(D(),1);function il(e,t,o,n=!0,r,s){let[i,a]=LV.useState(),l=Ye(r?`${r}-label`:void 0),c=!!s?.trim(),p=e??(c?void 0:t)??i;return J(()=>{let d=e||t||c||!n?void 0:x3(o.current,l);i!==d&&a(d)}),p}function x3(e,t){let o=C3(e);if(o)return!o.id&&t&&(o.id=t),o.id||void 0}function C3(e){if(!e)return;let t=e.parentElement;if(t&&t.tagName==="LABEL")return t;let o=e.id;if(o){let r=e.nextElementSibling;if(r&&r.htmlFor===o)return r}let n=e.labels;return n&&n[0]}var CR=T(D(),1),eP=CR.createContext(void 0);function BV(){return CR.useContext(eP)}var yR=T(D(),1),tP=yR.createContext(void 0);function HV(){let e=yR.useContext(tP);if(e===void 0)throw new Error(_e(14));return e}var y3="data-parent",GV=Ns.forwardRef(function(t,o){let{checked:n,className:r,defaultChecked:s=!1,"aria-labelledby":i,disabled:a=!1,form:l,id:c,indeterminate:u=!1,inputRef:p,name:d,onCheckedChange:m,parent:g=!1,readOnly:R=!1,render:b,required:x=!1,uncheckedValue:h,value:C,nativeButton:y=!1,style:S,...w}=t,{clearErrors:v}=eo(),{disabled:P,name:N,setDirty:E,setFilled:M,setTouched:W,state:I,validationMode:O,validityData:F,validation:k}=ht(),U=sl(),{labelId:_,registerControlId:B,getDescriptionProps:L}=Vt(),V=BV(),A=V?.allValues===void 0?void 0:V.parent,K=A!==void 0,H=P||U.disabled||V?.disabled||a,G=N??d,oe=C??G,ee=Ye(),X=V?.registerControlId!==B,te=Ao({id:c||void 0,enabled:X}),ce=y?te:ee,le={};K&&(g?le=A.getParentProps():oe!==void 0&&(le=A.getChildProps(oe)));let{checked:Q=n,indeterminate:ne=u,onCheckedChange:Y,...ae}=le,Z=V?.value,ue=Ns.useRef(null),Te=ln(H,ue),{getButtonProps:fe,buttonRef:ve}=bt({disabled:H,native:y}),z=V?.validation??k,[Re,xe]=_t({controlled:oe!==void 0&&Z!==void 0&&!g?Z.includes(oe):Q,default:s,name:"Checkbox",state:"checked"}),Pe=K?!!Q:Re,ie=K&&ne||u;an(ue,ee,Re,void 0,!V&&!H,d);let re=A?.registerChildId,Ee=Ns.useRef(null),ye=z.registerInput,se=V?oe:void 0,Fe=Ns.useCallback(He=>ye(He,{controlRef:ue,value:se}),[ye,se]),ke=Wt(p,Ee,g?void 0:Fe),de=il(i,_,Ee,!y,te,w["aria-label"]);J(()=>{Ee.current&&(Ee.current.indeterminate=ie),V||M(Re)},[Re,ie,V,M]),oo(Re,()=>{V||(v(G),E(Re!==F.initialValue),z.change(Re))});let Ie=Mt({checked:Re,disabled:H,form:l,name:g?void 0:G,id:y?void 0:te,required:x,ref:ke,style:G?Xn:wo,tabIndex:-1,type:"checkbox","aria-hidden":!0,onChange(He){if(He.nativeEvent.defaultPrevented)return;if(R){He.preventDefault();return}let je=He.currentTarget.checked,Qe=Ce($.none,He.nativeEvent);if(m?.(je,Qe),!Qe.isCanceled&&(Y?.(je,Qe),!Qe.isCanceled&&(xe(je),oe!==void 0&&V!==void 0&&!g&&!K))){let et=je?[...V.value,oe]:V.value.filter(ut=>ut!==oe);V.setValue(et,Qe)}},onClick(He){He.stopPropagation()},onFocus(){ue.current?.focus()}},C!==void 0?{value:(V?Re&&C:C)||""}:ot,L,He=>z.getValidationProps(H,He));Ns.useEffect(()=>{if(!A||oe===void 0)return;let He=A.disabledStatesRef.current;return He.set(oe,H),()=>{He.delete(oe)}},[A,H,oe]);let Me=Ns.useMemo(()=>({...I,checked:Pe,disabled:H,readOnly:R,required:x,indeterminate:ie}),[I,Pe,H,R,x,ie]),We=hR(Me),Ue=j("span",t,{state:Me,ref:[ve,ue,o],props:[{id:ce,role:"checkbox","aria-checked":ie?"mixed":Pe,"aria-readonly":R||void 0,"aria-required":x||void 0,"aria-labelledby":de,[y3]:g?"":void 0,onFocus(){Te(!0)},onBlur(){let He=Ee.current;He&&(W(!0),Te(!1),O==="onBlur"&&z.commit(V?Z:He.checked))},onKeyDown(He){if(He.key!=="Enter"||(He.preventBaseUIHandler(),He.defaultPrevented))return;let je=Ee.current?.form??null,Qe=He.currentTarget,et=He.nativeEvent,ut=He.preventDefault,vt=et.preventDefault,De=!1;He.preventDefault=()=>{De=!0,ut.call(He)},et.preventDefault=()=>{De=!0,vt.call(et)},vt.call(et),rt(Qe).queueMicrotask(()=>{He.preventDefault=ut,et.preventDefault=vt,De||kV(je)?.click()})},onClick(He){if(R||H)return;He.preventDefault();let je=Ee.current;je&&hr(je,He)}},w,ae,fe,L,He=>z.getValidationProps(H,He)],stateAttributesMapping:We}),ze=Ue.props.id;return J(()=>{if(!(!re||g||oe===void 0||ze===void 0))return re(oe,ze)},[re,g,oe,ze]),f(tP.Provider,{value:Me,children:[Ue,!Re&&!V&&G&&!g&&h!==void 0&&f("input",{type:"hidden",form:l,name:G,value:h,disabled:H}),f("input",{...Ie,suppressHydrationWarning:!0})]})});var SR=T(D(),1);var UV=SR.forwardRef(function(t,o){let{render:n,className:r,style:s,keepMounted:i=!1,...a}=t,l=HV(),c=l.checked||l.indeterminate,{mounted:u,transitionStatus:p,setMounted:d}=so(c),m=SR.useRef(null),g={...l,transitionStatus:p};It({batch:!0,enabled:!c,open:c,ref:m,onComplete(){c||d(!1)}});let b={...hR(l),...Lt},x=i||u,h=j("span",t,{ref:[o,m],state:g,stateAttributesMapping:b,props:a});return x?h:null});var oP={};me(oP,{checked:()=>S3,dirty:()=>O3,disabled:()=>P3,endingStyle:()=>M3,filled:()=>F3,focused:()=>_3,indeterminate:()=>w3,invalid:()=>N3,readonly:()=>E3,required:()=>T3,startingStyle:()=>I3,touched:()=>A3,unchecked:()=>v3,valid:()=>D3});var S3="data-checked",v3="data-unchecked",w3="data-indeterminate",P3="data-disabled",E3="data-readonly",T3="data-required",I3=Pt.startingStyle,M3=Pt.endingStyle,D3="data-valid",N3="data-invalid",A3="data-touched",O3="data-dirty",F3="data-filled",_3="data-focused";var ef=T(D(),1);var sa=T(D(),1);function gc(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}var nP=Object.keys(dc);function Qd(e,t){return e.matches(":disabled")?!1:!t||e.form===t?!0:e.form===null&&!e.hasAttribute("form")}function WV(e,t){let o=null;for(let n of e.keys())if(Qd(n,t)){if(!n.validity.valid)return n;o??(o=n)}return o}function jV(e){return{...dc,valid:!e,customError:e}}function rP(e){return e&&e.validationMessage?[e.validationMessage]:[]}function zV(e){let{elementRef:t,formRef:o}=eo(),{setValidityData:n,validate:r,validityData:s,validationDebounceTime:i,invalid:a,markedDirtyRef:l,state:c,shouldValidateOnChange:u,validationMode:p,registeredFieldIdRef:d}=e,{controlId:m,getDescriptionProps:g}=Vt(),R=ct(),b=sa.useRef(null),x=gt(()=>new Map).current,h=sa.useRef(0),C=sa.useRef(null),y=sa.useCallback((N,E)=>(x.set(N,E),()=>{x.delete(N)}),[x]),S=q(()=>{let N=WV(x,t.current);return N&&x.get(N)?.controlRef.current||null}),w=q(async(N,E=!1)=>{h.current+=1;let M=h.current;function W(H,G=a){let oe=d.current??m;if(oe==null)return;let ee=o.current.fields.get(oe);if(!ee)return;let X=gc(H,G);o.current.fields.set(oe,{...ee,validityData:X})}function I(H,G){let oe=H.valid===!1?G:[];return{value:N,state:H,error:oe[0]??"",errors:oe,initialValue:s.initialValue}}function O(H,G){let oe=H.validity.customError?H.validationMessage:"",ee=G.replace(/\r\n?/g,`
4
4
  `);H.setCustomValidity(ee),C.current=[H,ee,oe]}function F(){let H=C.current;C.current=null,H&&(!H[0].willValidate||H[0].validationMessage===H[1])&&H[0].setCustomValidity(H[2])}function k(H,G,oe){let ee=I(H,G);W(ee,oe),n(ee)}function U(H){let G=nP.reduce((ee,X)=>(ee[X]=H.validity[X],ee),{}),oe=!1;for(let ee of nP)if(ee!=="valid"){if(ee==="valueMissing"&&G[ee])oe=!0;else if(G[ee])return G}return oe&&!l.current&&(G.valid=!0,G.valueMissing=!1),G}function _(){return x.size>0?WV(x,t.current):b.current}let B=_();function L(){return B=_(),B?.willValidate?U(B):jV(!1)}if(E){if(c.valid!==!1||!B)return;if(!B.validity.valueMissing){F();let H=_(),G=H?.validity.customError?rP(H):[];k(jV(G.length>0),G,!1);return}for(let H of nP)if(H!=="valid"&&H!=="valueMissing"&&H!=="customError"&&B.validity[H])return}R.clear(),F();let V=L(),A=rP(B),K=u();if(A.length===0||K){let H=Array.from(o.current.fields.values()).reduce((ee,X)=>(X.name&&(ee[X.name]=X.getValue()),ee),{}),G=r(N,H),oe;if(typeof G=="object"&&G!==null&&"then"in G){if(V.valid===!1?k(V,A):(p==="onSubmit"||!s.state.customError)&&(V.valid=null,k(V,A)),oe=await G,M!==h.current)return;V=L()}else oe=G;A=oe?[].concat(oe).filter(Boolean):[],A.length>0?(V.valid=!1,V.customError=!0,B?.willValidate&&O(B,A.join(`
5
5
  `))):A=rP(B)}k(V,A)}),v=q((N,E=!1)=>{if(R.clear(),h.current+=1,E)return;let M=u();M&&N!==""&&i?R.start(i,()=>{w(N)}):w(N,!M)}),P=sa.useCallback((N,E={})=>Mt(g(E),c.valid===!1&&!c.disabled&&!N?{"aria-invalid":!0}:ot),[g,c.disabled,c.valid]);return sa.useMemo(()=>({getValidationProps:P,inputRef:b,registeredInputs:x,registerInput:y,getInputControl:S,commit:w,change:v}),[P,x,y,S,w,v])}var As=T(D(),1);function $V(e){let{allValues:t=Et,value:o,onValueChange:n}=e,r=As.useRef(o),s=As.useRef(new Map),[i,a]=As.useState("mixed"),[l,c]=As.useState(()=>({registry:new Map})),u=o.length===t.length,p=o.length!==t.length&&o.length>0,d=q(n),m=q((b,x)=>{let h=l.registry;return h.set(b,(h.get(b)??Et).concat(x)),c({registry:h}),()=>{let C=(h.get(b)??Et).filter(y=>y!==x);C.length===0?h.delete(b):h.set(b,C),c({registry:h})}}),g=As.useCallback(()=>({indeterminate:p,checked:u,"aria-controls":t.flatMap(b=>l.registry.get(b)??Et).join(" ")||void 0,onCheckedChange(b,x){let h=r.current,C=t.filter(P=>s.current.get(P)&&h.includes(P)),y=t.filter(P=>!s.current.get(P)||h.includes(P));if(h.length===y.length||h.length===0){o.length===y.length?d(C,x):d(y,x);return}let w="mixed",v=h;i==="mixed"?(w="on",v=y):i==="on"&&(w="off",v=C),d(v,x),x.isCanceled||a(w)}}),[t,u,l,p,d,i,o.length]),R=As.useCallback(b=>({checked:o.includes(b),onCheckedChange(x,h){let C=o.slice();x?C.push(b):C.splice(C.indexOf(b),1),d(C,h),h.isCanceled||(r.current=C,a("mixed"))}}),[d,o]);return As.useMemo(()=>({getParentProps:g,getChildProps:R,registerChildId:m,disabledStatesRef:s}),[g,R,m])}var vR=ef.forwardRef(function(t,o){let{allValues:n,className:r,defaultValue:s,disabled:i=!1,id:a,onValueChange:l,render:c,value:u,style:p,...d}=t,{disabled:m,name:g,state:R,validation:b,setFilled:x,setDirty:h,validityData:C}=ht(),{labelId:y,registerControlId:S,getDescriptionProps:w}=Vt(),{clearErrors:v,elementRef:P}=eo(),N=m||i,E=s??Et,[M,W]=_t({controlled:u,default:E,name:"CheckboxGroup",state:"value"}),I=q((A,K)=>{l?.(A,K),!K.isCanceled&&W(A)}),O=$V({allValues:n,value:M,onValueChange:I});Ao({id:null});let F=Ye(a),k=b.getInputControl,U=ef.useMemo(()=>({get current(){return k()}}),[k]),_=q(()=>{let A=P.current;if(!A)return M;let K=new Set;for(let[H,G]of b.registeredInputs)G.value!==void 0&&H.checked&&Qd(H,A)&&K.add(G.value);return M.filter(H=>K.has(H))});an(U,F,M,_,!!g&&!N,g),J(()=>{x(M.length>0)},[M,x]),oo(M,()=>{g&&v(g);let A=Array.isArray(C.initialValue)?C.initialValue:Et;h(!lc(M,A)),b.change(M)});let B={...R,disabled:N},L=ef.useMemo(()=>({allValues:n,value:M,setValue:I,parent:O,disabled:N,validation:b,registerControlId:S}),[n,M,I,O,N,b,S]),V=j("div",t,{state:B,ref:o,props:[{id:a,role:"group","aria-labelledby":y},d,w],stateAttributesMapping:Ut});return f(eP.Provider,{value:L,children:V})});var sP={};me(sP,{disabled:()=>V3});var V3="data-disabled";var bc={};me(bc,{Panel:()=>XV,Root:()=>KV,Trigger:()=>qV});var tf=T(D(),1);var wR={...rg,...Lt};var KV=tf.forwardRef(function(t,o){let{render:n,className:r,defaultOpen:s=!1,disabled:i=!1,onOpenChange:a,open:l,style:c,...u}=t,p=q(a),d=Qm({open:l,defaultOpen:s,onOpenChange:p,disabled:i}),m=tf.useMemo(()=>({open:d.open,disabled:d.disabled,transitionStatus:d.transitionStatus}),[d.open,d.disabled,d.transitionStatus]),g=tf.useMemo(()=>({...d,onOpenChange:p,state:m}),[d,p,m]),R=j("div",t,{state:m,ref:o,props:u,stateAttributesMapping:wR});return f(ld.Provider,{value:g,children:R})});var YV=T(D(),1);var k3={...ng,...Lt},qV=YV.forwardRef(function(t,o){let{panelId:n,open:r,handleTrigger:s,state:i,disabled:a}=_a(),{className:l,disabled:c=a,render:u,nativeButton:p=!0,style:d,...m}=t,{getButtonProps:g,buttonRef:R}=bt({disabled:c,native:p});return j("button",t,{state:i,ref:[o,R],props:[{"aria-controls":r?n:void 0,"aria-expanded":r,onClick:s},m,g],stateAttributesMapping:k3})});var lP=T(D(),1);var PR={};me(PR,{collapsiblePanelHeight:()=>iP,collapsiblePanelWidth:()=>aP});var iP="--collapsible-panel-height",aP="--collapsible-panel-width";var XV=lP.forwardRef(function(t,o){let{className:n,hiddenUntilFound:r,keepMounted:s,render:i,id:a,style:l,...c}=t,{defaultPanelId:u,mounted:p,onOpenChange:d,open:m,setMounted:g,setPanelIdState:R,setOpen:b,state:x,transitionStatus:h}=_a(),C=r??!1,y=s??!1,S=a||void 0,w=S??u;J(()=>(R(U=>S??(U===null?void 0:U)),()=>{R(U=>U===S?null:U)}),[S,R]);let{height:v,props:P,ref:N,shouldPreventOpenAnimation:E,shouldRender:M,transitionStatus:W,width:I}=gg({externalRef:o,hiddenUntilFound:C,id:w,keepMounted:y,mounted:p,onOpenChange:d,open:m,setMounted:g,setOpen:b,transitionStatus:h}),O={...x,transitionStatus:W},F=tu(l,O),k=j("div",{...t,style:void 0},{state:O,ref:N,props:[P,{style:{[iP]:v===void 0?"auto":`${v}px`,[aP]:I===void 0?"auto":`${I}px`}},c,F?{style:F}:void 0,E?{style:{animationName:"none"}}:void 0],stateAttributesMapping:wR});return M?k:null});var cP={};me(cP,{closed:()=>B3,endingStyle:()=>G3,open:()=>L3,startingStyle:()=>H3});var L3="data-open",B3="data-closed",H3=Pt.startingStyle,G3=Pt.endingStyle;var Yt={};me(Yt,{Arrow:()=>Zb,Backdrop:()=>zb,Chip:()=>sk,ChipRemove:()=>ak,Chips:()=>nk,Clear:()=>Lb,Collection:()=>Bu,Empty:()=>iR,Group:()=>eR,GroupLabel:()=>tR,Icon:()=>kb,Input:()=>Fb,InputGroup:()=>Vb,Item:()=>rR,ItemIndicator:()=>ok,Label:()=>ZV,List:()=>Hb,Popup:()=>Jb,Portal:()=>jb,Positioner:()=>qb,Root:()=>JV,Row:()=>sR,Separator:()=>lk,Status:()=>Ub,Trigger:()=>Mb,Value:()=>ek,createItems:()=>ck,useFilter:()=>O_,useFilteredItems:()=>aR});var vFe=T(D(),1);function JV(e){let{multiple:t=!1,defaultValue:o,value:n,onValueChange:r,autoComplete:s,...i}=e;return f(Pb,{...i,selectionMode:t?"multiple":"single",selectedValue:n,defaultSelectedValue:o,onSelectedValueChange:r,formAutoComplete:s})}var pP=T(D(),1);function al(e,t){let o=Ye(e);return J(()=>(t(o),()=>{t(n=>n===o?void 0:n)}),[o,t]),o}function ll(e={}){let{id:t,fallbackControlId:o,native:n=!1,setLabelId:r,focusControl:s}=e,{controlId:i,setLabelId:a}=Vt(),l=q(m=>{a(m),r?.(m)}),c=al(t,l),u=i??o;function p(m){if(s){s(m,u);return}if(!u)return;let g=uP(m.currentTarget,u);st(g)&&ER(g)}function d(m){let g=Je(m.nativeEvent);Xt(g,"button,input,select,textarea")||(!m.defaultPrevented&&m.detail>1&&m.preventDefault(),!n&&p(m))}return n?{id:c,htmlFor:u,onMouseDown:d}:{id:c,onClick:d,onPointerDown(m){m.preventDefault()}}}function uP(e,t){let o=e.getRootNode();for(;Nr(o);){let n=o.getElementById(t);if(n)return n;o=o.host.getRootNode()}return Be(e).getElementById(t)}function ER(e){e.focus({focusVisible:!0})}var ZV=pP.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t,a=i;delete a.id;let l=ht(),c=Bt(),u=c.useState("inputInsidePopup"),p=c.useState("triggerElement"),d=c.useState("inputElement"),m=c.useState("id"),g=_u(m),R=p?.id??(u?m:void 0),b=ll({id:g,fallbackControlId:R,setLabelId(x){let h=typeof x=="function"?x(c.state.labelId):x;c.set("labelId",h)}});return j("div",t,{ref:o,state:l.state,props:[b,i],stateAttributesMapping:Ut})});var QV=T(D(),1);function ek(e){let{children:t,placeholder:o}=e,n=Bt(),r=n.useState("itemToStringLabel"),s=n.useState("selectedValue"),i=n.useState("items"),a=n.useState("selectionMode")==="multiple",l=n.useState("hasSelectedValue"),c=!l&&o!=null&&t==null,u=n.useState("hasNullItemLabel",c),p=null;return typeof t=="function"?p=t(s):t!=null?p=t:!l&&o!=null&&!u?p=o:a&&Array.isArray(s)?p=gb(s,i,r):p=$d(s,i,r),f(QV.Fragment,{children:p})}var tk=T(D(),1);var Yu=T(D(),1);var TR=Yu.memo(Yu.forwardRef(function(t,o){let{render:n,className:r,style:s,keepMounted:i,selected:a,...l}=t,c=Yu.useRef(null),{transitionStatus:u,setMounted:p}=so(a),m=j("span",t,{ref:[o,c],state:{selected:a,transitionStatus:u},props:[{"aria-hidden":!0,children:"\u2714\uFE0F"},l],stateAttributesMapping:Lt});return It({batch:!0,enabled:!a,open:a,ref:c,onComplete(){a||p(!1)}}),m}));var ok=tk.forwardRef(function(t,o){let{selected:n}=RV();return t.keepMounted||n?f(TR,{...t,selected:n,ref:o}):null});var qu=T(D(),1);var nk=qu.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t,a=Bt(),l=a.useState("hasSelectionChips"),c=qu.useRef([]),u=j("div",t,{ref:[o,a.context.chipsContainerRef],props:[l?{role:"toolbar"}:ot,{onMouseDown(d){_b(d,a,a.state.disabled)}},i]}),p=qu.useMemo(()=>({chipsRef:c}),[]);return f(Fw.Provider,{value:p,children:f(Cn,{elementsRef:c,children:u})})});var MR=T(D(),1),fP=T(on(),1);var IR=T(D(),1),dP=IR.createContext(void 0);function rk(){let e=IR.useContext(dP);if(!e)throw new Error(_e(17));return e}var sk=MR.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t,a=Bt(),{chipsRef:l}=Nb(),c=kt(),u=a.useState("disabled"),p=a.useState("readOnly"),d=a.useState("selectedValue"),{ref:m,index:g}=bo();function R(C){let y=g,[S,w]=Tb(c);return C.key===S?(C.preventDefault(),g>0?y=g-1:y=void 0):C.key===w?(C.preventDefault(),g<l.current.length-1?y=g+1:y=void 0):C.key==="Backspace"||C.key==="Delete"?(y=L_(g,d.length),St(C),fP.flushSync(()=>{a.context.setIndices({activeIndex:null,selectedIndex:null,type:$.keyboard,event:C.nativeEvent}),a.context.setSelectedValue(d.filter((v,P)=>P!==g),Ce($.none,C.nativeEvent))})):C.key==="Enter"||C.key===" "?(St(C),y=void 0):C.key==="ArrowDown"||C.key==="ArrowUp"?(St(C),fP.flushSync(()=>{a.context.setOpen(!0,Ce($.listNavigation,C.nativeEvent))}),y=void 0):C.key.length===1&&!C.ctrlKey&&!C.metaKey&&!C.altKey&&(y=void 0),y}let x=j("div",t,{ref:[o,m],state:{disabled:u},props:[{tabIndex:-1,"aria-disabled":u||void 0,"aria-readonly":p||void 0,onKeyDown(C){if(u||p)return;let y=R(C);y===void 0?a.context.inputRef.current?.focus():l.current[y]?.focus()}},i]}),h=MR.useMemo(()=>({index:g}),[g]);return f(dP.Provider,{value:h,children:x})});var ik=T(D(),1);var ak=ik.forwardRef(function(t,o){let{render:n,className:r,disabled:s=!1,nativeButton:i=!0,style:a,...l}=t,c=Bt(),{index:u}=rk(),p=c.useState("disabled"),d=c.useState("readOnly"),m=c.useState("selectedValue"),g=c.useState("isItemEqualToValue"),R=p||s,{buttonRef:b,getButtonProps:x}=bt({native:i,disabled:R||d,focusableWhenDisabled:!0}),h={disabled:R};function C(w,v){let P=c.state.activeIndex;if(P==null)return;let N=Ds(c.context.valuesRef.current,w,g);N!==-1&&P===N&&c.context.setIndices({activeIndex:null,type:bi(v),event:v})}function y(w){let v=Ce($.chipRemovePress,w.nativeEvent),P=m[u];return C(P,w.nativeEvent),c.context.setSelectedValue(m.filter((N,E)=>E!==u),v),c.context.inputRef.current?.focus(),v}return j("button",t,{ref:[o,b],state:h,props:[{tabIndex:-1,onMouseDown(w){w.preventDefault()},onClick(w){y(w).isPropagationAllowed||w.stopPropagation()},onKeyDown(w){(w.key==="Enter"||w.key===" ")&&(y(w).isPropagationAllowed||St(w))}},l,x]})});var lk=Wu;function ck(e,t){let{getValue:o,getLabel:n}=t,r=null;function s(){if(r===null){let a=new Map,l=e?pc(e):Et;for(let c of l){if(c==null)continue;let u=o(c);a.has(u)||a.set(u,c)}r=a}return r}function i(a){return a==null?a:o(a)}return{data:e,value:i,hasValue(a,l){return Yd(s(),a,l)!==void 0},itemLabel:n,label(a,l,c){let u=Yd(s(),a,l);return u!==void 0?n(u):Ln(a,c)}}}var mP={};me(mP,{dirty:()=>X3,disabled:()=>j3,filled:()=>J3,focused:()=>Z3,invalid:()=>Y3,listEmpty:()=>Q3,placeholder:()=>e4,popupOpen:()=>U3,popupSide:()=>$3,pressed:()=>W3,readonly:()=>z3,touched:()=>q3,valid:()=>K3});var U3="data-popup-open",W3="data-pressed",j3="data-disabled",z3="data-readonly",$3="data-popup-side",K3="data-valid",Y3="data-invalid",q3="data-touched",X3="data-dirty",J3="data-filled",Z3="data-focused",Q3="data-list-empty",e4="data-placeholder";var gP={};me(gP,{dirty:()=>u4,disabled:()=>n4,filled:()=>p4,focused:()=>d4,invalid:()=>l4,listEmpty:()=>f4,placeholder:()=>m4,popupOpen:()=>t4,popupSide:()=>s4,pressed:()=>o4,readonly:()=>r4,required:()=>i4,touched:()=>c4,valid:()=>a4});var t4=At.popupOpen,o4=At.pressed,n4="data-disabled",r4="data-readonly",s4="data-popup-side",i4="data-required",a4="data-valid",l4="data-invalid",c4="data-touched",u4="data-dirty",p4="data-filled",d4="data-focused",f4="data-list-empty",m4="data-placeholder";var bP={};me(bP,{endingStyle:()=>b4,startingStyle:()=>g4});var g4=Pt.startingStyle,b4=Pt.endingStyle;var Lo={};me(Lo,{Arrow:()=>OR,Backdrop:()=>FR,CheckboxItem:()=>kR,CheckboxItemIndicator:()=>BR,Group:()=>GR,GroupLabel:()=>UR,Item:()=>WR,LinkItem:()=>jR,Popup:()=>qR,Portal:()=>JR,Positioner:()=>EL,RadioGroup:()=>th,RadioItem:()=>nh,RadioItemIndicator:()=>sh,Root:()=>vL,Separator:()=>rs,SubmenuRoot:()=>ch,SubmenuTrigger:()=>xh,Trigger:()=>PL});var _s=T(D(),1);var DR=T(D(),1),RP=DR.createContext(void 0);function hi(e=!0){let t=DR.useContext(RP);if(t===void 0&&!e)throw new Error(_e(25));return t}var $t={};me($t,{Arrow:()=>OR,Backdrop:()=>FR,CheckboxItem:()=>kR,CheckboxItemIndicator:()=>BR,Clear:()=>xL,Empty:()=>SL,FilterProvider:()=>dL,Group:()=>GR,GroupLabel:()=>UR,Handle:()=>gf,Input:()=>mL,Item:()=>WR,LinkItem:()=>jR,List:()=>gL,Popup:()=>qR,Portal:()=>JR,Positioner:()=>QR,RadioGroup:()=>th,RadioItem:()=>nh,RadioItemIndicator:()=>sh,Root:()=>Ek,Separator:()=>rs,SubmenuRoot:()=>ch,SubmenuTrigger:()=>xh,Trigger:()=>Nk,Viewport:()=>Gk,createHandle:()=>Wk,useFilter:()=>fc});var uk=T(D(),1);var NR=T(D(),1),hP=NR.createContext(void 0);function cl(e){let t=NR.useContext(hP);if(t===void 0&&!e)throw new Error(_e(33));return t}var AR=T(D(),1),Rc=AR.createContext(void 0);function wt(e){let t=AR.useContext(Rc);if(t===void 0&&!e)throw new Error(_e(36));return t}var OR=uk.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t,{store:a}=wt(),{arrowRef:l,side:c,align:u,arrowUncentered:p,arrowStyles:d}=cl(),g={open:a.useState("open"),side:c,align:u,uncentered:p};return j("div",t,{ref:[l,o],stateAttributesMapping:lo,state:g,props:{style:d,"aria-hidden":!0,...i}})});var pk=T(D(),1);var FR=pk.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t,{store:a}=wt(),l=a.useState("open"),c=a.useState("mounted"),u=a.useState("transitionStatus"),p=a.useState("lastOpenChangeReason"),d=hi(),m={open:l,transitionStatus:u};return j("div",t,{ref:d?.backdropRef?[o,d.backdropRef]:o,state:m,stateAttributesMapping:Ro,props:[{role:"presentation",hidden:!c,style:{pointerEvents:p===$.triggerHover?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},i]})});var sf=T(D(),1);var of=T(D(),1);var nf=of.createContext(null);function xi(e="root"){let t=of.useContext(nf),o=of.useContext(Rc);return t===null||o===void 0?null:(e==="submenu-trigger"?o.virtualFocus||o.parentVirtualFocus:o.virtualFocus)?t:null}function Xu(e){if(xi()===null)throw new Error(_e(104,e))}var R4={visible:!0,ref:null};function h4(){return R4}function Ci(e,t,o="root"){let n=xi(o),s=((o==="submenu-trigger"?n?.useSubmenuTrigger:n?.useItem)??h4)({label:e.label,children:e.children,render:e.render}),i=Wt(t,s.ref);return{visible:s.visible,ref:i,props:s.props}}var _R=T(D(),1),xP=_R.createContext(void 0);function dk(){let e=_R.useContext(xP);if(e===void 0)throw new Error(_e(30));return e}var Ju=T(D(),1);var fk=T(D(),1);function x4(e){e.preventDefault()}function VR(e){let{closeOnClick:t,highlighted:o,id:n,nodeId:r,store:s,typingRef:i,itemRef:a,itemMetadata:l}=e,c=wt(),u=hi(!0),p=l.type==="submenu-trigger",d=p?c.parentVirtualFocus:c.virtualFocus,g=(p&&c.parent.type==="menu"?c.parent.store:c.store).useState("webkitAriaSelected",o),{events:R}=s.useState("floatingTreeRoot"),b=s.useState("open"),x=u!==void 0,h=!d&&b&&o?0:-1;return fk.useMemo(()=>({id:n,role:"menuitem",tabIndex:h,"aria-selected":g,onMouseDown:d?x4:void 0,onKeyDown(C){C.key===" "&&i?.current&&C.preventDefault()},onMouseMove(C){r&&R.emit("itemhover",{nodeId:r,target:C.currentTarget})},onClick(C){t&&R.emit("close",{domEvent:C.nativeEvent,reason:$.itemPress})},onMouseUp(C){if(u){let y=u.initialCursorPointRef.current;if(u.initialCursorPointRef.current=null,x&&y&&Math.abs(C.clientX-y.x)<=1&&Math.abs(C.clientY-y.y)<=1||x&&!Rt.os.mac&&C.button===2)return}a.current&&s.context.allowMouseUpTriggerRef.current&&(!x||C.button===2)&&l.type==="regular-item"&&hr(a.current,C,{detail:1,pointerType:"mouse"})}}),[t,h,n,R,r,s.context.allowMouseUpTriggerRef,i,a,u,x,l.type,g,d])}var ul={type:"regular-item"};function pl(e){let{closeOnClick:t,disabled:o,highlighted:n,id:r,store:s,typingRef:i=s.context.typingRef,nativeButton:a,itemMetadata:l,nodeId:c}=e,u=Ju.useRef(null),{getButtonProps:p,buttonRef:d}=bt({disabled:o,focusableWhenDisabled:!0,native:a,composite:!0}),m=VR({closeOnClick:t,highlighted:n,id:r,nodeId:c,store:s,typingRef:i,itemRef:u,itemMetadata:l}),g=Ju.useCallback(b=>Mt(m,{onMouseEnter(x){l.type==="submenu-trigger"&&l.setActive(x.nativeEvent)}},b,p),[m,p,l]),R=Wt(u,d);return Ju.useMemo(()=>({getItemProps:g,itemRef:R}),[g,R])}var rf={};me(rf,{checked:()=>CP,disabled:()=>C4,highlighted:()=>y4,unchecked:()=>yP});var CP="data-checked",yP="data-unchecked",C4="data-disabled",y4="data-highlighted";var dl={checked(e){return e?{[CP]:""}:{[yP]:""}},...Lt};var S4=sf.forwardRef(function(t,o){let{render:n,className:r,id:s,label:i,nativeButton:a=!1,disabled:l=!1,closeOnClick:c=!1,checked:u=!1,onCheckedChange:p,style:d,...m}=t,{store:g}=wt(),R=bo({guess:!0,label:i}),b=Ye(s),x=g.useState("disabled"),h=g.useState("isActive",R.index),C=g.useState("floatingNodeId"),y=g.useState("itemProps"),S=l||x,{getItemProps:w,itemRef:v}=pl({closeOnClick:c,disabled:S,highlighted:h,id:b,store:g,nativeButton:a,nodeId:C,itemMetadata:ul}),P=sf.useMemo(()=>({disabled:S,highlighted:h,checked:u}),[S,h,u]);function N(M){let W=Ce($.itemPress,M.nativeEvent,void 0,{preventUnmountOnClose:nt});p?.(!u,W)}let E=j("div",t,{state:P,stateAttributesMapping:dl,props:[y,{role:"menuitemcheckbox","aria-checked":u,onClick:N},m,w],ref:[v,o,R.ref]});return f(xP.Provider,{value:P,children:E})}),kR=sf.forwardRef(function(t,o){let{checked:n,defaultChecked:r,onCheckedChange:s,...i}=t,[a,l]=_t({controlled:n,default:r??!1,name:"MenuCheckboxItem",state:"checked"}),c=Ci(t,o);function u(p,d){s?.(p,d),d.isCanceled||l(p)}return c.visible?f(S4,{...i,checked:a,onCheckedChange:u,ref:c.ref}):null});var LR=T(D(),1);var BR=LR.forwardRef(function(t,o){let{render:n,className:r,style:s,keepMounted:i=!1,...a}=t,l=dk(),c=LR.useRef(null),{transitionStatus:u,mounted:p,setMounted:d}=so(l.checked);It({batch:!0,enabled:!l.checked,open:l.checked,ref:c,onComplete(){l.checked||d(!1)}});let m={checked:l.checked,disabled:l.disabled,highlighted:l.highlighted,transitionStatus:u};return j("span",t,{state:m,ref:[o,c],stateAttributesMapping:dl,props:{"aria-hidden":!0,...a},enabled:i||p})});var lf=T(D(),1);var HR=T(D(),1),af=HR.createContext(void 0);function mk(){let e=HR.useContext(af);if(e===void 0)throw new Error(_e(31));return e}var SP=lf.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t,[a,l]=lf.useState(void 0),c=j("div",t,{ref:o,props:{role:"group","aria-labelledby":a,...i}});return f(af.Provider,{value:l,children:c})}),GR=lf.forwardRef(function(t,o){let n=xi()?.Group??SP;return f(n,{...t,ref:o})});var gk=T(D(),1);var UR=gk.forwardRef(function(t,o){let{render:n,className:r,style:s,id:i,...a}=t,l=Ye(i),c=mk();return J(()=>(c(l),()=>{c(u=>u===l?void 0:u)}),[c,l]),j("div",t,{ref:o,props:{id:l,"aria-hidden":!0,...a}})});var vP=T(D(),1);var v4=vP.forwardRef(function(t,o){let{render:n,className:r,id:s,label:i,nativeButton:a=!1,disabled:l=!1,closeOnClick:c=!0,style:u,...p}=t,{store:d}=wt(),m=bo({guess:!0,label:i}),g=Ye(s),R=d.useState("disabled"),b=d.useState("isActive",m.index),x=d.useState("floatingNodeId"),h=d.useState("itemProps"),C=l||R,{getItemProps:y,itemRef:S}=pl({closeOnClick:c,disabled:C,highlighted:b,id:g,store:d,nativeButton:a,nodeId:x,itemMetadata:ul});return j("div",t,{state:{disabled:C,highlighted:b},props:[h,p,y],ref:[S,o,m.ref]})}),WR=vP.forwardRef(function(t,o){let n=Ci(t,o);return n.visible?f(v4,{...t,ref:n.ref}):null});var cf=T(D(),1);var w4=cf.forwardRef(function(t,o){let{render:n,className:r,id:s,label:i,closeOnClick:a=!1,style:l,...c}=t,{store:u}=wt(),p=cf.useRef(null),d=bo({guess:!0,label:i}),m=Ye(s),g=u.useState("isActive",d.index),R=u.useState("floatingNodeId"),b=u.useState("itemProps"),x=u.context.typingRef,{getButtonProps:h,buttonRef:C}=bt({native:!1,composite:!0}),y=VR({closeOnClick:a,highlighted:g,id:m,nodeId:R,store:u,typingRef:x,itemRef:p,itemMetadata:ul});function S(v){return Mt(y,v,h)}return j("a",t,{state:{highlighted:g},props:[b,c,S],ref:[p,C,o,d.ref]})}),jR=cf.forwardRef(function(t,o){let n=Ci(t,o);return n.visible?f(w4,{...t,ref:n.ref}):null});var hc=T(D(),1);var zR=T(D(),1),wP=zR.createContext(void 0);function vn(e){let t=zR.useContext(wP);if(t===void 0&&!e)throw new Error(_e(69));return t}var $R=T(D(),1),uf=$R.createContext(void 0);function Zu(){return $R.useContext(uf)}var KR=T(D(),1);function P4(e,t){let o=zl(e.render);if(KR.isValidElement(o)){let n=o.props;if(Object.hasOwn(n,"id"))return n.id??""}return e.id??t}function YR(e,t,o){let n=P4(e,t),r=n===t?void 0:n,s=KR.useCallback(i=>o?.(i?r:void 0),[r,o]);return[n,s]}var bk=T(D(),1);function Qu(e,t,o){let n=zl(e.render),r=bk.isValidElement(n)?n.props:void 0,s=e["aria-label"]??r?.["aria-label"],i=e["aria-labelledby"]??r?.["aria-labelledby"];return i==null&&!s&&(i=t?t.id||void 0:o||void 0),i}var PP=hc.forwardRef(function(t,o){let{render:n,className:r,style:s,finalFocus:i,id:a,initialFocus:l,...c}=t,{store:u,defaultFloatingId:p,setRenderedFloatingId:d,virtualFocus:m,orientation:g}=wt(),R=Zu(),{side:b,align:x}=cl(),h=vn(!0)!=null,C=u.useState("open"),y=u.useState("transitionStatus"),S=u.useState("popupProps"),w=u.useState("mounted"),v=u.useState("instantType"),P=u.useState("activeTriggerElement"),N=u.useState("parent"),E=u.useState("lastOpenChangeReason"),M=u.useState("rootId"),W=u.useState("floatingRootContext"),I=u.useState("floatingTreeRoot"),O=u.useState("closeDelay"),F=u.useState("hoverEnabled"),k=u.useState("disabled"),U=u.useState("openMethod"),_=u.useState("activeTriggerId"),B=u.useState("listElement"),[L,V]=YR(t,p,d),A=Qu(t,P,_),K=N.type==="menu"?R:void 0,H=N.type==="context-menu",G=l??N.type!=="menu";l===void 0&&B&&N.type!=="menu"&&(G=()=>u.state.activeIndex!==null?!1:B),It({open:C,ref:u.context.popupRef,onComplete(){C&&u.context.onOpenChangeComplete?.(!0)}}),hc.useEffect(()=>{function Y(ae){u.setOpen(!1,Ce(ae.reason,ae.domEvent))}return I.events.on("close",Y),()=>{I.events.off("close",Y)}},[I.events,u]),Ms(W,{enabled:F&&!k&&!H&&N.type!=="menubar",closeDelay:O});let oe=u.useStateSetter("popupElement"),ee=hc.useContext(nf)?.useParentHandoff??T4,{parentVirtualFocusRef:X,handleFocus:te}=ee(u,N,C,m),ce={transitionStatus:y,side:b,align:x,open:C,nested:N.type==="menu",instant:v},le=j("div",t,{state:ce,ref:[o,u.context.popupRef,oe,V],stateAttributesMapping:Ro,props:[S,{id:L,...B?{role:"presentation"}:{role:"menu","aria-orientation":g==="horizontal"?"horizontal":void 0,"aria-labelledby":A},onKeyDown(Y){K?.onPopupKeyDown?.(Y),h&&ur.has(Y.key)&&Y.stopPropagation()},onFocus:te},Sn(y),c,{"data-rootownerid":M}]}),Q=N.type===void 0||H;(P||N.type==="menubar"&&E!==$.outsidePress)&&(Q=!0);let ne=K?.getReturnElement??X;return f(Br,{context:W,openInteractionType:U,modal:H,disabled:!w,returnFocus:i??ne??Q,explicitReturnFocus:i===void 0&&ne?!1:void 0,initialFocus:G,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:le})}),E4={parentVirtualFocusRef:void 0,handleFocus:void 0};function T4(){return E4}var qR=hc.forwardRef(function(t,o){let n=xi()?.Popup??PP;return f(n,{...t,ref:o})});var hk=T(D(),1);var XR=T(D(),1),EP=XR.createContext(void 0);function Rk(){let e=XR.useContext(EP);if(e===void 0)throw new Error(_e(32));return e}var JR=hk.forwardRef(function(t,o){let{keepMounted:n=!1,...r}=t,{store:s,parent:i}=wt();if(!(s.useState("mounted")||n))return null;let c=i.type==="menu"||i.type==="menubar"?"group":void 0;return f(EP.Provider,{value:n,children:f(Vr,{ref:o,...r,portalOwnerRole:c})})});var fl=T(D(),1);var TP=T(D(),1);function ZR(e){let{store:t,domReference:o,positionerElement:n,open:r}=e,s=TP.useRef(null),i=TP.useRef(null),a=xr(n);J(()=>{r||(i.current?.abort(),i.current=null,t.state.instantType==="trigger-change"&&t.set("instantType",void 0))},[r,t]),J(()=>{let l=o,c=s.current;if(l&&(s.current=l),!c||!l||l===c||!t.select("open"))return;t.set("instantType",void 0);let u=new AbortController;return i.current=u,a(()=>{t.select("open")&&t.set("instantType","trigger-change")},u.signal),()=>{u.abort()}},[o,a,t])}var QR=fl.forwardRef(function(t,o){let{anchor:n,positionMethod:r="absolute",className:s,render:i,side:a,align:l,sideOffset:c=0,alignOffset:u=0,collisionBoundary:p="clipping-ancestors",collisionPadding:d=5,arrowPadding:m=5,sticky:g=!1,disableAnchorTracking:R=!1,collisionAvoidance:b=ja,style:x,...h}=t,{store:C,virtualFocus:y,syncHighlightedItem:S}=wt(),w=Rk(),v=hi(!0),P=C.useState("parent"),N=C.useState("floatingRootContext"),E=C.useState("floatingTreeRoot"),M=C.useState("mounted"),W=C.useState("open"),I=C.useState("modal"),O=C.useState("openMethod"),F=C.useState("activeTriggerElement"),k=C.useState("transitionStatus"),U=C.useState("positionerElement"),_=C.useState("instantType"),B=C.useState("adaptiveOrigin"),L=C.useState("lastOpenChangeReason"),V=C.useState("floatingNodeId"),A=C.useState("floatingParentNodeId"),K=N.useState("domReferenceElement"),H=n,G=c,oe=u,ee=l,X=b;P.type==="context-menu"&&(H=n??P.context?.anchor,ee=ee??"start",!a&&ee!=="center"&&(oe=t.alignOffset??2,G=t.sideOffset??-5));let te=a,ce=ee;P.type==="menu"?(te=te??"inline-end",ce=ce??"start",X=t.collisionAvoidance??Xr):P.type==="menubar"&&(te=te??(P.context.orientation==="vertical"?"inline-end":"bottom"),ce=ce??"start");let le=P.type==="context-menu",Q=wr({anchor:H,floatingRootContext:N,positionMethod:v?"fixed":r,mounted:M,side:te,sideOffset:G,align:ce,alignOffset:oe,arrowPadding:le?0:m,collisionBoundary:p,collisionPadding:d,sticky:g,nodeId:V,keepMounted:w,disableAnchorTracking:R,collisionAvoidance:X,shift:le?{crossAxis:!("side"in X&&X.side==="flip"),rootBoundary:"layoutViewport"}:void 0,externalTree:E,adaptiveOrigin:B,lazyFlip:y?"placement":!1});fl.useEffect(()=>{function ve(z){z.open&&(z.parentNodeId===V&&C.set("hoverEnabled",!1),z.nodeId!==V&&z.parentNodeId===C.select("floatingParentNodeId")&&C.setOpen(!1,Ce($.siblingOpen)))}return E.events.on("menuopenchange",ve),()=>{E.events.off("menuopenchange",ve)}},[C,E.events,V]),fl.useEffect(()=>{if(C.select("floatingParentNodeId")==null)return;function ve(z){if(z.open||z.nodeId!==C.select("floatingParentNodeId"))return;let Re=z.reason??$.siblingOpen;C.setOpen(!1,Ce(Re))}return E.events.on("menuopenchange",ve),()=>{E.events.off("menuopenchange",ve)}},[E.events,C]);let ne=ct();fl.useEffect(()=>{W||ne.clear()},[W,ne]),fl.useEffect(()=>{function ve(z){if(!(!W||z.nodeId!==C.select("floatingParentNodeId")))if(z.target&&F&&F!==z.target){let Re=C.select("closeDelay");Re>0?ne.isStarted()||ne.start(Re,()=>{C.setOpen(!1,Ce($.siblingOpen))}):C.setOpen(!1,Ce($.siblingOpen))}else ne.clear()}return E.events.on("itemhover",ve),()=>{E.events.off("itemhover",ve)}},[E.events,W,F,C,ne]),fl.useEffect(()=>{let ve={open:W,nodeId:V,parentNodeId:A,reason:C.select("lastOpenChangeReason")};E.events.emit("menuopenchange",ve)},[E.events,W,C,V,A]),ZR({store:C,domReference:K,positionerElement:U,open:W});let Y={open:W,side:Q.side,align:Q.align,anchorHidden:Q.anchorHidden,nested:P.type==="menu",instant:_},ae=P.type==="menubar"&&P.context.modal,Z=I&&L!==$.triggerHover;rl(W&&(ae||Z),O==="touch",U,F);let ue=Qn(t,Y,{styles:Q.positionerStyles,transitionStatus:k,props:h,refs:[o,C.useStateSetter("positionerElement")],hidden:!M,inert:!W}),Te=M&&P.type!=="menu"&&(P.type!=="menubar"&&I&&L!==$.triggerHover||P.type==="menubar"&&P.context.modal),fe=null;return P.type==="menubar"?fe=P.context.contentElement:P.type===void 0&&(fe=F),f(hP.Provider,{value:Q,children:[Te&&f(gi,{ref:P.type==="context-menu"||P.type==="nested-context-menu"?P.context.internalBackdropRef:null,inert:sn(!W),cutout:fe}),f(Lr,{id:V,children:f(Cn,{elementsRef:C.context.itemDomElements,labelsRef:C.context.itemLabels,onMapChange:S,children:ue})})]})});var ia=T(D(),1);var eh=T(D(),1),IP=eh.createContext(void 0);function xk(){let e=eh.useContext(IP);if(e===void 0)throw new Error(_e(34));return e}var MP=ia.forwardRef(function(t,o){let{render:n,className:r,value:s,defaultValue:i,onValueChange:a,disabled:l=!1,style:c,"aria-labelledby":u,...p}=t,[d,m]=ia.useState(void 0),[g,R]=_t({controlled:s,default:i,name:"MenuRadioGroup"}),b=q((y,S)=>{a?.(y,S),!S.isCanceled&&R(y)}),h=j("div",t,{state:{disabled:l},ref:o,props:{role:"group","aria-labelledby":u??d,"aria-disabled":l||void 0,...p}}),C=ia.useMemo(()=>({value:g,setValue:b,disabled:l}),[g,b,l]);return f(af.Provider,{value:m,children:f(IP.Provider,{value:C,children:h})})}),th=ia.memo(ia.forwardRef(function(t,o){let n=xi()?.RadioGroup??MP;return f(n,{...t,ref:o})}));var pf=T(D(),1);var oh=T(D(),1),DP=oh.createContext(void 0);function Ck(){let e=oh.useContext(DP);if(e===void 0)throw new Error(_e(35));return e}var I4=pf.forwardRef(function(t,o){let{render:n,className:r,id:s,label:i,nativeButton:a=!1,disabled:l=!1,closeOnClick:c=!1,value:u,style:p,...d}=t,{store:m}=wt(),{value:g,setValue:R,disabled:b}=xk(),x=bo({guess:!0,label:i}),h=Ye(s),C=m.useState("isActive",x.index),y=m.useState("floatingNodeId"),S=m.useState("itemProps"),w=m.useState("disabled"),v=l||b||w,P=g===u,{getItemProps:N,itemRef:E}=pl({closeOnClick:c,disabled:v,highlighted:C,id:h,store:m,nativeButton:a,nodeId:y,itemMetadata:ul}),M=pf.useMemo(()=>({disabled:v,highlighted:C,checked:P}),[v,C,P]);function W(O){let F=Ce($.itemPress,O.nativeEvent,void 0,{preventUnmountOnClose:nt});R(u,F)}let I=j("div",t,{state:M,stateAttributesMapping:dl,props:[S,{role:"menuitemradio","aria-checked":P,onClick:W},d,N],ref:[E,o,x.ref]});return f(DP.Provider,{value:M,children:I})}),nh=pf.forwardRef(function(t,o){let n=Ci(t,o);return n.visible?f(I4,{...t,ref:n.ref}):null});var rh=T(D(),1);var sh=rh.forwardRef(function(t,o){let{render:n,className:r,style:s,keepMounted:i=!1,...a}=t,l=Ck(),c=rh.useRef(null),{transitionStatus:u,mounted:p,setMounted:d}=so(l.checked);It({batch:!0,enabled:!l.checked,open:l.checked,ref:c,onComplete(){l.checked||d(!1)}});let m={checked:l.checked,disabled:l.disabled,highlighted:l.highlighted,transitionStatus:u};return j("span",t,{state:m,stateAttributesMapping:dl,ref:[o,c],props:{"aria-hidden":!0,...a},enabled:i||p})});var ho=T(D(),1);var ih=T(D(),1),NP=ih.createContext(null);function ml(e){let t=ih.useContext(NP);if(t===null&&!e)throw new Error(_e(5));return t}var ep=T(D(),1);var yk={...cr,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=cr.triggerPopupId(e,t);return o?e.listElement?.id||o:void 0},filterTriggerProps:e=>e.filterTriggerProps,inputProps:e=>e.inputProps,webkitAriaSelected:(e,t)=>Rt.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"&&!cr.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")}},ah=class extends No{constructor(t,o,n=!1){let r=new qo,s=wk(r,o,n,t);super(s,vk(r),yk),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"),n=t.store.select("floatingTreeRoot"),r=t.store.select("keyboardEventRelay");return t.store.subscribe(()=>{let s=t.store.select("rootId"),i=t.store.select("floatingTreeRoot"),a=t.store.select("keyboardEventRelay");o===s&&n===i&&r===a||(o=s,n=i,r=a,this.notifyAll())})}setOpen(t,o){this.state.floatingRootContext.context.events.emit("setOpen",{open:t,eventDetails:o})}setActiveIndex(t,o,n){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:n}this.set("activeIndex",t)}highlightItem(t,o,n){let r=this.context.itemDomElements.current.indexOf(t);r>-1&&this.setActiveIndex(r,o,n)}};function Sk(){let e=new qo,t=new Qr(Object.freeze(wk(e)),Object.freeze(vk(e)),yk);return Object.assign(t,{setOpen:nt})}function vk(e){return{positionerRef:ep.createRef(),popupRef:ep.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},highlightReason:"none",highlightEvent:void 0,reportedItem:void 0,allowMouseUpTriggerRef:{current:!1},virtualFocusRef:void 0,triggerFocusTargetRef:ep.createRef(),beforeTriggerFocusGuardRef:ep.createRef(),beforeContentFocusGuardRef:ep.createRef(),onOpenChangeComplete:void 0,triggerElements:e}}function wk(e,t,o=!1,n){return{...pi(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:ot,inputProps:ot,inputFocused:!1,highlightedItem:void 0,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new za,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:ot,keyboardEventRelay:void 0,closeDelay:0,adaptiveOrigin:void 0,...n}}var Pk=T(D(),1),gl=Pk.createContext(null);function AP(e,t){return(e===$.triggerPress||e===$.itemPress)&&t?.detail===0}function lh(e,t){return e===$.listNavigation||AP(e,t)}var xc=Ts(function(t){let{children:o,open:n,onOpenChange:r,onOpenChangeComplete:s,onItemHighlighted:i,defaultOpen:a=!1,disabled:l=!1,modal:c,loopFocus:u=!0,orientation:p="vertical",actionsRef:d,closeParentOnEsc:m=!1,handle:g,triggerId:R,defaultTriggerId:b=null,highlightItemOnHover:x=!0,isSubmenu:h=!1,virtualFocus:C=!1,virtualFocusRef:y,allowEscape:S=!0,resetOnPointerLeave:w=!0}=t,v=hi(!0),P=wt(!0),N=ml(!0),E=P?.store,M=P?.virtualFocus??!1,W=ho.useMemo(()=>h&&E?{type:"menu",store:E}:N?{type:"menubar",context:N}:v&&!E?{type:"context-menu",context:v}:{type:void 0},[v,E,N,h]),I=Ye(),O=Ye(),[F,k]=ho.useState(void 0),U=(F??O)||void 0,_=On(),B=W.type==="menu"?W.store:void 0,L=(n??a)&&B?.state.transitionStatus==="starting",V=gt(()=>L?B?.state.instantType:void 0).current,A=gt(()=>{let pe=new ah({open:a,openProp:n,activeTriggerId:b,triggerIdProp:R,parent:W,disabled:l,highlightItemOnHover:x,modal:W.type===void 0?c:void 0,rootId:I,instantType:V},U,_!=null);return pe.context.virtualFocusRef=y,pe}).current;A.useControlledProp("openProp",n),A.useControlledProp("triggerIdProp",R),A.useContextCallback("onOpenChangeComplete",s);let K=A.useState("floatingTreeRoot"),H=kr(K),G=A.useState("open"),oe=A.useState("activeTriggerElement"),ee=A.useState("positionerElement"),X=A.useState("hoverEnabled"),te=A.useState("disabled"),ce=A.useState("lastOpenChangeReason"),le=A.useState("parent"),Q=A.useState("activeIndex"),ne=A.useState("keyboardOpen"),Y=A.useState("payload"),ae=A.useState("floatingParentNodeId"),Z=ho.useRef(null),ue=ho.useRef(le.type!=="context-menu"),Te=ct(),fe=ho.useRef(!0),ve=ct(),z=ae!=null,{openMethod:Re,triggerProps:xe}=Tu(G);A.useSyncedValues({disabled:l,highlightItemOnHover:x,modal:le.type===void 0?c:void 0,openMethod:Re,rootId:I}),ii(A);let{forceUnmount:Pe,transitionStatus:ie}=ai(G,A,()=>{A.set("allowMouseEnter",!1)},L),re=xr(A.context.popupRef);ho.useEffect(()=>{if(V===void 0)return;let pe=()=>{A.state.instantType===V&&A.set("instantType",void 0)};if(!G){pe();return}if(ie!==void 0)return;if(A.context.popupRef.current==null){pe();return}let Ae=new AbortController;return re(pe,Ae.signal),()=>{Ae.abort()}},[V,G,ie,re,A]),J(()=>{v&&!P?A.update({parent:{type:"context-menu",context:v},floatingNodeId:H,floatingParentNodeId:_}):(P||!A.select("activeTriggerElement"))&&A.update({floatingNodeId:H,floatingParentNodeId:_})},[v,P,H,_,oe,A]),ho.useEffect(()=>{if(G||(Z.current=null),le.type==="context-menu"){if(!G){Te.clear(),ue.current=!1;return}Te.start(500,()=>{ue.current=!0})}},[Te,G,le.type]),J(()=>{!G&&!X&&A.set("hoverEnabled",!0)},[G,X,A]);let Ee=q((pe,Ae)=>{let we=Ae.reason;if(!pe&&!A.select("open")||G===pe&&Ae.trigger===oe&&ce===we)return;let Oe=Es(Ae);if(!pe&&Ae.trigger==null&&(Ae.trigger=oe??void 0),r?.(pe,Ae),Ae.isCanceled)return;A.state.floatingRootContext.dispatchOpenChange(pe,Ae);let $e=Ae.event;if(pe===!1&&we!==$.itemPress&&$e?.type==="click"&&$e.pointerType==="touch"&&!fe.current)return;pe&&we===$.triggerFocus?(fe.current=!1,ve.start(300,()=>{fe.current=!0})):(fe.current=!0,ve.clear());let Ve=!pe&&(we===$.escapeKey||we==null);Z.current=Ae.event;let Ze=tc(A.state,pe,Ae.trigger,Oe());Ze.openChangeReason=we,Ze.keyboardOpen=pe&&lh(we,$e),le.type==="menubar"&&(we===$.triggerFocus||we===$.focusOut||we===$.triggerHover||we===$.listNavigation||we===$.siblingOpen)?Ze.instantType="group":AP(we,$e)?Ze.instantType="click":Ve?Ze.instantType="dismiss":Ze.instantType=void 0,A.update(Ze)}),ye=Md({popupStore:A,floatingRootContext:A.state.floatingRootContext,floatingId:U,nested:_!=null,onOpenChange:Ee}),se=ye.context.events;J(()=>{let pe=({open:Ae,eventDetails:we})=>Ee(Ae,we);return se.on("setOpen",pe),()=>{se?.off("setOpen",pe)}},[se,Ee]),J(()=>A.subscribeToParentMenu(),[A]);let Fe=ho.useCallback(()=>{A.setOpen(!1,Ce($.imperativeAction))},[A]);ho.useImperativeHandle(d,()=>({unmount:Pe,close:Fe}),[Pe,Fe]);let ke;le.type==="context-menu"&&(ke=le.context),ho.useImperativeHandle(ke?.positionerRef,()=>ee,[ee]),ho.useImperativeHandle(ke?.actionsRef,()=>({setOpen:Ee}),[Ee]);let de=Vn(ye,{enabled:!te,bubbles:{escapeKey:m&&le.type==="menu"},outsidePress(){return le.type!=="context-menu"||Z.current?.type==="contextmenu"?!0:ue.current},externalTree:z?K:void 0}),Ie=kt(),Me=rc(ye,{enabled:!te,listRef:A.context.itemDomElements,activeIndex:Q,virtual:C,nested:le.type==="menubar"||!C&&le.type!==void 0,parentOrientation:le.type==="menubar"?le.context.orientation:void 0,loopFocus:u,focusItemOnOpen:C?ne:void 0,allowEscape:C&&u&&S,orientation:p,triggerOrientation:C?"vertical":p,rtl:Ie==="rtl",disabledIndices:Et,onNavigate(pe,Ae){A.setActiveIndex(pe,bi(Ae),Ae?.nativeEvent)},openOnArrowKeyDown:le.type!=="context-menu"&&!(C&&h),externalTree:!C&&z?K:void 0,nestedReturnFocusRef:B?.context.virtualFocusRef,focusItemOnHover:x,resetOnPointerLeave:w}),We=ho.useCallback(pe=>{A.context.typingRef.current=pe},[A]),Ue=ic(ye,{enabled:!te&&!C,listRef:A.context.itemLabels,elementsRef:A.context.itemDomElements,activeIndex:Q,resetMs:500,onMatch:(pe,Ae)=>{G&&pe!==Q&&A.setActiveIndex(pe,$.keyboard,Ae.nativeEvent)},onTyping:We}),ze=q(i),He=ho.useRef(-1),je=q(()=>{let pe=A.state.activeIndex,Ae=pe===null?void 0:A.context.itemDomElements.current[pe]??void 0;if(Ae?.isConnected===!1)return;let we=Ae===void 0?-1:pe;if(He.current===we&&A.context.reportedItem===Ae)return;He.current=we,A.context.reportedItem=Ae,C&&A.set("highlightedItem",Ae);let{highlightReason:Oe,highlightEvent:$e}=A.context;A.context.highlightReason=$.none,A.context.highlightEvent=void 0,i&&ze(Ae,go(Oe,$e,{label:Ae===void 0?void 0:A.context.itemLabels.current[we]??void 0}))});J(()=>{je()},[Q,je]);let Qe=ho.useMemo(()=>{if(!C)return Me.reference;if(!Me.trigger)return ot;let{onFocus:pe,...Ae}=Me.trigger;return Ae},[C,Me.reference,Me.trigger]);A.useSyncedValue("inputProps",C?Me.reference??ot:ot);let et=ho.useMemo(()=>{let pe=Mt(Ue.reference,Qe,de.reference,{onMouseMove(){A.set("allowMouseEnter",!0)}},xe);return pe["aria-haspopup"]="menu",pe["aria-expanded"]=G,pe},[A,Ue.reference,Qe,de.reference,xe,G]),ut=ho.useMemo(()=>{let pe=Mt(Me.trigger,de.trigger,xe);return pe["aria-haspopup"]="menu",pe["aria-expanded"]=!1,pe},[Me.trigger,de.trigger,xe]);gt(()=>(A.update({inactiveTriggerProps:ut}),null));let vt=ho.useMemo(()=>Mt(Zn,{onMouseMove(){A.set("allowMouseEnter",!0),le.type==="menu"&&A.set("hoverEnabled",!1)},onClick(){A.select("hoverEnabled")&&A.set("hoverEnabled",!1)},onKeyDown(pe){let Ae=A.select("keyboardEventRelay");Ae&&!pe.isPropagationStopped()&&Ae(pe)}},Ue.floating,Me.floating,de.floating),[le.type,A,Ue.floating,Me.floating,de.floating]),De=Me.item??ot;li(A,{floatingRootContext:ye,activeTriggerProps:et,inactiveTriggerProps:ut,popupProps:vt,itemProps:De});let he=ho.useMemo(()=>({store:A,parent:W,orientation:p,loopFocus:u,allowEscape:S,defaultFloatingId:O,setRenderedFloatingId:k,virtualFocus:C,parentVirtualFocus:M,syncHighlightedItem:je}),[A,W,p,u,S,O,C,M,je]),be=typeof o=="function"?o({payload:Y}):o,Le=f(Rc.Provider,{value:he,children:[g&&f(ri,{handle:g,store:A}),be]});return(le.type===void 0||le.type==="context-menu")&&(Le=f(Ps,{externalTree:K,children:Le})),Le});function Ek(e){let t=ho.useContext(gl);if(t===null)return f(xc,{...e});let o=t.Root;return f(gl.Provider,{value:null,children:f(o,{...t.options,...e})})}var Tk=T(D(),1);var M4={};function ch(e){wt();let t=Tk.useContext(gl);if(t!==null){let o=t.SubmenuRoot;return f(gl.Provider,{value:null,children:f(o,{...t.options,...e})})}return f(uf.Provider,{value:M4,children:f(xc,{...e,isSubmenu:!0})})}var tr=T(D(),1);var Ik=T(D(),1);function uh(e={}){let{highlightItemOnHover:t,highlightedIndex:o,onHighlightedIndexChange:n}=La(),{ref:r,index:s}=bo(e),i=o===s,a=Ik.useRef(null),l=Wt(r,a);return{compositeProps:{tabIndex:i?0:-1,onFocus(){n(s)},onMouseMove(){let u=a.current;if(!t||!u)return;let p=u.hasAttribute("disabled")||u.ariaDisabled==="true";!i&&!p&&u.focus()}},compositeRef:l,index:s}}function er(e){let{render:t,className:o,style:n,state:r=ot,props:s=Et,refs:i=Et,metadata:a,stateAttributesMapping:l,tag:c="div",...u}=e,{compositeProps:p,compositeRef:d}=uh({metadata:a});return j(c,e,{state:r,ref:[d,...i],props:[p,...s,u],stateAttributesMapping:l})}function df(e){if(st(e)&&e.hasAttribute("data-rootownerid"))return e.getAttribute("data-rootownerid");if(!Yn(e))return df(bn(e))}var Mk=T(on(),1);function ph(e,t){function o(s,i,a){let l=s.currentTarget;Mk.flushSync(()=>{e.setOpen(!1,Ce($.focusOut,s.nativeEvent,l))}),Mg(l.isConnected?l:t.current,i,a)?.focus()}function n(s){o(s,-1,e.select("positionerElement"))}function r(s){let i=e.select("positionerElement");i&&An(s,i)?e.context.beforeContentFocusGuardRef.current?.focus():o(s,1,i)}return{handlePreFocusGuardFocus:n,handleFocusTargetFocus:r}}var dh=T(D(),1);function Dk(e){let{enabled:t=!0,mouseDownAction:o,open:n}=e,r=dh.useRef(!1);return dh.useMemo(()=>t?{onMouseDown:s=>{(o==="open"&&!n||o==="close"&&n)&&(r.current=!0,Be(s.currentTarget).addEventListener("click",()=>{r.current=!1},{once:!0}))},onClick:s=>{r.current&&(r.current=!1,s.preventBaseUIHandler())}}:ot,[t,o,n])}var Nk=ci(function(t,o){let{render:n,className:r,style:s,disabled:i=!1,nativeButton:a=!0,id:l,openOnHover:c,delay:u=100,closeDelay:p=0,handle:d,payload:m,...g}=t,R=wt(!0),x=di(d)??R?.store;if(!x)throw new Error(_e(85));let h=Ye(l),C=x.useState("isTriggerActive",h),y=x.useState("floatingRootContext"),S=x.useState("isOpenedByTrigger",h),w=x.useState("triggerControlsId",h),v=tr.useRef(null),P=N4(),N=La(!0),E=jo(),M=tr.useMemo(()=>E??new za,[E]),W=kr(M),I=On(),{registerTrigger:O,isMountedByThisTrigger:F}=si(h,v,x,{payload:m,closeDelay:p,parent:P,floatingTreeRoot:M,floatingNodeId:W,floatingParentNodeId:I,keyboardEventRelay:N?.relayKeyboardEvent}),k=P.type==="menubar",U=x.useState("disabled"),_=i||U||k&&P.context.disabled,{getButtonProps:B,buttonRef:L}=bt({disabled:_,native:a});tr.useEffect(()=>{!S&&P.type===void 0&&(x.context.allowMouseUpTriggerRef.current=!1)},[x,S,P.type]);let V=tr.useRef(null),A=ct(),K=q(ve=>{if(!V.current)return;A.clear(),x.context.allowMouseUpTriggerRef.current=!1;let z=ve.target;Ne(V.current,z)||Ne(x.select("positionerElement"),z)||z===V.current||z!=null&&df(z)===x.select("rootId")||Fu(ve,V.current)||M.events.emit("close",{domEvent:ve,reason:$.cancelOpen})});tr.useEffect(()=>{let ve=Be(V.current);if(S&&x.select("lastOpenChangeReason")===$.triggerHover)return ve.addEventListener("mouseup",K,{once:!0}),()=>{ve.removeEventListener("mouseup",K)}},[S,K,x]);let H=k&&P.context.hasSubmenuOpen,oe=Hr(y,{enabled:(c??H)&&!_&&(!k||H&&!F),handleClose:Gr({blockPointerEvents:!k}),mouseOnly:!0,move:!1,restMs:P.type===void 0?u:void 0,delay:{close:p},triggerElementRef:v,externalTree:M,isActiveTrigger:C,isClosing:()=>x.select("transitionStatus")==="ending"}),ee=D4(S,x.select("lastOpenChangeReason")),X=_n(y,{enabled:!_,event:S&&k?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:P.type===void 0?ee:!1}),te=nc(y,{enabled:!_&&H}),ce=Dk({open:S,enabled:k,mouseDownAction:"open"}),le=tr.useMemo(()=>Mt(te.reference,X.reference),[te.reference,X.reference]),Q=x.useState("triggerProps",F),ne=x.useState("filterTriggerProps"),{handlePreFocusGuardFocus:Y,handleFocusTargetFocus:ae}=ph(x,v),Z={disabled:_,open:S},ue=[V,o,L,O,v],Te=[le,oe??ot,Q,{"aria-haspopup":"menu","aria-controls":w,id:h,onMouseDown:ve=>{if(x.select("open"))return;A.start(200,()=>{x.context.allowMouseUpTriggerRef.current=!0}),Be(ve.currentTarget).addEventListener("mouseup",K,{once:!0})}},ne,k?{role:"menuitem"}:{},ce,g,B],fe=j("button",t,{enabled:!k,stateAttributesMapping:Or,state:Z,ref:ue,props:Te});return k?f(er,{tag:"button",render:n,className:r,style:s,state:Z,refs:ue,props:Te,stateAttributesMapping:Or}):S?f(tr.Fragment,{children:[f(nn,{ref:x.context.beforeTriggerFocusGuardRef,onFocus:Y},`${h}-pre-focus-guard`),f(tr.Fragment,{children:fe},h),f(nn,{ref:x.context.triggerFocusTargetRef,onFocus:ae},`${h}-post-focus-guard`)]}):f(tr.Fragment,{children:fe},h)});function D4(e,t){let o=ct(),[n,r]=tr.useState(!1);return J(()=>{e&&t===$.triggerHover?(r(!0),o.start(500,()=>{r(!1)})):e||(o.clear(),r(!1))},[e,t,o]),n}function N4(){let e=ml(!0);return tr.useMemo(()=>e?{type:"menubar",context:e}:{type:void 0},[e])}var Hk=T(D(),1);var Bn=T(D(),1),Bk=T(on(),1);var Ak=T(D(),1);function fh(e){let[t,o]=Ak.useState({current:e,previous:null});return Object.is(e,t.current)||o({current:e,previous:t.current}),t.previous}var bh=T(D(),1);function ns(e){let t=Mo(e),o=parseFloat(t.width)||0,n=parseFloat(t.height)||0,r=st(e),s=r?e.offsetWidth:o,i=r?e.offsetHeight:n;return(Ga(o)!==s||Ga(n)!==i)&&(o=s,n=i),{width:o,height:n}}var ff="--popup-width",mf="--popup-height";function _k(e){let{popupElement:t,positionerElement:o,content:n,mounted:r,onMeasureLayout:s,onMeasureLayoutComplete:i,side:a,direction:l}=e,c=xr(t,!0),u=vo(),p=bh.useRef(null),d=q(s),m=q(i),g=bh.useMemo(()=>A4(a,l),[a,l]);J(()=>{if(!r){p.current=null;return}if(!t||!o)return;let R=Fk(t,g);FP(t,"auto");let b=gh(t,"position","static"),x=gh(t,"transform","none"),h=gh(t,"scale","1"),C=Fk(o,{[Kb]:"max-content",[Yb]:"max-content"});function y(){b(),x(),C(),h()}if(d?.(),p.current===null){mh(o,"max-content");let P=ns(t);return p.current=P,mh(o,P),y(),m?.(null,P),R}mh(o,"max-content");let S=p.current,w=ns(t);p.current=w,FP(t,S),y(),m?.(S,w),mh(o,w);let v=new AbortController;return u.request(()=>{FP(t,w),c(()=>{t.style.setProperty(ff,"auto"),t.style.setProperty(mf,"auto")},v.signal)}),()=>{v.abort(),u.cancel(),R()}},[n,t,o,c,u,r,d,m,g])}function A4(e,t){let o=e==="top",n=e==="left"||e===(t==="rtl"?"inline-end":"inline-start");return!o&&!n?ot:{position:"absolute",[o?"bottom":"top"]:"0",[n?"right":"left"]:"0"}}function gh(e,t,o){let n=e.style.getPropertyValue(t);return e.style.setProperty(t,o),()=>{e.style.setProperty(t,n)}}function Fk(e,t){let o=[];for(let[n,r]of Object.entries(t))o.push(gh(e,n,r));return o.length?()=>{o.forEach(n=>n())}:nt}function FP(e,t){let o=t==="auto"?"auto":`${t.width}px`,n=t==="auto"?"auto":`${t.height}px`;e.style.setProperty(ff,o),e.style.setProperty(mf,n)}function mh(e,t){let o=t==="max-content"?"max-content":`${t.width}px`,n=t==="max-content"?"max-content":`${t.height}px`;e.style.setProperty(rV,o),e.style.setProperty(sV,n)}var Vk=T(D(),1);var _P=function(t){let{direction:o="ltr"}=t,n=Vk.useMemo(()=>({direction:o}),[o]);return f(Nw.Provider,{value:n,children:t.children})};var Rh={name:"adaptiveOrigin",async fn(e){let{x:t,y:o,rects:{floating:n},elements:{floating:r},platform:s,strategy:i,placement:a}=e,l=rt(r),c=l.getComputedStyle(r);if(!(c.transitionDuration!=="0s"&&c.transitionDuration!==""))return{x:t,y:o,data:Gu};let p=await s.getOffsetParent?.(r),d={width:0,height:0};if(i==="fixed"&&l?.visualViewport)d={width:l.visualViewport.width,height:l.visualViewport.height};else if(p===l){let h=Be(r);d={width:h.documentElement.clientWidth,height:h.documentElement.clientHeight}}else await s.isElement?.(p)&&(d=await s.getDimensions(p));let m=Dn(a),g=t,R=o;m==="left"&&(g=d.width-(t+n.width)),m==="top"&&(R=d.height-(o+n.height));let b=m==="left"?"right":Gu.sideX,x=m==="top"?"bottom":Gu.sideY;return{x:g,y:R,data:{sideX:b,sideY:x}}}};var kk="data-activation-direction";var bl={activationDirection:e=>e?{[kk]:e}:null};function Rl(e){let{store:t,side:o,children:n}=e,r=kt(),s=t.useState("activeTriggerElement"),i=t.useState("activeTriggerId"),a=t.useState("open"),l=t.useState("payload"),c=t.useState("mounted"),u=t.useState("popupElement"),p=t.useState("positionerElement"),d=fh(a?s:null),m=V4(i,l),g=Bn.useRef(null),[R,b]=Bn.useState(null),[x,h]=Bn.useState(null),C=Bn.useRef(null),y=Bn.useRef(null),S=xr(C,!0),w=vo(),v=Bn.useRef(null),[P,N]=Bn.useState(null),[E,M]=Bn.useState(!1);J(()=>(t.set("adaptiveOrigin",Rh),()=>{t.set("adaptiveOrigin",void 0)}),[t]);let W=q(()=>{C.current?.style.setProperty("animation","none"),C.current?.style.setProperty("transition","none"),y.current?.style.setProperty("display","none")}),I=q(B=>{C.current?.style.removeProperty("animation"),C.current?.style.removeProperty("transition"),y.current?.style.removeProperty("display"),B&&N(B)}),O=q(()=>{v.current?.abort();let B=new AbortController;v.current=B,S(()=>{b(null),N(null),g.current=null},B.signal)}),F=Bn.useRef(null);J(()=>{(!a||!c)&&(F.current=null)},[a,c]),J(()=>{if(a&&s&&d&&s!==d&&F.current!==s&&g.current){b(g.current),M(!0);let B=_4(d,s);h(B),F.current=s}},[a,s,d]),J(()=>{R!=null&&(v.current?.abort(),M(!0),w.request(()=>{Bk.flushSync(()=>{M(!1)}),O()}))},[m,R,O,w]),J(()=>{let B=C.current;if(!B)return;let L=Be(B).createElement("div");for(let V of Array.from(B.childNodes))L.appendChild(V.cloneNode(!0));g.current=L});let k=R!=null,U;k?U=f(Bn.Fragment,{children:[f("div",{"data-previous":!0,inert:sn(!0),ref:y,style:{...P?{[ff]:`${P.width}px`,[mf]:`${P.height}px`}:null,position:"absolute"},"data-ending-style":E?void 0:""},"previous"),f("div",{"data-current":!0,ref:C,"data-starting-style":E?"":void 0,children:n},m)]}):U=f("div",{"data-current":!0,ref:C,children:n},m),J(()=>{let B=y.current;!B||!R||B.replaceChildren(...Array.from(R.childNodes))},[R]),_k({popupElement:u,positionerElement:p,mounted:c,content:l,onMeasureLayout:W,onMeasureLayoutComplete:I,side:o,direction:r});let _={activationDirection:F4(x),transitioning:k};return{children:U,state:_}}function F4(e){if(e)return`${Lk(e.horizontal,5,"right","left")} ${Lk(e.vertical,5,"down","up")}`}function Lk(e,t,o,n){return e>t?o:e<-t?n:""}function _4(e,t){let o=e.getBoundingClientRect(),n=t.getBoundingClientRect(),r={x:o.left+o.width/2,y:o.top+o.height/2},s={x:n.left+n.width/2,y:n.top+n.height/2};return{horizontal:s.x-r.x,vertical:s.y-r.y}}function V4(e,t){let[o,n]=Bn.useState(0),r=Bn.useRef(e),s=Bn.useRef(t),i=Bn.useRef(!1);return J(()=>{let a=r.current,l=s.current,c=e!==a,u=t!==l;c?(n(p=>p+1),i.current=!u):i.current&&u&&(n(p=>p+1),i.current=!1),r.current=e,s.current=t},[e,t]),`${e??"current"}-${o}`}var Gk=Hk.forwardRef(function(t,o){let{render:n,className:r,style:s,children:i,...a}=t,{store:l}=wt(),{side:c}=cl(),u=l.useState("instantType"),{children:p,state:d}=Rl({store:l,side:c,children:i}),m={activationDirection:d.activationDirection,transitioning:d.transitioning,instant:u};return j("div",t,{state:m,ref:o,props:[a,{children:p}],stateAttributesMapping:bl})});var Uk=T(D(),1);var rs=Uk.forwardRef(function(t,o){let{className:n,render:r,orientation:s="horizontal",style:i,...a}=t;return j("div",t,{state:{orientation:s},ref:o,props:[{role:"separator","aria-orientation":s},a]})});var Os=T(D(),1);function hh(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}var k4={"aria-expanded":void 0},L4=Os.forwardRef(function(t,o){let{render:n,className:r,style:s,label:i,id:a,nativeButton:l=!1,openOnHover:c=!0,delay:u=100,closeDelay:p=0,disabled:d=!1,...m}=t,g=wt(!0);if(g?.parent.type!=="menu")throw new Error(_e(37));let R=cl(),b=Zu(),{store:x,parentVirtualFocus:h}=g,C=g.parent.store,y=bo({guess:!0,label:i}),S=Ye(a),w=x.useState("open"),v=Os.useRef(!1),P=x.useState("positionerElement"),N=x.useState("floatingRootContext"),E=x.useState("floatingTreeRoot"),M=x.useState("triggerPopupId",S),W=Dd(S,x),I=q(Z=>{W(Z);let ue=x.select("activeTriggerElement");Z!==null&&x.select("open")&&(ue===Z||x.select("activeTriggerId")==null)&&x.update({activeTriggerId:S??null,activeTriggerElement:Z,closeDelay:p})}),O=Os.useRef(null),F=Os.useCallback(Z=>{O.current=Z,x.set("activeTriggerElement",Z)},[x]);J(()=>(I(O.current),()=>I(null)),[I,S,x]),J(()=>{if(!w||!P)return;function Z(ue){Je(ue)===x.context.beforeContentFocusGuardRef.current&&(v.current=ue.relatedTarget===O.current)}return P.addEventListener("focusout",Z,!0),()=>{v.current=!1,P.removeEventListener("focusout",Z,!0)}},[w,P,x]),x.useSyncedValue("closeDelay",p);let k=x.useState("disabled"),U=C.useState("disabled"),_=d||k||U,B=C.useState("itemProps"),L=C.useState("isActive",y.index),V=Os.useMemo(()=>({type:"submenu-trigger",setActive(Z){C.select("highlightItemOnHover")&&C.setActiveIndex(y.index,$.pointer,Z)}}),[C,y.index]),{getItemProps:A,itemRef:K}=pl({closeOnClick:!1,disabled:_,highlighted:L,id:S,store:x,typingRef:C.context.typingRef,nativeButton:l,itemMetadata:V,nodeId:R?.context.nodeId}),H=x.useState("hoverEnabled"),G=Hr(N,{enabled:H&&c&&!_,handleClose:Gr({blockPointerEvents:!0}),mouseOnly:!0,move:!0,restMs:u,delay:{open:u,close:p},shouldOpen:u>0?()=>C.select("allowMouseEnter"):void 0,triggerElementRef:O,externalTree:E,isClosing:()=>x.select("transitionStatus")==="ending",guardStaleOpen:!0}),ee=_n(N,{enabled:!_,event:"mousedown",toggle:!0,ignoreMouse:c,stickIfOpen:c}).reference??ot,X=x.useState("triggerProps",!0);delete X.id;let te={disabled:_,highlighted:L,open:w},ce=x.useState("openMethod"),Q=x.useState("lastOpenChangeReason")===$.listNavigation||ce==="keyboard",ne=w&&Q&&Rt.screenReader.voiceOver,Y=b?.onTriggerKeyDown?{onKeyDown:b.onTriggerKeyDown}:void 0;return j("div",t,{state:te,stateAttributesMapping:qn,props:[ee,G,X,Y,B,ne?k4:void 0,{"aria-controls":M,tabIndex:h||!(w||L)?-1:0,onFocus(Z){x.select("open")&&v.current&&(v.current=!1,x.setOpen(!1,Ce($.focusOut,Z.nativeEvent)))},onBlur(){L&&C.setActiveIndex(null,$.none)}},m,A],ref:[o,y.ref,K,I,F]})}),xh=Os.forwardRef(function(t,o){let n=Ci(t,o,"submenu-trigger");if(!n.visible)return null;let r=n.props?Mt(n.props,t):t;return f(L4,{...r,ref:n.ref})});var gf=class extends Jr{constructor(){super(Sk(),"Menu")}open(t){this.openByTrigger(t)}close(){this.closePopup()}get isOpen(){return this.attachedStore?.select("open")??!1}};function Wk(){return new gf}var pL=T(D(),1);var iWe=T(D(),1);var aL=T(D(),1);var Pr=T(D(),1);var tp=T(D(),1);function Ch(){let e=gt(()=>new Map).current,[t,o]=tp.useState(0),n=tp.useRef(!1),r=q(()=>{n.current||(n.current=!0,o(a=>a+1))}),s=q((a,l)=>(e.set(a,l),r(),()=>{e.delete(a),r()})),i=tp.useMemo(()=>new Map(e),[t]);return J(()=>{n.current=!1},[t]),{items:i,registerItem:s,liveItems:e}}var aa=T(D(),1);function jk(){throw new Error(_e(103))}var bf=aa.createContext(null);function yi(e=!1){let t=aa.useContext(bf);return t===null&&!e&&jk(),t}var VP=aa.createContext(null);function Si(e=!1){let t=aa.useContext(VP);return t===null&&!e&&jk(),t}function zk(e){let t=aa.useContext(bf);if(e===null)return null;for(;t!==null&&t.listRef!==e;)t=t.parent;return t}var kP=aa.createContext("");function hl(){return aa.useContext(kP)}var hf={isEmpty:e=>e.visibleItemIds===null?e.registeredItemCount===0:e.visibleItemIds.size===0,isItemVisible:(e,t)=>e.visibleItemIds===null||e.visibleItemIds.has(t)},Rf=class extends No{constructor(){super({visibleItemIds:null,registeredItemCount:0},ot,hf)}},$k={registerItem:()=>nt,store:new Rf};function Kk(e){let{children:t,open:o,disabled:n=!1,openedByKeyboard:r=!1,locale:s,value:i,query:a,onValueChange:l,filter:c,autoHighlight:u=!1,triggerId:p,listRef:d,getActiveIndex:m,setActiveIndex:g,focusOwnerRef:R}=e,b=Pr.useContext(bf),[x,h]=Pr.useState(void 0),[C,y]=Pr.useState(r),[S,w]=Pr.useState(r),[v,P]=Pr.useState(r);r!==v&&(P(r),y(r),w(r));let{items:N,registerItem:E,liveItems:M}=Ch(),W=Ye(),I=gt(()=>new Rf).current,O=q((te,ce)=>{let le=E(te,ce);return I.set("registeredItemCount",M.size),()=>{le(),I.set("registeredItemCount",M.size)}}),F=Pr.useRef(null),k=Pr.useRef(null),U=Pr.useMemo(()=>fc({locale:s}).contains,[s]),_=R??F,B=(a??i).trim(),L=B===""||c===null?null:c??U,V=o&&(u==="always"||u&&B!==""),A=W?`${W}-list`:void 0,K=(x??A)||void 0,H=p||void 0,G=q((te,ce)=>{l?.(te,ce),!ce.isCanceled&&!u&&g(null)}),oe=q(te=>{let ce=d.current,le=m();le!=null&&ce[le]!=null&&ce[le]===te[le]||g(V&&ce.length>0?0:null)});J(()=>{if(!o&&a===void 0)return;let te=k.current!==null&&k.current!==B;if(k.current=B,L===null){I.set("visibleItemIds",null),V&&M.size>0?(te||m()==null)&&g(0):B===""&&te&&g(null);return}let ce=I.state.visibleItemIds;if(ce===null&&M.size===0)return;let le=new Set,Q=ce===null;M.forEach(({getText:ne},Y)=>{let ae=ne();ae!=null&&L(ae,B)&&(le.add(Y),Q||(Q=!ce?.has(Y)))}),Q||ce?.size!==le.size?(V&&le.size>0?g(0):(ce!==null||te)&&g(null),I.set("visibleItemIds",le)):V&&te&&le.size>0&&g(0)},[o,a,B,N,M,L,V,I,g,m]);let ee=Pr.useMemo(()=>({open:o,disabled:n,inputFocusVisible:C,setInputFocusVisible:y,keyboardModality:S,setKeyboardModality:w,autoHighlight:u,triggerId:H,defaultListId:A,listId:K,setRenderedListId:h,focusOwnerRef:_,setActiveIndex:g,onItemsChange:oe,onValueChange:G}),[o,n,C,S,u,H,A,K,_,g,oe,G]),X=Pr.useMemo(()=>({parent:b,store:I,registerItem:O,listRef:d}),[b,I,O,d]);return f(bf.Provider,{value:X,children:f(VP.Provider,{value:ee,children:f(kP.Provider,{value:a??i,children:t})})})}var yh=T(D(),1);function Yk(e){let{open:t,mounted:o,value:n,onValueChange:r}=e,[s,i]=yh.useState(null),a=yh.useRef(t);return J(()=>{let l=a.current;a.current=t,l&&!t&&n!==""?(i(n),r("",Ce($.popupClose))):(t||!o)&&s!==null&&i(null)},[t,o,n,s,r]),!t&&s!==null?s:n}var Xk=T(D(),1);var vh=T(D(),1);var LP=!1;function xl(e){LP=!0;try{e.focus({preventScroll:!0})}finally{LP=!1}}function Sh(){return LP}function qk(e){let t=Si(),o=kt(),{focusOwnerRef:n}=t,r=vh.useRef(null),s=vh.useRef("mouse");function i(l){s.current=l.pointerType||"mouse"}function a(l,c){let u=n.current;if(!t.open||!u)return;let p=ft(Be(l.currentTarget));if(p===u||Ne(l.currentTarget,p))return;let d=null;l.nativeEvent.composedPath().find(g=>st(g)?g.getAttribute("role")==="dialog"||g.hasAttribute("data-rootownerid")?!0:(g.hasAttribute("aria-haspopup")&&(d=g),!1):!1)===l.currentTarget&&(r.current&&!(c&&d)||c&&d&&lt(l.relatedTarget)&&Ne(d,l.relatedTarget)||xl(u))}return{"aria-activedescendant":void 0,"aria-orientation":void 0,onMouseDown(l){Je(l.nativeEvent)===l.currentTarget&&l.preventDefault()},onPointerDown:i,onPointerOver:i,onPointerMove:i,onMouseMove(l){s.current==="mouse"&&a(l,!1)},onMouseOver(l){s.current==="mouse"&&r.current&&a(l,!0)},onFocus(l){let c=Je(l.nativeEvent);c===n.current?r.current=null:st(c)&&!Ne(l.currentTarget,c)&&!Sh()&&(r.current=c),t.open&&c===l.currentTarget&&n.current?.focus({preventScroll:!0})},onKeyDown(l){let c=Je(l.nativeEvent);c===n.current||Cs(c)||Qa(l.key,e,o==="rtl",!1)&&(n.current?.focus({preventScroll:!0}),l.stopPropagation())}}}var Jk=Xk.forwardRef(function(t,o){let{store:n,orientation:r}=wt(),s=n.useState("open"),i=n.useState("parent"),a=n.useState("openMethod"),l=n.useState("lastOpenChangeReason"),c=qk(r),u=s&&l===$.triggerHover,p=i.type!=="menu"||s&&(a==="keyboard"||l===$.listNavigation||l===$.triggerHover||l===$.triggerPress),d=!1;p&&(d=()=>{let g=(a==="touch"||a==="pen")&&!n.context.virtualPress;return u||g?!1:n.context.virtualFocusRef?.current??!1});let m=Mt(c,t);return f(PP,{...m,role:"dialog",initialFocus:d,ref:o})});var Th=T(D(),1);var Zk=T(D(),1);var wh=T(D(),1),op=wh.createContext(null);function Ph(){return wh.useContext(op)}var Qk=Zk.forwardRef(function(t,o){let{render:n,className:r,style:s,id:i,...a}=t,l=Si(),[c,u]=YR(t,l.defaultListId,l.setRenderedListId);return j("div",t,{ref:[o,u],props:[{tabIndex:-1,id:c,onFocus(d){let m=l.focusOwnerRef.current;m&&d.relatedTarget===m&&Je(d.nativeEvent)===d.currentTarget&&xl(m)},onPointerMove(){l.setKeyboardModality(!1)},onPointerDown(){l.setKeyboardModality(!1)}},a,{children:f(op.Provider,{value:null,children:a.children})}]})});function B4(e,t){let{orientation:o,rtl:n,hasActiveItem:r,activeItemOpensSubmenu:s,hasValue:i}=t,{key:a}=e;if(e.which===229)return"ignore";if(a==="Tab")return e.shiftKey?"close":"ignore";if(a==="Enter")return r?"activate":"navigate";let l=a.startsWith("Arrow"),c=a==="Home"||a==="End";return e.shiftKey||e.ctrlKey||e.altKey||e.metaKey?l||c||a.length===1?"edit":"navigate":a.length===1?"edit":c?r&&!i?"navigate":"edit":l?Zr(a,o)?o==="horizontal"&&!r&&i?"edit":"navigate":s&&(Fd(a,o,n)||Qa(a,o,n,!1))?"submenu":o==="horizontal"&&!r?"enter-list":i?"edit":"navigate":"navigate"}function np(e){let{orientation:t,store:o}=wt(),n=Zu(),r=kt();return q(s=>{if(!o.select("open"))return;let i=o.state.highlightedItem;switch(B4(s,{orientation:t,rtl:r==="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":{Zr(s.key,t)&&s.stopPropagation(),o.state.inputProps.onKeyDown?.(s);break}case"enter-list":{s.stopPropagation();let l=o.context.itemDomElements,c=s.key==="ArrowDown"?ws(l,Et):oi(l,Et);l.current[c]&&(s.preventDefault(),o.setActiveIndex(c,$.keyboard,s.nativeEvent));break}case"submenu":{St(s);let l=rt(i).KeyboardEvent;i.dispatchEvent(new l(s.type,s.nativeEvent));break}case"activate":s.preventDefault(),hr(i,s);break;case"close":{St(s);let l=o.state.parent.type==="menu"&&n?.getReturnElement?.()||o.state.activeTriggerElement,c=Ce($.focusOut,s.nativeEvent);o.setOpen(!1,c),!c.isCanceled&&st(l)&&l.focus();break}default:break}})}function Eh(e,t,o,n){let{orientation:r,rtl:s,loopFocus:i,allowEscape:a}=n,l=e.context.itemDomElements,c=l.current,{index:u}=Ig(c,c.indexOf(t),{decrement:!Od(o.key,r,s),loopFocus:i,allowEscape:a,disabledIndices:Et,minIndex:ws(l,Et),maxIndex:oi(l,Et)}),p=c[u];return p&&(e.setActiveIndex(u,$.keyboard,o.nativeEvent),p.scrollIntoView?.({block:"nearest",inline:"nearest"})),p??void 0}var eL=Th.forwardRef(function(t,o){let{store:n,orientation:r,loopFocus:s,allowEscape:i}=wt(),a=kt(),{onItemsChange:l,focusOwnerRef:c,triggerId:u}=Si(),{listRef:p}=yi(),{subscribeMapChange:d}=Um(),m=hl(),g=np(m!==""),R=q(S=>{let w=c.current,v=Je(S.nativeEvent),P=w!=null&&ft(Be(w))===w,N=!Ne(S.currentTarget,v);if(w==null||P||N){if(S.which!==229&&!S.shiftKey&&!S.ctrlKey&&!S.metaKey&&!S.altKey&&Zr(S.key,r)){S.stopPropagation();let E=N&&P?b(v):void 0;E&&Eh(n,E,S,{orientation:r,rtl:a==="rtl",loopFocus:s,allowEscape:i})}return}S.defaultPrevented||(xl(w),g(S))});function b(S){let w=S.getRootNode();return p.current.find(v=>{let P=v?.getAttribute("aria-controls");return P!=null&&st(v)&&Ne(w.getElementById(P),S)})}let x=Th.useRef(null),h=q(()=>{let S=[...p.current],w=x.current;(w===null||w.length!==S.length||S.some((P,N)=>P!==w[N]))&&w!==null&&l(w),x.current=S});J(()=>d(h),[d,h]);let C=Qu(t,null,u??null),y=Mt({role:"menu","aria-labelledby":C,"aria-orientation":r==="horizontal"?"horizontal":void 0,onKeyDown:R},t);return f(Qk,{...y,ref:o})});var HP=T(D(),1);var tL=T(D(),1);function H4(e,t){if(e.visibleItemIds===null||t.size===0)return!1;for(let[o,n]of t)if(n||e.visibleItemIds.has(o))return!1;return!0}function BP(){let{store:e}=yi(),t=Ph(),{items:o,registerItem:n}=Ch(),r=ui(e,H4,o),s=gt(()=>Symbol("filter-dropdown-group")).current,i=t?.registerItem;J(()=>i?.(s,!r),[i,s,r]);let a=tL.useMemo(()=>({registerItem:n}),[n]);return{hidden:r,context:a}}var oL=HP.forwardRef(function(t,o){let{hidden:n,context:r}=BP();return f(op.Provider,{value:r,children:f(SP,{...t,hidden:n||t.hidden||void 0,ref:o})})}),nL=HP.forwardRef(function(t,o){let{hidden:n,context:r}=BP();return f(op.Provider,{value:r,children:f(MP,{...t,hidden:n||t.hidden||void 0,ref:o})})});var Fs=T(D(),1);function GP(e){return typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(GP).join(""):Fs.isValidElement(e)?GP(e.props.children):""}function Ih(e){let{label:t,retainGroup:o=!1,children:n,render:r,context:s}=e,i=yi(s!==void 0),a=Ph(),l=s===void 0?i:s,{registerItem:c,store:u}=l??$k,p=a?.registerItem,d=gt(()=>Symbol("filter-dropdown-item")).current,m=Fs.useRef(null),g=Fs.useRef(void 0),R=ui(u,hf.isItemVisible,d),[b,x]=Fs.useState(R),h=Tt(n),C=Tt(r),y=Fs.useRef(void 0),S=Fs.useCallback(()=>{if(t!=null)return t;let v=GP(h.current??zl(C.current)),P=y.current;return y.current=v,m.current!==null?m.current.textContent??"":g.current!==void 0&&v===P?g.current:v},[t,h,C]),w=Fs.useCallback(v=>{let P=v??S();return P&&(g.current=P),c(d,{getText(){return t==null&&m.current&&(g.current=m.current.textContent??""),g.current}})},[d,t,c,S]);return J(()=>{let v=w();return x(!0),v},[w]),J(()=>p?.(d,o),[p,d,o]),J(()=>{let v=S();v!==g.current&&(g.current=v,w(v))},[w,S,n,r,t]),{visible:!b||R,ref:m}}function rL(e){let{store:t,virtualFocus:o}=wt(),n=t.useState("open"),r=t.useState("mounted"),s=t.useState("parent"),i=s.type==="menu"?s.store.context.itemDomElements:null,a=zk(i),{visible:l,ref:c}=Ih({...e,context:a,retainGroup:r});J(()=>{l||!n||t.setOpen(!1,Ce($.none))},[l,n,t]);let u=ab((d,m)=>{d.type==="click"&&t.select("open")&&(m==="keyboard"||m==="mouse"&&t.select("lastOpenChangeReason")===$.triggerPress)&&t.context.virtualFocusRef?.current?.focus({preventScroll:!0})}),p={...o?{"aria-haspopup":"dialog"}:void 0,...u,onPointerDown(d){u.onPointerDown(d),t.context.virtualPress=Zs(d.nativeEvent)},onFocus(d){let m=t.context.virtualFocusRef?.current;m&&t.select("open")&&d.relatedTarget===m&&(d.preventBaseUIHandler(),m.focus({preventScroll:!0}))}};return a===null?{visible:!0,ref:null,props:p}:{visible:l||r,ref:c,props:p}}function sL(e,t,o,n){let r=t.type==="menu"?t.store:null,s=r?.context.virtualFocusRef,i=q((l,c)=>{let u=s?.current;n||e.select("open")||!r?.select("open")||!u||(Ne(e.context.popupRef.current,ft(Be(u)))&&u.focus({preventScroll:!0}),(c===$.listNavigation||c===$.escapeKey)&&r.state.activeIndex==null&&r.highlightItem(l,$.none))});J(()=>{if(!o){let l=e.state.activeTriggerElement,c=e.select("lastOpenChangeReason");queueMicrotask(()=>i(l,c))}},[o,e,i]);function a(){!n&&s&&r?.state.activeIndex!=null&&r.setActiveIndex(null,$.none)}return{parentVirtualFocusRef:s,handleFocus:a}}var iL={Popup:Jk,List:eL,Group:oL,RadioGroup:nL,useItem:Ih,useSubmenuTrigger:rL,useParentHandoff:sL};function Mh(e){let{value:t,defaultValue:o="",onValueChange:n,...r}=e,{store:s}=wt(),i=s.useState("open"),a=s.useState("mounted"),l=s.useState("keyboardOpen"),c=s.useState("activeTriggerId"),u=s.useState("activeTriggerElement"),p=s.useState("disabled"),[d,m]=_t({controlled:t,default:o,name:"MenuFilterProvider",state:"value"}),g=q((y,S)=>{n?.(y,S),S.isCanceled||m(y)}),R=q(()=>s.state.activeIndex),b=q(y=>{s.setActiveIndex(y,$.none)}),x=Yk({open:i,mounted:a,value:d,onValueChange:g}),h=G4(d!=="");gt(()=>(s.set("filterTriggerProps",h),null)),s.useSyncedValue("filterTriggerProps",h),J(()=>{i||s.set("keyboardOpen",!1)},[i,s]);let C=u?u.id||null:c;return f(nf.Provider,{value:iL,children:f(Kk,{...r,open:i,openedByKeyboard:l,disabled:p,value:d,query:x,onValueChange:g,triggerId:C,listRef:s.context.itemDomElements,getActiveIndex:R,setActiveIndex:b,focusOwnerRef:s.context.virtualFocusRef})})}function G4(e){let{store:t}=wt(),o=ml(!0)!=null,n=np(e);return aL.useMemo(()=>({"aria-haspopup":"dialog",onPointerDown(r){t.context.virtualPress=Zs(r.nativeEvent)},onKeyDown(r){let s=t.context.virtualFocusRef?.current;!t.select("open")||!s||o||(r.key==="ArrowUp"||r.key==="ArrowDown"?(s.focus({preventScroll:!0}),n(r),r.preventDefault(),r.preventBaseUIHandler()):r.key==="ArrowLeft"||r.key==="ArrowRight"?r.preventBaseUIHandler():U4(r)&&s.focus({preventScroll:!0}))}}),[t,o,n])}function U4(e){return e.key.length===1&&e.key!==" "&&!e.ctrlKey&&!e.metaKey&&!e.altKey}var lL=T(D(),1);function Dh(e){let{children:t,value:o,defaultValue:n,onValueChange:r,filter:s,autoHighlight:i=!1,locale:a,...l}=e,c=lL.useRef(null);return{children:t,rootProps:{...l,virtualFocus:!0,virtualFocusRef:c,allowEscape:!i,resetOnPointerLeave:i!=="always"},dropdownProps:{value:o,defaultValue:n,onValueChange:r,filter:s,autoHighlight:i,locale:a}}}function cL(e){let{children:t,rootProps:o,dropdownProps:n}=Dh(e);return f(xc,{...o,children:r=>f(Mh,{...n,children:typeof t=="function"?t(r):t})})}var xf=T(D(),1);function uL(e){let t=wt(),o=t.store,n=o.useState("disabled"),{rootProps:r,dropdownProps:s}=Dh(e),i=xf.useRef(null);function a(p,d){let m=t.virtualFocus?o.context.virtualFocusRef?.current:ft(Be(p));st(m)&&(i.current={reference:m,trigger:p},o.setActiveIndex(null,d?$.keyboard:$.none,d))}function l(p,d){o.highlightItem(p,$.keyboard,d)}function c(p){let d=i.current;d&&(d.reference.focus({preventScroll:!0}),l(d.trigger,p))}function u(p,d){if(r.onOpenChange?.(p,d),!d.isCanceled){if(!p){d.reason===$.escapeKey&&st(d.trigger)&&(l(d.trigger,d.event),i.current={reference:t.virtualFocus?o.context.virtualFocusRef?.current??d.trigger:d.trigger,trigger:d.trigger});return}i.current=null,st(d.trigger)&&lh(d.reason,d.event)&&a(d.trigger,d.reason===$.listNavigation?d.event:void 0)}}return f(xc,{...r,isSubmenu:!0,disabled:n||e.disabled,onOpenChange:u,children:f(W4,{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:a,onSubmenuExit:c,children:f(Mh,{...s,children:e.children})})})}function W4(e){let{children:t,parentStore:o,parentVirtualFocus:n,parentAllowEscape:r,parentOrientation:s,parentLoopFocus:i,onSubmenuEnter:a,onSubmenuExit:l,getReturnElement:c}=e,{store:u,orientation:p}=wt(),d=kt(),m=u.useState("mounted"),g=xf.useRef(!1),R=q(()=>{let[S]=u.context.triggerElements.elements();return c()??(st(S)?S:null)});J(()=>{let S=g.current;if(g.current=m,m||!S)return;let w=R();if(!w||!o.select("open"))return;let v=Be(w),P=ft(v);(P===v.body||Ne(u.select("popupElement"),P))&&w.focus({preventScroll:!0})},[m,u,o,R]);function b(S,w){let v=Eh(o,S,w,{orientation:s,rtl:d==="rtl",loopFocus:i,allowEscape:r});n||v?.focus({preventScroll:!0})}function x(S){if(!u.select("open"))return;St(S);let w=u.select("activeTriggerElement"),v=Ce($.listNavigation,S.nativeEvent);u.setOpen(!1,v),v.isCanceled||l(S.nativeEvent);let P=c()??u.select("activeTriggerElement");!u.select("open")&&st(P)&&ft(Be(P))!==P&&P.focus(),!u.select("open")&&st(w)&&Zr(S.key,s)&&b(w,S)}let h=q(S=>{if(Zr(S.key,s)){b(S.currentTarget,S),S.preventBaseUIHandler(),St(S);return}let w=u.select("open"),v=d==="rtl",P=Qa(S.key,p,v,!1);if(w&&P){x(S);return}if(Fd(S.key,s,v)){if(St(S),w){a(S.currentTarget,S.nativeEvent),u.context.virtualFocusRef?.current?.focus({preventScroll:!0});return}u.setOpen(!0,Ce($.listNavigation,S.nativeEvent,S.currentTarget))}}),C=q(S=>{if(S.which===229)return;Qa(S.key,p,d==="rtl",!1)&&x(S)}),y=xf.useMemo(()=>({getReturnElement:R,onTriggerKeyDown:h,onPopupKeyDown:C}),[R,h,C]);return f(uf.Provider,{value:y,children:t})}function dL(e){let{children:t,filter:o,value:n,defaultValue:r,onValueChange:s,autoHighlight:i,locale:a}=e,l=pL.useMemo(()=>({Root:cL,SubmenuRoot:uL,options:{filter:o,value:n,defaultValue:r,onValueChange:s,autoHighlight:i,locale:a}}),[o,n,r,s,i,a]);return f(gl.Provider,{value:l,children:t})}var Nh=T(D(),1);var rp=T(D(),1);var fL=rp.forwardRef(function(t,o){let{render:n,className:r,style:s,id:i,disabled:a,activeItemId:l,navigationProps:c,...u}=t,p=Ye(i),d=Si(),{listRef:m}=yi(),g=hl(),[R,b]=rp.useState(null),x=rp.useRef(!1);function h(y,S){if(!d.open)return;let w=y===""?$.inputClear:$.inputChange;d.onValueChange(y,Ce(w,S))}let C={highlighted:d.inputFocusVisible&&(!d.keyboardModality||l==null)};return j("input",t,{state:C,ref:[o,d.focusOwnerRef],props:[c,{id:p,type:"text",disabled:d.disabled||a,"aria-activedescendant":l,role:"searchbox",inputMode:"search",autoComplete:"off",spellCheck:"false",autoCorrect:"off",autoCapitalize:"none","aria-autocomplete":void 0,"aria-controls":d.listId,value:R??g,onCompositionStart(y){Rt.os.android||(x.current=!0,b(y.currentTarget.value))},onCompositionEnd(y){x.current&&(x.current=!1,b(null),h(y.currentTarget.value,y.nativeEvent))},onChange(y){if(x.current){b(y.currentTarget.value);return}h(y.currentTarget.value,y.nativeEvent)},onKeyDown(){d.setKeyboardModality(!0)},onPointerDown(){d.setKeyboardModality(!1)},onMouseEnter(y){d.setKeyboardModality(!1),d.open&&xl(y.currentTarget)},onFocus(y){if(d.setInputFocusVisible(!0),d.autoHighlight==="always"||Sh())return;let S=y.relatedTarget;S!==null&&m.current.includes(S)&&d.setActiveIndex(null)},onBlur(){d.setInputFocusVisible(!1)}},u]})});var mL=Nh.forwardRef(function(t,o){Xu("Input");let{store:n}=wt(),r=hl(),{onKeyDown:s,...i}=n.useState("inputProps"),a=n.useState("highlightedItemId"),l=np(r!==""),c=Nh.useCallback(d=>{n.set("inputFocused",d!==null&&ft(Be(d))===d)},[n]),u=Wt(o,c),p=Mt({onKeyDown:l,onFocus(){n.set("inputFocused",!0)},onBlur(){n.set("inputFocused",!1)}},t);return f(fL,{...p,activeItemId:a,navigationProps:i,ref:u})});var Cf=T(D(),1);var j4=Cf.forwardRef(function(t,o){let{render:n,className:r,style:s,id:i,...a}=t,{store:l,orientation:c}=wt(),u=l.useState("activeTriggerId"),p=l.useState("activeTriggerElement"),d=l.useStateSetter("listElement"),m=Ye(i),g=Cf.useRef(m);J(()=>{g.current!==m&&(g.current=m,l.notifyAll())},[m,l]);let R=Qu(t,p,u);return j("div",t,{ref:[o,d],props:[{id:m,role:"menu",tabIndex:-1,"aria-orientation":c==="horizontal"?"horizontal":void 0,"aria-labelledby":R},a]})}),gL=Cf.forwardRef(function(t,o){let n=xi()?.List??j4;return f(n,{...t,ref:o})});var hL=T(D(),1);var bL=T(D(),1);var RL=bL.forwardRef(function(t,o){let{render:n,className:r,style:s,disabled:i=!1,nativeButton:a=!0,...l}=t,c=Si(),u=hl(),p=c.disabled||i,d=u!=="",{buttonRef:m,getButtonProps:g}=bt({disabled:p,native:a});return j("button",t,{enabled:d,state:{disabled:p},ref:[o,m],props:[{tabIndex:-1,"aria-hidden":!0,onMouseDown(b){b.preventDefault()},onClick(b){let x=Ce($.clearPress,b.nativeEvent);c.onValueChange("",x),c.focusOwnerRef.current?.focus({preventScroll:!0})}},l,g]})});var xL=hL.forwardRef(function(t,o){return Xu("Clear"),f(RL,{...t,ref:o})});var yL=T(D(),1);var Ah=T(D(),1);var CL=Ah.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t,{store:a}=yi(),l=ui(a,hf.isEmpty),[c,u]=Ah.useState(!1);J(()=>{u(!0)},[]);let p=c&&l,d=Hu(p);return j("div",t,{enabled:p,ref:[o,d],props:[{role:"status","aria-live":"polite","aria-atomic":!0},i]})});var SL=yL.forwardRef(function(t,o){return Xu("Empty"),f(CL,{...t,ref:o})});var Oh={};me(Oh,{align:()=>Y4,closed:()=>$4,open:()=>z4,side:()=>K4,uncentered:()=>q4});var z4=ge.open,$4=ge.closed,K4=ge.side,Y4=ge.align,q4="data-uncentered";var Fh={};me(Fh,{closed:()=>J4,endingStyle:()=>Q4,open:()=>X4,startingStyle:()=>Z4});var X4=ge.open,J4=ge.closed,Z4=ge.startingStyle,Q4=ge.endingStyle;var _h={};me(_h,{checked:()=>eJ,disabled:()=>oJ,endingStyle:()=>rJ,startingStyle:()=>nJ,unchecked:()=>tJ});var eJ="data-checked",tJ="data-unchecked",oJ="data-disabled",nJ=Pt.startingStyle,rJ=Pt.endingStyle;var Vh={};me(Vh,{disabled:()=>iJ,highlighted:()=>sJ});var sJ="data-highlighted",iJ="data-disabled";var kh={};me(kh,{highlighted:()=>aJ});var aJ="data-highlighted";var Lh={};me(Lh,{align:()=>fJ,closed:()=>cJ,endingStyle:()=>pJ,instant:()=>mJ,open:()=>lJ,side:()=>dJ,startingStyle:()=>uJ});var lJ=ge.open,cJ=ge.closed,uJ=ge.startingStyle,pJ=ge.endingStyle,dJ=ge.side,fJ=ge.align,mJ="data-instant";var Bh={};me(Bh,{anchorHeight:()=>hJ,anchorWidth:()=>RJ,availableHeight:()=>bJ,availableWidth:()=>gJ,positionerHeight:()=>yJ,positionerWidth:()=>CJ,transformOrigin:()=>xJ});var gJ="--available-width",bJ="--available-height",RJ="--anchor-width",hJ="--anchor-height",xJ="--transform-origin",CJ="--positioner-width",yJ="--positioner-height";var Hh={};me(Hh,{align:()=>EJ,anchorHidden:()=>wJ,closed:()=>vJ,open:()=>SJ,side:()=>PJ});var SJ=ge.open,vJ=ge.closed,wJ=ge.anchorHidden,PJ=ge.side,EJ=ge.align;var Gh={};me(Gh,{checked:()=>TJ,disabled:()=>MJ,highlighted:()=>DJ,unchecked:()=>IJ});var TJ="data-checked",IJ="data-unchecked",MJ="data-disabled",DJ="data-highlighted";var Uh={};me(Uh,{checked:()=>NJ,disabled:()=>OJ,endingStyle:()=>_J,startingStyle:()=>FJ,unchecked:()=>AJ});var NJ="data-checked",AJ="data-unchecked",OJ="data-disabled",FJ=Pt.startingStyle,_J=Pt.endingStyle;var UP={};me(UP,{disabled:()=>LJ,popupOpen:()=>VJ,pressed:()=>kJ});var VJ=At.popupOpen,kJ=At.pressed,LJ="data-disabled";var WP={};me(WP,{popupHeight:()=>HJ,popupWidth:()=>BJ});var BJ="--popup-width",HJ="--popup-height";var jP={};me(jP,{activationDirection:()=>WJ,current:()=>GJ,instant:()=>zJ,previous:()=>UJ,transitioning:()=>jJ});var GJ="data-current",UJ="data-previous",WJ="data-activation-direction",jJ="data-transitioning",zJ="data-instant";var Wh={};me(Wh,{disabled:()=>YJ,highlighted:()=>KJ,popupOpen:()=>$J});var $J=At.popupOpen,KJ="data-highlighted",YJ="data-disabled";var zP={};me(zP,{highlighted:()=>qJ});var qJ="data-highlighted";var $P={};me($P,{disabled:()=>XJ});var XJ="data-disabled";function vL(e){let[t,o]=_s.useState({getBoundingClientRect(){return DOMRect.fromRect({width:0,height:0,x:0,y:0})}}),n=_s.useRef(null),r=_s.useRef(null),s=_s.useRef(null),i=_s.useRef(null),a=_s.useRef(!0),l=_s.useRef(null),c=Kn(),u=_s.useMemo(()=>({anchor:t,setAnchor:o,actionsRef:s,backdropRef:n,internalBackdropRef:r,positionerRef:i,allowMouseUpTriggerRef:a,initialCursorPointRef:l,rootId:c}),[t,c]);return f(RP.Provider,{value:u,children:f(Rc.Provider,{value:void 0,children:f($t.Root,{...e})})})}var vi=T(D(),1);var wL=500,PL=vi.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t,{setAnchor:a,actionsRef:l,internalBackdropRef:c,backdropRef:u,positionerRef:p,allowMouseUpTriggerRef:d,initialCursorPointRef:m,rootId:g}=hi(!1),{store:R}=wt(!1),b=R.useState("open"),x=R.useState("disabled"),h=vi.useRef(null),C=vi.useRef(null),y=ct(),S=ct(),w=vi.useRef(!1),v=vi.useRef(null);function P(F,k,U){let _=U.type.startsWith("touch");m.current={x:F,y:k},a({getBoundingClientRect(){return DOMRect.fromRect({width:_?10:0,height:_?10:0,x:F,y:k})}}),w.current=!1,l.current?.setOpen(!0,Ce($.triggerPress,U)),S.start(wL,()=>{w.current=!0})}function N(F){if(x)return;d.current=!0,St(F),P(F.clientX,F.clientY,F.nativeEvent);let k=Be(h.current);v.current?.abort();let U=new AbortController;v.current=U,k.addEventListener("mouseup",_=>{if(d.current=!1,!w.current)return;S.clear(),w.current=!1;let B=Je(_);Ne(p.current,B)||g&&B&&df(B)===g||l.current?.setOpen(!1,Ce($.cancelOpen,_))},{once:!0,signal:U.signal})}function E(){y.clear(),C.current=null}function M(F){if(x){E();return}if(d.current=!1,F.touches.length!==1){E();return}F.stopPropagation();let k=F.touches[0],U={x:k.clientX,y:k.clientY};C.current=U,y.start(wL,()=>{P(U.x,U.y,F.nativeEvent)})}function W(F){if(F.touches.length!==1){E();return}if(y.isStarted()&&C.current){let k=F.touches[0],U=10,_=Math.abs(k.clientX-C.current.x),B=Math.abs(k.clientY-C.current.y);(_>U||B>U)&&E()}}return vi.useEffect(()=>()=>{v.current?.abort()},[]),vi.useEffect(()=>{function F(U){if(x)return;let B=Je(U);(Ne(h.current,B)||Ne(c.current,B)||Ne(u.current,B))&&U.preventDefault()}let k=Be(h.current);return qe(k,"contextmenu",F)},[u,x,c]),j("div",t,{state:{open:b},ref:[h,o],props:[{onContextMenu:N,onTouchStart:M,onTouchMove:W,onTouchEnd:E,onTouchCancel:E,style:{WebkitTouchCallout:"none"}},i],stateAttributesMapping:Or})});var EL=QR;var KP={};me(KP,{popupOpen:()=>JJ,pressed:()=>ZJ});var JJ=At.popupOpen,ZJ=At.pressed;var TL=T(D(),1);var jh=T(D(),1),YP=jh.createContext(void 0),QJ={disableStyleElements:!1};function sp(){return jh.useContext(YP)??QJ}function qP(e){let{children:t,nonce:o,disableStyleElements:n}=e,r=TL.useMemo(()=>({nonce:o,disableStyleElements:n}),[o,n]);return f(YP.Provider,{value:r,children:t})}var dr={};me(dr,{Backdrop:()=>ob,Close:()=>bu,Description:()=>Ru,Handle:()=>ta,Popup:()=>ib,Portal:()=>Pu,Root:()=>IL,Title:()=>Eu,Trigger:()=>Iu,Viewport:()=>Mu,createHandle:()=>v_});var IL=Ts(function(t){return gu("dialog",t)});var zh={};me(zh,{disabled:()=>eZ,popupOpen:()=>tZ});var eZ="data-disabled",tZ=At.popupOpen;var Xo={};me(Xo,{Backdrop:()=>DL,Close:()=>NL,Content:()=>OL,Description:()=>FL,Handle:()=>vf,Indent:()=>_L,IndentBackground:()=>kL,Popup:()=>GL,Portal:()=>UL,Provider:()=>WL,Root:()=>KL,SwipeArea:()=>JL,Title:()=>ZL,Trigger:()=>QL,Viewport:()=>d0,VirtualKeyboardProvider:()=>y0,createHandle:()=>v0});var ML=T(D(),1);var Cl={};me(Cl,{frontmostHeight:()=>JP,height:()=>fr,nestedDrawers:()=>XP,snapPointOffset:()=>$h,swipeMovementX:()=>la,swipeMovementY:()=>ss,swipeStrength:()=>ip});var XP="--nested-drawers",fr="--drawer-height",JP="--drawer-frontmost-height",la="--drawer-swipe-movement-x",ss="--drawer-swipe-movement-y",$h="--drawer-snap-point-offset",ip="--drawer-swipe-strength";var yl={};me(yl,{swipeProgress:()=>cn});var cn="--drawer-swipe-progress";var DL=ML.forwardRef(function(t,o){let{render:n,className:r,style:s,forceRender:i=!1,...a}=t,l=zt(),c=l.useState("open"),u=l.useState("nested"),p=l.useState("mounted"),d=l.useState("transitionStatus");return j("div",t,{state:{open:c,transitionStatus:d},ref:[l.context.backdropRef,o],stateAttributesMapping:Ro,props:[{role:"presentation",hidden:!p,style:{pointerEvents:c?void 0:"none",userSelect:"none",WebkitUserSelect:"none",[cn]:"0",[ip]:"1"}},a],enabled:i||!u})});var NL=bu;var AL=T(D(),1);var Kh="data-drawer-content";var OL=AL.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t;return zt(),j("div",t,{ref:o,props:[{[Kh]:""},i]})});var FL=Ru;var qh=T(D(),1);var Yh=T(D(),1),ZP=Yh.createContext(void 0);function wi(){return Yh.useContext(ZP)}var oZ={active(e){return e?{"data-active":""}:{"data-inactive":""}}},_L=qh.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t,a=wi(),l=a?.active??!1,c=a?.visualStateStore,u=qh.useRef(null);return J(()=>{let d=u.current;if(!d||!c)return;let m=()=>{let{swipeProgress:R,frontmostHeight:b}=c.getSnapshot();R<=0?d.style.setProperty(cn,"0"):d.style.setProperty(cn,`${R}`),b<=0?d.style.removeProperty(fr):d.style.setProperty(fr,`${b}px`)};m();let g=c.subscribe(m);return()=>{g(),d.style.setProperty(cn,"0"),d.style.removeProperty(fr)}},[c]),j("div",t,{ref:[o,u],state:{active:l},props:[{style:{[cn]:"0"}},i],stateAttributesMapping:oZ})});var VL=T(D(),1);var nZ={active(e){return e?{"data-active":""}:{"data-inactive":""}}},kL=VL.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t,c={active:wi()?.active??!1};return j("div",t,{ref:o,state:c,props:i,stateAttributesMapping:nZ})});var Cc=T(D(),1);var ap={};me(ap,{closed:()=>sZ,endingStyle:()=>aZ,expanded:()=>QP,nestedDrawerOpen:()=>eE,nestedDrawerSwiping:()=>tE,open:()=>rZ,startingStyle:()=>iZ,swipeDirection:()=>oE,swipeDismiss:()=>Xh,swiping:()=>Pi});var rZ=ge.open,sZ=ge.closed,iZ=ge.startingStyle,aZ=ge.endingStyle,QP="data-expanded",eE="data-nested-drawer-open",tE="data-nested-drawer-swiping",Xh="data-swipe-dismiss",oE="data-swipe-direction",Pi="data-swiping";var Jh=T(D(),1),nE=Jh.createContext(void 0);function Ei(e){let t=Jh.useContext(nE);if(e!==!0&&t===void 0)throw new Error(_e(90));return t}var lp=T(D(),1);function Ct(e,t=Number.MIN_SAFE_INTEGER,o=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,o))}function Zh(e,t){let o=e+t;return o>=0?t:-Math.sqrt(-o)-e}function LL(e,t,o){if(!Number.isFinite(t)||t<=0)return null;if(typeof e=="number")return Number.isFinite(e)?e<=1?Ct(e,0,1)*t:e:null;let n=e.trim();if(n.endsWith("px")){let r=Number.parseFloat(n);return Number.isFinite(r)?r:null}if(n.endsWith("rem")){let r=Number.parseFloat(n);return Number.isFinite(r)?r*o:null}return null}function yf(e,t){let o=-1,n=1/0;for(let r=0;r<e.length;r+=1){let s=Math.abs(e[r]-t);s<n&&(n=s,o=r)}return o}function Qh(){let e=zt(),{snapPoints:t,activeSnapPoint:o,setActiveSnapPoint:n,popupHeight:r}=Ei(),s=e.useState("viewportElement"),[i,a]=lp.useState(0),[l,c]=lp.useState(16),u=q(()=>{let g=Be(s).documentElement;a(s?s.offsetHeight:g.clientHeight);let R=parseFloat(getComputedStyle(g).fontSize);Number.isFinite(R)&&c(R)});J(()=>{if(u(),!s||typeof ResizeObserver!="function")return;let m=new ResizeObserver(u);return m.observe(s),()=>{m.disconnect()}},[u,s]);let p=lp.useMemo(()=>{if(!t||t.length===0||i<=0||r<=0)return[];let m=Math.min(r,i),g=t.map(x=>{let h=LL(x,i,l);if(h===null)return null;let C=Ct(h,0,m);return{value:x,height:C,offset:Math.max(0,r-C)}}).filter(x=>!!x);if(g.length<=1)return g;let R=[],b=[];for(let x=g.length-1;x>=0;x-=1){let h=g[x];b.some(y=>Math.abs(y-h.height)<=1)||(b.push(h.height),R.push(h))}return R.reverse(),R},[r,l,t,i]),d=lp.useMemo(()=>{if(o===null)return;let m=p.find(x=>Object.is(x.value,o));if(m)return m;let g=Math.min(r,i),R=LL(o,i,l);if(R===null)return;let b=Ct(R,0,g);return p[yf(p.map(x=>x.height),b)]},[o,r,p,l,i]);return{snapPoints:t,activeSnapPoint:o,setActiveSnapPoint:n,popupHeight:r,viewportHeight:i,resolvedSnapPoints:p,activeSnapPointOffset:d?.offset??null}}var ex=T(D(),1),rE=ex.createContext(null);function BL(){return ex.useContext(rE)}var HL=!1;function lZ(){HL||(typeof CSS<"u"&&"registerProperty"in CSS&&([la,ss,$h].forEach(e=>{try{CSS.registerProperty({name:e,syntax:"<length>",inherits:!1,initialValue:"0px"})}catch{}}),[{name:cn,initialValue:"0"},{name:ip,initialValue:"1"}].forEach(({name:e,initialValue:t})=>{try{CSS.registerProperty({name:e,syntax:"<number>",inherits:!1,initialValue:t})}catch{}})),HL=!0)}var cZ={...Ro,expanded(e){return e?{[QP]:""}:null},nestedDrawerOpen(e){return e?{[eE]:""}:null},nestedDrawerSwiping(e){return e?{[tE]:""}:null},swipeDirection(e){return{[oE]:e}},swiping(e){return e?{[Pi]:""}:null}},GL=Cc.forwardRef(function(t,o){let{render:n,className:r,style:s,finalFocus:i,initialFocus:a,...l}=t,c=zt(),u=c.context.popupRef,{swipeDirection:p,frontmostHeight:d,hasNestedDrawer:m,nestedSwiping:g,nestedSwipeProgressStore:R,onPopupHeightChange:b,notifyParentFrontmostHeight:x,notifyParentHasNestedDrawer:h}=Ei(),C=c.useState("descriptionElementId"),y=c.useState("disablePointerDismissal"),S=c.useState("floatingRootContext"),w=c.useState("popupProps"),v=c.useState("modal"),P=c.useState("mounted"),N=c.useState("nested"),E=c.useState("nestedOpenDrawerCount"),M=c.useState("transitionStatus"),W=c.useState("open"),I=c.useState("openMethod"),O=c.useState("titleElementId"),F=c.useState("role"),k=S.useState("floatingId"),U=l.id??k,_=BL();hu();let{snapPoints:B,activeSnapPoint:L,activeSnapPointOffset:V}=Qh(),A=E>0,K=_?.swiping??!1,H=_?.swipeStrength??null,[G,oe]=Cc.useState(0),ee=Cc.useRef(0),X=q(()=>{let Te=u.current;if(!Te)return;let fe=Te.offsetHeight;if(ee.current>0&&d>ee.current&&fe>ee.current)return;if(ee.current>0&&m){let Re=ee.current;oe(Re),b(Re);return}let z=fe;z!==ee.current&&(ee.current=z,oe(z),b(z))});J(()=>{if(!P){ee.current=0,oe(0),b(0);return}let Te=u.current;if(!Te||(lZ(),X(),typeof ResizeObserver!="function"))return;let fe=new ResizeObserver(X);return fe.observe(Te),()=>{fe.disconnect()}},[X,P,A,b,u]),J(()=>{let Te=()=>{let z=u.current;if(!z)return;let Re=R.getSnapshot();Re>0?z.style.setProperty(cn,`${Re}`):z.style.setProperty(cn,"0")};Te();let fe=R.subscribe(Te),ve=u.current;return()=>{fe(),ve&&ve.style.setProperty(cn,"0")}},[R,u]),J(()=>{if(W)return x?.(d),()=>{x?.(0)}},[d,W,x]),J(()=>h?(h(W||M==="ending"),()=>{h(!1)}):void 0,[h,W,M]),It({open:W,ref:u,onComplete(){W&&c.context.onOpenChangeComplete?.(!0)}});let te=a===void 0?u:a,ce=c.useStateSetter("popupElement"),le={open:W,nested:N,transitionStatus:M,expanded:L===1,nestedDrawerOpen:A,nestedDrawerSwiping:g,swipeDirection:p,swiping:K},Q;G&&!(!m&&M!=="ending")&&(Q=`${G}px`);let Y=B&&B.length>0&&(p==="down"||p==="up"),ae=null;Y&&V!==null&&(ae=p==="up"?-V:V);let Z=_?_.getDragStyles():ot;if(Y&&p==="down"){let Te=V??0,fe=Number.parseFloat(String(Z[ss]));K&&Number.isFinite(fe)?Z={...Z,transform:void 0,[ss]:`${Zh(Te,fe)}px`}:Z={...Z,transform:void 0}}let ue=j("div",t,{state:le,props:[w,{id:U,"aria-labelledby":O,"aria-describedby":C,role:F,...Zn,hidden:!P,onKeyDown(Te){ur.has(Te.key)&&Te.stopPropagation()},style:{...Z,[cn]:"0",[XP]:E,[fr]:Q,[$h]:typeof ae=="number"?`${ae}px`:"0px",[JP]:d?`${d}px`:void 0,[ip]:typeof H=="number"&&Number.isFinite(H)&&H>0?`${H}`:"1"}},l],ref:[o,u,ce],stateAttributesMapping:cZ});return f(Br,{context:S,openInteractionType:I,disabled:!P,closeOnFocusOut:!y,initialFocus:te,returnFocus:i,modal:v!==!1,restoreFocus:"popup",children:ue})});var UL=Pu;var Sf=T(D(),1);function WL(e){let{children:t}=e,o=gt(()=>new Set),[n,r]=Sf.useState(!1),[s]=Sf.useState(uZ),i=q((c,u)=>{let p=o.current;if(p.has(c)===u)return;let d=p.size>0;u?p.add(c):p.delete(c);let m=p.size>0;m!==d&&r(m)}),a=q(c=>{i(c,!1)}),l=Sf.useMemo(()=>({setDrawerOpen:i,removeDrawer:a,active:n,visualStateStore:s}),[n,a,i,s]);return f(ZP.Provider,{value:l,children:t})}function uZ(){let e={swipeProgress:0,frontmostHeight:0},t=new Set;return{getSnapshot:()=>e,set(o){let n=e.swipeProgress;o.swipeProgress!==void 0&&(n=Number.isFinite(o.swipeProgress)?o.swipeProgress:0);let r=e.frontmostHeight;o.frontmostHeight!==void 0&&(r=Number.isFinite(o.frontmostHeight)?o.frontmostHeight:0),!(n===e.swipeProgress&&r===e.frontmostHeight)&&(e={swipeProgress:n,frontmostHeight:r},t.forEach(s=>{s()}))},subscribe(o){return t.add(o),()=>{t.delete(o)}}}}var Hn=T(D(),1);var jL,zL;function KL(e){let{children:t,open:o,defaultOpen:n=!1,onOpenChange:r,onOpenChangeComplete:s,disablePointerDismissal:i=!1,modal:a=!0,actionsRef:l,handle:c,triggerId:u,defaultTriggerId:p=null,swipeDirection:d="down",snapToSequentialPoints:m=!1,snapPoints:g,snapPoint:R,defaultSnapPoint:b,onSnapPointChange:x}=e,h=Ei(!0),C=h?.onNestedSwipeProgressChange,y=h?.onNestedFrontmostHeightChange,S=h?.onNestedSwipingChange,w=h?.onNestedDrawerPresenceChange,[v,P]=Hn.useState(0),[N,E]=Hn.useState(0),[M,W]=Hn.useState(!1),[I,O]=Hn.useState(!1),[F]=Hn.useState(pZ),k=b!==void 0?b:g?.[0]??null,U=R!==void 0,[_,B]=_t({controlled:R,default:k,name:"Drawer",state:"snapPoint"}),L=Hn.useRef(!1),V=Hn.useRef(!1),A=q((ne,Y)=>{let ae=Y??Ce($.none);x?.(ne,ae),!ae.isCanceled&&B(ne)}),K=Hn.useMemo(()=>U||!g||g.length===0?_:_===null||!g.some(ne=>Object.is(ne,_))?k:_,[_,U,k,g]),H=q(ne=>{P(ne),!L.current&&ne>0&&E(ne)}),G=q(ne=>{if(ne>0){L.current=!0,E(ne);return}L.current=!1,v>0&&E(v)}),oe=q(ne=>{W(ne)}),ee=q(ne=>{F.set(ne),C?.(ne)}),X=q(ne=>{O(ne),S?.(ne)}),te=q((ne,Y)=>{r?.(ne,Y),!Y.isCanceled&&!ne&&g&&g.length>0&&A(k,Ce(Y.reason,Y.event,Y.trigger))}),ce=Hn.useMemo(()=>({swipeDirection:d,swipeAreaActiveRef:V,snapToSequentialPoints:m,snapPoints:g,activeSnapPoint:K,setActiveSnapPoint:A,frontmostHeight:N,popupHeight:v,hasNestedDrawer:M,nestedSwiping:I,nestedSwipeProgressStore:F,onNestedDrawerPresenceChange:oe,onPopupHeightChange:H,onNestedFrontmostHeightChange:G,onNestedSwipingChange:X,onNestedSwipeProgressChange:ee,notifyParentFrontmostHeight:y,notifyParentSwipingChange:S,notifyParentSwipeProgressChange:C,notifyParentHasNestedDrawer:w}),[K,N,M,I,F,w,C,S,y,oe,G,ee,X,H,v,A,g,m,V,d]),le=typeof t=="function"?ne=>f(Hn.Fragment,{children:[jL||(jL=f($L,{})),t(ne)]}):f(Hn.Fragment,{children:[zL||(zL=f($L,{})),t]}),Q=gu("drawer",{open:o,defaultOpen:n,onOpenChange:te,onOpenChangeComplete:s,disablePointerDismissal:i,modal:a,actionsRef:l,handle:c,triggerId:u,defaultTriggerId:p,children:le});return f(nE.Provider,{value:ce,children:Q})}function pZ(){let e=0,t=new Set;return{getSnapshot:()=>e,set(o){let n=Number.isFinite(o)?o:0;n!==e&&(e=n,t.forEach(r=>{r()}))},subscribe(o){return t.add(o),()=>{t.delete(o)}}}}function $L(){let e=wi(),t=zt(!1),o=e?.setDrawerOpen,n=e?.removeDrawer,r=t.useState("open"),s=t.useState("nestedOpenDialogCount"),i=t.useState("popupElement"),a=s===0;return J(()=>{if(n)return()=>{n(t)}},[n,t]),J(()=>{o?.(t,r)},[r,o,t]),Hn.useEffect(()=>{if(!r||!a||!Rt.os.android)return;let c=rt(i).CloseWatcher;if(!c)return;function u(m){if(!t.select("open"))return;let g=Ce($.closeWatcher,m);m.cancelable||(g.cancel=nt),t.setOpen(!1,g),g.isCanceled&&m.preventDefault()}let p=new c,d=qe(p,"cancel",u);return()=>{d(),p.destroy()}},[t,a,r,i]),null}var Gn=T(D(),1);var Kt=T(D(),1);function ca(e,t,o){return typeof e?.elementFromPoint=="function"?e.elementFromPoint(t,o):null}function Sl(e,t){let o=(t??rt(e).getComputedStyle(e)).transform,n=0,r=0,s=1;if(o&&o!=="none"){let i=o.match(/matrix(?:3d)?\(([^)]+)\)/);if(i){let a=i[1].split(", ").map(parseFloat);a.length===6?(n=a[4],r=a[5],s=Math.sqrt(a[0]*a[0]+a[1]*a[1])):a.length===16&&(n=a[12],r=a[13],s=a[0])}}return{x:n,y:r,scale:s}}var dZ=40,fZ=10,mZ=50,YL=4,gZ=80,tx=1,bZ='button,a,input,select,textarea,label,[role="button"]';function un(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 ox(e){return Number.isFinite(e)&&e>0?e:null}function qL(e,t){return`translate3d(${e.x}px,${e.y}px,0) scale(${t})`}function RZ(e){return e%2===1}function sE(e,t,o){let n=e[o];if(typeof n=="function")try{n.call(e,t)}catch(r){if(r&&typeof r=="object"&&"name"in r&&r.name==="NotFoundError")return;throw r}}function nx(e){let{enabled:t,directions:o,elementRef:n,movementCssVars:r,canStart:s,ignoreSelectorWhenTouch:i=!0,ignoreScrollableAncestors:a=!1,swipeThreshold:l,onDismiss:c,onProgress:u,onCancel:p,onSwipeStart:d,onRelease:m,onSwipingChange:g,trackDrag:R=!0}=e,b=bZ,x=o.length===1?o[0]:void 0,h=Math.max(0,typeof l=="number"?l:dZ),C=o.includes("left"),y=o.includes("right"),S=o.includes("up"),w=o.includes("down"),v=C||y,P=S||w,N=v?"horizontal":"vertical",[E,M]=Kt.useState(void 0),[W,I]=Kt.useState(!1),[O,F]=Kt.useState(!1),k=Kt.useRef({x:0,y:0}),U=Kt.useRef({x:0,y:0}),_=Kt.useRef(null),B=Kt.useRef({x:0,y:0,scale:1}),L=Kt.useRef(void 0),V=Kt.useRef(0),A=Kt.useRef(!1),K=Kt.useRef({x:0,y:0}),H=Kt.useRef(!1),G=Kt.useRef(!1),oe=Kt.useRef(null),ee=Kt.useRef(!1),X=Kt.useRef(!1),te=Kt.useRef({width:0,height:0}),ce=Kt.useRef(0),le=Kt.useRef(h),Q=Kt.useRef(null),ne=Kt.useRef(null),Y=Kt.useRef(null),ae=Kt.useRef(!1),Z=Kt.useRef({x:0,y:0}),ue=Kt.useRef(null),Te=Kt.useRef(!1),fe=Kt.useRef(null),ve=q(De=>{Te.current!==De&&(Te.current=De,I(De),g?.(De))});function z(De){if(!De)return;let he=n.current,be=Q.current;if(!he||!be)return;let Le=be({element:he,direction:De});le.current=Math.max(0,Le)}let Re=q((De,he)=>{let be=Number.isFinite(De)?Ct(De,0,1):0,Le=be!==ce.current,pe=!1;if(he){let Ae=ue.current;pe=!Ae||Ae.deltaX!==he.deltaX||Ae.deltaY!==he.deltaY||Ae.direction!==he.direction}!Le&&!pe||(ce.current=be,he?ue.current=he:Le&&(ue.current=null),u?.(be,he))}),xe=q(De=>{let he=n.current;if(!R||!he){De||(fe.current=null);return}let be=he.style,Le=fe.current;De?(Le||(fe.current=[be.transition,be.transform]),be.transition="none"):Le&&([be.transition,be.transform]=Le,fe.current=null);let pe=U.current,Ae=B.current,we=pe.x-Ae.x,Oe=pe.y-Ae.y;De&&(be.transform=qL(pe,Ae.scale)),be.setProperty(r.x,`${we}px`),be.setProperty(r.y,`${Oe}px`)});function Pe(De,he){if(he===null)return;let be=Y.current;if(be&&he>be.time){let Le=Math.abs(De.x-be.x)<tx&&Math.abs(De.y-be.y)<tx,pe=Le&&!ae.current;if(ae.current=Le,pe)return;let Ae=Math.max(he-be.time,YL);Z.current={x:(De.x-be.x)/Ae,y:(De.y-be.y)/Ae}}Y.current={x:De.x,y:De.y,time:he}}let ie=Kt.useCallback(()=>{M(void 0),ve(!1),F(!1),Re(0),le.current=h,Q.current=null,k.current={x:0,y:0},U.current={x:0,y:0},B.current={x:0,y:0,scale:1},L.current=void 0,V.current=0,A.current=!1,K.current={x:0,y:0},H.current=!1,_.current=null,G.current=!1,oe.current=null,ee.current=!1,X.current=!1,te.current={width:0,height:0},ne.current=null,Y.current=null,ae.current=!1,Z.current={x:0,y:0},ue.current=null,xe(!1)},[ve,h,xe,Re]);function re(De){if("touches"in De){let he=De.touches[0];return he?{x:he.clientX,y:he.clientY}:null}return{x:De.clientX,y:De.clientY}}function Ee(De){return"touches"in De?!0:De.pointerType==="touch"}function ye(De,he){let be=n.current?.getRootNode();return ca(be,De.x,De.y)??Je(he)}function se(De,he){return(Le=>{let pe=ol(De,he,Le),Ae=Be(pe);return pe===Ae.body||pe===Ae.documentElement?null:pe})(N)}function Fe(De,he,be){ee.current=!1;let Le=Ee(De),pe=ye(he,De.nativeEvent),we=Be(n.current).body,Oe=Le&&we?se(pe,we):null,$e=be?.ignoreScrollableTarget??!1;if(Oe&&!$e||(ee.current=!!(Oe&&$e),Xt(pe,b)&&(!Le||i)))return!1;let Ze=n.current;if(a&&Ze&&pe&&!(be?.ignoreScrollableAncestors??!1)&&Mw(pe,Ze,N)!=null)return!1;if(A.current=!1,L.current=void 0,V.current=0,k.current=he,ne.current=ox(De.timeStamp),Y.current=null,ae.current=!1,Z.current={x:0,y:0},K.current=he,_.current=he,le.current=h,Q.current=typeof l=="function"?l:null,Ze){te.current={width:Ze.offsetWidth,height:Ze.offsetHeight},z(x);let at=Sl(Ze);B.current=at,U.current={x:at.x,y:at.y},Pe({x:at.x,y:at.y},ne.current),"touches"in De||sE(Ze,De.pointerId,"setPointerCapture")}return d?.(De.nativeEvent),ve(!0),H.current=!0,Re(0),xe(!0),!0}function ke(){de(),ee.current=!1,_.current=null}function de(){G.current=!1,oe.current=null}function Ie(De){if(ke(),!Te.current)return;ve(!1);let he=B.current;U.current={x:he.x,y:he.y},M(void 0),X.current=!1,xe(!1);let be=n.current;be&&sE(be,De.pointerId,"releasePointerCapture"),Re(0,{deltaX:0,deltaY:0,direction:void 0}),p?.(De.nativeEvent)}function Me(De,he){let be=we=>Math.sign(we)*Math.abs(we)**.5,Le=(we,Oe,$e)=>!Oe&&we<0||!$e&&we>0?be(we):we,pe=v?Le(De,C,y):be(De),Ae=P?Le(he,S,w):be(he);return{x:pe,y:Ae}}function We(De,he,be){let Le=(pe,Ae,we,Oe,$e)=>pe>0&&Ae<=0&&Oe||pe<0&&Ae>=Math.max(0,we)&&$e;return P&&be!==0?Le(be,De.scrollTop,De.scrollHeight-De.clientHeight,w,S):v&&he!==0?Le(he,De.scrollLeft,De.scrollWidth-De.clientWidth,y,C):null}let Ue=q(De=>{if(!t||De.defaultPrevented||De.nativeEvent.defaultPrevented||!("touches"in De)&&De.button!==0)return;let he=re(De);!he||(G.current=!0,oe.current=he,ee.current=!1,X.current=!("touches"in De),!(s?s(he,{nativeEvent:De.nativeEvent,direction:x}):!0))||Fe(De,he)&&de()});function ze(De,he,be){if(!t||!Te.current)return;let Le=Je(De.nativeEvent);if(Ee(De)&&!ee.current){let fn=De.currentTarget;if(se(Le,fn))return}if("touches"in De||De.preventDefault(),H.current&&(H.current=!1,R)){k.current=he;let fn=ox(De.timeStamp);fn!==null&&(ne.current=fn),Y.current=null,ae.current=!1}let pe=he.x,Ae=he.y,we=be.x,Oe=be.y;(Oe<0&&Ae>K.current.y||Oe>0&&Ae<K.current.y)&&(K.current={x:K.current.x,y:Ae}),(we<0&&pe>K.current.x||we>0&&pe<K.current.x)&&(K.current={x:pe,y:K.current.y});let $e=pe-k.current.x,Ve=Ae-k.current.y,Ze=Ae-K.current.y,at=pe-K.current.x,Ke;if(!L.current)Math.abs($e)>=Math.abs(Ve)?Ke=$e>0?"right":"left":Ke=Ve>0?"down":"up",Ke&&(Ke==="left"&&C||Ke==="right"&&y||Ke==="up"&&S||Ke==="down"&&w)&&(L.current=Ke,V.current=un(Ke,$e,Ve),M(Ke),z(Ke));else{let fn=L.current,Rr=un(fn,at,Ze);Rr>le.current?(A.current=!1,M(fn)):!(C&&y)&&!(S&&w)&&V.current-Rr>=fZ&&(A.current=!0)}let dt=Me($e,Ve),jt=B.current.x,xt=B.current.y;v&&(jt+=dt.x),P&&(xt+=dt.y);let mo=U.current,xn=jt!==mo.x||xt!==mo.y;U.current={x:jt,y:xt},xn&&xe(!0),Pe({x:jt,y:xt},ox(De.timeStamp));let Vo=jt-B.current.x,sr=xt-B.current.y,ir={deltaX:Vo,deltaY:sr,direction:L.current},Uo=0,br=x??L.current;if(br){let fn=br==="left"||br==="right"?te.current.width:te.current.height,Rr=B.current.scale||1,Ko=un(br,Vo,sr);fn>0&&Rr>0&&Ko>0&&(Uo=Ko/(fn*Rr))}Re(Uo,ir)}let He=q(De=>{if(!t)return;let he=U.current,be=B.current,Le=he.x-be.x,pe=he.y-be.y,Ae={deltaX:Le,deltaY:pe,direction:L.current};if(!Te.current){ke(),Re(0,Ae);return}ve(!1),ke(),X.current=!1;let we=n.current;we&&("touches"in De||sE(we,De.pointerId,"releasePointerCapture"));let Oe=Le,$e=pe,Ve=ne.current,Ze=ox(De.timeStamp),at=Ve!==null&&Ze!==null&&Ze>Ve?Ze-Ve:0,Ke=at>0?Math.max(at,mZ):0,dt=Ke>0?Oe/Ke:0,jt=Ke>0?$e/Ke:0,xt=Z.current.x,mo=Z.current.y,xn=Y.current;if(xn&&Ze!==null&&Ze>=xn.time){let br=Ze-xn.time;if(br<=gZ){let fn=Math.max(br,YL),Rr=he.x-xn.x,Ko=he.y-xn.y,mt=Rr/fn,Da=Ko/fn;Math.abs(Rr)>=tx&&(xt=mt),Math.abs(Ko)>=tx&&(mo=Da)}else xt=0,mo=0}let Vo=m?.({event:De.nativeEvent,direction:L.current,deltaX:Oe,deltaY:$e,velocityX:dt,velocityY:jt,releaseVelocityX:xt,releaseVelocityY:mo}),sr=typeof Vo=="boolean";if(A.current&&!sr){U.current={x:be.x,y:be.y},M(void 0),xe(!1),Re(0,Ae);return}let ir=!1,Uo;if(sr)ir=Vo,Uo=L.current??x;else for(let br of o)if(un(br,Oe,$e)>le.current){ir=!0,Uo=br;break}ir&&Uo?(M(Uo),F(!0),xe(!1),c?.(De.nativeEvent,{direction:Uo})):(U.current={x:be.x,y:be.y},M(void 0),xe(!1),Re(0,Ae))}),je=q(De=>{let he=re(De);if(!he)return;let be=!1;if(!("touches"in De)){let Ae=RZ(De.buttons);if(Ae&&(X.current=!0),De.buttons!==0&&!Ae){Ie(De);return}if(De.buttons===0&&X.current){if(!Te.current){He(De);return}be=!0}}if(!W&&G.current){if(!Ee(De)&&(De.defaultPrevented||De.nativeEvent.defaultPrevented)){ke();return}if(s?s(he,{nativeEvent:De.nativeEvent,direction:x}):!0){let we=oe.current,Oe=!1;if(Ee(De)){let Ve=n.current;if(we&&Ve){let Ze=ye(he,De.nativeEvent),Ke=Be(Ve).body,dt=Ke?se(Ze,Ke):null;if(dt&&(Ne(Ve,dt)||Ne(dt,Ve))){let jt=he.x-we.x,xt=he.y-we.y,mo=We(dt,jt,xt);if(mo===!1)return;mo===!0&&(Oe=!0)}}}Fe(De,he,{ignoreScrollableTarget:Oe,ignoreScrollableAncestors:Oe})&&(we&&Oe?(de(),k.current=we,K.current=we,_.current=we,H.current=!1):(de(),ee.current=!1))}}let Le=_.current,pe=Le===null?{x:0,y:0}:{x:he.x-Le.x,y:he.y-Le.y};_.current=he,ze(De,he,pe),be&&!("touches"in De)&&He(De)}),Qe=q((De,he)=>{je({touches:De.touches,currentTarget:he,nativeEvent:De,defaultPrevented:De.defaultPrevented,timeStamp:De.timeStamp})}),et=Kt.useCallback(()=>{let De=Te.current,he=U.current,be=B.current,Le=he.x-be.x,pe=he.y-be.y;return!De&&Le===0&&pe===0&&!O?{[r.x]:"0px",[r.y]:"0px"}:{transition:De?"none":void 0,transform:De?qL(he,be.scale):void 0,[r.x]:`${Le}px`,[r.y]:`${pe}px`}},[O,r]),ut=Kt.useCallback(()=>t?{onPointerDown:Ue,onPointerMove:je,onPointerUp:He,onPointerCancel:He}:{},[t,He,je,Ue]),vt=Kt.useCallback(()=>t?{onTouchStart:Ue,onTouchMove:je,onTouchEnd:He,onTouchCancel:He}:{},[t,He,je,Ue]);return{swiping:W,swipeDirection:E,dragDismissed:O,getPointerProps:ut,getTouchProps:vt,moveNative:Qe,getDragStyles:et,reset:ie}}var rx={};me(rx,{closed:()=>aE,disabled:()=>lE,open:()=>iE,swipeDirection:()=>cE,swiping:()=>uE});var iE=ge.open,aE=ge.closed,lE="data-disabled",cE="data-swipe-direction",uE="data-swiping";var hZ=.5,xZ=1,CZ=.1,yZ=40,SZ={[iE]:""},vZ={[aE]:""},wZ={[uE]:""},PZ={[lE]:""},EZ={open(e){return e?SZ:vZ},swiping(e){return e?wZ:null},swipeDirection(e){return{[cE]:e}},disabled(e){return e?PZ:null}},XL={up:"down",down:"up",left:"right",right:"left"};function TZ(e){return e==="left"||e==="right"?"pan-y":"pan-x"}var JL=Gn.forwardRef(function(t,o){let{render:n,className:r,style:s,disabled:i=!1,swipeDirection:a,...l}=t,c=zt(),{swipeDirection:u,frontmostHeight:p,swipeAreaActiveRef:d}=Ei(),m=wi(),[g,R]=Gn.useState(!1),b=Gn.useRef(null),x=Gn.useRef(null),h=Gn.useRef(!1),C=Gn.useRef({x:0,y:0}),y=Gn.useRef(null),S=Gn.useRef(!1),w=Gn.useRef(null),v=Gn.useRef(null),P=Gn.useRef(null),N=Gn.useRef(nt),E=Ye(t.id),M=Dd(E,c);J(()=>(M(b.current),()=>M(null)),[M,E,c]);let W=c.useState("open"),I=q(()=>{C.current.x=0,C.current.y=0}),O=a??XL[u],F=XL[O],k=!i&&(!W||g);function U(){N.current(),c.context.outsidePressEnabledRef.current=!1}let _=q(()=>{N.current();let Y=Be(b.current);function ae(Z){Z?.type==="click"&&Z.detail!==0&&!qr(Z)||(N.current=nt,Y.removeEventListener("pointerdown",ae,!0),Y.removeEventListener("click",ae,!0),c.context.outsidePressEnabledRef.current=!0)}N.current=ae,Y.addEventListener("pointerdown",ae,!0),Y.addEventListener("click",ae,!0)});function B(Y){let Z=F==="left"||F==="right"?Y.offsetWidth:Y.offsetHeight;return Z<=0?null:Z}function L(){let Y=c.context.popupRef.current;return Y?B(Y):null}function V(Y){let ae=B(Y);if(ae==null)return null;let Z=F==="left"||F==="right",ue=Sl(Y),Te=Z?ue.x:ue.y;return Number.isFinite(Te)&&Math.abs(Te)>.5?Math.min(ae,Math.abs(Te)):ae}function A(){let Y=L();return Y==null?yZ:Y*hZ}function K(){let Y=c.context.popupRef.current;if(!Y||!c.select("open")||!c.select("mounted"))return;y.current==null&&(y.current=V(Y));let ae=y.current;if(ae===null)return;let{x:Z,y:ue}=C.current,Te=un(O,Z,ue),fe=Math.max(0,Te),ve=fe>ae?ae+Math.sqrt(fe-ae):fe,xe=(ae-ve)*(F==="left"||F==="up"?-1:1),Pe=F==="left"||F==="right",ie=Pe?xe:0,re=Pe?0:xe,Ee=Math.max(0,Math.min(1,fe/ae)),ye=Math.max(0,Math.min(1,1-Ee));Y.style.setProperty(la,`${ie}px`),Y.style.setProperty(ss,`${re}px`),Y.setAttribute(Pi,""),w.current=Y,P.current===null&&(P.current=Y.style.transition),Y.style.transition="none";let se=c.context.backdropRef.current;se&&(se.setAttribute(Pi,""),v.current=se,se.style.setProperty(cn,`${ye}`),Ee>0&&p>0?se.style.setProperty(fr,`${p}px`):se.style.removeProperty(fr)),m?.visualStateStore.set({swipeProgress:Ee,frontmostHeight:Ee>0?p:0}),S.current=!0,d.current=!0}let H=q(()=>{let Y=w.current;Y&&(Y.style.removeProperty(la),Y.style.removeProperty(ss),Y.removeAttribute(Pi)),Y&&P.current!==null&&(Y.style.transition=P.current,P.current=null);let ae=v.current;ae&&(ae.removeAttribute(Pi),ae.style.setProperty(cn,"0"),ae.style.removeProperty(fr)),m?.visualStateStore.set({swipeProgress:0,frontmostHeight:0}),S.current=!1,w.current=null,v.current=null,d.current=!1});function G(Y){h.current=!0,c.setOpen(!0,Ce($.swipe,Y,b.current))}function oe(Y){c.setOpen(!1,Ce($.swipe,Y,b.current))}function ee(){x.current=null,h.current=!1,y.current=null,R(!1)}function X(){ee(),_(),I(),H()}let te=nx({enabled:k,directions:[O],elementRef:b,trackDrag:!1,movementCssVars:{x:la,y:ss},onSwipeStart(Y){U(),x.current=Y,h.current=!1,R(!0),I()},onProgress(Y,ae){if(!ae||!x.current||(C.current.x=ae.deltaX,C.current.y=ae.deltaY,ae.direction!==O))return;let Z=un(O,ae.deltaX,ae.deltaY);!h.current&&Z<xZ||(!h.current&&!c.select("open")&&G(x.current),K())},onRelease({event:Y,direction:ae,deltaX:Z,deltaY:ue,releaseVelocityX:Te,releaseVelocityY:fe}){let ve=un(O,Z,ue),z=un(O,Te,fe),Re=A(),xe=ve>=Re,Pe=z>=CZ;return ae===O&&(xe||Pe)&&!i?c.select("open")||G(Y):h.current&&c.select("open")&&oe(Y),X(),!1},onCancel:X}),ce=te.getPointerProps(),le=te.getTouchProps(),Q=te.reset;J(()=>{g&&S.current&&K()}),J(()=>{k||(g&&_(),Q(),I(),H(),ee())},[H,_,k,I,Q,g]),Gn.useEffect(()=>()=>{N.current(),c.context.outsidePressEnabledRef.current=!0},[c]);let ne={open:W,swiping:te.swiping,swipeDirection:O,disabled:i};return j("div",t,{state:ne,ref:[o,b,M],stateAttributesMapping:EZ,props:[{role:"presentation","aria-hidden":!0,style:{pointerEvents:k?void 0:"none",touchAction:TZ(O)},onPointerDown(Y){Y.pointerType!=="touch"&&(ce.onPointerDown?.(Y),Y.cancelable&&Y.preventDefault())},onPointerMove(Y){Y.pointerType!=="touch"&&ce.onPointerMove?.(Y)},onPointerUp(Y){Y.pointerType!=="touch"&&ce.onPointerUp?.(Y)},onPointerCancel(Y){Y.pointerType!=="touch"&&ce.onPointerCancel?.(Y)}},le,E?{id:E}:void 0,l]})});var ZL=Eu;var QL=Iu;var pn=T(D(),1),p0=T(on(),1);var sx=T(D(),1),pE=sx.createContext(void 0);function e0(){return sx.useContext(pE)}var mE=10,t0=.5,o0=.5,IZ=300,n0=4,r0=.2,MZ=4,dE=80,s0=360,i0=.1,DZ=1,a0=6,NZ=2,AZ=`[${Kh}]`,l0={horizontal:`[${Og}="x"]`,vertical:`[${Og}="y"]`},d0=pn.forwardRef(function(t,o){let{render:n,className:r,style:s,children:i,...a}=t,l=zt(),c=l.context.popupRef,u=l.context.backdropRef,{swipeDirection:p,notifyParentSwipingChange:d,notifyParentSwipeProgressChange:m,frontmostHeight:g,snapToSequentialPoints:R,swipeAreaActiveRef:b}=Ei(),x=wi(),{snapPoints:h,resolvedSnapPoints:C,activeSnapPoint:y,activeSnapPointOffset:S,setActiveSnapPoint:w,popupHeight:v}=Qh(),P=l.useState("open"),N=l.useState("mounted"),E=l.useState("nested"),M=l.useState("nestedOpenDrawerCount"),W=l.useState("viewportElement"),I=l.useState("popupElement"),O=x?.visualStateStore,F=M>0,k=p==="left"||p==="right"?"horizontal":"vertical",U=k==="vertical",_=U?"horizontal":"vertical",[B,L]=pn.useState(null),V=pn.useRef(void 0),A=pn.useRef(null),K=vo(),H=pn.useRef(!1),G=pn.useRef(!1),oe=pn.useRef(""),ee=pn.useRef(!1),X=pn.useRef(!1),te=pn.useRef(null),ce=e0(),le=pn.useMemo(()=>{if(!h||h.length<2||C.length<2||p!=="down"&&p!=="up")return null;let se=C.map(Ie=>Ie.offset).sort((Ie,Me)=>Ie-Me),Fe=se[0],de=se[1]-Fe;return{minOffset:Fe,range:de}},[C,h,p]),Q=pn.useMemo(()=>!le||S===null?null:Ct((S-le.minOffset)/le.range,0,1),[S,le]),ne=pn.useMemo(()=>h&&h.length>0&&(p==="down"||p==="up")?p==="down"?["down","up"]:["up","down"]:[p],[h,p]),Y=q(se=>{c.current?.toggleAttribute(Xh,se),u.current?.toggleAttribute(Xh,se)}),ae=q(()=>{Y(!1),c.current?.removeAttribute(Pt.endingStyle),L(null)}),Z=q(()=>{G.current&&(G.current=!1,d?.(!1))}),ue=q((se,Fe,ke)=>{let de=P&&!E&&Fe,Ie=de?se:0,Me=P&&Fe?se:0;ke&&m&&(m(Me),Me<=0&&Z()),O?.set({swipeProgress:Ie,frontmostHeight:Ie>0?g:0});let We=u.current;if(!We)return;let Ue=de&&Ie>0;We.style.setProperty(cn,Ue?`${Ie}`:"0"),Ue&&g>0?We.style.setProperty(fr,`${g}px`):We.style.removeProperty(fr)});function Te(se,Fe,ke,de,Ie,Me,We,Ue){let ze=f0(se,Fe);if(ze<=0)return null;let je=((Fe==="down"||Fe==="up")&&h&&h.length>0?S??0:0)+un(Fe,ke,de),Qe=Math.max(0,ze-je);if(Qe<=0)return null;let et=un(Fe,We,Ue),ut=Math.abs(et)>0?et:un(Fe,Ie,Me);if(ut<=r0)return null;let vt=Ct(ut,r0,MZ),he=(Ct(Qe/vt,dE,s0)-dE)/(s0-dE);return i0+he*(DZ-i0)}function fe(se){if(G.current||!se)return;let Fe=se.direction??p,ke=un(Fe,se.deltaX,se.deltaY);Math.abs(ke)<mE||(G.current=!0,d?.(!0))}let ve=nx({enabled:N&&!F,directions:ne,elementRef:l.context.popupRef,ignoreSelectorWhenTouch:!1,ignoreScrollableAncestors:!0,movementCssVars:{x:la,y:ss},onSwipeStart(se){if("touches"in se||se.pointerType==="touch")return;let Fe=c.current,de=Be(Fe).getSelection?.();if(!de||de.isCollapsed)return;let Ie=lt(de.anchorNode)?de.anchorNode:de.anchorNode?.parentElement,Me=lt(de.focusNode)?de.focusNode:de.focusNode?.parentElement;!Ne(Fe,Ie)&&!Ne(Fe,Me)||de.removeAllRanges()},onSwipingChange(se){H.current=se,fE(l.context.backdropRef.current,se),!se&&!m&&Z()},swipeThreshold({element:se,direction:Fe}){return c0(se,Fe)},canStart(se,Fe){let ke=l.context.popupRef.current;if(!ke)return!1;let de=Fe.nativeEvent,Ie="touches"in de||de.pointerType==="touch",Me=Ie?te.current:null,We=ke.ownerDocument,Ue=ca(ke.getRootNode(),se.x,se.y);return!(!Me?.startedInPopup&&!Ne(ke,Ue)||Ie&&u0(We,ke)||Me?.hasCrossAxisGestureTarget&&!Me.drawerAxisAttributed&&Me.allowSwipe!==!0)},onProgress(se,Fe){let ke=H.current;ke&&fe(Fe);let de=!!(h&&h.length>0);if(ke&&p==="down"&&de&&Fe){let Me=l.context.popupRef.current;Me&&(Me.style.removeProperty("transform"),Me.style.setProperty(ss,`${Zh(S??0,Fe.deltaY)}px`))}let Ie=se;if(le&&v>0){let Me=S??le.minOffset,We=Ue=>Ct((Ue-le.minOffset)/le.range,0,1);ke&&Fe&&Number.isFinite(Fe.deltaY)?Ie=We(Ct(Me+Fe.deltaY,0,v)):Q!==null&&(Ie=Q)}ke||(m?.(0),Z()),ue(Ie,!0,ke)},onRelease({event:se,deltaX:Fe,deltaY:ke,direction:de,velocityX:Ie,velocityY:Me,releaseVelocityX:We,releaseVelocityY:Ue}){let ze=l.context.popupRef.current;if(!ze){ae();return}let He=ze;function je(at){Z(),Y(!0),He.style.removeProperty("transition"),He.setAttribute(Pt.endingStyle,""),p0.flushSync(()=>{L(Te(He,at,Fe,ke,Ie,Me,We,Ue))})}if(!h||h.length===0){if(!de){ae();return}let at=un(de,Fe,ke);if(at<=0)return ae(),!1;if(un(de,Ie,Me)>=t0)return je(de),!0;let Ke=at>c0(He,de);return Ke?je(de):ae(),Ke}if(p!=="down"&&p!=="up"){ae();return}if(!v)return ae(),!1;if(C.length===0){ae();return}let Qe=p==="down"?ke:-ke,et=Math.sign(Qe),ut=p==="down"?Ue:-Ue,vt=p==="down"?Me:-Me,De=ut;if(et!==0&&Math.abs(Qe)>=mE){let at=Math.sign(De);at!==0&&at!==et&&(De=vt)}let he=S??0,be=Ct(he+Qe,0,v),Le=Math.abs(De)>=o0?Ct(De,-n0,n0)*IZ:0,pe=R?be:Ct(be+Le,0,v),Ae=Ce($.swipe,se),we=()=>(ue(0,!0,!0),ae(),!1),Oe=at=>(w(at.value,Ae),we()),$e=at=>de?(w(null,Ae),Ae.isCanceled?we():(V.current=y,je(p),!0)):Oe(at);if(R){let at=[...C].sort((ir,Uo)=>ir.offset-Uo.offset),Ke=at.map(ir=>ir.offset),dt=yf(Ke,he),jt=at[yf(Ke,pe)],xt=Math.sign(De),mo=et!==0&&xt!==0&&xt===et&&Math.abs(De)>=o0,xn=pe;if(mo){let ir=Ct(dt+et,0,at.length-1);if(ir!==dt){let Uo=at[ir];(et>0?pe<Uo.offset:pe>Uo.offset)&&(jt=Uo,xn=Uo.offset)}else if(et>0)return $e(jt)}let Vo=Math.abs(xn-v),sr=Math.abs(xn-jt.offset);return Vo<sr?$e(jt):Oe(jt)}let Ve=C[yf(C.map(at=>at.offset),pe)];return De>=t0&&Qe>0||Math.abs(pe-v)<Math.abs(pe-Ve.offset)?$e(Ve):Oe(Ve)},onDismiss(se){O?.set({swipeProgress:0,frontmostHeight:0});let Fe=l.context.backdropRef.current;Fe&&(Fe.style.setProperty(cn,"0"),Fe.style.removeProperty(fr));let ke=Ce($.swipe,se);if(l.setOpen(!1,ke),ke.isCanceled){let de=V.current;de!==void 0&&w(de,Ce($.swipe,se)),V.current=void 0,A.current?.(),ae();return}if(l.select("open")){let de=se;K.request(()=>{if(l.select("open")){let Ie=V.current;Ie!==void 0&&w(Ie,Ce($.swipe,de)),V.current=void 0,ae(),A.current?.()}else V.current=void 0});return}V.current=void 0,Y(!0)}}),z=ve.getPointerProps(),Re=ve.getTouchProps(),{moveNative:xe,reset:Pe}=ve;A.current=Pe,pn.useEffect(()=>{let se=W??I;if(!se||!P||!N)return;let Fe=se,ke=Be(Fe);function de(Me,We,Ue){let ze=U?Ue.clientY-We.lastY:Ue.clientX-We.lastX;if(Me.touches.length===2||u0(ke,Fe)||F||GZ(We,Me,Ue,U))return;let je=We.scrollTarget;if(!je||je===ke.documentElement||je===ke.body){Me.cancelable&&Me.preventDefault(),Me.stopPropagation(),xe(Me,Fe);return}if(!UZ(je,k)){Me.cancelable&&Me.preventDefault(),Me.stopPropagation();return}if(ze!==0){let Qe=WZ(je,k,p,ze);We.allowSwipe?Me.cancelable&&Me.preventDefault():Me.cancelable&&Qe?(We.allowSwipe=!0,Me.preventDefault()):We.allowSwipe=!1}We.allowSwipe===!0&&(Me.stopPropagation(),xe(Me,Fe))}function Ie(Me){if(ce?.onTouchMove(Me),X.current)return;let We=te.current,Ue=Me.touches[0];!Ue||!We||(de(Me,We,Ue),HZ(We,Ue))}return qe(ke,"touchmove",Ie,{passive:!1,capture:!0})},[N,F,P,I,U,k,p,xe,W,ce]),J(()=>{!le||ve.swiping||ue(!P||E?0:Q??0,!0,!1)},[ue,g,E,m,P,Q,le,ve.swiping,l,O]),J(()=>{if(m)return P||m(0),()=>{m(0)}},[m,P]),J(()=>{P&&(b.current||Pe(),ae())},[ae,P,Pe,b]),J(()=>{let se=u.current;return()=>{O?.set({swipeProgress:0,frontmostHeight:0}),fE(se,!1);let Fe=u.current;Fe!==se&&fE(Fe,!1),Z()}},[u,Z,O]);let ie=pn.useMemo(()=>({swiping:ve.swiping,getDragStyles:ve.getDragStyles,swipeStrength:B??null,setSwipeDismissed:Y}),[Y,ve.getDragStyles,ve.swiping,B]);function re(se){X.current=se,te.current=null}function Ee(){re(!1),oe.current="",ee.current=!1}function ye(se){return oe.current="",se.pointerType!=="touch"}return f(Mu,{ref:o,className:r,style:s,render:n,...Mt(a,{onPointerDown(se){if(oe.current=se.pointerType,ee.current=se.pointerType==="pen",!P||!N||F)return;let Fe=ca(se.currentTarget.getRootNode(),se.clientX,se.clientY);OZ(Fe)||FZ(Fe)||se.pointerType!=="touch"&&z.onPointerDown?.(se)},onPointerMove(se){se.pointerType!=="touch"&&z.onPointerMove?.(se)},onPointerUp(se){ye(se)&&z.onPointerUp?.(se)},onPointerCancel(se){ye(se)&&z.onPointerCancel?.(se)},onTouchStart(se){if(oe.current==="pen"&&ee.current){ee.current=!1,re(!1);return}if(!P||!N||F){re(!1);return}let ke=se.touches[0];if(!ke)return;if(BZ(se)){re(!1);return}let de=se.currentTarget,Ie=ca(de.getRootNode(),ke.clientX,ke.clientY),Me=Je(se.nativeEvent),We=lt(Me)?Me:de;if(!Ne(de,We)){re(!0);return}if(ce?.onTouchStart(se),Xt(Ie,`${Td}:not(${l0[_]})`)){re(!0);return}X.current=!1;let Ue=ol(We,de,k),ze=ol(We,de,_)!=null||Xt(Ie,l0[_])!=null,He=null;Ue&&(He=g0(Ue,k,p)?null:!1),te.current={startX:ke.clientX,startY:ke.clientY,lastX:ke.clientX,lastY:ke.clientY,startedInPopup:Ne(c.current,Ie),scrollTarget:Ue,hasCrossAxisGestureTarget:ze,allowSwipe:He,preserveNativeCrossAxisScroll:!1,drawerAxisAttributed:!1},Re.onTouchStart?.(se)},onTouchEnd(se){ce?.onTouchEnd(se),Ee(),Re.onTouchEnd?.(se)},onTouchCancel(se){ce?.onTouchCancel(),Ee(),Re.onTouchCancel?.(se)},[gw]:void 0}),children:f(rE.Provider,{value:ie,children:i})})});function fE(e,t){e?.toggleAttribute(Pi,t)}function OZ(e){return!!Xt(e,Td)}function FZ(e){return!!Xt(e,AZ)}function f0(e,t){return t==="left"||t==="right"?e.offsetWidth:e.offsetHeight}function c0(e,t){return Math.max(f0(e,t)*.5,mE)}function _Z(e,t){return e instanceof t.HTMLInputElement&&e.type==="range"}function VZ(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"}function kZ(e,t){let o=lt(e.anchorNode)?e.anchorNode:e.anchorNode?.parentElement,n=lt(e.focusNode)?e.focusNode:e.focusNode?.parentElement;return e.containsNode(t,!0)||Ne(t,o)||Ne(t,n)}function u0(e,t){let o=ft(e);if(o&&Ne(t,o)&&VZ(o)){let{selectionStart:r,selectionEnd:s}=o;if(r!=null&&s!=null&&r<s)return!0}let n=e.getSelection?.();return!n||n.isCollapsed?!1:kZ(n,t)}function LZ(e,t){return e.composedPath().some(o=>_Z(o,t))}function BZ(e){return LZ(e.nativeEvent,rt(e.currentTarget))}function HZ(e,t){e.lastX=t.clientX,e.lastY=t.clientY}function GZ(e,t,o,n){if(e.preserveNativeCrossAxisScroll)return!0;if(e.drawerAxisAttributed||e.allowSwipe===!0||!e.hasCrossAxisGestureTarget)return!1;if(!t.cancelable)return e.preserveNativeCrossAxisScroll=!0,!0;let r=n?o.clientY-e.startY:o.clientX-e.startX,s=n?o.clientX-e.startX:o.clientY-e.startY,i=Math.abs(r),a=Math.abs(s);return a>=a0&&a>i+NZ?(e.preserveNativeCrossAxisScroll=!0,!0):i>=a0?(e.drawerAxisAttributed=!0,!1):!0}function UZ(e,t){return m0(e,t).max>0}function m0(e,t){if(t==="vertical"){let n=Math.max(0,e.scrollHeight-e.clientHeight);return{offset:e.scrollTop,max:n}}let o=Math.max(0,e.scrollWidth-e.clientWidth);return{offset:e.scrollLeft,max:o}}function g0(e,t,o){let n=b0(o,t),{offset:r,max:s}=m0(e,t);return n?r<=0:r>=s}function WZ(e,t,o,n){return(b0(o,t)?n>0:n<0)?g0(e,t,o):!1}function b0(e,t){return t==="vertical"?e==="down":e==="right"}var Vs=T(D(),1);var ax={};me(ax,{keyboardInset:()=>ix});var ix="--drawer-keyboard-inset";var gE=60,lx=16,R0=150,jZ=4,zZ=60,h0=10,cx=16,$Z=new Set(["email","number","password","search","tel","text","url"]),C0=Symbol("KeyboardTapBlocked");function y0(e){let{children:t}=e,o=zt(),n=o.useState("open"),r=o.useState("mounted"),s=o.useState("modal"),i=o.useState("nestedOpenDialogCount"),l=o.useState("viewportElement"),c=i>0,u=Vs.useRef(!1),p=Vs.useRef(null),d=Vs.useRef(null),m=Vs.useRef(null),g=Vs.useRef(!1),R=Vs.useRef(null),b=vo(),x=ct(),h=q(()=>{let E=m.current;E&&(E.element.style.overflowAnchor=E.overflowAnchor,E.element.style.paddingBottom=E.paddingBottom,E.element.style.scrollPaddingBottom=E.scrollPaddingBottom,m.current=null)}),C=q((E,M)=>{let W=Math.max(0,Math.ceil(M)),I=m.current;if(I&&!I.element.isConnected&&(h(),I=null),W===0){h();return}if(I&&I.element!==E&&(h(),I=null),!I){let O=Mo(E);I={element:E,overflowAnchor:E.style.overflowAnchor,paddingBottom:E.style.paddingBottom,scrollPaddingBottom:E.style.scrollPaddingBottom,computedPaddingBottom:Number.parseFloat(O.paddingBottom)||0,computedScrollPaddingBottom:Number.parseFloat(O.scrollPaddingBottom)||0},m.current=I}E.style.overflowAnchor="none",E.style.paddingBottom=`${W+Math.max(I.computedPaddingBottom,lx)}px`,E.style.scrollPaddingBottom=`${I.computedScrollPaddingBottom+lx}px`}),y=q((E,M)=>{let I=rt(E).matchMedia?.("(prefers-reduced-motion: reduce)")?.matches?"auto":"smooth";E.scrollTo({top:M,behavior:I})}),S=q(()=>{u.current=!1,p.current=null});Vs.useEffect(()=>{if(!r||!n){d.current=null,h(),b.cancel();return}if(!l){h();return}let E=Be(l),M=rt(l),W=M.visualViewport,I=null,O=0,F=0,k=-1,U=-1,_=null,B=()=>{if(!W||W.scale!==1)return null;let fe=M.innerHeight,ve=W.height;if(fe-ve>gE)U=ve;else if(Math.abs(ve-U)>gE)return U=-1,null;_||(_=E.createElement("div"),_.style.cssText="position:fixed;top:0;height:100svh;visibility:hidden",E.body.appendChild(_));let z=_.offsetHeight-ve<=gE,Re=Math.max(0,W.offsetTop);return{top:Re,bottom:z?fe:Math.min(fe,Re+ve),resizing:z&&Math.abs(fe-ve)>=1}};R.current=B;let L=fe=>{l.style.setProperty(ix,`${Math.max(0,Math.ceil(fe))}px`)},V=M.scrollX,A=M.scrollY,K=()=>s!==!0||c||!d.current||M.scrollX===V&&M.scrollY===A||B()==null?!1:(M.scrollTo({left:V,top:A,behavior:"instant"}),!0),H=null,G=()=>{H?.(),H=null},oe=(fe,ve)=>{G();let z=fe.getBoundingClientRect();H=S0(fe,(ve.top+ve.bottom-z.top-z.bottom)/2)},ee=()=>{G();let fe=d.current;if(c||!fe||!Ne(l,fe)){L(0),h();return}K();let ve=B();if(!ve){L(0),h();return}L(Math.max(0,M.innerHeight-ve.bottom));let z=ZZ(fe,l);if(!z){h();return}let Re=z.getBoundingClientRect(),xe=Math.min(Re.bottom,ve.bottom),Pe=Math.max(0,Re.bottom-ve.bottom);C(z,Pe);let ie=Math.max(0,z.scrollHeight-z.clientHeight);if(ie<=0)return;let Ee=Math.max(Re.top,ve.top)+lx,ye=xe-lx;if(ye<=Ee)return;let se=fe.getBoundingClientRect(),Fe=z.scrollTop+(se.top+se.bottom-Ee-ye)/2,ke=Math.round(Ct(Fe,0,ie));if(I===z&&!ve.resizing&&Math.abs(O-ke)<=1){if(k>=0){let Ie=z.scrollTop;if(Math.abs(Ie-ke)<=1)return;if(Ie!==k){k=Ie;return}}}else{let Ie=I===z?F+1:1;if(I=z,O=ke,F=Ie,k=-1,Ie<=zZ){b.request(ee);return}}I=z,O=ke,F=0,k=z.scrollTop,y(z,ke)},X=()=>{b.request(ee)},te=()=>{let fe=jZ,ve=()=>{ee(),fe-=1,fe>0&&x.start(R0,ve)};x.start(R0,ve)},ce=()=>{d.current=null,U=-1,x.clear(),X()},le=fe=>{if(c)return!1;let ve=ux(fe);return!ve||!Ne(l,ve)?!1:(d.current!==ve&&(I=null),d.current=ve,!0)},Q=fe=>{let ve=d.current;H&&ve&&ve===Je(fe)&&ve.focus({preventScroll:!0})},ne=fe=>{if(g.current=!1,G(),!le(Je(fe))){ce();return}B()!=null&&te(),X()},Y=fe=>{if(!g.current){if(le(fe.relatedTarget)){let ve=d.current,z=B();ve&&z&&oe(ve,z),X();return}ce()}},ae=()=>{(d.current||le(ft(E)))&&X()},Z=[];W&&Z.push(qe(W,"resize",ae),qe(W,"scroll",ae),qe(M,"resize",ae));let ue=()=>{K()&&X()},Te=()=>{d.current&&b.cancel(),x.clear(),I=null};return Z.push(qe(E,"focus",Q,!0),qe(E,"focusin",ne,!0),qe(E,"focusout",Y,!0),qe(M,"scroll",ue),qe(E,"pointerdown",Te,!0)),le(ft(E))&&X(),()=>{Z.forEach(fe=>fe()),G(),d.current=null,h(),b.cancel(),x.clear(),R.current=null,_?.remove(),l.style.removeProperty(ix)}},[y,b,x,s,r,c,n,h,l,C]);let w=q(E=>{let M=E.touches[0];u.current=!1,p.current={x:M.clientX,y:M.clientY}}),v=q(E=>{let M=E.touches[0],W=p.current;!M||!W||u.current||(Math.abs(M.clientX-W.x)>h0||Math.abs(M.clientY-W.y)>h0)&&(u.current=!0)}),P=q(E=>{if(!n||!r||c||!l||!p.current||u.current){S();return}let M=E.changedTouches[0]??E.touches[0],W=l.getRootNode(),I=Je(E.nativeEvent),O=M?qZ(W,M.clientX,M.clientY):null;if(O===C0){S();return}let F=M&&(O??KZ(I));if(F&&(!Ne(l,F.focusTarget)||!Ne(l,F.clickTarget))){S();return}if(F){let{clickTarget:k,focusTarget:U}=F,_=rt(U);if(_.visualViewport&&_.visualViewport.scale!==1){S();return}if(ft(Be(U))===U&&(!_.visualViewport||R.current?.()!=null)){S();return}E.preventDefault(),g.current=!0;try{JZ(U)}finally{g.current=!1}XZ(k,M),k!==U&&ft(Be(U))===U&&U.focus({preventScroll:!0}),S();return}S()}),N=Vs.useMemo(()=>({onTouchStart:w,onTouchMove:v,onTouchEnd:P,onTouchCancel:S}),[P,v,w,S]);return f(pE.Provider,{value:N,children:t})}function x0(e){if(e.isContentEditable)return!0;let t=rt(e);return e instanceof t.HTMLTextAreaElement||e instanceof t.HTMLInputElement&&$Z.has(e.type)?!e.matches(":disabled"):!1}function ux(e){if(!st(e))return null;if(x0(e))return e.isContentEditable?YZ(e):e;let o=Xt(e,"label")?.control??null;return st(o)&&x0(o)?o:null}function KZ(e){if(!st(e))return null;let t=ux(e);return t?{focusTarget:t,clickTarget:e}:null}function YZ(e){let t=e;for(;t.parentElement?.isContentEditable;)t=t.parentElement;return t}function qZ(e,t,o){let n=ca(e,t,o);if(st(n)){let r=ux(n);if(r)return{focusTarget:r,clickTarget:n}}if(Zl(n)||Xt(n,"label")!=null)return C0;for(let[r,s]of[[0,cx],[0,-cx],[cx,0],[-cx,0]]){let i=ux(ca(e,t+r,o+s));if(i)return{focusTarget:i,clickTarget:i}}return null}function XZ(e,t){let o=rt(e),n=o.PointerEvent??o.MouseEvent;e.dispatchEvent(new n("click",{bubbles:!0,cancelable:!0,clientX:t.clientX,clientY:t.clientY,detail:1,view:o}))}function JZ(e){let t=ft(Be(e))===e,o=S0(e,-2e3);try{t&&e.blur(),e.focus({preventScroll:!0})}finally{o()}}function S0(e,t){let o=e.style.opacity,n=e.style.transform,r=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=n,e.style.transition=r}}function ZZ(e,t){let o=bn(e);return ol(o,t,"vertical")??ol(o,t,"vertical",!0)}var vf=class extends ta{};function v0(){return new vf}var bE={};me(bE,{closed:()=>e7,endingStyle:()=>o7,open:()=>QZ,startingStyle:()=>t7});var QZ=ge.open,e7=ge.closed,t7=ge.startingStyle,o7=ge.endingStyle;var RE={};me(RE,{closed:()=>r7,endingStyle:()=>i7,nested:()=>a7,open:()=>n7,startingStyle:()=>s7});var n7=ge.open,r7=ge.closed,s7=ge.startingStyle,i7=ge.endingStyle,a7="data-nested";var Wr={};me(Wr,{Control:()=>D0,Description:()=>M0,Error:()=>T0,Item:()=>A0,Label:()=>E0,Root:()=>P0,Validity:()=>N0});var Rn=T(D(),1);var px=T(D(),1),hE=px.createContext(void 0);function vl(e=!1){let t=px.useContext(hE);if(!t&&!e)throw new Error(_e(86));return t}var wl=T(D(),1);var dx=function(t){let o=Ye(),[n,r]=wl.useState(o),[s,i]=wl.useState(),[a,l]=wl.useState([]),c=n===void 0?o:n,u=gt(()=>new Map),{messageIds:p}=Vt(),d=q((b,x)=>{let h=u.current;x===void 0?h.delete(b):h.set(b,x),r(C=>{if(h.size===0)return C;let y;for(let S of h.values()){if(S===C)return C;y===void 0&&(y=S)}return y})}),m=q(()=>{u.current.size===0&&r(o)}),g=wl.useCallback(b=>{let x=b["aria-describedby"]?b["aria-describedby"].split(" "):[];return x.push(...p,...a),{...b,"aria-describedby":Array.from(new Set(x)).join(" ")||void 0}},[p,a]),R=wl.useMemo(()=>({controlId:c,registerControlId:d,resetControlId:m,labelId:s,setLabelId:i,messageIds:a,setMessageIds:l,getDescriptionProps:g}),[c,d,m,s,i,a,l,g]);return f(Ew.Provider,{value:R,children:t.children})};var fx=T(D(),1);function w0(e){let{change:t,commit:o,invalid:n,markedDirtyRef:r,name:s,setRegisteredFieldName:i,registeredFieldIdRef:a,setValidityData:l,validityData:c}=e,{formRef:u}=eo(),p=fx.useRef(null),d=fx.useRef(null),m=fx.useRef(!1),g=q(()=>{let S=d.current;if(S)return S.getValue?S.getValue():S.value});function R(S){return S.value===void 0?g():S.value}let b=q(()=>{let S=d.current;if(r.current=!0,!S){o(c.value);return}o(R(S))});function x(){let S=d.current;!S||!S.id||u.current.fields.set(S.id,{getValue:g,name:s??S.name,controlRef:S.controlRef,validityData:gc(c,n),validate:b})}function h(S=d.current?.id){S&&u.current.fields.delete(S)}function C(S){if(m.current)return;m.current=!0;let w=R(S);l(v=>v.initialValue===w?v:{...v,initialValue:w})}J(()=>{let S=d.current;!S||!S.id||(i(s?void 0:S.name),u.current.fields.set(S.id,{getValue:g,name:s??S.name,controlRef:S.controlRef,validityData:gc(c,n),validate:b}))},[u,g,n,s,i,b,c]),J(()=>{let S=u.current.fields;return()=>{let w=d.current?.id;w&&S.delete(w)}},[u]);let y=q((S,w)=>{if(!w){p.current===S&&(p.current=null,t(void 0,!0),h(),d.current=null,i(void 0),a.current=void 0);return}let v=d.current?.id,P=p.current;P&&P!==S&&t(void 0,!0),p.current=S,d.current=w,s||i(w.name),a.current=w.id,v&&v!==w.id&&h(v),C(w),x()});return[b,y]}var l7=Rn.forwardRef(function(t,o){let{errors:n,validationMode:r,submitCountRef:s}=eo(),{render:i,className:a,validate:l,validationDebounceTime:c=0,validationMode:u=r,name:p,disabled:d=!1,invalid:m,dirty:g,touched:R,actionsRef:b,style:x,...h}=t,C=vl(!0)?.disabled,y=q(l||(()=>null)),S=C||d,[w,v]=Rn.useState(!1),[P,N]=Rn.useState(!1),[E,M]=Rn.useState(!1),[W,I]=Rn.useState(!1),O=Rn.useRef(void 0),F=g??P,k=R??w,U=Rn.useRef(F),_=Rn.useRef(void 0),[B,L]=Rn.useState(),V=p??B;J(()=>{g!==void 0&&(U.current=g)},[g]);let A=q(ue=>{g===void 0&&(ue&&(U.current=!0),N(ue))}),K=q(ue=>{R===void 0&&v(ue)}),H=q(()=>u==="onChange"||u==="onSubmit"&&s.current>0),G=V&&Object.hasOwn(n,V)?n[V]:null,oe=!!(Array.isArray(G)?G.length:G),ee=m===!0||oe,[X,te]=Rn.useState({state:dc,error:"",errors:[],value:null,initialValue:null}),ce=!ee&&(S?null:X.state.valid),le=Rn.useMemo(()=>({disabled:S,touched:k,dirty:F,valid:ce,filled:E,focused:W}),[S,k,F,ce,E,W]),Q=zV({setValidityData:te,validate:y,validityData:X,validationDebounceTime:c,invalid:ee,markedDirtyRef:U,state:le,shouldValidateOnChange:H,validationMode:u,registeredFieldIdRef:_}),[ne,Y]=w0({change:Q.change,commit:Q.commit,invalid:ee,markedDirtyRef:U,name:p,setRegisteredFieldName:L,registeredFieldIdRef:_,setValidityData:te,validityData:X});Rn.useImperativeHandle(b,()=>({validate:ne}),[ne]);let ae=Rn.useMemo(()=>({invalid:ee,name:V,validityData:X,setValidityData:te,disabled:S,setTouched:K,setDirty:A,setFilled:M,setFocused:I,focusOwnerRef:O,validationMode:u,shouldValidateOnChange:H,state:le,registerFieldControl:Y,validation:Q}),[ee,V,X,S,K,A,M,I,u,H,le,Y,Q]),Z=j("div",t,{ref:o,state:le,props:h,stateAttributesMapping:Ut});return f(Nu.Provider,{value:ae,children:Z})}),P0=Rn.forwardRef(function(t,o){return f(dx,{children:f(l7,{...t,ref:o})})});var wf=T(D(),1);var E0=wf.forwardRef(function(t,o){let{render:n,className:r,style:s,id:i,nativeLabel:a=!0,...l}=t,c=ht(!1),u=sl(),{labelId:p}=Vt(),d={...c.state,disabled:c.disabled||u.disabled},m=wf.useRef(null),g=ll({id:p??i,native:a});return j("label",t,{ref:[o,m],state:d,props:[g,l],stateAttributesMapping:Ut})});var yc=T(D(),1);var c7={...Ut,...Lt},T0=yc.forwardRef(function(t,o){let{render:n,id:r,className:s,match:i,style:a,...l}=t,c=Ye(r),{validityData:u,state:p,name:d}=ht(!1),{setMessageIds:m}=Vt(),{errors:g}=eo(),R=d&&Object.hasOwn(g,d)?g[d]:null,b=!!(Array.isArray(R)?R.length:R),x=typeof i=="string",h=!1;i===!0?h=!0:p.disabled?h=!1:x?h=!!u.state[i]:h=b||u.state.valid===!1;let{mounted:C,transitionStatus:y,setMounted:S}=so(h);J(()=>{if(!(!h||!c))return m(k=>k.concat(c)),()=>{m(k=>k.filter(U=>U!==c))}},[h,c,m]);let w=yc.useRef(null),[v,P]=yc.useState(null),[N,E]=yc.useState(null),M=u.error;!x&&b?M=R:u.errors.length>1&&(M=u.errors);let W=M;Array.isArray(M)&&(W=M.length>1?f("ul",{children:M.map(k=>f("li",{children:k},k))}):M[0]);let I=Array.isArray(M)?JSON.stringify(M):M;h&&I!==N&&(E(I),P(W)),It({open:h,ref:w,onComplete(){h||S(!1)}});let O={...p,transitionStatus:y},F=j("div",t,{ref:[o,w],state:O,props:[{id:c,children:h?W:v},l],stateAttributesMapping:c7,enabled:C});return C?F:null});var I0=T(D(),1);var M0=I0.forwardRef(function(t,o){let{render:n,id:r,className:s,style:i,...a}=t,l=Ye(r),c=ht(!1),u=sl(),{setMessageIds:p}=Vt(),d={...c.state,disabled:c.disabled||u.disabled};return J(()=>{if(l)return p(g=>g.concat(l)),()=>{p(g=>g.filter(R=>R!==l))}},[l,p]),j("p",t,{ref:o,state:d,props:[{id:l},a],stateAttributesMapping:Ut})});var mx=T(D(),1);var D0=mx.forwardRef(function(t,o){let{render:n,className:r,id:s,name:i,value:a,disabled:l=!1,onValueChange:c,defaultValue:u,autoFocus:p=!1,style:d,...m}=t,{state:g,name:R,disabled:b,setTouched:x,setDirty:h,validityData:C,setFilled:y,validationMode:S,validation:w}=ht(),{clearErrors:v,elementRef:P,submitCountRef:N}=eo(),E=b||l,M=R??i,W={...g,disabled:E},{labelId:I}=Vt(),O=Ao({id:s}),F=a!==void 0,k=a==null?void 0:String(a),U=q(()=>w.inputRef.current?.value);an(w.inputRef,O,k,U,!E,i),J(()=>{let A=k??w.inputRef.current?.value;A!==void 0&&y(A!=="")},[k,u,w.inputRef,y]),oo(k,()=>{k!==void 0&&(v(M),h(k!==(C.initialValue??"")),w.change(k))});let _=mx.useRef(null),B=ln(E,_),L=ct();return j("input",t,{ref:[o,_],state:W,props:[{id:O,disabled:E,name:M,ref:w.inputRef,"aria-labelledby":I,autoFocus:p,...F?{value:a}:{defaultValue:u},onChange(A){let K=A.currentTarget.value,H=Ce($.none,A.nativeEvent);c?.(K,H),!F&&(h(K!==(C.initialValue??"")),y(K!==""),!A.nativeEvent.defaultPrevented&&!H.isCanceled&&(v(M),w.change(K)))},onFocus(){B(!0)},onBlur(A){if(x(!0),B(!1),S==="onBlur"){let K=A.currentTarget.value;w.commit(K),F&&queueMicrotask(()=>{let H=w.inputRef.current?.value;H!==void 0&&H!==K&&H!==(C.initialValue??"")&&w.commit(H)})}},onKeyDown(A){if(A.currentTarget.tagName==="INPUT"&&A.key==="Enter"){x(!0);let K=A.currentTarget.value,H=A.currentTarget.form;if(H&&H===P.current&&!A.defaultPrevented){let G=A.currentTarget,oe=N.current;L.start(0,()=>{N.current===oe&&w.commit(G.value)})}else w.commit(K)}}},m,A=>w.getValidationProps(E,A)],stateAttributesMapping:Ut})});var Pf=T(D(),1);var N0=function(t){let{children:o}=t,{validityData:n,invalid:r}=ht(!1),s=Pf.useMemo(()=>gc(n,r),[n,r]),i=s.state.valid===!1,{transitionStatus:a}=so(i),l=Pf.useMemo(()=>({...s,validity:s.state,transitionStatus:a}),[s,a]);return f(Pf.Fragment,{children:o(l)})};var gx=T(D(),1);var A0=gx.forwardRef(function(t,o){let{render:n,className:r,style:s,disabled:i=!1,...a}=t,{state:l,disabled:c}=ht(!1),u=c||i,p={...l,disabled:u},d=gx.useMemo(()=>({disabled:u}),[u]),m=j("div",t,{ref:o,state:p,props:a,stateAttributesMapping:Ut});return f(dx,{children:f(Qw.Provider,{value:d,children:m})})});var xE={};me(xE,{dirty:()=>d7,disabled:()=>u7,filled:()=>g7,focused:()=>b7,invalid:()=>m7,touched:()=>p7,valid:()=>f7});var u7="data-disabled",p7="data-touched",d7="data-dirty",f7="data-valid",m7="data-invalid",g7="data-filled",b7="data-focused";var CE={};me(CE,{dirty:()=>y7,disabled:()=>R7,filled:()=>S7,focused:()=>v7,invalid:()=>x7,touched:()=>C7,valid:()=>h7});var R7="data-disabled",h7="data-valid",x7="data-invalid",C7="data-touched",y7="data-dirty",S7="data-filled",v7="data-focused";var yE={};me(yE,{dirty:()=>I7,disabled:()=>w7,endingStyle:()=>A7,filled:()=>M7,focused:()=>D7,invalid:()=>E7,startingStyle:()=>N7,touched:()=>T7,valid:()=>P7});var w7="data-disabled",P7="data-valid",E7="data-invalid",T7="data-touched",I7="data-dirty",M7="data-filled",D7="data-focused",N7=Pt.startingStyle,A7=Pt.endingStyle;var SE={};me(SE,{dirty:()=>k7,disabled:()=>O7,filled:()=>L7,focused:()=>B7,invalid:()=>_7,touched:()=>V7,valid:()=>F7});var O7="data-disabled",F7="data-valid",_7="data-invalid",V7="data-touched",k7="data-dirty",L7="data-filled",B7="data-focused";var vE={};me(vE,{dirty:()=>j7,disabled:()=>H7,filled:()=>z7,focused:()=>$7,invalid:()=>U7,touched:()=>W7,valid:()=>G7});var H7="data-disabled",G7="data-valid",U7="data-invalid",W7="data-touched",j7="data-dirty",z7="data-filled",$7="data-focused";var up={};me(up,{Legend:()=>_0,Root:()=>O0});var cp=T(D(),1);var O0=cp.forwardRef(function(t,o){let{render:n,className:r,style:s,disabled:i=!1,...a}=t,[l,c]=cp.useState(void 0),p=vl(!0)?.disabled||i,m=j("fieldset",t,{ref:o,state:{disabled:p},props:[{"aria-labelledby":l,disabled:p},a]}),g=cp.useMemo(()=>({legendId:l,setLegendId:c,disabled:p}),[l,c,p]);return f(hE.Provider,{value:g,children:m})});var F0=T(D(),1);var _0=F0.forwardRef(function(t,o){let{render:n,className:r,style:s,id:i,...a}=t,{disabled:l,setLegendId:c}=vl(),u=al(i,c);return j("div",t,{state:{disabled:l},ref:o,props:[{id:u},a]})});var wE={};me(wE,{disabled:()=>K7});var K7="data-disabled";var mr=T(D(),1);var bx=mr.forwardRef(function(t,o){let{render:n,className:r,validationMode:s="onSubmit",errors:i,onSubmit:a,onFormSubmit:l,actionsRef:c,style:u,...p}=t,d=mr.useRef({fields:new Map}),m=mr.useRef(null),g=mr.useRef(!1),R=mr.useRef(0),b=q(()=>{let w=!1,v=null;for(let P of d.current.fields.values()){if(P.validityData.state.valid!==!1)continue;w=!0;let N=P.controlRef.current;N&&(!v||Y7(N,v))&&(v=N)}return v?(v.focus(),v.tagName==="INPUT"&&v.select(),!0):w}),[x,h]=mr.useState(i);oo(i,()=>{h(i)}),mr.useEffect(()=>{g.current&&(g.current=!1,b())},[x,b]),mr.useImperativeHandle(c,()=>({validate(w){w?Array.from(d.current.fields.values()).find(v=>v.name===w)?.validate():d.current.fields.forEach(v=>{v.validate()})}}),[]);let C=j("form",t,{ref:[o,m],props:[{noValidate:!0,onSubmit(w){if(R.current+=1,d.current.fields.forEach(v=>{v.validate()}),b()){w.preventDefault();return}if(g.current=!0,a?.(w),l){w.preventDefault();let v={};d.current.fields.forEach(P=>{P.name&&(v[P.name]=P.getValue())}),l(v,go($.none,w.nativeEvent))}}},p]}),y=q(w=>{w&&h(v=>{if(!v||!Object.hasOwn(v,w))return v;let P={...v};return delete P[w],P})}),S=mr.useMemo(()=>({elementRef:m,formRef:d,validationMode:s,errors:x??ot,clearErrors:y,submitCountRef:R}),[d,s,x,y]);return f(Pw.Provider,{value:S,children:C})});function Y7(e,t){let o=e.compareDocumentPosition(t);return(o&Node.DOCUMENT_POSITION_DISCONNECTED)===0&&(o&Node.DOCUMENT_POSITION_FOLLOWING)!==0}var V0=T(D(),1);var Rx=V0.forwardRef(function(t,o){return f(Wr.Control,{ref:o,...t})});var PE={};me(PE,{dirty:()=>Q7,disabled:()=>q7,filled:()=>e9,focused:()=>t9,invalid:()=>J7,touched:()=>Z7,valid:()=>X7});var q7="data-disabled",X7="data-valid",J7="data-invalid",Z7="data-touched",Q7="data-dirty",e9="data-filled",t9="data-focused";var ks=T(D(),1);var L0=T(D(),1);var vc=T(D(),1);var Sc="data-composite-item-active";function k0(e){let{loopFocus:t=!0,orientation:o="both",grid:n,onLoop:r,direction:s,highlightedIndex:i,onHighlightedIndexChange:a,rootRef:l,enableHomeAndEndKeys:c=!1,stopEventPropagation:u,disabledIndices:p,modifierKeys:d=Et}=e,[m,g]=vc.useState(0),R=n!=null,b=vc.useRef(null),x=Wt(b,l),h=vc.useRef([]),C=vc.useRef(!1),y=vc.useRef(null),S=i??m,w=q((M,W=!1)=>{if(y.current=h.current[M]??null,(a??g)(M),W){let I=h.current[M];pw(b.current,I,s,o)}}),v=q(M=>{if(M.size===0)return;if(C.current){let F=h.current,k=F.indexOf(y.current);if(k===-1){let U=F[S];!U||vs(F,S,p)?w(o9(F,p)):y.current=U}else k!==S&&w(k);return}C.current=!0;let W=Array.from(M.keys()),I=W.find(F=>F?.hasAttribute(Sc))??null,O=I?M.get(I)?.index??-1:-1;if(O!==-1)w(O);else if(vs(W,S,p)){let F=Nn(W,{disabledIndices:p});_r(W,F)||w(F)}pw(b.current,I,s,o)});J(()=>{if(p==null||i!=null||!C.current)return;let M=h.current;if(vs(M,S,p)){let W=Nn(M,{disabledIndices:p});_r(M,W)||w(W)}},[p,i,S,h,w]);let P=q((M,W,I)=>r?r(M,W,I,h):I),N=q(M=>{let W=M.key===vu||M.key===wu;if(!ur.has(M.key)||!c&&W||n9(M,d)||!b.current)return;let O=s==="rtl",F=O?yu:Su,k=O?Su:yu,U=o==="vertical"?Cu:F,_=o==="vertical"?xu:k,B=Je(M.nativeEvent);if(B!=null&&uw(B)&&!hh(B)){let G=B.selectionStart,oe=B.selectionEnd,ee=B.value;if(G==null||M.shiftKey||G!==oe||M.key!==_&&G<ee.length||M.key!==U&&G>0)return}let L=S,V=ws(h,p),A=oi(h,p);n!=null&&(L=n({disabledIndices:p,elementsRef:h,event:M,highlightedIndex:S,loopFocus:t,maxIndex:A,minIndex:V,onLoop:P,orientation:o,rtl:O}));let K=o!=="vertical"&&M.key===F||o!=="horizontal"&&M.key===Cu,H=o!=="vertical"&&M.key===k||o!=="horizontal"&&M.key===xu;c&&(M.key===vu?L=V:M.key===wu&&(L=A)),L===S&&(K||H)&&(t&&L===A&&K?(L=V,r&&(L=r(M,S,L,h))):t&&L===V&&H?(L=A,r&&(L=r(M,S,L,h))):L=Nn(h.current,{startingIndex:L,decrement:H,disabledIndices:p})),L!==S&&!_r(h.current,L)&&(u&&M.stopPropagation(),(R||W||K||H)&&M.preventDefault(),w(L,!0),queueMicrotask(()=>{h.current[L]?.focus()}))});return{props:{ref:x,onFocus(M){let W=b.current,I=Je(M.nativeEvent);!W||I==null||!uw(I)||I.setSelectionRange(0,I.value.length)},onKeyDown:N},highlightedIndex:S,onHighlightedIndexChange:w,elementsRef:h,onMapChange:v,relayKeyboardEvent:N}}function o9(e,t){let o=-1;for(let n=0;n<e.length;n+=1){let r=e[n];if(!(!r||vs(e,n,t))){if(r.hasAttribute(Sc))return n;o===-1&&(o=n)}}return Math.max(o,0)}function n9(e,t){for(let o of m_)if(!t.includes(o)&&e.getModifierState(o))return!0;return!1}function gr(e){let{render:t,className:o,style:n,refs:r=Et,props:s=Et,state:i=ot,stateAttributesMapping:a,highlightedIndex:l,onHighlightedIndexChange:c,orientation:u,grid:p,loopFocus:d,onLoop:m,enableHomeAndEndKeys:g,onMapChange:R,stopEventPropagation:b=!0,rootRef:x,disabledIndices:h,modifierKeys:C,highlightItemOnHover:y=!1,tag:S="div",...w}=e,v=kt(),{props:P,highlightedIndex:N,onHighlightedIndexChange:E,elementsRef:M,onMapChange:W,relayKeyboardEvent:I}=k0({grid:p,loopFocus:d,onLoop:m,orientation:u,highlightedIndex:l,onHighlightedIndexChange:c,rootRef:x,stopEventPropagation:b,enableHomeAndEndKeys:g,direction:v,disabledIndices:h,modifierKeys:C}),O=j(S,e,{state:i,ref:r,props:[P,...s,w],stateAttributesMapping:a}),F=L0.useMemo(()=>({highlightedIndex:N,onHighlightedIndexChange:E,highlightItemOnHover:y,relayKeyboardEvent:I}),[N,E,y,I]);return f(QS.Provider,{value:F,children:f(Cn,{elementsRef:M,onMapChange:k=>{R?.(k),W(k)},children:O})})}var hx={};me(hx,{hasSubmenuOpen:()=>EE,modal:()=>r9,orientation:()=>s9});var r9="data-modal",s9="data-orientation",EE="data-has-submenu-open";var i9={hasSubmenuOpen(e){return e?{[EE]:""}:null}},xx=ks.forwardRef(function(t,o){let{orientation:n="horizontal",loopFocus:r=!0,render:s,className:i,modal:a=!0,disabled:l=!1,id:c,style:u,...p}=t,[d,m]=ks.useState(null),[g,R]=ks.useState(!1),b=Ye(c),x={orientation:n,modal:a,hasSubmenuOpen:g},h=ks.useRef(!1),C=ks.useMemo(()=>({contentElement:d,setContentElement:m,setHasSubmenuOpen:R,hasSubmenuOpen:g,modal:a,disabled:l,orientation:n,allowMouseUpTriggerRef:h,rootId:b}),[d,g,a,l,n,b]);return f(NP.Provider,{value:C,children:f(Ps,{children:f(a9,{children:f(gr,{render:s,className:i,style:u,state:x,stateAttributesMapping:i9,refs:[o,m],props:[{role:"menubar",id:b,"aria-orientation":n},p],orientation:n,loopFocus:r,enableHomeAndEndKeys:!0,highlightItemOnHover:g})})})})});function a9(e){let t=kr(),{events:o}=jo(),n=ml();return ks.useEffect(()=>{function r(s){!s.nodeId||s.parentNodeId!==t||(s.open?n.hasSubmenuOpen||n.setHasSubmenuOpen(!0):s.reason!==$.siblingOpen&&s.reason!==$.listNavigation&&n.setHasSubmenuOpen(!1))}return o.on("menuopenchange",r),()=>{o.off("menuopenchange",r)}},[o,t,n]),f(Lr,{id:t,children:e.children})}var pa={};me(pa,{Indicator:()=>j0,Label:()=>Y0,Root:()=>H0,Track:()=>U0,Value:()=>$0});var Pl=T(D(),1);var B0=new Map;function wc(e,t){let o=JSON.stringify({locale:Kd(e),options:t}),n=B0.get(o);if(n)return n;let r=new Intl.NumberFormat(e,t);return B0.set(o,r),r}function wn(e,t,o){return e==null?"":wc(t,o).format(e)}var Cx=T(D(),1),TE=Cx.createContext(void 0);function pp(){let e=Cx.useContext(TE);if(e===void 0)throw new Error(_e(38));return e}function ua(e,t,o){return(e-t)*100/(o-t)}var H0=Pl.forwardRef(function(t,o){let{format:n,getAriaValueText:r,locale:s,max:i=100,min:a=0,value:l,render:c,className:u,children:p,style:d,...m}=t,[g,R]=Pl.useState(),b=ua(l,a,i),x=Ct(Number.isNaN(b)?0:b,0,100),h=Ct(Number.isNaN(l)?a:l,a,i),C=n?wn(h,s,n):wn(x/100,s,{style:"percent"}),y=C;r&&(y=r(C,l));let S={"aria-labelledby":g,"aria-valuemax":i,"aria-valuemin":a,"aria-valuenow":h,"aria-valuetext":y,role:"meter",children:f(Pl.Fragment,{children:[p,f("span",{role:"presentation",style:wo,children:"x"})]})},w=Pl.useMemo(()=>({formattedValue:C,percentageValue:x,setLabelId:R,value:l}),[C,x,R,l]),v=j("div",t,{ref:o,props:[S,m]});return f(TE.Provider,{value:w,children:v})});var G0=T(D(),1);var U0=G0.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t;return j("div",t,{ref:o,props:i})});var W0=T(D(),1);var j0=W0.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t,{percentageValue:a}=pp();return j("div",t,{ref:o,props:[{style:{insetInlineStart:0,height:"inherit",width:`${a}%`}},i]})});var z0=T(D(),1);var $0=z0.forwardRef(function(t,o){let{className:n,render:r,children:s,style:i,...a}=t,{value:l,formattedValue:c}=pp();return j("span",t,{ref:o,props:[{"aria-hidden":!0,children:typeof s=="function"?s(c,l):c},a]})});var K0=T(D(),1);var Y0=K0.forwardRef(function(t,o){let{render:n,className:r,style:s,id:i,...a}=t,{setLabelId:l}=pp(),c=al(i,l);return j("span",t,{ref:o,props:[{id:c,role:"presentation"},a]})});var Un={};me(Un,{Arrow:()=>RB,Backdrop:()=>fB,Content:()=>tB,Icon:()=>yB,Item:()=>Z0,Link:()=>xB,List:()=>J0,Popup:()=>gB,Portal:()=>iB,Positioner:()=>cB,Root:()=>q0,Trigger:()=>nB,Viewport:()=>pB});var uo=T(D(),1);var dp=T(D(),1),IE=dp.createContext(void 0);function xo(e){let t=dp.useContext(IE);if(t===void 0&&!e)throw new Error(_e(41));return t}var ME=dp.createContext(void 0);function Ti(){return dp.useContext(ME)}var fp={};me(fp,{anchorHeight:()=>p9,anchorWidth:()=>u9,availableHeight:()=>c9,availableWidth:()=>l9,positionerHeight:()=>fa,positionerWidth:()=>da,transformOrigin:()=>d9});var l9="--available-width",c9="--available-height",u9="--anchor-width",p9="--anchor-height",d9="--transform-origin",da="--positioner-width",fa="--positioner-height";var Ef={};me(Ef,{popupHeight:()=>ga,popupWidth:()=>ma});var ma="--popup-width",ga="--popup-height";function mp(e,t,o,n){e.style.setProperty(ma,`${o}px`),e.style.setProperty(ga,`${n}px`),t.style.setProperty(da,`${o}px`),t.style.setProperty(fa,`${n}px`)}var f9=new Set([$.triggerHover,$.outsidePress,$.focusOut]);function m9(e){let t=parseFloat(e.style.getPropertyValue(da))||0,o=parseFloat(e.style.getPropertyValue(fa))||0;return t<=0||o<=0?null:{width:t,height:o}}var q0=uo.forwardRef(function(t,o){let{defaultValue:n=null,value:r,onValueChange:s,actionsRef:i,delay:a=50,closeDelay:l=50,orientation:c="horizontal",onOpenChangeComplete:u}=t,p=On()!=null,d=xo(!0),[m,g]=_t({controlled:r,default:n,name:"NavigationMenu",state:"value"}),R=m!=null,b=uo.useRef(void 0),x=uo.useRef(null),[h,C]=uo.useState(null),[y,S]=uo.useState(null),[w,v]=uo.useState(null),[P,N]=uo.useState(null),[E,M]=uo.useState(null),[W,I]=uo.useState(void 0),[O,F]=uo.useState(!1),k=uo.useRef(null),U=uo.useRef(null),_=uo.useRef(null),B=uo.useRef(null),L=uo.useRef(null),V=uo.useRef(null),A=uo.useRef({abortController:null,owner:null}),[K,H]=uo.useState(!1),{mounted:G,transitionStatus:oe,preventUnmountingOnClose:ee,forceUnmount:X}=Ya({open:R,ref:{current:y},preventUnmountOnClose:K,setPreventUnmountOnClose:H,onUnmount(){let ne=Be(x.current),Y=ft(ne);!(b.current?f9.has(b.current):!1)&&st(k.current)&&(Y===Be(y).body||Ne(y,Y))&&y&&(k.current.focus({preventScroll:!0}),k.current=void 0),u?.(!1),M(null),I(void 0),U.current=null,b.current=void 0}});It({enabled:G&&!R&&!ee,open:R,ref:{current:P},onComplete(){R||X()}}),J(()=>{if(R||!h||!y)return;let ne=m9(h);ne&&mp(y,h,ne.width,ne.height)},[R,y,h]),uo.useEffect(()=>{F(!1)},[m]);let te=q((ne,Y)=>{ne==null&&(b.current=Y.reason);let ae=Y,Z=Es(ae);ne!==m&&s?.(ne,ae),!Y.isCanceled&&(ne==null&&(m!=null&&H(Z()),M(null),I(void 0)),g(ne),p&&ne==null&&Y.reason===$.linkPress&&d&&d.setValue(null,Y))});uo.useImperativeHandle(i,()=>({unmount:X,close:()=>te(null,Ce($.imperativeAction))}),[X,te]);let ce=R?E:null,le=uo.useMemo(()=>({open:R,value:m,setValue:te,mounted:G,transitionStatus:oe,positionerElement:h,setPositionerElement:C,popupElement:y,setPopupElement:S,viewportElement:w,setViewportElement:v,viewportTargetElement:P,setViewportTargetElement:N,activationDirection:ce,setActivationDirection:M,floatingRootContext:W,setFloatingRootContext:I,currentContentRef:U,nested:p,rootRef:x,beforeInsideRef:_,afterInsideRef:B,beforeOutsideRef:L,afterOutsideRef:V,prevTriggerElementRef:k,popupAutoSizeResetRef:A,delay:a,closeDelay:l,orientation:c,viewportInert:O,setViewportInert:F}),[R,m,te,G,oe,h,y,w,P,ce,W,p,a,l,c,O]),Q=f(IE.Provider,{value:le,children:f(g9,{componentProps:t,forwardedRef:o,children:t.children})});return p?Q:f(Ps,{children:Q})});function g9(e){let{className:t,render:o,defaultValue:n,value:r,onValueChange:s,actionsRef:i,delay:a,closeDelay:l,orientation:c,onOpenChangeComplete:u,style:p,...d}=e.componentProps,m=kr(),{rootRef:g,nested:R,open:b}=xo(),x={open:b,nested:R},h=j(R?"div":"nav",e.componentProps,{state:x,ref:[e.forwardedRef,g],props:d});return f(ME.Provider,{value:m,children:f(Lr,{id:m,children:h})})}var wx=T(D(),1);var yx="data-base-ui-navigation-menu-trigger";var Sx=T(D(),1),vx=Sx.createContext(void 0);function X0(){return Sx.useContext(vx)}function gp(){return new Xa({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new qo,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}var J0=wx.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t,a=Ti(),{orientation:l,open:c,floatingRootContext:u,positionerElement:p,value:d,closeDelay:m,viewportElement:g,nested:R}=xo(),b=wx.useMemo(()=>gp(),[]),x=u||b,h=p!=null||d==null,C=p!=null||g!=null||d==null;Ms(x,{enabled:!!u&&C,closeDelay:m,nodeId:a});let y=Vn(x,{enabled:h,outsidePressEvent:"intentional",outsidePress(E){let M=Je(E);return Xt(M,`[${yx}]`)===null}}),S=u?y:void 0,w={open:c},v=R?ot:{onKeyDown(E){(l==="horizontal"&&(E.key==="ArrowLeft"||E.key==="ArrowRight")||l==="vertical"&&(E.key==="ArrowUp"||E.key==="ArrowDown"))&&E.stopPropagation()}},P=[S?.floating||ot,v,i],N=j("ul",t,{state:w,ref:o,props:P,enabled:R});return R?f(vx.Provider,{value:S,children:N}):f(vx.Provider,{value:S,children:f(gr,{render:n,className:r,style:s,state:w,refs:[o],props:P,loopFocus:!1,orientation:l,tag:"ul"})})});var Ex=T(D(),1);var Px=T(D(),1),DE=Px.createContext(void 0);function bp(){let e=Px.useContext(DE);if(!e)throw new Error(_e(39));return e}var Z0=Ex.forwardRef(function(t,o){let{render:n,className:r,style:s,value:i,...a}=t,l=Ye(),c=i??l,u=j("li",t,{ref:o,props:a}),p=Ex.useMemo(()=>({value:c}),[c]);return f(DE.Provider,{value:p,children:u})});var Pc=T(D(),1),eB=T(on(),1);var Tx={};me(Tx,{activationDirection:()=>NE,closed:()=>R9,endingStyle:()=>x9,open:()=>b9,startingStyle:()=>h9});var b9=ge.open,R9=ge.closed,h9=ge.startingStyle,x9=ge.endingStyle,NE="data-activation-direction";var Q0={...lo,...Lt,activationDirection(e){return e?{[NE]:e}:null}},tB=Pc.forwardRef(function(t,o){let{render:n,className:r,style:s,keepMounted:i=!1,...a}=t,{mounted:l,viewportElement:c,value:u,activationDirection:p,currentContentRef:d,viewportTargetElement:m}=xo(),{value:g}=bp(),R=Ti(),b=l&&u===g,x=Pc.useRef(null),[h,C]=Pc.useState(!1),[y,S]=Pc.useState(!1),{mounted:w,setMounted:v,transitionStatus:P}=so(b);w&&!l&&v(!1),It({ref:x,open:b,onComplete(){b||v(!1)}}),J(()=>{b&&x.current&&(d.current=x.current)},[b,d]);let N={open:b,transitionStatus:P,activationDirection:p},E=q(k=>{k&&b&&(d.current=k)}),M={onFocus(k){Je(k.nativeEvent)?.hasAttribute("data-base-ui-focus-guard")||S(!0)},onBlur(k){Ne(k.currentTarget,k.relatedTarget)||S(!1)}},W=!b&&w?{style:{position:"absolute",top:0,left:0},inert:sn(!y),...M}:M,I=m||c,O=i&&!w,F=i&&!I&&!h;return i&&I&&!h&&C(!0),F?f(gr,{render:n,className:r,style:s,state:N,refs:[o],props:[W,{hidden:!0},a],stateAttributesMapping:Q0}):!I||!w&&!i?null:eB.createPortal(f(Lr,{id:R,children:f(gr,{render:n,className:r,style:s,state:N,refs:[o,x,E],props:[W,O?{hidden:!0}:ot,a],stateAttributesMapping:Q0})}),I)});var Oo=T(D(),1),Mx=T(on(),1);function Ix({currentTarget:e,relatedTarget:t},o){let{popupElement:n,rootRef:r,tree:s,nodeId:i}=o,a=s?yr(s.nodesRef.current,i).some(l=>Ne(l.context?.elements.floating,t)):!1;return n?!Ne(n,e)&&!Ne(n,t)&&!Ne(r.current,t)&&!a:!Ne(r.current,t)&&!a}var oB={width:0,height:0},nB=Oo.forwardRef(function(t,o){let{render:n,className:r,style:s,nativeButton:i=!0,disabled:a=!1,...l}=t,{value:c,setValue:u,mounted:p,open:d,positionerElement:m,setActivationDirection:g,setFloatingRootContext:R,popupElement:b,viewportElement:x,transitionStatus:h,rootRef:C,beforeOutsideRef:y,afterOutsideRef:S,afterInsideRef:w,beforeInsideRef:v,prevTriggerElementRef:P,popupAutoSizeResetRef:N,currentContentRef:E,delay:M,closeDelay:W,orientation:I,setViewportInert:O,nested:F}=xo(),{value:k}=bp(),U=Ti(),_=jo(),B=X0(),L=kt(),V=ct(),A=vo(),K=vo(),H=vo(),[G,oe]=Oo.useState(null),[ee,X]=Oo.useState(!0),[te,ce]=Oo.useState(""),le=Oo.useRef(null),Q=Oo.useRef(oB),ne=Oo.useRef(!1),Y=d&&c===k,ae=Tt(Y),Z=(m!=null||c==null)&&!a,ue=m||x,Te=(ue!=null||c==null)&&!a,fe=xr(b),ve=Oo.useCallback(pe=>{le.current=pe,oe(pe)},[]),z=q((pe=!1)=>{!pe&&N.current.owner!==k||(N.current.abortController?.abort(),N.current.abortController=null,N.current.owner=null)});J(()=>{Y||(A.cancel(),H.cancel(),z())},[Y,A,H,z]);function Re(pe){pe.style.setProperty(ma,"auto"),pe.style.setProperty(ga,"auto")}function xe(pe,Ae){pe.style.removeProperty(ma),pe.style.removeProperty(ga),Ae.style.removeProperty(da),Ae.style.removeProperty(fa)}function Pe(pe){z(!0);let Ae=new AbortController;N.current.abortController=Ae,N.current.owner=k,fe(()=>{N.current.abortController=null,N.current.owner=null,Re(pe)},Ae.signal)}let ie=q((pe,Ae,we,Oe)=>{z(!0),xe(pe,Ae);let{width:$e,height:Ve}=ns(pe),Ze=$e||Q.current.width,at=Ve||Q.current.height;(Oe===0||we===0)&&(we=Ze,Oe=at),pe.style.setProperty(ma,`${we}px`),pe.style.setProperty(ga,`${Oe}px`),Ae.style.setProperty(da,`${Ze}px`),Ae.style.setProperty(fa,`${at}px`),H.request(()=>{ae.current&&(pe.style.setProperty(ma,`${Ze}px`),pe.style.setProperty(ga,`${at}px`),Pe(pe))})}),re=q((pe,Ae,we,Oe)=>{H.cancel(),A.cancel(),z(!0),!(we===0||Oe===0)&&(mp(pe,Ae,we,Oe),A.request(()=>{A.request(()=>{xe(pe,Ae);let{width:$e,height:Ve}=ns(pe),Ze=$e||we,at=Ve||Oe;mp(pe,Ae,we,Oe),H.request(()=>{ae.current&&(mp(pe,Ae,Ze,at),Pe(pe))})})}))}),Ee=q((pe,Ae)=>{H.cancel(),z(!0),xe(pe,Ae);let{width:we,height:Oe}=ns(pe);we===0||Oe===0||(Q.current={width:we,height:Oe},Re(pe),Ae.style.setProperty(da,`${we}px`),Ae.style.setProperty(fa,`${Oe}px`))}),ye=q(pe=>{let Ae=pe.style.getPropertyValue(ma),we=pe.style.getPropertyValue(ga);return Ae!==""&&Ae!=="auto"&&we!==""&&we!=="auto"?{size:{width:pe.offsetWidth||Q.current.width,height:pe.offsetHeight||Q.current.height},syncPositioner:!0}:{size:Q.current,syncPositioner:!1}});Oo.useEffect(()=>{d||(V.clear(),A.cancel(),K.cancel(),H.cancel(),z(!0),ne.current=!1,ce(""))},[V,d,A,K,H,z]),Oo.useEffect(()=>{p||(Q.current=oB)},[p]),J(()=>{if(!b||typeof ResizeObserver!="function")return;let pe=new ResizeObserver(()=>{Q.current={width:b.offsetWidth,height:b.offsetHeight}});return pe.observe(b),()=>{pe.disconnect()}},[b]),Oo.useEffect(()=>{if(!d||!Y||!b||!m)return;let pe=b,Ae=m,we=rt(Ae);function Oe(){K.cancel(),K.request(()=>Ee(pe,Ae))}let $e=qe(we,"resize",Oe);return()=>{K.cancel(),$e()}},[d,Y,b,m,K,Ee]),Oo.useEffect(()=>{let pe=E.current;if(!pe||!b||!m||!Y||typeof MutationObserver!="function")return;let Ae=new MutationObserver(()=>{if(h==="starting"||b.hasAttribute(Pt.startingStyle)){Ee(b,m);return}let{size:we,syncPositioner:Oe}=ye(b);if(Oe){re(b,m,we.width,we.height);return}ie(b,m,we.width,we.height)});return Ae.observe(pe,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:["hidden"]}),()=>{Ae.disconnect()}},[E,b,m,Y,h,ye,re,ie,Ee]),J(()=>{if(ae.current&&d&&b&&m){if(ne.current){ne.current=!1;return}let{width:pe,height:Ae}=ns(b);ie(b,m,pe,Ae)}},[E,ie,ae,d,b,m,h]);function se(pe,Ae){let we=Ae.reason===$.triggerHover;if(!Z||te==="touch"&&we||!pe&&c!==k)return;function Oe(){we&&(X(!0),V.clear(),V.start(500,()=>{X(!1)})),pe?u(k,Ae):(u(null,Ae),ce(""))}we?Mx.flushSync(Oe):Oe()}let Fe=Is({open:d,onOpenChange:se,elements:{reference:G,floating:ue}}),ke=Ja(Fe),de=te!=="touch";Oo.useEffect(()=>(d||(Fe.context.dataRef.current.openEvent=void 0,ke.pointerType=void 0,ke.interactedInside=!1,ke.restTimeoutPending=!1,ke.openChangeTimeout.clear(),ke.restTimeout.clear()),()=>{mi(ke)}),[Fe,ke,d]);let Ie=q(()=>!F||m||!le.current||!ue?null:y9(le.current,ue,U));function Me(){return F&&m?null:Xt(le.current,"ul")}let We=Hr(Fe,{enabled:Te,move:!1,handleClose:Gr({blockPointerEvents:de,getScope:Me}),restMs:p&&m?0:M,delay:{close:W},triggerElementRef:le,getHandleCloseContext:Ie}),Ue=Oo.useMemo(()=>We?{reference:We}:void 0,[We]),ze=_n(Fe,{enabled:Z,stickIfOpen:ee,toggle:Y}),He=Oo.useMemo(()=>Mt(ze.reference,Ue?.reference),[ze.reference,Ue]);J(()=>{Y&&(R(Fe),P.current=G)},[Y,Fe,R,P,G]);function je(pe){Mx.flushSync(()=>{let Ae=pe.currentTarget,we=P.current?.getBoundingClientRect();if(p&&we&&G){let Oe=G.getBoundingClientRect(),$e=Oe.left>we.left,Ve=Oe.top>we.top;I==="horizontal"&&Oe.left!==we.left?g($e?"right":"left"):I==="vertical"&&Oe.top!==we.top&&g(Ve?"down":"up")}if(pe.type!=="click"&&c!=null&&(Fe.context.dataRef.current.openEvent=void 0),!(te==="touch"&&pe.type!=="click")&&(c!=null&&pe.type!=="keydown"&&u(k,Ce(pe.type==="mouseenter"?$.triggerHover:$.triggerPress,pe.nativeEvent)),pe.type==="mouseenter"&&de&&(!F||!m)&&ue)){let Oe=()=>{let $e=Me()??Ae.ownerDocument.body;fu(ke,{scopeElement:$e,referenceElement:Ae,floatingElement:ue})};c!=null&&c!==k?queueMicrotask(Oe):Oe()}})}let Qe=q(pe=>{if(a)return;if(!b||!m){je(pe);return}let{width:Ae,height:we}=ns(b),Oe=c!=null&&c!==k&&(pe.type==="click"||te!=="touch");je(pe),Oe&&(ne.current=!0),ie(b,m,Ae,we)}),et={open:Y,disabled:a};function ut(pe){ce(pe.pointerType)}function vt(pe){ut(pe),mi(ke)}let De={tabIndex:0,onMouseEnter:Qe,onClick:Qe,onPointerEnter:ut,onPointerDown:vt,"aria-expanded":Y,"aria-controls":Y?b?.id:void 0,[yx]:"",onFocus(){Y&&O(!1)},onMouseLeave(){c==null&&mi(ke)},onKeyDown(pe){if(F)return;let Ae=L==="rtl"?"ArrowLeft":"ArrowRight",we=I==="horizontal"&&pe.key==="ArrowDown",Oe=I==="vertical"&&pe.key===Ae;(we||Oe)&&(u(k,Ce($.listNavigation,pe.nativeEvent)),Qe(pe),St(pe))},onBlur(pe){m&&b&&Ix({currentTarget:pe.currentTarget,relatedTarget:pe.relatedTarget},{popupElement:b,rootRef:C,tree:_,nodeId:U})&&u(null,Ce($.focusOut,pe.nativeEvent))}},{getButtonProps:he,buttonRef:be}=bt({disabled:a,focusableWhenDisabled:!0,native:i}),Le=ue;return f(Oo.Fragment,{children:[f(er,{tag:"button",render:n,className:r,style:s,state:et,stateAttributesMapping:Or,refs:[o,ve,be],props:[He,B?.reference||Et,De,l,he]}),Y&&f(Oo.Fragment,{children:[f(nn,{ref:y,onFocus:pe=>{Le&&An(pe,Le)?v.current?.focus():Wa(G)?.focus()}}),f("span",{"aria-owns":x?.id,style:Fg}),f(nn,{ref:S,onFocus:pe=>{if(Le&&An(pe,Le))Mx.flushSync(()=>{O(!1)}),(w.current||G)?.focus();else{let Ae=Ua(G);F&&!m&&Le&&Ae&&Ne(Le,Ae)&&(Ae=Mg(w.current,1)),Ae?.focus(),(!F||m)&&!Ne(C.current,Ae)&&u(null,Ce($.focusOut,pe.nativeEvent))}}})]})]})});function C9(e,t){let o=e.getBoundingClientRect(),n=t.getBoundingClientRect(),r=o.left+o.width/2,s=o.top+o.height/2,i=n.left+n.width/2,a=n.top+n.height/2,l=i-r,c=a-s;return Math.abs(l)>=Math.abs(c)?l>=0?"right":"left":c>=0?"bottom":"top"}function y9(e,t,o){return{placement:C9(e,t),elements:{domReference:e,floating:t},nodeId:o}}var sB=T(D(),1);var Dx=T(D(),1),AE=Dx.createContext(void 0);function rB(){let e=Dx.useContext(AE);if(e===void 0)throw new Error(_e(40));return e}var iB=sB.forwardRef(function(t,o){let{keepMounted:n=!1,...r}=t,{mounted:s}=xo();return s||n?f(AE.Provider,{value:n,children:f(Vr,{ref:o,...r})}):null});var ba=T(D(),1),lB=T(on(),1);function S9(e){let t=Is(e);return $b({...e,rootContext:e.rootContext||t})}function aB(e){return kw(e,S9)}var Nx=T(D(),1),OE=Nx.createContext(void 0);function Ec(e=!1){let t=Nx.useContext(OE);if(!t&&!e)throw new Error(_e(42));return t}var v9=gp(),cB=ba.forwardRef(function(t,o){let{open:n,mounted:r,positionerElement:s,setPositionerElement:i,floatingRootContext:a,nested:l,transitionStatus:c}=xo(),{className:u,render:p,anchor:d,positionMethod:m="absolute",side:g="bottom",align:R="center",sideOffset:b=0,alignOffset:x=0,collisionBoundary:h="clipping-ancestors",collisionPadding:C=5,collisionAvoidance:y=l?Xr:ja,arrowPadding:S=5,sticky:w=!1,disableAnchorTracking:v=!1,style:P,...N}=t,E=rB(),M=Ti(),W=ct(),I=ct(),[O,F]=ba.useState(n),k=ba.useRef(n);ba.useEffect(()=>{if(!s)return;function V(A){s&&An(A)&&(A.type==="focusin"?wd:Dg)(s)}return Wo(qe(s,"focusin",V,!0),qe(s,"focusout",V,!0))},[s]);let U=(a||v9).useState("domReferenceElement"),_=aB({anchor:d??U,positionMethod:m,mounted:r,side:g,sideOffset:b,align:R,alignOffset:x,arrowPadding:S,collisionBoundary:h,collisionPadding:C,sticky:w,disableAnchorTracking:v,keepMounted:E,floatingRootContext:a,collisionAvoidance:y,shift:{rootBoundary:"layoutViewport"},nodeId:M,adaptiveOrigin:Rh}),B={open:n,side:_.side,align:_.align,anchorHidden:_.anchorHidden,instant:O};ba.useEffect(()=>{if(!n)return;k.current&&W.start(0,()=>{k.current=!1,I.isStarted()||F(!1)});function V(){lB.flushSync(()=>{F(!0)}),I.start(100,()=>{F(!1)})}let A=rt(s);return qe(A,"resize",V)},[n,W,I,s]);let L=Qn(t,B,{styles:_.positionerStyles,transitionStatus:c,props:N,refs:[o,i],hidden:!r,inert:!n});return f(OE.Provider,{value:_,children:L})});var Ax=T(D(),1);var w9=gp();function uB({children:e}){let{beforeInsideRef:t,beforeOutsideRef:o,afterInsideRef:n,afterOutsideRef:r,positionerElement:s,viewportElement:i,floatingRootContext:a}=xo(),l=!!Ec(!0),c=s||i;return!a&&!l?e:f(Ax.Fragment,{children:[f(nn,{ref:t,onFocus:u=>{c&&An(u,c)?Ua(c)?.focus():o.current?.focus()}}),e,f(nn,{ref:n,onFocus:u=>{c&&An(u,c)?Wa(c)?.focus():r.current?.focus()}})]})}var pB=Ax.forwardRef(function(t,o){let{render:n,className:r,style:s,children:i,id:a,...l}=t,c=Kn(a),{setViewportElement:u,setViewportTargetElement:p,floatingRootContext:d,prevTriggerElementRef:m,viewportInert:g,setViewportInert:R}=xo(),x=!!Ec(!0),h=(d||w9).useState("domReferenceElement");J(()=>{h&&(m.current=h)},[h,m]);let C=j("div",t,{ref:[o,u],props:[{id:c,onBlur(y){let S=y.relatedTarget,w=y.currentTarget;S&&!Ne(w,S)&&S!==h&&R(!0)},...!x&&g&&{inert:sn(!0)},children:x?i:f(uB,{children:f("div",{ref:p,children:i})})},l]});return x?f(uB,{children:C}):C});var dB=T(D(),1);var fB=dB.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t,{open:a,mounted:l,transitionStatus:c}=xo();return j("div",t,{state:{open:a,transitionStatus:c},ref:o,props:[{role:"presentation",hidden:!l,style:{userSelect:"none",WebkitUserSelect:"none"}},i],stateAttributesMapping:Ro})});var mB=T(D(),1);var gB=mB.forwardRef(function(t,o){let{render:n,className:r,style:s,id:i,...a}=t,{open:l,transitionStatus:c,setPopupElement:u}=xo(),p=Ec(),d=kt(),m=Ye(i),g={open:l,transitionStatus:c,side:p.side,align:p.align,anchorHidden:p.anchorHidden},R=p.side==="left";d==="rtl"?R=R||p.side==="inline-end":R=R||p.side==="inline-start";let b=p.side==="top"||R;return j("nav",t,{state:g,ref:[o,u],props:[{id:m,tabIndex:-1,style:b?{position:"absolute",[p.side==="top"?"bottom":"top"]:"0",[R?"right":"left"]:"0"}:{}},Sn(c),a],stateAttributesMapping:Ro})});var bB=T(D(),1);var RB=bB.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t,{open:a,transitionStatus:l}=xo(),{arrowRef:c,side:u,align:p,arrowUncentered:d,arrowStyles:m}=Ec();return j("div",t,{state:{open:a,side:u,align:p,uncentered:d},ref:[o,c],props:[{style:m,"aria-hidden":!0},Sn(l),i],stateAttributesMapping:lo})});var hB=T(D(),1);var xB=hB.forwardRef(function(t,o){let{className:n,render:r,active:s=!1,closeOnClick:i=!1,style:a,...l}=t,{setValue:c,popupElement:u,positionerElement:p,rootRef:d}=xo(),m=Ti(),g=jo();return f(er,{tag:"a",render:r,className:n,style:a,state:{active:s},refs:[o],props:[{"aria-current":s?"page":void 0,tabIndex:void 0,onClick(x){i&&c(null,Ce($.linkPress,x.nativeEvent))},onBlur(x){p&&u&&Ix({currentTarget:x.currentTarget,relatedTarget:x.relatedTarget},{popupElement:u,rootRef:d,tree:g,nodeId:m})&&c(null,Ce($.focusOut,x.nativeEvent))}},l]})});var CB=T(D(),1);var yB=CB.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t,{value:a}=bp(),{open:l,value:c}=xo();return j("span",t,{state:{open:l&&c===a},ref:o,props:[{"aria-hidden":!0,children:"\u25BC"},i],stateAttributesMapping:qn})});var FE={};me(FE,{disabled:()=>T9,popupOpen:()=>P9,pressed:()=>E9});var P9=At.popupOpen,E9=At.pressed,T9="data-disabled";var _E={};me(_E,{align:()=>A9,anchorHidden:()=>D9,closed:()=>M9,instant:()=>O9,open:()=>I9,side:()=>N9});var I9=ge.open,M9=ge.closed,D9=ge.anchorHidden,N9=ge.side,A9=ge.align,O9="data-instant";var VE={};me(VE,{closed:()=>_9,endingStyle:()=>k9,open:()=>F9,startingStyle:()=>V9});var F9=ge.open,_9=ge.closed,V9=ge.startingStyle,k9=ge.endingStyle;var kE={};me(kE,{align:()=>j9,anchorHidden:()=>U9,closed:()=>B9,endingStyle:()=>G9,open:()=>L9,side:()=>W9,startingStyle:()=>H9});var L9=ge.open,B9=ge.closed,H9=ge.startingStyle,G9=ge.endingStyle,U9=ge.anchorHidden,W9=ge.side,j9=ge.align;var LE={};me(LE,{align:()=>Y9,closed:()=>$9,open:()=>z9,side:()=>K9,uncentered:()=>q9});var z9=ge.open,$9=ge.closed,K9=ge.side,Y9=ge.align,q9="data-uncentered";var BE={};me(BE,{active:()=>X9});var X9="data-active";var HE={};me(HE,{popupOpen:()=>J9});var J9=At.popupOpen;var Ls={};me(Ls,{Decrement:()=>HB,Group:()=>OB,Increment:()=>LB,Input:()=>GB,Root:()=>NB,ScrubArea:()=>zB,ScrubAreaCursor:()=>KB});var or=T(D(),1);var Ox=T(D(),1),GE=Ox.createContext(void 0);function Ii(){let e=Ox.useContext(GE);if(e===void 0)throw new Error(_e(43));return e}var is={inputValue:()=>null,value:()=>null,...Ut};var Z9="\u96F6\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",Q9=/[٠-٩۰-۹0-9]/g,eQ=/[零〇一二三四五六七八九]/g,vB=["%","\u066A","\uFF05","\uFE6A"],wB=["\u2030","\u0609"],tQ="\uFF0E",oQ="\uFF0C",nQ=/[%٪%﹪]/,rQ=/[‰؉]/,sQ=/[%٪%﹪]/g,iQ=/[‰؉]/g,aQ=/[٠-٩۰-۹]/,lQ=/[零〇一二三四五六七八九]/,cQ=/[0-9٠-٩۰-۹0-9零〇一二三四五六七八九]/;function UE(e){return cQ.test(e)}var PB=[".",",",tQ,oQ,"\u066B","\u066C"],EB=/\p{Zs}/u,TB=/\p{Cf}/u,uQ=/\p{Cf}/gu,IB=["+","\uFF0B","\uFE62"],MB=["-","\u2212","\uFF0D","\u2012","\u2013","\u2014","\uFE63"],Tf=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");function SB(e,t){let[o,n="0"]=String(e).split("e");return+`${o}e${Number(n)+t}`}var WE=/[-−-‒–—﹣]/gu,jE=/[++﹢]/gu,Fx=/[-−-‒–—﹣]/,zE=/[++﹢]/,pQ=11111.1;function $E(e,t){return wc(e,t).formatToParts(pQ)}function If(e,t){let o=$E(e,t),n={};o.forEach(s=>{n[s.type]=s.value});let r=".";return wc(e).formatToParts(.1).forEach(s=>{s.type==="decimal"&&(r=s.value)}),{...n,decimal:r}}function Ra(e,t,o){let n=e.replace(uQ,"").trim();n=n.replace(WE,"-").replace(jE,"+");let r=!1,s=(v,P)=>(P==="-"&&(r=!0),"");n=n.replace(/([+-])\s*$/,s).replace(/^\s*([+-])/,s);let i=t;i===void 0&&(aQ.test(n)?i="ar":lQ.test(n)&&(i="zh"));let{group:a,decimal:l,currency:c,exponentSeparator:u}=If(i,o),p=wc(i,o).formatToParts(1).filter(v=>v.type==="unit").map(v=>Tf(v.value)),d=p.length?new RegExp(p.join("|"),"g"):null,m=null;a&&(/\p{Zs}/u.test(a)?m=/\p{Zs}/gu:a==="'"||a==="\u2019"?m=/['’]/g:m=new RegExp(Tf(a),"g"));let R=[[m,""],[new RegExp(Tf(l),"g"),"."],[/[.٫]/g,"."],[/[,٬]/g,""],[c?new RegExp(Tf(c),"g"):null,""],[d,""],[sQ,""],[iQ,""],[u?new RegExp(Tf(u),"g"):null,"e"],[Q9,v=>String(v.charCodeAt(0)%16)],[eQ,v=>String(Math.max(Z9.indexOf(v)-1,0))]].reduce((v,[P,N])=>P?v.replace(P,N):v,n),b=R.lastIndexOf(".");if(b!==-1&&(R=`${R.slice(0,b).replace(/\./g,"")}.${R.slice(b+1).replace(/\./g,"")}`),/^[-+]?Infinity$/i.test(n)||n.includes("\u221E"))return null;let x=(r?"-":"")+R,h=parseFloat(x),C=o?.style,y=C==="unit"&&o?.unit==="percent",S=nQ.test(e)||C==="percent";return rQ.test(e)?h=SB(h,-3):!y&&S&&(h=SB(h,-2)),Number.isFinite(h)?h:null}var dQ=1e-10,fQ=1e-10;function _x(e){return e?.maximumFractionDigits!=null||e?.minimumFractionDigits!=null||e?.maximumSignificantDigits!=null||e?.minimumSignificantDigits!=null||e?.roundingIncrement!=null||e?.roundingMode!=null||e?.roundingPriority!=null}function KE(e,t){if(!Number.isFinite(e))return e;if(!_x(t)){let s=parseFloat(e.toPrecision(15)),i=Math.abs(s-e),a=Math.min(Number.EPSILON*Math.max(1,Math.abs(e)),fQ);return i<=a?s:e}let o=wc("en-US",{...t,signDisplay:"auto",currencySign:"standard",notation:t.notation==="compact"?"standard":t.notation,useGrouping:!1}),n=o.format(e),r=Ra(n,"en-US",t);return r===null?e:o.format(r)===n?r:e}function mQ(e,t,o,n){let r=Math.abs(o),s=Math.sign(o),i=r*dQ*s,a=e-t+i;if(n)return t+Math.round(a/o)*o;let l=s>0?Math.floor(a/r):Math.ceil(a/r);return t+l*r}function DB(e,t,o,n,r,s,i,a,l){if(e===null)return e;let c=e;if(t!=null&&i&&t!==0){let p=a||o===Number.MIN_SAFE_INTEGER?r:o;c=mQ(c,p,t,a)}if(l&&(c=Ct(c,o,n)),t==null&&!_x(s))return c;let u=KE(c,s);return l?Ct(u,o,n):u}var NB=or.forwardRef(function(t,o){let{id:n,min:r,max:s,smallStep:i=.1,step:a=1,largeStep:l=10,required:c=!1,disabled:u=!1,readOnly:p=!1,form:d,name:m,defaultValue:g=null,value:R,onValueChange:b,onValueCommitted:x,allowWheelScrub:h=!1,snapOnStep:C=!1,allowOutOfRange:y=!1,format:S,locale:w,render:v,className:P,inputRef:N,style:E,...M}=t,{setDirty:W,validityData:I,disabled:O,setFilled:F,name:k,state:U,validation:_}=ht(),{clearErrors:B}=eo(),L=O||u,V=k??m,A=a==="any"?1:a,[K,H]=or.useState(!1),G=r??Number.MIN_SAFE_INTEGER,oe=s??Number.MAX_SAFE_INTEGER,ee=r??0,X=S?.style,te=or.useRef(null),ce=Wt(N,_.inputRef),le=Ao({id:n}),[Q,ne]=_t({controlled:R,default:g,name:"NumberField",state:"value"}),Y=Tt(Q);J(()=>{F(Q!==null)},[F,Q]);let ae=Fa(),Z=Tt(S),ue=or.useRef(!1),Te=q((Ie,Me)=>{ue.current=!1,x?.(Ie,Me)}),fe=or.useRef(!0),ve=or.useRef(null),[z,Re]=or.useState(()=>wn(Q,w,S)),[xe,Pe]=or.useState("numeric"),ie=q(()=>{let Ie=$E(w,S),Me=new Set(PB),We=je=>je.forEach(Qe=>Me.add(Qe)),Ue=Ie.find(je=>je.type==="decimal")?.value??If(w,S).decimal;Me.add(Ue),Ie.forEach(je=>{je.type==="integer"||je.type==="fraction"||je.type==="exponentInteger"||je.type==="compact"||(We(Array.from(je.value)),EB.test(je.value)&&Me.add(" "))});let ze=X==="percent"||X==="unit"&&S?.unit==="percent",He=X==="percent"||X==="unit"&&S?.unit==="permille";return ze&&We(vB),He&&We(wB),We(IB),(G<0||y)&&We(MB),Me}),re=q(Ie=>Ie?.altKey?i:Ie?.shiftKey?l:A),Ee=q((Ie,Me)=>{let We=Me.event,Ue=Me.direction,ze=Me.reason.startsWith("input-")||Me.reason===$.none,He=!y||!ze,je=DB(Ie,Ue?re(We)*Ue:void 0,G,oe,ee,Z.current,C,We?.altKey??!1,He),Qe=je!==Q||ze&&(Ie!==Q||fe.current===!1);if(Qe){if(b?.(je,Me),Me.isCanceled)return!1;ne(je),W(je!==I.initialValue),ue.current=!0}return ve.current=je,fe.current&&Re(wn(je,w,S)),ae(),Qe}),ye=q((Ie,{direction:Me,currentValue:We,event:Ue,reason:ze})=>{let He=We??Y.current,je=Ue;return typeof He!="number"?Ee(0,Ce(ze,je)):Ee(He+Ie*Me,Ce(ze,je,void 0,{direction:Me}))});J(function(){if(!fe.current)return;let Me=wn(Q,w,S);Me!==z&&Re(Me)}),J(function(){if(!Rt.os.ios)return;let Me="text";G>=0&&(Me="decimal"),Pe(Me)},[G]);let se=q(()=>{let Ie=te.current;if(!Ie)return;let Me=Ie.value.length;Ie.setSelectionRange(Me,Me),Ie.focus()});or.useEffect(function(){let Me=te.current;if(L||p||!h||!Me)return;function We(Ue){if(Ue.ctrlKey||ft(Be(te.current))!==te.current)return;let ze=Math.abs(Ue.deltaX)>Math.abs(Ue.deltaY),He=Ue.shiftKey&&ze?Ue.deltaX:Ue.deltaY;if(He===0||!Ue.shiftKey&&ze)return;Ue.preventDefault(),fe.current=!0;let je=re(Ue);ye(je,{direction:He>0?-1:1,event:Ue,reason:$.wheel})&&Te(ve.current,go($.wheel,Ue))}return qe(Me,"wheel",We)},[h,ye,L,p,re,Te,ve,Y]);let Fe=or.useMemo(()=>({...U,disabled:L,readOnly:p,required:c,value:Q,inputValue:z,scrubbing:K}),[U,L,p,c,Q,z,K]),ke=or.useMemo(()=>({inputRef:te,focusInput:se,minWithDefault:G,maxWithDefault:oe,id:le,setValue:Ee,incrementValue:ye,getStepAmount:re,allowInputSyncRef:fe,formatOptionsRef:Z,valueRef:Y,lastChangedValueRef:ve,hasPendingCommitRef:ue,name:V,nameProp:m,inputMode:xe,getAllowedNonNumericKeys:ie,min:r,max:s,setInputValue:Re,locale:w,setIsScrubbing:H,state:Fe,onValueCommitted:Te}),[te,se,G,oe,le,Ee,ye,re,Z,Y,V,m,xe,ie,r,s,Re,w,Fe,Te]),de=j("div",t,{ref:o,state:Fe,props:M,stateAttributesMapping:is});return f(GE.Provider,{value:ke,children:[de,f("input",{..._.getValidationProps(L,{onFocus(){se()},onChange(Ie){if(Ie.nativeEvent.defaultPrevented||L||p)return;let Me=Ie.currentTarget.valueAsNumber,We=Number.isNaN(Me)?null:Me,Ue=Ce($.none,Ie.nativeEvent);Ee(We,Ue),B(V),_.change(ve.current??We)}}),ref:ce,type:"number",form:d,name:V,value:Q??"",min:r,max:s,step:a,disabled:L,readOnly:p,required:c,"aria-hidden":!0,tabIndex:-1,style:V?Xn:wo,suppressHydrationWarning:!0})]})});var AB=T(D(),1);var OB=AB.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t,{state:a}=Ii();return j("div",t,{ref:o,state:a,props:[{role:"group"},i],stateAttributesMapping:is})});var kB=T(D(),1);var as=T(D(),1);var FB=0,YE=class e extends Do{constructor(){super(...arguments);it(this,"clear",()=>{this.currentId!==FB&&(clearInterval(this.currentId),this.currentId=FB)})}static create(){return new e}start(o,n){this.clear(),this.currentId=setInterval(()=>{n()},o)}};function _B(){let e=gt(YE.create).current;return Xs(e.disposeEffect),e}var gQ=60,bQ=400,RQ=8,hQ=50,xQ=3;function ha(e){return e==="touch"||e==="pen"}function VB(e){let{disabled:t,tick:o,onStop:n,tickDelay:r=gQ,startDelay:s=bQ,scrollDistance:i=RQ,elementRef:a}=e,l=ct(),c=_B(),u=ct(),p=as.useRef(!1),d=as.useRef(0),m=as.useRef({x:0,y:0}),g=as.useRef(!1),R=as.useRef(!1),b=as.useRef(""),x=as.useRef(nt),h=as.useRef(nt),C=q(()=>{u.clear(),l.clear(),c.clear(),x.current(),d.current=0});function y(v){C();let P=a.current;if(!P)return;let N=rt(P);function E(M){M.preventDefault()}if(x.current=qe(N,"contextmenu",E),h.current(),h.current=qe(N,"pointerup",M=>{p.current=!1,C(),n?.(M)},{once:!0}),!o(v)){C();return}l.start(s,()=>{c.start(r,()=>{o(v)||C()})})}as.useEffect(()=>()=>{C(),h.current()},[C]),as.useEffect(()=>{t&&(p.current=!1,g.current=!1,b.current="",C())},[t,C]);let S={onTouchStart(){g.current=!0},onTouchEnd(){g.current=!1},onPointerDown(v){if(v.defaultPrevented||v.button||t)return;b.current=v.pointerType,R.current=!1,p.current=!0,m.current={x:v.clientX,y:v.clientY},ha(v.pointerType)?u.start(hQ,()=>{let N=d.current;d.current=0,p.current&&N<xQ?(y(v.nativeEvent),R.current=!0):(R.current=!1,C())}):(v.preventDefault(),y(v.nativeEvent))},onPointerUp(v){ha(v.pointerType)&&(p.current=!1)},onPointerMove(v){if(t||!ha(v.pointerType)||!p.current)return;d.current+=1;let{x:P,y:N}=m.current,E=P-v.clientX,M=N-v.clientY;E**2+M**2>i**2&&C()},onMouseEnter(v){v.defaultPrevented||t||!p.current||g.current||ha(b.current)||y(v.nativeEvent)},onMouseLeave(){g.current||C()},onMouseUp(){g.current||C()}},w=q(v=>v.defaultPrevented?!0:ha(b.current)?R.current:v.detail!==0);return{pointerHandlers:S,shouldSkipClick:w}}var CQ={WebkitUserSelect:"none",userSelect:"none"};function Vx(e,t,o){let{render:n,className:r,disabled:s=!1,nativeButton:i=!0,style:a,...l}=e,{allowInputSyncRef:c,formatOptionsRef:u,getStepAmount:p,id:d,incrementValue:m,inputRef:g,focusInput:R,maxWithDefault:b,minWithDefault:x,setValue:h,state:C,valueRef:y,locale:S,lastChangedValueRef:w,onValueCommitted:v}=Ii(),{disabled:P,readOnly:N,value:E,inputValue:M}=C,W=E!=null&&(o?E>=b:E<=x),I=s||P||W,O=o?$.incrementPress:$.decrementPress;function F(A){let K=!c.current;if(c.current=!0,!K){w.current=y.current;return}let H=Ra(M,S,u.current);if(H!==null){let G=Ce(O,A);h(H,G),G.isCanceled||(y.current=H)}}let{pointerHandlers:k,shouldSkipClick:U}=VB({disabled:I||N,elementRef:g,tick(A){let K=p(A);return m(K,{direction:o?1:-1,event:A,reason:O})},onStop(A){let K=w.current??y.current;v(K,go(O,A))}}),_={disabled:I,"aria-label":o?"Increase":"Decrease","aria-controls":d,tabIndex:-1,style:CQ,...k,onClick(A){let K=I||N;if(A.defaultPrevented||K||U(A))return;F(A.nativeEvent);let H=p(A),G=y.current;m(H,{direction:o?1:-1,event:A.nativeEvent,reason:O});let oe=w.current??y.current;oe!==G&&v(oe,go(O,A.nativeEvent))},onPointerDown(A){A.defaultPrevented||N||A.button||I||(F(A.nativeEvent),w.current=null,ha(A.pointerType)||R(),k.onPointerDown(A))}},{getButtonProps:B,buttonRef:L}=bt({disabled:I||N,native:i,focusableWhenDisabled:!0}),V={...C,disabled:I};return j("button",e,{ref:[t,L],state:V,props:[_,l,B],stateAttributesMapping:is})}var LB=kB.forwardRef(function(t,o){return Vx(t,o,!0)});var BB=T(D(),1);var HB=BB.forwardRef(function(t,o){return Vx(t,o,!1)});var Mf=T(D(),1);var yQ=new Set(["Backspace","Delete","ArrowLeft","ArrowRight","Tab","Enter","Escape"]),GB=Mf.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t,{allowInputSyncRef:a,formatOptionsRef:l,getAllowedNonNumericKeys:c,getStepAmount:u,id:p,incrementValue:d,inputMode:m,max:g,min:R,name:b,nameProp:x,setValue:h,state:C,setInputValue:y,locale:S,inputRef:w,onValueCommitted:v,lastChangedValueRef:P,hasPendingCommitRef:N,valueRef:E}=Ii(),{disabled:M,readOnly:W,required:I,value:O,inputValue:F}=C,{clearErrors:k}=eo(),{validationMode:U,setTouched:_,invalid:B,shouldValidateOnChange:L,validation:V}=ht(),{labelId:A}=Vt(),K=ln(M,w),H=Mf.useRef(!1),G=Mf.useRef(null);return an(w,p,O,void 0,!M,x),J(()=>{if(G.current!=null){let X=G.current;G.current=null,w.current?.setSelectionRange(X,X)}}),oo(O,()=>{if(k(b),H.current&&!L()){H.current=!1;return}V.change(O)}),j("input",t,{ref:[o,w],state:C,props:[{id:p,required:I,disabled:M,readOnly:W,inputMode:m,value:F,type:"text",autoComplete:"off",autoCorrect:"off",spellCheck:"false","aria-roledescription":"Number field","aria-invalid":!M&&B?!0:void 0,"aria-labelledby":A,suppressHydrationWarning:!0,onFocus(X){X.defaultPrevented||M||K(!0)},onBlur(X){if(X.defaultPrevented||M||(_(!0),K(!1),W))return;let te=!a.current,ce=N.current;if(a.current=!0,F.trim()===""){let ve=Ce($.inputClear,X.nativeEvent);if(h(null,ve),ve.isCanceled)return;U==="onBlur"&&V.commit(null),(te||ce||O!==null)&&v(null,go($.inputClear,X.nativeEvent));return}let le=l.current,Q=Ra(F,S,le);if(Q===null)return;let ne=_x(le),Y;!te&&!ne?Y=O:ne?Y=KE(Q,le):Y=Q;let ae=go($.inputBlur,X.nativeEvent),Z=O!==Y,ue=te||Z||ce,Te=Y;if(Z){let ve=Ce($.inputBlur,X.nativeEvent);if(H.current=!0,h(Y,ve),ve.isCanceled){H.current=!1;return}Te=P.current,Te===O&&(H.current=!1)}U==="onBlur"&&V.commit(Te),ue&&v(Te,ae);let fe=wn(Te,S,le);F!==fe&&y(fe)},onChange(X){if(X.nativeEvent.defaultPrevented)return;a.current=!1;let te=X.currentTarget.value;if(te.trim()===""){y(te),h(null,Ce($.inputClear,X.nativeEvent));return}let ce=c();if(!Array.from(te).every(ne=>UE(ne)||Fx.test(ne)||ce.has(ne)||TB.test(ne)))return;let Q=Ra(te,S,l.current);y(te),Q!==null&&h(Q,Ce($.inputChange,X.nativeEvent))},onKeyDown(X){if(X.defaultPrevented||W||M)return;let te=X.nativeEvent,ce=!a.current,le=c(),Q=le.has(X.key),{decimal:ne,currency:Y,percentSign:ae}=If(S,l.current),Z=X.currentTarget.selectionStart,ue=X.currentTarget.selectionEnd,Te=Z===0&&ue===F.length,fe=ye=>Z!=null&&ue!=null&&ye>=Z&&ye<ue;[[Fx,WE],[zE,jE]].forEach(([ye,se])=>{if(ye.test(X.key)&&Array.from(le).some(Fe=>ye.test(Fe))){let Fe=F.search(se),ke=Fe!==-1&&fe(Fe);Q=!(Fx.test(F)||zE.test(F))||Te||ke}}),[ne,Y,ae].forEach(ye=>{if(X.key===ye){let se=F.indexOf(ye),Fe=fe(se);Q=se===-1||Te||Fe}});let z=yQ.has(X.key),Re=X.key==="ArrowUp"||X.key==="ArrowDown";if(X.which===229||X.altKey&&!Re||X.ctrlKey||X.metaKey||Q||UE(X.key)||z)return;let xe=null;if(X.key==="Home"&&R!=null?xe=R:X.key==="End"&&g!=null&&(xe=g),X.key.length>1&&!Re&&xe===null)return;let Pe=ce?Ra(F,S,l.current):null,ie=u(X);X.preventDefault(),X.stopPropagation();let re=go($.keyboard,te),Ee=!1;(Re||xe!==null)&&(a.current=!0),Re?(ce||(P.current=E.current),Ee=d(ie,{direction:X.key==="ArrowUp"?1:-1,currentValue:Pe,event:te,reason:$.keyboard})):xe!==null&&(Ee=h(xe,Ce($.keyboard,te))),Ee&&v(P.current,re)},onPaste(X){if(X.defaultPrevented||W||M)return;let te="";try{te=X.clipboardData?.getData("text/plain")??""}catch{return}X.preventDefault();let ce=X.currentTarget,le=ce.selectionStart,Q=ce.selectionEnd,ne=F.slice(0,le)+te+F.slice(Q),Y=Ra(ne,S,l.current);Y!==null&&(a.current=!1,G.current=le+te.length,h(Y,Ce($.inputPaste,X.nativeEvent)),y(ne))}},i,X=>V.getValidationProps(M,X)],stateAttributesMapping:is})});var dn=T(D(),1),jB=T(on(),1);var kx=T(D(),1),qE=kx.createContext(void 0);function UB(){let e=kx.useContext(qE);if(e===void 0)throw new Error(_e(44));return e}function WB(e,t){let o=rt(t);if(e!=null){let r=t.getBoundingClientRect();return{left:r.left-e/2,top:r.top-e/2,right:r.right+e/2,bottom:r.bottom+e/2}}let n=o.visualViewport;return n?{left:n.offsetLeft,top:n.offsetTop,right:n.offsetLeft+n.width,bottom:n.offsetTop+n.height}:{left:0,top:0,right:o.document.documentElement.clientWidth,bottom:o.document.documentElement.clientHeight}}var SQ={touchAction:"none",WebkitUserSelect:"none",userSelect:"none"},zB=dn.forwardRef(function(t,o){let{render:n,className:r,direction:s="horizontal",pixelSensitivity:i=2,teleportDistance:a,style:l,...c}=t,{state:u,setIsScrubbing:p,inputRef:d,focusInput:m,incrementValue:g,allowInputSyncRef:R,getStepAmount:b,onValueCommitted:x,lastChangedValueRef:h,valueRef:C}=Ii(),{disabled:y,readOnly:S}=u,w=dn.useRef(null),v=dn.useRef(!1),P=dn.useRef(!1),N=dn.useRef(null),E=dn.useRef(!1),M=dn.useRef(null),W=dn.useRef({x:0,y:0}),I=ct(),O=ct(),[F,k]=dn.useState(!1),[U,_]=dn.useState(!1),[B,L]=dn.useState(!1);function V(ee,X,te){let ce=rt(ee).visualViewport?.scale??1;ee.style.transform=`translate3d(${X}px,${te}px,0) scale(${1/ce})`}let A=q(({movementX:ee,movementY:X})=>{let te=M.current,ce=w.current;if(!te||!ce)return;let le=WB(a,ce),Q=W.current,ne=(ae,Z,ue,Te)=>ae+Z<ue?Te-Z:ae+Z>Te?ue-Z:ae,Y={x:ne(Math.round(Q.x+ee),te.offsetWidth/2,le.left,le.right),y:ne(Math.round(Q.y+X),te.offsetHeight/2,le.top,le.bottom)};W.current=Y,V(te,Y.x,Y.y)}),K=q((ee,{clientX:X,clientY:te})=>{jB.flushSync(()=>{L(ee),p(ee)});let ce=M.current;if(!ce||!ee)return;let le={x:X-ce.offsetWidth/2,y:te-ce.offsetHeight/2};W.current=le,V(ce,le.x,le.y)});dn.useEffect(function(){if(!d.current||y||S||!B)return;let X=0;function te(ne){function Y(){try{Be(w.current).exitPointerLock()}catch{}finally{v.current=!1,K(!1,ne),x(h.current??C.current,go($.scrub,ne));let ae=N.current,Z=d.current;if(!P.current&&ae!=null&&Z){let ue=rt(Z).MouseEvent;O.start(0,()=>{E.current||ae.dispatchEvent(new ue("click",{bubbles:!0,cancelable:!0}))})}P.current=!1,N.current=null}}Rt.engine.gecko?I.start(20,Y):Y()}function ce(ne){if(!v.current)return;ne.preventDefault(),A(ne);let{movementX:Y,movementY:ae}=ne;if(X+=s==="vertical"?ae:Y,Math.abs(X)>=i){X=0,P.current=!0;let Z=s==="vertical"?-ae:Y,ue=b(ne),Te=Z*ue;Te!==0&&(R.current=!0,g(Math.abs(Te),{direction:Te>=0?1:-1,event:ne,reason:$.scrub}))}}let le=rt(d.current),Q=Wo(qe(le,"pointerup",te,!0),qe(le,"pointermove",ce,!0));return()=>{I.clear(),Q()}},[y,S,R,g,B,b,d,K,A,s,i,h,x,C,I,O]),dn.useEffect(()=>()=>{if(v.current){v.current=!1,p(!1);try{Be(w.current).exitPointerLock()}catch{}}},[p]),dn.useEffect(function(){let X=w.current;if(!X||y||S)return;function te(ce){ce.touches.length===1&&ce.preventDefault()}return qe(X,"touchstart",te)},[y,S]);let G=j("span",t,{ref:[o,w],state:u,props:[{role:"presentation",style:SQ,onClickCapture(){E.current=!0},async onPointerDown(ee){if(ee.defaultPrevented||S||ee.button||y)return;let X=ee.pointerType==="touch";if(k(X),ee.pointerType==="mouse"&&(ee.preventDefault(),m()),v.current=!0,P.current=!1,E.current=!1,O.clear(),N.current=Je(ee.nativeEvent),K(!0,ee.nativeEvent),!X&&!Rt.engine.webkit)try{await Be(w.current).body.requestPointerLock(),_(!1)}catch{_(!0)}finally{v.current&&K(!0,ee.nativeEvent)}}},c],stateAttributesMapping:is}),oe=dn.useMemo(()=>({isScrubbing:B,isTouchInput:F,isPointerLockDenied:U,scrubAreaCursorRef:M}),[B,F,U]);return f(qE.Provider,{value:oe,children:G})});var Lx=T(D(),1),$B=T(on(),1);var vQ={position:"fixed",top:0,left:0,pointerEvents:"none"},KB=Lx.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t,{state:a}=Ii(),{isScrubbing:l,isTouchInput:c,isPointerLockDenied:u,scrubAreaCursorRef:p}=UB(),[d,m]=Lx.useState(null),g=l&&!Rt.engine.webkit&&!c&&!u,R=j("span",t,{enabled:g,ref:[o,p,m],state:a,props:[{role:"presentation",style:vQ},i],stateAttributesMapping:is});return R&&$B.createPortal(R,Be(d).body)});var XE={};me(XE,{dirty:()=>NQ,disabled:()=>PQ,filled:()=>AQ,focused:()=>OQ,invalid:()=>MQ,readonly:()=>EQ,required:()=>TQ,scrubbing:()=>wQ,touched:()=>DQ,valid:()=>IQ});var wQ="data-scrubbing",PQ="data-disabled",EQ="data-readonly",TQ="data-required",IQ="data-valid",MQ="data-invalid",DQ="data-touched",NQ="data-dirty",AQ="data-filled",OQ="data-focused";var JE={};me(JE,{dirty:()=>GQ,disabled:()=>_Q,filled:()=>UQ,focused:()=>WQ,invalid:()=>BQ,readonly:()=>VQ,required:()=>kQ,scrubbing:()=>FQ,touched:()=>HQ,valid:()=>LQ});var FQ="data-scrubbing",_Q="data-disabled",VQ="data-readonly",kQ="data-required",LQ="data-valid",BQ="data-invalid",HQ="data-touched",GQ="data-dirty",UQ="data-filled",WQ="data-focused";var ZE={};me(ZE,{dirty:()=>JQ,disabled:()=>zQ,filled:()=>ZQ,focused:()=>QQ,invalid:()=>qQ,readonly:()=>$Q,required:()=>KQ,scrubbing:()=>jQ,touched:()=>XQ,valid:()=>YQ});var jQ="data-scrubbing",zQ="data-disabled",$Q="data-readonly",KQ="data-required",YQ="data-valid",qQ="data-invalid",XQ="data-touched",JQ="data-dirty",ZQ="data-filled",QQ="data-focused";var QE={};me(QE,{dirty:()=>a8,disabled:()=>t8,filled:()=>l8,focused:()=>c8,invalid:()=>s8,readonly:()=>o8,required:()=>n8,scrubbing:()=>e8,touched:()=>i8,valid:()=>r8});var e8="data-scrubbing",t8="data-disabled",o8="data-readonly",n8="data-required",r8="data-valid",s8="data-invalid",i8="data-touched",a8="data-dirty",l8="data-filled",c8="data-focused";var eT={};me(eT,{dirty:()=>R8,disabled:()=>p8,filled:()=>h8,focused:()=>x8,invalid:()=>g8,readonly:()=>d8,required:()=>f8,scrubbing:()=>u8,touched:()=>b8,valid:()=>m8});var u8="data-scrubbing",p8="data-disabled",d8="data-readonly",f8="data-required",m8="data-valid",g8="data-invalid",b8="data-touched",R8="data-dirty",h8="data-filled",x8="data-focused";var tT={};me(tT,{dirty:()=>T8,disabled:()=>y8,filled:()=>I8,focused:()=>M8,invalid:()=>P8,readonly:()=>S8,required:()=>v8,scrubbing:()=>C8,touched:()=>E8,valid:()=>w8});var C8="data-scrubbing",y8="data-disabled",S8="data-readonly",v8="data-required",w8="data-valid",P8="data-invalid",E8="data-touched",T8="data-dirty",I8="data-filled",M8="data-focused";var oT={};me(oT,{dirty:()=>k8,disabled:()=>N8,filled:()=>L8,focused:()=>B8,invalid:()=>_8,readonly:()=>A8,required:()=>O8,scrubbing:()=>D8,touched:()=>V8,valid:()=>F8});var D8="data-scrubbing",N8="data-disabled",A8="data-readonly",O8="data-required",F8="data-valid",_8="data-invalid",V8="data-touched",k8="data-dirty",L8="data-filled",B8="data-focused";var Ic={};me(Ic,{Input:()=>tH,Root:()=>eH,Separator:()=>rs});var Pn=T(D(),1);var Bx=T(D(),1),nT=Bx.createContext(void 0);function YB(){let e=Bx.useContext(nT);if(e===void 0)throw new Error(_e(98));return e}function qB(e,t,o){return{...e,value:t,index:o,filled:t!==""}}var XB={value:()=>null,length:()=>null,...Ut},JB={value:()=>null,index:()=>null,...Ut};var H8={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 rT(e){return e==="none"?null:H8[e]}function G8(e){return(e??"").replace(/\s/g,"")}function ZB(e,t){return t?e.replace(t.regexp,""):e}function Nf(e,t,o,n){let r=G8(e),s=rT(o),i=ZB(r,s),a=r.length>i.length;if(n){let u=n(i);a||(a=i.length>u.length),i=ZB(u,s),a||(a=u.length>i.length)}let l=t<0?0:t,c=Array.from(i);return[c.slice(0,l).join(""),a||c.length>l]}function Df(e,t,o,n){return Nf(e,t,o,n)[0]}function QB(e,t,o,n,r,s){let i=Df(o,n,r,s),a=e.slice(0,t),l=e.slice(t+i.length);return Df(`${a}${i}${l}`,n,r,s)}function Hx(e,t){return t<0||t>=e.length?e:`${e.slice(0,t)}${e.slice(t+1)}`}var eH=Pn.forwardRef(function(t,o){let{"aria-describedby":n,"aria-labelledby":r,id:s,autoComplete:i="one-time-code",defaultValue:a="",value:l,onValueChange:c,onValueComplete:u,form:p,length:d,autoSubmit:m=!1,mask:g=!1,inputMode:R,validationType:b="numeric",normalizeValue:x,disabled:h=!1,readOnly:C=!1,required:y=!1,name:S,onValueInvalid:w,render:v,className:P,style:N,...E}=t,{setDirty:M,validityData:W,disabled:I,setFilled:O,invalid:F,name:k,state:U,validation:_,validationMode:B,setFocused:L,setTouched:V}=ht(),{clearErrors:A}=eo(),{getDescriptionProps:K,labelId:H}=Vt(),G=I||h,oe=k??S,[ee,X]=_t({controlled:l,default:a,name:"OTPField",state:"value"}),te=Pn.useRef(null),ce=Pn.useRef([]),le=Pn.useRef(null),Q=Pn.useRef(null),ne=Pn.useMemo(()=>({get current(){return ce.current[0]??null}}),[]),Y=Ao({id:s}),ae=il(r,H,ne,!0,Y),Z=r==null?ae:void 0,ue=K({}),Te=U8(n,ue["aria-describedby"]),fe=rT(b),ve=fe?.slotPattern,z=fe?.getRootPattern(d),Re=R??fe?.inputMode,xe=Number.isInteger(d)&&d>0,Pe=Df(ee,d,b,x),ie=Tt(Pe),re=Pe!=="",[Ee,ye]=Pn.useState(0),[se,Fe]=Pn.useState(()=>Math.min(Pe.length,d-1)),[ke,de]=Pn.useState(!1),Ie=ke?Math.min(se,Math.max(d-1,0)):Math.min(Pe.length,d-1);J(()=>{O(re)},[re,O]),an(ne,Y,Pe,void 0,!G,S);let Me=q(be=>{let Le=Math.min(Math.max(be,0),Math.max(ce.current.length-1,0)),pe=ce.current[Le];pe?.focus(),pe?.select()}),We=q((be,Le)=>{le.current={index:be,value:Le}});function Ue(){let be=_.inputRef.current?.form??ce.current[0]?.form??null;if(p){let Le=Be(te.current).getElementById(p);Le?.tagName==="FORM"&&(be=Le)}be&&typeof be.requestSubmit=="function"&&be.requestSubmit()}function ze(be,Le){u?.(be,Le),m&&Ue()}oo(Pe,()=>{A(oe),M(Pe!==W.initialValue),_.change(Pe);let be=le.current;be!=null&&(le.current=null,be.value===Pe&&Me(be.index));let Le=Q.current;Le!=null&&(Q.current=null,Le.value===Pe&&ze(Pe,Le.eventDetails))});let He=q((be,Le)=>{let pe=Df(be,d,b,x),we=(Le.reason===$.inputChange||Le.reason===$.inputPaste)&&pe.length===d&&(ie.current.length!==d||Le.reason===$.inputPaste)?go(Le.reason,Le.event):null;return pe===ie.current?(we!=null&&ze(pe,we),null):(c?.(pe,Le),Le.isCanceled?null:(X(pe),we!=null?Q.current={value:pe,eventDetails:we}:pe.length!==d&&(Q.current=null),pe))}),je=q((be,Le)=>{w?.(be,Le)}),Qe=q((be,Le)=>{if(be>ie.current.length){Me(Math.min(ie.current.length,d-1));return}Fe(be),Le.currentTarget.select()}),et=q(be=>{Ne(te.current,be.relatedTarget)||(V(!0),de(!1),L(!1),B==="onBlur"&&_.commit(ie.current))}),ut=Pn.useCallback(be=>{if(Y!=null)return be===0?Y:`${Y}-${be+1}`},[Y]),vt=Pn.useMemo(()=>({...U,complete:Pe.length===d,disabled:G,filled:re,focused:ke,length:d,readOnly:C,required:y,value:Pe}),[G,U,re,ke,d,C,y,Pe]),De=Pn.useMemo(()=>({autoComplete:i,activeIndex:Ie,disabled:G,form:p,focusInput:Me,queueFocusInput:We,getInputId:ut,handleInputBlur:et,handleInputFocus:Qe,inputMode:Re,inputAriaLabelledBy:Z,invalid:F,length:d,mask:g,pattern:ve,reportValueInvalid:je,readOnly:C,required:y,normalizeValue:x,setValue:He,setFocused:de,state:vt,validationType:b,value:Pe}),[Ie,i,G,Me,p,ut,et,Qe,Re,Z,F,d,g,ve,We,C,je,y,x,He,de,vt,b,Pe]),he=j("div",t,{ref:[o,te],state:vt,props:[{role:"group","aria-describedby":Te,"aria-labelledby":ae},E],stateAttributesMapping:XB});return f(Cn,{elementsRef:ce,onMapChange:be=>{ye(be.size)},children:f(nT.Provider,{value:De,children:[he,xe&&f("input",{..._.getValidationProps(G,{onFocus(){Me(0)},onChange(be){if(be.nativeEvent.defaultPrevented||G||C)return;let Le=be.currentTarget.value,[pe,Ae]=Nf(Le,d,b,x);Ae&&je(Le,go($.inputChange,be.nativeEvent));let we=He(pe,Ce($.inputChange,be.nativeEvent));we!=null&&we!==""&&We(we.length-1,we)}}),ref:_.inputRef,type:"text",id:Y&&oe==null?`${Y}-hidden-input`:void 0,form:p,name:oe,value:Pe,autoComplete:i,inputMode:Re,minLength:d,maxLength:d,pattern:z,disabled:G,readOnly:C,required:y,"aria-hidden":!0,tabIndex:-1,style:oe?Xn:wo})]})})});function U8(...e){let t=e.flatMap(o=>o?.split(/\s+/).filter(Boolean)??[]);return t.length>0?Array.from(new Set(t)).join(" "):void 0}var Tc=T(D(),1);var tH=Tc.forwardRef(function(t,o){let{"aria-label":n,"aria-labelledby":r,render:s,className:i,style:a,...l}=t,{activeIndex:c,autoComplete:u,disabled:p,form:d,focusInput:m,queueFocusInput:g,getInputId:R,handleInputBlur:b,handleInputFocus:x,inputMode:h,inputAriaLabelledBy:C,invalid:y,length:S,mask:w,pattern:v,reportValueInvalid:P,readOnly:N,required:E,normalizeValue:M,setFocused:W,setValue:I,state:O,validationType:F,value:k}=YB(),{ref:U,index:_}=bo({guess:!0}),B=Tc.useRef(null),L=ln(p,B,W),V=kt(),[A,K]=Tc.useState(null),H=k[_]??"",G=qB(O,H,_),oe=n,ee=r??C,X=_===0?void 0:oe;function te(Q,ne,Y){let[ae,Z]=Nf(Q,S,F,M);if(Z&&P(Q,go(ne,Y.nativeEvent)),ae===""){ne===$.inputChange&&(Q===""?I(Hx(k,_),Ce($.inputClear,Y.nativeEvent)):H!==""&&(Y.currentTarget.value=H,Y.currentTarget.select()));return}let ue=I(QB(k,_,ae,S,F,M),Ce(ne,Y.nativeEvent));ue!=null&&g(Math.min(_+ae.length,S-1),ue)}let ce={id:R(_),value:A??H,type:w?"password":"text",inputMode:h,autoComplete:_===0?u:"off",autoCorrect:"off",spellCheck:"false",enterKeyHint:_===S-1?"done":"next",maxLength:_===0?S:void 0,tabIndex:c===_?0:-1,disabled:p,form:d,pattern:v,readOnly:N,required:E,"aria-labelledby":X==null?ee:void 0,"aria-invalid":!p&&y?!0:void 0,"aria-label":X,onMouseDown(Q){Q.defaultPrevented||p||(Q.preventDefault(),m(_))},onFocus(Q){Q.defaultPrevented||p||(L(!0),x(_,Q))},onBlur(Q){Q.defaultPrevented||b(Q)},onCompositionStart(){Rt.os.android||K(H)},onCompositionEnd(Q){A!=null&&(K(null),!p&&!N&&te(Q.currentTarget.value,$.inputChange,Q))},onChange(Q){if(!(Q.defaultPrevented||p||N)){if(A!=null){K(Q.currentTarget.value);return}te(Q.currentTarget.value,$.inputChange,Q)}},onKeyDown(Q){if(Q.defaultPrevented||p||A!=null)return;let ne=0,Y=Math.max(S-1,ne),ae=Math.min(k.length,Y),Z=(Q.ctrlKey||Q.metaKey)&&!Q.altKey,ue=V==="rtl",Te=ue?"ArrowRight":"ArrowLeft",fe=ue?"ArrowLeft":"ArrowRight";if(Q.key===Te){St(Q),m(Z?ne:Math.max(ne,_-1));return}if(Q.key===fe){St(Q),m(Z?ae:Math.min(Y,_+1));return}if(Q.key==="Home"||Q.key==="ArrowUp"){St(Q),m(ne);return}if(Q.key==="End"||Q.key==="ArrowDown"){St(Q),m(ae);return}if(N)return;function ve(xe,Pe){let ie=I(xe,Ce($.keyboard,Q.nativeEvent));ie!=null&&g(Pe,ie)}if(Q.key==="Backspace"&&Z){St(Q),ve("",ne);return}if(Q.key==="Delete"){St(Q),ve(Hx(k,_),_);return}let z=Q.currentTarget.value,Re=Q.currentTarget.selectionStart===0&&Q.currentTarget.selectionEnd===z.length;if(Q.key.length===1&&Re&&H===Q.key){St(Q),_<S-1&&m(_+1);return}if(Q.key==="Backspace"){St(Q);let xe=Math.max(ne,_-1);ve(Hx(k,H===""?xe:_),xe)}},onPaste(Q){if(Q.defaultPrevented||p||N)return;let ne="";try{ne=Q.clipboardData?.getData("text/plain")??""}catch{return}Q.preventDefault(),te(ne,$.inputPaste,Q)}};return j("input",t,{ref:[o,U,B],state:G,props:[ce,l],stateAttributesMapping:JB})});var sT={};me(sT,{complete:()=>W8,dirty:()=>X8,disabled:()=>j8,filled:()=>J8,focused:()=>Z8,invalid:()=>Y8,readonly:()=>z8,required:()=>$8,touched:()=>q8,valid:()=>K8});var W8="data-complete",j8="data-disabled",z8="data-readonly",$8="data-required",K8="data-valid",Y8="data-invalid",q8="data-touched",X8="data-dirty",J8="data-filled",Z8="data-focused";var iT={};me(iT,{complete:()=>Q8,dirty:()=>aee,disabled:()=>tee,filled:()=>eee,focused:()=>lee,invalid:()=>see,readonly:()=>oee,required:()=>nee,touched:()=>iee,valid:()=>ree});var Q8="data-complete",eee="data-filled",tee="data-disabled",oee="data-readonly",nee="data-required",ree="data-valid",see="data-invalid",iee="data-touched",aee="data-dirty",lee="data-focused";var Wn={};me(Wn,{Arrow:()=>CH,Backdrop:()=>SH,Close:()=>IH,Description:()=>EH,Handle:()=>_f,Popup:()=>hH,Portal:()=>dH,Positioner:()=>mH,Root:()=>lH,Title:()=>wH,Trigger:()=>cH,Viewport:()=>DH,createHandle:()=>NH});var Of=T(D(),1);var Gx=T(D(),1),aT=Gx.createContext(void 0);function zo(e){let t=Gx.useContext(aT);if(t===void 0&&!e)throw new Error(_e(47));return t}var Af=T(D(),1),oH=T(on(),1);var nH={...cr,disabled:e=>e.disabled,instantType:e=>e.instantType==="trigger-change"&&!cr.open(e)?void 0:e.instantType,openMethod:e=>e.openMethod,openChangeReason:e=>e.openChangeReason,isPressOpenedByTrigger:(e,t)=>e.openChangeReason===$.triggerPress&&cr.isOpenedByTrigger(e,t),isTouchPressOpen:(e,t)=>t&&e.openMethod==="touch"&&e.openChangeReason===$.triggerPress,hasTriggerFocusGuards:(e,t)=>cr.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},Ux=class extends No{constructor(o,n,r){let s=new qo;super(sH(o,s,n,r),iH(s),nH);it(this,"setOpen",(o,n)=>{let r=n.reason===$.triggerHover,s=n.reason===$.triggerPress&&n.event.detail===0,i=!o&&(n.reason===$.escapeKey||n.reason==null),a=Es(n),l=this.select("activeTriggerId");if(!o&&n.reason===$.closePress&&n.trigger==null&&l!=null&&(n.trigger=this.context.triggerElements.getById(l)??this.select("activeTriggerElement")??void 0),this.context.onOpenChange?.(o,n),n.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(o,n);let c=()=>{let p=tc(this.state,o,n.trigger,a());p.openChangeReason=n.reason,this.update(p)};r?(this.context.stickIfOpen=!0,this.context.stickIfOpenTimeout.start(500,()=>{this.context.stickIfOpen=!1}),oH.flushSync(c)):c();let u;s?u="click":i?u="dismiss":n.reason===$.focusOut&&(u="focus"),this.set("instantType",u)})}};function rH(){let e=new qo,t=new Qr(Object.freeze(sH(void 0,e)),Object.freeze(iH(e)),nH);return Object.assign(t,{setOpen:nt})}function sH(e,t,o,n=!1){let r={...pi(t,o,n),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 r.open&&e?.mounted===void 0&&(r.mounted=!0),r}function iH(e){return{popupRef:Af.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:Af.createRef(),beforeTriggerFocusGuardRef:Af.createRef(),beforeContentFocusGuardRef:Af.createRef(),stickIfOpenTimeout:new Do,stickIfOpen:!0,triggerElements:e}}var aH=Ts(function({props:t}){let{children:o,open:n,defaultOpen:r=!1,onOpenChange:s,onOpenChangeComplete:i,modal:a=!1,handle:l,triggerId:c,defaultTriggerId:u=null}=t,p=cee(l,{modal:a,open:r,openProp:n,activeTriggerId:u,triggerIdProp:c});p.useControlledProp("openProp",n),p.useControlledProp("triggerIdProp",c);let d=p.useState("open"),m=p.useState("mounted"),g=p.useState("payload");p.useContextCallback("onOpenChange",s),p.useContextCallback("onOpenChangeComplete",i),Hg(p,d),ii(p);let{forceUnmount:R}=ai(d,p,()=>{p.context.stickIfOpen=!0,p.set("openChangeReason",null)});p.useSyncedValues({modal:a}),Of.useEffect(()=>{d||p.context.stickIfOpenTimeout.clear()},[p,d]),Of.useImperativeHandle(t.actionsRef,()=>({unmount:R,close:()=>p.setOpen(!1,Ce($.imperativeAction))}),[R,p]);let b=d||m||l!=null;return f(aT.Provider,{value:p,children:[l&&f(ri,{handle:l,store:p}),b&&f(uee,{store:p,modal:a}),typeof o=="function"?o({payload:g}):o]})});function lH(e){return zo(!0)?f(aH,{props:e}):f(Ps,{children:f(aH,{props:e})})}function cee(e,t){let o=qa((n,r)=>new Ux(t,n,r));return Of.useEffect(()=>o.context.stickIfOpenTimeout.disposeEffect(),[o]),o}function uee({store:e,modal:t}){let o=e.useState("floatingRootContext"),n=Vn(o,{outsidePressEvent:{mouse:t==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}}),r=n.reference,s=n.floating;return li(e,{activeTriggerProps:r,inactiveTriggerProps:r,popupProps:s}),null}var Ff=T(D(),1);var cH=ci(function(t,o){let{render:n,className:r,style:s,disabled:i=!1,nativeButton:a=!0,handle:l,payload:c,openOnHover:u=!1,delay:p=300,closeDelay:d=0,id:m,...g}=t,R=zo(!0),x=di(l)??R;if(!x)throw new Error(_e(74));let h=Ye(m),C=x.useState("isTriggerActive",h),y=x.useState("floatingRootContext"),S=x.useState("isOpenedByTrigger",h),w=x.useState("triggerPopupId",h),v=Ff.useRef(null),{registerTrigger:P,isMountedByThisTrigger:N}=si(h,v,x,{payload:c,disabled:i,openOnHover:u,closeDelay:d}),E=x.useState("isPressOpenedByTrigger",h),M=x.useState("isTouchPressOpen",u),W=x.useState("hasTriggerFocusGuards",h),I=Hr(y,{enabled:!i&&u&&!M,mouseOnly:!0,move:!1,handleClose:Gr(),restMs:p,delay:{close:d},triggerElementRef:v,isActiveTrigger:C,isClosing:()=>x.select("transitionStatus")==="ending"}),O=q(()=>x.context.stickIfOpen),F=_n(y,{stickIfOpen:O}),k=Gd(()=>x.select("open"),oe=>{x.set("openMethod",oe)}),U=x.useState("triggerProps",N),{getButtonProps:_,buttonRef:B}=bt({disabled:i,native:a}),L={open(oe){return E?Or.open(oe):qn.open(oe)}},{handlePreFocusGuardFocus:V,handleFocusTargetFocus:A}=ph(x,v),H=j("button",t,{state:{disabled:i,open:S},ref:[B,o,P,v],props:[F.reference,I,U,k,{[pu]:"",id:h,"aria-haspopup":"dialog","aria-expanded":S,"aria-controls":w},g,_],stateAttributesMapping:L}),G=f(Ff.Fragment,{children:H},h);return W?f(Ff.Fragment,{children:[f(nn,{ref:x.context.beforeTriggerFocusGuardRef,onFocus:V}),G,f(nn,{ref:x.context.triggerFocusTargetRef,onFocus:A})]}):G});var pH=T(D(),1);var Wx=T(D(),1),lT=Wx.createContext(void 0);function uH(){let e=Wx.useContext(lT);if(e===void 0)throw new Error(_e(45));return e}var dH=pH.forwardRef(function(t,o){let{keepMounted:n=!1,...r}=t;return zo().useState("mounted")||n?f(lT.Provider,{value:n,children:f(Vr,{ref:o,...r})}):null});var fH=T(D(),1);var jx=T(D(),1),cT=jx.createContext(void 0);function Rp(){let e=jx.useContext(cT);if(!e)throw new Error(_e(46));return e}var mH=fH.forwardRef(function(t,o){let{render:n,className:r,style:s,anchor:i,positionMethod:a,side:l,align:c,sideOffset:u,alignOffset:p,collisionBoundary:d="clipping-ancestors",collisionPadding:m,arrowPadding:g,sticky:R,disableAnchorTracking:b=!1,collisionAvoidance:x=Xr,...h}=t,C=zo(),y=uH(),S=kr(),w=C.useState("floatingRootContext"),v=C.useState("mounted"),P=C.useState("open"),N=C.useState("openChangeReason"),E=C.useState("activeTriggerElement"),M=C.useState("modal"),W=C.useState("openMethod"),I=C.useState("positionerElement"),O=C.useState("instantType"),F=C.useState("transitionStatus"),k=C.useState("adaptiveOrigin"),U=wr({anchor:i,floatingRootContext:w,positionMethod:a,mounted:v,side:l,sideOffset:u,align:c,alignOffset:p,arrowPadding:g,collisionBoundary:d,collisionPadding:m,sticky:R,disableAnchorTracking:b,keepMounted:y,nodeId:S,collisionAvoidance:x,adaptiveOrigin:k}),_=w.useState("domReferenceElement");ZR({store:C,domReference:_,positionerElement:I,open:P});let B=M===!0&&N!==$.triggerHover;rl(P&&B,W==="touch",I,E);let L=C.useStateSetter("positionerElement"),V={open:P,side:U.side,align:U.align,anchorHidden:U.anchorHidden,instant:O},A=Qn(t,V,{styles:U.positionerStyles,transitionStatus:F,props:h,refs:[o,L],hidden:!v,inert:!P});return f(cT.Provider,{value:U,children:[v&&B&&f(gi,{inert:sn(!P),cutout:E}),f(Lr,{id:S,children:A})]})});var RH=T(D(),1);var El=T(D(),1);var uT=El.createContext(void 0);function gH(){let[e,t]=El.useState(0),o=q(()=>(t(r=>r+1),()=>{t(r=>Math.max(0,r-1))}));return{context:El.useMemo(()=>({register:o}),[o]),hasClosePart:e>0}}function bH(){let e=El.useContext(uT);J(()=>e?.register(),[e])}var hH=RH.forwardRef(function(t,o){let{render:n,className:r,style:s,initialFocus:i,finalFocus:a,...l}=t,c=zo(),u=Rp(),p=vn(!0)!=null,{context:d,hasClosePart:m}=gH(),g=c.useState("open"),R=c.useState("openMethod"),b=c.useState("instantType"),x=c.useState("transitionStatus"),h=c.useState("popupProps"),C=c.useState("titleElementId"),y=c.useState("descriptionElementId"),S=c.useState("modal"),w=c.useState("mounted"),v=c.useState("openChangeReason"),P=c.useState("activeTriggerElement"),N=c.useState("floatingRootContext"),E=N.useState("floatingId"),M=c.useState("disabled"),W=c.useState("openOnHover"),I=c.useState("closeDelay");It({open:g,ref:c.context.popupRef,onComplete(){g&&c.context.onOpenChangeComplete?.(!0)}}),Ms(N,{enabled:W&&!M,closeDelay:I});let O=i===void 0?Lg(c.context.popupRef):i,F=S!==!1&&m;c.useSyncedValue("focusManagerModal",F);let k=c.useStateSetter("popupElement"),U={open:g,side:u.side,align:u.align,instant:b,transitionStatus:x},_=j("div",t,{state:U,ref:[o,c.context.popupRef,k],props:[h,{id:E,role:"dialog",...Zn,"aria-labelledby":C,"aria-describedby":y,onKeyDown(B){p&&ur.has(B.key)&&B.stopPropagation()}},Sn(x),l],stateAttributesMapping:Ro});return f(Br,{context:N,openInteractionType:R,modal:F,disabled:!w||v===$.triggerHover,initialFocus:O,returnFocus:a,restoreFocus:"popup",getInsideElements:()=>[c.context.beforeTriggerFocusGuardRef.current],previousFocusableElement:st(P)?P:void 0,nextFocusableElement:c.context.triggerFocusTargetRef,beforeContentFocusGuardRef:c.context.beforeContentFocusGuardRef,children:f(uT.Provider,{value:d,children:_})})});var xH=T(D(),1);var CH=xH.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t,l=zo().useState("open"),{arrowRef:c,side:u,align:p,arrowUncentered:d,arrowStyles:m}=Rp();return j("div",t,{state:{open:l,side:u,align:p,uncentered:d},ref:[o,c],props:[{style:m,"aria-hidden":!0},i],stateAttributesMapping:lo})});var yH=T(D(),1);var SH=yH.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t,a=zo(),l=a.useState("open"),c=a.useState("mounted"),u=a.useState("transitionStatus"),p=a.useState("openChangeReason");return j("div",t,{state:{open:l,transitionStatus:u},ref:o,props:[{role:"presentation",hidden:!c,style:{pointerEvents:p===$.triggerHover?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},i],stateAttributesMapping:Ro})});var vH=T(D(),1);var wH=vH.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t,a=zo(),l=Ye(i.id);return a.useSyncedValueWithCleanup("titleElementId",l),j("h2",t,{ref:o,props:[{id:l},i]})});var PH=T(D(),1);var EH=PH.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t,a=zo(),l=Ye(i.id);return a.useSyncedValueWithCleanup("descriptionElementId",l),j("p",t,{ref:o,props:[{id:l},i]})});var TH=T(D(),1);var IH=TH.forwardRef(function(t,o){let{render:n,className:r,style:s,disabled:i=!1,nativeButton:a=!0,...l}=t,{buttonRef:c,getButtonProps:u}=bt({disabled:i,focusableWhenDisabled:!1,native:a}),p=zo();return bH(),j("button",t,{ref:[o,c],props:[{onClick(m){p.setOpen(!1,Ce($.closePress,m.nativeEvent))}},l,u]})});var MH=T(D(),1);var DH=MH.forwardRef(function(t,o){let{render:n,className:r,style:s,children:i,...a}=t,l=zo(),{side:c}=Rp(),u=l.useState("instantType"),{children:p,state:d}=Rl({store:l,side:c,children:i}),m={activationDirection:d.activationDirection,transitioning:d.transitioning,instant:u};return j("div",t,{state:m,ref:o,props:[a,{children:p}],stateAttributesMapping:bl})});var _f=class extends Jr{constructor(){super(rH(),"Popover")}open(t){this.openByTrigger(t)}close(){this.closePopup()}get isOpen(){return this.attachedStore?.select("open")??!1}};function NH(){return new _f}var pT={};me(pT,{disabled:()=>fee,popupOpen:()=>pee,pressed:()=>dee});var pee=At.popupOpen,dee=At.pressed,fee="data-disabled";var dT={};me(dT,{anchorHeight:()=>Ree,anchorWidth:()=>bee,availableHeight:()=>gee,availableWidth:()=>mee,positionerHeight:()=>Cee,positionerWidth:()=>xee,transformOrigin:()=>hee});var mee="--available-width",gee="--available-height",bee="--anchor-width",Ree="--anchor-height",hee="--transform-origin",xee="--positioner-width",Cee="--positioner-height";var fT={};me(fT,{align:()=>Pee,anchorHidden:()=>vee,closed:()=>See,open:()=>yee,side:()=>wee});var yee=ge.open,See=ge.closed,vee=ge.anchorHidden,wee=ge.side,Pee=ge.align;var mT={};me(mT,{popupHeight:()=>Tee,popupWidth:()=>Eee});var Eee="--popup-width",Tee="--popup-height";var gT={};me(gT,{align:()=>Oee,closed:()=>Mee,endingStyle:()=>Nee,instant:()=>Fee,open:()=>Iee,side:()=>Aee,startingStyle:()=>Dee});var Iee=ge.open,Mee=ge.closed,Dee=ge.startingStyle,Nee=ge.endingStyle,Aee=ge.side,Oee=ge.align,Fee="data-instant";var bT={};me(bT,{align:()=>Lee,closed:()=>Vee,open:()=>_ee,side:()=>kee,uncentered:()=>Bee});var _ee=ge.open,Vee=ge.closed,kee=ge.side,Lee=ge.align,Bee="data-uncentered";var RT={};me(RT,{closed:()=>Gee,endingStyle:()=>Wee,open:()=>Hee,startingStyle:()=>Uee});var Hee=ge.open,Gee=ge.closed,Uee=ge.startingStyle,Wee=ge.endingStyle;var hT={};me(hT,{popupHeight:()=>zee,popupWidth:()=>jee});var jee="--popup-width",zee="--popup-height";var xT={};me(xT,{activationDirection:()=>Yee,current:()=>$ee,instant:()=>Xee,previous:()=>Kee,transitioning:()=>qee});var $ee="data-current",Kee="data-previous",Yee="data-activation-direction",qee="data-transitioning",Xee="data-instant";var Er={};me(Er,{Arrow:()=>JH,Backdrop:()=>QH,Handle:()=>Vf,Popup:()=>qH,Portal:()=>WH,Positioner:()=>KH,Root:()=>BH,Trigger:()=>zH,Viewport:()=>t1,createHandle:()=>o1});var LH=T(D(),1);var zx=T(D(),1),CT=zx.createContext(void 0);function nr(e){let t=zx.useContext(CT);if(t===void 0&&!e)throw new Error(_e(50));return t}var AH=T(D(),1);var OH={...cr,instantType:e=>e.instantType,adaptiveOrigin:e=>e.adaptiveOrigin,closeDelay:e=>e.closeDelay},$x=class extends No{constructor(o,n,r){let s=new qo;super(_H(o,s,n,r),VH(s),OH);it(this,"setOpen",(o,n)=>{let{inlineRectCoordsRef:r}=this.context;Bg(this,o,n,{onBeforeDispatch(){let s=n.event;o&&n.reason===$.triggerHover&&n.trigger&&"clientX"in s&&"clientY"in s&&r.current?.element!==n.trigger&&Lv(r,n.trigger,s.clientX,s.clientY)}})})}};function FH(){let e=new qo;return new Qr(Object.freeze(_H(void 0,e)),Object.freeze(VH(e)),OH)}function _H(e,t,o,n=!1){return{...pi(t,o,n),instantType:void 0,adaptiveOrigin:void 0,closeDelay:300,...e}}function VH(e){return{popupRef:AH.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e,inlineRectCoordsRef:{current:void 0}}}function kH(e){let{open:t,defaultOpen:o=!1,onOpenChange:n,onOpenChangeComplete:r,actionsRef:s,handle:i,triggerId:a,defaultTriggerId:l=null,children:c}=e,u=qa((x,h)=>new $x({open:o,openProp:t,activeTriggerId:l,triggerIdProp:a},x,h));u.useControlledProp("openProp",t),u.useControlledProp("triggerIdProp",a),u.useContextCallback("onOpenChange",n),u.useContextCallback("onOpenChangeComplete",r);let p=u.useState("open"),d=u.useState("activeTriggerId"),m=u.useState("mounted"),g=u.useState("payload");ii(u,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:R}=ai(p,u,()=>{u.context.inlineRectCoordsRef.current=void 0});J(()=>{p&&d==null&&u.set("payload",void 0)},[u,d,p]),LH.useImperativeHandle(s,()=>({unmount:R,close:()=>u.setOpen(!1,Ce($.imperativeAction))}),[R,u]);let b=p||m||i!=null;return f(CT.Provider,{value:u,children:[i&&f(ri,{handle:i,store:u}),b&&f(Zee,{store:u}),typeof c=="function"?c({payload:g}):c]})}function Zee({store:e}){let t=e.useState("floatingRootContext"),o=Vn(t);return li(e,{activeTriggerProps:o.reference,inactiveTriggerProps:o.trigger,popupProps:o.floating}),null}var BH=Ts(function(t){return nr(!0)?f(kH,{...t}):f(Ps,{children:f(kH,{...t})})});var UH=T(D(),1);var Kx=T(D(),1),yT=Kx.createContext(void 0);function HH(){let e=Kx.useContext(yT);if(e===void 0)throw new Error(_e(48));return e}var Yx=T(D(),1),GH=T(on(),1);var hp=Yx.forwardRef(function(t,o){let{children:n,container:r,className:s,render:i,style:a,...l}=t,{node:c,subtree:u}=_g({container:r,ref:o,componentProps:t,elementProps:l});return!u&&!c?null:f(Yx.Fragment,{children:[u,c&&GH.createPortal(n,c)]})});var WH=UH.forwardRef(function(t,o){let{keepMounted:n=!1,...r}=t;return nr().useState("mounted")||n?f(yT.Provider,{value:n,children:f(hp,{ref:o,...r})}):null});var jH=T(D(),1);var zH=ci(function(t,o){let{render:n,className:r,delay:s,closeDelay:i,id:a,payload:l,handle:c,style:u,...p}=t,d=nr(!0),g=di(c)??d;if(!g)throw new Error(_e(89));let R=Ye(a),b=g.useState("isTriggerActive",R),x=g.useState("isOpenedByTrigger",R),h=g.useState("floatingRootContext"),C=g.context.inlineRectCoordsRef,y=jH.useRef(null),S=s??600,w=i??300,{registerTrigger:v,isMountedByThisTrigger:P}=si(R,y,g,{payload:l,closeDelay:w}),N=Hr(h,{mouseOnly:!0,move:!1,handleClose:Gr(),delay:()=>({open:S,close:w}),triggerElementRef:y,isActiveTrigger:b,isClosing:()=>g.select("transitionStatus")==="ending"}),E=nc(h,{delay:S}),M={open:x},W=g.useState("triggerProps",P),I=uF(C,x);return j("a",t,{state:M,ref:[o,v,y],props:[N,E.reference,W,I,{id:R},p],stateAttributesMapping:qn})});var $H=T(D(),1);var qx=T(D(),1),ST=qx.createContext(void 0);function xp(){let e=qx.useContext(ST);if(e===void 0)throw new Error(_e(49));return e}var KH=$H.forwardRef(function(t,o){let{render:n,className:r,anchor:s,positionMethod:i="absolute",side:a="bottom",align:l="center",sideOffset:c=0,alignOffset:u=0,collisionBoundary:p="clipping-ancestors",collisionPadding:d=5,arrowPadding:m=5,sticky:g=!1,disableAnchorTracking:R=!1,collisionAvoidance:b=Xr,style:x,...h}=t,C=nr(),y=HH(),S=kr(),w=C.useState("open"),v=C.useState("mounted"),P=C.useState("floatingRootContext"),N=C.useState("instantType"),E=C.useState("transitionStatus"),M=C.useState("adaptiveOrigin"),W=C.context.inlineRectCoordsRef,I=wr({anchor:s,floatingRootContext:P,positionMethod:i,mounted:v,side:a,sideOffset:c,align:l,alignOffset:u,arrowPadding:m,collisionBoundary:p,collisionPadding:d,sticky:g,disableAnchorTracking:R,keepMounted:y,nodeId:S,collisionAvoidance:b,adaptiveOrigin:M,inline:pF(W)}),O=I.update;J(()=>{w&&v&&O()},[w,v,O]);let F={open:w,side:I.side,align:I.align,anchorHidden:I.anchorHidden,instant:N},k=Qn(t,F,{styles:I.positionerStyles,transitionStatus:E,props:h,refs:[o,C.useStateSetter("positionerElement")],hidden:!v,inert:!w});return f(ST.Provider,{value:I,children:f(Lr,{id:S,children:k})})});var YH=T(D(),1);var qH=YH.forwardRef(function(t,o){let{className:n,render:r,style:s,...i}=t,a=nr(),{side:l,align:c}=xp(),u=a.useState("open"),p=a.useState("instantType"),d=a.useState("transitionStatus"),m=a.useState("popupProps"),g=a.useState("floatingRootContext"),R=a.useState("closeDelay");return It({open:u,ref:a.context.popupRef,onComplete(){u&&a.context.onOpenChangeComplete?.(!0)}}),Ms(g,{closeDelay:R}),j("div",t,{state:{open:u,side:l,align:c,instant:p,transitionStatus:d},ref:[o,a.context.popupRef,a.useStateSetter("popupElement")],props:[Zn,m,Sn(d),i],stateAttributesMapping:Ro})});var XH=T(D(),1);var JH=XH.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t,a=nr(),{arrowRef:l,side:c,align:u,arrowUncentered:p,arrowStyles:d}=xp(),g={open:a.useState("open"),side:c,align:u,uncentered:p};return j("div",t,{state:g,ref:[l,o],props:[{style:d,"aria-hidden":!0},i],stateAttributesMapping:lo})});var ZH=T(D(),1);var QH=ZH.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t,a=nr(),l=a.useState("open"),c=a.useState("mounted"),u=a.useState("transitionStatus");return j("div",t,{state:{open:l,transitionStatus:u},ref:[o],props:[{role:"presentation",hidden:!c,style:{pointerEvents:"none",userSelect:"none",WebkitUserSelect:"none"}},i],stateAttributesMapping:Ro})});var e1=T(D(),1);var t1=e1.forwardRef(function(t,o){let{render:n,className:r,style:s,children:i,...a}=t,l=nr(),c=xp(),u=l.useState("instantType"),{children:p,state:d}=Rl({store:l,side:c.side,children:i}),m={activationDirection:d.activationDirection,transitioning:d.transitioning,instant:u};return j("div",t,{state:m,ref:o,props:[a,{children:p}],stateAttributesMapping:bl})});var Vf=class extends Jr{constructor(){super(FH(),"PreviewCard")}open(t){this.openByTrigger(t)}close(){this.closePopup()}get isOpen(){return this.attachedStore?.select("open")??!1}};function o1(){return new Vf}var vT={};me(vT,{popupOpen:()=>Qee});var Qee=At.popupOpen;var wT={};me(wT,{anchorHeight:()=>nte,anchorWidth:()=>ote,availableHeight:()=>tte,availableWidth:()=>ete,positionerHeight:()=>ite,positionerWidth:()=>ste,transformOrigin:()=>rte});var ete="--available-width",tte="--available-height",ote="--anchor-width",nte="--anchor-height",rte="--transform-origin",ste="--positioner-width",ite="--positioner-height";var PT={};me(PT,{align:()=>pte,anchorHidden:()=>cte,closed:()=>lte,open:()=>ate,side:()=>ute});var ate=ge.open,lte=ge.closed,cte=ge.anchorHidden,ute=ge.side,pte=ge.align;var ET={};me(ET,{align:()=>Rte,closed:()=>fte,endingStyle:()=>gte,open:()=>dte,side:()=>bte,startingStyle:()=>mte});var dte=ge.open,fte=ge.closed,mte=ge.startingStyle,gte=ge.endingStyle,bte=ge.side,Rte=ge.align;var TT={};me(TT,{align:()=>yte,closed:()=>xte,open:()=>hte,side:()=>Cte,uncentered:()=>Ste});var hte=ge.open,xte=ge.closed,Cte=ge.side,yte=ge.align,Ste="data-uncentered";var IT={};me(IT,{closed:()=>wte,endingStyle:()=>Ete,open:()=>vte,startingStyle:()=>Pte});var vte=ge.open,wte=ge.closed,Pte=ge.startingStyle,Ete=ge.endingStyle;var MT={};me(MT,{popupHeight:()=>Ite,popupWidth:()=>Tte});var Tte="--popup-width",Ite="--popup-height";var DT={};me(DT,{activationDirection:()=>Nte,current:()=>Mte,instant:()=>Ote,previous:()=>Dte,transitioning:()=>Ate});var Mte="data-current",Dte="data-previous",Nte="data-activation-direction",Ate="data-transitioning",Ote="data-instant";var Ca={};me(Ca,{Indicator:()=>a1,Label:()=>p1,Root:()=>n1,Track:()=>s1,Value:()=>c1});var xa=T(D(),1);var Xx=T(D(),1),NT=Xx.createContext(void 0);function Tl(){let e=Xx.useContext(NT);if(e===void 0)throw new Error(_e(51));return e}var Jx={};me(Jx,{complete:()=>AT,indeterminate:()=>OT,progressing:()=>FT});var AT="data-complete",OT="data-indeterminate",FT="data-progressing";var Mi={status(e){return e==="progressing"?{[FT]:""}:e==="complete"?{[AT]:""}:e==="indeterminate"?{[OT]:""}:null}};var n1=xa.forwardRef(function(t,o){let{format:n,getAriaValueText:r,locale:s,max:i=100,min:a=0,value:l,render:c,className:u,children:p,style:d,...m}=t,[g,R]=xa.useState(),b="indeterminate",x=null,h=null,C="",y="indeterminate progress";if(l!=null&&Number.isFinite(l)){let N=ua(l,a,i);x=Ct(Number.isNaN(N)?0:N,0,100),h=Ct(l,a,i),b=h===i?"complete":"progressing",C=n?wn(h,s,n):wn(x/100,s,{style:"percent"}),y=C}let S=xa.useMemo(()=>({status:b}),[b]),w={"aria-labelledby":g,"aria-valuemax":i,"aria-valuemin":a,"aria-valuenow":h??void 0,"aria-valuetext":r?r(C,l):y,role:"progressbar",children:f(xa.Fragment,{children:[p,f("span",{role:"presentation",style:wo,children:"x"})]})},v=xa.useMemo(()=>({formattedValue:C,percentageValue:x,setLabelId:R,state:S,value:l}),[C,x,R,S,l]),P=j("div",t,{state:S,ref:o,props:[w,m],stateAttributesMapping:Mi});return f(NT.Provider,{value:v,children:P})});var r1=T(D(),1);var s1=r1.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t,{state:a}=Tl();return j("div",t,{state:a,ref:o,props:i,stateAttributesMapping:Mi})});var i1=T(D(),1);var a1=i1.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t,{percentageValue:a,state:l}=Tl(),c=a==null?{}:{insetInlineStart:0,height:"inherit",width:`${a}%`};return j("div",t,{state:l,ref:o,props:[{style:c},i],stateAttributesMapping:Mi})});var l1=T(D(),1);var c1=l1.forwardRef(function(t,o){let{className:n,render:r,children:s,style:i,...a}=t,{value:l,formattedValue:c,state:u}=Tl(),p=u.status==="indeterminate";return j("span",t,{state:u,ref:o,props:[{"aria-hidden":!0,children:typeof s=="function"?s(p?"indeterminate":c,l):p?null:c},a],stateAttributesMapping:Mi})});var u1=T(D(),1);var p1=u1.forwardRef(function(t,o){let{render:n,className:r,style:s,id:i,...a}=t,{setLabelId:l,state:c}=Tl(),u=al(i,l);return j("span",t,{state:c,ref:o,props:[{id:u,role:"presentation"},a],stateAttributesMapping:Mi})});var _T={};me(_T,{complete:()=>Fte,indeterminate:()=>_te,progressing:()=>Vte});var Fte="data-complete",_te="data-indeterminate",Vte="data-progressing";var VT={};me(VT,{complete:()=>kte,indeterminate:()=>Lte,progressing:()=>Bte});var kte="data-complete",Lte="data-indeterminate",Bte="data-progressing";var kT={};me(kT,{complete:()=>Hte,indeterminate:()=>Gte,progressing:()=>Ute});var Hte="data-complete",Gte="data-indeterminate",Ute="data-progressing";var LT={};me(LT,{complete:()=>Wte,indeterminate:()=>jte,progressing:()=>zte});var Wte="data-complete",jte="data-indeterminate",zte="data-progressing";var Cp={};me(Cp,{Indicator:()=>g1,Root:()=>m1});var ya=T(D(),1);var Zx={};me(Zx,{checked:()=>BT,dirty:()=>Zte,disabled:()=>$te,filled:()=>Qte,focused:()=>eoe,invalid:()=>Xte,readonly:()=>Kte,required:()=>Yte,touched:()=>Jte,unchecked:()=>HT,valid:()=>qte});var BT="data-checked",HT="data-unchecked",$te="data-disabled",Kte="data-readonly",Yte="data-required",qte="data-valid",Xte="data-invalid",Jte="data-touched",Zte="data-dirty",Qte="data-filled",eoe="data-focused";var kf={checked(e){return e?{[BT]:""}:{[HT]:""}},...Lt,...Ut};var Qx=T(D(),1),GT=Qx.createContext(void 0);function d1(){return Qx.useContext(GT)}var eC=T(D(),1),UT=eC.createContext(void 0);function f1(){let e=eC.useContext(UT);if(e===void 0)throw new Error(_e(52));return e}var m1=ya.forwardRef(function(t,o){let{render:n,className:r,disabled:s=!1,readOnly:i=!1,required:a=!1,"aria-labelledby":l,value:c,inputRef:u,nativeButton:p=!1,id:d,style:m,...g}=t,R=d1(),{disabled:b,readOnly:x,required:h,form:C,checkedValue:y,touched:S=!1,validation:w,name:v,setCheckedValue:P=nt,setTouched:N=nt,registerInputRef:E=nt}=R??{},{setTouched:M,setFilled:W,state:I,disabled:O}=ht(),F=sl(),{labelId:k,getDescriptionProps:U}=Vt(),_=O||F.disabled||b||s,B=x||i,L=h||a,V=C,A=R?y===c:c==="",K=ya.useRef(null),H=ln(_,K),G=ya.useRef(null),oe=w?.registerInput,ee=ya.useCallback(xe=>oe?.(xe,{controlRef:K,value:void 0}),[oe]),X=Wt(u,G,E,ee);J(()=>{G.current?.checked&&W(!0)},[W]),J(()=>{if(G.current){if(_&&A){E(null);return}E(G.current)}},[A,_,E]);let te=Ye(),ce=Ao({id:d}),le=p?void 0:ce,Q=il(l,k,G,!p,le,g["aria-label"]),ne={role:"radio","aria-checked":A,"aria-labelledby":Q,[Sc]:A?"":void 0,id:p?ce:te,onKeyDown(xe){xe.key==="Enter"&&xe.preventDefault()},onClick(xe){if(xe.defaultPrevented||_||B)return;xe.preventDefault();let Pe=G.current;Pe&&hr(Pe,xe)},onFocus(xe){H(!0),!(xe.defaultPrevented||_||B||!S)&&(G.current?.click(),N(!1))},onBlur(){R||H(!1)}},{getButtonProps:Y,buttonRef:ae}=bt({disabled:_,native:p,composite:!1}),Z={type:"radio",ref:X,form:V,id:le,name:v,tabIndex:-1,style:v?Xn:wo,"aria-hidden":!0,...c!==void 0?{value:Du(c)}:ot,disabled:_,checked:A,required:L,readOnly:B,onChange(xe){if(xe.nativeEvent.defaultPrevented||_||B||c===void 0)return;let Pe=Ce($.none,xe.nativeEvent);P(c,Pe),!Pe.isCanceled&&M(!0)},onClick(xe){xe.stopPropagation()},onFocus(){K.current?.focus()}},ue=ya.useMemo(()=>({...I,required:L,disabled:_,readOnly:B,checked:A}),[I,_,B,A,L]),Te=ue,fe=R!==void 0,ve=[o,K,ae],z=[ne,g,Y,U,w?xe=>w.getValidationProps(_,xe):ot],Re=j("span",t,{enabled:!fe,state:ue,ref:ve,props:z,stateAttributesMapping:kf});return f(UT.Provider,{value:Te,children:[fe?f(er,{tag:"span",render:n,className:r,style:m,state:ue,refs:ve,props:z,stateAttributesMapping:kf}):Re,f("input",{...Z,suppressHydrationWarning:!0})]})});var tC=T(D(),1);var g1=tC.forwardRef(function(t,o){let{render:n,className:r,style:s,keepMounted:i=!1,...a}=t,l=f1(),c=l.checked,{mounted:u,transitionStatus:p,setMounted:d}=so(c),m={...l,transitionStatus:p},g=tC.useRef(null),R=i||u,b=j("span",t,{ref:[o,g],state:m,props:a,stateAttributesMapping:kf});return It({batch:!0,enabled:!c,open:c,ref:g,onComplete(){c||d(!1)}}),R?b:null});var WT={};me(WT,{checked:()=>toe,dirty:()=>poe,disabled:()=>noe,endingStyle:()=>aoe,filled:()=>doe,focused:()=>foe,invalid:()=>coe,readonly:()=>roe,required:()=>soe,startingStyle:()=>ioe,touched:()=>uoe,unchecked:()=>ooe,valid:()=>loe});var toe="data-checked",ooe="data-unchecked",noe="data-disabled",roe="data-readonly",soe="data-required",ioe=Pt.startingStyle,aoe=Pt.endingStyle,loe="data-valid",coe="data-invalid",uoe="data-touched",poe="data-dirty",doe="data-filled",foe="data-focused";var Bs=T(D(),1);var moe=[cw],oC=Bs.forwardRef(function(t,o){let{render:n,className:r,disabled:s,readOnly:i,required:a,onValueChange:l,value:c,defaultValue:u,form:p,name:d,inputRef:m,id:g,style:R,...b}=t,{setTouched:x,setFocused:h,validationMode:C,name:y,disabled:S,state:w,validation:v,setDirty:P,setFilled:N,validityData:E}=ht(),{labelId:M}=Vt(),{clearErrors:W,elementRef:I}=eo(),O=vl(!0),F=S||s,k=y??d,U=Ye(g),[_,B]=_t({controlled:c,default:u,name:"RadioGroup",state:"value"}),[L,V]=Bs.useState(!1),A=q((Z,ue)=>{l?.(Z,ue),!ue.isCanceled&&B(Z)}),K=v.getInputControl,H=Bs.useMemo(()=>({get current(){return K()}}),[K]),G=Bs.useRef(null),oe=Bs.useRef(null),ee=Wt(G,m),X=Bs.useRef(ee),te=q(Z=>{G.current===Z&&X.current===ee||(X.current=ee,ee?.(Z))});J(()=>{te(G.current)},[ee,te]);let ce=q(Z=>{if(Z){if(!Z.disabled){oe.current||(oe.current=Z);let ue=G.current;(Z.checked||ue==null||ue.disabled)&&te(Z)}return()=>{oe.current===Z&&(oe.current=null),G.current===Z&&te(null)}}}),le=q(()=>{let Z=I.current;if(!Z)return _??null;for(let ue of v.registeredInputs.keys())if(ue.checked&&Qd(ue,Z))return _??null;return null});an(H,U,_??null,le,!F,d),oo(_,()=>{W(k),P(_!==E.initialValue),N(_!=null),v.change(_);let Z=oe.current;_==null&&Z&&!Z.disabled&&te(Z)});let Q=M??O?.legendId,ne={...w,disabled:F??!1,required:a??!1,readOnly:i??!1},Y=Bs.useMemo(()=>({checkedValue:_,disabled:F,form:p,validation:v,name:k,readOnly:i,registerInputRef:ce,required:a,setCheckedValue:A,setTouched:V,touched:L}),[_,F,p,v,k,i,ce,a,A,V,L]),ae={id:g,role:"radiogroup","aria-required":a||void 0,"aria-disabled":F||void 0,"aria-readonly":i||void 0,"aria-labelledby":Q,onBlur(Z){Ne(Z.currentTarget,Z.relatedTarget)||(V(!1),x(!0),h(!1),C==="onBlur"&&v.commit(_))},onKeyDownCapture(Z){Z.key.startsWith("Arrow")&&V(!0)}};return f(GT.Provider,{value:Y,children:f(gr,{render:n,className:r,style:R,state:ne,props:[ae,b,Z=>v.getValidationProps(F??!1,Z)],refs:[o],stateAttributesMapping:Ut,enableHomeAndEndKeys:!1,modifierKeys:moe})})});var jT={};me(jT,{disabled:()=>goe});var goe="data-disabled";var Ni={};me(Ni,{Content:()=>E1,Corner:()=>D1,Root:()=>R1,Scrollbar:()=>P1,Thumb:()=>I1,Viewport:()=>v1});var Qt=T(D(),1);var nC=T(D(),1),zT=nC.createContext(void 0);function Di(){let e=nC.useContext(zT);if(e===void 0)throw new Error(_e(53));return e}function Hs(e,t,o){if(!e)return 0;let n=getComputedStyle(e),r=`${t}${o==="x"?"Inline":"Block"}`,s=parseFloat(n[`${r}Start`]);return o==="x"&&t==="margin"?s*2:s+parseFloat(n[`${r}End`])}var rC="base-ui-disable-scrollbar",Sa={className:rC,getElement(e){return f("style",{nonce:e,href:rC,precedence:"base-ui:low",children:`.${rC}{scrollbar-width:none}.${rC}::-webkit-scrollbar{display:none}`})}};var sC={};me(sC,{hasOverflowX:()=>$T,hasOverflowY:()=>KT,overflowXEnd:()=>qT,overflowXStart:()=>YT,overflowYEnd:()=>JT,overflowYStart:()=>XT,scrolling:()=>boe});var boe="data-scrolling",$T="data-has-overflow-x",KT="data-has-overflow-y",YT="data-overflow-x-start",qT="data-overflow-x-end",XT="data-overflow-y-start",JT="data-overflow-y-end";var yp=e=>t=>t?{[e]:""}:null,Il={hasOverflowX:yp($T),hasOverflowY:yp(KT),overflowXStart:yp(YT),overflowXEnd:yp(qT),overflowYStart:yp(XT),overflowYEnd:yp(JT),cornerHidden:()=>null};var Hf={};me(Hf,{scrollAreaCornerHeight:()=>Lf,scrollAreaCornerWidth:()=>Bf});var Lf="--scroll-area-corner-height",Bf="--scroll-area-corner-width";var iC={};me(iC,{hasOverflowX:()=>xoe,hasOverflowY:()=>Coe,hovering:()=>Roe,orientation:()=>ZT,overflowXEnd:()=>Soe,overflowXStart:()=>yoe,overflowYEnd:()=>woe,overflowYStart:()=>voe,scrolling:()=>hoe});var ZT="data-orientation",Roe="data-hovering",hoe="data-scrolling",xoe="data-has-overflow-x",Coe="data-has-overflow-y",yoe="data-overflow-x-start",Soe="data-overflow-x-end",voe="data-overflow-y-start",woe="data-overflow-y-end";var Poe={x:0,y:0},b1={width:0,height:0},Eoe={xStart:!1,xEnd:!1,yStart:!1,yEnd:!1},Toe={x:!0,y:!0,corner:!0},R1=Qt.forwardRef(function(t,o){let{render:n,className:r,overflowEdgeThreshold:s,style:i,...a}=t,{xStart:l,xEnd:c,yStart:u,yEnd:p}=Ioe(s),d=Ye(),m=ct(),g=ct(),{nonce:R,disableStyleElements:b}=sp(),[x,h]=Qt.useState(!1),[C,y]=Qt.useState(!1),[S,w]=Qt.useState(!1),[v,P]=Qt.useState(!1),[N,E]=Qt.useState(!1),[M,W]=Qt.useState(b1),[I,O]=Qt.useState(b1),[F,k]=Qt.useState(Eoe),[U,_]=Qt.useState(Toe),B=Qt.useRef(null),L=Qt.useRef(null),V=Qt.useRef(null),A=Qt.useRef(null),K=Qt.useRef(null),H=Qt.useRef(null),G=Qt.useRef(null),oe=Qt.useRef(null),ee=Qt.useRef(0),X=Qt.useRef(0),te=Qt.useRef(0),ce=Qt.useRef(0),le=Qt.useRef("vertical"),Q=Qt.useRef(Poe),ne=Qt.useRef(null);function Y(re){let Ee=re?w:y,ye=re?m:g;Ee(!0),ye.start(500,()=>{Ee(!1)})}let ae=q(re=>{let Ee=re.x-Q.current.x,ye=re.y-Q.current.y;Q.current=re,ye!==0&&Y(!0),Ee!==0&&Y(!1)}),Z=q(()=>{let re=L.current;re&&ne.current===null&&(ne.current=re.style.scrollSnapType,re.style.scrollSnapType="none")}),ue=q(re=>{if(re.button!==0||oe.current!==null&&(le.current==="vertical"?K.current:H.current)?.hasPointerCapture(oe.current))return;oe.current=re.pointerId,ee.current=re.clientY,X.current=re.clientX,le.current=re.currentTarget.getAttribute(ZT);let Ee=L.current;Ee&&(te.current=Ee.scrollTop,ce.current=Ee.scrollLeft,Z()),(le.current==="vertical"?K.current:H.current)?.setPointerCapture(re.pointerId)}),Te=q(re=>{if(re.pointerId!==oe.current)return;oe.current=null,(le.current==="vertical"?w:y)(!1),ne.current!==null&&(L.current&&(L.current.style.scrollSnapType=ne.current),ne.current=null);let Ee=le.current==="vertical"?K.current:H.current;Ee?.hasPointerCapture(re.pointerId)&&Ee.releasePointerCapture(re.pointerId)}),fe=q(re=>{if(re.pointerId!==oe.current)return;if(re.buttons%2===0){Te(re);return}let Ee=L.current;if(!Ee)return;let ye=le.current==="vertical",se=ye?K.current:H.current,Fe=ye?V.current:A.current;if(!se||!Fe)return;let ke=ye?"y":"x",de=Hs(Fe,"padding",ke),Ie=Hs(se,"margin",ke),Me=ye?se.offsetHeight:se.offsetWidth,Ue=(ye?Fe.offsetHeight:Fe.offsetWidth)-Me-de-Ie,ze=ye?re.clientY-ee.current:re.clientX-X.current,He=Ue<=0?0:ze/Ue,je=ye?Ee.scrollHeight:Ee.scrollWidth,Qe=ye?Ee.clientHeight:Ee.clientWidth,ut=(ye?te.current:ce.current)+He*(je-Qe);ye?Ee.scrollTop=ut:Ee.scrollLeft=ut,re.preventDefault(),Y(ye)});function ve(re){P(re.pointerType==="touch")}function z(re){if(ve(re),re.pointerType!=="touch"){let Ee=Ne(B.current,re.target);h(Ee)}}let Re=Qt.useMemo(()=>({scrolling:C||S,hasOverflowX:!U.x,hasOverflowY:!U.y,overflowXStart:F.xStart,overflowXEnd:F.xEnd,overflowYStart:F.yStart,overflowYEnd:F.yEnd,cornerHidden:U.corner}),[C,S,U.x,U.y,U.corner,F]),xe={role:"presentation",onPointerEnter:z,onPointerMove:z,onPointerDown:ve,onPointerLeave(){h(!1)},style:{position:"relative",[Lf]:`${M.height}px`,[Bf]:`${M.width}px`}},Pe=j("div",t,{state:Re,ref:[o,B],props:[xe,a],stateAttributesMapping:Il}),ie=Qt.useMemo(()=>({handlePointerDown:ue,handlePointerMove:fe,handlePointerUp:Te,handleScroll:ae,disableViewportSnap:Z,cornerSize:M,setCornerSize:W,thumbSize:I,setThumbSize:O,hasMeasuredScrollbar:N,setHasMeasuredScrollbar:E,touchModality:v,cornerRef:G,scrollingX:C,scrollingY:S,hovering:x,setHovering:h,viewportRef:L,scrollbarYRef:V,scrollbarXRef:A,thumbYRef:K,thumbXRef:H,rootId:d,hiddenState:U,setHiddenState:_,overflowEdges:F,setOverflowEdges:k,viewportState:Re,overflowEdgeThreshold:{xStart:l,xEnd:c,yStart:u,yEnd:p}}),[ue,fe,Te,ae,Z,M,I,N,v,C,S,x,d,U,F,Re,l,c,u,p]);return f(zT.Provider,{value:ie,children:[!b&&Sa.getElement(R),Pe]})});function Ioe(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 Mc=T(D(),1);var aC=T(D(),1),QT=aC.createContext(void 0);function h1(){let e=aC.useContext(QT);if(e===void 0)throw new Error(_e(55));return e}var jr=1;function Sp(e,t){return Math.max(0,e-t)}function va(e,t){if(t<=0)return 0;let o=Ct(e,0,t),n=o,r=t-o,s=n<=jr,i=r<=jr;return s&&i?n<=r?0:t:s?0:i?t:o}var lC={};me(lC,{scrollAreaOverflowXEnd:()=>tI,scrollAreaOverflowXStart:()=>eI,scrollAreaOverflowYEnd:()=>nI,scrollAreaOverflowYStart:()=>oI});var eI="--scroll-area-overflow-x-start",tI="--scroll-area-overflow-x-end",oI="--scroll-area-overflow-y-start",nI="--scroll-area-overflow-y-end";var Wf={};me(Wf,{scrollAreaThumbHeight:()=>Gf,scrollAreaThumbWidth:()=>Uf});var Gf="--scroll-area-thumb-height",Uf="--scroll-area-thumb-width";var S1=[eI,tI,oI,nI],C1=!1;function Moe(){C1||Rt.engine.webkit||(typeof CSS<"u"&&"registerProperty"in CSS&&S1.forEach(e=>{try{CSS.registerProperty({name:e,syntax:"<length>",inherits:!1,initialValue:"0px"})}catch{}}),C1=!0)}var v1=Mc.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t,{viewportRef:a,scrollbarYRef:l,scrollbarXRef:c,thumbYRef:u,thumbXRef:p,cornerRef:d,cornerSize:m,setCornerSize:g,setThumbSize:R,rootId:b,setHiddenState:x,hiddenState:h,setHasMeasuredScrollbar:C,handleScroll:y,touchModality:S,setHovering:w,setOverflowEdges:v,overflowEdgeThreshold:P,viewportState:N}=Di(),E=kt(),M=Mc.useRef(!0),W=Mc.useRef([NaN,NaN,NaN,NaN]),I=ct(),O=ct(),F=q(()=>{let L=a.current,V=l.current,A=c.current,K=u.current,H=p.current,G=d.current;if(!L)return;let oe=L.scrollHeight,ee=L.scrollWidth,X=L.clientHeight,te=L.clientWidth,ce=L.scrollTop,le=L.scrollLeft,Q=W.current,ne=Number.isNaN(Q[0]);if(Q[0]=X,Q[1]=oe,Q[2]=te,Q[3]=ee,ne&&C(!0),oe===0||ee===0)return;let Y=Doe(L),ae=Y.y,Z=Y.x,ue=te/ee,Te=X/oe,fe=Math.max(0,ee-te),ve=Math.max(0,oe-X),z=0,Re=0;Z||(z=va(E==="rtl"?-le:le,fe),Re=fe-z);let xe=ae?0:va(ce,ve),Pe=ae?0:ve-xe,ie=Z?0:te,re=ae?0:X,Ee=0,ye=0;!Z&&!ae&&(Ee=V?.offsetWidth||0,ye=A?.offsetHeight||0);let se=m.width===0&&m.height===0,Fe=se?Ee:0,ke=se?ye:0,de=Hs(A,"padding","x"),Ie=Hs(V,"padding","y"),Me=Hs(H,"margin","x"),We=Hs(K,"margin","y"),Ue=ie-de-Me,ze=re-Ie-We,He=A?Math.min(A.offsetWidth-Fe,Ue):Ue,je=V?Math.min(V.offsetHeight-ke,ze):ze,Qe=Math.max(16,He*ue),et=Math.max(16,je*Te);if(R(De=>cC(De,{width:Qe,height:et})),V&&K){let De=V.offsetHeight-et-Ie-We,he=y1(K,Gf,ce,ve,oe,et,De);K.style.transform=`translate3d(0,${he}px,0)`}if(A&&H){let De=A.offsetWidth-Qe-de-Me,he=E==="rtl"?-le:le,be=y1(H,Uf,he,fe,ee,Qe,De);H.style.transform=`translate3d(${E==="rtl"?-be:be}px,0,0)`}let ut=[z,Re,xe,Pe];S1.forEach((De,he)=>{L.style.setProperty(De,`${ut[he]}px`)}),G&&g(De=>cC(De,{width:Ee,height:ye})),x(De=>cC(De,Y));let vt={xStart:!Z&&z>P.xStart,xEnd:!Z&&Re>P.xEnd,yStart:!ae&&xe>P.yStart,yEnd:!ae&&Pe>P.yEnd};v(De=>cC(De,vt))});J(()=>{Moe()},[]),J(()=>{queueMicrotask(F)},[F,h,E,P.xStart,P.xEnd,P.yStart,P.yEnd]),J(()=>{a.current?.matches(":hover")&&w(!0)},[a,w]),J(()=>{let L=a.current;if(typeof ResizeObserver>"u"||!L)return;let V=!1,A=new ResizeObserver(()=>{if(!V){V=!0;let K=W.current;if(K[0]===L.clientHeight&&K[1]===L.scrollHeight&&K[2]===L.clientWidth&&K[3]===L.scrollWidth)return}F()});return A.observe(L),O.start(0,()=>{let K=md(L,{subtree:!0});K.length!==0&&Promise.allSettled(K.map(H=>H.finished.then(nt))).then(F).catch(()=>{})}),()=>{A.disconnect(),O.clear()}},[F,a,O]);function k(){M.current=!1}let U={...b&&{"data-id":`${b}-viewport`},tabIndex:h.x&&h.y?-1:0,className:Sa.className,style:{overflow:"scroll"},onScroll(){a.current&&(F(),(S||!M.current)&&y({x:a.current.scrollLeft,y:a.current.scrollTop}),I.start(100,()=>{M.current=!0}))},onWheel:k,onPointerMove:k,onPointerEnter:k,onKeyDown:k},_=j("div",t,{ref:[o,a],state:N,props:[U,i],stateAttributesMapping:Il}),B=Mc.useMemo(()=>({computeThumbPosition:F}),[F]);return f(QT.Provider,{value:B,children:_})});function Doe(e){let t=e.clientHeight>=e.scrollHeight,o=e.clientWidth>=e.scrollWidth;return{y:t,x:o,corner:t||o}}function cC(e,t){for(let o in t)if(e[o]!==t[o])return t;return e}function y1(e,t,o,n,r,s,i){let a=Ct(o,0,n),l=o-a,c=Math.max(16,s*r/(r+Math.abs(l)));return e.style.setProperty(t,l?`${c}px`:""),(n?a/n*i:0)+(l>0?s-c:0)}var pC=T(D(),1);var uC=T(D(),1),rI=uC.createContext(void 0);function w1(){let e=uC.useContext(rI);if(e===void 0)throw new Error(_e(54));return e}var P1=pC.forwardRef(function(t,o){let{render:n,className:r,orientation:s="vertical",keepMounted:i=!1,style:a,...l}=t,{hovering:c,scrollingX:u,scrollingY:p,hiddenState:d,scrollbarYRef:m,scrollbarXRef:g,viewportRef:R,thumbYRef:b,thumbXRef:x,handlePointerDown:h,handlePointerUp:C,handleScroll:y,disableViewportSnap:S,rootId:w,thumbSize:v,hasMeasuredScrollbar:P,viewportState:N}=Di(),E=s==="vertical",M={...N,hovering:c,scrolling:E?p:u,orientation:s},W=kt(),I=!P&&!i,O=E?d.y:d.x,F=i||!O;pC.useEffect(()=>{if(!F)return;let _=R.current,B=E?m.current:g.current;if(!B)return;function L(V){if(!_||V.ctrlKey)return;let A=!E,K=A?"scrollLeft":"scrollTop",H=A?V.deltaX:V.deltaY;if(H===0)return;let G=A?_.scrollWidth-_.clientWidth:_.scrollHeight-_.clientHeight,oe=A&&W==="rtl"?-G:0,ee=A&&W==="rtl"?0:G,X=_[K];X<=oe&&H<0||X>=ee&&H>0||(V.preventDefault(),_[K]=Math.min(ee,Math.max(oe,X+H)),y({x:_.scrollLeft,y:_.scrollTop}))}return qe(B,"wheel",L,{passive:!1})},[W,y,E,g,m,F,R]);let k={...w&&{"data-id":`${w}-scrollbar`},"aria-hidden":!0,onPointerDown(_){if(_.button!==0)return;let B=Je(_.nativeEvent),L=E?b.current:x.current;if(L&&Ne(L,B))return;let V=R.current;if(!V)return;let A=E?m.current:g.current;if(!L||!A)return;let K=E?"y":"x",H=Hs(L,"margin",K),G=Hs(A,"padding",K),oe=E?L.offsetHeight:L.offsetWidth,ee=A.getBoundingClientRect(),X=E?_.clientY-ee.top-oe/2-G+H/2:_.clientX-ee.left-oe/2-G+H/2,te=E?V.scrollHeight:V.scrollWidth,ce=E?V.clientHeight:V.clientWidth,Q=(E?A.offsetHeight:A.offsetWidth)-oe-G-H;if(Q<=0)return;let ne=X/Q,Y=te-ce;S(),E?V.scrollTop=ne*Y:W==="rtl"?V.scrollLeft=-(1-ne)*Y:V.scrollLeft=ne*Y,y({x:V.scrollLeft,y:V.scrollTop}),h(_)},onMouseDown(_){_.preventDefault()},onPointerUp:C,onPointerCancel:C,style:{position:"absolute",touchAction:"none",WebkitUserSelect:"none",userSelect:"none",visibility:I?"hidden":void 0,...E?{top:0,bottom:`var(${Lf})`,insetInlineEnd:0,[Gf]:`${v.height}px`}:{insetInlineStart:0,insetInlineEnd:`var(${Bf})`,bottom:0,[Uf]:`${v.width}px`}}},U=j("div",t,{ref:[o,E?m:g],state:M,props:[k,l],stateAttributesMapping:Il});return F?f(rI.Provider,{value:s,children:U}):null});var jf=T(D(),1);var E1=jf.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t,{computeThumbPosition:a}=h1(),{hasMeasuredScrollbar:l,viewportState:c}=Di(),u=jf.useRef(null),p=jf.useRef(l);return J(()=>{if(typeof ResizeObserver>"u")return;let m=!1,g=new ResizeObserver(()=>{!m&&(m=!0,!p.current)||a()});return u.current&&g.observe(u.current),()=>{g.disconnect()}},[a]),j("div",t,{ref:[o,u],state:c,stateAttributesMapping:Il,props:[{role:"presentation",style:{minWidth:"fit-content"}},i]})});var T1=T(D(),1);var I1=T1.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t,{thumbYRef:a,thumbXRef:l,handlePointerDown:c,handlePointerMove:u,handlePointerUp:p,scrollingX:d,scrollingY:m,hasMeasuredScrollbar:g}=Di(),R=w1(),b=R==="vertical";return j("div",t,{ref:[o,b?a:l],state:{scrolling:b?m:d,orientation:R},props:[{onPointerDown:c,onPointerMove:u,onPointerUp:p,onPointerCancel:p,style:{visibility:g?void 0:"hidden",...b?{height:"var(--scroll-area-thumb-height)"}:{width:"var(--scroll-area-thumb-width)"}}},i]})});var M1=T(D(),1);var D1=M1.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t,{cornerRef:a,cornerSize:l,hiddenState:c}=Di(),u=j("div",t,{ref:[o,a],props:[{"aria-hidden":!0,style:{position:"absolute",bottom:0,insetInlineEnd:0,width:l.width,height:l.height}},i]});return c.corner?null:u});var sI={};me(sI,{hasOverflowX:()=>Aoe,hasOverflowY:()=>Ooe,overflowXEnd:()=>_oe,overflowXStart:()=>Foe,overflowYEnd:()=>koe,overflowYStart:()=>Voe,scrolling:()=>Noe});var Noe="data-scrolling",Aoe="data-has-overflow-x",Ooe="data-has-overflow-y",Foe="data-overflow-x-start",_oe="data-overflow-x-end",Voe="data-overflow-y-start",koe="data-overflow-y-end";var iI={};me(iI,{hasOverflowX:()=>Boe,hasOverflowY:()=>Hoe,overflowXEnd:()=>Uoe,overflowXStart:()=>Goe,overflowYEnd:()=>joe,overflowYStart:()=>Woe,scrolling:()=>Loe});var Loe="data-scrolling",Boe="data-has-overflow-x",Hoe="data-has-overflow-y",Goe="data-overflow-x-start",Uoe="data-overflow-x-end",Woe="data-overflow-y-start",joe="data-overflow-y-end";var aI={};me(aI,{orientation:()=>zoe,scrolling:()=>$oe});var zoe="data-orientation",$oe="data-scrolling";var Bo={};me(Bo,{Arrow:()=>oG,Backdrop:()=>W1,Group:()=>cG,GroupLabel:()=>pG,Icon:()=>B1,Item:()=>J1,ItemIndicator:()=>Q1,ItemText:()=>eG,Label:()=>F1,List:()=>X1,Popup:()=>Y1,Portal:()=>G1,Positioner:()=>j1,Root:()=>A1,ScrollDownArrow:()=>sG,ScrollUpArrow:()=>aG,Separator:()=>dG,Trigger:()=>_1,Value:()=>k1});var Eo=T(D(),1);var vp=T(D(),1),lI=vp.createContext(void 0),cI=vp.createContext(void 0);function Co(){let e=vp.useContext(lI);if(e===void 0)throw new Error(_e(60));return e}function dC(){let e=vp.useContext(cI);if(e===void 0)throw new Error(_e(61));return e}var N1={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:n}=e;return t==null?!1:o&&Array.isArray(t)?t.length>0:vr(t,n)!==""},hasNullItemLabel:(e,t)=>t?mb(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,n=e.value;return e.multiple?Array.isArray(n)&&n.some(r=>yn(t,r,o)):yn(t,n,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 A1(e){let{id:t,value:o,defaultValue:n=null,onValueChange:r,open:s,defaultOpen:i=!1,onOpenChange:a,name:l,form:c,autoComplete:u,disabled:p=!1,readOnly:d=!1,required:m=!1,modal:g=!0,actionsRef:R,inputRef:b,onOpenChangeComplete:x,items:h,multiple:C=!1,itemToStringLabel:y,itemToStringValue:S,isItemEqualToValue:w=cc,highlightItemOnHover:v=!0,children:P}=e,{clearErrors:N}=eo(),{setDirty:E,setTouched:M,setFocused:W,validityData:I,setFilled:O,name:F,disabled:k,validation:U,validationMode:_}=ht(),B=Ao({id:t}),L=k||p,V=F??l,[A,K]=_t({controlled:o,default:C?n??Et:n,name:"Select",state:"value"}),[H,G]=_t({controlled:s,default:i,name:"Select",state:"open"}),oe=Eo.useRef([]),ee=Eo.useRef([]),X=Eo.useRef(null),te=Eo.useRef(null),ce=Eo.useRef(0),le=Eo.useRef(null),Q=Eo.useRef([]),ne=Eo.useRef(!1),Y=Eo.useRef(null),ae=Eo.useRef(null),Z=Eo.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),ue=Eo.useRef(!1),Te=Eo.useRef(A),{openMethod:fe,triggerProps:ve}=Tu(H),z=gt(()=>new No({id:B,labelId:void 0,modal:g,multiple:C,disabled:L,readOnly:d,required:m,highlightItemOnHover:v,itemToStringLabel:y,itemToStringValue:S,isItemEqualToValue:w,value:A,open:H,mounted:H,transitionStatus:void 0,items:h,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:ot,triggerProps:ot,itemRoot:{props:ot,multiple:C,disabled:L,readOnly:d,isItemEqualToValue:w},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1},{setValue:nt,setOpen:nt,handleScrollArrowVisibility:nt,onOpenChangeComplete:nt,listRef:oe,popupRef:X,scrollHandlerRef:te,scrollArrowsMountedCountRef:ce,valueRef:le,valuesRef:Q,labelsRef:ee,typingRef:ne,selectionRef:Z,firstItemTextRef:Y,selectedItemTextRef:ae,alignItemWithTriggerActiveRef:ue,initialValueRef:Te},N1)).current,[Re,xe]=Eo.useState(!1),{mounted:Pe,transitionStatus:ie,forceUnmount:re}=Ya({open:H,ref:X,preventUnmountOnClose:Re,setPreventUnmountOnClose:xe,onUnmount(){z.update({activeIndex:null,openMethod:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1}),x?.(!1)}}),Ee=z.useState("activeIndex"),ye=z.useState("selectedIndex"),se=z.useState("triggerElement"),Fe=z.useState("positionerElement"),ke=fh(fe),de=fe??ke,Ie=Eo.useMemo(()=>C?"":vr(A,S),[C,A,S]),Me=Eo.useMemo(()=>C&&Array.isArray(A)?A.map(Ve=>vr(Ve,S)):vr(A,S),[C,A,S]),We=Tt(se),Ue=q(()=>Me);an(We,B,A,Ue,!L,l);let ze=C?Array.isArray(A)&&A.length>0:A!=null&&Ie!=="";J(()=>{O(ze)},[ze,O]),J(function(){let Ze=uc(Q.current,A,w,C);Ze===null&&(ae.current=null),!H&&z.set("selectedIndex",Ze)},[C,H,A,w,z]),oo(A,()=>{N(V),E(ub(A,I.initialValue,w)),U.change(A)});let He=q((Ve,Ze)=>{let at=Ze,Ke=Es(at);a?.(Ve,at),!Ze.isCanceled&&(Ve||xe(Ke()),G(Ve),!Ve&&(Ze.reason===$.focusOut||Ze.reason===$.outsidePress)&&(M(!0),W(!1),_==="onBlur"&&U.commit(A)))});Eo.useImperativeHandle(R,()=>({unmount:re,close:()=>{z.state.open&&He(!1,Ce($.imperativeAction))}}),[re,He,z]);let je=q((Ve,Ze)=>{r?.(Ve,Ze),!Ze.isCanceled&&K(Ve)}),Qe=q(Ve=>{let Ze=Sp(Ve.scrollHeight,Ve.clientHeight),at=va(Ve.scrollTop,Ze),Ke=at>0,dt=at<Ze;z.set("scrollUpArrowVisible",Ke),z.set("scrollDownArrowVisible",dt)}),et=Is({open:H,onOpenChange:He,elements:{reference:se,floating:Fe}}),ut=_n(et,{enabled:!L,event:"mousedown"}),vt=Vn(et),De=rc(et,{enabled:!L,listRef:oe,activeIndex:Ee,selectedIndex:ye,disabledIndices:Et,onNavigate(Ve){Ve===null&&!H||z.set("activeIndex",Ve)},focusItemOnHover:v}),he=ic(et,{enabled:!L&&(H||!d&&!C),listRef:ee,activeIndex:Ee,selectedIndex:ye,disabledIndices:Ve=>hh(oe.current[Ve]),onMatch(Ve){H?z.set("activeIndex",Ve):je(Q.current[Ve],Ce($.none))},onTyping(Ve){ne.current=Ve}}),be=Eo.useMemo(()=>Mt(he.reference,De.reference,vt.reference,ut.reference,ve),[ut.reference,he.reference,De.reference,vt.reference,ve]),Le=Eo.useMemo(()=>Mt(Zn,he.floating,De.floating,vt.floating),[he.floating,De.floating,vt.floating]),pe=De.item??ot,Ae=Eo.useMemo(()=>({props:pe,multiple:C,disabled:L,readOnly:d,isItemEqualToValue:w}),[pe,C,L,d,w]);z.useContextCallback("setValue",je),z.useContextCallback("setOpen",He),z.useContextCallback("handleScrollArrowVisibility",Qe),z.useContextCallback("onOpenChangeComplete",x),cb(()=>{z.update({popupProps:Le,triggerProps:be,itemRoot:Ae})}),z.useSyncedValues({id:B,modal:g,multiple:C,disabled:L,readOnly:d,required:m,highlightItemOnHover:v,value:A,open:H,mounted:Pe,transitionStatus:ie,popupProps:Le,triggerProps:be,itemRoot:Ae,items:h,itemToStringLabel:y,itemToStringValue:S,isItemEqualToValue:w,openMethod:de});let we=Wt(b,U.inputRef),Oe=C?void 0:V,$e=Eo.useMemo(()=>!C||!Array.isArray(A)||!V?null:A.map(Ve=>{let Ze=vr(Ve,S);return f("input",{type:"hidden",form:c,name:V,value:Ze,disabled:L},Ze)}),[C,A,c,V,S,L]);return f(lI.Provider,{value:z,children:[f(cI.Provider,{value:et,children:P}),f("input",{...U.getValidationProps(L,{onFocus(){z.state.triggerElement?.focus({focusVisible:!0})},onChange(Ve){if(Ve.nativeEvent.defaultPrevented||L||d)return;let Ze=Ve.currentTarget.value,at=Ce($.none,Ve.nativeEvent);function Ke(){if(C)return;let dt=Ze.toLowerCase(),jt=Q.current.findIndex(mo=>vr(mo,S).toLowerCase()===dt||Ln(mo,y).toLowerCase()===dt);jt===-1&&(jt=Q.current.findIndex((mo,xn)=>{let Vo=ee.current[xn];return Vo!=null&&Vo.toLowerCase()===dt}));let xt=Q.current[jt];xt!=null&&je(xt,at)}z.set("forceMount",!0),queueMicrotask(Ke)}}),id:B&&Oe==null?`${B}-hidden-input`:void 0,form:c,name:Oe,autoComplete:u,value:Ie,disabled:L,required:m&&!(C&&ze),readOnly:d,ref:we,style:V?Xn:wo,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),$e]})}var O1=T(D(),1);var F1=O1.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t,a=i;delete a.id;let l=ht(),c=Co(),u=c.useState("triggerElement"),p=c.useState("id"),d=_u(p),m=ll({id:d,fallbackControlId:u?.id??p,setLabelId(g){let R=typeof g=="function"?g(c.state.labelId):g;c.set("labelId",R)}});return j("div",t,{ref:o,state:l.state,props:[m,i],stateAttributesMapping:Ut})});var wp=T(D(),1);var fC={};me(fC,{dirty:()=>tne,disabled:()=>qoe,filled:()=>one,focused:()=>nne,invalid:()=>Qoe,placeholder:()=>rne,popupOpen:()=>Koe,popupSide:()=>uI,pressed:()=>Yoe,readonly:()=>Xoe,required:()=>Joe,touched:()=>ene,valid:()=>Zoe});var Koe=At.popupOpen,Yoe=At.pressed,qoe="data-disabled",Xoe="data-readonly",uI="data-popup-side",Joe="data-required",Zoe="data-valid",Qoe="data-invalid",ene="data-touched",tne="data-dirty",one="data-filled",nne="data-focused",rne="data-placeholder";var sne=400,ine={...Or,...Ut,popupSide:e=>e?{[uI]:e}:null,value:()=>null},_1=wp.forwardRef(function(t,o){let{render:n,className:r,id:s,disabled:i=!1,nativeButton:a=!0,style:l,...c}=t,{setTouched:u,validationMode:p,validation:d,state:m,disabled:g}=ht(),{labelId:R}=Vt(),b=Co(),x=b.useState("readOnly"),h=b.useState("required"),C=b.useState("disabled"),y=g||C||i,S=b.useState("open"),w=b.useState("mounted"),v=b.useState("value"),P=b.useState("triggerProps"),N=b.useState("positionerElement"),E=b.useState("listElement"),M=b.useState("popupSide"),W=b.useState("id"),I=b.useState("labelId"),O=b.useState("hasSelectedValue"),F=w&&N?M:null,k=s??W,U=Vu(R,I);Ao({id:s});let _=Tt(N),B=wp.useRef(null),L=ln(y,B),{getButtonProps:V,buttonRef:A}=bt({disabled:y,native:a}),K=b.useStateSetter("triggerElement"),H=ct(),G=ct(),oe=ct();wp.useEffect(()=>{if(S)return oe.start(sne,()=>{b.context.selectionRef.current.allowUnselectedMouseUp=!0,b.context.selectionRef.current.allowSelectedMouseUp=!0}),()=>{oe.clear()};b.context.selectionRef.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},G.clear()},[S,b,G,oe]);let ee=Mt(P,{id:k,role:"combobox","aria-expanded":S,"aria-haspopup":"listbox","aria-controls":S?E?.id??Ql(N)?.id:void 0,"aria-labelledby":U,"aria-readonly":x||void 0,"aria-required":h||void 0,tabIndex:y?-1:0,onFocus(ce){L(!0),S&&b.context.alignItemWithTriggerActiveRef.current&&b.context.setOpen(!1,Ce($.none,ce.nativeEvent)),H.start(0,()=>{b.set("forceMount",!0)})},onBlur(ce){Ne(N,ce.relatedTarget)||(u(!0),L(!1),p==="onBlur"&&d.commit(v))},onMouseDown(ce){if(S)return;let le=Be(ce.currentTarget);function Q(ne){if(!B.current)return;let Y=ne.target;Ne(B.current,Y)||Ne(_.current,Y)||Fu(ne,B.current)||b.context.setOpen(!1,Ce($.cancelOpen,ne))}G.start(0,()=>{le.addEventListener("mouseup",Q,{once:!0})})}},c,V),X=d.getValidationProps(y,ee);X.role="combobox";let te={...m,open:S,disabled:y,value:v,readOnly:x,popupSide:F,placeholder:!O};return j("button",t,{ref:[o,B,A,K],state:te,stateAttributesMapping:ine,props:X})});var V1=T(D(),1);var ane={value:()=>null},k1=V1.forwardRef(function(t,o){let{className:n,render:r,children:s,placeholder:i,style:a,...l}=t,c=Co(),u=c.useState("value"),p=c.useState("items"),d=c.useState("itemToStringLabel"),m=c.useState("hasSelectedValue"),g=!m&&i!=null&&s==null,R=c.useState("hasNullItemLabel",g),b={value:u,placeholder:!m},x=null;return typeof s=="function"?x=s(u):s!=null?x=s:g&&!R?x=i:Array.isArray(u)?x=gb(u,p,d):x=$d(u,p,d),j("span",t,{state:b,ref:[o,c.context.valueRef],props:[{children:x},l],stateAttributesMapping:ane})});var L1=T(D(),1);var B1=L1.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t,c={open:Co().useState("open")};return j("span",t,{state:c,ref:o,props:[{"aria-hidden":!0,children:"\u25BC"},i],stateAttributesMapping:qn})});var H1=T(D(),1);var G1=H1.forwardRef(function(t,o){let n=Co(),r=n.useState("mounted"),s=n.useState("forceMount");return r||s?f(Vr,{ref:o,...t}):null});var U1=T(D(),1);var lne={...lo,...Lt},W1=U1.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t,a=Co(),l=a.useState("open"),c=a.useState("mounted"),u=a.useState("transitionStatus");return j("div",t,{state:{open:l,transitionStatus:u},ref:o,props:[{role:"presentation",hidden:!c,style:{userSelect:"none",WebkitUserSelect:"none"}},i],stateAttributesMapping:lne})});var ls=T(D(),1);var mC=T(D(),1),pI=mC.createContext(void 0);function Ml(){let e=mC.useContext(pI);if(!e)throw new Error(_e(59));return e}function Pp(e,t){e&&Object.assign(e.style,t)}var gC={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"};var cne={position:"fixed"},j1=ls.forwardRef(function(t,o){let{anchor:n,className:r,render:s,positionMethod:i,side:a,align:l,sideOffset:c,alignOffset:u,collisionBoundary:p="clipping-ancestors",collisionPadding:d,arrowPadding:m,sticky:g,disableAnchorTracking:R,alignItemWithTrigger:b=!0,collisionAvoidance:x=ja,style:h,...C}=t,y=Co(),S=dC(),w=y.useState("open"),v=y.useState("mounted"),P=y.useState("modal"),N=y.useState("value"),E=y.useState("openMethod"),M=y.useState("positionerElement"),W=y.useState("triggerElement"),I=y.useState("isItemEqualToValue"),O=y.useState("transitionStatus"),F=ls.useRef(null),k=ls.useRef(null),[U,_]=ls.useState(b),B=v&&U&&E!=="touch";!v&&U!==b&&_(b),ls.useImperativeHandle(y.context.alignItemWithTriggerActiveRef,()=>B),rl((B||P)&&w,E==="touch",M,W);let L=wr({anchor:n,floatingRootContext:S,positionMethod:i,mounted:v,side:a,sideOffset:c,align:l,alignOffset:u,arrowPadding:m,collisionBoundary:p,collisionPadding:d,sticky:g,disableAnchorTracking:R??B,collisionAvoidance:x,keepMounted:!0}),V=B?"none":L.side,A=B?cne:L.positionerStyles,K={open:w,side:V,align:L.align,anchorHidden:L.anchorHidden};J(()=>{y.set("popupSide",L.side)},[y,L.side]);let H=y.useStateSetter("positionerElement"),G=Qn(t,K,{styles:A,transitionStatus:O,props:C,refs:[o,H],hidden:!v,inert:!w}),oe=ls.useRef(0),ee=q(te=>{if(y.context.valuesRef.current.length===0)return;let ce=oe.current;oe.current=te.size;let le=Ce($.none);if(ce!==0&&!y.state.multiple&&N!==null&&Ds(y.context.valuesRef.current,N,I)===-1){let ne=y.context.initialValueRef.current,ae=ne!=null&&Ds(y.context.valuesRef.current,ne,I)!==-1?ne:null;y.context.setValue(ae,le),ae===null&&(y.set("selectedIndex",null),y.context.selectedItemTextRef.current=null)}if(ce!==0&&y.state.multiple&&Array.isArray(N)){let Q=N.filter(ne=>Ds(y.context.valuesRef.current,ne,I)!==-1);Q.length!==N.length&&(y.context.setValue(Q,le),Q.length===0&&(y.set("selectedIndex",null),y.context.selectedItemTextRef.current=null))}if(w&&B){y.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let Q={height:""};Pp(M,Q),Pp(y.context.popupRef.current,Q)}}),X=ls.useMemo(()=>({...L,side:V,alignItemWithTriggerActive:B,setControlledAlignItemWithTrigger:_,scrollUpArrowRef:F,scrollDownArrowRef:k}),[L,V,B,_]);return f(Cn,{elementsRef:y.context.listRef,labelsRef:y.context.labelsRef,onMapChange:ee,children:f(pI.Provider,{value:X,children:[v&&P&&f(gi,{inert:sn(!w),cutout:W}),G]})})});var cs=T(D(),1);var RC={};me(RC,{anchorHeight:()=>fne,anchorWidth:()=>dne,availableHeight:()=>pne,availableWidth:()=>une,transformOrigin:()=>bC});var une="--available-width",pne="--available-height",dne="--anchor-width",fne="--anchor-height",bC="--transform-origin";var mne={...lo,...Lt},Y1=cs.forwardRef(function(t,o){let{render:n,className:r,style:s,finalFocus:i,...a}=t,l=Co(),c=l.useState("multiple"),u=l.useState("readOnly"),p=l.useState("highlightItemOnHover"),d=dC(),{side:m,align:g,alignItemWithTriggerActive:R,isPositioned:b,setControlledAlignItemWithTrigger:x}=Ml(),h=vn(!0)!=null,C=kt(),{nonce:y,disableStyleElements:S}=sp(),w=l.useState("id"),v=l.useState("open"),P=l.useState("openMethod"),N=l.useState("mounted"),E=l.useState("popupProps"),M=l.useState("transitionStatus"),W=l.useState("triggerElement"),I=l.useState("positionerElement"),O=l.useState("listElement"),F=cs.useRef(!1),k=cs.useRef(!1),U=cs.useRef({}),_=vo(),B=q(K=>{if(!I||!l.context.popupRef.current||!k.current)return;let H=I.style.top==="0px",G=I.style.bottom==="0px";if(F.current||!R||!H&&!G){l.context.handleScrollArrowVisibility(K);return}let oe=$1(I),ee=zf(I.getBoundingClientRect().height,"y",oe),X=Be(I),te=rt(I),ce=te.getComputedStyle(I),le=parseFloat(ce.marginTop),Q=parseFloat(ce.marginBottom),ne=z1(te.getComputedStyle(l.context.popupRef.current)),Y=Math.min(X.documentElement.clientHeight-le-Q,ne),ae=K.scrollTop,Z=hC(K),ue=null,Te=Re=>{I.style.height=`${Re}px`},fe=H?Z-ae:ae,ve=Math.min(ee+fe,Y);if(fe<=jr){let Re=Ct(fe,0,Y-ee);Re>0&&Te(ee+Re),K.scrollTop=H?Z:0,Y-(ee+Re)<=jr&&(F.current=!0),l.context.handleScrollArrowVisibility(K);return}if(Y-ve>jr)ue=H?1/0:0;else if(G&&ae<Z){let Re=ee+fe-Y;ue=ae-(fe-Re)}let z=Math.ceil(ve);if(z!==0&&Te(z),ue!=null){let Re=Ct(ue,0,hC(K));Math.abs(K.scrollTop-Re)>jr&&(K.scrollTop=Re)}z>=Y-jr&&(F.current=!0),l.context.handleScrollArrowVisibility(K)});cs.useImperativeHandle(l.context.scrollHandlerRef,()=>B,[B]),It({open:v,ref:l.context.popupRef,onComplete(){v&&l.context.onOpenChangeComplete(!0)}});let L={open:v,transitionStatus:M,side:m,align:g};J(()=>{!I||!l.context.popupRef.current||Object.keys(U.current).length||(U.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})},[l,I]),J(()=>{v||R||(k.current=!1,F.current=!1,Pp(I,U.current))},[v,R,I]),J(()=>{let K=l.context.popupRef.current;if(!v||!W||!I||!K||R&&!b||l.state.transitionStatus==="ending")return;if(k.current=!0,K.style.removeProperty(bC),!R){_.request(()=>l.context.handleScrollArrowVisibility(O||K));return}let H=gne(K);try{let G=l.context.selectedItemTextRef.current;G?.isConnected||(G=!l.select("hasSelectedValue")&&l.context.firstItemTextRef.current?.isConnected?l.context.firstItemTextRef.current:null);let oe=l.context.valueRef.current,ee=rt(I),X=ee.getComputedStyle(I),te=ee.getComputedStyle(K),ce=Be(W),le=$1(W),Q=xC(W.getBoundingClientRect(),le),ne=xC(I.getBoundingClientRect(),le),Y=Q.height,ae=O||K,Z=ae.scrollHeight,ue=parseFloat(te.borderBottomWidth),Te=parseFloat(X.marginTop)||10,fe=parseFloat(X.marginBottom)||10,ve=parseFloat(X.minHeight)||100,z=z1(te),Re=5,xe=5,Pe=20,ie=ce.documentElement.clientHeight-Te-fe,re=ce.documentElement.clientWidth,Ee=ie-Q.bottom+Y,ye,se=C==="rtl"?Q.right-ne.width:Q.left,Fe=0;if(G&&oe){let et=xC(oe.getBoundingClientRect(),le);ye=xC(G.getBoundingClientRect(),le),se=ne.left+(C==="rtl"?et.right-ye.right:et.left-ye.left);let ut=et.top-Q.top+et.height/2;Fe=ye.top-ne.top+ye.height/2-ut}let ke=Ee+Fe+fe+ue,de=Math.min(ie,ke),Ie=ie-Te-fe,Me=ke-de,We=re-xe;I.style.left=`${Ct(se,Re,We-ne.width)}px`,I.style.height=`${de}px`,I.style.maxHeight="none",I.style.marginTop=`${Te}px`,I.style.marginBottom=`${fe}px`,K.style.height="100%";let Ue=hC(ae),ze=Me>=Ue-jr;ze&&(de=Math.min(ie,ne.height)-(Me-Ue));let He=Q.top<Pe||Q.bottom>ie-Pe||Math.ceil(de)+jr<Math.min(Z,ve),je=(ee.visualViewport?.scale??1)!==1&&Rt.engine.webkit;if(He||je){Pp(I,U.current),x(!1);return}let Qe=Math.max(ve,de);if(ze){let et=Math.max(0,ie-ke);I.style.top=ne.height>=Ie?"0":`${et}px`,I.style.height=`${de}px`,ae.scrollTop=hC(ae)}else I.style.bottom="0",ae.scrollTop=Me;if(ye){let et=ne.top,ut=ne.height,vt=ye.top+ye.height/2,De=Ct(ut>0?(vt-et)/ut*100:50,0,100);K.style.setProperty(bC,`50% ${De}%`)}(Qe===ie||de>=z)&&(F.current=!0),l.context.handleScrollArrowVisibility(ae),p&&l.state.selectedIndex===null&&l.state.activeIndex===null&&l.context.listRef.current[0]!=null&&l.set("activeIndex",0)}finally{H()}},[l,v,I,W,R,x,_,O,p,C,b]),cs.useEffect(()=>{if(!R||!I||!v)return;let K=rt(I);function H(G){l.context.setOpen(!1,Ce($.windowResize,G))}return qe(K,"resize",H)},[l,R,I,v]);let V={...O?{role:"presentation"}:{role:"listbox","aria-multiselectable":c||void 0,"aria-readonly":u||void 0,id:`${w}-list`},onKeyDown(K){h&&ur.has(K.key)&&K.stopPropagation()},onScroll(K){O||B(K.currentTarget)},...R&&{style:O?{height:"100%"}:gC},className:!O&&R?Sa.className:void 0},A=j("div",t,{ref:[o,l.context.popupRef],state:L,stateAttributesMapping:mne,props:[E,V,Sn(M),a]});return f(cs.Fragment,{children:[!S&&Sa.getElement(y),f(Br,{context:d,modal:!1,disabled:!N,openInteractionType:P,returnFocus:i,restoreFocus:!0,children:A})]})});function z1(e){let t=e.maxHeight;return t.endsWith("px")&&parseFloat(t)||1/0}function hC(e){return Sp(e.scrollHeight,e.clientHeight)}function $1(e){return _d.getScale(e)}function zf(e,t,o){return e/o[t]}function xC(e,t){return ea({x:zf(e.x,"x",t),y:zf(e.y,"y",t),width:zf(e.width,"x",t),height:zf(e.height,"y",t)})}var K1=[["transform","none"],["scale","1"],["translate","0 0"]];function gne(e){let{style:t}=e,o={};for(let[n,r]of K1)o[n]=t.getPropertyValue(n),t.setProperty(n,r,"important");return()=>{for(let[n]of K1){let r=o[n];r?t.setProperty(n,r):t.removeProperty(n)}}}var q1=T(D(),1);var X1=q1.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t,a=Co(),l=a.useState("multiple"),c=a.useState("readOnly"),{alignItemWithTriggerActive:u}=Ml(),p=a.useState("hasScrollArrows"),d=a.useState("openMethod"),g={id:`${a.useState("id")}-list`,role:"listbox","aria-multiselectable":l||void 0,"aria-readonly":c||void 0,onScroll(b){a.context.scrollHandlerRef.current?.(b.currentTarget)},...u&&{style:gC},className:p&&d!=="touch"?Sa.className:void 0},R=a.useStateSetter("listElement");return j("div",t,{ref:[o,R],props:[g,i]})});var Gs=T(D(),1);var CC=T(D(),1),dI=CC.createContext(void 0);function yC(){let e=CC.useContext(dI);if(!e)throw new Error(_e(57));return e}var J1=Gs.memo(Gs.forwardRef(function(t,o){let{render:n,className:r,style:s,value:i=null,label:a,disabled:l=!1,nativeButton:c=!1,...u}=t,p=Gs.useRef(null),d=bo({guess:!0,label:a,textRef:p}),m=Co(),{props:g,multiple:R,disabled:b,readOnly:x,isItemEqualToValue:h}=m.useState("itemRoot"),C=b||l,y=m.useState("isActive",d.index),S=m.useState("open"),w=m.useState("isSelected",i),v=m.useState("isSelectedByFocus",d.index),P=d.index,N=Gs.useRef(null);J(()=>{let L=m.context.valuesRef.current;return L[P]=i,()=>{delete L[P]}},[P,i,m]),J(()=>{let L=m.state.value,V=m.state.selectedIndex,A=V,K;R&&Array.isArray(L)?(A=pb(P,i,m.context.valuesRef.current,L,h,V),K=A===P,P===V&&!K&&(m.context.selectedItemTextRef.current=null)):(K=L!==void 0&&yn(i,L,h),K&&(A=P)),m.set("selectedIndex",A),K&&p.current&&(m.context.selectedItemTextRef.current=p.current)},[P,R,h,m,i]);let E=Gs.useRef("mouse"),M=Gs.useRef(!1),{getButtonProps:W,buttonRef:I}=bt({disabled:C,focusableWhenDisabled:!0,native:c,composite:!0}),O={disabled:C,selected:w,highlighted:y};function F(L){if(b||x)return;let V=m.state.value;if(R){let A=Array.isArray(V)?V:[],K=w?db(A,i,h):[...A,i];m.context.setValue(K,Ce($.itemPress,L))}else m.context.setValue(i,Ce($.itemPress,L)),m.context.setOpen(!1,Ce($.itemPress,L))}function k(){m.context.selectionRef.current.dragY=0}let U={role:"option","aria-selected":w,tabIndex:S&&y?0:-1,onKeyDown(L){m.set("activeIndex",P),L.key===" "&&m.context.typingRef.current&&L.preventDefault()},onClick(L){let V=E.current!=="touch",A=L.nativeEvent.pointerType,K=V&&qr(L.nativeEvent)&&(A!==void 0||y),H=V&&!K&&!M.current;M.current=!1,!(C||H)&&F(L.nativeEvent)},onPointerEnter(L){E.current=L.pointerType},onPointerMove(L){if(L.pointerType==="mouse"&&L.buttons===1){let V=m.context.selectionRef.current;V.dragY+=L.movementY,V.dragY**2>=64&&(V.allowUnselectedMouseUp=!0)}},onPointerDown(L){E.current=L.pointerType,M.current=!0,k()},onMouseUp(){if(k(),C||E.current==="touch"||M.current)return;let L=!m.context.selectionRef.current.allowSelectedMouseUp&&w,V=!m.context.selectionRef.current.allowUnselectedMouseUp&&!w;L||V||(M.current=!0,N.current?.click(),M.current=!1)}},_=j("div",t,{ref:[I,o,d.ref,N],state:O,props:[g,U,u,W]}),B=Gs.useMemo(()=>({selected:w,index:P,textRef:p,selectedByFocus:v}),[w,P,p,v]);return f(dI.Provider,{value:B,children:_})}));var Z1=T(D(),1);var Q1=Z1.forwardRef(function(t,o){let{selected:n}=yC();return t.keepMounted||n?f(TR,{...t,selected:n,ref:o}):null});var Ep=T(D(),1);var eG=Ep.memo(Ep.forwardRef(function(t,o){let{index:n,textRef:r,selectedByFocus:s}=yC(),i=Co(),{render:a,className:l,style:c,...u}=t,p=Ep.useCallback(m=>{m&&(n===0&&(i.context.firstItemTextRef.current=m),s&&(i.context.selectedItemTextRef.current=m))},[i,n,s]);return j("div",t,{ref:[p,o,r],props:u})}));var tG=T(D(),1);var oG=tG.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t,a=Co(),{side:l,align:c,arrowRef:u,arrowStyles:p,arrowUncentered:d,alignItemWithTriggerActive:m}=Ml(),R={open:a.useState("open"),side:l,align:c,uncentered:d},b=j("div",t,{state:R,ref:[u,o],props:[{style:p,"aria-hidden":!0},i],stateAttributesMapping:Ro});return m?null:b});var rG=T(D(),1);var nG=T(D(),1);var SC=nG.forwardRef(function(t,o){let{render:n,className:r,style:s,direction:i,keepMounted:a,...l}=t,c=i==="up",u=Co(),{side:p,scrollDownArrowRef:d,scrollUpArrowRef:m}=Ml(),g=c?"scrollUpArrowVisible":"scrollDownArrowVisible",R=u.useState(g),b=u.useState("openMethod"),x=R&&b!=="touch",h=ct(),C=c?m:d,{mounted:y,transitionStatus:S,setMounted:w}=so(x);J(()=>(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]),It({open:x,ref:C,onComplete(){x||w(!1)}});let N=j("div",t,{ref:[o,C],state:{direction:i,visible:x,side:p,transitionStatus:S},props:[{"aria-hidden":!0,children:c?"\u25B2":"\u25BC",style:{position:"absolute"},onMouseMove(M){if(M.movementX===0&&M.movementY===0||h.isStarted())return;u.set("activeIndex",null);function W(){let I=u.state.listElement??u.context.popupRef.current;if(!I)return;u.set("activeIndex",null),u.context.handleScrollArrowVisibility(I);let O=Sp(I.scrollHeight,I.clientHeight),F=va(I.scrollTop,O),k=F===(c?0:O),U=u.context.listRef.current;if(F!==I.scrollTop&&(I.scrollTop=F),k){h.clear();return}if(U.length>0){let _=C.current?.offsetHeight||0;I.scrollTop=bne(U,c,F,I.clientHeight,_,O)}h.start(40,W)}h.start(40,W)},onMouseLeave(){h.clear()}},l],stateAttributesMapping:Lt});return y||a?N:null});function bne(e,t,o,n,r,s){if(t){let u=0,p=o+r-jr;for(let g=0;g<e.length;g+=1){let R=e[g];if(R&&R.offsetTop>=p){u=g;break}}let d=Math.max(0,u-1),m=e[d];return d<u&&m?va(m.offsetTop-r,s):0}let i=e.length-1,a=o+n-r+jr;for(let u=0;u<e.length;u+=1){let p=e[u];if(p&&p.offsetTop+p.offsetHeight>a){i=Math.max(0,u-1);break}}let l=Math.min(e.length-1,i+1),c=e[l];return l>i&&c?va(c.offsetTop+c.offsetHeight-n+r,s):s}var sG=rG.forwardRef(function(t,o){return f(SC,{...t,ref:o,direction:"down"})});var iG=T(D(),1);var aG=iG.forwardRef(function(t,o){return f(SC,{...t,ref:o,direction:"up"})});var Tp=T(D(),1);var vC=T(D(),1),fI=vC.createContext(void 0);function lG(){let e=vC.useContext(fI);if(e===void 0)throw new Error(_e(56));return e}var cG=Tp.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t,[a,l]=Tp.useState(),c=Tp.useMemo(()=>({labelId:a,setLabelId:l}),[a,l]),u=j("div",t,{ref:o,props:[{role:"group","aria-labelledby":a},i]});return f(fI.Provider,{value:c,children:u})});var uG=T(D(),1);var pG=uG.forwardRef(function(t,o){let{render:n,className:r,style:s,id:i,...a}=t,{setLabelId:l}=lG(),c=Ye(i);return J(()=>(l(c),()=>{l(p=>p===c?void 0:p)}),[c,l]),j("div",t,{ref:o,props:[{id:c,"aria-hidden":!0},a]})});var dG=Wu;var mI={};me(mI,{placeholder:()=>Rne});var Rne="data-placeholder";var gI={};me(gI,{popupOpen:()=>hne});var hne=At.popupOpen;var bI={};me(bI,{closed:()=>Cne,endingStyle:()=>Sne,open:()=>xne,startingStyle:()=>yne});var xne=ge.open,Cne=ge.closed,yne=ge.startingStyle,Sne=ge.endingStyle;var RI={};me(RI,{align:()=>Tne,anchorHidden:()=>Pne,closed:()=>wne,open:()=>vne,side:()=>Ene});var vne=ge.open,wne=ge.closed,Pne=ge.anchorHidden,Ene=ge.side,Tne=ge.align;var hI={};me(hI,{align:()=>One,closed:()=>Mne,endingStyle:()=>Nne,open:()=>Ine,side:()=>Ane,startingStyle:()=>Dne});var Ine=ge.open,Mne=ge.closed,Dne=ge.startingStyle,Nne=ge.endingStyle,Ane=ge.side,One=ge.align;var xI={};me(xI,{disabled:()=>Vne,highlighted:()=>_ne,selected:()=>Fne});var Fne="data-selected",_ne="data-highlighted",Vne="data-disabled";var CI={};me(CI,{endingStyle:()=>Lne,startingStyle:()=>kne});var kne=Pt.startingStyle,Lne=Pt.endingStyle;var yI={};me(yI,{align:()=>Une,closed:()=>Hne,open:()=>Bne,side:()=>Gne,uncentered:()=>Wne});var Bne=ge.open,Hne=ge.closed,Gne=ge.side,Une=ge.align,Wne="data-uncentered";var SI={};me(SI,{direction:()=>$ne,endingStyle:()=>zne,side:()=>Yne,startingStyle:()=>jne,visible:()=>Kne});var jne=ge.startingStyle,zne=ge.endingStyle,$ne="data-direction",Kne="data-visible",Yne=ge.side;var vI={};me(vI,{direction:()=>Jne,endingStyle:()=>Xne,side:()=>Qne,startingStyle:()=>qne,visible:()=>Zne});var qne=ge.startingStyle,Xne=ge.endingStyle,Jne="data-direction",Zne="data-visible",Qne=ge.side;var Us={};me(Us,{Control:()=>xG,Indicator:()=>EG,Label:()=>gG,Root:()=>fG,Thumb:()=>wG,Track:()=>yG,Value:()=>bG});var Jo=T(D(),1);function wC(e,t){return e-t}function PC(e,t,o,n,r,s){let i=Ct(e,o,n);if(!r)return i;let a=s.slice();return a[t]=Ct(i,s[t-1]??-1/0,s[t+1]??1/0),a.sort(wC)}function EC(e,t,o){if(!Array.isArray(e))return!0;let n=t*o;for(let r=0;r<e.length-1;r+=1)if(!(Math.abs(e[r]-e[r+1])>=n))return!1;return!0}var Ip=()=>null,Tr={activeThumbIndex:Ip,max:Ip,min:Ip,minStepsBetweenValues:Ip,step:Ip,values:Ip,...Ut};var TC=T(D(),1),wI=TC.createContext(void 0);function us(){let e=TC.useContext(wI);if(e===void 0)throw new Error(_e(62));return e}function ere(e,t){return e===t||Array.isArray(e)&&Array.isArray(t)&&lc(e,t)}var fG=Jo.forwardRef(function(t,o){let{"aria-labelledby":n,className:r,defaultValue:s,disabled:i=!1,id:a,format:l,largeStep:c=10,locale:u,render:p,max:d=100,min:m=0,minStepsBetweenValues:g=0,form:R,name:b,onValueChange:x,onValueCommitted:h,orientation:C="horizontal",step:y=1,thumbCollisionBehavior:S="push",thumbAlignment:w="center",value:v,style:P,...N}=t,E=Ye(a),M=_u(E),W=q(x),I=q(h),{clearErrors:O}=eo(),{state:F,disabled:k,name:U,setTouched:_,setDirty:B,validityData:L,validation:V}=ht(),{labelId:A}=Vt(),[K,H]=Jo.useState(),G=n??Vu(A,K),oe=k||i,ee=U??b,[X,te]=_t({controlled:v,default:s??m,name:"Slider"}),ce=Jo.useRef(null),le=Jo.useRef(null),Q=Jo.useRef([]),ne=Jo.useRef(null),Y=Jo.useRef(-1),ae=Jo.useRef(null),Z=Jo.useRef($.none),[ue,Te]=Jo.useState(-1),[fe,ve]=Jo.useState(-1),[z,Re]=Jo.useState(!1),[xe,Pe]=Jo.useState(()=>new Map),[ie,re]=Jo.useState([void 0,void 0]),Ee=q(ze=>{Te(ze),ze!==-1&&ve(ze)}),ye=q(ze=>{ze&&(le.current=ze)}),se=Array.isArray(X),Fe=Jo.useMemo(()=>se?X.map(ze=>Ct(ze,m,d)).sort(wC):[Ct(X,m,d)],[d,m,se,X]),ke=se?Fe:Fe[0];an(V.inputRef,E,ke,void 0,!oe,b),oo(ke,()=>{O(ee),V.change(ke);let ze=L.initialValue,He;Array.isArray(ke)&&Array.isArray(ze)?He=!lc(ke,ze):He=ke!==ze,B(He)});let de=q((ze,He)=>{if(Number.isNaN(ze)||ere(ze,X))return!1;let je=He.event,Qe=je.constructor,et=new Qe(je.type,je);return Object.defineProperty(et,"target",{writable:!0,value:{value:ze,name:ee}}),He.event=et,W(ze,He),He.isCanceled?!1:(Z.current=He.reason,te(ze),!0)}),Ie=q((ze,He,je)=>{let Qe=PC(ze,He,m,d,se,Fe);if(EC(Qe,y,g)){let et="key"in je?$.keyboard:$.inputChange,ut=de(Qe,Ce(et,je.nativeEvent,void 0,{activeThumbIndex:He}));_(!0),ut&&I(Qe,go(et,je.nativeEvent))}});J(()=>{if(!oe)return;let ze=ft(Be(ce.current));Ne(ce.current,ze)&&ze.blur(),ue!==-1&&Ee(-1)},[ue,oe,Ee]);let Me=Jo.useMemo(()=>({...F,activeThumbIndex:ue,disabled:oe,dragging:z,orientation:C,max:d,min:m,minStepsBetweenValues:g,step:y,values:Fe}),[F,ue,oe,z,d,m,g,C,y,Fe]),We=Jo.useMemo(()=>({active:ue,controlRef:le,disabled:oe,dragging:z,validation:V,format:l,handleInputChange:Ie,indicatorPosition:ie,inset:w!=="center",isArrayValue:se,labelId:G,rootLabelId:M,largeStep:c,lastUsedThumbIndex:fe,lastChangeReasonRef:Z,form:R,locale:u,max:d,min:m,minStepsBetweenValues:g,name:ee,onValueCommitted:I,orientation:C,pressedThumbCenterOffsetRef:ne,pressedThumbIndexRef:Y,pressedValuesRef:ae,registerFieldControlRef:ye,renderBeforeHydration:w==="edge",setActive:Ee,setDragging:Re,setIndicatorPosition:re,setLabelId:H,setValue:de,state:Me,step:y,thumbCollisionBehavior:S,thumbMap:xe,thumbRefs:Q,values:Fe}),[ue,G,M,oe,z,V,l,Ie,ie,c,fe,R,u,d,m,g,ee,I,C,se,ye,Ee,de,Me,y,S,w,xe,Fe]),Ue=j("div",t,{state:Me,ref:[o,ce],props:[{"aria-labelledby":G,id:E,role:"group"},N,ze=>V.getValidationProps(oe,ze)],stateAttributesMapping:Tr});return f(wI.Provider,{value:We,children:f(Cn,{elementsRef:Q,onMapChange:Pe,children:Ue})})});var mG=T(D(),1);var gG=mG.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t,a=i;delete a.id;let{state:l,setLabelId:c,controlRef:u,rootLabelId:p}=us();function d(g,R){if(R){let h=uP(g.currentTarget,R);if(st(h)){ER(h);return}}let b=u.current?.querySelectorAll('input[type="range"]'),x=b?.length===1?b[0]:null;st(x)&&ER(x)}let m=ll({id:p,setLabelId:c,focusControl:d});return j("div",t,{ref:o,state:l,props:[m,i],stateAttributesMapping:Tr})});var IC=T(D(),1);var bG=IC.forwardRef(function(t,o){let{"aria-live":n="off",render:r,className:s,children:i,style:a,...l}=t,{thumbMap:c,state:u,values:p,format:d,locale:m}=us(),g=Array.from(c.values(),({inputId:h})=>h).join(" ").trim()||void 0,R=IC.useMemo(()=>p.map(h=>wn(h,m,d)),[d,m,p]),b=R.join(" \u2013 ");return j("output",t,{state:u,ref:o,props:[{"aria-live":n,children:typeof i=="function"?i(R,p):b,htmlFor:g},l],stateAttributesMapping:Tr})});var zr=T(D(),1);function MC(e,t){let o=e.getBoundingClientRect();return t?(o.top+o.bottom)/2:(o.left+o.right)/2}function Mp(e){if(e===0)return 0;if(Math.abs(e)<1){let o=e.toExponential().split("e-"),n=o[0].split(".")[1];return(n?n.length:0)+parseInt(o[1],10)}let t=e.toString().split(".")[1];return t?t.length:0}function DC(e,t,o){let n=Math.round((e-o)/t)*t+o;return Number(n.toFixed(Math.max(Mp(t),Mp(o))))}function PI(e,t,o,n,r,s,i,a){let l=e.slice(),c=s*i,u=l.length-1,p=a??e,d=n+t*c,m=r-(u-t)*c;l[t]=Ct(o,d,m);for(let g=t+1;g<=u;g+=1){let R=l[g-1]+c,b=r-(u-g)*c,x=p[g],h=Math.max(l[g],R);x<h&&(h=Math.max(x,R)),l[g]=Ct(h,R,b)}for(let g=t-1;g>=0;g-=1){let R=l[g+1]-c,b=n+g*c,x=p[g],h=Math.min(l[g],R);x>h&&(h=Math.min(x,R)),l[g]=Ct(h,b,R)}for(let g=0;g<=u;g+=1)l[g]=Number(l[g].toFixed(12));return l}function RG(e,t,o,n,r,s,i,a,l,c){let u=o??t,p=n??t;if(!(u.length>1))return{value:s,thumbIndex:0,didSwap:!1};let m=l*c;if(e==="push")return{value:PI(u,r,s,i,a,l,c),thumbIndex:r,didSwap:!1};let g=u.slice(),R=g[r-1],b=g[r+1],x=R!=null?R+m:i,h=b!=null?b-m:a,C=Number(Ct(s,x,h).toFixed(12));switch(g[r]=C,e){case"swap":{let y=u[r],S=1e-7,w=s>y,v=s<y,P=w&&b!=null&&s>=b-S,N=v&&R!=null&&s<=R+S;if(!P&&!N)return{value:g,thumbIndex:r,didSwap:!1};let E=P?r+1:r-1,M=g.map((L,V)=>{if(V===r)return C;let A=p[V];return A??u[V]}),W=s;P?W=Math.max(s,g[E]):W=Math.min(s,g[E]);let I=PI(g,E,W,i,a,l,c,M),O=P?E-1:E+1,F=I[O-1],k=I[O+1],U=F!=null?F+m:i;U=Math.max(U,i+O*m);let _=k!=null?k-m:a;_=Math.min(_,a-(I.length-1-O)*m);let B=Ct(C,U,_);return I[O]=Number(B.toFixed(12)),{value:I,thumbIndex:E,didSwap:!0}}case"none":default:return{value:g,thumbIndex:r,didSwap:!1}}}var tre=2;function ore(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 n=t?"Top":"InlineStart",r=t?"Bottom":"InlineEnd";return{start:o(e[`border${n}Width`])+o(e[`padding${n}`]),end:o(e[`border${r}Width`])+o(e[`padding${r}`])}}function hG(e,t){if(t.current!=null&&e.changedTouches){let o=e;for(let n=0;n<o.changedTouches.length;n+=1){let r=o.changedTouches[n];if(r.identifier===t.current)return{x:r.clientX,y:r.clientY}}return null}return{x:e.clientX,y:e.clientY}}var xG=zr.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t,{disabled:a,dragging:l,inset:c,isArrayValue:u,lastChangeReasonRef:p,max:d,min:m,minStepsBetweenValues:g,onValueCommitted:R,orientation:b,pressedThumbCenterOffsetRef:x,pressedThumbIndexRef:h,pressedValuesRef:C,registerFieldControlRef:y,renderBeforeHydration:S,setActive:w,setDragging:v,setValue:P,state:N,step:E,thumbCollisionBehavior:M,thumbRefs:W,values:I}=us(),O=kt(),F=I.length>1,k=b==="vertical",U=zr.useRef(null),_=zr.useRef(null),B=q(z=>{z&&_.current==null&&(_.current=rt(z).getComputedStyle(z))}),L=zr.useRef(null),V=zr.useRef(0),A=zr.useRef(0),K=zr.useRef(null),H=zr.useRef(!1),G=Tt(I);function oe(z){return z?.querySelector('input[type="range"]')}function ee(z){h.current=z,W.current[z]||(x.current=null)}function X(){h.current=-1,x.current=null}function te(z){return lt(z)?W.current.some(Re=>!lt(Re)||!Ne(Re,z)?!1:oe(Re)?.disabled===!0):!1}function ce(z){let Re=U.current,xe=h.current;if(!Re||xe<0||xe>=I.length)return xe>=I.length&&(K.current=null),null;let{width:Pe,height:ie,bottom:re,left:Ee,right:ye}=Re.getBoundingClientRect(),se=ore(_.current,k),Fe=A.current,ke=(k?ie:Pe)-se.start-se.end-Fe*2,de=x.current??0,Ie=z.x-de,Me=z.y-de,We=k?re-Me-se.end:(O==="rtl"?ye-Ie:Ie-Ee)-se.start,Ue=Ct((We-Fe)/ke,0,1),ze=(d-m)*Ue+m;return ze=DC(ze,E,m),ze=Ct(ze,m,d),F?RG(M,I,G.current,C.current,xe,ze,m,d,E,g):{value:u?[ze]:ze,thumbIndex:xe,didSwap:!1}}function le(z){C.current=F?I.slice():null,K.current=null,G.current=I;let Re=h.current,xe=Re;if(Re>-1&&Re<I.length){if(I[Re]===d){let Pe=Re;for(;Pe>0&&I[Pe-1]===d;)Pe-=1;xe=Pe}}else{let Pe=k?"y":"x",ie;xe=-1;for(let re=0;re<W.current.length;re+=1){let Ee=W.current[re];if(lt(Ee)&&!oe(Ee)?.disabled){let ye=MC(Ee,k),se=Math.abs(z[Pe]-ye);(ie===void 0||se<=ie)&&(xe=re,ie=se)}}}if(xe>-1&&xe!==Re&&ee(xe),c){let Pe=W.current[xe];if(lt(Pe)){let ie=Pe.getBoundingClientRect(),re=k?"height":"width";A.current=ie[re]/2}}}function Q(z){let Re=oe(W.current?.[z]);Re&&Re.focus({preventScroll:!0,focusVisible:!1})}function ne(z,Re,xe){let Pe=P(z.value,Ce(Re,xe,void 0,{activeThumbIndex:z.thumbIndex}));return Pe&&(K.current=z.value,G.current=Array.isArray(z.value)?z.value:[z.value],z.didSwap&&(ee(z.thumbIndex),Q(z.thumbIndex))),Pe}let Y=q(z=>{let Re=hG(z,L);if(Re==null)return;if(V.current+=1,z.type==="pointermove"&&z.buttons===0){ae(z);return}let xe=ce(Re);xe!=null&&EC(xe.value,E,g)&&(!l&&V.current>tre&&v(!0),ne(xe,$.drag,z))}),ae=q(z=>{if(hG(z,L)==null)return;w(-1),v(!1),x.current=null;let Re=K.current;if(Array.isArray(Re)&&Re.length!==I.length&&(K.current=null),K.current!=null){let xe=p.current;R(K.current,go(xe,z))}"pointerType"in z&&U.current?.hasPointerCapture(z.pointerId)&&U.current?.releasePointerCapture(z.pointerId),h.current=-1,Te()}),Z=q(z=>{L.current==null&&ae(z)}),ue=q(z=>{let Re=H.current;if(H.current=!1,a)return;if(te(Je(z))){X();return}let xe=z.changedTouches[0];if(xe==null)return;if(L.current=xe.identifier,!Re){let ie={x:xe.clientX,y:xe.clientY};le(ie);let re=ce(ie);if(re==null)return;Q(re.thumbIndex),ne(re,$.trackPress,z),V.current=0}let Pe=Be(U.current);Pe.addEventListener("touchmove",Y,{passive:!0}),Pe.addEventListener("touchend",ae,{passive:!0}),Pe.addEventListener("touchcancel",ae,{passive:!0})}),Te=q(()=>{let z=Be(U.current);z.removeEventListener("pointermove",Y),z.removeEventListener("pointerup",ae),z.removeEventListener("pointercancel",Z),z.removeEventListener("touchmove",Y),z.removeEventListener("touchend",ae),z.removeEventListener("touchcancel",ae),L.current=null,C.current=null,K.current=null,H.current=!1}),fe=vo();return zr.useEffect(()=>{let z=U.current;if(!z)return()=>Te();let Re=qe(z,"touchstart",ue,{passive:!0});return()=>{Re(),fe.cancel(),Te()}},[Te,ue,U,fe]),zr.useEffect(()=>{a&&Te()},[a,Te]),j("div",t,{state:N,ref:[o,y,U,B],props:[{"data-base-ui-slider-control":S?"":void 0,onPointerDown(z){H.current=!1;let Re=U.current,xe=Je(z.nativeEvent);if(!Re||a||z.defaultPrevented||!lt(xe)||z.button!==0)return;if(te(xe)){X();return}let Pe={x:z.clientX,y:z.clientY};le(Pe);let ie=ce(Pe);if(ie==null)return;Ne(W.current[ie.thumbIndex],ft(Be(Re)))?z.preventDefault():fe.request(()=>{Q(ie.thumbIndex)}),v(!0),x.current!=null||ne(ie,$.trackPress,z.nativeEvent),z.nativeEvent.pointerId&&Re.setPointerCapture(z.nativeEvent.pointerId),V.current=0,H.current=ha(z.pointerType);let ye=Be(Re);ye.addEventListener("pointermove",Y,{passive:!0}),ye.addEventListener("pointerup",ae,{once:!0}),ye.addEventListener("pointercancel",Z,{once:!0})}},i],stateAttributesMapping:Tr})});var CG=T(D(),1);var yG=CG.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t,{state:a}=us();return j("div",t,{state:a,ref:o,props:[{style:{position:"relative"}},i],stateAttributesMapping:Tr})});var ps=T(D(),1);var NC=T(D(),1),SG=T(Nd(),1);var nre=()=>()=>{},rre=()=>!0,sre=()=>!1;function ire(){return(0,SG.useSyncExternalStore)(nre,rre,sre)}function are(){let[e,t]=NC.useState(!1);return NC.useEffect(()=>{t(!0)},[]),e}var lre=Na(18)?ire:are;function Dc(){return!lre()}var jct=T(D(),1);function AC(e){let{script:t}=e,{nonce:o}=sp();return Dc()?f("script",{nonce:o,dangerouslySetInnerHTML:{__html:t},suppressHydrationWarning:!0}):null}var OC={};me(OC,{dirty:()=>gre,disabled:()=>pre,dragging:()=>cre,focused:()=>bre,index:()=>EI,invalid:()=>fre,orientation:()=>ure,touched:()=>mre,valid:()=>dre});var EI="data-index",cre="data-dragging",ure="data-orientation",pre="data-disabled",dre="data-valid",fre="data-invalid",mre="data-touched",gre="data-dirty",bre="data-focused";var vG,hre=new Set([...ur,aw,lw]);function xre(e,t,o,n){if(!(t<0))return e.length===2?`${wn(e[t],n,o)} ${t===0?"start":"end"} range`:o?wn(e[t],n,o):void 0}function Cre(e,t,o,n,r){let s=e+t*o,i=Number(s.toFixed(Math.max(Mp(e),Mp(t),Mp(n))));return Ct(i,n,r)}var wG=ps.forwardRef(function(t,o){let{render:n,children:r,className:s,"aria-describedby":i,"aria-label":a,"aria-labelledby":l,"aria-valuetext":c,disabled:u=!1,getAriaLabel:p,getAriaValueText:d,id:m,index:g,inputRef:R,onBlur:b,onFocus:x,onKeyDown:h,tabIndex:C,style:y,...S}=t,w=Ye(m),{active:v,lastUsedThumbIndex:P,controlRef:N,disabled:E,validation:M,format:W,handleInputChange:I,inset:O,isArrayValue:F,labelId:k,largeStep:U,locale:_,max:B,min:L,minStepsBetweenValues:V,form:A,name:K,orientation:H,pressedThumbCenterOffsetRef:G,pressedThumbIndexRef:oe,renderBeforeHydration:ee,setActive:X,setIndicatorPosition:te,state:ce,step:le,thumbRefs:Q,values:ne}=us(),Y=kt(),ae=u||E,Z=ne.length>1,ue=H==="vertical",Te=Y==="rtl",{setTouched:fe,validationMode:ve}=ht(),z=ps.useRef(null),Re=ps.useRef(null),xe=ln(ae,Re),Pe=ps.useRef(!1),ie=q(Oe=>{Pe.current||x?.(Oe)}),re=q(Oe=>{Pe.current||b?.(Oe)}),Ee=Ye(),ye=Ao(),se=Z?Ee:ye,Fe=ps.useMemo(()=>({inputId:se}),[se]),{ref:ke,index:de}=bo({metadata:Fe}),Ie=Z?g??de:0,Me=Ie===ne.length-1,We=ne[Ie],Ue=ua(We,L,B),[ze,He]=ps.useState(),je=Dc(),Qe=P>=0&&P<ne.length?P:-1,et=q(()=>{let Oe=N.current,$e=z.current;if(!Oe||!$e)return;let Ve=$e.getBoundingClientRect(),Ze=Oe.getBoundingClientRect(),at=ue?"height":"width",Ke=Ze[at]-Ve[at],jt=(Ve[at]/2+Ke*Ue/100)/Ze[at]*100,xt=Number.isFinite(jt)?jt:void 0;He(xt),Ie===0?te(mo=>[xt,mo[1]]):Me&&te(mo=>[mo[0],xt])});J(()=>{O&&queueMicrotask(et)},[et,O]),J(()=>{O&&et()},[et,O,Ue]),J(()=>{if(!O)return;let Oe=N.current,$e=z.current;if(!Oe||!$e)return;let Ve=rt(Oe).ResizeObserver;if(typeof Ve!="function")return;let Ze=new Ve(et);return Ze.observe(Oe),Ze.observe($e),()=>{Ze.disconnect()}},[N,et,O]);let ut=ue?"bottom":"insetInlineStart",vt=ue?"left":"top",De;Z?v===Ie?De=2:Qe===Ie&&(De=1):v===Ie&&(De=1);let he;!O&&!Number.isFinite(Ue)?he=wo:he={position:"absolute",[ut]:O?"var(--position)":`${Ue}%`,[vt]:"50%",translate:`${(ue||!Te?-1:1)*50}% ${(ue?1:-1)*50}%`,zIndex:De,...O&&{"--position":`${ze??0}%`,visibility:ee&&je||ze===void 0?"hidden":void 0}};let be;ue&&(be=Te?"vertical-rl":"vertical-lr");let Le=typeof p=="function"?p(Ie):a,pe=Mt({"aria-label":Le,"aria-labelledby":l??(Le==null?k:void 0),"aria-describedby":i,"aria-orientation":H,"aria-valuenow":We,"aria-valuetext":typeof d=="function"?d(wn(We,_,W),We,Ie):c??xre(ne,Ie,W,_),disabled:ae,form:A,id:se,max:B,min:L,name:K,onChange(Oe){I(Oe.currentTarget.valueAsNumber,Ie,Oe)},onFocus(Oe){let $e=Pe.current;Pe.current=!1,X(Ie),xe(!0),$e&&Oe.stopPropagation()},onBlur(Oe){if(Pe.current){Oe.stopPropagation();return}X(-1),!Q.current.some($e=>Ne($e,Oe.relatedTarget))&&(fe(!0),xe(!1),ve==="onBlur"&&M.commit(PC(We,Ie,L,B,F,ne)))},onKeyDown(Oe){if(Oe.defaultPrevented||!hre.has(Oe.key))return;ur.has(Oe.key)&&Oe.stopPropagation();let $e=null,Ve=0,Ze=Oe.shiftKey?U:le,at=DC(We,le,L);switch(Oe.key){case xu:Ve=1;break;case Su:Ve=Te?-1:1;break;case Cu:Ve=-1;break;case yu:Ve=Te?1:-1;break;case aw:Ze=U,Ve=1;break;case lw:Ze=U,Ve=-1;break;case wu:$e=Z&&Number.isFinite(ne[Ie+1])?ne[Ie+1]-le*V:B;break;case vu:$e=Z&&Number.isFinite(ne[Ie-1])?ne[Ie-1]+le*V:L;break;default:break}if(Ve!==0&&($e=Cre(at,Ze,Ve,L,B)),$e!==null){let Ke=Oe.currentTarget;Qs(Ke)||(Pe.current=!0,Ke.blur(),Ke.focus({preventScroll:!0,focusVisible:!0})),I($e,Ie,Oe),Oe.preventDefault()}},step:le,style:{...wo,width:"100%",height:"100%",writingMode:be},tabIndex:C,type:"range",value:We??""},Oe=>M.getValidationProps(ae,Oe),{onFocus:ie,onBlur:re,onKeyDown:h}),Ae=Wt(Re,M.inputRef,R);return j("div",t,{state:ce,ref:[o,ke,z],props:[{[EI]:Ie,children:f(ps.Fragment,{children:[r,f("input",{ref:Ae,...pe,suppressHydrationWarning:!0}),O&&Me&&ee&&(vG||(vG=f(AC,{script:""})))]}),id:w,onPointerDown(Oe){if(ae)return;oe.current=Ie;let $e=MC(Oe.currentTarget,ue);G.current=(ue?Oe.clientY:Oe.clientX)-$e},style:he,suppressHydrationWarning:ee||void 0},S],stateAttributesMapping:Tr})});var PG=T(D(),1);function yre(e,t,o,n,r,s){let i={visibility:s||o&&(n===void 0||t&&r===void 0)?"hidden":void 0,position:e?"absolute":"relative",[e?"width":"height"]:"inherit"},a=`${n??0}%`,l=`${(r??0)-(n??0)}%`;return o&&(i["--start-position"]=a,a="var(--start-position)",t&&(i["--relative-size"]=l,l="var(--relative-size)")),i[e?"bottom":"insetInlineStart"]=t?a:0,i[e?"height":"width"]=t?l:a,i}var EG=PG.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t,{indicatorPosition:a,inset:l,max:c,min:u,orientation:p,renderBeforeHydration:d,state:m,values:g}=us(),R=Dc(),b=p==="vertical",x=g.length>1,h=yre(b,x,l,l?a[0]:ua(g[0],u,c),l?a[1]:ua(g[g.length-1],u,c),l&&d&&R);return j("div",t,{state:m,ref:o,props:[{"data-base-ui-slider-indicator":d?"":void 0,style:h,suppressHydrationWarning:d||void 0},i],stateAttributesMapping:Tr})});var TI={};me(TI,{dirty:()=>Ire,disabled:()=>wre,dragging:()=>Sre,focused:()=>Mre,invalid:()=>Ere,orientation:()=>vre,touched:()=>Tre,valid:()=>Pre});var Sre="data-dragging",vre="data-orientation",wre="data-disabled",Pre="data-valid",Ere="data-invalid",Tre="data-touched",Ire="data-dirty",Mre="data-focused";var II={};me(II,{dirty:()=>Vre,disabled:()=>Are,dragging:()=>Dre,focused:()=>kre,invalid:()=>Fre,orientation:()=>Nre,touched:()=>_re,valid:()=>Ore});var Dre="data-dragging",Nre="data-orientation",Are="data-disabled",Ore="data-valid",Fre="data-invalid",_re="data-touched",Vre="data-dirty",kre="data-focused";var MI={};me(MI,{dirty:()=>jre,disabled:()=>Hre,dragging:()=>Lre,focused:()=>zre,invalid:()=>Ure,orientation:()=>Bre,touched:()=>Wre,valid:()=>Gre});var Lre="data-dragging",Bre="data-orientation",Hre="data-disabled",Gre="data-valid",Ure="data-invalid",Wre="data-touched",jre="data-dirty",zre="data-focused";var DI={};me(DI,{dirty:()=>Zre,disabled:()=>Yre,dragging:()=>$re,focused:()=>Qre,invalid:()=>Xre,orientation:()=>Kre,touched:()=>Jre,valid:()=>qre});var $re="data-dragging",Kre="data-orientation",Yre="data-disabled",qre="data-valid",Xre="data-invalid",Jre="data-touched",Zre="data-dirty",Qre="data-focused";var NI={};me(NI,{dirty:()=>ise,disabled:()=>ose,dragging:()=>ese,focused:()=>ase,invalid:()=>rse,orientation:()=>tse,touched:()=>sse,valid:()=>nse});var ese="data-dragging",tse="data-orientation",ose="data-disabled",nse="data-valid",rse="data-invalid",sse="data-touched",ise="data-dirty",ase="data-focused";var Dp={};me(Dp,{Root:()=>IG,Thumb:()=>DG});var Nc=T(D(),1);var FC=T(D(),1),AI=FC.createContext(void 0);function TG(){let e=FC.useContext(AI);if(e===void 0)throw new Error(_e(63));return e}var _C={};me(_C,{checked:()=>OI,dirty:()=>mse,disabled:()=>lse,filled:()=>gse,focused:()=>bse,invalid:()=>dse,readonly:()=>cse,required:()=>use,touched:()=>fse,unchecked:()=>FI,valid:()=>pse});var OI="data-checked",FI="data-unchecked",lse="data-disabled",cse="data-readonly",use="data-required",pse="data-valid",dse="data-invalid",fse="data-touched",mse="data-dirty",gse="data-filled",bse="data-focused";var VC={...Ut,checked(e){return e?{[OI]:""}:{[FI]:""}}};var IG=Nc.forwardRef(function(t,o){let{checked:n,className:r,defaultChecked:s,"aria-labelledby":i,form:a,id:l,inputRef:c,name:u,nativeButton:p=!1,onCheckedChange:d,readOnly:m=!1,required:g=!1,disabled:R=!1,render:b,uncheckedValue:x,value:h,style:C,...y}=t,{clearErrors:S}=eo(),{state:w,setTouched:v,setDirty:P,validityData:N,setFilled:E,validationMode:M,disabled:W,name:I,validation:O}=ht(),{labelId:F}=Vt(),k=W||R,U=I??u,_=Nc.useRef(null),B=Wt(_,c,O.inputRef),L=Nc.useRef(null),V=ln(k,L),A=Ye(),K=Ao({id:l}),H=p?void 0:K,[G,oe]=_t({controlled:n,default:!!s,name:"Switch",state:"checked"});an(L,A,G,void 0,!k,u),J(()=>{E(G)},[G,E]),oo(G,()=>{S(U),P(G!==N.initialValue),O.change(G)});let{getButtonProps:ee,buttonRef:X}=bt({disabled:k,native:p}),te=il(i,F,_,!p,H,y["aria-label"]),ce={id:p?K:A,role:"switch","aria-checked":G,"aria-readonly":m||void 0,"aria-required":g||void 0,"aria-labelledby":te,onFocus(){V(!0)},onBlur(){let Y=_.current;!Y||k||(v(!0),V(!1),M==="onBlur"&&O.commit(Y.checked))},onClick(Y){if(m||k)return;Y.preventDefault();let ae=_.current;ae&&hr(ae,Y)}},le={...O.getValidationProps(k),checked:G,disabled:k,form:a,id:H,name:U,required:g,style:U?Xn:wo,tabIndex:-1,type:"checkbox","aria-hidden":!0,ref:B,onChange(Y){if(Y.nativeEvent.defaultPrevented)return;if(m){Y.preventDefault();return}let ae=Y.currentTarget.checked,Z=Ce($.none,Y.nativeEvent);d?.(ae,Z),!Z.isCanceled&&oe(ae)},onClick(Y){Y.stopPropagation()},onFocus(){L.current?.focus()},...h!==void 0?{value:h}:ot},Q=Nc.useMemo(()=>({...w,checked:G,disabled:k,readOnly:m,required:g}),[w,G,k,m,g]),ne=j("span",t,{state:Q,ref:[o,L,X],props:[ce,y,ee,Y=>O.getValidationProps(k,Y)],stateAttributesMapping:VC});return f(AI.Provider,{value:Q,children:[ne,!G&&U&&x!==void 0&&f("input",{type:"hidden",form:a,name:U,value:x,disabled:k}),f("input",{...le,suppressHydrationWarning:!0})]})});var MG=T(D(),1);var DG=MG.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t,a=TG();return j("span",t,{state:a,ref:o,stateAttributesMapping:VC,props:i})});var _I={};me(_I,{checked:()=>Rse,dirty:()=>Pse,disabled:()=>xse,filled:()=>Ese,focused:()=>Tse,invalid:()=>vse,readonly:()=>Cse,required:()=>yse,touched:()=>wse,unchecked:()=>hse,valid:()=>Sse});var Rse="data-checked",hse="data-unchecked",xse="data-disabled",Cse="data-readonly",yse="data-required",Sse="data-valid",vse="data-invalid",wse="data-touched",Pse="data-dirty",Ese="data-filled",Tse="data-focused";var Pa={};me(Pa,{Indicator:()=>LG,List:()=>HG,Panel:()=>BG,Root:()=>AG,Tab:()=>OG});var Zo=T(D(),1);var kC=T(D(),1),VI=kC.createContext(void 0);function Dl(){let e=kC.useContext(VI);if(e===void 0)throw new Error(_e(64));return e}var LC={};me(LC,{activationDirection:()=>kI,orientation:()=>Ise});var kI="data-activation-direction",Ise="data-orientation";var Ai={tabActivationDirection:e=>({[kI]:e})};var AG=Zo.forwardRef(function(t,o){let{className:n,defaultValue:r=0,onValueChange:s,orientation:i="horizontal",render:a,value:l,style:c,...u}=t,p=t.defaultValue!==void 0,d=Zo.useRef([]),[m,g]=Zo.useState(()=>new Map),[R,b]=_t({controlled:l,default:r,name:"Tabs",state:"value"}),x=l!==void 0,[h,C]=Zo.useState(()=>new Map),y=Zo.useRef(void 0),S=Zo.useCallback(X=>LI(h,X),[h]),[w,v]=Zo.useState(()=>({previousValue:R,tabActivationDirection:"none"})),{previousValue:P,tabActivationDirection:N}=w,E=N,M=!1;P!==R&&(E=NG(P,R,i,h),M=P!=null&&R!=null&&S(R)==null);let W=M?P:R,I=P!==W||N!==E;J(()=>{I&&v({previousValue:W,tabActivationDirection:E})},[W,I,E]);let O=q((X,te)=>{let ce=NG(R,X,i,h);te.activationDirection=ce,s?.(X,te),!te.isCanceled&&b(()=>X)}),F=q((X,te)=>{s?.(X,Ce(te,void 0,void 0,{activationDirection:"none"}))}),k=q((X,te)=>(g(ce=>{let le=new Map(ce);return le.set(X,te),le}),()=>{g(ce=>{if(ce.get(X)!==te)return ce;let le=new Map(ce);return le.delete(X),le})})),U=Zo.useCallback(X=>m.get(X),[m]),_=Zo.useCallback(X=>{for(let te of h.values())if(X===te.value)return te.id},[h]),B=Zo.useMemo(()=>({getTabElementBySelectedValue:S,getTabIdByPanelValue:_,getTabPanelIdByValue:U,onValueChange:O,orientation:i,registerMountedTabPanel:k,setTabMap:C,tabActivationDirection:E,value:R}),[S,_,U,O,i,k,C,E,R]),L=Zo.useMemo(()=>{for(let X of h.values())if(X.value===R)return X},[h,R]),V=Zo.useMemo(()=>{for(let X of h.values())if(!X.disabled)return X.value},[h]),A=Zo.useRef(!p),K=Zo.useRef(r),H=Zo.useRef(p),G=Zo.useRef(!1);J(()=>{if(x)return;function X(Q,ne){b(()=>Q),v({previousValue:Q,tabActivationDirection:"none"}),F(Q,ne),A.current=!1}if(h.size===0){G.current&&R!==null&&!y.current?.isConnected&&X(null,$.missing);return}G.current=!0,y.current=h.keys().next().value;let te=L?.disabled,ce=L==null&&R!==null;if(!te&&R===K.current&&(H.current=!1),H.current&&te&&R===K.current)return;let le=A.current;if(te||ce){let Q=V??null;if(R===Q){A.current=!1;return}let ne=$.missing;le?ne=$.initial:te&&(ne=$.disabled),X(Q,ne);return}le&&L!=null&&(F(R,$.initial),A.current=!1)},[V,x,F,L,b,h,R]);let ee=j("div",t,{state:{orientation:i,tabActivationDirection:E},ref:o,props:u,stateAttributesMapping:Ai});return f(VI.Provider,{value:B,children:f(Cn,{elementsRef:d,children:ee})})});function LI(e,t){for(let[o,n]of e.entries())if(t===n.value)return o;return null}function NG(e,t,o,n){if(e==null||t==null)return"none";let[r,s,i]=o==="horizontal"?["left","left","right"]:["top","up","down"],a=LI(n,e),l=LI(n,t);if(a==null||l==null)return a!==l&&(typeof e=="number"||typeof e=="string")&&typeof e==typeof t?t>e?i:s:"none";let c=a.getBoundingClientRect()[r],u=l.getBoundingClientRect()[r];return u<c?s:u>c?i:"none"}var wa=T(D(),1);var BC=T(D(),1),BI=BC.createContext(void 0);function HC(){let e=BC.useContext(BI);if(e===void 0)throw new Error(_e(65));return e}var OG=wa.forwardRef(function(t,o){let{className:n,disabled:r=!1,render:s,value:i,id:a,nativeButton:l=!0,style:c,...u}=t,{value:p,getTabPanelIdByValue:d,onValueChange:m,orientation:g,tabActivationDirection:R}=Dl(),{activateOnFocus:b,registerTabResizeObserverElement:x,tabsListElement:h}=HC(),{highlightedIndex:C,onHighlightedIndexChange:y}=La(),S=Ye(a),w=wa.useMemo(()=>({disabled:r,id:S,value:i}),[r,S,i]),{compositeProps:v,compositeRef:P,index:N}=uh({metadata:w}),E=i===p,M=wa.useRef(!1),W=wa.useRef(null),I=q(G=>{W.current?.(),W.current=G?x(G):null});J(()=>{if(M.current){M.current=!1;return}if(!(E&&N>-1&&C!==N))return;let G=h;if(G!=null){let oe=ft(Be(G));if(oe&&Ne(G,oe))return}r||y(N)},[E,N,C,y,r,h]);let{getButtonProps:O,buttonRef:F}=bt({disabled:r,native:l,focusableWhenDisabled:!0}),k=d(i),U=wa.useRef(!1),_=wa.useRef(!1);function B(G){m(i,Ce($.none,G.nativeEvent,void 0,{activationDirection:"none"}))}function L(G){E||r||B(G)}function V(G){E||r||b&&(!U.current||_.current)&&B(G)}function A(G){if(E||r)return;U.current=!0,_.current=G.button===0;let oe=Be(G.currentTarget);function ee(){U.current=!1,_.current=!1,oe.removeEventListener("pointerup",ee),oe.removeEventListener("pointercancel",ee)}oe.addEventListener("pointerup",ee),oe.addEventListener("pointercancel",ee)}return j("button",t,{state:{disabled:r,active:E,orientation:g,tabActivationDirection:R},ref:[o,F,P,I],props:[v,{role:"tab","aria-controls":k,"aria-selected":E,id:S,onClick:L,onFocus:V,onPointerDown:A,[Sc]:E?"":void 0,onKeyDownCapture(){M.current=!0}},u,O],stateAttributesMapping:Ai})});var Np=T(D(),1);var GC={};me(GC,{activeTabBottom:()=>WI,activeTabHeight:()=>zI,activeTabLeft:()=>HI,activeTabRight:()=>GI,activeTabTop:()=>UI,activeTabWidth:()=>jI});var HI="--active-tab-left",GI="--active-tab-right",UI="--active-tab-top",WI="--active-tab-bottom",jI="--active-tab-width",zI="--active-tab-height";var FG,Mse={...Ai,activeTabPosition:()=>null,activeTabSize:()=>null},_G=2,LG=Np.forwardRef(function(t,o){let{className:n,render:r,renderBeforeHydration:s=!1,style:i,...a}=t,{getTabElementBySelectedValue:l,orientation:c,tabActivationDirection:u,value:p}=Dl(),{tabsListElement:d,registerIndicatorUpdateListener:m}=HC(),g=Fa();Np.useEffect(()=>m(g),[m,g]);let R=0,b=0,x=0,h=0,C=0,y=0,S=!1;if(p!=null&&d!=null){let W=l(p);if(W!=null){S=!0;let{width:I,height:O}=ns(W),{width:F,height:k}=ns(d),U=W.getBoundingClientRect(),_=d.getBoundingClientRect(),B=F>0?_.width/F:1,L=k>0?_.height/k:1,V=Dse(W,d);R=V.left,x=V.top;let A=(U.left-_.left)/B+d.scrollLeft-d.clientLeft,K=(U.top-_.top)/L+d.scrollTop-d.clientTop,H=Nse(W);Math.abs(A-H.x-R)<=_G&&Math.abs(K-H.y-x)<=_G&&(R=A,x=K),C=I,y=O,b=d.scrollWidth-R-C,h=d.scrollHeight-x-y}}let w=S?{left:R,right:b,top:x,bottom:h}:null,v=S?{width:C,height:y}:null,P=S?{[HI]:`${R}px`,[GI]:`${b}px`,[UI]:`${x}px`,[WI]:`${h}px`,[jI]:`${C}px`,[zI]:`${y}px`}:void 0,N=S&&C>0&&y>0,M=j("span",t,{state:{orientation:c,activeTabPosition:w,activeTabSize:v,tabActivationDirection:u},ref:o,props:[{role:"presentation",style:P,hidden:!N},a,{suppressHydrationWarning:!0}],stateAttributesMapping:Mse});return p==null?null:f(Np.Fragment,{children:[M,s&&(FG||(FG=f(AC,{script:""})))]})});function Dse(e,t){let o=VG(e),n=VG(t),r=o.left-n.left-t.clientLeft,s=o.top-n.top-t.clientTop,i=bn(e);for(;st(i)&&i!==t&&!Yn(i);)r-=i.scrollLeft,s-=i.scrollTop,i=bn(i);return{left:r,top:s}}function VG(e){let t=0,o=0,n=e;for(;n!=null;){t+=n.offsetLeft,o+=n.offsetTop;let r=n.offsetParent;r!=null&&(t+=r.clientLeft,o+=r.clientTop),n=r}return{left:t,top:o}}function Nse(e){let t=rt(e).getComputedStyle(e),{x:o,y:n}=Sl(e,t),r=o,s=n,{translate:i}=t;if(i&&i!=="none"){let a=i.split(" ");r+=kG(a[0],e.offsetWidth),s+=kG(a[1],e.offsetHeight)}return{x:r,y:s}}function kG(e,t){if(!e)return 0;let o=parseFloat(e);return Number.isFinite(o)?e.endsWith("%")?o/100*t:o:0}var WC=T(D(),1);var UC={};me(UC,{activationDirection:()=>Ase,endingStyle:()=>Vse,hidden:()=>Fse,index:()=>$I,orientation:()=>Ose,startingStyle:()=>_se});var $I="data-index",Ase="data-activation-direction",Ose="data-orientation",Fse="data-hidden",_se=Pt.startingStyle,Vse=Pt.endingStyle;var kse={...Ai,...Lt},BG=WC.forwardRef(function(t,o){let{className:n,value:r,render:s,keepMounted:i=!1,style:a,...l}=t,{value:c,getTabIdByPanelValue:u,orientation:p,tabActivationDirection:d,registerMountedTabPanel:m}=Dl(),g=Ye(),{ref:R,index:b}=bo(),x=r===c,{mounted:h,transitionStatus:C,setMounted:y}=so(x),S=!h,w=u(r),v={hidden:S,orientation:p,tabActivationDirection:d,transitionStatus:C},P=WC.useRef(null),N=j("div",t,{state:v,ref:[o,R,P],props:[{"aria-labelledby":w,hidden:S,id:g,role:"tabpanel",tabIndex:x?0:-1,inert:sn(!x),[$I]:b},l],stateAttributesMapping:kse});return It({open:x,ref:P,onComplete(){x||y(!1)}}),J(()=>{if(!(g==null||S&&!i))return m(r,g)},[S,i,r,g,m]),i||h?N:null});var Ws=T(D(),1);var HG=Ws.forwardRef(function(t,o){let{activateOnFocus:n=!1,className:r,loopFocus:s=!0,render:i,style:a,...l}=t,{orientation:c,setTabMap:u,tabActivationDirection:p}=Dl(),[d,m]=Ws.useState(0),[g,R]=Ws.useState(null),b=Ws.useRef(new Set),x=Ws.useRef(new Set),h=Ws.useRef(null);J(()=>{if(typeof ResizeObserver>"u")return;let P=new ResizeObserver(()=>{b.current.forEach(N=>{N()})});return h.current=P,g&&P.observe(g),x.current.forEach(N=>{P.observe(N)}),()=>{P.disconnect(),h.current=null}},[g]);let C=q(P=>(b.current.add(P),()=>{b.current.delete(P)})),y=q(P=>(x.current.add(P),h.current?.observe(P),()=>{x.current.delete(P),h.current?.unobserve(P)})),S={orientation:c,tabActivationDirection:p},w={"aria-orientation":c==="vertical"?"vertical":void 0,role:"tablist"},v=Ws.useMemo(()=>({activateOnFocus:n,registerIndicatorUpdateListener:C,registerTabResizeObserverElement:y,tabsListElement:g}),[n,C,y,g]);return f(BI.Provider,{value:v,children:f(gr,{render:i,className:r,style:a,state:S,refs:[o,R],props:[w,l],stateAttributesMapping:Ai,highlightedIndex:d,enableHomeAndEndKeys:!0,loopFocus:s,orientation:c,onHighlightedIndexChange:m,onMapChange:u,disabledIndices:Et})})});var KI={};me(KI,{activationDirection:()=>Lse,active:()=>Gse,disabled:()=>Hse,orientation:()=>Bse});var Lse="data-activation-direction",Bse="data-orientation",Hse="data-disabled",Gse="data-active";var YI={};me(YI,{activationDirection:()=>Use,orientation:()=>Wse});var Use="data-activation-direction",Wse="data-orientation";var qI={};me(qI,{activationDirection:()=>jse,orientation:()=>zse});var jse="data-activation-direction",zse="data-orientation";var jn={};me(jn,{Action:()=>rU,Arrow:()=>uU,Close:()=>oU,Content:()=>qG,Description:()=>QG,Portal:()=>iU,Positioner:()=>lU,Provider:()=>WG,Root:()=>YG,Title:()=>tU,Viewport:()=>jG,createToastManager:()=>fU,useToastManager:()=>dU});var UG=T(D(),1);var jC=T(D(),1),XI=jC.createContext(void 0);function Oi(){let e=jC.useContext(XI);if(!e)throw new Error(_e(73));return e}var GG=0;function zC(e){return GG+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${GG}`}function $C(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 JI(e){let t=new Map,o=0,n=0;return e.forEach((r,s)=>{let i=r.transitionStatus==="ending";t.set(r.id,{value:r,domIndex:s,visibleIndex:i?-1:o,offsetY:n}),n+=r.height||0,i||(o+=1)}),t}function ZI(e,t){let o=0;return e.map(n=>{if(n.transitionStatus==="ending")return n;let r=o>=t;return o+=1,n.limited===r?n:{...n,limited:r}})}var js={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},KC=class extends No{constructor(o){super({...o,toastMetadata:JI(o.toasts)},{},js);it(this,"timers",new Map);it(this,"areTimersPaused",!1);it(this,"setViewport",o=>{this.set("viewport",o)});it(this,"disposeEffect",()=>()=>{this.timers.forEach(o=>{o.timeout?.clear()}),this.timers.clear()});it(this,"addToast",o=>{let{timeout:n,limit:r}=this.state,s=o.id||zC("toast");if(o.id){let c=js.toast(this.state,o.id);if(c)if(c.transitionStatus==="ending")this.removeToast(o.id,!0);else{let{id:u,transitionStatus:p,...d}=o;return this.updateToastInternal(o.id,d,!0,!0),o.id}}let i={...o,id:s,updateKey:0,transitionStatus:"starting"},a=[i,...this.state.toasts];this.setToasts(ZI(a,r));let l=i.timeout??n;return i.type!=="loading"&&l>0&&this.scheduleTimer(s,l,()=>this.closeToast(s)),js.expandedOrOutOfFocus(this.state)&&this.pauseTimers(),s});it(this,"updateToast",(o,n)=>{let r=js.toast(this.state,o);!r||r.transitionStatus==="ending"||this.updateToastInternal(o,typeof n=="function"?n(r):n,!1,!0)});it(this,"updateToastInternal",(o,n,r=!1,s=!1)=>{let{timeout:i,toasts:a}=this.state,l=js.toast(this.state,o);if(!l||l.transitionStatus==="ending")return;let c={...l,...n,...s&&{updateKey:l.updateKey+1}};this.setToasts(a.map(x=>x.id===o?c:x));let u=c.timeout??i,p=l.timeout??i,d=Object.hasOwn(n,"timeout"),m=c.transitionStatus!=="ending"&&c.type!=="loading"&&u>0,g=this.timers.has(o),R=p!==u,b=l.type==="loading";if(!m&&g){this.clearTimer(o);return}m&&(!g||R||d||b||r)&&(this.clearTimer(o),this.scheduleTimer(o,u,()=>this.closeToast(o)),js.expandedOrOutOfFocus(this.state)&&this.pauseTimers())});it(this,"closeToast",o=>{let n=o===void 0,{limit:r,toasts:s}=this.state,i;if(n)i=s,this.clearTimers();else{let c=js.toast(this.state,o);if(!c)return;i=[c],this.clearTimer(o)}let a=s.map(c=>n||c.id===o?{...c,transitionStatus:"ending",height:0}:c),l=ZI(a,r);this.setToasts(l,!l.some(c=>c.transitionStatus!=="ending")),i.forEach(c=>{c.transitionStatus!=="ending"&&c.onClose?.()}),this.handleFocusManagement(o)});it(this,"promiseToast",(o,n)=>{let r=$C(n.loading),s=this.addToast({...r,type:"loading"}),i=o.then(a=>{let l=$C(n.success,a);return this.updateToast(s,{...l,type:"success",timeout:l.timeout}),a}).catch(a=>{let l=$C(n.error,a);return this.updateToast(s,{...l,type:"error",timeout:l.timeout}),Promise.reject(a)});return{}.hasOwnProperty.call(n,"setPromise")&&n.setPromise(i),i});it(this,"handleDocumentPointerDown",o=>{if(o.pointerType!=="touch")return;let n=Je(o);Ne(this.state.viewport,n)||(this.resumeTimers(),this.update({hovering:!1,focused:!1}))})}syncProviderProps(o,n){let r=this.state.limit!==n;if(this.state.timeout===o&&!r)return;let s={timeout:o,limit:n};if(r){let i=ZI(this.state.toasts,n);s.toasts=i,s.toastMetadata=JI(i)}this.update(s)}removeToast(o,n=!1){let r=js.toastIndex(this.state,o);if(r===-1)return;let s=this.state.toasts[r];n||s?.onRemove?.();let i=[...this.state.toasts];i.splice(r,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,n)=>{o.remaining=o.remaining>0?o.remaining:o.delay,o.timeout??(o.timeout=Do.create()),o.timeout.start(o.remaining,()=>{this.handleTimerFired(n),o.callback()}),o.start=Date.now()}))}restoreFocusToPrevElement(){this.state.prevFocusElement?.focus({preventScroll:!0})}scheduleTimer(o,n,r){let s=Date.now(),a=!js.expandedOrOutOfFocus(this.state)?Do.create():void 0;a?.start(n,()=>{this.handleTimerFired(o),r()}),this.timers.set(o,{timeout:a,start:s,delay:n,remaining:n,callback:r})}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,n=o.length===0){let r={toasts:o,toastMetadata:JI(o)};n&&(r.hovering=!1,r.focused=!1),this.update(r)}handleFocusManagement(o){let n=ft(Be(this.state.viewport));if(!this.state.viewport||!Ne(this.state.viewport,n)||!Qs(n))return;if(o===void 0){this.restoreFocusToPrevElement();return}let r=js.toasts(this.state),s=js.toastIndex(this.state,o),i=(l,c)=>{for(let u=l;u>=0&&u<r.length;u+=c)if(r[u].transitionStatus!=="ending")return r[u];return null},a=i(s+1,1)??i(s-1,-1);a?a.ref?.current?.focus():this.restoreFocusToPrevElement()}};var WG=function(t){let{children:o,timeout:n=5e3,limit:r=3,toastManager:s}=t,i=gt(()=>new KC({timeout:n,limit:r,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return Xs(i.disposeEffect),UG.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]),f(XI.Provider,{value:i,children:[f($se,{store:i,timeout:n,limit:r}),o]})};function $se(e){let{store:t,timeout:o,limit:n}=e;return J(()=>{t.syncProviderProps(o,n)},[t,o,n]),null}var ds=T(D(),1);var YC={};me(YC,{frontmostHeight:()=>QI});var QI="--toast-frontmost-height";var jG=ds.forwardRef(function(t,o){let{render:n,className:r,style:s,children:i,...a}=t,l=Oi(),c=ct(),u=ds.useRef(!1),p=ds.useRef(!1),d=ds.useRef(!1),m=l.useState("isEmpty"),g=l.useState("toasts"),R=l.useState("focused"),b=l.useState("expanded"),x=l.useState("prevFocusElement"),h=g[0]?.height,C=g.some(_=>_.transitionStatus==="ending"),y=g.filter(_=>_.priority==="high");ds.useEffect(()=>{let _=l.state.viewport;if(!_||m)return;let B=rt(_),L=Be(_);function V(H){H.key==="F6"&&Je(H)!==_&&(H.preventDefault(),l.set("prevFocusElement",ft(L)),_?.focus({preventScroll:!0}),l.pauseTimers(),l.set("focused",!0))}function A(H){Je(H)===B&&(l.set("isWindowFocused",!1),l.pauseTimers())}function K(H){if(H.relatedTarget)return;let G=Je(H),oe=ft(Be(_));(G===B||!Ne(_,G)||!Qs(oe))&&l.resumeTimers(),c.start(0,()=>l.set("isWindowFocused",!0))}return Wo(qe(B,"keydown",V),qe(B,"blur",A,!0),qe(B,"focus",K,!0),qe(L,"pointerdown",l.handleDocumentPointerDown,!0))},[l,c,m]);function S(_){u.current=!0;let B=_.relatedTarget===l.state.viewport?g.find(L=>L.transitionStatus!=="ending"&&!L.limited):void 0;B?B.ref?.current?.focus():l.restoreFocusToPrevElement()}function w(_){_.key==="Tab"&&_.shiftKey&&Je(_.nativeEvent)===l.state.viewport&&(_.preventDefault(),l.restoreFocusToPrevElement())}function v(){l.state.toasts.some(B=>B.transitionStatus==="ending")||d.current||!p.current||(l.set("hovering",!1),l.select("expandedOrOutOfFocus")||l.resumeTimers(),p.current=!1)}ds.useEffect(v,[C,l]);function P(){l.pauseTimers(),l.set("hovering",!0),p.current=!1}function N(){p.current=!0,v()}function E(_){_.pointerType==="touch"&&(d.current=!0)}function M(_){_.pointerType==="touch"&&(d.current=!1,v())}function W(){if(u.current){u.current=!1;return}R||Qs(ft(Be(l.state.viewport)))&&(l.set("focused",!0),l.pauseTimers())}function I(_){!R||Ne(l.state.viewport,_.relatedTarget)||(l.set("focused",!1),l.select("expandedOrOutOfFocus")||l.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:W,onBlur:I,onKeyDown:w,onClick:W,onPointerDown:E,onPointerUp:M,onPointerCancel:M,style:{[QI]:h?`${h}px`:void 0}},F={expanded:b},k=!m&&x&&f(nn,{onFocus:S}),U=j("div",t,{ref:[o,l.setViewport],state:F,props:[O,a,{children:f(ds.Fragment,{children:[k,i,k]})}]});return f(ds.Fragment,{children:[k,U,!R&&y.length>0&&f("div",{style:wo,children:y.map(_=>f("div",{role:"alert","aria-atomic":!0,children:[f("div",{children:_.title}),f("div",{children:_.description})]},_.id))})]})});var ao=T(D(),1),KG=T(on(),1);var qC=T(D(),1),eM=qC.createContext(void 0);function Nl(){let e=qC.useContext(eM);if(!e)throw new Error(_e(66));return e}var Kf={};me(Kf,{height:()=>oM,index:()=>$f,offsetY:()=>tM,swipeMovementX:()=>nM,swipeMovementY:()=>rM});var $f="--toast-index",tM="--toast-offset-y",oM="--toast-height",nM="--toast-swipe-movement-x",rM="--toast-swipe-movement-y";var XC={};me(XC,{endingStyle:()=>Zse,expanded:()=>Kse,limited:()=>Yse,startingStyle:()=>Jse,swipeDirection:()=>sM,swiping:()=>Xse,type:()=>qse});var Kse="data-expanded",Yse="data-limited",qse="data-type",Xse="data-swiping",sM="data-swipe-direction",Jse=Pt.startingStyle,Zse=Pt.endingStyle;var Qse={...Lt,swipeDirection(e){return e?{[sM]:e}:null}},zG=40,eie=10,$G=.5,tie=1,oie=`${Td},${ZO}`,YG=ao.forwardRef(function(t,o){let{toast:n,render:r,className:s,swipeDirection:i=["down","right"],style:a,...l}=t,c=n.positionerProps?.anchor!==void 0,u=[];c||(u=Array.isArray(i)?i:[i]);let p=u.length>0,d=Oi(),[m,g]=ao.useState(void 0),[R,b]=ao.useState(!1),[x,h]=ao.useState(!1),[C,y]=ao.useState({x:0,y:0}),[S,w]=ao.useState({x:0,y:0,scale:1}),[v,P]=ao.useState(),[N,E]=ao.useState(),[M,W]=ao.useState(null),I=ao.useRef(null),O=ao.useRef(void 0),F=ao.useRef({x:0,y:0}),k=ao.useRef({x:0,y:0,scale:1}),U=ao.useRef(void 0),_=ao.useRef(0),B=ao.useRef(!1),L=ao.useRef({x:0,y:0}),V=ao.useRef(!1),A=ao.useRef({x:0,y:0}),K=ao.useRef(null),H=ao.useRef(null),G=d.useState("toastIndex",n.id),oe=d.useState("toastVisibleIndex",n.id),ee=d.useState("toastOffsetY",n.id),X=d.useState("focused"),te=d.useState("expanded");It({open:n.transitionStatus!=="ending",ref:I,onComplete(){n.transitionStatus==="ending"&&d.removeToast(n.id)}});let ce=q((xe=!1)=>{let Pe=I.current;if(!Pe)return;let ie=Pe.style.height;Pe.style.height="auto";let re=Pe.offsetHeight;Pe.style.height=ie;function Ee(){d.updateToastInternal(n.id,{ref:I,height:re,transitionStatus:void 0})}xe?KG.flushSync(Ee):Ee()});J(()=>{let xe=O.current;n.transitionStatus!=="starting"&&xe===n.id||(xe!==void 0&&(g(void 0),w({x:0,y:0,scale:1}),le({x:0,y:0})),O.current=n.id,ce())},[ce,n.id,n.transitionStatus]);function le(xe){A.current=xe,y(xe)}J(()=>()=>{H.current?.abort()},[]);function Q(xe,Pe){let ie=ye=>ye>0?ye**$G:-(Math.abs(ye)**$G),re=xe>0&&!u.includes("right")||xe<0&&!u.includes("left"),Ee=Pe>0&&!u.includes("down")||Pe<0&&!u.includes("up");return{x:re?ie(xe):xe,y:Ee?ie(Pe):Pe}}let ne=q(xe=>{if(xe.pointerId!==K.current)return;K.current=null,H.current?.abort(),H.current=null,b(!1),h(!1),W(null);let Pe=k.current;if(xe.type==="pointercancel"||B.current){le({x:Pe.x,y:Pe.y}),g(void 0);return}let ie=A.current,re=ie.x-Pe.x,Ee=ie.y-Pe.y,ye;for(let se of u)if(un(se,re,Ee)>zG){ye=se;break}ye?(g(ye),d.closeToast(n.id)):(le({x:Pe.x,y:Pe.y}),g(void 0))});function Y(xe){if(xe.button!==0)return;xe.pointerType==="touch"&&d.pauseTimers();let Pe=Je(xe.nativeEvent);if(Xt(Pe,`button,a,input,textarea,[role="button"],${oie}`))return;B.current=!1,U.current=void 0,_.current=0,K.current=xe.pointerId,F.current={x:xe.clientX,y:xe.clientY},L.current=F.current;let re=xe.currentTarget,Ee=Sl(re);k.current=Ee,w(Ee),le({x:Ee.x,y:Ee.y}),d.set("hovering",!0),b(!0),h(!1),W(null),V.current=!0,H.current?.abort();let ye=new AbortController;H.current=ye;let se=Be(re);se.addEventListener("pointerup",ne,{signal:ye.signal}),se.addEventListener("pointercancel",ne,{signal:ye.signal}),re.setPointerCapture?.(xe.pointerId)}function ae(xe){if(xe.pointerId!==K.current)return;xe.preventDefault(),V.current&&(F.current={x:xe.clientX,y:xe.clientY},V.current=!1);let{clientY:Pe,clientX:ie,movementX:re,movementY:Ee}=xe;(Ee<0&&Pe>L.current.y||Ee>0&&Pe<L.current.y)&&(L.current={x:L.current.x,y:Pe}),(re<0&&ie>L.current.x||re>0&&ie<L.current.x)&&(L.current={x:ie,y:L.current.y});let ye=ie-F.current.x,se=Pe-F.current.y,Fe=Pe-L.current.y,ke=ie-L.current.x,de=M;if(!x&&Math.sqrt(ye*ye+se*se)>=tie){h(!0);let Qe=u.includes("left")||u.includes("right"),et=u.includes("up")||u.includes("down");if(Qe&&et){let ut=Math.abs(ye),vt=Math.abs(se);de=ut>vt?"horizontal":"vertical",W(de)}}let Ie;if(!U.current)de==="vertical"?se>0?Ie="down":se<0&&(Ie="up"):de==="horizontal"?ye>0?Ie="right":ye<0&&(Ie="left"):Math.abs(ye)>=Math.abs(se)?Ie=ye>0?"right":"left":Ie=se>0?"down":"up",Ie&&u.includes(Ie)&&(U.current=Ie,_.current=un(Ie,ye,se),g(Ie));else{let je=U.current,Qe=un(je,ke,Fe);Qe>zG?(B.current=!1,g(je)):!(u.includes("left")&&u.includes("right"))&&!(u.includes("up")&&u.includes("down"))&&_.current-Qe>=eie&&(B.current=!0)}let Me=Q(ye,se),We=k.current.x,Ue=k.current.y,ze=u.includes("left")||u.includes("right"),He=u.includes("up")||u.includes("down");de!=="vertical"&&ze&&(We+=Me.x),de!=="horizontal"&&He&&(Ue+=Me.y),le({x:We,y:Ue})}function Z(xe){if(xe.key==="Escape"){if(!I.current||!Ne(I.current,ft(Be(I.current))))return;d.closeToast(n.id)}}ao.useEffect(()=>{let xe=I.current;if(!p||!xe)return;function Pe(ie){K.current===null||!Ne(xe,Je(ie))||ie.preventDefault()}return qe(xe,"touchmove",Pe,{passive:!1})},[p]);function ue(){let xe=C.x-S.x,Pe=C.y-S.y;return{transition:R?"none":void 0,transform:R?`translateX(${C.x}px) translateY(${C.y}px) scale(${S.scale})`:void 0,[nM]:`${xe}px`,[rM]:`${Pe}px`}}let Te=n.priority==="high",fe={role:Te?"alertdialog":"dialog",tabIndex:0,"aria-modal":!1,"aria-labelledby":v,"aria-describedby":N,"aria-hidden":Te&&!X?!0:void 0,onPointerDown:p?Y:void 0,onPointerMove:p?ae:void 0,onPointerUp:p?ne:void 0,onPointerCancel:p?ne:void 0,onKeyDown:Z,inert:sn(n.limited),style:{...ue(),[$f]:n.transitionStatus==="ending"?G:oe,[tM]:`${ee}px`,[oM]:n.height?`${n.height}px`:void 0}},ve=ao.useMemo(()=>({toast:n,setTitleId:P,setDescriptionId:E,recalculateHeight:ce,visibleIndex:oe,expanded:te}),[n,P,E,ce,oe,te]),z={transitionStatus:n.transitionStatus,expanded:te,limited:n.limited||!1,type:n.type,swiping:R,swipeDirection:m},Re=j("div",t,{ref:[o,I],state:z,stateAttributesMapping:Qse,props:[fe,l]});return f(eM.Provider,{value:ve,children:Re})});var JC=T(D(),1);var qG=JC.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t,{visibleIndex:a,expanded:l,recalculateHeight:c}=Nl(),u=JC.useRef(null);J(()=>{c();let m=u.current;if(!m||typeof ResizeObserver!="function"||typeof MutationObserver!="function")return;let g=new ResizeObserver(()=>c(!0)),R=new MutationObserver(()=>c(!0));return g.observe(m),R.observe(m,{childList:!0,subtree:!0,characterData:!0}),()=>{g.disconnect(),R.disconnect()}},[c]);let p=a>0;return j("div",t,{ref:[o,u],state:{expanded:l,behind:p},props:i})});var ZG=T(D(),1);var XG=T(D(),1);function JG(e){return e==null||typeof e=="boolean"||e===""?!1:Array.isArray(e)?e.some(JG):!0}function ZC(e){return XG.isValidElement(e)&&JG(e.props.children)}function QC(e,t,o){let{toast:n,setTitleId:r,setDescriptionId:s}=Nl(),i=o==="title"?r:s,a=t??(o==="title"?n.title:n.description);return{id:Kn(e),children:a,type:n.type,setId:i}}function ey(e,t,o){let n=ZC(e);return J(()=>{if(n)return o(t),()=>{o(r=>r===t?void 0:r)}},[n,t,o]),n?e:null}var QG=ZG.forwardRef(function(t,o){let{render:n,className:r,style:s,id:i,children:a,...l}=t,{id:c,children:u,type:p,setId:d}=QC(i,a,"description"),g=j("p",t,{ref:o,state:{type:p},props:{...l,id:c,children:u}});return ey(g,c,d)});var eU=T(D(),1);var tU=eU.forwardRef(function(t,o){let{render:n,className:r,style:s,id:i,children:a,...l}=t,{id:c,children:u,type:p,setId:d}=QC(i,a,"title"),g=j("h2",t,{ref:o,state:{type:p},props:{...l,id:c,children:u}});return ey(g,c,d)});var ty=T(D(),1);var oU=ty.forwardRef(function(t,o){let{render:n,className:r,style:s,disabled:i,nativeButton:a=!0,...l}=t,c=Oi(),{toast:u,expanded:p}=Nl(),[d,m]=ty.useState(!1),{getButtonProps:g,buttonRef:R}=bt({disabled:i,native:a}),b={type:u.type};return j("button",t,{ref:[o,R],state:b,props:[{"aria-hidden":!p&&!d,onClick(){c.closeToast(u.id)},onFocus(){m(!0)},onBlur(){m(!1)}},l,g]})});var nU=T(D(),1);var rU=nU.forwardRef(function(t,o){let{render:n,className:r,style:s,disabled:i,nativeButton:a=!0,...l}=t,{toast:c}=Nl(),u=c.actionProps?.children??l.children,{getButtonProps:p,buttonRef:d}=bt({disabled:i,native:a}),m={type:c.type},g=j("button",t,{ref:[o,d],state:m,props:[l,c.actionProps,p,{children:u}]});return ZC(g)?g:null});var sU=T(D(),1);var iU=sU.forwardRef(function(t,o){return f(hp,{ref:o,...t})});var ny=T(D(),1);var oy=T(D(),1),iM=oy.createContext(void 0);function aU(){let e=oy.useContext(iM);if(e===void 0)throw new Error(_e(84));return e}var lU=ny.forwardRef(function(t,o){let{toast:n,...r}=t,s=Oi(),i=n.positionerProps??ot,{render:a,className:l,anchor:c=i.anchor,positionMethod:u=i.positionMethod??"absolute",side:p=i.side??"top",align:d=i.align??"center",sideOffset:m=i.sideOffset??0,alignOffset:g=i.alignOffset??0,collisionBoundary:R=i.collisionBoundary??"clipping-ancestors",collisionPadding:b=i.collisionPadding??5,arrowPadding:x=i.arrowPadding??5,sticky:h=i.sticky??!1,disableAnchorTracking:C=i.disableAnchorTracking??!1,collisionAvoidance:y=i.collisionAvoidance??Xr,style:S,...w}=r,[v,P]=ny.useState(null),N=s.useState("toastIndex",n.id),E=s.useState("toastVisibleIndex",n.id),M=lt(c)?c:null,W=Is({open:!0,onOpenChange:nt,elements:{floating:v,reference:M}}),I=wr({anchor:M,positionMethod:u,floatingRootContext:W,mounted:!0,side:p,sideOffset:m,align:d,alignOffset:g,collisionBoundary:R,collisionPadding:b,sticky:h,arrowPadding:x,disableAnchorTracking:C,keepMounted:!0,collisionAvoidance:y}),O={side:I.side,align:I.align,anchorHidden:I.anchorHidden},F=Qn(t,O,{styles:{...I.positionerStyles,[$f]:n.transitionStatus==="ending"?N:E},transitionStatus:n.transitionStatus,props:w,refs:[o,P]});return f(iM.Provider,{value:I,children:F})});var cU=T(D(),1);var uU=cU.forwardRef(function(t,o){let{className:n,render:r,style:s,...i}=t,{arrowRef:a,side:l,align:c,arrowUncentered:u,arrowStyles:p}=aU();return j("div",t,{state:{side:l,align:c,uncentered:u},ref:[o,a],props:[{style:p,"aria-hidden":!0},i]})});var pU=T(D(),1);function dU(){let e=Oi(),t=e.useState("toasts");return pU.useMemo(()=>({toasts:t,add:e.addToast,close:e.closeToast,update:e.updateToast,promise:e.promiseToast}),[t,e])}function fU(){let e=new Set;function t(o){e.forEach(n=>n(o))}return{" subscribe":function(n){return e.add(n),()=>{e.delete(n)}},add(o){let n=o.id||zC("toast"),r={...o,id:n,transitionStatus:"starting"};return t({action:"add",options:r}),n},close(o){t({action:"close",options:{id:o}})},update(o,n){t({action:"update",options:{id:o,updates:n}})},promise(o,n){let r=o;return t({action:"promise",options:{...n,promise:o,setPromise(s){r=s}}}),r}}}var aM={};me(aM,{expanded:()=>nie});var nie="data-expanded";var lM={};me(lM,{behind:()=>sie,expanded:()=>rie});var rie="data-expanded",sie="data-behind";var cM={};me(cM,{type:()=>iie});var iie="data-type";var uM={};me(uM,{type:()=>aie});var aie="data-type";var pM={};me(pM,{type:()=>lie});var lie="data-type";var dM={};me(dM,{type:()=>cie});var cie="data-type";var fM={};me(fM,{anchorHeight:()=>fie,anchorWidth:()=>die,availableHeight:()=>pie,availableWidth:()=>uie,transformOrigin:()=>mie});var uie="--available-width",pie="--available-height",die="--anchor-width",fie="--anchor-height",mie="--transform-origin";var mM={};me(mM,{align:()=>Rie,anchorHidden:()=>gie,side:()=>bie});var gie=ge.anchorHidden,bie=ge.side,Rie=ge.align;var gM={};me(gM,{align:()=>xie,side:()=>hie,uncentered:()=>Cie});var hie=ge.side,xie=ge.align,Cie="data-uncentered";var Yf=T(D(),1);var ry=T(D(),1),bM=ry.createContext(void 0);function mU(){return ry.useContext(bM)}var sy=Yf.forwardRef(function(t,o){let{className:n,defaultPressed:r=!1,disabled:s=!1,form:i,onPressedChange:a,pressed:l,render:c,type:u,value:p,nativeButton:d=!0,style:m,...g}=t,R=Ye(p||void 0),b=mU(),x=b?.value??[],h=(s||b?.disabled)??!1,[C,y]=_t({controlled:b?R!==void 0&&x.indexOf(R)>-1:l,default:r,name:"Toggle",state:"pressed"}),{getButtonProps:S,buttonRef:w}=bt({disabled:h,native:d}),v={disabled:h,pressed:C},P=[w,o],N=[{"aria-pressed":C,onClick(W){let I=!C,O=Ce($.none,W.nativeEvent);a?.(I,O),!O.isCanceled&&(R&&b?.setGroupValue?.(R,I,O),!O.isCanceled&&y(I))}},g,S],E=j("button",t,{enabled:!b,state:v,ref:P,props:N}),M=Yf.useMemo(()=>({disabled:h,focusableWhenDisabled:!1}),[h]);return b?f(er,{tag:"button",render:c,className:n,style:m,metadata:M,state:v,refs:P,props:N}):E});var RM={};me(RM,{disabled:()=>Sie,pressed:()=>yie});var yie="data-pressed",Sie="data-disabled";var ay=T(D(),1);var iy=T(D(),1),hM=iy.createContext(void 0);function Ap(){return iy.useContext(hM)}var ly=ay.forwardRef(function(t,o){let{defaultValue:n,disabled:r=!1,loopFocus:s=!0,onValueChange:i,orientation:a="horizontal",multiple:l=!1,value:c,className:u,render:p,style:d,...m}=t,g=vn(!0),R=Ap(),b=n??Et,x=c!==void 0||n!==void 0,h=(g?.disabled??!1)||(R?.disabled??!1)||r,[C,y]=_t({controlled:c,default:b,name:"ToggleGroup",state:"value"}),S=q((E,M,W)=>{let I;l?(I=C.slice(),M?I.push(E):I.splice(C.indexOf(E),1)):I=M?[E]:[],i?.(I,W),!W.isCanceled&&y(I)}),w={disabled:h,multiple:l,orientation:a},v=ay.useMemo(()=>({disabled:h,setGroupValue:S,value:C,isValueInitialized:x}),[h,S,C,x]),P={role:"group"},N=j("div",t,{enabled:!!g,state:w,ref:o,props:[P,m]});return f(bM.Provider,{value:v,children:g?N:f(gr,{render:p,className:u,style:d,state:w,refs:[o],props:[P,m],loopFocus:s,enableHomeAndEndKeys:!0,orientation:a})})});var xM={};me(xM,{disabled:()=>vie,multiple:()=>Pie,orientation:()=>wie});var vie="data-disabled",wie="data-orientation",Pie="data-multiple";var Fi={};me(Fi,{Button:()=>xU,Group:()=>hU,Input:()=>SU,Link:()=>yU,Root:()=>RU,Separator:()=>bU});var gU=T(D(),1);var bU=gU.forwardRef(function(t,o){let r=vn().orientation==="vertical"?"horizontal":"vertical";return f(rs,{orientation:r,...t,ref:o})});var Ac=T(D(),1);var RU=Ac.forwardRef(function(t,o){let{disabled:n=!1,loopFocus:r,orientation:s="horizontal",className:i,render:a,style:l,...c}=t,[u,p]=Ac.useState(()=>new Map),d=Ac.useMemo(()=>{let b=[];for(let x of u.values())x.disabled&&!x.focusableWhenDisabled&&b.push(x.index);return b},[u]),m=Ac.useMemo(()=>({disabled:n,orientation:s}),[n,s]),g={disabled:n,orientation:s},R={"aria-orientation":s,role:"toolbar"};return f(wP.Provider,{value:m,children:f(gr,{render:a,className:i,style:l,state:g,refs:[o],props:[R,c],disabledIndices:d,loopFocus:r,onMapChange:p,orientation:s})})});var cy=T(D(),1);var hU=cy.forwardRef(function(t,o){let{className:n,disabled:r=!1,render:s,style:i,...a}=t,{orientation:l,disabled:c}=vn(),u=c||r,p=cy.useMemo(()=>({disabled:u}),[u]),m=j("div",t,{state:{disabled:u,orientation:l},ref:o,props:[{role:"group"},a]});return f(hM.Provider,{value:p,children:m})});var uy=T(D(),1);var xU=uy.forwardRef(function(t,o){let{className:n,disabled:r=!1,focusableWhenDisabled:s=!0,render:i,nativeButton:a,style:l,...c}=t,{disabled:u,orientation:p}=vn(),d=Ap(),m=u||(d?.disabled??!1)||r,g=uy.useMemo(()=>({disabled:m,focusableWhenDisabled:s}),[m,s]),{getButtonProps:R,buttonRef:b}=bt({disabled:m,focusableWhenDisabled:s,native:a});return f(er,{tag:"button",render:i,className:n,style:l,metadata:g,state:{disabled:m,orientation:p,focusable:s},refs:[o,b],props:[c,i?{disabled:m}:ot,R]})});var CU=T(D(),1);var Eie={disabled:!1,focusableWhenDisabled:!0},yU=CU.forwardRef(function(t,o){let{className:n,render:r,style:s,...i}=t,{orientation:a}=vn();return f(er,{tag:"a",render:r,className:n,style:s,metadata:Eie,state:{orientation:a},refs:[o],props:[i]})});var py=T(D(),1);var SU=py.forwardRef(function(t,o){let{className:n,focusableWhenDisabled:r=!0,render:s,disabled:i=!1,style:a,...l}=t,{disabled:c,orientation:u}=vn(),p=Ap(),d=c||(p?.disabled??!1)||i,m=py.useMemo(()=>({disabled:d,focusableWhenDisabled:r}),[d,r]),{props:g}=dg({composite:!0,disabled:d,focusableWhenDisabled:r,isNativeButton:!1}),R={disabled:d,orientation:u,focusable:r},b=h=>{d&&h.preventDefault()};return f(er,{tag:"input",render:s,className:n,style:a,metadata:m,state:R,refs:[o],props:[{onClick:b,onPointerDown:b},l,g]})});var CM={};me(CM,{orientation:()=>Tie});var Tie="data-orientation";var yM={};me(yM,{disabled:()=>Iie,orientation:()=>Mie});var Iie="data-disabled",Mie="data-orientation";var SM={};me(SM,{disabled:()=>Die,orientation:()=>Nie});var Die="data-disabled",Nie="data-orientation";var vM={};me(vM,{disabled:()=>Aie,focusable:()=>Fie,orientation:()=>Oie});var Aie="data-disabled",Oie="data-orientation",Fie="data-focusable";var wM={};me(wM,{orientation:()=>_ie});var _ie="data-orientation";var PM={};me(PM,{disabled:()=>Vie,focusable:()=>Lie,orientation:()=>kie});var Vie="data-disabled",kie="data-orientation",Lie="data-focusable";var Ir={};me(Ir,{Arrow:()=>HU,Handle:()=>qf,Popup:()=>LU,Portal:()=>_U,Positioner:()=>VU,Provider:()=>UU,Root:()=>IU,Trigger:()=>AU,Viewport:()=>jU,createHandle:()=>zU});var Op=T(D(),1);var dy=T(D(),1),EM=dy.createContext(void 0);function fs(e){let t=dy.useContext(EM);if(t===void 0&&!e)throw new Error(_e(72));return t}var vU=T(D(),1);var wU={...cr,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},fy=class extends No{constructor(o,n,r){let s=new qo;super(EU(o,s,n,r),TU(s),wU);it(this,"setOpen",(o,n)=>{Bg(this,o,n,{extraState:{openChangeReason:n.reason}})})}cancelPendingOpen(o){this.state.floatingRootContext.dispatchOpenChange(!1,Ce($.triggerPress,o))}};function PU(){let e=new qo,t=new Qr(Object.freeze(EU(void 0,e)),Object.freeze(TU(e)),wU);return Object.assign(t,{setOpen:nt,cancelPendingOpen:nt})}function EU(e,t,o,n=!1){return{...pi(t,o,n),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...e}}function TU(e){return{popupRef:vU.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e}}var IU=Ts(function(t){let{disabled:o=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:s=!1,trackCursorAxis:i="none",actionsRef:a,onOpenChange:l,onOpenChangeComplete:c,handle:u,triggerId:p,defaultTriggerId:d=null,children:m}=t,g=qa((M,W)=>new fy({open:n,openProp:r,activeTriggerId:d,triggerIdProp:p},M,W));g.useControlledProp("openProp",r),g.useControlledProp("triggerIdProp",p),g.useContextCallback("onOpenChange",l),g.useContextCallback("onOpenChangeComplete",c);let R=g.useState("open"),b=!o&&R,x=g.useState("activeTriggerId"),h=g.useState("mounted"),C=g.useState("payload");g.useSyncedValues({trackCursorAxis:i,disableHoverablePopup:s,disabled:o}),ii(g,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:y,transitionStatus:S}=ai(b,g),w=g.useState("isInstantPhase"),v=g.useState("instantType"),P=g.useState("lastOpenChangeReason"),N=Op.useRef(null);J(()=>{R&&o&&g.setOpen(!1,Ce($.disabled))},[R,o,g]),J(()=>{S==="ending"&&P===$.none||S!=="ending"&&w?(v!=="delay"&&(N.current=v),g.set("instantType","delay")):N.current!==null&&(g.set("instantType",N.current),N.current=null)},[S,w,P,v,g]),J(()=>{b&&x==null&&g.set("payload",void 0)},[g,x,b]),Op.useImperativeHandle(a,()=>({unmount:y,close:()=>g.setOpen(!1,Ce($.imperativeAction))}),[y,g]);let E=b||h||!o&&i!=="none";return f(EM.Provider,{value:g,children:[u&&f(ri,{handle:u,store:g}),E&&f(Bie,{store:g,disabled:o,trackCursorAxis:i}),typeof m=="function"?m({payload:C}):m]})});function Bie({store:e,disabled:t,trackCursorAxis:o}){let n=e.useState("floatingRootContext"),r=Vn(n,{enabled:!t,referencePress:()=>e.select("closeOnClick")}),s=kv(n,{enabled:!t&&o!=="none",axis:o==="none"?void 0:o}),i=Op.useMemo(()=>Mt(s.reference,r.reference),[s.reference,r.reference]);return li(e,{activeTriggerProps:i,inactiveTriggerProps:i,popupProps:r.floating??ot}),null}var gy=T(D(),1);var my=T(D(),1),TM=my.createContext(void 0);function MU(){return my.useContext(TM)}var DU="data-base-ui-tooltip-trigger";function NU(e){let t=Je(e);return lt(t)?t:null}var AU=ci(function(t,o){let{render:n,className:r,style:s,handle:i,payload:a,disabled:l,delay:c,closeOnClick:u=!0,closeDelay:p,id:d,...m}=t,g=fs(!0),b=di(i)??g;if(!b)throw new Error(_e(82));let x=Ye(d),h=b.useState("isTriggerActive",x),C=b.useState("isOpenedByTrigger",x),y=b.useState("floatingRootContext"),S=gy.useRef(null),w=p??0,{registerTrigger:v,isMountedByThisTrigger:P}=si(x,S,b,{payload:a,closeOnClick:u,closeDelay:w}),N=MU(),{activeIdRef:E,delayRef:M,isInstantPhase:W,hasProvider:I}=Pv(y,{open:C}),O=Ja(y);b.useSyncedValue("isInstantPhase",W);let F=b.useState("disabled"),k=l??F,U=Tt(k),_=b.useState("trackCursorAxis"),B=b.useState("disableHoverablePopup"),L=gy.useRef(!1),V=ct(),A=gy.useRef(void 0);function K(){return I&&E.current!=null?0:c??N??600}function H(Q){let ne=S.current;if(!ne||!Q)return!1;let Y=Xt(Q,`[${DU}]`);return Y!==null&&Y!==ne&&Ne(ne,Y)}function G(Q){let ne=H(Q);return L.current=ne,ne&&(O.openChangeTimeout.clear(),O.restTimeout.clear(),O.restTimeoutPending=!1,V.clear()),ne}let oe=Hr(y,{enabled:!k,mouseOnly:!0,move:!1,handleClose:!B&&_!=="both"?Gr():null,restMs:K,delay(){return p==null&&I?{close:ys(M.current,"close")}:{close:w}},triggerElementRef:S,isActiveTrigger:h,isClosing:()=>b.select("transitionStatus")==="ending",shouldOpen(){return!L.current}}),ee=nc(y,{enabled:!k}).reference,X=Q=>{let ne=L.current,Y=NU(Q),ae=G(Y),Z=S.current,ue=Z&&Y&&Ne(Z,Y);if(ae&&b.select("open")&&b.select("lastOpenChangeReason")===$.triggerHover){b.setOpen(!1,Ce($.triggerHover,Q));return}if(ne&&!ae&&ue&&!U.current&&!b.select("open")&&Z&&Ar(A.current)){let Te=()=>{!L.current&&!U.current&&!b.select("open")&&b.setOpen(!0,Ce($.triggerHover,Q,Z))},fe=K();fe===0?(V.clear(),Te()):V.start(fe,Te)}},te=b.useState("appliedTriggerProps",P||_!=="none");return j("button",t,{state:{open:C},ref:[o,v,S],props:[oe,ee,te,{onMouseOver(Q){X(Q.nativeEvent)},onFocus(Q){H(NU(Q.nativeEvent))&&Q.preventBaseUIHandler()},onMouseLeave(){L.current=!1,V.clear(),A.current=void 0},onPointerEnter(Q){A.current=Q.pointerType},onPointerDown(Q){A.current=Q.pointerType,b.set("closeOnClick",u),u&&!b.select("open")&&b.cancelPendingOpen(Q.nativeEvent)},onClick(Q){u&&!b.select("open")&&b.cancelPendingOpen(Q.nativeEvent)},id:x,[cu]:k?"":void 0,[DU]:k?void 0:""},m],stateAttributesMapping:qn})});var FU=T(D(),1);var by=T(D(),1),IM=by.createContext(void 0);function OU(){let e=by.useContext(IM);if(e===void 0)throw new Error(_e(70));return e}var _U=FU.forwardRef(function(t,o){let{keepMounted:n=!1,...r}=t;return fs().useState("mounted")||n?f(IM.Provider,{value:n,children:f(hp,{ref:o,...r})}):null});var hy=T(D(),1);var Ry=T(D(),1),MM=Ry.createContext(void 0);function Fp(){let e=Ry.useContext(MM);if(e===void 0)throw new Error(_e(71));return e}var VU=hy.forwardRef(function(t,o){let{render:n,className:r,anchor:s,positionMethod:i="absolute",side:a="top",align:l="center",sideOffset:c=0,alignOffset:u=0,collisionBoundary:p="clipping-ancestors",collisionPadding:d=5,arrowPadding:m=5,sticky:g=!1,disableAnchorTracking:R=!1,collisionAvoidance:b=Xr,style:x,...h}=t,C=fs(),y=OU(),S=C.useState("open"),w=C.useState("mounted"),v=C.useState("trackCursorAxis"),P=C.useState("disableHoverablePopup"),N=C.useState("floatingRootContext"),E=C.useState("instantType"),M=C.useState("transitionStatus"),W=C.useState("adaptiveOrigin"),I=wr({anchor:s,positionMethod:i,floatingRootContext:N,mounted:w,side:a,sideOffset:c,align:l,alignOffset:u,collisionBoundary:p,collisionPadding:d,sticky:g,arrowPadding:m,disableAnchorTracking:R,keepMounted:y,collisionAvoidance:b,adaptiveOrigin:W}),O=hy.useMemo(()=>({open:S,side:I.side,align:I.align,anchorHidden:I.anchorHidden,instant:v!=="none"?"tracking-cursor":E}),[S,I.side,I.align,I.anchorHidden,v,E]),F=Qn(t,O,{styles:I.positionerStyles,transitionStatus:M,props:h,refs:[o,C.useStateSetter("positionerElement")],hidden:!w,inert:!S||v==="both"||P});return f(MM.Provider,{value:I,children:F})});var kU=T(D(),1);var LU=kU.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t,a=fs(),{side:l,align:c}=Fp(),u=a.useState("open"),p=a.useState("instantType"),d=a.useState("transitionStatus"),m=a.useState("popupProps"),g=a.useState("floatingRootContext"),R=a.useState("disabled"),b=a.useState("closeDelay");It({open:u,ref:a.context.popupRef,onComplete(){u&&a.context.onOpenChangeComplete?.(!0)}}),Ms(g,{enabled:!R,closeDelay:b});let x=a.useStateSetter("popupElement");return j("div",t,{state:{open:u,side:l,align:c,instant:p,transitionStatus:d},ref:[o,a.context.popupRef,x],props:[Zn,m,Sn(d),i],stateAttributesMapping:Ro})});var BU=T(D(),1);var HU=BU.forwardRef(function(t,o){let{render:n,className:r,style:s,...i}=t,a=fs(),{arrowRef:l,side:c,align:u,arrowUncentered:p,arrowStyles:d}=Fp(),m=a.useState("open"),g=a.useState("instantType");return j("div",t,{state:{open:m,side:c,align:u,uncentered:p,instant:g},ref:[o,l],props:[{style:d,"aria-hidden":!0},i],stateAttributesMapping:lo})});var GU=T(D(),1);var UU=function(t){let{delay:o,closeDelay:n,timeout:r=400}=t,s=GU.useMemo(()=>({open:o,close:n}),[o,n]);return f(TM.Provider,{value:o,children:f(wv,{delay:s,timeoutMs:r,children:t.children})})};var WU=T(D(),1);var jU=WU.forwardRef(function(t,o){let{render:n,className:r,style:s,children:i,...a}=t,l=fs(),c=Fp(),u=l.useState("instantType"),{children:p,state:d}=Rl({store:l,side:c.side,children:i}),m={activationDirection:d.activationDirection,transitioning:d.transitioning,instant:u};return j("div",t,{state:m,ref:o,props:[a,{children:p}],stateAttributesMapping:bl})});var qf=class extends Jr{constructor(){super(PU(),"Tooltip")}open(t){this.openByTrigger(t)}close(){this.closePopup()}get isOpen(){return this.attachedStore?.select("open")??!1}};function zU(){return new qf}var DM={};me(DM,{anchorHeight:()=>Wie,anchorWidth:()=>Uie,availableHeight:()=>Gie,availableWidth:()=>Hie,positionerHeight:()=>$ie,positionerWidth:()=>zie,transformOrigin:()=>jie});var Hie="--available-width",Gie="--available-height",Uie="--anchor-width",Wie="--anchor-height",jie="--transform-origin",zie="--positioner-width",$ie="--positioner-height";var NM={};me(NM,{align:()=>Jie,anchorHidden:()=>qie,closed:()=>Yie,open:()=>Kie,side:()=>Xie});var Kie=ge.open,Yie=ge.closed,qie=ge.anchorHidden,Xie=ge.side,Jie=ge.align;var AM={};me(AM,{align:()=>nae,closed:()=>Qie,endingStyle:()=>tae,instant:()=>rae,open:()=>Zie,side:()=>oae,startingStyle:()=>eae});var Zie=ge.open,Qie=ge.closed,eae=ge.startingStyle,tae=ge.endingStyle,oae=ge.side,nae=ge.align,rae="data-instant";var OM={};me(OM,{align:()=>lae,closed:()=>iae,instant:()=>uae,open:()=>sae,side:()=>aae,uncentered:()=>cae});var sae=ge.open,iae=ge.closed,aae=ge.side,lae=ge.align,cae="data-uncentered",uae="data-instant";var FM={};me(FM,{popupHeight:()=>dae,popupWidth:()=>pae});var pae="--popup-width",dae="--popup-height";var _M={};me(_M,{activationDirection:()=>gae,current:()=>fae,instant:()=>Rae,previous:()=>mae,transitioning:()=>bae});var fae="data-current",mae="data-previous",gae="data-activation-direction",bae="data-transitioning",Rae="data-instant";function hae(e){return j(e.defaultTagName??"div",e,e)}var $D={};me($D,{Accordion:()=>mW,AccordionContent:()=>eD,AlertDialog:()=>iW,AlertDialogActions:()=>$M,AppBar:()=>dj,AppBarSpacer:()=>fj,Autocomplete:()=>tW,Avatar:()=>hW,AvatarGroup:()=>rD,Badge:()=>vW,Button:()=>Ht,Calendar:()=>am,Checkbox:()=>Jf,CheckboxGroup:()=>rW,CheckboxLabel:()=>HM,Collapsible:()=>gW,CollapsibleContent:()=>tD,Combobox:()=>en,ContextMenu:()=>uW,DatePicker:()=>ID,DatePresets:()=>lm,DescriptionItem:()=>Yy,DescriptionList:()=>Ky,Dialog:()=>sW,DialogActions:()=>zM,DialogContent:()=>jM,Drawer:()=>hn,EditableList:()=>Lj,EmptyState:()=>$s,Field:()=>$r,Fieldset:()=>XU,FieldsetDescription:()=>qU,Form:()=>BM,FormActions:()=>ZU,Input:()=>Xf,ListDetail:()=>kD,Menu:()=>rr,Menubar:()=>pW,Meter:()=>aW,MeterHeader:()=>KM,MoneyField:()=>bD,NavigationMenu:()=>QU,NumberField:()=>_i,OTPField:()=>eW,PickerButton:()=>gj,PickerSplit:()=>xj,PickerSplitMain:()=>Cj,PickerSplitTrigger:()=>yj,Popover:()=>Ea,PreviewCard:()=>dW,PreviewCardContent:()=>JM,PreviewCardDescription:()=>QM,PreviewCardImage:()=>XM,PreviewCardTitle:()=>ZM,Progress:()=>lW,ProgressHeader:()=>YM,Radio:()=>nW,RadioGroup:()=>GM,RadioLabel:()=>WM,RadioRow:()=>UM,ScrollArea:()=>CW,Select:()=>Jt,Separator:()=>yW,Sheet:()=>lj,SideNav:()=>Sj,SideNavGroup:()=>wj,SideNavItem:()=>vj,SideNavToggle:()=>Pj,Slider:()=>cW,SliderHeader:()=>qM,SplitButton:()=>Rj,Splitter:()=>Vl,StatCard:()=>pj,StatFigure:()=>$y,Switch:()=>bW,SwitchContainer:()=>oD,SwitchLabel:()=>nD,Tabs:()=>_p,Toast:()=>RW,Toggle:()=>xy,ToggleGroup:()=>Cy,Toolbar:()=>xW,Tooltip:()=>fW,addDays:()=>En,addMonths:()=>Ho,builtinPresets:()=>Ly,clampDate:()=>Lc,cn:()=>Ge,cnState:()=>qt,daysInMonth:()=>Lp,defaultPresets:()=>rm,defaultWeekStartsOn:()=>Bc,endOfWeek:()=>vy,formatMoney:()=>Fc,fromMinorUnits:()=>ms,getCurrencyDigits:()=>Vi,inclusiveDays:()=>Fl,isValidCurrency:()=>Vp,isoWeek:()=>om,last30Days:()=>Ay,last7Days:()=>Ny,lastMonth:()=>Fy,lastWeek:()=>My,lengthBlockReason:()=>Bp,nextMonth:()=>_y,nextWeek:()=>Dy,orderRange:()=>_l,parseDecimalString:()=>sD,resolvePreset:()=>sm,startOfWeek:()=>kc,thisMonth:()=>Oy,thisQuarter:()=>Vy,thisWeek:()=>Iy,toDecimalString:()=>ki,toMinorUnits:()=>kp,today:()=>Py,todayDate:()=>Li,tomorrow:()=>Ty,useListDetail:()=>FD,yearToDate:()=>ky,yesterday:()=>Ey});function Ge(...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 n=Ge(...o);n&&t.push(n)}else if(typeof o=="object")for(let[n,r]of Object.entries(o))r&&t.push(n)}return t.join(" ")}function qt(e,t,o){return Ge(e,typeof t=="function"?t(o):t)}var KU=T(D(),1);var Al=T(D(),1);function Se(e,t,o){let n=Al.forwardRef(function(s,i){let{className:a,...l}=s;return f(e,{ref:i,...l,className:c=>qt(o,a,c)})});return n.displayName=t,n}function $U(e,t,o,n){let r=Al.forwardRef(function(i,a){let{className:l,...c}=i;return f(e,{ref:a,...c,className:u=>{let p=typeof l=="function"?l(u):l,d=p?.split(/\s+/).includes(n);return Ge(d?void 0:o,p)}})});return r.displayName=t,r}function kM(e){let t=Al.Children.toArray(e);return t.length===1&&Al.isValidElement(t[0])}function Qo(e,t,{partClass:o,optIn:n=!1,otherClass:r,skipClass:s}={}){let i=Al.forwardRef(function(l,c){let{className:u,emphasis:p,palette:d,...m}=l,g=p!==void 0||d!==void 0;return f(e,{ref:c,"data-emphasis":p,"data-color":d,"data-icon-only":kM(m.children)?"":void 0,...m,className:R=>{let b=typeof u=="function"?u(R):u,x=b?.split(/\s+/)??[],h=!(s&&x.includes(s))&&(!n||g||x.includes("Button"));return Ge(o,h&&!x.includes("Button")?"Button":void 0,h?void 0:r,b)}})});return i.displayName=t,i}var Ht=KU.forwardRef(function({className:t,emphasis:o,palette:n,children:r,...s},i){return f(bR,{ref:i,"data-emphasis":o,"data-color":n,"data-icon-only":kM(r)?"":void 0,...s,className:a=>qt("Button",t,a),children:r})});Ht.displayName="Button";var YU=T(D(),1);var Xf=YU.forwardRef(function({className:t,...o},n){return f(Rx,{ref:n,...o,className:r=>qt("Input",t,r)})});Xf.displayName="Input";var Oc=T(D(),1);var xae=Oc.forwardRef(function({className:t,...o},n){return f(Wr.Root,{ref:n,...o,className:r=>qt("FieldRoot",t,r)})}),Cae=Oc.forwardRef(function({className:t,...o},n){return f(Wr.Label,{ref:n,...o,className:r=>qt("FieldLabel",t,r)})}),yae=Oc.forwardRef(function({className:t,...o},n){return f(Wr.Description,{ref:n,...o,className:r=>qt("FieldDescription",t,r)})}),Sae=Oc.forwardRef(function({className:t,...o},n){return f(Wr.Error,{ref:n,...o,className:r=>qt("FieldError",t,r)})}),vae=Oc.forwardRef(function({className:t,...o},n){return f(Wr.Control,{ref:n,...o,className:r=>qt("FieldControl",t,r)})}),wae=Wr.Validity,Pae=Oc.forwardRef(function({className:t,...o},n){return f(Wr.Item,{ref:n,...o,className:r=>qt("",t,r)})}),$r={Root:xae,Label:Cae,Description:yae,Error:Sae,Control:vae,Validity:wae,Item:Pae};var LM=T(D(),1);var Eae=LM.forwardRef(function({className:t,...o},n){return f(up.Root,{ref:n,...o,className:r=>qt("Fieldset",t,r)})}),Tae=LM.forwardRef(function({className:t,...o},n){return f(up.Legend,{ref:n,...o,className:r=>qt("FieldsetLegend",t,r)})});function qU({className:e,...t}){return f("div",{className:Ge("FieldsetDescription",e),...t})}var XU={Root:Eae,Legend:Tae};var JU=T(D(),1);var BM=JU.forwardRef(function({className:t,...o},n){return f(bx,{ref:n,...o,className:r=>qt("Form",t,r)})});BM.displayName="Form";function ZU({className:e,...t}){return f("div",{className:Ge("FormActions",e),...t})}var Kr=T(D(),1);var Iae=Kr.forwardRef(function({className:t,...o},n){return f(Un.Root,{ref:n,...o,className:r=>qt("NavigationMenuRoot",t,r)})}),Mae=Kr.forwardRef(function({className:t,...o},n){return f(Un.List,{ref:n,...o,className:r=>qt("NavigationMenuList",t,r)})}),Dae=Kr.forwardRef(function({className:t,...o},n){return f(Un.Item,{ref:n,...o,className:r=>qt("",t,r)})}),Nae=Kr.forwardRef(function({className:t,...o},n){return f(Un.Content,{ref:n,...o,className:r=>qt("NavigationMenuContent",t,r)})}),Aae=Kr.forwardRef(function({className:t,...o},n){return f(Un.Trigger,{ref:n,...o,className:r=>qt("NavigationMenuTrigger",t,r)})}),Oae=Kr.forwardRef(function({className:t,...o},n){return f(Un.Icon,{ref:n,...o,className:r=>qt("NavigationMenuIcon",t,r)})}),Fae=Un.Portal,_ae=Kr.forwardRef(function({className:t,...o},n){return f(Un.Positioner,{ref:n,...o,className:r=>qt("NavigationMenuPositioner",t,r)})}),Vae=Kr.forwardRef(function({className:t,...o},n){return f(Un.Popup,{ref:n,...o,className:r=>qt("NavigationMenuPopup",t,r)})}),kae=Kr.forwardRef(function({className:t,...o},n){return f(Un.Arrow,{ref:n,...o,className:r=>qt("NavigationMenuArrow",t,r)})}),Lae=Kr.forwardRef(function({className:t,...o},n){return f(Un.Viewport,{ref:n,...o,className:r=>qt("NavigationMenuViewport",t,r)})}),Bae=Kr.forwardRef(function({className:t,...o},n){return f(Un.Link,{ref:n,...o,className:r=>qt("NavigationMenuLink",t,r)})}),Hae=Kr.forwardRef(function({className:t,...o},n){return f(Un.Backdrop,{ref:n,...o,className:r=>qt("",t,r)})}),QU={Root:Iae,List:Mae,Item:Dae,Content:Nae,Trigger:Aae,Icon:Oae,Portal:Fae,Positioner:_ae,Popup:Vae,Arrow:kae,Viewport:Lae,Link:Bae,Backdrop:Hae};var Gae=Qo(Bo.Trigger,"SelectTrigger",{optIn:!0,otherClass:"SelectTrigger"}),Uae=Se(Bo.Value,"SelectValue","SelectValue"),Wae=Se(Bo.Icon,"SelectIcon","SelectIcon"),jae=Se(Bo.Backdrop,"SelectBackdrop","SelectBackdrop"),zae=Se(Bo.Positioner,"SelectPositioner","SelectPositioner"),$ae=Se(Bo.Popup,"SelectPopup","SelectPopup"),Kae=Se(Bo.List,"SelectList","SelectList"),Yae=Se(Bo.Item,"SelectItem","SelectItem"),qae=Se(Bo.ItemIndicator,"SelectItemIndicator","SelectItemIndicator"),Xae=Se(Bo.ItemText,"SelectItemText","SelectItemText"),Jae=Se(Bo.Arrow,"SelectArrow","SelectArrow"),Zae=Se(Bo.ScrollDownArrow,"SelectScrollDownArrow","SelectScrollArrow"),Qae=Se(Bo.ScrollUpArrow,"SelectScrollUpArrow","SelectScrollArrow"),ele=Se(Bo.Group,"SelectGroup","SelectGroup"),tle=Se(Bo.GroupLabel,"SelectGroupLabel","SelectGroupLabel"),ole=Se(Bo.Separator,"SelectSeparator","SelectSeparator"),Jt={Root:Bo.Root,Label:Bo.Label,Trigger:Gae,Value:Uae,Icon:Wae,Portal:Bo.Portal,Backdrop:jae,Positioner:zae,Popup:$ae,List:Kae,Item:Yae,ItemIndicator:qae,ItemText:Xae,Arrow:Jae,ScrollDownArrow:Zae,ScrollUpArrow:Qae,Group:ele,GroupLabel:tle,Separator:ole};var nle=Se(Ls.Root,"NumberFieldRoot","NumberFieldRoot"),rle=Se(Ls.Group,"NumberFieldGroup","NumberFieldGroup"),sle=Se(Ls.Input,"NumberFieldInput","NumberFieldInput"),ile=Se(Ls.Increment,"NumberFieldIncrement","NumberFieldIncrement"),ale=Se(Ls.Decrement,"NumberFieldDecrement","NumberFieldDecrement"),lle=Se(Ls.ScrubArea,"NumberFieldScrubArea","NumberFieldScrubArea");function cle({className:e,htmlFor:t,...o}){return f("label",{htmlFor:t,className:Ge("NumberFieldLabel",e),...o})}var _i={Root:nle,Group:rle,Input:sle,Increment:ile,Decrement:ale,ScrubArea:lle,ScrubAreaCursor:Ls.ScrubAreaCursor,Label:cle};var ule=Se(Ic.Root,"OTPFieldRoot","OTPFieldRoot"),ple=Se(Ic.Input,"OTPFieldInput","OTPFieldInput"),dle=Se(Ic.Separator,"OTPFieldSeparator","OTPFieldSeparator"),eW={Root:ule,Input:ple,Separator:dle};function fle({className:e,style:t,...o}){return f("div",{className:Ge("AutocompleteRoot",e),style:t,children:f(co.Root,{...o})})}var mle=Se(co.Input,"AutocompleteInput","AutocompleteInput"),gle=Se(co.Clear,"AutocompleteClear","AutocompleteClear"),ble=Se(co.Positioner,"AutocompletePositioner","AutocompletePositioner"),Rle=Se(co.Popup,"AutocompletePopup","AutocompletePopup"),hle=Se(co.List,"AutocompleteList","AutocompleteList"),xle=Se(co.Item,"AutocompleteItem","AutocompleteItem"),Cle=Se(co.GroupLabel,"AutocompleteGroupLabel","AutocompleteGroupLabel"),yle=Se(co.Separator,"AutocompleteSeparator","AutocompleteSeparator"),Sle=Se(co.Empty,"AutocompleteEmpty","AutocompleteEmpty"),tW={Root:fle,Value:co.Value,Trigger:co.Trigger,Input:mle,InputGroup:co.InputGroup,Icon:co.Icon,Clear:gle,List:hle,Status:co.Status,Portal:co.Portal,Backdrop:co.Backdrop,Positioner:ble,Popup:Rle,Arrow:co.Arrow,Group:co.Group,GroupLabel:Cle,Item:xle,Row:co.Row,Collection:co.Collection,Empty:Sle,Separator:yle,useFilter:co.useFilter,useFilteredItems:co.useFilteredItems};var oW=T(D(),1);function vle({className:e,style:t,...o}){return f("div",{className:Ge("ComboboxRoot",e),style:t,children:f(Yt.Root,{...o})})}var wle=oW.forwardRef(function({className:t,...o},n){return f(Yt.Trigger,{ref:n,...o,className:r=>{let s=typeof t=="function"?t(r):t,i=s?.split(/\s+/).includes("ComboboxSelectTrigger");return Ge(i?void 0:"ComboboxTrigger",s)}})}),Ple=Se(Yt.Label,"ComboboxLabel","ComboboxLabel"),Ele=Se(Yt.Input,"ComboboxInput","ComboboxInput"),Tle=Se(Yt.Clear,"ComboboxClear","ComboboxClear"),Ile=Se(Yt.Icon,"ComboboxIcon","ComboboxIcon"),Mle=Se(Yt.Chips,"ComboboxChips","ComboboxChips"),Dle=Se(Yt.Chip,"ComboboxChip","ComboboxChip"),Nle=Se(Yt.ChipRemove,"ComboboxChipRemove","ComboboxChipRemove"),Ale=Se(Yt.Positioner,"ComboboxPositioner","ComboboxPositioner"),Ole=Se(Yt.Popup,"ComboboxPopup","ComboboxPopup"),Fle=Se(Yt.List,"ComboboxList","ComboboxList"),_le=Se(Yt.Item,"ComboboxItem","ComboboxItem"),Vle=Se(Yt.ItemIndicator,"ComboboxItemIndicator","ComboboxItemIndicator"),kle=Se(Yt.GroupLabel,"ComboboxGroupLabel","ComboboxGroupLabel"),Lle=Se(Yt.Separator,"ComboboxSeparator","ComboboxSeparator"),Ble=Se(Yt.Empty,"ComboboxEmpty","ComboboxEmpty"),Hle=Se(Yt.Status,"ComboboxStatus","ComboboxStatus"),en={Root:vle,Label:Ple,Value:Yt.Value,Input:Ele,InputGroup:Yt.InputGroup,Trigger:wle,List:Fle,Status:Hle,Portal:Yt.Portal,Backdrop:Yt.Backdrop,Positioner:Ale,Popup:Ole,Arrow:Yt.Arrow,Icon:Ile,Group:Yt.Group,GroupLabel:kle,Item:_le,ItemIndicator:Vle,Chips:Mle,Chip:Dle,ChipRemove:Nle,Row:Yt.Row,Collection:Yt.Collection,Empty:Ble,Clear:Tle,Separator:Lle,useFilter:Yt.useFilter,useFilteredItems:Yt.useFilteredItems,createItems:Yt.createItems};var Gle=Se(Ku.Root,"CheckboxRoot","CheckboxRoot"),Ule=Se(Ku.Indicator,"CheckboxIndicator","CheckboxIndicator");function HM({className:e,...t}){return f("label",{className:Ge("CheckboxLabel",e),...t})}var Jf={Root:Gle,Indicator:Ule,Label:HM};var Wle=Se(Cp.Root,"RadioRoot","RadioButton"),jle=Se(Cp.Indicator,"RadioIndicator","RadioIndicator"),GM=Se(oC,"RadioGroup","RadioGroup");function UM({className:e,...t}){return f("label",{className:Ge("RadioRoot",e),...t})}function WM({className:e,...t}){return f("span",{className:Ge("RadioLabel",e),...t})}var nW={Root:Wle,Indicator:jle,Group:GM,Row:UM,Label:WM};var rW=Se(vR,"CheckboxGroup","CheckboxGroup");var xy=Se(sy,"Toggle","Toggle");var Cy=$U(ly,"ToggleGroup","ToggleGroup","ToolbarGroup");var zle=Qo(dr.Trigger,"DialogTrigger"),$le=Se(dr.Backdrop,"DialogBackdrop","DialogBackdrop"),Kle=Se(dr.Popup,"DialogPopup","DialogPopup"),Yle=Se(dr.Title,"DialogTitle","DialogTitle"),qle=Se(dr.Description,"DialogDescription","DialogDescription"),Xle=Qo(dr.Close,"DialogClose",{optIn:!0,otherClass:"DialogClose"});function jM({className:e,...t}){return f("div",{className:Ge("DialogContent",e),...t})}function zM({className:e,...t}){return f("div",{className:Ge("DialogActions",e),...t})}var sW={Root:dr.Root,Trigger:zle,Portal:dr.Portal,Backdrop:$le,Popup:Kle,Title:Yle,Description:qle,Close:Xle,Viewport:dr.Viewport,Content:jM,Actions:zM,Handle:dr.Handle,createHandle:dr.createHandle};var Jle=Qo(pr.Trigger,"AlertDialogTrigger"),Zle=Se(pr.Backdrop,"AlertDialogBackdrop","AlertDialogBackdrop"),Qle=Se(pr.Popup,"AlertDialogPopup","AlertDialogPopup"),ece=Se(pr.Title,"AlertDialogTitle","AlertDialogTitle"),tce=Se(pr.Description,"AlertDialogDescription","AlertDialogDescription"),oce=Qo(pr.Close,"AlertDialogClose");function $M({className:e,...t}){return f("div",{className:Ge("AlertDialogActions",e),...t})}var iW={Root:pr.Root,Trigger:Jle,Portal:pr.Portal,Backdrop:Zle,Popup:Qle,Title:ece,Description:tce,Close:oce,Viewport:pr.Viewport,Actions:$M,Handle:pr.Handle,createHandle:pr.createHandle};var nce=Se(pa.Root,"MeterRoot","MeterRoot"),rce=Se(pa.Label,"MeterLabel","MeterLabel"),sce=Se(pa.Value,"MeterValue","MeterValue"),ice=Se(pa.Track,"MeterTrack","MeterTrack"),ace=Se(pa.Indicator,"MeterIndicator","MeterIndicator");function KM({className:e,...t}){return f("div",{className:Ge("MeterHeader",e),...t})}var aW={Root:nce,Label:rce,Header:KM,Value:sce,Track:ice,Indicator:ace};var lce=Se(Ca.Root,"ProgressRoot","ProgressRoot"),cce=Se(Ca.Label,"ProgressLabel","ProgressLabel"),uce=Se(Ca.Value,"ProgressValue","ProgressValue"),pce=Se(Ca.Track,"ProgressTrack","ProgressTrack"),dce=Se(Ca.Indicator,"ProgressIndicator","ProgressIndicator");function YM({className:e,...t}){return f("div",{className:Ge("ProgressHeader",e),...t})}var lW={Root:lce,Label:cce,Header:YM,Value:uce,Track:pce,Indicator:dce};var fce=Se(Us.Root,"SliderRoot","SliderRoot"),mce=Se(Us.Label,"SliderLabel","SliderLabel"),gce=Se(Us.Value,"SliderValue","SliderValue"),bce=Se(Us.Control,"SliderControl","SliderControl"),Rce=Se(Us.Track,"SliderTrack","SliderTrack"),hce=Se(Us.Indicator,"SliderIndicator","SliderIndicator"),xce=Se(Us.Thumb,"SliderThumb","SliderThumb");function qM({className:e,...t}){return f("div",{className:Ge("SliderHeader",e),...t})}var cW={Root:fce,Label:mce,Header:qM,Value:gce,Control:bce,Track:Rce,Indicator:hce,Thumb:xce};var Cce=Qo($t.Trigger,"MenuTrigger",{skipClass:"MenubarTrigger"}),yce=Se($t.Positioner,"MenuPositioner","MenuPositioner"),Sce=Se($t.Popup,"MenuPopup","MenuPopup"),vce=Se($t.Item,"MenuItem","MenuItem"),wce=Se($t.CheckboxItem,"MenuCheckboxItem","MenuCheckboxItem"),Pce=Se($t.CheckboxItemIndicator,"MenuCheckboxItemIndicator","MenuCheckboxItemIndicator"),Ece=Se($t.RadioItem,"MenuRadioItem","MenuRadioItem"),Tce=Se($t.RadioItemIndicator,"MenuRadioItemIndicator","MenuRadioItemIndicator"),Ice=Se($t.SubmenuTrigger,"MenuSubmenuTrigger","MenuSubmenuTrigger"),Mce=Se($t.Group,"MenuGroup","MenuGroup"),Dce=Se($t.GroupLabel,"MenuGroupLabel","MenuGroupLabel"),Nce=Se($t.Separator,"MenuSeparator","MenuSeparator"),rr={Root:$t.Root,Trigger:Cce,Portal:$t.Portal,Backdrop:$t.Backdrop,Positioner:yce,Popup:Sce,Arrow:$t.Arrow,Item:vce,LinkItem:$t.LinkItem,CheckboxItem:wce,CheckboxItemIndicator:Pce,RadioGroup:$t.RadioGroup,RadioItem:Ece,RadioItemIndicator:Tce,Group:Mce,GroupLabel:Dce,Separator:Nce,SubmenuRoot:$t.SubmenuRoot,SubmenuTrigger:Ice,Viewport:$t.Viewport,Input:$t.Input,List:$t.List,Clear:$t.Clear,Empty:$t.Empty,FilterProvider:$t.FilterProvider,Handle:$t.Handle,createHandle:$t.createHandle,useFilter:$t.useFilter};var Ace=Se(Lo.Trigger,"ContextMenuTrigger","ContextMenuTrigger"),Oce=Se(Lo.Positioner,"ContextMenuPositioner","ContextMenuPositioner"),Fce=Se(Lo.Popup,"ContextMenuPopup","ContextMenuPopup"),_ce=Se(Lo.Item,"ContextMenuItem","ContextMenuItem"),Vce=Se(Lo.CheckboxItem,"ContextMenuCheckboxItem","ContextMenuCheckboxItem"),kce=Se(Lo.CheckboxItemIndicator,"ContextMenuCheckboxItemIndicator","ContextMenuCheckboxItemIndicator"),Lce=Se(Lo.RadioItem,"ContextMenuRadioItem","ContextMenuRadioItem"),Bce=Se(Lo.RadioItemIndicator,"ContextMenuRadioItemIndicator","ContextMenuRadioItemIndicator"),Hce=Se(Lo.SubmenuTrigger,"ContextMenuSubmenuTrigger","ContextMenuSubmenuTrigger"),Gce=Se(Lo.Group,"ContextMenuGroup","ContextMenuGroup"),Uce=Se(Lo.GroupLabel,"ContextMenuGroupLabel","ContextMenuGroupLabel"),Wce=Se(Lo.Separator,"ContextMenuSeparator","ContextMenuSeparator"),jce=Se(Lo.Arrow,"ContextMenuArrow","ContextMenuArrow"),uW={Root:Lo.Root,Trigger:Ace,Portal:Lo.Portal,Backdrop:Lo.Backdrop,Positioner:Oce,Popup:Fce,Arrow:jce,Item:_ce,LinkItem:Lo.LinkItem,CheckboxItem:Vce,CheckboxItemIndicator:kce,RadioGroup:Lo.RadioGroup,RadioItem:Lce,RadioItemIndicator:Bce,Group:Gce,GroupLabel:Uce,Separator:Wce,SubmenuRoot:Lo.SubmenuRoot,SubmenuTrigger:Hce};var pW=Se(xx,"Menubar","MenubarRoot");var zce=Qo(Wn.Trigger,"PopoverTrigger",{partClass:"PopoverTrigger",optIn:!0}),$ce=Se(Wn.Backdrop,"PopoverBackdrop","PopoverBackdrop"),Kce=Se(Wn.Positioner,"PopoverPositioner","PopoverPositioner"),Yce=Se(Wn.Popup,"PopoverPopup","PopoverPopup"),qce=Se(Wn.Title,"PopoverTitle","PopoverTitle"),Xce=Se(Wn.Description,"PopoverDescription","PopoverDescription"),Jce=Se(Wn.Close,"PopoverClose","PopoverClose"),Zce=Se(Wn.Arrow,"PopoverArrow","PopoverArrow"),Ea={Root:Wn.Root,Trigger:zce,Portal:Wn.Portal,Backdrop:$ce,Positioner:Kce,Popup:Yce,Title:qce,Description:Xce,Close:Jce,Arrow:Zce,Viewport:Wn.Viewport,Handle:Wn.Handle,createHandle:Wn.createHandle};var Qce=Se(Er.Trigger,"PreviewCardTrigger","PreviewCardTrigger"),eue=Se(Er.Positioner,"PreviewCardPositioner","PreviewCardPositioner"),tue=Se(Er.Popup,"PreviewCardPopup","PreviewCardPopup"),oue=Se(Er.Arrow,"PreviewCardArrow","PreviewCardArrow");function XM({className:e,alt:t="",...o}){return f("img",{className:Ge("PreviewCardImage",e),alt:t,...o})}function JM({className:e,...t}){return f("div",{className:Ge("PreviewCardContent",e),...t})}function ZM({className:e,children:t,...o}){return f("h3",{className:Ge("PreviewCardTitle",e),...o,children:t})}function QM({className:e,...t}){return f("p",{className:Ge("PreviewCardDescription",e),...t})}var dW={Root:Er.Root,Trigger:Qce,Portal:Er.Portal,Positioner:eue,Popup:tue,Arrow:oue,Backdrop:Er.Backdrop,Viewport:Er.Viewport,Image:XM,Content:JM,Title:ZM,Description:QM,Handle:Er.Handle,createHandle:Er.createHandle};var nue=Qo(Ir.Trigger,"TooltipTrigger",{partClass:"TooltipTrigger",optIn:!0}),rue=Se(Ir.Positioner,"TooltipPositioner","TooltipPositioner"),sue=Se(Ir.Popup,"TooltipPopup","TooltipPopup"),iue=Se(Ir.Arrow,"TooltipArrow","TooltipArrow"),fW={Root:Ir.Root,Trigger:nue,Portal:Ir.Portal,Positioner:rue,Popup:sue,Arrow:iue,Provider:Ir.Provider,Viewport:Ir.Viewport,Handle:Ir.Handle,createHandle:Ir.createHandle};var aue=Qo(Xo.Trigger,"DrawerTrigger"),lue=Se(Xo.Backdrop,"DrawerBackdrop","DrawerBackdrop"),cue=Se(Xo.Viewport,"DrawerViewport","DrawerViewport"),uue=Se(Xo.Popup,"DrawerPopup","DrawerPopup"),pue=Se(Xo.Title,"DrawerTitle","DrawerTitle"),due=Se(Xo.Description,"DrawerDescription","DrawerDescription"),fue=Se(Xo.Content,"DrawerContent","DrawerContent"),mue=Qo(Xo.Close,"DrawerClose"),hn={Root:Xo.Root,Trigger:aue,Portal:Xo.Portal,Backdrop:lue,Viewport:cue,Popup:uue,Title:pue,Description:due,Content:fue,Close:mue,Indent:Xo.Indent,IndentBackground:Xo.IndentBackground,SwipeArea:Xo.SwipeArea,Provider:Xo.Provider,VirtualKeyboardProvider:Xo.VirtualKeyboardProvider,Handle:Xo.Handle,createHandle:Xo.createHandle};var gue=Se(Xi.Root,"AccordionRoot","Accordion"),bue=Se(Xi.Item,"AccordionItem","AccordionItem"),Rue=Se(Xi.Header,"AccordionHeader","AccordionHeader"),hue=Se(Xi.Trigger,"AccordionTrigger","AccordionTrigger"),xue=Se(Xi.Panel,"AccordionPanel","AccordionPanel");function eD({className:e,...t}){return f("div",{className:Ge("AccordionContent",e),...t})}var mW={Root:gue,Item:bue,Header:Rue,Trigger:hue,Panel:xue,Content:eD};var Cue=Se(bc.Root,"CollapsibleRoot","Collapsible"),yue=Se(bc.Trigger,"CollapsibleTrigger","CollapsibleTrigger"),Sue=Se(bc.Panel,"CollapsiblePanel","CollapsiblePanel");function tD({className:e,...t}){return f("div",{className:Ge("CollapsibleContent",e),...t})}var gW={Root:Cue,Trigger:yue,Panel:Sue,Content:tD};var vue=Se(Pa.Root,"TabsRoot","TabsRoot"),wue=Se(Pa.List,"TabsList","TabsList"),Pue=Se(Pa.Tab,"TabsTab","TabsTab"),Eue=Se(Pa.Panel,"TabsPanel","TabsPanel"),_p={Root:vue,List:wue,Tab:Pue,Panel:Eue,Indicator:Pa.Indicator};var Tue=Se(Dp.Root,"SwitchRoot","SwitchRoot"),Iue=Se(Dp.Thumb,"SwitchThumb","SwitchThumb");function oD({className:e,...t}){return f("div",{className:Ge("SwitchContainer",e),...t})}function nD({className:e,...t}){return f("label",{className:Ge("SwitchLabel",e),...t})}var bW={Root:Tue,Thumb:Iue,Container:oD,Label:nD};var Mue=Se(jn.Viewport,"ToastViewport","Viewport"),Due=Se(jn.Root,"ToastRoot","Toast"),Nue=Se(jn.Content,"ToastContent","Content"),Aue=Se(jn.Title,"ToastTitle","Title"),Oue=Se(jn.Description,"ToastDescription","Description"),Fue=Se(jn.Close,"ToastClose","Close"),_ue=Qo(jn.Action,"ToastAction"),RW={Provider:jn.Provider,Portal:jn.Portal,Viewport:Mue,Root:Due,Content:Nue,Title:Aue,Description:Oue,Close:Fue,Action:_ue,Positioner:jn.Positioner,Arrow:jn.Arrow,useToastManager:jn.useToastManager,createToastManager:jn.createToastManager};var Vue=Se(mc.Root,"AvatarRoot","AvatarRoot"),kue=Se(mc.Image,"AvatarImage","AvatarImage"),Lue=Se(mc.Fallback,"AvatarFallback","AvatarFallback");function rD({className:e,...t}){return f("div",{className:Ge("AvatarGroup",e),...t})}var hW={Root:Vue,Image:kue,Fallback:Lue,Group:rD};var Bue=Se(Fi.Root,"ToolbarRoot","Toolbar"),Hue=Se(Fi.Group,"ToolbarGroup","ToolbarGroup"),Gue=Se(Fi.Separator,"ToolbarSeparator","ToolbarSeparator"),Uue=Qo(Fi.Button,"ToolbarButton"),Wue=Se(Fi.Link,"ToolbarLink","ToolbarLink"),jue=Se(Fi.Input,"ToolbarInput","ToolbarInput"),xW={Root:Bue,Group:Hue,Separator:Gue,Button:Uue,Link:Wue,Input:jue};var zue=Se(Ni.Root,"ScrollAreaRoot","ScrollAreaRoot"),$ue=Se(Ni.Viewport,"ScrollAreaViewport","ScrollAreaViewport"),Kue=Se(Ni.Scrollbar,"ScrollAreaScrollbar","ScrollAreaScrollbar"),Yue=Se(Ni.Thumb,"ScrollAreaThumb","ScrollAreaThumb"),que=Se(Ni.Corner,"ScrollAreaCorner","ScrollAreaCorner"),CW={Root:zue,Viewport:$ue,Content:Ni.Content,Scrollbar:Kue,Thumb:Yue,Corner:que};var yW=Se(rs,"Separator","Separator");var SW=T(D(),1);var vW=SW.forwardRef(function({className:t,emphasis:o,status:n,palette:r,size:s,dot:i,children:a,...l},c){return f("span",{ref:c,"data-emphasis":o,"data-status":n,"data-color":r,"data-size":s,"data-dot":i?"":void 0,className:Ge("Badge",t),...l,children:a})});var wW=new Map,EW=["$","\u20AC","\xA3","\xA5","\uFFE5","\u20A9","\u20B9","\u20BD","\u20BA","\u20B4","\u20A6","\u0E3F","\u20AB","\u20B1","\u20AA","\u20A1","\u20B2","\u20B8","\u20BC","\u20BE","\xA2","\xA4"],yy=Number(10n**15n-1n),TW={};for(let[e,t]of[[1632,0],[1776,0],[65296,0]])for(let o=0;o<10;o+=1)TW[String.fromCharCode(e+o)]=String(t+o);function Xue(e){return Array.from(e,t=>TW[t]??t).join("")}function Vp(e){if(!/^[A-Za-z]{3}$/.test(e))return!1;let t=e.toUpperCase(),o=Intl,n=typeof o.supportedValuesOf=="function"?o.supportedValuesOf("currency"):null;if(n?.includes(t))return!0;try{let r=new Intl.NumberFormat("en",{style:"currency",currency:t}),s=r.resolvedOptions().maximumFractionDigits,i=r.formatToParts(1).find(a=>a.type==="currency")?.value;return!(n&&i===t&&s===2)}catch{return!1}}function Vi(e,t){if(t!=null){if(!Number.isInteger(t)||t<0||t>20)throw new Error(`fractionDigits must be an integer from 0 to 20, got ${t}`);return t}let o=e.toUpperCase(),n=wW.get(o);if(n!=null)return n;if(!Vp(o))throw new Error(`Unknown currency "${e}". Expected an ISO 4217 code Intl recognizes.`);let s=new Intl.NumberFormat("en",{style:"currency",currency:o}).resolvedOptions().maximumFractionDigits??0;return wW.set(o,s),s}function Jue(e){if(!Number.isFinite(e))throw new Error(`Amount must be a finite number, got ${e}`);let t=e<0,o=Math.abs(e).toString().toLowerCase(),n=o.includes("e")?Zue(o):o;return t?`-${n}`:n}function Zue(e){let[t,o]=e.split("e"),n=Number(o),[r,s=""]=t.split("."),i=`${r}${s}`.replace(/^0+/,"")||"0",a=r.length+n;return a<=0?`0.${"0".repeat(-a)}${i}`:a>=i.length?i+"0".repeat(a-i.length):`${i.slice(0,a)}.${i.slice(a)}`}function Zf(e,t){if(!/^\d+(\.\d+)?$/.test(e))throw new Error(`Not a decimal amount: ${e}`);let[o,n=""]=e.split("."),r=o.replace(/^0+(?=\d)/,"")||"0";if(n.length<=t)return t===0?r:`${r}.${n.padEnd(t,"0")}`;let s=n.slice(0,t);if(!(n.charCodeAt(t)-48>=5))return t===0?r:`${r}.${s}`;let a=`${r}${s}`.replace(/^0+(?=\d)/,"")||"0",l=(BigInt(a)+1n).toString();if(t===0)return l;let c=l.padStart(t+1,"0");return`${c.slice(0,-t)}.${c.slice(-t)}`}function IW(e,t){let o=e.replace(".","").replace(/^0+(?=\d)/,"")||"0";if(BigInt(o)>BigInt(Number.MAX_SAFE_INTEGER))throw new Error(`Amount exceeds Number.MAX_SAFE_INTEGER minor units (${Number.MAX_SAFE_INTEGER})`);let n=Number(o);return t?-n:n}function MW(e){let t=e.trim();if(!/^[+-]?\d+(\.\d+)?$/.test(t))throw new Error(`Not a decimal amount: ${e}`);return{negative:t.startsWith("-"),unsigned:t.replace(/^[+-]/,"")}}function kp(e,t,o){let n=Vi(t,o),r=Jue(e),{negative:s,unsigned:i}=MW(r);return IW(Zf(i,n),s)}function ki(e,t,o){if(!Number.isSafeInteger(e))throw new Error(`Minor units must be a safe integer, got ${e}`);let n=Vi(t,o),r=e<0,s=Math.abs(e).toString();if(n===0)return`${r?"-":""}${s}`;let i=s.padStart(n+1,"0");return`${r?"-":""}${i.slice(0,-n)}.${i.slice(-n)}`}function sD(e,t,o){let n=Vi(t,o),{negative:r,unsigned:s}=MW(e);return IW(Zf(s,n),r)}function ms(e,t,o){return Number(ki(e,t,o))}function Fc(e,t,o){let n=Vi(t,o?.fractionDigits),r=ki(e,t,o?.fractionDigits),s=o?.display??"narrowSymbol",i=s==="none"?new Intl.NumberFormat(o?.locale,{style:"decimal",useGrouping:!0,minimumFractionDigits:n,maximumFractionDigits:n}):new Intl.NumberFormat(o?.locale,{style:"currency",currency:t.toUpperCase(),currencyDisplay:s,minimumFractionDigits:n,maximumFractionDigits:n});return Que(i,r)}function Que(e,t){return e.format(t)}function iD(e,t){let o=new Intl.NumberFormat(e,{style:"currency",currency:t.toUpperCase()}).formatToParts(1),n=o.findIndex(s=>s.type==="currency"),r=o.findIndex(s=>s.type==="integer");return n<r?"start":"end"}function Qf(e,t,o){return o==="none"?"":o==="code"?t.toUpperCase():new Intl.NumberFormat(e,{style:"currency",currency:t.toUpperCase(),currencyDisplay:o}).formatToParts(1).find(r=>r.type==="currency")?.value??t.toUpperCase()}function _c(e,t){try{return new Intl.DisplayNames(e,{type:"currency"}).of(t.toUpperCase())??t.toUpperCase()}catch{return t.toUpperCase()}}function DW(e){return new Intl.NumberFormat(e,{useGrouping:!0}).formatToParts(11111).find(t=>t.type==="group")?.value??""}function epe(e,t){if(!Vp(t))return[];let o=[];for(let n of["symbol","narrowSymbol"]){let r=new Intl.NumberFormat(e,{style:"currency",currency:t.toUpperCase(),currencyDisplay:n}).formatToParts(1).find(s=>s.type==="currency")?.value;r&&o.push(r)}return o}function aD(e,t,o,n){let r=e.trim(),s=!1;if(/^\(.*\)$/.test(r)){if(!n?.allowNegative)return{text:null,currency:null};r=r.slice(1,-1).trim(),s=!0}r=tpe(r);let i=new Set((n?.currencies??[]).map(p=>p.toUpperCase())),a=null;for(let p of r.matchAll(/\b([A-Za-z]{3})\b/g)){let d=p[1].toUpperCase();Vp(d)&&(!a&&i.has(d)&&d!==o.toUpperCase()&&(a=d),r=r.replace(p[0]," "))}let l=new Set(EW);for(let p of[o,a,...n?.currencies??[]])p&&epe(t,p).forEach(d=>l.add(d));let c=[...l].filter(Boolean).sort((p,d)=>d.length-p.length);for(let p of c)r=r.split(p).join("");let u=DW(t);return r=Array.from(r).filter(p=>/\s/u.test(p)?u!==""&&u.includes(p):!0).join("").trim(),/[eE]/.test(r)||!/[\d٠-٩۰-۹0-9]/.test(r)?{text:null,currency:a}:(s&&!r.startsWith("-")&&(r=`-${r}`),{text:r,currency:a})}var PW=EW.map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("");function tpe(e){let t=new RegExp(`[A-Za-z]+(?=\\s*[${PW}])|(?<=[${PW}]\\s*)[A-Za-z]+`,"gu");return e.replace(t,"")}function lD(e,t,o){let n=new Intl.NumberFormat(t).formatToParts(1.1).find(u=>u.type==="decimal")?.value??".",r=DW(t),s=Xue(e.trim()).replace(/^[+-]/,"");if(r&&(s=s.split(r).join("")),n!=="."&&(s=s.replace(n,".")),!/^\d+(\.\d+)?$/.test(s)||(s.split(".")[1]??"").length<=o)return!1;let[a,l=""]=s.split("."),c=o===0?a:`${a}.${l.slice(0,o)}`;return Zf(s,o)!==Zf(c,o)}var Sy=T(D(),1),cD=Sy.createContext(null);function Ta(){let e=Sy.useContext(cD);if(!e)throw new Error("MoneyField parts must be rendered inside MoneyField.Root");return e}var ope=12;function NW({code:e,locale:t}){return f("span",{className:"MoneyFieldCurrencyItem",children:[f("span",{children:[e," \xB7 ",_c(t,e)]}),f("span",{className:"MoneyFieldCurrencySymbol",children:Qf(t,e,"narrowSymbol")})]})}function AW(){return f("span",{className:"material-symbols-outlined MoneyFieldCurrencyIcon",children:"expand_more"})}function uD(){let{currency:e,currencies:t,locale:o,currencyLabel:n,disabled:r,readOnly:s,searchable:i,onCurrencyChange:a}=Ta(),l=t??[],c=r||s,u=i===!0||i!==!1&&l.length>ope,p=`${n}, ${e}`;return u?f($r.Root,{className:"MoneyFieldCurrencyField",children:f(en.Root,{items:l,value:e,onValueChange:d=>{typeof d=="string"&&a(d)},itemToStringLabel:d=>`${d} ${_c(o,d)}`,disabled:c,children:[f("span",{className:"MoneyFieldCurrency",children:f(en.Trigger,{className:"MoneyFieldCurrencyTrigger","aria-label":p,disabled:c,children:[f("span",{className:"MoneyFieldCurrencyCode",children:e}),f(AW,{})]})}),f(en.Portal,{children:f(en.Positioner,{sideOffset:4,align:"start",children:f(en.Popup,{className:"MoneyFieldCurrencyPopup",children:[f(en.Input,{"aria-label":`Filter ${n}`,placeholder:"Code or name"}),f(en.Empty,{children:"No currencies"}),f(en.List,{children:d=>f(en.Item,{value:d,children:f(NW,{code:d,locale:o})},d)})]})})})]})}):f($r.Root,{className:"MoneyFieldCurrencyField",children:f(Jt.Root,{items:l.map(d=>({value:d,label:d})),value:e,onValueChange:d=>{d&&a(d)},disabled:c,children:[f("span",{className:"MoneyFieldCurrency",children:f(Jt.Trigger,{className:"MoneyFieldCurrencyTrigger","aria-label":p,disabled:c,children:[f(Jt.Value,{className:"MoneyFieldCurrencyCode"}),f(Jt.Icon,{children:f(AW,{})})]})}),f(Jt.Portal,{children:f(Jt.Positioner,{sideOffset:4,align:"start",children:f(Jt.Popup,{className:"MoneyFieldCurrencyPopup",children:f(Jt.List,{children:l.map(d=>f(Jt.Item,{value:d,children:f(Jt.ItemText,{children:f(NW,{code:d,locale:o})})},d))})})})})]})})}var Nt=T(D(),1);function npe(){return typeof document<"u"&&document.documentElement.lang?document.documentElement.lang:typeof navigator<"u"&&navigator.language?navigator.language:"en"}function rpe(e,t,o){return ki(e,t,o).replace(/(\.\d*?)0+$/,"$1").replace(/\.$/,"")}function spe(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function ipe(e,...t){let o=new Set;for(let n of[e,...t])if(n)for(let r of n.split(/\s+/))r&&o.add(r);return o.size?[...o].join(" "):void 0}var dD=Nt.forwardRef(function({value:t,defaultValue:o=null,onValueChange:n,onValueCommitted:r,currency:s,defaultCurrency:i,currencies:a,onCurrencyChange:l,locale:c,fractionDigits:u,trailingZeros:p="always",allowNegative:d=!1,min:m,max:g,steps:R,symbolDisplay:b="narrowSymbol",align:x="start",name:h,submitAs:C="decimal",currencyName:y,currencyLabel:S="Currency",searchable:w="auto",size:v="md",allowWheelScrub:P=!1,className:N,children:E,disabled:M=!1,readOnly:W=!1,required:I=!1,id:O,...F},k){let U=c||npe(),_=s??i??a?.[0],[B,L]=Nt.useState(_??"USD"),V=(s??B).toUpperCase(),A=Vi(V,u),[K,H]=Nt.useState(o),G=t!==void 0?t:K,oe=G==null?null:ms(G,V,u),ee=Nt.useRef(V),X=Nt.useRef(G),te=Nt.useRef(oe);ee.current===V&&(X.current=G,te.current=oe);let ce=Nt.useRef(null),le=Nt.useRef(!1),Q=Nt.useRef(""),ne=Nt.useId(),Y=Nt.useId(),[ae,Z]=Nt.useState(""),[ue,Te]=Nt.useState(!1),[fe,ve]=Nt.useState(0),[z,Re]=Nt.useState(1),xe=Nt.useRef(z);xe.current=z;let[Pe,ie]=Nt.useState(void 0),re=(a?.length??0)>=2,Ee=Qf(U,V,b),ye=iD(U,V),se=b!=="none"&&Ee!=="",Fe=m??(d?void 0:0),ke=Math.min(g??yy,yy),de=10**A,Ie=R?.step??de,Me=R?.small??1,We=R?.large??100*de,Ue=ms(Ie,V,u),ze=Ue===1?"any":Ue,He=Nt.useCallback((we,Oe,$e)=>{let Ve=ee.current,Ze=we==null?null:ki(we,Ve,u);X.current=we,te.current=we==null?null:ms(we,Ve,u),t===void 0&&H(we),n?.(we,{currency:Ve,decimal:Ze,reason:Oe}),$e&&r?.(we,{currency:Ve,decimal:Ze})},[u,n,r,t]),je=Nt.useCallback(we=>{let Oe=we.toUpperCase();Oe!==ee.current&&(s===void 0&&L(Oe),l?.(Oe))},[s,l]);Nt.useLayoutEffect(()=>{if(ee.current===V)return;let we=te.current,Oe=X.current;ee.current=V,ie(void 0);let $e=_c(U,V);if(t!==void 0){X.current=t,te.current=t==null?null:ms(t,V,u),Z(`Currency changed to ${$e}.`);return}if(we==null||Oe==null){Z(`Currency changed to ${$e}.`);return}let Ve=kp(we,V,u);Ve!==Oe?(He(Ve,"none",!0),Z(`Currency changed to ${$e}. Amount rounded to ${rpe(Ve,V,u)}.`)):Z(`Currency changed to ${$e}.`)},[V,u,U,He,t]);let Qe=Nt.useCallback(we=>{let Oe=we.target instanceof HTMLInputElement?we.target:null;if(!Oe||Oe.type==="number"||Oe.type==="hidden"||W||M)return;let $e=we.clipboardData?.getData("text/plain")??"",Ve=aD($e,U,ee.current,{allowNegative:d,currencies:a});if(Ve.currency&&je(Ve.currency),Ve.text==null){we.preventDefault(),we.stopPropagation(),!d&&/^\(.*\)$/.test($e.trim())&&Z("Negative amounts aren't allowed here.");return}if(Ve.text===$e)return;we.preventDefault(),we.stopPropagation();let Ze=Oe.selectionStart??Oe.value.length,at=Oe.selectionEnd??Ze,Ke=Oe.value.slice(0,Ze)+Ve.text+Oe.value.slice(at);Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value")?.set?.call(Oe,Ke),Oe.dispatchEvent(new Event("input",{bubbles:!0}))},[d,je,a,M,U,W]),et=Nt.useCallback(we=>{(we.key==="e"||we.key==="E")&&(we.preventDefault(),we.stopPropagation())},[]),ut=Nt.useCallback(we=>{let Oe=we.target instanceof HTMLInputElement?we.target:null;!Oe||Oe.type==="number"||Oe.type==="hidden"||le.current||(Q.current=Oe.value,Z(""))},[]),vt=Nt.useCallback(we=>{if(we.currentTarget.contains(we.relatedTarget))return;let Oe=ce.current?.value||Q.current,$e=ee.current,Ve=X.current,Ze=Vi($e,u);Ve!=null&&Oe&&lD(Oe,U,Ze)&&Z(`Rounded to ${Fc(Ve,$e,{locale:U,display:b,fractionDigits:u})}.`),ve(at=>at+1)},[u,U,b]),De=p==="auto"&&(G==null||A>0&&G%de===0),he=new Intl.NumberFormat(U,{style:"decimal",useGrouping:!0,minimumFractionDigits:De||A===0?0:A,maximumFractionDigits:A}),be=G==null?"":he.format(ki(G,V,u));Nt.useLayoutEffect(()=>{let we=ce.current;if(!we||we.ownerDocument.activeElement===we||we.value===be)return;let Oe=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value")?.set;le.current=!0,Oe?.call(we,be),we.dispatchEvent(new Event("input",{bubbles:!0})),le.current=!1},[fe,be]);let Le=Nt.useMemo(()=>({valueMissing:"Enter an amount",rangeUnderflow:Fe==null?"Enter an amount":`Enter an amount of at least ${Fc(Fe,V,{locale:U,display:b,fractionDigits:u})}`,rangeOverflow:`Enter an amount of ${Fc(ke,V,{locale:U,display:b,fractionDigits:u})} or less`}),[V,u,U,ke,Fe,b]),pe=Nt.useMemo(()=>({currency:V,currencies:a,locale:U,affix:ye,symbol:Ee,symbolDisplay:b,showPicker:re,showSymbol:se,digits:A,currencyLabel:S,disabled:M,readOnly:W,allowNegative:d,minor:G,searchable:w,descriptionId:ne,liveId:Y,pendingSign:z,messages:Le,inputRef:ce,onCurrencyChange:je,onToggleSign:()=>{if(!(M||W)){if(X.current==null){Re(we=>we<0?1:-1);return}Re(1),He(-X.current,"none",!0)}},onPasteCapture:Qe,onKeyDownCapture:et,onInputCapture:ut,onGroupBlur:vt,focusInput:()=>ce.current?.focus()}),[d,je,V,a,S,ne,A,Y,Le,z,M,U,G,vt,ut,et,Qe,He,W,w,re,se,ye,Ee,b]),Ae=G==null?"":C==="minor"?String(G):ki(G,V,u);return f(cD.Provider,{value:pe,children:f(_i.Root,{ref:k,id:O,value:Pe!==void 0?Pe:oe,onValueChange:(we,Oe)=>{if(le.current)return;let $e=Oe.reason==="input-change"||Oe.reason==="input-paste",Ve=we;xe.current<0&&Ve!=null&&Ve>0&&(Ve=-Ve),$e?ie(Ve):(ie(void 0),xe.current<0&&Re(1));let Ze=Ve==null?null:kp(Ve,ee.current,u);Ze===X.current&&Oe.reason!=="input-clear"||He(Ze,Oe.reason,!$e)},locale:U,format:{style:"decimal",useGrouping:!0,minimumFractionDigits:De||A===0?0:A,maximumFractionDigits:A},min:Fe==null?void 0:ms(Fe,V,u),max:ms(ke,V,u),step:ze,smallStep:ms(Me,V,u),largeStep:ms(We,V,u),...F,allowOutOfRange:!0,allowWheelScrub:P,disabled:M,readOnly:W,required:I,"data-currency":V,"data-affix":re||se?ye:void 0,"data-affix-kind":re?"picker":se?"symbol":void 0,"data-negative":G!=null&&G<0?"":void 0,"data-align":x,"data-size":v,"data-disabled":M?"":void 0,"data-readonly":W?"":void 0,"data-focused":ue?"":void 0,className:we=>Ge("MoneyField",typeof N=="function"?N(we):N),onFocus:()=>Te(!0),onBlur:we=>{we.currentTarget.contains(we.relatedTarget)||Te(!1)},children:[E,f($r.Description,{id:ne,className:"visually-hidden",children:_c(U,V)}),f($r.Description,{id:Y,className:"visually-hidden","aria-live":"polite",children:ae}),h?f("input",{type:"hidden",name:h,value:Ae}):null,re&&y?f("input",{type:"hidden",name:y,value:V}):null]})})}),fD=Nt.forwardRef(function({className:t,onPasteCapture:o,onKeyDownCapture:n,onInputCapture:r,onBlur:s,...i},a){let l=Ta();return f(_i.Group,{ref:a,className:c=>Ge("MoneyFieldGroup",typeof t=="function"?t(c):t),onPasteCapture:c=>{o?.(c),c.defaultPrevented||l.onPasteCapture(c)},onKeyDownCapture:c=>{n?.(c),c.defaultPrevented||l.onKeyDownCapture(c)},onInputCapture:c=>{r?.(c),l.onInputCapture(c)},onBlur:c=>{s?.(c),l.onGroupBlur(c)},...i})}),mD=Nt.forwardRef(function({className:t,...o},n){let r=Ta();return f(_i.Input,{ref:s=>{r.inputRef.current=s,spe(n,s)},className:s=>Ge("MoneyFieldInput",typeof t=="function"?t(s):t),inputMode:r.digits>0?"decimal":"numeric",...o,"aria-describedby":ipe(typeof o["aria-describedby"]=="string"?o["aria-describedby"]:void 0,r.descriptionId,r.liveId)})}),gD=Nt.forwardRef(function({className:t,...o},n){let r=Ta();return r.showPicker?f(uD,{}):r.showSymbol?f("span",{ref:n,className:Ge("MoneyFieldAffix",t),"aria-hidden":"true",onMouseDown:s=>s.preventDefault(),onClick:r.focusInput,...o,children:r.symbol}):null});function ape(){let e=Ta();if(!e.allowNegative)return null;let t=e.minor!=null?e.minor<0:e.pendingSign<0,o=e.minor==null&&t?"The next amount will be negative":t?"Make amount positive":"Make amount negative";return f(Ht,{type:"button",emphasis:"quiet",className:"MoneyFieldSign","aria-label":o,disabled:e.disabled||e.readOnly,onClick:e.onToggleSign,children:f("span",{className:"material-symbols-outlined","aria-hidden":"true",children:t?"remove":"add"})})}var em=Nt.forwardRef(function({match:t,children:o,...n},r){let s=Ta(),i=t==="valueMissing"?s.messages.valueMissing:t==="rangeUnderflow"?s.messages.rangeUnderflow:t==="rangeOverflow"?s.messages.rangeOverflow:null;return f($r.Error,{ref:r,match:t,...n,children:o??i})});function pD(e,t){let o=!1;return Nt.Children.forEach(e,n=>{if(!Nt.isValidElement(n)||n.type!==em)return;let r=n.props.match;(r==null||r===!0||r===t)&&(o=!0)}),o}var bD=Object.assign(Nt.forwardRef(function({placeholder:t,steppers:o=!1,children:n,...r},s){return f(dD,{ref:s,"data-steppers":o?"":void 0,...r,children:[f(fD,{children:[f(OW,{side:"start"}),f(mD,{placeholder:t}),f(ape,{}),o?f($n,{children:[f(_i.Increment,{"aria-label":"Increase",children:f("span",{className:"material-symbols-outlined",children:"add"})}),f(_i.Decrement,{"aria-label":"Decrease",children:f("span",{className:"material-symbols-outlined",children:"remove"})})]}):null,f(OW,{side:"end"})]}),n,pD(n,"valueMissing")?null:f(em,{match:"valueMissing"}),pD(n,"rangeUnderflow")?null:f(em,{match:"rangeUnderflow"}),pD(n,"rangeOverflow")?null:f(em,{match:"rangeOverflow"})]})}),{Root:dD,Group:fD,Input:mD,Affix:gD,CurrencySelect:uD,Increment:_i.Increment,Decrement:_i.Decrement,Error:em});function OW({side:e}){let t=Ta();return t.affix!==e||!t.showPicker&&!t.showSymbol?null:f(gD,{})}var Gt=T(D(),1);var lpe=/^(\d{4})-(\d{2})-(\d{2})$/;function Fo(e){let t=lpe.exec(e);if(!t)return null;let o=Number(t[1]),n=Number(t[2]),r=Number(t[3]);return n<1||n>12||r<1||r>Lp(o,n)?null:{y:o,m:n,d:r}}function zs(e,t,o){return`${String(e).padStart(4,"0")}-${String(t).padStart(2,"0")}-${String(o).padStart(2,"0")}`}function Lp(e,t){return new Date(Date.UTC(e,t,0)).getUTCDate()}function tm(e){let t=Fo(e);if(!t)throw new Error(`Not an ISO date: ${e}`);return new Date(Date.UTC(t.y,t.m-1,t.d))}function cpe(e){return zs(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate())}function Li(e=new Date){return zs(e.getFullYear(),e.getMonth()+1,e.getDate())}function no(e,t){return e===t?0:e<t?-1:1}function En(e,t){let o=tm(e);return o.setUTCDate(o.getUTCDate()+t),cpe(o)}function Ho(e,t){let o=Fo(e);if(!o)throw new Error(`Not an ISO date: ${e}`);let n=o.y*12+(o.m-1)+t,r=Math.floor(n/12),s=n-r*12+1;return zs(r,s,Math.min(o.d,Lp(r,s)))}function RD(e,t){return Ho(e,t*12)}function yo(e){let t=Fo(e);if(!t)throw new Error(`Not an ISO date: ${e}`);return zs(t.y,t.m,1)}function Bi(e){let t=Fo(e);if(!t)throw new Error(`Not an ISO date: ${e}`);return zs(t.y,t.m,Lp(t.y,t.m))}function kc(e,t){let n=(tm(e).getUTCDay()-t+7)%7;return En(e,-n)}function vy(e,t){return En(kc(e,t),6)}function om(e){let t=tm(e),o=t.getUTCDay()||7;t.setUTCDate(t.getUTCDate()+4-o);let n=new Date(Date.UTC(t.getUTCFullYear(),0,1));return Math.ceil(((t.getTime()-n.getTime())/864e5+1)/7)}function Lc(e,t,o){return t&&no(e,t)<0?t:o&&no(e,o)>0?o:e}function nm(e,t,o){return!(t&&no(e,t)<0||o&&no(e,o)>0)}function Fl(e,t){let[o,n]=no(e,t)<=0?[e,t]:[t,e];return Math.round((tm(n).getTime()-tm(o).getTime())/864e5)+1}function _l(e,t){return no(e,t)<=0?{start:e,end:t}:{start:t,end:e}}function Bp(e,t,o,n){let r=Fl(e,t);return n!=null&&r>n?`Ranges can be up to ${n} days`:o!=null&&r<o?`Ranges must be at least ${o} days`:null}var upe=new Set(["US","CA","MX","BR","JP","IL","PH","AU","NZ","IN","KR","TW","TH","ZA","SA"]);function ppe(e){let t=e.trim().replace(/_/g,"-");if(!t.includes("-"))return/^en$/i.test(t)?"US":null;try{return new Intl.Locale(t).region??null}catch{let o=t.split("-").find(n=>/^[A-Za-z]{2}$/.test(n));return o?o.toUpperCase():null}}function Bc(e){try{let o=new Intl.Locale(e),r=(typeof o.getWeekInfo=="function"?o.getWeekInfo():o.weekInfo)?.firstDay;if(typeof r=="number"&&r>=1&&r<=7)return r===7?0:r}catch{}let t=ppe(e);return t!=null&&upe.has(t)?0:1}function Hp(e,t){let o=yo(e),n=kc(o,t),r=Fo(o).m;return Array.from({length:42},(s,i)=>{let a=En(n,i);return{date:a,outside:Fo(a).m!==r}})}function Vc(e){let t=Fo(e);if(!t)throw new Error(`Not an ISO date: ${e}`);return new Date(Date.UTC(t.y,t.m-1,t.d,12))}function Ol(e,t){return new Intl.DateTimeFormat(t,{month:"short",day:"numeric",year:"numeric",timeZone:"UTC"}).format(Vc(e))}function Hi(e,t){return new Intl.DateTimeFormat(t,{weekday:"long",month:"long",day:"numeric",year:"numeric",timeZone:"UTC"}).format(Vc(e))}function wy(e,t){return new Intl.DateTimeFormat(t,{month:"long",year:"numeric",timeZone:"UTC"}).format(Vc(e))}function xD(e,t){return new Intl.DateTimeFormat(t,{month:"short",timeZone:"UTC"}).format(Vc(e))}function Gp(e,t,o){let n=new Intl.DateTimeFormat(o,{month:"short",day:"numeric",year:"numeric",timeZone:"UTC"});return typeof n.formatRange=="function"?n.formatRange(Vc(e),Vc(t)):`${Ol(e,o)} \u2013 ${Ol(t,o)}`}function CD(e,t){let o="2026-01-04";return Array.from({length:7},(n,r)=>{let s=Vc(En(o,(t+r)%7));return{narrow:new Intl.DateTimeFormat(e,{weekday:"narrow",timeZone:"UTC"}).format(s),long:new Intl.DateTimeFormat(e,{weekday:"long",timeZone:"UTC"}).format(s)}})}function yD(e,t,o){let n=En(kc(e,t),o*7);return{start:n,end:En(n,6)}}function SD(e,t){let o=Ho(yo(e),t);return{start:o,end:Bi(o)}}var Py={id:"today",label:"Today",value:e=>e},Ey={id:"yesterday",label:"Yesterday",value:e=>En(e,-1)},Ty={id:"tomorrow",label:"Tomorrow",value:e=>En(e,1)};function Iy(e=1){return{id:"thisWeek",label:"This week",value:t=>yD(t,e,0)}}function My(e=1){return{id:"lastWeek",label:"Last week",value:t=>yD(t,e,-1)}}function Dy(e=1){return{id:"nextWeek",label:"Next week",value:t=>yD(t,e,1)}}var Ny={id:"last7Days",label:"Last 7 days",value:e=>({start:En(e,-6),end:e})},Ay={id:"last30Days",label:"Last 30 days",value:e=>({start:En(e,-29),end:e})},Oy={id:"thisMonth",label:"This month",value:e=>SD(e,0)},Fy={id:"lastMonth",label:"Last month",value:e=>SD(e,-1)},_y={id:"nextMonth",label:"Next month",value:e=>SD(e,1)},Vy={id:"thisQuarter",label:"This quarter",value:e=>{let t=Fo(e),o=Math.floor((t.m-1)/3)*3+1,n=zs(t.y,o,1);return{start:n,end:Bi(Ho(n,2))}}},ky={id:"yearToDate",label:"Year to date",value:e=>({start:zs(Fo(e).y,1,1),end:e})};function Ly(e){return[Py,Ey,Ty,Iy(e),My(e),Dy(e),Ny,Ay,Oy,Fy,_y,Vy,ky]}var hD=["today","yesterday","tomorrow"];function rm(e,t){let o=Ly(t);return e==="single"?o.filter(n=>hD.includes(n.id)):o.filter(n=>!hD.includes(n.id)||n.id==="today")}function sm(e,t){return typeof e.value=="function"?e.value(t):e.value}function $o(e){return typeof e=="object"&&e!==null&&"start"in e}function vD(e,t){if(e==null||t==null)return e==null&&t==null;let o=$o(e)?e:{start:e,end:e},n=$o(t)?t:{start:t,end:t};return o.start===n.start&&o.end===n.end}function wD(e,t,o,n){let r=$o(e)?e.start&&e.end?dpe(e.start,e.end):[]:[e];return r.length?r.every(s=>nm(s,t,o)&&!n?.(s)):!1}function dpe(e,t){let o=_l(e,t),n=[];for(let r=o.start;no(r,o.end)<=0;r=En(r,1))n.push(r);return n}function PD(e,t,o){let n=o.rtl?-1:1;switch(t){case"ArrowLeft":return En(e,-n);case"ArrowRight":return En(e,n);case"ArrowUp":return En(e,-7);case"ArrowDown":return En(e,7);case"Home":return kc(e,o.weekStartsOn);case"End":return vy(e,o.weekStartsOn);case"PageUp":return o.shift?RD(e,-1):Ho(e,-1);case"PageDown":return o.shift?RD(e,1):Ho(e,1);default:return null}}function im(){return typeof document<"u"&&document.documentElement.lang?document.documentElement.lang:"en-US"}var FW=T(D(),1);function _W({focused:e,onFocusedChange:t,month:o,onMonthChange:n,months:r,weekStartsOn:s,rtl:i,min:a,max:l,onClear:c,onPick:u}){let p=FW.useRef(!1);return{onDayKeyDown:m=>{if(!e)return;if(m.key==="Delete"||m.key==="Backspace"){m.preventDefault(),c?.();return}if(m.key==="Enter"||m.key===" "){m.preventDefault(),u?.(e);return}let g=PD(e,m.key,{weekStartsOn:s,rtl:i,shift:m.shiftKey});if(!g)return;m.preventDefault();let R=Lc(g,a,l);if(R===e)return;p.current=!0,t(R);let b=yo(o),x=Bi(Ho(b,r-1));if(no(R,b)>=0&&no(R,x)<=0)return;let h=no(R,x)>0?yo(Ho(R,-(r-1))):yo(R);h!==b&&n(h)},pendingFocus:p}}function ED({columns:e,count:t,index:o,onIndexChange:n,onPick:r,onBack:s,rtl:i}){return{onKeyDown:l=>{if(l.key==="Escape"){l.preventDefault(),l.stopPropagation(),s?.();return}let c=i?-1:1,u=o;switch(l.key){case"ArrowRight":u=o+c;break;case"ArrowLeft":u=o-c;break;case"ArrowDown":u=o+e;break;case"ArrowUp":u=o-e;break;case"Home":u=0;break;case"End":u=t-1;break;case"Enter":case" ":if(l.preventDefault(),l.currentTarget.getAttribute("aria-disabled")==="true")return;r(o);return;default:return}l.preventDefault(),!(u<0||u>=t)&&n(u)}}}function VW(e){return typeof e=="object"&&e!==null&&"start"in e}function kW(e){return e==="range"?{start:null,end:null}:null}var am=Gt.forwardRef(function({mode:t="single",value:o,defaultValue:n,onValueChange:r,month:s,defaultMonth:i,onMonthChange:a,months:l=1,min:c,max:u,isDateDisabled:p,minLength:d,maxLength:m,weekStartsOn:g,locale:R,showOutsideDays:b=!0,showWeekNumbers:x=!1,focusSelected:h=!1,chooserBackRef:C,onAnnounce:y,className:S},w){let v=Gt.useId(),P=R||im(),N=g??Bc(P),E=Gt.useRef(null);Gt.useImperativeHandle(w,()=>E.current);let[M,W]=Gt.useState(!1);Gt.useEffect(()=>{let he=E.current;if(!he)return;W(getComputedStyle(he).direction==="rtl")},[]);let[I,O]=Gt.useState(n??kW(t)),F=o!==void 0?o:I,k=VW(F)?F:null,U=VW(F)?null:F,_=he=>{o===void 0&&O(he),r?.(he)},B=Li(),L=k?.start||U||null;function V(he){let be=yo(he);return u&&no(be,u)>0&&(be=yo(u)),c&&no(Bi(Ho(be,l-1)),c)<0&&(be=yo(c)),u&&no(be,u)>0&&(be=yo(u)),be}function A(he){return nm(he,c,u)&&!p?.(he)}let K=s!=null?yo(s):L?yo(L):V(yo(i??B)),[H,G]=Gt.useState(yo(K)),oe=yo(s??H),ee=L?oe:V(oe),X=he=>{let be=yo(he);s===void 0&&G(be),a?.(be);let pe=Array.from({length:l},(Ae,we)=>wy(Ho(be,we),P));y?.(pe.join(", "))},[te,ce]=Gt.useState(k?.start||U||null),[le,Q]=Gt.useState(null),[ne,Y]=Gt.useState("days"),[ae,Z]=Gt.useState(()=>Fo(ee).y),[ue,Te]=Gt.useState(0),fe=Gt.useRef(new Map),ve=Gt.useRef([]),z=Gt.useRef(0),Re=Gt.useRef(!1),{onDayKeyDown:xe,pendingFocus:Pe}=_W({focused:te,onFocusedChange:he=>{ce(he),k?.start&&!k.end&&Q(he)},month:ee,onMonthChange:X,months:l,weekStartsOn:N,rtl:M,min:c,max:u,onPick:he=>Fe(he),onClear:()=>{Q(null),_(kW(t)),y?.("Selection cleared.")}}),ie=Gt.useRef(!1),re=Gt.useRef(null);Gt.useLayoutEffect(()=>{if(!h){ie.current=!1;return}if(ie.current)return;ie.current=!0;let he=L||(A(B)?B:Ee(V(u&&no(B,u)>0?u:c??B)));if(!he)return;ce(he);let be=yo(ee),Le=Bi(Ho(be,l-1));(no(he,be)<0||no(he,Le)>0)&&X(yo(he)),re.current=he},[h]),Gt.useLayoutEffect(()=>{let he=re.current;if(!he)return;let be=fe.current.get(he);be&&(re.current=null,be.focus())});function Ee(he){for(let be=0;be<l;be++)for(let Le of Hp(Ho(he,be),N))if(!Le.outside&&A(Le.date))return Le.date;return null}let ye=Gt.useCallback(()=>{Y("days"),Re.current=!0},[]);Gt.useEffect(()=>{if(C)return C.current=ne==="days"?null:ye,()=>{C.current=null}},[ne,C,ye]),Gt.useLayoutEffect(()=>{ne!=="days"||!Re.current||(Re.current=!1,ve.current[z.current]?.focus())},[ne]),Gt.useEffect(()=>{!Pe.current||!te||(Pe.current=!1,fe.current.get(te)?.focus())},[te,ee,Pe]);let se=k?.start&&!k.end?k.start:null,Fe=he=>{if(ke(he)&&!(se&&he===se&&(d==null||d<=1)))return;if(t==="single"){_(he),ce(he),y?.(Hi(he,P));return}if(!k?.start||k.end){_({start:he,end:null}),Q(null),ce(he),y?.(`Start date ${Hi(he,P)}. Pick an end date.`);return}if(he===k.start){_({start:he,end:he}),Q(null),y?.(`${Hi(he,P)}, one day.`);return}let be=_l(k.start,he);_(be),Q(null),y?.(`${Hi(be.start,P)} to ${Hi(be.end,P)}, ${Fl(be.start,be.end)} days.`)};function ke(he){return!!(!nm(he,c,u)||p?.(he)||se&&Bp(se,he,d,m))}function de(he){return c&&no(he,c)<0?`Before ${Hi(c,P)}`:u&&no(he,u)>0?`After ${Hi(u,P)}`:p?.(he)?"Unavailable":se?Bp(se,he,d,m):null}let Ie=CD(P,N),Me=Array.from({length:l},(he,be)=>Ho(ee,be)),We=new Set(Me.flatMap(he=>Hp(he,N).filter(be=>!be.outside).map(be=>be.date))),Ue=he=>{let be=Ho(ee,he),Le=he<0?Bi(be):yo(Ho(be,l-1));return!(he<0&&c&&no(Le,c)<0||he>0&&u&&no(yo(be),u)>0)},ze=he=>{if(!Ue(he))return;X(Ho(ee,he)),ce(Lc(Ho(te??B,he),c,u)),Pe.current=!0},He=Me.flatMap(he=>Hp(he,N).filter(be=>!(be.outside&&!b||be.outside&&We.has(be.date))).map(be=>be.date)),je=new Set(He),Qe=he=>!!(he&&je.has(he)),et=(Qe(te)?te:null)||(Qe(U)?U:null)||(Qe(k?.start)?k.start:null)||(Qe(k?.end)?k.end:null)||(Qe(B)?B:null)||He.find(he=>!ke(he))||He[0]||null,ut=se&&le&&le!==se?le:null,vt=ut?_l(se,ut):k?.start&&k.end?_l(k.start,k.end):null,De=he=>{let be=he==="prev";return f("span",{className:"material-symbols-outlined",children:(M?!be:be)?"chevron_left":"chevron_right"})};return f("div",{ref:E,className:Ge("Calendar",S),"data-months":l,children:ne==="days"?f("div",{className:"DatePickerMonths",children:[f("div",{className:"DatePickerNav",children:[f(Ht,{type:"button",emphasis:"quiet","aria-label":"Previous month",disabled:!Ue(-1),onClick:()=>ze(-1),children:De("prev")}),Me.map((he,be)=>f("button",{type:"button",className:"DatePickerMonthTitle",id:`${v}-month-${be}`,"data-index":be,ref:Le=>{ve.current[be]=Le},onClick:()=>{z.current=be,Te(Fo(he).m-1),Z(Fo(he).y),Y("months")},children:wy(he,P)},he)),f(Ht,{type:"button",emphasis:"quiet","aria-label":"Next month",disabled:!Ue(1),onClick:()=>ze(1),children:De("next")})]}),Me.map((he,be)=>f(fpe,{month:he,titleId:`${v}-month-${be}`,monthIndex:be,localeName:P,labels:Ie,showWeekNumbers:x,showOutsideDays:b,shown:We,weekStart:N,mode:t,focused:te,tabDate:et,single:U,rangeStart:k?.start??null,rangeEnd:k?.end??null,band:vt,previewing:!!ut,todayValue:B,dayBlocked:ke,blockReason:de,onPick:Fe,onFocusDay:ce,onPreview:Le=>se&&Q(Le),onPreviewEnd:()=>Q(null),onKeyDown:xe,dayRefs:fe},he))]}):ne==="months"?f(mpe,{year:ae,localeName:P,min:c,max:u,rtl:M,onYear:he=>Z(be=>be+he),initialIndex:ue,onPick:he=>{X(zs(ae,he+1,1)),ye()},onBack:ye,onOpenYears:()=>Y("years")}):f(gpe,{year:ae,min:c,max:u,rtl:M,onShift:he=>Z(be=>be+he),onPick:he=>{Z(he),Y("months")},onBack:ye})})});function fpe(e){let t=Hp(e.month,e.weekStart),o=[];for(let n=0;n<t.length;n+=7)o.push(t.slice(n,n+7));return f("section",{className:"DatePickerMonth","data-index":e.monthIndex,children:f("div",{role:"grid",tabIndex:-1,"aria-labelledby":e.titleId,"aria-multiselectable":e.mode==="range"?!0:void 0,className:"CalendarGrid",onMouseLeave:e.onPreviewEnd,children:[f("div",{role:"row",className:"CalendarWeek",children:[e.showWeekNumbers?f("span",{role:"columnheader",className:"CalendarWeekNumber"}):null,e.labels.map(n=>f("span",{role:"columnheader",className:"CalendarWeekday",children:f("abbr",{title:n.long,children:n.narrow})},n.long))]}),o.map(n=>f("div",{role:"row",className:"CalendarWeek",children:[e.showWeekNumbers?f("span",{role:"rowheader",className:"CalendarWeekNumber",children:om(n.find(r=>!r.outside)?.date??n[3].date)}):null,n.map(r=>{let s=r.outside&&e.shown.has(r.date);if(r.outside&&!e.showOutsideDays||s)return f("span",{role:"gridcell",className:"CalendarDay CalendarDay--empty"},r.date);let i=e.dayBlocked(r.date),a=i?e.blockReason(r.date):null,l=e.single===r.date,c=e.rangeStart===r.date,u=e.rangeEnd===r.date,p=e.band!=null&&no(r.date,e.band.start)>0&&no(r.date,e.band.end)<0,d=e.band?.start===r.date,m=e.band?.end===r.date&&e.band.start!==e.band.end,g=l||c||u||d||m,R=l||c||u,b=[Hi(r.date,e.localeName),r.date===e.todayValue?"today":"",l?"selected":"",c?"range start":"",u?"range end":"",p?"in range":"",a??""].filter(Boolean);return f("button",{type:"button",role:"gridcell",ref:x=>{x?e.dayRefs.current.set(r.date,x):e.dayRefs.current.delete(r.date)},className:"CalendarDay",tabIndex:r.date===e.tabDate?0:-1,"aria-selected":R||void 0,"aria-current":r.date===e.todayValue?"date":void 0,"aria-disabled":i||void 0,"aria-label":b.join(", "),"data-selected":g||void 0,"data-range-start":d?"":void 0,"data-range-end":m?"":void 0,"data-in-range":p?"":void 0,"data-preview":e.previewing&&e.band&&no(r.date,e.band.start)>=0&&no(r.date,e.band.end)<=0?"":void 0,"data-today":r.date===e.todayValue?"":void 0,"data-outside-month":r.outside?"":void 0,"data-disabled":i?"":void 0,"data-focused":e.focused===r.date?"":void 0,onClick:()=>e.onPick(r.date),onMouseEnter:()=>e.onPreview(r.date),onFocus:()=>{e.onFocusDay(r.date),e.onPreview(r.date)},onKeyDown:e.onKeyDown,children:f("span",{className:"CalendarDayNumber",children:Fo(r.date).d})},r.date)})]},n[0].date))]})})}function mpe({year:e,localeName:t,min:o,max:n,rtl:r,initialIndex:s,onYear:i,onPick:a,onBack:l,onOpenYears:c}){let[u,p]=Gt.useState(s),d=Gt.useRef([]),{onKeyDown:m}=ED({columns:3,count:12,index:u,onIndexChange:p,onPick:a,onBack:l,rtl:r});Gt.useLayoutEffect(()=>{d.current[u]?.focus()},[u]);let g=o?Fo(o).y:null,R=n?Fo(n).y:null;return f("div",{className:"CalendarChooser",children:[f("div",{className:"DatePickerMonthBar",children:[f(Ht,{type:"button",emphasis:"quiet","aria-label":"Previous year",disabled:g!=null&&e<=g,onClick:()=>i(-1),children:f("span",{className:"material-symbols-outlined",children:r?"chevron_right":"chevron_left"})}),f("button",{type:"button",className:"DatePickerMonthTitle",onClick:c,children:e}),f(Ht,{type:"button",emphasis:"quiet","aria-label":"Next year",disabled:R!=null&&e>=R,onClick:()=>i(1),children:f("span",{className:"material-symbols-outlined",children:r?"chevron_left":"chevron_right"})})]}),f("div",{role:"grid",tabIndex:-1,className:"CalendarChooserGrid","aria-label":`${e} months`,children:Array.from({length:12},(b,x)=>{let h=zs(e,x+1,1),C=o!=null&&no(Bi(h),o)<0||n!=null&&no(h,n)>0;return f("button",{type:"button",role:"gridcell",className:"CalendarChoice",ref:y=>{d.current[x]=y},tabIndex:u===x?0:-1,"aria-disabled":C||void 0,onClick:()=>!C&&a(x),onKeyDown:m,onFocus:()=>p(x),children:xD(h,t)},h)})})]})}function gpe({year:e,min:t,max:o,rtl:n,onShift:r,onPick:s,onBack:i}){let a=t?Fo(t).y:null,l=o?Fo(o).y:null,c=Math.floor(e/12)*12,u=c+11,p=a!=null?Math.max(c,a):c,d=l!=null?Math.min(u,l):u,m=d>=p?Array.from({length:d-p+1},(y,S)=>p+S):[e],g=Gt.useRef([]),[R,b]=Gt.useState(Math.max(0,m.indexOf(e)));Gt.useLayoutEffect(()=>{g.current[R]?.focus()},[R]);let{onKeyDown:x}=ED({columns:3,count:m.length,index:R,onIndexChange:b,onPick:y=>s(m[y]),onBack:i,rtl:n}),h=a!=null&&c<=a,C=l!=null&&u>=l;return f("div",{className:"CalendarChooser",children:[f("div",{className:"DatePickerMonthBar",children:[f(Ht,{type:"button",emphasis:"quiet","aria-label":"Previous years",disabled:h,onClick:()=>!h&&r(-12),children:f("span",{className:"material-symbols-outlined",children:n?"chevron_right":"chevron_left"})}),f("span",{className:"DatePickerMonthTitle",children:[m[0]," \u2013 ",m[m.length-1]]}),f(Ht,{type:"button",emphasis:"quiet","aria-label":"Next years",disabled:C,onClick:()=>!C&&r(12),children:f("span",{className:"material-symbols-outlined",children:n?"chevron_left":"chevron_right"})})]}),f("div",{role:"grid",tabIndex:-1,className:"CalendarChooserGrid","aria-label":"Years",children:m.map((y,S)=>{let w=a!=null&&y<a||l!=null&&y>l;return f("button",{type:"button",role:"gridcell",className:"CalendarChoice",ref:v=>{g.current[S]=v},tabIndex:R===S?0:-1,"aria-disabled":w||void 0,onClick:()=>!w&&s(y),onKeyDown:x,onFocus:()=>b(S),children:y},y)})})]})}var To=T(D(),1);var Up=T(D(),1);function lm({presets:e,value:t,onSelect:o,min:n,max:r,isDateDisabled:s,locale:i="en-US",layout:a="column",selectOnNavigate:l=!1,label:c="Quick selections",className:u}){let p=Li(),d=e.map(y=>({preset:y,value:sm(y,p)})),m=d.map(y=>wD(y.value,n,r,s)),g=d.findIndex((y,S)=>m[S]&&vD(y.value,t)),[R,b]=Up.useState(g>=0?g:m.findIndex(Boolean)),x=Up.useRef([]);Up.useEffect(()=>{g>=0&&b(g)},[g]);let h=y=>{b(y),x.current[y]?.focus();let S=d[y];l&&S&&m[y]&&o(S.preset,S.value)},C=y=>{if(y.key==="Enter"||y.key===" "){y.preventDefault();let P=d[R];P&&m[R]&&o(P.preset,P.value);return}let S=y.key==="ArrowDown"||y.key==="ArrowRight"?1:y.key==="ArrowUp"||y.key==="ArrowLeft"?-1:0;if(!S&&y.key!=="Home"&&y.key!=="End")return;y.preventDefault();let w=(P,N)=>{for(let E=1;E<=d.length;E++){let M=(P+N*E+d.length)%d.length;if(m[M])return M}return P},v=y.key==="Home"?m.findIndex(Boolean):y.key==="End"?m.lastIndexOf(!0):w(R,S);v>=0&&h(v)};return f("div",{role:"radiogroup",tabIndex:-1,"aria-label":c,className:Ge("DatePickerPresets",u),"data-layout":a,onKeyDown:C,children:d.map((y,S)=>{let w=y.preset.hint??($o(y.value)&&y.value.start&&y.value.end?Gp(y.value.start,y.value.end,i):void 0);return f("button",{type:"button",role:"radio",className:"DatePickerPreset","aria-checked":S===g,"aria-disabled":!m[S]||void 0,"data-checked":S===g?"":void 0,"data-disabled":m[S]?void 0:"",ref:v=>{x.current[S]=v},tabIndex:S===R?0:-1,onClick:()=>{m[S]&&(b(S),o(y.preset,y.value))},children:[f("span",{className:"DatePickerPresetLabel",children:y.preset.label}),w?f("span",{className:"DatePickerPresetHint",children:w}):null]},y.preset.id)})})}var Wp={start:null,end:null};function bpe(){let[e,t]=To.useState("(max-width: 48em)"),[o,n]=To.useState(!1);return To.useEffect(()=>{let r=getComputedStyle(document.documentElement).getPropertyValue("--sl-breakpoint-md").trim();r&&t(`(max-width: ${r})`)},[]),To.useEffect(()=>{let r=window.matchMedia(e),s=()=>n(r.matches);return s(),r.addEventListener("change",s),()=>r.removeEventListener("change",s)},[e]),o}function LW(e,t){return e==="range"?!!($o(t)&&(t.start||t.end)):!!t}function Rpe(e){return $o(e)&&!!e.start&&!e.end}var BW=40,HW=32,hpe=48;function TD(e,t){let o=typeof e=="string"?e:$o(e)?e.start:null;if(!o||!Fo(o))return null;let n=$o(e)?e.end:null,r=yo(o);if(!n||!Fo(n))return r;let s=yo(n),i=Fo(r),a=Fo(s);return(a.y-i.y)*12+(a.m-i.m)<t?r:Ho(s,-(t-1))}function xpe(e){let t=parseFloat(getComputedStyle(document.documentElement).fontSize)||16,o=e?.parentElement??null;for(;o&&o!==document.documentElement;){let n=o.style.width||o.style.maxWidth||o.style.inlineSize||o.style.maxInlineSize;if(n.endsWith("px"))return parseFloat(n);if(n.endsWith("rem"))return parseFloat(n)*t;o=o.parentElement}}var ID=To.forwardRef(function(t,o){let{mode:n="single",min:r,max:s,isDateDisabled:i,minLength:a,maxLength:l,presets:c=!0,months:u="auto",weekStartsOn:p,locale:d,showOutsideDays:m,showWeekNumbers:g,commit:R,clearable:b=!0,placeholder:x,name:h,nameStart:C,nameEnd:y,required:S,disabled:w,readOnly:v,formatValue:P,open:N,defaultOpen:E,onOpenChange:M,popup:W="auto",defaultMonth:I,label:O,id:F,className:k}=t,U=d||im(),_=p??Bc(U),B=R??(n==="range"?"apply":"immediate"),L=bpe(),V=W==="drawer"||W==="auto"&&L,A=ht(),{labelId:K}=Vt(),H=A.state.valid===!1,G=t.value!==void 0,[oe,ee]=To.useState(t.defaultValue??(n==="range"?Wp:null)),X=(G?t.value:oe)??(n==="range"?Wp:null),[te,ce]=To.useState(X),[le,Q]=To.useState(E??!1),ne=N??le,[Y,ae]=To.useState(""),Z=To.useRef(null),ue=To.useRef(null),Te=To.useRef(null),[fe,ve]=To.useState(0),[z,Re]=To.useState(!1);To.useLayoutEffect(()=>{let Ke=Z.current;Ke&&Re(getComputedStyle(Ke).direction==="rtl")},[ne]),To.useLayoutEffect(()=>{if(!ne)return;let Ke=null,dt=0,jt=()=>{let xt=ue.current;if(!xt){dt=requestAnimationFrame(jt);return}let mo=()=>ve(xt.clientWidth);mo(),Ke=new ResizeObserver(mo),Ke.observe(xt)};return jt(),()=>{cancelAnimationFrame(dt),Ke?.disconnect()}},[ne]);let xe=typeof document<"u"&&parseFloat(getComputedStyle(document.documentElement).fontSize)||16,Pe=typeof window<"u"&&window.matchMedia("(pointer: coarse)").matches,ie=u==="auto"?n==="range"?2:1:u,re=ie;V?re=1:fe>0&&(fe<HW*xe||Pe&&fe<hpe*xe?re=1:fe<BW*xe&&(re=ie===1?1:2)),re>ie&&(re=ie);let Ee=V||fe>0&&fe<BW*xe,ye=V||fe>0&&fe<HW*xe,se=V||Pe||ye,Fe=ne&&typeof document<"u"?xpe(Z.current):void 0,[ke,de]=To.useState(()=>yo(TD(X,u==="auto"?n==="range"?2:1:u)??I??Li())),Ie=To.useId(),Me=F??Ie,We=Ke=>{N===void 0&&Q(Ke),M?.(Ke)},Ue=Ke=>{G||ee(Ke),n==="range"?t.onValueChange?.($o(Ke)?Ke:Wp):t.onValueChange?.(typeof Ke=="string"?Ke:null)},ze=P?P(n==="range"?$o(X)?X:Wp:typeof X=="string"?X:null,U):ype(n,X,U,x),He=c===!1?[]:c===!0?rm(n,_):c.filter(Ke=>n==="single"?!$o(typeof Ke.value=="function"?Ke.value(Li()):Ke.value):!0),je=typeof X=="string"?X:$o(X)?`${X.start??""}|${X.end??""}`:"";To.useEffect(()=>{if(!ne)return;let Ke=TD(X,re);Ke&&de(Ke)},[ne,je,re]);let Qe=Ke=>{ce(Ke),B==="immediate"&&(Ue(Ke),(n==="single"?typeof Ke=="string":$o(Ke)&&Ke.start&&Ke.end)&&We(!1))},et=()=>{ce(n==="range"?Wp:null),ae("Selection cleared.")},ut=()=>{let Ke=n==="range"?Wp:null;ce(Ke),Ue(Ke),ae(n==="range"?"Dates cleared.":"Date cleared."),document.getElementById(Me)?.focus()},vt=()=>{Ue(te),We(!1)},De=()=>{ce(X),We(!1)},he=(Ke,dt)=>{if(Ke&&v){dt?.cancel?.();return}if(!Ke&&dt?.reason==="escape-key"&&Te.current){dt.cancel?.(),Te.current();return}if(!Ke&&Rpe(te)&&dt?.reason==="escape-key"){dt.cancel?.(),et(),ae("Start date cleared. Pick a start date, or press Escape to close.");return}Ke||ce(X),Ke&&ce(X),We(Ke)},be=Ke=>{let dt=TD(Ke,re);dt&&de(dt)},Le=f("div",{ref:ue,className:"DatePickerPanel","data-months":re,"data-mode":n,"data-popup":V?"drawer":"popover","data-layout":Ee?"row":"column","data-compact":ye?"":void 0,"data-touch":se?"":void 0,children:[He.length?f(lm,{presets:He,value:te,min:r,max:s,isDateDisabled:i,locale:U,layout:Ee?"row":"column",selectOnNavigate:B==="apply",onSelect:(Ke,dt)=>{let jt=n==="range"&&typeof dt=="string"?{start:dt,end:dt}:dt;Qe(jt),be(jt)}}):null,f(am,{mode:n,value:te,onValueChange:Qe,month:ke,defaultMonth:I,onMonthChange:de,months:re,chooserBackRef:Te,min:r,max:s,isDateDisabled:i,minLength:a,maxLength:l,weekStartsOn:_,locale:U,showOutsideDays:m,showWeekNumbers:g,focusSelected:ne,onAnnounce:ae}),f("div",{className:"DatePickerFooter",children:[f("p",{className:"DatePickerSummary",children:Spe(n,te,U)}),f("div",{className:"DatePickerActions",children:[b?f(Ht,{type:"button",emphasis:"quiet",onClick:et,children:"Clear"}):null,B==="apply"?f(Ht,{type:"button",emphasis:"standard",onClick:De,children:"Cancel"}):null,B==="apply"?f(Ht,{type:"button",emphasis:"bold",className:"DatePickerApply",onClick:vt,children:"Apply"}):null]})]}),f("div",{className:"visually-hidden","aria-live":"polite",children:Y})]}),pe=`${Me}-value`,Ae=K?{"aria-labelledby":K}:O?{"aria-label":O}:{},we=K||O?{"aria-describedby":pe}:{},Oe=K?{"aria-labelledby":K}:{"aria-label":O||x||(n==="range"?"Choose dates":"Choose a date")},$e=f(Cpe,{id:pe,display:ze,placeholder:x,empty:!LW(n,X)}),Ve={"aria-haspopup":"dialog",disabled:w,"aria-invalid":H||void 0,"aria-readonly":v||void 0,"data-invalid":H?"":void 0,...Ae,...we},Ze=f("div",{ref:Z,className:Ge("DatePickerField",k),children:[V?f(hn.Trigger,{id:Me,ref:o,className:"DatePickerTrigger",...Ve,children:$e}):f(Ea.Trigger,{id:Me,ref:o,className:"DatePickerTrigger",...Ve,children:$e}),b&&LW(n,X)&&!w&&!v?f(Ht,{type:"button",emphasis:"quiet",className:"DatePickerClear","aria-label":n==="range"?"Clear dates":"Clear date",onClick:ut,children:f("span",{className:"material-symbols-outlined",children:"close"})}):null,n==="single"?f(GW,{name:h,value:typeof X=="string"?X:"",required:S,triggerId:Me}):f($n,{children:[f(GW,{name:C??(h?`${h}[start]`:void 0),value:$o(X)?X.start??"":"",required:S,triggerId:Me}),f("input",{className:"visually-hidden",name:y??(h?`${h}[end]`:void 0),value:$o(X)?X.end??"":"",tabIndex:-1,"aria-hidden":!0,autoComplete:"off",onChange:()=>{},onFocus:()=>document.getElementById(Me)?.focus()})]})]}),at=Fe?{maxInlineSize:Fe}:void 0;return V?f(hn.Root,{swipeDirection:"down",open:ne,onOpenChange:he,modal:!0,children:[Ze,f(hn.Portal,{children:[f(hn.Backdrop,{}),f(hn.Viewport,{children:f(hn.Popup,{...Oe,"data-months":re,dir:z?"rtl":"ltr",style:at,children:f(hn.Content,{children:[Le,f(hn.Close,{className:"visually-hidden",tabIndex:-1,children:"Close"})]})})})]})]}):f(Ea.Root,{open:ne,onOpenChange:he,modal:"trap-focus",children:[Ze,f(Ea.Portal,{children:f(Ea.Positioner,{sideOffset:8,children:f(Ea.Popup,{...Oe,className:"DatePickerPopup","data-months":re,dir:z?"rtl":"ltr",initialFocus:!1,style:at,children:[Le,f(Ea.Close,{className:"visually-hidden",tabIndex:-1,children:"Close"})]})})})]})});function Cpe({id:e,display:t,placeholder:o,empty:n}){return f($n,{children:[f("span",{className:"material-symbols-outlined DatePickerIcon","aria-hidden":"true",children:"calendar_today"}),f("span",{id:e,className:"DatePickerValue","data-placeholder":n?"":void 0,children:n&&o||t})]})}function GW({name:e,value:t,required:o,triggerId:n}){return f($r.Control,{className:"visually-hidden",name:e,value:t,required:o,tabIndex:-1,"aria-hidden":!0,autoComplete:"off",onFocus:()=>{document.getElementById(n)?.focus()}})}function ype(e,t,o,n){return e==="single"?typeof t=="string"?Ol(t,o):n||"Choose a date":$o(t)&&t.start&&t.end?Gp(t.start,t.end,o):$o(t)&&t.start?`${Ol(t.start,o)} \u2013`:n||"Choose dates"}function Spe(e,t,o){return e==="range"&&$o(t)&&t.start&&t.end?`${Gp(t.start,t.end,o)} \xB7 ${Fl(t.start,t.end)} days`:e==="range"&&$o(t)&&t.start?`Start date ${Ol(t.start,o)}. Pick an end date.`:e==="single"&&typeof t=="string"?Ol(t,o):"No date selected"}var yt=T(D(),1),ej=T(on(),1);var Ot=T(D(),1);var UW={unit:"px",value:0};function cm(e){if(e==null||e==="")return null;if(typeof e=="number")return Number.isFinite(e)?{unit:"percent",value:e}:null;let t=e.trim(),o=/^(-?\d+(?:\.\d+)?)px$/.exec(t);if(o)return{unit:"px",value:Number(o[1])};let n=/^(-?\d+(?:\.\d+)?)%$/.exec(t);return n?{unit:"percent",value:Number(n[1])}:null}function jp(e){let t=Math.round(e.value*100)/100,o=Object.is(t,-0)?"0":String(t);return e.unit==="px"?`${o}px`:`${o}%`}function Yr(e,t){return e.unit==="px"?e.value:e.value/100*t}function vpe(e,t,o){let n=t==="px"||o===0?e:e/o*100;return{unit:t,value:Math.round(n*100)/100}}function zp(e,t,o){return Math.min(o,Math.max(t,e))}function um(e){return{...e,size:{...e.size},defaultSize:{...e.defaultSize},min:{...e.min},max:e.max?{...e.max}:null,collapsedSize:{...e.collapsedSize},restore:e.restore?{...e.restore}:null}}function MD(e){if(e.length<2)throw new Error("Splitter needs at least two panels.");let t=new Set;for(let r of e){if(!r.id)throw new Error("Splitter panel needs an id.");if(t.has(r.id))throw new Error(`Splitter panel id "${r.id}" is used twice.`);t.add(r.id)}let o=e.flatMap((r,s)=>r.defaultSize==null?[s]:[]),n=o.length?o[o.length-1]:e.length-1;return e.map((r,s)=>{let i=s===n,a=cm(r.defaultSize)??{unit:"percent",value:Math.round(100/e.length)},l=i&&r.defaultSize==null?{unit:"percent",value:0}:a,c=r.defaultCollapsed??!1;return{id:r.id,fill:i,size:l,defaultSize:{...l},min:cm(r.minSize)??UW,max:cm(r.maxSize),collapsible:r.collapsible??!1,collapsedSize:cm(r.collapsedSize)??UW,collapsed:c,restore:c?{...l}:null,autoCollapsed:!1,suspended:r.suspended??!1}})}function jW(e,t){let o=MD(t),n=o.length!==e.length,r=o.map(s=>{let i=e.find(d=>d.id===s.id);if(!i)return n=!0,s;let a=YW(i.size,s.min,s.max)?i.size:s.size,l=s.collapsible?i.collapsed:!1,c=!!(l&&i.autoCollapsed),u=l?{...i.restore??a}:null;return a.value===i.size.value&&a.unit===i.size.unit&&l===i.collapsed&&c===i.autoCollapsed&&s.suspended===i.suspended&&s.collapsible===i.collapsible&&s.min.value===i.min.value&&s.min.unit===i.min.unit&&(s.max?.value??null)===(i.max?.value??null)&&(s.max?.unit??null)===(i.max?.unit??null)||(n=!0),{...s,size:{...a},collapsed:l,autoCollapsed:c,restore:u}});return n?r:e}function Hy(e,t){let o=Yr(e.min,t),n=e.max?Yr(e.max,t):t;return{min:o,max:Math.max(o,n)}}function $p(e){return e.collapsed||e.suspended}function pm(e,t,o=0){let n=Math.max(0,t-(Number.isFinite(o)?o:0)),r=Math.max(0,e.findIndex(p=>p.fill)),s=e.map(p=>{if(p.fill&&!$p(p))return 0;if($p(p))return Yr(p.collapsedSize,n);let{min:d,max:m}=Hy(p,n);return zp(Yr(p.size,n),d,m)}),i=Yr(e[r].min,n),a=s.reduce((p,d)=>p+d,0);if(n-a<i){let p=i-(n-a),d=e.flatMap((b,x)=>{if(b.fill||$p(b))return[];let h=s[x]-Yr(b.min,n);return h>0?[{index:x,room:h}]:[]}),m=d.reduce((b,x)=>b+x.room,0),g=Math.min(p,m),R=g;d.forEach((b,x)=>{let h=x===d.length-1?R:b.room/m*g;s[b.index]-=h,R-=h}),a=s.reduce((b,x)=>b+x,0)}let l=s.map((p,d)=>d===r?0:Math.round(p)),c=l.reduce((p,d)=>p+d,0),u=e[r].max?Yr(e[r].max,n):n;return l[r]=zp(Math.round(n)-c,0,Math.round(u)),l}function zW(e,t){let o=e.map(um),n=()=>o.reduce((i,a)=>$p(a)?i+Yr(a.collapsedSize,t):i+Yr(a.min,t),0)-t,r=!1;if(n()>.5)for(let s=0;s<2&&n()>.5;s+=1)for(let i=o.length-1;i>=0&&n()>.5;i-=1){let a=o[i];s===0&&a.fill||!a.collapsible||a.collapsed||a.suspended||(o[i]={...a,collapsed:!0,autoCollapsed:!0,restore:{...a.size}},r=!0)}else for(let s=0;s<o.length;s+=1){let i=o[s];if(!i.autoCollapsed||!i.collapsed||i.suspended)continue;let a=Yr(i.min,t)-Yr(i.collapsedSize,t);n()+a>.5||(o[s]={...i,collapsed:!1,autoCollapsed:!1,size:{...i.restore??i.defaultSize},restore:null},r=!0)}return r?o:e}function Hc(e,t){let o=t,n=t+1;return e[o]?.fill?n:o}function By(e,t,o,n){if(!Number.isFinite(t)||t<=0)return e;let r=Hc(e,o),s=e.findIndex(R=>R.fill);if(r<0||s<0||e[r].fill)return e;let i=pm(e,t),a=i[r],l=r===o?1:-1,{min:c,max:u}=Hy(e[r],t),p=Yr(e[s].min,t),d=e[s].max?Yr(e[s].max,t):t,m=l*n;m=zp(m,Math.max(c-a,i[s]-d),Math.min(u-a,i[s]-p));let g=e.map(um);return g[r]={...g[r],collapsed:!1,autoCollapsed:!1,size:vpe(a+m,g[r].size.unit,t)},g}function wpe(e,t){let o=Hc(e,t),n=e[o];if(!n||n.fill||!n.collapsible)return null;let r=e.map(um);return n.collapsed?r[o]={...r[o],collapsed:!1,autoCollapsed:!1,size:{...n.restore??n.defaultSize},restore:null}:r[o]={...r[o],collapsed:!0,autoCollapsed:!1,restore:{...n.size}},r}function $W(e,t){let o=Hc(e,t),n=e[o];if(!n||n.fill)return e;let r=e.map(um);return r[o]={...r[o],collapsed:!1,autoCollapsed:!1,size:{...n.defaultSize},restore:null},r}function KW(e,t,o,n,r){if(n==="Enter")return wpe(e,o);let s=n;r.rtl&&r.orientation==="horizontal"&&(n==="ArrowLeft"?s="ArrowRight":n==="ArrowRight"&&(s="ArrowLeft"));let a=r.orientation==="horizontal"?s==="ArrowLeft"||s==="ArrowRight":s==="ArrowUp"||s==="ArrowDown",l=s==="Home"||s==="End";if(!a&&!l)return null;let c=Hc(e,o),u=e[c];if(!u||u.fill)return null;let p=c===o?1:-1,d=pm(e,t),{min:m,max:g}=Hy(u,t);if(l)return By(e,t,o,((s==="Home"?m:g)-d[c])/p);let R=(r.shift?r.largeStep:r.step)/100*t;return By(e,t,o,s==="ArrowRight"||s==="ArrowDown"?R:-R)}function WW(e,t){return t==null||t.unit===e.unit}function YW(e,t,o){return!(!WW(e,t)||!WW(e,o)||e.value<t.value||o&&e.value>o.value)}function DD(e,t,o="reject"){if(!e)return null;let n;try{n=JSON.parse(e)}catch{return null}if(!n||typeof n!="object"||Array.isArray(n))return null;let r=n,s=t.map(um);for(let i of s){if(i.fill)continue;let a=r[i.id];if(a==null){if(o==="ignore")continue;return null}if(typeof a!="object"||Array.isArray(a))return null;let l=a.size,c=a.collapsed;if(typeof l!="string"||typeof c!="boolean")return null;let u=cm(l);if(!u||!YW(u,i.min,i.max))return null;i.size=u,i.collapsed=c,i.autoCollapsed=!1,i.restore=c?{...u}:null}return s}function qW(e){let t={};for(let o of e)t[o.id]={size:jp(o.size),collapsed:o.autoCollapsed?!1:o.collapsed};return t}function XW(e){let t=$p(e)?e.collapsedSize:e.size;if(e.fill&&!$p(e))return"auto";let o=jp(t),n=e.max;return t.unit===e.min.unit&&(n==null||n.unit===t.unit)?n?`clamp(${jp(e.min)}, ${o}, ${jp(n)})`:e.min.value>0?`max(${jp(e.min)}, ${o})`:o:o}function ND(e,t,o){let n=o<=0?1:o,{min:r,max:s}=Hy(e,n);return{now:zp(Math.round(t/n*100),0,100),min:zp(Math.round(r/n*100),0,100),max:zp(Math.round(s/n*100),0,100)}}function AD(e,t){return e.collapsed?"Collapsed":e.size.unit==="px"?`${Math.round(t)} pixels`:`${jp(e.size).replace("%","")} percent`}var JW=Ot.createContext(null);function ZW(){let e=Ot.useContext(JW);if(!e)throw new Error("Splitter parts must be inside Splitter.Root.");return e}function Ppe(e){let t=[],o=n=>{Ot.Children.forEach(n,r=>{if(!(r==null||typeof r=="boolean")){if(typeof r=="string"||typeof r=="number")return String(r).trim()==="",void 0;if(Ot.isValidElement(r)){if(r.type===Ot.Fragment){o(r.props.children);return}r.type!==Gy&&r.type!==Uy||t.push(r)}}})};return o(e),t}function Epe(e){let t=[];for(let o of e){if(o.type!==Gy)continue;let n=o.props;t.push({id:n.id,defaultSize:n.defaultSize,minSize:n.minSize,maxSize:n.maxSize,collapsible:n.collapsible,collapsedSize:n.collapsedSize,defaultCollapsed:n.defaultCollapsed,suspended:n.suspended})}return t}function Tpe(e){return e.map(t=>[t.id,t.defaultSize??"",t.minSize??"",t.maxSize??"",t.collapsible?"1":"0",t.collapsedSize??"",t.defaultCollapsed?"1":"0",t.suspended?"1":"0"].join("\0")).join(`