@tickernelz/paperclip-pro-ui 2026.1023.0 → 2026.1024.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/AgentAvatar-CXBfQ6pz.js +1 -0
- package/dist/assets/Agents.production-B5XXJ2wN.js +2 -0
- package/dist/assets/BreadcrumbContext-CmzhWkn9.js +1 -0
- package/dist/assets/CompanyActivity.production-1GZhq-K5.js +1 -0
- package/dist/assets/{CompanyExport-iwRD6Ak0.js → CompanyExport-CNu_xL_7.js} +3 -3
- package/dist/assets/{CompanySkills.production-BNQwI1_u.js → CompanySkills.production-YrmJa9Vy.js} +2 -2
- package/dist/assets/EmptyState-B6HqDhhl.js +1 -0
- package/dist/assets/{MarkdownBody-Cweo3KGi.js → MarkdownBody-DXX_MrOZ.js} +5 -5
- package/dist/assets/{MarkdownEditor-B6u1nGzv.js → MarkdownEditor-C0MQKETk.js} +16 -16
- package/dist/assets/OrgChart.production-3TDu-rpn.js +1 -0
- package/dist/assets/{PageSkeleton-Bxzx6LdM.js → PageSkeleton-CzsquFSq.js} +1 -1
- package/dist/assets/RoutineDetail.production-Dbg7SxCr.js +1 -0
- package/dist/assets/{RoutineRunVariablesDialog-BTO1cGhY.js → RoutineRunVariablesDialog-R9R_pIYM.js} +2 -2
- package/dist/assets/Routines.production-wYPaLAXL.js +1 -0
- package/dist/assets/StatusIcon-D50dDCBL.js +1 -0
- package/dist/assets/Terminal-ByJxc__B.js +1 -0
- package/dist/assets/ToastContext-Dj6kHjBt.js +1 -0
- package/dist/assets/access-BP0uIEvm.js +1 -0
- package/dist/assets/agent-avatar-url-CKjwadh7.js +1 -0
- package/dist/assets/agents-BnTeL72d.js +15 -0
- package/dist/assets/{alert-dialog-CqvHCY2y.js → alert-dialog-BVgYDfs5.js} +1 -1
- package/dist/assets/arrow-right-yI8KLv06.js +1 -0
- package/dist/assets/arrow-up-DoquRvt-.js +1 -0
- package/dist/assets/{badge-6KBG4DJ9.js → badge-CZKC9uUT.js} +1 -1
- package/dist/assets/bot-DqtgSgxB.js +1 -0
- package/dist/assets/{card-Bz65aUPI.js → card-CLrZE3zB.js} +1 -1
- package/dist/assets/{check-C7890FPo.js → check-B8hWCPEY.js} +1 -1
- package/dist/assets/checkbox-9ullTWTl.js +1 -0
- package/dist/assets/chevron-down-CdGqWSzz.js +1 -0
- package/dist/assets/clipboard-D6M0E1wp.js +1 -0
- package/dist/assets/company-members-Duugb3uG.js +1 -0
- package/dist/assets/createLucideIcon-DwVwDVEQ.js +134 -0
- package/dist/assets/{definition-BHM7rMPG.js → definition-cSCCeU7R.js} +1 -1
- package/dist/assets/dist-94psnYQg.js +1 -0
- package/dist/assets/dist-BLg9eYEC.js +1 -0
- package/dist/assets/dist-DGt1Bt7m.js +1 -0
- package/dist/assets/dist-OejlA9DH.js +1 -0
- package/dist/assets/dropdown-menu-ByiK1BlD.js +1 -0
- package/dist/assets/environments-BQaMNey_.js +1 -0
- package/dist/assets/{external-link-DggAY2Qs.js → external-link-0PKOUbZP.js} +1 -1
- package/dist/assets/{file-text-BWHzh5pq.js → file-text-Daxr7tUE.js} +1 -1
- package/dist/assets/{health-I-sCu61_.js → health-Dm97GTVw.js} +1 -1
- package/dist/assets/{heartbeats-DTwjV2kl.js → heartbeats-CZVMH9s8.js} +1 -1
- package/dist/assets/{index-jaWIjVIN.css → index-BJUeQIKY.css} +1 -1
- package/dist/assets/{index-D4-wU1bZ.js → index-Bzln5Ksp.js} +346 -199
- package/dist/assets/{input-ConoHcjz.js → input-rJVxQSgj.js} +1 -1
- package/dist/assets/instanceSettings-DuE48Bn5.js +1 -0
- package/dist/assets/label-CvkHqiK_.js +5 -0
- package/dist/assets/{mention-chips--Lp_ENqh.js → mention-chips-BkED6NiN.js} +9 -9
- package/dist/assets/{rotate-ccw-BUHfDFfI.js → rotate-ccw-sgBZvjSw.js} +1 -1
- package/dist/assets/save-V2f8XCvd.js +1 -0
- package/dist/assets/{select-C35A5IGs.js → select-XFvlcP6w.js} +1 -1
- package/dist/assets/sheet-BNPM7z3e.js +1 -0
- package/dist/assets/{skeleton-5VMhNzFs.js → skeleton-BmxbZVmQ.js} +1 -1
- package/dist/assets/{tabs-BNIJaxKM.js → tabs-BC_ScIgQ.js} +1 -1
- package/dist/assets/use-adapter-capabilities-FfDsq8WI.js +1 -0
- package/dist/assets/useHiddenSettings-Dobu8_xG.js +1 -0
- package/dist/assets/usePrefersReducedMotion-CkujTZ1k.js +1 -0
- package/dist/assets/x-XhYFJqIj.js +1 -0
- package/dist/index.html +50 -40
- package/dist/sw.js +1 -1
- package/package.json +1 -1
- package/dist/assets/AgentAvatar-CpQ88dwV.js +0 -1
- package/dist/assets/Agents.production-BbnOCG3N.js +0 -2
- package/dist/assets/BreadcrumbContext-c2KosyR8.js +0 -15
- package/dist/assets/CompanyActivity.production-tn4aIPJ7.js +0 -1
- package/dist/assets/EmptyState-DN8b4Qse.js +0 -1
- package/dist/assets/OrgChart.production-BJK4TNBI.js +0 -1
- package/dist/assets/RoutineDetail.production-DqgQQico.js +0 -1
- package/dist/assets/Routines.production-DQ5PjoiB.js +0 -1
- package/dist/assets/StatusIcon-BE5kFgZJ.js +0 -1
- package/dist/assets/ToastContext-FzmhiqZ4.js +0 -1
- package/dist/assets/agent-avatar-url-B_lUFC64.js +0 -134
- package/dist/assets/arrow-right-D3mUepq9.js +0 -1
- package/dist/assets/bot-Da_kJHpD.js +0 -1
- package/dist/assets/checkbox-Ds_3QqBB.js +0 -1
- package/dist/assets/clipboard-C4aDsmO8.js +0 -1
- package/dist/assets/company-members-BznLwAUd.js +0 -1
- package/dist/assets/dist-BXR8yTPD.js +0 -1
- package/dist/assets/dist-C4Rm-j8X.js +0 -1
- package/dist/assets/dist-CXUn2R-_.js +0 -1
- package/dist/assets/environments-B_qPdIBY.js +0 -1
- package/dist/assets/label-xpLcJrPL.js +0 -5
- package/dist/assets/sheet-TOBEGi0m.js +0 -1
- package/dist/assets/use-adapter-capabilities-KPGiuHeG.js +0 -1
- package/dist/assets/use-copy-action-DnjVh8kP.js +0 -1
- package/dist/assets/useHiddenSettings-CeQYvKer.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as r}from"./agent-avatar-url-B_lUFC64.js";var a={name:"arrow-right",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]};a.node;var o=r(a);export{o as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as t}from"./agent-avatar-url-B_lUFC64.js";var e={name:"bot",size:24,node:[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]};e.node;var r=t(e);export{r as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var un=Object.defineProperty;var c=(n,e)=>un(n,"name",{value:e,configurable:!0});import{i as ye}from"./rolldown-runtime-ZpX3ckPj.js";import{A as M,C as dn,D as Q,E as re,F as ln,G as _,Ha as fn,L as N,M as L,N as pn,O as me,S as mn,T as ge,Wa as gn,_ as hn,b as xn,d as vn,g as bn,h as Pe,j as he,m as je,n as ae,p as Mn,v as Cn,x as wn}from"./agent-avatar-url-B_lUFC64.js";import{At as _n,i as Dn}from"./BreadcrumbContext-c2KosyR8.js";import{Z as In}from"./mention-chips--Lp_ENqh.js";import{a as kn,i as Sn,n as Rn,r as Ee,t as yn}from"./dist-CXUn2R-_.js";import{c as xe,d as Pn,f as jn,l as En,m as Tn,p as On,s as Nn,u as Ln}from"./dist-BXR8yTPD.js";import{t as Te}from"./check-C7890FPo.js";import{s as An}from"./clipboard-C4aDsmO8.js";var i=ye(gn(),1),o=ye(fn(),1),Fn=Object.defineProperty,O=c((n,e)=>Fn(n,"name",{value:e,configurable:!0}),"__name$2"),ve="Checkbox",[zn,Po]=he(ve),[Gn,be]=zn(ve);function Oe(n){const{__scopeCheckbox:e,checked:r,children:t,defaultChecked:a,disabled:s,form:u,name:d,onCheckedChange:f,required:p,value:x="on",internal_do_not_use_render:g}=n,[l,m]=me({prop:r,defaultProp:a??!1,onChange:f,caller:ve}),[b,C]=i.useState(null),[k,j]=i.useState(null),S=i.useRef(!1),[w,R]=i.useReducer(y=>y+1,0),F=b?!!u||!!b.closest("form"):!0,$={checked:l,disabled:s,setChecked:m,control:b,setControl:C,name:d,form:u,value:x,hasConsumerStoppedPropagationRef:S,userInteractionCount:w,onUserInteraction:R,required:p,defaultChecked:T(a)?!1:a,isFormControl:F,bubbleInput:k,setBubbleInput:j};return(0,o.jsx)(Gn,{scope:e,...$,children:Ne(g)?g($):t})}c(Oe,"CheckboxProvider");O(Oe,"CheckboxProvider");var Kn="CheckboxTrigger",$n=i.forwardRef(O(c(function({__scopeCheckbox:e,onKeyDown:r,onClick:t,...a},s){const{control:u,value:d,disabled:f,checked:p,required:x,setControl:g,setChecked:l,hasConsumerStoppedPropagationRef:m,onUserInteraction:b,isFormControl:C,bubbleInput:k}=be(Kn,e),j=N(s,g),S=i.useRef(p);return i.useEffect(()=>{const w=u?.form;if(w){const R=O(()=>l(S.current),"reset");return w.addEventListener("reset",R),()=>w.removeEventListener("reset",R)}},[u,l]),(0,o.jsx)(L.button,{type:"button",role:"checkbox","aria-checked":T(p)?"mixed":p,"aria-required":x,"data-state":Me(p),"data-disabled":f?"":void 0,disabled:f,value:d,...a,ref:j,onKeyDown:M(r,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:M(t,w=>{b(),l(R=>T(R)?!0:!R),k&&C&&(m.current=w.isPropagationStopped(),m.current||w.stopPropagation())})})},"CheckboxTrigger2"),"CheckboxTrigger")),Bn=i.forwardRef(O(c(function(e,r){const{__scopeCheckbox:t,name:a,checked:s,defaultChecked:u,required:d,disabled:f,value:p,onCheckedChange:x,form:g,...l}=e;return(0,o.jsx)(Oe,{__scopeCheckbox:t,checked:s,defaultChecked:u,disabled:f,required:d,onCheckedChange:x,name:a,form:g,value:p,internal_do_not_use_render:c(({isFormControl:m})=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)($n,{...l,ref:r,__scopeCheckbox:t}),m&&(0,o.jsx)(Hn,{__scopeCheckbox:t})]}),"internal_do_not_use_render")})},"Checkbox2"),"Checkbox")),Un="CheckboxIndicator",Vn=i.forwardRef(O(c(function(e,r){const{__scopeCheckbox:t,forceMount:a,...s}=e,u=be(Un,t);return(0,o.jsx)(Q,{present:a||T(u.checked)||u.checked===!0,children:(0,o.jsx)(L.span,{"data-state":Me(u.checked),"data-disabled":u.disabled?"":void 0,...s,ref:r,style:{pointerEvents:"none",...e.style}})})},"CheckboxIndicator2"),"CheckboxIndicator")),Xn="CheckboxBubbleInput",Hn=i.forwardRef(O(c(function({__scopeCheckbox:e,onClick:r,...t},a){const{control:s,hasConsumerStoppedPropagationRef:u,userInteractionCount:d,checked:f,defaultChecked:p,required:x,disabled:g,name:l,value:m,form:b,bubbleInput:C,setBubbleInput:k}=be(Xn,e),j=N(a,k),S=bn(s),w=i.useRef(!1),R=i.useRef(f),F=i.useRef(d);i.useEffect(()=>{const y=C;if(!y)return;const B=window.HTMLInputElement.prototype,ne=Object.getOwnPropertyDescriptor(B,"checked").set,z=d!==F.current;F.current=d;const U=R.current!==f;R.current=f;const ue=!(z&&u.current);if(U&&ne){w.current=!z;const q=new Event("click",{bubbles:ue});y.indeterminate=T(f),ne.call(y,T(f)?!1:f),y.dispatchEvent(q),w.current=!1}},[C,f,u,d]);const $=i.useRef(T(f)?!1:f);return(0,o.jsx)(L.input,{type:"checkbox","aria-hidden":!0,defaultChecked:p??$.current,required:x,disabled:g,name:l,value:m,form:b,...t,tabIndex:-1,ref:j,onClick:M(r,y=>{w.current&&y.stopPropagation()}),style:{...t.style,...S,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})},"CheckboxBubbleInput2"),"CheckboxBubbleInput"));function Ne(n){return typeof n=="function"}c(Ne,"isFunction");O(Ne,"isFunction");function T(n){return n==="indeterminate"}c(T,"isIndeterminate$1");O(T,"isIndeterminate");function Me(n){return T(n)?"indeterminate":n?"checked":"unchecked"}c(Me,"getState");O(Me,"getState");var Yn=Object.defineProperty,v=c((n,e)=>Yn(n,"name",{value:e,configurable:!0}),"__name$1"),fe=["Enter"," "],qn=["ArrowDown","PageUp","Home"],Le=["ArrowUp","PageDown","End"],Wn=[...qn,...Le],Zn={ltr:[...fe,"ArrowRight"],rtl:[...fe,"ArrowLeft"]},Jn={ltr:["ArrowLeft"],rtl:["ArrowRight"]},se="Menu",[Z,Qn,et]=kn(se),[K,Ae]=he(se,[et,Pe,Ee]),ce=Pe(),Fe=Ee(),[ze,A]=K(se),[nt,ee]=K(se),tt=v(n=>{const{__scopeMenu:e,open:r=!1,children:t,dir:a,onOpenChange:s,modal:u=!0}=n,d=ce(e),[f,p]=i.useState(null),x=i.useRef(!1),g=ge(s),l=Sn(a);return i.useEffect(()=>{const m=v(()=>{x.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},"handleKeyDown"),b=v(()=>x.current=!1,"handlePointer");return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),i.useEffect(()=>{if(!r)return;const m=v(()=>g(!1),"handleBlur");return window.addEventListener("blur",m),()=>window.removeEventListener("blur",m)},[r,g]),(0,o.jsx)(je,{...d,children:(0,o.jsx)(ze,{scope:e,open:r,onOpenChange:g,content:f,onContentChange:p,children:(0,o.jsx)(nt,{scope:e,onClose:i.useCallback(()=>g(!1),[g]),isUsingKeyboardRef:x,dir:l,modal:u,children:t})})})},"Menu"),Ge=i.forwardRef(v(c(function(e,r){const{__scopeMenu:t,...a}=e,s=ce(t);return(0,o.jsx)(vn,{...s,...a,ref:r})},"MenuAnchor2"),"MenuAnchor")),Ke="MenuPortal",[ot,$e]=K(Ke,{forceMount:void 0}),rt=v(n=>{const{__scopeMenu:e,forceMount:r,children:t,container:a}=n,s=A(Ke,e);return(0,o.jsx)(ot,{scope:e,forceMount:r,children:(0,o.jsx)(Q,{present:r||s.open,children:(0,o.jsx)(wn,{asChild:!0,container:a,children:t})})})},"MenuPortal"),P="MenuContent",[at,Ce]=K(P),st=i.forwardRef(v(c(function(e,r){const t=$e(P,e.__scopeMenu),{forceMount:a=t.forceMount,...s}=e,u=A(P,e.__scopeMenu),d=ee(P,e.__scopeMenu);return(0,o.jsx)(Z.Provider,{scope:e.__scopeMenu,children:(0,o.jsx)(Q,{present:a||u.open,children:(0,o.jsx)(Z.Slot,{scope:e.__scopeMenu,children:d.modal?(0,o.jsx)(ct,{...s,ref:r}):(0,o.jsx)(it,{...s,ref:r})})})})},"MenuContent2"),"MenuContent")),ct=i.forwardRef(v(c(function(e,r){const t=A(P,e.__scopeMenu),a=i.useRef(null),s=N(r,a);return i.useEffect(()=>{const u=a.current;if(u)return hn(u)},[]),(0,o.jsx)(we,{...e,ref:s,trapFocus:t.open,disableOutsidePointerEvents:t.open,disableOutsideScroll:!0,onFocusOutside:M(e.onFocusOutside,u=>u.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:c(()=>t.onOpenChange(!1),"onDismiss")})},"MenuRootContentModal2"),"MenuRootContentModal")),it=i.forwardRef(v(c(function(e,r){const t=A(P,e.__scopeMenu);return(0,o.jsx)(we,{...e,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:c(()=>t.onOpenChange(!1),"onDismiss")})},"MenuRootContentNonModal2"),"MenuRootContentNonModal")),ut=ln("MenuContent.ScrollLock"),we=i.forwardRef(v(c(function(e,r){const{__scopeMenu:t,loop:a=!1,trapFocus:s,onOpenAutoFocus:u,onCloseAutoFocus:d,disableOutsidePointerEvents:f,onEntryFocus:p,onEscapeKeyDown:x,onPointerDownOutside:g,onFocusOutside:l,onInteractOutside:m,onDismiss:b,disableOutsideScroll:C,...k}=e,j=A(P,t),S=ee(P,t),w=ce(t),R=Fe(t),F=Qn(t),[$,y]=i.useState(null),B=i.useRef(null),ne=N(r,B,j.onContentChange),z=i.useRef(0),U=i.useRef(""),ue=i.useRef(0),q=i.useRef(null),ke=i.useRef("right"),de=i.useRef(0),an=C?Cn:i.Fragment,sn=C?{as:ut,allowPinchZoom:!0}:void 0,cn=v(h=>{const X=U.current+h,G=F().filter(E=>!E.disabled),W=document.activeElement,le=G.find(E=>E.ref.current===W)?.textValue,te=We(G.map(E=>E.textValue),X,le),H=G.find(E=>E.textValue===te)?.ref.current;v(c((function E(Se){U.current=Se,window.clearTimeout(z.current),Se!==""&&(z.current=window.setTimeout(()=>E(""),1e3))}),"updateSearch"),"updateSearch")(X),H&&setTimeout(()=>H.focus())},"handleTypeaheadSearch");i.useEffect(()=>()=>window.clearTimeout(z.current),[]),xn();const V=i.useCallback(h=>ke.current===q.current?.side&&Je(h,q.current?.area),[]);return(0,o.jsx)(at,{scope:t,searchRef:U,onItemEnter:i.useCallback(h=>{V(h)&&h.preventDefault()},[V]),onItemLeave:i.useCallback(h=>{V(h)||(B.current?.focus(),y(null))},[V]),onTriggerLeave:i.useCallback(h=>{V(h)&&h.preventDefault()},[V]),pointerGraceTimerRef:ue,onPointerGraceIntentChange:i.useCallback(h=>{q.current=h},[]),children:(0,o.jsx)(an,{...sn,children:(0,o.jsx)(mn,{asChild:!0,trapped:s,onMountAutoFocus:M(u,h=>{h.preventDefault(),B.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:d,children:(0,o.jsx)(dn,{asChild:!0,disableOutsidePointerEvents:f,onEscapeKeyDown:x,onPointerDownOutside:g,onFocusOutside:l,onInteractOutside:m,onDismiss:b,children:(0,o.jsx)(Rn,{asChild:!0,...R,dir:S.dir,orientation:"vertical",loop:a,currentTabStopId:$,onCurrentTabStopIdChange:y,onEntryFocus:M(p,h=>{S.isUsingKeyboardRef.current||h.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,o.jsx)(Mn,{role:"menu","aria-orientation":"vertical","data-state":De(j.open),"data-radix-menu-content":"",dir:S.dir,...w,...k,ref:ne,style:{outline:"none",...k.style},onKeyDown:M(k.onKeyDown,h=>{const X=h.target.closest("[data-radix-menu-content]")===h.currentTarget,G=h.ctrlKey||h.altKey||h.metaKey,W=h.key.length===1;X&&(h.key==="Tab"&&h.preventDefault(),!G&&W&&cn(h.key));const le=B.current;if(h.target!==le||!Wn.includes(h.key))return;h.preventDefault();const te=F().filter(H=>!H.disabled).map(H=>H.ref.current);Le.includes(h.key)&&te.reverse(),Ye(te)}),onBlur:M(e.onBlur,h=>{h.currentTarget.contains(h.target)||(window.clearTimeout(z.current),U.current="")}),onPointerMove:M(e.onPointerMove,Y(h=>{const X=h.target,G=de.current!==h.clientX;if(h.currentTarget.contains(X)&&G){const W=h.clientX>de.current?"right":"left";ke.current=W,de.current=h.clientX}}))})})})})})})},"MenuContentImpl2"),"MenuContentImpl")),dt=i.forwardRef(v(c(function(e,r){const{__scopeMenu:t,...a}=e;return(0,o.jsx)(L.div,{role:"group",...a,ref:r})},"MenuGroup2"),"MenuGroup")),lt=i.forwardRef(v(c(function(e,r){const{__scopeMenu:t,...a}=e;return(0,o.jsx)(L.div,{...a,ref:r})},"MenuLabel2"),"MenuLabel")),pe="MenuItem",Re="menu.itemSelect",_e=i.forwardRef(v(c(function(e,r){const{disabled:t=!1,onSelect:a,...s}=e,u=i.useRef(null),d=ee(pe,e.__scopeMenu),f=Ce(pe,e.__scopeMenu),p=N(r,u),x=i.useRef(!1),g=v(()=>{const l=u.current;if(!t&&l){const m=new CustomEvent(Re,{bubbles:!0,cancelable:!0});l.addEventListener(Re,b=>a?.(b),{once:!0}),pn(l,m),m.defaultPrevented?x.current=!1:d.onClose()}},"handleSelect");return(0,o.jsx)(Be,{...s,ref:p,disabled:t,onClick:M(e.onClick,g),onPointerDown:c(l=>{e.onPointerDown?.(l),x.current=!0},"onPointerDown"),onPointerUp:M(e.onPointerUp,l=>{x.current||l.currentTarget?.click()}),onKeyDown:M(e.onKeyDown,l=>{t||l.target!==l.currentTarget||f.searchRef.current!==""&&l.key===" "||fe.includes(l.key)&&(l.currentTarget.click(),l.preventDefault())})})},"MenuItem2"),"MenuItem")),Be=i.forwardRef(v(c(function(e,r){const{__scopeMenu:t,disabled:a=!1,textValue:s,...u}=e,d=Ce(pe,t),f=Fe(t),p=i.useRef(null),x=N(r,p),[g,l]=i.useState(!1),[m,b]=i.useState("");return i.useEffect(()=>{const C=p.current;C&&b((C.textContent??"").trim())},[u.children]),(0,o.jsx)(Z.ItemSlot,{scope:t,disabled:a,textValue:s??m,children:(0,o.jsx)(yn,{asChild:!0,...f,focusable:!a,children:(0,o.jsx)(L.div,{role:"menuitem","data-highlighted":g?"":void 0,"aria-disabled":a||void 0,"data-disabled":a?"":void 0,...u,ref:x,onPointerMove:M(e.onPointerMove,Y(C=>{a?d.onItemLeave(C):(d.onItemEnter(C),C.defaultPrevented||C.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:M(e.onPointerLeave,Y(C=>d.onItemLeave(C))),onFocus:M(e.onFocus,()=>l(!0)),onBlur:M(e.onBlur,()=>l(!1))})})})},"MenuItemImpl2"),"MenuItemImpl")),ft=i.forwardRef(v(c(function(e,r){const{checked:t=!1,onCheckedChange:a,...s}=e;return(0,o.jsx)(Ve,{scope:e.__scopeMenu,checked:t,children:(0,o.jsx)(_e,{role:"menuitemcheckbox","aria-checked":J(t)?"mixed":t,...s,ref:r,"data-state":ie(t),onSelect:M(s.onSelect,()=>a?.(J(t)?!0:!t),{checkForDefaultPrevented:!1})})})},"MenuCheckboxItem2"),"MenuCheckboxItem")),[pt,mt]=K("MenuRadioGroup",{value:void 0,onValueChange:v(()=>{},"onValueChange")}),gt=i.forwardRef(v(c(function(e,r){const{value:t,onValueChange:a,...s}=e,u=ge(a);return(0,o.jsx)(pt,{scope:e.__scopeMenu,value:t,onValueChange:u,children:(0,o.jsx)(dt,{...s,ref:r})})},"MenuRadioGroup2"),"MenuRadioGroup")),ht="MenuRadioItem",xt=i.forwardRef(v(c(function(e,r){const{value:t,...a}=e,s=mt(ht,e.__scopeMenu),u=t===s.value;return(0,o.jsx)(Ve,{scope:e.__scopeMenu,checked:u,children:(0,o.jsx)(_e,{role:"menuitemradio","aria-checked":u,...a,ref:r,"data-state":ie(u),onSelect:M(a.onSelect,()=>s.onValueChange?.(t),{checkForDefaultPrevented:!1})})})},"MenuRadioItem2"),"MenuRadioItem")),Ue="MenuItemIndicator",[Ve,vt]=K(Ue,{checked:!1}),bt=i.forwardRef(v(c(function(e,r){const{__scopeMenu:t,forceMount:a,...s}=e,u=vt(Ue,t);return(0,o.jsx)(Q,{present:a||J(u.checked)||u.checked===!0,children:(0,o.jsx)(L.span,{...s,ref:r,"data-state":ie(u.checked)})})},"MenuItemIndicator2"),"MenuItemIndicator")),Mt=i.forwardRef(v(c(function(e,r){const{__scopeMenu:t,...a}=e;return(0,o.jsx)(L.div,{role:"separator","aria-orientation":"horizontal",...a,ref:r})},"MenuSeparator2"),"MenuSeparator")),Xe="MenuSub",[Ct,He]=K(Xe),wt=v(n=>{const{__scopeMenu:e,children:r,open:t=!1,onOpenChange:a}=n,s=A(Xe,e),u=ce(e),[d,f]=i.useState(null),[p,x]=i.useState(null),g=ge(a);return i.useEffect(()=>(s.open===!1&&g(!1),()=>g(!1)),[s.open,g]),(0,o.jsx)(je,{...u,children:(0,o.jsx)(ze,{scope:e,open:t,onOpenChange:g,content:p,onContentChange:x,children:(0,o.jsx)(Ct,{scope:e,contentId:re(),triggerId:re(),trigger:d,onTriggerChange:f,children:r})})})},"MenuSub"),oe="MenuSubTrigger",_t=i.forwardRef(v(c(function(e,r){const t=A(oe,e.__scopeMenu),a=ee(oe,e.__scopeMenu),s=He(oe,e.__scopeMenu),u=Ce(oe,e.__scopeMenu),d=i.useRef(null),{pointerGraceTimerRef:f,onPointerGraceIntentChange:p}=u,x={__scopeMenu:e.__scopeMenu},g=i.useCallback(()=>{d.current&&window.clearTimeout(d.current),d.current=null},[]);i.useEffect(()=>g,[g]),i.useEffect(()=>{const m=f.current;return()=>{window.clearTimeout(m),p(null)}},[f,p]);const l=N(r,s.onTriggerChange);return(0,o.jsx)(Ge,{asChild:!0,...x,children:(0,o.jsx)(Be,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":t.open,"aria-controls":t.open?s.contentId:void 0,"data-state":De(t.open),...e,ref:l,onClick:c(m=>{e.onClick?.(m),!(e.disabled||m.defaultPrevented)&&(m.currentTarget.focus(),t.open||t.onOpenChange(!0))},"onClick"),onPointerMove:M(e.onPointerMove,Y(m=>{u.onItemEnter(m),!m.defaultPrevented&&!e.disabled&&!t.open&&!d.current&&(u.onPointerGraceIntentChange(null),d.current=window.setTimeout(()=>{t.onOpenChange(!0),g()},100))})),onPointerLeave:M(e.onPointerLeave,Y(m=>{g();const b=t.content?.getBoundingClientRect();if(b){const C=t.content?.dataset.side,k=C==="right",j=k?-5:5,S=b[k?"left":"right"],w=b[k?"right":"left"];u.onPointerGraceIntentChange({area:[{x:m.clientX+j,y:m.clientY},{x:S,y:b.top},{x:w,y:b.top},{x:w,y:b.bottom},{x:S,y:b.bottom}],side:C}),window.clearTimeout(f.current),f.current=window.setTimeout(()=>u.onPointerGraceIntentChange(null),300)}else{if(u.onTriggerLeave(m),m.defaultPrevented)return;u.onPointerGraceIntentChange(null)}})),onKeyDown:M(e.onKeyDown,m=>{e.disabled||m.target!==m.currentTarget||u.searchRef.current!==""&&m.key===" "||Zn[a.dir].includes(m.key)&&(t.onOpenChange(!0),t.content?.focus(),m.preventDefault())})})})},"MenuSubTrigger2"),"MenuSubTrigger")),Dt="MenuSubContent",It=i.forwardRef(v(c(function(e,r){const t=$e(P,e.__scopeMenu),{forceMount:a=t.forceMount,align:s="start",...u}=e,d=A(P,e.__scopeMenu),f=ee(P,e.__scopeMenu),p=He(Dt,e.__scopeMenu),x=i.useRef(null),g=N(r,x);return(0,o.jsx)(Z.Provider,{scope:e.__scopeMenu,children:(0,o.jsx)(Q,{present:a||d.open,children:(0,o.jsx)(Z.Slot,{scope:e.__scopeMenu,children:(0,o.jsx)(we,{id:p.contentId,"aria-labelledby":p.triggerId,...u,ref:g,align:s,side:f.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:c(l=>{f.isUsingKeyboardRef.current&&x.current?.focus(),l.preventDefault()},"onOpenAutoFocus"),onCloseAutoFocus:c(l=>l.preventDefault(),"onCloseAutoFocus"),onFocusOutside:M(e.onFocusOutside,l=>{l.target!==p.trigger&&d.onOpenChange(!1)}),onEscapeKeyDown:M(e.onEscapeKeyDown,l=>{f.onClose(),l.preventDefault()}),onKeyDown:M(e.onKeyDown,l=>{const m=l.currentTarget.contains(l.target),b=Jn[f.dir].includes(l.key);m&&b&&(d.onOpenChange(!1),p.trigger?.focus(),l.preventDefault())})})})})})},"MenuSubContent2"),"MenuSubContent"));function De(n){return n?"open":"closed"}c(De,"getOpenState");v(De,"getOpenState");function J(n){return n==="indeterminate"}c(J,"isIndeterminate");v(J,"isIndeterminate");function ie(n){return J(n)?"indeterminate":n?"checked":"unchecked"}c(ie,"getCheckedState");v(ie,"getCheckedState");function Ye(n){const e=document.activeElement;for(const r of n)if(r===e||(r.focus(),document.activeElement!==e))return}c(Ye,"focusFirst");v(Ye,"focusFirst");function qe(n,e){return n.map((r,t)=>n[(e+t)%n.length])}c(qe,"wrapArray");v(qe,"wrapArray");function We(n,e,r){const t=e.length>1&&Array.from(e).every(d=>d===e[0])?e[0]:e,a=r?n.indexOf(r):-1;let s=qe(n,Math.max(a,0));t.length===1&&(s=s.filter(d=>d!==r));const u=s.find(d=>d.toLowerCase().startsWith(t.toLowerCase()));return u!==r?u:void 0}c(We,"getNextMatch");v(We,"getNextMatch");function Ze(n,e){const{x:r,y:t}=n;let a=!1;for(let s=0,u=e.length-1;s<e.length;u=s++){const d=e[s],f=e[u],p=d.x,x=d.y,g=f.x,l=f.y;x>t!=l>t&&r<(g-p)*(t-x)/(l-x)+p&&(a=!a)}return a}c(Ze,"isPointInPolygon");v(Ze,"isPointInPolygon");function Je(n,e){return e?Ze({x:n.clientX,y:n.clientY},e):!1}c(Je,"isPointerInGraceArea");v(Je,"isPointerInGraceArea");function Y(n){return e=>e.pointerType==="mouse"?n(e):void 0}c(Y,"whenMouse");v(Y,"whenMouse");var kt=tt,St=Ge,Rt=rt,yt=st,Pt=lt,jt=_e,Et=ft,Tt=gt,Ot=xt,Nt=bt,Lt=Mt,At=wt,Ft=_t,zt=It,Gt=Object.defineProperty,D=c((n,e)=>Gt(n,"name",{value:e,configurable:!0}),"__name"),Ie="DropdownMenu",[Kt,jo]=he(Ie,[Ae]),I=Ae(),[$t,Qe]=Kt(Ie),Bt=D(n=>{const{__scopeDropdownMenu:e,children:r,dir:t,open:a,defaultOpen:s,onOpenChange:u,modal:d=!0}=n,f=I(e),p=i.useRef(null),[x,g]=me({prop:a,defaultProp:s??!1,onChange:u,caller:Ie});return(0,o.jsx)($t,{scope:e,triggerId:re(),triggerRef:p,contentId:re(),open:x,onOpenChange:g,onOpenToggle:i.useCallback(()=>g(l=>!l),[g]),modal:d,children:(0,o.jsx)(kt,{...f,open:x,onOpenChange:g,dir:t,modal:d,children:r})})},"DropdownMenu"),Ut="DropdownMenuTrigger",Vt=i.forwardRef(D(c(function(e,r){const{__scopeDropdownMenu:t,disabled:a=!1,...s}=e,u=Qe(Ut,t),d=I(t),f=N(r,u.triggerRef);return(0,o.jsx)(St,{asChild:!0,...d,children:(0,o.jsx)(L.button,{type:"button",id:u.triggerId,"aria-haspopup":"menu","aria-expanded":u.open,"aria-controls":u.open?u.contentId:void 0,"data-state":u.open?"open":"closed","data-disabled":a?"":void 0,disabled:a,...s,ref:f,onPointerDown:M(e.onPointerDown,p=>{!a&&p.button===0&&p.ctrlKey===!1&&(u.onOpenToggle(),u.open||p.preventDefault())}),onKeyDown:M(e.onKeyDown,p=>{a||(["Enter"," "].includes(p.key)&&u.onOpenToggle(),p.key==="ArrowDown"&&u.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(p.key)&&p.preventDefault())})})})},"DropdownMenuTrigger2"),"DropdownMenuTrigger")),Xt=D(n=>{const{__scopeDropdownMenu:e,...r}=n,t=I(e);return(0,o.jsx)(Rt,{...t,...r})},"DropdownMenuPortal"),Ht="DropdownMenuContent",Yt=i.forwardRef(D(c(function(e,r){const{__scopeDropdownMenu:t,...a}=e,s=Qe(Ht,t),u=I(t),d=i.useRef(!1);return(0,o.jsx)(yt,{id:s.contentId,"aria-labelledby":s.triggerId,...u,...a,ref:r,onCloseAutoFocus:M(e.onCloseAutoFocus,f=>{d.current||s.triggerRef.current?.focus(),d.current=!1,f.preventDefault()}),onInteractOutside:M(e.onInteractOutside,f=>{const p=f.detail.originalEvent,x=p.button===0&&p.ctrlKey===!0,g=p.button===2||x;(!s.modal||g)&&(d.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuContent2"),"DropdownMenuContent")),qt=i.forwardRef(D(c(function(e,r){const{__scopeDropdownMenu:t,...a}=e,s=I(t);return(0,o.jsx)(Pt,{...s,...a,ref:r})},"DropdownMenuLabel2"),"DropdownMenuLabel")),Wt=i.forwardRef(D(c(function(e,r){const{__scopeDropdownMenu:t,...a}=e,s=I(t);return(0,o.jsx)(jt,{...s,...a,ref:r})},"DropdownMenuItem2"),"DropdownMenuItem")),Zt=i.forwardRef(D(c(function(e,r){const{__scopeDropdownMenu:t,...a}=e,s=I(t);return(0,o.jsx)(Et,{...s,...a,ref:r})},"DropdownMenuCheckboxItem2"),"DropdownMenuCheckboxItem")),Jt=i.forwardRef(D(c(function(e,r){const{__scopeDropdownMenu:t,...a}=e,s=I(t);return(0,o.jsx)(Tt,{...s,...a,ref:r})},"DropdownMenuRadioGroup2"),"DropdownMenuRadioGroup")),Qt=i.forwardRef(D(c(function(e,r){const{__scopeDropdownMenu:t,...a}=e,s=I(t);return(0,o.jsx)(Ot,{...s,...a,ref:r})},"DropdownMenuRadioItem2"),"DropdownMenuRadioItem")),eo=i.forwardRef(D(c(function(e,r){const{__scopeDropdownMenu:t,...a}=e,s=I(t);return(0,o.jsx)(Nt,{...s,...a,ref:r})},"DropdownMenuItemIndicator2"),"DropdownMenuItemIndicator")),no=i.forwardRef(D(c(function(e,r){const{__scopeDropdownMenu:t,...a}=e,s=I(t);return(0,o.jsx)(Lt,{...s,...a,ref:r})},"DropdownMenuSeparator2"),"DropdownMenuSeparator")),to=D(n=>{const{__scopeDropdownMenu:e,children:r,open:t,onOpenChange:a,defaultOpen:s}=n,u=I(e),[d,f]=me({prop:t,defaultProp:s??!1,onChange:a,caller:"DropdownMenuSub"});return(0,o.jsx)(At,{...u,open:d,onOpenChange:f,children:r})},"DropdownMenuSub"),oo=i.forwardRef(D(c(function(e,r){const{__scopeDropdownMenu:t,...a}=e,s=I(t);return(0,o.jsx)(Ft,{...s,...a,ref:r})},"DropdownMenuSubTrigger2"),"DropdownMenuSubTrigger")),ro=i.forwardRef(D(c(function(e,r){const{__scopeDropdownMenu:t,...a}=e,s=I(t);return(0,o.jsx)(zt,{...s,...a,ref:r,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuSubContent2"),"DropdownMenuSubContent")),ao=Bt,so=Vt,co=Xt,io=Yt,uo=qt,lo=Wt,fo=Zt,po=Jt,mo=Qt,en=eo,go=no,ho=to,xo=oo,vo=ro,nn={name:"ellipsis",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],aliases:["more-horizontal"]};nn.node;var Eo=ae(nn),tn={name:"eye",size:24,node:[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]};tn.node;var To=ae(tn),on={name:"refresh-cw",size:24,node:[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]};on.node;var Oo=ae(on),rn={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};rn.node;var No=ae(rn);function Lo({...n}){return(0,o.jsx)(ao,{"data-slot":"dropdown-menu",...n})}c(Lo,"DropdownMenu");function Ao({...n}){return(0,o.jsx)(so,{"data-slot":"dropdown-menu-trigger",...n})}c(Ao,"DropdownMenuTrigger");function Fo({className:n,sideOffset:e=4,...r}){return(0,o.jsx)(co,{children:(0,o.jsx)(io,{"data-slot":"dropdown-menu-content",sideOffset:e,className:_("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 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-(--sz-8rem) origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",n),...r})})}c(Fo,"DropdownMenuContent");function zo({className:n,inset:e,variant:r="default",...t}){return(0,o.jsx)(lo,{"data-slot":"dropdown-menu-item","data-inset":e,"data-variant":r,className:_("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n),...t})}c(zo,"DropdownMenuItem");function Go({className:n,children:e,checked:r,...t}){return(0,o.jsxs)(fo,{"data-slot":"dropdown-menu-checkbox-item",className:_("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n),checked:r,...t,children:[(0,o.jsx)("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:(0,o.jsx)(en,{children:(0,o.jsx)(Te,{className:"size-4"})})}),e]})}c(Go,"DropdownMenuCheckboxItem");function Ko({...n}){return(0,o.jsx)(po,{"data-slot":"dropdown-menu-radio-group",...n})}c(Ko,"DropdownMenuRadioGroup");function $o({className:n,children:e,...r}){return(0,o.jsxs)(mo,{"data-slot":"dropdown-menu-radio-item",className:_("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n),...r,children:[(0,o.jsx)("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:(0,o.jsx)(en,{children:(0,o.jsx)(_n,{className:"size-2 fill-current"})})}),e]})}c($o,"DropdownMenuRadioItem");function Bo({className:n,inset:e,...r}){return(0,o.jsx)(uo,{"data-slot":"dropdown-menu-label","data-inset":e,className:_("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",n),...r})}c(Bo,"DropdownMenuLabel");function Uo({className:n,...e}){return(0,o.jsx)(go,{"data-slot":"dropdown-menu-separator",className:_("bg-border -mx-1 my-1 h-px",n),...e})}c(Uo,"DropdownMenuSeparator");function Vo({className:n,...e}){return(0,o.jsx)("span",{"data-slot":"dropdown-menu-shortcut",className:_("text-muted-foreground ml-auto text-xs tracking-widest",n),...e})}c(Vo,"DropdownMenuShortcut");function Xo({...n}){return(0,o.jsx)(ho,{"data-slot":"dropdown-menu-sub",...n})}c(Xo,"DropdownMenuSub");function Ho({className:n,inset:e,children:r,...t}){return(0,o.jsxs)(xo,{"data-slot":"dropdown-menu-sub-trigger","data-inset":e,className:_("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n),...t,children:[r,(0,o.jsx)(An,{className:"ml-auto size-4"})]})}c(Ho,"DropdownMenuSubTrigger");function Yo({className:n,...e}){return(0,o.jsx)(vo,{"data-slot":"dropdown-menu-sub-content",className:_("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 z-50 min-w-(--sz-8rem) origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",n),...e})}c(Yo,"DropdownMenuSubContent");function qo({...n}){return(0,o.jsx)(Nn,{"data-slot":"dialog",...n})}c(qo,"Dialog");function Wo({...n}){return(0,o.jsx)(Tn,{"data-slot":"dialog-trigger",...n})}c(Wo,"DialogTrigger");function bo({...n}){return(0,o.jsx)(jn,{"data-slot":"dialog-portal",...n})}c(bo,"DialogPortal");function Zo({...n}){return(0,o.jsx)(xe,{"data-slot":"dialog-close",...n})}c(Zo,"DialogClose");function Mo({className:n,...e}){return(0,o.jsx)(Pn,{"data-slot":"dialog-overlay",className:_("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50 duration-100 motion-reduce:animate-none motion-reduce:transition-none",n),...e})}c(Mo,"DialogOverlay");function Jo({className:n,children:e,showCloseButton:r=!0,...t}){return(0,o.jsxs)(bo,{"data-slot":"dialog-portal",children:[(0,o.jsx)(Mo,{}),(0,o.jsxs)(En,{"data-slot":"dialog-content",className:_("bg-background 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-[0.97] data-[state=open]:zoom-in-[0.97] data-[state=closed]:slide-out-to-top-[1%] data-[state=open]:slide-in-from-top-[1%] fixed top-(--sz-calc-26) md:top-(--pct-50) left-(--pct-50) z-50 grid w-full max-w-(--sz-calc-25) translate-x-(--pct-neg-50) translate-y-0 md:translate-y-(--pct-neg-50) gap-4 rounded-lg border p-6 shadow-lg duration-150 ease-(--e-cubic-bezier-0_16-1-0_3-1) outline-none sm:max-w-lg [&>*]:min-w-0 motion-reduce:animate-none motion-reduce:transition-none",n),...t,children:[e,r&&(0,o.jsxs)(xe,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[(0,o.jsx)(In,{}),(0,o.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}c(Jo,"DialogContent");function Qo({className:n,...e}){return(0,o.jsx)("div",{"data-slot":"dialog-header",className:_("flex flex-col gap-2 text-center sm:text-left",n),...e})}c(Qo,"DialogHeader");function er({className:n,showCloseButton:e=!1,children:r,...t}){return(0,o.jsxs)("div",{"data-slot":"dialog-footer",className:_("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",n),...t,children:[r,e&&(0,o.jsx)(xe,{asChild:!0,children:(0,o.jsx)(Dn,{variant:"outline",children:"Close"})})]})}c(er,"DialogFooter");function nr({className:n,...e}){return(0,o.jsx)(On,{"data-slot":"dialog-title",className:_("text-lg leading-none font-semibold",n),...e})}c(nr,"DialogTitle");function tr({className:n,...e}){return(0,o.jsx)(Ln,{"data-slot":"dialog-description",className:_("text-muted-foreground text-sm",n),...e})}c(tr,"DialogDescription");function or({className:n,...e}){return(0,o.jsx)("textarea",{"data-slot":"textarea",className:_("border-input placeholder: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 flex field-sizing-content min-h-16 min-w-0 w-full max-w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-(--tp-color-box-shadow) outline-none focus-visible:ring-(length:--rad-3) disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",n),...e})}c(or,"Textarea");function rr({className:n,...e}){return(0,o.jsx)(Bn,{"data-slot":"checkbox",className:_("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-(--rad-4) border shadow-xs transition-shadow outline-none focus-visible:ring-(length:--rad-3) disabled:cursor-not-allowed disabled:opacity-50",n),...e,children:(0,o.jsx)(Vn,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none",children:(0,o.jsx)(Te,{className:"size-3.5"})})})}c(rr,"Checkbox");export{Ho as C,To as D,Oo as E,Eo as O,Yo as S,No as T,Ko as _,Jo as a,Vo as b,Qo as c,Wo as d,Lo as f,Bo as g,zo as h,Zo as i,bo as l,Fo as m,or as n,tr as o,Go as p,qo as r,er as s,rr as t,nr as u,$o as v,Ao as w,Xo as x,Uo as y};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var p=Object.defineProperty;var o=(a,e)=>p(a,"name",{value:e,configurable:!0});import{i as y}from"./rolldown-runtime-ZpX3ckPj.js";import{Wa as h,n}from"./agent-avatar-url-B_lUFC64.js";var c={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};c.node;var k=n(c),d={name:"clock",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]};d.node;var _=n(d),l={name:"copy",size:24,node:[["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"}]]};l.node;var E=n(l),s={name:"folder-open",size:24,node:[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]};s.node;var C=n(s),u={name:"key-round",size:24,node:[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]};u.node;var M=n(u),i=y(h(),1),m="(prefers-reduced-motion: reduce)";function v(){return typeof window>"u"||!window.matchMedia?!1:window.matchMedia(m).matches}o(v,"getInitialValue");function b(){const[a,e]=(0,i.useState)(v);return(0,i.useEffect)(()=>{if(typeof window>"u"||!window.matchMedia)return;const t=window.matchMedia(m),r=o(f=>e(f.matches),"handler");return e(t.matches),t.addEventListener("change",r),()=>t.removeEventListener("change",r)},[]),a}o(b,"usePrefersReducedMotion");async function z(a){if((typeof window>"u"||window.isSecureContext!==!1)&&typeof navigator<"u"&&navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(a);return}catch{}if(typeof document>"u")throw new Error("Clipboard unavailable");const e=document.createElement("textarea");e.value=a,e.setAttribute("aria-hidden","true"),e.tabIndex=-1,e.style.position="fixed",e.style.top="0",e.style.left="-9999px",(document.activeElement?.closest('[role="dialog"]')??document.querySelector('dialog[open], [role="dialog"][data-state="open"]')??document.body).appendChild(e);const t=document.activeElement;try{if(e.focus({preventScroll:!0}),e.select(),e.setSelectionRange(0,a.length),!document.execCommand("copy"))throw new Error("execCommand copy failed")}finally{e.remove(),t!==document.activeElement&&typeof t?.focus=="function"&&t.focus({preventScroll:!0})}}o(z,"copyTextToClipboard");export{E as a,C as i,b as n,_ as o,M as r,k as s,z as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var p=Object.defineProperty;var t=(e,i)=>p(e,"name",{value:i,configurable:!0});import{Ji as s}from"./agent-avatar-url-B_lUFC64.js";function l(e){const i=new URLSearchParams;e.state&&i.set("state",e.state),e.limit&&i.set("limit",String(e.limit)),e.offset&&i.set("offset",String(e.offset));const n=i.toString();return n?`?${n}`:""}t(l,"buildInviteListQuery");var I={createCompanyInvite:t((e,i={})=>s.post(`/companies/${e}/invites`,i),"createCompanyInvite"),createOpenClawInvitePrompt:t((e,i={})=>s.post(`/companies/${e}/openclaw/invite-prompt`,i),"createOpenClawInvitePrompt"),getInvite:t(e=>s.get(`/invites/${e}`),"getInvite"),getInviteOnboarding:t(e=>s.get(`/invites/${e}/onboarding`),"getInviteOnboarding"),acceptInvite:t((e,i)=>s.post(`/invites/${e}/accept`,i),"acceptInvite"),listInvites:t((e,i={})=>s.get(`/companies/${e}/invites${l(i)}`),"listInvites"),revokeInvite:t(e=>s.post(`/invites/${e}/revoke`,{}),"revokeInvite"),listJoinRequests:t((e,i="pending_approval",n)=>s.get(`/companies/${e}/join-requests?status=${i}${n?`&requestType=${n}`:""}`),"listJoinRequests"),listMembers:t(e=>s.get(`/companies/${e}/members`),"listMembers"),listUserDirectory:t(e=>s.get(`/companies/${e}/user-directory`),"listUserDirectory"),updateMember:t((e,i,n)=>s.patch(`/companies/${e}/members/${i}`,n),"updateMember"),updateMemberPermissions:t((e,i,n)=>s.patch(`/companies/${e}/members/${i}/permissions`,n),"updateMemberPermissions"),updateMemberAccess:t((e,i,n)=>s.patch(`/companies/${e}/members/${i}/role-and-grants`,n),"updateMemberAccess"),archiveMember:t((e,i,n={})=>s.post(`/companies/${e}/members/${i}/archive`,n),"archiveMember"),approveJoinRequest:t((e,i)=>s.post(`/companies/${e}/join-requests/${i}/approve`,{}),"approveJoinRequest"),rejectJoinRequest:t((e,i)=>s.post(`/companies/${e}/join-requests/${i}/reject`,{}),"rejectJoinRequest"),claimJoinRequestApiKey:t((e,i)=>s.post(`/join-requests/${e}/claim-api-key`,{claimSecret:i}),"claimJoinRequestApiKey"),getBoardClaimStatus:t((e,i)=>s.get(`/board-claim/${e}?code=${encodeURIComponent(i)}`),"getBoardClaimStatus"),claimBoard:t((e,i)=>s.post(`/board-claim/${e}/claim`,{code:i}),"claimBoard"),claimBootstrapAdmin:t(()=>s.post("/bootstrap/claim",{}),"claimBootstrapAdmin"),getCliAuthChallenge:t((e,i)=>s.get(`/cli-auth/challenges/${e}?token=${encodeURIComponent(i)}`),"getCliAuthChallenge"),approveCliAuthChallenge:t((e,i)=>s.post(`/cli-auth/challenges/${e}/approve`,{token:i}),"approveCliAuthChallenge"),cancelCliAuthChallenge:t((e,i)=>s.post(`/cli-auth/challenges/${e}/cancel`,{token:i}),"cancelCliAuthChallenge"),searchAdminUsers:t(e=>s.get(`/admin/users?query=${encodeURIComponent(e)}`),"searchAdminUsers"),promoteInstanceAdmin:t(e=>s.post(`/admin/users/${e}/promote-instance-admin`,{}),"promoteInstanceAdmin"),demoteInstanceAdmin:t(e=>s.post(`/admin/users/${e}/demote-instance-admin`,{}),"demoteInstanceAdmin"),getUserCompanyAccess:t(e=>s.get(`/admin/users/${e}/company-access`),"getUserCompanyAccess"),setUserCompanyAccess:t((e,i)=>s.put(`/admin/users/${e}/company-access`,{companyIds:i}),"setUserCompanyAccess"),getCurrentBoardAccess:t(()=>s.get("/cli-auth/me"),"getCurrentBoardAccess")};function m(e){return e==="local-board"?"Board":e.slice(0,5)}t(m,"fallbackUserLabel");function o(e){const i=e.user?.name?.trim();if(i)return i;const n=e.user?.email?.trim();return n||m(e.principalId)}t(o,"baseMemberLabel");function c(e){const i=new Map;for(const n of e??[])n.status==="active"&&(i.has(n.principalId)||i.set(n.principalId,n));return[...i.values()].sort((n,a)=>o(n).localeCompare(o(a)))}t(c,"activeUniqueMembers");function b(e){const i=new Map;for(const n of e??[])i.set(n.principalId,o(n));return i}t(b,"buildCompanyUserLabelMap");function v(e){const i=new Map;for(const n of e??[])i.set(n.principalId,{label:o(n),image:n.user?.image??null});return i}t(v,"buildCompanyUserProfileMap");function h(e,i){const n=new Set([...i?.excludeUserIds??[]].filter(a=>!!a));return c(e).filter(a=>!n.has(a.principalId)).map(a=>({id:`user:${a.principalId}`,label:o(a),searchText:[a.user?.name,a.user?.email,a.principalId].filter(Boolean).join(" ")}))}t(h,"buildCompanyUserInlineOptions");function u(e){return c(e).map(i=>({id:`user:${i.principalId}`,name:o(i),kind:"user",userId:i.principalId}))}t(u,"buildCompanyUserMentionOptions");function d(e){return e.status!=="terminated"&&e.status!=="pending_approval"&&e.orgChainHealth?.status!=="invalid_org_chain"}t(d,"isAgentTaskTarget");function $(e){const i=[];for(const n of e??[]){const a=n.identifier?.trim();if(!a)continue;const r=n.title?.trim()??"";i.push({id:`issue:${n.id}`,name:r?`${a} ${r}`:a,kind:"issue",issueId:n.id,issueIdentifier:a})}return i}t($,"buildIssueMentionOptions");function C(e){return[...u(e.members),...[...e.agents??[]].filter(d).sort((i,n)=>i.name.localeCompare(n.name)).map(i=>({id:`agent:${i.id}`,name:i.name,kind:"agent",agentId:i.id,agentIcon:i.icon,agentAppearance:i.appearance})),...[...e.projects??[]].sort((i,n)=>i.name.localeCompare(n.name)).map(i=>({id:`project:${i.id}`,name:i.name,kind:"project",projectId:i.id,projectColor:i.color})),...$(e.issues)]}t(C,"buildMarkdownMentionOptions");export{d as a,C as i,b as n,I as o,v as r,h as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var ve=Object.defineProperty;var p=(a,e)=>ve(a,"name",{value:e,configurable:!0});import{i as Z}from"./rolldown-runtime-ZpX3ckPj.js";import{A as y,C as z,D as I,E as L,F as Ce,Ha as he,I as xe,L as A,M as w,O as J,S as Te,Wa as De,_ as Pe,b as me,d as ye,f as _e,h as Q,j as ee,k as B,m as Re,p as be,v as Ee,w as we,x as te}from"./agent-avatar-url-B_lUFC64.js";import{o as Oe}from"./dist-CXUn2R-_.js";var i=Z(De(),1),c=Z(he(),1),je=Object.defineProperty,T=p((a,e)=>je(a,"name",{value:e,configurable:!0}),"__name$1"),U="Dialog",[oe,st]=ee(U),[Ie,_]=oe(U),it=T(a=>{const{__scopeDialog:e,children:t,open:o,defaultOpen:s,onOpenChange:n,modal:r=!0}=a,l=i.useRef(null),u=i.useRef(null),[g,f]=J({prop:o,defaultProp:s??!1,onChange:n,caller:U}),[C,v]=i.useState(0),[x,D]=i.useState(0);return(0,c.jsx)(Ie,{scope:e,triggerRef:l,contentRef:u,contentId:L(),titleId:L(),descriptionId:L(),titlePresent:C>0,descriptionPresent:x>0,setTitleCount:v,setDescriptionCount:D,open:g,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(d=>!d),[f]),modal:r,children:t})},"Dialog"),Ae="DialogTrigger",lt=i.forwardRef(T(p(function(e,t){const{__scopeDialog:o,...s}=e,n=_(Ae,o),r=A(t,n.triggerRef);return(0,c.jsx)(w.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.open?n.contentId:void 0,"data-state":S(n.open),...s,ref:r,onClick:y(e.onClick,n.onOpenToggle)})},"DialogTrigger2"),"DialogTrigger")),ne="DialogPortal",[Me,re]=oe(ne,{forceMount:void 0}),ct=T(a=>{const{__scopeDialog:e,forceMount:t,children:o,container:s}=a,n=_(ne,e);return(0,c.jsx)(Me,{scope:e,forceMount:t,children:i.Children.map(o,r=>(0,c.jsx)(I,{present:t||n.open,children:(0,c.jsx)(te,{asChild:!0,container:s,children:r})}))})},"DialogPortal"),G="DialogOverlay",ut=i.forwardRef(T(p(function(e,t){const o=re(G,e.__scopeDialog),{forceMount:s=o.forceMount,...n}=e,r=_(G,e.__scopeDialog);return r.modal?(0,c.jsx)(I,{present:s||r.open,children:(0,c.jsx)(Se,{...n,ref:t})}):null},"DialogOverlay2"),"DialogOverlay")),Le=Ce("DialogOverlay.RemoveScroll"),Se=i.forwardRef(T(p(function(e,t){const{__scopeDialog:o,...s}=e,n=_(G,o),r=we(),l=A(t,r);return(0,c.jsx)(Ee,{as:Le,allowPinchZoom:!0,shards:[n.contentRef],children:(0,c.jsx)(w.div,{"data-state":S(n.open),...s,ref:l,style:{pointerEvents:"auto",...s.style}})})},"DialogOverlayImpl2"),"DialogOverlayImpl")),O="DialogContent",pt=i.forwardRef(T(p(function(e,t){const o=re(O,e.__scopeDialog),{forceMount:s=o.forceMount,...n}=e,r=_(O,e.__scopeDialog);return(0,c.jsx)(I,{present:s||r.open,children:r.modal?(0,c.jsx)(ke,{...n,ref:t}):(0,c.jsx)(Fe,{...n,ref:t})})},"DialogContent2"),"DialogContent")),ke=i.forwardRef(T(p(function(e,t){const o=_(O,e.__scopeDialog),s=i.useRef(null),n=A(t,o.contentRef,s);return i.useEffect(()=>{const r=s.current;if(r)return Pe(r)},[]),(0,c.jsx)(ae,{...e,ref:n,trapFocus:o.open,disableOutsidePointerEvents:o.open,onCloseAutoFocus:y(e.onCloseAutoFocus,r=>{r.preventDefault(),o.triggerRef.current?.focus()}),onPointerDownOutside:y(e.onPointerDownOutside,r=>{const l=r.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0;(l.button===2||u)&&r.preventDefault()}),onFocusOutside:y(e.onFocusOutside,r=>r.preventDefault())})},"DialogContentModal2"),"DialogContentModal")),Fe=i.forwardRef(T(p(function(e,t){const o=_(O,e.__scopeDialog),s=i.useRef(!1),n=i.useRef(!1);return(0,c.jsx)(ae,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:p(r=>{e.onCloseAutoFocus?.(r),r.defaultPrevented||(s.current||o.triggerRef.current?.focus(),r.preventDefault()),s.current=!1,n.current=!1},"onCloseAutoFocus"),onInteractOutside:p(r=>{e.onInteractOutside?.(r),r.defaultPrevented||(s.current=!0,r.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const l=r.target;o.triggerRef.current?.contains(l)&&r.preventDefault(),r.detail.originalEvent.type==="focusin"&&n.current&&r.preventDefault()},"onInteractOutside")})},"DialogContentNonModal2"),"DialogContentNonModal")),ae=i.forwardRef(T(p(function(e,t){const{__scopeDialog:o,trapFocus:s,onOpenAutoFocus:n,onCloseAutoFocus:r,...l}=e,u=_(O,o);return me(),(0,c.jsx)(c.Fragment,{children:(0,c.jsx)(Te,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:n,onUnmountAutoFocus:r,children:(0,c.jsx)(z,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionPresent?u.descriptionId:void 0,"aria-labelledby":u.titlePresent?u.titleId:void 0,"data-state":S(u.open),...l,ref:t,deferPointerDownOutside:!0,onDismiss:p(()=>u.onOpenChange(!1),"onDismiss")})})})},"DialogContentImpl2"),"DialogContentImpl")),Ne="DialogTitle",dt=i.forwardRef(T(p(function(e,t){const{__scopeDialog:o,...s}=e,n=_(Ne,o),{setTitleCount:r}=n;return B(()=>(r(l=>l+1),()=>r(l=>l-1)),[r]),(0,c.jsx)(w.h2,{id:n.titleId,...s,ref:t})},"DialogTitle2"),"DialogTitle")),He="DialogDescription",ft=i.forwardRef(T(p(function(e,t){const{__scopeDialog:o,...s}=e,n=_(He,o),{setDescriptionCount:r}=n;return B(()=>(r(l=>l+1),()=>r(l=>l-1)),[r]),(0,c.jsx)(w.p,{id:n.descriptionId,...s,ref:t})},"DialogDescription2"),"DialogDescription")),Ge="DialogClose",gt=i.forwardRef(T(p(function(e,t){const{__scopeDialog:o,...s}=e,n=_(Ge,o);return(0,c.jsx)(w.button,{type:"button",...s,ref:t,onClick:y(e.onClick,()=>n.onOpenChange(!1))})},"DialogClose2"),"DialogClose"));function S(a){return a?"open":"closed"}p(S,"getState");T(S,"getState");var $e=Object.defineProperty,h=p((a,e)=>$e(a,"name",{value:e,configurable:!0}),"__name"),[Y,vt]=ee("Tooltip",[Q]),k=Q(),qe="TooltipProvider",Be=700,$="tooltip.open",[Ue,K]=Y(qe),Ye=h(a=>{const{__scopeTooltip:e,delayDuration:t=Be,skipDelayDuration:o=300,disableHoverableContent:s=!1,children:n}=a,r=i.useRef(!0),l=i.useRef(!1),u=i.useRef(0);return i.useEffect(()=>{const g=u.current;return()=>window.clearTimeout(g)},[]),(0,c.jsx)(Ue,{scope:e,isOpenDelayedRef:r,delayDuration:t,onOpen:i.useCallback(()=>{o<=0||(window.clearTimeout(u.current),r.current=!1)},[o]),onClose:i.useCallback(()=>{o<=0||(window.clearTimeout(u.current),u.current=window.setTimeout(()=>r.current=!0,o))},[o]),isPointerInTransitRef:l,onPointerInTransitChange:i.useCallback(g=>{l.current=g},[]),disableHoverableContent:s,children:n})},"TooltipProvider"),q="Tooltip",[Ke,M]=Y(q),Ve=h(a=>{const{__scopeTooltip:e,children:t,open:o,defaultOpen:s,onOpenChange:n,disableHoverableContent:r,delayDuration:l}=a,u=K(q,a.__scopeTooltip),g=k(e),[f,C]=i.useState(null),[v,x]=i.useState(void 0),D=L(),d=i.useRef(0),P=r??u.disableHoverableContent,m=l??u.delayDuration,b=i.useRef(!1),[E,R]=J({prop:o,defaultProp:s??!1,onChange:h(X=>{X?(u.onOpen(),document.dispatchEvent(new CustomEvent($))):u.onClose(),n?.(X)},"onChange"),caller:q}),F=i.useMemo(()=>E?b.current?"delayed-open":"instant-open":"closed",[E]),N=i.useCallback(()=>{window.clearTimeout(d.current),d.current=0,b.current=!1,R(!0)},[R]),H=i.useCallback(()=>{window.clearTimeout(d.current),d.current=0,R(!1)},[R]),V=i.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>{b.current=!0,R(!0),d.current=0},m)},[m,R]);i.useEffect(()=>()=>{d.current&&(window.clearTimeout(d.current),d.current=0)},[]);const ge=v??D;return(0,c.jsx)(Re,{...g,children:(0,c.jsx)(Ke,{scope:e,contentId:ge,setContentId:x,open:E,stateAttribute:F,trigger:f,onTriggerChange:C,onTriggerEnter:i.useCallback(()=>{u.isOpenDelayedRef.current?V():N()},[u.isOpenDelayedRef,V,N]),onTriggerLeave:i.useCallback(()=>{P?H():(window.clearTimeout(d.current),d.current=0)},[H,P]),onOpen:N,onClose:H,disableHoverableContent:P,children:t})})},"Tooltip"),W="TooltipTrigger",Xe=i.forwardRef(h(p(function(e,t){const{__scopeTooltip:o,...s}=e,n=M(W,o),r=K(W,o),l=k(o),u=i.useRef(null),g=A(t,u,n.onTriggerChange),f=i.useRef(!1),C=i.useRef(!1),v=i.useCallback(()=>f.current=!1,[]);return i.useEffect(()=>()=>document.removeEventListener("pointerup",v),[v]),(0,c.jsx)(ye,{asChild:!0,...l,children:(0,c.jsx)(w.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...s,ref:g,onPointerMove:y(e.onPointerMove,x=>{x.pointerType!=="touch"&&!C.current&&!r.isPointerInTransitRef.current&&(n.onTriggerEnter(),C.current=!0)}),onPointerLeave:y(e.onPointerLeave,()=>{n.onTriggerLeave(),C.current=!1}),onPointerDown:y(e.onPointerDown,()=>{n.open&&n.onClose(),f.current=!0,document.addEventListener("pointerup",v,{once:!0})}),onFocus:y(e.onFocus,()=>{f.current||n.onOpen()}),onBlur:y(e.onBlur,n.onClose),onClick:y(e.onClick,n.onClose)})})},"TooltipTrigger2"),"TooltipTrigger")),se="TooltipPortal",[We,Ze]=Y(se,{forceMount:void 0}),ze=h(a=>{const{__scopeTooltip:e,forceMount:t,children:o,container:s}=a,n=M(se,e);return(0,c.jsx)(We,{scope:e,forceMount:t,children:(0,c.jsx)(I,{present:t||n.open,children:(0,c.jsx)(te,{asChild:!0,container:s,children:o})})})},"TooltipPortal"),j="TooltipContent",Je=i.forwardRef(h(p(function(e,t){const o=Ze(j,e.__scopeTooltip),{forceMount:s=o.forceMount,side:n="top",...r}=e,l=M(j,e.__scopeTooltip);return(0,c.jsx)(I,{present:s||l.open,children:l.disableHoverableContent?(0,c.jsx)(ie,{side:n,...r,ref:t}):(0,c.jsx)(Qe,{side:n,...r,ref:t})})},"TooltipContent2"),"TooltipContent")),Qe=i.forwardRef(h(p(function(e,t){const o=M(j,e.__scopeTooltip),s=K(j,e.__scopeTooltip),n=i.useRef(null),r=A(t,n),[l,u]=i.useState(null),{trigger:g,onClose:f}=o,C=n.current,{onPointerInTransitChange:v}=s,x=i.useCallback(()=>{u(null),v(!1)},[v]),D=i.useCallback((d,P)=>{const m=d.currentTarget,b={x:d.clientX,y:d.clientY},E=ce(b,le(b,m.getBoundingClientRect())),R=ue(P.getBoundingClientRect()),F=de([...E,...R]);u(F),v(!0)},[v]);return i.useEffect(()=>()=>x(),[x]),i.useEffect(()=>{if(g&&C){const d=h(m=>D(m,C),"handleTriggerLeave"),P=h(m=>D(m,g),"handleContentLeave");return g.addEventListener("pointerleave",d),C.addEventListener("pointerleave",P),()=>{g.removeEventListener("pointerleave",d),C.removeEventListener("pointerleave",P)}}},[g,C,D,x]),i.useEffect(()=>{if(l){const d=h(P=>{const m=P.target,b={x:P.clientX,y:P.clientY},E=g?.contains(m)||C?.contains(m),R=!pe(b,l);E?x():R&&(x(),f())},"handleTrackPointerGrace");return document.addEventListener("pointermove",d),()=>document.removeEventListener("pointermove",d)}},[g,C,l,f,x]),(0,c.jsx)(ie,{...e,ref:r})},"TooltipContentHoverable2"),"TooltipContentHoverable")),et=xe("TooltipContent"),ie=i.forwardRef(h(p(function(e,t){const{__scopeTooltip:o,children:s,"aria-label":n,id:r,onEscapeKeyDown:l,onPointerDownOutside:u,...g}=e,f=M(j,o),C=k(o),{onClose:v}=f;i.useEffect(()=>(document.addEventListener($,v),()=>document.removeEventListener($,v)),[v]),i.useEffect(()=>{if(f.trigger){const D=h(d=>{d.target instanceof Node&&d.target.contains(f.trigger)&&v()},"handleScroll");return window.addEventListener("scroll",D,{capture:!0}),()=>window.removeEventListener("scroll",D,{capture:!0})}},[f.trigger,v]);const{setContentId:x}=f;return B(()=>(x(r),()=>{x(void 0)}),[r,x]),(0,c.jsx)(z,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:p(D=>D.preventDefault(),"onFocusOutside"),onDismiss:v,children:(0,c.jsxs)(be,{"data-state":f.stateAttribute,role:n?void 0:"tooltip",id:n?void 0:f.contentId,...C,...g,ref:t,style:{...g.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[(0,c.jsx)(et,{children:s}),n?(0,c.jsx)(Oe,{id:f.contentId,role:"tooltip",children:n}):null]})})},"TooltipContentImpl2"),"TooltipContentImpl")),tt=i.forwardRef(h(p(function(e,t){const{__scopeTooltip:o,...s}=e,n=k(o);return(0,c.jsx)(_e,{...n,...s,ref:t})},"TooltipArrow2"),"TooltipArrow"));function le(a,e){const t=Math.abs(e.top-a.y),o=Math.abs(e.bottom-a.y),s=Math.abs(e.right-a.x),n=Math.abs(e.left-a.x);switch(Math.min(t,o,s,n)){case n:return"left";case s:return"right";case t:return"top";case o:return"bottom";default:throw new Error("unreachable")}}p(le,"getExitSideFromRect");h(le,"getExitSideFromRect");function ce(a,e,t=5){const o=[];switch(e){case"top":o.push({x:a.x-t,y:a.y+t},{x:a.x+t,y:a.y+t});break;case"bottom":o.push({x:a.x-t,y:a.y-t},{x:a.x+t,y:a.y-t});break;case"left":o.push({x:a.x+t,y:a.y-t},{x:a.x+t,y:a.y+t});break;case"right":o.push({x:a.x-t,y:a.y-t},{x:a.x-t,y:a.y+t})}return o}p(ce,"getPaddedExitPoints");h(ce,"getPaddedExitPoints");function ue(a){const{top:e,right:t,bottom:o,left:s}=a;return[{x:s,y:e},{x:t,y:e},{x:t,y:o},{x:s,y:o}]}p(ue,"getPointsFromRect");h(ue,"getPointsFromRect");function pe(a,e){const{x:t,y:o}=a;let s=!1;for(let n=0,r=e.length-1;n<e.length;r=n++){const l=e[n],u=e[r],g=l.x,f=l.y,C=u.x,v=u.y;f>o!=v>o&&t<(C-g)*(o-f)/(v-f)+g&&(s=!s)}return s}p(pe,"isPointInPolygon");h(pe,"isPointInPolygon");function de(a){const e=a.slice();return e.sort((t,o)=>t.x<o.x?-1:t.x>o.x?1:t.y<o.y?-1:t.y>o.y?1:0),fe(e)}p(de,"getHull");h(de,"getHull");function fe(a){if(a.length<=1)return a.slice();const e=[];for(let o=0;o<a.length;o++){const s=a[o];for(;e.length>=2;){const n=e[e.length-1],r=e[e.length-2];if((n.x-r.x)*(s.y-r.y)>=(n.y-r.y)*(s.x-r.x))e.pop();else break}e.push(s)}e.pop();const t=[];for(let o=a.length-1;o>=0;o--){const s=a[o];for(;t.length>=2;){const n=t[t.length-1],r=t[t.length-2];if((n.x-r.x)*(s.y-r.y)>=(n.y-r.y)*(s.x-r.x))t.pop();else break}t.push(s)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}p(fe,"getHullPresorted");h(fe,"getHullPresorted");var Ct=Ye,ht=Ve,xt=Xe,Tt=ze,Dt=Je,Pt=tt;export{ht as a,gt as c,ut as d,ct as f,st as h,Ct as i,pt as l,lt as m,Dt as n,xt as o,dt as p,Tt as r,it as s,Pt as t,ft as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var Fe=Object.defineProperty;var p=(a,e)=>Fe(a,"name",{value:e,configurable:!0});import{i as we}from"./rolldown-runtime-ZpX3ckPj.js";import{A as E,C as Ue,D as We,E as Ce,F as Ke,Ha as Ge,L as U,M as L,O as be,S as qe,T as Ie,Ua as ze,Wa as Ye,_ as $e,b as Xe,d as Ze,h as Ne,j as Je,k as X,m as Qe,p as et,v as tt,x as ot}from"./agent-avatar-url-B_lUFC64.js";import{a as nt,i as rt,s as ct}from"./dist-CXUn2R-_.js";var Oe=we(ze(),1),o=we(Ye(),1),st=Object.defineProperty,lt=p((a,e)=>st(a,"name",{value:e,configurable:!0}),"__name$2");function De(a){const e=o.useRef({value:a,previous:a});return o.useMemo(()=>(e.current.value!==a&&(e.current.previous=e.current.value,e.current.value=a),e.current.previous),[a])}p(De,"usePrevious");lt(De,"usePrevious");var at=Object.defineProperty,it=p((a,e)=>at(a,"name",{value:e,configurable:!0}),"__name$1");function ge(a,[e,s]){return Math.min(s,Math.max(e,a))}p(ge,"clamp");it(ge,"clamp");var d=we(Ge(),1),dt=Object.defineProperty,v=p((a,e)=>dt(a,"name",{value:e,configurable:!0}),"__name"),ut=[" ","Enter","ArrowUp","ArrowDown"],pt=[" ","Enter"],se="Select",[fe,he,ft]=nt(se),[te,kt]=Je(se,[ft,Ne]),Pe=Ne(),[ht,Z]=te(se),[mt,St]=te(se);function Le(a){const{__scopeSelect:e,children:s,open:t,defaultOpen:u,onOpenChange:r,value:f,defaultValue:n,onValueChange:c,dir:l,name:x,autoComplete:I,disabled:P,required:_,form:y,internal_do_not_use_render:T}=a,i=Pe(e),[g,C]=o.useState(null),[m,h]=o.useState(null),[N,O]=o.useState(!1),le=rt(l),[A,B]=be({prop:t,defaultProp:u??!1,onChange:r,caller:se}),[J,q]=be({prop:f,defaultProp:n,onChange:c,caller:se}),W=o.useRef(null),K=o.useRef(J);o.useEffect(()=>{const M=y?g?.ownerDocument.getElementById(y):g?.form;if(M instanceof HTMLFormElement){const F=v(()=>q(K.current),"reset");return M.addEventListener("reset",F),()=>M.removeEventListener("reset",F)}},[y,g,q]);const Q=g?!!y||!!g.closest("form"):!0,[G,V]=o.useState(new Set),z=Ce(),Y=Array.from(G).map(M=>M.props.value).join(";"),$=o.useCallback(M=>{V(F=>new Set(F).add(M))},[]),H=o.useCallback(M=>{V(F=>{const re=new Set(F);return re.delete(M),re})},[]),ne={required:_,trigger:g,onTriggerChange:C,valueNode:m,onValueNodeChange:h,valueNodeHasChildren:N,onValueNodeHasChildrenChange:O,contentId:z,value:J,onValueChange:q,open:A,onOpenChange:B,dir:le,triggerPointerDownPosRef:W,disabled:P,name:x,autoComplete:I,form:y,nativeOptions:G,nativeSelectKey:Y,isFormControl:Q};return(0,d.jsx)(Qe,{...i,children:(0,d.jsx)(ht,{scope:e,...ne,children:(0,d.jsx)(fe.Provider,{scope:e,children:(0,d.jsx)(mt,{scope:e,onNativeOptionAdd:$,onNativeOptionRemove:H,children:Ve(T)?T(ne):s})})})})}p(Le,"SelectProvider");v(Le,"SelectProvider");var Bt=v(a=>{const{__scopeSelect:e,children:s,...t}=a;return(0,d.jsx)(Le,{__scopeSelect:e,...t,internal_do_not_use_render:p(({isFormControl:u})=>(0,d.jsxs)(d.Fragment,{children:[s,u?(0,d.jsx)(Nt,{__scopeSelect:e}):null]}),"internal_do_not_use_render")})},"Select"),vt="SelectTrigger",Vt=o.forwardRef(v(p(function(e,s){const{__scopeSelect:t,disabled:u=!1,...r}=e,f=Pe(t),n=Z(vt,t),c=n.disabled||u,l=U(s,n.onTriggerChange),x=he(t),I=o.useRef("touch"),[P,_,y]=_e(i=>{const g=x().filter(m=>!m.disabled),C=Te(g,i,g.find(m=>m.value===n.value));C!==void 0&&n.onValueChange(C.value)}),T=v(i=>{c||(n.onOpenChange(!0),y()),i&&(n.triggerPointerDownPosRef.current={x:Math.round(i.pageX),y:Math.round(i.pageY)})},"handleOpen");return(0,d.jsx)(Ze,{asChild:!0,...f,children:(0,d.jsx)(L.button,{type:"button",role:"combobox","aria-controls":n.open?n.contentId:void 0,"aria-expanded":n.open,"aria-required":n.required,"aria-autocomplete":"none",dir:n.dir,"data-state":n.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":de(n.value)?"":void 0,...r,ref:l,onClick:E(r.onClick,i=>{i.currentTarget.focus(),I.current!=="mouse"&&T(i)}),onPointerDown:E(r.onPointerDown,i=>{I.current=i.pointerType;const g=i.target;g.hasPointerCapture(i.pointerId)&&g.releasePointerCapture(i.pointerId),i.button===0&&i.ctrlKey===!1&&i.pointerType==="mouse"&&(T(i),i.preventDefault())}),onKeyDown:E(r.onKeyDown,i=>{const g=P.current!=="";!(i.ctrlKey||i.altKey||i.metaKey)&&i.key.length===1&&_(i.key),!(g&&i.key===" ")&&ut.includes(i.key)&&(T(),i.preventDefault())})})})},"SelectTrigger2"),"SelectTrigger")),gt="SelectValue",Ht=o.forwardRef(v(p(function(e,s){const{__scopeSelect:t,className:u,style:r,children:f,placeholder:n="",...c}=e,l=Z(gt,t),{onValueNodeHasChildrenChange:x}=l,I=f!==void 0,P=U(s,l.onValueNodeChange);X(()=>{x(I)},[x,I]);const _=de(l.value);return(0,d.jsx)(L.span,{...c,asChild:_?!1:c.asChild,ref:P,style:{pointerEvents:"none"},children:(0,d.jsx)(o.Fragment,{children:_?n:f},_?"placeholder":"value")})},"SelectValue2"),"SelectValue")),Ft=o.forwardRef(v(p(function(e,s){const{__scopeSelect:t,children:u,...r}=e;return(0,d.jsx)(L.span,{"aria-hidden":!0,...r,ref:s,children:u||"▼"})},"SelectIcon2"),"SelectIcon")),[xt,wt]=te("SelectPortal",{forceMount:void 0}),Ut=v(a=>{const{__scopeSelect:e,forceMount:s,...t}=a;return(0,d.jsx)(xt,{scope:a.__scopeSelect,forceMount:s,children:(0,d.jsx)(ot,{asChild:!0,...t})})},"SelectPortal"),ee="SelectContent",Wt=o.forwardRef(v(p(function(e,s){const t=wt(ee,e.__scopeSelect),{forceMount:u=t.forceMount,...r}=e,f=Z(ee,e.__scopeSelect),[n,c]=o.useState();return X(()=>{c(new DocumentFragment)},[]),(0,d.jsx)(We,{present:u||f.open,children:p(({present:l})=>l?(0,d.jsx)(Pt,{...r,ref:s}):(0,d.jsx)(Ct,{...r,fragment:n}),"children")})},"SelectContent2"),"SelectContent")),Ct=o.forwardRef(v(p(function(e,s){const{__scopeSelect:t,children:u,fragment:r}=e;return r?Oe.createPortal((0,d.jsx)(Ae,{scope:t,children:(0,d.jsx)(fe.Slot,{scope:t,children:(0,d.jsx)("div",{ref:s,children:u})})}),r):null},"SelectContentFragment2"),"SelectContentFragment")),k=10,[Ae,oe]=te(ee),It=Ke("SelectContent.RemoveScroll"),Pt=o.forwardRef(v(p(function(e,s){const{__scopeSelect:t}=e,{position:u="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:f,onPointerDownOutside:n,side:c,sideOffset:l,align:x,alignOffset:I,arrowPadding:P,collisionBoundary:_,collisionPadding:y,sticky:T,hideWhenDetached:i,avoidCollisions:g,...C}=e,m=Z(ee,t),[h,N]=o.useState(null),[O,le]=o.useState(null),A=U(s,N),[B,J]=o.useState(null),[q,W]=o.useState(null),K=he(t),[Q,G]=o.useState(!1),V=o.useRef(!1);o.useEffect(()=>{if(h)return $e(h)},[h]),Xe();const z=o.useCallback(S=>{const[R,...b]=K().map(D=>D.ref.current),[w]=b.slice(-1),j=document.activeElement;for(const D of S)if(D===j||(D?.scrollIntoView({block:"nearest"}),D===R&&O&&(O.scrollTop=0),D===w&&O&&(O.scrollTop=O.scrollHeight),D?.focus(),document.activeElement!==j))return},[K,O]),Y=o.useCallback(()=>z([B,h]),[z,B,h]);o.useEffect(()=>{Q&&Y()},[Q,Y]);const{onOpenChange:$,triggerPointerDownPosRef:H}=m;o.useEffect(()=>{if(h){let S={x:0,y:0};const R=v(w=>{S={x:Math.abs(Math.round(w.pageX)-(H.current?.x??0)),y:Math.abs(Math.round(w.pageY)-(H.current?.y??0))}},"handlePointerMove"),b=v(w=>{S.x<=10&&S.y<=10?w.preventDefault():w.composedPath().includes(h)||$(!1),document.removeEventListener("pointermove",R),H.current=null},"handlePointerUp");return H.current!==null&&(document.addEventListener("pointermove",R),document.addEventListener("pointerup",b,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",R),document.removeEventListener("pointerup",b,{capture:!0})}}},[h,$,H]),o.useEffect(()=>{const S=v(()=>$(!1),"close");return window.addEventListener("blur",S),window.addEventListener("resize",S),()=>{window.removeEventListener("blur",S),window.removeEventListener("resize",S)}},[$]);const[ne,M]=_e(S=>{const R=K().filter(w=>!w.disabled),b=Te(R,S,R.find(w=>w.ref.current===document.activeElement));b&&setTimeout(()=>b.ref.current?.focus())}),F=o.useCallback((S,R,b)=>{const w=!V.current&&!b;(m.value!==void 0&&m.value===R||w)&&(J(S),w&&(V.current=!0))},[m.value]),re=o.useCallback(()=>h?.focus(),[h]),ce=o.useCallback((S,R,b)=>{const w=!V.current&&!b;(m.value!==void 0&&m.value===R||w)&&W(S)},[m.value]),ue=u==="popper"?Re:yt,ae=ue===Re?{side:c,sideOffset:l,align:x,alignOffset:I,arrowPadding:P,collisionBoundary:_,collisionPadding:y,sticky:T,hideWhenDetached:i,avoidCollisions:g}:{};return(0,d.jsx)(Ae,{scope:t,content:h,viewport:O,onViewportChange:le,itemRefCallback:F,selectedItem:B,onItemLeave:re,itemTextRefCallback:ce,focusSelectedItem:Y,selectedItemText:q,position:u,isPositioned:Q,searchRef:ne,children:(0,d.jsx)(tt,{as:It,allowPinchZoom:!0,children:(0,d.jsx)(qe,{asChild:!0,trapped:m.open,onMountAutoFocus:p(S=>{S.preventDefault()},"onMountAutoFocus"),onUnmountAutoFocus:E(r,S=>{m.trigger?.focus({preventScroll:!0}),S.preventDefault()}),children:(0,d.jsx)(Ue,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:f,onPointerDownOutside:n,onFocusOutside:p(S=>S.preventDefault(),"onFocusOutside"),onDismiss:p(()=>m.onOpenChange(!1),"onDismiss"),children:(0,d.jsx)(ue,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:p(S=>S.preventDefault(),"onContextMenu"),...C,...ae,onPlaced:p(()=>G(!0),"onPlaced"),ref:A,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:E(C.onKeyDown,S=>{const R=S.ctrlKey||S.altKey||S.metaKey;if(S.key==="Tab"&&S.preventDefault(),!R&&S.key.length===1&&M(S.key),["ArrowUp","ArrowDown","Home","End"].includes(S.key)){let b=K().filter(w=>!w.disabled).map(w=>w.ref.current);if(["ArrowUp","End"].includes(S.key)&&(b=b.slice().reverse()),["ArrowUp","ArrowDown"].includes(S.key)){const w=S.target,j=b.indexOf(w);b=b.slice(j+1)}setTimeout(()=>z(b)),S.preventDefault()}})})})})})})},"SelectContentImpl2"),"SelectContentImpl")),yt=o.forwardRef(v(p(function(e,s){const{__scopeSelect:t,onPlaced:u,...r}=e,f=Z(ee,t),n=oe(ee,t),[c,l]=o.useState(null),[x,I]=o.useState(null),P=U(s,I),_=he(t),y=o.useRef(!1),T=o.useRef(!0),{viewport:i,selectedItem:g,selectedItemText:C,focusSelectedItem:m}=n,h=o.useCallback(()=>{if(f.trigger&&f.valueNode&&c&&x&&i&&g&&C){const A=f.trigger.getBoundingClientRect(),B=x.getBoundingClientRect(),J=f.valueNode.getBoundingClientRect(),q=C.getBoundingClientRect();if(f.dir!=="rtl"){const w=q.left-B.left,j=J.left-w,D=A.left-j,ie=A.width+D,me=Math.max(ie,B.width),Se=window.innerWidth-k,ve=ge(j,[k,Math.max(k,Se-me)]);c.style.minWidth=ie+"px",c.style.left=ve+"px"}else{const w=B.right-q.right,j=window.innerWidth-J.right-w,D=window.innerWidth-A.right-j,ie=A.width+D,me=Math.max(ie,B.width),Se=window.innerWidth-k,ve=ge(j,[k,Math.max(k,Se-me)]);c.style.minWidth=ie+"px",c.style.right=ve+"px"}const W=_(),K=window.innerHeight-k*2,Q=i.scrollHeight,G=window.getComputedStyle(x),V=parseInt(G.borderTopWidth,10),z=parseInt(G.paddingTop,10),Y=parseInt(G.borderBottomWidth,10),$=parseInt(G.paddingBottom,10),H=V+z+Q+$+Y,ne=Math.min(g.offsetHeight*5,H),M=window.getComputedStyle(i),F=parseInt(M.paddingTop,10),re=parseInt(M.paddingBottom,10),ce=A.top+A.height/2-k,ue=K-ce,ae=g.offsetHeight/2,S=g.offsetTop+ae,R=V+z+S,b=H-R;if(R<=ce){const w=W.length>0&&g===W[W.length-1].ref.current;c.style.bottom="0px";const j=x.clientHeight-i.offsetTop-i.offsetHeight,D=R+Math.max(ue,ae+(w?re:0)+j+Y);c.style.height=D+"px"}else{const w=W.length>0&&g===W[0].ref.current;c.style.top="0px";const j=Math.max(ce,V+i.offsetTop+(w?F:0)+ae)+b;c.style.height=j+"px",i.scrollTop=R-ce+i.offsetTop}c.style.margin=`${k}px 0`,c.style.minHeight=ne+"px",c.style.maxHeight=K+"px",u?.(),requestAnimationFrame(()=>y.current=!0)}},[_,f.trigger,f.valueNode,c,x,i,g,C,f.dir,u]);X(()=>h(),[h]);const[N,O]=o.useState();X(()=>{x&&O(window.getComputedStyle(x).zIndex)},[x]);const le=o.useCallback(A=>{A&&T.current===!0&&(h(),m?.(),T.current=!1)},[h,m]);return(0,d.jsx)(_t,{scope:t,contentWrapper:c,shouldExpandOnScrollRef:y,onScrollButtonChange:le,children:(0,d.jsx)("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:N},children:(0,d.jsx)(L.div,{...r,ref:P,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})},"SelectItemAlignedPosition2"),"SelectItemAlignedPosition")),Re=o.forwardRef(v(p(function(e,s){const{__scopeSelect:t,align:u="start",collisionPadding:r=k,...f}=e,n=Pe(t);return(0,d.jsx)(et,{...n,...f,ref:s,align:u,collisionPadding:r,style:{boxSizing:"border-box",...f.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)"}})},"SelectPopperPosition2"),"SelectPopperPosition")),[_t,ye]=te(ee,{}),Ee="SelectViewport",Kt=o.forwardRef(v(p(function(e,s){const{__scopeSelect:t,nonce:u,...r}=e,f=oe(Ee,t),n=ye(Ee,t),c=U(s,f.onViewportChange),l=o.useRef(0);return(0,d.jsxs)(d.Fragment,{children:[(0,d.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:u}),(0,d.jsx)(fe.Slot,{scope:t,children:(0,d.jsx)(L.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:E(r.onScroll,x=>{const I=x.currentTarget,{contentWrapper:P,shouldExpandOnScrollRef:_}=n;if(_?.current&&P){const y=Math.abs(l.current-I.scrollTop);if(y>0){const T=window.innerHeight-k*2,i=parseFloat(P.style.minHeight),g=parseFloat(P.style.height),C=Math.max(i,g);if(C<T){const m=C+y,h=Math.min(T,m),N=m-h;P.style.height=h+"px",P.style.bottom==="0px"&&(I.scrollTop=N>0?N:0,P.style.justifyContent="flex-end")}}}l.current=I.scrollTop})})})]})},"SelectViewport2"),"SelectViewport")),[Tt,bt]=te("SelectGroup"),Gt=o.forwardRef(v(p(function(e,s){const{__scopeSelect:t,...u}=e,r=Ce();return(0,d.jsx)(Tt,{scope:t,id:r,children:(0,d.jsx)(L.div,{role:"group","aria-labelledby":r,...u,ref:s})})},"SelectGroup2"),"SelectGroup")),Rt="SelectLabel",qt=o.forwardRef(v(p(function(e,s){const{__scopeSelect:t,...u}=e,r=bt(Rt,t);return(0,d.jsx)(L.div,{id:r.id,...u,ref:s})},"SelectLabel2"),"SelectLabel")),xe="SelectItem",[Et,ke]=te(xe),zt=o.forwardRef(v(p(function(e,s){const{__scopeSelect:t,value:u,disabled:r=!1,textValue:f,...n}=e,c=Z(xe,t),l=oe(xe,t),x=c.value===u,[I,P]=o.useState(f??""),[_,y]=o.useState(!1),T=Ie(h=>l.itemRefCallback?.(h,u,r)),i=U(s,T),g=Ce(),C=o.useRef("touch"),m=v(()=>{r||(c.onValueChange(u),c.onOpenChange(!1))},"handleSelect");return(0,d.jsx)(Et,{scope:t,value:u,disabled:r,textId:g,isSelected:x,onItemTextChange:o.useCallback(h=>{P(N=>N||(h?.textContent??"").trim())},[]),children:(0,d.jsx)(fe.ItemSlot,{scope:t,value:u,disabled:r,textValue:I,children:(0,d.jsx)(L.div,{role:"option","aria-labelledby":g,"data-highlighted":_?"":void 0,"aria-selected":x&&_,"data-state":x?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...n,ref:i,onFocus:E(n.onFocus,()=>y(!0)),onBlur:E(n.onBlur,()=>y(!1)),onClick:E(n.onClick,()=>{C.current!=="mouse"&&m()}),onPointerUp:E(n.onPointerUp,()=>{C.current==="mouse"&&m()}),onPointerDown:E(n.onPointerDown,h=>{C.current=h.pointerType}),onPointerMove:E(n.onPointerMove,h=>{C.current=h.pointerType,r?l.onItemLeave?.():C.current==="mouse"&&h.currentTarget.focus({preventScroll:!0})}),onPointerLeave:E(n.onPointerLeave,h=>{h.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:E(n.onKeyDown,h=>{r||h.target!==h.currentTarget||l.searchRef?.current!==""&&h.key===" "||(pt.includes(h.key)&&m(),h.key===" "&&h.preventDefault())})})})})},"SelectItem2"),"SelectItem")),pe="SelectItemText",Yt=o.forwardRef(v(p(function(e,s){const{__scopeSelect:t,className:u,style:r,...f}=e,n=Z(pe,t),c=oe(pe,t),l=ke(pe,t),x=St(pe,t),[I,P]=o.useState(null),_=Ie(m=>c.itemTextRefCallback?.(m,l.value,l.disabled)),y=U(s,P,l.onItemTextChange,_),T=I?.textContent,i=o.useMemo(()=>(0,d.jsx)("option",{value:l.value,disabled:l.disabled,children:T},l.value),[l.disabled,l.value,T]),{onNativeOptionAdd:g,onNativeOptionRemove:C}=x;return X(()=>(g(i),()=>C(i)),[g,C,i]),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(L.span,{id:l.textId,...f,ref:y}),l.isSelected&&n.valueNode&&!n.valueNodeHasChildren&&!de(n.value)?Oe.createPortal(f.children,n.valueNode):null]})},"SelectItemText2"),"SelectItemText")),Mt="SelectItemIndicator",$t=o.forwardRef(v(p(function(e,s){const{__scopeSelect:t,...u}=e;return ke(Mt,t).isSelected?(0,d.jsx)(L.span,{"aria-hidden":!0,...u,ref:s}):null},"SelectItemIndicator2"),"SelectItemIndicator")),Me="SelectScrollUpButton",Xt=o.forwardRef(v(p(function(e,s){const t=oe(Me,e.__scopeSelect),u=ye(Me,e.__scopeSelect),[r,f]=o.useState(!1),n=U(s,u.onScrollButtonChange);return X(()=>{if(t.viewport&&t.isPositioned){let c=p(function(){const x=l.scrollTop>0;f(x)},"handleScroll2");v(c,"handleScroll");const l=t.viewport;return c(),l.addEventListener("scroll",c),()=>l.removeEventListener("scroll",c)}},[t.viewport,t.isPositioned]),r?(0,d.jsx)(Be,{...e,ref:n,onAutoScroll:p(()=>{const{viewport:c,selectedItem:l}=t;c&&l&&(c.scrollTop=c.scrollTop-l.offsetHeight)},"onAutoScroll")}):null},"SelectScrollUpButton2"),"SelectScrollUpButton")),je="SelectScrollDownButton",Zt=o.forwardRef(v(p(function(e,s){const t=oe(je,e.__scopeSelect),u=ye(je,e.__scopeSelect),[r,f]=o.useState(!1),n=U(s,u.onScrollButtonChange);return X(()=>{if(t.viewport&&t.isPositioned){let c=p(function(){const x=l.scrollHeight-l.clientHeight,I=Math.ceil(l.scrollTop)<x;f(I)},"handleScroll2");v(c,"handleScroll");const l=t.viewport;return c(),l.addEventListener("scroll",c),()=>l.removeEventListener("scroll",c)}},[t.viewport,t.isPositioned]),r?(0,d.jsx)(Be,{...e,ref:n,onAutoScroll:p(()=>{const{viewport:c,selectedItem:l}=t;c&&l&&(c.scrollTop=c.scrollTop+l.offsetHeight)},"onAutoScroll")}):null},"SelectScrollDownButton2"),"SelectScrollDownButton")),Be=o.forwardRef(v(p(function(e,s){const{__scopeSelect:t,onAutoScroll:u,...r}=e,f=oe("SelectScrollButton",t),n=o.useRef(null),c=he(t),l=o.useCallback(()=>{n.current!==null&&(window.clearInterval(n.current),n.current=null)},[]);return o.useEffect(()=>()=>l(),[l]),X(()=>{c().find(x=>x.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[c]),(0,d.jsx)(L.div,{"aria-hidden":!0,...r,ref:s,style:{flexShrink:0,...r.style},onPointerDown:E(r.onPointerDown,()=>{n.current===null&&(n.current=window.setInterval(u,50))}),onPointerMove:E(r.onPointerMove,()=>{f.onItemLeave?.(),n.current===null&&(n.current=window.setInterval(u,50))}),onPointerLeave:E(r.onPointerLeave,()=>{l()})})},"SelectScrollButtonImpl2"),"SelectScrollButtonImpl")),Jt=o.forwardRef(v(p(function(e,s){const{__scopeSelect:t,...u}=e;return(0,d.jsx)(L.div,{"aria-hidden":!0,...u,ref:s})},"SelectSeparator2"),"SelectSeparator")),jt="SelectBubbleInput",Nt=o.forwardRef(v(p(function({__scopeSelect:e,...s},t){const u=Z(jt,e),{value:r,onValueChange:f,required:n,disabled:c,name:l,autoComplete:x,form:I}=u,{nativeOptions:P,nativeSelectKey:_}=u,y=o.useRef(null),T=U(t,y),i=r??"",g=De(i),C=Array.from(P).some(m=>(m.props.value??"")==="");return o.useEffect(()=>{const m=y.current;if(!m)return;const h=window.HTMLSelectElement.prototype,N=Object.getOwnPropertyDescriptor(h,"value").set;if(g!==i&&N){const O=new Event("change",{bubbles:!0});N.call(m,i),m.dispatchEvent(O)}},[g,i]),(0,d.jsxs)(L.select,{"aria-hidden":!0,required:n,tabIndex:-1,name:l,autoComplete:x,disabled:c,form:I,onChange:p(m=>f(m.target.value),"onChange"),...s,style:{...ct,...s.style},ref:T,defaultValue:i,children:[de(r)&&!C?(0,d.jsx)("option",{value:""}):null,Array.from(P)]},_)},"SelectBubbleInput2"),"SelectBubbleInput"));function Ve(a){return typeof a=="function"}p(Ve,"isFunction");v(Ve,"isFunction");function de(a){return a===""||a===void 0}p(de,"shouldShowPlaceholder");v(de,"shouldShowPlaceholder");function _e(a){const e=Ie(a),s=o.useRef(""),t=o.useRef(0),u=o.useCallback(f=>{const n=s.current+f;e(n),v(p((function c(l){s.current=l,window.clearTimeout(t.current),l!==""&&(t.current=window.setTimeout(()=>c(""),1e3))}),"updateSearch"),"updateSearch")(n)},[e]),r=o.useCallback(()=>{s.current="",window.clearTimeout(t.current)},[]);return o.useEffect(()=>()=>window.clearTimeout(t.current),[]),[s,u,r]}p(_e,"useTypeaheadSearch");v(_e,"useTypeaheadSearch");function Te(a,e,s){const t=e.length>1&&Array.from(e).every(n=>n===e[0])?e[0]:e,u=s?a.indexOf(s):-1;let r=He(a,Math.max(u,0));t.length===1&&(r=r.filter(n=>n!==s));const f=r.find(n=>n.textValue.toLowerCase().startsWith(t.toLowerCase()));return f!==s?f:void 0}p(Te,"findNextItem");v(Te,"findNextItem");function He(a,e){return a.map((s,t)=>a[(e+t)%a.length])}p(He,"wrapArray");v(He,"wrapArray");export{zt as a,qt as c,Xt as d,Jt as f,ge as g,Kt as h,Ft as i,Ut as l,Ht as m,Wt as n,$t as o,Vt as p,Gt as r,Yt as s,Bt as t,Zt as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var me=Object.defineProperty;var l=(r,e)=>me(r,"name",{value:e,configurable:!0});import{i as ee}from"./rolldown-runtime-ZpX3ckPj.js";import{A as N,E as ve,F as z,Ha as Ie,L,M as q,O as ye,T as Ce,Wa as xe,j as Y,k as Re}from"./agent-avatar-url-B_lUFC64.js";var i=ee(xe(),1),S=ee(Ie(),1),Se=Object.defineProperty,ge=l((r,e)=>Se(r,"name",{value:e,configurable:!0}),"__name$4"),be=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Ee=i.forwardRef(ge(l(function(e,t){return(0,S.jsx)(q.span,{...e,ref:t,style:{...be,...e.style}})},"VisuallyHidden2"),"VisuallyHidden")),qe=Ee,_e=Object.defineProperty,x=l((r,e)=>_e(r,"name",{value:e,configurable:!0}),"__name$3");function te(r){const e=r+"CollectionProvider",[t,n]=Y(e),[o,c]=t(e,{collectionRef:{current:null},itemMap:new Map}),f=x(m=>{const{scope:v,children:I}=m,s=i.useRef(null),u=i.useRef(new Map).current;return(0,S.jsx)(o,{scope:v,itemMap:u,collectionRef:s,children:I})},"CollectionProvider");f.displayName=e;const d=r+"CollectionSlot",w=z(d),O=i.forwardRef((m,v)=>{const{scope:I,children:s}=m,u=c(d,I),a=L(v,u.collectionRef);return(0,S.jsx)(w,{ref:a,children:s})});O.displayName=d;const y=r+"CollectionItemSlot",p="data-radix-collection-item",_=z(y),h=i.forwardRef((m,v)=>{const{scope:I,children:s,...u}=m,a=i.useRef(null),g=L(v,a),b=c(y,I);return i.useEffect(()=>(b.itemMap.set(a,{ref:a,...u}),()=>{b.itemMap.delete(a)})),(0,S.jsx)(_,{[p]:"",ref:g,children:s})});h.displayName=y;function C(m){const v=c(r+"CollectionConsumer",m);return i.useCallback(()=>{const I=v.collectionRef.current;if(!I)return[];const s=Array.from(I.querySelectorAll(`[${p}]`));return Array.from(v.itemMap.values()).sort((u,a)=>s.indexOf(u.ref.current)-s.indexOf(a.ref.current))},[v.collectionRef,v.itemMap])}return l(C,"useCollection"),x(C,"useCollection"),[{Provider:f,Slot:O,ItemSlot:h},C,n]}l(te,"createCollection");x(te,"createCollection");var Z=new WeakMap,K=class D extends Map{static{l(this,"_OrderedDict")}static{x(this,"OrderedDict")}#e;constructor(e){super(e),this.#e=[...super.keys()],Z.set(this,!0)}set(e,t){return Z.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,n){const o=this.has(t),c=this.#e.length,f=W(e);let d=f>=0?f:c+f;const w=d<0||d>=c?-1:d;if(w===this.size||o&&w===this.size-1||w===-1)return this.set(t,n),this;const O=this.size+(o?0:1);f<0&&d++;const y=[...this.#e];let p,_=!1;for(let h=d;h<O;h++)if(d===h){let C=y[h];y[h]===t&&(C=y[h+1]),o&&this.delete(t),p=this.get(C),this.set(t,n)}else{!_&&y[h-1]===t&&(_=!0);const C=y[_?h:h-1],m=p;p=this.get(C),this.delete(C),this.set(C,m)}return this}with(e,t,n){const o=new D(this);return o.insert(e,t,n),o}before(e){const t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){const o=this.#e.indexOf(e);return o===-1?this:this.insert(o,t,n)}after(e){let t=this.#e.indexOf(e);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(e,t,n){const o=this.#e.indexOf(e);return o===-1?this:this.insert(o+1,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){const t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){const t=this.keyAt(e);return t!==void 0?this.delete(t):!1}at(e){const t=G(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){const t=G(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return G(this.#e,e)}from(e,t){const n=this.indexOf(e);if(n===-1)return;let o=n+t;return o<0&&(o=0),o>=this.size&&(o=this.size-1),this.at(o)}keyFrom(e,t){const n=this.indexOf(e);if(n===-1)return;let o=n+t;return o<0&&(o=0),o>=this.size&&(o=this.size-1),this.keyAt(o)}find(e,t){let n=0;for(const o of this){if(Reflect.apply(e,t,[o,n,this]))return o;n++}}findIndex(e,t){let n=0;for(const o of this){if(Reflect.apply(e,t,[o,n,this]))return n;n++}return-1}filter(e,t){const n=[];let o=0;for(const c of this)Reflect.apply(e,t,[c,o,this])&&n.push(c),o++;return new D(n)}map(e,t){const n=[];let o=0;for(const c of this)n.push([c[0],Reflect.apply(e,t,[c,o,this])]),o++;return new D(n)}reduce(...e){const[t,n]=e;let o=0,c=n??this.at(0);for(const f of this)o===0&&e.length===1?c=f:c=Reflect.apply(t,this,[c,f,o,this]),o++;return c}reduceRight(...e){const[t,n]=e;let o=n??this.at(-1);for(let c=this.size-1;c>=0;c--){const f=this.at(c);c===this.size-1&&e.length===1?o=f:o=Reflect.apply(t,this,[o,f,c,this])}return o}toSorted(e){const t=[...this.entries()].sort(e);return new D(t)}toReversed(){const e=new D;for(let t=this.size-1;t>=0;t--){const n=this.keyAt(t),o=this.get(n);e.set(n,o)}return e}toSpliced(...e){const t=[...this.entries()];return t.splice(...e),new D(t)}slice(e,t){const n=new D;let o=this.size-1;if(e===void 0)return n;e<0&&(e=e+this.size),t!==void 0&&t>0&&(o=t-1);for(let c=e;c<=o;c++){const f=this.keyAt(c),d=this.get(f);n.set(f,d)}return n}every(e,t){let n=0;for(const o of this){if(!Reflect.apply(e,t,[o,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(const o of this){if(Reflect.apply(e,t,[o,n,this]))return!0;n++}return!1}};function G(r,e){if("at"in Array.prototype)return Array.prototype.at.call(r,e);const t=oe(r,e);return t===-1?void 0:r[t]}l(G,"at");x(G,"at");function oe(r,e){const t=r.length,n=W(e),o=n>=0?n:t+n;return o<0||o>=t?-1:o}l(oe,"toSafeIndex");x(oe,"toSafeIndex");function W(r){return r!==r||r===0?0:Math.trunc(r)}l(W,"toSafeInteger");x(W,"toSafeInteger");function we(r){const e=r+"CollectionProvider",[t,n]=Y(e),[o,c]=t(e,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new K,setItemMap:x(()=>{},"setItemMap")}),f=x(({state:s,...u})=>s?(0,S.jsx)(w,{...u,state:s}):(0,S.jsx)(d,{...u}),"CollectionProvider");f.displayName=e;const d=x(s=>{const u=v();return(0,S.jsx)(w,{...s,state:u})},"CollectionInit");d.displayName=e+"Init";const w=x(s=>{const{scope:u,children:a,state:g}=s,b=i.useRef(null),[A,E]=i.useState(null),R=L(b,E),[k,M]=g;return i.useEffect(()=>{if(!A)return;const F=se(()=>{});return F.observe(A,{childList:!0,subtree:!0}),()=>{F.disconnect()}},[A]),(0,S.jsx)(o,{scope:u,itemMap:k,setItemMap:M,collectionRef:R,collectionRefObject:b,collectionElement:A,children:a})},"CollectionProviderImpl");w.displayName=e+"Impl";const O=r+"CollectionSlot",y=z(O),p=i.forwardRef((s,u)=>{const{scope:a,children:g}=s,b=c(O,a),A=L(u,b.collectionRef);return(0,S.jsx)(y,{ref:A,children:g})});p.displayName=O;const _=r+"CollectionItemSlot",h="data-radix-collection-item",C=z(_),m=i.forwardRef((s,u)=>{const{scope:a,children:g,...b}=s,A=i.useRef(null),[E,R]=i.useState(null),k=L(u,A,R),{setItemMap:M}=c(_,a),F=i.useRef(b);ne(F.current,b)||(F.current=b);const T=F.current;return i.useEffect(()=>{const X=T;return M(P=>E?P.has(E)?P.set(E,{...X,element:E}).toSorted($):(P.set(E,{...X,element:E}),P.toSorted($)):P),()=>{M(P=>!E||!P.has(E)?P:(P.delete(E),new K(P)))}},[E,T,M]),(0,S.jsx)(C,{[h]:"",ref:k,children:g})});m.displayName=_;function v(){return i.useState(new K)}l(v,"useInitCollection"),x(v,"useInitCollection");function I(s){const{itemMap:u}=c(r+"CollectionConsumer",s);return u}return l(I,"useCollection"),x(I,"useCollection"),[{Provider:f,Slot:p,ItemSlot:m},{createCollectionScope:n,useCollection:I,useInitCollection:v}]}l(we,"createCollection2");x(we,"createCollection");function ne(r,e){if(r===e)return!0;if(typeof r!="object"||typeof e!="object"||r==null||e==null)return!1;const t=Object.keys(r),n=Object.keys(e);if(t.length!==n.length)return!1;for(const o of t)if(!Object.prototype.hasOwnProperty.call(e,o)||r[o]!==e[o])return!1;return!0}l(ne,"shallowEqual");x(ne,"shallowEqual");function re(r,e){return!!(e.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_PRECEDING)}l(re,"isElementPreceding");x(re,"isElementPreceding");function $(r,e){return!r[1].element||!e[1].element?0:re(r[1].element,e[1].element)?-1:1}l($,"sortByDocumentPosition");x($,"sortByDocumentPosition");function se(r){return new MutationObserver(e=>{for(const t of e)if(t.type==="childList"){r();return}})}l(se,"getChildListObserver");x(se,"getChildListObserver");var Oe=Object.defineProperty,Ae=l((r,e)=>Oe(r,"name",{value:e,configurable:!0}),"__name$2"),Fe=i.createContext(void 0);function ie(r){const e=i.useContext(Fe);return r||e||"ltr"}l(ie,"useDirection");Ae(ie,"useDirection");var Te=Object.defineProperty,J=l((r,e)=>Te(r,"name",{value:e,configurable:!0}),"__name$1"),V=!1;function ce(){const[r,e]=i.useState(V);return i.useEffect(()=>{V||(V=!0,e(!0))},[]),r}l(ce,"useIsHydrated");J(ce,"useIsHydrated");var le=i[" useSyncExternalStore ".trim().toString()];function ue(){return()=>{}}l(ue,"subscribe");J(ue,"subscribe");function ae(){return le(ue,()=>!0,()=>!1)}l(ae,"useIsHydratedModern");J(ae,"useIsHydratedModern");var Pe=typeof le=="function"?ae:ce,Me=Object.defineProperty,j=l((r,e)=>Me(r,"name",{value:e,configurable:!0}),"__name"),U="rovingFocusGroup.onEntryFocus",De={bubbles:!1,cancelable:!0},H="RovingFocusGroup",[B,fe,je]=te(H),[Ne,Ye]=Y(H,[je]),[Le,ke]=Ne(H),Ge=i.forwardRef(j(l(function(e,t){return(0,S.jsx)(B.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,S.jsx)(B.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,S.jsx)(ze,{...e,ref:t})})})},"RovingFocusGroup2"),"RovingFocusGroup")),ze=i.forwardRef(j(l(function(e,t){const{__scopeRovingFocusGroup:n,orientation:o,loop:c=!1,dir:f,currentTabStopId:d,defaultCurrentTabStopId:w,onCurrentTabStopIdChange:O,onEntryFocus:y,preventScrollOnEntryFocus:p=!1,..._}=e,h=i.useRef(null),C=L(t,h),m=ie(f),[v,I]=ye({prop:d,defaultProp:w??null,onChange:O,caller:H}),[s,u]=i.useState(!1),a=Ce(y),g=fe(n),b=i.useRef(!1),[A,E]=i.useState(0);return i.useEffect(()=>{const R=h.current;if(R)return R.addEventListener(U,a),()=>R.removeEventListener(U,a)},[a]),(0,S.jsx)(Le,{scope:n,orientation:o,dir:m,loop:c,currentTabStopId:v,onItemFocus:i.useCallback(R=>I(R),[I]),onItemShiftTab:i.useCallback(()=>u(!0),[]),onFocusableItemAdd:i.useCallback(()=>E(R=>R+1),[]),onFocusableItemRemove:i.useCallback(()=>E(R=>R-1),[]),children:(0,S.jsx)(q.div,{tabIndex:s||A===0?-1:0,"data-orientation":o,..._,ref:C,style:{outline:"none",...e.style},onMouseDown:N(e.onMouseDown,()=>{b.current=!0}),onFocus:N(e.onFocus,R=>{const k=!b.current;if(R.target===R.currentTarget&&k&&!s){const M=new CustomEvent(U,De);if(R.currentTarget.dispatchEvent(M),!M.defaultPrevented){const F=g().filter(T=>T.focusable);Q([F.find(T=>T.active),F.find(T=>T.id===v),...F].filter(Boolean).map(T=>T.ref.current),p)}}b.current=!1}),onBlur:N(e.onBlur,()=>u(!1))})})},"RovingFocusGroupImpl2"),"RovingFocusGroupImpl")),He="RovingFocusGroupItem",Ke=i.forwardRef(j(l(function(e,t){const{__scopeRovingFocusGroup:n,focusable:o=!0,active:c=!1,tabStopId:f,children:d,...w}=e,O=ve(),y=f||O,p=ke(He,n),_=p.currentTabStopId===y,h=fe(n),{onFocusableItemAdd:C,onFocusableItemRemove:m,currentTabStopId:v}=p,I=Pe();return Re(()=>{if(!(!I||!o))return C(),()=>m()},[I,o,C,m]),i.useEffect(()=>{if(!(I||!o))return C(),()=>m()},[I,o,C,m]),(0,S.jsx)(B.ItemSlot,{scope:n,id:y,focusable:o,active:c,children:(0,S.jsx)(q.span,{tabIndex:_?0:-1,"data-orientation":p.orientation,...w,ref:t,onMouseDown:N(e.onMouseDown,s=>{o?p.onItemFocus(y):s.preventDefault()}),onFocus:N(e.onFocus,()=>p.onItemFocus(y)),onKeyDown:N(e.onKeyDown,s=>{if(s.key==="Tab"&&s.shiftKey){p.onItemShiftTab();return}if(s.target!==s.currentTarget)return;const u=pe(s,p.orientation,p.dir);if(u!==void 0){if(s.metaKey||s.ctrlKey||s.altKey||s.shiftKey)return;s.preventDefault();let a=h().filter(g=>g.focusable).map(g=>g.ref.current);if(u==="last")a.reverse();else if(u==="prev"||u==="next"){u==="prev"&&a.reverse();const g=a.indexOf(s.currentTarget);a=p.loop?he(a,g+1):a.slice(g+1)}setTimeout(()=>Q(a))}}),children:typeof d=="function"?d({isCurrentTabStop:_,hasTabStop:v!=null}):d})})},"RovingFocusGroupItem2"),"RovingFocusGroupItem")),Ve={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function de(r,e){return e!=="rtl"?r:r==="ArrowLeft"?"ArrowRight":r==="ArrowRight"?"ArrowLeft":r}l(de,"getDirectionAwareKey");j(de,"getDirectionAwareKey");function pe(r,e,t){const n=de(r.key,t);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return Ve[n]}l(pe,"getFocusIntent");j(pe,"getFocusIntent");function Q(r,e=!1){const t=document.activeElement;for(const n of r)if(n===t||(n.focus({preventScroll:e}),document.activeElement!==t))return}l(Q,"focusFirst");j(Q,"focusFirst");function he(r,e){return r.map((t,n)=>r[(e+n)%r.length])}l(he,"wrapArray");j(he,"wrapArray");var We=Ge,Je=Ke;export{te as a,ie as i,We as n,qe as o,Ye as r,be as s,Je as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var I=Object.defineProperty;var t=(e,s)=>I(e,"name",{value:s,configurable:!0});import{i as R}from"./rolldown-runtime-ZpX3ckPj.js";import{Ha as E,Ji as n,Wa as T}from"./agent-avatar-url-B_lUFC64.js";var a=R(T(),1),L=R(E(),1),w=(0,a.createContext)(null),k=768;function q({children:e}){const[s,o]=(0,a.useState)(()=>window.innerWidth<k),[c,m]=(0,a.useState)(()=>window.innerWidth>=k),[l,u]=(0,a.useState)(!1),[p,g]=(0,a.useState)(!1);(0,a.useEffect)(()=>{const r=window.matchMedia("(max-width: 767px)"),C=t(x=>{o(x.matches),m(!x.matches)},"onChange");return r.addEventListener("change",C),()=>r.removeEventListener("change",C)},[]);const d=!1,v=!1,$=!1,b=(0,a.useCallback)(r=>{},[]),S=(0,a.useCallback)(()=>{},[]),f=(0,a.useCallback)(r=>{},[]),h=(0,a.useCallback)(()=>m(r=>!r),[]),_=(0,a.useMemo)(()=>({sidebarOpen:c,setSidebarOpen:m,toggleSidebar:h,isMobile:s,collapsed:d,setCollapsed:b,toggleCollapsed:S,collapseLocked:v,peeking:$,setPeeking:f,forceCollapsed:p,setForceCollapsed:g,routeRequestsCollapsed:l,setRouteRequestsCollapsed:u}),[c,m,h,s,d,b,S,v,$,f,p,g,l,u]);return(0,L.jsx)(w.Provider,{value:_,children:e})}t(q,"SidebarProvider");function B(){const e=(0,a.useContext)(w);if(!e)throw new Error("useSidebar must be used within SidebarProvider");return e}t(B,"useSidebar");var O={get:t(()=>n.get("/instance/settings"),"get"),update:t(e=>n.patch("/instance/settings",e),"update"),getGeneral:t(()=>n.get("/instance/settings/general"),"getGeneral"),updateGeneral:t(e=>n.patch("/instance/settings/general",e),"updateGeneral"),getLocalRunLimits:t(()=>n.get("/instance/settings/local-run-limits"),"getLocalRunLimits"),getExperimental:t(()=>n.get("/instance/settings/experimental"),"getExperimental"),updateExperimental:t(e=>n.patch("/instance/settings/experimental",e),"updateExperimental"),getAttachmentRetention:t(()=>n.get("/instance/attachment-retention",{cache:"no-store"}),"getAttachmentRetention"),previewAttachmentRetention:t(e=>n.post("/instance/attachment-retention/preview",e?{settings:e}:{}),"previewAttachmentRetention"),runAttachmentRetention:t(()=>n.post("/instance/attachment-retention/run",{}),"runAttachmentRetention")};function i(e){return`companyId=${encodeURIComponent(e)}`}t(i,"companyIdQuery");var j={list:t(e=>n.get(`/companies/${e}/environments`),"list"),capabilities:t(e=>n.get(`/companies/${e}/environments/capabilities`),"capabilities"),lease:t(e=>n.get(`/environment-leases/${e}`),"lease"),secretRefs:t(e=>n.get(`/environments/${e}/secret-refs`),"secretRefs"),deleteBlastRadius:t(e=>n.get(`/environments/${e}/delete-blast-radius`),"deleteBlastRadius"),remove:t((e,s={})=>n.delete(s.destroyReusableSandboxLeases?`/environments/${e}?destroyReusableSandboxLeases=true`:`/environments/${e}`),"remove"),create:t((e,s)=>n.post(`/companies/${e}/environments`,s),"create"),update:t((e,s,o)=>n.patch(o?`/environments/${e}?${i(o)}`:`/environments/${e}`,s),"update"),probe:t((e,s)=>n.post(s?`/environments/${e}/probe?${i(s)}`:`/environments/${e}/probe`,{}),"probe"),probeConfig:t((e,s)=>n.post(`/companies/${e}/environments/probe-config`,s),"probeConfig"),customImageTemplate:t((e,s)=>n.get(`/environments/${e}/custom-image-template?${i(s)}`),"customImageTemplate"),startCustomImageSetupSession:t((e,s,o={})=>n.post(`/environments/${e}/custom-image-setup-sessions?${i(s)}`,o),"startCustomImageSetupSession"),customImageSetupSession:t(e=>n.get(`/environment-custom-image-setup-sessions/${e}`),"customImageSetupSession"),createCustomImageTerminalSessionToken:t((e,s={})=>n.post(`/environment-custom-image-setup-sessions/${e}/terminal-session-token`,s),"createCustomImageTerminalSessionToken"),finishCustomImageSetupSession:t((e,s={})=>n.post(`/environment-custom-image-setup-sessions/${e}/finish`,s),"finishCustomImageSetupSession"),cancelCustomImageSetupSession:t((e,s={})=>n.post(`/environment-custom-image-setup-sessions/${e}/cancel`,s),"cancelCustomImageSetupSession"),rollbackCustomImageTemplate:t((e,s)=>n.post(`/environments/${e}/custom-image-template/rollback?${i(s)}`,{}),"rollbackCustomImageTemplate"),relinkCustomImageTemplate:t((e,s,o={})=>n.post(`/environments/${e}/custom-image-template/relink?${i(s)}`,{confirmBootSourceDrift:o.confirmBootSourceDrift===!0}),"relinkCustomImageTemplate"),disableCustomImageTemplate:t((e,s,o={})=>n.delete(`/environments/${e}/custom-image-template?${i(s)}&deleteProviderTemplate=${o.deleteProviderTemplate===!0?"true":"false"}`),"disableCustomImageTemplate")};export{B as i,O as n,q as r,j as t};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
var on=Object.defineProperty;var a=(e,t)=>on(e,"name",{value:t,configurable:!0});import{i as He}from"./rolldown-runtime-ZpX3ckPj.js";import{A as sn,Ca as Ye,D as an,Da as ln,E as un,Ea as vt,G as T,Ha as cn,Ia as Pe,L as dn,M as Ce,Ma as Ze,Na as V,O as fn,Oa as Je,Pa as et,Ra as pn,Ta as mn,Ua as hn,Wa as vn,_ as gn,ba as yn,j as bn,ja as tt,k as En,ka as gt,n as Oe,v as xn,va as wn,wa as F}from"./agent-avatar-url-B_lUFC64.js";import{Bt as Cn,Gt as On,Ht as Sn,i as Dn,it as Nn}from"./BreadcrumbContext-c2KosyR8.js";import{Z as yt}from"./mention-chips--Lp_ENqh.js";import{c as Rn}from"./dist-BXR8yTPD.js";import{a as Pn,c as _n,o as In,r as An,u as Mn}from"./checkbox-Ds_3QqBB.js";import{t as Tn}from"./check-C7890FPo.js";var kn=class extends vt{static{a(this,"MutationCache")}#e;#t;#n;constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}build(e,t,n){const r=new wn({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);const t=ye(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=ye(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const r=n.indexOf(e);r!==-1&&n.splice(r,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=ye(e);if(typeof t=="string"){const n=this.#t.get(t)?.find(r=>r.state.status==="pending");return!n||n===e}else return!0}runNext(e){const t=ye(e);return typeof t=="string"?this.#t.get(t)?.find(n=>n!==e&&n.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){F.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>tt(t,n))}findAll(e={}){return this.getAll().filter(t=>tt(e,t))}notify(e){F.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return F.batch(()=>Promise.all(e.map(t=>t.continue().catch(V))))}};function ye(e){return e.options.scope?.id}a(ye,"scopeFor");var jn=class extends vt{static{a(this,"QueryCache")}#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,n){const r=t.queryKey,o=t.queryHash??gt(r,t);let s=this.get(o);return s||(s=new yn({client:e,queryKey:r,queryHash:o,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(s)),s}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){F.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>Ze(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>Ze(e,n)):t}notify(e){F.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){F.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){F.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Wo=class{static{a(this,"QueryClient")}#e;#t;#n;#o;#s;#r;#i;#a;constructor(e={}){this.#e=e.queryCache||new jn,this.#t=e.mutationCache||new kn,this.#n=e.defaultOptions||{},this.#o=new Map,this.#s=new Map,this.#r=0}mount(){this.#r++,this.#r===1&&(this.#i=mn.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#a=Ye.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#r--,this.#r===0&&(this.#i?.(),this.#i=void 0,this.#a?.(),this.#a=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Pe(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>[t,n.data])}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=this.#e.get(r.queryHash)?.state.data,s=ln(t,o);if(s!==void 0)return this.#e.build(this,r).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return F.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;F.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return F.batch(()=>{const r=n.findAll(e),o=new Set(r);return r.forEach(s=>{s.reset()}),this.refetchQueries({type:"active",predicate:a(s=>o.has(s),"predicate")},t)})}cancelQueries(e,t={}){const n={revert:!0,...t},r=F.batch(()=>this.#e.findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(V).catch(V)}invalidateQueries(e,t={}){return F.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=F.batch(()=>this.#e.findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let s=o.fetch(void 0,n);return n.throwOnError||(s=s.catch(V)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(V)}async query(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t),r=n.isStaleByTime(Pe(t.staleTime,n))?await n.fetch(t):n.state.data,o=t.select;return o?o(r):r}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(Pe(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(V).catch(V)}infiniteQuery(e){return e._type="infinite",this.query(e)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(V).catch(V)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Ye.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#o.set(Je(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#o.values()],n={};return t.forEach(r=>{et(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#s.set(Je(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#s.values()],n={};return t.forEach(r=>{et(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=gt(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===pn&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},i=He(vn(),1),d=He(cn(),1),Fn=Object.defineProperty,ve=a((e,t)=>Fn(e,"name",{value:t,configurable:!0}),"__name$1"),We="Collapsible",[Ln,Vo]=bn(We),[$n,Ve]=Ln(We),Qn=i.forwardRef(ve(a(function(t,n){const{__scopeCollapsible:r,open:o,defaultOpen:s,disabled:u,onOpenChange:l,...p}=t,[c,h]=fn({prop:o,defaultProp:s??!1,onChange:l,caller:We});return(0,d.jsx)($n,{scope:r,disabled:u,contentId:un(),open:c,onOpenToggle:i.useCallback(()=>h(y=>!y),[h]),children:(0,d.jsx)(Ce.div,{"data-state":Se(c),"data-disabled":u?"":void 0,...p,ref:n})})},"Collapsible2"),"Collapsible")),qn="CollapsibleTrigger",zn=i.forwardRef(ve(a(function(t,n){const{__scopeCollapsible:r,...o}=t,s=Ve(qn,r);return(0,d.jsx)(Ce.button,{type:"button","aria-controls":s.open?s.contentId:void 0,"aria-expanded":s.open||!1,"data-state":Se(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...o,ref:n,onClick:sn(t.onClick,s.onOpenToggle)})},"CollapsibleTrigger2"),"CollapsibleTrigger")),bt="CollapsibleContent",Un=i.forwardRef(ve(a(function(t,n){const{forceMount:r,...o}=t,s=Ve(bt,t.__scopeCollapsible);return(0,d.jsx)(an,{present:r||s.open,children:a(({present:u})=>(0,d.jsx)(Hn,{...o,ref:n,present:u}),"children")})},"CollapsibleContent2"),"CollapsibleContent")),Hn=i.forwardRef(ve(a(function(t,n){const{__scopeCollapsible:r,present:o,children:s,...u}=t,l=Ve(bt,r),[p,c]=i.useState(o),h=i.useRef(null),y=dn(n,h),E=i.useRef(0),x=E.current,N=i.useRef(0),C=N.current,O=l.open||p,I=i.useRef(O),_=i.useRef(void 0);return i.useEffect(()=>{const D=requestAnimationFrame(()=>I.current=!1);return()=>cancelAnimationFrame(D)},[]),En(()=>{const D=h.current;if(D){_.current=_.current||{transitionDuration:D.style.transitionDuration,animationName:D.style.animationName},D.style.transitionDuration="0s",D.style.animationName="none";const P=D.getBoundingClientRect();E.current=P.height,N.current=P.width,I.current||(D.style.transitionDuration=_.current.transitionDuration,D.style.animationName=_.current.animationName),c(o)}},[l.open,o]),(0,d.jsx)(Ce.div,{"data-state":Se(l.open),"data-disabled":l.disabled?"":void 0,id:l.contentId,hidden:!O,...u,ref:y,style:{"--radix-collapsible-content-height":x?`${x}px`:void 0,"--radix-collapsible-content-width":C?`${C}px`:void 0,...t.style},children:O&&s})},"CollapsibleContentImpl2"),"CollapsibleContentImpl"));function Se(e){return e?"open":"closed"}a(Se,"getState$1");ve(Se,"getState");var Wn=Qn,Vn=Object.defineProperty,Kn=a((e,t)=>Vn(e,"name",{value:t,configurable:!0}),"__name"),Bn=i.forwardRef(Kn(a(function(t,n){return(0,d.jsx)(Ce.label,{...t,ref:n,onMouseDown:a(r=>{r.target.closest("button, input, select, textarea")||(t.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())},"onMouseDown")})},"Label2"),"Label")),Gn=Bn,Et={name:"arrow-down",size:24,node:[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]};Et.node;var Ko=Oe(Et),xt={name:"arrow-up",size:24,node:[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]};xt.node;var Bo=Oe(xt),wt={name:"chevrons-up-down",size:24,node:[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]};wt.node;var Xn=Oe(wt),Ct={name:"play",size:24,node:[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]};Ct.node;var Go=Oe(Ct);function Xo({...e}){return(0,d.jsx)(Wn,{"data-slot":"collapsible",...e})}a(Xo,"Collapsible");function Yo({...e}){return(0,d.jsx)(zn,{"data-slot":"collapsible-trigger",...e})}a(Yo,"CollapsibleTrigger");function Zo({...e}){return(0,d.jsx)(Un,{"data-slot":"collapsible-content",...e})}a(Zo,"CollapsibleContent");var nt=1,Yn=.9,Zn=.8,Jn=.17,_e=.1,Ie=.999,er=.9999,tr=.99,nr=/[\\\/_+.#"@\[\(\{&]/,rr=/[\\\/_+.#"@\[\(\{&]/g,or=/[\s-]/,Ot=/[\s-]/g;function Le(e,t,n,r,o,s,u){if(s===t.length)return o===e.length?nt:tr;var l=`${o},${s}`;if(u[l]!==void 0)return u[l];for(var p=r.charAt(s),c=n.indexOf(p,o),h=0,y,E,x,N;c>=0;)y=Le(e,t,n,r,c+1,s+1,u),y>h&&(c===o?y*=nt:nr.test(e.charAt(c-1))?(y*=Zn,x=e.slice(o,c-1).match(rr),x&&o>0&&(y*=Math.pow(Ie,x.length))):or.test(e.charAt(c-1))?(y*=Yn,N=e.slice(o,c-1).match(Ot),N&&o>0&&(y*=Math.pow(Ie,N.length))):(y*=Jn,o>0&&(y*=Math.pow(Ie,c-o))),e.charAt(c)!==t.charAt(s)&&(y*=er)),(y<_e&&n.charAt(c-1)===r.charAt(s+1)||r.charAt(s+1)===r.charAt(s)&&n.charAt(c-1)!==r.charAt(s))&&(E=Le(e,t,n,r,c+1,s+2,u),E*_e>y&&(y=E*_e)),y>h&&(h=y),c=n.indexOf(p,c+1);return u[l]=h,h}a(Le,"G");function rt(e){return e.toLowerCase().replace(Ot," ")}a(rt,"D");function sr(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,Le(e,t,rt(e),rt(t),0,0,{})}a(sr,"W");var Jo=!!(typeof window<"u"&&window.document&&window.document.createElement);function Z(e,t,{checkForDefaultPrevented:n=!0}={}){return a(function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)},"handleEvent")}a(Z,"composeEventHandlers");function ot(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}a(ot,"setRef");function te(...e){return t=>{let n=!1;const r=e.map(o=>{const s=ot(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():ot(e[o],null)}}}}a(te,"composeRefs");function oe(...e){return i.useCallback(te(...e),e)}a(oe,"useComposedRefs");function ir(e,t){const n=i.createContext(t),r=a(s=>{const{children:u,...l}=s,p=i.useMemo(()=>l,Object.values(l));return(0,d.jsx)(n.Provider,{value:p,children:u})},"Provider");r.displayName=e+"Provider";function o(s){const u=i.useContext(n);if(u)return u;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return a(o,"useContext2"),[r,o]}a(ir,"createContext2");function ar(e,t=[]){let n=[];function r(s,u){const l=i.createContext(u),p=n.length;n=[...n,u];const c=a(y=>{const{scope:E,children:x,...N}=y,C=E?.[e]?.[p]||l,O=i.useMemo(()=>N,Object.values(N));return(0,d.jsx)(C.Provider,{value:O,children:x})},"Provider");c.displayName=s+"Provider";function h(y,E){const x=E?.[e]?.[p]||l,N=i.useContext(x);if(N)return N;if(u!==void 0)return u;throw new Error(`\`${y}\` must be used within \`${s}\``)}return a(h,"useContext2"),[c,h]}a(r,"createContext3");const o=a(()=>{const s=n.map(u=>i.createContext(u));return a(function(l){const p=l?.[e]||s;return i.useMemo(()=>({[`__scope${e}`]:{...l,[e]:p}}),[l,p])},"useScope")},"createScope");return o.scopeName=e,[r,lr(o,...t)]}a(ar,"createContextScope");function lr(...e){const t=e[0];if(e.length===1)return t;const n=a(()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return a(function(s){const u=r.reduce((l,{useScope:p,scopeName:c})=>{const h=p(s)[`__scope${c}`];return{...l,...h}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])},"useComposedScopes")},"createScope");return n.scopeName=t.scopeName,n}a(lr,"composeContextScopes");var me=globalThis?.document?i.useLayoutEffect:()=>{},ur=i[" useId ".trim().toString()]||(()=>{}),cr=0;function K(e){const[t,n]=i.useState(ur());return me(()=>{e||n(r=>r??String(cr++))},[e]),e||(t?`radix-${t}`:"")}a(K,"useId");var dr=i[" useInsertionEffect ".trim().toString()]||me;function fr({prop:e,defaultProp:t,onChange:n=a(()=>{},"onChange"),caller:r}){const[o,s,u]=pr({defaultProp:t,onChange:n}),l=e!==void 0,p=l?e:o;{const c=i.useRef(e!==void 0);i.useEffect(()=>{const h=c.current;c.current=l},[l,r])}return[p,i.useCallback(c=>{if(l){const h=mr(c)?c(e):c;h!==e&&u.current?.(h)}else s(c)},[l,e,s,u])]}a(fr,"useControllableState");function pr({defaultProp:e,onChange:t}){const[n,r]=i.useState(e),o=i.useRef(n),s=i.useRef(t);return dr(()=>{s.current=t},[t]),i.useEffect(()=>{o.current!==n&&(s.current?.(n),o.current=n)},[n,o]),[n,r,s]}a(pr,"useUncontrolledState");function mr(e){return typeof e=="function"}a(mr,"isFunction");var St=He(hn(),1);function Dt(e){const t=hr(e),n=i.forwardRef((r,o)=>{const{children:s,...u}=r,l=i.Children.toArray(s),p=l.find(gr);if(p){const c=p.props.children,h=l.map(y=>y===p?i.Children.count(c)>1?i.Children.only(null):i.isValidElement(c)?c.props.children:null:y);return(0,d.jsx)(t,{...u,ref:o,children:i.isValidElement(c)?i.cloneElement(c,void 0,h):null})}return(0,d.jsx)(t,{...u,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}a(Dt,"createSlot");function hr(e){const t=i.forwardRef((n,r)=>{const{children:o,...s}=n;if(i.isValidElement(o)){const u=br(o),l=yr(s,o.props);return o.type!==i.Fragment&&(l.ref=r?te(r,u):u),i.cloneElement(o,l)}return i.Children.count(o)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}a(hr,"createSlotClone");var vr=Symbol("radix.slottable");function gr(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===vr}a(gr,"isSlottable");function yr(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...u)=>{const l=s(...u);return o(...u),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}a(yr,"mergeProps");function br(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}a(br,"getElementRef$1");var M=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{const n=Dt(`Primitive.${t}`),r=i.forwardRef((o,s)=>{const{asChild:u,...l}=o,p=u?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,d.jsx)(p,{...l,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Er(e,t){e&&St.flushSync(()=>e.dispatchEvent(t))}a(Er,"dispatchDiscreteCustomEvent");function he(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...n)=>t.current?.(...n),[])}a(he,"useCallbackRef");function xr(e,t=globalThis?.document){const n=he(e);i.useEffect(()=>{const r=a(o=>{o.key==="Escape"&&n(o)},"handleKeyDown");return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}a(xr,"useEscapeKeydown");var wr="DismissableLayer",$e="dismissableLayer.update",Cr="dismissableLayer.pointerDownOutside",Or="dismissableLayer.focusOutside",st,Nt=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Rt=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:u,onDismiss:l,...p}=e,c=i.useContext(Nt),[h,y]=i.useState(null),E=h?.ownerDocument??globalThis?.document,[,x]=i.useState({}),N=oe(t,w=>y(w)),C=Array.from(c.layers),[O]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),I=C.indexOf(O),_=h?C.indexOf(h):-1,D=c.layersWithOutsidePointerEventsDisabled.size>0,P=_>=I,Q=Nr(w=>{const H=w.target,L=[...c.branches].some(U=>U.contains(H));!P||L||(o?.(w),u?.(w),w.defaultPrevented||l?.())},E),R=Rr(w=>{const H=w.target;[...c.branches].some(L=>L.contains(H))||(s?.(w),u?.(w),w.defaultPrevented||l?.())},E);return xr(w=>{_===c.layers.size-1&&(r?.(w),!w.defaultPrevented&&l&&(w.preventDefault(),l()))},E),i.useEffect(()=>{if(h)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(st=E.body.style.pointerEvents,E.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(h)),c.layers.add(h),it(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(E.body.style.pointerEvents=st)}},[h,E,n,c]),i.useEffect(()=>()=>{h&&(c.layers.delete(h),c.layersWithOutsidePointerEventsDisabled.delete(h),it())},[h,c]),i.useEffect(()=>{const w=a(()=>x({}),"handleUpdate");return document.addEventListener($e,w),()=>document.removeEventListener($e,w)},[]),(0,d.jsx)(M.div,{...p,ref:N,style:{pointerEvents:D?P?"auto":"none":void 0,...e.style},onFocusCapture:Z(e.onFocusCapture,R.onFocusCapture),onBlurCapture:Z(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:Z(e.onPointerDownCapture,Q.onPointerDownCapture)})});Rt.displayName=wr;var Sr="DismissableLayerBranch",Dr=i.forwardRef((e,t)=>{const n=i.useContext(Nt),r=i.useRef(null),o=oe(t,r);return i.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),(0,d.jsx)(M.div,{...e,ref:o})});Dr.displayName=Sr;function Nr(e,t=globalThis?.document){const n=he(e),r=i.useRef(!1),o=i.useRef(()=>{});return i.useEffect(()=>{const s=a(l=>{if(l.target&&!r.current){let p=a(function(){Pt(Cr,n,c,{discrete:!0})},"handleAndDispatchPointerDownOutsideEvent2");const c={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=p,t.addEventListener("click",o.current,{once:!0})):p()}else t.removeEventListener("click",o.current);r.current=!1},"handlePointerDown"),u=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(u),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:a(()=>r.current=!0,"onPointerDownCapture")}}a(Nr,"usePointerDownOutside");function Rr(e,t=globalThis?.document){const n=he(e),r=i.useRef(!1);return i.useEffect(()=>{const o=a(s=>{s.target&&!r.current&&Pt(Or,n,{originalEvent:s},{discrete:!1})},"handleFocus");return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:a(()=>r.current=!0,"onFocusCapture"),onBlurCapture:a(()=>r.current=!1,"onBlurCapture")}}a(Rr,"useFocusOutside");function it(){const e=new CustomEvent($e);document.dispatchEvent(e)}a(it,"dispatchUpdate");function Pt(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Er(o,s):o.dispatchEvent(s)}a(Pt,"handleAndDispatchCustomEvent");var Ae="focusScope.autoFocusOnMount",Me="focusScope.autoFocusOnUnmount",at={bubbles:!1,cancelable:!0},Pr="FocusScope",_t=i.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...u}=e,[l,p]=i.useState(null),c=he(o),h=he(s),y=i.useRef(null),E=oe(t,C=>p(C)),x=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(r){let C=a(function(D){if(x.paused||!l)return;const P=D.target;l.contains(P)?y.current=P:Y(y.current,{select:!0})},"handleFocusIn2"),O=a(function(D){if(x.paused||!l)return;const P=D.relatedTarget;P!==null&&(l.contains(P)||Y(y.current,{select:!0}))},"handleFocusOut2"),I=a(function(D){if(document.activeElement===document.body)for(const P of D)P.removedNodes.length>0&&Y(l)},"handleMutations2");document.addEventListener("focusin",C),document.addEventListener("focusout",O);const _=new MutationObserver(I);return l&&_.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",C),document.removeEventListener("focusout",O),_.disconnect()}}},[r,l,x.paused]),i.useEffect(()=>{if(l){ut.add(x);const C=document.activeElement;if(!l.contains(C)){const O=new CustomEvent(Ae,at);l.addEventListener(Ae,c),l.dispatchEvent(O),O.defaultPrevented||(_r(kr(It(l)),{select:!0}),document.activeElement===C&&Y(l))}return()=>{l.removeEventListener(Ae,c),setTimeout(()=>{const O=new CustomEvent(Me,at);l.addEventListener(Me,h),l.dispatchEvent(O),O.defaultPrevented||Y(C??document.body,{select:!0}),l.removeEventListener(Me,h),ut.remove(x)},0)}}},[l,c,h,x]);const N=i.useCallback(C=>{if(!n&&!r||x.paused)return;const O=C.key==="Tab"&&!C.altKey&&!C.ctrlKey&&!C.metaKey,I=document.activeElement;if(O&&I){const _=C.currentTarget,[D,P]=Ir(_);D&&P?!C.shiftKey&&I===P?(C.preventDefault(),n&&Y(D,{select:!0})):C.shiftKey&&I===D&&(C.preventDefault(),n&&Y(P,{select:!0})):I===_&&C.preventDefault()}},[n,r,x.paused]);return(0,d.jsx)(M.div,{tabIndex:-1,...u,ref:E,onKeyDown:N})});_t.displayName=Pr;function _r(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Y(r,{select:t}),document.activeElement!==n)return}a(_r,"focusFirst");function Ir(e){const t=It(e);return[lt(t,e),lt(t.reverse(),e)]}a(Ir,"getTabbableEdges");function It(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:a(r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;n.nextNode();)t.push(n.currentNode);return t}a(It,"getTabbableCandidates");function lt(e,t){for(const n of e)if(!Ar(n,{upTo:t}))return n}a(lt,"findVisible");function Ar(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}a(Ar,"isHidden");function Mr(e){return e instanceof HTMLInputElement&&"select"in e}a(Mr,"isSelectableInput");function Y(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Mr(e)&&t&&e.select()}}a(Y,"focus");var ut=Tr();function Tr(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=ct(e,t),e.unshift(t)},remove(t){e=ct(e,t),e[0]?.resume()}}}a(Tr,"createFocusScopesStack");function ct(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}a(ct,"arrayRemove");function kr(e){return e.filter(t=>t.tagName!=="A")}a(kr,"removeLinks");var jr="Portal",At=i.forwardRef((e,t)=>{const{container:n,...r}=e,[o,s]=i.useState(!1);me(()=>s(!0),[]);const u=n||o&&globalThis?.document?.body;return u?St.createPortal((0,d.jsx)(M.div,{...r,ref:t}),u):null});At.displayName=jr;function Fr(e,t){return i.useReducer((n,r)=>t[n][r]??n,e)}a(Fr,"useStateMachine");var De=a(e=>{const{present:t,children:n}=e,r=Lr(t),o=typeof n=="function"?n({present:r.isPresent}):i.Children.only(n),s=oe(r.ref,$r(o));return typeof n=="function"||r.isPresent?i.cloneElement(o,{ref:s}):null},"Presence");De.displayName="Presence";function Lr(e){const[t,n]=i.useState(),r=i.useRef(null),o=i.useRef(e),s=i.useRef("none"),[u,l]=Fr(e?"mounted":"unmounted",{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const p=be(r.current);s.current=u==="mounted"?p:"none"},[u]),me(()=>{const p=r.current,c=o.current;if(c!==e){const h=s.current,y=be(p);e?l("MOUNT"):y==="none"||p?.display==="none"?l("UNMOUNT"):l(c&&h!==y?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),me(()=>{if(t){let p;const c=t.ownerDocument.defaultView??window,h=a(E=>{const x=be(r.current).includes(CSS.escape(E.animationName));if(E.target===t&&x&&(l("ANIMATION_END"),!o.current)){const N=t.style.animationFillMode;t.style.animationFillMode="forwards",p=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=N)})}},"handleAnimationEnd"),y=a(E=>{E.target===t&&(s.current=be(r.current))},"handleAnimationStart");return t.addEventListener("animationstart",y),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{c.clearTimeout(p),t.removeEventListener("animationstart",y),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:i.useCallback(p=>{r.current=p?getComputedStyle(p):null,n(p)},[])}}a(Lr,"usePresence");function be(e){return e?.animationName||"none"}a(be,"getAnimationName");function $r(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}a($r,"getElementRef");var Te=0;function Qr(){i.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??dt()),document.body.insertAdjacentElement("beforeend",e[1]??dt()),Te++,()=>{Te===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Te--}},[])}a(Qr,"useFocusGuards");function dt(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}a(dt,"createFocusGuard");var Ne="Dialog",[Mt,es]=ar(Ne),[qr,z]=Mt(Ne),Tt=a(e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:u=!0}=e,l=i.useRef(null),p=i.useRef(null),[c,h]=fr({prop:r,defaultProp:o??!1,onChange:s,caller:Ne});return(0,d.jsx)(qr,{scope:t,triggerRef:l,contentRef:p,contentId:K(),titleId:K(),descriptionId:K(),open:c,onOpenChange:h,onOpenToggle:i.useCallback(()=>h(y=>!y),[h]),modal:u,children:n})},"Dialog");Tt.displayName=Ne;var kt="DialogTrigger",zr=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=z(kt,n),s=oe(t,o.triggerRef);return(0,d.jsx)(M.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Ge(o.open),...r,ref:s,onClick:Z(e.onClick,o.onOpenToggle)})});zr.displayName=kt;var Ke="DialogPortal",[Ur,jt]=Mt(Ke,{forceMount:void 0}),Ft=a(e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=z(Ke,t);return(0,d.jsx)(Ur,{scope:t,forceMount:n,children:i.Children.map(r,u=>(0,d.jsx)(De,{present:n||s.open,children:(0,d.jsx)(At,{asChild:!0,container:o,children:u})}))})},"DialogPortal");Ft.displayName=Ke;var xe="DialogOverlay",Lt=i.forwardRef((e,t)=>{const n=jt(xe,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=z(xe,e.__scopeDialog);return s.modal?(0,d.jsx)(De,{present:r||s.open,children:(0,d.jsx)(Wr,{...o,ref:t})}):null});Lt.displayName=xe;var Hr=Dt("DialogOverlay.RemoveScroll"),Wr=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=z(xe,n);return(0,d.jsx)(xn,{as:Hr,allowPinchZoom:!0,shards:[o.contentRef],children:(0,d.jsx)(M.div,{"data-state":Ge(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),ne="DialogContent",$t=i.forwardRef((e,t)=>{const n=jt(ne,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=z(ne,e.__scopeDialog);return(0,d.jsx)(De,{present:r||s.open,children:s.modal?(0,d.jsx)(Vr,{...o,ref:t}):(0,d.jsx)(Kr,{...o,ref:t})})});$t.displayName=ne;var Vr=i.forwardRef((e,t)=>{const n=z(ne,e.__scopeDialog),r=i.useRef(null),o=oe(t,n.contentRef,r);return i.useEffect(()=>{const s=r.current;if(s)return gn(s)},[]),(0,d.jsx)(Qt,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Z(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Z(e.onPointerDownOutside,s=>{const u=s.detail.originalEvent,l=u.button===0&&u.ctrlKey===!0;(u.button===2||l)&&s.preventDefault()}),onFocusOutside:Z(e.onFocusOutside,s=>s.preventDefault())})}),Kr=i.forwardRef((e,t)=>{const n=z(ne,e.__scopeDialog),r=i.useRef(!1),o=i.useRef(!1);return(0,d.jsx)(Qt,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a(s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||n.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,o.current=!1},"onCloseAutoFocus"),onInteractOutside:a(s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const u=s.target;n.triggerRef.current?.contains(u)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()},"onInteractOutside")})}),Qt=i.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...u}=e,l=z(ne,n),p=i.useRef(null),c=oe(t,p);return Qr(),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(_t,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:(0,d.jsx)(Rt,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Ge(l.open),...u,ref:c,onDismiss:a(()=>l.onOpenChange(!1),"onDismiss")})}),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(Yr,{titleId:l.titleId}),(0,d.jsx)(Jr,{contentRef:p,descriptionId:l.descriptionId})]})]})}),Be="DialogTitle",Br=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=z(Be,n);return(0,d.jsx)(M.h2,{id:o.titleId,...r,ref:t})});Br.displayName=Be;var qt="DialogDescription",Gr=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=z(qt,n);return(0,d.jsx)(M.p,{id:o.descriptionId,...r,ref:t})});Gr.displayName=qt;var zt="DialogClose",Xr=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=z(zt,n);return(0,d.jsx)(M.button,{type:"button",...r,ref:t,onClick:Z(e.onClick,()=>o.onOpenChange(!1))})});Xr.displayName=zt;function Ge(e){return e?"open":"closed"}a(Ge,"getState");var Ut="DialogTitleWarning",[ts,Ht]=ir(Ut,{contentName:ne,titleName:Be,docsSlug:"dialog"}),Yr=a(({titleId:e})=>{const t=Ht(Ut),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
2
|
-
|
|
3
|
-
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
4
|
-
|
|
5
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return i.useEffect(()=>{e&&document.getElementById(e)},[n,e]),null},"TitleWarning"),Zr="DialogDescriptionWarning",Jr=a(({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Ht(Zr).contentName}}.`;return i.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");t&&r&&document.getElementById(t)},[n,e,t]),null},"DescriptionWarning"),eo=Tt,to=Ft,no=Lt,ro=$t,pe='[cmdk-group=""]',ke='[cmdk-group-items=""]',oo='[cmdk-group-heading=""]',Wt='[cmdk-item=""]',ft=`${Wt}:not([aria-disabled="true"])`,Qe="cmdk-item-select",ae="data-value",so=a((e,t,n)=>sr(e,t,n),"Re"),Vt=i.createContext(void 0),ge=a(()=>i.useContext(Vt),"K"),Kt=i.createContext(void 0),Xe=a(()=>i.useContext(Kt),"ee"),Bt=i.createContext(void 0),Gt=i.forwardRef((e,t)=>{let n=le(()=>{var f,m;return{search:"",value:(m=(f=e.value)!=null?f:e.defaultValue)!=null?m:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=le(()=>new Set),o=le(()=>new Map),s=le(()=>new Map),u=le(()=>new Set),l=Xt(e),{label:p,children:c,value:h,onValueChange:y,filter:E,shouldFilter:x,loop:N,disablePointerSelection:C=!1,vimBindings:O=!0,...I}=e,_=K(),D=K(),P=K(),Q=i.useRef(null),R=go();re(()=>{if(h!==void 0){let f=h.trim();n.current.value=f,w.emit()}},[h]),re(()=>{R(6,ie)},[]);let w=i.useMemo(()=>({subscribe:a(f=>(u.current.add(f),()=>u.current.delete(f)),"subscribe"),snapshot:a(()=>n.current,"snapshot"),setState:a((f,m,g)=>{var v,b,S,A;if(!Object.is(n.current[f],m)){if(n.current[f]=m,f==="search")k(),U(),R(1,ee);else if(f==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let j=document.getElementById(P);j?j.focus():(v=document.getElementById(_))==null||v.focus()}if(R(7,()=>{var j;n.current.selectedItemId=(j=B())==null?void 0:j.id,w.emit()}),g||R(5,ie),((b=l.current)==null?void 0:b.value)!==void 0){let j=m??"";(A=(S=l.current).onValueChange)==null||A.call(S,j);return}}w.emit()}},"setState"),emit:a(()=>{u.current.forEach(f=>f())},"emit")}),[]),H=i.useMemo(()=>({value:a((f,m,g)=>{var v;m!==((v=s.current.get(f))==null?void 0:v.value)&&(s.current.set(f,{value:m,keywords:g}),n.current.filtered.items.set(f,L(m,g)),R(2,()=>{U(),w.emit()}))},"value"),item:a((f,m)=>(r.current.add(f),m&&(o.current.has(m)?o.current.get(m).add(f):o.current.set(m,new Set([f]))),R(3,()=>{k(),U(),n.current.value||ee(),w.emit()}),()=>{s.current.delete(f),r.current.delete(f),n.current.filtered.items.delete(f);let g=B();R(4,()=>{k(),g?.getAttribute("id")===f&&ee(),w.emit()})}),"item"),group:a(f=>(o.current.has(f)||o.current.set(f,new Set),()=>{s.current.delete(f),o.current.delete(f)}),"group"),filter:a(()=>l.current.shouldFilter,"filter"),label:p||e["aria-label"],getDisablePointerSelection:a(()=>l.current.disablePointerSelection,"getDisablePointerSelection"),listId:_,inputId:P,labelId:D,listInnerRef:Q}),[]);function L(f,m){var g,v;let b=(v=(g=l.current)==null?void 0:g.filter)!=null?v:so;return f?b(f,n.current.search,m):0}a(L,"te");function U(){if(!n.current.search||l.current.shouldFilter===!1)return;let f=n.current.filtered.items,m=[];n.current.filtered.groups.forEach(v=>{let b=o.current.get(v),S=0;b.forEach(A=>{let j=f.get(A);S=Math.max(j,S)}),m.push([v,S])});let g=Q.current;W().sort((v,b)=>{var S,A;let j=v.getAttribute("id"),rn=b.getAttribute("id");return((S=f.get(rn))!=null?S:0)-((A=f.get(j))!=null?A:0)}).forEach(v=>{let b=v.closest(ke);b?b.appendChild(v.parentElement===b?v:v.closest(`${ke} > *`)):g.appendChild(v.parentElement===g?v:v.closest(`${ke} > *`))}),m.sort((v,b)=>b[1]-v[1]).forEach(v=>{var b;let S=(b=Q.current)==null?void 0:b.querySelector(`${pe}[${ae}="${encodeURIComponent(v[0])}"]`);S?.parentElement.appendChild(S)})}a(U,"z");function ee(){let f=W().find(g=>g.getAttribute("aria-disabled")!=="true"),m=f?.getAttribute(ae);w.setState("value",m||void 0)}a(ee,"W");function k(){var f,m,g,v;if(!n.current.search||l.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let b=0;for(let S of r.current){let A=L((m=(f=s.current.get(S))==null?void 0:f.value)!=null?m:"",(v=(g=s.current.get(S))==null?void 0:g.keywords)!=null?v:[]);n.current.filtered.items.set(S,A),A>0&&b++}for(let[S,A]of o.current)for(let j of A)if(n.current.filtered.items.get(j)>0){n.current.filtered.groups.add(S);break}n.current.filtered.count=b}a(k,"J");function ie(){var f,m,g;let v=B();v&&(((f=v.parentElement)==null?void 0:f.firstChild)===v&&((g=(m=v.closest(pe))==null?void 0:m.querySelector(oo))==null||g.scrollIntoView({block:"nearest"})),v.scrollIntoView({block:"nearest"}))}a(ie,"ne");function B(){var f;return(f=Q.current)==null?void 0:f.querySelector(`${Wt}[aria-selected="true"]`)}a(B,"M");function W(){var f;return Array.from(((f=Q.current)==null?void 0:f.querySelectorAll(ft))||[])}a(W,"V");function q(f){let m=W()[f];m&&w.setState("value",m.getAttribute(ae))}a(q,"X");function G(f){var m;let g=B(),v=W(),b=v.findIndex(A=>A===g),S=v[b+f];(m=l.current)!=null&&m.loop&&(S=b+f<0?v[v.length-1]:b+f===v.length?v[0]:v[b+f]),S&&w.setState("value",S.getAttribute(ae))}a(G,"Q");function ce(f){let m=B(),g=m?.closest(pe),v;for(;g&&!v;)g=f>0?ho(g,pe):vo(g,pe),v=g?.querySelector(ft);v?w.setState("value",v.getAttribute(ae)):G(f)}a(ce,"re");let de=a(()=>q(W().length-1),"oe"),fe=a(f=>{f.preventDefault(),f.metaKey?de():f.altKey?ce(1):G(1)},"ie"),X=a(f=>{f.preventDefault(),f.metaKey?q(0):f.altKey?ce(-1):G(-1)},"se");return i.createElement(M.div,{ref:t,tabIndex:-1,...I,"cmdk-root":"",onKeyDown:a(f=>{var m;(m=I.onKeyDown)==null||m.call(I,f);let g=f.nativeEvent.isComposing||f.keyCode===229;if(!(f.defaultPrevented||g))switch(f.key){case"n":case"j":O&&f.ctrlKey&&fe(f);break;case"ArrowDown":fe(f);break;case"p":case"k":O&&f.ctrlKey&&X(f);break;case"ArrowUp":X(f);break;case"Home":f.preventDefault(),q(0);break;case"End":f.preventDefault(),de();break;case"Enter":{f.preventDefault();let v=B();if(v){let b=new Event(Qe);v.dispatchEvent(b)}}}},"onKeyDown")},i.createElement("label",{"cmdk-label":"",htmlFor:H.inputId,id:H.labelId,style:bo},p),Re(e,f=>i.createElement(Kt.Provider,{value:w},i.createElement(Vt.Provider,{value:H},f))))}),io=i.forwardRef((e,t)=>{var n,r;let o=K(),s=i.useRef(null),u=i.useContext(Bt),l=ge(),p=Xt(e),c=(r=(n=p.current)==null?void 0:n.forceMount)!=null?r:u?.forceMount;re(()=>{if(!c)return l.item(o,u?.id)},[c]);let h=Yt(o,s,[e.value,e.children,s],e.keywords),y=Xe(),E=J(R=>R.value&&R.value===h.current),x=J(R=>c||l.filter()===!1?!0:R.search?R.filtered.items.get(o)>0:!0);i.useEffect(()=>{let R=s.current;if(!(!R||e.disabled))return R.addEventListener(Qe,N),()=>R.removeEventListener(Qe,N)},[x,e.onSelect,e.disabled]);function N(){var R,w;C(),(w=(R=p.current).onSelect)==null||w.call(R,h.current)}a(N,"C");function C(){y.setState("value",h.current,!0)}if(a(C,"S"),!x)return null;let{disabled:O,value:I,onSelect:_,forceMount:D,keywords:P,...Q}=e;return i.createElement(M.div,{ref:te(s,t),...Q,id:o,"cmdk-item":"",role:"option","aria-disabled":!!O,"aria-selected":!!E,"data-disabled":!!O,"data-selected":!!E,onPointerMove:O||l.getDisablePointerSelection()?void 0:C,onClick:O?void 0:N},e.children)}),ao=i.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...s}=e,u=K(),l=i.useRef(null),p=i.useRef(null),c=K(),h=ge(),y=J(x=>o||h.filter()===!1?!0:x.search?x.filtered.groups.has(u):!0);re(()=>h.group(u),[]),Yt(u,l,[e.value,e.heading,p]);let E=i.useMemo(()=>({id:u,forceMount:o}),[o]);return i.createElement(M.div,{ref:te(l,t),...s,"cmdk-group":"",role:"presentation",hidden:y?void 0:!0},n&&i.createElement("div",{ref:p,"cmdk-group-heading":"","aria-hidden":!0,id:c},n),Re(e,x=>i.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?c:void 0},i.createElement(Bt.Provider,{value:E},x))))}),lo=i.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=i.useRef(null),s=J(u=>!u.search);return!n&&!s?null:i.createElement(M.div,{ref:te(o,t),...r,"cmdk-separator":"",role:"separator"})}),uo=i.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,s=Xe(),u=J(c=>c.search),l=J(c=>c.selectedItemId),p=ge();return i.useEffect(()=>{e.value!=null&&s.setState("search",e.value)},[e.value]),i.createElement(M.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":p.listId,"aria-labelledby":p.labelId,"aria-activedescendant":l,id:p.inputId,type:"text",value:o?e.value:u,onChange:a(c=>{o||s.setState("search",c.target.value),n?.(c.target.value)},"onChange")})}),co=i.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,s=i.useRef(null),u=i.useRef(null),l=J(c=>c.selectedItemId),p=ge();return i.useEffect(()=>{if(u.current&&s.current){let c=u.current,h=s.current,y,E=new ResizeObserver(()=>{y=requestAnimationFrame(()=>{let x=c.offsetHeight;h.style.setProperty("--cmdk-list-height",x.toFixed(1)+"px")})});return E.observe(c),()=>{cancelAnimationFrame(y),E.unobserve(c)}}},[]),i.createElement(M.div,{ref:te(s,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":l,"aria-label":r,id:p.listId},Re(e,c=>i.createElement("div",{ref:te(u,p.listInnerRef),"cmdk-list-sizer":""},c)))}),fo=i.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:s,container:u,...l}=e;return i.createElement(eo,{open:n,onOpenChange:r},i.createElement(to,{container:u},i.createElement(no,{"cmdk-overlay":"",className:o}),i.createElement(ro,{"aria-label":e.label,"cmdk-dialog":"",className:s},i.createElement(Gt,{ref:t,...l}))))}),po=i.forwardRef((e,t)=>J(n=>n.filtered.count===0)?i.createElement(M.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),mo=i.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...s}=e;return i.createElement(M.div,{ref:t,...s,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},Re(e,u=>i.createElement("div",{"aria-hidden":!0},u)))}),se=Object.assign(Gt,{List:co,Item:io,Input:uo,Group:ao,Separator:lo,Dialog:fo,Empty:po,Loading:mo});function ho(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}a(ho,"we");function vo(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}a(vo,"De");function Xt(e){let t=i.useRef(e);return re(()=>{t.current=e}),t}a(Xt,"pe");var re=typeof window>"u"?i.useEffect:i.useLayoutEffect;function le(e){let t=i.useRef();return t.current===void 0&&(t.current=e()),t}a(le,"L");function J(e){let t=Xe(),n=a(()=>e(t.snapshot()),"n");return i.useSyncExternalStore(t.subscribe,n,n)}a(J,"P");function Yt(e,t,n,r=[]){let o=i.useRef(),s=ge();return re(()=>{var u;let l=(()=>{var c;for(let h of n){if(typeof h=="string")return h.trim();if(typeof h=="object"&&"current"in h)return h.current?(c=h.current.textContent)==null?void 0:c.trim():o.current}})(),p=r.map(c=>c.trim());s.value(e,l,p),(u=t.current)==null||u.setAttribute(ae,l),o.current=l}),o}a(Yt,"ve");var go=a(()=>{let[e,t]=i.useState(),n=le(()=>new Map);return re(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}},"ke");function yo(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}a(yo,"Me");function Re({asChild:e,children:t},n){return e&&i.isValidElement(t)?i.cloneElement(yo(t),{ref:t.ref},n(t.props.children)):n(t)}a(Re,"B");var bo={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function Zt({className:e,...t}){return(0,d.jsx)(se,{"data-slot":"command",className:T("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t})}a(Zt,"Command");function ns({title:e="Command Palette",description:t="Search for a command to run...",children:n,className:r,showCloseButton:o=!0,...s}){return(0,d.jsxs)(An,{...s,children:[(0,d.jsxs)(_n,{className:"sr-only",children:[(0,d.jsx)(Mn,{children:e}),(0,d.jsx)(In,{children:t})]}),(0,d.jsxs)(Pn,{className:T("overflow-hidden p-0",r),showCloseButton:!1,children:[(0,d.jsx)(Zt,{className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:n}),o&&(0,d.jsxs)(Rn,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-0 right-2 flex h-12 items-center rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[(0,d.jsx)(yt,{}),(0,d.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}a(ns,"CommandDialog");function Eo({className:e,...t}){return(0,d.jsxs)("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[(0,d.jsx)(Nn,{className:"size-4 shrink-0 opacity-50"}),(0,d.jsx)(se.Input,{"data-slot":"command-input",className:T("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-base md:text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...t})]})}a(Eo,"CommandInput");function xo({className:e,...t}){return(0,d.jsx)(se.List,{"data-slot":"command-list",className:T("max-h-(--sz-300px) scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}a(xo,"CommandList");function wo({...e}){return(0,d.jsx)(se.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}a(wo,"CommandEmpty");function pt({className:e,...t}){return(0,d.jsx)(se.Group,{"data-slot":"command-group",className:T("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...t})}a(pt,"CommandGroup");function rs({className:e,...t}){return(0,d.jsx)(se.Separator,{"data-slot":"command-separator",className:T("bg-border -mx-1 h-px",e),...t})}a(rs,"CommandSeparator");function mt({className:e,...t}){return(0,d.jsx)(se.Item,{"data-slot":"command-item",className:T("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}a(mt,"CommandItem");function os({className:e,...t}){return(0,d.jsx)("span",{"data-slot":"command-shortcut",className:T("text-muted-foreground ml-auto text-xs tracking-widest",e),...t})}a(os,"CommandShortcut");var Co=i.forwardRef(({checked:e,onCheckedChange:t,size:n="default",className:r,disabled:o,onClick:s,...u},l)=>{const p=n==="lg";return(0,d.jsx)("button",{ref:l,type:"button",role:"switch","aria-checked":e,"data-slot":"toggle",disabled:o,className:T("relative inline-flex shrink-0 items-center rounded-full border-2 transition-all outline-none","focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/30","disabled:cursor-not-allowed disabled:opacity-50",p?"h-6 w-12":"h-5 w-11",e?"border-(--status-task-done) bg-(--status-task-done)":"border-transparent bg-input/90",r),...u,onClick:a(c=>{s?.(c),t(!e)},"onClick"),children:(0,d.jsx)("span",{className:T("pointer-events-none inline-block rounded-full bg-background shadow-sm transition-transform not-dark:bg-clip-padding dark:bg-foreground",p?"h-5 w-7":"h-4 w-6",e?"translate-x-4":"translate-x-0")})})});Co.displayName="ToggleSwitch";var Jt="--mobile-viewport-inset-bottom",qe="--mobile-viewport-height",ze="keyboardOpen";var Oo=new Set(["button","checkbox","color","file","hidden","image","radio","range","reset","submit"]);function So(e){if(!e)return!1;if(e instanceof HTMLTextAreaElement)return!e.readOnly&&!e.disabled;if(e instanceof HTMLInputElement)return!Oo.has(e.type)&&!e.readOnly&&!e.disabled;const t=e.closest("[contenteditable]");return t!==null&&t.getAttribute("contenteditable")!=="false"}a(So,"isEditableElement");function Do(e){const t=Math.max(0,Math.round(e.innerHeight-e.visualHeight-e.offsetTop));return e.sheetOpen||e.editableFocused&&t>120?t:0}a(Do,"resolveKeyboardInset");var Ee=0,Ue=0,je=null,ue=null;function No(){const e=window.visualViewport;return{innerHeight:window.innerHeight,visualHeight:e?.height??window.innerHeight,offsetTop:e?.offsetTop??0,editableFocused:So(document.activeElement),sheetOpen:Ue>0}}a(No,"readSample");function we(){const e=document.documentElement,t=No(),n=Do(t);e.style.setProperty(Jt,`${n}px`),n>0?e.style.setProperty(qe,`${Math.round(t.visualHeight)}px`):e.style.removeProperty(qe),n>120?e.dataset[ze]="true":delete e.dataset[ze]}a(we,"publish");function $(){ue===null&&(ue=window.requestAnimationFrame(()=>{ue=null,we()}))}a($,"schedule");function Ro(){const e=window.visualViewport;return we(),e?.addEventListener("resize",$),e?.addEventListener("scroll",$),window.addEventListener("resize",$),window.addEventListener("orientationchange",$),document.addEventListener("focusin",$),document.addEventListener("focusout",$),()=>{e?.removeEventListener("resize",$),e?.removeEventListener("scroll",$),window.removeEventListener("resize",$),window.removeEventListener("orientationchange",$),document.removeEventListener("focusin",$),document.removeEventListener("focusout",$),ue!==null&&window.cancelAnimationFrame(ue),ue=null;const t=document.documentElement;t.style.removeProperty(Jt),t.style.removeProperty(qe),delete t.dataset[ze]}}a(Ro,"attach");function Po(e,t={}){const n=t.sheet??!1;(0,i.useEffect)(()=>{if(!(!e||typeof window>"u"))return Ee+=1,n&&(Ue+=1),Ee===1?je=Ro():we(),()=>{if(Ee-=1,n&&(Ue-=1),Ee>0){we();return}je?.(),je=null}},[e,n])}a(Po,"useMobileViewportInsets");function Fe(){return(window.visualViewport?.height??window.innerHeight)<500}a(Fe,"readShortViewport");function ss(e){const[t,n]=(0,i.useState)(()=>e&&typeof window<"u"&&Fe());return(0,i.useEffect)(()=>{if(!e||typeof window>"u"){n(!1);return}let r=null;const o=a(()=>{r===null&&(r=window.requestAnimationFrame(()=>{r=null,n(Fe())}))},"update");n(Fe());const s=window.visualViewport;return s?.addEventListener("resize",o),window.addEventListener("resize",o),()=>{s?.removeEventListener("resize",o),window.removeEventListener("resize",o),r!==null&&window.cancelAnimationFrame(r)}},[e]),t}a(ss,"useShortVisibleViewport");function ht(){const e=window.visualViewport?.height;return typeof e=="number"&&Number.isFinite(e)&&e>0?e:null}a(ht,"readVisualViewportHeight");function _o(){const[e,t]=(0,i.useState)(()=>typeof window>"u"?null:ht());return(0,i.useEffect)(()=>{const n=window.visualViewport;if(!n)return;const r=a(()=>{const o=ht();o!==null&&t(o)},"update");return r(),n.addEventListener("resize",r),n.addEventListener("scroll",r),()=>{n.removeEventListener("resize",r),n.removeEventListener("scroll",r)}},[]),e===null?{}:{"--mobile-entity-picker-visual-viewport-height":`${e}px`}}a(_o,"useMobileEntityPickerViewportStyle");function en(e){return e.trim().toLowerCase().replace(/\s+/g," ")}a(en,"normalizeSearchText");function tn(e){return en(e).match(/[\p{L}\p{N}]+/gu)??[]}a(tn,"searchWords");function Io(e,t){if(t.length<3)return null;let n=0,r=-1,o=-1,s=0;for(let u=0;u<e.length&&n<t.length;u+=1)e[u]===t[n]&&(r===-1?r=u:s+=u-o-1,o=u,n+=1);return n!==t.length||o-r+1>t.length*2?null:32+s*2+r+Math.max(0,e.length-t.length)*.5}a(Io,"fuzzyWordSubsequenceScore");function Ao(e,t){if(!t)return 0;const n=tn(e);if(n.length===0)return null;let r=Number.POSITIVE_INFINITY;n.forEach((u,l)=>{let p=null;if(u===t)p=0;else if(u.startsWith(t))p=8+(u.length-t.length)*.25;else{const c=u.indexOf(t);c>=0?p=16+c+(u.length-t.length)*.1:p=Io(u,t)}p!==null&&(r=Math.min(r,p+l*.05))});const o=n.join("").indexOf(t);o>=0&&(r=Math.min(r,24+o*.05));const s=n.map(u=>u[0]).join("");if(t.length<=4)if(s.startsWith(t))r=Math.min(r,28+(s.length-t.length)*.25);else{const u=s.indexOf(t);u>=0&&(r=Math.min(r,36+u))}return Number.isFinite(r)?r:null}a(Ao,"scoreTokenAgainstText");function nn(e,t){const n=tn(t);if(n.length===0)return 0;let r=0;for(const o of n){let s=Number.POSITIVE_INFINITY;if(e.forEach((u,l)=>{const p=Ao(u.text??"",o);p!==null&&(s=Math.min(s,p+(u.weight??l*20)))}),!Number.isFinite(s))return null;r+=s}return r}a(nn,"scoreFuzzyTextFields");function Mo(e,t){return nn([{text:e}],t)}a(Mo,"scoreFuzzyTextMatch");function To(e,t){return Mo(e,t)!==null}a(To,"fuzzyTextMatchesQuery");function ko(e,t){return To(`${e.label} ${e.searchText??""}`,t)}a(ko,"defaultFilterOption");function jo(e,t){return nn([{text:e.label,weight:0},{text:e.searchText,weight:20}],t)}a(jo,"defaultScoreOption");function is({value:e,groups:t,onValueChange:n,placeholder:r,searchPlaceholder:o="Search...",emptyMessage:s="No options found.",loadingMessage:u="Loading...",loading:l=!1,disabled:p=!1,className:c,triggerClassName:h,contentClassName:y,align:E="start",contentWidth:x="trigger",renderValue:N,renderOption:C,deriveGroups:O,filterOption:I=ko,scoreOption:_,disablePortal:D,mobileTitle:P,triggerAriaLabel:Q,modal:R,contentStyle:w,listFooter:H,createItem:L}){const[U,ee]=(0,i.useState)(!1),[k,ie]=(0,i.useState)("");Po(U,{sheet:!0});const B=_o(),W=(0,i.useRef)(!1),q=(0,i.useRef)(!1),G=(0,i.useMemo)(()=>{for(const m of t){const g=m.options.find(v=>v.value===e);if(g)return g}return null},[t,e]),ce=(0,i.useMemo)(()=>O?O(k,t):t,[O,t,k]),de=(0,i.useMemo)(()=>{if(l)return[];const m=en(k);return ce.map(g=>{const v=g.options.map((b,S)=>{if(!m)return{option:b,index:S,score:0};if(!I(b,k))return null;if(_){const A=_(b,k);return A===null?null:{option:b,index:S,score:A}}return{option:b,index:S,score:jo(b,k)??Number.MAX_SAFE_INTEGER}}).filter(b=>b!==null);return m&&v.sort((b,S)=>b.score-S.score||b.index-S.index),{...g,options:v.map(b=>b.option)}}).filter(g=>g.options.length>0)},[I,l,k,_,ce]),fe=de.some(m=>m.options.length>0);function X({suppressTriggerFocus:m=!1}={}){m&&(q.current=!0),ee(!1),ie("")}a(X,"closePopover");function f(m){if(m.disabled)return;q.current=!0;const g=n(m.value,m);g===!1||typeof g=="object"&&g?.close===!1||X()}return a(f,"selectOption"),(0,d.jsxs)(Cn,{modal:R,open:U,onOpenChange:a(m=>{ee(m),m||ie("")},"onOpenChange"),children:[(0,d.jsx)(On,{asChild:!0,children:(0,d.jsxs)(Dn,{type:"button",variant:"outline",disabled:p,onPointerDown:a(()=>{W.current=!0},"onPointerDown"),onFocus:a(()=>{const m=W.current||q.current;W.current=!1,q.current=!1,!m&&ee(!0)},"onFocus"),onKeyDown:a(m=>{m.key==="Escape"&&U&&(m.preventDefault(),X())},"onKeyDown"),"aria-expanded":U,"aria-label":Q,role:"combobox",className:T("w-full justify-between overflow-hidden",c,h),children:[(0,d.jsx)("span",{className:T("min-w-0 flex-1 truncate text-left",!G&&"text-muted-foreground"),children:N?N(G):G?.label??r}),(0,d.jsx)(Xn,{className:"ml-2 size-4 opacity-50"})]})}),(0,d.jsxs)(Sn,{"data-mobile-entity-picker":"","aria-label":P??r,style:{...B,...w},align:E,collisionPadding:16,disablePortal:D,className:T("p-0",x==="trigger"?"w-(--radix-popover-trigger-width) min-w-56 max-w-(--sz-calc-23)":"w-72 max-w-(--sz-calc-23)",y),onKeyDownCapture:a(m=>{m.key==="Escape"&&(m.preventDefault(),m.stopPropagation(),X({suppressTriggerFocus:!0}))},"onKeyDownCapture"),onCloseAutoFocus:a(()=>{q.current=!0,queueMicrotask(()=>{q.current=!1})},"onCloseAutoFocus"),children:[(0,d.jsxs)("div",{"data-mobile-entity-picker-header":"","data-mobile-sheet-header":"",className:"hidden items-center justify-between gap-2 border-b border-border px-4 py-3",children:[(0,d.jsx)("span",{className:"shrink-0 text-base font-semibold text-foreground",children:P??r}),(0,d.jsx)("span",{"data-mobile-sheet-value":"",className:"min-w-0 flex-1 truncate text-right text-xs text-muted-foreground",children:G?.label??null}),(0,d.jsx)("button",{type:"button",className:"inline-flex size-9 shrink-0 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground","aria-label":"Close selector","data-mobile-sheet-close":"",onClick:a(()=>X({suppressTriggerFocus:!0}),"onClick"),children:(0,d.jsx)(yt,{className:"size-5"})})]}),(0,d.jsxs)(Zt,{shouldFilter:!1,children:[(0,d.jsx)(Eo,{value:k,onValueChange:ie,placeholder:o}),(0,d.jsx)(xo,{className:"overscroll-contain touch-pan-y",onWheelCapture:a(m=>{m.currentTarget.scrollHeight>m.currentTarget.clientHeight&&m.stopPropagation()},"onWheelCapture"),children:l?(0,d.jsx)("div",{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:u}):(0,d.jsxs)(d.Fragment,{children:[!fe&&!L?(0,d.jsx)(wo,{children:s}):null,!fe&&L?(0,d.jsx)("div",{className:"px-3 py-3 text-center text-xs text-muted-foreground",children:s}):null,de.map(m=>(0,d.jsx)(pt,{heading:m.label,children:m.options.map(g=>{const v=g.value===e;return(0,d.jsxs)(mt,{value:g.key,disabled:g.disabled,onSelect:a(()=>f(g),"onSelect"),children:[C?C(g,{selected:v}):(0,d.jsx)("span",{className:"min-w-0 truncate",children:g.label}),(0,d.jsx)(Tn,{className:T("ml-auto size-4",v?"opacity-100":"opacity-0")})]},g.key)})},m.id)),L?(0,d.jsx)(pt,{className:"border-t border-border",children:(0,d.jsx)(mt,{value:"__searchable_select_create__",onSelect:a(()=>{const m=k;q.current=!0,X(),window.setTimeout(()=>L.onSelect(m),0)},"onSelect"),children:L.render(k)})}):null,H]})})]})]})]})}a(is,"SearchableSelect");function as({className:e,...t}){return(0,d.jsx)(Gn,{"data-slot":"label",className:T("flex items-center gap-2 text-sm 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})}a(as,"Label");export{Bo as C,Xn as S,Wo as T,os as _,_o as a,Yo as b,Co as c,wo as d,pt as f,rs as g,xo as h,nn as i,Zt as l,mt as m,is as n,Po as o,Eo as p,en as r,ss as s,as as t,ns as u,Xo as v,Ko as w,Go as x,Zo as y};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var f=Object.defineProperty;var s=(t,a)=>f(t,"name",{value:a,configurable:!0});import{i as r}from"./rolldown-runtime-ZpX3ckPj.js";import{G as o,Ha as h,Wa as p,n as i}from"./agent-avatar-url-B_lUFC64.js";import{Z as x}from"./mention-chips--Lp_ENqh.js";import{c as l,d as g,f as b,l as j,m as y,p as v,s as D,u as S}from"./dist-BXR8yTPD.js";import{t as _}from"./AgentAvatar-CpQ88dwV.js";var d={name:"folder-search",size:24,node:[["path",{d:"M10.7 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v4.1",key:"1bw5m7"}],["path",{d:"m21 21-1.9-1.9",key:"1g2n9r"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}]]};d.node;var M=i(d),c={name:"pencil",size:24,node:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]};c.node;var P=i(c),e=r(h(),1);function q({agent:t,size:a="default",className:n}){return(0,e.jsxs)("span",{title:t.name,className:o("inline-flex min-w-0 items-center gap-1.5",n),children:[(0,e.jsx)(_,{agent:t,size:{xs:20,sm:24,default:32,lg:40}[a]}),(0,e.jsx)("span",{className:o("truncate",a==="sm"?"text-xs":"text-sm"),children:t.name??"Agent"})]})}s(q,"AgentIdentity");var F=r(p(),1);function I({...t}){return(0,e.jsx)(D,{"data-slot":"sheet",...t})}s(I,"Sheet");function L({...t}){return(0,e.jsx)(y,{"data-slot":"sheet-trigger",...t})}s(L,"SheetTrigger");function O({...t}){return(0,e.jsx)(l,{"data-slot":"sheet-close",...t})}s(O,"SheetClose");function N({...t}){return(0,e.jsx)(b,{"data-slot":"sheet-portal",...t})}s(N,"SheetPortal");function k({className:t,...a}){return(0,e.jsx)(g,{"data-slot":"sheet-overlay",className:o("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...a})}s(k,"SheetOverlay");function E({className:t,children:a,side:n="right",showCloseButton:u=!0,...m}){return(0,e.jsxs)(N,{children:[(0,e.jsx)(k,{}),(0,e.jsxs)(j,{"data-slot":"sheet-content",className:o("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",n==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",n==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",n==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",n==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",t),...m,children:[a,u&&(0,e.jsxs)(l,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[(0,e.jsx)(x,{className:"size-4"}),(0,e.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}s(E,"SheetContent");function G({className:t,...a}){return(0,e.jsx)("div",{"data-slot":"sheet-header",className:o("flex flex-col gap-1.5 p-4",t),...a})}s(G,"SheetHeader");function V({className:t,...a}){return(0,e.jsx)("div",{"data-slot":"sheet-footer",className:o("mt-auto flex flex-col gap-2 p-4",t),...a})}s(V,"SheetFooter");function W({className:t,...a}){return(0,e.jsx)(v,{"data-slot":"sheet-title",className:o("text-foreground font-semibold",t),...a})}s(W,"SheetTitle");function X({className:t,...a}){return(0,e.jsx)(S,{"data-slot":"sheet-description",className:o("text-muted-foreground text-sm",t),...a})}s(X,"SheetDescription");export{V as a,L as c,M as d,X as i,q as l,O as n,G as o,E as r,W as s,I as t,P as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var ie=Object.defineProperty;var r=(t,l)=>ie(t,"name",{value:l,configurable:!0});import{i as D}from"./rolldown-runtime-ZpX3ckPj.js";import{G as g,Ha as ne,Ji as f,St as oe,Wa as ce,ca as ue,n as v}from"./agent-avatar-url-B_lUFC64.js";import{Bt as E,Gt as H,Ht as K,i as A,j as de}from"./BreadcrumbContext-c2KosyR8.js";import{m as pe}from"./alert-dialog-CqvHCY2y.js";import{t as z}from"./AgentAvatar-CpQ88dwV.js";import{t as me}from"./checkbox-Ds_3QqBB.js";import{s as G}from"./clipboard-C4aDsmO8.js";import{i as fe}from"./use-copy-action-DnjVh8kP.js";import{t as V}from"./input-ConoHcjz.js";import{t as R}from"./skeleton-5VMhNzFs.js";var W={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};W.node;var Ce=v(W),Q={name:"flask-conical",size:24,node:[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]]};Q.node;var Le=v(Q),U={name:"info",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]};U.node;var xe=v(U),X={name:"link-2",size:24,node:[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]};X.node;var qe=v(X),Y={name:"shield-check",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]};Y.node;var $e=v(Y),e=D(ne(),1),he={info:xe,warning:pe,danger:fe};function Be({tone:t="info",title:l,children:i,icon:n,actions:x,compact:y=!1,className:c}){const u=n===!1?null:n??he[t];return(0,e.jsxs)("div",{role:"note",className:g("flex flex-col gap-2 rounded-lg border sm:flex-row sm:items-start sm:justify-between",y?"p-3":"p-4",de[t],c),children:[(0,e.jsxs)("div",{className:"flex items-start gap-2.5",children:[u&&(0,e.jsx)(u,{className:"mt-0.5 h-4 w-4 shrink-0","aria-hidden":"true"}),(0,e.jsxs)("div",{className:"space-y-1 text-sm",children:[l&&(0,e.jsx)("p",{className:"font-medium leading-tight",children:l}),i&&(0,e.jsx)("div",{className:"leading-snug opacity-90",children:i})]})]}),x&&(0,e.jsx)("div",{className:"flex shrink-0 flex-wrap items-center gap-2 pl-6 sm:pl-0",children:x})]})}r(Be,"InlineBanner");var o=D(ce(),1);function Pe({agents:t,value:l,onChange:i,placeholder:n="Select agent…",emptyMessage:x="No agents yet.",disabled:y=!1,triggerClassName:c,id:u}){const[M,N]=(0,o.useState)(!1),[k,w]=(0,o.useState)(""),h=t.find(a=>a.id===l),S=k.trim().toLowerCase(),b=(0,o.useMemo)(()=>t.filter(a=>`${a.name} ${a.title??""}`.toLowerCase().includes(S)).sort((a,C)=>a.name.localeCompare(C.name)),[t,S]);return(0,e.jsxs)(E,{open:M,onOpenChange:r(a=>{N(a),a||w("")},"onOpenChange"),children:[(0,e.jsx)(H,{asChild:!0,children:(0,e.jsxs)(A,{id:u,type:"button",variant:"outline",size:"sm",className:g("w-full justify-between",c),disabled:y,children:[(0,e.jsxs)("span",{className:g("flex min-w-0 items-center gap-2",!h&&"text-muted-foreground"),children:[h&&(0,e.jsx)(z,{agent:h,size:20}),(0,e.jsx)("span",{className:"truncate",children:h?.name??n})]}),(0,e.jsx)(G,{className:"h-4 w-4 shrink-0 text-muted-foreground"})]})}),(0,e.jsxs)(K,{className:"w-(--radix-popover-trigger-width) p-0",align:"start",children:[(0,e.jsx)("div",{className:"border-b border-border p-3",children:(0,e.jsx)(V,{value:k,onChange:r(a=>w(a.target.value),"onChange"),placeholder:"Filter agents",className:"h-8",autoFocus:!0})}),t.length===0?(0,e.jsx)("div",{className:"px-3 py-4 text-sm text-muted-foreground",children:x}):(0,e.jsxs)("div",{className:"max-h-60 overflow-y-auto py-1",children:[b.map(a=>(0,e.jsxs)("button",{type:"button",className:"flex w-full items-start gap-2 px-3 py-2 text-left hover:bg-accent/30","aria-label":`Select ${a.name}`,onClick:r(()=>{i(a.id),N(!1)},"onClick"),children:[(0,e.jsx)(z,{agent:a,size:20,className:"shrink-0"}),(0,e.jsxs)("span",{className:"flex min-w-0 flex-col",children:[(0,e.jsx)("span",{className:"truncate text-sm font-medium text-foreground",children:a.name}),a.title?(0,e.jsx)("span",{className:"truncate text-xs text-muted-foreground",children:a.title}):null]})]},a.id)),b.length===0?(0,e.jsx)("div",{className:"px-3 py-4 text-sm text-muted-foreground",children:"No matches."}):null]})]})]})}r(Pe,"AgentSelect");function Ie({agents:t,selectedAgentIds:l,onChange:i,onSave:n,loading:x=!1,disabled:y=!1,pending:c=!1,getDescription:u,isAgentDisabled:M,renderNameSuffix:N,triggerLabel:k,triggerIcon:w,triggerVariant:h="outline",triggerSize:S="default",triggerFullWidth:b=!0,triggerClassName:a,contentAlign:C="start",headerContent:ee,emptyMessage:se="No agents yet.",showSelectionPreview:te=!0,onOpenChange:re}){const[L,q]=(0,o.useState)(!1),[P,I]=(0,o.useState)(""),[O,T]=(0,o.useState)(new Set(l)),d=!!n,p=d?O:l;(0,o.useEffect)(()=>{L&&d&&T(new Set(l))},[L,l,d]);const F=P.trim().toLowerCase(),J=(0,o.useMemo)(()=>t.filter(s=>{const m=u?.(s)??s.title??"";return`${s.name} ${m}`.toLowerCase().includes(F)}).sort((s,m)=>{const j=p.has(s.id);return j!==p.has(m.id)?j?-1:1:s.name.localeCompare(m.name)}),[t,u,F,p]),$=l.size,_=t.filter(s=>l.has(s.id));function ae(s){d?T(s):i?.(s)}return r(ae,"setSelection"),(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsxs)(E,{open:L,onOpenChange:r(s=>{q(s),re?.(s),s||I("")},"onOpenChange"),children:[(0,e.jsx)(H,{asChild:!0,children:(0,e.jsxs)(A,{type:"button",variant:h,size:S,className:g("justify-between",b&&"w-full",a),disabled:y||c,children:[(0,e.jsxs)("span",{className:"flex min-w-0 items-center",children:[w,(0,e.jsx)("span",{className:"truncate",children:k??($===0?"Select agents":`${$} ${$===1?"agent":"agents"} selected`)})]}),(0,e.jsx)(G,{className:"h-4 w-4 shrink-0 text-muted-foreground"})]})}),(0,e.jsxs)(K,{className:"w-80 p-0",align:C,children:[(0,e.jsxs)("div",{className:"border-b border-border p-3",children:[(0,e.jsx)(V,{value:P,onChange:r(s=>I(s.target.value),"onChange"),placeholder:"Filter agents",className:"h-8",autoFocus:!0}),ee]}),x?(0,e.jsxs)("div",{className:"space-y-2 p-3",children:[(0,e.jsx)(R,{className:"h-6 w-full"}),(0,e.jsx)(R,{className:"h-6 w-full"})]}):t.length===0?(0,e.jsx)("div",{className:"px-3 py-4 text-sm text-muted-foreground",children:se}):(0,e.jsxs)("div",{className:"max-h-60 overflow-y-auto py-1",children:[J.map(s=>{const m=u?.(s)??s.title,j=M?.(s)??!1;return(0,e.jsxs)("label",{className:g("flex items-start gap-2 px-3 py-2 hover:bg-accent/30",j?"opacity-60":"cursor-pointer"),children:[(0,e.jsx)(me,{checked:p.has(s.id),disabled:j,"aria-label":`Allow ${s.name}`,onCheckedChange:r(le=>{const B=new Set(p);le?B.add(s.id):B.delete(s.id),ae(B)},"onCheckedChange")}),(0,e.jsx)(z,{agent:s,size:16,className:"mt-0.5 h-4 w-4 shrink-0 text-muted-foreground"}),(0,e.jsxs)("span",{className:"flex min-w-0 flex-col",children:[(0,e.jsxs)("span",{className:"flex items-center gap-1.5 text-sm font-medium text-foreground",children:[(0,e.jsx)("span",{className:"truncate",children:s.name}),N?.(s)]}),m?(0,e.jsx)("span",{className:"truncate text-xs text-muted-foreground",children:m}):null]})]},s.id)}),J.length===0?(0,e.jsx)("div",{className:"px-3 py-4 text-sm text-muted-foreground",children:"No matches."}):null]}),(0,e.jsxs)("div",{className:"flex items-center justify-between border-t border-border px-3 py-2",children:[(0,e.jsx)("span",{className:"text-xs text-muted-foreground",children:p.size===0?"No agents selected":`${p.size} selected`}),(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[d?(0,e.jsx)(A,{type:"button",variant:"ghost",size:"sm",onClick:r(()=>q(!1),"onClick"),disabled:c,children:"Cancel"}):null,(0,e.jsx)(A,{type:"button",size:"sm",onClick:r(()=>{d&&n?.(O),q(!1)},"onClick"),disabled:c,children:d?c?"Saving…":"Save":"Done"})]})]})]})]}),te&&_.length>0?(0,e.jsxs)("div",{className:"space-y-0.5",children:[_.slice(0,3).map(s=>(0,e.jsxs)("div",{className:"flex items-center gap-2 px-1.5 py-1 text-sm",children:[(0,e.jsx)(z,{agent:s,size:16,className:"h-4 w-4 shrink-0 text-muted-foreground"}),(0,e.jsx)("span",{className:"min-w-0 flex-1 truncate text-foreground",children:s.name})]},s.id)),_.length>3?(0,e.jsxs)("p",{className:"px-1.5 pt-0.5 text-xs text-muted-foreground",children:["and ",_.length-3," more"]}):null]}):null]})}r(Ie,"AgentMultiSelect");var ye={list:r(()=>f.get("/adapters"),"list"),install:r(t=>f.post("/adapters/install",t),"install"),remove:r(t=>f.delete(`/adapters/${t}`),"remove"),setDisabled:r((t,l)=>f.patch(`/adapters/${t}`,{disabled:l}),"setDisabled"),setOverridePaused:r((t,l)=>f.patch(`/adapters/${t}/override`,{paused:l}),"setOverridePaused"),reload:r(t=>f.post(`/adapters/${t}/reload`,{}),"reload"),reinstall:r(t=>f.post(`/adapters/${t}/reinstall`,{}),"reinstall")},Z={supportsInstructionsBundle:!1,supportsSkills:!1,supportsLocalAgentJwt:!1,requiresMaterializedRuntimeSkills:!1,supportsAcp:!1},je={claude_local:{supportsInstructionsBundle:!0,supportsSkills:!0,supportsLocalAgentJwt:!0,requiresMaterializedRuntimeSkills:!1,supportsAcp:!0,readOnlyToolProfile:"enforced",login:{panelMode:"submitted_browser_code",timeoutPolicy:"fixed"}},codex_local:{supportsInstructionsBundle:!0,supportsSkills:!0,supportsLocalAgentJwt:!0,requiresMaterializedRuntimeSkills:!1,supportsAcp:!0,readOnlyToolProfile:"enforced",login:{panelMode:"displayed_code",timeoutPolicy:"caller_bounded"}},paperclip_runner:{supportsInstructionsBundle:!0,supportsSkills:!0,supportsLocalAgentJwt:!1,requiresMaterializedRuntimeSkills:!1,supportsAcp:!1},cursor:{supportsInstructionsBundle:!0,supportsSkills:!0,supportsLocalAgentJwt:!0,requiresMaterializedRuntimeSkills:!0,supportsAcp:!1,readOnlyToolProfile:"instruction_only"},gemini_local:{supportsInstructionsBundle:!0,supportsSkills:!0,supportsLocalAgentJwt:!0,requiresMaterializedRuntimeSkills:!0,supportsAcp:!0,readOnlyToolProfile:"instruction_only"},grok_local:{supportsInstructionsBundle:!0,supportsSkills:!0,supportsLocalAgentJwt:!0,requiresMaterializedRuntimeSkills:!0,supportsAcp:!1,readOnlyToolProfile:"instruction_only",login:{panelMode:"displayed_code",timeoutPolicy:"caller_bounded"}},kimi_local:{supportsInstructionsBundle:!0,supportsSkills:!0,supportsLocalAgentJwt:!0,requiresMaterializedRuntimeSkills:!0,supportsAcp:!0,readOnlyToolProfile:"instruction_only"},opencode_local:{supportsInstructionsBundle:!0,supportsSkills:!0,supportsLocalAgentJwt:!0,requiresMaterializedRuntimeSkills:!0,supportsAcp:!1,readOnlyToolProfile:"instruction_only"},pi_local:{supportsInstructionsBundle:!0,supportsSkills:!0,supportsLocalAgentJwt:!0,requiresMaterializedRuntimeSkills:!0,supportsAcp:!1,readOnlyToolProfile:"enforced"},omp_local:{supportsInstructionsBundle:!0,supportsSkills:!0,supportsLocalAgentJwt:!0,requiresMaterializedRuntimeSkills:!1,supportsAcp:!1,readOnlyToolProfile:"enforced",supportsLiveSteering:!0},openclaw_gateway:Z};function Oe(){const{data:t}=ue({queryKey:oe.adapters.all,queryFn:r(()=>ye.list(),"queryFn"),staleTime:3e5}),l=(0,o.useMemo)(()=>{const i=new Map;if(t)for(const n of t)i.set(n.type,n.capabilities);return i},[t]);return i=>l.get(i)??je[i]??Z}r(Oe,"useAdapterCapabilities");export{Be as a,xe as c,Pe as i,Le as l,ye as n,$e as o,Ie as r,qe as s,Oe as t,Ce as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var m=Object.defineProperty;var i=(e,t)=>m(e,"name",{value:t,configurable:!0});import{i as v}from"./rolldown-runtime-ZpX3ckPj.js";import{Wa as h,n as s}from"./agent-avatar-url-B_lUFC64.js";import{n as k}from"./ToastContext-FzmhiqZ4.js";import{t as l}from"./clipboard-C4aDsmO8.js";var d={name:"circle-alert",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],aliases:["alert-circle"]};d.node;var b=s(d),y={name:"save",size:24,node:[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]};y.node;var R=s(y),r=v(h(),1),C=1500;function E(e=C){const[t,o]=(0,r.useState)("idle"),a=(0,r.useRef)(null),n=(0,r.useRef)(0);(0,r.useEffect)(()=>()=>{a.current!==null&&window.clearTimeout(a.current)},[]);const p=(0,r.useCallback)(async f=>{const u=++n.current;let c="copied";try{await l(f)}catch{c="failed"}return n.current!==u||(o(c),a.current!==null&&window.clearTimeout(a.current),a.current=window.setTimeout(()=>{n.current===u&&(o("idle"),a.current=null)},e)),c},[e]);return{status:t,copied:t==="copied",failed:t==="failed",copy:p}}i(E,"useCopyAction");function M(){const e=k()?.pushToast;return(0,r.useCallback)(async(t,o="Copied")=>{try{return await l(t),e?.({title:o,tone:"success",dedupeKey:`copy:${o}`}),!0}catch{return e?.({title:"Couldn’t copy to clipboard",body:"Select and copy the value manually.",tone:"error",dedupeKey:"copy-failed"}),!1}},[e])}i(M,"useCopyToast");export{b as i,M as n,R as r,E as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var n=Object.defineProperty;var a=(e,r)=>n(e,"name",{value:r,configurable:!0});import{i as s}from"./rolldown-runtime-ZpX3ckPj.js";import{St as i,Wa as o,ca as d,n as u}from"./agent-avatar-url-B_lUFC64.js";import{t as m}from"./health-I-sCu61_.js";var t={name:"minus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}]]};t.node;var f=u(t),c=s(o(),1);function l(){const e=d({queryKey:i.health,queryFn:a(()=>m.get(),"queryFn"),enabled:!1}).data;return(0,c.useMemo)(()=>({hidden:new Set(e?.hiddenSettings??[]),loaded:e!==void 0}),[e])}a(l,"useHiddenSettings");export{f as n,l as t};
|