PageSourceSearch

https://lacuna.pub/build/assets/select-4pNd00RO.js

js lacuna.pub collected 2026-09-25 14:51:31 UTC 21,831 bytes, 1 lines download raw bytes

1import{r as o,j as n}from"./app-D2hV7Ye0.js";import{P as j,r as _e}from"./index-BNFNzlHy.js";import{c as be}from"./index-BdQq_4o_.js";import{u as Pe,c as _}from"./index-BmFr46Vn.js";import{u as ot,c as nt}from"./index-Bo7Wje6-.js";import{u as k,c as rt}from"./index-B5tBDOjF.js";import{c as st,u as G}from"./index-BL0FjItE.js";import{P as lt,h as at,u as it,R as ct,F as dt,D as ut}from"./index-BtE-9Gto.js";import{u as Ie}from"./index-BZ_b4_7V.js";import{a as Ne,R as pt,A as ft,C as mt,b as ht}from"./index-BIFLPTiR.js";import{u as vt}from"./index-WoiXmNGs.js";import{u as gt}from"./index-B8rN2q8u.js";import{V as xt}from"./index-BBkYbNbj.js";import{c as te}from"./utils-DBwg5IJ2.js";import Ee from"./chevron-down-BiqcCRgP.js";import St from"./check-CmArdozu.js";import wt from"./chevron-up-B3sU-l2r.js";var yt=[" ","Enter","ArrowUp","ArrowDown"],Ct=[" ","Enter"],J="Select",[ce,de,It]=nt(J),[oe,Co]=st(J,[It,Ne]),ue=Ne(),[Tt,$]=oe(J),[bt,Pt]=oe(J),Re=t=>{const{__scopeSelect:r,children:e,open:c,defaultOpen:i,onOpenChange:p,value:l,defaultValue:a,onValueChange:s,dir:f,name:g,autoComplete:w,disabled:b,required:P,form:T}=t,d=ue(r),[v,y]=o.useState(null),[u,h]=o.useState(null),[M,A]=o.useState(!1),ne=ot(f),[N,O]=Pe({prop:c,defaultProp:i??!1,onChange:p,caller:J}),[W,q]=Pe({prop:l,defaultProp:a,onChange:s,caller:J}),B=o.useRef(null),V=v?T||!!v.closest("form"):!0,[K,H]=o.useState(new Set),F=Array.from(K).map(E=>E.props.value).join(";");return n.jsx(pt,{...d,children:n.jsxs(Tt,{required:P,scope:r,trigger:v,onTriggerChange:y,valueNode:u,onValueNodeChange:h,valueNodeHasChildren:M,onValueNodeHasChildrenChange:A,contentId:Ie(),value:W,onValueChange:q,open:N,onOpenChange:O,dir:ne,triggerPointerDownPosRef:B,disabled:b,children:[n.jsx(ce.Provider,{scope:r,children:n.jsx(bt,{scope:t.__scopeSelect,onNativeOptionAdd:o.useCallback(E=>{H(L=>new Set(L).add(E))},[]),onNativeOptionRemove:o.useCallback(E=>{H(L=>{const U=new Set(L);return U.delete(E),U})},[]),children:e})}),V?n.jsxs(Je,{"aria-hidden":!0,required:P,tabIndex:-1,name:g,autoComplete:w,value:W,onChange:E=>q(E.target.value),disabled:b,form:T,children:[W===void 0?n.jsx("option",{value:""}):null,Array.from(K)]},F):null]})})};Re.displayName=J;var je="SelectTrigger",Me=o.forwardRef((t,r)=>{const{__scopeSelect:e,disabled:c=!1,...i}=t,p=ue(e),l=$(je,e),a=l.disabled||c,s=k(r,l.onTriggerChange),f=de(e),g=o.useRef("touch"),[w,b,P]=et(d=>{const v=f().filter(h=>!h.disabled),y=v.find(h=>h.value===l.value),u=tt(v,d,y);u!==void 0&&l.onValueChange(u.value)}),T=d=>{a||(l.onOpenChange(!0),P()),d&&(l.triggerPointerDownPosRef.current={x:Math.round(d.pageX),y:Math.round(d.pageY)})};return n.jsx(ft,{asChild:!0,...p,children:n.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:a,"data-disabled":a?"":void 0,"data-placeholder":Qe(l.value)?"":void 0,...i,ref:s,onClick:_(i.onClick,d=>{d.currentTarget.focus(),g.current!=="mouse"&&T(d)}),onPointerDown:_(i.onPointerDown,d=>{g.current=d.pointerType;const v=d.target;v.hasPointerCapture(d.pointerId)&&v.releasePointerCapture(d.pointerId),d.button===0&&d.ctrlKey===!1&&d.pointerType==="mouse"&&(T(d),d.preventDefault())}),onKeyDown:_(i.onKeyDown,d=>{const v=w.current!=="";!(d.ctrlKey||d.altKey||d.metaKey)&&d.key.length===1&&b(d.key),!(v&&d.key===" ")&&yt.includes(d.key)&&(T(),d.preventDefault())})})})});Me.displayName=je;var Ae="SelectValue",De=o.forwardRef((t,r)=>{const{__scopeSelect:e,className:c,style:i,children:p,placeholder:l="",...a}=t,s=$(Ae,e),{onValueNodeHasChildrenChange:f}=s,g=p!==void 0,w=k(r,s.onValueNodeChange);return G(()=>{f(g)},[f,g]),n.jsx(j.span,{...a,ref:w,style:{pointerEvents:"none"},children:Qe(s.value)?n.jsx(n.Fragment,{children:l}):p})});De.displayName=Ae;var _t="SelectIcon",Oe=o.forwardRef((t,r)=>{const{__scopeSelect:e,children:c,...i}=t;return n.jsx(j.span,{"aria-hidden":!0,...i,ref:r,children:c||"▼"})});Oe.displayName=_t;var Nt="SelectPortal",Le=t=>n.jsx(lt,{asChild:!0,...t});
1Le.displayName=Nt;var Q="SelectContent",ke=o.forwardRef((t,r)=>{const e=$(Q,t.__scopeSelect),[c,i]=o.useState();if(G(()=>{i(new DocumentFragment)},[]),!e.open){const p=c;return p?_e.createPortal(n.jsx(Be,{scope:t.__scopeSelect,children:n.jsx(ce.Slot,{scope:t.__scopeSelect,children:n.jsx("div",{children:t.children})})}),p):null}return n.jsx(Ve,{...t,ref:r})});ke.displayName=Q;var D=10,[Be,Y]=oe(Q),Et="SelectContentImpl",Rt=rt("SelectContent.RemoveScroll"),Ve=o.forwardRef((t,r)=>{const{__scopeSelect:e,position:c="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:p,onPointerDownOutside:l,side:a,sideOffset:s,align:f,alignOffset:g,arrowPadding:w,collisionBoundary:b,collisionPadding:P,sticky:T,hideWhenDetached:d,avoidCollisions:v,...y}=t,u=$(Q,e),[h,M]=o.useState(null),[A,ne]=o.useState(null),N=k(r,m=>M(m)),[O,W]=o.useState(null),[q,B]=o.useState(null),V=de(e),[K,H]=o.useState(!1),F=o.useRef(!1);o.useEffect(()=>{if(h)return at(h)},[h]),it();const E=o.useCallback(m=>{const[I,...R]=V().map(S=>S.ref.current),[C]=R.slice(-1),x=document.activeElement;for(const S of m)if(S===x||(S==null||S.scrollIntoView({block:"nearest"}),S===I&&A&&(A.scrollTop=0),S===C&&A&&(A.scrollTop=A.scrollHeight),S==null||S.focus(),document.activeElement!==x))return},[V,A]),L=o.useCallback(()=>E([O,h]),[E,O,h]);o.useEffect(()=>{K&&L()},[K,L]);const{onOpenChange:U,triggerPointerDownPosRef:z}=u;o.useEffect(()=>{if(h){let m={x:0,y:0};const I=C=>{var x,S;m={x:Math.abs(Math.round(C.pageX)-(((x=z.current)==null?void 0:x.x)??0)),y:Math.abs(Math.round(C.pageY)-(((S=z.current)==null?void 0:S.y)??0))}},R=C=>{m.x<=10&&m.y<=10?C.preventDefault():h.contains(C.target)||U(!1),document.removeEventListener("pointermove",I),z.current=null};return z.current!==null&&(document.addEventListener("pointermove",I),document.addEventListener("pointerup",R,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",I),document.removeEventListener("pointerup",R,{capture:!0})}}},[h,U,z]),o.useEffect(()=>{const m=()=>U(!1);return window.addEventListener("blur",m),window.addEventListener("resize",m),()=>{window.removeEventListener("blur",m),window.removeEventListener("resize",m)}},[U]);const[pe,le]=et(m=>{const I=V().filter(x=>!x.disabled),R=I.find(x=>x.ref.current===document.activeElement),C=tt(I,m,R);C&&setTimeout(()=>C.ref.current.focus())}),fe=o.useCallback((m,I,R)=>{const C=!F.current&&!R;(u.value!==void 0&&u.value===I||C)&&(W(m),C&&(F.current=!0))},[u.value]),me=o.useCallback(()=>h==null?void 0:h.focus(),[h]),ee=o.useCallback((m,I,R)=>{const C=!F.current&&!R;(u.value!==void 0&&u.value===I||C)&&B(m)},[u.value]),ae=c==="popper"?xe:He,re=ae===xe?{side:a,sideOffset:s,align:f,alignOffset:g,arrowPadding:w,collisionBoundary:b,collisionPadding:P,sticky:T,hideWhenDetached:d,avoidCollisions:v}:{};return n.jsx(Be,{scope:e,content:h,viewport:A,onViewportChange:ne,itemRefCallback:fe,selectedItem:O,onItemLeave:me,itemTextRefCallback:ee,focusSelectedItem:L,selectedItemText:q,position:c,isPositioned:K,searchRef:pe,children:n.jsx(ct,{as:Rt,allowPinchZoom:!0,children:n.jsx(dt,{asChild:!0,trapped:u.open,onMountAutoFocus:m=>{m.preventDefault()},onUnmountAutoFocus:_(i,m=>{var I;(I=u.trigger)==null||I.focus({preventScroll:!0}),m.preventDefault()}),children:n.jsx(ut,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:m=>m.preventDefault(),onDismiss:()=>u.onOpenChange(!1),children:n.jsx(ae,{role:"listbox",id:u.contentId,"data-state":u.open?"open":"closed",dir:u.dir,onContextMenu:m=>m.preventDefault(),...y,...re,onPlaced:()=>H(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:_(y.onKeyDown,m=>{const I=m.ctrlKey||m.altKey||m.metaKey;if(m.key==="Tab"&&m.preventDefault(),!I&&m.key.length===1&&le(m.key),["ArrowUp","ArrowDown","Home","End"].includes(m.key)){let C=V().filter(x=>!x.disabled).map(x=>x.ref.current);if(["ArrowUp","End"].includes(m.key)&&(C=C.slice().reverse()),["ArrowUp","ArrowDown"].includes(m.key)){const x=m.target,S=C.indexOf(x);C=C.slice(S+1)}setTimeout(()=>E(C)),m.preventDefault()}})})})})})})});Ve.displayName=Et;var jt="SelectItemAlignedPosition",He=o.forwardRef((t,r)=>{const{__scopeSelect:e,onPlaced:c,...i}=t,p=$(Q,e),l=Y(Q,e),[a,s]=o.useState(null),[f,g]=o.useState(null),w=k(r,N=>g(N)),b=de(e),P=o.useRef(!1),T=o.useRef(!0),{viewport:d,selectedItem:v,selectedItemText:y,focusSelectedItem:u}=l,h=o.useCallback(()=>
1{if(p.trigger&&p.valueNode&&a&&f&&d&&v&&y){const N=p.trigger.getBoundingClientRect(),O=f.getBoundingClientRect(),W=p.valueNode.getBoundingClientRect(),q=y.getBoundingClientRect();if(p.dir!=="rtl"){const x=q.left-O.left,S=W.left-x,X=N.left-S,Z=N.width+X,he=Math.max(Z,O.width),ve=window.innerWidth-D,ge=be(S,[D,Math.max(D,ve-he)]);a.style.minWidth=Z+"px",a.style.left=ge+"px"}else{const x=O.right-q.right,S=window.innerWidth-W.right-x,X=window.innerWidth-N.right-S,Z=N.width+X,he=Math.max(Z,O.width),ve=window.innerWidth-D,ge=be(S,[D,Math.max(D,ve-he)]);a.style.minWidth=Z+"px",a.style.right=ge+"px"}const B=b(),V=window.innerHeight-D*2,K=d.scrollHeight,H=window.getComputedStyle(f),F=parseInt(H.borderTopWidth,10),E=parseInt(H.paddingTop,10),L=parseInt(H.borderBottomWidth,10),U=parseInt(H.paddingBottom,10),z=F+E+K+U+L,pe=Math.min(v.offsetHeight*5,z),le=window.getComputedStyle(d),fe=parseInt(le.paddingTop,10),me=parseInt(le.paddingBottom,10),ee=N.top+N.height/2-D,ae=V-ee,re=v.offsetHeight/2,m=v.offsetTop+re,I=F+E+m,R=z-I;if(I<=ee){const x=B.length>0&&v===B[B.length-1].ref.current;a.style.bottom="0px";const S=f.clientHeight-d.offsetTop-d.offsetHeight,X=Math.max(ae,re+(x?me:0)+S+L),Z=I+X;a.style.height=Z+"px"}else{const x=B.length>0&&v===B[0].ref.current;a.style.top="0px";const X=Math.max(ee,F+d.offsetTop+(x?fe:0)+re)+R;a.style.height=X+"px",d.scrollTop=I-ee+d.offsetTop}a.style.margin=`${D}px 0`,a.style.minHeight=pe+"px",a.style.maxHeight=V+"px",c==null||c(),requestAnimationFrame(()=>P.current=!0)}},[b,p.trigger,p.valueNode,a,f,d,v,y,p.dir,c]);G(()=>h(),[h]);const[M,A]=o.useState();G(()=>{f&&A(window.getComputedStyle(f).zIndex)},[f]);const ne=o.useCallback(N=>{N&&T.current===!0&&(h(),u==null||u(),T.current=!1)},[h,u]);return n.jsx(At,{scope:e,contentWrapper:a,shouldExpandOnScrollRef:P,onScrollButtonChange:ne,children:n.jsx("div",{ref:s,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:M},children:n.jsx(j.div,{...i,ref:w,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});He.displayName=jt;var Mt="SelectPopperPosition",xe=o.forwardRef((t,r)=>{const{__scopeSelect:e,align:c="start",collisionPadding:i=D,...p}=t,l=ue(e);return n.jsx(mt,{...l,...p,ref:r,align:c,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)"}})});xe.displayName=Mt;var[At,Te]=oe(Q,{}),Se="SelectViewport",Fe=o.forwardRef((t,r)=>{const{__scopeSelect:e,nonce:c,...i}=t,p=Y(Se,e),l=Te(Se,e),a=k(r,p.onViewportChange),s=o.useRef(0);return n.jsxs(n.Fragment,{children:[n.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:c}),n.jsx(ce.Slot,{scope:e,children:n.jsx(j.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:_(i.onScroll,f=>{const g=f.currentTarget,{contentWrapper:w,shouldExpandOnScrollRef:b}=l;if(b!=null&&b.current&&w){const P=Math.abs(s.current-g.scrollTop);if(P>0){const T=window.innerHeight-D*2,d=parseFloat(w.style.minHeight),v=parseFloat(w.style.height),y=Math.max(d,v);if(y<T){const u=y+P,h=Math.min(T,u),M=u-h;w.style.height=h+"px",w.style.bottom==="0px"&&(g.scrollTop=M>0?M:0,w.style.justifyContent="flex-end")}}}s.current=g.scrollTop})})})]})});Fe.displayName=Se;var Ue="SelectGroup",[Dt,Ot]=oe(Ue),Lt=o.forwardRef((t,r)=>{const{__scopeSelect:e,...c}=t,i=Ie();return n.jsx(Dt,{scope:e,id:i,children:n.jsx(j.div,{role:"group","aria-labelledby":i,...c,ref:r})})});Lt.displayName=Ue;var We="SelectLabel",kt=o.forwardRef((t,r)=>{const{__scopeSelect:e,...c}=t,i=Ot(We,e);return n.jsx(j.div,{id:i.id,...c,ref:r})});kt.displayName=We;var ie="SelectItem",[Bt,Ke]=oe(ie),ze=o.forwardRef((t,r)=>{const{__scopeSelect:e,value:c,disabled:i=!1,textValue:p,...l}=t,a=$(ie,e),s=Y(ie,e),f=a.value===c,[g,w]=o.useState(p??""),[b,P]=o.useState(!1),T=k(r,u=>{var h;
1return(h=s.itemRefCallback)==null?void 0:h.call(s,u,c,i)}),d=Ie(),v=o.useRef("touch"),y=()=>{i||(a.onValueChange(c),a.onOpenChange(!1))};if(c==="")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 n.jsx(Bt,{scope:e,value:c,disabled:i,textId:d,isSelected:f,onItemTextChange:o.useCallback(u=>{w(h=>h||((u==null?void 0:u.textContent)??"").trim())},[]),children:n.jsx(ce.ItemSlot,{scope:e,value:c,disabled:i,textValue:g,children:n.jsx(j.div,{role:"option","aria-labelledby":d,"data-highlighted":b?"":void 0,"aria-selected":f&&b,"data-state":f?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...l,ref:T,onFocus:_(l.onFocus,()=>P(!0)),onBlur:_(l.onBlur,()=>P(!1)),onClick:_(l.onClick,()=>{v.current!=="mouse"&&y()}),onPointerUp:_(l.onPointerUp,()=>{v.current==="mouse"&&y()}),onPointerDown:_(l.onPointerDown,u=>{v.current=u.pointerType}),onPointerMove:_(l.onPointerMove,u=>{var h;v.current=u.pointerType,i?(h=s.onItemLeave)==null||h.call(s):v.current==="mouse"&&u.currentTarget.focus({preventScroll:!0})}),onPointerLeave:_(l.onPointerLeave,u=>{var h;u.currentTarget===document.activeElement&&((h=s.onItemLeave)==null||h.call(s))}),onKeyDown:_(l.onKeyDown,u=>{var M;((M=s.searchRef)==null?void 0:M.current)!==""&&u.key===" "||(Ct.includes(u.key)&&y(),u.key===" "&&u.preventDefault())})})})})});ze.displayName=ie;var se="SelectItemText",Ge=o.forwardRef((t,r)=>{const{__scopeSelect:e,className:c,style:i,...p}=t,l=$(se,e),a=Y(se,e),s=Ke(se,e),f=Pt(se,e),[g,w]=o.useState(null),b=k(r,y=>w(y),s.onItemTextChange,y=>{var u;return(u=a.itemTextRefCallback)==null?void 0:u.call(a,y,s.value,s.disabled)}),P=g==null?void 0:g.textContent,T=o.useMemo(()=>n.jsx("option",{value:s.value,disabled:s.disabled,children:P},s.value),[s.disabled,s.value,P]),{onNativeOptionAdd:d,onNativeOptionRemove:v}=f;return G(()=>(d(T),()=>v(T)),[d,v,T]),n.jsxs(n.Fragment,{children:[n.jsx(j.span,{id:s.textId,...p,ref:b}),s.isSelected&&l.valueNode&&!l.valueNodeHasChildren?_e.createPortal(p.children,l.valueNode):null]})});Ge.displayName=se;var $e="SelectItemIndicator",Ye=o.forwardRef((t,r)=>{const{__scopeSelect:e,...c}=t;return Ke($e,e).isSelected?n.jsx(j.span,{"aria-hidden":!0,...c,ref:r}):null});Ye.displayName=$e;var we="SelectScrollUpButton",qe=o.forwardRef((t,r)=>{const e=Y(we,t.__scopeSelect),c=Te(we,t.__scopeSelect),[i,p]=o.useState(!1),l=k(r,c.onScrollButtonChange);return G(()=>{if(e.viewport&&e.isPositioned){let a=function(){const f=s.scrollTop>0;p(f)};const s=e.viewport;return a(),s.addEventListener("scroll",a),()=>s.removeEventListener("scroll",a)}},[e.viewport,e.isPositioned]),i?n.jsx(Ze,{...t,ref:l,onAutoScroll:()=>{const{viewport:a,selectedItem:s}=e;a&&s&&(a.scrollTop=a.scrollTop-s.offsetHeight)}}):null});qe.displayName=we;var ye="SelectScrollDownButton",Xe=o.forwardRef((t,r)=>{const e=Y(ye,t.__scopeSelect),c=Te(ye,t.__scopeSelect),[i,p]=o.useState(!1),l=k(r,c.onScrollButtonChange);return G(()=>{if(e.viewport&&e.isPositioned){let a=function(){const f=s.scrollHeight-s.clientHeight,g=Math.ceil(s.scrollTop)<f;p(g)};const s=e.viewport;return a(),s.addEventListener("scroll",a),()=>s.removeEventListener("scroll",a)}},[e.viewport,e.isPositioned]),i?n.jsx(Ze,{...t,ref:l,onAutoScroll:()=>{const{viewport:a,selectedItem:s}=e;a&&s&&(a.scrollTop=a.scrollTop+s.offsetHeight)}}):null});Xe.displayName=ye;var Ze=o.forwardRef((t,r)=>{const{__scopeSelect:e,onAutoScroll:c,...i}=t,p=Y("SelectScrollButton",e),l=o.useRef(null),a=de(e),s=o.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return o.useEffect(()=>()=>s(),[s]),G(()=>{var g;const f=a().find(w=>w.ref.current===document.activeElement);(g=f==null?void 0:f.ref.current)==null||g.scrollIntoView({block:"nearest"})},[a]),n.jsx(j.div,{"aria-hidden":!0,...i,ref:r,style:{flexShrink:0,...i.style},onPointerDown:_(i.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(c,50))}),onPointerMove:_(i.onPointerMove,()=>{var f;(f=p.onItemLeave)==null||f.call(p),l.current===null&&(l.current=window.setInterval(c,50))}),onPointerLeave:_(i.onPointerLeave,()=>{s()})})}),Vt="SelectSeparator",Ht=o.forwardRef((t,r)=>{const{__scopeSelect:e,...c}=t;return n.jsx(j.div,{"aria-hidden":!0,...c,ref:r})});Ht.displayName=Vt;var Ce="SelectArrow",Ft=o.forwardRef((t,r)=>{const{__scopeSelect:e,...c}=t,i=ue(e),p=$(Ce,e),l=Y(Ce,e);return p.open&&l.position==="popper"?n.jsx(ht,{...i,...c,ref:r}):null});Ft.displayName=Ce;var Ut="SelectBubbleInput",Je=o.forwardRef(({__scopeSelect:t,value:r,...e},c)=>{const i=o.useRef(null),p=k(c,i),l=gt(r);return o.useEffect(()=>{const a=i.current;if(!a)return;const s=window.HTMLSelectElement.prototype,g=Object.getOwnPropertyDescriptor(s,"value").set;if(l!==r&&g){const w=new Event("change",{bubbles:!0});g.call(a,r),a.dispatchEvent(w)}},[l,r]),n.jsx(j.select,{...e,style:{...xt,...e.style},ref:p,defaultValue:r})});Je.displayName=Ut;function Qe(t){return t===""||t===void 0}function et(t){const r=vt(t),e=o.useRef(""),c=o.useRef(0),i=o.useCallback(l=>{const a=e.current+l;r(a),function s(f){e.current=f,window.clearTimeout(c.current),f!==""&&(c.current=window.setTimeout(()=>s(""),1e3))}(a)},[r]),p=o.useCallback(()=>{e.current="",window.clearTimeout(c.current)},[]);return o.useEffect(()=>()=>window.clearTimeout(c.current),[]),[e,i,p]}function tt(t,r,e){const i=r.length>1&&Array.from(r).every(f=>f===r[0])?r[0]:r,p=e?t.indexOf(e):-1;let l=Wt(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 Wt(t,r){return t.map((e,c)=>t[(r+c)%t.length])}var Kt=Re,zt=Me,Gt=De,$t=Oe,Yt=Le,qt=ke,Xt=Fe,Zt=ze,Jt=Ge,Qt=Ye,eo=qe,to=Xe;function Io({...t}){return n.jsx(Kt,{"data-slot":"select",...t})}function To({...t}){return n.jsx(Gt,{"data-slot":"select-value",...t})}function bo({className:t,children:r,...e}){return n.jsxs(zt,{className:te("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex h-9 w-full items-center justify-between rounded-md border bg-transparent px-3 py-2 text-sm shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&>span]:line-clamp-1",t),"data-slot":"select-trigger",...e,children:[r,n.jsx($t,{asChild:!0,children:n.jsx(Ee,{className:"size-4 opacity-50"})})]})}function Po({className:t,children:r,position:e="popper",...c}){return n.jsx(Yt,{children:n.jsxs(qt,{className:te("bg-popover text-popover-foreground 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]:sli
1de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border shadow-md",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),"data-slot":"select-content",position:e,...c,children:[n.jsx(oo,{}),n.jsx(Xt,{className:te("p-1",e==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:r}),n.jsx(no,{})]})})}function _o({className:t,children:r,...e}){return n.jsxs(Zt,{className:te("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 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 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",t),"data-slot":"select-item",...e,children:[n.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:n.jsx(Qt,{children:n.jsx(St,{className:"size-4"})})}),n.jsx(Jt,{children:r})]})}function oo({className:t,...r}){return n.jsx(eo,{className:te("flex cursor-default items-center justify-center py-1",t),"data-slot":"select-scroll-up-button",...r,children:n.jsx(wt,{className:"size-4"})})}function no({className:t,...r}){return n.jsx(to,{className:te("flex cursor-default items-center justify-center py-1",t),"data-slot":"select-scroll-down-button",...r,children:n.jsx(Ee,{className:"size-4"})})}export{Io as S,bo as a,To as b,Po as c,_o as d};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.