@cline/cli-windows-arm64 3.0.37 → 3.0.38-nightly.1783514424
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/bin/cline.exe +0 -0
- package/cline-hub/webview/assets/{Chat-Cpzgs4Zf.js → Chat-DSJpN3Qg.js} +1 -1
- package/cline-hub/webview/assets/{extensions-view-BQAXMxuI.js → extensions-view-CaXsBebf.js} +1 -1
- package/cline-hub/webview/assets/{index-BRXDRu6K.js → index-ztdpsLyk.js} +2 -2
- package/cline-hub/webview/assets/{label-CW5deNNM.js → label-DeAtZvoI.js} +1 -1
- package/cline-hub/webview/assets/{settings-view-D6J1Z1IG.js → settings-view-Bi0cr_yT.js} +1 -1
- package/cline-hub/webview/index.html +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-CNC7AqOf.js";import{i as t,r as n}from"./bundle-mjs-D3mlU5Wg.js";import{A as r,B as i,Bt as a,D as o,E as s,F as c,H as l,Ht as u,I as d,L as f,Nt as p,O as m,P as h,Q as g,R as _,Rt as v,S as y,T as b,Vt as x,_ as S,a as C,b as w,c as T,ct as E,d as D,dt as O,et as k,f as ee,h as te,i as A,k as j,l as M,o as N,ot as P,r as F,s as I,st as ne,u as re,v as L,x as ie,xt as ae,y as oe,z as se}from"./vscode-BO5mAFne.js";import{$ as ce,A as R,At as z,Ct as le,D as B,E as ue,Et as V,F as de,I as H,M as U,N as W,O as G,Ot as fe,P as K,Q as pe,St as me,T as he,W as ge,X as _e,Z as ve,_t as ye,at as be,bt as xe,ct as Se,d as Ce,dt as we,et as Te,f as Ee,ft as De,gt as Oe,h as ke,ht as q,it as Ae,j as je,jt as Me,k as Ne,kt as Pe,m as Fe,mt as J,nt as Y,ot as Ie,p as Le,pt as Re,rt as ze,st as Be,tt as Ve,u as He,vt as Ue,w as We,xt as Ge,yt as Ke}from"./index-BRXDRu6K.js";var X=e(t(),1);function qe(e){let[t,n]=X.useState({current:e,previous:null});return e!==t.current&&n({current:e,previous:t.current}),t.previous}var Je=b(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),Ye=b(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),Xe=b(`circle`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),Ze=b(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),Qe=b(`image`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]),$e=b(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),et=b(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),tt=X.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:o=!1,nativeButton:s=!0,id:c,payload:l,handle:u,...d}=e,f=H(!0),p=u?.store??f?.store;if(!p)throw Error(a(79));let h=m(c),g=p.useState(`floatingRootContext`),_=p.useState(`isOpenedByTrigger`,h),v=p.useState(`triggerPopupId`,h),b=X.useRef(null),{registerTrigger:x,isMountedByThisTrigger:S}=Be(h,b,p,{payload:l}),{getButtonProps:C,buttonRef:w}=y({disabled:o,native:s}),T=Ke(g,{enabled:g!=null}),E=he(()=>p.select(`open`),e=>{p.set(`openMethod`,e)}),D={disabled:o,open:_},O=p.useState(`triggerProps`,S);return j(`button`,e,{state:D,ref:[w,t,x,b],props:[T.reference,O,E,{[me]:``,id:h,"aria-haspopup":`dialog`,"aria-expanded":_,"aria-controls":v},d,C],stateAttributesMapping:Y})});function nt(e){return e==null||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}var rt=X.createContext(null),it=X.createContext(null);function Z(){let e=X.useContext(rt);if(e===null)throw Error(a(60));return e}function at(){let e=X.useContext(it);if(e===null)throw Error(a(61));return e}var ot=(e,t)=>Object.is(e,t);function st(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function ct(e,t,n){return!e||e.length===0?!1:e.some(e=>e===void 0?!1:st(t,e,n))}function lt(e,t,n){return!e||e.length===0?-1:e.findIndex(e=>e===void 0?!1:st(e,t,n))}function ut(e,t,n){return e.filter(e=>!st(t,e,n))}function dt(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}var Q=n();function ft(e){return e!=null&&e.length>0&&typeof e[0]==`object`&&e[0]!=null&&`items`in e[0]}function pt(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(ft(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 mt(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 dt(e)}function ht(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?dt(e.value):dt(e)}function gt(e,t,n){function r(){return mt(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 t[e]??r();if(Array.isArray(t)){let n=t,i=ft(n)?n.flatMap(e=>e.items):n;if(typeof e!=`object`||!e){let t=i.find(t=>t.value===e);return t&&t.label!=null?t.label:r()}if(`value`in e){let t=i.find(t=>t&&t.value===e.value);if(t&&t.label!=null)return t.label}}return r()}function _t(e,t,n){return e.reduce((e,r,i)=>(i>0&&e.push(`, `),e.push((0,Q.jsx)(X.Fragment,{children:gt(r,t,n)},i)),e),[])}var $={id:q(e=>e.id),labelId:q(e=>e.labelId),modal:q(e=>e.modal),multiple:q(e=>e.multiple),items:q(e=>e.items),itemToStringLabel:q(e=>e.itemToStringLabel),itemToStringValue:q(e=>e.itemToStringValue),isItemEqualToValue:q(e=>e.isItemEqualToValue),value:q(e=>e.value),hasSelectedValue:q(e=>{let{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:ht(t,r)!==``}),hasNullItemLabel:q((e,t)=>t?pt(e.items):!1),open:q(e=>e.open),mounted:q(e=>e.mounted),forceMount:q(e=>e.forceMount),transitionStatus:q(e=>e.transitionStatus),openMethod:q(e=>e.openMethod),activeIndex:q(e=>e.activeIndex),selectedIndex:q(e=>e.selectedIndex),isActive:q((e,t)=>e.activeIndex===t),isSelected:q((e,t)=>{let n=e.isItemEqualToValue,r=e.value;return e.multiple?Array.isArray(r)&&r.some(e=>st(t,e,n)):st(t,r,n)}),isSelectedByFocus:q((e,t)=>e.selectedIndex===t),popupProps:q(e=>e.popupProps),triggerProps:q(e=>e.triggerProps),triggerElement:q(e=>e.triggerElement),positionerElement:q(e=>e.positionerElement),listElement:q(e=>e.listElement),popupSide:q(e=>e.popupSide),scrollUpArrowVisible:q(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:q(e=>e.scrollDownArrowVisible),hasScrollArrows:q(e=>e.hasScrollArrows)};function vt(e,t,n=(e,t)=>e===t){return e.length===t.length&&e.every((e,r)=>n(e,t[r]))}function yt(e){let{id:t,value:n,defaultValue:a=null,onValueChange:o,open:s,defaultOpen:l=!1,onOpenChange:d,name:p,form:m,autoComplete:g,disabled:v=!1,readOnly:y=!1,required:b=!1,modal:S=!0,actionsRef:C,inputRef:w,onOpenChangeComplete:T,items:D,multiple:O=!1,itemToStringLabel:j,itemToStringValue:N,isItemEqualToValue:P=ot,highlightItemOnHover:I=!0,children:ae}=e,{clearErrors:oe}=ee(),{setDirty:se,setTouched:ce,setFocused:R,validityData:z,setFilled:le,name:B,disabled:ue,validation:V,validationMode:de}=te(),H=M({id:t}),U=ue||v,W=B??p,[G,fe]=L({controlled:n,default:O?a??ne:a,name:`Select`,state:`value`}),[K,pe]=L({controlled:s,default:l,name:`Select`,state:`open`}),me=X.useRef([]),he=X.useRef([]),ge=X.useRef(null),_e=X.useRef(null),ve=X.useRef(0),ye=X.useRef(null),xe=X.useRef([]),Ce=X.useRef(!1),we=X.useRef(null),Te=X.useRef(null),Ee=X.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),ke=X.useRef(!1),{mounted:q,setMounted:je,transitionStatus:Me}=De(K),{openMethod:Ne,triggerProps:Fe}=We(K),Y=u(()=>new Re({id:H,labelId:void 0,modal:S,multiple:O,itemToStringLabel:j,itemToStringValue:N,isItemEqualToValue:P,value:G,open:K,mounted:q,transitionStatus:Me,items:D,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,Le=J(Y,$.activeIndex),Be=J(Y,$.selectedIndex),Ve=J(Y,$.triggerElement),He=J(Y,$.positionerElement),Ge=qe(Ne),Je=Ne??Ge??null,Ye=X.useMemo(()=>O?``:ht(G,N),[O,G,N]),Xe=X.useMemo(()=>O&&Array.isArray(G)?G.map(e=>ht(e,N)):ht(G,N),[O,G,N]);re(Pe(Y.state.triggerElement),H,G,f(()=>Xe),!U,p);let Ze=X.useRef(G),Qe=O?Array.isArray(G)&&G.length>0:G!=null&&ht(G,N)!==``;x(()=>{G!==Ze.current&&Y.set(`forceMount`,!0)},[Y,G]),x(()=>{le(Qe)},[Qe,le]),x(function(){let e=xe.current,t;if(O){let n=Array.isArray(G)?G:[];if(n.length===0)t=null;else{let r=n[n.length-1],i=lt(e,r,P);t=i===-1?null:i}}else{let n=lt(e,G,P);t=n===-1?null:n}t===null&&(Te.current=null),!K&&Y.set(`selectedIndex`,t)},[Qe,O,K,G,xe,P,Y,Te]);function $e(e){let t=z.initialValue;return Array.isArray(e)&&Array.isArray(t)?!vt(e,t,(e,t)=>st(e,t,P)):e!==t}ie(G,()=>{oe(W),se($e(G)),V.change(G)});let et=f((e,t)=>{d?.(e,t),!t.isCanceled&&(pe(e),!e&&(t.reason===`focus-out`||t.reason===`outside-press`)&&(ce(!0),R(!1),de===`onBlur`&&V.commit(G)))}),tt=f(()=>{je(!1),Y.update({activeIndex:null,openMethod:null}),T?.(!1)});Se({enabled:!C,open:K,ref:ge,onComplete(){K||tt()}}),X.useImperativeHandle(C,()=>({unmount:tt}),[tt]);let Z=f((e,t)=>{o?.(e,t),!t.isCanceled&&fe(e)}),at=f(()=>{let e=Y.state.listElement||ge.current;if(!e)return;let t=F(e.scrollHeight,e.clientHeight),n=A(e.scrollTop,t),r=n>0,i=n<t;Y.state.scrollUpArrowVisible!==r&&Y.set(`scrollUpArrowVisible`,r),Y.state.scrollDownArrowVisible!==i&&Y.set(`scrollDownArrowVisible`,i)}),ct=be({open:K,onOpenChange:et,elements:{reference:Ve,floating:He}}),ut=Ke(ct,{enabled:!y&&!U,event:`mousedown`}),dt=Ue(ct),ft=Ae(ct,{enabled:!y&&!U,listRef:me,activeIndex:Le,selectedIndex:Be,disabledIndices:ne,onNavigate(e){e===null&&!K||Y.set(`activeIndex`,e)},focusItemOnHover:I}),pt=ze(ct,{enabled:!y&&!U&&(K||!O),listRef:he,activeIndex:Le,selectedIndex:Be,disabledIndices:e=>nt(me.current[e]),onMatch(e){K?Y.set(`activeIndex`,e):Z(xe.current[e],i(`none`))},onTyping(e){Ce.current=e}}),gt=X.useMemo(()=>{let e=r(pt.reference,ft.reference,dt.reference,ut.reference,Fe);return H&&(e.id=H),e},[ut.reference,pt.reference,ft.reference,dt.reference,Fe,H]),_t=X.useMemo(()=>r(Ie,pt.floating,ft.floating,dt.floating),[pt.floating,ft.floating,dt.floating]),yt=ft.item??E;Oe(()=>{Y.update({popupProps:_t,triggerProps:gt})}),x(()=>{Y.update({id:H,modal:S,multiple:O,value:G,open:K,mounted:q,transitionStatus:Me,popupProps:_t,triggerProps:gt,items:D,itemToStringLabel:j,itemToStringValue:N,isItemEqualToValue:P,openMethod:Je})},[Y,H,S,O,G,K,q,Me,_t,gt,D,j,N,P,Je]);let bt=X.useMemo(()=>({store:Y,name:W,required:b,disabled:U,readOnly:y,multiple:O,highlightItemOnHover:I,setValue:Z,setOpen:et,listRef:me,popupRef:ge,scrollHandlerRef:_e,handleScrollArrowVisibility:at,scrollArrowsMountedCountRef:ve,itemProps:yt,valueRef:ye,valuesRef:xe,labelsRef:he,typingRef:Ce,selectionRef:Ee,firstItemTextRef:we,selectedItemTextRef:Te,validation:V,onOpenChangeComplete:T,alignItemWithTriggerActiveRef:ke,initialValueRef:Ze}),[Y,W,b,U,y,O,I,Z,et,yt,V,T,at]),xt=_(w,V.inputRef),St=O&&Array.isArray(G)&&G.length>0,Ct=O?void 0:W,wt=X.useMemo(()=>!O||!Array.isArray(G)||!W?null:G.map(e=>{let t=ht(e,N);return(0,Q.jsx)(`input`,{type:`hidden`,form:m,name:W,value:t,disabled:U},t)}),[O,G,m,W,N,U]);return(0,Q.jsx)(rt.Provider,{value:bt,children:(0,Q.jsxs)(it.Provider,{value:ct,children:[ae,(0,Q.jsx)(`input`,{...V.getValidationProps(U,{onFocus(){Y.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented||U||y)return;let t=e.currentTarget.value,n=i(k,e.nativeEvent);function r(){if(O)return;let e=t.toLowerCase(),r=xe.current.findIndex(t=>ht(t,N).toLowerCase()===e||mt(t,j).toLowerCase()===e);r===-1&&(r=xe.current.findIndex((t,n)=>{let r=he.current[n];return r!=null&&r.toLowerCase()===e}));let i=r===-1?void 0:xe.current[r];i!=null&&Z(i,n)}Y.set(`forceMount`,!0),queueMicrotask(r)}}),id:H&&Ct==null?`${H}-hidden-input`:void 0,form:m,name:Ct,autoComplete:g,value:Ye,disabled:U,required:b&&!St,readOnly:y,ref:xt,style:W?c:h,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),wt]})})}function bt(e,t){return e??t}var xt=2,St=400,Ct={...Ve,...S,popupSide:e=>e?{"data-popup-side":e}:null,value:()=>null},wt=X.forwardRef(function(e,t){let{render:n,className:a,id:o,disabled:s=!1,nativeButton:c=!0,style:u,...p}=e,{setTouched:m,setFocused:h,validationMode:g,state:_,disabled:b}=te(),{labelId:x}=D(),{store:S,setOpen:C,selectionRef:w,validation:T,readOnly:E,required:ee,alignItemWithTriggerActiveRef:A,disabled:N}=Z(),P=b||N||s,F=J(S,$.open),I=J(S,$.mounted),ne=J(S,$.value),re=J(S,$.triggerProps),L=J(S,$.positionerElement),ie=J(S,$.listElement),ae=J(S,$.popupSide),oe=J(S,$.id),se=J(S,$.labelId),ce=J(S,$.hasSelectedValue),R=I&&L?ae:null,le=o??oe,B=bt(x,se);M({id:le});let ue=Pe(L),V=X.useRef(null),{getButtonProps:de,buttonRef:H}=y({disabled:P,native:c}),U=f(e=>{S.set(`triggerElement`,e)}),W=v(),G=v(),fe=v();X.useEffect(()=>{if(F)return fe.start(St,()=>{w.current.allowUnselectedMouseUp=!0,w.current.allowSelectedMouseUp=!0}),()=>{fe.clear()};w.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},G.clear()},[F,w,G,fe]);let K=r(re,{id:le,role:`combobox`,"aria-expanded":F?`true`:`false`,"aria-haspopup":`listbox`,"aria-controls":F?ie?.id??z(L)?.id:void 0,"aria-labelledby":B,"aria-readonly":E||void 0,"aria-required":ee||void 0,tabIndex:P?-1:0,onFocus(e){h(!0),F&&A.current&&C(!1,i(k,e.nativeEvent)),W.start(0,()=>{S.set(`forceMount`,!0)})},onBlur(e){O(L,e.relatedTarget)||(m(!0),h(!1),g===`onBlur`&&T.commit(ne))},onMouseDown(e){if(F)return;let t=d(e.currentTarget);function n(e){if(!V.current)return;let t=e.target;if(O(V.current,t)||O(ue.current,t))return;let n=He(V.current);e.clientX>=n.left-xt&&e.clientX<=n.right+xt&&e.clientY>=n.top-xt&&e.clientY<=n.bottom+xt||C(!1,i(l,e))}G.start(0,()=>{t.addEventListener(`mouseup`,n,{once:!0})})}},p,de),pe=T.getValidationProps(P,K);pe.role=`combobox`;let me={..._,open:F,disabled:P,value:ne,readOnly:E,popupSide:R,placeholder:!ce};return j(`button`,e,{ref:[t,V,H,U],state:me,stateAttributesMapping:Ct,props:pe})}),Tt={value:()=>null},Et=X.forwardRef(function(e,t){let{className:n,render:r,children:i,placeholder:a,style:o,...s}=e,{store:c,valueRef:l}=Z(),u=J(c,$.value),d=J(c,$.items),f=J(c,$.itemToStringLabel),p=J(c,$.hasSelectedValue),m=!p&&a!=null&&i==null,h=J(c,$.hasNullItemLabel,m),g={value:u,placeholder:!p},_=null;return _=typeof i==`function`?i(u):i??(!p&&a!=null&&!h?a:Array.isArray(u)?_t(u,d,f):gt(u,d,f)),j(`span`,e,{state:g,ref:[t,l],props:[{children:_},s],stateAttributesMapping:Tt})}),Dt=X.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{store:o}=Z();return j(`span`,e,{state:{open:J(o,$.open)},ref:t,props:[{"aria-hidden":!0,children:`▼`},a],stateAttributesMapping:Y})}),Ot=X.createContext(void 0),kt=X.forwardRef(function(e,t){let{store:n}=Z(),r=J(n,$.mounted),i=J(n,$.forceMount);return r||i?(0,Q.jsx)(Ot.Provider,{value:!0,children:(0,Q.jsx)(Ge,{ref:t,...e})}):null}),At=X.createContext(void 0);function jt(){let e=X.useContext(At);if(!e)throw Error(a(59));return e}function Mt(e,t){e&&Object.assign(e.style,t)}var Nt={position:`relative`,maxHeight:`100%`,overflowX:`hidden`,overflowY:`auto`},Pt={position:`fixed`},Ft=X.forwardRef(function(e,t){let{anchor:n,positionMethod:r=`absolute`,className:a,render:o,side:s=`bottom`,align:c=`center`,sideOffset:l=0,alignOffset:u=0,collisionBoundary:d=`clipping-ancestors`,collisionPadding:p,arrowPadding:m=5,sticky:h=!1,disableAnchorTracking:g,alignItemWithTrigger:_=!0,collisionAvoidance:v=le,style:y,...b}=e,{store:S,listRef:C,labelsRef:w,alignItemWithTriggerActiveRef:T,selectedItemTextRef:E,valuesRef:D,initialValueRef:O,popupRef:ee,setValue:te}=Z(),A=at(),j=J(S,$.open),M=J(S,$.mounted),N=J(S,$.modal),P=J(S,$.value),F=J(S,$.openMethod),I=J(S,$.positionerElement),ne=J(S,$.triggerElement),re=J(S,$.isItemEqualToValue),L=J(S,$.transitionStatus),ie=X.useRef(null),ae=X.useRef(null),[oe,se]=X.useState(_),R=M&&oe&&F!==`touch`;!M&&oe!==_&&se(_),x(()=>{M||($.scrollUpArrowVisible(S.state)&&S.set(`scrollUpArrowVisible`,!1),$.scrollDownArrowVisible(S.state)&&S.set(`scrollDownArrowVisible`,!1))},[S,M]),X.useImperativeHandle(T,()=>R),Ce((R||N)&&j,F===`touch`,I,ne);let z=ce({anchor:n,floatingRootContext:A,positionMethod:r,mounted:M,side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:m,collisionBoundary:d,collisionPadding:p,sticky:h,disableAnchorTracking:g??R,collisionAvoidance:v,keepMounted:!0}),B=R?`none`:z.side,ue=R?Pt:z.positionerStyles,V={open:j,side:B,align:z.align,anchorHidden:z.anchorHidden};x(()=>{S.set(`popupSide`,z.side)},[S,z.side]);let de=ve(e,V,{styles:ue,transitionStatus:L,props:b,refs:[t,f(e=>{S.set(`positionerElement`,e)})],hidden:!M,inert:!j}),H=X.useRef(0),U=f(e=>{if(e.size===0&&H.current===0||D.current.length===0)return;let t=H.current;if(H.current=e.size,e.size===t)return;let n=i(k);if(t!==0&&!S.state.multiple&&P!==null&<(D.current,P,re)===-1){let e=O.current,t=e!=null&<(D.current,e,re)!==-1?e:null;te(t,n),t===null&&(S.set(`selectedIndex`,null),E.current=null)}if(t!==0&&S.state.multiple&&Array.isArray(P)){let e=e=>lt(D.current,e,re)!==-1,t=P.filter(t=>e(t));(t.length!==P.length||t.some(e=>!ct(P,e,re)))&&(te(t,n),t.length===0&&(S.set(`selectedIndex`,null),E.current=null))}if(j&&R){S.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:``};Mt(I,e),Mt(ee.current,e)}}),W=X.useMemo(()=>({...z,side:B,alignItemWithTriggerActive:R,setControlledAlignItemWithTrigger:se,scrollUpArrowRef:ie,scrollDownArrowRef:ae}),[z,B,R,se]);return(0,Q.jsx)(Ee,{elementsRef:C,labelsRef:w,onMapChange:U,children:(0,Q.jsxs)(At.Provider,{value:W,children:[M&&N&&(0,Q.jsx)(G,{inert:_e(!j),cutout:ne}),de]})})}),It={...Te,...we},Lt=X.forwardRef(function(e,t){let{render:n,className:r,style:a,finalFocus:s,...c}=e,{store:l,popupRef:u,onOpenChangeComplete:m,setOpen:h,valueRef:g,firstItemTextRef:_,selectedItemTextRef:v,multiple:y,handleScrollArrowVisibility:b,scrollHandlerRef:S,listRef:w,highlightItemOnHover:T}=Z(),{side:E,align:D,alignItemWithTriggerActive:O,isPositioned:k,setControlledAlignItemWithTrigger:ee}=jt(),te=Le(!0)!=null,A=at(),M=o(),{nonce:F,disableStyleElements:ne}=N(),re=J(l,$.id),L=J(l,$.open),ie=J(l,$.openMethod),oe=J(l,$.mounted),ce=J(l,$.popupProps),z=J(l,$.transitionStatus),le=J(l,$.triggerElement),B=J(l,$.positionerElement),ue=J(l,$.listElement),V=X.useRef(!1),de=X.useRef(!1),H=X.useRef({}),U=fe(),W=f(e=>{if(!B||!u.current||!de.current)return;if(V.current||!O){b();return}let t=B.style.top===`0px`,n=B.style.bottom===`0px`;if(!t&&!n){b();return}let r=Bt(B),i=Vt(B.getBoundingClientRect().height,`y`,r),a=d(B),o=ae(B),s=o.getComputedStyle(B),c=parseFloat(s.marginTop),l=parseFloat(s.marginBottom),f=Rt(o.getComputedStyle(u.current)),p=Math.min(a.documentElement.clientHeight-c-l,f),m=e.scrollTop,h=zt(e),g=0,_=null,v=!1,y=!1,x=e=>{B.style.height=`${e}px`},S=(t,n)=>{let r=C(t,0,p-i);r>0&&x(i+r),e.scrollTop=n,p-(i+r)<=1&&(V.current=!0),b()},w=t?h-m:m,T=Math.min(i+w,p);if(g=T,w<=1){S(w,t?h:0);return}if(p-T>1?t?y=!0:_=0:(v=!0,n&&m<h&&(_=m-(w-(i+w-p)))),g=Math.ceil(g),g!==0&&x(g),y||_!=null){let t=zt(e),n=y?t:C(_,0,t);Math.abs(e.scrollTop-n)>1&&(e.scrollTop=n)}(v||g>=p-1)&&(V.current=!0),b()});X.useImperativeHandle(S,()=>W,[W]),Se({open:L,ref:u,onComplete(){L&&m?.(!0)}});let G={open:L,transitionStatus:z,side:E,align:D};x(()=>{!B||!u.current||Object.keys(H.current).length||(H.current={top:B.style.top||`0`,left:B.style.left||`0`,right:B.style.right,height:B.style.height,bottom:B.style.bottom,minHeight:B.style.minHeight,maxHeight:B.style.maxHeight,marginTop:B.style.marginTop,marginBottom:B.style.marginBottom})},[u,B]),x(()=>{L||O||(de.current=!1,V.current=!1,Mt(B,H.current))},[L,O,B,u]),x(()=>{let e=u.current;if(!L||!le||!B||!e||O&&!k||l.state.transitionStatus===`ending`)return;if(!O){de.current=!0,U.request(b),e.style.removeProperty(`--transform-origin`);return}let t=Wt(e);e.style.removeProperty(`--transform-origin`);try{let t=v.current;t?.isConnected||(t=!$.hasSelectedValue(l.state)&&_.current?.isConnected?_.current:null);let n=g.current,r=ae(B),i=r.getComputedStyle(B),a=r.getComputedStyle(e),o=d(le),s=Bt(le),c=Ht(le.getBoundingClientRect(),s),u=Ht(B.getBoundingClientRect(),s),f=c.height,m=ue||e,h=m.scrollHeight,y=parseFloat(a.borderBottomWidth),x=parseFloat(i.marginTop)||10,S=parseFloat(i.marginBottom)||10,E=parseFloat(i.minHeight)||100,D=Rt(a),O=o.documentElement.clientHeight-x-S,k=o.documentElement.clientWidth,te=O-c.bottom+f,A,j=M===`rtl`?c.right-u.width:c.left,N=0;if(t&&n){let e=Ht(n.getBoundingClientRect(),s);A=Ht(t.getBoundingClientRect(),s),j=u.left+(M===`rtl`?e.right-A.right:e.left-A.left);let r=e.top-c.top+e.height/2;N=A.top-u.top+A.height/2-r}let P=te+N+S+y,F=Math.min(O,P),I=O-x-S,ne=P-F,re=k-5;B.style.left=`${C(j,5,re-u.width)}px`,B.style.height=`${F}px`,B.style.maxHeight=`none`,B.style.marginTop=`${x}px`,B.style.marginBottom=`${S}px`,e.style.height=`100%`;let L=zt(m),ie=ne>=L-1;ie&&(F=Math.min(O,u.height)-(ne-L));let oe=c.top<20||c.bottom>O-20||Math.ceil(F)+1<Math.min(h,E),se=(r.visualViewport?.scale??1)!==1&&p;if(oe||se){de.current=!0,Mt(B,H.current),ee(!1);return}let ce=Math.max(E,F);if(ie){let e=Math.max(0,O-P);B.style.top=u.height>=I?`0`:`${e}px`,B.style.height=`${F}px`,m.scrollTop=zt(m)}else B.style.bottom=`0`,m.scrollTop=ne;if(A){let t=u.top,n=u.height,r=A.top+A.height/2,i=C(n>0?(r-t)/n*100:50,0,100);e.style.setProperty(`--transform-origin`,`50% ${i}%`)}(ce===O||F>=D)&&(V.current=!0),b(),T&&l.state.selectedIndex===null&&l.state.activeIndex===null&&w.current[0]!=null&&l.set(`activeIndex`,0),de.current=!0}finally{t()}},[l,L,B,le,g,_,v,u,b,O,ee,U,ue,w,T,M,k]),X.useEffect(()=>{if(!O||!B||!L)return;let e=ae(B);function t(e){h(!1,i(P,e))}return se(e,`resize`,t)},[h,O,B,L]);let K={...ue?{role:`presentation`,"aria-orientation":void 0}:{role:`listbox`,"aria-multiselectable":y||void 0,id:`${re}-list`},onKeyDown(e){te&&R.has(e.key)&&e.stopPropagation()},onScroll(e){ue||W(e.currentTarget)},...O&&{style:ue?{height:`100%`}:Nt}},me=j(`div`,e,{ref:[t,u],state:G,stateAttributesMapping:It,props:[ce,K,pe(z),{className:!ue&&O?I.className:void 0},c]});return(0,Q.jsxs)(X.Fragment,{children:[!ne&&I.getElement(F),(0,Q.jsx)(xe,{context:A,modal:!1,disabled:!oe,openInteractionType:ie,returnFocus:s,restoreFocus:!0,children:me})]})});function Rt(e){let t=e.maxHeight||``;return t.endsWith(`px`)&&parseFloat(t)||1/0}function zt(e){return F(e.scrollHeight,e.clientHeight)}function Bt(e){return ye.getScale(e)}function Vt(e,t,n){return e/n[t]}function Ht(e,t){return V({x:Vt(e.x,`x`,t),y:Vt(e.y,`y`,t),width:Vt(e.width,`x`,t),height:Vt(e.height,`y`,t)})}var Ut=[[`transform`,`none`],[`scale`,`1`],[`translate`,`0 0`]];function Wt(e){let{style:t}=e,n={};for(let[e,r]of Ut)n[e]=t.getPropertyValue(e),t.setProperty(e,r,`important`);return()=>{for(let[e]of Ut){let r=n[e];r?t.setProperty(e,r):t.removeProperty(e)}}}var Gt=X.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{store:o,scrollHandlerRef:s}=Z(),{alignItemWithTriggerActive:c}=jt(),l=J(o,$.hasScrollArrows),u=J(o,$.openMethod),d=J(o,$.multiple),p={id:`${J(o,$.id)}-list`,role:`listbox`,"aria-multiselectable":d||void 0,onScroll(e){s.current?.(e.currentTarget)},...c&&{style:Nt},className:l&&u!==`touch`?I.className:void 0};return j(`div`,e,{ref:[t,f(e=>{o.set(`listElement`,e)})],props:[p,a]})}),Kt=X.createContext(void 0);function qt(){let e=X.useContext(Kt);if(!e)throw Error(a(57));return e}var Jt=X.memo(X.forwardRef(function(e,t){let{render:n,className:r,style:a,value:o=null,label:s,disabled:c=!1,nativeButton:l=!1,...u}=e,d=X.useRef(null),f=ke({label:s,textRef:d,indexGuessBehavior:Fe.GuessFromOrder}),{store:p,itemProps:m,setOpen:h,setValue:_,selectionRef:v,typingRef:b,valuesRef:S,multiple:C,selectedItemTextRef:w,disabled:T,readOnly:E}=Z(),D=J(p,$.isActive,f.index),O=J(p,$.open),k=J(p,$.isSelected,o),ee=J(p,$.isSelectedByFocus,f.index),te=J(p,$.isItemEqualToValue),A=f.index,M=A!==-1,N=X.useRef(null);x(()=>{if(!M)return;let e=S.current;return e[A]=o,()=>{delete e[A]}},[M,A,o,S]),x(()=>{if(!M)return;let e=p.state.value,t=e;C&&Array.isArray(e)&&(t=e.length>0?e[e.length-1]:void 0),t!==void 0&&st(o,t,te)&&(p.set(`selectedIndex`,A),d.current&&(w.current=d.current))},[M,A,C,te,p,o,w]);let P=X.useRef(null),F=X.useRef(`mouse`),I=X.useRef(!1),{getButtonProps:ne,buttonRef:re}=y({disabled:c,focusableWhenDisabled:!0,native:l,composite:!0}),L={disabled:c,selected:k,highlighted:D};function ie(e){if(T||E)return;let t=p.state.value;if(C){let n=Array.isArray(t)?t:[];_(k?ut(n,o,te):[...n,o],i(g,e))}else _(o,i(g,e)),h(!1,i(g,e))}function ae(){v.current.dragY=0}let oe={role:`option`,"aria-selected":k,tabIndex:O&&D?0:-1,onKeyDown(e){P.current=e.key,p.set(`activeIndex`,A),e.key===` `&&b.current&&e.preventDefault()},onClick(e){let t=e.type===`click`&&F.current!==`touch`,n=e.nativeEvent.pointerType,r=t&&Me(e.nativeEvent)&&(n!==void 0||D),i=t&&!r&&!I.current;I.current=!1,!(e.type===`keydown`&&P.current===null)&&(c||e.type===`keydown`&&P.current===` `&&b.current||i||(P.current=null,ie(e.nativeEvent)))},onPointerEnter(e){F.current=e.pointerType},onPointerMove(e){if(e.pointerType===`mouse`&&e.buttons===1){let t=v.current;t.dragY+=e.movementY,t.dragY**2>=64&&(t.allowUnselectedMouseUp=!0)}},onPointerDown(e){F.current=e.pointerType,I.current=!0,ae()},onMouseUp(){if(ae(),c||F.current===`touch`||I.current)return;let e=!v.current.allowSelectedMouseUp&&k,t=!v.current.allowUnselectedMouseUp&&!k;e||t||(I.current=!0,N.current?.click(),I.current=!1)}},se=j(`div`,e,{ref:[re,t,f.ref,N],state:L,props:[m,oe,u,ne]}),ce=X.useMemo(()=>({selected:k,index:A,textRef:d,selectedByFocus:ee,hasRegistered:M}),[k,A,d,ee,M]);return(0,Q.jsx)(Kt.Provider,{value:ce,children:se})})),Yt=X.forwardRef(function(e,t){let n=e.keepMounted??!1,{selected:r}=qt();return n||r?(0,Q.jsx)(Xt,{...e,ref:t}):null}),Xt=X.memo(X.forwardRef((e,t)=>{let{render:n,className:r,style:i,keepMounted:a,...o}=e,{selected:s}=qt(),c=X.useRef(null),{transitionStatus:l,setMounted:u}=De(s),d=j(`span`,e,{ref:[t,c],state:{selected:s,transitionStatus:l},props:[{"aria-hidden":!0,children:`✔️`},o],stateAttributesMapping:we});return Se({open:s,ref:c,onComplete(){s||u(!1)}}),d})),Zt=X.memo(X.forwardRef(function(e,t){let{index:n,textRef:r,selectedByFocus:i,hasRegistered:a}=qt(),{firstItemTextRef:o,selectedItemTextRef:s}=Z(),{render:c,className:l,style:u,...d}=e;return j(`div`,e,{ref:[X.useCallback(e=>{e&&(a&&n===0&&(o.current=e),a&&i&&(s.current=e))},[o,s,n,i,a]),t,r],props:d})})),Qt=X.forwardRef(function(e,t){let{render:n,className:r,style:i,direction:a,keepMounted:o=!1,...s}=e,c=a===`up`,{store:l,popupRef:u,listRef:d,handleScrollArrowVisibility:f,scrollArrowsMountedCountRef:p}=Z(),{side:m,scrollDownArrowRef:h,scrollUpArrowRef:g}=jt(),_=J(l,c?$.scrollUpArrowVisible:$.scrollDownArrowVisible),y=J(l,$.openMethod),b=_&&y!==`touch`,S=v(),C=c?g:h,{mounted:w,transitionStatus:T,setMounted:E}=De(b);x(()=>(p.current+=1,l.state.hasScrollArrows||l.set(`hasScrollArrows`,!0),()=>{p.current=Math.max(0,p.current-1),p.current===0&&l.state.hasScrollArrows&&l.set(`hasScrollArrows`,!1)}),[l,p]),Se({open:b,ref:C,onComplete(){b||E(!1)}});let D=j(`div`,e,{ref:[t,C],state:{direction:a,visible:b,side:m,transitionStatus:T},props:[{"aria-hidden":!0,children:c?`▲`:`▼`,style:{position:`absolute`},onMouseMove(e){if(e.movementX===0&&e.movementY===0||S.isStarted())return;l.set(`activeIndex`,null);function t(){let e=l.state.listElement??u.current;if(!e)return;l.set(`activeIndex`,null),f();let n=F(e.scrollHeight,e.clientHeight),r=A(e.scrollTop,n),i=r===(c?0:n),a=d.current;if(r!==e.scrollTop&&(e.scrollTop=r),a.length===0&&l.set(c?`scrollUpArrowVisible`:`scrollDownArrowVisible`,!i),i){S.clear();return}if(a.length>0){let t=C.current?.offsetHeight||0;e.scrollTop=$t(a,c,r,e.clientHeight,t,n)}S.start(40,t)}S.start(40,t)},onMouseLeave(){S.clear()}},s],stateAttributesMapping:we});return w||o?D:null});function $t(e,t,n,r,i,a){if(t){let t=0,r=n+i-1;for(let n=0;n<e.length;n+=1){let i=e[n];if(i&&i.offsetTop>=r){t=n;break}}let o=Math.max(0,t-1),s=e[o];return o<t&&s?A(s.offsetTop-i,a):0}let o=e.length-1,s=n+r-i+1;for(let t=0;t<e.length;t+=1){let n=e[t];if(n&&n.offsetTop+n.offsetHeight>s){o=Math.max(0,t-1);break}}let c=Math.min(e.length-1,o+1),l=e[c];return c>o&&l?A(l.offsetTop+l.offsetHeight-r+i,a):a}var en=X.forwardRef(function(e,t){return(0,Q.jsx)(Qt,{...e,ref:t,direction:`down`})}),tn=X.forwardRef(function(e,t){return(0,Q.jsx)(Qt,{...e,ref:t,direction:`up`})}),nn=yt;function rn({className:e,...t}){return(0,Q.jsx)(Et,{"data-slot":`select-value`,className:s(`flex flex-1 text-left`,e),...t})}function an({className:e,size:t=`default`,children:n,...r}){return(0,Q.jsxs)(wt,{"data-slot":`select-trigger`,"data-size":t,className:s(`flex w-fit cursor-pointer items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...r,children:[n,(0,Q.jsx)(Dt,{render:(0,Q.jsx)(Je,{className:`pointer-events-none size-4 text-muted-foreground`})})]})}function on({className:e,children:t,side:n=`bottom`,sideOffset:r=4,align:i=`center`,alignOffset:a=0,alignItemWithTrigger:o=!0,...c}){return(0,Q.jsx)(kt,{children:(0,Q.jsx)(Ft,{side:n,sideOffset:r,align:i,alignOffset:a,alignItemWithTrigger:o,className:`isolate z-50`,children:(0,Q.jsxs)(Lt,{"data-slot":`select-content`,"data-align-trigger":o,className:s(`relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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-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`,e),...c,children:[(0,Q.jsx)(cn,{}),(0,Q.jsx)(Gt,{children:t}),(0,Q.jsx)(ln,{})]})})})}function sn({className:e,children:t,...n}){return(0,Q.jsxs)(Jt,{"data-slot":`select-item`,className:s(`relative flex w-full cursor-pointer items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:cursor-not-allowed 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`,e),...n,children:[(0,Q.jsx)(Zt,{className:`flex flex-1 shrink-0 gap-2 whitespace-nowrap`,children:t}),(0,Q.jsx)(Yt,{render:(0,Q.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex size-4 items-center justify-center`}),children:(0,Q.jsx)(ge,{className:`pointer-events-none`})})]})}function cn({className:e,...t}){return(0,Q.jsx)(tn,{"data-slot":`select-scroll-up-button`,className:s(`top-0 z-10 flex w-full cursor-pointer items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4`,e),...t,children:(0,Q.jsx)(Ye,{})})}function ln({className:e,...t}){return(0,Q.jsx)(en,{"data-slot":`select-scroll-down-button`,className:s(`bottom-0 z-10 flex w-full cursor-pointer items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4`,e),...t,children:(0,Q.jsx)(Je,{})})}function un(e){return K(e,X.useContext(de)?`drawer`:`dialog`)}function dn({...e}){return(0,Q.jsx)(un,{"data-slot":`dialog`,...e})}function fn({...e}){return(0,Q.jsx)(tt,{"data-slot":`dialog-trigger`,...e})}function pn({...e}){return(0,Q.jsx)(B,{"data-slot":`dialog-portal`,...e})}function mn({className:e,...t}){return(0,Q.jsx)(W,{"data-slot":`dialog-overlay`,className:s(`fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,e),...t})}function hn({className:e,children:t,showCloseButton:n=!0,...r}){return(0,Q.jsxs)(pn,{children:[(0,Q.jsx)(mn,{}),(0,Q.jsxs)(Ne,{"data-slot":`dialog-content`,className:s(`fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-background p-4 text-sm ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm 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`,e),...r,children:[t,n&&(0,Q.jsxs)(U,{"data-slot":`dialog-close`,render:(0,Q.jsx)(oe,{variant:`ghost`,className:`absolute top-2 right-2`,size:`icon-sm`}),children:[(0,Q.jsx)(et,{}),(0,Q.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function gn({className:e,...t}){return(0,Q.jsx)(`div`,{"data-slot":`dialog-header`,className:s(`flex flex-col gap-2`,e),...t})}function _n({className:e,showCloseButton:t=!1,children:n,...r}){return(0,Q.jsxs)(`div`,{"data-slot":`dialog-footer`,className:s(`-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end`,e),...r,children:[n,t&&(0,Q.jsx)(U,{render:(0,Q.jsx)(oe,{variant:`outline`}),children:`Close`})]})}function vn({className:e,...t}){return(0,Q.jsx)(ue,{"data-slot":`dialog-title`,className:s(`text-base leading-none font-medium`,e),...t})}function yn({className:e,...t}){return(0,Q.jsx)(je,{"data-slot":`dialog-description`,className:s(`text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground`,e),...t})}function bn({className:e,...t}){return(0,Q.jsx)(`textarea`,{"data-slot":`textarea`,className:s(`flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...t})}function xn({className:e,...t}){return(0,Q.jsx)(`div`,{"data-slot":`input-group`,role:`group`,className:s(`group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5`,e),...t})}var Sn=w(`flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4`,{variants:{align:{"inline-start":`order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]`,"inline-end":`order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]`,"block-start":`order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2`,"block-end":`order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2`}},defaultVariants:{align:`inline-start`}});function Cn({className:e,align:t=`inline-start`,...n}){return(0,Q.jsx)(`div`,{role:`group`,"data-slot":`input-group-addon`,"data-align":t,className:s(Sn({align:t}),e),onClick:e=>{e.target.closest(`button`)||e.currentTarget.parentElement?.querySelector(`input`)?.focus()},...n})}var wn=w(`flex items-center gap-2 text-sm shadow-none`,{variants:{size:{xs:`h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5`,sm:``,"icon-xs":`size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0`,"icon-sm":`size-8 p-0 has-[>svg]:p-0`}},defaultVariants:{size:`xs`}});function Tn({className:e,type:t=`button`,variant:n=`ghost`,size:r=`xs`,...i}){return(0,Q.jsx)(oe,{type:t,"data-size":r,variant:n,className:s(wn({size:r}),e),...i})}function En({className:e,...t}){return(0,Q.jsx)(T,{"data-slot":`input-group-control`,className:s(`flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent`,e),...t})}function Dn({className:e,...t}){return(0,Q.jsx)(bn,{"data-slot":`input-group-control`,className:s(`flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent`,e),...t})}function On({className:e,...t}){return(0,Q.jsx)(`label`,{"data-slot":`label`,className:s(`flex items-center gap-2 text-base leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,e),...t})}export{ct as A,ft as C,ot as D,st as E,Xe as F,Je as I,$e as M,Qe as N,lt as O,Ze as P,pt as S,ht as T,sn as _,En as a,bt as b,dn as c,_n as d,gn as f,on as g,nn as h,Tn as i,et as j,ut as k,hn as l,fn as m,xn as n,Dn as o,vn as p,Cn as r,bn as s,On as t,yn as u,an as v,mt as w,vt as x,rn as y};
|
|
1
|
+
import{a as e}from"./rolldown-runtime-CNC7AqOf.js";import{i as t,r as n}from"./bundle-mjs-D3mlU5Wg.js";import{A as r,B as i,Bt as a,D as o,E as s,F as c,H as l,Ht as u,I as d,L as f,Nt as p,O as m,P as h,Q as g,R as _,Rt as v,S as y,T as b,Vt as x,_ as S,a as C,b as w,c as T,ct as E,d as D,dt as O,et as k,f as ee,h as te,i as A,k as j,l as M,o as N,ot as P,r as F,s as I,st as ne,u as re,v as L,x as ie,xt as ae,y as oe,z as se}from"./vscode-BO5mAFne.js";import{$ as ce,A as R,At as z,Ct as le,D as B,E as ue,Et as V,F as de,I as H,M as U,N as W,O as G,Ot as fe,P as K,Q as pe,St as me,T as he,W as ge,X as _e,Z as ve,_t as ye,at as be,bt as xe,ct as Se,d as Ce,dt as we,et as Te,f as Ee,ft as De,gt as Oe,h as ke,ht as q,it as Ae,j as je,jt as Me,k as Ne,kt as Pe,m as Fe,mt as J,nt as Y,ot as Ie,p as Le,pt as Re,rt as ze,st as Be,tt as Ve,u as He,vt as Ue,w as We,xt as Ge,yt as Ke}from"./index-ztdpsLyk.js";var X=e(t(),1);function qe(e){let[t,n]=X.useState({current:e,previous:null});return e!==t.current&&n({current:e,previous:t.current}),t.previous}var Je=b(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),Ye=b(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),Xe=b(`circle`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),Ze=b(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),Qe=b(`image`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]),$e=b(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),et=b(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),tt=X.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:o=!1,nativeButton:s=!0,id:c,payload:l,handle:u,...d}=e,f=H(!0),p=u?.store??f?.store;if(!p)throw Error(a(79));let h=m(c),g=p.useState(`floatingRootContext`),_=p.useState(`isOpenedByTrigger`,h),v=p.useState(`triggerPopupId`,h),b=X.useRef(null),{registerTrigger:x,isMountedByThisTrigger:S}=Be(h,b,p,{payload:l}),{getButtonProps:C,buttonRef:w}=y({disabled:o,native:s}),T=Ke(g,{enabled:g!=null}),E=he(()=>p.select(`open`),e=>{p.set(`openMethod`,e)}),D={disabled:o,open:_},O=p.useState(`triggerProps`,S);return j(`button`,e,{state:D,ref:[w,t,x,b],props:[T.reference,O,E,{[me]:``,id:h,"aria-haspopup":`dialog`,"aria-expanded":_,"aria-controls":v},d,C],stateAttributesMapping:Y})});function nt(e){return e==null||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}var rt=X.createContext(null),it=X.createContext(null);function Z(){let e=X.useContext(rt);if(e===null)throw Error(a(60));return e}function at(){let e=X.useContext(it);if(e===null)throw Error(a(61));return e}var ot=(e,t)=>Object.is(e,t);function st(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function ct(e,t,n){return!e||e.length===0?!1:e.some(e=>e===void 0?!1:st(t,e,n))}function lt(e,t,n){return!e||e.length===0?-1:e.findIndex(e=>e===void 0?!1:st(e,t,n))}function ut(e,t,n){return e.filter(e=>!st(t,e,n))}function dt(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}var Q=n();function ft(e){return e!=null&&e.length>0&&typeof e[0]==`object`&&e[0]!=null&&`items`in e[0]}function pt(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(ft(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 mt(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 dt(e)}function ht(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?dt(e.value):dt(e)}function gt(e,t,n){function r(){return mt(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 t[e]??r();if(Array.isArray(t)){let n=t,i=ft(n)?n.flatMap(e=>e.items):n;if(typeof e!=`object`||!e){let t=i.find(t=>t.value===e);return t&&t.label!=null?t.label:r()}if(`value`in e){let t=i.find(t=>t&&t.value===e.value);if(t&&t.label!=null)return t.label}}return r()}function _t(e,t,n){return e.reduce((e,r,i)=>(i>0&&e.push(`, `),e.push((0,Q.jsx)(X.Fragment,{children:gt(r,t,n)},i)),e),[])}var $={id:q(e=>e.id),labelId:q(e=>e.labelId),modal:q(e=>e.modal),multiple:q(e=>e.multiple),items:q(e=>e.items),itemToStringLabel:q(e=>e.itemToStringLabel),itemToStringValue:q(e=>e.itemToStringValue),isItemEqualToValue:q(e=>e.isItemEqualToValue),value:q(e=>e.value),hasSelectedValue:q(e=>{let{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:ht(t,r)!==``}),hasNullItemLabel:q((e,t)=>t?pt(e.items):!1),open:q(e=>e.open),mounted:q(e=>e.mounted),forceMount:q(e=>e.forceMount),transitionStatus:q(e=>e.transitionStatus),openMethod:q(e=>e.openMethod),activeIndex:q(e=>e.activeIndex),selectedIndex:q(e=>e.selectedIndex),isActive:q((e,t)=>e.activeIndex===t),isSelected:q((e,t)=>{let n=e.isItemEqualToValue,r=e.value;return e.multiple?Array.isArray(r)&&r.some(e=>st(t,e,n)):st(t,r,n)}),isSelectedByFocus:q((e,t)=>e.selectedIndex===t),popupProps:q(e=>e.popupProps),triggerProps:q(e=>e.triggerProps),triggerElement:q(e=>e.triggerElement),positionerElement:q(e=>e.positionerElement),listElement:q(e=>e.listElement),popupSide:q(e=>e.popupSide),scrollUpArrowVisible:q(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:q(e=>e.scrollDownArrowVisible),hasScrollArrows:q(e=>e.hasScrollArrows)};function vt(e,t,n=(e,t)=>e===t){return e.length===t.length&&e.every((e,r)=>n(e,t[r]))}function yt(e){let{id:t,value:n,defaultValue:a=null,onValueChange:o,open:s,defaultOpen:l=!1,onOpenChange:d,name:p,form:m,autoComplete:g,disabled:v=!1,readOnly:y=!1,required:b=!1,modal:S=!0,actionsRef:C,inputRef:w,onOpenChangeComplete:T,items:D,multiple:O=!1,itemToStringLabel:j,itemToStringValue:N,isItemEqualToValue:P=ot,highlightItemOnHover:I=!0,children:ae}=e,{clearErrors:oe}=ee(),{setDirty:se,setTouched:ce,setFocused:R,validityData:z,setFilled:le,name:B,disabled:ue,validation:V,validationMode:de}=te(),H=M({id:t}),U=ue||v,W=B??p,[G,fe]=L({controlled:n,default:O?a??ne:a,name:`Select`,state:`value`}),[K,pe]=L({controlled:s,default:l,name:`Select`,state:`open`}),me=X.useRef([]),he=X.useRef([]),ge=X.useRef(null),_e=X.useRef(null),ve=X.useRef(0),ye=X.useRef(null),xe=X.useRef([]),Ce=X.useRef(!1),we=X.useRef(null),Te=X.useRef(null),Ee=X.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),ke=X.useRef(!1),{mounted:q,setMounted:je,transitionStatus:Me}=De(K),{openMethod:Ne,triggerProps:Fe}=We(K),Y=u(()=>new Re({id:H,labelId:void 0,modal:S,multiple:O,itemToStringLabel:j,itemToStringValue:N,isItemEqualToValue:P,value:G,open:K,mounted:q,transitionStatus:Me,items:D,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,Le=J(Y,$.activeIndex),Be=J(Y,$.selectedIndex),Ve=J(Y,$.triggerElement),He=J(Y,$.positionerElement),Ge=qe(Ne),Je=Ne??Ge??null,Ye=X.useMemo(()=>O?``:ht(G,N),[O,G,N]),Xe=X.useMemo(()=>O&&Array.isArray(G)?G.map(e=>ht(e,N)):ht(G,N),[O,G,N]);re(Pe(Y.state.triggerElement),H,G,f(()=>Xe),!U,p);let Ze=X.useRef(G),Qe=O?Array.isArray(G)&&G.length>0:G!=null&&ht(G,N)!==``;x(()=>{G!==Ze.current&&Y.set(`forceMount`,!0)},[Y,G]),x(()=>{le(Qe)},[Qe,le]),x(function(){let e=xe.current,t;if(O){let n=Array.isArray(G)?G:[];if(n.length===0)t=null;else{let r=n[n.length-1],i=lt(e,r,P);t=i===-1?null:i}}else{let n=lt(e,G,P);t=n===-1?null:n}t===null&&(Te.current=null),!K&&Y.set(`selectedIndex`,t)},[Qe,O,K,G,xe,P,Y,Te]);function $e(e){let t=z.initialValue;return Array.isArray(e)&&Array.isArray(t)?!vt(e,t,(e,t)=>st(e,t,P)):e!==t}ie(G,()=>{oe(W),se($e(G)),V.change(G)});let et=f((e,t)=>{d?.(e,t),!t.isCanceled&&(pe(e),!e&&(t.reason===`focus-out`||t.reason===`outside-press`)&&(ce(!0),R(!1),de===`onBlur`&&V.commit(G)))}),tt=f(()=>{je(!1),Y.update({activeIndex:null,openMethod:null}),T?.(!1)});Se({enabled:!C,open:K,ref:ge,onComplete(){K||tt()}}),X.useImperativeHandle(C,()=>({unmount:tt}),[tt]);let Z=f((e,t)=>{o?.(e,t),!t.isCanceled&&fe(e)}),at=f(()=>{let e=Y.state.listElement||ge.current;if(!e)return;let t=F(e.scrollHeight,e.clientHeight),n=A(e.scrollTop,t),r=n>0,i=n<t;Y.state.scrollUpArrowVisible!==r&&Y.set(`scrollUpArrowVisible`,r),Y.state.scrollDownArrowVisible!==i&&Y.set(`scrollDownArrowVisible`,i)}),ct=be({open:K,onOpenChange:et,elements:{reference:Ve,floating:He}}),ut=Ke(ct,{enabled:!y&&!U,event:`mousedown`}),dt=Ue(ct),ft=Ae(ct,{enabled:!y&&!U,listRef:me,activeIndex:Le,selectedIndex:Be,disabledIndices:ne,onNavigate(e){e===null&&!K||Y.set(`activeIndex`,e)},focusItemOnHover:I}),pt=ze(ct,{enabled:!y&&!U&&(K||!O),listRef:he,activeIndex:Le,selectedIndex:Be,disabledIndices:e=>nt(me.current[e]),onMatch(e){K?Y.set(`activeIndex`,e):Z(xe.current[e],i(`none`))},onTyping(e){Ce.current=e}}),gt=X.useMemo(()=>{let e=r(pt.reference,ft.reference,dt.reference,ut.reference,Fe);return H&&(e.id=H),e},[ut.reference,pt.reference,ft.reference,dt.reference,Fe,H]),_t=X.useMemo(()=>r(Ie,pt.floating,ft.floating,dt.floating),[pt.floating,ft.floating,dt.floating]),yt=ft.item??E;Oe(()=>{Y.update({popupProps:_t,triggerProps:gt})}),x(()=>{Y.update({id:H,modal:S,multiple:O,value:G,open:K,mounted:q,transitionStatus:Me,popupProps:_t,triggerProps:gt,items:D,itemToStringLabel:j,itemToStringValue:N,isItemEqualToValue:P,openMethod:Je})},[Y,H,S,O,G,K,q,Me,_t,gt,D,j,N,P,Je]);let bt=X.useMemo(()=>({store:Y,name:W,required:b,disabled:U,readOnly:y,multiple:O,highlightItemOnHover:I,setValue:Z,setOpen:et,listRef:me,popupRef:ge,scrollHandlerRef:_e,handleScrollArrowVisibility:at,scrollArrowsMountedCountRef:ve,itemProps:yt,valueRef:ye,valuesRef:xe,labelsRef:he,typingRef:Ce,selectionRef:Ee,firstItemTextRef:we,selectedItemTextRef:Te,validation:V,onOpenChangeComplete:T,alignItemWithTriggerActiveRef:ke,initialValueRef:Ze}),[Y,W,b,U,y,O,I,Z,et,yt,V,T,at]),xt=_(w,V.inputRef),St=O&&Array.isArray(G)&&G.length>0,Ct=O?void 0:W,wt=X.useMemo(()=>!O||!Array.isArray(G)||!W?null:G.map(e=>{let t=ht(e,N);return(0,Q.jsx)(`input`,{type:`hidden`,form:m,name:W,value:t,disabled:U},t)}),[O,G,m,W,N,U]);return(0,Q.jsx)(rt.Provider,{value:bt,children:(0,Q.jsxs)(it.Provider,{value:ct,children:[ae,(0,Q.jsx)(`input`,{...V.getValidationProps(U,{onFocus(){Y.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented||U||y)return;let t=e.currentTarget.value,n=i(k,e.nativeEvent);function r(){if(O)return;let e=t.toLowerCase(),r=xe.current.findIndex(t=>ht(t,N).toLowerCase()===e||mt(t,j).toLowerCase()===e);r===-1&&(r=xe.current.findIndex((t,n)=>{let r=he.current[n];return r!=null&&r.toLowerCase()===e}));let i=r===-1?void 0:xe.current[r];i!=null&&Z(i,n)}Y.set(`forceMount`,!0),queueMicrotask(r)}}),id:H&&Ct==null?`${H}-hidden-input`:void 0,form:m,name:Ct,autoComplete:g,value:Ye,disabled:U,required:b&&!St,readOnly:y,ref:xt,style:W?c:h,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),wt]})})}function bt(e,t){return e??t}var xt=2,St=400,Ct={...Ve,...S,popupSide:e=>e?{"data-popup-side":e}:null,value:()=>null},wt=X.forwardRef(function(e,t){let{render:n,className:a,id:o,disabled:s=!1,nativeButton:c=!0,style:u,...p}=e,{setTouched:m,setFocused:h,validationMode:g,state:_,disabled:b}=te(),{labelId:x}=D(),{store:S,setOpen:C,selectionRef:w,validation:T,readOnly:E,required:ee,alignItemWithTriggerActiveRef:A,disabled:N}=Z(),P=b||N||s,F=J(S,$.open),I=J(S,$.mounted),ne=J(S,$.value),re=J(S,$.triggerProps),L=J(S,$.positionerElement),ie=J(S,$.listElement),ae=J(S,$.popupSide),oe=J(S,$.id),se=J(S,$.labelId),ce=J(S,$.hasSelectedValue),R=I&&L?ae:null,le=o??oe,B=bt(x,se);M({id:le});let ue=Pe(L),V=X.useRef(null),{getButtonProps:de,buttonRef:H}=y({disabled:P,native:c}),U=f(e=>{S.set(`triggerElement`,e)}),W=v(),G=v(),fe=v();X.useEffect(()=>{if(F)return fe.start(St,()=>{w.current.allowUnselectedMouseUp=!0,w.current.allowSelectedMouseUp=!0}),()=>{fe.clear()};w.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},G.clear()},[F,w,G,fe]);let K=r(re,{id:le,role:`combobox`,"aria-expanded":F?`true`:`false`,"aria-haspopup":`listbox`,"aria-controls":F?ie?.id??z(L)?.id:void 0,"aria-labelledby":B,"aria-readonly":E||void 0,"aria-required":ee||void 0,tabIndex:P?-1:0,onFocus(e){h(!0),F&&A.current&&C(!1,i(k,e.nativeEvent)),W.start(0,()=>{S.set(`forceMount`,!0)})},onBlur(e){O(L,e.relatedTarget)||(m(!0),h(!1),g===`onBlur`&&T.commit(ne))},onMouseDown(e){if(F)return;let t=d(e.currentTarget);function n(e){if(!V.current)return;let t=e.target;if(O(V.current,t)||O(ue.current,t))return;let n=He(V.current);e.clientX>=n.left-xt&&e.clientX<=n.right+xt&&e.clientY>=n.top-xt&&e.clientY<=n.bottom+xt||C(!1,i(l,e))}G.start(0,()=>{t.addEventListener(`mouseup`,n,{once:!0})})}},p,de),pe=T.getValidationProps(P,K);pe.role=`combobox`;let me={..._,open:F,disabled:P,value:ne,readOnly:E,popupSide:R,placeholder:!ce};return j(`button`,e,{ref:[t,V,H,U],state:me,stateAttributesMapping:Ct,props:pe})}),Tt={value:()=>null},Et=X.forwardRef(function(e,t){let{className:n,render:r,children:i,placeholder:a,style:o,...s}=e,{store:c,valueRef:l}=Z(),u=J(c,$.value),d=J(c,$.items),f=J(c,$.itemToStringLabel),p=J(c,$.hasSelectedValue),m=!p&&a!=null&&i==null,h=J(c,$.hasNullItemLabel,m),g={value:u,placeholder:!p},_=null;return _=typeof i==`function`?i(u):i??(!p&&a!=null&&!h?a:Array.isArray(u)?_t(u,d,f):gt(u,d,f)),j(`span`,e,{state:g,ref:[t,l],props:[{children:_},s],stateAttributesMapping:Tt})}),Dt=X.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{store:o}=Z();return j(`span`,e,{state:{open:J(o,$.open)},ref:t,props:[{"aria-hidden":!0,children:`▼`},a],stateAttributesMapping:Y})}),Ot=X.createContext(void 0),kt=X.forwardRef(function(e,t){let{store:n}=Z(),r=J(n,$.mounted),i=J(n,$.forceMount);return r||i?(0,Q.jsx)(Ot.Provider,{value:!0,children:(0,Q.jsx)(Ge,{ref:t,...e})}):null}),At=X.createContext(void 0);function jt(){let e=X.useContext(At);if(!e)throw Error(a(59));return e}function Mt(e,t){e&&Object.assign(e.style,t)}var Nt={position:`relative`,maxHeight:`100%`,overflowX:`hidden`,overflowY:`auto`},Pt={position:`fixed`},Ft=X.forwardRef(function(e,t){let{anchor:n,positionMethod:r=`absolute`,className:a,render:o,side:s=`bottom`,align:c=`center`,sideOffset:l=0,alignOffset:u=0,collisionBoundary:d=`clipping-ancestors`,collisionPadding:p,arrowPadding:m=5,sticky:h=!1,disableAnchorTracking:g,alignItemWithTrigger:_=!0,collisionAvoidance:v=le,style:y,...b}=e,{store:S,listRef:C,labelsRef:w,alignItemWithTriggerActiveRef:T,selectedItemTextRef:E,valuesRef:D,initialValueRef:O,popupRef:ee,setValue:te}=Z(),A=at(),j=J(S,$.open),M=J(S,$.mounted),N=J(S,$.modal),P=J(S,$.value),F=J(S,$.openMethod),I=J(S,$.positionerElement),ne=J(S,$.triggerElement),re=J(S,$.isItemEqualToValue),L=J(S,$.transitionStatus),ie=X.useRef(null),ae=X.useRef(null),[oe,se]=X.useState(_),R=M&&oe&&F!==`touch`;!M&&oe!==_&&se(_),x(()=>{M||($.scrollUpArrowVisible(S.state)&&S.set(`scrollUpArrowVisible`,!1),$.scrollDownArrowVisible(S.state)&&S.set(`scrollDownArrowVisible`,!1))},[S,M]),X.useImperativeHandle(T,()=>R),Ce((R||N)&&j,F===`touch`,I,ne);let z=ce({anchor:n,floatingRootContext:A,positionMethod:r,mounted:M,side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:m,collisionBoundary:d,collisionPadding:p,sticky:h,disableAnchorTracking:g??R,collisionAvoidance:v,keepMounted:!0}),B=R?`none`:z.side,ue=R?Pt:z.positionerStyles,V={open:j,side:B,align:z.align,anchorHidden:z.anchorHidden};x(()=>{S.set(`popupSide`,z.side)},[S,z.side]);let de=ve(e,V,{styles:ue,transitionStatus:L,props:b,refs:[t,f(e=>{S.set(`positionerElement`,e)})],hidden:!M,inert:!j}),H=X.useRef(0),U=f(e=>{if(e.size===0&&H.current===0||D.current.length===0)return;let t=H.current;if(H.current=e.size,e.size===t)return;let n=i(k);if(t!==0&&!S.state.multiple&&P!==null&<(D.current,P,re)===-1){let e=O.current,t=e!=null&<(D.current,e,re)!==-1?e:null;te(t,n),t===null&&(S.set(`selectedIndex`,null),E.current=null)}if(t!==0&&S.state.multiple&&Array.isArray(P)){let e=e=>lt(D.current,e,re)!==-1,t=P.filter(t=>e(t));(t.length!==P.length||t.some(e=>!ct(P,e,re)))&&(te(t,n),t.length===0&&(S.set(`selectedIndex`,null),E.current=null))}if(j&&R){S.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:``};Mt(I,e),Mt(ee.current,e)}}),W=X.useMemo(()=>({...z,side:B,alignItemWithTriggerActive:R,setControlledAlignItemWithTrigger:se,scrollUpArrowRef:ie,scrollDownArrowRef:ae}),[z,B,R,se]);return(0,Q.jsx)(Ee,{elementsRef:C,labelsRef:w,onMapChange:U,children:(0,Q.jsxs)(At.Provider,{value:W,children:[M&&N&&(0,Q.jsx)(G,{inert:_e(!j),cutout:ne}),de]})})}),It={...Te,...we},Lt=X.forwardRef(function(e,t){let{render:n,className:r,style:a,finalFocus:s,...c}=e,{store:l,popupRef:u,onOpenChangeComplete:m,setOpen:h,valueRef:g,firstItemTextRef:_,selectedItemTextRef:v,multiple:y,handleScrollArrowVisibility:b,scrollHandlerRef:S,listRef:w,highlightItemOnHover:T}=Z(),{side:E,align:D,alignItemWithTriggerActive:O,isPositioned:k,setControlledAlignItemWithTrigger:ee}=jt(),te=Le(!0)!=null,A=at(),M=o(),{nonce:F,disableStyleElements:ne}=N(),re=J(l,$.id),L=J(l,$.open),ie=J(l,$.openMethod),oe=J(l,$.mounted),ce=J(l,$.popupProps),z=J(l,$.transitionStatus),le=J(l,$.triggerElement),B=J(l,$.positionerElement),ue=J(l,$.listElement),V=X.useRef(!1),de=X.useRef(!1),H=X.useRef({}),U=fe(),W=f(e=>{if(!B||!u.current||!de.current)return;if(V.current||!O){b();return}let t=B.style.top===`0px`,n=B.style.bottom===`0px`;if(!t&&!n){b();return}let r=Bt(B),i=Vt(B.getBoundingClientRect().height,`y`,r),a=d(B),o=ae(B),s=o.getComputedStyle(B),c=parseFloat(s.marginTop),l=parseFloat(s.marginBottom),f=Rt(o.getComputedStyle(u.current)),p=Math.min(a.documentElement.clientHeight-c-l,f),m=e.scrollTop,h=zt(e),g=0,_=null,v=!1,y=!1,x=e=>{B.style.height=`${e}px`},S=(t,n)=>{let r=C(t,0,p-i);r>0&&x(i+r),e.scrollTop=n,p-(i+r)<=1&&(V.current=!0),b()},w=t?h-m:m,T=Math.min(i+w,p);if(g=T,w<=1){S(w,t?h:0);return}if(p-T>1?t?y=!0:_=0:(v=!0,n&&m<h&&(_=m-(w-(i+w-p)))),g=Math.ceil(g),g!==0&&x(g),y||_!=null){let t=zt(e),n=y?t:C(_,0,t);Math.abs(e.scrollTop-n)>1&&(e.scrollTop=n)}(v||g>=p-1)&&(V.current=!0),b()});X.useImperativeHandle(S,()=>W,[W]),Se({open:L,ref:u,onComplete(){L&&m?.(!0)}});let G={open:L,transitionStatus:z,side:E,align:D};x(()=>{!B||!u.current||Object.keys(H.current).length||(H.current={top:B.style.top||`0`,left:B.style.left||`0`,right:B.style.right,height:B.style.height,bottom:B.style.bottom,minHeight:B.style.minHeight,maxHeight:B.style.maxHeight,marginTop:B.style.marginTop,marginBottom:B.style.marginBottom})},[u,B]),x(()=>{L||O||(de.current=!1,V.current=!1,Mt(B,H.current))},[L,O,B,u]),x(()=>{let e=u.current;if(!L||!le||!B||!e||O&&!k||l.state.transitionStatus===`ending`)return;if(!O){de.current=!0,U.request(b),e.style.removeProperty(`--transform-origin`);return}let t=Wt(e);e.style.removeProperty(`--transform-origin`);try{let t=v.current;t?.isConnected||(t=!$.hasSelectedValue(l.state)&&_.current?.isConnected?_.current:null);let n=g.current,r=ae(B),i=r.getComputedStyle(B),a=r.getComputedStyle(e),o=d(le),s=Bt(le),c=Ht(le.getBoundingClientRect(),s),u=Ht(B.getBoundingClientRect(),s),f=c.height,m=ue||e,h=m.scrollHeight,y=parseFloat(a.borderBottomWidth),x=parseFloat(i.marginTop)||10,S=parseFloat(i.marginBottom)||10,E=parseFloat(i.minHeight)||100,D=Rt(a),O=o.documentElement.clientHeight-x-S,k=o.documentElement.clientWidth,te=O-c.bottom+f,A,j=M===`rtl`?c.right-u.width:c.left,N=0;if(t&&n){let e=Ht(n.getBoundingClientRect(),s);A=Ht(t.getBoundingClientRect(),s),j=u.left+(M===`rtl`?e.right-A.right:e.left-A.left);let r=e.top-c.top+e.height/2;N=A.top-u.top+A.height/2-r}let P=te+N+S+y,F=Math.min(O,P),I=O-x-S,ne=P-F,re=k-5;B.style.left=`${C(j,5,re-u.width)}px`,B.style.height=`${F}px`,B.style.maxHeight=`none`,B.style.marginTop=`${x}px`,B.style.marginBottom=`${S}px`,e.style.height=`100%`;let L=zt(m),ie=ne>=L-1;ie&&(F=Math.min(O,u.height)-(ne-L));let oe=c.top<20||c.bottom>O-20||Math.ceil(F)+1<Math.min(h,E),se=(r.visualViewport?.scale??1)!==1&&p;if(oe||se){de.current=!0,Mt(B,H.current),ee(!1);return}let ce=Math.max(E,F);if(ie){let e=Math.max(0,O-P);B.style.top=u.height>=I?`0`:`${e}px`,B.style.height=`${F}px`,m.scrollTop=zt(m)}else B.style.bottom=`0`,m.scrollTop=ne;if(A){let t=u.top,n=u.height,r=A.top+A.height/2,i=C(n>0?(r-t)/n*100:50,0,100);e.style.setProperty(`--transform-origin`,`50% ${i}%`)}(ce===O||F>=D)&&(V.current=!0),b(),T&&l.state.selectedIndex===null&&l.state.activeIndex===null&&w.current[0]!=null&&l.set(`activeIndex`,0),de.current=!0}finally{t()}},[l,L,B,le,g,_,v,u,b,O,ee,U,ue,w,T,M,k]),X.useEffect(()=>{if(!O||!B||!L)return;let e=ae(B);function t(e){h(!1,i(P,e))}return se(e,`resize`,t)},[h,O,B,L]);let K={...ue?{role:`presentation`,"aria-orientation":void 0}:{role:`listbox`,"aria-multiselectable":y||void 0,id:`${re}-list`},onKeyDown(e){te&&R.has(e.key)&&e.stopPropagation()},onScroll(e){ue||W(e.currentTarget)},...O&&{style:ue?{height:`100%`}:Nt}},me=j(`div`,e,{ref:[t,u],state:G,stateAttributesMapping:It,props:[ce,K,pe(z),{className:!ue&&O?I.className:void 0},c]});return(0,Q.jsxs)(X.Fragment,{children:[!ne&&I.getElement(F),(0,Q.jsx)(xe,{context:A,modal:!1,disabled:!oe,openInteractionType:ie,returnFocus:s,restoreFocus:!0,children:me})]})});function Rt(e){let t=e.maxHeight||``;return t.endsWith(`px`)&&parseFloat(t)||1/0}function zt(e){return F(e.scrollHeight,e.clientHeight)}function Bt(e){return ye.getScale(e)}function Vt(e,t,n){return e/n[t]}function Ht(e,t){return V({x:Vt(e.x,`x`,t),y:Vt(e.y,`y`,t),width:Vt(e.width,`x`,t),height:Vt(e.height,`y`,t)})}var Ut=[[`transform`,`none`],[`scale`,`1`],[`translate`,`0 0`]];function Wt(e){let{style:t}=e,n={};for(let[e,r]of Ut)n[e]=t.getPropertyValue(e),t.setProperty(e,r,`important`);return()=>{for(let[e]of Ut){let r=n[e];r?t.setProperty(e,r):t.removeProperty(e)}}}var Gt=X.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{store:o,scrollHandlerRef:s}=Z(),{alignItemWithTriggerActive:c}=jt(),l=J(o,$.hasScrollArrows),u=J(o,$.openMethod),d=J(o,$.multiple),p={id:`${J(o,$.id)}-list`,role:`listbox`,"aria-multiselectable":d||void 0,onScroll(e){s.current?.(e.currentTarget)},...c&&{style:Nt},className:l&&u!==`touch`?I.className:void 0};return j(`div`,e,{ref:[t,f(e=>{o.set(`listElement`,e)})],props:[p,a]})}),Kt=X.createContext(void 0);function qt(){let e=X.useContext(Kt);if(!e)throw Error(a(57));return e}var Jt=X.memo(X.forwardRef(function(e,t){let{render:n,className:r,style:a,value:o=null,label:s,disabled:c=!1,nativeButton:l=!1,...u}=e,d=X.useRef(null),f=ke({label:s,textRef:d,indexGuessBehavior:Fe.GuessFromOrder}),{store:p,itemProps:m,setOpen:h,setValue:_,selectionRef:v,typingRef:b,valuesRef:S,multiple:C,selectedItemTextRef:w,disabled:T,readOnly:E}=Z(),D=J(p,$.isActive,f.index),O=J(p,$.open),k=J(p,$.isSelected,o),ee=J(p,$.isSelectedByFocus,f.index),te=J(p,$.isItemEqualToValue),A=f.index,M=A!==-1,N=X.useRef(null);x(()=>{if(!M)return;let e=S.current;return e[A]=o,()=>{delete e[A]}},[M,A,o,S]),x(()=>{if(!M)return;let e=p.state.value,t=e;C&&Array.isArray(e)&&(t=e.length>0?e[e.length-1]:void 0),t!==void 0&&st(o,t,te)&&(p.set(`selectedIndex`,A),d.current&&(w.current=d.current))},[M,A,C,te,p,o,w]);let P=X.useRef(null),F=X.useRef(`mouse`),I=X.useRef(!1),{getButtonProps:ne,buttonRef:re}=y({disabled:c,focusableWhenDisabled:!0,native:l,composite:!0}),L={disabled:c,selected:k,highlighted:D};function ie(e){if(T||E)return;let t=p.state.value;if(C){let n=Array.isArray(t)?t:[];_(k?ut(n,o,te):[...n,o],i(g,e))}else _(o,i(g,e)),h(!1,i(g,e))}function ae(){v.current.dragY=0}let oe={role:`option`,"aria-selected":k,tabIndex:O&&D?0:-1,onKeyDown(e){P.current=e.key,p.set(`activeIndex`,A),e.key===` `&&b.current&&e.preventDefault()},onClick(e){let t=e.type===`click`&&F.current!==`touch`,n=e.nativeEvent.pointerType,r=t&&Me(e.nativeEvent)&&(n!==void 0||D),i=t&&!r&&!I.current;I.current=!1,!(e.type===`keydown`&&P.current===null)&&(c||e.type===`keydown`&&P.current===` `&&b.current||i||(P.current=null,ie(e.nativeEvent)))},onPointerEnter(e){F.current=e.pointerType},onPointerMove(e){if(e.pointerType===`mouse`&&e.buttons===1){let t=v.current;t.dragY+=e.movementY,t.dragY**2>=64&&(t.allowUnselectedMouseUp=!0)}},onPointerDown(e){F.current=e.pointerType,I.current=!0,ae()},onMouseUp(){if(ae(),c||F.current===`touch`||I.current)return;let e=!v.current.allowSelectedMouseUp&&k,t=!v.current.allowUnselectedMouseUp&&!k;e||t||(I.current=!0,N.current?.click(),I.current=!1)}},se=j(`div`,e,{ref:[re,t,f.ref,N],state:L,props:[m,oe,u,ne]}),ce=X.useMemo(()=>({selected:k,index:A,textRef:d,selectedByFocus:ee,hasRegistered:M}),[k,A,d,ee,M]);return(0,Q.jsx)(Kt.Provider,{value:ce,children:se})})),Yt=X.forwardRef(function(e,t){let n=e.keepMounted??!1,{selected:r}=qt();return n||r?(0,Q.jsx)(Xt,{...e,ref:t}):null}),Xt=X.memo(X.forwardRef((e,t)=>{let{render:n,className:r,style:i,keepMounted:a,...o}=e,{selected:s}=qt(),c=X.useRef(null),{transitionStatus:l,setMounted:u}=De(s),d=j(`span`,e,{ref:[t,c],state:{selected:s,transitionStatus:l},props:[{"aria-hidden":!0,children:`✔️`},o],stateAttributesMapping:we});return Se({open:s,ref:c,onComplete(){s||u(!1)}}),d})),Zt=X.memo(X.forwardRef(function(e,t){let{index:n,textRef:r,selectedByFocus:i,hasRegistered:a}=qt(),{firstItemTextRef:o,selectedItemTextRef:s}=Z(),{render:c,className:l,style:u,...d}=e;return j(`div`,e,{ref:[X.useCallback(e=>{e&&(a&&n===0&&(o.current=e),a&&i&&(s.current=e))},[o,s,n,i,a]),t,r],props:d})})),Qt=X.forwardRef(function(e,t){let{render:n,className:r,style:i,direction:a,keepMounted:o=!1,...s}=e,c=a===`up`,{store:l,popupRef:u,listRef:d,handleScrollArrowVisibility:f,scrollArrowsMountedCountRef:p}=Z(),{side:m,scrollDownArrowRef:h,scrollUpArrowRef:g}=jt(),_=J(l,c?$.scrollUpArrowVisible:$.scrollDownArrowVisible),y=J(l,$.openMethod),b=_&&y!==`touch`,S=v(),C=c?g:h,{mounted:w,transitionStatus:T,setMounted:E}=De(b);x(()=>(p.current+=1,l.state.hasScrollArrows||l.set(`hasScrollArrows`,!0),()=>{p.current=Math.max(0,p.current-1),p.current===0&&l.state.hasScrollArrows&&l.set(`hasScrollArrows`,!1)}),[l,p]),Se({open:b,ref:C,onComplete(){b||E(!1)}});let D=j(`div`,e,{ref:[t,C],state:{direction:a,visible:b,side:m,transitionStatus:T},props:[{"aria-hidden":!0,children:c?`▲`:`▼`,style:{position:`absolute`},onMouseMove(e){if(e.movementX===0&&e.movementY===0||S.isStarted())return;l.set(`activeIndex`,null);function t(){let e=l.state.listElement??u.current;if(!e)return;l.set(`activeIndex`,null),f();let n=F(e.scrollHeight,e.clientHeight),r=A(e.scrollTop,n),i=r===(c?0:n),a=d.current;if(r!==e.scrollTop&&(e.scrollTop=r),a.length===0&&l.set(c?`scrollUpArrowVisible`:`scrollDownArrowVisible`,!i),i){S.clear();return}if(a.length>0){let t=C.current?.offsetHeight||0;e.scrollTop=$t(a,c,r,e.clientHeight,t,n)}S.start(40,t)}S.start(40,t)},onMouseLeave(){S.clear()}},s],stateAttributesMapping:we});return w||o?D:null});function $t(e,t,n,r,i,a){if(t){let t=0,r=n+i-1;for(let n=0;n<e.length;n+=1){let i=e[n];if(i&&i.offsetTop>=r){t=n;break}}let o=Math.max(0,t-1),s=e[o];return o<t&&s?A(s.offsetTop-i,a):0}let o=e.length-1,s=n+r-i+1;for(let t=0;t<e.length;t+=1){let n=e[t];if(n&&n.offsetTop+n.offsetHeight>s){o=Math.max(0,t-1);break}}let c=Math.min(e.length-1,o+1),l=e[c];return c>o&&l?A(l.offsetTop+l.offsetHeight-r+i,a):a}var en=X.forwardRef(function(e,t){return(0,Q.jsx)(Qt,{...e,ref:t,direction:`down`})}),tn=X.forwardRef(function(e,t){return(0,Q.jsx)(Qt,{...e,ref:t,direction:`up`})}),nn=yt;function rn({className:e,...t}){return(0,Q.jsx)(Et,{"data-slot":`select-value`,className:s(`flex flex-1 text-left`,e),...t})}function an({className:e,size:t=`default`,children:n,...r}){return(0,Q.jsxs)(wt,{"data-slot":`select-trigger`,"data-size":t,className:s(`flex w-fit cursor-pointer items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...r,children:[n,(0,Q.jsx)(Dt,{render:(0,Q.jsx)(Je,{className:`pointer-events-none size-4 text-muted-foreground`})})]})}function on({className:e,children:t,side:n=`bottom`,sideOffset:r=4,align:i=`center`,alignOffset:a=0,alignItemWithTrigger:o=!0,...c}){return(0,Q.jsx)(kt,{children:(0,Q.jsx)(Ft,{side:n,sideOffset:r,align:i,alignOffset:a,alignItemWithTrigger:o,className:`isolate z-50`,children:(0,Q.jsxs)(Lt,{"data-slot":`select-content`,"data-align-trigger":o,className:s(`relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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-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`,e),...c,children:[(0,Q.jsx)(cn,{}),(0,Q.jsx)(Gt,{children:t}),(0,Q.jsx)(ln,{})]})})})}function sn({className:e,children:t,...n}){return(0,Q.jsxs)(Jt,{"data-slot":`select-item`,className:s(`relative flex w-full cursor-pointer items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:cursor-not-allowed 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`,e),...n,children:[(0,Q.jsx)(Zt,{className:`flex flex-1 shrink-0 gap-2 whitespace-nowrap`,children:t}),(0,Q.jsx)(Yt,{render:(0,Q.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex size-4 items-center justify-center`}),children:(0,Q.jsx)(ge,{className:`pointer-events-none`})})]})}function cn({className:e,...t}){return(0,Q.jsx)(tn,{"data-slot":`select-scroll-up-button`,className:s(`top-0 z-10 flex w-full cursor-pointer items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4`,e),...t,children:(0,Q.jsx)(Ye,{})})}function ln({className:e,...t}){return(0,Q.jsx)(en,{"data-slot":`select-scroll-down-button`,className:s(`bottom-0 z-10 flex w-full cursor-pointer items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4`,e),...t,children:(0,Q.jsx)(Je,{})})}function un(e){return K(e,X.useContext(de)?`drawer`:`dialog`)}function dn({...e}){return(0,Q.jsx)(un,{"data-slot":`dialog`,...e})}function fn({...e}){return(0,Q.jsx)(tt,{"data-slot":`dialog-trigger`,...e})}function pn({...e}){return(0,Q.jsx)(B,{"data-slot":`dialog-portal`,...e})}function mn({className:e,...t}){return(0,Q.jsx)(W,{"data-slot":`dialog-overlay`,className:s(`fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,e),...t})}function hn({className:e,children:t,showCloseButton:n=!0,...r}){return(0,Q.jsxs)(pn,{children:[(0,Q.jsx)(mn,{}),(0,Q.jsxs)(Ne,{"data-slot":`dialog-content`,className:s(`fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-background p-4 text-sm ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm 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`,e),...r,children:[t,n&&(0,Q.jsxs)(U,{"data-slot":`dialog-close`,render:(0,Q.jsx)(oe,{variant:`ghost`,className:`absolute top-2 right-2`,size:`icon-sm`}),children:[(0,Q.jsx)(et,{}),(0,Q.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function gn({className:e,...t}){return(0,Q.jsx)(`div`,{"data-slot":`dialog-header`,className:s(`flex flex-col gap-2`,e),...t})}function _n({className:e,showCloseButton:t=!1,children:n,...r}){return(0,Q.jsxs)(`div`,{"data-slot":`dialog-footer`,className:s(`-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end`,e),...r,children:[n,t&&(0,Q.jsx)(U,{render:(0,Q.jsx)(oe,{variant:`outline`}),children:`Close`})]})}function vn({className:e,...t}){return(0,Q.jsx)(ue,{"data-slot":`dialog-title`,className:s(`text-base leading-none font-medium`,e),...t})}function yn({className:e,...t}){return(0,Q.jsx)(je,{"data-slot":`dialog-description`,className:s(`text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground`,e),...t})}function bn({className:e,...t}){return(0,Q.jsx)(`textarea`,{"data-slot":`textarea`,className:s(`flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...t})}function xn({className:e,...t}){return(0,Q.jsx)(`div`,{"data-slot":`input-group`,role:`group`,className:s(`group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5`,e),...t})}var Sn=w(`flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4`,{variants:{align:{"inline-start":`order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]`,"inline-end":`order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]`,"block-start":`order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2`,"block-end":`order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2`}},defaultVariants:{align:`inline-start`}});function Cn({className:e,align:t=`inline-start`,...n}){return(0,Q.jsx)(`div`,{role:`group`,"data-slot":`input-group-addon`,"data-align":t,className:s(Sn({align:t}),e),onClick:e=>{e.target.closest(`button`)||e.currentTarget.parentElement?.querySelector(`input`)?.focus()},...n})}var wn=w(`flex items-center gap-2 text-sm shadow-none`,{variants:{size:{xs:`h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5`,sm:``,"icon-xs":`size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0`,"icon-sm":`size-8 p-0 has-[>svg]:p-0`}},defaultVariants:{size:`xs`}});function Tn({className:e,type:t=`button`,variant:n=`ghost`,size:r=`xs`,...i}){return(0,Q.jsx)(oe,{type:t,"data-size":r,variant:n,className:s(wn({size:r}),e),...i})}function En({className:e,...t}){return(0,Q.jsx)(T,{"data-slot":`input-group-control`,className:s(`flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent`,e),...t})}function Dn({className:e,...t}){return(0,Q.jsx)(bn,{"data-slot":`input-group-control`,className:s(`flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent`,e),...t})}function On({className:e,...t}){return(0,Q.jsx)(`label`,{"data-slot":`label`,className:s(`flex items-center gap-2 text-base leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,e),...t})}export{ct as A,ft as C,ot as D,st as E,Xe as F,Je as I,$e as M,Qe as N,lt as O,Ze as P,pt as S,ht as T,sn as _,En as a,bt as b,dn as c,_n as d,gn as f,on as g,nn as h,Tn as i,et as j,ut as k,hn as l,fn as m,xn as n,Dn as o,vn as p,Cn as r,bn as s,On as t,yn as u,an as v,mt as w,vt as x,rn as y};
|