skill-creator 2.3.0 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/dist/cli.js +35809 -12291
  3. package/dist/cli.js.map +4 -4
  4. package/dist/daemon.js +23461 -2818
  5. package/dist/daemon.js.map +4 -4
  6. package/dist/package.json +1 -1
  7. package/dist/webui/_app/immutable/assets/0.B4ZC2KQW.css +2 -0
  8. package/dist/webui/_app/immutable/assets/SettingsPage.DclbL_Wf.css +1 -0
  9. package/dist/webui/_app/immutable/chunks/{8hp3I3ac.js → B0stYqX9.js} +1 -1
  10. package/dist/webui/_app/immutable/chunks/{DiaaOubc.js → BTuMeN4z.js} +1 -1
  11. package/dist/webui/_app/immutable/chunks/B_gnhZ39.js +1 -0
  12. package/dist/webui/_app/immutable/chunks/{DKepoBN5.js → BcvferwH.js} +1 -1
  13. package/dist/webui/_app/immutable/chunks/{j76fpbnQ.js → Bd1_Ly7G.js} +1 -1
  14. package/dist/webui/_app/immutable/chunks/{D3qCeXbe.js → BgJCuTDs.js} +1 -1
  15. package/dist/webui/_app/immutable/chunks/C67g-p2T.js +1 -0
  16. package/dist/webui/_app/immutable/chunks/{ByW1yjUW.js → CBFLFfGb.js} +1 -1
  17. package/dist/webui/_app/immutable/chunks/CD-NpLjk.js +6 -0
  18. package/dist/webui/_app/immutable/chunks/{DwIX6ZFE.js → CIxXWvxF.js} +1 -1
  19. package/dist/webui/_app/immutable/chunks/COXgCOd9.js +2 -0
  20. package/dist/webui/_app/immutable/chunks/Ccj5eiVa.js +1 -0
  21. package/dist/webui/_app/immutable/chunks/{BOPkZ98B.js → CdjBDc_u.js} +1 -1
  22. package/dist/webui/_app/immutable/chunks/Cp0lquqA.js +1 -0
  23. package/dist/webui/_app/immutable/chunks/Crg8KRap.js +5 -0
  24. package/dist/webui/_app/immutable/chunks/{B0-OMyfG.js → CvO5eq4f.js} +1 -1
  25. package/dist/webui/_app/immutable/chunks/{Cr5YUwJg.js → D6s79OPW.js} +1 -1
  26. package/dist/webui/_app/immutable/chunks/{oxP0dM6z.js → D7DTLcps.js} +1 -1
  27. package/dist/webui/_app/immutable/chunks/{C5MrAfWf.js → DGJ9QIPN.js} +1 -1
  28. package/dist/webui/_app/immutable/chunks/Dcf0klrH.js +5 -0
  29. package/dist/webui/_app/immutable/chunks/{CPbfZBJo.js → DlsPNMHX.js} +4 -4
  30. package/dist/webui/_app/immutable/chunks/Do_MDwCJ.js +1 -0
  31. package/dist/webui/_app/immutable/chunks/DovL68qD.js +1 -0
  32. package/dist/webui/_app/immutable/chunks/{CgxChsUX.js → Du6-3Tbt.js} +1 -1
  33. package/dist/webui/_app/immutable/chunks/M-b0y9AQ.js +1 -0
  34. package/dist/webui/_app/immutable/chunks/hIGXQE4_.js +1 -0
  35. package/dist/webui/_app/immutable/chunks/oJ4aK8PG.js +1 -0
  36. package/dist/webui/_app/immutable/chunks/vry1W47_.js +7 -0
  37. package/dist/webui/_app/immutable/entry/{app.BQ4neDVJ.js → app.SX0t6ojk.js} +2 -2
  38. package/dist/webui/_app/immutable/entry/start.gejSBBnR.js +1 -0
  39. package/dist/webui/_app/immutable/nodes/0.BTXc1wYu.js +229 -0
  40. package/dist/webui/_app/immutable/nodes/{1.BhX-6aiQ.js → 1.BY0DmHLP.js} +1 -1
  41. package/dist/webui/_app/immutable/nodes/{2.C7Br-rQ1.js → 2._osi8D6m.js} +1 -1
  42. package/dist/webui/_app/version.json +1 -1
  43. package/dist/webui/index.html +24 -21
  44. package/package.json +7 -5
  45. package/skills/skill-creator-v2/SKILL.md +50 -0
  46. package/skills/skill-creator-v2/references/tools.md +161 -0
  47. package/dist/webui/_app/immutable/assets/0.Dbnkcm0y.css +0 -2
  48. package/dist/webui/_app/immutable/chunks/B5sWuF6v.js +0 -1
  49. package/dist/webui/_app/immutable/chunks/BdXWsCWd.js +0 -3
  50. package/dist/webui/_app/immutable/chunks/BkjUgGsE.js +0 -1
  51. package/dist/webui/_app/immutable/chunks/CQD9uzpA.js +0 -1
  52. package/dist/webui/_app/immutable/chunks/DXKynIUR.js +0 -1
  53. package/dist/webui/_app/immutable/chunks/E8LHILEh.js +0 -1
  54. package/dist/webui/_app/immutable/chunks/myIHotqu.js +0 -2
  55. package/dist/webui/_app/immutable/chunks/p_ObVaZi.js +0 -5
  56. package/dist/webui/_app/immutable/entry/start.BqwTCU7F.js +0 -1
  57. package/dist/webui/_app/immutable/nodes/0.uOFdFHyI.js +0 -234
@@ -1,2 +0,0 @@
1
- import{A as e,At as t,B as n,Ct as r,F as i,G as a,N as o,R as s,St as c,U as l,W as u,X as d,ct as f,ft as p,gt as m,kt as h,lt as g,m as ee,mt as _,nt as v,o as y,ot as b,rt as x,s as S,st as C,x as w,z as T}from"./CmCJ0SKP.js";import{t as E}from"./8hp3I3ac.js";import"./xihTtKlq.js";import"./DXKynIUR.js";import{t as D}from"./BkEnd9_Z.js";import{G as O,H as k,K as A,S as j,U as M,g as N,o as P,p as te,t as ne,y as F}from"./B5sWuF6v.js";import{t as I}from"./BT2vrlul.js";import"./BOPkZ98B.js";import{a as L,i as re,n as ie,s as ae}from"./D3qCeXbe.js";import{n as oe}from"./1aUphu7Y.js";import{n as se,t as ce}from"./p_ObVaZi.js";import{n as R,t as le}from"./DnPeA-9c.js";import{t as ue}from"./CpRvgjpe.js";import{t as de}from"./BIfnT_mK.js";import{t as fe}from"./Bs27XW8_.js";import{t as z}from"./Bl0jjuyR.js";import{t as pe}from"./CI1OXbBG.js";var B=new Set([`$$slots`,`$$events`,`$$legacy`]);function me(e,t){let n=y(t,B),r=[[`path`,{d:`M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5`}],[`path`,{d:`M3.22 13H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27`}]];D(e,S({name:`heart-pulse`},()=>n,{get iconNode(){return r}}))}var he=new Set([`$$slots`,`$$events`,`$$legacy`]);function ge(e,t){let n=y(t,he),r=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z`}]];D(e,S({name:`compass`},()=>n,{get iconNode(){return r}}))}var _e=n(`<!> Import`,1),ve=n(`<button class="flex w-full items-center gap-2 px-3 py-2 text-left transition-colors hover:bg-muted/50"><!> <span class="min-w-0 flex-1 truncate text-xs"> </span> <span class="shrink-0 rounded bg-muted px-1.5 py-0.5 text-xs text-muted-foreground"> </span> <span class="shrink-0 text-xs text-muted-foreground"> </span></button>`),ye=n(`<section aria-label="Recent agent sessions" class="space-y-1.5"><h2 class="text-xs font-medium uppercase tracking-wide text-muted-foreground">Continue</h2> <div class="divide-y divide-border rounded-lg border border-border"></div></section>`),be=n(`<div class="flex items-start gap-3 rounded-lg border border-destructive/40 bg-destructive/10 p-4" role="alert"><!> <div class="min-w-0 flex-1"><p class="text-sm font-medium text-destructive">Couldn't load workspaces</p> <p class="mt-1 break-words text-xs text-destructive/90"> </p></div> <!></div>`),xe=n(`<div class="space-y-3" aria-label="Loading workspaces"><div class="h-24 animate-pulse rounded-lg border border-border bg-muted/50"></div> <div class="h-24 animate-pulse rounded-lg border border-border bg-muted/50"></div></div>`),Se=n(`<!> Import workspace`,1),Ce=n(`<div class="rounded-lg border border-dashed border-border p-8 text-center"><!> <p class="mt-3 text-sm font-medium">No skill locations yet</p> <p class="mt-1 text-xs text-muted-foreground">Import a directory to manage its skills, or browse the global agent locations.</p> <!></div>`),we=n(`<p class="flex items-center gap-2 text-xs text-muted-foreground" role="status"><!> Updating…</p>`),Te=n(`<span class="text-xs text-muted-foreground">Not found on disk</span>`),Ee=n(`<span class="block truncate font-mono text-xs text-muted-foreground"> </span>`),De=n(`<li><button class="flex min-h-11 w-full items-center justify-between gap-2 rounded-md bg-muted/40 px-3 py-2 text-left transition-colors hover:bg-muted/70 disabled:pointer-events-none disabled:opacity-50"><span class="min-w-0"><span class="block truncate text-xs font-medium"> </span> <!></span> <!></button></li>`),Oe=n(`<section class="rounded-lg border border-border"><div class="flex items-center gap-2.5 border-b border-border px-4 py-3"><!> <div class="min-w-0 flex-1"><div class="flex items-center gap-2"><h2 class="truncate text-sm font-medium"> </h2> <!></div> <p class="mt-0.5 text-xs text-muted-foreground"> </p></div> <!></div> <ul class="grid grid-cols-1 gap-2 p-3 sm:grid-cols-2"></ul></section>`),ke=n(`<!> Missing`,1),Ae=n(`<!> <!>`,1),je=n(`<li><button class="flex min-h-9 items-center gap-1.5 rounded-full border border-border/60 px-2.5 py-1 text-xs transition-colors hover:bg-muted/50 disabled:pointer-events-none disabled:opacity-50"> <span class="tabular-nums text-muted-foreground"> </span></button></li>`),Me=n(`<ul class="flex flex-wrap gap-1.5 border-t border-border/60 px-4 py-2.5"></ul>`),Ne=n(`<li><div class="flex items-center gap-2.5 px-4 py-3"><button class="flex min-h-11 min-w-0 flex-1 items-center gap-2.5 text-left"><!> <span class="min-w-0 flex-1"><span class="flex items-center gap-2"><span class="truncate text-sm font-medium"> </span> <!></span> <span class="mt-0.5 block truncate font-mono text-xs text-muted-foreground"> </span></span> <!></button> <!></div> <!></li>`),Pe=n(`<section><h2 class="mb-2 text-xs font-medium uppercase tracking-wide text-muted-foreground">Imported workspaces</h2> <ul class="space-y-2"></ul></section>`),Fe=n(`<!> <!> <!>`,1),Ie=n(`<div class="flex h-full flex-col overflow-y-auto p-5"><header class="flex shrink-0 items-start justify-between gap-3 border-b border-border pb-4"><div><h1 class="text-lg font-semibold">Workspaces</h1> <p class="mt-0.5 text-xs text-muted-foreground">Your skill library, agent sessions, and quick ways to put both to work.</p></div> <div class="flex shrink-0 items-center gap-1.5"><!> <!></div></header> <div class="mx-auto mt-5 w-full max-w-5xl space-y-6"><section aria-label="Quick actions" class="grid grid-cols-1 gap-2 min-[560px]:grid-cols-2"><button class="flex items-start gap-2.5 rounded-lg border border-border bg-background p-3 text-left transition-colors hover:border-foreground/20 hover:bg-muted/50"><!> <span class="min-w-0"><span class="block text-sm font-medium">Create a skill</span> <span class="block text-xs text-muted-foreground">Describe the task; the agent drafts the SKILL.md with best practices.</span></span></button> <button class="flex items-start gap-2.5 rounded-lg border border-border bg-background p-3 text-left transition-colors hover:border-foreground/20 hover:bg-muted/50"><!> <span class="min-w-0"><span class="block text-sm font-medium">Health check my library</span> <span class="block text-xs text-muted-foreground">Duplicates, vague descriptions, stale skills — with proposed fixes.</span></span></button> <button class="flex items-start gap-2.5 rounded-lg border border-border bg-background p-3 text-left transition-colors hover:border-foreground/20 hover:bg-muted/50"><!> <span class="min-w-0"><span class="block text-sm font-medium">Explore skill sources</span> <span class="block text-xs text-muted-foreground">Discover curated Git sources and analyze candidate skills.</span></span></button> <button class="flex items-start gap-2.5 rounded-lg border border-border bg-background p-3 text-left transition-colors hover:border-foreground/20 hover:bg-muted/50"><!> <span class="min-w-0"><span class="block text-sm font-medium">Browse the library</span> <span class="block text-xs text-muted-foreground"> </span></span></button></section> <!> <div id="library-index" class="space-y-6"><!></div></div></div> <!>`,1);function V(n,u){r(u,!0);function y(e){return`/wiki/${e===`~`?`%7E`:e}`}let S=m(()=>L.workspaces.filter(e=>e.kind===`global`)),D=m(()=>L.workspaces.filter(e=>e.kind===`directory`)),B=m(()=>L.workspaces.length>0),he=m(()=>L.loading&&d(B)),V=_(null),H=_(!1),U=_(!1);x(()=>{ie()}),x(()=>{!P.loaded&&!P.loading&&te()});let W=m(()=>{let e=0,t=0;for(let n of L.workspaces)for(let r of n.providers)t+=1,e+=r.skillCount??0;return{skills:e,providers:t,imported:L.workspaces.filter(e=>e.kind===`directory`).length}}),G=m(()=>P.sessions.slice(0,3));function Le(e){N(e),F(!0)}function Re(e){let t=Date.now()-new Date(e).getTime();if(!Number.isFinite(t))return``;let n=Math.floor(t/6e4);if(n<1)return`just now`;if(n<60)return`${n}m ago`;let r=Math.floor(n/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}function ze(e){p(V,e,!0),p(H,!0)}x(()=>{d(H)||p(V,null)});async function Be(){await ie()}function Ve(e,t){return`/workspaces/${e.id===`~`?`%7E`:e.id}/${t.id}`}async function He(){let e=d(V);if(e){p(U,!0);try{await re(e.id)&&(p(H,!1),oe(`Removed ${e.label}. Files remain on disk.`))}catch(e){oe(e instanceof Error?e.message:String(e))}finally{p(U,!1)}}}var Ue=Ie(),K=C(Ue),q=b(K),We=g(b(q),2),Ge=b(We);R(Ge,{variant:`ghost`,size:`icon`,class:`h-9 w-9`,title:`Refresh workspaces`,"aria-label":`Refresh workspaces`,get disabled(){return L.loading},onclick:()=>void Be(),children:(e,t)=>{var n=T(),r=C(n),i=e=>{le(e,{class:`h-4 w-4 animate-spin`})},a=e=>{de(e,{class:`h-4 w-4`})};o(r,e=>{L.loading?e(i):e(a,-1)}),s(e,n)},$$slots:{default:!0}});var Ke=g(Ge,2);R(Ke,{size:`sm`,onclick:()=>O(),children:(e,t)=>{var n=_e(),r=C(n);M(r,{class:`h-4 w-4`}),h(),s(e,n)},$$slots:{default:!0}}),t(We),t(q);var qe=g(q,2),J=b(qe),Y=b(J),Je=b(Y);ne(Je,{class:`mt-0.5 h-4 w-4 shrink-0 text-foreground/70`}),h(2),t(Y);var X=g(Y,2);me(b(X),{class:`mt-0.5 h-4 w-4 shrink-0 text-foreground/70`}),h(2),t(X);var Z=g(X,2);ge(b(Z),{class:`mt-0.5 h-4 w-4 shrink-0 text-foreground/70`}),h(2),t(Z);var Q=g(Z,2),Ye=b(Q);A(Ye,{class:`mt-0.5 h-4 w-4 shrink-0 text-foreground/70`});var Xe=g(Ye,2),Ze=g(b(Xe),2),Qe=f(Ze);t(Xe),t(Q),t(J);var $=g(J,2),$e=n=>{var r=ye(),o=g(b(r),2);e(o,21,()=>d(G),e=>e.sessionId,(e,n)=>{var r=ve(),o=b(r);k(o,{class:`h-3.5 w-3.5 shrink-0 text-muted-foreground`});var c=g(o,2),l=f(c,!0),u=g(c,2),p=f(u,!0),m=g(u,2),h=f(m,!0);t(r),v(e=>{i(l,d(n).title||`Untitled session`),i(p,d(n).mode),i(h,e)},[()=>Re(d(n).createdAt)]),a(`click`,r,()=>Le(d(n).sessionId)),s(e,r)}),t(o),t(r),s(n,r)};o($,e=>{d(G).length>0&&e($e)});var et=g($,2),tt=b(et),nt=e=>{var n=be(),r=b(n);fe(r,{class:`mt-0.5 h-4 w-4 shrink-0 text-destructive`});var a=g(r,2),o=g(b(a),2),c=f(o,!0);t(a);var u=g(a,2);R(u,{variant:`outline`,size:`sm`,onclick:()=>void Be(),children:(e,t)=>{h();var n=l(`Retry`);s(e,n)},$$slots:{default:!0}}),t(n),v(()=>i(c,L.error)),s(e,n)},rt=e=>{var t=xe();s(e,t)},it=e=>{var n=Ce(),r=b(n);pe(r,{class:`mx-auto h-8 w-8 text-muted-foreground`});var i=g(r,6);R(i,{class:`mt-4`,size:`sm`,onclick:()=>O(),children:(e,t)=>{var n=Se(),r=C(n);M(r,{class:`h-4 w-4`}),h(),s(e,n)},$$slots:{default:!0}}),t(n),s(e,n)},at=n=>{var r=Fe(),c=C(r),u=e=>{var n=we(),r=b(n);le(r,{class:`h-3.5 w-3.5 animate-spin`}),h(),t(n),s(e,n)};o(c,e=>{d(he)&&e(u)});var p=g(c,2);e(p,17,()=>d(S),e=>e.id,(n,r)=>{let c=m(()=>d(r).available?d(r):null);var u=Oe(),p=b(u),_=b(p);ue(_,{class:`h-4 w-4 shrink-0 text-primary`});var x=g(_,2),S=b(x),C=b(S),w=f(C,!0),T=g(C,2);z(T,{variant:`secondary`,class:`text-xs`,children:(e,t)=>{h();var n=l(`~ global`);s(e,n)},$$slots:{default:!0}}),t(S);var D=g(S,2),O=f(D);t(x);var k=g(x,2);R(k,{variant:`ghost`,size:`icon`,class:`h-9 w-9 shrink-0`,title:`Open the global wiki`,"aria-label":`Open the global wiki`,onclick:()=>void E(y(d(r).id)),children:(e,t)=>{I(e,{class:`h-4 w-4`})},$$slots:{default:!0}}),t(p);var A=g(p,2);e(A,21,()=>d(r).providers,e=>e.id,(e,n)=>{var u=De(),p=b(u),m=b(p),_=b(m),y=f(_,!0),x=g(_,2),S=e=>{var t=Te();s(e,t)},C=e=>{var t=Ee(),r=f(t,!0);v(()=>i(r,d(n).path)),s(e,t)};o(x,e=>{d(n).available?d(n).path&&e(C,1):e(S)}),t(m);var w=g(m,2);z(w,{variant:`secondary`,class:`shrink-0 tabular-nums`,children:(e,t)=>{h();var r=l();v(()=>i(r,d(n).skillCount)),s(e,r)},$$slots:{default:!0}}),t(p),t(u),v(()=>{p.disabled=!d(c)||!d(n).available,ee(p,`title`,d(n).path??d(n).label),i(y,d(n).label)}),a(`click`,p,()=>d(c)&&void E(Ve(d(r),d(n)))),s(e,u)}),t(A),t(u),v(()=>{i(w,d(r).label),i(O,`${d(r).skillCount??``} skill${d(r).skillCount===1?``:`s`} across ${d(r).providers.length??``}
2
- agent location${d(r).providers.length===1?``:`s`}`)}),s(n,u)});var _=g(p,2),x=n=>{var r=Pe(),c=g(b(r),2);e(c,21,()=>d(D),e=>e.id,(n,r)=>{let c=m(()=>d(r).kind===`directory`?d(r):null);var u=Ne(),p=b(u),_=b(p),x=b(_);{let e=m(()=>d(r).available?`text-primary`:`text-destructive`);pe(x,{get class(){return`h-4 w-4 shrink-0 ${d(e)??``}`}})}var S=g(x,2),T=b(S),D=b(T),O=f(D,!0),k=g(D,2),A=e=>{z(e,{variant:`destructive`,class:`text-xs`,children:(e,t)=>{var n=ke(),r=C(n);fe(r,{class:`h-3 w-3`}),h(),s(e,n)},$$slots:{default:!0}})};o(k,e=>{d(r).available||e(A)}),t(T);var j=g(T,2),M=f(j,!0);t(S);var N=g(S,2);z(N,{variant:`secondary`,class:`shrink-0 tabular-nums`,children:(e,t)=>{h();var n=l();v(()=>i(n,d(r).skillCount)),s(e,n)},$$slots:{default:!0}}),t(_);var P=g(_,2),te=e=>{var t=Ae(),n=C(t);{let e=m(()=>`Open the wiki for ${d(r).label}`),t=m(()=>`Open the wiki for ${d(r).label}`),i=m(()=>!d(r).available);R(n,{variant:`ghost`,size:`icon`,class:`h-11 w-11 shrink-0 text-muted-foreground hover:text-foreground`,get title(){return d(e)},get"aria-label"(){return d(t)},get disabled(){return d(i)},onclick:()=>d(r).available&&void E(y(d(r).id)),children:(e,t)=>{I(e,{class:`h-4 w-4`})},$$slots:{default:!0}})}var i=g(n,2);{let e=m(()=>`Remove ${d(r).label} registration`),t=m(()=>`Remove ${d(r).label}`);R(i,{variant:`ghost`,size:`icon`,class:`h-11 w-11 shrink-0 text-muted-foreground hover:text-destructive`,get title(){return d(e)},get"aria-label"(){return d(t)},onclick:()=>ze(d(c)),children:(e,t)=>{ce(e,{class:`h-4 w-4`})},$$slots:{default:!0}})}s(e,t)};o(P,e=>{d(c)&&e(te)}),t(p);var ne=g(p,2),F=n=>{var o=Me();e(o,21,()=>d(r).providers,e=>e.id,(e,n)=>{var o=je(),c=b(o),l=b(c),u=g(l),p=f(u,!0);t(c),t(o),v(()=>{c.disabled=!d(r).available||!d(n).available,i(l,`${d(n).label??``} `),i(p,d(n).skillCount)}),a(`click`,c,()=>d(r).available&&void E(Ve(d(r),d(n)))),s(e,o)}),t(o),v(()=>ee(o,`aria-label`,`Providers in ${d(r).label??``}`)),s(n,o)};o(ne,e=>{d(r).providers.length>0&&e(F)}),t(u),v(()=>{w(u,1,`rounded-lg border border-border transition-colors ${d(r).available?`hover:border-foreground/20`:`border-destructive/40`}`),_.disabled=!d(r).available,i(O,d(r).label),i(M,d(r).path)}),a(`click`,_,()=>d(r).available&&void E(ae(d(r)))),s(n,u)}),t(c),t(r),s(n,r)};o(_,e=>{d(D).length>0&&e(x)}),s(n,r)};o(tt,e=>{L.error?e(nt):L.loading&&!d(B)?e(rt,1):d(B)?e(at,-1):e(it,2)}),t(et),t(qe),t(K);var ot=g(K,2);{let e=m(()=>d(V)?`Remove ${d(V).label} from Skill Creator? Its files stay on disk; only the registration is deleted.`:``);se(ot,{title:`Remove workspace registration`,get description(){return d(e)},confirmLabel:`Remove`,get busy(){return d(U)},onConfirm:()=>void He(),get open(){return d(H)},set open(e){p(H,e,!0)}})}v(()=>i(Qe,`${d(W).skills??``} skills across ${d(W).providers??``} agent locations.`)),a(`click`,Y,()=>j(`create`,`I want to create a new skill. It should help me `)),a(`click`,X,()=>j(`manage`,`Audit my skill library: find duplicates, vague descriptions, and stale skills, then propose concrete fixes.`)),a(`click`,Z,()=>void E(`/repository`)),a(`click`,Q,()=>document.getElementById(`library-index`)?.scrollIntoView({behavior:`smooth`})),s(n,Ue),c()}u([`click`]);export{V as default};
@@ -1,5 +0,0 @@
1
- import{$ as e,At as t,B as n,C as r,Ct as i,D as a,F as o,H as s,I as c,L as l,M as u,N as d,O as f,P as p,Q as m,R as h,St as g,U as _,X as v,Y as y,a as b,bt as ee,dt as te,et as x,f as S,ft as C,gt as w,it as ne,jt as T,kt as re,l as ie,lt as E,mt as D,nt as ae,o as O,ot as k,pt as oe,q as A,rt as j,s as M,st as N,tt as se,ut as ce,wt as le,xt as ue,yt as de,z as P}from"./CmCJ0SKP.js";import"./xihTtKlq.js";import{t as fe}from"./BkEnd9_Z.js";import{i as F,n as pe,t as me}from"./DnPeA-9c.js";import{t as he}from"./BEPs9Z9s.js";import{t as ge}from"./Bs27XW8_.js";function _e(e){return typeof e==`function`}function ve(e){return typeof e==`object`&&!!e}var ye=[`string`,`number`,`bigint`,`boolean`];function be(e){return e==null||ye.includes(typeof e)?!0:Array.isArray(e)?e.every(e=>be(e)):typeof e==`object`&&Object.getPrototypeOf(e)===Object.prototype}var I=Symbol(`box`),xe=Symbol(`is-writable`);function L(e,t){let n=w(e);return t?{[I]:!0,[xe]:!0,get current(){return v(n)},set current(e){t(e)}}:{[I]:!0,get current(){return e()}}}function Se(e){return ve(e)&&I in e}function Ce(e){return Se(e)&&xe in e}function we(e){return Se(e)?e:_e(e)?L(e):De(e)}function Te(e){return Object.entries(e).reduce((e,[t,n])=>Se(n)?(Ce(n)?Object.defineProperty(e,t,{get(){return n.current},set(e){n.current=e}}):Object.defineProperty(e,t,{get(){return n.current}}),e):Object.assign(e,{[t]:n}),{})}function Ee(e){return Ce(e)?{[I]:!0,get current(){return e.current}}:e}function De(e){let t=D(ce(e));return{[I]:!0,[xe]:!0,get current(){return v(t)},set current(e){C(t,e,!0)}}}function R(e){let t=D(ce(e));return{[I]:!0,[xe]:!0,get current(){return v(t)},set current(e){C(t,e,!0)}}}R.from=we,R.with=L,R.flatten=Te,R.readonly=Ee,R.isBox=Se,R.isWritableBox=Ce;function Oe(...e){return function(t){for(let n of e)if(n){if(t.defaultPrevented)return;typeof n==`function`?n.call(this,t):n.current?.call(this,t)}}}var ke=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Ae=/\n/g,je=/^\s*/,Me=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Ne=/^:\s*/,Pe=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Fe=/^[;\s]*/,Ie=/^\s+|\s+$/g,Le=`
2
- `,Re=`/`,ze=`*`,z=``,Be=`comment`,Ve=`declaration`;function He(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var n=1,r=1;function i(e){var t=e.match(Ae);t&&(n+=t.length);var i=e.lastIndexOf(Le);r=~i?e.length-i:r+e.length}function a(){var e={line:n,column:r};return function(t){return t.position=new o(e),l(),t}}function o(e){this.start=e,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function s(i){var a=Error(t.source+`:`+n+`:`+r+`: `+i);if(a.reason=i,a.filename=t.source,a.line=n,a.column=r,a.source=e,!t.silent)throw a}function c(t){var n=t.exec(e);if(n){var r=n[0];return i(r),e=e.slice(r.length),n}}function l(){c(je)}function u(e){var t;for(e||=[];t=d();)t!==!1&&e.push(t);return e}function d(){var t=a();if(Re==e.charAt(0)&&ze==e.charAt(1)){for(var n=2;z!=e.charAt(n)&&(ze!=e.charAt(n)||Re!=e.charAt(n+1));)++n;if(n+=2,z===e.charAt(n-1))return s(`End of comment missing`);var o=e.slice(2,n-2);return r+=2,i(o),e=e.slice(n),r+=2,t({type:Be,comment:o})}}function f(){var e=a(),t=c(Me);if(t){if(d(),!c(Ne))return s(`property missing ':'`);var n=c(Pe),r=e({type:Ve,property:Ue(t[0].replace(ke,z)),value:n?Ue(n[0].replace(ke,z)):z});return c(Fe),r}}function p(){var e=[];u(e);for(var t;t=f();)t!==!1&&(e.push(t),u(e));return e}return l(),p()}function Ue(e){return e?e.replace(Ie,z):z}function We(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=He(e),i=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:a}=e;i?t(r,a,e):a&&(n||={},n[r]=a)}),n}var Ge=/\d/,Ke=[`-`,`_`,`/`,`.`];function qe(e=``){if(!Ge.test(e))return e!==e.toLowerCase()}function Je(e){let t=[],n=``,r,i;for(let a of e){let e=Ke.includes(a);if(e===!0){t.push(n),n=``,r=void 0;continue}let o=qe(a);if(i===!1){if(r===!1&&o===!0){t.push(n),n=a,r=o;continue}if(r===!0&&o===!1&&n.length>1){let e=n.at(-1);t.push(n.slice(0,Math.max(0,n.length-1))),n=e+a,r=o;continue}}n+=a,r=o,i=e}return t.push(n),t}function Ye(e){return e?Je(e).map(e=>Ze(e)).join(``):``}function Xe(e){return Qe(Ye(e||``))}function Ze(e){return e?e[0].toUpperCase()+e.slice(1):``}function Qe(e){return e?e[0].toLowerCase()+e.slice(1):``}function $e(e){if(!e)return{};let t={};function n(e,n){if(e.startsWith(`-moz-`)||e.startsWith(`-webkit-`)||e.startsWith(`-ms-`)||e.startsWith(`-o-`)){t[Ye(e)]=n;return}if(e.startsWith(`--`)){t[e]=n;return}t[Xe(e)]=n}return We(e,n),t}function B(...e){return(...t)=>{for(let n of e)typeof n==`function`&&n(...t)}}function et(e,t){let n=RegExp(e,`g`);return e=>{if(typeof e!=`string`)throw TypeError(`expected an argument of type string, but got ${typeof e}`);return e.match(n)?e.replace(n,t):e}}var tt=et(/[A-Z]/,e=>`-${e.toLowerCase()}`);function nt(e){if(!e||typeof e!=`object`||Array.isArray(e))throw TypeError(`expected an argument of type object, but got ${typeof e}`);return Object.keys(e).map(t=>`${tt(t)}: ${e[t]};`).join(`
3
- `)}function rt(e={}){return nt(e).replace(`
4
- `,` `)}var it=new Set(`onabort.onanimationcancel.onanimationend.onanimationiteration.onanimationstart.onauxclick.onbeforeinput.onbeforetoggle.onblur.oncancel.oncanplay.oncanplaythrough.onchange.onclick.onclose.oncompositionend.oncompositionstart.oncompositionupdate.oncontextlost.oncontextmenu.oncontextrestored.oncopy.oncuechange.oncut.ondblclick.ondrag.ondragend.ondragenter.ondragleave.ondragover.ondragstart.ondrop.ondurationchange.onemptied.onended.onerror.onfocus.onfocusin.onfocusout.onformdata.ongotpointercapture.oninput.oninvalid.onkeydown.onkeypress.onkeyup.onload.onloadeddata.onloadedmetadata.onloadstart.onlostpointercapture.onmousedown.onmouseenter.onmouseleave.onmousemove.onmouseout.onmouseover.onmouseup.onpaste.onpause.onplay.onplaying.onpointercancel.onpointerdown.onpointerenter.onpointerleave.onpointermove.onpointerout.onpointerover.onpointerup.onprogress.onratechange.onreset.onresize.onscroll.onscrollend.onsecuritypolicyviolation.onseeked.onseeking.onselect.onselectionchange.onselectstart.onslotchange.onstalled.onsubmit.onsuspend.ontimeupdate.ontoggle.ontouchcancel.ontouchend.ontouchmove.ontouchstart.ontransitioncancel.ontransitionend.ontransitionrun.ontransitionstart.onvolumechange.onwaiting.onwebkitanimationend.onwebkitanimationiteration.onwebkitanimationstart.onwebkittransitionend.onwheel`.split(`.`));function at(e){return it.has(e)}function V(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let i=e[n];if(i){for(let e of Object.keys(i)){let n=t[e],a=i[e],o=typeof n==`function`,s=typeof a==`function`;if(o&&typeof s&&at(e))t[e]=Oe(n,a);else if(o&&s)t[e]=B(n,a);else if(e===`class`){let i=be(n),o=be(a);i&&o?t[e]=r(n,a):i?t[e]=r(n):o&&(t[e]=r(a))}else if(e===`style`){let r=typeof n==`object`,i=typeof a==`object`,o=typeof n==`string`,s=typeof a==`string`;if(r&&i)t[e]={...n,...a};else if(r&&s){let r=$e(a);t[e]={...n,...r}}else if(o&&i)t[e]={...$e(n),...a};else if(o&&s){let r=$e(n),i=$e(a);t[e]={...r,...i}}else r?t[e]=n:i?t[e]=a:o?t[e]=n:s&&(t[e]=a)}else t[e]=a===void 0?n:a}for(let e of Object.getOwnPropertySymbols(i)){let n=t[e],r=i[e];t[e]=r===void 0?n:r}}}return typeof t.style==`object`&&(t.style=rt(t.style).replaceAll(`
5
- `,` `)),t.hidden===!1&&(t.hidden=void 0,delete t.hidden),t.disabled===!1&&(t.disabled=void 0,delete t.disabled),t}var ot=typeof window<`u`?window:void 0;typeof window<`u`&&window.document,typeof window<`u`&&window.navigator,typeof window<`u`&&window.location;function st(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}var ct=class extends Map{#e=new Map;#t=D(0);#n=D(0);#r=x||-1;constructor(e){if(super(),e){for(var[t,n]of e)super.set(t,n);this.#n.v=super.size}}#i(e){return x===this.#r?D(e):oe(e)}has(e){var t=this.#e,n=t.get(e);if(n===void 0){if(super.has(e))n=this.#i(0),t.set(e,n);else return v(this.#t),!1}return v(n),!0}forEach(e,t){this.#a(),super.forEach(e,t)}get(e){var t=this.#e,n=t.get(e);if(n===void 0){if(super.has(e))n=this.#i(0),t.set(e,n);else{v(this.#t);return}}return v(n),super.get(e)}getOrInsert(e,t){return super.has(e)||this.set(e,t),this.get(e)}getOrInsertComputed(e,t){return super.has(e)||this.set(e,t(e)),this.get(e)}set(e,t){var n=this.#e,r=n.get(e),i=super.get(e),a=super.set(e,t),o=this.#t;if(r===void 0)r=this.#i(0),n.set(e,r),C(this.#n,super.size),te(o);else if(i!==t){te(r);var s=o.reactions===null?null:new Set(o.reactions);(s===null||!r.reactions?.every(e=>s.has(e)))&&te(o)}return a}delete(e){var t=this.#e,n=t.get(e),r=super.delete(e);return n!==void 0&&(t.delete(e),C(n,-1)),r&&(C(this.#n,super.size),te(this.#t)),r}clear(){if(super.size!==0){super.clear();var e=this.#e;C(this.#n,0);for(var t of e.values())C(t,-1);te(this.#t),e.clear()}}#a(){v(this.#t);var e=this.#e;if(this.#n.v!==e.size){for(var t of super.keys())if(!e.has(t)){var n=this.#i(0);e.set(t,n)}}for([,n]of this.#e)v(n)}keys(){return v(this.#t),super.keys()}values(){return this.#a(),super.values()}entries(){return this.#a(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return v(this.#n),super.size}};new class{#e;#t;constructor(e={}){let{window:t=ot,document:n=t?.document}=e;t!==void 0&&(this.#e=n,this.#t=l(e=>{let n=A(t,`focusin`,e),r=A(t,`focusout`,e);return()=>{n(),r()}}))}get current(){return this.#t?.(),this.#e?st(this.#e):null}};function lt(e){return typeof e==`function`}var H=class{#e;#t;constructor(e){this.#e=e,this.#t=Symbol(e)}get key(){return this.#t}exists(){return ue(this.#t)}get(){let e=ee(this.#t);if(e===void 0)throw Error(`Context "${this.#e}" not found`);return e}getOr(e){let t=ee(this.#t);return t===void 0?e:t}set(e){return le(this.#t,e)}};function ut(e,t){switch(e){case`post`:j(t);break;case`pre`:ne(t)}}function dt(t,n,r,i={}){let{lazy:a=!1}=i,o=!a,s=Array.isArray(t)?[]:void 0;ut(n,()=>{let n=Array.isArray(t)?t.map(e=>e()):t();if(!o){o=!0,s=n;return}let i=e(()=>r(n,s));return s=n,i})}function U(e,t,n){dt(e,`post`,t,n)}function ft(e,t,n){dt(e,`pre`,t,n)}U.pre=ft;function pt(e){return lt(e)?e():e}var mt=class{#e={width:0,height:0};#t=!1;#n;#r;#i;#a=w(()=>(v(this.#s)?.(),this.getSize().width));#o=w(()=>(v(this.#s)?.(),this.getSize().height));#s=w(()=>{let e=pt(this.#r);if(e)return l(t=>{if(!this.#i)return;let n=new this.#i.ResizeObserver(e=>{this.#t=!0;for(let t of e){let e=this.#n.box===`content-box`?t.contentBoxSize:t.borderBoxSize,n=Array.isArray(e)?e:[e];this.#e.width=n.reduce((e,t)=>Math.max(e,t.inlineSize),0),this.#e.height=n.reduce((e,t)=>Math.max(e,t.blockSize),0)}t()});return n.observe(e),()=>{this.#t=!1,n.disconnect()}})});constructor(e,t={box:`border-box`}){this.#i=t.window??ot,this.#n=t,this.#r=e,this.#e={width:0,height:0}}calculateSize(){let e=pt(this.#r);if(!e||!this.#i)return;let t=e.offsetWidth,n=e.offsetHeight;if(this.#n.box===`border-box`)return{width:t,height:n};let r=this.#i.getComputedStyle(e),i=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),a=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom),o=parseFloat(r.borderLeftWidth)+parseFloat(r.borderRightWidth),s=parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth);return{width:t-i-o,height:n-a-s}}getSize(){return this.#t?this.#e:this.calculateSize()??this.#e}get current(){return v(this.#s)?.(),this.getSize()}get width(){return v(this.#a)}get height(){return v(this.#o)}};function W(e){j(()=>()=>{e()})}function ht(e,t){return setTimeout(t,e)}function G(e){m().then(e)}var gt=1,_t=9,vt=11;function yt(e){return ve(e)&&e.nodeType===gt&&typeof e.nodeName==`string`}function bt(e){return ve(e)&&e.nodeType===_t}function xt(e){return ve(e)&&e.constructor?.name===`VisualViewport`}function St(e){return ve(e)&&e.nodeType!==void 0}function Ct(e){return St(e)&&e.nodeType===vt&&`host`in e}function wt(e,t){if(!e||!t||!yt(e)||!yt(t))return!1;let n=t.getRootNode?.();if(e===t||e.contains(t))return!0;if(n&&Ct(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Tt(e){return bt(e)?e:xt(e)?e.document:e?.ownerDocument??document}function Et(e){return Ct(e)?Et(e.host):bt(e)?e.defaultView??window:yt(e)?e.ownerDocument?.defaultView??window:window}function Dt(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}var Ot=class{element;#e=w(()=>this.element.current?this.element.current.getRootNode()??document:document);get root(){return v(this.#e)}set root(e){C(this.#e,e)}constructor(e){this.element=typeof e==`function`?L(e):e}getDocument=()=>Tt(this.root);getWindow=()=>this.getDocument().defaultView??window;getActiveElement=()=>Dt(this.root);isActiveElement=e=>e===this.getActiveElement();getElementById(e){return this.root.getElementById(e)}querySelector=e=>this.root?this.root.querySelector(e):null;querySelectorAll=e=>this.root?this.root.querySelectorAll(e):[];setTimeout=(e,t)=>this.getWindow().setTimeout(e,t);clearTimeout=e=>this.getWindow().clearTimeout(e)};function K(t,n){return{[y()]:r=>Se(t)?(t.current=r,e(()=>n?.(r)),()=>{`isConnected`in r&&r.isConnected||(t.current=null,n?.(null))}):(t(r),e(()=>n?.(r)),()=>{`isConnected`in r&&r.isConnected||(t(null),n?.(null))})}}function kt(e){return e?`true`:`false`}function q(e){return e?``:void 0}function At(e){return e?`open`:`closed`}function jt(e){return e===`starting`?{"data-starting-style":``}:e===`ending`?{"data-ending-style":``}:{}}var Mt=class{#e;#t;attrs;constructor(e){this.#e=e.getVariant?e.getVariant():null,this.#t=this.#e?`data-${this.#e}-`:`data-${e.component}-`,this.getAttr=this.getAttr.bind(this),this.selector=this.selector.bind(this),this.attrs=Object.fromEntries(e.parts.map(e=>[e,this.getAttr(e)]))}getAttr(e,t){return t?`data-${t}-${e}`:`${this.#t}${e}`}selector(e,t){return`[${this.getAttr(e,t)}]`}};function Nt(e){let t=new Mt(e);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}var Pt=`ArrowDown`,Ft=`ArrowLeft`,It=`ArrowRight`,Lt=`ArrowUp`,Rt=`Enter`,zt=`Home`,Bt=`PageDown`,Vt=`PageUp`;function Ht(e){return window.getComputedStyle(e).getPropertyValue(`direction`)}var Ut=[Pt,Vt,zt],Wt=[Lt,Bt,`End`];[...Ut,...Wt];function Gt(e=`ltr`,t=`horizontal`){return{horizontal:e===`rtl`?Ft:It,vertical:Pt}[t]}function Kt(e=`ltr`,t=`horizontal`){return{horizontal:e===`rtl`?It:Ft,vertical:Lt}[t]}function qt(e=`ltr`,t=`horizontal`){return[`ltr`,`rtl`].includes(e)||(e=`ltr`),[`horizontal`,`vertical`].includes(t)||(t=`horizontal`),{nextKey:Gt(e,t),prevKey:Kt(e,t)}}var Jt=typeof document<`u`,Yt=Xt();function Xt(){return Jt&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function J(e){return e instanceof HTMLElement}function Zt(e){return e instanceof Element}function Qt(e){return e instanceof Element||e instanceof SVGElement}function $t(e){return e!==null}function en(e){return e instanceof HTMLInputElement&&`select`in e}var tn=class{#e;#t=R(null);constructor(e){this.#e=e}getCandidateNodes(){return this.#e.rootNode.current?this.#e.candidateSelector?Array.from(this.#e.rootNode.current.querySelectorAll(this.#e.candidateSelector)):this.#e.candidateAttr?Array.from(this.#e.rootNode.current.querySelectorAll(`[${this.#e.candidateAttr}]:not([data-disabled])`)):[]:[]}focusFirstCandidate(){let e=this.getCandidateNodes();e.length&&e[0]?.focus()}handleKeydown(e,t,n=!1){let r=this.#e.rootNode.current;if(!r||!e)return;let i=this.getCandidateNodes();if(!i.length)return;let a=i.indexOf(e),{nextKey:o,prevKey:s}=qt(Ht(r),this.#e.orientation.current),c=this.#e.loop.current,l={[o]:a+1,[s]:a-1,[zt]:0,End:i.length-1};if(n){let e=o===`ArrowDown`?It:Pt,t=s===`ArrowUp`?Ft:Lt;l[e]=a+1,l[t]=a-1}let u=l[t.key];if(u===void 0)return;t.preventDefault(),u<0&&c?u=i.length-1:u===i.length&&c&&(u=0);let d=i[u];if(d)return d.focus(),this.#t.current=d.id,this.#e.onCandidateFocus?.(d),d}getTabIndex(e){let t=this.getCandidateNodes(),n=this.#t.current!==null;return e&&!n&&t[0]===e?(this.#t.current=e.id,0):e?.id===this.#t.current?0:-1}setCurrentTabStopId(e){this.#t.current=e}focusCurrentTabStop(){let e=this.#t.current;if(!e)return;let t=this.#e.rootNode.current?.querySelector(`#${e}`);t&&J(t)&&t.focus()}},nn=class{#e;#t=null;#n=null;#r=0;constructor(e){this.#e=e,W(()=>this.#i())}#i(){this.#t!==null&&(window.cancelAnimationFrame(this.#t),this.#t=null),this.#n?.disconnect(),this.#n=null,this.#r++}run(e){this.#i();let t=this.#e.ref.current;if(!t)return;if(typeof t.getAnimations!=`function`){this.#a(e);return}let n=this.#r,r=()=>{n===this.#r&&this.#a(e)},i=()=>{if(n!==this.#r)return;let e=t.getAnimations();if(e.length===0){r();return}Promise.all(e.map(e=>e.finished)).then(()=>{r()}).catch(()=>{if(n===this.#r){if(t.getAnimations().some(e=>e.pending||e.playState!==`finished`)){i();return}r()}})},a=()=>{this.#t=window.requestAnimationFrame(()=>{this.#t=null,i()})};if(!this.#e.afterTick.current){a();return}this.#t=window.requestAnimationFrame(()=>{this.#t=null;let e=`data-starting-style`;if(!t.hasAttribute(e)){a();return}this.#n=new MutationObserver(()=>{n===this.#r&&(t.hasAttribute(e)||(this.#n?.disconnect(),this.#n=null,a()))}),this.#n.observe(t,{attributes:!0,attributeFilter:[e]})})}#a(e){let t=()=>{e()};this.#e.afterTick?G(t):t()}},rn=class{#e;#t;#n;#r=D(!1);#i=D(void 0);#a=!1;#o=null;constructor(e){this.#e=e,C(this.#r,e.open.current,!0),this.#t=e.enabled??!0,this.#n=new nn({ref:this.#e.ref,afterTick:this.#e.open}),W(()=>this.#s()),U(()=>this.#e.open.current,e=>{if(!this.#a){this.#a=!0;return}if(this.#s(),!e&&this.#e.shouldSkipExitAnimation?.()){C(this.#r,!1),C(this.#i,void 0),this.#e.onComplete?.();return}if(e&&C(this.#r,!0),C(this.#i,e?`starting`:`ending`,!0),e&&(this.#o=window.requestAnimationFrame(()=>{this.#o=null,this.#e.open.current&&C(this.#i,void 0)})),!this.#t){e||C(this.#r,!1),C(this.#i,void 0),this.#e.onComplete?.();return}this.#n.run(()=>{e===this.#e.open.current&&(this.#e.open.current||C(this.#r,!1),C(this.#i,void 0),this.#e.onComplete?.())})})}get shouldRender(){return v(this.#r)}get transitionStatus(){return v(this.#i)}#s(){this.#o!==null&&(window.cancelAnimationFrame(this.#o),this.#o=null)}};function Y(){}function X(e,t){return t===void 0?`bits-${e}`:`bits-${e}-${t}`}var an=Nt({component:`dialog`,parts:[`content`,`trigger`,`overlay`,`title`,`description`,`close`,`cancel`,`action`]}),Z=new H(`Dialog.Root | AlertDialog.Root`),on=class e{static create(t){let n=Z.getOr(null);return Z.set(new e(t,n))}opts;#e=D(null);get triggerNode(){return v(this.#e)}set triggerNode(e){C(this.#e,e,!0)}#t=D(null);get contentNode(){return v(this.#t)}set contentNode(e){C(this.#t,e,!0)}#n=D(null);get overlayNode(){return v(this.#n)}set overlayNode(e){C(this.#n,e,!0)}#r=D(null);get descriptionNode(){return v(this.#r)}set descriptionNode(e){C(this.#r,e,!0)}#i=D(void 0);get contentId(){return v(this.#i)}set contentId(e){C(this.#i,e,!0)}#a=D(void 0);get titleId(){return v(this.#a)}set titleId(e){C(this.#a,e,!0)}#o=D(void 0);get triggerId(){return v(this.#o)}set triggerId(e){C(this.#o,e,!0)}#s=D(void 0);get descriptionId(){return v(this.#s)}set descriptionId(e){C(this.#s,e,!0)}#c=D(null);get cancelNode(){return v(this.#c)}set cancelNode(e){C(this.#c,e,!0)}#l=D(0);get nestedOpenCount(){return v(this.#l)}set nestedOpenCount(e){C(this.#l,e,!0)}depth;parent;contentPresence;overlayPresence;constructor(e,t){this.opts=e,this.parent=t,this.depth=t?t.depth+1:0,this.handleOpen=this.handleOpen.bind(this),this.handleClose=this.handleClose.bind(this),this.contentPresence=new rn({ref:L(()=>this.contentNode),open:this.opts.open,enabled:!0,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new rn({ref:L(()=>this.overlayNode),open:this.opts.open,enabled:!0}),U(()=>this.opts.open.current,e=>{this.parent&&(e?this.parent.incrementNested():this.parent.decrementNested())},{lazy:!0}),W(()=>{this.opts.open.current&&this.parent?.decrementNested()})}handleOpen(){this.opts.open.current||(this.opts.open.current=!0)}handleClose(){this.opts.open.current&&(this.opts.open.current=!1)}getBitsAttr=e=>an.getAttr(e,this.opts.variant.current);incrementNested(){this.nestedOpenCount++,this.parent?.incrementNested()}decrementNested(){this.nestedOpenCount!==0&&(this.nestedOpenCount--,this.parent?.decrementNested())}#u=w(()=>({"data-state":At(this.opts.open.current)}));get sharedProps(){return v(this.#u)}set sharedProps(e){C(this.#u,e)}},sn=class e{static create(t){return new e(t,Z.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=K(this.opts.ref),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(e){this.opts.disabled.current||e.button>0||this.root.handleClose()}onkeydown(e){this.opts.disabled.current||(e.key===` `||e.key===`Enter`)&&(e.preventDefault(),this.root.handleClose())}#e=w(()=>({id:this.opts.id.current,[this.root.getBitsAttr(this.opts.variant.current)]:``,onclick:this.onclick,onkeydown:this.onkeydown,disabled:this.opts.disabled.current?!0:void 0,tabindex:0,...this.root.sharedProps,...this.attachment}));get props(){return v(this.#e)}set props(e){C(this.#e,e)}},cn=class e{static create(t){return new e(t,Z.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.root.titleId=this.opts.id.current,this.attachment=K(this.opts.ref),U.pre(()=>this.opts.id.current,e=>{this.root.titleId=e})}#e=w(()=>({id:this.opts.id.current,role:`heading`,"aria-level":this.opts.level.current,[this.root.getBitsAttr(`title`)]:``,...this.root.sharedProps,...this.attachment}));get props(){return v(this.#e)}set props(e){C(this.#e,e)}},ln=class e{static create(t){return new e(t,Z.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.root.descriptionId=this.opts.id.current,this.attachment=K(this.opts.ref,e=>{this.root.descriptionNode=e}),U.pre(()=>this.opts.id.current,e=>{this.root.descriptionId=e})}#e=w(()=>({id:this.opts.id.current,[this.root.getBitsAttr(`description`)]:``,...this.root.sharedProps,...this.attachment}));get props(){return v(this.#e)}set props(e){C(this.#e,e)}},un=class e{static create(t){return new e(t,Z.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=K(this.opts.ref,e=>{this.root.contentNode=e,this.root.contentId=e?.id})}#e=w(()=>({open:this.root.opts.open.current}));get snippetProps(){return v(this.#e)}set snippetProps(e){C(this.#e,e)}#t=w(()=>({id:this.opts.id.current,role:this.root.opts.variant.current===`alert-dialog`?`alertdialog`:`dialog`,"aria-modal":`true`,"aria-describedby":this.root.descriptionId,"aria-labelledby":this.root.titleId,[this.root.getBitsAttr(`content`)]:``,style:{pointerEvents:`auto`,outline:this.root.opts.variant.current===`alert-dialog`?`none`:void 0,"--bits-dialog-depth":this.root.depth,"--bits-dialog-nested-count":this.root.nestedOpenCount,contain:`layout style`},tabindex:this.root.opts.variant.current===`alert-dialog`?-1:void 0,"data-nested-open":q(this.root.nestedOpenCount>0),"data-nested":q(this.root.parent!==null),...jt(this.root.contentPresence.transitionStatus),...this.root.sharedProps,...this.attachment}));get props(){return v(this.#t)}set props(e){C(this.#t,e)}get shouldRender(){return this.root.contentPresence.shouldRender}},dn=class e{static create(t){return new e(t,Z.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=K(this.opts.ref,e=>this.root.overlayNode=e)}#e=w(()=>({open:this.root.opts.open.current}));get snippetProps(){return v(this.#e)}set snippetProps(e){C(this.#e,e)}#t=w(()=>({id:this.opts.id.current,[this.root.getBitsAttr(`overlay`)]:``,style:{pointerEvents:`auto`,"--bits-dialog-depth":this.root.depth,"--bits-dialog-nested-count":this.root.nestedOpenCount},"data-nested-open":q(this.root.nestedOpenCount>0),"data-nested":q(this.root.parent!==null),...jt(this.root.overlayPresence.transitionStatus),...this.root.sharedProps,...this.attachment}));get props(){return v(this.#t)}set props(e){C(this.#t,e)}get shouldRender(){return this.root.overlayPresence.shouldRender}},fn=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`child`,`children`,`level`]),pn=n(`<div><!></div>`);function mn(e,n){let r=s();i(n,!0);let a=b(n,`id`,19,()=>X(r)),o=b(n,`ref`,15,null),c=b(n,`level`,3,2),l=O(n,fn),u=cn.create({id:L(()=>a()),level:L(()=>c()),ref:L(()=>o(),e=>o(e))}),p=w(()=>V(l,u.props));var m=P(),_=N(m),y=e=>{var t=P(),r=N(t);f(r,()=>n.child,()=>({props:v(p)})),h(e,t)},ee=e=>{var r=pn();S(r,()=>({...v(p)}));var i=k(r);f(i,()=>n.children??T),t(r),h(e,r)};d(_,e=>{n.child?e(y):e(ee,-1)}),h(e,m),g()}function hn(e,t){var n=P(),r=N(n);u(r,()=>t.children,e=>{var n=P(),r=N(n);f(r,()=>t.children??T),h(e,n)}),h(e,n)}var gn=new H(`BitsConfig`);function _n(){let e=new vn(null,{});return gn.getOr(e).opts}var vn=class{opts;constructor(e,t){let n=yn(e,t);this.opts={defaultPortalTo:n(e=>e.defaultPortalTo),defaultLocale:n(e=>e.defaultLocale)}}};function yn(e,t){return n=>L(()=>{let r=n(t)?.current;if(r!==void 0)return r;if(e!==null)return n(e.opts)?.current})}function bn(e,t){return n=>{let r=_n();return L(()=>{let i=n();if(i!==void 0)return i;let a=e(r).current;return a===void 0?t:a})}}var xn=bn(e=>e.defaultPortalTo,`body`);function Sn(e,t){i(t,!0);let n=xn(()=>t.to),r=de(),a=w(o);function o(){if(!Jt||t.disabled)return null;let e=null;return e=typeof n.current==`string`?document.querySelector(n.current):n.current,e}let s;function l(){s&&=(c(s),null)}U([()=>v(a),()=>t.disabled],([e,n])=>{if(!e||n){l();return}return s=p(hn,{target:e,props:{children:t.children},context:r}),()=>{l()}});var u=P(),m=N(u),_=e=>{var n=P(),r=N(n);f(r,()=>t.children??T),h(e,n)};d(m,e=>{t.disabled&&e(_)}),h(e,u),g()}var Cn=class{eventName;options;constructor(e,t={bubbles:!0,cancelable:!0}){this.eventName=e,this.options=t}createEvent(e){return new CustomEvent(this.eventName,{...this.options,detail:e})}dispatch(e,t){let n=this.createEvent(t);return e.dispatchEvent(n),n}listen(e,t,n){return A(e,this.eventName,e=>{t(e)},n)}};function wn(e,t=500){let n=null,r=(...r)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...r)},t)};return r.destroy=()=>{n!==null&&(clearTimeout(n),n=null)},r}function Tn(e,t){return e===t||e.contains(t)}function En(e){return e?.ownerDocument??document}function Dn(e){if(!e)return null;for(let t of e.childNodes)if(t.nodeType!==Node.COMMENT_NODE)return t;return null}function On(e,t){let{clientX:n,clientY:r}=e,i=t.getBoundingClientRect();return n<i.left||n>i.right||r<i.top||r>i.bottom}var kn=[Rt,` `],An=[Pt,Vt,zt],jn=[Lt,Bt,`End`],Mn=[...An,...jn];[...kn],[...kn];function Q(e){return e.pointerType===`mouse`}function Nn(e,{select:t=!1}={}){if(!e||!e.focus)return;let n=Tt(e);if(n.activeElement===e)return;let r=n.activeElement;e.focus({preventScroll:!0}),e!==r&&en(e)&&t&&e.select()}function Pn(e,{select:t=!1}={},n){let r=n();for(let i of e)if(Nn(i,{select:t}),n()!==r)return!0}var Fn=D(!1),In=class e{static _refs=0;static _cleanup;constructor(){j(()=>(e._refs===0&&(e._cleanup=se(()=>{let e=[],t=e=>{C(Fn,!1)};return e.push(A(document,`pointerdown`,t,{capture:!0}),A(document,`pointermove`,t,{capture:!0}),A(document,`keydown`,e=>{C(Fn,!0)},{capture:!0})),B(...e)})),e._refs++,()=>{e._refs--,e._refs===0&&(C(Fn,!1),e._cleanup?.())}))}get current(){return v(Fn)}set current(e){C(Fn,e,!0)}},Ln=[`input:not([inert]):not([inert] *)`,`select:not([inert]):not([inert] *)`,`textarea:not([inert]):not([inert] *)`,`a[href]:not([inert]):not([inert] *)`,`area[href]:not([inert]):not([inert] *)`,`button:not([inert]):not([inert] *)`,`[tabindex]:not(slot):not([inert]):not([inert] *)`,`audio[controls]:not([inert]):not([inert] *)`,`video[controls]:not([inert]):not([inert] *)`,`[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)`,`details>summary:first-of-type:not([inert]):not([inert] *)`,`details:not([inert]):not([inert] *)`],Rn=Ln.join(`,`),zn=typeof Element>`u`,$=zn?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Bn=!zn&&Element.prototype.getRootNode?function(e){return e?.getRootNode?.call(e)}:function(e){return e?.ownerDocument},Vn=function(e,t){t===void 0&&(t=!0);var n=e?.getAttribute?.call(e,`inert`);return n===``||n===`true`||t&&e&&(typeof e.closest==`function`?e.closest(`[inert]`):Vn(e.parentNode))},Hn=function(e){var t=e?.getAttribute?.call(e,`contenteditable`);return t===``||t===`true`},Un=function(e,t,n){if(Vn(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(Rn));return t&&$.call(e,Rn)&&r.unshift(e),r=r.filter(n),r},Wn=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var a=i.shift();if(!Vn(a,!1)){if(a.tagName===`SLOT`){var o=a.assignedElements(),s=Wn(o.length?o:a.children,!0,n);n.flatten?r.push.apply(r,s):r.push({scopeParent:a,candidates:s})}else{$.call(a,Rn)&&n.filter(a)&&(t||!e.includes(a))&&r.push(a);var c=a.shadowRoot||typeof n.getShadowRoot==`function`&&n.getShadowRoot(a),l=!Vn(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(c&&l){var u=Wn(c===!0?a.children:c.children,!0,n);n.flatten?r.push.apply(r,u):r.push({scopeParent:a,candidates:u})}else i.unshift.apply(i,a.children)}}}return r},Gn=function(e){return!isNaN(parseInt(e.getAttribute(`tabindex`),10))},Kn=function(e){if(!e)throw Error(`No node provided`);return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Hn(e))&&!Gn(e)?0:e.tabIndex},qn=function(e,t){var n=Kn(e);return n<0&&t&&!Gn(e)?0:n},Jn=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Yn=function(e){return e.tagName===`INPUT`},Xn=function(e){return Yn(e)&&e.type===`hidden`},Zn=function(e){return e.tagName===`DETAILS`&&Array.prototype.slice.apply(e.children).some(function(e){return e.tagName===`SUMMARY`})},Qn=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},$n=function(e){if(!e.name)return!0;var t=e.form||Bn(e),n=function(e){return t.querySelectorAll(`input[type="radio"][name="`+e+`"]`)},r;if(typeof window<`u`&&window.CSS!==void 0&&typeof window.CSS.escape==`function`)r=n(window.CSS.escape(e.name));else try{r=n(e.name)}catch(e){return console.error(`Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s`,e.message),!1}var i=Qn(r,e.form);return!i||i===e},er=function(e){return Yn(e)&&e.type===`radio`},tr=function(e){return er(e)&&!$n(e)},nr=function(e){var t=e&&Bn(e),n=t?.host,r=!1;if(t&&t!==e){var i,a,o;for(r=!!((i=n)!=null&&(a=i.ownerDocument)!=null&&a.contains(n)||e!=null&&(o=e.ownerDocument)!=null&&o.contains(e));!r&&n;){var s,c;t=Bn(n),n=t?.host,r=!!((s=n)!=null&&(c=s.ownerDocument)!=null&&c.contains(n))}}return r},rr=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},ir=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if(n===`full-native`&&`checkVisibility`in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});var i=getComputedStyle(e).visibility;if(i===`hidden`||i===`collapse`)return!0;var a=$.call(e,`details>summary:first-of-type`)?e.parentElement:e;if($.call(a,`details:not([open]) *`))return!0;if(!n||n===`full`||n===`full-native`||n===`legacy-full`){if(typeof r==`function`){for(var o=e;e;){var s=e.parentElement,c=Bn(e);if(s&&!s.shadowRoot&&r(s)===!0)return rr(e);e=e.assignedSlot?e.assignedSlot:!s&&c!==e.ownerDocument?c.host:s}e=o}if(nr(e))return!e.getClientRects().length;if(n!==`legacy-full`)return!0}else if(n===`non-zero-area`)return rr(e);return!1},ar=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName===`FIELDSET`&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if(r.tagName===`LEGEND`)return $.call(t,`fieldset[disabled] *`)?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},or=function(e,t){return!(t.disabled||Xn(t)||ir(t,e)||Zn(t)||ar(t))},sr=function(e,t){return!(tr(t)||Kn(t)<0||!or(e,t))},cr=function(e){var t=parseInt(e.getAttribute(`tabindex`),10);return!!(isNaN(t)||t>=0)},lr=function(e){var t=[],n=[];return e.forEach(function(e,r){var i=!!e.scopeParent,a=i?e.scopeParent:e,o=qn(a,i),s=i?lr(e.candidates):a;o===0?i?t.push.apply(t,s):t.push(a):n.push({documentOrder:r,tabIndex:o,item:e,isScope:i,content:s})}),n.sort(Jn).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},ur=function(e,t){return t||={},lr(t.getShadowRoot?Wn([e],t.includeContainer,{filter:sr.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:cr}):Un(e,t.includeContainer,sr.bind(null,t)))},dr=function(e,t){return t||={},t.getShadowRoot?Wn([e],t.includeContainer,{filter:or.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):Un(e,t.includeContainer,or.bind(null,t))},fr=function(e,t){if(t||={},!e)throw Error(`No node provided`);return $.call(e,Rn)!==!1&&sr(t,e)},pr=Ln.concat(`iframe:not([inert]):not([inert] *)`).join(`,`),mr=function(e,t){if(t||={},!e)throw Error(`No node provided`);return $.call(e,pr)!==!1&&or(t,e)};function hr(){return{getShadowRoot:!0,displayCheck:typeof ResizeObserver==`function`&&ResizeObserver.toString().includes(`[native code]`)?`full`:`none`}}function gr(e,t){if(!fr(e,hr()))return _r(e,t);let n=Tt(e),r=ur(n.body,hr());t===`prev`&&r.reverse();let i=r.indexOf(e);return i===-1?n.body:r.slice(i+1)[0]}function _r(e,t){let n=Tt(e);if(!mr(e,hr()))return n.body;let r=dr(n.body,hr());t===`prev`&&r.reverse();let i=r.indexOf(e);return i===-1?n.body:r.slice(i+1).find(e=>fr(e,hr()))??n.body}function vr(e,t,n){let r=t.toLowerCase();if(r.endsWith(` `)){let i=r.slice(0,-1);if(e.filter(e=>e.toLowerCase().startsWith(i)).length<=1)return vr(e,i,n);let a=n?.toLowerCase();if(a&&a.startsWith(i)&&a.charAt(i.length)===` `&&t.trim()===i)return n;let o=e.filter(e=>e.toLowerCase().startsWith(r));if(o.length>0){let t=n?e.indexOf(n):-1;return yr(o,Math.max(t,0)).find(e=>e!==n)||n}}let i=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,a=i.toLowerCase(),o=n?e.indexOf(n):-1,s=yr(e,Math.max(o,0));i.length===1&&(s=s.filter(e=>e!==n));let c=s.find(e=>e?.toLowerCase().startsWith(a));return c===n?void 0:c}function yr(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var br={afterMs:1e4,onChange:Y};function xr(e,t){let{afterMs:n,onChange:r,getWindow:i}={...br,...t},a=null,o=D(ce(e));function s(){return i().setTimeout(()=>{C(o,e,!0),r?.(e)},n)}return j(()=>()=>{a&&i().clearTimeout(a)}),L(()=>v(o),e=>{C(o,e,!0),r?.(e),a&&i().clearTimeout(a),a=s()})}var Sr=class{#e;#t;#n=w(()=>this.#e.onMatch?this.#e.onMatch:e=>e.focus());#r=w(()=>this.#e.getCurrentItem?this.#e.getCurrentItem:this.#e.getActiveElement);constructor(e){this.#e=e,this.#t=xr(``,{afterMs:1e3,getWindow:e.getWindow}),this.handleTypeaheadSearch=this.handleTypeaheadSearch.bind(this),this.resetTypeahead=this.resetTypeahead.bind(this)}handleTypeaheadSearch(e,t){if(!t.length)return;this.#t.current=this.#t.current+e;let n=v(this.#r)(),r=t.find(e=>e===n)?.textContent?.trim()??``,i=vr(t.map(e=>e.textContent?.trim()??``),this.#t.current,r),a=t.find(e=>e.textContent?.trim()===i);return a&&v(this.#n)(a),a}resetTypeahead(){this.#t.current=``}get search(){return this.#t.current}},Cr=`data-context-menu-trigger`,wr=`data-context-menu-content`,Tr=new H(`Menu.Root`),Er=new H(`Menu.Root | Menu.Sub`),Dr=new H(`Menu.Content`),Or=new H(`Menu.Group | Menu.RadioGroup`),kr=new H(`Menu.RadioGroup`),Ar=new H(`Menu.CheckboxGroup`),jr=new Cn(`bitsmenuopen`,{bubbles:!1,cancelable:!0}),Mr=Nt({component:`menu`,parts:[`trigger`,`content`,`sub-trigger`,`item`,`group`,`group-heading`,`checkbox-group`,`checkbox-item`,`radio-group`,`radio-item`,`separator`,`sub-content`,`arrow`]}),Nr=class{#e;#t=null;#n=null;#r=!1;#i=null;#a=null;#o=null;#s=null;constructor(e){this.#e=e,U([e.triggerNode,e.contentNode,e.enabled],([e,t,n])=>{if(this.#_(),!e||!t||!n)return;let r=e=>{Q(e)&&(this.#s={x:e.clientX,y:e.clientY},this.#r||this.#d(e,`content`))},i=e=>{Q(e)&&this.#f(e,`content`)},a=e=>{Q(e)&&(this.#r||this.#d(e,`trigger`))},o=e=>{if(Q(e)){if(Zt(e.relatedTarget)){let n=this.#e.subContentSelector(),r=e.relatedTarget.closest(n);if(r&&r!==t&&r.id&&t.querySelector(`[aria-controls="${r.id}"]`))return}this.#f(e,`trigger`)}},s=e=>{Q(e)&&this.#m()},c=e=>{Q(e)&&this.#m()};return e.addEventListener(`pointermove`,r),e.addEventListener(`pointerleave`,i),e.addEventListener(`pointerenter`,s),t.addEventListener(`pointermove`,a),t.addEventListener(`pointerleave`,o),t.addEventListener(`pointerenter`,c),()=>{e.removeEventListener(`pointermove`,r),e.removeEventListener(`pointerleave`,i),e.removeEventListener(`pointerenter`,s),t.removeEventListener(`pointermove`,a),t.removeEventListener(`pointerleave`,o),t.removeEventListener(`pointerenter`,c),this.#_()}}),W(()=>{this.#_()})}#c(){let e=this.#e.parentContentNode();return e?e.getBoundingClientRect():this.#e.triggerNode()?.getBoundingClientRect()??null}#l(e,t){let n=this.#e.triggerNode(),r=this.#e.contentNode();if(!n||!r)return null;let i=n.getBoundingClientRect(),a=r.getBoundingClientRect(),o=Lr(i,a),s,c,l;return t===`content`?(s=this.#r?this.#a??e:e,c=a):(s=this.#s??e,c=this.#c()??i,l=a),this.#a=s,{corridor:Rr(i,a,o),intent:zr(s,c,o,t,l),targetRect:c,side:o}}#u(e,t,n){return Pr(e,t)||Pr(e,n)}#d(e,t){let n={x:e.clientX,y:e.clientY};this.#l(n,t)&&(this.#i=t,this.#o=n)}#f(e,t){if(!this.#e.enabled())return;let n=this.#e.triggerNode(),r=this.#e.contentNode();if(!n||!r)return;let i=e.relatedTarget;if(Zt(i)&&(t===`content`&&r.contains(i)||t===`trigger`&&n.contains(i)))return;let a={x:e.clientX,y:e.clientY},o=this.#l(a,t);if(o){if(!Fr(a,o.targetRect)&&!this.#u(a,o.corridor,o.intent)){this.#w();return}this.#r=!0,this.#i=t,this.#o=a,this.#e.setIsPointerInTransit(!0),this.#b(),this.#S()}}#p=null;#m(){if(!this.#r)return;let e=this.#i===`trigger`;this.#x(),this.#C(),this.#r=!1,this.#w(),e?(this.#h(),this.#p=setTimeout(()=>{this.#p=null,this.#e.setIsPointerInTransit(!1)},100)):this.#e.setIsPointerInTransit(!1)}#h(){this.#p!==null&&(clearTimeout(this.#p),this.#p=null)}#g(){let e=this.#o;this.#x(),this.#C(),this.#h(),this.#r=!1,this.#e.setIsPointerInTransit(!1),this.#w(),this.#e.onIntentExit(e)}#_(){this.#x(),this.#C(),this.#h(),this.#r&&this.#e.setIsPointerInTransit(!1),this.#r=!1,this.#i=null,this.#a=null,this.#o=null,this.#s=null}#v(e){let t=this.#e.contentNode();if(!t)return!1;let n=t.ownerDocument.elementFromPoint(e.x,e.y);if(!n)return!1;let r=this.#e.subContentSelector(),i=n.closest(r);return!i||i===t?!1:i.id?!!t.querySelector(`[aria-controls="${i.id}"]`):!1}#y=e=>{if(!this.#r||!this.#i||!Q(e))return;let t=this.#e.triggerNode(),n=this.#e.contentNode();if(!t||!n){this.#g();return}this.#C();let r={x:e.clientX,y:e.clientY};this.#o=r;let i=t.getBoundingClientRect(),a=n.getBoundingClientRect();if(this.#i===`content`&&Fr(r,a)){this.#m();return}if(this.#i===`trigger`&&Ir(r,i,4)){this.#m();return}if(this.#v(r)){this.#S();return}let o=this.#l(r,this.#i);if(!o){this.#g();return}if(this.#u(r,o.corridor,o.intent)){this.#S();return}this.#g()};#b(){if(this.#t)return;let e=Tt(this.#e.triggerNode()??this.#e.contentNode());e&&(e.addEventListener(`pointermove`,this.#y,!0),this.#t=()=>{e.removeEventListener(`pointermove`,this.#y,!0),this.#t=null})}#x(){this.#t?.()}#S(){this.#C(),this.#n=setTimeout(()=>{this.#n=null,this.#r&&this.#g()},500)}#C(){this.#n!==null&&(clearTimeout(this.#n),this.#n=null)}#w(){this.#i=null,this.#a=null,this.#o=null}};function Pr(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e].x,s=t[e].y,c=t[a].x,l=t[a].y;s>r!=l>r&&n<(c-o)*(r-s)/(l-s)+o&&(i=!i)}return i}function Fr(e,t){return e.x>=t.left&&e.x<=t.right&&e.y>=t.top&&e.y<=t.bottom}function Ir(e,t,n){return e.x>=t.left+n&&e.x<=t.right-n&&e.y>=t.top+n&&e.y<=t.bottom-n}function Lr(e,t){let n=e.left+e.width/2,r=e.top+e.height/2,i=t.left+t.width/2,a=t.top+t.height/2,o=i-n,s=a-r;return Math.abs(o)>Math.abs(s)?o>0?`right`:`left`:s>0?`bottom`:`top`}function Rr(e,t,n){switch(n){case`top`:return[{x:Math.min(e.left,t.left)-2,y:e.top},{x:Math.min(e.left,t.left)-2,y:t.bottom},{x:Math.max(e.right,t.right)+2,y:t.bottom},{x:Math.max(e.right,t.right)+2,y:e.top}];case`bottom`:return[{x:Math.min(e.left,t.left)-2,y:e.bottom},{x:Math.min(e.left,t.left)-2,y:t.top},{x:Math.max(e.right,t.right)+2,y:t.top},{x:Math.max(e.right,t.right)+2,y:e.bottom}];case`left`:return[{x:e.left,y:Math.min(e.top,t.top)-2},{x:t.right,y:Math.min(e.top,t.top)-2},{x:t.right,y:Math.max(e.bottom,t.bottom)+2},{x:e.left,y:Math.max(e.bottom,t.bottom)+2}];case`right`:return[{x:e.right,y:Math.min(e.top,t.top)-2},{x:t.left,y:Math.min(e.top,t.top)-2},{x:t.left,y:Math.max(e.bottom,t.bottom)+2},{x:e.right,y:Math.max(e.bottom,t.bottom)+2}]}}function zr(e,t,n,r,i){let a=r===`trigger`?Br(n):n,o=i?Math.min(t.top,i.top)-8:t.top-8,s=i?Math.max(t.bottom,i.bottom)+8:t.bottom+8,c=i?Math.min(t.left,i.left)-8:t.left-8,l=i?Math.max(t.right,i.right)+8:t.right+8;switch(a){case`right`:return[e,{x:t.left,y:o},{x:t.left,y:s}];case`left`:return[e,{x:t.right,y:o},{x:t.right,y:s}];case`bottom`:return[e,{x:c,y:t.top},{x:l,y:t.top}];case`top`:return[e,{x:c,y:t.bottom},{x:l,y:t.bottom}]}}function Br(e){switch(e){case`top`:return`bottom`;case`bottom`:return`top`;case`left`:return`right`;case`right`:return`left`}}var Vr=class e{static create(t){let n=new e(t);return Tr.set(n)}opts;isUsingKeyboard=new In;#e=D(!1);get ignoreCloseAutoFocus(){return v(this.#e)}set ignoreCloseAutoFocus(e){C(this.#e,e,!0)}#t=D(!1);get isPointerInTransit(){return v(this.#t)}set isPointerInTransit(e){C(this.#t,e,!0)}constructor(e){this.opts=e}getBitsAttr=e=>Mr.getAttr(e,this.opts.variant.current)},Hr=class e{static create(t,n){return Er.set(new e(t,n,null))}opts;root;parentMenu;contentId=L(()=>``);#e=D(null);get contentNode(){return v(this.#e)}set contentNode(e){C(this.#e,e,!0)}contentPresence;#t=D(null);get triggerNode(){return v(this.#t)}set triggerNode(e){C(this.#t,e,!0)}constructor(e,t,n){this.opts=e,this.root=t,this.parentMenu=n,this.contentPresence=new rn({ref:L(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)},shouldSkipExitAnimation:()=>this.root.opts.variant.current!==`menubar`||this.parentMenu!==null?!1:this.root.opts.shouldSkipExitAnimation?.()??!1}),n&&U(()=>n.opts.open.current,()=>{n.opts.open.current||(this.opts.open.current=!1)})}toggleOpen(){this.opts.open.current=!this.opts.open.current}onOpen(){this.opts.open.current=!0}onClose(){this.opts.open.current=!1}},Ur=class e{static create(t){return Dr.set(new e(t,Er.get()))}opts;parentMenu;rovingFocusGroup;domContext;attachment;#e=D(``);get search(){return v(this.#e)}set search(e){C(this.#e,e,!0)}#t=0;#n;#r=D(!1);get mounted(){return v(this.#r)}set mounted(e){C(this.#r,e,!0)}#i;constructor(e,t){this.opts=e,this.parentMenu=t,this.domContext=new Ot(e.ref),this.attachment=K(this.opts.ref,e=>{this.parentMenu.contentNode!==e&&(this.parentMenu.contentNode=e)}),t.contentId=e.id,this.#i=e.isSub??!1,this.onkeydown=this.onkeydown.bind(this),this.onblur=this.onblur.bind(this),this.onfocus=this.onfocus.bind(this),this.handleInteractOutside=this.handleInteractOutside.bind(this),new Nr({contentNode:()=>this.parentMenu.contentNode,triggerNode:()=>this.parentMenu.triggerNode,parentContentNode:()=>this.parentMenu.parentMenu?.contentNode??null,subContentSelector:()=>`[${this.parentMenu.root.getBitsAttr(`sub-content`)}]`,enabled:()=>this.parentMenu.opts.open.current&&!!this.parentMenu.triggerNode?.hasAttribute(this.parentMenu.root.getBitsAttr(`sub-trigger`)),onIntentExit:e=>{this.parentMenu.opts.open.current=!1,this.#s(e)},setIsPointerInTransit:e=>{this.parentMenu.root.isPointerInTransit=e}}),this.#n=new Sr({getActiveElement:()=>this.domContext.getActiveElement(),getWindow:()=>this.domContext.getWindow()}).handleTypeaheadSearch,this.rovingFocusGroup=new tn({rootNode:L(()=>this.parentMenu.contentNode),candidateAttr:this.parentMenu.root.getBitsAttr(`item`),loop:this.opts.loop,orientation:L(()=>`vertical`)}),U(()=>this.parentMenu.contentNode,e=>e?jr.listen(e,()=>{G(()=>{this.parentMenu.root.isUsingKeyboard.current&&this.rovingFocusGroup.focusFirstCandidate()})}):void 0),j(()=>{this.parentMenu.opts.open.current||this.domContext.getWindow().clearTimeout(this.#t)})}#a(){let e=this.parentMenu.contentNode;return e?Array.from(e.querySelectorAll(`[${this.parentMenu.root.getBitsAttr(`item`)}]:not([data-disabled])`)):[]}#o(){return this.parentMenu.root.isPointerInTransit}#s(e){if(!e)return;let t=this.parentMenu.parentMenu?.contentNode;if(!t)return;let n=this.domContext.getDocument().elementFromPoint(e.x,e.y);if(!Zt(n))return;let r=n.closest(`[${this.parentMenu.root.getBitsAttr(`sub-trigger`)}]`);r&&t.contains(r)&&r!==this.parentMenu.triggerNode&&r.dispatchEvent(new PointerEvent(`pointermove`,{bubbles:!0,cancelable:!0,pointerType:`mouse`,clientX:e.x,clientY:e.y}))}onCloseAutoFocus=e=>{if(this.opts.onCloseAutoFocus.current?.(e),!(e.defaultPrevented||this.#i)){if(this.parentMenu.root.ignoreCloseAutoFocus){e.preventDefault();return}this.parentMenu.triggerNode&&fr(this.parentMenu.triggerNode)&&(e.preventDefault(),this.parentMenu.triggerNode.focus())}};handleTabKeyDown(e){let t=this.parentMenu;for(;t.parentMenu!==null;)t=t.parentMenu;if(!t.triggerNode)return;e.preventDefault();let n=gr(t.triggerNode,e.shiftKey?`prev`:`next`);n?(this.parentMenu.root.ignoreCloseAutoFocus=!0,t.onClose(),G(()=>{n.focus(),G(()=>{this.parentMenu.root.ignoreCloseAutoFocus=!1})})):this.domContext.getDocument().body.focus()}onkeydown(e){if(e.defaultPrevented)return;if(e.key===`Tab`){this.handleTabKeyDown(e);return}let t=e.target,n=e.currentTarget;if(!J(t)||!J(n))return;let r=t.closest(`[${this.parentMenu.root.getBitsAttr(`content`)}]`)?.id===this.parentMenu.contentId.current,i=e.ctrlKey||e.altKey||e.metaKey,a=e.key.length===1;if(this.rovingFocusGroup.handleKeydown(t,e)||e.code===`Space`)return;let o=this.#a();r&&!i&&a&&this.#n(e.key,o),e.target?.id===this.parentMenu.contentId.current&&Mn.includes(e.key)&&(e.preventDefault(),jn.includes(e.key)&&o.reverse(),Pn(o,{select:!1},()=>this.domContext.getActiveElement()))}onblur(e){Zt(e.currentTarget)&&Zt(e.target)&&(e.currentTarget.contains?.(e.target)||(this.domContext.getWindow().clearTimeout(this.#t),this.search=``))}onfocus(e){this.parentMenu.root.isUsingKeyboard.current&&G(()=>this.rovingFocusGroup.focusFirstCandidate())}onItemEnter(){return this.#o()}onItemLeave(e){e.currentTarget.hasAttribute(this.parentMenu.root.getBitsAttr(`sub-trigger`))||this.#o()||this.parentMenu.root.isUsingKeyboard.current||(this.parentMenu.contentNode?.focus({preventScroll:!0}),this.rovingFocusGroup.setCurrentTabStopId(``))}onTriggerLeave(){return!!this.#o()}handleInteractOutside(e){if(!Qt(e.target))return;let t=this.parentMenu.triggerNode?.id;if(e.target.id===t){e.preventDefault();return}if(e.target.closest(`#${t}`)){e.preventDefault();return}this.parentMenu.root.ignoreCloseAutoFocus=!0,G(()=>{this.parentMenu.root.ignoreCloseAutoFocus=!1})}get shouldRender(){return this.parentMenu.contentPresence.shouldRender}#c=w(()=>({open:this.parentMenu.opts.open.current}));get snippetProps(){return v(this.#c)}set snippetProps(e){C(this.#c,e)}#l=w(()=>({id:this.opts.id.current,role:`menu`,"aria-orientation":`vertical`,[this.parentMenu.root.getBitsAttr(`content`)]:``,"data-state":At(this.parentMenu.opts.open.current),...jt(this.parentMenu.contentPresence.transitionStatus),onkeydown:this.onkeydown,onblur:this.onblur,onfocus:this.onfocus,dir:this.parentMenu.root.opts.dir.current,style:{pointerEvents:`auto`,contain:`layout style`},...this.attachment}));get props(){return v(this.#l)}set props(e){C(this.#l,e)}popperProps={onCloseAutoFocus:e=>this.onCloseAutoFocus(e)}},Wr=class{opts;content;attachment;#e=D(!1);constructor(e,t){this.opts=e,this.content=t,this.attachment=K(this.opts.ref),this.onpointermove=this.onpointermove.bind(this),this.onpointerleave=this.onpointerleave.bind(this),this.onfocus=this.onfocus.bind(this),this.onblur=this.onblur.bind(this)}onpointermove(e){if(!e.defaultPrevented&&Q(e)){if(this.opts.disabled.current)this.content.onItemLeave(e);else{if(this.content.onItemEnter())return;let t=e.currentTarget;if(!J(t))return;t.focus({preventScroll:!0})}}}onpointerleave(e){e.defaultPrevented||Q(e)&&this.content.onItemLeave(e)}onfocus(e){G(()=>{e.defaultPrevented||this.opts.disabled.current||C(this.#e,!0)})}onblur(e){G(()=>{e.defaultPrevented||C(this.#e,!1)})}#t=w(()=>({id:this.opts.id.current,tabindex:-1,role:`menuitem`,"aria-disabled":kt(this.opts.disabled.current),"data-disabled":q(this.opts.disabled.current),"data-highlighted":v(this.#e)?``:void 0,[this.content.parentMenu.root.getBitsAttr(`item`)]:``,onpointermove:this.onpointermove,onpointerleave:this.onpointerleave,onfocus:this.onfocus,onblur:this.onblur,...this.attachment}));get props(){return v(this.#t)}set props(e){C(this.#t,e)}},Gr=class e{static create(t){let n=new Wr(t,Dr.get());return new e(t,n)}opts;item;root;#e=!1;constructor(e,t){this.opts=e,this.item=t,this.root=t.content.parentMenu.root,this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this)}#t(){if(this.item.opts.disabled.current)return;let e=new CustomEvent(`menuitemselect`,{bubbles:!0,cancelable:!0});if(this.opts.onSelect.current(e),e.defaultPrevented){this.item.content.parentMenu.root.isUsingKeyboard.current=!1;return}this.opts.closeOnSelect.current&&this.item.content.parentMenu.root.opts.onClose()}onkeydown(e){let t=this.item.content.search!==``;if(!(this.item.opts.disabled.current||t&&e.key===` `)&&kn.includes(e.key)){if(!J(e.currentTarget))return;e.currentTarget.click(),e.preventDefault()}}onclick(e){this.item.opts.disabled.current||this.#t()}onpointerup(e){if(!e.defaultPrevented&&!this.#e){if(!J(e.currentTarget))return;e.currentTarget?.click()}}onpointerdown(e){this.#e=!0}#n=w(()=>V(this.item.props,{onclick:this.onclick,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,onkeydown:this.onkeydown}));get props(){return v(this.#n)}set props(e){C(this.#n,e)}},Kr=class e{static create(t){return Or.set(new e(t,Tr.get()))}opts;root;attachment;#e=D(void 0);get groupHeadingId(){return v(this.#e)}set groupHeadingId(e){C(this.#e,e,!0)}constructor(e,t){this.opts=e,this.root=t,this.attachment=K(this.opts.ref)}#t=w(()=>({id:this.opts.id.current,role:`group`,"aria-labelledby":this.groupHeadingId,[this.root.getBitsAttr(`group`)]:``,...this.attachment}));get props(){return v(this.#t)}set props(e){C(this.#t,e)}},qr=class e{static create(t){let n=Ar.getOr(null);if(n)return new e(t,n);let r=kr.getOr(null);return r?new e(t,r):new e(t,Or.get())}opts;group;attachment;constructor(e,t){this.opts=e,this.group=t,this.attachment=K(this.opts.ref,e=>this.group.groupHeadingId=e?.id)}#e=w(()=>({id:this.opts.id.current,role:`group`,[this.group.root.getBitsAttr(`group-heading`)]:``,...this.attachment}));get props(){return v(this.#e)}set props(e){C(this.#e,e)}},Jr=class e{static create(t){return new e(t,Tr.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=K(this.opts.ref)}#e=w(()=>({id:this.opts.id.current,role:`group`,[this.root.getBitsAttr(`separator`)]:``,...this.attachment}));get props(){return v(this.#e)}set props(e){C(this.#e,e)}},Yr=class e{static create(t){return new e(t,Er.get())}opts;parentMenu;attachment;constructor(e,t){this.opts=e,this.parentMenu=t,this.attachment=K(this.opts.ref,e=>this.parentMenu.triggerNode=e)}onclick=e=>{this.opts.disabled.current||e.detail!==0||(this.parentMenu.toggleOpen(),e.preventDefault())};onpointerdown=e=>{if(!this.opts.disabled.current){if(e.pointerType===`touch`)return e.preventDefault();e.button===0&&e.ctrlKey===!1&&(this.parentMenu.toggleOpen(),this.parentMenu.opts.open.current||e.preventDefault())}};onpointerup=e=>{this.opts.disabled.current||e.pointerType===`touch`&&(e.preventDefault(),this.parentMenu.toggleOpen())};onkeydown=e=>{if(!this.opts.disabled.current){if(e.key===` `||e.key===`Enter`){this.parentMenu.toggleOpen(),e.preventDefault();return}e.key===`ArrowDown`&&(this.parentMenu.onOpen(),e.preventDefault())}};#e=w(()=>{if(this.parentMenu.opts.open.current&&this.parentMenu.contentId.current)return this.parentMenu.contentId.current});#t=w(()=>({id:this.opts.id.current,disabled:this.opts.disabled.current,"aria-haspopup":`menu`,"aria-expanded":kt(this.parentMenu.opts.open.current),"aria-controls":v(this.#e),"data-disabled":q(this.opts.disabled.current),"data-state":At(this.parentMenu.opts.open.current),[this.parentMenu.root.getBitsAttr(`trigger`)]:``,onclick:this.onclick,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,onkeydown:this.onkeydown,...this.attachment}));get props(){return v(this.#t)}set props(e){C(this.#t,e)}};globalThis.bitsDismissableLayers??=new Map;var Xr=class e{static create(t){return new e(t)}opts;#e;#t;#n={pointerdown:!1};#r=!1;#i=!1;#a=void 0;#o;#s=Y;constructor(e){this.opts=e,this.#t=e.interactOutsideBehavior,this.#e=e.onInteractOutside,this.#o=e.onFocusOutside,j(()=>{this.#a=En(this.opts.ref.current)});let t=Y,n=null,r=!1,i=()=>{n!=null&&(clearTimeout(n),n=null)},a=()=>{i(),this.#g(),globalThis.bitsDismissableLayers.delete(this),this.#d.destroy(),t()};U([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(this.opts.enabled.current&&this.opts.ref.current)return i(),n=ht(1,()=>{n=null,!r&&this.opts.ref.current&&(globalThis.bitsDismissableLayers.set(this,this.#t),t(),t=this.#l())}),a}),W(()=>{r=!0,i(),this.#g.destroy(),globalThis.bitsDismissableLayers.delete(this),this.#d.destroy(),this.#s(),t()})}#c=e=>{e.defaultPrevented||this.opts.ref.current&&G(()=>{this.opts.ref.current&&!this.#h(e.target)&&e.target&&!this.#i&&this.#o.current?.(e)})};#l(){return B(A(this.#a,`pointerdown`,B(this.#f,this.#m),{capture:!0}),A(this.#a,`pointerdown`,B(this.#p,this.#d)),A(this.#a,`focusin`,this.#c))}#u=e=>{let t=e;t.defaultPrevented&&(t=ei(e)),this.#e.current(e)};#d=wn(e=>{if(!this.opts.ref.current){this.#s();return}let t=this.opts.isValidEvent.current(e,this.opts.ref.current)||$r(e,this.opts.ref.current);if(!this.#r||this.#_()||!t){this.#s();return}let n=e;if(n.defaultPrevented&&(n=ei(n)),this.#t.current!==`close`&&this.#t.current!==`defer-otherwise-close`){this.#s();return}e.pointerType===`touch`?(this.#s(),this.#s=A(this.#a,`click`,this.#u,{once:!0})):this.#e.current(n)},10);#f=e=>{this.#n[e.type]=!0};#p=e=>{this.#n[e.type]=!1};#m=()=>{this.opts.ref.current&&(this.#r=Qr(this.opts.ref.current))};#h=e=>this.opts.ref.current?Tn(this.opts.ref.current,e):!1;#g=wn(()=>{for(let e in this.#n)this.#n[e]=!1;this.#r=!1},20);#_(){return Object.values(this.#n).some(Boolean)}#v=()=>{this.#i=!0};#y=()=>{this.#i=!1};props={onfocuscapture:this.#v,onblurcapture:this.#y}};function Zr(e=[...globalThis.bitsDismissableLayers]){return e.findLast(([e,{current:t}])=>t===`close`||t===`ignore`)}function Qr(e){let t=[...globalThis.bitsDismissableLayers],n=Zr(t);if(n)return n[0].opts.ref.current===e;let[r]=t[0];return r.opts.ref.current===e}function $r(e,t){let n=e.target;if(!Qt(n))return!1;let r=!!n.closest(`[${Cr}]`),i=!!t.closest(`[${wr}]`);return`button`in e&&e.button>0&&!r?!1:`button`in e&&e.button===0&&r&&i?!0:r&&i?!1:En(n).documentElement.contains(n)&&!Tn(t,n)&&On(e,t)}function ei(e){let t=e.currentTarget,n=e.target,r;r=e instanceof PointerEvent?new PointerEvent(e.type,e):new PointerEvent(`pointerdown`,e);let i=!1;return new Proxy(r,{get:(r,a)=>a===`currentTarget`?t:a===`target`?n:a===`preventDefault`?()=>{i=!0,typeof r.preventDefault==`function`&&r.preventDefault()}:a===`defaultPrevented`?i:a in r?r[a]:e[a]})}function ti(e,t){i(t,!0);let n=b(t,`interactOutsideBehavior`,3,`close`),r=b(t,`onInteractOutside`,3,Y),a=b(t,`onFocusOutside`,3,Y),o=b(t,`isValidEvent`,3,()=>!1),s=Xr.create({id:L(()=>t.id),interactOutsideBehavior:L(()=>n()),onInteractOutside:L(()=>r()),enabled:L(()=>t.enabled),onFocusOutside:L(()=>a()),isValidEvent:L(()=>o()),ref:t.ref});var c=P(),l=N(c);f(l,()=>t.children??T,()=>({props:s.props})),h(e,c),g()}globalThis.bitsEscapeLayers??=new Map;var ni=class e{static create(t){return new e(t)}opts;domContext;constructor(e){this.opts=e,this.domContext=new Ot(this.opts.ref);let t=Y;U(()=>e.enabled.current,n=>(n&&(globalThis.bitsEscapeLayers.set(this,e.escapeKeydownBehavior),t=this.#e()),()=>{t(),globalThis.bitsEscapeLayers.delete(this)}))}#e=()=>A(this.domContext.getDocument(),`keydown`,this.#t,{passive:!1});#t=e=>{if(e.key!==`Escape`||!ri(this))return;let t=new KeyboardEvent(e.type,e);e.preventDefault();let n=this.opts.escapeKeydownBehavior.current;(n===`close`||n===`defer-otherwise-close`)&&this.opts.onEscapeKeydown.current(t)}};function ri(e){let t=[...globalThis.bitsEscapeLayers],n=t.findLast(([e,{current:t}])=>t===`close`||t===`ignore`);if(n)return n[0]===e;let[r]=t[0];return r===e}function ii(e,t){i(t,!0);let n=b(t,`escapeKeydownBehavior`,3,`close`),r=b(t,`onEscapeKeydown`,3,Y);ni.create({escapeKeydownBehavior:L(()=>n()),onEscapeKeydown:L(()=>r()),enabled:L(()=>t.enabled),ref:t.ref});var a=P(),o=N(a);f(o,()=>t.children??T),h(e,a),g()}var ai=class e{static instance;#e=De([]);#t=new WeakMap;#n=new WeakMap;static getInstance(){return this.instance||=new e,this.instance}register(e){let t=this.getActive();t&&t!==e&&t.pause();let n=document.activeElement;n&&n!==document.body&&this.#n.set(e,n),this.#e.current=this.#e.current.filter(t=>t!==e),this.#e.current.unshift(e)}unregister(e){this.#e.current=this.#e.current.filter(t=>t!==e);let t=this.getActive();t&&t.resume()}getActive(){return this.#e.current[0]}setFocusMemory(e,t){this.#t.set(e,t)}getFocusMemory(e){return this.#t.get(e)}isActiveScope(e){return this.getActive()===e}setPreFocusMemory(e,t){this.#n.set(e,t)}getPreFocusMemory(e){return this.#n.get(e)}clearPreFocusMemory(e){this.#n.delete(e)}},oi=class e{#e=!1;#t=null;#n=ai.getInstance();#r=[];#i;constructor(e){this.#i=e}get paused(){return this.#e}pause(){this.#e=!0}resume(){this.#e=!1}#a(){for(let e of this.#r)e();this.#r=[]}mount(e){this.#t&&this.unmount(),this.#t=e,this.#n.register(this),this.#c(),this.#o()}unmount(){this.#t&&=(this.#a(),this.#s(),this.#n.unregister(this),this.#n.clearPreFocusMemory(this),null)}#o(){if(!this.#t)return;let e=new CustomEvent(`focusScope.onOpenAutoFocus`,{bubbles:!1,cancelable:!0});this.#i.onOpenAutoFocus.current(e),e.defaultPrevented||requestAnimationFrame(()=>{if(!this.#t)return;let e=this.#u();e?(e.focus(),this.#n.setFocusMemory(this,e)):this.#t.focus()})}#s(){let e=new CustomEvent(`focusScope.onCloseAutoFocus`,{bubbles:!1,cancelable:!0});if(this.#i.onCloseAutoFocus.current?.(e),!e.defaultPrevented){let e=this.#n.getPreFocusMemory(this);if(e&&document.contains(e))try{e.focus()}catch{document.body.focus()}}}#c(){if(!this.#t||!this.#i.trap.current)return;let e=this.#t,t=e.ownerDocument;this.#r.push(A(t,`focusin`,t=>{if(this.#e||!this.#n.isActiveScope(this))return;let n=t.target;if(n){if(e.contains(n))this.#n.setFocusMemory(this,n);else{let n=this.#n.getFocusMemory(this);if(n&&e.contains(n)&&mr(n))t.preventDefault(),n.focus();else{let t=this.#u(),n=this.#d()[0];(t||n||e).focus()}}}},{capture:!0}),A(e,`keydown`,e=>{if(!this.#i.loop||this.#e||e.key!==`Tab`||!this.#n.isActiveScope(this))return;let n=this.#l();if(n.length===0)return;let r=n[0],i=n[n.length-1];!e.shiftKey&&t.activeElement===i?(e.preventDefault(),r.focus()):e.shiftKey&&t.activeElement===r&&(e.preventDefault(),i.focus())}));let n=new MutationObserver(()=>{let t=this.#n.getFocusMemory(this);if(t&&!e.contains(t)){let t=this.#u(),n=this.#d()[0],r=t||n;r?(r.focus(),this.#n.setFocusMemory(this,r)):e.focus()}});n.observe(e,{childList:!0,subtree:!0}),this.#r.push(()=>n.disconnect())}#l(){return this.#t?ur(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}#u(){return this.#l()[0]||null}#d(){return this.#t?dr(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}static use(t){let n=null;return U([()=>t.ref.current,()=>t.enabled.current],([r,i])=>{r&&i?(n||=new e(t),n.mount(r)):n&&=(n.unmount(),null)}),W(()=>{n?.unmount()}),{get props(){return{tabindex:-1}}}}};function si(e,t){i(t,!0);let n=b(t,`enabled`,3,!1),r=b(t,`trapFocus`,3,!1),a=b(t,`loop`,3,!1),o=b(t,`onCloseAutoFocus`,3,Y),s=b(t,`onOpenAutoFocus`,3,Y),c=oi.use({enabled:L(()=>n()),trap:L(()=>r()),loop:a(),onCloseAutoFocus:L(()=>o()),onOpenAutoFocus:L(()=>s()),ref:t.ref});var l=P(),u=N(l);f(u,()=>t.focusScope??T,()=>({props:c.props})),h(e,l),g()}var ci=()=>{};globalThis.bitsTextSelectionLayers??=new Map;var li=class e{static create(t){return new e(t)}opts;domContext;#e=Y;#t=!1;#n=ci;#r=ci;constructor(e){this.opts=e,this.domContext=new Ot(e.ref);let t=Y;U(()=>[this.opts.enabled.current,this.opts.onPointerDown.current,this.opts.onPointerUp.current],([e,n,r])=>(this.#t=e,this.#n=n,this.#r=r,e&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),t(),t=this.#i()),()=>{this.#t=!1,t(),this.#s(),globalThis.bitsTextSelectionLayers.delete(this)}))}#i(){return B(A(this.domContext.getDocument(),`pointerdown`,this.#o),A(this.domContext.getDocument(),`pointerup`,Oe(this.#s,this.#a)))}#a=e=>{this.#r(e)};#o=e=>{if(!this.#t)return;let t=this.opts.ref.current,n=e.target;J(t)&&J(n)&&pi(this)&&wt(t,n)&&(this.#n(e),!e.defaultPrevented&&(this.#e=di(t,this.domContext.getDocument().body)))};#s=()=>{this.#e(),this.#e=Y}},ui=e=>e.style.userSelect||e.style.webkitUserSelect;function di(e,t){let n=ui(t),r=ui(e);return fi(t,`none`),fi(e,`text`),()=>{fi(t,n),fi(e,r)}}function fi(e,t){e.style.userSelect=t,e.style.webkitUserSelect=t}function pi(e){let t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;let n=t.at(-1);return n?n[0]===e:!1}function mi(e,t){i(t,!0);let n=b(t,`preventOverflowTextSelection`,3,!0),r=b(t,`onPointerDown`,3,Y),a=b(t,`onPointerUp`,3,Y);li.create({id:L(()=>t.id),onPointerDown:L(()=>r()),onPointerUp:L(()=>a()),enabled:L(()=>t.enabled&&n()),ref:t.ref});var o=P(),s=N(o);f(s,()=>t.children??T),h(e,o),g()}globalThis.bitsIdCounter??={current:0};function hi(e=`bits`){return globalThis.bitsIdCounter.current++,`${e}-${globalThis.bitsIdCounter.current}`}var gi=class{#e;#t=0;#n=D();#r;constructor(e){this.#e=e}#i(){--this.#t,this.#r&&this.#t<=0&&(this.#r(),C(this.#n,void 0),this.#r=void 0)}get(...e){return this.#t+=1,v(this.#n)===void 0&&(this.#r=se(()=>{C(this.#n,this.#e(...e),!0)})),j(()=>()=>{this.#i()}),v(this.#n)}},_i=new ct,vi=D(null),yi=null,bi=null,xi=!1,Si=L(()=>{for(let e of _i.values())if(e)return!0;return!1}),Ci=null,wi=new gi(()=>{function e(){document.body.setAttribute(`style`,v(vi)??``),document.body.style.removeProperty(`--scrollbar-width`),Yt&&yi?.(),C(vi,null)}function t(){bi!==null&&(window.clearTimeout(bi),bi=null)}function n(e,n){t(),xi=!0,Ci=Date.now();let r=Ci,i=()=>{bi=null,Ci===r&&(Ei(_i)?xi=!1:(xi=!1,n()))},a=e===null?24:e;bi=window.setTimeout(i,a)}function r(){v(vi)===null&&_i.size===0&&!xi&&C(vi,document.body.getAttribute(`style`),!0)}return U(()=>Si.current,()=>{if(!Si.current)return;r(),xi=!1;let e=getComputedStyle(document.documentElement),t=getComputedStyle(document.body),n=e.scrollbarGutter?.includes(`stable`)||t.scrollbarGutter?.includes(`stable`),i=window.innerWidth-document.documentElement.clientWidth,a={padding:Number.parseInt(t.paddingRight??`0`,10)+i,margin:Number.parseInt(t.marginRight??`0`,10)};i>0&&!n&&(document.body.style.paddingRight=`${a.padding}px`,document.body.style.marginRight=`${a.margin}px`,document.body.style.setProperty(`--scrollbar-width`,`${i}px`)),document.body.style.overflow=`hidden`,Yt&&(yi=A(document,`touchmove`,e=>{e.target===document.documentElement&&(e.touches.length>1||e.preventDefault())},{passive:!1})),G(()=>{document.body.style.pointerEvents=`none`,document.body.style.overflow=`hidden`})}),W(()=>()=>{yi?.()}),{get lockMap(){return _i},resetBodyStyle:e,scheduleCleanupIfNoNewLocks:n,cancelPendingCleanup:t,ensureInitialStyleCaptured:r}}),Ti=class{#e=hi();#t;#n=()=>null;#r;locked;constructor(e,t=()=>null){this.#t=e,this.#n=t,this.#r=wi.get(),this.#r&&(this.#r.cancelPendingCleanup(),this.#r.ensureInitialStyleCaptured(),this.#r.lockMap.set(this.#e,this.#t??!1),this.locked=L(()=>this.#r.lockMap.get(this.#e)??!1,e=>this.#r.lockMap.set(this.#e,e)),W(()=>{if(this.#r.lockMap.delete(this.#e),Ei(this.#r.lockMap))return;let e=this.#n();this.#r.scheduleCleanupIfNoNewLocks(e,()=>{this.#r.resetBodyStyle()})}))}};function Ei(e){for(let[t,n]of e)if(n)return!0;return!1}function Di(e,t){i(t,!0);let n=b(t,`preventScroll`,3,!0),r=b(t,`restoreScrollDelay`,3,null);n()&&new Ti(n(),()=>r()),g()}var Oi=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`forceMount`,`child`,`children`,`ref`]),ki=n(`<div><!></div>`);function Ai(e,n){let r=s();i(n,!0);let a=b(n,`id`,19,()=>X(r)),o=b(n,`forceMount`,3,!1),c=b(n,`ref`,15,null),l=O(n,Oi),u=dn.create({id:L(()=>a()),ref:L(()=>c(),e=>c(e))}),p=w(()=>V(l,u.props));var m=P(),_=N(m),y=e=>{var r=P(),i=N(r),a=e=>{var t=P(),r=N(t);{let e=w(()=>({props:V(v(p)),...u.snippetProps}));f(r,()=>n.child,()=>v(e))}h(e,t)},o=e=>{var r=ki();S(r,e=>({...e}),[()=>V(v(p))]);var i=k(r);f(i,()=>n.children??T,()=>u.snippetProps),t(r),h(e,r)};d(i,e=>{n.child?e(a):e(o,-1)}),h(e,r)};d(_,e=>{(u.shouldRender||o())&&e(y)}),h(e,m),g()}var ji=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`children`,`child`,`ref`]),Mi=n(`<div><!></div>`);function Ni(e,n){let r=s();i(n,!0);let a=b(n,`id`,19,()=>X(r)),o=b(n,`ref`,15,null),c=O(n,ji),l=ln.create({id:L(()=>a()),ref:L(()=>o(),e=>o(e))}),u=w(()=>V(c,l.props));var p=P(),m=N(p),_=e=>{var t=P(),r=N(t);f(r,()=>n.child,()=>({props:v(u)})),h(e,t)},y=e=>{var r=Mi();S(r,()=>({...v(u)}));var i=k(r);f(i,()=>n.children??T),t(r),h(e,r)};d(m,e=>{n.child?e(_):e(y,-1)}),h(e,p),g()}function Pi(e,t){i(t,!0);let n=b(t,`open`,15,!1),r=b(t,`onOpenChange`,3,Y),a=b(t,`onOpenChangeComplete`,3,Y);on.create({variant:L(()=>`dialog`),open:L(()=>n(),e=>{n(e),r()(e)}),onOpenChangeComplete:L(()=>a())});var o=P(),s=N(o);f(s,()=>t.children??T),h(e,o),g()}var Fi=new Set([`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`id`,`ref`,`disabled`]),Ii=n(`<button><!></button>`);function Li(e,n){let r=s();i(n,!0);let a=b(n,`id`,19,()=>X(r)),o=b(n,`ref`,15,null),c=b(n,`disabled`,3,!1),l=O(n,Fi),u=sn.create({variant:L(()=>`close`),id:L(()=>a()),ref:L(()=>o(),e=>o(e)),disabled:L(()=>!!c())}),p=w(()=>V(l,u.props));var m=P(),_=N(m),y=e=>{var t=P(),r=N(t);f(r,()=>n.child,()=>({props:v(p)})),h(e,t)},ee=e=>{var r=Ii();S(r,()=>({...v(p)}));var i=k(r);f(i,()=>n.children??T),t(r),h(e,r)};d(_,e=>{n.child?e(y):e(ee,-1)}),h(e,m),g()}var Ri=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`children`,`child`,`ref`,`forceMount`,`onCloseAutoFocus`,`onOpenAutoFocus`,`onEscapeKeydown`,`onInteractOutside`,`trapFocus`,`preventScroll`,`restoreScrollDelay`]),zi=n(`<!> <!>`,1),Bi=n(`<!> <div><!></div>`,1);function Vi(e,n){let r=s();i(n,!0);let a=b(n,`id`,19,()=>X(r)),o=b(n,`ref`,15,null),c=b(n,`forceMount`,3,!1),l=b(n,`onCloseAutoFocus`,3,Y),u=b(n,`onOpenAutoFocus`,3,Y),p=b(n,`onEscapeKeydown`,3,Y),m=b(n,`onInteractOutside`,3,Y),_=b(n,`trapFocus`,3,!0),y=b(n,`preventScroll`,3,!0),ee=b(n,`restoreScrollDelay`,3,null),te=O(n,Ri),x=un.create({id:L(()=>a()),ref:L(()=>o(),e=>o(e))}),C=w(()=>V(te,x.props));var ne=P(),re=N(ne),ie=e=>{si(e,{get ref(){return x.opts.ref},loop:!0,get trapFocus(){return _()},get enabled(){return x.root.opts.open.current},get onOpenAutoFocus(){return u()},get onCloseAutoFocus(){return l()},focusScope:(e,r)=>{let i=()=>(r?.()).props;ii(e,M(()=>v(C),{get enabled(){return x.root.opts.open.current},get ref(){return x.opts.ref},onEscapeKeydown:e=>{p()(e),!e.defaultPrevented&&x.root.handleClose()},children:(e,r)=>{ti(e,M(()=>v(C),{get ref(){return x.opts.ref},get enabled(){return x.root.opts.open.current},onInteractOutside:e=>{m()(e),!e.defaultPrevented&&x.root.handleClose()},children:(e,r)=>{mi(e,M(()=>v(C),{get ref(){return x.opts.ref},get enabled(){return x.root.opts.open.current},children:(e,r)=>{var a=P(),o=N(a),s=e=>{var t=zi(),r=N(t),a=e=>{Di(e,{get preventScroll(){return y()},get restoreScrollDelay(){return ee()}})};d(r,e=>{x.root.opts.open.current&&e(a)});var o=E(r,2);{let e=w(()=>({props:V(v(C),i()),...x.snippetProps}));f(o,()=>n.child,()=>v(e))}h(e,t)},c=e=>{var r=Bi(),a=N(r);Di(a,{get preventScroll(){return y()}});var o=E(a,2);S(o,e=>({...e}),[()=>V(v(C),i())]);var s=k(o);f(s,()=>n.children??T),t(o),h(e,r)};d(o,e=>{n.child?e(s):e(c,-1)}),h(e,a)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}})};d(re,e=>{(x.shouldRender||c())&&e(ie)}),h(e,ne),g()}var Hi=new Set([`$$slots`,`$$events`,`$$legacy`,`open`]);function Ui(e,t){i(t,!0);let n=b(t,`open`,15,!1),r=O(t,Hi);var o=P(),s=N(o);a(s,()=>Pi,(e,t)=>{t(e,M(()=>r,{get open(){return n()},set open(e){n(e)}}))}),h(e,o),g()}var Wi=new Set([`$$slots`,`$$events`,`$$legacy`]);function Gi(e,t){let n=O(t,Wi);var r=P(),i=N(r);a(i,()=>Sn,(e,t)=>{t(e,M(()=>n))}),h(e,r)}var Ki=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);function qi(e,t){i(t,!0);let n=b(t,`ref`,15,null),r=O(t,Ki);var o=P(),s=N(o);{let e=w(()=>F(`text-sm font-medium`,t.class));a(s,()=>mn,(t,i)=>{i(t,M({"data-slot":`dialog-title`,get class(){return v(e)}},()=>r,{get ref(){return n()},set ref(e){n(e)}}))})}h(e,o),g()}var Ji=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`,`showCloseButton`]),Yi=n(`<div><!> <!></div>`);function Xi(e,n){i(n,!0);let r=b(n,`ref`,15,null),o=b(n,`showCloseButton`,3,!1),s=O(n,Ji);var c=Yi();S(c,e=>({"data-slot":`dialog-footer`,class:e,...s}),[()=>F(`gap-2 flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,n.class)]);var l=k(c);f(l,()=>n.children??T);var u=E(l,2),p=e=>{var t=P(),n=N(t);{let e=(e,t)=>{pe(e,M({variant:`outline`},()=>(t?.()).props,{children:(e,t)=>{re();var n=_(`Close`);h(e,n)},$$slots:{default:!0}}))};a(n,()=>Li,(t,n)=>{n(t,{child:e,$$slots:{child:!0}})})}h(e,t)};d(u,e=>{o()&&e(p)}),t(c),ie(c,e=>r(e),()=>r()),h(e,c),g()}var Zi=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),Qi=n(`<div><!></div>`);function $i(e,n){i(n,!0);let r=b(n,`ref`,15,null),a=O(n,Zi);var o=Qi();S(o,e=>({"data-slot":`dialog-header`,class:e,...a}),[()=>F(`gap-1 flex flex-col`,n.class)]);var s=k(o);f(s,()=>n.children??T),t(o),ie(o,e=>r(e),()=>r()),h(e,o),g()}var ea=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);function ta(e,t){i(t,!0);let n=b(t,`ref`,15,null),r=O(t,ea);var o=P(),s=N(o);{let e=w(()=>F(`data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/80 duration-100 supports-backdrop-filter:backdrop-blur-xs fixed inset-0 isolate z-50`,t.class));a(s,()=>Ai,(t,i)=>{i(t,M({"data-slot":`dialog-overlay`,get class(){return v(e)}},()=>r,{get ref(){return n()},set ref(e){n(e)}}))})}h(e,o),g()}var na=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`portalProps`,`children`,`showCloseButton`]),ra=n(`<!> <span class="sr-only">Close</span>`,1),ia=n(`<!> <!>`,1);function aa(e,t){i(t,!0);let n=b(t,`ref`,15,null),r=b(t,`showCloseButton`,3,!0),o=O(t,na);Gi(e,M(()=>t.portalProps,{children:(e,i)=>{var s=ia(),c=N(s);a(c,()=>ta,(e,t)=>{t(e,{})});var l=E(c,2);{let e=w(()=>F(`bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 ring-foreground/10 grid max-w-[calc(100%-2rem)] gap-4 rounded-xl p-4 text-xs/relaxed ring-1 duration-100 sm:max-w-sm fixed top-1/2 left-1/2 z-50 w-full -translate-x-1/2 -translate-y-1/2 outline-none`,t.class));a(l,()=>Vi,(i,s)=>{s(i,M({"data-slot":`dialog-content`,get class(){return v(e)}},()=>o,{get ref(){return n()},set ref(e){n(e)},children:(e,n)=>{var i=ia(),o=N(i);f(o,()=>t.children??T);var s=E(o,2),c=e=>{var t=P(),n=N(t);{let e=(e,t)=>{pe(e,M({variant:`ghost`,class:`absolute top-2 right-2`,size:`icon-sm`},()=>(t?.()).props,{children:(e,t)=>{var n=ra(),r=N(n);he(r,{}),re(2),h(e,n)},$$slots:{default:!0}}))};a(n,()=>Li,(t,n)=>{n(t,{"data-slot":`dialog-close`,child:e,$$slots:{child:!0}})})}h(e,t)};d(s,e=>{r()&&e(c)}),h(e,i)},$$slots:{default:!0}}))})}h(e,s)},$$slots:{default:!0}})),g()}var oa=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);function sa(e,t){i(t,!0);let n=b(t,`ref`,15,null),r=O(t,oa);var o=P(),s=N(o);{let e=w(()=>F(`text-muted-foreground *:[a]:hover:text-foreground text-xs/relaxed *:[a]:underline *:[a]:underline-offset-3`,t.class));a(s,()=>Ni,(t,i)=>{i(t,M({"data-slot":`dialog-description`,get class(){return v(e)}},()=>r,{get ref(){return n()},set ref(e){n(e)}}))})}h(e,o),g()}var ca=n(`<!> `,1),la=n(`<!> <!>`,1);function ua(e,t){i(t,!0);let n=b(t,`open`,15,!1),r=b(t,`confirmLabel`,3,`Remove`),s=b(t,`busy`,3,!1);var c=P(),l=N(c);a(l,()=>Ui,(e,i)=>{i(e,{get open(){return n()},set open(e){n(e)},children:(e,i)=>{var c=P(),l=N(c);a(l,()=>aa,(e,i)=>{i(e,{class:`sm:max-w-[420px]`,children:(e,i)=>{var c=la(),l=N(c);a(l,()=>$i,(e,n)=>{n(e,{children:(e,n)=>{var r=la(),i=N(r);a(i,()=>qi,(e,n)=>{n(e,{class:`flex items-center gap-2`,children:(e,n)=>{var r=ca(),i=N(r);ge(i,{class:`h-4 w-4 text-destructive`});var a=E(i);ae(()=>o(a,` ${t.title??``}`)),h(e,r)},$$slots:{default:!0}})});var s=E(i,2);a(s,()=>sa,(e,n)=>{n(e,{children:(e,n)=>{re();var r=_();ae(()=>o(r,t.description)),h(e,r)},$$slots:{default:!0}})}),h(e,r)},$$slots:{default:!0}})});var u=E(l,2);a(u,()=>Xi,(e,i)=>{i(e,{children:(e,i)=>{var a=la(),c=N(a);pe(c,{variant:`outline`,get disabled(){return s()},onclick:()=>n(!1),children:(e,t)=>{re();var n=_(`Cancel`);h(e,n)},$$slots:{default:!0}});var l=E(c,2);pe(l,{variant:`destructive`,get disabled(){return s()},onclick:()=>t.onConfirm(),children:(e,t)=>{var n=ca(),i=N(n),a=e=>{me(e,{class:`h-4 w-4 animate-spin`})};d(i,e=>{s()&&e(a)});var c=E(i);ae(()=>o(c,` ${r()??``}`)),h(e,n)},$$slots:{default:!0}}),h(e,a)},$$slots:{default:!0}})}),h(e,c)},$$slots:{default:!0}})}),h(e,c)},$$slots:{default:!0}})}),h(e,c),g()}var da=new Set([`$$slots`,`$$events`,`$$legacy`]);function fa(e,t){let n=O(t,da),r=[[`path`,{d:`M10 11v6`}],[`path`,{d:`M14 11v6`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`}],[`path`,{d:`M3 6h18`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`}]];fe(e,M({name:`trash`},()=>n,{get iconNode(){return r}}))}export{Lt as A,W as B,Sn as C,Pt as D,$t as E,Nt as F,rt as G,U as H,K as I,L as J,$e as K,Et as L,zt as M,q as N,Ft as O,kt as P,G as R,Dn as S,Y as T,H as U,mt as V,V as W,De as Y,Kr as _,$i as a,Vr as b,Di as c,si as d,ii as f,qr as g,Ur as h,aa as i,Rt as j,It as k,hi as l,Yr as m,ua as n,qi as o,ti as p,we as q,sa as r,Ui as s,fa as t,mi as u,Gr as v,X as w,Jr as x,Hr as y,ht as z};
@@ -1 +0,0 @@
1
- import{o as e,r as t}from"../chunks/8hp3I3ac.js";export{e as load_css,t as start};