@snagset/server 0.1.34 → 0.1.36
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/routes/account.js +11 -2
- package/dist/routes/account.js.map +1 -1
- package/dist/routes/assignees.js +57 -9
- package/dist/routes/assignees.js.map +1 -1
- package/dist/routes/commentEdit.js +15 -3
- package/dist/routes/commentEdit.js.map +1 -1
- package/dist/routes/comments.js +6 -0
- package/dist/routes/comments.js.map +1 -1
- package/dist/routes/instance.js +8 -1
- package/dist/routes/instance.js.map +1 -1
- package/dist/routes/integrations.js +19 -12
- package/dist/routes/integrations.js.map +1 -1
- package/dist/routes/invites.js +36 -20
- package/dist/routes/invites.js.map +1 -1
- package/dist/routes/mcpTokens.js +17 -11
- package/dist/routes/mcpTokens.js.map +1 -1
- package/dist/routes/members.js +9 -7
- package/dist/routes/members.js.map +1 -1
- package/dist/routes/owner.js.map +1 -1
- package/dist/routes/reviewLinks.js +13 -0
- package/dist/routes/reviewLinks.js.map +1 -1
- package/dist/routes/rounds.js +7 -3
- package/dist/routes/rounds.js.map +1 -1
- package/dist/routes/sessions.js +7 -4
- package/dist/routes/sessions.js.map +1 -1
- package/dist/routes/sites.js +22 -13
- package/dist/routes/sites.js.map +1 -1
- package/dist/routes/threads.js +43 -10
- package/dist/routes/threads.js.map +1 -1
- package/dist/studioReviewers.js +3 -1
- package/dist/studioReviewers.js.map +1 -1
- package/dist/vendor/types/roles.js +65 -0
- package/package.json +1 -1
- package/static/dashboard/assets/CompositeItem-CJog0hVD.js +1 -0
- package/static/dashboard/assets/{ConfirmDialog-YHdRCMuk.js → ConfirmDialog-D2seMnrm.js} +1 -1
- package/static/dashboard/assets/{CopyButton-BPFFhzYZ.js → CopyButton-Bc4lyikk.js} +1 -1
- package/static/dashboard/assets/{FieldItemContext-CvuTIqbu.js → FieldItemContext-CzXi3fsx.js} +1 -1
- package/static/dashboard/assets/{InstallTag-Dyle6Z7u.js → InstallTag-SMFR2B0h.js} +1 -1
- package/static/dashboard/assets/McpTokens-BXqxvFAS.js +1 -0
- package/static/dashboard/assets/{SaveState-zx4IRIWV.js → SaveState-Cmf4iv03.js} +1 -1
- package/static/dashboard/assets/_app-DwywpWfz.js +56 -0
- package/static/dashboard/assets/{_app-BT2PvVrr.js → _app-bdnugJ8u.js} +1 -1
- package/static/dashboard/assets/activity-qDQs5Zz8.js +1 -0
- package/static/dashboard/assets/{arrow-left-D-J1WDaF.js → arrow-left-CDK8KGdH.js} +1 -1
- package/static/dashboard/assets/{avatar-JYCiU767.js → avatar-BIbCnV-M.js} +1 -1
- package/static/dashboard/assets/badge-BD0L3Rdr.js +1 -0
- package/static/dashboard/assets/{card-PWIpee1m.js → card-CCRzd-vJ.js} +1 -1
- package/static/dashboard/assets/{check-fUN7a3GX.js → check-CvTMcsU6.js} +1 -1
- package/static/dashboard/assets/{chevron-right-D_gtsnlu.js → chevron-right-NPSJD-jD.js} +1 -1
- package/static/dashboard/assets/{copy-ZBdagSqO.js → copy-CwAe5Q6l.js} +1 -1
- package/static/dashboard/assets/{dialog-B_kwIiUp.js → dialog-CvU77XfW.js} +2 -2
- package/static/dashboard/assets/{dropdown-menu-D5UGpMWY.js → dropdown-menu-VHkK2Dt7.js} +1 -1
- package/static/dashboard/assets/{image-off-kQWiBpm4.js → image-off-wPLko91u.js} +1 -1
- package/static/dashboard/assets/index-B1JGVSdd.js +169 -0
- package/static/dashboard/assets/index-CpG77B7f.css +1 -0
- package/static/dashboard/assets/invite-DWNnOuAZ.js +1 -0
- package/static/dashboard/assets/{label-CU7jvj5k.js → label-C6rZlF0y.js} +1 -1
- package/static/dashboard/assets/labels-DhKmOzOU.js +1 -0
- package/static/dashboard/assets/{layout-grid-DgutVVEL.js → layout-grid-CPYmheoR.js} +1 -1
- package/static/dashboard/assets/parts-sBoh2K5o.js +6 -0
- package/static/dashboard/assets/{plus-Cl722ZH_.js → plus-B7K-9XU0.js} +1 -1
- package/static/dashboard/assets/s._site-DKfVuunu.js +1 -0
- package/static/dashboard/assets/s._site.comments-DqDBqjhy.js +54 -0
- package/static/dashboard/assets/s._site.reviewers-yBn4jjwr.js +1 -0
- package/static/dashboard/assets/s._site.settings-CsiWJZ8D.js +1 -0
- package/static/dashboard/assets/{setup-BUjOodJm.js → setup-DrjzRZp8.js} +1 -1
- package/static/dashboard/assets/{sign-in-CppGynIo.js → sign-in-BsM2n_hk.js} +1 -1
- package/static/dashboard/assets/sign-up-BXcvVUC-.js +1 -0
- package/static/dashboard/assets/sites-DRTZAXN_.js +1 -0
- package/static/dashboard/assets/studio-CEwWJLvF.js +1 -0
- package/static/dashboard/assets/{studio-DepK2GJ4.js → studio-DdM6OVdO.js} +1 -1
- package/static/dashboard/assets/studio.index-BOXLD6ah.js +1 -0
- package/static/dashboard/assets/studio.integrations-B7XK6X3K.js +1 -0
- package/static/dashboard/assets/studio.members-DSJEjb1M.js +6 -0
- package/static/dashboard/assets/{sun-DDSRise2.js → sun-DojiLt7X.js} +1 -1
- package/static/dashboard/assets/{switch-L2_Pf-6w.js → switch-SJYZN0-3.js} +1 -1
- package/static/dashboard/assets/{table-fR4tWQ4-.js → table-BDQkr8bT.js} +1 -1
- package/static/dashboard/assets/{useAriaLabelledBy-Bk7BENOF.js → useAriaLabelledBy-BDqDB_Wq.js} +1 -1
- package/static/dashboard/assets/{useBaseQuery-CoqlgX-x.js → useBaseQuery-DXKWEN1Y.js} +1 -1
- package/static/dashboard/assets/useQuery-BCK_zdLj.js +1 -0
- package/static/dashboard/assets/useRender-hAtJO9As.js +1 -0
- package/static/dashboard/assets/{useValueChanged-BhvEiD3-.js → useValueChanged-B9j_H2Sq.js} +1 -1
- package/static/dashboard/assets/{users-STxJg0L8.js → users-jrxD0Qlm.js} +1 -1
- package/static/dashboard/assets/{welcome-D7-mGhDy.js → welcome-BGT16RMO.js} +3 -3
- package/static/dashboard/assets/{widget-signin-jj3P3IbD.js → widget-signin-A_kxUEvx.js} +1 -1
- package/static/dashboard/assets/you-CdfLrYaC.js +1 -0
- package/static/dashboard/assets/{zod-DbWDuTiO.js → zod-C7-R6TNW.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-DOjAZOIw.js +0 -1
- package/static/dashboard/assets/_app-CATs1X1F.js +0 -56
- package/static/dashboard/assets/activity-Ja8jqvTl.js +0 -1
- package/static/dashboard/assets/badge-NV2UvVlq.js +0 -1
- package/static/dashboard/assets/index-BCjjK9dr.js +0 -169
- package/static/dashboard/assets/index-D6Jv0m8R.css +0 -1
- package/static/dashboard/assets/invite-Cn7ntzp8.js +0 -1
- package/static/dashboard/assets/labels--UUyt9uB.js +0 -1
- package/static/dashboard/assets/me-ttfbX4Cb.js +0 -1
- package/static/dashboard/assets/parts-Oxy1krsw.js +0 -1
- package/static/dashboard/assets/s._site-DI7lRsnw.js +0 -1
- package/static/dashboard/assets/s._site.comments-BLiaZNHo.js +0 -54
- package/static/dashboard/assets/s._site.reviewers-BuxVEObS.js +0 -1
- package/static/dashboard/assets/s._site.settings-BLyC2Ix8.js +0 -1
- package/static/dashboard/assets/sign-up-BGy3UTxi.js +0 -1
- package/static/dashboard/assets/sites-CzRwDpMY.js +0 -1
- package/static/dashboard/assets/studio-BJa7hKy2.js +0 -1
- package/static/dashboard/assets/studio.index-C4hVZYkE.js +0 -1
- package/static/dashboard/assets/studio.integrations-2-WJQjiK.js +0 -1
- package/static/dashboard/assets/studio.members-CMxEJYg1.js +0 -6
- package/static/dashboard/assets/useQuery-6QR_MT4t.js +0 -1
- package/static/dashboard/assets/useRender-BybHPfHo.js +0 -1
- package/static/dashboard/assets/you-BMCOM6zE.js +0 -1
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import{u as pt,a as gt,b as ht,c as I,r as o,d as z,e as le,g as ft,j as e,B as J,f as w,h as se,m as be,E as xt,i as ve,k as ge,l as mt,n as bt,o as ne,S as vt,p as Z,q as jt,L as _,s as yt,t as _e,M as St,v as wt,w as Nt,x as Ct,y as kt,O as Tt}from"./index-BCjjK9dr.js";import{u as He}from"./useQuery-6QR_MT4t.js";import{T as Pt,i as ze,a as Rt,D as Mt,b as Et,c as Ot,X as Dt,d as It,e as At,f as _t,g as Ht,R as zt,p as Lt,h as $t,j as Bt,k as Ft,P as Ut,l as qt,u as Gt,m as Vt,n as Kt,o as Yt,q as Wt,r as Xt,s as Qt,t as Jt,v as Zt,w as es,x as ts,y as ss,z as ns,A as as,F as rs,B as os,C as is,E as Le,G as $e,H as Be,I as ls,J as ds,K as cs}from"./dialog-B_kwIiUp.js";import{c as B,n as Fe,g as us,a as he,t as ps,d as gs,i as hs,u as fs,b as de,L as xs,I as ms}from"./label-CU7jvj5k.js";import{g as fe,u as bs,a as vs,b as js,s as ys,c as Ss,d as ws,e as Ns,f as Cs,h as ks,S as Ue,E as Q,D as ae,i as re,j as oe,k as je,l as ee,m as D,n as V,o as Ts,p as ce}from"./dropdown-menu-D5UGpMWY.js";import{u as qe}from"./useRender-BybHPfHo.js";import{A as Ps,a as Rs}from"./avatar-JYCiU767.js";import{S as Ms,i as Es,a as Os}from"./labels--UUyt9uB.js";import{u as Ge}from"./me-ttfbX4Cb.js";import{L as te}from"./layout-grid-DgutVVEL.js";import{U as xe}from"./users-STxJg0L8.js";import{c as Ds}from"./update-duXzIzFS.js";import{P as Ve}from"./plus-Cl722ZH_.js";import{M as Is,S as As,a as _s}from"./sun-DDSRise2.js";import"./useBaseQuery-CoqlgX-x.js";import"./check-fUN7a3GX.js";import"./CompositeItem-DOjAZOIw.js";import"./useValueChanged-BhvEiD3-.js";function Hs(t){const s=pt({warn:t?.router===void 0}),n=t?.router||s;return gt(n.stores.__store,ht(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 zs=[["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"}]],Ke=I("activity",zs);/**
|
|
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 Ls=[["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"}]],Ye=I("blocks",Ls);/**
|
|
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 $s=[["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"}]],We=I("book-open",$s);/**
|
|
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 Bs=[["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"}]],ye=I("building-2",Bs);/**
|
|
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 Fs=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],Se=I("chevrons-up-down",Fs);/**
|
|
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 Us=[["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"}]],qs=I("circle-question-mark",Us);/**
|
|
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 Gs=[["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"}]],Vs=I("log-out",Gs);/**
|
|
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 Ks=[["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"}]],me=I("message-square",Ks);/**
|
|
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 Ys=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],Ws=I("panel-left",Ys);/**
|
|
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 Xs=[["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"}]],Xe=I("sliders-horizontal",Xs);/**
|
|
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 Qs=[["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"}]],Qe=I("user",Qs),ue=768;function Js(){const[t,s]=o.useState(void 0);return o.useEffect(()=>{const n=window.matchMedia(`(max-width: ${ue-1}px)`),a=()=>{s(window.innerWidth<ue)};return n.addEventListener("change",a),s(window.innerWidth<ue),()=>n.removeEventListener("change",a)},[]),!!t}const Zs=o.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Pt,currentIdRef:{current:null},currentContextRef:{current:null}});function en(t,s){t.current=s.current}function tn(t,s={open:!1}){const{open:n}=s,a="rootStore"in t?t.rootStore:t,r=a.useState("floatingId"),h=o.useContext(Zs),{currentIdRef:d,delayRef:i,timeoutMs:f,initialDelayRef:c,currentContextRef:g,hasProvider:j,timeout:x}=h,[m,p]=o.useState(!1),S=o.useRef(n);return z(()=>{S.current=n},[n]),z(()=>{function u(){g.current?.setIsInstantPhase(!1),d.current=null,g.current=null,i.current=c.current,x.clear()}if(d.current&&!n&&d.current===r){if(p(!1),f){const b=r;return x.start(f,()=>{a.select("open")||d.current&&d.current!==b||u()}),()=>{(S.current||d.current!==b)&&x.clear()}}u()}},[n,r,d,i,f,c,g,x,a]),z(()=>{if(!n)return;const u=g.current,b=d.current;x.clear(),g.current={onOpenChange:a.setOpen,setIsInstantPhase:p},d.current=r,i.current={open:0,close:fe(c.current,"close")},b!==null&&b!==r?(p(!0),u?.setIsInstantPhase(!0),u?.onOpenChange(!1,B(Fe))):(p(!1),u?.setIsInstantPhase(!1))},[n,r,a,d,i,c,g,x]),z(()=>()=>{if(d.current===r){if(g.current=null,!S.current)return;d.current=null,en(i,c),x.clear()}},[g,d,i,r,c,x]),o.useMemo(()=>({hasProvider:j,delayRef:i,isInstantPhase:m}),[j,i,m])}function sn(t,s){let n=null,a=null,r=!1;return{contextElement:t||void 0,getBoundingClientRect(){const h=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=h.width,g=h.height,j=h.x,x=h.y;return n==null&&s.x&&d&&(n=h.x-s.x),a==null&&s.y&&i&&(a=h.y-s.y),j-=n||0,x-=a||0,c=0,g=0,!r||f?(c=s.axis==="y"?h.width:0,g=s.axis==="x"?h.height:0,j=d&&s.x!=null?s.x:j,x=i&&s.y!=null?s.y:x):r&&!f&&(g=s.axis==="x"?h.height:g,c=s.axis==="y"?h.width:c),r=!0,{width:c,height:g,x:j,y:x,top:x,right:j+c,bottom:x+g,left:j}}}}function Ee(t){return t!=null&&t.clientX!=null}function nn(t,s={}){const{enabled:n=!0,axis:a="both"}=s,r="rootStore"in t?t.rootStore:t,h=r.useState("open"),d=r.useState("floatingElement"),i=r.useState("domReferenceElement"),f=r.context.dataRef,c=o.useRef(!1),g=o.useRef(null),[j,x]=o.useState(),[m,p]=o.useState([]),S=le(v=>{r.set("positionReference",v)}),u=le((v,y,P)=>{c.current||f.current.openEvent&&!Ee(f.current.openEvent)||r.set("positionReference",sn(P??i,{x:v,y,axis:a,dataRef:f,pointerType:j}))}),b=le(v=>{h?g.current||(u(v.clientX,v.clientY,v.currentTarget),p([])):u(v.clientX,v.clientY,v.currentTarget)}),C=ze(j)?d:h;o.useEffect(()=>{if(!n){S(i);return}if(!C)return;function v(){g.current?.(),g.current=null}const y=ft(d);function P(l){const k=us(l);he(d,k)?v():u(l.clientX,l.clientY)}return!f.current.openEvent||Ee(f.current.openEvent)?g.current=Rt(y,"mousemove",P):S(i),v},[C,n,d,f,i,r,u,S,m]),o.useEffect(()=>()=>{r.set("positionReference",null)},[r]),o.useEffect(()=>{n&&!d&&(c.current=!1)},[n,d]),o.useEffect(()=>{!n&&h&&(c.current=!0)},[n,h]);const N=o.useMemo(()=>{function v(y){x(y.pointerType)}return{onPointerDown:v,onPointerEnter:v,onMouseMove:b,onMouseEnter:b}},[b]);return o.useMemo(()=>n?{reference:N,trigger:N}:{},[n,N])}function an({...t}){return e.jsx(Mt,{"data-slot":"sheet",...t})}function rn({...t}){return e.jsx(_t,{"data-slot":"sheet-portal",...t})}function on({className:t,...s}){return e.jsx(Ht,{"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 ln({className:t,children:s,side:n="right",showCloseButton:a=!0,...r}){return e.jsxs(rn,{children:[e.jsx(on,{}),e.jsxs(Et,{"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(Ot,{"data-slot":"sheet-close",render:e.jsx(J,{variant:"ghost",className:"absolute top-3 right-3",size:"icon-sm"}),children:[e.jsx(Dt,{}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function dn({className:t,...s}){return e.jsx("div",{"data-slot":"sheet-header",className:w("flex flex-col gap-0.5 p-4",t),...s})}function cn({className:t,...s}){return e.jsx(It,{"data-slot":"sheet-title",className:w("font-heading text-base font-medium text-foreground",t),...s})}function un({className:t,...s}){return e.jsx(At,{"data-slot":"sheet-description",className:w("text-sm text-muted-foreground",t),...s})}const Je=o.createContext(void 0);function K(t){const s=o.useContext(Je);if(s===void 0&&!t)throw new Error(se(72));return s}const pn={...Lt,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 gn extends zt{constructor(s,n,a){const r=new Ut;super(hn(s,r,n,a),fn(r),pn)}setOpen=(s,n)=>{$t(this,s,n,{extraState:{openChangeReason:n.reason}})};cancelPendingOpen(s){this.state.floatingRootContext.dispatchOpenChange(!1,B(ps,s))}}function hn(t,s,n,a=!1){const r={...Bt(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...t};return r.floatingRootContext=Ft(s,n,a),r}function fn(t){return{popupRef:o.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:t}}const xn=qt(function(s){const{disabled:n=!1,defaultOpen:a=!1,open:r,disableHoverablePopup:h=!1,trackCursorAxis:d="none",actionsRef:i,onOpenChange:f,onOpenChangeComplete:c,handle:g,triggerId:j,defaultTriggerId:x=null,children:m}=s,p=Gt(($,F)=>new gn({open:a,openProp:r,activeTriggerId:x,triggerIdProp:j},$,F));p.useControlledProp("openProp",r),p.useControlledProp("triggerIdProp",j),p.useContextCallback("onOpenChange",f),p.useContextCallback("onOpenChangeComplete",c);const S=p.useState("open"),u=!n&&S,b=p.useState("activeTriggerId"),C=p.useState("mounted"),N=p.useState("payload");p.useSyncedValues({trackCursorAxis:d,disableHoverablePopup:h,disabled:n}),Vt(p,{closeOnActiveTriggerUnmount:!0});const{forceUnmount:v,transitionStatus:y}=Kt(u,p),P=p.useState("isInstantPhase"),l=p.useState("instantType"),k=p.useState("lastOpenChangeReason"),R=o.useRef(null);z(()=>{S&&n&&p.setOpen(!1,B(gs))},[S,n,p]),z(()=>{y==="ending"&&k===Fe||y!=="ending"&&P?(l!=="delay"&&(R.current=l),p.set("instantType","delay")):R.current!==null&&(p.set("instantType",R.current),R.current=null)},[y,P,k,l,p]),z(()=>{u&&b==null&&p.set("payload",void 0)},[p,b,u]),o.useImperativeHandle(i,()=>({unmount:v,close:()=>p.setOpen(!1,B(hs))}),[v,p]);const L=u||C||!n&&d!=="none";return e.jsxs(Je.Provider,{value:p,children:[g&&e.jsx(Yt,{handle:g,store:p}),L&&e.jsx(mn,{store:p,disabled:n,trackCursorAxis:d}),typeof m=="function"?m({payload:N}):m]})});function mn({store:t,disabled:s,trackCursorAxis:n}){const a=t.useState("floatingRootContext"),r=Wt(a,{enabled:!s,referencePress:()=>t.select("closeOnClick")}),h=nn(a,{enabled:!s&&n!=="none",axis:n==="none"?void 0:n}),d=o.useMemo(()=>be(h.reference,r.reference),[h.reference,r.reference]);return Xt(t,{activeTriggerProps:d,inactiveTriggerProps:d,popupProps:r.floating??xt}),null}const bn=o.createContext(void 0);function vn(){return o.useContext(bn)}const Oe=600,Ze="data-base-ui-tooltip-trigger";function De(t){if("composedPath"in t){const n=t.composedPath();for(let a=0;a<n.length;a+=1){const r=n[a];if(ge(r))return r}}const s=t.target;return ge(s)?s:null}function jn(t){let s=t;for(;s;){const n=s.closest(`[${Ze}]`);if(n)return n;const a=s.getRootNode();s="host"in a&&ge(a.host)?a.host:null}return null}const yn=Qt(function(s,n){const{render:a,className:r,style:h,handle:d,payload:i,disabled:f,delay:c,closeOnClick:g=!0,closeDelay:j,id:x,...m}=s,p=K(!0),u=bs(d)??p;if(!u)throw new Error(se(82));const b=fs(x),C=u.useState("isTriggerActive",b),N=u.useState("isOpenedByTrigger",b),v=u.useState("floatingRootContext"),y=o.useRef(null),P=c??Oe,l=j??0,{registerTrigger:k,isMountedByThisTrigger:R}=Jt(b,y,u,{payload:i,closeOnClick:g,closeDelay:l}),L=vn(),{delayRef:$,isInstantPhase:F,hasProvider:M}=tn(v,{open:N}),U=vs(v);u.useSyncedValue("isInstantPhase",F);const ie=u.useState("disabled"),q=f??ie,Ne=Zt(q),Ce=u.useState("trackCursorAxis"),rt=u.useState("disableHoverablePopup"),G=o.useRef(!1),Y=es(),W=o.useRef(void 0);function ke(){return M?fe($.current,"open")===0?0:c??L??Oe:P}function Te(T){const A=y.current;if(!A||!T)return!1;const H=jn(T);return H!==null&&H!==A&&he(A,H)}function ot(T){const A=Te(T);return G.current=A,A&&(U.openChangeTimeout.clear(),U.restTimeout.clear(),U.restTimeoutPending=!1,Y.clear()),A}const it=js(v,{enabled:!q,mouseOnly:!0,move:!1,handleClose:!rt&&Ce!=="both"?ys():null,restMs:ke,delay(){return j==null&&M?{close:fe($.current,"close")}:{close:l}},triggerElementRef:y,isActiveTrigger:C,isClosing:()=>u.select("transitionStatus")==="ending",shouldOpen(){return!G.current}}),lt=Ss(v,{enabled:!q}).reference,dt=T=>{const A=G.current,H=De(T),Pe=ot(H),X=y.current,ut=X&&H&&he(X,H);if(Pe&&u.select("open")&&u.select("lastOpenChangeReason")===de){u.setOpen(!1,B(de,T));return}if(A&&!Pe&&ut&&!Ne.current&&!u.select("open")&&X&&ze(W.current)){const Re=()=>{!G.current&&!Ne.current&&!u.select("open")&&u.setOpen(!0,B(de,T,X))},Me=ke();Me===0?(Y.clear(),Re()):Y.start(Me,Re)}},ct=u.useState("triggerProps",R);return ve("button",s,{state:{open:N},ref:[n,k,y],props:[it,lt,R||Ce!=="none"?ct:void 0,{onMouseOver(T){dt(T.nativeEvent)},onFocus(T){Te(De(T.nativeEvent))&&T.preventBaseUIHandler()},onMouseLeave(){G.current=!1,Y.clear(),W.current=void 0},onPointerEnter(T){W.current=T.pointerType},onPointerDown(T){W.current=T.pointerType,u.set("closeOnClick",g),g&&!u.select("open")&&u.cancelPendingOpen(T.nativeEvent)},onClick(T){g&&!u.select("open")&&u.cancelPendingOpen(T.nativeEvent)},id:b,"data-trigger-disabled":q?"":void 0,[Ze]:q?void 0:""},m],stateAttributesMapping:ts})}),et=o.createContext(void 0);function Sn(){const t=o.useContext(et);if(t===void 0)throw new Error(se(70));return t}const wn=o.forwardRef(function(s,n){const{children:a,container:r,className:h,render:d,style:i,...f}=s,{node:c,subtree:g}=ss({container:r,ref:n,componentProps:s,elementProps:f});return!g&&!c?null:e.jsxs(o.Fragment,{children:[g,c&&mt.createPortal(a,c)]})}),Nn=o.forwardRef(function(s,n){const{keepMounted:a=!1,...r}=s;return K().useState("mounted")||a?e.jsx(et.Provider,{value:a,children:e.jsx(wn,{ref:n,...r})}):null}),tt=o.createContext(void 0);function st(){const t=o.useContext(tt);if(t===void 0)throw new Error(se(71));return t}const Cn=o.forwardRef(function(s,n){const{render:a,className:r,anchor:h,positionMethod:d="absolute",side:i="top",align:f="center",sideOffset:c=0,alignOffset:g=0,collisionBoundary:j="clipping-ancestors",collisionPadding:x=5,arrowPadding:m=5,sticky:p=!1,disableAnchorTracking:S=!1,collisionAvoidance:u=ns,style:b,...C}=s,N=K(),v=Sn(),y=N.useState("open"),P=N.useState("mounted"),l=N.useState("trackCursorAxis"),k=N.useState("disableHoverablePopup"),R=N.useState("floatingRootContext"),L=N.useState("instantType"),$=N.useState("transitionStatus"),F=N.useState("adaptiveOrigin"),M=ws({anchor:h,positionMethod:d,floatingRootContext:R,mounted:P,side:i,sideOffset:c,align:f,alignOffset:g,collisionBoundary:j,collisionPadding:x,sticky:p,arrowPadding:m,disableAnchorTracking:S,keepMounted:v,collisionAvoidance:u,adaptiveOrigin:F}),U=o.useMemo(()=>({open:y,side:M.side,align:M.align,anchorHidden:M.anchorHidden,instant:l!=="none"?"tracking-cursor":L}),[y,M.side,M.align,M.anchorHidden,l,L]),ie=Ns(s,U,{styles:M.positionerStyles,transitionStatus:$,props:C,refs:[n,N.useStateSetter("positionerElement")],hidden:!P,inert:!y||l==="both"||k});return e.jsx(tt.Provider,{value:M,children:ie})}),kn=o.forwardRef(function(s,n){const{render:a,className:r,style:h,...d}=s,i=K(),{side:f,align:c}=st(),g=i.useState("open"),j=i.useState("instantType"),x=i.useState("transitionStatus"),m=i.useState("popupProps"),p=i.useState("floatingRootContext"),S=i.useState("disabled"),u=i.useState("closeDelay");as({open:g,ref:i.context.popupRef,onComplete(){g&&i.context.onOpenChangeComplete?.(!0)}}),Cs(p,{enabled:!S,closeDelay:u});const b=i.useStateSetter("popupElement");return ve("div",s,{state:{open:g,side:f,align:c,instant:j,transitionStatus:x},ref:[n,i.context.popupRef,b],props:[rs,m,ks(x),d],stateAttributesMapping:os})}),Tn=o.forwardRef(function(s,n){const{render:a,className:r,style:h,...d}=s,i=K(),{arrowRef:f,side:c,align:g,arrowUncentered:j,arrowStyles:x}=st(),m=i.useState("open"),p=i.useState("instantType");return ve("div",s,{state:{open:m,side:c,align:g,uncentered:j,instant:p},ref:[n,f],props:[{style:x,"aria-hidden":!0},d],stateAttributesMapping:is})});function Pn({...t}){return e.jsx(xn,{"data-slot":"tooltip",...t})}function Rn({...t}){return e.jsx(yn,{"data-slot":"tooltip-trigger",...t})}function Mn({className:t,side:s="top",sideOffset:n=4,align:a="center",alignOffset:r=0,children:h,...d}){return e.jsx(Nn,{children:e.jsx(Cn,{align:a,alignOffset:r,side:s,sideOffset:n,className:"isolate z-50",children:e.jsxs(kn,{"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:[h,e.jsx(Tn,{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 En="sidebar_state",On=3600*24*7,Dn="16rem",In="18rem",An="3rem",_n="b",nt=o.createContext(null);function we(){const t=o.useContext(nt);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function Hn({defaultOpen:t=!0,open:s,onOpenChange:n,className:a,style:r,children:h,...d}){const i=Js(),[f,c]=o.useState(!1),[g,j]=o.useState(t),x=s??g,m=o.useCallback(b=>{const C=typeof b=="function"?b(x):b;n?n(C):j(C),document.cookie=`${En}=${C}; path=/; max-age=${On}`},[n,x]),p=o.useCallback(()=>i?c(b=>!b):m(b=>!b),[i,m,c]);o.useEffect(()=>{const b=C=>{C.key===_n&&(C.metaKey||C.ctrlKey)&&(C.preventDefault(),p())};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[p]);const S=x?"expanded":"collapsed",u=o.useMemo(()=>({state:S,open:x,setOpen:m,isMobile:i,openMobile:f,setOpenMobile:c,toggleSidebar:p}),[S,x,m,i,f,c,p]);return e.jsx(nt.Provider,{value:u,children:e.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":Dn,"--sidebar-width-icon":An,...r},className:w("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",a),...d,children:h})})}function zn({side:t="left",variant:s="sidebar",collapsible:n="offcanvas",className:a,children:r,dir:h,...d}){const{isMobile:i,state:f,openMobile:c,setOpenMobile:g}=we();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(an,{open:c,onOpenChange:g,...d,children:e.jsxs(ln,{dir:h,"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":In},side:t,children:[e.jsxs(dn,{className:"sr-only",children:[e.jsx(cn,{children:"Sidebar"}),e.jsx(un,{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 Ln({className:t,onClick:s,...n}){const{toggleSidebar:a}=we();return e.jsxs(J,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-sm",className:w(t),onClick:r=>{s?.(r),a()},...n,children:[e.jsx(Ws,{}),e.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function $n({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 Bn({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 Fn({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 Un({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 Ie({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 qn({className:t,render:s,...n}){return qe({defaultTagName:"div",props:be({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 Ae({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 pe({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 E({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 Gn=bt("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 O({render:t,isActive:s=!1,variant:n="default",size:a="default",tooltip:r,className:h,...d}){const{isMobile:i,state:f}=we(),c=qe({defaultTagName:"button",props:be({className:w(Gn({variant:n,size:a}),h)},d),render:r?e.jsx(Rn,{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(Pn,{children:[c,e.jsx(Mn,{side:"right",align:"center",hidden:f!=="collapsed"||i,...r})]})):c}function Vn({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 Kn({open:t,onOpenChange:s}){const n=Ge(),a=ne(),[r,h]=o.useState(""),[d,i]=o.useState(0),f=o.useRef(null),c=r.trim(),[g,j]=o.useState("");o.useEffect(()=>{const l=setTimeout(()=>j(c),180);return()=>clearTimeout(l)},[c]);const x=He({queryKey:["activity","search",g],queryFn:()=>Z.activity({q:g,status:"all",limit:8}),enabled:t&&g.length>=2,staleTime:3e4});o.useEffect(()=>{t||(h(""),i(0))},[t]);const m=o.useMemo(()=>[{id:"s:sites",label:"Sites",icon:e.jsx(te,{className:"size-4"}),go:()=>void a({to:"/sites"})},{id:"s:activity",label:"Activity",hint:"every site, newest first",icon:e.jsx(Ke,{className:"size-4"}),go:()=>void a({to:"/activity"})},{id:"s:members",label:"Members",icon:e.jsx(xe,{className:"size-4"}),go:()=>void a({to:"/studio/members"})},{id:"s:integrations",label:"Integrations",icon:e.jsx(Ye,{className:"size-4"}),go:()=>void a({to:"/studio/integrations"})},{id:"s:studio",label:"Studio settings",icon:e.jsx(ye,{className:"size-4"}),go:()=>void a({to:"/studio"})},{id:"s:you",label:"You",icon:e.jsx(Qe,{className:"size-4"}),go:()=>void a({to:"/you"})}],[a]),p=o.useMemo(()=>n.projects.map(l=>({id:`p:${l.uid}`,label:l.name,hint:l.unresolved>0?`${l.unresolved} open`:"nothing open",icon:e.jsx(me,{className:"size-4"}),go:()=>void a({to:"/s/$site/comments",params:{site:l.uid}})})),[n.projects,a]),S=l=>!c||l.toLowerCase().includes(c.toLowerCase()),u=[],b=p.filter(l=>S(l.label)),C=m.filter(l=>S(l.label));b.length&&u.push({title:"Sites",items:b}),C.length&&u.push({title:"Go to",items:C});const N=(x.data?.data??[]).map(l=>({id:`t:${l.id}`,label:l.latest?.body?.trim()||l.route,hint:`${l.site.name} · ${Es(l.status)?Ms[l.status]:l.status} · ${l.key}`,icon:e.jsx(me,{className:"size-4"}),go:()=>void a({to:"/s/$site/comments",params:{site:l.site.uid},search:{thread:l.key}})}));N.length&&u.push({title:"Comments",items:N});const v=u.flatMap(l=>l.items),y=Math.min(d,Math.max(0,v.length-1)),P=l=>{l&&(s(!1),l.go())};return o.useEffect(()=>{f.current?.querySelector(`[data-at="${y}"]`)?.scrollIntoView({block:"nearest"})},[y]),e.jsx(Le,{open:t,onOpenChange:s,children:e.jsxs($e,{showCloseButton:!1,className:"top-[15%] max-h-[70dvh] translate-y-0 gap-0 overflow-hidden p-0 sm:max-w-lg",children:[e.jsx(Be,{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(Ue,{className:"size-4 shrink-0 text-muted-foreground"}),e.jsx("input",{autoFocus:!0,value:r,onChange:l=>{h(l.target.value),i(0)},onKeyDown:l=>{l.key==="ArrowDown"?(l.preventDefault(),i(k=>Math.min(k+1,v.length-1))):l.key==="ArrowUp"?(l.preventDefault(),i(k=>Math.max(k-1,0))):l.key==="Enter"&&(l.preventDefault(),P(v[y]))},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:[v.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."}),u.map(l=>e.jsxs("div",{children:[e.jsx("div",{className:"px-3 py-1 text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:l.title}),l.items.map(k=>{const R=v.indexOf(k);return e.jsxs("button",{type:"button","data-at":R,onMouseMove:()=>i(R),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",R===y&&"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)})]},l.title)),x.isFetching&&v.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(vt,{className:"size-3"}),"Searching every site…"]})]})]})})}function Yn(){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 at="https://snagset.com/docs/",Wn="https://www.npmjs.com/package/@snagset/server?activeTab=versions",Xn="https://snagset.com/docs/self-hosting/#upgrade";function Qn({children:t}){const s=Ge(),n=jt(s),[a,r]=Yn();return e.jsxs(Hn,{children:[e.jsx(ea,{me:s,site:n}),e.jsxs($n,{className:"min-w-0",children:[e.jsx(ra,{onSearch:()=>r(!0)}),e.jsx(Jn,{names:s.pendingMigrations??[],owner:s.user.role==="owner"}),s.regionMismatch&&(s.user.role==="owner"||s.user.role==="admin")&&e.jsx(Zn,{...s.regionMismatch}),e.jsx("div",{className:"min-h-0 flex-1",children:t})]}),e.jsx(Kn,{open:a,onOpenChange:r})]})}function Jn({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 Zn({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 ea({me:t,site:s}){const n=Hs({select:r=>r.location.pathname}),a=r=>n===r||n.startsWith(r+"/");return e.jsxs(zn,{children:[e.jsx(Bn,{className:"px-3 pb-1 pt-3",children:e.jsx(ta,{me:t})}),e.jsxs(Un,{children:[e.jsxs(Ie,{children:[e.jsx(sa,{me:t,site:s}),s&&e.jsx(Ae,{children:e.jsxs(pe,{children:[e.jsxs(E,{children:[e.jsxs(O,{isActive:a(`/s/${s.uid}/comments`),render:e.jsx(_,{to:"/s/$site/comments",params:{site:s.uid}}),children:[e.jsx(me,{}),e.jsx("span",{children:"Comments"})]}),s.unresolved>0&&e.jsx(Vn,{children:s.unresolved})]}),e.jsx(E,{children:e.jsxs(O,{isActive:a(`/s/${s.uid}/reviewers`),render:e.jsx(_,{to:"/s/$site/reviewers",params:{site:s.uid}}),children:[e.jsx(xe,{}),e.jsx("span",{children:"Reviewers"})]})}),e.jsx(E,{children:e.jsxs(O,{isActive:a(`/s/${s.uid}/settings`),render:e.jsx(_,{to:"/s/$site/settings",params:{site:s.uid}}),children:[e.jsx(Xe,{}),e.jsx("span",{children:"Settings"})]})})]})})]}),e.jsxs(Ie,{children:[e.jsx(qn,{children:"Studio"}),e.jsx(Ae,{children:e.jsxs(pe,{children:[e.jsx(E,{children:e.jsxs(O,{isActive:a("/sites"),render:e.jsx(_,{to:"/sites"}),children:[e.jsx(te,{}),e.jsx("span",{children:"Sites"})]})}),e.jsx(E,{children:e.jsxs(O,{isActive:a("/activity"),render:e.jsx(_,{to:"/activity"}),children:[e.jsx(Ke,{}),e.jsx("span",{children:"Activity"})]})}),e.jsx(E,{children:e.jsxs(O,{isActive:a("/studio/members"),render:e.jsx(_,{to:"/studio/members"}),children:[e.jsx(xe,{}),e.jsx("span",{children:"Members"})]})}),e.jsx(E,{children:e.jsxs(O,{isActive:a("/studio/integrations"),render:e.jsx(_,{to:"/studio/integrations"}),children:[e.jsx(Ye,{}),e.jsx("span",{children:"Integrations"})]})}),e.jsx(E,{children:e.jsxs(O,{isActive:n==="/studio",render:e.jsx(_,{to:"/studio"}),children:[e.jsx(ye,{}),e.jsx("span",{children:"General"})]})})]})})]})]}),e.jsx(Fn,{children:e.jsxs(pe,{children:[e.jsx(E,{children:e.jsxs(O,{render:e.jsx("a",{href:at,target:"_blank",rel:"noreferrer"}),children:[e.jsx(We,{}),e.jsx("span",{children:"Docs"}),e.jsx(Q,{className:"ml-auto size-3.5 text-muted-foreground"})]})}),e.jsx(E,{children:e.jsx(na,{})}),e.jsx(E,{children:e.jsx(aa,{me:t})})]})})]})}function ta({me:t}){const s=ne(),n=_e(),[a,r]=o.useState(!1),[h,d]=o.useState(""),[i,f]=o.useState(""),[c,g]=o.useState(!1),j=e.jsxs(e.Fragment,{children:[e.jsx(St,{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})]})]});if(t.orgs.length<=1&&!t.signupOpen)return 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:j});const x=async m=>{g(!0),f("");try{await m(),n.clear(),r(!1),d(""),s({to:"/sites",replace:!0})}catch(p){f(p instanceof Error?p.message:"Something went wrong. Try again.")}finally{g(!1)}};return e.jsxs(e.Fragment,{children:[e.jsxs(ae,{children:[e.jsxs(re,{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:[j,e.jsx(Se,{className:"size-3.5 shrink-0 text-muted-foreground"})]}),e.jsxs(oe,{align:"start",className:"w-[240px]",children:[e.jsxs(je,{children:[e.jsx(ee,{children:"Studios"}),t.orgs.map(m=>e.jsxs(D,{disabled:m.current,onClick:()=>void x(()=>Z.switchOrg(m.slug)),children:[e.jsx(ye,{}),e.jsx("span",{className:"truncate",children:m.name}),m.current&&e.jsx("span",{className:"ml-auto text-[11px] text-muted-foreground",children:"current"})]},m.slug))]}),e.jsx(V,{}),e.jsxs(D,{onClick:()=>void s({to:"/studio"}),children:[e.jsx(Xe,{}),"Studio settings"]}),t.signupOpen&&e.jsxs(D,{onClick:()=>r(!0),children:[e.jsx(Ve,{}),"New studio…"]})]})]}),e.jsx(Le,{open:a,onOpenChange:m=>!c&&r(m),children:e.jsx($e,{className:"sm:max-w-[420px]",children:e.jsxs("form",{className:"flex flex-col gap-4",onSubmit:m=>{m.preventDefault(),x(()=>Z.createOrg(h.trim()||"My studio"))},children:[e.jsxs(ls,{children:[e.jsx(Be,{children:"New studio"}),e.jsx(ds,{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(xs,{htmlFor:"new-studio-name",children:"Studio name"}),e.jsx(ms,{id:"new-studio-name",value:h,onChange:m=>d(m.target.value),placeholder:"My studio",autoFocus:!0})]}),i&&e.jsx("p",{className:"m-0 text-[12px] text-destructive",children:i}),e.jsxs(cs,{children:[e.jsx(J,{type:"button",variant:"outline",onClick:()=>r(!1),disabled:c,children:"Cancel"}),e.jsx(J,{type:"submit",loading:c,children:c?"Creating…":"Create studio"})]})]})})})]})}function sa({me:t,site:s}){const n=ne();return e.jsxs(ae,{children:[e.jsxs(re,{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(Se,{className:"size-3.5 text-muted-foreground"})]}),e.jsxs(oe,{align:"start",className:"w-[240px]",children:[e.jsxs(je,{children:[e.jsx(ee,{children:"Sites"}),t.projects.map(a=>e.jsxs(D,{onClick:()=>void n({to:"/s/$site/comments",params:{site:a.uid}}),children:[e.jsx(te,{}),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,{}),e.jsxs(D,{onClick:()=>void n({to:"/sites",search:{add:!0}}),children:[e.jsx(Ve,{}),"Add a site"]}),e.jsxs(D,{onClick:()=>void n({to:"/sites"}),children:[e.jsx(te,{}),"All sites"]})]})]})}function na(){const t=He(kt.meta()),s=t.data?.version??"",[n,a]=o.useState({state:"idle"}),r=async()=>{a({state:"checking"});try{a({state:"done",result:await Ds(s)})}catch{a({state:"failed"})}};return e.jsxs(ae,{children:[e.jsxs(re,{render:e.jsx(O,{}),children:[e.jsx(qs,{}),e.jsx("span",{children:"Help"})]}),e.jsxs(oe,{align:"start",side:"top",className:"w-[240px]",children:[e.jsxs(D,{render:e.jsx("a",{href:at,target:"_blank",rel:"noreferrer"}),children:[e.jsx(We,{}),"Docs",e.jsx(Q,{className:"ml-auto size-3 text-muted-foreground"})]}),e.jsxs(D,{render:e.jsx("a",{href:Wn,target:"_blank",rel:"noreferrer"}),children:["Changelog",e.jsx(Q,{className:"ml-auto size-3 text-muted-foreground"})]}),t.data?.sourceUrl&&e.jsxs(D,{render:e.jsx("a",{href:t.data.sourceUrl,target:"_blank",rel:"noreferrer"}),children:["Source · AGPL",e.jsx(Q,{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 ",s||"—",n.state==="idle"&&e.jsxs(e.Fragment,{children:[" · ",e.jsx("button",{type:"button",className:"text-brand hover:underline",onClick:()=>void r(),children:"Check for updates"})]}),n.state==="checking"&&" · checking…",n.state==="failed"&&" · could not reach npm",n.state==="done"&&n.result&&e.jsxs(e.Fragment,{children:[" · ",n.result.newer?e.jsxs("a",{href:Xn,target:"_blank",rel:"noreferrer",className:"text-brand hover:underline",children:[n.result.latest," is out — how to upgrade"]}):"up to date"]})]})]})]})}function aa({me:t}){const s=ne(),n=_e(),[a,r]=o.useState(wt),h=t.user.name||t.user.email,d=t.user.name?t.user.email:t.user.role,i=async()=>{await Z.logout().catch(()=>{}),Ct("out"),n.clear(),s({to:"/sign-in",replace:!0})};return e.jsxs(ae,{children:[e.jsxs(re,{render:e.jsx(O,{size:"lg"}),children:[e.jsx(Ps,{className:"size-8 rounded-full",children:e.jsx(Rs,{className:"bg-primary text-[12px] font-semibold text-primary-foreground",children:Os(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:h}),e.jsx("div",{className:"truncate text-[11.5px] text-muted-foreground",children:d})]}),e.jsx(Se,{className:"size-3.5 text-muted-foreground"})]}),e.jsxs(oe,{align:"start",side:"top",className:"w-[250px]",children:[e.jsx(je,{children:e.jsxs(ee,{className:"flex flex-col",children:[e.jsx("span",{className:"text-[13px] font-semibold",children:h}),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(Ts,{value:a,onValueChange:f=>{const c=f;Nt(c),r(c)},children:[e.jsx(ee,{children:"Theme"}),e.jsxs(ce,{value:"system",children:[e.jsx(Is,{}),"System"]}),e.jsxs(ce,{value:"light",children:[e.jsx(As,{}),"Light"]}),e.jsxs(ce,{value:"dark",children:[e.jsx(_s,{}),"Dark"]})]}),e.jsx(V,{}),e.jsxs(D,{onClick:()=>void s({to:"/you"}),children:[e.jsx(Qe,{}),"You"]}),e.jsxs(D,{onClick:()=>void i(),children:[e.jsx(Vs,{}),"Sign out"]})]})]})}function ra({onSearch:t}){const n=yt().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(Ln,{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(Ue,{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 Ta=()=>e.jsx(Qn,{children:e.jsx(Tt,{})});export{Ta as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Q as g,T as f,U as p,o as v,j as e,B as m,V as N,L as j,W as P}from"./index-BCjjK9dr.js";import{Q as y,u as b}from"./useBaseQuery-CoqlgX-x.js";import{P as w,S}from"./parts-Oxy1krsw.js";import{b as R,c as E,S as k}from"./labels--UUyt9uB.js";import{u as F}from"./me-ttfbX4Cb.js";import"./card-PWIpee1m.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 T=[{value:"unresolved",label:"Needs attention"},...E.map(s=>({value:s,label:k[s]})),{value:"all",label:"Everything"}];function C(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 U(){const s=F(),{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=C(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:[T.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:R(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{U as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{m as a,f as n,n as o}from"./index-BCjjK9dr.js";import{u as d}from"./useRender-BybHPfHo.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};
|