@snagset/server 0.1.40 → 0.1.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app.js +5 -0
- package/dist/app.js.map +1 -1
- package/dist/config.generated.js +2 -1
- package/dist/config.generated.js.map +1 -1
- package/dist/routes/invites.js +19 -7
- package/dist/routes/invites.js.map +1 -1
- package/package.json +1 -1
- package/static/dashboard/assets/CompositeItem-LCGvVtac.js +1 -0
- package/static/dashboard/assets/CompositeList-Cty0rzq_.js +1 -0
- package/static/dashboard/assets/{ConfirmDialog-D7eZU5Z6.js → ConfirmDialog-DIwxuqY9.js} +1 -1
- package/static/dashboard/assets/{CopyButton-_X7ITEaj.js → CopyButton-DDGcA3Xd.js} +1 -1
- package/static/dashboard/assets/{FieldItemContext-BgajCxI_.js → FieldItemContext-EmJLiYBJ.js} +1 -1
- package/static/dashboard/assets/{InstallTag-Bxq5AWM0.js → InstallTag-DnVvf8zx.js} +1 -1
- package/static/dashboard/assets/InstanceRows-376JOINE.js +1 -0
- package/static/dashboard/assets/{McpTokens-D_0BEsPb.js → McpTokens-C6CW9eYK.js} +1 -1
- package/static/dashboard/assets/{SaveState-WYxHW3VJ.js → SaveState-R4390int.js} +1 -1
- package/static/dashboard/assets/{_app-Bv20PwQa.js → _app-CAb1BtpQ.js} +1 -1
- package/static/dashboard/assets/_app-DaKVP1n8.js +61 -0
- package/static/dashboard/assets/activity-rK4Sf6B2.js +1 -0
- package/static/dashboard/assets/{arrow-left-BVcH0ZD5.js → arrow-left-6KOxG0mI.js} +1 -1
- package/static/dashboard/assets/avatar-BHXI3Cxz.js +1 -0
- package/static/dashboard/assets/{badge-D4-0NV1D.js → badge-BVeGUvW4.js} +1 -1
- package/static/dashboard/assets/{card-_fRmCPLn.js → card-CQykn6b-.js} +1 -1
- package/static/dashboard/assets/{check-BTd2LoGN.js → check-C5gLbOCB.js} +1 -1
- package/static/dashboard/assets/chevron-down-CNIHPCcw.js +6 -0
- package/static/dashboard/assets/{chevron-right-Co0UMSkz.js → chevron-right-voH028MP.js} +1 -1
- package/static/dashboard/assets/{copy-CEpGdeGb.js → copy-2WiQI5_8.js} +1 -1
- package/static/dashboard/assets/{dialog-C7r1DbuZ.js → dialog-I_D8p4LG.js} +2 -2
- package/static/dashboard/assets/dropdown-menu-BD3iKpyK.js +11 -0
- package/static/dashboard/assets/{forgot-nTWEgSRm.js → forgot-Buk2U0Iq.js} +1 -1
- package/static/dashboard/assets/{image-off-DP5YbLdB.js → image-off-pz0vPmjw.js} +1 -1
- package/static/dashboard/assets/index-CoiIx5MR.css +1 -0
- package/static/dashboard/assets/{index-Ddw_j6S-.js → index-DGJgBiEe.js} +21 -21
- package/static/dashboard/assets/invite-8sNxyTpF.js +1 -0
- package/static/dashboard/assets/label-ClUOe0Qf.js +1 -0
- package/static/dashboard/assets/{labels-BuZpvtvw.js → labels-ToSuNGQl.js} +1 -1
- package/static/dashboard/assets/{layout-grid-DpWj1k0D.js → layout-grid-DLRb1zmb.js} +1 -1
- package/static/dashboard/assets/{parts-DuhvDJGT.js → parts-CeW0gqpG.js} +1 -1
- package/static/dashboard/assets/{plus-fom7ulPf.js → plus-DMA0pE49.js} +1 -1
- package/static/dashboard/assets/reset-citpUr97.js +1 -0
- package/static/dashboard/assets/s._site-BVRYrqWc.js +1 -0
- package/static/dashboard/assets/s._site.comments-CupTJMag.js +49 -0
- package/static/dashboard/assets/s._site.reviewers-CgBIszUX.js +1 -0
- package/static/dashboard/assets/s._site.settings-CEuj_wJ1.js +1 -0
- package/static/dashboard/assets/serializeValue-DRMAHja_.js +1 -0
- package/static/dashboard/assets/{setup-nee74nI7.js → setup-otr5LUWS.js} +1 -1
- package/static/dashboard/assets/{sign-in-DJSdsL9I.js → sign-in-BRpUPHbi.js} +1 -1
- package/static/dashboard/assets/{sign-up-DeQDeqC_.js → sign-up-sC_IfvbO.js} +1 -1
- package/static/dashboard/assets/sites-D52Ciw1e.js +1 -0
- package/static/dashboard/assets/studio-0_bXXp2K.js +1 -0
- package/static/dashboard/assets/{studio-CL5TjGsb.js → studio-B02T4EY4.js} +1 -1
- package/static/dashboard/assets/studio.index-gCE2490t.js +1 -0
- package/static/dashboard/assets/studio.integrations-BrvDZjmR.js +1 -0
- package/static/dashboard/assets/studio.members-CWZNCLCY.js +11 -0
- package/static/dashboard/assets/studio.plan-Bwz6dizT.js +1 -0
- package/static/dashboard/assets/{sun-C6_OdtRI.js → sun-CgLdWf2g.js} +1 -1
- package/static/dashboard/assets/switch-BZw_bqWh.js +1 -0
- package/static/dashboard/assets/{table-WdFx8YPW.js → table-t_7248Aq.js} +1 -1
- package/static/dashboard/assets/{useAriaLabelledBy-CYXdXCKz.js → useAriaLabelledBy-BSClfAH5.js} +1 -1
- package/static/dashboard/assets/{useBaseQuery-bYBwKcW7.js → useBaseQuery-BzwsA17g.js} +1 -1
- package/static/dashboard/assets/useQuery-dbNRhTlt.js +1 -0
- package/static/dashboard/assets/useRender-BJVEua-j.js +1 -0
- package/static/dashboard/assets/{useValueChanged-DCX5-3sY.js → useValueChanged-CEh0b15T.js} +1 -1
- package/static/dashboard/assets/{users-BSiXsvcu.js → users-DLfPGZtA.js} +1 -1
- package/static/dashboard/assets/{welcome-C96YFTXf.js → welcome-qvhXOg78.js} +3 -3
- package/static/dashboard/assets/{widget-signin-DIvRFGYL.js → widget-signin-CB_pBDz0.js} +1 -1
- package/static/dashboard/assets/{you-CNN1L9wO.js → you-0VVZ27jc.js} +1 -1
- package/static/dashboard/assets/{zod-BXAKx0ML.js → zod-DrXRVGy0.js} +1 -1
- package/static/dashboard/index.html +2 -2
- package/static/widget/build.json +2 -2
- package/static/widget/snag.js +1 -1
- package/static/widget/snag.runtime.js +1 -1
- package/static/dashboard/assets/CompositeItem-CP7pxc5U.js +0 -1
- package/static/dashboard/assets/_app-C4LQnv_m.js +0 -56
- package/static/dashboard/assets/activity-Ch0XQ9sf.js +0 -1
- package/static/dashboard/assets/avatar-B4uC-2Rd.js +0 -1
- package/static/dashboard/assets/dropdown-menu-Clnp0fwC.js +0 -11
- package/static/dashboard/assets/index-Do3jpVIF.css +0 -1
- package/static/dashboard/assets/invite-CHU_LQYP.js +0 -1
- package/static/dashboard/assets/label-CeY5IHdJ.js +0 -1
- package/static/dashboard/assets/reset-CQMD1ToU.js +0 -1
- package/static/dashboard/assets/s._site-XzH7h0kY.js +0 -1
- package/static/dashboard/assets/s._site.comments-D_QbkDGk.js +0 -54
- package/static/dashboard/assets/s._site.reviewers-DKQj9ftE.js +0 -1
- package/static/dashboard/assets/s._site.settings-DGhg9pWK.js +0 -1
- package/static/dashboard/assets/sites-l8LQQwZW.js +0 -1
- package/static/dashboard/assets/studio-CLnwa1jr.js +0 -1
- package/static/dashboard/assets/studio.index-D4sAU91A.js +0 -1
- package/static/dashboard/assets/studio.integrations-BLkBekJf.js +0 -1
- package/static/dashboard/assets/studio.members-KzPokmYW.js +0 -6
- package/static/dashboard/assets/switch-CGYNLqP6.js +0 -1
- package/static/dashboard/assets/useQuery-CaIu0ohN.js +0 -1
- package/static/dashboard/assets/useRender-Rh7x0Dwc.js +0 -1
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import{u as ht,a as xt,b as ft,c as O,d as je,r as o,e as L,f as ce,g as mt,j as e,B as Z,h as w,i as ne,m as ye,E as bt,k as Se,l as xe,n as vt,o as jt,p as ae,q as K,S as yt,s as ee,t as St,L as _,v as wt,M as Nt,w as Ct,x as kt,y as Tt,z as Pt,A as $e,O as Rt}from"./index-DGJgBiEe.js";import{u as we}from"./useQuery-dbNRhTlt.js";import{T as Mt,i as Be,a as Et,D as Ot,b as Dt,c as It,X as At,d as _t,e as zt,f as Ht,g as Lt,R as $t,p as Bt,h as Ft,j as Ut,k as qt,P as Gt,l as Vt,u as Kt,m as Yt,n as Wt,o as Xt,q as Qt,r as Jt,s as Zt,t as es,v as ts,w as ss,x as ns,y as as,z as rs,A as os,F as is,B as ls,C as ds,E as Fe,G as Ue,H as qe,I as cs,J as us,K as ps}from"./dialog-I_D8p4LG.js";import{c as B,n as Ge,g as gs,a as fe,t as hs,d as xs,i as fs,u as ms,b as ue,L as bs,I as vs}from"./label-ClUOe0Qf.js";import{g as me,u as js,a as ys,b as Ss,s as ws,c as Ns,d as Cs,S as Ve,E as J,D as re,e as oe,f as ie,h as Ne,i as te,j as I,k as V,l as ks,m as pe}from"./dropdown-menu-BD3iKpyK.js";import{u as Ts,a as Ps,g as Rs,A as Ms,b as Es}from"./avatar-BHXI3Cxz.js";import{u as Ke}from"./useRender-BJVEua-j.js";import{u as le,S as Os,i as Ds,a as Is}from"./labels-ToSuNGQl.js";import{L as se}from"./layout-grid-DLRb1zmb.js";import{U as be}from"./users-DLfPGZtA.js";import{c as As}from"./update-duXzIzFS.js";import{P as Ye}from"./plus-DMA0pE49.js";import{M as _s,S as zs,a as Hs}from"./sun-CgLdWf2g.js";import"./useBaseQuery-BzwsA17g.js";import"./check-C5gLbOCB.js";import"./CompositeList-Cty0rzq_.js";import"./CompositeItem-LCGvVtac.js";import"./useValueChanged-CEh0b15T.js";function Ls(t){const s=ht({warn:t?.router===void 0}),n=t?.router||s;return xt(n.stores.__store,ft(t,n))}/**
|
|
2
|
+
* @license lucide-react v1.39.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const $s=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],We=O("activity",$s);/**
|
|
7
|
+
* @license lucide-react v1.39.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/const Bs=[["path",{d:"M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2",key:"1ah6g2"}],["rect",{x:"14",y:"2",width:"8",height:"8",rx:"1",key:"88lufb"}]],Xe=O("blocks",Bs);/**
|
|
12
|
+
* @license lucide-react v1.39.0 - ISC
|
|
13
|
+
*
|
|
14
|
+
* This source code is licensed under the ISC license.
|
|
15
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
+
*/const Fs=[["path",{d:"M12 5v16",key:"1f6ucr"}],["path",{d:"M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z",key:"1fyvmf"}]],Qe=O("book-open",Fs);/**
|
|
17
|
+
* @license lucide-react v1.39.0 - ISC
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the ISC license.
|
|
20
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
+
*/const Us=[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]],Ce=O("building-2",Us);/**
|
|
22
|
+
* @license lucide-react v1.39.0 - ISC
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the ISC license.
|
|
25
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/const qs=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],ke=O("chevrons-up-down",qs);/**
|
|
27
|
+
* @license lucide-react v1.39.0 - ISC
|
|
28
|
+
*
|
|
29
|
+
* This source code is licensed under the ISC license.
|
|
30
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
+
*/const Gs=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Vs=O("circle-question-mark",Gs);/**
|
|
32
|
+
* @license lucide-react v1.39.0 - ISC
|
|
33
|
+
*
|
|
34
|
+
* This source code is licensed under the ISC license.
|
|
35
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
+
*/const Ks=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],Ys=O("credit-card",Ks);/**
|
|
37
|
+
* @license lucide-react v1.39.0 - ISC
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the ISC license.
|
|
40
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/const Ws=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],Xs=O("log-out",Ws);/**
|
|
42
|
+
* @license lucide-react v1.39.0 - ISC
|
|
43
|
+
*
|
|
44
|
+
* This source code is licensed under the ISC license.
|
|
45
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
+
*/const Qs=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],ve=O("message-square",Qs);/**
|
|
47
|
+
* @license lucide-react v1.39.0 - ISC
|
|
48
|
+
*
|
|
49
|
+
* This source code is licensed under the ISC license.
|
|
50
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
51
|
+
*/const Js=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],Zs=O("panel-left",Js);/**
|
|
52
|
+
* @license lucide-react v1.39.0 - ISC
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the ISC license.
|
|
55
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
+
*/const en=[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]],Je=O("sliders-horizontal",en);/**
|
|
57
|
+
* @license lucide-react v1.39.0 - ISC
|
|
58
|
+
*
|
|
59
|
+
* This source code is licensed under the ISC license.
|
|
60
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
+
*/const tn=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Ze=O("user",tn),sn=[["mcp-tokens"],["instance"],["integrations"],["invites"],["members"]];function nn(){const t=le().user.role,s=je(),n=o.useRef(t);o.useEffect(()=>{if(n.current!==t){n.current=t;for(const a of sn)s.resetQueries({queryKey:a})}},[t,s])}const ge=768;function an(){const[t,s]=o.useState(void 0);return o.useEffect(()=>{const n=window.matchMedia(`(max-width: ${ge-1}px)`),a=()=>{s(window.innerWidth<ge)};return n.addEventListener("change",a),s(window.innerWidth<ge),()=>n.removeEventListener("change",a)},[]),!!t}const rn=o.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Mt,currentIdRef:{current:null},currentContextRef:{current:null}});function on(t,s){t.current=s.current}function ln(t,s={open:!1}){const{open:n}=s,a="rootStore"in t?t.rootStore:t,r=a.useState("floatingId"),p=o.useContext(rn),{currentIdRef:d,delayRef:i,timeoutMs:f,initialDelayRef:c,currentContextRef:g,hasProvider:b,timeout:x}=p,[j,l]=o.useState(!1),S=o.useRef(n);return L(()=>{S.current=n},[n]),L(()=>{function h(){g.current?.setIsInstantPhase(!1),d.current=null,g.current=null,i.current=c.current,x.clear()}if(d.current&&!n&&d.current===r){if(l(!1),f){const m=r;return x.start(f,()=>{a.select("open")||d.current&&d.current!==m||h()}),()=>{(S.current||d.current!==m)&&x.clear()}}h()}},[n,r,d,i,f,c,g,x,a]),L(()=>{if(!n)return;const h=g.current,m=d.current;x.clear(),g.current={onOpenChange:a.setOpen,setIsInstantPhase:l},d.current=r,i.current={open:0,close:me(c.current,"close")},m!==null&&m!==r?(l(!0),h?.setIsInstantPhase(!0),h?.onOpenChange(!1,B(Ge))):(l(!1),h?.setIsInstantPhase(!1))},[n,r,a,d,i,c,g,x]),L(()=>()=>{if(d.current===r){if(g.current=null,!S.current)return;d.current=null,on(i,c),x.clear()}},[g,d,i,r,c,x]),o.useMemo(()=>({hasProvider:b,delayRef:i,isInstantPhase:j}),[b,i,j])}function dn(t,s){let n=null,a=null,r=!1;return{contextElement:t||void 0,getBoundingClientRect(){const p=t?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},d=s.axis==="x"||s.axis==="both",i=s.axis==="y"||s.axis==="both",f=["mouseenter","mousemove"].includes(s.dataRef.current.openEvent?.type||"")&&s.pointerType!=="touch";let c=p.width,g=p.height,b=p.x,x=p.y;return n==null&&s.x&&d&&(n=p.x-s.x),a==null&&s.y&&i&&(a=p.y-s.y),b-=n||0,x-=a||0,c=0,g=0,!r||f?(c=s.axis==="y"?p.width:0,g=s.axis==="x"?p.height:0,b=d&&s.x!=null?s.x:b,x=i&&s.y!=null?s.y:x):r&&!f&&(g=s.axis==="x"?p.height:g,c=s.axis==="y"?p.width:c),r=!0,{width:c,height:g,x:b,y:x,top:x,right:b+c,bottom:x+g,left:b}}}}function Ae(t){return t!=null&&t.clientX!=null}function cn(t,s={}){const{enabled:n=!0,axis:a="both"}=s,r="rootStore"in t?t.rootStore:t,p=r.useState("open"),d=r.useState("floatingElement"),i=r.useState("domReferenceElement"),f=r.context.dataRef,c=o.useRef(!1),g=o.useRef(null),[b,x]=o.useState(),[j,l]=o.useState([]),S=ce(v=>{r.set("positionReference",v)}),h=ce((v,y,R)=>{c.current||f.current.openEvent&&!Ae(f.current.openEvent)||r.set("positionReference",dn(R??i,{x:v,y,axis:a,dataRef:f,pointerType:b}))}),m=ce(v=>{p?g.current||(h(v.clientX,v.clientY,v.currentTarget),l([])):h(v.clientX,v.clientY,v.currentTarget)}),C=Be(b)?d:p;o.useEffect(()=>{if(!n){S(i);return}if(!C)return;function v(){g.current?.(),g.current=null}const y=mt(d);function R(P){const u=gs(P);fe(d,u)?v():h(P.clientX,P.clientY)}return!f.current.openEvent||Ae(f.current.openEvent)?g.current=Et(y,"mousemove",R):S(i),v},[C,n,d,f,i,r,h,S,j]),o.useEffect(()=>()=>{r.set("positionReference",null)},[r]),o.useEffect(()=>{n&&!d&&(c.current=!1)},[n,d]),o.useEffect(()=>{!n&&p&&(c.current=!0)},[n,p]);const N=o.useMemo(()=>{function v(y){x(y.pointerType)}return{onPointerDown:v,onPointerEnter:v,onMouseMove:m,onMouseEnter:m}},[m]);return o.useMemo(()=>n?{reference:N,trigger:N}:{},[n,N])}function un({...t}){return e.jsx(Ot,{"data-slot":"sheet",...t})}function pn({...t}){return e.jsx(Ht,{"data-slot":"sheet-portal",...t})}function gn({className:t,...s}){return e.jsx(Lt,{"data-slot":"sheet-overlay",className:w("fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",t),...s})}function hn({className:t,children:s,side:n="right",showCloseButton:a=!0,...r}){return e.jsxs(pn,{children:[e.jsx(gn,{}),e.jsxs(Dt,{"data-slot":"sheet-content","data-side":n,className:w("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",t),...r,children:[s,a&&e.jsxs(It,{"data-slot":"sheet-close",render:e.jsx(Z,{variant:"ghost",className:"absolute top-3 right-3",size:"icon-sm"}),children:[e.jsx(At,{}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function xn({className:t,...s}){return e.jsx("div",{"data-slot":"sheet-header",className:w("flex flex-col gap-0.5 p-4",t),...s})}function fn({className:t,...s}){return e.jsx(_t,{"data-slot":"sheet-title",className:w("font-heading text-base font-medium text-foreground",t),...s})}function mn({className:t,...s}){return e.jsx(zt,{"data-slot":"sheet-description",className:w("text-sm text-muted-foreground",t),...s})}const et=o.createContext(void 0);function Y(t){const s=o.useContext(et);if(s===void 0&&!t)throw new Error(ne(72));return s}const bn={...Bt,disabled:t=>t.disabled,instantType:t=>t.instantType,isInstantPhase:t=>t.isInstantPhase,trackCursorAxis:t=>t.trackCursorAxis,disableHoverablePopup:t=>t.disableHoverablePopup,lastOpenChangeReason:t=>t.openChangeReason,closeOnClick:t=>t.closeOnClick,closeDelay:t=>t.closeDelay,adaptiveOrigin:t=>t.adaptiveOrigin};class vn extends $t{constructor(s,n,a){const r=new Gt;super(jn(s,r,n,a),yn(r),bn)}setOpen=(s,n)=>{Ft(this,s,n,{extraState:{openChangeReason:n.reason}})};cancelPendingOpen(s){this.state.floatingRootContext.dispatchOpenChange(!1,B(hs,s))}}function jn(t,s,n,a=!1){const r={...Ut(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...t};return r.floatingRootContext=qt(s,n,a),r}function yn(t){return{popupRef:o.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:t}}const Sn=Vt(function(s){const{disabled:n=!1,defaultOpen:a=!1,open:r,disableHoverablePopup:p=!1,trackCursorAxis:d="none",actionsRef:i,onOpenChange:f,onOpenChangeComplete:c,handle:g,triggerId:b,defaultTriggerId:x=null,children:j}=s,l=Kt(($,F)=>new vn({open:a,openProp:r,activeTriggerId:x,triggerIdProp:b},$,F));l.useControlledProp("openProp",r),l.useControlledProp("triggerIdProp",b),l.useContextCallback("onOpenChange",f),l.useContextCallback("onOpenChangeComplete",c);const S=l.useState("open"),h=!n&&S,m=l.useState("activeTriggerId"),C=l.useState("mounted"),N=l.useState("payload");l.useSyncedValues({trackCursorAxis:d,disableHoverablePopup:p,disabled:n}),Yt(l,{closeOnActiveTriggerUnmount:!0});const{forceUnmount:v,transitionStatus:y}=Wt(h,l),R=l.useState("isInstantPhase"),P=l.useState("instantType"),u=l.useState("lastOpenChangeReason"),k=o.useRef(null);L(()=>{S&&n&&l.setOpen(!1,B(xs))},[S,n,l]),L(()=>{y==="ending"&&u===Ge||y!=="ending"&&R?(P!=="delay"&&(k.current=P),l.set("instantType","delay")):k.current!==null&&(l.set("instantType",k.current),k.current=null)},[y,R,u,P,l]),L(()=>{h&&m==null&&l.set("payload",void 0)},[l,m,h]),o.useImperativeHandle(i,()=>({unmount:v,close:()=>l.setOpen(!1,B(fs))}),[v,l]);const A=h||C||!n&&d!=="none";return e.jsxs(et.Provider,{value:l,children:[g&&e.jsx(Xt,{handle:g,store:l}),A&&e.jsx(wn,{store:l,disabled:n,trackCursorAxis:d}),typeof j=="function"?j({payload:N}):j]})});function wn({store:t,disabled:s,trackCursorAxis:n}){const a=t.useState("floatingRootContext"),r=Qt(a,{enabled:!s,referencePress:()=>t.select("closeOnClick")}),p=cn(a,{enabled:!s&&n!=="none",axis:n==="none"?void 0:n}),d=o.useMemo(()=>ye(p.reference,r.reference),[p.reference,r.reference]);return Jt(t,{activeTriggerProps:d,inactiveTriggerProps:d,popupProps:r.floating??bt}),null}const Nn=o.createContext(void 0);function Cn(){return o.useContext(Nn)}const _e=600,tt="data-base-ui-tooltip-trigger";function ze(t){if("composedPath"in t){const n=t.composedPath();for(let a=0;a<n.length;a+=1){const r=n[a];if(xe(r))return r}}const s=t.target;return xe(s)?s:null}function kn(t){let s=t;for(;s;){const n=s.closest(`[${tt}]`);if(n)return n;const a=s.getRootNode();s="host"in a&&xe(a.host)?a.host:null}return null}const Tn=Zt(function(s,n){const{render:a,className:r,style:p,handle:d,payload:i,disabled:f,delay:c,closeOnClick:g=!0,closeDelay:b,id:x,...j}=s,l=Y(!0),h=js(d)??l;if(!h)throw new Error(ne(82));const m=ms(x),C=h.useState("isTriggerActive",m),N=h.useState("isOpenedByTrigger",m),v=h.useState("floatingRootContext"),y=o.useRef(null),R=c??_e,P=b??0,{registerTrigger:u,isMountedByThisTrigger:k}=es(m,y,h,{payload:i,closeOnClick:g,closeDelay:P}),A=Cn(),{delayRef:$,isInstantPhase:F,hasProvider:D}=ln(v,{open:N}),U=ys(v);h.useSyncedValue("isInstantPhase",F);const de=h.useState("disabled"),q=f??de,Pe=ts(q),Re=h.useState("trackCursorAxis"),it=h.useState("disableHoverablePopup"),G=o.useRef(!1),W=ss(),X=o.useRef(void 0);function Me(){return D?me($.current,"open")===0?0:c??A??_e:R}function Ee(T){const z=y.current;if(!z||!T)return!1;const H=kn(T);return H!==null&&H!==z&&fe(z,H)}function lt(T){const z=Ee(T);return G.current=z,z&&(U.openChangeTimeout.clear(),U.restTimeout.clear(),U.restTimeoutPending=!1,W.clear()),z}const dt=Ss(v,{enabled:!q,mouseOnly:!0,move:!1,handleClose:!it&&Re!=="both"?ws():null,restMs:Me,delay(){return b==null&&D?{close:me($.current,"close")}:{close:P}},triggerElementRef:y,isActiveTrigger:C,isClosing:()=>h.select("transitionStatus")==="ending",shouldOpen(){return!G.current}}),ct=Ns(v,{enabled:!q}).reference,ut=T=>{const z=G.current,H=ze(T),Oe=lt(H),Q=y.current,gt=Q&&H&&fe(Q,H);if(Oe&&h.select("open")&&h.select("lastOpenChangeReason")===ue){h.setOpen(!1,B(ue,T));return}if(z&&!Oe&>&&!Pe.current&&!h.select("open")&&Q&&Be(X.current)){const De=()=>{!G.current&&!Pe.current&&!h.select("open")&&h.setOpen(!0,B(ue,T,Q))},Ie=Me();Ie===0?(W.clear(),De()):W.start(Ie,De)}},pt=h.useState("triggerProps",k);return Se("button",s,{state:{open:N},ref:[n,u,y],props:[dt,ct,k||Re!=="none"?pt:void 0,{onMouseOver(T){ut(T.nativeEvent)},onFocus(T){Ee(ze(T.nativeEvent))&&T.preventBaseUIHandler()},onMouseLeave(){G.current=!1,W.clear(),X.current=void 0},onPointerEnter(T){X.current=T.pointerType},onPointerDown(T){X.current=T.pointerType,h.set("closeOnClick",g),g&&!h.select("open")&&h.cancelPendingOpen(T.nativeEvent)},onClick(T){g&&!h.select("open")&&h.cancelPendingOpen(T.nativeEvent)},id:m,"data-trigger-disabled":q?"":void 0,[tt]:q?void 0:""},j],stateAttributesMapping:ns})}),st=o.createContext(void 0);function Pn(){const t=o.useContext(st);if(t===void 0)throw new Error(ne(70));return t}const Rn=o.forwardRef(function(s,n){const{children:a,container:r,className:p,render:d,style:i,...f}=s,{node:c,subtree:g}=as({container:r,ref:n,componentProps:s,elementProps:f});return!g&&!c?null:e.jsxs(o.Fragment,{children:[g,c&&vt.createPortal(a,c)]})}),Mn=o.forwardRef(function(s,n){const{keepMounted:a=!1,...r}=s;return Y().useState("mounted")||a?e.jsx(st.Provider,{value:a,children:e.jsx(Rn,{ref:n,...r})}):null}),nt=o.createContext(void 0);function at(){const t=o.useContext(nt);if(t===void 0)throw new Error(ne(71));return t}const En=o.forwardRef(function(s,n){const{render:a,className:r,anchor:p,positionMethod:d="absolute",side:i="top",align:f="center",sideOffset:c=0,alignOffset:g=0,collisionBoundary:b="clipping-ancestors",collisionPadding:x=5,arrowPadding:j=5,sticky:l=!1,disableAnchorTracking:S=!1,collisionAvoidance:h=rs,style:m,...C}=s,N=Y(),v=Pn(),y=N.useState("open"),R=N.useState("mounted"),P=N.useState("trackCursorAxis"),u=N.useState("disableHoverablePopup"),k=N.useState("floatingRootContext"),A=N.useState("instantType"),$=N.useState("transitionStatus"),F=N.useState("adaptiveOrigin"),D=Ts({anchor:p,positionMethod:d,floatingRootContext:k,mounted:R,side:i,sideOffset:c,align:f,alignOffset:g,collisionBoundary:b,collisionPadding:x,sticky:l,arrowPadding:j,disableAnchorTracking:S,keepMounted:v,collisionAvoidance:h,adaptiveOrigin:F}),U=o.useMemo(()=>({open:y,side:D.side,align:D.align,anchorHidden:D.anchorHidden,instant:P!=="none"?"tracking-cursor":A}),[y,D.side,D.align,D.anchorHidden,P,A]),de=Ps(s,U,{styles:D.positionerStyles,transitionStatus:$,props:C,refs:[n,N.useStateSetter("positionerElement")],hidden:!R,inert:!y||P==="both"||u});return e.jsx(nt.Provider,{value:D,children:de})}),On=o.forwardRef(function(s,n){const{render:a,className:r,style:p,...d}=s,i=Y(),{side:f,align:c}=at(),g=i.useState("open"),b=i.useState("instantType"),x=i.useState("transitionStatus"),j=i.useState("popupProps"),l=i.useState("floatingRootContext"),S=i.useState("disabled"),h=i.useState("closeDelay");os({open:g,ref:i.context.popupRef,onComplete(){g&&i.context.onOpenChangeComplete?.(!0)}}),Cs(l,{enabled:!S,closeDelay:h});const m=i.useStateSetter("popupElement");return Se("div",s,{state:{open:g,side:f,align:c,instant:b,transitionStatus:x},ref:[n,i.context.popupRef,m],props:[is,j,Rs(x),d],stateAttributesMapping:ls})}),Dn=o.forwardRef(function(s,n){const{render:a,className:r,style:p,...d}=s,i=Y(),{arrowRef:f,side:c,align:g,arrowUncentered:b,arrowStyles:x}=at(),j=i.useState("open"),l=i.useState("instantType");return Se("div",s,{state:{open:j,side:c,align:g,uncentered:b,instant:l},ref:[n,f],props:[{style:x,"aria-hidden":!0},d],stateAttributesMapping:ds})});function In({...t}){return e.jsx(Sn,{"data-slot":"tooltip",...t})}function An({...t}){return e.jsx(Tn,{"data-slot":"tooltip-trigger",...t})}function _n({className:t,side:s="top",sideOffset:n=4,align:a="center",alignOffset:r=0,children:p,...d}){return e.jsx(Mn,{children:e.jsx(En,{align:a,alignOffset:r,side:s,sideOffset:n,className:"isolate z-50",children:e.jsxs(On,{"data-slot":"tooltip-content",className:w("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",t),...d,children:[p,e.jsx(Dn,{className:"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"})]})})})}const zn="sidebar_state",Hn=3600*24*7,Ln="16rem",$n="18rem",Bn="3rem",Fn="b",rt=o.createContext(null);function Te(){const t=o.useContext(rt);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function Un({defaultOpen:t=!0,open:s,onOpenChange:n,className:a,style:r,children:p,...d}){const i=an(),[f,c]=o.useState(!1),[g,b]=o.useState(t),x=s??g,j=o.useCallback(m=>{const C=typeof m=="function"?m(x):m;n?n(C):b(C),document.cookie=`${zn}=${C}; path=/; max-age=${Hn}`},[n,x]),l=o.useCallback(()=>i?c(m=>!m):j(m=>!m),[i,j,c]);o.useEffect(()=>{const m=C=>{C.key===Fn&&(C.metaKey||C.ctrlKey)&&(C.preventDefault(),l())};return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[l]);const S=x?"expanded":"collapsed",h=o.useMemo(()=>({state:S,open:x,setOpen:j,isMobile:i,openMobile:f,setOpenMobile:c,toggleSidebar:l}),[S,x,j,i,f,c,l]);return e.jsx(rt.Provider,{value:h,children:e.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":Ln,"--sidebar-width-icon":Bn,...r},className:w("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",a),...d,children:p})})}function qn({side:t="left",variant:s="sidebar",collapsible:n="offcanvas",className:a,children:r,dir:p,...d}){const{isMobile:i,state:f,openMobile:c,setOpenMobile:g}=Te();return n==="none"?e.jsx("div",{"data-slot":"sidebar",className:w("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",a),...d,children:r}):i?e.jsx(un,{open:c,onOpenChange:g,...d,children:e.jsxs(hn,{dir:p,"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":$n},side:t,children:[e.jsxs(xn,{className:"sr-only",children:[e.jsx(fn,{children:"Sidebar"}),e.jsx(mn,{children:"Displays the mobile sidebar."})]}),e.jsx("div",{className:"flex h-full w-full flex-col",children:r})]})}):e.jsxs("div",{className:"group peer hidden text-sidebar-foreground md:block","data-state":f,"data-collapsible":f==="collapsed"?n:"","data-variant":s,"data-side":t,"data-slot":"sidebar",children:[e.jsx("div",{"data-slot":"sidebar-gap",className:w("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",s==="floating"||s==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),e.jsx("div",{"data-slot":"sidebar-container","data-side":t,className:w("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex",s==="floating"||s==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",a),...d,children:e.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border",children:r})})]})}function Gn({className:t,onClick:s,...n}){const{toggleSidebar:a}=Te();return e.jsxs(Z,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-sm",className:w(t),onClick:r=>{s?.(r),a()},...n,children:[e.jsx(Zs,{}),e.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function Vn({className:t,...s}){return e.jsx("main",{"data-slot":"sidebar-inset",className:w("relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t),...s})}function Kn({className:t,...s}){return e.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:w("flex flex-col gap-2 p-2",t),...s})}function Yn({className:t,...s}){return e.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:w("flex flex-col gap-2 p-2",t),...s})}function Wn({className:t,...s}){return e.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:w("no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden",t),...s})}function He({className:t,...s}){return e.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:w("relative flex w-full min-w-0 flex-col p-2",t),...s})}function Xn({className:t,render:s,...n}){return Ke({defaultTagName:"div",props:ye({className:w("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",t)},n),render:s,state:{slot:"sidebar-group-label",sidebar:"group-label"}})}function Le({className:t,...s}){return e.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:w("w-full text-sm",t),...s})}function he({className:t,...s}){return e.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:w("flex w-full min-w-0 flex-col gap-0",t),...s})}function M({className:t,...s}){return e.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:w("group/menu-item relative",t),...s})}const Qn=jt("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function E({render:t,isActive:s=!1,variant:n="default",size:a="default",tooltip:r,className:p,...d}){const{isMobile:i,state:f}=Te(),c=Ke({defaultTagName:"button",props:ye({className:w(Qn({variant:n,size:a}),p)},d),render:r?e.jsx(An,{render:t}):t,state:{slot:"sidebar-menu-button",sidebar:"menu-button",size:a,active:s}});return r?(typeof r=="string"&&(r={children:r}),e.jsxs(In,{children:[c,e.jsx(_n,{side:"right",align:"center",hidden:f!=="collapsed"||i,...r})]})):c}function Jn({className:t,...s}){return e.jsx("div",{"data-slot":"sidebar-menu-badge","data-sidebar":"menu-badge",className:w("pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium text-sidebar-foreground tabular-nums select-none group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 peer-data-active/menu-button:text-sidebar-accent-foreground",t),...s})}function Zn({open:t,onOpenChange:s}){const n=le(),a=ae(),[r,p]=o.useState(""),[d,i]=o.useState(0),f=o.useRef(null),c=r.trim(),[g,b]=o.useState("");o.useEffect(()=>{const u=setTimeout(()=>b(c),180);return()=>clearTimeout(u)},[c]);const x=we({queryKey:["activity","search",g],queryFn:()=>ee.activity({q:g,status:"all",limit:8}),enabled:t&&g.length>=2,staleTime:3e4});o.useEffect(()=>{t||(p(""),i(0))},[t]);const j=K(n.user.role,"settings"),l=o.useMemo(()=>[{id:"s:sites",label:"Sites",icon:e.jsx(se,{className:"size-4"}),go:()=>void a({to:"/sites"})},{id:"s:activity",label:"Activity",hint:"every site, newest first",icon:e.jsx(We,{className:"size-4"}),go:()=>void a({to:"/activity"})},...j?[{id:"s:members",label:"Members",icon:e.jsx(be,{className:"size-4"}),go:()=>void a({to:"/studio/members"})},{id:"s:integrations",label:"Integrations",icon:e.jsx(Xe,{className:"size-4"}),go:()=>void a({to:"/studio/integrations"})},{id:"s:studio",label:"Studio settings",icon:e.jsx(Ce,{className:"size-4"}),go:()=>void a({to:"/studio"})}]:[],{id:"s:you",label:"You",icon:e.jsx(Ze,{className:"size-4"}),go:()=>void a({to:"/you"})}],[a,j]),S=o.useMemo(()=>n.projects.map(u=>({id:`p:${u.uid}`,label:u.name,hint:u.unresolved>0?`${u.unresolved} open`:"nothing open",icon:e.jsx(ve,{className:"size-4"}),go:()=>void a({to:"/s/$site/comments",params:{site:u.uid}})})),[n.projects,a]),h=u=>!c||u.toLowerCase().includes(c.toLowerCase()),m=[],C=S.filter(u=>h(u.label)),N=l.filter(u=>h(u.label));C.length&&m.push({title:"Sites",items:C}),N.length&&m.push({title:"Go to",items:N});const v=(x.data?.data??[]).map(u=>({id:`t:${u.id}`,label:u.latest?.body?.trim()||u.route,hint:`${u.site.name} · ${Ds(u.status)?Os[u.status]:u.status} · ${u.key}`,icon:e.jsx(ve,{className:"size-4"}),go:()=>void a({to:"/s/$site/comments",params:{site:u.site.uid},search:{thread:u.key}})}));v.length&&m.push({title:"Comments",items:v});const y=m.flatMap(u=>u.items),R=Math.min(d,Math.max(0,y.length-1)),P=u=>{u&&(s(!1),u.go())};return o.useEffect(()=>{f.current?.querySelector(`[data-at="${R}"]`)?.scrollIntoView({block:"nearest"})},[R]),e.jsx(Fe,{open:t,onOpenChange:s,children:e.jsxs(Ue,{showCloseButton:!1,className:"top-[15%] max-h-[70dvh] translate-y-0 gap-0 overflow-hidden p-0 sm:max-w-lg",children:[e.jsx(qe,{className:"sr-only",children:"Search and go"}),e.jsxs("div",{className:"flex items-center gap-2 border-b border-border px-3",children:[e.jsx(Ve,{className:"size-4 shrink-0 text-muted-foreground"}),e.jsx("input",{autoFocus:!0,value:r,onChange:u=>{p(u.target.value),i(0)},onKeyDown:u=>{u.key==="ArrowDown"?(u.preventDefault(),i(k=>Math.min(k+1,y.length-1))):u.key==="ArrowUp"?(u.preventDefault(),i(k=>Math.max(k-1,0))):u.key==="Enter"&&(u.preventDefault(),P(y[R]))},placeholder:"Go to a site or a screen, or search every comment…","aria-label":"Search and go",className:"h-11 w-full bg-transparent text-[14px] outline-none placeholder:text-muted-foreground"})]}),e.jsxs("div",{ref:f,className:"min-h-0 flex-1 overflow-auto py-1.5",children:[y.length===0&&e.jsx("p",{className:"m-0 px-3 py-6 text-center text-[13px] text-muted-foreground",children:x.isFetching?"Looking…":c?`Nothing matches “${c}”.`:"Nothing here."}),m.map(u=>e.jsxs("div",{children:[e.jsx("div",{className:"px-3 py-1 text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:u.title}),u.items.map(k=>{const A=y.indexOf(k);return e.jsxs("button",{type:"button","data-at":A,onMouseMove:()=>i(A),onClick:()=>P(k),className:w("flex w-full items-center gap-2.5 border-0 bg-transparent px-3 py-2 text-left text-[13px] text-foreground",A===R&&"bg-muted"),children:[e.jsx("span",{className:"shrink-0 text-muted-foreground",children:k.icon}),e.jsx("span",{className:"min-w-0 flex-1 truncate",children:k.label}),k.hint&&e.jsx("span",{className:"shrink-0 text-[12px] text-muted-foreground",children:k.hint})]},k.id)})]},u.title)),x.isFetching&&y.length>0&&e.jsxs("p",{className:"m-0 flex items-center gap-1.5 px-3 py-1.5 text-[12px] text-muted-foreground",children:[e.jsx(yt,{className:"size-3"}),"Searching every site…"]})]})]})})}function ea(){const[t,s]=o.useState(!1);return o.useEffect(()=>{const n=a=>{a.key.toLowerCase()!=="k"||!(a.metaKey||a.ctrlKey)||(a.preventDefault(),s(r=>!r))};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[]),[t,s]}const ot="https://snagset.com/docs/",ta="https://www.npmjs.com/package/@snagset/server?activeTab=versions",sa="https://snagset.com/docs/self-hosting/#upgrade";function na({children:t}){const s=le(),n=St(s),[a,r]=ea();return nn(),e.jsxs(Un,{children:[e.jsx(oa,{me:s,site:n}),e.jsxs(Vn,{className:"min-w-0",children:[e.jsx(ua,{onSearch:()=>r(!0)}),e.jsx(aa,{names:s.pendingMigrations??[],owner:s.user.role==="owner"}),s.regionMismatch&&K(s.user.role,"settings")&&e.jsx(ra,{...s.regionMismatch}),e.jsx("div",{className:"min-h-0 flex-1",children:t})]}),e.jsx(Zn,{open:a,onOpenChange:r})]})}function aa({names:t,owner:s}){return t.length?e.jsxs("div",{role:"alert",className:"mx-7 mt-4 rounded-md border border-destructive/40 bg-warn-soft px-3 py-2 text-[13px] text-destructive",children:[e.jsxs("p",{className:"m-0 font-medium",children:["The database needs an update for this version (",t.length," ",t.length===1?"migration":"migrations",")."]}),e.jsx("p",{className:"m-0 mt-0.5",children:s?e.jsxs(e.Fragment,{children:["Run ",e.jsx("code",{className:"font-mono",children:"snagset migrate"})," with this instance's ",e.jsx("code",{className:"font-mono",children:"DATABASE_URL"})," — from the project, ",e.jsx("code",{className:"font-mono",children:"pnpm migrate"}),". Until then, parts of this version may fail."]}):"Ask the studio's owner to run snagset migrate. Until then, parts of this version may fail."})]}):null}function ra({functions:t,database:s,suggest:n}){return e.jsxs("div",{role:"status",className:"mx-7 mt-4 rounded-md border border-border bg-warn-soft px-3 py-2 text-[13px]",children:[e.jsxs("p",{className:"m-0 font-medium",children:["This server runs in ",t,", but its database is in ",s," — every page waits on that distance."]}),e.jsx("p",{className:"m-0 mt-0.5 text-muted-foreground",children:n?e.jsxs(e.Fragment,{children:["Add ",e.jsxs("code",{className:"font-mono",children:['"regions": ["',n,'"]']})," to ",e.jsx("code",{className:"font-mono",children:"vercel.json"})," and redeploy."]}):"Run the server in the same region as the database."})]})}function oa({me:t,site:s}){const n=Ls({select:i=>i.location.pathname}),a=i=>n===i||n.startsWith(i+"/"),r=K(t.user.role,"settings"),p=we($e.setupState()),d=t.user.role==="owner"?p.data?.billingUrl:null;return e.jsxs(qn,{children:[e.jsx(Kn,{className:"px-3 pb-1 pt-3",children:e.jsx(ia,{me:t})}),e.jsxs(Wn,{children:[e.jsxs(He,{children:[e.jsx(la,{me:t,site:s}),s&&e.jsx(Le,{children:e.jsxs(he,{children:[e.jsxs(M,{children:[e.jsxs(E,{isActive:a(`/s/${s.uid}/comments`),render:e.jsx(_,{to:"/s/$site/comments",params:{site:s.uid}}),children:[e.jsx(ve,{}),e.jsx("span",{children:"Comments"})]}),s.unresolved>0&&e.jsx(Jn,{children:s.unresolved})]}),e.jsx(M,{children:e.jsxs(E,{isActive:a(`/s/${s.uid}/reviewers`),render:e.jsx(_,{to:"/s/$site/reviewers",params:{site:s.uid}}),children:[e.jsx(be,{}),e.jsx("span",{children:"Reviewers"})]})}),r&&e.jsx(M,{children:e.jsxs(E,{isActive:a(`/s/${s.uid}/settings`),render:e.jsx(_,{to:"/s/$site/settings",params:{site:s.uid}}),children:[e.jsx(Je,{}),e.jsx("span",{children:"Settings"})]})})]})})]}),e.jsxs(He,{children:[e.jsx(Xn,{children:"Studio"}),e.jsx(Le,{children:e.jsxs(he,{children:[e.jsx(M,{children:e.jsxs(E,{isActive:a("/sites"),render:e.jsx(_,{to:"/sites"}),children:[e.jsx(se,{}),e.jsx("span",{children:"Sites"})]})}),e.jsx(M,{children:e.jsxs(E,{isActive:a("/activity"),render:e.jsx(_,{to:"/activity"}),children:[e.jsx(We,{}),e.jsx("span",{children:"Activity"})]})}),r&&e.jsxs(e.Fragment,{children:[e.jsx(M,{children:e.jsxs(E,{isActive:a("/studio/members"),render:e.jsx(_,{to:"/studio/members"}),children:[e.jsx(be,{}),e.jsx("span",{children:"Members"})]})}),e.jsx(M,{children:e.jsxs(E,{isActive:a("/studio/integrations"),render:e.jsx(_,{to:"/studio/integrations"}),children:[e.jsx(Xe,{}),e.jsx("span",{children:"Integrations"})]})}),e.jsx(M,{children:e.jsxs(E,{isActive:n==="/studio",render:e.jsx(_,{to:"/studio"}),children:[e.jsx(Ce,{}),e.jsx("span",{children:"General"})]})})]})]})})]})]}),e.jsx(Yn,{children:e.jsxs(he,{children:[d&&e.jsx(M,{children:e.jsxs(E,{isActive:a("/studio/plan"),render:e.jsx(_,{to:"/studio/plan"}),children:[e.jsx(Ys,{}),e.jsx("span",{children:"Plan & billing"})]})}),e.jsx(M,{children:e.jsxs(E,{render:e.jsx("a",{href:ot,target:"_blank",rel:"noreferrer"}),children:[e.jsx(Qe,{}),e.jsx("span",{children:"Docs"}),e.jsx(J,{className:"ml-auto size-3.5 text-muted-foreground"})]})}),e.jsx(M,{children:e.jsx(da,{})}),e.jsx(M,{children:e.jsx(ca,{me:t})})]})})]})}function ia({me:t}){const s=ae(),n=je(),[a,r]=o.useState(!1),[p,d]=o.useState(""),[i,f]=o.useState(""),[c,g]=o.useState(!1),b=e.jsxs(e.Fragment,{children:[e.jsx(Nt,{size:20}),e.jsxs("span",{className:"min-w-0 flex-1 text-left",children:[e.jsx("span",{className:"block truncate text-[14px] font-semibold leading-tight tracking-tight",children:t.org.name}),e.jsx("span",{className:"block truncate text-[11.5px] text-muted-foreground",children:location.host})]})]}),x=K(t.user.role,"settings");if(t.orgs.length<=1&&!t.signupOpen)return x?e.jsx(_,{to:"/studio",className:"flex items-center gap-2.5 rounded-md px-1 py-0.5 text-foreground hover:bg-sidebar-accent","aria-label":`${t.org.name} — studio settings`,children:b}):e.jsx("div",{className:"flex items-center gap-2.5 px-1 py-0.5 text-foreground",children:b});const j=async l=>{g(!0),f("");try{await l(),n.clear(),r(!1),d(""),s({to:"/sites",replace:!0})}catch(S){f(S instanceof Error?S.message:"Something went wrong. Try again.")}finally{g(!1)}};return e.jsxs(e.Fragment,{children:[e.jsxs(re,{children:[e.jsxs(oe,{render:e.jsx("button",{type:"button",className:"flex w-full items-center gap-2.5 rounded-md px-1 py-0.5 text-foreground hover:bg-sidebar-accent","aria-label":"Switch studio"}),children:[b,e.jsx(ke,{className:"size-3.5 shrink-0 text-muted-foreground"})]}),e.jsxs(ie,{align:"start",className:"w-[240px]",children:[e.jsxs(Ne,{children:[e.jsx(te,{children:"Studios"}),t.orgs.map(l=>e.jsxs(I,{disabled:l.current,onClick:()=>void j(()=>ee.switchOrg(l.slug)),children:[e.jsx(Ce,{}),e.jsx("span",{className:"truncate",children:l.name}),l.current&&e.jsx("span",{className:"ml-auto text-[11px] text-muted-foreground",children:"current"})]},l.slug))]}),(x||t.signupOpen)&&e.jsx(V,{}),x&&e.jsxs(I,{onClick:()=>void s({to:"/studio"}),children:[e.jsx(Je,{}),"Studio settings"]}),t.signupOpen&&e.jsxs(I,{onClick:()=>r(!0),children:[e.jsx(Ye,{}),"New studio…"]})]})]}),e.jsx(Fe,{open:a,onOpenChange:l=>!c&&r(l),children:e.jsx(Ue,{className:"sm:max-w-[420px]",children:e.jsxs("form",{className:"flex flex-col gap-4",onSubmit:l=>{l.preventDefault(),j(()=>ee.createOrg(p.trim()||"My studio"))},children:[e.jsxs(cs,{children:[e.jsx(qe,{children:"New studio"}),e.jsx(us,{children:"Its own sites, members and settings. You are its owner, and you move to it now — this one stays in the menu."})]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx(bs,{htmlFor:"new-studio-name",children:"Studio name"}),e.jsx(vs,{id:"new-studio-name",value:p,onChange:l=>d(l.target.value),placeholder:"My studio",autoFocus:!0})]}),i&&e.jsx("p",{className:"m-0 text-[12px] text-destructive",children:i}),e.jsxs(ps,{children:[e.jsx(Z,{type:"button",variant:"outline",onClick:()=>r(!1),disabled:c,children:"Cancel"}),e.jsx(Z,{type:"submit",loading:c,children:c?"Creating…":"Create studio"})]})]})})})]})}function la({me:t,site:s}){const n=ae();return e.jsxs(re,{children:[e.jsxs(oe,{render:e.jsx("button",{type:"button",className:"mb-1 flex h-[34px] w-full items-center justify-between rounded-md border border-border bg-card px-2.5 text-[13px] font-semibold text-foreground","aria-label":"Switch site"}),children:[e.jsx("span",{className:"truncate",children:s?.name??"No sites yet"}),e.jsx(ke,{className:"size-3.5 text-muted-foreground"})]}),e.jsxs(ie,{align:"start",className:"w-[240px]",children:[e.jsxs(Ne,{children:[e.jsx(te,{children:"Sites"}),t.projects.map(a=>e.jsxs(I,{onClick:()=>void n({to:"/s/$site/comments",params:{site:a.uid}}),children:[e.jsx(se,{}),e.jsx("span",{className:"truncate",children:a.name}),a.uid===s?.uid&&e.jsx("span",{className:"ml-auto text-[11px] text-muted-foreground",children:"current"})]},a.uid))]}),e.jsx(V,{}),K(t.user.role,"settings")&&e.jsxs(I,{onClick:()=>void n({to:"/sites",search:{add:!0}}),children:[e.jsx(Ye,{}),"Add a site"]}),e.jsxs(I,{onClick:()=>void n({to:"/sites"}),children:[e.jsx(se,{}),"All sites"]})]})]})}function da(){const t=Ct(le()),s=we($e.meta()),n=s.data?.version??"",[a,r]=o.useState({state:"idle"}),p=async()=>{r({state:"checking"});try{r({state:"done",result:await As(n)})}catch{r({state:"failed"})}};return e.jsxs(re,{children:[e.jsxs(oe,{render:e.jsx(E,{}),children:[e.jsx(Vs,{}),e.jsx("span",{children:"Help"})]}),e.jsxs(ie,{align:"start",side:"top",className:"w-[240px]",children:[e.jsxs(I,{render:e.jsx("a",{href:ot,target:"_blank",rel:"noreferrer"}),children:[e.jsx(Qe,{}),"Docs",e.jsx(J,{className:"ml-auto size-3 text-muted-foreground"})]}),e.jsxs(I,{render:e.jsx("a",{href:ta,target:"_blank",rel:"noreferrer"}),children:["Changelog",e.jsx(J,{className:"ml-auto size-3 text-muted-foreground"})]}),s.data?.sourceUrl&&e.jsxs(I,{render:e.jsx("a",{href:s.data.sourceUrl,target:"_blank",rel:"noreferrer"}),children:["Source · AGPL",e.jsx(J,{className:"ml-auto size-3 text-muted-foreground"})]}),e.jsx(V,{}),e.jsxs("div",{className:"px-2 py-1.5 text-[12px] text-muted-foreground",children:["Snagset ",n||"—",t&&a.state==="idle"&&e.jsxs(e.Fragment,{children:[" · ",e.jsx("button",{type:"button",className:"text-brand hover:underline",onClick:()=>void p(),children:"Check for updates"})]}),a.state==="checking"&&" · checking…",a.state==="failed"&&" · could not reach npm",a.state==="done"&&a.result&&e.jsxs(e.Fragment,{children:[" · ",a.result.newer?e.jsxs("a",{href:sa,target:"_blank",rel:"noreferrer",className:"text-brand hover:underline",children:[a.result.latest," is out — how to upgrade"]}):"up to date"]})]})]})]})}function ca({me:t}){const s=ae(),n=je(),[a,r]=o.useState(kt),p=t.user.name||t.user.email,d=t.user.name?t.user.email:t.user.role,i=async()=>{await ee.logout().catch(()=>{}),Pt("out"),n.clear(),s({to:"/sign-in",replace:!0})};return e.jsxs(re,{children:[e.jsxs(oe,{render:e.jsx(E,{size:"lg"}),children:[e.jsx(Ms,{className:"size-8 rounded-full",children:e.jsx(Es,{className:"bg-primary text-[12px] font-semibold text-primary-foreground",children:Is(t.user.name,t.user.email)})}),e.jsxs("div",{className:"min-w-0 flex-1 text-left leading-tight",children:[e.jsx("div",{className:"truncate text-[13px] font-semibold",children:p}),e.jsx("div",{className:"truncate text-[11.5px] text-muted-foreground",children:d})]}),e.jsx(ke,{className:"size-3.5 text-muted-foreground"})]}),e.jsxs(ie,{align:"start",side:"top",className:"w-[250px]",children:[e.jsx(Ne,{children:e.jsxs(te,{className:"flex flex-col",children:[e.jsx("span",{className:"text-[13px] font-semibold",children:p}),e.jsx("span",{className:"text-[11.5px] font-normal text-muted-foreground",children:t.user.name?`${t.user.email} · ${t.user.role}`:t.user.role})]})}),e.jsx(V,{}),e.jsxs(ks,{value:a,onValueChange:f=>{const c=f;Tt(c),r(c)},children:[e.jsx(te,{children:"Theme"}),e.jsxs(pe,{value:"system",children:[e.jsx(_s,{}),"System"]}),e.jsxs(pe,{value:"light",children:[e.jsx(zs,{}),"Light"]}),e.jsxs(pe,{value:"dark",children:[e.jsx(Hs,{}),"Dark"]})]}),e.jsx(V,{}),e.jsxs(I,{onClick:()=>void s({to:"/you"}),children:[e.jsx(Ze,{}),"You"]}),e.jsxs(I,{onClick:()=>void i(),children:[e.jsx(Xs,{}),"Sign out"]})]})]})}function ua({onSearch:t}){const n=wt().map(a=>a.loaderData?.crumb).filter(a=>typeof a=="string"&&a.length>0);return e.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-2.5 border-b border-border/60 px-4",children:[e.jsx(Gn,{className:"-ml-1"}),e.jsx("nav",{"aria-label":"Breadcrumb",className:"flex items-center gap-2 text-[13.5px] font-medium text-muted-foreground",children:n.map((a,r)=>e.jsxs("span",{className:"flex items-center gap-2",children:[r>0&&e.jsx("span",{className:"text-line-strong",children:"/"}),e.jsx("span",{className:r===n.length-1?"text-foreground":void 0,children:a})]},r))}),e.jsx("div",{className:"flex-1"}),e.jsxs("button",{type:"button",onClick:t,"aria-label":"Search and go",className:"flex h-7 items-center gap-2 rounded-md border border-border bg-card px-2 text-[12.5px] text-muted-foreground",children:[e.jsx(Ve,{className:"size-3.5"}),e.jsx("span",{className:"hidden sm:inline",children:"Search"}),e.jsx("kbd",{className:"hidden rounded border border-border px-1 font-mono text-[11px] sm:inline",children:"⌘K"})]})]})}const Da=()=>e.jsx(na,{children:e.jsx(Rt,{})});export{Da as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Y as g,Z as f,_ as p,p as v,j as e,B as m,$ as N,L as j,a0 as P}from"./index-DGJgBiEe.js";import{Q as y,u as b}from"./useBaseQuery-BzwsA17g.js";import{P as w,S}from"./parts-CeW0gqpG.js";import{u as R,b as E,c as k,S as F}from"./labels-ToSuNGQl.js";import"./card-CQykn6b-.js";var M=class extends y{constructor(s,r){super(s,r)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(s){s._type="infinite",super.setOptions(s)}getOptimisticResult(s){return s._type="infinite",super.getOptimisticResult(s)}fetchNextPage(s){return this.fetch({...s,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(s){return this.fetch({...s,meta:{fetchMore:{direction:"backward"}}})}createResult(s,r){const{state:i}=s,l=super.createResult(s,r),{isFetching:o,isRefetching:n,isError:u,isRefetchError:d}=l,t=i.fetchMeta?.fetchMore?.direction,c=u&&t==="forward",a=o&&t==="forward",h=u&&t==="backward",x=o&&t==="backward";return{...l,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:f(r,i.data),hasPreviousPage:g(r,i.data),isFetchNextPageError:c,isFetchingNextPage:a,isFetchPreviousPageError:h,isFetchingPreviousPage:x,isRefetchError:d&&!c&&!h,isRefetching:n&&!a&&!x}}};function A(s,r){return b(s,M)}const C=[{value:"unresolved",label:"Needs attention"},...k.map(s=>({value:s,label:F[s]})),{value:"all",label:"Everything"}];function D(s,r=new Date){const i=new Date(s),l=n=>new Date(n.getFullYear(),n.getMonth(),n.getDate()).getTime(),o=Math.round((l(r)-l(i))/864e5);return o<=0?"Today":o===1?"Yesterday":o<7?i.toLocaleDateString(void 0,{weekday:"long"}):i.toLocaleDateString(void 0,{day:"numeric",month:"long"})}function _(){const s=R(),{status:r="unresolved",site:i}=p.useSearch(),l=v({from:"/activity"}),o=t=>void l({search:c=>({...c,...t}),replace:!0}),n=A(P(r,i)),u=n.data?.pages.flatMap(t=>t.data)??[],d=[];for(const t of u){const c=D(t.updatedAt),a=d[d.length-1];a?.day===c?a.rows.push(t):d.push({day:c,rows:[t]})}return e.jsxs("div",{className:"flex flex-col gap-5 p-7",children:[e.jsx(w,{title:"Activity",sub:`Every site, newest first${i?"":" — all of them"}`}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[C.map(t=>e.jsx(m,{size:"sm",variant:r===t.value?"default":"outline",onClick:()=>o({status:t.value}),children:t.label},t.value)),e.jsx("div",{className:"flex-1"}),e.jsxs("label",{className:"flex items-center gap-2 text-[13px] text-muted-foreground",children:["Site",e.jsxs("select",{"aria-label":"Site",value:i??"",onChange:t=>o({site:t.target.value||void 0}),className:"h-8 rounded-md border border-input bg-background px-2.5 text-[13px] text-foreground",children:[e.jsx("option",{value:"",children:"All sites"}),s.projects.map(t=>e.jsx("option",{value:t.uid,children:t.name},t.uid))]})]})]}),n.isPending&&e.jsx(N,{rows:4}),n.isError&&e.jsx("p",{className:"m-0 text-[13px] text-destructive",children:"Could not read the feed. Reload to try again."}),n.isSuccess&&u.length===0&&e.jsx("p",{className:"m-0 text-[13px] text-muted-foreground",children:r==="resolved"?"Nothing has been resolved yet — this is where finished comments go.":r==="unresolved"?"Nothing needs attention. Every comment on every site is resolved.":"No comments yet on any site."}),d.map(({day:t,rows:c})=>e.jsxs("section",{className:"flex flex-col gap-2",children:[e.jsx("h2",{className:"m-0 text-[12px] font-medium uppercase tracking-wide text-muted-foreground",children:t}),e.jsx("ul",{className:"m-0 flex list-none flex-col gap-1.5 p-0",children:c.map(a=>e.jsx("li",{children:e.jsxs(j,{to:"/s/$site/comments",params:{site:a.site.uid},search:{thread:a.key},className:"flex flex-col gap-1 rounded-md border border-border px-3 py-2.5 no-underline transition-colors hover:bg-muted/60",children:[e.jsxs("span",{className:"flex flex-wrap items-center gap-x-2.5 gap-y-1 text-[13px]",children:[e.jsx(S,{status:a.status}),e.jsx("span",{className:"font-medium text-foreground",children:a.site.name}),e.jsx("code",{className:"font-mono text-[12px] text-muted-foreground",children:a.route}),e.jsx("span",{className:"flex-1"}),e.jsx("span",{className:"text-[12px] text-muted-foreground",children:E(a.updatedAt)})]}),a.latest?.body&&e.jsxs("span",{className:"line-clamp-2 text-[13px] text-foreground",children:[e.jsxs("span",{className:"text-muted-foreground",children:[a.latest.author??a.createdBy.name,": "]}),a.latest.body]}),e.jsxs("span",{className:"flex flex-wrap items-center gap-x-2 text-[12px] text-muted-foreground",children:[e.jsx("span",{className:"font-mono",children:a.key}),e.jsx("span",{children:"·"}),e.jsxs("span",{children:[a.commentCount," ",a.commentCount===1?"comment":"comments"]}),a.assignee&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsx("span",{children:a.assignee})]})]})]})},a.id))})]},t)),n.hasNextPage&&e.jsx("div",{children:e.jsx(m,{variant:"outline",size:"sm",disabled:n.isFetchingNextPage,onClick:()=>void n.fetchNextPage(),children:n.isFetchingNextPage?"Reading…":"Show older"})})]})}export{_ as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as x,E as rn,l as q,aH as we,aD as pe,aI as xe,g as se,aJ as Et,aF as Ze,aE as bt,aK as kn,aL as sn,aM as Dn,aN as St,aO as cn,aP as it,aQ as vt,aR as _t,aS as ln,n as In,e as U,f as ie,a9 as Fn,k as Ct,i as Wn,j as Pt,h as an}from"./index-DGJgBiEe.js";import{$ as At,w as Mt,i as ht,aa as Vn,av as fn,ad as un,U as $n,aw as zn,v as ue,L as Hn,ax as Bn,ay as Nt,az as pt,aA as Kt,aB as fe,aC as Xe,a0 as _n,a4 as Nn,aD as st,aE as ct,aF as dn,aG as Tt,aH as Kn,aI as jn,aJ as Yn,aK as Xn,C as Un,aL as qn,aM as Gn}from"./dialog-I_D8p4LG.js";import{t as Jn,g as mn,c as Je,x as xt,r as et,a as Be,B as jt,m as Qn}from"./label-ClUOe0Qf.js";import{u as Zn}from"./useValueChanged-CEh0b15T.js";import{u as eo}from"./CompositeList-Cty0rzq_.js";const Le=Math.min,de=Math.max,tt=Math.round,Ue=Math.floor,me=e=>({x:e,y:e}),to={left:"right",right:"left",bottom:"top",top:"bottom"};function gn(e,t,n){return de(e,Le(t,n))}function ye(e,t){return typeof e=="function"?e(t):e}function Q(e){return e.split("-")[0]}function Re(e){return e.split("-")[1]}function Lt(e){return e==="x"?"y":"x"}function kt(e){return e==="y"?"height":"width"}function J(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Dt(e){return Lt(J(e))}function no(e,t,n){n===void 0&&(n=!1);const o=Re(e),r=Dt(e),i=kt(r);let s=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=nt(s)),[s,nt(s)]}function oo(e){const t=nt(e);return[Ot(e),t,Ot(t)]}function Ot(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Yt=["left","right"],Xt=["right","left"],ro=["top","bottom"],io=["bottom","top"];function so(e,t,n){switch(e){case"top":case"bottom":return n?t?Xt:Yt:t?Yt:Xt;case"left":case"right":return t?ro:io;default:return[]}}function co(e,t,n,o){const r=Re(e);let i=so(Q(e),n==="start",o);return r&&(i=i.map(s=>s+"-"+r),t&&(i=i.concat(i.map(Ot)))),i}function nt(e){const t=Q(e);return to[t]+e.slice(t.length)}function lo(e){var t,n,o,r;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(o=e.bottom)!=null?o:0,left:(r=e.left)!=null?r:0}}function hn(e){return typeof e!="number"?lo(e):{top:e,right:e,bottom:e,left:e}}function ot(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function wr(e,t={}){const{enabled:n=!0,event:o="click",toggle:r=!0,ignoreMouse:i=!1,stickIfOpen:s=!0,touchOpenDelay:c=0,reason:l=Jn}=t,f="rootStore"in e?e.rootStore:e,u=f.context.dataRef,a=x.useRef(void 0),g=At(),d=Mt(),m=x.useMemo(()=>{function p(y,w,E,R){const v=Je(l,w,E);y&&R==="touch"&&c>0?d.start(c,()=>{f.setOpen(!0,v)}):f.setOpen(y,v)}function h(y,w,E){const R=u.current.openEvent,v=f.select("domReferenceElement")!==w;return y&&v||!y||!r?!0:R&&s?!E(R.type):!1}return{onPointerDown(y){a.current=ht(y.pointerType,!0)&&fn(y.nativeEvent)?"virtual":y.pointerType},onMouseDown(y){const w=a.current,E=y.nativeEvent,R=f.select("open");if(y.button!==0||o==="click"||ht(w,!0)&&i)return;const v=h(R,y.currentTarget,A=>A==="click"||A==="mousedown"),S=mn(E);if(Vn(S)){p(v,E,S,w);return}const P=y.currentTarget;g.request(()=>{p(v,E,P,w)})},onClick(y){if(o==="mousedown-only")return;const w=a.current;if(o==="mousedown"&&w){a.current=void 0;return}if(ht(w,!0)&&i)return;const E=f.select("open"),R=h(E,y.currentTarget,v=>v==="click"||v==="mousedown"||v==="keydown"||v==="keyup");p(R,y.nativeEvent,y.currentTarget,w)},onKeyDown(){a.current=void 0}}},[u,o,i,l,f,s,r,g,d,c]);return x.useMemo(()=>n?{reference:m}:rn,[n,m])}function Ut(e,t,n){let{reference:o,floating:r}=e;const i=J(t),s=Dt(t),c=kt(s),l=Q(t),f=i==="y",u=o.x+o.width/2-r.width/2,a=o.y+o.height/2-r.height/2,g=o[c]/2-r[c]/2;let d;switch(l){case"top":d={x:u,y:o.y-r.height};break;case"bottom":d={x:u,y:o.y+o.height};break;case"right":d={x:o.x+o.width,y:a};break;case"left":d={x:o.x-r.width,y:a};break;default:d={x:o.x,y:o.y}}const m=Re(t);return m&&(d[s]+=g*(m==="end"?1:-1)*(n&&f?-1:1)),d}async function ao(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:i,rects:s,elements:c,strategy:l}=e,{boundary:f="clippingAncestors",rootBoundary:u="viewport",elementContext:a="floating",altBoundary:g=!1,padding:d=0}=ye(t,e),m=hn(d),h=c[g?a==="floating"?"reference":"floating":a],y=ot(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(h)))==null||n?h:h.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:f,rootBoundary:u,strategy:l})),w=a==="floating"?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,E=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating)),R=await(i.isElement==null?void 0:i.isElement(E))&&await(i.getScale==null?void 0:i.getScale(E))||{x:1,y:1},v=ot(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:w,offsetParent:E,strategy:l}):w);return{top:(y.top-v.top+m.top)/R.y,bottom:(v.bottom-y.bottom+m.bottom)/R.y,left:(y.left-v.left+m.left)/R.x,right:(v.right-y.right+m.right)/R.x}}const fo=50,uo=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,c=s.detectOverflow?s:{...s,detectOverflow:ao},l=await(s.isRTL==null?void 0:s.isRTL(t));let f=await s.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:a}=Ut(f,o,l),g=o,d=0;const m={};for(let p=0;p<i.length;p++){const h=i[p];if(!h)continue;const{name:y,fn:w}=h,{x:E,y:R,data:v,reset:S}=await w({x:u,y:a,initialPlacement:o,placement:g,strategy:r,middlewareData:m,rects:f,platform:c,elements:{reference:e,floating:t}});u=E??u,a=R??a,m[y]={...m[y],...v},S&&d<fo&&(d++,typeof S=="object"&&(S.placement&&(g=S.placement),S.rects&&(f=S.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:r}):S.rects),{x:u,y:a}=Ut(f,g,l)),p=-1)}return{x:u,y:a,placement:g,strategy:r,middlewareData:m}},mo=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:s,initialPlacement:c,platform:l,elements:f}=t,{mainAxis:u=!0,crossAxis:a=!0,fallbackPlacements:g,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:p=!0,...h}=ye(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=Q(r),w=J(c),E=Q(c)===c,R=await(l.isRTL==null?void 0:l.isRTL(f.floating)),v=g||(E||!p?[nt(c)]:oo(c)),S=m!=="none";!g&&S&&v.push(...co(c,p,m,R));const P=[c,...v],A=await l.detectOverflow(t,h),k=[];let L=((o=i.flip)==null?void 0:o.overflows)||[];if(u&&k.push(A[y]),a){const T=no(r,s,R);k.push(A[T[0]],A[T[1]])}if(L=[...L,{placement:r,overflows:k}],!k.every(T=>T<=0)){var D,K;const T=(((D=i.flip)==null?void 0:D.index)||0)+1,$=P[T];if($&&(!(a==="alignment"?w!==J($):!1)||L.every(b=>J(b.placement)===w?b.overflows[0]>0:!0)))return{data:{index:T,overflows:L},reset:{placement:$}};let F=(K=L.filter(W=>W.overflows[0]<=0).sort((W,b)=>W.overflows[1]-b.overflows[1])[0])==null?void 0:K.placement;if(!F)switch(d){case"bestFit":{var _;const W=(_=L.filter(b=>{if(S){const z=J(b.placement);return z===w||z==="y"}return!0}).map(b=>[b.placement,b.overflows.filter(z=>z>0).reduce((z,H)=>z+H,0)]).sort((b,z)=>b[1]-z[1])[0])==null?void 0:_[0];W&&(F=W);break}case"initialPlacement":F=c;break}if(r!==F)return{reset:{placement:F}}}return{}}}},pn=new Set(["left","top"]);async function go(e,t){const{placement:n,platform:o,elements:r}=e,i=await(o.isRTL==null?void 0:o.isRTL(r.floating)),s=Q(n),c=Re(n),l=J(n)==="y",f=pn.has(s)?-1:1,u=i&&l?-1:1,a=ye(t,e);let{mainAxis:g,crossAxis:d,alignmentAxis:m}=typeof a=="number"?{mainAxis:a,crossAxis:0,alignmentAxis:null}:{mainAxis:a.mainAxis||0,crossAxis:a.crossAxis||0,alignmentAxis:a.alignmentAxis};return c&&typeof m=="number"&&(d=c==="end"?m*-1:m),l?{x:d*u,y:g*f}:{x:g*f,y:d*u}}const ho=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:i,placement:s,middlewareData:c}=t,l=await go(t,e);return s===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+l.x,y:i+l.y,data:{...l,placement:s}}}}},po=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r,platform:i}=t,{mainAxis:s=!0,crossAxis:c=!1,limiter:l={fn:w=>{let{x:E,y:R}=w;return{x:E,y:R}}},...f}=ye(e,t),u={x:n,y:o},a=await i.detectOverflow(t,f),g=J(r),d=Lt(g);let m=u[d],p=u[g];const h=(w,E)=>gn(E+a[w==="y"?"top":"left"],E,E-a[w==="y"?"bottom":"right"]);s&&(m=h(d,m)),c&&(p=h(g,p));const y=l.fn({...t,[d]:m,[g]:p});return{...y,data:{x:y.x-n,y:y.y-o,enabled:{[d]:s,[g]:c}}}}}},xo=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,o;const{x:r,y:i,placement:s,rects:c,middlewareData:l}=t,{offset:f=0,mainAxis:u=!0,crossAxis:a=!0}=ye(e,t),g={x:r,y:i},d=J(s),m=Lt(d);let p=g[m],h=g[d];const y=ye(f,t),w=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:(n=y.mainAxis)!=null?n:0,crossAxis:(o=y.crossAxis)!=null?o:0};if(u){const v=m==="y"?"height":"width",S=c.reference[m]-c.floating[v]+w.mainAxis,P=c.reference[m]+c.reference[v]-w.mainAxis;p<S?p=S:p>P&&(p=P)}if(a){var E,R;const v=m==="y"?"width":"height",S=pn.has(Q(s)),P=c.reference[d]-c.floating[v]+(S&&((E=l.offset)==null?void 0:E[d])||0)+(S?0:w.crossAxis),A=c.reference[d]+c.reference[v]+(S?0:((R=l.offset)==null?void 0:R[d])||0)-(S?w.crossAxis:0);h<P?h=P:h>A&&(h=A)}return{[m]:p,[d]:h}}}},yo=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:o,platform:r,elements:i}=t,{apply:s=()=>{},...c}=ye(e,t),l=await r.detectOverflow(t,c),f=Q(n),u=Re(n),a=J(n)==="y",{width:g,height:d}=o.floating;let m,p;f==="top"||f==="bottom"?(m=f,p=u===(await(r.isRTL==null?void 0:r.isRTL(i.floating))?"start":"end")?"left":"right"):(p=f,m=u==="end"?"top":"bottom");const h=d-l.top-l.bottom,y=g-l.left-l.right,w=Le(d-l[m],h),E=Le(g-l[p],y),R=t.middlewareData.shift,v=!R;let S=w,P=E;R!=null&&R.enabled.x&&(P=y),R!=null&&R.enabled.y&&(S=h),v&&!u&&(a?P=g-2*de(l.left,l.right):S=d-2*de(l.top,l.bottom)),await s({...t,availableWidth:P,availableHeight:S});const A=await r.getDimensions(i.floating);return g!==A.width||d!==A.height?{reset:{rects:!0}}:{}}}};function xn(e){const t=xe(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=pe(e),i=r?e.offsetWidth:n,s=r?e.offsetHeight:o,c=tt(n)!==i||tt(o)!==s;return c&&(n=i,o=s),{width:n,height:o,$:c}}function It(e){return q(e)?e:e.contextElement}function Te(e){const t=It(e);if(!pe(t))return me(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=xn(t);let s=(i?tt(n.width):n.width)/o,c=(i?tt(n.height):n.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const wo=me(0);function yn(e){const t=se(e);return!ln()||!t.visualViewport?wo:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ro(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===se(e)}function Ae(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=It(e);let s=me(1);t&&(o?q(o)&&(s=Te(o)):s=Te(e));const c=Ro(i,n,o)?yn(i):me(0);let l=(r.left+c.x)/s.x,f=(r.top+c.y)/s.y,u=r.width/s.x,a=r.height/s.y;if(i&&o){const g=se(i),d=q(o)?se(o):o;let m=g,p=_t(m);for(;p&&d!==m;){const h=Te(p),y=p.getBoundingClientRect(),w=xe(p),E=y.left+(p.clientLeft+parseFloat(w.paddingLeft))*h.x,R=y.top+(p.clientTop+parseFloat(w.paddingTop))*h.y;l*=h.x,f*=h.y,u*=h.x,a*=h.y,l+=E,f+=R,m=se(p),p=_t(m)}}return ot({width:u,height:a,x:l,y:f})}function lt(e,t){const n=it(e).scrollLeft;return t?t.left+n:Ae(we(e)).left+n}function wn(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-lt(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function bo(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const i=r==="fixed",s=we(o),c=t?Et(t.floating):!1;if(o===s||c&&i)return n;let l={scrollLeft:0,scrollTop:0},f=me(1);const u=me(0),a=pe(o);if((a||!i)&&((St(o)!=="body"||cn(s))&&(l=it(o)),a)){const d=Ae(o);f=Te(o),u.x=d.x+o.clientLeft,u.y=d.y+o.clientTop}const g=s&&!a&&!i?wn(s,l):me(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-l.scrollLeft*f.x+u.x+g.x,y:n.y*f.y-l.scrollTop*f.y+u.y+g.y}}function vo(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Ao(e){const t=it(e),n=e.ownerDocument.body,o=de(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),r=de(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let i=-t.scrollLeft+lt(e);const s=-t.scrollTop;return xe(n).direction==="rtl"&&(i+=de(e.clientWidth,n.clientWidth)-o),{width:o,height:r,x:i,y:s}}const Oo=25;function Eo(e,t,n){n===void 0&&(n="viewport");const o=n==="layoutViewport",r=se(e),i=we(e),s=r.visualViewport;let c=i.clientWidth,l=i.clientHeight,f=0,u=0;if(s){const g=!ln()||t==="fixed";o?g||(f=-s.offsetLeft,u=-s.offsetTop):(c=s.width,l=s.height,g&&(f=s.offsetLeft,u=s.offsetTop))}if(lt(i)<=0){const g=i.ownerDocument,d=g.body,m=getComputedStyle(d),p=g.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,h=Math.abs(i.clientWidth-d.clientWidth-p),y=getComputedStyle(i).scrollbarGutter==="stable both-edges"?h/2:h;y<=Oo&&(c-=y)}return{width:c,height:l,x:f,y:u}}function So(e,t){const n=Ae(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=Te(e),s=e.clientWidth*i.x,c=e.clientHeight*i.y,l=r*i.x,f=o*i.y;return{width:s,height:c,x:l,y:f}}function qt(e,t,n){let o;if(t==="viewport"||t==="layoutViewport")o=Eo(e,n,t);else if(t==="document")o=Ao(we(e));else if(q(t))o=So(t,n);else{const r=yn(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return ot(o)}function Co(e,t){const n=t.get(e);if(n)return n;let o=vt(e,[],!1).filter(c=>q(c)&&St(c)!=="body"),r=null;const i=xe(e).position==="fixed";let s=i?Ze(e):e;for(;q(s)&&!bt(s);){const c=xe(s),l=sn(s),f=r?r.position:i?"fixed":"";!l&&(f==="fixed"||f==="absolute"&&c.position==="static")?o=o.filter(a=>a!==s):r=c,s=Ze(s)}return t.set(e,o),o}function Po(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const s=[...n==="clippingAncestors"?Et(t)?[]:Co(t,this._c):[].concat(n),o],c=qt(t,s[0],r);let l=c.top,f=c.right,u=c.bottom,a=c.left;for(let g=1;g<s.length;g++){const d=qt(t,s[g],r);l=de(d.top,l),f=Le(d.right,f),u=Le(d.bottom,u),a=de(d.left,a)}return{width:f-a,height:u-l,x:a,y:l}}function Mo(e){const{width:t,height:n}=xn(e);return{width:t,height:n}}function To(e,t,n){const o=pe(t),r=we(t),i=n==="fixed",s=Ae(e,!0,i,t);let c={scrollLeft:0,scrollTop:0};const l=me(0);if((o||!i)&&((St(t)!=="body"||cn(r))&&(c=it(t)),o)){const g=Ae(t,!0,i,t);l.x=g.x+t.clientLeft,l.y=g.y+t.clientTop}!o&&r&&(l.x=lt(r));const f=r&&!o&&!i?wn(r,c):me(0),u=s.left+c.scrollLeft-l.x-f.x,a=s.top+c.scrollTop-l.y-f.y;return{x:u,y:a,width:s.width,height:s.height}}function yt(e){return xe(e).position==="static"}function Gt(e,t){if(!pe(e)||xe(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return we(e)===n&&(n=n.ownerDocument.body),n}function Rn(e,t){const n=se(e);if(Et(e))return n;if(!pe(e)){let r=Ze(e);for(;r&&!bt(r);){if(q(r)&&!yt(r))return r;r=Ze(r)}return n}let o=Gt(e,t);for(;o&&kn(o)&&yt(o);)o=Gt(o,t);return o&&bt(o)&&yt(o)&&!sn(o)?n:o||Dn(e)||n}const Lo=async function(e){const t=this.getOffsetParent||Rn,n=this.getDimensions,o=await n(e.floating);return{reference:To(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function ko(e){return xe(e).direction==="rtl"}const Do={convertOffsetParentRelativeRectToViewportRelativeRect:bo,getDocumentElement:we,getClippingRect:Po,getOffsetParent:Rn,getElementRects:Lo,getClientRects:vo,getDimensions:Mo,getScale:Te,isElement:q,isRTL:ko};function bn(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Io(e,t,n){let o=null,r;const i=we(e);function s(){var u;clearTimeout(r),(u=o)==null||u.disconnect(),o=null}function c(u,a){u===void 0&&(u=!1),a===void 0&&(a=1),s();const g=e.getBoundingClientRect(),{left:d,top:m,width:p,height:h}=g;if(u||t(),!p||!h)return;const y=Ue(m),w=Ue(i.clientWidth-(d+p)),E=Ue(i.clientHeight-(m+h)),R=Ue(d),S={rootMargin:-y+"px "+-w+"px "+-E+"px "+-R+"px",threshold:de(0,Le(1,a))||1};let P=!0;function A(k){const L=k[0].intersectionRatio;if(!bn(g,e.getBoundingClientRect()))return c();if(L!==a){if(!P)return c();L?c(!1,L):r=setTimeout(()=>{c(!1,1e-7)},1e3)}P=!1}try{o=new IntersectionObserver(A,{...S,root:i.ownerDocument})}catch{o=new IntersectionObserver(A,S)}o.observe(e)}const l=se(e),f=()=>c(n);return l.addEventListener("resize",f),c(!0),()=>{l.removeEventListener("resize",f),s()}}function Jt(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,f=It(e),u=r||i?[...f?vt(f):[],...t?vt(t):[]]:[];u.forEach(y=>{r&&y.addEventListener("scroll",n),i&&y.addEventListener("resize",n)});const a=f&&c?Io(f,n,i):null;let g=-1,d=null;s&&(d=new ResizeObserver(y=>{let[w]=y;w&&w.target===f&&d&&t&&(d.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var E;(E=d)==null||E.observe(t)})),n()}),f&&!l&&d.observe(f),t&&d.observe(t));let m,p=l?Ae(e):null;l&&h();function h(){const y=Ae(e);p&&!bn(p,y)&&n(),p=y,m=requestAnimationFrame(h)}return n(),()=>{var y;u.forEach(w=>{r&&w.removeEventListener("scroll",n),i&&w.removeEventListener("resize",n)}),a?.(),(y=d)==null||y.disconnect(),d=null,l&&cancelAnimationFrame(m)}}const Fo=ho,Wo=po,Vo=mo,$o=yo,zo=xo,Ho=(e,t,n)=>{const o=new Map,r=n??{},i={...Do,...r.platform,_c:o};return uo(e,t,{...r,platform:i})};var Bo=typeof document<"u",_o=function(){},Qe=Bo?x.useLayoutEffect:_o;function rt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!rt(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const i=r[o];if(!(i==="_owner"&&e.$$typeof)&&!rt(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function vn(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Qt(e,t){const n=vn(e);return Math.round(t*n)/n}function wt(e){const t=x.useRef(e);return Qe(()=>{t.current=e}),t}function No(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:i,floating:s}={},transform:c=!0,whileElementsMounted:l,open:f}=e,[u,a]=x.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,d]=x.useState(o);rt(g,o)||d(o);const[m,p]=x.useState(null),[h,y]=x.useState(null),w=x.useCallback(b=>{b!==S.current&&(S.current=b,p(b))},[]),E=x.useCallback(b=>{b!==P.current&&(P.current=b,y(b))},[]),R=i||m,v=s||h,S=x.useRef(null),P=x.useRef(null),A=x.useRef(u),k=l!=null,L=wt(l),D=wt(r),K=wt(f),_=x.useCallback(()=>{if(!S.current||!P.current)return;const b={placement:t,strategy:n,middleware:g};D.current&&(b.platform=D.current),Ho(S.current,P.current,b).then(z=>{const H={...z,isPositioned:K.current!==!1};T.current&&!rt(A.current,H)&&(A.current=H,In.flushSync(()=>{a(H)}))})},[g,t,n,D,K]);Qe(()=>{f===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,a(b=>({...b,isPositioned:!1})))},[f]);const T=x.useRef(!1);Qe(()=>(T.current=!0,()=>{T.current=!1}),[]),Qe(()=>{if(R&&(S.current=R),v&&(P.current=v),R&&v){if(L.current)return L.current(R,v,_);_()}},[R,v,_,L,k]);const $=x.useMemo(()=>({reference:S,floating:P,setReference:w,setFloating:E}),[w,E]),F=x.useMemo(()=>({reference:R,floating:v}),[R,v]),W=x.useMemo(()=>{const b={position:n,left:0,top:0};if(!F.floating)return b;const z=Qt(F.floating,u.x),H=Qt(F.floating,u.y);return c?{...b,transform:"translate("+z+"px, "+H+"px)",...vn(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:z,top:H}},[n,c,F.floating,u.x,u.y]);return x.useMemo(()=>({...u,update:_,refs:$,elements:F,floatingStyles:W}),[u,_,$,F,W])}const Ko=(e,t)=>{const n=Fo(e);return{name:n.name,fn:n.fn,options:[e,t]}},jo=(e,t)=>{const n=Wo(e);return{name:n.name,fn:n.fn,options:[e,t]}},Yo=(e,t)=>({fn:zo(e).fn,options:[e,t]}),Xo=(e,t)=>{const n=Vo(e);return{name:n.name,fn:n.fn,options:[e,t]}},Uo=(e,t)=>{const n=$o(e);return{name:n.name,fn:n.fn,options:[e,t]}};function qo(e){return Go(e,e.rootContext)}function Go(e,t){const{nodeId:n,externalTree:o}=e,r=t.useState("referenceElement"),i=t.useState("floatingElement"),s=t.useState("domReferenceElement"),c=t.useState("open"),l=t.useState("floatingId"),[f,u]=x.useState(null),[a,g]=x.useState(void 0),[d,m]=x.useState(void 0),p=x.useRef(null),h=un(o),y=x.useMemo(()=>({reference:r,floating:i,domReference:s}),[r,i,s]),w=No({...e,elements:{...y,...f&&{reference:f}}}),E=q(a)?a:null,R=d===void 0?t.state.floatingElement:d;t.useSyncedValue("referenceElement",a??null),t.useSyncedValue("domReferenceElement",a===void 0?s:E),t.useSyncedValue("floatingElement",R);const v=x.useCallback(D=>{const K=q(D)?{getBoundingClientRect:()=>D.getBoundingClientRect(),getClientRects:()=>D.getClientRects(),contextElement:D}:D;u(K),w.refs.setReference(K)},[w.refs]),S=x.useCallback(D=>{(q(D)||D===null)&&(p.current=D,g(D)),(q(w.refs.reference.current)||w.refs.reference.current===null||D!==null&&!q(D))&&w.refs.setReference(D)},[w.refs,g]),P=x.useCallback(D=>{m(D),w.refs.setFloating(D)},[w.refs]),A=x.useMemo(()=>({...w.refs,setReference:S,setFloating:P,setPositionReference:v,domReference:p}),[w.refs,S,P,v]),k=x.useMemo(()=>({...w.elements,domReference:s}),[w.elements,s]),L=x.useMemo(()=>({...w,dataRef:t.context.dataRef,open:c,onOpenChange:t.setOpen,events:t.context.events,floatingId:l,refs:A,elements:k,nodeId:n,rootStore:t}),[w,A,k,n,t,c,l]);return U(()=>{s&&(p.current=s)},[s]),U(()=>{t.context.dataRef.current.floatingContext=L;const D=h?.nodesRef.current.find(K=>K.id===n);D&&(D.context=L)}),x.useMemo(()=>({...w,context:L,refs:A,elements:k,rootStore:t}),[w,A,k,L,t])}const Jo="Escape";function Zt(e){return _n&&e.movementX===0&&e.movementY===0}function at(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function qe(e,t){return at(t,e===dn||e===Tt,e===st||e===ct)}function Rt(e,t,n){return at(t,e===Tt,n?e===st:e===ct)||e==="Enter"||e===" "||e===""}function Qo(e,t,n){return at(t,n?e===st:e===ct,e===Tt)}function Zo(e,t,n,o){const r=n?e===ct:e===st,i=e===dn;return t==="both"||t==="horizontal"&&o?e===Jo:at(t,r,i)}function Rr(e,t){const{listRef:n,activeIndex:o,onNavigate:r=()=>{},enabled:i=!0,selectedIndex:s=null,allowEscape:c=!1,loopFocus:l=!1,nested:f=!1,rtl:u=!1,virtual:a=!1,focusItemOnOpen:g="auto",focusItemOnHover:d=!0,openOnArrowKeyDown:m=!0,disabledIndices:p=void 0,orientation:h="vertical",parentOrientation:y,id:w,resetOnPointerLeave:E=!0,externalTree:R,grid:v}=t,S=v!=null,P="rootStore"in e?e.rootStore:e,A=P.useState("open"),k=P.useState("floatingElement"),L=P.useState("domReferenceElement"),D=P.context.dataRef,K=$n(k),_=zn(L),T=ue(K),$=Hn(),F=un(R),W=x.useRef(g),b=x.useRef(s??-1),z=x.useRef(null),H=x.useRef(!0),N=ie(O=>{r(b.current===-1?null:b.current,O)}),be=x.useRef(!!k),B=x.useRef(A),Y=x.useRef(!1),Oe=x.useRef(!1),ke=x.useRef(null),ft=ue(p),Ee=ue(A),ee=ue(s),ce=ue(E),De=At(),Se=At(),Ie=ie(()=>{function O(V){a?F?.events.emit("virtualfocus",V):ke.current=Bn(V,{sync:Y.current,preventScroll:!0})}const C=n.current[b.current],j=Oe.current;C&&O(C),(Y.current?V=>V():V=>De.request(V))(()=>{const V=n.current[b.current]||C;if(!V)return;C||O(V),Ce&&(j||!H.current)&&V.scrollIntoView?.({block:"nearest",inline:"nearest"})})});U(()=>{D.current.orientation=h},[D,h]),U(()=>{i&&(A&&k?(b.current=s??-1,W.current&&s!=null&&(Oe.current=!0,N())):be.current&&(b.current=-1,N()))},[i,A,k,s,N]),U(()=>{if(i){if(!A){Y.current=!1;return}if(k)if(o==null){if(Y.current=!1,ee.current!=null)return;if(be.current&&(b.current=-1,Ie()),(!B.current||!be.current)&&W.current&&(z.current!=null||W.current===!0&&z.current==null)){let O=0;const C=()=>{n.current[0]==null?(O<2&&(O?M=>Se.request(M):queueMicrotask)(C),O+=1):(b.current=z.current==null||Rt(z.current,h,u)||f?pt(n):Kt(n),z.current=null,N())};C()}}else Nt(n.current,o)||(b.current=o,Ie(),Oe.current=!1)}},[i,A,k,o,ee,f,n,h,u,N,Ie,Se]),U(()=>{if(!i||k||!F||a||!be.current)return;const O=F.nodesRef.current,C=O.find(V=>V.id===$)?.context?.elements.floating,j=xt(et(L??C??null)),M=O.some(V=>V.context&&Be(V.context.elements.floating,j));C&&!M&&H.current&&C.focus({preventScroll:!0})},[i,k,L,F,$,a]),U(()=>{B.current=A,be.current=!!k}),U(()=>{A||(z.current=null,W.current=g)},[A,g]);const _e=o!=null,te=ie(O=>{if(!Ee.current)return;const C=n.current.indexOf(O.currentTarget);C!==-1&&(b.current!==C||o!==C)&&(b.current=C,N(O))}),ve=ie(()=>y??F?.nodesRef.current.find(O=>O.id===$)?.context?.dataRef?.current.orientation),Fe=ie(()=>pt(n,ft.current)),ge=ie(O=>{if(H.current=!1,Y.current=!0,O.which===229||!Ee.current&&O.currentTarget===T.current)return;if(f&&Zo(O.key,h,u,S)){qe(O.key,ve())||fe(O),P.setOpen(!1,Je(jt,O.nativeEvent)),pe(L)&&(a?F?.events.emit("virtualfocus",L):L.focus());return}const C=b.current,j=pt(n,p),M=Kt(n,p);if(_||(O.key==="Home"&&(fe(O),b.current=j,N(O)),O.key==="End"&&(fe(O),b.current=M,N(O))),v!=null){const V=v(O,b.current,n,h,l,u,p,j,M);if(V!=null&&(b.current=V,N(O)),h==="both")return}if(qe(O.key,h)){if(fe(O),A&&!a&&xt(O.currentTarget.ownerDocument)===O.currentTarget){b.current=Rt(O.key,h,u)?j:M,N(O);return}Rt(O.key,h,u)?l?C>=M?c&&C!==n.current.length?b.current=-1:(Y.current=!1,b.current=j):b.current=Xe(n.current,{startingIndex:C,disabledIndices:p}):b.current=Math.min(M,Xe(n.current,{startingIndex:C,disabledIndices:p})):l?C<=j?c&&C!==-1?b.current=n.current.length:(Y.current=!1,b.current=M):b.current=Xe(n.current,{startingIndex:C,decrement:!0,disabledIndices:p}):b.current=Math.max(j,Xe(n.current,{startingIndex:C,decrement:!0,disabledIndices:p})),Nt(n.current,b.current)&&(b.current=-1),N(O)}}),Ce=x.useMemo(()=>({onFocus(C){Y.current=!0,te(C)},onClick:({currentTarget:C})=>C.focus({preventScroll:!0}),onMouseMove(C){Zt(C)||(Y.current=!0,Oe.current=!1,d&&te(C))},onPointerLeave(C){if(!Ee.current||!H.current||C.pointerType==="touch")return;Y.current=!0;const j=C.relatedTarget;if(!(!d||n.current.includes(j))&&ce.current&&(ke.current?.(),ke.current=null,b.current=-1,N(C),!a)){const M=T.current,V=xt(et(M));M&&Be(M,V)&&M.focus({preventScroll:!0})}}}),[te,Ee,T,d,n,N,ce,a]),he=x.useMemo(()=>a&&A&&_e&&{"aria-activedescendant":`${w}-${o}`},[a,A,_e,w,o]),le=x.useMemo(()=>({"aria-orientation":h==="both"?void 0:h,..._?{}:he,onKeyDown(O){if(O.key==="Tab"&&O.shiftKey&&A&&!a){const C=mn(O.nativeEvent);if(C&&!Be(T.current,C))return;fe(O),P.setOpen(!1,Je(Qn,O.nativeEvent)),pe(L)&&L.focus();return}ge(O)},onPointerMove(O){Zt(O)||(H.current=!0)}}),[he,ge,T,h,_,P,A,a,L]),ne=x.useMemo(()=>{function O(M){P.setOpen(!0,Je(jt,M.nativeEvent,M.currentTarget))}function C(M){g==="auto"&&Nn(M.nativeEvent)&&(W.current=!a)}function j(M){W.current=g,g==="auto"&&fn(M.nativeEvent)&&(W.current=!0)}return{onKeyDown(M){const V=P.select("open");H.current=!1;const Z=M.key.startsWith("Arrow"),Ve=Qo(M.key,ve(),u),$e=qe(M.key,h),Ne=(f?Ve:$e)||M.key==="Enter"||M.key.trim()==="";if(a&&V)return ge(M);if(!(!V&&!m&&Z)){if(Ne){const Pe=qe(M.key,ve());z.current=f&&Pe?null:M.key}if(f){Ve&&(fe(M),V?(b.current=Fe(),N(M)):O(M));return}$e&&(ee.current!=null&&(b.current=ee.current),fe(M),!V&&m?O(M):ge(M),V&&N(M))}},onFocus(M){P.select("open")&&!a&&(b.current=-1,N(M))},onPointerDown:j,onPointerEnter:j,onMouseDown:C,onClick:C}},[ge,g,Fe,f,N,P,m,h,ve,u,ee,a]),We=x.useMemo(()=>({...he,...ne}),[he,ne]);return x.useMemo(()=>i?{reference:We,floating:le,item:Ce,trigger:ne}:{},[i,We,le,ne,Ce])}function br(e,t){const{listRef:n,elementsRef:o,activeIndex:r,onMatch:i,disabledIndices:s,onTyping:c,enabled:l=!0,resetMs:f=750,selectedIndex:u=null}=t,a="rootStore"in e?e.rootStore:e,g=a.useState("open"),d=Mt(),m=x.useRef(""),p=x.useRef(u??r??-1),h=x.useRef(null),y=ie(R=>{function v(T){return o?.current[T]}function S(T){const $=v(T);return $&&!Kn($)||$?.matches(":disabled")?!1:s==null||!jn(Fn,T,s)}function P(T,$,F=0){if(T.length===0)return-1;const W=(F%T.length+T.length)%T.length,b=$.toLowerCase();for(let z=0;z<T.length;z+=1){const H=(W+z)%T.length;if(!(!T[H]?.toLowerCase().startsWith(b)||!S(H)))return H}return-1}const A=n.current;if(m.current.length>0&&R.key===" "&&(fe(R),c?.(!0)),m.current.length>0&&m.current[0]!==" "&&P(A,m.current)===-1&&R.key!==" "&&c?.(!1),A==null||R.key.length!==1||R.ctrlKey||R.metaKey||R.altKey)return;g&&R.key!==" "&&(fe(R),c?.(!0));const k=m.current==="";k&&(p.current=u??r??-1),A.every((T,$)=>T&&S($)?T[0]?.toLowerCase()!==T[1]?.toLowerCase():!0)&&m.current===R.key&&(m.current="",p.current=h.current),m.current+=R.key,d.start(f,()=>{m.current="",p.current=h.current,c?.(!1)});const K=((k?u??r??-1:p.current)??0)+1,_=P(A,m.current,K);_!==-1?(i?.(_),h.current=_):R.key!==" "&&(m.current="",c?.(!1))}),w=ie(R=>{const v=R.relatedTarget,S=a.select("domReferenceElement"),P=a.select("floatingElement");Be(S,v)||Be(P,v)||(d.clear(),m.current="",p.current=h.current,c?.(!1))});U(()=>{!g&&u!==null||(d.clear(),h.current=null,m.current!==""&&(m.current=""))},[g,u,d]);const E=x.useMemo(()=>({onKeyDown:y,onBlur:w}),[y,w]);return x.useMemo(()=>l?{reference:E,floating:E}:{},[l,E])}function er(e){const t=x.useRef(""),n=x.useCallback(r=>{r.defaultPrevented||(t.current=r.pointerType,e(r,r.pointerType))},[e]);return{onClick:x.useCallback(r=>{if(r.detail===0){e(r,"keyboard");return}"pointerType"in r?e(r,r.pointerType):e(r,t.current),t.current=""},[e]),onPointerDown:n}}function tr(e,t){const n=ie((i,s)=>{(typeof e=="function"?e():e)||t(s||(Yn?"touch":""))}),{onClick:o,onPointerDown:r}=er(n);return x.useMemo(()=>({onClick:o,onPointerDown:r}),[o,r])}function vr(e){const[t,n]=x.useState(null),o=tr(e,n);return Zn(e,r=>{r&&!e&&n(null)}),x.useMemo(()=>({openMethod:t,triggerProps:o}),[t,o])}const nr=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:i,platform:s,elements:c,middlewareData:l}=t,{element:f,padding:u=0,offsetParent:a="real"}=ye(e,t)||{};if(f==null)return{};const g=hn(u),d={x:n,y:o},m=Dt(r),p=kt(m),h=await s.getDimensions(f),y=m==="y",w=y?"top":"left",E=y?"bottom":"right",R=y?"clientHeight":"clientWidth",v=i.reference[p]+i.reference[m]-d[m]-i.floating[p],S=d[m]-i.reference[m],P=a==="real"?await s.getOffsetParent?.(f):c.floating;let A=c.floating[R]||i.floating[p];(!A||!await s.isElement?.(P))&&(A=c.floating[R]||i.floating[p]);const k=v/2-S/2,L=A/2-h[p]/2-1,D=Math.min(g[w],L),K=Math.min(g[E],L),_=D,T=A-h[p]-K,$=A/2-h[p]/2+k,F=gn(_,$,T),W=!l.arrow&&Re(r)!=null&&$!==F&&i.reference[p]/2-($<_?D:K)-h[p]/2<0,b=W?$<_?$-_:$-T:0;return{[m]:d[m]+b,data:{[m]:F,centerOffset:$-F-b,...W&&{alignmentOffset:b}},reset:W}}}),or=(e,t)=>({...nr(e),options:[e,t]}),rr={name:"hide",async fn(e){const{width:t,height:n,x:o,y:r}=e.rects.reference,i=t===0&&n===0&&o===0&&r===0,s=await e.platform.detectOverflow(e,{elementContext:"reference"});return{data:{referenceHidden:s.top-n>=0||s.right-t>=0||s.bottom-n>=0||s.left-t>=0||i}}}},ir={sideX:"left",sideY:"top"},en="--available-width",tn="--available-height";function An(e,t,n){const o=e==="inline-start"||e==="inline-end";return{top:"top",right:o?n?"inline-start":"inline-end":"right",bottom:"bottom",left:o?n?"inline-end":"inline-start":"left"}[t]}function nn(e,t,n){const{rects:o,placement:r}=e;return{side:An(t,Q(r),n),align:Re(r)||"center",anchor:{width:o.reference.width,height:o.reference.height},positioner:{width:o.floating.width,height:o.floating.height}}}function Ar(e){return sr(e,qo)}function sr(e,t){const{anchor:n,positionMethod:o="absolute",side:r="bottom",sideOffset:i=0,align:s="center",alignOffset:c=0,collisionBoundary:l,collisionPadding:f=5,sticky:u=!1,arrowPadding:a=5,disableAnchorTracking:g=!1,inline:d,keepMounted:m=!1,floatingRootContext:p,mounted:h,collisionAvoidance:y,shift:w,nodeId:E,adaptiveOrigin:R,lazyFlip:v=!1,externalTree:S}=e,[P,A]=x.useState(null);!h&&P!==null&&A(null);const k=y.side||"flip",L=y.align||"flip",D=y.fallbackAxisSide||"end",K=w?.crossAxis??!1,_=w?.rootBoundary,T=typeof n=="function"?n:void 0,$=ie(T),F=T?$:n,W=ue(n),b=ue(h),H=eo()==="rtl",N=P||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":H?"left":"right","inline-start":H?"right":"left"}[r],be=s==="center"?N:`${N}-${s}`;let B=f;typeof B=="number"?B={top:B,right:B,bottom:B,left:B}:B&&(B={top:B.top||0,right:B.right||0,bottom:B.bottom||0,left:B.left||0});const Y=1,Oe=r==="bottom"?Y:0,ke=r==="top"?Y:0,ft=r==="right"?Y:0,Ee=r==="left"?Y:0,ee={boundary:l==="clipping-ancestors"?"clippingAncestors":l,padding:B},ce=x.useRef(null),De=ue(i),Se=ue(c),Ie=typeof i!="function"?i:0,_e=typeof c!="function"?c:0,te=[];d&&te.push(d),te.push(Ko(I=>{const G=nn(I,r,H),oe=typeof De.current=="function"?De.current(G):De.current,X=typeof Se.current=="function"?Se.current(G):Se.current;return{mainAxis:oe,crossAxis:X,alignmentAxis:X}},[Ie,_e,H,r]));const ve=L==="none"&&k!=="shift",Fe=!ve&&(u||K||k==="shift"),ge=k==="none"?null:Xo({...ee,padding:{top:B.top+Y+Oe,right:B.right+Y+Ee,bottom:B.bottom+Y+ke,left:B.left+Y+ft},mainAxis:!K&&k==="flip",crossAxis:L==="flip"?"alignment":!1,fallbackAxisSideDirection:D}),Ce=ve?null:jo({...ee,rootBoundary:_,mainAxis:L!=="none",crossAxis:Fe,limiter:u||K?void 0:Yo(I=>{if(!ce.current)return{};const{width:G,height:oe}=ce.current.getBoundingClientRect(),X=J(Q(I.placement)),ae=X==="y"?G:oe,re=X==="y"?B.left+B.right:B.top+B.bottom;return{offset:ae/2+re/2}})},[ee,u,K,_,B,L]);k==="shift"||L==="shift"||s==="center"?te.push(Ce,ge):te.push(ge,Ce),te.push(Uo({...ee,apply({elements:{floating:I},availableWidth:G,availableHeight:oe,rects:X}){if(!b.current)return;const ae=I.style;ae.setProperty(en,`${G}px`),ae.setProperty(tn,`${oe}px`);const re=se(I).devicePixelRatio||1,{x:ze,y:je,width:Ye,height:ut}=X.reference,dt=(Math.round((ze+Ye)*re)-Math.round(ze*re))/re,mt=(Math.round((je+ut)*re)-Math.round(je*re))/re;ae.setProperty("--anchor-width",`${dt}px`),ae.setProperty("--anchor-height",`${mt}px`)}}),or(I=>({element:ce.current||et(I.elements.floating).createElement("div"),padding:a,offsetParent:"floating"}),[a]),{name:"transformOrigin",fn(I){const{elements:G,middlewareData:oe,placement:X,rects:ae,y:re}=I,ze=Q(X),je=J(ze),Ye=ce.current,ut=oe.arrow?.x||0,dt=oe.arrow?.y||0,mt=Ye?.clientWidth||0,Sn=Ye?.clientHeight||0,gt=ut+mt/2,Bt=dt+Sn/2,Cn=Math.abs(oe.shift?.y||0),Pn=ae.reference.height/2,He=typeof i=="function"?i(nn(I,r,H)):i,Mn=Cn>He,Tn={top:`${gt}px calc(100% + ${He}px)`,bottom:`${gt}px ${-He}px`,left:`calc(100% + ${He}px) ${Bt}px`,right:`${-He}px ${Bt}px`}[ze],Ln=`${gt}px ${ae.reference.y+Pn-re}px`;return G.floating.style.setProperty("--transform-origin",Fe&&je==="y"&&Mn?Ln:Tn),{}}},rr,R),U(()=>{!h&&p&&p.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[h,p]);const he=x.useMemo(()=>({elementResize:!g&&typeof ResizeObserver<"u",layoutShift:!g&&typeof IntersectionObserver<"u"}),[g]),{refs:le,elements:ne,x:We,y:O,middlewareData:C,update:j,placement:M,context:V,isPositioned:Z,floatingStyles:Ve}=t({rootContext:p,open:m?h:void 0,placement:be,middleware:te,strategy:o,whileElementsMounted:m?void 0:(...I)=>Jt(...I,he),nodeId:E,externalTree:S}),{sideX:$e,sideY:Ne}=C.adaptiveOrigin||ir,Pe=Z?o:"fixed",Ft=x.useMemo(()=>{let I;return Z?R?I={position:Pe,[$e]:We,[Ne]:O}:I={...Ve,position:Pe}:I={position:Pe,top:0,left:0},I[en]="100vw",I[tn]="100vh",Z||(I.opacity=0),I},[R,Pe,$e,We,Ne,O,Ve,Z]),Ke=x.useRef(null);U(()=>{if(!h)return;const I=W.current,G=typeof I=="function"?I():I,X=(on(G)?G.current:G)||null||null;X!==Ke.current&&(le.setPositionReference(X),Ke.current=X)},[h,le,F,W]),x.useEffect(()=>{if(!h)return;const I=W.current;typeof I!="function"&&on(I)&&I.current!==Ke.current&&(le.setPositionReference(I.current),Ke.current=I.current)},[h,le,F,W]),x.useEffect(()=>{if(m&&h&&ne.reference&&ne.floating)return Jt(ne.reference,ne.floating,j,he)},[m,h,ne,j,he]);const Me=Q(M),Wt=An(r,Me,H),Vt=Re(M)||"center",$t=!!C.hide?.referenceHidden;U(()=>{v&&h&&Z&&Me!==N&&A(Me)},[v,h,Z,Me,N]);const zt=x.useMemo(()=>({position:"absolute",top:C.arrow?.y,left:C.arrow?.x}),[C.arrow]),Ht=C.arrow?.centerOffset!==0;return x.useMemo(()=>({positionerStyles:Ft,arrowStyles:zt,arrowRef:ce,arrowUncentered:Ht,side:Wt,align:Vt,physicalSide:Me,anchorHidden:$t,refs:le,context:V,isPositioned:Z,update:j}),[Ft,zt,ce,Ht,Wt,Vt,Me,$t,le,V,Z,j])}function on(e){return e!=null&&"current"in e}function cr(e){return e==="starting"?Xn:rn}function Or(e,t,{styles:n,transitionStatus:o,props:r,refs:i,hidden:s,inert:c=!1}){const l={...n};return c&&(l.pointerEvents="none"),Ct("div",e,{state:t,ref:i,props:[{role:"presentation",hidden:s,style:l},cr(o),r],stateAttributesMapping:Un})}const lr=x.createContext(void 0);function Er(e){return x.useContext(lr)}const ar=20;function Sr(e,t,n,o){const[r,i]=x.useState(!1);U(()=>{if(!e||!t||n==null){i(!1);return}const s=et(n).documentElement.clientWidth,c=n.offsetWidth;i(s>0&&c>0&&c>=s-ar)},[e,t,n]),qn(e&&(!t||r),o)}const Ge=5;function Cr(e,t){const n=fr(t);return e.clientX>=n.left-Ge&&e.clientX<=n.right+Ge&&e.clientY>=n.top-Ge&&e.clientY<=n.bottom+Ge}function fr(e){const t=e.getBoundingClientRect(),n=se(e);if(Gn)return t;const o=n.getComputedStyle(e,"::before"),r=n.getComputedStyle(e,"::after");if(!(o.content!=="none"||r.content!=="none"))return t;const s=parseFloat(o.width)||0,c=parseFloat(o.height)||0,l=parseFloat(r.width)||0,f=parseFloat(r.height)||0,u=Math.max(t.width,s,l),a=Math.max(t.height,c,f),g=u-t.width,d=a-t.height;return{left:t.left-g/2,right:t.right+g/2,top:t.top-d/2,bottom:t.bottom+d/2}}const On=x.createContext(void 0);function ur(){const e=x.useContext(On);if(e===void 0)throw new Error(Wn(13));return e}const En={imageLoadingStatus:()=>null},dr=x.forwardRef(function(t,n){const{className:o,render:r,style:i,...s}=t,[c,l]=x.useState("idle"),f={imageLoadingStatus:c},u=x.useMemo(()=>({imageLoadingStatus:c,setImageLoadingStatus:l}),[c,l]),a=Ct("span",t,{state:f,ref:n,props:s,stateAttributesMapping:En});return Pt.jsx(On.Provider,{value:u,children:a})}),mr=x.forwardRef(function(t,n){const{className:o,render:r,delay:i=0,style:s,...c}=t,{imageLoadingStatus:l}=ur(),[f,u]=x.useState(i===0),a=Mt();return x.useEffect(()=>(i>0?a.start(i,()=>u(!0)):u(!0),a.clear),[a,i]),Ct("span",t,{state:{imageLoadingStatus:l},ref:n,props:c,stateAttributesMapping:En,enabled:l!=="loaded"&&(i===0||f)})});function Pr({className:e,size:t="default",...n}){return Pt.jsx(dr,{"data-slot":"avatar","data-size":t,className:an("group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten",e),...n})}function Mr({className:e,...t}){return Pt.jsx(mr,{"data-slot":"avatar-fallback",className:an("flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs",e),...t})}export{Pr as A,Or as a,Mr as b,vr as c,wr as d,Rr as e,br as f,cr as g,Sr as h,Cr as i,Er as j,Do as p,ot as r,Ar as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as a,h as n,o}from"./index-
|
|
1
|
+
import{m as a,h as n,o}from"./index-DGJgBiEe.js";import{u as d}from"./useRender-BJVEua-j.js";const s=o("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function v({className:r,variant:e="default",render:t,...i}){return d({defaultTagName:"span",props:a({className:n(s({variant:e}),r)},i),render:t,state:{slot:"badge",variant:e}})}export{v as B};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s,h as t}from"./index-
|
|
1
|
+
import{j as s,h as t}from"./index-DGJgBiEe.js";function c({className:a,size:d="default",...r}){return s.jsx("div",{"data-slot":"card","data-size":d,className:t("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",a),...r})}export{c as C};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{c as o}from"./index-DGJgBiEe.js";/**
|
|
2
|
+
* @license lucide-react v1.39.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const n=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],e=o("chevron-down",n);export{e as C};
|