@dubusoft/toodo-linux-arm64 1.4.2-dev.80 → 1.4.2-dev.82
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/toodo +0 -0
- package/bin/toodo-server +0 -0
- package/package.json +1 -1
- package/web/assets/{details-sheet-eQm37qp-.js → details-sheet-BNSbmwFR.js} +1 -1
- package/web/assets/index-Da3zPS2t.js +16 -0
- package/web/assets/{markdown-BSNAuFnp.js → markdown-pafQdimT.js} +1 -1
- package/web/assets/{offline-screen-Dg5JO8_s.js → offline-screen-CzNWOXjD.js} +1 -1
- package/web/assets/review-CuVpNgmW.js +1 -0
- package/web/assets/{server-access-CpIGyIb7.js → server-access-B0TYrDia.js} +1 -1
- package/web/assets/{status-styles-Bg6qTX-E.js → status-styles-CQphdlmI.js} +1 -1
- package/web/assets/{task-details-DYixS22y.js → task-details-CKzjCygM.js} +3 -3
- package/web/assets/{task-graph-BTcjRXBH.js → task-graph-DCzmbOPX.js} +3 -3
- package/web/assets/workspace-list-DhvWzFcG.js +1 -0
- package/web/index.html +4 -4
- package/web/sw.js +2 -2
- package/web/version.json +1 -1
- package/web/assets/index-BjyaZzQW.js +0 -16
- package/web/assets/review-B1DvK225.js +0 -1
- package/web/assets/workspace-list-hsjrYLcs.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e,n as t,r as n,s as r,t as i}from"./dist-ZmB2kPfR.js";import{C as a,Dt as o,R as s,S as c,_ as l,_t as u,cn as d,d as f,gt as p,o as m,qt as ee,s as h,sn as te,vt as ne,wt as re,yt as g}from"./status-styles-Bg6qTX-E.js";import{_ as ie,c as _,g as ae}from"./workspace-list-hsjrYLcs.js";import{A as oe,B as v,C as se,Ct as ce,D as y,Dt as b,E as x,Et as S,F as C,I as w,K as le,L as ue,M as T,Mt as E,N as D,O as de,P as fe,R as O,S as k,St as A,T as j,X as pe,_ as me,_t as M,b as N,bt as P,c as he,g as F,h as I,j as L,k as ge,m as _e,q as ve,s as ye,v as R,w as z,x as B,xt as V,y as H}from"./index-BjyaZzQW.js";import{t as U}from"./opener-DWhHPoCL.js";var W={name:`calendar-check`,size:24,node:[[`path`,{d:`M8 2v3`,key:`1ioesn`}],[`path`,{d:`M16 2v3`,key:`otl347`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}],[`path`,{d:`M3 9h18`,key:`1pudct`}],[`path`,{d:`m9 15 2 2 4-4`,key:`1grp1n`}]]};W.node;var be=t(W),G=r(e(),1),K=n(),xe={completed:f.success,opened_for_review:f.review,started:f.progress,worked_on:f.progress,planned:f.neutral},Se=i(`shrink-0 rounded-full px-2 py-0.5 text-xs font-medium`,m.neutral),Ce=[{kind:`week`,label:`Week`},{kind:`month`,label:`Month`},{kind:`quarter`,label:`Quarter`},{kind:`year`,label:`Year`},{kind:`custom`,label:`Custom`}];function we(e,t,n){let r=URL.createObjectURL(new Blob([t],{type:`${n};charset=utf-8`})),i=document.createElement(`a`);i.href=r,i.download=e,i.click(),URL.revokeObjectURL(r)}function Te({disabled:e,children:t}){let[n,r]=(0,G.useState)(!1),i=(0,G.useRef)(null);return(0,G.useEffect)(()=>{if(!n)return;let e=e=>{i.current?.contains(e.target)||r(!1)},t=e=>e.key===`Escape`&&r(!1);return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,t)}},[n]),(0,K.jsxs)(`div`,{ref:i,className:`relative`,children:[(0,K.jsxs)(d,{size:`sm`,"aria-haspopup":`menu`,"aria-expanded":n,disabled:e,onClick:()=>r(!n),children:[(0,K.jsx)(E,{}),(0,K.jsx)(`span`,{className:`max-md:sr-only`,children:`Export`})]}),n&&(0,K.jsx)(`div`,{role:`menu`,"aria-label":`Export review`,className:`absolute right-0 z-10 mt-1 flex w-48 flex-col rounded-lg border bg-popover p-1 text-popover-foreground shadow-md`,children:t(()=>r(!1))})]})}function q(e,t){return`${e} ${t}${e===1?``:`s`}`}function Ee(e,t){let n=e.skipped>0?` Left out ${q(e.skipped,`pull request`)} a task already records.`:``;return e.imported===0?`Found no new pull requests you merged in this ${t}.${n}`:`Imported ${q(e.imported,`merged pull request`)} as done tasks.${n}`}function J({onSelect:e,children:t}){return(0,K.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:e,className:`rounded-md px-2 py-1.5 text-left text-sm hover:bg-muted max-md:min-h-11`,children:t})}function De(){let e=g(),t=o(),[n,r]=(0,G.useState)(!1),[a,s]=(0,G.useState)(``),[c,l]=(0,G.useState)(null),u=typeof Intl.supportedValuesOf==`function`?Intl.supportedValuesOf(`timeZone`):[];async function f(e){l(null);try{await t.mutateAsync(e),r(!1)}catch(e){l(e instanceof Error?e.message:String(e))}}if(!e.data)return null;let{timeZone:p,configured:m}=e.data;return n?(0,K.jsxs)(`form`,{"aria-label":`Review time zone`,className:`flex flex-wrap items-center gap-2 print:hidden`,onSubmit:e=>{e.preventDefault(),f(a)},children:[(0,K.jsx)(`label`,{htmlFor:`review-time-zone`,className:`text-xs`,children:`Time zone for every device`}),(0,K.jsx)(`input`,{id:`review-time-zone`,list:`review-time-zones`,required:!0,className:i(_,`w-56`),value:a,onChange:e=>s(e.target.value)}),(0,K.jsx)(`datalist`,{id:`review-time-zones`,children:u.map(e=>(0,K.jsx)(`option`,{value:e},e))}),(0,K.jsx)(d,{size:`sm`,type:`submit`,disabled:t.isPending,children:`Save`}),m!==null&&(0,K.jsx)(d,{size:`sm`,type:`button`,variant:`outline`,onClick:()=>void f(null),children:`Use the server's`}),(0,K.jsx)(d,{size:`sm`,type:`button`,variant:`ghost`,onClick:()=>r(!1),children:`Cancel`}),c&&(0,K.jsx)(`span`,{role:`alert`,className:`w-full text-xs text-destructive`,children:c})]}):(0,K.jsxs)(`span`,{children:[`Days are in `,p,m===null&&` (the server's time zone)`,`.`,` `,(0,K.jsx)(`button`,{type:`button`,className:`text-primary underline underline-offset-2 hover:no-underline print:hidden`,onClick:()=>{s(m??p),r(!0)},children:`Change time zone`})]})}function Y({onShowTask:e}){let[t,n]=(0,G.useState)(()=>y(`week`,A(Date.now()/1e3))),[r,o]=(0,G.useState)(null),[f,h]=(0,G.useState)(j),[g,b]=(0,G.useState)(null),[S,w]=(0,G.useState)(null),T=p(t.from,t.to),E=ne(),D=u(S),O=re(),k=s(),M=S!==null,N=M?D:T,F=ee(),I=c(),L=a(),[R,z]=(0,G.useState)([]),B=F.data?.some(e=>e.source===`github`)??!1,V=M?D.data?.workspaces??[]:[...F.data??[],...I.data?.workspaces??[]],H=new Map(V.map(e=>[e.id,e.name])),U=M?D.data&&{period:{kind:D.data.summary.period,from:D.data.summary.from,to:D.data.summary.to},entries:D.data.entries,start:D.data.summary.start,end:D.data.summary.end,timeZone:D.data.summary.timeZone,now:D.data.summary.savedAt}:T.data&&{period:t,entries:T.data.entries,start:T.data.start,end:T.data.end,timeZone:T.data.timeZone,now:Date.now()/1e3},W=U?.period??t,Y=U&&me(U.entries,f),X=fe(U?.entries??[]);f.label!==null&&!X.includes(f.label)&&X.push(f.label);let Ne=[f.workspaceId===null?`across all workspaces`:`in ${H.get(f.workspaceId)??`workspace ${f.workspaceId}`}`,f.label!==null&&`labelled ${f.label}`].filter(Boolean).join(`, `),Z=ge[W.kind];function Q(e){o(null),z([]),n(e)}function $(e){o(null),z([]),b(null),w(e)}async function Pe(){try{let e=await O.mutateAsync({period:t.kind,from:t.from,to:t.kind===`custom`?t.to:null,workspaceId:f.workspaceId,label:f.label,title:null});o(`Saved "${e.title}" with ${q(e.entryCount,`task`)}; reopen it from Saved reviews.`)}catch(e){o(`Could not save the review: ${e instanceof Error?e.message:String(e)}`)}}async function Fe(e){try{await k.mutateAsync(e),$(null),o(`Deleted the saved review.`)}catch(e){o(`Could not delete the saved review: ${e instanceof Error?e.message:String(e)}`)}}async function Ie(){o(null),z([]);try{let e=await L.mutateAsync({from:t.from,to:t.to});o(Ee(e,Z)),z(e.failures)}catch(e){o(`Could not import pull requests: ${e instanceof Error?e.message:String(e)}`)}}function Le(e){e!==t.kind&&Q(e===`custom`?{...t,kind:e}:y(e,t.from))}function Re(e){return M?D.data?Promise.resolve(e===`csv`?D.data.csv:D.data.markdown):Promise.reject(Error(`the saved review is still loading`)):l(te.reviewReport({period:t.kind,date:null,from:t.from,to:t.kind===`custom`?t.to:null,format:e,timeZone:null,workspaceId:f.workspaceId,label:f.label}))}async function ze(){try{let e=Re(`markdown`);if(typeof ClipboardItem>`u`)await navigator.clipboard.writeText((await e).contents);else{let t=e.then(({contents:e})=>new Blob([e],{type:`text/plain`}));await navigator.clipboard.write([new ClipboardItem({"text/plain":t})])}o(`Copied as Markdown.`)}catch(e){o(`Could not copy: ${String(e)}`)}}async function Be(e){try{let t=await Re(e);we(t.fileName,t.contents,t.mediaType),o(`Downloaded ${t.fileName}`)}catch(e){o(`Could not export: ${String(e)}`)}}return(0,K.jsxs)(`section`,{"aria-labelledby":`review-heading`,className:`flex flex-col gap-4`,children:[(0,K.jsxs)(`header`,{className:`flex flex-col gap-1`,children:[(0,K.jsx)(`h2`,{id:`review-heading`,className:`text-xl font-semibold tracking-tight`,children:M&&D.data?D.data.summary.title:oe[W.kind]}),(0,K.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Work recorded from `,W.from,` to `,W.to,` `,Ne,`.`,` `,M?D.data&&(0,K.jsxs)(`span`,{children:[`Saved `,ce(D.data.summary.savedAt),`, with days in `,D.data.summary.timeZone,`; it stays as it was when saved.`]}):(0,K.jsx)(De,{})]})]}),(M||(E.data?.length??0)>0)&&(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 print:hidden`,children:[(0,K.jsxs)(`select`,{"aria-label":`Saved reviews`,className:i(`h-8 w-full min-w-0 rounded-lg border border-input bg-background px-2.5 text-sm outline-none max-md:h-11 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50`,`w-auto max-md:min-w-0 max-md:flex-1`),value:S??``,onChange:e=>$(e.target.value===``?null:Number(e.target.value)),children:[(0,K.jsx)(`option`,{value:``,children:`Live review`}),E.data?.map(e=>(0,K.jsxs)(`option`,{value:e.id,children:[e.title,` (saved `,A(e.savedAt),`)`]},e.id))]}),S!==null&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(d,{size:`sm`,variant:`outline`,onClick:()=>$(null),children:`Back to the live review`}),(0,K.jsx)(d,{size:`sm`,variant:`ghost`,disabled:k.isPending,onClick:()=>void Fe(S),children:`Delete saved review`})]})]}),(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 print:hidden`,children:[!M&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`div`,{role:`group`,"aria-label":`Review period`,className:`flex rounded-md border p-0.5 max-md:w-full`,children:Ce.map(({kind:e,label:n})=>(0,K.jsx)(d,{size:`sm`,variant:t.kind===e?`default`:`ghost`,"aria-pressed":t.kind===e,onClick:()=>Le(e),children:n},e))}),t.kind===`week`&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`label`,{htmlFor:`week-start`,className:`text-xs text-muted-foreground max-md:sr-only`,children:`Week starting`}),(0,K.jsx)(`input`,{id:`week-start`,type:`date`,required:!0,className:i(`h-8 w-full min-w-0 rounded-lg border border-input bg-background px-2.5 text-sm outline-none max-md:h-11 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50`,`w-40 max-md:w-0 max-md:min-w-0 max-md:flex-1`),value:t.from,onChange:e=>e.target.value&&Q(ue(e.target.value))})]}),t.kind===`custom`&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`label`,{htmlFor:`review-from`,className:`text-xs text-muted-foreground max-md:sr-only`,children:`From`}),(0,K.jsx)(`input`,{id:`review-from`,type:`date`,required:!0,max:t.to,className:i(`h-8 w-full min-w-0 rounded-lg border border-input bg-background px-2.5 text-sm outline-none max-md:h-11 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50`,`w-40`),value:t.from,onChange:e=>e.target.value&&e.target.value<=t.to&&Q({...t,from:e.target.value})}),(0,K.jsx)(`label`,{htmlFor:`review-to`,className:`text-xs text-muted-foreground max-md:sr-only`,children:`To`}),(0,K.jsx)(`input`,{id:`review-to`,type:`date`,required:!0,min:t.from,className:i(`h-8 w-full min-w-0 rounded-lg border border-input bg-background px-2.5 text-sm outline-none max-md:h-11 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50`,`w-40`),value:t.to,onChange:e=>e.target.value&&e.target.value>=t.from&&Q({...t,to:e.target.value})})]}),t.kind!==`week`&&t.kind!==`custom`&&(0,K.jsx)(`span`,{className:`px-1 text-sm font-medium`,children:de(t)}),(0,K.jsx)(d,{size:`icon-sm`,variant:`outline`,"aria-label":`Previous ${Z}`,title:`Previous ${Z}`,onClick:()=>Q(C(t,-1)),children:(0,K.jsx)(ae,{})}),(0,K.jsx)(d,{size:`icon-sm`,variant:`outline`,"aria-label":`Next ${Z}`,title:`Next ${Z}`,onClick:()=>Q(C(t,1)),children:(0,K.jsx)(ie,{})}),t.kind!==`custom`&&(0,K.jsxs)(d,{size:`sm`,variant:`ghost`,onClick:()=>Q(y(t.kind,A(Date.now()/1e3))),children:[(0,K.jsx)(be,{className:`md:hidden`,"aria-hidden":!0}),(0,K.jsxs)(`span`,{className:`max-md:sr-only`,children:[`This `,Z]})]})]}),(0,K.jsx)(`div`,{className:`ml-auto`,children:(0,K.jsx)(Te,{disabled:!Y,children:e=>(0,K.jsxs)(K.Fragment,{children:[!M&&(0,K.jsx)(J,{onSelect:()=>{e(),Pe()},children:`Save as snapshot`}),(0,K.jsx)(J,{onSelect:()=>{e(),ze()},children:`Copy as Markdown`}),(0,K.jsx)(J,{onSelect:()=>{e(),Be(`markdown`)},children:`Save as Markdown`}),(0,K.jsx)(J,{onSelect:()=>{e(),Be(`csv`)},children:`Save as CSV`}),(0,K.jsx)(J,{onSelect:()=>{e(),window.print()},children:`Print or save as PDF`})]})})})]}),(0,K.jsxs)(`div`,{role:`group`,"aria-label":`Review filters`,className:`flex flex-wrap items-center gap-2 print:hidden`,children:[(0,K.jsxs)(`select`,{"aria-label":`Workspace`,className:i(_,`w-auto max-md:min-w-0 max-md:flex-1`),value:f.workspaceId??``,onChange:e=>h({...f,workspaceId:e.target.value===``?null:Number(e.target.value)}),children:[(0,K.jsx)(`option`,{value:``,children:`All workspaces`}),V.map(e=>(0,K.jsx)(`option`,{value:e.id,children:e.name},e.id))]}),(0,K.jsxs)(`select`,{"aria-label":`Label`,className:i(_,`w-auto max-md:min-w-0 max-md:flex-1`),value:f.label??``,onChange:e=>h({...f,label:e.target.value===``?null:e.target.value}),children:[(0,K.jsx)(`option`,{value:``,children:X.length===0?`No labels in this period`:`Any label`}),X.map(e=>(0,K.jsx)(`option`,{value:e,children:e},e))]}),(f.workspaceId!==null||f.label!==null)&&(0,K.jsx)(d,{size:`sm`,variant:`ghost`,onClick:()=>h(j),children:`Clear filters`})]}),r&&(0,K.jsx)(`p`,{role:`status`,className:`text-xs text-muted-foreground print:hidden`,children:r}),R.length>0&&(0,K.jsx)(`ul`,{role:`alert`,"aria-label":`Pull requests not imported`,className:`text-xs text-destructive print:hidden`,children:R.map(e=>(0,K.jsx)(`li`,{children:e},e))}),(0,K.jsx)(`p`,{role:`status`,className:i(`text-sm text-muted-foreground`,!N.isPending&&`sr-only`),children:N.isPending?`Loading the review...`:Y?`Showing ${Y.length} ${Y.length===1?`task`:`tasks`} with activity in this ${Z}.`:``}),N.isError&&(0,K.jsxs)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:[`Failed to load the review: `,N.error.message]}),Y?.length===0&&(0,K.jsx)(ye,{title:U?.entries.length===0?`No recorded activity in this ${Z}.`:`No recorded activity in this ${Z} matches the filters.`,hint:M?`This saved review keeps the tasks it had when it was saved.`:U?.entries.length===0?`Toodo records each task as it is planned, started, opened for review, and completed, with the commits of its branch, so reviews fill up as you work. Work merged before Toodo tracked it is not here: ${B?`import the pull requests you merged in this ${Z} to add it.`:`add a workspace with a GitHub repository to import the pull requests you merged.`}`:`Pick another period or change the filters to look at other work.`,action:M?void 0:(0,K.jsxs)(`div`,{className:`flex flex-wrap justify-center gap-2 print:hidden`,children:[U?.entries.length===0&&B&&(0,K.jsx)(d,{size:`sm`,disabled:L.isPending,onClick:()=>void Ie(),children:L.isPending?`Importing...`:`Import merged pull requests`}),(0,K.jsxs)(d,{size:`sm`,variant:`outline`,onClick:()=>Q(C(t,-1)),children:[`Show the `,Z,` before`]})]})}),U&&Y&&Y.length>0&&(0,K.jsx)(Me,{shown:U,entries:Y,workspaces:V}),U&&Y&&(0,K.jsx)(je,{shown:U,entries:Y,editable:!M}),W.kind===`year`&&Y&&(0,K.jsx)(Ae,{entries:Y}),Y&&se(Y).map(t=>(0,K.jsxs)(`section`,{"aria-label":x[t.outcome],className:`flex flex-col gap-2`,children:[(0,K.jsxs)(`h3`,{className:i(`text-sm font-semibold`,xe[t.outcome]),children:[x[t.outcome],` `,(0,K.jsxs)(`span`,{className:`font-normal text-muted-foreground`,children:[`(`,t.entries.length,`)`]})]}),(0,K.jsx)(`ul`,{className:`flex flex-col divide-y rounded-lg border`,children:t.entries.map(({task:t,at:n,commits:r,archived:a})=>(0,K.jsxs)(`li`,{className:`flex flex-col gap-1 px-3 py-2`,children:[(0,K.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,K.jsx)(v,{type:t.taskType}),(0,K.jsxs)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:[`#`,t.id]}),(0,K.jsx)(`button`,{type:`button`,"aria-label":`Open #${t.id} ${t.title}`,title:t.title,onClick:()=>e?.(t.id),className:`min-w-0 flex-1 truncate text-left text-sm font-medium hover:underline max-md:min-h-11`,children:t.title}),t.resolution===`not_adopted`&&(0,K.jsx)(`span`,{className:Se,children:`Not adopted`}),a&&(0,K.jsx)(`span`,{className:Se,children:`Archived`}),t.resolution===`completed`&&(0,K.jsx)(`span`,{className:i(`shrink-0 rounded-full px-2 py-0.5 text-xs font-medium`,m.success),children:`Completed`}),t.pullRequestUrl&&(0,K.jsx)(ke,{url:t.pullRequestUrl,stats:t.pullRequest}),(0,K.jsxs)(`span`,{className:`shrink-0 text-xs text-muted-foreground max-md:hidden print:inline`,children:[H.get(t.workspaceId)??`Workspace ${t.workspaceId}`,` · `,(0,K.jsx)(P,{at:n})]})]}),(0,K.jsx)(ve,{task:t}),a||M?null:g?.id===t.id?(0,K.jsx)(he,{task:t,capabilities:pe(F.data?.find(({id:e})=>e===t.workspaceId)),focusPlan:g.field,onDone:()=>b(null)}):(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground empty:hidden print:hidden`,children:(0,K.jsx)(le,{task:t,onEdit:e=>b({id:t.id,field:e})})}),t.completionNote&&(0,K.jsx)(`p`,{"aria-label":`Completion note of #${t.id}`,className:`whitespace-pre-line break-words-keep text-xs`,children:t.completionNote}),U&&(0,K.jsx)(Oe,{task:t,shown:U}),r.length>0&&(0,K.jsx)(`ul`,{"aria-label":`Commits of #${t.id} this ${Z}`,className:`flex flex-col gap-0.5`,children:r.map(e=>(0,K.jsxs)(`li`,{className:`flex gap-2 text-xs`,title:e.author,children:[(0,K.jsx)(`code`,{className:`shrink-0 text-muted-foreground`,children:e.sha.slice(0,7)}),(0,K.jsx)(`span`,{className:`truncate`,children:_e(e.message)})]},e.sha))})]},t.id))})]},t.outcome))]})}function X(e){return e===0?`0h`:N(e)}function Oe({task:e,shown:t}){let{start:n,end:r,now:i}=t,a=V(e.timeline,i),o=S(e.timeline,i);if(a===null||o===null)return null;let s=b(e.timeline).filter(e=>e.state===`paused`&&e.start<r&&(e.end??i)>n);return(0,K.jsxs)(`div`,{"aria-label":`Time of #${e.id}`,className:`flex flex-col gap-0.5 text-xs text-muted-foreground`,children:[(0,K.jsxs)(`p`,{children:[X(a),` active, `,X(o),` waiting`]}),s.length>0&&(0,K.jsx)(`ul`,{"aria-label":`Waits of #${e.id}`,className:`flex flex-col gap-0.5`,children:s.map(e=>(0,K.jsxs)(`li`,{className:`break-words-keep`,children:[`Waiting `,X(Math.max((e.end??i)-e.start,0)),` from `,A(e.start),e.end===null&&`, still waiting`,`: `,e.reason??`no reason recorded`]},e.start))})]})}function ke({url:e,stats:t}){let n=T(e),r=t=>{t.preventDefault(),U(e).catch(t=>console.error(`Failed to open ${e}`,t))};return(0,K.jsx)(`a`,{href:e,title:t?`${e} \u00b7 ${D(t)}`:e,"aria-label":n?`Pull request #${n}`:`Pull request`,onClick:r,onAuxClick:r,className:`shrink-0 text-xs text-primary underline underline-offset-2 hover:no-underline max-md:inline-flex max-md:min-h-11 max-md:items-center`,children:n?`#${n}`:`PR`})}function Ae({entries:e}){let t=O(e);return t===null?null:(0,K.jsxs)(`section`,{"aria-labelledby":`year-in-review-heading`,className:`flex flex-col gap-3 rounded-lg border p-3`,children:[(0,K.jsx)(`h3`,{id:`year-in-review-heading`,className:`text-sm font-semibold`,children:`Year in review`}),t.pullRequests&&(0,K.jsxs)(`dl`,{className:`flex flex-wrap gap-x-6 gap-y-2`,children:[(0,K.jsxs)(`div`,{className:`flex flex-col`,children:[(0,K.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Merged pull requests`}),(0,K.jsx)(`dd`,{className:`text-lg font-semibold`,children:t.pullRequests.pullRequests})]}),(0,K.jsxs)(`div`,{className:`flex flex-col`,children:[(0,K.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Lines changed`}),(0,K.jsxs)(`dd`,{className:`text-lg font-semibold`,children:[(0,K.jsxs)(`span`,{children:[`+`,t.pullRequests.additions]}),(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:` / `}),(0,K.jsxs)(`span`,{children:[`-`,t.pullRequests.deletions]})]})]}),(0,K.jsxs)(`div`,{className:`flex flex-col`,children:[(0,K.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Files changed`}),(0,K.jsx)(`dd`,{className:`text-lg font-semibold`,children:t.pullRequests.changedFiles})]}),(0,K.jsxs)(`div`,{className:`flex flex-col`,children:[(0,K.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Reviews`}),(0,K.jsxs)(`dd`,{className:`text-lg font-semibold`,title:k(t.pullRequests),children:[t.pullRequests.reviews,(0,K.jsxs)(`span`,{className:`ml-1 text-xs font-normal text-muted-foreground`,children:[`on `,t.pullRequests.reviewed,` of `,t.pullRequests.pullRequests]})]})]})]}),t.largest.length>0&&(0,K.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,K.jsx)(`h4`,{className:`text-xs text-muted-foreground`,children:`Largest pull requests`}),(0,K.jsx)(`ol`,{"aria-label":`Largest pull requests`,className:`flex flex-col gap-1`,children:t.largest.map(({task:e,pullRequest:t})=>(0,K.jsxs)(`li`,{className:`flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5 text-sm`,children:[(0,K.jsx)(v,{type:e.taskType}),(0,K.jsx)(`span`,{className:`truncate font-medium`,children:e.title}),(0,K.jsx)(`span`,{className:`ml-auto shrink-0 text-xs text-muted-foreground`,children:D(t)})]},e.id))})]}),t.research.length>0&&(0,K.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,K.jsx)(`h4`,{className:`text-xs text-muted-foreground`,children:`Research conclusions`}),(0,K.jsx)(`ul`,{"aria-label":`Research conclusions`,className:`flex flex-col divide-y rounded-md border`,children:t.research.map(({task:e,at:t,adopted:n})=>(0,K.jsxs)(`li`,{className:`flex flex-col gap-1 px-2 py-1.5`,children:[(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5 text-sm`,children:[(0,K.jsx)(`span`,{className:`truncate font-medium`,children:e.title}),(0,K.jsx)(`span`,{className:i(`shrink-0 rounded-full px-2 py-0.5 text-xs font-medium`,n?m.success:m.neutral),children:n?`Adopted`:`Not adopted`}),(0,K.jsx)(P,{className:`ml-auto shrink-0 text-xs text-muted-foreground`,at:t})]}),(0,K.jsx)(`p`,{"aria-label":`Research conclusion of #${e.id}`,className:`whitespace-pre-line break-words-keep text-xs`,children:e.completionNote??(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:`No conclusion written.`})})]},e.id))})]}),t.overruns.length>0&&(0,K.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,K.jsx)(`h4`,{className:`text-xs text-muted-foreground`,children:`Largest estimate overruns`}),(0,K.jsx)(`ol`,{"aria-label":`Largest estimate overruns`,className:`flex flex-col gap-1`,children:t.overruns.map(({task:e,estimated:t,actual:n})=>(0,K.jsxs)(`li`,{className:`flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5 text-sm`,children:[(0,K.jsx)(v,{type:e.taskType}),(0,K.jsx)(`span`,{className:`truncate font-medium`,children:e.title}),(0,K.jsxs)(`span`,{className:`ml-auto shrink-0 text-xs text-muted-foreground`,children:[`estimated `,N(t),`, `,N(n),` active`]})]},e.id))})]})]})}function je({shown:e,entries:t,editable:n}){let r=L(e.end,t,e.now),a=n?t.filter(({archived:e})=>!e).map(({task:e})=>M(e)):[],o=a.filter(e=>e.includes(`estimate`)).length,s=a.filter(e=>e.includes(`dueDate`)).length;if(r===null&&o+s===0)return null;let c=(0,K.jsxs)(`div`,{className:`contents`,children:[(0,K.jsx)(`dt`,{className:`text-muted-foreground`,children:`Missing plan`}),(0,K.jsxs)(`dd`,{children:[[o>0&&`${q(o,`task`)} without an estimate`,s>0&&`${q(s,`task`)} without a due date`].filter(Boolean).join(`, `),`; add them from the marks on the tasks below`]})]});return(0,K.jsxs)(`section`,{"aria-labelledby":`plan-heading`,className:`flex flex-col gap-3 rounded-lg border p-3`,children:[(0,K.jsx)(`h3`,{id:`plan-heading`,className:`text-sm font-semibold`,children:`Plan vs actual`}),r===null?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`p`,{className:`text-sm`,children:`No reviewed task has an estimate or a due date, so there is nothing to compare yet.`}),(0,K.jsx)(`dl`,{className:`grid gap-x-4 gap-y-1 text-sm sm:grid-cols-[auto_1fr]`,children:c})]}):(0,K.jsxs)(`dl`,{className:`grid gap-x-4 gap-y-1 text-sm sm:grid-cols-[auto_1fr]`,children:[(0,K.jsxs)(`div`,{className:`contents`,children:[(0,K.jsx)(`dt`,{className:`text-muted-foreground`,children:`Estimate vs active time`}),(0,K.jsx)(`dd`,{children:r.time?B(r.time):`No completed task had an estimate`})]}),(0,K.jsxs)(`div`,{className:`contents`,children:[(0,K.jsx)(`dt`,{className:`text-muted-foreground`,children:`Due dates met`}),(0,K.jsx)(`dd`,{children:r.dueDates?H(r.dueDates):`No completed task had a due date`})]}),o+s>0&&c]}),r!==null&&r.late.length>0&&(0,K.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,K.jsx)(`h4`,{className:`text-xs text-muted-foreground`,children:`Late tasks`}),(0,K.jsx)(`ul`,{"aria-label":`Late tasks`,className:`flex flex-col gap-1`,children:r.late.map(e=>(0,K.jsxs)(`li`,{className:`flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5 text-sm`,children:[(0,K.jsxs)(`span`,{className:`flex min-w-0 max-w-full items-center gap-2`,children:[(0,K.jsx)(v,{type:e.task.taskType}),(0,K.jsx)(`span`,{className:`truncate font-medium`,children:e.task.title})]}),(0,K.jsx)(`span`,{className:i(`ml-auto shrink-0 text-xs`,f.danger),children:z(e)})]},e.task.id))})]})]})}function Me({shown:e,entries:t,workspaces:n}){let r=w(e.period,t,n,e.timeZone),a=Math.max(1,...(r.completedPerMonth??[]).map(({count:e})=>e));return(0,K.jsxs)(`section`,{"aria-label":`Summary`,className:`flex flex-col gap-3 rounded-lg border p-3`,children:[(0,K.jsxs)(`dl`,{className:`flex flex-wrap gap-x-6 gap-y-2`,children:[r.outcomes.map(({outcome:e,count:t})=>(0,K.jsxs)(`div`,{className:`flex flex-col`,children:[(0,K.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:x[e]}),(0,K.jsx)(`dd`,{className:`text-lg font-semibold`,children:t})]},e)),r.notAdopted>0&&(0,K.jsxs)(`div`,{className:`flex flex-col`,children:[(0,K.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Not adopted`}),(0,K.jsx)(`dd`,{className:`text-lg font-semibold`,children:r.notAdopted})]}),(0,K.jsxs)(`div`,{className:`flex flex-col`,children:[(0,K.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Commits`}),(0,K.jsx)(`dd`,{className:`text-lg font-semibold`,children:r.commits})]})]}),(0,K.jsxs)(`dl`,{className:`grid gap-x-4 gap-y-1 text-sm sm:grid-cols-[auto_1fr]`,children:[I.map(e=>{let t=r[e];return(0,K.jsxs)(`div`,{className:`contents`,children:[(0,K.jsx)(`dt`,{className:`text-muted-foreground`,children:F[e]}),(0,K.jsx)(`dd`,{children:t===null?`No data`:`${N(t.median)} (${t.tasks} ${t.tasks===1?`task`:`tasks`})`})]},e)}),r.changes&&(0,K.jsxs)(`div`,{className:`contents`,children:[(0,K.jsx)(`dt`,{className:`text-muted-foreground`,children:`Changes in completed pull requests`}),(0,K.jsx)(`dd`,{children:R(r.changes)})]}),r.completedByType.length>0&&(0,K.jsxs)(`div`,{className:`contents`,children:[(0,K.jsx)(`dt`,{className:`text-muted-foreground`,children:`Completed by type`}),(0,K.jsx)(`dd`,{children:r.completedByType.map(({taskType:e,count:t})=>`${e} ${t}`).join(`, `)})]}),r.completedByWorkspace.length>0&&(0,K.jsxs)(`div`,{className:`contents`,children:[(0,K.jsx)(`dt`,{className:`text-muted-foreground`,children:`Completed by workspace`}),(0,K.jsx)(`dd`,{children:r.completedByWorkspace.map(({workspace:e,count:t})=>`${e} ${t}`).join(`, `)})]})]}),r.completedPerMonth&&(0,K.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,K.jsx)(`h3`,{className:`text-xs text-muted-foreground`,children:`Completed per month`}),(0,K.jsx)(`ul`,{"aria-label":`Completed per month`,className:`flex flex-col gap-0.5`,children:r.completedPerMonth.map(({month:e,count:t})=>(0,K.jsxs)(`li`,{className:`flex items-center gap-2 text-xs`,children:[(0,K.jsx)(`span`,{className:`w-16 shrink-0 font-mono text-muted-foreground`,children:e}),(0,K.jsx)(`span`,{"aria-hidden":!0,className:i(`h-2 rounded-sm`,h.success),style:{width:`${t/a*60}%`,minWidth:t>0?4:0}}),(0,K.jsx)(`span`,{children:t})]},e))})]})]})}export{Y as Review};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e,n as t,r as n,s as r,t as i}from"./dist-ZmB2kPfR.js";import{B as a,Bt as o,J as s,K as c,L as l,V as u,cn as d,d as f,et as p,qt as m,xt as h}from"./status-styles-Bg6qTX-E.js";import{f as g,g as _,h as v}from"./event-CwtUqkXR.js";var y={name:`ban`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M4.929 4.929 19.07 19.071`,key:`196cmz`}]]};y.node;var b=t(y),x={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};x.node;var S=t(x),C={name:`chevron-left`,size:24,node:[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]};C.node;var w=t(C),T={name:`laptop`,size:24,node:[[`path`,{d:`M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z`,key:`1pdavp`}],[`path`,{d:`M20.054 15.987H3.946`,key:`14rxg9`}]]};T.node;var E=t(T),D={name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]};D.node;var O=t(D),k={name:`server`,size:24,node:[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]};k.node;var A=t(k),j={name:`triangle-alert`,size:24,node:[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`alert-triangle`]};j.node;var M=t(j),N={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};N.node;var P=t(N),F=r(e(),1),I=n();function ee(e,t){if(e===null)return;let n=[...e.querySelectorAll(`a[href], button, input, select, textarea, summary, [tabindex]`)].filter(e=>!e.matches(`:disabled, [tabindex='-1']`)&&e.getClientRects().length>0);if(n.length===0)return;let r=n[0],i=n[n.length-1],a=document.activeElement,o=a instanceof Node&&e.contains(a);(t.shiftKey?!o||a===r:!o||a===i)&&(t.preventDefault(),(t.shiftKey?i:r).focus())}function L(e){let t=/^[a-zA-Z]:/.test(e)||e.startsWith(`\\\\`)||e.includes(`\\`)&&!e.includes(`/`),n=t?`\\`:`/`,r=``,i=e,a=t?/^[\\/]{2}[^\\/]+[\\/]+[^\\/]+/.exec(e):null,o=t?/^[a-zA-Z]:([\\/]?)/.exec(e):null;a?(r=`${a[0].replace(/[\\/]+/g,`\\`).replace(/^\\/,`\\\\`)}\\`,i=e.slice(a[0].length)):o?(r=o[0].slice(0,2)+(o[1]?n:``),i=e.slice(o[0].length)):/^[\\/]/.test(e)&&(r=n,i=e.replace(/^[\\/]+/,``));let s=[];for(let e of i.split(t?/[\\/]+/:/\/+/))e!==``&&e!==`.`&&(e===`..`?s.length>0&&s[s.length-1]!==`..`?s.pop():r===``&&s.push(e):s.push(e));return{root:r,separator:n,segments:s}}function R(e){let{root:t,separator:n,segments:r}=L(e),i=t+r.join(n);return i===``?`.`:i}function z(e){return/^[a-zA-Z]:/.test(e)||e.startsWith(`\\\\`)}function B(e,t=2){let{separator:n,segments:r}=L(e);return r.length<=t?R(e):`…${n}${r.slice(-t).join(n)}`}var V=200;function H(e,t){let n=z(e)?`\\`:`/`;return/[\\/]$/.test(e)?`${e}${t}`:`${e}${n}${t}`}function te(e){return e.replace(/(?<=[^\\/:])[\\/]+$/,``)}function U(e,t){let[n,r]=(0,F.useState)(e);return(0,F.useEffect)(()=>{let n=setTimeout(()=>r(e),t);return()=>clearTimeout(n)},[e,t]),n}function ne({id:e,machine:t,value:n,onChange:r,describedBy:a,required:o,autoFocus:s,className:c}){let[l,d]=(0,F.useState)(!1),[f,p]=(0,F.useState)(-1),m=Math.max(n.lastIndexOf(`/`),n.lastIndexOf(`\\`)),h=m<0?null:n.slice(0,m+1),g=n.slice(m+1).toLowerCase(),_=U(h,V),v=u(t,l?_:null),y=l&&h!==null&&_===h,b=y&&v.data?v.data.directories.filter(e=>e.toLowerCase().startsWith(g)):[],x=b.length>0,S=`${e}-folders`,C=t.kind===`local`?`the server`:t.label;function w(e){r(e),p(-1),d(!0)}function T(e){h!==null&&w(`${H(h,e)}${z(h)?`\\`:`/`}`)}function E(e){if(e.key===`ArrowDown`||e.key===`ArrowUp`){if(e.preventDefault(),!x){d(!0);return}let t=b.length,n=e.key===`ArrowDown`;p(e=>e<0?n?0:t-1:(e+(n?1:t-1))%t)}else if(e.key===`Enter`){if(!x||f<0)return;e.preventDefault(),T(b[f])}else if(e.key===`Tab`){if(!x||e.shiftKey||f<0&&g===``)return;e.preventDefault(),e.stopPropagation(),T(b[Math.max(f,0)])}else if(e.key===`Escape`){if(!x)return;e.preventDefault(),e.stopPropagation(),d(!1)}}return(0,I.jsxs)(`div`,{className:`relative min-w-0 flex-1`,children:[(0,I.jsx)(`input`,{id:e,role:`combobox`,"aria-expanded":x,"aria-controls":S,"aria-autocomplete":`list`,"aria-activedescendant":x&&f>=0?`${S}-${f}`:void 0,"aria-describedby":a,autoComplete:`off`,spellCheck:!1,className:c,value:n,onChange:e=>w(e.target.value),onFocus:()=>d(!0),onBlur:()=>d(!1),onKeyDown:E,required:o,autoFocus:s}),x&&(0,I.jsx)(`ul`,{id:S,role:`listbox`,"aria-label":`Folders in ${h}`,className:`absolute top-full right-0 left-0 z-10 mt-1 flex max-h-56 flex-col overflow-y-auto rounded-lg border bg-popover p-1 font-mono text-xs text-popover-foreground shadow-md`,children:b.map((e,t)=>(0,I.jsxs)(`li`,{id:`${S}-${t}`,role:`option`,"aria-selected":t===f,onMouseDown:e=>e.preventDefault(),onClick:()=>T(e),className:i(`cursor-pointer truncate rounded px-1.5 py-1 hover:bg-muted max-md:py-2`,t===f&&`bg-secondary hover:bg-secondary`),children:[e,z(h??``)?`\\`:`/`]},e))}),y&&v.isError&&(0,I.jsxs)(`p`,{role:`status`,className:`mt-1 text-xs break-words text-muted-foreground`,children:[`No suggestions: `,v.error.message,`. Type the path of a folder that exists on `,C,`, ending in a separator, to see its subfolders.`]})]})}var re=[`none`,`local_git`,`github`],ie=[`manual`,`local_merge`,`pr_merge`],ae=[`herdr`,`plain`,`tmux`,`none`],oe=[`open`,`init`,`clone`],W={none:`Plain folder`,local_git:`Local git`,github:`GitHub`},G={manual:`Manual`,local_merge:`Local merge`,pr_merge:`PR merge`},K={none:`No runner`,herdr:`herdr`,plain:`Plain`,tmux:`tmux`},se={open:`Open existing`,init:`New repository`,clone:`Clone URL`};function q(e){return e===`none`?`manual`:e===`local_git`?`local_merge`:`pr_merge`}function ce(e,t=!1){return e===`none`?`none`:t?`plain`:`herdr`}function le(e){return e===`none`?null:`open`}function ue(e,t){switch(t){case`manual`:return null;case`local_merge`:return e===`local_git`?null:e===`none`?`Needs a git repository; choose source Local git`:`GitHub tasks merge through pull requests; choose source Local git`;case`pr_merge`:return e===`github`?null:e===`none`?`Needs a git repository; choose source GitHub`:`Needs a GitHub origin remote; choose source GitHub`}}function de(e,t,n){return n!==`none`&&e===`none`?`Needs a git repository for task worktrees; choose source Local git or GitHub`:n===`none`&&t!==`manual`?`${G[t]} needs the task branch that herdr, ${K.plain}, or ${K.tmux} creates; choose completion Manual`:null}function fe(e,t){return e===`tmux`&&t.kind===`ssh`&&z(t.path)?`Needs a POSIX host; choose ${K.plain} or ${K.herdr} for a Windows SSH workspace, or choose a POSIX path for ${K.tmux}`:null}function pe(e,t){return e===`none`?`A plain folder has no repository; choose source Local git or GitHub`:e===`github`&&t===`init`?`A new repository has no GitHub origin; choose source Local git`:null}function me(e,t=!1){let{source:n}=e,r=e.repository!==null&&pe(n,e.repository)===null?e.repository:le(n),i=e.completion!==null&&ue(n,e.completion)===null?e.completion:q(n);return{source:n,repository:r,completion:i,runner:e.runner!==null&&de(n,i,e.runner)===null?e.runner:ce(n,t)}}function he(e,t,n=!1){let r={...e,...t},i=me(r,n);return{source:r.source,repository:r.repository===i.repository?r.repository:null,completion:r.completion===i.completion?r.completion:null,runner:r.runner===i.runner?r.runner:null}}var J=`h-8 w-full min-w-0 rounded-lg border border-input bg-background px-2.5 text-sm outline-none max-md:h-11 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50`,Y=`h-6 rounded-md border border-input bg-background px-1.5 text-xs outline-none max-md:h-11 max-md:px-2.5 max-md:text-sm focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50`;function X(e){let t=R(e.path);return e.kind===`local`?t:`${e.machine}:${t}`}function ge(e){let t=B(e.path);return e.kind===`local`?t:`${e.machine}:${t}`}var _e={foreign:`Windows path, not on this server`,missing:`Folder not found on the server`};function ve({problem:e,className:t}){return(0,I.jsxs)(`span`,{className:i(`flex min-w-0 items-start gap-1 text-xs text-destructive`,t),title:`Toodo cannot run git in this repository until its path is corrected`,children:[(0,I.jsx)(M,{"aria-hidden":`true`,className:`mt-0.5 size-3 shrink-0`}),(0,I.jsx)(`span`,{children:_e[e]})]})}function ye({workspace:e}){let t=W[e.source],n=G[e.completion],r=K[e.runner];return(0,I.jsxs)(`span`,{className:`text-xs text-muted-foreground`,title:`Source ${t}, completion ${n}, runner ${r}; set when the workspace was added`,children:[(0,I.jsx)(`span`,{className:`whitespace-nowrap`,children:t}),` · `,(0,I.jsx)(`span`,{className:`whitespace-nowrap`,children:n}),` `,`· `,(0,I.jsx)(`span`,{className:`whitespace-nowrap`,children:r})]})}function be(e){return e.kind===`local`?null:e.machine}function xe(e,t){let n=t.filter(t=>t.target===e);return n.length===0?`Not saved in herdr`:n.some(e=>e.enabled)?null:`Disabled in herdr`}function Se(e){return/[\\/]$/.test(e)?e:H(e,``)}function Z({label:e,help:t,children:n}){let r=(0,F.useId)(),i=`${r}-help`;return(0,I.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,I.jsx)(`label`,{htmlFor:r,className:`text-xs text-muted-foreground`,children:e}),n({id:r,describedBy:t?i:void 0}),t&&(0,I.jsx)(`p`,{id:i,className:`text-xs text-muted-foreground`,children:t})]})}function Ce(e){return e.replace(/[\\/]+$/,``).split(/[\\/]/).pop()??``}function we(e){return Ce(e.trim().replace(/\.git$/,``)).split(`:`).pop()??``}function Te({selectedId:e,onSelect:t}){let n=m(),r=(0,F.useSyncExternalStore)(v,g),i=r===`unreachable`||r===`retrying`,a=c(),o=h().data?.herdr.installed===!1,[s,l]=(0,F.useState)(null),u=(0,F.useRef)(null),f=()=>{l(null),u.current?.focus()},[p,y]=(0,F.useState)(!1),b=a.data??[],x=[null,...new Set([...b.map(e=>e.target),...(n.data??[]).flatMap(e=>e.location.kind===`ssh`?[e.location.machine]:[])])];return(0,I.jsxs)(`section`,{"aria-labelledby":`workspaces-heading`,className:`flex shrink-0 flex-col gap-2`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,I.jsx)(`h2`,{id:`workspaces-heading`,className:`text-xs font-medium uppercase text-muted-foreground`,children:`Workspaces`}),(0,I.jsxs)(d,{variant:`ghost`,size:`xs`,onClick:()=>y(e=>!e),children:[!p&&(0,I.jsx)(O,{}),p?`Cancel`:`Add machine`]})]}),p&&(0,I.jsx)(Oe,{herdrMissing:o,onClose:()=>y(!1)}),a.isError&&(o?(0,I.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`herdr is not installed on this server, so there are no SSH machines; workspaces on Local can use runner`,` `,K.plain,`.`]}):(0,I.jsxs)(`p`,{role:`alert`,className:`text-xs text-destructive`,children:[`Failed to list herdr machines: `,a.error.message]})),n.isPending&&!i&&(0,I.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Loading workspaces...`}),(n.isError||n.isPending&&i)&&(0,I.jsxs)(`div`,{role:`alert`,className:`flex flex-col items-start gap-2 text-sm text-destructive`,children:[(0,I.jsxs)(`p`,{children:[`Failed to load workspaces:`,` `,n.error?.message??(_()||`The Toodo server does not answer.`)]}),(0,I.jsx)(d,{size:`xs`,variant:`outline`,onClick:()=>void n.refetch(),children:`Retry now`})]}),n.data?.length===0&&s===null&&(0,I.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No workspaces yet.`}),(0,I.jsx)(`div`,{className:`flex flex-col gap-3`,children:n.data&&x.map(r=>{let i=r??`Local`,o=n.data.filter(e=>be(e.location)===r),c=r!==null&&a.isSuccess?xe(r,b):null;return(0,I.jsxs)(`section`,{"aria-label":`Machine ${i}`,className:`flex flex-col gap-1`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,I.jsxs)(`h3`,{className:`flex min-w-0 flex-1 items-center gap-1.5 px-1 text-xs font-semibold`,children:[r===null?(0,I.jsx)(E,{"aria-hidden":!0,className:`size-3.5 shrink-0 text-muted-foreground`}):(0,I.jsx)(A,{"aria-hidden":!0,className:`size-3.5 shrink-0 text-muted-foreground`}),(0,I.jsx)(`span`,{className:`truncate`,children:i}),c&&(0,I.jsx)(`span`,{className:`ml-1.5 font-normal text-destructive`,children:c})]}),(0,I.jsxs)(d,{size:`xs`,variant:`outline`,"aria-label":`Add workspace on ${i}`,title:`Add a workspace on this machine`,"aria-haspopup":`dialog`,"aria-expanded":s!==null&&s.machine===r,onClick:e=>{u.current=e.currentTarget,l({machine:r})},children:[(0,I.jsx)(O,{}),`Add`]})]}),o.length>0&&(0,I.jsx)(`ul`,{className:`flex flex-col gap-1`,children:o.map(n=>(0,I.jsx)(Ee,{workspace:n,selected:n.id===e,onSelect:t},n.id))})]},i)})}),s&&(0,I.jsx)(Le,{machine:s.machine,onCreated:e=>{f(),t(e.id)},onClose:f})]})}function Ee({workspace:e,selected:t,onSelect:n}){let r=a(),[o,s]=(0,F.useState)(!1);return(0,I.jsxs)(`li`,{className:`flex flex-col gap-1`,children:[(0,I.jsxs)(`div`,{className:i(`group flex items-center rounded-lg hover:bg-sidebar-accent`,t&&`bg-sidebar-accent`),children:[(0,I.jsxs)(`button`,{type:`button`,"aria-current":t?`true`:void 0,onClick:()=>n(e.id),className:`flex min-w-0 flex-1 flex-col px-2.5 py-1.5 text-left`,children:[(0,I.jsx)(`span`,{className:`truncate text-sm font-medium`,children:e.name}),(0,I.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,title:X(e.location),children:B(e.location.path)}),(0,I.jsx)(ye,{workspace:e}),e.pathProblem&&(0,I.jsx)(ve,{problem:e.pathProblem})]}),!o&&(0,I.jsx)(d,{size:`icon-xs`,variant:`ghost`,"aria-label":`Remove ${e.name}`,title:`Move the workspace and its tasks to the archive`,className:`mr-1 shrink-0 opacity-0 group-hover:opacity-100 hover:text-destructive focus-visible:opacity-100 [@media(hover:none)]:opacity-100`,onClick:()=>{r.reset(),s(!0)},children:(0,I.jsx)(P,{})})]}),o&&(0,I.jsxs)(`div`,{role:`group`,"aria-label":`Remove ${e.name}`,className:`flex flex-col gap-1.5 rounded-lg border p-2`,onKeyDown:e=>{e.key===`Escape`&&!r.isPending&&(e.preventDefault(),s(!1))},children:[(0,I.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Remove `,e.name,` and its tasks from Toodo? They move to Settings > Archive, where they can be restored. The repository, worktrees, and herdr workspaces are kept.`]}),r.isError&&(0,I.jsx)(`p`,{role:`alert`,className:`text-xs text-destructive`,children:r.error.message}),(0,I.jsxs)(`div`,{className:`flex gap-1`,children:[(0,I.jsx)(d,{changesData:!0,size:`xs`,variant:`destructive`,"aria-label":`Confirm remove ${e.name}`,disabled:r.isPending,onClick:()=>r.mutate(e.id),children:r.isPending?`Removing...`:`Remove`}),(0,I.jsx)(d,{size:`xs`,variant:`ghost`,autoFocus:!0,onClick:()=>s(!1),children:`Back`})]})]})]})}function Q(e,t=!1){return n=>{n.key===`Escape`&&!t&&!n.defaultPrevented&&(n.preventDefault(),e())}}function De({workspace:e,onClose:t}){let n=p(),r=c(),i=m(),[a,o]=(0,F.useState)(be(e.location)),[s,l]=(0,F.useState)(e.location.path),u=[...new Set([...(r.data??[]).map(e=>e.target),...(i.data??[]).flatMap(e=>e.location.kind===`ssh`?[e.location.machine]:[])])],f=te(s.trim());function h(r){r.preventDefault();let i=a===null?{kind:`local`,path:f}:{kind:`ssh`,machine:a,path:f};n.mutate({id:e.id,location:i},{onSuccess:t})}return(0,I.jsxs)(`form`,{onSubmit:h,"aria-label":`Move ${e.name}`,className:`flex flex-col gap-2 rounded-lg border p-2`,onKeyDown:Q(t,n.isPending),children:[(0,I.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Point the workspace at the same repository on another machine or in another folder. Its tasks stay. A repository on a Windows host takes a Windows path such as D:\\dev\\repo.`}),(0,I.jsx)(Z,{label:`Machine`,children:({id:e})=>(0,I.jsxs)(`select`,{id:e,className:J,value:a??``,onChange:e=>o(e.target.value===``?null:e.target.value),autoFocus:!0,children:[(0,I.jsx)(`option`,{value:``,children:`Local (this server)`}),u.map(e=>(0,I.jsx)(`option`,{value:e,children:e},e))]})}),(0,I.jsx)(Z,{label:`Folder`,help:`The repository's own folder on that machine.`,children:({id:e,describedBy:t})=>(0,I.jsx)(ne,{id:e,machine:a===null?{kind:`local`}:{kind:`ssh`,label:a},className:J,describedBy:t,value:s,onChange:l,required:!0})}),n.isError&&(0,I.jsx)(`p`,{role:`alert`,className:`text-xs break-words text-destructive`,children:n.error.message}),(0,I.jsxs)(`div`,{className:`flex gap-1`,children:[(0,I.jsx)(d,{type:`submit`,size:`sm`,disabled:n.isPending||f===``,children:n.isPending?`Moving...`:`Move workspace`}),(0,I.jsx)(d,{type:`button`,size:`sm`,variant:`ghost`,disabled:n.isPending,onClick:t,children:`Cancel`})]})]})}function Oe({herdrMissing:e,onClose:t}){let[n,r]=(0,F.useState)(null),[i,a]=(0,F.useState)(``),s=o(),c=(0,F.useId)(),l=`herdr machine add ${i.trim()||`<host>`}`;function u(e){e.preventDefault(),i.trim()!==``&&s.mutate(i.trim())}async function f(){try{await navigator.clipboard.writeText(l),r(`Copied the command.`)}catch(e){r(`Could not copy: ${String(e)}`)}}return(0,I.jsxs)(`section`,{"aria-label":`Add machine`,className:`flex flex-col gap-2 rounded-lg border p-2`,onKeyDown:Q(t),children:[(0,I.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[e&&`Install herdr on the server first; SSH machines need it. `,`Enter an SSH host from the server's ~/.ssh/config and test the connection. herdr asks questions in a terminal, which the Toodo server cannot open, so then run the command below in a terminal on the server and reload the machine list here.`]}),(0,I.jsxs)(`form`,{"aria-label":`Test SSH connection`,className:`flex flex-col gap-1`,onSubmit:u,children:[(0,I.jsx)(`label`,{htmlFor:c,className:`text-xs font-medium`,children:`SSH host`}),(0,I.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,I.jsx)(`input`,{id:c,className:J,value:i,placeholder:`devbox`,autoComplete:`off`,spellCheck:!1,onChange:e=>{a(e.target.value),s.reset()}}),(0,I.jsx)(d,{type:`submit`,size:`sm`,variant:`outline`,disabled:i.trim()===``||s.isPending,children:s.isPending?`Testing...`:`Test connection`})]})]}),s.isError&&(0,I.jsxs)(`p`,{role:`alert`,className:`text-xs text-destructive`,children:[`Could not test the connection: `,s.error.message]}),s.data?.problem&&(0,I.jsx)(`p`,{role:`alert`,className:`text-xs text-destructive`,children:s.data.problem}),s.data?.gitVersion&&(0,I.jsxs)(`p`,{role:`status`,className:`text-xs text-muted-foreground`,children:[`Connected to `,s.variables,` without a prompt and found `,s.data.gitVersion,`. Run the command below to save it in herdr.`]}),(0,I.jsxs)(`div`,{className:`flex flex-col items-start gap-1`,children:[(0,I.jsx)(`code`,{className:`max-w-full rounded bg-muted px-1.5 py-1 text-xs`,"aria-label":`Add machine command`,children:l}),(0,I.jsx)(d,{type:`button`,size:`sm`,variant:`outline`,onClick:()=>void f(),children:`Copy command`})]}),n&&(0,I.jsx)(`p`,{role:`status`,className:`text-xs text-muted-foreground`,children:n})]})}var ke=[`Source`,`Completion`,`Runner`,`Details`],Ae={none:`A folder without git. Tasks get no branch, worktree, or pull request.`,local_git:`A git repository without GitHub. Task branches merge locally.`,github:`A git repository with a GitHub origin. Tasks ship as pull requests.`},je={open:`The folder already holds the repository.`,init:`Make a folder a new git repository without a remote.`,clone:`Clone a repository URL into a new folder.`},Me={manual:`When its criteria are met; nothing is merged.`,local_merge:`Once its branch is merged into the base branch locally.`,pr_merge:`Once its pull request is merged into the base branch.`},Ne=`https://github.com/dev-bokdong/toodo/blob/main/docs/runners.md`,Pe={herdr:`Opens agents in herdr on a worktree and branch of the task.`,plain:`Runs Claude or Codex in the background in a worktree and branch of the task, without herdr.`,tmux:`Runs Claude or Codex in a tmux session in a worktree and branch of the task, without herdr.`,none:`Only marks the task in progress.`};function Fe(e){return e?`herdr is not running on this server; start it there before starting tasks, or choose ${K.plain}.`:`herdr is not running on this server since it is not installed there; install and start herdr before starting tasks, or choose ${K.plain}.`}var Ie={clone:{submit:`Clone workspace`,pending:`Cloning...`},open:{submit:`Open workspace`,pending:`Opening...`},init:{submit:`Init workspace`,pending:`Initializing...`},none:{submit:`Add workspace`,pending:`Adding...`}};function $({legend:e,value:t,choices:n,onChange:r,autoFocus:a=!1}){let o=(0,F.useId)();return(0,I.jsxs)(`fieldset`,{className:`flex min-w-0 flex-col gap-1.5`,children:[(0,I.jsx)(`legend`,{className:`mb-1.5 text-sm font-medium`,children:e}),n.map(e=>{let n=e.value===t,s=e.problem!==null,c=s?null:e.note??null,l=`${o}-${e.value}`;return(0,I.jsxs)(`label`,{className:i(`flex items-start gap-2.5 rounded-lg border px-3 py-2 transition-colors has-focus-visible:border-ring has-focus-visible:ring-3 has-focus-visible:ring-ring/50`,s?`cursor-not-allowed border-dashed`:`cursor-pointer hover:bg-muted`,n&&`border-ring bg-secondary hover:bg-secondary`),children:[(0,I.jsx)(`input`,{type:`radio`,name:o,value:e.value,checked:n,disabled:s,autoFocus:a&&n,"aria-labelledby":l,"aria-describedby":c===null?`${l}-about`:`${l}-about ${l}-note`,onChange:()=>!s&&r(e.value),className:`mt-0.5 size-4 shrink-0 accent-primary`}),(0,I.jsxs)(`span`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,I.jsx)(`span`,{id:l,className:i(`text-sm font-medium`,s&&`text-muted-foreground`),children:e.label}),(0,I.jsxs)(`span`,{id:`${l}-about`,className:`flex items-start gap-1 text-xs text-muted-foreground`,children:[s&&(0,I.jsx)(b,{"aria-hidden":!0,className:`mt-0.5 size-3 shrink-0`}),e.problem??e.description]}),c!==null&&(0,I.jsxs)(`span`,{id:`${l}-note`,className:i(`flex items-start gap-1 text-xs`,f.attention),children:[(0,I.jsx)(M,{"aria-hidden":!0,className:`mt-0.5 size-3 shrink-0`}),c]})]})]},e.value)})]})}function Le({machine:e,onCreated:t,onClose:n}){let r=l(),a=(0,F.useRef)(null),o=(0,F.useId)(),[c,u]=(0,F.useState)(0),[f,p]=(0,F.useState)({source:`github`,repository:null,completion:null,runner:null}),[m,g]=(0,F.useState)(``),[_,v]=(0,F.useState)(null),[y,b]=(0,F.useState)(null),[x,C]=(0,F.useState)(``),T=e??`Local`,E=e===null?{kind:`local`}:{kind:`ssh`,label:e},D=h().data?.herdr,O=e===null&&D!==void 0&&!D.running?Fe(D.installed):null,k=O!==null,A=me(f,k),j=A.repository===`clone`,M=s(E).data,N=M===void 0?``:j?M:Se(M),L=_??N,R=!j&&_===null,z=y??(j?we(m):R?``:Ce(L)),B=j&&L.trim()&&z.trim()?H(L.trim(),z.trim()):te(L.trim()),V=c===ke.length-1,U=r.isPending,q=Ie[A.repository??`none`],ce=[W[A.source],G[A.completion],K[A.runner],T],le=j?void 0:A.source===`none`?`The folder the tasks are about. Toodo runs no git or herdr there.`:`The repository's own folder.`;function J(e){let t=he(f,e,k);me(t,k).repository===`clone`!==j&&v(null),p(t)}function Y(e){u(e)}function X(){U||n()}function ge(n){if(n.preventDefault(),!V){Y(c+1);return}let i={name:z,location:e===null?{kind:`local`,path:B}:{kind:`ssh`,machine:e,path:B},repository:A.repository===null?null:A.repository===`clone`?{kind:`clone`,url:m}:{kind:A.repository},source:A.source,completion:A.completion,runner:A.runner,defaultBaseBranch:A.source===`none`?null:x.trim()||null};r.mutate(i,{onSuccess:t})}return(0,I.jsxs)(`div`,{className:`fixed inset-0 z-50`,children:[(0,I.jsx)(`div`,{"aria-hidden":!0,className:`absolute inset-0 bg-black/40 max-md:hidden`,onClick:X}),(0,I.jsx)(`div`,{ref:a,role:`dialog`,"aria-modal":!0,"aria-labelledby":o,onKeyDown:e=>{e.key===`Tab`?ee(a.current,e.nativeEvent):Q(n,U)(e)},className:i(`relative flex flex-col overflow-hidden bg-background text-foreground`,`max-md:h-full max-md:pt-[env(safe-area-inset-top)] max-md:pb-[env(safe-area-inset-bottom)]`,`md:absolute md:top-1/2 md:left-1/2 md:h-[min(40rem,calc(100dvh-4rem))] md:w-[min(36rem,calc(100vw-4rem))] md:-translate-x-1/2 md:-translate-y-1/2 md:rounded-2xl md:border md:shadow-xl`),children:(0,I.jsxs)(`form`,{onSubmit:ge,className:`flex min-h-0 flex-1 flex-col`,children:[(0,I.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2 px-4 pt-3 pb-2 md:px-6 md:pt-4`,children:[(0,I.jsxs)(`h2`,{id:o,className:`min-w-0 flex-1 truncate text-base font-semibold`,children:[`New workspace on `,T]}),(0,I.jsx)(d,{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":`Close new workspace`,title:`Close (Esc)`,disabled:U,onClick:X,children:(0,I.jsx)(P,{})})]}),(0,I.jsx)(`ol`,{"aria-label":`Steps`,className:`grid shrink-0 grid-cols-2 gap-1 px-4 pb-3 md:grid-cols-4 md:px-6`,children:ke.map((e,t)=>{let n=t===c;return(0,I.jsx)(`li`,{className:`min-w-0`,children:(0,I.jsxs)(`button`,{type:`button`,"aria-current":n?`step`:void 0,disabled:U,onClick:()=>Y(t),className:i(`flex w-full min-w-0 items-center gap-2 rounded-lg px-2 py-1.5 text-left outline-none hover:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none`,n&&`bg-secondary hover:bg-secondary`),children:[(0,I.jsx)(`span`,{"aria-hidden":!0,className:i(`flex size-5 shrink-0 items-center justify-center rounded-full border text-xs font-medium`,n?`border-primary bg-primary text-primary-foreground`:`text-muted-foreground`),children:t+1}),(0,I.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,I.jsx)(`span`,{className:`text-xs font-medium`,children:e}),(0,I.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:ce[t]})]})]})},e)})}),(0,I.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto overscroll-contain border-t px-4 py-4 md:px-6`,children:[c===0&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)($,{legend:`What does the workspace folder hold?`,value:A.source,autoFocus:!0,choices:re.map(e=>({value:e,label:W[e],description:Ae[e],problem:null})),onChange:e=>J({source:e})}),A.source!==`none`&&(0,I.jsx)($,{legend:`How does the repository get there?`,value:A.repository,choices:oe.map(e=>({value:e,label:se[e],description:je[e],problem:pe(A.source,e)})),onChange:e=>J({repository:e})})]}),c===1&&(0,I.jsx)($,{legend:`When is a task done?`,value:A.completion,autoFocus:!0,choices:ie.map(e=>({value:e,label:G[e],description:Me[e],problem:ue(A.source,e)})),onChange:e=>J({completion:e})}),c===2&&(0,I.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,I.jsx)($,{legend:`What does starting a task do?`,value:A.runner,autoFocus:!0,choices:ae.map(t=>({value:t,label:K[t],description:Pe[t],note:t===`herdr`?O:null,problem:fe(t,{kind:e===null?`local`:`ssh`,path:B})??de(A.source,A.completion,t)})),onChange:e=>J({runner:e})}),(0,I.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Which one fits?`,` `,(0,I.jsx)(`a`,{href:Ne,target:`_blank`,rel:`noopener noreferrer`,className:`text-primary underline underline-offset-2 hover:no-underline`,children:`Compare the runners`})]})]}),V&&(0,I.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[j&&(0,I.jsx)(Z,{label:`Repository URL`,children:({id:e})=>(0,I.jsx)(`input`,{id:e,className:`h-8 w-full min-w-0 rounded-lg border border-input bg-background px-2.5 text-sm outline-none max-md:h-11 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50`,value:m,onChange:e=>g(e.target.value),required:!0,autoFocus:!0})}),(0,I.jsx)(Z,{label:j?`Parent folder`:`Folder`,help:le,children:({id:e,describedBy:t})=>(0,I.jsx)(ne,{id:e,machine:E,className:`h-8 w-full min-w-0 rounded-lg border border-input bg-background px-2.5 text-sm outline-none max-md:h-11 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50`,describedBy:t,value:L,onChange:v,required:!0,autoFocus:!j})}),(0,I.jsx)(Z,{label:`Name`,children:({id:e})=>(0,I.jsx)(`input`,{id:e,className:`h-8 w-full min-w-0 rounded-lg border border-input bg-background px-2.5 text-sm outline-none max-md:h-11 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50`,value:z,onChange:e=>b(e.target.value),required:!0})}),j&&L.trim()&&z.trim()&&(0,I.jsxs)(`p`,{className:`truncate text-xs text-muted-foreground`,title:B,children:[`Clones into `,B]}),A.repository===`init`&&(0,I.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`The folder is created if it does not exist and becomes a git repository without a remote.`}),A.source!==`none`&&(0,I.jsx)(Z,{label:`Base branch`,help:A.repository===`init`?`Uses main if empty.`:`Detected from the repository if empty.`,children:({id:e,describedBy:t})=>(0,I.jsx)(`input`,{id:e,className:`h-8 w-full min-w-0 rounded-lg border border-input bg-background px-2.5 text-sm outline-none max-md:h-11 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50`,"aria-describedby":t,value:x,onChange:e=>C(e.target.value)})}),r.isError&&(0,I.jsx)(`p`,{role:`alert`,className:`text-xs break-words text-destructive`,children:r.error.message})]})]}),(0,I.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2 border-t px-4 py-3 md:px-6`,children:[c===0?(0,I.jsx)(d,{type:`button`,variant:`ghost`,disabled:U,onClick:X,children:`Cancel`}):(0,I.jsxs)(d,{type:`button`,variant:`ghost`,disabled:U,onClick:()=>Y(c-1),children:[(0,I.jsx)(w,{"data-icon":`inline-start`}),`Back`]}),(0,I.jsx)(d,{type:`submit`,className:`ml-auto`,changesData:V,disabled:U||V&&R,children:V?U?q.pending:q.submit:(0,I.jsxs)(I.Fragment,{children:[`Next`,(0,I.jsx)(S,{"data-icon":`inline-end`})]})})]})]})})]})}export{S as _,Y as a,J as c,B as d,ee as f,w as g,O as h,Te as i,ge as l,M as m,Le as n,X as o,P as p,ve as r,Q as s,De as t,R as u};
|