epiq 1.13.0 → 1.13.2

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.
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{b as o,c as m}from"./chunk-5RIQL7P4.js";import p from"node:crypto";var n="EPIQ_USER_NAME",u="EPIQ_USER_ID",d="0123456789ABCDEFGHJKMNPQRSTVWXYZ",N=26,c=80,f=e=>/^[0-9A-HJKMNP-TV-Z]{26}$/.test(e),l=e=>e.trim().length>0&&e.length<=c,i=e=>e.trim().toLowerCase(),E=e=>{let s=p.createHash("sha256").update(`epiq:actor:${i(e)}`).digest(),t="";for(let r=0;r<N;r++)t+=d[(s[r]??0)%d.length];return t},g=(e,s=process.env)=>{let t=(s[n]??"").trim(),r=(s[u]??"").trim();return t?l(t)?!r&&e.userId&&e.userName&&i(e.userName)===i(t)?m("Actor override names the configured user",{userId:e.userId,userName:e.userName}):r&&!f(r)?o(`${u} must be 26 characters of Crockford base32`):r&&e.userId&&r===e.userId?o(`${u} is the configured user's own id; using it under a different name would rename them on the board`):m("Resolved actor from environment",{userId:r||E(t),userName:r?t:i(t)}):o(`${n} must be 1-${c} characters of text`):r?o(`${u} is set without ${n}`):m("No actor override",null)},h=(e,s,t=process.env)=>{let r=e.trim();if(!l(r))return o(`${s} must be 1-${c} characters of text`);let a=(t[n]??"").trim();return a&&i(a)!==i(r)?o(`${s} names ${r}, but ${n} names ${a}`):(a||(t[n]=r),m("Applied actor name argument",a||r))};export{n as a,u as b,f as c,l as d,E as e,g as f,h as g};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ var o="1.13.2";export{o as a};
package/dist/gui/main.js CHANGED
@@ -1381,7 +1381,7 @@ Please change the parent <Route path="${S}"> to <Route path="${S==="/"?"*":`${S}
1381
1381
  ${a}px circle at ${f.x}px ${f.y}px,
1382
1382
  ${r},
1383
1383
  transparent 100%
1384
- )`,mask:"linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0)",WebkitMask:"linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0)",maskComposite:"exclude",WebkitMaskComposite:"xor",transition:"opacity 140ms ease"}}),(0,Dd.jsx)("div",{style:{position:"relative",height:"100%",display:"flex",flexDirection:"column",minHeight:0},children:(0,Dd.jsx)(u1.Provider,{value:k,children:t})})]})};var Ut=R(I(),1),Em={background:b.panel2,border:`1px solid ${b.line}`,borderRadius:6,padding:"2px 6px",color:b.primary},SN=({repoRoot:e,message:t,recentProjects:n=[],onRetry:i,onOpen:r})=>(0,Ut.jsx)("div",{"data-testid":"init-project-screen",style:{height:"100vh",background:b.bg,color:b.primary,fontFamily:Wl,display:"flex",alignItems:"center",justifyContent:"center",padding:30},children:(0,Ut.jsx)(Zl,{proximityReach:300,style:{width:520,background:b.panel},children:(0,Ut.jsxs)("div",{style:{padding:28,display:"flex",flexDirection:"column",gap:16},children:[(0,Ut.jsx)("div",{style:{color:b.accent,fontSize:10,letterSpacing:1,textTransform:"uppercase"},children:"Initialize project"}),(0,Ut.jsx)("h1",{style:{margin:0,fontSize:16,fontWeight:700},children:"This folder is not an epiq project yet"}),(0,Ut.jsxs)("div",{style:{fontSize:12,color:b.secondary,lineHeight:1.7},children:["No ",(0,Ut.jsx)("span",{style:Em,children:".epiq/project.json"})," was found in this directory or any of its parents:"]}),(0,Ut.jsx)("div",{style:{...Em,fontSize:12,padding:"10px 12px",wordBreak:"break-all"},children:e}),(0,Ut.jsxs)("div",{style:{fontSize:12,color:b.secondary,lineHeight:1.7},children:["To start tracking issues here, run ",(0,Ut.jsx)("span",{style:Em,children:"epiq"})," ","in that folder and type ",(0,Ut.jsx)("span",{style:Em,children:":init"}),". That creates, commits and pushes"," ",(0,Ut.jsx)("span",{style:Em,children:".epiq/project.json"}),". Then come back and reload."]}),n.length>0&&(0,Ut.jsxs)("div",{"data-testid":"recent-projects",style:{display:"flex",flexDirection:"column",gap:8},children:[(0,Ut.jsx)("div",{style:{color:b.accent,fontSize:10,letterSpacing:1,textTransform:"uppercase"},children:"Or open a recent project"}),n.map(o=>(0,Ut.jsxs)("div",{"data-testid":"recent-project",style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:12,fontSize:12},children:[(0,Ut.jsxs)("div",{style:{minWidth:0},children:[(0,Ut.jsx)("div",{style:{fontWeight:700},children:o.name}),(0,Ut.jsx)("div",{style:{color:b.dim,fontSize:10,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:o.root,children:o.root})]}),(0,Ut.jsx)(ee,{variant:"primary",onClick:()=>r(o.root),"data-testid":"open-recent-project",children:"open"})]},o.projectId))]}),(0,Ut.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:12,marginTop:4},children:[(0,Ut.jsx)("span",{style:{fontSize:10,color:b.dim},children:t}),(0,Ut.jsx)(ee,{variant:"primary",onClick:i,children:"check again"})]})]})})});var oi=R(j(),1),EN=R(dc(),1);var Tv=R(j(),1),Lv=(e,t,n=[],{nested:i=!1}={})=>{let r=(0,Tv.useRef)(null);return(0,Tv.useEffect)(()=>{if(!e)return;let o=l=>{let s=l.target;r.current?.contains(s)||n.some(c=>c.current?.contains(s))||t()},a=l=>{l.key!=="Escape"||l.defaultPrevented||(i&&l.preventDefault(),t())};return document.addEventListener("mousedown",o),document.addEventListener("keydown",a,{capture:i}),()=>{document.removeEventListener("mousedown",o),document.removeEventListener("keydown",a,{capture:i})}},[e,t,i]),r};var c1=R(I(),1),$i=({size:e=16})=>(0,c1.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,c1.jsx)("polyline",{points:"6 9 12 15 18 9"})});var wm=R(I(),1),Av=({label:e,labelStyle:t,style:n})=>(0,wm.jsxs)("div",{"aria-hidden":!0,style:{display:"flex",alignItems:"center",gap:8,...n},children:[(0,wm.jsx)("span",{style:{textTransform:"uppercase",color:b.dim,whiteSpace:"nowrap",userSelect:"none",...t},children:e}),(0,wm.jsx)("span",{style:{flex:1,height:1,background:b.line}})]});var Pr=R(I(),1),Jl=({label:e,color:t=b.dim,width:n,minWidth:i,disabled:r=!1,testId:o,title:a,popupRole:l="listbox",popupLabel:s,triggerStyle:u,chevronSize:c=12,leading:d,portal:f=!1,portalInto:h,open:m,onOpenChange:g,children:S})=>{let[p,y]=(0,oi.useState)(!1),v=(m??p)&&!r,E=N=>{m===void 0&&y(N),g?.(N)},k=()=>E(!1);(0,oi.useEffect)(()=>{r&&(y(!1),m&&g?.(!1))},[r]);let x=(0,oi.useId)(),w=(0,oi.useRef)(null),L=(0,oi.useRef)(null),T=Lv(v,k,[w],{nested:!0}),C=w9(f&&v,L,w),O=(0,Pr.jsx)("div",{ref:w,id:x,role:l,"aria-label":s,style:{...e1,minWidth:i??n??e1.minWidth,...f&&C?{position:"fixed",left:C.left,top:C.top,marginTop:0,fontFamily:Wl}:{}},children:S(k)});return(0,Pr.jsxs)("div",{ref:T,style:{position:"relative",flexShrink:0},children:[(0,Pr.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6},children:[d,(0,Pr.jsxs)("button",{ref:L,type:"button","data-testid":o,onClick:()=>E(!v),disabled:r,"aria-haspopup":l==="group"?"true":l,"aria-controls":v?x:void 0,"aria-expanded":v,title:a,style:{...Ev(t,r),...n?{width:n}:{},...u},children:[(0,Pr.jsx)("span",{style:tN,children:e}),(0,Pr.jsx)("span",{style:{display:"inline-flex",flexShrink:0},children:(0,Pr.jsx)($i,{size:c})})]})]}),v&&(f?C&&(0,EN.createPortal)(O,h?.()??document.body):O)]})},xN=8,w9=(e,t,n)=>{let[i,r]=(0,oi.useState)(null),o=(0,oi.useCallback)(()=>{let l=t.current?.getBoundingClientRect();if(!l)return;let s=n.current?.offsetHeight??0,u=l.bottom+6,c=l.top-6-s,d=u+s>window.innerHeight-xN&&c>=xN;r(f=>{let h=d?c:u;return f?.left===l.left&&f.top===h?f:{left:l.left,top:h}})},[t,n]),a=e&&i!==null;return(0,oi.useLayoutEffect)(()=>{if(!a)return;o();let l=n.current;if(!l)return;let s=new ResizeObserver(o);return s.observe(l),()=>s.disconnect()},[a,o,n]),(0,oi.useLayoutEffect)(()=>{if(!e){r(null);return}return o(),window.addEventListener("resize",o),window.addEventListener("scroll",o,!0),()=>{window.removeEventListener("resize",o),window.removeEventListener("scroll",o,!0)}},[e,o]),i},Iv=({label:e})=>(0,Pr.jsx)(Av,{label:e,style:{gap:6,margin:"4px 0 2px",padding:"0 8px"},labelStyle:{fontSize:8,lineHeight:1,letterSpacing:"0.1em"}}),mr=({children:e,selected:t=!1,onSelect:n,role:i,testId:r,title:o,style:a})=>{let[l,s]=(0,oi.useState)(!1),u={display:"flex",alignItems:"center",justifyContent:"space-between",gap:10,width:"100%",boxSizing:"border-box",border:"none",borderRadius:6,padding:"6px 8px",background:t?b.line:l?nN:"transparent",color:t?b.accent:b.primary,fontFamily:"inherit",fontSize:11,textAlign:"left",...a},c={onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1)};return n?(0,Pr.jsx)("button",{type:"button",role:i,"aria-selected":i?t:void 0,"data-testid":r,title:o,onClick:n,style:{...u,cursor:"pointer"},...c,children:e}):(0,Pr.jsx)("div",{"data-testid":r,title:o,onClick:d=>{d.target===d.currentTarget&&d.currentTarget.querySelector("input, button")?.click()},style:{...u,cursor:"pointer"},...c,children:e})};var es=R(I(),1),C9=200,Cm=({value:e,items:t,placeholder:n="Select...",onSelect:i,testId:r,portalInto:o,width:a=C9,color:l})=>(0,es.jsx)(Jl,{portal:!0,portalInto:o,label:e?.label??n,title:e?.label,width:a,color:l,testId:r,chevronSize:14,triggerStyle:{fontSize:12,padding:"5px 8px 5px 10px"},children:s=>t.map(u=>{let c=u.id===e?.id;return(0,es.jsxs)(mr,{role:"option",selected:c,testId:r?`${r}-option`:void 0,onSelect:()=>{s(),i(u.id)},style:{gap:12,padding:"8px 10px"},children:[(0,es.jsx)("span",{children:u.label}),(0,es.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:10},children:[u.hint?(0,es.jsx)("span",{style:{color:b.dim},children:u.hint}):null,(0,es.jsx)("span",{"aria-hidden":!c,style:{width:"1ch",textAlign:"right"},children:c?"\u2713":""})]})]},u.id)})});var km=R(I(),1),wN=({size:e=15})=>(0,km.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,km.jsx)("circle",{cx:"12",cy:"12",r:"3"}),(0,km.jsx)("path",{d:"M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1.1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.5-1.1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3h.1a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8v.1a1.7 1.7 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1z"})]});var kN=R(j(),1);var Eu=R(I(),1),k9=()=>typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.userAgent),CN=({children:e})=>(0,Eu.jsx)("kbd",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:18,height:18,padding:"0 4px",boxSizing:"border-box",borderRadius:4,background:b.panel2,border:`1px solid ${b.line}`,color:b.secondary,font:"inherit",fontSize:V.label,lineHeight:1},children:e}),RN=({onOpen:e})=>{let[t,n]=(0,kN.useState)(!1);return(0,Eu.jsxs)("button",{type:"button","data-testid":"command-palette-hint",onClick:e,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),title:"Open the command palette","aria-label":"Open the command palette",style:{display:"inline-flex",alignItems:"center",gap:7,background:t?b.hover:"transparent",border:"none",borderRadius:6,padding:"3px 6px",color:b.dim2,fontSize:V.label,fontFamily:"inherit",cursor:"pointer",whiteSpace:"nowrap"},children:[(0,Eu.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:3},children:[(0,Eu.jsx)(CN,{children:k9()?"\u2318":"Ctrl"}),(0,Eu.jsx)(CN,{children:"K"})]}),"commands"]})};var TN=R(I(),1),Mv=({user:e,index:t,isFocus:n,filled:i=!1})=>(0,TN.jsx)("span",{title:e.name,style:{width:18,height:18,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",background:i?e.color:"transparent",color:i?b.chrome:e.color,border:`1px solid ${e.color}`,fontSize:11,fontWeight:700,marginLeft:t===0?0:4,flexShrink:0},children:e.name.at(0)?.toUpperCase()},e.id);var LN="1.13.0";var ft=R(I(),1),AN=({state:e,connection:t,onReconnect:n,scrubbing:i,syncStatus:r,onOpenCommands:o,board:a,settings:l})=>{let s=r.status==="synced"?b.green:r.status==="failed"?b.red:r.status==="offline"?b.dim:b.accent,u=t!=="connected"?"Not connected":r.status==="failed"?`Sync failed \u2014 ${r.msg}`:r.msg;return(0,ft.jsx)(Zl,{as:"header",borderRadius:0,borderColor:b.line,glowOpacity:.08,style:{height:56,padding:"0 30px",borderLeft:"none",borderRight:"none",borderTop:"none"},children:(0,ft.jsxs)("div",{style:{height:"100%",width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,ft.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:14},children:[(0,ft.jsx)("div",{style:{color:b.accent,fontSize:12,fontWeight:700},children:":epiq"}),(0,ft.jsx)("span",{style:{color:b.dim,fontSize:12},children:"/"}),a,(0,ft.jsx)(RN,{onOpen:o})]}),(0,ft.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:24},children:[(0,ft.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:12,fontSize:11,whiteSpace:"nowrap"},children:[i&&(0,ft.jsxs)(ft.Fragment,{children:[(0,ft.jsx)("span",{style:{color:b.accent,fontWeight:700},children:"Read-only"}),(0,ft.jsx)("span",{style:{color:b.dim},children:"|"})]}),(0,ft.jsx)("span",{"data-testid":"sync-dot",title:u,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",padding:"5px 7px"},children:(0,ft.jsx)("span",{style:{width:4,height:4,borderRadius:999,background:t==="connected"?s:b.dim}})}),(0,ft.jsx)("span",{style:{color:b.dim},children:"|"}),t==="connected"?(0,ft.jsx)("span",{style:{color:b.dim},children:"connected"}):t==="connecting"?(0,ft.jsx)("span",{style:{color:b.dim},children:"connecting\u2026"}):t==="reconnecting"?(0,ft.jsx)("span",{"data-testid":"reconnecting",style:{color:b.accent},children:"reconnecting\u2026"}):(0,ft.jsx)(ee,{"data-testid":"connection-lost",variant:"ghost",onClick:n,title:"Not connected \u2014 reconnect now",style:{color:b.red,fontSize:10},children:"reconnect"}),(0,ft.jsx)("span",{style:{color:b.dim},children:"|"}),(0,ft.jsx)("span",{style:{color:b.dim},children:"v"+LN})]}),(0,ft.jsx)("span",{ref:l.ref,style:{display:"inline-flex"},children:e?.user?(0,ft.jsx)("button",{"data-testid":"open-settings",onClick:l.onToggle,"aria-label":"Settings","aria-pressed":l.open,"aria-expanded":l.open,"aria-controls":"settings-panel",style:{background:"transparent",border:"none",cursor:"pointer",display:"flex",padding:0},children:(0,ft.jsx)(Mv,{user:e.user,filled:l.open})}):(0,ft.jsx)(Se,{title:"Settings",testId:"open-settings",pressed:l.open,"aria-expanded":l.open,"aria-controls":"settings-panel",onClick:l.onToggle,children:(0,ft.jsx)(wN,{})})})]})]})})};var In=R(j(),1);var d1=R(j(),1);var R9="rgba(255, 135, 135, 0.14)",Dv=({armed:e,hovered:t})=>({display:"flex",alignItems:"center",justifyContent:"space-between",gap:8,padding:"6px 8px",borderRadius:6,background:e?R9:t?b.line:"transparent",boxShadow:e?`inset 0 0 0 1px ${b.red}`:void 0});var _d=R(I(),1),Od=({size:e=13})=>(0,_d.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,_d.jsx)("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2"}),(0,_d.jsx)("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"}),(0,_d.jsx)("circle",{cx:"12",cy:"16.5",r:"2.1",fill:"currentColor",stroke:"none"})]});var wu=R(I(),1),_v=({size:e=14})=>(0,wu.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,wu.jsx)("polyline",{points:"3 6 5 6 21 6"}),(0,wu.jsx)("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"}),(0,wu.jsx)("line",{x1:"10",y1:"11",x2:"10",y2:"17"}),(0,wu.jsx)("line",{x1:"14",y1:"11",x2:"14",y2:"17"})]});var Yn=R(I(),1),IN=({contributors:e,onRemove:t,onClose:n})=>{let[i,r]=(0,d1.useState)(null),[o,a]=(0,d1.useState)(null),l=[...e].sort((s,u)=>s.name.localeCompare(u.name));return(0,Yn.jsx)("div",{style:{position:"fixed",inset:0,background:b.scrim,backdropFilter:"blur(.5px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3},onMouseDown:n,children:(0,Yn.jsxs)("div",{onMouseDown:s=>s.stopPropagation(),style:{marginTop:"-100px",width:460,background:b.panel,border:`1px solid ${b.line}`,borderRadius:12,padding:20,display:"flex",flexDirection:"column",gap:14},children:[(0,Yn.jsx)("div",{style:{color:b.secondary,fontSize:10,letterSpacing:1,textTransform:"uppercase"},children:"Manage external contributors"}),(0,Yn.jsx)("div",{style:{fontSize:12,color:b.secondary},children:"Remove contributors from the suggestion lists. Locked ones have contributed, so their name is in the immutable log either way."}),(0,Yn.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:2,maxHeight:260,overflowY:"auto"},children:l.map(s=>{let u=s.hasAuthoredAnywhere,c=i===s.id;return(0,Yn.jsxs)("div",{"data-testid":"manage-contributor-row","data-armed":c?"true":"false",onMouseEnter:()=>a(s.id),onMouseLeave:()=>a(d=>d===s.id?null:d),style:Dv({armed:c,hovered:o===s.id}),children:[(0,Yn.jsxs)("span",{style:{fontSize:12,color:s.color,opacity:u?.5:1},children:["@",s.name]}),u?(0,Yn.jsx)("span",{title:"Has contributed \u2014 their name is in the immutable log either way",style:{display:"flex",color:b.dim,opacity:.7,padding:"3px 6px"},children:(0,Yn.jsx)(Od,{})}):s.isRemoved?(0,Yn.jsx)("span",{style:{color:b.dim,fontSize:10},children:"removed"}):(0,Yn.jsxs)(ee,{variant:"ghost",title:c?`Click again to remove @${s.name}`:`Remove @${s.name}`,onClick:()=>{if(!c)return r(s.id);t(s.id),r(null)},style:{display:"flex",alignItems:"center",gap:6,color:c?b.red:b.dim,...c?{border:`1px solid ${b.red}`}:{}},children:[c&&(0,Yn.jsx)("span",{style:{fontSize:10},children:"confirm"}),(0,Yn.jsx)(_v,{})]})]},s.id)})}),(0,Yn.jsx)("div",{style:{display:"flex",justifyContent:"flex-end"},children:(0,Yn.jsx)(ee,{variant:"ghost",onClick:n,children:"close"})})]})})};var f1=R(j(),1);var Vi=R(I(),1),MN=({tags:e,onDelete:t,onClose:n})=>{let[i,r]=(0,f1.useState)(null),[o,a]=(0,f1.useState)(null),l=[...e].sort((s,u)=>s.name.localeCompare(u.name));return(0,Vi.jsx)("div",{style:{position:"fixed",inset:0,background:b.scrim,backdropFilter:"blur(.5px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3},onMouseDown:n,children:(0,Vi.jsxs)("div",{onMouseDown:s=>s.stopPropagation(),style:{marginTop:"-100px",width:460,background:b.panel,border:`1px solid ${b.line}`,borderRadius:12,padding:20,display:"flex",flexDirection:"column",gap:14},children:[(0,Vi.jsx)("div",{style:{color:b.secondary,fontSize:10,letterSpacing:1,textTransform:"uppercase"},children:"Manage tags"}),(0,Vi.jsx)("div",{style:{fontSize:12,color:b.secondary},children:"Delete tags across the whole workspace. A deleted tag comes off every ticket at once; its history stays in the log."}),(0,Vi.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:2,maxHeight:260,overflowY:"auto"},children:l.map(s=>{let u=i===s.id,c=o===s.id;return(0,Vi.jsxs)("div",{"data-testid":"manage-tag-row","data-armed":u?"true":"false",onMouseEnter:()=>a(s.id),onMouseLeave:()=>a(d=>d===s.id?null:d),style:Dv({armed:u,hovered:c}),children:[(0,Vi.jsx)("span",{style:{fontSize:12,color:s.color},children:s.name}),(0,Vi.jsxs)(ee,{variant:"ghost",testId:"delete-tag",title:u?`Click again to delete "${s.name}" everywhere`:`Delete "${s.name}"`,onClick:()=>{if(!u)return r(s.id);t(s.id),r(null)},style:{display:"flex",alignItems:"center",gap:6,color:u?b.red:b.dim,...u?{border:`1px solid ${b.red}`}:{}},children:[u&&(0,Vi.jsx)("span",{style:{fontSize:10},children:"confirm"}),(0,Vi.jsx)(_v,{})]})]},s.id)})}),(0,Vi.jsx)("div",{style:{display:"flex",justifyContent:"flex-end"},children:(0,Vi.jsx)(ee,{variant:"ghost",onClick:n,children:"close"})})]})})};var Hd=R(j(),1);var DN=R(I(),1),T9=async e=>{try{return await navigator.clipboard.writeText(e),!0}catch{return!1}},Nd=({refValue:e})=>{let[t,n]=(0,Hd.useState)(!1),i=(0,Hd.useRef)(void 0);return(0,Hd.useEffect)(()=>()=>clearTimeout(i.current),[]),(0,DN.jsx)("button",{type:"button","data-testid":"copy-ref",title:`Copy ${e}`,onClick:async r=>{r.stopPropagation(),await T9(e)&&(n(!0),clearTimeout(i.current),i.current=setTimeout(()=>n(!1),1200))},style:{fontFamily:"monospace",fontSize:"inherit",color:t?b.green:b.dim,background:"transparent",border:"none",padding:0,cursor:"pointer",transition:"color 120ms ease"},onMouseEnter:r=>{t||(r.currentTarget.style.color=b.accent)},onMouseLeave:r=>{r.currentTarget.style.color=t?b.green:b.dim},children:t?"copied!":e})};var pr=R(I(),1),_N=({size:e=14})=>(0,pr.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinejoin:"round","aria-hidden":"true",children:(0,pr.jsx)("path",{d:"M8 5.5 19 12 8 18.5Z"})}),ON=({size:e=14})=>(0,pr.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:[(0,pr.jsx)("line",{x1:"9",y1:"5.5",x2:"9",y2:"18.5"}),(0,pr.jsx)("line",{x1:"15",y1:"5.5",x2:"15",y2:"18.5"})]}),HN=({size:e=14})=>(0,pr.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,pr.jsx)("path",{d:"M20 12a8 8 0 1 1-2.6-5.9"}),(0,pr.jsx)("polyline",{points:"20 3 20 8 15 8"})]}),Ov=({size:e=14})=>(0,pr.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:[(0,pr.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"}),(0,pr.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"})]});var h1=R(I(),1),Hv=({size:e=14})=>(0,h1.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,h1.jsx)("path",{d:"M4 6h16l-6 7v7l-4-2.5V13z"})});var m1=R(I(),1),NN=({narrowed:e,capped:t,disabled:n,onChange:i})=>(0,m1.jsx)(Se,{testId:"ticket-only",pressed:e,disabled:n,title:e&&t?"Too many events to single out \u2014 show all":e?"Show the whole timeline":"Narrow log and timeline to ticket",onClick:()=>i(!e),children:(0,m1.jsx)(Hv,{size:me})});var Rm=R(I(),1),FN=({size:e=16})=>(0,Rm.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,Rm.jsx)("polyline",{points:"4 6 9 12 4 18"}),(0,Rm.jsx)("polyline",{points:"20 6 15 12 20 18"})]});var Tm=R(I(),1),PN=({size:e=16})=>(0,Tm.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,Tm.jsx)("polyline",{points:"9 6 4 12 9 18"}),(0,Tm.jsx)("polyline",{points:"15 6 20 12 15 18"})]});var Uo=R(j(),1);var Lm=R(I(),1),Et=({title:e,action:t,children:n,first:i=!1})=>(0,Lm.jsxs)("section",{style:{padding:i?"0 0 18px":"18px 0",borderTop:i?"none":`1px solid ${b.line}`},children:[(0,Lm.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:12,minHeight:Yl},children:[(0,Lm.jsx)("span",{style:{color:b.dim,fontSize:V.label,textTransform:"uppercase",letterSpacing:"0.08em"},children:e}),t]}),n]});var L9="/media/",p1=e=>`${L9}${e}`;var Cu=R(j(),1);var zN="image/png,image/jpeg,image/gif,image/webp",A9="rgba(118, 212, 255, 0.08)",Fd=e=>e==null?[]:Array.from(e).filter(t=>t.type.startsWith("image/")),I9=(e,t,n)=>{let i=Math.max(0,Math.min(t,e.length)),r=e.slice(0,i),o=e.slice(i),a=r===""||r.endsWith(`
1384
+ )`,mask:"linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0)",WebkitMask:"linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0)",maskComposite:"exclude",WebkitMaskComposite:"xor",transition:"opacity 140ms ease"}}),(0,Dd.jsx)("div",{style:{position:"relative",height:"100%",display:"flex",flexDirection:"column",minHeight:0},children:(0,Dd.jsx)(u1.Provider,{value:k,children:t})})]})};var Ut=R(I(),1),Em={background:b.panel2,border:`1px solid ${b.line}`,borderRadius:6,padding:"2px 6px",color:b.primary},SN=({repoRoot:e,message:t,recentProjects:n=[],onRetry:i,onOpen:r})=>(0,Ut.jsx)("div",{"data-testid":"init-project-screen",style:{height:"100vh",background:b.bg,color:b.primary,fontFamily:Wl,display:"flex",alignItems:"center",justifyContent:"center",padding:30},children:(0,Ut.jsx)(Zl,{proximityReach:300,style:{width:520,background:b.panel},children:(0,Ut.jsxs)("div",{style:{padding:28,display:"flex",flexDirection:"column",gap:16},children:[(0,Ut.jsx)("div",{style:{color:b.accent,fontSize:10,letterSpacing:1,textTransform:"uppercase"},children:"Initialize project"}),(0,Ut.jsx)("h1",{style:{margin:0,fontSize:16,fontWeight:700},children:"This folder is not an epiq project yet"}),(0,Ut.jsxs)("div",{style:{fontSize:12,color:b.secondary,lineHeight:1.7},children:["No ",(0,Ut.jsx)("span",{style:Em,children:".epiq/project.json"})," was found in this directory or any of its parents:"]}),(0,Ut.jsx)("div",{style:{...Em,fontSize:12,padding:"10px 12px",wordBreak:"break-all"},children:e}),(0,Ut.jsxs)("div",{style:{fontSize:12,color:b.secondary,lineHeight:1.7},children:["To start tracking issues here, run ",(0,Ut.jsx)("span",{style:Em,children:"epiq"})," ","in that folder and type ",(0,Ut.jsx)("span",{style:Em,children:":init"}),". That creates, commits and pushes"," ",(0,Ut.jsx)("span",{style:Em,children:".epiq/project.json"}),". Then come back and reload."]}),n.length>0&&(0,Ut.jsxs)("div",{"data-testid":"recent-projects",style:{display:"flex",flexDirection:"column",gap:8},children:[(0,Ut.jsx)("div",{style:{color:b.accent,fontSize:10,letterSpacing:1,textTransform:"uppercase"},children:"Or open a recent project"}),n.map(o=>(0,Ut.jsxs)("div",{"data-testid":"recent-project",style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:12,fontSize:12},children:[(0,Ut.jsxs)("div",{style:{minWidth:0},children:[(0,Ut.jsx)("div",{style:{fontWeight:700},children:o.name}),(0,Ut.jsx)("div",{style:{color:b.dim,fontSize:10,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:o.root,children:o.root})]}),(0,Ut.jsx)(ee,{variant:"primary",onClick:()=>r(o.root),"data-testid":"open-recent-project",children:"open"})]},o.projectId))]}),(0,Ut.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:12,marginTop:4},children:[(0,Ut.jsx)("span",{style:{fontSize:10,color:b.dim},children:t}),(0,Ut.jsx)(ee,{variant:"primary",onClick:i,children:"check again"})]})]})})});var oi=R(j(),1),EN=R(dc(),1);var Tv=R(j(),1),Lv=(e,t,n=[],{nested:i=!1}={})=>{let r=(0,Tv.useRef)(null);return(0,Tv.useEffect)(()=>{if(!e)return;let o=l=>{let s=l.target;r.current?.contains(s)||n.some(c=>c.current?.contains(s))||t()},a=l=>{l.key!=="Escape"||l.defaultPrevented||(i&&l.preventDefault(),t())};return document.addEventListener("mousedown",o),document.addEventListener("keydown",a,{capture:i}),()=>{document.removeEventListener("mousedown",o),document.removeEventListener("keydown",a,{capture:i})}},[e,t,i]),r};var c1=R(I(),1),$i=({size:e=16})=>(0,c1.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,c1.jsx)("polyline",{points:"6 9 12 15 18 9"})});var wm=R(I(),1),Av=({label:e,labelStyle:t,style:n})=>(0,wm.jsxs)("div",{"aria-hidden":!0,style:{display:"flex",alignItems:"center",gap:8,...n},children:[(0,wm.jsx)("span",{style:{textTransform:"uppercase",color:b.dim,whiteSpace:"nowrap",userSelect:"none",...t},children:e}),(0,wm.jsx)("span",{style:{flex:1,height:1,background:b.line}})]});var Pr=R(I(),1),Jl=({label:e,color:t=b.dim,width:n,minWidth:i,disabled:r=!1,testId:o,title:a,popupRole:l="listbox",popupLabel:s,triggerStyle:u,chevronSize:c=12,leading:d,portal:f=!1,portalInto:h,open:m,onOpenChange:g,children:S})=>{let[p,y]=(0,oi.useState)(!1),v=(m??p)&&!r,E=N=>{m===void 0&&y(N),g?.(N)},k=()=>E(!1);(0,oi.useEffect)(()=>{r&&(y(!1),m&&g?.(!1))},[r]);let x=(0,oi.useId)(),w=(0,oi.useRef)(null),L=(0,oi.useRef)(null),T=Lv(v,k,[w],{nested:!0}),C=w9(f&&v,L,w),O=(0,Pr.jsx)("div",{ref:w,id:x,role:l,"aria-label":s,style:{...e1,minWidth:i??n??e1.minWidth,...f&&C?{position:"fixed",left:C.left,top:C.top,marginTop:0,fontFamily:Wl}:{}},children:S(k)});return(0,Pr.jsxs)("div",{ref:T,style:{position:"relative",flexShrink:0},children:[(0,Pr.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6},children:[d,(0,Pr.jsxs)("button",{ref:L,type:"button","data-testid":o,onClick:()=>E(!v),disabled:r,"aria-haspopup":l==="group"?"true":l,"aria-controls":v?x:void 0,"aria-expanded":v,title:a,style:{...Ev(t,r),...n?{width:n}:{},...u},children:[(0,Pr.jsx)("span",{style:tN,children:e}),(0,Pr.jsx)("span",{style:{display:"inline-flex",flexShrink:0},children:(0,Pr.jsx)($i,{size:c})})]})]}),v&&(f?C&&(0,EN.createPortal)(O,h?.()??document.body):O)]})},xN=8,w9=(e,t,n)=>{let[i,r]=(0,oi.useState)(null),o=(0,oi.useCallback)(()=>{let l=t.current?.getBoundingClientRect();if(!l)return;let s=n.current?.offsetHeight??0,u=l.bottom+6,c=l.top-6-s,d=u+s>window.innerHeight-xN&&c>=xN;r(f=>{let h=d?c:u;return f?.left===l.left&&f.top===h?f:{left:l.left,top:h}})},[t,n]),a=e&&i!==null;return(0,oi.useLayoutEffect)(()=>{if(!a)return;o();let l=n.current;if(!l)return;let s=new ResizeObserver(o);return s.observe(l),()=>s.disconnect()},[a,o,n]),(0,oi.useLayoutEffect)(()=>{if(!e){r(null);return}return o(),window.addEventListener("resize",o),window.addEventListener("scroll",o,!0),()=>{window.removeEventListener("resize",o),window.removeEventListener("scroll",o,!0)}},[e,o]),i},Iv=({label:e})=>(0,Pr.jsx)(Av,{label:e,style:{gap:6,margin:"4px 0 2px",padding:"0 8px"},labelStyle:{fontSize:8,lineHeight:1,letterSpacing:"0.1em"}}),mr=({children:e,selected:t=!1,onSelect:n,role:i,testId:r,title:o,style:a})=>{let[l,s]=(0,oi.useState)(!1),u={display:"flex",alignItems:"center",justifyContent:"space-between",gap:10,width:"100%",boxSizing:"border-box",border:"none",borderRadius:6,padding:"6px 8px",background:t?b.line:l?nN:"transparent",color:t?b.accent:b.primary,fontFamily:"inherit",fontSize:11,textAlign:"left",...a},c={onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1)};return n?(0,Pr.jsx)("button",{type:"button",role:i,"aria-selected":i?t:void 0,"data-testid":r,title:o,onClick:n,style:{...u,cursor:"pointer"},...c,children:e}):(0,Pr.jsx)("div",{"data-testid":r,title:o,onClick:d=>{d.target===d.currentTarget&&d.currentTarget.querySelector("input, button")?.click()},style:{...u,cursor:"pointer"},...c,children:e})};var es=R(I(),1),C9=200,Cm=({value:e,items:t,placeholder:n="Select...",onSelect:i,testId:r,portalInto:o,width:a=C9,color:l})=>(0,es.jsx)(Jl,{portal:!0,portalInto:o,label:e?.label??n,title:e?.label,width:a,color:l,testId:r,chevronSize:14,triggerStyle:{fontSize:12,padding:"5px 8px 5px 10px"},children:s=>t.map(u=>{let c=u.id===e?.id;return(0,es.jsxs)(mr,{role:"option",selected:c,testId:r?`${r}-option`:void 0,onSelect:()=>{s(),i(u.id)},style:{gap:12,padding:"8px 10px"},children:[(0,es.jsx)("span",{children:u.label}),(0,es.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:10},children:[u.hint?(0,es.jsx)("span",{style:{color:b.dim},children:u.hint}):null,(0,es.jsx)("span",{"aria-hidden":!c,style:{width:"1ch",textAlign:"right"},children:c?"\u2713":""})]})]},u.id)})});var km=R(I(),1),wN=({size:e=15})=>(0,km.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,km.jsx)("circle",{cx:"12",cy:"12",r:"3"}),(0,km.jsx)("path",{d:"M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1.1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.5-1.1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3h.1a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8v.1a1.7 1.7 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1z"})]});var kN=R(j(),1);var Eu=R(I(),1),k9=()=>typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.userAgent),CN=({children:e})=>(0,Eu.jsx)("kbd",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:18,height:18,padding:"0 4px",boxSizing:"border-box",borderRadius:4,background:b.panel2,border:`1px solid ${b.line}`,color:b.secondary,font:"inherit",fontSize:V.label,lineHeight:1},children:e}),RN=({onOpen:e})=>{let[t,n]=(0,kN.useState)(!1);return(0,Eu.jsxs)("button",{type:"button","data-testid":"command-palette-hint",onClick:e,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),title:"Open the command palette","aria-label":"Open the command palette",style:{display:"inline-flex",alignItems:"center",gap:7,background:t?b.hover:"transparent",border:"none",borderRadius:6,padding:"3px 6px",color:b.dim2,fontSize:V.label,fontFamily:"inherit",cursor:"pointer",whiteSpace:"nowrap"},children:[(0,Eu.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:3},children:[(0,Eu.jsx)(CN,{children:k9()?"\u2318":"Ctrl"}),(0,Eu.jsx)(CN,{children:"K"})]}),"commands"]})};var TN=R(I(),1),Mv=({user:e,index:t,isFocus:n,filled:i=!1})=>(0,TN.jsx)("span",{title:e.name,style:{width:18,height:18,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",background:i?e.color:"transparent",color:i?b.chrome:e.color,border:`1px solid ${e.color}`,fontSize:11,fontWeight:700,marginLeft:t===0?0:4,flexShrink:0},children:e.name.at(0)?.toUpperCase()},e.id);var LN="1.13.2";var ft=R(I(),1),AN=({state:e,connection:t,onReconnect:n,scrubbing:i,syncStatus:r,onOpenCommands:o,board:a,settings:l})=>{let s=r.status==="synced"?b.green:r.status==="failed"?b.red:r.status==="offline"?b.dim:b.accent,u=t!=="connected"?"Not connected":r.status==="failed"?`Sync failed \u2014 ${r.msg}`:r.msg;return(0,ft.jsx)(Zl,{as:"header",borderRadius:0,borderColor:b.line,glowOpacity:.08,style:{height:56,padding:"0 30px",borderLeft:"none",borderRight:"none",borderTop:"none"},children:(0,ft.jsxs)("div",{style:{height:"100%",width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,ft.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:14},children:[(0,ft.jsx)("div",{style:{color:b.accent,fontSize:12,fontWeight:700},children:":epiq"}),(0,ft.jsx)("span",{style:{color:b.dim,fontSize:12},children:"/"}),a,(0,ft.jsx)(RN,{onOpen:o})]}),(0,ft.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:24},children:[(0,ft.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:12,fontSize:11,whiteSpace:"nowrap"},children:[i&&(0,ft.jsxs)(ft.Fragment,{children:[(0,ft.jsx)("span",{style:{color:b.accent,fontWeight:700},children:"Read-only"}),(0,ft.jsx)("span",{style:{color:b.dim},children:"|"})]}),(0,ft.jsx)("span",{"data-testid":"sync-dot",title:u,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",padding:"5px 7px"},children:(0,ft.jsx)("span",{style:{width:4,height:4,borderRadius:999,background:t==="connected"?s:b.dim}})}),(0,ft.jsx)("span",{style:{color:b.dim},children:"|"}),t==="connected"?(0,ft.jsx)("span",{style:{color:b.dim},children:"connected"}):t==="connecting"?(0,ft.jsx)("span",{style:{color:b.dim},children:"connecting\u2026"}):t==="reconnecting"?(0,ft.jsx)("span",{"data-testid":"reconnecting",style:{color:b.accent},children:"reconnecting\u2026"}):(0,ft.jsx)(ee,{"data-testid":"connection-lost",variant:"ghost",onClick:n,title:"Not connected \u2014 reconnect now",style:{color:b.red,fontSize:10},children:"reconnect"}),(0,ft.jsx)("span",{style:{color:b.dim},children:"|"}),(0,ft.jsx)("span",{style:{color:b.dim},children:"v"+LN})]}),(0,ft.jsx)("span",{ref:l.ref,style:{display:"inline-flex"},children:e?.user?(0,ft.jsx)("button",{"data-testid":"open-settings",onClick:l.onToggle,"aria-label":"Settings","aria-pressed":l.open,"aria-expanded":l.open,"aria-controls":"settings-panel",style:{background:"transparent",border:"none",cursor:"pointer",display:"flex",padding:0},children:(0,ft.jsx)(Mv,{user:e.user,filled:l.open})}):(0,ft.jsx)(Se,{title:"Settings",testId:"open-settings",pressed:l.open,"aria-expanded":l.open,"aria-controls":"settings-panel",onClick:l.onToggle,children:(0,ft.jsx)(wN,{})})})]})]})})};var In=R(j(),1);var d1=R(j(),1);var R9="rgba(255, 135, 135, 0.14)",Dv=({armed:e,hovered:t})=>({display:"flex",alignItems:"center",justifyContent:"space-between",gap:8,padding:"6px 8px",borderRadius:6,background:e?R9:t?b.line:"transparent",boxShadow:e?`inset 0 0 0 1px ${b.red}`:void 0});var _d=R(I(),1),Od=({size:e=13})=>(0,_d.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,_d.jsx)("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2"}),(0,_d.jsx)("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"}),(0,_d.jsx)("circle",{cx:"12",cy:"16.5",r:"2.1",fill:"currentColor",stroke:"none"})]});var wu=R(I(),1),_v=({size:e=14})=>(0,wu.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,wu.jsx)("polyline",{points:"3 6 5 6 21 6"}),(0,wu.jsx)("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"}),(0,wu.jsx)("line",{x1:"10",y1:"11",x2:"10",y2:"17"}),(0,wu.jsx)("line",{x1:"14",y1:"11",x2:"14",y2:"17"})]});var Yn=R(I(),1),IN=({contributors:e,onRemove:t,onClose:n})=>{let[i,r]=(0,d1.useState)(null),[o,a]=(0,d1.useState)(null),l=[...e].sort((s,u)=>s.name.localeCompare(u.name));return(0,Yn.jsx)("div",{style:{position:"fixed",inset:0,background:b.scrim,backdropFilter:"blur(.5px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3},onMouseDown:n,children:(0,Yn.jsxs)("div",{onMouseDown:s=>s.stopPropagation(),style:{marginTop:"-100px",width:460,background:b.panel,border:`1px solid ${b.line}`,borderRadius:12,padding:20,display:"flex",flexDirection:"column",gap:14},children:[(0,Yn.jsx)("div",{style:{color:b.secondary,fontSize:10,letterSpacing:1,textTransform:"uppercase"},children:"Manage external contributors"}),(0,Yn.jsx)("div",{style:{fontSize:12,color:b.secondary},children:"Remove contributors from the suggestion lists. Locked ones have contributed, so their name is in the immutable log either way."}),(0,Yn.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:2,maxHeight:260,overflowY:"auto"},children:l.map(s=>{let u=s.hasAuthoredAnywhere,c=i===s.id;return(0,Yn.jsxs)("div",{"data-testid":"manage-contributor-row","data-armed":c?"true":"false",onMouseEnter:()=>a(s.id),onMouseLeave:()=>a(d=>d===s.id?null:d),style:Dv({armed:c,hovered:o===s.id}),children:[(0,Yn.jsxs)("span",{style:{fontSize:12,color:s.color,opacity:u?.5:1},children:["@",s.name]}),u?(0,Yn.jsx)("span",{title:"Has contributed \u2014 their name is in the immutable log either way",style:{display:"flex",color:b.dim,opacity:.7,padding:"3px 6px"},children:(0,Yn.jsx)(Od,{})}):s.isRemoved?(0,Yn.jsx)("span",{style:{color:b.dim,fontSize:10},children:"removed"}):(0,Yn.jsxs)(ee,{variant:"ghost",title:c?`Click again to remove @${s.name}`:`Remove @${s.name}`,onClick:()=>{if(!c)return r(s.id);t(s.id),r(null)},style:{display:"flex",alignItems:"center",gap:6,color:c?b.red:b.dim,...c?{border:`1px solid ${b.red}`}:{}},children:[c&&(0,Yn.jsx)("span",{style:{fontSize:10},children:"confirm"}),(0,Yn.jsx)(_v,{})]})]},s.id)})}),(0,Yn.jsx)("div",{style:{display:"flex",justifyContent:"flex-end"},children:(0,Yn.jsx)(ee,{variant:"ghost",onClick:n,children:"close"})})]})})};var f1=R(j(),1);var Vi=R(I(),1),MN=({tags:e,onDelete:t,onClose:n})=>{let[i,r]=(0,f1.useState)(null),[o,a]=(0,f1.useState)(null),l=[...e].sort((s,u)=>s.name.localeCompare(u.name));return(0,Vi.jsx)("div",{style:{position:"fixed",inset:0,background:b.scrim,backdropFilter:"blur(.5px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3},onMouseDown:n,children:(0,Vi.jsxs)("div",{onMouseDown:s=>s.stopPropagation(),style:{marginTop:"-100px",width:460,background:b.panel,border:`1px solid ${b.line}`,borderRadius:12,padding:20,display:"flex",flexDirection:"column",gap:14},children:[(0,Vi.jsx)("div",{style:{color:b.secondary,fontSize:10,letterSpacing:1,textTransform:"uppercase"},children:"Manage tags"}),(0,Vi.jsx)("div",{style:{fontSize:12,color:b.secondary},children:"Delete tags across the whole workspace. A deleted tag comes off every ticket at once; its history stays in the log."}),(0,Vi.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:2,maxHeight:260,overflowY:"auto"},children:l.map(s=>{let u=i===s.id,c=o===s.id;return(0,Vi.jsxs)("div",{"data-testid":"manage-tag-row","data-armed":u?"true":"false",onMouseEnter:()=>a(s.id),onMouseLeave:()=>a(d=>d===s.id?null:d),style:Dv({armed:u,hovered:c}),children:[(0,Vi.jsx)("span",{style:{fontSize:12,color:s.color},children:s.name}),(0,Vi.jsxs)(ee,{variant:"ghost",testId:"delete-tag",title:u?`Click again to delete "${s.name}" everywhere`:`Delete "${s.name}"`,onClick:()=>{if(!u)return r(s.id);t(s.id),r(null)},style:{display:"flex",alignItems:"center",gap:6,color:u?b.red:b.dim,...u?{border:`1px solid ${b.red}`}:{}},children:[u&&(0,Vi.jsx)("span",{style:{fontSize:10},children:"confirm"}),(0,Vi.jsx)(_v,{})]})]},s.id)})}),(0,Vi.jsx)("div",{style:{display:"flex",justifyContent:"flex-end"},children:(0,Vi.jsx)(ee,{variant:"ghost",onClick:n,children:"close"})})]})})};var Hd=R(j(),1);var DN=R(I(),1),T9=async e=>{try{return await navigator.clipboard.writeText(e),!0}catch{return!1}},Nd=({refValue:e})=>{let[t,n]=(0,Hd.useState)(!1),i=(0,Hd.useRef)(void 0);return(0,Hd.useEffect)(()=>()=>clearTimeout(i.current),[]),(0,DN.jsx)("button",{type:"button","data-testid":"copy-ref",title:`Copy ${e}`,onClick:async r=>{r.stopPropagation(),await T9(e)&&(n(!0),clearTimeout(i.current),i.current=setTimeout(()=>n(!1),1200))},style:{fontFamily:"monospace",fontSize:"inherit",color:t?b.green:b.dim,background:"transparent",border:"none",padding:0,cursor:"pointer",transition:"color 120ms ease"},onMouseEnter:r=>{t||(r.currentTarget.style.color=b.accent)},onMouseLeave:r=>{r.currentTarget.style.color=t?b.green:b.dim},children:t?"copied!":e})};var pr=R(I(),1),_N=({size:e=14})=>(0,pr.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinejoin:"round","aria-hidden":"true",children:(0,pr.jsx)("path",{d:"M8 5.5 19 12 8 18.5Z"})}),ON=({size:e=14})=>(0,pr.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:[(0,pr.jsx)("line",{x1:"9",y1:"5.5",x2:"9",y2:"18.5"}),(0,pr.jsx)("line",{x1:"15",y1:"5.5",x2:"15",y2:"18.5"})]}),HN=({size:e=14})=>(0,pr.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,pr.jsx)("path",{d:"M20 12a8 8 0 1 1-2.6-5.9"}),(0,pr.jsx)("polyline",{points:"20 3 20 8 15 8"})]}),Ov=({size:e=14})=>(0,pr.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:[(0,pr.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"}),(0,pr.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"})]});var h1=R(I(),1),Hv=({size:e=14})=>(0,h1.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,h1.jsx)("path",{d:"M4 6h16l-6 7v7l-4-2.5V13z"})});var m1=R(I(),1),NN=({narrowed:e,capped:t,disabled:n,onChange:i})=>(0,m1.jsx)(Se,{testId:"ticket-only",pressed:e,disabled:n,title:e&&t?"Too many events to single out \u2014 show all":e?"Show the whole timeline":"Narrow log and timeline to ticket",onClick:()=>i(!e),children:(0,m1.jsx)(Hv,{size:me})});var Rm=R(I(),1),FN=({size:e=16})=>(0,Rm.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,Rm.jsx)("polyline",{points:"4 6 9 12 4 18"}),(0,Rm.jsx)("polyline",{points:"20 6 15 12 20 18"})]});var Tm=R(I(),1),PN=({size:e=16})=>(0,Tm.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,Tm.jsx)("polyline",{points:"9 6 4 12 9 18"}),(0,Tm.jsx)("polyline",{points:"15 6 20 12 15 18"})]});var Uo=R(j(),1);var Lm=R(I(),1),Et=({title:e,action:t,children:n,first:i=!1})=>(0,Lm.jsxs)("section",{style:{padding:i?"0 0 18px":"18px 0",borderTop:i?"none":`1px solid ${b.line}`},children:[(0,Lm.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:12,minHeight:Yl},children:[(0,Lm.jsx)("span",{style:{color:b.dim,fontSize:V.label,textTransform:"uppercase",letterSpacing:"0.08em"},children:e}),t]}),n]});var L9="/media/",p1=e=>`${L9}${e}`;var Cu=R(j(),1);var zN="image/png,image/jpeg,image/gif,image/webp",A9="rgba(118, 212, 255, 0.08)",Fd=e=>e==null?[]:Array.from(e).filter(t=>t.type.startsWith("image/")),I9=(e,t,n)=>{let i=Math.max(0,Math.min(t,e.length)),r=e.slice(0,i),o=e.slice(i),a=r===""||r.endsWith(`
1385
1385
  `)?"":`
1386
1386
  `,l=o===""||o.startsWith(`
1387
1387
  `)?"":`