beads-map 0.3.3 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +2 -2
  3. package/.next/app-path-routes-manifest.json +1 -1
  4. package/.next/build-manifest.json +2 -2
  5. package/.next/next-minimal-server.js.nft.json +1 -1
  6. package/.next/next-server.js.nft.json +1 -1
  7. package/.next/prerender-manifest.json +1 -1
  8. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  9. package/.next/server/app/_not-found.html +1 -1
  10. package/.next/server/app/_not-found.rsc +1 -1
  11. package/.next/server/app/api/beads.body +1 -1
  12. package/.next/server/app/index.html +1 -1
  13. package/.next/server/app/index.rsc +2 -2
  14. package/.next/server/app/page.js +3 -3
  15. package/.next/server/app/page_client-reference-manifest.js +1 -1
  16. package/.next/server/app-paths-manifest.json +5 -5
  17. package/.next/server/functions-config-manifest.json +1 -1
  18. package/.next/server/pages/404.html +1 -1
  19. package/.next/server/pages/500.html +1 -1
  20. package/.next/server/server-reference-manifest.json +1 -1
  21. package/.next/static/chunks/app/page-cf8e14cb4afc8112.js +1 -0
  22. package/.next/static/css/ade5301262971664.css +3 -0
  23. package/app/page.tsx +43 -3
  24. package/components/BeadsGraph.tsx +108 -10
  25. package/components/ContextMenu.tsx +51 -5
  26. package/package.json +1 -1
  27. package/.next/static/chunks/app/page-4a4f07fcb5bd4637.js +0 -1
  28. package/.next/static/css/df2737696baac0fa.css +0 -3
  29. /package/.next/static/{bsmkR-2y8Ra7VuoNZWLzB → JmL0suxsggbSwPxWcmUFV}/_buildManifest.js +0 -0
  30. /package/.next/static/{bsmkR-2y8Ra7VuoNZWLzB → JmL0suxsggbSwPxWcmUFV}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[931],{6284:function(e,t,n){Promise.resolve().then(n.bind(n,2315))},2315:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return eL}});var r=n(3890),s=n(8496);let i={status:"Status",priority:"Priority",owner:"Owner",assignee:"Assignee",prefix:"Prefix"},l={open:"#10b981",in_progress:"#f59e0b",blocked:"#ef4444",deferred:"#8b5cf6",closed:"#a1a1aa"},a={open:"Open",in_progress:"In Progress",blocked:"Blocked",deferred:"Deferred",closed:"Closed"},o={0:"P0 - Critical",1:"P1 - High",2:"P2 - Medium",3:"P3 - Low",4:"P4 - Backlog"},c={0:"#ef4444",1:"#f97316",2:"#3b82f6",3:"#a1a1aa",4:"#d4d4d8"},d=["#d20f39","#179299","#fe640b","#1e66f5","#40a02b","#8839ef","#df8e1d","#209fb5","#ea76cb","#04a5e5","#e64553","#7287fd","#dd7878","#dc8a78"],u={bug:"\uD83D\uDC1B",feature:"✨",task:"\uD83D\uDCDD",epic:"\uD83C\uDFAF",chore:"\uD83D\uDD27"};function x(e){return e.split(/[-_]/).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function h(e){if(!e)return"#acb0be";let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=16777619*t>>>0;return d[t%d.length]}let m=new Proxy({},{get:(e,t)=>x(t),has:()=>!0}),p=new Proxy({},{get:(e,t)=>(function(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=16777619*t>>>0;let n=t%360;return"hsl(".concat(n,", 65%, 55%)")})(t),has:()=>!0});function f(e){let t="object"==typeof e.source?e.source.id:e.source,n="object"==typeof e.target?e.target.id:e.target;return"".concat(t,"->").concat(n,":").concat(e.type)}function g(e,t){if(!e)return{addedNodeIds:new Set(t.graphData.nodes.map(e=>e.id)),removedNodeIds:new Set,changedNodes:new Map,addedLinkKeys:new Set(t.graphData.links.map(f)),removedLinkKeys:new Set,hasChanges:!0};let n=new Map(e.graphData.nodes.map(e=>[e.id,e])),r=new Map(t.graphData.nodes.map(e=>[e.id,e])),s=new Set,i=new Set,l=new Map;for(let[e,t]of r)if(n.has(e)){let r=n.get(e),s=[];r.status!==t.status&&s.push({field:"status",from:r.status,to:t.status}),r.priority!==t.priority&&s.push({field:"priority",from:String(r.priority),to:String(t.priority)}),r.title!==t.title&&s.push({field:"title",from:r.title,to:t.title}),(r.owner||"")!==(t.owner||"")&&s.push({field:"owner",from:r.owner||"",to:t.owner||""}),s.length>0&&l.set(e,s)}else s.add(e);for(let e of n.keys())r.has(e)||i.add(e);let a=new Set(e.graphData.links.map(f)),o=new Set(t.graphData.links.map(f)),c=new Set,d=new Set;for(let e of o)a.has(e)||c.add(e);for(let e of a)o.has(e)||d.add(e);let u=s.size>0||i.size>0||l.size>0||c.size>0||d.size>0;return{addedNodeIds:s,removedNodeIds:i,changedNodes:l,addedLinkKeys:c,removedLinkKeys:d,hasChanges:u}}var v=n(6297),b=n(21),j=n(4295),y=n(2528);let w=null;function k(e){let t=e.blockerCount+e.dependentCount;return"epic"===e.issueType&&(t+=3),5+17*Math.min(t/6,1)}let N="status";function z(e){switch(N){case"priority":return c[e.priority]||c[2];case"owner":return h(e.createdBy);case"assignee":return h(e.assignee);case"prefix":return h(e.prefix);default:return l[e.status]||l.open}}function C(e){return 1-(1-e)*(1-e)}let M=new Map;function S(e,t){let n=M.get(e);if("loading"===n||"failed"===n)return null;if(n)return n;M.set(e,"loading");let r=new Image;return r.onload=()=>{M.set(e,r),t()},r.onerror=()=>{M.set(e,"failed")},r.src=e,null}function L(e,t,n,r,s,i){e.beginPath(),e.arc(t,n,r,0,2*Math.PI),e.fillStyle="#e4e4e7",e.fill();let l=s.replace("@","").charAt(0).toUpperCase();e.font="600 ".concat(Math.min(7,Math.max(3,1.3*r)),"px 'Inter', system-ui, sans-serif"),e.textAlign="center",e.textBaseline="middle",e.fillStyle="#71717a",e.fillText(l,t,n+.3)}function D(e,t){let n=new Set([e]),r=[{id:e,depth:0}];for(;r.length>0;){let{id:e,depth:s}=r.shift();if(!(s>=2))for(let i of t){let t="object"==typeof i.source?i.source.id:i.source,l="object"==typeof i.target?i.target.id:i.target;t!==e||n.has(l)||(n.add(l),r.push({id:l,depth:s+1})),l!==e||n.has(t)||(n.add(t),r.push({id:t,depth:s+1}))}}return n}function A(e){let t=e.current;if(!t)return;let n=t.zoom();"number"!=typeof n||isNaN(n)||(t.zoom(1.000001*n,0),requestAnimationFrame(()=>{e.current&&e.current.zoom(n,0)}))}let T=(0,s.forwardRef)(function(e,t){let{nodes:d,links:u,selectedNode:m,hoveredNode:p,onNodeClick:f,onNodeHover:g,onBackgroundClick:M,onNodeRightClick:T,commentedNodeIds:I,claimedNodeAvatars:B,onAvatarHover:P,timelineActive:W,stats:F,sidebarOpen:R,collapsedEpicIds:O,onCollapseAll:_,onExpandAll:H,colorMode:U="status",onColorModeChange:V,autoFit:Y=!0,onAutoFitToggle:q,pulseNodeId:X,showPulse:K=!0,onShowPulseToggle:G}=e,Z=(0,s.useRef)(null),$=(0,s.useRef)(null),J=(0,s.useRef)(null),Q=(0,s.useRef)(0),ee=(0,s.useRef)(()=>{}),[et,en]=(0,s.useState)({width:800,height:600}),er=(0,s.useRef)(!1),[es,ei]=(0,s.useState)({w:160,h:120}),el=es.w,ea=es.h,eo=(0,s.useRef)(null),[ec,ed]=(0,s.useState)(w);(0,s.useEffect)(()=>{w||n.e(149).then(n.bind(n,3149)).then(e=>{w=e.default||e,ed(()=>w)})},[]);let[eu,ex]=(0,s.useState)("dag"),[eh,em]=(0,s.useState)(!0),ep=(0,s.useRef)(m),ef=(0,s.useRef)(p),eg=(0,s.useRef)(new Set),ev=(0,s.useRef)(I||new Map),eb=(0,s.useRef)(B||new Map),ej=(0,s.useRef)(U),ey=(0,s.useRef)(X||null),ew=(0,s.useRef)(K),ek=(0,s.useRef)(()=>{});ek.current=()=>A(Z);let eN=(0,s.useRef)(P);eN.current=P;let ez=(0,s.useRef)(null),eC=(0,s.useRef)({x:0,y:0}),eM=(0,s.useRef)(d),eS=(0,s.useRef)([]),{viewNodes:eL,viewLinks:eD}=(0,s.useMemo)(()=>{if(!O||0===O.size)return{viewNodes:d,viewLinks:u};let e=new Map;for(let t of u){let n="object"==typeof t.source?t.source.id:t.source,r="object"==typeof t.target?t.target.id:t.target;"parent-child"===t.type&&e.set(r,n)}let t=new Set(d.map(e=>e.id));for(let n of d)if(!e.has(n.id)&&n.id.includes(".")){let r=n.id.split(".")[0];t.has(r)&&e.set(n.id,r)}let n=new Set;for(let[t,r]of e)O.has(r)&&n.add(t);if(0===n.size)return{viewNodes:d,viewLinks:u};let r=new Map;for(let t of n)r.set(t,e.get(t));let s=new Map,i=new Map,l=new Map;for(let[e,t]of r){s.set(t,(s.get(t)||0)+1);let n=d.find(t=>t.id===e);n&&(i.set(t,(i.get(t)||0)+n.blockerCount),l.set(t,(l.get(t)||0)+n.dependentCount))}let a=d.filter(e=>!n.has(e.id)).map(e=>({...e,blockerCount:e.blockerCount+(i.get(e.id)||0),dependentCount:e.dependentCount+(l.get(e.id)||0),collapsedCount:s.get(e.id)||0})),o=[],c=new Set;for(let e of u){let t="object"==typeof e.source?e.source.id:e.source,s="object"==typeof e.target?e.target.id:e.target;if("parent-child"===e.type&&n.has(s)||(t=r.get(t)||t)===(s=r.get(s)||s))continue;let i="".concat(t,"->").concat(s,":").concat(e.type);c.has(i)||(c.add(i),o.push({source:t,target:s,type:e.type}))}return{viewNodes:a,viewLinks:o}},[d,u,O]);eM.current=eL,(0,s.useEffect)(()=>{let e=new Map;for(let t of u){let n="object"==typeof t.source?t.source.id:t.source,r="object"==typeof t.target?t.target.id:t.target;"parent-child"===t.type&&e.set(r,n)}let t=new Set(d.map(e=>e.id));for(let n of d)if(!e.has(n.id)&&n.id.includes(".")){let r=n.id.split(".")[0];t.has(r)&&e.set(n.id,r)}let n=new Map;for(let[t,r]of e){let e=n.get(r)||[];e.push(t),n.set(r,e)}let r=new Map(d.map(e=>[e.id,e])),s=[];for(let[e,t]of n){let n=r.get(e);n&&s.push({parentId:e,title:n.title||e,prefix:n.prefix,memberIds:[e,...t]})}eS.current=s},[d,u]);let eA=(0,s.useMemo)(()=>{if("status"===U||"priority"===U)return[];let e=new Map;for(let t of eL)switch(U){case"owner":{let n=t.createdBy||void 0;e.set(n||"Unassigned",h(n));break}case"assignee":{let n=t.assignee||void 0;e.set(n||"Unassigned",h(n));break}case"prefix":e.set(x(t.prefix),h(t.prefix))}return Array.from(e.entries()).sort((e,t)=>{let[n]=e,[r]=t;return"Unassigned"===n?1:"Unassigned"===r?-1:n.localeCompare(r)}).map(e=>{let[t,n]=e;return{label:t,color:n}})},[U,eL]);(0,s.useEffect)(()=>{ep.current=m;let e=ef.current||m;e?eg.current=D(e.id,eD):eg.current=new Set,A(Z),cancelAnimationFrame(Q.current),Q.current=requestAnimationFrame(()=>ee.current())},[m,eD]),(0,s.useEffect)(()=>{ef.current=p;let e=p||ep.current;e?eg.current=D(e.id,eD):eg.current=new Set,A(Z),cancelAnimationFrame(Q.current),Q.current=requestAnimationFrame(()=>ee.current())},[p,eD]),(0,s.useEffect)(()=>{ev.current=I||new Map,A(Z)},[I]),(0,s.useEffect)(()=>{eb.current=B||new Map,A(Z)},[B]),(0,s.useEffect)(()=>{ej.current=U,N=U,A(Z),Q.current=requestAnimationFrame(()=>ee.current())},[U]),(0,s.useEffect)(()=>{ey.current=X||null,ew.current=K,A(Z)},[X,K]),(0,s.useEffect)(()=>{let e=$.current;if(!e)return;let t=t=>{let n;eC.current={x:t.clientX,y:t.clientY};let r=Z.current,s=eN.current;if(!r||!s)return;let i=eb.current;if(0===i.size){ez.current&&(ez.current=null,s(null));return}let l=e.getBoundingClientRect(),a=t.clientX-l.left,o=t.clientY-l.top;try{n=r.screen2GraphCoords(a,o)}catch(e){return}let c=Math.max(4,10/(r.zoom()||1));for(let e of eM.current){if(null==e.x||null==e.y)continue;let r=i.get(e.id);if(!r)continue;let l=k(e),a=e.x+.7*l,o=e.y+.7*l,d=n.x-a,u=n.y-o;if(d*d+u*u<=c*c){ez.current!==e.id&&(ez.current=e.id,s({handle:r.handle,avatar:r.avatar,claimedAt:r.claimedAt,did:r.did,x:t.clientX,y:t.clientY}));return}}ez.current&&(ez.current=null,s(null))};return e.addEventListener("mousemove",t),()=>e.removeEventListener("mousemove",t)},[]),(0,s.useEffect)(()=>{let e=()=>{if($.current){let e=$.current.getBoundingClientRect();en({width:e.width,height:e.height})}};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);let eT=(0,s.useCallback)(e=>{let t=Z.current;if(!t)return;let n=eL.find(t=>t.id===e.id);n&&void 0!==n.x&&void 0!==n.y&&(t.centerAt(n.x,n.y,500),t.zoom(2.5,500),f(e))},[f,eL]);(0,s.useImperativeHandle)(t,()=>({focusNode:eT}),[eT]),(0,s.useEffect)(()=>{var e,t,n,r,s,i,l,a,o,c,d,u,x,h,m;let p;let f=Z.current;if(!f||0===eL.length)return;let g=()=>{f.d3Force("radial",null),f.d3Force("x",null),f.d3Force("y",null)},w=()=>{eL.forEach(e=>{delete e.fx,delete e.fy})};if("dag"===eu)g(),null===(e=f.d3Force("charge"))||void 0===e||e.strength(-80).distanceMax(300),null===(t=f.d3Force("link"))||void 0===t||t.distance(50).strength(.3),null===(n=f.d3Force("center"))||void 0===n||n.strength(.01),f.d3Force("collision",null);else if("radial"===eu){g(),w();let e=new Map;for(let t of eD){if("parent-child"===t.type)continue;let n="object"==typeof t.target?t.target.id:t.target,r="object"==typeof t.source?t.source.id:t.source;e.has(n)||e.set(n,[]),e.get(n).push(r)}let t=new Map,n=[];eL.forEach(r=>{e.has(r.id)||(t.set(r.id,0),n.push(r.id))});let l=0;for(;l<n.length;){let e=n[l++],r=t.get(e);for(let s of eD){if("parent-child"===s.type)continue;let i="object"==typeof s.source?s.source.id:s.source,l="object"==typeof s.target?s.target.id:s.target;i!==e||t.has(l)||(t.set(l,r+1),n.push(l))}}eL.forEach(e=>{var n;e._depth=null!==(n=t.get(e.id))&&void 0!==n?n:0}),Array.from(t.values());let a=Math.max(200,4*eL.length);null===(r=f.d3Force("charge"))||void 0===r||r.strength(-300).distanceMax(800),null===(s=f.d3Force("link"))||void 0===s||s.distance(150).strength(.15),null===(i=f.d3Force("center"))||void 0===i||i.strength(0),f.d3Force("radial",(0,v.Z)(e=>(e._depth||0)*a,0,0).strength(.8)),f.d3Force("x",null),f.d3Force("y",null),f.d3Force("collision",(0,b.Z)().radius(e=>k(e)+10).strength(.9))}else if("cluster"===eu){g(),w();let e=[...new Set(eL.map(e=>e.prefix))],t=Math.max(400,5*eL.length,150*e.length),n=new Map;e.forEach((r,s)=>{let i=2*Math.PI*s/e.length-Math.PI/2;n.set(r,{x:Math.cos(i)*t,y:Math.sin(i)*t})}),null===(l=f.d3Force("charge"))||void 0===l||l.strength(-200).distanceMax(600),null===(a=f.d3Force("link"))||void 0===a||a.distance(100).strength(.15),null===(o=f.d3Force("center"))||void 0===o||o.strength(0),f.d3Force("x",(0,j.Z)(e=>{var t;return(null===(t=n.get(e.prefix))||void 0===t?void 0:t.x)||0}).strength(.5)),f.d3Force("y",(0,y.Z)(e=>{var t;return(null===(t=n.get(e.prefix))||void 0===t?void 0:t.y)||0}).strength(.5)),f.d3Force("collision",(0,b.Z)().radius(e=>k(e)+10).strength(.9))}else"spread"===eu?(g(),w(),null===(c=f.d3Force("charge"))||void 0===c||c.strength(-300).distanceMax(500),null===(d=f.d3Force("link"))||void 0===d||d.distance(180).strength(.4),null===(u=f.d3Force("center"))||void 0===u||u.strength(.02),f.d3Force("collision",(0,b.Z)().radius(e=>k(e)+8).strength(.8))):(g(),w(),null===(x=f.d3Force("charge"))||void 0===x||x.strength(-180).distanceMax(400),null===(h=f.d3Force("link"))||void 0===h||h.distance(e=>{var t,n,r,s;return(((null===(t=e.source)||void 0===t?void 0:t.blockerCount)||0)+((null===(n=e.source)||void 0===n?void 0:n.dependentCount)||0)+(((null===(r=e.target)||void 0===r?void 0:r.blockerCount)||0)+((null===(s=e.target)||void 0===s?void 0:s.dependentCount)||0)))/2>4?90:120}).strength(.6),null===(m=f.d3Force("center"))||void 0===m||m.strength(.03),f.d3Force("collision",(0,b.Z)().radius(e=>k(e)+6).strength(.7)));return f.d3ReheatSimulation(),Y&&(p=setTimeout(()=>{Z.current&&Z.current.zoomToFit(400,60)},er.current?600:1e3)),er.current=!0,()=>{p&&clearTimeout(p)}},[eu,eL,eD,Y]);let eE=(0,s.useRef)(!1);(0,s.useEffect)(()=>{if(eE.current||!ec||0===d.length)return;eE.current=!0;let e=setTimeout(()=>{ex("force")},15);return()=>clearTimeout(e)},[ec,d.length]),(0,s.useEffect)(()=>{if(!W&&Y&&Z.current&&d.length>0){let e=setTimeout(()=>{Z.current.zoomToFit(400,60)},800);return()=>clearTimeout(e)}},[d.length,W,Y]);let eI=(0,s.useMemo)(()=>{let e=Math.sqrt(eL.length)||1;return eL.forEach((t,n)=>{if(null==t.x&&null==t.y){let r=n*Math.PI*(3-Math.sqrt(5)),s=300*Math.sqrt(.5+n)/e;t.x=s*Math.cos(r),t.y=s*Math.sin(r)}}),{nodes:eL,links:eD}},[eL,eD]),eB=(0,s.useCallback)((e,t,n)=>{var r,s,i;let a=k(e),o=z(e),c=h(e.prefix),d=(null===(r=ep.current)||void 0===r?void 0:r.id)===e.id,u=(null===(s=ef.current)||void 0===s?void 0:s.id)===e.id,x=eg.current,m=x.has(e.id),p=x.size>0,f=Date.now(),g=1,v=e._spawnTime;if(v){let e=f-v;e<500&&(g=1+2.70158*Math.pow((i=e/500)-1,3)+1.70158*Math.pow(i-1,2))}let b=1,j=1,y=e._removeTime;if(y){let e=f-y;if(e<400){let t=e/400;b=1-C(t),j=1-t}else b=0,j=0}let w=g*b;if(w<=.01)return;let N=a*w,M=(p&&!m?.15:"closed"===e.status?.5:1)*j;if(M<=.01)return;t.save(),t.globalAlpha=M,m&&p&&(t.shadowColor="#10b981",t.shadowBlur=d?20:u?16:10),n>.3&&(t.beginPath(),t.arc(e.x,e.y,N+2,0,2*Math.PI),t.strokeStyle=c,t.lineWidth=2,t.stroke()),t.beginPath(),t.arc(e.x,e.y,N,0,2*Math.PI),t.fillStyle=o,t.fill(),t.strokeStyle=d?"#10b981":u?"#3f3f46":"#e4e4e7",t.lineWidth=d?2.5:u?2:1,t.stroke(),t.shadowBlur=0;let D=e._changedAt;if(D){let n=f-D;if(n<800){let r=n/800,s=l[e.status]||"#a1a1aa";t.beginPath(),t.arc(e.x,e.y,N+4+20*r,0,2*Math.PI),t.strokeStyle=s,t.lineWidth=2*(1-r),t.globalAlpha=(1-r)*.6,t.stroke(),t.globalAlpha=M}}if(ew.current&&ey.current===e.id){let r=N+Math.max(25,30/n);for(let s=0;s<3;s++){let i=(f+500*s)%2e3/2e3,l=N+2/n+i*(r-N),a=(1-i)*.6;t.beginPath(),t.arc(e.x,e.y,l,0,2*Math.PI),t.strokeStyle="#10b981",t.lineWidth=Math.max(1.5/n,.5),t.globalAlpha=a*M,t.stroke()}t.globalAlpha=M}if(v){let n=f-v;if(n<500){let r=n/500;t.beginPath(),t.arc(e.x,e.y,N+6+8*r,0,2*Math.PI),t.strokeStyle="#10b981",t.lineWidth=3*(1-r),t.globalAlpha=(1-r)*.4,t.stroke(),t.globalAlpha=M}}if(e.priority<=1&&n>.5&&(t.font="".concat(Math.min(10,Math.max(4,12/n)),"px sans-serif"),t.textAlign="center",t.textBaseline="bottom",t.fillText(0===e.priority?"\uD83D\uDD25\uD83D\uDD25":"\uD83D\uDD25",e.x,e.y-N-2)),n>.5){let r=Math.min(7,Math.max(3,10/n));t.font="500 ".concat(r,"px 'Inter', system-ui, sans-serif"),t.textAlign="center",t.textBaseline="top",t.fillStyle="#3f3f46",t.globalAlpha=.85*M;let s=e.id;n>1.5?s=E(e.title||e.id,30):n>.9&&(s=E(e.title||e.id,18)),t.fillText(s,e.x,e.y+N+3);let i=e.collapsedCount;i&&i>0&&(t.font="400 ".concat(Math.min(5.5,Math.max(2.5,8/n)),"px 'Inter', system-ui, sans-serif"),t.fillStyle="#a1a1aa",t.fillText("".concat(i," task").concat(1!==i?"s":""),e.x,e.y+N+3+r+1))}let A=ev.current.get(e.id);if(A&&A>0&&n>.4){let r=Math.min(6,Math.max(3.5,8/n)),s=e.x+.75*N,i=e.y-.75*N,l=A>99?"99+":String(A);t.save(),t.globalAlpha=Math.min(M,.95),t.beginPath(),t.arc(s,i,r,0,2*Math.PI),t.fillStyle="#ef4444",t.fill(),t.strokeStyle="#ffffff",t.lineWidth=Math.max(.8,1.2/n),t.stroke(),t.font="600 ".concat(Math.min(7,Math.max(3,1.3*r)),"px 'Inter', system-ui, sans-serif"),t.textAlign="center",t.textBaseline="middle",t.fillStyle="#ffffff",t.fillText(l,s,i+.3),t.restore()}let T=eb.current.get(e.id);if(T){let r=Math.max(4,10/n),s=e.x+.7*N,i=e.y+.7*N;if(t.save(),t.globalAlpha=1,T.avatar){let e=S(T.avatar,()=>ek.current());e?(t.save(),t.beginPath(),t.arc(s,i,r,0,2*Math.PI),t.clip(),t.drawImage(e,s-r,i-r,2*r,2*r),t.restore()):L(t,s,i,r,T.handle,n)}else L(t,s,i,r,T.handle,n);t.beginPath(),t.arc(s,i,r,0,2*Math.PI),t.strokeStyle="#ffffff",t.lineWidth=Math.max(.8,1.2/n),t.stroke(),t.restore()}t.restore()},[]),eP=(0,s.useCallback)((e,t,n)=>{let r=e.source,s=e.target;if(void 0===r.x||void 0===s.x)return;let i=Date.now(),l=1,a=1,o=e._spawnTime;if(o){let e=i-o;if(e<500){let t=e/500;l=C(t),a=1+(1-t)*1.5}}let c=1,d=e._removeTime;if(d){let e=i-d;if(!(e<400))return;c=1-C(e/400)}let u=l*c;if(u<=.01)return;let x=r.id||e.source,h=s.id||e.target,m="parent-child"===e.type,p=eg.current,f=p.size>0,g=f&&p.has(x)&&p.has(h),v=(m?f?g?.5:.05:.2:f?g?.8:.08:.35)*u;if(v<=.01)return;t.save(),t.globalAlpha=v,m?(t.strokeStyle=g?"#71717a":"#a1a1aa",t.lineWidth=Math.max(.6,1.5/n)*a,t.setLineDash([4,3])):(t.strokeStyle=g?"#10b981":"#d4d4d8",t.lineWidth=(g?Math.max(2,2.5/n):Math.max(.8,1.2/n))*a);let b=s.x-r.x,j=s.y-r.y,y=Math.sqrt(b*b+j*j),w=(r.x+s.x)/2+.15*j,N=(r.y+s.y)/2-.15*b;if(t.beginPath(),t.moveTo(r.x,r.y),t.quadraticCurveTo(w,N,s.x,s.y),t.stroke(),m&&t.setLineDash([]),o){let e=i-o;e<300&&(t.save(),t.globalAlpha=(1-e/300)*.5,t.strokeStyle="#10b981",t.lineWidth=(m?3:4)/n,t.beginPath(),t.moveTo(r.x,r.y),t.quadraticCurveTo(w,N,s.x,s.y),t.stroke(),t.restore())}if(!m){let e=k(s);if(y<e+1){t.restore();return}let i=Math.min(8,6/n),l=1-e/y,a=r.x+l*b,o=r.y+l*j,c=Math.atan2(j,b);t.fillStyle=g?"#10b981":"#d4d4d8",t.beginPath(),t.moveTo(a,o),t.lineTo(a-i*Math.cos(c-Math.PI/7),o-i*Math.sin(c-Math.PI/7)),t.lineTo(a-i*Math.cos(c+Math.PI/7),o-i*Math.sin(c+Math.PI/7)),t.closePath(),t.fill()}t.restore()},[]),eW=(0,s.useCallback)((e,t)=>{if(!eh)return;let n=t>=.8?0:t<=.4?1:(.8-t)/.4;if(n<=.01)return;let r=eS.current;if(0===r.length)return;let s=new Map;for(let e of eL)null!=e.x&&null!=e.y&&s.set(e.id,{x:e.x,y:e.y});for(let i of(e.save(),r)){let r=0,l=0,a=0;for(let e of i.memberIds){let t=s.get(e);t&&(r+=t.x,l+=t.y,a++)}if(0===a)continue;let o=r/a,c=l/a,d=0;for(let e of i.memberIds){let t=s.get(e);if(t){let e=t.x-o,n=t.y-c,r=Math.sqrt(e*e+n*n);r>d&&(d=r)}}let u=d+30,x=h(i.prefix);e.beginPath(),e.arc(o,c,u,0,2*Math.PI),e.globalAlpha=.05*n,e.fillStyle=x,e.fill(),e.globalAlpha=.25*n,e.strokeStyle=x,e.lineWidth=1.5/t,e.setLineDash([8/t,4/t]),e.stroke(),e.setLineDash([]);let m=Math.min(24,Math.max(10,14/t)),p=Math.min(12,Math.max(5,8/t)),f=.35*m;e.font="500 ".concat(p,"px 'Inter', system-ui, sans-serif"),e.textAlign="center",e.textBaseline="middle",e.globalAlpha=.45*n,e.fillStyle="#71717a",e.fillText(i.parentId,o,c-.5*m-f),e.font="600 ".concat(m,"px 'Inter', system-ui, sans-serif"),e.globalAlpha=.85*n,e.fillStyle="#18181b";let g=i.title.length>40?i.title.slice(0,39)+"…":i.title;e.fillText(g,o,c+.15*m);let v=Math.min(14,Math.max(6,9/t));e.font="400 ".concat(v,"px 'Inter', system-ui, sans-serif"),e.globalAlpha=.5*n,e.fillStyle="#71717a",e.fillText("".concat(i.memberIds.length," issue").concat(1!==i.memberIds.length?"s":""),o,c+.15*m+.7*m)}e.restore()},[eL,d,eh]),eF=(0,s.useCallback)((e,t,n)=>{let r=k(e)+5;n.fillStyle=t,n.beginPath(),n.arc(e.x,e.y,r,0,2*Math.PI),n.fill()},[]),eR=(0,s.useCallback)(()=>{},[]),eO=(0,s.useCallback)(()=>{var e,t;let n=J.current,r=Z.current;if(!n||!r)return;let s=n.getContext("2d");if(!s)return;let i=1/0,l=-1/0,a=1/0,o=-1/0,c=!1;for(let e of eL)null!=e.x&&null!=e.y&&(c=!0,e.x<i&&(i=e.x),e.x>l&&(l=e.x),e.y<a&&(a=e.y),e.y>o&&(o=e.y));if(!c)return;let d=(l+=40)-(i-=40)||1,u=(o+=40)-(a-=40)||1,x=el-16,h=ea-16,m=Math.min(x/d,h/u),p=8+(x-d*m)/2,f=8+(h-u*m)/2,g=window.devicePixelRatio||1;(n.width!==el*g||n.height!==ea*g)&&(n.width=el*g,n.height=ea*g,s.setTransform(g,0,0,g,0,0)),s.clearRect(0,0,el,ea),s.fillStyle="rgba(250, 250, 250, 0.92)",s.beginPath(),s.roundRect(0,0,el,ea,6),s.fill();let v=eg.current,b=v.size>0,j=(null===(e=ef.current)||void 0===e?void 0:e.id)||(null===(t=ep.current)||void 0===t?void 0:t.id)||null;for(let e of eD){let t=e.source,n=e.target;if(null==t.x||null==n.x)continue;let r=t.id||e.source,l=n.id||e.target,o=b&&v.has(r)&&v.has(l);s.globalAlpha=b?o?.5:.04:.1,s.strokeStyle=o?"#10b981":"#a1a1aa",s.lineWidth=o?1:.5;let c=p+(t.x-i)*m,d=f+(t.y-a)*m,u=p+(n.x-i)*m,x=f+(n.y-a)*m;s.beginPath(),s.moveTo(c,d),s.lineTo(u,x),s.stroke()}for(let e of(s.globalAlpha=1,eL)){if(null==e.x||null==e.y)continue;let t=p+(e.x-i)*m,n=f+(e.y-a)*m,r=e.id===j,l=v.has(e.id);b&&!l?s.globalAlpha=.1:"closed"===e.status?s.globalAlpha=.35:s.globalAlpha=.85,s.fillStyle=z(e);let o="epic"===e.issueType?3:2;r?o=5:b&&l&&(o=4),r&&(s.globalAlpha=.4,s.fillStyle="#10b981",s.beginPath(),s.arc(t,n,o+2,0,2*Math.PI),s.fill(),s.globalAlpha=1,s.fillStyle=z(e)),s.fillRect(t-o/2,n-o/2,o,o)}s.globalAlpha=1;let y=eb.current;if(y.size>0)for(let e of eL){if(null==e.x||null==e.y)continue;let t=y.get(e.id);if(!t)continue;let n=p+(e.x-i)*m,r=f+(e.y-a)*m;if(s.save(),s.globalAlpha=1,t.avatar){let e=S(t.avatar,()=>ek.current());e?(s.save(),s.beginPath(),s.arc(n,r,5,0,2*Math.PI),s.clip(),s.drawImage(e,n-5,r-5,10,10),s.restore()):(s.beginPath(),s.arc(n,r,5,0,2*Math.PI),s.fillStyle="#d4d4d8",s.fill())}else s.beginPath(),s.arc(n,r,5,0,2*Math.PI),s.fillStyle="#d4d4d8",s.fill();s.beginPath(),s.arc(n,r,5,0,2*Math.PI),s.strokeStyle="#ffffff",s.lineWidth=1,s.stroke(),s.restore()}try{let e=r.screen2GraphCoords(0,0),t=r.screen2GraphCoords(et.width,et.height),n=p+(e.x-i)*m,l=f+(e.y-a)*m,o=(t.x-e.x)*m,c=(t.y-e.y)*m,d=Math.max(0,n),u=Math.max(0,l),x=Math.min(el-d,o-(d-n)),h=Math.min(ea-u,c-(u-l));x>0&&h>0&&(s.fillStyle="rgba(16, 185, 129, 0.06)",s.fillRect(d,u,x,h),s.strokeStyle="rgba(16, 185, 129, 0.5)",s.lineWidth=1.5,s.strokeRect(d,u,x,h))}catch(e){}},[eL,eD,et,el,ea,8]);ee.current=eO;let e_=(0,s.useCallback)(()=>{cancelAnimationFrame(Q.current),Q.current=requestAnimationFrame(()=>{eO()})},[eO]);(0,s.useEffect)(()=>{if(!ec||0===d.length)return;let e=setInterval(()=>{eO()},200);return()=>clearInterval(e)},[ec,d.length,eO]),(0,s.useEffect)(()=>{let e;let t=!0;return function n(){if(!t)return;let r=Date.now();(eL.some(e=>!!e._spawnTime&&r-e._spawnTime<500||!!e._removeTime&&r-e._removeTime<400||!!e._changedAt&&r-e._changedAt<800)||eD.some(e=>!!e._spawnTime&&r-e._spawnTime<500||!!e._removeTime&&r-e._removeTime<400))&&A(Z),e=requestAnimationFrame(n)}(),()=>{t=!1,cancelAnimationFrame(e)}},[eL,eD]);let eH=(0,s.useCallback)(e=>{let t=Z.current;if(!t)return;let n=e.currentTarget.getBoundingClientRect(),r=e.clientX-n.left,s=e.clientY-n.top,i=1/0,l=-1/0,a=1/0,o=-1/0;for(let e of eL)null!=e.x&&null!=e.y&&(e.x<i&&(i=e.x),e.x>l&&(l=e.x),e.y<a&&(a=e.y),e.y>o&&(o=e.y));let c=(l+=40)-(i-=40)||1,d=(o+=40)-(a-=40)||1,u=el-16,x=ea-16,h=Math.min(u/c,x/d),m=i+(r-(8+(u-c*h)/2))/h,p=a+(s-(8+(x-d*h)/2))/h;t.centerAt(m,p,300)},[eL,el,ea,8]);return(0,r.jsxs)("div",{ref:$,className:"w-full h-full relative","data-tutorial":"graph",children:[(0,r.jsxs)("div",{className:"absolute top-3 left-3 sm:top-4 sm:left-4 z-10 flex flex-col gap-1.5 sm:gap-2",children:[(0,r.jsx)("div",{className:"flex items-start gap-1.5 sm:gap-2",children:(0,r.jsxs)("div",{className:"flex bg-white/90 backdrop-blur-sm rounded-lg border border-zinc-200 shadow-sm overflow-hidden","data-tutorial":"layouts",children:[(0,r.jsx)("button",{onClick:()=>ex("force"),className:"px-3 py-1.5 text-xs font-medium transition-colors ".concat("force"===eu?"bg-emerald-500 text-white":"text-zinc-500 hover:text-zinc-700 hover:bg-zinc-50"),children:(0,r.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,r.jsxs)("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,r.jsx)("circle",{cx:"4",cy:"4",r:"1.5",fill:"currentColor",stroke:"none"}),(0,r.jsx)("circle",{cx:"12",cy:"3",r:"1.5",fill:"currentColor",stroke:"none"}),(0,r.jsx)("circle",{cx:"8",cy:"8",r:"1.5",fill:"currentColor",stroke:"none"}),(0,r.jsx)("circle",{cx:"3",cy:"12",r:"1.5",fill:"currentColor",stroke:"none"}),(0,r.jsx)("circle",{cx:"13",cy:"11",r:"1.5",fill:"currentColor",stroke:"none"}),(0,r.jsx)("line",{x1:"4",y1:"4",x2:"8",y2:"8",strokeOpacity:"0.5"}),(0,r.jsx)("line",{x1:"12",y1:"3",x2:"8",y2:"8",strokeOpacity:"0.5"}),(0,r.jsx)("line",{x1:"3",y1:"12",x2:"8",y2:"8",strokeOpacity:"0.5"}),(0,r.jsx)("line",{x1:"13",y1:"11",x2:"8",y2:"8",strokeOpacity:"0.5"})]}),(0,r.jsx)("span",{className:"hidden sm:inline",children:"Force"})]})}),(0,r.jsx)("div",{className:"w-px bg-zinc-200"}),(0,r.jsx)("button",{onClick:()=>ex("dag"),className:"px-3 py-1.5 text-xs font-medium transition-colors ".concat("dag"===eu?"bg-emerald-500 text-white":"text-zinc-500 hover:text-zinc-700 hover:bg-zinc-50"),children:(0,r.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,r.jsxs)("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,r.jsx)("circle",{cx:"8",cy:"2.5",r:"1.5",fill:"currentColor",stroke:"none"}),(0,r.jsx)("circle",{cx:"4",cy:"8",r:"1.5",fill:"currentColor",stroke:"none"}),(0,r.jsx)("circle",{cx:"12",cy:"8",r:"1.5",fill:"currentColor",stroke:"none"}),(0,r.jsx)("circle",{cx:"2",cy:"13.5",r:"1.5",fill:"currentColor",stroke:"none"}),(0,r.jsx)("circle",{cx:"6",cy:"13.5",r:"1.5",fill:"currentColor",stroke:"none"}),(0,r.jsx)("circle",{cx:"12",cy:"13.5",r:"1.5",fill:"currentColor",stroke:"none"}),(0,r.jsx)("line",{x1:"8",y1:"4",x2:"4",y2:"6.5",strokeOpacity:"0.5"}),(0,r.jsx)("line",{x1:"8",y1:"4",x2:"12",y2:"6.5",strokeOpacity:"0.5"}),(0,r.jsx)("line",{x1:"4",y1:"9.5",x2:"2",y2:"12",strokeOpacity:"0.5"}),(0,r.jsx)("line",{x1:"4",y1:"9.5",x2:"6",y2:"12",strokeOpacity:"0.5"}),(0,r.jsx)("line",{x1:"12",y1:"9.5",x2:"12",y2:"12",strokeOpacity:"0.5"})]}),(0,r.jsx)("span",{className:"hidden sm:inline",children:"DAG"})]})}),(0,r.jsx)("div",{className:"w-px bg-zinc-200"}),(0,r.jsx)("button",{onClick:()=>ex("radial"),className:"px-3 py-1.5 text-xs font-medium transition-colors ".concat("radial"===eu?"bg-emerald-500 text-white":"text-zinc-500 hover:text-zinc-700 hover:bg-zinc-50"),children:(0,r.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,r.jsxs)("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,r.jsx)("circle",{cx:"8",cy:"8",r:"2",fill:"currentColor",stroke:"none"}),(0,r.jsx)("circle",{cx:"8",cy:"8",r:"5",fill:"none",strokeOpacity:"0.5"}),(0,r.jsx)("circle",{cx:"8",cy:"8",r:"7.5",fill:"none",strokeOpacity:"0.3"})]}),(0,r.jsx)("span",{className:"hidden sm:inline",children:"Radial"})]})}),(0,r.jsx)("div",{className:"w-px bg-zinc-200"}),(0,r.jsx)("button",{onClick:()=>ex("cluster"),className:"px-3 py-1.5 text-xs font-medium transition-colors ".concat("cluster"===eu?"bg-emerald-500 text-white":"text-zinc-500 hover:text-zinc-700 hover:bg-zinc-50"),children:(0,r.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,r.jsxs)("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,r.jsx)("circle",{cx:"3.5",cy:"4",r:"1.5",fill:"currentColor",stroke:"none"}),(0,r.jsx)("circle",{cx:"6",cy:"6",r:"1.5",fill:"currentColor",stroke:"none"}),(0,r.jsx)("circle",{cx:"3",cy:"7",r:"1.5",fill:"currentColor",stroke:"none"}),(0,r.jsx)("circle",{cx:"11",cy:"10",r:"1.5",fill:"currentColor",stroke:"none"}),(0,r.jsx)("circle",{cx:"13.5",cy:"11.5",r:"1.5",fill:"currentColor",stroke:"none"}),(0,r.jsx)("circle",{cx:"11",cy:"13",r:"1.5",fill:"currentColor",stroke:"none"})]}),(0,r.jsx)("span",{className:"hidden sm:inline",children:"Cluster"})]})}),(0,r.jsx)("div",{className:"w-px bg-zinc-200"}),(0,r.jsx)("button",{onClick:()=>ex("spread"),className:"px-3 py-1.5 text-xs font-medium transition-colors ".concat("spread"===eu?"bg-emerald-500 text-white":"text-zinc-500 hover:text-zinc-700 hover:bg-zinc-50"),children:(0,r.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,r.jsxs)("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,r.jsx)("circle",{cx:"2",cy:"2",r:"1.5",fill:"currentColor",stroke:"none"}),(0,r.jsx)("circle",{cx:"14",cy:"3",r:"1.5",fill:"currentColor",stroke:"none"}),(0,r.jsx)("circle",{cx:"8",cy:"8",r:"1.5",fill:"currentColor",stroke:"none"}),(0,r.jsx)("circle",{cx:"3",cy:"14",r:"1.5",fill:"currentColor",stroke:"none"}),(0,r.jsx)("circle",{cx:"13",cy:"13",r:"1.5",fill:"currentColor",stroke:"none"})]}),(0,r.jsx)("span",{className:"hidden sm:inline",children:"Spread"})]})})]})}),(0,r.jsxs)("div",{className:"flex items-start gap-1.5 sm:gap-2","data-tutorial":"view-controls",children:[(_||H)&&(0,r.jsx)("button",{onClick:O&&O.size>0?H:_,className:"flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-white/90 backdrop-blur-sm rounded-lg border border-zinc-200 shadow-sm text-zinc-500 hover:text-zinc-700 hover:bg-zinc-50 transition-colors",children:O&&O.size>0?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 24 24",fill:"none",strokeWidth:1.5,stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"})}),(0,r.jsx)("span",{className:"hidden sm:inline",children:"Expand all"})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 24 24",fill:"none",strokeWidth:1.5,stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 9V4.5M9 9H4.5M9 9 3.75 3.75M9 15v4.5M9 15H4.5M9 15l-5.25 5.25M15 9h4.5M15 9V4.5M15 9l5.25-5.25M15 15h4.5M15 15v4.5m0-4.5 5.25 5.25"})}),(0,r.jsx)("span",{className:"hidden sm:inline",children:"Collapse all"})]})}),(0,r.jsxs)("button",{onClick:()=>em(e=>!e),className:"flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium backdrop-blur-sm rounded-lg border shadow-sm transition-colors ".concat(eh?"bg-emerald-500 text-white border-emerald-500":"bg-white/90 text-zinc-500 border-zinc-200 hover:text-zinc-700 hover:bg-zinc-50"),title:eh?"Hide cluster labels":"Show cluster labels",children:[(0,r.jsxs)("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,r.jsx)("circle",{cx:"8",cy:"8",r:"6",strokeDasharray:"2.5 2",strokeOpacity:eh?1:.5}),(0,r.jsx)("line",{x1:"5",y1:"8",x2:"11",y2:"8",strokeOpacity:eh?1:.4}),(0,r.jsx)("line",{x1:"6",y1:"10",x2:"10",y2:"10",strokeOpacity:eh?.6:.25,strokeWidth:"1"})]}),(0,r.jsx)("span",{className:"hidden sm:inline",children:"Clusters"})]}),(0,r.jsxs)("button",{onClick:()=>null==q?void 0:q(),className:"flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium backdrop-blur-sm rounded-lg border shadow-sm transition-colors ".concat(Y?"bg-emerald-500 text-white border-emerald-500":"bg-white/90 text-zinc-500 border-zinc-200 hover:text-zinc-700 hover:bg-zinc-50"),title:Y?"Auto-fit enabled: camera adjusts after updates":"Auto-fit disabled: camera stays fixed",children:[(0,r.jsxs)("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:[(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 3.75H6A2.25 2.25 0 003.75 6v1.5M16.5 3.75H18A2.25 2.25 0 0120.25 6v1.5M20.25 16.5V18A2.25 2.25 0 0118 20.25h-1.5M3.75 16.5V18A2.25 2.25 0 006 20.25h1.5"}),(0,r.jsx)("circle",{cx:"12",cy:"12",r:"3"})]}),(0,r.jsx)("span",{className:"hidden sm:inline",children:"Auto-fit"})]}),(0,r.jsxs)("button",{onClick:()=>null==G?void 0:G(),className:"flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium backdrop-blur-sm rounded-lg border shadow-sm transition-colors ".concat(K?"bg-emerald-500 text-white border-emerald-500":"bg-white/90 text-zinc-500 border-zinc-200 hover:text-zinc-700 hover:bg-zinc-50"),title:K?"Pulse enabled: ripple highlights most recent activity":"Pulse disabled: no activity highlight",children:[(0,r.jsxs)("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"3"}),(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.07 4.93A10 10 0 014.93 19.07M4.93 4.93a10 10 0 0114.14 14.14",strokeOpacity:"0.5"}),(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.24 7.76a6 6 0 01.01 8.49M7.76 7.76a6 6 0 000 8.49",strokeOpacity:"0.7"})]}),(0,r.jsx)("span",{className:"hidden sm:inline",children:"Pulse"})]})]})]}),!W&&(0,r.jsxs)("div",{className:"absolute bottom-4 z-10 bg-white/90 backdrop-blur-sm rounded-lg border border-zinc-200 shadow-sm px-3 py-2 text-xs text-zinc-400 transition-[right] duration-300 ease-out","data-tutorial":"legend",style:{right:R?"calc(360px + 1rem)":"1rem",maxWidth:320},children:[F&&(0,r.jsxs)("div",{className:"text-zinc-500 mb-1.5",children:[(0,r.jsx)("strong",{className:"text-zinc-700",children:F.total})," issues"," \xb7 ",(0,r.jsx)("strong",{className:"text-zinc-700",children:F.edges})," deps"," \xb7 ",(0,r.jsx)("strong",{className:"text-emerald-600",children:F.prefixes.length}),1===F.prefixes.length?" project":" projects"]}),(0,r.jsx)("div",{className:"hidden sm:flex bg-zinc-100 rounded-md overflow-hidden mb-1.5",children:["status","priority","owner","assignee","prefix"].map(e=>(0,r.jsx)("button",{onClick:()=>null==V?void 0:V(e),className:"flex-1 px-2 py-1 text-[10px] font-medium transition-colors ".concat(U===e?"bg-emerald-500 text-white":"text-zinc-500 hover:text-zinc-700 hover:bg-zinc-200/60"),children:i[e]},e))}),(0,r.jsx)("div",{className:"hidden sm:flex flex-wrap gap-x-3 gap-y-1 mb-1.5",children:"status"===U?(0,r.jsx)(r.Fragment,{children:["open","in_progress","blocked","deferred","closed"].map(e=>(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[(0,r.jsx)("span",{className:"w-2 h-2 rounded-full",style:{backgroundColor:l[e]}}),(0,r.jsx)("span",{className:"text-zinc-500",children:a[e]})]},e))}):"priority"===U?(0,r.jsx)(r.Fragment,{children:[0,1,2,3,4].map(e=>(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[(0,r.jsx)("span",{className:"w-2 h-2 rounded-full",style:{backgroundColor:c[e]}}),(0,r.jsx)("span",{className:"text-zinc-500",children:o[e]})]},e))}):(0,r.jsx)(r.Fragment,{children:eA.map(e=>{let{label:t,color:n}=e;return(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[(0,r.jsx)("span",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:n}}),(0,r.jsx)("span",{className:"text-zinc-500 truncate max-w-[80px]",children:t})]},t)})})}),(0,r.jsx)("div",{className:"hidden sm:flex flex-col gap-0.5 text-zinc-400",children:(0,r.jsxs)("span",{children:["Size = importance \xb7 Ring = project","status"!==U&&" \xb7 Fill = ".concat(i[U].toLowerCase())]})}),(0,r.jsx)("span",{className:"sm:hidden",children:"Tap a node for details"})]}),(0,r.jsxs)("div",{className:"hidden sm:block absolute bottom-4 left-4 z-10","data-tutorial":"minimap",style:{width:el,height:ea},children:[(0,r.jsx)("canvas",{ref:J,width:el,height:ea,onClick:eH,className:"rounded-lg border border-zinc-200 shadow-sm cursor-crosshair",style:{width:el,height:ea}}),(0,r.jsx)("div",{className:"absolute top-0 left-2 right-2 h-1.5 cursor-n-resize hover:bg-zinc-300/40 rounded-t-lg transition-colors",onMouseDown:e=>{e.preventDefault(),e.stopPropagation(),eo.current={edge:"top",startX:e.clientX,startY:e.clientY,startW:el,startH:ea};let t=e=>{if(!eo.current)return;let t=eo.current.startY-e.clientY,n=Math.max(80,Math.min(400,eo.current.startH+t));ei(e=>({...e,h:n}))},n=()=>{eo.current=null,window.removeEventListener("mousemove",t),window.removeEventListener("mouseup",n)};window.addEventListener("mousemove",t),window.addEventListener("mouseup",n)}}),(0,r.jsx)("div",{className:"absolute top-2 right-0 bottom-2 w-1.5 cursor-e-resize hover:bg-zinc-300/40 rounded-r-lg transition-colors",onMouseDown:e=>{e.preventDefault(),e.stopPropagation(),eo.current={edge:"right",startX:e.clientX,startY:e.clientY,startW:el,startH:ea};let t=e=>{if(!eo.current)return;let t=e.clientX-eo.current.startX,n=Math.max(100,Math.min(500,eo.current.startW+t));ei(e=>({...e,w:n}))},n=()=>{eo.current=null,window.removeEventListener("mousemove",t),window.removeEventListener("mouseup",n)};window.addEventListener("mousemove",t),window.addEventListener("mouseup",n)}}),(0,r.jsx)("div",{className:"absolute top-0 right-0 w-3 h-3 cursor-ne-resize hover:bg-zinc-300/40 rounded-tr-lg transition-colors",onMouseDown:e=>{e.preventDefault(),e.stopPropagation(),eo.current={edge:"top-right",startX:e.clientX,startY:e.clientY,startW:el,startH:ea};let t=e=>{if(!eo.current)return;let t=e.clientX-eo.current.startX,n=eo.current.startY-e.clientY;ei({w:Math.max(100,Math.min(500,eo.current.startW+t)),h:Math.max(80,Math.min(400,eo.current.startH+n))})},n=()=>{eo.current=null,window.removeEventListener("mousemove",t),window.removeEventListener("mouseup",n)};window.addEventListener("mousemove",t),window.addEventListener("mouseup",n)}})]}),ec?(0,r.jsx)(ec,{ref:Z,graphData:eI,width:et.width,height:et.height,nodeCanvasObject:eB,nodeCanvasObjectMode:()=>"replace",nodePointerAreaPaint:eF,onRenderFramePost:eW,linkCanvasObject:eP,linkCanvasObjectMode:()=>"replace",linkDirectionalParticles:e=>"parent-child"===e.type?0:2,linkDirectionalParticleSpeed:.004,linkDirectionalParticleWidth:2.5,linkDirectionalParticleColor:()=>"#10b981",dagMode:"dag"===eu?"td":void 0,dagLevelDistance:60,onDagError:eR,d3AlphaDecay:.02,d3VelocityDecay:.3,cooldownTicks:300,warmupTicks:50,onNodeClick:e=>f(e),onNodeHover:e=>g(e||null,eC.current.x,eC.current.y),onNodeRightClick:(e,t)=>{t.preventDefault(),null==T||T(e,t)},onBackgroundClick:M,onZoom:e_,backgroundColor:"transparent",autoPauseRedraw:!(K&&X)}):(0,r.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,r.jsx)("div",{className:"text-zinc-400 text-sm animate-pulse-soft",children:"Loading graph engine..."})})]})});function E(e,t){return e.length<=t?e:e.slice(0,t-1)+"…"}var I=n(5777),B=n(7827),P=n(1720);function W(e){let t=new Date(e),n=Math.floor((new Date().getTime()-t.getTime())/1e3);if(n<60)return"just now";let r=Math.floor(n/60);if(r<60)return"".concat(r,"m ago");let s=Math.floor(r/60);if(s<24)return"".concat(s,"h ago");let i=Math.floor(s/24);return i<7?"".concat(i,"d ago"):t.toLocaleDateString("en-US",{month:"short",day:"numeric"})}function F(e,t){let n=[];return n.push("[".concat(x(e.prefix),"] ").concat(e.id)),t&&n.push(t),n.push(""),n.push(e.description||""),n.join("\n")}function R(e){let{node:t,onClose:n,repoUrl:i}=e,[l,a]=(0,s.useState)(!1);return t.description?(0,P.createPortal)((0,r.jsx)("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/40 backdrop-blur-sm",onClick:n,children:(0,r.jsxs)("div",{className:"bg-white rounded-xl shadow-2xl w-[90vw] max-w-2xl max-h-[80vh] flex flex-col",onClick:e=>e.stopPropagation(),children:[(0,r.jsxs)("div",{className:"flex items-center justify-between px-5 py-3 border-b border-zinc-100",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,r.jsx)("span",{className:"text-xs font-mono font-semibold text-emerald-600 shrink-0",children:t.id}),(0,r.jsx)("span",{className:"text-sm font-semibold text-zinc-900 truncate",children:t.title})]}),(0,r.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:[(0,r.jsx)("button",{onClick:()=>{t.description&&navigator.clipboard.writeText(F(t,i)).then(()=>{a(!0),setTimeout(()=>a(!1),1500)})},className:"p-1 text-zinc-400 hover:text-zinc-600 transition-colors",title:"Copy description",children:l?(0,r.jsx)("svg",{className:"w-4 h-4 text-emerald-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})}):(0,r.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.666 3.888A2.25 2.25 0 0 0 13.5 2.25h-3c-1.03 0-1.9.693-2.166 1.638m7.332 0c.055.194.084.4.084.612v0a.75.75 0 0 1-.75.75H9.75a.75.75 0 0 1-.75-.75v0c0-.212.03-.418.084-.612m7.332 0c.646.049 1.288.11 1.927.184 1.1.128 1.907 1.077 1.907 2.185V19.5a2.25 2.25 0 0 1-2.25 2.25H6.75A2.25 2.25 0 0 1 4.5 19.5V6.257c0-1.108.806-2.057 1.907-2.185a48.208 48.208 0 0 1 1.927-.184"})})}),(0,r.jsx)("button",{onClick:n,className:"p-1 text-zinc-400 hover:text-zinc-600 transition-colors",children:(0,r.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]})]}),(0,r.jsx)("div",{className:"flex-1 overflow-y-auto px-5 py-4 custom-scrollbar description-markdown text-sm text-zinc-700 leading-relaxed",children:(0,r.jsx)(I.UG,{remarkPlugins:[B.Z],children:t.description})})]})}),document.body):null}function O(e){let{className:t="w-3 h-3",filled:n=!1}=e;return n?(0,r.jsx)("svg",{className:t,viewBox:"0 0 24 24",fill:"currentColor",children:(0,r.jsx)("path",{d:"M11.645 20.91l-.007-.003-.022-.012a15.247 15.247 0 01-.383-.218 25.18 25.18 0 01-4.244-3.17C4.688 15.36 2.25 12.174 2.25 8.25 2.25 5.322 4.714 3 7.688 3A5.5 5.5 0 0112 5.052 5.5 5.5 0 0116.313 3c2.973 0 5.437 2.322 5.437 5.25 0 3.925-2.438 7.111-4.739 9.256a25.175 25.175 0 01-4.244 3.17 15.247 15.247 0 01-.383.219l-.022.012-.007.004-.003.001a.752.752 0 01-.704 0l-.003-.001z"})}):(0,r.jsx)("svg",{className:t,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 8.25c0-2.485-2.099-4.5-4.688-4.5-1.935 0-3.597 1.126-4.312 2.733-.715-1.607-2.377-2.733-4.313-2.733C5.1 3.75 3 5.765 3 8.25c0 7.22 9 12 9 12s9-4.78 9-12z"})})}function _(e){let{node:t,allNodes:n,onNodeNavigate:i,comments:d,onPostComment:x,onDeleteComment:h,onLikeComment:f,onReplyComment:g,isAuthenticated:v,currentDid:b,repoUrls:j}=e,[y,w]=(0,s.useState)(null),[k,N]=(0,s.useState)(""),[z,C]=(0,s.useState)(!1),[M,S]=(0,s.useState)(!1),[L,D]=(0,s.useState)(!1),A=e=>{w(e.uri),N("")},T=()=>{w(null),N("")},E=async()=>{if(k.trim()&&y&&g){C(!0);try{let e=t=>{for(let n of t){if(n.uri===y)return n;let t=e(n.replies);if(t)return t}},t=d?e(d):void 0;t&&await g(t,k.trim()),w(null),N("")}catch(e){console.error("Failed to post reply:",e)}finally{C(!1)}}};if(!t)return(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,r.jsx)("div",{className:"w-12 h-12 rounded-full bg-zinc-100 flex items-center justify-center mb-4",children:(0,r.jsx)("svg",{className:"w-6 h-6 text-zinc-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M15 15l-2 5L9 9l11 4-5 2zm0 0l5 5M7.188 2.239l.777 2.897M5.136 7.965l-2.898-.777M13.95 4.05l-2.122 2.122m-5.657 5.656l-2.12 2.122"})})}),(0,r.jsx)("p",{className:"text-sm text-zinc-500 leading-relaxed",children:"Click a node to see details"}),(0,r.jsx)("p",{className:"text-xs text-zinc-400 mt-1",children:"Hover to highlight connections"})]});let P=u[t.issueType]||"\uD83D\uDCCB",W=l[t.status]||l.open,O=a[t.status]||t.status,_=o[t.priority]||"P".concat(t.priority),H=c[t.priority]||"#a1a1aa",X=m[t.prefix]||t.prefix,K=p[t.prefix]||"#a1a1aa",G=null==j?void 0:j[t.prefix],Z=t.blockerIds.map(e=>n.find(t=>t.id===e)).filter(Boolean),$=t.dependentIds.map(e=>n.find(t=>t.id===e)).filter(Boolean),J=e=>{try{let t=new Date(e),n=t.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),r=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!1});return"".concat(n," at ").concat(r)}catch(t){return e}};return(0,r.jsxs)("div",{className:"animate-fade-in",children:[(0,r.jsxs)("div",{className:"flex items-start gap-3 mb-4",children:[(0,r.jsx)("span",{className:"text-2xl mt-0.5",children:P}),(0,r.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,r.jsx)("div",{className:"flex items-center gap-2",children:(0,r.jsx)("span",{className:"text-xs font-mono font-semibold text-emerald-600",children:t.id})}),(0,r.jsx)("h3",{className:"text-sm font-semibold text-zinc-900 mt-1 leading-snug",children:t.title})]})]}),(0,r.jsxs)("div",{className:"flex flex-wrap gap-2 mb-4",children:[(0,r.jsxs)("span",{className:"status-badge",style:{backgroundColor:W+"18",color:W,border:"1px solid ".concat(W,"30")},children:[(0,r.jsx)("span",{className:"w-1.5 h-1.5 rounded-full mr-1.5",style:{backgroundColor:W}}),O]}),(0,r.jsx)("span",{className:"status-badge",style:{backgroundColor:H+"15",color:H,border:"1px solid ".concat(H,"25")},children:_}),G?(0,r.jsxs)("a",{href:G,target:"_blank",rel:"noopener noreferrer",className:"status-badge hover:opacity-80 transition-opacity",style:{backgroundColor:K+"15",color:K,border:"1px solid ".concat(K,"25"),textDecoration:"none"},children:[X,(0,r.jsx)("svg",{className:"w-2.5 h-2.5 ml-1 opacity-50",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"})})]}):(0,r.jsx)("span",{className:"status-badge",style:{backgroundColor:K+"15",color:K,border:"1px solid ".concat(K,"25")},children:X})]}),G&&(0,r.jsx)("div",{className:"mb-4",children:(0,r.jsxs)("a",{href:G,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 text-[11px] text-zinc-400 hover:text-zinc-600 transition-colors",children:[(0,r.jsx)("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 16 16",fill:"currentColor",children:(0,r.jsx)("path",{d:"M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"})}),G.replace(/^https?:\/\//,"")]})}),(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-3 mb-4",children:[(0,r.jsx)(U,{label:"Blocks",value:t.blockerCount,color:t.blockerCount>0?"#f59e0b":void 0}),(0,r.jsx)(U,{label:"Blocked by",value:t.dependentCount,color:t.dependentCount>0?"#ef4444":void 0})]}),(0,r.jsxs)("div",{className:"space-y-1.5 mb-4 text-xs text-zinc-500",children:[(0,r.jsxs)("div",{className:"flex justify-between",children:[(0,r.jsx)("span",{children:"Created"}),(0,r.jsx)("span",{className:"text-zinc-700 font-medium",children:J(t.createdAt)})]}),(0,r.jsxs)("div",{className:"flex justify-between",children:[(0,r.jsx)("span",{children:"Updated"}),(0,r.jsx)("span",{className:"text-zinc-700 font-medium",children:J(t.updatedAt)})]}),t.closedAt&&(0,r.jsxs)("div",{className:"flex justify-between",children:[(0,r.jsx)("span",{children:"Closed"}),(0,r.jsx)("span",{className:"text-zinc-700 font-medium",children:J(t.closedAt)})]}),t.closeReason&&(0,r.jsxs)("div",{className:"flex justify-between",children:[(0,r.jsx)("span",{children:"Reason"}),(0,r.jsx)("span",{className:"text-zinc-700 font-medium truncate ml-2",children:t.closeReason})]}),t.owner&&(0,r.jsxs)("div",{className:"flex justify-between",children:[(0,r.jsx)("span",{children:"Owner"}),(0,r.jsx)("span",{className:"text-zinc-700 font-medium truncate ml-2",children:t.owner})]})]}),t.description&&(0,r.jsxs)("div",{className:"mb-4",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,r.jsx)("h4",{className:"text-xs font-semibold text-zinc-500 uppercase tracking-wider",children:"Description"}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("button",{onClick:()=>{if(!t.description)return;let e=null==j?void 0:j[t.prefix];navigator.clipboard.writeText(F(t,e)).then(()=>{D(!0),setTimeout(()=>D(!1),1500)})},className:"text-zinc-400 hover:text-zinc-600 transition-colors",title:"Copy description",children:L?(0,r.jsx)("svg",{className:"w-3.5 h-3.5 text-emerald-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})}):(0,r.jsx)("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.666 3.888A2.25 2.25 0 0 0 13.5 2.25h-3c-1.03 0-1.9.693-2.166 1.638m7.332 0c.055.194.084.4.084.612v0a.75.75 0 0 1-.75.75H9.75a.75.75 0 0 1-.75-.75v0c0-.212.03-.418.084-.612m7.332 0c.646.049 1.288.11 1.927.184 1.1.128 1.907 1.077 1.907 2.185V19.5a2.25 2.25 0 0 1-2.25 2.25H6.75A2.25 2.25 0 0 1 4.5 19.5V6.257c0-1.108.806-2.057 1.907-2.185a48.208 48.208 0 0 1 1.927-.184"})})}),(0,r.jsx)("button",{onClick:()=>S(!0),className:"text-[10px] text-zinc-400 hover:text-zinc-600 transition-colors",children:"View in window"})]})]}),(0,r.jsx)("div",{className:"text-xs text-zinc-600 leading-relaxed bg-zinc-50 rounded-lg p-3 max-h-40 overflow-y-auto custom-scrollbar border border-zinc-100 description-markdown",children:(0,r.jsx)(I.UG,{remarkPlugins:[B.Z],children:t.description})})]}),M&&t.description&&(0,r.jsx)(R,{node:t,onClose:()=>S(!1),repoUrl:null==j?void 0:j[t.prefix]}),Z.length>0&&(0,r.jsxs)("div",{className:"mb-4",children:[(0,r.jsxs)("h4",{className:"text-xs font-semibold text-zinc-500 uppercase tracking-wider mb-2",children:["Blocks (",Z.length,")"]}),(0,r.jsx)("div",{className:"space-y-1",children:Z.map(e=>(0,r.jsx)(V,{node:e,onClick:()=>i(e.id)},e.id))})]}),$.length>0&&(0,r.jsxs)("div",{className:"mb-4",children:[(0,r.jsxs)("h4",{className:"text-xs font-semibold text-zinc-500 uppercase tracking-wider mb-2",children:["Blocked by (",$.length,")"]}),(0,r.jsx)("div",{className:"space-y-1",children:$.map(e=>(0,r.jsx)(V,{node:e,onClick:()=>i(e.id)},e.id))})]}),(0,r.jsxs)("div",{className:"mb-4",children:[(0,r.jsxs)("h4",{className:"text-xs font-semibold text-zinc-500 uppercase tracking-wider mb-2",children:["Comments"," ",d&&d.length>0&&(0,r.jsx)("span",{className:"ml-1 px-1.5 py-0.5 bg-emerald-50 text-emerald-600 rounded-full text-[10px] font-medium",children:d.length})]}),d&&d.length>0?(0,r.jsx)("div",{className:"space-y-1",children:d.map(e=>(0,r.jsx)(Y,{comment:e,currentDid:b,isAuthenticated:v,onDelete:h,onLike:f,onStartReply:A,replyingToUri:y,replyText:k,onReplyTextChange:N,onSubmitReply:E,onCancelReply:T,isSubmittingReply:z,depth:0},e.uri))}):(0,r.jsx)("p",{className:"text-xs text-zinc-400 italic",children:"No comments yet"}),v&&x?(0,r.jsx)(q,{onSubmit:x}):v?null:(0,r.jsx)("p",{className:"text-xs text-zinc-400 mt-2",children:"Sign in to leave a comment"})]})]})}function H(e){let{replyingTo:t,replyText:n,onTextChange:s,onSubmit:i,onCancel:l,isSubmitting:a}=e;return(0,r.jsxs)("div",{className:"mt-2 ml-4 pl-3 border-l border-emerald-200 space-y-1.5",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5 text-[10px] text-zinc-400",children:[(0,r.jsx)("span",{children:"Replying to"}),(0,r.jsx)("a",{href:"https://www.impactindexer.org/data?did=".concat(t.did),target:"_blank",rel:"noopener noreferrer",className:"font-medium text-zinc-600 hover:text-emerald-600 transition-colors",children:t.displayName||t.handle})]}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)("input",{type:"text",value:n,onChange:e=>s(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||i()},placeholder:"Write a reply...",disabled:a,autoFocus:!0,className:"flex-1 px-2 py-1 text-xs bg-white border border-zinc-200 rounded placeholder-zinc-400 focus:outline-none focus:border-emerald-400 disabled:opacity-50"}),(0,r.jsx)("button",{onClick:i,disabled:!n.trim()||a,className:"px-2 py-1 text-[10px] font-medium text-emerald-600 hover:text-emerald-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:a?"...":"Reply"}),(0,r.jsx)("button",{onClick:l,disabled:a,className:"px-2 py-1 text-[10px] text-zinc-400 hover:text-zinc-600 disabled:opacity-50 transition-colors",children:"Cancel"})]})]})}function U(e){let{label:t,value:n,color:s}=e;return(0,r.jsxs)("div",{className:"bg-zinc-50 rounded-lg p-3 border border-zinc-100",children:[(0,r.jsx)("div",{className:"text-xl font-bold",style:{color:s||"#3f3f46"},children:n}),(0,r.jsx)("div",{className:"text-[10px] text-zinc-400 uppercase tracking-wider mt-0.5",children:t})]})}function V(e){let{node:t,onClick:n}=e,s=l[t.status]||l.open;return(0,r.jsxs)("button",{onClick:n,className:"w-full flex items-center gap-2 px-2.5 py-1.5 rounded-md hover:bg-zinc-50 transition-colors text-left group border border-transparent hover:border-zinc-200",children:[(0,r.jsx)("span",{className:"w-2 h-2 rounded-full shrink-0",style:{backgroundColor:s}}),(0,r.jsx)("span",{className:"text-xs font-mono text-emerald-600 group-hover:text-emerald-700 shrink-0",children:t.id}),(0,r.jsx)("span",{className:"text-xs text-zinc-500 truncate",children:t.title})]})}function Y(e){let{comment:t,currentDid:n,isAuthenticated:i,onDelete:l,onLike:a,onStartReply:o,replyingToUri:c,replyText:d,onReplyTextChange:u,onSubmitReply:x,onCancelReply:h,isSubmittingReply:m,depth:p}=e,[f,g]=(0,s.useState)(!1),[v,b]=(0,s.useState)(!1),j=n&&n===t.did,y=!!n&&t.likes.some(e=>e.did===n),w=c===t.uri,k=async()=>{if(l&&!f){g(!0);try{await l(t)}catch(e){console.error("Failed to delete comment:",e)}finally{g(!1)}}},N=async()=>{if(a&&!v){b(!0);try{await a(t)}catch(e){console.error("Failed to toggle like:",e)}finally{b(!1)}}};return(0,r.jsxs)("div",{className:"".concat(p>0?"ml-4 pl-3 border-l border-zinc-100":""),children:[(0,r.jsxs)("div",{className:"py-2",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5 mb-1",children:[(0,r.jsx)("div",{className:"shrink-0 w-4 h-4 rounded-full bg-zinc-100 overflow-hidden",children:t.avatar?(0,r.jsx)("img",{src:t.avatar,alt:"",className:"w-full h-full object-cover"}):(0,r.jsx)("div",{className:"w-full h-full flex items-center justify-center text-[8px] font-medium text-zinc-400",children:(t.handle||t.did).charAt(0).toUpperCase()})}),(0,r.jsx)("a",{href:"https://www.impactindexer.org/data?did=".concat(t.did),target:"_blank",rel:"noopener noreferrer",className:"text-xs font-medium text-zinc-600 truncate hover:text-emerald-600 transition-colors",children:t.displayName||t.handle||t.did.slice(0,16)+"..."}),(0,r.jsx)("span",{className:"text-[10px] text-zinc-300 shrink-0",children:W(t.createdAt)})]}),(0,r.jsx)("p",{className:"text-xs text-zinc-500 leading-relaxed whitespace-pre-wrap break-words",children:t.text}),(0,r.jsxs)("div",{className:"flex items-center gap-2 mt-1 text-[10px]",children:[(0,r.jsxs)("button",{onClick:N,disabled:!i||v,className:"flex items-center gap-0.5 transition-colors ".concat(y?"text-rose-500":"text-zinc-300 hover:text-rose-500"," disabled:opacity-50"),children:[(0,r.jsx)(O,{className:"w-3 h-3",filled:y}),t.likes.length>0&&(0,r.jsx)("span",{children:t.likes.length})]}),(0,r.jsx)("button",{onClick:()=>o(t),disabled:!i,className:"transition-colors disabled:opacity-50 ".concat(w?"text-emerald-500":"text-zinc-300 hover:text-zinc-500"),children:"reply"}),j&&l&&(0,r.jsx)("button",{onClick:k,disabled:f,className:"ml-auto shrink-0 text-zinc-300 hover:text-red-400 disabled:opacity-50 transition-colors",children:f?"...":"delete"})]})]}),w&&(0,r.jsx)(H,{replyingTo:t,replyText:d,onTextChange:u,onSubmit:x,onCancel:h,isSubmitting:m}),t.replies.length>0&&(0,r.jsx)("div",{children:t.replies.map(e=>(0,r.jsx)(Y,{comment:e,currentDid:n,isAuthenticated:i,onDelete:l,onLike:a,onStartReply:o,replyingToUri:c,replyText:d,onReplyTextChange:u,onSubmitReply:x,onCancelReply:h,isSubmittingReply:m,depth:p+1},e.uri))})]})}function q(e){let{onSubmit:t}=e,[n,i]=(0,s.useState)(""),[l,a]=(0,s.useState)(!1),o=async()=>{if(n.trim()&&!l){a(!0);try{await t(n.trim()),i("")}catch(e){console.error("Failed to post comment:",e)}finally{a(!1)}}};return(0,r.jsxs)("div",{className:"mt-3 space-y-2",children:[(0,r.jsx)("textarea",{value:n,onChange:e=>i(e.target.value),placeholder:"Leave a comment...",rows:2,className:"w-full px-2.5 py-1.5 text-xs border border-zinc-200 rounded-md bg-zinc-50 text-zinc-700 placeholder-zinc-400 resize-none focus:outline-none focus:ring-1 focus:ring-emerald-500 focus:border-emerald-500"}),(0,r.jsx)("button",{onClick:o,disabled:!n.trim()||l,className:"px-3 py-1 text-xs font-medium text-white bg-emerald-500 rounded-md hover:bg-emerald-600 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:l?"Sending...":"Comment"})]})}var X=n(7796);function K(){let{isAuthenticated:e,isLoading:t,session:n,login:i,logout:l}=(0,X.a)(),[a,o]=(0,s.useState)(!1),[c,d]=(0,s.useState)(!1),[u,x]=(0,s.useState)(""),[h,m]=(0,s.useState)(!1),[p,f]=(0,s.useState)(""),g=(0,s.useRef)(null);(0,s.useEffect)(()=>{if(!c)return;let e=e=>{g.current&&!g.current.contains(e.target)&&d(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[c]);let v=async e=>{if(e.preventDefault(),u.trim()){m(!0),f("");try{await i(u.trim())}catch(e){f(e instanceof Error?e.message:"Login failed"),m(!1)}}},b=async()=>{d(!1),await l()};return t?(0,r.jsx)("div",{className:"w-4 h-4 rounded-full border-2 border-zinc-200 border-t-zinc-400 animate-spin"}):e&&n?(0,r.jsxs)("div",{className:"relative",ref:g,children:[(0,r.jsxs)("button",{onClick:()=>d(e=>!e),className:"flex items-center gap-2 px-3 py-1.5 rounded-full hover:bg-zinc-50 transition-colors cursor-pointer",children:[n.avatar?(0,r.jsx)("img",{src:n.avatar,alt:n.handle,width:24,height:24,className:"rounded-full"}):(0,r.jsx)("div",{className:"w-6 h-6 rounded-full bg-emerald-100 flex items-center justify-center text-[11px] text-emerald-700 font-medium",children:(n.displayName||n.handle).charAt(0).toUpperCase()}),(0,r.jsx)("span",{className:"text-sm text-zinc-600 max-w-[100px] truncate",children:n.displayName||n.handle})]}),c&&(0,r.jsxs)("div",{className:"absolute right-0 top-full mt-2 w-44 bg-white rounded-xl shadow-xl border border-zinc-100 py-2 z-50",children:[(0,r.jsxs)("a",{href:n.did?"https://www.impactindexer.org/data?did=".concat(n.did):"#",target:"_blank",rel:"noopener noreferrer",className:"block px-3 py-1.5 text-xs text-zinc-400 truncate hover:text-emerald-600 transition-colors",children:["@",n.handle]}),(0,r.jsx)("div",{className:"h-px bg-zinc-100 my-1"}),(0,r.jsxs)("button",{onClick:b,className:"flex items-center gap-2 w-full px-3 py-1.5 text-xs text-zinc-600 hover:bg-zinc-50 transition-colors cursor-pointer",children:[(0,r.jsx)("svg",{className:"w-3.5 h-3.5 text-zinc-400",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 9V5.25A2.25 2.25 0 0 1 10.5 3h6a2.25 2.25 0 0 1 2.25 2.25v13.5A2.25 2.25 0 0 1 16.5 21h-6a2.25 2.25 0 0 1-2.25-2.25V15m-3 0-3-3m0 0 3-3m-3 3H15"})}),"Sign out"]})]})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{onClick:()=>o(!0),className:"px-4 py-1.5 text-sm font-medium text-zinc-600 rounded-full hover:text-zinc-900 hover:bg-zinc-50 transition-colors cursor-pointer whitespace-nowrap",children:"Sign in"}),a&&(0,r.jsxs)("div",{className:"fixed inset-0 z-50 flex items-start justify-center pt-[20vh]",onClick:()=>o(!1),children:[(0,r.jsx)("div",{className:"absolute inset-0 bg-black/20 backdrop-blur-sm"}),(0,r.jsxs)("div",{className:"relative w-full max-w-sm mx-4 bg-white rounded-xl shadow-lg border border-zinc-200 p-6",onClick:e=>e.stopPropagation(),children:[(0,r.jsx)("h2",{className:"text-lg font-semibold text-zinc-900 mb-1",children:"Sign in with ATProto"}),(0,r.jsx)("p",{className:"text-sm text-zinc-400 mb-5",children:"Enter your Bluesky handle to connect."}),(0,r.jsxs)("form",{onSubmit:v,children:[(0,r.jsx)("label",{htmlFor:"auth-handle",className:"block text-sm text-zinc-600 mb-1.5",children:"Handle"}),(0,r.jsx)("input",{id:"auth-handle",type:"text",value:u,onChange:e=>x(e.target.value),placeholder:"alice.bsky.social",disabled:h,autoFocus:!0,className:"w-full px-3 py-2 text-sm bg-white border border-zinc-200 rounded-lg placeholder:text-zinc-300 focus:outline-none focus:ring-2 focus:ring-emerald-500/30 focus:border-emerald-400 disabled:opacity-50 disabled:cursor-not-allowed"}),(0,r.jsx)("p",{className:"text-xs text-zinc-300 mt-1.5",children:"Just a username? We'll add .bsky.social for you."}),p&&(0,r.jsx)("p",{className:"text-sm text-red-500 mt-2",children:p}),(0,r.jsxs)("div",{className:"flex gap-2 mt-5",children:[(0,r.jsx)("button",{type:"button",onClick:()=>o(!1),disabled:h,className:"flex-1 px-3 py-2 text-sm text-zinc-600 bg-zinc-50 rounded-lg hover:bg-zinc-100 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:"Cancel"}),(0,r.jsx)("button",{type:"submit",disabled:h||!u.trim(),className:"flex-1 px-3 py-2 text-sm text-white bg-emerald-600 rounded-lg hover:bg-emerald-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:h?"Connecting...":"Connect"})]})]})]})]})]})}function G(e){let{className:t}=e;return(0,r.jsxs)("svg",{viewBox:"0 0 32 32",fill:"none",className:t,"aria-hidden":"true",children:[(0,r.jsx)("polygon",{points:"16,3 27,9.5 27,22.5 16,29 5,22.5 5,9.5",stroke:"currentColor",strokeWidth:"1.2",fill:"none",opacity:"0.7",strokeLinejoin:"round",children:(0,r.jsx)("animateTransform",{attributeName:"transform",type:"rotate",values:"0 16 16;360 16 16",dur:"40s",repeatCount:"indefinite"})}),(0,r.jsx)("polygon",{points:"16,8 22.5,11.5 22.5,20.5 16,24 9.5,20.5 9.5,11.5",stroke:"currentColor",strokeWidth:"0.8",fill:"none",opacity:"0.35",strokeLinejoin:"round",children:(0,r.jsx)("animateTransform",{attributeName:"transform",type:"rotate",values:"360 16 16;0 16 16",dur:"30s",repeatCount:"indefinite"})}),(0,r.jsx)("line",{x1:"16",y1:"16",x2:"16",y2:"3",stroke:"currentColor",strokeWidth:"0.6",opacity:"0.2",children:(0,r.jsx)("animate",{attributeName:"opacity",values:"0.15;0.35;0.15",dur:"3s",repeatCount:"indefinite"})}),(0,r.jsx)("line",{x1:"16",y1:"16",x2:"27",y2:"9.5",stroke:"currentColor",strokeWidth:"0.6",opacity:"0.2",children:(0,r.jsx)("animate",{attributeName:"opacity",values:"0.15;0.35;0.15",dur:"3s",repeatCount:"indefinite",begin:"0.5s"})}),(0,r.jsx)("line",{x1:"16",y1:"16",x2:"27",y2:"22.5",stroke:"currentColor",strokeWidth:"0.6",opacity:"0.2",children:(0,r.jsx)("animate",{attributeName:"opacity",values:"0.15;0.35;0.15",dur:"3s",repeatCount:"indefinite",begin:"1s"})}),(0,r.jsx)("line",{x1:"16",y1:"16",x2:"16",y2:"29",stroke:"currentColor",strokeWidth:"0.6",opacity:"0.2",children:(0,r.jsx)("animate",{attributeName:"opacity",values:"0.15;0.35;0.15",dur:"3s",repeatCount:"indefinite",begin:"1.5s"})}),(0,r.jsx)("line",{x1:"16",y1:"16",x2:"5",y2:"22.5",stroke:"currentColor",strokeWidth:"0.6",opacity:"0.2",children:(0,r.jsx)("animate",{attributeName:"opacity",values:"0.15;0.35;0.15",dur:"3s",repeatCount:"indefinite",begin:"2s"})}),(0,r.jsx)("line",{x1:"16",y1:"16",x2:"5",y2:"9.5",stroke:"currentColor",strokeWidth:"0.6",opacity:"0.2",children:(0,r.jsx)("animate",{attributeName:"opacity",values:"0.15;0.35;0.15",dur:"3s",repeatCount:"indefinite",begin:"2.5s"})}),(0,r.jsxs)("circle",{cx:"16",cy:"16",r:"2.5",fill:"currentColor",opacity:"0.8",children:[(0,r.jsx)("animate",{attributeName:"r",values:"2;3;2",dur:"3s",repeatCount:"indefinite"}),(0,r.jsx)("animate",{attributeName:"opacity",values:"0.7;1;0.7",dur:"3s",repeatCount:"indefinite"})]}),(0,r.jsxs)("circle",{cx:"16",cy:"3",r:"1.5",fill:"currentColor",opacity:"0.5",children:[(0,r.jsx)("animate",{attributeName:"r",values:"1.2;2;1.2",dur:"2.5s",repeatCount:"indefinite"}),(0,r.jsx)("animate",{attributeName:"opacity",values:"0.4;0.7;0.4",dur:"2.5s",repeatCount:"indefinite"})]}),(0,r.jsxs)("circle",{cx:"27",cy:"9.5",r:"1.5",fill:"currentColor",opacity:"0.5",children:[(0,r.jsx)("animate",{attributeName:"r",values:"1.2;2;1.2",dur:"2.5s",repeatCount:"indefinite",begin:"0.4s"}),(0,r.jsx)("animate",{attributeName:"opacity",values:"0.4;0.7;0.4",dur:"2.5s",repeatCount:"indefinite",begin:"0.4s"})]}),(0,r.jsxs)("circle",{cx:"27",cy:"22.5",r:"1.5",fill:"currentColor",opacity:"0.5",children:[(0,r.jsx)("animate",{attributeName:"r",values:"1.2;2;1.2",dur:"2.5s",repeatCount:"indefinite",begin:"0.8s"}),(0,r.jsx)("animate",{attributeName:"opacity",values:"0.4;0.7;0.4",dur:"2.5s",repeatCount:"indefinite",begin:"0.8s"})]}),(0,r.jsxs)("circle",{cx:"16",cy:"29",r:"1.5",fill:"currentColor",opacity:"0.5",children:[(0,r.jsx)("animate",{attributeName:"r",values:"1.2;2;1.2",dur:"2.5s",repeatCount:"indefinite",begin:"1.2s"}),(0,r.jsx)("animate",{attributeName:"opacity",values:"0.4;0.7;0.4",dur:"2.5s",repeatCount:"indefinite",begin:"1.2s"})]}),(0,r.jsxs)("circle",{cx:"5",cy:"22.5",r:"1.5",fill:"currentColor",opacity:"0.5",children:[(0,r.jsx)("animate",{attributeName:"r",values:"1.2;2;1.2",dur:"2.5s",repeatCount:"indefinite",begin:"1.6s"}),(0,r.jsx)("animate",{attributeName:"opacity",values:"0.4;0.7;0.4",dur:"2.5s",repeatCount:"indefinite",begin:"1.6s"})]}),(0,r.jsxs)("circle",{cx:"5",cy:"9.5",r:"1.5",fill:"currentColor",opacity:"0.5",children:[(0,r.jsx)("animate",{attributeName:"r",values:"1.2;2;1.2",dur:"2.5s",repeatCount:"indefinite",begin:"2s"}),(0,r.jsx)("animate",{attributeName:"opacity",values:"0.4;0.7;0.4",dur:"2.5s",repeatCount:"indefinite",begin:"2s"})]}),(0,r.jsxs)("circle",{cx:"16",cy:"16",r:"10",stroke:"currentColor",strokeWidth:"0.4",fill:"none",opacity:"0.15",children:[(0,r.jsx)("animate",{attributeName:"r",values:"9;11;9",dur:"4s",repeatCount:"indefinite"}),(0,r.jsx)("animate",{attributeName:"opacity",values:"0.1;0.25;0.1",dur:"4s",repeatCount:"indefinite"})]})]})}function Z(e){var t;let{node:n,x:i,y:l,onClose:a,onSubmit:o,isAuthenticated:c,existingComments:d}=e,[u,x]=(0,s.useState)(""),[h,m]=(0,s.useState)(!1),f=(0,s.useRef)(null),g=(0,s.useRef)(null),[v,b]=(0,s.useState)({x:0,y:0}),[j,y]=(0,s.useState)(!1);(0,s.useEffect)(()=>{if(!f.current)return;let e=f.current.getBoundingClientRect(),t=window.innerWidth,n=window.innerHeight,r=i+14,s=l-e.height-14;r+e.width>t-16&&(r=t-e.width-16),r<16&&(r=16),s<16&&(s=l+28),s+e.height>n-16&&(s=n-e.height-16),b({x:r,y:s}),y(!0)},[i,l]),(0,s.useEffect)(()=>{if(c){let e=setTimeout(()=>{var e;return null===(e=g.current)||void 0===e?void 0:e.focus()},100);return()=>clearTimeout(e)}},[c]),(0,s.useEffect)(()=>{let e=e=>{"Escape"===e.key&&a()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[a]),(0,s.useEffect)(()=>{let e=e=>{f.current&&!f.current.contains(e.target)&&a()},t=setTimeout(()=>{window.addEventListener("mousedown",e)},50);return()=>{clearTimeout(t),window.removeEventListener("mousedown",e)}},[a]);let w=(0,s.useCallback)(async()=>{if(u.trim()&&!h){m(!0);try{await o(u.trim()),x("")}catch(e){console.error("Failed to post comment:",e)}finally{m(!1)}}},[u,h,o]),k=(0,s.useCallback)(e=>{(e.metaKey||e.ctrlKey)&&"Enter"===e.key&&(e.preventDefault(),w())},[w]),N=p[n.prefix]||"#a1a1aa",z=(null==d?void 0:d.length)||0;return(0,r.jsxs)("div",{ref:f,style:{position:"fixed",left:v.x,top:v.y,width:320,zIndex:100,opacity:j?1:0,transform:j?"translateY(0)":"translateY(4px)",transition:"opacity 0.2s ease, transform 0.2s ease"},className:"bg-white border border-zinc-200 rounded-lg overflow-hidden",onContextMenu:e=>e.preventDefault(),children:[(0,r.jsx)("style",{children:"\n .comment-tooltip-shadow {\n box-shadow: 0 8px 32px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.08);\n }\n "}),(0,r.jsxs)("div",{className:"comment-tooltip-shadow p-[18px_20px]",children:[(0,r.jsx)("div",{className:"rounded-sm mb-2.5",style:{width:24,height:2,background:N,opacity:.6}}),(0,r.jsxs)("div",{className:"mb-3",children:[(0,r.jsx)("span",{className:"text-xs font-mono text-emerald-600",children:n.id}),(0,r.jsx)("h3",{className:"text-sm font-semibold text-zinc-800 leading-tight mt-0.5",children:n.title})]}),z>0&&d&&(0,r.jsxs)("div",{className:"mb-3 pb-3 border-b border-zinc-100",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5 mb-2",children:[(0,r.jsx)("svg",{className:"w-3.5 h-3.5 text-blue-500",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 20.25c4.97 0 9-3.694 9-8.25s-4.03-8.25-9-8.25S3 7.444 3 12c0 2.104.859 4.023 2.273 5.48.432.447.74 1.04.586 1.641a4.483 4.483 0 01-.923 1.785A5.969 5.969 0 006 21c1.282 0 2.47-.402 3.445-1.087.81.22 1.668.337 2.555.337z"})}),(0,r.jsxs)("span",{className:"text-[10px] font-medium text-zinc-500 uppercase tracking-wider",children:[z," comment",1!==z?"s":""]})]}),(0,r.jsxs)("div",{className:"space-y-2",children:[d.slice(0,2).map(e=>(0,r.jsxs)("div",{className:"flex gap-1.5",children:[(0,r.jsx)("div",{className:"shrink-0 w-4 h-4 rounded-full bg-zinc-100 overflow-hidden mt-0.5",children:e.avatar?(0,r.jsx)("img",{src:e.avatar,alt:"",className:"w-full h-full object-cover"}):(0,r.jsx)("div",{className:"w-full h-full flex items-center justify-center text-[7px] font-medium text-zinc-400",children:(e.handle||e.did).charAt(0).toUpperCase()})}),(0,r.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,r.jsx)("a",{href:"https://www.impactindexer.org/data?did=".concat(e.did),target:"_blank",rel:"noopener noreferrer",className:"text-[10px] font-medium text-zinc-500 hover:text-emerald-600 transition-colors",children:e.displayName||e.handle}),(0,r.jsx)("p",{className:"text-[11px] text-zinc-500 line-clamp-2 leading-tight",children:e.text})]})]},e.uri)),z>2&&(0,r.jsxs)("p",{className:"text-[10px] text-zinc-400 italic",children:["+",z-2," more — see detail panel"]})]})]}),c?(0,r.jsxs)("div",{children:[(0,r.jsx)("textarea",{ref:g,value:u,onChange:e=>x(e.target.value),onKeyDown:k,placeholder:"Leave a comment...",rows:3,className:"w-full px-2.5 py-2 text-xs border border-zinc-200 rounded-md bg-zinc-50 text-zinc-700 placeholder-zinc-400 resize-none focus:outline-none focus:ring-1 focus:ring-emerald-500 focus:border-emerald-500"}),(0,r.jsxs)("div",{className:"flex items-center justify-between mt-2",children:[(0,r.jsxs)("span",{className:"text-[10px] text-zinc-300",children:["undefined"!=typeof navigator&&(null===(t=navigator.platform)||void 0===t?void 0:t.includes("Mac"))?"⌘":"Ctrl","+Enter to send"]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("button",{onClick:a,className:"px-2.5 py-1 text-[11px] text-zinc-400 hover:text-zinc-600 transition-colors",children:"Cancel"}),(0,r.jsx)("button",{onClick:w,disabled:!u.trim()||h,className:"px-3 py-1 text-[11px] font-medium text-white bg-emerald-500 rounded-md hover:bg-emerald-600 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:h?(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[(0,r.jsxs)("svg",{className:"w-3 h-3 animate-spin",fill:"none",viewBox:"0 0 24 24",children:[(0,r.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,r.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),"Sending"]}):"Send"})]})]})]}):(0,r.jsxs)("div",{className:"text-center py-3",children:[(0,r.jsx)("svg",{className:"w-5 h-5 text-zinc-300 mx-auto mb-1.5",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 10.5V6.75a4.5 4.5 0 10-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 002.25-2.25v-6.75a2.25 2.25 0 00-2.25-2.25H6.75a2.25 2.25 0 00-2.25 2.25v6.75a2.25 2.25 0 002.25 2.25z"})}),(0,r.jsx)("p",{className:"text-xs text-zinc-400",children:"Sign in to comment"})]})]})]})}function $(e){let{node:t,x:n,y:i,onShowDescription:l,onAddComment:a,onClaimTask:o,onUnclaimTask:c,onCollapseEpic:d,onUncollapseEpic:u,onClose:x}=e,h=(0,s.useRef)(null),[m,p]=(0,s.useState)({x:0,y:0}),[f,g]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{if(!h.current)return;let e=h.current.getBoundingClientRect(),t=window.innerWidth,r=window.innerHeight,s=n+4,l=i+4;s+e.width>t-16&&(s=t-e.width-16),s<16&&(s=16),l+e.height>r-16&&(l=r-e.height-16),l<16&&(l=16),p({x:s,y:l}),g(!0)},[n,i]),(0,s.useEffect)(()=>{let e=e=>{"Escape"===e.key&&x()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[x]),(0,s.useEffect)(()=>{let e=e=>{h.current&&!h.current.contains(e.target)&&x()},t=setTimeout(()=>window.addEventListener("mousedown",e),50);return()=>{clearTimeout(t),window.removeEventListener("mousedown",e)}},[x]),(0,r.jsx)("div",{ref:h,style:{position:"fixed",left:m.x,top:m.y,zIndex:100,opacity:f?1:0,transform:f?"translateY(0)":"translateY(2px)",transition:"opacity 0.15s ease, transform 0.15s ease"},onContextMenu:e=>e.preventDefault(),children:(0,r.jsxs)("div",{className:"bg-white border border-zinc-200 rounded-lg overflow-hidden",style:{minWidth:180,boxShadow:"0 4px 16px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.06)"},children:[t.description&&(0,r.jsxs)("button",{onClick:l,className:"w-full px-3 py-2.5 text-xs text-zinc-700 hover:bg-zinc-50 flex items-center gap-2 transition-colors border-b border-zinc-100",children:[(0,r.jsx)("svg",{className:"w-3.5 h-3.5 text-zinc-400",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})}),"Show description"]}),(0,r.jsxs)("button",{onClick:a,className:"w-full px-3 py-2.5 text-xs text-zinc-700 hover:bg-zinc-50 flex items-center gap-2 transition-colors".concat(o||c||d||u?" border-b border-zinc-100":""),children:[(0,r.jsx)("svg",{className:"w-3.5 h-3.5 text-zinc-400",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 20.25c4.97 0 9-3.694 9-8.25s-4.03-8.25-9-8.25S3 7.444 3 12c0 2.104.859 4.023 2.273 5.48.432.447.74 1.04.586 1.641a4.483 4.483 0 01-.923 1.785A5.969 5.969 0 006 21c1.282 0 2.47-.402 3.445-1.087.81.22 1.668.337 2.555.337z"})}),"Add comment"]}),o&&(0,r.jsxs)("button",{onClick:o,className:"w-full px-3 py-2.5 text-xs text-zinc-700 hover:bg-zinc-50 flex items-center gap-2 transition-colors".concat(d||u?" border-b border-zinc-100":""),children:[(0,r.jsx)("svg",{className:"w-3.5 h-3.5 text-zinc-400",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.501 20.118a7.5 7.5 0 0114.998 0A17.933 17.933 0 0112 21.75c-2.676 0-5.216-.584-7.499-1.632z"})}),"Claim task"]}),c&&(0,r.jsxs)("button",{onClick:c,className:"w-full px-3 py-2.5 text-xs text-red-500 hover:bg-red-50 flex items-center gap-2 transition-colors".concat(d||u?" border-b border-zinc-100":""),children:[(0,r.jsx)("svg",{className:"w-3.5 h-3.5 text-red-400",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M22 10.5h-6m-2.25-4.125a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zM4 19.235v-.11a6.375 6.375 0 0112.75 0v.109A12.318 12.318 0 0110.374 21c-2.331 0-4.512-.645-6.374-1.766z"})}),"Unclaim task"]}),d&&(0,r.jsxs)("button",{onClick:d,className:"w-full px-3 py-2.5 text-xs text-zinc-700 hover:bg-zinc-50 flex items-center gap-2 transition-colors",children:[(0,r.jsx)("svg",{className:"w-3.5 h-3.5 text-zinc-400",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 9V4.5M9 9H4.5M9 9 3.75 3.75M9 15v4.5M9 15H4.5M9 15l-5.25 5.25M15 9h4.5M15 9V4.5M15 9l5.25-5.25M15 15h4.5M15 15v4.5m0-4.5 5.25 5.25"})}),"Collapse epic"]}),u&&(0,r.jsxs)("button",{onClick:u,className:"w-full px-3 py-2.5 text-xs text-zinc-700 hover:bg-zinc-50 flex items-center gap-2 transition-colors",children:[(0,r.jsx)("svg",{className:"w-3.5 h-3.5 text-zinc-400",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"})}),"Uncollapse epic"]})]})})}let J={bg:"#FFFFFF",border:"#E5E7EB",borderLight:"#F3F4F6",shadow:"rgba(0,0,0,0.08)",text:"#131316",textMuted:"#737680",textDim:"#7F818B"};function Q(e){let{node:t,x:n,y:i,prefixColor:l,allNodes:a}=e,d=(0,s.useRef)(null),[u,h]=(0,s.useState)({x:0,y:0});(0,s.useEffect)(()=>{if(!d.current)return;let e=d.current.getBoundingClientRect(),t=n+14,r=i-e.height-14;t+e.width>window.innerWidth-16&&(t=n-e.width-14),t<16&&(t=16),r<16&&(r=i+14+8),r+e.height>window.innerHeight-16&&(r=window.innerHeight-e.height-16),h({x:t,y:r})},[n,i]);let m=t.dependentIds.map(e=>{let t=a.find(t=>t.id===e);return t?{id:e,title:t.title}:{id:e,title:e}}).filter(Boolean),p=o[t.priority]||"P".concat(t.priority),f=c[t.priority]||"#a1a1aa";return(0,r.jsxs)("div",{ref:d,className:"bead-tooltip",style:{position:"fixed",left:u.x,top:u.y,width:280,zIndex:100,pointerEvents:"none",background:J.bg,border:"1px solid ".concat(J.border),boxShadow:"0 8px 32px ".concat(J.shadow,", 0 2px 8px ").concat(J.shadow),borderRadius:8,padding:"16px 18px",animation:"beadTooltipFade 0.2s ease"},children:[(0,r.jsx)("div",{style:{width:24,height:2,background:l,opacity:.5,marginBottom:8,borderRadius:1}}),(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:6},children:[(0,r.jsx)("span",{style:{fontSize:10,fontWeight:600,color:l,letterSpacing:.5,textTransform:"uppercase"},children:x(t.prefix)}),(0,r.jsx)("span",{style:{fontSize:10,fontFamily:"monospace",color:J.textDim},children:t.id})]}),(0,r.jsx)("div",{style:{fontSize:14,fontWeight:600,color:J.text,lineHeight:1.25,marginBottom:12,overflow:"hidden",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical"},children:t.title}),(0,r.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{style:ee,children:"Created"}),(0,r.jsx)("div",{style:et,children:W(t.createdAt)})]}),t.owner&&(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{style:ee,children:"Owner"}),(0,r.jsx)("div",{style:et,children:t.owner})]}),(t.assignee||t.createdBy)&&(0,r.jsxs)("div",{children:[t.assignee&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{style:ee,children:"Assignee"}),(0,r.jsx)("div",{style:et,children:t.assignee})]}),t.createdBy&&!t.assignee&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{style:ee,children:"Created by"}),(0,r.jsx)("div",{style:et,children:t.createdBy})]}),t.createdBy&&t.assignee&&t.createdBy!==t.assignee&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{style:{...ee,marginTop:4},children:"Created by"}),(0,r.jsx)("div",{style:et,children:t.createdBy})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{style:ee,children:"Blocked by"}),0===m.length?(0,r.jsx)("div",{style:{...et,color:"#10b981"},children:"None"}):(0,r.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:3},children:m.map(e=>(0,r.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:6},children:[(0,r.jsx)("span",{style:{fontSize:10,fontFamily:"monospace",color:J.textDim,flexShrink:0},children:e.id}),(0,r.jsx)("span",{style:{fontSize:12,color:J.textMuted,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.title})]},e.id))})]}),(0,r.jsxs)("div",{style:{borderTop:"1px solid ".concat(J.borderLight),paddingTop:8},children:[(0,r.jsx)("div",{style:ee,children:"Priority"}),(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6},children:[(0,r.jsx)("div",{style:{width:8,height:8,borderRadius:"50%",background:f,flexShrink:0}}),(0,r.jsx)("span",{style:et,children:p})]})]})]})]})}let ee={fontSize:10,fontWeight:600,letterSpacing:1.5,textTransform:"uppercase",color:"#7F818B",marginBottom:3},et={fontSize:12,color:"#737680",lineHeight:1.45};function en(e){let{isOpen:t,onClose:n,allComments:s,onNodeNavigate:i,isAuthenticated:l,currentDid:a,onLikeComment:o,onDeleteComment:c}=e;return(0,r.jsxs)("aside",{className:"hidden md:flex absolute top-0 right-0 h-full w-[360px] bg-white border-l border-zinc-200 flex-col shadow-xl z-30 transform transition-transform duration-300 ease-out ".concat(t?"translate-x-0":"translate-x-full"),children:[(0,r.jsxs)("div",{className:"shrink-0 px-5 py-3 border-b border-zinc-100 flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("h2",{className:"text-xs font-semibold text-zinc-400 uppercase tracking-wider",children:"All Comments"}),s.length>0&&(0,r.jsx)("span",{className:"px-1.5 py-0.5 bg-emerald-50 text-emerald-600 rounded-full text-[10px] font-medium",children:s.length})]}),(0,r.jsx)("button",{onClick:n,className:"p-1 text-zinc-400 hover:text-zinc-600 transition-colors rounded-full hover:bg-zinc-100",children:(0,r.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:1.5,children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),(0,r.jsx)("div",{className:"flex-1 overflow-y-auto custom-scrollbar px-5 py-3",children:s.length>0?(0,r.jsx)("div",{className:"space-y-0",children:s.filter(e=>!e.replyTo).map(e=>(0,r.jsx)(er,{comment:e,currentDid:a,isAuthenticated:l,onNodeNavigate:i,onLike:o,onDelete:c,depth:0},e.uri))}):(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,r.jsx)("svg",{className:"w-8 h-8 text-zinc-200 mb-3",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12.76c0 1.6 1.123 2.994 2.707 3.227 1.087.16 2.185.283 3.293.369V21l4.076-4.076a1.526 1.526 0 011.037-.443 48.282 48.282 0 005.68-.494c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0012 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018z"})}),(0,r.jsx)("p",{className:"text-xs text-zinc-400",children:"No comments yet"}),(0,r.jsx)("p",{className:"text-[10px] text-zinc-300 mt-1",children:"Right-click a node to leave a comment"})]})}),(0,r.jsx)("div",{className:"shrink-0 px-5 py-2.5 border-t border-zinc-100 bg-zinc-50/50",children:(0,r.jsxs)("div",{className:"text-[10px] text-zinc-400",children:[s.length," comment",1!==s.length?"s":""," across all issues"]})})]})}function er(e){let{comment:t,currentDid:n,isAuthenticated:i,onNodeNavigate:l,onLike:a,onDelete:o,depth:c}=e,[d,u]=(0,s.useState)(!1),[x,h]=(0,s.useState)(!1),m=n&&n===t.did,p=!!n&&t.likes.some(e=>e.did===n),f=async()=>{if(a&&!d){u(!0);try{await a(t)}catch(e){console.error("Failed to toggle like:",e)}finally{u(!1)}}},g=async()=>{if(o&&!x){h(!0);try{await o(t)}catch(e){console.error("Failed to delete comment:",e)}finally{h(!1)}}};return(0,r.jsxs)("div",{className:"".concat(c>0?"ml-4 pl-3 border-l border-zinc-100":""),children:[(0,r.jsxs)("div",{className:"py-3 ".concat(0===c?"border-b border-zinc-50":""),children:[0===c&&(0,r.jsx)("button",{onClick:()=>l(t.nodeId),className:"inline-flex items-center px-1.5 py-0.5 mb-1.5 rounded text-[10px] font-mono bg-emerald-50 text-emerald-600 hover:bg-emerald-100 transition-colors",children:t.nodeId}),(0,r.jsxs)("div",{className:"flex items-center gap-1.5 mb-1",children:[(0,r.jsx)("div",{className:"shrink-0 w-4 h-4 rounded-full bg-zinc-100 overflow-hidden",children:t.avatar?(0,r.jsx)("img",{src:t.avatar,alt:"",className:"w-full h-full object-cover"}):(0,r.jsx)("div",{className:"w-full h-full flex items-center justify-center text-[8px] font-medium text-zinc-400",children:(t.handle||t.did).charAt(0).toUpperCase()})}),(0,r.jsx)("a",{href:"https://www.impactindexer.org/data?did=".concat(t.did),target:"_blank",rel:"noopener noreferrer",className:"text-xs font-medium text-zinc-600 truncate hover:text-emerald-600 transition-colors",children:t.displayName||t.handle||t.did.slice(0,16)+"..."}),(0,r.jsx)("span",{className:"text-[10px] text-zinc-300 shrink-0",children:W(t.createdAt)})]}),(0,r.jsx)("p",{className:"text-xs text-zinc-500 leading-relaxed whitespace-pre-wrap break-words",children:t.text}),(0,r.jsxs)("div",{className:"flex items-center gap-2 mt-1 text-[10px]",children:[(0,r.jsxs)("button",{onClick:f,disabled:!i||d,className:"flex items-center gap-0.5 transition-colors ".concat(p?"text-rose-500":"text-zinc-300 hover:text-rose-500"," disabled:opacity-50"),children:[(0,r.jsx)(O,{className:"w-3 h-3",filled:p}),t.likes.length>0&&(0,r.jsx)("span",{children:t.likes.length})]}),m&&o&&(0,r.jsx)("button",{onClick:g,disabled:x,className:"ml-auto text-zinc-300 hover:text-red-400 disabled:opacity-50 transition-colors",children:x?"...":"delete"})]})]}),t.replies.length>0&&(0,r.jsx)("div",{children:t.replies.map(e=>(0,r.jsx)(er,{comment:e,currentDid:n,isAuthenticated:i,onNodeNavigate:l,onLike:a,onDelete:o,depth:c+1},e.uri))})]})}function es(e){let{type:t,className:n}=e,s=n||"w-3.5 h-3.5 shrink-0";switch(t){case"node-created":return(0,r.jsxs)("svg",{className:"".concat(s," text-emerald-500"),viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,r.jsx)("circle",{cx:"8",cy:"8",r:"6"}),(0,r.jsx)("line",{x1:"8",y1:"5",x2:"8",y2:"11"}),(0,r.jsx)("line",{x1:"5",y1:"8",x2:"11",y2:"8"})]});case"node-closed":return(0,r.jsxs)("svg",{className:"".concat(s," text-zinc-400"),viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,r.jsx)("circle",{cx:"8",cy:"8",r:"6"}),(0,r.jsx)("polyline",{points:"5.5,8 7.5,10 10.5,6"})]});case"node-status-changed":return(0,r.jsx)("svg",{className:"".concat(s," text-amber-500"),viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:(0,r.jsx)("path",{d:"M3 8h10M10 5l3 3-3 3"})});case"node-priority-changed":return(0,r.jsx)("svg",{className:"".concat(s," text-amber-500"),viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:(0,r.jsx)("path",{d:"M8 3v7M5 6l3-3 3 3M4 13h8"})});case"node-title-changed":return(0,r.jsx)("svg",{className:"".concat(s," text-amber-500"),viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:(0,r.jsx)("path",{d:"M3 4h10M3 8h6M3 12h8"})});case"node-owner-changed":return(0,r.jsxs)("svg",{className:"".concat(s," text-amber-500"),viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,r.jsx)("circle",{cx:"6",cy:"6",r:"2.5"}),(0,r.jsx)("path",{d:"M1.5 13c0-2 1.8-3.5 4.5-3.5M10 9l2 2 3-3"})]});case"link-added":return(0,r.jsx)("svg",{className:"".concat(s," text-blue-500"),viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:(0,r.jsx)("path",{d:"M6.5 9.5l3-3M4 11a2.5 2.5 0 003.5 0l1-1M8.5 6a2.5 2.5 0 013.5 0l0 0"})});case"link-removed":return(0,r.jsxs)("svg",{className:"".concat(s," text-red-400"),viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,r.jsx)("path",{d:"M4 11a2.5 2.5 0 003.5 0l1-1M8.5 6a2.5 2.5 0 013.5 0l0 0"}),(0,r.jsx)("line",{x1:"3",y1:"3",x2:"13",y2:"13",strokeWidth:"1.5"})]});case"comment-added":case"reply-added":return(0,r.jsx)("svg",{className:"".concat(s," text-blue-500"),viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:(0,r.jsx)("path",{d:"M2 4.5a1.5 1.5 0 011.5-1.5h9A1.5 1.5 0 0114 4.5v5a1.5 1.5 0 01-1.5 1.5H5L2 14V4.5z"})});case"task-claimed":return(0,r.jsxs)("svg",{className:"".concat(s," text-emerald-500"),viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,r.jsx)("circle",{cx:"8",cy:"5.5",r:"2.5"}),(0,r.jsx)("path",{d:"M3 13.5c0-2.5 2.2-4.5 5-4.5s5 2 5 4.5"})]});case"task-unclaimed":return(0,r.jsxs)("svg",{className:"".concat(s," text-red-400"),viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,r.jsx)("circle",{cx:"8",cy:"5.5",r:"2.5"}),(0,r.jsx)("path",{d:"M3 13.5c0-2.5 2.2-4.5 5-4.5s5 2 5 4.5"}),(0,r.jsx)("line",{x1:"11",y1:"3",x2:"13",y2:"5"})]});case"like-added":return(0,r.jsx)("svg",{className:"".concat(s," text-rose-400"),viewBox:"0 0 16 16",fill:"currentColor",children:(0,r.jsx)("path",{d:"M8 13.7l-.6-.5C4 10.2 2 8.3 2 6a3 3 0 016-1 3 3 0 016 1c0 2.3-2 4.2-5.4 7.2l-.6.5z"})})}}function ei(e){switch(e){case"node-created":case"task-claimed":return"bg-emerald-400";case"node-closed":return"bg-zinc-300";case"node-status-changed":case"node-priority-changed":case"node-title-changed":case"node-owner-changed":return"bg-amber-400";case"link-added":case"comment-added":case"reply-added":return"bg-blue-400";case"link-removed":case"task-unclaimed":return"bg-red-300";case"like-added":return"bg-rose-300"}}function el(e){var t,n,r;switch(e.type){case"node-created":{let n=(null===(t=e.meta)||void 0===t?void 0:t.issueType)||"task";return"".concat(n," created")}case"node-closed":return"closed".concat(e.detail&&"Closed"!==e.detail?" (".concat(e.detail,")"):"");case"node-status-changed":return e.detail||"status changed";case"node-priority-changed":return"priority ".concat(e.detail||"changed");case"node-title-changed":return"title updated";case"node-owner-changed":return"owner ".concat(e.detail||"changed");case"link-added":return"dep added: ".concat((null===(n=e.meta)||void 0===n?void 0:n.target)||"");case"link-removed":return"dep removed: ".concat((null===(r=e.meta)||void 0===r?void 0:r.target)||"");case"comment-added":return e.detail||"commented";case"reply-added":return e.detail||"replied";case"task-claimed":return"claimed this task";case"task-unclaimed":return"unclaimed this task";case"like-added":return e.detail||"liked a comment"}}function ea(e){let{event:t,onNodeClick:n}=e;return(0,r.jsxs)("div",{className:"flex items-center gap-2 py-2 px-3 group hover:bg-zinc-50/60 transition-colors",children:[(0,r.jsx)("div",{className:"w-1 h-1 rounded-full shrink-0 ".concat(ei(t.type))}),(0,r.jsx)(es,{type:t.type,className:"w-3 h-3 shrink-0"}),(0,r.jsxs)("div",{className:"flex-1 min-w-0 text-[11px] text-zinc-600 truncate",children:[t.actor?(0,r.jsxs)(r.Fragment,{children:[t.actor.did?(0,r.jsx)("a",{href:"https://www.impactindexer.org/data?did=".concat(t.actor.did),target:"_blank",rel:"noopener noreferrer",className:"font-medium text-zinc-800 hover:text-emerald-600 transition-colors",children:t.actor.handle.split(".")[0]}):(0,r.jsx)("span",{className:"font-medium text-zinc-800",children:t.actor.handle.split(".")[0]})," "]}):n?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{onClick:()=>n(t.nodeId),className:"font-medium text-zinc-700 hover:text-emerald-600 transition-colors",children:t.nodeId})," "]}):null,(0,r.jsx)("span",{className:"text-zinc-500",children:el(t)})]}),(0,r.jsx)("span",{className:"text-[10px] text-zinc-400 shrink-0 tabular-nums opacity-0 group-hover:opacity-100 transition-opacity",children:W(new Date(t.time).toISOString())})]})}function eo(e){var t;let{event:n,onNodeClick:s}=e;return(0,r.jsxs)("div",{className:"flex gap-3 py-3 px-4 hover:bg-zinc-50/50 transition-colors group",children:[(0,r.jsx)("div",{className:"w-0.5 self-stretch rounded-full shrink-0 ".concat(ei(n.type))}),(0,r.jsx)("div",{className:"mt-0.5 shrink-0",children:(null===(t=n.actor)||void 0===t?void 0:t.avatar)?(0,r.jsx)("img",{src:n.actor.avatar,alt:n.actor.handle,className:"w-7 h-7 rounded-full ring-1 ring-zinc-100"}):n.actor?(0,r.jsx)("div",{className:"w-7 h-7 rounded-full bg-zinc-100 flex items-center justify-center text-[11px] font-medium text-zinc-500",children:n.actor.handle.charAt(0).toUpperCase()}):(0,r.jsx)("div",{className:"w-7 h-7 rounded-full bg-zinc-50 flex items-center justify-center",children:(0,r.jsx)(es,{type:n.type,className:"w-3.5 h-3.5"})})}),(0,r.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,r.jsxs)("div",{className:"flex items-baseline gap-1.5 text-[12px] leading-snug",children:[n.actor&&(n.actor.did?(0,r.jsx)("a",{href:"https://www.impactindexer.org/data?did=".concat(n.actor.did),target:"_blank",rel:"noopener noreferrer",className:"font-semibold text-zinc-800 hover:text-emerald-600 transition-colors truncate max-w-[140px]",children:n.actor.handle.split(".")[0]}):(0,r.jsx)("span",{className:"font-semibold text-zinc-800 truncate max-w-[140px]",children:n.actor.handle.split(".")[0]})),(0,r.jsx)("span",{className:"text-zinc-500",children:el(n)})]}),(0,r.jsxs)("div",{className:"flex items-center gap-1.5 mt-1",children:[s&&(0,r.jsx)("button",{onClick:()=>s(n.nodeId),className:"inline-flex items-center px-1.5 py-0.5 text-[10px] font-mono font-medium text-emerald-700 bg-emerald-50 rounded-md hover:bg-emerald-100 transition-colors",children:n.nodeId}),n.nodeTitle&&(0,r.jsx)("span",{className:"text-[11px] text-zinc-400 truncate",children:n.nodeTitle})]})]}),(0,r.jsx)("span",{className:"text-[10px] text-zinc-400 shrink-0 tabular-nums mt-0.5",children:W(new Date(n.time).toISOString())})]})}function ec(e){let{event:t,variant:n="compact",onNodeClick:s}=e;return"compact"===n?(0,r.jsx)(ea,{event:t,onNodeClick:s}):(0,r.jsx)(eo,{event:t,onNodeClick:s})}function ed(e){let{events:t,collapsed:n,onToggleCollapse:s,onExpandPanel:i,onNodeClick:l}=e,a=t.filter(e=>Date.now()-e.time<3e5).length;return n?(0,r.jsxs)("button",{onClick:s,className:"group flex items-center gap-2 px-3 py-2 bg-white/90 backdrop-blur-sm rounded-full border border-zinc-200/80 shadow-sm hover:bg-white hover:shadow-md transition-all",title:"Show activity feed",children:[(0,r.jsxs)("svg",{className:"w-3.5 h-3.5 text-zinc-400 group-hover:text-emerald-500 transition-colors",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,r.jsx)("circle",{cx:"8",cy:"8",r:"6"}),(0,r.jsx)("polyline",{points:"8,4 8,8 11,10"})]}),(0,r.jsx)("span",{className:"text-xs text-zinc-500 group-hover:text-zinc-700 transition-colors",children:"Activity"}),a>0&&(0,r.jsx)("span",{className:"text-[10px] font-medium text-white bg-emerald-500 rounded-full px-1.5 py-0.5 min-w-[18px] text-center leading-tight",children:a})]}):(0,r.jsxs)("div",{className:"w-72 bg-white/95 backdrop-blur-sm rounded-xl border border-zinc-200/80 shadow-lg overflow-hidden",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between px-3.5 py-2.5 border-b border-zinc-100/80",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("div",{className:"w-1.5 h-1.5 rounded-full bg-emerald-400 animate-pulse"}),(0,r.jsx)("span",{className:"text-[11px] font-semibold text-zinc-600",children:"Live Activity"})]}),(0,r.jsx)("button",{onClick:s,className:"text-zinc-400 hover:text-zinc-600 transition-colors p-1 -mr-0.5 rounded-full hover:bg-zinc-100",title:"Collapse",children:(0,r.jsx)("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"})})})]}),(0,r.jsx)("div",{className:"py-0.5 max-h-[260px] overflow-y-auto custom-scrollbar",children:0===t.length?(0,r.jsxs)("div",{className:"py-6 text-center",children:[(0,r.jsxs)("svg",{className:"w-5 h-5 text-zinc-200 mx-auto mb-1.5",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,r.jsx)("circle",{cx:"8",cy:"8",r:"6"}),(0,r.jsx)("polyline",{points:"8,4 8,8 11,10"})]}),(0,r.jsx)("p",{className:"text-[11px] text-zinc-400",children:"No activity yet"})]}):t.slice(0,6).map((e,t)=>(0,r.jsx)("div",{className:0===t?"bg-emerald-50/30":"",children:(0,r.jsx)(ec,{event:e,variant:"compact",onNodeClick:l})},e.id))}),t.length>0&&(0,r.jsxs)("div",{className:"flex items-center justify-between px-3.5 py-2 border-t border-zinc-100/80 bg-zinc-50/30",children:[(0,r.jsxs)("span",{className:"text-[10px] text-zinc-400",children:[t.length," event",1!==t.length?"s":""]}),(0,r.jsxs)("button",{onClick:i,className:"text-[11px] text-emerald-600 hover:text-emerald-700 transition-colors font-medium flex items-center gap-1",children:["See all",(0,r.jsx)("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]})]})]})}function eu(e,t){let n=new Set(e.map(e=>e.id)),r=[...e];for(let e of t)n.has(e.id)||(n.add(e.id),r.push(e));return r.sort((e,t)=>t.time-e.time),r.slice(0,200)}let ex=[{key:"issues",label:"Issues",icon:"circle"},{key:"deps",label:"Deps",icon:"link"},{key:"comments",label:"Comments",icon:"chat"},{key:"claims",label:"Claims",icon:"user"},{key:"likes",label:"Likes",icon:"heart"}];function eh(e){let{events:t,isOpen:n,onClose:i,onNodeClick:l}=e,[a,o]=(0,s.useState)(""),[c,d]=(0,s.useState)(new Set(ex.map(e=>e.key))),u=e=>{d(t=>{let n=new Set(t);return n.has(e)?n.size>1&&n.delete(e):n.add(e),n})},x=(0,s.useMemo)(()=>{let e=t;if(e=e.filter(e=>c.has(function(e){switch(e){case"node-created":case"node-closed":case"node-status-changed":case"node-priority-changed":case"node-title-changed":case"node-owner-changed":return"issues";case"link-added":case"link-removed":return"deps";case"comment-added":case"reply-added":return"comments";case"task-claimed":case"task-unclaimed":return"claims";case"like-added":return"likes"}}(e.type))),a.trim()){let t=a.trim().toLowerCase();e=e.filter(e=>{var n;return e.nodeId.toLowerCase().includes(t)||e.nodeTitle&&e.nodeTitle.toLowerCase().includes(t)||(null===(n=e.actor)||void 0===n?void 0:n.handle)&&e.actor.handle.toLowerCase().includes(t)||e.detail&&e.detail.toLowerCase().includes(t)})}return e},[t,c,a]),h=(0,s.useMemo)(()=>(function(e){let t=new Map,n=[];for(let r of e){let e=function(e){let t=Date.now()-e,n=t/36e5,r=t/864e5;return n<1?"Just now":n<24?"Today":r<2?"Yesterday":r<7?"This week":r<30?"This month":"Older"}(r.time);t.has(e)||(t.set(e,[]),n.push(e)),t.get(e).push(r)}return n.map(e=>({label:e,events:t.get(e)}))})(x),[x]),m=c.size===ex.length;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("aside",{className:"hidden md:flex absolute top-0 right-0 h-full w-[360px] bg-white border-l border-zinc-200 flex-col shadow-xl z-30 transform transition-transform duration-300 ease-out ".concat(n?"translate-x-0":"translate-x-full"),children:[(0,r.jsxs)("div",{className:"shrink-0 px-5 py-3 border-b border-zinc-100 flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("h2",{className:"text-xs font-semibold text-zinc-400 uppercase tracking-wider",children:"Activity"}),t.length>0&&(0,r.jsx)("span",{className:"px-1.5 py-0.5 bg-emerald-50 text-emerald-600 rounded-full text-[10px] font-medium",children:t.length})]}),(0,r.jsx)("button",{onClick:i,className:"p-1 text-zinc-400 hover:text-zinc-600 transition-colors rounded-full hover:bg-zinc-100",children:(0,r.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:1.5,children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),(0,r.jsx)("div",{className:"px-4 pt-3 pb-2 shrink-0",children:(0,r.jsxs)("div",{className:"flex items-center bg-zinc-50/80 rounded-full border border-zinc-200/60 overflow-hidden",children:[(0,r.jsx)("div",{className:"pl-3 pr-1 text-zinc-400",children:(0,r.jsx)("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),(0,r.jsx)("input",{type:"text",value:a,onChange:e=>o(e.target.value),placeholder:"Search activity...",className:"flex-1 px-2 py-2 text-xs text-zinc-800 bg-transparent outline-none placeholder:text-zinc-400"}),a&&(0,r.jsx)("button",{onClick:()=>o(""),className:"pr-3 text-zinc-400 hover:text-zinc-600",children:(0,r.jsx)("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]})}),(0,r.jsx)("div",{className:"flex flex-wrap gap-1.5 px-4 pb-3 shrink-0",children:ex.map(e=>{let t=c.has(e.key);return(0,r.jsx)("button",{onClick:()=>u(e.key),className:"px-2.5 py-1 text-[11px] font-medium rounded-full border transition-all ".concat(t?"bg-emerald-50 text-emerald-700 border-emerald-200 shadow-sm":"bg-white text-zinc-400 border-zinc-200 hover:text-zinc-600 hover:border-zinc-300"),children:e.label},e.key)})}),(0,r.jsx)("div",{className:"flex-1 overflow-y-auto custom-scrollbar border-t border-zinc-100",children:0===x.length?(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,r.jsx)("svg",{className:"w-8 h-8 text-zinc-200 mb-3",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,r.jsx)("p",{className:"text-xs text-zinc-400",children:a.trim()?"No activity matching your search":"No activity yet"}),a.trim()&&(0,r.jsx)("button",{onClick:()=>o(""),className:"text-[11px] text-emerald-600 hover:text-emerald-700 mt-1.5",children:"Clear search"})]}):h.map(e=>(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"sticky top-0 z-[1] px-4 py-1.5 bg-zinc-50/95 backdrop-blur-sm border-b border-zinc-100/60",children:(0,r.jsx)("span",{className:"text-[10px] font-semibold text-zinc-400 uppercase tracking-wider",children:e.label})}),(0,r.jsx)("div",{className:"divide-y divide-zinc-50",children:e.events.map(e=>(0,r.jsx)(ec,{event:e,variant:"full",onNodeClick:l},e.id))})]},e.label))}),(0,r.jsx)("div",{className:"shrink-0 px-5 py-2.5 border-t border-zinc-100 bg-zinc-50/50",children:(0,r.jsxs)("div",{className:"text-[10px] text-zinc-400",children:[x.length," event",1!==x.length?"s":"",!m&&" (filtered)",a.trim()&&' matching "'.concat(a.trim(),'"')]})})]}),(0,r.jsx)("div",{className:"md:hidden fixed inset-x-0 bottom-0 z-20 transition-transform duration-300 ease-out ".concat(n?"translate-y-0":"translate-y-full"),children:(0,r.jsxs)("div",{className:"bg-white rounded-t-2xl shadow-xl border-t border-zinc-200 max-h-[60vh] flex flex-col",children:[(0,r.jsx)("div",{className:"flex justify-center pt-3 pb-1",children:(0,r.jsx)("div",{className:"w-8 h-1 bg-zinc-300 rounded-full"})}),(0,r.jsxs)("div",{className:"flex items-center justify-between px-5 py-2",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("h2",{className:"text-sm font-semibold text-zinc-900",children:"Activity"}),t.length>0&&(0,r.jsx)("span",{className:"px-1.5 py-0.5 bg-emerald-50 text-emerald-600 rounded-full text-[10px] font-medium",children:t.length})]}),(0,r.jsx)("button",{onClick:i,className:"p-1 text-zinc-400 hover:text-zinc-600",children:(0,r.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:1.5,children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),(0,r.jsx)("div",{className:"flex flex-wrap gap-1.5 px-5 pb-3",children:ex.map(e=>(0,r.jsx)("button",{onClick:()=>u(e.key),className:"px-2.5 py-1 text-[11px] font-medium rounded-full border transition-colors ".concat(c.has(e.key)?"bg-emerald-50 text-emerald-700 border-emerald-200":"bg-white text-zinc-400 border-zinc-200"),children:e.label},e.key))}),(0,r.jsx)("div",{className:"flex-1 overflow-y-auto custom-scrollbar",children:0===x.length?(0,r.jsx)("div",{className:"py-8 text-center text-xs text-zinc-400",children:"No activity matching filters"}):h.map(e=>(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"sticky top-0 z-[1] px-5 py-1.5 bg-zinc-50/95 backdrop-blur-sm border-b border-zinc-100/60",children:(0,r.jsx)("span",{className:"text-[10px] font-semibold text-zinc-400 uppercase tracking-wider",children:e.label})}),(0,r.jsx)("div",{className:"divide-y divide-zinc-50",children:e.events.map(e=>(0,r.jsx)(ec,{event:e,variant:"full",onNodeClick:l},e.id))})]},e.label))})]})})]})}let em=[{target:"graph",title:"The Dependency Graph",description:"Each circle is a task or issue. The flowing particles between them show the direction of dependencies — what needs to happen before something else can start. Bigger circles mean more connections.",padding:0},{target:"layouts",title:"Layout Modes",description:"Switch how the graph is arranged. Force is organic and physics-based. DAG gives you a clean top-down tree. Radial spreads nodes in rings. Cluster groups by project. Spread spaces everything out for screenshots."},{target:"view-controls",title:"View Controls",description:"Collapse or expand epic groups, toggle cluster label overlays, and control auto-fit. When auto-fit is on (green), the camera re-centers after every update. Turn it off to stay focused on a specific area while data streams in."},{target:"legend",title:"Color Modes & Legend",description:"Color nodes by Status, Priority, Owner, Assignee, or Prefix. The ring around each node always shows which project it belongs to."},{target:"minimap",title:"Minimap",description:"A bird’s-eye view of your entire graph. Click anywhere to jump there. Drag the edges to resize it."},{target:"search",title:"Search",description:"Press Cmd+F (or Ctrl+F) to search by name, ID, owner, assignee, or commenter. Arrow keys to navigate, Enter to focus."},{target:"graph",title:"Interacting with Nodes",description:"Click a node to see details. Hover for a quick tooltip. Right-click for actions like viewing descriptions, commenting, claiming tasks, or collapsing epics.",padding:0},{target:"nav-pills",title:"Navigation Bar",description:"Replay steps through your project’s history. Comments shows conversations. Activity is a real-time feed. And Learn brings you right back here."}];function ep(e){let{step:t,onNext:n,onEnd:i}=e,[l,a]=(0,s.useState)(null),o=(0,s.useCallback)(()=>{if(null===t){a(null);return}let e=em[t];if(!e){a(null);return}let n=document.querySelector('[data-tutorial="'.concat(e.target,'"]'));if(n){var r;let t=n.getBoundingClientRect(),s=null!==(r=e.padding)&&void 0!==r?r:8;a({left:t.left-s,top:t.top-s,width:t.width+2*s,height:t.height+2*s})}else a(null)},[t]);if((0,s.useEffect)(()=>{o();let e=()=>o();window.addEventListener("resize",e);let t=setTimeout(o,150);return()=>{window.removeEventListener("resize",e),clearTimeout(t)}},[o]),null===t)return null;let c=t===em.length-1;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"fixed inset-0 z-[55] cursor-pointer",onClick:()=>{c?i():n()},children:(0,r.jsxs)("svg",{className:"absolute inset-0 w-full h-full",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("defs",{children:(0,r.jsxs)("mask",{id:"tutorial-mask",children:[(0,r.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),l&&(0,r.jsx)("rect",{x:l.left,y:l.top,width:l.width,height:l.height,rx:8,ry:8,fill:"black"})]})}),(0,r.jsx)("rect",{width:"100%",height:"100%",fill:"rgba(0,0,0,0.45)",mask:"url(#tutorial-mask)"})]})}),l&&(0,r.jsx)("div",{className:"fixed rounded-lg ring-2 ring-emerald-400/60 animate-pulse z-[56]",style:{left:l.left,top:l.top,width:l.width,height:l.height,pointerEvents:"none"}})]})}let ef={red:"#d20f39",teal:"#179299",peach:"#fe640b",blue:"#1e66f5",green:"#40a02b",mauve:"#8839ef",surface:"#dce0e8"};function eg(e){let{isOpen:t,onClose:n,tutorialStep:s=null,onStartTutorial:i,onNextStep:l,onPrevStep:a,onEndTutorial:o}=e,c=null!==s,d=c?"Tutorial":"Welcome to Heartbeads",u=c?(0,r.jsx)(ev,{step:s,onNext:l,onPrev:a,onEnd:o}):(0,r.jsx)(ey,{onStartTutorial:i});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("aside",{className:"hidden md:flex absolute top-0 right-0 h-full w-[360px] bg-white border-l border-zinc-200 flex-col shadow-xl transform transition-transform duration-300 ease-out ".concat(t?"translate-x-0":"translate-x-full"," ").concat(c?"z-[60]":"z-30"),children:[(0,r.jsxs)("div",{className:"flex items-center justify-between px-5 py-3 border-b border-zinc-100 shrink-0",children:[(0,r.jsx)("h2",{className:"text-sm font-semibold text-zinc-900",children:d}),(0,r.jsx)("button",{onClick:n,className:"p-1 text-zinc-400 hover:text-zinc-600 transition-colors",children:(0,r.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),(0,r.jsx)("div",{className:"flex-1 overflow-y-auto custom-scrollbar",children:u})]}),(0,r.jsx)("div",{className:"md:hidden fixed inset-x-0 bottom-0 transform transition-transform duration-300 ease-out ".concat(t?"translate-y-0":"translate-y-full"," ").concat(c?"z-[60]":"z-20"),children:(0,r.jsxs)("div",{className:"bg-white rounded-t-2xl shadow-2xl border-t border-zinc-200 max-h-[70vh] flex flex-col",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between px-5 py-3 border-b border-zinc-100 shrink-0",children:[(0,r.jsx)("h2",{className:"text-sm font-semibold text-zinc-900",children:d}),(0,r.jsx)("button",{onClick:n,className:"p-1 text-zinc-400 hover:text-zinc-600 transition-colors",children:(0,r.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),(0,r.jsx)("div",{className:"flex-1 overflow-y-auto custom-scrollbar",children:u})]})})]})}function ev(e){let{step:t,onNext:n,onPrev:s,onEnd:i}=e,l=em[t],a=em.length,o=t===a-1;return(0,r.jsxs)("div",{className:"px-5 py-4 flex flex-col min-h-[300px]",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,r.jsxs)("span",{className:"text-xs font-medium",style:{color:ef.teal},children:[t+1," / ",a]}),(0,r.jsx)("div",{className:"flex gap-1",children:Array.from({length:a}).map((e,n)=>(0,r.jsx)("div",{className:"w-1.5 h-1.5 rounded-full transition-colors",style:{backgroundColor:n===t?ef.green:n<t?ef.teal:ef.surface}},n))})]}),(0,r.jsx)("h3",{className:"text-base font-semibold text-zinc-900 mb-2",children:l.title}),(0,r.jsx)("p",{className:"text-[13px] text-zinc-600 leading-relaxed mb-6",children:l.description}),(0,r.jsx)("div",{className:"flex-1"}),(0,r.jsxs)("div",{className:"flex items-center gap-2 pt-4 border-t border-zinc-100",children:[0===t?(0,r.jsx)("button",{onClick:i,className:"px-4 py-2 text-sm font-medium text-zinc-400 hover:text-zinc-600 rounded-lg hover:bg-zinc-50 transition-colors",children:"Skip"}):(0,r.jsx)("button",{onClick:s,className:"px-4 py-2 text-sm font-medium rounded-lg hover:bg-zinc-50 transition-colors",style:{color:ef.blue},children:"Back"}),(0,r.jsx)("div",{className:"flex-1"}),o?(0,r.jsx)("button",{onClick:i,className:"px-4 py-2 text-sm font-medium text-white rounded-lg bg-emerald-500 hover:bg-emerald-600 transition-colors",children:"Done"}):(0,r.jsx)("button",{onClick:n,className:"px-4 py-2 text-sm font-medium text-white rounded-lg bg-emerald-500 hover:bg-emerald-600 transition-colors",children:"Next"})]})]})}function eb(e){let{color:t,children:n}=e;return(0,r.jsxs)("li",{className:"flex gap-2.5 items-start",children:[(0,r.jsx)("span",{className:"w-1.5 h-1.5 rounded-full mt-[6px] shrink-0",style:{backgroundColor:t}}),(0,r.jsx)("span",{children:n})]})}function ej(e){let{children:t,color:n}=e;return(0,r.jsx)("h3",{className:"text-[11px] font-semibold uppercase tracking-widest mb-2 mt-5 first:mt-0",style:{color:n},children:t})}function ey(e){let{onStartTutorial:t}=e;return(0,r.jsxs)("div",{className:"px-5 py-4 text-[13px] text-zinc-600 leading-relaxed",children:[t&&(0,r.jsxs)("button",{onClick:t,className:"w-full flex items-center justify-center gap-2 px-4 py-2.5 mb-5 text-white text-sm font-medium rounded-lg bg-emerald-500 hover:bg-emerald-600 transition-colors",children:[(0,r.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 18v-5.25m0 0a6.01 6.01 0 001.5-.189m-1.5.189a6.01 6.01 0 01-1.5-.189m3.75 7.478a12.06 12.06 0 01-4.5 0m3.75 2.383a14.406 14.406 0 01-3 0M14.25 18v-.192c0-.983.658-1.823 1.508-2.316a7.5 7.5 0 10-7.517 0c.85.493 1.509 1.333 1.509 2.316V18"})}),"Take the guided tour"]}),(0,r.jsx)("p",{className:"text-zinc-900 font-medium mb-1",children:"Your command center for AI coding tasks."}),(0,r.jsx)("p",{className:"mb-4 text-zinc-500",children:"Heartbeads shows everything your AI agents are working on as a live, interactive graph — tasks, dependencies, who's doing what, and what's blocking progress."}),(0,r.jsx)(ej,{color:ef.red,children:"The graph"}),(0,r.jsxs)("p",{className:"mb-2",children:["Each ",(0,r.jsx)("strong",{children:"circle"})," is a task. ",(0,r.jsx)("strong",{children:"Flowing particles"})," ","stream between them to show dependency direction."]}),(0,r.jsxs)("ul",{className:"space-y-1.5 mb-3",children:[(0,r.jsxs)(eb,{color:ef.red,children:[(0,r.jsx)("strong",{children:"Bigger circles"})," — more connected, more important"]}),(0,r.jsxs)(eb,{color:ef.red,children:[(0,r.jsx)("strong",{children:"Solid lines + particles"})," — “blocks” (A must finish before B)"]}),(0,r.jsxs)(eb,{color:ef.red,children:[(0,r.jsx)("strong",{children:"Dashed lines"})," — parent-child grouping"]}),(0,r.jsxs)(eb,{color:ef.red,children:[(0,r.jsx)("strong",{children:"Colored ring"})," — which project it belongs to"]})]}),(0,r.jsx)(ej,{color:ef.blue,children:"Navigation"}),(0,r.jsxs)("ul",{className:"space-y-1.5 mb-3",children:[(0,r.jsxs)(eb,{color:ef.blue,children:[(0,r.jsx)("strong",{children:"Click"})," a node to open its details"]}),(0,r.jsxs)(eb,{color:ef.blue,children:[(0,r.jsx)("strong",{children:"Hover"})," for a quick summary"]}),(0,r.jsxs)(eb,{color:ef.blue,children:[(0,r.jsx)("strong",{children:"Right-click"})," for actions — descriptions, comments, claims, collapse"]}),(0,r.jsxs)(eb,{color:ef.blue,children:[(0,r.jsx)("strong",{children:"Scroll"})," to zoom, ",(0,r.jsx)("strong",{children:"drag"})," to pan"]}),(0,r.jsxs)(eb,{color:ef.blue,children:[(0,r.jsx)("strong",{children:"Cmd/Ctrl+F"})," to search by name, ID, owner, or commenter"]})]}),(0,r.jsx)(ej,{color:ef.teal,children:"Layouts"}),(0,r.jsx)("p",{className:"mb-2",children:"Top-left buttons rearrange the graph:"}),(0,r.jsxs)("ul",{className:"space-y-1.5 mb-3",children:[(0,r.jsxs)(eb,{color:ef.teal,children:[(0,r.jsx)("strong",{children:"Force"})," — organic, physics-based"]}),(0,r.jsxs)(eb,{color:ef.teal,children:[(0,r.jsx)("strong",{children:"DAG"})," — clean top-down tree"]}),(0,r.jsxs)(eb,{color:ef.teal,children:[(0,r.jsx)("strong",{children:"Radial"})," — rings from center outward"]}),(0,r.jsxs)(eb,{color:ef.teal,children:[(0,r.jsx)("strong",{children:"Cluster"})," — grouped by project"]}),(0,r.jsxs)(eb,{color:ef.teal,children:[(0,r.jsx)("strong",{children:"Spread"})," — spaced out for screenshots"]})]}),(0,r.jsx)(ej,{color:ef.peach,children:"Color modes"}),(0,r.jsx)("p",{className:"mb-2",children:"Bottom-right panel — paint nodes by:"}),(0,r.jsxs)("ul",{className:"space-y-1.5 mb-3",children:[(0,r.jsxs)(eb,{color:ef.peach,children:[(0,r.jsx)("strong",{children:"Status"})," — open, in progress, blocked, closed"]}),(0,r.jsxs)(eb,{color:ef.peach,children:[(0,r.jsx)("strong",{children:"Priority"})," — P0 critical to P4 backlog"]}),(0,r.jsxs)(eb,{color:ef.peach,children:[(0,r.jsx)("strong",{children:"Owner"})," — who created it"]}),(0,r.jsxs)(eb,{color:ef.peach,children:[(0,r.jsx)("strong",{children:"Assignee"})," — who's working on it"]}),(0,r.jsxs)(eb,{color:ef.peach,children:[(0,r.jsx)("strong",{children:"Prefix"})," — which project"]})]}),(0,r.jsx)(ej,{color:ef.mauve,children:"More"}),(0,r.jsxs)("ul",{className:"space-y-1.5 mb-3",children:[(0,r.jsxs)(eb,{color:ef.mauve,children:[(0,r.jsx)("strong",{children:"Collapse/Expand"})," — tidy up epics into single nodes"]}),(0,r.jsxs)(eb,{color:ef.mauve,children:[(0,r.jsx)("strong",{children:"Clusters"})," — dashed circles grouping projects when zoomed out"]}),(0,r.jsxs)(eb,{color:ef.mauve,children:[(0,r.jsx)("strong",{children:"Replay"})," — step through your project's history"]}),(0,r.jsxs)(eb,{color:ef.mauve,children:[(0,r.jsx)("strong",{children:"Comments"})," — leave notes on tasks (sign in first)"]}),(0,r.jsxs)(eb,{color:ef.mauve,children:[(0,r.jsx)("strong",{children:"Claim tasks"})," — right-click to mark as yours"]}),(0,r.jsxs)(eb,{color:ef.mauve,children:[(0,r.jsx)("strong",{children:"Minimap"})," — click to jump, drag edges to resize"]}),(0,r.jsxs)(eb,{color:ef.mauve,children:[(0,r.jsx)("strong",{children:"Auto-fit"})," — top-left toggle to lock/unlock automatic camera reframing"]}),(0,r.jsxs)(eb,{color:ef.mauve,children:[(0,r.jsx)("strong",{children:"Copy"})," — clipboard icon copies task with project info"]})]}),(0,r.jsxs)("div",{className:"mt-5 pt-4 border-t border-zinc-100 text-xs text-zinc-400",children:["Built with"," ",(0,r.jsx)("a",{href:"https://github.com/GainForest/beads",target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2 transition-colors",style:{color:ef.green},children:"beads"})," ","— open-source issue tracking for AI-native development. Heartbeads is built for the GainForest agentic workflow and open-sourced at"," ",(0,r.jsx)("a",{href:"https://github.com/daviddao/heartbeads",target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2 transition-colors",style:{color:ef.green},children:"github.com/daviddao/heartbeads"}),"."]})]})}let ew=new Map,ek=new Map;async function eN(e){let t=ew.get(e);if(t)return t;let n=ek.get(e);if(n)return n;let r=(async()=>{try{let t=await fetch("https://public.api.bsky.app/xrpc/app.bsky.actor.getProfile?actor=".concat(encodeURIComponent(e)));if(!t.ok)throw Error("Profile fetch failed: ".concat(t.status));let n=await t.json(),r={did:e,handle:n.handle||e,displayName:n.displayName||void 0,avatar:n.avatar||void 0};return ew.set(e,r),r}catch(n){let t={did:e,handle:e.slice(0,20)+"..."};return ew.set(e,t),t}finally{ek.delete(e)}})();return ek.set(e,r),r}async function ez(e){let t;let n=[],r=!0,s=0;for(;r&&s<5;){var i,l;let a=await fetch("https://hypergoat-app-production.up.railway.app/graphql",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:"\n query FetchRecords($collection: String!, $first: Int, $after: String) {\n records(collection: $collection, first: $first, after: $after) {\n edges {\n node {\n cid\n collection\n did\n rkey\n uri\n value\n }\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n",variables:{collection:e,first:100,after:t}})});if(!a.ok)throw Error("Indexer fetch failed: ".concat(a.status));let o=await a.json();if(null===(i=o.errors)||void 0===i?void 0:i.length)throw Error(o.errors[0].message);let c=null===(l=o.data)||void 0===l?void 0:l.records;if(!c)break;for(let e of c.edges)n.push(e.node);r=c.pageInfo.hasNextPage,t=c.pageInfo.endCursor,s++}return n}function eC(e){let{totalSteps:t,currentStep:n,currentTime:i,isPlaying:l,speed:a,onStepChange:o,onPlayPause:c,onSpeedChange:d}=e,u=(0,s.useCallback)(e=>{o(Number(e.target.value))},[o]),x=(0,s.useCallback)(()=>{d(1===a?2:2===a?4:1)},[a,d]),h=t>1;return(0,r.jsx)("div",{className:"bg-white/90 backdrop-blur-sm rounded-lg border border-zinc-200 shadow-sm px-3 py-2 min-w-[280px] max-w-[480px]",children:(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("button",{onClick:c,disabled:!h,className:"shrink-0 w-6 h-6 flex items-center justify-center rounded transition-colors ".concat(l?"text-emerald-500 hover:text-emerald-600":"text-zinc-500 hover:text-zinc-700"," disabled:opacity-40 disabled:cursor-not-allowed"),children:l?(0,r.jsxs)("svg",{className:"w-4 h-4",viewBox:"0 0 16 16",fill:"currentColor",children:[(0,r.jsx)("rect",{x:"3",y:"2",width:"3.5",height:"12",rx:"1"}),(0,r.jsx)("rect",{x:"9.5",y:"2",width:"3.5",height:"12",rx:"1"})]}):(0,r.jsx)("svg",{className:"w-4 h-4",viewBox:"0 0 16 16",fill:"currentColor",children:(0,r.jsx)("path",{d:"M4 2l10 6-10 6V2z"})})}),(0,r.jsx)("input",{type:"range",min:0,max:Math.max(t-1,0),value:n,onChange:u,disabled:!h,className:"timeline-slider flex-1 h-4 disabled:opacity-40"}),(0,r.jsxs)("span",{className:"shrink-0 text-xs text-zinc-500 font-medium text-right whitespace-nowrap",children:[(0,r.jsxs)("span",{className:"text-zinc-400",children:[n+1,"/",t]})," ",new Date(i).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})]}),(0,r.jsxs)("button",{onClick:x,className:"shrink-0 px-1.5 py-0.5 text-[10px] font-semibold rounded transition-colors ".concat(a>1?"bg-emerald-500 text-white":"text-zinc-500 border border-zinc-200 hover:text-zinc-700"),children:[a,"x"]})]})})}function eM(e,t,n){let r=Date.now(),s=new Map(e.graphData.nodes.map(e=>[e.id,e])),i=new Set(e.graphData.links.map(f)),l=t.graphData.nodes.map(e=>{let i=s.get(e.id);if(!i){let n=function(e,t,n){for(let r of t){let t="object"==typeof r.source?r.source.id:r.source,s="object"==typeof r.target?r.target.id:r.target;if(t===e&&n.has(s)){let e=n.get(s);if(null!=e.x&&null!=e.y)return{x:e.x,y:e.y}}if(s===e&&n.has(t)){let e=n.get(t);if(null!=e.x&&null!=e.y)return{x:e.x,y:e.y}}}return null}(e.id,t.graphData.links,s);return{...e,_spawnTime:r,x:n?n.x+(Math.random()-.5)*40:void 0,y:n?n.y+(Math.random()-.5)*40:void 0}}let l={...e,x:i.x,y:i.y,fx:i.fx,fy:i.fy};if(n.changedNodes.has(e.id)){let t=n.changedNodes.get(e.id).find(e=>"status"===e.field);t&&(l._changedAt=r,l._prevStatus=t.from)}return l});for(let e of n.removedNodeIds){let t=s.get(e);t&&l.push({...t,_removeTime:r})}let a=t.graphData.links.map(e=>{let t=f(e);return i.has(t)?e:{...e,_spawnTime:r}});for(let t of n.removedLinkKeys){let n=e.graphData.links.find(e=>f(e)===t);n&&a.push({source:"object"==typeof n.source?n.source.id:n.source,target:"object"==typeof n.target?n.target.id:n.target,type:n.type,_removeTime:r})}return{...t,graphData:{nodes:l,links:a}}}let eS={open:"bg-emerald-500",in_progress:"bg-amber-500",blocked:"bg-red-500",deferred:"bg-violet-500",closed:"bg-zinc-400"};function eL(){var e,t,n;let[i,l]=(0,s.useState)(null),[a,o]=(0,s.useState)(!0),[c,d]=(0,s.useState)(null),[u,x]=(0,s.useState)(null),[m,p]=(0,s.useState)(null),[f,v]=(0,s.useState)(new Set),[b,j]=(0,s.useState)("status"),[y,w]=(0,s.useState)("Beads"),[k,N]=(0,s.useState)(0),[z,C]=(0,s.useState)({}),{isAuthenticated:M,session:S}=(0,X.a)(),{commentsByNode:L,commentedNodeIds:D,allComments:A,refetch:E}=function(){let[e,t]=(0,s.useState)(new Map),[n,r]=(0,s.useState)(new Map),[i,l]=(0,s.useState)([]),[a,o]=(0,s.useState)(!0),[c,d]=(0,s.useState)(null),u=(0,s.useRef)(!1),x=(0,s.useCallback)(async()=>{try{o(!0),d(null);let[e,n]=await Promise.all([ez("org.impactindexer.review.comment"),ez("org.impactindexer.review.like")]),s=e.filter(e=>{let t=e.value.subject;return(null==t?void 0:t.uri)&&"string"==typeof t.uri&&t.uri.startsWith("beads:")}),i=new Map;for(let e of n){let t=e.value.subject;if((null==t?void 0:t.uri)&&"string"==typeof t.uri&&t.uri.startsWith("at://")){let n=i.get(t.uri)||[];n.push(e),i.set(t.uri,n)}}let a=new Set;for(let e of s)a.add(e.did);for(let e of n)a.add(e.did);let c=await Promise.all([...a].map(e=>eN(e))),x=new Map(c.map(e=>[e.did,e])),h=[];for(let e of s){let t=e.value,n=t.subject.uri.replace(/^beads:/,""),r=t.text||"",s=t.createdAt||"",l=t.replyTo||void 0,a=x.get(e.did),o=(i.get(e.uri)||[]).map(e=>{let t=x.get(e.did),n=e.value;return{did:e.did,handle:(null==t?void 0:t.handle)||e.did.slice(0,20)+"...",displayName:null==t?void 0:t.displayName,avatar:null==t?void 0:t.avatar,createdAt:n.createdAt||"",uri:e.uri,rkey:e.rkey}}),c={did:e.did,handle:(null==a?void 0:a.handle)||e.did.slice(0,20)+"...",displayName:null==a?void 0:a.displayName,avatar:null==a?void 0:a.avatar,text:r,createdAt:s,uri:e.uri,rkey:e.rkey,nodeId:n,replyTo:l,likes:o,replies:[]};h.push(c)}let m=new Map;for(let e of h)m.set(e.uri,e);let p=[];for(let e of h){if(e.replyTo){let t=m.get(e.replyTo);if(t){t.replies.push(e);continue}}p.push(e)}p.sort((e,t)=>new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime()),function e(t){for(let n of t)n.replies.sort((e,t)=>new Date(e.createdAt).getTime()-new Date(t.createdAt).getTime()),e(n.replies)}(p);let f=new Map;for(let e of p){let t=f.get(e.nodeId)||[];t.push(e),f.set(e.nodeId,t)}let g=new Map;for(let e of h)g.set(e.nodeId,(g.get(e.nodeId)||0)+1);let v=[...h].sort((e,t)=>new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime());u.current||(t(f),r(g),l(v))}catch(e){if(!u.current){let t=e instanceof Error?e.message:"Failed to fetch comments";console.error("Failed to fetch beads comments:",e),d(t)}}finally{u.current||o(!1)}},[]);return(0,s.useEffect)(()=>(u.current=!1,x(),()=>{u.current=!0}),[x]),{commentsByNode:e,commentedNodeIds:n,allComments:i,isLoading:a,error:c,refetch:x}}(),[I,B]=(0,s.useState)(new Map),[P,F]=(0,s.useState)(new Set),O=(0,s.useMemo)(()=>{let e=new Map;if(A)for(let t of A){if(e.has(t.nodeId)||P.has(t.nodeId))continue;let n=t.text.trim();n.startsWith("@")&&-1===n.indexOf(" ")&&e.set(t.nodeId,{avatar:t.avatar,handle:t.handle,claimedAt:t.createdAt,did:t.did,rkey:t.rkey})}for(let[t,n]of I)e.has(t)||P.has(t)||e.set(t,n);return e},[A,I,P]),[H,U]=(0,s.useState)(!1),[V,Y]=(0,s.useState)([]),[q,J]=(0,s.useState)(!1),[ee,et]=(0,s.useState)(!1),[er,es]=(0,s.useState)(!1),[ei,el]=(0,s.useState)(null);(0,s.useEffect)(()=>{if(!i)return;let e=function(e,t,n){let r=[],s=new Set;function i(e){s.has(e.id)||(s.add(e.id),r.push(e))}for(let t of e){if(t.createdAt){let e=new Date(t.createdAt).getTime();isNaN(e)||i({id:"node-created:".concat(t.id,":").concat(e),type:"node-created",time:e,nodeId:t.id,nodeTitle:t.title,detail:t.issueType,meta:{issueType:t.issueType,prefix:t.prefix}})}if(t.closedAt){let e=new Date(t.closedAt).getTime();isNaN(e)||i({id:"node-closed:".concat(t.id,":").concat(e),type:"node-closed",time:e,nodeId:t.id,nodeTitle:t.title,detail:t.closeReason||"Closed",meta:{prefix:t.prefix}})}}for(let e of t)if(e.createdAt){let t=new Date(e.createdAt).getTime();if(!isNaN(t)){let n="object"==typeof e.source?e.source.id:e.source,r="object"==typeof e.target?e.target.id:e.target;i({id:"link-added:".concat(n,"->").concat(r,":").concat(t),type:"link-added",time:t,nodeId:n,detail:"".concat(e.type," ").concat(r),meta:{linkType:e.type,target:r}})}}if(n)for(let e of n){let t=new Date(e.createdAt).getTime();if(isNaN(t))continue;let n={handle:e.handle,avatar:e.avatar,did:e.did};for(let r of(i(e.text.startsWith("@")&&-1===e.text.trim().indexOf(" ")?{id:"task-claimed:".concat(e.nodeId,":").concat(t),type:"task-claimed",time:t,nodeId:e.nodeId,actor:n,detail:e.text}:e.replyTo?{id:"reply-added:".concat(e.nodeId,":").concat(e.rkey),type:"reply-added",time:t,nodeId:e.nodeId,actor:n,detail:e.text.length>80?e.text.slice(0,80)+"...":e.text}:{id:"comment-added:".concat(e.nodeId,":").concat(e.rkey),type:"comment-added",time:t,nodeId:e.nodeId,actor:n,detail:e.text.length>80?e.text.slice(0,80)+"...":e.text}),e.likes)){let t=new Date(r.createdAt).getTime();isNaN(t)||i({id:"like-added:".concat(e.nodeId,":").concat(r.rkey),type:"like-added",time:t,nodeId:e.nodeId,actor:{handle:r.handle,avatar:r.avatar,did:r.did},detail:"Liked comment by ".concat(e.handle)})}}return r.sort((e,t)=>t.time-e.time),r}(i.graphData.nodes,i.graphData.links,A);Y(t=>eu(t,e))},[i,A]);let[ea,eo]=(0,s.useState)(null),[ec,ex]=(0,s.useState)(null),[ef,ev]=(0,s.useState)(null),[eb,ej]=(0,s.useState)(null),[ey,ew]=(0,s.useState)(null),[ek,eL]=(0,s.useState)(!1),[eD,eA]=(0,s.useState)(""),[eT,eE]=(0,s.useState)(0),[eI,eB]=(0,s.useState)(!1),[eP,eW]=(0,s.useState)(0),[eF,eR]=(0,s.useState)(!1),[eO,e_]=(0,s.useState)(1),[eH,eU]=(0,s.useState)(null),[eV,eY]=(0,s.useState)(!0),[eq,eX]=(0,s.useState)(!0),eK=(0,s.useRef)(null),eG=(0,s.useRef)(null),eZ=(0,s.useRef)(null);(0,s.useEffect)(()=>{let e=null,t=null,n=null,r=!0;return function s(){(e=new EventSource("/api/beads/stream")).onmessage=e=>{if(r)try{let t=JSON.parse(e.data);if(t.error){d(t.error),o(!1);return}let n=eZ.current,r=g(n,t);if(!n){eZ.current=t,l(t),o(!1);return}if(!r.hasChanges)return;let s=function(e,t){let n=[],r=Date.now(),s=new Map(t.map(e=>[e.id,e]));for(let t of e.addedNodeIds){let e=s.get(t);n.push({id:"node-created:".concat(t,":").concat(r),type:"node-created",time:r,nodeId:t,nodeTitle:null==e?void 0:e.title,detail:(null==e?void 0:e.issueType)||"task",meta:e?{issueType:e.issueType,prefix:e.prefix}:void 0})}for(let t of e.removedNodeIds)n.push({id:"node-closed:".concat(t,":").concat(r),type:"node-closed",time:r,nodeId:t,detail:"Removed"});for(let[t,i]of e.changedNodes){let e=s.get(t);for(let s of i){let i;switch(s.field){case"status":default:i="node-status-changed";break;case"priority":i="node-priority-changed";break;case"title":i="node-title-changed";break;case"owner":i="node-owner-changed"}n.push({id:"".concat(i,":").concat(t,":").concat(r,":").concat(s.field),type:i,time:r,nodeId:t,nodeTitle:null==e?void 0:e.title,detail:"".concat(s.from," → ").concat(s.to),meta:{field:s.field,from:s.from,to:s.to}})}}for(let t of e.addedLinkKeys){let e=t.match(/^(.+)->(.+):(.+)$/);if(e){let[,s,i,l]=e;n.push({id:"link-added:".concat(t,":").concat(r),type:"link-added",time:r,nodeId:s,detail:"".concat(l," ").concat(i),meta:{linkType:l,target:i}})}}for(let t of e.removedLinkKeys){let e=t.match(/^(.+)->(.+):(.+)$/);if(e){let[,s,i,l]=e;n.push({id:"link-removed:".concat(t,":").concat(r),type:"link-removed",time:r,nodeId:s,detail:"".concat(l," ").concat(i),meta:{linkType:l,target:i}})}}return n}(r,t.graphData.nodes);s.length>0&&Y(e=>eu(e,s));let i=eM(n,t,r);eZ.current=i,l(i)}catch(e){console.error("Failed to parse SSE message:",e)}},e.onerror=()=>{(null==e?void 0:e.readyState)===EventSource.CLOSED&&(t=setTimeout(s,5e3))},n=setTimeout(()=>{r&&!eZ.current&&fetch("/api/beads").then(e=>e.json()).then(e=>{r&&!eZ.current&&(eZ.current=e,l(e),o(!1))}).catch(()=>{})},5e3)}(),()=>{r=!1,null==e||e.close(),t&&clearTimeout(t),n&&clearTimeout(n)}},[]),(0,s.useEffect)(()=>{fetch("/api/config").then(e=>e.json()).then(e=>{e.name&&w(e.name),e.repoCount&&N(e.repoCount),e.repoUrls&&C(e.repoUrls)}).catch(()=>{})},[]),(0,s.useEffect)(()=>{if(!i)return;let e=setTimeout(()=>{let e=Date.now(),t=i.graphData.nodes.filter(t=>!t._removeTime||e-t._removeTime<600),n=i.graphData.links.filter(t=>!t._removeTime||e-t._removeTime<600);(t.length!==i.graphData.nodes.length||n.length!==i.graphData.links.length)&&l(e=>e?{...e,graphData:{nodes:t,links:n}}:e)},700);return()=>clearTimeout(e)},[i]);let e$=(0,s.useMemo)(()=>i?function(e,t){let n=[];for(let t of e){let e=new Date(t.createdAt).getTime();if(isNaN(e)||n.push({time:e,type:"node-created",id:t.id}),t.closedAt){let e=new Date(t.closedAt).getTime();isNaN(e)||n.push({time:e,type:"node-closed",id:t.id})}}n.sort((e,t)=>e.time-t.time);let r=n.length>0?n[0].time:Date.now(),s=n.length>0?n[n.length-1].time:Date.now();return{events:n,minTime:r,maxTime:s}}(i.graphData.nodes,i.graphData.links):null,[i]),eJ=(0,s.useCallback)(()=>{eB(e=>{let t=!e;return t&&eW(-1),eR(!1),eU(null),t})},[]);(0,s.useEffect)(()=>{if(!eF||!eI||!e$)return;let e=setInterval(()=>{eW(e=>{let t=e+1;return t>=e$.events.length?(eR(!1),e):t})},2e3/eO);return()=>clearInterval(e)},[eF,eI,eO,e$]),(0,s.useEffect)(()=>{if(!eI||!i||!e$)return;if(-1===eP){eU(e=>{let t={...i,graphData:{nodes:[],links:[]}};if(!e)return t;let n=g(e,t);return n.hasChanges?eM(e,t,n):e});return}if(0===e$.events.length)return;let e=e$.events[eP];if(!e)return;let t=function(e,t,n){let r=new Set,s=[];for(let t of e){let e=new Date(t.createdAt).getTime();if(isNaN(e)||e>n)continue;r.add(t.id);let i=t.status;if(t.closedAt){let e=new Date(t.closedAt).getTime();!isNaN(e)&&e<=n?i="closed":"closed"===t.status&&(i="open")}i!==t.status?s.push({...t,status:i}):s.push(t)}let i=[];for(let e of t){let t="object"==typeof e.source?e.source.id:e.source,n="object"==typeof e.target?e.target.id:e.target;r.has(t)&&r.has(n)&&i.push({...e,source:t,target:n})}return{nodes:s,links:i}}(i.graphData.nodes,i.graphData.links,e.time),n={...i,graphData:{nodes:t.nodes,links:t.links}};eU(e=>{if(!e)return n;let t=g(e,n);return t.hasChanges?eM(e,n,t):e})},[eI,i,e$,eP]);let eQ=(0,s.useCallback)(e=>{x(t=>(null==t?void 0:t.id)===e.id?null:e),U(!1),J(!1),es(!1),el(null)},[]),e0=(0,s.useCallback)((e,t,n)=>{p(e),ew(e?{node:e,x:t,y:n}:null)},[]),e1=(0,s.useCallback)(e=>{v(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),e5=(0,s.useMemo)(()=>{if(!i)return new Set;let{nodes:e,links:t}=i.graphData,n=new Set;for(let e of t)if("parent-child"===e.type){let t="object"==typeof e.source?e.source.id:e.source;n.add(t)}let r=new Set(e.map(e=>e.id));for(let t of e)if(t.id.includes(".")){let e=t.id.split(".")[0];r.has(e)&&n.add(e)}return n},[i]),e2=(0,s.useCallback)(()=>{v(new Set(e5))},[e5]),e4=(0,s.useCallback)(()=>{v(new Set)},[]),e3=(0,s.useCallback)(()=>{es(!0),x(null),U(!1),J(!1),el(0)},[]),e6=(0,s.useCallback)(()=>{el(e=>null===e?null:e>=em.length-1?e:e+1)},[]),e8=(0,s.useCallback)(()=>{el(e=>null===e||e<=0?e:e-1)},[]),e7=(0,s.useCallback)(()=>{el(null)},[]),e9=(0,s.useCallback)(()=>{x(null),eo(null),ex(null)},[]),te=(0,s.useCallback)((e,t)=>{ex(null),ew(null),e.description||M||"epic"===e.issueType?eo({node:e,x:t.clientX,y:t.clientY}):ex({node:e,x:t.clientX,y:t.clientY})},[M]),tt=(0,s.useCallback)(async(e,t)=>{let n=await fetch("/api/records",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({collection:"org.impactindexer.review.comment",record:{$type:"org.impactindexer.review.comment",subject:{uri:"beads:".concat(e),type:"record"},text:t,createdAt:new Date().toISOString()}})});if(!n.ok)throw Error((await n.json()).error||"Failed to post comment");await E()},[E]),tn=(0,s.useCallback)(async e=>{if(!(null==S?void 0:S.handle))return;let t=S.avatar;if(!t&&S.did)try{let e=await fetch("https://public.api.bsky.app/xrpc/app.bsky.actor.getProfile?actor=".concat(encodeURIComponent(S.did)));e.ok&&(t=(await e.json()).avatar)}catch(e){}B(n=>{let r=new Map(n);return r.set(e,{avatar:t,claimedAt:new Date().toISOString(),handle:S.handle}),r}),await tt(e,"@".concat(S.handle)),setTimeout(()=>E(),3e3)},[null==S?void 0:S.handle,null==S?void 0:S.did,null==S?void 0:S.avatar,tt,E]),tr=(0,s.useCallback)(async e=>{let t=await fetch("/api/records?collection=".concat(encodeURIComponent("org.impactindexer.review.comment"),"&rkey=").concat(encodeURIComponent(e.rkey)),{method:"DELETE"});if(!t.ok)throw Error((await t.json()).error||"Failed to delete comment");await E()},[E]),ts=(0,s.useCallback)(async e=>{let t=O.get(e);t&&(F(t=>new Set(t).add(e)),B(t=>{let n=new Map(t);return n.delete(e),n}),t.rkey?(await tr({rkey:t.rkey}),F(t=>{let n=new Set(t);return n.delete(e),n})):setTimeout(async()=>{await E(),F(t=>{let n=new Set(t);return n.delete(e),n})},3e3))},[O,tr,E]),ti=(0,s.useCallback)(async e=>{let t=e.likes.find(e=>e.did===(null==S?void 0:S.did));if(t){let e=await fetch("/api/records?collection=".concat(encodeURIComponent("org.impactindexer.review.like"),"&rkey=").concat(encodeURIComponent(t.rkey)),{method:"DELETE"});if(!e.ok)throw Error((await e.json()).error||"Failed to unlike")}else{let t=await fetch("/api/records",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({collection:"org.impactindexer.review.like",record:{subject:{uri:e.uri,type:"record"},createdAt:new Date().toISOString()}})});if(!t.ok)throw Error((await t.json()).error||"Failed to like")}await E()},[null==S?void 0:S.did,E]),tl=(0,s.useCallback)(async(e,t)=>{let n=await fetch("/api/records",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({collection:"org.impactindexer.review.comment",record:{subject:{uri:"beads:".concat(e.nodeId),type:"record"},text:t,replyTo:e.uri,createdAt:new Date().toISOString()}})});if(!n.ok)throw Error((await n.json()).error||"Failed to post reply");await E()},[E]),ta=(0,s.useCallback)(e=>{if(!i)return;let t=i.graphData.nodes.find(t=>t.id===e);t&&x(t)},[i]),to=(0,s.useMemo)(()=>{let e=new Map;if(!A)return e;let t=new Map;for(let e of A)t.has(e.nodeId)||t.set(e.nodeId,new Set),t.get(e.nodeId).add(e.handle),e.displayName&&t.get(e.nodeId).add(e.displayName);for(let[n,r]of t)e.set(n,Array.from(r).join(" "));return e},[A]),tc=(0,s.useMemo)(()=>{if(!i||!eD.trim())return[];let e=eD.toLowerCase();return i.graphData.nodes.filter(t=>{let n=to.get(t.id)||"";return"".concat(t.id," ").concat(t.title," ").concat(t.prefix," ").concat(t.owner||""," ").concat(t.assignee||""," ").concat(t.createdBy||""," ").concat(n).toLowerCase().includes(e)}).slice(0,8)},[eD,i,to]);(0,s.useEffect)(()=>{eE(0)},[eD]);let td=(0,s.useCallback)(e=>{var t;null===(t=eK.current)||void 0===t||t.focusNode(e),eL(!1),eA(""),eE(0)},[]);(0,s.useEffect)(()=>{let e=e=>{(e.ctrlKey||e.metaKey)&&"f"===e.key&&(e.preventDefault(),eL(!0),setTimeout(()=>{var e;return null===(e=eG.current)||void 0===e?void 0:e.focus()},50)),"Escape"===e.key&&ek&&(eL(!1),eA(""),eE(0))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[ek]);let tu=(0,s.useCallback)(e=>{"ArrowDown"===e.key?(e.preventDefault(),eE(e=>Math.min(e+1,tc.length-1))):"ArrowUp"===e.key?(e.preventDefault(),eE(e=>Math.max(e-1,0))):"Enter"===e.key&&tc.length>0&&(e.preventDefault(),td(tc[eT]))},[tc,eT,td]);return a?(0,r.jsxs)("div",{className:"h-screen flex flex-col items-center justify-center bg-white",children:[(0,r.jsxs)("div",{className:"relative mb-6",children:[(0,r.jsx)("div",{className:"w-12 h-12 border-2 border-zinc-200 border-t-emerald-500 rounded-full animate-spin"}),(0,r.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,r.jsx)("div",{className:"w-2 h-2 rounded-full bg-emerald-500"})})]}),(0,r.jsx)("p",{className:"text-sm text-zinc-500 animate-pulse-soft",children:"Loading beads graph..."}),(0,r.jsx)("p",{className:"text-xs text-zinc-400 mt-1",children:"Parsing issues and dependencies"})]}):c?(0,r.jsx)("div",{className:"h-screen flex items-center justify-center bg-white",children:(0,r.jsxs)("div",{className:"max-w-sm text-center",children:[(0,r.jsx)("div",{className:"w-14 h-14 mx-auto mb-4 bg-red-50 rounded-full flex items-center justify-center",children:(0,r.jsx)("svg",{className:"w-7 h-7 text-red-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),(0,r.jsx)("h2",{className:"text-lg font-semibold text-zinc-900 mb-1",children:"Unable to load data"}),(0,r.jsx)("p",{className:"text-sm text-zinc-500 mb-4",children:c}),(0,r.jsxs)("button",{onClick:()=>window.location.reload(),className:"inline-flex items-center gap-2 px-4 py-2 bg-emerald-600 text-white text-sm rounded-lg hover:bg-emerald-700 transition-colors",children:[(0,r.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),"Try Again"]})]})}):i?(0,r.jsxs)("div",{className:"h-screen flex flex-col overflow-hidden bg-white",children:[(0,r.jsx)("header",{className:"sticky top-0 z-50 shrink-0 bg-white/95 backdrop-blur-sm border-b border-zinc-200/80",children:(0,r.jsxs)("div",{className:"px-6 h-14 flex items-center",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3 shrink-0 group",children:[(0,r.jsx)(G,{className:"w-8 h-8 text-emerald-500 transition-transform group-hover:scale-105"}),(0,r.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,r.jsx)("h1",{className:"text-[15px] font-semibold text-zinc-900 tracking-tight",children:y}),(0,r.jsx)("span",{className:"font-normal text-zinc-400 text-[15px] hidden sm:inline",children:"heartbeads"}),k>1&&(0,r.jsxs)("span",{className:"text-[10px] text-zinc-400 bg-zinc-100 rounded-full px-1.5 py-0.5 font-medium hidden sm:inline",children:[k," repos"]})]})]}),(0,r.jsx)("div",{className:"flex-1 flex justify-center px-4",children:(0,r.jsx)("div",{className:"relative w-full max-w-md","data-tutorial":"search",children:ek?(0,r.jsxs)("div",{className:"flex flex-col",children:[(0,r.jsxs)("div",{className:"flex items-center bg-white rounded-full border border-zinc-200 shadow-sm overflow-hidden",children:[(0,r.jsx)("div",{className:"pl-3 pr-1 text-zinc-400",children:(0,r.jsx)("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),(0,r.jsx)("input",{ref:eG,type:"text",value:eD,onChange:e=>eA(e.target.value),onKeyDown:tu,placeholder:"Search issues...",className:"flex-1 px-2 py-1.5 text-xs text-zinc-800 bg-transparent outline-none placeholder:text-zinc-400",autoFocus:!0}),(0,r.jsx)("button",{onClick:()=>{eL(!1),eA(""),eE(0)},className:"px-2 py-1.5 text-zinc-400 hover:text-zinc-600",children:(0,r.jsx)("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),eD.trim()&&(0,r.jsxs)("div",{className:"absolute top-full left-0 right-0 mt-2 bg-white rounded-xl border border-zinc-100 shadow-xl overflow-hidden max-h-72 overflow-y-auto z-50",children:[0===tc.length?(0,r.jsx)("div",{className:"px-3 py-3 text-xs text-zinc-400 text-center",children:"No matching issues"}):tc.map((e,t)=>(0,r.jsxs)("button",{onClick:()=>td(e),onMouseEnter:()=>eE(t),className:"w-full text-left px-3 py-2 text-xs transition-colors flex items-start gap-2.5 ".concat(t===eT?"bg-emerald-50":"hover:bg-zinc-50"),children:[(0,r.jsx)("div",{className:"shrink-0 mt-1",children:(0,r.jsx)("div",{className:"w-2 h-2 rounded-full ".concat(eS[e.status]||"bg-zinc-400")})}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("span",{className:"font-medium text-zinc-600 shrink-0",children:e.id}),e.priority<=1&&(0,r.jsx)("span",{className:"text-[10px]",children:0===e.priority?"\uD83D\uDD25\uD83D\uDD25":"\uD83D\uDD25"})]}),(0,r.jsx)("div",{className:"text-zinc-400 truncate mt-0.5",children:e.title})]}),(0,r.jsx)("span",{className:"shrink-0 text-[10px] text-zinc-400 bg-zinc-100 rounded px-1 py-0.5 mt-0.5",children:e.prefix})]},e.id)),tc.length>0&&(0,r.jsxs)("div",{className:"px-3 py-1.5 text-[10px] text-zinc-400 border-t border-zinc-100 bg-zinc-50/50 flex items-center justify-between",children:[(0,r.jsxs)("span",{children:[tc.length," result",1!==tc.length?"s":""]}),(0,r.jsxs)("span",{children:[(0,r.jsx)("kbd",{className:"px-1 py-0.5 bg-white rounded border border-zinc-200 text-[9px] font-mono",children:"Enter"})," ","to focus"]})]})]})]}):(0,r.jsxs)("button",{onClick:()=>{eL(!0),setTimeout(()=>{var e;return null===(e=eG.current)||void 0===e?void 0:e.focus()},50)},className:"w-full flex items-center gap-2 px-3.5 py-1.5 text-sm text-zinc-400 rounded-full bg-zinc-50/80 border border-zinc-200/60 hover:text-zinc-500 hover:border-zinc-300 hover:bg-zinc-100/50 transition-all",title:"Search issues (Ctrl+F)",children:[(0,r.jsx)("svg",{className:"w-3.5 h-3.5 shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),(0,r.jsx)("span",{className:"flex-1 text-left",children:"Search issues..."}),(0,r.jsxs)("kbd",{className:"hidden sm:inline-block px-1 py-0.5 bg-zinc-100 rounded border border-zinc-200 text-[9px] font-mono text-zinc-400",children:["undefined"!=typeof navigator&&(null===(e=navigator.platform)||void 0===e?void 0:e.includes("Mac"))?"⌘":"Ctrl","F"]})]})})}),(0,r.jsxs)("div",{className:"hidden md:flex items-center gap-1 shrink-0","data-tutorial":"nav-pills",children:[(0,r.jsxs)("button",{onClick:eJ,className:"flex items-center gap-1.5 px-4 py-2 text-sm font-medium rounded-full transition-colors ".concat(eI?"text-emerald-700 bg-emerald-50":"text-zinc-500 hover:text-zinc-900 hover:bg-zinc-50"),children:[(0,r.jsxs)("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,r.jsx)("circle",{cx:"8",cy:"8",r:"6"}),(0,r.jsx)("polyline",{points:"8,4 8,8 11,10"})]}),(0,r.jsx)("span",{className:"hidden sm:inline",children:"Replay"})]}),(0,r.jsxs)("button",{onClick:()=>{U(e=>!e),H||(x(null),J(!1),es(!1),el(null))},className:"flex items-center gap-1.5 px-4 py-2 text-sm font-medium rounded-full transition-colors ".concat(H?"text-emerald-700 bg-emerald-50":"text-zinc-500 hover:text-zinc-900 hover:bg-zinc-50"),children:[(0,r.jsx)("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12.76c0 1.6 1.123 2.994 2.707 3.227 1.087.16 2.185.283 3.293.369V21l4.076-4.076a1.526 1.526 0 011.037-.443 48.282 48.282 0 005.68-.494c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0012 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018z"})}),(0,r.jsx)("span",{className:"hidden sm:inline",children:"Comments"})]}),(0,r.jsxs)("button",{onClick:()=>{J(e=>!e),q||(x(null),U(!1),es(!1),el(null))},className:"flex items-center gap-1.5 px-4 py-2 text-sm font-medium rounded-full transition-colors ".concat(q?"text-emerald-700 bg-emerald-50":"text-zinc-500 hover:text-zinc-900 hover:bg-zinc-50"),children:[(0,r.jsxs)("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,r.jsx)("circle",{cx:"8",cy:"8",r:"6"}),(0,r.jsx)("polyline",{points:"8,4 8,8 11,10"})]}),(0,r.jsx)("span",{className:"hidden sm:inline",children:"Activity"})]}),(0,r.jsxs)("button",{onClick:()=>{es(e=>!e),er||(x(null),U(!1),J(!1))},className:"flex items-center gap-1.5 px-4 py-2 text-sm font-medium rounded-full transition-colors ".concat(er?"text-emerald-700 bg-emerald-50":"text-zinc-500 hover:text-zinc-900 hover:bg-zinc-50"),children:[(0,r.jsx)("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 18v-5.25m0 0a6.01 6.01 0 001.5-.189m-1.5.189a6.01 6.01 0 01-1.5-.189m3.75 7.478a12.06 12.06 0 01-4.5 0m3.75 2.383a14.406 14.406 0 01-3 0M14.25 18v-.192c0-.983.658-1.823 1.508-2.316a7.5 7.5 0 10-7.517 0c.85.493 1.509 1.333 1.509 2.316V18"})}),(0,r.jsx)("span",{className:"hidden sm:inline",children:"Learn"})]}),(0,r.jsx)("div",{className:"w-px h-5 bg-zinc-200 mx-2"}),(0,r.jsx)(K,{})]})]})}),(0,r.jsxs)("div",{className:"flex-1 flex overflow-hidden relative",children:[(0,r.jsxs)("div",{className:"flex-1 relative bg-zinc-50/50",children:[(0,r.jsx)("div",{className:"absolute inset-0 opacity-[0.03]",style:{backgroundImage:"radial-gradient(circle, #000 1px, transparent 1px)",backgroundSize:"24px 24px"}}),(0,r.jsx)(T,{ref:eK,nodes:eI&&eH?eH.graphData.nodes:i.graphData.nodes,links:eI&&eH?eH.graphData.links:i.graphData.links,selectedNode:u,hoveredNode:m,onNodeClick:eQ,onNodeHover:e0,onBackgroundClick:e9,onNodeRightClick:te,commentedNodeIds:D,claimedNodeAvatars:O,onAvatarHover:ej,timelineActive:eI,stats:i.stats,sidebarOpen:!!u||H||q||er,collapsedEpicIds:f,onCollapseAll:e2,onExpandAll:e4,colorMode:b,onColorModeChange:j,autoFit:eV,onAutoFitToggle:()=>eY(e=>!e),pulseNodeId:V.length>0?V[0].nodeId:null,showPulse:eq,onShowPulseToggle:()=>eX(e=>!e)}),eI&&e$&&e$.events.length>0&&(0,r.jsx)("div",{className:"absolute bottom-4 z-10 transition-[right] duration-300 ease-out",style:{right:u||H||q?"calc(360px + 1rem)":"1rem"},children:(0,r.jsx)(eC,{totalSteps:e$.events.length,currentStep:Math.max(eP,0),currentTime:eP>=0&&null!==(n=null===(t=e$.events[eP])||void 0===t?void 0:t.time)&&void 0!==n?n:e$.minTime,isPlaying:eF,speed:eO,onStepChange:eW,onPlayPause:()=>eR(e=>!e),onSpeedChange:e_})}),!u&&!H&&!q&&!er&&!eI&&(0,r.jsx)("div",{className:"absolute top-3 right-3 sm:top-4 sm:right-4 z-10",children:(0,r.jsx)(ed,{events:V,collapsed:ee,onToggleCollapse:()=>et(e=>!e),onExpandPanel:()=>{J(!0),x(null),U(!1),es(!1)},onNodeClick:e=>{let t=null==i?void 0:i.graphData.nodes.find(t=>t.id===e);t&&td(t)}})}),ea&&(0,r.jsx)($,{node:ea.node,x:ea.x,y:ea.y,onShowDescription:()=>{ev(ea.node),eo(null)},onAddComment:()=>{ex({node:ea.node,x:ea.x,y:ea.y}),eo(null)},onClaimTask:M&&!O.has(ea.node.id)?()=>{tn(ea.node.id),eo(null)}:void 0,onUnclaimTask:(()=>{if(!M)return;let e=O.get(ea.node.id);if(e&&(e.did===(null==S?void 0:S.did)||!e.did))return()=>{ts(ea.node.id),eo(null)}})(),onCollapseEpic:"epic"!==ea.node.issueType||f.has(ea.node.id)?void 0:()=>{e1(ea.node.id),eo(null)},onUncollapseEpic:"epic"===ea.node.issueType&&f.has(ea.node.id)?()=>{e1(ea.node.id),eo(null)}:void 0,onClose:()=>eo(null)}),ec&&(0,r.jsx)(Z,{node:ec.node,x:ec.x,y:ec.y,onClose:()=>ex(null),onSubmit:async e=>{await tt(ec.node.id,e),ex(null)},isAuthenticated:M,existingComments:L.get(ec.node.id)}),ef&&(0,r.jsx)(R,{node:ef,onClose:()=>ev(null),repoUrl:z[ef.prefix]}),ey&&!eb&&(0,r.jsx)(Q,{node:ey.node,x:ey.x,y:ey.y,prefixColor:h(ey.node.prefix),allNodes:eI&&eH?eH.graphData.nodes:i.graphData.nodes}),eb&&(0,r.jsx)("div",{style:{position:"fixed",left:eb.x+12,top:eb.y-8,zIndex:90,pointerEvents:"none"},children:(0,r.jsxs)("div",{className:"flex items-center gap-2 bg-white border border-zinc-200 rounded-lg shadow-lg px-2.5 py-2",children:[eb.avatar?(0,r.jsx)("img",{src:eb.avatar,alt:"",className:"w-6 h-6 rounded-full shrink-0"}):(0,r.jsx)("div",{className:"w-6 h-6 rounded-full bg-zinc-200 flex items-center justify-center text-[10px] font-medium text-zinc-500 shrink-0",children:eb.handle.charAt(0).toUpperCase()}),(0,r.jsxs)("div",{className:"flex flex-col",children:[(0,r.jsxs)("span",{className:"text-xs text-zinc-700 whitespace-nowrap",children:[eb.did?(0,r.jsx)("a",{href:"https://www.impactindexer.org/data?did=".concat(eb.did),target:"_blank",rel:"noopener noreferrer",className:"font-semibold text-zinc-800 hover:text-emerald-600 transition-colors",style:{pointerEvents:"auto"},children:eb.handle}):(0,r.jsx)("span",{className:"font-semibold text-zinc-800",children:eb.handle})," claimed this task"]}),(0,r.jsx)("span",{className:"text-[10px] text-zinc-400",children:W(eb.claimedAt)})]})]})})]}),(0,r.jsxs)("aside",{className:"hidden md:flex absolute top-0 right-0 h-full w-[360px] bg-white border-l border-zinc-200 flex-col shadow-xl z-30 transform transition-transform duration-300 ease-out ".concat(u?"translate-x-0":"translate-x-full"),children:[(0,r.jsxs)("div",{className:"shrink-0 px-5 py-3 border-b border-zinc-100 flex items-center justify-between",children:[(0,r.jsx)("h2",{className:"text-xs font-semibold text-zinc-400 uppercase tracking-wider",children:"Node Detail"}),(0,r.jsx)("button",{onClick:()=>{x(null)},className:"p-1 text-zinc-400 hover:text-zinc-600 transition-colors rounded-full hover:bg-zinc-100",children:(0,r.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:1.5,children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),(0,r.jsx)("div",{className:"flex-1 overflow-y-auto custom-scrollbar px-5 py-4 space-y-5",children:(0,r.jsx)(_,{node:u,allNodes:i.graphData.nodes,onNodeNavigate:ta,comments:u?L.get(u.id):void 0,onPostComment:u?e=>tt(u.id,e):void 0,onDeleteComment:tr,onLikeComment:ti,onReplyComment:tl,isAuthenticated:M,currentDid:null==S?void 0:S.did,repoUrls:z})})]}),(0,r.jsx)("div",{className:"md:hidden fixed inset-x-0 bottom-0 z-20 transform transition-transform duration-300 ease-out ".concat(u?"translate-y-0":"translate-y-full"),children:(0,r.jsxs)("div",{className:"bg-white rounded-t-2xl border-t border-zinc-200 shadow-lg max-h-[60vh] flex flex-col",children:[(0,r.jsxs)("div",{className:"shrink-0 flex items-center justify-between px-4 pt-3 pb-2",children:[(0,r.jsx)("div",{className:"w-8 h-1 bg-zinc-300 rounded-full mx-auto"}),(0,r.jsx)("button",{onClick:()=>x(null),className:"absolute right-3 top-3 p-1 text-zinc-400 hover:text-zinc-600",children:(0,r.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),(0,r.jsx)("div",{className:"flex-1 overflow-y-auto custom-scrollbar px-4 pb-6 space-y-4",children:(0,r.jsx)(_,{node:u,allNodes:i.graphData.nodes,onNodeNavigate:ta,comments:u?L.get(u.id):void 0,onPostComment:u?e=>tt(u.id,e):void 0,onDeleteComment:tr,onLikeComment:ti,onReplyComment:tl,isAuthenticated:M,currentDid:null==S?void 0:S.did,repoUrls:z})})]})}),(0,r.jsx)(en,{isOpen:H,onClose:()=>U(!1),allComments:A,onNodeNavigate:e=>{ta(e),U(!1)},isAuthenticated:M,currentDid:null==S?void 0:S.did,onLikeComment:ti,onDeleteComment:tr}),(0,r.jsx)(eh,{events:V,isOpen:q,onClose:()=>J(!1),onNodeClick:e=>{let t=null==i?void 0:i.graphData.nodes.find(t=>t.id===e);t&&(td(t),J(!1))}}),(0,r.jsx)(eg,{isOpen:er,onClose:()=>{es(!1),el(null)},tutorialStep:ei,onStartTutorial:e3,onNextStep:e6,onPrevStep:e8,onEndTutorial:e7})]}),(0,r.jsx)(ep,{step:ei,onNext:e6,onPrev:e8,onEnd:e7})]}):null}},7796:function(e,t,n){"use strict";n.d(t,{AuthProvider:function(){return l},a:function(){return a}});var r=n(3890),s=n(8496);let i=(0,s.createContext)(null);function l(e){let{children:t}=e,[n,l]=(0,s.useState)({status:"idle",session:null,error:null,isLoading:!0});(0,s.useEffect)(()=>{let e=!1;return(async()=>{try{let t=await fetch("/api/status");if(t.ok){let n=await t.json();if(n.did&&!e){l({status:"authenticated",session:{did:n.did,handle:n.handle||n.did,displayName:n.displayName,avatar:n.avatar},error:null,isLoading:!1});return}}}catch(e){console.error("Failed to check auth status:",e)}e||l(e=>({...e,isLoading:!1}))})(),()=>{e=!0}},[]);let a=(0,s.useCallback)(async e=>{l(e=>({...e,status:"authorizing",isLoading:!0,error:null}));try{let t=e.includes(".")?e:"".concat(e,".bsky.social"),n=await fetch("/api/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({handle:t,returnTo:window.location.pathname+window.location.search})});if(!n.ok){let e=await n.json();throw Error(e.error||"Login failed")}let r=await n.json();window.location.href=r.redirectUrl}catch(t){let e=t instanceof Error?t:Error("Login failed");throw l({status:"error",session:null,error:e,isLoading:!1}),e}},[]),o=(0,s.useCallback)(async()=>{try{await fetch("/api/logout",{method:"POST"})}catch(e){console.error("Logout request failed:",e)}l({status:"idle",session:null,error:null,isLoading:!1})},[]);return(0,r.jsx)(i.Provider,{value:{state:n,login:a,logout:o},children:t})}function a(){let e=(0,s.useContext)(i);if(!e)throw Error("useAuth must be used within an AuthProvider");let{state:t,login:n,logout:r}=e;return{status:t.status,session:t.session,error:t.error,isLoading:t.isLoading,isAuthenticated:"authenticated"===t.status,login:n,logout:r}}}},function(e){e.O(0,[971,649,945,744],function(){return e(e.s=6284)}),_N_E=e.O()}]);
@@ -1,3 +0,0 @@
1
- *,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*
2
- ! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com
3
- */*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:JetBrains Mono,Fira Code,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}body,html{height:100%;overflow:hidden}body{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1));--tw-text-opacity:1;color:rgb(39 39 42/var(--tw-text-opacity,1));-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-feature-settings:"rlig" 1,"calt" 1}.\!container{width:100%!important}.container{width:100%}@media (min-width:640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media (min-width:768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width:1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media (min-width:1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media (min-width:1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.status-badge{display:inline-flex;align-items:center;border-radius:9999px;padding:.125rem .5rem;font-size:.75rem;line-height:1rem;font-weight:500}.custom-scrollbar::-webkit-scrollbar{width:4px}.custom-scrollbar::-webkit-scrollbar-track{background-color:transparent}.custom-scrollbar::-webkit-scrollbar-thumb{border-radius:9999px;--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity,1))}.custom-scrollbar::-webkit-scrollbar-thumb:hover{--tw-bg-opacity:1;background-color:rgb(212 212 216/var(--tw-bg-opacity,1))}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.inset-x-0{left:0;right:0}.bottom-0{bottom:0}.bottom-2{bottom:.5rem}.bottom-4{bottom:1rem}.left-0{left:0}.left-2{left:.5rem}.left-3{left:.75rem}.left-4{left:1rem}.right-0{right:0}.right-2{right:.5rem}.right-3{right:.75rem}.top-0{top:0}.top-2{top:.5rem}.top-3{top:.75rem}.top-full{top:100%}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-50{z-index:50}.z-\[100\]{z-index:100}.z-\[1\]{z-index:1}.z-\[55\]{z-index:55}.z-\[56\]{z-index:56}.z-\[60\]{z-index:60}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.-mr-0\.5{margin-right:-.125rem}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-2\.5{margin-bottom:.625rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-4{margin-left:1rem}.ml-auto{margin-left:auto}.mr-1\.5{margin-right:.375rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-5{margin-top:1.25rem}.mt-\[6px\]{margin-top:6px}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-40{max-height:10rem}.max-h-72{max-height:18rem}.max-h-\[260px\]{max-height:260px}.max-h-\[60vh\]{max-height:60vh}.max-h-\[70vh\]{max-height:70vh}.max-h-\[80vh\]{max-height:80vh}.min-h-\[300px\]{min-height:300px}.w-0\.5{width:.125rem}.w-1{width:.25rem}.w-1\.5{width:.375rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-44{width:11rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-\[360px\]{width:360px}.w-\[90vw\]{width:90vw}.w-full{width:100%}.w-px{width:1px}.min-w-0{min-width:0}.min-w-\[18px\]{min-width:18px}.min-w-\[280px\]{min-width:280px}.max-w-2xl{max-width:42rem}.max-w-\[100px\]{max-width:100px}.max-w-\[140px\]{max-width:140px}.max-w-\[480px\]{max-width:480px}.max-w-\[80px\]{max-width:80px}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.flex-1{flex:1 1 0%}.flex-shrink-0,.shrink-0{flex-shrink:0}.translate-x-0{--tw-translate-x:0px}.translate-x-0,.translate-x-full{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-full{--tw-translate-x:100%}.translate-y-0{--tw-translate-y:0px}.translate-y-0,.translate-y-full{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-full{--tw-translate-y:100%}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-crosshair{cursor:crosshair}.cursor-e-resize{cursor:e-resize}.cursor-n-resize{cursor:n-resize}.cursor-ne-resize{cursor:ne-resize}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.resize{resize:both}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-1{row-gap:.25rem}.gap-y-1\.5{row-gap:.375rem}.space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-zinc-50>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(250 250 250/var(--tw-divide-opacity,1))}.self-stretch{align-self:stretch}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis}.truncate,.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.rounded-r-lg{border-top-right-radius:.5rem;border-bottom-right-radius:.5rem}.rounded-t-2xl{border-top-left-radius:1rem;border-top-right-radius:1rem}.rounded-t-lg{border-top-left-radius:.5rem}.rounded-t-lg,.rounded-tr-lg{border-top-right-radius:.5rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-t{border-top-width:1px}.border-emerald-200{--tw-border-opacity:1;border-color:rgb(167 243 208/var(--tw-border-opacity,1))}.border-emerald-500{--tw-border-opacity:1;border-color:rgb(16 185 129/var(--tw-border-opacity,1))}.border-transparent{border-color:transparent}.border-zinc-100{--tw-border-opacity:1;border-color:rgb(244 244 245/var(--tw-border-opacity,1))}.border-zinc-100\/60{border-color:hsla(240,5%,96%,.6)}.border-zinc-100\/80{border-color:hsla(240,5%,96%,.8)}.border-zinc-200{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity,1))}.border-zinc-200\/60{border-color:hsla(240,6%,90%,.6)}.border-zinc-200\/80{border-color:hsla(240,6%,90%,.8)}.border-zinc-50{--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}.border-t-emerald-500{--tw-border-opacity:1;border-top-color:rgb(16 185 129/var(--tw-border-opacity,1))}.border-t-zinc-400{--tw-border-opacity:1;border-top-color:rgb(161 161 170/var(--tw-border-opacity,1))}.bg-amber-400{--tw-bg-opacity:1;background-color:rgb(251 191 36/var(--tw-bg-opacity,1))}.bg-amber-500{--tw-bg-opacity:1;background-color:rgb(245 158 11/var(--tw-bg-opacity,1))}.bg-black\/20{background-color:rgba(0,0,0,.2)}.bg-black\/40{background-color:rgba(0,0,0,.4)}.bg-blue-400{--tw-bg-opacity:1;background-color:rgb(96 165 250/var(--tw-bg-opacity,1))}.bg-emerald-100{--tw-bg-opacity:1;background-color:rgb(209 250 229/var(--tw-bg-opacity,1))}.bg-emerald-400{--tw-bg-opacity:1;background-color:rgb(52 211 153/var(--tw-bg-opacity,1))}.bg-emerald-50{--tw-bg-opacity:1;background-color:rgb(236 253 245/var(--tw-bg-opacity,1))}.bg-emerald-50\/30{background-color:rgba(236,253,245,.3)}.bg-emerald-500{--tw-bg-opacity:1;background-color:rgb(16 185 129/var(--tw-bg-opacity,1))}.bg-emerald-600{--tw-bg-opacity:1;background-color:rgb(5 150 105/var(--tw-bg-opacity,1))}.bg-red-300{--tw-bg-opacity:1;background-color:rgb(252 165 165/var(--tw-bg-opacity,1))}.bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.bg-rose-300{--tw-bg-opacity:1;background-color:rgb(253 164 175/var(--tw-bg-opacity,1))}.bg-transparent{background-color:transparent}.bg-violet-500{--tw-bg-opacity:1;background-color:rgb(139 92 246/var(--tw-bg-opacity,1))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-white\/90{background-color:hsla(0,0%,100%,.9)}.bg-white\/95{background-color:hsla(0,0%,100%,.95)}.bg-zinc-100{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.bg-zinc-200{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity,1))}.bg-zinc-300{--tw-bg-opacity:1;background-color:rgb(212 212 216/var(--tw-bg-opacity,1))}.bg-zinc-400{--tw-bg-opacity:1;background-color:rgb(161 161 170/var(--tw-bg-opacity,1))}.bg-zinc-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.bg-zinc-50\/30{background-color:hsla(0,0%,98%,.3)}.bg-zinc-50\/50{background-color:hsla(0,0%,98%,.5)}.bg-zinc-50\/80{background-color:hsla(0,0%,98%,.8)}.bg-zinc-50\/95{background-color:hsla(0,0%,98%,.95)}.object-cover{-o-object-fit:cover;object-fit:cover}.p-1{padding:.25rem}.p-3{padding:.75rem}.p-6{padding:1.5rem}.p-\[18px_20px\]{padding:18px 20px}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-1{padding-bottom:.25rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pb-6{padding-bottom:1.5rem}.pl-3{padding-left:.75rem}.pr-1{padding-right:.25rem}.pr-3{padding-right:.75rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-\[20vh\]{padding-top:20vh}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:JetBrains Mono,Fira Code,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[12px\]{font-size:12px}.text-\[13px\]{font-size:13px}.text-\[15px\]{font-size:15px}.text-\[7px\]{font-size:7px}.text-\[8px\]{font-size:8px}.text-\[9px\]{font-size:9px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-amber-500{--tw-text-opacity:1;color:rgb(245 158 11/var(--tw-text-opacity,1))}.text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.text-emerald-500{--tw-text-opacity:1;color:rgb(16 185 129/var(--tw-text-opacity,1))}.text-emerald-600{--tw-text-opacity:1;color:rgb(5 150 105/var(--tw-text-opacity,1))}.text-emerald-700{--tw-text-opacity:1;color:rgb(4 120 87/var(--tw-text-opacity,1))}.text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.text-rose-400{--tw-text-opacity:1;color:rgb(251 113 133/var(--tw-text-opacity,1))}.text-rose-500{--tw-text-opacity:1;color:rgb(244 63 94/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.text-zinc-200{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}.text-zinc-300{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.text-zinc-400{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.text-zinc-500{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.text-zinc-600{--tw-text-opacity:1;color:rgb(82 82 91/var(--tw-text-opacity,1))}.text-zinc-700{--tw-text-opacity:1;color:rgb(63 63 70/var(--tw-text-opacity,1))}.text-zinc-800{--tw-text-opacity:1;color:rgb(39 39 42/var(--tw-text-opacity,1))}.text-zinc-900{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.placeholder-zinc-400::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity,1))}.placeholder-zinc-400::placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity,1))}.opacity-0{opacity:0}.opacity-25{opacity:.25}.opacity-50{opacity:.5}.opacity-75{opacity:.75}.opacity-\[0\.03\]{opacity:.03}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-2xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px rgba(0,0,0,.25);--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-lg,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring,.ring-1{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-emerald-400\/60{--tw-ring-color:rgba(52,211,153,.6)}.ring-zinc-100{--tw-ring-opacity:1;--tw-ring-color:rgb(244 244 245/var(--tw-ring-opacity,1))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur:blur(4px);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[right\]{transition-property:right;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}@keyframes fadeIn{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.animate-fade-in{animation:fadeIn .3s ease-out forwards}@keyframes pulseSoft{0%,to{opacity:1}50%{opacity:.6}}.animate-pulse-soft{animation:pulseSoft 2s ease-in-out infinite}@keyframes beadTooltipFade{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.description-markdown h1,.description-markdown h2,.description-markdown h3,.description-markdown h4{margin-top:.5rem;margin-bottom:.25rem;font-weight:600;--tw-text-opacity:1;color:rgb(63 63 70/var(--tw-text-opacity,1))}.description-markdown h1{font-size:.85rem}.description-markdown h2{font-size:.8rem}.description-markdown h3{font-size:.75rem}.description-markdown h4{font-size:.7rem}.description-markdown p{margin-bottom:.375rem}.description-markdown p:last-child{margin-bottom:0}.description-markdown ol,.description-markdown ul{margin-bottom:.375rem}.description-markdown ol>:not([hidden])~:not([hidden]),.description-markdown ul>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.description-markdown ol,.description-markdown ul{padding-left:1rem}.description-markdown ul{list-style-type:disc}.description-markdown ol{list-style-type:decimal}.description-markdown code{border-radius:.25rem;background-color:hsla(240,6%,90%,.6);padding:.125rem .25rem;font-family:JetBrains Mono,Fira Code,monospace;font-size:10px;--tw-text-opacity:1;color:rgb(63 63 70/var(--tw-text-opacity,1))}.description-markdown pre{margin-bottom:.375rem;overflow-x:auto;border-radius:.375rem;background-color:hsla(240,6%,90%,.6);padding:.5rem}.description-markdown pre code{background-color:transparent;padding:0;font-size:10px}.description-markdown a{--tw-text-opacity:1;color:rgb(5 150 105/var(--tw-text-opacity,1));text-decoration-line:underline;text-underline-offset:2px}.description-markdown a:hover{--tw-text-opacity:1;color:rgb(4 120 87/var(--tw-text-opacity,1))}.description-markdown blockquote{margin-top:.375rem;margin-bottom:.375rem;border-left-width:2px;--tw-border-opacity:1;border-color:rgb(212 212 216/var(--tw-border-opacity,1));padding-left:.5rem;font-style:italic;--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.description-markdown table{margin-bottom:.375rem;width:100%;border-collapse:collapse;font-size:10px}.description-markdown th{border-bottom-width:1px;--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity,1));padding-bottom:.125rem;padding-right:.5rem;text-align:left;font-weight:600;--tw-text-opacity:1;color:rgb(82 82 91/var(--tw-text-opacity,1))}.description-markdown td{border-bottom-width:1px;--tw-border-opacity:1;border-color:rgb(244 244 245/var(--tw-border-opacity,1));padding-top:.125rem;padding-bottom:.125rem;padding-right:.5rem}.description-markdown hr{margin-top:.5rem;margin-bottom:.5rem;--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity,1))}.description-markdown strong{font-weight:600;--tw-text-opacity:1;color:rgb(63 63 70/var(--tw-text-opacity,1))}.description-markdown img{max-width:100%;border-radius:.25rem}.timeline-slider{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;cursor:pointer}.timeline-slider::-webkit-slider-runnable-track{height:4px;background:#e4e4e7;border-radius:2px}.timeline-slider::-webkit-slider-thumb{-webkit-appearance:none;width:12px;height:12px;background:#10b981;border-radius:50%;margin-top:-4px;cursor:pointer;-webkit-transition:transform .1s ease;transition:transform .1s ease}.timeline-slider::-webkit-slider-thumb:hover{transform:scale(1.2)}.timeline-slider::-moz-range-track{height:4px;background:#e4e4e7;border-radius:2px;border:none}.timeline-slider::-moz-range-thumb{width:12px;height:12px;background:#10b981;border-radius:50%;border:none;cursor:pointer}.force-graph-container canvas{border-radius:.5rem;touch-action:none}.placeholder\:text-zinc-300::-moz-placeholder{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.placeholder\:text-zinc-300::placeholder{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.placeholder\:text-zinc-400::-moz-placeholder{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.placeholder\:text-zinc-400::placeholder{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.first\:mt-0:first-child{margin-top:0}.hover\:border-zinc-200:hover{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity,1))}.hover\:border-zinc-300:hover{--tw-border-opacity:1;border-color:rgb(212 212 216/var(--tw-border-opacity,1))}.hover\:bg-emerald-100:hover{--tw-bg-opacity:1;background-color:rgb(209 250 229/var(--tw-bg-opacity,1))}.hover\:bg-emerald-600:hover{--tw-bg-opacity:1;background-color:rgb(5 150 105/var(--tw-bg-opacity,1))}.hover\:bg-emerald-700:hover{--tw-bg-opacity:1;background-color:rgb(4 120 87/var(--tw-bg-opacity,1))}.hover\:bg-red-50:hover{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.hover\:bg-white:hover{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.hover\:bg-zinc-100:hover{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.hover\:bg-zinc-100\/50:hover{background-color:hsla(240,5%,96%,.5)}.hover\:bg-zinc-200\/60:hover{background-color:hsla(240,6%,90%,.6)}.hover\:bg-zinc-300\/40:hover{background-color:hsla(240,5%,84%,.4)}.hover\:bg-zinc-50:hover{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.hover\:bg-zinc-50\/50:hover{background-color:hsla(0,0%,98%,.5)}.hover\:bg-zinc-50\/60:hover{background-color:hsla(0,0%,98%,.6)}.hover\:text-emerald-600:hover{--tw-text-opacity:1;color:rgb(5 150 105/var(--tw-text-opacity,1))}.hover\:text-emerald-700:hover{--tw-text-opacity:1;color:rgb(4 120 87/var(--tw-text-opacity,1))}.hover\:text-red-400:hover{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.hover\:text-rose-500:hover{--tw-text-opacity:1;color:rgb(244 63 94/var(--tw-text-opacity,1))}.hover\:text-zinc-500:hover{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.hover\:text-zinc-600:hover{--tw-text-opacity:1;color:rgb(82 82 91/var(--tw-text-opacity,1))}.hover\:text-zinc-700:hover{--tw-text-opacity:1;color:rgb(63 63 70/var(--tw-text-opacity,1))}.hover\:text-zinc-900:hover{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.hover\:opacity-80:hover{opacity:.8}.hover\:shadow-md:hover{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.focus\:border-emerald-400:focus{--tw-border-opacity:1;border-color:rgb(52 211 153/var(--tw-border-opacity,1))}.focus\:border-emerald-500:focus{--tw-border-opacity:1;border-color:rgb(16 185 129/var(--tw-border-opacity,1))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-1:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\:ring-1:focus,.focus\:ring-2:focus{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\:ring-emerald-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(16 185 129/var(--tw-ring-opacity,1))}.focus\:ring-emerald-500\/30:focus{--tw-ring-color:rgba(16,185,129,.3)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:scale-105{--tw-scale-x:1.05;--tw-scale-y:1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:text-emerald-500{--tw-text-opacity:1;color:rgb(16 185 129/var(--tw-text-opacity,1))}.group:hover .group-hover\:text-emerald-700{--tw-text-opacity:1;color:rgb(4 120 87/var(--tw-text-opacity,1))}.group:hover .group-hover\:text-zinc-700{--tw-text-opacity:1;color:rgb(63 63 70/var(--tw-text-opacity,1))}.group:hover .group-hover\:opacity-100{opacity:1}@media (min-width:640px){.sm\:left-4{left:1rem}.sm\:right-4{right:1rem}.sm\:top-4{top:1rem}.sm\:block{display:block}.sm\:inline-block{display:inline-block}.sm\:inline{display:inline}.sm\:flex{display:flex}.sm\:hidden{display:none}.sm\:gap-2{gap:.5rem}}@media (min-width:768px){.md\:flex{display:flex}.md\:hidden{display:none}}