Files
aiops/backend/static/assets/select-BFGszUub.js
T
Logan.Li bdf1f41464 fix(frontend): 修复 manualChunks 循环依赖导致生产白屏
仅拆分 codemirror/xterm/icons 独立库,避免 vendor-charts 与 vendor-react 循环引用。
2026-06-26 14:03:51 +08:00

2 lines
23 KiB
JavaScript

import{r as n,j as l}from"./vendor-codemirror-C7mXSpXt.js";import{O as ot,Q as Ee,J as nt,v as be,T as rt,r as st,K as Ie,U as lt,w as L,V as at,s as j,x as P,W as $,X as ct,Y as Re,Z as it,$ as dt,a0 as ut,a1 as pt,a2 as ft,a3 as mt,a4 as ht,a5 as gt,a6 as Pe,a7 as vt,m as te}from"./index-BZzvNKfa.js";import{u as xt}from"./index-CYARH0Cq.js";import{Q as Ne,w as St,O as wt}from"./vendor-icons-DIDdqO_o.js";function yt(t){const o=Ct(t),e=n.forwardRef((s,r)=>{const{children:d,...a}=s,c=n.Children.toArray(d),i=c.find(Tt);if(i){const p=i.props.children,g=c.map(x=>x===i?n.Children.count(p)>1?n.Children.only(null):n.isValidElement(p)?p.props.children:null:x);return l.jsx(o,{...a,ref:r,children:n.isValidElement(p)?n.cloneElement(p,void 0,g):null})}return l.jsx(o,{...a,ref:r,children:d})});return e.displayName=`${t}.Slot`,e}function Ct(t){const o=n.forwardRef((e,s)=>{const{children:r,...d}=e;if(n.isValidElement(r)){const a=Pt(r),c=bt(d,r.props);return r.type!==n.Fragment&&(c.ref=s?ot(s,a):a),n.cloneElement(r,c)}return n.Children.count(r)>1?n.Children.only(null):null});return o.displayName=`${t}.SlotClone`,o}var It=Symbol("radix.slottable");function Tt(t){return n.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===It}function bt(t,o){const e={...o};for(const s in o){const r=t[s],d=o[s];/^on[A-Z]/.test(s)?r&&d?e[s]=(...c)=>{const i=d(...c);return r(...c),i}:r&&(e[s]=r):s==="style"?e[s]={...r,...d}:s==="className"&&(e[s]=[r,d].filter(Boolean).join(" "))}return{...t,...e}}function Pt(t){let o=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,e=o&&"isReactWarning"in o&&o.isReactWarning;return e?t.ref:(o=Object.getOwnPropertyDescriptor(t,"ref")?.get,e=o&&"isReactWarning"in o&&o.isReactWarning,e?t.props.ref:t.props.ref||t.ref)}var Et=[" ","Enter","ArrowUp","ArrowDown"],Rt=[" ","Enter"],Q="Select",[ie,de,Nt]=lt(Q),[oe]=st(Q,[Nt,Ee]),ue=Ee(),[_t,G]=oe(Q),[jt,Mt]=oe(Q),_e=t=>{const{__scopeSelect:o,children:e,open:s,defaultOpen:r,onOpenChange:d,value:a,defaultValue:c,onValueChange:i,dir:p,name:g,autoComplete:x,disabled:E,required:T,form:C}=t,u=ue(o),[h,S]=n.useState(null),[m,v]=n.useState(null),[F,M]=n.useState(!1),ne=nt(p),[R,A]=be({prop:s,defaultProp:r??!1,onChange:d,caller:Q}),[U,Z]=be({prop:a,defaultProp:c,onChange:i,caller:Q}),k=n.useRef(null),V=h?C||!!h.closest("form"):!0,[z,B]=n.useState(new Set),H=Array.from(z).map(N=>N.props.value).join(";");return l.jsx(rt,{...u,children:l.jsxs(_t,{required:T,scope:o,trigger:h,onTriggerChange:S,valueNode:m,onValueNodeChange:v,valueNodeHasChildren:F,onValueNodeHasChildrenChange:M,contentId:Ie(),value:U,onValueChange:Z,open:R,onOpenChange:A,dir:ne,triggerPointerDownPosRef:k,disabled:E,children:[l.jsx(ie.Provider,{scope:o,children:l.jsx(jt,{scope:t.__scopeSelect,onNativeOptionAdd:n.useCallback(N=>{B(D=>new Set(D).add(N))},[]),onNativeOptionRemove:n.useCallback(N=>{B(D=>{const W=new Set(D);return W.delete(N),W})},[]),children:e})}),V?l.jsxs(Qe,{"aria-hidden":!0,required:T,tabIndex:-1,name:g,autoComplete:x,value:U,onChange:N=>Z(N.target.value),disabled:E,form:C,children:[U===void 0?l.jsx("option",{value:""}):null,Array.from(z)]},H):null]})})};_e.displayName=Q;var je="SelectTrigger",Me=n.forwardRef((t,o)=>{const{__scopeSelect:e,disabled:s=!1,...r}=t,d=ue(e),a=G(je,e),c=a.disabled||s,i=L(o,a.onTriggerChange),p=de(e),g=n.useRef("touch"),[x,E,T]=et(u=>{const h=p().filter(v=>!v.disabled),S=h.find(v=>v.value===a.value),m=tt(h,u,S);m!==void 0&&a.onValueChange(m.value)}),C=u=>{c||(a.onOpenChange(!0),T()),u&&(a.triggerPointerDownPosRef.current={x:Math.round(u.pageX),y:Math.round(u.pageY)})};return l.jsx(at,{asChild:!0,...d,children:l.jsx(j.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":Je(a.value)?"":void 0,...r,ref:i,onClick:P(r.onClick,u=>{u.currentTarget.focus(),g.current!=="mouse"&&C(u)}),onPointerDown:P(r.onPointerDown,u=>{g.current=u.pointerType;const h=u.target;h.hasPointerCapture(u.pointerId)&&h.releasePointerCapture(u.pointerId),u.button===0&&u.ctrlKey===!1&&u.pointerType==="mouse"&&(C(u),u.preventDefault())}),onKeyDown:P(r.onKeyDown,u=>{const h=x.current!=="";!(u.ctrlKey||u.altKey||u.metaKey)&&u.key.length===1&&E(u.key),!(h&&u.key===" ")&&Et.includes(u.key)&&(C(),u.preventDefault())})})})});Me.displayName=je;var Oe="SelectValue",Ae=n.forwardRef((t,o)=>{const{__scopeSelect:e,className:s,style:r,children:d,placeholder:a="",...c}=t,i=G(Oe,e),{onValueNodeHasChildrenChange:p}=i,g=d!==void 0,x=L(o,i.onValueNodeChange);return $(()=>{p(g)},[p,g]),l.jsx(j.span,{...c,ref:x,style:{pointerEvents:"none"},children:Je(i.value)?l.jsx(l.Fragment,{children:a}):d})});Ae.displayName=Oe;var Ot="SelectIcon",De=n.forwardRef((t,o)=>{const{__scopeSelect:e,children:s,...r}=t;return l.jsx(j.span,{"aria-hidden":!0,...r,ref:o,children:s||"▼"})});De.displayName=Ot;var At="SelectPortal",Le=t=>l.jsx(ct,{asChild:!0,...t});Le.displayName=At;var J="SelectContent",ke=n.forwardRef((t,o)=>{const e=G(J,t.__scopeSelect),[s,r]=n.useState();if($(()=>{r(new DocumentFragment)},[]),!e.open){const d=s;return d?Re.createPortal(l.jsx(Ve,{scope:t.__scopeSelect,children:l.jsx(ie.Slot,{scope:t.__scopeSelect,children:l.jsx("div",{children:t.children})})}),d):null}return l.jsx(Be,{...t,ref:o})});ke.displayName=J;var O=10,[Ve,Y]=oe(J),Dt="SelectContentImpl",Lt=yt("SelectContent.RemoveScroll"),Be=n.forwardRef((t,o)=>{const{__scopeSelect:e,position:s="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:d,onPointerDownOutside:a,side:c,sideOffset:i,align:p,alignOffset:g,arrowPadding:x,collisionBoundary:E,collisionPadding:T,sticky:C,hideWhenDetached:u,avoidCollisions:h,...S}=t,m=G(J,e),[v,F]=n.useState(null),[M,ne]=n.useState(null),R=L(o,f=>F(f)),[A,U]=n.useState(null),[Z,k]=n.useState(null),V=de(e),[z,B]=n.useState(!1),H=n.useRef(!1);n.useEffect(()=>{if(v)return ut(v)},[v]),pt();const N=n.useCallback(f=>{const[I,..._]=V().map(b=>b.ref.current),[w]=_.slice(-1),y=document.activeElement;for(const b of f)if(b===y||(b?.scrollIntoView({block:"nearest"}),b===I&&M&&(M.scrollTop=0),b===w&&M&&(M.scrollTop=M.scrollHeight),b?.focus(),document.activeElement!==y))return},[V,M]),D=n.useCallback(()=>N([A,v]),[N,A,v]);n.useEffect(()=>{z&&D()},[z,D]);const{onOpenChange:W,triggerPointerDownPosRef:K}=m;n.useEffect(()=>{if(v){let f={x:0,y:0};const I=w=>{f={x:Math.abs(Math.round(w.pageX)-(K.current?.x??0)),y:Math.abs(Math.round(w.pageY)-(K.current?.y??0))}},_=w=>{f.x<=10&&f.y<=10?w.preventDefault():v.contains(w.target)||W(!1),document.removeEventListener("pointermove",I),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",I),document.addEventListener("pointerup",_,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",I),document.removeEventListener("pointerup",_,{capture:!0})}}},[v,W,K]),n.useEffect(()=>{const f=()=>W(!1);return window.addEventListener("blur",f),window.addEventListener("resize",f),()=>{window.removeEventListener("blur",f),window.removeEventListener("resize",f)}},[W]);const[pe,le]=et(f=>{const I=V().filter(y=>!y.disabled),_=I.find(y=>y.ref.current===document.activeElement),w=tt(I,f,_);w&&setTimeout(()=>w.ref.current.focus())}),fe=n.useCallback((f,I,_)=>{const w=!H.current&&!_;(m.value!==void 0&&m.value===I||w)&&(U(f),w&&(H.current=!0))},[m.value]),me=n.useCallback(()=>v?.focus(),[v]),ee=n.useCallback((f,I,_)=>{const w=!H.current&&!_;(m.value!==void 0&&m.value===I||w)&&k(f)},[m.value]),ae=s==="popper"?xe:He,re=ae===xe?{side:c,sideOffset:i,align:p,alignOffset:g,arrowPadding:x,collisionBoundary:E,collisionPadding:T,sticky:C,hideWhenDetached:u,avoidCollisions:h}:{};return l.jsx(Ve,{scope:e,content:v,viewport:M,onViewportChange:ne,itemRefCallback:fe,selectedItem:A,onItemLeave:me,itemTextRefCallback:ee,focusSelectedItem:D,selectedItemText:Z,position:s,isPositioned:z,searchRef:pe,children:l.jsx(ft,{as:Lt,allowPinchZoom:!0,children:l.jsx(mt,{asChild:!0,trapped:m.open,onMountAutoFocus:f=>{f.preventDefault()},onUnmountAutoFocus:P(r,f=>{m.trigger?.focus({preventScroll:!0}),f.preventDefault()}),children:l.jsx(ht,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:d,onPointerDownOutside:a,onFocusOutside:f=>f.preventDefault(),onDismiss:()=>m.onOpenChange(!1),children:l.jsx(ae,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:f=>f.preventDefault(),...S,...re,onPlaced:()=>B(!0),ref:R,style:{display:"flex",flexDirection:"column",outline:"none",...S.style},onKeyDown:P(S.onKeyDown,f=>{const I=f.ctrlKey||f.altKey||f.metaKey;if(f.key==="Tab"&&f.preventDefault(),!I&&f.key.length===1&&le(f.key),["ArrowUp","ArrowDown","Home","End"].includes(f.key)){let w=V().filter(y=>!y.disabled).map(y=>y.ref.current);if(["ArrowUp","End"].includes(f.key)&&(w=w.slice().reverse()),["ArrowUp","ArrowDown"].includes(f.key)){const y=f.target,b=w.indexOf(y);w=w.slice(b+1)}setTimeout(()=>N(w)),f.preventDefault()}})})})})})})});Be.displayName=Dt;var kt="SelectItemAlignedPosition",He=n.forwardRef((t,o)=>{const{__scopeSelect:e,onPlaced:s,...r}=t,d=G(J,e),a=Y(J,e),[c,i]=n.useState(null),[p,g]=n.useState(null),x=L(o,R=>g(R)),E=de(e),T=n.useRef(!1),C=n.useRef(!0),{viewport:u,selectedItem:h,selectedItemText:S,focusSelectedItem:m}=a,v=n.useCallback(()=>{if(d.trigger&&d.valueNode&&c&&p&&u&&h&&S){const R=d.trigger.getBoundingClientRect(),A=p.getBoundingClientRect(),U=d.valueNode.getBoundingClientRect(),Z=S.getBoundingClientRect();if(d.dir!=="rtl"){const y=Z.left-A.left,b=U.left-y,q=R.left-b,X=R.width+q,he=Math.max(X,A.width),ge=window.innerWidth-O,ve=Pe(b,[O,Math.max(O,ge-he)]);c.style.minWidth=X+"px",c.style.left=ve+"px"}else{const y=A.right-Z.right,b=window.innerWidth-U.right-y,q=window.innerWidth-R.right-b,X=R.width+q,he=Math.max(X,A.width),ge=window.innerWidth-O,ve=Pe(b,[O,Math.max(O,ge-he)]);c.style.minWidth=X+"px",c.style.right=ve+"px"}const k=E(),V=window.innerHeight-O*2,z=u.scrollHeight,B=window.getComputedStyle(p),H=parseInt(B.borderTopWidth,10),N=parseInt(B.paddingTop,10),D=parseInt(B.borderBottomWidth,10),W=parseInt(B.paddingBottom,10),K=H+N+z+W+D,pe=Math.min(h.offsetHeight*5,K),le=window.getComputedStyle(u),fe=parseInt(le.paddingTop,10),me=parseInt(le.paddingBottom,10),ee=R.top+R.height/2-O,ae=V-ee,re=h.offsetHeight/2,f=h.offsetTop+re,I=H+N+f,_=K-I;if(I<=ee){const y=k.length>0&&h===k[k.length-1].ref.current;c.style.bottom="0px";const b=p.clientHeight-u.offsetTop-u.offsetHeight,q=Math.max(ae,re+(y?me:0)+b+D),X=I+q;c.style.height=X+"px"}else{const y=k.length>0&&h===k[0].ref.current;c.style.top="0px";const q=Math.max(ee,H+u.offsetTop+(y?fe:0)+re)+_;c.style.height=q+"px",u.scrollTop=I-ee+u.offsetTop}c.style.margin=`${O}px 0`,c.style.minHeight=pe+"px",c.style.maxHeight=V+"px",s?.(),requestAnimationFrame(()=>T.current=!0)}},[E,d.trigger,d.valueNode,c,p,u,h,S,d.dir,s]);$(()=>v(),[v]);const[F,M]=n.useState();$(()=>{p&&M(window.getComputedStyle(p).zIndex)},[p]);const ne=n.useCallback(R=>{R&&C.current===!0&&(v(),m?.(),C.current=!1)},[v,m]);return l.jsx(Bt,{scope:e,contentWrapper:c,shouldExpandOnScrollRef:T,onScrollButtonChange:ne,children:l.jsx("div",{ref:i,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:F},children:l.jsx(j.div,{...r,ref:x,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});He.displayName=kt;var Vt="SelectPopperPosition",xe=n.forwardRef((t,o)=>{const{__scopeSelect:e,align:s="start",collisionPadding:r=O,...d}=t,a=ue(e);return l.jsx(gt,{...a,...d,ref:o,align:s,collisionPadding:r,style:{boxSizing:"border-box",...d.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=Vt;var[Bt,Te]=oe(J,{}),Se="SelectViewport",We=n.forwardRef((t,o)=>{const{__scopeSelect:e,nonce:s,...r}=t,d=Y(Se,e),a=Te(Se,e),c=L(o,d.onViewportChange),i=n.useRef(0);return l.jsxs(l.Fragment,{children:[l.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:s}),l.jsx(ie.Slot,{scope:e,children:l.jsx(j.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:P(r.onScroll,p=>{const g=p.currentTarget,{contentWrapper:x,shouldExpandOnScrollRef:E}=a;if(E?.current&&x){const T=Math.abs(i.current-g.scrollTop);if(T>0){const C=window.innerHeight-O*2,u=parseFloat(x.style.minHeight),h=parseFloat(x.style.height),S=Math.max(u,h);if(S<C){const m=S+T,v=Math.min(C,m),F=m-v;x.style.height=v+"px",x.style.bottom==="0px"&&(g.scrollTop=F>0?F:0,x.style.justifyContent="flex-end")}}}i.current=g.scrollTop})})})]})});We.displayName=Se;var Fe="SelectGroup",[Ht,Wt]=oe(Fe),Ft=n.forwardRef((t,o)=>{const{__scopeSelect:e,...s}=t,r=Ie();return l.jsx(Ht,{scope:e,id:r,children:l.jsx(j.div,{role:"group","aria-labelledby":r,...s,ref:o})})});Ft.displayName=Fe;var Ue="SelectLabel",Ut=n.forwardRef((t,o)=>{const{__scopeSelect:e,...s}=t,r=Wt(Ue,e);return l.jsx(j.div,{id:r.id,...s,ref:o})});Ut.displayName=Ue;var ce="SelectItem",[zt,ze]=oe(ce),Ke=n.forwardRef((t,o)=>{const{__scopeSelect:e,value:s,disabled:r=!1,textValue:d,...a}=t,c=G(ce,e),i=Y(ce,e),p=c.value===s,[g,x]=n.useState(d??""),[E,T]=n.useState(!1),C=L(o,m=>i.itemRefCallback?.(m,s,r)),u=Ie(),h=n.useRef("touch"),S=()=>{r||(c.onValueChange(s),c.onOpenChange(!1))};if(s==="")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 l.jsx(zt,{scope:e,value:s,disabled:r,textId:u,isSelected:p,onItemTextChange:n.useCallback(m=>{x(v=>v||(m?.textContent??"").trim())},[]),children:l.jsx(ie.ItemSlot,{scope:e,value:s,disabled:r,textValue:g,children:l.jsx(j.div,{role:"option","aria-labelledby":u,"data-highlighted":E?"":void 0,"aria-selected":p&&E,"data-state":p?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...a,ref:C,onFocus:P(a.onFocus,()=>T(!0)),onBlur:P(a.onBlur,()=>T(!1)),onClick:P(a.onClick,()=>{h.current!=="mouse"&&S()}),onPointerUp:P(a.onPointerUp,()=>{h.current==="mouse"&&S()}),onPointerDown:P(a.onPointerDown,m=>{h.current=m.pointerType}),onPointerMove:P(a.onPointerMove,m=>{h.current=m.pointerType,r?i.onItemLeave?.():h.current==="mouse"&&m.currentTarget.focus({preventScroll:!0})}),onPointerLeave:P(a.onPointerLeave,m=>{m.currentTarget===document.activeElement&&i.onItemLeave?.()}),onKeyDown:P(a.onKeyDown,m=>{i.searchRef?.current!==""&&m.key===" "||(Rt.includes(m.key)&&S(),m.key===" "&&m.preventDefault())})})})})});Ke.displayName=ce;var se="SelectItemText",$e=n.forwardRef((t,o)=>{const{__scopeSelect:e,className:s,style:r,...d}=t,a=G(se,e),c=Y(se,e),i=ze(se,e),p=Mt(se,e),[g,x]=n.useState(null),E=L(o,S=>x(S),i.onItemTextChange,S=>c.itemTextRefCallback?.(S,i.value,i.disabled)),T=g?.textContent,C=n.useMemo(()=>l.jsx("option",{value:i.value,disabled:i.disabled,children:T},i.value),[i.disabled,i.value,T]),{onNativeOptionAdd:u,onNativeOptionRemove:h}=p;return $(()=>(u(C),()=>h(C)),[u,h,C]),l.jsxs(l.Fragment,{children:[l.jsx(j.span,{id:i.textId,...d,ref:E}),i.isSelected&&a.valueNode&&!a.valueNodeHasChildren?Re.createPortal(d.children,a.valueNode):null]})});$e.displayName=se;var Ge="SelectItemIndicator",Ye=n.forwardRef((t,o)=>{const{__scopeSelect:e,...s}=t;return ze(Ge,e).isSelected?l.jsx(j.span,{"aria-hidden":!0,...s,ref:o}):null});Ye.displayName=Ge;var we="SelectScrollUpButton",Ze=n.forwardRef((t,o)=>{const e=Y(we,t.__scopeSelect),s=Te(we,t.__scopeSelect),[r,d]=n.useState(!1),a=L(o,s.onScrollButtonChange);return $(()=>{if(e.viewport&&e.isPositioned){let c=function(){const p=i.scrollTop>0;d(p)};const i=e.viewport;return c(),i.addEventListener("scroll",c),()=>i.removeEventListener("scroll",c)}},[e.viewport,e.isPositioned]),r?l.jsx(Xe,{...t,ref:a,onAutoScroll:()=>{const{viewport:c,selectedItem:i}=e;c&&i&&(c.scrollTop=c.scrollTop-i.offsetHeight)}}):null});Ze.displayName=we;var ye="SelectScrollDownButton",qe=n.forwardRef((t,o)=>{const e=Y(ye,t.__scopeSelect),s=Te(ye,t.__scopeSelect),[r,d]=n.useState(!1),a=L(o,s.onScrollButtonChange);return $(()=>{if(e.viewport&&e.isPositioned){let c=function(){const p=i.scrollHeight-i.clientHeight,g=Math.ceil(i.scrollTop)<p;d(g)};const i=e.viewport;return c(),i.addEventListener("scroll",c),()=>i.removeEventListener("scroll",c)}},[e.viewport,e.isPositioned]),r?l.jsx(Xe,{...t,ref:a,onAutoScroll:()=>{const{viewport:c,selectedItem:i}=e;c&&i&&(c.scrollTop=c.scrollTop+i.offsetHeight)}}):null});qe.displayName=ye;var Xe=n.forwardRef((t,o)=>{const{__scopeSelect:e,onAutoScroll:s,...r}=t,d=Y("SelectScrollButton",e),a=n.useRef(null),c=de(e),i=n.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return n.useEffect(()=>()=>i(),[i]),$(()=>{c().find(g=>g.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[c]),l.jsx(j.div,{"aria-hidden":!0,...r,ref:o,style:{flexShrink:0,...r.style},onPointerDown:P(r.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(s,50))}),onPointerMove:P(r.onPointerMove,()=>{d.onItemLeave?.(),a.current===null&&(a.current=window.setInterval(s,50))}),onPointerLeave:P(r.onPointerLeave,()=>{i()})})}),Kt="SelectSeparator",$t=n.forwardRef((t,o)=>{const{__scopeSelect:e,...s}=t;return l.jsx(j.div,{"aria-hidden":!0,...s,ref:o})});$t.displayName=Kt;var Ce="SelectArrow",Gt=n.forwardRef((t,o)=>{const{__scopeSelect:e,...s}=t,r=ue(e),d=G(Ce,e),a=Y(Ce,e);return d.open&&a.position==="popper"?l.jsx(vt,{...r,...s,ref:o}):null});Gt.displayName=Ce;var Yt="SelectBubbleInput",Qe=n.forwardRef(({__scopeSelect:t,value:o,...e},s)=>{const r=n.useRef(null),d=L(s,r),a=xt(o);return n.useEffect(()=>{const c=r.current;if(!c)return;const i=window.HTMLSelectElement.prototype,g=Object.getOwnPropertyDescriptor(i,"value").set;if(a!==o&&g){const x=new Event("change",{bubbles:!0});g.call(c,o),c.dispatchEvent(x)}},[a,o]),l.jsx(j.select,{...e,style:{...it,...e.style},ref:d,defaultValue:o})});Qe.displayName=Yt;function Je(t){return t===""||t===void 0}function et(t){const o=dt(t),e=n.useRef(""),s=n.useRef(0),r=n.useCallback(a=>{const c=e.current+a;o(c),(function i(p){e.current=p,window.clearTimeout(s.current),p!==""&&(s.current=window.setTimeout(()=>i(""),1e3))})(c)},[o]),d=n.useCallback(()=>{e.current="",window.clearTimeout(s.current)},[]);return n.useEffect(()=>()=>window.clearTimeout(s.current),[]),[e,r,d]}function tt(t,o,e){const r=o.length>1&&Array.from(o).every(p=>p===o[0])?o[0]:o,d=e?t.indexOf(e):-1;let a=Zt(t,Math.max(d,0));r.length===1&&(a=a.filter(p=>p!==e));const i=a.find(p=>p.textValue.toLowerCase().startsWith(r.toLowerCase()));return i!==e?i:void 0}function Zt(t,o){return t.map((e,s)=>t[(o+s)%t.length])}var qt=_e,Xt=Me,Qt=Ae,Jt=De,eo=Le,to=ke,oo=We,no=Ke,ro=$e,so=Ye,lo=Ze,ao=qe;function ho({...t}){return l.jsx(qt,{"code-path":"src/components/ui/select.tsx:10:10","data-slot":"select",...t})}function go({...t}){return l.jsx(Qt,{"code-path":"src/components/ui/select.tsx:22:10","data-slot":"select-value",...t})}function vo({className:t,size:o="default",children:e,...s}){return l.jsxs(Xt,{"code-path":"src/components/ui/select.tsx:34:5","data-slot":"select-trigger","data-size":o,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 dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *: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",t),...s,children:[e,l.jsx(Jt,{"code-path":"src/components/ui/select.tsx:44:7",asChild:!0,children:l.jsx(Ne,{"code-path":"src/components/ui/select.tsx:45:9",className:"size-4 opacity-50"})})]})}function xo({className:t,children:o,position:e="item-aligned",align:s="center",...r}){return l.jsx(eo,{"code-path":"src/components/ui/select.tsx:59:5",children:l.jsxs(to,{"code-path":"src/components/ui/select.tsx:60:7","data-slot":"select-content",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]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto 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),position:e,align:s,...r,children:[l.jsx(co,{"code-path":"src/components/ui/select.tsx:72:9"}),l.jsx(oo,{"code-path":"src/components/ui/select.tsx:73:9",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:o}),l.jsx(io,{"code-path":"src/components/ui/select.tsx:82:9"})]})})}function So({className:t,children:o,...e}){return l.jsxs(no,{"code-path":"src/components/ui/select.tsx:107:5","data-slot":"select-item",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),...e,children:[l.jsx("span",{"code-path":"src/components/ui/select.tsx:115:7","data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:l.jsx(so,{"code-path":"src/components/ui/select.tsx:119:9",children:l.jsx(St,{"code-path":"src/components/ui/select.tsx:120:11",className:"size-4"})})}),l.jsx(ro,{"code-path":"src/components/ui/select.tsx:123:7",children:o})]})}function co({className:t,...o}){return l.jsx(lo,{"code-path":"src/components/ui/select.tsx:146:5","data-slot":"select-scroll-up-button",className:te("flex cursor-default items-center justify-center py-1",t),...o,children:l.jsx(wt,{"code-path":"src/components/ui/select.tsx:154:7",className:"size-4"})})}function io({className:t,...o}){return l.jsx(ao,{"code-path":"src/components/ui/select.tsx:164:5","data-slot":"select-scroll-down-button",className:te("flex cursor-default items-center justify-center py-1",t),...o,children:l.jsx(Ne,{"code-path":"src/components/ui/select.tsx:172:7",className:"size-4"})})}export{ho as S,vo as a,go as b,xo as c,So as d};