skill-creator 2.4.1 → 2.5.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 (38) hide show
  1. package/dist/daemon.js +4 -0
  2. package/dist/daemon.js.map +2 -2
  3. package/dist/package.json +1 -1
  4. package/dist/webui/_app/immutable/assets/{0.DSuWfqBb.css → 0.DLmCZ2fP.css} +1 -1
  5. package/dist/webui/_app/immutable/chunks/{Cbsk109T.js → B8aGNSaH.js} +1 -1
  6. package/dist/webui/_app/immutable/chunks/{BehT3C1z.js → BDMeqoYB.js} +1 -1
  7. package/dist/webui/_app/immutable/chunks/{DzSJuxmI.js → BTMBuftG.js} +1 -1
  8. package/dist/webui/_app/immutable/chunks/{BGher0CO.js → Ba9GVGQ5.js} +1 -1
  9. package/dist/webui/_app/immutable/chunks/{DXjm_vE5.js → BchFBl6r.js} +1 -1
  10. package/dist/webui/_app/immutable/chunks/{KM5hQu2t.js → BhCD2hsN.js} +1 -1
  11. package/dist/webui/_app/immutable/chunks/{C1gdd-Qo.js → C_mgfJl-.js} +1 -1
  12. package/dist/webui/_app/immutable/chunks/{BwEHBMTF.js → ClW_LCBS.js} +1 -1
  13. package/dist/webui/_app/immutable/chunks/{CjZfvtzv.js → Cy5ABld-.js} +1 -1
  14. package/dist/webui/_app/immutable/chunks/{QmXxFt1D.js → CzkhJhvt.js} +1 -1
  15. package/dist/webui/_app/immutable/chunks/{CHfZ3gHY.js → DBNjJ5Iw.js} +1 -1
  16. package/dist/webui/_app/immutable/chunks/{ryZsHFfK.js → DF_TIB7n.js} +1 -1
  17. package/dist/webui/_app/immutable/chunks/{aUJoMDp6.js → DH8yd93-.js} +1 -1
  18. package/dist/webui/_app/immutable/chunks/{BLdcUAZa.js → DTzqg7c9.js} +1 -1
  19. package/dist/webui/_app/immutable/chunks/{rTO-doKC.js → DVv6BdWV.js} +1 -1
  20. package/dist/webui/_app/immutable/chunks/{DP_8P0mo.js → DYbgoqwH.js} +1 -1
  21. package/dist/webui/_app/immutable/chunks/DjZ7hdjX.js +1 -0
  22. package/dist/webui/_app/immutable/chunks/{CIyEiZkz.js → DvWG9eQi.js} +1 -1
  23. package/dist/webui/_app/immutable/chunks/{ChB3s6Q9.js → DzfSSVEB.js} +1 -1
  24. package/dist/webui/_app/immutable/chunks/{yX3qp0yo.js → GHFnehdP.js} +1 -1
  25. package/dist/webui/_app/immutable/chunks/eFUKcYMv.js +1 -0
  26. package/dist/webui/_app/immutable/chunks/{BBqlAyUm.js → pd7EK5wP.js} +1 -1
  27. package/dist/webui/_app/immutable/chunks/{CbVFrj5k.js → xAjQV7BZ.js} +1 -1
  28. package/dist/webui/_app/immutable/entry/{app.BbDTsu6I.js → app.DlQ53I3_.js} +2 -2
  29. package/dist/webui/_app/immutable/entry/start.CNmXm9ox.js +1 -0
  30. package/dist/webui/_app/immutable/nodes/{0.QaOeKSa7.js → 0.BXeEkneG.js} +3 -3
  31. package/dist/webui/_app/immutable/nodes/{1.D-EmaRZH.js → 1.DzYWdh98.js} +1 -1
  32. package/dist/webui/_app/immutable/nodes/{2.CGLbUjuZ.js → 2.Dl1DQV0d.js} +1 -1
  33. package/dist/webui/_app/version.json +1 -1
  34. package/dist/webui/index.html +18 -18
  35. package/package.json +5 -5
  36. package/dist/webui/_app/immutable/chunks/CAmktO2F.js +0 -1
  37. package/dist/webui/_app/immutable/chunks/CZQgUTNL.js +0 -1
  38. package/dist/webui/_app/immutable/entry/start.DlPtwiRy.js +0 -1
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../chunks/ChB3s6Q9.js","../chunks/CmCJ0SKP.js","../chunks/CAmktO2F.js","../chunks/xihTtKlq.js","../chunks/CZQgUTNL.js","../chunks/BkEnd9_Z.js","../chunks/aUJoMDp6.js","../chunks/BBqlAyUm.js","../chunks/BT2vrlul.js","../chunks/Cbsk109T.js","../chunks/DzSJuxmI.js","../chunks/1aUphu7Y.js","../chunks/DC5f4JBB.js","../chunks/DnPeA-9c.js","../chunks/BEPs9Z9s.js","../chunks/DZ_Kltd5.js","../chunks/DdHvRi0A.js","../chunks/a0LlqeqU.js","../chunks/M-b0y9AQ.js","../chunks/CpRvgjpe.js","../chunks/BIfnT_mK.js","../chunks/CIyEiZkz.js","../chunks/Bs27XW8_.js","../chunks/Bynub5xW.js","../chunks/Bl0jjuyR.js","../chunks/CI1OXbBG.js","../chunks/DP_8P0mo.js","../chunks/ryZsHFfK.js","../chunks/BehT3C1z.js","../assets/shell.U4CQV8re.css","../chunks/DOjT7y5f.js","../chunks/F_BrNiaz.js","../chunks/ChvFFUWR.js","../chunks/s48N5eaK.js","../chunks/DKQHhdJ1.js","../chunks/D8Der6oM.js","../assets/ProviderView.BKgtsfqs.css","../chunks/yX3qp0yo.js","../chunks/UeEccMjN.js","../chunks/CeR4do8T.js","../chunks/BwEHBMTF.js","../chunks/DApmS1g_.js","../chunks/HopcQwhZ.js","../chunks/BYNWtKcf.js","../chunks/KM5hQu2t.js","../chunks/HclGiUj8.js","../chunks/C67g-p2T.js","../chunks/DovL68qD.js","../assets/CreatorWorkspace.CvDsme_1.css","../chunks/DXjm_vE5.js","../chunks/BLdcUAZa.js","../chunks/rTO-doKC.js","../chunks/C1gdd-Qo.js","../chunks/CHfZ3gHY.js","../chunks/CbVFrj5k.js","../chunks/CjZfvtzv.js","../chunks/BGher0CO.js","../chunks/QmXxFt1D.js","../assets/SettingsPage.DclbL_Wf.css"])))=>i.map(i=>d[i]);
2
- import{$ as e,A as t,At as n,B as r,Ct as i,D as a,Dt as o,E as s,F as c,G as l,H as u,J as d,K as f,M as p,N as m,Nt as h,O as g,Q as _,R as v,S as y,St as b,T as x,U as S,V as C,W as w,X as T,_t as E,a as D,at as O,b as k,bt as ee,c as A,ct as j,d as te,f as M,ft as N,gt as P,h as F,ht as ne,it as re,j as I,jt as L,k as ie,kt as ae,l as oe,lt as R,m as z,mt as B,n as se,nt as V,o as H,ot as U,p as ce,q as le,r as ue,rt as W,s as G,st as K,ut as de,v as q,w as fe,wt as pe,x as J,y as me,z as Y}from"../chunks/CmCJ0SKP.js";import{t as he}from"../chunks/CAmktO2F.js";import{t as ge}from"../chunks/HclGiUj8.js";import"../chunks/xihTtKlq.js";import{t as _e}from"../chunks/BehT3C1z.js";import"../chunks/CZQgUTNL.js";import{t as ve}from"../chunks/BkEnd9_Z.js";import{a as ye,i as be,n as xe,r as Se,s as Ce,t as we,u as Te}from"../chunks/aUJoMDp6.js";import{c as Ee,d as De,f as Oe,i as ke,l as Ae,p as je,s as Me,t as Ne,u as Pe}from"../chunks/ryZsHFfK.js";import{A as Fe,C as Ie,D as Le,M as Re,O as ze,S as Be,T as Ve,b as He,c as Ue,f as We,i as Ge,j as Ke,n as qe,o as Je,r as Ye,s as Xe,v as Ze,x as Qe}from"../chunks/BBqlAyUm.js";import{t as $e}from"../chunks/BT2vrlul.js";import{d as et,g as tt,h as nt,m as rt,r as it,t as at,u as ot}from"../chunks/QmXxFt1D.js";import{a as st,c as ct,n as lt,o as ut,s as dt,u as ft}from"../chunks/Cbsk109T.js";import{a as pt,n as mt,r as ht,s as gt,t as _t}from"../chunks/DzSJuxmI.js";import{n as vt,r as yt,t as bt}from"../chunks/1aUphu7Y.js";import{A as xt,B as St,C as Ct,D as wt,E as Tt,G as Et,H as Dt,I as Ot,J as kt,K as At,M as jt,N as Mt,O as Nt,P as Pt,Q as Ft,S as It,U as Lt,V as Rt,W as zt,X as Bt,Y as Vt,Z as X,_ as Ht,a as Ut,b as Wt,c as Gt,d as Kt,f as qt,g as Jt,h as Yt,j as Xt,k as Zt,l as Qt,m as $t,n as en,o as tn,p as nn,q as rn,r as an,s as on,t as sn,u as cn,v as ln,w as un,x as dn,y as fn,z as pn}from"../chunks/DC5f4JBB.js";import{t as mn}from"../chunks/a0LlqeqU.js";import"../chunks/DZ_Kltd5.js";import{i as hn,n as gn,r as _n,t as vn}from"../chunks/DnPeA-9c.js";import{t as yn}from"../chunks/BEPs9Z9s.js";import{t as bn}from"../chunks/DOjT7y5f.js";import{t as xn}from"../chunks/DApmS1g_.js";import{t as Sn}from"../chunks/M-b0y9AQ.js";import{t as Cn}from"../chunks/CjZfvtzv.js";import{n as wn,t as Tn}from"../chunks/F_BrNiaz.js";import{t as En}from"../chunks/CpRvgjpe.js";import{t as Dn}from"../chunks/UeEccMjN.js";import{t as On}from"../chunks/BIfnT_mK.js";import{A as kn,B as An,D as jn,E as Mn,F as Nn,H as Pn,I as Fn,L as In,M as Z,N as Ln,O as Rn,P as zn,S as Bn,T as Vn,V as Hn,_ as Un,a as Wn,b as Gn,c as Kn,d as qn,f as Jn,i as Q,j as Yn,k as Xn,m as Zn,n as Qn,o as $n,p as er,r as tr,s as nr,t as rr,v as ir,x as ar,z as or}from"../chunks/CIyEiZkz.js";import{t as sr}from"../chunks/HopcQwhZ.js";import{n as cr,t as lr}from"../chunks/ChvFFUWR.js";import{t as ur}from"../chunks/C67g-p2T.js";var dr=h({prerender:()=>!1,ssr:()=>!1,trailingSlash:()=>fr}),fr=`ignore`;Ae({id:`workspaces`,name:`Workspaces`,icon:Te,activities:[Pe({pattern:`/workspaces`,entry:!0,root:De({id:`workspaces.home`,component:()=>ge(()=>import(`../chunks/ChB3s6Q9.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]),import.meta.url)})}),Pe({pattern:`/workspaces`,root:Oe({id:`workspaces.provider`,pattern:`:wsId/:providerId`,params:Le({wsId:Qe,providerId:He}),search:Le({q:Fe().optional(),skill:Fe().optional(),view:Be([`list`,`detail`]).optional()}),component:()=>ge(()=>import(`../chunks/DP_8P0mo.js`),__vite__mapDeps([26,1,3,5,27,2,28,4,7,29,9,10,11,13,14,30,31,32,33,24,34,35,36]),import.meta.url)})}),Pe({pattern:`/workspaces`,root:Oe({id:`workspaces.intelligence`,pattern:`intelligence/:wsId/:providerId`,params:Le({wsId:Qe,providerId:He}),search:Le({severity:Be([`all`,`error`,`warning`,`info`]).optional()}),component:()=>ge(()=>import(`../chunks/yX3qp0yo.js`),__vite__mapDeps([37,1,3,5,27,2,28,4,7,29,9,10,11,13,38,20,21,22,39,24,35]),import.meta.url)})})]});var pr=new Set([`$$slots`,`$$events`,`$$legacy`]);function mr(e,t){let n=H(t,pr),r=[[`path`,{d:`M14.364 13.634a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506l4.013-4.009a1 1 0 0 0-3.004-3.004z`}],[`path`,{d:`M14.487 7.858A1 1 0 0 1 14 7V2`}],[`path`,{d:`M20 19.645V20a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l2.516 2.516`}],[`path`,{d:`M8 18h1`}]];ve(e,G({name:`file-pen-line`},()=>n,{get iconNode(){return r}}))}Ae({id:`creator`,name:`Creator`,icon:mr,activities:[Pe({pattern:`/creator`,entry:!0,root:De({id:`creator.home`,component:()=>ge(()=>import(`../chunks/BwEHBMTF.js`),__vite__mapDeps([40,1,2,3,4,5,9,7,10,11,41,42,43]),import.meta.url)})}),Pe({pattern:`/creator`,root:Oe({id:`creator.workspace`,pattern:`:mode/:wsId/:providerId`,params:Le({mode:Be([`edit`,`new`]),wsId:Qe,providerId:He}),search:Le({subview:Be([`file`,`log`,`preview`,`validate`,`test`]).optional(),template:Fe().optional()}),component:()=>ge(()=>import(`../chunks/KM5hQu2t.js`),__vite__mapDeps([44,1,2,45,3,28,4,5,27,7,29,9,10,11,13,30,21,32,46,43,47,23,12,14,22,33,39,48]),import.meta.url),children:[Oe({id:`creator.workspace.skill`,pattern:`:skillId`,params:Le({skillId:Ze}),component:()=>ge(()=>import(`../chunks/KM5hQu2t.js`),__vite__mapDeps([44,1,2,45,3,28,4,5,27,7,29,9,10,11,13,30,21,32,46,43,47,23,12,14,22,33,39,48]),import.meta.url)})]})})]});var hr=new Set([`$$slots`,`$$events`,`$$legacy`]);function gr(e,t){let n=H(t,hr),r=[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`}],[`circle`,{cx:`18`,cy:`6`,r:`3`}],[`circle`,{cx:`6`,cy:`18`,r:`3`}]];ve(e,G({name:`git-branch`},()=>n,{get iconNode(){return r}}))}Ae({id:`repository`,name:`Repository`,icon:gr,activities:[Pe({pattern:`/repository`,entry:!0,root:Oe({id:`repository.home`,pattern:``,search:Le({q:Fe().optional()}),component:()=>ge(()=>import(`../chunks/DXjm_vE5.js`),__vite__mapDeps([49,1,2,3,4,5,27,28,7,29,11,13,23,12,14,22,50]),import.meta.url),children:[Oe({id:`repository.scan`,pattern:`scan/:sourceId`,params:Le({sourceId:Fe().min(1).max(128).regex(/^[a-z0-9_-]+$/i)}),search:Le({selected:Fe().optional(),targets:Fe().optional(),skill:Fe().optional()}),component:()=>ge(()=>import(`../chunks/rTO-doKC.js`),__vite__mapDeps([51,1,2,3,28,4,27,7,29,10,50]),import.meta.url)})]})})]}),Ae({id:`wiki`,name:`Wiki`,icon:$e,activities:[Pe({pattern:`/wiki`,entry:!0,root:De({id:`wiki.home`,component:()=>ge(()=>import(`../chunks/C1gdd-Qo.js`),__vite__mapDeps([52,1,2,3,4,8,5,13,19,20,22,53,7,24,25]),import.meta.url)})}),Pe({pattern:`/wiki`,root:Oe({id:`wiki.scope`,pattern:`:wsId`,params:Le({wsId:Qe}),component:()=>ge(()=>import(`../chunks/CbVFrj5k.js`),__vite__mapDeps([54,1,2,3,4,27,28,7,29,8,5,9,10,11,13,14,30,18,55,38,20,42,22,53,24,34]),import.meta.url)})})]});var _r=new Set([`$$slots`,`$$events`,`$$legacy`]);function vr(e,t){let n=H(t,_r),r=[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`}],[`circle`,{cx:`12`,cy:`12`,r:`3`}]];ve(e,G({name:`settings`},()=>n,{get iconNode(){return r}}))}Ae({id:`settings`,name:`Settings`,icon:vr,activities:[Pe({pattern:`/settings`,entry:!0,root:De({id:`settings.home`,component:()=>ge(()=>import(`../chunks/BGher0CO.js`),__vite__mapDeps([56,1,2,3,4,5,27,28,7,29,57,9,10,11,12,13,14,15,16,17,30,21,47,23,22,58]),import.meta.url)})}),Pe({pattern:`/settings`,root:Oe({id:`settings.section`,pattern:`:section`,params:Le({section:Be(nt)}),component:()=>ge(()=>import(`../chunks/BGher0CO.js`),__vite__mapDeps([56,1,2,3,4,5,27,28,7,29,57,9,10,11,12,13,14,15,16,17,30,21,47,23,22,58]),import.meta.url)})})]});var yr=new Set([`$$slots`,`$$events`,`$$legacy`]);function br(e,t){let n=H(t,yr),r=[[`path`,{d:`m11 17-5-5 5-5`}],[`path`,{d:`m18 17-5-5 5-5`}]];ve(e,G({name:`chevrons-left`},()=>n,{get iconNode(){return r}}))}var xr=new Set([`$$slots`,`$$events`,`$$legacy`]);function Sr(e,t){let n=H(t,xr),r=[[`path`,{d:`m6 17 5-5-5-5`}],[`path`,{d:`m13 17 5-5-5-5`}]];ve(e,G({name:`chevrons-right`},()=>n,{get iconNode(){return r}}))}var Cr=r(`<span class="truncate text-xs font-medium"> </span>`),wr=r(`<button><!> <!></button>`),Tr=r(`<span class="truncate text-xs font-medium">Import workspace</span>`),Er=r(`<nav aria-label="Apps"><!> <div></div> <button title="Import workspace" aria-label="Import workspace"><!> <!></button> <div><button class="flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"><!></button></div></nav>`);function Dr(e,r){i(r,!0);let o=P(()=>je.list()),s=P(()=>ke(_e.url.pathname)?.app??null),u=P(et);function d(e){he(`/${e}`)}var f=Er(),p=U(f);t(p,17,()=>T(o),e=>e.id,(e,t)=>{let r=P(()=>T(t).icon);var i=wr(),o=U(i);a(o,()=>T(r),(e,t)=>{t(e,{class:`h-5 w-5 shrink-0`})});var f=R(o,2),p=e=>{var n=Cr(),r=j(n,!0);V(()=>c(r,T(t).name)),v(e,n)};m(f,e=>{T(u)||e(p)}),n(i),V(()=>{J(i,1,`flex h-10 items-center rounded-lg transition-colors hover:bg-muted ${T(u)?`w-10 justify-center`:`w-[10.5rem] gap-2.5 px-3`} ${T(s)===T(t).id?`bg-accent text-primary ring-1 ring-inset ring-primary/25`:`text-muted-foreground`}`),z(i,`title`,T(t).name),z(i,`aria-label`,T(t).name),z(i,`aria-current`,T(s)===T(t).id?`page`:void 0)}),l(`click`,i,()=>d(T(t).id)),v(e,i)});var h=R(p,2),g=R(h,2),_=U(g);Se(_,{class:`h-5 w-5 shrink-0`});var y=R(_,2),x=e=>{var t=Tr();v(e,t)};m(y,e=>{T(u)||e(x)}),n(g);var S=R(g,2),C=U(S),w=U(C),E=e=>{Sr(e,{class:`h-4 w-4`})},D=e=>{br(e,{class:`h-4 w-4`})};m(w,e=>{T(u)?e(E):e(D,-1)}),n(C),n(S),n(f),V(()=>{J(f,1,`flex shrink-0 flex-col border-r border-border bg-muted/30 py-3 ${T(u)?`w-14 items-center`:`w-44`}`),J(h,1,`my-1 h-px bg-border ${T(u)?`w-8`:`w-[10.5rem] mx-auto`}`),J(g,1,`flex h-10 items-center rounded-lg text-muted-foreground transition-colors hover:bg-muted hover:text-foreground ${T(u)?`w-10 justify-center`:`w-[10.5rem] gap-2.5 px-3`}`),J(S,1,`mt-auto flex ${T(u)?`w-10 justify-center`:`w-[10.5rem] justify-end`}`),z(C,`title`,T(u)?`Expand sidebar`:`Collapse sidebar`),z(C,`aria-label`,T(u)?`Expand sidebar`:`Collapse sidebar`),z(C,`aria-pressed`,T(u))}),l(`click`,g,()=>ye()),l(`click`,C,function(...e){rt?.apply(this,e)}),v(e,f),b()}w([`click`]);var Or=r(`<div class="drag-strip no-drag shrink-0 svelte-11tvdi8" role="banner" aria-label="window titlebar"><!> <div class="flex-1"></div> <!></div>`);function kr(e,t){i(t,!0);let r=D(t,`variant`,3,`main`),a=D(t,`left`,3,null),o=D(t,`right`,3,null),s=B(8),c=B(8),u=()=>navigator.opentrayWindow??navigator.opentray?.window??void 0;function d(e){let t=u();try{t?.startAppRegionDrag?.({x:e.clientX,y:e.clientY,pointerId:e.pointerId})?.catch?.(()=>{})}catch{}}function f(e){let t=globalThis.innerWidth,n=Math.max(0,Math.round(e.x)),r=Math.max(0,Math.round(t-e.x-e.width));N(s,n+(n>0?4:0)),N(c,r+(r>0?4:0))}ue(()=>{let e=u()?.overlay;if(!e)return;let t=null;return(async()=>{try{if(f(await e.getTitlebarAreaRect()),e.listen)t=await e.listen(`geometrychange`,e=>f(e.titlebarAreaRect));else if(e.addEventListener){let n=e=>f(e.titlebarAreaRect);e.addEventListener(`geometrychange`,n),t=()=>e.removeEventListener?.(`geometrychange`,n)}}catch{}})(),()=>{t?.()}});var p=Or(),h=U(p),_=e=>{var t=Y(),n=K(t);g(n,a),v(e,t)};m(h,e=>{r()===`main`&&a()&&e(_)});var y=R(h,4),x=e=>{var t=Y(),n=K(t);g(n,o),v(e,t)};m(y,e=>{r()===`main`&&o()&&e(x)}),n(p),V(()=>k(p,`padding-left: ${T(s)??``}px; padding-right: ${T(c)??``}px`)),l(`pointerdown`,p,d),v(e,p),b()}w([`pointerdown`]);function Ar(t){W(()=>e(()=>t()))}var jr=[`top`,`right`,`bottom`,`left`],Mr=Math.min,Nr=Math.max,Pr=Math.round,Fr=Math.floor,Ir=e=>({x:e,y:e}),Lr={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Rr(e,t,n){return Nr(e,Mr(t,n))}function zr(e,t){return typeof e==`function`?e(t):e}function Br(e){return e.split(`-`)[0]}function Vr(e){return e.split(`-`)[1]}function Hr(e){return e===`x`?`y`:`x`}function Ur(e){return e===`y`?`height`:`width`}function Wr(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Gr(e){return Hr(Wr(e))}function Kr(e,t,n){n===void 0&&(n=!1);let r=Vr(e),i=Gr(e),a=Ur(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=ti(o)),[o,ti(o)]}function qr(e){let t=ti(e);return[Jr(e),t,Jr(t)]}function Jr(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Yr=[`left`,`right`],Xr=[`right`,`left`],Zr=[`top`,`bottom`],Qr=[`bottom`,`top`];function $r(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Xr:Yr:t?Yr:Xr;case`left`:case`right`:return t?Zr:Qr;default:return[]}}function ei(e,t,n,r){let i=Vr(e),a=$r(Br(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Jr)))),a}function ti(e){let t=Br(e);return Lr[t]+e.slice(t.length)}function ni(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function ri(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:ni(e)}function ii(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function ai(e,t,n){let{reference:r,floating:i}=e,a=Wr(t),o=Gr(t),s=Ur(o),c=Br(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=Vr(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function oi(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=zr(t,e),p=ri(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=ii(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=ii(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var si=50,ci=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:oi},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=ai(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<si&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=ai(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},li=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=zr(e,t)||{};if(l==null)return{};let d=ri(u),f={x:n,y:r},p=Gr(i),m=Ur(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=Mr(d[_],T),D=Mr(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,ee=Rr(E,k,O),A=!c.arrow&&Vr(i)!=null&&k!==ee&&a.reference[m]/2-(k<E?E:D)-h[m]/2<0,j=A?k<E?k-E:k-O:0;return{[p]:f[p]+j,data:{[p]:ee,centerOffset:k-ee-j,...A&&{alignmentOffset:j}},reset:A}}}),ui=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=zr(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Br(r),_=Wr(o),v=Br(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[ti(o)]:qr(o)),x=p!==`none`;!d&&x&&b.push(...ei(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Kr(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===Wr(t)||T.every(e=>Wr(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Wr(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function di(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function fi(e){return jr.some(t=>e[t]>=0)}var pi=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=zr(e,t);switch(i){case`referenceHidden`:{let e=di(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:fi(e)}}}case`escaped`:{let e=di(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:fi(e)}}}default:return{}}}}},mi=new Set([`left`,`top`]);async function hi(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Br(n),s=Vr(n),c=Wr(n)===`y`,l=mi.has(o)?-1:1,u=a&&c?-1:1,d=zr(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var gi=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await hi(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},_i=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=zr(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Wr(i),p=Hr(f),m=u[p],h=u[f],g=(e,t)=>Rr(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},vi=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=zr(e,t),u={x:n,y:r},d=Wr(i),f=Hr(d),p=u[f],m=u[d],h=zr(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=mi.has(Br(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},yi=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=zr(e,t),c=await i.detectOverflow(t,s),l=Br(n),u=Vr(n),d=Wr(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=Mr(p-c[m],g),y=Mr(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*Nr(c.left,c.right):S=p-2*Nr(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function bi(){return typeof window<`u`}function xi(e){return wi(e)?(e.nodeName||``).toLowerCase():`#document`}function Si(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ci(e){return((wi(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function wi(e){return bi()?e instanceof Node||e instanceof Si(e).Node:!1}function Ti(e){return bi()?e instanceof Element||e instanceof Si(e).Element:!1}function Ei(e){return bi()?e instanceof HTMLElement||e instanceof Si(e).HTMLElement:!1}function Di(e){return!bi()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Si(e).ShadowRoot}function Oi(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=zi(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function ki(e){return/^(table|td|th)$/.test(xi(e))}function Ai(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var ji=/transform|translate|scale|rotate|perspective|filter/,Mi=/paint|layout|strict|content/,Ni=e=>!!e&&e!==`none`,Pi;function Fi(e){let t=Ti(e)?zi(e):e;return Ni(t.transform)||Ni(t.translate)||Ni(t.scale)||Ni(t.rotate)||Ni(t.perspective)||!Li()&&(Ni(t.backdropFilter)||Ni(t.filter))||ji.test(t.willChange||``)||Mi.test(t.contain||``)}function Ii(e){let t=Vi(e);for(;Ei(t)&&!Ri(t);){if(Fi(t))return t;if(Ai(t))return null;t=Vi(t)}return null}function Li(){return Pi??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Pi}function Ri(e){return/^(html|body|#document)$/.test(xi(e))}function zi(e){return Si(e).getComputedStyle(e)}function Bi(e){return Ti(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Vi(e){if(xi(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Di(e)&&e.host||Ci(e);return Di(t)?t.host:t}function Hi(e){let t=Vi(e);return Ri(t)?(e.ownerDocument||e).body:Ei(t)&&Oi(t)?t:Hi(t)}function Ui(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Hi(e),i=r===e.ownerDocument?.body,a=Si(r);if(i){let e=Wi(a);return t.concat(a,a.visualViewport||[],Oi(r)?r:[],e&&n?Ui(e):[])}return t.concat(r,Ui(r,[],n))}function Wi(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Gi(e){let t=zi(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Ei(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Pr(n)!==a||Pr(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Ki(e){return Ti(e)?e:e.contextElement}function qi(e){let t=Ki(e);if(!Ei(t))return Ir(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Gi(t),o=(a?Pr(n.width):n.width)/r,s=(a?Pr(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Ji=Ir(0);function Yi(e){let t=Si(e);return!Li()||!t.visualViewport?Ji:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Xi(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Si(e)}function Zi(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Ki(e),o=Ir(1);t&&(r?Ti(r)&&(o=qi(r)):o=qi(e));let s=Xi(a,n,r)?Yi(a):Ir(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=Si(a),t=Ti(r)?Si(r):r,n=e,i=Wi(n);for(;i&&t!==n;){let e=qi(i),t=i.getBoundingClientRect(),r=zi(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Si(i),i=Wi(n)}}return ii({width:u,height:d,x:c,y:l})}function Qi(e,t){let n=Bi(e).scrollLeft;return t?t.left+n:Zi(Ci(e)).left+n}function $i(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Qi(e,n),y:n.top+t.scrollTop}}function ea(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Ci(r),s=t?Ai(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Ir(1),u=Ir(0),d=Ei(r);if((d||!a)&&((xi(r)!==`body`||Oi(o))&&(c=Bi(r)),d)){let e=Zi(r);l=qi(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?$i(o,c):Ir(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function ta(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function na(e){let t=Bi(e),n=e.ownerDocument.body,r=Nr(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Nr(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Qi(e),o=-t.scrollTop;return zi(n).direction===`rtl`&&(a+=Nr(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var ra=25;function ia(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Si(e),a=Ci(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Li()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Qi(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=ra&&(s-=o)}return{width:s,height:c,x:l,y:u}}function aa(e,t){let n=Zi(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=qi(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function oa(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=ia(e,n,t);else if(t===`document`)r=na(Ci(e));else if(Ti(t))r=aa(t,n);else{let n=Yi(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return ii(r)}function sa(e,t){let n=t.get(e);if(n)return n;let r=Ui(e,[],!1).filter(e=>Ti(e)&&xi(e)!==`body`),i=null,a=zi(e).position===`fixed`,o=a?Vi(e):e;for(;Ti(o)&&!Ri(o);){let e=zi(o),t=Fi(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=Vi(o)}return t.set(e,r),r}function ca(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Ai(t)?[]:sa(t,this._c):[].concat(n),r],o=oa(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=oa(t,a[e],i);s=Nr(n.top,s),c=Mr(n.right,c),l=Mr(n.bottom,l),u=Nr(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function la(e){let{width:t,height:n}=Gi(e);return{width:t,height:n}}function ua(e,t,n){let r=Ei(t),i=Ci(t),a=n===`fixed`,o=Zi(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Ir(0);if((r||!a)&&((xi(t)!==`body`||Oi(i))&&(s=Bi(t)),r)){let e=Zi(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Qi(i));let l=i&&!r&&!a?$i(i,s):Ir(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function da(e){return zi(e).position===`static`}function fa(e,t){if(!Ei(e)||zi(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Ci(e)===n&&(n=n.ownerDocument.body),n}function pa(e,t){let n=Si(e);if(Ai(e))return n;if(!Ei(e)){let t=Vi(e);for(;t&&!Ri(t);){if(Ti(t)&&!da(t))return t;t=Vi(t)}return n}let r=fa(e,t);for(;r&&ki(r)&&da(r);)r=fa(r,t);return r&&Ri(r)&&da(r)&&!Fi(r)?n:r||Ii(e)||n}var ma=async function(e){let t=this.getOffsetParent||pa,n=this.getDimensions,r=await n(e.floating);return{reference:ua(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ha(e){return zi(e).direction===`rtl`}var ga={convertOffsetParentRelativeRectToViewportRelativeRect:ea,getDocumentElement:Ci,getClippingRect:ca,getOffsetParent:pa,getElementRects:ma,getClientRects:ta,getDimensions:la,getScale:qi,isElement:Ti,isRTL:ha};function _a(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function va(e,t,n){let r=null,i,a=Ci(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=Fr(d),h=Fr(a.clientWidth-(u+f)),g=Fr(a.clientHeight-(d+p)),_=Fr(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Nr(0,Mr(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!_a(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=Si(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function ya(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Ki(e),u=i||a?[...l?Ui(l):[],...t?Ui(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?va(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Zi(e):null;c&&g();function g(){let t=Zi(e);h&&!_a(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var ba=gi,xa=_i,Sa=ui,Ca=yi,wa=pi,Ta=li,Ea=vi,Da=(e,t,n)=>{let r=new Map,i=n??{},a={...ga,...i.platform,_c:r};return ci(e,t,{...i,platform:a})};function Oa(e){return typeof e==`function`?e():e}function ka(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Aa(e,t){let n=ka(e);return Math.round(t*n)/n}function ja(e){return{[`--bits-${e}-content-transform-origin`]:`var(--bits-floating-transform-origin)`,[`--bits-${e}-content-available-width`]:`var(--bits-floating-available-width)`,[`--bits-${e}-content-available-height`]:`var(--bits-floating-available-height)`,[`--bits-${e}-anchor-width`]:`var(--bits-floating-anchor-width)`,[`--bits-${e}-anchor-height`]:`var(--bits-floating-anchor-height)`}}function Ma(e){let t=e.whileElementsMounted,n=P(()=>Oa(e.open)??!0),r=P(()=>Oa(e.middleware)),i=P(()=>Oa(e.transform)??!0),a=P(()=>Oa(e.placement)??`bottom`),o=P(()=>Oa(e.strategy)??`absolute`),s=P(()=>Oa(e.sideOffset)??0),c=P(()=>Oa(e.alignOffset)??0),l=e.reference,u=B(0),d=B(0),f=Ft(null),p=B(de(T(o))),m=B(de(T(a))),h=B(de({})),g=B(!1),_=!1,v=0,y=P(()=>{let e=f.current?Aa(f.current,T(u)):T(u),t=f.current?Aa(f.current,T(d)):T(d);return T(i)?{position:T(p),left:`0`,top:`0`,transform:`translate(${e}px, ${t}px)`,...f.current&&ka(f.current)>=1.5&&{willChange:`transform`}}:{position:T(p),left:`${e}px`,top:`${t}px`}}),b;function x(){if(l.current===null||f.current===null)return;let e=l.current,t=f.current,i=++v;Da(e,t,{middleware:T(r),placement:T(a),strategy:T(o)}).then(r=>{if(i===v&&l.current===e&&f.current===t){if(Na(e)){N(h,{...T(h),hide:{...T(h).hide,referenceHidden:!0}},!0);return}if(!T(n)&&T(u)!==0&&T(d)!==0){let e=Math.max(Math.abs(T(s)),Math.abs(T(c)),15);if(r.x<=e&&r.y<=e)return}N(u,r.x,!0),N(d,r.y,!0),N(p,r.strategy,!0),N(m,r.placement,!0),N(h,r.middlewareData,!0),N(g,!0)}})}function S(){typeof b==`function`&&(b(),b=void 0),v++}function C(){if(S(),t===void 0){x();return}T(n)&&l.current!==null&&f.current!==null&&(b=t(l.current,f.current,x))}function w(){!T(n)&&f.current===null&&N(g,!1)}function E(){return[T(r),T(a),T(o),T(s),T(c),T(n)]}return W(()=>{t===void 0&&T(n)&&x()}),W(C),W(()=>{if(t!==void 0){if(E(),!T(n)){_=!1;return}if(!T(g)){_=!1;return}if(!_){_=!0;return}x()}}),W(w),W(()=>S),{floating:f,reference:l,get strategy(){return T(p)},get placement(){return T(m)},get middlewareData(){return T(h)},get isPositioned(){return T(g)},get floatingStyles(){return T(y)},get update(){return x}}}function Na(e){return e instanceof Element?!e.isConnected||e instanceof HTMLElement&&e.hidden?!0:e.getClientRects().length===0:!1}var Pa={top:`bottom`,right:`left`,bottom:`top`,left:`right`},Fa=new At(`Floating.Root`),Ia=new At(`Floating.Content`),La=new At(`Floating.Root`),Ra=class e{static create(t=!1){return t?La.set(new e):Fa.set(new e)}anchorNode=Ft(null);customAnchorNode=Ft(null);triggerNode=Ft(null);constructor(){W(()=>{this.customAnchorNode.current?typeof this.customAnchorNode.current==`string`?this.anchorNode.current=document.querySelector(this.customAnchorNode.current):this.anchorNode.current=this.customAnchorNode.current:this.anchorNode.current=this.triggerNode.current})}},za=class e{static create(t,n=!1){return n?Ia.set(new e(t,La.get())):Ia.set(new e(t,Fa.get()))}opts;root;contentRef=Ft(null);wrapperRef=Ft(null);arrowRef=Ft(null);contentAttachment=pn(this.contentRef);wrapperAttachment=pn(this.wrapperRef);arrowAttachment=pn(this.arrowRef);arrowId=Ft(Gt());#e=P(()=>{if(typeof this.opts.style==`string`)return Vt(this.opts.style);if(!this.opts.style)return{}});#t=void 0;#n=new zt(()=>this.arrowRef.current??void 0);#r=P(()=>this.#n?.width??0);#i=P(()=>this.#n?.height??0);#a=P(()=>this.opts.side?.current+(this.opts.align.current===`center`?``:`-${this.opts.align.current}`));#o=P(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]);#s=P(()=>T(this.#o).length>0);get hasExplicitBoundaries(){return T(this.#s)}set hasExplicitBoundaries(e){N(this.#s,e)}#c=P(()=>({padding:this.opts.collisionPadding.current,boundary:T(this.#o).filter(Tt),altBoundary:this.hasExplicitBoundaries}));get detectOverflowOptions(){return T(this.#c)}set detectOverflowOptions(e){N(this.#c,e)}#l=B(void 0);#u=B(void 0);#d=B(void 0);#f=B(void 0);#p=P(()=>[ba({mainAxis:this.opts.sideOffset.current+T(this.#i),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&xa({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current===`partial`?Ea():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&Sa({...this.detectOverflowOptions}),Ca({...this.detectOverflowOptions,apply:({rects:e,availableWidth:t,availableHeight:n})=>{let{width:r,height:i}=e.reference;N(this.#l,t,!0),N(this.#u,n,!0),N(this.#d,r,!0),N(this.#f,i,!0)}}),this.arrowRef.current&&Ta({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),Va({arrowWidth:T(this.#r),arrowHeight:T(this.#i)}),this.opts.hideWhenDetached.current&&wa({strategy:`referenceHidden`,...this.detectOverflowOptions})].filter(Boolean));get middleware(){return T(this.#p)}set middleware(e){N(this.#p,e)}floating;#m=P(()=>Ua(this.floating.placement));get placedSide(){return T(this.#m)}set placedSide(e){N(this.#m,e)}#h=P(()=>Wa(this.floating.placement));get placedAlign(){return T(this.#h)}set placedAlign(e){N(this.#h,e)}#g=P(()=>this.floating.middlewareData.arrow?.x??0);get arrowX(){return T(this.#g)}set arrowX(e){N(this.#g,e)}#_=P(()=>this.floating.middlewareData.arrow?.y??0);get arrowY(){return T(this.#_)}set arrowY(e){N(this.#_,e)}#v=P(()=>this.floating.middlewareData.arrow?.centerOffset!==0);get cannotCenterArrow(){return T(this.#v)}set cannotCenterArrow(e){N(this.#v,e)}#y=B();get contentZIndex(){return T(this.#y)}set contentZIndex(e){N(this.#y,e,!0)}#b=P(()=>Pa[this.placedSide]);get arrowBaseSide(){return T(this.#b)}set arrowBaseSide(e){N(this.#b,e)}#x=P(()=>({id:this.opts.wrapperId.current,"data-bits-floating-content-wrapper":``,style:{...this.floating.floatingStyles,transform:this.floating.isPositioned?this.floating.floatingStyles.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:this.contentZIndex,"--bits-floating-transform-origin":`${this.floating.middlewareData.transformOrigin?.x} ${this.floating.middlewareData.transformOrigin?.y}`,"--bits-floating-available-width":`${T(this.#l)}px`,"--bits-floating-available-height":`${T(this.#u)}px`,"--bits-floating-anchor-width":`${T(this.#d)}px`,"--bits-floating-anchor-height":`${T(this.#f)}px`,...this.floating.middlewareData.hide?.referenceHidden&&{visibility:`hidden`,"pointer-events":`none`},...T(this.#e)},dir:this.opts.dir.current,...this.wrapperAttachment}));get wrapperProps(){return T(this.#x)}set wrapperProps(e){N(this.#x,e)}#S=P(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:kt({...T(this.#e)}),...this.contentAttachment}));get props(){return T(this.#S)}set props(e){N(this.#S,e)}#C=P(()=>({position:`absolute`,left:this.arrowX?`${this.arrowX}px`:void 0,top:this.arrowY?`${this.arrowY}px`:void 0,[this.arrowBaseSide]:0,"transform-origin":{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[this.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[this.placedSide],visibility:this.cannotCenterArrow?`hidden`:void 0}));get arrowStyle(){return T(this.#C)}set arrowStyle(e){N(this.#C,e)}constructor(e,t){this.opts=e,this.root=t,this.#t=e.updatePositionStrategy,e.customAnchor&&(this.root.customAnchorNode.current=e.customAnchor.current),Et(()=>e.customAnchor.current,e=>{this.root.customAnchorNode.current=e}),this.floating=Ma({strategy:()=>this.opts.strategy.current,placement:()=>T(this.#a),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...e)=>ya(...e,{animationFrame:this.#t?.current===`always`}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),W(()=>{this.floating.isPositioned&&this.opts.onPlaced?.current()}),Et(()=>this.contentRef.current,e=>{if(!e||!this.opts.enabled.current)return;let t=St(e),n=t.requestAnimationFrame(()=>{if(this.contentRef.current!==e||!this.opts.enabled.current)return;let n=t.getComputedStyle(e).zIndex;n!==this.contentZIndex&&(this.contentZIndex=n)});return()=>{t.cancelAnimationFrame(n)}}),W(()=>{this.floating.floating.current=this.wrapperRef.current})}},Ba=class e{static create(t,n=!1){return n?new e(t,La.get()):new e(t,Fa.get())}opts;root;constructor(e,t){this.opts=e,this.root=t,t.triggerNode=e.virtualEl&&e.virtualEl.current?Bt(e.virtualEl.current):e.ref}};function Va(e){return{name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=Ha(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}}function Ha(e){let[t,n=`center`]=e.split(`-`);return[t,n]}function Ua(e){return Ha(e)[0]}function Wa(e){return Ha(e)[1]}function Ga(e,t){i(t,!0);let n=D(t,`tooltip`,3,!1);Ra.create(n());var r=Y(),a=K(r);g(a,()=>t.children??L),v(e,r),b()}function Ka(e,t){i(t,!0);let n=D(t,`tooltip`,3,!1);Ba.create({id:X(()=>t.id),virtualEl:X(()=>t.virtualEl),ref:t.ref},n());var r=Y(),a=K(r);g(a,()=>t.children??L),v(e,r),b()}function qa(e,t){i(t,!0);let n=D(t,`side`,3,`bottom`),r=D(t,`sideOffset`,3,0),a=D(t,`align`,3,`center`),o=D(t,`alignOffset`,3,0),s=D(t,`arrowPadding`,3,0),c=D(t,`avoidCollisions`,3,!0),l=D(t,`collisionBoundary`,19,()=>[]),u=D(t,`collisionPadding`,3,0),d=D(t,`hideWhenDetached`,3,!1),f=D(t,`onPlaced`,3,()=>{}),p=D(t,`sticky`,3,`partial`),m=D(t,`updatePositionStrategy`,3,`optimized`),h=D(t,`strategy`,3,`fixed`),_=D(t,`dir`,3,`ltr`),y=D(t,`style`,19,()=>({})),x=D(t,`wrapperId`,19,Gt),S=D(t,`customAnchor`,3,null),C=D(t,`tooltip`,3,!1),w=za.create({side:X(()=>n()),sideOffset:X(()=>r()),align:X(()=>a()),alignOffset:X(()=>o()),id:X(()=>t.id),arrowPadding:X(()=>s()),avoidCollisions:X(()=>c()),collisionBoundary:X(()=>l()),collisionPadding:X(()=>u()),hideWhenDetached:X(()=>d()),onPlaced:X(()=>f()),sticky:X(()=>p()),updatePositionStrategy:X(()=>m()),strategy:X(()=>h()),dir:X(()=>_()),style:X(()=>y()),enabled:X(()=>t.enabled),wrapperId:X(()=>x()),customAnchor:X(()=>S())},C()),E=P(()=>rn(w.wrapperProps,{style:{pointerEvents:`auto`}}));var O=Y(),k=K(O);g(k,()=>t.content??L,()=>({props:w.props,wrapperProps:T(E)})),v(e,O),b()}function Ja(e,t){i(t,!0),ue(()=>{t.onPlaced?.()});var n=Y(),r=K(n);g(r,()=>t.content??L,()=>({props:{},wrapperProps:{}})),v(e,n),b()}var Ya=new Set([`$$slots`,`$$events`,`$$legacy`,`content`,`isStatic`,`onPlaced`]);function Xa(e,t){let n=D(t,`isStatic`,3,!1),r=H(t,Ya);var i=Y(),a=K(i),o=e=>{Ja(e,{get content(){return t.content},get onPlaced(){return t.onPlaced}})},s=e=>{qa(e,G({get content(){return t.content},get onPlaced(){return t.onPlaced}},()=>r))};m(a,e=>{n()?e(o):e(s,-1)}),v(e,i)}var Za=new Set(`$$slots.$$events.$$legacy.popper.onEscapeKeydown.escapeKeydownBehavior.preventOverflowTextSelection.id.onPointerDown.onPointerUp.side.sideOffset.align.alignOffset.arrowPadding.avoidCollisions.collisionBoundary.collisionPadding.sticky.hideWhenDetached.updatePositionStrategy.strategy.dir.preventScroll.wrapperId.style.onPlaced.onInteractOutside.onCloseAutoFocus.onOpenAutoFocus.onFocusOutside.interactOutsideBehavior.loop.trapFocus.isValidEvent.customAnchor.isStatic.enabled.ref.tooltip.contentPointerEvents`.split(`.`)),Qa=r(`<!> <!>`,1);function $a(e,t){i(t,!0);let n=D(t,`interactOutsideBehavior`,3,`close`),r=D(t,`trapFocus`,3,!0),a=D(t,`isValidEvent`,3,()=>!1),o=D(t,`customAnchor`,3,null),s=D(t,`isStatic`,3,!1),c=D(t,`tooltip`,3,!1),l=D(t,`contentPointerEvents`,3,`auto`),u=H(t,Za),d=P(()=>t.preventScroll??!0),f=P(()=>t.strategy??(T(d)?`fixed`:`absolute`));Xa(e,{get isStatic(){return s()},get id(){return t.id},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return T(f)},get dir(){return t.dir},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return o()},get enabled(){return t.enabled},get tooltip(){return c()},content:(e,i)=>{let o=()=>(i?.()).props,s=()=>(i?.()).wrapperProps;var c=Qa(),f=K(c),p=e=>{on(e,{get preventScroll(){return T(d)}})},h=e=>{on(e,{get preventScroll(){return T(d)}})};m(f,e=>{t.forceMount&&t.enabled?e(p):t.forceMount||e(h,1)});var _=R(f,2);cn(_,{get onOpenAutoFocus(){return t.onOpenAutoFocus},get onCloseAutoFocus(){return t.onCloseAutoFocus},get loop(){return t.loop},get enabled(){return t.enabled},get trapFocus(){return r()},get forceMount(){return t.forceMount},get ref(){return t.ref},focusScope:(e,r)=>{let i=()=>(r?.()).props;Kt(e,{get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get enabled(){return t.enabled},get ref(){return t.ref},children:(e,r)=>{qt(e,{get id(){return t.id},get onInteractOutside(){return t.onInteractOutside},get onFocusOutside(){return t.onFocusOutside},get interactOutsideBehavior(){return n()},get isValidEvent(){return a()},get enabled(){return t.enabled},get ref(){return t.ref},children:(e,n)=>{let r=()=>(n?.()).props;Qt(e,{get id(){return t.id},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get enabled(){return t.enabled},get ref(){return t.ref},children:(e,n)=>{var a=Y(),c=K(a);{let e=P(()=>({props:rn(u,o(),r(),i(),{style:{pointerEvents:l()}}),wrapperProps:s()}));g(c,()=>t.popper??L,()=>T(e))}v(e,a)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),v(e,c)},$$slots:{content:!0}}),b()}var eo=new Set(`$$slots.$$events.$$legacy.popper.open.onEscapeKeydown.escapeKeydownBehavior.preventOverflowTextSelection.id.onPointerDown.onPointerUp.side.sideOffset.align.alignOffset.arrowPadding.avoidCollisions.collisionBoundary.collisionPadding.sticky.hideWhenDetached.updatePositionStrategy.strategy.dir.preventScroll.wrapperId.style.onPlaced.onInteractOutside.onCloseAutoFocus.onOpenAutoFocus.onFocusOutside.interactOutsideBehavior.loop.trapFocus.isValidEvent.customAnchor.isStatic.ref.shouldRender`.split(`.`));function to(e,t){let n=D(t,`interactOutsideBehavior`,3,`close`),r=D(t,`trapFocus`,3,!0),i=D(t,`isValidEvent`,3,()=>!1),a=D(t,`customAnchor`,3,null),o=D(t,`isStatic`,3,!1),s=H(t,eo);var c=Y(),l=K(c),u=e=>{$a(e,G({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return a()},get isStatic(){return o()},get enabled(){return t.open},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return n()},get loop(){return t.loop},get trapFocus(){return r()},get isValidEvent(){return i()},get onFocusOutside(){return t.onFocusOutside},forceMount:!1,get ref(){return t.ref}},()=>s))};m(l,e=>{t.shouldRender&&e(u)}),v(e,c)}var no=new Set(`$$slots.$$events.$$legacy.popper.onEscapeKeydown.escapeKeydownBehavior.preventOverflowTextSelection.id.onPointerDown.onPointerUp.side.sideOffset.align.alignOffset.arrowPadding.avoidCollisions.collisionBoundary.collisionPadding.sticky.hideWhenDetached.updatePositionStrategy.strategy.dir.preventScroll.wrapperId.style.onPlaced.onInteractOutside.onCloseAutoFocus.onOpenAutoFocus.onFocusOutside.interactOutsideBehavior.loop.trapFocus.isValidEvent.customAnchor.isStatic.enabled`.split(`.`));function ro(e,t){let n=D(t,`interactOutsideBehavior`,3,`close`),r=D(t,`trapFocus`,3,!0),i=D(t,`isValidEvent`,3,()=>!1),a=D(t,`customAnchor`,3,null),o=D(t,`isStatic`,3,!1),s=H(t,no);$a(e,G({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return a()},get isStatic(){return o()},get enabled(){return t.enabled},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return n()},get loop(){return t.loop},get trapFocus(){return r()},get isValidEvent(){return i()},get onFocusOutside(){return t.onFocusOutside}},()=>s,{forceMount:!0}))}function io(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function ao(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function oo(e){if(typeof CSS<`u`&&typeof CSS.escape==`function`)return CSS.escape(e);let t=e.length,n=-1,r,i=``,a=e.charCodeAt(0);if(t===1&&a===45)return`\\`+e;for(;++n<t;){if(r=e.charCodeAt(n),r===0){i+=`�`;continue}if(r>=1&&r<=31||r===127||n===0&&r>=48&&r<=57||n===1&&r>=48&&r<=57&&a===45){i+=`\\`+r.toString(16)+` `;continue}if(r>=128||r===45||r===95||r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122){i+=e.charAt(n);continue}i+=`\\`+e.charAt(n)}return i}var so=`data-value`,co=Ot({component:`command`,parts:[`root`,`list`,`input`,`separator`,`loading`,`empty`,`group`,`group-items`,`group-heading`,`item`,`viewport`,`input-label`]}),lo=co.selector(`group`),uo=co.selector(`group-items`),fo=co.selector(`group-heading`),po=co.selector(`item`),mo=`${co.selector(`item`)}:not([aria-disabled="true"])`,ho=new At(`Command.Root`),go=new At(`Command.List`),_o=new At(`Command.Group`),vo={search:``,value:``,filtered:{count:0,items:new Map,groups:new Set}},yo=class e{static create(t){return ho.set(new e(t))}opts;attachment;#e=!1;#t=!0;sortAfterTick=!1;sortAndFilterAfterTick=!1;allItems=new Set;allGroups=new Map;allIds=new Map;#n=B(0);get key(){return T(this.#n)}set key(e){N(this.#n,e,!0)}#r=B(null);get viewportNode(){return T(this.#r)}set viewportNode(e){N(this.#r,e,!0)}#i=B(null);get inputNode(){return T(this.#i)}set inputNode(e){N(this.#i,e,!0)}#a=B(null);get labelNode(){return T(this.#a)}set labelNode(e){N(this.#a,e,!0)}#o=B(vo);get commandState(){return T(this.#o)}set commandState(e){N(this.#o,e)}#s=B(de(vo));get _commandState(){return T(this.#s)}set _commandState(e){N(this.#s,e,!0)}#c(){return o(this._commandState)}#l(){this.#e||(this.#e=!0,Rt(()=>{this.#e=!1;let e=this.#c();Object.is(this.commandState,e)||(this.commandState=e,this.opts.onStateChange?.current?.(e))}))}setState(e,t,n){Object.is(this._commandState[e],t)||(this._commandState[e]=t,e===`search`?(this.#m(),this.#d()):e===`value`&&(n||this.#g()),this.#l())}constructor(e){this.opts=e,this.attachment=pn(this.opts.ref);let t={...this._commandState,value:this.opts.value.current??``};this._commandState=t,this.commandState=t,this.onkeydown=this.onkeydown.bind(this)}#u(e,t){let n=this.opts.filter.current??Cs;return e?n(e,this._commandState.search,t):0}#d(){if(!this._commandState.search||this.opts.shouldFilter.current===!1){!this._commandState.value||!this.#t?this.#f():this.#t&&this._commandState.value&&this.#p();return}let e=this._commandState.filtered.items,t=[];for(let n of this._commandState.filtered.groups){let r=this.allGroups.get(n),i=0;if(!r){t.push([n,i]);continue}for(let t of r){let n=e.get(t);i=Math.max(n??0,i)}t.push([n,i])}let n=this.viewportNode,r=this.getValidItems().sort((t,n)=>{let r=t.getAttribute(`data-value`),i=n.getAttribute(`data-value`),a=e.get(r)??0;return(e.get(i)??0)-a});for(let e of r){let t=e.closest(uo);if(t){let n=e.parentElement===t?e:e.closest(`${uo} > *`);n&&t.appendChild(n)}else{let t=e.parentElement===n?e:e.closest(`${uo} > *`);t&&n?.appendChild(t)}}let i=t.sort((e,t)=>t[1]-e[1]);for(let e of i){let t=n?.querySelector(`${lo}[${so}="${oo(e[0])}"]`);t?.parentElement?.appendChild(t)}this.#f()}setValue(e,t){e!==this.opts.value.current&&e===``&&Rt(()=>{this.key++}),this.setState(`value`,e,t),this.opts.value.current=e}#f(){Rt(()=>{let e=this.getValidItems().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(so),t=this.#t&&this.opts.disableInitialScroll.current;this.setValue(e??``,t),this.#t=!1})}#p(){Rt(()=>{this.opts.disableInitialScroll.current||this.#g(),this.#t=!1})}#m(){if(!this._commandState.search||this.opts.shouldFilter.current===!1){this._commandState.filtered.count=this.allItems.size;return}this._commandState.filtered.groups=new Set;let e=0;for(let t of this.allItems){let n=this.allIds.get(t)?.value??``,r=this.allIds.get(t)?.keywords??[],i=this.#u(n,r);this._commandState.filtered.items.set(t,i),i>0&&e++}for(let[e,t]of this.allGroups)for(let n of t){let t=this._commandState.filtered.items.get(n);if(t&&t>0){this._commandState.filtered.groups.add(e);break}}this._commandState.filtered.count=e}getValidItems(){let e=this.opts.ref.current;return e?Array.from(e.querySelectorAll(mo)).filter(e=>!!e):[]}getVisibleItems(){let e=this.opts.ref.current;return e?Array.from(e.querySelectorAll(po)).filter(e=>!!e):[]}get itemsGrid(){if(!this.isGrid)return[];let e=this.opts.columns.current??1,t=this.getVisibleItems(),n=[[]],r=t[0]?.getAttribute(`data-group`),i=0,a=0;for(let o=0;o<t.length;o++){let s=t[o],c=s?.getAttribute(`data-group`);r===c?(i++,i>e&&(a++,i=1,n.push([])),n[a]?.push({index:o,firstRowOfGroup:n[a]?.[0]?.firstRowOfGroup??o===0,ref:s})):(r=c,i=1,a++,n.push([{index:o,firstRowOfGroup:!0,ref:s}]))}return n}#h(){let e=this.opts.ref.current;if(!e)return;let t=e.querySelector(`${mo}[data-selected]`);if(t)return t}#g(){Rt(()=>{let e=this.#h();if(!e)return;let t=e.parentElement?.parentElement;if(t){if(this.isGrid){let t=this.#_(e);if(e.scrollIntoView({block:`nearest`}),t){(e?.closest(lo)?.querySelector(fo))?.scrollIntoView({block:`nearest`});return}}else{let n=dn(t);if(n&&n.dataset?.value===e.dataset?.value){(e?.closest(lo)?.querySelector(fo))?.scrollIntoView({block:`nearest`});return}}e.scrollIntoView({block:`nearest`})}})}#_(e){let t=this.itemsGrid;if(t.length===0)return!1;for(let n=0;n<t.length;n++){let r=t[n];if(r!==void 0)for(let t=0;t<r.length;t++){let n=r[t];if(n!==void 0&&n.ref===e)return n.firstRowOfGroup}}return!1}updateSelectedToIndex(e){let t=this.getValidItems()[e];t&&this.setValue(t.getAttribute(so)??``)}updateSelectedByItem(e){let t=this.#h(),n=this.getValidItems(),r=n.findIndex(e=>e===t),i=n[r+e];this.opts.loop.current&&(i=r+e<0?n[n.length-1]:r+e===n.length?n[0]:n[r+e]),i&&this.setValue(i.getAttribute(so)??``)}updateSelectedByGroup(e){let t=this.#h()?.closest(lo),n;for(;t&&!n;)t=e>0?io(t,lo):ao(t,lo),n=t?.querySelector(mo);n?this.setValue(n.getAttribute(so)??``):this.updateSelectedByItem(e)}registerValue(e,t){return e&&e===this.allIds.get(e)?.value||this.allIds.set(e,{value:e,keywords:t}),this._commandState.filtered.items.set(e,this.#u(e,t)),this.sortAfterTick||(this.sortAfterTick=!0,Rt(()=>{this.#d(),this.sortAfterTick=!1})),()=>{this.allIds.delete(e)}}registerItem(e,t){return this.allItems.add(e),t&&(this.allGroups.has(t)?this.allGroups.get(t).add(e):this.allGroups.set(t,new Set([e]))),this.sortAndFilterAfterTick||(this.sortAndFilterAfterTick=!0,Rt(()=>{this.#m(),this.#d(),this.sortAndFilterAfterTick=!1})),this.#l(),()=>{let t=this.#h();this.allItems.delete(e),this.commandState.filtered.items.delete(e),this.#m(),t?.getAttribute(`id`)===e&&this.#f(),this.#l()}}registerGroup(e){return this.allGroups.has(e)||this.allGroups.set(e,new Set),()=>{this.allIds.delete(e),this.allGroups.delete(e)}}get isGrid(){return this.opts.columns.current!==null}#v(){return this.updateSelectedToIndex(this.getValidItems().length-1)}#y(e){e.preventDefault(),e.metaKey?this.#v():e.altKey?this.updateSelectedByGroup(1):this.updateSelectedByItem(1)}#b(e){this.opts.columns.current!==null&&(e.preventDefault(),e.metaKey?this.updateSelectedByGroup(1):this.updateSelectedByItem(this.#S(e)))}#x(e,t){if(t.length===0)return null;for(let n=0;n<t.length;n++){let r=t[n];if(r!==void 0)for(let t=0;t<r.length;t++){let i=r[t];if(i!==void 0&&i.ref===e)return{columnIndex:t,rowIndex:n}}}return null}#S(e){let t=this.itemsGrid,n=this.#h();if(!n)return 0;let r=this.#x(n,t);if(!r)return 0;let i=null,a=+!!e.altKey;if(e.altKey&&r.rowIndex===t.length-2&&!this.opts.loop.current)i=this.#C({start:t.length-1,end:t.length,expectedColumnIndex:r.columnIndex,grid:t});else if(r.rowIndex===t.length-1){if(!this.opts.loop.current)return 0;i=this.#C({start:0+a,end:r.rowIndex,expectedColumnIndex:r.columnIndex,grid:t})}else i=this.#C({start:r.rowIndex+1+a,end:t.length,expectedColumnIndex:r.columnIndex,grid:t}),i===null&&this.opts.loop.current&&(i=this.#C({start:0,end:r.rowIndex,expectedColumnIndex:r.columnIndex,grid:t}));return this.#w(n,i)}#C({start:e,end:t,grid:n,expectedColumnIndex:r}){let i=null;for(let a=e;a<t;a++){let e=n[a];if(i=e[r]?.ref??null,i!==null&&bo(i)){i=null;continue}if(i===null)for(let t=e.length-1;t>=0;t--){let t=e[e.length-1];if(!(t===void 0||bo(t.ref))){i=t.ref;break}}break}return i}#w(e,t){if(t===null)return 0;let n=this.getValidItems(),r=n.findIndex(t=>t===e);return n.findIndex(e=>e===t)-r}#T(e){this.opts.columns.current!==null&&(e.preventDefault(),e.metaKey?this.updateSelectedByGroup(-1):this.updateSelectedByItem(this.#E(e)))}#E(e){let t=this.itemsGrid,n=this.#h();if(n===void 0)return 0;let r=this.#x(n,t);if(r===null)return 0;let i=null,a=+!!e.altKey;if(e.altKey&&r.rowIndex===1&&this.opts.loop.current===!1)i=this.#D({start:0,end:0,expectedColumnIndex:r.columnIndex,grid:t});else if(r.rowIndex===0){if(this.opts.loop.current===!1)return 0;i=this.#D({start:t.length-1-a,end:r.rowIndex+1,expectedColumnIndex:r.columnIndex,grid:t})}else i=this.#D({start:r.rowIndex-1-a,end:0,expectedColumnIndex:r.columnIndex,grid:t}),i===null&&this.opts.loop.current&&(i=this.#D({start:t.length-1,end:r.rowIndex+1,expectedColumnIndex:r.columnIndex,grid:t}));return this.#w(n,i)}#D({start:e,end:t,grid:n,expectedColumnIndex:r}){let i=null;for(let a=e;a>=t;a--){let e=n[a];if(e!==void 0){if(i=e[r]?.ref??null,i!==null&&bo(i)){i=null;continue}if(i===null)for(let t=e.length-1;t>=0;t--){let t=e[e.length-1];if(!(t===void 0||bo(t.ref))){i=t.ref;break}}break}}return i}#O(e){e.preventDefault(),e.metaKey?this.updateSelectedToIndex(0):e.altKey?this.updateSelectedByGroup(-1):this.updateSelectedByItem(-1)}onkeydown(e){let t=this.opts.vimBindings.current&&e.ctrlKey;switch(e.key){case`n`:case`j`:t&&(this.isGrid?this.#b(e):this.#y(e));break;case`l`:t&&this.isGrid&&this.#y(e);break;case wt:this.isGrid?this.#b(e):this.#y(e);break;case Zt:if(!this.isGrid)break;this.#y(e);break;case`p`:case`k`:t&&(this.isGrid?this.#T(e):this.#O(e));break;case`h`:t&&this.isGrid&&this.#O(e);break;case xt:this.isGrid?this.#T(e):this.#O(e);break;case Nt:if(!this.isGrid)break;this.#O(e);break;case jt:e.preventDefault(),this.updateSelectedToIndex(0);break;case`End`:e.preventDefault(),this.#v();break;case Xt:if(!e.isComposing&&e.keyCode!==229){e.preventDefault();let t=this.#h();t&&t?.click()}}}#k=P(()=>({id:this.opts.id.current,role:`application`,[co.root]:``,tabindex:-1,onkeydown:this.onkeydown,...this.attachment}));get props(){return T(this.#k)}set props(e){N(this.#k,e)}};function bo(e){return e.getAttribute(`aria-disabled`)===`true`}var xo=class e{static create(t){return new e(t,ho.get())}opts;root;attachment;#e=P(()=>this.root._commandState.filtered.count===0&&this.#t===!1||this.opts.forceMount.current);get shouldRender(){return T(this.#e)}set shouldRender(e){N(this.#e,e)}#t=!0;constructor(e,t){this.opts=e,this.root=t,this.attachment=pn(this.opts.ref),re(()=>{this.#t=!1})}#n=P(()=>({id:this.opts.id.current,role:`presentation`,[co.empty]:``,...this.attachment}));get props(){return T(this.#n)}set props(e){N(this.#n,e)}},So=class e{static create(t){return _o.set(new e(t,ho.get()))}opts;root;attachment;#e=P(()=>this.opts.forceMount.current||this.root.opts.shouldFilter.current===!1||!this.root.commandState.search?!0:this.root._commandState.filtered.groups.has(this.trueValue));get shouldRender(){return T(this.#e)}set shouldRender(e){N(this.#e,e)}#t=B(null);get headingNode(){return T(this.#t)}set headingNode(e){N(this.#t,e,!0)}#n=B(``);get trueValue(){return T(this.#n)}set trueValue(e){N(this.#n,e,!0)}constructor(e,t){this.opts=e,this.root=t,this.attachment=pn(this.opts.ref),this.trueValue=e.value.current??e.id.current,Et(()=>this.trueValue,()=>this.root.registerGroup(this.trueValue)),W(()=>this.opts.value.current?(this.trueValue=this.opts.value.current,this.root.registerValue(this.opts.value.current)):this.headingNode&&this.headingNode.textContent?(this.trueValue=this.headingNode.textContent.trim().toLowerCase(),this.root.registerValue(this.trueValue)):(this.trueValue=`-----${this.opts.id.current}`,this.root.registerValue(this.trueValue)))}#r=P(()=>({id:this.opts.id.current,role:`presentation`,hidden:!this.shouldRender||void 0,"data-value":this.trueValue,[co.group]:``,...this.attachment}));get props(){return T(this.#r)}set props(e){N(this.#r,e)}},Co=class e{static create(t){return new e(t,_o.get())}opts;group;attachment;constructor(e,t){this.opts=e,this.group=t,this.attachment=pn(this.opts.ref,e=>this.group.headingNode=e)}#e=P(()=>({id:this.opts.id.current,[co[`group-heading`]]:``,...this.attachment}));get props(){return T(this.#e)}set props(e){N(this.#e,e)}},wo=class e{static create(t){return new e(t,_o.get())}opts;group;attachment;constructor(e,t){this.opts=e,this.group=t,this.attachment=pn(this.opts.ref)}#e=P(()=>({id:this.opts.id.current,role:`group`,[co[`group-items`]]:``,"aria-labelledby":this.group.headingNode?.id??void 0,...this.attachment}));get props(){return T(this.#e)}set props(e){N(this.#e,e)}},To=class e{static create(t){return new e(t,ho.get())}opts;root;attachment;#e=P(()=>{let e=this.root.viewportNode?.querySelector(`${po}[${so}="${oo(this.root.opts.value.current)}"]`);if(e!=null)return e.getAttribute(`id`)??void 0});constructor(e,t){this.opts=e,this.root=t,this.attachment=pn(this.opts.ref,e=>this.root.inputNode=e),Et(()=>this.opts.ref.current,()=>{let e=this.opts.ref.current;e&&this.opts.autofocus.current&&Dt(10,()=>e.focus())}),Et(()=>this.opts.value.current,()=>{this.root.commandState.search!==this.opts.value.current&&this.root.setState(`search`,this.opts.value.current)})}#t=P(()=>({id:this.opts.id.current,type:`text`,[co.input]:``,autocomplete:`off`,autocorrect:`off`,spellcheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":Pt(!0),"aria-controls":this.root.viewportNode?.id??void 0,"aria-labelledby":this.root.labelNode?.id??void 0,"aria-activedescendant":T(this.#e),...this.attachment}));get props(){return T(this.#t)}set props(e){N(this.#t,e)}},Eo=class e{static create(t){let n=_o.getOr(null);return new e({...t,group:n},ho.get())}opts;root;attachment;#e=null;#t=P(()=>this.opts.forceMount.current||this.#e?.opts.forceMount.current===!0);#n=P(()=>{if(this.opts.ref.current,T(this.#t)||this.root.opts.shouldFilter.current===!1||!this.root.commandState.search)return!0;let e=this.root.commandState.filtered.items.get(this.trueValue);return e!==void 0&&e>0});get shouldRender(){return T(this.#n)}set shouldRender(e){N(this.#n,e)}#r=P(()=>this.root.opts.value.current===this.trueValue&&this.trueValue!==``);get isSelected(){return T(this.#r)}set isSelected(e){N(this.#r,e)}#i=B(``);get trueValue(){return T(this.#i)}set trueValue(e){N(this.#i,e,!0)}constructor(e,t){this.opts=e,this.root=t,this.#e=_o.getOr(null),this.trueValue=e.value.current,this.attachment=pn(this.opts.ref),Et([()=>this.trueValue,()=>this.#e?.trueValue,()=>this.opts.forceMount.current],()=>{if(!this.opts.forceMount.current&&this.trueValue)return this.root.registerItem(this.trueValue,this.#e?.trueValue)}),Et([()=>this.opts.value.current,()=>this.opts.ref.current],()=>{this.opts.value.current?this.trueValue=this.opts.value.current:this.opts.ref.current?.textContent&&(this.trueValue=this.opts.ref.current.textContent.trim()),this.trueValue&&(this.root.registerValue(this.trueValue,e.keywords.current.map(e=>e.trim())),this.opts.ref.current?.setAttribute(so,this.trueValue))}),this.onclick=this.onclick.bind(this),this.onpointermove=this.onpointermove.bind(this)}#a(){this.opts.disabled.current||(this.#o(),this.opts.onSelect?.current())}#o(){this.opts.disabled.current||this.root.setValue(this.trueValue,!0)}onpointermove(e){this.opts.disabled.current||this.root.opts.disablePointerSelection.current||this.#o()}onclick(e){this.opts.disabled.current||this.#a()}#s=P(()=>({id:this.opts.id.current,"aria-disabled":Pt(this.opts.disabled.current),"aria-selected":Pt(this.isSelected),"data-disabled":Mt(this.opts.disabled.current),"data-selected":Mt(this.isSelected),"data-value":this.trueValue,"data-group":this.#e?.trueValue,[co.item]:``,role:`option`,onpointermove:this.onpointermove,onclick:this.onclick,...this.attachment}));get props(){return T(this.#s)}set props(e){N(this.#s,e)}},Do=class e{static create(t){return new e(t)}opts;attachment;constructor(e){this.opts=e,this.attachment=pn(this.opts.ref)}#e=P(()=>({id:this.opts.id.current,role:`progressbar`,"aria-valuenow":this.opts.progress.current,"aria-valuemin":0,"aria-valuemax":100,"aria-label":`Loading...`,[co.loading]:``,...this.attachment}));get props(){return T(this.#e)}set props(e){N(this.#e,e)}},Oo=class e{static create(t){return go.set(new e(t,ho.get()))}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=pn(this.opts.ref)}#e=P(()=>({id:this.opts.id.current,role:`listbox`,"aria-label":this.opts.ariaLabel.current,[co.list]:``,...this.attachment}));get props(){return T(this.#e)}set props(e){N(this.#e,e)}},ko=class e{static create(t){return new e(t,ho.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=pn(this.opts.ref,e=>this.root.labelNode=e)}#e=P(()=>({id:this.opts.id.current,[co[`input-label`]]:``,for:this.opts.for?.current,style:mn,...this.attachment}));get props(){return T(this.#e)}set props(e){N(this.#e,e)}},Ao=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`children`]),jo=r(`<label><!></label>`);function Mo(e,t){let r=u();i(t,!0);let a=D(t,`id`,19,()=>Ct(r)),o=D(t,`ref`,15,null),s=H(t,Ao),c=ko.create({id:X(()=>a()),ref:X(()=>o(),e=>o(e))}),l=P(()=>rn(s,c.props));var d=jo();M(d,()=>({...T(l)}));var f=U(d);g(f,()=>t.children??L),n(d),v(e,d),b()}var No=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`value`,`onValueChange`,`onStateChange`,`loop`,`shouldFilter`,`filter`,`label`,`vimBindings`,`disablePointerSelection`,`disableInitialScroll`,`columns`,`children`,`child`]),Po=r(`<!> <!>`,1),Fo=r(`<div><!> <!></div>`);function Io(e,t){let r=u();i(t,!0);let a=e=>{Mo(e,{children:(e,t)=>{ae();var n=S();V(()=>c(n,y())),v(e,n)},$$slots:{default:!0}})},o=D(t,`id`,19,()=>Ct(r)),s=D(t,`ref`,15,null),l=D(t,`value`,15,``),d=D(t,`onValueChange`,3,un),f=D(t,`onStateChange`,3,un),p=D(t,`loop`,3,!1),h=D(t,`shouldFilter`,3,!0),_=D(t,`filter`,3,Cs),y=D(t,`label`,3,``),x=D(t,`vimBindings`,3,!0),C=D(t,`disablePointerSelection`,3,!1),w=D(t,`disableInitialScroll`,3,!1),E=D(t,`columns`,3,null),O=H(t,No),k=yo.create({id:X(()=>o()),ref:X(()=>s(),e=>s(e)),filter:X(()=>_()),shouldFilter:X(()=>h()),loop:X(()=>p()),value:X(()=>l(),e=>{l()!==e&&(l(e),d()(e))}),vimBindings:X(()=>x()),disablePointerSelection:X(()=>C()),disableInitialScroll:X(()=>w()),onStateChange:X(()=>f()),columns:X(()=>E())}),ee=e=>k.updateSelectedToIndex(e),A=e=>k.updateSelectedByGroup(e),j=e=>k.updateSelectedByItem(e),te=()=>k.getValidItems(),N=P(()=>rn(O,k.props));var F={updateSelectedToIndex:ee,updateSelectedByGroup:A,updateSelectedByItem:j,getValidItems:te},ne=Y(),re=K(ne),I=e=>{var n=Po(),r=K(n);a(r);var i=R(r,2);g(i,()=>t.child,()=>({props:T(N)})),v(e,n)},ie=e=>{var r=Fo();M(r,()=>({...T(N)}));var i=U(r);a(i);var o=R(i,2);g(o,()=>t.children??L),n(r),v(e,r)};return m(re,e=>{t.child?e(I):e(ie,-1)}),v(e,ne),b(F)}var Lo=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`children`,`child`,`forceMount`]),Ro=r(`<div><!></div>`);function zo(e,t){let r=u();i(t,!0);let a=D(t,`id`,19,()=>Ct(r)),o=D(t,`ref`,15,null),s=D(t,`forceMount`,3,!1),c=H(t,Lo),l=xo.create({id:X(()=>a()),ref:X(()=>o(),e=>o(e)),forceMount:X(()=>s())}),d=P(()=>rn(l.props,c));var f=Y(),p=K(f),h=e=>{var r=Y(),i=K(r),a=e=>{var n=Y(),r=K(n);g(r,()=>t.child,()=>({props:T(d)})),v(e,n)},o=e=>{var r=Ro();M(r,()=>({...T(d)}));var i=U(r);g(i,()=>t.children??L),n(r),v(e,r)};m(i,e=>{t.child?e(a):e(o,-1)}),v(e,r)};m(p,e=>{l.shouldRender&&e(h)}),v(e,f),b()}var Bo=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`value`,`forceMount`,`children`,`child`]),Vo=r(`<div><!></div>`);function Ho(e,t){let r=u();i(t,!0);let a=D(t,`id`,19,()=>Ct(r)),o=D(t,`ref`,15,null),s=D(t,`value`,3,``),c=D(t,`forceMount`,3,!1),l=H(t,Bo),d=So.create({id:X(()=>a()),ref:X(()=>o(),e=>o(e)),forceMount:X(()=>c()),value:X(()=>s())}),f=P(()=>rn(l,d.props));var p=Y(),h=K(p),_=e=>{var n=Y(),r=K(n);g(r,()=>t.child,()=>({props:T(f)})),v(e,n)},y=e=>{var r=Vo();M(r,()=>({...T(f)}));var i=U(r);g(i,()=>t.children??L),n(r),v(e,r)};m(h,e=>{t.child?e(_):e(y,-1)}),v(e,p),b()}var Uo=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`children`,`child`]),Wo=r(`<div><!></div>`);function Go(e,t){let r=u();i(t,!0);let a=D(t,`id`,19,()=>Ct(r)),o=D(t,`ref`,15,null),s=H(t,Uo),c=Co.create({id:X(()=>a()),ref:X(()=>o(),e=>o(e))}),l=P(()=>rn(s,c.props));var d=Y(),f=K(d),p=e=>{var n=Y(),r=K(n);g(r,()=>t.child,()=>({props:T(l)})),v(e,n)},h=e=>{var r=Wo();M(r,()=>({...T(l)}));var i=U(r);g(i,()=>t.children??L),n(r),v(e,r)};m(f,e=>{t.child?e(p):e(h,-1)}),v(e,d),b()}var Ko=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`children`,`child`]),qo=r(`<div><!></div>`),Jo=r(`<div style="display: contents;"><!></div>`);function Yo(e,t){let r=u();i(t,!0);let a=D(t,`id`,19,()=>Ct(r)),o=D(t,`ref`,15,null),s=H(t,Ko),c=wo.create({id:X(()=>a()),ref:X(()=>o(),e=>o(e))}),l=P(()=>rn(s,c.props));var d=Jo(),f=U(d),p=e=>{var n=Y(),r=K(n);g(r,()=>t.child,()=>({props:T(l)})),v(e,n)},h=e=>{var r=qo();M(r,()=>({...T(l)}));var i=U(r);g(i,()=>t.children??L),n(r),v(e,r)};m(f,e=>{t.child?e(p):e(h,-1)}),n(d),v(e,d),b()}var Xo=new Set([`$$slots`,`$$events`,`$$legacy`,`value`,`autofocus`,`id`,`ref`,`child`]),Zo=r(`<input/>`);function Qo(e,t){let n=u();i(t,!0);let r=D(t,`value`,15,``),a=D(t,`autofocus`,3,!1),o=D(t,`id`,19,()=>Ct(n)),s=D(t,`ref`,15,null),c=H(t,Xo),l=To.create({id:X(()=>o()),ref:X(()=>s(),e=>s(e)),value:X(()=>r(),e=>{r(e)}),autofocus:X(()=>a()??!1)}),d=P(()=>rn(c,l.props));var f=Y(),p=K(f),h=e=>{var n=Y(),r=K(n);g(r,()=>t.child,()=>({props:T(d)})),v(e,n)},_=e=>{var t=Zo();M(t,()=>({...T(d)}),void 0,void 0,void 0,void 0,!0),te(t,r),v(e,t)};m(p,e=>{t.child?e(h):e(_,-1)}),v(e,f),b()}var $o=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`value`,`disabled`,`children`,`child`,`onSelect`,`forceMount`,`keywords`]),es=r(`<div><!></div>`),ts=r(`<div style="display: contents;" data-item-wrapper=""><!></div>`);function ns(e,t){let r=u();i(t,!0);let a=D(t,`id`,19,()=>Ct(r)),o=D(t,`ref`,15,null),s=D(t,`value`,3,``),c=D(t,`disabled`,3,!1),l=D(t,`onSelect`,3,un),d=D(t,`forceMount`,3,!1),f=D(t,`keywords`,19,()=>[]),h=H(t,$o),_=Eo.create({id:X(()=>a()),ref:X(()=>o(),e=>o(e)),value:X(()=>s()),disabled:X(()=>c()),onSelect:X(()=>l()),forceMount:X(()=>d()),keywords:X(()=>f())}),y=P(()=>rn(h,_.props));var x=Y(),S=K(x);p(S,()=>_.root.key,e=>{var r=ts(),i=U(r),a=e=>{var r=Y(),i=K(r),a=e=>{var n=Y(),r=K(n);g(r,()=>t.child,()=>({props:T(y)})),v(e,n)},o=e=>{var r=es();M(r,()=>({...T(y)}));var i=U(r);g(i,()=>t.children??L),n(r),v(e,r)};m(i,e=>{t.child?e(a):e(o,-1)}),v(e,r)};m(i,e=>{_.shouldRender&&e(a)}),n(r),V(()=>z(r,`data-value`,_.trueValue)),v(e,r)}),v(e,x),b()}var rs=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`child`,`children`,`aria-label`]),is=r(`<div><!></div>`);function as(e,t){let r=u();i(t,!0);let a=D(t,`id`,19,()=>Ct(r)),o=D(t,`ref`,15,null),s=H(t,rs),c=Oo.create({id:X(()=>a()),ref:X(()=>o(),e=>o(e)),ariaLabel:X(()=>t[`aria-label`]??`Suggestions...`)}),l=P(()=>rn(s,c.props));var d=Y(),f=K(d);p(f,()=>c.root._commandState.search===``,e=>{var r=Y(),i=K(r),a=e=>{var n=Y(),r=K(n);g(r,()=>t.child,()=>({props:T(l)})),v(e,n)},o=e=>{var r=is();M(r,()=>({...T(l)}));var i=U(r);g(i,()=>t.children??L),n(r),v(e,r)};m(i,e=>{t.child?e(a):e(o,-1)}),v(e,r)}),v(e,d),b()}var os=new Set([`$$slots`,`$$events`,`$$legacy`,`progress`,`id`,`ref`,`children`,`child`]),ss=r(`<div><!></div>`);function cs(e,t){let r=u();i(t,!0);let a=D(t,`progress`,3,0),o=D(t,`id`,19,()=>Ct(r)),s=D(t,`ref`,15,null),c=H(t,os),l=Do.create({id:X(()=>o()),ref:X(()=>s(),e=>s(e)),progress:X(()=>a())}),d=P(()=>rn(c,l.props));var f=Y(),p=K(f),h=e=>{var n=Y(),r=K(n);g(r,()=>t.child,()=>({props:T(d)})),v(e,n)},_=e=>{var r=ss();M(r,()=>({...T(d)}));var i=U(r);g(i,()=>t.children??L),n(r),v(e,r)};m(p,e=>{t.child?e(h):e(_,-1)}),v(e,f),b()}var ls=1,us=.9,ds=.8,fs=.17,ps=.1,ms=.999,hs=.9999,gs=.99,_s=/[\\/_+.#"@[({&]/,vs=/[\\/_+.#"@[({&]/g,ys=/[\s-]/,bs=/[\s-]/g;function xs(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?ls:gs;let s=`${i},${a}`;if(o[s]!==void 0)return o[s];let c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;for(;l>=0;)d=xs(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=ls:_s.test(e.charAt(l-1))?(d*=ds,p=e.slice(i,l-1).match(vs),p&&i>0&&(d*=ms**p.length)):ys.test(e.charAt(l-1))?(d*=us,m=e.slice(i,l-1).match(bs),m&&i>0&&(d*=ms**m.length)):(d*=fs,i>0&&(d*=ms**(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=hs)),(d<ps&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=xs(e,t,n,r,l+1,a+2,o),f*ps>d&&(d=f*ps)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function Ss(e){return e.toLowerCase().replace(bs,` `)}function Cs(e,t,n){return e=n&&n.length>0?`${`${e} ${n?.join(` `)}`}`:e,xs(e,t,Ss(e),Ss(t),0,0,{})}var ws=new Set([`$$slots`,`$$events`,`$$legacy`,`child`,`children`,`ref`,`id`,`disabled`,`onSelect`,`closeOnSelect`]),Ts=r(`<div><!></div>`);function Es(e,t){let r=u();i(t,!0);let a=D(t,`ref`,15,null),o=D(t,`id`,19,()=>Ct(r)),s=D(t,`disabled`,3,!1),c=D(t,`onSelect`,3,un),l=D(t,`closeOnSelect`,3,!0),d=H(t,ws),f=Ht.create({id:X(()=>o()),disabled:X(()=>s()),onSelect:X(()=>c()),ref:X(()=>a(),e=>a(e)),closeOnSelect:X(()=>l())}),p=P(()=>rn(d,f.props));var h=Y(),_=K(h),y=e=>{var n=Y(),r=K(n);g(r,()=>t.child,()=>({props:T(p)})),v(e,n)},x=e=>{var r=Ts();M(r,()=>({...T(p)}));var i=U(r);g(i,()=>t.children??L),n(r),v(e,r)};m(_,e=>{t.child?e(y):e(x,-1)}),v(e,h),b()}var Ds=new Set([`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`ref`,`id`]),Os=r(`<div><!></div>`);function ks(e,t){let r=u();i(t,!0);let a=D(t,`ref`,15,null),o=D(t,`id`,19,()=>Ct(r)),s=H(t,Ds),c=Jt.create({id:X(()=>o()),ref:X(()=>a(),e=>a(e))}),l=P(()=>rn(s,c.props));var d=Y(),f=K(d),p=e=>{var n=Y(),r=K(n);g(r,()=>t.child,()=>({props:T(l)})),v(e,n)},h=e=>{var r=Os();M(r,()=>({...T(l)}));var i=U(r);g(i,()=>t.children??L),n(r),v(e,r)};m(f,e=>{t.child?e(p):e(h,-1)}),v(e,d),b()}var As=new Set([`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`ref`,`id`]),js=r(`<div><!></div>`);function Ms(e,t){let r=u();i(t,!0);let a=D(t,`ref`,15,null),o=D(t,`id`,19,()=>Ct(r)),s=H(t,As),c=Yt.create({id:X(()=>o()),ref:X(()=>a(),e=>a(e))}),l=P(()=>rn(s,c.props));var d=Y(),f=K(d),p=e=>{var n=Y(),r=K(n);g(r,()=>t.child,()=>({props:T(l)})),v(e,n)},h=e=>{var r=js();M(r,()=>({...T(l)}));var i=U(r);g(i,()=>t.children??L),n(r),v(e,r)};m(f,e=>{t.child?e(p):e(h,-1)}),v(e,d),b()}var Ns=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`id`,`child`,`children`]),Ps=r(`<div><!></div>`);function Fs(e,t){let r=u();i(t,!0);let a=D(t,`ref`,15,null),o=D(t,`id`,19,()=>Ct(r)),s=H(t,Ns),c=Wt.create({id:X(()=>o()),ref:X(()=>a(),e=>a(e))}),l=P(()=>rn(s,c.props));var d=Y(),f=K(d),p=e=>{var n=Y(),r=K(n);g(r,()=>t.child,()=>({props:T(l)})),v(e,n)},h=e=>{var r=Ps();M(r,()=>({...T(l)}));var i=U(r);g(i,()=>t.children??L),n(r),v(e,r)};m(f,e=>{t.child?e(p):e(h,-1)}),v(e,d),b()}function Is(e,t){i(t,!0);let n=D(t,`open`,15,!1),r=D(t,`dir`,3,`ltr`),a=D(t,`onOpenChange`,3,un),o=D(t,`onOpenChangeComplete`,3,un),s=D(t,`_internal_variant`,3,`dropdown-menu`),c=D(t,`_internal_should_skip_exit_animation`,3,void 0),l=fn.create({variant:X(()=>s()),dir:X(()=>r()),onClose:()=>{n(!1),a()(!1)},shouldSkipExitAnimation:()=>c()?.()??!1});ln.create({open:X(()=>n(),e=>{n(e),a()(e)}),onOpenChangeComplete:X(()=>o())},l),Ga(e,{children:(e,n)=>{var r=Y(),i=K(r);g(i,()=>t.children??L),v(e,r)},$$slots:{default:!0}}),b()}var Ls=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`child`,`children`,`ref`,`loop`,`onInteractOutside`,`onEscapeKeydown`,`onCloseAutoFocus`,`forceMount`,`trapFocus`,`style`]),Rs=r(`<div><div><!></div></div>`);function zs(e,t){let r=u();i(t,!0);let a=D(t,`id`,19,()=>Ct(r)),o=D(t,`ref`,15,null),s=D(t,`loop`,3,!0),c=D(t,`onInteractOutside`,3,un),l=D(t,`onEscapeKeydown`,3,un),d=D(t,`onCloseAutoFocus`,3,un),f=D(t,`forceMount`,3,!1),p=D(t,`trapFocus`,3,!1),h=H(t,Ls),_=$t.create({id:X(()=>a()),loop:X(()=>s()),ref:X(()=>o(),e=>o(e)),onCloseAutoFocus:X(()=>d())}),y=P(()=>rn(h,_.props));function x(e){if(_.handleInteractOutside(e),!e.defaultPrevented&&(c()(e),!e.defaultPrevented)){if(e.target&&e.target instanceof Element){let t=`[${_.parentMenu.root.getBitsAttr(`sub-content`)}]`;if(e.target.closest(t))return}_.parentMenu.onClose()}}function S(e){l()(e),!e.defaultPrevented&&_.parentMenu.onClose()}var C=Y(),w=K(C),E=e=>{ro(e,G(()=>T(y),()=>_.popperProps,{get ref(){return _.opts.ref},get enabled(){return _.parentMenu.opts.open.current},onInteractOutside:x,onEscapeKeydown:S,get trapFocus(){return p()},get loop(){return s()},forceMount:!0,get id(){return a()},get shouldRender(){return _.shouldRender},popper:(e,r)=>{let i=()=>(r?.()).props,a=()=>(r?.()).wrapperProps,o=P(()=>rn(i(),{style:ja(`dropdown-menu`)},{style:t.style}));var s=Y(),c=K(s),l=e=>{var n=Y(),r=K(n);{let e=P(()=>({props:T(o),wrapperProps:a(),..._.snippetProps}));g(r,()=>t.child,()=>T(e))}v(e,n)},u=e=>{var r=Rs();M(r,()=>({...a()}));var i=U(r);M(i,()=>({...T(o)}));var s=U(i);g(s,()=>t.children??L),n(i),n(r),v(e,r)};m(c,e=>{t.child?e(l):e(u,-1)}),v(e,s)},$$slots:{popper:!0}}))},O=e=>{to(e,G(()=>T(y),()=>_.popperProps,{get ref(){return _.opts.ref},get open(){return _.parentMenu.opts.open.current},onInteractOutside:x,onEscapeKeydown:S,get trapFocus(){return p()},get loop(){return s()},forceMount:!1,get id(){return a()},get shouldRender(){return _.shouldRender},popper:(e,r)=>{let i=()=>(r?.()).props,a=()=>(r?.()).wrapperProps,o=P(()=>rn(i(),{style:ja(`dropdown-menu`)},{style:t.style}));var s=Y(),c=K(s),l=e=>{var n=Y(),r=K(n);{let e=P(()=>({props:T(o),wrapperProps:a(),..._.snippetProps}));g(r,()=>t.child,()=>T(e))}v(e,n)},u=e=>{var r=Rs();M(r,()=>({...a()}));var i=U(r);M(i,()=>({...T(o)}));var s=U(i);g(s,()=>t.children??L),n(i),n(r),v(e,r)};m(c,e=>{t.child?e(l):e(u,-1)}),v(e,s)},$$slots:{popper:!0}}))};m(w,e=>{f()?e(E):f()||e(O,1)}),v(e,C),b()}var Bs=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`child`,`children`,`disabled`,`type`]),Vs=r(`<button><!></button>`);function Hs(e,t){let r=u();i(t,!0);let a=D(t,`id`,19,()=>Ct(r)),o=D(t,`ref`,15,null),s=D(t,`disabled`,3,!1),c=D(t,`type`,3,`button`),l=H(t,Bs),d=nn.create({id:X(()=>a()),disabled:X(()=>s()??!1),ref:X(()=>o(),e=>o(e))}),f=P(()=>rn(l,d.props,{type:c()}));Ka(e,{get id(){return a()},get ref(){return d.opts.ref},children:(e,r)=>{var i=Y(),a=K(i),o=e=>{var n=Y(),r=K(n);g(r,()=>t.child,()=>({props:T(f)})),v(e,n)},s=e=>{var r=Vs();M(r,()=>({...T(f)}));var i=U(r);g(i,()=>t.children??L),n(r),v(e,r)};m(a,e=>{t.child?e(o):e(s,-1)}),v(e,i)},$$slots:{default:!0}}),b()}var Us=Ot({component:`label`,parts:[`root`]}),Ws=class e{static create(t){return new e(t)}opts;attachment;constructor(e){this.opts=e,this.attachment=pn(this.opts.ref),this.onmousedown=this.onmousedown.bind(this)}onmousedown(e){e.detail>1&&e.preventDefault()}#e=P(()=>({id:this.opts.id.current,[Us.root]:``,onmousedown:this.onmousedown,...this.attachment}));get props(){return T(this.#e)}set props(e){N(this.#e,e)}},Gs=new Set([`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`id`,`ref`,`for`]),Ks=r(`<label><!></label>`);function qs(e,t){let r=u();i(t,!0);let a=D(t,`id`,19,()=>Ct(r)),o=D(t,`ref`,15,null),s=H(t,Gs),c=Ws.create({id:X(()=>a()),ref:X(()=>o(),e=>o(e))}),l=P(()=>rn(s,c.props,{for:t.for}));var d=Y(),f=K(d),p=e=>{var n=Y(),r=K(n);g(r,()=>t.child,()=>({props:T(l)})),v(e,n)},h=e=>{var r=Ks();M(r,()=>({...T(l),for:t.for}));var i=U(r);g(i,()=>t.children??L),n(r),v(e,r)};m(f,e=>{t.child?e(p):e(h,-1)}),v(e,d),b()}var Js=class{#e;#t;#n=null;constructor(e,t){this.#t=e,this.#e=t,this.stop=this.stop.bind(this),this.start=this.start.bind(this),Lt(this.stop)}#r(){this.#n!==null&&(window.clearTimeout(this.#n),this.#n=null)}stop(){this.#r()}start(...e){this.#r(),this.#n=window.setTimeout(()=>{this.#n=null,this.#t(...e)},this.#e)}};Ot({component:`tooltip`,parts:[`content`,`trigger`]});var Ys=new At(`Tooltip.Provider`);new At(`Tooltip.Root`);var Xs=class e{static create(t){return Ys.set(new e(t))}opts;#e=B(!0);get isOpenDelayed(){return T(this.#e)}set isOpenDelayed(e){N(this.#e,e,!0)}isPointerInTransit=Ft(!1);#t;#n=B(null);constructor(e){this.opts=e,this.#t=new Js(()=>{this.isOpenDelayed=!0},this.opts.skipDelayDuration.current),Ar(()=>le(window,`scroll`,e=>{let t=T(this.#n);if(!t)return;let n=t.triggerNode;if(!n)return;let r=e.target;(r instanceof Element||r instanceof Document)&&r.contains(n)&&t.handleClose()}))}#r=()=>{if(this.opts.skipDelayDuration.current===0){this.isOpenDelayed=!0;return}this.#t.start()};#i=()=>{this.#t.stop()};onOpen=e=>{T(this.#n)&&T(this.#n)!==e&&T(this.#n).handleClose(),this.#i(),this.isOpenDelayed=!1,N(this.#n,e,!0)};onClose=e=>{T(this.#n)===e&&(N(this.#n,null),this.#r())};isTooltipOpen=e=>T(this.#n)===e};function Zs(e,t){i(t,!0);let n=D(t,`delayDuration`,3,700),r=D(t,`disableCloseOnTriggerClick`,3,!1),a=D(t,`disableHoverableContent`,3,!1),o=D(t,`disabled`,3,!1),s=D(t,`ignoreNonKeyboardFocus`,3,!1),c=D(t,`skipDelayDuration`,3,300);Xs.create({delayDuration:X(()=>n()),disableCloseOnTriggerClick:X(()=>r()),disableHoverableContent:X(()=>a()),disabled:X(()=>o()),ignoreNonKeyboardFocus:X(()=>s()),skipDelayDuration:X(()=>c())});var l=Y(),u=K(l);g(u,()=>t.children??L),v(e,l),b()}var Qs=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);function $s(e,t){i(t,!0);let n=D(t,`ref`,15,null),r=H(t,Qs);var o=Y(),s=K(o);{let e=P(()=>hn(`gap-2 text-xs/relaxed leading-none font-medium group-data-[disabled=true]:opacity-50 peer-disabled:opacity-50 flex items-center select-none group-data-[disabled=true]:pointer-events-none peer-disabled:cursor-not-allowed`,t.class));a(s,()=>qs,(t,i)=>{i(t,G({"data-slot":`label`,get class(){return T(e)}},()=>r,{get ref(){return n()},set ref(e){n(e)}}))})}v(e,o),b()}var ec=r(`<!> Import workspace`,1),tc=r(`<!> <!>`,1),nc=r(`<div class="rounded-md border border-destructive/40 bg-destructive/10 p-2.5 text-xs text-destructive"> </div>`),rc=r(`<!> Browse…`,1),ic=r(`Display name <span class="text-muted-foreground">(optional)</span>`,1),ac=r(`<!> Import`,1),oc=r(`<!> <!> <div class="space-y-3"><div class="space-y-1.5"><!> <div class="flex gap-2"><!> <!></div> <p class="text-xs text-muted-foreground">Absolute path to a directory containing skill folders.</p></div> <div class="space-y-1.5"><!> <!></div> <div class="flex justify-end gap-2 pt-1"><!> <!></div></div>`,1);function sc(e,t){i(t,!0);let r=B(!1);W(()=>{be.open=T(r)}),W(()=>{be.open&&N(r,!0)}),W(()=>{T(r)&&(N(o,``),N(s,``),N(u,null))});let o=B(``),s=B(``),l=B(!1),u=B(null),d=B(!0),f=B(!1);async function p(){N(f,!0);try{let e=await ht();if(!e.supported){N(d,!1);return}e.path!==null&&(N(o,e.path,!0),T(s).trim()||N(s,e.path.split(`/`).filter(Boolean).pop()??``,!0))}finally{N(f,!1)}}async function h(){if(!T(o).trim()){N(u,`A directory path is required.`);return}N(l,!0),N(u,null);try{let e=await _t(T(o).trim(),T(s).trim()||void 0);if(!e)return;N(r,!1),await he(gt(e))}catch(e){N(u,e instanceof Error?e.message:String(e),!0)}finally{N(l,!1)}}var g=Y(),_=K(g);a(_,()=>tn,(e,t)=>{t(e,{get open(){return T(r)},set open(e){N(r,e,!0)},children:(e,t)=>{var i=Y(),g=K(i);a(g,()=>en,(e,t)=>{t(e,{class:`sm:max-w-[460px]`,children:(e,t)=>{var i=oc(),g=K(i);a(g,()=>an,(e,t)=>{t(e,{children:(e,t)=>{var n=tc(),r=K(n);a(r,()=>Ut,(e,t)=>{t(e,{class:`flex items-center gap-2`,children:(e,t)=>{var n=ec(),r=K(n);xn(r,{class:`h-4 w-4`}),ae(),v(e,n)},$$slots:{default:!0}})});var i=R(r,2);a(i,()=>sn,(e,t)=>{t(e,{children:(e,t)=>{ae();var n=S(`Import a directory as a skill workspace. Its skills will be discovered and managed here.`);v(e,n)},$$slots:{default:!0}})}),v(e,n)},$$slots:{default:!0}})});var _=R(g,2),y=e=>{var t=nc(),n=j(t,!0);V(()=>c(n,T(u))),v(e,t)};m(_,e=>{T(u)&&e(y)});var b=R(_,2),x=U(b),C=U(x);$s(C,{for:`ws-path`,children:(e,t)=>{ae();var n=S(`Directory path`);v(e,n)},$$slots:{default:!0}});var w=R(C,2),E=U(w);bn(E,{id:`ws-path`,placeholder:`/Users/me/.claude/skills`,class:`font-mono text-xs`,get value(){return T(o)},set value(e){N(o,e,!0)}});var D=R(E,2),O=e=>{{let t=P(()=>T(f)||T(l));gn(e,{variant:`outline`,size:`sm`,class:`h-8 shrink-0 gap-1.5`,get disabled(){return T(t)},onclick:()=>void p(),children:(e,t)=>{var n=rc(),r=K(n),i=e=>{vn(e,{class:`h-3.5 w-3.5 animate-spin`})};m(r,e=>{T(f)&&e(i)}),ae(),v(e,n)},$$slots:{default:!0}})}};m(D,e=>{T(d)&&e(O)}),n(w),ae(2),n(x);var k=R(x,2),ee=U(k);$s(ee,{for:`ws-label`,children:(e,t)=>{ae();var n=ic();ae(),v(e,n)},$$slots:{default:!0}});var A=R(ee,2);bn(A,{id:`ws-label`,placeholder:`My Skills`,get value(){return T(s)},set value(e){N(s,e,!0)}}),n(k);var te=R(k,2),M=U(te);gn(M,{variant:`outline`,size:`sm`,onclick:()=>N(r,!1),children:(e,t)=>{ae();var n=S(`Cancel`);v(e,n)},$$slots:{default:!0}});var F=R(M,2);gn(F,{size:`sm`,get disabled(){return T(l)},onclick:h,children:(e,t)=>{var n=ac(),r=K(n),i=e=>{vn(e,{class:`h-3.5 w-3.5 animate-spin`})};m(r,e=>{T(l)&&e(i)}),ae(),v(e,n)},$$slots:{default:!0}}),n(te),n(b),v(e,i)},$$slots:{default:!0}})}),v(e,i)},$$slots:{default:!0}})}),v(e,g),b()}var cc=new Set([`$$slots`,`$$events`,`$$legacy`,`api`,`ref`,`value`,`class`]);function lc(e,t){i(t,!0);let n=D(t,`api`,15,null),r=D(t,`ref`,15,null),o=D(t,`value`,15,``),s=H(t,cc);var c=Y(),l=K(c);{let e=P(()=>hn(`bg-popover text-popover-foreground rounded-xl p-1 flex size-full flex-col overflow-hidden`,t.class));a(l,()=>Io,(t,i)=>{oe(i(t,G({"data-slot":`command`,get class(){return T(e)}},()=>s,{get value(){return o()},set value(e){o(e)},get ref(){return r()},set ref(e){r(e)}})),e=>n(e),()=>n())})}v(e,c),b()}var uc=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`]);function dc(e,t){i(t,!0);let n=D(t,`ref`,15,null),r=H(t,uc);var o=Y(),s=K(o);a(s,()=>cs,(e,t)=>{t(e,G(()=>r,{get ref(){return n()},set ref(e){n(e)}}))}),v(e,o),b()}var fc=new Set([`$$slots`,`$$events`,`$$legacy`,`open`,`ref`,`value`,`title`,`description`,`showCloseButton`,`portalProps`,`children`,`class`]),pc=r(`<!> <!>`,1);function mc(e,t){i(t,!0);let n=D(t,`open`,15,!1),r=D(t,`ref`,15,null),o=D(t,`value`,15,``),s=D(t,`title`,3,`Command Palette`),l=D(t,`description`,3,`Search for a command to run...`),u=D(t,`showCloseButton`,3,!1),d=H(t,fc);var f=Y(),p=K(f);a(p,()=>tn,(e,i)=>{i(e,G(()=>d,{get open(){return n()},set open(e){n(e)},children:(e,n)=>{var i=pc(),f=K(i);a(f,()=>an,(e,t)=>{t(e,{class:`sr-only`,children:(e,t)=>{var n=pc(),r=K(n);a(r,()=>Ut,(e,t)=>{t(e,{children:(e,t)=>{ae();var n=S();V(()=>c(n,s())),v(e,n)},$$slots:{default:!0}})});var i=R(r,2);a(i,()=>sn,(e,t)=>{t(e,{children:(e,t)=>{ae();var n=S();V(()=>c(n,l())),v(e,n)},$$slots:{default:!0}})}),v(e,n)},$$slots:{default:!0}})});var p=R(f,2);{let e=P(()=>hn(`rounded-xl! p-0 top-1/3 translate-y-0 overflow-hidden p-0`,t.class));a(p,()=>en,(n,i)=>{i(n,{get class(){return T(e)},get showCloseButton(){return u()},get portalProps(){return t.portalProps},children:(e,n)=>{lc(e,G(()=>d,{get children(){return t.children},get value(){return o()},set value(e){o(e)},get ref(){return r()},set ref(e){r(e)}}))},$$slots:{default:!0}})})}v(e,i)},$$slots:{default:!0}}))}),v(e,f),b()}var hc=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);function gc(e,t){i(t,!0);let n=D(t,`ref`,15,null),r=H(t,hc);var o=Y(),s=K(o);{let e=P(()=>hn(`py-6 text-center text-xs/relaxed`,t.class));a(s,()=>zo,(t,i)=>{i(t,G({"data-slot":`command-empty`,get class(){return T(e)}},()=>r,{get ref(){return n()},set ref(e){n(e)}}))})}v(e,o),b()}var _c=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`,`heading`,`value`]),vc=r(`<!> <!>`,1);function yc(e,t){i(t,!0);let n=D(t,`ref`,15,null),r=H(t,_c);var o=Y(),s=K(o);{let e=P(()=>hn(`text-foreground **:[[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 **:[[cmdk-group-heading]]:px-2.5 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium`,t.class)),i=P(()=>t.value??t.heading??`----${Gt()}`);a(s,()=>Ho,(o,s)=>{s(o,G({"data-slot":`command-group`,get class(){return T(e)},get value(){return T(i)}},()=>r,{get ref(){return n()},set ref(e){n(e)},children:(e,n)=>{var r=vc(),i=K(r),o=e=>{var n=Y(),r=K(n);a(r,()=>Go,(e,n)=>{n(e,{class:`text-muted-foreground px-2 py-1.5 text-xs font-medium`,children:(e,n)=>{ae();var r=S();V(()=>c(r,t.heading)),v(e,r)},$$slots:{default:!0}})}),v(e,n)};m(i,e=>{t.heading&&e(o)});var s=R(i,2);a(s,()=>Yo,(e,n)=>{n(e,{get children(){return t.children}})}),v(e,r)},$$slots:{default:!0}}))})}v(e,o),b()}var bc=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),xc=r(`<!> <!>`,1);function Sc(e,t){i(t,!0);let n=D(t,`ref`,15,null),r=H(t,bc);var o=Y(),s=K(o);{let e=P(()=>hn(`group/command-item data-selected:bg-muted data-selected:text-foreground data-selected:*:[svg]:text-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,t.class));a(s,()=>ns,(i,a)=>{a(i,G({"data-slot":`command-item`,get class(){return T(e)}},()=>r,{get ref(){return n()},set ref(e){n(e)},children:(e,n)=>{var r=xc(),i=K(r);g(i,()=>t.children??L);var a=R(i,2);Sn(a,{class:`cn-command-item-indicator ml-auto opacity-0 group-has-[[data-slot=command-shortcut]]/command-item:hidden group-data-[checked=true]/command-item:opacity-100`}),v(e,r)},$$slots:{default:!0}}))})}v(e,o),b()}var Cc=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),wc=r(`<div><!></div>`);function Tc(e,t){i(t,!0);let r=D(t,`ref`,15,null),a=H(t,Cc);var o=wc();M(o,e=>({"data-slot":`input-group`,role:`group`,class:e,...a}),[()=>hn(`group/input-group border-input bg-input/20 dark:bg-input/30 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/30 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 h-7 rounded-md border transition-colors in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-data-[align=block-end]:rounded-md has-data-[align=block-start]:rounded-md has-[[data-slot=input-group-control]:focus-visible]:ring-2 has-[[data-slot][aria-invalid=true]]:ring-2 has-[textarea]:rounded-md has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5 relative flex w-full min-w-0 items-center outline-none has-[>textarea]:h-auto`,t.class)]);var s=U(o);g(s,()=>t.children??L),n(o),oe(o,e=>r(e),()=>r()),v(e,o),b()}var Ec=_n({base:`text-muted-foreground **:data-[slot=kbd]:bg-muted-foreground/10 h-auto gap-1 py-2 text-xs/relaxed font-medium group-data-[disabled=true]/input-group:opacity-50 **:data-[slot=kbd]:rounded-[calc(var(--radius-sm)-2px)] **:data-[slot=kbd]:px-1 **:data-[slot=kbd]:text-[0.625rem] [&>svg:not([class*='size-'])]:size-3.5 flex cursor-text items-center justify-center select-none`,variants:{align:{"inline-start":`pl-2 has-[>button]:ml-[-0.275rem] has-[>kbd]:ml-[-0.275rem] order-first`,"inline-end":`pr-2 has-[>button]:mr-[-0.275rem] has-[>kbd]:mr-[-0.275rem] order-last`,"block-start":`px-2 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2 order-first w-full justify-start`,"block-end":`px-2 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2 order-last w-full justify-start`}},defaultVariants:{align:`inline-start`}}),Dc=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`,`align`]),Oc=r(`<div><!></div>`);function kc(e,t){i(t,!0);let r=D(t,`ref`,15,null),a=D(t,`align`,3,`inline-start`),o=H(t,Dc);var s=Oc(),c=e=>{e.target.closest(`button`)||e.currentTarget.parentElement?.querySelector(`input`)?.focus()};M(s,e=>({role:`group`,"data-slot":`input-group-addon`,"data-align":a(),class:e,onclick:c,...o}),[()=>hn(Ec({align:a()}),t.class)]);var l=U(s);g(l,()=>t.children??L),n(s),oe(s,e=>r(e),()=>r()),v(e,s),b()}_n({base:`gap-2 rounded-md text-xs/relaxed flex items-center shadow-none`,variants:{size:{xs:`h-5 gap-1 rounded-[calc(var(--radius-sm)-2px)] px-1 [&>svg:not([class*='size-'])]:size-3`,sm:`gap-1`,"icon-xs":`size-6 p-0 has-[>svg]:p-0`,"icon-sm":`size-7 p-0 has-[>svg]:p-0`}},defaultVariants:{size:`xs`}});var Ac=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`value`,`class`]);function jc(e,t){i(t,!0);let n=D(t,`ref`,15,null),r=D(t,`value`,15),a=H(t,Ac);{let i=P(()=>hn(`rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent flex-1`,t.class));bn(e,G({"data-slot":`input-group-control`,get class(){return T(i)}},()=>a,{get ref(){return n()},set ref(e){n(e)},get value(){return r()},set value(e){r(e)}}))}b()}var Mc=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`value`]),Nc=r(`<!> <!>`,1),Pc=r(`<div data-slot="command-input-wrapper" class="p-1 pb-0"><!></div>`);function Fc(e,t){i(t,!0);let r=D(t,`ref`,15,null),o=D(t,`value`,15,``),s=H(t,Mc);var c=Pc(),l=U(c);a(l,()=>Tc,(e,n)=>{n(e,{class:`bg-input/20 dark:bg-input/30 h-8!`,children:(e,n)=>{var i=Nc(),c=K(i);{let e=(e,t)=>{let n=()=>(t?.()).props;var i=Y(),s=K(i);a(s,()=>jc,(e,t)=>{t(e,G(n,{get value(){return o()},set value(e){o(e)},get ref(){return r()},set ref(e){r(e)}}))}),v(e,i)},n=P(()=>hn(`w-full text-xs/relaxed outline-hidden disabled:cursor-not-allowed disabled:opacity-50`,t.class));a(c,()=>Qo,(t,r)=>{r(t,G({get value(){return o()},"data-slot":`command-input`,get class(){return T(n)}},()=>s,{child:e,$$slots:{child:!0}}))})}var l=R(c,2);a(l,()=>kc,(e,t)=>{t(e,{children:(e,t)=>{wn(e,{class:`size-3.5 shrink-0 opacity-50`})},$$slots:{default:!0}})}),v(e,i)},$$slots:{default:!0}})}),n(c),v(e,c),b()}var Ic=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);function Lc(e,t){i(t,!0);let n=D(t,`ref`,15,null),r=H(t,Ic);var o=Y(),s=K(o);{let e=P(()=>hn(`no-scrollbar max-h-72 scroll-py-1 outline-none overflow-x-hidden overflow-y-auto`,t.class));a(s,()=>as,(t,i)=>{i(t,G({"data-slot":`command-list`,get class(){return T(e)}},()=>r,{get ref(){return n()},set ref(e){n(e)}}))})}v(e,o),b()}var Rc=new Set([`$$slots`,`$$events`,`$$legacy`]);function zc(e,t){let n=H(t,Rc),r=[[`path`,{d:`M11.35 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v5.35`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`}],[`path`,{d:`M14 19h6`}],[`path`,{d:`M17 16v6`}]];ve(e,G({name:`file-plus-corner`},()=>n,{get iconNode(){return r}}))}var Bc=new Set([`$$slots`,`$$events`,`$$legacy`]);function Vc(e,t){let n=H(t,Bc),r=[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`3`,rx:`1`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`14`,rx:`1`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`}]];ve(e,G({name:`layout-grid`},()=>n,{get iconNode(){return r}}))}var Hc=r(`<!> Workspaces`,1),Uc=r(`<!> Creator`,1),Wc=r(`<!> Repository`,1),Gc=r(`<!> Open search config`,1),Kc=r(`<!> <!> <!> <!>`,1),qc=r(`<!> <span class="flex-1 truncate"> </span> <span class="text-xs tabular-nums text-muted-foreground"> </span>`,1),Jc=r(`<div class="px-2.5 py-1.5 text-xs text-muted-foreground">Type to search skills across workspaces…</div>`),Yc=r(`<div class="px-2.5 py-1.5 text-xs text-destructive"> </div>`),Xc=r(`<div class="px-2.5 py-1.5 text-xs text-muted-foreground">No matching skill.</div>`),Zc=r(`<span class="hidden min-w-0 max-w-[45%] truncate text-xs text-muted-foreground sm:block"> </span>`),Qc=r(`<!> <span class="min-w-0 flex-1 truncate"> </span> <!>`,1),$c=r(`<!> <!>`,1);function el(e,n){i(n,!0);let r=B(!1),o=B(``);W(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`k`&&(e.preventDefault(),N(r,!T(r)))};return globalThis.addEventListener(`keydown`,e),()=>globalThis.removeEventListener(`keydown`,e)}),W(()=>{if(!T(r))return;let e=T(o).trim();if(!e)return;let t=setTimeout(()=>void dt(e,20),150);return()=>clearTimeout(t)}),W(()=>{T(r)||(N(o,``),ut())});function s(e){N(r,!1),e()}let l=P(()=>T(o).trim()),u=P(()=>ct.query===T(l)),d=P(()=>!T(u)||T(u)&&ct.searching),f=P(()=>{if(!T(l)||!T(u)||ct.error)return[];let e=[];for(let t of ct.results)for(let n of t.installations)e.push({key:`${n.workspaceId}:${n.providerId}:${t.id}`,result:t,workspaceId:n.workspaceId,providerId:n.providerId,heading:lt(n.workspaceId,n.providerId)});return e}),p=P(()=>{let e=new Map;for(let t of T(f)){let n=`${t.workspaceId}/${t.providerId}`,r=e.get(n)??{scope:n,heading:t.heading,rows:[]};r.rows.push(t),e.set(n,r)}return[...e.values()]});var h=Y(),g=K(h);a(g,()=>mc,(e,n)=>{n(e,{get open(){return T(r)},set open(e){N(r,e,!0)},children:(e,n)=>{var r=$c(),i=K(r);a(i,()=>Fc,(e,t)=>{t(e,{placeholder:`Search navigation, workspaces and skills…`,get value(){return T(o)},set value(e){N(o,e,!0)}})});var f=R(i,2);a(f,()=>Lc,(e,n)=>{n(e,{children:(e,n)=>{var r=Kc(),i=K(r),o=e=>{var t=Y(),n=K(t);a(n,()=>gc,(e,t)=>{t(e,{children:(e,t)=>{ae();var n=S(`No matching destination.`);v(e,n)},$$slots:{default:!0}})}),v(e,t)};m(i,e=>{T(l)||e(o)});var f=R(i,2);a(f,()=>yc,(e,t)=>{t(e,{heading:`Navigate`,children:(e,t)=>{var n=Kc(),r=K(n);a(r,()=>Sc,(e,t)=>{t(e,{onSelect:()=>s(()=>he(`/workspaces`)),value:`go workspaces manage locations`,children:(e,t)=>{var n=Hc();Vc(K(n),{class:`h-4 w-4`}),ae(),v(e,n)},$$slots:{default:!0}})});var i=R(r,2);a(i,()=>Sc,(e,t)=>{t(e,{onSelect:()=>s(()=>he(`/creator`)),value:`go creator new skill`,children:(e,t)=>{var n=Uc();zc(K(n),{class:`h-4 w-4`}),ae(),v(e,n)},$$slots:{default:!0}})});var o=R(i,2);a(o,()=>Sc,(e,t)=>{t(e,{onSelect:()=>s(()=>he(`/repository`)),value:`go repository browse remote`,children:(e,t)=>{var n=Wc(),r=K(n);En(r,{class:`h-4 w-4`}),ae(),v(e,n)},$$slots:{default:!0}})});var c=R(o,2);a(c,()=>Sc,(e,t)=>{t(e,{onSelect:()=>s(()=>void st()),value:`go search config toml`,children:(e,t)=>{var n=Gc(),r=K(n);Tn(r,{class:`h-4 w-4`}),ae(),v(e,n)},$$slots:{default:!0}})}),v(e,n)},$$slots:{default:!0}})});var h=R(f,2),g=e=>{var n=Y(),r=K(n);a(r,()=>yc,(e,n)=>{n(e,{heading:`Workspaces`,children:(e,n)=>{var r=Y(),i=K(r);t(i,17,()=>pt.workspaces,e=>e.id,(e,t)=>{var n=Y(),r=K(n);{let e=P(()=>`workspace ${T(t).label} ${T(t).path}`);a(r,()=>Sc,(n,r)=>{r(n,{get value(){return T(e)},onSelect:()=>s(()=>he(gt(T(t)))),children:(e,n)=>{var r=qc(),i=K(r);xn(i,{class:`h-4 w-4`});var a=R(i,2),o=j(a,!0),s=R(a,2),l=j(s,!0);V(()=>{c(o,T(t).label),c(l,T(t).skillCount??0)}),v(e,r)},$$slots:{default:!0}})})}v(e,n)}),v(e,r)},$$slots:{default:!0}})}),v(e,n)};m(h,e=>{pt.workspaces.length>0&&e(g)});var _=R(h,2),y=e=>{var t=Y(),n=K(t);a(n,()=>yc,(e,t)=>{t(e,{heading:`Skills`,value:`skills`,forceMount:!0,children:(e,t)=>{var n=Jc();v(e,n)},$$slots:{default:!0}})}),v(e,t)},b=e=>{var t=Y(),n=K(t);a(n,()=>yc,(e,t)=>{t(e,{heading:`Skills`,value:`skills`,forceMount:!0,children:(e,t)=>{var n=Y(),r=K(n);a(r,()=>dc,(e,t)=>{t(e,{children:(e,t)=>{ae();var n=S(`Searching skills…`);v(e,n)},$$slots:{default:!0}})}),v(e,n)},$$slots:{default:!0}})}),v(e,t)},x=e=>{var t=Y(),n=K(t);a(n,()=>yc,(e,t)=>{t(e,{heading:`Skills`,value:`skills`,forceMount:!0,children:(e,t)=>{var n=Yc(),r=j(n);V(()=>c(r,`Skill search failed — ${ct.error??``}`)),v(e,n)},$$slots:{default:!0}})}),v(e,t)},C=e=>{var t=Y(),n=K(t);a(n,()=>yc,(e,t)=>{t(e,{heading:`Skills`,value:`skills`,forceMount:!0,children:(e,t)=>{var n=Xc();v(e,n)},$$slots:{default:!0}})}),v(e,t)},w=e=>{var n=Y(),r=K(n);t(r,17,()=>T(p),e=>e.scope,(e,n)=>{var r=Y(),i=K(r);a(i,()=>yc,(e,r)=>{r(e,{get heading(){return T(n).heading},get value(){return T(n).scope},forceMount:!0,children:(e,r)=>{var i=Y(),o=K(i);t(o,17,()=>T(n).rows,e=>e.key,(e,t)=>{var n=Y(),r=K(n);{let e=P(()=>`skill ${T(t).result.name} ${T(t).key}`);a(r,()=>Sc,(n,r)=>{r(n,{get value(){return T(e)},forceMount:!0,onSelect:()=>s(()=>Me(`workspaces.provider`,{wsId:T(t).workspaceId,providerId:T(t).providerId},{skill:T(t).result.id,view:`detail`})),children:(e,n)=>{var r=Qc(),i=K(r);Dn(i,{class:`h-4 w-4 shrink-0`});var a=R(i,2),o=j(a,!0),s=R(a,2),l=e=>{var n=Zc(),r=j(n,!0);V(()=>c(r,T(t).result.description)),v(e,n)};m(s,e=>{T(t).result.description&&e(l)}),V(()=>c(o,T(t).result.name)),v(e,r)},$$slots:{default:!0}})})}v(e,n)}),v(e,i)},$$slots:{default:!0}})}),v(e,r)}),v(e,n)};m(_,e=>{T(l)?T(d)?e(b,1):T(u)&&ct.error?e(x,2):T(p).length===0?e(C,3):e(w,-1):e(y)}),v(e,r)},$$slots:{default:!0}})}),v(e,r)},$$slots:{default:!0}})}),v(e,h),b()}var tl=r(`<button class="text-xs font-medium text-primary hover:underline"> </button>`),nl=r(`<div class="pointer-events-auto flex items-center gap-3 rounded-md border border-border bg-popover px-4 py-2.5 text-sm"><span class="flex-1 text-foreground"> </span> <!> <button class="text-muted-foreground hover:text-foreground" aria-label="Dismiss notification" title="Dismiss notification"><!></button></div>`),rl=r(`<div class="pointer-events-none fixed bottom-4 right-4 z-50 flex flex-col gap-2" aria-live="polite" aria-relevant="additions text"></div>`);function il(e,r){i(r,!1),A();var a=rl();t(a,5,()=>yt,e=>e.id,(e,t)=>{var r=nl(),i=U(r),a=j(i,!0),o=R(i,2),s=e=>{var n=tl(),r=j(n,!0);V(()=>c(r,T(t).action.label)),l(`click`,n,()=>{T(t).action.run(),bt(T(t).id)}),v(e,n)};m(o,e=>{T(t).action&&e(s)});var u=R(o,2),d=U(u);yn(d,{class:`h-3.5 w-3.5`}),n(u),n(r),V(()=>c(a,T(t).message)),l(`click`,u,()=>bt(T(t).id)),v(e,r)}),n(a),v(e,a),b()}w([`click`]);var al=new Set([`$$slots`,`$$events`,`$$legacy`,`delayDuration`]);function ol(e,t){let n=D(t,`delayDuration`,3,0),r=H(t,al);var i=Y(),o=K(i);a(o,()=>Zs,(e,t)=>{t(e,G({get delayDuration(){return n()}},()=>r))}),v(e,i)}var sl=()=>navigator.opentrayWindow??navigator.opentray?.window??void 0,cl={width:960,height:680},ll={width:1100,height:760};async function ul(e){let t=sl();if(t?.resizeTo&&t.getBounds)try{let n=await t.getBounds(),r=Math.max(n.width,e.width),i=Math.max(n.height,e.height);if(r===n.width&&i===n.height)return;await t.resizeTo(r,i)}catch{}}var dl=new Set([`$$slots`,`$$events`,`$$legacy`]);function fl(e,t){let n=H(t,dl),r=[[`path`,{d:`M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3`}]];ve(e,G({name:`command`},()=>n,{get iconNode(){return r}}))}var pl=r(`<option>New session…</option>`),ml=r(`<option>No sessions</option>`),hl=r(`<option> </option>`),gl=r(`<button type="button" class="relative flex h-8 w-8 items-center justify-center rounded text-muted-foreground transition-colors after:absolute after:-inset-1.5 after:content-[''] hover:bg-muted hover:text-foreground" title="New session" aria-label="New session"><!></button>`),_l=r(`<header class="flex h-10 shrink-0 items-center gap-1 border-b border-border px-2"><span class="px-1 text-xs font-medium text-muted-foreground">Agent</span> <select class="h-8 min-w-0 flex-1 rounded-md border border-border bg-transparent px-2 py-0 text-xs" aria-label="Session"><!><!><!></select> <!> <button type="button" class="relative flex h-8 w-8 items-center justify-center rounded text-muted-foreground transition-colors after:absolute after:-inset-1.5 after:content-[''] hover:bg-muted hover:text-foreground" title="Close panel" aria-label="Close panel"><!></button></header>`);function vl(e,r){i(r,!0);let a=P(()=>{let e=Wn.sessions.find(e=>e.sessionId===Q.sessionId);return e?`${e.title||e.sessionId} (${e.status})`:void 0});var o=_l(),s=R(U(o),2),u=U(s),d=e=>{var t=pl();t.value=t.__value=``,v(e,t)};m(u,e=>{Q.sessionId===null&&e(d)});var f=R(u),p=e=>{var t=ml();t.value=t.__value=``,v(e,t)};m(f,e=>{Wn.sessions.length===0&&Q.sessionId!==null&&e(p)});var h=R(f);t(h,17,()=>Wn.sessions,e=>e.sessionId,(e,t)=>{var n=hl(),r=j(n),i={};V(e=>{c(r,`${e??``}
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../chunks/DzfSSVEB.js","../chunks/CmCJ0SKP.js","../chunks/DjZ7hdjX.js","../chunks/xihTtKlq.js","../chunks/eFUKcYMv.js","../chunks/BkEnd9_Z.js","../chunks/DH8yd93-.js","../chunks/pd7EK5wP.js","../chunks/BT2vrlul.js","../chunks/B8aGNSaH.js","../chunks/BTMBuftG.js","../chunks/1aUphu7Y.js","../chunks/DC5f4JBB.js","../chunks/DnPeA-9c.js","../chunks/BEPs9Z9s.js","../chunks/DZ_Kltd5.js","../chunks/DdHvRi0A.js","../chunks/a0LlqeqU.js","../chunks/M-b0y9AQ.js","../chunks/CpRvgjpe.js","../chunks/BIfnT_mK.js","../chunks/DvWG9eQi.js","../chunks/Bs27XW8_.js","../chunks/Bynub5xW.js","../chunks/Bl0jjuyR.js","../chunks/CI1OXbBG.js","../chunks/DYbgoqwH.js","../chunks/DF_TIB7n.js","../chunks/BDMeqoYB.js","../assets/shell.U4CQV8re.css","../chunks/DOjT7y5f.js","../chunks/F_BrNiaz.js","../chunks/ChvFFUWR.js","../chunks/s48N5eaK.js","../chunks/DKQHhdJ1.js","../chunks/D8Der6oM.js","../assets/ProviderView.BKgtsfqs.css","../chunks/GHFnehdP.js","../chunks/UeEccMjN.js","../chunks/CeR4do8T.js","../chunks/ClW_LCBS.js","../chunks/DApmS1g_.js","../chunks/HopcQwhZ.js","../chunks/BYNWtKcf.js","../chunks/BhCD2hsN.js","../chunks/HclGiUj8.js","../chunks/C67g-p2T.js","../chunks/DovL68qD.js","../assets/CreatorWorkspace.CvDsme_1.css","../chunks/BchFBl6r.js","../chunks/DTzqg7c9.js","../chunks/DVv6BdWV.js","../chunks/C_mgfJl-.js","../chunks/DBNjJ5Iw.js","../chunks/xAjQV7BZ.js","../chunks/Cy5ABld-.js","../chunks/Ba9GVGQ5.js","../chunks/CzkhJhvt.js","../assets/SettingsPage.DclbL_Wf.css"])))=>i.map(i=>d[i]);
2
+ import{$ as e,A as t,At as n,B as r,Ct as i,D as a,Dt as o,E as s,F as c,G as l,H as u,J as d,K as f,M as p,N as m,Nt as h,O as g,Q as _,R as v,S as y,St as b,T as x,U as S,V as C,W as w,X as T,_t as E,a as D,at as O,b as k,bt as ee,c as A,ct as j,d as te,f as M,ft as N,gt as P,h as F,ht as ne,it as re,j as I,jt as L,k as ie,kt as ae,l as oe,lt as R,m as z,mt as B,n as se,nt as V,o as H,ot as U,p as ce,q as le,r as ue,rt as W,s as G,st as K,ut as de,v as q,w as fe,wt as pe,x as J,y as me,z as Y}from"../chunks/CmCJ0SKP.js";import{t as he}from"../chunks/DjZ7hdjX.js";import{t as ge}from"../chunks/HclGiUj8.js";import"../chunks/xihTtKlq.js";import{t as _e}from"../chunks/BDMeqoYB.js";import"../chunks/eFUKcYMv.js";import{t as ve}from"../chunks/BkEnd9_Z.js";import{a as ye,i as be,n as xe,r as Se,s as Ce,t as we,u as Te}from"../chunks/DH8yd93-.js";import{c as Ee,d as De,f as Oe,i as ke,l as Ae,p as je,s as Me,t as Ne,u as Pe}from"../chunks/DF_TIB7n.js";import{A as Fe,C as Ie,D as Le,M as Re,O as ze,S as Be,T as Ve,b as He,c as Ue,f as We,i as Ge,j as Ke,n as qe,o as Je,r as Ye,s as Xe,v as Ze,x as Qe}from"../chunks/pd7EK5wP.js";import{t as $e}from"../chunks/BT2vrlul.js";import{d as et,g as tt,h as nt,m as rt,r as it,t as at,u as ot}from"../chunks/CzkhJhvt.js";import{a as st,c as ct,n as lt,o as ut,s as dt,u as ft}from"../chunks/B8aGNSaH.js";import{a as pt,n as mt,r as ht,s as gt,t as _t}from"../chunks/BTMBuftG.js";import{n as vt,r as yt,t as bt}from"../chunks/1aUphu7Y.js";import{A as xt,B as St,C as Ct,D as wt,E as Tt,G as Et,H as Dt,I as Ot,J as kt,K as At,M as jt,N as Mt,O as Nt,P as Pt,Q as Ft,S as It,U as Lt,V as Rt,W as zt,X as Bt,Y as Vt,Z as X,_ as Ht,a as Ut,b as Wt,c as Gt,d as Kt,f as qt,g as Jt,h as Yt,j as Xt,k as Zt,l as Qt,m as $t,n as en,o as tn,p as nn,q as rn,r as an,s as on,t as sn,u as cn,v as ln,w as un,x as dn,y as fn,z as pn}from"../chunks/DC5f4JBB.js";import{t as mn}from"../chunks/a0LlqeqU.js";import"../chunks/DZ_Kltd5.js";import{i as hn,n as gn,r as _n,t as vn}from"../chunks/DnPeA-9c.js";import{t as yn}from"../chunks/BEPs9Z9s.js";import{t as bn}from"../chunks/DOjT7y5f.js";import{t as xn}from"../chunks/DApmS1g_.js";import{t as Sn}from"../chunks/M-b0y9AQ.js";import{t as Cn}from"../chunks/Cy5ABld-.js";import{n as wn,t as Tn}from"../chunks/F_BrNiaz.js";import{t as En}from"../chunks/CpRvgjpe.js";import{t as Dn}from"../chunks/UeEccMjN.js";import{t as On}from"../chunks/BIfnT_mK.js";import{A as kn,B as An,D as jn,E as Mn,F as Nn,H as Pn,I as Fn,L as In,M as Z,N as Ln,O as Rn,P as zn,S as Bn,T as Vn,V as Hn,_ as Un,a as Wn,b as Gn,c as Kn,d as qn,f as Jn,i as Q,j as Yn,k as Xn,m as Zn,n as Qn,o as $n,p as er,r as tr,s as nr,t as rr,v as ir,x as ar,z as or}from"../chunks/DvWG9eQi.js";import{t as sr}from"../chunks/HopcQwhZ.js";import{n as cr,t as lr}from"../chunks/ChvFFUWR.js";import{t as ur}from"../chunks/C67g-p2T.js";var dr=h({prerender:()=>!1,ssr:()=>!1,trailingSlash:()=>fr}),fr=`ignore`;Ae({id:`workspaces`,name:`Workspaces`,icon:Te,activities:[Pe({pattern:`/workspaces`,entry:!0,root:De({id:`workspaces.home`,component:()=>ge(()=>import(`../chunks/DzfSSVEB.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]),import.meta.url)})}),Pe({pattern:`/workspaces`,root:Oe({id:`workspaces.provider`,pattern:`:wsId/:providerId`,params:Le({wsId:Qe,providerId:He}),search:Le({q:Fe().optional(),skill:Fe().optional(),view:Be([`list`,`detail`]).optional()}),component:()=>ge(()=>import(`../chunks/DYbgoqwH.js`),__vite__mapDeps([26,1,3,5,27,2,28,4,7,29,9,10,11,13,14,30,31,32,33,24,34,35,36]),import.meta.url)})}),Pe({pattern:`/workspaces`,root:Oe({id:`workspaces.intelligence`,pattern:`intelligence/:wsId/:providerId`,params:Le({wsId:Qe,providerId:He}),search:Le({severity:Be([`all`,`error`,`warning`,`info`]).optional()}),component:()=>ge(()=>import(`../chunks/GHFnehdP.js`),__vite__mapDeps([37,1,3,5,27,2,28,4,7,29,9,10,11,13,38,20,21,22,39,24,35]),import.meta.url)})})]});var pr=new Set([`$$slots`,`$$events`,`$$legacy`]);function mr(e,t){let n=H(t,pr),r=[[`path`,{d:`M14.364 13.634a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506l4.013-4.009a1 1 0 0 0-3.004-3.004z`}],[`path`,{d:`M14.487 7.858A1 1 0 0 1 14 7V2`}],[`path`,{d:`M20 19.645V20a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l2.516 2.516`}],[`path`,{d:`M8 18h1`}]];ve(e,G({name:`file-pen-line`},()=>n,{get iconNode(){return r}}))}Ae({id:`creator`,name:`Creator`,icon:mr,activities:[Pe({pattern:`/creator`,entry:!0,root:De({id:`creator.home`,component:()=>ge(()=>import(`../chunks/ClW_LCBS.js`),__vite__mapDeps([40,1,2,3,4,5,9,7,10,11,41,42,43]),import.meta.url)})}),Pe({pattern:`/creator`,root:Oe({id:`creator.workspace`,pattern:`:mode/:wsId/:providerId`,params:Le({mode:Be([`edit`,`new`]),wsId:Qe,providerId:He}),search:Le({subview:Be([`file`,`log`,`preview`,`validate`,`test`]).optional(),template:Fe().optional()}),component:()=>ge(()=>import(`../chunks/BhCD2hsN.js`),__vite__mapDeps([44,1,2,45,3,28,4,5,27,7,29,9,10,11,13,30,21,32,46,43,47,23,12,14,22,33,39,48]),import.meta.url),children:[Oe({id:`creator.workspace.skill`,pattern:`:skillId`,params:Le({skillId:Ze}),component:()=>ge(()=>import(`../chunks/BhCD2hsN.js`),__vite__mapDeps([44,1,2,45,3,28,4,5,27,7,29,9,10,11,13,30,21,32,46,43,47,23,12,14,22,33,39,48]),import.meta.url)})]})})]});var hr=new Set([`$$slots`,`$$events`,`$$legacy`]);function gr(e,t){let n=H(t,hr),r=[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`}],[`circle`,{cx:`18`,cy:`6`,r:`3`}],[`circle`,{cx:`6`,cy:`18`,r:`3`}]];ve(e,G({name:`git-branch`},()=>n,{get iconNode(){return r}}))}Ae({id:`repository`,name:`Repository`,icon:gr,activities:[Pe({pattern:`/repository`,entry:!0,root:Oe({id:`repository.home`,pattern:``,search:Le({q:Fe().optional()}),component:()=>ge(()=>import(`../chunks/BchFBl6r.js`),__vite__mapDeps([49,1,2,3,4,5,27,28,7,29,11,13,23,12,14,22,50]),import.meta.url),children:[Oe({id:`repository.scan`,pattern:`scan/:sourceId`,params:Le({sourceId:Fe().min(1).max(128).regex(/^[a-z0-9_-]+$/i)}),search:Le({selected:Fe().optional(),targets:Fe().optional(),skill:Fe().optional()}),component:()=>ge(()=>import(`../chunks/DVv6BdWV.js`),__vite__mapDeps([51,1,2,3,28,4,27,7,29,10,50]),import.meta.url)})]})})]}),Ae({id:`wiki`,name:`Wiki`,icon:$e,activities:[Pe({pattern:`/wiki`,entry:!0,root:De({id:`wiki.home`,component:()=>ge(()=>import(`../chunks/C_mgfJl-.js`),__vite__mapDeps([52,1,2,3,4,8,5,13,19,20,22,53,7,24,25]),import.meta.url)})}),Pe({pattern:`/wiki`,root:Oe({id:`wiki.scope`,pattern:`:wsId`,params:Le({wsId:Qe}),component:()=>ge(()=>import(`../chunks/xAjQV7BZ.js`),__vite__mapDeps([54,1,2,3,4,27,28,7,29,8,5,9,10,11,13,14,30,18,55,38,20,42,22,53,24,34]),import.meta.url)})})]});var _r=new Set([`$$slots`,`$$events`,`$$legacy`]);function vr(e,t){let n=H(t,_r),r=[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`}],[`circle`,{cx:`12`,cy:`12`,r:`3`}]];ve(e,G({name:`settings`},()=>n,{get iconNode(){return r}}))}Ae({id:`settings`,name:`Settings`,icon:vr,activities:[Pe({pattern:`/settings`,entry:!0,root:De({id:`settings.home`,component:()=>ge(()=>import(`../chunks/Ba9GVGQ5.js`),__vite__mapDeps([56,1,2,3,4,5,27,28,7,29,57,9,10,11,12,13,14,15,16,17,30,21,47,23,22,58]),import.meta.url)})}),Pe({pattern:`/settings`,root:Oe({id:`settings.section`,pattern:`:section`,params:Le({section:Be(nt)}),component:()=>ge(()=>import(`../chunks/Ba9GVGQ5.js`),__vite__mapDeps([56,1,2,3,4,5,27,28,7,29,57,9,10,11,12,13,14,15,16,17,30,21,47,23,22,58]),import.meta.url)})})]});var yr=new Set([`$$slots`,`$$events`,`$$legacy`]);function br(e,t){let n=H(t,yr),r=[[`path`,{d:`m11 17-5-5 5-5`}],[`path`,{d:`m18 17-5-5 5-5`}]];ve(e,G({name:`chevrons-left`},()=>n,{get iconNode(){return r}}))}var xr=new Set([`$$slots`,`$$events`,`$$legacy`]);function Sr(e,t){let n=H(t,xr),r=[[`path`,{d:`m6 17 5-5-5-5`}],[`path`,{d:`m13 17 5-5-5-5`}]];ve(e,G({name:`chevrons-right`},()=>n,{get iconNode(){return r}}))}var Cr=r(`<span class="truncate text-xs font-medium"> </span>`),wr=r(`<button><!> <!></button>`),Tr=r(`<span class="truncate text-xs font-medium">Import workspace</span>`),Er=r(`<nav aria-label="Apps"><!> <div></div> <button title="Import workspace" aria-label="Import workspace"><!> <!></button> <div><button class="flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"><!></button></div></nav>`);function Dr(e,r){i(r,!0);let o=P(()=>je.list()),s=P(()=>ke(_e.url.pathname)?.app??null),u=P(et);function d(e){he(`/${e}`)}var f=Er(),p=U(f);t(p,17,()=>T(o),e=>e.id,(e,t)=>{let r=P(()=>T(t).icon);var i=wr(),o=U(i);a(o,()=>T(r),(e,t)=>{t(e,{class:`h-5 w-5 shrink-0`})});var f=R(o,2),p=e=>{var n=Cr(),r=j(n,!0);V(()=>c(r,T(t).name)),v(e,n)};m(f,e=>{T(u)||e(p)}),n(i),V(()=>{J(i,1,`flex h-10 items-center rounded-lg transition-colors hover:bg-muted ${T(u)?`w-10 justify-center`:`w-[10.5rem] gap-2.5 px-3`} ${T(s)===T(t).id?`bg-accent text-primary ring-1 ring-inset ring-primary/25`:`text-muted-foreground`}`),z(i,`title`,T(t).name),z(i,`aria-label`,T(t).name),z(i,`aria-current`,T(s)===T(t).id?`page`:void 0)}),l(`click`,i,()=>d(T(t).id)),v(e,i)});var h=R(p,2),g=R(h,2),_=U(g);Se(_,{class:`h-5 w-5 shrink-0`});var y=R(_,2),x=e=>{var t=Tr();v(e,t)};m(y,e=>{T(u)||e(x)}),n(g);var S=R(g,2),C=U(S),w=U(C),E=e=>{Sr(e,{class:`h-4 w-4`})},D=e=>{br(e,{class:`h-4 w-4`})};m(w,e=>{T(u)?e(E):e(D,-1)}),n(C),n(S),n(f),V(()=>{J(f,1,`flex shrink-0 flex-col border-r border-border bg-muted/30 py-3 ${T(u)?`w-14 items-center`:`w-44`}`),J(h,1,`my-1 h-px bg-border ${T(u)?`w-8`:`w-[10.5rem] mx-auto`}`),J(g,1,`flex h-10 items-center rounded-lg text-muted-foreground transition-colors hover:bg-muted hover:text-foreground ${T(u)?`w-10 justify-center`:`w-[10.5rem] gap-2.5 px-3`}`),J(S,1,`mt-auto flex ${T(u)?`w-10 justify-center`:`w-[10.5rem] justify-end`}`),z(C,`title`,T(u)?`Expand sidebar`:`Collapse sidebar`),z(C,`aria-label`,T(u)?`Expand sidebar`:`Collapse sidebar`),z(C,`aria-pressed`,T(u))}),l(`click`,g,()=>ye()),l(`click`,C,function(...e){rt?.apply(this,e)}),v(e,f),b()}w([`click`]);var Or=r(`<div class="drag-strip no-drag shrink-0 svelte-11tvdi8" role="banner" aria-label="window titlebar"><!> <div class="flex-1"></div> <!></div>`);function kr(e,t){i(t,!0);let r=D(t,`variant`,3,`main`),a=D(t,`left`,3,null),o=D(t,`right`,3,null),s=B(8),c=B(8),l=B(void 0);ue(()=>{let e=T(l);if(!e)return;let t=navigator.opentrayWindow?.bindWindowRegion?.(e,`auto`);return()=>t?.unbind?.()});function u(e){let t=globalThis.innerWidth,n=Math.max(0,Math.round(e.x)),r=Math.max(0,Math.round(t-e.x-e.width));N(s,n+(n>0?4:0)),N(c,r+(r>0?4:0))}ue(()=>{let e=navigator.opentrayWindow?.overlay??navigator.opentray?.window?.overlay;if(!e)return;let t=null;return(async()=>{try{if(u(await e.getTitlebarAreaRect()),e.listen)t=await e.listen(`geometrychange`,e=>u(e.titlebarAreaRect));else if(e.addEventListener){let n=e=>u(e.titlebarAreaRect);e.addEventListener(`geometrychange`,n),t=()=>e.removeEventListener?.(`geometrychange`,n)}}catch{}})(),()=>{t?.()}});var d=Or(),f=U(d),p=e=>{var t=Y(),n=K(t);g(n,a),v(e,t)};m(f,e=>{r()===`main`&&a()&&e(p)});var h=R(f,4),_=e=>{var t=Y(),n=K(t);g(n,o),v(e,t)};m(h,e=>{r()===`main`&&o()&&e(_)}),n(d),oe(d,e=>N(l,e),()=>T(l)),V(()=>k(d,`padding-left: ${T(s)??``}px; padding-right: ${T(c)??``}px`)),v(e,d),b()}function Ar(t){W(()=>e(()=>t()))}var jr=[`top`,`right`,`bottom`,`left`],Mr=Math.min,Nr=Math.max,Pr=Math.round,Fr=Math.floor,Ir=e=>({x:e,y:e}),Lr={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Rr(e,t,n){return Nr(e,Mr(t,n))}function zr(e,t){return typeof e==`function`?e(t):e}function Br(e){return e.split(`-`)[0]}function Vr(e){return e.split(`-`)[1]}function Hr(e){return e===`x`?`y`:`x`}function Ur(e){return e===`y`?`height`:`width`}function Wr(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Gr(e){return Hr(Wr(e))}function Kr(e,t,n){n===void 0&&(n=!1);let r=Vr(e),i=Gr(e),a=Ur(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=ti(o)),[o,ti(o)]}function qr(e){let t=ti(e);return[Jr(e),t,Jr(t)]}function Jr(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Yr=[`left`,`right`],Xr=[`right`,`left`],Zr=[`top`,`bottom`],Qr=[`bottom`,`top`];function $r(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Xr:Yr:t?Yr:Xr;case`left`:case`right`:return t?Zr:Qr;default:return[]}}function ei(e,t,n,r){let i=Vr(e),a=$r(Br(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Jr)))),a}function ti(e){let t=Br(e);return Lr[t]+e.slice(t.length)}function ni(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function ri(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:ni(e)}function ii(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function ai(e,t,n){let{reference:r,floating:i}=e,a=Wr(t),o=Gr(t),s=Ur(o),c=Br(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=Vr(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function oi(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=zr(t,e),p=ri(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=ii(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=ii(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var si=50,ci=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:oi},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=ai(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<si&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=ai(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},li=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=zr(e,t)||{};if(l==null)return{};let d=ri(u),f={x:n,y:r},p=Gr(i),m=Ur(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=Mr(d[_],T),D=Mr(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,ee=Rr(E,k,O),A=!c.arrow&&Vr(i)!=null&&k!==ee&&a.reference[m]/2-(k<E?E:D)-h[m]/2<0,j=A?k<E?k-E:k-O:0;return{[p]:f[p]+j,data:{[p]:ee,centerOffset:k-ee-j,...A&&{alignmentOffset:j}},reset:A}}}),ui=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=zr(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Br(r),_=Wr(o),v=Br(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[ti(o)]:qr(o)),x=p!==`none`;!d&&x&&b.push(...ei(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Kr(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===Wr(t)||T.every(e=>Wr(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Wr(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function di(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function fi(e){return jr.some(t=>e[t]>=0)}var pi=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=zr(e,t);switch(i){case`referenceHidden`:{let e=di(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:fi(e)}}}case`escaped`:{let e=di(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:fi(e)}}}default:return{}}}}},mi=new Set([`left`,`top`]);async function hi(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Br(n),s=Vr(n),c=Wr(n)===`y`,l=mi.has(o)?-1:1,u=a&&c?-1:1,d=zr(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var gi=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await hi(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},_i=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=zr(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Wr(i),p=Hr(f),m=u[p],h=u[f],g=(e,t)=>Rr(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},vi=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=zr(e,t),u={x:n,y:r},d=Wr(i),f=Hr(d),p=u[f],m=u[d],h=zr(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=mi.has(Br(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},yi=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=zr(e,t),c=await i.detectOverflow(t,s),l=Br(n),u=Vr(n),d=Wr(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=Mr(p-c[m],g),y=Mr(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*Nr(c.left,c.right):S=p-2*Nr(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function bi(){return typeof window<`u`}function xi(e){return wi(e)?(e.nodeName||``).toLowerCase():`#document`}function Si(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ci(e){return((wi(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function wi(e){return bi()?e instanceof Node||e instanceof Si(e).Node:!1}function Ti(e){return bi()?e instanceof Element||e instanceof Si(e).Element:!1}function Ei(e){return bi()?e instanceof HTMLElement||e instanceof Si(e).HTMLElement:!1}function Di(e){return!bi()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Si(e).ShadowRoot}function Oi(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=zi(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function ki(e){return/^(table|td|th)$/.test(xi(e))}function Ai(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var ji=/transform|translate|scale|rotate|perspective|filter/,Mi=/paint|layout|strict|content/,Ni=e=>!!e&&e!==`none`,Pi;function Fi(e){let t=Ti(e)?zi(e):e;return Ni(t.transform)||Ni(t.translate)||Ni(t.scale)||Ni(t.rotate)||Ni(t.perspective)||!Li()&&(Ni(t.backdropFilter)||Ni(t.filter))||ji.test(t.willChange||``)||Mi.test(t.contain||``)}function Ii(e){let t=Vi(e);for(;Ei(t)&&!Ri(t);){if(Fi(t))return t;if(Ai(t))return null;t=Vi(t)}return null}function Li(){return Pi??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Pi}function Ri(e){return/^(html|body|#document)$/.test(xi(e))}function zi(e){return Si(e).getComputedStyle(e)}function Bi(e){return Ti(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Vi(e){if(xi(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Di(e)&&e.host||Ci(e);return Di(t)?t.host:t}function Hi(e){let t=Vi(e);return Ri(t)?(e.ownerDocument||e).body:Ei(t)&&Oi(t)?t:Hi(t)}function Ui(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Hi(e),i=r===e.ownerDocument?.body,a=Si(r);if(i){let e=Wi(a);return t.concat(a,a.visualViewport||[],Oi(r)?r:[],e&&n?Ui(e):[])}return t.concat(r,Ui(r,[],n))}function Wi(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Gi(e){let t=zi(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Ei(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Pr(n)!==a||Pr(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Ki(e){return Ti(e)?e:e.contextElement}function qi(e){let t=Ki(e);if(!Ei(t))return Ir(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Gi(t),o=(a?Pr(n.width):n.width)/r,s=(a?Pr(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Ji=Ir(0);function Yi(e){let t=Si(e);return!Li()||!t.visualViewport?Ji:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Xi(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Si(e)}function Zi(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Ki(e),o=Ir(1);t&&(r?Ti(r)&&(o=qi(r)):o=qi(e));let s=Xi(a,n,r)?Yi(a):Ir(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=Si(a),t=Ti(r)?Si(r):r,n=e,i=Wi(n);for(;i&&t!==n;){let e=qi(i),t=i.getBoundingClientRect(),r=zi(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Si(i),i=Wi(n)}}return ii({width:u,height:d,x:c,y:l})}function Qi(e,t){let n=Bi(e).scrollLeft;return t?t.left+n:Zi(Ci(e)).left+n}function $i(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Qi(e,n),y:n.top+t.scrollTop}}function ea(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Ci(r),s=t?Ai(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Ir(1),u=Ir(0),d=Ei(r);if((d||!a)&&((xi(r)!==`body`||Oi(o))&&(c=Bi(r)),d)){let e=Zi(r);l=qi(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?$i(o,c):Ir(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function ta(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function na(e){let t=Bi(e),n=e.ownerDocument.body,r=Nr(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Nr(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Qi(e),o=-t.scrollTop;return zi(n).direction===`rtl`&&(a+=Nr(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var ra=25;function ia(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Si(e),a=Ci(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Li()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Qi(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=ra&&(s-=o)}return{width:s,height:c,x:l,y:u}}function aa(e,t){let n=Zi(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=qi(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function oa(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=ia(e,n,t);else if(t===`document`)r=na(Ci(e));else if(Ti(t))r=aa(t,n);else{let n=Yi(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return ii(r)}function sa(e,t){let n=t.get(e);if(n)return n;let r=Ui(e,[],!1).filter(e=>Ti(e)&&xi(e)!==`body`),i=null,a=zi(e).position===`fixed`,o=a?Vi(e):e;for(;Ti(o)&&!Ri(o);){let e=zi(o),t=Fi(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=Vi(o)}return t.set(e,r),r}function ca(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Ai(t)?[]:sa(t,this._c):[].concat(n),r],o=oa(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=oa(t,a[e],i);s=Nr(n.top,s),c=Mr(n.right,c),l=Mr(n.bottom,l),u=Nr(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function la(e){let{width:t,height:n}=Gi(e);return{width:t,height:n}}function ua(e,t,n){let r=Ei(t),i=Ci(t),a=n===`fixed`,o=Zi(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Ir(0);if((r||!a)&&((xi(t)!==`body`||Oi(i))&&(s=Bi(t)),r)){let e=Zi(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Qi(i));let l=i&&!r&&!a?$i(i,s):Ir(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function da(e){return zi(e).position===`static`}function fa(e,t){if(!Ei(e)||zi(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Ci(e)===n&&(n=n.ownerDocument.body),n}function pa(e,t){let n=Si(e);if(Ai(e))return n;if(!Ei(e)){let t=Vi(e);for(;t&&!Ri(t);){if(Ti(t)&&!da(t))return t;t=Vi(t)}return n}let r=fa(e,t);for(;r&&ki(r)&&da(r);)r=fa(r,t);return r&&Ri(r)&&da(r)&&!Fi(r)?n:r||Ii(e)||n}var ma=async function(e){let t=this.getOffsetParent||pa,n=this.getDimensions,r=await n(e.floating);return{reference:ua(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ha(e){return zi(e).direction===`rtl`}var ga={convertOffsetParentRelativeRectToViewportRelativeRect:ea,getDocumentElement:Ci,getClippingRect:ca,getOffsetParent:pa,getElementRects:ma,getClientRects:ta,getDimensions:la,getScale:qi,isElement:Ti,isRTL:ha};function _a(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function va(e,t,n){let r=null,i,a=Ci(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=Fr(d),h=Fr(a.clientWidth-(u+f)),g=Fr(a.clientHeight-(d+p)),_=Fr(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Nr(0,Mr(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!_a(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=Si(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function ya(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Ki(e),u=i||a?[...l?Ui(l):[],...t?Ui(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?va(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Zi(e):null;c&&g();function g(){let t=Zi(e);h&&!_a(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var ba=gi,xa=_i,Sa=ui,Ca=yi,wa=pi,Ta=li,Ea=vi,Da=(e,t,n)=>{let r=new Map,i=n??{},a={...ga,...i.platform,_c:r};return ci(e,t,{...i,platform:a})};function Oa(e){return typeof e==`function`?e():e}function ka(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Aa(e,t){let n=ka(e);return Math.round(t*n)/n}function ja(e){return{[`--bits-${e}-content-transform-origin`]:`var(--bits-floating-transform-origin)`,[`--bits-${e}-content-available-width`]:`var(--bits-floating-available-width)`,[`--bits-${e}-content-available-height`]:`var(--bits-floating-available-height)`,[`--bits-${e}-anchor-width`]:`var(--bits-floating-anchor-width)`,[`--bits-${e}-anchor-height`]:`var(--bits-floating-anchor-height)`}}function Ma(e){let t=e.whileElementsMounted,n=P(()=>Oa(e.open)??!0),r=P(()=>Oa(e.middleware)),i=P(()=>Oa(e.transform)??!0),a=P(()=>Oa(e.placement)??`bottom`),o=P(()=>Oa(e.strategy)??`absolute`),s=P(()=>Oa(e.sideOffset)??0),c=P(()=>Oa(e.alignOffset)??0),l=e.reference,u=B(0),d=B(0),f=Ft(null),p=B(de(T(o))),m=B(de(T(a))),h=B(de({})),g=B(!1),_=!1,v=0,y=P(()=>{let e=f.current?Aa(f.current,T(u)):T(u),t=f.current?Aa(f.current,T(d)):T(d);return T(i)?{position:T(p),left:`0`,top:`0`,transform:`translate(${e}px, ${t}px)`,...f.current&&ka(f.current)>=1.5&&{willChange:`transform`}}:{position:T(p),left:`${e}px`,top:`${t}px`}}),b;function x(){if(l.current===null||f.current===null)return;let e=l.current,t=f.current,i=++v;Da(e,t,{middleware:T(r),placement:T(a),strategy:T(o)}).then(r=>{if(i===v&&l.current===e&&f.current===t){if(Na(e)){N(h,{...T(h),hide:{...T(h).hide,referenceHidden:!0}},!0);return}if(!T(n)&&T(u)!==0&&T(d)!==0){let e=Math.max(Math.abs(T(s)),Math.abs(T(c)),15);if(r.x<=e&&r.y<=e)return}N(u,r.x,!0),N(d,r.y,!0),N(p,r.strategy,!0),N(m,r.placement,!0),N(h,r.middlewareData,!0),N(g,!0)}})}function S(){typeof b==`function`&&(b(),b=void 0),v++}function C(){if(S(),t===void 0){x();return}T(n)&&l.current!==null&&f.current!==null&&(b=t(l.current,f.current,x))}function w(){!T(n)&&f.current===null&&N(g,!1)}function E(){return[T(r),T(a),T(o),T(s),T(c),T(n)]}return W(()=>{t===void 0&&T(n)&&x()}),W(C),W(()=>{if(t!==void 0){if(E(),!T(n)){_=!1;return}if(!T(g)){_=!1;return}if(!_){_=!0;return}x()}}),W(w),W(()=>S),{floating:f,reference:l,get strategy(){return T(p)},get placement(){return T(m)},get middlewareData(){return T(h)},get isPositioned(){return T(g)},get floatingStyles(){return T(y)},get update(){return x}}}function Na(e){return e instanceof Element?!e.isConnected||e instanceof HTMLElement&&e.hidden?!0:e.getClientRects().length===0:!1}var Pa={top:`bottom`,right:`left`,bottom:`top`,left:`right`},Fa=new At(`Floating.Root`),Ia=new At(`Floating.Content`),La=new At(`Floating.Root`),Ra=class e{static create(t=!1){return t?La.set(new e):Fa.set(new e)}anchorNode=Ft(null);customAnchorNode=Ft(null);triggerNode=Ft(null);constructor(){W(()=>{this.customAnchorNode.current?typeof this.customAnchorNode.current==`string`?this.anchorNode.current=document.querySelector(this.customAnchorNode.current):this.anchorNode.current=this.customAnchorNode.current:this.anchorNode.current=this.triggerNode.current})}},za=class e{static create(t,n=!1){return n?Ia.set(new e(t,La.get())):Ia.set(new e(t,Fa.get()))}opts;root;contentRef=Ft(null);wrapperRef=Ft(null);arrowRef=Ft(null);contentAttachment=pn(this.contentRef);wrapperAttachment=pn(this.wrapperRef);arrowAttachment=pn(this.arrowRef);arrowId=Ft(Gt());#e=P(()=>{if(typeof this.opts.style==`string`)return Vt(this.opts.style);if(!this.opts.style)return{}});#t=void 0;#n=new zt(()=>this.arrowRef.current??void 0);#r=P(()=>this.#n?.width??0);#i=P(()=>this.#n?.height??0);#a=P(()=>this.opts.side?.current+(this.opts.align.current===`center`?``:`-${this.opts.align.current}`));#o=P(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]);#s=P(()=>T(this.#o).length>0);get hasExplicitBoundaries(){return T(this.#s)}set hasExplicitBoundaries(e){N(this.#s,e)}#c=P(()=>({padding:this.opts.collisionPadding.current,boundary:T(this.#o).filter(Tt),altBoundary:this.hasExplicitBoundaries}));get detectOverflowOptions(){return T(this.#c)}set detectOverflowOptions(e){N(this.#c,e)}#l=B(void 0);#u=B(void 0);#d=B(void 0);#f=B(void 0);#p=P(()=>[ba({mainAxis:this.opts.sideOffset.current+T(this.#i),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&xa({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current===`partial`?Ea():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&Sa({...this.detectOverflowOptions}),Ca({...this.detectOverflowOptions,apply:({rects:e,availableWidth:t,availableHeight:n})=>{let{width:r,height:i}=e.reference;N(this.#l,t,!0),N(this.#u,n,!0),N(this.#d,r,!0),N(this.#f,i,!0)}}),this.arrowRef.current&&Ta({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),Va({arrowWidth:T(this.#r),arrowHeight:T(this.#i)}),this.opts.hideWhenDetached.current&&wa({strategy:`referenceHidden`,...this.detectOverflowOptions})].filter(Boolean));get middleware(){return T(this.#p)}set middleware(e){N(this.#p,e)}floating;#m=P(()=>Ua(this.floating.placement));get placedSide(){return T(this.#m)}set placedSide(e){N(this.#m,e)}#h=P(()=>Wa(this.floating.placement));get placedAlign(){return T(this.#h)}set placedAlign(e){N(this.#h,e)}#g=P(()=>this.floating.middlewareData.arrow?.x??0);get arrowX(){return T(this.#g)}set arrowX(e){N(this.#g,e)}#_=P(()=>this.floating.middlewareData.arrow?.y??0);get arrowY(){return T(this.#_)}set arrowY(e){N(this.#_,e)}#v=P(()=>this.floating.middlewareData.arrow?.centerOffset!==0);get cannotCenterArrow(){return T(this.#v)}set cannotCenterArrow(e){N(this.#v,e)}#y=B();get contentZIndex(){return T(this.#y)}set contentZIndex(e){N(this.#y,e,!0)}#b=P(()=>Pa[this.placedSide]);get arrowBaseSide(){return T(this.#b)}set arrowBaseSide(e){N(this.#b,e)}#x=P(()=>({id:this.opts.wrapperId.current,"data-bits-floating-content-wrapper":``,style:{...this.floating.floatingStyles,transform:this.floating.isPositioned?this.floating.floatingStyles.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:this.contentZIndex,"--bits-floating-transform-origin":`${this.floating.middlewareData.transformOrigin?.x} ${this.floating.middlewareData.transformOrigin?.y}`,"--bits-floating-available-width":`${T(this.#l)}px`,"--bits-floating-available-height":`${T(this.#u)}px`,"--bits-floating-anchor-width":`${T(this.#d)}px`,"--bits-floating-anchor-height":`${T(this.#f)}px`,...this.floating.middlewareData.hide?.referenceHidden&&{visibility:`hidden`,"pointer-events":`none`},...T(this.#e)},dir:this.opts.dir.current,...this.wrapperAttachment}));get wrapperProps(){return T(this.#x)}set wrapperProps(e){N(this.#x,e)}#S=P(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:kt({...T(this.#e)}),...this.contentAttachment}));get props(){return T(this.#S)}set props(e){N(this.#S,e)}#C=P(()=>({position:`absolute`,left:this.arrowX?`${this.arrowX}px`:void 0,top:this.arrowY?`${this.arrowY}px`:void 0,[this.arrowBaseSide]:0,"transform-origin":{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[this.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[this.placedSide],visibility:this.cannotCenterArrow?`hidden`:void 0}));get arrowStyle(){return T(this.#C)}set arrowStyle(e){N(this.#C,e)}constructor(e,t){this.opts=e,this.root=t,this.#t=e.updatePositionStrategy,e.customAnchor&&(this.root.customAnchorNode.current=e.customAnchor.current),Et(()=>e.customAnchor.current,e=>{this.root.customAnchorNode.current=e}),this.floating=Ma({strategy:()=>this.opts.strategy.current,placement:()=>T(this.#a),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...e)=>ya(...e,{animationFrame:this.#t?.current===`always`}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),W(()=>{this.floating.isPositioned&&this.opts.onPlaced?.current()}),Et(()=>this.contentRef.current,e=>{if(!e||!this.opts.enabled.current)return;let t=St(e),n=t.requestAnimationFrame(()=>{if(this.contentRef.current!==e||!this.opts.enabled.current)return;let n=t.getComputedStyle(e).zIndex;n!==this.contentZIndex&&(this.contentZIndex=n)});return()=>{t.cancelAnimationFrame(n)}}),W(()=>{this.floating.floating.current=this.wrapperRef.current})}},Ba=class e{static create(t,n=!1){return n?new e(t,La.get()):new e(t,Fa.get())}opts;root;constructor(e,t){this.opts=e,this.root=t,t.triggerNode=e.virtualEl&&e.virtualEl.current?Bt(e.virtualEl.current):e.ref}};function Va(e){return{name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=Ha(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}}function Ha(e){let[t,n=`center`]=e.split(`-`);return[t,n]}function Ua(e){return Ha(e)[0]}function Wa(e){return Ha(e)[1]}function Ga(e,t){i(t,!0);let n=D(t,`tooltip`,3,!1);Ra.create(n());var r=Y(),a=K(r);g(a,()=>t.children??L),v(e,r),b()}function Ka(e,t){i(t,!0);let n=D(t,`tooltip`,3,!1);Ba.create({id:X(()=>t.id),virtualEl:X(()=>t.virtualEl),ref:t.ref},n());var r=Y(),a=K(r);g(a,()=>t.children??L),v(e,r),b()}function qa(e,t){i(t,!0);let n=D(t,`side`,3,`bottom`),r=D(t,`sideOffset`,3,0),a=D(t,`align`,3,`center`),o=D(t,`alignOffset`,3,0),s=D(t,`arrowPadding`,3,0),c=D(t,`avoidCollisions`,3,!0),l=D(t,`collisionBoundary`,19,()=>[]),u=D(t,`collisionPadding`,3,0),d=D(t,`hideWhenDetached`,3,!1),f=D(t,`onPlaced`,3,()=>{}),p=D(t,`sticky`,3,`partial`),m=D(t,`updatePositionStrategy`,3,`optimized`),h=D(t,`strategy`,3,`fixed`),_=D(t,`dir`,3,`ltr`),y=D(t,`style`,19,()=>({})),x=D(t,`wrapperId`,19,Gt),S=D(t,`customAnchor`,3,null),C=D(t,`tooltip`,3,!1),w=za.create({side:X(()=>n()),sideOffset:X(()=>r()),align:X(()=>a()),alignOffset:X(()=>o()),id:X(()=>t.id),arrowPadding:X(()=>s()),avoidCollisions:X(()=>c()),collisionBoundary:X(()=>l()),collisionPadding:X(()=>u()),hideWhenDetached:X(()=>d()),onPlaced:X(()=>f()),sticky:X(()=>p()),updatePositionStrategy:X(()=>m()),strategy:X(()=>h()),dir:X(()=>_()),style:X(()=>y()),enabled:X(()=>t.enabled),wrapperId:X(()=>x()),customAnchor:X(()=>S())},C()),E=P(()=>rn(w.wrapperProps,{style:{pointerEvents:`auto`}}));var O=Y(),k=K(O);g(k,()=>t.content??L,()=>({props:w.props,wrapperProps:T(E)})),v(e,O),b()}function Ja(e,t){i(t,!0),ue(()=>{t.onPlaced?.()});var n=Y(),r=K(n);g(r,()=>t.content??L,()=>({props:{},wrapperProps:{}})),v(e,n),b()}var Ya=new Set([`$$slots`,`$$events`,`$$legacy`,`content`,`isStatic`,`onPlaced`]);function Xa(e,t){let n=D(t,`isStatic`,3,!1),r=H(t,Ya);var i=Y(),a=K(i),o=e=>{Ja(e,{get content(){return t.content},get onPlaced(){return t.onPlaced}})},s=e=>{qa(e,G({get content(){return t.content},get onPlaced(){return t.onPlaced}},()=>r))};m(a,e=>{n()?e(o):e(s,-1)}),v(e,i)}var Za=new Set(`$$slots.$$events.$$legacy.popper.onEscapeKeydown.escapeKeydownBehavior.preventOverflowTextSelection.id.onPointerDown.onPointerUp.side.sideOffset.align.alignOffset.arrowPadding.avoidCollisions.collisionBoundary.collisionPadding.sticky.hideWhenDetached.updatePositionStrategy.strategy.dir.preventScroll.wrapperId.style.onPlaced.onInteractOutside.onCloseAutoFocus.onOpenAutoFocus.onFocusOutside.interactOutsideBehavior.loop.trapFocus.isValidEvent.customAnchor.isStatic.enabled.ref.tooltip.contentPointerEvents`.split(`.`)),Qa=r(`<!> <!>`,1);function $a(e,t){i(t,!0);let n=D(t,`interactOutsideBehavior`,3,`close`),r=D(t,`trapFocus`,3,!0),a=D(t,`isValidEvent`,3,()=>!1),o=D(t,`customAnchor`,3,null),s=D(t,`isStatic`,3,!1),c=D(t,`tooltip`,3,!1),l=D(t,`contentPointerEvents`,3,`auto`),u=H(t,Za),d=P(()=>t.preventScroll??!0),f=P(()=>t.strategy??(T(d)?`fixed`:`absolute`));Xa(e,{get isStatic(){return s()},get id(){return t.id},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return T(f)},get dir(){return t.dir},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return o()},get enabled(){return t.enabled},get tooltip(){return c()},content:(e,i)=>{let o=()=>(i?.()).props,s=()=>(i?.()).wrapperProps;var c=Qa(),f=K(c),p=e=>{on(e,{get preventScroll(){return T(d)}})},h=e=>{on(e,{get preventScroll(){return T(d)}})};m(f,e=>{t.forceMount&&t.enabled?e(p):t.forceMount||e(h,1)});var _=R(f,2);cn(_,{get onOpenAutoFocus(){return t.onOpenAutoFocus},get onCloseAutoFocus(){return t.onCloseAutoFocus},get loop(){return t.loop},get enabled(){return t.enabled},get trapFocus(){return r()},get forceMount(){return t.forceMount},get ref(){return t.ref},focusScope:(e,r)=>{let i=()=>(r?.()).props;Kt(e,{get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get enabled(){return t.enabled},get ref(){return t.ref},children:(e,r)=>{qt(e,{get id(){return t.id},get onInteractOutside(){return t.onInteractOutside},get onFocusOutside(){return t.onFocusOutside},get interactOutsideBehavior(){return n()},get isValidEvent(){return a()},get enabled(){return t.enabled},get ref(){return t.ref},children:(e,n)=>{let r=()=>(n?.()).props;Qt(e,{get id(){return t.id},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get enabled(){return t.enabled},get ref(){return t.ref},children:(e,n)=>{var a=Y(),c=K(a);{let e=P(()=>({props:rn(u,o(),r(),i(),{style:{pointerEvents:l()}}),wrapperProps:s()}));g(c,()=>t.popper??L,()=>T(e))}v(e,a)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),v(e,c)},$$slots:{content:!0}}),b()}var eo=new Set(`$$slots.$$events.$$legacy.popper.open.onEscapeKeydown.escapeKeydownBehavior.preventOverflowTextSelection.id.onPointerDown.onPointerUp.side.sideOffset.align.alignOffset.arrowPadding.avoidCollisions.collisionBoundary.collisionPadding.sticky.hideWhenDetached.updatePositionStrategy.strategy.dir.preventScroll.wrapperId.style.onPlaced.onInteractOutside.onCloseAutoFocus.onOpenAutoFocus.onFocusOutside.interactOutsideBehavior.loop.trapFocus.isValidEvent.customAnchor.isStatic.ref.shouldRender`.split(`.`));function to(e,t){let n=D(t,`interactOutsideBehavior`,3,`close`),r=D(t,`trapFocus`,3,!0),i=D(t,`isValidEvent`,3,()=>!1),a=D(t,`customAnchor`,3,null),o=D(t,`isStatic`,3,!1),s=H(t,eo);var c=Y(),l=K(c),u=e=>{$a(e,G({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return a()},get isStatic(){return o()},get enabled(){return t.open},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return n()},get loop(){return t.loop},get trapFocus(){return r()},get isValidEvent(){return i()},get onFocusOutside(){return t.onFocusOutside},forceMount:!1,get ref(){return t.ref}},()=>s))};m(l,e=>{t.shouldRender&&e(u)}),v(e,c)}var no=new Set(`$$slots.$$events.$$legacy.popper.onEscapeKeydown.escapeKeydownBehavior.preventOverflowTextSelection.id.onPointerDown.onPointerUp.side.sideOffset.align.alignOffset.arrowPadding.avoidCollisions.collisionBoundary.collisionPadding.sticky.hideWhenDetached.updatePositionStrategy.strategy.dir.preventScroll.wrapperId.style.onPlaced.onInteractOutside.onCloseAutoFocus.onOpenAutoFocus.onFocusOutside.interactOutsideBehavior.loop.trapFocus.isValidEvent.customAnchor.isStatic.enabled`.split(`.`));function ro(e,t){let n=D(t,`interactOutsideBehavior`,3,`close`),r=D(t,`trapFocus`,3,!0),i=D(t,`isValidEvent`,3,()=>!1),a=D(t,`customAnchor`,3,null),o=D(t,`isStatic`,3,!1),s=H(t,no);$a(e,G({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return a()},get isStatic(){return o()},get enabled(){return t.enabled},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return n()},get loop(){return t.loop},get trapFocus(){return r()},get isValidEvent(){return i()},get onFocusOutside(){return t.onFocusOutside}},()=>s,{forceMount:!0}))}function io(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function ao(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function oo(e){if(typeof CSS<`u`&&typeof CSS.escape==`function`)return CSS.escape(e);let t=e.length,n=-1,r,i=``,a=e.charCodeAt(0);if(t===1&&a===45)return`\\`+e;for(;++n<t;){if(r=e.charCodeAt(n),r===0){i+=`�`;continue}if(r>=1&&r<=31||r===127||n===0&&r>=48&&r<=57||n===1&&r>=48&&r<=57&&a===45){i+=`\\`+r.toString(16)+` `;continue}if(r>=128||r===45||r===95||r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122){i+=e.charAt(n);continue}i+=`\\`+e.charAt(n)}return i}var so=`data-value`,co=Ot({component:`command`,parts:[`root`,`list`,`input`,`separator`,`loading`,`empty`,`group`,`group-items`,`group-heading`,`item`,`viewport`,`input-label`]}),lo=co.selector(`group`),uo=co.selector(`group-items`),fo=co.selector(`group-heading`),po=co.selector(`item`),mo=`${co.selector(`item`)}:not([aria-disabled="true"])`,ho=new At(`Command.Root`),go=new At(`Command.List`),_o=new At(`Command.Group`),vo={search:``,value:``,filtered:{count:0,items:new Map,groups:new Set}},yo=class e{static create(t){return ho.set(new e(t))}opts;attachment;#e=!1;#t=!0;sortAfterTick=!1;sortAndFilterAfterTick=!1;allItems=new Set;allGroups=new Map;allIds=new Map;#n=B(0);get key(){return T(this.#n)}set key(e){N(this.#n,e,!0)}#r=B(null);get viewportNode(){return T(this.#r)}set viewportNode(e){N(this.#r,e,!0)}#i=B(null);get inputNode(){return T(this.#i)}set inputNode(e){N(this.#i,e,!0)}#a=B(null);get labelNode(){return T(this.#a)}set labelNode(e){N(this.#a,e,!0)}#o=B(vo);get commandState(){return T(this.#o)}set commandState(e){N(this.#o,e)}#s=B(de(vo));get _commandState(){return T(this.#s)}set _commandState(e){N(this.#s,e,!0)}#c(){return o(this._commandState)}#l(){this.#e||(this.#e=!0,Rt(()=>{this.#e=!1;let e=this.#c();Object.is(this.commandState,e)||(this.commandState=e,this.opts.onStateChange?.current?.(e))}))}setState(e,t,n){Object.is(this._commandState[e],t)||(this._commandState[e]=t,e===`search`?(this.#m(),this.#d()):e===`value`&&(n||this.#g()),this.#l())}constructor(e){this.opts=e,this.attachment=pn(this.opts.ref);let t={...this._commandState,value:this.opts.value.current??``};this._commandState=t,this.commandState=t,this.onkeydown=this.onkeydown.bind(this)}#u(e,t){let n=this.opts.filter.current??Cs;return e?n(e,this._commandState.search,t):0}#d(){if(!this._commandState.search||this.opts.shouldFilter.current===!1){!this._commandState.value||!this.#t?this.#f():this.#t&&this._commandState.value&&this.#p();return}let e=this._commandState.filtered.items,t=[];for(let n of this._commandState.filtered.groups){let r=this.allGroups.get(n),i=0;if(!r){t.push([n,i]);continue}for(let t of r){let n=e.get(t);i=Math.max(n??0,i)}t.push([n,i])}let n=this.viewportNode,r=this.getValidItems().sort((t,n)=>{let r=t.getAttribute(`data-value`),i=n.getAttribute(`data-value`),a=e.get(r)??0;return(e.get(i)??0)-a});for(let e of r){let t=e.closest(uo);if(t){let n=e.parentElement===t?e:e.closest(`${uo} > *`);n&&t.appendChild(n)}else{let t=e.parentElement===n?e:e.closest(`${uo} > *`);t&&n?.appendChild(t)}}let i=t.sort((e,t)=>t[1]-e[1]);for(let e of i){let t=n?.querySelector(`${lo}[${so}="${oo(e[0])}"]`);t?.parentElement?.appendChild(t)}this.#f()}setValue(e,t){e!==this.opts.value.current&&e===``&&Rt(()=>{this.key++}),this.setState(`value`,e,t),this.opts.value.current=e}#f(){Rt(()=>{let e=this.getValidItems().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(so),t=this.#t&&this.opts.disableInitialScroll.current;this.setValue(e??``,t),this.#t=!1})}#p(){Rt(()=>{this.opts.disableInitialScroll.current||this.#g(),this.#t=!1})}#m(){if(!this._commandState.search||this.opts.shouldFilter.current===!1){this._commandState.filtered.count=this.allItems.size;return}this._commandState.filtered.groups=new Set;let e=0;for(let t of this.allItems){let n=this.allIds.get(t)?.value??``,r=this.allIds.get(t)?.keywords??[],i=this.#u(n,r);this._commandState.filtered.items.set(t,i),i>0&&e++}for(let[e,t]of this.allGroups)for(let n of t){let t=this._commandState.filtered.items.get(n);if(t&&t>0){this._commandState.filtered.groups.add(e);break}}this._commandState.filtered.count=e}getValidItems(){let e=this.opts.ref.current;return e?Array.from(e.querySelectorAll(mo)).filter(e=>!!e):[]}getVisibleItems(){let e=this.opts.ref.current;return e?Array.from(e.querySelectorAll(po)).filter(e=>!!e):[]}get itemsGrid(){if(!this.isGrid)return[];let e=this.opts.columns.current??1,t=this.getVisibleItems(),n=[[]],r=t[0]?.getAttribute(`data-group`),i=0,a=0;for(let o=0;o<t.length;o++){let s=t[o],c=s?.getAttribute(`data-group`);r===c?(i++,i>e&&(a++,i=1,n.push([])),n[a]?.push({index:o,firstRowOfGroup:n[a]?.[0]?.firstRowOfGroup??o===0,ref:s})):(r=c,i=1,a++,n.push([{index:o,firstRowOfGroup:!0,ref:s}]))}return n}#h(){let e=this.opts.ref.current;if(!e)return;let t=e.querySelector(`${mo}[data-selected]`);if(t)return t}#g(){Rt(()=>{let e=this.#h();if(!e)return;let t=e.parentElement?.parentElement;if(t){if(this.isGrid){let t=this.#_(e);if(e.scrollIntoView({block:`nearest`}),t){(e?.closest(lo)?.querySelector(fo))?.scrollIntoView({block:`nearest`});return}}else{let n=dn(t);if(n&&n.dataset?.value===e.dataset?.value){(e?.closest(lo)?.querySelector(fo))?.scrollIntoView({block:`nearest`});return}}e.scrollIntoView({block:`nearest`})}})}#_(e){let t=this.itemsGrid;if(t.length===0)return!1;for(let n=0;n<t.length;n++){let r=t[n];if(r!==void 0)for(let t=0;t<r.length;t++){let n=r[t];if(n!==void 0&&n.ref===e)return n.firstRowOfGroup}}return!1}updateSelectedToIndex(e){let t=this.getValidItems()[e];t&&this.setValue(t.getAttribute(so)??``)}updateSelectedByItem(e){let t=this.#h(),n=this.getValidItems(),r=n.findIndex(e=>e===t),i=n[r+e];this.opts.loop.current&&(i=r+e<0?n[n.length-1]:r+e===n.length?n[0]:n[r+e]),i&&this.setValue(i.getAttribute(so)??``)}updateSelectedByGroup(e){let t=this.#h()?.closest(lo),n;for(;t&&!n;)t=e>0?io(t,lo):ao(t,lo),n=t?.querySelector(mo);n?this.setValue(n.getAttribute(so)??``):this.updateSelectedByItem(e)}registerValue(e,t){return e&&e===this.allIds.get(e)?.value||this.allIds.set(e,{value:e,keywords:t}),this._commandState.filtered.items.set(e,this.#u(e,t)),this.sortAfterTick||(this.sortAfterTick=!0,Rt(()=>{this.#d(),this.sortAfterTick=!1})),()=>{this.allIds.delete(e)}}registerItem(e,t){return this.allItems.add(e),t&&(this.allGroups.has(t)?this.allGroups.get(t).add(e):this.allGroups.set(t,new Set([e]))),this.sortAndFilterAfterTick||(this.sortAndFilterAfterTick=!0,Rt(()=>{this.#m(),this.#d(),this.sortAndFilterAfterTick=!1})),this.#l(),()=>{let t=this.#h();this.allItems.delete(e),this.commandState.filtered.items.delete(e),this.#m(),t?.getAttribute(`id`)===e&&this.#f(),this.#l()}}registerGroup(e){return this.allGroups.has(e)||this.allGroups.set(e,new Set),()=>{this.allIds.delete(e),this.allGroups.delete(e)}}get isGrid(){return this.opts.columns.current!==null}#v(){return this.updateSelectedToIndex(this.getValidItems().length-1)}#y(e){e.preventDefault(),e.metaKey?this.#v():e.altKey?this.updateSelectedByGroup(1):this.updateSelectedByItem(1)}#b(e){this.opts.columns.current!==null&&(e.preventDefault(),e.metaKey?this.updateSelectedByGroup(1):this.updateSelectedByItem(this.#S(e)))}#x(e,t){if(t.length===0)return null;for(let n=0;n<t.length;n++){let r=t[n];if(r!==void 0)for(let t=0;t<r.length;t++){let i=r[t];if(i!==void 0&&i.ref===e)return{columnIndex:t,rowIndex:n}}}return null}#S(e){let t=this.itemsGrid,n=this.#h();if(!n)return 0;let r=this.#x(n,t);if(!r)return 0;let i=null,a=+!!e.altKey;if(e.altKey&&r.rowIndex===t.length-2&&!this.opts.loop.current)i=this.#C({start:t.length-1,end:t.length,expectedColumnIndex:r.columnIndex,grid:t});else if(r.rowIndex===t.length-1){if(!this.opts.loop.current)return 0;i=this.#C({start:0+a,end:r.rowIndex,expectedColumnIndex:r.columnIndex,grid:t})}else i=this.#C({start:r.rowIndex+1+a,end:t.length,expectedColumnIndex:r.columnIndex,grid:t}),i===null&&this.opts.loop.current&&(i=this.#C({start:0,end:r.rowIndex,expectedColumnIndex:r.columnIndex,grid:t}));return this.#w(n,i)}#C({start:e,end:t,grid:n,expectedColumnIndex:r}){let i=null;for(let a=e;a<t;a++){let e=n[a];if(i=e[r]?.ref??null,i!==null&&bo(i)){i=null;continue}if(i===null)for(let t=e.length-1;t>=0;t--){let t=e[e.length-1];if(!(t===void 0||bo(t.ref))){i=t.ref;break}}break}return i}#w(e,t){if(t===null)return 0;let n=this.getValidItems(),r=n.findIndex(t=>t===e);return n.findIndex(e=>e===t)-r}#T(e){this.opts.columns.current!==null&&(e.preventDefault(),e.metaKey?this.updateSelectedByGroup(-1):this.updateSelectedByItem(this.#E(e)))}#E(e){let t=this.itemsGrid,n=this.#h();if(n===void 0)return 0;let r=this.#x(n,t);if(r===null)return 0;let i=null,a=+!!e.altKey;if(e.altKey&&r.rowIndex===1&&this.opts.loop.current===!1)i=this.#D({start:0,end:0,expectedColumnIndex:r.columnIndex,grid:t});else if(r.rowIndex===0){if(this.opts.loop.current===!1)return 0;i=this.#D({start:t.length-1-a,end:r.rowIndex+1,expectedColumnIndex:r.columnIndex,grid:t})}else i=this.#D({start:r.rowIndex-1-a,end:0,expectedColumnIndex:r.columnIndex,grid:t}),i===null&&this.opts.loop.current&&(i=this.#D({start:t.length-1,end:r.rowIndex+1,expectedColumnIndex:r.columnIndex,grid:t}));return this.#w(n,i)}#D({start:e,end:t,grid:n,expectedColumnIndex:r}){let i=null;for(let a=e;a>=t;a--){let e=n[a];if(e!==void 0){if(i=e[r]?.ref??null,i!==null&&bo(i)){i=null;continue}if(i===null)for(let t=e.length-1;t>=0;t--){let t=e[e.length-1];if(!(t===void 0||bo(t.ref))){i=t.ref;break}}break}}return i}#O(e){e.preventDefault(),e.metaKey?this.updateSelectedToIndex(0):e.altKey?this.updateSelectedByGroup(-1):this.updateSelectedByItem(-1)}onkeydown(e){let t=this.opts.vimBindings.current&&e.ctrlKey;switch(e.key){case`n`:case`j`:t&&(this.isGrid?this.#b(e):this.#y(e));break;case`l`:t&&this.isGrid&&this.#y(e);break;case wt:this.isGrid?this.#b(e):this.#y(e);break;case Zt:if(!this.isGrid)break;this.#y(e);break;case`p`:case`k`:t&&(this.isGrid?this.#T(e):this.#O(e));break;case`h`:t&&this.isGrid&&this.#O(e);break;case xt:this.isGrid?this.#T(e):this.#O(e);break;case Nt:if(!this.isGrid)break;this.#O(e);break;case jt:e.preventDefault(),this.updateSelectedToIndex(0);break;case`End`:e.preventDefault(),this.#v();break;case Xt:if(!e.isComposing&&e.keyCode!==229){e.preventDefault();let t=this.#h();t&&t?.click()}}}#k=P(()=>({id:this.opts.id.current,role:`application`,[co.root]:``,tabindex:-1,onkeydown:this.onkeydown,...this.attachment}));get props(){return T(this.#k)}set props(e){N(this.#k,e)}};function bo(e){return e.getAttribute(`aria-disabled`)===`true`}var xo=class e{static create(t){return new e(t,ho.get())}opts;root;attachment;#e=P(()=>this.root._commandState.filtered.count===0&&this.#t===!1||this.opts.forceMount.current);get shouldRender(){return T(this.#e)}set shouldRender(e){N(this.#e,e)}#t=!0;constructor(e,t){this.opts=e,this.root=t,this.attachment=pn(this.opts.ref),re(()=>{this.#t=!1})}#n=P(()=>({id:this.opts.id.current,role:`presentation`,[co.empty]:``,...this.attachment}));get props(){return T(this.#n)}set props(e){N(this.#n,e)}},So=class e{static create(t){return _o.set(new e(t,ho.get()))}opts;root;attachment;#e=P(()=>this.opts.forceMount.current||this.root.opts.shouldFilter.current===!1||!this.root.commandState.search?!0:this.root._commandState.filtered.groups.has(this.trueValue));get shouldRender(){return T(this.#e)}set shouldRender(e){N(this.#e,e)}#t=B(null);get headingNode(){return T(this.#t)}set headingNode(e){N(this.#t,e,!0)}#n=B(``);get trueValue(){return T(this.#n)}set trueValue(e){N(this.#n,e,!0)}constructor(e,t){this.opts=e,this.root=t,this.attachment=pn(this.opts.ref),this.trueValue=e.value.current??e.id.current,Et(()=>this.trueValue,()=>this.root.registerGroup(this.trueValue)),W(()=>this.opts.value.current?(this.trueValue=this.opts.value.current,this.root.registerValue(this.opts.value.current)):this.headingNode&&this.headingNode.textContent?(this.trueValue=this.headingNode.textContent.trim().toLowerCase(),this.root.registerValue(this.trueValue)):(this.trueValue=`-----${this.opts.id.current}`,this.root.registerValue(this.trueValue)))}#r=P(()=>({id:this.opts.id.current,role:`presentation`,hidden:!this.shouldRender||void 0,"data-value":this.trueValue,[co.group]:``,...this.attachment}));get props(){return T(this.#r)}set props(e){N(this.#r,e)}},Co=class e{static create(t){return new e(t,_o.get())}opts;group;attachment;constructor(e,t){this.opts=e,this.group=t,this.attachment=pn(this.opts.ref,e=>this.group.headingNode=e)}#e=P(()=>({id:this.opts.id.current,[co[`group-heading`]]:``,...this.attachment}));get props(){return T(this.#e)}set props(e){N(this.#e,e)}},wo=class e{static create(t){return new e(t,_o.get())}opts;group;attachment;constructor(e,t){this.opts=e,this.group=t,this.attachment=pn(this.opts.ref)}#e=P(()=>({id:this.opts.id.current,role:`group`,[co[`group-items`]]:``,"aria-labelledby":this.group.headingNode?.id??void 0,...this.attachment}));get props(){return T(this.#e)}set props(e){N(this.#e,e)}},To=class e{static create(t){return new e(t,ho.get())}opts;root;attachment;#e=P(()=>{let e=this.root.viewportNode?.querySelector(`${po}[${so}="${oo(this.root.opts.value.current)}"]`);if(e!=null)return e.getAttribute(`id`)??void 0});constructor(e,t){this.opts=e,this.root=t,this.attachment=pn(this.opts.ref,e=>this.root.inputNode=e),Et(()=>this.opts.ref.current,()=>{let e=this.opts.ref.current;e&&this.opts.autofocus.current&&Dt(10,()=>e.focus())}),Et(()=>this.opts.value.current,()=>{this.root.commandState.search!==this.opts.value.current&&this.root.setState(`search`,this.opts.value.current)})}#t=P(()=>({id:this.opts.id.current,type:`text`,[co.input]:``,autocomplete:`off`,autocorrect:`off`,spellcheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":Pt(!0),"aria-controls":this.root.viewportNode?.id??void 0,"aria-labelledby":this.root.labelNode?.id??void 0,"aria-activedescendant":T(this.#e),...this.attachment}));get props(){return T(this.#t)}set props(e){N(this.#t,e)}},Eo=class e{static create(t){let n=_o.getOr(null);return new e({...t,group:n},ho.get())}opts;root;attachment;#e=null;#t=P(()=>this.opts.forceMount.current||this.#e?.opts.forceMount.current===!0);#n=P(()=>{if(this.opts.ref.current,T(this.#t)||this.root.opts.shouldFilter.current===!1||!this.root.commandState.search)return!0;let e=this.root.commandState.filtered.items.get(this.trueValue);return e!==void 0&&e>0});get shouldRender(){return T(this.#n)}set shouldRender(e){N(this.#n,e)}#r=P(()=>this.root.opts.value.current===this.trueValue&&this.trueValue!==``);get isSelected(){return T(this.#r)}set isSelected(e){N(this.#r,e)}#i=B(``);get trueValue(){return T(this.#i)}set trueValue(e){N(this.#i,e,!0)}constructor(e,t){this.opts=e,this.root=t,this.#e=_o.getOr(null),this.trueValue=e.value.current,this.attachment=pn(this.opts.ref),Et([()=>this.trueValue,()=>this.#e?.trueValue,()=>this.opts.forceMount.current],()=>{if(!this.opts.forceMount.current&&this.trueValue)return this.root.registerItem(this.trueValue,this.#e?.trueValue)}),Et([()=>this.opts.value.current,()=>this.opts.ref.current],()=>{this.opts.value.current?this.trueValue=this.opts.value.current:this.opts.ref.current?.textContent&&(this.trueValue=this.opts.ref.current.textContent.trim()),this.trueValue&&(this.root.registerValue(this.trueValue,e.keywords.current.map(e=>e.trim())),this.opts.ref.current?.setAttribute(so,this.trueValue))}),this.onclick=this.onclick.bind(this),this.onpointermove=this.onpointermove.bind(this)}#a(){this.opts.disabled.current||(this.#o(),this.opts.onSelect?.current())}#o(){this.opts.disabled.current||this.root.setValue(this.trueValue,!0)}onpointermove(e){this.opts.disabled.current||this.root.opts.disablePointerSelection.current||this.#o()}onclick(e){this.opts.disabled.current||this.#a()}#s=P(()=>({id:this.opts.id.current,"aria-disabled":Pt(this.opts.disabled.current),"aria-selected":Pt(this.isSelected),"data-disabled":Mt(this.opts.disabled.current),"data-selected":Mt(this.isSelected),"data-value":this.trueValue,"data-group":this.#e?.trueValue,[co.item]:``,role:`option`,onpointermove:this.onpointermove,onclick:this.onclick,...this.attachment}));get props(){return T(this.#s)}set props(e){N(this.#s,e)}},Do=class e{static create(t){return new e(t)}opts;attachment;constructor(e){this.opts=e,this.attachment=pn(this.opts.ref)}#e=P(()=>({id:this.opts.id.current,role:`progressbar`,"aria-valuenow":this.opts.progress.current,"aria-valuemin":0,"aria-valuemax":100,"aria-label":`Loading...`,[co.loading]:``,...this.attachment}));get props(){return T(this.#e)}set props(e){N(this.#e,e)}},Oo=class e{static create(t){return go.set(new e(t,ho.get()))}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=pn(this.opts.ref)}#e=P(()=>({id:this.opts.id.current,role:`listbox`,"aria-label":this.opts.ariaLabel.current,[co.list]:``,...this.attachment}));get props(){return T(this.#e)}set props(e){N(this.#e,e)}},ko=class e{static create(t){return new e(t,ho.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=pn(this.opts.ref,e=>this.root.labelNode=e)}#e=P(()=>({id:this.opts.id.current,[co[`input-label`]]:``,for:this.opts.for?.current,style:mn,...this.attachment}));get props(){return T(this.#e)}set props(e){N(this.#e,e)}},Ao=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`children`]),jo=r(`<label><!></label>`);function Mo(e,t){let r=u();i(t,!0);let a=D(t,`id`,19,()=>Ct(r)),o=D(t,`ref`,15,null),s=H(t,Ao),c=ko.create({id:X(()=>a()),ref:X(()=>o(),e=>o(e))}),l=P(()=>rn(s,c.props));var d=jo();M(d,()=>({...T(l)}));var f=U(d);g(f,()=>t.children??L),n(d),v(e,d),b()}var No=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`value`,`onValueChange`,`onStateChange`,`loop`,`shouldFilter`,`filter`,`label`,`vimBindings`,`disablePointerSelection`,`disableInitialScroll`,`columns`,`children`,`child`]),Po=r(`<!> <!>`,1),Fo=r(`<div><!> <!></div>`);function Io(e,t){let r=u();i(t,!0);let a=e=>{Mo(e,{children:(e,t)=>{ae();var n=S();V(()=>c(n,y())),v(e,n)},$$slots:{default:!0}})},o=D(t,`id`,19,()=>Ct(r)),s=D(t,`ref`,15,null),l=D(t,`value`,15,``),d=D(t,`onValueChange`,3,un),f=D(t,`onStateChange`,3,un),p=D(t,`loop`,3,!1),h=D(t,`shouldFilter`,3,!0),_=D(t,`filter`,3,Cs),y=D(t,`label`,3,``),x=D(t,`vimBindings`,3,!0),C=D(t,`disablePointerSelection`,3,!1),w=D(t,`disableInitialScroll`,3,!1),E=D(t,`columns`,3,null),O=H(t,No),k=yo.create({id:X(()=>o()),ref:X(()=>s(),e=>s(e)),filter:X(()=>_()),shouldFilter:X(()=>h()),loop:X(()=>p()),value:X(()=>l(),e=>{l()!==e&&(l(e),d()(e))}),vimBindings:X(()=>x()),disablePointerSelection:X(()=>C()),disableInitialScroll:X(()=>w()),onStateChange:X(()=>f()),columns:X(()=>E())}),ee=e=>k.updateSelectedToIndex(e),A=e=>k.updateSelectedByGroup(e),j=e=>k.updateSelectedByItem(e),te=()=>k.getValidItems(),N=P(()=>rn(O,k.props));var F={updateSelectedToIndex:ee,updateSelectedByGroup:A,updateSelectedByItem:j,getValidItems:te},ne=Y(),re=K(ne),I=e=>{var n=Po(),r=K(n);a(r);var i=R(r,2);g(i,()=>t.child,()=>({props:T(N)})),v(e,n)},ie=e=>{var r=Fo();M(r,()=>({...T(N)}));var i=U(r);a(i);var o=R(i,2);g(o,()=>t.children??L),n(r),v(e,r)};return m(re,e=>{t.child?e(I):e(ie,-1)}),v(e,ne),b(F)}var Lo=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`children`,`child`,`forceMount`]),Ro=r(`<div><!></div>`);function zo(e,t){let r=u();i(t,!0);let a=D(t,`id`,19,()=>Ct(r)),o=D(t,`ref`,15,null),s=D(t,`forceMount`,3,!1),c=H(t,Lo),l=xo.create({id:X(()=>a()),ref:X(()=>o(),e=>o(e)),forceMount:X(()=>s())}),d=P(()=>rn(l.props,c));var f=Y(),p=K(f),h=e=>{var r=Y(),i=K(r),a=e=>{var n=Y(),r=K(n);g(r,()=>t.child,()=>({props:T(d)})),v(e,n)},o=e=>{var r=Ro();M(r,()=>({...T(d)}));var i=U(r);g(i,()=>t.children??L),n(r),v(e,r)};m(i,e=>{t.child?e(a):e(o,-1)}),v(e,r)};m(p,e=>{l.shouldRender&&e(h)}),v(e,f),b()}var Bo=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`value`,`forceMount`,`children`,`child`]),Vo=r(`<div><!></div>`);function Ho(e,t){let r=u();i(t,!0);let a=D(t,`id`,19,()=>Ct(r)),o=D(t,`ref`,15,null),s=D(t,`value`,3,``),c=D(t,`forceMount`,3,!1),l=H(t,Bo),d=So.create({id:X(()=>a()),ref:X(()=>o(),e=>o(e)),forceMount:X(()=>c()),value:X(()=>s())}),f=P(()=>rn(l,d.props));var p=Y(),h=K(p),_=e=>{var n=Y(),r=K(n);g(r,()=>t.child,()=>({props:T(f)})),v(e,n)},y=e=>{var r=Vo();M(r,()=>({...T(f)}));var i=U(r);g(i,()=>t.children??L),n(r),v(e,r)};m(h,e=>{t.child?e(_):e(y,-1)}),v(e,p),b()}var Uo=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`children`,`child`]),Wo=r(`<div><!></div>`);function Go(e,t){let r=u();i(t,!0);let a=D(t,`id`,19,()=>Ct(r)),o=D(t,`ref`,15,null),s=H(t,Uo),c=Co.create({id:X(()=>a()),ref:X(()=>o(),e=>o(e))}),l=P(()=>rn(s,c.props));var d=Y(),f=K(d),p=e=>{var n=Y(),r=K(n);g(r,()=>t.child,()=>({props:T(l)})),v(e,n)},h=e=>{var r=Wo();M(r,()=>({...T(l)}));var i=U(r);g(i,()=>t.children??L),n(r),v(e,r)};m(f,e=>{t.child?e(p):e(h,-1)}),v(e,d),b()}var Ko=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`children`,`child`]),qo=r(`<div><!></div>`),Jo=r(`<div style="display: contents;"><!></div>`);function Yo(e,t){let r=u();i(t,!0);let a=D(t,`id`,19,()=>Ct(r)),o=D(t,`ref`,15,null),s=H(t,Ko),c=wo.create({id:X(()=>a()),ref:X(()=>o(),e=>o(e))}),l=P(()=>rn(s,c.props));var d=Jo(),f=U(d),p=e=>{var n=Y(),r=K(n);g(r,()=>t.child,()=>({props:T(l)})),v(e,n)},h=e=>{var r=qo();M(r,()=>({...T(l)}));var i=U(r);g(i,()=>t.children??L),n(r),v(e,r)};m(f,e=>{t.child?e(p):e(h,-1)}),n(d),v(e,d),b()}var Xo=new Set([`$$slots`,`$$events`,`$$legacy`,`value`,`autofocus`,`id`,`ref`,`child`]),Zo=r(`<input/>`);function Qo(e,t){let n=u();i(t,!0);let r=D(t,`value`,15,``),a=D(t,`autofocus`,3,!1),o=D(t,`id`,19,()=>Ct(n)),s=D(t,`ref`,15,null),c=H(t,Xo),l=To.create({id:X(()=>o()),ref:X(()=>s(),e=>s(e)),value:X(()=>r(),e=>{r(e)}),autofocus:X(()=>a()??!1)}),d=P(()=>rn(c,l.props));var f=Y(),p=K(f),h=e=>{var n=Y(),r=K(n);g(r,()=>t.child,()=>({props:T(d)})),v(e,n)},_=e=>{var t=Zo();M(t,()=>({...T(d)}),void 0,void 0,void 0,void 0,!0),te(t,r),v(e,t)};m(p,e=>{t.child?e(h):e(_,-1)}),v(e,f),b()}var $o=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`value`,`disabled`,`children`,`child`,`onSelect`,`forceMount`,`keywords`]),es=r(`<div><!></div>`),ts=r(`<div style="display: contents;" data-item-wrapper=""><!></div>`);function ns(e,t){let r=u();i(t,!0);let a=D(t,`id`,19,()=>Ct(r)),o=D(t,`ref`,15,null),s=D(t,`value`,3,``),c=D(t,`disabled`,3,!1),l=D(t,`onSelect`,3,un),d=D(t,`forceMount`,3,!1),f=D(t,`keywords`,19,()=>[]),h=H(t,$o),_=Eo.create({id:X(()=>a()),ref:X(()=>o(),e=>o(e)),value:X(()=>s()),disabled:X(()=>c()),onSelect:X(()=>l()),forceMount:X(()=>d()),keywords:X(()=>f())}),y=P(()=>rn(h,_.props));var x=Y(),S=K(x);p(S,()=>_.root.key,e=>{var r=ts(),i=U(r),a=e=>{var r=Y(),i=K(r),a=e=>{var n=Y(),r=K(n);g(r,()=>t.child,()=>({props:T(y)})),v(e,n)},o=e=>{var r=es();M(r,()=>({...T(y)}));var i=U(r);g(i,()=>t.children??L),n(r),v(e,r)};m(i,e=>{t.child?e(a):e(o,-1)}),v(e,r)};m(i,e=>{_.shouldRender&&e(a)}),n(r),V(()=>z(r,`data-value`,_.trueValue)),v(e,r)}),v(e,x),b()}var rs=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`child`,`children`,`aria-label`]),is=r(`<div><!></div>`);function as(e,t){let r=u();i(t,!0);let a=D(t,`id`,19,()=>Ct(r)),o=D(t,`ref`,15,null),s=H(t,rs),c=Oo.create({id:X(()=>a()),ref:X(()=>o(),e=>o(e)),ariaLabel:X(()=>t[`aria-label`]??`Suggestions...`)}),l=P(()=>rn(s,c.props));var d=Y(),f=K(d);p(f,()=>c.root._commandState.search===``,e=>{var r=Y(),i=K(r),a=e=>{var n=Y(),r=K(n);g(r,()=>t.child,()=>({props:T(l)})),v(e,n)},o=e=>{var r=is();M(r,()=>({...T(l)}));var i=U(r);g(i,()=>t.children??L),n(r),v(e,r)};m(i,e=>{t.child?e(a):e(o,-1)}),v(e,r)}),v(e,d),b()}var os=new Set([`$$slots`,`$$events`,`$$legacy`,`progress`,`id`,`ref`,`children`,`child`]),ss=r(`<div><!></div>`);function cs(e,t){let r=u();i(t,!0);let a=D(t,`progress`,3,0),o=D(t,`id`,19,()=>Ct(r)),s=D(t,`ref`,15,null),c=H(t,os),l=Do.create({id:X(()=>o()),ref:X(()=>s(),e=>s(e)),progress:X(()=>a())}),d=P(()=>rn(c,l.props));var f=Y(),p=K(f),h=e=>{var n=Y(),r=K(n);g(r,()=>t.child,()=>({props:T(d)})),v(e,n)},_=e=>{var r=ss();M(r,()=>({...T(d)}));var i=U(r);g(i,()=>t.children??L),n(r),v(e,r)};m(p,e=>{t.child?e(h):e(_,-1)}),v(e,f),b()}var ls=1,us=.9,ds=.8,fs=.17,ps=.1,ms=.999,hs=.9999,gs=.99,_s=/[\\/_+.#"@[({&]/,vs=/[\\/_+.#"@[({&]/g,ys=/[\s-]/,bs=/[\s-]/g;function xs(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?ls:gs;let s=`${i},${a}`;if(o[s]!==void 0)return o[s];let c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;for(;l>=0;)d=xs(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=ls:_s.test(e.charAt(l-1))?(d*=ds,p=e.slice(i,l-1).match(vs),p&&i>0&&(d*=ms**p.length)):ys.test(e.charAt(l-1))?(d*=us,m=e.slice(i,l-1).match(bs),m&&i>0&&(d*=ms**m.length)):(d*=fs,i>0&&(d*=ms**(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=hs)),(d<ps&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=xs(e,t,n,r,l+1,a+2,o),f*ps>d&&(d=f*ps)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function Ss(e){return e.toLowerCase().replace(bs,` `)}function Cs(e,t,n){return e=n&&n.length>0?`${`${e} ${n?.join(` `)}`}`:e,xs(e,t,Ss(e),Ss(t),0,0,{})}var ws=new Set([`$$slots`,`$$events`,`$$legacy`,`child`,`children`,`ref`,`id`,`disabled`,`onSelect`,`closeOnSelect`]),Ts=r(`<div><!></div>`);function Es(e,t){let r=u();i(t,!0);let a=D(t,`ref`,15,null),o=D(t,`id`,19,()=>Ct(r)),s=D(t,`disabled`,3,!1),c=D(t,`onSelect`,3,un),l=D(t,`closeOnSelect`,3,!0),d=H(t,ws),f=Ht.create({id:X(()=>o()),disabled:X(()=>s()),onSelect:X(()=>c()),ref:X(()=>a(),e=>a(e)),closeOnSelect:X(()=>l())}),p=P(()=>rn(d,f.props));var h=Y(),_=K(h),y=e=>{var n=Y(),r=K(n);g(r,()=>t.child,()=>({props:T(p)})),v(e,n)},x=e=>{var r=Ts();M(r,()=>({...T(p)}));var i=U(r);g(i,()=>t.children??L),n(r),v(e,r)};m(_,e=>{t.child?e(y):e(x,-1)}),v(e,h),b()}var Ds=new Set([`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`ref`,`id`]),Os=r(`<div><!></div>`);function ks(e,t){let r=u();i(t,!0);let a=D(t,`ref`,15,null),o=D(t,`id`,19,()=>Ct(r)),s=H(t,Ds),c=Jt.create({id:X(()=>o()),ref:X(()=>a(),e=>a(e))}),l=P(()=>rn(s,c.props));var d=Y(),f=K(d),p=e=>{var n=Y(),r=K(n);g(r,()=>t.child,()=>({props:T(l)})),v(e,n)},h=e=>{var r=Os();M(r,()=>({...T(l)}));var i=U(r);g(i,()=>t.children??L),n(r),v(e,r)};m(f,e=>{t.child?e(p):e(h,-1)}),v(e,d),b()}var As=new Set([`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`ref`,`id`]),js=r(`<div><!></div>`);function Ms(e,t){let r=u();i(t,!0);let a=D(t,`ref`,15,null),o=D(t,`id`,19,()=>Ct(r)),s=H(t,As),c=Yt.create({id:X(()=>o()),ref:X(()=>a(),e=>a(e))}),l=P(()=>rn(s,c.props));var d=Y(),f=K(d),p=e=>{var n=Y(),r=K(n);g(r,()=>t.child,()=>({props:T(l)})),v(e,n)},h=e=>{var r=js();M(r,()=>({...T(l)}));var i=U(r);g(i,()=>t.children??L),n(r),v(e,r)};m(f,e=>{t.child?e(p):e(h,-1)}),v(e,d),b()}var Ns=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`id`,`child`,`children`]),Ps=r(`<div><!></div>`);function Fs(e,t){let r=u();i(t,!0);let a=D(t,`ref`,15,null),o=D(t,`id`,19,()=>Ct(r)),s=H(t,Ns),c=Wt.create({id:X(()=>o()),ref:X(()=>a(),e=>a(e))}),l=P(()=>rn(s,c.props));var d=Y(),f=K(d),p=e=>{var n=Y(),r=K(n);g(r,()=>t.child,()=>({props:T(l)})),v(e,n)},h=e=>{var r=Ps();M(r,()=>({...T(l)}));var i=U(r);g(i,()=>t.children??L),n(r),v(e,r)};m(f,e=>{t.child?e(p):e(h,-1)}),v(e,d),b()}function Is(e,t){i(t,!0);let n=D(t,`open`,15,!1),r=D(t,`dir`,3,`ltr`),a=D(t,`onOpenChange`,3,un),o=D(t,`onOpenChangeComplete`,3,un),s=D(t,`_internal_variant`,3,`dropdown-menu`),c=D(t,`_internal_should_skip_exit_animation`,3,void 0),l=fn.create({variant:X(()=>s()),dir:X(()=>r()),onClose:()=>{n(!1),a()(!1)},shouldSkipExitAnimation:()=>c()?.()??!1});ln.create({open:X(()=>n(),e=>{n(e),a()(e)}),onOpenChangeComplete:X(()=>o())},l),Ga(e,{children:(e,n)=>{var r=Y(),i=K(r);g(i,()=>t.children??L),v(e,r)},$$slots:{default:!0}}),b()}var Ls=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`child`,`children`,`ref`,`loop`,`onInteractOutside`,`onEscapeKeydown`,`onCloseAutoFocus`,`forceMount`,`trapFocus`,`style`]),Rs=r(`<div><div><!></div></div>`);function zs(e,t){let r=u();i(t,!0);let a=D(t,`id`,19,()=>Ct(r)),o=D(t,`ref`,15,null),s=D(t,`loop`,3,!0),c=D(t,`onInteractOutside`,3,un),l=D(t,`onEscapeKeydown`,3,un),d=D(t,`onCloseAutoFocus`,3,un),f=D(t,`forceMount`,3,!1),p=D(t,`trapFocus`,3,!1),h=H(t,Ls),_=$t.create({id:X(()=>a()),loop:X(()=>s()),ref:X(()=>o(),e=>o(e)),onCloseAutoFocus:X(()=>d())}),y=P(()=>rn(h,_.props));function x(e){if(_.handleInteractOutside(e),!e.defaultPrevented&&(c()(e),!e.defaultPrevented)){if(e.target&&e.target instanceof Element){let t=`[${_.parentMenu.root.getBitsAttr(`sub-content`)}]`;if(e.target.closest(t))return}_.parentMenu.onClose()}}function S(e){l()(e),!e.defaultPrevented&&_.parentMenu.onClose()}var C=Y(),w=K(C),E=e=>{ro(e,G(()=>T(y),()=>_.popperProps,{get ref(){return _.opts.ref},get enabled(){return _.parentMenu.opts.open.current},onInteractOutside:x,onEscapeKeydown:S,get trapFocus(){return p()},get loop(){return s()},forceMount:!0,get id(){return a()},get shouldRender(){return _.shouldRender},popper:(e,r)=>{let i=()=>(r?.()).props,a=()=>(r?.()).wrapperProps,o=P(()=>rn(i(),{style:ja(`dropdown-menu`)},{style:t.style}));var s=Y(),c=K(s),l=e=>{var n=Y(),r=K(n);{let e=P(()=>({props:T(o),wrapperProps:a(),..._.snippetProps}));g(r,()=>t.child,()=>T(e))}v(e,n)},u=e=>{var r=Rs();M(r,()=>({...a()}));var i=U(r);M(i,()=>({...T(o)}));var s=U(i);g(s,()=>t.children??L),n(i),n(r),v(e,r)};m(c,e=>{t.child?e(l):e(u,-1)}),v(e,s)},$$slots:{popper:!0}}))},O=e=>{to(e,G(()=>T(y),()=>_.popperProps,{get ref(){return _.opts.ref},get open(){return _.parentMenu.opts.open.current},onInteractOutside:x,onEscapeKeydown:S,get trapFocus(){return p()},get loop(){return s()},forceMount:!1,get id(){return a()},get shouldRender(){return _.shouldRender},popper:(e,r)=>{let i=()=>(r?.()).props,a=()=>(r?.()).wrapperProps,o=P(()=>rn(i(),{style:ja(`dropdown-menu`)},{style:t.style}));var s=Y(),c=K(s),l=e=>{var n=Y(),r=K(n);{let e=P(()=>({props:T(o),wrapperProps:a(),..._.snippetProps}));g(r,()=>t.child,()=>T(e))}v(e,n)},u=e=>{var r=Rs();M(r,()=>({...a()}));var i=U(r);M(i,()=>({...T(o)}));var s=U(i);g(s,()=>t.children??L),n(i),n(r),v(e,r)};m(c,e=>{t.child?e(l):e(u,-1)}),v(e,s)},$$slots:{popper:!0}}))};m(w,e=>{f()?e(E):f()||e(O,1)}),v(e,C),b()}var Bs=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`child`,`children`,`disabled`,`type`]),Vs=r(`<button><!></button>`);function Hs(e,t){let r=u();i(t,!0);let a=D(t,`id`,19,()=>Ct(r)),o=D(t,`ref`,15,null),s=D(t,`disabled`,3,!1),c=D(t,`type`,3,`button`),l=H(t,Bs),d=nn.create({id:X(()=>a()),disabled:X(()=>s()??!1),ref:X(()=>o(),e=>o(e))}),f=P(()=>rn(l,d.props,{type:c()}));Ka(e,{get id(){return a()},get ref(){return d.opts.ref},children:(e,r)=>{var i=Y(),a=K(i),o=e=>{var n=Y(),r=K(n);g(r,()=>t.child,()=>({props:T(f)})),v(e,n)},s=e=>{var r=Vs();M(r,()=>({...T(f)}));var i=U(r);g(i,()=>t.children??L),n(r),v(e,r)};m(a,e=>{t.child?e(o):e(s,-1)}),v(e,i)},$$slots:{default:!0}}),b()}var Us=Ot({component:`label`,parts:[`root`]}),Ws=class e{static create(t){return new e(t)}opts;attachment;constructor(e){this.opts=e,this.attachment=pn(this.opts.ref),this.onmousedown=this.onmousedown.bind(this)}onmousedown(e){e.detail>1&&e.preventDefault()}#e=P(()=>({id:this.opts.id.current,[Us.root]:``,onmousedown:this.onmousedown,...this.attachment}));get props(){return T(this.#e)}set props(e){N(this.#e,e)}},Gs=new Set([`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`id`,`ref`,`for`]),Ks=r(`<label><!></label>`);function qs(e,t){let r=u();i(t,!0);let a=D(t,`id`,19,()=>Ct(r)),o=D(t,`ref`,15,null),s=H(t,Gs),c=Ws.create({id:X(()=>a()),ref:X(()=>o(),e=>o(e))}),l=P(()=>rn(s,c.props,{for:t.for}));var d=Y(),f=K(d),p=e=>{var n=Y(),r=K(n);g(r,()=>t.child,()=>({props:T(l)})),v(e,n)},h=e=>{var r=Ks();M(r,()=>({...T(l),for:t.for}));var i=U(r);g(i,()=>t.children??L),n(r),v(e,r)};m(f,e=>{t.child?e(p):e(h,-1)}),v(e,d),b()}var Js=class{#e;#t;#n=null;constructor(e,t){this.#t=e,this.#e=t,this.stop=this.stop.bind(this),this.start=this.start.bind(this),Lt(this.stop)}#r(){this.#n!==null&&(window.clearTimeout(this.#n),this.#n=null)}stop(){this.#r()}start(...e){this.#r(),this.#n=window.setTimeout(()=>{this.#n=null,this.#t(...e)},this.#e)}};Ot({component:`tooltip`,parts:[`content`,`trigger`]});var Ys=new At(`Tooltip.Provider`);new At(`Tooltip.Root`);var Xs=class e{static create(t){return Ys.set(new e(t))}opts;#e=B(!0);get isOpenDelayed(){return T(this.#e)}set isOpenDelayed(e){N(this.#e,e,!0)}isPointerInTransit=Ft(!1);#t;#n=B(null);constructor(e){this.opts=e,this.#t=new Js(()=>{this.isOpenDelayed=!0},this.opts.skipDelayDuration.current),Ar(()=>le(window,`scroll`,e=>{let t=T(this.#n);if(!t)return;let n=t.triggerNode;if(!n)return;let r=e.target;(r instanceof Element||r instanceof Document)&&r.contains(n)&&t.handleClose()}))}#r=()=>{if(this.opts.skipDelayDuration.current===0){this.isOpenDelayed=!0;return}this.#t.start()};#i=()=>{this.#t.stop()};onOpen=e=>{T(this.#n)&&T(this.#n)!==e&&T(this.#n).handleClose(),this.#i(),this.isOpenDelayed=!1,N(this.#n,e,!0)};onClose=e=>{T(this.#n)===e&&(N(this.#n,null),this.#r())};isTooltipOpen=e=>T(this.#n)===e};function Zs(e,t){i(t,!0);let n=D(t,`delayDuration`,3,700),r=D(t,`disableCloseOnTriggerClick`,3,!1),a=D(t,`disableHoverableContent`,3,!1),o=D(t,`disabled`,3,!1),s=D(t,`ignoreNonKeyboardFocus`,3,!1),c=D(t,`skipDelayDuration`,3,300);Xs.create({delayDuration:X(()=>n()),disableCloseOnTriggerClick:X(()=>r()),disableHoverableContent:X(()=>a()),disabled:X(()=>o()),ignoreNonKeyboardFocus:X(()=>s()),skipDelayDuration:X(()=>c())});var l=Y(),u=K(l);g(u,()=>t.children??L),v(e,l),b()}var Qs=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);function $s(e,t){i(t,!0);let n=D(t,`ref`,15,null),r=H(t,Qs);var o=Y(),s=K(o);{let e=P(()=>hn(`gap-2 text-xs/relaxed leading-none font-medium group-data-[disabled=true]:opacity-50 peer-disabled:opacity-50 flex items-center select-none group-data-[disabled=true]:pointer-events-none peer-disabled:cursor-not-allowed`,t.class));a(s,()=>qs,(t,i)=>{i(t,G({"data-slot":`label`,get class(){return T(e)}},()=>r,{get ref(){return n()},set ref(e){n(e)}}))})}v(e,o),b()}var ec=r(`<!> Import workspace`,1),tc=r(`<!> <!>`,1),nc=r(`<div class="rounded-md border border-destructive/40 bg-destructive/10 p-2.5 text-xs text-destructive"> </div>`),rc=r(`<!> Browse…`,1),ic=r(`Display name <span class="text-muted-foreground">(optional)</span>`,1),ac=r(`<!> Import`,1),oc=r(`<!> <!> <div class="space-y-3"><div class="space-y-1.5"><!> <div class="flex gap-2"><!> <!></div> <p class="text-xs text-muted-foreground">Absolute path to a directory containing skill folders.</p></div> <div class="space-y-1.5"><!> <!></div> <div class="flex justify-end gap-2 pt-1"><!> <!></div></div>`,1);function sc(e,t){i(t,!0);let r=B(!1);W(()=>{be.open=T(r)}),W(()=>{be.open&&N(r,!0)}),W(()=>{T(r)&&(N(o,``),N(s,``),N(u,null))});let o=B(``),s=B(``),l=B(!1),u=B(null),d=B(!0),f=B(!1);async function p(){N(f,!0);try{let e=await ht();if(!e.supported){N(d,!1);return}e.path!==null&&(N(o,e.path,!0),T(s).trim()||N(s,e.path.split(`/`).filter(Boolean).pop()??``,!0))}finally{N(f,!1)}}async function h(){if(!T(o).trim()){N(u,`A directory path is required.`);return}N(l,!0),N(u,null);try{let e=await _t(T(o).trim(),T(s).trim()||void 0);if(!e)return;N(r,!1),await he(gt(e))}catch(e){N(u,e instanceof Error?e.message:String(e),!0)}finally{N(l,!1)}}var g=Y(),_=K(g);a(_,()=>tn,(e,t)=>{t(e,{get open(){return T(r)},set open(e){N(r,e,!0)},children:(e,t)=>{var i=Y(),g=K(i);a(g,()=>en,(e,t)=>{t(e,{class:`sm:max-w-[460px]`,children:(e,t)=>{var i=oc(),g=K(i);a(g,()=>an,(e,t)=>{t(e,{children:(e,t)=>{var n=tc(),r=K(n);a(r,()=>Ut,(e,t)=>{t(e,{class:`flex items-center gap-2`,children:(e,t)=>{var n=ec(),r=K(n);xn(r,{class:`h-4 w-4`}),ae(),v(e,n)},$$slots:{default:!0}})});var i=R(r,2);a(i,()=>sn,(e,t)=>{t(e,{children:(e,t)=>{ae();var n=S(`Import a directory as a skill workspace. Its skills will be discovered and managed here.`);v(e,n)},$$slots:{default:!0}})}),v(e,n)},$$slots:{default:!0}})});var _=R(g,2),y=e=>{var t=nc(),n=j(t,!0);V(()=>c(n,T(u))),v(e,t)};m(_,e=>{T(u)&&e(y)});var b=R(_,2),x=U(b),C=U(x);$s(C,{for:`ws-path`,children:(e,t)=>{ae();var n=S(`Directory path`);v(e,n)},$$slots:{default:!0}});var w=R(C,2),E=U(w);bn(E,{id:`ws-path`,placeholder:`/Users/me/.claude/skills`,class:`font-mono text-xs`,get value(){return T(o)},set value(e){N(o,e,!0)}});var D=R(E,2),O=e=>{{let t=P(()=>T(f)||T(l));gn(e,{variant:`outline`,size:`sm`,class:`h-8 shrink-0 gap-1.5`,get disabled(){return T(t)},onclick:()=>void p(),children:(e,t)=>{var n=rc(),r=K(n),i=e=>{vn(e,{class:`h-3.5 w-3.5 animate-spin`})};m(r,e=>{T(f)&&e(i)}),ae(),v(e,n)},$$slots:{default:!0}})}};m(D,e=>{T(d)&&e(O)}),n(w),ae(2),n(x);var k=R(x,2),ee=U(k);$s(ee,{for:`ws-label`,children:(e,t)=>{ae();var n=ic();ae(),v(e,n)},$$slots:{default:!0}});var A=R(ee,2);bn(A,{id:`ws-label`,placeholder:`My Skills`,get value(){return T(s)},set value(e){N(s,e,!0)}}),n(k);var te=R(k,2),M=U(te);gn(M,{variant:`outline`,size:`sm`,onclick:()=>N(r,!1),children:(e,t)=>{ae();var n=S(`Cancel`);v(e,n)},$$slots:{default:!0}});var F=R(M,2);gn(F,{size:`sm`,get disabled(){return T(l)},onclick:h,children:(e,t)=>{var n=ac(),r=K(n),i=e=>{vn(e,{class:`h-3.5 w-3.5 animate-spin`})};m(r,e=>{T(l)&&e(i)}),ae(),v(e,n)},$$slots:{default:!0}}),n(te),n(b),v(e,i)},$$slots:{default:!0}})}),v(e,i)},$$slots:{default:!0}})}),v(e,g),b()}var cc=new Set([`$$slots`,`$$events`,`$$legacy`,`api`,`ref`,`value`,`class`]);function lc(e,t){i(t,!0);let n=D(t,`api`,15,null),r=D(t,`ref`,15,null),o=D(t,`value`,15,``),s=H(t,cc);var c=Y(),l=K(c);{let e=P(()=>hn(`bg-popover text-popover-foreground rounded-xl p-1 flex size-full flex-col overflow-hidden`,t.class));a(l,()=>Io,(t,i)=>{oe(i(t,G({"data-slot":`command`,get class(){return T(e)}},()=>s,{get value(){return o()},set value(e){o(e)},get ref(){return r()},set ref(e){r(e)}})),e=>n(e),()=>n())})}v(e,c),b()}var uc=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`]);function dc(e,t){i(t,!0);let n=D(t,`ref`,15,null),r=H(t,uc);var o=Y(),s=K(o);a(s,()=>cs,(e,t)=>{t(e,G(()=>r,{get ref(){return n()},set ref(e){n(e)}}))}),v(e,o),b()}var fc=new Set([`$$slots`,`$$events`,`$$legacy`,`open`,`ref`,`value`,`title`,`description`,`showCloseButton`,`portalProps`,`children`,`class`]),pc=r(`<!> <!>`,1);function mc(e,t){i(t,!0);let n=D(t,`open`,15,!1),r=D(t,`ref`,15,null),o=D(t,`value`,15,``),s=D(t,`title`,3,`Command Palette`),l=D(t,`description`,3,`Search for a command to run...`),u=D(t,`showCloseButton`,3,!1),d=H(t,fc);var f=Y(),p=K(f);a(p,()=>tn,(e,i)=>{i(e,G(()=>d,{get open(){return n()},set open(e){n(e)},children:(e,n)=>{var i=pc(),f=K(i);a(f,()=>an,(e,t)=>{t(e,{class:`sr-only`,children:(e,t)=>{var n=pc(),r=K(n);a(r,()=>Ut,(e,t)=>{t(e,{children:(e,t)=>{ae();var n=S();V(()=>c(n,s())),v(e,n)},$$slots:{default:!0}})});var i=R(r,2);a(i,()=>sn,(e,t)=>{t(e,{children:(e,t)=>{ae();var n=S();V(()=>c(n,l())),v(e,n)},$$slots:{default:!0}})}),v(e,n)},$$slots:{default:!0}})});var p=R(f,2);{let e=P(()=>hn(`rounded-xl! p-0 top-1/3 translate-y-0 overflow-hidden p-0`,t.class));a(p,()=>en,(n,i)=>{i(n,{get class(){return T(e)},get showCloseButton(){return u()},get portalProps(){return t.portalProps},children:(e,n)=>{lc(e,G(()=>d,{get children(){return t.children},get value(){return o()},set value(e){o(e)},get ref(){return r()},set ref(e){r(e)}}))},$$slots:{default:!0}})})}v(e,i)},$$slots:{default:!0}}))}),v(e,f),b()}var hc=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);function gc(e,t){i(t,!0);let n=D(t,`ref`,15,null),r=H(t,hc);var o=Y(),s=K(o);{let e=P(()=>hn(`py-6 text-center text-xs/relaxed`,t.class));a(s,()=>zo,(t,i)=>{i(t,G({"data-slot":`command-empty`,get class(){return T(e)}},()=>r,{get ref(){return n()},set ref(e){n(e)}}))})}v(e,o),b()}var _c=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`,`heading`,`value`]),vc=r(`<!> <!>`,1);function yc(e,t){i(t,!0);let n=D(t,`ref`,15,null),r=H(t,_c);var o=Y(),s=K(o);{let e=P(()=>hn(`text-foreground **:[[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 **:[[cmdk-group-heading]]:px-2.5 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium`,t.class)),i=P(()=>t.value??t.heading??`----${Gt()}`);a(s,()=>Ho,(o,s)=>{s(o,G({"data-slot":`command-group`,get class(){return T(e)},get value(){return T(i)}},()=>r,{get ref(){return n()},set ref(e){n(e)},children:(e,n)=>{var r=vc(),i=K(r),o=e=>{var n=Y(),r=K(n);a(r,()=>Go,(e,n)=>{n(e,{class:`text-muted-foreground px-2 py-1.5 text-xs font-medium`,children:(e,n)=>{ae();var r=S();V(()=>c(r,t.heading)),v(e,r)},$$slots:{default:!0}})}),v(e,n)};m(i,e=>{t.heading&&e(o)});var s=R(i,2);a(s,()=>Yo,(e,n)=>{n(e,{get children(){return t.children}})}),v(e,r)},$$slots:{default:!0}}))})}v(e,o),b()}var bc=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),xc=r(`<!> <!>`,1);function Sc(e,t){i(t,!0);let n=D(t,`ref`,15,null),r=H(t,bc);var o=Y(),s=K(o);{let e=P(()=>hn(`group/command-item data-selected:bg-muted data-selected:text-foreground data-selected:*:[svg]:text-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,t.class));a(s,()=>ns,(i,a)=>{a(i,G({"data-slot":`command-item`,get class(){return T(e)}},()=>r,{get ref(){return n()},set ref(e){n(e)},children:(e,n)=>{var r=xc(),i=K(r);g(i,()=>t.children??L);var a=R(i,2);Sn(a,{class:`cn-command-item-indicator ml-auto opacity-0 group-has-[[data-slot=command-shortcut]]/command-item:hidden group-data-[checked=true]/command-item:opacity-100`}),v(e,r)},$$slots:{default:!0}}))})}v(e,o),b()}var Cc=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),wc=r(`<div><!></div>`);function Tc(e,t){i(t,!0);let r=D(t,`ref`,15,null),a=H(t,Cc);var o=wc();M(o,e=>({"data-slot":`input-group`,role:`group`,class:e,...a}),[()=>hn(`group/input-group border-input bg-input/20 dark:bg-input/30 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/30 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 h-7 rounded-md border transition-colors in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-data-[align=block-end]:rounded-md has-data-[align=block-start]:rounded-md has-[[data-slot=input-group-control]:focus-visible]:ring-2 has-[[data-slot][aria-invalid=true]]:ring-2 has-[textarea]:rounded-md has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5 relative flex w-full min-w-0 items-center outline-none has-[>textarea]:h-auto`,t.class)]);var s=U(o);g(s,()=>t.children??L),n(o),oe(o,e=>r(e),()=>r()),v(e,o),b()}var Ec=_n({base:`text-muted-foreground **:data-[slot=kbd]:bg-muted-foreground/10 h-auto gap-1 py-2 text-xs/relaxed font-medium group-data-[disabled=true]/input-group:opacity-50 **:data-[slot=kbd]:rounded-[calc(var(--radius-sm)-2px)] **:data-[slot=kbd]:px-1 **:data-[slot=kbd]:text-[0.625rem] [&>svg:not([class*='size-'])]:size-3.5 flex cursor-text items-center justify-center select-none`,variants:{align:{"inline-start":`pl-2 has-[>button]:ml-[-0.275rem] has-[>kbd]:ml-[-0.275rem] order-first`,"inline-end":`pr-2 has-[>button]:mr-[-0.275rem] has-[>kbd]:mr-[-0.275rem] order-last`,"block-start":`px-2 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2 order-first w-full justify-start`,"block-end":`px-2 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2 order-last w-full justify-start`}},defaultVariants:{align:`inline-start`}}),Dc=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`,`align`]),Oc=r(`<div><!></div>`);function kc(e,t){i(t,!0);let r=D(t,`ref`,15,null),a=D(t,`align`,3,`inline-start`),o=H(t,Dc);var s=Oc(),c=e=>{e.target.closest(`button`)||e.currentTarget.parentElement?.querySelector(`input`)?.focus()};M(s,e=>({role:`group`,"data-slot":`input-group-addon`,"data-align":a(),class:e,onclick:c,...o}),[()=>hn(Ec({align:a()}),t.class)]);var l=U(s);g(l,()=>t.children??L),n(s),oe(s,e=>r(e),()=>r()),v(e,s),b()}_n({base:`gap-2 rounded-md text-xs/relaxed flex items-center shadow-none`,variants:{size:{xs:`h-5 gap-1 rounded-[calc(var(--radius-sm)-2px)] px-1 [&>svg:not([class*='size-'])]:size-3`,sm:`gap-1`,"icon-xs":`size-6 p-0 has-[>svg]:p-0`,"icon-sm":`size-7 p-0 has-[>svg]:p-0`}},defaultVariants:{size:`xs`}});var Ac=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`value`,`class`]);function jc(e,t){i(t,!0);let n=D(t,`ref`,15,null),r=D(t,`value`,15),a=H(t,Ac);{let i=P(()=>hn(`rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent flex-1`,t.class));bn(e,G({"data-slot":`input-group-control`,get class(){return T(i)}},()=>a,{get ref(){return n()},set ref(e){n(e)},get value(){return r()},set value(e){r(e)}}))}b()}var Mc=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`value`]),Nc=r(`<!> <!>`,1),Pc=r(`<div data-slot="command-input-wrapper" class="p-1 pb-0"><!></div>`);function Fc(e,t){i(t,!0);let r=D(t,`ref`,15,null),o=D(t,`value`,15,``),s=H(t,Mc);var c=Pc(),l=U(c);a(l,()=>Tc,(e,n)=>{n(e,{class:`bg-input/20 dark:bg-input/30 h-8!`,children:(e,n)=>{var i=Nc(),c=K(i);{let e=(e,t)=>{let n=()=>(t?.()).props;var i=Y(),s=K(i);a(s,()=>jc,(e,t)=>{t(e,G(n,{get value(){return o()},set value(e){o(e)},get ref(){return r()},set ref(e){r(e)}}))}),v(e,i)},n=P(()=>hn(`w-full text-xs/relaxed outline-hidden disabled:cursor-not-allowed disabled:opacity-50`,t.class));a(c,()=>Qo,(t,r)=>{r(t,G({get value(){return o()},"data-slot":`command-input`,get class(){return T(n)}},()=>s,{child:e,$$slots:{child:!0}}))})}var l=R(c,2);a(l,()=>kc,(e,t)=>{t(e,{children:(e,t)=>{wn(e,{class:`size-3.5 shrink-0 opacity-50`})},$$slots:{default:!0}})}),v(e,i)},$$slots:{default:!0}})}),n(c),v(e,c),b()}var Ic=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);function Lc(e,t){i(t,!0);let n=D(t,`ref`,15,null),r=H(t,Ic);var o=Y(),s=K(o);{let e=P(()=>hn(`no-scrollbar max-h-72 scroll-py-1 outline-none overflow-x-hidden overflow-y-auto`,t.class));a(s,()=>as,(t,i)=>{i(t,G({"data-slot":`command-list`,get class(){return T(e)}},()=>r,{get ref(){return n()},set ref(e){n(e)}}))})}v(e,o),b()}var Rc=new Set([`$$slots`,`$$events`,`$$legacy`]);function zc(e,t){let n=H(t,Rc),r=[[`path`,{d:`M11.35 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v5.35`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`}],[`path`,{d:`M14 19h6`}],[`path`,{d:`M17 16v6`}]];ve(e,G({name:`file-plus-corner`},()=>n,{get iconNode(){return r}}))}var Bc=new Set([`$$slots`,`$$events`,`$$legacy`]);function Vc(e,t){let n=H(t,Bc),r=[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`3`,rx:`1`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`14`,rx:`1`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`}]];ve(e,G({name:`layout-grid`},()=>n,{get iconNode(){return r}}))}var Hc=r(`<!> Workspaces`,1),Uc=r(`<!> Creator`,1),Wc=r(`<!> Repository`,1),Gc=r(`<!> Open search config`,1),Kc=r(`<!> <!> <!> <!>`,1),qc=r(`<!> <span class="flex-1 truncate"> </span> <span class="text-xs tabular-nums text-muted-foreground"> </span>`,1),Jc=r(`<div class="px-2.5 py-1.5 text-xs text-muted-foreground">Type to search skills across workspaces…</div>`),Yc=r(`<div class="px-2.5 py-1.5 text-xs text-destructive"> </div>`),Xc=r(`<div class="px-2.5 py-1.5 text-xs text-muted-foreground">No matching skill.</div>`),Zc=r(`<span class="hidden min-w-0 max-w-[45%] truncate text-xs text-muted-foreground sm:block"> </span>`),Qc=r(`<!> <span class="min-w-0 flex-1 truncate"> </span> <!>`,1),$c=r(`<!> <!>`,1);function el(e,n){i(n,!0);let r=B(!1),o=B(``);W(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`k`&&(e.preventDefault(),N(r,!T(r)))};return globalThis.addEventListener(`keydown`,e),()=>globalThis.removeEventListener(`keydown`,e)}),W(()=>{if(!T(r))return;let e=T(o).trim();if(!e)return;let t=setTimeout(()=>void dt(e,20),150);return()=>clearTimeout(t)}),W(()=>{T(r)||(N(o,``),ut())});function s(e){N(r,!1),e()}let l=P(()=>T(o).trim()),u=P(()=>ct.query===T(l)),d=P(()=>!T(u)||T(u)&&ct.searching),f=P(()=>{if(!T(l)||!T(u)||ct.error)return[];let e=[];for(let t of ct.results)for(let n of t.installations)e.push({key:`${n.workspaceId}:${n.providerId}:${t.id}`,result:t,workspaceId:n.workspaceId,providerId:n.providerId,heading:lt(n.workspaceId,n.providerId)});return e}),p=P(()=>{let e=new Map;for(let t of T(f)){let n=`${t.workspaceId}/${t.providerId}`,r=e.get(n)??{scope:n,heading:t.heading,rows:[]};r.rows.push(t),e.set(n,r)}return[...e.values()]});var h=Y(),g=K(h);a(g,()=>mc,(e,n)=>{n(e,{get open(){return T(r)},set open(e){N(r,e,!0)},children:(e,n)=>{var r=$c(),i=K(r);a(i,()=>Fc,(e,t)=>{t(e,{placeholder:`Search navigation, workspaces and skills…`,get value(){return T(o)},set value(e){N(o,e,!0)}})});var f=R(i,2);a(f,()=>Lc,(e,n)=>{n(e,{children:(e,n)=>{var r=Kc(),i=K(r),o=e=>{var t=Y(),n=K(t);a(n,()=>gc,(e,t)=>{t(e,{children:(e,t)=>{ae();var n=S(`No matching destination.`);v(e,n)},$$slots:{default:!0}})}),v(e,t)};m(i,e=>{T(l)||e(o)});var f=R(i,2);a(f,()=>yc,(e,t)=>{t(e,{heading:`Navigate`,children:(e,t)=>{var n=Kc(),r=K(n);a(r,()=>Sc,(e,t)=>{t(e,{onSelect:()=>s(()=>he(`/workspaces`)),value:`go workspaces manage locations`,children:(e,t)=>{var n=Hc();Vc(K(n),{class:`h-4 w-4`}),ae(),v(e,n)},$$slots:{default:!0}})});var i=R(r,2);a(i,()=>Sc,(e,t)=>{t(e,{onSelect:()=>s(()=>he(`/creator`)),value:`go creator new skill`,children:(e,t)=>{var n=Uc();zc(K(n),{class:`h-4 w-4`}),ae(),v(e,n)},$$slots:{default:!0}})});var o=R(i,2);a(o,()=>Sc,(e,t)=>{t(e,{onSelect:()=>s(()=>he(`/repository`)),value:`go repository browse remote`,children:(e,t)=>{var n=Wc(),r=K(n);En(r,{class:`h-4 w-4`}),ae(),v(e,n)},$$slots:{default:!0}})});var c=R(o,2);a(c,()=>Sc,(e,t)=>{t(e,{onSelect:()=>s(()=>void st()),value:`go search config toml`,children:(e,t)=>{var n=Gc(),r=K(n);Tn(r,{class:`h-4 w-4`}),ae(),v(e,n)},$$slots:{default:!0}})}),v(e,n)},$$slots:{default:!0}})});var h=R(f,2),g=e=>{var n=Y(),r=K(n);a(r,()=>yc,(e,n)=>{n(e,{heading:`Workspaces`,children:(e,n)=>{var r=Y(),i=K(r);t(i,17,()=>pt.workspaces,e=>e.id,(e,t)=>{var n=Y(),r=K(n);{let e=P(()=>`workspace ${T(t).label} ${T(t).path}`);a(r,()=>Sc,(n,r)=>{r(n,{get value(){return T(e)},onSelect:()=>s(()=>he(gt(T(t)))),children:(e,n)=>{var r=qc(),i=K(r);xn(i,{class:`h-4 w-4`});var a=R(i,2),o=j(a,!0),s=R(a,2),l=j(s,!0);V(()=>{c(o,T(t).label),c(l,T(t).skillCount??0)}),v(e,r)},$$slots:{default:!0}})})}v(e,n)}),v(e,r)},$$slots:{default:!0}})}),v(e,n)};m(h,e=>{pt.workspaces.length>0&&e(g)});var _=R(h,2),y=e=>{var t=Y(),n=K(t);a(n,()=>yc,(e,t)=>{t(e,{heading:`Skills`,value:`skills`,forceMount:!0,children:(e,t)=>{var n=Jc();v(e,n)},$$slots:{default:!0}})}),v(e,t)},b=e=>{var t=Y(),n=K(t);a(n,()=>yc,(e,t)=>{t(e,{heading:`Skills`,value:`skills`,forceMount:!0,children:(e,t)=>{var n=Y(),r=K(n);a(r,()=>dc,(e,t)=>{t(e,{children:(e,t)=>{ae();var n=S(`Searching skills…`);v(e,n)},$$slots:{default:!0}})}),v(e,n)},$$slots:{default:!0}})}),v(e,t)},x=e=>{var t=Y(),n=K(t);a(n,()=>yc,(e,t)=>{t(e,{heading:`Skills`,value:`skills`,forceMount:!0,children:(e,t)=>{var n=Yc(),r=j(n);V(()=>c(r,`Skill search failed — ${ct.error??``}`)),v(e,n)},$$slots:{default:!0}})}),v(e,t)},C=e=>{var t=Y(),n=K(t);a(n,()=>yc,(e,t)=>{t(e,{heading:`Skills`,value:`skills`,forceMount:!0,children:(e,t)=>{var n=Xc();v(e,n)},$$slots:{default:!0}})}),v(e,t)},w=e=>{var n=Y(),r=K(n);t(r,17,()=>T(p),e=>e.scope,(e,n)=>{var r=Y(),i=K(r);a(i,()=>yc,(e,r)=>{r(e,{get heading(){return T(n).heading},get value(){return T(n).scope},forceMount:!0,children:(e,r)=>{var i=Y(),o=K(i);t(o,17,()=>T(n).rows,e=>e.key,(e,t)=>{var n=Y(),r=K(n);{let e=P(()=>`skill ${T(t).result.name} ${T(t).key}`);a(r,()=>Sc,(n,r)=>{r(n,{get value(){return T(e)},forceMount:!0,onSelect:()=>s(()=>Me(`workspaces.provider`,{wsId:T(t).workspaceId,providerId:T(t).providerId},{skill:T(t).result.id,view:`detail`})),children:(e,n)=>{var r=Qc(),i=K(r);Dn(i,{class:`h-4 w-4 shrink-0`});var a=R(i,2),o=j(a,!0),s=R(a,2),l=e=>{var n=Zc(),r=j(n,!0);V(()=>c(r,T(t).result.description)),v(e,n)};m(s,e=>{T(t).result.description&&e(l)}),V(()=>c(o,T(t).result.name)),v(e,r)},$$slots:{default:!0}})})}v(e,n)}),v(e,i)},$$slots:{default:!0}})}),v(e,r)}),v(e,n)};m(_,e=>{T(l)?T(d)?e(b,1):T(u)&&ct.error?e(x,2):T(p).length===0?e(C,3):e(w,-1):e(y)}),v(e,r)},$$slots:{default:!0}})}),v(e,r)},$$slots:{default:!0}})}),v(e,h),b()}var tl=r(`<button class="text-xs font-medium text-primary hover:underline"> </button>`),nl=r(`<div class="pointer-events-auto flex items-center gap-3 rounded-md border border-border bg-popover px-4 py-2.5 text-sm"><span class="flex-1 text-foreground"> </span> <!> <button class="text-muted-foreground hover:text-foreground" aria-label="Dismiss notification" title="Dismiss notification"><!></button></div>`),rl=r(`<div class="pointer-events-none fixed bottom-4 right-4 z-50 flex flex-col gap-2" aria-live="polite" aria-relevant="additions text"></div>`);function il(e,r){i(r,!1),A();var a=rl();t(a,5,()=>yt,e=>e.id,(e,t)=>{var r=nl(),i=U(r),a=j(i,!0),o=R(i,2),s=e=>{var n=tl(),r=j(n,!0);V(()=>c(r,T(t).action.label)),l(`click`,n,()=>{T(t).action.run(),bt(T(t).id)}),v(e,n)};m(o,e=>{T(t).action&&e(s)});var u=R(o,2),d=U(u);yn(d,{class:`h-3.5 w-3.5`}),n(u),n(r),V(()=>c(a,T(t).message)),l(`click`,u,()=>bt(T(t).id)),v(e,r)}),n(a),v(e,a),b()}w([`click`]);var al=new Set([`$$slots`,`$$events`,`$$legacy`,`delayDuration`]);function ol(e,t){let n=D(t,`delayDuration`,3,0),r=H(t,al);var i=Y(),o=K(i);a(o,()=>Zs,(e,t)=>{t(e,G({get delayDuration(){return n()}},()=>r))}),v(e,i)}var sl=()=>navigator.opentrayWindow??navigator.opentray?.window??void 0,cl={width:960,height:680},ll={width:1100,height:760};async function ul(e){let t=sl();if(t?.resizeTo&&t.getBounds)try{let n=await t.getBounds(),r=Math.max(n.width,e.width),i=Math.max(n.height,e.height);if(r===n.width&&i===n.height)return;await t.resizeTo(r,i)}catch{}}var dl=new Set([`$$slots`,`$$events`,`$$legacy`]);function fl(e,t){let n=H(t,dl),r=[[`path`,{d:`M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3`}]];ve(e,G({name:`command`},()=>n,{get iconNode(){return r}}))}var pl=r(`<option>New session…</option>`),ml=r(`<option>No sessions</option>`),hl=r(`<option> </option>`),gl=r(`<button type="button" class="relative flex h-8 w-8 items-center justify-center rounded text-muted-foreground transition-colors after:absolute after:-inset-1.5 after:content-[''] hover:bg-muted hover:text-foreground" title="New session" aria-label="New session"><!></button>`),_l=r(`<header class="flex h-10 shrink-0 items-center gap-1 border-b border-border px-2"><span class="px-1 text-xs font-medium text-muted-foreground">Agent</span> <select class="h-8 min-w-0 flex-1 rounded-md border border-border bg-transparent px-2 py-0 text-xs" aria-label="Session"><!><!><!></select> <!> <button type="button" class="relative flex h-8 w-8 items-center justify-center rounded text-muted-foreground transition-colors after:absolute after:-inset-1.5 after:content-[''] hover:bg-muted hover:text-foreground" title="Close panel" aria-label="Close panel"><!></button></header>`);function vl(e,r){i(r,!0);let a=P(()=>{let e=Wn.sessions.find(e=>e.sessionId===Q.sessionId);return e?`${e.title||e.sessionId} (${e.status})`:void 0});var o=_l(),s=R(U(o),2),u=U(s),d=e=>{var t=pl();t.value=t.__value=``,v(e,t)};m(u,e=>{Q.sessionId===null&&e(d)});var f=R(u),p=e=>{var t=ml();t.value=t.__value=``,v(e,t)};m(f,e=>{Wn.sessions.length===0&&Q.sessionId!==null&&e(p)});var h=R(f);t(h,17,()=>Wn.sessions,e=>e.sessionId,(e,t)=>{var n=hl(),r=j(n),i={};V(e=>{c(r,`${e??``}
3
3
  ${T(t).status===`disposed`?`· ended`:`· ${T(t).status}`}`),i!==(i=T(t).sessionId)&&(n.value=(n.__value=i)??``)},[()=>T(t).title||T(t).sessionId.slice(0,14)]),v(e,n)}),n(s);var g;q(s);var _=R(s,2),y=e=>{var t=gl(),r=U(t);sr(r,{class:`h-4 w-4`}),n(t),l(`click`,t,()=>nr()),v(e,t)};m(_,e=>{Q.sessionId&&e(y)});var x=R(_,2),S=U(x);yn(S,{class:`h-4 w-4`}),n(x),n(o),V(()=>{z(s,`title`,T(a)),g!==(g=Q.sessionId??``)&&(s.value=(s.__value=g)??``,me(s,g))}),l(`change`,s,e=>Un(e.currentTarget.value)),l(`click`,x,()=>Gn(!1)),v(e,o),b()}w([`change`,`click`]);var yl=new Set([`$$slots`,`$$events`,`$$legacy`]);function bl(e,t){let n=H(t,yl),r=[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`}]];ve(e,G({name:`copy`},()=>n,{get iconNode(){return r}}))}var xl=new Set([`$$slots`,`$$events`,`$$legacy`]);function Sl(e,t){let n=H(t,xl),r=[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`}]];ve(e,G({name:`file`},()=>n,{get iconNode(){return r}}))}var Cl=new Set([`$$slots`,`$$events`,`$$legacy`]);function wl(e,t){let n=H(t,Cl),r=[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`}],[`circle`,{cx:`9`,cy:`9`,r:`2`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`}]];ve(e,G({name:`image`},()=>n,{get iconNode(){return r}}))}var Tl=new Set([`$$slots`,`$$events`,`$$legacy`]);function El(e,t){let n=H(t,Tl),r=[[`path`,{d:`M12 5v14`}],[`path`,{d:`m19 12-7 7-7-7`}]];ve(e,G({name:`arrow-down`},()=>n,{get iconNode(){return r}}))}var Dl=r(`<div class="text-[11px] font-medium text-muted-foreground"> </div>`),Ol=r(`<div class="whitespace-pre-wrap text-[11px] text-muted-foreground"> </div>`),kl=r(`<span class="block text-[10px] text-muted-foreground"> </span>`),Al=r(`<button> <!></button>`),jl=r(`<div class="flex flex-wrap gap-1.5"></div>`),Ml=r(`<div class="mb-2 space-y-1.5"><!> <div class="whitespace-pre-wrap"> </div> <!> <!> <!></div>`),Nl=r(`<div class="flex justify-end"><!></div>`),Pl=r(`<div class="rounded-lg border border-amber-500/40 bg-amber-500/5 px-3 py-2.5 text-xs" role="group"><div class="mb-2 flex items-center gap-1.5 font-medium text-amber-600 dark:text-amber-400"> </div> <!> <!></div>`);function Fl(e,r){i(r,!0);let a=de({}),o=de({});function s(e,t){let n=a[e.id]??[];e.multiSelect?a[e.id]=n.includes(t)?n.filter(e=>e!==t):[...n,t]:a[e.id]=n.includes(t)?[]:[t]}function u(){return r.questions.every(e=>(a[e.id]??[]).length>0||(o[e.id]??``).trim().length>0)}function d(){$n(r.seq,r.questions.map(e=>({id:e.id,selected:a[e.id]??[],custom:(o[e.id]??``).trim()||void 0})))}var f=Pl(),p=U(f),h=j(p,!0),g=R(p,2);t(g,17,()=>r.questions,e=>e.id,(e,i)=>{var u=Ml(),d=U(u),f=e=>{var t=Dl(),n=j(t,!0);V(()=>c(n,T(i).header)),v(e,t)};m(d,e=>{T(i).header&&e(f)});var p=R(d,2),h=j(p,!0),g=R(p,2),_=e=>{var t=Ol(),n=j(t,!0);V(()=>c(n,T(i).detail)),v(e,t)};m(g,e=>{T(i).detail&&e(_)});var y=R(g,2),b=e=>{var o=jl();t(o,21,()=>T(i).options,e=>e.label,(e,t)=>{var o=Al(),u=U(o),d=R(u),f=e=>{var n=kl(),r=j(n,!0);V(()=>c(r,T(t).description)),v(e,n)};m(d,e=>{T(t).description&&e(f)}),n(o),V((e,n)=>{J(o,1,`rounded-md border px-2 py-1 transition-colors ${e??``}`),o.disabled=r.resolved,z(o,`aria-pressed`,n),c(u,`${T(t).label??``} `)},[()=>(a[T(i).id]??[]).includes(T(t).label)?`border-primary bg-primary/10 text-primary`:`border-border hover:bg-muted`,()=>(a[T(i).id]??[]).includes(T(t).label)]),l(`click`,o,()=>s(T(i),T(t).label)),v(e,o)}),n(o),v(e,o)};m(y,e=>{T(i).options&&T(i).options.length>0&&e(b)});var x=R(y,2);{let e=P(()=>o[T(i).id]??``);bn(x,{placeholder:`Custom answer (optional)`,get disabled(){return r.resolved},get value(){return T(e)},onchange:e=>o[T(i).id]=e.currentTarget.value,class:`h-7 text-xs`,get"aria-label"(){return`Custom answer for ${T(i).question??``}`}})}n(u),V(()=>c(h,T(i).question)),v(e,u)});var _=R(g,2),y=e=>{var t=Nl(),r=U(t);{let e=P(()=>!u());gn(r,{size:`sm`,get disabled(){return T(e)},onclick:d,children:(e,t)=>{ae();var n=S(`Submit answer`);v(e,n)},$$slots:{default:!0}})}n(t),v(e,t)};m(_,e=>{r.resolved||e(y)}),n(f),V(()=>{z(f,`aria-label`,r.resolved?`Answered question`:`Pending question`),c(h,r.resolved?`Answered`:`Your decision`)}),v(e,f),b()}w([`click`]);var Il=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ll(e,t){let n=H(t,Il),r=[[`path`,{d:`M12 19h8`}],[`path`,{d:`m4 17 6-6-6-6`}]];ve(e,G({name:`terminal`},()=>n,{get iconNode(){return r}}))}var Rl=new Set([`$$slots`,`$$events`,`$$legacy`]);function zl(e,t){let n=H(t,Rl),r=[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`}]];ve(e,G({name:`wrench`},()=>n,{get iconNode(){return r}}))}var Bl=r(`<span class="h-1.5 w-1.5 shrink-0 rounded-full bg-destructive" title="Tool error" aria-label="Tool error"></span>`),Vl=r(`<button type="button" class="disclosure-row"><span class="flex items-center justify-center text-muted-foreground" aria-hidden="true"><!></span> <span class="flex items-center gap-1 overflow-hidden"><span class="max-w-40 truncate text-left font-medium text-foreground"> </span> <!></span> <span class="text-center text-muted-foreground/70" aria-hidden="true">·</span> <span> </span> <!></button>`);function Hl(e,t){i(t,!0);let r=D(t,`summary`,3,``),o=D(t,`open`,3,!1),s=D(t,`running`,3,!1),u=D(t,`error`,3,!1);var d=Vl(),f=U(d),p=U(f);a(p,()=>t.icon,(e,t)=>{t(e,{class:`h-3.5 w-3.5`})}),n(f);var h=R(f,2),g=U(h),_=j(g,!0),y=R(g,2),x=e=>{var t=Bl();v(e,t)};m(y,e=>{u()&&e(x)}),n(h);var S=R(h,4),C=j(S,!0),w=R(S,2);ur(w,{class:`disclosure-chevron h-3.5 w-3.5 shrink-0 text-muted-foreground`}),n(d),V(()=>{z(d,`data-open`,o()),z(d,`aria-expanded`,o()),z(d,`title`,r().length>0?`${t.title} · ${r()}`:t.title),c(_,t.title),J(S,1,`disclosure-summary ${s()?`sweep`:``}`),c(C,r())}),l(`click`,d,function(...e){t.onToggle?.apply(this,e)}),v(e,d),b()}w([`click`]);var Ul=r(`<iframe sandbox="allow-scripts"></iframe>`),Wl=r(`<div class="px-3 py-2 text-[11px] text-muted-foreground"> </div>`),Gl=r(`<div class="px-3 py-2 text-[11px] text-muted-foreground" role="status">Loading card…</div>`),Kl=r(`<div class="my-1 overflow-hidden rounded-lg border border-border"><!></div>`);function ql(e,t){i(t,!0);let r=B(null),a=B(!1),o=B(null),s=B(null);W(()=>{let e=t.resourceUri;N(r,null),N(a,!1),Xe().agent.card.get({uri:e}).then(e=>{if(e.html===null){N(a,!0);return}N(r,e.html,!0)}).catch(()=>{N(a,!0)})});function l(e){let t=e.data;if(typeof t==`object`&&t&&t.source===`skill-creator-card`&&T(s)!==null&&e.source===T(s).contentWindow){if(t.type===`ui/navigate`&&typeof t.intent==`string`&&t.intent.startsWith(`/`)&&!t.intent.startsWith(`//`)){he(t.intent);return}if(t.type===`ui/resize`){let e=Number(t.height);Number.isFinite(e)&&e>0&&N(o,Math.min(400,Math.max(40,Math.ceil(e))),!0)}}}function u(e,t){return e.srcdoc=t,{update(t){e.srcdoc=t}}}var p=Kl();f(`message`,O,l);var h=U(p),g=e=>{var n=Ul();oe(n,e=>N(s,e),()=>T(s)),fe(n,(e,t)=>u?.(e,t),()=>T(r)),V(()=>{z(n,`title`,t.title),J(n,1,`w-full border-0 bg-transparent ${T(o)===null?`h-44`:``}`),k(n,T(o)===null?void 0:`height:${T(o)}px`)}),d(n),v(e,n)},_=e=>{var n=Wl(),r=j(n);V(()=>c(r,`Card unavailable: ${t.title??``}`)),v(e,n)},y=e=>{var t=Gl();v(e,t)};m(h,e=>{T(r)===null?T(a)?e(_,1):e(y,-1):e(g)}),n(p),V(()=>z(p,`data-card-uri`,t.resourceUri)),v(e,p),b()}var Jl=ze(Fe(),Re()),Yl=Ke([Fe(),Le({content:Ie(Le({text:Fe().optional()}).loose()).optional()}).loose(),ze(Fe(),Re())]),Xl=Le({kind:Ve(`proposed`),proposalId:Fe().min(1),capability:Fe().optional(),status:Fe().optional()}),Zl=Le({uiCard:Le({resourceUri:Fe().min(1),title:Fe().optional()})}),Ql=Le({content:Ie(Re()).optional()}),$l=Le({text:Fe().optional()}),eu=Le({status:Fe().optional()}),tu=Le({error:Fe().min(1).optional()});function nu(e){if(e===void 0||e.length===0)return null;try{let t=JSON.parse(e),n=Jl.safeParse(t);return n.success?n.data:null}catch{let t={};for(let n of[`command`,`description`,`file_path`,`path`,`pattern`,`url`,`query`]){let r=e.match(RegExp(`"${n}"\\s*:\\s*"((?:[^"\\\\]|\\\\.)*)"`))??e.match(RegExp(`"${n}"\\s*:\\s*"((?:[^"\\\\]|\\.)*)$`));r&&(t[n]=r[1])}return Object.keys(t).length>0?t:null}}function ru(e){if(e===void 0)return``;let t=Yl.safeParse(e);if(t.success){let e=t.data;if(typeof e==`string`)return e;if(Array.isArray(e.content)){let t=[];for(let n of e.content)typeof n.text==`string`&&t.push(n.text);if(t.length>0)return t.join(`
4
4
  `)}}try{return JSON.stringify(e,null,2)??``}catch{return String(e)}}function iu(e,t){if(e===void 0)return null;let n=Xl.safeParse(e);return n.success?{proposalId:n.data.proposalId,capability:n.data.capability??t,status:n.data.status??`pending`}:null}function au(e){if(e===void 0)return null;let t=[e],n=Ql.safeParse(e);if(n.success&&n.data.content!==void 0)for(let e of n.data.content){let n=$l.safeParse(e);n.success&&typeof n.data.text==`string`&&t.push(n.data.text)}for(let e of t)if(typeof e==`string`)try{let t=JSON.parse(e),n=Zl.safeParse(t);if(n.success)return{resourceUri:n.data.uiCard.resourceUri,title:n.data.uiCard.title??`Card`}}catch{}return null}function ou(e){if(!Array.isArray(e))return null;let t=0;for(let n of e){let e=eu.safeParse(n);e.success&&e.data.status===`completed`&&(t+=1)}let n=e.length;return`${n} todo${n===1?``:`s`} · ${t} done`}function su(e,t){let n=tu.safeParse(e);if(n.success&&n.data.error!==void 0)return(n.data.error.split(`
5
5
  `,1)[0]??``).trim();let r=(t.split(`
@@ -226,4 +226,4 @@ ${E}`.trim(),disableFileHeader:!0,stream:!1,onThemeChange:O}),t.push(y);try{if(u
226
226
  `,1)[0]??``)===``),c=B(null);function l(e){return T(c)?.handleKeydown(e)??!1}function u(e){if(fz.some(t=>t.command===e)){t.onExecute(e);return}t.onInsertSkill(e)}var d={handleKeydown:l};{let i=P(()=>n()||T(s));oe(dz(e,{trigger:`/`,get entries(){return T(a)},get text(){return t.text},get caretOnFirstLine(){return t.caretOnFirstLine},get suppress(){return T(i)},get forcedOpen(){return r()},get onForceClose(){return t.onForceClose},menuLabel:`Slash commands and skills`,get sourceLabel(){return T(o)},dataSlot:`slash-menu`,emptyMessage:`No matching command or skill`,onSelect:u}),e=>N(c,e,!0),()=>T(c))}return b(d)}function hz(e){if(!e)return null;let{provider:t,model:n}=e.settings.model,r=e.settings.modelRoutes.find(e=>e.provider===t);return r?r.models.find(e=>e.id===n)?.contextWindow??null:null}var gz=r(`<div class="flex items-center justify-between"><span>Used</span> <span> </span></div> <div class="mt-0.5 flex items-center justify-between text-muted-foreground"><span>Last turn</span> <span class="tabular-nums"> </span></div> <div class="mt-0.5 flex items-center justify-between text-muted-foreground"><span>Capacity</span> <span class="tabular-nums"> </span></div>`,1),_z=r(`<div class="text-muted-foreground">No turns yet.</div>`),vz=r(`<div role="dialog" aria-label="Context usage details" class="absolute right-0 bottom-full z-20 mb-1.5 w-56 rounded-lg border border-border bg-popover p-2.5 text-xs shadow-md"><div class="mb-1.5 text-[11px] font-medium text-muted-foreground">Context</div> <!> <button type="button" class="mt-2 w-full rounded-md border border-border px-2 py-1 text-[11px] transition-colors hover:bg-muted disabled:opacity-50" title="Compact the conversation history (kernel /compact)">compact</button></div>`),yz=r(`<div class="relative"><button type="button" class="relative flex h-8 w-8 items-center justify-center rounded text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:opacity-50" aria-label="Context usage"><svg width="14" height="14" viewBox="0 0 14 14" aria-hidden="true"><circle cx="7" cy="7" r="5" fill="none" stroke-width="2.5" class="stroke-muted-foreground/40"></circle><circle cx="7" cy="7" r="5" fill="none" stroke-width="2.5" stroke-linecap="round" transform="rotate(-90 7 7)"></circle></svg></button> <!></div>`);function bz(e,t){i(t,!0);let r=B(!1),a=B(null),o=P(()=>Q.lastUsage),s=P(()=>hz(tr.view)),u=P(()=>T(s)??131072),d=P(()=>T(o)?Math.min(1,Math.max(0,T(o).inputTokens/T(u))):0),p=P(()=>Math.round(T(d)*100)),h=P(()=>T(p)>=75),g=2*Math.PI*5,_=P(()=>`${(T(d)*g).toFixed(2)} ${g.toFixed(2)}`),x=P(()=>T(o)?`${T(p)}% of context used · last turn ${Su(T(o).inputTokens)} in / ${Su(T(o).outputTokens)} out`:`No turns yet — context usage appears after the first turn`);function S(){Q.sending||Q.status===`running`||(N(r,!1),ir(`/compact`))}function C(e){T(r)&&T(a)!==null&&e.target instanceof Node&&!T(a).contains(e.target)&&N(r,!1)}var w=yz();f(`pointerdown`,O,C);var E=U(w),D=U(E),k=R(U(D));n(D),n(E);var ee=R(E,2),A=e=>{var t=vz(),r=R(U(t),2),i=e=>{var t=gz(),r=K(t),i=R(U(r),2),a=j(i);n(r);var l=R(r,2),d=R(U(l),2),f=j(d);n(l);var m=R(l,2),g=R(U(m),2),_=j(g);n(m),V((e,t,n)=>{J(i,1,`tabular-nums ${T(h)?`text-amber-600 dark:text-amber-400`:``}`),c(a,`${T(p)??``}%`),c(f,`↑ ${e??``} · ↓ ${t??``}`),c(_,`${n??``}${T(s)===null?` · assumed 128k`:``}`)},[()=>Su(T(o).inputTokens),()=>Su(T(o).outputTokens),()=>Su(T(u))]),v(e,t)},a=e=>{var t=_z();v(e,t)};m(r,e=>{T(o)?e(i):e(a,-1)});var d=R(r,2);n(t),V(()=>d.disabled=Q.sending||Q.status===`running`||!Q.sessionId),l(`click`,d,S),v(e,t)};m(ee,e=>{T(r)&&e(A)}),n(w),oe(w,e=>N(a,e),()=>T(a)),V(()=>{z(E,`title`,T(x)),z(E,`aria-expanded`,T(r)),E.disabled=!Q.sessionId,J(k,0,y(T(h)?`stroke-amber-500`:`stroke-primary`)),z(k,`stroke-dasharray`,T(_))}),l(`click`,E,()=>N(r,!T(r))),v(e,w),b()}w([`click`]);var xz=r(`<input class="min-w-0 flex-1 rounded border border-border bg-background px-1.5 py-0.5 text-[11px] outline-none focus:border-primary" aria-label="Edit queued message"/>`),Sz=r(`<span class="truncate text-foreground/80"> </span>`),Cz=r(`<span class="shrink-0 rounded border border-border bg-background px-1 text-[10px] text-muted-foreground"> </span>`),wz=r(`<span class="shrink-0 rounded border border-border bg-background px-1 text-[10px] text-primary" title="Steers the running turn at the next step boundary">steer</span>`),Tz=r(`<button type="button" class="relative flex h-6 w-6 shrink-0 items-center justify-center rounded text-muted-foreground transition-colors after:absolute after:-inset-1.5 after:content-[''] hover:bg-muted hover:text-foreground" aria-label="Edit queued message" title="Edit this queued message"><!></button> <button type="button" class="relative flex h-6 w-6 shrink-0 items-center justify-center rounded text-muted-foreground transition-colors after:absolute after:-inset-1.5 after:content-[''] hover:bg-muted hover:text-foreground disabled:pointer-events-none disabled:opacity-40" aria-label="Steer with this message"><!></button>`,1),Ez=r(`<li class="flex items-center gap-1 px-2.5 py-1 text-[11px]"><!> <!> <!> <span class="flex-1"></span> <!> <button type="button" class="relative flex h-6 w-6 shrink-0 items-center justify-center rounded text-muted-foreground transition-colors after:absolute after:-inset-1.5 after:content-[''] hover:bg-muted hover:text-destructive" aria-label="Remove queued message" title="Remove from queue"><!></button></li>`),Dz=r(`<li class="flex items-center gap-1 px-2.5 py-1 text-[11px]"><span class="truncate text-muted-foreground/70"> </span> <span class="flex-1"></span> <span class="shrink-0 text-[10px] text-muted-foreground/60">sending…</span></li>`),Oz=r(`<ul class="border-t border-border"></ul>`),kz=r(`<div class="mx-2.5 mt-2.5 shrink-0 rounded-lg border border-border bg-muted/30" aria-label="Queued messages"><button type="button" class="flex w-full items-center gap-1.5 px-2.5 py-1.5 text-[11px] text-muted-foreground hover:text-foreground"><!> <span class="font-medium">Queued</span> <span class="rounded border border-border bg-background px-1 text-primary"> </span> <span class="flex-1"></span> <!></button> <!></div>`);function Az(e,r){i(r,!0);let a=B(!1),o=P(()=>{let e=new Set(Qn.items.map(e=>e.text)),t=An.items.filter(t=>!e.has(t.text)).map(e=>({kind:`optimistic`,text:e.text}));return[...Qn.items.map(e=>({kind:`kernel`,item:e})),...t]}),s=B(null),u=B(``),d=P(()=>Q.status===`running`);function p(e,t){N(s,e,!0),N(u,t,!0)}async function h(e){let t=T(u).trim();if(N(s,null),t.length===0)return;let n=await Vn({messageId:e,action:`edit`,text:t});n&&`error`in n&&vt(`Queue edit failed: ${n.error}`)}async function g(e){let t=await Vn({messageId:e,action:`remove`});t&&`error`in t&&vt(`Queue remove failed: ${t.error}`)}async function _(e){let t=await Vn({messageId:e,action:`steer`});t&&`error`in t&&vt(`Queue steer failed: ${t.error}`)}function y(e,t){if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),N(s,null);return}e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),e.stopPropagation(),h(t))}var x=Y(),S=K(x),C=e=>{var r=kz(),i=U(r),b=U(i);pR(b,{class:`h-3.5 w-3.5 shrink-0`,"aria-hidden":`true`});var x=R(b,4),S=j(x,!0),C=R(x,4);{let e=P(()=>T(a)?``:`rotate-180`);xR(C,{get class(){return`h-3 w-3 transition-transform ${T(e)??``}`},"aria-hidden":`true`})}n(i);var w=R(i,2),E=e=>{var r=Oz();t(r,23,()=>T(o),(e,t)=>e.kind===`kernel`?e.item.messageId:`optimistic-${t}`,(e,t)=>{var r=Y(),i=K(r),a=e=>{var r=Ez(),i=U(r),a=e=>{var n=xz();ce(n),l(`keydown`,n,e=>y(e,T(t).item.messageId)),f(`blur`,n,()=>void h(T(t).item.messageId)),te(n,()=>T(u),e=>N(u,e)),v(e,n)},o=e=>{var n=Sz(),r=j(n,!0);V(()=>{z(n,`title`,T(t).item.text),c(r,T(t).item.text)}),v(e,n)};m(i,e=>{T(s)===T(t).item.messageId?e(a):e(o,-1)});var b=R(i,2),x=e=>{var n=Cz(),r=j(n);V(()=>{z(n,`title`,`${T(t).item.attachments??``} attachment(s)`),c(r,`+${T(t).item.attachments??``}`)}),v(e,n)};m(b,e=>{T(t).item.attachments>0&&e(x)});var S=R(b,2),C=e=>{var t=wz();v(e,t)};m(S,e=>{T(t).item.target===`next-step`&&e(C)});var w=R(S,4),E=e=>{var r=Tz(),i=K(r),a=U(i);at(a,{class:`h-3 w-3`,"aria-hidden":`true`}),n(i);var o=R(i,2);hR(U(o),{class:`h-3 w-3`,"aria-hidden":`true`}),n(o),V(()=>{z(o,`title`,T(d)?`Steer the current turn with this message`:`Steering unlocks while a turn is running`),o.disabled=!T(d)||T(t).item.target!==`next-turn`}),l(`click`,i,()=>p(T(t).item.messageId,T(t).item.text)),l(`click`,o,()=>void _(T(t).item.messageId)),v(e,r)};m(w,e=>{T(s)!==T(t).item.messageId&&e(E)});var D=R(w,2),O=U(D);yn(O,{class:`h-3 w-3`,"aria-hidden":`true`}),n(D),n(r),V(()=>z(r,`data-queue-target`,T(t).item.target)),l(`click`,D,()=>void g(T(t).item.messageId)),v(e,r)},o=e=>{var r=Dz(),i=U(r),a=j(i,!0);ae(4),n(r),V(()=>{z(i,`title`,T(t).text),c(a,T(t).text)}),v(e,r)};m(i,e=>{T(t).kind===`kernel`?e(a):e(o,-1)}),v(e,r)}),n(r),v(e,r)};m(w,e=>{T(a)||e(E)}),n(r),V(()=>{z(i,`aria-expanded`,!T(a)),c(S,T(o).length)}),l(`click`,i,()=>N(a,!T(a))),v(e,r)};m(S,e=>{T(o).length>0&&e(C)}),v(e,x),b()}w([`click`,`keydown`]);var jz=r(`<span class="rounded-[4px] bg-primary/15 [box-decoration-break:clone]"> </span>`),Mz=r(`<span class="rounded-[4px] bg-muted [box-decoration-break:clone]" data-composer-chip="skill"> </span>`),Nz=r(`<span> </span>`),Pz=r(`<div aria-hidden="true" class="msg-body pointer-events-none absolute inset-x-0 top-0 z-0 overflow-hidden whitespace-pre-wrap break-words px-3.5 py-2.5 text-transparent"></div>`);function Fz(e,r){i(r,!0);let a=D(r,`skillSpans`,19,()=>[]),o=P(()=>ez(r.text,r.occurrences,a()));var s=Pz();t(s,21,()=>T(o),I,(e,t)=>{var n=Y(),r=K(n),i=e=>{var n=jz(),r=j(n,!0);V(()=>{z(n,`data-composer-chip`,T(t).reference.kind),z(n,`title`,T(t).reference.kind===`file`?T(t).reference.target:`session: ${T(t).reference.label}`),c(r,T(t).text)}),v(e,n)},a=e=>{var n=Mz(),r=j(n,!0);V(()=>{z(n,`title`,`skill: ${T(t).name}`),c(r,T(t).text)}),v(e,n)},o=e=>{var n=Nz(),r=j(n,!0);V(()=>c(r,T(t).text)),v(e,n)};m(r,e=>{T(t).kind===`chip`?e(i):T(t).kind===`skill`?e(a,1):e(o,-1)}),v(e,n)}),n(s),V(()=>k(s,`height: ${r.heightPx??``}px`)),v(e,s),b()}function Iz(e,t){i(t,!0);function n(e,t){return{token:e,reference:{...t,token:e}}}let r=D(t,`suppress`,3,!1),a=P(()=>t.text.startsWith(`@`)?t.text.split(`
227
227
  `,1)[0]??``:``),o=P(()=>{let e=T(a).lastIndexOf(`/`);return e>=0?T(a).slice(0,e+1):`@`}),s=P(()=>T(o)!==`@`);function c(e,t){let n=e.trim().length>0?e.trim():t.slice(0,12);return n.length>40?`${n.slice(0,39)}…`:n}let l=P(()=>{if(T(s))return[];let e=[];for(let t of Wn.sessions){if(t.sessionId===Q.sessionId)continue;let n=c(t.title,t.sessionId);e.push({value:`@${n}`,group:`Sessions`})}return e}),u=B(de(new Map)),d=B(!1),f=B(null);W(()=>{if(!T(a).startsWith(`@`))return;let e=T(o),t=T(f);if(T(u),T(u).get(e)!==void 0||T(d))return;let n=Je();if(n===null)return;let r=e.slice(1).split(`/`).filter(Boolean),i=t===null||r.length===0?null:[t,...r].join(`/`);N(d,!0),n.agent.files.list(i===null?{}:{dir:i}).then(n=>{if(t===null){N(f,n.dir,!0);return}if(e!==T(o))return;let r=new Map(T(u));r.set(e,{dir:n.dir,entries:n.entries}),N(u,r,!0)}).catch(()=>{if(e!==T(o))return;let t=new Map(T(u));t.set(e,{dir:i??``,entries:[]}),N(u,t,!0)}).finally(()=>{N(d,!1)})}),W(()=>{T(a).startsWith(`@`)&&!Wn.loading&&(Wn.loaded?Wn.error!==null&&Jn():Jn())});let p=P(()=>{let e=T(u).get(T(o));if(e===void 0)return[];let t=[];for(let n of e.entries)t.push({value:n.kind===`dir`?`${T(o)}${n.name}/`:`${T(o)}${n.name}`,group:`Files`});return t}),m=P(()=>[...T(l),...T(p)]),h=P(()=>{if(!T(s))return;let e=T(o).slice(0,-1),t=e.lastIndexOf(`/`);return{value:`${e.slice(0,t+1)}`,label:`..`}}),g=P(()=>{if(T(d))return`Loading directory…`;let e=T(u).get(T(o));return e===void 0||e.dir.length===0?Je()===null?`Not connected`:`Files from: home`:`Files from: ${e.dir}`}),_=B(null);function v(e){return T(_)?.handleKeydown(e)??!1}function y(e){if(e.endsWith(`/`)){t.onNavigate(e);return}let r=T(l).find(t=>t.value===e);if(r!==void 0){let e=r.value.slice(1),i=Wn.sessions.find(t=>c(t.title,t.sessionId)===e&&t.sessionId!==Q.sessionId);if(i!==void 0){t.onPick(n(r.value,{kind:`session`,target:i.sessionId,label:e}));return}}let i=T(u).get(T(o)),a=e.slice(T(o).length),s=i?.entries.find(e=>e.kind===`file`&&e.name===a);if(i!==void 0&&s!==void 0){let e=i.dir.includes(`\\`)?`\\`:`/`;t.onPick(n(`@${a}`,{kind:`file`,target:`${i.dir}${e}${a}`,label:a}))}}var x={handleKeydown:v};return oe(dz(e,{trigger:`@`,get entries(){return T(m)},get text(){return t.text},get caretOnFirstLine(){return t.caretOnFirstLine},get suppress(){return r()},get pinned(){return T(h)},menuLabel:`References — files and sessions`,get sourceLabel(){return T(g)},dataSlot:`reference-menu`,emptyMessage:`No matching file or session`,onSelect:y}),e=>N(_,e,!0),()=>T(_)),b(x)}function Lz(e,t){i(t,!0);let n=D(t,`suppress`,3,!1),r=P(()=>t.text.startsWith(`$`)?t.text.split(`
228
228
  `,1)[0]??``:``),a=P(()=>T(r).startsWith(`$`)?T(r).slice(1).trim():``),o=B(null),s=0,c=!1;W(()=>{let e=T(a);if(!e){c&&=(ut(),!1),s+=1,N(o,T(r).startsWith(`$`)&&Je()===null?`Not connected`:null,!0);return}c=!0;let t=s;if(Je()===null){N(o,`Not connected`);return}N(o,null);let n=setTimeout(()=>{t===s&&dt(e)},150);return()=>clearTimeout(n)}),W(()=>()=>ut());let l=P(()=>ct.query===T(a)),u=P(()=>T(o)??(T(l)?ct.error:null)),d=P(()=>T(a)!==``&&T(u)===null&&(!T(l)||ct.searching)),f=P(()=>{if(!T(a)||!T(l))return[];let e=[];for(let t of ct.results)for(let n of t.installations){let r=`${n.workspaceId}:${n.providerId}:${t.id}`,i=`$${t.name}`;e.push({key:r,name:t.name,token:i,entry:{value:i,description:t.description,group:lt(n.workspaceId,n.providerId),key:r},target:{workspaceId:n.workspaceId,providerId:n.providerId,skillId:t.id}})}return e}),p=P(()=>T(f).map(e=>e.entry));function m(e,n){let r=T(f).find(t=>n?.key===void 0?t.entry.value===e:t.key===n.key);r!==void 0&&t.onPick({token:r.token,reference:{kind:`skill`,token:r.token,target:r.target.skillId,label:r.name,skill:r.target}})}let h=B(null);function g(e){return T(h)?.handleKeydown(e)??!1}let _=P(()=>{if(!T(a))return`输入关键词检索技能`;if(T(u)!==null)return T(u);if(T(d))return`Searching skills…`;if(T(l)&&ct.results.length>0){let e=new Set(T(f).map(e=>e.entry.group)).size;return`${ct.results.length} skills · ${e} provider groups`}return`Skills across workspaces`});var v={handleKeydown:g};{let r=P(()=>T(u)===null?T(d)?`Searching skills…`:T(a)?`No matching skill`:`输入关键词检索技能…`:`Search unavailable`);oe(dz(e,{trigger:`$`,get entries(){return T(p)},get text(){return t.text},get caretOnFirstLine(){return t.caretOnFirstLine},get suppress(){return n()},matcher:e=>!/\s/.test(e.slice(1)),menuLabel:`Skills — across workspaces`,get sourceLabel(){return T(_)},dataSlot:`skill-menu`,get emptyMessage(){return T(r)},onSelect:m}),e=>N(h,e,!0),()=>T(h))}return b(v)}var Rz=null;function zz(){if(Rz!==null)return Rz;let e=Je();return e?(Rz=e.agent.models.catalog({}).then(e=>Object.fromEntries(e.providers.map(e=>[e.provider,e.label]))).catch(()=>(Rz=null,{})),Rz):Promise.resolve({})}var Bz=r(`<img class="h-full w-full object-cover"/>`),Vz=r(`<div class="flex h-full w-full items-center justify-center bg-muted/40"><!></div>`),Hz=r(`<div class="group relative h-14 w-14 overflow-hidden rounded-lg border border-border"><!> <button type="button" class="absolute top-0.5 right-0.5 flex h-4 w-4 items-center justify-center rounded-full bg-background/80 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100 hover:text-destructive" aria-label="Remove attachment"><!></button></div>`),Uz=r(`<span class="flex items-center gap-1 rounded-md border border-border bg-muted/40 px-1.5 py-0.5 text-[10px]"> <button type="button" class="text-muted-foreground hover:text-destructive">×</button></span>`),Wz=r(`<div class="flex flex-wrap gap-1.5 px-3 pt-3" aria-label="Pending attachments"><!> <!></div>`),Gz=r(`<textarea class="msg-body relative z-10 max-h-40 w-full resize-none border-0 bg-transparent px-3.5 py-2.5 outline-none focus:outline-none focus-visible:ring-0 placeholder:text-muted-foreground disabled:opacity-50" aria-label="Message"></textarea>`),Kz=r(`<span class="truncate"> </span> <!>`,1),qz=r(`<span class="flex h-3.5 w-3.5 shrink-0 items-center justify-center"><!></span> <span class="truncate"> </span>`,1),Jz=r(`<!> <!>`,1),Yz=r(`<span class="h-1.5 w-1.5 shrink-0 rounded-full bg-primary"></span>`),Xz=r(`<span class="truncate"> </span> <!> <!>`,1),Zz=r(`<span class="flex h-3.5 w-3.5 shrink-0 items-center justify-center rounded text-[8px] font-semibold text-white" aria-hidden="true"> </span> <span class="truncate"> </span>`,1),Qz=r(`<!> <!> <!>`,1),$z=r(`<div class="relative mx-3 mb-3 flex shrink-0 flex-col rounded-[22px] border border-border bg-card shadow-sm"><!> <!> <!> <!> <!> <div class="relative w-full"><!> <!></div> <div class="flex h-11 items-center gap-1 px-2.5"><!> <button type="button" class="relative flex h-8 w-8 items-center justify-center rounded text-muted-foreground transition-colors after:absolute after:-inset-1.5 after:content-[''] hover:bg-muted hover:text-foreground disabled:opacity-50" title="Commands and skills" aria-label="Commands and skills"><!></button> <button type="button" class="relative flex h-8 w-8 items-center justify-center rounded text-muted-foreground transition-colors after:absolute after:-inset-1.5 after:content-[''] hover:bg-muted hover:text-foreground disabled:opacity-50" title="Attach images (paste or pick, ≤4 MiB each)" aria-label="Attach images (paste or pick, ≤4 MiB each)"><span class="relative flex items-center justify-center"><!> <!></span></button> <button type="button" class="relative flex h-8 w-8 items-center justify-center rounded text-muted-foreground transition-colors after:absolute after:-inset-1.5 after:content-[''] hover:bg-muted hover:text-foreground disabled:opacity-50" title="Attach files (text inlined, binary as refs, ≤512 KiB each)" aria-label="Attach files (text inlined, binary as refs, ≤512 KiB each)"><span class="relative flex items-center justify-center"><!> <!></span></button> <div class="flex-1"></div> <!> <!> <button type="button"><!></button></div></div>`);function eB(e,r){i(r,!0);let o=B(null),s=B(null),u=B(null),d=B(null),h=B(!0),g=P(()=>QR(Z.text,Z.references)),_=P(()=>nz(Z.text,ft.skills.map(e=>e.name))),y=B(null);W(()=>{Z.text,N(y,JR(T(y),Z.text)??YR(Z.text,pz),!0)});let x=B(!1),C=B(44);W(()=>{Z.text;let e=T(o);e&&(e.style.height=`auto`,N(C,Math.min(160,Math.max(44,e.scrollHeight)),!0),e.style.height=`${T(C)}px`)}),W(()=>{Z.text,N(h,w(),!0)});function w(){return!Z.text.slice(0,T(o)?.selectionStart??0).includes(`
229
- `)}let D=P(()=>Q.status===`running`),O=P(()=>Z.text.trim().length>0||Z.images.length>0||Z.files.length>0),ee=P(()=>Z.editing!==null),A=P(()=>T(D)&&!T(O)?`stop`:T(D)?or()===`steer`?`steer`:`queue`:`send`),M=P(()=>Q.sessionId?Q.mode:Q.pendingMode),F=P(()=>We.find(e=>e.id===T(M))?.label),ne=P(()=>KR({owner:T(ee)?`Edit your message — sending will resend it as a new message`:null,disconnected:Ye.status===`disconnected`,unavailable:Q.error!==null&&Q.sessionId===null,modeLabel:T(F)??null})),re=P(()=>{let e=tr.view;if(!e)return null;let t=e.settings.model,n=!e.settings.modelRoutes.some(e=>e.provider===t.provider);return{label:`${t.provider} · ${t.model}`,effort:t.reasoningEffort,dangling:n}}),L=B(de({})),ie=B(!1),se=B(!1);W(()=>{zz().then(e=>N(L,e,!0))});let H=P(()=>{let e=tr.view;if(!e)return[];let t=e.settings.model;return e.settings.modelRoutes.map(e=>{let n=e.models.map(e=>e.id);t.provider===e.provider&&!n.includes(t.model)&&n.unshift(t.model);let r=T(L)[e.provider]??e.provider;return{provider:e.provider,label:r,letter:e.iconLetter??r.slice(0,1).toUpperCase(),color:e.iconColor??`hsl(${it(e.provider)} 55% 45%)`,models:n}})});function ce(e,t){let n=tr.view;return n!==null&&n.settings.model.provider===e&&n.settings.model.model===t}async function le(e,t){let n=tr.view?.settings.model.reasoningEffort,r=await Mn({model:{provider:e,model:t,...n!==void 0&&n.length>0?{reasoningEffort:n}:{}}});if(r){if(r.outcome===`rejected`){vt(`${r.code}: ${r.detail}`);return}if(r.outcome===`error`){vt(r.message);return}vt(`Active model → ${e} · ${t}`)}}function ue(e=!1){let t=XR(Z.text.trim(),T(y)).trim();if(t.length===0&&Z.images.length===0&&Z.files.length===0||Q.sending)return;if(Ln.pending>0){vt(`Attachments are still being read — try again in a moment.`);return}let n=Q.status===`running`?Hn(e,or()):`queue`,r=$R(Z.text,Z.references);q=!0,ir(t,Z.images,Z.files,n,r)}let G=B(0),q=!1;W(()=>{q&&Z.text===``&&(q=!1,N(G,T(G)+1))});let fe=B(null);async function pe(e){if(T(fe)===null){N(fe,e,!0);try{let t=await Zn(e);if(t===null||t.paths.length===0)return;let n=t.paths.map(e=>({path:e,name:e.split(/[\\/]/).filter(Boolean).pop()??e}));e===`image`?(Yn(n),qn(n)):kn(n)}finally{N(fe,null)}}}function me(e){if(!Q.sessionId){Q.pendingMode=e;return}Bn(e)}function he(e){if(N(x,!1),e===`/queue`||e===`/steer`){let t=e===`/queue`?`queue`:`steer`;Pn(t),vt(`Busy-Enter preference → ${t}`),Z.text=``;return}Q.sending||(Z.text=``,Z.images=[],Z.files=[],Nn(),ir(e))}function ge(e){N(x,!1);let t=T(o),n=Math.min(t?.selectionStart??Z.text.length,Z.text.length);Z.text=`${e} ${Z.text.slice(n)}`;let r=Math.min(e.length+1,Z.text.length);requestAnimationFrame(()=>{t?.setSelectionRange(r,r),N(h,w(),!0)})}function _e(e){let t=T(o),n=Math.min(t?.selectionStart??Z.text.length,Z.text.length);Z.text=e+Z.text.slice(n);let r=Math.min(e.length,Z.text.length);requestAnimationFrame(()=>{t?.setSelectionRange(r,r),N(h,w(),!0)})}function ve(e){_e(e)}function ye(e){_e(`${e.token} `),Xn(e.reference)}function be(e){if(!T(u)?.handleKeydown(e)&&!T(d)?.handleKeydown(e)&&!T(s)?.handleKeydown(e)){if(e.key===`Backspace`&&!T(Se)){let t=T(o);if(t&&t.selectionStart===t.selectionEnd){let n=tz(Z.text,t.selectionStart,T(g));if(n){e.preventDefault(),Z.text=Z.text.slice(0,n.start)+Z.text.slice(n.end),In(n.reference.uid);let r=n.start;requestAnimationFrame(()=>t.setSelectionRange(r,r));return}}}if(e.key===`Enter`&&!e.shiftKey){if(e.repeat){e.preventDefault();return}if(UR(e,xe)){e.preventDefault();return}e.preventDefault(),ue(e.metaKey||e.ctrlKey)}}}let xe=null,Se=B(!1);function Ce(){N(Se,!0)}function we(){N(Se,!1),xe=Date.now()}function Te(){N(h,w(),!0)}function Ee(e){let t=[...e.clipboardData?.files??[]];if(t.length>0){e.preventDefault();let n=t.filter(e=>e.type.startsWith(`image/`)),r=t.filter(e=>!e.type.startsWith(`image/`));n.length>0&&Rn(n),r.length>0&&jn(r);return}let n=e.clipboardData?.getData(`text/plain`)??``;GR(n)&&(e.preventDefault(),De(WR(n)))}function De(e){let t=T(o);if(!t){Z.text=WR(Z.text+e);return}let n=t.selectionStart??Z.text.length,r=t.selectionEnd??n;Z.text=Z.text.slice(0,n)+e+Z.text.slice(r);let i=n+e.length;requestAnimationFrame(()=>t?.setSelectionRange(i,i))}var Oe=$z(),ke=U(Oe);Az(ke,{});var Ae=R(ke,2);{let e=P(()=>T(y)!==null);oe(Iz(Ae,{get text(){return Z.text},get caretOnFirstLine(){return T(h)},onNavigate:ve,onPick:ye,get suppress(){return T(e)}}),e=>N(u,e,!0),()=>T(u))}var je=R(Ae,2);{let e=P(()=>T(y)!==null);oe(Lz(je,{get text(){return Z.text},get caretOnFirstLine(){return T(h)},onPick:ye,get suppress(){return T(e)}}),e=>N(d,e,!0),()=>T(d))}var Me=R(je,2);{let e=P(()=>T(y)!==null);oe(mz(Me,{get text(){return Z.text},get caretOnFirstLine(){return T(h)},onExecute:he,onInsertSkill:ge,get suppress(){return T(e)},get forcedOpen(){return T(x)},onForceClose:()=>N(x,!1)}),e=>N(s,e,!0),()=>T(s))}var Ne=R(Me,2),Pe=e=>{var r=Wz(),i=U(r);t(i,17,()=>Z.images,I,(e,t,r)=>{var i=Hz(),a=U(i),o=e=>{var n=Bz();V(()=>{z(n,`src`,T(t).preview),z(n,`alt`,T(t).name??`image`)}),v(e,n)},s=e=>{var r=Vz();wl(U(r),{class:`h-5 w-5 text-muted-foreground`,"aria-hidden":`true`}),n(r),V(()=>z(r,`title`,T(t).path??T(t).name??`image`)),v(e,r)};m(a,e=>{T(t).preview?e(o):e(s,-1)});var c=R(a,2),u=U(c);yn(u,{class:`h-2.5 w-2.5`}),n(c),n(i),l(`click`,c,()=>Z.images=Z.images.filter((e,t)=>t!==r)),v(e,i)});var a=R(i,2);t(a,17,()=>Z.files,I,(e,t,r)=>{var i=Uz(),a=U(i),o=R(a);n(i),V(()=>{c(a,`📄 ${T(t).name??``} `),z(o,`aria-label`,`Remove file ${T(t).name??``}`)}),l(`click`,o,()=>Z.files=Z.files.filter((e,t)=>t!==r)),v(e,i)}),n(r),v(e,r)};m(Ne,e=>{(Z.files.length>0||Z.images.length>0)&&e(Pe)});var Fe=R(Ne,2),Ie=U(Fe);Fz(Ie,{get text(){return Z.text},get occurrences(){return T(g)},get skillSpans(){return T(_)},get heightPx(){return T(C)}});var Le=R(Ie,2);p(Le,()=>T(G),e=>{var t=Gz();E(t),z(t,`rows`,1),z(t,`maxlength`,2e4),oe(t,e=>N(o,e),()=>T(o)),V(()=>{z(t,`placeholder`,T(ne)),z(t,`data-composer-composing`,T(Se)?`true`:void 0)}),l(`keydown`,t,be),l(`keyup`,t,Te),l(`click`,t,Te),f(`select`,t,Te),f(`paste`,t,Ee),f(`compositionstart`,t,Ce),f(`compositionend`,t,we),te(t,()=>Z.text,e=>Z.text=e),v(e,t)}),n(Fe);var Re=R(Fe,2),ze=U(Re);a(ze,()=>CR,(e,r)=>{r(e,{get open(){return T(se)},set open(e){N(se,e,!0)},children:(e,r)=>{var i=Jz(),o=K(i);{let e=P(()=>T(D)?`Switch after the current turn ends`:Q.sessionId?`Switch this session's mode`:`Pick the mode for your next session`);a(o,()=>RR,(t,n)=>{n(t,{class:`flex h-7 max-w-[130px] items-center gap-1.5 rounded-full border border-border px-2.5 text-[11px] text-foreground transition-colors hover:bg-muted disabled:cursor-not-allowed disabled:opacity-50`,get title(){return T(e)},"aria-label":`Session mode`,get disabled(){return T(D)},onkeydown:e=>{e.key===`Escape`&&T(se)&&(e.stopPropagation(),N(se,!1))},children:(e,t)=>{var n=Kz(),r=K(n),i=j(r,!0);xR(R(r,2),{class:`h-3 w-3 shrink-0 opacity-60`,"aria-hidden":`true`}),V(()=>c(i,T(F)??`Mode`)),v(e,n)},$$slots:{default:!0}})})}var s=R(o,2),l=e=>{var r=Y(),i=K(r);a(i,()=>DR,(e,r)=>{r(e,{align:`start`,class:`max-h-72 w-44 overflow-y-auto`,onkeydown:e=>{e.key===`Escape`&&(e.stopPropagation(),N(se,!1))},children:(e,r)=>{var i=Y(),o=K(i);t(o,17,()=>We,e=>e.id,(e,t)=>{var r=Y(),i=K(r);{let e=P(()=>T(M)===T(t).id?`true`:void 0);a(i,()=>jR,(r,i)=>{i(r,{get"data-mode-active"(){return T(e)},class:`gap-1.5`,onclick:()=>me(T(t).id),children:(e,r)=>{var i=qz(),a=K(i),o=U(a),s=e=>{Sn(e,{class:`h-3 w-3`,"aria-hidden":`true`})};m(o,e=>{T(M)===T(t).id&&e(s)}),n(a);var l=R(a,2),u=j(l,!0);V(()=>c(u,T(t).label)),v(e,i)},$$slots:{default:!0}})})}v(e,r)}),v(e,i)},$$slots:{default:!0}})}),v(e,r)};m(s,e=>{T(se)&&e(l)}),v(e,i)},$$slots:{default:!0}})});var Be=R(ze,2),Ve=U(Be);sr(Ve,{class:`h-4 w-4`}),n(Be);var He=R(Be,2),Ue=U(He),Ge=U(Ue);{let e=P(()=>T(fe)===`image`?`opacity-0`:``);wl(Ge,{get class(){return`h-4 w-4 ${T(e)??``}`}})}var Ke=R(Ge,2),qe=e=>{vn(e,{class:`absolute inset-0 m-auto h-4 w-4 animate-spin`,"aria-hidden":`true`})};m(Ke,e=>{T(fe)===`image`&&e(qe)}),n(Ue),n(He);var Je=R(He,2),Xe=U(Je),Ze=U(Xe);{let e=P(()=>T(fe)===`file`?`opacity-0`:``);aR(Ze,{get class(){return`h-4 w-4 ${T(e)??``}`}})}var Qe=R(Ze,2),$e=e=>{vn(e,{class:`absolute inset-0 m-auto h-4 w-4 animate-spin`,"aria-hidden":`true`})};m(Qe,e=>{T(fe)===`file`&&e($e)}),n(Xe),n(Je);var et=R(Je,4),nt=e=>{var r=Y(),i=K(r);a(i,()=>CR,(e,r)=>{r(e,{get open(){return T(ie)},set open(e){N(ie,e,!0)},children:(e,r)=>{var i=Jz(),o=K(i);{let e=P(()=>T(re).dangling?`border-amber-500/60 text-amber-600 dark:text-amber-400`:`border-border text-muted-foreground hover:text-foreground`),t=P(()=>T(D)?`Switch after the current turn ends`:`Switch the active model — route configuration lives in Settings → Model`);a(o,()=>RR,(n,r)=>{r(n,{get class(){return`flex h-7 max-w-[150px] items-center gap-1.5 rounded-full border px-2.5 text-[11px] transition-colors hover:bg-muted disabled:cursor-not-allowed disabled:opacity-50 ${T(e)??``}`},get title(){return T(t)},"aria-label":`Switch active model`,get disabled(){return T(D)},onkeydown:e=>{e.key===`Escape`&&T(ie)&&(e.stopPropagation(),N(ie,!1))},children:(e,t)=>{var n=Xz(),r=K(n),i=j(r,!0),a=R(r,2),o=e=>{var t=Yz();V(()=>z(t,`title`,`Reasoning effort: ${T(re).effort}`)),v(e,t)};m(a,e=>{T(re).effort&&e(o)}),xR(R(a,2),{class:`h-3 w-3 shrink-0 opacity-60`,"aria-hidden":`true`}),V(()=>c(i,T(re).label)),v(e,n)},$$slots:{default:!0}})})}var s=R(o,2);a(s,()=>DR,(e,r)=>{r(e,{align:`end`,class:`max-h-72 w-56 overflow-y-auto`,onkeydown:e=>{e.key===`Escape`&&(e.stopPropagation(),N(ie,!1))},children:(e,r)=>{var i=Qz(),o=K(i),s=e=>{var t=Jz(),n=K(t);a(n,()=>PR,(e,t)=>{t(e,{"data-dangling":`true`,class:`px-2 py-1.5 text-[10px] font-medium text-amber-600 dark:text-amber-400`,children:(e,t)=>{ae();var n=S();V(()=>c(n,`${T(re).label??``} — outside Routes`)),v(e,n)},$$slots:{default:!0}})});var r=R(n,2);a(r,()=>IR,(e,t)=>{t(e,{})}),v(e,t)};m(o,e=>{T(re).dangling&&e(s)});var l=R(o,2);t(l,17,()=>T(H),e=>e.provider,(e,r)=>{var i=Jz(),o=K(i);a(o,()=>kR,(e,i)=>{i(e,{children:(e,i)=>{var o=Jz(),s=K(o);a(s,()=>BR,(e,t)=>{t(e,{class:`flex items-center gap-1.5 px-2 py-1 text-[10px] font-medium`,children:(e,t)=>{var n=Zz(),i=K(n),a=j(i,!0),o=R(i,2),s=j(o,!0);V(()=>{k(i,`background: ${T(r).color??``}`),c(a,T(r).letter),c(s,T(r).label)}),v(e,n)},$$slots:{default:!0}})});var l=R(s,2);t(l,16,()=>T(r).models,e=>e,(e,t)=>{var i=Y(),o=K(i);{let e=P(()=>ce(T(r).provider,t)?`true`:void 0);a(o,()=>jR,(i,a)=>{a(i,{get"data-model-active"(){return T(e)},class:`gap-1.5`,onclick:()=>void le(T(r).provider,t),children:(e,i)=>{var a=qz(),o=K(a),s=U(o),l=e=>{Sn(e,{class:`h-3 w-3`,"aria-hidden":`true`})},u=P(()=>ce(T(r).provider,t));m(s,e=>{T(u)&&e(l)}),n(o);var d=R(o,2),f=j(d,!0);V(()=>c(f,t)),v(e,a)},$$slots:{default:!0}})})}v(e,i)}),v(e,o)},$$slots:{default:!0}})});var s=R(o,2);a(s,()=>IR,(e,t)=>{t(e,{})}),v(e,i)});var u=R(l,2);a(u,()=>jR,(e,t)=>{t(e,{onclick:()=>tt(`model`),children:(e,t)=>{ae();var n=S(`Open settings →`);v(e,n)},$$slots:{default:!0}})}),v(e,i)},$$slots:{default:!0}})}),v(e,i)},$$slots:{default:!0}})}),v(e,r)};m(et,e=>{T(re)&&e(nt)});var rt=R(et,2);bz(rt,{});var at=R(rt,2),ot=U(at),st=e=>{yR(e,{class:`h-3 w-3`})},ct=e=>{pR(e,{class:`h-4 w-4`})},lt=e=>{hR(e,{class:`h-4 w-4`})},ut=e=>{_R(e,{class:`h-4 w-4`})};m(ot,e=>{T(A)===`stop`?e(st):T(A)===`queue`?e(ct,1):T(A)===`steer`?e(lt,2):e(ut,-1)}),n(at),n(Re),n(Oe),V(()=>{z(Be,`aria-expanded`,T(x)),z(He,`aria-busy`,T(fe)===`image`),He.disabled=T(fe)!==null,z(Je,`aria-busy`,T(fe)===`file`),Je.disabled=T(fe)!==null,J(at,1,`relative flex h-[34px] w-[34px] shrink-0 items-center justify-center rounded-full transition-colors after:absolute after:-inset-0.5 after:content-[''] ${T(A)===`stop`?`bg-destructive text-white hover:bg-destructive/90`:T(A)===`queue`||T(A)===`steer`?`bg-primary/85 text-primary-foreground hover:bg-primary`:`bg-primary text-primary-foreground hover:bg-primary/90 disabled:opacity-50`}`),z(at,`aria-label`,T(A)===`stop`?`Cancel current activity`:T(A)===`queue`?`Queue message after the current turn`:T(A)===`steer`?`Steer the current turn with this message`:`Send message`),z(at,`title`,T(A)===`stop`?`Cancel current activity`:T(A)===`queue`?`Queue (Enter) · Steer (⌘/Ctrl+Enter)`:T(A)===`steer`?`Steer (Enter) · Queue (⌘/Ctrl+Enter)`:`Send (Enter)`),at.disabled=T(A)!==`stop`&&(!T(O)||Q.sending)}),l(`click`,Be,()=>{N(x,!T(x)),T(o)?.focus()}),l(`click`,He,()=>void pe(`image`)),l(`click`,Je,()=>void pe(`file`)),l(`click`,at,()=>T(A)===`stop`?void Kn():ue(T(A)===`steer`&&or()===`queue`)),v(e,Oe),b()}w([`click`,`keydown`,`keyup`]);var tB=r(`<div class="border-t border-destructive/30 bg-destructive/8 px-3 py-1.5 text-xs text-destructive" role="alert"> </div>`),nB=r(`<div class="mx-3 mb-1.5 flex h-7 shrink-0 items-center justify-between gap-2 rounded-lg bg-amber-500/10 px-2.5 text-[11px] text-amber-700 dark:text-amber-400" role="status"><span class="truncate">Editing — resending keeps your full history (append-only)</span> <button type="button" class="shrink-0 rounded p-0.5 text-amber-700/80 hover:text-amber-700 dark:text-amber-400/80 dark:hover:text-amber-400" title="Cancel edit" aria-label="Cancel edit"><!></button></div>`),rB=r(`<aside aria-label="Agent panel"><!> <div class="absolute inset-y-0 left-0 z-10 hidden w-1.5 cursor-col-resize touch-none select-none hover:bg-primary/30 min-[720px]:block" role="separator" aria-orientation="vertical" aria-label="Resize agent panel"></div> <!> <!> <!> <!> <!> <!></aside>`);function iB(e,t){i(t,!0),W(()=>{rr.open&&Ye.status===`connected`&&tr.view===null&&!tr.loading&&er()}),W(()=>{if(rr.seed){let e=rr.seed;rr.seed=null,Z.text.length===0&&(Z.text=e.text),e.reference!==void 0&&Z.text.includes(e.reference.token)&&Xn(e.reference)}});let r=B(!1),a=0,o=0;function s(e){if(e.button!==0)return;N(r,!0),a=e.clientX,o=rr.width;let t=e.currentTarget;t instanceof HTMLElement&&t.setPointerCapture(e.pointerId),document.body.style.userSelect=`none`,document.body.style.cursor=`col-resize`}function u(){T(r)&&(N(r,!1),document.body.style.userSelect=``,document.body.style.cursor=``)}var d=rB();f(`keydown`,O,e=>{e.key===`Escape`&&rr.open&&!document.querySelector(`[role='dialog']`)&&Gn(!1)}),f(`pointermove`,O,e=>{T(r)&&ar(o+(a-e.clientX))}),f(`pointerup`,O,u),f(`pointercancel`,O,u);var p=U(d);sR(p,{});var h=R(p,2),g=R(h,2);vl(g,{});var _=R(g,2);rR(_,{});var y=R(_,2),x=e=>{var t=tB(),n=j(t,!0);V(()=>c(n,Q.promptError??Q.error)),v(e,t)};m(y,e=>{(Q.promptError??Q.error)&&e(x)});var S=R(y,2),C=e=>{dR(e,{get todos(){return Q.todos}})};m(S,e=>{Q.sessionId&&Q.todos.length>0&&e(C)});var w=R(S,2),E=e=>{var t=nB(),r=R(U(t),2),i=U(r);yn(i,{class:`h-3 w-3`}),n(r),n(t),l(`click`,r,()=>{Z.editing!==null&&(Z.text=``),Z.editing=null}),v(e,t)};m(w,e=>{Z.editing!==null&&e(E)}),eB(R(w,2),{}),n(d),V(()=>{J(d,1,`relative flex h-full w-full flex-col bg-background min-[720px]:w-(--agent-panel-width) min-[720px]:overflow-hidden duration-150 ease-in-out ${T(r)?``:`min-[720px]:transition-[width,border-color] max-[720px]:transition-[transform,visibility]`} ${rr.open?`border-l border-border`:`border-l-0 max-[720px]:translate-x-full max-[720px]:invisible`}`),k(d,`--agent-panel-width: ${(rr.open?rr.width:0)??``}px`)}),l(`pointerdown`,h,s),v(e,d),b()}w([`pointerdown`,`click`]);var aB=r(`<link rel="icon" href="/icons/monochrome-mini.png" type="image/png"/> <link rel="apple-touch-icon" href="/icons/monochrome-mini.png"/>`,1),oB=r(`<span class="px-1 text-xs font-medium text-muted-foreground">Skill Creator</span>`),sB=r(`<button class="no-drag flex h-6 w-8 items-center justify-center rounded text-muted-foreground transition-colors hover:text-foreground max-[720px]:h-11 max-[720px]:w-11" aria-label="Open command palette" aria-keyshortcuts="Meta+K" title="Command palette (Cmd+K)"><!></button> <button class="no-drag flex h-6 w-6 items-center justify-center rounded text-muted-foreground transition-colors hover:text-foreground max-[720px]:h-11 max-[720px]:w-11" aria-label="Reload app" title="Reload"><!></button> <button aria-label="Toggle agent panel" title="Agent panel"><!></button>`,1),cB=r(`<div class="flex min-h-8 items-center border-y border-destructive/30 bg-destructive/8 px-3 text-xs text-destructive" role="status"> </div>`),lB=r(`<div class="relative flex h-screen w-screen flex-col overflow-hidden bg-background text-foreground"><!> <!> <div class="flex min-h-0 flex-1"><!> <main class="min-w-0 flex-1 overflow-hidden"><!> <!></main> <div><!></div></div></div>`),uB=r(`<!> <!> <!> <!>`,1);function dB(e,t){i(t,!0),ue(()=>(Ue(),_e.url.pathname===`/`&&he(`/workspaces`,{replaceState:!0}),Ee({navigate(e,t){t===`REPLACE`?he(e,{replaceState:!0,keepFocus:!0,noScroll:!0}):he(e)}}),qe(),Ge));let r=P(()=>_e.url.pathname);W(()=>{T(r).startsWith(`/creator`)?ul(ll):ul(cl)});let a=P(()=>Ye.status===`connected`);W(()=>{T(a)&&(mt(),Ce())});var o=uB();x(`12qhfyh`,e=>{var t=aB();ae(2),v(e,t)});var s=K(o);ol(s,{children:(e,r)=>{var i=lB(),a=U(i);kr(a,{variant:`main`,left:e=>{var t=oB();v(e,t)},right:e=>{var t=sB(),r=K(t);fl(U(r),{class:`h-3.5 w-3.5`}),n(r);var i=R(r,2),a=U(i);On(a,{class:`h-3.5 w-3.5`}),n(i);var o=R(i,2),s=U(o);xe(s,{class:`h-3.5 w-3.5`}),n(o),V(()=>{J(o,1,`no-drag flex h-6 w-6 items-center justify-center rounded transition-colors ${rr.open?`bg-primary/10 text-primary`:`text-muted-foreground hover:text-foreground`} max-[720px]:h-11 max-[720px]:w-11`),z(o,`aria-pressed`,rr.open)}),l(`pointerdown`,r,e=>e.stopPropagation()),l(`click`,r,()=>globalThis.dispatchEvent(new KeyboardEvent(`keydown`,{key:`k`,metaKey:!0}))),l(`pointerdown`,i,e=>e.stopPropagation()),l(`click`,i,()=>globalThis.location.reload()),l(`pointerdown`,o,e=>e.stopPropagation()),l(`click`,o,()=>Gn(!rr.open)),v(e,t)},$$slots:{left:!0,right:!0}});var o=R(a,2),s=e=>{var t=cB(),n=j(t,!0);V(()=>c(n,Ye.error)),v(e,t)};m(o,e=>{Ye.status===`disconnected`&&e(s)});var u=R(o,2),d=U(u);Dr(d,{});var f=R(d,2),p=U(f);Ne(p,{});var h=R(p,2);g(h,()=>t.children??L),n(f);var _=R(f,2);iB(U(_),{}),n(_),n(u),n(i),V(()=>J(_,1,`agent-panel-layer shrink-0 max-[720px]:absolute max-[720px]:inset-0 max-[720px]:z-40 ${rr.open?``:`pointer-events-none`}`)),v(e,i)},$$slots:{default:!0}});var u=R(s,2);sc(u,{});var d=R(u,2);el(d,{}),il(R(d,2),{}),v(e,o),b()}w([`pointerdown`,`click`]);export{dB as component,dr as universal};
229
+ `)}let D=P(()=>Q.status===`running`),O=P(()=>Z.text.trim().length>0||Z.images.length>0||Z.files.length>0),ee=P(()=>Z.editing!==null),A=P(()=>T(D)&&!T(O)?`stop`:T(D)?or()===`steer`?`steer`:`queue`:`send`),M=P(()=>Q.sessionId?Q.mode:Q.pendingMode),F=P(()=>We.find(e=>e.id===T(M))?.label),ne=P(()=>KR({owner:T(ee)?`Edit your message — sending will resend it as a new message`:null,disconnected:Ye.status===`disconnected`,unavailable:Q.error!==null&&Q.sessionId===null,modeLabel:T(F)??null})),re=P(()=>{let e=tr.view;if(!e)return null;let t=e.settings.model,n=!e.settings.modelRoutes.some(e=>e.provider===t.provider);return{label:`${t.provider} · ${t.model}`,effort:t.reasoningEffort,dangling:n}}),L=B(de({})),ie=B(!1),se=B(!1);W(()=>{zz().then(e=>N(L,e,!0))});let H=P(()=>{let e=tr.view;if(!e)return[];let t=e.settings.model;return e.settings.modelRoutes.map(e=>{let n=e.models.map(e=>e.id);t.provider===e.provider&&!n.includes(t.model)&&n.unshift(t.model);let r=T(L)[e.provider]??e.provider;return{provider:e.provider,label:r,letter:e.iconLetter??r.slice(0,1).toUpperCase(),color:e.iconColor??`hsl(${it(e.provider)} 55% 45%)`,models:n}})});function ce(e,t){let n=tr.view;return n!==null&&n.settings.model.provider===e&&n.settings.model.model===t}async function le(e,t){let n=tr.view?.settings.model.reasoningEffort,r=await Mn({model:{provider:e,model:t,...n!==void 0&&n.length>0?{reasoningEffort:n}:{}}});if(r){if(r.outcome===`rejected`){vt(`${r.code}: ${r.detail}`);return}if(r.outcome===`error`){vt(r.message);return}vt(`Active model → ${e} · ${t}`)}}function ue(e=!1){let t=XR(Z.text.trim(),T(y)).trim();if(t.length===0&&Z.images.length===0&&Z.files.length===0||Q.sending)return;if(Ln.pending>0){vt(`Attachments are still being read — try again in a moment.`);return}let n=Q.status===`running`?Hn(e,or()):`queue`,r=$R(Z.text,Z.references);q=!0,ir(t,Z.images,Z.files,n,r)}let G=B(0),q=!1;W(()=>{q&&Z.text===``&&(q=!1,N(G,T(G)+1))});let fe=B(null);async function pe(e){if(T(fe)===null){N(fe,e,!0);try{let t=await Zn(e);if(t===null||t.paths.length===0)return;let n=t.paths.map(e=>({path:e,name:e.split(/[\\/]/).filter(Boolean).pop()??e}));e===`image`?(Yn(n),qn(n)):kn(n)}finally{N(fe,null)}}}function me(e){if(!Q.sessionId){Q.pendingMode=e;return}Bn(e)}function he(e){if(N(x,!1),e===`/queue`||e===`/steer`){let t=e===`/queue`?`queue`:`steer`;Pn(t),vt(`Busy-Enter preference → ${t}`),Z.text=``;return}Q.sending||(Z.text=``,Z.images=[],Z.files=[],Nn(),ir(e))}function ge(e){N(x,!1);let t=T(o),n=Math.min(t?.selectionStart??Z.text.length,Z.text.length);Z.text=`${e} ${Z.text.slice(n)}`;let r=Math.min(e.length+1,Z.text.length);requestAnimationFrame(()=>{t?.setSelectionRange(r,r),N(h,w(),!0)})}function _e(e){let t=T(o),n=Math.min(t?.selectionStart??Z.text.length,Z.text.length);Z.text=e+Z.text.slice(n);let r=Math.min(e.length,Z.text.length);requestAnimationFrame(()=>{t?.setSelectionRange(r,r),N(h,w(),!0)})}function ve(e){_e(e)}function ye(e){_e(`${e.token} `),Xn(e.reference)}function be(e){if(!T(u)?.handleKeydown(e)&&!T(d)?.handleKeydown(e)&&!T(s)?.handleKeydown(e)){if(e.key===`Backspace`&&!T(Se)){let t=T(o);if(t&&t.selectionStart===t.selectionEnd){let n=tz(Z.text,t.selectionStart,T(g));if(n){e.preventDefault(),Z.text=Z.text.slice(0,n.start)+Z.text.slice(n.end),In(n.reference.uid);let r=n.start;requestAnimationFrame(()=>t.setSelectionRange(r,r));return}}}if(e.key===`Enter`&&!e.shiftKey){if(e.repeat){e.preventDefault();return}if(UR(e,xe)){e.preventDefault();return}e.preventDefault(),ue(e.metaKey||e.ctrlKey)}}}let xe=null,Se=B(!1);function Ce(){N(Se,!0)}function we(){N(Se,!1),xe=Date.now()}function Te(){N(h,w(),!0)}function Ee(e){let t=[...e.clipboardData?.files??[]];if(t.length>0){e.preventDefault();let n=t.filter(e=>e.type.startsWith(`image/`)),r=t.filter(e=>!e.type.startsWith(`image/`));n.length>0&&Rn(n),r.length>0&&jn(r);return}let n=e.clipboardData?.getData(`text/plain`)??``;GR(n)&&(e.preventDefault(),De(WR(n)))}function De(e){let t=T(o);if(!t){Z.text=WR(Z.text+e);return}let n=t.selectionStart??Z.text.length,r=t.selectionEnd??n;Z.text=Z.text.slice(0,n)+e+Z.text.slice(r);let i=n+e.length;requestAnimationFrame(()=>t?.setSelectionRange(i,i))}var Oe=$z(),ke=U(Oe);Az(ke,{});var Ae=R(ke,2);{let e=P(()=>T(y)!==null);oe(Iz(Ae,{get text(){return Z.text},get caretOnFirstLine(){return T(h)},onNavigate:ve,onPick:ye,get suppress(){return T(e)}}),e=>N(u,e,!0),()=>T(u))}var je=R(Ae,2);{let e=P(()=>T(y)!==null);oe(Lz(je,{get text(){return Z.text},get caretOnFirstLine(){return T(h)},onPick:ye,get suppress(){return T(e)}}),e=>N(d,e,!0),()=>T(d))}var Me=R(je,2);{let e=P(()=>T(y)!==null);oe(mz(Me,{get text(){return Z.text},get caretOnFirstLine(){return T(h)},onExecute:he,onInsertSkill:ge,get suppress(){return T(e)},get forcedOpen(){return T(x)},onForceClose:()=>N(x,!1)}),e=>N(s,e,!0),()=>T(s))}var Ne=R(Me,2),Pe=e=>{var r=Wz(),i=U(r);t(i,17,()=>Z.images,I,(e,t,r)=>{var i=Hz(),a=U(i),o=e=>{var n=Bz();V(()=>{z(n,`src`,T(t).preview),z(n,`alt`,T(t).name??`image`)}),v(e,n)},s=e=>{var r=Vz();wl(U(r),{class:`h-5 w-5 text-muted-foreground`,"aria-hidden":`true`}),n(r),V(()=>z(r,`title`,T(t).path??T(t).name??`image`)),v(e,r)};m(a,e=>{T(t).preview?e(o):e(s,-1)});var c=R(a,2),u=U(c);yn(u,{class:`h-2.5 w-2.5`}),n(c),n(i),l(`click`,c,()=>Z.images=Z.images.filter((e,t)=>t!==r)),v(e,i)});var a=R(i,2);t(a,17,()=>Z.files,I,(e,t,r)=>{var i=Uz(),a=U(i),o=R(a);n(i),V(()=>{c(a,`📄 ${T(t).name??``} `),z(o,`aria-label`,`Remove file ${T(t).name??``}`)}),l(`click`,o,()=>Z.files=Z.files.filter((e,t)=>t!==r)),v(e,i)}),n(r),v(e,r)};m(Ne,e=>{(Z.files.length>0||Z.images.length>0)&&e(Pe)});var Fe=R(Ne,2),Ie=U(Fe);Fz(Ie,{get text(){return Z.text},get occurrences(){return T(g)},get skillSpans(){return T(_)},get heightPx(){return T(C)}});var Le=R(Ie,2);p(Le,()=>T(G),e=>{var t=Gz();E(t),z(t,`rows`,1),z(t,`maxlength`,2e4),oe(t,e=>N(o,e),()=>T(o)),V(()=>{z(t,`placeholder`,T(ne)),z(t,`data-composer-composing`,T(Se)?`true`:void 0)}),l(`keydown`,t,be),l(`keyup`,t,Te),l(`click`,t,Te),f(`select`,t,Te),f(`paste`,t,Ee),f(`compositionstart`,t,Ce),f(`compositionend`,t,we),te(t,()=>Z.text,e=>Z.text=e),v(e,t)}),n(Fe);var Re=R(Fe,2),ze=U(Re);a(ze,()=>CR,(e,r)=>{r(e,{get open(){return T(se)},set open(e){N(se,e,!0)},children:(e,r)=>{var i=Jz(),o=K(i);{let e=P(()=>T(D)?`Switch after the current turn ends`:Q.sessionId?`Switch this session's mode`:`Pick the mode for your next session`);a(o,()=>RR,(t,n)=>{n(t,{class:`flex h-7 max-w-[130px] items-center gap-1.5 rounded-full border border-border px-2.5 text-[11px] text-foreground transition-colors hover:bg-muted disabled:cursor-not-allowed disabled:opacity-50`,get title(){return T(e)},"aria-label":`Session mode`,get disabled(){return T(D)},onkeydown:e=>{e.key===`Escape`&&T(se)&&(e.stopPropagation(),N(se,!1))},children:(e,t)=>{var n=Kz(),r=K(n),i=j(r,!0);xR(R(r,2),{class:`h-3 w-3 shrink-0 opacity-60`,"aria-hidden":`true`}),V(()=>c(i,T(F)??`Mode`)),v(e,n)},$$slots:{default:!0}})})}var s=R(o,2),l=e=>{var r=Y(),i=K(r);a(i,()=>DR,(e,r)=>{r(e,{align:`start`,class:`max-h-72 w-44 overflow-y-auto`,onkeydown:e=>{e.key===`Escape`&&(e.stopPropagation(),N(se,!1))},children:(e,r)=>{var i=Y(),o=K(i);t(o,17,()=>We,e=>e.id,(e,t)=>{var r=Y(),i=K(r);{let e=P(()=>T(M)===T(t).id?`true`:void 0);a(i,()=>jR,(r,i)=>{i(r,{get"data-mode-active"(){return T(e)},class:`gap-1.5`,onclick:()=>me(T(t).id),children:(e,r)=>{var i=qz(),a=K(i),o=U(a),s=e=>{Sn(e,{class:`h-3 w-3`,"aria-hidden":`true`})};m(o,e=>{T(M)===T(t).id&&e(s)}),n(a);var l=R(a,2),u=j(l,!0);V(()=>c(u,T(t).label)),v(e,i)},$$slots:{default:!0}})})}v(e,r)}),v(e,i)},$$slots:{default:!0}})}),v(e,r)};m(s,e=>{T(se)&&e(l)}),v(e,i)},$$slots:{default:!0}})});var Be=R(ze,2),Ve=U(Be);sr(Ve,{class:`h-4 w-4`}),n(Be);var He=R(Be,2),Ue=U(He),Ge=U(Ue);{let e=P(()=>T(fe)===`image`?`opacity-0`:``);wl(Ge,{get class(){return`h-4 w-4 ${T(e)??``}`}})}var Ke=R(Ge,2),qe=e=>{vn(e,{class:`absolute inset-0 m-auto h-4 w-4 animate-spin`,"aria-hidden":`true`})};m(Ke,e=>{T(fe)===`image`&&e(qe)}),n(Ue),n(He);var Je=R(He,2),Xe=U(Je),Ze=U(Xe);{let e=P(()=>T(fe)===`file`?`opacity-0`:``);aR(Ze,{get class(){return`h-4 w-4 ${T(e)??``}`}})}var Qe=R(Ze,2),$e=e=>{vn(e,{class:`absolute inset-0 m-auto h-4 w-4 animate-spin`,"aria-hidden":`true`})};m(Qe,e=>{T(fe)===`file`&&e($e)}),n(Xe),n(Je);var et=R(Je,4),nt=e=>{var r=Y(),i=K(r);a(i,()=>CR,(e,r)=>{r(e,{get open(){return T(ie)},set open(e){N(ie,e,!0)},children:(e,r)=>{var i=Jz(),o=K(i);{let e=P(()=>T(re).dangling?`border-amber-500/60 text-amber-600 dark:text-amber-400`:`border-border text-muted-foreground hover:text-foreground`),t=P(()=>T(D)?`Switch after the current turn ends`:`Switch the active model — route configuration lives in Settings → Model`);a(o,()=>RR,(n,r)=>{r(n,{get class(){return`flex h-7 max-w-[150px] items-center gap-1.5 rounded-full border px-2.5 text-[11px] transition-colors hover:bg-muted disabled:cursor-not-allowed disabled:opacity-50 ${T(e)??``}`},get title(){return T(t)},"aria-label":`Switch active model`,get disabled(){return T(D)},onkeydown:e=>{e.key===`Escape`&&T(ie)&&(e.stopPropagation(),N(ie,!1))},children:(e,t)=>{var n=Xz(),r=K(n),i=j(r,!0),a=R(r,2),o=e=>{var t=Yz();V(()=>z(t,`title`,`Reasoning effort: ${T(re).effort}`)),v(e,t)};m(a,e=>{T(re).effort&&e(o)}),xR(R(a,2),{class:`h-3 w-3 shrink-0 opacity-60`,"aria-hidden":`true`}),V(()=>c(i,T(re).label)),v(e,n)},$$slots:{default:!0}})})}var s=R(o,2);a(s,()=>DR,(e,r)=>{r(e,{align:`end`,class:`max-h-72 w-56 overflow-y-auto`,onkeydown:e=>{e.key===`Escape`&&(e.stopPropagation(),N(ie,!1))},children:(e,r)=>{var i=Qz(),o=K(i),s=e=>{var t=Jz(),n=K(t);a(n,()=>PR,(e,t)=>{t(e,{"data-dangling":`true`,class:`px-2 py-1.5 text-[10px] font-medium text-amber-600 dark:text-amber-400`,children:(e,t)=>{ae();var n=S();V(()=>c(n,`${T(re).label??``} — outside Routes`)),v(e,n)},$$slots:{default:!0}})});var r=R(n,2);a(r,()=>IR,(e,t)=>{t(e,{})}),v(e,t)};m(o,e=>{T(re).dangling&&e(s)});var l=R(o,2);t(l,17,()=>T(H),e=>e.provider,(e,r)=>{var i=Jz(),o=K(i);a(o,()=>kR,(e,i)=>{i(e,{children:(e,i)=>{var o=Jz(),s=K(o);a(s,()=>BR,(e,t)=>{t(e,{class:`flex items-center gap-1.5 px-2 py-1 text-[10px] font-medium`,children:(e,t)=>{var n=Zz(),i=K(n),a=j(i,!0),o=R(i,2),s=j(o,!0);V(()=>{k(i,`background: ${T(r).color??``}`),c(a,T(r).letter),c(s,T(r).label)}),v(e,n)},$$slots:{default:!0}})});var l=R(s,2);t(l,16,()=>T(r).models,e=>e,(e,t)=>{var i=Y(),o=K(i);{let e=P(()=>ce(T(r).provider,t)?`true`:void 0);a(o,()=>jR,(i,a)=>{a(i,{get"data-model-active"(){return T(e)},class:`gap-1.5`,onclick:()=>void le(T(r).provider,t),children:(e,i)=>{var a=qz(),o=K(a),s=U(o),l=e=>{Sn(e,{class:`h-3 w-3`,"aria-hidden":`true`})},u=P(()=>ce(T(r).provider,t));m(s,e=>{T(u)&&e(l)}),n(o);var d=R(o,2),f=j(d,!0);V(()=>c(f,t)),v(e,a)},$$slots:{default:!0}})})}v(e,i)}),v(e,o)},$$slots:{default:!0}})});var s=R(o,2);a(s,()=>IR,(e,t)=>{t(e,{})}),v(e,i)});var u=R(l,2);a(u,()=>jR,(e,t)=>{t(e,{onclick:()=>tt(`model`),children:(e,t)=>{ae();var n=S(`Open settings →`);v(e,n)},$$slots:{default:!0}})}),v(e,i)},$$slots:{default:!0}})}),v(e,i)},$$slots:{default:!0}})}),v(e,r)};m(et,e=>{T(re)&&e(nt)});var rt=R(et,2);bz(rt,{});var at=R(rt,2),ot=U(at),st=e=>{yR(e,{class:`h-3 w-3`})},ct=e=>{pR(e,{class:`h-4 w-4`})},lt=e=>{hR(e,{class:`h-4 w-4`})},ut=e=>{_R(e,{class:`h-4 w-4`})};m(ot,e=>{T(A)===`stop`?e(st):T(A)===`queue`?e(ct,1):T(A)===`steer`?e(lt,2):e(ut,-1)}),n(at),n(Re),n(Oe),V(()=>{z(Be,`aria-expanded`,T(x)),z(He,`aria-busy`,T(fe)===`image`),He.disabled=T(fe)!==null,z(Je,`aria-busy`,T(fe)===`file`),Je.disabled=T(fe)!==null,J(at,1,`relative flex h-[34px] w-[34px] shrink-0 items-center justify-center rounded-full transition-colors after:absolute after:-inset-0.5 after:content-[''] ${T(A)===`stop`?`bg-destructive text-white hover:bg-destructive/90`:T(A)===`queue`||T(A)===`steer`?`bg-primary/85 text-primary-foreground hover:bg-primary`:`bg-primary text-primary-foreground hover:bg-primary/90 disabled:opacity-50`}`),z(at,`aria-label`,T(A)===`stop`?`Cancel current activity`:T(A)===`queue`?`Queue message after the current turn`:T(A)===`steer`?`Steer the current turn with this message`:`Send message`),z(at,`title`,T(A)===`stop`?`Cancel current activity`:T(A)===`queue`?`Queue (Enter) · Steer (⌘/Ctrl+Enter)`:T(A)===`steer`?`Steer (Enter) · Queue (⌘/Ctrl+Enter)`:`Send (Enter)`),at.disabled=T(A)!==`stop`&&(!T(O)||Q.sending)}),l(`click`,Be,()=>{N(x,!T(x)),T(o)?.focus()}),l(`click`,He,()=>void pe(`image`)),l(`click`,Je,()=>void pe(`file`)),l(`click`,at,()=>T(A)===`stop`?void Kn():ue(T(A)===`steer`&&or()===`queue`)),v(e,Oe),b()}w([`click`,`keydown`,`keyup`]);var tB=r(`<div class="border-t border-destructive/30 bg-destructive/8 px-3 py-1.5 text-xs text-destructive" role="alert"> </div>`),nB=r(`<div class="mx-3 mb-1.5 flex h-7 shrink-0 items-center justify-between gap-2 rounded-lg bg-amber-500/10 px-2.5 text-[11px] text-amber-700 dark:text-amber-400" role="status"><span class="truncate">Editing — resending keeps your full history (append-only)</span> <button type="button" class="shrink-0 rounded p-0.5 text-amber-700/80 hover:text-amber-700 dark:text-amber-400/80 dark:hover:text-amber-400" title="Cancel edit" aria-label="Cancel edit"><!></button></div>`),rB=r(`<aside aria-label="Agent panel"><!> <div class="absolute inset-y-0 left-0 z-10 hidden w-1.5 cursor-col-resize touch-none select-none hover:bg-primary/30 min-[720px]:block" role="separator" aria-orientation="vertical" aria-label="Resize agent panel"></div> <!> <!> <!> <!> <!> <!></aside>`);function iB(e,t){i(t,!0),W(()=>{rr.open&&Ye.status===`connected`&&tr.view===null&&!tr.loading&&er()}),W(()=>{if(rr.seed){let e=rr.seed;rr.seed=null,Z.text.length===0&&(Z.text=e.text),e.reference!==void 0&&Z.text.includes(e.reference.token)&&Xn(e.reference)}});let r=B(!1),a=0,o=0;function s(e){if(e.button!==0)return;N(r,!0),a=e.clientX,o=rr.width;let t=e.currentTarget;t instanceof HTMLElement&&t.setPointerCapture(e.pointerId),document.body.style.userSelect=`none`,document.body.style.cursor=`col-resize`}function u(){T(r)&&(N(r,!1),document.body.style.userSelect=``,document.body.style.cursor=``)}var d=rB();f(`keydown`,O,e=>{e.key===`Escape`&&rr.open&&!document.querySelector(`[role='dialog']`)&&Gn(!1)}),f(`pointermove`,O,e=>{T(r)&&ar(o+(a-e.clientX))}),f(`pointerup`,O,u),f(`pointercancel`,O,u);var p=U(d);sR(p,{});var h=R(p,2),g=R(h,2);vl(g,{});var _=R(g,2);rR(_,{});var y=R(_,2),x=e=>{var t=tB(),n=j(t,!0);V(()=>c(n,Q.promptError??Q.error)),v(e,t)};m(y,e=>{(Q.promptError??Q.error)&&e(x)});var S=R(y,2),C=e=>{dR(e,{get todos(){return Q.todos}})};m(S,e=>{Q.sessionId&&Q.todos.length>0&&e(C)});var w=R(S,2),E=e=>{var t=nB(),r=R(U(t),2),i=U(r);yn(i,{class:`h-3 w-3`}),n(r),n(t),l(`click`,r,()=>{Z.editing!==null&&(Z.text=``),Z.editing=null}),v(e,t)};m(w,e=>{Z.editing!==null&&e(E)}),eB(R(w,2),{}),n(d),V(()=>{J(d,1,`relative flex h-full w-full flex-col bg-background min-[720px]:w-(--agent-panel-width) min-[720px]:overflow-hidden duration-150 ease-in-out ${T(r)?``:`min-[720px]:transition-[width,border-color] max-[720px]:transition-[transform,visibility]`} ${rr.open?`border-l border-border`:`border-l-0 max-[720px]:translate-x-full max-[720px]:invisible`}`),k(d,`--agent-panel-width: ${(rr.open?rr.width:0)??``}px`)}),l(`pointerdown`,h,s),v(e,d),b()}w([`pointerdown`,`click`]);var aB=r(`<link rel="icon" href="/icons/monochrome-mini.png" type="image/png"/> <link rel="apple-touch-icon" href="/icons/monochrome-mini.png"/>`,1),oB=r(`<span class="px-1 text-xs font-medium text-muted-foreground">Skill Creator</span>`),sB=r(`<button class="no-drag flex h-6 w-8 items-center justify-center rounded text-muted-foreground transition-colors hover:text-foreground max-[720px]:h-11 max-[720px]:w-11" aria-label="Open command palette" aria-keyshortcuts="Meta+K" title="Command palette (Cmd+K)"><!></button> <button class="no-drag flex h-6 w-6 items-center justify-center rounded text-muted-foreground transition-colors hover:text-foreground max-[720px]:h-11 max-[720px]:w-11" aria-label="Reload app" title="Reload"><!></button> <button aria-label="Toggle agent panel" title="Agent panel"><!></button>`,1),cB=r(`<div class="flex min-h-8 items-center border-y border-destructive/30 bg-destructive/8 px-3 text-xs text-destructive" role="status"> </div>`),lB=r(`<div class="relative flex h-screen w-screen flex-col overflow-hidden bg-background text-foreground"><!> <!> <div class="flex min-h-0 flex-1"><!> <main class="min-w-0 flex-1 overflow-hidden"><!> <!></main> <div><!></div></div></div>`),uB=r(`<!> <!> <!> <!>`,1);function dB(e,t){i(t,!0),ue(()=>(Ue(),_e.url.pathname===`/`&&he(`/workspaces`,{replaceState:!0}),Ee({navigate(e,t){t===`REPLACE`?he(e,{replaceState:!0,keepFocus:!0,noScroll:!0}):he(e)}}),qe(),Ge));let r=P(()=>_e.url.pathname);W(()=>{T(r).startsWith(`/creator`)?ul(ll):ul(cl)});let a=P(()=>Ye.status===`connected`);W(()=>{T(a)&&(mt(),Ce())});var o=uB();x(`12qhfyh`,e=>{var t=aB();ae(2),v(e,t)});var s=K(o);ol(s,{children:(e,r)=>{var i=lB(),a=U(i);kr(a,{variant:`main`,left:e=>{var t=oB();v(e,t)},right:e=>{var t=sB(),r=K(t);fl(U(r),{class:`h-3.5 w-3.5`}),n(r);var i=R(r,2),a=U(i);On(a,{class:`h-3.5 w-3.5`}),n(i);var o=R(i,2),s=U(o);xe(s,{class:`h-3.5 w-3.5`}),n(o),V(()=>{J(o,1,`no-drag flex h-6 w-6 items-center justify-center rounded transition-colors ${rr.open?`bg-primary/10 text-primary`:`text-muted-foreground hover:text-foreground`} max-[720px]:h-11 max-[720px]:w-11`),z(o,`aria-pressed`,rr.open)}),l(`click`,r,()=>globalThis.dispatchEvent(new KeyboardEvent(`keydown`,{key:`k`,metaKey:!0}))),l(`click`,i,()=>globalThis.location.reload()),l(`click`,o,()=>Gn(!rr.open)),v(e,t)},$$slots:{left:!0,right:!0}});var o=R(a,2),s=e=>{var t=cB(),n=j(t,!0);V(()=>c(n,Ye.error)),v(e,t)};m(o,e=>{Ye.status===`disconnected`&&e(s)});var u=R(o,2),d=U(u);Dr(d,{});var f=R(d,2),p=U(f);Ne(p,{});var h=R(p,2);g(h,()=>t.children??L),n(f);var _=R(f,2);iB(U(_),{}),n(_),n(u),n(i),V(()=>J(_,1,`agent-panel-layer shrink-0 max-[720px]:absolute max-[720px]:inset-0 max-[720px]:z-40 ${rr.open?``:`pointer-events-none`}`)),v(e,i)},$$slots:{default:!0}});var u=R(s,2);sc(u,{});var d=R(u,2);el(d,{}),il(R(d,2),{}),v(e,o),b()}w([`click`]);export{dB as component,dr as universal};