import{c as Pe,r as n,Q as Re,g as Ne,j as r,U as mt,b as ht,u as Ie,d as gt,f as k,o as z,P as j,V as vt,Y as St,e as P,Z as xt,_ as Ee,h as wt,$ as yt,a0 as Ct,a1 as It,a2 as Tt,a3 as Nt,a4 as bt,a5 as Pt,a6 as Rt,l as G}from"./index-DdrMvM2x.js";import{u as Et,C as _e}from"./index-BscZTFRR.js";/**
 * @license lucide-react v0.507.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const _t=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],jt=Pe("check",_t);/**
 * @license lucide-react v0.507.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Mt=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],At=Pe("chevron-up",Mt);function Ot(t){const o=n.useRef({value:t,previous:t});return n.useMemo(()=>(o.current.value!==t&&(o.current.previous=o.current.value,o.current.value=t),o.current.previous),[t])}function be(t,[o,e]){return Math.min(e,Math.max(o,t))}var Dt=[" ","Enter","ArrowUp","ArrowDown"],Lt=[" ","Enter"],J="Select",[ie,de,kt]=gt(J),[oe]=ht(J,[kt,Re]),ue=Re(),[Bt,Y]=oe(J),[Vt,Ht]=oe(J),je=t=>{const{__scopeSelect:o,children:e,open:a,defaultOpen:i,onOpenChange:p,value:l,defaultValue:c,onValueChange:s,dir:f,name:v,autoComplete:w,disabled:N,required:b,form:T}=t,d=ue(o),[g,y]=n.useState(null),[u,h]=n.useState(null),[M,A]=n.useState(!1),ne=Et(f),[R,D]=Ne({prop:a,defaultProp:i??!1,onChange:p,caller:J}),[W,Z]=Ne({prop:l,defaultProp:c,onChange:s,caller:J}),B=n.useRef(null),V=g?T||!!g.closest("form"):!0,[K,H]=n.useState(new Set),U=Array.from(K).map(E=>E.props.value).join(";");return r.jsx(mt,{...d,children:r.jsxs(Bt,{required:b,scope:o,trigger:g,onTriggerChange:y,valueNode:u,onValueNodeChange:h,valueNodeHasChildren:M,onValueNodeHasChildrenChange:A,contentId:Ie(),value:W,onValueChange:Z,open:R,onOpenChange:D,dir:ne,triggerPointerDownPosRef:B,disabled:N,children:[r.jsx(ie.Provider,{scope:o,children:r.jsx(Vt,{scope:t.__scopeSelect,onNativeOptionAdd:n.useCallback(E=>{H(L=>new Set(L).add(E))},[]),onNativeOptionRemove:n.useCallback(E=>{H(L=>{const F=new Set(L);return F.delete(E),F})},[]),children:e})}),V?r.jsxs(tt,{"aria-hidden":!0,required:b,tabIndex:-1,name:v,autoComplete:w,value:W,onChange:E=>Z(E.target.value),disabled:N,form:T,children:[W===void 0?r.jsx("option",{value:""}):null,Array.from(K)]},U):null]})})};je.displayName=J;var Me="SelectTrigger",Ae=n.forwardRef((t,o)=>{const{__scopeSelect:e,disabled:a=!1,...i}=t,p=ue(e),l=Y(Me,e),c=l.disabled||a,s=k(o,l.onTriggerChange),f=de(e),v=n.useRef("touch"),[w,N,b]=nt(d=>{const g=f().filter(h=>!h.disabled),y=g.find(h=>h.value===l.value),u=rt(g,d,y);u!==void 0&&l.onValueChange(u.value)}),T=d=>{c||(l.onOpenChange(!0),b()),d&&(l.triggerPointerDownPosRef.current={x:Math.round(d.pageX),y:Math.round(d.pageY)})};return r.jsx(St,{asChild:!0,...p,children:r.jsx(j.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":ot(l.value)?"":void 0,...i,ref:s,onClick:P(i.onClick,d=>{d.currentTarget.focus(),v.current!=="mouse"&&T(d)}),onPointerDown:P(i.onPointerDown,d=>{v.current=d.pointerType;const g=d.target;g.hasPointerCapture(d.pointerId)&&g.releasePointerCapture(d.pointerId),d.button===0&&d.ctrlKey===!1&&d.pointerType==="mouse"&&(T(d),d.preventDefault())}),onKeyDown:P(i.onKeyDown,d=>{const g=w.current!=="";!(d.ctrlKey||d.altKey||d.metaKey)&&d.key.length===1&&N(d.key),!(g&&d.key===" ")&&Dt.includes(d.key)&&(T(),d.preventDefault())})})})});Ae.displayName=Me;var Oe="SelectValue",De=n.forwardRef((t,o)=>{const{__scopeSelect:e,className:a,style:i,children:p,placeholder:l="",...c}=t,s=Y(Oe,e),{onValueNodeHasChildrenChange:f}=s,v=p!==void 0,w=k(o,s.onValueNodeChange);return z(()=>{f(v)},[f,v]),r.jsx(j.span,{...c,ref:w,style:{pointerEvents:"none"},children:ot(s.value)?r.jsx(r.Fragment,{children:l}):p})});De.displayName=Oe;var Ut="SelectIcon",Le=n.forwardRef((t,o)=>{const{__scopeSelect:e,children:a,...i}=t;return r.jsx(j.span,{"aria-hidden":!0,...i,ref:o,children:a||"â–¼"})});Le.displayName=Ut;var Ft="SelectPortal",ke=t=>r.jsx(xt,{asChild:!0,...t});ke.displayName=Ft;var ee="SelectContent",Be=n.forwardRef((t,o)=>{const e=Y(ee,t.__scopeSelect),[a,i]=n.useState();if(z(()=>{i(new DocumentFragment)},[]),!e.open){const p=a;return p?Ee.createPortal(r.jsx(Ve,{scope:t.__scopeSelect,children:r.jsx(ie.Slot,{scope:t.__scopeSelect,children:r.jsx("div",{children:t.children})})}),p):null}return r.jsx(He,{...t,ref:o})});Be.displayName=ee;var O=10,[Ve,q]=oe(ee),Wt="SelectContentImpl",Kt=Tt("SelectContent.RemoveScroll"),He=n.forwardRef((t,o)=>{const{__scopeSelect:e,position:a="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:p,onPointerDownOutside:l,side:c,sideOffset:s,align:f,alignOffset:v,arrowPadding:w,collisionBoundary:N,collisionPadding:b,sticky:T,hideWhenDetached:d,avoidCollisions:g,...y}=t,u=Y(ee,e),[h,M]=n.useState(null),[A,ne]=n.useState(null),R=k(o,m=>M(m)),[D,W]=n.useState(null),[Z,B]=n.useState(null),V=de(e),[K,H]=n.useState(!1),U=n.useRef(!1);n.useEffect(()=>{if(h)return yt(h)},[h]),Ct();const E=n.useCallback(m=>{const[I,..._]=V().map(x=>x.ref.current),[C]=_.slice(-1),S=document.activeElement;for(const x of m)if(x===S||(x==null||x.scrollIntoView({block:"nearest"}),x===I&&A&&(A.scrollTop=0),x===C&&A&&(A.scrollTop=A.scrollHeight),x==null||x.focus(),document.activeElement!==S))return},[V,A]),L=n.useCallback(()=>E([D,h]),[E,D,h]);n.useEffect(()=>{K&&L()},[K,L]);const{onOpenChange:F,triggerPointerDownPosRef:$}=u;n.useEffect(()=>{if(h){let m={x:0,y:0};const I=C=>{var S,x;m={x:Math.abs(Math.round(C.pageX)-(((S=$.current)==null?void 0:S.x)??0)),y:Math.abs(Math.round(C.pageY)-(((x=$.current)==null?void 0:x.y)??0))}},_=C=>{m.x<=10&&m.y<=10?C.preventDefault():h.contains(C.target)||F(!1),document.removeEventListener("pointermove",I),$.current=null};return $.current!==null&&(document.addEventListener("pointermove",I),document.addEventListener("pointerup",_,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",I),document.removeEventListener("pointerup",_,{capture:!0})}}},[h,F,$]),n.useEffect(()=>{const m=()=>F(!1);return window.addEventListener("blur",m),window.addEventListener("resize",m),()=>{window.removeEventListener("blur",m),window.removeEventListener("resize",m)}},[F]);const[pe,ae]=nt(m=>{const I=V().filter(S=>!S.disabled),_=I.find(S=>S.ref.current===document.activeElement),C=rt(I,m,_);C&&setTimeout(()=>C.ref.current.focus())}),fe=n.useCallback((m,I,_)=>{const C=!U.current&&!_;(u.value!==void 0&&u.value===I||C)&&(W(m),C&&(U.current=!0))},[u.value]),me=n.useCallback(()=>h==null?void 0:h.focus(),[h]),te=n.useCallback((m,I,_)=>{const C=!U.current&&!_;(u.value!==void 0&&u.value===I||C)&&B(m)},[u.value]),le=a==="popper"?Se:Ue,re=le===Se?{side:c,sideOffset:s,align:f,alignOffset:v,arrowPadding:w,collisionBoundary:N,collisionPadding:b,sticky:T,hideWhenDetached:d,avoidCollisions:g}:{};return r.jsx(Ve,{scope:e,content:h,viewport:A,onViewportChange:ne,itemRefCallback:fe,selectedItem:D,onItemLeave:me,itemTextRefCallback:te,focusSelectedItem:L,selectedItemText:Z,position:a,isPositioned:K,searchRef:pe,children:r.jsx(It,{as:Kt,allowPinchZoom:!0,children:r.jsx(Nt,{asChild:!0,trapped:u.open,onMountAutoFocus:m=>{m.preventDefault()},onUnmountAutoFocus:P(i,m=>{var I;(I=u.trigger)==null||I.focus({preventScroll:!0}),m.preventDefault()}),children:r.jsx(bt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:m=>m.preventDefault(),onDismiss:()=>u.onOpenChange(!1),children:r.jsx(le,{role:"listbox",id:u.contentId,"data-state":u.open?"open":"closed",dir:u.dir,onContextMenu:m=>m.preventDefault(),...y,...re,onPlaced:()=>H(!0),ref:R,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:P(y.onKeyDown,m=>{const I=m.ctrlKey||m.altKey||m.metaKey;if(m.key==="Tab"&&m.preventDefault(),!I&&m.key.length===1&&ae(m.key),["ArrowUp","ArrowDown","Home","End"].includes(m.key)){let C=V().filter(S=>!S.disabled).map(S=>S.ref.current);if(["ArrowUp","End"].includes(m.key)&&(C=C.slice().reverse()),["ArrowUp","ArrowDown"].includes(m.key)){const S=m.target,x=C.indexOf(S);C=C.slice(x+1)}setTimeout(()=>E(C)),m.preventDefault()}})})})})})})});He.displayName=Wt;var $t="SelectItemAlignedPosition",Ue=n.forwardRef((t,o)=>{const{__scopeSelect:e,onPlaced:a,...i}=t,p=Y(ee,e),l=q(ee,e),[c,s]=n.useState(null),[f,v]=n.useState(null),w=k(o,R=>v(R)),N=de(e),b=n.useRef(!1),T=n.useRef(!0),{viewport:d,selectedItem:g,selectedItemText:y,focusSelectedItem:u}=l,h=n.useCallback(()=>{if(p.trigger&&p.valueNode&&c&&f&&d&&g&&y){const R=p.trigger.getBoundingClientRect(),D=f.getBoundingClientRect(),W=p.valueNode.getBoundingClientRect(),Z=y.getBoundingClientRect();if(p.dir!=="rtl"){const S=Z.left-D.left,x=W.left-S,X=R.left-x,Q=R.width+X,he=Math.max(Q,D.width),ge=window.innerWidth-O,ve=be(x,[O,Math.max(O,ge-he)]);c.style.minWidth=Q+"px",c.style.left=ve+"px"}else{const S=D.right-Z.right,x=window.innerWidth-W.right-S,X=window.innerWidth-R.right-x,Q=R.width+X,he=Math.max(Q,D.width),ge=window.innerWidth-O,ve=be(x,[O,Math.max(O,ge-he)]);c.style.minWidth=Q+"px",c.style.right=ve+"px"}const B=N(),V=window.innerHeight-O*2,K=d.scrollHeight,H=window.getComputedStyle(f),U=parseInt(H.borderTopWidth,10),E=parseInt(H.paddingTop,10),L=parseInt(H.borderBottomWidth,10),F=parseInt(H.paddingBottom,10),$=U+E+K+F+L,pe=Math.min(g.offsetHeight*5,$),ae=window.getComputedStyle(d),fe=parseInt(ae.paddingTop,10),me=parseInt(ae.paddingBottom,10),te=R.top+R.height/2-O,le=V-te,re=g.offsetHeight/2,m=g.offsetTop+re,I=U+E+m,_=$-I;if(I<=te){const S=B.length>0&&g===B[B.length-1].ref.current;c.style.bottom="0px";const x=f.clientHeight-d.offsetTop-d.offsetHeight,X=Math.max(le,re+(S?me:0)+x+L),Q=I+X;c.style.height=Q+"px"}else{const S=B.length>0&&g===B[0].ref.current;c.style.top="0px";const X=Math.max(te,U+d.offsetTop+(S?fe:0)+re)+_;c.style.height=X+"px",d.scrollTop=I-te+d.offsetTop}c.style.margin=`${O}px 0`,c.style.minHeight=pe+"px",c.style.maxHeight=V+"px",a==null||a(),requestAnimationFrame(()=>b.current=!0)}},[N,p.trigger,p.valueNode,c,f,d,g,y,p.dir,a]);z(()=>h(),[h]);const[M,A]=n.useState();z(()=>{f&&A(window.getComputedStyle(f).zIndex)},[f]);const ne=n.useCallback(R=>{R&&T.current===!0&&(h(),u==null||u(),T.current=!1)},[h,u]);return r.jsx(Gt,{scope:e,contentWrapper:c,shouldExpandOnScrollRef:b,onScrollButtonChange:ne,children:r.jsx("div",{ref:s,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:M},children:r.jsx(j.div,{...i,ref:w,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});Ue.displayName=$t;var zt="SelectPopperPosition",Se=n.forwardRef((t,o)=>{const{__scopeSelect:e,align:a="start",collisionPadding:i=O,...p}=t,l=ue(e);return r.jsx(Pt,{...l,...p,ref:o,align:a,collisionPadding:i,style:{boxSizing:"border-box",...p.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Se.displayName=zt;var[Gt,Te]=oe(ee,{}),xe="SelectViewport",Fe=n.forwardRef((t,o)=>{const{__scopeSelect:e,nonce:a,...i}=t,p=q(xe,e),l=Te(xe,e),c=k(o,p.onViewportChange),s=n.useRef(0);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),r.jsx(ie.Slot,{scope:e,children:r.jsx(j.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:P(i.onScroll,f=>{const v=f.currentTarget,{contentWrapper:w,shouldExpandOnScrollRef:N}=l;if(N!=null&&N.current&&w){const b=Math.abs(s.current-v.scrollTop);if(b>0){const T=window.innerHeight-O*2,d=parseFloat(w.style.minHeight),g=parseFloat(w.style.height),y=Math.max(d,g);if(y<T){const u=y+b,h=Math.min(T,u),M=u-h;w.style.height=h+"px",w.style.bottom==="0px"&&(v.scrollTop=M>0?M:0,w.style.justifyContent="flex-end")}}}s.current=v.scrollTop})})})]})});Fe.displayName=xe;var We="SelectGroup",[Yt,qt]=oe(We),Zt=n.forwardRef((t,o)=>{const{__scopeSelect:e,...a}=t,i=Ie();return r.jsx(Yt,{scope:e,id:i,children:r.jsx(j.div,{role:"group","aria-labelledby":i,...a,ref:o})})});Zt.displayName=We;var Ke="SelectLabel",$e=n.forwardRef((t,o)=>{const{__scopeSelect:e,...a}=t,i=qt(Ke,e);return r.jsx(j.div,{id:i.id,...a,ref:o})});$e.displayName=Ke;var ce="SelectItem",[Xt,ze]=oe(ce),Ge=n.forwardRef((t,o)=>{const{__scopeSelect:e,value:a,disabled:i=!1,textValue:p,...l}=t,c=Y(ce,e),s=q(ce,e),f=c.value===a,[v,w]=n.useState(p??""),[N,b]=n.useState(!1),T=k(o,u=>{var h;return(h=s.itemRefCallback)==null?void 0:h.call(s,u,a,i)}),d=Ie(),g=n.useRef("touch"),y=()=>{i||(c.onValueChange(a),c.onOpenChange(!1))};if(a==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return r.jsx(Xt,{scope:e,value:a,disabled:i,textId:d,isSelected:f,onItemTextChange:n.useCallback(u=>{w(h=>h||((u==null?void 0:u.textContent)??"").trim())},[]),children:r.jsx(ie.ItemSlot,{scope:e,value:a,disabled:i,textValue:v,children:r.jsx(j.div,{role:"option","aria-labelledby":d,"data-highlighted":N?"":void 0,"aria-selected":f&&N,"data-state":f?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...l,ref:T,onFocus:P(l.onFocus,()=>b(!0)),onBlur:P(l.onBlur,()=>b(!1)),onClick:P(l.onClick,()=>{g.current!=="mouse"&&y()}),onPointerUp:P(l.onPointerUp,()=>{g.current==="mouse"&&y()}),onPointerDown:P(l.onPointerDown,u=>{g.current=u.pointerType}),onPointerMove:P(l.onPointerMove,u=>{var h;g.current=u.pointerType,i?(h=s.onItemLeave)==null||h.call(s):g.current==="mouse"&&u.currentTarget.focus({preventScroll:!0})}),onPointerLeave:P(l.onPointerLeave,u=>{var h;u.currentTarget===document.activeElement&&((h=s.onItemLeave)==null||h.call(s))}),onKeyDown:P(l.onKeyDown,u=>{var M;((M=s.searchRef)==null?void 0:M.current)!==""&&u.key===" "||(Lt.includes(u.key)&&y(),u.key===" "&&u.preventDefault())})})})})});Ge.displayName=ce;var se="SelectItemText",Ye=n.forwardRef((t,o)=>{const{__scopeSelect:e,className:a,style:i,...p}=t,l=Y(se,e),c=q(se,e),s=ze(se,e),f=Ht(se,e),[v,w]=n.useState(null),N=k(o,y=>w(y),s.onItemTextChange,y=>{var u;return(u=c.itemTextRefCallback)==null?void 0:u.call(c,y,s.value,s.disabled)}),b=v==null?void 0:v.textContent,T=n.useMemo(()=>r.jsx("option",{value:s.value,disabled:s.disabled,children:b},s.value),[s.disabled,s.value,b]),{onNativeOptionAdd:d,onNativeOptionRemove:g}=f;return z(()=>(d(T),()=>g(T)),[d,g,T]),r.jsxs(r.Fragment,{children:[r.jsx(j.span,{id:s.textId,...p,ref:N}),s.isSelected&&l.valueNode&&!l.valueNodeHasChildren?Ee.createPortal(p.children,l.valueNode):null]})});Ye.displayName=se;var qe="SelectItemIndicator",Ze=n.forwardRef((t,o)=>{const{__scopeSelect:e,...a}=t;return ze(qe,e).isSelected?r.jsx(j.span,{"aria-hidden":!0,...a,ref:o}):null});Ze.displayName=qe;var we="SelectScrollUpButton",Xe=n.forwardRef((t,o)=>{const e=q(we,t.__scopeSelect),a=Te(we,t.__scopeSelect),[i,p]=n.useState(!1),l=k(o,a.onScrollButtonChange);return z(()=>{if(e.viewport&&e.isPositioned){let c=function(){const f=s.scrollTop>0;p(f)};const s=e.viewport;return c(),s.addEventListener("scroll",c),()=>s.removeEventListener("scroll",c)}},[e.viewport,e.isPositioned]),i?r.jsx(Je,{...t,ref:l,onAutoScroll:()=>{const{viewport:c,selectedItem:s}=e;c&&s&&(c.scrollTop=c.scrollTop-s.offsetHeight)}}):null});Xe.displayName=we;var ye="SelectScrollDownButton",Qe=n.forwardRef((t,o)=>{const e=q(ye,t.__scopeSelect),a=Te(ye,t.__scopeSelect),[i,p]=n.useState(!1),l=k(o,a.onScrollButtonChange);return z(()=>{if(e.viewport&&e.isPositioned){let c=function(){const f=s.scrollHeight-s.clientHeight,v=Math.ceil(s.scrollTop)<f;p(v)};const s=e.viewport;return c(),s.addEventListener("scroll",c),()=>s.removeEventListener("scroll",c)}},[e.viewport,e.isPositioned]),i?r.jsx(Je,{...t,ref:l,onAutoScroll:()=>{const{viewport:c,selectedItem:s}=e;c&&s&&(c.scrollTop=c.scrollTop+s.offsetHeight)}}):null});Qe.displayName=ye;var Je=n.forwardRef((t,o)=>{const{__scopeSelect:e,onAutoScroll:a,...i}=t,p=q("SelectScrollButton",e),l=n.useRef(null),c=de(e),s=n.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return n.useEffect(()=>()=>s(),[s]),z(()=>{var v;const f=c().find(w=>w.ref.current===document.activeElement);(v=f==null?void 0:f.ref.current)==null||v.scrollIntoView({block:"nearest"})},[c]),r.jsx(j.div,{"aria-hidden":!0,...i,ref:o,style:{flexShrink:0,...i.style},onPointerDown:P(i.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(a,50))}),onPointerMove:P(i.onPointerMove,()=>{var f;(f=p.onItemLeave)==null||f.call(p),l.current===null&&(l.current=window.setInterval(a,50))}),onPointerLeave:P(i.onPointerLeave,()=>{s()})})}),Qt="SelectSeparator",et=n.forwardRef((t,o)=>{const{__scopeSelect:e,...a}=t;return r.jsx(j.div,{"aria-hidden":!0,...a,ref:o})});et.displayName=Qt;var Ce="SelectArrow",Jt=n.forwardRef((t,o)=>{const{__scopeSelect:e,...a}=t,i=ue(e),p=Y(Ce,e),l=q(Ce,e);return p.open&&l.position==="popper"?r.jsx(Rt,{...i,...a,ref:o}):null});Jt.displayName=Ce;var eo="SelectBubbleInput",tt=n.forwardRef(({__scopeSelect:t,value:o,...e},a)=>{const i=n.useRef(null),p=k(a,i),l=Ot(o);return n.useEffect(()=>{const c=i.current;if(!c)return;const s=window.HTMLSelectElement.prototype,v=Object.getOwnPropertyDescriptor(s,"value").set;if(l!==o&&v){const w=new Event("change",{bubbles:!0});v.call(c,o),c.dispatchEvent(w)}},[l,o]),r.jsx(j.select,{...e,style:{...vt,...e.style},ref:p,defaultValue:o})});tt.displayName=eo;function ot(t){return t===""||t===void 0}function nt(t){const o=wt(t),e=n.useRef(""),a=n.useRef(0),i=n.useCallback(l=>{const c=e.current+l;o(c),function s(f){e.current=f,window.clearTimeout(a.current),f!==""&&(a.current=window.setTimeout(()=>s(""),1e3))}(c)},[o]),p=n.useCallback(()=>{e.current="",window.clearTimeout(a.current)},[]);return n.useEffect(()=>()=>window.clearTimeout(a.current),[]),[e,i,p]}function rt(t,o,e){const i=o.length>1&&Array.from(o).every(f=>f===o[0])?o[0]:o,p=e?t.indexOf(e):-1;let l=to(t,Math.max(p,0));i.length===1&&(l=l.filter(f=>f!==e));const s=l.find(f=>f.textValue.toLowerCase().startsWith(i.toLowerCase()));return s!==e?s:void 0}function to(t,o){return t.map((e,a)=>t[(o+a)%t.length])}var oo=je,st=Ae,no=De,ro=Le,so=ke,at=Be,ao=Fe,lt=$e,ct=Ge,lo=Ye,co=Ze,it=Xe,dt=Qe,ut=et;const vo=oo,So=no,io=n.forwardRef(({className:t,children:o,...e},a)=>r.jsxs(st,{ref:a,className:G("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...e,children:[o,r.jsx(ro,{asChild:!0,children:r.jsx(_e,{className:"h-4 w-4 opacity-50"})})]}));io.displayName=st.displayName;const pt=n.forwardRef(({className:t,...o},e)=>r.jsx(it,{ref:e,className:G("flex cursor-default items-center justify-center py-1",t),...o,children:r.jsx(At,{className:"h-4 w-4"})}));pt.displayName=it.displayName;const ft=n.forwardRef(({className:t,...o},e)=>r.jsx(dt,{ref:e,className:G("flex cursor-default items-center justify-center py-1",t),...o,children:r.jsx(_e,{className:"h-4 w-4"})}));ft.displayName=dt.displayName;const uo=n.forwardRef(({className:t,children:o,position:e="popper",...a},i)=>r.jsx(so,{children:r.jsxs(at,{ref:i,className:G("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-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",e==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:e,...a,children:[r.jsx(pt,{}),r.jsx(ao,{className:G("p-1",e==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:o}),r.jsx(ft,{})]})}));uo.displayName=at.displayName;const po=n.forwardRef(({className:t,...o},e)=>r.jsx(lt,{ref:e,className:G("py-1.5 pl-8 pr-2 text-sm font-semibold",t),...o}));po.displayName=lt.displayName;const fo=n.forwardRef(({className:t,children:o,...e},a)=>r.jsxs(ct,{ref:a,className:G("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...e,children:[r.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsx(co,{children:r.jsx(jt,{className:"h-4 w-4"})})}),r.jsx(lo,{children:o})]}));fo.displayName=ct.displayName;const mo=n.forwardRef(({className:t,...o},e)=>r.jsx(ut,{ref:e,className:G("-mx-1 my-1 h-px bg-muted",t),...o}));mo.displayName=ut.displayName;export{vo as S,io as a,So as b,uo as c,fo as d,Ot as u};