@tickernelz/paperclip-pro-ui 2026.1016.2 → 2026.1017.1

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.
Files changed (51) hide show
  1. package/dist/assets/{AgentAvatar-DZh8tNnK.js → AgentAvatar-Cy7DadMK.js} +1 -1
  2. package/dist/assets/{Agents.production-CVULb5cR.js → Agents.production-BJyEbiQk.js} +2 -2
  3. package/dist/assets/{BreadcrumbContext-Bxr1TyKN.js → BreadcrumbContext-CIC8QOSJ.js} +2 -2
  4. package/dist/assets/{CompanyActivity.production-Wked11oO.js → CompanyActivity.production-Dp4ldx4P.js} +1 -1
  5. package/dist/assets/{CompanyExport-CsJNakda.js → CompanyExport-BBAKbfHg.js} +2 -2
  6. package/dist/assets/{CompanySkills.production-CXPBOlb3.js → CompanySkills.production-XuOHqAg6.js} +3 -3
  7. package/dist/assets/{EmptyState-DliXLd04.js → EmptyState-Dvu_j1Dk.js} +1 -1
  8. package/dist/assets/{MarkdownBody-B5ygzgk6.js → MarkdownBody-Dh6kczcO.js} +3 -3
  9. package/dist/assets/{MarkdownEditor-D7suACD6.js → MarkdownEditor-nPcj3w4g.js} +4 -4
  10. package/dist/assets/{OrgChart.production-BjDW9Rac.js → OrgChart.production-B-U1K3BO.js} +1 -1
  11. package/dist/assets/{PageSkeleton-BZF4K6Hf.js → PageSkeleton-B858kNMV.js} +1 -1
  12. package/dist/assets/{RoutineDetail.production-C03tDWie.js → RoutineDetail.production-DR37hdFP.js} +1 -1
  13. package/dist/assets/{RoutineRunVariablesDialog-DE5hp-_u.js → RoutineRunVariablesDialog-TmqPj_PL.js} +2 -2
  14. package/dist/assets/{Routines.production-CDaXZ2Kc.js → Routines.production-D4Jwvus7.js} +1 -1
  15. package/dist/assets/{StatusIcon-YdJnE47W.js → StatusIcon-PIDWeOS3.js} +1 -1
  16. package/dist/assets/{ToastContext-Dh8dPdr5.js → ToastContext-B6w8XXdu.js} +1 -1
  17. package/dist/assets/{agent-avatar-url-BnmqahQ7.js → agent-avatar-url-Dp-4-Emx.js} +1 -1
  18. package/dist/assets/{alert-dialog-BxpRolrb.js → alert-dialog-Cgn1_GT7.js} +1 -1
  19. package/dist/assets/{arrow-right-bnOoaiPg.js → arrow-right-Dblp-MTW.js} +1 -1
  20. package/dist/assets/{badge-D5aOL1Ll.js → badge-B6lcLGFG.js} +1 -1
  21. package/dist/assets/{bot-DpNd1tv2.js → bot-BIsZWSPn.js} +1 -1
  22. package/dist/assets/{card-PCL2aF_L.js → card-Byu34cBe.js} +1 -1
  23. package/dist/assets/{check-BiXfODpl.js → check-AN9f-5s7.js} +1 -1
  24. package/dist/assets/{checkbox-5wFlZdZn.js → checkbox-DVrU8RYw.js} +1 -1
  25. package/dist/assets/{clipboard-CTmezHYG.js → clipboard-Bj1LrAus.js} +1 -1
  26. package/dist/assets/{company-members-Dd6xBf6K.js → company-members-B3Kl56Wi.js} +1 -1
  27. package/dist/assets/{definition-CjvFnh6k.js → definition-DSY4nExe.js} +1 -1
  28. package/dist/assets/{dist-BrRwU9U9.js → dist-BoN0lntx.js} +1 -1
  29. package/dist/assets/{dist-CvM0_U_m.js → dist-DNeg6Olm.js} +1 -1
  30. package/dist/assets/{dist-CMegW-DS.js → dist-qobNlkwf.js} +1 -1
  31. package/dist/assets/{environments-Bj-4l7Ol.js → environments-CnsaRGwX.js} +1 -1
  32. package/dist/assets/{external-link-LnxJtUIq.js → external-link-DJ5KXpF5.js} +1 -1
  33. package/dist/assets/{file-text-Ba5Wddur.js → file-text-BqJfYVg5.js} +1 -1
  34. package/dist/assets/{health-D8T5Zr74.js → health-DXJ-aWLi.js} +1 -1
  35. package/dist/assets/{heartbeats-Dae6h2SU.js → heartbeats-BoD7FLml.js} +1 -1
  36. package/dist/assets/{index-D4MfEOIw.js → index-BVwUuuxT.js} +168 -168
  37. package/dist/assets/{input-CtLHwxEw.js → input-BGjNwUvf.js} +1 -1
  38. package/dist/assets/{label-YjU0jMtG.js → label-CKJXPwWx.js} +2 -2
  39. package/dist/assets/{mention-chips-ClRmijVb.js → mention-chips-BovBgzq0.js} +1 -1
  40. package/dist/assets/{rotate-ccw-2WnWy1fs.js → rotate-ccw-B7ntLtp4.js} +1 -1
  41. package/dist/assets/{select-DRgGQ-iP.js → select-DIma4_VX.js} +1 -1
  42. package/dist/assets/{sheet-CACWxbsc.js → sheet-C9tsiOQC.js} +1 -1
  43. package/dist/assets/skeleton-CyS6Uq5n.js +1 -0
  44. package/dist/assets/{tabs-BfOtoFWj.js → tabs-nc-7quf8.js} +1 -1
  45. package/dist/assets/{use-adapter-capabilities-JhD0-FlQ.js → use-adapter-capabilities-DiUfxjZz.js} +1 -1
  46. package/dist/assets/{use-copy-action-qHyHFl14.js → use-copy-action-RWCAx8p8.js} +1 -1
  47. package/dist/assets/{useHiddenSettings-Dz7GWNDr.js → useHiddenSettings-Be7MTSIM.js} +1 -1
  48. package/dist/index.html +39 -39
  49. package/dist/sw.js +1 -1
  50. package/package.json +1 -1
  51. package/dist/assets/skeleton-DCrngTtF.js +0 -1
@@ -1 +1 @@
1
- var ks=Object.defineProperty;var t=(n,c)=>ks(n,"name",{value:c,configurable:!0});import{i as as}from"./rolldown-runtime-ZpX3ckPj.js";import{G as Ps,Ra as As,St as m,Va as Ms,aa as A,ht as Ds,ia as _,za as Ts}from"./agent-avatar-url-BnmqahQ7.js";import{Bt as $e,Gt as ze,Ht as We,Vn as qs,ct as J,f as Ks,i as F,mt as Us,n as Es,pn as Os,r as Ls,un as He}from"./BreadcrumbContext-Bxr1TyKN.js";import{b as ls,v as Ye,y as Je}from"./label-YjU0jMtG.js";import{Ft as Qs,It as Vs,Mt as Bs,Nr as ee,Nt as Gs,Rr as $s,V as zs,jt as Ws,r as Hs,t as Ys,wt as Xe,x as he}from"./RoutineRunVariablesDialog-DE5hp-_u.js";import{t as Ze}from"./AgentAvatar-DZh8tNnK.js";import{a as Js,r as Xs}from"./checkbox-5wFlZdZn.js";import{l as X,t as Zs}from"./MarkdownEditor-D7suACD6.js";import{n as es,t as et}from"./tabs-BfOtoFWj.js";import{h as st}from"./StatusIcon-YdJnE47W.js";import{t as tt}from"./check-BiXfODpl.js";import{a as nt,s as rt}from"./ToastContext-Dh8dPdr5.js";import{s as cs}from"./clipboard-CTmezHYG.js";import{a as Z,c as je,l as ye,n as ve,r as be}from"./select-DRgGQ-iP.js";import{t as it}from"./heartbeats-Dae6h2SU.js";import{i as ot,o as at}from"./company-members-Dd6xBf6K.js";import{r as lt,t as ct}from"./card-PCL2aF_L.js";import{t as we}from"./EmptyState-DliXLd04.js";import{t as dt}from"./PageSkeleton-BZF4K6Hf.js";import{$ as ut,G as mt,Gt as pt,H as ft,J as gt,K as xt,Q as ht,U as jt,Vt as yt,W as vt,Wt as bt,X as wt,Y as Nt,Z as It,ct as Rt,lt as M,q as Ct,st as St}from"./index-D4MfEOIw.js";var l=as(Ms(),1),s=as(Ts(),1),_t=["coalesce_if_active","always_enqueue","skip_if_active"],Ft=["skip_missed","enqueue_missed_with_cap"],kt={coalesce_if_active:"If a run is already active, keep just one follow-up run queued.",always_enqueue:"Queue every trigger occurrence, even if the routine is already running.",skip_if_active:"Drop new trigger occurrences while a run is still active."},Pt={skip_missed:"Ignore windows that were missed while the scheduler or routine was paused.",enqueue_missed_with_cap:"Catch up missed schedule windows after recovery; sub-hourly schedules are combined into one catch-up run, slower schedules replay each missed window up to a cap."};function ss(n){n&&(n.style.height="auto",n.style.height=`${n.scrollHeight}px`)}t(ss,"autoResizeTextarea");var At="__built_in_routines",ts={sortField:"title",sortDir:"asc",groupBy:"folder",collapsedGroups:[]};function ns(n){try{const c=localStorage.getItem(n);if(c)return{...ts,...JSON.parse(c)}}catch{}return{...ts}}t(ns,"getRoutineViewState");function Mt(n,c){localStorage.setItem(n,JSON.stringify(c))}t(Mt,"saveRoutineViewState");function q(n){if(!n)return Number.NEGATIVE_INFINITY;const c=new Date(n).getTime();return Number.isFinite(c)?c:Number.NEGATIVE_INFINITY}t(q,"timestampValue");function rs(n,c){return(n??"").localeCompare(c??"",void 0,{sensitivity:"base"})}t(rs,"compareNullableText");function Dt(n){return{...n,description:n.description.trim()||null,projectId:n.projectId||null,folderId:n.folderId||null,assigneeAgentId:n.assigneeAgentId||null}}t(Dt,"buildRoutineMutationPayload");function Tt(n,c,d,b,g){if(c==="none")return[{key:"__all",label:null,items:n}];if(c==="folder"){const i=he(n,o=>o.folderId??"__unfiled");return Object.keys(i).sort((o,j)=>{if(o==="__unfiled"||j==="__unfiled")return o===j?0:o==="__unfiled"?1:-1;const w=g.get(o),I=g.get(j),O=(Number.isFinite(w?.position)?w.position:Number.POSITIVE_INFINITY)-(Number.isFinite(I?.position)?I.position:Number.POSITIVE_INFINITY);return O!==0?O:(w?.name??"Unknown folder").localeCompare(I?.name??"Unknown folder",void 0,{sensitivity:"base"})||o.localeCompare(j)}).map(o=>({key:o,label:o==="__unfiled"?"Unfiled":g.get(o)?.name??"Unknown folder",items:i[o]}))}if(c==="project"){const i=he(n,o=>o.projectId??"__no_project");return Object.keys(i).sort((o,j)=>{const w=o==="__no_project"?"No project":d.get(o)?.name??"Unknown project",I=j==="__no_project"?"No project":d.get(j)?.name??"Unknown project";return w.localeCompare(I)}).map(o=>({key:o,label:o==="__no_project"?"No project":d.get(o)?.name??"Unknown project",items:i[o]}))}const x=he(n,i=>i.assigneeAgentId??"__unassigned");return Object.keys(x).sort((i,o)=>{const j=i==="__unassigned"?"Unassigned":b.get(i)?.name??"Unknown agent",w=o==="__unassigned"?"Unassigned":b.get(o)?.name??"Unknown agent";return j.localeCompare(w)}).map(i=>({key:i,label:i==="__unassigned"?"Unassigned":b.get(i)?.name??"Unknown agent",items:x[i]}))}t(Tt,"buildRoutineGroups");function is(n){return n.originKind==="built_in_agent_bundle"}t(is,"isBuiltInRoutine");function qt(n,c,d,b,g){const x=n.filter(is),i=Tt(n.filter(o=>!is(o)),c,d,b,g).filter(o=>o.items.length>0).map(o=>x.length>0&&c==="none"&&o.key==="__all"?{...o,label:"Custom routines"}:o);return x.length===0?i:[...i,{key:At,label:"Built-in routines",items:x}]}t(qt,"buildRoutineSections");function Kt(n,c,d){const b=d==="asc"?1:-1;return[...n].sort((g,x)=>{let i=0;return c==="title"?i=rs(g.title,x.title):c==="created"?i=q(g.createdAt)-q(x.createdAt):c==="lastRun"?i=q(g.lastRun?.triggeredAt??g.lastTriggeredAt)-q(x.lastRun?.triggeredAt??x.lastTriggeredAt):i=q(g.updatedAt)-q(x.updatedAt),i!==0?i*b:rs(g.title,x.title)})}t(Kt,"sortRoutines");function os(n){return n==="runs"?"/routines?tab=runs":"/routines"}t(os,"buildRoutinesTabHref");function Ut({label:n,count:c,isOpen:d}){return(0,s.jsxs)("div",{className:`flex items-center gap-2 rounded-lg border border-border px-3 py-2${d?" mb-1":""}`,children:[(0,s.jsxs)(ls,{className:"flex items-center gap-1.5",children:[(0,s.jsx)(cs,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground transition-transform [[data-state=open]>&]:rotate-90"}),(0,s.jsx)("span",{className:"text-sm font-semibold uppercase tracking-wide",children:n})]}),(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:c})]})}t(Ut,"RoutineSectionHeader");function ln(){const{selectedCompanyId:n}=Ds(),{setBreadcrumbs:c}=Es(),d=As(),b=Ks(),[g,x]=qs(),{pushToast:i}=nt(),o=(0,l.useRef)(null),j=(0,l.useRef)(null),w=(0,l.useRef)(null),I=(0,l.useRef)(null),[O,K]=(0,l.useState)(!1),[se,L]=(0,l.useState)(null),[Q,te]=(0,l.useState)(null),[ds,Ne]=(0,l.useState)(!1),[ne,re]=(0,l.useState)(!1),[V,B]=(0,l.useState)([]),[Ie,Re]=(0,l.useState)([]),[us,Ce]=(0,l.useState)(null),[ms,Se]=(0,l.useState)(null),[k,ie]=(0,l.useState)(null),[G,$]=(0,l.useState)(!1),[_e,oe]=(0,l.useState)(!1),P=g.get("tab")==="runs"?"runs":"routines",[p,R]=(0,l.useState)({title:"",description:"",projectId:"",folderId:null,assigneeAgentId:"",priority:"medium",concurrencyPolicy:"coalesce_if_active",catchUpPolicy:"skip_missed",variables:[]}),z=n?`paperclip:routines-view:${n}`:"paperclip:routines-view",[u,Fe]=(0,l.useState)(()=>ns(z)),f=ht(g.get("folder"));(0,l.useEffect)(()=>{c([{label:"Routines"}])},[c]),(0,l.useEffect)(()=>{Fe(ns(z))},[z]);const{data:ke,isLoading:ps,error:ae}=A({queryKey:m.routines.list(n),queryFn:t(()=>X.list(n),"queryFn"),enabled:!!n}),{data:h,isLoading:Pe}=A({queryKey:m.folders.list(n,"routine"),queryFn:t(()=>M.list(n,"routine"),"queryFn"),enabled:!!n&&P==="routines"}),{data:C}=A({queryKey:m.agents.list(n),queryFn:t(()=>Ls.list(n),"queryFn"),enabled:!!n}),{data:S}=A({queryKey:m.projects.list(n,{includeArchived:!0}),queryFn:t(()=>st.list(n,{includeArchived:!0}),"queryFn"),enabled:!!n}),{data:Ae}=A({queryKey:m.access.companyUserDirectory(n),queryFn:t(()=>at.listUserDirectory(n),"queryFn"),enabled:!!n}),{data:le,isLoading:fs,error:gs}=A({queryKey:[...m.issues.list(n),"routine-executions"],queryFn:t(()=>He.list(n,{originKind:"routine_execution"}),"queryFn"),enabled:!!n&&P==="runs"}),Me=m.liveRuns(n),ce=pt({companyId:n,resourceKey:"live-runs",queryKey:Me,enabled:!!n&&P==="runs",refetchInterval:!1,leaderOnly:!0}),{data:de,dataUpdatedAt:xs}=A({queryKey:Me,queryFn:t(()=>it.liveRunsForCompany(n),"queryFn"),enabled:ce.enabled,refetchInterval:ce.refetchInterval});bt(ce,de,xs),(0,l.useEffect)(()=>{ss(j.current)},[p.title,G]);const hs=(0,l.useMemo)(()=>ot({agents:C,projects:(S??[]).filter(e=>!e.archivedAt),members:Ae?.users}),[C,Ae?.users,S]),N=_({mutationFn:t(()=>X.create(n,Dt(p)),"mutationFn"),onSuccess:t(async e=>{R({title:"",description:"",projectId:"",folderId:null,assigneeAgentId:"",priority:"medium",concurrencyPolicy:"coalesce_if_active",catchUpPolicy:"skip_missed",variables:[]}),$(!1),oe(!1),await d.invalidateQueries({queryKey:m.routines.list(n)}),i({title:"Routine created",body:e.assigneeAgentId?"Add the first trigger to turn it into a live workflow.":"Draft saved. Add a default agent before enabling automation.",tone:"success"}),b(`/routines/${e.id}?tab=triggers`)},"onSuccess")}),De=_({mutationFn:t(e=>M.create(n,{kind:"routine",...e}),"mutationFn"),onSuccess:t(async e=>{if(K(!1),L(null),await d.invalidateQueries({queryKey:m.folders.list(n,"routine")}),Ie.length>0){const r=Ie;Re([]);try{await Promise.all(r.map(a=>M.moveItem(n,{kind:"routine",itemId:a,folderId:e.id}))),await Promise.all([d.invalidateQueries({queryKey:m.routines.list(n)}),d.invalidateQueries({queryKey:m.folders.list(n,"routine")})])}catch(a){i({title:"Folder created, move failed",body:a instanceof Error?a.message:"Paperclip could not move the selected routines.",tone:"error"});return}}else H(e.id);i({title:"Folder created",body:e.name,tone:"success"})},"onSuccess"),onError:t(e=>{i({title:"Failed to save folder",body:e instanceof Error?e.message:"Paperclip could not save the folder.",tone:"error"})},"onError")}),ue=_({mutationFn:t(({folderId:e,payload:r})=>M.update(n,e,r),"mutationFn"),onSuccess:t(async()=>{K(!1),L(null),await d.invalidateQueries({queryKey:m.folders.list(n,"routine")})},"onSuccess"),onError:t(e=>{i({title:"Folder save failed",body:e instanceof Error?e.message:"Paperclip could not update the folder.",tone:"error"})},"onError")}),Te=_({mutationFn:t(e=>M.delete(n,e),"mutationFn"),onSuccess:t(async(e,r)=>{f===r&&H("all"),te(null),await Promise.all([d.invalidateQueries({queryKey:m.routines.list(n)}),d.invalidateQueries({queryKey:m.folders.list(n,"routine")})]),i({title:"Folder deleted",body:"Items moved to Unfiled.",tone:"success"})},"onSuccess"),onError:t(e=>{i({title:"Folder delete failed",body:e instanceof Error?e.message:"Paperclip could not delete the folder.",tone:"error"})},"onError")}),qe=_({mutationFn:t(({itemId:e,folderId:r})=>M.moveItem(n,{kind:"routine",itemId:e,folderId:r}),"mutationFn"),onSuccess:t(async()=>{await Promise.all([d.invalidateQueries({queryKey:m.routines.list(n)}),d.invalidateQueries({queryKey:m.folders.list(n,"routine")})])},"onSuccess"),onError:t(e=>{i({title:"Move failed",body:e instanceof Error?e.message:"Paperclip could not move the routine.",tone:"error"})},"onError")}),js=_({mutationFn:t(({id:e,data:r})=>He.update(e,r),"mutationFn"),onSuccess:t(async()=>{await d.invalidateQueries({queryKey:[...m.issues.list(n),"routine-executions"]})},"onSuccess")}),Ke=_({mutationFn:t(({id:e,status:r})=>X.update(e,{status:r}),"mutationFn"),onMutate:t(({id:e})=>{Se(e)},"onMutate"),onSuccess:t(async(e,r)=>{await Promise.all([d.invalidateQueries({queryKey:m.routines.list(n)}),d.invalidateQueries({queryKey:m.routines.detail(r.id)})])},"onSuccess"),onSettled:t(()=>{Se(null)},"onSettled"),onError:t(e=>{i({title:"Failed to update routine",body:e instanceof Error?e.message:"Paperclip could not update the routine.",tone:"error"})},"onError")}),Ue=_({mutationFn:t(({id:e,data:r})=>X.run(e,{...r?.variables&&Object.keys(r.variables).length>0?{variables:r.variables}:{},...r?.assigneeAgentId!==void 0?{assigneeAgentId:r.assigneeAgentId}:{},...r?.projectId!==void 0?{projectId:r.projectId}:{},...r?.executionWorkspaceId!==void 0?{executionWorkspaceId:r.executionWorkspaceId}:{},...r?.executionWorkspacePreference!==void 0?{executionWorkspacePreference:r.executionWorkspacePreference}:{},...r?.executionWorkspaceSettings!==void 0?{executionWorkspaceSettings:r.executionWorkspaceSettings}:{}}),"mutationFn"),onMutate:t(({id:e})=>{Ce(e)},"onMutate"),onSuccess:t(async(e,{id:r})=>{ie(null),await Promise.all([d.invalidateQueries({queryKey:m.routines.list(n)}),d.invalidateQueries({queryKey:m.routines.detail(r)})])},"onSuccess"),onSettled:t(()=>{Ce(null)},"onSettled"),onError:t(e=>{i({title:"Routine run failed",body:e instanceof Error?e.message:"Paperclip could not start the routine run.",tone:"error"})},"onError")}),me=(0,l.useMemo)(()=>Gs(),[G]),ys=(0,l.useMemo)(()=>Ws(),[G]),vs=(0,l.useMemo)(()=>Qs((C??[]).filter(e=>e.status!=="terminated"),me).map(e=>({id:e.id,label:e.name,searchText:`${e.name} ${e.role} ${e.title??""}`})),[C,me]),bs=(0,l.useMemo)(()=>(S??[]).filter(e=>!e.archivedAt).map(e=>({id:e.id,label:e.name,searchText:e.description??""})),[S]),U=(0,l.useMemo)(()=>new Map((C??[]).map(e=>[e.id,e])),[C]),E=(0,l.useMemo)(()=>new Map((S??[]).map(e=>[e.id,e])),[S]),Ee=(0,l.useMemo)(()=>new Map((h?.folders??[]).map(e=>[e.id,e])),[h]),ws=(0,l.useMemo)(()=>zs(de,le),[de,le]),y=(0,l.useMemo)(()=>(ke??[]).filter(e=>e.status!=="archived"),[ke]),Oe=(0,l.useMemo)(()=>u.groupBy!=="folder"||f==="all"?y:f==="unfiled"?y.filter(e=>!e.folderId):y.filter(e=>e.folderId===f),[f,u.groupBy,y]),pe=(0,l.useMemo)(()=>{if(!h)return h;const e=new Map;let r=0;for(const a of y)a.folderId?e.set(a.folderId,(e.get(a.folderId)??0)+1):r+=1;return{...h,allCount:y.length,unfiledCount:r,folders:h.folders.map(a=>({...a,itemCount:e.get(a.id)??0}))}},[h,y]),D=(0,l.useMemo)(()=>Kt(Oe,u.sortField,u.sortDir),[Oe,u.sortDir,u.sortField]),Ns=(0,l.useMemo)(()=>qt(D,u.groupBy,E,U,Ee),[U,Ee,E,u.groupBy,D]),Is=(0,l.useMemo)(()=>Os("Recent Runs",os("runs"),"issues"),[]),Le=p.assigneeAgentId?U.get(p.assigneeAgentId)??null:null,Qe=p.projectId?E.get(p.projectId)??null:null,Ve=ut(h?.folders??[],f),W=(h?.folders.length??0)>0,fe=P==="routines"&&u.groupBy==="folder"&&W;function ge(e){Fe(r=>{const a={...r,...e};return Mt(z,a),a})}t(ge,"updateRoutineView");function Be(e){const r=e==="runs"?"runs":"routines";(0,l.startTransition)(()=>{b(os(r))})}t(Be,"handleTabChange");function H(e){x(r=>{const a=new URLSearchParams(r),v=It(e);return v?a.set("folder",v):a.delete("folder"),a})}t(H,"setFolderSelection");function T(e=[]){Re(e),L(null),K(!0)}t(T,"openCreateFolder");function Ge(){R(e=>({...e,folderId:f==="all"||f==="unfiled"?null:f})),$(!0)}t(Ge,"openCreateRoutine");async function Rs(e){const r=V;if(r.length!==0)try{await Promise.all(r.map(a=>M.moveItem(n,{kind:"routine",itemId:a,folderId:e}))),B([]),re(!1),await Promise.all([d.invalidateQueries({queryKey:m.routines.list(n)}),d.invalidateQueries({queryKey:m.folders.list(n,"routine")})]),i({title:"Routines moved",body:`${r.length} routine${r.length===1?"":"s"} filed.`,tone:"success"})}catch(a){i({title:"Failed to move routines",body:a instanceof Error?a.message:"Paperclip could not move the selected routines.",tone:"error"})}}t(Rs,"moveSelectedRoutines");function Cs(e){ie(e)}t(Cs,"handleRunNow");function Ss(e,r){if(!r&&!e.assigneeAgentId){i({title:"Default agent required",body:"Set a default agent before enabling routine automation.",tone:"warn"});return}Ke.mutate({id:e.id,status:Rt(e.status,!r)})}t(Ss,"handleToggleEnabled");function _s(e){Ke.mutate({id:e.id,status:e.status==="archived"?"active":"archived"})}return t(_s,"handleToggleArchived"),n?ps?(0,s.jsx)(dt,{variant:"issues-list"}):(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-end sm:justify-between",children:[(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:"Routines"}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"Recurring work definitions that materialize into auditable execution tasks."})]}),(0,s.jsxs)(F,{onClick:Ge,children:[(0,s.jsx)(J,{className:"mr-2 h-4 w-4"}),"Create routine"]})]}),(0,s.jsxs)(et,{value:P,onValueChange:Be,children:[(0,s.jsx)(yt,{align:"start",value:P,onValueChange:Be,items:[{value:"routines",label:"Routines"},{value:"runs",label:"Recent Runs"}]}),(0,s.jsxs)(es,{value:"routines",className:"space-y-4",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsxs)("p",{className:"text-sm text-muted-foreground",children:[y.length," routine",y.length===1?"":"s"]}),(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[(0,s.jsxs)($e,{children:[(0,s.jsx)(ze,{asChild:!0,children:(0,s.jsxs)(F,{variant:"ghost",size:"sm",className:"text-xs",title:"Sort",children:[(0,s.jsx)($s,{className:"h-3.5 w-3.5 sm:h-3 sm:w-3 sm:mr-1"}),(0,s.jsx)("span",{className:"hidden sm:inline",children:"Sort"})]})}),(0,s.jsx)(We,{align:"end",className:"w-44 p-0",children:(0,s.jsx)("div",{className:"p-2 space-y-0.5",children:[["updated","Updated"],["created","Created"],["lastRun","Last run"],["title","Title"]].map(([e,r])=>(0,s.jsxs)("button",{className:`flex w-full items-center justify-between rounded-sm px-2 py-1.5 text-sm ${u.sortField===e?"bg-accent/50 text-foreground":"text-muted-foreground hover:bg-accent/50"}`,onClick:t(()=>{ge(u.sortField===e?{sortDir:u.sortDir==="asc"?"desc":"asc"}:{sortField:e,sortDir:e==="title"?"asc":"desc"})},"onClick"),children:[(0,s.jsx)("span",{children:r}),u.sortField===e?(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:u.sortDir==="asc"?"Asc":"Desc"}):null]},e))})})]}),(0,s.jsxs)($e,{children:[(0,s.jsx)(ze,{asChild:!0,children:(0,s.jsxs)(F,{variant:"ghost",size:"sm",className:"text-xs",title:"Group",children:[(0,s.jsx)(Us,{className:"h-3.5 w-3.5 sm:h-3 sm:w-3 sm:mr-1"}),(0,s.jsx)("span",{className:"hidden sm:inline",children:"Group"})]})}),(0,s.jsx)(We,{align:"end",className:"w-44 p-0",children:(0,s.jsx)("div",{className:"p-2 space-y-0.5",children:[["folder","Folder"],["project","Project"],["assignee","Agent"],["none","None"]].map(([e,r])=>(0,s.jsxs)("button",{className:`flex w-full items-center justify-between rounded-sm px-2 py-1.5 text-sm ${u.groupBy===e?"bg-accent/50 text-foreground":"text-muted-foreground hover:bg-accent/50"}`,onClick:t(()=>ge({groupBy:e,collapsedGroups:[]}),"onClick"),children:[(0,s.jsx)("span",{children:r}),u.groupBy===e?(0,s.jsx)(tt,{className:"h-3.5 w-3.5"}):null]},e))})})]}),u.groupBy==="folder"&&!W?(0,s.jsxs)(F,{variant:"outline",size:"sm",onClick:t(()=>T(),"onClick"),children:[(0,s.jsx)(J,{className:"mr-2 h-3.5 w-3.5"}),"New folder"]}):null,fe?(0,s.jsx)(F,{variant:"ghost",size:"sm",className:"text-xs",onClick:t(()=>re(e=>!e),"onClick"),children:ne?"Done":"Select"}):null]})]}),u.groupBy==="folder"?(0,s.jsx)("div",{className:"md:hidden",children:(0,s.jsx)(mt,{result:pe,selection:f,allLabel:"All routines",onClick:t(()=>Ne(!0),"onClick")})}):null]}),(0,s.jsx)(es,{value:"runs",children:(0,s.jsx)(Hs,{issues:le??[],isLoading:fs,error:gs,agents:C,projects:S,liveIssueIds:ws,viewStateKey:"paperclip:routine-recent-runs-view",issueLinkState:Is,onUpdateIssue:t((e,r)=>js.mutate({id:e,data:r}),"onUpdateIssue")})})]}),(0,s.jsx)(Xs,{open:G,onOpenChange:t(e=>{N.isPending||$(e)},"onOpenChange"),children:(0,s.jsxs)(Js,{showCloseButton:!1,className:"flex max-h-(--sz-calc-18) max-w-3xl flex-col gap-0 overflow-hidden p-0",children:[(0,s.jsxs)("div",{className:"shrink-0 flex flex-wrap items-center justify-between gap-3 border-b border-border/60 px-5 py-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs font-medium uppercase tracking-(--tracking-caps) text-muted-foreground",children:"New routine"}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"Define the recurring work first. Default project and agent are optional for draft routines."})]}),(0,s.jsx)(F,{variant:"ghost",size:"sm",onClick:t(()=>{$(!1),oe(!1)},"onClick"),disabled:N.isPending,children:"Cancel"})]}),(0,s.jsxs)("div",{className:"min-h-0 flex-1 overflow-y-auto",children:[(0,s.jsx)("div",{className:"px-5 pt-5 pb-3",children:(0,s.jsx)("textarea",{ref:j,className:"w-full resize-none overflow-hidden bg-transparent text-xl font-semibold outline-none placeholder:text-muted-foreground/50",placeholder:"Routine title",rows:1,value:p.title,onChange:t(e=>{R(r=>({...r,title:e.target.value})),ss(e.target)},"onChange"),onKeyDown:t(e=>{if(e.key==="Enter"&&!e.metaKey&&!e.ctrlKey&&!e.nativeEvent.isComposing){e.preventDefault(),o.current?.focus();return}e.key==="Tab"&&!e.shiftKey&&(e.preventDefault(),p.assigneeAgentId?p.projectId?o.current?.focus():I.current?.focus():w.current?.focus())},"onKeyDown"),autoFocus:!0})}),(0,s.jsx)("div",{className:"px-5 pb-3",children:(0,s.jsx)("div",{className:"overflow-x-auto overscroll-x-contain",children:(0,s.jsxs)("div",{className:"inline-flex min-w-full flex-wrap items-center gap-2 text-sm text-muted-foreground sm:min-w-max sm:flex-nowrap",children:[(0,s.jsx)("span",{children:"For"}),(0,s.jsx)(Xe,{ref:w,value:p.assigneeAgentId,options:vs,recentOptionIds:me,placeholder:"Responsible",noneLabel:"No responsible",searchPlaceholder:"Search responsible...",emptyMessage:"No responsible found.",onChange:t(e=>{e&&Vs(e),R(r=>({...r,assigneeAgentId:e}))},"onChange"),onConfirm:t(()=>{p.projectId?o.current?.focus():I.current?.focus()},"onConfirm"),renderTriggerValue:t(e=>e?Le?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Ze,{agent:Le,size:16,className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,s.jsx)("span",{className:"truncate",children:e.label})]}):(0,s.jsx)("span",{className:"truncate",children:e.label}):(0,s.jsx)("span",{className:"text-muted-foreground",children:"Responsible"}),"renderTriggerValue"),renderOption:t(e=>{if(!e.id)return(0,s.jsx)("span",{className:"truncate",children:e.label});const r=U.get(e.id);return(0,s.jsxs)(s.Fragment,{children:[r?(0,s.jsx)(Ze,{agent:r,size:16,className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}):null,(0,s.jsx)("span",{className:"truncate",children:e.label})]})},"renderOption")}),(0,s.jsx)("span",{children:"in"}),(0,s.jsx)(Xe,{ref:I,value:p.projectId,options:bs,recentOptionIds:ys,placeholder:"Project",noneLabel:"No project",searchPlaceholder:"Search projects...",emptyMessage:"No projects found.",onChange:t(e=>{e&&Bs(e),R(r=>({...r,projectId:e}))},"onChange"),onConfirm:t(()=>o.current?.focus(),"onConfirm"),renderTriggerValue:t(e=>e&&Qe?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"h-3.5 w-3.5 shrink-0 rounded-sm",style:{backgroundColor:Qe.color??"var(--project-none)"}}),(0,s.jsx)("span",{className:"truncate",children:e.label})]}):(0,s.jsx)("span",{className:"text-muted-foreground",children:"Project"}),"renderTriggerValue"),renderOption:t(e=>{if(!e.id)return(0,s.jsx)("span",{className:"truncate",children:e.label});const r=E.get(e.id);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"h-3.5 w-3.5 shrink-0 rounded-sm",style:{backgroundColor:r?.color??"var(--project-none)"}}),(0,s.jsx)("span",{className:"truncate",children:e.label})]})},"renderOption")}),(0,s.jsx)("span",{children:"filed in"}),(0,s.jsxs)(ve,{value:p.folderId??"__unfiled",onValueChange:t(e=>R(r=>({...r,folderId:e==="__unfiled"?null:e})),"onValueChange"),children:[(0,s.jsx)(je,{className:"h-8 w-auto min-w-32 border-0 bg-muted/50 px-2 shadow-none",children:(0,s.jsx)(ye,{})}),(0,s.jsxs)(be,{children:[(0,s.jsx)(Z,{value:"__unfiled",children:"Unfiled"}),(h?.folders??[]).map(e=>(0,s.jsx)(Z,{value:e.id,children:e.name},e.id))]})]})]})})}),(0,s.jsx)("div",{className:"border-t border-border/60 px-5 py-4",children:(0,s.jsx)(Zs,{ref:o,value:p.description,onChange:t(e=>R(r=>({...r,description:e})),"onChange"),placeholder:"Add instructions...",bordered:!1,contentClassName:"min-h-(--sz-160px) text-sm text-muted-foreground",mentions:hs,onSubmit:t(()=>{!N.isPending&&p.title.trim()&&p.projectId&&p.assigneeAgentId&&N.mutate()},"onSubmit")})}),(0,s.jsx)("div",{className:"border-t border-border/60 px-5 py-3",children:(0,s.jsxs)(Ye,{open:_e,onOpenChange:oe,children:[(0,s.jsxs)(ls,{className:"flex w-full items-center justify-between text-left",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm font-medium",children:"Advanced delivery settings"}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"Keep policy controls secondary to the work definition."})]}),_e?(0,s.jsx)(rt,{className:"h-4 w-4 text-muted-foreground"}):(0,s.jsx)(cs,{className:"h-4 w-4 text-muted-foreground"})]}),(0,s.jsx)(Je,{className:"pt-3",children:(0,s.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("p",{className:"text-xs font-medium uppercase tracking-(--tracking-caps) text-muted-foreground",children:"Concurrency"}),(0,s.jsxs)(ve,{value:p.concurrencyPolicy,onValueChange:t(e=>R(r=>({...r,concurrencyPolicy:e})),"onValueChange"),children:[(0,s.jsx)(je,{children:(0,s.jsx)(ye,{})}),(0,s.jsx)(be,{children:_t.map(e=>(0,s.jsx)(Z,{value:e,children:e.replaceAll("_"," ")},e))})]}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:kt[p.concurrencyPolicy]})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("p",{className:"text-xs font-medium uppercase tracking-(--tracking-caps) text-muted-foreground",children:"Catch-up"}),(0,s.jsxs)(ve,{value:p.catchUpPolicy,onValueChange:t(e=>R(r=>({...r,catchUpPolicy:e})),"onValueChange"),children:[(0,s.jsx)(je,{children:(0,s.jsx)(ye,{})}),(0,s.jsx)(be,{children:Ft.map(e=>(0,s.jsx)(Z,{value:e,children:e.replaceAll("_"," ")},e))})]}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:Pt[p.catchUpPolicy]})]})]})})]})})]}),(0,s.jsxs)("div",{className:"shrink-0 flex flex-col gap-3 border-t border-border/60 px-5 py-4 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsx)("div",{className:"text-sm text-muted-foreground",children:"After creation, Paperclip takes you straight to trigger setup. Draft routines stay paused until you add a default agent."}),(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:items-end",children:[(0,s.jsxs)(F,{onClick:t(()=>N.mutate(),"onClick"),disabled:N.isPending||!p.title.trim(),children:[(0,s.jsx)(J,{className:"mr-2 h-4 w-4"}),N.isPending?"Creating...":"Create routine"]}),N.isError?(0,s.jsx)("p",{className:"text-sm text-destructive",children:N.error instanceof Error?N.error.message:"Failed to create routine"}):null]})]})]})}),ae?(0,s.jsx)(ct,{children:(0,s.jsx)(lt,{className:"pt-6 text-sm text-destructive",children:ae instanceof Error?ae.message:"Failed to load routines"})}):null,P==="routines"?(0,s.jsxs)("div",{className:Ps(fe&&"flex gap-4"),children:[fe?(0,s.jsx)(Ct,{result:pe,selection:f,allLabel:"All routines",itemLabelPlural:"routines",loading:Pe,onSelect:H,onCreate:t(()=>T(),"onCreate"),onRename:t((e,r)=>ue.mutate({folderId:e.id,payload:{name:r}}),"onRename"),onEdit:t(e=>{L(e),K(!0)},"onEdit"),onDelete:te}):null,(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[u.groupBy==="folder"&&W?(0,s.jsx)("div",{className:"mb-3 flex flex-wrap items-center gap-2",children:f==="all"?(0,s.jsx)(Et,{label:"All routines",count:D.length}):(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-2 text-sm",children:[(0,s.jsx)(gt,{color:Ve?.color}),(0,s.jsx)("span",{className:"truncate font-medium",children:f==="unfiled"?"Unfiled":Ve?.name??"Folder"}),(0,s.jsxs)("span",{className:"text-muted-foreground",children:[D.length," routine",D.length===1?"":"s"]})]})}):null,u.groupBy==="folder"&&!W&&!Pe&&y.length>0?(0,s.jsx)(ft,{storageKey:`paperclip:routines-folder-nudge:${n??"none"}`,itemLabelPlural:"routines",onCreateFolder:t(()=>T(),"onCreateFolder")}):null,ne?(0,s.jsx)(jt,{selectedCount:V.length,folders:h?.folders??[],onMove:t(e=>{Rs(e)},"onMove"),onCreateAndMove:t(()=>T(V),"onCreateAndMove"),onClear:t(()=>B([]),"onClear"),onDone:t(()=>{re(!1),B([])},"onDone")}):null,y.length===0?(0,s.jsx)("div",{className:"py-12",children:(0,s.jsx)(we,{icon:ee,message:"No active routines. Use Create routine to define the first recurring workflow."})}):D.length===0?(0,s.jsxs)("div",{className:"py-12",children:[(0,s.jsx)(we,{icon:ee,message:f==="all"?"No routines match this view.":"This folder is empty."}),f!=="all"?(0,s.jsx)("div",{className:"mt-3 flex justify-center",children:(0,s.jsxs)(F,{size:"sm",onClick:Ge,children:[(0,s.jsx)(J,{className:"mr-2 h-3.5 w-3.5"}),"New routine in this folder"]})}):null]}):(0,s.jsx)("div",{className:"flex flex-col gap-3",children:Ns.map(e=>{const r=!u.collapsedGroups.includes(e.key);return(0,s.jsxs)(Ye,{open:r,onOpenChange:t(a=>{ge({collapsedGroups:a?u.collapsedGroups.filter(v=>v!==e.key):[...u.collapsedGroups,e.key]})},"onOpenChange"),children:[e.label?(0,s.jsx)(Ut,{label:e.label,count:e.items.length,isOpen:r}):null,(0,s.jsx)(Je,{children:e.items.map(a=>(0,s.jsx)(St,{routine:a,projectById:E,agentById:U,runningRoutineId:us,statusMutationRoutineId:ms,href:`/routines/${a.id}`,runNowButton:!0,divider:!1,onRunNow:Cs,onToggleEnabled:Ss,onToggleArchived:_s,selectMode:ne,selected:V.includes(a.id),onSelectChange:t((v,xe)=>{B(Y=>xe?Array.from(new Set([...Y,v.id])):Y.filter(Fs=>Fs!==v.id))},"onSelectChange"),extraMenuItems:(0,s.jsx)(wt,{folders:h?.folders??[],currentFolderId:a.folderId??null,onMove:t(v=>{const xe=a.folderId??null;qe.mutate({itemId:a.id,folderId:v}),i({title:"Routine moved",body:v?`Moved "${a.title}" to ${h?.folders.find(Y=>Y.id===v)?.name??"folder"}.`:`Moved "${a.title}" to Unfiled.`,tone:"success",action:{label:"Undo",onClick:t(()=>qe.mutate({itemId:a.id,folderId:xe}),"onClick")}})},"onMove"),onCreateAndMove:t(()=>T([a.id]),"onCreateAndMove")})},a.id))})]},e.key)})})]})]}):null,(0,s.jsx)(xt,{open:O,kind:"routine",folder:se,pending:De.isPending||ue.isPending,onOpenChange:K,onSubmit:t(e=>{se?ue.mutate({folderId:se.id,payload:e}):De.mutate(e)},"onSubmit")}),(0,s.jsx)(vt,{open:Q!==null,folder:Q,itemLabelPlural:"routines",pending:Te.isPending,onOpenChange:t(e=>{e||te(null)},"onOpenChange"),onConfirm:t(()=>{Q&&Te.mutate(Q.id)},"onConfirm")}),(0,s.jsx)(Nt,{open:ds,onOpenChange:Ne,result:pe,selection:f,allLabel:"All routines",itemLabelPlural:"Routines",onSelect:H,onCreate:t(()=>T(),"onCreate")}),(0,s.jsx)(Ys,{open:k!==null,onOpenChange:t(e=>{e||ie(null)},"onOpenChange"),companyId:n,routineName:k?.title??null,agents:C??[],projects:S??[],defaultProjectId:k?.projectId??null,defaultAssigneeAgentId:k?.assigneeAgentId??null,variables:k?.variables??[],isPending:Ue.isPending,onSubmit:t(e=>{k&&Ue.mutate({id:k.id,data:e})},"onSubmit")})]}):(0,s.jsx)(we,{icon:ee,message:"Select a company to view routines."})}t(ln,"Routines");function Et({label:n,count:c}){return(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-2 text-sm",children:[(0,s.jsx)(ee,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,s.jsx)("span",{className:"truncate font-medium",children:n}),(0,s.jsxs)("span",{className:"text-muted-foreground",children:[c," routine",c===1?"":"s"]})]})}t(Et,"FolderIconHeader");export{ln as Routines};
1
+ var ks=Object.defineProperty;var t=(n,c)=>ks(n,"name",{value:c,configurable:!0});import{i as as}from"./rolldown-runtime-ZpX3ckPj.js";import{Ba as Ps,G as As,Ha as Ms,St as m,aa as _,ht as Ds,oa as A,za as Ts}from"./agent-avatar-url-Dp-4-Emx.js";import{Bt as $e,Gt as ze,Ht as We,Vn as qs,ct as J,f as Ks,i as F,mt as Us,n as Es,pn as Os,r as Ls,un as He}from"./BreadcrumbContext-CIC8QOSJ.js";import{b as ls,v as Ye,y as Je}from"./label-CKJXPwWx.js";import{Ft as Qs,It as Bs,Mt as Vs,Nr as ee,Nt as Gs,Rr as $s,V as zs,jt as Ws,r as Hs,t as Ys,wt as Xe,x as he}from"./RoutineRunVariablesDialog-TmqPj_PL.js";import{t as Ze}from"./AgentAvatar-Cy7DadMK.js";import{a as Js,r as Xs}from"./checkbox-DVrU8RYw.js";import{l as X,t as Zs}from"./MarkdownEditor-nPcj3w4g.js";import{n as es,t as et}from"./tabs-nc-7quf8.js";import{h as st}from"./StatusIcon-PIDWeOS3.js";import{t as tt}from"./check-AN9f-5s7.js";import{a as nt,s as rt}from"./ToastContext-B6w8XXdu.js";import{s as cs}from"./clipboard-Bj1LrAus.js";import{a as Z,c as je,l as ye,n as ve,r as be}from"./select-DIma4_VX.js";import{t as it}from"./heartbeats-BoD7FLml.js";import{i as ot,o as at}from"./company-members-B3Kl56Wi.js";import{r as lt,t as ct}from"./card-Byu34cBe.js";import{t as we}from"./EmptyState-Dvu_j1Dk.js";import{t as dt}from"./PageSkeleton-B858kNMV.js";import{$ as ut,G as mt,Gt as pt,H as ft,J as gt,K as xt,Q as ht,U as jt,Vt as yt,W as vt,Wt as bt,X as wt,Y as Nt,Z as It,ct as Rt,lt as M,q as Ct,st as St}from"./index-BVwUuuxT.js";var l=as(Ms(),1),s=as(Ps(),1),_t=["coalesce_if_active","always_enqueue","skip_if_active"],Ft=["skip_missed","enqueue_missed_with_cap"],kt={coalesce_if_active:"If a run is already active, keep just one follow-up run queued.",always_enqueue:"Queue every trigger occurrence, even if the routine is already running.",skip_if_active:"Drop new trigger occurrences while a run is still active."},Pt={skip_missed:"Ignore windows that were missed while the scheduler or routine was paused.",enqueue_missed_with_cap:"Catch up missed schedule windows after recovery; sub-hourly schedules are combined into one catch-up run, slower schedules replay each missed window up to a cap."};function ss(n){n&&(n.style.height="auto",n.style.height=`${n.scrollHeight}px`)}t(ss,"autoResizeTextarea");var At="__built_in_routines",ts={sortField:"title",sortDir:"asc",groupBy:"folder",collapsedGroups:[]};function ns(n){try{const c=localStorage.getItem(n);if(c)return{...ts,...JSON.parse(c)}}catch{}return{...ts}}t(ns,"getRoutineViewState");function Mt(n,c){localStorage.setItem(n,JSON.stringify(c))}t(Mt,"saveRoutineViewState");function q(n){if(!n)return Number.NEGATIVE_INFINITY;const c=new Date(n).getTime();return Number.isFinite(c)?c:Number.NEGATIVE_INFINITY}t(q,"timestampValue");function rs(n,c){return(n??"").localeCompare(c??"",void 0,{sensitivity:"base"})}t(rs,"compareNullableText");function Dt(n){return{...n,description:n.description.trim()||null,projectId:n.projectId||null,folderId:n.folderId||null,assigneeAgentId:n.assigneeAgentId||null}}t(Dt,"buildRoutineMutationPayload");function Tt(n,c,d,b,g){if(c==="none")return[{key:"__all",label:null,items:n}];if(c==="folder"){const i=he(n,o=>o.folderId??"__unfiled");return Object.keys(i).sort((o,j)=>{if(o==="__unfiled"||j==="__unfiled")return o===j?0:o==="__unfiled"?1:-1;const w=g.get(o),I=g.get(j),O=(Number.isFinite(w?.position)?w.position:Number.POSITIVE_INFINITY)-(Number.isFinite(I?.position)?I.position:Number.POSITIVE_INFINITY);return O!==0?O:(w?.name??"Unknown folder").localeCompare(I?.name??"Unknown folder",void 0,{sensitivity:"base"})||o.localeCompare(j)}).map(o=>({key:o,label:o==="__unfiled"?"Unfiled":g.get(o)?.name??"Unknown folder",items:i[o]}))}if(c==="project"){const i=he(n,o=>o.projectId??"__no_project");return Object.keys(i).sort((o,j)=>{const w=o==="__no_project"?"No project":d.get(o)?.name??"Unknown project",I=j==="__no_project"?"No project":d.get(j)?.name??"Unknown project";return w.localeCompare(I)}).map(o=>({key:o,label:o==="__no_project"?"No project":d.get(o)?.name??"Unknown project",items:i[o]}))}const x=he(n,i=>i.assigneeAgentId??"__unassigned");return Object.keys(x).sort((i,o)=>{const j=i==="__unassigned"?"Unassigned":b.get(i)?.name??"Unknown agent",w=o==="__unassigned"?"Unassigned":b.get(o)?.name??"Unknown agent";return j.localeCompare(w)}).map(i=>({key:i,label:i==="__unassigned"?"Unassigned":b.get(i)?.name??"Unknown agent",items:x[i]}))}t(Tt,"buildRoutineGroups");function is(n){return n.originKind==="built_in_agent_bundle"}t(is,"isBuiltInRoutine");function qt(n,c,d,b,g){const x=n.filter(is),i=Tt(n.filter(o=>!is(o)),c,d,b,g).filter(o=>o.items.length>0).map(o=>x.length>0&&c==="none"&&o.key==="__all"?{...o,label:"Custom routines"}:o);return x.length===0?i:[...i,{key:At,label:"Built-in routines",items:x}]}t(qt,"buildRoutineSections");function Kt(n,c,d){const b=d==="asc"?1:-1;return[...n].sort((g,x)=>{let i=0;return c==="title"?i=rs(g.title,x.title):c==="created"?i=q(g.createdAt)-q(x.createdAt):c==="lastRun"?i=q(g.lastRun?.triggeredAt??g.lastTriggeredAt)-q(x.lastRun?.triggeredAt??x.lastTriggeredAt):i=q(g.updatedAt)-q(x.updatedAt),i!==0?i*b:rs(g.title,x.title)})}t(Kt,"sortRoutines");function os(n){return n==="runs"?"/routines?tab=runs":"/routines"}t(os,"buildRoutinesTabHref");function Ut({label:n,count:c,isOpen:d}){return(0,s.jsxs)("div",{className:`flex items-center gap-2 rounded-lg border border-border px-3 py-2${d?" mb-1":""}`,children:[(0,s.jsxs)(ls,{className:"flex items-center gap-1.5",children:[(0,s.jsx)(cs,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground transition-transform [[data-state=open]>&]:rotate-90"}),(0,s.jsx)("span",{className:"text-sm font-semibold uppercase tracking-wide",children:n})]}),(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:c})]})}t(Ut,"RoutineSectionHeader");function ln(){const{selectedCompanyId:n}=Ds(),{setBreadcrumbs:c}=Es(),d=Ts(),b=Ks(),[g,x]=qs(),{pushToast:i}=nt(),o=(0,l.useRef)(null),j=(0,l.useRef)(null),w=(0,l.useRef)(null),I=(0,l.useRef)(null),[O,K]=(0,l.useState)(!1),[se,L]=(0,l.useState)(null),[Q,te]=(0,l.useState)(null),[ds,Ne]=(0,l.useState)(!1),[ne,re]=(0,l.useState)(!1),[B,V]=(0,l.useState)([]),[Ie,Re]=(0,l.useState)([]),[us,Ce]=(0,l.useState)(null),[ms,Se]=(0,l.useState)(null),[k,ie]=(0,l.useState)(null),[G,$]=(0,l.useState)(!1),[_e,oe]=(0,l.useState)(!1),P=g.get("tab")==="runs"?"runs":"routines",[p,R]=(0,l.useState)({title:"",description:"",projectId:"",folderId:null,assigneeAgentId:"",priority:"medium",concurrencyPolicy:"coalesce_if_active",catchUpPolicy:"skip_missed",variables:[]}),z=n?`paperclip:routines-view:${n}`:"paperclip:routines-view",[u,Fe]=(0,l.useState)(()=>ns(z)),f=ht(g.get("folder"));(0,l.useEffect)(()=>{c([{label:"Routines"}])},[c]),(0,l.useEffect)(()=>{Fe(ns(z))},[z]);const{data:ke,isLoading:ps,error:ae}=A({queryKey:m.routines.list(n),queryFn:t(()=>X.list(n),"queryFn"),enabled:!!n}),{data:h,isLoading:Pe}=A({queryKey:m.folders.list(n,"routine"),queryFn:t(()=>M.list(n,"routine"),"queryFn"),enabled:!!n&&P==="routines"}),{data:C}=A({queryKey:m.agents.list(n),queryFn:t(()=>Ls.list(n),"queryFn"),enabled:!!n}),{data:S}=A({queryKey:m.projects.list(n,{includeArchived:!0}),queryFn:t(()=>st.list(n,{includeArchived:!0}),"queryFn"),enabled:!!n}),{data:Ae}=A({queryKey:m.access.companyUserDirectory(n),queryFn:t(()=>at.listUserDirectory(n),"queryFn"),enabled:!!n}),{data:le,isLoading:fs,error:gs}=A({queryKey:[...m.issues.list(n),"routine-executions"],queryFn:t(()=>He.list(n,{originKind:"routine_execution"}),"queryFn"),enabled:!!n&&P==="runs"}),Me=m.liveRuns(n),ce=pt({companyId:n,resourceKey:"live-runs",queryKey:Me,enabled:!!n&&P==="runs",refetchInterval:!1,leaderOnly:!0}),{data:de,dataUpdatedAt:xs}=A({queryKey:Me,queryFn:t(()=>it.liveRunsForCompany(n),"queryFn"),enabled:ce.enabled,refetchInterval:ce.refetchInterval});bt(ce,de,xs),(0,l.useEffect)(()=>{ss(j.current)},[p.title,G]);const hs=(0,l.useMemo)(()=>ot({agents:C,projects:(S??[]).filter(e=>!e.archivedAt),members:Ae?.users}),[C,Ae?.users,S]),N=_({mutationFn:t(()=>X.create(n,Dt(p)),"mutationFn"),onSuccess:t(async e=>{R({title:"",description:"",projectId:"",folderId:null,assigneeAgentId:"",priority:"medium",concurrencyPolicy:"coalesce_if_active",catchUpPolicy:"skip_missed",variables:[]}),$(!1),oe(!1),await d.invalidateQueries({queryKey:m.routines.list(n)}),i({title:"Routine created",body:e.assigneeAgentId?"Add the first trigger to turn it into a live workflow.":"Draft saved. Add a default agent before enabling automation.",tone:"success"}),b(`/routines/${e.id}?tab=triggers`)},"onSuccess")}),De=_({mutationFn:t(e=>M.create(n,{kind:"routine",...e}),"mutationFn"),onSuccess:t(async e=>{if(K(!1),L(null),await d.invalidateQueries({queryKey:m.folders.list(n,"routine")}),Ie.length>0){const r=Ie;Re([]);try{await Promise.all(r.map(a=>M.moveItem(n,{kind:"routine",itemId:a,folderId:e.id}))),await Promise.all([d.invalidateQueries({queryKey:m.routines.list(n)}),d.invalidateQueries({queryKey:m.folders.list(n,"routine")})])}catch(a){i({title:"Folder created, move failed",body:a instanceof Error?a.message:"Paperclip could not move the selected routines.",tone:"error"});return}}else H(e.id);i({title:"Folder created",body:e.name,tone:"success"})},"onSuccess"),onError:t(e=>{i({title:"Failed to save folder",body:e instanceof Error?e.message:"Paperclip could not save the folder.",tone:"error"})},"onError")}),ue=_({mutationFn:t(({folderId:e,payload:r})=>M.update(n,e,r),"mutationFn"),onSuccess:t(async()=>{K(!1),L(null),await d.invalidateQueries({queryKey:m.folders.list(n,"routine")})},"onSuccess"),onError:t(e=>{i({title:"Folder save failed",body:e instanceof Error?e.message:"Paperclip could not update the folder.",tone:"error"})},"onError")}),Te=_({mutationFn:t(e=>M.delete(n,e),"mutationFn"),onSuccess:t(async(e,r)=>{f===r&&H("all"),te(null),await Promise.all([d.invalidateQueries({queryKey:m.routines.list(n)}),d.invalidateQueries({queryKey:m.folders.list(n,"routine")})]),i({title:"Folder deleted",body:"Items moved to Unfiled.",tone:"success"})},"onSuccess"),onError:t(e=>{i({title:"Folder delete failed",body:e instanceof Error?e.message:"Paperclip could not delete the folder.",tone:"error"})},"onError")}),qe=_({mutationFn:t(({itemId:e,folderId:r})=>M.moveItem(n,{kind:"routine",itemId:e,folderId:r}),"mutationFn"),onSuccess:t(async()=>{await Promise.all([d.invalidateQueries({queryKey:m.routines.list(n)}),d.invalidateQueries({queryKey:m.folders.list(n,"routine")})])},"onSuccess"),onError:t(e=>{i({title:"Move failed",body:e instanceof Error?e.message:"Paperclip could not move the routine.",tone:"error"})},"onError")}),js=_({mutationFn:t(({id:e,data:r})=>He.update(e,r),"mutationFn"),onSuccess:t(async()=>{await d.invalidateQueries({queryKey:[...m.issues.list(n),"routine-executions"]})},"onSuccess")}),Ke=_({mutationFn:t(({id:e,status:r})=>X.update(e,{status:r}),"mutationFn"),onMutate:t(({id:e})=>{Se(e)},"onMutate"),onSuccess:t(async(e,r)=>{await Promise.all([d.invalidateQueries({queryKey:m.routines.list(n)}),d.invalidateQueries({queryKey:m.routines.detail(r.id)})])},"onSuccess"),onSettled:t(()=>{Se(null)},"onSettled"),onError:t(e=>{i({title:"Failed to update routine",body:e instanceof Error?e.message:"Paperclip could not update the routine.",tone:"error"})},"onError")}),Ue=_({mutationFn:t(({id:e,data:r})=>X.run(e,{...r?.variables&&Object.keys(r.variables).length>0?{variables:r.variables}:{},...r?.assigneeAgentId!==void 0?{assigneeAgentId:r.assigneeAgentId}:{},...r?.projectId!==void 0?{projectId:r.projectId}:{},...r?.executionWorkspaceId!==void 0?{executionWorkspaceId:r.executionWorkspaceId}:{},...r?.executionWorkspacePreference!==void 0?{executionWorkspacePreference:r.executionWorkspacePreference}:{},...r?.executionWorkspaceSettings!==void 0?{executionWorkspaceSettings:r.executionWorkspaceSettings}:{}}),"mutationFn"),onMutate:t(({id:e})=>{Ce(e)},"onMutate"),onSuccess:t(async(e,{id:r})=>{ie(null),await Promise.all([d.invalidateQueries({queryKey:m.routines.list(n)}),d.invalidateQueries({queryKey:m.routines.detail(r)})])},"onSuccess"),onSettled:t(()=>{Ce(null)},"onSettled"),onError:t(e=>{i({title:"Routine run failed",body:e instanceof Error?e.message:"Paperclip could not start the routine run.",tone:"error"})},"onError")}),me=(0,l.useMemo)(()=>Gs(),[G]),ys=(0,l.useMemo)(()=>Ws(),[G]),vs=(0,l.useMemo)(()=>Qs((C??[]).filter(e=>e.status!=="terminated"),me).map(e=>({id:e.id,label:e.name,searchText:`${e.name} ${e.role} ${e.title??""}`})),[C,me]),bs=(0,l.useMemo)(()=>(S??[]).filter(e=>!e.archivedAt).map(e=>({id:e.id,label:e.name,searchText:e.description??""})),[S]),U=(0,l.useMemo)(()=>new Map((C??[]).map(e=>[e.id,e])),[C]),E=(0,l.useMemo)(()=>new Map((S??[]).map(e=>[e.id,e])),[S]),Ee=(0,l.useMemo)(()=>new Map((h?.folders??[]).map(e=>[e.id,e])),[h]),ws=(0,l.useMemo)(()=>zs(de,le),[de,le]),y=(0,l.useMemo)(()=>(ke??[]).filter(e=>e.status!=="archived"),[ke]),Oe=(0,l.useMemo)(()=>u.groupBy!=="folder"||f==="all"?y:f==="unfiled"?y.filter(e=>!e.folderId):y.filter(e=>e.folderId===f),[f,u.groupBy,y]),pe=(0,l.useMemo)(()=>{if(!h)return h;const e=new Map;let r=0;for(const a of y)a.folderId?e.set(a.folderId,(e.get(a.folderId)??0)+1):r+=1;return{...h,allCount:y.length,unfiledCount:r,folders:h.folders.map(a=>({...a,itemCount:e.get(a.id)??0}))}},[h,y]),D=(0,l.useMemo)(()=>Kt(Oe,u.sortField,u.sortDir),[Oe,u.sortDir,u.sortField]),Ns=(0,l.useMemo)(()=>qt(D,u.groupBy,E,U,Ee),[U,Ee,E,u.groupBy,D]),Is=(0,l.useMemo)(()=>Os("Recent Runs",os("runs"),"issues"),[]),Le=p.assigneeAgentId?U.get(p.assigneeAgentId)??null:null,Qe=p.projectId?E.get(p.projectId)??null:null,Be=ut(h?.folders??[],f),W=(h?.folders.length??0)>0,fe=P==="routines"&&u.groupBy==="folder"&&W;function ge(e){Fe(r=>{const a={...r,...e};return Mt(z,a),a})}t(ge,"updateRoutineView");function Ve(e){const r=e==="runs"?"runs":"routines";(0,l.startTransition)(()=>{b(os(r))})}t(Ve,"handleTabChange");function H(e){x(r=>{const a=new URLSearchParams(r),v=It(e);return v?a.set("folder",v):a.delete("folder"),a})}t(H,"setFolderSelection");function T(e=[]){Re(e),L(null),K(!0)}t(T,"openCreateFolder");function Ge(){R(e=>({...e,folderId:f==="all"||f==="unfiled"?null:f})),$(!0)}t(Ge,"openCreateRoutine");async function Rs(e){const r=B;if(r.length!==0)try{await Promise.all(r.map(a=>M.moveItem(n,{kind:"routine",itemId:a,folderId:e}))),V([]),re(!1),await Promise.all([d.invalidateQueries({queryKey:m.routines.list(n)}),d.invalidateQueries({queryKey:m.folders.list(n,"routine")})]),i({title:"Routines moved",body:`${r.length} routine${r.length===1?"":"s"} filed.`,tone:"success"})}catch(a){i({title:"Failed to move routines",body:a instanceof Error?a.message:"Paperclip could not move the selected routines.",tone:"error"})}}t(Rs,"moveSelectedRoutines");function Cs(e){ie(e)}t(Cs,"handleRunNow");function Ss(e,r){if(!r&&!e.assigneeAgentId){i({title:"Default agent required",body:"Set a default agent before enabling routine automation.",tone:"warn"});return}Ke.mutate({id:e.id,status:Rt(e.status,!r)})}t(Ss,"handleToggleEnabled");function _s(e){Ke.mutate({id:e.id,status:e.status==="archived"?"active":"archived"})}return t(_s,"handleToggleArchived"),n?ps?(0,s.jsx)(dt,{variant:"issues-list"}):(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-end sm:justify-between",children:[(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:"Routines"}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"Recurring work definitions that materialize into auditable execution tasks."})]}),(0,s.jsxs)(F,{onClick:Ge,children:[(0,s.jsx)(J,{className:"mr-2 h-4 w-4"}),"Create routine"]})]}),(0,s.jsxs)(et,{value:P,onValueChange:Ve,children:[(0,s.jsx)(yt,{align:"start",value:P,onValueChange:Ve,items:[{value:"routines",label:"Routines"},{value:"runs",label:"Recent Runs"}]}),(0,s.jsxs)(es,{value:"routines",className:"space-y-4",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsxs)("p",{className:"text-sm text-muted-foreground",children:[y.length," routine",y.length===1?"":"s"]}),(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[(0,s.jsxs)($e,{children:[(0,s.jsx)(ze,{asChild:!0,children:(0,s.jsxs)(F,{variant:"ghost",size:"sm",className:"text-xs",title:"Sort",children:[(0,s.jsx)($s,{className:"h-3.5 w-3.5 sm:h-3 sm:w-3 sm:mr-1"}),(0,s.jsx)("span",{className:"hidden sm:inline",children:"Sort"})]})}),(0,s.jsx)(We,{align:"end",className:"w-44 p-0",children:(0,s.jsx)("div",{className:"p-2 space-y-0.5",children:[["updated","Updated"],["created","Created"],["lastRun","Last run"],["title","Title"]].map(([e,r])=>(0,s.jsxs)("button",{className:`flex w-full items-center justify-between rounded-sm px-2 py-1.5 text-sm ${u.sortField===e?"bg-accent/50 text-foreground":"text-muted-foreground hover:bg-accent/50"}`,onClick:t(()=>{ge(u.sortField===e?{sortDir:u.sortDir==="asc"?"desc":"asc"}:{sortField:e,sortDir:e==="title"?"asc":"desc"})},"onClick"),children:[(0,s.jsx)("span",{children:r}),u.sortField===e?(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:u.sortDir==="asc"?"Asc":"Desc"}):null]},e))})})]}),(0,s.jsxs)($e,{children:[(0,s.jsx)(ze,{asChild:!0,children:(0,s.jsxs)(F,{variant:"ghost",size:"sm",className:"text-xs",title:"Group",children:[(0,s.jsx)(Us,{className:"h-3.5 w-3.5 sm:h-3 sm:w-3 sm:mr-1"}),(0,s.jsx)("span",{className:"hidden sm:inline",children:"Group"})]})}),(0,s.jsx)(We,{align:"end",className:"w-44 p-0",children:(0,s.jsx)("div",{className:"p-2 space-y-0.5",children:[["folder","Folder"],["project","Project"],["assignee","Agent"],["none","None"]].map(([e,r])=>(0,s.jsxs)("button",{className:`flex w-full items-center justify-between rounded-sm px-2 py-1.5 text-sm ${u.groupBy===e?"bg-accent/50 text-foreground":"text-muted-foreground hover:bg-accent/50"}`,onClick:t(()=>ge({groupBy:e,collapsedGroups:[]}),"onClick"),children:[(0,s.jsx)("span",{children:r}),u.groupBy===e?(0,s.jsx)(tt,{className:"h-3.5 w-3.5"}):null]},e))})})]}),u.groupBy==="folder"&&!W?(0,s.jsxs)(F,{variant:"outline",size:"sm",onClick:t(()=>T(),"onClick"),children:[(0,s.jsx)(J,{className:"mr-2 h-3.5 w-3.5"}),"New folder"]}):null,fe?(0,s.jsx)(F,{variant:"ghost",size:"sm",className:"text-xs",onClick:t(()=>re(e=>!e),"onClick"),children:ne?"Done":"Select"}):null]})]}),u.groupBy==="folder"?(0,s.jsx)("div",{className:"md:hidden",children:(0,s.jsx)(mt,{result:pe,selection:f,allLabel:"All routines",onClick:t(()=>Ne(!0),"onClick")})}):null]}),(0,s.jsx)(es,{value:"runs",children:(0,s.jsx)(Hs,{issues:le??[],isLoading:fs,error:gs,agents:C,projects:S,liveIssueIds:ws,viewStateKey:"paperclip:routine-recent-runs-view",issueLinkState:Is,onUpdateIssue:t((e,r)=>js.mutate({id:e,data:r}),"onUpdateIssue")})})]}),(0,s.jsx)(Xs,{open:G,onOpenChange:t(e=>{N.isPending||$(e)},"onOpenChange"),children:(0,s.jsxs)(Js,{showCloseButton:!1,className:"flex max-h-(--sz-calc-18) max-w-3xl flex-col gap-0 overflow-hidden p-0",children:[(0,s.jsxs)("div",{className:"shrink-0 flex flex-wrap items-center justify-between gap-3 border-b border-border/60 px-5 py-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs font-medium uppercase tracking-(--tracking-caps) text-muted-foreground",children:"New routine"}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"Define the recurring work first. Default project and agent are optional for draft routines."})]}),(0,s.jsx)(F,{variant:"ghost",size:"sm",onClick:t(()=>{$(!1),oe(!1)},"onClick"),disabled:N.isPending,children:"Cancel"})]}),(0,s.jsxs)("div",{className:"min-h-0 flex-1 overflow-y-auto",children:[(0,s.jsx)("div",{className:"px-5 pt-5 pb-3",children:(0,s.jsx)("textarea",{ref:j,className:"w-full resize-none overflow-hidden bg-transparent text-xl font-semibold outline-none placeholder:text-muted-foreground/50",placeholder:"Routine title",rows:1,value:p.title,onChange:t(e=>{R(r=>({...r,title:e.target.value})),ss(e.target)},"onChange"),onKeyDown:t(e=>{if(e.key==="Enter"&&!e.metaKey&&!e.ctrlKey&&!e.nativeEvent.isComposing){e.preventDefault(),o.current?.focus();return}e.key==="Tab"&&!e.shiftKey&&(e.preventDefault(),p.assigneeAgentId?p.projectId?o.current?.focus():I.current?.focus():w.current?.focus())},"onKeyDown"),autoFocus:!0})}),(0,s.jsx)("div",{className:"px-5 pb-3",children:(0,s.jsx)("div",{className:"overflow-x-auto overscroll-x-contain",children:(0,s.jsxs)("div",{className:"inline-flex min-w-full flex-wrap items-center gap-2 text-sm text-muted-foreground sm:min-w-max sm:flex-nowrap",children:[(0,s.jsx)("span",{children:"For"}),(0,s.jsx)(Xe,{ref:w,value:p.assigneeAgentId,options:vs,recentOptionIds:me,placeholder:"Responsible",noneLabel:"No responsible",searchPlaceholder:"Search responsible...",emptyMessage:"No responsible found.",onChange:t(e=>{e&&Bs(e),R(r=>({...r,assigneeAgentId:e}))},"onChange"),onConfirm:t(()=>{p.projectId?o.current?.focus():I.current?.focus()},"onConfirm"),renderTriggerValue:t(e=>e?Le?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Ze,{agent:Le,size:16,className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,s.jsx)("span",{className:"truncate",children:e.label})]}):(0,s.jsx)("span",{className:"truncate",children:e.label}):(0,s.jsx)("span",{className:"text-muted-foreground",children:"Responsible"}),"renderTriggerValue"),renderOption:t(e=>{if(!e.id)return(0,s.jsx)("span",{className:"truncate",children:e.label});const r=U.get(e.id);return(0,s.jsxs)(s.Fragment,{children:[r?(0,s.jsx)(Ze,{agent:r,size:16,className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}):null,(0,s.jsx)("span",{className:"truncate",children:e.label})]})},"renderOption")}),(0,s.jsx)("span",{children:"in"}),(0,s.jsx)(Xe,{ref:I,value:p.projectId,options:bs,recentOptionIds:ys,placeholder:"Project",noneLabel:"No project",searchPlaceholder:"Search projects...",emptyMessage:"No projects found.",onChange:t(e=>{e&&Vs(e),R(r=>({...r,projectId:e}))},"onChange"),onConfirm:t(()=>o.current?.focus(),"onConfirm"),renderTriggerValue:t(e=>e&&Qe?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"h-3.5 w-3.5 shrink-0 rounded-sm",style:{backgroundColor:Qe.color??"var(--project-none)"}}),(0,s.jsx)("span",{className:"truncate",children:e.label})]}):(0,s.jsx)("span",{className:"text-muted-foreground",children:"Project"}),"renderTriggerValue"),renderOption:t(e=>{if(!e.id)return(0,s.jsx)("span",{className:"truncate",children:e.label});const r=E.get(e.id);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"h-3.5 w-3.5 shrink-0 rounded-sm",style:{backgroundColor:r?.color??"var(--project-none)"}}),(0,s.jsx)("span",{className:"truncate",children:e.label})]})},"renderOption")}),(0,s.jsx)("span",{children:"filed in"}),(0,s.jsxs)(ve,{value:p.folderId??"__unfiled",onValueChange:t(e=>R(r=>({...r,folderId:e==="__unfiled"?null:e})),"onValueChange"),children:[(0,s.jsx)(je,{className:"h-8 w-auto min-w-32 border-0 bg-muted/50 px-2 shadow-none",children:(0,s.jsx)(ye,{})}),(0,s.jsxs)(be,{children:[(0,s.jsx)(Z,{value:"__unfiled",children:"Unfiled"}),(h?.folders??[]).map(e=>(0,s.jsx)(Z,{value:e.id,children:e.name},e.id))]})]})]})})}),(0,s.jsx)("div",{className:"border-t border-border/60 px-5 py-4",children:(0,s.jsx)(Zs,{ref:o,value:p.description,onChange:t(e=>R(r=>({...r,description:e})),"onChange"),placeholder:"Add instructions...",bordered:!1,contentClassName:"min-h-(--sz-160px) text-sm text-muted-foreground",mentions:hs,onSubmit:t(()=>{!N.isPending&&p.title.trim()&&p.projectId&&p.assigneeAgentId&&N.mutate()},"onSubmit")})}),(0,s.jsx)("div",{className:"border-t border-border/60 px-5 py-3",children:(0,s.jsxs)(Ye,{open:_e,onOpenChange:oe,children:[(0,s.jsxs)(ls,{className:"flex w-full items-center justify-between text-left",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm font-medium",children:"Advanced delivery settings"}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"Keep policy controls secondary to the work definition."})]}),_e?(0,s.jsx)(rt,{className:"h-4 w-4 text-muted-foreground"}):(0,s.jsx)(cs,{className:"h-4 w-4 text-muted-foreground"})]}),(0,s.jsx)(Je,{className:"pt-3",children:(0,s.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("p",{className:"text-xs font-medium uppercase tracking-(--tracking-caps) text-muted-foreground",children:"Concurrency"}),(0,s.jsxs)(ve,{value:p.concurrencyPolicy,onValueChange:t(e=>R(r=>({...r,concurrencyPolicy:e})),"onValueChange"),children:[(0,s.jsx)(je,{children:(0,s.jsx)(ye,{})}),(0,s.jsx)(be,{children:_t.map(e=>(0,s.jsx)(Z,{value:e,children:e.replaceAll("_"," ")},e))})]}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:kt[p.concurrencyPolicy]})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("p",{className:"text-xs font-medium uppercase tracking-(--tracking-caps) text-muted-foreground",children:"Catch-up"}),(0,s.jsxs)(ve,{value:p.catchUpPolicy,onValueChange:t(e=>R(r=>({...r,catchUpPolicy:e})),"onValueChange"),children:[(0,s.jsx)(je,{children:(0,s.jsx)(ye,{})}),(0,s.jsx)(be,{children:Ft.map(e=>(0,s.jsx)(Z,{value:e,children:e.replaceAll("_"," ")},e))})]}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:Pt[p.catchUpPolicy]})]})]})})]})})]}),(0,s.jsxs)("div",{className:"shrink-0 flex flex-col gap-3 border-t border-border/60 px-5 py-4 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsx)("div",{className:"text-sm text-muted-foreground",children:"After creation, Paperclip takes you straight to trigger setup. Draft routines stay paused until you add a default agent."}),(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:items-end",children:[(0,s.jsxs)(F,{onClick:t(()=>N.mutate(),"onClick"),disabled:N.isPending||!p.title.trim(),children:[(0,s.jsx)(J,{className:"mr-2 h-4 w-4"}),N.isPending?"Creating...":"Create routine"]}),N.isError?(0,s.jsx)("p",{className:"text-sm text-destructive",children:N.error instanceof Error?N.error.message:"Failed to create routine"}):null]})]})]})}),ae?(0,s.jsx)(ct,{children:(0,s.jsx)(lt,{className:"pt-6 text-sm text-destructive",children:ae instanceof Error?ae.message:"Failed to load routines"})}):null,P==="routines"?(0,s.jsxs)("div",{className:As(fe&&"flex gap-4"),children:[fe?(0,s.jsx)(Ct,{result:pe,selection:f,allLabel:"All routines",itemLabelPlural:"routines",loading:Pe,onSelect:H,onCreate:t(()=>T(),"onCreate"),onRename:t((e,r)=>ue.mutate({folderId:e.id,payload:{name:r}}),"onRename"),onEdit:t(e=>{L(e),K(!0)},"onEdit"),onDelete:te}):null,(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[u.groupBy==="folder"&&W?(0,s.jsx)("div",{className:"mb-3 flex flex-wrap items-center gap-2",children:f==="all"?(0,s.jsx)(Et,{label:"All routines",count:D.length}):(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-2 text-sm",children:[(0,s.jsx)(gt,{color:Be?.color}),(0,s.jsx)("span",{className:"truncate font-medium",children:f==="unfiled"?"Unfiled":Be?.name??"Folder"}),(0,s.jsxs)("span",{className:"text-muted-foreground",children:[D.length," routine",D.length===1?"":"s"]})]})}):null,u.groupBy==="folder"&&!W&&!Pe&&y.length>0?(0,s.jsx)(ft,{storageKey:`paperclip:routines-folder-nudge:${n??"none"}`,itemLabelPlural:"routines",onCreateFolder:t(()=>T(),"onCreateFolder")}):null,ne?(0,s.jsx)(jt,{selectedCount:B.length,folders:h?.folders??[],onMove:t(e=>{Rs(e)},"onMove"),onCreateAndMove:t(()=>T(B),"onCreateAndMove"),onClear:t(()=>V([]),"onClear"),onDone:t(()=>{re(!1),V([])},"onDone")}):null,y.length===0?(0,s.jsx)("div",{className:"py-12",children:(0,s.jsx)(we,{icon:ee,message:"No active routines. Use Create routine to define the first recurring workflow."})}):D.length===0?(0,s.jsxs)("div",{className:"py-12",children:[(0,s.jsx)(we,{icon:ee,message:f==="all"?"No routines match this view.":"This folder is empty."}),f!=="all"?(0,s.jsx)("div",{className:"mt-3 flex justify-center",children:(0,s.jsxs)(F,{size:"sm",onClick:Ge,children:[(0,s.jsx)(J,{className:"mr-2 h-3.5 w-3.5"}),"New routine in this folder"]})}):null]}):(0,s.jsx)("div",{className:"flex flex-col gap-3",children:Ns.map(e=>{const r=!u.collapsedGroups.includes(e.key);return(0,s.jsxs)(Ye,{open:r,onOpenChange:t(a=>{ge({collapsedGroups:a?u.collapsedGroups.filter(v=>v!==e.key):[...u.collapsedGroups,e.key]})},"onOpenChange"),children:[e.label?(0,s.jsx)(Ut,{label:e.label,count:e.items.length,isOpen:r}):null,(0,s.jsx)(Je,{children:e.items.map(a=>(0,s.jsx)(St,{routine:a,projectById:E,agentById:U,runningRoutineId:us,statusMutationRoutineId:ms,href:`/routines/${a.id}`,runNowButton:!0,divider:!1,onRunNow:Cs,onToggleEnabled:Ss,onToggleArchived:_s,selectMode:ne,selected:B.includes(a.id),onSelectChange:t((v,xe)=>{V(Y=>xe?Array.from(new Set([...Y,v.id])):Y.filter(Fs=>Fs!==v.id))},"onSelectChange"),extraMenuItems:(0,s.jsx)(wt,{folders:h?.folders??[],currentFolderId:a.folderId??null,onMove:t(v=>{const xe=a.folderId??null;qe.mutate({itemId:a.id,folderId:v}),i({title:"Routine moved",body:v?`Moved "${a.title}" to ${h?.folders.find(Y=>Y.id===v)?.name??"folder"}.`:`Moved "${a.title}" to Unfiled.`,tone:"success",action:{label:"Undo",onClick:t(()=>qe.mutate({itemId:a.id,folderId:xe}),"onClick")}})},"onMove"),onCreateAndMove:t(()=>T([a.id]),"onCreateAndMove")})},a.id))})]},e.key)})})]})]}):null,(0,s.jsx)(xt,{open:O,kind:"routine",folder:se,pending:De.isPending||ue.isPending,onOpenChange:K,onSubmit:t(e=>{se?ue.mutate({folderId:se.id,payload:e}):De.mutate(e)},"onSubmit")}),(0,s.jsx)(vt,{open:Q!==null,folder:Q,itemLabelPlural:"routines",pending:Te.isPending,onOpenChange:t(e=>{e||te(null)},"onOpenChange"),onConfirm:t(()=>{Q&&Te.mutate(Q.id)},"onConfirm")}),(0,s.jsx)(Nt,{open:ds,onOpenChange:Ne,result:pe,selection:f,allLabel:"All routines",itemLabelPlural:"Routines",onSelect:H,onCreate:t(()=>T(),"onCreate")}),(0,s.jsx)(Ys,{open:k!==null,onOpenChange:t(e=>{e||ie(null)},"onOpenChange"),companyId:n,routineName:k?.title??null,agents:C??[],projects:S??[],defaultProjectId:k?.projectId??null,defaultAssigneeAgentId:k?.assigneeAgentId??null,variables:k?.variables??[],isPending:Ue.isPending,onSubmit:t(e=>{k&&Ue.mutate({id:k.id,data:e})},"onSubmit")})]}):(0,s.jsx)(we,{icon:ee,message:"Select a company to view routines."})}t(ln,"Routines");function Et({label:n,count:c}){return(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-2 text-sm",children:[(0,s.jsx)(ee,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,s.jsx)("span",{className:"truncate font-medium",children:n}),(0,s.jsxs)("span",{className:"text-muted-foreground",children:[c," routine",c===1?"":"s"]})]})}t(Et,"FolderIconHeader");export{ln as Routines};
@@ -1 +1 @@
1
- var P=Object.defineProperty;var n=(e,r)=>P(e,"name",{value:r,configurable:!0});import{i as _}from"./rolldown-runtime-ZpX3ckPj.js";import{G as b,Gi as c,Va as A,n as i,za as H}from"./agent-avatar-url-BnmqahQ7.js";import{At as C,Bt as W,E as V,Gt as F,Ht as Y,Mt as w,Nt as j,Pt as v,i as J}from"./BreadcrumbContext-Bxr1TyKN.js";import{o as $,r as B}from"./clipboard-CTmezHYG.js";import{r as I}from"./badge-D5aOL1Ll.js";var S={name:"archive",size:24,node:[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]};S.node;var L=i(S),O={name:"circle-x",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],aliases:["x-circle"]};O.node;var R=i(O),E={name:"cloud-off",size:24,node:[["path",{d:"M10.94 5.274A7 7 0 0 1 15.71 10h1.79a4.5 4.5 0 0 1 4.222 6.057",key:"1uxyv8"}],["path",{d:"M18.796 18.81A4.5 4.5 0 0 1 17.5 19H9A7 7 0 0 1 5.79 5.78",key:"99tcn7"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]};E.node;var K=i(E),q={name:"git-merge",size:24,node:[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]]};q.node;var X=i(q),M={name:"git-pull-request",size:24,node:[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]]};M.node;var Q=i(M),U={name:"octagon-alert",size:24,node:[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]],aliases:["alert-octagon"]};U.node;var Z=i(U);function x(e={}){return{workspaceCommandId:e.workspaceCommandId??null,runtimeServiceId:e.runtimeServiceId??null,serviceIndex:e.serviceIndex??null}}n(x,"sanitizeWorkspaceRuntimeControlTarget");function ee(e,r){return r?`${e}${e.includes("?")?"&":"?"}companyId=${encodeURIComponent(r)}`:e}n(ee,"withCompanyScope");function o(e,r,t=""){return ee(`/projects/${encodeURIComponent(e)}${t}`,r)}n(o,"projectPath");var je={repositoryOptions:n(e=>c.get(`/companies/${e}/project-repositories`),"repositoryOptions"),setRepositories:n((e,r)=>c.put(o(e,void 0,"/repositories"),{repositoryIds:r}),"setRepositories"),list:n((e,r={})=>{const t=new URLSearchParams;r.includeArchived&&t.set("includeArchived","true");const a=t.toString();return c.get("/companies/"+encodeURIComponent(e)+"/projects"+(a?"?"+a:""))},"list"),get:n((e,r)=>c.get(o(e,r)),"get"),create:n((e,r)=>c.post(`/companies/${e}/projects`,r),"create"),update:n((e,r,t)=>c.patch(o(e,t),r),"update"),listAccessMembers:n((e,r)=>c.get(o(e,r,"/access-members")),"listAccessMembers"),addAccessMember:n((e,r,t)=>c.post(o(e,t,"/access-members"),r),"addAccessMember"),removeAccessMember:n((e,r,t)=>c.delete(o(e,t,`/access-members/${encodeURIComponent(r)}`)),"removeAccessMember"),listWorkspaces:n((e,r)=>c.get(o(e,r,"/workspaces")),"listWorkspaces"),createWorkspace:n((e,r,t)=>c.post(o(e,t,"/workspaces"),r),"createWorkspace"),updateWorkspace:n((e,r,t,a)=>c.patch(o(e,a,`/workspaces/${encodeURIComponent(r)}`),t),"updateWorkspace"),controlWorkspaceRuntimeServices:n((e,r,t,a,l={})=>c.post(o(e,a,`/workspaces/${encodeURIComponent(r)}/runtime-services/${t}`),x(l)),"controlWorkspaceRuntimeServices"),controlWorkspaceCommands:n((e,r,t,a,l={})=>c.post(o(e,a,`/workspaces/${encodeURIComponent(r)}/runtime-commands/${t}`),x(l)),"controlWorkspaceCommands"),removeWorkspace:n((e,r,t)=>c.delete(o(e,t,`/workspaces/${encodeURIComponent(r)}`)),"removeWorkspace"),remove:n((e,r)=>c.delete(o(e,r)),"remove")};function $e(e){if(!e)return null;let r;try{r=new URL(e.trim())}catch{return null}if(r.protocol!=="http:"&&r.protocol!=="https:"||r.username||r.password)return null;const t=r.protocol==="https:"?"https":"http",a=r.pathname||"/";return`${t}://${r.host.toLowerCase()}${a}`}n($e,"normalizeExternalObjectHref");var re=i("github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]),te={unknown:j,open:w,waiting:$,running:I,succeeded:v,failed:R,blocked:Z,closed:C,archived:L,auth_required:B,unreachable:K},ne=j;function Be(e){return te[e]??ne}n(Be,"externalObjectIconForCategory");var ae={archive:L,check:v,"check-circle":v,circle:C,"circle-dot":w,clock:$,github:re,"git-merge":X,"git-pull-request":Q,key:B,loader:I,"x-circle":R};function Ie(e){return e?ae[e]??null:null}n(Ie,"externalObjectIconForKey");var ce={unknown:"Not yet resolved",open:"Open",waiting:"Waiting",running:"Running",succeeded:"Succeeded",failed:"Failed",blocked:"Blocked",closed:"Closed",archived:"Archived",auth_required:"Authorization required",unreachable:"Unreachable"};function oe(e){return ce[e]??e.replace(/_/g," ")}n(oe,"externalObjectCategoryLabel");var se={unknown:"Not yet refreshed",fresh:"Fresh",stale:"Stale",auth_required:"Requires auth",unreachable:"Unreachable"};function ie(e){return se[e]??e.replace(/_/g," ")}n(ie,"externalObjectLivenessLabel");function Se(e){const r=e.statusLabel?.trim();if(r)return r;const t=e.providerKey==="url"&&e.objectType==="link",a=!!(e.providerKey&&e.objectType);return e.statusCategory==="unknown"&&a&&!t?e.liveness==="fresh"?"Status unavailable":ie(e.liveness):oe(e.statusCategory)}n(Se,"externalObjectDisplayStatusLabel");var N={muted:0,neutral:1,success:2,info:3,warning:4,danger:5};function le(e){return e?N[e]??0:0}n(le,"externalObjectToneSeverity");var ue={github:"GitHub",github_pull_request:"GitHub",github_issue:"GitHub",hubspot:"HubSpot",linear:"Linear",jira:"Jira",notion:"Notion",asana:"Asana"};function de(e){if(!e)return"External";const r=ue[e];return r||e.split(/[._-]/).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}n(de,"externalObjectProviderLabel");var pe={pull_request:"pull request",issue:"issue",deployment:"deployment",workflow_run:"workflow run",ticket:"ticket",lead:"lead",url_link:"URL"};function me(e){return e?pe[e]??e.replace(/_/g," "):"object"}n(me,"externalObjectTypeLabel");function Le(e,r,t){const a=t?.trim();return a||(e==="url"&&r==="link"?"URL":`${de(e)} ${me(r)}`)}n(Le,"externalObjectDisplayLabel");function he(e){if(!e)return null;const r=e.highestSeverity;return!r||le(r)<=N.muted?null:r}n(he,"dominantExternalObjectTone");function Oe(e){if(!e)return 0;const r=he(e);return r?e.objects.filter(t=>t.statusTone===r).length:0}n(Oe,"externalObjectDominantCount");var fe=_(A(),1),s=_(H(),1),ve=["backlog","todo","in_progress","in_review","done","cancelled","blocked"];function m(e){return e.replace(/_/g," ").replace(/\b\w/g,r=>r.toUpperCase())}n(m,"statusLabel");function ke(e){if(!e||e.state==="none")return"Blocked";if(e.reason==="active_child"){const r=e.coveredBlockerCount;return r===1&&e.sampleBlockerIdentifier?`Blocked · waiting on active sub-task ${e.sampleBlockerIdentifier}`:r===1?"Blocked · waiting on 1 active sub-task":`Blocked · waiting on ${r} active sub-tasks`}if(e.reason==="active_dependency"){const r=e.coveredBlockerCount;return r===1&&e.sampleBlockerIdentifier?`Blocked · covered by active dependency ${e.sampleBlockerIdentifier}`:r===1?"Blocked · covered by 1 active dependency":`Blocked · covered by ${r} active dependencies`}if(e.reason==="stalled_review"){const r=e.stalledBlockerCount,t=e.sampleStalledBlockerIdentifier??e.sampleBlockerIdentifier;return r===1&&t?`Blocked · review stalled on ${t}`:r===1?"Blocked · review stalled with no clear next step":`Blocked · ${r} reviews stalled with no clear next step`}if(e.reason==="attention_required"){const r=e.attentionBlockerCount||e.unresolvedBlockerCount,t=`${r} ${r===1?"blocker needs":"blockers need"} attention`,a=e.coveredBlockerCount;return a>0?`Blocked · ${t}; ${a} covered by active work`:`Blocked · ${t}`}return"Blocked"}n(ke,"blockedAttentionLabel");function ge({status:e,externalConversationState:r,blockerAttention:t,onChange:a,className:l,glyphContainerClassName:k,showLabel:h,size:z="md"}){const[D,g]=(0,fe.useState)(!1),d=e==="in_review"&&r==="waiting"?"idle":e,T=e==="blocked"&&t?.state==="covered",f=e==="blocked"?ke(t):m(d),y=(0,s.jsx)(V,{status:T?"in_queue":d,size:z,className:b(a&&!h&&"cursor-pointer",l),title:f}),p=k?(0,s.jsx)("span",{className:k,"data-status-glyph-container":"true",children:y}):y;if(!a)return h?(0,s.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[p,(0,s.jsx)("span",{className:"text-sm",children:m(d)})]}):p;const G=h?(0,s.jsxs)("button",{type:"button","aria-label":`Change status (current: ${f})`,className:"inline-flex min-h-5 items-center gap-1.5 cursor-pointer hover:bg-accent/50 rounded px-1 -mx-1 py-0.5 transition-colors",children:[p,(0,s.jsx)("span",{className:"text-sm",children:m(d)})]}):(0,s.jsx)("button",{type:"button","data-slot":"icon-button","aria-label":`Change status (current: ${f})`,className:"inline-flex cursor-pointer items-center justify-center rounded-sm focus-visible:outline-none focus-visible:ring-(length:--rad-3) focus-visible:ring-ring",children:p});return(0,s.jsxs)(W,{open:D,onOpenChange:g,children:[(0,s.jsx)(F,{asChild:!0,children:G}),(0,s.jsx)(Y,{className:"w-40 p-1",align:"start",children:ve.map(u=>(0,s.jsxs)(J,{variant:"ghost",size:"sm",className:b("w-full justify-start gap-2 text-xs",u===e&&"bg-accent"),onClick:n(()=>{a(u),g(!1)},"onClick"),children:[(0,s.jsx)(ge,{status:u,size:"lg"}),m(u)]},u))})]})}n(ge,"StatusIcon");export{Z as _,Se as a,R as b,Ie as c,le as d,me as f,x as g,je as h,Le as i,ie as l,$e as m,he as n,Oe as o,re as p,oe as r,Be as s,ge as t,de as u,Q as v,L as x,X as y};
1
+ var P=Object.defineProperty;var n=(e,r)=>P(e,"name",{value:r,configurable:!0});import{i as _}from"./rolldown-runtime-ZpX3ckPj.js";import{Ba as A,G as b,Ha as H,Ki as c,n as i}from"./agent-avatar-url-Dp-4-Emx.js";import{At as C,Bt as W,E as V,Gt as F,Ht as K,Mt as w,Nt as j,Pt as v,i as Y}from"./BreadcrumbContext-CIC8QOSJ.js";import{o as B,r as $}from"./clipboard-Bj1LrAus.js";import{r as I}from"./badge-B6lcLGFG.js";var S={name:"archive",size:24,node:[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]};S.node;var L=i(S),O={name:"circle-x",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],aliases:["x-circle"]};O.node;var R=i(O),E={name:"cloud-off",size:24,node:[["path",{d:"M10.94 5.274A7 7 0 0 1 15.71 10h1.79a4.5 4.5 0 0 1 4.222 6.057",key:"1uxyv8"}],["path",{d:"M18.796 18.81A4.5 4.5 0 0 1 17.5 19H9A7 7 0 0 1 5.79 5.78",key:"99tcn7"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]};E.node;var J=i(E),q={name:"git-merge",size:24,node:[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]]};q.node;var X=i(q),M={name:"git-pull-request",size:24,node:[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]]};M.node;var Q=i(M),U={name:"octagon-alert",size:24,node:[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]],aliases:["alert-octagon"]};U.node;var Z=i(U);function x(e={}){return{workspaceCommandId:e.workspaceCommandId??null,runtimeServiceId:e.runtimeServiceId??null,serviceIndex:e.serviceIndex??null}}n(x,"sanitizeWorkspaceRuntimeControlTarget");function ee(e,r){return r?`${e}${e.includes("?")?"&":"?"}companyId=${encodeURIComponent(r)}`:e}n(ee,"withCompanyScope");function o(e,r,t=""){return ee(`/projects/${encodeURIComponent(e)}${t}`,r)}n(o,"projectPath");var je={repositoryOptions:n(e=>c.get(`/companies/${e}/project-repositories`),"repositoryOptions"),setRepositories:n((e,r)=>c.put(o(e,void 0,"/repositories"),{repositoryIds:r}),"setRepositories"),list:n((e,r={})=>{const t=new URLSearchParams;r.includeArchived&&t.set("includeArchived","true");const a=t.toString();return c.get("/companies/"+encodeURIComponent(e)+"/projects"+(a?"?"+a:""))},"list"),get:n((e,r)=>c.get(o(e,r)),"get"),create:n((e,r)=>c.post(`/companies/${e}/projects`,r),"create"),update:n((e,r,t)=>c.patch(o(e,t),r),"update"),listAccessMembers:n((e,r)=>c.get(o(e,r,"/access-members")),"listAccessMembers"),addAccessMember:n((e,r,t)=>c.post(o(e,t,"/access-members"),r),"addAccessMember"),removeAccessMember:n((e,r,t)=>c.delete(o(e,t,`/access-members/${encodeURIComponent(r)}`)),"removeAccessMember"),listWorkspaces:n((e,r)=>c.get(o(e,r,"/workspaces")),"listWorkspaces"),createWorkspace:n((e,r,t)=>c.post(o(e,t,"/workspaces"),r),"createWorkspace"),updateWorkspace:n((e,r,t,a)=>c.patch(o(e,a,`/workspaces/${encodeURIComponent(r)}`),t),"updateWorkspace"),controlWorkspaceRuntimeServices:n((e,r,t,a,l={})=>c.post(o(e,a,`/workspaces/${encodeURIComponent(r)}/runtime-services/${t}`),x(l)),"controlWorkspaceRuntimeServices"),controlWorkspaceCommands:n((e,r,t,a,l={})=>c.post(o(e,a,`/workspaces/${encodeURIComponent(r)}/runtime-commands/${t}`),x(l)),"controlWorkspaceCommands"),removeWorkspace:n((e,r,t)=>c.delete(o(e,t,`/workspaces/${encodeURIComponent(r)}`)),"removeWorkspace"),remove:n((e,r)=>c.delete(o(e,r)),"remove")};function Be(e){if(!e)return null;let r;try{r=new URL(e.trim())}catch{return null}if(r.protocol!=="http:"&&r.protocol!=="https:"||r.username||r.password)return null;const t=r.protocol==="https:"?"https":"http",a=r.pathname||"/";return`${t}://${r.host.toLowerCase()}${a}`}n(Be,"normalizeExternalObjectHref");var re=i("github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]),te={unknown:j,open:w,waiting:B,running:I,succeeded:v,failed:R,blocked:Z,closed:C,archived:L,auth_required:$,unreachable:J},ne=j;function $e(e){return te[e]??ne}n($e,"externalObjectIconForCategory");var ae={archive:L,check:v,"check-circle":v,circle:C,"circle-dot":w,clock:B,github:re,"git-merge":X,"git-pull-request":Q,key:$,loader:I,"x-circle":R};function Ie(e){return e?ae[e]??null:null}n(Ie,"externalObjectIconForKey");var ce={unknown:"Not yet resolved",open:"Open",waiting:"Waiting",running:"Running",succeeded:"Succeeded",failed:"Failed",blocked:"Blocked",closed:"Closed",archived:"Archived",auth_required:"Authorization required",unreachable:"Unreachable"};function oe(e){return ce[e]??e.replace(/_/g," ")}n(oe,"externalObjectCategoryLabel");var se={unknown:"Not yet refreshed",fresh:"Fresh",stale:"Stale",auth_required:"Requires auth",unreachable:"Unreachable"};function ie(e){return se[e]??e.replace(/_/g," ")}n(ie,"externalObjectLivenessLabel");function Se(e){const r=e.statusLabel?.trim();if(r)return r;const t=e.providerKey==="url"&&e.objectType==="link",a=!!(e.providerKey&&e.objectType);return e.statusCategory==="unknown"&&a&&!t?e.liveness==="fresh"?"Status unavailable":ie(e.liveness):oe(e.statusCategory)}n(Se,"externalObjectDisplayStatusLabel");var N={muted:0,neutral:1,success:2,info:3,warning:4,danger:5};function le(e){return e?N[e]??0:0}n(le,"externalObjectToneSeverity");var ue={github:"GitHub",github_pull_request:"GitHub",github_issue:"GitHub",hubspot:"HubSpot",linear:"Linear",jira:"Jira",notion:"Notion",asana:"Asana"};function de(e){if(!e)return"External";const r=ue[e];return r||e.split(/[._-]/).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}n(de,"externalObjectProviderLabel");var pe={pull_request:"pull request",issue:"issue",deployment:"deployment",workflow_run:"workflow run",ticket:"ticket",lead:"lead",url_link:"URL"};function me(e){return e?pe[e]??e.replace(/_/g," "):"object"}n(me,"externalObjectTypeLabel");function Le(e,r,t){const a=t?.trim();return a||(e==="url"&&r==="link"?"URL":`${de(e)} ${me(r)}`)}n(Le,"externalObjectDisplayLabel");function he(e){if(!e)return null;const r=e.highestSeverity;return!r||le(r)<=N.muted?null:r}n(he,"dominantExternalObjectTone");function Oe(e){if(!e)return 0;const r=he(e);return r?e.objects.filter(t=>t.statusTone===r).length:0}n(Oe,"externalObjectDominantCount");var fe=_(H(),1),s=_(A(),1),ve=["backlog","todo","in_progress","in_review","done","cancelled","blocked"];function m(e){return e.replace(/_/g," ").replace(/\b\w/g,r=>r.toUpperCase())}n(m,"statusLabel");function ke(e){if(!e||e.state==="none")return"Blocked";if(e.reason==="active_child"){const r=e.coveredBlockerCount;return r===1&&e.sampleBlockerIdentifier?`Blocked · waiting on active sub-task ${e.sampleBlockerIdentifier}`:r===1?"Blocked · waiting on 1 active sub-task":`Blocked · waiting on ${r} active sub-tasks`}if(e.reason==="active_dependency"){const r=e.coveredBlockerCount;return r===1&&e.sampleBlockerIdentifier?`Blocked · covered by active dependency ${e.sampleBlockerIdentifier}`:r===1?"Blocked · covered by 1 active dependency":`Blocked · covered by ${r} active dependencies`}if(e.reason==="stalled_review"){const r=e.stalledBlockerCount,t=e.sampleStalledBlockerIdentifier??e.sampleBlockerIdentifier;return r===1&&t?`Blocked · review stalled on ${t}`:r===1?"Blocked · review stalled with no clear next step":`Blocked · ${r} reviews stalled with no clear next step`}if(e.reason==="attention_required"){const r=e.attentionBlockerCount||e.unresolvedBlockerCount,t=`${r} ${r===1?"blocker needs":"blockers need"} attention`,a=e.coveredBlockerCount;return a>0?`Blocked · ${t}; ${a} covered by active work`:`Blocked · ${t}`}return"Blocked"}n(ke,"blockedAttentionLabel");function ge({status:e,externalConversationState:r,blockerAttention:t,onChange:a,className:l,glyphContainerClassName:k,showLabel:h,size:z="md"}){const[D,g]=(0,fe.useState)(!1),d=e==="in_review"&&r==="waiting"?"idle":e,T=e==="blocked"&&t?.state==="covered",f=e==="blocked"?ke(t):m(d),y=(0,s.jsx)(V,{status:T?"in_queue":d,size:z,className:b(a&&!h&&"cursor-pointer",l),title:f}),p=k?(0,s.jsx)("span",{className:k,"data-status-glyph-container":"true",children:y}):y;if(!a)return h?(0,s.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[p,(0,s.jsx)("span",{className:"text-sm",children:m(d)})]}):p;const G=h?(0,s.jsxs)("button",{type:"button","aria-label":`Change status (current: ${f})`,className:"inline-flex min-h-5 items-center gap-1.5 cursor-pointer hover:bg-accent/50 rounded px-1 -mx-1 py-0.5 transition-colors",children:[p,(0,s.jsx)("span",{className:"text-sm",children:m(d)})]}):(0,s.jsx)("button",{type:"button","data-slot":"icon-button","aria-label":`Change status (current: ${f})`,className:"inline-flex cursor-pointer items-center justify-center rounded-sm focus-visible:outline-none focus-visible:ring-(length:--rad-3) focus-visible:ring-ring",children:p});return(0,s.jsxs)(W,{open:D,onOpenChange:g,children:[(0,s.jsx)(F,{asChild:!0,children:G}),(0,s.jsx)(K,{className:"w-40 p-1",align:"start",children:ve.map(u=>(0,s.jsxs)(Y,{variant:"ghost",size:"sm",className:b("w-full justify-start gap-2 text-xs",u===e&&"bg-accent"),onClick:n(()=>{a(u),g(!1)},"onClick"),children:[(0,s.jsx)(ge,{status:u,size:"lg"}),m(u)]},u))})]})}n(ge,"StatusIcon");export{Z as _,Se as a,R as b,Ie as c,le as d,me as f,x as g,je as h,Le as i,ie as l,Be as m,he as n,Oe as o,re as p,oe as r,$e as s,ge as t,de as u,Q as v,L as x,X as y};
@@ -1 +1 @@
1
- var y=Object.defineProperty;var n=(e,s)=>y(e,"name",{value:s,configurable:!0});import{i as b}from"./rolldown-runtime-ZpX3ckPj.js";import{Va as k,n as P,za as $}from"./agent-avatar-url-BnmqahQ7.js";var A={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};A.node;var K=P(A),o=b(k(),1),C=b($(),1),L={info:4e3,success:3500,warn:8e3,error:1e4},O=1500,g=15e3,j=5,p=3500,I=2e4,_=(0,o.createContext)(null),v=(0,o.createContext)(null);function N(e,s){const i=L[s];return typeof e!="number"||!Number.isFinite(e)?i:Math.max(O,Math.min(g,Math.floor(e)))}n(N,"normalizeTtl");function R(){return`toast_${Date.now()}_${Math.random().toString(36).slice(2,8)}`}n(R,"generateToastId");function W({children:e}){const[s,i]=(0,o.useState)([]),a=(0,o.useRef)(new Map),l=(0,o.useRef)(new Map),d=(0,o.useCallback)(t=>{const r=a.current.get(t);r!==void 0&&(window.clearTimeout(r),a.current.delete(t))},[]),f=(0,o.useCallback)(t=>{d(t),i(r=>r.filter(u=>u.id!==t))},[d]),w=(0,o.useCallback)(()=>{for(const t of a.current.values())window.clearTimeout(t);a.current.clear(),i([])},[]),M=(0,o.useCallback)(t=>{const r=Date.now(),u=t.tone??"info",h=N(t.ttlMs,u),x=t.dedupeKey??t.id??`${u}|${t.title}|${t.body??""}|${t.action?.href??""}`;for(const[T,m]of l.current.entries())r-m>I&&l.current.delete(T);const S=l.current.get(x);if(S&&r-S<p)return null;l.current.set(x,r);const c=t.id??R();d(c),i(T=>[{id:c,title:t.title,body:t.body,tone:u,ttlMs:h,action:t.action,actor:t.actor,createdAt:r},...T.filter(m=>m.id!==c)].slice(0,j));const D=window.setTimeout(()=>{f(c)},h);return a.current.set(c,D),c},[d,f]);(0,o.useEffect)(()=>()=>{for(const t of a.current.values())window.clearTimeout(t);a.current.clear()},[]);const E=(0,o.useMemo)(()=>({pushToast:M,dismissToast:f,clearToasts:w}),[M,f,w]);return(0,C.jsx)(v.Provider,{value:E,children:(0,C.jsx)(_.Provider,{value:s,children:e})})}n(W,"ToastProvider");function q(){const e=(0,o.useContext)(_);if(!e)throw new Error("useToastState must be used within a ToastProvider");return e}n(q,"useToastState");function z(){const e=(0,o.useContext)(v);if(!e)throw new Error("useToastActions must be used within a ToastProvider");return e}n(z,"useToastActions");function B(){return(0,o.useContext)(v)}n(B,"useOptionalToastActions");function G(){return(0,o.useContext)(_)}n(G,"useOptionalToastState");function V(){const e=q(),s=z();return(0,o.useMemo)(()=>({toasts:e,...s}),[e,s])}n(V,"useToast");export{z as a,V as i,B as n,q as o,G as r,K as s,W as t};
1
+ var y=Object.defineProperty;var n=(e,s)=>y(e,"name",{value:s,configurable:!0});import{i as b}from"./rolldown-runtime-ZpX3ckPj.js";import{Ba as k,Ha as P,n as $}from"./agent-avatar-url-Dp-4-Emx.js";var A={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};A.node;var F=$(A),o=b(P(),1),C=b(k(),1),L={info:4e3,success:3500,warn:8e3,error:1e4},O=1500,g=15e3,j=5,p=3500,I=2e4,_=(0,o.createContext)(null),v=(0,o.createContext)(null);function N(e,s){const i=L[s];return typeof e!="number"||!Number.isFinite(e)?i:Math.max(O,Math.min(g,Math.floor(e)))}n(N,"normalizeTtl");function R(){return`toast_${Date.now()}_${Math.random().toString(36).slice(2,8)}`}n(R,"generateToastId");function K({children:e}){const[s,i]=(0,o.useState)([]),a=(0,o.useRef)(new Map),l=(0,o.useRef)(new Map),d=(0,o.useCallback)(t=>{const r=a.current.get(t);r!==void 0&&(window.clearTimeout(r),a.current.delete(t))},[]),f=(0,o.useCallback)(t=>{d(t),i(r=>r.filter(u=>u.id!==t))},[d]),w=(0,o.useCallback)(()=>{for(const t of a.current.values())window.clearTimeout(t);a.current.clear(),i([])},[]),M=(0,o.useCallback)(t=>{const r=Date.now(),u=t.tone??"info",h=N(t.ttlMs,u),x=t.dedupeKey??t.id??`${u}|${t.title}|${t.body??""}|${t.action?.href??""}`;for(const[T,m]of l.current.entries())r-m>I&&l.current.delete(T);const S=l.current.get(x);if(S&&r-S<p)return null;l.current.set(x,r);const c=t.id??R();d(c),i(T=>[{id:c,title:t.title,body:t.body,tone:u,ttlMs:h,action:t.action,actor:t.actor,createdAt:r},...T.filter(m=>m.id!==c)].slice(0,j));const D=window.setTimeout(()=>{f(c)},h);return a.current.set(c,D),c},[d,f]);(0,o.useEffect)(()=>()=>{for(const t of a.current.values())window.clearTimeout(t);a.current.clear()},[]);const E=(0,o.useMemo)(()=>({pushToast:M,dismissToast:f,clearToasts:w}),[M,f,w]);return(0,C.jsx)(v.Provider,{value:E,children:(0,C.jsx)(_.Provider,{value:s,children:e})})}n(K,"ToastProvider");function q(){const e=(0,o.useContext)(_);if(!e)throw new Error("useToastState must be used within a ToastProvider");return e}n(q,"useToastState");function U(){const e=(0,o.useContext)(v);if(!e)throw new Error("useToastActions must be used within a ToastProvider");return e}n(U,"useToastActions");function W(){return(0,o.useContext)(v)}n(W,"useOptionalToastActions");function G(){return(0,o.useContext)(_)}n(G,"useOptionalToastState");function H(){const e=q(),s=U();return(0,o.useMemo)(()=>({toasts:e,...s}),[e,s])}n(H,"useToast");export{U as a,H as i,W as n,q as o,G as r,F as s,K as t};
@@ -131,4 +131,4 @@ Use the assignment catalog through paperclip_dot_tool for Paperclip operations.
131
131
  `)},"getStyles"),$l=n(function(){var e=parseInt(document.body.getAttribute("data-scroll-locked")||"0",10);return isFinite(e)?e:0},"getCurrentUseCounter"),QV=n(function(){k.useEffect(function(){return document.body.setAttribute(Oa,($l()+1).toString()),function(){var e=$l()-1;e<=0?document.body.removeAttribute(Oa):document.body.setAttribute(Oa,e.toString())}},[])},"useLockAttribute"),eK=n(function(e){var t=e.noRelative,r=e.noImportant,o=e.gapMode,i=o===void 0?"margin":o;QV();var s=k.useMemo(function(){return YV(i)},[i]);return k.createElement(XV,{styles:JV(s,!t,i,r?"":"!important")})},"RemoveScrollBar"),$n=!1;if(typeof window<"u")try{var mr=Object.defineProperty({},"passive",{get:n(function(){return $n=!0,!0},"get")});window.addEventListener("test",mr,mr),window.removeEventListener("test",mr,mr)}catch{$n=!1}var Jt=$n?{passive:!1}:!1,tK=n(function(e){return e.tagName==="TEXTAREA"},"alwaysContainsScroll"),gh=n(function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!tK(e)&&r[t]==="visible")},"elementCanBeScrolled"),aK=n(function(e){return gh(e,"overflowY")},"elementCouldBeVScrolled"),rK=n(function(e){return gh(e,"overflowX")},"elementCouldBeHScrolled"),Ol=n(function(e,t){var r=t.ownerDocument,o=t;do{if(typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host),fh(e,o)){var i=vh(e,o);if(i[1]>i[2])return!0}o=o.parentNode}while(o&&o!==r.body);return!1},"locationCouldBeScrolled"),oK=n(function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},"getVScrollVariables"),nK=n(function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},"getHScrollVariables"),fh=n(function(e,t){return e==="v"?aK(t):rK(t)},"elementCouldBeScrolled"),vh=n(function(e,t){return e==="v"?oK(t):nK(t)},"getScrollVariables"),iK=n(function(e,t){return e==="h"&&t==="rtl"?-1:1},"getDirectionFactor"),sK=n(function(e,t,r,o,i){var s=iK(e,window.getComputedStyle(t).direction),l=s*o,d=r.target,u=t.contains(d),m=!1,g=l>0,v=0,y=0;do{if(!d)break;var b=vh(e,d),P=b[0],A=b[1]-b[2]-s*P;(P||A)&&fh(e,d)&&(v+=A,y+=P);var C=d.parentNode;d=C&&C.nodeType===Node.DOCUMENT_FRAGMENT_NODE?C.host:C}while(!u&&d!==document.body||u&&(t.contains(d)||t===d));return(g&&(i&&Math.abs(v)<1||!i&&l>v)||!g&&(i&&Math.abs(y)<1||!i&&-l>y))&&(m=!0),m},"handleScroll"),hr=n(function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},"getTouchXY"),Dl=n(function(e){return[e.deltaX,e.deltaY]},"getDeltaXY"),zl=n(function(e){return e&&"current"in e?e.current:e},"extractRef"),lK=n(function(e,t){return e[0]===t[0]&&e[1]===t[1]},"deltaCompare"),cK=n(function(e){return`
132
132
  .block-interactivity-`.concat(e,` {pointer-events: none;}
133
133
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
134
- `)},"generateStyle"),dK=0,Qt=[];function uK(e){var t=k.useRef([]),r=k.useRef([0,0]),o=k.useRef(),i=k.useState(dK++)[0],s=k.useState(hh)[0],l=k.useRef(e);k.useEffect(function(){l.current=e},[e]),k.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var A=RV([e.lockRef.current],(e.shards||[]).map(zl),!0).filter(Boolean);return A.forEach(function(C){return C.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),A.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var d=k.useCallback(function(A,C){if("touches"in A&&A.touches.length===2||A.type==="wheel"&&A.ctrlKey)return!l.current.allowPinchZoom;var D=hr(A),R=r.current,$="deltaX"in A?A.deltaX:R[0]-D[0],U="deltaY"in A?A.deltaY:R[1]-D[1],O,L=A.target,N=Math.abs($)>Math.abs(U)?"h":"v";if("touches"in A&&N==="h"&&L.type==="range")return!1;var M=window.getSelection(),Y=M&&M.anchorNode;if(Y&&(Y===L||Y.contains(L)))return!1;var ne=Ol(N,L);if(!ne)return!0;if(ne?O=N:(O=N==="v"?"h":"v",ne=Ol(N,L)),!ne)return!1;if(!o.current&&"changedTouches"in A&&($||U)&&(o.current=O),!O)return!0;var ve=o.current||O;return sK(ve,C,A,ve==="h"?$:U,!0)},[]),u=k.useCallback(function(A){var C=A;if(!(!Qt.length||Qt[Qt.length-1]!==s)){var D="deltaY"in C?Dl(C):hr(C),R=t.current.filter(function(U){return U.name===C.type&&(U.target===C.target||C.target===U.shadowParent)&&lK(U.delta,D)})[0];if(R&&R.should){C.cancelable&&C.preventDefault();return}if(!R){var $=(l.current.shards||[]).map(zl).filter(Boolean).filter(function(U){return U.contains(C.target)});($.length>0?d(C,$[0]):!l.current.noIsolation)&&C.cancelable&&C.preventDefault()}}},[]),m=k.useCallback(function(A,C,D,R){var $={name:A,delta:C,target:D,should:R,shadowParent:pK(D)};t.current.push($),setTimeout(function(){t.current=t.current.filter(function(U){return U!==$})},1)},[]),g=k.useCallback(function(A){r.current=hr(A),o.current=void 0},[]),v=k.useCallback(function(A){m(A.type,Dl(A),A.target,d(A,e.lockRef.current))},[]),y=k.useCallback(function(A){m(A.type,hr(A),A.target,d(A,e.lockRef.current))},[]);k.useEffect(function(){return Qt.push(s),e.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:y}),document.addEventListener("wheel",u,Jt),document.addEventListener("touchmove",u,Jt),document.addEventListener("touchstart",g,Jt),function(){Qt=Qt.filter(function(A){return A!==s}),document.removeEventListener("wheel",u,Jt),document.removeEventListener("touchmove",u,Jt),document.removeEventListener("touchstart",g,Jt)}},[]);var b=e.removeScrollBar,P=e.inert;return k.createElement(k.Fragment,null,P?k.createElement(s,{styles:cK(i)}):null,b?k.createElement(eK,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}n(uK,"RemoveScrollSideCar");function pK(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}n(pK,"getOutermostShadowParent");var mK=qV(mh,uK),yh=k.forwardRef(function(e,t){return k.createElement(wo,Ze({},e,{ref:t,sideCar:mK}))});yh.classNames=wo.classNames;var hK=n(function(e){return typeof document>"u"?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},"getDefaultParent"),ea=new WeakMap,gr=new WeakMap,fr={},Vo=0,bh=n(function(e){return e&&(e.host||bh(e.parentNode))},"unwrapHost"),gK=n(function(e,t){return t.map(function(r){if(e.contains(r))return r;var o=bh(r);return o&&e.contains(o)?o:null}).filter(function(r){return!!r})},"correctTargets"),fK=n(function(e,t,r,o){var i=gK(t,Array.isArray(e)?e:[e]);fr[r]||(fr[r]=new WeakMap);var s=fr[r],l=[],d=new Set,u=new Set(i),m=n(function(v){!v||d.has(v)||(d.add(v),m(v.parentNode))},"keep");i.forEach(m);var g=n(function(v){!v||u.has(v)||Array.prototype.forEach.call(v.children,function(y){if(d.has(y))g(y);else try{var b=y.getAttribute(o),P=b!==null&&b!=="false",A=(ea.get(y)||0)+1,C=(s.get(y)||0)+1;ea.set(y,A),s.set(y,C),l.push(y),A===1&&P&&gr.set(y,!0),C===1&&y.setAttribute(r,"true"),P||y.setAttribute(o,"true")}catch{}})},"deep");return g(t),d.clear(),Vo++,function(){l.forEach(function(v){var y=ea.get(v)-1,b=s.get(v)-1;ea.set(v,y),s.set(v,b),y||(gr.has(v)||v.removeAttribute(o),gr.delete(v)),b||v.removeAttribute(r)}),Vo--,Vo||(ea=new WeakMap,ea=new WeakMap,gr=new WeakMap,fr={})}},"applyAttributeToOthers"),vK=n(function(e,t,r){r===void 0&&(r="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),i=t||hK(e);return i?(o.push.apply(o,Array.from(i.querySelectorAll("[aria-live], script"))),fK(o,i,r,"aria-hidden")):function(){return null}},"hideOthers"),yK=Object.defineProperty,bK=n((e,t)=>yK(e,"name",{value:t,configurable:!0}),"__name$3");function wh(e){const[t,r]=k.useState(void 0);return Je(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let l,d;if("borderBoxSize"in s){const u=s.borderBoxSize,m=Array.isArray(u)?u[0]:u;l=m.inlineSize,d=m.blockSize}else l=e.offsetWidth,d=e.offsetHeight;r({width:l,height:d})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else r(void 0)},[e]),t}n(wh,"useSize");bK(wh,"useSize");var wK=["top","right","bottom","left"],Pt=Math.min,lt=Math.max,Hr=Math.round,vr=Math.floor,ct=n(e=>({x:e,y:e}),"createCoords"),kK={left:"right",right:"left",bottom:"top",top:"bottom"};function kh(e,t,r){return lt(e,Pt(t,r))}n(kh,"clamp");function ht(e,t){return typeof e=="function"?e(t):e}n(ht,"evaluate");function It(e){return e.split("-")[0]}n(It,"getSide");function Pa(e){return e.split("-")[1]}n(Pa,"getAlignment");function Gi(e){return e==="x"?"y":"x"}n(Gi,"getOppositeAxis");function Wi(e){return e==="y"?"height":"width"}n(Wi,"getAxisLength");function Xe(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}n(Xe,"getSideAxis");function Hi(e){return Gi(Xe(e))}n(Hi,"getAlignmentAxis");function _K(e,t,r){r===void 0&&(r=!1);const o=Pa(e),i=Hi(e),s=Wi(i);let l=i==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(l=Vr(l)),[l,Vr(l)]}n(_K,"getAlignmentSides");function SK(e){const t=Vr(e);return[On(e),t,On(t)]}n(SK,"getExpandedPlacements");function On(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}n(On,"getOppositeAlignmentPlacement");var Nl=["left","right"],Ll=["right","left"],PK=["top","bottom"],IK=["bottom","top"];function AK(e,t,r){switch(e){case"top":case"bottom":return r?t?Ll:Nl:t?Nl:Ll;case"left":case"right":return t?PK:IK;default:return[]}}n(AK,"getSideList");function CK(e,t,r,o){const i=Pa(e);let s=AK(It(e),r==="start",o);return i&&(s=s.map(l=>l+"-"+i),t&&(s=s.concat(s.map(On)))),s}n(CK,"getOppositeAxisPlacements");function Vr(e){const t=It(e);return kK[t]+e.slice(t.length)}n(Vr,"getOppositePlacement");function xK(e){var t,r,o,i;return{top:(t=e.top)!=null?t:0,right:(r=e.right)!=null?r:0,bottom:(o=e.bottom)!=null?o:0,left:(i=e.left)!=null?i:0}}n(xK,"expandPaddingObject");function _h(e){return typeof e!="number"?xK(e):{top:e,right:e,bottom:e,left:e}}n(_h,"getPaddingObject");function Kr(e){const{x:t,y:r,width:o,height:i}=e;return{width:o,height:i,top:r,left:t,right:t+o,bottom:r+i,x:t,y:r}}n(Kr,"rectToClientRect");function jl(e,t,r){let{reference:o,floating:i}=e;const s=Xe(t),l=Hi(t),d=Wi(l),u=It(t),m=s==="y",g=o.x+o.width/2-i.width/2,v=o.y+o.height/2-i.height/2,y=o[d]/2-i[d]/2;let b;switch(u){case"top":b={x:g,y:o.y-i.height};break;case"bottom":b={x:g,y:o.y+o.height};break;case"right":b={x:o.x+o.width,y:v};break;case"left":b={x:o.x-i.width,y:v};break;default:b={x:o.x,y:o.y}}const P=Pa(t);return P&&(b[l]+=y*(P==="end"?1:-1)*(r&&m?-1:1)),b}n(jl,"computeCoordsFromPlacement");async function TK(e,t){var r;t===void 0&&(t={});const{x:o,y:i,platform:s,rects:l,elements:d,strategy:u}=e,{boundary:m="clippingAncestors",rootBoundary:g="viewport",elementContext:v="floating",altBoundary:y=!1,padding:b=0}=ht(t,e),P=_h(b),A=d[y?v==="floating"?"reference":"floating":v],C=Kr(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(A)))==null||r?A:A.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(d.floating)),boundary:m,rootBoundary:g,strategy:u})),D=v==="floating"?{x:o,y:i,width:l.floating.width,height:l.floating.height}:l.reference,R=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d.floating)),$=await(s.isElement==null?void 0:s.isElement(R))&&await(s.getScale==null?void 0:s.getScale(R))||{x:1,y:1},U=Kr(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:D,offsetParent:R,strategy:u}):D);return{top:(C.top-U.top+P.top)/$.y,bottom:(U.bottom-C.bottom+P.bottom)/$.y,left:(C.left-U.left+P.left)/$.x,right:(U.right-C.right+P.right)/$.x}}n(TK,"detectOverflow");var EK=50,UK=n(async(e,t,r)=>{const{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:l}=r,d=l.detectOverflow?l:{...l,detectOverflow:TK},u=await(l.isRTL==null?void 0:l.isRTL(t));let m=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:g,y:v}=jl(m,o,u),y=o,b=0;const P={};for(let A=0;A<s.length;A++){const C=s[A];if(!C)continue;const{name:D,fn:R}=C,{x:$,y:U,data:O,reset:L}=await R({x:g,y:v,initialPlacement:o,placement:y,strategy:i,middlewareData:P,rects:m,platform:d,elements:{reference:e,floating:t}});g=$??g,v=U??v,P[D]={...P[D],...O},L&&b<EK&&(b++,typeof L=="object"&&(L.placement&&(y=L.placement),L.rects&&(m=L.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:i}):L.rects),{x:g,y:v}=jl(m,y,u)),A=-1)}return{x:g,y:v,placement:y,strategy:i,middlewareData:P}},"computePosition$1"),RK=n(e=>({name:"arrow",options:e,async fn(t){const{x:r,y:o,placement:i,rects:s,platform:l,elements:d,middlewareData:u}=t,{element:m,padding:g=0}=ht(e,t)||{};if(m==null)return{};const v=_h(g),y={x:r,y:o},b=Hi(i),P=Wi(b),A=await l.getDimensions(m),C=b==="y",D=C?"top":"left",R=C?"bottom":"right",$=C?"clientHeight":"clientWidth",U=s.reference[P]+s.reference[b]-y[b]-s.floating[P],O=y[b]-s.reference[b],L=await(l.getOffsetParent==null?void 0:l.getOffsetParent(m));let N=L?L[$]:0;(!N||!await(l.isElement==null?void 0:l.isElement(L)))&&(N=d.floating[$]||s.floating[P]);const M=U/2-O/2,Y=N/2-A[P]/2-1,ne=Pt(v[D],Y),ve=Pt(v[R],Y),X=N-A[P]-ve,ue=N/2-A[P]/2+M,se=kh(ne,ue,X),ye=!u.arrow&&Pa(i)!=null&&ue!==se&&s.reference[P]/2-(ue<ne?ne:ve)-A[P]/2<0,re=ye?ue<ne?ue-ne:ue-X:0;return{[b]:y[b]+re,data:{[b]:se,centerOffset:ue-se-re,...ye&&{alignmentOffset:re}},reset:ye}}}),"arrow$3"),MK=n(function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,o;const{placement:i,middlewareData:s,rects:l,initialPlacement:d,platform:u,elements:m}=t,{mainAxis:g=!0,crossAxis:v=!0,fallbackPlacements:y,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:P="none",flipAlignment:A=!0,...C}=ht(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const D=It(i),R=Xe(d),$=It(d)===d,U=await(u.isRTL==null?void 0:u.isRTL(m.floating)),O=y||($||!A?[Vr(d)]:SK(d)),L=P!=="none";!y&&L&&O.push(...CK(d,A,P,U));const N=[d,...O],M=await u.detectOverflow(t,C),Y=[];let ne=((o=s.flip)==null?void 0:o.overflows)||[];if(g&&Y.push(M[D]),v){const se=_K(i,l,U);Y.push(M[se[0]],M[se[1]])}if(ne=[...ne,{placement:i,overflows:Y}],!Y.every(se=>se<=0)){var ve,X;const se=(((ve=s.flip)==null?void 0:ve.index)||0)+1,ye=N[se];if(ye&&(!(v==="alignment"&&R!==Xe(ye))||ne.every(le=>Xe(le.placement)===R?le.overflows[0]>0:!0)))return{data:{index:se,overflows:ne},reset:{placement:ye}};let re=(X=ne.filter(le=>le.overflows[0]<=0).sort((le,Q)=>le.overflows[1]-Q.overflows[1])[0])==null?void 0:X.placement;if(!re)switch(b){case"bestFit":{var ue;const le=(ue=ne.filter(Q=>{if(L){const pe=Xe(Q.placement);return pe===R||pe==="y"}return!0}).map(Q=>[Q.placement,Q.overflows.filter(pe=>pe>0).reduce((pe,j)=>pe+j,0)]).sort((Q,pe)=>Q[1]-pe[1])[0])==null?void 0:ue[0];le&&(re=le);break}case"initialPlacement":re=d}if(i!==re)return{reset:{placement:re}}}return{}}}},"flip$2");function ql(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}n(ql,"getSideOffsets");function Fl(e){return wK.some(t=>e[t]>=0)}n(Fl,"isAnySideFullyClipped");var $K=n(function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:o}=t,{strategy:i="referenceHidden",...s}=ht(e,t);switch(i){case"referenceHidden":{const l=ql(await o.detectOverflow(t,{...s,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:Fl(l)}}}case"escaped":{const l=ql(await o.detectOverflow(t,{...s,altBoundary:!0}),r.floating);return{data:{escapedOffsets:l,escaped:Fl(l)}}}default:return{}}}}},"hide$2"),Sh=new Set(["left","top"]);async function OK(e,t){const{placement:r,platform:o,elements:i}=e,s=await(o.isRTL==null?void 0:o.isRTL(i.floating)),l=It(r),d=Pa(r),u=Xe(r)==="y",m=Sh.has(l)?-1:1,g=s&&u?-1:1,v=ht(t,e);let{mainAxis:y,crossAxis:b,alignmentAxis:P}=typeof v=="number"?{mainAxis:v,crossAxis:0,alignmentAxis:null}:{mainAxis:v.mainAxis||0,crossAxis:v.crossAxis||0,alignmentAxis:v.alignmentAxis};return d&&typeof P=="number"&&(b=d==="end"?P*-1:P),u?{x:b*g,y:y*m}:{x:y*m,y:b*g}}n(OK,"convertValueToCoords");var DK=n(function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,o;const{x:i,y:s,placement:l,middlewareData:d}=t,u=await OK(t,e);return l===((r=d.offset)==null?void 0:r.placement)&&(o=d.arrow)!=null&&o.alignmentOffset?{}:{x:i+u.x,y:s+u.y,data:{...u,placement:l}}}}},"offset$2"),zK=n(function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:o,placement:i,platform:s}=t,{mainAxis:l=!0,crossAxis:d=!1,limiter:u={fn:n(R=>{let{x:$,y:U}=R;return{x:$,y:U}},"fn")},...m}=ht(e,t),g={x:r,y:o},v=await s.detectOverflow(t,m),y=Xe(i),b=Gi(y);let P=g[b],A=g[y];const C=n((R,$)=>kh($+v[R==="y"?"top":"left"],$,$-v[R==="y"?"bottom":"right"]),"clampCoord");l&&(P=C(b,P)),d&&(A=C(y,A));const D=u.fn({...t,[b]:P,[y]:A});return{...D,data:{x:D.x-r,y:D.y-o,enabled:{[b]:l,[y]:d}}}}}},"shift$2"),NK=n(function(e){return e===void 0&&(e={}),{options:e,fn(t){var r,o;const{x:i,y:s,placement:l,rects:d,middlewareData:u}=t,{offset:m=0,mainAxis:g=!0,crossAxis:v=!0}=ht(e,t),y={x:i,y:s},b=Xe(l),P=Gi(b);let A=y[P],C=y[b];const D=ht(m,t),R=typeof D=="number"?{mainAxis:D,crossAxis:0}:{mainAxis:(r=D.mainAxis)!=null?r:0,crossAxis:(o=D.crossAxis)!=null?o:0};if(g){const O=P==="y"?"height":"width",L=d.reference[P]-d.floating[O]+R.mainAxis,N=d.reference[P]+d.reference[O]-R.mainAxis;A<L?A=L:A>N&&(A=N)}if(v){var $,U;const O=P==="y"?"width":"height",L=Sh.has(It(l)),N=d.reference[b]-d.floating[O]+(L&&(($=u.offset)==null?void 0:$[b])||0)+(L?0:R.crossAxis),M=d.reference[b]+d.reference[O]+(L?0:((U=u.offset)==null?void 0:U[b])||0)-(L?R.crossAxis:0);C<N?C=N:C>M&&(C=M)}return{[P]:A,[b]:C}}}},"limitShift$2"),LK=n(function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:r,rects:o,platform:i,elements:s}=t,{apply:l=n(()=>{},"apply"),...d}=ht(e,t),u=await i.detectOverflow(t,d),m=It(r),g=Pa(r),v=Xe(r)==="y",{width:y,height:b}=o.floating;let P,A;m==="top"||m==="bottom"?(P=m,A=g===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(A=m,P=g==="end"?"top":"bottom");const C=b-u.top-u.bottom,D=y-u.left-u.right,R=Pt(b-u[P],C),$=Pt(y-u[A],D),U=t.middlewareData.shift,O=!U;let L=R,N=$;U!=null&&U.enabled.x&&(N=D),U!=null&&U.enabled.y&&(L=C),O&&!g&&(v?N=y-2*lt(u.left,u.right):L=b-2*lt(u.top,u.bottom)),await l({...t,availableWidth:N,availableHeight:L});const M=await i.getDimensions(s.floating);return y!==M.width||b!==M.height?{reset:{rects:!0}}:{}}}},"size$2");function ko(){return typeof window<"u"}n(ko,"hasWindow");function Ia(e){return Ph(e)?(e.nodeName||"").toLowerCase():"#document"}n(Ia,"getNodeName");function Oe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}n(Oe,"getWindow");function ft(e){var t;return(t=(Ph(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}n(ft,"getDocumentElement");function Ph(e){return ko()?e instanceof Node||e instanceof Oe(e).Node:!1}n(Ph,"isNode");function Qe(e){return ko()?e instanceof Element||e instanceof Oe(e).Element:!1}n(Qe,"isElement");function Et(e){return ko()?e instanceof HTMLElement||e instanceof Oe(e).HTMLElement:!1}n(Et,"isHTMLElement");function Bl(e){return!ko()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Oe(e).ShadowRoot}n(Bl,"isShadowRoot");function _o(e){const{overflow:t,overflowX:r,overflowY:o,display:i}=et(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+r)&&i!=="inline"&&i!=="contents"}n(_o,"isOverflowElement");function jK(e){return/^(table|td|th)$/.test(Ia(e))}n(jK,"isTableElement");function So(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}n(So,"isTopLayer");var qK=/transform|translate|scale|rotate|perspective|filter/,FK=/paint|layout|strict|content/,$t=n(e=>!!e&&e!=="none","isNotNone"),Ko;function Vi(e){const t=Qe(e)?et(e):e;return $t(t.transform)||$t(t.translate)||$t(t.scale)||$t(t.rotate)||$t(t.perspective)||!Ki()&&($t(t.backdropFilter)||$t(t.filter))||qK.test(t.willChange||"")||FK.test(t.contain||"")}n(Vi,"isContainingBlock");function BK(e){let t=qt(e);for(;Et(t)&&!Ba(t);){if(Vi(t))return t;if(So(t))return null;t=qt(t)}return null}n(BK,"getContainingBlock");function Ki(){return Ko==null&&(Ko=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ko}n(Ki,"isWebKit");function Ba(e){return/^(html|body|#document)$/.test(Ia(e))}n(Ba,"isLastTraversableNode");function et(e){return Oe(e).getComputedStyle(e)}n(et,"getComputedStyle$1");function Po(e){return Qe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}n(Po,"getNodeScroll");function qt(e){if(Ia(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Bl(e)&&e.host||ft(e);return Bl(t)?t.host:t}n(qt,"getParentNode");function Ih(e){const t=qt(e);return Ba(t)?(e.ownerDocument||e).body:Et(t)&&_o(t)?t:Ih(t)}n(Ih,"getNearestOverflowAncestor");function Ga(e,t,r){var o;t===void 0&&(t=[]),r===void 0&&(r=!0);const i=Ih(e),s=i===((o=e.ownerDocument)==null?void 0:o.body),l=Oe(i);if(s){const d=Dn(l);return t.concat(l,l.visualViewport||[],_o(i)?i:[],d&&r?Ga(d):[])}else return t.concat(i,Ga(i,[],r))}n(Ga,"getOverflowAncestors");function Dn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}n(Dn,"getFrameElement");function Ah(e){const t=et(e);let r=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=Et(e),s=i?e.offsetWidth:r,l=i?e.offsetHeight:o,d=Hr(r)!==s||Hr(o)!==l;return d&&(r=s,o=l),{width:r,height:o,$:d}}n(Ah,"getCssDimensions");function Zi(e){return Qe(e)?e:e.contextElement}n(Zi,"unwrapElement");function sa(e){const t=Zi(e);if(!Et(t))return ct(1);const r=t.getBoundingClientRect(),{width:o,height:i,$:s}=Ah(t);let l=(s?Hr(r.width):r.width)/o,d=(s?Hr(r.height):r.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!d||!Number.isFinite(d))&&(d=1),{x:l,y:d}}n(sa,"getScale");var GK=ct(0);function Ch(e){const t=Oe(e);return!Ki()||!t.visualViewport?GK:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}n(Ch,"getVisualOffsets");function WK(e,t,r){return t===void 0&&(t=!1),!!r&&t&&r===Oe(e)}n(WK,"shouldAddVisualOffsets");function Ft(e,t,r,o){t===void 0&&(t=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),s=Zi(e);let l=ct(1);t&&(o?Qe(o)&&(l=sa(o)):l=sa(e));const d=WK(s,r,o)?Ch(s):ct(0);let u=(i.left+d.x)/l.x,m=(i.top+d.y)/l.y,g=i.width/l.x,v=i.height/l.y;if(s&&o){const y=Oe(s),b=Qe(o)?Oe(o):o;let P=y,A=Dn(P);for(;A&&b!==P;){const C=sa(A),D=A.getBoundingClientRect(),R=et(A),$=D.left+(A.clientLeft+parseFloat(R.paddingLeft))*C.x,U=D.top+(A.clientTop+parseFloat(R.paddingTop))*C.y;u*=C.x,m*=C.y,g*=C.x,v*=C.y,u+=$,m+=U,P=Oe(A),A=Dn(P)}}return Kr({width:g,height:v,x:u,y:m})}n(Ft,"getBoundingClientRect");function Io(e,t){const r=Po(e).scrollLeft;return t?t.left+r:Ft(ft(e)).left+r}n(Io,"getWindowScrollBarX");function xh(e,t){const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-Io(e,r),y:r.top+t.scrollTop}}n(xh,"getHTMLOffset");function HK(e){let{elements:t,rect:r,offsetParent:o,strategy:i}=e;const s=i==="fixed",l=ft(o),d=t?So(t.floating):!1;if(o===l||d&&s)return r;let u={scrollLeft:0,scrollTop:0},m=ct(1);const g=ct(0),v=Et(o);if((v||!s)&&((Ia(o)!=="body"||_o(l))&&(u=Po(o)),v)){const b=Ft(o);m=sa(o),g.x=b.x+o.clientLeft,g.y=b.y+o.clientTop}const y=l&&!v&&!s?xh(l,u):ct(0);return{width:r.width*m.x,height:r.height*m.y,x:r.x*m.x-u.scrollLeft*m.x+g.x+y.x,y:r.y*m.y-u.scrollTop*m.y+g.y+y.y}}n(HK,"convertOffsetParentRelativeRectToViewportRelativeRect");function VK(e){return e.getClientRects?Array.from(e.getClientRects()):[]}n(VK,"getClientRects");function KK(e){const t=Po(e),r=e.ownerDocument.body,o=lt(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),i=lt(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let s=-t.scrollLeft+Io(e);const l=-t.scrollTop;return et(r).direction==="rtl"&&(s+=lt(e.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:l}}n(KK,"getDocumentRect");var ZK=25;function YK(e,t,r){r===void 0&&(r="viewport");const o=r==="layoutViewport",i=Oe(e),s=ft(e),l=i.visualViewport;let d=s.clientWidth,u=s.clientHeight,m=0,g=0;if(l){const v=!Ki()||t==="fixed";o?v||(m=-l.offsetLeft,g=-l.offsetTop):(d=l.width,u=l.height,v&&(m=l.offsetLeft,g=l.offsetTop))}if(Io(s)<=0){const v=s.ownerDocument,y=v.body,b=getComputedStyle(y),P=v.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,A=Math.abs(s.clientWidth-y.clientWidth-P),C=getComputedStyle(s).scrollbarGutter==="stable both-edges"?A/2:A;C<=ZK&&(d-=C)}return{width:d,height:u,x:m,y:g}}n(YK,"getViewportRect");function XK(e,t){const r=Ft(e,!0,t==="fixed"),o=r.top+e.clientTop,i=r.left+e.clientLeft,s=sa(e);return{width:e.clientWidth*s.x,height:e.clientHeight*s.y,x:i*s.x,y:o*s.y}}n(XK,"getInnerBoundingClientRect");function Gl(e,t,r){let o;if(t==="viewport"||t==="layoutViewport")o=YK(e,r,t);else if(t==="document")o=KK(ft(e));else if(Qe(t))o=XK(t,r);else{const i=Ch(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Kr(o)}n(Gl,"getClientRectFromClippingAncestor");function JK(e,t){const r=t.get(e);if(r)return r;let o=Ga(e,[],!1).filter(d=>Qe(d)&&Ia(d)!=="body"),i=null;const s=et(e).position==="fixed";let l=s?qt(e):e;for(;Qe(l)&&!Ba(l);){const d=et(l),u=Vi(l),m=i?i.position:s?"fixed":"";!u&&(m==="fixed"||m==="absolute"&&d.position==="static")?o=o.filter(g=>g!==l):i=d,l=qt(l)}return t.set(e,o),o}n(JK,"getClippingElementAncestors");function QK(e){let{element:t,boundary:r,rootBoundary:o,strategy:i}=e;const s=[...r==="clippingAncestors"?So(t)?[]:JK(t,this._c):[].concat(r),o],l=Gl(t,s[0],i);let d=l.top,u=l.right,m=l.bottom,g=l.left;for(let v=1;v<s.length;v++){const y=Gl(t,s[v],i);d=lt(y.top,d),u=Pt(y.right,u),m=Pt(y.bottom,m),g=lt(y.left,g)}return{width:u-g,height:m-d,x:g,y:d}}n(QK,"getClippingRect");function e9(e){const{width:t,height:r}=Ah(e);return{width:t,height:r}}n(e9,"getDimensions");function t9(e,t,r){const o=Et(t),i=ft(t),s=r==="fixed",l=Ft(e,!0,s,t);let d={scrollLeft:0,scrollTop:0};const u=ct(0);if((o||!s)&&((Ia(t)!=="body"||_o(i))&&(d=Po(t)),o)){const g=Ft(t,!0,s,t);u.x=g.x+t.clientLeft,u.y=g.y+t.clientTop}!o&&i&&(u.x=Io(i));const m=i&&!o&&!s?xh(i,d):ct(0);return{x:l.left+d.scrollLeft-u.x-m.x,y:l.top+d.scrollTop-u.y-m.y,width:l.width,height:l.height}}n(t9,"getRectRelativeToOffsetParent");function Zo(e){return et(e).position==="static"}n(Zo,"isStaticPositioned");function Wl(e,t){if(!Et(e)||et(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return ft(e)===r&&(r=r.ownerDocument.body),r}n(Wl,"getTrueOffsetParent");function Th(e,t){const r=Oe(e);if(So(e))return r;if(!Et(e)){let i=qt(e);for(;i&&!Ba(i);){if(Qe(i)&&!Zo(i))return i;i=qt(i)}return r}let o=Wl(e,t);for(;o&&jK(o)&&Zo(o);)o=Wl(o,t);return o&&Ba(o)&&Zo(o)&&!Vi(o)?r:o||BK(e)||r}n(Th,"getOffsetParent");var a9=n(async function(e){const t=this.getOffsetParent||Th,r=this.getDimensions,o=await r(e.floating);return{reference:t9(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},"getElementRects");function r9(e){return et(e).direction==="rtl"}n(r9,"isRTL");var o9={convertOffsetParentRelativeRectToViewportRelativeRect:HK,getDocumentElement:ft,getClippingRect:QK,getOffsetParent:Th,getElementRects:a9,getClientRects:VK,getDimensions:e9,getScale:sa,isElement:Qe,isRTL:r9};function Eh(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}n(Eh,"rectsAreEqual");function n9(e,t,r){let o=null,i;const s=ft(e);function l(){var g;clearTimeout(i),(g=o)==null||g.disconnect(),o=null}n(l,"cleanup");function d(g,v){g===void 0&&(g=!1),v===void 0&&(v=1),l();const y=e.getBoundingClientRect(),{left:b,top:P,width:A,height:C}=y;if(g||t(),!A||!C)return;const D=vr(P),R=vr(s.clientWidth-(b+A)),$=vr(s.clientHeight-(P+C)),U=vr(b),O={rootMargin:-D+"px "+-R+"px "+-$+"px "+-U+"px",threshold:lt(0,Pt(1,v))||1};let L=!0;function N(M){const Y=M[0].intersectionRatio;if(!Eh(y,e.getBoundingClientRect()))return d();if(Y!==v){if(!L)return d();Y?d(!1,Y):i=setTimeout(()=>{d(!1,1e-7)},1e3)}L=!1}n(N,"handleObserve");try{o=new IntersectionObserver(N,{...O,root:s.ownerDocument})}catch{o=new IntersectionObserver(N,O)}o.observe(e)}n(d,"refresh");const u=Oe(e),m=n(()=>d(r),"handleResize");return u.addEventListener("resize",m),d(!0),()=>{u.removeEventListener("resize",m),l()}}n(n9,"observeMove");function i9(e,t,r,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:u=!1}=o,m=Zi(e),g=i||s?[...m?Ga(m):[],...t?Ga(t):[]]:[];g.forEach(D=>{i&&D.addEventListener("scroll",r),s&&D.addEventListener("resize",r)});const v=m&&d?n9(m,r,s):null;let y=-1,b=null;l&&(b=new ResizeObserver(D=>{let[R]=D;R&&R.target===m&&b&&t&&(b.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var $;($=b)==null||$.observe(t)})),r()}),m&&!u&&b.observe(m),t&&b.observe(t));let P,A=u?Ft(e):null;u&&C();function C(){const D=Ft(e);A&&!Eh(A,D)&&r(),A=D,P=requestAnimationFrame(C)}return n(C,"frameLoop"),r(),()=>{var D;g.forEach(R=>{i&&R.removeEventListener("scroll",r),s&&R.removeEventListener("resize",r)}),v?.(),(D=b)==null||D.disconnect(),b=null,u&&cancelAnimationFrame(P)}}n(i9,"autoUpdate");var s9=DK,l9=zK,c9=MK,d9=LK,u9=$K,Hl=RK,p9=NK,m9=n((e,t,r)=>{const o=new Map,i=r??{},s={...o9,...i.platform,_c:o};return UK(e,t,{...i,platform:s})},"computePosition"),xr=typeof document<"u"?k.useLayoutEffect:n(function(){},"noop");function Zr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,o,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(o=r;o--!==0;)if(!Zr(e[o],t[o]))return!1;return!0}if(i=Object.keys(e),r=i.length,r!==Object.keys(t).length)return!1;for(o=r;o--!==0;)if(!{}.hasOwnProperty.call(t,i[o]))return!1;for(o=r;o--!==0;){const s=i[o];if(!(s==="_owner"&&e.$$typeof)&&!Zr(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}n(Zr,"deepEqual");function Uh(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}n(Uh,"getDPR");function Vl(e,t){const r=Uh(e);return Math.round(t*r)/r}n(Vl,"roundByDPR");function Yo(e){const t=k.useRef(e);return xr(()=>{t.current=e}),t}n(Yo,"useLatestRef");function h9(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:o=[],platform:i,elements:{reference:s,floating:l}={},transform:d=!0,whileElementsMounted:u,open:m}=e,[g,v]=k.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[y,b]=k.useState(o);Zr(y,o)||b(o);const[P,A]=k.useState(null),[C,D]=k.useState(null),R=k.useCallback(Q=>{Q!==L.current&&(L.current=Q,A(Q))},[]),$=k.useCallback(Q=>{Q!==N.current&&(N.current=Q,D(Q))},[]),U=s||P,O=l||C,L=k.useRef(null),N=k.useRef(null),M=k.useRef(g),Y=u!=null,ne=Yo(u),ve=Yo(i),X=Yo(m),ue=k.useCallback(()=>{if(!L.current||!N.current)return;const Q={placement:t,strategy:r,middleware:y};ve.current&&(Q.platform=ve.current),m9(L.current,N.current,Q).then(pe=>{const j={...pe,isPositioned:X.current!==!1};se.current&&!Zr(M.current,j)&&(M.current=j,Ni.flushSync(()=>{v(j)}))})},[y,t,r,ve,X]);xr(()=>{m===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,v(Q=>({...Q,isPositioned:!1})))},[m]);const se=k.useRef(!1);xr(()=>(se.current=!0,()=>{se.current=!1}),[]),xr(()=>{if(U&&(L.current=U),O&&(N.current=O),U&&O){if(ne.current)return ne.current(U,O,ue);ue()}},[U,O,ue,ne,Y]);const ye=k.useMemo(()=>({reference:L,floating:N,setReference:R,setFloating:$}),[R,$]),re=k.useMemo(()=>({reference:U,floating:O}),[U,O]),le=k.useMemo(()=>{const Q={position:r,left:0,top:0};if(!re.floating)return Q;const pe=Vl(re.floating,g.x),j=Vl(re.floating,g.y);return d?{...Q,transform:"translate("+pe+"px, "+j+"px)",...Uh(re.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:pe,top:j}},[r,d,re.floating,g.x,g.y]);return k.useMemo(()=>({...g,update:ue,refs:ye,elements:re,floatingStyles:le}),[g,ue,ye,re,le])}n(h9,"useFloating");var g9=n(e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return n(t,"isRef"),{name:"arrow",options:e,fn(r){const{element:o,padding:i}=typeof e=="function"?e(r):e;return o&&t(o)?o.current!=null?Hl({element:o.current,padding:i}).fn(r):{}:o?Hl({element:o,padding:i}).fn(r):{}}}},"arrow$1"),f9=n((e,t)=>{const r=s9(e);return{name:r.name,fn:r.fn,options:[e,t]}},"offset"),v9=n((e,t)=>{const r=l9(e);return{name:r.name,fn:r.fn,options:[e,t]}},"shift"),y9=n((e,t)=>({fn:p9(e).fn,options:[e,t]}),"limitShift"),b9=n((e,t)=>{const r=c9(e);return{name:r.name,fn:r.fn,options:[e,t]}},"flip"),w9=n((e,t)=>{const r=d9(e);return{name:r.name,fn:r.fn,options:[e,t]}},"size"),k9=n((e,t)=>{const r=u9(e);return{name:r.name,fn:r.fn,options:[e,t]}},"hide"),_9=n((e,t)=>{const r=g9(e);return{name:r.name,fn:r.fn,options:[e,t]}},"arrow"),S9=Object.defineProperty,P9=n((e,t)=>S9(e,"name",{value:t,configurable:!0}),"__name$2"),I9=k.forwardRef(P9(n(function(t,r){const{children:o,width:i=10,height:s=5,...l}=t;return(0,ae.jsx)(Vt.svg,{...l,ref:r,width:i,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?o:(0,ae.jsx)("polygon",{points:"0,0 30,0 15,10"})})},"Arrow2"),"Arrow")),A9=I9,C9=Object.defineProperty,dt=n((e,t)=>C9(e,"name",{value:t,configurable:!0}),"__name$1"),Rh="Popper",[Mh,$h]=Li(Rh),[x9,Oh]=Mh(Rh),T9=dt(e=>{const{__scopePopper:t,children:r}=e,[o,i]=k.useState(null),[s,l]=k.useState(void 0);return(0,ae.jsx)(x9,{scope:t,anchor:o,onAnchorChange:i,placementState:s,setPlacementState:l,children:r})},"Popper"),E9="PopperAnchor",U9=k.forwardRef(dt(n(function(t,r){const{__scopePopper:o,virtualRef:i,...s}=t,l=Oh(E9,o),d=k.useRef(null),u=l.onAnchorChange,m=k.useCallback(A=>{d.current=A,A&&u(A)},[u]),g=Tt(r,m),v=k.useRef(null);k.useEffect(()=>{if(!i)return;const A=v.current;v.current=i.current,A!==v.current&&u(v.current)});const y=l.placementState&&Ao(l.placementState),b=y?.[0],P=y?.[1];return i?null:(0,ae.jsx)(Vt.div,{"data-radix-popper-side":b,"data-radix-popper-align":P,...s,ref:g})},"PopperAnchor2"),"PopperAnchor")),Dh="PopperContent",[R9,M9]=Mh(Dh),$9=k.forwardRef(dt(n(function(t,r){const{__scopePopper:o,side:i="bottom",sideOffset:s=0,align:l="center",alignOffset:d=0,arrowPadding:u=0,avoidCollisions:m=!0,collisionBoundary:g=[],collisionPadding:v=0,sticky:y="partial",hideWhenDetached:b=!1,updatePositionStrategy:P="optimized",onPlaced:A,...C}=t,D=Oh(Dh,o),[R,$]=k.useState(null),U=Tt(r,$),[O,L]=k.useState(null),N=wh(O),M=N?.width??0,Y=N?.height??0,ne=i+(l!=="center"?"-"+l:""),ve=typeof v=="number"?v:{top:0,right:0,bottom:0,left:0,...v},X=Array.isArray(g)?g:[g],ue=X.length>0,se={padding:ve,boundary:X.filter(zh),altBoundary:ue},{refs:ye,floatingStyles:re,placement:le,isPositioned:Q,middlewareData:pe}=h9({strategy:"fixed",placement:ne,whileElementsMounted:dt((...ie)=>i9(...ie,{animationFrame:P==="always"}),"whileElementsMounted"),elements:{reference:D.anchor},middleware:[f9({mainAxis:s+Y,alignmentAxis:d}),m&&v9({mainAxis:!0,crossAxis:!1,limiter:y==="partial"?y9():void 0,...se}),m&&b9({...se}),w9({...se,apply:dt(({elements:ie,rects:Pe,availableWidth:vt,availableHeight:Zt})=>{const{width:Aa,height:Yt}=Pe.reference,er=ie.floating.style;er.setProperty("--radix-popper-available-width",`${vt}px`),er.setProperty("--radix-popper-available-height",`${Zt}px`),er.setProperty("--radix-popper-anchor-width",`${Aa}px`),er.setProperty("--radix-popper-anchor-height",`${Yt}px`)},"apply")}),O&&_9({element:O,padding:u}),N9({arrowWidth:M,arrowHeight:Y}),b&&k9({strategy:"referenceHidden",...se,boundary:ue?se.boundary:void 0})]}),j=D.setPlacementState;Je(()=>(j(le),()=>{j(void 0)}),[le,j]);const[Ut,I]=Ao(le),z=jt(A);Je(()=>{Q&&z?.()},[Q,z]);const V=pe.arrow?.x,W=pe.arrow?.y,H=pe.arrow?.centerOffset!==0,[te,ce]=k.useState();return Je(()=>{R&&ce(window.getComputedStyle(R).zIndex)},[R]),(0,ae.jsx)("div",{ref:ye.setFloating,"data-radix-popper-content-wrapper":"",style:{...re,transform:Q?re.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:te,"--radix-popper-transform-origin":[pe.transformOrigin?.x,pe.transformOrigin?.y].join(" "),...pe.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:(0,ae.jsx)(R9,{scope:o,placedSide:Ut,placedAlign:I,onArrowChange:L,arrowX:V,arrowY:W,shouldHideArrow:H,children:(0,ae.jsx)(Vt.div,{"data-side":Ut,"data-align":I,...C,ref:U,style:{...C.style,animation:Q?C.style?.animation:"none"}})})})},"PopperContent2"),"PopperContent")),O9="PopperArrow",D9={top:"bottom",right:"left",bottom:"top",left:"right"},z9=k.forwardRef(dt(n(function(t,r){const{__scopePopper:o,...i}=t,s=M9(O9,o),l=D9[s.placedSide];return(0,ae.jsx)("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:(0,ae.jsx)(A9,{...i,ref:r,style:{...i.style,display:"block"}})})},"PopperArrow2"),"PopperArrow"));function zh(e){return e!==null}n(zh,"isNotNull");dt(zh,"isNotNull");var N9=dt(e=>({name:"transformOrigin",options:e,fn(t){const{placement:r,rects:o,middlewareData:i}=t,s=i.arrow?.centerOffset!==0,l=s?0:e.arrowWidth,d=s?0:e.arrowHeight,[u,m]=Ao(r),g={start:"0%",center:"50%",end:"100%"}[m],v=(i.arrow?.x??0)+l/2,y=(i.arrow?.y??0)+d/2;let b="",P="";return u==="bottom"?(b=s?g:`${v}px`,P=`${-d}px`):u==="top"?(b=s?g:`${v}px`,P=`${o.floating.height+d}px`):u==="right"?(b=`${-d}px`,P=s?g:`${y}px`):u==="left"&&(b=`${o.floating.width+d}px`,P=s?g:`${y}px`),{data:{x:b,y:P}}}}),"transformOrigin");function Ao(e){const[t,r="center"]=e.split("-");return[t,r]}n(Ao,"getSideAndAlignFromPlacement");dt(Ao,"getSideAndAlignFromPlacement");var L9=T9,Nh=U9,j9=$9,q9=z9,F9=Object.defineProperty,tt=n((e,t)=>F9(e,"name",{value:t,configurable:!0}),"__name"),Yi="Popover",[Lh,hre]=Li(Yi,[$h]),Qa=$h(),[B9,Kt]=Lh(Yi),G9=tt(e=>{const{__scopePopover:t,children:r,open:o,defaultOpen:i,onOpenChange:s,modal:l=!1}=e,d=Qa(t),u=k.useRef(null),[m,g]=k.useState(!1),[v,y]=Vm({prop:o,defaultProp:i??!1,onChange:s,caller:Yi});return(0,ae.jsx)(L9,{...d,children:(0,ae.jsx)(B9,{scope:t,contentId:th(),triggerRef:u,open:v,onOpenChange:y,onOpenToggle:k.useCallback(()=>y(b=>!b),[y]),hasCustomAnchor:m,onCustomAnchorAdd:k.useCallback(()=>g(!0),[]),onCustomAnchorRemove:k.useCallback(()=>g(!1),[]),modal:l,children:r})})},"Popover"),W9="PopoverAnchor",H9=k.forwardRef(tt(n(function(t,r){const{__scopePopover:o,...i}=t,s=Kt(W9,o),l=Qa(o),{onCustomAnchorAdd:d,onCustomAnchorRemove:u}=s;return k.useEffect(()=>(d(),()=>u()),[d,u]),(0,ae.jsx)(Nh,{...l,...i,ref:r})},"PopoverAnchor2"),"PopoverAnchor")),V9="PopoverTrigger",K9=k.forwardRef(tt(n(function(t,r){const{__scopePopover:o,...i}=t,s=Kt(V9,o),l=Qa(o),d=Tt(r,s.triggerRef),u=(0,ae.jsx)(Vt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":Xi(s.open),...i,ref:d,onClick:kt(t.onClick,s.onOpenToggle)});return s.hasCustomAnchor?u:(0,ae.jsx)(Nh,{asChild:!0,...l,children:u})},"PopoverTrigger2"),"PopoverTrigger")),jh="PopoverPortal",[Z9,Y9]=Lh(jh,{forceMount:void 0}),X9=tt(e=>{const{__scopePopover:t,forceMount:r,children:o,container:i}=e,s=Kt(jh,t);return(0,ae.jsx)(Z9,{scope:t,forceMount:r,children:(0,ae.jsx)(Xm,{present:r||s.open,children:(0,ae.jsx)(TV,{asChild:!0,container:i,children:o})})})},"PopoverPortal"),Wa="PopoverContent",J9=k.forwardRef(tt(n(function(t,r){const o=Y9(Wa,t.__scopePopover),{forceMount:i=o.forceMount,...s}=t,l=Kt(Wa,t.__scopePopover);return(0,ae.jsx)(Xm,{present:i||l.open,children:l.modal?(0,ae.jsx)(e5,{...s,ref:r}):(0,ae.jsx)(t5,{...s,ref:r})})},"PopoverContent2"),"PopoverContent")),Q9=bo("PopoverContent.RemoveScroll"),e5=k.forwardRef(tt(n(function(t,r){const o=Kt(Wa,t.__scopePopover),i=k.useRef(null),s=Tt(r,i),l=k.useRef(!1);return k.useEffect(()=>{const d=i.current;if(d)return vK(d)},[]),(0,ae.jsx)(yh,{as:Q9,allowPinchZoom:!0,children:(0,ae.jsx)(qh,{...t,ref:s,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:kt(t.onCloseAutoFocus,d=>{d.preventDefault(),l.current||o.triggerRef.current?.focus()}),onPointerDownOutside:kt(t.onPointerDownOutside,d=>{const u=d.detail.originalEvent,m=u.button===0&&u.ctrlKey===!0,g=u.button===2||m;l.current=g},{checkForDefaultPrevented:!1}),onFocusOutside:kt(t.onFocusOutside,d=>d.preventDefault(),{checkForDefaultPrevented:!1})})})},"PopoverContentModal2"),"PopoverContentModal")),t5=k.forwardRef(tt(n(function(t,r){const o=Kt(Wa,t.__scopePopover),i=k.useRef(!1),s=k.useRef(!1);return(0,ae.jsx)(qh,{...t,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:n(l=>{t.onCloseAutoFocus?.(l),l.defaultPrevented||(i.current||o.triggerRef.current?.focus(),l.preventDefault()),i.current=!1,s.current=!1},"onCloseAutoFocus"),onInteractOutside:n(l=>{t.onInteractOutside?.(l),l.defaultPrevented||(i.current=!0,l.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const d=l.target;o.triggerRef.current?.contains(d)&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&s.current&&l.preventDefault()},"onInteractOutside")})},"PopoverContentNonModal2"),"PopoverContentNonModal")),qh=k.forwardRef(tt(n(function(t,r){const{__scopePopover:o,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:l,disableOutsidePointerEvents:d,onEscapeKeyDown:u,onPointerDownOutside:m,onFocusOutside:g,onInteractOutside:v,...y}=t,b=Kt(Wa,o),P=Qa(o);return Bi(),(0,ae.jsx)(AV,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:s,onUnmountAutoFocus:l,children:(0,ae.jsx)(_V,{asChild:!0,disableOutsidePointerEvents:d,onInteractOutside:v,onEscapeKeyDown:u,onPointerDownOutside:m,onFocusOutside:g,onDismiss:n(()=>b.onOpenChange(!1),"onDismiss"),deferPointerDownOutside:!0,children:(0,ae.jsx)(j9,{"data-state":Xi(b.open),role:"dialog",id:b.contentId,...P,...y,ref:r,style:{...y.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})},"PopoverContentImpl2"),"PopoverContentImpl")),a5=k.forwardRef(tt(n(function(t,r){const{__scopePopover:o,...i}=t,s=Qa(o);return(0,ae.jsx)(q9,{...s,...i,ref:r})},"PopoverArrow2"),"PopoverArrow"));function Xi(e){return e?"open":"closed"}n(Xi,"getState");tt(Xi,"getState");var gre=G9,fre=H9,vre=K9,yre=X9,bre=J9,wre=a5,r5=n(e=>e?.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),"toKebabCase");function o5(e,t,r=[]){if(t==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:r5(e),size:24,node:t,...r.length>0?{aliases:r}:{}}}n(o5,"toLucideIconData");var n5=n(e=>{let t="",r=!1;for(const o of e){if(o==="-"||o==="_"||o<=" "){r=t.length>0;continue}t.length===0?t+=o.toLowerCase():t+=r?o.toUpperCase():o,r=!1}return t},"toCamelCase"),i5=n(e=>{const t=n5(e);return t.charAt(0).toUpperCase()+t.slice(1)},"toPascalCase"),zn=n((...e)=>e.filter((t,r,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===r).join(" ").trim(),"mergeClasses"),Ot={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};function Xo(e){return e!=null}n(Xo,"isDefined");function s5(e,t={}){const r=t.attributeNames??{},o=n(v=>r[v]??v,"getAttributeName"),i=e.size??e.width??Ot.width,s=e.size??e.height??Ot.height,l=e.aliases?.filter(v=>typeof v=="string"&&v.trim()!=="").map(v=>`lucide-${v}`)??[],d=[...e.name?[`lucide-${e.name}`]:[],...l],u=t.className?.split(" ").filter(Boolean)??[],m=t.includeDefaultClasses===!1?zn(...u):zn("lucide",...d,...u),g=t.absoluteStrokeWidth?Number(t.strokeWidth??Ot["stroke-width"])*Number(e.size??e.width??Ot.width)/Number(t.size??t.width??Ot.width):t.strokeWidth??Ot["stroke-width"];return["svg",{...Object.entries(Ot).reduce((v,[y,b])=>(v[o(y)]=b,v),{}),..."color"in t&&t.color&&{[o("stroke")]:t.color},..."size"in t&&Xo(t.size)&&{[o("width")]:t.size,[o("height")]:t.size},..."width"in t&&Xo(t.width)&&{[o("width")]:t.width},..."height"in t&&Xo(t.height)&&{[o("height")]:t.height},[o("stroke-width")]:g,...m&&{[o("class")]:m},[o("viewBox")]:`0 0 ${i} ${s}`,...t.hasA11yProp===!1?{[o("aria-hidden")]:"true"}:{},..."attributes"in t&&t.attributes},e.node.map(v=>{const[y,b,P]=v,A=t.nonScalingStroke?{[o("vector-effect")]:"non-scaling-stroke",...b}:b;return P?[y,A,P]:[y,A]})]}n(s5,"buildLucideIconNode");function l5(e,t={}){return s5(e,{...t,attributeNames:{...t.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}n(l5,"buildLucideIconForReact");var c5=n(e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},"hasA11yProp"),d5=(0,k.createContext)({}),u5=n(()=>(0,k.useContext)(d5),"useLucideContext"),p5=(0,k.forwardRef)(({color:e,size:t,width:r,height:o,strokeWidth:i,absoluteStrokeWidth:s,nonScalingStroke:l,className:d="",children:u,iconNode:m=[],icon:g={node:m,aliases:[],size:24},...v},y)=>{const{size:b=24,strokeWidth:P=2,absoluteStrokeWidth:A=!1,nonScalingStroke:C=!1,color:D="currentColor",className:R=""}=u5()??{},$=!!u||c5(v),[U,O,L=[]]=l5(g,{color:e??D,width:r??t??b,height:o??t??b,strokeWidth:i??P,absoluteStrokeWidth:s??A,nonScalingStroke:l??C,className:zn(R,d),hasA11yProp:$,attributes:v});return(0,k.createElement)(U,{ref:y,...O},[...L.map(([N,M])=>(0,k.createElement)(N,M)),...Array.isArray(u)?u:[u]])});function m5(e,t=[],r=[]){const o=typeof e=="string"?o5(e,t,r):e,i=(0,k.forwardRef)(({className:s,...l},d)=>(0,k.createElement)(p5,{ref:d,icon:o,className:s,...l}));return o.name&&(i.displayName=i5(o.name)),i}n(m5,"createLucideIcon");var Fh={name:"boxes",size:24,node:[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]};Fh.node;var kre=m5(Fh);export{tre as $,E5 as $i,Du as $n,NZ as $r,$6 as $t,kt as A,la as Aa,tZ as Ai,m4 as An,ML as Ar,Tae as At,dre as B,Hh as Ba,z5 as Bi,JY as Bn,XZ as Br,_n as Bt,_V as C,Yr as Ca,fk as Ci,g4 as Cn,m8 as Cr,WW as Ct,Xm as D,w5 as Da,tk as Di,f4 as Dn,a8 as Dr,zW as Dt,th as E,Qh as Ea,gt as Ei,Pr as En,qL as Er,Oae as Et,bo as F,Ql as Fa,Y5 as Fi,a4 as Fn,ZZ as Fr,Sae as Ft,Bae as G,be as Gi,E3 as Gn,WZ as Gr,vW as Gt,Vae as H,G5 as Hi,C3 as Hn,HZ as Hr,lae as Ht,YH as I,Zl as Ia,aZ as Ii,sp as In,JZ as Ir,pae as It,BH as J,Iw as Ji,x3 as Jn,BZ as Jr,oW as Jt,lre as K,Us as Ki,U3 as Kn,au as Kr,pW as Kt,Tt as L,f5 as La,nZ as Li,PX as Ln,fi as Lr,mae as Lt,Vt as M,Jl as Ma,W_ as Mi,ap as Mn,QZ as Mr,kae as Mt,qm as N,Ae as Na,rZ as Ni,tp as Nn,PL as Nr,Pae as Nt,Vm as O,b5 as Oa,Ed as Oi,h4 as On,ru as Or,Eae as Ot,mre as P,yr as Pa,jw as Pi,mX as Pn,mi as Pr,_ae as Pt,pre as Q,_w as Qi,U7 as Qn,DZ as Qr,um as Qt,Gae as R,Ln as Ra,Q5 as Ri,Ju as Rn,xL as Rr,uae as Rt,AV as S,tc as Sa,Nw as Si,GX as Sn,h8 as Sr,ga as St,jt as T,Da as Ta,Bw as Ti,ta as Tn,jL as Tr,Dae as Tt,Wae as U,ja as Ui,$3 as Un,KZ as Ur,aae as Ut,Hae as V,Kl as Va,D5 as Vi,XY as Vn,VZ as Vr,cae as Vt,rre as W,ro as Wi,_3 as Wn,hi as Wr,gW as Wt,GH as X,U5 as Xi,Oq as Xn,aP as Xr,Ote as Xt,Xae as Y,Sd as Yi,jq as Yn,Qd as Yr,$te as Yt,Yae as Z,Qn as Zi,Nq as Zn,qZ as Zr,Mte as Zt,vK as _,S5 as _a,Z5 as _i,$Q as _n,y8 as _r,Lae as _t,bre as a,dc as aa,WS as ai,JQ as an,hu as ar,HH as at,Bi as b,ac as ba,oZ as bi,pJ as bn,lu as br,bm as bt,yre as c,Pg as ca,$S as ci,XQ as cn,yi as cr,are as ct,Nh as d,kg as da,MS as di,SG as dn,du as dr,ire as dt,La as ea,io as ei,P6 as en,vu as er,Kae as et,q9 as f,wg as fa,PS as fi,Bp as fn,P8 as fr,nre as ft,wh as g,pg as ga,Lw as gi,Mp as gn,cu as gr,Fae as gt,$h as h,P5 as ha,oo as hi,MQ as hn,v8 as hr,qae as ht,wre as i,Ag as ia,zZ as ii,QQ as in,Fs as ir,cre as it,Li as j,Tr as ja,vk as ji,d4 as jn,e8 as jr,Iae as jt,Je as k,y5 as ka,eZ as ki,Dt as kn,Ls as kr,$W as kt,gre as l,Sg as la,IZ as li,HQ as ln,pu as lr,ore as lt,L9 as m,gg as ma,X5 as mi,xi as mn,w8 as mr,jae as mt,m5 as n,T5 as na,jZ as ni,ZQ as nn,pj as nr,Jae as nt,J9 as o,Ig as oa,PZ as oi,PG as on,sj as or,VH as ot,j9 as p,yg as pa,fS as pi,Nt as pn,k8 as pr,XW as pt,sre as q,R5 as qi,T3 as qn,YZ as qr,uW as qt,fre as r,x5 as ra,FZ as ri,KQ as rn,mj as rr,ere as rt,K9 as s,_g as sa,AZ as si,YQ as sn,qs as sr,ure as st,kre as t,ba as ta,LZ as ti,Wee as tn,Mj as tr,Zae as tt,vre as u,bg as ua,CZ as ui,VQ as un,mu as ur,Qae as ut,yh as v,k5 as va,Mk as vi,UQ as vn,oj as vr,KW as vt,SV as w,v5 as wa,Gt as wi,p4 as wn,ej as wr,Nae as wt,TV as x,va as xa,Fw as xi,uJ as xn,g8 as xr,HW as xt,Ze as y,_5 as ya,$k as yi,RQ as yn,f8 as yr,VW as yt,WH as z,Kh as za,J5 as zi,el as zn,gi as zr,hm as zt};
134
+ `)},"generateStyle"),dK=0,Qt=[];function uK(e){var t=k.useRef([]),r=k.useRef([0,0]),o=k.useRef(),i=k.useState(dK++)[0],s=k.useState(hh)[0],l=k.useRef(e);k.useEffect(function(){l.current=e},[e]),k.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var A=RV([e.lockRef.current],(e.shards||[]).map(zl),!0).filter(Boolean);return A.forEach(function(C){return C.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),A.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var d=k.useCallback(function(A,C){if("touches"in A&&A.touches.length===2||A.type==="wheel"&&A.ctrlKey)return!l.current.allowPinchZoom;var D=hr(A),R=r.current,$="deltaX"in A?A.deltaX:R[0]-D[0],U="deltaY"in A?A.deltaY:R[1]-D[1],O,L=A.target,N=Math.abs($)>Math.abs(U)?"h":"v";if("touches"in A&&N==="h"&&L.type==="range")return!1;var M=window.getSelection(),Y=M&&M.anchorNode;if(Y&&(Y===L||Y.contains(L)))return!1;var ne=Ol(N,L);if(!ne)return!0;if(ne?O=N:(O=N==="v"?"h":"v",ne=Ol(N,L)),!ne)return!1;if(!o.current&&"changedTouches"in A&&($||U)&&(o.current=O),!O)return!0;var ve=o.current||O;return sK(ve,C,A,ve==="h"?$:U,!0)},[]),u=k.useCallback(function(A){var C=A;if(!(!Qt.length||Qt[Qt.length-1]!==s)){var D="deltaY"in C?Dl(C):hr(C),R=t.current.filter(function(U){return U.name===C.type&&(U.target===C.target||C.target===U.shadowParent)&&lK(U.delta,D)})[0];if(R&&R.should){C.cancelable&&C.preventDefault();return}if(!R){var $=(l.current.shards||[]).map(zl).filter(Boolean).filter(function(U){return U.contains(C.target)});($.length>0?d(C,$[0]):!l.current.noIsolation)&&C.cancelable&&C.preventDefault()}}},[]),m=k.useCallback(function(A,C,D,R){var $={name:A,delta:C,target:D,should:R,shadowParent:pK(D)};t.current.push($),setTimeout(function(){t.current=t.current.filter(function(U){return U!==$})},1)},[]),g=k.useCallback(function(A){r.current=hr(A),o.current=void 0},[]),v=k.useCallback(function(A){m(A.type,Dl(A),A.target,d(A,e.lockRef.current))},[]),y=k.useCallback(function(A){m(A.type,hr(A),A.target,d(A,e.lockRef.current))},[]);k.useEffect(function(){return Qt.push(s),e.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:y}),document.addEventListener("wheel",u,Jt),document.addEventListener("touchmove",u,Jt),document.addEventListener("touchstart",g,Jt),function(){Qt=Qt.filter(function(A){return A!==s}),document.removeEventListener("wheel",u,Jt),document.removeEventListener("touchmove",u,Jt),document.removeEventListener("touchstart",g,Jt)}},[]);var b=e.removeScrollBar,P=e.inert;return k.createElement(k.Fragment,null,P?k.createElement(s,{styles:cK(i)}):null,b?k.createElement(eK,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}n(uK,"RemoveScrollSideCar");function pK(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}n(pK,"getOutermostShadowParent");var mK=qV(mh,uK),yh=k.forwardRef(function(e,t){return k.createElement(wo,Ze({},e,{ref:t,sideCar:mK}))});yh.classNames=wo.classNames;var hK=n(function(e){return typeof document>"u"?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},"getDefaultParent"),ea=new WeakMap,gr=new WeakMap,fr={},Vo=0,bh=n(function(e){return e&&(e.host||bh(e.parentNode))},"unwrapHost"),gK=n(function(e,t){return t.map(function(r){if(e.contains(r))return r;var o=bh(r);return o&&e.contains(o)?o:null}).filter(function(r){return!!r})},"correctTargets"),fK=n(function(e,t,r,o){var i=gK(t,Array.isArray(e)?e:[e]);fr[r]||(fr[r]=new WeakMap);var s=fr[r],l=[],d=new Set,u=new Set(i),m=n(function(v){!v||d.has(v)||(d.add(v),m(v.parentNode))},"keep");i.forEach(m);var g=n(function(v){!v||u.has(v)||Array.prototype.forEach.call(v.children,function(y){if(d.has(y))g(y);else try{var b=y.getAttribute(o),P=b!==null&&b!=="false",A=(ea.get(y)||0)+1,C=(s.get(y)||0)+1;ea.set(y,A),s.set(y,C),l.push(y),A===1&&P&&gr.set(y,!0),C===1&&y.setAttribute(r,"true"),P||y.setAttribute(o,"true")}catch{}})},"deep");return g(t),d.clear(),Vo++,function(){l.forEach(function(v){var y=ea.get(v)-1,b=s.get(v)-1;ea.set(v,y),s.set(v,b),y||(gr.has(v)||v.removeAttribute(o),gr.delete(v)),b||v.removeAttribute(r)}),Vo--,Vo||(ea=new WeakMap,ea=new WeakMap,gr=new WeakMap,fr={})}},"applyAttributeToOthers"),vK=n(function(e,t,r){r===void 0&&(r="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),i=t||hK(e);return i?(o.push.apply(o,Array.from(i.querySelectorAll("[aria-live], script"))),fK(o,i,r,"aria-hidden")):function(){return null}},"hideOthers"),yK=Object.defineProperty,bK=n((e,t)=>yK(e,"name",{value:t,configurable:!0}),"__name$3");function wh(e){const[t,r]=k.useState(void 0);return Je(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let l,d;if("borderBoxSize"in s){const u=s.borderBoxSize,m=Array.isArray(u)?u[0]:u;l=m.inlineSize,d=m.blockSize}else l=e.offsetWidth,d=e.offsetHeight;r({width:l,height:d})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else r(void 0)},[e]),t}n(wh,"useSize");bK(wh,"useSize");var wK=["top","right","bottom","left"],Pt=Math.min,lt=Math.max,Hr=Math.round,vr=Math.floor,ct=n(e=>({x:e,y:e}),"createCoords"),kK={left:"right",right:"left",bottom:"top",top:"bottom"};function kh(e,t,r){return lt(e,Pt(t,r))}n(kh,"clamp");function ht(e,t){return typeof e=="function"?e(t):e}n(ht,"evaluate");function It(e){return e.split("-")[0]}n(It,"getSide");function Pa(e){return e.split("-")[1]}n(Pa,"getAlignment");function Gi(e){return e==="x"?"y":"x"}n(Gi,"getOppositeAxis");function Wi(e){return e==="y"?"height":"width"}n(Wi,"getAxisLength");function Xe(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}n(Xe,"getSideAxis");function Hi(e){return Gi(Xe(e))}n(Hi,"getAlignmentAxis");function _K(e,t,r){r===void 0&&(r=!1);const o=Pa(e),i=Hi(e),s=Wi(i);let l=i==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(l=Vr(l)),[l,Vr(l)]}n(_K,"getAlignmentSides");function SK(e){const t=Vr(e);return[On(e),t,On(t)]}n(SK,"getExpandedPlacements");function On(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}n(On,"getOppositeAlignmentPlacement");var Nl=["left","right"],Ll=["right","left"],PK=["top","bottom"],IK=["bottom","top"];function AK(e,t,r){switch(e){case"top":case"bottom":return r?t?Ll:Nl:t?Nl:Ll;case"left":case"right":return t?PK:IK;default:return[]}}n(AK,"getSideList");function CK(e,t,r,o){const i=Pa(e);let s=AK(It(e),r==="start",o);return i&&(s=s.map(l=>l+"-"+i),t&&(s=s.concat(s.map(On)))),s}n(CK,"getOppositeAxisPlacements");function Vr(e){const t=It(e);return kK[t]+e.slice(t.length)}n(Vr,"getOppositePlacement");function xK(e){var t,r,o,i;return{top:(t=e.top)!=null?t:0,right:(r=e.right)!=null?r:0,bottom:(o=e.bottom)!=null?o:0,left:(i=e.left)!=null?i:0}}n(xK,"expandPaddingObject");function _h(e){return typeof e!="number"?xK(e):{top:e,right:e,bottom:e,left:e}}n(_h,"getPaddingObject");function Kr(e){const{x:t,y:r,width:o,height:i}=e;return{width:o,height:i,top:r,left:t,right:t+o,bottom:r+i,x:t,y:r}}n(Kr,"rectToClientRect");function jl(e,t,r){let{reference:o,floating:i}=e;const s=Xe(t),l=Hi(t),d=Wi(l),u=It(t),m=s==="y",g=o.x+o.width/2-i.width/2,v=o.y+o.height/2-i.height/2,y=o[d]/2-i[d]/2;let b;switch(u){case"top":b={x:g,y:o.y-i.height};break;case"bottom":b={x:g,y:o.y+o.height};break;case"right":b={x:o.x+o.width,y:v};break;case"left":b={x:o.x-i.width,y:v};break;default:b={x:o.x,y:o.y}}const P=Pa(t);return P&&(b[l]+=y*(P==="end"?1:-1)*(r&&m?-1:1)),b}n(jl,"computeCoordsFromPlacement");async function TK(e,t){var r;t===void 0&&(t={});const{x:o,y:i,platform:s,rects:l,elements:d,strategy:u}=e,{boundary:m="clippingAncestors",rootBoundary:g="viewport",elementContext:v="floating",altBoundary:y=!1,padding:b=0}=ht(t,e),P=_h(b),A=d[y?v==="floating"?"reference":"floating":v],C=Kr(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(A)))==null||r?A:A.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(d.floating)),boundary:m,rootBoundary:g,strategy:u})),D=v==="floating"?{x:o,y:i,width:l.floating.width,height:l.floating.height}:l.reference,R=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d.floating)),$=await(s.isElement==null?void 0:s.isElement(R))&&await(s.getScale==null?void 0:s.getScale(R))||{x:1,y:1},U=Kr(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:D,offsetParent:R,strategy:u}):D);return{top:(C.top-U.top+P.top)/$.y,bottom:(U.bottom-C.bottom+P.bottom)/$.y,left:(C.left-U.left+P.left)/$.x,right:(U.right-C.right+P.right)/$.x}}n(TK,"detectOverflow");var EK=50,UK=n(async(e,t,r)=>{const{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:l}=r,d=l.detectOverflow?l:{...l,detectOverflow:TK},u=await(l.isRTL==null?void 0:l.isRTL(t));let m=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:g,y:v}=jl(m,o,u),y=o,b=0;const P={};for(let A=0;A<s.length;A++){const C=s[A];if(!C)continue;const{name:D,fn:R}=C,{x:$,y:U,data:O,reset:L}=await R({x:g,y:v,initialPlacement:o,placement:y,strategy:i,middlewareData:P,rects:m,platform:d,elements:{reference:e,floating:t}});g=$??g,v=U??v,P[D]={...P[D],...O},L&&b<EK&&(b++,typeof L=="object"&&(L.placement&&(y=L.placement),L.rects&&(m=L.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:i}):L.rects),{x:g,y:v}=jl(m,y,u)),A=-1)}return{x:g,y:v,placement:y,strategy:i,middlewareData:P}},"computePosition$1"),RK=n(e=>({name:"arrow",options:e,async fn(t){const{x:r,y:o,placement:i,rects:s,platform:l,elements:d,middlewareData:u}=t,{element:m,padding:g=0}=ht(e,t)||{};if(m==null)return{};const v=_h(g),y={x:r,y:o},b=Hi(i),P=Wi(b),A=await l.getDimensions(m),C=b==="y",D=C?"top":"left",R=C?"bottom":"right",$=C?"clientHeight":"clientWidth",U=s.reference[P]+s.reference[b]-y[b]-s.floating[P],O=y[b]-s.reference[b],L=await(l.getOffsetParent==null?void 0:l.getOffsetParent(m));let N=L?L[$]:0;(!N||!await(l.isElement==null?void 0:l.isElement(L)))&&(N=d.floating[$]||s.floating[P]);const M=U/2-O/2,Y=N/2-A[P]/2-1,ne=Pt(v[D],Y),ve=Pt(v[R],Y),X=N-A[P]-ve,ue=N/2-A[P]/2+M,se=kh(ne,ue,X),ye=!u.arrow&&Pa(i)!=null&&ue!==se&&s.reference[P]/2-(ue<ne?ne:ve)-A[P]/2<0,re=ye?ue<ne?ue-ne:ue-X:0;return{[b]:y[b]+re,data:{[b]:se,centerOffset:ue-se-re,...ye&&{alignmentOffset:re}},reset:ye}}}),"arrow$3"),MK=n(function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,o;const{placement:i,middlewareData:s,rects:l,initialPlacement:d,platform:u,elements:m}=t,{mainAxis:g=!0,crossAxis:v=!0,fallbackPlacements:y,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:P="none",flipAlignment:A=!0,...C}=ht(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const D=It(i),R=Xe(d),$=It(d)===d,U=await(u.isRTL==null?void 0:u.isRTL(m.floating)),O=y||($||!A?[Vr(d)]:SK(d)),L=P!=="none";!y&&L&&O.push(...CK(d,A,P,U));const N=[d,...O],M=await u.detectOverflow(t,C),Y=[];let ne=((o=s.flip)==null?void 0:o.overflows)||[];if(g&&Y.push(M[D]),v){const se=_K(i,l,U);Y.push(M[se[0]],M[se[1]])}if(ne=[...ne,{placement:i,overflows:Y}],!Y.every(se=>se<=0)){var ve,X;const se=(((ve=s.flip)==null?void 0:ve.index)||0)+1,ye=N[se];if(ye&&(!(v==="alignment"&&R!==Xe(ye))||ne.every(le=>Xe(le.placement)===R?le.overflows[0]>0:!0)))return{data:{index:se,overflows:ne},reset:{placement:ye}};let re=(X=ne.filter(le=>le.overflows[0]<=0).sort((le,Q)=>le.overflows[1]-Q.overflows[1])[0])==null?void 0:X.placement;if(!re)switch(b){case"bestFit":{var ue;const le=(ue=ne.filter(Q=>{if(L){const pe=Xe(Q.placement);return pe===R||pe==="y"}return!0}).map(Q=>[Q.placement,Q.overflows.filter(pe=>pe>0).reduce((pe,j)=>pe+j,0)]).sort((Q,pe)=>Q[1]-pe[1])[0])==null?void 0:ue[0];le&&(re=le);break}case"initialPlacement":re=d}if(i!==re)return{reset:{placement:re}}}return{}}}},"flip$2");function ql(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}n(ql,"getSideOffsets");function Fl(e){return wK.some(t=>e[t]>=0)}n(Fl,"isAnySideFullyClipped");var $K=n(function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:o}=t,{strategy:i="referenceHidden",...s}=ht(e,t);switch(i){case"referenceHidden":{const l=ql(await o.detectOverflow(t,{...s,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:Fl(l)}}}case"escaped":{const l=ql(await o.detectOverflow(t,{...s,altBoundary:!0}),r.floating);return{data:{escapedOffsets:l,escaped:Fl(l)}}}default:return{}}}}},"hide$2"),Sh=new Set(["left","top"]);async function OK(e,t){const{placement:r,platform:o,elements:i}=e,s=await(o.isRTL==null?void 0:o.isRTL(i.floating)),l=It(r),d=Pa(r),u=Xe(r)==="y",m=Sh.has(l)?-1:1,g=s&&u?-1:1,v=ht(t,e);let{mainAxis:y,crossAxis:b,alignmentAxis:P}=typeof v=="number"?{mainAxis:v,crossAxis:0,alignmentAxis:null}:{mainAxis:v.mainAxis||0,crossAxis:v.crossAxis||0,alignmentAxis:v.alignmentAxis};return d&&typeof P=="number"&&(b=d==="end"?P*-1:P),u?{x:b*g,y:y*m}:{x:y*m,y:b*g}}n(OK,"convertValueToCoords");var DK=n(function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,o;const{x:i,y:s,placement:l,middlewareData:d}=t,u=await OK(t,e);return l===((r=d.offset)==null?void 0:r.placement)&&(o=d.arrow)!=null&&o.alignmentOffset?{}:{x:i+u.x,y:s+u.y,data:{...u,placement:l}}}}},"offset$2"),zK=n(function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:o,placement:i,platform:s}=t,{mainAxis:l=!0,crossAxis:d=!1,limiter:u={fn:n(R=>{let{x:$,y:U}=R;return{x:$,y:U}},"fn")},...m}=ht(e,t),g={x:r,y:o},v=await s.detectOverflow(t,m),y=Xe(i),b=Gi(y);let P=g[b],A=g[y];const C=n((R,$)=>kh($+v[R==="y"?"top":"left"],$,$-v[R==="y"?"bottom":"right"]),"clampCoord");l&&(P=C(b,P)),d&&(A=C(y,A));const D=u.fn({...t,[b]:P,[y]:A});return{...D,data:{x:D.x-r,y:D.y-o,enabled:{[b]:l,[y]:d}}}}}},"shift$2"),NK=n(function(e){return e===void 0&&(e={}),{options:e,fn(t){var r,o;const{x:i,y:s,placement:l,rects:d,middlewareData:u}=t,{offset:m=0,mainAxis:g=!0,crossAxis:v=!0}=ht(e,t),y={x:i,y:s},b=Xe(l),P=Gi(b);let A=y[P],C=y[b];const D=ht(m,t),R=typeof D=="number"?{mainAxis:D,crossAxis:0}:{mainAxis:(r=D.mainAxis)!=null?r:0,crossAxis:(o=D.crossAxis)!=null?o:0};if(g){const O=P==="y"?"height":"width",L=d.reference[P]-d.floating[O]+R.mainAxis,N=d.reference[P]+d.reference[O]-R.mainAxis;A<L?A=L:A>N&&(A=N)}if(v){var $,U;const O=P==="y"?"width":"height",L=Sh.has(It(l)),N=d.reference[b]-d.floating[O]+(L&&(($=u.offset)==null?void 0:$[b])||0)+(L?0:R.crossAxis),M=d.reference[b]+d.reference[O]+(L?0:((U=u.offset)==null?void 0:U[b])||0)-(L?R.crossAxis:0);C<N?C=N:C>M&&(C=M)}return{[P]:A,[b]:C}}}},"limitShift$2"),LK=n(function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:r,rects:o,platform:i,elements:s}=t,{apply:l=n(()=>{},"apply"),...d}=ht(e,t),u=await i.detectOverflow(t,d),m=It(r),g=Pa(r),v=Xe(r)==="y",{width:y,height:b}=o.floating;let P,A;m==="top"||m==="bottom"?(P=m,A=g===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(A=m,P=g==="end"?"top":"bottom");const C=b-u.top-u.bottom,D=y-u.left-u.right,R=Pt(b-u[P],C),$=Pt(y-u[A],D),U=t.middlewareData.shift,O=!U;let L=R,N=$;U!=null&&U.enabled.x&&(N=D),U!=null&&U.enabled.y&&(L=C),O&&!g&&(v?N=y-2*lt(u.left,u.right):L=b-2*lt(u.top,u.bottom)),await l({...t,availableWidth:N,availableHeight:L});const M=await i.getDimensions(s.floating);return y!==M.width||b!==M.height?{reset:{rects:!0}}:{}}}},"size$2");function ko(){return typeof window<"u"}n(ko,"hasWindow");function Ia(e){return Ph(e)?(e.nodeName||"").toLowerCase():"#document"}n(Ia,"getNodeName");function Oe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}n(Oe,"getWindow");function ft(e){var t;return(t=(Ph(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}n(ft,"getDocumentElement");function Ph(e){return ko()?e instanceof Node||e instanceof Oe(e).Node:!1}n(Ph,"isNode");function Qe(e){return ko()?e instanceof Element||e instanceof Oe(e).Element:!1}n(Qe,"isElement");function Et(e){return ko()?e instanceof HTMLElement||e instanceof Oe(e).HTMLElement:!1}n(Et,"isHTMLElement");function Bl(e){return!ko()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Oe(e).ShadowRoot}n(Bl,"isShadowRoot");function _o(e){const{overflow:t,overflowX:r,overflowY:o,display:i}=et(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+r)&&i!=="inline"&&i!=="contents"}n(_o,"isOverflowElement");function jK(e){return/^(table|td|th)$/.test(Ia(e))}n(jK,"isTableElement");function So(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}n(So,"isTopLayer");var qK=/transform|translate|scale|rotate|perspective|filter/,FK=/paint|layout|strict|content/,$t=n(e=>!!e&&e!=="none","isNotNone"),Ko;function Vi(e){const t=Qe(e)?et(e):e;return $t(t.transform)||$t(t.translate)||$t(t.scale)||$t(t.rotate)||$t(t.perspective)||!Ki()&&($t(t.backdropFilter)||$t(t.filter))||qK.test(t.willChange||"")||FK.test(t.contain||"")}n(Vi,"isContainingBlock");function BK(e){let t=qt(e);for(;Et(t)&&!Ba(t);){if(Vi(t))return t;if(So(t))return null;t=qt(t)}return null}n(BK,"getContainingBlock");function Ki(){return Ko==null&&(Ko=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ko}n(Ki,"isWebKit");function Ba(e){return/^(html|body|#document)$/.test(Ia(e))}n(Ba,"isLastTraversableNode");function et(e){return Oe(e).getComputedStyle(e)}n(et,"getComputedStyle$1");function Po(e){return Qe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}n(Po,"getNodeScroll");function qt(e){if(Ia(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Bl(e)&&e.host||ft(e);return Bl(t)?t.host:t}n(qt,"getParentNode");function Ih(e){const t=qt(e);return Ba(t)?(e.ownerDocument||e).body:Et(t)&&_o(t)?t:Ih(t)}n(Ih,"getNearestOverflowAncestor");function Ga(e,t,r){var o;t===void 0&&(t=[]),r===void 0&&(r=!0);const i=Ih(e),s=i===((o=e.ownerDocument)==null?void 0:o.body),l=Oe(i);if(s){const d=Dn(l);return t.concat(l,l.visualViewport||[],_o(i)?i:[],d&&r?Ga(d):[])}else return t.concat(i,Ga(i,[],r))}n(Ga,"getOverflowAncestors");function Dn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}n(Dn,"getFrameElement");function Ah(e){const t=et(e);let r=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=Et(e),s=i?e.offsetWidth:r,l=i?e.offsetHeight:o,d=Hr(r)!==s||Hr(o)!==l;return d&&(r=s,o=l),{width:r,height:o,$:d}}n(Ah,"getCssDimensions");function Zi(e){return Qe(e)?e:e.contextElement}n(Zi,"unwrapElement");function sa(e){const t=Zi(e);if(!Et(t))return ct(1);const r=t.getBoundingClientRect(),{width:o,height:i,$:s}=Ah(t);let l=(s?Hr(r.width):r.width)/o,d=(s?Hr(r.height):r.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!d||!Number.isFinite(d))&&(d=1),{x:l,y:d}}n(sa,"getScale");var GK=ct(0);function Ch(e){const t=Oe(e);return!Ki()||!t.visualViewport?GK:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}n(Ch,"getVisualOffsets");function WK(e,t,r){return t===void 0&&(t=!1),!!r&&t&&r===Oe(e)}n(WK,"shouldAddVisualOffsets");function Ft(e,t,r,o){t===void 0&&(t=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),s=Zi(e);let l=ct(1);t&&(o?Qe(o)&&(l=sa(o)):l=sa(e));const d=WK(s,r,o)?Ch(s):ct(0);let u=(i.left+d.x)/l.x,m=(i.top+d.y)/l.y,g=i.width/l.x,v=i.height/l.y;if(s&&o){const y=Oe(s),b=Qe(o)?Oe(o):o;let P=y,A=Dn(P);for(;A&&b!==P;){const C=sa(A),D=A.getBoundingClientRect(),R=et(A),$=D.left+(A.clientLeft+parseFloat(R.paddingLeft))*C.x,U=D.top+(A.clientTop+parseFloat(R.paddingTop))*C.y;u*=C.x,m*=C.y,g*=C.x,v*=C.y,u+=$,m+=U,P=Oe(A),A=Dn(P)}}return Kr({width:g,height:v,x:u,y:m})}n(Ft,"getBoundingClientRect");function Io(e,t){const r=Po(e).scrollLeft;return t?t.left+r:Ft(ft(e)).left+r}n(Io,"getWindowScrollBarX");function xh(e,t){const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-Io(e,r),y:r.top+t.scrollTop}}n(xh,"getHTMLOffset");function HK(e){let{elements:t,rect:r,offsetParent:o,strategy:i}=e;const s=i==="fixed",l=ft(o),d=t?So(t.floating):!1;if(o===l||d&&s)return r;let u={scrollLeft:0,scrollTop:0},m=ct(1);const g=ct(0),v=Et(o);if((v||!s)&&((Ia(o)!=="body"||_o(l))&&(u=Po(o)),v)){const b=Ft(o);m=sa(o),g.x=b.x+o.clientLeft,g.y=b.y+o.clientTop}const y=l&&!v&&!s?xh(l,u):ct(0);return{width:r.width*m.x,height:r.height*m.y,x:r.x*m.x-u.scrollLeft*m.x+g.x+y.x,y:r.y*m.y-u.scrollTop*m.y+g.y+y.y}}n(HK,"convertOffsetParentRelativeRectToViewportRelativeRect");function VK(e){return e.getClientRects?Array.from(e.getClientRects()):[]}n(VK,"getClientRects");function KK(e){const t=Po(e),r=e.ownerDocument.body,o=lt(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),i=lt(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let s=-t.scrollLeft+Io(e);const l=-t.scrollTop;return et(r).direction==="rtl"&&(s+=lt(e.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:l}}n(KK,"getDocumentRect");var ZK=25;function YK(e,t,r){r===void 0&&(r="viewport");const o=r==="layoutViewport",i=Oe(e),s=ft(e),l=i.visualViewport;let d=s.clientWidth,u=s.clientHeight,m=0,g=0;if(l){const v=!Ki()||t==="fixed";o?v||(m=-l.offsetLeft,g=-l.offsetTop):(d=l.width,u=l.height,v&&(m=l.offsetLeft,g=l.offsetTop))}if(Io(s)<=0){const v=s.ownerDocument,y=v.body,b=getComputedStyle(y),P=v.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,A=Math.abs(s.clientWidth-y.clientWidth-P),C=getComputedStyle(s).scrollbarGutter==="stable both-edges"?A/2:A;C<=ZK&&(d-=C)}return{width:d,height:u,x:m,y:g}}n(YK,"getViewportRect");function XK(e,t){const r=Ft(e,!0,t==="fixed"),o=r.top+e.clientTop,i=r.left+e.clientLeft,s=sa(e);return{width:e.clientWidth*s.x,height:e.clientHeight*s.y,x:i*s.x,y:o*s.y}}n(XK,"getInnerBoundingClientRect");function Gl(e,t,r){let o;if(t==="viewport"||t==="layoutViewport")o=YK(e,r,t);else if(t==="document")o=KK(ft(e));else if(Qe(t))o=XK(t,r);else{const i=Ch(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Kr(o)}n(Gl,"getClientRectFromClippingAncestor");function JK(e,t){const r=t.get(e);if(r)return r;let o=Ga(e,[],!1).filter(d=>Qe(d)&&Ia(d)!=="body"),i=null;const s=et(e).position==="fixed";let l=s?qt(e):e;for(;Qe(l)&&!Ba(l);){const d=et(l),u=Vi(l),m=i?i.position:s?"fixed":"";!u&&(m==="fixed"||m==="absolute"&&d.position==="static")?o=o.filter(g=>g!==l):i=d,l=qt(l)}return t.set(e,o),o}n(JK,"getClippingElementAncestors");function QK(e){let{element:t,boundary:r,rootBoundary:o,strategy:i}=e;const s=[...r==="clippingAncestors"?So(t)?[]:JK(t,this._c):[].concat(r),o],l=Gl(t,s[0],i);let d=l.top,u=l.right,m=l.bottom,g=l.left;for(let v=1;v<s.length;v++){const y=Gl(t,s[v],i);d=lt(y.top,d),u=Pt(y.right,u),m=Pt(y.bottom,m),g=lt(y.left,g)}return{width:u-g,height:m-d,x:g,y:d}}n(QK,"getClippingRect");function e9(e){const{width:t,height:r}=Ah(e);return{width:t,height:r}}n(e9,"getDimensions");function t9(e,t,r){const o=Et(t),i=ft(t),s=r==="fixed",l=Ft(e,!0,s,t);let d={scrollLeft:0,scrollTop:0};const u=ct(0);if((o||!s)&&((Ia(t)!=="body"||_o(i))&&(d=Po(t)),o)){const g=Ft(t,!0,s,t);u.x=g.x+t.clientLeft,u.y=g.y+t.clientTop}!o&&i&&(u.x=Io(i));const m=i&&!o&&!s?xh(i,d):ct(0);return{x:l.left+d.scrollLeft-u.x-m.x,y:l.top+d.scrollTop-u.y-m.y,width:l.width,height:l.height}}n(t9,"getRectRelativeToOffsetParent");function Zo(e){return et(e).position==="static"}n(Zo,"isStaticPositioned");function Wl(e,t){if(!Et(e)||et(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return ft(e)===r&&(r=r.ownerDocument.body),r}n(Wl,"getTrueOffsetParent");function Th(e,t){const r=Oe(e);if(So(e))return r;if(!Et(e)){let i=qt(e);for(;i&&!Ba(i);){if(Qe(i)&&!Zo(i))return i;i=qt(i)}return r}let o=Wl(e,t);for(;o&&jK(o)&&Zo(o);)o=Wl(o,t);return o&&Ba(o)&&Zo(o)&&!Vi(o)?r:o||BK(e)||r}n(Th,"getOffsetParent");var a9=n(async function(e){const t=this.getOffsetParent||Th,r=this.getDimensions,o=await r(e.floating);return{reference:t9(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},"getElementRects");function r9(e){return et(e).direction==="rtl"}n(r9,"isRTL");var o9={convertOffsetParentRelativeRectToViewportRelativeRect:HK,getDocumentElement:ft,getClippingRect:QK,getOffsetParent:Th,getElementRects:a9,getClientRects:VK,getDimensions:e9,getScale:sa,isElement:Qe,isRTL:r9};function Eh(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}n(Eh,"rectsAreEqual");function n9(e,t,r){let o=null,i;const s=ft(e);function l(){var g;clearTimeout(i),(g=o)==null||g.disconnect(),o=null}n(l,"cleanup");function d(g,v){g===void 0&&(g=!1),v===void 0&&(v=1),l();const y=e.getBoundingClientRect(),{left:b,top:P,width:A,height:C}=y;if(g||t(),!A||!C)return;const D=vr(P),R=vr(s.clientWidth-(b+A)),$=vr(s.clientHeight-(P+C)),U=vr(b),O={rootMargin:-D+"px "+-R+"px "+-$+"px "+-U+"px",threshold:lt(0,Pt(1,v))||1};let L=!0;function N(M){const Y=M[0].intersectionRatio;if(!Eh(y,e.getBoundingClientRect()))return d();if(Y!==v){if(!L)return d();Y?d(!1,Y):i=setTimeout(()=>{d(!1,1e-7)},1e3)}L=!1}n(N,"handleObserve");try{o=new IntersectionObserver(N,{...O,root:s.ownerDocument})}catch{o=new IntersectionObserver(N,O)}o.observe(e)}n(d,"refresh");const u=Oe(e),m=n(()=>d(r),"handleResize");return u.addEventListener("resize",m),d(!0),()=>{u.removeEventListener("resize",m),l()}}n(n9,"observeMove");function i9(e,t,r,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:u=!1}=o,m=Zi(e),g=i||s?[...m?Ga(m):[],...t?Ga(t):[]]:[];g.forEach(D=>{i&&D.addEventListener("scroll",r),s&&D.addEventListener("resize",r)});const v=m&&d?n9(m,r,s):null;let y=-1,b=null;l&&(b=new ResizeObserver(D=>{let[R]=D;R&&R.target===m&&b&&t&&(b.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var $;($=b)==null||$.observe(t)})),r()}),m&&!u&&b.observe(m),t&&b.observe(t));let P,A=u?Ft(e):null;u&&C();function C(){const D=Ft(e);A&&!Eh(A,D)&&r(),A=D,P=requestAnimationFrame(C)}return n(C,"frameLoop"),r(),()=>{var D;g.forEach(R=>{i&&R.removeEventListener("scroll",r),s&&R.removeEventListener("resize",r)}),v?.(),(D=b)==null||D.disconnect(),b=null,u&&cancelAnimationFrame(P)}}n(i9,"autoUpdate");var s9=DK,l9=zK,c9=MK,d9=LK,u9=$K,Hl=RK,p9=NK,m9=n((e,t,r)=>{const o=new Map,i=r??{},s={...o9,...i.platform,_c:o};return UK(e,t,{...i,platform:s})},"computePosition"),xr=typeof document<"u"?k.useLayoutEffect:n(function(){},"noop");function Zr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,o,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(o=r;o--!==0;)if(!Zr(e[o],t[o]))return!1;return!0}if(i=Object.keys(e),r=i.length,r!==Object.keys(t).length)return!1;for(o=r;o--!==0;)if(!{}.hasOwnProperty.call(t,i[o]))return!1;for(o=r;o--!==0;){const s=i[o];if(!(s==="_owner"&&e.$$typeof)&&!Zr(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}n(Zr,"deepEqual");function Uh(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}n(Uh,"getDPR");function Vl(e,t){const r=Uh(e);return Math.round(t*r)/r}n(Vl,"roundByDPR");function Yo(e){const t=k.useRef(e);return xr(()=>{t.current=e}),t}n(Yo,"useLatestRef");function h9(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:o=[],platform:i,elements:{reference:s,floating:l}={},transform:d=!0,whileElementsMounted:u,open:m}=e,[g,v]=k.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[y,b]=k.useState(o);Zr(y,o)||b(o);const[P,A]=k.useState(null),[C,D]=k.useState(null),R=k.useCallback(Q=>{Q!==L.current&&(L.current=Q,A(Q))},[]),$=k.useCallback(Q=>{Q!==N.current&&(N.current=Q,D(Q))},[]),U=s||P,O=l||C,L=k.useRef(null),N=k.useRef(null),M=k.useRef(g),Y=u!=null,ne=Yo(u),ve=Yo(i),X=Yo(m),ue=k.useCallback(()=>{if(!L.current||!N.current)return;const Q={placement:t,strategy:r,middleware:y};ve.current&&(Q.platform=ve.current),m9(L.current,N.current,Q).then(pe=>{const j={...pe,isPositioned:X.current!==!1};se.current&&!Zr(M.current,j)&&(M.current=j,Ni.flushSync(()=>{v(j)}))})},[y,t,r,ve,X]);xr(()=>{m===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,v(Q=>({...Q,isPositioned:!1})))},[m]);const se=k.useRef(!1);xr(()=>(se.current=!0,()=>{se.current=!1}),[]),xr(()=>{if(U&&(L.current=U),O&&(N.current=O),U&&O){if(ne.current)return ne.current(U,O,ue);ue()}},[U,O,ue,ne,Y]);const ye=k.useMemo(()=>({reference:L,floating:N,setReference:R,setFloating:$}),[R,$]),re=k.useMemo(()=>({reference:U,floating:O}),[U,O]),le=k.useMemo(()=>{const Q={position:r,left:0,top:0};if(!re.floating)return Q;const pe=Vl(re.floating,g.x),j=Vl(re.floating,g.y);return d?{...Q,transform:"translate("+pe+"px, "+j+"px)",...Uh(re.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:pe,top:j}},[r,d,re.floating,g.x,g.y]);return k.useMemo(()=>({...g,update:ue,refs:ye,elements:re,floatingStyles:le}),[g,ue,ye,re,le])}n(h9,"useFloating");var g9=n(e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return n(t,"isRef"),{name:"arrow",options:e,fn(r){const{element:o,padding:i}=typeof e=="function"?e(r):e;return o&&t(o)?o.current!=null?Hl({element:o.current,padding:i}).fn(r):{}:o?Hl({element:o,padding:i}).fn(r):{}}}},"arrow$1"),f9=n((e,t)=>{const r=s9(e);return{name:r.name,fn:r.fn,options:[e,t]}},"offset"),v9=n((e,t)=>{const r=l9(e);return{name:r.name,fn:r.fn,options:[e,t]}},"shift"),y9=n((e,t)=>({fn:p9(e).fn,options:[e,t]}),"limitShift"),b9=n((e,t)=>{const r=c9(e);return{name:r.name,fn:r.fn,options:[e,t]}},"flip"),w9=n((e,t)=>{const r=d9(e);return{name:r.name,fn:r.fn,options:[e,t]}},"size"),k9=n((e,t)=>{const r=u9(e);return{name:r.name,fn:r.fn,options:[e,t]}},"hide"),_9=n((e,t)=>{const r=g9(e);return{name:r.name,fn:r.fn,options:[e,t]}},"arrow"),S9=Object.defineProperty,P9=n((e,t)=>S9(e,"name",{value:t,configurable:!0}),"__name$2"),I9=k.forwardRef(P9(n(function(t,r){const{children:o,width:i=10,height:s=5,...l}=t;return(0,ae.jsx)(Vt.svg,{...l,ref:r,width:i,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?o:(0,ae.jsx)("polygon",{points:"0,0 30,0 15,10"})})},"Arrow2"),"Arrow")),A9=I9,C9=Object.defineProperty,dt=n((e,t)=>C9(e,"name",{value:t,configurable:!0}),"__name$1"),Rh="Popper",[Mh,$h]=Li(Rh),[x9,Oh]=Mh(Rh),T9=dt(e=>{const{__scopePopper:t,children:r}=e,[o,i]=k.useState(null),[s,l]=k.useState(void 0);return(0,ae.jsx)(x9,{scope:t,anchor:o,onAnchorChange:i,placementState:s,setPlacementState:l,children:r})},"Popper"),E9="PopperAnchor",U9=k.forwardRef(dt(n(function(t,r){const{__scopePopper:o,virtualRef:i,...s}=t,l=Oh(E9,o),d=k.useRef(null),u=l.onAnchorChange,m=k.useCallback(A=>{d.current=A,A&&u(A)},[u]),g=Tt(r,m),v=k.useRef(null);k.useEffect(()=>{if(!i)return;const A=v.current;v.current=i.current,A!==v.current&&u(v.current)});const y=l.placementState&&Ao(l.placementState),b=y?.[0],P=y?.[1];return i?null:(0,ae.jsx)(Vt.div,{"data-radix-popper-side":b,"data-radix-popper-align":P,...s,ref:g})},"PopperAnchor2"),"PopperAnchor")),Dh="PopperContent",[R9,M9]=Mh(Dh),$9=k.forwardRef(dt(n(function(t,r){const{__scopePopper:o,side:i="bottom",sideOffset:s=0,align:l="center",alignOffset:d=0,arrowPadding:u=0,avoidCollisions:m=!0,collisionBoundary:g=[],collisionPadding:v=0,sticky:y="partial",hideWhenDetached:b=!1,updatePositionStrategy:P="optimized",onPlaced:A,...C}=t,D=Oh(Dh,o),[R,$]=k.useState(null),U=Tt(r,$),[O,L]=k.useState(null),N=wh(O),M=N?.width??0,Y=N?.height??0,ne=i+(l!=="center"?"-"+l:""),ve=typeof v=="number"?v:{top:0,right:0,bottom:0,left:0,...v},X=Array.isArray(g)?g:[g],ue=X.length>0,se={padding:ve,boundary:X.filter(zh),altBoundary:ue},{refs:ye,floatingStyles:re,placement:le,isPositioned:Q,middlewareData:pe}=h9({strategy:"fixed",placement:ne,whileElementsMounted:dt((...ie)=>i9(...ie,{animationFrame:P==="always"}),"whileElementsMounted"),elements:{reference:D.anchor},middleware:[f9({mainAxis:s+Y,alignmentAxis:d}),m&&v9({mainAxis:!0,crossAxis:!1,limiter:y==="partial"?y9():void 0,...se}),m&&b9({...se}),w9({...se,apply:dt(({elements:ie,rects:Pe,availableWidth:vt,availableHeight:Zt})=>{const{width:Aa,height:Yt}=Pe.reference,er=ie.floating.style;er.setProperty("--radix-popper-available-width",`${vt}px`),er.setProperty("--radix-popper-available-height",`${Zt}px`),er.setProperty("--radix-popper-anchor-width",`${Aa}px`),er.setProperty("--radix-popper-anchor-height",`${Yt}px`)},"apply")}),O&&_9({element:O,padding:u}),N9({arrowWidth:M,arrowHeight:Y}),b&&k9({strategy:"referenceHidden",...se,boundary:ue?se.boundary:void 0})]}),j=D.setPlacementState;Je(()=>(j(le),()=>{j(void 0)}),[le,j]);const[Ut,I]=Ao(le),z=jt(A);Je(()=>{Q&&z?.()},[Q,z]);const V=pe.arrow?.x,W=pe.arrow?.y,H=pe.arrow?.centerOffset!==0,[te,ce]=k.useState();return Je(()=>{R&&ce(window.getComputedStyle(R).zIndex)},[R]),(0,ae.jsx)("div",{ref:ye.setFloating,"data-radix-popper-content-wrapper":"",style:{...re,transform:Q?re.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:te,"--radix-popper-transform-origin":[pe.transformOrigin?.x,pe.transformOrigin?.y].join(" "),...pe.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:(0,ae.jsx)(R9,{scope:o,placedSide:Ut,placedAlign:I,onArrowChange:L,arrowX:V,arrowY:W,shouldHideArrow:H,children:(0,ae.jsx)(Vt.div,{"data-side":Ut,"data-align":I,...C,ref:U,style:{...C.style,animation:Q?C.style?.animation:"none"}})})})},"PopperContent2"),"PopperContent")),O9="PopperArrow",D9={top:"bottom",right:"left",bottom:"top",left:"right"},z9=k.forwardRef(dt(n(function(t,r){const{__scopePopper:o,...i}=t,s=M9(O9,o),l=D9[s.placedSide];return(0,ae.jsx)("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:(0,ae.jsx)(A9,{...i,ref:r,style:{...i.style,display:"block"}})})},"PopperArrow2"),"PopperArrow"));function zh(e){return e!==null}n(zh,"isNotNull");dt(zh,"isNotNull");var N9=dt(e=>({name:"transformOrigin",options:e,fn(t){const{placement:r,rects:o,middlewareData:i}=t,s=i.arrow?.centerOffset!==0,l=s?0:e.arrowWidth,d=s?0:e.arrowHeight,[u,m]=Ao(r),g={start:"0%",center:"50%",end:"100%"}[m],v=(i.arrow?.x??0)+l/2,y=(i.arrow?.y??0)+d/2;let b="",P="";return u==="bottom"?(b=s?g:`${v}px`,P=`${-d}px`):u==="top"?(b=s?g:`${v}px`,P=`${o.floating.height+d}px`):u==="right"?(b=`${-d}px`,P=s?g:`${y}px`):u==="left"&&(b=`${o.floating.width+d}px`,P=s?g:`${y}px`),{data:{x:b,y:P}}}}),"transformOrigin");function Ao(e){const[t,r="center"]=e.split("-");return[t,r]}n(Ao,"getSideAndAlignFromPlacement");dt(Ao,"getSideAndAlignFromPlacement");var L9=T9,Nh=U9,j9=$9,q9=z9,F9=Object.defineProperty,tt=n((e,t)=>F9(e,"name",{value:t,configurable:!0}),"__name"),Yi="Popover",[Lh,hre]=Li(Yi,[$h]),Qa=$h(),[B9,Kt]=Lh(Yi),G9=tt(e=>{const{__scopePopover:t,children:r,open:o,defaultOpen:i,onOpenChange:s,modal:l=!1}=e,d=Qa(t),u=k.useRef(null),[m,g]=k.useState(!1),[v,y]=Vm({prop:o,defaultProp:i??!1,onChange:s,caller:Yi});return(0,ae.jsx)(L9,{...d,children:(0,ae.jsx)(B9,{scope:t,contentId:th(),triggerRef:u,open:v,onOpenChange:y,onOpenToggle:k.useCallback(()=>y(b=>!b),[y]),hasCustomAnchor:m,onCustomAnchorAdd:k.useCallback(()=>g(!0),[]),onCustomAnchorRemove:k.useCallback(()=>g(!1),[]),modal:l,children:r})})},"Popover"),W9="PopoverAnchor",H9=k.forwardRef(tt(n(function(t,r){const{__scopePopover:o,...i}=t,s=Kt(W9,o),l=Qa(o),{onCustomAnchorAdd:d,onCustomAnchorRemove:u}=s;return k.useEffect(()=>(d(),()=>u()),[d,u]),(0,ae.jsx)(Nh,{...l,...i,ref:r})},"PopoverAnchor2"),"PopoverAnchor")),V9="PopoverTrigger",K9=k.forwardRef(tt(n(function(t,r){const{__scopePopover:o,...i}=t,s=Kt(V9,o),l=Qa(o),d=Tt(r,s.triggerRef),u=(0,ae.jsx)(Vt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":Xi(s.open),...i,ref:d,onClick:kt(t.onClick,s.onOpenToggle)});return s.hasCustomAnchor?u:(0,ae.jsx)(Nh,{asChild:!0,...l,children:u})},"PopoverTrigger2"),"PopoverTrigger")),jh="PopoverPortal",[Z9,Y9]=Lh(jh,{forceMount:void 0}),X9=tt(e=>{const{__scopePopover:t,forceMount:r,children:o,container:i}=e,s=Kt(jh,t);return(0,ae.jsx)(Z9,{scope:t,forceMount:r,children:(0,ae.jsx)(Xm,{present:r||s.open,children:(0,ae.jsx)(TV,{asChild:!0,container:i,children:o})})})},"PopoverPortal"),Wa="PopoverContent",J9=k.forwardRef(tt(n(function(t,r){const o=Y9(Wa,t.__scopePopover),{forceMount:i=o.forceMount,...s}=t,l=Kt(Wa,t.__scopePopover);return(0,ae.jsx)(Xm,{present:i||l.open,children:l.modal?(0,ae.jsx)(e5,{...s,ref:r}):(0,ae.jsx)(t5,{...s,ref:r})})},"PopoverContent2"),"PopoverContent")),Q9=bo("PopoverContent.RemoveScroll"),e5=k.forwardRef(tt(n(function(t,r){const o=Kt(Wa,t.__scopePopover),i=k.useRef(null),s=Tt(r,i),l=k.useRef(!1);return k.useEffect(()=>{const d=i.current;if(d)return vK(d)},[]),(0,ae.jsx)(yh,{as:Q9,allowPinchZoom:!0,children:(0,ae.jsx)(qh,{...t,ref:s,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:kt(t.onCloseAutoFocus,d=>{d.preventDefault(),l.current||o.triggerRef.current?.focus()}),onPointerDownOutside:kt(t.onPointerDownOutside,d=>{const u=d.detail.originalEvent,m=u.button===0&&u.ctrlKey===!0,g=u.button===2||m;l.current=g},{checkForDefaultPrevented:!1}),onFocusOutside:kt(t.onFocusOutside,d=>d.preventDefault(),{checkForDefaultPrevented:!1})})})},"PopoverContentModal2"),"PopoverContentModal")),t5=k.forwardRef(tt(n(function(t,r){const o=Kt(Wa,t.__scopePopover),i=k.useRef(!1),s=k.useRef(!1);return(0,ae.jsx)(qh,{...t,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:n(l=>{t.onCloseAutoFocus?.(l),l.defaultPrevented||(i.current||o.triggerRef.current?.focus(),l.preventDefault()),i.current=!1,s.current=!1},"onCloseAutoFocus"),onInteractOutside:n(l=>{t.onInteractOutside?.(l),l.defaultPrevented||(i.current=!0,l.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const d=l.target;o.triggerRef.current?.contains(d)&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&s.current&&l.preventDefault()},"onInteractOutside")})},"PopoverContentNonModal2"),"PopoverContentNonModal")),qh=k.forwardRef(tt(n(function(t,r){const{__scopePopover:o,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:l,disableOutsidePointerEvents:d,onEscapeKeyDown:u,onPointerDownOutside:m,onFocusOutside:g,onInteractOutside:v,...y}=t,b=Kt(Wa,o),P=Qa(o);return Bi(),(0,ae.jsx)(AV,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:s,onUnmountAutoFocus:l,children:(0,ae.jsx)(_V,{asChild:!0,disableOutsidePointerEvents:d,onInteractOutside:v,onEscapeKeyDown:u,onPointerDownOutside:m,onFocusOutside:g,onDismiss:n(()=>b.onOpenChange(!1),"onDismiss"),deferPointerDownOutside:!0,children:(0,ae.jsx)(j9,{"data-state":Xi(b.open),role:"dialog",id:b.contentId,...P,...y,ref:r,style:{...y.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})},"PopoverContentImpl2"),"PopoverContentImpl")),a5=k.forwardRef(tt(n(function(t,r){const{__scopePopover:o,...i}=t,s=Qa(o);return(0,ae.jsx)(q9,{...s,...i,ref:r})},"PopoverArrow2"),"PopoverArrow"));function Xi(e){return e?"open":"closed"}n(Xi,"getState");tt(Xi,"getState");var gre=G9,fre=H9,vre=K9,yre=X9,bre=J9,wre=a5,r5=n(e=>e?.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),"toKebabCase");function o5(e,t,r=[]){if(t==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:r5(e),size:24,node:t,...r.length>0?{aliases:r}:{}}}n(o5,"toLucideIconData");var n5=n(e=>{let t="",r=!1;for(const o of e){if(o==="-"||o==="_"||o<=" "){r=t.length>0;continue}t.length===0?t+=o.toLowerCase():t+=r?o.toUpperCase():o,r=!1}return t},"toCamelCase"),i5=n(e=>{const t=n5(e);return t.charAt(0).toUpperCase()+t.slice(1)},"toPascalCase"),zn=n((...e)=>e.filter((t,r,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===r).join(" ").trim(),"mergeClasses"),Ot={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};function Xo(e){return e!=null}n(Xo,"isDefined");function s5(e,t={}){const r=t.attributeNames??{},o=n(v=>r[v]??v,"getAttributeName"),i=e.size??e.width??Ot.width,s=e.size??e.height??Ot.height,l=e.aliases?.filter(v=>typeof v=="string"&&v.trim()!=="").map(v=>`lucide-${v}`)??[],d=[...e.name?[`lucide-${e.name}`]:[],...l],u=t.className?.split(" ").filter(Boolean)??[],m=t.includeDefaultClasses===!1?zn(...u):zn("lucide",...d,...u),g=t.absoluteStrokeWidth?Number(t.strokeWidth??Ot["stroke-width"])*Number(e.size??e.width??Ot.width)/Number(t.size??t.width??Ot.width):t.strokeWidth??Ot["stroke-width"];return["svg",{...Object.entries(Ot).reduce((v,[y,b])=>(v[o(y)]=b,v),{}),..."color"in t&&t.color&&{[o("stroke")]:t.color},..."size"in t&&Xo(t.size)&&{[o("width")]:t.size,[o("height")]:t.size},..."width"in t&&Xo(t.width)&&{[o("width")]:t.width},..."height"in t&&Xo(t.height)&&{[o("height")]:t.height},[o("stroke-width")]:g,...m&&{[o("class")]:m},[o("viewBox")]:`0 0 ${i} ${s}`,...t.hasA11yProp===!1?{[o("aria-hidden")]:"true"}:{},..."attributes"in t&&t.attributes},e.node.map(v=>{const[y,b,P]=v,A=t.nonScalingStroke?{[o("vector-effect")]:"non-scaling-stroke",...b}:b;return P?[y,A,P]:[y,A]})]}n(s5,"buildLucideIconNode");function l5(e,t={}){return s5(e,{...t,attributeNames:{...t.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}n(l5,"buildLucideIconForReact");var c5=n(e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},"hasA11yProp"),d5=(0,k.createContext)({}),u5=n(()=>(0,k.useContext)(d5),"useLucideContext"),p5=(0,k.forwardRef)(({color:e,size:t,width:r,height:o,strokeWidth:i,absoluteStrokeWidth:s,nonScalingStroke:l,className:d="",children:u,iconNode:m=[],icon:g={node:m,aliases:[],size:24},...v},y)=>{const{size:b=24,strokeWidth:P=2,absoluteStrokeWidth:A=!1,nonScalingStroke:C=!1,color:D="currentColor",className:R=""}=u5()??{},$=!!u||c5(v),[U,O,L=[]]=l5(g,{color:e??D,width:r??t??b,height:o??t??b,strokeWidth:i??P,absoluteStrokeWidth:s??A,nonScalingStroke:l??C,className:zn(R,d),hasA11yProp:$,attributes:v});return(0,k.createElement)(U,{ref:y,...O},[...L.map(([N,M])=>(0,k.createElement)(N,M)),...Array.isArray(u)?u:[u]])});function m5(e,t=[],r=[]){const o=typeof e=="string"?o5(e,t,r):e,i=(0,k.forwardRef)(({className:s,...l},d)=>(0,k.createElement)(p5,{ref:d,icon:o,className:s,...l}));return o.name&&(i.displayName=i5(o.name)),i}n(m5,"createLucideIcon");var Fh={name:"boxes",size:24,node:[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]};Fh.node;var kre=m5(Fh);export{tre as $,_w as $i,Du as $n,NZ as $r,$6 as $t,kt as A,y5 as Aa,eZ as Ai,m4 as An,ML as Ar,Tae as At,dre as B,Kh as Ba,J5 as Bi,JY as Bn,XZ as Br,_n as Bt,_V as C,tc as Ca,Nw as Ci,g4 as Cn,m8 as Cr,WW as Ct,Xm as D,Qh as Da,gt as Di,f4 as Dn,a8 as Dr,zW as Dt,th as E,Da as Ea,Bw as Ei,Pr as En,qL as Er,Oae as Et,bo as F,yr as Fa,jw as Fi,a4 as Fn,ZZ as Fr,Sae as Ft,Bae as G,ro as Gi,E3 as Gn,WZ as Gr,vW as Gt,Vae as H,Kl as Ha,D5 as Hi,C3 as Hn,HZ as Hr,lae as Ht,YH as I,Ql as Ia,Y5 as Ii,sp as In,JZ as Ir,pae as It,BH as J,R5 as Ji,x3 as Jn,BZ as Jr,oW as Jt,lre as K,be as Ki,U3 as Kn,au as Kr,pW as Kt,Tt as L,Zl as La,aZ as Li,PX as Ln,fi as Lr,mae as Lt,Vt as M,Tr as Ma,vk as Mi,ap as Mn,QZ as Mr,kae as Mt,qm as N,Jl as Na,W_ as Ni,tp as Nn,PL as Nr,Pae as Nt,Vm as O,w5 as Oa,tk as Oi,h4 as On,ru as Or,Eae as Ot,mre as P,Ae as Pa,rZ as Pi,mX as Pn,mi as Pr,_ae as Pt,pre as Q,Qn as Qi,U7 as Qn,DZ as Qr,um as Qt,Gae as R,f5 as Ra,nZ as Ri,Ju as Rn,xL as Rr,uae as Rt,AV as S,va as Sa,Fw as Si,GX as Sn,h8 as Sr,ga as St,jt as T,v5 as Ta,Gt as Ti,ta as Tn,jL as Tr,Dae as Tt,Wae as U,G5 as Ui,$3 as Un,KZ as Ur,aae as Ut,Hae as V,Hh as Va,z5 as Vi,XY as Vn,VZ as Vr,cae as Vt,rre as W,ja as Wi,_3 as Wn,hi as Wr,gW as Wt,GH as X,Sd as Xi,Oq as Xn,aP as Xr,Ote as Xt,Xae as Y,Iw as Yi,jq as Yn,Qd as Yr,$te as Yt,Yae as Z,U5 as Zi,Nq as Zn,qZ as Zr,Mte as Zt,vK as _,pg as _a,zw as _i,$Q as _n,y8 as _r,Lae as _t,bre as a,Ag as aa,WS as ai,JQ as an,hu as ar,HH as at,Bi as b,_5 as ba,$k as bi,pJ as bn,lu as br,bm as bt,yre as c,_g as ca,$S as ci,XQ as cn,yi as cr,are as ct,Nh as d,bg as da,MS as di,SG as dn,du as dr,ire as dt,E5 as ea,io as ei,P6 as en,vu as er,Kae as et,q9 as f,kg as fa,PS as fi,Bp as fn,P8 as fr,nre as ft,wh as g,P5 as ga,Lw as gi,Mp as gn,cu as gr,Fae as gt,$h as h,gg as ha,oo as hi,MQ as hn,v8 as hr,qae as ht,wre as i,x5 as ia,zZ as ii,QQ as in,Fs as ir,cre as it,Li as j,la as ja,tZ as ji,d4 as jn,e8 as jr,Iae as jt,Je as k,b5 as ka,Ed as ki,Dt as kn,Ls as kr,$W as kt,gre as l,Pg as la,IZ as li,HQ as ln,pu as lr,ore as lt,L9 as m,yg as ma,X5 as mi,xi as mn,w8 as mr,jae as mt,m5 as n,ba as na,jZ as ni,ZQ as nn,pj as nr,Jae as nt,J9 as o,dc as oa,PZ as oi,PG as on,sj as or,VH as ot,j9 as p,wg as pa,fS as pi,Nt as pn,k8 as pr,XW as pt,sre as q,Us as qi,T3 as qn,YZ as qr,uW as qt,fre as r,T5 as ra,FZ as ri,KQ as rn,mj as rr,ere as rt,K9 as s,Ig as sa,AZ as si,YQ as sn,qs as sr,ure as st,kre as t,La as ta,LZ as ti,Wee as tn,Mj as tr,Zae as tt,vre as u,Sg as ua,CZ as ui,VQ as un,mu as ur,Qae as ut,yh as v,S5 as va,Z5 as vi,UQ as vn,oj as vr,KW as vt,SV as w,Yr as wa,fk as wi,p4 as wn,ej as wr,Nae as wt,TV as x,ac as xa,oZ as xi,uJ as xn,g8 as xr,HW as xt,Ze as y,k5 as ya,Mk as yi,RQ as yn,f8 as yr,VW as yt,WH as z,Ln as za,Q5 as zi,el as zn,gi as zr,hm as zt};
@@ -1 +1 @@
1
- var P=Object.defineProperty;var o=(t,e)=>P(t,"name",{value:e,configurable:!0});import{i as A}from"./rolldown-runtime-ZpX3ckPj.js";import{A as T,G as c,L as m,Va as b,j as w,n as y,za as z}from"./agent-avatar-url-BnmqahQ7.js";import{a as x}from"./BreadcrumbContext-Bxr1TyKN.js";import{a as R,c as v,d as h,f as S,h as j,i as N,l as O,m as $,n as k,o as E,p as M,r as q,s as F,t as L,u as H}from"./dist-CvM0_U_m.js";var s=A(b(),1),a=A(z(),1),I=Object.defineProperty,d=o((t,e)=>I(t,"name",{value:e,configurable:!0}),"__name"),[V,xt]=w("AlertDialog",[j]),g=j(),G=d(t=>{const{__scopeAlertDialog:e,...l}=t,r=g(e);return(0,a.jsx)(F,{...r,...l,modal:!0})},"AlertDialog"),B=s.forwardRef(d(o(function(e,l){const{__scopeAlertDialog:r,...i}=e,n=g(r);return(0,a.jsx)($,{...n,...i,ref:l})},"AlertDialogTrigger2"),"AlertDialogTrigger")),J=d(t=>{const{__scopeAlertDialog:e,...l}=t,r=g(e);return(0,a.jsx)(S,{...r,...l})},"AlertDialogPortal"),K=s.forwardRef(d(o(function(e,l){const{__scopeAlertDialog:r,...i}=e,n=g(r);return(0,a.jsx)(h,{...n,...i,ref:l})},"AlertDialogOverlay2"),"AlertDialogOverlay")),[Q,U]=V("AlertDialogContent"),W=s.forwardRef(d(o(function(e,l){const{__scopeAlertDialog:r,children:i,...n}=e,p=g(r),f=s.useRef(null),C=m(l,f),D=s.useRef(null);return(0,a.jsx)(Q,{scope:r,cancelRef:D,children:(0,a.jsx)(O,{role:"alertdialog",...p,...n,ref:C,onOpenAutoFocus:T(n.onOpenAutoFocus,u=>{u.preventDefault(),D.current?.focus({preventScroll:!0})}),onPointerDownOutside:o(u=>u.preventDefault(),"onPointerDownOutside"),onInteractOutside:o(u=>u.preventDefault(),"onInteractOutside"),children:i})})},"AlertDialogContent2"),"AlertDialogContent")),X=s.forwardRef(d(o(function(e,l){const{__scopeAlertDialog:r,...i}=e,n=g(r);return(0,a.jsx)(M,{...n,...i,ref:l})},"AlertDialogTitle2"),"AlertDialogTitle")),Y=s.forwardRef(d(o(function(e,l){const{__scopeAlertDialog:r,...i}=e,n=g(r);return(0,a.jsx)(H,{...n,...i,ref:l})},"AlertDialogDescription2"),"AlertDialogDescription")),Z=s.forwardRef(d(o(function(e,l){const{__scopeAlertDialog:r,...i}=e,n=g(r);return(0,a.jsx)(v,{...n,...i,ref:l})},"AlertDialogAction2"),"AlertDialogAction")),tt="AlertDialogCancel",et=s.forwardRef(d(o(function(e,l){const{__scopeAlertDialog:r,...i}=e,{cancelRef:n}=U(tt,r),p=g(r),f=m(l,n);return(0,a.jsx)(v,{...p,...i,ref:f})},"AlertDialogCancel2"),"AlertDialogCancel")),at=G,ot=B,rt=J,lt=K,nt=W,it=Z,st=et,ct=X,dt=Y,_={name:"triangle-alert",size:24,node:[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["alert-triangle"]};_.node;var vt=y(_);function jt({delayDuration:t=0,...e}){return(0,a.jsx)(N,{"data-slot":"tooltip-provider",delayDuration:t,...e})}o(jt,"TooltipProvider");function _t({...t}){return(0,a.jsx)(R,{"data-slot":"tooltip",...t})}o(_t,"Tooltip");function Ct({...t}){return(0,a.jsx)(E,{"data-slot":"tooltip-trigger",...t})}o(Ct,"TooltipTrigger");function Pt({className:t,sideOffset:e=0,children:l,...r}){return(0,a.jsx)(q,{children:(0,a.jsxs)(k,{"data-slot":"tooltip-content",sideOffset:e,className:c("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",t),...r,children:[l,(0,a.jsx)(L,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-(--sz-calc-28) rotate-45 rounded-(--rad-2)"})]})})}o(Pt,"TooltipContent");function Tt({...t}){return(0,a.jsx)(at,{"data-slot":"alert-dialog",...t})}o(Tt,"AlertDialog");function bt({...t}){return(0,a.jsx)(ot,{"data-slot":"alert-dialog-trigger",...t})}o(bt,"AlertDialogTrigger");function gt({...t}){return(0,a.jsx)(rt,{"data-slot":"alert-dialog-portal",...t})}o(gt,"AlertDialogPortal");function ut({className:t,...e}){return(0,a.jsx)(lt,{"data-slot":"alert-dialog-overlay",className:c("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",t),...e})}o(ut,"AlertDialogOverlay");function wt({className:t,...e}){return(0,a.jsxs)(gt,{children:[(0,a.jsx)(ut,{}),(0,a.jsx)(nt,{"data-slot":"alert-dialog-content",className:c("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] 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",t),...e})]})}o(wt,"AlertDialogContent");function yt({className:t,...e}){return(0,a.jsx)("div",{"data-slot":"alert-dialog-header",className:c("flex flex-col gap-2 text-center sm:text-left",t),...e})}o(yt,"AlertDialogHeader");function zt({className:t,...e}){return(0,a.jsx)("div",{"data-slot":"alert-dialog-footer",className:c("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...e})}o(zt,"AlertDialogFooter");function Rt({className:t,...e}){return(0,a.jsx)(ct,{"data-slot":"alert-dialog-title",className:c("text-lg leading-none font-semibold",t),...e})}o(Rt,"AlertDialogTitle");function ht({className:t,...e}){return(0,a.jsx)(dt,{"data-slot":"alert-dialog-description",className:c("text-muted-foreground text-sm",t),...e})}o(ht,"AlertDialogDescription");function St({className:t,...e}){return(0,a.jsx)(it,{"data-slot":"alert-dialog-action",className:c(x(),t),...e})}o(St,"AlertDialogAction");function Nt({className:t,...e}){return(0,a.jsx)(st,{"data-slot":"alert-dialog-cancel",className:c(x({variant:"outline"}),t),...e})}o(Nt,"AlertDialogCancel");export{ht as a,Rt as c,Pt as d,jt as f,wt as i,bt as l,vt as m,St as n,zt as o,Ct as p,Nt as r,yt as s,Tt as t,_t as u};
1
+ var P=Object.defineProperty;var o=(t,e)=>P(t,"name",{value:e,configurable:!0});import{i as A}from"./rolldown-runtime-ZpX3ckPj.js";import{A as T,Ba as b,G as c,Ha as w,L as m,j as y,n as R}from"./agent-avatar-url-Dp-4-Emx.js";import{a as x}from"./BreadcrumbContext-CIC8QOSJ.js";import{a as h,c as v,d as z,f as S,h as j,i as N,l as O,m as $,n as k,o as E,p as M,r as q,s as F,t as H,u as L}from"./dist-DNeg6Olm.js";var s=A(w(),1),a=A(b(),1),I=Object.defineProperty,d=o((t,e)=>I(t,"name",{value:e,configurable:!0}),"__name"),[B,xt]=y("AlertDialog",[j]),g=j(),G=d(t=>{const{__scopeAlertDialog:e,...l}=t,r=g(e);return(0,a.jsx)(F,{...r,...l,modal:!0})},"AlertDialog"),V=s.forwardRef(d(o(function(e,l){const{__scopeAlertDialog:r,...i}=e,n=g(r);return(0,a.jsx)($,{...n,...i,ref:l})},"AlertDialogTrigger2"),"AlertDialogTrigger")),J=d(t=>{const{__scopeAlertDialog:e,...l}=t,r=g(e);return(0,a.jsx)(S,{...r,...l})},"AlertDialogPortal"),K=s.forwardRef(d(o(function(e,l){const{__scopeAlertDialog:r,...i}=e,n=g(r);return(0,a.jsx)(z,{...n,...i,ref:l})},"AlertDialogOverlay2"),"AlertDialogOverlay")),[Q,U]=B("AlertDialogContent"),W=s.forwardRef(d(o(function(e,l){const{__scopeAlertDialog:r,children:i,...n}=e,p=g(r),f=s.useRef(null),C=m(l,f),D=s.useRef(null);return(0,a.jsx)(Q,{scope:r,cancelRef:D,children:(0,a.jsx)(O,{role:"alertdialog",...p,...n,ref:C,onOpenAutoFocus:T(n.onOpenAutoFocus,u=>{u.preventDefault(),D.current?.focus({preventScroll:!0})}),onPointerDownOutside:o(u=>u.preventDefault(),"onPointerDownOutside"),onInteractOutside:o(u=>u.preventDefault(),"onInteractOutside"),children:i})})},"AlertDialogContent2"),"AlertDialogContent")),X=s.forwardRef(d(o(function(e,l){const{__scopeAlertDialog:r,...i}=e,n=g(r);return(0,a.jsx)(M,{...n,...i,ref:l})},"AlertDialogTitle2"),"AlertDialogTitle")),Y=s.forwardRef(d(o(function(e,l){const{__scopeAlertDialog:r,...i}=e,n=g(r);return(0,a.jsx)(L,{...n,...i,ref:l})},"AlertDialogDescription2"),"AlertDialogDescription")),Z=s.forwardRef(d(o(function(e,l){const{__scopeAlertDialog:r,...i}=e,n=g(r);return(0,a.jsx)(v,{...n,...i,ref:l})},"AlertDialogAction2"),"AlertDialogAction")),tt="AlertDialogCancel",et=s.forwardRef(d(o(function(e,l){const{__scopeAlertDialog:r,...i}=e,{cancelRef:n}=U(tt,r),p=g(r),f=m(l,n);return(0,a.jsx)(v,{...p,...i,ref:f})},"AlertDialogCancel2"),"AlertDialogCancel")),at=G,ot=V,rt=J,lt=K,nt=W,it=Z,st=et,ct=X,dt=Y,_={name:"triangle-alert",size:24,node:[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["alert-triangle"]};_.node;var vt=R(_);function jt({delayDuration:t=0,...e}){return(0,a.jsx)(N,{"data-slot":"tooltip-provider",delayDuration:t,...e})}o(jt,"TooltipProvider");function _t({...t}){return(0,a.jsx)(h,{"data-slot":"tooltip",...t})}o(_t,"Tooltip");function Ct({...t}){return(0,a.jsx)(E,{"data-slot":"tooltip-trigger",...t})}o(Ct,"TooltipTrigger");function Pt({className:t,sideOffset:e=0,children:l,...r}){return(0,a.jsx)(q,{children:(0,a.jsxs)(k,{"data-slot":"tooltip-content",sideOffset:e,className:c("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",t),...r,children:[l,(0,a.jsx)(H,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-(--sz-calc-28) rotate-45 rounded-(--rad-2)"})]})})}o(Pt,"TooltipContent");function Tt({...t}){return(0,a.jsx)(at,{"data-slot":"alert-dialog",...t})}o(Tt,"AlertDialog");function bt({...t}){return(0,a.jsx)(ot,{"data-slot":"alert-dialog-trigger",...t})}o(bt,"AlertDialogTrigger");function gt({...t}){return(0,a.jsx)(rt,{"data-slot":"alert-dialog-portal",...t})}o(gt,"AlertDialogPortal");function ut({className:t,...e}){return(0,a.jsx)(lt,{"data-slot":"alert-dialog-overlay",className:c("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",t),...e})}o(ut,"AlertDialogOverlay");function wt({className:t,...e}){return(0,a.jsxs)(gt,{children:[(0,a.jsx)(ut,{}),(0,a.jsx)(nt,{"data-slot":"alert-dialog-content",className:c("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] 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",t),...e})]})}o(wt,"AlertDialogContent");function yt({className:t,...e}){return(0,a.jsx)("div",{"data-slot":"alert-dialog-header",className:c("flex flex-col gap-2 text-center sm:text-left",t),...e})}o(yt,"AlertDialogHeader");function Rt({className:t,...e}){return(0,a.jsx)("div",{"data-slot":"alert-dialog-footer",className:c("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...e})}o(Rt,"AlertDialogFooter");function ht({className:t,...e}){return(0,a.jsx)(ct,{"data-slot":"alert-dialog-title",className:c("text-lg leading-none font-semibold",t),...e})}o(ht,"AlertDialogTitle");function zt({className:t,...e}){return(0,a.jsx)(dt,{"data-slot":"alert-dialog-description",className:c("text-muted-foreground text-sm",t),...e})}o(zt,"AlertDialogDescription");function St({className:t,...e}){return(0,a.jsx)(it,{"data-slot":"alert-dialog-action",className:c(x(),t),...e})}o(St,"AlertDialogAction");function Nt({className:t,...e}){return(0,a.jsx)(st,{"data-slot":"alert-dialog-cancel",className:c(x({variant:"outline"}),t),...e})}o(Nt,"AlertDialogCancel");export{zt as a,ht as c,Pt as d,jt as f,wt as i,bt as l,vt as m,St as n,Rt as o,Ct as p,Nt as r,yt as s,Tt as t,_t as u};
@@ -1 +1 @@
1
- import{n as r}from"./agent-avatar-url-BnmqahQ7.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
+ import{n as r}from"./agent-avatar-url-Dp-4-Emx.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 +1 @@
1
- var d=Object.defineProperty;var a=(r,e)=>d(r,"name",{value:e,configurable:!0});import{i as t}from"./rolldown-runtime-ZpX3ckPj.js";import{G as c,P as v,Va as u,n as l,za as g}from"./agent-avatar-url-BnmqahQ7.js";import{o as f}from"./BreadcrumbContext-Bxr1TyKN.js";var i={name:"loader-circle",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],aliases:["loader-2"]};i.node;var _=l(i),k=t(u(),1),b=t(g(),1),p=f("inline-flex items-center justify-center rounded-full border border-transparent px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-(length:--rad-3) aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-(--tp-color-box-shadow) overflow-hidden",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function w({className:r,variant:e="default",asChild:o=!1,...n}){const s=o?v:"span";return(0,b.jsx)(s,{"data-slot":"badge","data-variant":e,className:c(p({variant:e}),r),...n})}a(w,"Badge");export{p as n,_ as r,w as t};
1
+ var d=Object.defineProperty;var a=(r,e)=>d(r,"name",{value:e,configurable:!0});import{i as t}from"./rolldown-runtime-ZpX3ckPj.js";import{Ba as c,G as v,Ha as u,P as l,n as g}from"./agent-avatar-url-Dp-4-Emx.js";import{o as f}from"./BreadcrumbContext-CIC8QOSJ.js";var i={name:"loader-circle",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],aliases:["loader-2"]};i.node;var _=g(i),k=t(u(),1),b=t(c(),1),p=f("inline-flex items-center justify-center rounded-full border border-transparent px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-(length:--rad-3) aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-(--tp-color-box-shadow) overflow-hidden",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function w({className:r,variant:e="default",asChild:o=!1,...n}){const s=o?l:"span";return(0,b.jsx)(s,{"data-slot":"badge","data-variant":e,className:v(p({variant:e}),r),...n})}a(w,"Badge");export{p as n,_ as r,w as t};
@@ -1 +1 @@
1
- import{n as t}from"./agent-avatar-url-BnmqahQ7.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
+ import{n as t}from"./agent-avatar-url-Dp-4-Emx.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};