github-issue-tower-defence-management 2.144.1 → 2.144.3

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.
@@ -10,7 +10,7 @@ Error generating stack: `+e.message+`
10
10
 
11
11
  `),ye=`In Tmux by human`,be=`Awaiting Workspace`,xe=[`In Tmux by human`,`Todo by human`,be],Se=e=>e===`todo-by-human`||e===`todo-by-agent`,Ce=({statusOptions:e,onOkAndAwaitingWorkspace:t})=>{let n=e.find(e=>e.name.toLowerCase()===be.toLowerCase());if(n===void 0)return null;let r=ue(n.color);return(0,x.jsx)(`div`,{className:`console-op-group`,children:(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,style:{color:r.fg,borderColor:r.border,backgroundColor:r.bg},onClick:()=>t(n),children:`ok & Awaiting Workspace`})})},we={issueOpen:{color:`#3fb950`,paths:[`M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z`,`M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Z`]},issueClosed:{color:`#a371f7`,paths:[`M11.28 6.78a.75.75 0 0 0-1.06-1.06L7.25 8.69 5.78 7.22a.75.75 0 0 0-1.06 1.06l2 2a.75.75 0 0 0 1.06 0l3.5-3.5Z`,`M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 1 0-13 0 6.5 6.5 0 0 0 13 0Z`]},issueClosedNotPlanned:{color:`#848d97`,paths:[`M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm9.78-2.22-5.5 5.5a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734l5.5-5.5a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Z`]},prOpen:{color:`#3fb950`,paths:[`M1.5 3.25a2.25 2.25 0 1 1 3 2.122v5.256a2.251 2.251 0 1 1-1.5 0V5.372A2.25 2.25 0 0 1 1.5 3.25Zm5.677-.177L9.573.677A.25.25 0 0 1 10 .854V2.5h1A2.5 2.5 0 0 1 13.5 5v5.628a2.251 2.251 0 1 1-1.5 0V5a1 1 0 0 0-1-1h-1v1.646a.25.25 0 0 1-.427.177L7.177 3.427a.25.25 0 0 1 0-.354ZM3.75 2.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm0 9.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm8.25.75a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Z`]},prMerged:{color:`#a371f7`,paths:[`M5.45 5.154A4.25 4.25 0 0 0 9.25 7.5h1.378a2.251 2.251 0 1 1 0 1.5H9.25A5.734 5.734 0 0 1 5 7.123v3.505a2.25 2.25 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.95-.218ZM4.25 13.5a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm8.5-4.5a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5ZM5 3.25a.75.75 0 1 0 0 .005V3.25Z`]},prClosed:{color:`#f85149`,paths:[`M3.25 1A2.25 2.25 0 0 1 4 5.372v5.256a2.251 2.251 0 1 1-1.5 0V5.372A2.251 2.251 0 0 1 3.25 1Zm9.5 5.5a.75.75 0 0 1 .75.75v3.378a2.251 2.251 0 1 1-1.5 0V7.25a.75.75 0 0 1 .75-.75Zm-2.03-5.273a.75.75 0 0 1 1.06 0l.97.97.97-.97a.748.748 0 0 1 1.265.332.75.75 0 0 1-.205.729l-.97.97.97.97a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018l-.97-.97-.97.97a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734l.97-.97-.97-.97a.75.75 0 0 1 0-1.06ZM2.5 3.25a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0ZM3.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm9.5 0a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z`]},prDraft:{color:`#8b949e`,paths:[`M3.25 1A2.25 2.25 0 0 1 4 5.372v5.256a2.251 2.251 0 1 1-1.5 0V5.372A2.251 2.251 0 0 1 3.25 1Zm9.5 14a2.25 2.25 0 1 1 0-4.5 2.25 2.25 0 0 1 0 4.5ZM2.5 3.25a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0ZM3.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm9.5 0a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM14 7.5a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0Zm0-4.25a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0Z`]}},Te=({isPr:e,state:t,merged:n,isDraft:r,stateReason:i})=>e?r?`prDraft`:n?`prMerged`:t===`closed`?`prClosed`:`prOpen`:t===`closed`?i===`not_planned`?`issueClosedNotPlanned`:`issueClosed`:`issueOpen`,Ee=({size:e=12,...t})=>{let n=Te(t),r=we[n];return(0,x.jsx)(`svg`,{className:`console-item-icon`,viewBox:`0 0 16 16`,width:e,height:e,fill:r.color,role:`img`,"aria-label":n,children:r.paths.map(e=>(0,x.jsx)(`path`,{d:e},e))})},De=({item:e,isActive:t,now:n,statusOptions:r=[],onSelect:i})=>(0,x.jsx)(`button`,{type:`button`,className:`console-item-row`,"aria-current":t?`true`:void 0,"data-active":t?`true`:void 0,onClick:()=>i(e),children:(0,x.jsxs)(`span`,{className:`console-item-meta`,children:[(0,x.jsxs)(`span`,{className:`console-item-title`,children:[(0,x.jsx)(Ee,{isPr:e.isPr,state:`open`,merged:!1,isDraft:!1,stateReason:``}),e.title]}),(0,x.jsxs)(`span`,{className:`console-item-sub`,children:[(0,x.jsxs)(`span`,{className:`console-item-pill`,children:[`#`,e.number]}),e.repo!==``&&(0,x.jsx)(`span`,{className:`console-item-pill`,children:e.repo}),(0,x.jsx)(`span`,{className:`console-item-pill`,children:e.isPr?`PR`:`Issue`}),e.createdAt!==``&&(0,x.jsxs)(`span`,{className:`console-item-opened`,children:[` · opened `,(0,x.jsx)(`span`,{className:`console-item-createdat`,title:A(e.createdAt),children:k(e.createdAt,n)})]}),e.status!==null&&e.status!==``&&(0,x.jsx)(`span`,{className:`console-item-status-badge`,style:de(r.find(t=>t.name===e.status)?.color??null),children:e.status})]}),(e.nextActionDate!==null||e.nextActionHour!==null||e.dependedIssueUrls.length>0)&&(0,x.jsxs)(`span`,{className:`console-item-fields`,children:[e.nextActionDate!==null&&(0,x.jsxs)(`span`,{className:`console-item-field`,children:[(0,x.jsx)(`span`,{className:`console-item-field-label`,children:`Next Action Date`}),e.nextActionDate.slice(0,10)]}),e.nextActionHour!==null&&(0,x.jsxs)(`span`,{className:`console-item-field`,children:[(0,x.jsx)(`span`,{className:`console-item-field-label`,children:`Next Action Hour`}),e.nextActionHour]}),e.dependedIssueUrls.length>0&&(0,x.jsxs)(`span`,{className:`console-item-field`,children:[(0,x.jsx)(`span`,{className:`console-item-field-label`,children:`Depended Issue URL`}),e.dependedIssueUrls.join(`, `)]})]}),e.agent!==null&&e.agent!==``&&(0,x.jsx)(`span`,{className:`console-item-status-agent`,children:(0,x.jsxs)(`span`,{className:`console-item-field`,children:[(0,x.jsx)(`span`,{className:`console-item-field-label`,children:`Agent`}),e.agent]})})]})}),Oe=({story:e,count:t,colorEnum:n})=>{let r=ue(n);return(0,x.jsxs)(`div`,{className:`console-group-header`,children:[(0,x.jsxs)(`span`,{className:`console-storytag`,children:[(0,x.jsx)(`span`,{className:`console-story-dot`,style:{backgroundColor:r.dot}}),e]}),(0,x.jsx)(`span`,{className:`console-group-count`,children:t})]})},ke=({rows:e,storyColors:t,statusOptions:n=[],activeItemId:r,now:i,isLoading:a,error:o,onSelectItem:s,executiveSummaries:c,onOkAndAwaitingWorkspace:l})=>o===null?a?(0,x.jsx)(`p`,{className:`console-list-message`,children:`Loading list...`}):e.length===0?(0,x.jsx)(`p`,{className:`console-list-empty`,children:`No items`}):(0,x.jsx)(`ul`,{className:`console-list`,children:e.map(e=>{if(e.kind===`group-header`)return(0,x.jsx)(`li`,{className:`console-list-group`,children:(0,x.jsx)(Oe,{story:e.story,count:e.count,colorEnum:I(t,e.story)})},`group:${e.story}`);let a=c?.[e.item.projectItemId]??null;return(0,x.jsxs)(`li`,{className:`console-list-row`,children:[(0,x.jsx)(De,{item:e.item,isActive:e.item.itemId===r,now:i,statusOptions:n,onSelect:s}),a!==null&&a!==``&&(0,x.jsx)(`span`,{className:`console-item-executive-summary`,children:a}),l!==void 0&&(0,x.jsx)(Ce,{statusOptions:n,onOkAndAwaitingWorkspace:t=>l(e.item,t)})]},e.item.itemId)})}):(0,x.jsxs)(`p`,{role:`alert`,className:`console-list-message console-list-error`,children:[`Failed to load list: `,o]}),Ae=({agentOptions:e,agentCounts:t,selectedAgent:n,onAgentChange:r})=>{let i=e.filter(e=>(t[e.name]??0)>0);return i.length===0?null:(0,x.jsx)(`div`,{className:`console-prs-agent-filter`,children:(0,x.jsxs)(`select`,{value:n??``,onChange:e=>r(e.target.value===``?null:e.target.value),"aria-label":`Filter by agent`,children:[(0,x.jsx)(`option`,{value:``,children:`All agents`}),i.map(e=>(0,x.jsxs)(`option`,{value:e.name,children:[e.name,` (`,t[e.name],`)`]},e.id))]})})},je=e=>({...de(e),fontSize:`12px`,whiteSpace:`nowrap`,flexShrink:0}),Me=({item:e,isActive:t,statusOptions:n,agentOptions:r,onSelect:i})=>{let a=n.find(t=>t.name===e.status),o=r.find(t=>t.name===e.agent);return(0,x.jsxs)(`button`,{type:`button`,className:`console-item-row console-queued-item-row`,"aria-current":t?`true`:void 0,"data-active":t?`true`:void 0,onClick:()=>i(e),children:[(0,x.jsx)(Ee,{isPr:e.isPr,state:`open`,merged:!1,isDraft:!1,stateReason:``}),(0,x.jsx)(`span`,{className:`console-queued-item-title`,children:e.title}),(0,x.jsxs)(`span`,{className:`console-queued-item-badges`,children:[e.status!==null&&e.status!==``&&(0,x.jsx)(`span`,{className:`console-queued-item-badge`,style:je(a?.color??null),children:e.status}),e.agent!==null&&e.agent!==``&&(0,x.jsx)(`span`,{className:`console-queued-item-badge`,style:je(o?.color??null),children:e.agent})]}),(0,x.jsx)(`span`,{className:`console-queued-item-actions`})]})},Ne=({rows:e,storyColors:t,statusOptions:n,agentOptions:r,activeItemId:i,isLoading:a,error:o,onSelectItem:s})=>o===null?a?(0,x.jsx)(`p`,{className:`console-list-message`,children:`Loading list...`}):e.length===0?(0,x.jsx)(`p`,{className:`console-list-empty`,children:`No items`}):(0,x.jsx)(`ul`,{className:`console-list`,children:e.map(e=>e.kind===`group-header`?(0,x.jsx)(`li`,{className:`console-list-group`,children:(0,x.jsx)(Oe,{story:e.story,count:e.count,colorEnum:I(t,e.story)})},`group:${e.story}`):(0,x.jsx)(`li`,{className:`console-list-row`,children:(0,x.jsx)(Me,{item:e.item,isActive:e.item.itemId===i,statusOptions:n,agentOptions:r,onSelect:s})},e.item.itemId))}):(0,x.jsxs)(`p`,{role:`alert`,className:`console-list-message console-list-error`,children:[`Failed to load list: `,o]}),Pe=Object.keys(F),Fe=({storyName:e,storyOptionId:t,onSelectColor:n,onClose:r,disabled:i})=>{(0,y.useEffect)(()=>{let e=e=>{e.key===`Escape`&&r()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[r]);let a=e=>{n(t,e),r()};return(0,x.jsxs)(`div`,{className:`console-modal-dialog`,role:`dialog`,"aria-modal":`true`,"aria-label":`Change color for ${e}`,children:[(0,x.jsx)(`button`,{type:`button`,className:`console-modal-backdrop`,"aria-label":`Close dialog`,onClick:r}),(0,x.jsxs)(`div`,{className:`console-modal-inner`,children:[(0,x.jsxs)(`h2`,{className:`console-modal-title`,children:[`Change color for `,e]}),(0,x.jsx)(`div`,{className:`console-story-color-palette`,children:Pe.map(e=>{let t=F[e];return(0,x.jsx)(`button`,{type:`button`,className:`console-story-color-swatch`,"aria-label":e===`GRAY`?`${e} (disable)`:e,style:{backgroundColor:t.dot},onClick:()=>a(e),disabled:i,children:e===`GRAY`&&(0,x.jsx)(`span`,{className:`console-story-color-swatch-label`,children:`disable`})},e)})}),(0,x.jsx)(`div`,{className:`console-modal-actions`,children:(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,onClick:r,children:`Cancel`})})]})]})},Ie=({onSubmit:e,onClose:t})=>{let[n,r]=(0,y.useState)(``),[i,a]=(0,y.useState)(!1),[o,s]=(0,y.useState)(null),c=(0,y.useRef)(null);(0,y.useEffect)(()=>{c.current?.focus()},[]),(0,y.useEffect)(()=>{let e=e=>{e.key===`Escape`&&t()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[t]);let l=async()=>{let r=n.trim();if(r.length===0){s(`Story name is required`);return}a(!0),s(null);try{await e(r),t()}catch(e){s(e instanceof Error?e.message:String(e))}finally{a(!1)}};return(0,x.jsxs)(`div`,{className:`console-modal-dialog`,role:`dialog`,"aria-modal":`true`,"aria-label":`Add story`,children:[(0,x.jsx)(`button`,{type:`button`,className:`console-modal-backdrop`,"aria-label":`Close dialog`,onClick:t}),(0,x.jsxs)(`div`,{className:`console-modal-inner`,children:[(0,x.jsx)(`h2`,{className:`console-modal-title`,children:`Add story`}),(0,x.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),l()},children:[(0,x.jsx)(`input`,{ref:c,type:`text`,className:`console-modal-input`,placeholder:`Story name`,value:n,onChange:e=>r(e.target.value),disabled:i}),o!==null&&(0,x.jsx)(`p`,{role:`alert`,className:`console-list-error`,children:o}),(0,x.jsxs)(`div`,{className:`console-modal-actions`,children:[(0,x.jsx)(`button`,{type:`submit`,className:`console-op-button`,disabled:i,children:i?`Creating…`:`Create`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,onClick:t,disabled:i,children:`Cancel`})]})]})]})]})},Le=({storyName:e,isDeleting:t,deleteError:n,onConfirm:r,onCancel:i})=>((0,y.useEffect)(()=>{let e=e=>{e.key===`Escape`&&i()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[i]),(0,x.jsxs)(`div`,{className:`console-modal-dialog`,role:`dialog`,"aria-modal":`true`,"aria-label":`Confirm story deletion`,children:[(0,x.jsx)(`button`,{type:`button`,className:`console-modal-backdrop`,"aria-label":`Close dialog`,onClick:i}),(0,x.jsxs)(`div`,{className:`console-modal-inner`,children:[(0,x.jsx)(`h2`,{className:`console-modal-title`,children:`Delete story`}),(0,x.jsxs)(`p`,{className:`console-story-delete-confirm-message`,children:[`Delete story option "`,e,`" from the GitHub custom field?`]}),n!==null&&(0,x.jsx)(`p`,{role:`alert`,className:`console-list-error`,children:n}),(0,x.jsxs)(`div`,{className:`console-modal-actions`,children:[(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-danger`,onClick:()=>r(!0),disabled:t,children:t?`Deleting…`:`Delete with child tasks`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-danger`,onClick:()=>r(!1),disabled:t,children:t?`Deleting…`:`Keep child tasks`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,onClick:i,disabled:t,children:`Cancel`})]})]})]})),Re=({currentDescription:e,onSubmit:t,onClose:n})=>{let[r,i]=(0,y.useState)(e),[a,o]=(0,y.useState)(!1),[s,c]=(0,y.useState)(null),l=(0,y.useRef)(null);(0,y.useEffect)(()=>{l.current?.focus(),l.current?.select()},[]),(0,y.useEffect)(()=>{let e=e=>{e.key===`Escape`&&n()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[n]);let u=async()=>{o(!0),c(null);try{await t(r.trim()),n()}catch(e){c(e instanceof Error?e.message:String(e))}finally{o(!1)}};return(0,x.jsxs)(`div`,{className:`console-modal-dialog`,role:`dialog`,"aria-modal":`true`,"aria-label":`Edit story description`,children:[(0,x.jsx)(`button`,{type:`button`,className:`console-modal-backdrop`,"aria-label":`Close dialog`,onClick:n}),(0,x.jsxs)(`div`,{className:`console-modal-inner`,children:[(0,x.jsx)(`h2`,{className:`console-modal-title`,children:`Edit story description`}),(0,x.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),u()},children:[(0,x.jsx)(`textarea`,{ref:l,className:`console-modal-input`,placeholder:`Story description`,value:r,onChange:e=>i(e.target.value),disabled:a,rows:4}),s!==null&&(0,x.jsx)(`p`,{role:`alert`,className:`console-list-error`,children:s}),(0,x.jsxs)(`div`,{className:`console-modal-actions`,children:[(0,x.jsx)(`button`,{type:`submit`,className:`console-op-button`,disabled:a,children:a?`Saving…`:`Save`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,onClick:n,disabled:a,children:`Cancel`})]})]})]})]})},ze=({currentName:e,onSubmit:t,onClose:n})=>{let[r,i]=(0,y.useState)(e),[a,o]=(0,y.useState)(!1),[s,c]=(0,y.useState)(null),l=(0,y.useRef)(null);(0,y.useEffect)(()=>{l.current?.focus(),l.current?.select()},[]),(0,y.useEffect)(()=>{let e=e=>{e.key===`Escape`&&n()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[n]);let u=async()=>{let e=r.trim();if(e.length===0){c(`Story name is required`);return}o(!0),c(null);try{await t(e),n()}catch(e){c(e instanceof Error?e.message:String(e))}finally{o(!1)}};return(0,x.jsxs)(`div`,{className:`console-modal-dialog`,role:`dialog`,"aria-modal":`true`,"aria-label":`Rename story`,children:[(0,x.jsx)(`button`,{type:`button`,className:`console-modal-backdrop`,"aria-label":`Close dialog`,onClick:n}),(0,x.jsxs)(`div`,{className:`console-modal-inner`,children:[(0,x.jsx)(`h2`,{className:`console-modal-title`,children:`Rename story`}),(0,x.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),u()},children:[(0,x.jsx)(`input`,{ref:l,type:`text`,className:`console-modal-input`,placeholder:`Story name`,value:r,onChange:e=>i(e.target.value),disabled:a}),s!==null&&(0,x.jsx)(`p`,{role:`alert`,className:`console-list-error`,children:s}),(0,x.jsxs)(`div`,{className:`console-modal-actions`,children:[(0,x.jsx)(`button`,{type:`submit`,className:`console-op-button`,disabled:a,children:a?`Renaming…`:`Rename`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,onClick:n,disabled:a,children:`Cancel`})]})]})]})]})},Be=({storyName:e,onSubmit:t,onClose:n,onEdit:r})=>{let[i,a]=(0,y.useState)(``),[o,s]=(0,y.useState)(!1),[c,l]=(0,y.useState)(null),[u,d]=(0,y.useState)(!1),f=(0,y.useRef)(null);(0,y.useEffect)(()=>{f.current?.focus()},[]),(0,y.useEffect)(()=>{let e=e=>{e.key===`Escape`&&n()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[n]);let p=async()=>{let r=i.trim();if(r.length===0){l(`Title is required`);return}s(!0),l(null);try{await t(e,r),n()}catch(e){l(e instanceof Error?e.message:String(e)),d(!0)}finally{s(!1)}};return(0,x.jsxs)(`div`,{className:`console-modal-dialog`,role:`dialog`,"aria-modal":`true`,"aria-label":`Add task to ${e}`,children:[(0,x.jsx)(`button`,{type:`button`,className:`console-modal-backdrop`,"aria-label":`Close dialog`,onClick:n}),(0,x.jsxs)(`div`,{className:`console-modal-inner`,children:[(0,x.jsxs)(`h2`,{className:`console-modal-title`,children:[`Add task to `,e]}),(0,x.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),p()},children:[(0,x.jsx)(`input`,{ref:f,type:`text`,className:`console-modal-input`,placeholder:`Issue title`,value:i,onChange:e=>a(e.target.value),disabled:o}),c!==null&&(0,x.jsx)(`p`,{role:`alert`,className:`console-list-error`,children:c}),(0,x.jsxs)(`div`,{className:`console-modal-actions`,children:[(0,x.jsx)(`button`,{type:`submit`,className:`console-op-button`,disabled:o,children:o?`Creating…`:`Create`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,onClick:n,disabled:o,children:`Cancel`}),u&&r!==void 0&&(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,onClick:()=>{r(e,i),n()},disabled:o,children:`Edit`})]})]})]})]})},Ve=({items:e})=>(0,x.jsx)(`ul`,{className:`console-story-task-list`,children:e.map(e=>(0,x.jsxs)(`li`,{className:`console-story-task-row`,children:[(0,x.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,className:`console-story-task-title`,children:e.title}),(0,x.jsx)(`span`,{className:`console-story-task-status`,children:e.status??`—`}),(0,x.jsx)(`span`,{className:`console-story-task-agent`,children:e.agent??`—`}),(0,x.jsx)(`span`,{className:`console-story-task-depended-urls`,children:e.dependedIssueUrls.length>0?e.dependedIssueUrls.join(`, `):`—`}),(0,x.jsx)(`span`,{className:`console-story-task-next-action-date`,children:e.nextActionDate===null?`—`:e.nextActionDate.slice(0,10)}),(0,x.jsx)(`span`,{className:`console-story-task-next-action-hour`,children:e.nextActionHour===null?`—`:String(e.nextActionHour)})]},e.url))}),He=({stories:e,isLoading:t,error:n,showGray:r,onCreateIssue:i,onAddStory:a,onSelectColor:o,onToggleGray:s,onReorderStory:c,onDeleteStory:l,onRenameStory:u,onUpdateDescription:d,onStoryTaskCreateEdit:f,optimisticColors:p,colorChangeInFlight:m,colorErrors:h})=>{let[g,_]=(0,y.useState)(null),[v,b]=(0,y.useState)(!1),[S,C]=(0,y.useState)(null),[w,T]=(0,y.useState)(null),[ee,E]=(0,y.useState)(null),[D,O]=(0,y.useState)({}),[te,k]=(0,y.useState)(null),[ne,A]=(0,y.useState)(null),[j,M]=(0,y.useState)({}),[N,re]=(0,y.useState)(null);(0,y.useEffect)(()=>{if(N===null)return;let e=e=>{let t=e.target;!t.closest(`.console-story-overflow-menu`)&&!t.closest(`.console-story-overflow-btn`)&&re(null)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[N]);let ie=e=>j[e]??{inProgress:!1,error:null},ae=async(e,t)=>{M(t=>({...t,[e]:{inProgress:!0,error:null}}));try{await c(e,t),M(t=>({...t,[e]:{inProgress:!1,error:null}}))}catch(t){M(n=>({...n,[e]:{inProgress:!1,error:t instanceof Error?t.message:String(t)}}))}};if(n!==null)return(0,x.jsxs)(`p`,{role:`alert`,className:`console-list-message console-list-error`,children:[`Failed to load stories: `,n]});if(t)return(0,x.jsx)(`p`,{className:`console-list-message`,children:`Loading stories...`});let P=async(e,t)=>{O(t=>({...t,[e]:{isDeleting:!0,error:null}}));try{await l(e,t),E(null),O(t=>({...t,[e]:{isDeleting:!1,error:null}}))}catch(t){O(n=>({...n,[e]:{isDeleting:!1,error:t instanceof Error?t.message:String(t)}}))}},oe=r?e:e.filter(e=>e.color!==`GRAY`),se=e.some(e=>e.color===`GRAY`),ce=g===null?null:e.find(e=>e.storyOptionId===g)??null,le=S===null?null:e.find(e=>e.storyOptionId===S)??null,F=ee===null?null:e.find(e=>e.storyOptionId===ee)??null,de=ee===null?{isDeleting:!1,error:null}:D[ee]??{isDeleting:!1,error:null},fe=te===null?null:e.find(e=>e.storyOptionId===te)??null,pe=ne===null?null:e.find(e=>e.storyOptionId===ne)??null;return(0,x.jsxs)(`div`,{className:`console-story-list-container`,children:[oe.length===0?(0,x.jsx)(`p`,{className:`console-list-empty`,children:`No active stories`}):(0,x.jsx)(`ul`,{className:`console-story-list`,children:oe.map((e,t)=>{let n=ue(p[e.storyOptionId]??e.color),r=m===e.storyOptionId,i=h[e.storyOptionId]??null,{inProgress:a,error:o}=ie(e.storyOptionId),s=t===0,c=t===oe.length-1,l=w===e.storyOptionId,u=N===e.storyOptionId,d=e.description??``;return(0,x.jsxs)(`li`,{className:`console-story-list-row`,children:[(0,x.jsxs)(`div`,{className:`console-story-list-row-main`,children:[e.storyViewUrl?(0,x.jsxs)(`a`,{href:e.storyViewUrl,target:`_blank`,rel:`noopener noreferrer`,className:`console-storytag`,style:{color:n.fg,borderColor:n.border},children:[(0,x.jsx)(`span`,{className:`console-story-dot`,style:{backgroundColor:n.dot}}),e.storyName]}):(0,x.jsxs)(`span`,{className:`console-storytag`,style:{color:n.fg,borderColor:n.border},children:[(0,x.jsx)(`span`,{className:`console-story-dot`,style:{backgroundColor:n.dot}}),e.storyName]}),(0,x.jsx)(`span`,{className:`console-story-count`,children:e.openItemCount}),(0,x.jsx)(`button`,{type:`button`,className:`console-story-chevron`,"aria-label":l?`Hide tasks`:`Show tasks`,onClick:()=>T(l?null:e.storyOptionId),children:l?`▼`:`▶`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,onClick:()=>_(g===e.storyOptionId?null:e.storyOptionId),children:`+ Add task`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,"aria-label":`Move up`,disabled:s||a,onClick:()=>void ae(e.storyOptionId,`up`),children:`↑`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,"aria-label":`Move down`,disabled:c||a,onClick:()=>void ae(e.storyOptionId,`down`),children:`↓`}),(0,x.jsxs)(`div`,{className:`console-story-overflow-container`,children:[(0,x.jsx)(`button`,{type:`button`,className:`console-story-overflow-btn`,"aria-label":`More options`,"aria-haspopup":`menu`,"aria-expanded":u,onClick:()=>re(u?null:e.storyOptionId),children:`⋯`}),u&&(0,x.jsxs)(`div`,{role:`menu`,className:`console-story-overflow-menu`,children:[(0,x.jsx)(`button`,{type:`button`,role:`menuitem`,className:`console-story-overflow-option`,disabled:r,onClick:()=>{re(null),C(e.storyOptionId)},children:`Change color`}),(0,x.jsx)(`button`,{type:`button`,role:`menuitem`,className:`console-story-overflow-option`,onClick:()=>{re(null),k(e.storyOptionId)},children:`Rename`}),(0,x.jsx)(`button`,{type:`button`,role:`menuitem`,className:`console-story-overflow-option`,onClick:()=>{re(null),A(e.storyOptionId)},children:`Edit description`}),(0,x.jsx)(`hr`,{className:`console-story-overflow-separator`}),(0,x.jsx)(`button`,{type:`button`,role:`menuitem`,className:`console-story-overflow-option console-story-overflow-option--danger`,onClick:()=>{re(null),E(e.storyOptionId)},children:`Delete story`})]})]})]}),d!==``&&(0,x.jsx)(`p`,{className:`console-story-description`,children:d}),l&&(0,x.jsx)(Ve,{items:e.items}),o!==null&&(0,x.jsx)(`p`,{role:`alert`,className:`console-list-error`,children:o}),i!==null&&(0,x.jsx)(`p`,{role:`alert`,className:`console-list-error`,children:i})]},e.storyOptionId)})}),se&&(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,onClick:s,children:r?`Hide archived`:`Show archived`}),(0,x.jsx)(`div`,{className:`console-add-story-section`,children:(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,onClick:()=>b(!v),children:`Add story`})}),ce!==null&&(0,x.jsx)(Be,{storyName:ce.storyName,onSubmit:(e,t)=>i(e,t),onClose:()=>_(null),onEdit:f===void 0?void 0:(e,t)=>{_(null),f(e,t)}}),v&&(0,x.jsx)(Ie,{onSubmit:e=>a(e),onClose:()=>b(!1)}),le!==null&&(0,x.jsx)(Fe,{storyName:le.storyName,storyOptionId:le.storyOptionId,onSelectColor:(e,t)=>{C(null),o(e,t)},onClose:()=>C(null),disabled:m===le.storyOptionId}),F!==null&&(0,x.jsx)(Le,{storyName:F.storyName,isDeleting:de.isDeleting,deleteError:de.error,onConfirm:e=>void P(F.storyOptionId,e),onCancel:()=>{E(null),O({})}}),fe!==null&&(0,x.jsx)(ze,{currentName:fe.storyName,onSubmit:e=>u(fe.storyOptionId,e),onClose:()=>k(null)}),pe!==null&&(0,x.jsx)(Re,{currentDescription:pe.description??``,onSubmit:e=>d(pe.storyOptionId,e),onClose:()=>A(null)})]})},Ue=e=>`${e.isPr?`PR`:`Issue`} #${e.itemNumber}`,We=e=>e===null?`loading…`:e,Ge=e=>{let t=[];return t.push(`CI: ${e.isCiStateSuccess?`pass`:`fail`}`),t.push(`Merge: ${e.mergeableStatus.toLowerCase()}`),e.isBranchOutOfDate&&t.push(`branch out of date`),t.join(` · `)},Ke=e=>e.fetchError?`${Ue(e)} — failed to load current state`:e.currentTitle===null?`${Ue(e)} — loading current state…`:`${Ue(e)} — ${e.currentTitle} (${We(e.currentState)})`,qe=({actions:e,isOnline:t,isConfirming:n,onConfirm:r,onDiscard:i})=>e.length===0?null:(0,x.jsxs)(`section`,{className:`console-offline-panel`,"aria-label":`Offline actions queue`,children:[(0,x.jsxs)(`div`,{className:`console-offline-panel-header`,children:[e.length,` action`,e.length===1?``:`s`,` held`,t?` — confirm each before sending`:` — awaiting connectivity`]}),e.map(e=>(0,x.jsxs)(`div`,{className:`console-offline-panel-item console-offline-panel-item-${e.color}`,children:[(0,x.jsx)(`div`,{className:`console-offline-panel-item-message`,children:e.message}),(0,x.jsx)(`div`,{className:`console-offline-panel-item-target`,children:Ke(e)}),e.fetchError&&(0,x.jsx)(`div`,{className:`console-offline-panel-item-fetch-error`,children:`Failed to load current state — sending will act on the last known state`}),t&&e.isPr&&e.currentPrStatus!==null&&!e.fetchError&&(0,x.jsx)(`div`,{className:`console-offline-panel-item-pr-status`,children:Ge(e.currentPrStatus)}),(0,x.jsxs)(`div`,{className:`console-offline-panel-item-controls`,children:[t&&(0,x.jsx)(`button`,{type:`button`,className:`console-offline-panel-confirm`,disabled:n||e.currentTitle===null&&!e.fetchError,onClick:()=>r(e.id),children:`Send`}),(0,x.jsx)(`button`,{type:`button`,className:`console-offline-panel-discard`,onClick:()=>i(e.id),children:`Discard`})]})]},e.id))]}),Je=({message:e,color:t,remainingSeconds:n,progress:r,onUndo:i})=>(0,x.jsxs)(`div`,{className:`console-undo-toast console-undo-toast-${t}`,role:`status`,"aria-live":`polite`,children:[(0,x.jsx)(`span`,{className:`console-undo-toast-message`,children:e}),(0,x.jsx)(`button`,{type:`button`,className:`console-undo-toast-undo`,onClick:i,children:`Undo`}),(0,x.jsxs)(`span`,{className:`console-undo-toast-countdown`,"aria-hidden":`true`,children:[n,`s`]}),(0,x.jsx)(`span`,{className:`console-undo-toast-bar`,"aria-hidden":`true`,style:{width:`${Math.max(0,Math.min(100,r*100))}%`}})]}),Ye=({title:e,message:t,onDismiss:n,onRetry:r})=>(0,x.jsxs)(`div`,{className:`console-undo-toast-error console-error-toast`,role:`alert`,"aria-live":`assertive`,children:[e!==void 0&&(0,x.jsx)(`span`,{className:`console-error-toast-title`,children:e}),(0,x.jsx)(`span`,{className:`console-error-toast-message`,children:t}),(0,x.jsxs)(`div`,{className:`console-error-toast-actions`,children:[r!==void 0&&(0,x.jsx)(`button`,{type:`button`,className:`console-error-toast-retry`,onClick:r,children:`Retry`}),(0,x.jsx)(`button`,{type:`button`,className:`console-error-toast-dismiss`,onClick:n,children:`Dismiss`})]})]}),Xe=(e,t)=>Object.keys(t.items).length===0&&t.failures.length>0?{status:`error`,failures:t.failures}:{status:`on`,snapshot:{capturedAt:t.capturedAt,tabs:e===null?t.tabs:{...e.tabs,...t.tabs},items:e===null?t.items:{...e.items,...t.items},failures:t.failures}},Ze=`tdpm-airplane-v1`,Qe=`/airplane-snapshot-data`,$e=`tdpm_airplane_mode_on`,et=()=>typeof localStorage>`u`?!1:localStorage.getItem($e)===`1`,tt=e=>{typeof localStorage>`u`||(e?localStorage.setItem($e,`1`):localStorage.removeItem($e))},nt=async e=>{if(typeof caches>`u`)throw Error(`Cache API unavailable`);try{await(await caches.open(Ze)).put(Qe,new Response(JSON.stringify(e),{headers:{"Content-Type":`application/json`}}))}catch(e){throw e instanceof Error&&e.name===`QuotaExceededError`?Error(`Not enough browser storage to save the offline snapshot. Free up storage and retry.`):e}},rt=async()=>{if(typeof caches>`u`)return null;let e=await(await caches.open(Ze)).match(Qe);return e===void 0?null:e.json()},it=async()=>{typeof caches>`u`||await caches.delete(Ze)},z=e=>typeof e==`object`&&!!e&&!Array.isArray(e),B=e=>typeof e==`string`?e:``,at=e=>typeof e==`number`?e:0,ot=e=>e===!0,st=e=>Array.isArray(e)?e.filter(e=>typeof e==`string`):[],ct=e=>e===`MERGEABLE`?`MERGEABLE`:e===`CONFLICTING`?`CONFLICTING`:`UNKNOWN`,lt=e=>z(e)?{number:at(e.number),title:B(e.title),url:B(e.url),repo:B(e.repo),nameWithOwner:B(e.nameWithOwner),projectItemId:B(e.projectItemId),itemId:B(e.itemId),isPr:ot(e.isPr),story:B(e.story),status:typeof e.status==`string`?e.status:null,nextActionDate:typeof e.nextActionDate==`string`?e.nextActionDate:null,nextActionHour:typeof e.nextActionHour==`number`?e.nextActionHour:null,dependedIssueUrls:st(e.dependedIssueUrls),labels:st(e.labels),createdAt:B(e.createdAt),relatedOpenPullRequestUrls:st(e.relatedOpenPullRequestUrls),agent:typeof e.agent==`string`?e.agent:null}:null,ut=e=>{if(!z(e))return{items:[],generatedAt:``,statusOptions:[],agentOptions:[],storyOptions:[],storyColors:{},stories:[],defaultNameWithOwner:null,fromCache:!1,storyOrder:[],timerEndsAt:null,timerTotalSeconds:null};let t=Array.isArray(e.items)?e.items.map(lt).filter(e=>e!==null):[],n=Array.isArray(e.statusOptions)?e.statusOptions.filter(z):[],r=Array.isArray(e.agentOptions)?e.agentOptions.filter(z):[],i=Array.isArray(e.storyOptions)?e.storyOptions.filter(z):[],a=Array.isArray(e.stories)?e.stories.filter(z):[],o=Array.isArray(e.storyOrder)?e.storyOrder.filter(e=>typeof e==`string`):[];return{items:t,generatedAt:typeof e.generatedAt==`string`?e.generatedAt:``,statusOptions:n,agentOptions:r,storyOptions:i,storyColors:z(e.storyColors)?e.storyColors:{},stories:a,defaultNameWithOwner:typeof e.defaultNameWithOwner==`string`?e.defaultNameWithOwner:null,fromCache:!1,storyOrder:o,timerEndsAt:null,timerTotalSeconds:null}},dt=e=>z(e)?{author:B(e.author),body:B(e.body),createdAt:B(e.createdAt)}:null,ft=e=>z(e)?{path:B(e.path),additions:at(e.additions),deletions:at(e.deletions),status:B(e.status),patch:typeof e.patch==`string`?e.patch:null,rawUrl:typeof e.rawUrl==`string`?e.rawUrl:null}:null,pt=e=>z(e)?{sha:B(e.sha),message:B(e.message),author:B(e.author),authoredAt:B(e.authoredAt)}:null,mt=e=>z(e)?{found:ot(e.found),isConflicted:ot(e.isConflicted),mergeableStatus:ct(e.mergeableStatus),isPassedAllCiJob:ot(e.isPassedAllCiJob),isCiStateSuccess:ot(e.isCiStateSuccess),isBranchOutOfDate:ot(e.isBranchOutOfDate),missingRequiredCheckNames:st(e.missingRequiredCheckNames)}:{found:!1,isConflicted:!1,mergeableStatus:`UNKNOWN`,isPassedAllCiJob:!1,isCiStateSuccess:!1,isBranchOutOfDate:!1,missingRequiredCheckNames:[]},ht=e=>{if(!z(e))return null;let t=z(e.summary)?{title:B(e.summary.title),body:B(e.summary.body),additions:at(e.summary.additions),deletions:at(e.summary.deletions),changedFiles:at(e.summary.changedFiles)}:null;return{url:B(e.url),branchName:typeof e.branchName==`string`?e.branchName:null,createdAt:B(e.createdAt),isDraft:ot(e.isDraft),isConflicted:ot(e.isConflicted),mergeableStatus:ct(e.mergeableStatus),isPassedAllCiJob:ot(e.isPassedAllCiJob),isCiStateSuccess:ot(e.isCiStateSuccess),isResolvedAllReviewComments:ot(e.isResolvedAllReviewComments),isBranchOutOfDate:ot(e.isBranchOutOfDate),missingRequiredCheckNames:st(e.missingRequiredCheckNames),summary:t}},gt=e=>{if(!z(e))return{body:``,comments:[],state:{state:`open`,merged:!1,isPullRequest:!1,title:``},files:null,commits:null,prStatus:null,relatedPrs:null};let t=z(e.state)?e.state:{},n={state:B(t.state)||`open`,merged:ot(t.merged),isPullRequest:ot(t.isPullRequest),title:B(t.title)},r=e.files===null?null:Array.isArray(e.files)?e.files.map(ft).filter(e=>e!==null):null,i=e.commits===null?null:Array.isArray(e.commits)?e.commits.map(pt).filter(e=>e!==null):null,a=e.prStatus===null?null:mt(e.prStatus),o=e.relatedPrs===null?null:Array.isArray(e.relatedPrs)?e.relatedPrs.map(ht).filter(e=>e!==null):null;return{body:B(e.body),comments:Array.isArray(e.comments)?e.comments.map(dt).filter(e=>e!==null):[],state:n,files:r,commits:i,prStatus:a,relatedPrs:o}},_t=e=>{if(!z(e))return null;let t=typeof e.capturedAt==`string`?e.capturedAt:``,n=st(e.failures),r={};if(z(e.tabs))for(let[t,n]of Object.entries(e.tabs)){if(!z(n))continue;let e={};for(let[t,r]of Object.entries(n))e[t]=ut(r);r[t]=e}let i={};if(z(e.items))for(let[t,n]of Object.entries(e.items))i[t]=gt(n);return{capturedAt:t,tabs:r,items:i,failures:n}},vt=`/api/airplanesync`,yt=e=>{try{let t=JSON.parse(e);return typeof t==`object`&&t&&!Array.isArray(t)&&`type`in t&&typeof t.type==`string`?t:null}catch{return null}},bt=()=>{let[e,t]=(0,y.useState)(`off`),[n,r]=(0,y.useState)(null),[i,a]=(0,y.useState)(null),[o,s]=(0,y.useState)([]),c=(0,y.useRef)(null);(0,y.useEffect)(()=>{if(!et())return;let e=!1;return rt().then(n=>{e||n===null||(a(n),t(`on`))}).catch(()=>{tt(!1)}),()=>{e=!0}},[]);let l=(0,y.useCallback)(async(e,n)=>{let i=e.getReader(),o=new TextDecoder,c=``;for(;;){let{done:e,value:l}=await i.read();if(e)break;c+=o.decode(l,{stream:!0});let u=c.split(`
12
12
 
13
- `);c=u.pop()??``;for(let e of u){if(!e.startsWith(`data: `))continue;let i=yt(e.slice(6));if(i!==null){if(i.type===`progress`)r({fetched:typeof i.fetched==`number`?i.fetched:0,total:typeof i.total==`number`?i.total:0});else if(i.type===`done`){let e=_t(i.snapshot);if(e===null){t(`error`),s([`Failed to parse snapshot`]);return}let r=Xe(n,e);if(r.status===`error`){s(r.failures),t(`error`);return}let o=_t(r.snapshot);if(o===null){t(`error`),s([`Failed to merge snapshot`]);return}await nt(o),tt(!0),a(o),t(`on`),s(o.failures)}}}}},[]),u=(0,y.useCallback)(()=>{c.current!==null&&c.current.abort();let e=new AbortController;c.current=e,t(`syncing`),r({fetched:0,total:0}),s([]),fetch(vt,{signal:e.signal}).then(async e=>{if(!e.ok||e.body===null){t(`error`),s([`HTTP ${e.status}`]);return}await l(e.body,null)}).catch(e=>{e instanceof Error&&e.name===`AbortError`||(t(`error`),s([e instanceof Error?e.message:String(e)]))})},[l]),d=(0,y.useCallback)(()=>{c.current!==null&&(c.current.abort(),c.current=null),t(`off`),a(null),r(null),s([]),tt(!1),it().catch(()=>{})},[]),f=(0,y.useCallback)((e,n)=>{if(n.length===0)return;c.current!==null&&c.current.abort();let i=new AbortController;c.current=i,t(`syncing`),r({fetched:0,total:n.length}),s([]),fetch(vt,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({targetUrls:n}),signal:i.signal}).then(async n=>{if(!n.ok||n.body===null){t(`error`),s([`HTTP ${n.status}`]);return}await l(n.body,e)}).catch(e=>{e instanceof Error&&e.name===`AbortError`||(t(`error`),s([e instanceof Error?e.message:String(e)]))})},[l]);return{status:e,progress:n,snapshot:i,failures:o,startSync:u,turnOff:d,retryFailed:()=>f(i,o)}},V=e=>typeof e==`object`&&!!e&&!Array.isArray(e),xt=e=>typeof e==`string`?e:``,St=e=>typeof e==`number`?e:0,Ct=e=>e===!0,wt=`console-api-v1`,Tt=async(e,t)=>{let n=`${e}?url=${encodeURIComponent(t)}`;try{let e=await fetch(n);if(!e.ok){let t=`HTTP ${e.status}`;try{let n=await e.json();V(n)&&typeof n.error==`string`&&n.error.length>0&&(t=n.error)}catch(e){console.warn(`Failed to parse error body from non-ok response:`,e)}throw Error(t)}let t=await e.json();try{`caches`in globalThis&&globalThis.caches.open(wt).then(e=>e.put(n,new Response(JSON.stringify(t),{headers:{"Content-Type":`application/json`}}))).catch(e=>{console.warn(`Failed to persist API response to cache:`,e)})}catch(e){console.warn(`Failed to access cache storage:`,e)}return t}catch(e){try{if(`caches`in globalThis){let e=await(await globalThis.caches.open(wt)).match(n);if(e!==void 0)return e.json()}}catch{}throw e}},Et=e=>!V(e)||!Array.isArray(e.comments)?[]:e.comments.filter(V).map(e=>({author:xt(e.author),body:xt(e.body),createdAt:xt(e.createdAt)})),Dt=e=>!V(e)||!Array.isArray(e.files)?[]:e.files.filter(V).map(e=>({path:xt(e.path)||xt(e.filename),additions:St(e.additions),deletions:St(e.deletions),status:xt(e.status),patch:typeof e.patch==`string`?e.patch:null,rawUrl:typeof e.rawUrl==`string`?e.rawUrl:null})),Ot=e=>!V(e)||!Array.isArray(e.commits)?[]:e.commits.filter(V).map(e=>({sha:xt(e.sha),message:xt(e.message),author:xt(e.author),authoredAt:xt(e.authoredAt)})),kt=e=>V(e)?{title:xt(e.title),body:xt(e.body),additions:St(e.additions),deletions:St(e.deletions),changedFiles:St(e.changedFiles)}:null,At=e=>Array.isArray(e)?e.filter(e=>typeof e==`string`):[],jt=e=>e===`MERGEABLE`?`MERGEABLE`:e===`CONFLICTING`?`CONFLICTING`:`UNKNOWN`,Mt=e=>!V(e)||!Array.isArray(e.relatedPullRequests)?[]:e.relatedPullRequests.filter(V).map(e=>({url:xt(e.url),branchName:typeof e.branchName==`string`?e.branchName:null,createdAt:xt(e.createdAt),isDraft:Ct(e.isDraft),isConflicted:Ct(e.isConflicted),mergeableStatus:jt(e.mergeableStatus),isPassedAllCiJob:Ct(e.isPassedAllCiJob),isCiStateSuccess:Ct(e.isCiStateSuccess),isResolvedAllReviewComments:Ct(e.isResolvedAllReviewComments),isBranchOutOfDate:Ct(e.isBranchOutOfDate),missingRequiredCheckNames:At(e.missingRequiredCheckNames),summary:kt(e.summary)})),Nt=e=>{if(!V(e)||!V(e.status))return{found:!1,isConflicted:!1,mergeableStatus:`UNKNOWN`,isPassedAllCiJob:!1,isCiStateSuccess:!1,isBranchOutOfDate:!1,missingRequiredCheckNames:[]};let t=e.status;return{found:!0,isConflicted:Ct(t.isConflicted),mergeableStatus:jt(t.mergeableStatus),isPassedAllCiJob:Ct(t.isPassedAllCiJob),isCiStateSuccess:Ct(t.isCiStateSuccess),isBranchOutOfDate:Ct(t.isBranchOutOfDate),missingRequiredCheckNames:At(t.missingRequiredCheckNames)}},Pt=e=>V(e)?{state:xt(e.state)||`open`,merged:Ct(e.merged),isPullRequest:Ct(e.isPullRequest),title:xt(e.title)}:{state:`open`,merged:!1,isPullRequest:!1,title:``},Ft=()=>({fetchItemBody:async e=>{let t=await Tt(`/api/itembody`,e);return V(t)?xt(t.body):``},fetchComments:async e=>Et(await Tt(`/api/comments`,e)),fetchPrFiles:async e=>Dt(await Tt(`/api/prfiles`,e)),fetchPrCommits:async e=>Ot(await Tt(`/api/prcommits`,e)),fetchRelatedPrs:async e=>Mt(await Tt(`/api/relatedprs`,e)),fetchIssueState:async e=>Pt(await Tt(`/api/issuetitle`,e)),fetchPullRequestStatus:async e=>Nt(await Tt(`/api/pullrequeststatus`,e))}),It=async e=>{let t=await e.text().catch(()=>``);if(t.length===0)return`HTTP ${e.status}`;try{let e=JSON.parse(t);if(V(e)&&typeof e.error==`string`)return e.error}catch{return t}return t},Lt=async(e,t)=>{let n=await fetch(e,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(!n.ok)throw Error(await It(n))},Rt=`/api/comment`,zt=e=>({author:xt(e.author),body:xt(e.body),createdAt:xt(e.createdAt)}),Bt=async e=>{let t=await fetch(Rt,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{posted:!1,error:await It(t),rateLimitResetAt:null};let n=await t.json();return V(n)?n.ok===!1?{posted:!1,error:typeof n.error==`string`?n.error:`upstream error`,rateLimitResetAt:typeof n.rateLimitResetAt==`string`?n.rateLimitResetAt:null}:V(n.comment)?{posted:!0,comment:zt(n.comment)}:{posted:!1,error:`comment was not returned`,rateLimitResetAt:null}:{posted:!1,error:`unexpected response shape`,rateLimitResetAt:null}},Vt=`/api/upload`,Ht=e=>{let t=``;for(let n of e)t+=String.fromCharCode(n);return btoa(t)},H=async e=>{let t=await fetch(Vt,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await It(t));let n=await t.json();if(!V(n)||typeof n.markdown!=`string`)throw Error(`markdown was not returned`);return n.markdown},Ut=`/api/addstory`,Wt=async e=>{let t=await fetch(Ut,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await It(t));let n=await t.json();return!V(n)||!Array.isArray(n.stories)?[]:n.stories.filter(V).map(e=>({id:xt(e.id),name:xt(e.name),color:xt(e.color)}))},Gt=`/api/reviewcomment`,Kt=async e=>{let t=await fetch(Gt,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await It(t))},qt=`/api/createissue`,Jt=`/api/storycolor`,Yt=async e=>{let t=await fetch(Jt,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await It(t))},Xt=async e=>{let t=await fetch(qt,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await It(t));let n=await t.json();if(!(e=>typeof e==`object`&&!!e&&!Array.isArray(e))(n)||typeof n.issueUrl!=`string`)throw Error(`issueUrl was not returned`);return n.issueUrl},Zt=`/api/reorderstory`,Qt=async e=>{let t=await fetch(Zt,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await It(t))},$t=`/api/deleteallcomments`,en=async e=>{let t=await fetch($t,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await It(t))},tn=`/api/deletestory`,nn=async e=>{let t=await fetch(tn,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await It(t))},rn=`/api/renamestory`,an=async e=>{let t=await fetch(rn,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await It(t))},on=`/api/storydescription`,sn=async e=>{let t=await fetch(on,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await It(t))},cn=e=>typeof e!=`object`||!e||Array.isArray(e)?null:Object.fromEntries(Object.entries(e).filter(e=>typeof e[1]==`string`)),ln=async()=>{let e=await fetch(`/api/projects`);if(!e.ok)throw Error(`HTTP ${e.status}`);let t=await e.json();if(typeof t!=`object`||!t||Array.isArray(t))return{pjcodes:[],projectUrls:null,fleetTaskCreateUrl:null,nameWithOwnerByPjcode:null};let n=t;return{pjcodes:Array.isArray(n.pjcodes)?n.pjcodes.filter(e=>typeof e==`string`):[],projectUrls:cn(n.projectUrls),fleetTaskCreateUrl:typeof n.fleetTaskCreateUrl==`string`?n.fleetTaskCreateUrl:null,nameWithOwnerByPjcode:cn(n.nameWithOwnerByPjcode)}},un=`/api/projectreadmeconfig`,dn=async e=>{let t=`${un}?pjcode=${encodeURIComponent(e)}`,n=await fetch(t);if(!n.ok)throw Error(await It(n));let r=await n.json();return{maximumPreparingIssuesCount:V(r)&&typeof r.maximumPreparingIssuesCount==`number`?r.maximumPreparingIssuesCount:null}},fn=`/api/renameissue`,pn=async e=>{let t=await fetch(fn,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await It(t))},mn=`/api/setdependedissueurl`,hn=async e=>{let t=await fetch(mn,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await It(t))},gn=`/api/projectsettings`,_n=async e=>{let t=await fetch(gn,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await It(t))},vn=5e3,yn=e=>`${e.isPr?`PR #`:`#`}${e.number}`,bn=(e,t)=>{switch(e.type){case`review`:return e.action===`approve_and_merge`?`Approved & Merged`:e.action===`request_changes`?`Rejected`:e.action===`totally_wrong`?`Marked totally wrong`:`Marked unnecessary`;case`next_action_date`:return e.action===`snooze_1hour`?`Next Action Hour +1h`:e.action===`snooze_3hours`?`Next Action Hour +3h`:e.action===`snooze_6hours`?`Next Action Hour +6h`:e.action===`snooze_1day`?`Next Action Date +1d`:e.action===`snooze_2days`?`Next Action Date +2d`:e.action===`snooze_3days`?`Next Action Date +3d`:e.action===`snooze_5days`?`Next Action Date +5d`:e.action===`snooze_1month`?`Next Action Date +1mo`:Se(t)?`Next Action Date +1w skip`:`Next Action Date +1w`;case`set_story`:return`Story → ${e.optionName}`;case`set_agent`:return`Agent → ${e.optionName}`;case`set_status`:return`Status → ${e.optionName}`;case`set_in_tmux_by_human`:return`Added to In Tmux by human`;case`ok_and_awaiting_workspace`:return`ok → Awaiting Workspace`;case`close`:return e.action===`close`?`Closed`:`Closed as not planned`;case`delete_all_comments`:return`Deleted all comments`}},xn=e=>{switch(e.type){case`review`:return e.action===`approve_and_merge`?`green`:e.action===`request_changes`?`amber`:e.action===`totally_wrong`?`red`:`gray`;case`next_action_date`:return`amber`;case`set_story`:case`set_agent`:case`set_status`:case`set_in_tmux_by_human`:case`ok_and_awaiting_workspace`:return`blue`;case`close`:return`red`;case`delete_all_comments`:return`red`}},Sn=(e,t)=>e.type===`next_action_date`?Se(t):e.type!==`delete_all_comments`,Cn=(e,t,n)=>`${bn(e,n)} — ${yn(t)}`,wn=`console-comment-expanded:`,Tn=e=>{try{let t=localStorage.getItem(wn+e);if(t===null)return new Set;let n=JSON.parse(t);return Array.isArray(n)?new Set(n.filter(e=>typeof e==`string`)):new Set}catch(e){return console.error(`Failed to load comment expanded state from storage:`,e),new Set}},En=(e,t)=>{try{localStorage.setItem(wn+e,JSON.stringify([...t]))}catch(e){console.error(`Failed to save comment expanded state to storage:`,e)}},Dn=()=>{let e=[];for(let t=0;t<localStorage.length;t++){let n=localStorage.key(t);n?.startsWith(wn)&&e.push(n)}for(let t of e)localStorage.removeItem(t)},On=`console-offline-action-queue`,kn=e=>{if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.id==`string`&&typeof t.message==`string`&&typeof t.color==`string`&&typeof t.enqueuedAt==`number`&&typeof t.itemUrl==`string`&&typeof t.projectItemId==`string`&&typeof t.itemNumber==`number`&&typeof t.repo==`string`&&typeof t.isPr==`boolean`&&typeof t.apiPath==`string`&&typeof t.requestBody==`object`&&t.requestBody!==null},An=()=>{try{let e=localStorage.getItem(On);if(e===null)return[];let t=JSON.parse(e);return Array.isArray(t)?t.filter(kn):[]}catch{return[]}},jn=e=>{localStorage.setItem(On,JSON.stringify(e))},Mn=()=>typeof crypto<`u`&&typeof crypto.randomUUID==`function`?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}-${Math.random().toString(36).slice(2)}`,Nn=e=>e instanceof TypeError,Pn=e=>e instanceof Error&&e.message.length>0?e.message:String(e),Fn=100,In=e=>Math.max(0,Math.ceil((vn-e)/1e3)),Ln=e=>Math.max(0,1-e/vn),Rn=()=>{let[e,t]=(0,y.useState)(null),[n,r]=(0,y.useState)(null),[i,a]=(0,y.useState)(An),o=(0,y.useRef)(i);o.current=i;let s=(0,y.useRef)(null),c=(0,y.useRef)(0),l=(0,y.useRef)(null),u=(0,y.useRef)(!1),d=(0,y.useRef)(()=>{}),f=(0,y.useCallback)(()=>{l.current!==null&&(clearInterval(l.current),l.current=null)},[]),p=(0,y.useCallback)(e=>{if(e.offline===void 0)return;let t={id:Mn(),message:e.message,color:e.color,enqueuedAt:Date.now(),...e.offline};a(e=>{let n=[...e,t];return jn(n),n})},[]),m=(0,y.useCallback)(e=>{e.commit().catch(t=>{Nn(t)&&e.offline!==void 0?p(e):r({message:e.message,reason:Pn(t),retry:()=>d.current(e)})})},[p]);d.current=m;let h=(0,y.useCallback)(()=>{let e=s.current;f(),s.current=null,t(null),e!==null&&!u.current&&(u.current=!0,Dn(),m(e))},[f,m]),g=(0,y.useCallback)(()=>{let e=s.current;f(),s.current=null,u.current=!0,t(null),e?.revertAdvance?.(),e?.revertOptimistic?.()},[f]),_=(0,y.useCallback)(()=>{r(null)},[]),v=(0,y.useCallback)((e,t)=>{r({message:e,reason:t})},[]),b=(0,y.useCallback)(e=>{a(t=>{let n=t.filter(t=>t.id!==e);return jn(n),n})},[]),x=(0,y.useCallback)(async e=>{let t=o.current.find(t=>t.id===e);if(t!==void 0)try{await Lt(t.apiPath,t.requestBody),b(e)}catch(n){Nn(n)?r({message:t.message,reason:`Still offline — action is still held in the queue`}):(r({message:t.message,reason:Pn(n)}),b(e))}},[b]),S=(0,y.useCallback)(e=>{if(s.current!==null&&!u.current){let e=s.current;f(),u.current=!0,Dn(),m(e)}u.current=!1,s.current=e,c.current=Date.now(),t({message:e.message,color:e.color,remainingSeconds:In(0),progress:Ln(0)}),e.advance(),e.optimistic?.(),l.current=setInterval(()=>{let n=Date.now()-c.current;if(n>=5e3){h();return}t({message:e.message,color:e.color,remainingSeconds:In(n),progress:Ln(n)})},Fn)},[f,h,m]);return(0,y.useEffect)(()=>h,[h]),{pending:e,error:n,offlineActions:i,enqueue:S,showError:v,undo:g,dismissError:_,confirmOfflineAction:x,discardOfflineAction:b}},zn=e=>typeof e==`object`&&!!e&&!Array.isArray(e),Bn=e=>Array.isArray(e)?e.filter(e=>typeof e==`string`):[],Vn=e=>Array.isArray(e)?e.filter(zn).map(e=>({...e,relatedOpenPullRequestUrls:Bn(e.relatedOpenPullRequestUrls)})):[],Hn=e=>!zn(e)||!Array.isArray(e.items)?[]:Vn(e.items),Un=e=>Array.isArray(e)?e.filter(zn):[],Wn=e=>Array.isArray(e)?e.filter(zn).map(e=>({...e,items:Vn(e.items)})):[],Gn=e=>({items:Hn(e),generatedAt:zn(e)&&typeof e.generatedAt==`string`?e.generatedAt:``,statusOptions:zn(e)?Un(e.statusOptions):[],agentOptions:zn(e)?Un(e.agentOptions):[],storyOptions:zn(e)?Un(e.storyOptions):[],storyColors:zn(e)&&zn(e.storyColors)?e.storyColors:{},stories:zn(e)?Wn(e.stories):[],defaultNameWithOwner:zn(e)&&typeof e.defaultNameWithOwner==`string`?e.defaultNameWithOwner:null,storyOrder:zn(e)?Bn(e.storyOrder):[],timerEndsAt:zn(e)&&typeof e.timerEndsAt==`string`?e.timerEndsAt:null,timerTotalSeconds:zn(e)&&typeof e.timerTotalSeconds==`number`&&e.timerTotalSeconds>0?e.timerTotalSeconds:null}),Kn=()=>{let e={};for(let t of j)e[t.name]=null;return e},qn=(e,t)=>`/projects/${e}/${t}/list.json`,Jn=6e4,Yn=`console-list-v1`,Xn=(e,t)=>{try{if(!(`caches`in globalThis))return;globalThis.caches.open(Yn).then(n=>n.put(e,new Response(JSON.stringify(t),{headers:{"Content-Type":`application/json`}}))).catch(e=>{console.warn(`Failed to persist tab snapshot to cache:`,e)})}catch(e){console.warn(`Failed to access cache storage:`,e)}},Zn=async e=>{if(!(`caches`in globalThis))return null;try{let t=await(await globalThis.caches.open(Yn)).match(e);return t===void 0?null:{...Gn(await t.json()),fromCache:!0}}catch{return null}},Qn=async e=>{let t=await Promise.all(j.map(async t=>({tabName:t.name,snapshot:await Zn(qn(e,t.name))}))),n=Kn();for(let{tabName:e,snapshot:r}of t)n[e]=r;return n},$n=async(e,t)=>{let n=qn(e,t);try{let e=await fetch(n);if(!e.ok)throw Error(`HTTP ${e.status}`);let t=await e.json();return Xn(n,t),{snapshot:{...Gn(t),fromCache:!1},error:null}}catch(e){let t=await Zn(n);return t===null?{snapshot:null,error:e instanceof Error?e:Error(String(e))}:{snapshot:t,error:null}}},er=async e=>{await Promise.all(j.map(async t=>{let n=qn(e,t.name);try{let e=await fetch(n);if(!e.ok)return;Xn(n,await e.json())}catch{}}))},tr=async e=>{let t=await Promise.all(j.map(async t=>{let{snapshot:n,error:r}=await $n(e,t.name);return{tabName:t.name,snapshot:n,error:r}})),n=Kn(),r=null;for(let{tabName:e,snapshot:i,error:a}of t)n[e]=i,a!==null&&r===null&&(r=a);return{snapshots:n,firstError:Object.values(n).every(e=>e===null)?r:null}},nr=(e,t=null)=>{let n=(0,y.useRef)(new Map),[r,i]=(0,y.useState)(Kn),[a,o]=(0,y.useState)(!0),[s,c]=(0,y.useState)(null),[l,u]=(0,y.useState)(e);if(l!==e){u(e);let t=e===null?null:n.current.get(e)??null;i(t??Kn()),t!==null&&o(!1)}return(0,y.useEffect)(()=>{if(t!==null&&e!==null){let n=t.tabs[e];if(n!==void 0){let e=Kn();for(let t of j){let r=n[t.name];r!==void 0&&(e[t.name]={...r})}i(e),o(!1),c(null);return}}let r=!1,a=!1;if(c(null),e===null)return i(Kn()),o(!1),c(`No project specified in the URL path.`),()=>{r=!0};let s=n.current.has(e);Qn(e).then(t=>{if(r)return;let c=Object.values(t).some(e=>e!==null);c&&!a?(n.current.set(e,t),i(t),o(!1)):!c&&!a&&!s&&(o(!0),i(Kn()))});let l=()=>{tr(e).then(({snapshots:t,firstError:s})=>{r||(a=!0,n.current.set(e,t),i(t),c(s===null?null:s.message),o(!1))}).catch(e=>{r||(a=!0,c(e instanceof Error?e.message:String(e)),o(!1))})};l();let u=setInterval(l,Jn);return()=>{r=!0,clearInterval(u)}},[e,t]),{snapshots:r,isLoading:a,error:s,refreshSingleTab:(0,y.useCallback)(async t=>{if(e===null)return;let{snapshot:r}=await $n(e,t);r!==null&&i(i=>{let a={...i,[t]:r};return n.current.set(e,a),a})},[e])}},rr=(e,t,n,r,i)=>{(0,y.useEffect)(()=>{if(!i||r)return;let a=n.filter(n=>n!==e&&n!==t);if(a.length!==0)for(let e of a)er(e).catch(()=>{})},[i,r,e,t,n]),(0,y.useEffect)(()=>{if(!i||r)return;let t=n.filter(t=>t!==e);if(t.length===0)return;let a=setInterval(()=>{for(let e of t)er(e).catch(()=>{})},Jn);return()=>{clearInterval(a)}},[i,r,e,n])},ir=class{fetcher;cache=new Map;inFlight=new Map;prefetchInFlight=new Set;constructor(e){this.fetcher=e}peek=e=>this.cache.get(e);has=e=>this.cache.has(e);load=(e,t)=>{let n=this.cache.get(e);if(n!==void 0)return Promise.resolve(n);let r=this.inFlight.get(e);if(r!==void 0)return r;let i=this.fetcher(t).then(t=>(this.cache.set(e,t),t)).finally(()=>{this.inFlight.delete(e)});return this.inFlight.set(e,i),i};prefetch=(e,t)=>{this.cache.has(e)||this.inFlight.has(e)||this.prefetchInFlight.has(e)||(this.prefetchInFlight.add(e),this.fetcher(t).then(t=>{this.cache.set(e,t)}).catch(()=>{}).finally(()=>{this.prefetchInFlight.delete(e)}))};seed(e,t){this.cache.set(e,t)}invalidate=e=>{this.cache.delete(e)}},ar=e=>{try{let t=new URL(e).pathname.split(`/`).filter(Boolean);if(t.length>=4)return`${t[0]}/${t[1]}#${t[3]}`}catch{}return e},or=(e,t)=>{for(let[n,r]of Object.entries(t.items)){let t=ar(n);e.body.seed(t,r.body),e.comments.seed(t,r.comments),e.state.seed(t,r.state),r.files!==null&&e.files.seed(t,r.files),r.commits!==null&&e.commits.seed(t,r.commits),r.prStatus!==null&&e.prStatus.seed(t,r.prStatus),r.relatedPrs!==null&&e.relatedPrs.seed(t,r.relatedPrs)}},sr=(e=null)=>(0,y.useMemo)(()=>{let t=Ft(),n={client:t,body:new ir(t.fetchItemBody),comments:new ir(t.fetchComments),files:new ir(t.fetchPrFiles),commits:new ir(t.fetchPrCommits),relatedPrs:new ir(t.fetchRelatedPrs),state:new ir(t.fetchIssueState),prStatus:new ir(t.fetchPullRequestStatus)};return e!==null&&or(n,e),n},[e]),cr=0,lr=500,ur=2e3,dr=e=>{let t=window;if(typeof t.requestIdleCallback==`function`&&typeof t.cancelIdleCallback==`function`){let n=t.requestIdleCallback(e,{timeout:ur});return{cancel:()=>t.cancelIdleCallback?.(n)}}let n=window.setTimeout(e,0);return{cancel:()=>window.clearTimeout(n)}},fr=(e,t)=>{let n=`${t.repo}#${t.number}`;e.body.prefetch(n,t.url),e.state.prefetch(n,t.url),e.comments.prefetch(n,t.url),t.isPr?(e.files.prefetch(n,t.url),e.commits.prefetch(n,t.url),e.prStatus.prefetch(n,t.url)):e.relatedPrs.prefetch(n,t.url)},pr=(e,t,n)=>{(0,y.useEffect)(()=>{if(t===null)return;let r=n.findIndex(e=>e.projectItemId===t.projectItemId);if(r===-1)return;let i=n.slice(r+1,r+1+cr);if(i.length===0)return;let a=null,o=window.setTimeout(()=>{a=dr(()=>{for(let t of i)fr(e,t)})},lr);return()=>{window.clearTimeout(o),a?.cancel()}},[e,t,n])},mr=e=>{let[t,n]=(0,y.useState)(null);return(0,y.useEffect)(()=>{t!==null&&e!==t&&n(null)},[e,t]),{explicitlySelectedPjcode:t,notifyExplicitSelection:(0,y.useCallback)(e=>{n(e)},[])}},hr=`/api/features`,gr=()=>{let[e,t]=(0,y.useState)({airplaneMode:!1});return(0,y.useEffect)(()=>{fetch(hr).then(async e=>{if(!e.ok)return;let n=await e.json();typeof n==`object`&&n&&!Array.isArray(n)&&`airplaneMode`in n&&typeof n.airplaneMode==`boolean`&&t({airplaneMode:n.airplaneMode})}).catch(e=>{console.warn(`Failed to fetch /api/features`,e)})},[]),e},_r=(e,t)=>{let n=j.findIndex(t=>t.name===e);if(n===-1)return null;for(let e=n+1;e<j.length;e+=1){let n=j[e];if(n.isNavigable!==!1&&(t[n.name]??0)>0)return n.name}return null},vr=e=>{let t=j.filter(e=>e.isNavigable!==!1);for(let n of t)if((e[n.name]??0)>0)return n.name;return t[0].name},yr=new Set(j.map(e=>e.name)),br=e=>{let t=e.split(`/`).filter(e=>e.length>0);if(t.length<3||t[0]!==`projects`)return null;let n=t[2];return yr.has(n)?n:null},xr=e=>{if(!e.startsWith(`#item/`))return null;let t=e.slice(6);return t.length===0?null:decodeURIComponent(t)},Sr=`#settings`,Cr=(e,t,n=new Set,r)=>{let i=(0,y.useCallback)(()=>{let e=vr(t);return typeof window>`u`?{activeTab:e,selectedItemKey:null}:{activeTab:br(window.location.pathname)??e,selectedItemKey:xr(window.location.hash)}},[t]),[a,o]=(0,y.useState)(i),s=(0,y.useRef)(null);s.current=e,(0,y.useEffect)(()=>{if(typeof window>`u`)return;let e=()=>{o(i())};return window.addEventListener(`popstate`,e),window.addEventListener(`hashchange`,e),()=>{window.removeEventListener(`popstate`,e),window.removeEventListener(`hashchange`,e)}},[i]),(0,y.useEffect)(()=>{if(typeof window>`u`)return;let e=br(window.location.pathname),i=Object.values(t).some(e=>e>0),a=r??t;if(e!==null){if(t[e]>0||a[e]>0){o(t=>t.activeTab===e?t:{...t,activeTab:e});return}if(!n.has(e))return}let c=vr(t);i&&s.current!==null&&window.history.replaceState({},``,`/projects/${s.current}/${c}${window.location.search}`),o(e=>e.activeTab===c?e:{...e,activeTab:c})},[t,n,r]);let c=(0,y.useCallback)(t=>e===null?`#${t}`:`/projects/${e}/${t}`,[e]),l=(0,y.useCallback)(e=>{if(typeof window>`u`){o({activeTab:e,selectedItemKey:null});return}window.history.pushState({},``,c(e)),o({activeTab:e,selectedItemKey:null})},[c]),u=(0,y.useCallback)(e=>{typeof window<`u`&&(window.location.hash=`#item/${encodeURIComponent(e)}`),o(t=>({...t,selectedItemKey:e}))},[]),d=(0,y.useCallback)(()=>{if(typeof window<`u`&&window.location.hash!==``){let e=`${window.location.pathname}${window.location.search}`;window.history.pushState({},``,e)}o(e=>({...e,selectedItemKey:null}))},[]);return{activeTab:a.activeTab,selectedItemKey:a.selectedItemKey,tabHref:c,selectTab:l,openItem:u,closeItem:d}},wr=`/api/review`,Tr=`/api/triage`,Er=`/api/intmux`,Dr=(e,t,n,r,i)=>{if(r===`approve_and_merge`)return{pjcode:e,action:`approve_and_merge`,prUrl:n,projectItemId:t.projectItemId};if(r===`request_changes`){let r=i[0];return{pjcode:e,action:`request_changes`,prUrl:n,projectItemId:t.projectItemId,commentBody:ve(i),...r===void 0?{}:{changedFilePath:r.path,line:r.line,side:r.side}}}return r===`totally_wrong`?{pjcode:e,action:`close`,prUrl:n,issueUrl:t.url,projectItemId:t.projectItemId,commentBody:he}:{pjcode:e,action:`unnecessary`,prUrl:n,projectItemId:t.projectItemId,issueUrl:t.url,commentBody:ge,issueCommentBody:_e(n)}},Or=(e,t,n,r)=>({pjcode:e,action:n,issueUrl:t.url,projectItemId:t.projectItemId,...r??{}}),kr=(e,t)=>({pjcode:e,action:`set_intmux`,issueUrl:t.url,projectItemId:t.projectItemId}),Ar=()=>Error(`No project specified in the URL path.`),jr=`ok`,Mr=(e,t,n)=>{let r=(0,y.useCallback)(e=>{if(t===void 0)return;let n=`${e.repo}#${e.number}`;t.body.invalidate(n),t.comments.invalidate(n)},[t]),i=(0,y.useCallback)(async(t,n,i,a=[])=>{if(e===null)throw Ar();await Lt(wr,Dr(e,t,n,i,a)),r(t)},[e,r]),a=(0,y.useCallback)(async(t,n)=>{if(e===null)throw Ar();await Lt(Tr,{pjcode:e,action:n,issueUrl:t.url,projectItemId:t.projectItemId}),r(t)},[e,r]),o=(0,y.useCallback)(async(t,n)=>{if(e===null)throw Ar();await Lt(Tr,{pjcode:e,action:`set_agent`,issueUrl:t.url,projectItemId:t.projectItemId,agentOptionId:n.id}),r(t)},[e,r]);return{reviewPullRequest:i,setNextActionDate:a,setStory:(0,y.useCallback)(async(t,n)=>{if(e===null)throw Ar();await Lt(Tr,{pjcode:e,action:`set_story`,issueUrl:t.url,projectItemId:t.projectItemId,storyOptionId:n.id}),r(t)},[e,r]),setAgent:o,setStatus:(0,y.useCallback)(async(t,n)=>{if(e===null)throw Ar();await Lt(Tr,{pjcode:e,action:`set_status`,issueUrl:t.url,projectItemId:t.projectItemId,statusName:n.name}),r(t)},[e,r]),setInTmuxByHuman:(0,y.useCallback)(async(t,n)=>{if(e===null)throw Ar();await Lt(Er,{pjcode:e,action:`set_intmux`,issueUrl:t.url,projectItemId:t.projectItemId}),r(t)},[e,r]),closeIssue:(0,y.useCallback)(async(t,n)=>{if(e===null)throw Ar();await Lt(Tr,{pjcode:e,action:n,issueUrl:t.url,projectItemId:t.projectItemId}),r(t)},[e,r]),okAndMoveToAwaitingWorkspace:(0,y.useCallback)(async(t,i)=>{if(e===null)throw Ar();let a=await Bt({pjcode:e,url:t.url,body:jr});if(await Lt(Tr,{pjcode:e,action:`set_status`,issueUrl:t.url,projectItemId:t.projectItemId,statusName:i.name}),r(t),await n?.(),!a.posted){let e=a.rateLimitResetAt===null?``:` Rate limit resets at ${a.rateLimitResetAt}.`;throw Error(`Comment not posted — ${a.error}.${e} Status was changed. Re-post: ${jr}`)}},[e,r,n]),addComment:(0,y.useCallback)(async(t,n)=>{if(e===null)throw Ar();let i=await Bt({pjcode:e,url:t.url,body:n});if(!i.posted){let e=i.rateLimitResetAt===null?``:` Rate limit resets at ${i.rateLimitResetAt}.`;throw Error(`${i.error}.${e}`)}return r(t),i.comment},[e,r]),uploadAttachment:(0,y.useCallback)(async(t,n)=>{if(e===null)throw Error(`no project in the URL path`);let r=Ht(new Uint8Array(await n.arrayBuffer()));return H({pjcode:e,url:t.url,fileName:n.name,contentBase64:r})},[e]),addInlineReviewComment:(0,y.useCallback)(async(t,n,r,i,a)=>{if(e===null)throw Ar();await Kt({pjcode:e,url:t,path:n,line:r,side:i,body:a})},[e]),issueRename:(0,y.useCallback)(async(e,t)=>{await pn({issueUrl:e.url,newTitle:t})},[]),deleteAllComments:(0,y.useCallback)(async e=>{await en({issueUrl:e.url}),r(e)},[r]),setDependedIssueUrl:(0,y.useCallback)(async(t,n)=>{if(e===null)throw Ar();await hn({pjcode:e,issueUrl:t.url,dependedIssueUrl:n})},[e])}},Nr=e=>`pv_overlay_${e}`,Pr=e=>e.projectItemId===``?e.itemId:e.projectItemId,Fr=(e,t)=>e!==void 0&&e.done===!0&&e.mode===t,Ir=(e,t,n)=>e.filter(e=>!Fr(t[Pr(e)],n)).length,Lr=(e,t,n)=>e.filter(e=>!Fr(t[Pr(e)],n)),Rr=(e,t,n)=>{if(n===null)return null;let r=Date.parse(n);if(Number.isNaN(r))return null;let i=e[Pr(t)];return i===void 0||i.ts<r?null:i.status??null},zr=(e,t,n,r,i)=>{let a={...e[t]??{},...n,ts:i,mode:r};return{...e,[t]:a}},Br=(e,t)=>{let n={...e};return delete n[t],n},Vr=(e,t)=>{let n={};for(let[r,i]of Object.entries(e)){if(i.done!==!0){n[r]=i;continue}let e=t[i.mode];if(e==null){n[r]=i;continue}let a=Date.parse(e.generatedAt);if(Number.isNaN(a)||i.ts>=a){n[r]=i;continue}e.items.some(e=>Pr(e)===r)||(n[r]=i)}return n},Hr=e=>typeof e==`object`&&!!e&&typeof e.ts==`number`,Ur=e=>{if(typeof localStorage>`u`)return{};let t=localStorage.getItem(Nr(e));if(t===null)return{};let n=JSON.parse(t);if(typeof n!=`object`||!n)return{};let r={};for(let[e,t]of Object.entries(n))Hr(t)&&(r[e]=t);return r},Wr=(e,t)=>{typeof localStorage<`u`&&localStorage.setItem(Nr(e),JSON.stringify(t))},Gr=e=>{let[t,n]=(0,y.useState)(()=>Ur(e));return{overlay:t,patchOverlay:(0,y.useCallback)((t,r,i)=>{n(n=>{let a=zr(n,t,r,i,Date.now());return Wr(e,a),a})},[e]),revertOverlayEntry:(0,y.useCallback)(t=>{n(n=>{let r=Br(n,t);return Wr(e,r),r})},[e])}},Kr=e=>{let t=e.split(`/`).filter(e=>e.length>0);if(t.length<2||t[0]!==`projects`)return null;let n=t[1];return n.length===0?null:n},qr=()=>{let[e,t]=(0,y.useState)(()=>Kr(typeof window>`u`?``:window.location.pathname));return(0,y.useEffect)(()=>{let e=()=>{t(Kr(window.location.pathname))};return window.addEventListener(`popstate`,e),()=>{window.removeEventListener(`popstate`,e)}},[]),e},Jr=()=>{let[e,t]=(0,y.useState)([]),[n,r]=(0,y.useState)(null),[i,a]=(0,y.useState)(null),[o,s]=(0,y.useState)(null),[c,l]=(0,y.useState)(!0),[u,d]=(0,y.useState)(null);return(0,y.useEffect)(()=>{let e=!1;return l(!0),d(null),ln().then(n=>{e||(t(n.pjcodes),r(n.projectUrls),a(n.fleetTaskCreateUrl),s(n.nameWithOwnerByPjcode),l(!1))}).catch(t=>{e||(d(t instanceof Error?t:Error(String(t))),l(!1))}),()=>{e=!0}},[]),{pjcodes:e,projectUrls:n,fleetTaskCreateUrl:i,nameWithOwnerByPjcode:o,isLoading:c,error:u}},Yr=e=>(0,y.useCallback)(t=>{Dn(),e(t)},[e]),Xr=()=>typeof window<`u`&&window.location.hash===`#settings`,Zr=e=>{let[t,n]=(0,y.useState)(Xr),[r,i]=(0,y.useState)(!1),[a,o]=(0,y.useState)(!1),[s,c]=(0,y.useState)(null),[l,u]=(0,y.useState)({}),d=(0,y.useRef)(``),f=(0,y.useRef)(e);f.current=e,(0,y.useEffect)(()=>{if(!t)return;let e=!1;return u({}),i(!0),c(null),Promise.all(f.current.map(e=>dn(e).then(t=>({pjcode:e,value:t.maximumPreparingIssuesCount===null?``:String(t.maximumPreparingIssuesCount)})))).then(t=>{if(!e){let e={};for(let{pjcode:n,value:r}of t)e[n]=r;u(e)}}).catch(t=>{e||c(t instanceof Error?t.message:`Failed to load settings`)}).finally(()=>{e||i(!1)}),()=>{e=!0}},[t]),(0,y.useEffect)(()=>{if(typeof window>`u`)return;let e=()=>{let e=window.location.hash===Sr;e||c(null),n(e)};return window.addEventListener(`popstate`,e),window.addEventListener(`hashchange`,e),()=>{window.removeEventListener(`popstate`,e),window.removeEventListener(`hashchange`,e)}},[]);let p=(0,y.useCallback)(()=>{typeof window<`u`&&(d.current=window.location.hash,window.history.pushState({},``,Sr)),n(!0)},[]),m=(0,y.useCallback)(()=>{if(typeof window<`u`){let e=d.current,t=`${window.location.pathname}${window.location.search}${e}`;window.history.replaceState({},``,t)}n(!1),c(null)},[]),h=(0,y.useCallback)((e,t)=>{u(n=>({...n,[e]:t}))},[]),g=(0,y.useCallback)(async()=>{o(!0),c(null);try{if(await Promise.all(Object.entries(l).filter(([,e])=>{let t=parseInt(e,10);return!Number.isNaN(t)&&t>=0}).map(([e,t])=>_n({pjcode:e,maximumPreparingIssuesCount:parseInt(t,10)}))),typeof window<`u`){let e=d.current,t=`${window.location.pathname}${window.location.search}${e}`;window.history.replaceState({},``,t)}n(!1)}catch(e){c(e instanceof Error?e.message:`Failed to save settings`)}finally{o(!1)}},[l]);return(0,y.useEffect)(()=>{if(!t)return;let e=e=>{e.key===`Escape`&&m()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[t,m]),{isOpen:t,isLoading:r,isSaving:a,error:s,inputValues:l,open:p,close:m,changeInput:h,save:g}},Qr=e=>{let t=(0,y.useRef)(e),n=(0,y.useRef)(Date.now());return t.current!==e&&(t.current=e,n.current=Date.now()),{isTimerExpired:(0,y.useCallback)(e=>e<=0?!1:Date.now()-n.current>=e*60*1e3,[])}},$r=/##\s+(?:エグゼクティブサマリ(?:\s*\/\s*Executive\s+Summary)?|Executive\s+Summary)\s*\n/i,ei=/^From:\s+:robot:/m,ti=/^##\s/m,ni=e=>{let t=$r.exec(e);if(t===null)return null;let n=e.slice(t.index+t[0].length),r=ei.exec(n),i=ti.exec(n),a=n.length;r!==null&&(a=Math.min(a,r.index)),i!==null&&(a=Math.min(a,i.index));let o=n.slice(0,a).trim();return o.length>0?o:null},ri=e=>{if(e.length===0)return null;let t=e[e.length-1],n=ni(t.body);if(n!==null)return n;let r=t.body.trim();return r.length>0?r:null},ii=e=>`${e.repo}#${e.number}`,ai=(e,t,n)=>{let[r,i]=(0,y.useState)({});return(0,y.useEffect)(()=>{if(!n)return;let r=!1;for(let n of e){let e=ii(n),a=t.peek(e);if(a!==void 0){let e=ri(a);r||i(t=>t[n.projectItemId]===e?t:{...t,[n.projectItemId]:e});continue}t.load(e,n.url).then(e=>{if(r)return;let t=ri(e);i(e=>e[n.projectItemId]===t?e:{...e,[n.projectItemId]:t})}).catch(()=>{r||i(e=>e[n.projectItemId]===null?e:{...e,[n.projectItemId]:null})})}return()=>{r=!0}},[e,t,n]),r},oi=(e,t)=>{let n=Math.abs(e);return n<60||n<=Math.abs(t)*1.5?null:e<0?`next`:`previous`},si=(e,t)=>{let n=Math.abs(e),r=Math.abs(t);return r>n*1.5&&r>20},ci=e=>{let t=e instanceof Element?e:null;for(;t!==null&&t!==document.body;){let e=window.getComputedStyle(t).overflowX;if((e===`auto`||e===`scroll`)&&t.scrollWidth>t.clientWidth&&t.scrollLeft>0)return!0;t=t.parentElement}return!1},li=e=>{let t=(0,y.useRef)(e);t.current=e;let n=(0,y.useRef)(null),r=(0,y.useCallback)(e=>{let n=0,r=0,i=!1,a=e=>{if(e.touches.length!==1){i=!1;return}if(ci(e.target)){i=!1;return}let t=e.touches[0];n=t.clientX,r=t.clientY,i=!0},o=e=>{if(!i)return;let t=e.touches[0];si(t.clientX-n,t.clientY-r)&&(i=!1)},s=e=>{if(!i||(i=!1,e.changedTouches.length!==1))return;let a=e.changedTouches[0],o=oi(a.clientX-n,a.clientY-r);o!==null&&t.current(o)};return e.addEventListener(`touchstart`,a,{passive:!0}),e.addEventListener(`touchmove`,o,{passive:!0}),e.addEventListener(`touchend`,s,{passive:!0}),()=>{e.removeEventListener(`touchstart`,a),e.removeEventListener(`touchmove`,o),e.removeEventListener(`touchend`,s)}},[]),i=(0,y.useCallback)(e=>{n.current!==null&&(n.current(),n.current=null),e!==null&&(n.current=r(e))},[r]);return(0,y.useEffect)(()=>()=>{n.current!==null&&(n.current(),n.current=null)},[]),i},ui=e=>(0,y.useCallback)(t=>{Dn(),e(t)},[e]),di=(e,t,n,r,i)=>{let a=(0,y.useRef)(void 0),o=(0,y.useRef)(!1);(0,y.useEffect)(()=>{if(!e){a.current=t,o.current=!1;return}a.current!==t&&(a.current=t,o.current=t!==null),o.current&&r===null&&n.length!==0&&(o.current=!1,i(n[0].projectItemId))},[e,t,n,r,i])},fi=e=>{window.history.pushState({},``,e),window.dispatchEvent(new PopStateEvent(`popstate`))},pi=e=>{window.history.replaceState({},``,e),window.dispatchEvent(new PopStateEvent(`popstate`))},mi=(e,t,n,r,i,a,o,s,c,l,u)=>{let d=(0,y.useRef)(0),f=(0,y.useRef)(null);(0,y.useEffect)(()=>{if(!e||r===null){d.current=0,f.current=null;return}if(!o||!s||c||l||f.current===r)return;if(t>0||n>0){d.current=0,f.current=null;return}if(u!==null&&r===u||i.length===0)return;let p=i.filter(e=>(a[e]??15)>0);if(d.current>=p.length-1){f.current=r,d.current=0;return}f.current=r,d.current+=1;let m=se(i,r,a);m===null?d.current=0:fi(`/projects/${m}/todo-by-human`)},[e,t,n,r,i,a,o,s,c,l,u])},hi=()=>{let[e,t]=(0,y.useState)(P),[n,r]=(0,y.useState)(!1),[i,a]=(0,y.useState)(e),o=(0,y.useCallback)(()=>{t(e=>(a(e),e)),r(!0)},[]),s=(0,y.useCallback)(()=>{r(!1)},[]),c=(0,y.useCallback)(()=>{a(e=>(oe(e),t(e),e)),r(!1)},[]),l=(0,y.useCallback)(e=>{a(t=>({...t,timerMode:e}))},[]),u=(0,y.useCallback)((e,t)=>{a(n=>({...n,projectMinutes:{...n.projectMinutes,[e]:t}}))},[]);return{timerMode:e.timerMode,projectMinutes:e.projectMinutes,isOpen:n,draftTimerMode:i.timerMode,draftProjectMinutes:i.projectMinutes,openSettings:o,closeSettings:s,saveSettings:c,toggleDraftTimerMode:l,changeDraftMinutes:u}},gi=(e,t)=>{let n=e.indexOf(t);if(n<0)return e.length>0?e[0]:null;let r=n+1;return r<e.length?e[r]:null},_i=(e,t)=>{let n=e.indexOf(t);return n<0||n>=e.length-1?null:e[n+1]},vi=(e,t)=>{let n=e.indexOf(t);return n<=0?null:e[n-1]},yi=(e,t)=>e.length===0?`${t}\n`:e.endsWith(`
13
+ `);c=u.pop()??``;for(let e of u){if(!e.startsWith(`data: `))continue;let i=yt(e.slice(6));if(i!==null){if(i.type===`progress`)r({fetched:typeof i.fetched==`number`?i.fetched:0,total:typeof i.total==`number`?i.total:0});else if(i.type===`done`){let e=_t(i.snapshot);if(e===null){t(`error`),s([`Failed to parse snapshot`]);return}let r=Xe(n,e);if(r.status===`error`){s(r.failures),t(`error`);return}let o=_t(r.snapshot);if(o===null){t(`error`),s([`Failed to merge snapshot`]);return}await nt(o),tt(!0),a(o),t(`on`),s(o.failures)}}}}},[]),u=(0,y.useCallback)(()=>{c.current!==null&&c.current.abort();let e=new AbortController;c.current=e,t(`syncing`),r({fetched:0,total:0}),s([]),fetch(vt,{signal:e.signal}).then(async e=>{if(!e.ok||e.body===null){t(`error`),s([`HTTP ${e.status}`]);return}await l(e.body,null)}).catch(e=>{e instanceof Error&&e.name===`AbortError`||(t(`error`),s([e instanceof Error?e.message:String(e)]))})},[l]),d=(0,y.useCallback)(()=>{c.current!==null&&(c.current.abort(),c.current=null),t(`off`),a(null),r(null),s([]),tt(!1),it().catch(()=>{})},[]),f=(0,y.useCallback)((e,n)=>{if(n.length===0)return;c.current!==null&&c.current.abort();let i=new AbortController;c.current=i,t(`syncing`),r({fetched:0,total:n.length}),s([]),fetch(vt,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({targetUrls:n}),signal:i.signal}).then(async n=>{if(!n.ok||n.body===null){t(`error`),s([`HTTP ${n.status}`]);return}await l(n.body,e)}).catch(e=>{e instanceof Error&&e.name===`AbortError`||(t(`error`),s([e instanceof Error?e.message:String(e)]))})},[l]);return{status:e,progress:n,snapshot:i,failures:o,startSync:u,turnOff:d,retryFailed:()=>f(i,o)}},V=e=>typeof e==`object`&&!!e&&!Array.isArray(e),xt=e=>typeof e==`string`?e:``,St=e=>typeof e==`number`?e:0,Ct=e=>e===!0,wt=`console-api-v1`,Tt=async(e,t)=>{let n=`${e}?url=${encodeURIComponent(t)}`;try{let e=await fetch(n);if(!e.ok){let t=`HTTP ${e.status}`;try{let n=await e.json();V(n)&&typeof n.error==`string`&&n.error.length>0&&(t=n.error)}catch(e){console.warn(`Failed to parse error body from non-ok response:`,e)}throw Error(t)}let t=await e.json();try{`caches`in globalThis&&globalThis.caches.open(wt).then(e=>e.put(n,new Response(JSON.stringify(t),{headers:{"Content-Type":`application/json`}}))).catch(e=>{console.warn(`Failed to persist API response to cache:`,e)})}catch(e){console.warn(`Failed to access cache storage:`,e)}return t}catch(e){try{if(`caches`in globalThis){let e=await(await globalThis.caches.open(wt)).match(n);if(e!==void 0)return e.json()}}catch{}throw e}},Et=e=>!V(e)||!Array.isArray(e.comments)?[]:e.comments.filter(V).map(e=>({author:xt(e.author),body:xt(e.body),createdAt:xt(e.createdAt)})),Dt=e=>!V(e)||!Array.isArray(e.files)?[]:e.files.filter(V).map(e=>({path:xt(e.path)||xt(e.filename),additions:St(e.additions),deletions:St(e.deletions),status:xt(e.status),patch:typeof e.patch==`string`?e.patch:null,rawUrl:typeof e.rawUrl==`string`?e.rawUrl:null})),Ot=e=>!V(e)||!Array.isArray(e.commits)?[]:e.commits.filter(V).map(e=>({sha:xt(e.sha),message:xt(e.message),author:xt(e.author),authoredAt:xt(e.authoredAt)})),kt=e=>V(e)?{title:xt(e.title),body:xt(e.body),additions:St(e.additions),deletions:St(e.deletions),changedFiles:St(e.changedFiles)}:null,At=e=>Array.isArray(e)?e.filter(e=>typeof e==`string`):[],jt=e=>e===`MERGEABLE`?`MERGEABLE`:e===`CONFLICTING`?`CONFLICTING`:`UNKNOWN`,Mt=e=>!V(e)||!Array.isArray(e.relatedPullRequests)?[]:e.relatedPullRequests.filter(V).map(e=>({url:xt(e.url),branchName:typeof e.branchName==`string`?e.branchName:null,createdAt:xt(e.createdAt),isDraft:Ct(e.isDraft),isConflicted:Ct(e.isConflicted),mergeableStatus:jt(e.mergeableStatus),isPassedAllCiJob:Ct(e.isPassedAllCiJob),isCiStateSuccess:Ct(e.isCiStateSuccess),isResolvedAllReviewComments:Ct(e.isResolvedAllReviewComments),isBranchOutOfDate:Ct(e.isBranchOutOfDate),missingRequiredCheckNames:At(e.missingRequiredCheckNames),summary:kt(e.summary)})),Nt=e=>{if(!V(e)||!V(e.status))return{found:!1,isConflicted:!1,mergeableStatus:`UNKNOWN`,isPassedAllCiJob:!1,isCiStateSuccess:!1,isBranchOutOfDate:!1,missingRequiredCheckNames:[]};let t=e.status;return{found:!0,isConflicted:Ct(t.isConflicted),mergeableStatus:jt(t.mergeableStatus),isPassedAllCiJob:Ct(t.isPassedAllCiJob),isCiStateSuccess:Ct(t.isCiStateSuccess),isBranchOutOfDate:Ct(t.isBranchOutOfDate),missingRequiredCheckNames:At(t.missingRequiredCheckNames)}},Pt=e=>V(e)?{state:xt(e.state)||`open`,merged:Ct(e.merged),isPullRequest:Ct(e.isPullRequest),title:xt(e.title)}:{state:`open`,merged:!1,isPullRequest:!1,title:``},Ft=()=>({fetchItemBody:async e=>{let t=await Tt(`/api/itembody`,e);return V(t)?xt(t.body):``},fetchComments:async e=>Et(await Tt(`/api/comments`,e)),fetchPrFiles:async e=>Dt(await Tt(`/api/prfiles`,e)),fetchPrCommits:async e=>Ot(await Tt(`/api/prcommits`,e)),fetchRelatedPrs:async e=>Mt(await Tt(`/api/relatedprs`,e)),fetchIssueState:async e=>Pt(await Tt(`/api/issuetitle`,e)),fetchPullRequestStatus:async e=>Nt(await Tt(`/api/pullrequeststatus`,e))}),It=async e=>{let t=await e.text().catch(()=>``);if(t.length===0)return`HTTP ${e.status}`;try{let e=JSON.parse(t);if(V(e)&&typeof e.error==`string`)return e.error}catch{return t}return t},Lt=async(e,t)=>{let n=await fetch(e,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(!n.ok)throw Error(await It(n))},Rt=`/api/comment`,zt=e=>({author:xt(e.author),body:xt(e.body),createdAt:xt(e.createdAt)}),Bt=async e=>{let t=await fetch(Rt,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{posted:!1,error:await It(t),rateLimitResetAt:null};let n=await t.json();return V(n)?n.ok===!1?{posted:!1,error:typeof n.error==`string`?n.error:`upstream error`,rateLimitResetAt:typeof n.rateLimitResetAt==`string`?n.rateLimitResetAt:null}:V(n.comment)?{posted:!0,comment:zt(n.comment)}:{posted:!1,error:`comment was not returned`,rateLimitResetAt:null}:{posted:!1,error:`unexpected response shape`,rateLimitResetAt:null}},Vt=`/api/upload`,Ht=e=>{let t=``;for(let n of e)t+=String.fromCharCode(n);return btoa(t)},H=async e=>{let t=await fetch(Vt,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await It(t));let n=await t.json();if(!V(n)||typeof n.markdown!=`string`)throw Error(`markdown was not returned`);return n.markdown},Ut=`/api/addstory`,Wt=async e=>{let t=await fetch(Ut,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await It(t));let n=await t.json();return!V(n)||!Array.isArray(n.stories)?[]:n.stories.filter(V).map(e=>({id:xt(e.id),name:xt(e.name),color:xt(e.color)}))},Gt=`/api/reviewcomment`,Kt=async e=>{let t=await fetch(Gt,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await It(t))},qt=`/api/createissue`,Jt=`/api/storycolor`,Yt=async e=>{let t=await fetch(Jt,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await It(t))},Xt=async e=>{let t=await fetch(qt,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await It(t));let n=await t.json();if(!(e=>typeof e==`object`&&!!e&&!Array.isArray(e))(n)||typeof n.issueUrl!=`string`)throw Error(`issueUrl was not returned`);return n.issueUrl},Zt=`/api/reorderstory`,Qt=async e=>{let t=await fetch(Zt,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await It(t))},$t=`/api/deleteallcomments`,en=async e=>{let t=await fetch($t,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await It(t))},tn=`/api/deletestory`,nn=async e=>{let t=await fetch(tn,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await It(t))},rn=`/api/renamestory`,an=async e=>{let t=await fetch(rn,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await It(t))},on=`/api/storydescription`,sn=async e=>{let t=await fetch(on,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await It(t))},cn=e=>typeof e!=`object`||!e||Array.isArray(e)?null:Object.fromEntries(Object.entries(e).filter(e=>typeof e[1]==`string`)),ln=async()=>{let e=await fetch(`/api/projects`);if(!e.ok)throw Error(`HTTP ${e.status}`);let t=await e.json();if(typeof t!=`object`||!t||Array.isArray(t))return{pjcodes:[],projectUrls:null,fleetTaskCreateUrl:null,nameWithOwnerByPjcode:null};let n=t;return{pjcodes:Array.isArray(n.pjcodes)?n.pjcodes.filter(e=>typeof e==`string`):[],projectUrls:cn(n.projectUrls),fleetTaskCreateUrl:typeof n.fleetTaskCreateUrl==`string`?n.fleetTaskCreateUrl:null,nameWithOwnerByPjcode:cn(n.nameWithOwnerByPjcode)}},un=`/api/projectreadmeconfig`,dn=async e=>{let t=`${un}?pjcode=${encodeURIComponent(e)}`,n=await fetch(t);if(!n.ok)throw Error(await It(n));let r=await n.json();return{maximumPreparingIssuesCount:V(r)&&typeof r.maximumPreparingIssuesCount==`number`?r.maximumPreparingIssuesCount:null}},fn=`/api/renameissue`,pn=async e=>{let t=await fetch(fn,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await It(t))},mn=`/api/setdependedissueurl`,hn=async e=>{let t=await fetch(mn,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await It(t))},gn=`/api/projectsettings`,_n=async e=>{let t=await fetch(gn,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await It(t))},vn=5e3,yn=e=>`${e.isPr?`PR #`:`#`}${e.number}`,bn=(e,t)=>{switch(e.type){case`review`:return e.action===`approve_and_merge`?`Approved & Merged`:e.action===`request_changes`?`Rejected`:e.action===`totally_wrong`?`Marked totally wrong`:`Marked unnecessary`;case`next_action_date`:return e.action===`snooze_1hour`?`Next Action Hour +1h`:e.action===`snooze_3hours`?`Next Action Hour +3h`:e.action===`snooze_6hours`?`Next Action Hour +6h`:e.action===`snooze_1day`?`Next Action Date +1d`:e.action===`snooze_2days`?`Next Action Date +2d`:e.action===`snooze_3days`?`Next Action Date +3d`:e.action===`snooze_5days`?`Next Action Date +5d`:e.action===`snooze_1month`?`Next Action Date +1mo`:Se(t)?`Next Action Date +1w skip`:`Next Action Date +1w`;case`set_story`:return`Story → ${e.optionName}`;case`set_agent`:return`Agent → ${e.optionName}`;case`set_status`:return`Status → ${e.optionName}`;case`set_in_tmux_by_human`:return`Added to In Tmux by human`;case`ok_and_awaiting_workspace`:return`ok → Awaiting Workspace`;case`ok_and_close`:return`ok → Closed`;case`close`:return e.action===`close`?`Closed`:`Closed as not planned`;case`delete_all_comments`:return`Deleted all comments`}},xn=e=>{switch(e.type){case`review`:return e.action===`approve_and_merge`?`green`:e.action===`request_changes`?`amber`:e.action===`totally_wrong`?`red`:`gray`;case`next_action_date`:return`amber`;case`set_story`:case`set_agent`:case`set_status`:case`set_in_tmux_by_human`:case`ok_and_awaiting_workspace`:return`blue`;case`ok_and_close`:case`close`:return`red`;case`delete_all_comments`:return`red`}},Sn=(e,t)=>e.type===`next_action_date`?Se(t):e.type!==`delete_all_comments`,Cn=(e,t,n)=>`${bn(e,n)} — ${yn(t)}`,wn=`console-comment-expanded:`,Tn=e=>{try{let t=localStorage.getItem(wn+e);if(t===null)return new Set;let n=JSON.parse(t);return Array.isArray(n)?new Set(n.filter(e=>typeof e==`string`)):new Set}catch(e){return console.error(`Failed to load comment expanded state from storage:`,e),new Set}},En=(e,t)=>{try{localStorage.setItem(wn+e,JSON.stringify([...t]))}catch(e){console.error(`Failed to save comment expanded state to storage:`,e)}},Dn=()=>{let e=[];for(let t=0;t<localStorage.length;t++){let n=localStorage.key(t);n?.startsWith(wn)&&e.push(n)}for(let t of e)localStorage.removeItem(t)},On=`console-offline-action-queue`,kn=e=>{if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.id==`string`&&typeof t.message==`string`&&typeof t.color==`string`&&typeof t.enqueuedAt==`number`&&typeof t.itemUrl==`string`&&typeof t.projectItemId==`string`&&typeof t.itemNumber==`number`&&typeof t.repo==`string`&&typeof t.isPr==`boolean`&&typeof t.apiPath==`string`&&typeof t.requestBody==`object`&&t.requestBody!==null},An=()=>{try{let e=localStorage.getItem(On);if(e===null)return[];let t=JSON.parse(e);return Array.isArray(t)?t.filter(kn):[]}catch{return[]}},jn=e=>{localStorage.setItem(On,JSON.stringify(e))},Mn=()=>typeof crypto<`u`&&typeof crypto.randomUUID==`function`?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}-${Math.random().toString(36).slice(2)}`,Nn=e=>e instanceof TypeError,Pn=e=>e instanceof Error&&e.message.length>0?e.message:String(e),Fn=100,In=e=>Math.max(0,Math.ceil((vn-e)/1e3)),Ln=e=>Math.max(0,1-e/vn),Rn=()=>{let[e,t]=(0,y.useState)(null),[n,r]=(0,y.useState)(null),[i,a]=(0,y.useState)(An),o=(0,y.useRef)(i);o.current=i;let s=(0,y.useRef)(null),c=(0,y.useRef)(0),l=(0,y.useRef)(null),u=(0,y.useRef)(!1),d=(0,y.useRef)(()=>{}),f=(0,y.useCallback)(()=>{l.current!==null&&(clearInterval(l.current),l.current=null)},[]),p=(0,y.useCallback)(e=>{if(e.offline===void 0)return;let t={id:Mn(),message:e.message,color:e.color,enqueuedAt:Date.now(),...e.offline};a(e=>{let n=[...e,t];return jn(n),n})},[]),m=(0,y.useCallback)(e=>{e.commit().catch(t=>{Nn(t)&&e.offline!==void 0?p(e):r({message:e.message,reason:Pn(t),retry:()=>d.current(e)})})},[p]);d.current=m;let h=(0,y.useCallback)(()=>{let e=s.current;f(),s.current=null,t(null),e!==null&&!u.current&&(u.current=!0,Dn(),m(e))},[f,m]),g=(0,y.useCallback)(()=>{let e=s.current;f(),s.current=null,u.current=!0,t(null),e?.revertAdvance?.(),e?.revertOptimistic?.()},[f]),_=(0,y.useCallback)(()=>{r(null)},[]),v=(0,y.useCallback)((e,t)=>{r({message:e,reason:t})},[]),b=(0,y.useCallback)(e=>{a(t=>{let n=t.filter(t=>t.id!==e);return jn(n),n})},[]),x=(0,y.useCallback)(async e=>{let t=o.current.find(t=>t.id===e);if(t!==void 0)try{await Lt(t.apiPath,t.requestBody),b(e)}catch(n){Nn(n)?r({message:t.message,reason:`Still offline — action is still held in the queue`}):(r({message:t.message,reason:Pn(n)}),b(e))}},[b]),S=(0,y.useCallback)(e=>{if(s.current!==null&&!u.current){let e=s.current;f(),u.current=!0,Dn(),m(e)}u.current=!1,s.current=e,c.current=Date.now(),t({message:e.message,color:e.color,remainingSeconds:In(0),progress:Ln(0)}),e.advance(),e.optimistic?.(),l.current=setInterval(()=>{let n=Date.now()-c.current;if(n>=5e3){h();return}t({message:e.message,color:e.color,remainingSeconds:In(n),progress:Ln(n)})},Fn)},[f,h,m]);return(0,y.useEffect)(()=>h,[h]),{pending:e,error:n,offlineActions:i,enqueue:S,showError:v,undo:g,dismissError:_,confirmOfflineAction:x,discardOfflineAction:b}},zn=e=>typeof e==`object`&&!!e&&!Array.isArray(e),Bn=e=>Array.isArray(e)?e.filter(e=>typeof e==`string`):[],Vn=e=>Array.isArray(e)?e.filter(zn).map(e=>({...e,relatedOpenPullRequestUrls:Bn(e.relatedOpenPullRequestUrls)})):[],Hn=e=>!zn(e)||!Array.isArray(e.items)?[]:Vn(e.items),Un=e=>Array.isArray(e)?e.filter(zn):[],Wn=e=>Array.isArray(e)?e.filter(zn).map(e=>({...e,items:Vn(e.items)})):[],Gn=e=>({items:Hn(e),generatedAt:zn(e)&&typeof e.generatedAt==`string`?e.generatedAt:``,statusOptions:zn(e)?Un(e.statusOptions):[],agentOptions:zn(e)?Un(e.agentOptions):[],storyOptions:zn(e)?Un(e.storyOptions):[],storyColors:zn(e)&&zn(e.storyColors)?e.storyColors:{},stories:zn(e)?Wn(e.stories):[],defaultNameWithOwner:zn(e)&&typeof e.defaultNameWithOwner==`string`?e.defaultNameWithOwner:null,storyOrder:zn(e)?Bn(e.storyOrder):[],timerEndsAt:zn(e)&&typeof e.timerEndsAt==`string`?e.timerEndsAt:null,timerTotalSeconds:zn(e)&&typeof e.timerTotalSeconds==`number`&&e.timerTotalSeconds>0?e.timerTotalSeconds:null}),Kn=()=>{let e={};for(let t of j)e[t.name]=null;return e},qn=(e,t)=>`/projects/${e}/${t}/list.json`,Jn=6e4,Yn=`console-list-v1`,Xn=(e,t)=>{try{if(!(`caches`in globalThis))return;globalThis.caches.open(Yn).then(n=>n.put(e,new Response(JSON.stringify(t),{headers:{"Content-Type":`application/json`}}))).catch(e=>{console.warn(`Failed to persist tab snapshot to cache:`,e)})}catch(e){console.warn(`Failed to access cache storage:`,e)}},Zn=async e=>{if(!(`caches`in globalThis))return null;try{let t=await(await globalThis.caches.open(Yn)).match(e);return t===void 0?null:{...Gn(await t.json()),fromCache:!0}}catch{return null}},Qn=async e=>{let t=await Promise.all(j.map(async t=>({tabName:t.name,snapshot:await Zn(qn(e,t.name))}))),n=Kn();for(let{tabName:e,snapshot:r}of t)n[e]=r;return n},$n=async(e,t)=>{let n=qn(e,t);try{let e=await fetch(n);if(!e.ok)throw Error(`HTTP ${e.status}`);let t=await e.json();return Xn(n,t),{snapshot:{...Gn(t),fromCache:!1},error:null}}catch(e){let t=await Zn(n);return t===null?{snapshot:null,error:e instanceof Error?e:Error(String(e))}:{snapshot:t,error:null}}},er=async e=>{await Promise.all(j.map(async t=>{let n=qn(e,t.name);try{let e=await fetch(n);if(!e.ok)return;Xn(n,await e.json())}catch{}}))},tr=async e=>{let t=await Promise.all(j.map(async t=>{let{snapshot:n,error:r}=await $n(e,t.name);return{tabName:t.name,snapshot:n,error:r}})),n=Kn(),r=null;for(let{tabName:e,snapshot:i,error:a}of t)n[e]=i,a!==null&&r===null&&(r=a);return{snapshots:n,firstError:Object.values(n).every(e=>e===null)?r:null}},nr=(e,t=null)=>{let n=(0,y.useRef)(new Map),[r,i]=(0,y.useState)(Kn),[a,o]=(0,y.useState)(!0),[s,c]=(0,y.useState)(null),[l,u]=(0,y.useState)(e);if(l!==e){u(e);let t=e===null?null:n.current.get(e)??null;i(t??Kn()),t!==null&&o(!1)}return(0,y.useEffect)(()=>{if(t!==null&&e!==null){let n=t.tabs[e];if(n!==void 0){let e=Kn();for(let t of j){let r=n[t.name];r!==void 0&&(e[t.name]={...r})}i(e),o(!1),c(null);return}}let r=!1,a=!1;if(c(null),e===null)return i(Kn()),o(!1),c(`No project specified in the URL path.`),()=>{r=!0};let s=n.current.has(e);Qn(e).then(t=>{if(r)return;let c=Object.values(t).some(e=>e!==null);c&&!a?(n.current.set(e,t),i(t),o(!1)):!c&&!a&&!s&&(o(!0),i(Kn()))});let l=()=>{tr(e).then(({snapshots:t,firstError:s})=>{r||(a=!0,n.current.set(e,t),i(t),c(s===null?null:s.message),o(!1))}).catch(e=>{r||(a=!0,c(e instanceof Error?e.message:String(e)),o(!1))})};l();let u=setInterval(l,Jn);return()=>{r=!0,clearInterval(u)}},[e,t]),{snapshots:r,isLoading:a,error:s,refreshSingleTab:(0,y.useCallback)(async t=>{if(e===null)return;let{snapshot:r}=await $n(e,t);r!==null&&i(i=>{let a={...i,[t]:r};return n.current.set(e,a),a})},[e])}},rr=(e,t,n,r,i)=>{(0,y.useEffect)(()=>{if(!i||r)return;let a=n.filter(n=>n!==e&&n!==t);if(a.length!==0)for(let e of a)er(e).catch(()=>{})},[i,r,e,t,n]),(0,y.useEffect)(()=>{if(!i||r)return;let t=n.filter(t=>t!==e);if(t.length===0)return;let a=setInterval(()=>{for(let e of t)er(e).catch(()=>{})},Jn);return()=>{clearInterval(a)}},[i,r,e,n])},ir=class{fetcher;cache=new Map;inFlight=new Map;prefetchInFlight=new Set;constructor(e){this.fetcher=e}peek=e=>this.cache.get(e);has=e=>this.cache.has(e);load=(e,t)=>{let n=this.cache.get(e);if(n!==void 0)return Promise.resolve(n);let r=this.inFlight.get(e);if(r!==void 0)return r;let i=this.fetcher(t).then(t=>(this.cache.set(e,t),t)).finally(()=>{this.inFlight.delete(e)});return this.inFlight.set(e,i),i};prefetch=(e,t)=>{this.cache.has(e)||this.inFlight.has(e)||this.prefetchInFlight.has(e)||(this.prefetchInFlight.add(e),this.fetcher(t).then(t=>{this.cache.set(e,t)}).catch(()=>{}).finally(()=>{this.prefetchInFlight.delete(e)}))};seed(e,t){this.cache.set(e,t)}invalidate=e=>{this.cache.delete(e)}},ar=e=>{try{let t=new URL(e).pathname.split(`/`).filter(Boolean);if(t.length>=4)return`${t[0]}/${t[1]}#${t[3]}`}catch{}return e},or=(e,t)=>{for(let[n,r]of Object.entries(t.items)){let t=ar(n);e.body.seed(t,r.body),e.comments.seed(t,r.comments),e.state.seed(t,r.state),r.files!==null&&e.files.seed(t,r.files),r.commits!==null&&e.commits.seed(t,r.commits),r.prStatus!==null&&e.prStatus.seed(t,r.prStatus),r.relatedPrs!==null&&e.relatedPrs.seed(t,r.relatedPrs)}},sr=(e=null)=>(0,y.useMemo)(()=>{let t=Ft(),n={client:t,body:new ir(t.fetchItemBody),comments:new ir(t.fetchComments),files:new ir(t.fetchPrFiles),commits:new ir(t.fetchPrCommits),relatedPrs:new ir(t.fetchRelatedPrs),state:new ir(t.fetchIssueState),prStatus:new ir(t.fetchPullRequestStatus)};return e!==null&&or(n,e),n},[e]),cr=0,lr=500,ur=2e3,dr=e=>{let t=window;if(typeof t.requestIdleCallback==`function`&&typeof t.cancelIdleCallback==`function`){let n=t.requestIdleCallback(e,{timeout:ur});return{cancel:()=>t.cancelIdleCallback?.(n)}}let n=window.setTimeout(e,0);return{cancel:()=>window.clearTimeout(n)}},fr=(e,t)=>{let n=`${t.repo}#${t.number}`;e.body.prefetch(n,t.url),e.state.prefetch(n,t.url),e.comments.prefetch(n,t.url),t.isPr?(e.files.prefetch(n,t.url),e.commits.prefetch(n,t.url),e.prStatus.prefetch(n,t.url)):e.relatedPrs.prefetch(n,t.url)},pr=(e,t,n)=>{(0,y.useEffect)(()=>{if(t===null)return;let r=n.findIndex(e=>e.projectItemId===t.projectItemId);if(r===-1)return;let i=n.slice(r+1,r+1+cr);if(i.length===0)return;let a=null,o=window.setTimeout(()=>{a=dr(()=>{for(let t of i)fr(e,t)})},lr);return()=>{window.clearTimeout(o),a?.cancel()}},[e,t,n])},mr=e=>{let[t,n]=(0,y.useState)(null);return(0,y.useEffect)(()=>{t!==null&&e!==t&&n(null)},[e,t]),{explicitlySelectedPjcode:t,notifyExplicitSelection:(0,y.useCallback)(e=>{n(e)},[])}},hr=`/api/features`,gr=()=>{let[e,t]=(0,y.useState)({airplaneMode:!1});return(0,y.useEffect)(()=>{fetch(hr).then(async e=>{if(!e.ok)return;let n=await e.json();typeof n==`object`&&n&&!Array.isArray(n)&&`airplaneMode`in n&&typeof n.airplaneMode==`boolean`&&t({airplaneMode:n.airplaneMode})}).catch(e=>{console.warn(`Failed to fetch /api/features`,e)})},[]),e},_r=(e,t)=>{let n=j.findIndex(t=>t.name===e);if(n===-1)return null;for(let e=n+1;e<j.length;e+=1){let n=j[e];if(n.isNavigable!==!1&&(t[n.name]??0)>0)return n.name}return null},vr=e=>{let t=j.filter(e=>e.isNavigable!==!1);for(let n of t)if((e[n.name]??0)>0)return n.name;return t[0].name},yr=new Set(j.map(e=>e.name)),br=e=>{let t=e.split(`/`).filter(e=>e.length>0);if(t.length<3||t[0]!==`projects`)return null;let n=t[2];return yr.has(n)?n:null},xr=e=>{if(!e.startsWith(`#item/`))return null;let t=e.slice(6);return t.length===0?null:decodeURIComponent(t)},Sr=`#settings`,Cr=(e,t,n=new Set,r)=>{let i=(0,y.useCallback)(()=>{let e=vr(t);return typeof window>`u`?{activeTab:e,selectedItemKey:null}:{activeTab:br(window.location.pathname)??e,selectedItemKey:xr(window.location.hash)}},[t]),[a,o]=(0,y.useState)(i),s=(0,y.useRef)(null);s.current=e,(0,y.useEffect)(()=>{if(typeof window>`u`)return;let e=()=>{o(i())};return window.addEventListener(`popstate`,e),window.addEventListener(`hashchange`,e),()=>{window.removeEventListener(`popstate`,e),window.removeEventListener(`hashchange`,e)}},[i]),(0,y.useEffect)(()=>{if(typeof window>`u`)return;let e=br(window.location.pathname),i=Object.values(t).some(e=>e>0),a=r??t;if(e!==null){if(t[e]>0||a[e]>0){o(t=>t.activeTab===e?t:{...t,activeTab:e});return}if(!n.has(e))return}let c=vr(t);i&&s.current!==null&&window.history.replaceState({},``,`/projects/${s.current}/${c}${window.location.search}`),o(e=>e.activeTab===c?e:{...e,activeTab:c})},[t,n,r]);let c=(0,y.useCallback)(t=>e===null?`#${t}`:`/projects/${e}/${t}`,[e]),l=(0,y.useCallback)(e=>{if(typeof window>`u`){o({activeTab:e,selectedItemKey:null});return}window.history.pushState({},``,c(e)),o({activeTab:e,selectedItemKey:null})},[c]),u=(0,y.useCallback)(e=>{typeof window<`u`&&(window.location.hash=`#item/${encodeURIComponent(e)}`),o(t=>({...t,selectedItemKey:e}))},[]),d=(0,y.useCallback)(()=>{if(typeof window<`u`&&window.location.hash!==``){let e=`${window.location.pathname}${window.location.search}`;window.history.pushState({},``,e)}o(e=>({...e,selectedItemKey:null}))},[]);return{activeTab:a.activeTab,selectedItemKey:a.selectedItemKey,tabHref:c,selectTab:l,openItem:u,closeItem:d}},wr=`/api/review`,Tr=`/api/triage`,Er=`/api/intmux`,Dr=(e,t,n,r,i)=>{if(r===`approve_and_merge`)return{pjcode:e,action:`approve_and_merge`,prUrl:n,projectItemId:t.projectItemId};if(r===`request_changes`){let r=i[0];return{pjcode:e,action:`request_changes`,prUrl:n,projectItemId:t.projectItemId,commentBody:ve(i),...r===void 0?{}:{changedFilePath:r.path,line:r.line,side:r.side}}}return r===`totally_wrong`?{pjcode:e,action:`close`,prUrl:n,issueUrl:t.url,projectItemId:t.projectItemId,commentBody:he}:{pjcode:e,action:`unnecessary`,prUrl:n,projectItemId:t.projectItemId,issueUrl:t.url,commentBody:ge,issueCommentBody:_e(n)}},Or=(e,t,n,r)=>({pjcode:e,action:n,issueUrl:t.url,projectItemId:t.projectItemId,...r??{}}),kr=(e,t)=>({pjcode:e,action:`set_intmux`,issueUrl:t.url,projectItemId:t.projectItemId}),Ar=()=>Error(`No project specified in the URL path.`),jr=`ok`,Mr=(e,t,n)=>{let r=(0,y.useCallback)(e=>{if(t===void 0)return;let n=`${e.repo}#${e.number}`;t.body.invalidate(n),t.comments.invalidate(n)},[t]),i=(0,y.useCallback)(async(t,n,i,a=[])=>{if(e===null)throw Ar();await Lt(wr,Dr(e,t,n,i,a)),r(t)},[e,r]),a=(0,y.useCallback)(async(t,n)=>{if(e===null)throw Ar();await Lt(Tr,{pjcode:e,action:n,issueUrl:t.url,projectItemId:t.projectItemId}),r(t)},[e,r]),o=(0,y.useCallback)(async(t,n)=>{if(e===null)throw Ar();await Lt(Tr,{pjcode:e,action:`set_agent`,issueUrl:t.url,projectItemId:t.projectItemId,agentOptionId:n.id}),r(t)},[e,r]);return{reviewPullRequest:i,setNextActionDate:a,setStory:(0,y.useCallback)(async(t,n)=>{if(e===null)throw Ar();await Lt(Tr,{pjcode:e,action:`set_story`,issueUrl:t.url,projectItemId:t.projectItemId,storyOptionId:n.id}),r(t)},[e,r]),setAgent:o,setStatus:(0,y.useCallback)(async(t,n)=>{if(e===null)throw Ar();await Lt(Tr,{pjcode:e,action:`set_status`,issueUrl:t.url,projectItemId:t.projectItemId,statusName:n.name}),r(t)},[e,r]),setInTmuxByHuman:(0,y.useCallback)(async(t,n)=>{if(e===null)throw Ar();await Lt(Er,{pjcode:e,action:`set_intmux`,issueUrl:t.url,projectItemId:t.projectItemId}),r(t)},[e,r]),closeIssue:(0,y.useCallback)(async(t,n)=>{if(e===null)throw Ar();await Lt(Tr,{pjcode:e,action:n,issueUrl:t.url,projectItemId:t.projectItemId}),r(t)},[e,r]),okAndMoveToAwaitingWorkspace:(0,y.useCallback)(async(t,i)=>{if(e===null)throw Ar();let a=await Bt({pjcode:e,url:t.url,body:jr});if(await Lt(Tr,{pjcode:e,action:`set_status`,issueUrl:t.url,projectItemId:t.projectItemId,statusName:i.name}),r(t),await n?.(),!a.posted){let e=a.rateLimitResetAt===null?``:` Rate limit resets at ${a.rateLimitResetAt}.`;throw Error(`Comment not posted — ${a.error}.${e} Status was changed. Re-post: ${jr}`)}},[e,r,n]),addComment:(0,y.useCallback)(async(t,n)=>{if(e===null)throw Ar();let i=await Bt({pjcode:e,url:t.url,body:n});if(!i.posted){let e=i.rateLimitResetAt===null?``:` Rate limit resets at ${i.rateLimitResetAt}.`;throw Error(`${i.error}.${e}`)}return r(t),i.comment},[e,r]),uploadAttachment:(0,y.useCallback)(async(t,n)=>{if(e===null)throw Error(`no project in the URL path`);let r=Ht(new Uint8Array(await n.arrayBuffer()));return H({pjcode:e,url:t.url,fileName:n.name,contentBase64:r})},[e]),addInlineReviewComment:(0,y.useCallback)(async(t,n,r,i,a)=>{if(e===null)throw Ar();await Kt({pjcode:e,url:t,path:n,line:r,side:i,body:a})},[e]),issueRename:(0,y.useCallback)(async(e,t)=>{await pn({issueUrl:e.url,newTitle:t})},[]),deleteAllComments:(0,y.useCallback)(async e=>{await en({issueUrl:e.url}),r(e)},[r]),setDependedIssueUrl:(0,y.useCallback)(async(t,n)=>{if(e===null)throw Ar();await hn({pjcode:e,issueUrl:t.url,dependedIssueUrl:n})},[e])}},Nr=e=>`pv_overlay_${e}`,Pr=e=>e.projectItemId===``?e.itemId:e.projectItemId,Fr=(e,t)=>e!==void 0&&e.done===!0&&e.mode===t,Ir=(e,t,n)=>e.filter(e=>!Fr(t[Pr(e)],n)).length,Lr=(e,t,n)=>e.filter(e=>!Fr(t[Pr(e)],n)),Rr=(e,t,n)=>{if(n===null)return null;let r=Date.parse(n);if(Number.isNaN(r))return null;let i=e[Pr(t)];return i===void 0||i.ts<r?null:i.status??null},zr=(e,t,n,r,i)=>{let a={...e[t]??{},...n,ts:i,mode:r};return{...e,[t]:a}},Br=(e,t)=>{let n={...e};return delete n[t],n},Vr=(e,t)=>{let n={};for(let[r,i]of Object.entries(e)){if(i.done!==!0){n[r]=i;continue}let e=t[i.mode];if(e==null){n[r]=i;continue}let a=Date.parse(e.generatedAt);if(Number.isNaN(a)||i.ts>=a){n[r]=i;continue}e.items.some(e=>Pr(e)===r)||(n[r]=i)}return n},Hr=e=>typeof e==`object`&&!!e&&typeof e.ts==`number`,Ur=e=>{if(typeof localStorage>`u`)return{};let t=localStorage.getItem(Nr(e));if(t===null)return{};let n=JSON.parse(t);if(typeof n!=`object`||!n)return{};let r={};for(let[e,t]of Object.entries(n))Hr(t)&&(r[e]=t);return r},Wr=(e,t)=>{typeof localStorage<`u`&&localStorage.setItem(Nr(e),JSON.stringify(t))},Gr=e=>{let[t,n]=(0,y.useState)(()=>Ur(e));return{overlay:t,patchOverlay:(0,y.useCallback)((t,r,i)=>{n(n=>{let a=zr(n,t,r,i,Date.now());return Wr(e,a),a})},[e]),revertOverlayEntry:(0,y.useCallback)(t=>{n(n=>{let r=Br(n,t);return Wr(e,r),r})},[e])}},Kr=e=>{let t=e.split(`/`).filter(e=>e.length>0);if(t.length<2||t[0]!==`projects`)return null;let n=t[1];return n.length===0?null:n},qr=()=>{let[e,t]=(0,y.useState)(()=>Kr(typeof window>`u`?``:window.location.pathname));return(0,y.useEffect)(()=>{let e=()=>{t(Kr(window.location.pathname))};return window.addEventListener(`popstate`,e),()=>{window.removeEventListener(`popstate`,e)}},[]),e},Jr=()=>{let[e,t]=(0,y.useState)([]),[n,r]=(0,y.useState)(null),[i,a]=(0,y.useState)(null),[o,s]=(0,y.useState)(null),[c,l]=(0,y.useState)(!0),[u,d]=(0,y.useState)(null);return(0,y.useEffect)(()=>{let e=!1;return l(!0),d(null),ln().then(n=>{e||(t(n.pjcodes),r(n.projectUrls),a(n.fleetTaskCreateUrl),s(n.nameWithOwnerByPjcode),l(!1))}).catch(t=>{e||(d(t instanceof Error?t:Error(String(t))),l(!1))}),()=>{e=!0}},[]),{pjcodes:e,projectUrls:n,fleetTaskCreateUrl:i,nameWithOwnerByPjcode:o,isLoading:c,error:u}},Yr=e=>(0,y.useCallback)(t=>{Dn(),e(t)},[e]),Xr=()=>typeof window<`u`&&window.location.hash===`#settings`,Zr=e=>{let[t,n]=(0,y.useState)(Xr),[r,i]=(0,y.useState)(!1),[a,o]=(0,y.useState)(!1),[s,c]=(0,y.useState)(null),[l,u]=(0,y.useState)({}),d=(0,y.useRef)(``),f=(0,y.useRef)(e);f.current=e,(0,y.useEffect)(()=>{if(!t)return;let e=!1;return u({}),i(!0),c(null),Promise.all(f.current.map(e=>dn(e).then(t=>({pjcode:e,value:t.maximumPreparingIssuesCount===null?``:String(t.maximumPreparingIssuesCount)})))).then(t=>{if(!e){let e={};for(let{pjcode:n,value:r}of t)e[n]=r;u(e)}}).catch(t=>{e||c(t instanceof Error?t.message:`Failed to load settings`)}).finally(()=>{e||i(!1)}),()=>{e=!0}},[t]),(0,y.useEffect)(()=>{if(typeof window>`u`)return;let e=()=>{let e=window.location.hash===Sr;e||c(null),n(e)};return window.addEventListener(`popstate`,e),window.addEventListener(`hashchange`,e),()=>{window.removeEventListener(`popstate`,e),window.removeEventListener(`hashchange`,e)}},[]);let p=(0,y.useCallback)(()=>{typeof window<`u`&&(d.current=window.location.hash,window.history.pushState({},``,Sr)),n(!0)},[]),m=(0,y.useCallback)(()=>{if(typeof window<`u`){let e=d.current,t=`${window.location.pathname}${window.location.search}${e}`;window.history.replaceState({},``,t)}n(!1),c(null)},[]),h=(0,y.useCallback)((e,t)=>{u(n=>({...n,[e]:t}))},[]),g=(0,y.useCallback)(async()=>{o(!0),c(null);try{if(await Promise.all(Object.entries(l).filter(([,e])=>{let t=parseInt(e,10);return!Number.isNaN(t)&&t>=0}).map(([e,t])=>_n({pjcode:e,maximumPreparingIssuesCount:parseInt(t,10)}))),typeof window<`u`){let e=d.current,t=`${window.location.pathname}${window.location.search}${e}`;window.history.replaceState({},``,t)}n(!1)}catch(e){c(e instanceof Error?e.message:`Failed to save settings`)}finally{o(!1)}},[l]);return(0,y.useEffect)(()=>{if(!t)return;let e=e=>{e.key===`Escape`&&m()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[t,m]),{isOpen:t,isLoading:r,isSaving:a,error:s,inputValues:l,open:p,close:m,changeInput:h,save:g}},Qr=e=>{let t=(0,y.useRef)(e),n=(0,y.useRef)(Date.now());return t.current!==e&&(t.current=e,n.current=Date.now()),{isTimerExpired:(0,y.useCallback)(e=>e<=0?!1:Date.now()-n.current>=e*60*1e3,[])}},$r=/##\s+(?:エグゼクティブサマリ(?:\s*\/\s*Executive\s+Summary)?|Executive\s+Summary)\s*\n/i,ei=/^From:\s+:robot:/m,ti=/^##\s/m,ni=e=>{let t=$r.exec(e);if(t===null)return null;let n=e.slice(t.index+t[0].length),r=ei.exec(n),i=ti.exec(n),a=n.length;r!==null&&(a=Math.min(a,r.index)),i!==null&&(a=Math.min(a,i.index));let o=n.slice(0,a).trim();return o.length>0?o:null},ri=e=>{if(e.length===0)return null;let t=e[e.length-1],n=ni(t.body);if(n!==null)return n;let r=t.body.trim();return r.length>0?r:null},ii=e=>`${e.repo}#${e.number}`,ai=(e,t,n)=>{let[r,i]=(0,y.useState)({});return(0,y.useEffect)(()=>{if(!n)return;let r=!1;for(let n of e){let e=ii(n),a=t.peek(e);if(a!==void 0){let e=ri(a);r||i(t=>t[n.projectItemId]===e?t:{...t,[n.projectItemId]:e});continue}t.load(e,n.url).then(e=>{if(r)return;let t=ri(e);i(e=>e[n.projectItemId]===t?e:{...e,[n.projectItemId]:t})}).catch(()=>{r||i(e=>e[n.projectItemId]===null?e:{...e,[n.projectItemId]:null})})}return()=>{r=!0}},[e,t,n]),r},oi=(e,t)=>{let n=Math.abs(e);return n<60||n<=Math.abs(t)*1.5?null:e<0?`next`:`previous`},si=(e,t)=>{let n=Math.abs(e),r=Math.abs(t);return r>n*1.5&&r>20},ci=e=>{let t=e instanceof Element?e:null;for(;t!==null&&t!==document.body;){let e=window.getComputedStyle(t).overflowX;if((e===`auto`||e===`scroll`)&&t.scrollWidth>t.clientWidth&&t.scrollLeft>0)return!0;t=t.parentElement}return!1},li=e=>{let t=(0,y.useRef)(e);t.current=e;let n=(0,y.useRef)(null),r=(0,y.useCallback)(e=>{let n=0,r=0,i=!1,a=e=>{if(e.touches.length!==1){i=!1;return}if(ci(e.target)){i=!1;return}let t=e.touches[0];n=t.clientX,r=t.clientY,i=!0},o=e=>{if(!i)return;let t=e.touches[0];si(t.clientX-n,t.clientY-r)&&(i=!1)},s=e=>{if(!i||(i=!1,e.changedTouches.length!==1))return;let a=e.changedTouches[0],o=oi(a.clientX-n,a.clientY-r);o!==null&&t.current(o)};return e.addEventListener(`touchstart`,a,{passive:!0}),e.addEventListener(`touchmove`,o,{passive:!0}),e.addEventListener(`touchend`,s,{passive:!0}),()=>{e.removeEventListener(`touchstart`,a),e.removeEventListener(`touchmove`,o),e.removeEventListener(`touchend`,s)}},[]),i=(0,y.useCallback)(e=>{n.current!==null&&(n.current(),n.current=null),e!==null&&(n.current=r(e))},[r]);return(0,y.useEffect)(()=>()=>{n.current!==null&&(n.current(),n.current=null)},[]),i},ui=e=>(0,y.useCallback)(t=>{Dn(),e(t)},[e]),di=(e,t,n,r,i)=>{let a=(0,y.useRef)(void 0),o=(0,y.useRef)(!1);(0,y.useEffect)(()=>{if(!e){a.current=t,o.current=!1;return}a.current!==t&&(a.current=t,o.current=t!==null),o.current&&r===null&&n.length!==0&&(o.current=!1,i(n[0].projectItemId))},[e,t,n,r,i])},fi=e=>{window.history.pushState({},``,e),window.dispatchEvent(new PopStateEvent(`popstate`))},pi=e=>{window.history.replaceState({},``,e),window.dispatchEvent(new PopStateEvent(`popstate`))},mi=(e,t,n,r,i,a,o,s,c,l,u)=>{let d=(0,y.useRef)(0),f=(0,y.useRef)(null);(0,y.useEffect)(()=>{if(!e||r===null){d.current=0,f.current=null;return}if(!o||!s||c||l||f.current===r)return;if(t>0||n>0){d.current=0,f.current=null;return}if(u!==null&&r===u||i.length===0)return;let p=i.filter(e=>(a[e]??15)>0);if(d.current>=p.length-1){f.current=r,d.current=0;return}f.current=r,d.current+=1;let m=se(i,r,a);m===null?d.current=0:fi(`/projects/${m}/todo-by-human`)},[e,t,n,r,i,a,o,s,c,l,u])},hi=()=>{let[e,t]=(0,y.useState)(P),[n,r]=(0,y.useState)(!1),[i,a]=(0,y.useState)(e),o=(0,y.useCallback)(()=>{t(e=>(a(e),e)),r(!0)},[]),s=(0,y.useCallback)(()=>{r(!1)},[]),c=(0,y.useCallback)(()=>{a(e=>(oe(e),t(e),e)),r(!1)},[]),l=(0,y.useCallback)(e=>{a(t=>({...t,timerMode:e}))},[]),u=(0,y.useCallback)((e,t)=>{a(n=>({...n,projectMinutes:{...n.projectMinutes,[e]:t}}))},[]);return{timerMode:e.timerMode,projectMinutes:e.projectMinutes,isOpen:n,draftTimerMode:i.timerMode,draftProjectMinutes:i.projectMinutes,openSettings:o,closeSettings:s,saveSettings:c,toggleDraftTimerMode:l,changeDraftMinutes:u}},gi=(e,t)=>{let n=e.indexOf(t);if(n<0)return e.length>0?e[0]:null;let r=n+1;return r<e.length?e[r]:null},_i=(e,t)=>{let n=e.indexOf(t);return n<0||n>=e.length-1?null:e[n+1]},vi=(e,t)=>{let n=e.indexOf(t);return n<=0?null:e[n-1]},yi=(e,t)=>e.length===0?`${t}\n`:e.endsWith(`
14
14
  `)?`${e}${t}\n`:`${e}\n${t}\n`,bi=(e,t)=>{let n=`![uploading ${t}]()`;return`${e.length===0?``:e.replace(/\n*$/,`
15
15
  `)}\n\n\n${n}\n`},xi=(e,t,n)=>{let r=`![uploading ${t}]()`,i=e.indexOf(r);return i===-1?yi(e,n):e.slice(0,i)+n+e.slice(i+r.length)},Si=(e,t)=>{let n=`![uploading ${t}]()`,r=e.indexOf(n);if(r===-1)return e;let i=r,a=0;for(;a<3&&i>0&&e[i-1]===`
16
16
  `;)i--,a++;let o=+(e[r+n.length]===`
@@ -88,6 +88,6 @@ Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error
88
88
  `).map(e=>`> ${e}`).join(`
89
89
  `),nd=e=>e.split(`
90
90
  `).find(e=>e.trim()!==``)??``,rd=e=>`${e.author}:${e.createdAt}:${e.body}`,id=({comment:e,buildImageProxyUrl:t,renderReferenceLink:n,repoContext:r})=>{let i=(0,y.useRef)(null);return(0,y.useEffect)(()=>{let e=i.current;if(!e)return;let t=e=>e.stopPropagation();return e.addEventListener(`click`,t),()=>e.removeEventListener(`click`,t)},[]),(0,x.jsx)(`div`,{ref:i,className:`console-comment-body-expanded`,children:(0,x.jsx)(Lu,{body:e.body,buildImageProxyUrl:t,renderReferenceLink:n,repoContext:r})})},ad=({comments:e,isLoading:t,error:n,now:r,buildImageProxyUrl:i,renderReferenceLink:a,repoContext:o,persistenceKey:s=null,issueTitle:c,storyEntries:l,agentOptions:u,onCreateIssueFromComment:d})=>{let[f,p]=(0,y.useState)(!1),[m,h]=(0,y.useState)(null),[g,_]=(0,y.useState)(()=>s==null?new Set:Tn(s)),v=e.length>0?rd(e[e.length-1]):null;(0,y.useEffect)(()=>{v!==null&&_(e=>new Set([...e,v]))},[v]),(0,y.useEffect)(()=>{s!=null&&En(s,g)},[s,g]);let b=e=>{_(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})};if(n!==null)return(0,x.jsx)(`p`,{className:`console-comment-notloaded`,children:`Not loaded.`});if(t)return(0,x.jsx)(`p`,{className:`console-comment-loading`,children:`Loading comments...`});if(e.length===0)return(0,x.jsx)(`p`,{className:`console-comment-empty`,children:`No comments.`});let S=!f&&e.length>1;return(0,x.jsxs)(`div`,{className:`console-comment-list`,children:[S&&(0,x.jsxs)(`button`,{type:`button`,className:`console-comment-show-all`,onClick:()=>{p(!0),_(t=>new Set([...t,...e.map(rd)]))},children:[`Show all `,e.length]}),e.map(e=>{let t=rd(e),n=g.has(t);return(0,x.jsxs)(`article`,{className:`console-comment${n?` is-expanded`:S?` console-comment--expandable`:``}`,children:[(0,x.jsxs)(`button`,{type:`button`,className:`console-comment-toggle`,onClick:()=>b(t),"aria-expanded":n,children:[(0,x.jsx)(`span`,{className:`console-comment-author`,children:e.author}),(0,x.jsx)(`span`,{className:`console-comment-time`,children:k(e.createdAt,r)}),!n&&(0,x.jsx)(`span`,{className:`console-comment-body-preview`,children:nd(e.body)})]}),d!==void 0&&(0,x.jsx)(`button`,{type:`button`,className:`console-comment-create-workflow-issue`,onClick:t=>{t.stopPropagation(),h(e)},title:`Create workflow improvement issue from this comment`,children:`+`}),n&&(0,x.jsx)(id,{comment:e,buildImageProxyUrl:i,renderReferenceLink:a,repoContext:o})]},t)}),m!==null&&d!==void 0&&(0,x.jsx)(fe,{storyEntries:l??[],agentOptions:u??[],onSubmit:d,onClose:()=>h(null),initialDraft:{title:``,body:c==null?null:td(c),storyName:null,agentOptionId:null}})]})},od=e=>e.slice(0,7),sd=e=>e.split(`
91
- `)[0],cd=({commits:e,isLoading:t,error:n,now:r})=>n===null?t?(0,x.jsx)(`p`,{className:`console-commits-loading`,children:`Loading commits...`}):e.length===0?(0,x.jsx)(`p`,{className:`console-commits-empty`,children:`No commits.`}):(0,x.jsx)(`ul`,{className:`console-commits`,children:e.map(e=>(0,x.jsxs)(`li`,{className:`console-commit`,children:[(0,x.jsx)(`span`,{className:`console-commit-message`,children:sd(e.message)}),(0,x.jsx)(`span`,{className:`console-commit-sha`,children:od(e.sha)}),(0,x.jsx)(`span`,{className:`console-commit-author`,children:e.author}),(0,x.jsx)(`span`,{className:`console-commit-time`,children:k(e.authoredAt,r)})]},e.sha))}):(0,x.jsx)(`p`,{className:`console-commits-notloaded`,children:`Not loaded.`}),ld=({url:e,label:t=`Copy URL`})=>(0,x.jsx)(gu,{value:e,idleText:`Copy URL`,idleAriaLabel:t,copiedAriaLabel:`URL copied to clipboard`,className:`console-copy-url-button`}),ud=e=>{let t=new Map;for(let n of e){let e=t.get(n.message);if(e===void 0){t.set(n.message,[n.section]);continue}e.push(n.section)}return Array.from(t,([e,t])=>({message:e,sections:t}))},dd=e=>e.length<=1?e.join(``):`${e.slice(0,-1).join(`, `)} and ${e[e.length-1]}`,fd=({failures:e})=>e.length===0?null:(0,x.jsx)(`div`,{role:`alert`,className:`console-detail-fetch-error`,children:ud(e).map(e=>(0,x.jsxs)(`p`,{className:`console-detail-fetch-error-line`,children:[`Failed to load `,dd(e.sections),`:`,` `,e.message]},e.message))}),pd=({title:e,onTitleRename:t})=>{let[n,r]=(0,y.useState)(e),[i,a]=(0,y.useState)(!1),[o,s]=(0,y.useState)(e),[c,l]=(0,y.useState)(!1),[u,d]=(0,y.useState)(null),f=(0,y.useRef)(e);(0,y.useEffect)(()=>{let t=e!==f.current;f.current=e,!i&&t&&r(e)},[e,i]);let p=()=>{s(n),d(null),a(!0)},m=()=>{a(!1),d(null)},h=async()=>{let e=o.trim();if(e===``||e===n){a(!1);return}l(!0),d(null);try{await t(e),r(e),a(!1)}catch(e){d(e instanceof Error?e.message:`Failed to rename`)}finally{l(!1)}};return i?(0,x.jsxs)(`span`,{className:`console-detail-title-text console-detail-title-text--editing`,children:[(0,x.jsx)(`input`,{type:`text`,value:o,onChange:e=>s(e.target.value),onKeyDown:e=>{e.key===`Enter`?h():e.key===`Escape`&&m()},disabled:c,className:`console-detail-title-input`,"aria-label":`Edit title`}),(0,x.jsx)(`button`,{type:`button`,onClick:()=>void h(),disabled:c,className:`console-detail-title-save`,children:`Save`}),(0,x.jsx)(`button`,{type:`button`,onClick:m,disabled:c,className:`console-detail-title-cancel`,children:`Cancel`}),u!==null&&(0,x.jsx)(`span`,{className:`console-detail-title-error`,role:`alert`,children:u})]}):(0,x.jsxs)(`span`,{className:`console-detail-title-text`,children:[n,(0,x.jsx)(`button`,{type:`button`,onClick:p,className:`console-detail-title-edit`,"aria-label":`Edit title`,children:`Edit`})]})},md={MERGEABLE:{color:`GREEN`,label:`No conflict`,title:`This pull request has no merge conflicts`,modifier:`console-detail-mergeable-chip-ok`},CONFLICTING:{color:`RED`,label:`Conflict`,title:`This pull request has merge conflicts`,modifier:`console-detail-mergeable-chip-conflict`},UNKNOWN:{color:`GRAY`,label:`Checking merge status`,title:`GitHub has not finished computing the merge status yet`,modifier:`console-detail-mergeable-chip-unknown`}},hd=({mergeableStatus:e})=>{let t=md[e],n=ue(t.color);return(0,x.jsx)(`span`,{className:`console-detail-status-chip console-detail-mergeable-chip ${t.modifier}`,style:{color:n.fg,borderColor:n.border,backgroundColor:n.bg},title:t.title,children:t.label})},gd=e=>{let t=ue(e);return{color:t.fg,borderColor:t.border,backgroundColor:t.bg}},_d=({isPassedAllCiJob:e,isCiStateSuccess:t,isBranchOutOfDate:n,missingRequiredCheckNames:r})=>{let i=e&&t,a=i?`GREEN`:`RED`,o=i?`CI passing`:`CI failing`,s=!i&&r.length>0?`missing: ${r.join(`, `)}`:null;return(0,x.jsxs)(`span`,{className:`console-detail-pr-status`,children:[(0,x.jsxs)(`span`,{className:`console-detail-status-chip console-detail-ci-chip`,style:gd(a),title:s??o,children:[o,s!==null&&(0,x.jsxs)(`span`,{className:`console-detail-ci-missing`,children:[` `,`(`,s,`)`]})]}),n&&(0,x.jsx)(`span`,{className:`console-detail-status-chip console-detail-outofdate-chip`,style:gd(`YELLOW`),title:`This branch is out of date with the base branch`,children:`Out of date`})]})},vd=({pullRequest:e,body:t,bodyIsLoading:n,files:r,filesAreLoading:i,filesError:a,commits:o,commitsAreLoading:s,commitsError:c,now:l,buildImageProxyUrl:u,renderReferenceLink:d,onAddInlineComment:f})=>{let p=e.summary,m=Ti(e.url),h=m===null?void 0:{owner:m.owner,repo:m.repo},g=i||a!==null?null:r.length,_=s||c!==null?null:o.length;return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(`div`,{className:`console-pr-header`,children:[(0,x.jsx)(`a`,{href:e.url,className:`console-pr-section-title`,target:`_blank`,rel:`noopener noreferrer`,children:p?.title??e.url}),e.isDraft&&(0,x.jsx)(`span`,{className:`console-pr-section-state`,children:`draft`}),(0,x.jsx)(hd,{mergeableStatus:e.mergeableStatus}),(0,x.jsx)(_d,{isPassedAllCiJob:e.isPassedAllCiJob,isCiStateSuccess:e.isCiStateSuccess,isBranchOutOfDate:e.isBranchOutOfDate,missingRequiredCheckNames:e.missingRequiredCheckNames}),(0,x.jsx)(`a`,{href:e.url,className:`console-panel-open-link`,target:`_blank`,rel:`noopener noreferrer`,children:`open`}),(0,x.jsx)(ld,{url:e.url,label:`Copy PR URL`}),(0,x.jsxs)(`div`,{className:`console-pr-statbar`,children:[m!==null&&(0,x.jsxs)(`span`,{className:`console-pr-repo`,children:[m.owner,`/`,m.repo]}),e.branchName!==null&&(0,x.jsx)(`span`,{className:`console-pr-branch`,children:e.branchName}),p!==null&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(`span`,{className:`console-pr-add`,children:[`+`,p.additions]}),(0,x.jsxs)(`span`,{className:`console-pr-del`,children:[`-`,p.deletions]}),(0,x.jsxs)(`span`,{className:`console-pr-files-count`,children:[p.changedFiles,` files`]})]})]})]}),(0,x.jsx)(Ru,{title:`Description`,children:n?(0,x.jsx)(`p`,{className:`console-pr-body-loading`,children:`Loading description...`}):(0,x.jsx)(Lu,{body:p?.body??t,buildImageProxyUrl:u,renderReferenceLink:d,repoContext:h})}),(0,x.jsx)(Ru,{title:`Changed files`,count:g,children:(0,x.jsx)(ed,{files:r,isLoading:i,error:a,buildImageProxyUrl:u,onAddInlineComment:f})}),(0,x.jsx)(Ru,{title:`Commits`,count:_,defaultCollapsed:!0,children:(0,x.jsx)(cd,{commits:o,isLoading:s,error:c,now:l})})]})},yd=({item:e,storyName:t,storyColorEnum:n,overlayStatus:r,statusOptions:i,state:a,body:o,bodyIsLoading:s,bodyError:c,comments:l,commentsAreLoading:u,commentsError:d,files:f,filesAreLoading:p,filesError:m,commits:h,commitsAreLoading:g,commitsError:_,stateError:v,pullRequestStatus:y,pullRequestStatusError:b,relatedPullRequests:S,relatedPullRequestsError:C,now:w,commentComposer:T,operationBar:ee,buildImageProxyUrl:E,renderReferenceLink:D,onAddInlineComment:O,onTitleRename:te,storyEntries:ne,agentOptions:j,onCreateIssueFromComment:M})=>{let N=a?.state??`open`,re=a?.merged??!1,ie=!e.isPr&&N===`closed`?`Closed`:null,ae=Ei(e.nameWithOwner)??void 0,P=ue(n),oe=r===null?e.status===null?null:{name:e.status,color:i.find(t=>t.name===e.status)?.color??`GRAY`}:r,se=oe===null?null:ue(oe.color),ce=p||m!==null?null:f.length,le=u||d!==null?null:l.length,F=g||_!==null?null:h.length,de=!u&&d===null&&l.length>0,fe=e=>{let t=Ti(e);return t===null?e:`PR #${t.number}`},pe=[{section:`item state`,message:v},{section:`pull request status`,message:e.isPr?b:null},{section:`description`,message:c},{section:`comments`,message:d},{section:`changed files`,message:e.isPr?m:null},{section:`commits`,message:e.isPr?_:null},{section:`related pull requests`,message:e.isPr?null:C},...S.flatMap(e=>[{section:`changed files of ${fe(e.pullRequest.url)}`,message:e.filesError},{section:`commits of ${fe(e.pullRequest.url)}`,message:e.commitsError}])].flatMap(e=>e.message===null?[]:[{section:e.section,message:e.message}]),I=e.isPr&&y?.found?[{url:e.url,mergeableStatus:y.mergeableStatus}]:[];return(0,x.jsxs)(`article`,{className:`console-detail`,children:[(0,x.jsxs)(`div`,{className:`console-detail-header`,children:[(0,x.jsxs)(`h2`,{className:`console-detail-title`,children:[(0,x.jsx)(Ee,{isPr:e.isPr,state:N,merged:re,isDraft:!1,stateReason:``}),te==null?(0,x.jsx)(`span`,{className:`console-detail-title-text`,children:e.title}):(0,x.jsx)(pd,{title:e.title,onTitleRename:te}),(0,x.jsx)(`span`,{className:`console-detail-number`,children:e.isPr?`PR #${e.number}`:`#${e.number}`})]}),(0,x.jsxs)(`div`,{className:`console-detail-topline`,children:[oe!==null&&se!==null&&(0,x.jsx)(`span`,{className:`console-detail-status-chip`,style:{color:se.fg,borderColor:se.border,backgroundColor:se.bg},children:oe.name}),e.agent!==null&&e.agent!==``&&(0,x.jsx)(`span`,{className:`console-detail-agent-chip`,children:e.agent}),t!==null&&(0,x.jsxs)(`span`,{className:`console-storytag`,children:[(0,x.jsx)(`span`,{className:`console-story-dot`,style:{backgroundColor:P.dot}}),t]}),e.isPr&&y?.found&&(0,x.jsx)(_d,{isPassedAllCiJob:y.isPassedAllCiJob,isCiStateSuccess:y.isCiStateSuccess,isBranchOutOfDate:y.isBranchOutOfDate,missingRequiredCheckNames:y.missingRequiredCheckNames}),!e.isPr&&S.map(e=>(0,x.jsxs)(`span`,{className:`console-related-pr-group`,children:[S.length>1&&(0,x.jsx)(`span`,{className:`console-related-pr-label`,children:fe(e.pullRequest.url)}),(0,x.jsx)(_d,{isPassedAllCiJob:e.pullRequest.isPassedAllCiJob,isCiStateSuccess:e.pullRequest.isCiStateSuccess,isBranchOutOfDate:e.pullRequest.isBranchOutOfDate,missingRequiredCheckNames:e.pullRequest.missingRequiredCheckNames}),(0,x.jsx)(hd,{mergeableStatus:e.pullRequest.mergeableStatus})]},e.pullRequest.url)),I.map(e=>(0,x.jsx)(hd,{mergeableStatus:e.mergeableStatus},e.url)),ie!==null&&(0,x.jsx)(`span`,{className:`console-detail-closed-label`,children:ie})]}),(0,x.jsx)(fd,{failures:pe}),(0,x.jsxs)(`div`,{className:`console-detail-subbar`,children:[(0,x.jsxs)(`a`,{href:e.url,className:`console-detail-link`,target:`_blank`,rel:`noopener noreferrer`,children:[`#`,e.number]}),(0,x.jsx)(`span`,{className:`console-detail-repo`,children:e.repo}),(0,x.jsxs)(`span`,{className:`console-detail-createdat`,title:A(e.createdAt),children:[`opened `,k(e.createdAt,w)]}),(0,x.jsx)(ld,{url:e.url}),e.labels.map(e=>(0,x.jsx)(`span`,{className:`console-label-chip`,children:e},e))]})]}),(0,x.jsxs)(`div`,{className:`console-detail-body`,children:[(0,x.jsx)(Ru,{title:`Description`,defaultCollapsed:de,headerAction:(0,x.jsx)(`a`,{href:e.url,className:`console-panel-open-link`,target:`_blank`,rel:`noopener noreferrer`,children:`open`}),children:c===null?s?(0,x.jsx)(`p`,{className:`console-detail-body-loading`,children:`Loading description...`}):(0,x.jsx)(Lu,{body:o,buildImageProxyUrl:E,renderReferenceLink:D,repoContext:ae}):(0,x.jsx)(`p`,{className:`console-detail-body-notloaded`,children:`Not loaded.`})},de?`desc-collapsed`:`desc-open`),e.isPr&&(0,x.jsx)(Ru,{title:`Changed files`,count:ce,children:(0,x.jsx)(ed,{files:f,isLoading:p,error:m,onAddInlineComment:O})}),(0,x.jsx)(Ru,{title:`Comments`,count:le,children:(0,x.jsx)(ad,{comments:l,isLoading:u,error:d,now:w,buildImageProxyUrl:E,renderReferenceLink:D,repoContext:ae,persistenceKey:e.url,issueTitle:e.title,storyEntries:ne,agentOptions:j,onCreateIssueFromComment:M})}),e.isPr&&(0,x.jsx)(Ru,{title:`Commits`,count:F,defaultCollapsed:!0,children:(0,x.jsx)(cd,{commits:h,isLoading:g,error:_,now:w})}),!e.isPr&&S.map(e=>(0,x.jsx)(vd,{pullRequest:e.pullRequest,body:e.pullRequest.summary?.body??``,bodyIsLoading:!1,files:e.files,filesAreLoading:e.filesAreLoading,filesError:e.filesError,commits:e.commits,commitsAreLoading:e.commitsAreLoading,commitsError:e.commitsError,now:w,buildImageProxyUrl:E,renderReferenceLink:D,onAddInlineComment:O},e.pullRequest.url))]}),(0,x.jsxs)(`div`,{className:`console-detail-dock`,children:[(0,x.jsx)(`div`,{className:`console-detail-dock-composer`,children:T}),(0,x.jsx)(`div`,{className:`console-actionbar`,children:ee})]})]})},bd=({className:e,ariaLabel:t,placeholder:n,currentOption:r,options:i,onSelect:a})=>{let o=(0,y.useRef)({ready:!1,currentOptionId:r?.id??null});return(0,y.useLayoutEffect)(()=>{o.current.ready=!0,o.current.currentOptionId=r?.id??null}),(0,x.jsxs)(`select`,{className:e,defaultValue:r?.id??``,onChange:e=>{if(!o.current.ready||e.target.value===(o.current.currentOptionId??``))return;let t=i.find(t=>t.id===e.target.value);t!==void 0&&a(t)},"aria-label":t,children:[(0,x.jsx)(`option`,{value:``,children:n}),i.map(e=>(0,x.jsx)(`option`,{value:e.id,children:e.name},e.id))]})},xd=({agentOptions:e,currentAgentName:t,onSetAgent:n})=>{if(e.length===0)return null;let r=t===null?null:e.find(e=>e.name===t)??null;return(0,x.jsx)(`div`,{className:`console-op-group`,children:(0,x.jsx)(bd,{className:`console-agent-select`,ariaLabel:`Set agent`,placeholder:`— agent —`,currentOption:r,options:e,onSelect:n},r?.id??`none`)})},Sd=({onClose:e,onCommentAndClose:t,onOkAndClose:n,isDraftEmpty:r})=>{let[i,a]=(0,y.useState)(!1),[o,s]=(0,y.useState)(null),c=async e=>{if(!(e===void 0||i)){a(!0),s(null);try{await e()}catch(e){s(e instanceof Error?e.message:`failed to post`)}finally{a(!1)}}};return(0,x.jsxs)(`div`,{className:`console-op-group`,children:[(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,onClick:()=>e(`close_not_planned`),children:`Close as not planned`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,onClick:()=>e(`close`),children:`Close`}),n!==void 0&&(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,disabled:i,onClick:()=>{c(n)},children:`OK & Close`}),t!==void 0&&(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,disabled:i||r===!0,onClick:()=>{c(t)},children:`Comment & Close`}),o!==null&&(0,x.jsx)(`span`,{role:`alert`,className:`console-op-comment-close-error`,children:o})]})},Cd=({onDeleteAllComments:e,onDeleteStory:t,storyNameForDeletion:n})=>{let[r,i]=(0,y.useState)(!1),[a,o]=(0,y.useState)(!1),[s,c]=(0,y.useState)(!1),[l,u]=(0,y.useState)(null),d=()=>{e(),i(!1)},f=()=>{o(!0),u(null)},p=async e=>{if(t){c(!0),u(null);try{await t(e)}catch(e){u(e instanceof Error?e.message:String(e)),c(!1)}}};return(0,x.jsxs)(`div`,{className:`console-op-group`,children:[(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-danger`,onClick:()=>i(e=>!e),children:`⚠`}),r&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-danger`,onClick:d,children:`Delete All Comments`}),t!=null&&(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-danger`,onClick:f,disabled:a,children:`Delete Story`})]}),a&&(0,x.jsxs)(`div`,{className:`console-story-delete-confirm`,role:`dialog`,"aria-modal":`true`,"aria-label":`Confirm story deletion`,children:[(0,x.jsxs)(`p`,{className:`console-story-delete-confirm-message`,children:[`Delete story option "`,n,`" from the GitHub custom field?`]}),l!==null&&(0,x.jsx)(`p`,{role:`alert`,className:`console-list-error`,children:l}),(0,x.jsxs)(`div`,{className:`console-story-delete-confirm-actions`,children:[(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-danger`,onClick:()=>void p(!0),disabled:s,children:s?`Deleting…`:`Delete with child tasks`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-danger`,onClick:()=>void p(!1),disabled:s,children:s?`Deleting…`:`Keep child tasks`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,onClick:()=>{o(!1),u(null)},disabled:s,children:`Cancel`})]})]})]})},wd=({isManualTriage:e,onSetNextActionDate:t})=>(0,x.jsxs)(`div`,{className:`console-op-group`,children:[(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-snooze`,onClick:()=>t(`snooze_1hour`),children:`+1h`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-snooze`,onClick:()=>t(`snooze_3hours`),children:`+3h`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-snooze`,onClick:()=>t(`snooze_6hours`),children:`+6h`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-snooze`,onClick:()=>t(`snooze_1day`),children:`+1d`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-snooze`,onClick:()=>t(`snooze_2days`),children:`+2d`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-snooze`,onClick:()=>t(`snooze_3days`),children:`+3d`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-snooze`,onClick:()=>t(`snooze_5days`),children:`+5d`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-snooze`,onClick:()=>t(`snooze_1week`),children:e?`+1w skip`:`+1w`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-snooze`,onClick:()=>t(`snooze_1month`),children:`+1mo`})]}),Td=[{action:`unnecessary`,label:`Unnecessary`,variant:`unneeded`},{action:`totally_wrong`,label:`Totally wrong`,variant:`wrong`},{action:`request_changes`,label:`Reject`,variant:`reject`},{action:`approve_and_merge`,label:`Approve & Merge`,variant:`approve`}],Ed=`Reject needs an inline comment on the diff.`,Dd=({onReview:e,rejectEnabled:t})=>(0,x.jsxs)(`div`,{className:`console-op-group console-op-group-review`,children:[!t&&(0,x.jsx)(`p`,{className:`console-op-requirement`,children:Ed}),Td.map(n=>{let r=n.action===`request_changes`&&!t;return(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-${n.variant}`,disabled:r,onClick:()=>e(n.action),children:n.label},n.action)})]}),Od=({onSetDependedIssueUrl:e})=>{let[t,n]=(0,y.useState)(!1),[r,i]=(0,y.useState)(``),[a,o]=(0,y.useState)(!1),[s,c]=(0,y.useState)(null);return(0,x.jsxs)(`div`,{className:`console-op-group console-op-group-rare-actions`,children:[(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,onClick:()=>{n(e=>!e),c(null)},title:`Rare actions`,children:`⋯`}),t&&e!==null&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(`input`,{type:`url`,className:`console-settings-modal-input`,placeholder:`Depended issue URL`,value:r,onChange:e=>i(e.target.value),disabled:a}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,onClick:async()=>{if(e!==null&&r.trim()!==``){o(!0),c(null);try{await e(r.trim()),i(``),n(!1)}catch(e){c(e instanceof Error?e.message:`Failed to set depended issue URL`)}finally{o(!1)}}},disabled:a||r.trim()===``,children:a?`...`:`Set Depended Issue`})]}),s!==null&&(0,x.jsx)(`p`,{className:`console-settings-modal-error`,children:s})]})},kd=(e,t)=>{let n=t.toLowerCase();return e.find(e=>e.name.toLowerCase()===n)??null},Ad=({statusOptions:e,onSetStatus:t,onSetInTmuxByHuman:n})=>{let r=xe.map(t=>({name:t,option:kd(e,t)})).filter(e=>e.option!==null);return r.length===0?null:(0,x.jsx)(`div`,{className:`console-op-group`,children:r.map(({name:e,option:r})=>{let i=ue(r.color),a=e===ye;return(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,style:{color:i.fg,borderColor:i.border,backgroundColor:i.bg},onClick:()=>a?n(r):t(r),children:r.name},r.id)})})},jd=({storyOptions:e,currentStoryName:t,onSetStory:n})=>{if(e.length===0)return null;let r=t===null?null:e.find(e=>e.name===t)??null;return(0,x.jsx)(`div`,{className:`console-op-group`,children:(0,x.jsx)(bd,{className:`console-story-select`,ariaLabel:`Set story`,placeholder:`— story —`,currentOption:r,options:e,onSelect:n},r?.id??`none`)})},Md=({tab:e,hasPullRequest:t,rejectEnabled:n,statusOptions:r,storyOptions:i,currentStoryName:a,agentOptions:o,currentAgentName:s,handlers:c,storyNameForDeletion:l,onCommentAndClose:u,onOkAndClose:d,isDraftEmpty:f})=>{let[p,m]=(0,y.useState)(!1);return(0,x.jsxs)(`div`,{className:`console-operation-bar`,children:[t&&(0,x.jsx)(Dd,{onReview:c.onReview,rejectEnabled:n}),(0,x.jsx)(wd,{isManualTriage:Se(e),onSetNextActionDate:c.onSetNextActionDate}),(0,x.jsx)(Ad,{statusOptions:r,onSetStatus:c.onSetStatus,onSetInTmuxByHuman:c.onSetInTmuxByHuman}),p&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(jd,{storyOptions:i,currentStoryName:a,onSetStory:c.onSetStory}),(0,x.jsx)(xd,{agentOptions:o,currentAgentName:s,onSetAgent:c.onSetAgent})]}),(0,x.jsxs)(`div`,{className:`console-op-group-bottom-row`,children:[(0,x.jsxs)(`div`,{className:`console-op-group-left-pair`,children:[(i.length>0||o.length>0)&&(0,x.jsx)(`div`,{className:`console-op-group`,children:(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,onClick:()=>m(e=>!e),title:`Change agent or story`,children:`⚙`})}),(0,x.jsx)(Od,{onSetDependedIssueUrl:c.onSetDependedIssueUrl}),(0,x.jsx)(Cd,{onDeleteAllComments:c.onDeleteAllComments,onDeleteStory:c.onDeleteStory,storyNameForDeletion:l})]}),(0,x.jsx)(Sd,{onClose:c.onClose,onCommentAndClose:u,onOkAndClose:d,isDraftEmpty:f})]})]})},Nd=(e,t,n,r)=>{let i=t===null?void 0:e.peek(t),[a,o]=(0,y.useState)(i??r),[s,c]=(0,y.useState)(t!==null&&i===void 0),[l,u]=(0,y.useState)(null);return(0,y.useEffect)(()=>{if(t===null||n===null)return;let r=e.peek(t);if(r!==void 0){o(r),c(!1),u(null);return}let i=!1;return c(!0),u(null),e.load(t,n).then(e=>{i||(o(e),c(!1))}).catch(e=>{i||(u(e instanceof Error?e.message:String(e)),c(!1))}),()=>{i=!0}},[e,t,n]),{data:a,isLoading:s,error:l}},Pd=[],Fd=[],Id=[],Ld=[],Rd={state:`open`,merged:!1,isPullRequest:!1,title:``},zd={found:!1,isConflicted:!1,mergeableStatus:`UNKNOWN`,isPassedAllCiJob:!1,isCiStateSuccess:!1,isBranchOutOfDate:!1,missingRequiredCheckNames:[]},Bd=(e,t,n)=>{let r=t===null?null:`${t.repo}#${t.number}`,i=t===null?null:t.url,a=t?.isPr??!1,o=Nd(e.body,r,i,``),s=Nd(e.state,r,i,Rd),c=Nd(e.comments,r,i,Pd),l=Nd(e.files,a?r:null,a?i:null,Fd),u=Nd(e.commits,a?r:null,a?i:null,Id),d=Nd(e.prStatus,a?r:null,a?i:null,zd),f=!a&&((t?.relatedOpenPullRequestUrls.length??0)>0||n===`prs`),p=Nd(e.relatedPrs,f?r:null,f?i:null,Ld),[m,h]=(0,y.useState)([]);return(0,y.useEffect)(()=>{if(a||p.data.length===0){h([]);return}let t=!1,n=p.data.map(e=>({pullRequest:e,files:Fd,filesAreLoading:!0,filesError:null,commits:Id,commitsAreLoading:!0,commitsError:null}));h(n);let r=(e,n)=>{t||h(t=>t.map(t=>t.pullRequest.url===e?{...t,...n}:t))};for(let t of p.data){let n=t.url;e.files.load(n,t.url).then(e=>r(t.url,{files:e,filesAreLoading:!1})).catch(e=>r(t.url,{filesAreLoading:!1,filesError:e instanceof Error?e.message:String(e)})),e.commits.load(n,t.url).then(e=>r(t.url,{commits:e,commitsAreLoading:!1})).catch(e=>r(t.url,{commitsAreLoading:!1,commitsError:e instanceof Error?e.message:String(e)}))}return()=>{t=!0}},[e,a,p.data]),{state:s.data,body:o.data,bodyIsLoading:o.isLoading,bodyError:o.error,comments:c.data,commentsAreLoading:c.isLoading,commentsError:c.error,files:l.data,filesAreLoading:l.isLoading,filesError:l.error,commits:u.data,commitsAreLoading:u.isLoading,commitsError:u.error,stateError:s.error,pullRequestStatus:a?d.data:null,pullRequestStatusError:a?d.error:null,relatedPullRequests:m,relatedPullRequestsError:a?null:p.error}},Vd=e=>JSON.stringify([e.author,e.createdAt,e.body]),Hd=(e,t)=>{let n=new Set(e.map(Vd));return[...e,...t.filter(e=>!n.has(Vd(e)))]},Ud=({href:e,fallbackText:t,state:n})=>{if(n===null||n.title.trim()===``)return(0,x.jsx)(`a`,{className:`console-markdown-reference console-markdown-reference-plain`,href:e,target:`_blank`,rel:`noopener noreferrer`,children:t});let r=Ti(e);return(0,x.jsxs)(`a`,{className:`console-markdown-reference`,href:e,target:`_blank`,rel:`noopener noreferrer`,children:[(0,x.jsx)(Ee,{...Di(n)}),(0,x.jsx)(`span`,{className:`console-markdown-reference-title`,children:n.title}),r!==null&&(0,x.jsxs)(`span`,{className:`console-markdown-reference-number`,children:[`#`,r.number]})]})},Wd=(e,t)=>{let[n,r]=(0,y.useState)(()=>e.peek(t)??null);return(0,y.useEffect)(()=>{let n=e.peek(t);if(n!==void 0){r(n);return}let i=!1;return r(null),e.load(t,t).then(e=>{i||r(e)}).catch(()=>{i||r(null)}),()=>{i=!0}},[e,t]),n},Gd=({cache:e,href:t,fallbackText:n})=>{let r=Wd(e,t);return(0,x.jsx)(Ud,{href:t,fallbackText:n,state:r})},Kd=e=>({itemUrl:e.url,projectItemId:e.projectItemId,itemNumber:e.number,repo:e.repo,isPr:e.isPr}),qd=(e,t,n,r,i)=>({...Kd(t),apiPath:wr,requestBody:Dr(e,t,n,r,i)}),Jd=(e,t,n,r)=>({...Kd(t),apiPath:Tr,requestBody:Or(e,t,n,r)}),Yd=(e,t)=>({...Kd(t),apiPath:Er,requestBody:kr(e,t)}),Xd=({tab:e,item:t,caches:n,operations:r,pjcode:i,statusOptions:a,storyOptions:o,agentOptions:s,storyColors:c,storyName:l,overlayStatus:u,now:d,initialCommentDraft:f,onCommentDraftChange:p,onQueueAction:m,onCommentError:h,onDeleteStory:g,storyNameForDeletion:_,storyEntries:v,onCreateIssueFromComment:b})=>{let S=Bd(n,t,e),C=(0,y.useCallback)(e=>Ai(e,t.url),[t.url]),w=(0,y.useCallback)((e,t)=>(0,x.jsx)(Gd,{cache:n.state,href:e,fallbackText:t}),[n.state]),T=t.isPr||t.relatedOpenPullRequestUrls.length>0||S.relatedPullRequests.length>0,[ee,E]=(0,y.useState)([]),D=(0,y.useCallback)(async(e,t,n,r)=>{E(i=>[...i,{path:e,line:t,side:n,body:r}])},[]),[O,te]=(0,y.useState)([]),k=(0,y.useCallback)(async e=>{let n=await r.addComment(t,e);return te(e=>[...e,n]),n},[t,r]),ne={onReview:e=>{let n=t.isPr?t.url:S.relatedPullRequests[0]?.pullRequest.url??t.relatedOpenPullRequestUrls[0]??t.url,a=e===`request_changes`?ee:[];m({kind:{type:`review`,action:e},item:t,commit:()=>r.reviewPullRequest(t,n,e,a),offline:i==null?void 0:qd(i,t,n,e,a),overlayPatch:{done:!0}})},onSetNextActionDate:e=>{m({kind:{type:`next_action_date`,action:e},item:t,commit:()=>r.setNextActionDate(t,e),offline:i==null?void 0:Jd(i,t,e),overlayPatch:{done:!0}})},onSetStory:e=>{m({kind:{type:`set_story`,optionName:e.name},item:t,commit:()=>r.setStory(t,e),offline:i==null?void 0:Jd(i,t,`set_story`,{storyOptionId:e.id}),overlayPatch:{done:!0,story:{name:e.name,color:e.color}}})},onSetAgent:e=>{m({kind:{type:`set_agent`,optionName:e.name},item:t,commit:()=>r.setAgent(t,e),offline:i==null?void 0:Jd(i,t,`set_agent`,{agentOptionId:e.id}),overlayPatch:{done:!0}})},onSetStatus:e=>{m({kind:{type:`set_status`,optionName:e.name},item:t,commit:()=>r.setStatus(t,e),offline:i==null?void 0:Jd(i,t,`set_status`,{statusName:e.name}),overlayPatch:{done:!0,status:{name:e.name,color:e.color}}})},onSetInTmuxByHuman:e=>{m({kind:{type:`set_in_tmux_by_human`,optionName:e.name},item:t,commit:()=>r.setInTmuxByHuman(t,e),offline:i==null?void 0:Yd(i,t),overlayPatch:{done:!0,status:{name:e.name,color:e.color}}})},onClose:e=>{m({kind:{type:`close`,action:e},item:t,commit:()=>r.closeIssue(t,e),offline:i==null?void 0:Jd(i,t,e),overlayPatch:{done:!0}})},onOkAndAwaitingWorkspace:e=>{m({kind:{type:`ok_and_awaiting_workspace`},item:t,commit:()=>r.okAndMoveToAwaitingWorkspace(t,e),overlayPatch:{done:!0,status:{name:e.name,color:e.color}}})},onDeleteAllComments:()=>{m({kind:{type:`delete_all_comments`},item:t,commit:()=>r.deleteAllComments(t)})},onDeleteStory:g??null,onSetDependedIssueUrl:i==null?null:async e=>{await r.setDependedIssueUrl(t,e)}},A=(0,y.useCallback)(async e=>{await r.issueRename(t,e)},[t,r]),j=a.find(e=>e.name===`Awaiting Workspace`)??null,M=j===null?void 0:async e=>{p?.(``),ne.onSetStatus(j);try{return await k(e)}catch(e){throw h===void 0?console.error(`Failed to post comment`,e):h(`Failed to post comment`,String(e)),e}},N=(0,y.useRef)(``),[re,ie]=(0,y.useState)((f??``).trim().length===0),ae=(0,y.useCallback)(e=>{N.current=e,ie(e.trim().length===0),p?.(e)},[p]),P=async e=>{await k(e),ne.onClose(`close`)},oe=async()=>{let e=N.current.trim();e.length!==0&&await P(e)},se=async()=>{await P(`ok`)},ce=l??(t.story.trim()===``?null:t.story),le=ce===null?null:I(c,ce);return(0,x.jsx)(yd,{item:t,storyName:ce,storyColorEnum:le,overlayStatus:u,statusOptions:a,state:S.state,stateError:S.stateError,body:S.body,bodyIsLoading:S.bodyIsLoading,bodyError:S.bodyError,comments:Hd(S.comments,O),commentsAreLoading:S.commentsAreLoading,commentsError:S.commentsError,files:S.files,filesAreLoading:S.filesAreLoading,filesError:S.filesError,commits:S.commits,commitsAreLoading:S.commitsAreLoading,commitsError:S.commitsError,pullRequestStatus:S.pullRequestStatus,pullRequestStatusError:S.pullRequestStatusError,relatedPullRequests:S.relatedPullRequests,relatedPullRequestsError:S.relatedPullRequestsError,now:d,buildImageProxyUrl:C,renderReferenceLink:w,onAddInlineComment:D,onTitleRename:A,storyEntries:v,agentOptions:s,onCreateIssueFromComment:b,commentComposer:(0,x.jsx)(Ci,{initiallyOpen:!0,initialDraft:f,onSubmit:k,onDraftChange:ae,onOkAndAwaitingWorkspace:j===null?void 0:()=>ne.onOkAndAwaitingWorkspace(j),onSubmitAndMoveToAwaitingWorkspace:M,onUploadFile:e=>r.uploadAttachment(t,e)}),operationBar:(0,x.jsx)(Md,{tab:e,item:t,hasPullRequest:T,rejectEnabled:ee.length>0,statusOptions:a,storyOptions:o,currentStoryName:ce,agentOptions:s,currentAgentName:t.agent,handlers:ne,storyNameForDeletion:_,onCommentAndClose:oe,onOkAndClose:se,isDraftEmpty:re})})},Zd=()=>{let e={};for(let t of j)e[t.name]=0;return e},Qd=`console`,$d=async(e,t,{title:n,storyName:r,agentOptionId:i,body:a,files:o})=>{let s=await Xt({pjcode:e,title:n,storyName:r??``,nameWithOwner:t,agentOptionId:i??null,body:a??null});if(o.length>0){let t=await Bt({pjcode:e,url:s,body:(await Promise.all(o.map(async t=>{let n=Ht(new Uint8Array(await t.arrayBuffer()));return H({pjcode:e,url:s,fileName:t.name,contentBase64:n})}))).join(`
91
+ `)[0],cd=({commits:e,isLoading:t,error:n,now:r})=>n===null?t?(0,x.jsx)(`p`,{className:`console-commits-loading`,children:`Loading commits...`}):e.length===0?(0,x.jsx)(`p`,{className:`console-commits-empty`,children:`No commits.`}):(0,x.jsx)(`ul`,{className:`console-commits`,children:e.map(e=>(0,x.jsxs)(`li`,{className:`console-commit`,children:[(0,x.jsx)(`span`,{className:`console-commit-message`,children:sd(e.message)}),(0,x.jsx)(`span`,{className:`console-commit-sha`,children:od(e.sha)}),(0,x.jsx)(`span`,{className:`console-commit-author`,children:e.author}),(0,x.jsx)(`span`,{className:`console-commit-time`,children:k(e.authoredAt,r)})]},e.sha))}):(0,x.jsx)(`p`,{className:`console-commits-notloaded`,children:`Not loaded.`}),ld=({url:e,label:t=`Copy URL`})=>(0,x.jsx)(gu,{value:e,idleText:`Copy URL`,idleAriaLabel:t,copiedAriaLabel:`URL copied to clipboard`,className:`console-copy-url-button`}),ud=e=>{let t=new Map;for(let n of e){let e=t.get(n.message);if(e===void 0){t.set(n.message,[n.section]);continue}e.push(n.section)}return Array.from(t,([e,t])=>({message:e,sections:t}))},dd=e=>e.length<=1?e.join(``):`${e.slice(0,-1).join(`, `)} and ${e[e.length-1]}`,fd=({failures:e})=>e.length===0?null:(0,x.jsx)(`div`,{role:`alert`,className:`console-detail-fetch-error`,children:ud(e).map(e=>(0,x.jsxs)(`p`,{className:`console-detail-fetch-error-line`,children:[`Failed to load `,dd(e.sections),`:`,` `,e.message]},e.message))}),pd=({title:e,onTitleRename:t})=>{let[n,r]=(0,y.useState)(e),[i,a]=(0,y.useState)(!1),[o,s]=(0,y.useState)(e),[c,l]=(0,y.useState)(!1),[u,d]=(0,y.useState)(null),f=(0,y.useRef)(e);(0,y.useEffect)(()=>{let t=e!==f.current;f.current=e,!i&&t&&r(e)},[e,i]);let p=()=>{s(n),d(null),a(!0)},m=()=>{a(!1),d(null)},h=async()=>{let e=o.trim();if(e===``||e===n){a(!1);return}l(!0),d(null);try{await t(e),r(e),a(!1)}catch(e){d(e instanceof Error?e.message:`Failed to rename`)}finally{l(!1)}};return i?(0,x.jsxs)(`span`,{className:`console-detail-title-text console-detail-title-text--editing`,children:[(0,x.jsx)(`input`,{type:`text`,value:o,onChange:e=>s(e.target.value),onKeyDown:e=>{e.key===`Enter`?h():e.key===`Escape`&&m()},disabled:c,className:`console-detail-title-input`,"aria-label":`Edit title`}),(0,x.jsx)(`button`,{type:`button`,onClick:()=>void h(),disabled:c,className:`console-detail-title-save`,children:`Save`}),(0,x.jsx)(`button`,{type:`button`,onClick:m,disabled:c,className:`console-detail-title-cancel`,children:`Cancel`}),u!==null&&(0,x.jsx)(`span`,{className:`console-detail-title-error`,role:`alert`,children:u})]}):(0,x.jsxs)(`span`,{className:`console-detail-title-text`,children:[n,(0,x.jsx)(`button`,{type:`button`,onClick:p,className:`console-detail-title-edit`,"aria-label":`Edit title`,children:`Edit`})]})},md={MERGEABLE:{color:`GREEN`,label:`No conflict`,title:`This pull request has no merge conflicts`,modifier:`console-detail-mergeable-chip-ok`},CONFLICTING:{color:`RED`,label:`Conflict`,title:`This pull request has merge conflicts`,modifier:`console-detail-mergeable-chip-conflict`},UNKNOWN:{color:`GRAY`,label:`Checking merge status`,title:`GitHub has not finished computing the merge status yet`,modifier:`console-detail-mergeable-chip-unknown`}},hd=({mergeableStatus:e})=>{let t=md[e],n=ue(t.color);return(0,x.jsx)(`span`,{className:`console-detail-status-chip console-detail-mergeable-chip ${t.modifier}`,style:{color:n.fg,borderColor:n.border,backgroundColor:n.bg},title:t.title,children:t.label})},gd=e=>{let t=ue(e);return{color:t.fg,borderColor:t.border,backgroundColor:t.bg}},_d=({isPassedAllCiJob:e,isCiStateSuccess:t,isBranchOutOfDate:n,missingRequiredCheckNames:r})=>{let i=e&&t,a=i?`GREEN`:`RED`,o=i?`CI passing`:`CI failing`,s=!i&&r.length>0?`missing: ${r.join(`, `)}`:null;return(0,x.jsxs)(`span`,{className:`console-detail-pr-status`,children:[(0,x.jsxs)(`span`,{className:`console-detail-status-chip console-detail-ci-chip`,style:gd(a),title:s??o,children:[o,s!==null&&(0,x.jsxs)(`span`,{className:`console-detail-ci-missing`,children:[` `,`(`,s,`)`]})]}),n&&(0,x.jsx)(`span`,{className:`console-detail-status-chip console-detail-outofdate-chip`,style:gd(`YELLOW`),title:`This branch is out of date with the base branch`,children:`Out of date`})]})},vd=({pullRequest:e,body:t,bodyIsLoading:n,files:r,filesAreLoading:i,filesError:a,commits:o,commitsAreLoading:s,commitsError:c,now:l,buildImageProxyUrl:u,renderReferenceLink:d,onAddInlineComment:f})=>{let p=e.summary,m=Ti(e.url),h=m===null?void 0:{owner:m.owner,repo:m.repo},g=i||a!==null?null:r.length,_=s||c!==null?null:o.length;return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(`div`,{className:`console-pr-header`,children:[(0,x.jsx)(`a`,{href:e.url,className:`console-pr-section-title`,target:`_blank`,rel:`noopener noreferrer`,children:p?.title??e.url}),e.isDraft&&(0,x.jsx)(`span`,{className:`console-pr-section-state`,children:`draft`}),(0,x.jsx)(hd,{mergeableStatus:e.mergeableStatus}),(0,x.jsx)(_d,{isPassedAllCiJob:e.isPassedAllCiJob,isCiStateSuccess:e.isCiStateSuccess,isBranchOutOfDate:e.isBranchOutOfDate,missingRequiredCheckNames:e.missingRequiredCheckNames}),(0,x.jsx)(`a`,{href:e.url,className:`console-panel-open-link`,target:`_blank`,rel:`noopener noreferrer`,children:`open`}),(0,x.jsx)(ld,{url:e.url,label:`Copy PR URL`}),(0,x.jsxs)(`div`,{className:`console-pr-statbar`,children:[m!==null&&(0,x.jsxs)(`span`,{className:`console-pr-repo`,children:[m.owner,`/`,m.repo]}),e.branchName!==null&&(0,x.jsx)(`span`,{className:`console-pr-branch`,children:e.branchName}),p!==null&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(`span`,{className:`console-pr-add`,children:[`+`,p.additions]}),(0,x.jsxs)(`span`,{className:`console-pr-del`,children:[`-`,p.deletions]}),(0,x.jsxs)(`span`,{className:`console-pr-files-count`,children:[p.changedFiles,` files`]})]})]})]}),(0,x.jsx)(Ru,{title:`Description`,children:n?(0,x.jsx)(`p`,{className:`console-pr-body-loading`,children:`Loading description...`}):(0,x.jsx)(Lu,{body:p?.body??t,buildImageProxyUrl:u,renderReferenceLink:d,repoContext:h})}),(0,x.jsx)(Ru,{title:`Changed files`,count:g,children:(0,x.jsx)(ed,{files:r,isLoading:i,error:a,buildImageProxyUrl:u,onAddInlineComment:f})}),(0,x.jsx)(Ru,{title:`Commits`,count:_,defaultCollapsed:!0,children:(0,x.jsx)(cd,{commits:o,isLoading:s,error:c,now:l})})]})},yd=({item:e,storyName:t,storyColorEnum:n,overlayStatus:r,statusOptions:i,state:a,body:o,bodyIsLoading:s,bodyError:c,comments:l,commentsAreLoading:u,commentsError:d,files:f,filesAreLoading:p,filesError:m,commits:h,commitsAreLoading:g,commitsError:_,stateError:v,pullRequestStatus:y,pullRequestStatusError:b,relatedPullRequests:S,relatedPullRequestsError:C,now:w,commentComposer:T,operationBar:ee,buildImageProxyUrl:E,renderReferenceLink:D,onAddInlineComment:O,onTitleRename:te,storyEntries:ne,agentOptions:j,onCreateIssueFromComment:M})=>{let N=a?.state??`open`,re=a?.merged??!1,ie=!e.isPr&&N===`closed`?`Closed`:null,ae=Ei(e.nameWithOwner)??void 0,P=ue(n),oe=r===null?e.status===null?null:{name:e.status,color:i.find(t=>t.name===e.status)?.color??`GRAY`}:r,se=oe===null?null:ue(oe.color),ce=p||m!==null?null:f.length,le=u||d!==null?null:l.length,F=g||_!==null?null:h.length,de=!u&&d===null&&l.length>0,fe=e=>{let t=Ti(e);return t===null?e:`PR #${t.number}`},pe=[{section:`item state`,message:v},{section:`pull request status`,message:e.isPr?b:null},{section:`description`,message:c},{section:`comments`,message:d},{section:`changed files`,message:e.isPr?m:null},{section:`commits`,message:e.isPr?_:null},{section:`related pull requests`,message:e.isPr?null:C},...S.flatMap(e=>[{section:`changed files of ${fe(e.pullRequest.url)}`,message:e.filesError},{section:`commits of ${fe(e.pullRequest.url)}`,message:e.commitsError}])].flatMap(e=>e.message===null?[]:[{section:e.section,message:e.message}]),I=e.isPr&&y?.found?[{url:e.url,mergeableStatus:y.mergeableStatus}]:[];return(0,x.jsxs)(`article`,{className:`console-detail`,children:[(0,x.jsxs)(`div`,{className:`console-detail-header`,children:[(0,x.jsxs)(`h2`,{className:`console-detail-title`,children:[(0,x.jsx)(Ee,{isPr:e.isPr,state:N,merged:re,isDraft:!1,stateReason:``}),te==null?(0,x.jsx)(`span`,{className:`console-detail-title-text`,children:e.title}):(0,x.jsx)(pd,{title:e.title,onTitleRename:te}),(0,x.jsx)(`span`,{className:`console-detail-number`,children:e.isPr?`PR #${e.number}`:`#${e.number}`})]}),(0,x.jsxs)(`div`,{className:`console-detail-topline`,children:[oe!==null&&se!==null&&(0,x.jsx)(`span`,{className:`console-detail-status-chip`,style:{color:se.fg,borderColor:se.border,backgroundColor:se.bg},children:oe.name}),e.agent!==null&&e.agent!==``&&(0,x.jsx)(`span`,{className:`console-detail-agent-chip`,children:e.agent}),t!==null&&(0,x.jsxs)(`span`,{className:`console-storytag`,children:[(0,x.jsx)(`span`,{className:`console-story-dot`,style:{backgroundColor:P.dot}}),t]}),e.isPr&&y?.found&&(0,x.jsx)(_d,{isPassedAllCiJob:y.isPassedAllCiJob,isCiStateSuccess:y.isCiStateSuccess,isBranchOutOfDate:y.isBranchOutOfDate,missingRequiredCheckNames:y.missingRequiredCheckNames}),!e.isPr&&S.map(e=>(0,x.jsxs)(`span`,{className:`console-related-pr-group`,children:[S.length>1&&(0,x.jsx)(`span`,{className:`console-related-pr-label`,children:fe(e.pullRequest.url)}),(0,x.jsx)(_d,{isPassedAllCiJob:e.pullRequest.isPassedAllCiJob,isCiStateSuccess:e.pullRequest.isCiStateSuccess,isBranchOutOfDate:e.pullRequest.isBranchOutOfDate,missingRequiredCheckNames:e.pullRequest.missingRequiredCheckNames}),(0,x.jsx)(hd,{mergeableStatus:e.pullRequest.mergeableStatus})]},e.pullRequest.url)),I.map(e=>(0,x.jsx)(hd,{mergeableStatus:e.mergeableStatus},e.url)),ie!==null&&(0,x.jsx)(`span`,{className:`console-detail-closed-label`,children:ie})]}),(0,x.jsx)(fd,{failures:pe}),(0,x.jsxs)(`div`,{className:`console-detail-subbar`,children:[(0,x.jsxs)(`a`,{href:e.url,className:`console-detail-link`,target:`_blank`,rel:`noopener noreferrer`,children:[`#`,e.number]}),(0,x.jsx)(`span`,{className:`console-detail-repo`,children:e.repo}),(0,x.jsxs)(`span`,{className:`console-detail-createdat`,title:A(e.createdAt),children:[`opened `,k(e.createdAt,w)]}),(0,x.jsx)(ld,{url:e.url}),e.labels.map(e=>(0,x.jsx)(`span`,{className:`console-label-chip`,children:e},e))]})]}),(0,x.jsxs)(`div`,{className:`console-detail-body`,children:[(0,x.jsx)(Ru,{title:`Description`,defaultCollapsed:de,headerAction:(0,x.jsx)(`a`,{href:e.url,className:`console-panel-open-link`,target:`_blank`,rel:`noopener noreferrer`,children:`open`}),children:c===null?s?(0,x.jsx)(`p`,{className:`console-detail-body-loading`,children:`Loading description...`}):(0,x.jsx)(Lu,{body:o,buildImageProxyUrl:E,renderReferenceLink:D,repoContext:ae}):(0,x.jsx)(`p`,{className:`console-detail-body-notloaded`,children:`Not loaded.`})},de?`desc-collapsed`:`desc-open`),e.isPr&&(0,x.jsx)(Ru,{title:`Changed files`,count:ce,children:(0,x.jsx)(ed,{files:f,isLoading:p,error:m,onAddInlineComment:O})}),(0,x.jsx)(Ru,{title:`Comments`,count:le,children:(0,x.jsx)(ad,{comments:l,isLoading:u,error:d,now:w,buildImageProxyUrl:E,renderReferenceLink:D,repoContext:ae,persistenceKey:e.url,issueTitle:e.title,storyEntries:ne,agentOptions:j,onCreateIssueFromComment:M})}),e.isPr&&(0,x.jsx)(Ru,{title:`Commits`,count:F,defaultCollapsed:!0,children:(0,x.jsx)(cd,{commits:h,isLoading:g,error:_,now:w})}),!e.isPr&&S.map(e=>(0,x.jsx)(vd,{pullRequest:e.pullRequest,body:e.pullRequest.summary?.body??``,bodyIsLoading:!1,files:e.files,filesAreLoading:e.filesAreLoading,filesError:e.filesError,commits:e.commits,commitsAreLoading:e.commitsAreLoading,commitsError:e.commitsError,now:w,buildImageProxyUrl:E,renderReferenceLink:D,onAddInlineComment:O},e.pullRequest.url))]}),(0,x.jsxs)(`div`,{className:`console-detail-dock`,children:[(0,x.jsx)(`div`,{className:`console-detail-dock-composer`,children:T}),(0,x.jsx)(`div`,{className:`console-actionbar`,children:ee})]})]})},bd=({className:e,ariaLabel:t,placeholder:n,currentOption:r,options:i,onSelect:a})=>{let o=(0,y.useRef)({ready:!1,currentOptionId:r?.id??null});return(0,y.useLayoutEffect)(()=>{o.current.ready=!0,o.current.currentOptionId=r?.id??null}),(0,x.jsxs)(`select`,{className:e,defaultValue:r?.id??``,onChange:e=>{if(!o.current.ready||e.target.value===(o.current.currentOptionId??``))return;let t=i.find(t=>t.id===e.target.value);t!==void 0&&a(t)},"aria-label":t,children:[(0,x.jsx)(`option`,{value:``,children:n}),i.map(e=>(0,x.jsx)(`option`,{value:e.id,children:e.name},e.id))]})},xd=({agentOptions:e,currentAgentName:t,onSetAgent:n})=>{if(e.length===0)return null;let r=t===null?null:e.find(e=>e.name===t)??null;return(0,x.jsx)(`div`,{className:`console-op-group`,children:(0,x.jsx)(bd,{className:`console-agent-select`,ariaLabel:`Set agent`,placeholder:`— agent —`,currentOption:r,options:e,onSelect:n},r?.id??`none`)})},Sd=({onClose:e,onCommentAndClose:t,onOkAndClose:n,isDraftEmpty:r})=>{let[i,a]=(0,y.useState)(!1),[o,s]=(0,y.useState)(null),c=async e=>{if(!(e===void 0||i)){a(!0),s(null);try{await e()}catch(e){s(e instanceof Error?e.message:`failed to post`)}finally{a(!1)}}};return(0,x.jsxs)(`div`,{className:`console-op-group`,children:[(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,onClick:()=>e(`close_not_planned`),children:`Close as not planned`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,onClick:()=>e(`close`),children:`Close`}),n!==void 0&&(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,disabled:i,onClick:()=>{c(n)},children:`OK & Close`}),t!==void 0&&(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,disabled:i||r===!0,onClick:()=>{c(t)},children:`Comment & Close`}),o!==null&&(0,x.jsx)(`span`,{role:`alert`,className:`console-op-comment-close-error`,children:o})]})},Cd=({onDeleteAllComments:e,onDeleteStory:t,storyNameForDeletion:n})=>{let[r,i]=(0,y.useState)(!1),[a,o]=(0,y.useState)(!1),[s,c]=(0,y.useState)(!1),[l,u]=(0,y.useState)(null),d=()=>{e(),i(!1)},f=()=>{o(!0),u(null)},p=async e=>{if(t){c(!0),u(null);try{await t(e)}catch(e){u(e instanceof Error?e.message:String(e)),c(!1)}}};return(0,x.jsxs)(`div`,{className:`console-op-group`,children:[(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-danger`,onClick:()=>i(e=>!e),children:`⚠`}),r&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-danger`,onClick:d,children:`Delete All Comments`}),t!=null&&(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-danger`,onClick:f,disabled:a,children:`Delete Story`})]}),a&&(0,x.jsxs)(`div`,{className:`console-story-delete-confirm`,role:`dialog`,"aria-modal":`true`,"aria-label":`Confirm story deletion`,children:[(0,x.jsxs)(`p`,{className:`console-story-delete-confirm-message`,children:[`Delete story option "`,n,`" from the GitHub custom field?`]}),l!==null&&(0,x.jsx)(`p`,{role:`alert`,className:`console-list-error`,children:l}),(0,x.jsxs)(`div`,{className:`console-story-delete-confirm-actions`,children:[(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-danger`,onClick:()=>void p(!0),disabled:s,children:s?`Deleting…`:`Delete with child tasks`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-danger`,onClick:()=>void p(!1),disabled:s,children:s?`Deleting…`:`Keep child tasks`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,onClick:()=>{o(!1),u(null)},disabled:s,children:`Cancel`})]})]})]})},wd=({isManualTriage:e,onSetNextActionDate:t})=>(0,x.jsxs)(`div`,{className:`console-op-group`,children:[(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-snooze`,onClick:()=>t(`snooze_1hour`),children:`+1h`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-snooze`,onClick:()=>t(`snooze_3hours`),children:`+3h`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-snooze`,onClick:()=>t(`snooze_6hours`),children:`+6h`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-snooze`,onClick:()=>t(`snooze_1day`),children:`+1d`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-snooze`,onClick:()=>t(`snooze_2days`),children:`+2d`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-snooze`,onClick:()=>t(`snooze_3days`),children:`+3d`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-snooze`,onClick:()=>t(`snooze_5days`),children:`+5d`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-snooze`,onClick:()=>t(`snooze_1week`),children:e?`+1w skip`:`+1w`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-snooze`,onClick:()=>t(`snooze_1month`),children:`+1mo`})]}),Td=[{action:`unnecessary`,label:`Unnecessary`,variant:`unneeded`},{action:`totally_wrong`,label:`Totally wrong`,variant:`wrong`},{action:`request_changes`,label:`Reject`,variant:`reject`},{action:`approve_and_merge`,label:`Approve & Merge`,variant:`approve`}],Ed=`Reject needs an inline comment on the diff.`,Dd=({onReview:e,rejectEnabled:t})=>(0,x.jsxs)(`div`,{className:`console-op-group console-op-group-review`,children:[!t&&(0,x.jsx)(`p`,{className:`console-op-requirement`,children:Ed}),Td.map(n=>{let r=n.action===`request_changes`&&!t;return(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-${n.variant}`,disabled:r,onClick:()=>e(n.action),children:n.label},n.action)})]}),Od=({onSetDependedIssueUrl:e})=>{let[t,n]=(0,y.useState)(!1),[r,i]=(0,y.useState)(``),[a,o]=(0,y.useState)(!1),[s,c]=(0,y.useState)(null);return(0,x.jsxs)(`div`,{className:`console-op-group console-op-group-rare-actions`,children:[(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,onClick:()=>{n(e=>!e),c(null)},title:`Rare actions`,children:`⋯`}),t&&e!==null&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(`input`,{type:`url`,className:`console-settings-modal-input`,placeholder:`Depended issue URL`,value:r,onChange:e=>i(e.target.value),disabled:a}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,onClick:async()=>{if(e!==null&&r.trim()!==``){o(!0),c(null);try{await e(r.trim()),i(``),n(!1)}catch(e){c(e instanceof Error?e.message:`Failed to set depended issue URL`)}finally{o(!1)}}},disabled:a||r.trim()===``,children:a?`...`:`Set Depended Issue`})]}),s!==null&&(0,x.jsx)(`p`,{className:`console-settings-modal-error`,children:s})]})},kd=(e,t)=>{let n=t.toLowerCase();return e.find(e=>e.name.toLowerCase()===n)??null},Ad=({statusOptions:e,onSetStatus:t,onSetInTmuxByHuman:n})=>{let r=xe.map(t=>({name:t,option:kd(e,t)})).filter(e=>e.option!==null);return r.length===0?null:(0,x.jsx)(`div`,{className:`console-op-group`,children:r.map(({name:e,option:r})=>{let i=ue(r.color),a=e===ye;return(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,style:{color:i.fg,borderColor:i.border,backgroundColor:i.bg},onClick:()=>a?n(r):t(r),children:r.name},r.id)})})},jd=({storyOptions:e,currentStoryName:t,onSetStory:n})=>{if(e.length===0)return null;let r=t===null?null:e.find(e=>e.name===t)??null;return(0,x.jsx)(`div`,{className:`console-op-group`,children:(0,x.jsx)(bd,{className:`console-story-select`,ariaLabel:`Set story`,placeholder:`— story —`,currentOption:r,options:e,onSelect:n},r?.id??`none`)})},Md=({tab:e,hasPullRequest:t,rejectEnabled:n,statusOptions:r,storyOptions:i,currentStoryName:a,agentOptions:o,currentAgentName:s,handlers:c,storyNameForDeletion:l,onCommentAndClose:u,onOkAndClose:d,isDraftEmpty:f})=>{let[p,m]=(0,y.useState)(!1);return(0,x.jsxs)(`div`,{className:`console-operation-bar`,children:[t&&(0,x.jsx)(Dd,{onReview:c.onReview,rejectEnabled:n}),(0,x.jsx)(wd,{isManualTriage:Se(e),onSetNextActionDate:c.onSetNextActionDate}),(0,x.jsx)(Ad,{statusOptions:r,onSetStatus:c.onSetStatus,onSetInTmuxByHuman:c.onSetInTmuxByHuman}),p&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(jd,{storyOptions:i,currentStoryName:a,onSetStory:c.onSetStory}),(0,x.jsx)(xd,{agentOptions:o,currentAgentName:s,onSetAgent:c.onSetAgent})]}),(0,x.jsxs)(`div`,{className:`console-op-group-bottom-row`,children:[(0,x.jsxs)(`div`,{className:`console-op-group-left-pair`,children:[(i.length>0||o.length>0)&&(0,x.jsx)(`div`,{className:`console-op-group`,children:(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,onClick:()=>m(e=>!e),title:`Change agent or story`,children:`⚙`})}),(0,x.jsx)(Od,{onSetDependedIssueUrl:c.onSetDependedIssueUrl}),(0,x.jsx)(Cd,{onDeleteAllComments:c.onDeleteAllComments,onDeleteStory:c.onDeleteStory,storyNameForDeletion:l})]}),(0,x.jsx)(Sd,{onClose:c.onClose,onCommentAndClose:u,onOkAndClose:d,isDraftEmpty:f})]})]})},Nd=(e,t,n,r)=>{let i=t===null?void 0:e.peek(t),[a,o]=(0,y.useState)(i??r),[s,c]=(0,y.useState)(t!==null&&i===void 0),[l,u]=(0,y.useState)(null);return(0,y.useEffect)(()=>{if(t===null||n===null)return;let r=e.peek(t);if(r!==void 0){o(r),c(!1),u(null);return}let i=!1;return c(!0),u(null),e.load(t,n).then(e=>{i||(o(e),c(!1))}).catch(e=>{i||(u(e instanceof Error?e.message:String(e)),c(!1))}),()=>{i=!0}},[e,t,n]),{data:a,isLoading:s,error:l}},Pd=[],Fd=[],Id=[],Ld=[],Rd={state:`open`,merged:!1,isPullRequest:!1,title:``},zd={found:!1,isConflicted:!1,mergeableStatus:`UNKNOWN`,isPassedAllCiJob:!1,isCiStateSuccess:!1,isBranchOutOfDate:!1,missingRequiredCheckNames:[]},Bd=(e,t,n)=>{let r=t===null?null:`${t.repo}#${t.number}`,i=t===null?null:t.url,a=t?.isPr??!1,o=Nd(e.body,r,i,``),s=Nd(e.state,r,i,Rd),c=Nd(e.comments,r,i,Pd),l=Nd(e.files,a?r:null,a?i:null,Fd),u=Nd(e.commits,a?r:null,a?i:null,Id),d=Nd(e.prStatus,a?r:null,a?i:null,zd),f=!a&&((t?.relatedOpenPullRequestUrls.length??0)>0||n===`prs`),p=Nd(e.relatedPrs,f?r:null,f?i:null,Ld),[m,h]=(0,y.useState)([]);return(0,y.useEffect)(()=>{if(a||p.data.length===0){h([]);return}let t=!1,n=p.data.map(e=>({pullRequest:e,files:Fd,filesAreLoading:!0,filesError:null,commits:Id,commitsAreLoading:!0,commitsError:null}));h(n);let r=(e,n)=>{t||h(t=>t.map(t=>t.pullRequest.url===e?{...t,...n}:t))};for(let t of p.data){let n=t.url;e.files.load(n,t.url).then(e=>r(t.url,{files:e,filesAreLoading:!1})).catch(e=>r(t.url,{filesAreLoading:!1,filesError:e instanceof Error?e.message:String(e)})),e.commits.load(n,t.url).then(e=>r(t.url,{commits:e,commitsAreLoading:!1})).catch(e=>r(t.url,{commitsAreLoading:!1,commitsError:e instanceof Error?e.message:String(e)}))}return()=>{t=!0}},[e,a,p.data]),{state:s.data,body:o.data,bodyIsLoading:o.isLoading,bodyError:o.error,comments:c.data,commentsAreLoading:c.isLoading,commentsError:c.error,files:l.data,filesAreLoading:l.isLoading,filesError:l.error,commits:u.data,commitsAreLoading:u.isLoading,commitsError:u.error,stateError:s.error,pullRequestStatus:a?d.data:null,pullRequestStatusError:a?d.error:null,relatedPullRequests:m,relatedPullRequestsError:a?null:p.error}},Vd=e=>JSON.stringify([e.author,e.createdAt,e.body]),Hd=(e,t)=>{let n=new Set(e.map(Vd));return[...e,...t.filter(e=>!n.has(Vd(e)))]},Ud=({href:e,fallbackText:t,state:n})=>{if(n===null||n.title.trim()===``)return(0,x.jsx)(`a`,{className:`console-markdown-reference console-markdown-reference-plain`,href:e,target:`_blank`,rel:`noopener noreferrer`,children:t});let r=Ti(e);return(0,x.jsxs)(`a`,{className:`console-markdown-reference`,href:e,target:`_blank`,rel:`noopener noreferrer`,children:[(0,x.jsx)(Ee,{...Di(n)}),(0,x.jsx)(`span`,{className:`console-markdown-reference-title`,children:n.title}),r!==null&&(0,x.jsxs)(`span`,{className:`console-markdown-reference-number`,children:[`#`,r.number]})]})},Wd=(e,t)=>{let[n,r]=(0,y.useState)(()=>e.peek(t)??null);return(0,y.useEffect)(()=>{let n=e.peek(t);if(n!==void 0){r(n);return}let i=!1;return r(null),e.load(t,t).then(e=>{i||r(e)}).catch(()=>{i||r(null)}),()=>{i=!0}},[e,t]),n},Gd=({cache:e,href:t,fallbackText:n})=>{let r=Wd(e,t);return(0,x.jsx)(Ud,{href:t,fallbackText:n,state:r})},Kd=e=>({itemUrl:e.url,projectItemId:e.projectItemId,itemNumber:e.number,repo:e.repo,isPr:e.isPr}),qd=(e,t,n,r,i)=>({...Kd(t),apiPath:wr,requestBody:Dr(e,t,n,r,i)}),Jd=(e,t,n,r)=>({...Kd(t),apiPath:Tr,requestBody:Or(e,t,n,r)}),Yd=(e,t)=>({...Kd(t),apiPath:Er,requestBody:kr(e,t)}),Xd=({tab:e,item:t,caches:n,operations:r,pjcode:i,statusOptions:a,storyOptions:o,agentOptions:s,storyColors:c,storyName:l,overlayStatus:u,now:d,initialCommentDraft:f,onCommentDraftChange:p,onQueueAction:m,onCommentError:h,onDeleteStory:g,storyNameForDeletion:_,storyEntries:v,onCreateIssueFromComment:b})=>{let S=Bd(n,t,e),C=(0,y.useCallback)(e=>Ai(e,t.url),[t.url]),w=(0,y.useCallback)((e,t)=>(0,x.jsx)(Gd,{cache:n.state,href:e,fallbackText:t}),[n.state]),T=t.isPr||t.relatedOpenPullRequestUrls.length>0||S.relatedPullRequests.length>0,[ee,E]=(0,y.useState)([]),D=(0,y.useCallback)(async(e,t,n,r)=>{E(i=>[...i,{path:e,line:t,side:n,body:r}])},[]),[O,te]=(0,y.useState)([]),k=(0,y.useCallback)(async e=>{let n=await r.addComment(t,e);return te(e=>[...e,n]),n},[t,r]),ne={onReview:e=>{let n=t.isPr?t.url:S.relatedPullRequests[0]?.pullRequest.url??t.relatedOpenPullRequestUrls[0]??t.url,a=e===`request_changes`?ee:[];m({kind:{type:`review`,action:e},item:t,commit:()=>r.reviewPullRequest(t,n,e,a),offline:i==null?void 0:qd(i,t,n,e,a),overlayPatch:{done:!0}})},onSetNextActionDate:e=>{m({kind:{type:`next_action_date`,action:e},item:t,commit:()=>r.setNextActionDate(t,e),offline:i==null?void 0:Jd(i,t,e),overlayPatch:{done:!0}})},onSetStory:e=>{m({kind:{type:`set_story`,optionName:e.name},item:t,commit:()=>r.setStory(t,e),offline:i==null?void 0:Jd(i,t,`set_story`,{storyOptionId:e.id}),overlayPatch:{done:!0,story:{name:e.name,color:e.color}}})},onSetAgent:e=>{m({kind:{type:`set_agent`,optionName:e.name},item:t,commit:()=>r.setAgent(t,e),offline:i==null?void 0:Jd(i,t,`set_agent`,{agentOptionId:e.id}),overlayPatch:{done:!0}})},onSetStatus:e=>{m({kind:{type:`set_status`,optionName:e.name},item:t,commit:()=>r.setStatus(t,e),offline:i==null?void 0:Jd(i,t,`set_status`,{statusName:e.name}),overlayPatch:{done:!0,status:{name:e.name,color:e.color}}})},onSetInTmuxByHuman:e=>{m({kind:{type:`set_in_tmux_by_human`,optionName:e.name},item:t,commit:()=>r.setInTmuxByHuman(t,e),offline:i==null?void 0:Yd(i,t),overlayPatch:{done:!0,status:{name:e.name,color:e.color}}})},onClose:e=>{m({kind:{type:`close`,action:e},item:t,commit:()=>r.closeIssue(t,e),offline:i==null?void 0:Jd(i,t,e),overlayPatch:{done:!0}})},onOkAndAwaitingWorkspace:e=>{m({kind:{type:`ok_and_awaiting_workspace`},item:t,commit:()=>r.okAndMoveToAwaitingWorkspace(t,e),overlayPatch:{done:!0,status:{name:e.name,color:e.color}}})},onDeleteAllComments:()=>{m({kind:{type:`delete_all_comments`},item:t,commit:()=>r.deleteAllComments(t)})},onDeleteStory:g??null,onSetDependedIssueUrl:i==null?null:async e=>{await r.setDependedIssueUrl(t,e)}},A=(0,y.useCallback)(async e=>{await r.issueRename(t,e)},[t,r]),j=a.find(e=>e.name===`Awaiting Workspace`)??null,M=j===null?void 0:async e=>{p?.(``),ne.onSetStatus(j);try{return await k(e)}catch(e){throw h===void 0?console.error(`Failed to post comment`,e):h(`Failed to post comment`,String(e)),e}},N=(0,y.useRef)(``),[re,ie]=(0,y.useState)((f??``).trim().length===0),ae=(0,y.useCallback)(e=>{N.current=e,ie(e.trim().length===0),p?.(e)},[p]),P=async e=>{await k(e),ne.onClose(`close`)},oe=async()=>{let e=N.current.trim();e.length!==0&&await P(e)},se=async()=>{m({kind:{type:`ok_and_close`},item:t,commit:async()=>{await r.addComment(t,`ok`),await r.closeIssue(t,`close`)},offline:i==null?void 0:Jd(i,t,`close`),overlayPatch:{done:!0}})},ce=l??(t.story.trim()===``?null:t.story),le=ce===null?null:I(c,ce);return(0,x.jsx)(yd,{item:t,storyName:ce,storyColorEnum:le,overlayStatus:u,statusOptions:a,state:S.state,stateError:S.stateError,body:S.body,bodyIsLoading:S.bodyIsLoading,bodyError:S.bodyError,comments:Hd(S.comments,O),commentsAreLoading:S.commentsAreLoading,commentsError:S.commentsError,files:S.files,filesAreLoading:S.filesAreLoading,filesError:S.filesError,commits:S.commits,commitsAreLoading:S.commitsAreLoading,commitsError:S.commitsError,pullRequestStatus:S.pullRequestStatus,pullRequestStatusError:S.pullRequestStatusError,relatedPullRequests:S.relatedPullRequests,relatedPullRequestsError:S.relatedPullRequestsError,now:d,buildImageProxyUrl:C,renderReferenceLink:w,onAddInlineComment:D,onTitleRename:A,storyEntries:v,agentOptions:s,onCreateIssueFromComment:b,commentComposer:(0,x.jsx)(Ci,{initiallyOpen:!0,initialDraft:f,onSubmit:k,onDraftChange:ae,onOkAndAwaitingWorkspace:j===null?void 0:()=>ne.onOkAndAwaitingWorkspace(j),onSubmitAndMoveToAwaitingWorkspace:M,onUploadFile:e=>r.uploadAttachment(t,e)}),operationBar:(0,x.jsx)(Md,{tab:e,item:t,hasPullRequest:T,rejectEnabled:ee.length>0,statusOptions:a,storyOptions:o,currentStoryName:ce,agentOptions:s,currentAgentName:t.agent,handlers:ne,storyNameForDeletion:_,onCommentAndClose:oe,onOkAndClose:se,isDraftEmpty:re})})},Zd=()=>{let e={};for(let t of j)e[t.name]=0;return e},Qd=`console`,$d=async(e,t,{title:n,storyName:r,agentOptionId:i,body:a,files:o})=>{let s=await Xt({pjcode:e,title:n,storyName:r??``,nameWithOwner:t,agentOptionId:i??null,body:a??null});if(o.length>0){let t=await Bt({pjcode:e,url:s,body:(await Promise.all(o.map(async t=>{let n=Ht(new Uint8Array(await t.arrayBuffer()));return H({pjcode:e,url:s,fileName:t.name,contentBase64:n})}))).join(`
92
92
 
93
93
  `)});if(!t.posted)throw Error(t.error)}},ef=()=>{let e=qr(),t=gr(),n=bt(),r=n.status===`on`?n.snapshot:null,{snapshots:i,isLoading:a,error:o,refreshSingleTab:s}=nr(e,r),{timerMode:c,projectMinutes:l,isOpen:u,draftTimerMode:d,draftProjectMinutes:f,openSettings:p,closeSettings:m,saveSettings:h,toggleDraftTimerMode:g,changeDraftMinutes:_}=hi(),{pjcodes:v,projectUrls:b,fleetTaskCreateUrl:C,nameWithOwnerByPjcode:w,isLoading:ee}=Jr(),{isTimerExpired:E}=Qr(e),D=Gr(e??Qd),O=Zr(v),te=(0,y.useMemo)(()=>Vr(D.overlay,i),[D.overlay,i]),k=(0,y.useMemo)(()=>{let e=Zd();for(let t of j){let n=i[t.name];n!==null&&(t.name===`stories`?e[t.name]=n.stories.filter(e=>e.color!==`GRAY`).length:e[t.name]=Ir(n.items,te,t.name))}return e},[i,te]),ne=Cr(e,k,(0,y.useMemo)(()=>{let e=new Set;for(let t of j){let n=i[t.name];n!==null&&!n.fromCache&&e.add(t.name)}return e},[i]),(0,y.useMemo)(()=>{let e=Zd();for(let t of j){let n=i[t.name];n!==null&&(e[t.name]=t.name===`stories`?n.stories.filter(e=>e.color!==`GRAY`).length:n.items.length)}return e},[i])),{activeTab:A,selectedItemKey:M,openItem:N,closeItem:ie}=ne,ae=ui(ne.selectTab),{explicitlySelectedPjcode:P,notifyExplicitSelection:oe}=mr(e),ce=Yr((0,y.useCallback)(e=>{oe(e),fi(`/projects/${e}`)},[oe]));rr(e,A,v,a,c&&r===null);let F=(0,y.useRef)(new Map),ue=(0,y.useCallback)(e=>{M!==null&&(e?F.current.set(M,e):F.current.delete(M))},[M]),de=sr(r),pe=Mr(e,de,(0,y.useCallback)(()=>s(`queued`),[s])),I=Rn(),[R,he]=(0,y.useState)(()=>Date.now());(0,y.useEffect)(()=>{let e=setInterval(()=>{he(Date.now())},1e3);return()=>{clearInterval(e)}},[]);let[ge,_e]=(0,y.useState)(!1),[ve,ye]=(0,y.useState)(!1),[be,xe]=(0,y.useState)({title:``,body:null,storyName:null,agentOptionId:null}),[Se,Ce]=(0,y.useState)({title:``,body:null,storyName:null,agentOptionId:null}),[we,Te]=(0,y.useState)(()=>navigator.onLine);(0,y.useEffect)(()=>{let e=()=>Te(!0),t=()=>Te(!1);return window.addEventListener(`online`,e),window.addEventListener(`offline`,t),()=>{window.removeEventListener(`online`,e),window.removeEventListener(`offline`,t)}},[]);let[Ee,De]=(0,y.useState)(new Map),[Oe,je]=(0,y.useState)(new Map),[Me,Pe]=(0,y.useState)(new Set);(0,y.useEffect)(()=>{if(we&&I.offlineActions.length!==0)for(let e of I.offlineActions)Ee.has(e.id)||Me.has(e.id)||(De(t=>new Map(t).set(e.id,null)),de.client.fetchIssueState(e.itemUrl).then(t=>{De(n=>new Map(n).set(e.id,t)),e.isPr&&(je(t=>new Map(t).set(e.id,null)),de.client.fetchPullRequestStatus(e.itemUrl).then(t=>{je(n=>new Map(n).set(e.id,t))}).catch(e=>{console.warn(`Failed to fetch PR status for offline action:`,e)}))}).catch(t=>{console.warn(`Failed to fetch current state for offline action:`,t),Pe(t=>new Set(t).add(e.id))}))},[we,I.offlineActions,de.client,Ee,Me]);let[Fe,Ie]=(0,y.useState)(!1),Le=(0,y.useCallback)(async e=>{Ie(!0);try{await I.confirmOfflineAction(e)}finally{Ie(!1)}},[I]),Re=(0,y.useMemo)(()=>I.offlineActions.map(e=>{let t=Ee.get(e.id)??null,n=Oe.get(e.id)??null,r=Me.has(e.id);return{id:e.id,message:e.message,color:e.color,itemNumber:e.itemNumber,isPr:e.isPr,currentTitle:r?null:t?.title??null,currentState:r||t===null?null:t.merged?`closed`:t.state,currentPrStatus:n,fetchError:r}}),[I.offlineActions,Ee,Oe,Me]),ze=i[A],Be=(0,y.useMemo)(()=>ze===null?[]:Lr(ze.items,te,A),[ze,te,A]),[Ve,Ue]=(0,y.useState)(null),We=(0,y.useMemo)(()=>{if(A!==`prs`)return{};let e={};for(let t of Be)t.agent!==null&&t.agent!==``&&(e[t.agent]=(e[t.agent]??0)+1);return e},[Be,A]);(0,y.useEffect)(()=>{A===`prs`&&Ve!==null&&(We[Ve]??0)===0&&Ue(null)},[We,Ve,A]);let Ge=(0,y.useMemo)(()=>A!==`prs`||Ve===null?Be:Be.filter(e=>e.agent===Ve),[Be,A,Ve]),Ke=(0,y.useMemo)(()=>Ge.map(e=>Pr(e)),[Ge]),Xe=ze?.storyOrder??[],Ze=(0,y.useMemo)(()=>me(Ge,D.overlay,Xe,ze?.generatedAt??null),[Ge,D.overlay,Xe,ze]),Qe=ze?.storyColors??{},$e=ze?.statusOptions??[],et=ze?.agentOptions??[],tt=ze?.storyOptions??[],nt=ze?.generatedAt??null,rt=ze?.fromCache??!1,[it,z]=(0,y.useState)(null),B=(0,y.useMemo)(()=>M===null||ze===null?null:ze.items.find(e=>e.projectItemId===M)??null,[M,ze]);pr(de,B,Be),(0,y.useEffect)(()=>{M!==null&&window.scrollTo({top:0})},[M]),(0,y.useEffect)(()=>{if(e===null&&c&&v.length>0){let e=se(v,null,l);e!==null&&pi(`/projects/${e}/todo-by-human`)}},[e,c,v,l]),mi(c,k.prs,k[`todo-by-human`],e,v,l,i.prs!==null,i[`todo-by-human`]!==null,i.prs?.fromCache??!1,i[`todo-by-human`]?.fromCache??!1,P),di(c,e,Ge,M,ne.openItem);let at=k[A],ot=(0,y.useRef)({tab:A,count:at});(0,y.useEffect)(()=>{let e=ot.current;if(ot.current={tab:A,count:at},e.tab===A&&e.count>0&&at===0){let e=_r(A,k);e!==null&&(ae(e),ie())}},[A,at,k,ae,ie]);let st=B===null?null:Rr(D.overlay,B,i[A]?.generatedAt??null),ct=B===null?null:L(B,D.overlay,i[A]?.generatedAt??null),lt=(0,y.useCallback)(e=>{let t=gi(Ke,e);t===null?ie():N(t)},[Ke,N,ie]),ut=(0,y.useCallback)(t=>{if(n.status===`on`){I.showError(`Airplane mode`,`This action requires a network connection. Turn off airplane mode and try again.`);return}let r=Pr(t.item),i=t.overlayPatch;I.enqueue({message:Cn(t.kind,t.item,A),color:xn(t.kind),commit:t.commit,offline:t.offline,revertAdvance:t.revertAdvance,optimistic:i===void 0?void 0:()=>D.patchOverlay(r,i,A),revertOptimistic:i===void 0?void 0:()=>D.revertOverlayEntry(r),advance:()=>{if(t.onAdvance?.(),!t.skipAdvance&&Sn(t.kind,A)){if(c&&E(l[e??``]??15)){let t=se(v,e,l);t!==null&&fi(`/projects/${t}/todo-by-human`)}else lt(r)}}})},[I,A,lt,n.status,D,c,E,l,e,v]),dt=li((0,y.useCallback)(e=>{if(M===null||e===null)return;let t=e===`next`?_i(Ke,M):vi(Ke,M);t!==null&&N(t)},[M,Ke,N])),[ft,pt]=(0,y.useState)(()=>localStorage.getItem(`console-story-show-gray`)===`true`),mt=(0,y.useCallback)(()=>{pt(e=>{let t=!e;return localStorage.setItem(`console-story-show-gray`,String(t)),t})},[]),ht=i.stories,gt=ht?.stories??[],_t=it!==null&&it.generatedAt===ht?.generatedAt?it.stories:gt,vt=ht?.defaultNameWithOwner??null,yt=vt===null?null:`https://github.com/${vt}/issues/new`,V=(0,y.useMemo)(()=>B===null||!B.labels.includes(`story`)?null:_t.find(e=>e.storyName===B.story)??null,[B,_t]),xt=(0,y.useCallback)(async(t,n)=>{if(e===null)throw Error(`No project specified in the URL path.`);if(vt===null)throw Error(`No repository configured for this project.`);await Xt({pjcode:e,title:n,storyName:t,nameWithOwner:vt})},[e,vt]),St=(0,y.useCallback)(({storyName:t,agentOptionId:n,title:r,body:i,files:a})=>{if(e===null||vt===null)return Promise.resolve();let o=e,s=vt,c={title:r,storyName:t,agentOptionId:n,body:i,files:a};return I.enqueue({message:`Task created — "${r}"`,color:`blue`,commit:()=>$d(o,s,c),advance:()=>{}}),Ce({title:``,body:null,storyName:null,agentOptionId:null}),Promise.resolve()},[e,vt,I]),Ct=(0,y.useCallback)(({title:t,body:n,storyName:r,agentOptionId:i,files:a})=>{if(C===null||e===null)return Promise.resolve();let o=C.match(/github\.com\/([^/]+\/[^/]+)/);if(o===null)return Promise.resolve();let s=o[1],c=e,l={title:t,storyName:r,agentOptionId:i,body:n,files:a};return I.enqueue({message:`Task created — "${t}"`,color:`blue`,commit:()=>$d(c,s,l),advance:()=>{}}),xe({title:``,body:null,storyName:null,agentOptionId:null}),Promise.resolve()},[C,e,I]),wt=(0,y.useCallback)(async(t,n)=>{if(e===null)throw Error(`No project specified in the URL path.`);await Qt({pjcode:e,storyOptionId:t,direction:n});let r=_t.findIndex(e=>e.storyOptionId===t);if(r!==-1){let e=r+(n===`up`?-1:1);if(e>=0&&e<_t.length){let t=[..._t],n=t[r];t[r]=t[e],t[e]=n,z({generatedAt:ht?.generatedAt,stories:t})}}},[e,_t,ht?.generatedAt]),Tt=(0,y.useCallback)(async t=>{if(e===null)throw Error(`No project specified in the URL path.`);let n=await Wt({pjcode:e,storyName:t});if(n.length>0){let e=n.map(e=>{let t=_t.find(t=>t.storyOptionId===e.id);return{storyOptionId:e.id,storyName:e.name,color:e.color,description:t?.description??``,openItemCount:t?.openItemCount??0,storyViewUrl:t?.storyViewUrl??null,items:t?.items??[]}});z({generatedAt:ht?.generatedAt,stories:e})}},[e,_t,ht?.generatedAt]),Et=(0,y.useCallback)((e,t)=>{Ce({title:t,body:null,storyName:e,agentOptionId:null}),_e(!0)},[]),[Dt,Ot]=(0,y.useState)({}),[kt,At]=(0,y.useState)(null),[jt,Mt]=(0,y.useState)({}),Nt=(0,y.useCallback)((t,n)=>{let r=_t.find(e=>e.storyOptionId===t)?.color;if(At(t),Ot(e=>({...e,[t]:n})),Mt(e=>{let n={...e};return delete n[t],n}),e===null||vt===null){Ot(e=>r===void 0?e:{...e,[t]:r}),Mt(e=>({...e,[t]:`No project or repository configured.`})),At(e=>e===t?null:e);return}Yt({pjcode:e,storyOptionId:t,newColor:n,nameWithOwner:vt}).catch(e=>{Ot(e=>r===void 0?e:{...e,[t]:r}),Mt(n=>({...n,[t]:e instanceof Error?e.message:String(e)}))}).finally(()=>{At(e=>e===t?null:e)})},[e,vt,_t]),Pt=(0,y.useCallback)(async(t,n)=>{if(e===null)throw Error(`No project specified in the URL path.`);await nn({pjcode:e,storyOptionId:t,deleteChildTasks:n}),z({generatedAt:ht?.generatedAt,stories:_t.filter(e=>e.storyOptionId!==t)})},[e,_t,ht?.generatedAt]),Ft=(0,y.useCallback)(async(t,n)=>{if(e===null)throw Error(`No project specified in the URL path.`);await an({pjcode:e,storyOptionId:t,newName:n});let r=_t.map(e=>e.storyOptionId===t?{...e,storyName:n}:e);z({generatedAt:ht?.generatedAt,stories:r})},[e,_t,ht?.generatedAt]),It=(0,y.useCallback)(async(t,n)=>{if(e===null)throw Error(`No project specified in the URL path.`);await sn({pjcode:e,storyOptionId:t,description:n});let r=_t.map(e=>e.storyOptionId===t?{...e,description:n}:e);z({generatedAt:ht?.generatedAt,stories:r})},[e,_t,ht?.generatedAt]),Lt=ai(Be,de.comments,A===`prs`),Rt=(0,y.useCallback)((e,t)=>{ut({kind:{type:`ok_and_awaiting_workspace`},item:e,commit:()=>pe.okAndMoveToAwaitingWorkspace(e,t),skipAdvance:!0,overlayPatch:{done:!0,status:{name:t.name,color:t.color}}})},[ut,pe]);return(0,x.jsxs)(`main`,{className:`console-app`,children:[I.pending!==null&&(0,x.jsx)(Je,{message:I.pending.message,color:I.pending.color,remainingSeconds:I.pending.remainingSeconds,progress:I.pending.progress,onUndo:I.undo}),I.error!==null&&(0,x.jsx)(Ye,{title:I.error.message,message:`Operation failed: ${I.error.reason}`,onDismiss:I.dismissError,onRetry:I.error.retry===void 0?void 0:()=>{I.dismissError(),I.error?.retry?.()}}),(0,x.jsx)(qe,{actions:Re,isOnline:we,isConfirming:Fe,onConfirm:Le,onDiscard:I.discardOfflineAction}),O.isOpen&&(0,x.jsx)(S,{pjcodes:v,inputValues:O.inputValues,onChangeInput:O.changeInput,isLoading:O.isLoading,isSaving:O.isSaving,error:O.error,nameWithOwnerByPjcode:w,onSave:O.save,onClose:O.close}),(0,x.jsx)(re,{activeTab:A,counts:k,pjcode:e,pjcodes:v,generatedAt:nt,fromCache:rt,tabHref:ne.tabHref,onSelectTab:ae,onSelectProject:ce,settingsButton:(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(le,{isOpen:u,isTimerActive:c,timerMode:d,projectMinutes:f,pjcodes:v,isLoadingPjcodes:ee,onOpen:p,onToggleTimerMode:g,onChangeMinutes:_,onSave:h,onClose:m}),(0,x.jsx)(`button`,{type:`button`,className:`console-tab-settings-button`,"aria-label":`Open max settings`,onClick:O.open,children:`⚙`}),e!==null&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(`button`,{type:`button`,className:`console-task-create-button`,disabled:vt===null||_t.length===0,onClick:()=>_e(!0),"aria-label":`Create new task`,title:`Create new task`,children:(0,x.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,x.jsx)(`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`}),(0,x.jsx)(`path`,{d:`M18.375 2.625a2.121 2.121 0 0 1 3 3L7 18l-4 1 1-4Z`})]})}),ge&&(0,x.jsx)(fe,{storyEntries:_t,agentOptions:et,onSubmit:St,onClose:()=>_e(!1),initialDraft:Se,onDraftChange:Ce,fleetTaskCreateUrl:C,newIssueUrl:yt})]})]}),airplaneModeEnabled:t.airplaneMode,airplaneModeStatus:n.status,airplaneModeProgress:n.progress,airplaneModeCapturedAt:r?.capturedAt??null,airplaneModeFailures:n.failures,onAirplaneModeStartSync:n.startSync,onAirplaneModeTurnOff:n.turnOff,onAirplaneModeRetryFailed:n.retryFailed,projectUrl:e===null?null:b?.[e]??null,onFleetTaskCreate:C===null?null:()=>ye(!0),now:R}),ve&&(0,x.jsx)(fe,{storyEntries:_t,agentOptions:et,initialDraft:be,onDraftChange:xe,onSubmit:Ct,onClose:()=>ye(!1),containerClassName:`console-fleet-task-create-dialog-container`}),(0,x.jsx)(T,{timerEndsAt:ze?.timerEndsAt??null,timerTotalSeconds:ze?.timerTotalSeconds??null,now:R}),A===`stories`?(0,x.jsx)(`div`,{className:`console-list-screen`,children:(0,x.jsx)(He,{stories:_t,isLoading:a,error:o,showGray:ft,onCreateIssue:xt,onAddStory:Tt,onSelectColor:Nt,onToggleGray:mt,onReorderStory:wt,onDeleteStory:Pt,onRenameStory:Ft,onUpdateDescription:It,onStoryTaskCreateEdit:Et,optimisticColors:Dt,colorChangeInFlight:kt,colorErrors:jt})}):B===null?A===`queued`?(0,x.jsx)(`div`,{className:`console-list-screen`,children:(0,x.jsx)(Ne,{rows:Ze,storyColors:Qe,statusOptions:$e,agentOptions:et,activeItemId:null,isLoading:a,error:o,onSelectItem:e=>ne.openItem(e.projectItemId)})}):A===`prs`?(0,x.jsxs)(`div`,{className:`console-list-screen`,children:[(0,x.jsx)(Ae,{agentOptions:et,agentCounts:We,selectedAgent:Ve,onAgentChange:Ue}),(0,x.jsx)(ke,{rows:Ze,storyColors:Qe,statusOptions:$e,activeItemId:null,now:R,isLoading:a,error:o,onSelectItem:e=>ne.openItem(e.projectItemId),executiveSummaries:Lt,onOkAndAwaitingWorkspace:Rt})]}):(0,x.jsx)(`div`,{className:`console-list-screen`,children:(0,x.jsx)(ke,{rows:Ze,storyColors:Qe,statusOptions:$e,activeItemId:null,now:R,isLoading:a,error:o,onSelectItem:e=>ne.openItem(e.projectItemId)})}):(0,x.jsx)(`div`,{className:`console-detail-screen`,ref:dt,children:(0,x.jsx)(Xd,{tab:A,item:B,caches:de,operations:pe,pjcode:e,statusOptions:$e,storyOptions:tt,agentOptions:et,storyEntries:_t,storyColors:Qe,storyName:ct,overlayStatus:st,now:R,initialCommentDraft:F.current.get(B.projectItemId)??``,onCommentDraftChange:ue,onQueueAction:ut,onCommentError:(e,t)=>I.showError(e,t),onDeleteStory:V===null?null:async e=>{await Pt(V.storyOptionId,e),M!==null&&lt(M)},storyNameForDeletion:V?.storyName??null,onCreateIssueFromComment:C===null?void 0:Ct},B.projectItemId)})]})};`serviceWorker`in navigator&&navigator.serviceWorker.register(`/sw.js`).catch(e=>{console.warn(`Service worker registration failed:`,e)});var tf=document.getElementById(`root`);if(tf===null)throw Error(`Root container #root not found`);(0,b.createRoot)(tf).render((0,x.jsx)(y.StrictMode,{children:(0,x.jsx)(ef,{})}));
@@ -5,7 +5,7 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
7
7
  <title>TDPM Console</title>
8
- <script type="module" crossorigin src="/assets/index-B8Oba8-f.js"></script>
8
+ <script type="module" crossorigin src="/assets/index-CeqcUKdR.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="/assets/index-CezbUFxA.css">
10
10
  </head>
11
11
  <body>
@@ -13,6 +13,7 @@ const extractWorkflowError_1 = require("./extractWorkflowError");
13
13
  const findLastAgentReport_1 = require("./findLastAgentReport");
14
14
  const isAgentReportBody_1 = require("./isAgentReportBody");
15
15
  const dependencyNotificationCommentHeads_1 = require("./dependencyNotificationCommentHeads");
16
+ const isHumanComment_1 = require("./isHumanComment");
16
17
  const issueReactivationTriggerIsPending_1 = require("./issueReactivationTriggerIsPending");
17
18
  const resolveNextStepAgentDispatchRepetition_1 = require("./resolveNextStepAgentDispatchRepetition");
18
19
  const RequiredProjectField_1 = require("../entities/RequiredProjectField");
@@ -122,6 +123,18 @@ class NotifyFinishedIssuePreparationUseCase {
122
123
  return;
123
124
  }
124
125
  else if (issue.status === WorkflowStatus_1.AWAITING_OWNER_STATUS_NAME) {
126
+ const ownerCheckComments = await this.issueCommentRepository.getCommentsFromIssue(issue);
127
+ const isTrustedAuthorForOwnerCheck = (author) => (0, isAuthorAuthorizedForAutoStatusCheck_1.isAuthorAuthorizedForAutoStatusCheck)(author, params.allowedIssueAuthors);
128
+ const lastOwnerCheckComment = ownerCheckComments[ownerCheckComments.length - 1];
129
+ if (lastOwnerCheckComment &&
130
+ isTrustedAuthorForOwnerCheck(lastOwnerCheckComment.author) &&
131
+ (0, isHumanComment_1.isHumanComment)(lastOwnerCheckComment, isTrustedAuthorForOwnerCheck)) {
132
+ issue.status = WorkflowStatus_1.AWAITING_WORKSPACE_STATUS_NAME;
133
+ await this.issueRepository.update(issue, project);
134
+ await this.issueRepository.updateStatus(project, issue, awaitingWorkspaceStatusOption.id);
135
+ await this.patchConsoleTab(issue);
136
+ return;
137
+ }
125
138
  console.log(`notifyFinishedIssuePreparation skipped: issue ${params.issueUrl} is already Awaiting Owner`);
126
139
  return;
127
140
  }
@@ -486,17 +499,14 @@ class NotifyFinishedIssuePreparationUseCase {
486
499
  };
487
500
  this.collectRejections = async (issue, comments, isTrustedAuthor, labelsNotRequiringPullRequest, nextStepAgent, developerAgentNames, defaultAgentName) => {
488
501
  const rejections = [];
489
- const lastComment = comments[comments.length - 1];
490
- if (!lastComment ||
491
- !isTrustedAuthor(lastComment.author) ||
492
- !(0, isAgentReportBody_1.isAgentReportBody)(lastComment.content)) {
502
+ const lastAgentReport = (0, findLastAgentReport_1.findLastAgentReport)(comments, isTrustedAuthor);
503
+ if (!lastAgentReport) {
493
504
  rejections.push({
494
505
  type: 'NO_REPORT_FROM_AGENT_BOT',
495
506
  detail: 'NO_REPORT_FROM_AGENT_BOT',
496
507
  });
497
508
  }
498
509
  const { rejections: prRejections, approvedPrUrl } = await this.issueRejectionEvaluator.evaluate(issue, labelsNotRequiringPullRequest, { developerAgentNames });
499
- const lastAgentReport = (0, findLastAgentReport_1.findLastAgentReport)(comments, isTrustedAuthor);
500
510
  const effectiveDeveloperAgentNames = developerAgentNames ?? [];
501
511
  const lastReportIsFromDeveloperAgent = lastAgentReport !== null &&
502
512
  effectiveDeveloperAgentNames.some((name) => (0, isAgentReportBody_1.isAgentReportBodyFromAgent)(lastAgentReport.content, name, issue.agent));
@@ -1 +1 @@
1
- {"version":3,"file":"NotifyFinishedIssuePreparationUseCase.js","sourceRoot":"","sources":["../../../src/domain/usecases/NotifyFinishedIssuePreparationUseCase.ts"],"names":[],"mappings":";;;AAKA,+DAUoC;AACpC,uEAGmC;AACnC,uFAAoF;AACpF,iGAA8F;AAO9F,2EAAwE;AACxE,qGAAkG;AAClG,iEAA8D;AAC9D,iDAA8C;AAC9C,iEAA8D;AAC9D,+DAA4D;AAE5D,2DAI6B;AAC7B,6FAAyF;AACzF,2FAG6C;AAC7C,qGAKkD;AAClD,2EAAuE;AACvE,iGAA8F;AAC9F,+FAG+C;AAC/C,2EAA2E;AAE3E,MAAa,kBAAmB,SAAQ,KAAK;IAC3C,YAAY,QAAgB;QAC1B,KAAK,CAAC,oBAAoB,QAAQ,EAAE,CAAC,CAAC;QACtC,IAAI,CAAC,IAAI,GAAG,oBAAoB,CAAC;IACnC,CAAC;CACF;AALD,gDAKC;AACD,MAAa,uBAAwB,SAAQ,KAAK;IAChD,YACE,QAAgB,EAChB,aAA4B,EAC5B,cAA6B;QAE7B,KAAK,CACH,4BAA4B,QAAQ,cAAc,cAAc,aAAa,aAAa,EAAE,CAC7F,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,yBAAyB,CAAC;IACxC,CAAC;CACF;AAXD,0DAWC;AACD,MAAa,uBAAwB,SAAQ,KAAK;IAChD,YAAY,GAAW,EAAE,I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C,EAAE,EAAE,CAAC;gBACjD,CAAC,CAAC,SAAS,CAAC;YAChB,MAAM,mBAAmB,GACvB,KAAK,CAAC,cAAc,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YAC3E,OAAO,GAAG,sEAAiC,2BAA2B,qBAAqB,yBAAyB,mBAAmB,yBAAyB,mBAAmB,EAAE,CAAC;QACxL,CAAC,CAAC;QAEM,2BAAsB,GAAG,KAAK,EACpC,KAAY,EACZ,IAAY,EACG,EAAE;YACjB,MAAM,QAAQ,GACZ,MAAM,IAAI,CAAC,sBAAsB,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;YAChE,IACE,IAAA,8CAAuB,EACrB,IAAI,EACJ,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,EAClE,IAAI,IAAI,EAAE,CACX,EACD,CAAC;gBACD,OAAO;YACT,CAAC;YACD,MAAM,IAAI,CAAC,sBAAsB,CAAC,aAAa,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QAC/D,CAAC,CAAC;QA9hCA,IAAI,CAAC,uBAAuB,GAAG,IAAI,iDAAuB,CAAC,eAAe,CAAC,CAAC;QAC5E,IAAI,CAAC,+BAA+B,GAAG,IAAI,iEAA+B,CACxE,eAAe,CAChB,CAAC;IACJ,CAAC;CA2hCF;AA3kCD,sFA2kCC"}
1
+ {"version":3,"file":"NotifyFinishedIssuePreparationUseCase.js","sourceRoot":"","sources":["../../../src/domain/usecases/NotifyFinishedIssuePreparationUseCase.ts"],"names":[],"mappings":";;;AAKA,+DAUoC;AACpC,uEAGmC;AACnC,uFAAoF;AACpF,iGAA8F;AAO9F,2EAAwE;AACxE,qGAAkG;AAClG,iEAA8D;AAC9D,iDAA8C;A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AC,SAAS,CAAC;YAChB,MAAM,mBAAmB,GACvB,KAAK,CAAC,cAAc,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YAC3E,OAAO,GAAG,sEAAiC,2BAA2B,qBAAqB,yBAAyB,mBAAmB,yBAAyB,mBAAmB,EAAE,CAAC;QACxL,CAAC,CAAC;QAEM,2BAAsB,GAAG,KAAK,EACpC,KAAY,EACZ,IAAY,EACG,EAAE;YACjB,MAAM,QAAQ,GACZ,MAAM,IAAI,CAAC,sBAAsB,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;YAChE,IACE,IAAA,8CAAuB,EACrB,IAAI,EACJ,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,EAClE,IAAI,IAAI,EAAE,CACX,EACD,CAAC;gBACD,OAAO;YACT,CAAC;YACD,MAAM,IAAI,CAAC,sBAAsB,CAAC,aAAa,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QAC/D,CAAC,CAAC;QAjjCA,IAAI,CAAC,uBAAuB,GAAG,IAAI,iDAAuB,CAAC,eAAe,CAAC,CAAC;QAC5E,IAAI,CAAC,+BAA+B,GAAG,IAAI,iEAA+B,CACxE,eAAe,CAChB,CAAC;IACJ,CAAC;CA8iCF;AA9lCD,sFA8lCC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "github-issue-tower-defence-management",
3
- "version": "2.144.1",
3
+ "version": "2.144.3",
4
4
  "description": "",
5
5
  "main": "bin/index.js",
6
6
  "scripts": {
@@ -1 +1 @@
1
- {"version":3,"file":"NotifyFinishedIssuePreparationUseCase.d.ts","sourceRoot":"","sources":["../../../src/domain/usecases/NotifyFinishedIssuePreparationUseCase.ts"],"names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