@gv-tech/ui-web 2.29.1 → 2.29.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accordion.cjs +1 -1
- package/dist/accordion.mjs +53 -2
- package/dist/alert-dialog.cjs +1 -1
- package/dist/alert-dialog.mjs +99 -2
- package/dist/alert.cjs +1 -1
- package/dist/alert.mjs +2 -3
- package/dist/aspect-ratio.cjs +1 -1
- package/dist/aspect-ratio.mjs +10 -2
- package/dist/attachment.cjs +1 -1
- package/dist/attachment.mjs +26 -26
- package/dist/avatar.cjs +1 -1
- package/dist/avatar.mjs +49 -2
- package/dist/badge.cjs +1 -1
- package/dist/badge.mjs +5 -5
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.mjs +13 -13
- package/dist/bubble.cjs +1 -1
- package/dist/bubble.mjs +5 -5
- package/dist/button-group.cjs +1 -1
- package/dist/button-group.mjs +13 -13
- package/dist/button.cjs +1 -1
- package/dist/button.mjs +5 -5
- package/dist/calendar.cjs +1 -1
- package/dist/calendar.mjs +97 -2
- package/dist/card.cjs +1 -1
- package/dist/card.mjs +2 -3
- package/dist/carousel.cjs +1 -1
- package/dist/carousel.mjs +107 -2
- package/dist/chart.cjs +2 -2
- package/dist/chart.mjs +14 -15
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.mjs +19 -2
- package/dist/collapsible.cjs +1 -1
- package/dist/collapsible.mjs +13 -14
- package/dist/combobox.cjs +1 -1
- package/dist/combobox.mjs +161 -2
- package/dist/command.cjs +1 -1
- package/dist/command.mjs +89 -2
- package/dist/context-menu.cjs +1 -1
- package/dist/context-menu.mjs +123 -2
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.mjs +41 -42
- package/dist/direction.cjs +1 -1
- package/dist/direction.mjs +8 -9
- package/dist/drawer.cjs +1 -1
- package/dist/drawer.mjs +2 -3
- package/dist/dropdown-menu.cjs +1 -1
- package/dist/dropdown-menu.mjs +126 -2
- package/dist/empty.cjs +1 -1
- package/dist/empty.mjs +2 -3
- package/dist/field.cjs +1 -1
- package/dist/field.mjs +37 -38
- package/dist/form.cjs +1 -1
- package/dist/form.mjs +34 -35
- package/dist/hooks/use-theme.d.ts +52 -52
- package/dist/hover-card.cjs +1 -1
- package/dist/hover-card.mjs +30 -2
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +66 -66
- package/dist/input-group.cjs +1 -1
- package/dist/input-group.mjs +27 -28
- package/dist/input-otp.cjs +1 -1
- package/dist/input-otp.mjs +45 -2
- package/dist/input.cjs +1 -1
- package/dist/input.mjs +2 -3
- package/dist/item.cjs +1 -1
- package/dist/item.mjs +29 -29
- package/dist/kbd.cjs +1 -1
- package/dist/kbd.mjs +2 -3
- package/dist/label.cjs +1 -1
- package/dist/label.mjs +13 -2
- package/dist/marker.cjs +1 -1
- package/dist/marker.mjs +5 -5
- package/dist/menubar.cjs +1 -1
- package/dist/menubar.mjs +133 -2
- package/dist/message-scroller.cjs +1 -1
- package/dist/message-scroller.mjs +59 -2
- package/dist/message.cjs +1 -1
- package/dist/message.mjs +2 -3
- package/dist/native-select.cjs +1 -1
- package/dist/native-select.mjs +2 -3
- package/dist/navigation-menu.cjs +1 -1
- package/dist/navigation-menu.mjs +79 -2
- package/dist/pagination.cjs +1 -1
- package/dist/pagination.mjs +15 -16
- package/dist/popover.cjs +1 -1
- package/dist/popover.mjs +54 -2
- package/dist/progress.cjs +1 -1
- package/dist/progress.mjs +19 -2
- package/dist/questionnaire.cjs +1 -1
- package/dist/questionnaire.mjs +168 -2
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.mjs +25 -2
- package/dist/resizable.cjs +1 -1
- package/dist/resizable.mjs +26 -2
- package/dist/rolldown-runtime-BocRIvOZ.js +1 -0
- package/dist/scroll-area.cjs +1 -1
- package/dist/scroll-area.mjs +35 -2
- package/dist/scroll-to-top.cjs +1 -1
- package/dist/scroll-to-top.mjs +6 -11
- package/dist/search.cjs +1 -1
- package/dist/search.mjs +12 -13
- package/dist/select.cjs +1 -1
- package/dist/select.mjs +98 -2
- package/dist/separator.cjs +1 -1
- package/dist/separator.mjs +15 -2
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.mjs +39 -40
- package/dist/{sidebar-DM9ee9wf.mjs → sidebar-DrU3nKaL.mjs} +137 -135
- package/dist/sidebar-uOtFHnBs.js +1 -0
- package/dist/sidebar.cjs +1 -1
- package/dist/sidebar.mjs +3 -2
- package/dist/skeleton.cjs +1 -1
- package/dist/skeleton.mjs +2 -3
- package/dist/slider.cjs +1 -1
- package/dist/slider.mjs +34 -2
- package/dist/sonner.mjs +1 -2
- package/dist/spinner.cjs +1 -1
- package/dist/spinner.mjs +2 -3
- package/dist/support-fab.cjs +1 -1
- package/dist/support-fab.mjs +21 -22
- package/dist/switch.cjs +1 -1
- package/dist/switch.mjs +18 -2
- package/dist/table-of-contents.cjs +1 -1
- package/dist/table-of-contents.mjs +5 -6
- package/dist/table.cjs +1 -1
- package/dist/table.mjs +2 -3
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.mjs +44 -2
- package/dist/text.cjs +1 -1
- package/dist/text.mjs +14 -12
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.mjs +2 -3
- package/dist/theme-provider.mjs +1 -2
- package/dist/{theme-toggle-3RStptYf.mjs → theme-toggle-9KtAIRxy.mjs} +18 -20
- package/dist/theme-toggle-DkNI3bfh.js +1 -0
- package/dist/theme-toggle.cjs +1 -1
- package/dist/theme-toggle.mjs +2 -2
- package/dist/toast.cjs +1 -1
- package/dist/toast.mjs +52 -2
- package/dist/{toaster-gT2b7mfE.mjs → toaster-8RrHPtlc.mjs} +10 -12
- package/dist/toaster-AFud4l6l.js +1 -0
- package/dist/toaster.cjs +1 -1
- package/dist/toaster.mjs +2 -2
- package/dist/toggle-group.cjs +1 -1
- package/dist/toggle-group.mjs +49 -2
- package/dist/toggle.cjs +1 -1
- package/dist/toggle.mjs +35 -2
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.mjs +34 -2
- package/dist/{utils-A_oVsYw5.mjs → utils-DQKc9joa.mjs} +1 -2
- package/package.json +3 -3
- package/dist/accordion-D5QXSsCK.mjs +0 -248
- package/dist/accordion-DjyDOX-h.js +0 -1
- package/dist/alert-dialog-B-a0Wa1M.mjs +0 -182
- package/dist/alert-dialog-DYQAhGBC.js +0 -1
- package/dist/aspect-ratio-C-KOOyGP.js +0 -1
- package/dist/aspect-ratio-s7Ji1MSr.mjs +0 -40
- package/dist/avatar-4K3XjhP8.js +0 -1
- package/dist/avatar-d8Di248f.mjs +0 -138
- package/dist/calendar-DFj14O6r.js +0 -1
- package/dist/calendar-UW8h9dfh.mjs +0 -3182
- package/dist/carousel-CNGpg5df.js +0 -1
- package/dist/carousel-DG9xGJns.mjs +0 -1171
- package/dist/checkbox-BCgbTAdU.js +0 -1
- package/dist/checkbox-Dq8VHKDH.mjs +0 -186
- package/dist/chunk-BmowowmI.mjs +0 -14
- package/dist/chunk-HBS6WEDP-CQNaACTf.js +0 -1
- package/dist/chunk-HBS6WEDP-aK8IuEX9.mjs +0 -63
- package/dist/chunk-mLOUI7ql.js +0 -1
- package/dist/combobox-CpPIGtPJ.js +0 -4
- package/dist/combobox-b4OmCNw1.mjs +0 -5887
- package/dist/command-5hobOyGG.mjs +0 -545
- package/dist/command-Dbqnm9kI.js +0 -1
- package/dist/context-menu-DyTUismw.js +0 -1
- package/dist/context-menu-DzzU-_v8.mjs +0 -317
- package/dist/dist-1zUKVGvf.js +0 -1
- package/dist/dist-B057I8ju.mjs +0 -30
- package/dist/dist-BB78QQyQ.mjs +0 -41
- package/dist/dist-BBvidwzC.js +0 -1
- package/dist/dist-BEbV0Hal.mjs +0 -45
- package/dist/dist-BPL7gUpg.mjs +0 -18
- package/dist/dist-BTUvBzOm.js +0 -1
- package/dist/dist-BU-TFzJf.js +0 -1
- package/dist/dist-Bb5W_J2F.mjs +0 -39
- package/dist/dist-BbI6NHqR.mjs +0 -23
- package/dist/dist-BexAB6yo.mjs +0 -192
- package/dist/dist-BgXIqHHq.js +0 -1
- package/dist/dist-Bvfb4y_L.mjs +0 -100
- package/dist/dist-C8Pm6LRc.js +0 -1
- package/dist/dist-CGgemr2V.js +0 -1
- package/dist/dist-CPAF050o.mjs +0 -90
- package/dist/dist-CS572Be42.mjs +0 -11
- package/dist/dist-CUvxOuXM.mjs +0 -551
- package/dist/dist-C_iFkwIX.js +0 -1
- package/dist/dist-ClYM7l1t.js +0 -1
- package/dist/dist-CpKLY_uZ.mjs +0 -96
- package/dist/dist-D1qkELLT.js +0 -1
- package/dist/dist-D7-Fky36.js +0 -1
- package/dist/dist-DEpkkABT.js +0 -1
- package/dist/dist-DI1vapnL.mjs +0 -20
- package/dist/dist-DJqkhIXb2.js +0 -1
- package/dist/dist-DKXojpVG.js +0 -1
- package/dist/dist-DYUvPCPC.js +0 -1
- package/dist/dist-DZiOPWLp.js +0 -1
- package/dist/dist-DatgTWLz.mjs +0 -202
- package/dist/dist-Dm3IQk5b.mjs +0 -685
- package/dist/dist-DoivLw3t.js +0 -1
- package/dist/dist-Dq-h6VAy.mjs +0 -118
- package/dist/dist-Dt6m-kwU.mjs +0 -221
- package/dist/dist-E8ieJTBC.mjs +0 -190
- package/dist/dist-GazS1kfR.mjs +0 -5
- package/dist/dist-N97cIp0_.js +0 -1
- package/dist/dist-OqDzLHTa.mjs +0 -460
- package/dist/dist-Qm9hFvM1.js +0 -1
- package/dist/dist-UkWa-Arh.mjs +0 -16
- package/dist/dist-UnTrOmPV.js +0 -1
- package/dist/dist-YAADIsyo.js +0 -1
- package/dist/dist-Zs2sjYhL.js +0 -1
- package/dist/dist-hFLuJoMi.js +0 -1
- package/dist/dist-s7ibhASj.mjs +0 -181
- package/dist/dist-vu20fMUK.mjs +0 -93
- package/dist/dropdown-menu-BqAhn64y.mjs +0 -313
- package/dist/dropdown-menu-BtKOr--r.js +0 -1
- package/dist/es2015-DbAsWDbs.js +0 -41
- package/dist/es2015-DbsmTzuc.mjs +0 -571
- package/dist/floating-ui.react-dom-BwFRxNGc.js +0 -1
- package/dist/floating-ui.react-dom-CyupHsR6.mjs +0 -1062
- package/dist/hover-card-DMsxpR9G.mjs +0 -178
- package/dist/hover-card-DWXusgiI.js +0 -1
- package/dist/input-otp-D49Y9VcH.mjs +0 -409
- package/dist/input-otp-u3obpt-Q.js +0 -20
- package/dist/label-Dacwh21G.js +0 -1
- package/dist/label-DsSICLPc.mjs +0 -28
- package/dist/menubar-BYNeRuzx.js +0 -1
- package/dist/menubar-DZqEj6S1.mjs +0 -407
- package/dist/message-scroller-CS4t7Ypn.mjs +0 -824
- package/dist/message-scroller-DqLu0YI6.js +0 -1
- package/dist/navigation-menu-B36G3O83.js +0 -1
- package/dist/navigation-menu-RO6thDOF.mjs +0 -636
- package/dist/popover-DSBkc70V.mjs +0 -243
- package/dist/popover-DUHbvKB8.js +0 -1
- package/dist/progress-B9z08UXf.js +0 -6
- package/dist/progress-CQ4nQ85t.mjs +0 -92
- package/dist/questionnaire-CVED7G7R.mjs +0 -1159
- package/dist/questionnaire-PWClWvST.js +0 -1
- package/dist/radio-group-Bd3WbH5I.js +0 -1
- package/dist/radio-group-TRiAhMZB.mjs +0 -266
- package/dist/resizable-Cq60hEWB.js +0 -1
- package/dist/resizable-Qc8cVUKd.mjs +0 -2857
- package/dist/scroll-area-D6MiNHnJ.mjs +0 -564
- package/dist/scroll-area-DFUdJeSZ.js +0 -1
- package/dist/select-BFJUmjvX.mjs +0 -830
- package/dist/select-iQFoKU1s.js +0 -1
- package/dist/separator-2kr96SyF.mjs +0 -40
- package/dist/separator-Bo49G2aj.js +0 -1
- package/dist/sidebar-C6O8hLkz.js +0 -1
- package/dist/slider-CagVxozY.js +0 -1
- package/dist/slider-CdTCoQu1.mjs +0 -485
- package/dist/switch-CoeAC1Wk.js +0 -1
- package/dist/switch-zUBdj7jK.mjs +0 -174
- package/dist/tabs-DaE9pEbo.mjs +0 -160
- package/dist/tabs-TMhXe20x.js +0 -1
- package/dist/theme-toggle-DKh8WFLT.js +0 -1
- package/dist/toast-B0S3F09s.js +0 -1
- package/dist/toast-D0Yb-K84.mjs +0 -445
- package/dist/toaster-CX9im8R_.js +0 -1
- package/dist/toggle-B0hXPsi7.js +0 -1
- package/dist/toggle-BAeKd2N0.mjs +0 -59
- package/dist/toggle-group-CEKhUozD.mjs +0 -167
- package/dist/toggle-group-htyug3G7.js +0 -1
- package/dist/tooltip-BZazhXDZ.js +0 -1
- package/dist/tooltip-R_nK_Qh5.mjs +0 -390
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require("./chunk-mLOUI7ql.js"),t=require("./dist-C_iFkwIX.js"),n=require("./dist-BBvidwzC.js"),r=require("./dist-hFLuJoMi.js"),i=require("./dist-DYUvPCPC.js"),a=require("./dist-DZiOPWLp.js"),o=require("./dist-YAADIsyo.js"),s=require("./dist-D7-Fky36.js"),c=require("./dist-DoivLw3t.js");let l=require("lucide-react"),u=require("react"),d=e.r(u,1);u=e.r(u);let f=require("react/jsx-runtime");var p=Object.defineProperty,m=(e,t)=>p(e,`name`,{value:t,configurable:!0}),h=`Checkbox`,[g,_]=i.t(h),[v,y]=g(h);function b(e){let{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:a,form:s,name:c,onCheckedChange:l,required:u,value:p=`on`,internal_do_not_use_render:m}=e,[g,_]=o.t({prop:n,defaultProp:i??!1,onChange:l,caller:h}),[y,b]=d.useState(null),[x,S]=d.useState(null),[C,w]=d.useState(null),T=y?!!s||!!y.closest(`form`):!0,E={checked:g,disabled:a,setChecked:_,control:y,setControl:b,name:c,form:s,value:p,userClick:C,onUserClick:w,required:u,defaultChecked:k(i)?!1:i,isFormControl:T,bubbleInput:x,setBubbleInput:S};return(0,f.jsx)(v,{scope:t,...E,children:O(m)?m(E):r})}m(b,`CheckboxProvider`);var x=`CheckboxTrigger`,S=d.forwardRef(m(function({__scopeCheckbox:e,onKeyDown:t,onClick:i,...o},s){let{control:c,value:l,disabled:u,checked:p,required:h,setControl:g,setChecked:_,onUserClick:v,isFormControl:b,bubbleInput:S}=y(x,e),C=n.a(s,g),w=d.useRef(p);return d.useEffect(()=>{let e=c?.form;if(e){let t=m(()=>_(w.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[c,_]),(0,f.jsx)(r.t.button,{type:`button`,role:`checkbox`,"aria-checked":k(p)?`mixed`:p,"aria-required":h,"data-state":A(p),"data-disabled":u?``:void 0,disabled:u,value:l,...o,ref:C,onKeyDown:a.t(t,e=>{e.key===`Enter`&&e.preventDefault()}),onClick:a.t(i,e=>{let t=e.isPropagationStopped();v({requestedChecked:k(p)?!0:!p,hasConsumerStoppedPropagation:t}),_(e=>k(e)?!0:!e),S&&b&&(t||e.stopPropagation())})})},`CheckboxTrigger`)),C=d.forwardRef(m(function(e,t){let{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,f.jsx)(b,{__scopeCheckbox:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(S,{...d,ref:t,__scopeCheckbox:n}),e&&(0,f.jsx)(D,{__scopeCheckbox:n})]})})},`Checkbox`)),w=`CheckboxIndicator`,T=d.forwardRef(m(function(e,t){let{__scopeCheckbox:n,forceMount:i,...a}=e,o=y(w,n);return(0,f.jsx)(s.t,{present:i||k(o.checked)||o.checked===!0,children:(0,f.jsx)(r.t.span,{"data-state":A(o.checked),"data-disabled":o.disabled?``:void 0,...a,ref:t,style:{pointerEvents:`none`,...e.style}})})},`CheckboxIndicator`)),E=`CheckboxBubbleInput`,D=d.forwardRef(m(function({__scopeCheckbox:e,onClick:t,...i},o){let{control:s,userClick:l,checked:u,defaultChecked:p,required:m,disabled:h,name:g,value:_,form:v,bubbleInput:b,setBubbleInput:x}=y(E,e),S=n.a(o,x),C=c.t(s),w=d.useRef(!1),T=d.useRef(u),D=d.useRef(l),O=d.useRef(null);d.useEffect(()=>{let e=b;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set;if(!n)return;let r=T.current!==u;T.current=u;let i=l!==null&&l!==D.current;if(D.current=l,i)O.current=r?null:l,r&&(e.indeterminate=k(u),n.call(e,k(u)?!1:u)),e.dispatchEvent(new Event(`click`,{bubbles:!l.hasConsumerStoppedPropagation}));else if(r){let t=O.current;O.current=null;let r=t?.requestedChecked===u;w.current=!0,e.indeterminate=k(u),n.call(e,k(u)?!1:u),e.dispatchEvent(new Event(`click`,{bubbles:!(r&&t.hasConsumerStoppedPropagation)})),w.current=!1}},[b,u,l]);let A=d.useRef(k(u)?!1:u);return(0,f.jsx)(r.t.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:p??A.current,required:m,disabled:h,name:g,value:_,form:v,...i,tabIndex:-1,ref:S,onClick:a.t(t,e=>{w.current&&e.stopPropagation()}),style:{...i.style,...C,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})},`CheckboxBubbleInput`));function O(e){return typeof e==`function`}m(O,`isFunction`);function k(e){return e===`indeterminate`}m(k,`isIndeterminate`);function A(e){return k(e)?`indeterminate`:e?`checked`:`unchecked`}m(A,`getState`);function j({className:e,...n}){return(0,f.jsx)(C,{"data-slot":`checkbox`,className:t.t(`peer border-input group-has-[:focus-visible]/field-label:not-data-checked:border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border transition-colors outline-none group-has-disabled/field:opacity-50 group-has-[:focus-visible]/field-label:ring-0 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3`,e),...n,children:(0,f.jsx)(T,{"data-slot":`checkbox-indicator`,className:`grid place-content-center text-current transition-none [&>svg]:size-3.5`,children:(0,f.jsx)(l.CheckIcon,{})})})}Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return j}});
|
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./dist-Dm3IQk5b.mjs";
|
|
2
|
-
import { a as t } from "./dist-Dq-h6VAy.mjs";
|
|
3
|
-
import { t as n } from "./dist-BEbV0Hal.mjs";
|
|
4
|
-
import { t as r } from "./dist-CPAF050o.mjs";
|
|
5
|
-
import { t as i } from "./dist-BB78QQyQ.mjs";
|
|
6
|
-
import { t as a } from "./dist-Bvfb4y_L.mjs";
|
|
7
|
-
import { t as o } from "./dist-CpKLY_uZ.mjs";
|
|
8
|
-
import { t as s } from "./dist-Bb5W_J2F.mjs";
|
|
9
|
-
import { CheckIcon as c } from "lucide-react";
|
|
10
|
-
import * as l from "react";
|
|
11
|
-
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
12
|
-
//#region ../../node_modules/.bun/@radix-ui+react-checkbox@1.4.1+b146eb580f4286be/node_modules/@radix-ui/react-checkbox/dist/index.mjs
|
|
13
|
-
var p = Object.defineProperty, m = (e, t) => p(e, "name", {
|
|
14
|
-
value: t,
|
|
15
|
-
configurable: !0
|
|
16
|
-
}), h = "Checkbox", [g, _] = r(h), [v, y] = g(h);
|
|
17
|
-
function b(e) {
|
|
18
|
-
let { __scopeCheckbox: t, checked: n, children: r, defaultChecked: i, disabled: o, form: s, name: c, onCheckedChange: u, required: f, value: p = "on", internal_do_not_use_render: m } = e, [g, _] = a({
|
|
19
|
-
prop: n,
|
|
20
|
-
defaultProp: i ?? !1,
|
|
21
|
-
onChange: u,
|
|
22
|
-
caller: h
|
|
23
|
-
}), [y, b] = l.useState(null), [x, S] = l.useState(null), [C, w] = l.useState(null), T = y ? !!s || !!y.closest("form") : !0, E = {
|
|
24
|
-
checked: g,
|
|
25
|
-
disabled: o,
|
|
26
|
-
setChecked: _,
|
|
27
|
-
control: y,
|
|
28
|
-
setControl: b,
|
|
29
|
-
name: c,
|
|
30
|
-
form: s,
|
|
31
|
-
value: p,
|
|
32
|
-
userClick: C,
|
|
33
|
-
onUserClick: w,
|
|
34
|
-
required: f,
|
|
35
|
-
defaultChecked: k(i) ? !1 : i,
|
|
36
|
-
isFormControl: T,
|
|
37
|
-
bubbleInput: x,
|
|
38
|
-
setBubbleInput: S
|
|
39
|
-
};
|
|
40
|
-
return /* @__PURE__ */ d(v, {
|
|
41
|
-
scope: t,
|
|
42
|
-
...E,
|
|
43
|
-
children: O(m) ? m(E) : r
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
m(b, "CheckboxProvider");
|
|
47
|
-
var x = "CheckboxTrigger", S = /* @__PURE__ */ l.forwardRef(/* @__PURE__ */ m(function({ __scopeCheckbox: e, onKeyDown: r, onClick: a, ...o }, s) {
|
|
48
|
-
let { control: c, value: u, disabled: f, checked: p, required: h, setControl: g, setChecked: _, onUserClick: v, isFormControl: b, bubbleInput: S } = y(x, e), C = t(s, g), w = l.useRef(p);
|
|
49
|
-
return l.useEffect(() => {
|
|
50
|
-
let e = c?.form;
|
|
51
|
-
if (e) {
|
|
52
|
-
let t = /* @__PURE__ */ m(() => _(w.current), "reset");
|
|
53
|
-
return e.addEventListener("reset", t), () => e.removeEventListener("reset", t);
|
|
54
|
-
}
|
|
55
|
-
}, [c, _]), /* @__PURE__ */ d(n.button, {
|
|
56
|
-
type: "button",
|
|
57
|
-
role: "checkbox",
|
|
58
|
-
"aria-checked": k(p) ? "mixed" : p,
|
|
59
|
-
"aria-required": h,
|
|
60
|
-
"data-state": A(p),
|
|
61
|
-
"data-disabled": f ? "" : void 0,
|
|
62
|
-
disabled: f,
|
|
63
|
-
value: u,
|
|
64
|
-
...o,
|
|
65
|
-
ref: C,
|
|
66
|
-
onKeyDown: i(r, (e) => {
|
|
67
|
-
e.key === "Enter" && e.preventDefault();
|
|
68
|
-
}),
|
|
69
|
-
onClick: i(a, (e) => {
|
|
70
|
-
let t = e.isPropagationStopped();
|
|
71
|
-
v({
|
|
72
|
-
requestedChecked: k(p) ? !0 : !p,
|
|
73
|
-
hasConsumerStoppedPropagation: t
|
|
74
|
-
}), _((e) => k(e) ? !0 : !e), S && b && (t || e.stopPropagation());
|
|
75
|
-
})
|
|
76
|
-
});
|
|
77
|
-
}, "CheckboxTrigger")), C = /* @__PURE__ */ l.forwardRef(/* @__PURE__ */ m(function(e, t) {
|
|
78
|
-
let { __scopeCheckbox: n, name: r, checked: i, defaultChecked: a, required: o, disabled: s, value: c, onCheckedChange: l, form: p, ...m } = e;
|
|
79
|
-
return /* @__PURE__ */ d(b, {
|
|
80
|
-
__scopeCheckbox: n,
|
|
81
|
-
checked: i,
|
|
82
|
-
defaultChecked: a,
|
|
83
|
-
disabled: s,
|
|
84
|
-
required: o,
|
|
85
|
-
onCheckedChange: l,
|
|
86
|
-
name: r,
|
|
87
|
-
form: p,
|
|
88
|
-
value: c,
|
|
89
|
-
internal_do_not_use_render: ({ isFormControl: e }) => /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(S, {
|
|
90
|
-
...m,
|
|
91
|
-
ref: t,
|
|
92
|
-
__scopeCheckbox: n
|
|
93
|
-
}), e && /* @__PURE__ */ d(D, { __scopeCheckbox: n })] })
|
|
94
|
-
});
|
|
95
|
-
}, "Checkbox")), w = "CheckboxIndicator", T = /* @__PURE__ */ l.forwardRef(/* @__PURE__ */ m(function(e, t) {
|
|
96
|
-
let { __scopeCheckbox: r, forceMount: i, ...a } = e, s = y(w, r);
|
|
97
|
-
return /* @__PURE__ */ d(o, {
|
|
98
|
-
present: i || k(s.checked) || s.checked === !0,
|
|
99
|
-
children: /* @__PURE__ */ d(n.span, {
|
|
100
|
-
"data-state": A(s.checked),
|
|
101
|
-
"data-disabled": s.disabled ? "" : void 0,
|
|
102
|
-
...a,
|
|
103
|
-
ref: t,
|
|
104
|
-
style: {
|
|
105
|
-
pointerEvents: "none",
|
|
106
|
-
...e.style
|
|
107
|
-
}
|
|
108
|
-
})
|
|
109
|
-
});
|
|
110
|
-
}, "CheckboxIndicator")), E = "CheckboxBubbleInput", D = /* @__PURE__ */ l.forwardRef(/* @__PURE__ */ m(function({ __scopeCheckbox: e, onClick: r, ...a }, o) {
|
|
111
|
-
let { control: c, userClick: u, checked: f, defaultChecked: p, required: m, disabled: h, name: g, value: _, form: v, bubbleInput: b, setBubbleInput: x } = y(E, e), S = t(o, x), C = s(c), w = l.useRef(!1), T = l.useRef(f), D = l.useRef(u), O = l.useRef(null);
|
|
112
|
-
l.useEffect(() => {
|
|
113
|
-
let e = b;
|
|
114
|
-
if (!e) return;
|
|
115
|
-
let t = window.HTMLInputElement.prototype, n = Object.getOwnPropertyDescriptor(t, "checked").set;
|
|
116
|
-
if (!n) return;
|
|
117
|
-
let r = T.current !== f;
|
|
118
|
-
T.current = f;
|
|
119
|
-
let i = u !== null && u !== D.current;
|
|
120
|
-
if (D.current = u, i) O.current = r ? null : u, r && (e.indeterminate = k(f), n.call(e, k(f) ? !1 : f)), e.dispatchEvent(new Event("click", { bubbles: !u.hasConsumerStoppedPropagation }));
|
|
121
|
-
else if (r) {
|
|
122
|
-
let t = O.current;
|
|
123
|
-
O.current = null;
|
|
124
|
-
let r = t?.requestedChecked === f;
|
|
125
|
-
w.current = !0, e.indeterminate = k(f), n.call(e, k(f) ? !1 : f), e.dispatchEvent(new Event("click", { bubbles: !(r && t.hasConsumerStoppedPropagation) })), w.current = !1;
|
|
126
|
-
}
|
|
127
|
-
}, [
|
|
128
|
-
b,
|
|
129
|
-
f,
|
|
130
|
-
u
|
|
131
|
-
]);
|
|
132
|
-
let A = l.useRef(k(f) ? !1 : f);
|
|
133
|
-
return /* @__PURE__ */ d(n.input, {
|
|
134
|
-
type: "checkbox",
|
|
135
|
-
"aria-hidden": !0,
|
|
136
|
-
defaultChecked: p ?? A.current,
|
|
137
|
-
required: m,
|
|
138
|
-
disabled: h,
|
|
139
|
-
name: g,
|
|
140
|
-
value: _,
|
|
141
|
-
form: v,
|
|
142
|
-
...a,
|
|
143
|
-
tabIndex: -1,
|
|
144
|
-
ref: S,
|
|
145
|
-
onClick: i(r, (e) => {
|
|
146
|
-
w.current && e.stopPropagation();
|
|
147
|
-
}),
|
|
148
|
-
style: {
|
|
149
|
-
...a.style,
|
|
150
|
-
...C,
|
|
151
|
-
position: "absolute",
|
|
152
|
-
pointerEvents: "none",
|
|
153
|
-
opacity: 0,
|
|
154
|
-
margin: 0,
|
|
155
|
-
transform: "translateX(-100%)"
|
|
156
|
-
}
|
|
157
|
-
});
|
|
158
|
-
}, "CheckboxBubbleInput"));
|
|
159
|
-
function O(e) {
|
|
160
|
-
return typeof e == "function";
|
|
161
|
-
}
|
|
162
|
-
m(O, "isFunction");
|
|
163
|
-
function k(e) {
|
|
164
|
-
return e === "indeterminate";
|
|
165
|
-
}
|
|
166
|
-
m(k, "isIndeterminate");
|
|
167
|
-
function A(e) {
|
|
168
|
-
return k(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
169
|
-
}
|
|
170
|
-
m(A, "getState");
|
|
171
|
-
//#endregion
|
|
172
|
-
//#region src/checkbox.tsx
|
|
173
|
-
function j({ className: t, ...n }) {
|
|
174
|
-
return /* @__PURE__ */ d(C, {
|
|
175
|
-
"data-slot": "checkbox",
|
|
176
|
-
className: e("peer border-input group-has-[:focus-visible]/field-label:not-data-checked:border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border transition-colors outline-none group-has-disabled/field:opacity-50 group-has-[:focus-visible]/field-label:ring-0 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3", t),
|
|
177
|
-
...n,
|
|
178
|
-
children: /* @__PURE__ */ d(T, {
|
|
179
|
-
"data-slot": "checkbox-indicator",
|
|
180
|
-
className: "grid place-content-center text-current transition-none [&>svg]:size-3.5",
|
|
181
|
-
children: /* @__PURE__ */ d(c, {})
|
|
182
|
-
})
|
|
183
|
-
});
|
|
184
|
-
}
|
|
185
|
-
//#endregion
|
|
186
|
-
export { j as t };
|
package/dist/chunk-BmowowmI.mjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
//#region \0rolldown/runtime.js
|
|
2
|
-
var e = Object.defineProperty, t = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), n = (t, n) => {
|
|
3
|
-
let r = {};
|
|
4
|
-
for (var i in t) e(r, i, {
|
|
5
|
-
get: t[i],
|
|
6
|
-
enumerable: !0
|
|
7
|
-
});
|
|
8
|
-
return n || e(r, Symbol.toStringTag, { value: "Module" }), r;
|
|
9
|
-
}, r = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
|
|
10
|
-
if (typeof require < "u") return require.apply(this, arguments);
|
|
11
|
-
throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
|
|
12
|
-
});
|
|
13
|
-
//#endregion
|
|
14
|
-
export { n, r, t };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require("./chunk-mLOUI7ql.js");let t=require("react");t=e.r(t,1);function n({defaultTagName:e,props:n,render:a,state:o={},stateAttributesMapping:c}){let l=r(i(o,c),n);if(!a)return t.createElement(e,l);if(typeof a==`function`)return a(l,o);if(!t.isValidElement(a))return null;let u=a.props,d={...r(l,u),ref:s(l.ref,u.ref)};return t.cloneElement(a,d)}function r(...e){let t={};for(let n of e){if(!n)continue;let e=n;for(let n of Object.keys(e)){let r=e[n];if(r===void 0)continue;let i=t[n];n===`className`?t[n]=[i,r].filter(Boolean).join(` `):n===`style`?t[n]={...i,...r}:n===`ref`?t[n]=s(i,r):o(n)&&typeof i==`function`&&typeof r==`function`?t[n]=a(r,i):t[n]=r}}return t}function i(e,t){let n={};for(let r of Object.keys(e)){let i=e[r],a=t?.[r]?.(i);if(a){Object.assign(n,a);continue}if(r===`slot`){n[`data-slot`]=i;continue}let o=`data-${String(r).replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}`;typeof i==`boolean`?n[o]=i?``:void 0:i!=null&&(n[o]=String(i))}return n}function a(e,t){return function(n){e(n),n.defaultPrevented||t(n)}}function o(e){return/^on[A-Z]/.test(e)}function s(...e){let t=e.filter(Boolean);if(t.length!==0)return e=>{for(let n of t)typeof n==`function`?n(e):n&&(n.current=e)}}Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return n}});
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import * as e from "react";
|
|
2
|
-
//#region ../../node_modules/.bun/@shadcn+react@0.3.1+c841d34b494ec30a/node_modules/@shadcn/react/dist/chunk-HBS6WEDP.js
|
|
3
|
-
function t({ defaultTagName: t, props: i, render: a, state: s = {}, stateAttributesMapping: c }) {
|
|
4
|
-
let l = n(r(s, c), i);
|
|
5
|
-
if (!a) return e.createElement(t, l);
|
|
6
|
-
if (typeof a == "function") return a(l, s);
|
|
7
|
-
if (!e.isValidElement(a)) return null;
|
|
8
|
-
let u = a.props, d = {
|
|
9
|
-
...n(l, u),
|
|
10
|
-
ref: o(l.ref, u.ref)
|
|
11
|
-
};
|
|
12
|
-
return e.cloneElement(a, d);
|
|
13
|
-
}
|
|
14
|
-
function n(...e) {
|
|
15
|
-
let t = {};
|
|
16
|
-
for (let n of e) {
|
|
17
|
-
if (!n) continue;
|
|
18
|
-
let e = n;
|
|
19
|
-
for (let n of Object.keys(e)) {
|
|
20
|
-
let r = e[n];
|
|
21
|
-
if (r === void 0) continue;
|
|
22
|
-
let s = t[n];
|
|
23
|
-
n === "className" ? t[n] = [s, r].filter(Boolean).join(" ") : n === "style" ? t[n] = {
|
|
24
|
-
...s,
|
|
25
|
-
...r
|
|
26
|
-
} : n === "ref" ? t[n] = o(s, r) : a(n) && typeof s == "function" && typeof r == "function" ? t[n] = i(r, s) : t[n] = r;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
return t;
|
|
30
|
-
}
|
|
31
|
-
function r(e, t) {
|
|
32
|
-
let n = {};
|
|
33
|
-
for (let r of Object.keys(e)) {
|
|
34
|
-
let i = e[r], a = t?.[r]?.(i);
|
|
35
|
-
if (a) {
|
|
36
|
-
Object.assign(n, a);
|
|
37
|
-
continue;
|
|
38
|
-
}
|
|
39
|
-
if (r === "slot") {
|
|
40
|
-
n["data-slot"] = i;
|
|
41
|
-
continue;
|
|
42
|
-
}
|
|
43
|
-
let o = `data-${String(r).replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`)}`;
|
|
44
|
-
typeof i == "boolean" ? n[o] = i ? "" : void 0 : i != null && (n[o] = String(i));
|
|
45
|
-
}
|
|
46
|
-
return n;
|
|
47
|
-
}
|
|
48
|
-
function i(e, t) {
|
|
49
|
-
return function(n) {
|
|
50
|
-
e(n), n.defaultPrevented || t(n);
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
function a(e) {
|
|
54
|
-
return /^on[A-Z]/.test(e);
|
|
55
|
-
}
|
|
56
|
-
function o(...e) {
|
|
57
|
-
let t = e.filter(Boolean);
|
|
58
|
-
if (t.length !== 0) return (e) => {
|
|
59
|
-
for (let n of t) typeof n == "function" ? n(e) : n && (n.current = e);
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
//#endregion
|
|
63
|
-
export { n, o as r, t };
|
package/dist/chunk-mLOUI7ql.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return o}});
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
const e=require("./chunk-mLOUI7ql.js"),t=require("./dist-C_iFkwIX.js"),n=require("./floating-ui.react-dom-BwFRxNGc.js"),r=require("./button.cjs"),i=require("./input-group.cjs");let a=require("lucide-react"),o=require("react"),s=e.r(o,1);o=e.r(o);let c=require("react-dom");c=e.r(c,1);let l=require("react/jsx-runtime");var u;process.env.NODE_ENV!==`production`&&(u=new Set);function d(e,t){return function(...n){if(process.env.NODE_ENV!==`production`){let r=n.join(` `),i=t?`${t}: ${r}`:r,a=`${e}:${i}`;u.has(a)||(u.add(a),e===`warn`?console.warn(i):console.error(i))}}}var f=d(`error`,`Base UI`);function p({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=s.useRef(e!==void 0),[a,o]=s.useState(()=>t),c=i&&e!==void 0?e:a;if(process.env.NODE_ENV!==`production`){s.useEffect(()=>{i!==(e!==void 0)&&f([`A component is changing the ${i?``:`un`}controlled ${r} state of ${n} to be ${i?`un`:``}controlled.`,`Elements should not switch from uncontrolled to controlled (or vice versa).`,`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.",`More info: https://fb.me/react-controlled-components`].join(`
|
|
2
|
-
`))},[r,n,e]);let{current:a}=s.useRef(t);s.useEffect(()=>{!i&&m(a)!==m(t)&&f([`A component is changing the default ${r} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
|
|
3
|
-
`))},[t])}return[c,s.useCallback(e=>{i||o(e)},[])]}function m(e){let t=0,n=new WeakMap;try{return JSON.stringify(e,function(e,r){if(!(e===`_owner`&&this!=null&&typeof this==`object`&&`$$typeof`in this)){if(typeof r==`bigint`)return`__bigint__:${r}`;if(typeof r==`object`&&r){let e=n.get(r);if(e!==void 0)return`__object__:${e}`;n.set(r,t),t+=1}return r}})??`__top__:${typeof e}`}catch{return`__unserializable__`}}var h={...s},g={};function _(e,t){let n=s.useRef(g);return n.current===g&&(n.current=e(t)),n}var v=h.useInsertionEffect,y=v&&v!==h.useLayoutEffect?v:e=>e();function b(e){let t=_(x).current;return t.next=e,y(t.effect),t.trampoline}function x(){let e={next:void 0,callback:S,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function S(){if(process.env.NODE_ENV!==`production`)throw Error(`Base UI: Cannot call an event handler while rendering.`)}var C=d(`warn`,`Base UI`);function w(){}var T=Object.freeze([]),E=Object.freeze({}),D=typeof document<`u`?s.useLayoutEffect:()=>{},O=s.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});process.env.NODE_ENV!==`production`&&(O.displayName=`CompositeListContext`);function k(){return s.useContext(O)}function A(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=b(i),[,o]=s.useState(0),c=_(M).current,u=_(j).current,d=s.useRef(0),f=s.useRef(!0),p=s.useRef(null),m=s.useRef(null),h=b(()=>{f.current||(f.current=!0,o(e=>e+1))}),g=b((e,t)=>{u.set(e,t),h()}),v=b(e=>{u.delete(e),h()}),y=b(e=>{let t=new Map;return n.current.length=0,r&&(r.current.length=0),e.forEach(e=>{t.set(e.element,{...e.registration.metadata??{},index:e.index}),n.current[e.index]=e.element,r&&(r.current[e.index]=e.registration.label===void 0?e.registration.textRef?.current?.textContent??e.element.textContent:e.registration.label)}),d.current=n.current.length,t});function x(e){if(m.current?.disconnect(),m.current=null,typeof MutationObserver!=`function`||e.length<2)return;let t=new MutationObserver(n=>{if(!F(n))return;let r=null;for(let n of e)if(n.isConnected){if(r&&I(r,n)>0){t.disconnect(),h();return}r=n}});m.current=t;let n=new Set;for(let t=1;t<e.length;t+=1){let r=P(e[t-1],e[t]);r&&n.add(r)}n.forEach(e=>t.observe(e,{childList:!0}))}let S=b(()=>{let[e,t]=N(u),n=y(e),r=p.current,i=!r||r.length!==e.length||e.some((e,t)=>{let n=r[t];return e.index!==n.index||e.element!==n.element||e.registration.index!==n.registration.index||e.registration.metadata!==n.registration.metadata});x(t),p.current=e,f.current=!1,i&&(c.forEach(e=>e(n)),a(n))});D(()=>(!f.current&&p.current&&y(p.current),()=>{n.current=[],r&&(r.current=[])}),[n,r,y]),D(()=>{f.current&&S()}),D(()=>()=>{m.current?.disconnect(),f.current=!0},[]);let C=b(e=>(c.add(e),()=>{c.delete(e)})),w=s.useMemo(()=>({register:g,unregister:v,subscribeMapChange:C,nextIndexRef:d}),[g,v,C,d]);return(0,l.jsx)(O.Provider,{value:w,children:t})}function j(){return new Map}function M(){return new Set}function N(e){let t=new Set,n=[],r=[];e.forEach((e,i)=>{if(!i.isConnected)return;let a=e.index,o={index:a??-1,element:i,registration:e};a===null?r.push(o):a>=0&&(t.add(a),n.push(o))});let i=0;return r.sort((e,t)=>I(e.element,t.element)),r.forEach(e=>{for(;t.has(i);)i+=1;e.index=i,n.push(e),i+=1}),t.size>0&&n.sort((e,t)=>e.index-t.index),[n,r.map(e=>e.element)]}function P(e,t){let n=e.parentElement;for(;n&&!n.contains(t);)n=n.parentElement;return n}function F(e){for(let t of e)for(let e=0;e<t.removedNodes.length;e+=1)if(t.removedNodes[e].isConnected)return!0;return!1}function I(e,t){return e.nextElementSibling===t?-1:t.nextElementSibling===e?1:e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}function L(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var R=L(`https://base-ui.com/production-error`,`Base UI`);function z(e,t,n,r){let i=_(V).current;return H(i,e,t,n,r)&&te(i,[e,t,n,r]),i.callback}function B(e){let t=_(V).current;return ee(t,e)&&te(t,e),t.callback}function V(){return{callback:null,cleanup:null,refs:[]}}function H(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function ee(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function te(e,t){if(e.refs=t,t.every(e=>e==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let i=t[e];if(i!=null)switch(typeof i){case`function`:{let t=i(n);typeof t==`function`&&(r[e]=t);break}case`object`:i.current=n;break;default:}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null;break;default:}}}}}}var ne=parseInt(s.version,10);function U(e){return ne>=e}function re(e){if(!s.isValidElement(e))return null;let t=e,n=t.props;return(U(19)?n?.ref:t.ref)??null}function ie(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function ae(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e);continue}i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function oe(e,t){return typeof e==`function`?e(t):e}function W(e,t){return typeof e==`function`?e(t):e}var se={};function ce(e,t,n,r,i){if(!n&&!r&&!i&&!e)return ue(t);let a=ue(e);return t&&(a=de(a,t)),n&&(a=de(a,n)),r&&(a=de(a,r)),i&&(a=de(a,i)),a}function le(e){if(e.length===0)return se;if(e.length===1)return ue(e[0]);let t=ue(e[0]);for(let n=1;n<e.length;n+=1)t=de(t,e[n]);return t}function ue(e){return he(e)?{...e(se)}:fe(e)}function de(e,t){return he(t)?t(e):pe(e,t)}function fe(e){let t={...e};for(let e in t){let n=t[e];me(e,n)&&(t[e]=_e(n))}return t}function pe(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=ie(e.style,r);break;case`className`:e[n]=ye(e.className,r);break;default:me(n,r)?e[n]=ge(e[n],r):e[n]=r}}return e}function me(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t==`function`||t===void 0)}function he(e){return typeof e==`function`}function ge(e,t){return t?e?(...n)=>{let r=n[0];if(be(r)){let i=r;ve(i);let a=t(...n);return i.baseUIHandlerPrevented||e?.(...n),a}let i=t(...n);return e?.(...n),i}:_e(t):e}function _e(e){return e&&((...t)=>{let n=t[0];return be(n)&&ve(n),e(...t)})}function ve(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function ye(e,t){return t?e?t+` `+e:t:e}function be(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function G(e,t,n={}){let r=t.render;n.enabled!==!1&&(r=Ee(r));let i=xe(t,n,r);if(n.enabled===!1)return null;let a=n.state??E;return De(e,r,i,a)}function xe(e,t,n){let{className:r,style:i}=e,{state:a=E,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?oe(r,a):void 0,d=l?W(i,a):void 0,f=l?ae(a,c):E,p=l&&s?Se(s):void 0,m=l?ie(f,p)??{}:E;return typeof document<`u`&&(l?Array.isArray(o)?m.ref=B([m.ref,re(n),...o]):m.ref=z(m.ref,re(n),o):z(null,null)),l?(u!==void 0&&(m.className=ye(m.className,u)),d!==void 0&&(m.style=ie(m.style,d)),m):E}function Se(e){return Array.isArray(e)?le(e):ce(void 0,e)}var Ce=Symbol.for(`react.lazy`),we=/^[A-Z][A-Za-z0-9$]*$/,Te=/[a-z]/;function Ee(e){if(e?.$$typeof!==Ce)return e;let t=s.Children.toArray(e)[0];return s.isValidElement(t)?t:e}function De(e,t,n,r){if(t){if(typeof t==`function`)return process.env.NODE_ENV!==`production`&&Oe(t),t(n,r);let e=ce(n,t.props);if(e.ref=n.ref,process.env.NODE_ENV!==`production`&&!s.isValidElement(t))throw Error(["Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.","A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.",`https://base-ui.com/r/invalid-render-prop`].join(`
|
|
4
|
-
`));return s.cloneElement(t,e)}return ke(e,n)}function Oe(e){let t=e.name;t.length!==0&&we.test(t)&&Te.test(t)&&C(`The \`render\` prop received a function named \`${t}\` that starts with an uppercase letter.`,"This usually means a React component was passed directly as `render={Component}`.","Base UI calls `render` as a plain function, which can break the Rules of Hooks during reconciliation.",`If this is an intentional render callback, rename it to start with a lowercase letter.`,"Use `render={<Component />}` or `render={(props) => <Component {...props} />}` instead.",`https://base-ui.com/r/invalid-render-prop`)}function ke(e,t){return e===`button`?(0,s.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,s.createElement)(`img`,{alt:``,...t,key:t.key}):s.createElement(e,t)}function Ae(){let[,e]=s.useState({});return s.useCallback(()=>{e({})},[])}var je=0;function Me(e,t=`mui`){let n=s.useRef(void 0),r=Ae(),i=e??n.current;return s.useEffect(()=>{n.current??(je+=1,n.current=`${t}-${je}`,e??r())},[e,t,r]),i}var Ne=h.useId;function Pe(e,t){if(Ne!==void 0){let n=Ne();return e??(t?`${t}-${n}`:n)}return Me(e,t)}function Fe(e){return Pe(e,`base-ui`)}function K(e,t,n,r){let i=!1,a=!1,o=r??E;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}function Ie(e,t,n){let r=n??E;return{reason:e,event:t??new Event(`base-ui`),...r}}var Le=`none`,Re=`trigger-press`,ze=`outside-press`,Be=`item-press`,Ve=`close-press`,He=`clear-press`,Ue=`chip-remove-press`,We=`input-change`,Ge=`input-clear`,Ke=`input-press`,qe=`focus-out`,Je=`escape-key`,Ye=`list-navigation`,Xe=`keyboard`,Ze=`pointer`,Qe=`cancel-open`,$e=`imperative-action`;function et(e){s.useEffect(e,T)}var tt=null,nt=globalThis.requestAnimationFrame,rt=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1;let n=process.env.NODE_ENV!==`production`&&nt!==requestAnimationFrame&&(nt=requestAnimationFrame,!0);return(!this.isScheduled||n)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||this.callbacks[t]!==null&&(this.callbacks[t]=null,--this.callbacksCount)}},it=class e{static create(){return new e}static request(e){return rt.request(e)}static cancel(e){return rt.cancel(e)}currentId=tt;request(e){this.cancel(),this.currentId=rt.request(()=>{this.currentId=tt,e()})}cancel=()=>{this.currentId!==tt&&(rt.cancel(this.currentId),this.currentId=tt)};disposeEffect=()=>this.cancel};function at(){let e=_(it.create).current;return et(e.disposeEffect),e}function ot(e,t=!1,n=!1,r=!1){let[i,a]=s.useState(e&&t?`idle`:void 0),[o,c]=s.useState(e&&!r);return e&&!o&&(c(!0),a(`starting`)),!e&&o&&i!==`ending`&&!n&&a(`ending`),!e&&!o&&i===`ending`&&a(void 0),D(()=>{if(!e&&o&&i!==`ending`&&n){let e=it.request(()=>{a(`ending`)});return()=>{it.cancel(e)}}},[e,o,i,n]),D(()=>{if(!e||t||i===void 0)return;let n=it.request(()=>{a(void 0)});return()=>{it.cancel(n)}},[t,e,i]),D(()=>{if(!e||!t)return;e&&o&&i!==`idle`&&a(`starting`);let n=it.request(()=>{a(`idle`)});return()=>{it.cancel(n)}},[t,e,o,i]),{mounted:o,setMounted:c,transitionStatus:i}}function st(e={}){let{guess:t,label:n,metadata:r,textRef:i,index:a}=e,{register:o,unregister:c,subscribeMapChange:l,nextIndexRef:u}=k(),d=s.useRef(-1),[f,p]=s.useState(a==null&&t?()=>{if(d.current===-1){let e=u.current;u.current+=1,d.current=e}return d.current}:-1),m=a??f,h=s.useRef(null),g=s.useCallback(e=>{let t=h.current;t&&c(t),h.current=e,e&&o(e,{metadata:r??null,index:a??null,label:n,textRef:i})},[a,o,c,r,n,i]);return D(()=>{if(a==null)return l(e=>{let t=h.current?e.get(h.current)?.index:null;t!=null&&p(t)})},[a,l]),{ref:g,index:m}}var ct=`data-starting-style`,q=`data-ending-style`,lt={[ct]:``},ut={[q]:``},dt={transitionStatus(e){return e===`starting`?lt:e===`ending`?ut:null}},ft=s.createContext(void 0);process.env.NODE_ENV!==`production`&&(ft.displayName=`CompositeRootContext`);function pt(e=!1){let t=s.useContext(ft);if(t===void 0&&!e)throw Error(process.env.NODE_ENV===`production`?R(16):`Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.`);return t}function J(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,c=r&&t===!1;return{props:s.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||c)&&(e.disabled=n),e},[r,n,t,o,c,a,i])}}function Y(e){return e?.ownerDocument||document}function mt(e,t,{detail:r=0,pointerType:i=``}={}){e.dispatchEvent(new(n.m(e)).PointerEvent(`click`,{bubbles:!0,cancelable:!0,composed:!0,detail:r,pointerType:i,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey}))}function ht(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:a}=e,o=s.useRef(null),c=pt(!0),l=a??c!==void 0,{props:u}=J({focusableWhenDisabled:n,disabled:t,composite:l,tabIndex:r,isNativeButton:i});process.env.NODE_ENV!==`production`&&s.useEffect(()=>{if(!o.current)return;let e=gt(o.current);i?e||f(`A component that acts as a button expected a native <button> because the \`nativeButton\` prop is true. Rendering a non-<button> removes native button semantics, which can impact forms and accessibility. Use a real <button> in the \`render\` prop, or set \`nativeButton\` to \`false\`.${h.captureOwnerStack?.()||``}`):e&&f(`A component that acts as a button expected a non-<button> because the \`nativeButton\` prop is false. Rendering a <button> keeps native behavior while Base UI applies non-native attributes and handlers, which can add unintended extra attributes (such as \`role\` or \`aria-disabled\`). Use a non-<button> in the \`render\` prop, or set \`nativeButton\` to \`true\`.${h.captureOwnerStack?.()||``}`)},[i]);let d=s.useCallback(()=>{let e=o.current;gt(e)&&l&&t&&u.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,u.disabled,l]);return D(d,[d]),{getButtonProps:s.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:a,onKeyDown:o,onPointerDown:s,...c}=e;return ce({onClick(e){if(t){e.preventDefault();return}n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(ve(e),o?.(e),e.baseUIHandlerPrevented))return;let n=e.target===e.currentTarget,r=e.currentTarget,a=gt(r),s=!i&&_t(r),c=n&&(i?a:!s),u=e.key===`Enter`,d=e.key===` `,f=r.getAttribute(`role`),p=f?.startsWith(`menuitem`)||f===`option`||f===`gridcell`;if(n&&l&&d){if(e.defaultPrevented&&p)return;e.preventDefault(),(!i||a)&&(e.preventBaseUIHandler(),mt(r,e));return}if(!c||i||!d&&!u){n&&s&&d&&e.preventDefault();return}e.defaultPrevented||(e.preventDefault(),u&&(e.preventBaseUIHandler(),mt(r,e)))},onKeyUp(e){if(!t){if(ve(e),a?.(e),e.target===e.currentTarget&&i&&l&>(e.currentTarget)&&e.key===` `){e.preventDefault();return}e.baseUIHandlerPrevented||e.target===e.currentTarget&&!i&&!l&&!e.defaultPrevented&&e.key===` `&&(e.preventBaseUIHandler(),mt(e.currentTarget,e))}},onPointerDown(e){if(t){e.preventDefault();return}s?.(e)}},i?{type:`button`}:{role:`button`},u,c)},[t,u,l,i]),buttonRef:b(e=>{o.current=e,d()})}}function gt(e){return n.g(e)&&e.tagName===`BUTTON`}function _t(e){return n.g(e)&&e.tagName===`A`&&!!e.href}function X(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}var vt=0,yt=class e{static create(){return new e}currentId=vt;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=vt,t()},e)}isStarted(){return this.currentId!==vt}clear=()=>{this.currentId!==vt&&(clearTimeout(this.currentId),this.currentId=vt)};disposeEffect=()=>this.clear};function bt(){let e=_(yt.create).current;return et(e.disposeEffect),e}function xt(e){let t=_(St,e).current;return t.next=e,D(t.effect),t}function St(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function Z(e){return e==null?e:`current`in e?e.current:e}function Ct(e,t){return e.getAnimations(t).filter(e=>{let t=e.effect?.getTiming();return t?.duration!==1/0&&t?.iterations!==1/0})}var wt=null;function Tt(e){if(!wt){let e=[];wt=e,queueMicrotask(()=>{wt=null,c.flushSync(()=>{for(let t of e)t()})})}wt.push(e)}function Et(e,t=!1,n=!1){let r=at();return b((i,a=null)=>{r.cancel();let o=Z(e);if(o==null)return;let s=o,l=()=>{if(!n){c.flushSync(i);return}Tt(()=>{a?.aborted||i()})};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function u(){Promise.all(Ct(s).map(e=>e.finished.then(w))).then(()=>{a?.aborted||l()},()=>{if(!a?.aborted){if(Ct(s).some(e=>e.pending||e.playState!==`finished`)){u();return}l()}})}if(t){let e=ct;if(!s.hasAttribute(e)){r.request(u);return}let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),u())});t.observe(s,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0});return}r.request(u)})}function Dt(e){let{enabled:t=!0,open:n,ref:r,batch:i=!1,onComplete:a}=e,o=b(a),c=Et(r,n,i);s.useEffect(()=>{if(!t)return;let e=new AbortController;return c(o,e.signal),()=>{e.abort()}},[t,n,o,c])}function Ot(){if(typeof navigator>`u`)return{userAgent:``,platform:``,maxTouchPoints:0};if(process.env.NODE_ENV!==`production`){let e=navigator.userAgentData;if(e&&Array.isArray(e.brands))return{userAgent:e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(` `),platform:e.platform??navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}return{userAgent:navigator.userAgent,platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:kt,platform:At,maxTouchPoints:jt}=Ot(),Mt=kt.toLowerCase(),Nt=At.toLowerCase(),Pt=/^i(os$|p)/.test(Nt)||Nt===`macintel`&&jt>1,Ft=`android`,It=Nt===Ft||Mt.includes(Ft),Lt=!Pt&&Nt.startsWith(`mac`);Nt.startsWith(`win`),!It&&/^(linux|chrome os)/.test(Nt);var Rt=Lt||Pt,zt=typeof CSS<`u`&&!!CSS.supports?.(`-webkit-backdrop-filter:none`),Bt=!zt&&Mt.includes(`firefox`);!zt&&Mt.includes(`chrom`);var Vt=Rt,Ht=/jsdom|happydom/.test(Mt),Ut={},Wt={},Gt=``;function Kt(e,t){return n.y(e)?e:t}function qt(e,t,n){return/hidden|clip/.test(e.getComputedStyle(Kt(t,n)).overflowY)}function Jt(e){if(typeof document>`u`)return!1;let t=Y(e);return n.m(t).innerWidth-t.documentElement.clientWidth>0}function Yt(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=Y(e),n=t.documentElement,r=t.body,i=Kt(n,r),a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function Xt(e){let t=Y(e),n=t.documentElement,r=t.body,i=Kt(n,r),a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function Zt(e){let t=Y(e),r=t.documentElement,i=t.body,a=n.m(r),o=0,s=0,c=!1,l=it.create();if(zt&&(a.visualViewport?.scale??1)!==1)return()=>{};function u(){let t=a.getComputedStyle(r),n=a.getComputedStyle(i),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;o=r.scrollTop,s=r.scrollLeft,Ut={scrollbarGutter:r.style.scrollbarGutter,overflowY:r.style.overflowY,overflowX:r.style.overflowX},Gt=r.style.scrollBehavior,Wt={position:i.style.position,height:i.style.height,width:i.style.width,boxSizing:i.style.boxSizing,overflowY:i.style.overflowY,overflowX:i.style.overflowX,scrollBehavior:i.style.scrollBehavior};let u=r.scrollHeight>r.clientHeight,d=r.scrollWidth>r.clientWidth,f=t.overflowY===`scroll`||n.overflowY===`scroll`,p=t.overflowX===`scroll`||n.overflowX===`scroll`,m=Math.max(0,a.innerWidth-i.clientWidth),h=Math.max(0,a.innerHeight-i.clientHeight),g=parseFloat(n.marginTop)+parseFloat(n.marginBottom),_=parseFloat(n.marginLeft)+parseFloat(n.marginRight),v=Kt(r,i);if(c=Yt(e),c){r.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`;return}Object.assign(r.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(r.style.overflowY=`scroll`),(d||p)&&(r.style.overflowX=`scroll`),Object.assign(i.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflowY:`hidden`,overflowX:`hidden`,scrollBehavior:`unset`}),i.scrollTop=o,i.scrollLeft=s,r.setAttribute(`data-base-ui-scroll-locked`,``),r.style.scrollBehavior=`unset`}function d(){Object.assign(r.style,Ut),Object.assign(i.style,Wt),c||(r.scrollTop=o,r.scrollLeft=s,r.removeAttribute(`data-base-ui-scroll-locked`),r.style.scrollBehavior=Gt)}function f(){d(),l.request(u)}u();let p=X(a,`resize`,f);return()=>{l.cancel(),d(),typeof a.removeEventListener==`function`&&p()}}var Qt=new class{lockCount=0;restore=null;timeoutLock=yt.create();timeoutUnlock=yt.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=Y(e),r=t.documentElement,i=t.body,a=n.m(r);if(qt(a,r,i)){let t=new a.MutationObserver(()=>{qt(a,r,i)||(t.disconnect(),this.restore=null,this.lock(e))}),n={attributes:!0};t.observe(r,n),t.observe(i,n),this.restore=()=>t.disconnect();return}let o=Pt||!Jt(e);this.restore=o?Xt(e):Zt(e)}};function $t(e=!0,t=null){D(()=>{if(e)return Qt.acquire(t)},[e,t])}function Q(e){e.preventDefault(),e.stopPropagation()}function en(e){return`nativeEvent`in e}function tn(e){return e.pointerType===``&&e.isTrusted?!0:It&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function nn(e){return Ht?!1:!It&&e.width===0&&e.height===0||e.type===`pointerdown`&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`&&(It||e.buttons===0)||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function rn(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function an(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}function on(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function $(e,t){if(!e||!t)return!1;let r=t.getRootNode?.();if(e.contains(t))return!0;if(r&&n.b(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function sn(e,t){let r=e;for(;r;){if(n.h(r)&&r.matches(t))return r;r=r.assignedSlot??r.parentNode??(n.b(r)?r.host:null)}return null}function cn(e){return`composedPath`in e?e.composedPath()[0]??e.target:e.target}var ln=`data-base-ui-focusable`,un=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,dn=`ArrowLeft`,fn=`ArrowRight`,pn=`ArrowUp`,mn=`ArrowDown`,hn=`data-open`,gn=`data-closed`,_n=`data-anchor-hidden`,vn=`data-popup-open`,yn=`data-pressed`,bn={[vn]:``},xn={[vn]:``,[yn]:``},Sn={[hn]:``},Cn={[gn]:``},wn={[_n]:``},Tn={open(e){return e?bn:null}},En={open(e){return e?xn:null}},Dn={open(e){return e?Sn:Cn},anchorHidden(e){return e?wn:null}};({...Dn,...dt});function On(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function kn(e){return e.matches(`html,body`)}function An(e){return n.g(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function jn(e){return sn(e,`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${un}`)!=null}function Mn(e){return e?e.getAttribute(`role`)===`combobox`&&An(e):!1}function Nn(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function Pn(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}var Fn={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},In={...Fn,position:`fixed`,margin:0,top:0,left:0},Ln={...Fn,position:`absolute`},Rn=s.forwardRef(function(e,t){let[n,r]=s.useState();D(()=>{Vt&&zt&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,l.jsx)(`span`,{...e,ref:t,style:In,"aria-hidden":n?void 0:!0,...i,"data-base-ui-focus-guard":``})});process.env.NODE_ENV!==`production`&&(Rn.displayName=`FocusGuard`);function zn(e,t,n){return Math.floor(e/t)!==n}function Bn(e,t){return t<0||t>=e.length}function Vn(e,t){return Wn(e.current,{disabledIndices:t})}function Hn(e,t){return Wn(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Un(e,t,n){let{decrement:r,loopFocus:i,allowEscape:a,disabledIndices:o,minIndex:s,maxIndex:c}=n,l=()=>Wn(e,{startingIndex:t,decrement:r,disabledIndices:o}),u,d=!1;if(!i)u=r?Math.max(s,l()):Math.min(c,l());else if(r?t<=s:t>=c){let n=r?-1:e.length;a&&t!==n?u=-1:(u=r?c:s,d=!0)}else u=l();return{index:Bn(e,u)?-1:u,wrapped:d}}function Wn(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.length-1&&Kn(e,a,r));return a}function Gn(e,{event:t,orientation:r,loopFocus:i,onLoop:a,rtl:o,cols:s,disabledIndices:c,minIndex:l,maxIndex:u,prevIndex:d,stopEvent:f=!1}){let p=d,m;if(t.key===`ArrowUp`?m=`up`:t.key===`ArrowDown`&&(m=`down`),m){let r=[],o=[],h=!1,g=0;{let t=null,n=-1;e.forEach((e,i)=>{if(e==null)return;g+=1;let a=sn(e,`[role="row"]`);a&&(h=!0),(a!==t||n===-1)&&(t=a,n+=1,r[n]=[]),r[n].push(i),o[i]=n})}let _=!1,v=0;if(h)for(let e of r){let t=e.length;t>v&&(v=t),t!==s&&(_=!0)}let y=_&&g<e.length,b=v||s,x=n=>{if(!_||d===-1)return;let s=o[d];if(s==null)return;let l=r[s].indexOf(d),u=n===`up`?-1:1;for(let n=s+u,f=0;f<r.length;f+=1,n+=u){if(n<0||n>=r.length){if(!i||y)return;if(n=n<0?r.length-1:0,a){let e=Math.min(l,r[n].length-1);n=o[a(t,d,r[n][e]??r[n][0])]??n}}let s=r[n];for(let t=Math.min(l,s.length-1);t>=0;--t){let n=s[t];if(!Kn(e,n,c))return n}}},S=t=>{if(!y||d===-1)return;let r=d%b,a=t===`up`?-b:b,o=u-u%b,s=n.C(u/b)+1;for(let t=d-r+a,n=0;n<s;n+=1,t+=a){if(t<0||t>u){if(!i)return;t=t<0?o:0}let n=Math.min(t+b-1,u);for(let i=Math.min(t+r,n);i>=t;--i)if(!Kn(e,i,c))return i}};f&&Q(t);let C=x(m)??S(m);if(C!==void 0)p=C;else if(d===-1)p=m===`up`?u:l;else if(p=Wn(e,{startingIndex:d,amount:b,decrement:m===`up`,disabledIndices:c}),i){if(m===`up`&&(d-b<l||p<0)){let e=d%b,n=u%b,r=u-(n-e);p=n===e?u:n>e?r:r-b,a&&(p=a(t,d,p))}m===`down`&&d+b>u&&(p=Wn(e,{startingIndex:d%b-b,amount:b,disabledIndices:c}),a&&(p=a(t,d,p)))}Bn(e,p)&&(p=d)}if(r===`both`){let r=n.C(d/s);t.key===(o?`ArrowLeft`:`ArrowRight`)&&(f&&Q(t),d%s===s-1?i&&(p=Wn(e,{startingIndex:d-d%s-1,disabledIndices:c}),a&&(p=a(t,d,p))):(p=Wn(e,{startingIndex:d,disabledIndices:c}),i&&zn(p,s,r)&&(p=Wn(e,{startingIndex:d-d%s-1,disabledIndices:c}),a&&(p=a(t,d,p)))),zn(p,s,r)&&(p=d)),t.key===(o?`ArrowRight`:`ArrowLeft`)&&(f&&Q(t),d%s===0?i&&(p=Wn(e,{startingIndex:d+(s-d%s),decrement:!0,disabledIndices:c}),a&&(p=a(t,d,p))):(p=Wn(e,{startingIndex:d,decrement:!0,disabledIndices:c}),i&&zn(p,s,r)&&(p=Wn(e,{startingIndex:d+(s-d%s),decrement:!0,disabledIndices:c}),a&&(p=a(t,d,p)))),zn(p,s,r)&&(p=d));let l=n.C(u/s)===r;Bn(e,p)&&(i&&l?(p=t.key===(o?`ArrowRight`:`ArrowLeft`)?u:Wn(e,{startingIndex:d-d%s-1,disabledIndices:c}),a&&(p=a(t,d,p))):p=d)}return p}function Kn(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e[t];return r?!Jn(r)||r.matches(`:disabled`)?!0:!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!1}function qn(e){return e.visibility===`hidden`||e.visibility===`collapse`}function Jn(e,t=e?n.u(e):null){return!e||!e.isConnected||!t||qn(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var Yn=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function Xn(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let r=e.getRootNode();return n.b(r)?r.host:null}function Zn(e){for(let t of Array.from(e.children))if(n.d(t)===`summary`)return t;return null}function Qn(e,t){let n=Zn(t);return!!n&&(e===n||$(n,e))}function $n(e){let t=e?n.d(e):``;return e!=null&&e.matches(Yn)&&(t!==`summary`||e.parentElement!=null&&n.d(e.parentElement)===`details`&&Zn(e.parentElement)===e)&&(t!==`details`||Zn(e)==null)&&(t!==`input`||e.type!==`hidden`)}function er(e){if(!$n(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=Xn(t)){let r=t!==e,i=n.d(t)===`slot`;if(t.hasAttribute(`inert`)||r&&n.d(t)===`details`&&!t.open&&!Qn(e,t)||t.hasAttribute(`hidden`)||!i&&!tr(t,r))return!1}return!0}function tr(e,t){let r=n.u(e);return t?r.display!==`none`:Jn(e,r)}function nr(e){let t=e.tabIndex;if(t<0){let t=n.d(e);if(t===`details`||t===`audio`||t===`video`||n.g(e)&&e.isContentEditable)return 0}return t}function rr(e){if(n.d(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function ir(e,t){let n=rr(e);if(!n)return!0;let r=t.find(e=>{let t=rr(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=rr(e);return t?.name===n.name&&t.form===n.form})===n}function ar(e){if(n.g(e)&&n.d(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return n.g(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function or(e,t){ar(e).forEach(e=>{$n(e)&&t.push(e),or(e,t)})}function sr(e,t,r){ar(e).forEach(e=>{n.g(e)&&e.matches(t)&&r.push(e),sr(e,t,r)})}function cr(e){return er(e)&&nr(e)>=0}function lr(e){let t=[];return or(e,t),t.filter(er)}function ur(e){let t=lr(e);return t.filter(e=>nr(e)>=0&&ir(e,t))}function dr(e,t){let n=ur(e),r=n.length;if(r===0)return;let i=on(Y(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function fr(e){return dr(Y(e).body,1)||e}function pr(e){return dr(Y(e).body,-1)||e}function mr(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!$(n,r)}function hr(e){ur(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function gr(e){let t=[];sr(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}function _r(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],..._r(e,t.id,n)])}function vr(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function yr(e){return`data-base-ui-${e}`}var br=0;function xr(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(br);function a(){i&&!i()||e?.focus({preventScroll:n})}if(r)return a(),w;let o=requestAnimationFrame(a);return br=o,()=>{br===o&&(cancelAnimationFrame(o),br=0)}}var Sr=`data-base-ui-inert`,Cr=new WeakMap,wr=new WeakSet,Tr=new WeakMap,Er=0;function Dr(e){return e?n.b(e)?e.host:Dr(e.parentNode):null}var Or=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=Dr(t);return e.contains(n)?n:null}).filter(e=>e!=null),kr=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},Ar=(e,t,r)=>{let i=[],a=e=>{!e||r.has(e)||Array.from(e.children).forEach(e=>{n.d(e)!==`script`&&(t.has(e)?a(e):i.push(e))})};return a(e),i};function jr(e,t,n,{mark:r=!0}){let i=Or(t,e),a=r?Ar(t,kr(i),new Set(i)):[],o=[],s=[];if(n){let e=Or(t,Array.from(t.querySelectorAll(`[aria-live]`))),n=i.concat(e);Ar(t,kr(n),new Set(n)).forEach(e=>{let t=e.getAttribute(`aria-hidden`),n=t!==null&&t!==`false`,r=(Cr.get(e)||0)+1;Cr.set(e,r),o.push(e),r===1&&n&&wr.add(e),n||e.setAttribute(`aria-hidden`,`true`)})}return r&&a.forEach(e=>{let t=(Tr.get(e)||0)+1;Tr.set(e,t),s.push(e),t===1&&e.setAttribute(Sr,``)}),Er+=1,()=>{o.forEach(e=>{let t=(Cr.get(e)||0)-1;Cr.set(e,t),t||(wr.has(e)||e.removeAttribute(`aria-hidden`),wr.delete(e))}),r&&s.forEach(e=>{let t=(Tr.get(e)||0)-1;Tr.set(e,t),t||e.removeAttribute(Sr)}),--Er,Er||(Cr=new WeakMap,wr=new WeakSet,Tr=new WeakMap)}}function Mr(e,t={}){let{ariaHidden:n=!1,mark:r=!0}=t,i=Y(e[0]).body;return jr(e,i,n,{mark:r})}var Nr={style:{transition:`none`}},Pr={fallbackAxisSide:`none`},Fr={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},Ir=s.createContext(null);process.env.NODE_ENV!==`production`&&(Ir.displayName=`PortalContext`);var Lr=()=>s.useContext(Ir),Rr=yr(`portal`);function zr(e={}){let{ref:t,container:r,componentProps:i=E,elementProps:a}=e,o=Pe(),l=Lr()?.portalNode,[u,d]=s.useState(null),[f,p]=s.useState(null),m=b(e=>{e!==null&&p(e)}),h=s.useRef(null);D(()=>{if(r===null){h.current&&(h.current=null,p(null),d(null));return}let e=(r&&(n.v(r)?r:r.current))??l??document.body;if(e==null){h.current&&(h.current=null,p(null),d(null));return}h.current!==e&&(h.current=e,p(null),d(e))},[r,l]);let g=G(`div`,i,{ref:[t,m],props:[{id:o,[Rr]:``},a]}),_=u&&g?c.createPortal(g,u):null;return{node:f,nodeId:s.isValidElement(g)?g.props.id:void 0,subtree:_}}var Br=s.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,container:o,portalOwnerRole:u,...d}=e,{node:f,nodeId:p,subtree:m}=zr({container:o,ref:t,componentProps:e,elementProps:d}),h=s.useRef(null),g=s.useRef(null),_=s.useRef(null),v=s.useRef(null),[y,b]=s.useState(null),x=s.useRef(!1),S=y?.modal,C=y?.open,w=!!y&&!y.modal&&y.open&&!!f;s.useEffect(()=>{if(!f||S)return;function e(e){f&&e.relatedTarget&&mr(e)&&(e.type===`focusin`?x.current&&=(gr(f),!1):(hr(f),x.current=!0))}return Pn(X(f,`focusin`,e,!0),X(f,`focusout`,e,!0))},[f,S]),D(()=>{!f||C!==!0||!x.current||(gr(f),x.current=!1)},[C,f]);let T=s.useMemo(()=>({beforeOutsideRef:h,afterOutsideRef:g,beforeInsideRef:_,afterInsideRef:v,portalNode:f,setFocusManagerState:b}),[f]);return(0,l.jsxs)(s.Fragment,{children:[m,(0,l.jsxs)(Ir.Provider,{value:T,children:[w&&f&&(0,l.jsx)(Rn,{"data-type":`outside`,ref:h,onFocus:e=>{mr(e,f)?_.current?.focus():pr(y?y.domReference:null)?.focus()}}),w&&f&&(0,l.jsx)(`span`,{role:u,"aria-owns":p,style:Fr}),f&&c.createPortal(a,f),w&&f&&(0,l.jsx)(Rn,{"data-type":`outside`,ref:g,onFocus:e=>{mr(e,f)?v.current?.focus():(fr(y?y.domReference:null)?.focus(),y?.closeOnFocusOut&&y?.onOpenChange(!1,K(`focus-out`,e.nativeEvent)))}})]})]})});process.env.NODE_ENV!==`production`&&(Br.displayName=`FloatingPortal`);function Vr(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var Hr=s.createContext(null);process.env.NODE_ENV!==`production`&&(Hr.displayName=`FloatingNodeContext`);var Ur=s.createContext(null);process.env.NODE_ENV!==`production`&&(Ur.displayName=`FloatingTreeContext`);var Wr=()=>s.useContext(Hr)?.id||null,Gr=e=>{let t=s.useContext(Ur);return e??t};function Kr(e,t){let r=n.m(cn(e));return e instanceof r.KeyboardEvent?`keyboard`:e instanceof r.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||(tn(e)?`keyboard`:t||`mouse`):`touches`in e?`touch`:e instanceof r.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var qr=20,Jr=[];function Yr(){Jr=Jr.filter(e=>e.deref()?.isConnected)}function Xr(e){Yr(),e&&n.d(e)!==`body`&&(Jr.push(new WeakRef(e)),Jr.length>qr&&(Jr=Jr.slice(-20)))}function Zr(){return Yr(),Jr[Jr.length-1]?.deref()}function Qr(e){return e?cr(e)?e:ur(e)[0]||e:null}function $r(e){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!e.getAttribute(`role`)?.includes(`dialog`))return;let t=lr(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return cr(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),n=e.getAttribute(`tabindex`);t.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 ei(e){let{context:t,children:r,disabled:i=!1,initialFocus:a=!0,returnFocus:o=!0,explicitReturnFocus:c,restoreFocus:u=!1,modal:d=!0,closeOnFocusOut:f=!0,openInteractionType:p=``,nextFocusableElement:m,previousFocusableElement:h,beforeContentFocusGuardRef:g,externalTree:_,getInsideElements:v}=e,y=t.useState(`open`),x=t.useState(`domReferenceElement`),S=t.useState(`floatingElement`),{events:C,dataRef:w}=t.context,T=b(()=>w.current.floatingContext?.nodeId),E=a===!1,O=Mn(x)&&E,k=xt(a),A=xt(o),j=xt(c),M=xt(p),N=xt(y),P=Gr(_),F=Lr(),I=s.useRef(!1),L=s.useRef(!1),R=s.useRef(!1),B=s.useRef(null),V=s.useRef(``),H=s.useRef(``),ee=s.useRef(null),te=s.useRef(null),ne=z(ee,g,F?.beforeInsideRef),U=z(te,F?.afterInsideRef),re=bt(),ie=bt(),ae=at(),oe=F!=null,W=Nn(S),se=b((e=W)=>e?ur(e):[]),ce=b(()=>v?.().filter(e=>e!=null)??[]);s.useEffect(()=>{if(i||!d)return;function e(e){e.key===`Tab`&&$(W,on(Y(W)))&&se().length===0&&!O&&Q(e)}return X(Y(W),`keydown`,e)},[i,W,d,O,se]),s.useEffect(()=>{if(i||!y)return;let e=Y(W);function t(){R.current=!1}function n(e){let t=cn(e),n=ce();R.current=!($(S,t)||$(x,t)||$(F?.portalNode,t)||n.some(e=>e===t||$(e,t))),H.current=e.pointerType||`keyboard`,sn(t,`[data-base-ui-click-trigger]`)&&(L.current=!0,ie.start(0,()=>{L.current=!1}))}function r(){H.current=`keyboard`}return Pn(X(e,`pointerdown`,n,!0),X(e,`pointerup`,t,!0),X(e,`pointercancel`,t,!0),X(e,`keydown`,r,!0),t)},[i,S,x,W,y,F,ie,ce]),s.useEffect(()=>{if(i||!f)return;let e=Y(W);function r(){L.current=!0,ie.start(0,()=>{L.current=!1})}function a(e){let t=cn(e);cr(t)&&(B.current=t)}function o(r){let i=r.relatedTarget,a=r.currentTarget,o=cn(r);d&&i==null&&o!=null&&$(S,o)&&Xr(o),queueMicrotask(()=>{let s=T(),c=t.context.triggerElements,l=ce(),f=i?.hasAttribute(yr(`focus-guard`))&&[ee.current,te.current,F?.beforeInsideRef.current,F?.afterInsideRef.current,F?.beforeOutsideRef.current,F?.afterOutsideRef.current,Z(h),Z(m)].includes(i),p=!($(x,i)||$(S,i)||$(i,S)||$(F?.portalNode,i)||l.some(e=>e===i||$(e,i))||c.hasMatchingElement(e=>$(e,i))||f||P&&(_r(P.nodesRef.current,s).find(e=>$(e.context?.elements.floating,i)||$(e.context?.elements.domReference,i))||vr(P.nodesRef.current,s).find(e=>[e.context?.elements.floating,Nn(e.context?.elements.floating)].includes(i)||e.context?.elements.domReference===i)));if(a===x&&W&&$r(W),u&&a!==x&&!Jn(o)&&on(e)===e.body){if(n.g(W)&&(W.focus(),u===`popup`)){ae.request(()=>{W.focus()});return}let e=se(),t=B.current,r=(t&&e.includes(t)?t:null)||e[e.length-1]||W;n.g(r)&&r.focus()}if(w.current.insideReactTree){w.current.insideReactTree=!1;return}(O||!d)&&i&&p&&!L.current&&(O||i!==Zr())&&(I.current=!0,t.setOpen(!1,K(qe,r)))})}function s(){R.current||(w.current.insideReactTree=!0,re.start(0,()=>{w.current.insideReactTree=!1}))}let c=n.g(x)?x:null;if(!(!S&&!c))return Pn(c&&X(c,`focusout`,o),c&&X(c,`pointerdown`,r),S&&X(S,`focusin`,a),S&&X(S,`focusout`,o),S&&F&&X(S,`focusout`,s,!0))},[i,x,S,W,d,P,F,t,f,u,se,O,T,w,re,ie,ae,m,h,ce]),s.useEffect(()=>{if(i||!S||!y)return;let e=Array.from(F?.portalNode?.querySelectorAll(`[${yr(`portal`)}]`)||[]),t=(P?vr(P.nodesRef.current,T()):[]).find(e=>Mn(e.context?.elements.domReference||null))?.context?.elements.domReference,n=Mr([S,...e,ee.current,te.current,F?.beforeOutsideRef.current,F?.afterOutsideRef.current,...ce(),t,Z(h),Z(m),O?x:null].filter(e=>e!=null),{ariaHidden:d||O,mark:!1}),r=Mr([S,...e].filter(e=>e!=null));return()=>{r(),n()}},[y,i,x,S,d,F,O,P,T,m,h,ce]),D(()=>{if(!y||i||!n.g(W))return;V.current=``,H.current=``;let e=Y(W),t=on(e);queueMicrotask(()=>{let n=k.current,r=typeof n==`function`?n(M.current||``):n;if(r===void 0||r===!1||$(W,t))return;let i=null,a=()=>(i??=se(W),i[0]||W),o;o=r===!0||r===null?a():Z(r),o||=a();let s=$(W,on(e)),c=w.current.openEvent,l=c?.type===`mousedown`&&tn(c);xr(o,{sync:l,preventScroll:o===W,shouldFocus(){if(!N.current)return!1;if(s)return!0;let t=on(e);return!(t!==o&&$(W,t))}})})},[i,y,W,se,k,M,N,w]);let le=s.useRef(null);D(()=>{if(i||!W){le.current=null;return}le.current&&=(le.current.cancelled=!0,null);let e=Y(W),t=on(e),r=M.current==null;Xr(t);function a(e){if(e.open||(V.current=Kr(e.nativeEvent,H.current)),(e.reason===`focus-out`&&e.triggerElement?.hasAttribute(yr(`focus-guard`))||e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`)&&(I.current=!0),e.reason===`outside-press`)if(e.nested)I.current=!1;else if(tn(e.nativeEvent)||nn(e.nativeEvent))I.current=!1;else{let e=!1;Y(W).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?I.current=!1:I.current=!0}}C.on(`openchange`,a);function o(e){let i=A.current,a=typeof i==`function`?i(e):i;if(a===void 0||a===!1)return null;a===null&&(a=!0);let o=x?.isConnected?x:null,s=t?.isConnected&&n.d(t)!==`body`?t:null,c=r?s||o:o||s;return c||=Zr()||null,typeof a==`boolean`?c:Z(a)||c||null}return()=>{C.off(`openchange`,a);let t=on(e),r=ce(),i=$(S,t)||r.some(e=>e===t||$(e,t))||P&&_r(P.nodesRef.current,T(),!1).some(e=>$(e.context?.elements.floating,t)),s=A.current,c=V.current,l=o(c),u={cancelled:!1};le.current=u,queueMicrotask(()=>{le.current===u&&(le.current=null);let r=Qr(l),a=j.current??typeof s!=`boolean`;if(!u.cancelled&&s&&!I.current&&n.g(r)&&(!(!a&&r!==t&&t!==e.body)||i)){let e={preventScroll:!0};c===`keyboard`&&(e.focusVisible=!0),r.focus(e)}I.current=!1})}},[i,S,W,A,j,M,C,P,x,T,ce]),D(()=>{if(!zt||y||!S)return;let e=on(Y(S));!n.g(e)||!An(e)||$(S,e)&&e.blur()},[y,S]),D(()=>{if(!(i||!F))return F.setFocusManagerState({modal:d,closeOnFocusOut:f,open:y,onOpenChange:t.setOpen,domReference:x}),()=>{F.setFocusManagerState(null)}},[i,F,d,y,t,f,x]),D(()=>{if(!(i||!W))return $r(W),()=>{queueMicrotask(Yr)}},[i,W]);let ue=!i&&(d?!O:!0)&&(oe||d);return(0,l.jsxs)(s.Fragment,{children:[ue&&(0,l.jsx)(Rn,{"data-type":`inside`,ref:ne,onFocus:e=>{if(d){let e=se();xr(e[e.length-1])}else F?.portalNode&&(I.current=!1,mr(e,F.portalNode)?fr(x)?.focus():Z(h??F.beforeOutsideRef)?.focus())}}),r,ue&&(0,l.jsx)(Rn,{"data-type":`inside`,ref:U,onFocus:e=>{d?xr(se()[0]):F?.portalNode&&(f&&(I.current=!0),mr(e,F.portalNode)?pr(x)?.focus():Z(m??F.afterOutsideRef)?.focus())}})]})}function ti(e,t={}){let{enabled:n=!0,event:r=`click`,toggle:i=!0,ignoreMouse:a=!1,stickIfOpen:o=!0,touchOpenDelay:c=0,reason:l=Re}=t,u=e.context.dataRef,d=s.useRef(void 0),f=at(),p=bt(),m=s.useMemo(()=>{function t(t,n,r,i){let a=K(l,n,r);t&&i===`touch`&&c>0?p.start(c,()=>{e.setOpen(!0,a)}):e.setOpen(t,a)}function n(t,n,r){let a=u.current.openEvent,s=e.select(`domReferenceElement`)!==n;return t&&s||!t||!i?!0:a&&(typeof o==`function`?o():o)?!r(a.type):!1}return{onPointerDown(e){d.current=rn(e.pointerType,!0)&&nn(e.nativeEvent)?`virtual`:e.pointerType},onMouseDown(i){let o=d.current,s=i.nativeEvent,c=e.select(`open`);if(i.button!==0||r===`click`||rn(o,!0)&&a)return;let l=n(c,i.currentTarget,e=>e===`click`||e===`mousedown`),u=cn(s),p=An(u);if(p||o===`virtual`){t(l,s,p?u:i.currentTarget,o);return}let m=i.currentTarget;f.request(()=>{t(l,s,m,o)})},onClick(i){if(r===`mousedown-only`)return;let o=d.current;if(r===`mousedown`&&o){d.current=void 0;return}rn(o,!0)&&a||t(n(e.select(`open`),i.currentTarget,e=>e===`click`||e===`mousedown`||e===`keydown`||e===`keyup`),i.nativeEvent,i.currentTarget,o)},onKeyDown(){d.current=void 0}}},[u,r,a,l,e,o,i,f,p,c]);return s.useMemo(()=>n?{reference:m}:E,[n,m])}function ni(){return!1}function ri(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function ii(e,t={}){let{enabled:r=!0,escapeKey:i=!0,outsidePress:a=!0,outsidePressEvent:o=`sloppy`,referencePress:c=ni,bubbles:l,externalTree:u}=t,d=e.useState(`open`),f=e.useState(`floatingElement`),{dataRef:p,events:m}=e.context,h=Gr(u),g=b(typeof a==`function`?a:()=>!1),_=typeof a==`function`?g:a,v=_!==!1,y=b(()=>o),{escapeKey:x,outsidePress:S}=ri(l),C=s.useRef(!1),w=s.useRef(!1),T=s.useRef(!1),E=s.useRef(!1),D=s.useRef(!1),O=s.useRef(``),k=s.useRef(null),A=bt(),j=bt(),M=bt(),N=b(()=>{j.clear(),p.current.insideReactTree=!1}),P=b(e=>{let t=p.current.floatingContext?.nodeId;return(h?_r(h.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),F=b(t=>On(t,e.select(`floatingElement`))||On(t,e.select(`domReferenceElement`))),I=b(t=>{c()&&e.setOpen(!1,K(Re,t.nativeEvent))}),L=b(t=>{if(!d||!r||!i||t.key!==`Escape`)return;let n=en(t)?t.nativeEvent:t;if(D.current||n.isComposing||!x&&P(`__escapeKeyBubbles`))return;let a=K(Je,n);e.setOpen(!1,a),a.isCanceled||t.preventDefault(),!x&&!a.isPropagationAllowed&&t.stopPropagation()}),R=b(()=>{p.current.insideReactTree=!0,j.start(0,N)}),z=b(t=>{if(!d||!r||t.button!==0)return;let n=cn(t.nativeEvent);$(e.select(`floatingElement`),n)&&(C.current||(C.current=!0,w.current=!1))}),B=b(e=>{!d||!r||(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&C.current&&(w.current=!0)});s.useEffect(()=>{function e(e){e.open||(E.current=!1)}return m.on(`openchange`,e),()=>{m.off(`openchange`,e)}},[m]),s.useEffect(()=>N,[N]),s.useEffect(()=>{if(!d||!r)return d||(E.current=!1,D.current=!1,O.current=``,k.current=null),N;p.current.__escapeKeyBubbles=x,p.current.__outsidePressBubbles=S;let t=new yt,a=Y(f);function o(){M.clear(),D.current=!0}function s(){D.current=!0,M.start(zt?5:0,()=>{D.current=!1})}function c(){T.current=!0,t.start(0,()=>{T.current=!1})}function l(){C.current=!1,w.current=!1}function u(){let e=O.current,t=e===`pen`||!e?`mouse`:e,n=y(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function m(e){let t=u();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function g(e){let t=p.current.floatingContext?.nodeId,n=h&&_r(h.nodesRef.current,t).some(t=>On(e,t.context?.elements.floating));return F(e)||n}function b(r){if(m(r)){r.type!==`click`&&!F(r)&&(t.clear(),T.current=!1),N();return}if(p.current.insideReactTree){N();return}let i=cn(r),a=`[${yr(`inert`)}]`,o=n.h(i)?i.getRootNode():null,s=Array.from((n.b(o)?o:Y(e.select(`floatingElement`))).querySelectorAll(a)),c=e.context.triggerElements;if(i&&(c.hasElement(i)||c.hasMatchingElement(e=>$(e,i))))return;let l=n.h(i)?i:null;for(;l&&!n._(l);){let e=n.p(l);if(n._(e)||!n.h(e))break;l=e}if(!(s.length&&n.h(i)&&!kn(i)&&!$(i,e.select(`floatingElement`))&&s.every(e=>!$(l,e)))){if(n.g(i)&&!(`touches`in r)){let e=n._(i),t=n.u(i),a=/auto|scroll/,o=e||a.test(t.overflowX),s=e||a.test(t.overflowY),c=o&&i.clientWidth>0&&i.scrollWidth>i.clientWidth,l=s&&i.clientHeight>0&&i.scrollHeight>i.clientHeight,u=t.direction===`rtl`,d=l&&(u?r.offsetX<=i.offsetWidth-i.clientWidth:r.offsetX>i.clientWidth),f=c&&r.offsetY>i.clientHeight;if(d||f)return}if(!g(r)){if(u()===`intentional`){if(r.detail!==0&&!tn(r)&&!E.current)return;if(T.current){t.clear(),T.current=!1;return}}typeof _==`function`&&!_(r)||P(`__outsidePressBubbles`)||(e.setOpen(!1,K(ze,r)),N())}}}function j(t){u()!==`sloppy`||t.pointerType===`touch`||!e.select(`open`)||!r||F(t)||b(t)}function I(t){if(u()!==`sloppy`||!e.select(`open`)||!r||F(t))return;let n=t.touches[0];n&&(k.current={startTime:Date.now(),startX:n.clientX,startY:n.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},A.start(1e3,()=>{k.current&&(k.current.dismissOnTouchEnd=!1,k.current.dismissOnMouseDown=!1)}))}function R(e,t){let n=cn(e);if(!n)return;let r=X(n,e.type,()=>{t(e),r()})}function z(e){O.current=`touch`,R(e,I)}function B(e){A.clear(),e.type===`pointerdown`&&(e.button===0&&(E.current=!0),O.current=e.pointerType),!(e.type===`mousedown`&&k.current&&!k.current.dismissOnMouseDown)&&R(e,e=>{e.type===`pointerdown`?j(e):b(e)})}function V(e){if(e.type===`pointercancel`&&(E.current=!1),!C.current)return;let n=w.current;if(l(),u()===`intentional`){if(e.type===`pointercancel`){n&&c();return}if(!g(e)){if(n){c();return}typeof _==`function`&&!_(e)||(t.clear(),T.current=!0,N())}}}function H(e){if(u()!==`sloppy`||!k.current||F(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-k.current.startX),r=Math.abs(t.clientY-k.current.startY),i=Math.sqrt(n*n+r*r);i>5&&(k.current.dismissOnTouchEnd=!0),i>10&&(b(e),A.clear(),k.current=null)}function ee(e){R(e,H)}function te(e){u()!==`sloppy`||!k.current||F(e)||(k.current.dismissOnTouchEnd&&b(e),A.clear(),k.current=null)}function ne(e){R(e,te)}let U=Pn(i&&Pn(X(a,`keydown`,L),X(a,`compositionstart`,o),X(a,`compositionend`,s)),v&&Pn(X(a,`click`,B,!0),X(a,`pointerdown`,B,!0),X(a,`pointerup`,V,!0),X(a,`pointercancel`,V,!0),X(a,`mousedown`,B,!0),X(a,`mouseup`,V,!0),X(a,`touchstart`,z,{capture:!0,passive:!0}),X(a,`touchmove`,ee,{capture:!0,passive:!0}),X(a,`touchend`,ne,{capture:!0,passive:!0})));return()=>{U(),t.clear(),l(),T.current=!1}},[p,f,i,v,_,d,r,x,S,L,N,y,P,F,h,e,A,M]);let V=s.useMemo(()=>({onKeyDown:L,onPointerDown:I,onClick:I}),[L,I]),H=s.useMemo(()=>({onKeyDown:L,onPointerDown:B,onMouseDown:B,onClickCapture:R,onMouseDownCapture(e){R(),z(e)},onPointerDownCapture(e){R(),z(e)},onMouseUpCapture:R,onTouchEndCapture:R,onTouchMoveCapture:R}),[L,R,z,B]);return s.useMemo(()=>r?{reference:V,floating:H,trigger:V}:{},[r,V,H])}function ai(e){let{open:t,ref:n,preventUnmountOnClose:r,setPreventUnmountOnClose:i,onUnmount:a,animateInitialOpen:o}=e,c=b(i),{mounted:l,setMounted:u,transitionStatus:d}=ot(t,!1,!1,o),f=t?!1:r;D(()=>{t&&c(!1)},[t,c]);let p=s.useRef(l),m=s.useRef(!1),h=Ae(),g=()=>{p.current=!1,u(!1),a()};D(()=>{p.current=l,m.current&&(m.current=!1,!t&&l&&g())});let _=b(()=>{if(p.current){if(t){m.current=!0,h();return}g()}});return Dt({enabled:l&&!t&&!f,open:t,ref:n,onComplete(){t||_()}}),{mounted:l,transitionStatus:d,preventUnmountingOnClose:f,forceUnmount:_}}var oi={tabIndex:-1,[ln]:``};function si(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}var ci;function li(e){ci??=new WeakMap;let t=ci.get(e);return t||(t=new WeakMap,ci.set(e,t)),t}var ui=class{idMap=new Map;add(e,t){if(process.env.NODE_ENV!==`production`){let n=li(this),r=n.get(t);if(r!==void 0&&r!==e)throw Error(`Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap.`);let i=this.idMap.get(e);i!==void 0&&i!==t&&n.delete(i),n.set(t,e)}this.idMap.set(e,t)}delete(e){if(process.env.NODE_ENV!==`production`){let t=this.idMap.get(e);t!==void 0&&ci?.get(this)?.delete(t)}this.idMap.delete(e)}hasElement(e){for(let t of this.idMap.values())if(t===e)return!0;return!1}hasMatchingElement(e){for(let t of this.idMap.values())if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}},di=e.t((e=>{var t=require("react");function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),fi=e.t((e=>{process.env.NODE_ENV!==`production`&&(function(){function t(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}function n(e,t){d||a.startTransition===void 0||(d=!0,console.error(`You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release.`));var n=t();if(!f){var i=t();o(n,i)||(console.error(`The result of getSnapshot should be cached to avoid an infinite loop`),f=!0)}i=s({inst:{value:n,getSnapshot:t}});var p=i[0].inst,m=i[1];return l(function(){p.value=n,p.getSnapshot=t,r(p)&&m({inst:p})},[e,n,t]),c(function(){return r(p)&&m({inst:p}),e(function(){r(p)&&m({inst:p})})},[e]),u(n),n}function r(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!o(e,n)}catch{return!0}}function i(e,t){return t()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==`function`&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var a=require("react"),o=typeof Object.is==`function`?Object.is:t,s=a.useState,c=a.useEffect,l=a.useLayoutEffect,u=a.useDebugValue,d=!1,f=!1,p=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?i:n;e.useSyncExternalStore=a.useSyncExternalStore===void 0?p:a.useSyncExternalStore,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==`function`&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()})),pi=e.t(((e,t)=>{process.env.NODE_ENV===`production`?t.exports=di():t.exports=fi()})),mi=e.t((e=>{var t=require("react"),n=pi();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),hi=e.t((e=>{process.env.NODE_ENV!==`production`&&(function(){function t(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==`function`&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var n=require("react"),r=pi(),i=typeof Object.is==`function`?Object.is:t,a=r.useSyncExternalStore,o=n.useRef,s=n.useEffect,c=n.useMemo,l=n.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==`function`&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()})),gi=e.t(((e,t)=>{process.env.NODE_ENV===`production`?t.exports=mi():t.exports=hi()})),_i=pi(),vi=gi(),yi=[],bi=void 0;function xi(){return bi}function Si(e){yi.push(e)}var Ci=U(19)?Ei:Di;function wi(e,t,n,r,i){return Ci(e,t,n,r,i)}function Ti(e,t,n,r,i){let a=s.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,_i.useSyncExternalStore)(e.subscribe,a,a)}Si({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,i)||(t=!0,r.value=i)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,_i.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function Ei(e,t,n,r,i){let a=xi();if(!a)return Ti(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],(s.store!==e||s.selector!==t||!Object.is(s.a1,n)||!Object.is(s.a2,r)||!Object.is(s.a3,i))&&(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.value=t(e.getSnapshot(),n,r,i))):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i)},a.syncHooks.push(s)),s.value}function Di(e,t,n,r,i){return(0,vi.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var Oi=class{static create(e){return new this(e)}constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return wi(this,e,t,n,r)}},ki=class extends Oi{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){s.useDebugValue(e);let n=this;D(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;D(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;if(process.env.NODE_ENV!==`production`){s.useDebugValue(e,e=>Object.keys(e));let t=s.useRef(Object.keys(e)).current,n=Object.keys(e);(t.length!==n.length||t.some((e,t)=>e!==n[t]))&&console.error(`ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.`)}D(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){s.useDebugValue(e);let n=this,r=t!==void 0;if(D(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r]),process.env.NODE_ENV!==`production`){let t=this.controlledValues??=new Map;t.has(e)||t.set(e,r);let n=t.get(e);n!==void 0&&n!==r&&console.error(`A component is changing the ${n?``:`un`}controlled state of ${e.toString()} to be ${n?`un`:``}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`)}}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return s.useDebugValue(e),wi(this,this.selectors[e],t,n,r)}useContextCallback(e,t){s.useDebugValue(e);let n=b(t??w);this.context[e]=n}useStateSetter(e){let t=s.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},Ai={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},ji=class extends ki{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:Vr(),nested:n,triggerElements:i},Ai),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&an(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)};setOpen=(e,t)=>{if(this.syncOnly){this.context.onOpenChange?.(e,t);return}this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}};function Mi(e){let{open:t=!1,onOpenChange:r,elements:i={}}=e,a=Pe(),o=Wr()!=null;if(process.env.NODE_ENV!==`production`){let e=i.reference;e&&!n.h(e)&&console.error("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `context.setPositionReference()`",`instead.`)}let s=_(()=>new ji({open:t,transitionStatus:void 0,onOpenChange:r,referenceElement:i.reference??null,floatingElement:i.floating??null,triggerElements:new ui,floatingId:a,syncOnly:!1,nested:o})).current;return D(()=>{let e={open:t,floatingId:a};i.reference!==void 0&&(e.referenceElement=i.reference,e.domReferenceElement=n.h(i.reference)?i.reference:null),i.floating!==void 0&&(e.floatingElement=i.floating),s.update(e)},[t,a,i.reference,i.floating,s]),s.context.onOpenChange=r,s.context.nested=o,s}function Ni(e){return zt&&e.movementX===0&&e.movementY===0}function Pi(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function Fi(e,t){return Pi(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function Ii(e,t,n){return Pi(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function Li(e,t,n){return Pi(t,n?e===dn:e===fn,e===mn)}function Ri(e,t,n,r){return t===`both`||t===`horizontal`&&r?e===`Escape`:Pi(t,n?e===fn:e===dn,e===pn)}function zi(e,t){let{listRef:r,activeIndex:i,onNavigate:a=()=>{},enabled:o=!0,selectedIndex:c=null,allowEscape:l=!1,loopFocus:u=!1,nested:d=!1,rtl:f=!1,virtual:p=!1,focusItemOnOpen:m=`auto`,focusItemOnHover:h=!0,openOnArrowKeyDown:g=!0,disabledIndices:_=void 0,orientation:v=`vertical`,triggerOrientation:y=v,parentOrientation:x,id:S,resetOnPointerLeave:C=!0,externalTree:w,nestedReturnFocusRef:T,grid:E}=t,O=E!=null;process.env.NODE_ENV!==`production`&&(l&&(u||console.warn("`useListNavigation` looping must be enabled to allow escaping."),p||console.warn("`useListNavigation` must be virtual to allow escaping.")),v===`vertical`&&O&&console.warn("In grid list navigation mode, the `orientation` should",`be either "horizontal" or "both".`));let k=e.useState(`open`),A=e.useState(`floatingElement`),j=e.useState(`domReferenceElement`),M=e.context.dataRef,N=Nn(A),P=Mn(j),F=xt(N),I=Wr(),L=Gr(w),R=s.useRef(m),z=s.useRef(c??-1),B=s.useRef(null),V=s.useRef(!0),H=b(e=>{a(z.current===-1?null:z.current,e)}),ee=s.useRef(!!A),te=s.useRef(k),ne=s.useRef(!1),U=s.useRef(!1),re=s.useRef(null),ie=xt(_),ae=xt(k),oe=xt(c),W=xt(C),se=at(),ce=at(),le=b(()=>{se.cancel();function e(e){p||(re.current=xr(e,{sync:ne.current,preventScroll:!0}))}let t=r.current[z.current],n=U.current;t&&e(t),(ne.current?e=>e():e=>se.request(e))(()=>{let i=r.current[z.current]||t;i&&(t||e(i),he&&(n||!V.current)&&i.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});D(()=>{M.current.orientation=v},[M,v]),D(()=>{k||(B.current=null),(!k||m!==`auto`)&&(R.current=m)},[k,m]),D(()=>{o&&(k&&A?(z.current=c??-1,R.current&&c!=null&&(U.current=!0,H())):ee.current&&(z.current=-1,H()))},[o,k,A,c,H]),D(()=>{if(o){if(!k){ne.current=!1;return}if(A)if(i==null){if(ne.current=!1,oe.current!=null)return;if(ee.current&&(z.current=-1,le()),(!te.current||!ee.current)&&R.current&&(B.current!=null||R.current===!0&&B.current==null)){let e=0,t=()=>{r.current[0]==null?(e<2&&(e?e=>ce.request(e):queueMicrotask)(t),e+=1):(z.current=B.current==null||Ii(B.current,y,f)||d?Vn(r):Hn(r),B.current=null,H())};t()}}else Bn(r.current,i)||(z.current=i,le(),U.current=!1)}},[o,k,A,i,oe,d,r,y,f,H,le,ce]),D(()=>{if(!o||A||!L||p||!ee.current)return;let e=L.nodesRef.current,t=e.find(e=>e.id===I)?.context?.elements.floating,n=on(Y(j??t??null)),r=e.some(e=>e.context&&$(e.context.elements.floating,n));t&&!r&&V.current&&t.focus({preventScroll:!0})},[o,A,j,L,I,p]),D(()=>{te.current=k,ee.current=!!A});let ue=i!=null,de=b(e=>{if(!ae.current)return;let t=r.current.indexOf(e.currentTarget);t!==-1&&(z.current!==t||i!==t)&&(z.current=t,H(e))}),fe=b(()=>x??L?.nodesRef.current.find(e=>e.id===I)?.context?.dataRef?.current.orientation),pe=b(()=>Vn(r,ie.current)),me=b(t=>{if(V.current=!1,ne.current=!0,t.which===229||!ae.current&&t.currentTarget===F.current)return;if(d&&Ri(t.key,v,f,O)){Fi(t.key,fe())||Q(t),e.setOpen(!1,K(Ye,t.nativeEvent));let r=T?.current??j;n.g(r)&&r.focus();return}i!=null&&i!==z.current&&!Bn(r.current,i)&&(z.current=i);let a=z.current,o=Vn(r,_),s=Hn(r,_);if(P||(t.key===`Home`&&(Q(t),z.current=o,H(t)),t.key===`End`&&(Q(t),z.current=s,H(t))),E!=null){let e=E(t,z.current,r,v,u,f,_,o,s);if(e!=null&&e!==z.current&&(z.current=e,H(t)),v===`both`)return}if(Fi(t.key,v)){Q(t);let e=on(t.currentTarget.ownerDocument);if(k&&!p&&$(t.currentTarget,e)&&!r.current.some(t=>t!=null&&$(t,e))){z.current=Ii(t.key,v,f)?o:s,H(t),i===z.current&&le();return}let{index:n,wrapped:c}=Un(r.current,a,{decrement:!Ii(t.key,v,f),loopFocus:u,allowEscape:l,disabledIndices:_,minIndex:o,maxIndex:s});c&&(ne.current=!1),z.current=n,H(t)}}),he=s.useMemo(()=>({onFocus(e){ne.current=!0,de(e)},onClick({currentTarget:e}){p||e.focus({preventScroll:!0})},onMouseMove(e){Ni(e)||(ne.current=!0,U.current=!1,h&&de(e))},onPointerLeave(e){if(!ae.current||!V.current||e.pointerType===`touch`)return;ne.current=!0;let t=e.relatedTarget;if(!(!h||r.current.includes(t))&&W.current&&(re.current?.(),re.current=null,z.current=-1,H(e),!p)){let e=F.current,t=on(Y(e));e&&$(e,t)&&e.focus({preventScroll:!0})}}}),[de,ae,F,h,r,H,W,p]),ge=s.useMemo(()=>p&&k&&ue&&{"aria-activedescendant":`${S}-${i}`},[p,k,ue,S,i]),_e=s.useMemo(()=>({...P?{}:ge,onKeyDown(t){if(t.key===`Tab`&&t.shiftKey&&k&&!p){let r=cn(t.nativeEvent);if(r&&!$(F.current,r))return;Q(t);let i=K(qe,t.nativeEvent);e.setOpen(!1,i);let a=T?.current??j;!i.isCanceled&&n.g(a)&&a.focus();return}me(t)},onPointerMove(e){Ni(e)||(V.current=!0)}}),[ge,me,F,P,e,k,p,j,T]),ve=s.useMemo(()=>{function t(t){e.setOpen(!0,K(Ye,t.nativeEvent,t.currentTarget))}function n(e){m===`auto`&&tn(e.nativeEvent)&&(R.current=!p)}function r(e){R.current=m,m===`auto`&&nn(e.nativeEvent)&&(R.current=!0)}return{onKeyDown(n){let r=e.select(`open`);V.current=!1;let i=n.key.startsWith(`Arrow`),a=Li(n.key,fe(),f),o=Fi(n.key,r?v:y),s=(d?a:o)||n.key===`Enter`||n.key.trim()===``;if(p&&r&&(!d||An(n.currentTarget)))return me(n);if(!(!r&&!g&&i)){if(s){let e=Fi(n.key,fe());B.current=d&&e?null:n.key}if(d){a&&(Q(n),r?(z.current=pe(),H(n),p&&F.current?.focus()):t(n));return}o&&(oe.current!=null&&(z.current=oe.current),Q(n),!r&&g?t(n):me(n),r&&H(n))}},onFocus(t){t.target===t.currentTarget&&e.select(`open`)&&!p&&(z.current=-1,H(t))},onPointerDown:r,onPointerEnter:r,onMouseDown:n,onClick:n}},[me,m,pe,d,H,e,g,v,y,fe,f,oe,p,F]),ye=s.useMemo(()=>({...ge,...ve}),[ge,ve]);return s.useMemo(()=>o?{reference:ye,floating:_e,item:he,trigger:ve}:{},[o,ye,_e,ve,he])}function Bi(e,t){let{listRef:n,elementsRef:r,activeIndex:i,onMatch:a,disabledIndices:o,onTyping:c,enabled:l=!0,resetMs:u=750,selectedIndex:d=null}=t,f=b(c),p=e.useState(`open`),m=bt(),h=s.useRef(``),g=s.useRef(d??i??-1),_=s.useRef(null),v=b(e=>{function t(e){return r?.current[e]}function s(e){let n=t(e);return n&&!Jn(n)||n?.matches(`:disabled`)?!1:o==null||!Kn(T,e,o)}function c(e,t,n=0){if(e.length===0)return-1;let r=(n%e.length+e.length)%e.length,i=t.toLowerCase();for(let t=0;t<e.length;t+=1){let n=(r+t)%e.length;if(!(!e[n]?.toLowerCase().startsWith(i)||!s(n)))return n}return-1}let l=n.current;if(h.current.length>0&&e.key===` `&&(Q(e),f?.(!0)),h.current.length>0&&h.current[0]!==` `&&c(l,h.current)===-1&&e.key!==` `&&f?.(!1),l==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;p&&e.key!==` `&&(Q(e),f?.(!0));let v=h.current===``;v&&(g.current=d??i??-1),l.every((e,t)=>e&&s(t)?e[0]?.toLowerCase()!==e[1]?.toLowerCase():!0)&&h.current===e.key&&(h.current=``,g.current=_.current),h.current+=e.key,m.start(u,()=>{h.current=``,g.current=_.current,f?.(!1)});let y=((v?d??i??-1:g.current)??0)+1,b=c(l,h.current,y);b===-1?e.key!==` `&&(h.current=``,f?.(!1)):(a?.(b,e),_.current=b)}),y=b(t=>{let n=t.relatedTarget,r=e.select(`domReferenceElement`),i=e.select(`floatingElement`);$(r,n)||$(i,n)||(m.clear(),h.current=``,g.current=_.current,f?.(!1))});D(()=>{!p&&d!==null||(m.clear(),_.current=null,h.current!==``&&(h.current=``,f?.(!1)))},[p,d,m,f]);let x=s.useMemo(()=>({onKeyDown:v,onBlur:y}),[v,y]);return s.useMemo(()=>l?{reference:x,floating:x}:{},[l,x])}function Vi(e){return U(19)?e:e?`true`:void 0}var Hi=s.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,l.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})});process.env.NODE_ENV!==`production`&&(Hi.displayName=`InternalBackdrop`);function Ui(e){let t=s.useRef(``),n=s.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:s.useCallback(n=>{if(n.detail===0){e(n,`keyboard`);return}`pointerType`in n?e(n,n.pointerType):e(n,t.current),t.current=``},[e]),onPointerDown:n}}function Wi(e,t){let n=s.useRef(e),r=b(t);D(()=>{n.current!==e&&r(n.current),n.current=e},[e,r])}function Gi(e,t){let{onClick:n,onPointerDown:r}=Ui(b((n,r)=>{(typeof e==`function`?e():e)||t(r||(Pt?`touch`:``))}));return s.useMemo(()=>({onClick:n,onPointerDown:r}),[n,r])}function Ki(e){let[t,n]=s.useState(null),r=Gi(e,n);return Wi(e,t=>{t&&!e&&n(null)}),s.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}function qi(e){let t=s.useRef(!0);t.current&&(t.current=!1,e())}function Ji(e,t,n,r,i,a,o,s,c,l=2){let u=Gn(n.current,{event:e,orientation:r,loopFocus:i,rtl:a,cols:l,disabledIndices:o,minIndex:s,maxIndex:c,prevIndex:t>c?s:t,stopEvent:!0});return Bn(n.current,u)?void 0:u}function Yi(e){return e==null?Le:e.type.startsWith(`key`)?Xe:e.type.startsWith(`mouse`)||e.type.startsWith(`pointer`)?Ze:Le}var Xi=s.createContext(void 0);process.env.NODE_ENV!==`production`&&(Xi.displayName=`ComboboxRootContext`);var Zi=s.createContext(void 0);process.env.NODE_ENV!==`production`&&(Zi.displayName=`ComboboxFloatingContext`);var Qi=s.createContext(void 0);process.env.NODE_ENV!==`production`&&(Qi.displayName=`ComboboxDerivedItemsContext`);var $i=s.createContext(!1);process.env.NODE_ENV!==`production`&&($i.displayName=`ComboboxHasItemsContext`);var ea=s.createContext(``);process.env.NODE_ENV!==`production`&&(ea.displayName=`ComboboxInputValueContext`);function ta(){let e=s.useContext(Xi);if(!e)throw Error(process.env.NODE_ENV===`production`?R(22):`Base UI: ComboboxRootContext is missing. Combobox parts must be placed within <Combobox.Root>.`);return e}function na(){let e=s.useContext(Zi);if(!e)throw Error(process.env.NODE_ENV===`production`?R(23):`Base UI: ComboboxFloatingContext is missing. Combobox parts must be placed within <Combobox.Root>.`);return e}function ra(){let e=s.useContext(Qi);if(!e)throw Error(process.env.NODE_ENV===`production`?R(24):`Base UI: ComboboxItemsContext is missing. Combobox parts must be placed within <Combobox.Root>.`);return e}function ia(){return s.useContext(ea)}function aa(){return s.useContext($i)}function oa(e,t,n=Object.is){let{length:r}=e;if(r!==t.length)return!1;for(let i=0;i<r;i+=1)if(!n(e[i],t[i]))return!1;return!0}var sa=(e,t)=>Object.is(e,t);function ca(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function la(e,t,n){return Array.isArray(e)&&Array.isArray(t)?!oa(e,t,(e,t)=>ca(e,t,n)):e!==t}function ua(e,t,n){return e?e.some(e=>e===void 0?!1:ca(t,e,n)):!1}function da(e,t,n){return e?e.findIndex(e=>e===void 0?!1:ca(e,t,n)):-1}function fa(e,t){if(t!==sa)return n=>ua(e,n,t);let n=new Set(e);return n.delete(void 0),t=>n.has(t)&&(t!==0||e.some(e=>Object.is(t,e)))}function pa(e,t,n,r){let i=r&&Array.isArray(t)?e.findIndex(fa(t,n)):da(e,t,n);return i===-1?null:i}function ma(e,t,n,r,i,a){return ua(r,t,i)?a!=null&&e>a&&ua(r,n[a],i)?a:e:e===a?pa(n,r,i,!0):a}function ha(e,t,n){return e.filter(e=>!ca(t,e,n))}function ga(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function _a(e){return typeof e==`object`&&!!e&&Array.isArray(e.items)}function va(e){return _a(e?.[0])}function ya(e){return va(e)?e.flatMap(e=>e.items):e}function ba(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(va(t)){for(let e of t)for(let t of e.items)if(t&&t.value==null&&t.label!=null)return!0;return!1}for(let e of t)if(e&&e.value==null&&e.label!=null)return!0;return!1}function xa(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 ga(e)}function Sa(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?ga(e.value):ga(e)}function Ca(e,t,n){function r(){return xa(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e==`object`&&`label`in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return(Object.hasOwn(t,e)?t[e]:void 0)??r();if(Array.isArray(t)){let n=ya(t);if(typeof e!=`object`||!e){let t=n.find(t=>t.value===e);return t&&t.label!=null?t.label:r()}if(`value`in e){let t=n.find(t=>t&&t.value===e.value);if(t&&t.label!=null)return t.label}}return r()}function wa(e,t,n){return e.reduce((e,r,i)=>(i>0&&e.push(`, `),e.push((0,l.jsx)(s.Fragment,{children:Ca(r,t,n)},i)),e),[])}var Ta={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:n}=e;return t==null?!1:n===`multiple`&&Array.isArray(t)?t.length>0:!0},hasNullItemLabel:(e,t)=>t?ba(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 n=e.isItemEqualToValue,r=e.selectedValue;return Array.isArray(r)?r.some(e=>ca(t,e,n)):ca(t,r,n)},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},Ea=`data-valid`,Da=`data-invalid`,Oa={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},ka={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},Aa={disabled:!1,...ka},ja={valid(e){return e===null?null:e?{[Ea]:``}:{[Da]:``}}},Ma={invalid:void 0,name:void 0,validityData:{state:Oa,errors:[],error:``,value:``,initialValue:null},setValidityData:w,disabled:void 0,setTouched:w,setDirty:w,setFilled:w,setFocused:w,focusOwnerRef:{current:void 0},validationMode:`onSubmit`,shouldValidateOnChange:()=>!1,state:Aa,registerFieldControl:w,validation:{getValidationProps:(e,t=E)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:w,getInputControl:()=>null,commit:async()=>{},change:w}},Na=s.createContext(Ma);process.env.NODE_ENV!==`production`&&(Na.displayName=`FieldRootContext`);function Pa(e=!0){let t=s.useContext(Na);if(t.setValidityData===w&&!e)throw Error(process.env.NODE_ENV===`production`?R(28):`Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.`);return t}function Fa(e,t,n,r,i=!0,a){let{registerFieldControl:o}=Pa(),s=_(()=>Symbol());D(()=>{let c=s.current;if(!i){o(c,void 0);return}o(c,{controlRef:e,getValue:r,id:t,name:a,value:n})},[e,i,r,t,a,o,s,n]),D(()=>{let e=s.current;return()=>{o(e,void 0)}},[o,s])}var Ia=s.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:w,validationMode:`onSubmit`,submitCountRef:{current:0}});process.env.NODE_ENV!==`production`&&(Ia.displayName=`FormContext`);function La(){return s.useContext(Ia)}var Ra=s.createContext({controlId:void 0,registerControlId:w,resetControlId:w,labelId:void 0,setLabelId:w,messageIds:[],setMessageIds:w,getDescriptionProps:e=>e});process.env.NODE_ENV!==`production`&&(Ra.displayName=`LabelableContext`);function za(){return s.useContext(Ra)}function Ba(e={}){let{id:t,enabled:n=!0}=e,{controlId:r,registerControlId:i,resetControlId:a}=za(),o=Fe(),c=_(()=>Symbol()),l=s.useRef(!1),u=s.useRef(!1),d=b(()=>{!l.current||i===w||(l.current=!1,i(c.current,void 0))});return D(()=>{if(!n||i===w){d();return}let e;if(t!==void 0)u.current=!0,e=t;else if(u.current)e=o;else{a();return}if(e===void 0){d();return}l.current=!0,i(c.current,e)},[t,n,i,a,o,c,d]),D(()=>d,[d]),(n?r:void 0)??t??o}function Va(e){return e==null?void 0:`${e}-popup`}function Ha(e,t){return(n,r)=>n==null?!1:e.contains(n,r,t)}function Ua(e){return Array.isArray(e)?e.map(e=>Ua(e)).join(`,`):e==null?``:String(e)}var Wa=new Map;function Ga(e={}){let{locale:t,...n}=e,r={usage:`search`,sensitivity:`base`,ignorePunctuation:!0,...n},i=`${Ua(t)}|${JSON.stringify(r)}`,a=Wa.get(i);if(a)return a;let o=new Intl.Collator(t,r),s={contains(e,t,n){if(!t)return!0;let r=xa(e,n);for(let e=0;e<=r.length-t.length;e+=1)if(o.compare(r.slice(e,e+t.length),t)===0)return!0;return!1},startsWith(e,t,n){if(!t)return!0;let r=xa(e,n);return o.compare(r.slice(0,t.length),t)===0},endsWith(e,t,n){if(!t)return!0;let r=xa(e,n),i=t.length;return r.length>=i&&o.compare(r.slice(r.length-i),t)===0}};return Wa.set(i,s),s}var Ka=Ga;function qa(e,t=!1){let{overflowY:r}=n.u(e);return r!==`auto`&&r!==`scroll`?!1:t?e.clientHeight>0:e.scrollHeight>e.clientHeight}var Ja=Symbol(`none`),Ya={value:Ja,index:-1},Xa=s.createContext(void 0);process.env.NODE_ENV!==`production`&&(Xa.displayName=`DirectionContext`);function Za(){return s.useContext(Xa)?.direction??`ltr`}function Qa(e,t,n){let r=e.get(t);if(r!==void 0||n===sa)return r;for(let[r,i]of e)if(ca(r,t,n))return i}function $a(e){let{id:t,onOpenChangeComplete:r,defaultSelectedValue:i=null,selectedValue:a,onSelectedValueChange:o,defaultInputValue:c,inputValue:u,open:d,defaultOpen:f=!1,selectionMode:m,onItemHighlighted:h,name:g,form:v,disabled:y=!1,readOnly:x=!1,required:S=!1,inputRef:C,grid:O=!1,items:k,filteredItems:A,filter:j,filterQuery:M,openOnInputClick:N=!0,autoHighlight:P=!1,keepHighlight:F=!1,highlightItemOnHover:I=!0,loopFocus:L=!0,itemToStringLabel:B,itemToStringValue:V,isItemEqualToValue:H=sa,virtualized:ee=!1,inline:te=!1,fillInputOnItemPress:ne=!0,modal:U=!1,limit:re=-1,autoComplete:ie=`list`,formAutoComplete:ae,locale:oe,submitOnItemClick:W=!1}=e,{clearErrors:se}=La(),{setDirty:le,validityData:ue,setFilled:de,name:fe,disabled:pe,setTouched:me,setFocused:he,validationMode:ge,validation:_e}=Pa(),ve=Za(),ye=Ba({id:t}),be=Ka({locale:oe}),G=Array.isArray(k)?null:k;if(G&&typeof G.label!=`function`)throw Error(process.env.NODE_ENV===`production`?R(100):"Base UI: the `items` prop received an object that is not a collection, so its items cannot be read. Pass an array of items, an array of groups with items, or the result of `createItems()`. See https://base-ui.com/react/components/combobox#createitems");let xe=G?G.data:k,Se=G?.value,Ce=Se?void 0:xe,we=s.useMemo(()=>{if(!A||!Se)return;let e=ya(A),t=e.map(Se),n;return{values:t,findItem(r,i){if(!n){n=new Map;for(let r=0;r<t.length;r+=1)n.has(t[r])||n.set(t[r],e[r])}return Qa(n,r,i)}}},[A,Se]),Te=s.useMemo(()=>G?e=>G.label(e,H,e=>{let t=we?.findItem(e,H);return t==null?xa(e,B):G.itemLabel(t)}):B,[G,B,we,H]),Ee=s.useMemo(()=>G?Object.assign(e=>G.itemLabel(e),{selected:e=>xa(e,Te)}):B,[G,Te,B]);function De(e){return xa(e,Te)}let[Oe,ke]=s.useState(!1),[Ae,je]=s.useState(null),Me=s.useRef(Ae),Ne=s.useRef([]),Pe=s.useRef([]),Fe=s.useRef(null),Re=s.useRef(null),ze=s.useRef(null),Ve=s.useRef(null),He=s.useRef(null),Ue=s.useRef(!1),qe=s.useRef(null),Je=s.useRef(null),Ye=s.useRef(null),Xe=s.useRef(Ya),Ze=s.useRef(null),Qe=s.useRef([]),et=s.useRef(null),tt=pe||y,nt=fe??g,rt=m===`multiple`,it=m===`single`,at=u!==void 0||c!==void 0,ot=xe!==void 0,st=A!==void 0,ct;ct=P===`always`?`always`:P?`input-change`:!1;let[q,lt]=p({controlled:a,default:rt?i??T:i,name:`Combobox`,state:`selectedValue`}),ut=s.useMemo(()=>j===null?()=>!0:j===void 0?Ha(be,Ee):j,[j,be,Ee]),dt=_(()=>at?c??``:it?De(q):``).current,[ft,pt]=p({controlled:u,default:dt,name:`Combobox`,state:`inputValue`}),[J,Y]=p({controlled:d,default:f,name:`Combobox`,state:`open`}),mt=va(xe),ht=!J&&Ae!==null?Ae:String(ft).trim(),gt=it?De(q):``,_t=it&&!Oe&&ht!==``&>.length===ht.length&&be.contains(gt,ht),X=_t?``:M??ht,vt=ot&&st&&_t&&(!G||G.hasValue(q,H)),yt=s.useMemo(()=>xe?ya(xe):T,[xe]),bt=s.useMemo(()=>{if(A&&!vt)return A;if(!xe)return T;if(mt){let e=xe,t=[],n=0;for(let r of e){if(re>-1&&n>=re)break;let e=re>-1?re-n:1/0,i=X===``?r.items.slice(0,e):[];if(X!==``)for(let t of r.items){if(i.length>=e)break;ut(t,X,Ee)&&i.push(t)}if(i.length>0){let e={...r,items:i};t.push(e),n+=i.length}}return t}if(X===``)return re>-1?yt.slice(0,re):yt;let e=[];for(let t of yt){if(re>-1&&e.length>=re)break;ut(t,X,Ee)&&e.push(t)}return e},[A,vt,xe,mt,X,re,ut,Ee,yt]),St=s.useMemo(()=>{if(we&&bt===A)return we.values;let e=ya(bt);return Se?e.map(e=>Se(e)):e},[bt,A,we,Se]),Z=_(()=>{let e=null;return te&&J&&ot&&m!==`none`&&(e=pa(St,q,H,rt)),new ki({id:ye,labelId:void 0,selectedValue:q,open:J,items:Ce,selectionMode:m,name:nt,form:v,disabled:tt,readOnly:x,required:S,grid:O,virtualized:ee,openOnInputClick:N,itemToStringLabel:Te,isItemEqualToValue:H,modal:U,autoHighlight:ct,submitOnItemClick:W,hasInputValue:at,mounted:!1,forceMounted:!1,transitionStatus:`idle`,inline:te,activeIndex:null,selectedIndex:e,popupProps:{},listProps:{},inputProps:{},triggerProps:{},itemRoot:{props:E,id:ye,selectionMode:m,disabled:tt,readOnly:x,isItemEqualToValue:H},positionerElement:null,listElement:null,popupId:void 0,triggerElement:null,inputElement:null,inputGroupElement:null,popupSide:null,openMethod:null,inputInsidePopup:!0,inputOwnsFormValue:m===`none`},{onOpenChangeComplete:w,setOpen:w,setInputValue:w,setSelectedValue:w,setIndices:w,handleSelection:w,forceMount:w,requestSubmit:w,listRef:Ne,labelsRef:Pe,popupRef:Fe,emptyRef:He,inputRef:Re,startDismissRef:ze,endDismissRef:Ve,chipsContainerRef:qe,clearRef:Je,valuesRef:Qe,pointerDownItemRef:et,selectionEventRef:Ye},Ta)}).current,Ct=m===`none`?ft:q,wt=s.useMemo(()=>m===`none`?Ct:Array.isArray(q)?q.map(e=>Sa(e,V)):Sa(q,V),[Ct,V,m,q]),Tt=b(h),Et=b(r),Dt=Z.useState(`activeIndex`),Ot=Z.useState(`selectedIndex`),kt=Z.useState(`positionerElement`),At=Z.useState(`listElement`),jt=Z.useState(`triggerElement`),Mt=Z.useState(`inputElement`),Nt=Z.useState(`inputGroupElement`),Pt=Z.useState(`inline`),Ft=Z.useState(`inputInsidePopup`),It=Z.useState(`inputOwnsFormValue`),Lt=it&&!Ft&&ft===gt,Rt=xt(jt),{openMethod:zt,triggerProps:Bt}=Ki(J),Vt=b(()=>wt);Fa(Ft?Rt:Re,ye,Ct,Vt,!tt,g);let Ht=b(()=>{xe?Pe.current=St.map(De):Z.set(`forceMounted`,!0)}),Ut=b((e,t,n,r)=>{if(t===-1){if(Xe.current===Ya)return;Xe.current=Ya}else Xe.current={value:e,index:t};Tt(e,Ie(n,r,{index:t}))}),Wt=b(e=>{let t={};e.activeIndex!==void 0&&(t.activeIndex=e.activeIndex),e.selectedIndex!==void 0&&(t.selectedIndex=e.selectedIndex),Z.update(t);let n=e.activeIndex;if(n===void 0)return;let r=e.type||`none`;n===null?Ut(void 0,-1,r,e.event):Ut(Qe.current[n],n,r,e.event)}),Gt=b((t,r)=>{if(e.onInputValueChange?.(t,r),!r.isCanceled){if(Ue.current=r.reason===Ge,r.reason===`input-change`){J&&Ae!==null&&je(null);let e=r.event,i=e.inputType;if(e.type===`compositionend`||i!=null&&i!==``&&i!==`insertReplacementText`){let e=t.trim()!==``;e&&ke(!0),Ze.current={hasQuery:e};let r=Z.state.listElement;if(!Z.state.virtualized&&r){let e=Fe.current;for(let t of n.f(r.firstElementChild??r)){if(!n.g(t)||(e?!$(e,t):t.getAttribute(`role`)===`dialog`))break;if(qa(t)){t.scrollTop=0;break}}}e&&ct&&Z.state.activeIndex==null&&(J||Pt)&&Z.set(`activeIndex`,0)}}else r.reason===`input-clear`&&t===``&&Z.state.inputInsidePopup&&(Ze.current={hasQuery:!1,selection:!0});pt(t)}}),Kt=b(e=>{let t=!e&&Ft&&!Pt&&ft!==``&&(String(ft).trim()===Ae||ft===gt);!e&&(t||ft===``||Lt)&&ke(!1),je(null),t&&Gt(``,K(Ge))}),[qt,Jt]=s.useState(!1),Yt=b((t,n)=>{if(J===t)return;n.reason===`escape-key`&&ot&&St.length===0&&!He.current&&n.allowPropagation();let r=n,i=si(r);if(e.onOpenChange?.(t,r),Ze.current?.hasQuery&&n.reason===`input-change`===n.isCanceled&&(Ze.current=null),!n.isCanceled&&(t&&Ae!==null&&Kt(n.reason===We),!t&&Oe&&(it?(Pt||je(ht),ht===``&&ke(!1)):rt&&(Pt||je(ht),Ft&&Wt({activeIndex:null}),(!Ft||Pt)&&Gt(``,K(Ge,n.event,void 0,{isItemPress:n.reason===Be})))),t||Jt(i()),Y(t),!t&&Ft&&(n.reason===`focus-out`||n.reason===`outside-press`)&&(me(!0),he(!1),ge===`onBlur`))){let e=m===`none`?ft:q;_e.commit(e)}}),Xt=b((e,t)=>{o?.(e,t),!t.isCanceled&&(lt(e),(m===`none`&&Fe.current&&ne||it&&!Z.state.inputInsidePopup)&&Gt(De(e),K(t.reason,t.event)))}),Zt=b((e,t)=>{let n=cn(e),r=Ye.current??e;Ye.current=null;let i=K(Be,r),a=sn(n,`a`)?.getAttribute(`href`);if(a){a.startsWith(`#`)&&Yt(!1,i);return}if(rt){let e=Array.isArray(q)?q:[],n=ua(e,t,H);if(Xt(n?ha(e,t,H):[...e,t],i),i.isCanceled||!(Re.current&&Re.current.value.trim()!==``))return;if(Z.state.inputInsidePopup){Gt(``,K(Ge,i.event,void 0,{isItemPress:!0}));let e=Ze.current;e&&!n&&(e.toggledValue=t)}else Yt(!1,i)}else{if(Xt(t,i),i.isCanceled)return;Yt(!1,i)}}),Qt=b(()=>{let e=_e.inputRef.current?.form??Z.state.inputElement?.form;e&&typeof e.requestSubmit==`function`&&e.requestSubmit()}),$t=b(()=>{if(Et?.(!1),ke(!1),je(null),Wt(m===`none`?{activeIndex:null,selectedIndex:null}:{activeIndex:null}),rt&&Re.current&&Re.current.value!==``&&!Ue.current&&Gt(``,K(Ge)),it)if(Z.state.inputInsidePopup)Re.current&&Re.current.value!==``&&Gt(``,K(Ge));else{let e=De(q);Re.current&&Re.current.value!==e&&Gt(e,K(e===``?Ge:Le))}}),Q=s.useMemo(()=>Pt&&kt?{current:sn(kt,`[role="dialog"]`)}:Fe,[Pt,kt]),{mounted:en,transitionStatus:tn,forceUnmount:nn}=ai({open:J,ref:Q,preventUnmountOnClose:qt,setPreventUnmountOnClose:Jt,onUnmount:$t});s.useImperativeHandle(e.actionsRef,()=>({unmount:nn,close:()=>Yt(!1,K($e))}),[nn,Yt]),D(function(){let e=Me.current!==null&&Ae===null;Me.current=Ae,!(J&&(!e||!ot))&&(J||(et.current=null),m!==`none`&&Wt({selectedIndex:pa(ot?St:Qe.current,q,H,rt)}))},[J,Ae,q,m,rt,ot,St,H,Wt]),D(()=>{xe&&(Qe.current=St,Ne.current.length=St.length)},[xe,St]),D(()=>{!J&&Ze.current?.hasQuery&&(Ze.current=null)},[J]),D(()=>{if(!J&&Pt&&Q.current){Ze.current=null;return}let e=ot||st?St:Qe.current,t=Ze.current;if(t){let n=J||Pt||Z.state.positionerElement?.hidden===!1;if(t.hasQuery){let t=Re.current;!ct||String(ft).trim()===``||Pt&&ct!==`always`&&(!t||on(t.ownerDocument)!==t)?Ze.current=null:n&&(e[0]!==void 0||!ot&&!st)&&(Z.set(`activeIndex`,0),Ze.current=null)}else if(String(ft).trim()===``&&(Ze.current=null,n)){let e=t.selection;ct===`always`&&!e&&Z.state.selectionMode===`none`&&Z.set(`activeIndex`,0),queueMicrotask(()=>{if(!Z.state.open&&(!Z.state.inline||Q.current)||Re.current&&Re.current.value.trim()!==``)return;let n=Z.state.selectedValue,r=Z.state.selectionMode===`multiple`;if(r&&Array.isArray(n)?n.length>0:Z.state.selectionMode!==`none`&&n!=null){let e=ot||st?St:Qe.current,i=da(e,t.toggledValue,Z.state.isItemEqualToValue);Z.set(`activeIndex`,i===-1?pa(e,n,Z.state.isItemEqualToValue,r):i)}else e?Z.set(`activeIndex`,null):ct===`always`&&Z.set(`activeIndex`,0)})}}if(!J&&!Pt)return;let n=Z.state.activeIndex;if(n==null){if(ct===`always`&&e.length>0){Z.set(`activeIndex`,0);return}Ut(void 0,-1,Le);return}if(n>=e.length){Ut(void 0,-1,Le),Z.set(`activeIndex`,null);return}let r=e[n],i=Xe.current.value,a=i!==Ja&&ca(r,i,Z.state.isItemEqualToValue);(Xe.current.index!==n||!a)&&Ut(r,n,Le)},[Dt,ct,Ut,st,ot,St,Pt,J,Q,Z,ft]),D(()=>{if(m===`none`){de(String(ft)!==``);return}de(rt?Array.isArray(q)&&q.length>0:q!=null)},[de,m,ft,q,rt]),s.useEffect(()=>{ot&&ct&&St.length===0&&Wt({activeIndex:null})},[ot,ct,St.length,Wt]);function rn(){J&&ht!==``&&ht!==String(dt)&&!Lt&&ke(!0)}function an(){J&&Ae!==null&&Kt(!1)}let ln=!1;function un(){!ln&&ft!==gt&&(ln=!0,Gt(gt,K(Le)))}function dn(){m!==`none`&&(se(nt),le(la(q,ue.initialValue,H)),_e.change(q),it&&!at&&!Ft&&un())}function fn(){it&&!at&&!Ft&&!Oe&&un()}function pn(){m===`none`&&(se(nt),le(ft!==ue.initialValue),_e.change(ft))}Wi(ht,rn),Wi(J,an),Wi(q,dn),Wi(gt,fn),Wi(xe,fn),Wi(ft,pn);let mn=Mi({open:Pt?!0:J,onOpenChange:Yt,elements:{reference:Ft?jt:Mt,floating:kt}}),hn=O?`grid`:`listbox`,gn=J||Pt,_n=gn?`true`:`false`,vn=s.useMemo(()=>{let e=Mt?.tagName===`INPUT`,t=Mt==null||e,n=t||gn,r=t?{autoComplete:`off`,spellCheck:`false`,autoCorrect:`off`,autoCapitalize:`none`}:{};return n&&(r.role=`combobox`,r[`aria-expanded`]=_n,r[`aria-haspopup`]=hn,r[`aria-controls`]=gn?At?.id:void 0,r[`aria-autocomplete`]=x?`none`:ie),{reference:r,floating:{role:`presentation`}}},[Mt,gn,_n,hn,At?.id,ie,x]),yn=ti(mn,{enabled:!tt&&N,event:`mousedown-only`,toggle:!1,touchOpenDelay:Ft?0:100,reason:Ke}),bn=ii(mn,{enabled:!tt&&!Pt,outsidePressEvent:{mouse:`sloppy`,touch:`intentional`},bubbles:Pt?!0:void 0,outsidePress(e){let t=cn(e);return!$(jt,t)&&!$(Je.current,t)&&!$(qe.current,t)&&!$(Nt,t)}}),xn=zi(mn,{enabled:!tt,id:ye,listRef:Ne,activeIndex:Dt,selectedIndex:Ot,virtual:!0,loopFocus:L,allowEscape:L&&!ct,focusItemOnOpen:Oe||m===`none`&&!ct?!1:`auto`,focusItemOnHover:I,resetOnPointerLeave:!F,orientation:O?`horizontal`:void 0,rtl:ve===`rtl`,disabledIndices:T,grid:O?Ji:void 0,onNavigate(e,t){!t&&!J&&!(Pt&&e===null)||tn===`ending`||Wt({activeIndex:e,type:Yi(t),event:t?.nativeEvent})}}),Sn=s.useMemo(()=>ce(xn.reference,{onKeyDown(e){O&&Z.state.activeIndex==null&&(e.key===`ArrowLeft`||e.key===`ArrowRight`)&&e.preventBaseUIHandler()}},bn.reference,yn.reference,vn.reference),[xn.reference,bn.reference,yn.reference,vn.reference,O,Z]),Cn=s.useMemo(()=>ce(oi,bn.floating),[bn.floating]),wn=s.useMemo(()=>ce(xn.floating,vn.floating),[xn.floating,vn.floating]),Tn=s.useMemo(()=>{let e=xn.item;return{props:e?{...e,onFocus:void 0}:E,id:ye,selectionMode:m,disabled:tt,readOnly:x,isItemEqualToValue:H}},[xn.item,ye,m,tt,x,H]);Z.useContextCallback(`setOpen`,Yt),Z.useContextCallback(`setInputValue`,Gt),Z.useContextCallback(`setSelectedValue`,Xt),Z.useContextCallback(`setIndices`,Wt),Z.useContextCallback(`handleSelection`,Zt),Z.useContextCallback(`forceMount`,Ht),Z.useContextCallback(`requestSubmit`,Qt),Z.useContextCallback(`onOpenChangeComplete`,r),qi(()=>{Z.update({inline:te,popupProps:Cn,listProps:wn,inputProps:Sn,triggerProps:Bt,itemRoot:Tn})});let En={id:ye,selectedValue:q,open:J,mounted:en,transitionStatus:tn,items:Ce,inline:te,popupProps:Cn,listProps:wn,inputProps:Sn,triggerProps:Bt,itemRoot:Tn,openMethod:zt,selectionMode:m,name:nt,form:v,disabled:tt,readOnly:x,required:S,grid:O,virtualized:ee,openOnInputClick:N,itemToStringLabel:Te,modal:U,autoHighlight:ct,isItemEqualToValue:H,submitOnItemClick:W,hasInputValue:at};D(()=>{Z.update({...En,inputOwnsFormValue:m===`none`&&(te||!Z.state.inputInsidePopup)})},[Z,...Object.values(En)]);let Dn=z(C,_e.inputRef),On=s.useMemo(()=>({query:ht,hasItems:ot,filteredItems:bt,flatFilteredValues:St}),[ht,ot,bt,St]),kn=s.useMemo(()=>Array.isArray(Ct)?``:Sa(Ct,V),[Ct,V]),An=rt&&Array.isArray(q)&&q.length>0,jn=rt||m===`none`&&It?void 0:nt,Mn=s.useMemo(()=>!rt||!Array.isArray(q)||!nt?null:q.map(e=>{let t=Sa(e,V);return(0,l.jsx)(`input`,{type:`hidden`,form:v,name:nt,value:t,disabled:tt},t)}),[rt,q,v,nt,V,tt]),Nn=(0,l.jsxs)(s.Fragment,{children:[e.children,(0,l.jsx)(`input`,{..._e.getValidationProps(tt,{onFocus(){if(Ft){jt?.focus();return}(Re.current||jt)?.focus()},onChange(e){if(e.nativeEvent.defaultPrevented||tt||x)return;let t=e.currentTarget.value,n=t.toLowerCase(),r=K(Le,e.nativeEvent),i=()=>Qe.current.findIndex(e=>Sa(e,V).toLowerCase()===n||De(e).toLowerCase()===n);function a(){if(rt)return;if(m===`none`){Gt(t,r);return}let e=i();e===-1&&(e=Qe.current.findIndex((e,t)=>{let r=Pe.current[t];return r!=null&&r.toLowerCase()===n}));let a=e===-1?void 0:Qe.current[e];a!=null&&Xt?.(a,r)}it&&(Ht(),xe&&i()===-1&&Z.set(`forceMounted`,!0)),queueMicrotask(a)}}),id:ye&&jn==null?`${ye}-hidden-input`:void 0,form:v,name:jn,autoComplete:ae,disabled:tt,required:S&&!An,readOnly:x,value:kn,ref:Dn,style:jn?Ln:In,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Mn]});return(0,l.jsx)(Xi.Provider,{value:Z,children:(0,l.jsx)(Zi.Provider,{value:mn,children:(0,l.jsx)($i.Provider,{value:ot,children:(0,l.jsx)(Qi.Provider,{value:On,children:(0,l.jsx)(ea.Provider,{value:ft,children:Nn})})})})})}var eo=`data-popup-side`,to=`data-list-empty`,no={...En,...ja,popupSide:e=>e?{[eo]:e}:null,listEmpty:e=>e?{[to]:``}:null};function ro(e,t,n){let{setFocused:r,focusOwnerRef:i}=Pa(),a=b(t=>{(t?!e:i.current===a)&&(i.current=t&&a,n?.(t),r(t))});return D(()=>{let e=t.current;return e?.getRootNode()?.activeElement===e&&a(!0),()=>a(!1)},[e,t,a]),a}var io=5;function ao(e,t){let n=oo(t);return e.clientX>=n.left-io&&e.clientX<=n.right+io&&e.clientY>=n.top-io&&e.clientY<=n.bottom+io}function oo(e){let t=e.getBoundingClientRect(),r=n.m(e);if(Ht)return t;let i=r.getComputedStyle(e,`::before`),a=r.getComputedStyle(e,`::after`);if(!(i.content!==`none`||a.content!==`none`))return t;let o=parseFloat(i.width)||0,s=parseFloat(i.height)||0,c=parseFloat(a.width)||0,l=parseFloat(a.height)||0,u=Math.max(t.width,o,c),d=Math.max(t.height,s,l),f=u-t.width,p=d-t.height;return{left:t.left-f/2,right:t.right+f/2,top:t.top-p/2,bottom:t.bottom+p/2}}function so(e,t){return e??t}function co(e){let t=e.useState(`mounted`),n=e.useState(`popupSide`),r=e.useState(`positionerElement`);return t&&r?n:null}function lo(){return ra().filteredItems.length===0}function uo(e){return e===`rtl`?[`ArrowRight`,`ArrowLeft`]:[`ArrowLeft`,`ArrowRight`]}function fo(e,t){let n=e>=t-1?t-2:e;return n>=0?n:void 0}function po(e,t,n){let r=e.context.listRef.current[t];r&&(e.context.selectionEventRef.current=n,r.click(),e.context.selectionEventRef.current=null)}var mo=s.forwardRef(function(e,t){let{render:n,className:r,nativeButton:i=!0,disabled:a=!1,id:o,style:c,...l}=e,{state:u,disabled:d,setTouched:f,validationMode:p,validation:m}=Pa(),{labelId:h}=za(),g=ta(),_=g.useState(`selectionMode`),v=g.useState(`disabled`),y=g.useState(`readOnly`),x=g.useState(`required`),S=g.useState(`positionerElement`),C=g.useState(`listElement`),w=g.useState(`popupId`),T=g.useState(`triggerProps`),E=g.useState(`inputInsidePopup`),D=g.useState(`id`),O=g.useState(`labelId`),k=g.useState(`open`),A=g.useState(`selectedValue`),j=g.useState(`activeIndex`),M=g.useState(`selectedIndex`),N=g.useState(`hasSelectedValue`),P=na(),F=ia(),I=bt(),L=d||v||a,R=lo(),z=co(g),B=s.useRef(null),V=ro(L,B);Ba({id:E?o:void 0});let H=E?o??D:o,ee=so(h,O),te;k&&E?te=w??Va(D):k&&(te=C?.id);let ne=s.useRef(``);function U(e){ne.current=e.pointerType}let{reference:re}=Bi(P,{enabled:!k&&!y&&!v&&_===`single`,listRef:g.context.labelsRef,activeIndex:j,selectedIndex:M,onMatch(e){let t=g.context.valuesRef.current[e];t!==void 0&&g.context.setSelectedValue(t,K(Le))}}),{reference:ie}=ti(P,{enabled:!v,event:`mousedown`}),{buttonRef:ae,getButtonProps:oe}=ht({native:i,disabled:L}),W={...u,readOnly:y,open:k,disabled:L,popupSide:z,listEmpty:R,placeholder:_===`none`?!1:!N};return G(`button`,e,{ref:[t,ae,B,b(e=>{g.set(`triggerElement`,e)})],state:W,props:[T,ie,re,{id:H,tabIndex:E?0:-1,role:E?`combobox`:void 0,"aria-expanded":k,"aria-haspopup":E?`dialog`:`listbox`,"aria-controls":te,"aria-required":E&&x||void 0,"aria-readonly":E&&y||void 0,"aria-labelledby":ee,onPointerDown:U,onPointerEnter:U,onFocus(){V(!0),!L&&I.start(0,g.context.forceMount)},onBlur(e){if(!$(S,e.relatedTarget)&&(f(!0),V(!1),p===`onBlur`)){let e=_===`none`?F:A;m.commit(e)}},onMouseDown(e){if(L||(E||P.set(`domReferenceElement`,e.currentTarget),g.context.forceMount(),ne.current!==`touch`&&(g.context.inputRef.current?.focus(),E||e.preventDefault()),k))return;let t=Y(e.currentTarget);function n(e){let t=g.state.triggerElement;if(!t)return;let n=cn(e),r=g.state.positionerElement,i=g.state.listElement;$(t,n)||$(r,n)||$(i,n)||ao(e,t)||g.context.setOpen(!1,K(Qe,e))}E&&t.addEventListener(`mouseup`,n,{once:!0})},onKeyDown(e){(e.key===`ArrowDown`||e.key===`ArrowUp`)&&(Q(e),g.context.setOpen(!0,K(Ye,e.nativeEvent)),g.context.inputRef.current?.focus())}},m.getValidationProps(L,l),oe],stateAttributesMapping:no})});process.env.NODE_ENV!==`production`&&(mo.displayName=`ComboboxTrigger`);var ho=s.createContext(void 0);process.env.NODE_ENV!==`production`&&(ho.displayName=`ComboboxChipsContext`);function go(){return s.useContext(ho)}var _o=s.createContext(void 0);process.env.NODE_ENV!==`production`&&(_o.displayName=`ComboboxPositionerContext`);function vo(e){let t=s.useContext(_o);if(t===void 0&&!e)throw Error(process.env.NODE_ENV===`production`?R(21):`Base UI: <Combobox.Popup> and <Combobox.Arrow> must be used within the <Combobox.Positioner> component`);return t}var yo=s.forwardRef(function(e,t){let n=ta(),{buttonRef:r,getButtonProps:i}=ht({native:!1}),a=z(t,r);function o(e){n.context.setOpen(!1,K(Ve,e.nativeEvent,e.currentTarget))}return(0,l.jsx)(`span`,{ref:a,...i({onClick:o}),"aria-label":`Dismiss`,tabIndex:void 0,style:Ln})});process.env.NODE_ENV!==`production`&&(yo.displayName=`ComboboxInternalDismissButton`);var bo=s.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,id:a,style:o,...c}=e,{state:u,disabled:d,setTouched:f,validationMode:p,validation:m}=Pa(),{labelId:h}=za(),g=go(),_=!!vo(!0),v=ta(),y=ia(),x=Za(),S=v.useState(`required`),C=v.useState(`disabled`),w=v.useState(`readOnly`),T=v.useState(`name`),E=v.useState(`form`),O=v.useState(`selectionMode`),k=v.useState(`autoHighlight`),A=v.useState(`inputProps`),j=v.useState(`triggerProps`),M=v.useState(`open`),N=v.useState(`mounted`),P=v.useState(`selectedValue`),F=v.useState(`id`),I=v.useState(`inline`),L=v.useState(`modal`),R=!!k,z=co(v),B=d||C||i,V=lo(),H=ro(B,v.context.inputRef),ee=_||I,te=!ee||L,ne=Fe(a??(ee?void 0:F)),U=_?ka:u,[re,ie]=s.useState(null),ae=s.useRef(!1),oe=s.useRef(null);D(()=>{M||(oe.current=null)},[M]);let W=O===`none`&&!_,se=b(e=>{let t=_||v.state.inline;t&&!v.state.hasInputValue&&v.context.setInputValue(``,K(Le)),v.update({inputElement:e,inputInsidePopup:t,inputOwnsFormValue:W})}),ce=_?c:m.getValidationProps(B,c);function le(e){v.context.setIndices({activeIndex:null,selectedIndex:null,type:Yi(e),event:e})}let ue={...U,open:M,disabled:B,readOnly:w,popupSide:z,listEmpty:V};function de(e){if(!g)return;let t,n=g.chipsRef.current.length,[r]=uo(x);return e.key===r&&(e.currentTarget.selectionStart??0)===0&&P.length>0&&(e.preventDefault(),t=n>0?n-1:void 0),t}let fe=G(`input`,e,{state:ue,ref:[t,v.context.inputRef,se],props:[A,j,{value:re??y,"aria-readonly":w||void 0,"aria-required":S||void 0,"aria-labelledby":h,disabled:B,readOnly:w,required:O===`none`?S:void 0,form:E,...W&&T&&{name:T},id:ne,onFocus(){if(H(!0),!I)return;let e=oe.current;oe.current=null,!(e==null||!Object.hasOwn(v.context.valuesRef.current,e))&&v.context.setIndices({activeIndex:e})},onBlur(){f(!0),H(!1);let e=v.state.activeIndex;if(I&&e!==null&&k!==`always`&&(oe.current=e,v.context.setIndices({activeIndex:null})),p===`onBlur`){let e=O===`none`?y:P;m.commit(e)}},onCompositionStart(e){It||(ae.current=!0,ie(e.currentTarget.value))},onCompositionEnd(e){ae.current=!1;let t=e.currentTarget.value;ie(null),v.context.setInputValue(t,K(We,e.nativeEvent))},onChange(e){let t=e.nativeEvent,n=t.inputType,r=!n||n===`insertReplacementText`,i=ae.current||!r;function a(e){w||B||!e||!i||(v.context.setOpen(!0,K(We,t)),R||le(t))}if(ae.current){let n=e.currentTarget.value;ie(n),n===``&&!v.state.openOnInputClick&&!v.state.inputInsidePopup&&v.context.setOpen(!1,K(Ge,t));let r=n.trim(),i=R&&r!==``;a(r),M&&v.state.activeIndex!==null&&!i&&le(t);return}let o=K(We,t);if(v.context.setInputValue(e.currentTarget.value,o),o.isCanceled)return;let s=e.currentTarget.value===``,c=K(Ge,t);s&&!v.state.inputInsidePopup&&(O===`single`&&v.context.setSelectedValue(null,c),v.state.openOnInputClick||v.context.setOpen(!1,c)),a(e.currentTarget.value.trim()),M&&v.state.activeIndex!==null&&!R&&le(t)},onKeyDown(e){if(e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)return;if(B||w){w&&e.key===`Enter`&&M&&v.state.activeIndex!==null&&Q(e);return}let t=e.currentTarget,n=t.scrollWidth-t.clientWidth,r=x===`rtl`;if(e.key===`Home`){Q(e);let n=Bt&&r?t.value.length:0;t.setSelectionRange(n,n),t.scrollLeft=0;return}if(e.key===`End`){Q(e);let i=Bt&&r?0:t.value.length;t.setSelectionRange(i,i),t.scrollLeft=r?-n:n;return}if(!N&&e.key===`Escape`){let t=O===`multiple`&&Array.isArray(P)?P.length===0:P===null,n=K(Je,e.nativeEvent),r=O===`multiple`?[]:null;v.context.setInputValue(``,n),v.context.setSelectedValue(r,n),!t&&!v.state.inline&&!n.isPropagationAllowed&&e.stopPropagation();return}if(g&&e.key===`Backspace`&&t.value===``&&Array.isArray(P)&&P.length>0){let t=g.chipsRef.current.length,n=t>0?t-1:P.length-1,r=P.filter((e,t)=>t!==n);le(e.nativeEvent),v.context.setSelectedValue(r,K(Le,e.nativeEvent));return}let i=de(e);if(i!==void 0&&g?.chipsRef.current[i]?.focus(),e.which!==229&&e.key===`Enter`&&M){let t=v.state.activeIndex,n=e.nativeEvent;if(t===null){if(I)return;v.context.setOpen(!1,K(Le,n));return}Q(e),po(v,t,n)}}},ce],stateAttributesMapping:no}),pe=_?(0,l.jsx)(Na.Provider,{value:Ma,children:fe}):fe;return(0,l.jsxs)(s.Fragment,{children:[M&&te&&(0,l.jsx)(yo,{ref:v.context.startDismissRef}),pe]})});process.env.NODE_ENV!==`production`&&(bo.displayName=`ComboboxInput`);function xo(e,t,r,i){if(e.baseUIHandlerPrevented)return;let a=cn(e.nativeEvent),o=n.h(a)?a:null;o!==e.currentTarget&&(i?.(o)||jn(o))||(e.preventDefault(),!r&&(t.context.inputRef.current?.focus(),t.state.openOnInputClick&&t.context.setOpen(!0,K(Ke,e.nativeEvent))))}var So={...dt,...Tn},Co=s.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,nativeButton:a=!0,keepMounted:o=!1,style:s,...c}=e,{disabled:l}=Pa(),u=ta(),d=u.useState(`selectionMode`),f=u.useState(`disabled`),p=u.useState(`readOnly`),m=u.useState(`open`),h=u.useState(`selectedValue`),g=u.useState(`hasSelectionChips`),_=ia(),v=!1;v=d===`none`?_!==``:d===`single`?h!=null:g;let y=l||f||i,{buttonRef:b,getButtonProps:x}=ht({native:a,disabled:y}),{mounted:S,transitionStatus:C,setMounted:w}=ot(v),T={disabled:y,visible:v,open:m,transitionStatus:C};Dt({open:v,ref:u.context.clearRef,onComplete(){v||w(!1)}});let E=G(`button`,e,{state:T,ref:[t,b,u.context.clearRef],props:[{tabIndex:-1,children:`x`,onMouseDown(e){e.preventDefault()},onClick(e){if(y||p)return;let t=Yi(e);u.context.setInputValue(``,K(He,e.nativeEvent)),d===`none`?u.context.setIndices({activeIndex:null,type:t,event:e.nativeEvent}):(u.context.setSelectedValue(Array.isArray(h)?[]:null,K(He,e.nativeEvent)),u.context.setIndices({activeIndex:null,selectedIndex:null,type:t,event:e.nativeEvent})),u.context.inputRef.current?.focus()}},c,x],stateAttributesMapping:So});return o||S?E:null});process.env.NODE_ENV!==`production`&&(Co.displayName=`ComboboxClear`);var wo=s.createContext(null);process.env.NODE_ENV!==`production`&&(wo.displayName=`GroupCollectionContext`);function To(){return s.useContext(wo)}function Eo(e){let{children:t,items:n}=e,r=s.useMemo(()=>({items:n}),[n]);return(0,l.jsx)(wo.Provider,{value:r,children:t})}function Do(e){let{children:t}=e,{filteredItems:n}=ra(),r=To(),i=r?r.items:n;return(0,l.jsx)(s.Fragment,{children:i.map(t)})}var Oo=s.forwardRef(function(e,t){var n;let{render:r,className:i,style:a,children:o,...c}=e,u=ta(),d=na(),f=!!vo(!0),{filteredItems:p,hasItems:m}=ra(),h=u.useState(`selectionMode`),g=u.useState(`grid`),_=u.useState(`readOnly`),v=u.useState(`listProps`),y=u.useState(`virtualized`),x=u.useState(`forceMounted`),S=h===`multiple`,C=p.length===0,w=b(e=>{u.set(`positionerElement`,e)}),T=b(e=>{u.set(`listElement`,e)}),E=s.useMemo(()=>typeof o==`function`?n||=(0,l.jsx)(Do,{children:o}):o,[o]),D={empty:C},O=d.useState(`floatingId`),k=G(`div`,e,{state:D,ref:[t,T,f?null:w],props:[v,{children:E,tabIndex:-1,id:O,role:g?`grid`:`listbox`,"aria-multiselectable":S?`true`:void 0,"aria-readonly":!g&&_?!0:void 0,onKeyDown(e){if(!(u.state.disabled||u.state.readOnly)&&e.key===`Enter`){let t=u.state.activeIndex;if(t==null)return;Q(e),po(u,t,e.nativeEvent)}}},c]});if(y)return k;let j=m&&!x?void 0:u.context.labelsRef;return(0,l.jsx)(A,{elementsRef:u.context.listRef,labelsRef:j,children:k})});process.env.NODE_ENV!==`production`&&(Oo.displayName=`ComboboxList`);var ko=``;function Ao(e){let t=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT),n=null;for(;t.nextNode();){let e=t.currentNode;e.nodeValue!==``&&(n=e)}return n}function jo(e=!0){let t=bt(),n=s.useRef(null);return s.useEffect(()=>{if(!e||Pt)return;let r=n.current;if(r==null)return;let i=Ao(r);if(i==null)return;let a=i.data,o=`${a}${ko}`;return i.nodeValue=o,t.start(200,()=>{i.nodeValue===o&&(i.nodeValue=a)}),()=>{t.clear(),i.nodeValue===o&&(i.nodeValue=a)}},[e,n,t]),n}var Mo=s.createContext(void 0);process.env.NODE_ENV!==`production`&&(Mo.displayName=`ComboboxPortalContext`);function No(){let e=s.useContext(Mo);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?R(20):`Base UI: <Combobox.Portal> is missing.`);return e}var Po=s.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=ta(),a=i.useState(`mounted`),o=i.useState(`forceMounted`);return a||n||o?(0,l.jsx)(Mo.Provider,{value:n,children:(0,l.jsx)(Br,{ref:t,...r})}):null});process.env.NODE_ENV!==`production`&&(Po.displayName=`ComboboxPortal`);function Fo(e){let{nodeId:t,externalTree:r,rootContext:i}=e,a=i.useState(`referenceElement`),o=i.useState(`floatingElement`),c=i.useState(`domReferenceElement`),l=i.useState(`open`),u=i.useState(`floatingId`),[d,f]=s.useState(null),p=s.useRef(null),m=Gr(r),h=s.useMemo(()=>({reference:a,floating:o,domReference:c}),[a,o,c]),g=n.c({...e,elements:{...h,...d&&{reference:d}}}),_=s.useCallback(e=>{let t=n.h(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;f(t),g.refs.setReference(t)},[g.refs]),v=s.useMemo(()=>({...g.refs,setPositionReference:_,domReference:p}),[g.refs,_]),y=s.useMemo(()=>({...g.elements,domReference:c}),[g.elements,c]),b=s.useMemo(()=>({...g,dataRef:i.context.dataRef,open:l,onOpenChange:i.setOpen,events:i.context.events,floatingId:u,refs:v,elements:y,nodeId:t,rootStore:i}),[g,v,y,t,i,l,u]);return D(()=>{c&&(p.current=c)},[c]),D(()=>{i.context.dataRef.current.floatingContext=b;let e=m?.nodesRef.current.find(e=>e.id===t);e&&(e.context=b)}),s.useMemo(()=>({...g,context:b,refs:v,elements:y,rootStore:i}),[g,v,y,b,i])}var Io=e=>({name:`arrow`,options:e,async fn(t){let{x:r,y:i,placement:a,rects:o,platform:s,elements:c,middlewareData:l}=t,{element:u,padding:d=0}=n.S(e,t)||{};if(u==null)return{};let f=n.D(d),p={x:r,y:i},m=n.T(a),h=n.E(m),g=await s.getDimensions(u),_=m===`y`,v=_?`top`:`left`,y=_?`bottom`:`right`,b=_?`clientHeight`:`clientWidth`,x=o.reference[h]+o.reference[m]-p[m]-o.floating[h],S=p[m]-o.reference[m],C=c.floating[b]||o.floating[h],w=x/2-S/2,T=C/2-g[h]/2-1,E=Math.min(f[v],T),D=Math.min(f[y],T),O=E,k=C-g[h]-D,A=C/2-g[h]/2+w,j=n.x(O,A,k),M=!l.arrow&&n.w(a)!=null&&A!==j&&o.reference[h]/2-(A<O?E:D)-g[h]/2<0,N=M?A<O?A-O:A-k:0;return{[m]:p[m]+N,data:{[m]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),Lo=(e,t)=>{let{name:n,fn:r}=Io(e);return{name:n,fn:r,options:[e,t]}},Ro={name:`hide`,async fn(e){let{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0,o=await e.platform.detectOverflow(e,{elementContext:`reference`});return{data:{referenceHidden:o.top-n>=0||o.right-t>=0||o.bottom-n>=0||o.left-t>=0||a}}}},zo={sideX:`left`,sideY:`top`},Bo=`--available-width`,Vo=`--available-height`,Ho=`--anchor-width`,Uo=`--anchor-height`,Wo=`--transform-origin`,Go=Bo,Ko=Vo;function qo(e,t,n){let r=e===`inline-start`||e===`inline-end`;return{top:`top`,right:r?n?`inline-start`:`inline-end`:`right`,bottom:`bottom`,left:r?n?`inline-end`:`inline-start`:`left`}[t]}function Jo(e,t,r){let{rects:i,placement:a}=e;return{side:qo(t,n.O(a),r),align:n.w(a)||`center`,anchor:{width:i.reference.width,height:i.reference.height},positioner:{width:i.floating.width,height:i.floating.height}}}function Yo(e){return Xo(e,Fo)}function Xo(e,t){let{anchor:r,positionMethod:i=`absolute`,side:a=`bottom`,sideOffset:o=0,align:c=`center`,alignOffset:l=0,collisionBoundary:u,collisionPadding:d=5,sticky:f=!1,arrowPadding:p=5,disableAnchorTracking:m=!1,inline:h,keepMounted:g=!1,floatingRootContext:_,mounted:v,collisionAvoidance:y,shift:x,nodeId:S,adaptiveOrigin:C,lazyFlip:w=!1,externalTree:T}=e,E=y.side||`flip`,O=y.align||`flip`,k=y.fallbackAxisSide||`end`,A=x?.crossAxis??!1,j=x?.rootBoundary,M=typeof r==`function`?r:void 0,N=b(M),P=M?N:r,F=xt(r),I=xt(v),L=Za()===`rtl`,[R,z]=s.useState(null);!v&&R!==null&&z(null);let B=w===`placement`,V=R?n.O(R):null,H=R&&B?n.w(R)||`center`:null,ee=V||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":L?`left`:`right`,"inline-start":L?`right`:`left`}[a],te=H||c,ne=te===`center`?ee:`${ee}-${te}`,U=d;typeof U==`number`?U={top:U,right:U,bottom:U,left:U}:U&&={top:U.top||0,right:U.right||0,bottom:U.bottom||0,left:U.left||0};let re=+(a===`bottom`),ie=+(a===`top`),ae=+(a===`right`),oe=+(a===`left`),W={boundary:u===`clipping-ancestors`?`clippingAncestors`:u,padding:U},se=s.useRef(null),ce=xt(o),le=xt(l),ue=typeof o==`function`?0:o,de=typeof l==`function`?0:l,fe=[];h&&fe.push(h),fe.push(n.a(e=>{let t=Jo(e,a,L),n=typeof ce.current==`function`?ce.current(t):ce.current,r=typeof le.current==`function`?le.current(t):le.current;return{mainAxis:n,crossAxis:r,alignmentAxis:r}},[ue,de,L,a]));let pe=O===`none`&&E!==`shift`,me=!pe&&(f||A||E===`shift`),he=E===`none`?null:n.n({...W,padding:{top:U.top+1+re,right:U.right+1+oe,bottom:U.bottom+1+ie,left:U.left+1+ae},mainAxis:!A&&E===`flip`,crossAxis:O===`flip`?`alignment`:!1,fallbackAxisSideDirection:k}),ge=pe?null:n.o({...W,rootBoundary:j,mainAxis:O!==`none`,crossAxis:me,limiter:f||A?void 0:n.i(e=>{if(!se.current)return{};let{width:t,height:r}=se.current.getBoundingClientRect(),i=n.k(n.O(e.placement)),a=i===`y`?t:r,o=i===`y`?U.left+U.right:U.top+U.bottom;return{offset:a/2+o/2}})},[W,f,A,j,U,O]);E===`shift`||O===`shift`||te===`center`?fe.push(ge,he):fe.push(he,ge),fe.push(n.s({...W,apply({elements:{floating:e},availableWidth:t,availableHeight:r,rects:i}){if(!I.current)return;let a=e.style;a.setProperty(Go,`${t}px`),a.setProperty(Ko,`${r}px`);let o=n.m(e).devicePixelRatio||1,{x:s,y:c,width:l,height:u}=i.reference,d=(Math.round((s+l)*o)-Math.round(s*o))/o,f=(Math.round((c+u)*o)-Math.round(c*o))/o;a.setProperty(Ho,`${d}px`),a.setProperty(Uo,`${f}px`)}}),Lo(e=>({element:se.current||Y(e.elements.floating).createElement(`div`),padding:se.current?p:0}),[p]),{name:`transformOrigin`,fn(e){let{elements:{floating:t},middlewareData:r,placement:i,platform:s,rects:c,y:l}=e,u=n.O(i),d=n.w(i),f=n.k(u)===`y`,p=se.current,m=typeof o==`function`?o(Jo(e,a,L)):o,h;h=!p&&d&&Math.abs(f?r.shift?.x||0:r.shift?.y||0)<=1?d===`start`===(f&&s.isRTL?.(t)===!0)?`100%`:`0%`:`${(f?r.arrow?.x||0:r.arrow?.y||0)+(f?p?.clientWidth||0:p?.clientHeight||0)/2}px`;let g=u===`top`||u===`left`?`calc(100% + ${m}px)`:`${-m}px`;return me&&f&&Math.abs(r.shift?.y||0)>m&&(g=`${c.reference.y+c.reference.height/2-l}px`),t.style.setProperty(Wo,f?`${h} ${g}`:`${g} ${h}`),{}}},Ro,C),D(()=>{!v&&_&&_.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[v,_]);let _e=s.useMemo(()=>({ancestorScroll:!m,elementResize:!m&&typeof ResizeObserver<`u`,layoutShift:!m&&typeof IntersectionObserver<`u`}),[m]),{refs:ve,elements:ye,x:be,y:G,middlewareData:xe,update:Se,placement:Ce,context:we,isPositioned:Te,floatingStyles:Ee}=t({rootContext:_,open:g?v:void 0,placement:ne,middleware:fe,strategy:i,whileElementsMounted:g?void 0:(...e)=>n.l(...e,_e),nodeId:S,externalTree:T}),{sideX:De,sideY:Oe}=xe.adaptiveOrigin||zo,ke=Te?i:`fixed`,Ae=s.useMemo(()=>{let e;return e=Te?C?{position:ke,[De]:be,[Oe]:G}:{...Ee,position:ke}:{position:ke,top:0,left:0},e[Go]=`100vw`,e[Ko]=`100vh`,Te||(e.opacity=0),e},[C,ke,De,be,Oe,G,Ee,Te]),je=s.useRef(null);D(()=>{if(!v)return;let e=F.current,t=typeof e==`function`?e():e,n=(Zo(t)?t.current:t)||null;n!==je.current&&(ve.setPositionReference(n),je.current=n)},[v,ve,P,F]),s.useEffect(()=>{if(!v)return;let e=F.current;typeof e!=`function`&&Zo(e)&&e.current!==je.current&&(ve.setPositionReference(e.current),je.current=e.current)},[v,ve,P,F]),s.useEffect(()=>{if(g&&v&&ye.reference&&ye.floating)return n.l(ye.reference,ye.floating,Se,_e)},[g,v,ye,Se,_e]);let Me=n.O(Ce),Ne=qo(a,Me,L),Pe=n.w(Ce)||`center`,Fe=!!xe.hide?.referenceHidden;D(()=>{w&&v&&Te&&(Me!==ee||B&&Pe!==te)&&z(Ce)},[w,B,v,Te,Ce,Me,Pe,ee,te]);let K=s.useMemo(()=>({position:`absolute`,top:xe.arrow?.y,left:xe.arrow?.x}),[xe.arrow]),Ie=xe.arrow?.centerOffset!==0;return s.useMemo(()=>({positionerStyles:Ae,arrowStyles:K,arrowRef:se,arrowUncentered:Ie,side:Ne,align:Pe,physicalSide:Me,anchorHidden:Fe,refs:ve,context:we,isPositioned:Te,update:Se}),[Ae,K,se,Ie,Ne,Pe,Me,Fe,ve,we,Te,Se])}function Zo(e){return e!=null&&`current`in e}function Qo(e){return e===`starting`?Nr:E}function $o(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){let c={...n};return s&&(c.pointerEvents=`none`),G(`div`,e,{state:t,ref:a,props:[{role:`presentation`,hidden:o,style:c},Qo(r),i],stateAttributesMapping:Dn})}var es=20;function ts(e,t,n,r){let[i,a]=s.useState(!1);D(()=>{if(!e||!t||n==null){a(!1);return}let r=Y(n).documentElement.clientWidth,i=n.offsetWidth;a(r>0&&i>0&&i>=r-es)},[e,t,n]),$t(e&&(!t||i),r)}var ns=s.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a,side:o,align:s,sideOffset:c,alignOffset:u,collisionBoundary:d=`clipping-ancestors`,collisionPadding:f,arrowPadding:p,sticky:m,disableAnchorTracking:h=!1,collisionAvoidance:g=Pr,style:_,...v}=e,y=ta(),x=na(),S=No(),C=y.useState(`modal`),w=y.useState(`open`),T=y.useState(`mounted`),E=y.useState(`openMethod`),O=y.useState(`positionerElement`),k=y.useState(`triggerElement`),A=y.useState(`inputElement`),j=y.useState(`inputGroupElement`),M=y.useState(`inputInsidePopup`),N=y.useState(`transitionStatus`),P=lo(),F=Yo({anchor:i??(M?k:j??A),floatingRootContext:x,positionMethod:a,mounted:T,side:o,sideOffset:c,align:s,alignOffset:u,arrowPadding:p,collisionBoundary:d,collisionPadding:f,sticky:m,disableAnchorTracking:h,keepMounted:S,collisionAvoidance:g,lazyFlip:!0});ts(w&&C,E===`touch`,O,k);let I={open:w,side:F.side,align:F.align,anchorHidden:F.anchorHidden,empty:P};D(()=>{y.set(`popupSide`,F.side)},[y,F.side]);let L=b(e=>{y.set(`positionerElement`,e)}),R=$o(e,I,{styles:F.positionerStyles,transitionStatus:N,props:v,refs:[t,L],hidden:!T,inert:!w});return(0,l.jsxs)(_o.Provider,{value:F,children:[T&&C&&(0,l.jsx)(Hi,{inert:Vi(!w),cutout:j??A??k}),R]})});process.env.NODE_ENV!==`production`&&(ns.displayName=`ComboboxPositioner`);var rs={...Dn,...dt},is=s.forwardRef(function(e,t){let{render:n,className:r,style:i,initialFocus:a,finalFocus:o,...c}=e,u=ta(),d=vo(),f=na(),p=u.useState(`mounted`),m=u.useState(`open`),h=u.useState(`openMethod`),g=u.useState(`popupProps`),_=u.useState(`transitionStatus`),v=u.useState(`inputInsidePopup`),y=u.useState(`inputElement`),b=u.useState(`modal`),x=u.useState(`id`),S=lo(),C=c.id??(v?Va(x):void 0);D(()=>(u.set(`popupId`,u.context.popupRef.current?.id||C),()=>{u.set(`popupId`,void 0)}),[u,C]),Dt({open:m,ref:u.context.popupRef,onComplete(){m&&u.context.onOpenChangeComplete(!0)}});let w=G(`div`,e,{state:{open:m,side:d.side,align:d.align,anchorHidden:d.anchorHidden,transitionStatus:_,empty:S},ref:[t,u.context.popupRef],props:[g,{id:C,role:v?`dialog`:`presentation`,onFocus(e){let t=cn(e.nativeEvent);h!==`touch`&&($(u.state.listElement,t)||t===e.currentTarget)&&u.context.inputRef.current?.focus()}},Qo(_),c],stateAttributesMapping:rs}),T=a===void 0?v?e=>e===`touch`?u.context.popupRef.current:y:!1:a,E;E=o??(v?void 0:!1);let O=!v||b;return(0,l.jsx)(ei,{context:f,disabled:!p,modal:O,openInteractionType:h,initialFocus:T,returnFocus:E,getInsideElements:()=>[u.context.startDismissRef.current,u.context.endDismissRef.current],children:(0,l.jsxs)(s.Fragment,{children:[w,O&&(0,l.jsx)(yo,{ref:u.context.endDismissRef})]})})});process.env.NODE_ENV!==`production`&&(is.displayName=`ComboboxPopup`);var as=s.createContext(void 0);process.env.NODE_ENV!==`production`&&(as.displayName=`ComboboxGroupContext`);function os(){let e=s.useContext(as);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?R(18):`Base UI: ComboboxGroupContext is missing. ComboboxGroup parts must be placed within <Combobox.Group>.`);return e}var ss=s.forwardRef(function(e,t){let{render:n,className:r,style:i,items:a,...o}=e,c=ta().useState(`grid`),[u,d]=s.useState(),f=s.useMemo(()=>({labelId:u,setLabelId:d,items:a}),[u,d,a]),p=G(`div`,e,{ref:t,props:[{role:c?`rowgroup`:`group`,"aria-labelledby":u},o]}),m=(0,l.jsx)(as.Provider,{value:f,children:p});return a?(0,l.jsx)(Eo,{items:a,children:m}):m});process.env.NODE_ENV!==`production`&&(ss.displayName=`ComboboxGroup`);var cs=s.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{setLabelId:s}=os(),c=Fe(a);return D(()=>(s(c),()=>{s(e=>e===c?void 0:e)}),[c,s]),G(`div`,e,{ref:t,props:[{id:c,"aria-hidden":!0},o]})});process.env.NODE_ENV!==`production`&&(cs.displayName=`ComboboxGroupLabel`);var ls=s.createContext(void 0);process.env.NODE_ENV!==`production`&&(ls.displayName=`ComboboxItemContext`);function us(){let e=s.useContext(ls);if(!e)throw Error(process.env.NODE_ENV===`production`?R(19):`Base UI: ComboboxItemContext is missing. ComboboxItem parts must be placed within <Combobox.Item>.`);return e}var ds=s.createContext(!1);process.env.NODE_ENV!==`production`&&(ds.displayName=`ComboboxRowContext`);function fs(){return s.useContext(ds)}function ps(e){let{componentProps:t,forwardedRef:n,virtualized:r,indexFromFilter:i}=e,{render:a,className:o,style:u,value:d=null,index:f,disabled:p=!1,nativeButton:m=!1,...h}=t,g=s.useRef(null),_=st({guess:!0,index:f,textRef:g}),v=ta(),y=fs(),b=aa(),{props:x,id:S,selectionMode:C,disabled:w,readOnly:T,isItemEqualToValue:E}=v.useState(`itemRoot`),O=w||p,k=C!==`none`,A=f??i??_.index,j=A!==-1,M=v.useState(`isActive`,A),N=v.useState(`isSelected`,d),P=s.useRef(null),F=S!=null&&j?`${S}-${A}`:void 0,I=N&&k;D(()=>{if(!(j&&(r||f!=null)))return;let e=v.context.listRef.current;return e[A]=P.current,()=>{delete e[A]}},[j,r,A,f,v]),D(()=>{if(!j||b)return;let e=v.context.valuesRef.current;return e[A]=d,()=>{delete e[A]}},[j,b,A,d,v]),D(()=>{if(!j||b)return;let e=v.state.selectedValue,t=v.state.selectedIndex;v.state.selectionMode===`multiple`&&Array.isArray(e)?t=ma(A,d,v.context.valuesRef.current,e,E,t):ca(d,e,E)&&(t=A),v.set(`selectedIndex`,t)},[j,b,v,A,d,E]);let{getButtonProps:L,buttonRef:R}=ht({disabled:O,focusableWhenDisabled:!0,native:m,composite:!0}),z={disabled:O,selected:I,highlighted:M};function B(e){function t(){v.context.handleSelection(e,d)}v.state.submitOnItemClick?(c.flushSync(t),v.context.requestSubmit()):t()}let V={id:F,role:y?`gridcell`:`option`,"aria-selected":k?I:void 0,tabIndex:void 0,onPointerDownCapture(e){e.isPrimary&&(v.context.pointerDownItemRef.current=e.currentTarget),e.preventDefault()},onMouseDown(e){e.preventDefault()},onClick(e){O||T||B(e.nativeEvent)},onMouseUp(e){let t=v.context.pointerDownItemRef.current===e.currentTarget;v.context.pointerDownItemRef.current=null,!(O||T||e.button!==0||t||!M)&&B(e.nativeEvent)}},H=G(`div`,t,{ref:[R,n,_.ref,P],state:z,props:[x,V,h,L]}),ee=s.useMemo(()=>({selected:I,textRef:g}),[I,g]);return(0,l.jsx)(ls.Provider,{value:ee,children:H})}function ms(e){let{componentProps:t,forwardedRef:n}=e,r=ta().useState(`isItemEqualToValue`),{flatFilteredValues:i}=ra();return(0,l.jsx)(ps,{componentProps:t,forwardedRef:n,virtualized:!0,indexFromFilter:da(i,t.value??null,r)})}var hs=s.memo(s.forwardRef(function(e,t){let n=ta().useState(`virtualized`);return n&&e.index==null?(0,l.jsx)(ms,{componentProps:e,forwardedRef:t}):(0,l.jsx)(ps,{componentProps:e,forwardedRef:t,virtualized:n,indexFromFilter:void 0})}));process.env.NODE_ENV!==`production`&&(hs.displayName=`ComboboxItem`);var gs=s.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,{filteredItems:s}=ra(),c=ta(),l=jo(),u=s.length===0?a:null;return G(`div`,e,{ref:[t,c.context.emptyRef,l],props:[{children:u,role:`status`,"aria-live":`polite`,"aria-atomic":!0},o]})});process.env.NODE_ENV!==`production`&&(gs.displayName=`ComboboxEmpty`);var _s=s.forwardRef(function(e,t){let{className:n,render:r,orientation:i=`horizontal`,style:a,...o}=e;return G(`div`,e,{state:{orientation:i},ref:t,props:[{role:`presentation`},o]})});process.env.NODE_ENV!==`production`&&(_s.displayName=`ListboxSeparator`);function vs(e){let{multiple:t=!1,defaultValue:n,value:r,onValueChange:i,autoComplete:a,...o}=e;return(0,l.jsx)($a,{...o,selectionMode:t?`multiple`:`single`,selectedValue:r,defaultSelectedValue:n,onSelectedValueChange:i,formAutoComplete:a})}function ys(e){let{children:t,placeholder:n}=e,r=ta(),i=r.useState(`itemToStringLabel`),a=r.useState(`selectedValue`),o=r.useState(`items`),c=r.useState(`selectionMode`)===`multiple`,u=r.useState(`hasSelectedValue`),d=!u&&n!=null&&t==null,f=r.useState(`hasNullItemLabel`,d),p=null;return p=typeof t==`function`?t(a):t??(!u&&n!=null&&!f?n:c&&Array.isArray(a)?wa(a,o,i):Ca(a,o,i)),(0,l.jsx)(s.Fragment,{children:p})}var bs=s.memo(s.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a,selected:o,...c}=e,l=s.useRef(null),{transitionStatus:u,setMounted:d}=ot(o),f=G(`span`,e,{ref:[t,l],state:{selected:o,transitionStatus:u},props:[{"aria-hidden":!0,children:`✔️`},c],stateAttributesMapping:dt});return Dt({batch:!0,enabled:!o,open:o,ref:l,onComplete(){o||d(!1)}}),f}));process.env.NODE_ENV!==`production`&&(bs.displayName=`ItemIndicator`);var xs=s.forwardRef(function(e,t){let{selected:n}=us();return e.keepMounted||n?(0,l.jsx)(bs,{...e,selected:n,ref:t}):null});process.env.NODE_ENV!==`production`&&(xs.displayName=`ComboboxItemIndicator`);var Ss=s.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=ta(),c=o.useState(`hasSelectionChips`),u=s.useRef([]),d=G(`div`,e,{ref:[t,o.context.chipsContainerRef],props:[c?{role:`toolbar`}:E,{onMouseDown(e){xo(e,o,o.state.disabled)}},a]}),f=s.useMemo(()=>({chipsRef:u}),[]);return(0,l.jsx)(ho.Provider,{value:f,children:(0,l.jsx)(A,{elementsRef:u,children:d})})});process.env.NODE_ENV!==`production`&&(Ss.displayName=`ComboboxChips`);var Cs=s.createContext(void 0);process.env.NODE_ENV!==`production`&&(Cs.displayName=`ComboboxChipContext`);function ws(){let e=s.useContext(Cs);if(!e)throw Error(process.env.NODE_ENV===`production`?R(17):`Base UI: ComboboxChipContext is missing. ComboboxChip parts must be placed within <Combobox.Chip>.`);return e}var Ts=s.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=ta(),{chipsRef:u}=go(),d=Za(),f=o.useState(`disabled`),p=o.useState(`readOnly`),m=o.useState(`selectedValue`),{ref:h,index:g}=st();function _(e){let t=g,[n,r]=uo(d);return e.key===n?(e.preventDefault(),t=g>0?g-1:void 0):e.key===r?(e.preventDefault(),t=g<u.current.length-1?g+1:void 0):e.key===`Backspace`||e.key===`Delete`?(t=fo(g,m.length),Q(e),c.flushSync(()=>{o.context.setIndices({activeIndex:null,selectedIndex:null,type:Xe,event:e.nativeEvent}),o.context.setSelectedValue(m.filter((e,t)=>t!==g),K(Le,e.nativeEvent))})):e.key===`Enter`||e.key===` `?(Q(e),t=void 0):e.key===`ArrowDown`||e.key===`ArrowUp`?(Q(e),c.flushSync(()=>{o.context.setOpen(!0,K(Ye,e.nativeEvent))}),t=void 0):e.key.length===1&&!e.ctrlKey&&!e.metaKey&&!e.altKey&&(t=void 0),t}let v=G(`div`,e,{ref:[t,h],state:{disabled:f},props:[{tabIndex:-1,"aria-disabled":f||void 0,"aria-readonly":p||void 0,onKeyDown(e){if(f||p)return;let t=_(e);t===void 0?o.context.inputRef.current?.focus():u.current[t]?.focus()}},a]}),y=s.useMemo(()=>({index:g}),[g]);return(0,l.jsx)(Cs.Provider,{value:y,children:v})});process.env.NODE_ENV!==`production`&&(Ts.displayName=`ComboboxChip`);var Es=s.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,nativeButton:a=!0,style:o,...s}=e,c=ta(),{index:l}=ws(),u=c.useState(`disabled`),d=c.useState(`readOnly`),f=c.useState(`selectedValue`),p=c.useState(`isItemEqualToValue`),m=u||i,{buttonRef:h,getButtonProps:g}=ht({native:a,disabled:m||d,focusableWhenDisabled:!0}),_={disabled:m};function v(e,t){let n=c.state.activeIndex;if(n==null)return;let r=da(c.context.valuesRef.current,e,p);r!==-1&&n===r&&c.context.setIndices({activeIndex:null,type:Yi(t),event:t})}function y(e){let t=K(Ue,e.nativeEvent),n=f[l];return v(n,e.nativeEvent),c.context.setSelectedValue(f.filter((e,t)=>t!==l),t),c.context.inputRef.current?.focus(),t}return G(`button`,e,{ref:[t,h],state:_,props:[{tabIndex:-1,onMouseDown(e){e.preventDefault()},onClick(e){y(e).isPropagationAllowed||e.stopPropagation()},onKeyDown(e){(e.key===`Enter`||e.key===` `)&&(y(e).isPropagationAllowed||Q(e))}},s,g]})});process.env.NODE_ENV!==`production`&&(Es.displayName=`ComboboxChipRemove`);var Ds=_s,Os=vs;function ks({...e}){return(0,l.jsx)(ys,{"data-slot":`combobox-value`,...e})}function As({className:e,children:n,...r}){return(0,l.jsxs)(mo,{"data-slot":`combobox-trigger`,className:t.t(`[&_svg:not([class*='size-'])]:size-4`,e),...r,children:[n,(0,l.jsx)(a.ChevronDownIcon,{className:`text-muted-foreground pointer-events-none size-4`})]})}function js({className:e,...n}){return(0,l.jsx)(Co,{"data-slot":`combobox-clear`,render:(0,l.jsx)(i.InputGroupButton,{variant:`ghost`,size:`icon-xs`}),className:t.t(e),...n,children:(0,l.jsx)(a.XIcon,{className:`pointer-events-none`})})}function Ms({className:e,children:n,disabled:r=!1,showTrigger:a=!0,showClear:o=!1,...s}){return(0,l.jsxs)(i.InputGroup,{className:t.t(`w-auto`,e),children:[(0,l.jsx)(bo,{render:(0,l.jsx)(i.InputGroupInput,{disabled:r}),...s}),(0,l.jsxs)(i.InputGroupAddon,{align:`inline-end`,children:[a&&(0,l.jsx)(i.InputGroupButton,{size:`icon-xs`,variant:`ghost`,asChild:!0,"data-slot":`input-group-button`,className:`group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent`,disabled:r,children:(0,l.jsx)(As,{})}),o&&(0,l.jsx)(js,{disabled:r})]}),n]})}function Ns({className:e,side:n=`bottom`,sideOffset:r=6,align:i=`start`,alignOffset:a=0,anchor:o,...s}){return(0,l.jsx)(Po,{children:(0,l.jsx)(ns,{side:n,sideOffset:r,align:i,alignOffset:a,anchor:o,className:`isolate z-50`,children:(0,l.jsx)(is,{"data-slot":`combobox-content`,"data-chips":!!o,className:t.t(`group/combobox-content bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-lg shadow-md ring-1 duration-100 data-[chips=true]:min-w-(--anchor-width) *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:shadow-none`,e),...s})})})}function Ps({className:e,...n}){return(0,l.jsx)(Oo,{"data-slot":`combobox-list`,className:t.t(`no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-1 data-empty:p-0`,e),...n})}function Fs({className:e,children:n,...r}){return(0,l.jsxs)(hs,{"data-slot":`combobox-item`,className:t.t(`data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground relative flex w-full cursor-default items-center gap-2 rounded-md py-1 ps-1.5 pe-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...r,children:[n,(0,l.jsx)(xs,{render:(0,l.jsx)(`span`,{className:`pointer-events-none absolute end-2 flex size-4 items-center justify-center`}),children:(0,l.jsx)(a.CheckIcon,{className:`pointer-events-none`})})]})}function Is({className:e,...n}){return(0,l.jsx)(ss,{"data-slot":`combobox-group`,className:t.t(e),...n})}function Ls({className:e,...n}){return(0,l.jsx)(cs,{"data-slot":`combobox-label`,className:t.t(`text-muted-foreground px-2 py-1.5 text-xs`,e),...n})}function Rs({...e}){return(0,l.jsx)(Do,{"data-slot":`combobox-collection`,...e})}function zs({className:e,...n}){return(0,l.jsx)(gs,{"data-slot":`combobox-empty`,className:t.t(`text-muted-foreground hidden w-full justify-center py-2 text-center text-sm group-data-empty/combobox-content:flex`,e),...n})}function Bs({className:e,...n}){return(0,l.jsx)(Ds,{"data-slot":`combobox-separator`,className:t.t(`bg-border -mx-1 my-1 h-px`,e),...n})}function Vs({className:e,...n}){return(0,l.jsx)(Ss,{"data-slot":`combobox-chips`,className:t.t(`border-input focus-within:border-ring focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:ring-destructive/20 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40 flex min-h-8 flex-wrap items-center gap-1 rounded-lg border bg-transparent bg-clip-padding px-2.5 py-1 text-sm transition-colors focus-within:ring-3 has-aria-invalid:ring-3 has-data-[slot=combobox-chip]:px-1`,e),...n})}function Hs({className:e,children:n,showRemove:i=!0,...o}){return(0,l.jsxs)(Ts,{"data-slot":`combobox-chip`,className:t.t(`bg-muted text-foreground flex h-[calc(--spacing(5.25))] w-fit items-center justify-center gap-1 rounded-sm px-1.5 text-xs font-medium whitespace-nowrap has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pe-0`,e),...o,children:[n,i&&(0,l.jsx)(Es,{render:(0,l.jsx)(r.Button,{variant:`ghost`,size:`icon-xs`}),className:`-ms-1 opacity-50 hover:opacity-100`,"data-slot":`combobox-chip-remove`,children:(0,l.jsx)(a.XIcon,{className:`pointer-events-none`})})]})}function Us({className:e,...n}){return(0,l.jsx)(bo,{"data-slot":`combobox-chip-input`,className:t.t(`min-w-16 flex-1 outline-none`,e),...n})}function Ws(){return o.useRef(null)}Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return Rs}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return Is}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return Ls}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return Ps}}),Object.defineProperty(exports,"g",{enumerable:!0,get:function(){return Ws}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return ks}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return Us}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return Ms}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return As}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return Hs}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return Ns}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return Bs}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return Vs}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return zs}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return Os}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return Fs}});
|