UNPKG

decocms

Version:

Deco CMS โ€” Self-hostable MCP Gateway for managing AI connections and tools

11 lines โ€ข 302 kB
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/route-cP2t4t1J.js","assets/index-ztdGKvBm.js","assets/index-DOMlzk_A.css","assets/index-5erPNBmj.js","assets/ArrowUp-D5DDc3Cp.js","assets/chat-context-DFEln8mI.js","assets/use-panel-navigate-0z93k6Ut.js","assets/thread-route-CfpvvkkL.js","assets/use-project-scope-BwqdbGG4.js","assets/repository-binding-D_Xc1yRH.js","assets/use-mcp-client-2MG3LveS.js","assets/auth-C82OPjUx.js","assets/use-view-draft-kind-BopwZu5H.js","assets/use-blog-view-DMfZjkz0.js","assets/use-organization-settings-C2vcrj4S.js","assets/schema-Bb-DbvPZ.js","assets/task-board-i6qU2BVR.js","assets/thread-intent-DyZ5A9F9.js","assets/delay-CnY5UFtP.js","assets/backoff-CrEUbyZT.js","assets/watch-sse-pool-DdfLfQcH.js","assets/session-runtime-DBl1Hlcw.js","assets/use-entitlements-Gn1rhCN5.js","assets/use-ai-providers-Ct2xvYDX.js","assets/use-current-view-DBmQQ8uy.js","assets/use-in-settings-CFQ9B3W2.js","assets/use-decopilot-events-43RPCkUH.js","assets/use-org-fs-D9dHgOYs.js","assets/useInfiniteQuery-Ypmdjx1e.js","assets/infiniteQueryObserver-C3KEOANj.js","assets/input-B2QsYffT.js","assets/usage-stats-B0_Yl-r0.js","assets/utils-CVEq3hMx.js","assets/markdown-CJR_ooUO.js","assets/use-copy-DT4_uVrH.js","assets/agent-icon-BYWtutu9.js","assets/AlertCircle-BlMH0XE7.js","assets/UserCheck01-k-4bTA2h.js","assets/Tool01-BCJ5kyrz.js","assets/ArrowLeft-B0PZnf1E.js","assets/ArrowRight-mzMrxxYI.js","assets/BookOpen01-DU-B3R7s.js","assets/Globe04-CeAQ1YNm.js","assets/CheckCircle-DZ8MNpCP.js","assets/ChevronDown-XsLJSrfl.js","assets/ChevronSelectorVertical-CB0fn1Nq.js","assets/ChevronUp-BQktpZWC.js","assets/UserSquare-CafFh5_d.js","assets/LinkBroken01-DfUhihLM.js","assets/CreditCard01-MY4ouqtl.js","assets/File02-DaYek2y9.js","assets/MessageCircle01-BG1RhOiZ.js","assets/SwitchHorizontal01-CMdpIiQk.js","assets/Eye-kjjhS0vP.js","assets/Fingerprint04-B2fDIuT8.js","assets/Image01-BcIZ5mtf.js","assets/Key01-CaJGjh13.js","assets/LayoutLeft-DDtN-od-.js","assets/Minus-hZzPDO0w.js","assets/Monitor01-DMFbvudn.js","assets/Sun-O9TdKcV_.js","assets/Play-BCFOaioW.js","assets/Plus-DWySsEmB.js","assets/SearchMd-BD2qldmS.js","assets/ShoppingBag01-BbjW7cod.js","assets/Trash01-BxBhF2b8.js","assets/Upload01-q-rKSvZf.js","assets/Users01-DM58_gUL.js","assets/XClose-CmTuu4UN.js","assets/Zap-CBJ7My90.js","assets/use-mobile-C_hdQY5I.js","assets/tooltip-Bm0P1gm_.js","assets/index-CDQbtG2e.js","assets/gateway-client-B4qzR3sF.js","assets/form-DlZ0KMAb.js","assets/label-8UxgpYiA.js","assets/icon-button-BH8Qviy5.js","assets/file-type-icon-CdjLDWdN.js","assets/chat-draft-DNEqrl5p.js","assets/use-voice-input-BMrsODyI.js","assets/popover-C4oz5B-L.js","assets/drawer-CROtV2u4.js","assets/index-CJKec1wg.js","assets/checkbox-QUuOza1H.js","assets/select-CxXZwsSr.js","assets/index-BdQq_4o_.js","assets/ai-providers-logos-DD3qZ33J.js","assets/openai-compatible-presets-BKGfVqEx.js","assets/tabs-nQ7_UOyl.js","assets/active-indicator-CCMhAsc_.js","assets/use-deco-credits-yGgE3j79.js","assets/toggle-group-yQeAFu4u.js","assets/input-aLblPHPG.js","assets/suggestion-aR93AXr2.js","assets/use-mcp-prompts-qJSiAdA5.js","assets/question-004-sINsf4GQ.js","assets/feature-paywall-DL1BXqDM.js","assets/plan-ladder-C3ogU-RT.js","assets/add-connection-dialog-CS6ZsWUV.js","assets/collection-search-DkVgkcUC.js","assets/extract-connection-data-DjYTV7t7.js","assets/metadata-D72DunRR.js","assets/connection-C8I8wKeO.js","assets/url-slug-CII_0B7H.js","assets/connection-card-CTJwLo8p.js","assets/connection-slug-BNBBglpK.js","assets/integration-icon-Bo-3z9o3.js","assets/textarea-viSdm6BE.js","assets/use-connection-CcG4QE1K.js","assets/schema-D_OZwHJO.js","assets/connection-form-helpers-BjSA2uCL.js","assets/authenticate-and-persist-oauth-87e1Ix6y.js","assets/mcp-oauth-BBSVAQ62.js","assets/mcp-oauth-Alln4VX8.js","assets/collection-tabs-Cju2BOrS.js","assets/badge-DcUertOZ.js","assets/use-infinite-scroll-DdrDrAAo.js","assets/useSuspenseInfiniteQuery-Pk4rU2Ft.js","assets/use-task-board-items-D2aUd0HA.js","assets/use-chat-layout-state-Im_c7sw4.js","assets/input-Bwd_JSM8.css","assets/pair-DmyTA2cC.js","assets/collapsible-CadTVXY4.js","assets/task-key-Bt60Ndov.js","assets/config-LEYSFIMn.js","assets/task-route-C3cK6F8S.js","assets/project-index-C2IrSomv.js","assets/shell-layout-UF80oiAz.js","assets/use-deployment-admin-Cr4LWHG9.js","assets/admin-fetch-BhTJlAsX.js","assets/use-org-notice-Bg0zOPPj.js","assets/command-C3tlrKUq.js","assets/index-DMpANy5-.js","assets/project-icon-fQqckccl.js","assets/use-navigate-to-agent-Cw8_3uU5.js","assets/use-debounced-value-DO5dvp6c.js","assets/new-project-dialog-BW6Lh52P.js","assets/repository-picker-CSaozawA.js","assets/github-icon-Bq9Ot22_.js","assets/new-project-store-DID5OVrt.js","assets/legacy-admin-welcome-dialog-plmLACwz.js","assets/required-auth-layout-Cwtu4iIe.js","assets/use-org-sso-_fzcS8V-.js","assets/shell-layout-CE2Eihra.css","assets/content-blocks-o63cs2vh.js","assets/mcp-app-renderer-DU6s3Olv.js","assets/types-5-cDe_8u.js","assets/omit-server-managed-metadata-L5IhjRZB.js","assets/sheet-C-umRrOH.js","assets/use-thread-outputs-BK5BfLdO.js","assets/content-changes-BFwm7dNe.js","assets/agent-capabilities-CyWfHGWp.js","assets/task-status-DYgcNbkh.js","assets/sandbox-lifecycle-context-DbNrw8-a.js","assets/use-sandbox-events-E6fWuIsO.js","assets/sandbox-url-D3mC8qhT.js","assets/sandbox-start-errors-BK_aDCyt.js","assets/empty-state-I_cTbW85.js","assets/cms-store-drafts-_66Q7KaS.js","assets/serial-task-queue-CGOeQgpr.js","assets/use-blocks-v8-project-BPvEDyS9.js","assets/index-Co7YBLf6.js","assets/thread-button-CP83i3PG.js","assets/use-sidebar-collapsed-Cy-mIzeN.js","assets/toolbar-icon-button-Cz-oOJ1w.js","assets/resizable-DNBx7bMi.js","assets/route-page-header-CApA0aIo.js","assets/search-input-BQ8Dp8aD.js","assets/use-main-panel-tabs-BmILT_Hf.js","assets/use-mcp-tools-DOqvKogJ.js","assets/resolve-tab-icon-XkjIOifK.js","assets/use-task-metadata-DZBgcb3y.js","assets/preview-source-BsRLGWUP.js","assets/use-project-native-view-presence-C7OB-luC.js","assets/match-site-slug-config-B47_xZCi.js","assets/use-file-configs-3gwPBXwK.js","assets/virtual-mcp-CAb2l-zV.js","assets/tab-icon-glyph-CYp2YuI5.js","assets/project-apps-BcKyvp4E.js","assets/legacy-main-redirect-CRUswcYw.js","assets/preview-dialog-BPjf_vPa.js","assets/preview-content-f1yPbBN0.js","assets/file-share-button-C-f43toh.js","assets/file-preview-f1ZCefMe.js","assets/utils-COdvgYqW.js","assets/editor-ipOJFDhA.js","assets/blocks-preview-workspace-context-ZEZYfsWp.js"])))=>i.map(i=>d[i]);
import{fp as Rr,c as E,a6 as tt,f as ol,u as Er,j as n,h as bt,a0 as hc,r as Z,b as J,d as ji,B as ce,L as Xi,an as Qt,q as an,ay as xc,e as Nt,m as P,t as He,K as St,aL as jc,aM as bc,aN as kc,aO as yc,bc as vc,aP as Nc,aQ as Sc,aR as Bc,hi as Cc,hj as wc,i as Ga,D as sl,v as nl,w as kl,x as al,aW as yl,y as bi,I as ti,ap as Js,X as Me,Y as Se,Z as Ye,_ as Ke,o as ft,ax as ki,a9 as Ka,aA as Qs,a_ as Us,T as Dc,hk as yi,ad as Tl,au as Or,aw as Lr,a as vi,b9 as _l,aX as Tc,b8 as ll,n as Ss,av as Va,e3 as Fa,dP as _c,aq as Ps,ar as Ms,as as Ks,ag as Ic,$ as Ac,bb as zc,J as Ni,N as Zi,P as Ji,cd as $c,E as Rc,aY as Ec,a7 as Oc,cG as Lc,hl as Fc,R as Pc,hm as Mc}from"./index-ztdGKvBm.js";import{t as ln,u as Kc,a as er,n as Uc,P as qc,o as Gc,D as Vc,f as tr,C as Hc}from"./task-key-Bt60Ndov.js";import{S as sr,v as nr,s as Yc,a as Wc,u as Qc}from"./sortable.esm-CKl9Rez4.js";import{u as Fr}from"./use-task-board-analytics-ByUFAA_6.js";import{C as Xc}from"./combobox-2rKAfmHD.js";import{a3 as ar,aq as Pr,g as _t,aR as ci,b as di,aS as Si,aG as Zc,aT as Jc,aU as ed,aV as td,D as Mr,e as sd,aW as nd,aX as lr,a1 as Kr,y as Il,ac as el,v as Al,aY as ad,an as vl,X as Bi,B as ld}from"./agent-icon-BYWtutu9.js";import{T as Bs,a as Cs,c as ws}from"./tooltip-Bm0P1gm_.js";import{s as id,a as Ur,c as rd}from"./Tool01-BCJ5kyrz.js";import{u as od,a as cd,C as dd,c as ud}from"./use-task-board-prompts-BVOJS_Xo.js";import{S as fd}from"./search-toggle-1gezrIbC.js";import{e as qr,c as Nl,n as en,i as Ci,g as ui,f as fi,k as Gr,s as md}from"./UserCheck01-k-4bTA2h.js";import{i as Ha}from"./CheckCircle-DZ8MNpCP.js";import{s as is}from"./Plus-DWySsEmB.js";import{j as Vr,g as pd,s as si}from"./UserSquare-CafFh5_d.js";import{i as Ts}from"./Zap-CBJ7My90.js";import{P as ns,a as ss,b as as,c as gd}from"./popover-C4oz5B-L.js";import{f as hd,g as xd,C as jd,e as bd}from"./context-menu-DkaKc9e5.js";import{S as mt}from"./super-agent-icon-JEja25un.js";import{B as Ua}from"./badge-DcUertOZ.js";import{r as Hr}from"./daily-pulse-BkxIzWUm.js";import{R as kd}from"./new-project-dialog-BW6Lh52P.js";import{a as Yr,c as yd}from"./use-task-board-items-D2aUd0HA.js";import{a as vd}from"./watch-sse-pool-DdfLfQcH.js";import{M as Nd,n as Sd,a as Bd,c as Cd}from"./sprints-C1z9xhcL.js";import{s as wd}from"./Trash01-BxBhF2b8.js";import{I as Ft}from"./icon-button-BH8Qviy5.js";import{L as bl}from"./label-8UxgpYiA.js";import{S as Dd,b as Td,a as _d,d as Id,c as Wr}from"./select-CxXZwsSr.js";import{i as wi,a as zl,c as tn,l as ht,d as Sl,T as It,P as et,t as rn,e as Di,s as Qr,f as Ti,g as _s,h as Ad,j as zd,S as $d,H as Xr,b as Zr,k as Rd,r as mi,m as Ed,n as Od,L as _i,C as Ii,o as Ld,p as ni,q as ir,u as Fd,v as Pd,w as Md,x as Kd,y as Ud,z as qd}from"./config-LEYSFIMn.js";import{t as $l}from"./ChevronDown-XsLJSrfl.js";import{S as Ie,e as Bl,C as qs,R as Gd,i as rr,n as Jr,f as eo,g as Vd}from"./task-board-i6qU2BVR.js";import{u as Rl,a as to,b as so}from"./use-tags-FRfDz-by.js";import{f as no}from"./use-organization-settings-C2vcrj4S.js";import{P as Hd,d as Yd}from"./feedback-BqoIMOg7.js";import{a as ao,U as Gs,E as lo,D as Wd,d as or,B as il,b as Ai,r as Qd,f as Xd,t as pi}from"./task-route-C3cK6F8S.js";import{C as zi}from"./calendar-DNzaYWCQ.js";import{b as cr,A as Zd,a as Jd}from"./alert-CxbB9CEj.js";import{C as eu,a as tu,b as su}from"./collapsible-CadTVXY4.js";import{u as ai}from"./use-copy-DT4_uVrH.js";import{i as rs}from"./AlertCircle-BlMH0XE7.js";import{a as dr,h as nu,M as $i,p as au}from"./markdown-CJR_ooUO.js";import{M as lu,a as iu,b as ru,c as ou,d as cu,U as du,e as uu,m as fu,f as mu,u as pu,g as gu,h as io,A as hu}from"./index-g3eDw_KE.js";import{d as ro,S as ur}from"./sandbox-start-errors-BK_aDCyt.js";import{p as fr,r as xu,u as oo,G as ju}from"./repository-picker-CSaozawA.js";import{u as Ri}from"./use-task-board-item-prs-B5FCM085.js";import{b as co}from"./use-connection-CcG4QE1K.js";import{d as bu,u as ku,p as yu}from"./repository-binding-D_Xc1yRH.js";import{b as uo,s as fo,e as sn,a as rl,c as vu,N as nn,d as Ei,f as Nu,g as Su}from"./project-index-C2IrSomv.js";import{s as Bu,a as Cu}from"./use-project-scope-BwqdbGG4.js";import{G as wu}from"./github-icon-Bq9Ot22_.js";import{P as Du}from"./project-icon-fQqckccl.js";import{l as Tu}from"./github-repo-scope-C58hYmYC.js";import{a as Oi,C as Li,b as Xs,e as qa,c as Fi,f as Pi,g as Mi}from"./command-C3tlrKUq.js";import{c as _u,S as Iu,a as Au,b as zu}from"./sheet-C-umRrOH.js";import{T as $u}from"./thread-sheet-body-CC8y_ZHb.js";import{u as Ru}from"./use-mcp-client-2MG3LveS.js";import{i as Eu}from"./ArrowUp-D5DDc3Cp.js";import{n as Ou}from"./ChevronUp-BQktpZWC.js";import{i as Lu}from"./Upload01-q-rKSvZf.js";import{i as Fu}from"./use-org-fs-D9dHgOYs.js";import{a as Pu,s as Mu,E as Ku,k as Uu}from"./usage-stats-B0_Yl-r0.js";import{s as qu}from"./suggestion-aR93AXr2.js";import{a as Gu}from"./pair-DmyTA2cC.js";import{S as Zs}from"./separator-BQ6pXQbe.js";import{u as Vu}from"./shell-layout-UF80oiAz.js";import{b as Hu}from"./thread-intent-DyZ5A9F9.js";import{w as Yu}from"./chat-draft-DNEqrl5p.js";const Wu=Rr("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);const Qu=Rr("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]),Xu={github:"pull",gitlab:"-/merge_requests",bitbucket:"pull-requests"};function Zu(t,e){return`${t==="gitlab"?"!":"#"}${e}`}function Ju(t,e){return`${xu(t)}/${Xu[t.provider]}/${e}`}const e1=[{re:/https?:\/\/([^/\s"']+)\/([^\s"']+?)\/-\/merge_requests\/(\d+)/,provider:"gitlab"},{re:/https?:\/\/([^/\s"']+)\/([^/\s"']+\/[^/\s"']+)\/pull\/(\d+)/},{re:/https?:\/\/([^/\s"']+)\/([^/\s"']+\/[^/\s"']+)\/pull-requests\/(\d+)/},{re:/https?:\/\/([^/\s"']+)\/repos\/([^/\s"']+\/[^/\s"']+)\/pulls\/(\d+)/,api:!0},{re:/https?:\/\/([^/\s"']+)\/api\/v4\/projects\/([^/\s"']+)\/merge_requests\/(\d+)/,api:!0,provider:"gitlab"},{re:/https?:\/\/([^/\s"']+)\/2\.0\/repositories\/([^/\s"']+\/[^/\s"']+)\/pullrequests\/(\d+)/,api:!0}],t1={"api.github.com":"github.com","api.bitbucket.org":"bitbucket.org"};function s1(t){const e=t.toLowerCase();return t1[e]??e}function n1(t,e,s){const l=Number(t[3]);if(!Number.isSafeInteger(l)||l<=0)return null;const i=s1(t[1]),a=t[2],o=e?decodeURIComponent(a):a;if(/^\d+$/.test(o))return null;const r=`https://${i}/${o}`,c=fr(r)??(s?fr(r,{provider:s}):null);return c?{repo:c,number:l,url:Ju(c,l)}:null}function a1(t){const e=t.trim();if(!e)return null;for(const{re:s,api:l,provider:i}of e1){const a=s.exec(e),o=a?n1(a,l===!0,i):null;if(o)return o}return null}function El(){const t=E.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const s=ol(e).org;let l;t[1]===Symbol.for("react.memo_cache_sentinel")?(l={strict:!1},t[1]=l):l=t[1];const{boardOrg:i}=Er(l);return i&&i!==s?i:null}function l1(t){const e=E.c(12),{children:s}=t,{project:l}=tt(),i=El(),{data:a,isLoading:o}=Fr();if(!i)return s;if(o){let f;return e[0]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx("div",{className:"flex h-full items-center justify-center",children:n.jsx(bt,{className:"size-5 text-muted-foreground"})}),e[0]=f):f=e[0],f}let r;e[1]!==a?.orgs||e[2]!==i?(r=a?.orgs.find(f=>f.slug===i),e[1]=a?.orgs,e[2]=i,e[3]=r):r=e[3];const c=r;if(!c)return s;let d;e[4]!==c.id||e[5]!==c.name||e[6]!==c.slug?(d={id:c.id,name:c.name,slug:c.slug,logo:null},e[4]=c.id,e[5]=c.name,e[6]=c.slug,e[7]=d):d=e[7];let u;return e[8]!==s||e[9]!==l||e[10]!==d?(u=n.jsx(hc,{org:d,project:l,children:s}),e[8]=s,e[9]=l,e[10]=d,e[11]=u):u=e[11],u}function i1(t){const e=t?.querySelector("[data-folding-label]");return!!e&&e.getBoundingClientRect().width<=1}function mo(t){const e=E.c(9),{label:s,children:l}=t,i=Z.useRef(null),[a,o]=Z.useState(!1);let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=f=>o(f&&i1(i.current)),e[0]=r):r=e[0];let c;e[1]!==l?(c=n.jsx(Bs,{ref:i,asChild:!0,children:l}),e[1]=l,e[2]=c):c=e[2];let d;e[3]!==s?(d=n.jsx(Cs,{side:"bottom",children:s}),e[3]=s,e[4]=d):d=e[4];let u;return e[5]!==a||e[6]!==c||e[7]!==d?(u=n.jsxs(ws,{open:a,onOpenChange:r,children:[c,d]}),e[5]=a,e[6]=c,e[7]=d,e[8]=u):u=e[8],u}function r1(){const t=E.c(5),e=J(),s=El();if(!s)return null;let l;t[0]!==e||t[1]!==s?(l=e("taskBoard.analytics.bannerBoard",{org:s}),t[0]=e,t[1]=s,t[2]=l):l=t[2];let i;return t[3]!==l?(i=n.jsx("div",{className:"rounded-lg bg-warning/10 px-3 py-2 text-sm text-warning",children:l}),t[3]=l,t[4]=i):i=t[4],i}function o1(){const t=E.c(27),e=J(),s=ji(),l=ol({strict:!1}).org??"",i=El(),{data:a}=Fr();if(!a?.isTaskBoardAdmin)return null;let o;t[0]!==e?(o=e("taskBoard.analytics.orgCurrent"),t[0]=e,t[1]=o):o=t[1];let r;t[2]!==l||t[3]!==o?(r={value:l,label:o},t[2]=l,t[3]=o,t[4]=r):r=t[4];let c;if(t[5]!==a.orgs||t[6]!==l||t[7]!==r){let x;t[9]!==l?(x=k=>k.slug!==l,t[9]=l,t[10]=x):x=t[10],c=[r,...a.orgs.filter(x).map(c1)],t[5]=a.orgs,t[6]=l,t[7]=r,t[8]=c}else c=t[8];const d=c,u=i??l;let f;t[11]!==s||t[12]!==l?(f=x=>s({to:".",search:k=>({...k,boardOrg:x===l?void 0:x}),replace:!0}),t[11]=s,t[12]=l,t[13]=f):f=t[13];let m;t[14]!==e?(m=e("taskBoard.analytics.orgPickerPlaceholder"),t[14]=e,t[15]=m):m=t[15];let g;t[16]!==e?(g=e("taskBoard.analytics.orgSearch"),t[16]=e,t[17]=g):g=t[17];let h;t[18]!==e?(h=e("taskBoard.analytics.orgEmpty"),t[18]=e,t[19]=h):h=t[19];let j;return t[20]!==d||t[21]!==u||t[22]!==f||t[23]!==m||t[24]!==g||t[25]!==h?(j=n.jsx(Xc,{options:d,value:u,onChange:f,width:"w-[200px]",placeholder:m,searchPlaceholder:g,emptyMessage:h}),t[20]=d,t[21]=u,t[22]=f,t[23]=m,t[24]=g,t[25]=h,t[26]=j):j=t[26],j}function c1(t){return{value:t.slug,label:`${t.slug} ยท ${t.name}`}}function d1(t){const e=E.c(10),{project:s}=t,l=J();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={strict:!1},e[0]=i):i=e[0];const o=ol(i).org??"";let r;e[1]!==l?(r=l("taskBoard.analytics.openAnalytics"),e[1]=l,e[2]=r):r=e[2];let c;e[3]!==o||e[4]!==s||e[5]!==l?(c=n.jsx(ce,{size:"icon-sm",variant:"outline",className:"hidden sm:inline-flex",asChild:!0,children:s?n.jsxs(Xi,{to:"/$org/projects/$agentId/taskboard-analytics",params:{org:o,agentId:s},children:[n.jsx(ar,{size:16}),n.jsx("span",{"data-folding-label":!0,className:"sr-only",children:l("taskBoard.analytics.openAnalytics")})]}):n.jsxs(Xi,{to:"/$org/taskboard-analytics",params:{org:o},children:[n.jsx(ar,{size:16}),n.jsx("span",{"data-folding-label":!0,className:"sr-only",children:l("taskBoard.analytics.openAnalytics")})]})}),e[3]=o,e[4]=s,e[5]=l,e[6]=c):c=e[6];let d;return e[7]!==r||e[8]!==c?(d=n.jsx(mo,{label:r,children:c}),e[7]=r,e[8]=c,e[9]=d):d=e[9],d}function u1(t){const e=E.c(58),{isDemoBoard:s}=t,l=J(),i=Qt(),a=an(),{locator:o}=tt(),{isPrivileged:r}=xc(),c=El(),[d,u]=Z.useState(!1);let f;e[0]!==i?(f=()=>i.call("DEMO_BOARD_RESET",{}),e[0]=i,e[1]=f):f=e[1];let m,g;e[2]!==l?(m=K=>{const Q=K.problems.length+K.deadPreviewUrls.length;Q>0?He.warning(l("taskBoard.demoReset.doneWithIssues",{count:Q})):He.success(l("taskBoard.demoReset.done"))},g=K=>He.error(l("taskBoard.demoReset.failed"),{description:K instanceof Error?K.message:void 0}),e[2]=l,e[3]=m,e[4]=g):(m=e[3],g=e[4]);let h;e[5]!==o||e[6]!==a?(h=()=>a.invalidateQueries({queryKey:St.taskBoardItems(o)}),e[5]=o,e[6]=a,e[7]=h):h=e[7];let j;e[8]!==f||e[9]!==m||e[10]!==g||e[11]!==h?(j={mutationFn:f,onSuccess:m,onError:g,onSettled:h},e[8]=f,e[9]=m,e[10]=g,e[11]=h,e[12]=j):j=e[12];const x=Nt(j);if(!s||!r||c)return null;const k=x.isPending;let b;e[13]===Symbol.for("react.memo_cache_sentinel")?(b=()=>u(!0),e[13]=b):b=e[13];const v=x.isPending&&"animate-spin";let p;e[14]!==v?(p=P(v),e[14]=v,e[15]=p):p=e[15];let N;e[16]!==p?(N=n.jsx(id,{size:16,className:p}),e[16]=p,e[17]=N):N=e[17];let y;e[18]!==l?(y=l("taskBoard.demoReset.button"),e[18]=l,e[19]=y):y=e[19];let B;e[20]!==x.isPending||e[21]!==N||e[22]!==y?(B=n.jsxs(ce,{size:"sm",variant:"outline",className:"hidden sm:inline-flex",disabled:k,onClick:b,children:[N,y]}),e[20]=x.isPending,e[21]=N,e[22]=y,e[23]=B):B=e[23];let C;e[24]!==l?(C=l("taskBoard.demoReset.title"),e[24]=l,e[25]=C):C=e[25];let w;e[26]!==C?(w=n.jsx(jc,{children:C}),e[26]=C,e[27]=w):w=e[27];let D;e[28]!==l?(D=l("taskBoard.demoReset.description"),e[28]=l,e[29]=D):D=e[29];let S;e[30]!==D?(S=n.jsx(bc,{children:D}),e[30]=D,e[31]=S):S=e[31];let T;e[32]!==w||e[33]!==S?(T=n.jsxs(kc,{children:[w,S]}),e[32]=w,e[33]=S,e[34]=T):T=e[34];let _;e[35]!==l?(_=l("taskBoard.demoReset.cancel"),e[35]=l,e[36]=_):_=e[36];let A;e[37]!==_?(A=n.jsx(yc,{children:_}),e[37]=_,e[38]=A):A=e[38];let I;e[39]!==x?(I=()=>x.mutate(),e[39]=x,e[40]=I):I=e[40];let $;e[41]!==l?($=l("taskBoard.demoReset.confirm"),e[41]=l,e[42]=$):$=e[42];let O;e[43]!==I||e[44]!==$?(O=n.jsx(vc,{variant:"destructive",onClick:I,children:$}),e[43]=I,e[44]=$,e[45]=O):O=e[45];let R;e[46]!==A||e[47]!==O?(R=n.jsxs(Nc,{children:[A,O]}),e[46]=A,e[47]=O,e[48]=R):R=e[48];let L;e[49]!==T||e[50]!==R?(L=n.jsxs(Sc,{children:[T,R]}),e[49]=T,e[50]=R,e[51]=L):L=e[51];let U;e[52]!==d||e[53]!==L?(U=n.jsx(Bc,{open:d,onOpenChange:u,children:L}),e[52]=d,e[53]=L,e[54]=U):U=e[54];let V;return e[55]!==B||e[56]!==U?(V=n.jsxs(n.Fragment,{children:[B,U]}),e[55]=B,e[56]=U,e[57]=V):V=e[57],V}function cl(t){const e=E.c(11),{size:s,className:l}=t,i=s===void 0?16:s;let a;e[0]!==l?(a=P("inline-flex shrink-0 items-center justify-center rounded-full",l),e[0]=l,e[1]=a):a=e[1];let o;e[2]!==i?(o={width:i,height:i,backgroundColor:`${Cc}26`},e[2]=i,e[3]=o):o=e[3];const r=i*.6,c=i*.6;let d;e[4]!==r||e[5]!==c?(d=n.jsx("img",{src:wc,alt:"Reviewer",style:{width:r,height:c}}),e[4]=r,e[5]=c,e[6]=d):d=e[6];let u;return e[7]!==a||e[8]!==o||e[9]!==d?(u=n.jsx("span",{className:a,style:o,children:d}),e[7]=a,e[8]=o,e[9]=d,e[10]=u):u=e[10],u}const f1=[];function Ol(){const t=E.c(7),{org:e}=tt(),s=Qt();let l;t[0]!==e.id?(l=St.taskBoardSprints(e.id),t[0]=e.id,t[1]=l):l=t[1];let i;t[2]!==s?(i=async()=>(await s.call("TASK_BOARD_SPRINT_LIST",{})).sprints,t[2]=s,t[3]=i):i=t[3];let a;t[4]!==l||t[5]!==i?(a={queryKey:l,staleTime:6e4,queryFn:i},t[4]=l,t[5]=i,t[6]=a):a=t[6];const{data:o}=Ga(a);return o??f1}function po(){const t=E.c(4),{org:e,locator:s}=tt(),l=an();let i;return t[0]!==s||t[1]!==e.id||t[2]!==l?(i=()=>Promise.all([l.invalidateQueries({queryKey:St.taskBoardSprints(e.id)}),l.invalidateQueries({queryKey:St.taskBoardItems(s)})]),t[0]=s,t[1]=e.id,t[2]=l,t[3]=i):i=t[3],i}const mr=()=>0;function m1(){const t=E.c(3),{org:e}=tt(),s=po();let l;t[0]!==e.slug||t[1]!==s?(l=()=>vd.subscribe(e.slug,s,s),t[0]=e.slug,t[1]=s,t[2]=l):l=t[2];const i=l;Z.useSyncExternalStore(i,mr,mr)}function p1(){const t=E.c(38),e=Qt(),s=po(),l=J();let i;t[0]!==l?(i=y=>He.error(y instanceof Error&&y.message?y.message:l("taskBoard.sprints.actionError")),t[0]=l,t[1]=i):i=t[1];const a=i;let o;t[2]!==e?(o=y=>e.call("TASK_BOARD_SPRINT_CREATE",y),t[2]=e,t[3]=o):o=t[3];let r;t[4]!==s||t[5]!==a||t[6]!==o?(r={mutationFn:o,onError:a,onSettled:s},t[4]=s,t[5]=a,t[6]=o,t[7]=r):r=t[7];const c=Nt(r);let d;t[8]!==e?(d=y=>e.call("TASK_BOARD_SPRINT_UPDATE",y),t[8]=e,t[9]=d):d=t[9];let u;t[10]!==s||t[11]!==a||t[12]!==d?(u={mutationFn:d,onError:a,onSettled:s},t[10]=s,t[11]=a,t[12]=d,t[13]=u):u=t[13];const f=Nt(u);let m;t[14]!==e?(m=y=>e.call("TASK_BOARD_SPRINT_START",{id:y}),t[14]=e,t[15]=m):m=t[15];let g;t[16]!==s||t[17]!==a||t[18]!==m?(g={mutationFn:m,onError:a,onSettled:s},t[16]=s,t[17]=a,t[18]=m,t[19]=g):g=t[19];const h=Nt(g);let j;t[20]!==e?(j=y=>e.call("TASK_BOARD_SPRINT_COMPLETE",y),t[20]=e,t[21]=j):j=t[21];let x;t[22]!==s||t[23]!==a||t[24]!==j?(x={mutationFn:j,onError:a,onSettled:s},t[22]=s,t[23]=a,t[24]=j,t[25]=x):x=t[25];const k=Nt(x);let b;t[26]!==e?(b=y=>e.call("TASK_BOARD_SPRINT_DELETE",{id:y}),t[26]=e,t[27]=b):b=t[27];let v;t[28]!==s||t[29]!==a||t[30]!==b?(v={mutationFn:b,onError:a,onSettled:s},t[28]=s,t[29]=a,t[30]=b,t[31]=v):v=t[31];const p=Nt(v);let N;return t[32]!==k||t[33]!==c||t[34]!==p||t[35]!==h||t[36]!==f?(N={create:c,update:f,start:h,complete:k,remove:p},t[32]=k,t[33]=c,t[34]=p,t[35]=h,t[36]=f,t[37]=N):N=t[37],N}const g1=14,h1=/^sprint\s+(\d+)$/i;function pr(t,e){const s=Date.parse(`${t}T00:00:00Z`)+e*864e5;return new Date(s).toISOString().slice(0,10)}function x1(t,e){const s=Math.max(0,...t.map(o=>Number(h1.exec(o.name.trim())?.[1]??0))),l=t.map(o=>o.endDate).filter(o=>o!==null).sort().at(-1),i=l?pr(l,1):e,a=i>e?i:e;return{name:`Sprint ${s>0?s+1:t.length+1}`,startDate:a,endDate:pr(a,g1-1)}}function j1(t=new Date){const e=String(t.getMonth()+1).padStart(2,"0"),s=String(t.getDate()).padStart(2,"0");return`${t.getFullYear()}-${e}-${s}`}const b1=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",timeZone:"UTC"});function gr(t){return b1.format(new Date(`${t}T00:00:00Z`))}function go(t){const e=t.startDate?gr(t.startDate):null,s=t.endDate?gr(t.endDate):null;return e&&s?`${e} โ€“ ${s}`:e??s}function Cl(t,e){return t.state==="active"?e("taskBoard.sprints.nameCurrent",{name:t.name}):t.state==="closed"?e("taskBoard.sprints.nameClosed",{name:t.name}):t.name}const li="__backlog__",k1=[{state:"active",labelKey:"taskBoard.sprints.sectionActive"},{state:"future",labelKey:"taskBoard.sprints.sectionFuture"},{state:"closed",labelKey:"taskBoard.sprints.sectionClosed"}];function y1(t){const e=E.c(59),{sprints:s,onClose:l}=t,i=J(),a=p1(),{items:o}=Yr(),[r,c]=Z.useState(null),[d,u]=Z.useState(null),[f,m]=Z.useState(null);let g;e[0]!==o?(g=R=>o.filter(L=>L.sprintId===R),e[0]=o,e[1]=g):g=e[1];const h=g;let j;e[2]!==s?(j=()=>c({id:null,...x1(s,j1())}),e[2]=s,e[3]=j):j=e[3];const x=j;let k;e[4]!==a.create||e[5]!==a.update?(k=R=>{const L={name:R.name.trim(),startDate:R.startDate||null,endDate:R.endDate||null},U={onSuccess:()=>c(null)};R.id===null?a.create.mutate(L,U):a.update.mutate({id:R.id,...L},U)},e[4]=a.create,e[5]=a.update,e[6]=k):k=e[6];const b=k;let v;e[7]!==l?(v=R=>!R&&l(),e[7]=l,e[8]=v):v=e[8];let p;e[9]!==i?(p=i("taskBoard.sprints.title"),e[9]=i,e[10]=p):p=e[10];let N;e[11]!==p?(N=n.jsx(al,{children:p}),e[11]=p,e[12]=N):N=e[12];let y;e[13]!==i?(y=i("taskBoard.sprints.description"),e[13]=i,e[14]=y):y=e[14];let B;e[15]!==y?(B=n.jsx(yl,{children:y}),e[15]=y,e[16]=B):B=e[16];let C;e[17]!==N||e[18]!==B?(C=n.jsxs(kl,{children:[N,B]}),e[17]=N,e[18]=B,e[19]=C):C=e[19];let w;e[20]!==a.create||e[21]!==a.update||e[22]!==r||e[23]!==x||e[24]!==b||e[25]!==i?(w=r?n.jsx(S1,{draft:r,pending:a.create.isPending||a.update.isPending,onChange:c,onCancel:()=>c(null),onSave:b}):n.jsxs(ce,{variant:"outline",size:"sm",className:"justify-self-start",onClick:x,children:[n.jsx(is,{size:16}),i("taskBoard.sprints.new")]}),e[20]=a.create,e[21]=a.update,e[22]=r,e[23]=x,e[24]=b,e[25]=i,e[26]=w):w=e[26];let D;e[27]!==s.length||e[28]!==i?(D=s.length===0&&n.jsx("p",{className:"text-sm text-muted-foreground",children:i("taskBoard.sprints.empty")}),e[27]=s.length,e[28]=i,e[29]=D):D=e[29];let S;e[30]!==a.start||e[31]!==h||e[32]!==s||e[33]!==i?(S=k1.map(R=>{const{state:L,labelKey:U}=R,V=s.filter(K=>K.state===L);return V.length===0?null:n.jsxs("section",{className:"flex flex-col gap-1",children:[n.jsx("h3",{className:"text-xs font-medium text-muted-foreground",children:i(U)}),V.map(K=>n.jsx(N1,{sprint:K,cardCount:h(K.id).length,busy:a.start.isPending&&a.start.variables===K.id,onStart:()=>a.start.mutate(K.id),onComplete:()=>u(K),onEdit:()=>c({id:K.id,name:K.name,startDate:K.startDate??"",endDate:K.endDate??""}),onDelete:()=>m(K)},K.id))]},L)}),e[30]=a.start,e[31]=h,e[32]=s,e[33]=i,e[34]=S):S=e[34];let T;e[35]!==D||e[36]!==S?(T=n.jsxs("div",{className:"flex max-h-[50vh] flex-col gap-4 overflow-y-auto",children:[D,S]}),e[35]=D,e[36]=S,e[37]=T):T=e[37];let _;e[38]!==w||e[39]!==T||e[40]!==C?(_=n.jsxs(nl,{className:"max-w-lg",children:[C,w,T]}),e[38]=w,e[39]=T,e[40]=C,e[41]=_):_=e[41];let A;e[42]!==_||e[43]!==v?(A=n.jsx(sl,{open:!0,onOpenChange:v,children:_}),e[42]=_,e[43]=v,e[44]=A):A=e[44];let I;e[45]!==a.complete||e[46]!==h||e[47]!==d||e[48]!==s?(I=d&&n.jsx(B1,{sprint:d,sprints:s,openCards:h(d.id).filter(v1).length,pending:a.complete.isPending,onCancel:()=>u(null),onConfirm:R=>a.complete.mutate({id:d.id,moveOpenTo:R},{onSuccess:()=>u(null)})}),e[45]=a.complete,e[46]=h,e[47]=d,e[48]=s,e[49]=I):I=e[49];let $;e[50]!==a.remove||e[51]!==h||e[52]!==f||e[53]!==i?($=f&&n.jsx(sl,{open:!0,onOpenChange:R=>!R&&m(null),children:n.jsxs(nl,{className:"max-w-md",children:[n.jsxs(kl,{children:[n.jsx(al,{children:i("taskBoard.sprints.deleteTitle",{name:f.name})}),n.jsx(yl,{children:i("taskBoard.sprints.deleteDescription",{count:h(f.id).length})})]}),n.jsxs(bi,{children:[n.jsx(ce,{variant:"outline",onClick:()=>m(null),children:i("taskBoard.sprints.cancel")}),n.jsxs(ce,{variant:"destructive",disabled:a.remove.isPending,onClick:()=>a.remove.mutate(f.id,{onSuccess:()=>m(null)}),children:[a.remove.isPending&&n.jsx(bt,{className:"size-4"}),i("taskBoard.sprints.delete")]})]})]})}),e[50]=a.remove,e[51]=h,e[52]=f,e[53]=i,e[54]=$):$=e[54];let O;return e[55]!==A||e[56]!==I||e[57]!==$?(O=n.jsxs(n.Fragment,{children:[A,I,$]}),e[55]=A,e[56]=I,e[57]=$,e[58]=O):O=e[58],O}function v1(t){return!Bd(t.status)}function N1(t){const e=E.c(61),{sprint:s,cardCount:l,busy:i,onStart:a,onComplete:o,onEdit:r,onDelete:c}=t,d=J();let u;e[0]!==s?(u=go(s),e[0]=s,e[1]=u):u=e[1];const f=u,m=s.state==="active"?"text-foreground":"text-muted-foreground";let g;e[2]!==m?(g=P("shrink-0",m),e[2]=m,e[3]=g):g=e[3];let h;e[4]!==g?(h=n.jsx(Ts,{size:16,className:g}),e[4]=g,e[5]=h):h=e[5];let j;e[6]!==s.name?(j=n.jsx("span",{className:"truncate text-sm font-medium text-foreground",children:s.name}),e[6]=s.name,e[7]=j):j=e[7];let x;e[8]!==l||e[9]!==d?(x=d("taskBoard.sprints.cardCount",{count:l}),e[8]=l,e[9]=d,e[10]=x):x=e[10];let k;e[11]!==f||e[12]!==x?(k=[f,x].filter(Boolean),e[11]=f,e[12]=x,e[13]=k):k=e[13];const b=k.join(" ยท ");let v;e[14]!==b?(v=n.jsx("span",{className:"truncate text-xs text-muted-foreground",children:b}),e[14]=b,e[15]=v):v=e[15];let p;e[16]!==j||e[17]!==v?(p=n.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[j,v]}),e[16]=j,e[17]=v,e[18]=p):p=e[18];let N;e[19]!==s.state||e[20]!==d?(N=s.state==="active"&&n.jsx(Ua,{variant:"outline",children:d("taskBoard.sprints.running")}),e[19]=s.state,e[20]=d,e[21]=N):N=e[21];let y;e[22]!==i||e[23]!==a||e[24]!==s.state||e[25]!==d?(y=s.state==="future"&&n.jsxs(ce,{size:"sm",variant:"outline",disabled:i,onClick:a,children:[i&&n.jsx(bt,{className:"size-4"}),d("taskBoard.sprints.start")]}),e[22]=i,e[23]=a,e[24]=s.state,e[25]=d,e[26]=y):y=e[26];let B;e[27]!==o||e[28]!==s.state||e[29]!==d?(B=s.state==="active"&&n.jsx(ce,{size:"sm",variant:"outline",onClick:o,children:d("taskBoard.sprints.complete")}),e[27]=o,e[28]=s.state,e[29]=d,e[30]=B):B=e[30];let C;e[31]!==d?(C=d("taskBoard.sprints.more"),e[31]=d,e[32]=C):C=e[32];let w;e[33]===Symbol.for("react.memo_cache_sentinel")?(w=n.jsx(Js,{}),e[33]=w):w=e[33];let D;e[34]!==C?(D=n.jsx(Me,{asChild:!0,children:n.jsx(Ft,{label:C,size:"icon-sm",children:w})}),e[34]=C,e[35]=D):D=e[35];let S;e[36]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(Pr,{size:14}),e[36]=S):S=e[36];let T;e[37]!==d?(T=d("taskBoard.sprints.edit"),e[37]=d,e[38]=T):T=e[38];let _;e[39]!==r||e[40]!==T?(_=n.jsxs(Se,{onClick:r,children:[S,T]}),e[39]=r,e[40]=T,e[41]=_):_=e[41];let A;e[42]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx(wd,{size:14}),e[42]=A):A=e[42];let I;e[43]!==d?(I=d("taskBoard.sprints.delete"),e[43]=d,e[44]=I):I=e[44];let $;e[45]!==c||e[46]!==I?($=n.jsxs(Se,{variant:"destructive",onClick:c,children:[A,I]}),e[45]=c,e[46]=I,e[47]=$):$=e[47];let O;e[48]!==_||e[49]!==$?(O=n.jsxs(Ye,{align:"end",children:[_,$]}),e[48]=_,e[49]=$,e[50]=O):O=e[50];let R;e[51]!==D||e[52]!==O?(R=n.jsxs(Ke,{children:[D,O]}),e[51]=D,e[52]=O,e[53]=R):R=e[53];let L;return e[54]!==p||e[55]!==N||e[56]!==y||e[57]!==B||e[58]!==R||e[59]!==h?(L=n.jsxs("div",{className:"flex items-center gap-3 rounded-lg px-2 py-2 hover:bg-accent",children:[h,p,N,y,B,R]}),e[54]=p,e[55]=N,e[56]=y,e[57]=B,e[58]=R,e[59]=h,e[60]=L):L=e[60],L}function S1(t){const e=E.c(76),{draft:s,pending:l,onChange:i,onCancel:a,onSave:o}=t,r=J(),c=s.startDate!==""&&s.endDate!==""&&s.endDate<s.startDate;let d;e[0]!==c||e[1]!==s.name?(d=s.name.trim()!==""&&!c,e[0]=c,e[1]=s.name,e[2]=d):d=e[2];const u=d;let f;e[3]!==s||e[4]!==o||e[5]!==u?(f=K=>{K.preventDefault(),u&&o(s)},e[3]=s,e[4]=o,e[5]=u,e[6]=f):f=e[6];let m;e[7]!==r?(m=r("taskBoard.sprints.nameLabel"),e[7]=r,e[8]=m):m=e[8];let g;e[9]!==m?(g=n.jsx(bl,{htmlFor:"sprint-name",children:m}),e[9]=m,e[10]=g):g=e[10];let h;e[11]!==s||e[12]!==i?(h=K=>i({...s,name:K.target.value}),e[11]=s,e[12]=i,e[13]=h):h=e[13];let j;e[14]!==s.name||e[15]!==h?(j=n.jsx(ti,{id:"sprint-name",value:s.name,maxLength:Nd,autoFocus:!0,onChange:h}),e[14]=s.name,e[15]=h,e[16]=j):j=e[16];let x;e[17]!==g||e[18]!==j?(x=n.jsxs("div",{className:"flex flex-col gap-1.5",children:[g,j]}),e[17]=g,e[18]=j,e[19]=x):x=e[19];let k;e[20]!==r?(k=r("taskBoard.sprints.startLabel"),e[20]=r,e[21]=k):k=e[21];let b;e[22]!==k?(b=n.jsx(bl,{htmlFor:"sprint-start",children:k}),e[22]=k,e[23]=b):b=e[23];let v;e[24]!==s||e[25]!==i?(v=K=>i({...s,startDate:K.target.value}),e[24]=s,e[25]=i,e[26]=v):v=e[26];let p;e[27]!==s.startDate||e[28]!==v?(p=n.jsx(ti,{id:"sprint-start",type:"date",value:s.startDate,onChange:v}),e[27]=s.startDate,e[28]=v,e[29]=p):p=e[29];let N;e[30]!==p||e[31]!==b?(N=n.jsxs("div",{className:"flex flex-col gap-1.5",children:[b,p]}),e[30]=p,e[31]=b,e[32]=N):N=e[32];let y;e[33]!==r?(y=r("taskBoard.sprints.endLabel"),e[33]=r,e[34]=y):y=e[34];let B;e[35]!==y?(B=n.jsx(bl,{htmlFor:"sprint-end",children:y}),e[35]=y,e[36]=B):B=e[36];const C=s.startDate||void 0;let w;e[37]!==s||e[38]!==i?(w=K=>i({...s,endDate:K.target.value}),e[37]=s,e[38]=i,e[39]=w):w=e[39];let D;e[40]!==s.endDate||e[41]!==C||e[42]!==w?(D=n.jsx(ti,{id:"sprint-end",type:"date",value:s.endDate,min:C,onChange:w}),e[40]=s.endDate,e[41]=C,e[42]=w,e[43]=D):D=e[43];let S;e[44]!==B||e[45]!==D?(S=n.jsxs("div",{className:"flex flex-col gap-1.5",children:[B,D]}),e[44]=B,e[45]=D,e[46]=S):S=e[46];let T;e[47]!==N||e[48]!==S?(T=n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[N,S]}),e[47]=N,e[48]=S,e[49]=T):T=e[49];let _;e[50]!==c||e[51]!==r?(_=c&&n.jsx("p",{className:"text-xs text-destructive",children:r("taskBoard.sprints.endBeforeStart")}),e[50]=c,e[51]=r,e[52]=_):_=e[52];let A;e[53]!==r?(A=r("taskBoard.sprints.cancel"),e[53]=r,e[54]=A):A=e[54];let I;e[55]!==a||e[56]!==A?(I=n.jsx(ce,{type:"button",variant:"ghost",size:"sm",onClick:a,children:A}),e[55]=a,e[56]=A,e[57]=I):I=e[57];const $=!u||l;let O;e[58]!==l?(O=l&&n.jsx(bt,{className:"size-4"}),e[58]=l,e[59]=O):O=e[59];let R;e[60]!==s.id||e[61]!==r?(R=s.id===null?r("taskBoard.sprints.create"):r("taskBoard.sprints.save"),e[60]=s.id,e[61]=r,e[62]=R):R=e[62];let L;e[63]!==$||e[64]!==O||e[65]!==R?(L=n.jsxs(ce,{type:"submit",size:"sm",disabled:$,children:[O,R]}),e[63]=$,e[64]=O,e[65]=R,e[66]=L):L=e[66];let U;e[67]!==I||e[68]!==L?(U=n.jsxs("div",{className:"flex justify-end gap-2",children:[I,L]}),e[67]=I,e[68]=L,e[69]=U):U=e[69];let V;return e[70]!==T||e[71]!==f||e[72]!==_||e[73]!==U||e[74]!==x?(V=n.jsxs("form",{className:"flex flex-col gap-3 rounded-lg border border-border p-3",onSubmit:f,children:[x,T,_,U]}),e[70]=T,e[71]=f,e[72]=_,e[73]=U,e[74]=x,e[75]=V):V=e[75],V}function B1(t){const e=E.c(49),{sprint:s,sprints:l,openCards:i,pending:a,onCancel:o,onConfirm:r}=t,c=J();let d;e[0]!==s.id?(d=R=>R.id!==s.id&&R.state!=="closed",e[0]=s.id,e[1]=d):d=e[1];const u=l.filter(d);let f;e[2]!==s.id||e[3]!==l?(f=Sd(l,s.id)??li,e[2]=s.id,e[3]=l,e[4]=f):f=e[4];const[m,g]=Z.useState(f),h=sl,j=!0;let x;e[5]!==o?(x=R=>!R&&o(),e[5]=o,e[6]=x):x=e[6];const k=nl,b="max-w-md";let v;e[7]!==s.name||e[8]!==c?(v=c("taskBoard.sprints.completeTitle",{name:s.name}),e[7]=s.name,e[8]=c,e[9]=v):v=e[9];let p;e[10]!==v?(p=n.jsx(al,{children:v}),e[10]=v,e[11]=p):p=e[11];let N;e[12]!==i||e[13]!==c?(N=i===0?c("taskBoard.sprints.completeNothingOpen"):c("taskBoard.sprints.completeDescription",{count:i}),e[12]=i,e[13]=c,e[14]=N):N=e[14];let y;e[15]!==N?(y=n.jsx(yl,{children:N}),e[15]=N,e[16]=y):y=e[16];let B;e[17]!==p||e[18]!==y?(B=n.jsxs(kl,{children:[p,y]}),e[17]=p,e[18]=y,e[19]=B):B=e[19];const C=i>0&&n.jsxs("div",{className:"flex flex-col gap-1.5",children:[n.jsx(bl,{children:c("taskBoard.sprints.moveOpenTo")}),n.jsxs(Dd,{value:m,onValueChange:g,children:[n.jsx(Td,{children:n.jsx(_d,{})}),n.jsxs(Id,{children:[u.map(C1),n.jsx(Wr,{value:li,children:c("taskBoard.sprints.backlog")})]})]})]});let w;e[20]!==c?(w=c("taskBoard.sprints.cancel"),e[20]=c,e[21]=w):w=e[21];let D;e[22]!==o||e[23]!==w?(D=n.jsx(ce,{variant:"outline",onClick:o,children:w}),e[22]=o,e[23]=w,e[24]=D):D=e[24];let S;e[25]!==r||e[26]!==m?(S=()=>r(m===li?null:m),e[25]=r,e[26]=m,e[27]=S):S=e[27];let T;e[28]!==a?(T=a&&n.jsx(bt,{className:"size-4"}),e[28]=a,e[29]=T):T=e[29];let _;e[30]!==c?(_=c("taskBoard.sprints.complete"),e[30]=c,e[31]=_):_=e[31];let A;e[32]!==a||e[33]!==S||e[34]!==T||e[35]!==_?(A=n.jsxs(ce,{disabled:a,onClick:S,children:[T,_]}),e[32]=a,e[33]=S,e[34]=T,e[35]=_,e[36]=A):A=e[36];let I;e[37]!==D||e[38]!==A?(I=n.jsxs(bi,{children:[D,A]}),e[37]=D,e[38]=A,e[39]=I):I=e[39];let $;e[40]!==k||e[41]!==B||e[42]!==C||e[43]!==I?($=n.jsxs(k,{className:b,children:[B,C,I]}),e[40]=k,e[41]=B,e[42]=C,e[43]=I,e[44]=$):$=e[44];let O;return e[45]!==h||e[46]!==$||e[47]!==x?(O=n.jsx(h,{open:j,onOpenChange:x,children:$}),e[45]=h,e[46]=$,e[47]=x,e[48]=O):O=e[48],O}function C1(t){return n.jsx(Wr,{value:t.id,children:t.name},t.id)}function ho(t){const e=E.c(10),{assigneeId:s,assignee:l,size:i,title:a,className:o}=t,r=i===void 0?20:i;if(!s)return null;let c;e[0]!==l||e[1]!==s||e[2]!==r?(c=s===Ie?n.jsx(mt,{size:r}):l?n.jsx(ft,{url:l.user?.image??void 0,fallback:l.user?.name??"?",shape:"circle",size:"xs"}):null,e[0]=l,e[1]=s,e[2]=r,e[3]=c):c=e[3];const d=c;if(!d)return null;let u;e[4]!==o?(u=P("inline-flex shrink-0",o),e[4]=o,e[5]=u):u=e[5];let f;return e[6]!==d||e[7]!==u||e[8]!==a?(f=n.jsx("span",{className:u,title:a,children:d}),e[6]=d,e[7]=u,e[8]=a,e[9]=f):f=e[9],f}function w1(t){switch(t){case"done":return"done";case"archived":return null;case"triage":case"todo":return"todo";case"in_progress":case"in_review":case"qa":case"customer_approval":case"ready_for_deployment":case"post_deploy_validation":return"active";default:return t}}function Ya(t){const e={done:0,active:0,todo:0,total:0};for(const s of t){const l=w1(s.status);l&&(e[l]+=1,e.total+=1)}return e}function Ki(t){return t.total>0&&t.done===t.total?"done":t.active>0||t.done>0?"in_progress":"todo"}function Wa(t,e){return t.filter(s=>s.parentId===e)}function Qa(t,e){return e.parentId?t.find(s=>s.id===e.parentId):void 0}function xo(t,e){const s=Qa(t,e);return!!s&&!s.isEpic}function D1(t){return t.status==="done"||t.status==="archived"?!1:wi(t)||zl(t)==="failed"}function T1(t,e){return t.flatMap(s=>{if(s.isEpic){if(s.status==="archived")return[s];const l=Ki(Ya(Wa(e,s.id)));return[{...s,status:l}]}return xo(e,s)&&!D1(s)?[]:[s]})}const jo=Z.createContext(null);function cs(){return Z.use(jo)}function _1(t){const e=E.c(3),{value:s,children:l}=t;let i;return e[0]!==l||e[1]!==s?(i=n.jsx(jo,{value:s,children:l}),e[0]=l,e[1]=s,e[2]=i):i=e[2],i}function Ui(t){const e=E.c(12),{progress:s,className:l}=t;let i;e[0]!==s.total?(i=m=>s.total===0?"0%":`${m/s.total*100}%`,e[0]=s.total,e[1]=i):i=e[1];const a=i;let o;e[2]!==l?(o=P("flex h-1.5 w-full overflow-hidden rounded-full bg-muted",l),e[2]=l,e[3]=o):o=e[3];const r=a(s.done);let c;e[4]!==r?(c=n.jsx("div",{className:"bg-success",style:{width:r}}),e[4]=r,e[5]=c):c=e[5];const d=a(s.active);let u;e[6]!==d?(u=n.jsx("div",{className:"bg-chart-1",style:{width:d}}),e[6]=d,e[7]=u):u=e[7];let f;return e[8]!==o||e[9]!==c||e[10]!==u?(f=n.jsxs("div",{className:o,children:[c,u]}),e[8]=o,e[9]=c,e[10]=u,e[11]=f):f=e[11],f}function I1(t){const e=E.c(9),{item:s}=t,l=cs();if(!l)return null;let i;e[0]!==l.items||e[1]!==s?(i=Qa(l.items,s),e[0]=l.items,e[1]=s,e[2]=i):i=e[2];const a=i;if(!a?.isEpic)return null;let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(_t,{size:11,className:"shrink-0 text-chart-1"}),e[3]=o):o=e[3];let r;e[4]!==a.title?(r=n.jsx("span",{className:"truncate",children:a.title}),e[4]=a.title,e[5]=r):r=e[5];let c;return e[6]!==a.title||e[7]!==r?(c=n.jsxs("span",{title:a.title,className:"inline-flex h-5 max-w-40 items-center gap-1 rounded-md bg-chart-1/15 px-1.5 text-xs font-medium text-foreground",children:[o,r]}),e[6]=a.title,e[7]=r,e[8]=c):c=e[8],c}function A1(t){const e=E.c(15),{item:s}=t,l=J(),i=cs();if(!i||!s.isEpic)return null;let a;e[0]!==i.items||e[1]!==s.id?(a=Ya(Wa(i.items,s.id)),e[0]=i.items,e[1]=s.id,e[2]=a):a=e[2];const o=a;let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(_t,{size:11,className:"shrink-0 text-chart-1"}),e[3]=r):r=e[3];let c;e[4]!==l?(c=l("taskBoard.epics.epicBadge"),e[4]=l,e[5]=c):c=e[5];let d;e[6]!==o?(d=n.jsx(Ui,{progress:o,className:"w-10"}),e[6]=o,e[7]=d):d=e[7];let u;e[8]!==o.done||e[9]!==o.total?(u=n.jsxs("span",{className:"tabular-nums text-muted-foreground",children:[o.done,"/",o.total]}),e[8]=o.done,e[9]=o.total,e[10]=u):u=e[10];let f;return e[11]!==c||e[12]!==d||e[13]!==u?(f=n.jsxs("span",{className:"inline-flex h-5 items-center gap-1.5 rounded-md bg-chart-1/15 px-1.5 text-xs font-medium text-foreground",children:[r,c,d,u]}),e[11]=c,e[12]=d,e[13]=u,e[14]=f):f=e[14],f}function z1(t){const e=E.c(10),{item:s}=t,l=J(),i=cs();if(!i||s.isEpic)return null;let a;e[0]!==i.items||e[1]!==s.id?(a=Ya(Wa(i.items,s.id)),e[0]=i.items,e[1]=s.id,e[2]=a):a=e[2];const o=a;if(o.total===0)return null;let r;e[3]!==l?(r=l("taskBoard.epics.subtasks"),e[3]=l,e[4]=r):r=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(ci,{size:11,className:"shrink-0"}),e[5]=c):c=e[5];let d;return e[6]!==o.done||e[7]!==o.total||e[8]!==r?(d=n.jsxs("span",{title:r,className:"inline-flex h-5 items-center gap-1 rounded-md bg-muted px-1.5 text-xs font-medium tabular-nums text-muted-foreground",children:[c,o.done,"/",o.total]}),e[6]=o.done,e[7]=o.total,e[8]=r,e[9]=d):d=e[9],d}function $1(){const t=E.c(14),e=J(),s=cs();if(!s)return null;const l=s.items;let i,a,o;if(t[0]!==s||t[1]!==e){o=Symbol.for("react.early_return_sentinel");e:{const c=l.filter(R1);if(c.length===0){let u;t[5]!==e?(u=e("taskBoard.epics.empty"),t[5]=e,t[6]=u):u=t[6];let f;t[7]!==u?(f=n.jsx("div",{className:"surface px-4 py-12 text-center text-sm text-muted-foreground",children:u}),t[7]=u,t[8]=f):f=t[8],o=f;break e}i="grid gap-3 md:grid-cols-2";let d;t[9]!==s?(d=u=>n.jsx(E1,{epic:u,workItems:Wa(s.items,u.id),board:s},u.id),t[9]=s,t[10]=d):d=t[10],a=c.map(d)}t[0]=s,t[1]=e,t[2]=i,t[3]=a,t[4]=o}else i=t[2],a=t[3],o=t[4];if(o!==Symbol.for("react.early_return_sentinel"))return o;let r;return t[11]!==i||t[12]!==a?(r=n.jsx("div",{className:i,children:a}),t[11]=i,t[12]=a,t[13]=r):r=t[13],r}function R1(t){return t.isEpic}function E1(t){const e=E.c(96),{epic:s,workItems:l,board:i}=t,a=J();let o,r,c,d,u,f,m,g,h,j,x,k,b;if(e[0]!==i||e[1]!==s||e[2]!==a||e[3]!==l){const y=Ya(l),B=Ki(y),C=B==="done";let w;e[17]!==C?(w=bo(C),e[17]=C,e[18]=w):w=e[18];const D=w;let S;e[19]!==l?(S=Hr(l),e[19]=l,e[20]=S):S=e[20];const T=S.length;let _;e[21]!==l?(_=l.filter(tn),e[21]=l,e[22]=_):_=e[22];const A=_.length,I=y.total===0?0:Math.round(y.done/y.total*100),$=[...new Set(l.flatMap(O1))];b="button",e[23]!==i||e[24]!==s?(r=()=>i.onOpen(s),e[23]=i,e[24]=s,e[25]=r):r=e[25],c="surface flex w-full flex-col gap-4 p-4 text-left transition-colors hover:bg-accent";let O;e[26]===Symbol.for("react.memo_cache_sentinel")?(O=n.jsx(_t,{size:16,className:"mt-0.5 shrink-0 text-chart-1"}),e[26]=O):O=e[26];let R;e[27]!==s.title?(R=n.jsx("span",{className:"truncate text-sm font-medium text-foreground",children:s.title}),e[27]=s.title,e[28]=R):R=e[28];let L;e[29]!==i.orgSlug||e[30]!==s.keySeq?(L=ln(i.orgSlug,s.keySeq),e[29]=i.orgSlug,e[30]=s.keySeq,e[31]=L):L=e[31];const U=y.total===1?a("taskBoard.epics.cardCountOne"):a("taskBoard.epics.cardCountMany",{count:y.total});let V;e[32]!==L||e[33]!==U?(V=n.jsxs("span",{className:"text-xs text-muted-foreground",children:[L," ยท ",U]}),e[32]=L,e[33]=U,e[34]=V):V=e[34];let K;e[35]!==R||e[36]!==V?(K=n.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[R,V]}),e[35]=R,e[36]=V,e[37]=K):K=e[37];let Q;e[38]!==B?(Q=n.jsx(gi,{status:B}),e[38]=B,e[39]=Q):Q=e[39];let H;e[40]!==B||e[41]!==a?(H=ht(B,a),e[40]=B,e[41]=a,e[42]=H):H=e[42];let ee;e[43]!==D||e[44]!==Q||e[45]!==H.label?(ee=n.jsxs("span",{className:D,children:[Q,H.label]}),e[43]=D,e[44]=Q,e[45]=H.label,e[46]=ee):ee=e[46],e[47]!==K||e[48]!==ee?(d=n.jsxs("div",{className:"flex items-start gap-3",children:[O,K,ee]}),e[47]=K,e[48]=ee,e[49]=d):d=e[49];let G;e[50]!==y?(G=n.jsx(Ui,{progress:y,className:"flex-1"}),e[50]=y,e[51]=G):G=e[51];let se;e[52]!==I?(se=n.jsxs("span",{className:"shrink-0 text-xs font-medium tabular-nums text-foreground",children:[I,"%"]}),e[52]=I,e[53]=se):se=e[53],e[54]!==G||e[55]!==se?(u=n.jsxs("div",{className:"flex items-center gap-3",children:[G,se]}),e[54]=G,e[55]=se,e[56]=u):u=e[56],h="flex min-h-5 items-center gap-4 text-xs text-muted-foreground";const re=y.done;let le;e[57]!==a?(le=a("taskBoard.epics.segmentDone"),e[57]=a,e[58]=le):le=e[58],e[59]!==y||e[60]!==le?(j=n.jsx(ii,{className:"bg-success",count:re,children:le}),e[59]=y,e[60]=le,e[61]=j):j=e[61];const F=y.active;let q;e[62]!==a?(q=a("taskBoard.epics.segmentActive"),e[62]=a,e[63]=q):q=e[63],e[64]!==y||e[65]!==q?(x=n.jsx(ii,{className:"bg-chart-1",count:F,children:q}),e[64]=y,e[65]=q,e[66]=x):x=e[66];const oe=y.todo;let ne;e[67]!==a?(ne=a("taskBoard.epics.segmentTodo"),e[67]=a,e[68]=ne):ne=e[68],e[69]!==y||e[70]!==ne?(k=n.jsx(ii,{className:"bg-muted-foreground/30",count:oe,children:ne}),e[69]=y,e[70]=ne,e[71]=k):k=e[71],o="ml-auto flex items-center gap-3",e[72]!==A||e[73]!==a?(f=A>0&&n.jsxs("span",{title:a("taskBoard.taskBoard.swimlaneCritical"),className:"inline-flex items-center gap-1 text-destructive",children:[n.jsx(qr,{size:13}),n.jsx("span",{className:"tabular-nums",children:A})]}),e[72]=A,e[73]=a,e[74]=f):f=e[74],e[75]!==T||e[76]!==a?(m=T>0&&n.jsxs("span",{title:T===1?a("taskBoard.taskBoard.agentsRunningOne"):a("taskBoard.taskBoard.agentsRunningMany",{count:T}),className:"inline-flex items-center gap-1 text-foreground",children:[n.jsx(bt,{className:"size-3"}),n.jsx("span",{className:"tabular-nums",children:T})]}),e[75]=T,e[76]=a,e[77]=m):m=e[77],g=$.length>0&&n.jsx("span",{className:"flex -space-x-1.5",children:$.slice(0,3).map(fe=>n.jsx(ho,{assigneeId:fe,assignee:i.memberByUserId.get(fe),size:18,className:"rounded-full ring-2 ring-card"},fe))}),e[0]=i,e[1]=s,e[2]=a,e[3]=l,e[4]=o,e[5]=r,e[6]=c,e[7]=d,e[8]=u,e[9]=f,e[10]=m,e[11]=g,e[12]=h,e[13]=j,e[14]=x,e[15]=k,e[16]=b}else o=e[4],r=e[5],c=e[6],d=e[7],u=e[8],f=e[9],m=e[10],g=e[11],h=e[12],j=e[13],x=e[14],k=e[15],b=e[16];let v;e[78]!==o||e[79]!==f||e[80]!==m||e[81]!==g?(v=n.jsxs("span",{className:o,children:[f,m,g]}),e[78]=o,e[79]=f,e[80]=m,e[81]=g,e[82]=v):v=e[82];let p;e[83]!==v||e[84]!==h||e[85]!==j||e[86]!==x||e[87]!==k?(p=n.jsxs("div",{className:h,children:[j,x,k,v]}),e[83]=v,e[84]=h,e[85]=j,e[86]=x,e[87]=k,e[88]=p):p=e[88];let N;return e[89]!==r||e[90]!==c||e[91]!==d||e[92]!==u||e[93]!==p||e[94]!==b?(N=n.jsxs("button",{type:b,onClick:r,className:c,children:[d,u,p]}),e[89]=r,e[90]=c,e[91]=d,e[92]=u,e[93]=p,e[94]=b,e[95]=N):N=e[95],N}function O1(t){return t.assigneeId?[t.assigneeId]:[]}function ii(t){const e=E.c(10),{className:s,count:l,children:i}=t;let a;e[0]!==s?(a=P("size-2 rounded-full",s),e[0]=s,e[1]=a):a=e[1];let o;e[2]!==a?(o=n.jsx("span",{className:a}),e[2]=a,e[3]=o):o=e[3];let r;e[4]!==l?(r=n.jsx("span",{className:"tabular-nums text-foreground",children:l}),e[4]=l,e[5]=r):r=e[5];let c;return e[6]!==i||e[7]!==o||e[8]!==r?(c=n.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[o,r,i]}),e[6]=i,e[7]=o,e[8]=r,e[9]=c):c=e[9],c}function gi(t){const e=E.c(10),{status:s}=t;let l,i,a,o;if(e[0]!==s){const c=Sl(s);l=c.icon,i=12,a=!0,o=P("shrink-0",c.iconClassName.replace(/\banimate-\S+\b/g,"").trim()),e[0]=s,e[1]=l,e[2]=i,e[3]=a,e[4]=o}else l=e[1],i=e[2],a=e[3],o=e[4];let r;return e[5]!==l||e[6]!==i||e[7]!==a||e[8]!==o?(r=n.jsx(l,{size:i,"aria-hidden":a,className:o}),e[5]=l,e[6]=i,e[7]=a,e[8]=o,e[9]=r):r=e[9],r}function bo(t){return P("inline-flex h-6 shrink-0 items-center gap-1 rounded-md px-2 text-xs font-medium transition-colors",t?"bg-success/15 text-success hover:bg-success/25":"bg-muted text-foreground hover:bg-secondary-hover")}function L1(t){const e=E.c(35),{item:s,buttonClassName:l}=t,i=J(),a=cs();if(!a)return null;const o=s.isEpic;let r;e[0]!==a.items||e[1]!==s?(r=Qa(a.items,s),e[0]=a.items,e[1]=s,e[2]=r):r=e[2];const c=r;let d,u,f,m,g,h;if(e[3]!==a||e[4]!==l||e[5]!==o||e[6]!==s.id||e[7]!==c||e[8]!==i){let k;e[15]!==s.id?(k=N=>N.isEpic&&N.id!==s.id,e[15]=s.id,e[16]=k):k=e[16];const b=a.items.filter(k);u=Ke;let v;e[17]!==l?(v=P(l,"max-w-full"),e[17]=l,e[18]=v):v=e[18];let p;e[19]!==o||e[20]!==c||e[21]!==i?(p=o?n.jsxs(n.Fragment,{children:[n.jsx(_t,{size:16,className:"shrink-0 text-chart-1"}),i("taskBoard.epics.epicBadge")]}):c?n.jsxs(n.Fragment,{children:[c.isEpic?n.jsx(_t,{size:16,className:"shrink-0 text-chart-1"}):n.jsx(ci,{size:16,className:"shrink-0"}),n.jsx("span",{className:"min-w-0 truncate",children:c.title})]}):n.jsxs(n.Fragment,{children:[n.jsx(ci,{size:16,className:"shrink-0"}),i("taskBoard.epics.addParent")]}),e[19]=o,e[20]=c,e[21]=i,e[22]=p):p=e[22],e[23]!==v||e[24]!==p?(h=n.jsx(Me,{asChild:!0,children:n.jsx("button",{type:"button",className:v,children:p})}),e[23]=v,e[24]=p,e[25]=h):h=e[25],d=Ye,f="start",m="w-64",g=o?n.jsx(Se,{onSelect:()=>a.setEpic(s.id,!1),children:i("taskBoard.epics.makeCard")}):n.jsxs(n.Fragment,{children:[c&&n.jsx(Se,{onSelect:()=>a.setParent(s.id,null),children:i("taskBoard.epics.noParent")}),b.map(N=>n.jsxs(Se,{className:"gap-2",onSelect:()=>a.setParent(s.id,N.id),children:[n.jsx(_t,{size:14,className:"shrink-0 text-chart-1"}),n.jsx("span",{className:"truncate",children:N.title})]},N.id)),(c||b.length>0)&&n.jsx(ki,{}),n.jsxs(Se,{className:"gap-2",onSelect:()=>a.setEpic(s.id,!0),children:[n.jsx(_t,{size:14,className:"shrink-0"}),i("taskBoard.epics.makeEpic")]})]}),e[3]=a,e[4]=l,e[5]=o,e[6]=s.id,e[7]=c,e[8]=i,e[9]=d,e[10]=u,e[11]=f,e[12]=m,e[13]=g,e[14]=h}else d=e[9],u=e[10],f=e[11],m=e[12],g=e[13],h=e[14];let j;e[26]!==d||e[27]!==f||e[28]!==m||e[29]!==g?(j=n.jsx(d,{align:f,className:m,children:g}),e[26]=d,e[27]=f,e[28]=m,e[29]=g,e[30]=j):j=e[30];let x;return e[31]!==u||e[32]!==h||e[33]!==j?(x=n.jsxs(u,{children:[h,j]}),e[31]=u,e[32]=h,e[33]=j,e[34]=x):x=e[34],x}function F1(t){const e=E.c(44),{item:s}=t,l=J(),i=cs(),[a,o]=Z.useState("");if(!i)return null;const r=s.isEpic;if(xo(i.items,s))return null;let c,d,u,f,m;if(e[0]!==i||e[1]!==a||e[2]!==r||e[3]!==s||e[4]!==l){const N=Wa(i.items,s.id),y=Ya(N),B=r?i.items.filter(I=>I.id!==s.id&&!I.isEpic&&!Qa(i.items,I)&&I.status!=="archived"):[];let C;e[10]!==i||e[11]!==a||e[12]!==s?(C=()=>{const I=a.trim();I&&(i.onCreateChild(s,I),o(""))},e[10]=i,e[11]=a,e[12]=s,e[13]=C):C=e[13],c=C,f="flex flex-col gap-3 pb-6";const w=r?"taskBoard.epics.workItems":"taskBoard.epics.subtasks";let D;e[14]!==l||e[15]!==w?(D=l(w),e[14]=l,e[15]=w,e[16]=D):D=e[16];let S;e[17]!==D?(S=n.jsx("span",{className:"text-base font-semibold text-foreground",children:D}),e[17]=D,e[18]=S):S=e[18];const T=y.total>0&&n.jsxs(n.Fragment,{children:[n.jsx(Ui,{progress:y,className:"max-w-40"}),n.jsx("span",{className:"text-xs tabular-nums text-muted-foreground",children:l("taskBoard.epics.progress",{done:y.done,total:y.total})})]}),_=B.length>0&&n.jsxs(Ke,{children:[n.jsx(Me,{asChild:!0,children:n.jsx(ce,{size:"sm",variant:"ghost",className:"ml-auto",children:l("taskBoard.epics.addExisting")})}),n.jsx(Ye,{align:"end",className:"max-h-80 w-72 overflow-y-auto",children:B.map(I=>n.jsx(Se,{onSelect:()=>i.setParent(I.id,s.id),children:n.jsx("span",{className:"truncate",children:I.title})},I.id))})]});e[19]!==_||e[20]!==S||e[21]!==T?(m=n.jsxs("div",{className:"flex items-center gap-3",children:[S,T,_]}),e[19]=_,e[20]=S,e[21]=T,e[22]=m):m=e[22],d="surface flex flex-col overflow-hidden";let A;e[23]!==i?(A=I=>n.jsx(ko,{child:I,board:i},I.id),e[23]=i,e[24]=A):A=e[24],u=N.map(A),e[0]=i,e[1]=a,e[2]=r,e[3]=s,e[4]=l,e[5]=c,e[6]=d,e[7]=u,e[8]=f,e[9]=m}else c=e[5],d=e[6],u=e[7],f=e[8],m=e[9];let g;e[25]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(is,{size:15,className:"shrink-0 text-muted-foreground"}),e[25]=g):g=e[25];let h;e[26]===Symbol.for("react.memo_cache_sentinel")?(h=N=>o(N.target.value),e[26]=h):h=e[26];let j;e[27]!==c?(j=N=>{N.key==="Enter"&&c()},e[27]=c,e[28]=j):j=e[28];const x=r?"taskBoard.epics.addWorkItemPlaceholder":"taskBoard.epics.addSubtaskPlaceholder";let k;e[29]!==l||e[30]!==x?(k=l(x),e[29]=l,e[30]=x,e[31]=k):k=e[31];let b;e[32]!==a||e[33]!==j||e[34]!==k?(b=n.jsxs("div",{className:"flex items-center gap-3 px-3 py-2.5",children:[g,n.jsx("input",{value:a,onChange:h,onKeyDown:j,placeholder:k,className:"min-w-0 flex-1 bg-transparent text-sm text-foreground outline-none placeholder:text-muted-foreground"})]}),e[32]=a,e[33]=j,e[34]=k,e[35]=b):b=e[35];let v;e[36]!==d||e[37]!==b||e[38]!==u?(v=n.jsxs("div",{className:d,children:[u,b]}),e[36]=d,e[37]=b,e[38]=u,e[39]=v):v=e[39];let p;return e[40]!==v||e[41]!==f||e[42]!==m?(p=n.jsxs("div",{className:f,children:[m,v]}),e[40]=v,e[41]=f,e[42]=m,e[43]=p):p=e[43],p}const P1=qs.filter(t=>t!=="archived");function ko(t){const e=E.c(63),{child:s,board:l}=t,i=J(),a=It[s.type??Bl],o=a.icon,r=et[s.priority],c=r.icon,d=s.isEpic;let u;e[0]!==l.items||e[1]!==s.id||e[2]!==s.status||e[3]!==d?(u=d?Ki(Ya(Wa(l.items,s.id))):s.status,e[0]=l.items,e[1]=s.id,e[2]=s.status,e[3]=d,e[4]=u):u=e[4];const f=u;let m;e[5]!==f||e[6]!==i?(m=ht(f,i),e[5]=f,e[6]=i,e[7]=m):m=e[7];const g=m,h=f==="done";let j;e[8]!==h?(j=bo(h),e[8]=h,e[9]=j):j=e[9];const x=j;let k;e[10]!==l.memberByUserId||e[11]!==s.assigneeId?(k=s.assigneeId?l.memberByUserId.get(s.assigneeId):void 0,e[10]=l.memberByUserId,e[11]=s.assigneeId,e[12]=k):k=e[12];const b=k;let v;e[13]!==o||e[14]!==d||e[15]!==i||e[16]!==a.iconClassName||e[17]!==a.labelKey?(v=d?n.jsx(_t,{size:15,"aria-label":i("taskBoard.epics.epicBadge"),className:"shrink-0 text-chart-1"}):n.jsx(o,{size:15,"aria-label":i(a.labelKey),className:P("shrink-0",a.iconClassName)}),e[13]=o,e[14]=d,e[15]=i,e[16]=a.iconClassName,e[17]=a.labelKey,e[18]=v):v=e[18];let p;e[19]!==l||e[20]!==s?(p=()=>l.onOpen(s),e[19]=l,e[20]=s,e[21]=p):p=e[21];const N=h&&"line-through";let y;e[22]!==N?(y=P("shrink-0 text-sm text-muted-foreground",N),e[22]=N,e[23]=y):y=e[23];let B;e[24]!==l.orgSlug||e[25]!==s.keySeq?(B=ln(l.orgSlug,s.keySeq),e[24]=l.orgSlug,e[25]=s.keySeq,e[26]=B):B=e[26];let C;e[27]!==y||e[28]!==B?(C=n.jsx("span",{className:y,children:B}),e[27]=y,e[28]=B,e[29]=C):C=e[29];let w;e[30]!==s.title?(w=n.jsx("span",{className:"min-w-0 truncate text-sm text-foreground",children:s.title}),e[30]=s.title,e[31]=w):w=e[31];let D;e[32]!==C||e[33]!==w||e[34]!==p?(D=n.jsxs("button",{type:"button",onClick:p,className:"flex min-w-0 flex-1 items-center gap-2 text-left",children:[C,w]}),e[32]=C,e[33]=w,e[34]=p,e[35]=D):D=e[35];let S;e[36]!==l||e[37]!==s.id||e[38]!==x||e[39]!==d||e[40]!==g.label||e[41]!==f||e[42]!==i?(S=n.jsx("div",{className:"flex w-44 shrink-0 justify-start",children:d?n.jsxs("span",{className:x,children:[n.jsx(gi,{status:f}),g.label]}):n.jsxs(Ke,{children:[n.jsx(Me,{asChild:!0,children:n.jsxs("button",{type:"button",className:x,children:[n.jsx(gi,{status:f}),g.label,n.jsx($l,{size:12,className:"shrink-0"})]})}),n.jsx(Ye,{align:"end",className:"w-56",children:P1.map(R=>{const L=ht(R,i),U=L.visual.icon;return n.jsxs(Se,{className:"gap-2",onSelect:()=>l.onSetStatus(s.id,R),children:[n.jsx(U,{size:14,className:P("shrink-0",L.visual.iconClassName.replace(/\banimate-\S+\b/g,"").trim())}),L.label]},R)})})]})}),e[36]=l,e[37]=s.id,e[38]=x,e[39]=d,e[40]=g.label,e[41]=f,e[42]=i,e[43]=S):S=e[43];const T=b?.user?.name??void 0;let _;e[44]!==b||e[45]!==s.assigneeId||e[46]!==T?(_=n.jsx("span",{className:"flex w-5 shrink-0 justify-center",children:n.jsx(ho,{assigneeId:s.assigneeId,assignee:b,title:T})}),e[44]=b,e[45]=s.assigneeId,e[46]=T,e[47]=_):_=e[47];let A;e[48]!==r.labelKey||e[49]!==i?(A=i(r.labelKey),e[48]=r.labelKey,e[49]=i,e[50]=A):A=e[50];let I;e[51]!==r.iconClassName?(I=P("shrink-0",r.iconClassName),e[51]=r.iconClassName,e[52]=I):I=e[52];let $;e[53]!==c||e[54]!==A||e[55]!==I?($=n.jsx(c,{size:15,"aria-label":A,className:I}),e[53]=c,e[54]=A,e[55]=I,e[56]=$):$=e[56];let O;return e[57]!==D||e[58]!==S||e[59]!==_||e[60]!==$||e[61]!==v?(O=n.jsxs("div",{className:"flex min-w-0 items-center gap-3 border-b border-border px-3 py-2 transition-colors last:border-b-0 hover:bg-accent",children:[v,D,S,_,$]}),e[57]=D,e[58]=S,e[59]=_,e[60]=$,e[61]=v,e[62]=O):O=e[62],O}function M1(t){const e=E.c(14),{item:s}=t,l=J(),i=cs();if(!i)return null;let a;e[0]!==i.items||e[1]!==s?(a=Qa(i.items,s),e[0]=i.items,e[1]=s,e[2]=a):a=e[2];const o=a;if(!o)return null;const c=o.isEpic?"taskBoard.epics.epicBadge":"taskBoard.epics.parentTask";let d;e[3]!==l||e[4]!==c?(d=l(c),e[3]=l,e[4]=c,e[5]=d):d=e[5];let u;e[6]!==d?(u=n.jsx("span",{className:"text-base font-semibold text-foreground",children:d}),e[6]=d,e[7]=u):u=e[7];let f;e[8]!==i||e[9]!==o?(f=n.jsx("div",{className:"surface flex flex-col overflow-hidden",children:n.jsx(ko,{child:o,board:i})}),e[8]=i,e[9]=o,e[10]=f):f=e[10];let m;return e[11]!==u||e[12]!==f?(m=n.jsxs("div",{className:"flex flex-col gap-3 pb-6",children:[u,f]}),e[11]=u,e[12]=f,e[13]=m):m=e[13],m}function K1(t){const e=E.c(19),s=J(),l=cs();if(!l||!t)return null;if(t.isEpic){let u;e[0]!==s?(u=s("taskBoard.epics.tab"),e[0]=s,e[1]=u):u=e[1];let f;return e[2]!==l.onShowEpics||e[3]!==u?(f={key:"epics",label:u,onSelect:l.onShowEpics},e[2]=l.onShowEpics,e[3]=u,e[4]=f):f=e[4],f}let i,a,o,r;if(e[5]!==l.items||e[6]!==l.orgSlug||e[7]!==t){r=Symbol.for("react.early_return_sentinel");e:{if(i=Qa(l.items,t),!i){r=null;break e}a="parent",o=ln(l.orgSlug,i.keySeq)??i.title}e[5]=l.items,e[6]=l.orgSlug,e[7]=t,e[8]=i,e[9]=a,e[10]=o,e[11]=r}else i=e[8],a=e[9],o=e[10],r=e[11];if(r!==Symbol.for("react.early_return_sentinel"))return r;let c;e[12]!==l||e[13]!==i?(c=()=>l.onOpen(i),e[12]=l,e[13]=i,e[14]=c):c=e[14];let d;return e[15]!==a||e[16]!==o||e[17]!==c?(d={key:a,label:o,onSelect:c},e[15]=a,e[16]=o,e[17]=c,e[18]=d):d=e[18],d}const U1="claude-subscription";function yo(t){const e=(t??[]).filter(s=>s.costUsd!==null);return e.length===0?null:{total:e.reduce((s,l)=>s+(l.costUsd??0),0),runCount:e.length,onSubscription:e.every(s=>s.costProvider===U1)}}function q1(t,e){const s=t.state==="open"&&!t.merged,l=t.mergeable===!1,i=t.checksStatus!=="failing";return{isOpen:s,hasConflict:l,showShip:e&&s&&i&&!l,showResolveConflict:e&&s&&l}}function vo(t){if(t.status!=="completed")return!1;const e=t.conclusion;return e==="success"||e==="neutral"||e==="skipped"}function G1(t,e,s){return t!=="failing"||s||e.length===0?null:{passed:e.filter(vo).length,total:e.length}}function V1(t){const e=E.c(10),{locator:s}=tt(),l=Qt();let i;e[0]!==s||e[1]!==t?(i=St.previewProbe(s,t??""),e[0]=s,e[1]=t,e[2]=i):i=e[2];const a=!!t;let o;e[3]!==l||e[4]!==t?(o=()=>l.call("TASK_BOARD_PREVIEW_PROBE",{url:t}),e[3]=l,e[4]=t,e[5]=o):o=e[5];let r;return e[6]!==i||e[7]!==a||e[8]!==o?(r={queryKey:i,enabled:a,staleTime:0,gcTime:0,retry:!1,queryFn:o},e[6]=i,e[7]=a,e[8]=o,e[9]=r):r=e[9],Ga(r)}function H1(t,e){return new URL(e,t).toString()}function Y1(t){const e=E.c(46),{url:s,routes:l}=t,i=J(),{data:a,isPending:o,isError:r}=V1(s),c=a?.available??!1;if(o){let w;e[0]===Symbol.for("react.memo_cache_sentinel")?(w=n.jsx(bt,{className:"size-[14px]"}),e[0]=w):w=e[0];let D;e[1]!==i?(D=i("taskBoard.taskDialog.previewLabel"),e[1]=i,e[2]=D):D=e[2];let S;return e[3]!==D?(S=n.jsxs(ce,{type:"button",variant:"outline",size:"sm",className:"gap-1.5",disabled:!0,children:[w,D]}),e[3]=D,e[4]=S):S=e[4],S}if(!c||r){let w;e[5]!==i?(w=i("taskBoard.taskDialog.previewUnavailableTitle"),e[5]=i,e[6]=w):w=e[6];let D;e[7]===Symbol.for("react.memo_cache_sentinel")?(D=n.jsx(di,{size:14}),e[7]=D):D=e[7];let S;e[8]!==i?(S=i("taskBoard.taskDialog.previewUnavailable"),e[8]=i,e[9]=S):S=e[9];let T;return e[10]!==w||e[11]!==S?(T=n.jsxs(ce,{type:"button",variant:"outline",size:"sm",className:"gap-1.5",disabled:!0,title:w,children:[D,S]}),e[10]=w,e[11]=S,e[12]=T):T=e[12],T}const d=l.length>0&&"rounded-r-none";let u;e[13]!==d?(u=P("gap-1.5",d),e[13]=d,e[14]=u):u=e[14];let f;e[15]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(di,{size:14}),e[15]=f):f=e[15];let m;e[16]!==i?(m=i("taskBoard.taskDialog.previewLabel"),e[16]=i,e[17]=m):m=e[17];let g;e[18]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(Ka,{size:12}),e[18]=g):g=e[18];let h;e[19]!==m||e[20]!==s?(h=n.jsxs("a",{href:s,target:"_blank",rel:"noreferrer",children:[f,m,g]}),e[19]=m,e[20]=s,e[21]=h):h=e[21];let j;e[22]!==u||e[23]!==h?(j=n.jsx(ce,{asChild:!0,type:"button",variant:"outline",size:"sm",className:u,children:h}),e[22]=u,e[23]=h,e[24]=j):j=e[24];const x=j;if(l.length===0)return x;let k;e[25]!==i?(k=i("taskBoard.taskDialog.previewRoutesLabel"),e[25]=i,e[26]=k):k=e[26];let b;e[27]!==i?(b=i("taskBoard.taskDialog.previewRoutesLabel"),e[27]=i,e[28]=b):b=e[28];let v;e[29]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx($l,{size:14}),e[29]=v):v=e[29];let p;e[30]!==k||e[31]!==b?(p=n.jsx(Me,{asChild:!0,children:n.jsx(ce,{type:"button",variant:"outline",size:"sm",className:"rounded-l-none border-l-0 px-1.5","aria-label":k,title:b,children:v})}),e[30]=k,e[31]=b,e[32]=p):p=e[32];let N;if(e[33]!==l||e[34]!==s){let w;e[36]!==s?(w=D=>n.jsx(Se,{asChild:!0,children:n.jsx("a",{href:H1(s,D),target:"_blank",rel:"noreferrer",className:"font-mono text-xs",children:D})},D),e[36]=s,e[37]=w):w=e[37],N=l.map(w),e[33]=l,e[34]=s,e[35]=N}else N=e[35];let y;e[38]!==N?(y=n.jsx(Ye,{align:"start",children:N}),e[38]=N,e[39]=y):y=e[39];let B;e[40]!==p||e[41]!==y?(B=n.jsxs(Ke,{children:[p,y]}),e[40]=p,e[41]=y,e[42]=B):B=e[42];let C;return e[43]!==x||e[44]!==B?(C=n.jsxs("div",{className:"flex items-center",children:[x,B]}),e[43]=x,e[44]=B,e[45]=C):C=e[45],C}function W1(t){return typeof t!="string"?"":ro(t.replace(/^Error:\s*/,"")).message}function Q1(t){return t?.to==="todo"?!0:t?.to==="triage"&&typeof t.retriesSpent=="number"}function X1(t){for(let e=t.length-1;e>=0;e--){const s=t[e];if(!s||s.action!=="status_changed")continue;if(typeof s.data?.retry=="number")return null;const l=s.data?.reason;return typeof l!="string"||!Q1(s.data)?null:ro(l.replace(/^Error:\s*/,""))}return null}function Z1({orgSlug:t,repo:e,repositories:s,returnTo:l}){const i=`/api/${encodeURIComponent(t)}/git-providers/github`,a=e?s.find(r=>r.path===e)?.accountId:null;if(!a)return{url:`${i}/install?returnTo=${encodeURIComponent(l)}`,ownerOnly:!1,owner:null};const o=e?.includes("/")?e.split("/")[0]:null;return{url:`${i}/accounts/${encodeURIComponent(a)}/manage`,ownerOnly:o!==null,owner:o}}function No(t){const e=E.c(10),{locator:s}=tt(),l=Qt();let i;e[0]!==t||e[1]!==s?(i=St.taskBoardActivity(s,t??""),e[0]=t,e[1]=s,e[2]=i):i=e[2];const a=!!t;let o;e[3]!==t||e[4]!==l?(o=async()=>(await l.call("TASK_BOARD_ACTIVITY_LIST",{taskBoardItemId:t})).activity,e[3]=t,e[4]=l,e[5]=o):o=e[5];let r;return e[6]!==i||e[7]!==a||e[8]!==o?(r={queryKey:i,enabled:a,queryFn:o},e[6]=i,e[7]=a,e[8]=o,e[9]=r):r=e[9],Ga(r)}function J1(t){const e=E.c(10),{locator:s}=tt(),l=Qt(),i=an();let a;e[0]!==t||e[1]!==l?(a=async()=>await l.call("TASK_BOARD_PROMOTE_TO_PRODUCTION",{taskBoardItemId:t}),e[0]=t,e[1]=l,e[2]=a):a=e[2];let o;e[3]!==t||e[4]!==s||e[5]!==i?(o=()=>{i.invalidateQueries({queryKey:St.taskBoardItemPrs(s,t)}),i.invalidateQueries({queryKey:St.taskBoardActivity(s,t)})},e[3]=t,e[4]=s,e[5]=i,e[6]=o):o=e[6];let r;return e[7]!==a||e[8]!==o?(r={mutationFn:a,onSuccess:o},e[7]=a,e[8]=o,e[9]=r):r=e[9],Nt(r)}function ef(t){const e=E.c(10),{locator:s}=tt(),l=Qt(),i=an();let a;e[0]!==t||e[1]!==l?(a=async c=>await l.call("TASK_BOARD_RESOLVE_CONFLICT",{id:t,prNumber:c}),e[0]=t,e[1]=l,e[2]=a):a=e[2];let o;e[3]!==t||e[4]!==s||e[5]!==i?(o=()=>{i.invalidateQueries({queryKey:St.taskBoardItemPrs(s,t)}),i.invalidateQueries({queryKey:St.taskBoardActivity(s,t)})},e[3]=t,e[4]=s,e[5]=i,e[6]=o):o=e[6];let r;return e[7]!==a||e[8]!==o?(r={mutationFn:a,onSuccess:o},e[7]=a,e[8]=o,e[9]=r):r=e[9],Nt(r)}function tf(t){const e=E.c(10),{locator:s}=tt(),l=Qt(),i=an();let a;e[0]!==t||e[1]!==l?(a=async()=>await l.call("TASK_BOARD_RUN_REVIEWER",{id:t}),e[0]=t,e[1]=l,e[2]=a):a=e[2];let o;e[3]!==t||e[4]!==s||e[5]!==i?(o=()=>{i.invalidateQueries({queryKey:St.taskBoardActivity(s,t)})},e[3]=t,e[4]=s,e[5]=i,e[6]=o):o=e[6];let r;return e[7]!==a||e[8]!==o?(r={mutationFn:a,onSuccess:o},e[7]=a,e[8]=o,e[9]=r):r=e[9],Nt(r)}function sf(t){return t?Gd:[]}function nf(t,e){if(e.length===0)return null;const s=e.map(a=>t.find(o=>o.reviewer===a)),l=s.filter(a=>a?.verdict==="approved"),i={passed:l.length,total:e.length};return s.some(a=>a?.verdict==="changes_requested")?{...i,tone:"danger"}:l.length===0?{...i,tone:"danger"}:l.length<e.length?{...i,tone:"pending"}:{...i,tone:"ok"}}function af(t){return t==="ready_for_deployment"}const lf=[],rf=[];function So(t,e){const s=E.c(4),l=e===void 0?lf:e,i=bu();let a;if(s[0]!==i||s[1]!==l||s[2]!==t){const o=Bu(i);a=uo(o,[...t.map(of),...l]),s[0]=i,s[1]=l,s[2]=t,s[3]=a}else a=s[3];return a}function of(t){return t.repo}function Bo(t){return t?.projects.length===1?t.projects[0]:void 0}function cf(t){return Bo(t)?t.repo:t.projects.length>1?t.projects.map(e=>e.title).join(", "):null}function ls(t){const e=E.c(6),{entry:s}=t;let l;e[0]!==s?(l=Bo(s),e[0]=s,e[1]=l):l=e[1];const i=l;if(i){let o;return e[2]!==i.icon||e[3]!==i.title?(o=n.jsx(Du,{icon:i.icon,name:i.title}),e[2]=i.icon,e[3]=i.title,e[4]=o):o=e[4],o}let a;return e[5]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center",children:n.jsx(wu,{className:"size-3"})}),e[5]=a):a=e[5],a}function Co(t){const e=E.c(14),{entry:s}=t;let l;e[0]!==s?(l=cf(s),e[0]=s,e[1]=l):l=e[1];const i=l;let a;e[2]!==s?(a=n.jsx(ls,{entry:s}),e[2]=s,e[3]=a):a=e[3];let o;e[4]!==s.title?(o=n.jsx("span",{className:"truncate",children:s.title}),e[4]=s.title,e[5]=o):o=e[5];let r;e[6]!==i?(r=i&&n.jsx("span",{className:"truncate text-xs text-muted-foreground",children:i}),e[6]=i,e[7]=r):r=e[7];let c;e[8]!==o||e[9]!==r?(c=n.jsxs("span",{className:"flex min-w-0 flex-1 flex-col",children:[o,r]}),e[8]=o,e[9]=r,e[10]=c):c=e[10];let d;return e[11]!==a||e[12]!==c?(d=n.jsxs(n.Fragment,{children:[a,c]}),e[11]=a,e[12]=c,e[13]=d):d=e[13],d}function qi(t){const e=E.c(57),{members:s,onSelect:l}=t,i=J();let a;e[0]!==i?(a=i("taskBoard.taskDialog.assignToPlaceholder"),e[0]=i,e[1]=a):a=e[1];let o;e[2]!==i?(o=i("taskBoard.taskDialog.assignToPlaceholder"),e[2]=i,e[3]=o):o=e[3];let r;e[4]!==a||e[5]!==o?(r=n.jsx(Oi,{placeholder:a,"aria-label":o,className:"h-9"}),e[4]=a,e[5]=o,e[6]=r):r=e[6];let c;e[7]!==i?(c=i("taskBoard.taskDialog.noMembersFound"),e[7]=i,e[8]=c):c=e[8];let d;e[9]!==c?(d=n.jsx(Li,{children:c}),e[9]=c,e[10]=d):d=e[10];let u;e[11]!==i?(u=i("taskBoard.taskDialog.superAgentLabel"),e[11]=i,e[12]=u):u=e[12];let f;e[13]!==l?(f=()=>l(Ie),e[13]=l,e[14]=f):f=e[14];let m;e[15]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(mt,{size:16}),e[15]=m):m=e[15];let g;e[16]!==i?(g=i("taskBoard.taskDialog.superAgentLabel"),e[16]=i,e[17]=g):g=e[17];let h;e[18]!==g?(h=n.jsx("span",{className:"truncate",children:g}),e[18]=g,e[19]=h):h=e[19];let j;e[20]!==h||e[21]!==u||e[22]!==f?(j=n.jsxs(Xs,{value:u,onSelect:f,className:"gap-2",children:[m,h]}),e[20]=h,e[21]=u,e[22]=f,e[23]=j):j=e[23];let x;e[24]!==i?(x=i("taskBoard.taskDialog.unassignedLabel"),e[24]=i,e[25]=x):x=e[25];let k;e[26]!==l?(k=()=>l(null),e[26]=l,e[27]=k):k=e[27];let b;e[28]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx(Qs,{size:16,className:"text-muted-foreground"}),e[28]=b):b=e[28];let v;e[29]!==i?(v=i("taskBoard.taskDialog.unassignedLabel"),e[29]=i,e[30]=v):v=e[30];let p;e[31]!==v?(p=n.jsx("span",{className:"truncate",children:v}),e[31]=v,e[32]=p):p=e[32];let N;e[33]!==x||e[34]!==k||e[35]!==p?(N=n.jsxs(Xs,{value:x,onSelect:k,className:"gap-2",children:[b,p]}),e[33]=x,e[34]=k,e[35]=p,e[36]=N):N=e[36];let y;e[37]!==j||e[38]!==N?(y=n.jsxs(qa,{children:[j,N]}),e[37]=j,e[38]=N,e[39]=y):y=e[39];let B;e[40]!==i?(B=i("taskBoard.taskDialog.membersGroupHeading"),e[40]=i,e[41]=B):B=e[41];let C;if(e[42]!==s||e[43]!==l){let T;e[45]!==l?(T=_=>n.jsxs(Xs,{value:_.user?.name??_.userId,onSelect:()=>l(_.userId),className:"gap-2",children:[n.jsx(ft,{url:_.user?.image??void 0,fallback:_.user?.name??"?",shape:"circle",size:"2xs"}),n.jsx("span",{className:"truncate",children:_.user?.name??_.userId})]},_.userId),e[45]=l,e[46]=T):T=e[46],C=s.map(T),e[42]=s,e[43]=l,e[44]=C}else C=e[44];let w;e[47]!==B||e[48]!==C?(w=n.jsx(qa,{heading:B,children:C}),e[47]=B,e[48]=C,e[49]=w):w=e[49];let D;e[50]!==y||e[51]!==w||e[52]!==d?(D=n.jsxs(Fi,{children:[d,y,w]}),e[50]=y,e[51]=w,e[52]=d,e[53]=D):D=e[53];let S;return e[54]!==D||e[55]!==r?(S=n.jsxs(Pi,{children:[r,D]}),e[54]=D,e[55]=r,e[56]=S):S=e[56],S}function wo({tags:t,selectedIds:e,defaultColor:s,onToggle:l,onCreate:i,onDelete:a}){const o=J(),[r,c]=Z.useState(""),[d,u]=Z.useState(!1),[f,m]=Z.useState(s),g=r.trim(),h=t.some(x=>x.name.toLowerCase()===g.toLowerCase()),j=async()=>{if(!(!g||h||d)){u(!0);try{await i(g,f),c("")}finally{u(!1)}}};return n.jsxs(Pi,{children:[n.jsx(Oi,{value:r,onValueChange:c,placeholder:o("taskBoard.taskDialog.tagFilterPlaceholder"),"aria-label":o("taskBoard.taskDialog.tagFilterPlaceholder"),className:"h-9"}),n.jsxs(Fi,{children:[g&&!h?n.jsx(qa,{children:n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("input",{type:"color",value:f,onChange:x=>m(x.target.value),"aria-label":o("taskBoard.taskDialog.pickTagColorAriaLabel"),className:"ml-2 size-4 shrink-0 cursor-pointer appearance-none rounded-full border-0 bg-transparent p-0 [&::-moz-color-swatch]:rounded-full [&::-moz-color-swatch]:border-0 [&::-webkit-color-swatch]:rounded-full [&::-webkit-color-swatch]:border-0 [&::-webkit-color-swatch-wrapper]:p-0"}),n.jsxs(Xs,{value:`create-${g}`,disabled:d,onSelect:j,className:"flex-1 gap-2",children:[n.jsx(is,{size:16,className:"text-muted-foreground"}),n.jsx("span",{className:"truncate",children:o("taskBoard.taskDialog.createTagOption",{name:g})})]})]})}):n.jsx(Li,{children:o("taskBoard.taskDialog.noTagsFound")}),n.jsx(qa,{children:t.map(x=>{const k=e.includes(x.id);return n.jsxs(Xs,{value:x.name,onSelect:()=>l(x.id),className:"group gap-2",children:[n.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:rn(x.color)}}),n.jsx("span",{className:"flex-1 truncate",children:x.name}),n.jsx("button",{type:"button","aria-label":o("taskBoard.taskDialog.deleteTagAriaLabel",{name:x.name}),className:"flex size-5 shrink-0 items-center justify-center rounded-lg text-muted-foreground opacity-0 hover:bg-background hover:text-destructive focus-visible:opacity-100 group-hover:opacity-100",onClick:b=>{b.stopPropagation(),a(x.id)},children:n.jsx(Si,{size:13})}),k&&n.jsx(Us,{size:14,className:"shrink-0 text-foreground"})]},x.id)})})]})]})}function df(t){if(!t)return[];const e=[],s=new Set,l=(o,r)=>{s.has(o)||(s.add(o),e.push({url:o,label:r.trim()||o}))},i=t.replace(/!\[[^\]]*\]\([^)]*\)/g,"");for(const o of i.matchAll(/\[([^\]]*)\]\((https?:\/\/[^)\s]+)[^)]*\)/g))l(o[2]??"",o[1]??"");const a=i.replace(/\[[^\]]*\]\([^)]*\)/g,"");for(const o of a.matchAll(/https?:\/\/[^\s)]+/g)){const r=o[0].replace(/[.,;:!?]+$/,"");r&&l(r,r)}return e}function uf(t){return{id:t.threadId,title:t.title,status:t.status,created_at:t.createdAt,virtual_mcp_id:t.virtualMcpId}}function ff(t){const e=E.c(5),{title:s}=t;let l;e[0]!==s?(l=n.jsx(_u,{className:"shrink-0 border-b border-border px-5 pb-5 pt-6 md:px-6",children:n.jsx(Iu,{className:"truncate text-sm leading-snug",children:s})}),e[0]=s,e[1]=l):l=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx("div",{className:"flex flex-1 items-center justify-center"}),e[2]=i):i=e[2];let a;return e[3]!==l?(a=n.jsxs(n.Fragment,{children:[l,i]}),e[3]=l,e[4]=a):a=e[4],a}function mf(t){const e=E.c(12),{thread:s}=t,{org:l,locator:i}=tt();let a;e[0]!==l.id||e[1]!==l.slug?(a={connectionId:Dc,orgId:l.id,orgSlug:l.slug},e[0]=l.id,e[1]=l.slug,e[2]=a):a=e[2];const o=Ru(a),r=co(),c=ku(),{data:d}=yi();let u;e[3]!==s?(u=uf(s),e[3]=s,e[4]=u):u=e[4];let f;return e[5]!==o||e[6]!==r||e[7]!==i||e[8]!==d||e[9]!==u||e[10]!==c?(f=n.jsx($u,{thread:u,client:o,locator:i,connections:r,virtualMcps:c,members:d,meta:!1}),e[5]=o,e[6]=r,e[7]=i,e[8]=d,e[9]=u,e[10]=c,e[11]=f):f=e[11],f}function pf(t){const e=E.c(11),{thread:s,onClose:l}=t,i=J(),a=!!s;let o;e[0]!==l?(o=u=>!u&&l(),e[0]=l,e[1]=o):o=e[1];let r;e[2]!==i||e[3]!==s?(r=s&&n.jsx(Z.Suspense,{fallback:n.jsx(ff,{title:s.title??i("taskBoard.taskDialog.superAgentDefaultName")}),children:n.jsx(mf,{thread:s})}),e[2]=i,e[3]=s,e[4]=r):r=e[4];let c;e[5]!==r?(c=n.jsx(Au,{"data-testid":"task-thread-sheet",className:"flex flex-col gap-0 p-0 sm:max-w-2xl",children:r}),e[5]=r,e[6]=c):c=e[6];let d;return e[7]!==a||e[8]!==o||e[9]!==c?(d=n.jsx(zu,{open:a,onOpenChange:o,children:c}),e[7]=a,e[8]=o,e[9]=c,e[10]=d):d=e[10],d}const gf=new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit"}),hf=new Intl.DateTimeFormat(void 0,{dateStyle:"full",timeStyle:"short"});function Do(t){return e=>{e.target instanceof Element&&e.target.closest("a, button, input, [contenteditable=true]")||window.getSelection()?.toString()||t()}}function To(t){const e=E.c(65),{id:s,author:l,avatar:i,createdAt:a,body:o,threadId:r,metadata:c,actions:d,onOpenThread:u,onOpen:f,commentId:m,muted:g,editor:h,continuation:j}=t,x=J(),k=Z.useContext(dr),b=k?.orgSlug;let v;e[0]!==k?.orgId||e[1]!==b||e[2]!==r?(v=St.orgFsList(k?.orgId??b??"","outputs",r??""),e[0]=k?.orgId,e[1]=b,e[2]=r,e[3]=v):v=e[3];let p;e[4]!==o||e[5]!==b||e[6]!==r?(p=!!b&&!!r&&nu(o),e[4]=o,e[5]=b,e[6]=r,e[7]=p):p=e[7];let N;e[8]!==b||e[9]!==r?(N=()=>b&&r?Fu(b,"outputs",r):[],e[8]=b,e[9]=r,e[10]=N):N=e[10];let y;e[11]!==v||e[12]!==p||e[13]!==N?(y={queryKey:v,enabled:p,staleTime:3e4,gcTime:3e5,retry:!1,queryFn:N},e[11]=v,e[12]=p,e[13]=N,e[14]=y):y=e[14];const{data:B}=Ga(y);let C;e[15]!==B?(C=new Set(B?.filter(jf).map(xf)),e[15]=B,e[16]=C):C=e[16];const w=C;let D,S,T,_,A,I,$,O;if(e[17]!==l||e[18]!==i||e[19]!==m||e[20]!==j||e[21]!==a||e[22]!==c||e[23]!==g||e[24]!==f||e[25]!==u||e[26]!==x){const K=new Date(a),Q=hf.format(K);$=m,O="task-message",D=g||void 0,e[35]!==f?(S=f&&Do(f),e[35]=f,e[36]=S):S=e[36];const H=j?"py-1":"py-2.5",ee=g&&"opacity-60 hover:opacity-100",G=f&&"cursor-pointer";e[37]!==H||e[38]!==ee||e[39]!==G?(T=P("group relative -mx-3 flex min-w-0 gap-3 rounded-lg px-3 transition-colors hover:bg-muted/50",H,ee,G),e[37]=H,e[38]=ee,e[39]=G,e[40]=T):T=e[40];const se=j?n.jsx("time",{dateTime:a,title:Q,className:"text-meta whitespace-nowrap pt-0.5 opacity-0 group-hover:opacity-100",children:gf.format(K)}):n.jsx("div",{className:"pt-0.5",children:i});e[41]!==se?(_=n.jsx("div",{className:"flex w-8 shrink-0 justify-center",children:se}),e[41]=se,e[42]=_):_=e[42],A="flex min-w-0 flex-1 flex-col gap-0.5",I=(!j||c||u)&&n.jsxs("div",{className:"flex min-h-5 flex-wrap items-center gap-x-2 gap-y-1",children:[!j&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-sm font-medium text-foreground",children:l}),n.jsx("time",{dateTime:a,title:Q,className:"text-meta",children:Tl(K)})]}),g&&n.jsx("span",{className:"text-meta",children:x("taskBoard.conversation.behindTheScenesLabel")}),c,u&&n.jsx(ce,{variant:"ghost",size:"xs",className:"ml-auto font-normal text-muted-foreground",onClick:u,children:x("taskBoard.conversation.openChat")})]}),e[17]=l,e[18]=i,e[19]=m,e[20]=j,e[21]=a,e[22]=c,e[23]=g,e[24]=f,e[25]=u,e[26]=x,e[27]=D,e[28]=S,e[29]=T,e[30]=_,e[31]=A,e[32]=I,e[33]=$,e[34]=O}else D=e[27],S=e[28],T=e[29],_=e[30],A=e[31],I=e[32],$=e[33],O=e[34];let R;e[43]!==o||e[44]!==h||e[45]!==k||e[46]!==s||e[47]!==w||e[48]!==r?(R=(h||o)&&n.jsx("div",{className:P("min-w-0 break-words leading-relaxed text-foreground","[&_img]:max-h-80"),children:h??n.jsx(dr.Provider,{value:k?{...k,threadId:r??void 0,outputFiles:w}:null,children:n.jsx($i,{id:s,text:o,imageGallery:!0})})}),e[43]=o,e[44]=h,e[45]=k,e[46]=s,e[47]=w,e[48]=r,e[49]=R):R=e[49];let L;e[50]!==R||e[51]!==A||e[52]!==I?(L=n.jsxs("div",{className:A,children:[I,R]}),e[50]=R,e[51]=A,e[52]=I,e[53]=L):L=e[53];let U;e[54]!==d?(U=d&&n.jsx("div",{className:"surface absolute -top-3 right-3 z-10 flex items-center gap-0.5 rounded-lg p-0.5 opacity-0 transition-opacity group-hover:opacity-100 has-[:focus-visible]:opacity-100 has-[[data-state=open]]:opacity-100",children:d}),e[54]=d,e[55]=U):U=e[55];let V;return e[56]!==D||e[57]!==S||e[58]!==T||e[59]!==_||e[60]!==L||e[61]!==U||e[62]!==$||e[63]!==O?(V=n.jsxs("article",{"data-comment-id":$,"data-testid":O,"data-muted":D,onClick:S,className:T,children:[_,L,U]}),e[56]=D,e[57]=S,e[58]=T,e[59]=_,e[60]=L,e[61]=U,e[62]=$,e[63]=O,e[64]=V):V=e[64],V}function xf(t){return t.path.slice(t.path.lastIndexOf("/")+1)}function jf(t){return t.kind==="file"}const bf=["[&_p.is-editor-empty:first-child::before]:content-[attr(data-placeholder)]","[&_p.is-editor-empty:first-child::before]:text-muted-foreground","[&_p.is-editor-empty:first-child::before]:float-left","[&_p.is-editor-empty:first-child::before]:h-0","[&_p.is-editor-empty:first-child::before]:pointer-events-none"].join(" ");function kf({placeholder:t,onSubmit:e,onEmptyChange:s,onSendingChange:l,onMentionsChange:i,agents:a,autoFocus:o,uploads:r,ref:c,className:d}){const[u]=Z.useState(()=>new lu),f=Z.useRef(!1),m=Pu({extensions:[Mu.configure({heading:!1,bulletList:!1,orderedList:!1,listItem:!1,blockquote:!1,codeBlock:!1,horizontalRule:!1,link:!1,underline:!1}),iu,fu(u),qu.configure({placeholder:t}),ru,...r?[ou,cu,du]:[]],editorProps:{attributes:{role:"textbox","aria-label":t,"aria-multiline":"true",class:P("outline-none text-sm leading-relaxed text-foreground",bf)},handleKeyDown:(h,j)=>j.key!=="Enter"||j.shiftKey||uu.getState(h.state)?.active?!1:(j.preventDefault(),g(),!0),handlePaste:r?.handlePaste,handleDrop:r?.handleDrop},onCreate:({editor:h})=>{o&&h.commands.focus("end")},onUpdate:({editor:h})=>{s(h.isEmpty),i?.(au(h.getMarkdown()))}});async function g(){if(!m||f.current||r?.uploading())return;const h=m.getMarkdown().trim();if(h){f.current=!0,l?.(!0),m.setEditable(!1);try{await e(h)!==!1&&(m.commands.clearContent(),s(!0),i?.([]))}finally{f.current=!1,l?.(!1),m.isDestroyed||m.setEditable(!0)}}}return Z.useImperativeHandle(c,()=>({submit:g,focus:()=>m?.commands.focus(),attach:h=>{!m?.isEditable||!r||r.uploadInto(m.view,h,m.state.selection.to)}})),n.jsxs(n.Fragment,{children:[n.jsx(Ku,{editor:m,className:d}),n.jsx(mu,{store:u,agents:a})]})}function yf(){const t=E.c(5),e=J();let s;t[0]!==e?(s=e("taskBoard.taskDialog.superAgentLabel"),t[0]=e,t[1]=s):s=t[1];let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(mt,{size:24}),t[2]=l):l=t[2];let i;return t[3]!==s?(i=[{id:Ie,name:s,icon:l}],t[3]=s,t[4]=i):i=t[4],i}function vf(t){const e=E.c(42),{thread:s,me:l,onEdit:i,onDelete:a,onReply:o,liveRunElsewhere:r,continuation:c,replying:d,onReplyingChange:u}=t,f=J(),[m,g]=Z.useState(!1),h=d??m,j=u??g,x=s.run?.status==="running"||s.run?.status==="waiting",[k,b]=Z.useState(!s.run||x||s.replies.length===0);let v;if(e[0]!==c||e[1]!==k||e[2]!==x||e[3]!==r||e[4]!==l||e[5]!==a||e[6]!==i||e[7]!==o||e[8]!==h||e[9]!==j||e[10]!==f||e[11]!==s){const p=s.replies.at(-1),N=s.run?x?"steer":r?"busy":"revive":void 0,y=N==="steer"?"taskBoard.agentThread.replySteer":N==="revive"?"taskBoard.agentThread.replyRevive":"taskBoard.agentThread.reply";let B;e[13]!==f||e[14]!==y?(B=f(y),e[13]=f,e[14]=y,e[15]=B):B=e[15];const C=B;let w;e[16]!==j?(w=()=>{b(!0),j(!0)},e[16]=j,e[17]=w):w=e[17];const D=w,S=k&&!!s.run&&s.replies.length>0&&!x,T=s.run,_=T&&s.author.isAgent?T:void 0,A=T&&!_&&k&&p?.author.isAgent?T:void 0,I=T&&!_&&!A?T:void 0;let $;e[18]!==x?($=G=>n.jsxs(n.Fragment,{children:[n.jsx(hr,{run:G}),x&&G.onStop&&n.jsx(wf,{onStop:G.onStop})]}),e[18]=x,e[19]=$):$=e[19];const O=$,R=!c&&"pt-2";let L;e[20]!==R?(L=P("flex flex-col",R),e[20]=R,e[21]=L):L=e[21];const U=s.author.isAgent?s.run?.onOpen??s.onOpenThread:void 0;let V;e[22]!==O||e[23]!==_?(V=_&&O(_),e[22]=O,e[23]=_,e[24]=V):V=e[24];const K=o&&D;let Q;e[25]!==l||e[26]!==i||e[27]!==s?(Q=jr(s,l)?G=>i(s.id,G):void 0,e[25]=l,e[26]=i,e[27]=s,e[28]=Q):Q=e[28];let H;e[29]!==l||e[30]!==a||e[31]!==s?(H=xr(s,l)?()=>a(s.id):void 0,e[29]=l,e[30]=a,e[31]=s,e[32]=H):H=e[32];let ee;e[33]!==c||e[34]!==C||e[35]!==K||e[36]!==Q||e[37]!==H||e[38]!==U||e[39]!==V||e[40]!==s?(ee=n.jsx(br,{comment:s,onOpen:U,continuation:c,metadata:V,onReply:K,replyLabel:C,onEdit:Q,onDelete:H}),e[33]=c,e[34]=C,e[35]=K,e[36]=Q,e[37]=H,e[38]=U,e[39]=V,e[40]=s,e[41]=ee):ee=e[41],v=n.jsxs("div",{"data-testid":"comment-thread","data-expanded":k,className:L,children:[ee,(s.replies.length>0||h||I)&&n.jsxs("div",{className:"ml-11 flex flex-col",children:[!k&&p&&n.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[n.jsxs("button",{type:"button",onClick:()=>b(!0),className:"focus-ring -mx-1.5 flex min-w-0 items-center gap-2 rounded-lg px-1.5 py-1 text-left text-sm transition-colors hover:bg-muted/50",children:[n.jsx(Nf,{replies:s.replies}),n.jsx("span",{className:"shrink-0 font-medium text-foreground",children:s.replies.length===1?f("taskBoard.agentThread.repliesCountOne"):f("taskBoard.agentThread.repliesCount",{count:s.replies.length})}),n.jsxs("span",{className:"min-w-0 truncate text-muted-foreground",children:[p.author.name,": ",Df(p.body)]})]}),I&&!x&&n.jsx(hr,{run:I})]}),k&&s.replies.map((G,se)=>n.jsx(br,{onOpen:G.author.isAgent?G.onOpenThread??s.run?.onOpen:void 0,comment:A&&G===p?{...G,onOpenThread:void 0}:G,metadata:A&&G===p&&O(A),continuation:_o(s.replies[se-1],G),onEdit:jr(G,l)?re=>i(G.id,re):void 0,onDelete:xr(G,l)?()=>a(G.id):void 0,onReply:o&&D,replyLabel:C,isReply:!0},G.id)),I&&(x||k)&&n.jsxs("div",{onClick:I.onOpen&&Do(I.onOpen),className:P("-mx-3 flex min-h-9 items-center gap-3 rounded-lg px-3 py-1 transition-colors",I.onOpen&&"cursor-pointer hover:bg-muted/50"),children:[n.jsx("div",{className:"flex w-8 shrink-0 justify-center",children:n.jsx(mt,{size:24})}),n.jsx("span",{className:"text-sm font-medium text-foreground",children:f("taskBoard.taskDialog.superAgentLabel")}),O(I)]}),o&&h&&n.jsx("div",{className:"mt-1",children:n.jsx(Io,{autoFocus:!0,replyTo:s.run?{id:Ie,name:f("taskBoard.taskDialog.superAgentLabel"),isAgent:!0}:s.author,placeholder:f(s.run?"taskBoard.agentThread.replyToRunPlaceholder":"taskBoard.taskDialog.commentReplyPlaceholder"),route:N,mentionRoute:r?"steer":"start",onCancel:()=>j(!1),onSubmit:async G=>{const se=await o(G);return se!==!1&&j(!1),se}})}),S&&n.jsx("div",{className:"-mx-2 flex",children:n.jsxs(ce,{variant:"ghost",size:"xs",onClick:()=>{b(!1),j(!1)},className:"font-normal text-muted-foreground",children:[n.jsx(Ou,{}),f("taskBoard.agentThread.hideReplies")]})})]})]}),e[0]=c,e[1]=k,e[2]=x,e[3]=r,e[4]=l,e[5]=a,e[6]=i,e[7]=o,e[8]=h,e[9]=j,e[10]=f,e[11]=s,e[12]=v}else v=e[12];return v}function Nf(t){const e=E.c(4),{replies:s}=t;let l;e[0]!==s?(l=[...new Map(s.map(Bf)).values()].slice(0,3),e[0]=s,e[1]=l):l=e[1];const i=l;let a;return e[2]!==i?(a=n.jsx("span",{className:"flex shrink-0 -space-x-1",children:i.map(Sf)}),e[2]=i,e[3]=a):a=e[3],a}function Sf(t){return n.jsx("span",{className:"flex rounded-full ring-2 ring-background",children:n.jsx(Gi,{author:t,size:"2xs"})},t.id)}function Bf(t){return[t.author.id,t.author]}const Cf=5*6e4;function _o(t,e){if(!t||t.replies.length>0||t.run||e.run||t.author.id!==e.author.id||!!t.internal!=!!e.internal)return!1;const s=new Date(e.createdAt).getTime()-new Date(t.createdAt).getTime();return s>=0&&s<Cf}function wf(t){const e=E.c(12),{onStop:s}=t,l=J(),[i,a]=Z.useState(!1);let o;e[0]!==s?(o=async()=>{a(!0);try{await s()}catch{a(!1)}},e[0]=s,e[1]=o):o=e[1];let r;e[2]!==i?(r=i?n.jsx(bt,{size:"2xs"}):n.jsx("span",{"aria-hidden":!0,className:"size-2 rounded-[2px] bg-current"}),e[2]=i,e[3]=r):r=e[3];const c=i?"taskBoard.agentThread.stopping":"taskBoard.agentThread.stop";let d;e[4]!==l||e[5]!==c?(d=l(c),e[4]=l,e[5]=c,e[6]=d):d=e[6];let u;return e[7]!==i||e[8]!==o||e[9]!==r||e[10]!==d?(u=n.jsxs(ce,{variant:"ghost-destructive",size:"xs",disabled:i,onClick:o,className:"h-5",children:[r,d]}),e[7]=i,e[8]=o,e[9]=r,e[10]=d,e[11]=u):u=e[11],u}function Df(t){return t.replace(/\[@?([^\]]+)\]\([^)]*\)/g,"$1").replace(/[*_`#>]/g,"").replace(/\s+/g," ").trim()}function Tf(t){switch(t){case"running":return{variant:"success",hover:"hover:bg-success/15",icon:n.jsx(bt,{size:"2xs"}),label:"taskBoard.agentThread.statusRunning"};case"waiting":return{variant:"warning",hover:"hover:bg-warning/15",icon:n.jsx(rs,{}),label:"taskBoard.agentThread.statusWaiting"};case"failed":return{variant:"destructive",hover:"hover:bg-destructive/15",icon:n.jsx(rs,{}),label:"taskBoard.agentThread.statusFailed"};case"stopped":return{variant:"muted",hover:"hover:bg-secondary-hover",icon:n.jsx(Jc,{}),label:"taskBoard.agentThread.statusStopped"};case"done":return{variant:"muted",hover:"hover:bg-secondary-hover",icon:n.jsx(Ha,{}),label:"taskBoard.agentThread.statusDone"};default:{const e=t;throw new Error(`Unhandled run status: ${String(e)}`)}}}function hr(t){const e=E.c(4),{run:s}=t,l=J();let i;if(e[0]!==s.onOpen||e[1]!==s.status||e[2]!==l){const{variant:a,hover:o,icon:r,label:c}=Tf(s.status);i=s.onOpen?n.jsx(Ua,{variant:a,asChild:!0,className:P("cursor-pointer",o),children:n.jsxs("button",{type:"button",onClick:s.onOpen,"aria-label":l("taskBoard.agentThread.openRun"),children:[r,l(c)]})}):n.jsxs(Ua,{variant:a,children:[r,l(c)]}),e[0]=s.onOpen,e[1]=s.status,e[2]=l,e[3]=i}else i=e[3];return i}function xr(t,e){return t.author.id===e.id||t.author.isAgent===!0}function jr(t,e){return t.author.id===e.id}function br(t){const e=E.c(28),{comment:s,onOpen:l,isReply:i,continuation:a,metadata:o,onReply:r,replyLabel:c,onEdit:d,onDelete:u}=t,f=J(),[m,g]=Z.useState(!1),h=i?"xs":"sm";let j;e[0]!==s.author||e[1]!==h?(j=n.jsx(Gi,{author:s.author,size:h}),e[0]=s.author,e[1]=h,e[2]=j):j=e[2];const x=a&&!o,k=m?void 0:l;let b;e[3]!==s.body||e[4]!==m||e[5]!==d?(b=m&&d?n.jsx(_f,{body:s.body,onSave:d,onClose:()=>g(!1)}):void 0,e[3]=s.body,e[4]=m,e[5]=d,e[6]=b):b=e[6];let v;e[7]!==m||e[8]!==u||e[9]!==d||e[10]!==r||e[11]!==c||e[12]!==f?(v=!m&&(r||d||u)&&n.jsxs(n.Fragment,{children:[r&&n.jsxs(ce,{variant:"ghost",size:"sm",title:c,onClick:r,className:"font-normal text-muted-foreground",children:[n.jsx(Zc,{size:16}),f("taskBoard.agentThread.reply")]}),(d||u)&&n.jsx(If,{onEdit:d&&(()=>g(!0)),onDelete:u})]}),e[7]=m,e[8]=u,e[9]=d,e[10]=r,e[11]=c,e[12]=f,e[13]=v):v=e[13];let p;return e[14]!==s.author.name||e[15]!==s.body||e[16]!==s.createdAt||e[17]!==s.id||e[18]!==s.internal||e[19]!==s.onOpenThread||e[20]!==s.threadId||e[21]!==o||e[22]!==j||e[23]!==x||e[24]!==k||e[25]!==b||e[26]!==v?(p=n.jsx(To,{id:s.id,commentId:s.id,author:s.author.name,avatar:j,createdAt:s.createdAt,body:s.body,threadId:s.threadId,continuation:x,metadata:o,muted:s.internal,onOpenThread:s.onOpenThread,onOpen:k,editor:b,actions:v}),e[14]=s.author.name,e[15]=s.body,e[16]=s.createdAt,e[17]=s.id,e[18]=s.internal,e[19]=s.onOpenThread,e[20]=s.threadId,e[21]=o,e[22]=j,e[23]=x,e[24]=k,e[25]=b,e[26]=v,e[27]=p):p=e[27],p}function _f(t){const e=E.c(33),{body:s,onSave:l,onClose:i}=t,a=J(),[o,r]=Z.useState(s),[c,d]=Z.useState(!1);let u;e[0]!==o?(u=o.trim(),e[0]=o,e[1]=u):u=e[1];const f=u;let m;e[2]!==f||e[3]!==i||e[4]!==l?(m=async()=>{d(!0),await l(f)?i():d(!1)},e[2]=f,e[3]=i,e[4]=l,e[5]=m):m=e[5];const g=m;let h;e[6]!==a?(h=a("taskBoard.taskDialog.commentPlaceholder"),e[6]=a,e[7]=h):h=e[7];let j;e[8]!==s||e[9]!==h?(j=n.jsx(io,{inline:!0,defaultValue:s,onChange:r,placeholder:h}),e[8]=s,e[9]=h,e[10]=j):j=e[10];let x;e[11]!==a?(x=a("taskBoard.taskDialog.commentEditCancel"),e[11]=a,e[12]=x):x=e[12];let k;e[13]!==i||e[14]!==c||e[15]!==x?(k=n.jsx(ce,{variant:"ghost",size:"sm",onClick:i,disabled:c,className:"text-muted-foreground",children:x}),e[13]=i,e[14]=c,e[15]=x,e[16]=k):k=e[16];let b;e[17]!==s||e[18]!==f||e[19]!==c?(b=c||!f||f===s.trim(),e[17]=s,e[18]=f,e[19]=c,e[20]=b):b=e[20];let v;e[21]!==a?(v=a("taskBoard.taskDialog.commentEditSave"),e[21]=a,e[22]=v):v=e[22];let p;e[23]!==g||e[24]!==b||e[25]!==v?(p=n.jsx(ce,{size:"sm",onClick:g,disabled:b,children:v}),e[23]=g,e[24]=b,e[25]=v,e[26]=p):p=e[26];let N;e[27]!==k||e[28]!==p?(N=n.jsxs("div",{className:"flex justify-end gap-1",children:[k,p]}),e[27]=k,e[28]=p,e[29]=N):N=e[29];let y;return e[30]!==N||e[31]!==j?(y=n.jsxs("div",{className:"surface flex flex-col gap-1 p-3",children:[j,N]}),e[30]=N,e[31]=j,e[32]=y):y=e[32],y}function If(t){const e=E.c(20),{onEdit:s,onDelete:l}=t,i=J(),a=Z.useRef(!1);let o;e[0]!==i?(o=i("taskBoard.taskDialog.commentActionsAriaLabel"),e[0]=i,e[1]=o):o=e[1];let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(Js,{size:16}),e[2]=r):r=e[2];let c;e[3]!==o?(c=n.jsx(Me,{asChild:!0,children:n.jsx(ce,{variant:"ghost",size:"icon-sm","aria-label":o,className:"shrink-0 text-muted-foreground",children:r})}),e[3]=o,e[4]=c):c=e[4];let d,u,f;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=()=>{a.current=!0},u=()=>{a.current=!0},f=x=>{a.current&&x.preventDefault(),a.current=!1},e[5]=d,e[6]=u,e[7]=f):(d=e[5],u=e[6],f=e[7]);let m;e[8]!==s||e[9]!==i?(m=s&&n.jsxs(Se,{onSelect:s,children:[n.jsx(Pr,{size:16}),i("taskBoard.taskDialog.commentEdit")]}),e[8]=s,e[9]=i,e[10]=m):m=e[10];let g;e[11]!==l||e[12]!==i?(g=l&&n.jsxs(Se,{variant:"destructive",onSelect:l,children:[n.jsx(Si,{size:16}),i("taskBoard.taskDialog.commentDelete")]}),e[11]=l,e[12]=i,e[13]=g):g=e[13];let h;e[14]!==m||e[15]!==g?(h=n.jsxs(Ye,{align:"end",className:"w-48",onPointerDownOutside:d,onPointerUp:u,onCloseAutoFocus:f,children:[m,g]}),e[14]=m,e[15]=g,e[16]=h):h=e[16];let j;return e[17]!==c||e[18]!==h?(j=n.jsxs(Ke,{children:[c,h]}),e[17]=c,e[18]=h,e[19]=j):j=e[19],j}function Gi(t){const e=E.c(9),{author:s,size:l}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={"2xs":16,xs:24,sm:32},e[0]=i):i=e[0];const a=i[l];if(s.isReviewer){let d;return e[1]!==a?(d=n.jsx(cl,{size:a}),e[1]=a,e[2]=d):d=e[2],d}if(s.isAgent){let d;return e[3]!==a?(d=n.jsx(mt,{size:a}),e[3]=a,e[4]=d):d=e[4],d}const o=s.image??void 0,r=s.name??"?";let c;return e[5]!==l||e[6]!==o||e[7]!==r?(c=n.jsx(ft,{url:o,fallback:r,shape:"circle",size:l}),e[5]=l,e[6]=o,e[7]=r,e[8]=c):c=e[8],c}function Af(t){const e=E.c(3),{onSubmit:s,agentRoute:l}=t;let i;return e[0]!==l||e[1]!==s?(i=n.jsx(Io,{onSubmit:s,mentionRoute:l}),e[0]=l,e[1]=s,e[2]=i):i=e[2],i}function zf(t){const e=E.c(19),{replyTo:s,route:l}=t,i=J(),a=l==="busy",o=l?"agent-route-note":void 0,r=a?"text-warning":l?"text-success":"text-foreground";let c;e[0]!==r?(c=P("-mx-3 -mt-3 mb-1 flex items-center gap-2 border-b border-border/60 px-3 py-2 text-xs font-medium",r),e[0]=r,e[1]=c):c=e[1];let d;e[2]!==s?(d=s&&n.jsx(ed,{size:14,className:"shrink-0 text-muted-foreground"}),e[2]=s,e[3]=d):d=e[3];let u;e[4]!==a||e[5]!==s?(u=s?n.jsx(Gi,{author:s,size:"2xs"}):a?n.jsx(rs,{size:14,className:"shrink-0"}):n.jsx(mt,{size:16}),e[4]=a,e[5]=s,e[6]=u):u=e[6];let f;e[7]!==s?.name||e[8]!==l||e[9]!==i?(f=l?i(l==="start"?"taskBoard.agentThread.routeStart":l==="steer"?"taskBoard.agentThread.routeSteer":l==="revive"?"taskBoard.agentThread.routeRevive":"taskBoard.agentThread.routeBusy"):s?.name,e[7]=s?.name,e[8]=l,e[9]=i,e[10]=f):f=e[10];let m;e[11]!==f?(m=n.jsx("span",{className:"min-w-0 truncate",children:f}),e[11]=f,e[12]=m):m=e[12];let g;return e[13]!==o||e[14]!==c||e[15]!==d||e[16]!==u||e[17]!==m?(g=n.jsxs("div",{"data-testid":o,className:c,children:[d,u,m]}),e[13]=o,e[14]=c,e[15]=d,e[16]=u,e[17]=m,e[18]=g):g=e[18],g}function xl(t){return t.dataTransfer.types.includes("Files")}function Io(t){const e=E.c(71),{onSubmit:s,replyTo:l,route:i,mentionRoute:a,placeholder:o,autoFocus:r,onCancel:c}=t,d=J(),u=Z.useRef(null),f=yf(),[m,g]=Z.useState(!1),h=i??(m?a:void 0),[j,x]=Z.useState(!0),[k,b]=Z.useState(!1),v=pu(),[p,N]=Z.useState(!1),y=Z.useRef(0);let B;e[0]===Symbol.for("react.memo_cache_sentinel")?(B=()=>u.current?.submit(),e[0]=B):B=e[0];const C=B;let w;e[1]!==o||e[2]!==d?(w=o??d("taskBoard.taskDialog.commentPlaceholder"),e[1]=o,e[2]=d,e[3]=w):w=e[3];let D;e[4]===Symbol.for("react.memo_cache_sentinel")?(D=me=>g(me.includes(Ie)),e[4]=D):D=e[4];let S;e[5]===Symbol.for("react.memo_cache_sentinel")?(S=P("w-full [&_.tiptap]:outline-none","min-h-10","[&_img]:max-h-40"),e[5]=S):S=e[5];let T;e[6]!==f||e[7]!==r||e[8]!==s||e[9]!==w||e[10]!==v?(T=n.jsx(kf,{ref:u,placeholder:w,onSubmit:s,onEmptyChange:x,onSendingChange:b,onMentionsChange:D,agents:f,autoFocus:r,uploads:v,className:S}),e[6]=f,e[7]=r,e[8]=s,e[9]=w,e[10]=v,e[11]=T):T=e[11];const _=T,A=j||v.pending>0||h==="busy";let I;e[12]!==d?(I=d("taskBoard.taskDialog.commentSubmitAriaLabel"),e[12]=d,e[13]=I):I=e[13];let $;e[14]===Symbol.for("react.memo_cache_sentinel")?($=n.jsx(Eu,{size:16}),e[14]=$):$=e[14];let O;e[15]!==A||e[16]!==I?(O=n.jsx(ce,{variant:"ghost",size:"icon-sm",disabled:A,onClick:C,"aria-label":I,className:"shrink-0 cursor-pointer text-muted-foreground",children:$}),e[15]=A,e[16]=I,e[17]=O):O=e[17];const R=O;let L;e[18]===Symbol.for("react.memo_cache_sentinel")?(L=()=>u.current?.focus(),e[18]=L):L=e[18];const U=L,V=!!h&&h!=="busy",K=V?"opacity-40 dark:opacity-25":"opacity-0";let Q;e[19]!==K?(Q=P("pointer-events-none absolute inset-x-0 top-1/2 -bottom-2 rounded-full bg-gradient-to-r from-brand-purple via-brand to-brand-yellow blur-xl transition-opacity duration-300",K),e[19]=K,e[20]=Q):Q=e[20];let H;e[21]!==Q?(H=n.jsx("div",{"aria-hidden":!0,className:Q}),e[21]=Q,e[22]=H):H=e[22];const ee=V?"opacity-100":"opacity-0";let G;e[23]!==ee?(G=P("pointer-events-none absolute -inset-px rounded-[calc(var(--studio-surface-radius)+1px)] bg-gradient-to-r from-brand-purple via-brand to-brand-yellow transition-opacity duration-300",ee),e[23]=ee,e[24]=G):G=e[24];let se;e[25]!==G?(se=n.jsx("div",{"aria-hidden":!0,className:G}),e[25]=G,e[26]=se):se=e[26];let re;e[27]===Symbol.for("react.memo_cache_sentinel")?(re=me=>{xl(me)&&(me.stopPropagation(),y.current=y.current+1,N(!0))},e[27]=re):re=e[27];let le;e[28]!==k?(le=me=>{xl(me)&&(me.preventDefault(),me.stopPropagation(),k&&(me.dataTransfer.dropEffect="none"))},e[28]=k,e[29]=le):le=e[29];let F,q,oe;e[30]===Symbol.for("react.memo_cache_sentinel")?(F=me=>{xl(me)&&(me.stopPropagation(),y.current=Math.max(0,y.current-1),y.current===0&&N(!1))},q=()=>{y.current=0,N(!1)},oe=me=>{xl(me)&&(me.preventDefault(),me.stopPropagation(),u.current?.attach(Array.from(me.dataTransfer.files)))},e[30]=F,e[31]=q,e[32]=oe):(F=e[30],q=e[31],oe=e[32]);const ne=h==="busy"&&"outline-1 outline-border";let fe;e[33]!==ne?(fe=P("surface relative flex cursor-text flex-col gap-1 transition-shadow","p-3",ne),e[33]=ne,e[34]=fe):fe=e[34];let ve;e[35]!==h||e[36]!==l?(ve=(l||h)&&n.jsx(zf,{replyTo:l,route:h}),e[35]=h,e[36]=l,e[37]=ve):ve=e[37];let De;e[38]===Symbol.for("react.memo_cache_sentinel")?(De=me=>u.current?.attach(me),e[38]=De):De=e[38];let de;e[39]!==k?(de=n.jsx(hu,{onFiles:De,disabled:k}),e[39]=k,e[40]=de):de=e[40];let pe;e[41]!==v.pending?(pe=n.jsx(gu,{pending:v.pending}),e[41]=v.pending,e[42]=pe):pe=e[42];let ye;e[43]!==de||e[44]!==pe?(ye=n.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[de,pe]}),e[43]=de,e[44]=pe,e[45]=ye):ye=e[45];let ke;e[46]!==c||e[47]!==d?(ke=c&&n.jsx(ce,{variant:"ghost",size:"sm",className:"text-muted-foreground",onClick:me=>{me.stopPropagation(),c()},children:d("taskBoard.taskDialog.commentEditCancel")}),e[46]=c,e[47]=d,e[48]=ke):ke=e[48];let ie;e[49]!==R||e[50]!==ke?(ie=n.jsxs("div",{className:"flex items-center gap-1",children:[ke,R]}),e[49]=R,e[50]=ke,e[51]=ie):ie=e[51];let Ce;e[52]!==ye||e[53]!==ie?(Ce=n.jsxs("div",{className:"flex items-center justify-between gap-2",children:[ye,ie]}),e[52]=ye,e[53]=ie,e[54]=Ce):Ce=e[54];let ae;e[55]!==p||e[56]!==k||e[57]!==d?(ae=p&&!k&&n.jsxs("div",{className:"pointer-events-none absolute inset-0 z-10 flex items-center justify-center gap-2 rounded-xl border-2 border-dashed border-primary/40 bg-muted text-sm font-medium text-primary/70",children:[n.jsx(Lu,{size:16}),d("taskBoard.taskDialog.commentDropToAttach")]}),e[55]=p,e[56]=k,e[57]=d,e[58]=ae):ae=e[58];let ge;e[59]!==h||e[60]!==le||e[61]!==fe||e[62]!==ve||e[63]!==Ce||e[64]!==ae||e[65]!==_?(ge=n.jsxs("div",{"data-testid":"new-comment-composer",onClick:U,onDragEnter:re,onDragOver:le,onDragLeave:F,onDropCapture:q,onDrop:oe,"data-agent-route":h,className:fe,children:[ve,_,Ce,ae]}),e[59]=h,e[60]=le,e[61]=fe,e[62]=ve,e[63]=Ce,e[64]=ae,e[65]=_,e[66]=ge):ge=e[66];let xe;return e[67]!==H||e[68]!==se||e[69]!==ge?(xe=n.jsxs("div",{className:"relative",children:[H,se,ge]}),e[67]=H,e[68]=se,e[69]=ge,e[70]=xe):xe=e[70],xe}function $f(t){const e=t.filter(l=>!l.parentId).map(l=>({...l,replies:[]})),s=new Map(e.map(l=>[l.id,l]));for(const l of t)l.parentId&&s.get(l.parentId)?.replies.push(l);return e}function Ao(t){return t.filter(e=>e.audience==="human").map(e=>({...e,replies:e.replies.filter(s=>s.audience==="human")}))}function zo(){const t=E.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=Lr.taskFeedBehindTheScenes(),t[0]=e):e=t[0],Or(e,!1)}function Vi(t){const e=E.c(43),{locator:s}=tt(),l=Qt(),i=an();let a;e[0]!==t||e[1]!==s?(a=St.taskBoardComments(s,t??""),e[0]=t,e[1]=s,e[2]=a):a=e[2];const o=a,r=!!t;let c;e[3]!==t||e[4]!==l?(c=async()=>$f((await l.call("TASK_BOARD_COMMENT_LIST",{taskBoardItemId:t})).comments),e[3]=t,e[4]=l,e[5]=c):c=e[5];let d;e[6]!==o||e[7]!==r||e[8]!==c?(d={queryKey:o,enabled:r,queryFn:c},e[6]=o,e[7]=r,e[8]=c,e[9]=d):d=e[9];const u=Ga(d);let f;e[10]!==i||e[11]!==o?(f=()=>i.invalidateQueries({queryKey:o}),e[10]=i,e[11]=o,e[12]=f):f=e[12];const m=f;let g;e[13]!==t||e[14]!==l?(g=S=>l.call("TASK_BOARD_COMMENT_CREATE",{taskBoardItemId:t,...S}),e[13]=t,e[14]=l,e[15]=g):g=e[15];let h;e[16]!==m||e[17]!==g?(h={mutationFn:g,onSuccess:m},e[16]=m,e[17]=g,e[18]=h):h=e[18];const j=Nt(h);let x;e[19]!==l?(x=S=>l.call("TASK_BOARD_COMMENT_UPDATE",S),e[19]=l,e[20]=x):x=e[20];let k;e[21]!==m||e[22]!==x?(k={mutationFn:x,onSuccess:m},e[21]=m,e[22]=x,e[23]=k):k=e[23];const b=Nt(k);let v;e[24]!==l?(v=S=>l.call("TASK_BOARD_COMMENT_UPDATE",S),e[24]=l,e[25]=v):v=e[25];let p;e[26]!==m||e[27]!==v?(p={mutationFn:v,onSuccess:m},e[26]=m,e[27]=v,e[28]=p):p=e[28];const N=Nt(p);let y;e[29]!==l?(y=S=>l.call("TASK_BOARD_COMMENT_DELETE",{id:S}),e[29]=l,e[30]=y):y=e[30];let B;e[31]!==m||e[32]!==y?(B={mutationFn:y,onSuccess:m},e[31]=m,e[32]=y,e[33]=B):B=e[33];const C=Nt(B);let w;e[34]!==u.data?(w=u.data??[],e[34]=u.data,e[35]=w):w=e[35];let D;return e[36]!==b||e[37]!==j||e[38]!==u.isPending||e[39]!==C||e[40]!==N||e[41]!==w?(D={threads:w,isLoading:u.isPending,post:j,edit:b,setResolved:N,remove:C},e[36]=b,e[37]=j,e[38]=u.isPending,e[39]=C,e[40]=N,e[41]=w,e[42]=D):D=e[42],D}function Rf(t){const e=E.c(24),{locator:s}=tt(),l=Qt(),i=an();let a;e[0]!==t||e[1]!==s?(a=St.notificationSubscribers(s,t??""),e[0]=t,e[1]=s,e[2]=a):a=e[2];const o=a,r=!!t;let c;e[3]!==t||e[4]!==l?(c=async()=>(await l.call("NOTIFICATION_SUBSCRIPTION_LIST",{taskBoardItemId:t})).userIds,e[3]=t,e[4]=l,e[5]=c):c=e[5];let d;e[6]!==o||e[7]!==r||e[8]!==c?(d={queryKey:o,enabled:r,queryFn:c},e[6]=o,e[7]=r,e[8]=c,e[9]=d):d=e[9];const u=Ga(d);let f;e[10]!==t||e[11]!==l?(f=k=>l.call("NOTIFICATION_SUBSCRIPTION_SET",{taskBoardItemId:t,subscribed:k}),e[10]=t,e[11]=l,e[12]=f):f=e[12];let m;e[13]!==i||e[14]!==o?(m=()=>i.invalidateQueries({queryKey:o}),e[13]=i,e[14]=o,e[15]=m):m=e[15];let g;e[16]!==f||e[17]!==m?(g={mutationFn:f,onSuccess:m},e[16]=f,e[17]=m,e[18]=g):g=e[18];const h=Nt(g);let j;e[19]!==u.data?(j=u.data??[],e[19]=u.data,e[20]=j):j=e[20];let x;return e[21]!==h||e[22]!==j?(x={subscriberIds:j,setSubscribed:h},e[21]=h,e[22]=j,e[23]=x):x=e[23],x}const Ef=3;function Of(t){const e=E.c(30),{itemId:s,members:l}=t,i=J(),{data:a}=vi.useSession(),o=a?.user?.id,{subscriberIds:r,setSubscribed:c}=Rf(s);let d;e[0]!==o||e[1]!==r?(d=!!o&&r.includes(o),e[0]=o,e[1]=r,e[2]=d):d=e[2];const u=d;let f;if(e[3]!==l||e[4]!==o||e[5]!==u||e[6]!==r){const y=new Map(l.map(Pf)),B=o?y.get(o):void 0;let C;e[8]!==o?(C=D=>D!==o,e[8]=o,e[9]=C):C=e[9];const w=r.filter(C).map(D=>y.get(D)).filter(Ff);f=[...u&&B?[B]:[],...w],e[3]=l,e[4]=o,e[5]=u,e[6]=r,e[7]=f}else f=e[7];const m=f;let g;e[10]!==m?(g=m.slice(0,Ef),e[10]=m,e[11]=g):g=e[11];const h=g,j=m.length-h.length,x=!s||c.isPending;let k;e[12]!==c||e[13]!==u?(k=()=>c.mutate(!u),e[12]=c,e[13]=u,e[14]=k):k=e[14];let b;e[15]!==u||e[16]!==i?(b=i(u?"taskBoard.taskDialog.unsubscribe":"taskBoard.taskDialog.subscribe"),e[15]=u,e[16]=i,e[17]=b):b=e[17];let v;e[18]!==x||e[19]!==k||e[20]!==b?(v=n.jsx(ce,{type:"button",variant:"ghost",size:"sm",disabled:x,onClick:k,className:"px-2 font-normal text-muted-foreground",children:b}),e[18]=x,e[19]=k,e[20]=b,e[21]=v):v=e[21];let p;e[22]!==j||e[23]!==h||e[24]!==m||e[25]!==i?(p=h.length>0&&n.jsxs("span",{className:"inline-flex items-center",title:m.map(y=>y.user?.name??i("taskBoard.taskDialog.someoneLabel")).join(", "),children:[h.map(Lf),j>0&&n.jsxs("span",{className:"-ml-2 inline-flex size-6 items-center justify-center rounded-full bg-muted text-2xs font-medium text-muted-foreground ring-2 ring-background",children:["+",j]})]}),e[22]=j,e[23]=h,e[24]=m,e[25]=i,e[26]=p):p=e[26];let N;return e[27]!==v||e[28]!==p?(N=n.jsxs("div",{className:"flex items-center gap-2",children:[v,p]}),e[27]=v,e[28]=p,e[29]=N):N=e[29],N}function Lf(t){return n.jsx(ft,{url:t.user?.image??void 0,fallback:t.user?.name??"?",shape:"circle",size:"xs",className:"-ml-2 ring-2 ring-background first:ml-0"},t.userId)}function Ff(t){return!!t}function Pf(t){return[t.userId,t]}function Mf({item:t,hidden:e,children:s}){const l=J(),i=Gu({initial:!1,resize:"instant"}),a=Vi(t?.id),[o]=zo(),r=o?a.threads:Ao(a.threads),[c,d]=Z.useState(null),u=g=>g.flatMap(h=>[h.id,...h.replies.map(j=>j.id)]),f=u(a.threads);!a.isLoading&&(c===null||i.isAtBottom)&&f.join()!==c?.join()&&d(f);const m=c?u(r).filter(g=>!c.includes(g)).length:0;return t?n.jsxs("div",{className:P("relative min-h-0 min-w-0 flex-1 flex-col",e?"hidden lg:flex":"flex"),children:[n.jsx("div",{"data-testid":"task-conversation-scroll",ref:i.scrollRef,className:"min-h-0 flex-1 overflow-y-auto",children:n.jsx("div",{ref:i.contentRef,children:s})}),t&&n.jsxs("div",{className:"relative shrink-0 border-t border-border bg-background px-5 pb-4 pt-3 sm:px-8",children:[!i.isAtBottom&&n.jsx("div",{className:"absolute inset-x-0 bottom-full flex justify-center pb-3 pointer-events-none",children:n.jsx(ce,{variant:"secondary",size:"sm",className:"pointer-events-auto shadow-soft",onClick:()=>{i.scrollToBottom()},children:m?l("taskBoard.conversation.newReplies",{count:m}):l("taskBoard.conversation.jumpToLatest")})}),n.jsx(Af,{agentRoute:t.threads.some(g=>Di(g)&&(g.status==="in_progress"||g.status==="requires_action"))?"steer":"start",onSubmit:async g=>{try{return await a.post.mutateAsync({body:g}),i.scrollToBottom(),!0}catch(h){return He.error(h instanceof Error?h.message:l("taskBoard.conversation.sendFailed")),!1}}})]})]}):n.jsx("div",{className:"min-w-0 sm:flex-1",children:s})}function Hi(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),23,59,59).toISOString()}function $o(t){if(!t)return null;const e=new Date(t);return Number.isNaN(e.getTime())?null:e}const kr=560,Kf=2e3,Ro=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"}),Wt="inline-flex h-9 items-center justify-start gap-2 rounded-lg border border-border px-3 text-sm font-medium text-foreground transition-colors hover:bg-accent sm:border-transparent",yr=4,vr=1,Pa="opacity-50";function Nr(t){const e=E.c(12),{icon:s,label:l,hint:i,selected:a,onSelect:o}=t;let r;e[0]!==l?(r=n.jsx("span",{className:"min-w-0 flex-1 truncate",children:l}),e[0]=l,e[1]=r):r=e[1];let c;e[2]!==i?(c=i&&n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:i}),e[2]=i,e[3]=c):c=e[3];let d;e[4]!==a?(d=a&&n.jsx(Us,{size:14,className:"shrink-0"}),e[4]=a,e[5]=d):d=e[5];let u;return e[6]!==s||e[7]!==o||e[8]!==r||e[9]!==c||e[10]!==d?(u=n.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm text-foreground hover:bg-accent",onClick:o,children:[s,r,c,d]}),e[6]=s,e[7]=o,e[8]=r,e[9]=c,e[10]=d,e[11]=u):u=e[11],u}function Uf(t){const e=E.c(22),{threads:s}=t,l=J();let i,a,o,r,c,d;if(e[0]!==l||e[1]!==s){d=Symbol.for("react.early_return_sentinel");e:{const m=yo(s);if(!m){d=null;break e}const{total:g,runCount:h,onSubscription:j}=m,x=h===1,k=j?x?"taskBoard.taskDialog.costTooltipSubscriptionSingular":"taskBoard.taskDialog.costTooltipSubscriptionPlural":x?"taskBoard.taskDialog.costTooltipSingular":"taskBoard.taskDialog.costTooltipPlural";e[8]===Symbol.for("react.memo_cache_sentinel")?(o=P(Wt,"cursor-default hover:bg-transparent"),e[8]=o):o=e[8];const b=String(h);e[9]!==l||e[10]!==b||e[11]!==k?(r=l(k,{runs:b}),e[9]=l,e[10]=b,e[11]=k,e[12]=r):r=e[12],e[13]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(pd,{size:16,className:"shrink-0 text-muted-foreground"}),e[13]=c):c=e[13],i="tabular-nums",a=l("taskBoard.taskDialog.costEstimatePrefix",{amount:g.toLocaleString(void 0,{style:"currency",currency:"USD"})})}e[0]=l,e[1]=s,e[2]=i,e[3]=a,e[4]=o,e[5]=r,e[6]=c,e[7]=d}else i=e[2],a=e[3],o=e[4],r=e[5],c=e[6],d=e[7];if(d!==Symbol.for("react.early_return_sentinel"))return d;let u;e[14]!==i||e[15]!==a?(u=n.jsx("span",{className:i,children:a}),e[14]=i,e[15]=a,e[16]=u):u=e[16];let f;return e[17]!==o||e[18]!==r||e[19]!==c||e[20]!==u?(f=n.jsxs("div",{className:o,title:r,children:[c,u]}),e[17]=o,e[18]=r,e[19]=c,e[20]=u,e[21]=f):f=e[21],f}function tl(t){const e=E.c(7),{label:s,children:l}=t;let i;e[0]!==s?(i=n.jsx("span",{className:"px-3 text-sm font-medium text-muted-foreground opacity-[0.74]",children:s}),e[0]=s,e[1]=i):i=e[1];let a;e[2]!==l?(a=n.jsx("div",{className:"flex flex-wrap gap-2 sm:flex-col sm:items-start sm:gap-1",children:l}),e[2]=l,e[3]=a):a=e[3];let o;return e[4]!==i||e[5]!==a?(o=n.jsxs("div",{className:"flex flex-col gap-2",children:[i,a]}),e[4]=i,e[5]=a,e[6]=o):o=e[6],o}function qf(t){const e=E.c(7),{item:s}=t,l=J(),{data:i}=Ri(s.id);if(!i||i.length===0)return null;let a;e[0]!==l?(a=l("taskBoard.taskDialog.reviewsLabel"),e[0]=l,e[1]=a):a=e[1];let o;e[2]!==i?(o=i.map(Gf),e[2]=i,e[3]=o):o=e[3];let r;return e[4]!==a||e[5]!==o?(r=n.jsx(tl,{label:a,children:o}),e[4]=a,e[5]=o,e[6]=r):r=e[6],r}function Gf(t){return n.jsx(ce,{asChild:!0,variant:"ghost",className:"h-9 w-full justify-start gap-2 px-3 font-medium",children:n.jsxs("a",{href:t.url,target:"_blank",rel:"noreferrer",title:t.title?`#${t.number} ${t.title}`:t.url,children:[n.jsx(el,{size:16,className:"shrink-0"}),n.jsx("span",{className:"min-w-0 flex-1 truncate text-left",children:t.title??`#${t.number}`})]})},t.url)}function Vf(t){const e=E.c(11),{label:s,action:l,children:i}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx($l,{size:14,className:"shrink-0 transition-transform group-data-[state=closed]:-rotate-90"}),e[0]=a):a=e[0];let o;e[1]!==s?(o=n.jsxs(eu,{className:"group flex w-fit items-center gap-2 text-sm text-muted-foreground transition-colors hover:text-foreground",children:[s,a]}),e[1]=s,e[2]=o):o=e[2];let r;e[3]!==l||e[4]!==o?(r=n.jsxs("div",{className:"flex min-h-7 items-center justify-between gap-2",children:[o,l]}),e[3]=l,e[4]=o,e[5]=r):r=e[5];let c;e[6]!==i?(c=n.jsx(tu,{className:"-mx-2 -mb-2",children:n.jsx("div",{className:"px-2 pb-2",children:i})}),e[6]=i,e[7]=c):c=e[7];let d;return e[8]!==r||e[9]!==c?(d=n.jsxs(su,{defaultOpen:!0,className:"flex flex-col gap-2",children:[r,c]}),e[8]=r,e[9]=c,e[10]=d):d=e[10],d}function Eo(t){const e=E.c(452),{chrome:s,open:l,onClose:i,item:a,defaultStatus:o,defaultProject:r,defaultSprintId:c,onSetSprint:d,onSubmit:u,onDelete:f,onClone:m,onArchive:g,onOpenPreview:h,onNewChat:j,onAutoFix:x,onRerun:k,isSaving:b}=t,v=l===void 0?!0:l,p=J(),{org:N}=tt();let y;e[0]===Symbol.for("react.memo_cache_sentinel")?(y={strict:!1},e[0]=y):y=e[0];const{agentId:B}=ol(y),{data:C}=yi();let w;e[1]!==C?.data?.members?(w=C?.data?.members??[],e[1]=C?.data?.members,e[2]=w):w=e[2];const D=w,{handleCopy:S,copied:T}=ai(),{handleCopy:_,copied:A}=ai(),{handleCopy:I,copied:$}=ai(),{data:O}=Rl();let R;e[3]!==O?(R=O===void 0?[]:O,e[3]=O,e[4]=R):R=e[4];const L=R,U=to(),V=so();let K;e[5]===Symbol.for("react.memo_cache_sentinel")?(K={slug:"mcp-github"},e[5]=K):K=e[5];const Q=co(K);let H;e[6]!==Q?(H=Tu(Q),e[6]=Q,e[7]=H):H=e[7];const G=So(rf,H),se=fo(G),re=a?.title??"",le=a?.description??"",F=a?.status??o??qs[0],q=a?.priority??"medium",oe=a?.type??Bl,ne=a?.assigneeId??null,fe=a?a.repo:r?.repo??null,ve=a?a.virtualMcpId:r?.virtualMcpId??null,De=a?.dueDate;let de;e[8]!==De?(de=$o(De),e[8]=De,e[9]=de):de=e[9];let pe;e[10]!==a?.tags?(pe=a?.tags.map(tm)??[],e[10]=a?.tags,e[11]=pe):pe=e[11];const ye=c??null;let ke;e[12]!==le||e[13]!==F||e[14]!==q||e[15]!==oe||e[16]!==ne||e[17]!==fe||e[18]!==ve||e[19]!==de||e[20]!==pe||e[21]!==ye||e[22]!==re?(ke={title:re,description:le,status:F,priority:q,type:oe,assigneeId:ne,repo:fe,virtualMcpId:ve,dueDate:de,tagIds:pe,sprintId:ye},e[12]=le,e[13]=F,e[14]=q,e[15]=oe,e[16]=ne,e[17]=fe,e[18]=ve,e[19]=de,e[20]=pe,e[21]=ye,e[22]=re,e[23]=ke):ke=e[23];const[ie,Ce]=Z.useState(ke),{title:ae,description:ge,status:xe,priority:me,assigneeId:Ae,repo:X,virtualMcpId:be,dueDate:Oe}=ie;let Ze;e[24]!==G||e[25]!==X||e[26]!==be?(Ze=(be?sn(be,G):void 0)??(X?sn(X,G):void 0),e[24]=G,e[25]=X,e[26]=be,e[27]=Ze):Ze=e[27];const ze=Ze,Y=ie.type,te=ie.tagIds,[ue,we]=Z.useState(!1),[he,Fe]=Z.useState(!a),[We,Ue]=Z.useState(!1),[Pe,at]=Z.useState(!1),Ne=Pe&&!ue;let Qe;e[28]===Symbol.for("react.memo_cache_sentinel")?(Qe=M=>{if(!M)return;const $e=()=>at(M.scrollHeight>kr);$e();const Ve=new ResizeObserver($e);return Ve.observe(M),()=>Ve.disconnect()},e[28]=Qe):Qe=e[28];const kt=Qe,[dt,pt]=Z.useState(!1),[Te,Xe]=Z.useState(!1),st=Ol(),qe=a?a.sprintId:ie.sprintId;let At;e[29]!==qe?(At=M=>M.id===qe,e[29]=qe,e[30]=At):At=e[30];const Bt=st.find(At),Ge=st.filter(em),yt=M=>{Xe(!1),a?d?.(M):je({sprintId:M})},[Xt,xt]=Z.useState(!1),[ds,lt]=Z.useState(!1),[zt,Je]=Z.useState(null);let jt;e[31]!==a?.threads||e[32]!==zt?(jt=a?.threads.find(M=>M.threadId===zt)??null,e[31]=a?.threads,e[32]=zt,e[33]=jt):jt=e[33];const _e=jt,Pt=Z.useRef(ie),it=Z.useRef(null),Ee=Z.useRef(u);let Le;e[34]!==a?(Le=()=>{it.current=null;const M=Pt.current;M.title.trim()&&Ee.current({title:M.title.trim(),description:M.description.trim()||null,status:M.status,priority:M.priority,type:M.type,assigneeId:M.assigneeId,repo:M.repo,virtualMcpId:M.virtualMcpId,dueDate:M.dueDate?Hi(M.dueDate):null,tagIds:M.tagIds,...a?{}:{sprintId:M.sprintId}})},e[34]=a,e[35]=Le):Le=e[35];const rt=Le,je=(M,$e)=>{const Ve=$e===void 0?!1:$e,Lt={...Pt.current,...M};Pt.current=Lt,Ee.current=u,Ce(Lt),a&&(it.current&&clearTimeout(it.current),Ve?it.current=setTimeout(rt,Kf):rt())};let gt;e[36]!==rt?(gt=()=>{it.current&&(clearTimeout(it.current),rt())},e[36]=rt,e[37]=gt):gt=e[37];const Be=gt;let vt;e[38]===Symbol.for("react.memo_cache_sentinel")?(vt=()=>{it.current&&(clearTimeout(it.current),it.current=null)},e[38]=vt):vt=e[38];const $t=vt;let Ct;e[39]!==Be||e[40]!==i?(Ct=()=>{Be(),i()},e[39]=Be,e[40]=i,e[41]=Ct):Ct=e[41];const ut=Ct;let us;e[42]!==Be?(us=M=>{if(M)return()=>Be()},e[42]=Be,e[43]=us):us=e[43];const Xa=us;let fs;e[44]!==ut?(fs=M=>{if(!M)return;const $e=Ve=>{if(Ve.key!=="Escape"||Ve.defaultPrevented||document.querySelector('[data-radix-popper-content-wrapper], [role="dialog"][data-state="open"]'))return;const Lt=Ve.target;if(Lt instanceof HTMLElement&&(Lt.isContentEditable||Lt instanceof HTMLInputElement||Lt instanceof HTMLTextAreaElement)){Lt.blur();return}ut()};return document.addEventListener("keydown",$e),()=>document.removeEventListener("keydown",$e)},e[44]=ut,e[45]=fs):fs=e[45];const Za=fs;let ms;e[46]!==U||e[47]!==je?(ms=async(M,$e)=>{const Ve=await U.mutateAsync({name:M,color:$e});je({tagIds:[...Pt.current.tagIds,Ve.id]})},e[46]=U,e[47]=je,e[48]=ms):ms=e[48];const Zt=ms;let ps;e[49]!==V||e[50]!==je?(ps=M=>{V.mutate(M),je({tagIds:Pt.current.tagIds.filter($e=>$e!==M)})},e[49]=V,e[50]=je,e[51]=ps):ps=e[51];const Rt=ps,wt=Ae===Ie,gs=a&&x&&(xe==="triage"||xe==="todo")&&!wt,hs=a&&k&&a.assigneeId===Ie;let xs;e[52]!==a||e[53]!==N?(xs=a?ln(N.slug,a.keySeq):null,e[52]=a,e[53]=N,e[54]=xs):xs=e[54];const Et=xs;let cn;if(e[55]!==Ae||e[56]!==D){let M;e[58]!==Ae?(M=$e=>$e.userId===Ae,e[58]=Ae,e[59]=M):M=e[59],cn=D.find(M),e[55]=Ae,e[56]=D,e[57]=cn}else cn=e[57];const Is=cn;let js;e[60]!==a||e[61]!==D?(js=a?.assignedBy?D.find(M=>M.userId===a.assignedBy):void 0,e[60]=a,e[61]=D,e[62]=js):js=e[62];const nt=js;let bs;e[63]!==a||e[64]!==D?(bs=a?D.find(M=>M.userId===a.createdBy):void 0,e[63]=a,e[64]=D,e[65]=bs):bs=e[65];const ot=bs;let As;e[66]!==a?.tags||e[67]!==p?(As=a?.tags.some(Jf)?p("taskBoard.taskDialog.createdByProblemReportLabel"):a?.tags.some(Zf)?p("taskBoard.taskDialog.createdByFeedbackLabel"):p("taskBoard.taskDialog.createdBySystemLabel"),e[66]=a?.tags,e[67]=p,e[68]=As):As=e[68];const Dt=As;let Mt;e[69]!==xe?(Mt=Sl(xe),e[69]=xe,e[70]=Mt):Mt=e[70];const Jt=Mt.icon;let Kt;e[71]!==We||e[72]!==a||e[73]!==p?(Kt=a&&n.jsx(ce,{variant:"ghost",size:"sm",className:"lg:hidden",onClick:()=>Ue(Xf),"aria-expanded":We,children:p("taskBoard.conversation.details")}),e[71]=We,e[72]=a,e[73]=p,e[74]=Kt):Kt=e[74];let Ut;e[75]!==b||e[76]!==a||e[77]!==p?(Ut=a&&b&&n.jsx("span",{className:"mr-1 text-sm text-muted-foreground",children:p("taskBoard.taskDialog.savingLabel")}),e[75]=b,e[76]=a,e[77]=p,e[78]=Ut):Ut=e[78];let qt;e[79]!==a||e[80]!==p?(qt=a?.externalUrl&&n.jsx(Ft,{asChild:!0,variant:"outline",label:p("taskBoard.taskDialog.openInTrackerAriaLabel"),children:n.jsx("a",{href:a.externalUrl,target:"_blank",rel:"noreferrer",children:n.jsx(Ka,{size:16})})}),e[79]=a,e[80]=p,e[81]=qt):qt=e[81];let Gt;e[82]!==B||e[83]!==T||e[84]!==_||e[85]!==ge||e[86]!==S||e[87]!==a||e[88]!==A||e[89]!==g||e[90]!==x||e[91]!==m||e[92]!==f||e[93]!==j||e[94]!==k||e[95]!==N||e[96]!==gs||e[97]!==hs||e[98]!==xe||e[99]!==p?(Gt=a&&n.jsxs(n.Fragment,{children:[n.jsx(Ft,{variant:"outline",label:p("taskBoard.taskDialog.shareAriaLabel"),onClick:()=>{_(`${window.location.origin}${ao(N.slug,a,B)}`),He.success(p("taskBoard.taskDialog.linkCopied"))},children:A?n.jsx(Us,{size:16}):n.jsx(td,{size:16})}),n.jsxs(Ke,{modal:!1,children:[n.jsx(Me,{asChild:!0,children:n.jsx(ce,{variant:"outline",size:"icon-sm","aria-label":p("taskBoard.taskDialog.moreActionsAriaLabel"),children:n.jsx(Js,{size:16})})}),n.jsxs(Ye,{align:"end",className:"w-48",children:[j&&n.jsxs(Se,{onSelect:j,children:[n.jsx(Mr,{size:16}),p("taskBoard.taskDialog.newChatButton")]}),gs&&n.jsxs(Se,{onSelect:x,children:[n.jsx(_t,{size:16}),p("taskBoard.taskBoard.autoFix")]}),hs&&n.jsxs(Se,{onSelect:k,children:[n.jsx(_l,{size:16}),p("taskBoard.taskBoard.rerun")]}),(j||gs||hs)&&n.jsx(ki,{}),ge&&n.jsxs(Se,{onSelect:()=>S(ge),children:[T?n.jsx(Us,{size:16}):n.jsx(sd,{size:16}),p("taskBoard.taskDialog.copyDescription")]}),m&&n.jsxs(Se,{onSelect:m,children:[n.jsx(nd,{size:16}),p("taskBoard.taskDialog.cloneTask")]}),g&&xe!=="archived"&&n.jsxs(Se,{onSelect:()=>{$t(),g()},children:[n.jsx(Tc,{size:16}),p("taskBoard.taskDialog.archiveTask")]}),f&&n.jsxs(Se,{variant:"destructive",onSelect:()=>{$t(),f()},children:[n.jsx(Si,{size:16}),p("taskBoard.taskDialog.deleteTask")]})]})]})]}),e[82]=B,e[83]=T,e[84]=_,e[85]=ge,e[86]=S,e[87]=a,e[88]=A,e[89]=g,e[90]=x,e[91]=m,e[92]=f,e[93]=j,e[94]=k,e[95]=N,e[96]=gs,e[97]=hs,e[98]=xe,e[99]=p,e[100]=Gt):Gt=e[100];let Vt;e[101]!==s||e[102]!==ut||e[103]!==p?(Vt=s==="dialog"&&n.jsx(Ft,{variant:"secondary",label:p("taskBoard.taskDialog.closeAriaLabel"),onClick:ut,children:n.jsx(ll,{size:16})}),e[101]=s,e[102]=ut,e[103]=p,e[104]=Vt):Vt=e[104];let dn;e[105]!==Kt||e[106]!==Ut||e[107]!==qt||e[108]!==Gt||e[109]!==Vt?(dn=n.jsxs("div",{className:"flex items-center gap-2",children:[Kt,Ut,qt,Gt,Vt]}),e[105]=Kt,e[106]=Ut,e[107]=qt,e[108]=Gt,e[109]=Vt,e[110]=dn):dn=e[110];const Hs=dn,ks=K1(a);let ys;e[111]!==Hs||e[112]!==s||e[113]!==ut||e[114]!==I||e[115]!==ks||e[116]!==$||e[117]!==Et||e[118]!==p?(ys=s==="page"?n.jsxs(n.Fragment,{children:[n.jsx(Ss.Breadcrumbs,{after:"page",parent:{label:p("taskBoard.taskDetail.breadcrumbTasks"),onSelect:ut},items:[...ks?[ks]:[],{key:"task",label:Et??p("taskBoard.taskDetail.breadcrumbTask")}]}),n.jsx(Ss.Actions,{children:Hs})]}):n.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-2 px-6 pb-4 pt-6 sm:px-8",children:[Et?n.jsxs(ce,{variant:"ghost",size:"sm",title:Et,"aria-label":p("taskBoard.taskDialog.copyIdAriaLabel"),className:"-ml-2 gap-2 px-2 text-base text-muted-foreground hover:text-foreground",onClick:()=>{I(Et),He.success(p("taskBoard.taskDialog.idCopied"))},children:[$?n.jsx(Us,{size:16}):n.jsx(lr,{size:16}),Et]}):n.jsxs("span",{"aria-hidden":!0,className:"flex h-7 items-center gap-2 text-base text-muted-foreground opacity-50",children:[n.jsx(lr,{size:16}),"โ€“"]}),Hs]}),e[111]=Hs,e[112]=s,e[113]=ut,e[114]=I,e[115]=ks,e[116]=$,e[117]=Et,e[118]=p,e[119]=ys):ys=e[119];const un=ys;let es;e[120]!==s||e[121]!==un?(es=s==="page"?n.jsx("div",{className:P("mx-auto w-full","max-w-[1280px]"),children:un}):un,e[120]=s,e[121]=un,e[122]=es):es=e[122];const Ys=a?"overflow-hidden":"overflow-y-auto";let Tt;e[123]!==Ys?(Tt=P("flex min-h-0 flex-1 flex-col",Ys),e[123]=Ys,e[124]=Tt):Tt=e[124];const zs=s==="page"&&"mx-auto w-full",$s=s==="page"&&"max-w-[1280px]";let Ht;e[125]!==zs||e[126]!==$s?(Ht=P("flex flex-col","min-h-0 flex-1 lg:flex-row",zs,$s),e[125]=zs,e[126]=$s,e[127]=Ht):Ht=e[127];const Rs=!!a&&We;let Yt;e[128]!==ot?.user?.image||e[129]!==ot?.user?.name||e[130]!==he||e[131]!==Be||e[132]!==a||e[133]!==Dt||e[134]!==p?(Yt=a&&n.jsxs("div",{className:"mb-3 flex items-center gap-2 text-sm text-muted-foreground",children:[n.jsx(ft,{url:ot?.user?.image??void 0,fallback:ot?.user?.name??"?",shape:"circle",size:"xs"}),n.jsx("span",{className:"font-medium text-foreground",children:rr(a)?Dt:ot?.user?.name??p("taskBoard.taskDialog.unknownCreatorLabel")}),n.jsx("time",{dateTime:a.createdAt,children:Tl(new Date(a.createdAt))}),n.jsx(ce,{variant:"ghost",size:"sm",className:"ml-auto",onClick:()=>{Be(),Fe(Qf)},children:p(he?"taskBoard.conversation.doneEditing":"taskBoard.conversation.edit")})]}),e[128]=ot?.user?.image,e[129]=ot?.user?.name,e[130]=he,e[131]=Be,e[132]=a,e[133]=Dt,e[134]=p,e[135]=Yt):Yt=e[135];let Es;e[136]!==he||e[137]!==Be||e[138]!==a||e[139]!==je||e[140]!==p||e[141]!==ae?(Es=a&&!he?n.jsx("h1",{className:"text-2xl font-semibold leading-snug text-foreground",children:ae}):n.jsx("textarea",{ref:Wf,value:ae,onChange:M=>{je({title:M.target.value},!0),M.target.style.height="auto",M.target.style.height=`${M.target.scrollHeight}px`},onKeyDown:Yf,onBlur:Be,placeholder:p("taskBoard.taskDialog.taskTitlePlaceholder"),autoFocus:!a,rows:1,className:P("w-full resize-none overflow-hidden border-0 bg-transparent text-2xl font-semibold leading-snug text-foreground outline-none placeholder:text-foreground/30")}),e[136]=he,e[137]=Be,e[138]=a,e[139]=je,e[140]=p,e[141]=ae,e[142]=Es):Es=e[142];let z;e[143]!==a||e[144]!==L||e[145]!==te?(z=a&&te.length>0&&n.jsx("div",{className:"mt-3 flex flex-wrap items-center gap-2 text-xs text-muted-foreground",children:te.map(M=>{const $e=L.find(Ve=>Ve.id===M);return $e?n.jsx("span",{className:"rounded-md border border-border px-2 py-1",children:$e.name},M):null})}),e[143]=a,e[144]=L,e[145]=te,e[146]=z):z=e[146];let W;e[147]!==Es||e[148]!==z?(W=n.jsxs("div",{children:[Es,z]}),e[147]=Es,e[148]=z,e[149]=W):W=e[149];let Re;e[150]!==a||e[151]!==k||e[152]!==N?(Re=a&&n.jsx(Rm,{item:a,orgSlug:N.slug,onRerun:k}),e[150]=a,e[151]=k,e[152]=N,e[153]=Re):Re=e[153];const ct=Ne&&"overflow-hidden";let Ot;e[154]!==ct?(Ot=P("relative",ct),e[154]=ct,e[155]=Ot):Ot=e[155];let ts;e[156]!==Ne?(ts=Ne?{maxHeight:kr}:void 0,e[156]=Ne,e[157]=ts):ts=e[157];let vs;e[158]===Symbol.for("react.memo_cache_sentinel")?(vs=()=>we(!0),e[158]=vs):vs=e[158];let Os;e[159]!==ge||e[160]!==he||e[161]!==a||e[162]!==je||e[163]!==p?(Os=n.jsx("div",{ref:kt,"data-testid":"task-description",children:a&&!he?n.jsx($i,{id:`task-post-${a.id}`,text:ge}):n.jsx(io,{defaultValue:ge,onChange:M=>je({description:M},!0),placeholder:p("taskBoard.taskDialog.descriptionPlaceholder")})}),e[159]=ge,e[160]=he,e[161]=a,e[162]=je,e[163]=p,e[164]=Os):Os=e[164];let fn;e[165]!==Ne?(fn=Ne&&n.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-x-0 bottom-0 h-16 bg-gradient-to-t from-background to-transparent"}),e[165]=Ne,e[166]=fn):fn=e[166];let mn;e[167]!==Be||e[168]!==Ot||e[169]!==ts||e[170]!==Os||e[171]!==fn?(mn=n.jsxs("div",{className:Ot,style:ts,onFocusCapture:vs,onBlurCapture:Be,children:[Os,fn]}),e[167]=Be,e[168]=Ot,e[169]=ts,e[170]=Os,e[171]=fn,e[172]=mn):mn=e[172];let pn;e[173]!==ue||e[174]!==Pe||e[175]!==p?(pn=Pe&&n.jsxs(ce,{type:"button",variant:"ghost",size:"sm",className:"mt-2 w-fit text-muted-foreground hover:text-foreground",onClick:()=>we(Hf),children:[n.jsx($l,{size:14,className:P("transition-transform",ue&&"rotate-180")}),p(ue?"taskBoard.taskDialog.showLess":"taskBoard.taskDialog.showMore")]}),e[173]=ue,e[174]=Pe,e[175]=p,e[176]=pn):pn=e[176];let gn;e[177]!==mn||e[178]!==pn?(gn=n.jsxs("div",{className:"flex flex-col py-6",children:[mn,pn]}),e[177]=mn,e[178]=pn,e[179]=gn):gn=e[179];let hn;e[180]!==a?(hn=a&&n.jsx(M1,{item:a}),e[180]=a,e[181]=hn):hn=e[181];let xn;e[182]!==a?(xn=a&&n.jsx(F1,{item:a}),e[182]=a,e[183]=xn):xn=e[183];let jn;e[184]!==a?(jn=a&&n.jsx("div",{className:"py-4",children:n.jsx("hr",{className:"border-border"})}),e[184]=a,e[185]=jn):jn=e[185];let bn;e[186]!==a||e[187]!==D||e[188]!==Je?(bn=a&&n.jsx("div",{className:"flex flex-col gap-8",children:n.jsx(km,{item:a,members:D,onOpenThread:M=>Je(M.threadId)})}),e[186]=a,e[187]=D,e[188]=Je,e[189]=bn):bn=e[189];let kn;e[190]!==gn||e[191]!==hn||e[192]!==xn||e[193]!==jn||e[194]!==bn?(kn=n.jsxs("div",{className:"flex flex-col",children:[gn,hn,xn,jn,bn]}),e[190]=gn,e[191]=hn,e[192]=xn,e[193]=jn,e[194]=bn,e[195]=kn):kn=e[195];let yn;e[196]!==Yt||e[197]!==W||e[198]!==Re||e[199]!==kn?(yn=n.jsxs("div",{className:"flex min-w-0 flex-col gap-2 px-5 py-6 sm:px-8",children:[Yt,W,Re,kn]}),e[196]=Yt,e[197]=W,e[198]=Re,e[199]=kn,e[200]=yn):yn=e[200];let vn;e[201]!==a||e[202]!==Rs||e[203]!==yn?(vn=n.jsx(Mf,{item:a,hidden:Rs,children:yn}),e[201]=a,e[202]=Rs,e[203]=yn,e[204]=vn):vn=e[204];const fc="task-inspector",Fl=a?We?"flex":"hidden":"flex";let Nn;e[205]!==Fl?(Nn=P("w-full flex-col gap-6 border-t border-border p-6","min-h-0 flex-1 overflow-y-auto lg:flex lg:w-[320px] lg:flex-none lg:border-l lg:border-t-0",Fl),e[205]=Fl,e[206]=Nn):Nn=e[206];let Sn;e[207]!==a?(Sn=a&&n.jsx(qf,{item:a}),e[207]=a,e[208]=Sn):Sn=e[208];const Pl=tl;let Bn;e[209]!==p?(Bn=p("taskBoard.taskDialog.propertiesLabel"),e[209]=p,e[210]=Bn):Bn=e[210];let Cn;e[211]!==a||e[212]!==xe?(Cn=P(a?Qr({...a,status:xe}):Sl(xe).iconClassName),e[211]=a,e[212]=xe,e[213]=Cn):Cn=e[213];let wn;e[214]!==Jt||e[215]!==Cn?(wn=n.jsx(Jt,{size:16,className:Cn}),e[214]=Jt,e[215]=Cn,e[216]=wn):wn=e[216];let Dn;e[217]!==xe||e[218]!==p?(Dn=ht(xe,p),e[217]=xe,e[218]=p,e[219]=Dn):Dn=e[219];let Tn;e[220]!==wn||e[221]!==Dn.label?(Tn=n.jsx(Me,{asChild:!0,children:n.jsxs("button",{type:"button",className:Wt,children:[wn,Dn.label]})}),e[220]=wn,e[221]=Dn.label,e[222]=Tn):Tn=e[222];let _n;e[223]!==je||e[224]!==p?(_n=qs.map(M=>{const{label:$e,visual:Ve}=ht(M,p),Lt=Ve.icon;return n.jsxs(Se,{onSelect:()=>je({status:M}),className:"gap-2",children:[n.jsx(Lt,{size:16,className:Ve.iconClassName}),$e]},M)}),e[223]=je,e[224]=p,e[225]=_n):_n=e[225];let In;e[226]!==_n?(In=n.jsx(Ye,{align:"start",className:"w-44",children:_n}),e[226]=_n,e[227]=In):In=e[227];let An;e[228]!==Tn||e[229]!==In?(An=n.jsxs(Ke,{children:[Tn,In]}),e[228]=Tn,e[229]=In,e[230]=An):An=e[230];let ul;e[231]===Symbol.for("react.memo_cache_sentinel")?(ul=P(Wt),e[231]=ul):ul=e[231];const Ml=It[Y].icon;let fl;e[232]!==Ml?(fl=n.jsx(Ml,{size:16}),e[232]=Ml,e[233]=fl):fl=e[233];const Kl=fl,Ul=It[Y];let zn;e[234]!==p||e[235]!==Ul.labelKey?(zn=p(Ul.labelKey),e[234]=p,e[235]=Ul.labelKey,e[236]=zn):zn=e[236];let $n;e[237]!==Kl||e[238]!==zn?($n=n.jsx(Me,{asChild:!0,children:n.jsxs("button",{type:"button",className:ul,children:[Kl,zn]})}),e[237]=Kl,e[238]=zn,e[239]=$n):$n=e[239];let Rn;e[240]!==je||e[241]!==p?(Rn=Ti.map(M=>{const $e=It[M].icon;return n.jsxs(Se,{onSelect:()=>je({type:M}),children:[n.jsx($e,{size:16}),p(It[M].labelKey)]},M)}),e[240]=je,e[241]=p,e[242]=Rn):Rn=e[242];let En;e[243]!==Rn?(En=n.jsx(Ye,{align:"start",className:"w-44",children:Rn}),e[243]=Rn,e[244]=En):En=e[244];let On;e[245]!==$n||e[246]!==En?(On=n.jsxs(Ke,{children:[$n,En]}),e[245]=$n,e[246]=En,e[247]=On):On=e[247];const ql=me==="none"&&Pa;let Ln;e[248]!==ql?(Ln=P(Wt,ql),e[248]=ql,e[249]=Ln):Ln=e[249];let Fn;e[250]!==me||e[251]!==p?(Fn=me==="none"?n.jsxs(n.Fragment,{children:[n.jsx(Js,{size:16}),p("taskBoard.taskDialog.setPriorityButton")]}):n.jsxs(n.Fragment,{children:[n.jsx("span",{className:P("size-2 rounded-full",et[me].dotClassName)}),p(et[me].labelKey)]}),e[250]=me,e[251]=p,e[252]=Fn):Fn=e[252];let Pn;e[253]!==Ln||e[254]!==Fn?(Pn=n.jsx(Me,{asChild:!0,children:n.jsx("button",{type:"button",className:Ln,children:Fn})}),e[253]=Ln,e[254]=Fn,e[255]=Pn):Pn=e[255];let Mn;e[256]!==je||e[257]!==p?(Mn=_s.map(M=>n.jsxs(Se,{onSelect:()=>je({priority:M}),children:[n.jsx("span",{className:P("size-2 rounded-full",et[M].dotClassName)}),p(et[M].labelKey)]},M)),e[256]=je,e[257]=p,e[258]=Mn):Mn=e[258];let Kn;e[259]!==Mn?(Kn=n.jsx(Ye,{align:"start",className:"w-40",children:Mn}),e[259]=Mn,e[260]=Kn):Kn=e[260];let Un;e[261]!==Pn||e[262]!==Kn?(Un=n.jsxs(Ke,{children:[Pn,Kn]}),e[261]=Pn,e[262]=Kn,e[263]=Un):Un=e[263];let qn;e[264]!==ot||e[265]!==a||e[266]!==Dt||e[267]!==p?(qn=a&&n.jsx("div",{className:"inline-flex h-9 items-center justify-start gap-2 px-3 text-sm font-medium text-foreground",title:p("taskBoard.taskDialog.createdByLabel"),children:rr(a)?n.jsxs(n.Fragment,{children:[n.jsx(_t,{size:16,className:"text-muted-foreground"}),Dt]}):ot?n.jsxs(n.Fragment,{children:[n.jsx(ft,{url:ot.user?.image??void 0,fallback:ot.user?.name??"?",shape:"circle",size:"2xs"}),n.jsx("span",{className:"truncate",children:ot.user?.name??p("taskBoard.taskDialog.unknownCreatorLabel")})]}):n.jsxs(n.Fragment,{children:[n.jsx(Qs,{size:16,className:"text-muted-foreground"}),p("taskBoard.taskDialog.unknownCreatorLabel")]})}),e[264]=ot,e[265]=a,e[266]=Dt,e[267]=p,e[268]=qn):qn=e[268];const Gl=!Ae&&Pa;let Gn;e[269]!==Gl?(Gn=P(Wt,Gl),e[269]=Gl,e[270]=Gn):Gn=e[270];let Vn;e[271]!==nt||e[272]!==Is||e[273]!==wt||e[274]!==p?(Vn=wt&&nt?n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"hidden items-center gap-2 sm:flex",children:[n.jsx(ft,{url:nt.user?.image??void 0,fallback:nt.user?.name??"?",shape:"circle",size:"2xs"}),n.jsx("span",{className:"truncate",children:nt.user?.name??p("taskBoard.taskDialog.superAgentDefaultName")})]}),n.jsxs("span",{className:"flex items-center gap-2 sm:hidden",children:[n.jsxs("span",{className:"inline-flex items-center",children:[n.jsx(ft,{url:nt.user?.image??void 0,fallback:nt.user?.name??"?",shape:"circle",size:"2xs",className:"-mr-1.5 ring-2 ring-background"}),n.jsx(mt,{size:16,className:"ring-2 ring-background"})]}),p("taskBoard.taskDialog.superAgentLabel")]})]}):wt?n.jsxs(n.Fragment,{children:[n.jsx(mt,{size:16}),p("taskBoard.taskDialog.superAgentLabel")]}):Is?n.jsxs(n.Fragment,{children:[n.jsx(ft,{url:Is.user?.image??void 0,fallback:Is.user?.name??"?",shape:"circle",size:"2xs"}),n.jsx("span",{className:"truncate",children:Is.user?.name??p("taskBoard.taskDialog.unassignedLabel")})]}):n.jsxs(n.Fragment,{children:[n.jsx(Kr,{size:16,className:"text-muted-foreground"}),p("taskBoard.taskDialog.assignButton")]}),e[271]=nt,e[272]=Is,e[273]=wt,e[274]=p,e[275]=Vn):Vn=e[275];let Hn;e[276]!==Gn||e[277]!==Vn?(Hn=n.jsx(ss,{asChild:!0,children:n.jsx("button",{type:"button",className:Gn,children:Vn})}),e[276]=Gn,e[277]=Vn,e[278]=Hn):Hn=e[278];let Yn;e[279]!==a?.assigneeId||e[280]!==k||e[281]!==je||e[282]!==xt?(Yn=M=>{if(xt(!1),M===Ie&&a?.assigneeId===Ie){k?.();return}je({assigneeId:M})},e[279]=a?.assigneeId,e[280]=k,e[281]=je,e[282]=xt,e[283]=Yn):Yn=e[283];let Wn;e[284]!==D||e[285]!==Yn?(Wn=n.jsx(as,{align:"start",className:"w-56 p-0",children:n.jsx(qi,{members:D,onSelect:Yn})}),e[284]=D,e[285]=Yn,e[286]=Wn):Wn=e[286];let Qn;e[287]!==Xt||e[288]!==xt||e[289]!==Hn||e[290]!==Wn?(Qn=n.jsxs(ns,{open:Xt,onOpenChange:xt,modal:!0,children:[Hn,Wn]}),e[287]=Xt,e[288]=xt,e[289]=Hn,e[290]=Wn,e[291]=Qn):Qn=e[291];let Xn;e[292]!==nt||e[293]!==wt||e[294]!==p?(Xn=wt&&nt&&n.jsxs("div",{className:"relative mt-1.5 hidden items-center pl-5 sm:flex",children:[n.jsx("span",{className:"absolute -top-1.5 left-5 h-[calc(50%+0.375rem)] w-2.5 rounded-bl-md border-b border-l border-border"}),n.jsxs("span",{className:P(Wt,"pointer-events-none"),children:[n.jsx(mt,{size:16}),p("taskBoard.taskDialog.superAgentLabel")]})]}),e[292]=nt,e[293]=wt,e[294]=p,e[295]=Xn):Xn=e[295];let Zn;e[296]!==Qn||e[297]!==Xn?(Zn=n.jsxs("div",{className:"flex flex-col",children:[Qn,Xn]}),e[296]=Qn,e[297]=Xn,e[298]=Zn):Zn=e[298];const Vl=!Oe&&Pa;let Jn;e[299]!==Vl?(Jn=P(Wt,Vl),e[299]=Vl,e[300]=Jn):Jn=e[300];let ml;e[301]===Symbol.for("react.memo_cache_sentinel")?(ml=n.jsx(en,{size:16,className:"text-muted-foreground"}),e[301]=ml):ml=e[301];let ea;e[302]!==Oe||e[303]!==p?(ea=Oe?Ro.format(Oe):p("taskBoard.taskDialog.dueDateLabel"),e[302]=Oe,e[303]=p,e[304]=ea):ea=e[304];let ta;e[305]!==Jn||e[306]!==ea?(ta=n.jsx(ss,{asChild:!0,children:n.jsxs("button",{type:"button",className:Jn,children:[ml,ea]})}),e[305]=Jn,e[306]=ea,e[307]=ta):ta=e[307];const Hl=Oe??void 0;let sa;e[308]!==je?(sa=M=>{je({dueDate:M??null}),M&&pt(!1)},e[308]=je,e[309]=sa):sa=e[309];let na;e[310]!==Hl||e[311]!==sa?(na=n.jsx(as,{className:"w-auto p-0",align:"start",children:n.jsx(zi,{mode:"single",selected:Hl,onSelect:sa,initialFocus:!0})}),e[310]=Hl,e[311]=sa,e[312]=na):na=e[312];let aa;e[313]!==dt||e[314]!==ta||e[315]!==na?(aa=n.jsxs(ns,{open:dt,onOpenChange:pt,children:[ta,na]}),e[313]=dt,e[314]=ta,e[315]=na,e[316]=aa):aa=e[316];const Yl=(st.length>0||qe)&&n.jsxs(ns,{open:Te,onOpenChange:Xe,modal:!0,children:[n.jsx(ss,{asChild:!0,children:n.jsxs("button",{type:"button",className:P(Wt,!qe&&Pa),children:[n.jsx(Ts,{size:16,className:"text-muted-foreground"}),n.jsx("span",{className:"truncate",children:Bt?Cl(Bt,p):p(qe?"taskBoard.sprints.goneLabel":"taskBoard.sprints.backlog")})]})}),n.jsxs(as,{align:"start",className:"w-64 p-1",children:[n.jsx(Nr,{icon:n.jsx(Il,{size:14,className:"text-muted-foreground"}),label:p("taskBoard.sprints.backlog"),selected:!qe,onSelect:()=>yt(null)}),Ge.map(M=>n.jsx(Nr,{icon:n.jsx(Ts,{size:14,className:"text-muted-foreground"}),label:Cl(M,p),hint:go(M),selected:M.id===qe,onSelect:()=>yt(M.id)},M.id))]})]}),Wl=a?.threads;let la;e[317]!==Wl?(la=n.jsx(Uf,{threads:Wl}),e[317]=Wl,e[318]=la):la=e[318];let ia;e[319]!==Pl||e[320]!==Un||e[321]!==qn||e[322]!==Zn||e[323]!==aa||e[324]!==Yl||e[325]!==la||e[326]!==Bn||e[327]!==An||e[328]!==On?(ia=n.jsxs(Pl,{label:Bn,children:[An,On,Un,qn,Zn,aa,Yl,la]}),e[319]=Pl,e[320]=Un,e[321]=qn,e[322]=Zn,e[323]=aa,e[324]=Yl,e[325]=la,e[326]=Bn,e[327]=An,e[328]=On,e[329]=ia):ia=e[329];let ra;e[330]!==p?(ra=p("taskBoard.taskDialog.labelsLabel"),e[330]=p,e[331]=ra):ra=e[331];let oa;e[332]!==L||e[333]!==je||e[334]!==lt||e[335]!==p||e[336]!==te?(oa=te.length===0?n.jsx(ss,{asChild:!0,children:n.jsxs("button",{type:"button",className:P(Wt,Pa),children:[n.jsx(Nl,{size:16}),p("taskBoard.taskDialog.tagsButton")]})}):n.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 sm:px-3",children:[te.map(M=>{const $e=L.find(Ve=>Ve.id===M);return $e?n.jsxs("div",{className:"inline-flex items-center gap-1.5 rounded-md border border-border px-2 py-1 text-sm font-medium text-foreground transition-colors hover:bg-accent",children:[n.jsxs("button",{type:"button",onClick:()=>lt(!0),className:"inline-flex items-center gap-1.5",children:[n.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:rn($e.color)}}),n.jsx("span",{className:"truncate",children:$e.name})]}),n.jsx("button",{type:"button","aria-label":p("taskBoard.taskDialog.removeTagAriaLabel",{name:$e.name}),className:"-mr-0.5 flex size-3.5 items-center justify-center rounded-lg text-muted-foreground hover:bg-background hover:text-foreground",onClick:()=>{je({tagIds:te.filter(Ve=>Ve!==M)})},children:n.jsx(ll,{size:10})})]},M):null}),n.jsx(ss,{asChild:!0,children:n.jsx(ce,{variant:"outline",size:"icon-sm","aria-label":p("taskBoard.taskDialog.addTagButton"),className:"text-muted-foreground",children:n.jsx(is,{className:"size-3.5"})})})]}),e[332]=L,e[333]=je,e[334]=lt,e[335]=p,e[336]=te,e[337]=oa):oa=e[337];let ca;e[338]!==L.length?(ca=Jr(L.length),e[338]=L.length,e[339]=ca):ca=e[339];let da;e[340]!==je||e[341]!==te?(da=M=>je({tagIds:te.includes(M)?te.filter($e=>$e!==M):[...te,M]}),e[340]=je,e[341]=te,e[342]=da):da=e[342];let ua;e[343]!==Zt||e[344]!==Rt||e[345]!==L||e[346]!==ca||e[347]!==da||e[348]!==te?(ua=n.jsx(as,{align:"start",className:"w-56 p-0",children:n.jsx(wo,{tags:L,selectedIds:te,defaultColor:ca,onToggle:da,onCreate:Zt,onDelete:Rt})}),e[343]=Zt,e[344]=Rt,e[345]=L,e[346]=ca,e[347]=da,e[348]=te,e[349]=ua):ua=e[349];let fa;e[350]!==lt||e[351]!==oa||e[352]!==ua||e[353]!==ds?(fa=n.jsxs(ns,{open:ds,onOpenChange:lt,modal:!0,children:[oa,ua]}),e[350]=lt,e[351]=oa,e[352]=ua,e[353]=ds,e[354]=fa):fa=e[354];let ma;e[355]!==ra||e[356]!==fa?(ma=n.jsx(tl,{label:ra,children:fa}),e[355]=ra,e[356]=fa,e[357]=ma):ma=e[357];let pa;e[358]!==a||e[359]!==p?(pa=a&&n.jsx(tl,{label:p("taskBoard.epics.parentLabel"),children:n.jsx(L1,{item:a,buttonClassName:Wt})}),e[358]=a,e[359]=p,e[360]=pa):pa=e[360];const Ql=tl;let ga;e[361]!==p?(ga=p("taskBoard.taskDialog.projectLabel"),e[361]=p,e[362]=ga):ga=e[362];const Xl=Ke,Zl=!X&&!be&&Pa;let ha;e[363]!==Zl?(ha=P(Wt,"max-w-full",Zl),e[363]=Zl,e[364]=ha):ha=e[364];let xa;e[365]!==ze?(xa=n.jsx(ls,{entry:ze}),e[365]=ze,e[366]=xa):xa=e[366];let ja;e[367]!==X||e[368]!==ze?.title||e[369]!==p?(ja=ze?.title??X??p("taskBoard.taskDialog.projectButton"),e[367]=X,e[368]=ze?.title,e[369]=p,e[370]=ja):ja=e[370];let ba;e[371]!==ja?(ba=n.jsx("span",{className:"min-w-0 truncate text-left",children:ja}),e[371]=ja,e[372]=ba):ba=e[372];let ka;e[373]!==ha||e[374]!==xa||e[375]!==ba?(ka=n.jsx(Me,{asChild:!0,children:n.jsxs("button",{type:"button",className:ha,children:[xa,ba]})}),e[373]=ha,e[374]=xa,e[375]=ba,e[376]=ka):ka=e[376];const Jl=Ye,mc="start",pc="w-64";let ya;e[377]!==je?(ya=()=>je(rl(null)),e[377]=je,e[378]=ya):ya=e[378];let va;e[379]!==p?(va=p("taskBoard.taskDialog.noProject"),e[379]=p,e[380]=va):va=e[380];let Na;e[381]!==ya||e[382]!==va?(Na=n.jsx(Se,{onSelect:ya,children:va}),e[381]=ya,e[382]=va,e[383]=Na):Na=e[383];let pl;e[384]!==je?(pl=M=>n.jsx(Se,{className:"gap-2",onSelect:()=>je(rl(M)),children:n.jsx(Co,{entry:M})},M.id),e[384]=je,e[385]=pl):pl=e[385];const ei=se.map(pl);let Sa;e[386]!==Jl||e[387]!==Na||e[388]!==ei?(Sa=n.jsxs(Jl,{align:mc,className:pc,children:[Na,ei]}),e[386]=Jl,e[387]=Na,e[388]=ei,e[389]=Sa):Sa=e[389];let Ba;e[390]!==Xl||e[391]!==ka||e[392]!==Sa?(Ba=n.jsxs(Xl,{children:[ka,Sa]}),e[390]=Xl,e[391]=ka,e[392]=Sa,e[393]=Ba):Ba=e[393];let Ca;e[394]!==Ql||e[395]!==ga||e[396]!==Ba?(Ca=n.jsx(Ql,{label:ga,children:Ba}),e[394]=Ql,e[395]=ga,e[396]=Ba,e[397]=Ca):Ca=e[397];let wa;e[398]!==ge||e[399]!==a||e[400]!==h?(wa=a&&n.jsx(mm,{item:a,description:ge,onOpenPreview:h}),e[398]=ge,e[399]=a,e[400]=h,e[401]=wa):wa=e[401];let Da;e[402]!==ia||e[403]!==ma||e[404]!==pa||e[405]!==Ca||e[406]!==wa||e[407]!==Nn||e[408]!==Sn?(Da=n.jsxs("div",{"data-testid":fc,className:Nn,children:[Sn,ia,ma,pa,Ca,wa]}),e[402]=ia,e[403]=ma,e[404]=pa,e[405]=Ca,e[406]=wa,e[407]=Nn,e[408]=Sn,e[409]=Da):Da=e[409];let Ta;e[410]!==Da||e[411]!==Ht||e[412]!==vn?(Ta=n.jsxs("div",{className:Ht,children:[vn,Da]}),e[410]=Da,e[411]=Ht,e[412]=vn,e[413]=Ta):Ta=e[413];let _a;e[414]!==Ta||e[415]!==Tt?(_a=n.jsx("div",{className:Tt,children:Ta}),e[414]=Ta,e[415]=Tt,e[416]=_a):_a=e[416];let Ia;e[417]!==Je?(Ia=()=>Je(null),e[417]=Je,e[418]=Ia):Ia=e[418];let Aa;e[419]!==_e||e[420]!==Ia?(Aa=n.jsx(pf,{thread:_e,onClose:Ia}),e[419]=_e,e[420]=Ia,e[421]=Aa):Aa=e[421];let za;e[422]!==rt||e[423]!==b||e[424]!==a||e[425]!==p||e[426]!==ae?(za=!a&&n.jsx("div",{className:"flex h-16 items-center justify-end border-t border-border px-4",children:n.jsxs(ce,{size:"sm",disabled:!ae.trim()||b,onClick:rt,children:[n.jsx(is,{size:16}),p("taskBoard.taskDialog.createTaskButton")]})}),e[422]=rt,e[423]=b,e[424]=a,e[425]=p,e[426]=ae,e[427]=za):za=e[427];let gl;e[428]!==_a||e[429]!==Aa||e[430]!==za||e[431]!==es?(gl=n.jsxs(n.Fragment,{children:[es,_a,Aa,za]}),e[428]=_a,e[429]=Aa,e[430]=za,e[431]=es,e[432]=gl):gl=e[432];const $a=gl;if(s==="page"){let M;e[433]!==Za||e[434]!==Xa?(M=Ve=>{const Lt=Za(Ve),gc=Xa(Ve);return()=>{Lt?.(),gc?.()}},e[433]=Za,e[434]=Xa,e[435]=M):M=e[435];let $e;return e[436]!==$a||e[437]!==M?($e=n.jsx("div",{ref:M,"data-testid":"task-detail",className:"flex min-h-0 flex-1 flex-col overflow-hidden",children:$a}),e[436]=$a,e[437]=M,e[438]=$e):$e=e[438],$e}let Ra;e[439]!==ut?(Ra=M=>!M&&ut(),e[439]=ut,e[440]=Ra):Ra=e[440];let Ea;e[441]!==p?(Ea=p("taskBoard.taskDialog.newTaskTitle"),e[441]=p,e[442]=Ea):Ea=e[442];let Oa;e[443]!==Ea?(Oa=n.jsx(al,{className:"sr-only",children:Ea}),e[443]=Ea,e[444]=Oa):Oa=e[444];let La;e[445]!==$a||e[446]!==Oa?(La=n.jsxs(nl,{className:"flex max-h-[92vh] flex-col gap-0 overflow-hidden rounded-2xl p-0 sm:h-[90vh] sm:max-h-[820px] sm:max-w-[1040px]",closeButtonClassName:"hidden",children:[Oa,$a]}),e[445]=$a,e[446]=Oa,e[447]=La):La=e[447];let hl;return e[448]!==v||e[449]!==Ra||e[450]!==La?(hl=n.jsx(sl,{open:v,onOpenChange:Ra,children:La}),e[448]=v,e[449]=Ra,e[450]=La,e[451]=hl):hl=e[451],hl}function Hf(t){return!t}function Yf(t){t.key==="Enter"&&t.preventDefault()}function Wf(t){t&&(t.style.height="auto",t.style.height=`${t.scrollHeight}px`)}function Qf(t){return!t}function Xf(t){return!t}function Zf(t){return t.name===Yd}function Jf(t){return t.name===Hd}function em(t){return t.state!=="closed"}function tm(t){return t.id}function sm(t){const e=E.c(2);let s;return e[0]!==t?(s=n.jsx(Eo,{...t,chrome:"dialog"}),e[0]=t,e[1]=s):s=e[1],s}function nm(t){const e=E.c(2);let s;return e[0]!==t?(s=n.jsx(Eo,{...t,chrome:"page"}),e[0]=t,e[1]=s):s=e[1],s}function am(t,e){switch(t.status){case"failed":return zd(t.failureKind)?{label:t.failureKind==="superseded"?e("taskBoard.taskDialog.threadStatusSuperseded"):e("taskBoard.taskDialog.threadStatusEndedAfterDelivery"),className:"text-muted-foreground",icon:rs}:{label:e("taskBoard.taskDialog.threadStatusError"),className:"text-destructive",icon:ad};case"requires_action":return{label:e("taskBoard.taskDialog.threadStatusNeedsInput"),className:"text-warning",icon:Al};case"in_progress":return{label:e("taskBoard.taskDialog.threadStatusRunning"),className:"text-primary",icon:Ci,spin:!0};case"completed":return{label:e("taskBoard.taskDialog.threadStatusCompleted"),className:"text-success",icon:Ha};case"expired":return{label:e("taskBoard.taskDialog.threadStatusExpired"),className:"text-muted-foreground",icon:rs};default:return t.status}}function lm(t){const e=E.c(17),{thread:s,onOpen:l}=t,i=J();let a;if(e[0]!==l||e[1]!==i||e[2]!==s){const o=s.status?am({...s,status:s.status},i):null,r=s.lastMessage;let c;e[4]!==s.title?(c=eo(s.title,"reviewer"),e[4]=s.title,e[5]=c):c=e[5];const d=c,u=s.threadId,f=d?"taskBoard.conversation.reviewer":"taskBoard.taskDialog.superAgentLabel";let m;e[6]!==i||e[7]!==f?(m=i(f),e[6]=i,e[7]=f,e[8]=m):m=e[8];let g;e[9]!==d?(g=d?n.jsx(cl,{size:32}):n.jsx(mt,{size:32}),e[9]=d,e[10]=g):g=e[10];let h;e[11]!==l||e[12]!==s?(h=l?()=>l(s):void 0,e[11]=l,e[12]=s,e[13]=h):h=e[13];let j;e[14]!==l||e[15]!==s?(j=l?()=>l(s):void 0,e[14]=l,e[15]=s,e[16]=j):j=e[16],a=n.jsx(To,{id:`run-${s.threadId}`,threadId:u,author:m,avatar:g,createdAt:s.createdAt,body:r||s.title||"",muted:s.status!=="requires_action",onOpenThread:h,onOpen:j,metadata:o&&n.jsxs("span",{className:P("flex shrink-0 items-center gap-1.5",o.className),children:[o.spin?n.jsx(bt,{className:"size-[15px]",label:o.label}):n.jsx(o.icon,{size:15}),n.jsx("span",{className:"text-xs",children:o.label})]})}),e[0]=l,e[1]=i,e[2]=s,e[3]=a}else a=e[3];return a}function im(t,e){return t.merged?{label:e("taskBoard.taskDialog.prStateMerged"),className:"text-special",icon:Vr}:t.state==="closed"?{label:e("taskBoard.taskDialog.prStateClosed"),className:"text-destructive",icon:el}:t.draft?{label:e("taskBoard.taskDialog.prStateDraft"),className:"text-muted-foreground",icon:el}:t.state===null&&t.merged===null?{label:e("taskBoard.taskDialog.prStateUnknown"),className:"text-muted-foreground",icon:el}:{label:e("taskBoard.taskDialog.prStateOpen"),className:"text-success",icon:el}}function rm(t,e){switch(t){case"passing":return{label:e("taskBoard.taskDialog.prChecksPassing"),className:"text-success",icon:Ha};case"failing":return{label:e("taskBoard.taskDialog.prChecksFailing"),className:"text-destructive",icon:rs};case"pending":return{label:e("taskBoard.taskDialog.prChecksPending"),className:"text-warning",icon:Ci};default:return null}}const om=new Set(["failure","cancelled","timed_out","action_required","startup_failure","stale"]);function cm(t){if(t.status!=="completed")return{icon:Ci,className:"text-warning",spin:!0};const e=t.conclusion;return e&&om.has(e)?{icon:rs,className:"text-destructive",spin:!1}:vo(t)?{icon:Ha,className:"text-success",spin:!1}:{icon:Al,className:"text-muted-foreground",spin:!1}}function dm(t){const e=E.c(58),{pr:s,routes:l,revalidating:i,previewThread:a,readyToShip:o,shipPending:r,resolvePending:c,onShip:d,onResolveConflict:u,onOpenPreview:f}=t,m=J(),[g,h]=Z.useState(!1),j=a1(s.url)?.repo.provider??"github";let x;if(e[0]!==g||e[1]!==f||e[2]!==u||e[3]!==d||e[4]!==s||e[5]!==a||e[6]!==j||e[7]!==o||e[8]!==c||e[9]!==i||e[10]!==l||e[11]!==r||e[12]!==m){const k=im(s,m),b=rm(s.checksStatus,m);let v;e[14]!==s||e[15]!==o?(v=q1(s,o),e[14]=s,e[15]=o,e[16]=v):v=e[16];const{isOpen:p,hasConflict:N,showShip:y,showResolveConflict:B}=v,C=!!a||!!s.previewUrl||y||B,w=s.checks??[],D=w.length>0||b!=null,S=w.length>0,T=G1(s.checksStatus,w,g),_=T?{label:m("taskBoard.taskDialog.prChecksScore",T),className:"text-warning",icon:rs}:b,A=i&&"revalidating-ring";let I;e[17]!==A?(I=P("flex flex-col gap-3 rounded-xl border border-border bg-card p-3",A),e[17]=A,e[18]=I):I=e[18];let $;e[19]!==j?($=n.jsx(ju,{provider:j,className:"size-4 shrink-0 text-foreground"}),e[19]=j,e[20]=$):$=e[20];const O=s.title??`${s.repoOwner}/${s.repoName}`;let R;e[21]!==O?(R=n.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:O}),e[21]=O,e[22]=R):R=e[22];const L=P("flex shrink-0 items-center gap-1 text-xs font-medium",k.className);let U;e[23]!==k?(U=n.jsx(k.icon,{size:13}),e[23]=k,e[24]=U):U=e[24];let V;e[25]!==k||e[26]!==L||e[27]!==U?(V=n.jsxs("span",{className:L,children:[U,k.label]}),e[25]=k,e[26]=L,e[27]=U,e[28]=V):V=e[28];const K=s.url,Q=s.url;let H;e[29]!==s.number||e[30]!==j?(H=Zu(j,s.number),e[29]=s.number,e[30]=j,e[31]=H):H=e[31];let ee;e[32]===Symbol.for("react.memo_cache_sentinel")?(ee=n.jsx(Ka,{size:12,className:"text-muted-foreground/60 group-hover:text-foreground"}),e[32]=ee):ee=e[32];let G;e[33]!==s.url||e[34]!==H?(G=n.jsxs("a",{href:K,target:"_blank",rel:"noreferrer",title:Q,className:"group flex shrink-0 items-center gap-1 rounded-md px-2 py-1 text-xs font-medium text-muted-foreground transition-colors hover:bg-accent",children:[H,ee]}),e[33]=s.url,e[34]=H,e[35]=G):G=e[35];let se;e[36]!==V||e[37]!==G||e[38]!==$||e[39]!==R?(se=n.jsxs("div",{className:"flex items-center gap-3",children:[$,R,V,G]}),e[36]=V,e[37]=G,e[38]=$,e[39]=R,e[40]=se):se=e[40];let re;e[41]!==N||e[42]!==p||e[43]!==m?(re=N&&p&&n.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-medium text-warning",children:[n.jsx(rs,{size:13,className:"shrink-0"}),m("taskBoard.taskDialog.prConflict")]}),e[41]=N,e[42]=p,e[43]=m,e[44]=re):re=e[44];let le;e[45]!==C||e[46]!==f||e[47]!==u||e[48]!==d||e[49]!==s.previewUrl||e[50]!==a||e[51]!==c||e[52]!==l||e[53]!==r||e[54]!==B||e[55]!==y||e[56]!==m?(le=C&&n.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a&&n.jsxs(ce,{type:"button",variant:"outline",size:"sm",className:"gap-1.5",title:m("taskBoard.taskDialog.openPreviewTitle"),onClick:()=>f?.(a),children:[n.jsx(Mr,{size:13}),m("taskBoard.taskDialog.openPreviewButton")]}),s.previewUrl&&n.jsx(Y1,{url:s.previewUrl,routes:l}),y&&n.jsx(ce,{type:"button",variant:"success",size:"sm",disabled:r,onClick:d,children:m("taskBoard.taskDialog.shipToProductionButton")}),B&&n.jsxs(ce,{type:"button",variant:"warning",size:"sm",className:"gap-1.5",disabled:c,title:m("taskBoard.taskDialog.resolveConflictTitle"),onClick:u,children:[n.jsx(Vr,{size:13}),m("taskBoard.taskDialog.resolveConflictButton")]})]}),e[45]=C,e[46]=f,e[47]=u,e[48]=d,e[49]=s.previewUrl,e[50]=a,e[51]=c,e[52]=l,e[53]=r,e[54]=B,e[55]=y,e[56]=m,e[57]=le):le=e[57],x=n.jsxs("div",{className:I,children:[se,re,le,D&&n.jsxs("div",{className:"border-t border-border pt-2 text-xs",children:[n.jsxs("button",{type:"button",disabled:!S,onClick:()=>h(um),className:"flex w-full items-center gap-1.5 font-medium disabled:cursor-default",children:[_?n.jsx(_.icon,{size:13,className:_.className}):n.jsx(Ha,{size:13,className:"text-muted-foreground"}),n.jsx("span",{className:P(_?.className??"text-muted-foreground"),children:_?.label??m("taskBoard.taskDialog.prChecksLabel")}),S&&n.jsx(Va,{size:14,className:P("ml-auto text-muted-foreground/60 transition-transform",g&&"rotate-90")})]}),g&&n.jsx("div",{className:"mt-2 flex flex-col gap-2",children:w.map((F,q)=>{const oe=cm(F),ne=`${F.name}-${q}`;return n.jsxs("div",{className:"rounded-md bg-muted/40 p-2",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[oe.spin?n.jsx(bt,{className:P("size-[13px]",oe.className)}):n.jsx(oe.icon,{size:13,className:P("shrink-0",oe.className)}),n.jsx("span",{className:"min-w-0 flex-1 truncate font-medium text-foreground",children:F.name}),F.detailsUrl&&n.jsx("a",{href:F.detailsUrl,target:"_blank",rel:"noreferrer",className:"shrink-0 text-muted-foreground/60 hover:text-foreground",children:n.jsx(Ka,{size:12})})]}),F.summary&&n.jsx("div",{className:"mt-1.5 max-h-64 overflow-auto text-muted-foreground",children:n.jsx($i,{id:`${s.url}-${ne}`,text:F.summary})})]},ne)})})]})]}),e[0]=g,e[1]=f,e[2]=u,e[3]=d,e[4]=s,e[5]=a,e[6]=j,e[7]=o,e[8]=c,e[9]=i,e[10]=l,e[11]=r,e[12]=m,e[13]=x}else x=e[13];return x}function um(t){return!t}function fm(){const t=E.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(Fa,{className:"size-4 shrink-0 rounded"}),n.jsx(Fa,{className:"h-4 min-w-0 flex-1"}),n.jsx(Fa,{className:"h-4 w-16 shrink-0"}),n.jsx(Fa,{className:"h-4 w-10 shrink-0"})]}),t[0]=e):e=t[0];let s;return t[1]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsxs("div",{className:"flex flex-col gap-3 rounded-xl border border-border bg-card p-3",children:[e,n.jsxs("div",{className:"flex gap-2",children:[n.jsx(Fa,{className:"h-7 w-20"}),n.jsx(Fa,{className:"h-7 w-28"})]})]}),t[1]=s):s=t[1],s}function mm(t){const e=E.c(54),{item:s,description:l,onOpenPreview:i}=t,a=J(),{data:o,isLoading:r,isFetching:c}=Ri(s.id),d=J1(s.id),u=ef(s.id),f=Vi(s.id);let m,g,h,j,x,k;if(e[0]!==f.threads||e[1]!==l||e[2]!==s.previewRoutes||e[3]!==s.status||e[4]!==s.threads||e[5]!==i||e[6]!==d||e[7]!==o||e[8]!==c||e[9]!==r||e[10]!==u||e[11]!==a){k=Symbol.for("react.early_return_sentinel");e:{let p;e[18]!==f.threads||e[19]!==l?(p=[l,...f.threads.flatMap(hm)],e[18]=f.threads,e[19]=l,e[20]=p):p=e[20];const N=df(p.join(`

`)),y=r&&!o;if(!y&&(!o||o.length===0)&&N.length===0){k=null;break e}let B;e[21]!==s.status?(B=af(s.status),e[21]=s.status,e[22]=B):B=e[22];const C=B;let w;e[23]!==d||e[24]!==a?(w=()=>d.mutate(void 0,{onSuccess:I=>I?.merged?He.success(a("taskBoard.taskDialog.shipSuccess")):He.error(a("taskBoard.taskDialog.shipError")),onError:()=>He.error(a("taskBoard.taskDialog.shipError"))}),e[23]=d,e[24]=a,e[25]=w):w=e[25];const D=w;let S;e[26]!==u||e[27]!==a?(S=I=>u.mutate(I,{onSuccess:()=>He.success(a("taskBoard.taskDialog.resolveConflictSuccess")),onError:()=>He.error(a("taskBoard.taskDialog.resolveConflictError"))}),e[26]=u,e[27]=a,e[28]=S):S=e[28];const T=S;let _;e[29]!==s.threads||e[30]!==i?(_=i?s.threads.find(gm):void 0,e[29]=s.threads,e[30]=i,e[31]=_):_=e[31];const A=_;m=Vf,e[32]!==a?(x=a("taskBoard.taskDialog.linksLabel"),e[32]=a,e[33]=x):x=e[33],g="flex flex-col gap-1",e[34]!==s.previewRoutes||e[35]!==y||e[36]!==i||e[37]!==T||e[38]!==D||e[39]!==A||e[40]!==d||e[41]!==o||e[42]!==c||e[43]!==C||e[44]!==u?(h=y?n.jsx(fm,{}):(o??[]).map(I=>n.jsx(dm,{pr:I,routes:s.previewRoutes??[],revalidating:c,previewThread:A,readyToShip:C,shipPending:d.isPending,resolvePending:u.isPending,onShip:D,onResolveConflict:()=>T(I.number),onOpenPreview:i},I.url)),e[34]=s.previewRoutes,e[35]=y,e[36]=i,e[37]=T,e[38]=D,e[39]=A,e[40]=d,e[41]=o,e[42]=c,e[43]=C,e[44]=u,e[45]=h):h=e[45],j=N.map(pm)}e[0]=f.threads,e[1]=l,e[2]=s.previewRoutes,e[3]=s.status,e[4]=s.threads,e[5]=i,e[6]=d,e[7]=o,e[8]=c,e[9]=r,e[10]=u,e[11]=a,e[12]=m,e[13]=g,e[14]=h,e[15]=j,e[16]=x,e[17]=k}else m=e[12],g=e[13],h=e[14],j=e[15],x=e[16],k=e[17];if(k!==Symbol.for("react.early_return_sentinel"))return k;let b;e[46]!==g||e[47]!==h||e[48]!==j?(b=n.jsxs("div",{className:g,children:[h,j]}),e[46]=g,e[47]=h,e[48]=j,e[49]=b):b=e[49];let v;return e[50]!==m||e[51]!==x||e[52]!==b?(v=n.jsx(m,{label:x,children:b}),e[50]=m,e[51]=x,e[52]=b,e[53]=v):v=e[53],v}function pm(t){return n.jsxs("a",{href:t.url,target:"_blank",rel:"noreferrer",className:"group flex items-center gap-2 rounded-md px-1 py-1.5 transition-colors hover:bg-accent",children:[n.jsx(di,{size:15,className:"shrink-0 text-muted-foreground"}),n.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:t.label}),n.jsx(Ka,{size:13,className:"shrink-0 text-muted-foreground/50 group-hover:text-foreground"})]},t.url)}function gm(t){return t.hasPreview&&t.virtualMcpId}function hm(t){return[t.body,...t.replies.map(xm)]}function xm(t){return t.body}function jm(t){const e=E.c(13),{item:s}=t,l=J(),i=no(),{data:a}=Ri(s.id),o=tf(s.id);if(!Vd({reviewerEnabled:i,hasPullRequest:(a??[]).length>0,threadTitles:s.threads.map(bm)}))return null;const c=o.isPending;let d;e[0]!==l?(d=l("taskBoard.taskDialog.runReviewerTitle"),e[0]=l,e[1]=d):d=e[1];let u;e[2]!==o||e[3]!==l?(u=()=>o.mutate(void 0,{onSuccess:h=>h?.queued?He.success(l("taskBoard.taskDialog.runReviewerSuccess")):He.info(l("taskBoard.taskDialog.runReviewerAlreadyRunning")),onError:h=>He.error(h.message||l("taskBoard.taskDialog.runReviewerError"))}),e[2]=o,e[3]=l,e[4]=u):u=e[4];let f;e[5]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(cl,{size:14,className:"shrink-0"}),e[5]=f):f=e[5];let m;e[6]!==l?(m=l("taskBoard.taskDialog.runReviewerButton"),e[6]=l,e[7]=m):m=e[7];let g;return e[8]!==o.isPending||e[9]!==d||e[10]!==u||e[11]!==m?(g=n.jsxs(ce,{type:"button",variant:"ghost",size:"sm",disabled:c,title:d,className:"gap-1.5 px-2 font-normal text-muted-foreground",onClick:u,children:[f,m]}),e[8]=o.isPending,e[9]=d,e[10]=u,e[11]=m,e[12]=g):g=e[12],g}function bm(t){return t.title}function km(t){const e=E.c(28),{item:s,members:l,onOpenThread:i}=t,a=J(),{data:o}=No(s.id),{org:r}=tt(),{data:c}=vi.useSession(),d=new Map(l.map(Im)),u={id:c?.user?.id??"me",name:c?.user?.name??a("taskBoard.taskDialog.commentYouLabel"),image:c?.user?.image},f=Vi(s.id),[m,g]=zo(),[h,j]=Z.useState(null),x=Ao(f.threads),k=s.threads.filter(Di),b=k.filter(_m),v=Dm;let p;e[0]!==f.threads?(p=F=>F.filter(q=>!f.threads.some(oe=>oe.threadId===q.threadId)).length,e[0]=f.threads,e[1]=p):p=e[1];const N=p,y=v(f.threads)-v(x)+N(k)-N(b),B=F=>s.threads.find(q=>q.threadId===F),C=F=>{const q=B(F);return q&&i?()=>i(q):void 0},w=(F,q)=>{if(F===Ie){const ne=B(q),fe=!!ne&&eo(ne.title,"reviewer");return{id:F,name:a(fe?"taskBoard.conversation.reviewer":"taskBoard.taskDialog.superAgentLabel"),isAgent:!0,isReviewer:fe}}if(F===u.id)return u;const oe=d.get(F);return{id:F,name:oe?.user?.name??F,image:oe?.user?.image}},D=m?f.threads:x,S=async F=>{const q=await fetch(`/api/${r.slug}/decopilot/cancel/${F}`,{method:"POST",credentials:"include"});if(q.ok)return;const oe=await q.json().catch(wm);throw He.error(oe.message??a("taskBoard.agentThread.stopFailed")),new Error(oe.message??"stop failed")},T=k.find(Cm),_=F=>{const q=B(F);if(q)return{status:q.status==="in_progress"?"running":q.status==="requires_action"?"waiting":q.failureKind==="cancelled"?"stopped":q.status==="failed"||q.status==="expired"?"failed":"done",onOpen:C(F),onStop:()=>S(q.threadId)}},A=D.map(F=>({id:F.id,threadId:F.threadId,author:w(F.authorId,F.threadId),run:_(F.threadId),onOpenThread:_(F.threadId)?void 0:C(F.threadId),internal:F.audience==="internal",body:F.body,createdAt:F.createdAt,resolved:F.resolved,replies:F.replies.map(q=>({id:q.id,threadId:q.threadId,author:w(q.authorId,q.threadId),onOpenThread:C(q.threadId),internal:q.audience==="internal",body:q.body,createdAt:q.createdAt,replies:[]}))})),I=[...(o??[]).filter(Ad).map(Bm),...(m?k:b).filter(F=>!D.some(q=>q.threadId===F.threadId)).map(Sm),...A.map(Nm)].sort(vm),$=[],O=ym;for(const F of I){if(F.kind==="thread"){$.push({type:"thread",thread:F.thread});continue}if(F.kind==="comment"){$.push({type:"comment",comment:F.comment});continue}const q=$[$.length-1];q?.type==="timeline"&&O(q).toDateString()===new Date(F.at).toDateString()?q.items.push(F.activity):$.push({type:"timeline",items:[F.activity]})}const R="flex flex-col gap-5";let L;e[2]!==a?(L=a("taskBoard.conversation.replies"),e[2]=a,e[3]=L):L=e[3];let U;e[4]!==L?(U=n.jsx("h2",{className:"text-sm font-medium text-muted-foreground",children:L}),e[4]=L,e[5]=U):U=e[5];let V;e[6]!==m||e[7]!==y||e[8]!==g||e[9]!==a?(V=(m||y>0)&&n.jsx(ce,{type:"button",variant:"ghost",size:"sm",onClick:()=>g(!m),className:"px-2 font-normal text-muted-foreground",children:m?a("taskBoard.conversation.hideBehindTheScenes"):a("taskBoard.conversation.showBehindTheScenes",{count:y})}),e[6]=m,e[7]=y,e[8]=g,e[9]=a,e[10]=V):V=e[10];let K;e[11]!==s?(K=n.jsx(jm,{item:s}),e[11]=s,e[12]=K):K=e[12];let Q;e[13]!==s.id||e[14]!==l?(Q=n.jsx(Of,{itemId:s.id,members:l}),e[13]=s.id,e[14]=l,e[15]=Q):Q=e[15];let H;e[16]!==V||e[17]!==K||e[18]!==Q?(H=n.jsxs("div",{className:"flex items-center gap-1",children:[V,K,Q]}),e[16]=V,e[17]=K,e[18]=Q,e[19]=H):H=e[19];let ee;e[20]!==U||e[21]!==H?(ee=n.jsxs("div",{className:"flex items-center justify-between gap-2",children:[U,H]}),e[20]=U,e[21]=H,e[22]=ee):ee=e[22];const G="flex flex-col gap-1",se=$.map((F,q)=>{const oe=O(F),ne=$[q-1],fe=!ne||O(ne).toDateString()!==oe.toDateString(),ve=()=>F.type==="timeline"?n.jsx(zm,{className:"py-2",items:F.items,memberByUserId:d}):F.type==="comment"?n.jsx(vf,{thread:F.comment,me:u,onEdit:async(de,pe)=>{try{return await f.edit.mutateAsync({id:de,body:pe}),!0}catch(ye){const ke=ye;return He.error(ke instanceof Error?ke.message:a("taskBoard.taskDialog.commentEditFailed")),!1}},onDelete:de=>f.remove.mutate(de),onReply:async de=>{try{return await f.post.mutateAsync({body:de,parentId:F.comment.id}),!0}catch(pe){const ye=pe;return He.error(ye instanceof Error?ye.message:a("taskBoard.conversation.sendFailed")),!1}},continuation:!fe&&ne?.type==="comment"&&_o(ne.comment,F.comment),replying:h===F.comment.id,onReplyingChange:de=>j(pe=>de?F.comment.id:pe===F.comment.id?null:pe),liveRunElsewhere:!!T&&F.comment.run?.status!=="running"&&F.comment.run?.status!=="waiting"},`comment-${F.comment.id}`):n.jsx(lm,{thread:F.thread,onOpen:i},`thread-${F.thread.threadId}`),De=F.type==="timeline"?F.items[0].id:F.type==="thread"?F.thread.threadId:F.comment.id;return n.jsxs(Z.Fragment,{children:[fe&&n.jsxs("div",{className:"text-meta flex items-center gap-3 pt-4 pb-1",children:[n.jsx("span",{className:"h-px flex-1 bg-border"}),n.jsx("time",{dateTime:oe.toISOString(),children:oe.toLocaleDateString(void 0,{day:"numeric",month:"long",year:"numeric"})}),n.jsx("span",{className:"h-px flex-1 bg-border"})]}),ve()]},`${F.type}-${De}`)});let re;e[23]!==se?(re=n.jsx("div",{className:G,children:se}),e[23]=se,e[24]=re):re=e[24];let le;return e[25]!==re||e[26]!==ee?(le=n.jsxs("section",{className:R,children:[ee,re]}),e[25]=re,e[26]=ee,e[27]=le):le=e[27],le}function ym(t){return new Date(t.type==="timeline"?t.items[0].occurredAt:t.type==="thread"?t.thread.createdAt:t.comment.createdAt)}function vm(t,e){return t.at-e.at}function Nm(t){return{kind:"comment",at:new Date(t.createdAt).getTime(),comment:t}}function Sm(t){return{kind:"thread",at:new Date(t.createdAt).getTime(),thread:t}}function Bm(t){return{kind:"activity",at:new Date(t.occurredAt).getTime(),activity:t}}function Cm(t){return t.status==="in_progress"||t.status==="requires_action"}function wm(){return{}}function Dm(t){return t.reduce(Tm,0)}function Tm(t,e){return t+1+e.replies.length}function _m(t){return t.status==="requires_action"}function Im(t){return[t.userId,t]}function Ls(t){const e=E.c(7),{icon:s,label:l}=t;let i;e[0]!==s?(i=n.jsx("span",{className:"ml-1 mr-1 inline-flex h-[1lh] items-center align-top",children:s}),e[0]=s,e[1]=i):i=e[1];let a;e[2]!==l?(a=n.jsx("span",{className:"mr-1",children:l}),e[2]=l,e[3]=a):a=e[3];let o;return e[4]!==i||e[5]!==a?(o=n.jsxs(n.Fragment,{children:[i,a]}),e[4]=i,e[5]=a,e[6]=o):o=e[6],o}const wl="\0";function jl(t){return`${wl}${t}${wl}`}function Ns(t,e){return t.split(new RegExp(`${wl}(\\w+)${wl}`)).map((s,l)=>n.jsx(Z.Fragment,{children:l%2===0?s:e[s]},l))}function Ma(t,e){return e(t==="qa"?"taskBoard.taskDialog.qaAgentLabel":t==="code_review"?"taskBoard.taskDialog.codeReviewerLabel":"taskBoard.taskDialog.reviewerLabel")}function Am(t,e,s){const l=g=>{const h=typeof g=="string"?$d[g]:void 0;if(!h)return String(g??"");const j=h.icon;return n.jsx(Ls,{icon:n.jsx(j,{size:14,className:h.iconClassName}),label:e(h.labelKey)})},i=g=>{const h=typeof g=="string"?et[g]:void 0;return h?n.jsx(Ls,{icon:n.jsx("span",{className:P("size-2 rounded-full",h.dotClassName)}),label:e(h.labelKey)}):String(g??"")},a=g=>{const h=$o(typeof g=="string"?g:null);return h?n.jsx(Ls,{icon:n.jsx(en,{size:14,className:"text-muted-foreground"}),label:Ro.format(h)}):""},o=g=>!Array.isArray(g)||g.length===0?null:g.map((h,j)=>{const x=h;return n.jsx(Ls,{icon:n.jsx("span",{className:"size-2 rounded-full",style:{backgroundColor:rn(x.color)}}),label:x.name??""},x.id??j)}),r=g=>{if(g===Ie)return n.jsx(Ls,{icon:n.jsx(mt,{size:14}),label:e("taskBoard.taskDialog.superAgentLabel")});const h=typeof g=="string"?s.get(g):void 0;return n.jsx(Ls,{icon:n.jsx(ft,{url:h?.user?.image??void 0,fallback:h?.user?.name??"?",shape:"circle",size:"2xs"}),label:h?.user?.name??e("taskBoard.taskDialog.someoneLabel")})},c=g=>{const h=g&&typeof g=="object"&&"name"in g?g.name:null;return n.jsx(Ls,{icon:n.jsx(Ts,{size:14,className:"text-muted-foreground"}),label:typeof h=="string"?h:e("taskBoard.sprints.goneLabel")})},d=g=>n.jsx(Ls,{icon:n.jsx(cl,{size:14}),label:Ma(g,e)}),u=t.data,f=jl("from"),m=jl("to");switch(t.action){case"created":return e("taskBoard.taskDialog.activityCreated");case"duplicate_reported":{const g=typeof u.title=="string"?u.title:null;return g?e("taskBoard.taskDialog.activityDuplicateReportedTitled",{title:g}):e("taskBoard.taskDialog.activityDuplicateReported")}case"finding_resolved":return e("taskBoard.taskDialog.activityFindingResolved",{url:String(u.url??"")});case"status_changed":{const g=W1(u.reason);return typeof u.retry=="number"?e("taskBoard.taskDialog.activityRetryScheduled",{attempt:String(u.retry),of:String(u.of??u.retry),reason:g}):typeof u.retriesSpent=="number"&&u.retriesSpent>0?Ns(e("taskBoard.taskDialog.activityRetriesExhausted",{to:m,count:String(u.retriesSpent),reason:g}),{to:l(u.to)}):Ns(u.from?e("taskBoard.taskDialog.activityMovedFromTo",{from:f,to:m}):e("taskBoard.taskDialog.activityMovedTo",{to:m}),{from:l(u.from),to:l(u.to)})}case"assignee_changed":return u.to==null?e("taskBoard.taskDialog.activityUnassigned"):Ns(e(u.to===Ie?"taskBoard.taskDialog.activityDelegated":"taskBoard.taskDialog.activityAssigned",{name:jl("name")}),{name:r(u.to)});case"type_changed":return u.from?e("taskBoard.taskDialog.activityTypeFromTo",{from:f,to:m}):e("taskBoard.taskDialog.activityTypeSet",{to:m});case"priority_changed":return u.to==="none"?e("taskBoard.taskDialog.activityPriorityCleared"):Ns(!u.from||u.from==="none"?e("taskBoard.taskDialog.activityPrioritySet",{to:m}):e("taskBoard.taskDialog.activityPriorityFromTo",{from:f,to:m}),{from:i(u.from),to:i(u.to)});case"due_date_changed":return u.to==null?e("taskBoard.taskDialog.activityDueDateCleared"):Ns(u.from==null?e("taskBoard.taskDialog.activityDueDateSet",{to:m}):e("taskBoard.taskDialog.activityDueDateFromTo",{from:f,to:m}),{from:a(u.from),to:a(u.to)});case"title_changed":return e("taskBoard.taskDialog.activityRenamed",{to:String(u.to??"")});case"description_changed":return e("taskBoard.taskDialog.activityDescriptionUpdated");case"sprint_changed":return u.to==null?Ns(e("taskBoard.sprints.activityToBacklog",{from:f}),{from:c(u.from)}):Ns(u.from==null?e("taskBoard.sprints.activitySet",{to:m}):e("taskBoard.sprints.activityFromTo",{from:f,to:m}),{from:c(u.from),to:c(u.to)});case"tags_changed":return!Array.isArray(u.to)||u.to.length===0?e("taskBoard.taskDialog.activityTagsCleared"):Ns(e("taskBoard.taskDialog.activityTagsSet",{to:m}),{to:o(u.to)});case"review_requested":return Ns(e("taskBoard.taskDialog.activityDelegated",{name:jl("name")}),{name:d(u.reviewer)});case"review_approved":return typeof u.notes=="string"&&u.notes.trim()?e("taskBoard.taskDialog.activityReviewApprovedWithNotes",{reviewer:Ma(u.reviewer,e),notes:u.notes}):e("taskBoard.taskDialog.activityReviewApproved",{reviewer:Ma(u.reviewer,e)});case"review_changes_requested":return typeof u.notes=="string"&&u.notes.trim()?e("taskBoard.taskDialog.activityReviewChangesRequestedWithNotes",{reviewer:Ma(u.reviewer,e),notes:u.notes}):e("taskBoard.taskDialog.activityReviewChangesRequested",{reviewer:Ma(u.reviewer,e)});case"review_verdict_requested":return e("taskBoard.taskDialog.activityReviewVerdictRequested",{reviewer:Ma(u.reviewer,e)});case"merge_conflict_resolution":return e("taskBoard.taskDialog.activityMergeConflictResolution");case"merge_failed":{const g=typeof u.detail=="string"?u.detail:"";switch(u.reason){case"no_pr":return e("taskBoard.taskDialog.activityMergeFailedNoPr");case"checks_failing":return e("taskBoard.taskDialog.activityMergeFailedChecksFailing");case"no_connection":return g?e("taskBoard.taskDialog.activityMergeFailedNoConnection",{detail:g}):e("taskBoard.taskDialog.activityMergeFailed");case"rate_limited":return e("taskBoard.taskDialog.activityMergeFailedRateLimited");case"conflict":return e("taskBoard.taskDialog.activityMergeFailedConflict");case"refused":return g?e("taskBoard.taskDialog.activityMergeFailedRefused",{detail:g}):e("taskBoard.taskDialog.activityMergeFailed");default:return g?e("taskBoard.taskDialog.activityMergeFailedError",{detail:g}):e("taskBoard.taskDialog.activityMergeFailed")}}default:{const g=t.action;return String(g)}}}function Sr(t){return!t||t===Ie}function Br(t){return t.action==="finding_resolved"||t.action==="status_changed"&&t.data.reason==="finding_resolved"}function zm(t){const e=E.c(32),{items:s,memberByUserId:l,className:i}=t,a=J(),[o,r]=Z.useState(!1);let c;e[0]!==l||e[1]!==a?(c=p=>Br(p)?a("taskBoard.taskDialog.createdBySystemLabel"):Sr(p.actorId)?a("taskBoard.taskDialog.superAgentLabel"):l.get(p.actorId)?.user?.name??a("taskBoard.taskDialog.someoneLabel"),e[0]=l,e[1]=a,e[2]=c):c=e[2];const d=c;let u;e[3]!==l?(u=p=>{const N=p.actorId;if(Br(p))return n.jsx("span",{className:"z-10 flex size-4 shrink-0 items-center justify-center bg-background",children:n.jsx(_t,{size:14,className:"text-muted-foreground"})});if(Sr(N))return n.jsx("span",{className:"z-10 flex size-4 shrink-0 items-center justify-center bg-background",children:n.jsx(mt,{size:16})});const y=l.get(N);return n.jsx("span",{className:"z-10 shrink-0 rounded-full bg-background",children:n.jsx(ft,{url:y?.user?.image??void 0,fallback:y?.user?.name??"?",shape:"circle",size:"2xs"})})},e[3]=l,e[4]=u):u=e[4];const f=u,m=s.length>yr&&!o;let g;e[5]!==m||e[6]!==s?(g=m?s.slice(0,vr):s,e[5]=m,e[6]=s,e[7]=g):g=e[7];const h=g;let j;e[8]!==i?(j=P("relative flex flex-col gap-4",i),e[8]=i,e[9]=j):j=e[9];let x;e[10]!==h.length?(x=h.length>1&&n.jsx("span",{"aria-hidden":!0,className:"absolute bottom-5 left-2 top-5 w-px bg-border"}),e[10]=h.length,e[11]=x):x=e[11];let k;if(e[12]!==f||e[13]!==d||e[14]!==l||e[15]!==a||e[16]!==h){let p;e[18]!==f||e[19]!==d||e[20]!==l||e[21]!==a?(p=N=>n.jsxs("div",{className:"relative flex items-center gap-2.5",children:[f(N),n.jsxs("span",{className:"min-w-0 truncate text-xs text-muted-foreground",children:[d(N)," ",Am(N,a,l),n.jsxs("span",{className:"text-muted-foreground/60",children:[" ยท ",Tl(new Date(N.occurredAt))]})]})]},N.id),e[18]=f,e[19]=d,e[20]=l,e[21]=a,e[22]=p):p=e[22],k=h.map(p),e[12]=f,e[13]=d,e[14]=l,e[15]=a,e[16]=h,e[17]=k}else k=e[17];let b;e[23]!==o||e[24]!==s.length||e[25]!==a?(b=s.length>yr&&n.jsxs("button",{type:"button",onClick:()=>r($m),className:"relative flex items-center gap-2.5 text-left",children:[n.jsx("span",{className:"z-10 flex size-4 shrink-0 items-center justify-center rounded-full bg-background text-muted-foreground/60",children:n.jsx(Js,{size:14})}),n.jsx("span",{className:"text-xs text-muted-foreground/60 hover:text-foreground",children:o?a("taskBoard.taskDialog.timelineFoldLess"):a("taskBoard.taskDialog.timelineFoldMore",{count:String(s.length-vr)})})]}),e[23]=o,e[24]=s.length,e[25]=a,e[26]=b):b=e[26];let v;return e[27]!==j||e[28]!==x||e[29]!==k||e[30]!==b?(v=n.jsxs("div",{className:j,children:[x,k,b]}),e[27]=j,e[28]=x,e[29]=k,e[30]=b,e[31]=v):v=e[31],v}function $m(t){return!t}function Rm(t){const e=E.c(59),{item:s,orgSlug:l,onRerun:i}=t,a=J(),{data:o}=No(s.id),{data:r}=oo();let c;e[0]!==o?(c=o??[],e[0]=o,e[1]=c):c=e[1];let d;e[2]!==c?(d=X1(c),e[2]=c,e[3]=d):d=e[3];const u=d;if(!u)return null;const f=u.code===ur.githubNotAuthenticated,m=u.code===ur.githubConnectionMissing;let g,h,j,x,k,b,v,p,N,y;if(e[4]!==m||e[5]!==u.message||e[6]!==s||e[7]!==f||e[8]!==l||e[9]!==r||e[10]!==a){h=Z1({orgSlug:l,repo:s.repo,repositories:r??[],returnTo:ao(l,s)}),g=Zd,y="destructive",j="mt-2 flex-col",p="flex items-start gap-3",e[21]===Symbol.for("react.memo_cache_sentinel")?(N=n.jsx(rs,{}),e[21]=N):N=e[21],x="flex flex-col gap-1";let _;e[22]!==a?(_=a("taskBoard.taskDialog.runFailedTitle"),e[22]=a,e[23]=_):_=e[23],e[24]!==_?(k=n.jsx(Jd,{children:_}),e[24]=_,e[25]=k):k=e[25];let A;e[26]!==m||e[27]!==u.message||e[28]!==f||e[29]!==a?(A=m?a("taskBoard.taskDialog.runFailedGithubMissing"):f?a("taskBoard.taskDialog.runFailedGithubAuth"):u.message,e[26]=m,e[27]=u.message,e[28]=f,e[29]=a,e[30]=A):A=e[30],e[31]!==A?(b=n.jsx(cr,{children:A}),e[31]=A,e[32]=b):b=e[32],v=f&&h.ownerOnly&&h.owner&&n.jsx(cr,{children:a("taskBoard.taskDialog.runFailedGithubOwnerOnly",{owner:h.owner})}),e[4]=m,e[5]=u.message,e[6]=s,e[7]=f,e[8]=l,e[9]=r,e[10]=a,e[11]=g,e[12]=h,e[13]=j,e[14]=x,e[15]=k,e[16]=b,e[17]=v,e[18]=p,e[19]=N,e[20]=y}else g=e[11],h=e[12],j=e[13],x=e[14],k=e[15],b=e[16],v=e[17],p=e[18],N=e[19],y=e[20];let B;e[33]!==x||e[34]!==k||e[35]!==b||e[36]!==v?(B=n.jsxs("div",{className:x,children:[k,b,v]}),e[33]=x,e[34]=k,e[35]=b,e[36]=v,e[37]=B):B=e[37];let C;e[38]!==B||e[39]!==p||e[40]!==N?(C=n.jsxs("div",{className:p,children:[N,B]}),e[38]=B,e[39]=p,e[40]=N,e[41]=C):C=e[41];let w;e[42]!==m||e[43]!==f||e[44]!==h||e[45]!==a?(w=(f||m)&&n.jsx(ce,{size:"sm",asChild:!0,children:n.jsx("a",{href:h.url,children:a(m?"taskBoard.taskDialog.runFailedLinkRepo":"taskBoard.taskDialog.runFailedReconnect")})}),e[42]=m,e[43]=f,e[44]=h,e[45]=a,e[46]=w):w=e[46];let D;e[47]!==i||e[48]!==a?(D=i&&n.jsxs(ce,{size:"sm",variant:"outline",onClick:i,children:[n.jsx(_l,{size:14}),a("taskBoard.taskBoard.rerun")]}),e[47]=i,e[48]=a,e[49]=D):D=e[49];let S;e[50]!==w||e[51]!==D?(S=n.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2 self-start",children:[w,D]}),e[50]=w,e[51]=D,e[52]=S):S=e[52];let T;return e[53]!==g||e[54]!==j||e[55]!==C||e[56]!==S||e[57]!==y?(T=n.jsxs(g,{variant:y,className:j,children:[C,S]}),e[53]=g,e[54]=j,e[55]=C,e[56]=S,e[57]=y,e[58]=T):T=e[58],T}const Em=new Set(["completed","failed","expired"]);function Om(t){return t.threads.some(e=>e.status!==null&&!Em.has(e.status))}function Lm(t){const e=E.c(43),{items:s,pending:l,onOpenChange:i,onConfirm:a}=t,o=J(),r=s.length;let c;e[0]!==s?(c=s.some(Om),e[0]=s,e[1]=c):c=e[1];const d=c,u=r>0;let f;e[2]!==r||e[3]!==o?(f=r>1?o("taskBoard.rerun.titleMany",{count:r}):o("taskBoard.rerun.title"),e[2]=r,e[3]=o,e[4]=f):f=e[4];let m;e[5]!==f?(m=n.jsx(al,{children:f}),e[5]=f,e[6]=m):m=e[6];let g;e[7]!==r||e[8]!==o||e[9]!==d?(g=r>1?o("taskBoard.rerun.descriptionMany",{count:r}):o(d?"taskBoard.rerun.descriptionTakeover":"taskBoard.rerun.description"),e[7]=r,e[8]=o,e[9]=d,e[10]=g):g=e[10];let h;e[11]!==g?(h=n.jsx(yl,{children:g}),e[11]=g,e[12]=h):h=e[12];let j;e[13]!==m||e[14]!==h?(j=n.jsxs(kl,{children:[m,h]}),e[13]=m,e[14]=h,e[15]=j):j=e[15];let x;e[16]!==i?(x=()=>i(!1),e[16]=i,e[17]=x):x=e[17];let k;e[18]!==o?(k=o("taskBoard.rerun.cancel"),e[18]=o,e[19]=k):k=e[19];let b;e[20]!==l||e[21]!==x||e[22]!==k?(b=n.jsx(ce,{variant:"outline",onClick:x,disabled:l,children:k}),e[20]=l,e[21]=x,e[22]=k,e[23]=b):b=e[23];let v;e[24]!==l?(v=l&&n.jsx(bt,{className:"size-4"}),e[24]=l,e[25]=v):v=e[25];let p;e[26]!==o?(p=o("taskBoard.rerun.confirm"),e[26]=o,e[27]=p):p=e[27];let N;e[28]!==a||e[29]!==l||e[30]!==v||e[31]!==p?(N=n.jsxs(ce,{onClick:a,disabled:l,children:[v,p]}),e[28]=a,e[29]=l,e[30]=v,e[31]=p,e[32]=N):N=e[32];let y;e[33]!==b||e[34]!==N?(y=n.jsxs(bi,{children:[b,N]}),e[33]=b,e[34]=N,e[35]=y):y=e[35];let B;e[36]!==y||e[37]!==j?(B=n.jsxs(nl,{className:"max-w-md",children:[j,y]}),e[36]=y,e[37]=j,e[38]=B):B=e[38];let C;return e[39]!==i||e[40]!==B||e[41]!==u?(C=n.jsx(sl,{open:u,onOpenChange:i,children:B}),e[39]=i,e[40]=B,e[41]=u,e[42]=C):C=e[42],C}const Cr=380,Fm=90,wr=5,Pm="cubic-bezier(0.22, 0.61, 0.36, 1)";function Mm(t,e,s,l=!0){const i=Z.useRef(new Map),a=Z.useRef(new Map),o=Z.useRef(!1);Z.useLayoutEffect(()=>{const r=t.current;if(!r)return;if(!l){o.current=!0;return}const c=o.current;o.current=!1;const d=r.querySelectorAll("[data-flip-id]"),u=new Map,f=i.current;i.current=u;const m=typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches,g=[];for(const p of d){const N=p.dataset.flipId;if(!N)continue;const y=p.getBoundingClientRect(),B=p.dataset.flipLane;if(u.set(N,{rect:y,lane:B}),!s||c)continue;const C=f.get(N);if(!C)continue;const w=C.rect.left-y.left,D=C.rect.top-y.top;(w||D)&&g.push({el:p,dx:w,dy:D,lane:C.lane!==B})}if(!s||m||g.length===0)return;const h=a.current,j=p=>{p instanceof HTMLElement&&(h.set(p,(h.get(p)??0)+1),p.style.overflow="visible")},x=p=>{if(!(p instanceof HTMLElement))return;const N=(h.get(p)??1)-1;if(N>0){h.set(p,N);return}h.delete(p),p.style.overflow=""};for(const p of g){const N=p.lane?` rotate(${p.dx>0?wr:-wr}deg)`:"";p.el.style.transition="none",p.el.style.transform=`translate(${p.dx}px, ${p.dy}px)${N}`,p.lane&&(p.el.style.zIndex="10",j(p.el.closest("[data-lane-scroll]")))}let k=0;const b=[],v=requestAnimationFrame(()=>{for(const p of g){const N=p.lane?k++*Fm:0;p.el.style.transition=`transform ${Cr}ms ${Pm} ${N}ms`,p.el.style.transform="",b.push(window.setTimeout(()=>{p.el.style.transition="",p.el.style.transform="",p.el.style.zIndex="",p.lane&&x(p.el.closest("[data-lane-scroll]"))},Cr+N+30))}});return()=>{cancelAnimationFrame(v);for(const p of b)clearTimeout(p);for(const p of g)p.el.style.transition="",p.el.style.transform="",p.el.style.zIndex="",p.lane&&x(p.el.closest("[data-lane-scroll]"))}},[e,t,s,l])}function Km(t,e=[]){const s=[[`# Task: ${t.title}`,t.description?.trim()].filter(Boolean).join(`

`)];if(e.length>0){const l=e.map(i=>{const a=i.merged?"merged":i.state??(i.draft?"draft":"open"),o=i.title?.trim()||`${i.repoOwner}/${i.repoName}`;return`- #${i.number} ${o} [${a}] ${i.url}`});s.push(["## Linked pull requests",...l].join(`
`))}if(t.threads.length>0){const l=t.threads.map(i=>{const a=i.title?.trim()||"Untitled chat";return i.status?`- ${a} [${i.status}]`:`- ${a}`});s.push(["## Other chats on this task",...l].join(`
`))}return s.join(`

`)}const Um=["sprint","assignee","priority","due","tags","project"];function Oo(t,e){return Um.filter(s=>{switch(s){case"assignee":return t.assignee!==null;case"priority":return t.priority!==null;case"due":return t.due!==null;case"tags":return t.tags.length>0;case"project":return vu(t.project,e);case"sprint":return t.sprint!==null;default:return s}})}function qm(t,e){switch(e){case"assignee":return{...t,assignee:null};case"priority":return{...t,priority:null};case"due":return{...t,due:null};case"tags":return{...t,tags:[]};case"project":return{...t,project:null};case"sprint":return{...t,sprint:null};default:return e}}const Lo=["status","assignee","priority","tags","project"];function Dr(t){return Lo.includes(t)}const Gm=["customer_approval","qa","in_review","ready_for_deployment","in_progress","todo","triage","post_deploy_validation","done","archived"],hi="__no_tag__";function Vm(t,e){return t===null?[]:e===null||e===t?[t]:[t,e]}function Fo(t,e,s,l=""){const[i,...a]=e;if(i===void 0)return[];const{keysOf:o,order:r,last:c}=Hm(i,s),d=new Map;for(const m of t)for(const g of o(m)){const h=d.get(g);h?h.push(m):d.set(g,[m])}const u=[...d.keys()],f=m=>{if(m===c)return Number.MAX_SAFE_INTEGER;const g=r.indexOf(m);return g!==-1?g:r.length+u.indexOf(m)};return u.sort((m,g)=>f(m)-f(g)).map(m=>{const g=d.get(m)??[],h=`${l}/${i}:${m}`;return{groupBy:i,key:m,path:h,items:g,collapsedByDefault:i==="status"&&Xr.includes(m),children:a.length>0?Fo(g,a,s,h):null}})}function Hm(t,e){switch(t){case"status":return{keysOf:s=>[s.status],order:Gm};case"priority":return{keysOf:s=>[s.priority],order:[..._s].reverse()};case"assignee":return{keysOf:s=>[s.assigneeId??Gs],order:[Ie,...e.memberIds],last:Gs};case"tags":return{keysOf:s=>s.tags.length>0?s.tags.map(l=>l.id):[hi],order:e.tagIds,last:hi};case"project":return{keysOf:s=>[Ei(s,e.index)?.id??nn],order:e.index.options.map(s=>s.id),last:nn};default:return t}}function Po(t,e){return e.get(t.path)??!t.collapsedByDefault}function Ym(t,e,s,l){const i=new Map(t),a=!Po(e,t);for(const o of l?s:[e])i.set(o.path,a);return i}const Mo=["assignee","due","tags","project","priority"];function Wm(t){return Mo.includes(t)}function Yi(t){return t==="priority"?"desc":"asc"}function Qm(t,e,s,l){const i=Zm(e,l),a=s==="asc"?1:-1;return t.map(o=>({item:o,key:i(o)})).sort((o,r)=>o.key===null||r.key===null?o.key===r.key?0:o.key===null?1:-1:a*Xm(o.key,r.key)).map(({item:o})=>o)}function Xm(t,e){return typeof t=="number"&&typeof e=="number"?t-e:String(t).localeCompare(String(e),void 0,{sensitivity:"base"})}function Zm(t,e){switch(t){case"assignee":return s=>s.assigneeId?s.assigneeId===Ie?e.superAgentName:e.memberNames.get(s.assigneeId)??s.assigneeId:null;case"due":return s=>s.dueDate?Date.parse(s.dueDate):null;case"tags":return s=>s.tags.length>0?s.tags.map(l=>l.name).sort((l,i)=>l.localeCompare(i))[0]:null;case"project":return s=>Ei(s,e.index)?.title??null;case"priority":return s=>s.priority==="none"?null:_s.indexOf(s.priority);default:return t}}function Ko(t){const e=E.c(4),{priority:s}=t,l=et[s];let i;e[0]!==l.dotClassName?(i=P("size-2 shrink-0 rounded-full",l.dotClassName),e[0]=l.dotClassName,e[1]=i):i=e[1];let a;return e[2]!==i?(a=n.jsx("span",{className:i}),e[2]=i,e[3]=a):a=e[3],a}function Uo(t){const e=E.c(4),{color:s}=t;let l;e[0]!==s?(l=rn(s),e[0]=s,e[1]=l):l=e[1];let i;return e[2]!==l?(i=n.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:l}}),e[2]=l,e[3]=i):i=e[3],i}function ri(t,e){return[...t].sort((s,l)=>e(s).localeCompare(e(l),void 0,{sensitivity:"base"}))}function qo(t){const e=E.c(116),{members:s,tags:l,sprints:i,index:a,onManageSprints:o}=t,r=J();let c;e[0]!==s?(c=X=>s.find(be=>be.userId===X),e[0]=s,e[1]=c):c=e[1];const d=c;let u;e[2]!==d||e[3]!==r?(u=X=>d(X)?.user?.name??r("taskBoard.taskFilters.assigneeMember"),e[2]=d,e[3]=r,e[4]=u):u=e[4];const f=u;let m;e[5]!==r?(m=r("taskBoard.taskFilters.assigneeLabel"),e[5]=r,e[6]=m):m=e[6];let g;e[7]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(Qs,{size:14,className:"shrink-0"}),e[7]=g):g=e[7];let h;e[8]!==r?(h=r("taskBoard.taskFilters.assigneeUnassigned"),e[8]=r,e[9]=h):h=e[9];let j;e[10]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx(Qs,{size:14,className:"shrink-0 text-muted-foreground"}),e[10]=j):j=e[10];let x;e[11]!==h?(x={id:Gs,label:h,glyph:j,apply:h2,isSelected:g2},e[11]=h,e[12]=x):x=e[12];let k;e[13]!==r?(k=r("taskBoard.taskFilters.assigneeSuperAgent"),e[13]=r,e[14]=k):k=e[14];let b;e[15]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx(mt,{size:14}),e[15]=b):b=e[15];let v;e[16]!==k?(v={id:Ie,label:k,glyph:b,apply:p2,isSelected:m2},e[16]=k,e[17]=v):v=e[17];let p;e[18]!==s||e[19]!==v||e[20]!==x?(p=[x,v,...ri(s,f2).map(u2)],e[18]=s,e[19]=v,e[20]=x,e[21]=p):p=e[21];let N;e[22]!==f||e[23]!==r?(N=X=>X.assignee===Gs?r("taskBoard.taskFilters.assigneeUnassigned"):X.assignee===Ie?r("taskBoard.taskFilters.assigneeSuperAgent"):X.assignee?f(X.assignee):"",e[22]=f,e[23]=r,e[24]=N):N=e[24];let y;e[25]!==d?(y=X=>{if(X.assignee===Ie)return n.jsx(mt,{size:14});const be=X.assignee?d(X.assignee):void 0;return be?n.jsx(ft,{url:be.user?.image??void 0,fallback:be.user?.name??"?",shape:"circle",size:"2xs"}):n.jsx(Qs,{size:14,className:"shrink-0"})},e[25]=d,e[26]=y):y=e[26];let B;e[27]!==p||e[28]!==N||e[29]!==y||e[30]!==m?(B={id:"assignee",label:m,icon:g,options:p,valueLabel:N,valueGlyph:y},e[27]=p,e[28]=N,e[29]=y,e[30]=m,e[31]=B):B=e[31];const C=B;let w;e[32]!==r?(w=r("taskBoard.taskFilters.priorityLabel"),e[32]=r,e[33]=w):w=e[33];let D;e[34]===Symbol.for("react.memo_cache_sentinel")?(D=n.jsx(Gr,{size:14,className:"shrink-0"}),e[34]=D):D=e[34];let S;e[35]!==r?(S=_s.map(X=>({id:X,label:r(et[X].labelKey),glyph:n.jsx(Ko,{priority:X}),apply:be=>({...be,priority:X}),isSelected:be=>be.priority===X})),e[35]=r,e[36]=S):S=e[36];let T;e[37]!==r?(T=X=>X.priority?r(et[X.priority].labelKey):"",e[37]=r,e[38]=T):T=e[38];let _;e[39]!==w||e[40]!==S||e[41]!==T?(_={id:"priority",label:w,icon:D,options:S,valueLabel:T,valueGlyph:d2},e[39]=w,e[40]=S,e[41]=T,e[42]=_):_=e[42];const A=_;let I;e[43]!==r?(I=r("taskBoard.taskFilters.dueDateLabel"),e[43]=r,e[44]=I):I=e[44];let $;e[45]===Symbol.for("react.memo_cache_sentinel")?($=n.jsx(en,{size:14,className:"shrink-0"}),e[45]=$):$=e[45];let O;e[46]!==r?(O=Wd.map(X=>({id:X,label:r(or(X)),glyph:n.jsx(en,{size:14,className:P("shrink-0",X==="overdue"?"text-destructive":"text-muted-foreground")}),apply:be=>({...be,due:X}),isSelected:be=>be.due===X})),e[46]=r,e[47]=O):O=e[47];let R;e[48]!==r?(R=X=>X.due?r(or(X.due)):"",e[48]=r,e[49]=R):R=e[49];let L;e[50]!==I||e[51]!==O||e[52]!==R?(L={id:"due",label:I,icon:$,options:O,valueLabel:R,valueGlyph:c2},e[50]=I,e[51]=O,e[52]=R,e[53]=L):L=e[53];const U=L;let V;e[54]!==r?(V=r("taskBoard.taskFilters.tagsLabel"),e[54]=r,e[55]=V):V=e[55];let K;e[56]===Symbol.for("react.memo_cache_sentinel")?(K=n.jsx(Nl,{size:14,className:"shrink-0"}),e[56]=K):K=e[56];let Q;e[57]!==l?(Q=ri(l,o2).map(r2),e[57]=l,e[58]=Q):Q=e[58];let H;e[59]!==r||e[60]!==l?(H=X=>X.tags.length===1?l.find(be=>be.id===X.tags[0])?.name??r("taskBoard.taskFilters.tagsLabel"):r("taskBoard.taskFilters.tagsSelectedCount",{count:X.tags.length}),e[59]=r,e[60]=l,e[61]=H):H=e[61];let ee;e[62]!==l?(ee=X=>X.tags.length===1?n.jsx(Uo,{color:l.find(be=>be.id===X.tags[0])?.color}):n.jsx(Nl,{size:14,className:"shrink-0"}),e[62]=l,e[63]=ee):ee=e[63];let G;e[64]!==V||e[65]!==Q||e[66]!==H||e[67]!==ee?(G={id:"tags",label:V,icon:K,multi:!0,options:Q,valueLabel:H,valueGlyph:ee},e[64]=V,e[65]=Q,e[66]=H,e[67]=ee,e[68]=G):G=e[68];const se=G;let re;e[69]!==r?(re=r("taskBoard.taskFilters.projectLabel"),e[69]=r,e[70]=re):re=e[70];let le;e[71]===Symbol.for("react.memo_cache_sentinel")?(le=n.jsx(ls,{entry:void 0}),e[71]=le):le=e[71];let F;e[72]!==r?(F=r("taskBoard.taskFilters.projectNone"),e[72]=r,e[73]=F):F=e[73];let q;e[74]===Symbol.for("react.memo_cache_sentinel")?(q=n.jsx(ls,{entry:void 0}),e[74]=q):q=e[74];let oe;e[75]!==F?(oe={id:nn,label:F,glyph:q,apply:i2,isSelected:l2},e[75]=F,e[76]=oe):oe=e[76];let ne;e[77]!==a.options||e[78]!==oe?(ne=[oe,...ri(a.options,a2).map(n2)],e[77]=a.options,e[78]=oe,e[79]=ne):ne=e[79];let fe;e[80]!==a||e[81]!==r?(fe=X=>X.project===nn?r("taskBoard.taskFilters.projectNone"):X.project?sn(X.project,a)?.title??X.project:"",e[80]=a,e[81]=r,e[82]=fe):fe=e[82];let ve;e[83]!==a?(ve=X=>n.jsx(ls,{entry:X.project?sn(X.project,a):void 0}),e[83]=a,e[84]=ve):ve=e[84];let De;e[85]!==re||e[86]!==ne||e[87]!==fe||e[88]!==ve?(De={id:"project",label:re,icon:le,options:ne,valueLabel:fe,valueGlyph:ve},e[85]=re,e[86]=ne,e[87]=fe,e[88]=ve,e[89]=De):De=e[89];const de=De;let pe;e[90]!==i?(pe=new Map(i.map(s2)),e[90]=i,e[91]=pe):pe=e[91];const ye=pe;let ke;e[92]!==r?(ke=r("taskBoard.sprints.label"),e[92]=r,e[93]=ke):ke=e[93];let ie;e[94]===Symbol.for("react.memo_cache_sentinel")?(ie=n.jsx(Ts,{size:14,className:"shrink-0"}),e[94]=ie):ie=e[94];let Ce;e[95]!==i||e[96]!==r?(Ce=i.length===0?[]:[{id:il,label:r("taskBoard.sprints.backlog"),glyph:n.jsx(Il,{size:14,className:"shrink-0 text-muted-foreground"}),apply:t2,isSelected:e2},...i.map(X=>({id:X.id,label:Cl(X,r),glyph:n.jsx(Ts,{size:14,className:P("shrink-0",X.state==="active"?"text-foreground":"text-muted-foreground")}),apply:be=>({...be,sprint:X.id}),isSelected:be=>be.sprint===X.id}))],e[95]=i,e[96]=r,e[97]=Ce):Ce=e[97];let ae;e[98]!==ye||e[99]!==r?(ae=X=>X.sprint===il?r("taskBoard.sprints.backlog"):X.sprint?ye.get(X.sprint)?.name??"":"",e[98]=ye,e[99]=r,e[100]=ae):ae=e[100];let ge;e[101]!==o||e[102]!==r?(ge=o&&{label:r("taskBoard.sprints.manageItem"),onSelect:o},e[101]=o,e[102]=r,e[103]=ge):ge=e[103];let xe;e[104]!==ke||e[105]!==Ce||e[106]!==ae||e[107]!==ge?(xe={id:"sprint",label:ke,icon:ie,options:Ce,valueLabel:ae,valueGlyph:Jm,action:ge},e[104]=ke,e[105]=Ce,e[106]=ae,e[107]=ge,e[108]=xe):xe=e[108];const me=xe;let Ae;return e[109]!==C||e[110]!==U||e[111]!==A||e[112]!==de||e[113]!==me||e[114]!==se?(Ae=[me,C,A,U,se,de],e[109]=C,e[110]=U,e[111]=A,e[112]=de,e[113]=me,e[114]=se,e[115]=Ae):Ae=e[115],Ae}function Jm(t){return t.sprint===il?n.jsx(Il,{size:14,className:"shrink-0"}):n.jsx(Ts,{size:14,className:"shrink-0"})}function e2(t){return t.sprint===il}function t2(t){return{...t,sprint:il}}function s2(t){return[t.id,t]}function n2(t){return{id:t.id,label:t.title,glyph:n.jsx(ls,{entry:t}),apply:e=>({...e,project:t.id}),isSelected:e=>e.project===t.id}}function a2(t){return t.title}function l2(t){return t.project===nn}function i2(t){return{...t,project:nn}}function r2(t){return{id:t.id,label:t.name,glyph:n.jsx(Uo,{color:t.color}),apply:e=>({...e,tags:e.tags.includes(t.id)?e.tags.filter(s=>s!==t.id):[...e.tags,t.id]}),isSelected:e=>e.tags.includes(t.id)}}function o2(t){return t.name}function c2(){return n.jsx(en,{size:14,className:"shrink-0"})}function d2(t){return t.priority?n.jsx(Ko,{priority:t.priority}):null}function u2(t){return{id:t.userId,label:t.user?.name??t.userId,glyph:n.jsx(ft,{url:t.user?.image??void 0,fallback:t.user?.name??"?",shape:"circle",size:"2xs"}),apply:e=>({...e,assignee:t.userId}),isSelected:e=>e.assignee===t.userId}}function f2(t){return t.user?.name??t.userId}function m2(t){return t.assignee===Ie}function p2(t){return{...t,assignee:Ie}}function g2(t){return t.assignee===Gs}function h2(t){return{...t,assignee:Gs}}function Wi(t){const e=E.c(5),{count:s}=t,l=J();let i;e[0]!==s||e[1]!==l?(i=l("taskBoard.viewControls.matchCount",{count:s}),e[0]=s,e[1]=l,e[2]=i):i=e[2];let a;return e[3]!==i?(a=n.jsx("span",{className:"ml-auto shrink-0 text-xs text-muted-foreground",children:i}),e[3]=i,e[4]=a):a=e[4],a}function Vs(t){const e=E.c(2),{children:s}=t;let l;return e[0]!==s?(l=n.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center",children:s}),e[0]=s,e[1]=l):l=e[1],l}function x2(t){const e=E.c(27),{field:s,open:l,countFor:i,onSelect:a,onAction:o}=t;let r;e[0]!==s.icon?(r=n.jsx(Vs,{children:s.icon}),e[0]=s.icon,e[1]=r):r=e[1];let c;e[2]!==s.label?(c=n.jsx("span",{className:"truncate",children:s.label}),e[2]=s.label,e[3]=c):c=e[3];let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(Va,{size:12,className:"ml-auto shrink-0 text-muted-foreground/60"}),e[4]=d):d=e[4];let u;e[5]!==s.label||e[6]!==r||e[7]!==c?(u=n.jsx(gd,{asChild:!0,children:n.jsxs(Xs,{value:s.label,children:[r,c,d]})}),e[5]=s.label,e[6]=r,e[7]=c,e[8]=u):u=e[8];let f;if(e[9]!==i||e[10]!==s.options||e[11]!==a){let j;e[13]!==i||e[14]!==a?(j=x=>n.jsx(k2,{option:x,count:i(x),onSelect:()=>a(x)},x.id),e[13]=i,e[14]=a,e[15]=j):j=e[15],f=s.options.map(j),e[9]=i,e[10]=s.options,e[11]=a,e[12]=f}else f=e[12];let m;e[16]!==s.action||e[17]!==s.options.length||e[18]!==o?(m=s.action&&n.jsxs(n.Fragment,{children:[s.options.length>0&&n.jsx(Zs,{className:"my-1"}),n.jsxs("button",{type:"button",className:P(Mi({highlight:"hover"})),onClick:o,children:[n.jsx(Vs,{children:n.jsx(Ur,{size:14,className:"text-muted-foreground"})}),n.jsx("span",{className:"truncate",children:s.action.label})]})]}),e[16]=s.action,e[17]=s.options.length,e[18]=o,e[19]=m):m=e[19];let g;e[20]!==f||e[21]!==m?(g=n.jsxs(as,{side:"right",align:"start",alignOffset:-5,className:"max-h-72 w-64 overflow-y-auto p-1",onOpenAutoFocus:b2,onCloseAutoFocus:j2,children:[f,m]}),e[20]=f,e[21]=m,e[22]=g):g=e[22];let h;return e[23]!==l||e[24]!==u||e[25]!==g?(h=n.jsxs(ns,{open:l,children:[u,g]}),e[23]=l,e[24]=u,e[25]=g,e[26]=h):h=e[26],h}function j2(t){return t.preventDefault()}function b2(t){return t.preventDefault()}function k2(t){const e=E.c(12),{option:s,count:l,onSelect:i}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=P(Mi({highlight:"hover"})),e[0]=a):a=e[0];let o;e[1]!==s.glyph?(o=n.jsx(Vs,{children:s.glyph}),e[1]=s.glyph,e[2]=o):o=e[2];let r;e[3]!==s.label?(r=n.jsx("span",{className:"truncate",children:s.label}),e[3]=s.label,e[4]=r):r=e[4];let c;e[5]!==l?(c=n.jsx(Wi,{count:l}),e[5]=l,e[6]=c):c=e[6];let d;return e[7]!==i||e[8]!==o||e[9]!==r||e[10]!==c?(d=n.jsxs("button",{type:"button",className:a,onClick:i,children:[o,r,c]}),e[7]=i,e[8]=o,e[9]=r,e[10]=c,e[11]=d):d=e[11],d}function y2(t){const e=E.c(19),{field:s,option:l,count:i,onSelect:a}=t,o=`${s.label} ${l.label}`;let r;e[0]!==s.icon?(r=n.jsx(Vs,{children:s.icon}),e[0]=s.icon,e[1]=r):r=e[1];let c;e[2]!==s.label?(c=n.jsx("span",{className:"shrink-0 text-muted-foreground",children:s.label}),e[2]=s.label,e[3]=c):c=e[3];let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(Va,{size:12,className:"shrink-0 text-muted-foreground/60"}),e[4]=d):d=e[4];let u;e[5]!==l.glyph?(u=n.jsx(Vs,{children:l.glyph}),e[5]=l.glyph,e[6]=u):u=e[6];let f;e[7]!==l.label?(f=n.jsx("span",{className:"truncate",children:l.label}),e[7]=l.label,e[8]=f):f=e[8];let m;e[9]!==i?(m=n.jsx(Wi,{count:i}),e[9]=i,e[10]=m):m=e[10];let g;return e[11]!==a||e[12]!==o||e[13]!==r||e[14]!==c||e[15]!==u||e[16]!==f||e[17]!==m?(g=n.jsxs(Xs,{value:o,onSelect:a,children:[r,c,d,u,f,m]}),e[11]=a,e[12]=o,e[13]=r,e[14]=c,e[15]=u,e[16]=f,e[17]=m,e[18]=g):g=e[18],g}const v2=new Set(["ArrowDown","ArrowUp","ArrowRight"]);function N2(t){const e=E.c(51),{filters:s,items:l,index:i,fields:a,onChange:o,onClose:r}=t,c=J(),[d,u]=Z.useState(""),[f,m]=Z.useState(""),[g,h]=Z.useState(!1);let j;e[0]!==s||e[1]!==o||e[2]!==r?(j=(A,I)=>{o(I.apply(s)),A.multi||r()},e[0]=s,e[1]=o,e[2]=r,e[3]=j):j=e[3];const x=j;let k;e[4]!==s||e[5]!==i||e[6]!==l?(k=A=>l.filter(I=>Ai(I,A.apply(s),i)).length,e[4]=s,e[5]=i,e[6]=l,e[7]=k):k=e[7];const b=k;let v,p,N,y,B,C,w,D,S;if(e[8]!==f||e[9]!==g||e[10]!==b||e[11]!==a||e[12]!==r||e[13]!==d||e[14]!==x||e[15]!==c){const A=a.filter(S2);p=Pi,C=f,w=m,e[25]===Symbol.for("react.memo_cache_sentinel")?(D=R=>{v2.has(R.key)&&h(!0)},e[25]=D):D=e[25];let I;e[26]!==c?(I=c("taskBoard.viewControls.addFilter"),e[26]=c,e[27]=I):I=e[27];let $;e[28]!==c?($=c("taskBoard.viewControls.addFilter"),e[28]=c,e[29]=$):$=e[29],e[30]!==d||e[31]!==I||e[32]!==$?(S=n.jsx(Oi,{size:"sm",value:d,onValueChange:u,placeholder:I,"aria-label":$,className:"h-9"}),e[30]=d,e[31]=I,e[32]=$,e[33]=S):S=e[33],v=Fi,e[34]===Symbol.for("react.memo_cache_sentinel")?(N=()=>h(!0),e[34]=N):N=e[34];let O;e[35]!==c?(O=c("taskBoard.viewControls.noMatches"),e[35]=c,e[36]=O):O=e[36],e[37]!==O?(y=n.jsx(Li,{children:O}),e[37]=O,e[38]=y):y=e[38],B=d.trim()===""?n.jsx(qa,{children:A.map(R=>n.jsx(x2,{field:R,open:g&&f===R.label,countFor:b,onSelect:L=>x(R,L),onAction:()=>{r(),R.action?.onSelect()}},R.id))}):n.jsx(qa,{children:A.flatMap(R=>R.options.map(L=>n.jsx(y2,{field:R,option:L,count:b(L),onSelect:()=>x(R,L)},`${R.id}:${L.id}`)))}),e[8]=f,e[9]=g,e[10]=b,e[11]=a,e[12]=r,e[13]=d,e[14]=x,e[15]=c,e[16]=v,e[17]=p,e[18]=N,e[19]=y,e[20]=B,e[21]=C,e[22]=w,e[23]=D,e[24]=S}else v=e[16],p=e[17],N=e[18],y=e[19],B=e[20],C=e[21],w=e[22],D=e[23],S=e[24];let T;e[39]!==v||e[40]!==N||e[41]!==y||e[42]!==B?(T=n.jsxs(v,{onPointerMove:N,children:[y,B]}),e[39]=v,e[40]=N,e[41]=y,e[42]=B,e[43]=T):T=e[43];let _;return e[44]!==p||e[45]!==T||e[46]!==C||e[47]!==w||e[48]!==D||e[49]!==S?(_=n.jsxs(p,{value:C,onValueChange:w,onKeyDown:D,children:[S,T]}),e[44]=p,e[45]=T,e[46]=C,e[47]=w,e[48]=D,e[49]=S,e[50]=_):_=e[50],_}function S2(t){return t.options.length>0||t.action!==void 0}function Go(t){const e=E.c(14);let s,l;e[0]!==t?({trigger:l,...s}=t,e[0]=t,e[1]=s,e[2]=l):(s=e[1],l=e[2]);const[i,a]=Z.useState(!1);let o;e[3]!==l?(o=n.jsx(ss,{asChild:!0,children:l}),e[3]=l,e[4]=o):o=e[4];let r;e[5]!==s||e[6]!==i?(r=i&&n.jsx(N2,{...s,onClose:()=>a(!1)}),e[5]=s,e[6]=i,e[7]=r):r=e[7];let c;e[8]!==r?(c=n.jsx(as,{align:"end",className:"w-72 p-0",children:r}),e[8]=r,e[9]=c):c=e[9];let d;return e[10]!==i||e[11]!==o||e[12]!==c?(d=n.jsxs(ns,{open:i,onOpenChange:a,children:[o,c]}),e[10]=i,e[11]=o,e[12]=c,e[13]=d):d=e[13],d}function B2(t){const e=E.c(22),{filters:s,items:l,members:i,tags:a,sprints:o,index:r,onChange:c,onManageSprints:d}=t,u=J();let f;e[0]!==r||e[1]!==i||e[2]!==d||e[3]!==o||e[4]!==a?(f={members:i,tags:a,sprints:o,index:r,onManageSprints:d},e[0]=r,e[1]=i,e[2]=d,e[3]=o,e[4]=a,e[5]=f):f=e[5];const m=qo(f);let g;e[6]!==s||e[7]!==r?(g=Oo(s,r),e[6]=s,e[7]=r,e[8]=g):g=e[8];const h=g.length>0;let j;e[9]!==u?(j=u("taskBoard.viewControls.filterLabel"),e[9]=u,e[10]=j):j=e[10];let x;e[11]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(ld,{}),e[11]=x):x=e[11];let k;e[12]!==h||e[13]!==j?(k=n.jsx(Ft,{label:j,tooltipSide:"bottom",variant:"outline","aria-pressed":h,children:x}),e[12]=h,e[13]=j,e[14]=k):k=e[14];let b;return e[15]!==m||e[16]!==s||e[17]!==r||e[18]!==l||e[19]!==c||e[20]!==k?(b=n.jsx(Go,{filters:s,items:l,index:r,fields:m,onChange:c,trigger:k}),e[15]=m,e[16]=s,e[17]=r,e[18]=l,e[19]=c,e[20]=k,e[21]=b):b=e[21],b}function Dl(t){const e=E.c(28),{icon:s,label:l,value:i,options:a,onSelect:o,disabled:r}=t;let c;if(e[0]!==a||e[1]!==i){let b;e[3]!==i?(b=v=>v.value===i,e[3]=i,e[4]=b):b=e[4],c=a.find(b),e[0]=a,e[1]=i,e[2]=c}else c=e[2];const d=c;let u;e[5]!==s?(u=n.jsx(Vs,{children:s}),e[5]=s,e[6]=u):u=e[6];let f;e[7]!==l?(f=n.jsx("span",{className:"truncate",children:l}),e[7]=l,e[8]=f):f=e[8];const m=d?.label;let g;e[9]!==m?(g=n.jsx("span",{className:"ml-auto truncate pl-2 text-xs text-muted-foreground",children:m}),e[9]=m,e[10]=g):g=e[10];let h;e[11]!==r||e[12]!==u||e[13]!==f||e[14]!==g?(h=n.jsxs(Ps,{disabled:r,className:"gap-2 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",children:[u,f,g]}),e[11]=r,e[12]=u,e[13]=f,e[14]=g,e[15]=h):h=e[15];let j;if(e[16]!==o||e[17]!==a||e[18]!==i){let b;e[20]!==o||e[21]!==i?(b=v=>n.jsxs(Se,{className:"gap-2",onSelect:()=>o(v.value),children:[n.jsx(Vs,{children:v.icon}),n.jsx("span",{className:"truncate",children:v.label}),v.value===i&&n.jsx(Us,{size:14,className:"ml-auto shrink-0"})]},String(v.value)),e[20]=o,e[21]=i,e[22]=b):b=e[22],j=a.map(b),e[16]=o,e[17]=a,e[18]=i,e[19]=j}else j=e[19];let x;e[23]!==j?(x=n.jsx(Ms,{className:"w-52",children:j}),e[23]=j,e[24]=x):x=e[24];let k;return e[25]!==h||e[26]!==x?(k=n.jsxs(Ks,{children:[h,x]}),e[25]=h,e[26]=x,e[27]=k):k=e[27],k}const Vo={status:n.jsx(_c,{size:14,className:"shrink-0"}),assignee:n.jsx(Qs,{size:14,className:"shrink-0"}),priority:n.jsx(Gr,{size:14,className:"shrink-0"}),due:n.jsx(en,{size:14,className:"shrink-0"}),tags:n.jsx(Nl,{size:14,className:"shrink-0"}),project:n.jsx(ls,{entry:void 0})};function Ho(t){const e=E.c(34),{groupBy:s,subgroupBy:l,onGroupByChange:i,onSubgroupByChange:a,align:o}=t,r=J();let c;e[0]!==r?(c=r("taskBoard.viewControls.groupByNone"),e[0]=r,e[1]=c):c=e[1];let d;e[2]!==c?(d={value:null,label:c},e[2]=c,e[3]=d):d=e[3];const u=d;let f;e[4]!==r?(f=B=>Lo.filter(C=>C!==B).map(C=>({value:C,label:r(xi[C]),icon:Vo[C]})),e[4]=r,e[5]=f):f=e[5];const m=f;let g;e[6]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(vl,{size:14,className:"shrink-0"}),e[6]=g):g=e[6];let h;e[7]!==r?(h=r("taskBoard.viewControls.groupingLabel"),e[7]=r,e[8]=h):h=e[8];let j;e[9]!==m||e[10]!==u?(j=[u,...m(null)],e[9]=m,e[10]=u,e[11]=j):j=e[11];let x;e[12]!==s||e[13]!==i||e[14]!==h||e[15]!==j?(x=n.jsx(Dl,{icon:g,label:h,value:s,options:j,onSelect:i}),e[12]=s,e[13]=i,e[14]=h,e[15]=j,e[16]=x):x=e[16];let k;e[17]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsx(vl,{size:14,className:"shrink-0"}),e[17]=k):k=e[17];let b;e[18]!==r?(b=r("taskBoard.viewControls.subgroupingLabel"),e[18]=r,e[19]=b):b=e[19];let v;e[20]!==m||e[21]!==s||e[22]!==u?(v=[u,...m(s)],e[20]=m,e[21]=s,e[22]=u,e[23]=v):v=e[23];const p=s===null;let N;e[24]!==a||e[25]!==l||e[26]!==v||e[27]!==p||e[28]!==b?(N=n.jsx(Dl,{icon:k,label:b,value:l,options:v,onSelect:a,disabled:p}),e[24]=a,e[25]=l,e[26]=v,e[27]=p,e[28]=b,e[29]=N):N=e[29];let y;return e[30]!==o||e[31]!==N||e[32]!==x?(y=n.jsxs(Ye,{align:o,className:"w-72",children:[x,N]}),e[30]=o,e[31]=N,e[32]=x,e[33]=y):y=e[33],y}function Yo(t){const e=E.c(45),{sortBy:s,sortDirection:l,onSortByChange:i,onSortDirectionChange:a,align:o}=t,r=J();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(Bi,{size:14,className:"shrink-0"}),e[0]=c):c=e[0];let d;e[1]!==r?(d=r("taskBoard.viewControls.sortingLabel"),e[1]=r,e[2]=d):d=e[2];let u;e[3]!==r?(u=r("taskBoard.viewControls.sortNone"),e[3]=r,e[4]=u):u=e[4];let f;e[5]!==u?(f={value:null,label:u},e[5]=u,e[6]=f):f=e[6];let m;if(e[7]!==r||e[8]!==f){let D;e[10]!==r?(D=S=>({value:S,label:r(Wo[S]),icon:Vo[S]}),e[10]=r,e[11]=D):D=e[11],m=[f,...Mo.map(D)],e[7]=r,e[8]=f,e[9]=m}else m=e[9];let g;e[12]!==i||e[13]!==s||e[14]!==d||e[15]!==m?(g=n.jsx(Dl,{icon:c,label:d,value:s,options:m,onSelect:i}),e[12]=i,e[13]=s,e[14]=d,e[15]=m,e[16]=g):g=e[16];let h;e[17]!==l?(h=l==="asc"?n.jsx(ui,{size:14,className:"shrink-0"}):n.jsx(fi,{size:14,className:"shrink-0"}),e[17]=l,e[18]=h):h=e[18];let j;e[19]!==r?(j=r("taskBoard.viewControls.sortDirectionLabel"),e[19]=r,e[20]=j):j=e[20];let x;e[21]!==r?(x=r("taskBoard.viewControls.sortAscending"),e[21]=r,e[22]=x):x=e[22];let k;e[23]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsx(ui,{size:14,className:"shrink-0"}),e[23]=k):k=e[23];let b;e[24]!==x?(b={value:"asc",label:x,icon:k},e[24]=x,e[25]=b):b=e[25];let v;e[26]!==r?(v=r("taskBoard.viewControls.sortDescending"),e[26]=r,e[27]=v):v=e[27];let p;e[28]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx(fi,{size:14,className:"shrink-0"}),e[28]=p):p=e[28];let N;e[29]!==v?(N={value:"desc",label:v,icon:p},e[29]=v,e[30]=N):N=e[30];let y;e[31]!==b||e[32]!==N?(y=[b,N],e[31]=b,e[32]=N,e[33]=y):y=e[33];const B=s===null;let C;e[34]!==a||e[35]!==l||e[36]!==y||e[37]!==B||e[38]!==h||e[39]!==j?(C=n.jsx(Dl,{icon:h,label:j,value:l,options:y,onSelect:a,disabled:B}),e[34]=a,e[35]=l,e[36]=y,e[37]=B,e[38]=h,e[39]=j,e[40]=C):C=e[40];let w;return e[41]!==o||e[42]!==C||e[43]!==g?(w=n.jsxs(Ye,{align:o,className:"w-72",children:[g,C]}),e[41]=o,e[42]=C,e[43]=g,e[44]=w):w=e[44],w}function C2(t){const e=E.c(11),s=J();let l;e[0]!==s?(l=s("taskBoard.viewControls.groupByLabel"),e[0]=s,e[1]=l):l=e[1];const i=t.groupBy!==null;let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(vl,{}),e[2]=a):a=e[2];let o;e[3]!==l||e[4]!==i?(o=n.jsx(Me,{asChild:!0,children:n.jsx(Ft,{label:l,tooltipSide:"bottom",variant:"outline","aria-pressed":i,children:a})}),e[3]=l,e[4]=i,e[5]=o):o=e[5];let r;e[6]!==t?(r=n.jsx(Ho,{...t,align:"end"}),e[6]=t,e[7]=r):r=e[7];let c;return e[8]!==o||e[9]!==r?(c=n.jsxs(Ke,{children:[o,r]}),e[8]=o,e[9]=r,e[10]=c):c=e[10],c}function w2(t){const e=E.c(11),s=J();let l;e[0]!==s?(l=s("taskBoard.viewControls.sortLabel"),e[0]=s,e[1]=l):l=e[1];const i=t.sortBy!==null;let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(Bi,{}),e[2]=a):a=e[2];let o;e[3]!==l||e[4]!==i?(o=n.jsx(Me,{asChild:!0,children:n.jsx(Ft,{label:l,tooltipSide:"bottom",variant:"outline","aria-pressed":i,children:a})}),e[3]=l,e[4]=i,e[5]=o):o=e[5];let r;e[6]!==t?(r=n.jsx(Yo,{...t,align:"end"}),e[6]=t,e[7]=r):r=e[7];let c;return e[8]!==o||e[9]!==r?(c=n.jsxs(Ke,{children:[o,r]}),e[8]=o,e[9]=r,e[10]=c):c=e[10],c}const xi={status:"taskBoard.viewControls.groupByStatus",assignee:"taskBoard.taskFilters.assigneeLabel",priority:"taskBoard.taskFilters.priorityLabel",tags:"taskBoard.taskFilters.tagsLabel",project:"taskBoard.taskFilters.projectLabel"},Wo={assignee:"taskBoard.taskFilters.assigneeLabel",due:"taskBoard.taskFilters.dueDateLabel",tags:"taskBoard.taskFilters.tagsLabel",project:"taskBoard.taskFilters.projectLabel",priority:"taskBoard.taskFilters.priorityLabel"};function Tr(t){const e=E.c(18),{icon:s,label:l,value:i,menu:a,extra:o,removeLabel:r,onRemove:c}=t;let d;e[0]!==s||e[1]!==l?(d=n.jsxs("span",{className:"flex h-full items-center gap-1.5 px-2.5 text-foreground",children:[s,l]}),e[0]=s,e[1]=l,e[2]=d):d=e[2];let u;e[3]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(Zs,{orientation:"vertical"}),e[3]=u):u=e[3];let f;e[4]!==i?(f=n.jsx(Me,{asChild:!0,children:n.jsx("button",{type:"button",className:"flex h-full max-w-[16rem] items-center gap-1.5 truncate px-2.5 text-foreground hover:bg-accent",children:i})}),e[4]=i,e[5]=f):f=e[5];let m;e[6]!==a||e[7]!==f?(m=n.jsxs(Ke,{children:[f,a]}),e[6]=a,e[7]=f,e[8]=m):m=e[8];let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(ll,{}),e[9]=g):g=e[9];let h;e[10]!==c||e[11]!==r?(h=n.jsx(Ft,{label:r,size:"icon-sm",onClick:c,children:g}),e[10]=c,e[11]=r,e[12]=h):h=e[12];let j;return e[13]!==o||e[14]!==d||e[15]!==m||e[16]!==h?(j=n.jsxs(Ua,{variant:"outline",size:"segmented",children:[d,u,m,o,h]}),e[13]=o,e[14]=d,e[15]=m,e[16]=h,e[17]=j):j=e[17],j}function D2(t){const e=E.c(14),{grouping:s,sorting:l}=t,i=J(),{groupBy:a,subgroupBy:o}=s,{sortBy:r,sortDirection:c}=l,d=c==="asc"?ui:fi;let u;e[0]!==a||e[1]!==s||e[2]!==o||e[3]!==i?(u=a!==null&&n.jsx(Tr,{icon:n.jsx(vl,{size:14,className:"shrink-0"}),label:i("taskBoard.viewControls.groupedBy"),value:n.jsxs(n.Fragment,{children:[i(xi[a]),o!==null&&n.jsxs(n.Fragment,{children:[n.jsx(Va,{size:12,className:"shrink-0 text-muted-foreground"}),i(xi[o])]})]}),menu:n.jsx(Ho,{...s,align:"start"}),removeLabel:i("taskBoard.viewControls.removeGrouping"),onRemove:()=>s.onGroupByChange(null)}),e[0]=a,e[1]=s,e[2]=o,e[3]=i,e[4]=u):u=e[4];let f;e[5]!==d||e[6]!==r||e[7]!==c||e[8]!==l||e[9]!==i?(f=r!==null&&n.jsx(Tr,{icon:n.jsx(Bi,{size:14,className:"shrink-0"}),label:i("taskBoard.viewControls.sortedBy"),value:i(Wo[r]),menu:n.jsx(Yo,{...l,align:"start"}),extra:n.jsxs(n.Fragment,{children:[n.jsx(Zs,{orientation:"vertical"}),n.jsx(Ft,{label:i("taskBoard.viewControls.reverseSort"),size:"icon-sm",onClick:()=>l.onSortDirectionChange(c==="asc"?"desc":"asc"),children:n.jsx(d,{})})]}),removeLabel:i("taskBoard.viewControls.removeSorting"),onRemove:()=>l.onSortByChange(null)}),e[5]=d,e[6]=r,e[7]=c,e[8]=l,e[9]=i,e[10]=f):f=e[10];let m;return e[11]!==u||e[12]!==f?(m=n.jsxs(n.Fragment,{children:[u,f]}),e[11]=u,e[12]=f,e[13]=m):m=e[13],m}function T2(t){const e=E.c(29),{field:s,filters:l,items:i,index:a,onChange:o,onClose:r}=t;let c;if(e[0]!==s.label||e[1]!==s.multi||e[2]!==s.options||e[3]!==l||e[4]!==a||e[5]!==i||e[6]!==o||e[7]!==r){let d;e[9]!==l?(d=p=>p.isSelected(l),e[9]=l,e[10]=d):d=e[10];const u=s.options.filter(d);let f;e[11]!==l?(f=p=>!p.isSelected(l),e[11]=l,e[12]=f):f=e[12];const m=s.options.filter(f);let g;e[13]!==s.multi||e[14]!==l||e[15]!==o||e[16]!==r?(g=p=>{o(p.apply(l)),s.multi||r()},e[13]=s.multi,e[14]=l,e[15]=o,e[16]=r,e[17]=g):g=e[17];const h=g;let j;e[18]!==l||e[19]!==a||e[20]!==i||e[21]!==h?(j=(p,N)=>n.jsxs("button",{type:"button",className:P(Mi({highlight:"hover"})),onClick:()=>h(p),children:[n.jsx(Vs,{children:p.glyph}),n.jsx("span",{className:"truncate",children:p.label}),N?n.jsx(Wi,{count:i.filter(y=>Ai(y,p.apply(l),a)).length}):n.jsx(Us,{size:14,className:"ml-auto shrink-0"})]},p.id),e[18]=l,e[19]=a,e[20]=i,e[21]=h,e[22]=j):j=e[22];const x=j;let k;e[23]!==s.label?(k=n.jsx("p",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:s.label}),e[23]=s.label,e[24]=k):k=e[24];let b;e[25]!==x?(b=p=>x(p,!1),e[25]=x,e[26]=b):b=e[26];let v;e[27]!==x?(v=p=>x(p,!0),e[27]=x,e[28]=v):v=e[28],c=n.jsxs("div",{className:"flex max-h-72 flex-col overflow-y-auto p-1",children:[k,u.map(b),u.length>0&&m.length>0&&n.jsx(Zs,{className:"my-1"}),m.map(v)]}),e[0]=s.label,e[1]=s.multi,e[2]=s.options,e[3]=l,e[4]=a,e[5]=i,e[6]=o,e[7]=r,e[8]=c}else c=e[8];return c}function _2(t){const e=E.c(22),{field:s,filters:l,items:i,index:a,onChange:o}=t,[r,c]=Z.useState(!1);let d;e[0]!==s||e[1]!==l?(d=s.valueGlyph(l),e[0]=s,e[1]=l,e[2]=d):d=e[2];let u;e[3]!==s||e[4]!==l?(u=s.valueLabel(l),e[3]=s,e[4]=l,e[5]=u):u=e[5];let f;e[6]!==d||e[7]!==u?(f=n.jsx(ss,{asChild:!0,children:n.jsxs("button",{type:"button",className:"flex h-full max-w-[12rem] items-center gap-1.5 truncate px-2.5 text-foreground hover:bg-accent",children:[d,u]})}),e[6]=d,e[7]=u,e[8]=f):f=e[8];let m;e[9]!==s||e[10]!==l||e[11]!==a||e[12]!==i||e[13]!==o||e[14]!==r?(m=r&&n.jsx(T2,{field:s,filters:l,items:i,index:a,onChange:o,onClose:()=>c(!1)}),e[9]=s,e[10]=l,e[11]=a,e[12]=i,e[13]=o,e[14]=r,e[15]=m):m=e[15];let g;e[16]!==m?(g=n.jsx(as,{align:"start",className:"w-64 p-0",children:m}),e[16]=m,e[17]=g):g=e[17];let h;return e[18]!==r||e[19]!==f||e[20]!==g?(h=n.jsxs(ns,{open:r,onOpenChange:c,children:[f,g]}),e[18]=r,e[19]=f,e[20]=g,e[21]=h):h=e[21],h}function I2(t){const e=E.c(50),{filters:s,items:l,members:i,tags:a,sprints:o,index:r,onChange:c,view:d}=t,u=J();let f;e[0]!==r||e[1]!==i||e[2]!==o||e[3]!==a?(f={members:i,tags:a,sprints:o,index:r},e[0]=r,e[1]=i,e[2]=o,e[3]=a,e[4]=f):f=e[4];const m=qo(f);let g,h,j,x,k;if(e[5]!==m||e[6]!==s||e[7]!==r||e[8]!==l||e[9]!==c||e[10]!==u||e[11]!==d){k=Symbol.for("react.early_return_sentinel");e:{g=Oo(s,r);const C=d!==void 0&&(d.grouping.groupBy!==null||d.sorting.sortBy!==null);if(g.length===0&&!C){k=null;break e}h="mx-3 flex h-11 shrink-0 items-center gap-2 overflow-x-auto rounded-xl border border-border px-2 no-scrollbar",e[17]!==C||e[18]!==d?(j=d&&C&&n.jsxs(n.Fragment,{children:[n.jsx(D2,{...d}),n.jsx(Zs,{orientation:"vertical",className:"mx-1 h-5"})]}),e[17]=C,e[18]=d,e[19]=j):j=e[19];let w;e[20]!==m||e[21]!==s||e[22]!==r||e[23]!==l||e[24]!==c||e[25]!==u?(w=D=>{const S=m.find(T=>T.id===D);return S?n.jsxs(Ua,{variant:"outline",size:"segmented",children:[n.jsxs("span",{className:"flex h-full items-center gap-1.5 px-2.5 text-foreground",children:[S.icon,S.label]}),n.jsx(Zs,{orientation:"vertical"}),n.jsx("span",{className:"px-2 text-muted-foreground",children:S.multi?u("taskBoard.viewControls.isAnyOf"):u("taskBoard.viewControls.is")}),n.jsx(Zs,{orientation:"vertical"}),n.jsx(_2,{field:S,filters:s,items:l,index:r,onChange:c}),n.jsx(Ft,{label:u("taskBoard.viewControls.removeFilter",{field:S.label}),size:"icon-sm",onClick:()=>c(qm(s,D)),children:n.jsx(ll,{})})]},D):null},e[20]=m,e[21]=s,e[22]=r,e[23]=l,e[24]=c,e[25]=u,e[26]=w):w=e[26],x=g.map(w)}e[5]=m,e[6]=s,e[7]=r,e[8]=l,e[9]=c,e[10]=u,e[11]=d,e[12]=g,e[13]=h,e[14]=j,e[15]=x,e[16]=k}else g=e[12],h=e[13],j=e[14],x=e[15],k=e[16];if(k!==Symbol.for("react.early_return_sentinel"))return k;let b;e[27]!==u?(b=u("taskBoard.viewControls.addAnotherFilter"),e[27]=u,e[28]=b):b=e[28];let v;e[29]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(is,{}),e[29]=v):v=e[29];let p;e[30]!==b?(p=n.jsx(Ft,{label:b,children:v}),e[30]=b,e[31]=p):p=e[31];let N;e[32]!==m||e[33]!==s||e[34]!==r||e[35]!==l||e[36]!==c||e[37]!==p?(N=n.jsx(Go,{filters:s,items:l,index:r,fields:m,onChange:c,trigger:p}),e[32]=m,e[33]=s,e[34]=r,e[35]=l,e[36]=c,e[37]=p,e[38]=N):N=e[38];let y;e[39]!==g.length||e[40]!==s||e[41]!==c||e[42]!==u?(y=g.length>0&&n.jsx("div",{className:"ml-auto",children:n.jsx(ce,{variant:"ghost",size:"sm",onClick:()=>c({...lo,search:s.search}),children:u("taskBoard.viewControls.clear")})}),e[39]=g.length,e[40]=s,e[41]=c,e[42]=u,e[43]=y):y=e[43];let B;return e[44]!==y||e[45]!==h||e[46]!==j||e[47]!==x||e[48]!==N?(B=n.jsxs("div",{className:h,children:[j,x,N,y]}),e[44]=y,e[45]=h,e[46]=j,e[47]=x,e[48]=N,e[49]=B):B=e[49],B}function A2(t){const e=E.c(7),{onClick:s,label:l}=t,i=J();let a;e[0]!==l||e[1]!==i?(a=l??i("taskBoard.taskFilters.boardSettingsLabel"),e[0]=l,e[1]=i,e[2]=a):a=e[2];const o=a;let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(Ur,{}),e[3]=r):r=e[3];let c;return e[4]!==o||e[5]!==s?(c=n.jsx(Ft,{label:o,tooltipSide:"bottom",variant:"outline",onClick:s,children:r}),e[4]=o,e[5]=s,e[6]=c):c=e[6],c}const z2=["board","list","feed","epics"],$2=["overdue","today","week","none"],Ws=t=>typeof t=="string"&&t!==""?t:null,Qo={layout:"board",assignee:null,groupBy:null,sprint:null},Xo="any",Zo="any",R2="none";function E2(t,e){return typeof t!="string"||t===""?null:t===Gs||t===Ie||e===null||e.has(t)?t:null}function O2(t,e=Qo){const s=Ws(t.priority),l=Ws(t.due),i=Ws(t.tags),a=t.group===void 0?e.groupBy:Dr(t.group)?t.group:null,o=Wm(t.sort)?t.sort:null;return{layout:z2.includes(t.view)?t.view:e.layout,groupBy:a,subgroupBy:a!==null&&Dr(t.subgroup)&&t.subgroup!==a?t.subgroup:null,sortBy:o,sortDirection:t.dir==="asc"||t.dir==="desc"?t.dir:o!==null?Yi(o):"asc",filters:{search:Ws(t.q)??"",assignee:t.assignee===void 0?e.assignee:t.assignee===Xo?null:Ws(t.assignee),priority:_s.includes(s)?s:null,due:$2.includes(l)?l:null,tags:i?i.split(",").filter(Boolean):[],project:Ws(t.repo),sprint:t.sprint===void 0?e.sprint:t.sprint===Zo?null:Ws(t.sprint)}}}function _r({filters:t,layout:e,groupBy:s,subgroupBy:l,sortBy:i,sortDirection:a},o=Qo){return{view:e===o.layout?void 0:e,group:s===o.groupBy?void 0:s??R2,subgroup:s!==null?l??void 0:void 0,sort:i??void 0,dir:i!==null&&a!==Yi(i)?a:void 0,q:t.search===""?void 0:t.search,assignee:t.assignee===o.assignee?void 0:t.assignee??Xo,priority:t.priority??void 0,due:t.due??void 0,tags:t.tags.length>0?t.tags.join(","):void 0,repo:t.project??void 0,sprint:t.sprint===o.sprint?void 0:t.sprint??Zo}}function L2(t,e){const s=new Set(e.map(l=>l.id));return new Set([...t].filter(l=>s.has(l)))}function F2(t,e){const s=E.c(39);let l;s[0]===Symbol.for("react.memo_cache_sentinel")?(l={strict:!1},s[0]=l):l=s[0];const i=Er(l),a=ji();let o;s[1]!==t||s[2]!==i?(o=O2(i,t),s[1]=t,s[2]=i,s[3]=o):o=s[3];const r=o,{groupBy:c,subgroupBy:d}=r;let u;s[4]!==t||s[5]!==a||s[6]!==r?(u=y=>a({to:".",search:B=>({...B,..._r({...r,...y},t)}),replace:!0}),s[4]=t,s[5]=a,s[6]=r,s[7]=u):u=s[7];const f=u;let m;s[8]!==t||s[9]!==r?(m=y=>B=>({...B,..._r({...r,filters:y},t)}),s[8]=t,s[9]=r,s[10]=m):m=s[10];const g=m;let h;s[11]!==e||s[12]!==r.filters||s[13]!==f?(h=y=>{y.assignee!==r.filters.assignee&&e(y.assignee),f({filters:y})},s[11]=e,s[12]=r.filters,s[13]=f,s[14]=h):h=s[14];let j;s[15]!==a||s[16]!==e||s[17]!==g||s[18]!==r.filters?(j=(y,B)=>{if(y.assignee!==r.filters.assignee&&e(y.assignee),B.kind==="org"){a({to:Ic.tasks,params:{org:B.org,taskKey:void 0},search:g(y)});return}a({to:Ac.tasks,params:{org:B.org,agentId:B.projectId,taskKey:void 0},search:g(y)})},s[15]=a,s[16]=e,s[17]=g,s[18]=r.filters,s[19]=j):j=s[19];let x;s[20]!==f?(x=y=>f({layout:y}),s[20]=f,s[21]=x):x=s[21];let k;s[22]!==c||s[23]!==d||s[24]!==f?(k=y=>f({groupBy:y,subgroupBy:y!==null&&y===d?c:d}),s[22]=c,s[23]=d,s[24]=f,s[25]=k):k=s[25];let b,v,p;s[26]!==f?(v=y=>f({subgroupBy:y}),p=y=>f({sortBy:y,sortDirection:y!==null?Yi(y):"asc"}),b=y=>f({sortDirection:y}),s[26]=f,s[27]=b,s[28]=v,s[29]=p):(b=s[27],v=s[28],p=s[29]);let N;return s[30]!==b||s[31]!==h||s[32]!==j||s[33]!==x||s[34]!==k||s[35]!==v||s[36]!==p||s[37]!==r?(N={...r,setFilters:h,setFiltersOn:j,setLayout:x,setGroupBy:k,setSubgroupBy:v,setSortBy:p,setSortDirection:b},s[30]=b,s[31]=h,s[32]=j,s[33]=x,s[34]=k,s[35]=v,s[36]=p,s[37]=r,s[38]=N):N=s[38],N}const P2=5e3;function M2(t){if(wi(t))return"blocked";const e=zl(t);if(e==="running")return"running";if(e==="failed")return"failed";if(Zr(t))return"handed";if(t.status==="done")return"done";if(t.status==="post_deploy_validation")return"delivered";if(t.status==="in_review")return"review";const s=Date.parse(t.updatedAt)-Date.parse(t.createdAt);return Number.isFinite(s)&&s<P2?"created":"updated"}function K2(t){const e=`${t.getMonth()+1}`.padStart(2,"0"),s=`${t.getDate()}`.padStart(2,"0");return`${t.getFullYear()}-${e}-${s}`}function U2(t,e){const s=l=>new Date(l.getFullYear(),l.getMonth(),l.getDate()).getTime();return Math.round((s(t)-s(e))/864e5)}function q2(t,e){const s=new Map,l=t.map(i=>({item:i,at:new Date(i.updatedAt)})).filter(({at:i})=>Number.isFinite(i.getTime())).sort((i,a)=>a.at.getTime()-i.at.getTime());for(const{item:i,at:a}of l){const o=K2(a),r=s.get(o);if(r){r.items.push(i);continue}const c=U2(e,a);s.set(o,{key:o,date:a,relative:c===0?"today":c===1?"yesterday":null,items:[i]})}return[...s.values()]}function G2({items:t,scopeId:e,project:s,projects:l,isLoading:i}){if(!e)return{items:[...t],isLoading:i};if(!s||l.length===0)return{items:[],isLoading:!0};const a=l.some(o=>o.id===s.id)?l:[...l,s];return{items:Nu(t,uo(a),e),isLoading:i}}function Jo(t,e){if(t===null)return null;const s=sn(t,e),[l,...i]=s?.projects??[];return l&&i.length===0?l.id:null}function V2(t,e){return e.options.find(s=>Jo(s.id,e)===t)?.id??t}function H2(t,e,s){const l=Jo(t.project,s);return l?{kind:"project",projectId:l,filters:{...t,project:null}}:t.project===e?{kind:"project",projectId:e,filters:{...t,project:null}}:{kind:"org",filters:t}}zc(()=>import("./route-cP2t4t1J.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186])).catch(()=>{});const Y2=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"}),os="inline-flex items-center gap-1 rounded-full border-[length:var(--border-hairline)] border-border px-2 py-0.5 text-xs font-medium text-muted-foreground",oi="inline-flex shrink-0 items-center gap-1.5 text-xs text-muted-foreground",ec="opacity-0 transition-opacity group-hover:opacity-100 focus-visible:opacity-100 data-[state=open]:opacity-100",Ja="flex size-6 shrink-0 items-center justify-center rounded-lg text-muted-foreground opacity-0 transition-[color,background-color,opacity] hover:bg-accent hover:text-foreground group-hover/lane:opacity-100 group-data-[drop-target]/lane:opacity-100 focus-visible:opacity-100 data-[state=open]:opacity-100",on=12,dl="size-3.5",Ds=2;function W2(){const t=E.c(9),e=J();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=P(os,"border-warning/50 text-warning"),t[0]=s):s=t[0];let l;t[1]!==e?(l=e("taskBoard.taskBoard.blockedBadgeTitle"),t[1]=e,t[2]=l):l=t[2];let i;t[3]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(Al,{size:on}),t[3]=i):i=t[3];let a;t[4]!==e?(a=e("taskBoard.taskBoard.needsInput"),t[4]=e,t[5]=a):a=t[5];let o;return t[6]!==l||t[7]!==a?(o=n.jsxs("span",{className:s,title:l,children:[i,a]}),t[6]=l,t[7]=a,t[8]=o):o=t[8],o}function Q2(){const t=E.c(9),e=J();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=P(os,"border-warning/50 text-warning"),t[0]=s):s=t[0];let l;t[1]!==e?(l=e("taskBoard.taskBoard.handedToHumanBadgeTitle"),t[1]=e,t[2]=l):l=t[2];let i;t[3]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(Al,{size:on}),t[3]=i):i=t[3];let a;t[4]!==e?(a=e("taskBoard.taskBoard.needsYou"),t[4]=e,t[5]=a):a=t[5];let o;return t[6]!==l||t[7]!==a?(o=n.jsxs("span",{className:s,title:l,children:[i,a]}),t[6]=l,t[7]=a,t[8]=o):o=t[8],o}function tc(t){const e=E.c(20),{priority:s,onChange:l}=t,i=J(),a=et[s];let o;e[0]!==a.labelKey||e[1]!==i?(o=i(a.labelKey),e[0]=a.labelKey,e[1]=i,e[2]=o):o=e[2];const r=o,c=a.icon;let d;e[3]!==a.iconClassName?(d=P(dl,"shrink-0",a.iconClassName),e[3]=a.iconClassName,e[4]=d):d=e[4];let u;e[5]!==a.icon||e[6]!==r||e[7]!==d?(u=n.jsx(c,{className:d,"aria-label":r}),e[5]=a.icon,e[6]=r,e[7]=d,e[8]=u):u=e[8];const f=u;if(!l){let h;return e[9]!==f||e[10]!==r?(h=n.jsx(Ll,{label:r,children:f}),e[9]=f,e[10]=r,e[11]=h):h=e[11],h}let m;e[12]!==l||e[13]!==s||e[14]!==i?(m=_s.map(h=>{const j=et[h].icon;return n.jsxs(Se,{onSelect:()=>l(h),className:P("gap-2",h===s&&"bg-accent"),children:[n.jsx(j,{size:on,className:P("shrink-0",et[h].iconClassName)}),i(et[h].labelKey)]},h)}),e[12]=l,e[13]=s,e[14]=i,e[15]=m):m=e[15];let g;return e[16]!==f||e[17]!==r||e[18]!==m?(g=n.jsx(sc,{label:r,glyph:f,children:m}),e[16]=f,e[17]=r,e[18]=m,e[19]=g):g=e[19],g}function sc(t){const e=E.c(8),{label:s,glyph:l,children:i}=t;let a;e[0]!==l||e[1]!==s?(a=n.jsx(Me,{asChild:!0,children:n.jsx(ce,{variant:"ghost",size:"icon-sm",title:s,"aria-label":s,onClick:J2,onPointerDown:Z2,className:"-m-1.5",children:l})}),e[0]=l,e[1]=s,e[2]=a):a=e[2];let o;e[3]!==i?(o=n.jsx(Ye,{align:"start",className:"w-36",onClick:X2,children:i}),e[3]=i,e[4]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=n.jsxs(Ke,{children:[a,o]}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}function X2(t){return t.stopPropagation()}function Z2(t){return t.stopPropagation()}function J2(t){return t.stopPropagation()}function Ll(t){const e=E.c(7),{label:s,children:l}=t;let i;e[0]!==l?(i=n.jsx(Bs,{asChild:!0,children:n.jsx("span",{className:"flex shrink-0 items-center",children:l})}),e[0]=l,e[1]=i):i=e[1];let a;e[2]!==s?(a=n.jsx(Cs,{side:"top",children:s}),e[2]=s,e[3]=a):a=e[3];let o;return e[4]!==i||e[5]!==a?(o=n.jsxs(ws,{children:[i,a]}),e[4]=i,e[5]=a,e[6]=o):o=e[6],o}function ep(t){const e=E.c(20),{type:s,onChange:l}=t,i=J(),a=It[s];let o;e[0]!==a.labelKey||e[1]!==i?(o=i(a.labelKey),e[0]=a.labelKey,e[1]=i,e[2]=o):o=e[2];const r=o,c=a.icon;let d;e[3]!==a.iconClassName?(d=P(dl,"shrink-0",a.iconClassName),e[3]=a.iconClassName,e[4]=d):d=e[4];let u;e[5]!==a.icon||e[6]!==r||e[7]!==d?(u=n.jsx(c,{className:d,"aria-label":r}),e[5]=a.icon,e[6]=r,e[7]=d,e[8]=u):u=e[8];const f=u;if(!l){let h;return e[9]!==f||e[10]!==r?(h=n.jsx(Ll,{label:r,children:f}),e[9]=f,e[10]=r,e[11]=h):h=e[11],h}let m;e[12]!==l||e[13]!==i||e[14]!==s?(m=Ti.map(h=>{const j=It[h].icon;return n.jsxs(Se,{onSelect:()=>l(h),className:P("gap-2",h===s&&"bg-accent"),children:[n.jsx(j,{size:on,className:P("shrink-0",It[h].iconClassName)}),i(It[h].labelKey)]},h)}),e[12]=l,e[13]=i,e[14]=s,e[15]=m):m=e[15];let g;return e[16]!==f||e[17]!==r||e[18]!==m?(g=n.jsx(sc,{label:r,glyph:f,children:m}),e[16]=f,e[17]=r,e[18]=m,e[19]=g):g=e[19],g}function nc(t){const e=E.c(58),{iso:s,onChange:l}=t,i=J();let a;e[0]!==s?(a=s?Ud(s):null,e[0]=s,e[1]=a):a=e[1];const o=a;let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(en,{className:P(dl,"shrink-0")}),e[2]=r):r=e[2];let c;e[3]!==s?(c=s&&n.jsx("span",{className:"truncate",children:Y2.format(new Date(s))}),e[3]=s,e[4]=c):c=e[4];let d;e[5]!==c?(d=n.jsxs(n.Fragment,{children:[r,c]}),e[5]=c,e[6]=d):d=e[6];const u=d;let f,m,g,h,j,x,k,b,v,p,N,y;if(e[7]!==u||e[8]!==s||e[9]!==l||e[10]!==i||e[11]!==o){k=Symbol.for("react.early_return_sentinel");e:{const A=P("min-w-0 shrink items-center gap-1.5 text-xs font-medium tabular-nums text-muted-foreground/70",o==="overdue"&&"text-destructive",o==="soon"&&"text-warning");if(!l){k=n.jsx("span",{className:P("flex",A),children:u});break e}g=Ke,m=Me,x=!0,f=ce,b="ghost",v="sm",e[24]!==s||e[25]!==i?(p=s?void 0:i("taskBoard.taskBoard.dueDateButton"),e[24]=s,e[25]=i,e[26]=p):p=e[26],e[27]!==s||e[28]!==i?(N=s?void 0:i("taskBoard.taskBoard.dueDateButton"),e[27]=s,e[28]=i,e[29]=N):N=e[29],y=np,h=sp,j=P("-mx-1.5 h-auto px-1.5 py-1 font-medium",A,!s&&ec)}e[7]=u,e[8]=s,e[9]=l,e[10]=i,e[11]=o,e[12]=f,e[13]=m,e[14]=g,e[15]=h,e[16]=j,e[17]=x,e[18]=k,e[19]=b,e[20]=v,e[21]=p,e[22]=N,e[23]=y}else f=e[12],m=e[13],g=e[14],h=e[15],j=e[16],x=e[17],k=e[18],b=e[19],v=e[20],p=e[21],N=e[22],y=e[23];if(k!==Symbol.for("react.early_return_sentinel"))return k;let B;e[30]!==f||e[31]!==u||e[32]!==h||e[33]!==j||e[34]!==b||e[35]!==v||e[36]!==p||e[37]!==N||e[38]!==y?(B=n.jsx(f,{variant:b,size:v,"aria-label":p,title:N,onClick:y,onPointerDown:h,className:j,children:u}),e[30]=f,e[31]=u,e[32]=h,e[33]=j,e[34]=b,e[35]=v,e[36]=p,e[37]=N,e[38]=y,e[39]=B):B=e[39];let C;e[40]!==m||e[41]!==x||e[42]!==B?(C=n.jsx(m,{asChild:x,children:B}),e[40]=m,e[41]=x,e[42]=B,e[43]=C):C=e[43];let w;e[44]!==s?(w=s?new Date(s):void 0,e[44]=s,e[45]=w):w=e[45];let D;e[46]!==s?(D=s?new Date(s):void 0,e[46]=s,e[47]=D):D=e[47];let S;e[48]!==l?(S=A=>A&&l(Hi(A)),e[48]=l,e[49]=S):S=e[49];let T;e[50]!==w||e[51]!==D||e[52]!==S?(T=n.jsx(Ye,{align:"start",className:"w-auto p-0",onClick:tp,children:n.jsx(zi,{mode:"single",selected:w,defaultMonth:D,onSelect:S,initialFocus:!0})}),e[50]=w,e[51]=D,e[52]=S,e[53]=T):T=e[53];let _;return e[54]!==g||e[55]!==C||e[56]!==T?(_=n.jsxs(g,{children:[C,T]}),e[54]=g,e[55]=C,e[56]=T,e[57]=_):_=e[57],_}function tp(t){return t.stopPropagation()}function sp(t){return t.stopPropagation()}function np(t){return t.stopPropagation()}function ap(t){const e=E.c(8),{action:s}=t;let l;e[0]!==s?(l=o=>{o.stopPropagation(),s.onClick()},e[0]=s,e[1]=l):l=e[1];let i;e[2]!==s.icon?(i=n.jsx(s.icon,{className:dl}),e[2]=s.icon,e[3]=i):i=e[3];let a;return e[4]!==s.label||e[5]!==l||e[6]!==i?(a=n.jsxs(ce,{variant:"outline",size:"xs",onClick:l,onPointerDown:ip,ref:lp,className:"absolute -top-0.5 right-0 gap-1.5 font-medium pointer-events-none opacity-0 transition-opacity focus-visible:pointer-events-auto focus-visible:opacity-100 group-hover:pointer-events-auto group-hover:opacity-100",children:[i,s.label]}),e[4]=s.label,e[5]=l,e[6]=i,e[7]=a):a=e[7],a}function lp(t){return t?.parentElement?.style.setProperty("--fade-text-end",`${t.offsetWidth}px`)}function ip(t){return t.stopPropagation()}function ac(t){const e=E.c(38),{item:s,checks:l,assignee:i,assignedBy:a,members:o,leading:r,trailing:c,onAssign:d,onPriorityChange:u,onTypeChange:f,onDueDateChange:m}=t,{org:g}=tt();let h;e[0]!==s.keySeq||e[1]!==g.slug?(h=ln(g.slug,s.keySeq),e[0]=s.keySeq,e[1]=g.slug,e[2]=h):h=e[2];const j=h;let x;e[3]!==s.type||e[4]!==f?(x=n.jsx(ep,{type:s.type,onChange:f}),e[3]=s.type,e[4]=f,e[5]=x):x=e[5];let k;e[6]!==j?(k=n.jsx("span",{className:"text-xs font-medium tabular-nums text-muted-foreground/70",children:j}),e[6]=j,e[7]=k):k=e[7];let b;e[8]!==x||e[9]!==k?(b=n.jsxs("span",{className:"flex shrink-0 items-center gap-1.5",children:[x,k]}),e[8]=x,e[9]=k,e[10]=b):b=e[10];let v;e[11]!==s.dueDate||e[12]!==m?(v=s.dueDate&&n.jsx(nc,{iso:s.dueDate,onChange:m}),e[11]=s.dueDate,e[12]=m,e[13]=v):v=e[13];let p;e[14]!==r||e[15]!==b||e[16]!==v?(p=n.jsxs("span",{className:"flex min-w-0 items-center gap-3",children:[b,v,r]}),e[14]=r,e[15]=b,e[16]=v,e[17]=p):p=e[17];let N;e[18]!==s.priority||e[19]!==u?(N=(s.priority!=="none"||u)&&n.jsx(tc,{priority:s.priority,onChange:u}),e[18]=s.priority,e[19]=u,e[20]=N):N=e[20];let y;e[21]!==l||e[22]!==s.reviewVerdicts?(y=l&&n.jsx(cp,{summary:l.summary,verdicts:s.reviewVerdicts,enabled:l.enabled}),e[21]=l,e[22]=s.reviewVerdicts,e[23]=y):y=e[23];let B;e[24]!==a||e[25]!==i||e[26]!==s||e[27]!==o||e[28]!==d?(B=n.jsx(oc,{item:s,assignee:i,assignedBy:a,members:o,onAssign:d,showDelegation:!1}),e[24]=a,e[25]=i,e[26]=s,e[27]=o,e[28]=d,e[29]=B):B=e[29];let C;e[30]!==N||e[31]!==y||e[32]!==B||e[33]!==c?(C=n.jsxs("span",{className:"flex shrink-0 items-center gap-2",children:[N,y,B,c]}),e[30]=N,e[31]=y,e[32]=B,e[33]=c,e[34]=C):C=e[34];let w;return e[35]!==C||e[36]!==p?(w=n.jsxs("div",{className:"mt-auto flex shrink-0 items-center justify-between gap-2 pt-1",children:[p,C]}),e[35]=C,e[36]=p,e[37]=w):w=e[37],w}function rp(t){const e=E.c(20),{status:s,since:l}=t,i=J(),[a]=Z.useState(op);let o,r,c,d,u,f;if(e[0]!==a||e[1]!==l||e[2]!==s||e[3]!==i){const h=qd(l,a),j=ht(s,i).label;r=ws,u=400;let x;e[10]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(md,{size:on}),e[10]=x):x=e[10],f=n.jsx(Bs,{asChild:!0,children:n.jsxs("span",{className:os,children:[x,h===0?i("taskBoard.taskBoard.statusAgeToday"):i("taskBoard.taskBoard.statusAgeDays",{count:h})]})}),o=Cs,c="top",d=h===0?i("taskBoard.taskBoard.statusAgeTodayHint",{status:j}):i("taskBoard.taskBoard.statusAgeDaysHint",{status:j,count:h}),e[0]=a,e[1]=l,e[2]=s,e[3]=i,e[4]=o,e[5]=r,e[6]=c,e[7]=d,e[8]=u,e[9]=f}else o=e[4],r=e[5],c=e[6],d=e[7],u=e[8],f=e[9];let m;e[11]!==o||e[12]!==c||e[13]!==d?(m=n.jsx(o,{side:c,children:d}),e[11]=o,e[12]=c,e[13]=d,e[14]=m):m=e[14];let g;return e[15]!==r||e[16]!==u||e[17]!==f||e[18]!==m?(g=n.jsxs(r,{delayDuration:u,children:[f,m]}),e[15]=r,e[16]=u,e[17]=f,e[18]=m,e[19]=g):g=e[19],g}function op(){return Date.now()}function lc(t){const e=E.c(9),{sprintId:s}=t,l=Ol();let i;if(e[0]!==s||e[1]!==l){let d;e[3]!==s?(d=u=>u.id===s,e[3]=s,e[4]=d):d=e[4],i=l.find(d),e[0]=s,e[1]=l,e[2]=i}else i=e[2];const a=i;if(!a)return null;let o,r;e[5]===Symbol.for("react.memo_cache_sentinel")?(o=P(os,"text-foreground"),r=n.jsx(Ts,{size:10,className:"shrink-0 text-muted-foreground"}),e[5]=o,e[6]=r):(o=e[5],r=e[6]);let c;return e[7]!==a.name?(c=n.jsxs("span",{className:o,children:[r,a.name]}),e[7]=a.name,e[8]=c):c=e[8],c}function Qi(t){const e=E.c(8),{tag:s}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=P(os,"text-foreground"),e[0]=l):l=e[0];let i;e[1]!==s.color?(i=rn(s.color),e[1]=s.color,e[2]=i):i=e[2];let a;e[3]!==i?(a={borderColor:i},e[3]=i,e[4]=a):a=e[4];let o;return e[5]!==a||e[6]!==s.name?(o=n.jsx("span",{className:l,style:a,children:s.name}),e[5]=a,e[6]=s.name,e[7]=o):o=e[7],o}function cp(t){const e=E.c(26),{summary:s,verdicts:l,enabled:i}=t,a=J();let o;if(e[0]!==i||e[1]!==a||e[2]!==l){let v;e[4]!==a||e[5]!==l?(v=p=>{const N=l.find(C=>C.reviewer===p),y=a("taskBoard.taskDialog.reviewerLabel"),B=N?N.verdict==="changes_requested"?a("taskBoard.taskBoard.checksChangesRequested"):a(N.verified?"taskBoard.taskBoard.checksApproved":"taskBoard.taskBoard.checksUnverified"):a("taskBoard.taskBoard.checksPending");return n.jsxs("span",{className:"flex items-center gap-1.5 whitespace-nowrap",children:[n.jsx(cl,{size:12}),y," โ€” ",B]},p)},e[4]=a,e[5]=l,e[6]=v):v=e[6],o=i.map(v),e[0]=i,e[1]=a,e[2]=l,e[3]=o}else o=e[3];let r;e[7]!==o?(r=n.jsx("span",{className:"flex flex-col gap-0.5",children:o}),e[7]=o,e[8]=r):r=e[8];const c=r,d=s.tone==="ok"&&"text-success",u=s.tone==="pending"&&"text-warning",f=s.tone==="danger"&&"text-destructive";let m;e[9]!==d||e[10]!==u||e[11]!==f?(m=P("flex shrink-0 items-center gap-1.5 text-xs font-medium tabular-nums",d,u,f),e[9]=d,e[10]=u,e[11]=f,e[12]=m):m=e[12];const g=String(s.passed),h=String(s.total);let j;e[13]!==a||e[14]!==g||e[15]!==h?(j=a("taskBoard.taskBoard.checksLabel",{passed:g,total:h}),e[13]=a,e[14]=g,e[15]=h,e[16]=j):j=e[16];let x;e[17]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(Ha,{className:dl}),e[17]=x):x=e[17];let k;e[18]!==s.passed||e[19]!==s.total||e[20]!==m||e[21]!==j?(k=n.jsxs("span",{className:m,"aria-label":j,children:[x,s.passed,"/",s.total]}),e[18]=s.passed,e[19]=s.total,e[20]=m,e[21]=j,e[22]=k):k=e[22];let b;return e[23]!==c||e[24]!==k?(b=n.jsx(Ll,{label:c,children:k}),e[23]=c,e[24]=k,e[25]=b):b=e[25],b}function ic(t){const e=E.c(14),{state:s}=t,l=J(),i=s==="running",a=i?"taskBoard.taskBoard.agentRunning":"taskBoard.taskBoard.agentFailed";let o;e[0]!==l||e[1]!==a?(o=l(a),e[0]=l,e[1]=a,e[2]=o):o=e[2];const r=o;let c;e[3]!==r||e[4]!==i?(c=i?n.jsx(bt,{className:"size-3.5 text-primary",label:r}):n.jsx(Oc,{size:14,className:"shrink-0 text-destructive","aria-label":r}),e[3]=r,e[4]=i,e[5]=c):c=e[5];let d;e[6]!==r||e[7]!==c?(d=n.jsx(Ll,{label:r,children:c}),e[6]=r,e[7]=c,e[8]=d):d=e[8];let u;e[9]!==r?(u=n.jsx("span",{className:"sr-only",children:r}),e[9]=r,e[10]=u):u=e[10];let f;return e[11]!==d||e[12]!==u?(f=n.jsxs("span",{className:"mt-px flex shrink-0 items-center",children:[d,u]}),e[11]=d,e[12]=u,e[13]=f):f=e[13],f}function rc(t){const e=E.c(3),s=sf(no());if(t.reviewVerdicts.length===0&&t.status!=="in_review"&&!t.reviewCycleStartedAt)return null;const l=nf(t.reviewVerdicts,s);let i;return e[0]!==s||e[1]!==l?(i=l?{summary:l,enabled:s}:null,e[0]=s,e[1]=l,e[2]=i):i=e[2],i}function oc(t){const e=E.c(27),{item:s,assignee:l,assignedBy:i,members:a,onAssign:o,showDelegation:r}=t,c=r===void 0?!0:r,d=J(),[u,f]=Z.useState(!1);let m=null;if(s.assigneeId===Ie){let k;e[0]!==i||e[1]!==d?(k=i?.user?.name?d("taskBoard.taskBoard.assignedToSuperAgentBy",{name:i.user.name}):d("taskBoard.taskBoard.assignedToSuperAgent"),e[0]=i,e[1]=d,e[2]=k):k=e[2];const b=k;if(c){let v;e[6]!==i?(v=i&&n.jsx(ft,{url:i.user?.image??void 0,fallback:i.user?.name??"?",shape:"circle",size:"xs",className:"-mr-2 ring-2 ring-background"}),e[6]=i,e[7]=v):v=e[7];let p;e[8]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx(mt,{size:20,className:"ring-2 ring-background"}),e[8]=p):p=e[8];let N;e[9]!==v||e[10]!==b?(N=n.jsxs("span",{className:"inline-flex items-center",title:b,children:[v,p]}),e[9]=v,e[10]=b,e[11]=N):N=e[11],m=N}else{let v;e[3]!==i||e[4]!==b?(v=i?n.jsx(ft,{url:i.user?.image??void 0,fallback:i.user?.name??"?",shape:"circle",size:"xs",title:b}):null,e[3]=i,e[4]=b,e[5]=v):v=e[5],m=v}}else if(l){const k=l.user?.image??void 0,b=l.user?.name??"?";let v;e[12]!==k||e[13]!==b?(v=n.jsx(ft,{url:k,fallback:b,shape:"circle",size:"xs"}),e[12]=k,e[13]=b,e[14]=v):v=e[14],m=v}if(!o||!a?.length)return m;let g;e[15]!==m||e[16]!==d?(g=n.jsx(ss,{asChild:!0,children:m?n.jsx("button",{type:"button",title:d("taskBoard.taskBoard.assignButton"),"aria-label":d("taskBoard.taskBoard.assignButton"),onClick:k=>{k.stopPropagation(),f(!0)},onPointerDown:up,className:"flex shrink-0 items-center rounded-full transition-opacity hover:opacity-80",children:m}):n.jsx("button",{type:"button",title:d("taskBoard.taskBoard.assignButton"),"aria-label":d("taskBoard.taskBoard.assignButton"),onClick:k=>{k.stopPropagation(),f(!0)},className:P("flex size-6 shrink-0 items-center justify-center rounded-full border border-dashed border-muted-foreground/40 text-muted-foreground/40 opacity-0 transition-[color,border-color,opacity] group-hover:opacity-100 hover:border-muted-foreground hover:text-muted-foreground focus-visible:opacity-100 data-[state=open]:opacity-100","-ml-2 w-0 scale-75 overflow-hidden border-0 transition-[color,border-color,opacity,width,margin,scale] duration-150 ease-out group-hover:ml-0 group-hover:w-6 group-hover:scale-100 group-hover:border focus-visible:ml-0 focus-visible:w-6 focus-visible:scale-100 focus-visible:border data-[state=open]:ml-0 data-[state=open]:w-6 data-[state=open]:scale-100 data-[state=open]:border motion-reduce:transition-none"),children:n.jsx(Kr,{size:13})})}),e[15]=m,e[16]=d,e[17]=g):g=e[17];let h;e[18]!==o?(h=k=>{o(k),f(!1)},e[18]=o,e[19]=h):h=e[19];let j;e[20]!==a||e[21]!==h?(j=n.jsx(as,{className:"w-56 p-0",align:"end",side:"bottom",onClick:dp,children:n.jsx(qi,{members:a,onSelect:h})}),e[20]=a,e[21]=h,e[22]=j):j=e[22];let x;return e[23]!==u||e[24]!==g||e[25]!==j?(x=n.jsxs(ns,{open:u,onOpenChange:f,children:[g,j]}),e[23]=u,e[24]=g,e[25]=j,e[26]=x):x=e[26],x}function dp(t){return t.stopPropagation()}function up(t){return t.stopPropagation()}function Sh(){const t=E.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(l1,{children:n.jsx(fp,{})}),t[0]=e):e=t[0],e}function fp(){const t=E.c(138),e=J(),{org:s,locator:l}=tt(),{items:i,demoFrozenItemIds:a,isLoading:o,isFetching:r}=Yr(),{scopeId:c,project:d,projects:u}=Cu();let f;t[0]!==o||t[1]!==i||t[2]!==u||t[3]!==c||t[4]!==d?(f=G2({items:i,scopeId:c,project:d,projects:u,isLoading:o}),t[0]=o,t[1]=i,t[2]=u,t[3]=c,t[4]=d,t[5]=f):f=t[5];const{items:m,isLoading:g}=f,{data:h}=Rl();let j;t[6]!==h?(j=h===void 0?[]:h,t[6]=h,t[7]=j):j=t[7];const x=j,k=Ol();m1();const b=yd(),v=oo();let p,N;if(t[8]!==v.data){const z=(v.data??[]).filter(Bp);p=z.length>0,N=z.map(Sp),t[8]=v.data,t[9]=p,t[10]=N}else p=t[9],N=t[10];const y=N,[B,C]=Z.useState(!1),[w,D]=Z.useState(!1);let S;t[11]!==p?(S=z=>z===Ie&&!p?(C(!0),!0):!1,t[11]=p,t[12]=S):S=t[12];const T=S;let _;t[13]!==e?(_=z=>{He.error(z.message||e("taskBoard.taskBoard.actionError"))},t[13]=e,t[14]=_):_=t[14];const A=_;let I;t[15]!==s.id?(I=z=>{!z||z.dataset.tracked==="true"||(z.dataset.tracked="true",Rc("task_board_opened",{organization_id:s.id}))},t[15]=s.id,t[16]=I):I=t[16];const $=I;let O;t[17]===Symbol.for("react.memo_cache_sentinel")?(O=[],t[17]=O):O=t[17];const[R,L]=Z.useState(O),U=()=>{if(R.length!==0){if(T(Ie)){L([]);return}for(const z of R)b.rerun.mutate({id:z.id},{onError:W=>A(W)});L([]),Ne()}},{data:V}=vi.useSession(),{data:K}=yi(),Q=K?.data?.members??[],H=new Map(Q.map(Np)),ee=V?.user?.id??null;let G;t[18]!==s.id||t[19]!==ee?(G=Lr.taskBoardAssignee(s.id,ee??""),t[18]=s.id,t[19]=ee,t[20]=G):G=t[20];const[se,re]=Or(G,null);let le;t[21]!==re||t[22]!==ee?(le=z=>{ee!==null&&re(z)},t[21]=re,t[22]=ee,t[23]=le):le=t[23];const{filters:F,setFilters:q,setFiltersOn:oe,layout:ne,setLayout:fe,groupBy:ve,subgroupBy:De,setGroupBy:de,setSubgroupBy:pe,sortBy:ye,sortDirection:ke,setSortBy:ie,setSortDirection:Ce}=F2({layout:"board",assignee:ee===null?null:E2(se,K?new Set(H.keys()):null),groupBy:"status",sprint:Cd(k)},le),ae={...F,sprint:Qd(F.sprint,k),project:c?null:F.project},ge=k.find(z=>z.id===ae.sprint&&z.state!=="closed")?.id??null;let xe;t[24]!==ve||t[25]!==de||t[26]!==pe||t[27]!==De?(xe={groupBy:ve,subgroupBy:De,onGroupByChange:de,onSubgroupByChange:pe},t[24]=ve,t[25]=de,t[26]=pe,t[27]=De,t[28]=xe):xe=t[28];const me=xe;let Ae;t[29]!==ie||t[30]!==Ce||t[31]!==ye||t[32]!==ke?(Ae={sortBy:ye,sortDirection:ke,onSortByChange:ie,onSortDirectionChange:Ce},t[29]=ie,t[30]=Ce,t[31]=ye,t[32]=ke,t[33]=Ae):Ae=t[33];const X=Ae;let be;t[34]===Symbol.for("react.memo_cache_sentinel")?(be=new Map,t[34]=be):be=t[34];const[Oe,Ze]=Z.useState(be),ze=So(m,y);let Y;t[35]!==ze?(Y=fo(ze),t[35]=ze,t[36]=Y):Y=t[36];const te=Y,ue=d?{repo:yu(d),virtualMcpId:d.id}:rl(ae.project?sn(ae.project,ze)??null:null),[we]=Ni();let he;t[37]===Symbol.for("react.memo_cache_sentinel")?(he=new Set,t[37]=he):he=t[37];const[Fe,We]=Z.useState(he);let Ue;t[38]===Symbol.for("react.memo_cache_sentinel")?(Ue=z=>We(W=>{const Re=new Set(W);return Re.has(z)?Re.delete(z):Re.add(z),Re}),t[38]=Ue):Ue=t[38];const Pe=Ue,at=z=>We(W=>{const Re=new Set(W);for(const ct of gt)ct.status===z&&Re.add(ct.id);return Re}),Ne=()=>We(new Set),Qe=z=>{if(Ne(),!c){q(z);return}const W=H2(z,c,ze);if(W.kind==="project"&&W.projectId===c){q(W.filters);return}oe(W.filters,W.kind==="org"?{kind:"org",org:s.slug}:{kind:"project",org:s.slug,projectId:W.projectId})},kt=c?{...ae,project:V2(c,ze)}:ae,dt=c?i:m,[pt,Te]=Z.useState(!1),[Xe,st]=Z.useState(null);od();const{setTaskId:qe}=Vu(),{create:At}=Hu(),Bt=Qt(),Ge=ji();let yt;t[39]!==Ge||t[40]!==s.slug||t[41]!==d?(yt=()=>{if(d){Ge({to:"/$org/projects/$agentId/settings",params:{org:s.slug,agentId:d.id}});return}Ge({to:"/$org/settings/task-board",params:{org:s.slug}})},t[39]=Ge,t[40]=s.slug,t[41]=d,t[42]=yt):yt=t[42];const Xt=yt;let xt;t[43]!==d||t[44]!==e?(xt=d?e("taskBoard.taskFilters.projectSettingsLabel"):void 0,t[43]=d,t[44]=e,t[45]=xt):xt=t[45];const ds=xt;let lt;t[46]===Symbol.for("react.memo_cache_sentinel")?(lt={strict:!1},t[46]=lt):lt=t[46];const{taskKey:zt}=ol(lt),Je=zt,jt=yp,_e=Xd(i,Je)??null,Pt=!!Je&&!_e&&!g&&!r,it=_e?pi(s.slug,_e):null;let Ee;t[47]!==Ge||t[48]!==Je?(Ee=()=>{Je&&Ge({to:".",...jt(void 0),replace:!0})},t[47]=Ge,t[48]=Je,t[49]=Ee):Ee=t[49];const Le=Ee;let rt;t[50]!==b.link||t[51]!==At||t[52]!==l||t[53]!==s.id||t[54]!==qe||t[55]!==Bt?(rt=async z=>{const W=crypto.randomUUID(),Re=Ec(s.id).id,ct=await Bt.call("TASK_BOARD_ITEM_PRS_GET",{taskBoardItemId:z.id}).then(kp).catch(bp),Ot=Km(z,ct),ts={type:"doc",content:[{type:"paragraph",content:[Uu({id:z.id,name:z.title,char:"@",kind:"task",metadata:{title:z.title,description:z.description,context:Ot}}),{type:"text",text:" "}]}]};Yu(sessionStorage,l,W,ts);try{await At({id:W,virtual_mcp_id:Re}),await b.link.mutateAsync({id:z.id,linkThreadId:W})}catch{}qe(W,Re)},t[50]=b.link,t[51]=At,t[52]=l,t[53]=s.id,t[54]=qe,t[55]=Bt,t[56]=rt):rt=t[56];const je=rt,gt=m.filter(z=>Ai(z,ae,ze)),Be=L2(Fe,gt),vt=Vm(ve,De),$t=vt.includes("status")?gt:gt.filter(z=>!Xr.includes(z.status)||Rd(z.status,we.taskBoardLaneVisibility)),Ct=ye===null?$t:Qm($t,ye,ke,{memberNames:new Map(Q.map(jp)),superAgentName:e("taskBoard.taskFilters.assigneeSuperAgent"),index:ze}),ut=z=>{const W=Su(z,ae.project,ze);W!==ae.project&&q({...ae,project:W})};let us;t[57]===Symbol.for("react.memo_cache_sentinel")?(us=()=>{st(null),Te(!0)},t[57]=us):us=t[57];const Xa=us;let fs;t[58]===Symbol.for("react.memo_cache_sentinel")?(fs=z=>{st(z),Te(!0)},t[58]=fs):fs=t[58];const Za=fs;let ms;t[59]!==Ge||t[60]!==s.slug?(ms=z=>{Ge({to:".",...jt(pi(s.slug,z))})},t[59]=Ge,t[60]=s.slug,t[61]=ms):ms=t[61];const Zt=ms;let ps;t[62]!==e?(ps=z=>He.error(z instanceof Error&&z.message?z.message:e("taskBoard.taskBoard.actionError")),t[62]=e,t[63]=ps):ps=t[63];const Rt=ps;let wt;t[64]!==b.update?(wt=(z,W)=>b.update.mutate({id:z,status:W}),t[64]=b.update,t[65]=wt):wt=t[65];let gs,hs;t[66]!==b.update||t[67]!==Rt?(gs=(z,W)=>b.update.mutate({id:z,parentId:W},{onError:Rt}),hs=(z,W)=>b.update.mutate({id:z,isEpic:W},{onError:Rt}),t[66]=b.update,t[67]=Rt,t[68]=gs,t[69]=hs):(gs=t[68],hs=t[69]);let xs;t[70]!==Ge?(xs=()=>{const z=jt(void 0);Ge({to:".",params:z.params,search:W=>({...z.search(W),view:"epics"})})},t[70]=Ge,t[71]=xs):xs=t[71];let Et;t[72]!==b.create||t[73]!==Rt?(Et=(z,W)=>b.create.mutateAsync({title:W,status:"todo",repo:z.repo,virtualMcpId:z.virtualMcpId,parentId:z.id}).catch(Rt),t[72]=b.create,t[73]=Rt,t[74]=Et):Et=t[74];const cn={items:m,memberByUserId:H,onSetStatus:wt,orgSlug:s.slug,setParent:gs,setEpic:hs,onOpen:Zt,onShowEpics:xs,onCreateChild:Et},Is=()=>b.create.mutateAsync({title:e("taskBoard.epics.newEpicTitle"),status:"todo",isEpic:!0,...ue}).then(z=>{const{item:W}=z;return Zt(W)},Rt);let js;t[75]===Symbol.for("react.memo_cache_sentinel")?(js=()=>{Te(!1),st(null)},t[75]=js):js=t[75];const nt=js;if(g&&m.length===0){let z;return t[76]===Symbol.for("react.memo_cache_sentinel")?(z=n.jsx("div",{className:"flex flex-1 items-center justify-center",children:n.jsx(bt,{className:"size-5 text-muted-foreground"})}),t[76]=z):z=t[76],z}if(Pt){let z;return t[77]===Symbol.for("react.memo_cache_sentinel")?(z=n.jsx(Zi,{to:".",...jt(void 0),replace:!0}),t[77]=z):z=t[77],z}if(it&&it!==Je)return n.jsx(Zi,{to:".",...jt(it),replace:!0});let bs;t[78]!==e?(bs=e("taskBoard.taskBoard.layoutViewAriaLabel",{label:e("common.taskBoard.feedView")}),t[78]=e,t[79]=bs):bs=t[79];let ot;t[80]!==e?(ot=e("common.taskBoard.feedView"),t[80]=e,t[81]=ot):ot=t[81];const As=ne==="board";let Dt;t[82]!==e?(Dt=e("taskBoard.taskBoard.layoutViewAriaLabel",{label:e("common.taskBoard.boardView")}),t[82]=e,t[83]=Dt):Dt=t[83];let Mt;t[84]!==fe?(Mt=()=>fe("board"),t[84]=fe,t[85]=Mt):Mt=t[85];let Jt;t[86]!==e?(Jt=e("common.taskBoard.boardView"),t[86]=e,t[87]=Jt):Jt=t[87];let Kt;t[88]!==As||t[89]!==Dt||t[90]!==Mt||t[91]!==Jt?(Kt=n.jsx(Ss.Tab,{active:As,"aria-label":Dt,onClick:Mt,children:Jt}),t[88]=As,t[89]=Dt,t[90]=Mt,t[91]=Jt,t[92]=Kt):Kt=t[92];let Ut;t[93]!==e?(Ut=e("taskBoard.taskBoard.layoutViewAriaLabel",{label:e("common.taskBoard.listView")}),t[93]=e,t[94]=Ut):Ut=t[94];let qt;t[95]!==e?(qt=e("common.taskBoard.listView"),t[95]=e,t[96]=qt):qt=t[96];let Gt;t[97]!==e?(Gt=e("taskBoard.taskBoard.layoutViewAriaLabel",{label:e("taskBoard.epics.tab")}),t[97]=e,t[98]=Gt):Gt=t[98];let Vt;t[99]!==e?(Vt=e("taskBoard.epics.tab"),t[99]=e,t[100]=Vt):Vt=t[100];const dn=n.jsxs(Ss.Tabs,{children:[n.jsx(Ss.Tab,{active:ne==="feed","aria-label":bs,onClick:()=>{fe("feed"),Ne()},children:ot}),Kt,n.jsx(Ss.Tab,{active:ne==="list","aria-label":Ut,onClick:()=>{fe("list"),Ne()},children:qt}),n.jsx(Ss.Tab,{active:ne==="epics","aria-label":Gt,onClick:()=>{fe("epics"),Ne()},children:Vt})]}),Hs=z=>n.jsx(dg,{item:z,assignee:z.assigneeId?H.get(z.assigneeId):void 0,assignedBy:z.assignedBy?H.get(z.assignedBy):void 0,members:Q,onOpen:()=>Zt(z),onStatusChange:W=>b.update.mutate({id:z.id,status:W}),onRename:W=>b.update.mutate({id:z.id,title:W}),onPriorityChange:W=>b.update.mutate({id:z.id,priority:W}),onTagsChange:W=>b.update.mutate({id:z.id,tagIds:W}),onDueDateChange:W=>b.update.mutate({id:z.id,dueDate:W}),onAssign:W=>{T(W)||b.update.mutate({id:z.id,assigneeId:W},{onError:A})}},z.id);let ks;t[101]===Symbol.for("react.memo_cache_sentinel")?(ks=n.jsx("div",{className:"mx-auto w-full max-w-[1680px] px-4 sm:px-8",children:n.jsx(r1,{})}),t[101]=ks):ks=t[101];let ys;t[102]!==me||t[103]!==ne||t[104]!==X?(ys=ne==="list"?{grouping:me,sorting:X}:void 0,t[102]=me,t[103]=ne,t[104]=X,t[105]=ys):ys=t[105];const un=n.jsxs(n.Fragment,{children:[!_e&&n.jsxs(n.Fragment,{children:[n.jsx(Ss.Title,{children:e("sidebar.navDestinations.spineTasks")}),n.jsxs(Ss.Actions,{secondary:n.jsxs(n.Fragment,{children:[m.length>0&&ne!=="epics"&&n.jsx(n.Fragment,{children:n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(fd,{value:ae.search,onChange:z=>Qe({...ae,search:z}),label:e("taskBoard.taskFilters.searchLabel"),placeholder:e("taskBoard.taskFilters.searchPlaceholder"),clearLabel:e("taskBoard.taskFilters.searchClearLabel")}),n.jsx(B2,{filters:kt,items:dt,members:Q,tags:x,sprints:k,index:ze,onChange:Qe,onManageSprints:()=>D(!0)}),ne==="list"&&n.jsxs("div",{className:"contents max-md:hidden",children:[n.jsx(C2,{...me}),n.jsx(w2,{...X})]})]})}),n.jsx(A2,{onClick:Xt,label:ds}),w&&n.jsx(y1,{sprints:k,onClose:()=>D(!1)})]}),children:[n.jsx(o1,{}),n.jsx(u1,{isDemoBoard:a.length>0}),n.jsx(d1,{project:c}),ne==="epics"?n.jsxs(ce,{size:"sm",onClick:Is,children:[n.jsx(is,{size:16}),e("taskBoard.epics.newEpic")]}):n.jsx(mo,{label:e("taskBoard.taskBoard.newTask"),children:n.jsxs(ce,{size:"sm",className:"max-md:w-7 max-md:px-0 @max-xl/panel-header:w-7 @max-xl/panel-header:px-0",onClick:Xa,children:[n.jsx(is,{size:16}),n.jsx("span",{"data-folding-label":!0,className:"max-md:sr-only @max-xl/panel-header:sr-only",children:e("taskBoard.taskBoard.newTask")})]})})]}),n.jsx(Ji.Toolbar.Left.Portal,{children:dn}),n.jsx(Ji.Toolbar.Right.Portal,{children:n.jsx(qp,{items:m,onOpen:Zt})})]}),ks,n.jsx(I2,{filters:kt,items:dt,members:Q,tags:x,sprints:k,index:ze,onChange:Qe,view:ys}),m.length===0?n.jsx("div",{className:"mx-auto w-full max-w-[1680px] px-4 pt-6 sm:px-8",children:n.jsx("div",{className:"surface px-4 py-12 text-center text-sm text-muted-foreground",children:e("taskBoard.taskBoard.noTasksYet")})}):gt.length===0?n.jsx("div",{className:"mx-auto w-full max-w-[1680px] px-4 pt-6 sm:px-8",children:n.jsxs("div",{className:"flex flex-col items-center gap-3 surface px-4 py-12 text-center text-sm text-muted-foreground",children:[e("taskBoard.taskBoard.noTasksMatch"),n.jsx(ce,{variant:"outline",size:"sm",onClick:()=>Qe({...lo,project:kt.project}),children:e("taskBoard.taskBoard.clearFilters")})]})}):ne==="feed"?n.jsx(tg,{items:Ct,index:ze,memberByUserId:H,onCompose:z=>b.create.mutate({...z,...d?ue:{}}),onOpen:Zt}):ne==="epics"?n.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto pb-16 px-4 pt-6 sm:px-8",children:n.jsx("div",{className:"mx-auto w-full max-w-[960px]",children:n.jsx($1,{})})}):ne==="board"?n.jsx(Ip,{visible:!_e,items:T1(gt,m),members:Q,memberByUserId:H,selectedIds:Be,onToggleSelect:Pe,onSelectAllInLane:at,onOpen:Zt,onCreate:Za,onMove:(z,W,Re,ct,Ot)=>{const ts=mi(Re,z.length);z.forEach((vs,Os)=>b.update.mutate({id:vs,status:W,sortOrder:ts[Os],...ct.has(vs)&&{priority:ct.get(vs)}},{onSettled:()=>Ot(vs)}))},onAssign:(z,W)=>{T(W)||b.update.mutate({id:z,assigneeId:W},{onError:A})},onPriorityChange:(z,W)=>b.update.mutate({id:z,priority:W}),onTypeChange:(z,W)=>b.update.mutate({id:z,type:W}),onDueDateChange:(z,W)=>b.update.mutate({id:z,dueDate:W}),onAutoFix:z=>{T(Ie)||b.update.mutate({id:z.id,assigneeId:Ie},{onError:A})},onRerun:z=>L([z])}):n.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto pb-16 px-4 pt-6 sm:px-8",children:n.jsx("div",{className:"mx-auto flex w-full max-w-[1680px] flex-col gap-2",children:ve===null?Ct.map(Hs):n.jsx(uc,{groups:Fo(Ct,vt,{memberIds:Q.map(xp),tagIds:x.map(hp),index:ze}),depth:0,toggled:Oe,onToggle:(z,W,Re)=>Ze(ct=>Ym(ct,z,W,Re)),renderRow:Hs,heading:{memberByUserId:H,orgTags:x,index:ze}})})})]}),es=pt?`new-${Xe??"default"}`:"closed",Ys=Xe??void 0;let Tt;t[106]!==b.create||t[107]!==T||t[108]!==nt||t[109]!==ut?(Tt=z=>{if(T(z.assigneeId)){nt();return}b.create.mutate(z),ut(z),nt()},t[106]=b.create,t[107]=T,t[108]=nt,t[109]=ut,t[110]=Tt):Tt=t[110];let zs;t[111]!==b.create.isPending||t[112]!==ue||t[113]!==ge||t[114]!==nt||t[115]!==pt||t[116]!==es||t[117]!==Ys||t[118]!==Tt?(zs=n.jsx(sm,{open:pt,onClose:nt,defaultStatus:Ys,defaultProject:ue,defaultSprintId:ge,isSaving:b.create.isPending,onSubmit:Tt},es),t[111]=b.create.isPending,t[112]=ue,t[113]=ge,t[114]=nt,t[115]=pt,t[116]=es,t[117]=Ys,t[118]=Tt,t[119]=zs):zs=t[119];let $s;t[120]!==B?($s=n.jsx(kd,{mode:"link",open:B,onOpenChange:C}),t[120]=B,t[121]=$s):$s=t[121];let Ht;t[122]===Symbol.for("react.memo_cache_sentinel")?(Ht=z=>!z&&L([]),t[122]=Ht):Ht=t[122];let Rs;t[123]!==b.rerun.isPending||t[124]!==U||t[125]!==R?(Rs=n.jsx(Lm,{items:R,pending:b.rerun.isPending,onOpenChange:Ht,onConfirm:U}),t[123]=b.rerun.isPending,t[124]=U,t[125]=R,t[126]=Rs):Rs=t[126];let Yt;t[127]!==b.removeMany||t[128]!==b.update||t[129]!==T||t[130]!==Ne||t[131]!==m||t[132]!==Q||t[133]!==A||t[134]!==_e||t[135]!==te||t[136]!==Be?(Yt=Be.size>0&&!_e&&n.jsx(Cp,{count:Be.size,members:Q,projectEntries:te,onSetProject:z=>{for(const W of Be)b.update.mutate({id:W,...z});Ne()},onMoveTo:z=>{for(const W of Be)b.update.mutate({id:W,status:z});Ne()},onSetSprint:z=>{for(const W of Be)b.update.mutate({id:W,sprintId:z});Ne()},onSetPriority:z=>{for(const W of Be)b.update.mutate({id:W,priority:z});Ne()},onAddTag:z=>{for(const W of Be){const Re=m.find(Ot=>Ot.id===W);if(!Re)continue;const ct=Re.tags.map(pp);ct.includes(z)||b.update.mutate({id:W,tagIds:[...ct,z]})}Ne()},onAssign:z=>{if(!T(z)){for(const W of Be)b.update.mutate({id:W,assigneeId:z},{onError:A});Ne()}},onSetDueDate:z=>{const W=Hi(z);for(const Re of Be)b.update.mutate({id:Re,dueDate:W});Ne()},onAutoFix:Be.size>0&&Array.from(Be).every(z=>{const W=m.find(Re=>Re.id===z);return W&&(W.status==="triage"||W.status==="todo")&&W.assigneeId!==Ie})?()=>{if(!T(Ie)){for(const z of Be)b.update.mutate({id:z,assigneeId:Ie},{onError:A});Ne()}}:void 0,onRerun:(()=>{const z=Array.from(Be).flatMap(W=>{const Re=m.find(ct=>ct.id===W);return Re?[Re]:[]});return z.length===Be.size&&z.every(mp)?()=>L(z):void 0})(),onDelete:()=>{b.removeMany.mutate(Array.from(Be)),Ne()},onClear:Ne}),t[127]=b.removeMany,t[128]=b.update,t[129]=T,t[130]=Ne,t[131]=m,t[132]=Q,t[133]=A,t[134]=_e,t[135]=te,t[136]=Be,t[137]=Yt):Yt=t[137];const Es=n.jsxs("div",{ref:$,className:"relative flex min-h-0 flex-1 flex-col",children:[n.jsx("div",{className:P("flex min-h-0 flex-1 flex-col",_e&&"hidden"),children:un}),_e&&n.jsx(nm,{item:_e,onClose:()=>Le(),isSaving:b.update.isPending,onSetSprint:z=>b.update.mutate({id:_e.id,sprintId:z},{onError:A}),onSubmit:z=>{if(T(z.assigneeId)){Le();return}b.update.mutate({id:_e.id,...z},{onError:A})},onDelete:()=>{b.remove.mutate(_e.id),Le()},onClone:()=>{b.create.mutate({title:e("taskBoard.taskDialog.cloneTitle",{title:_e.title}),description:_e.description,status:_e.status,priority:_e.priority,repo:_e.repo,virtualMcpId:_e.virtualMcpId,dueDate:_e.dueDate,tagIds:_e.tags.map(gp),sprintId:k.find(z=>z.id===_e.sprintId&&z.state!=="closed")?.id??null}),ut(_e),He.success(e("taskBoard.taskDialog.cloneSuccess")),Le()},onArchive:()=>{b.update.mutate({id:_e.id,status:"archived"}),He.success(e("taskBoard.taskDialog.archiveSuccess")),Le()},onNewChat:()=>{je(_e)},onAutoFix:()=>{T(Ie)||(b.update.mutate({id:_e.id,assigneeId:Ie},{onError:A}),Le())},onRerun:()=>{Le(),L([_e])},onOpenPreview:a.includes(_e.id)?void 0:z=>{z.virtualMcpId&&qe(z.threadId,z.virtualMcpId,{panel:"site-editor"})}},_e.id),zs,$s,Rs,Yt]});return n.jsx(_1,{value:cn,children:Es})}function mp(t){return t.assigneeId===Ie&&t.status!=="done"}function pp(t){return t.id}function gp(t){return t.id}function hp(t){return t.id}function xp(t){return t.userId}function jp(t){return[t.userId,t.user?.name??t.userId]}function bp(){return[]}function kp(t){return t.prs}function yp(t){return{params:e=>({...e,taskKey:t}),search:vp}}function vp(t){return t}function Np(t){return[t.userId,t]}function Sp(t){return t.path}function Bp(t){return t.usable}function Cp(t){const e=E.c(124),{count:s,members:l,projectEntries:i,onSetProject:a,onMoveTo:o,onSetSprint:r,onSetPriority:c,onAddTag:d,onAssign:u,onSetDueDate:f,onAutoFix:m,onRerun:g,onDelete:h,onClear:j}=t,x=J(),{data:k}=Rl();let b;e[0]!==k?(b=k===void 0?[]:k,e[0]=k,e[1]=b):b=e[1];const v=b,p=Ol();let N,y,B,C,w,D,S,T,_,A;if(e[2]!==s||e[3]!==o||e[4]!==r||e[5]!==x||e[6]!==p){const ae=p.filter(wp);C="pointer-events-none absolute inset-x-0 bottom-6 z-20 flex justify-center",A="pointer-events-auto flex items-center gap-2 rounded-full bg-background px-3 py-2 shadow-edge";let ge;e[17]!==s||e[18]!==x?(ge=x("taskBoard.taskBoard.selectedCount",{count:s}),e[17]=s,e[18]=x,e[19]=ge):ge=e[19],e[20]!==ge?(B=n.jsx("span",{className:"pl-1 text-sm font-medium text-foreground",children:ge}),e[20]=ge,e[21]=B):B=e[21],y=Ke;let xe;e[22]!==x?(xe=x("taskBoard.taskBoard.actionsButton"),e[22]=x,e[23]=xe):xe=e[23],e[24]!==xe?(_=n.jsx(Me,{asChild:!0,children:n.jsx(ce,{variant:"outline",size:"sm",children:xe})}),e[24]=xe,e[25]=_):_=e[25],N=Ye,w="center",D="top";let me;e[26]!==x?(me=x("taskBoard.taskBoard.moveToButton"),e[26]=x,e[27]=me):me=e[27];let Ae;e[28]!==me?(Ae=n.jsx(Ps,{children:me}),e[28]=me,e[29]=Ae):Ae=e[29];let X;e[30]!==o||e[31]!==x?(X=qs.map(Oe=>n.jsx(Se,{onClick:()=>o(Oe),children:ht(Oe,x).label},Oe)),e[30]=o,e[31]=x,e[32]=X):X=e[32];let be;e[33]!==X?(be=n.jsx(Ms,{children:X}),e[33]=X,e[34]=be):be=e[34],e[35]!==Ae||e[36]!==be?(S=n.jsxs(Ks,{children:[Ae,be]}),e[35]=Ae,e[36]=be,e[37]=S):S=e[37],T=ae.length>0&&n.jsxs(Ks,{children:[n.jsx(Ps,{children:x("taskBoard.sprints.moveToSprint")}),n.jsxs(Ms,{className:"w-56",children:[n.jsxs(Se,{onClick:()=>r(null),children:[n.jsx(Il,{size:14,className:"text-muted-foreground"}),x("taskBoard.sprints.backlog")]}),ae.map(Oe=>n.jsxs(Se,{onClick:()=>r(Oe.id),children:[n.jsx(Ts,{size:14,className:"text-muted-foreground"}),n.jsx("span",{className:"truncate",children:Cl(Oe,x)})]},Oe.id))]})]}),e[2]=s,e[3]=o,e[4]=r,e[5]=x,e[6]=p,e[7]=N,e[8]=y,e[9]=B,e[10]=C,e[11]=w,e[12]=D,e[13]=S,e[14]=T,e[15]=_,e[16]=A}else N=e[7],y=e[8],B=e[9],C=e[10],w=e[11],D=e[12],S=e[13],T=e[14],_=e[15],A=e[16];let I;e[38]!==x?(I=x("taskBoard.taskBoard.changePriorityButton"),e[38]=x,e[39]=I):I=e[39];let $;e[40]!==I?($=n.jsx(Ps,{children:I}),e[40]=I,e[41]=$):$=e[41];let O;e[42]!==c||e[43]!==x?(O=_s.map(ae=>n.jsxs(Se,{onClick:()=>c(ae),children:[n.jsx("span",{className:P("size-2 rounded-full",et[ae].dotClassName)}),x(et[ae].labelKey)]},ae)),e[42]=c,e[43]=x,e[44]=O):O=e[44];let R;e[45]!==O?(R=n.jsx(Ms,{children:O}),e[45]=O,e[46]=R):R=e[46];let L;e[47]!==$||e[48]!==R?(L=n.jsxs(Ks,{children:[$,R]}),e[47]=$,e[48]=R,e[49]=L):L=e[49];let U;e[50]!==x?(U=x("taskBoard.taskBoard.assignButton"),e[50]=x,e[51]=U):U=e[51];let V;e[52]!==U?(V=n.jsx(Ps,{children:U}),e[52]=U,e[53]=V):V=e[53];let K;e[54]!==l||e[55]!==u?(K=n.jsx(Ms,{className:"w-56 p-0",children:n.jsx(qi,{members:l,onSelect:u})}),e[54]=l,e[55]=u,e[56]=K):K=e[56];let Q;e[57]!==V||e[58]!==K?(Q=n.jsxs(Ks,{children:[V,K]}),e[57]=V,e[58]=K,e[59]=Q):Q=e[59];let H;e[60]!==a||e[61]!==i||e[62]!==x?(H=i.length>0&&n.jsxs(Ks,{children:[n.jsx(Ps,{children:x("taskBoard.taskBoard.assignProjectButton")}),n.jsxs(Ms,{className:"w-64",children:[n.jsx(Se,{onClick:()=>a(rl(null)),children:x("taskBoard.taskDialog.noProject")}),i.map(ae=>n.jsx(Se,{className:"gap-2",onClick:()=>a(rl(ae)),children:n.jsx(Co,{entry:ae})},ae.id))]})]}),e[60]=a,e[61]=i,e[62]=x,e[63]=H):H=e[63];let ee;e[64]!==x?(ee=x("taskBoard.taskBoard.dueDateButton"),e[64]=x,e[65]=ee):ee=e[65];let G;e[66]!==ee?(G=n.jsx(Ps,{children:ee}),e[66]=ee,e[67]=G):G=e[67];let se;e[68]!==f?(se=n.jsx(Ms,{className:"w-auto p-0",children:n.jsx(zi,{mode:"single",onSelect:ae=>ae&&f(ae),initialFocus:!0})}),e[68]=f,e[69]=se):se=e[69];let re;e[70]!==G||e[71]!==se?(re=n.jsxs(Ks,{children:[G,se]}),e[70]=G,e[71]=se,e[72]=re):re=e[72];let le;e[73]!==d||e[74]!==v||e[75]!==x?(le=v.length>0&&n.jsxs(Ks,{children:[n.jsx(Ps,{children:x("taskBoard.taskBoard.addTagButton")}),n.jsx(Ms,{children:v.map(ae=>n.jsxs(Se,{onClick:()=>d(ae.id),children:[n.jsx("span",{className:"size-2 rounded-full",style:{backgroundColor:rn(ae.color)}}),ae.name]},ae.id))})]}),e[73]=d,e[74]=v,e[75]=x,e[76]=le):le=e[76];let F;e[77]===Symbol.for("react.memo_cache_sentinel")?(F=n.jsx(ki,{}),e[77]=F):F=e[77];let q;e[78]!==x?(q=x("taskBoard.taskBoard.deleteSelectedButton"),e[78]=x,e[79]=q):q=e[79];let oe;e[80]!==h||e[81]!==q?(oe=n.jsx(Se,{variant:"destructive",onClick:h,children:q}),e[80]=h,e[81]=q,e[82]=oe):oe=e[82];let ne;e[83]!==N||e[84]!==L||e[85]!==Q||e[86]!==H||e[87]!==re||e[88]!==le||e[89]!==oe||e[90]!==w||e[91]!==D||e[92]!==S||e[93]!==T?(ne=n.jsxs(N,{align:w,side:D,children:[S,T,L,Q,H,re,le,F,oe]}),e[83]=N,e[84]=L,e[85]=Q,e[86]=H,e[87]=re,e[88]=le,e[89]=oe,e[90]=w,e[91]=D,e[92]=S,e[93]=T,e[94]=ne):ne=e[94];let fe;e[95]!==y||e[96]!==ne||e[97]!==_?(fe=n.jsxs(y,{children:[_,ne]}),e[95]=y,e[96]=ne,e[97]=_,e[98]=fe):fe=e[98];let ve;e[99]!==m||e[100]!==x?(ve=m&&n.jsxs(ce,{variant:"outline",size:"sm",onClick:m,children:[n.jsx(_t,{className:"size-3.5"}),x("taskBoard.taskBoard.autoFix")]}),e[99]=m,e[100]=x,e[101]=ve):ve=e[101];let De;e[102]!==g||e[103]!==x?(De=g&&n.jsxs(ce,{variant:"outline",size:"sm",onClick:g,children:[n.jsx(_l,{className:"size-3.5"}),x("taskBoard.taskBoard.rerun")]}),e[102]=g,e[103]=x,e[104]=De):De=e[104];let de;e[105]!==x?(de=x("taskBoard.taskBoard.clearSelectionButton"),e[105]=x,e[106]=de):de=e[106];let pe;e[107]!==x?(pe=x("taskBoard.taskBoard.clearSelectionButton"),e[107]=x,e[108]=pe):pe=e[108];let ye;e[109]===Symbol.for("react.memo_cache_sentinel")?(ye=n.jsx(ll,{size:16}),e[109]=ye):ye=e[109];let ke;e[110]!==j||e[111]!==de||e[112]!==pe?(ke=n.jsx(ce,{variant:"ghost",size:"icon","aria-label":de,title:pe,onClick:j,className:"shrink-0 text-muted-foreground",children:ye}),e[110]=j,e[111]=de,e[112]=pe,e[113]=ke):ke=e[113];let ie;e[114]!==B||e[115]!==fe||e[116]!==ve||e[117]!==De||e[118]!==ke||e[119]!==A?(ie=n.jsxs("div",{className:A,children:[B,fe,ve,De,ke]}),e[114]=B,e[115]=fe,e[116]=ve,e[117]=De,e[118]=ke,e[119]=A,e[120]=ie):ie=e[120];let Ce;return e[121]!==C||e[122]!==ie?(Ce=n.jsx("div",{className:C,children:ie}),e[121]=C,e[122]=ie,e[123]=Ce):Ce=e[123],Ce}function wp(t){return t.state!=="closed"}function Dp(t,e){return t.sortOrder-e.sortOrder}function Tp(){const t=E.c(8),[e,s]=Ni();let l;t[0]!==e.taskBoardLaneVisibility?(l=Fd(e.taskBoardLaneVisibility),t[0]=e.taskBoardLaneVisibility,t[1]=l):l=t[1];const{lanes:i,hidden:a}=l;let o;t[2]!==s?(o=(d,u)=>s(f=>({...f,taskBoardLaneVisibility:{...f.taskBoardLaneVisibility,[d]:u}})),t[2]=s,t[3]=o):o=t[3];const r=o;let c;return t[4]!==a||t[5]!==i||t[6]!==r?(c={lanes:i,hidden:a,setLaneShown:r},t[4]=a,t[5]=i,t[6]=r,t[7]=c):c=t[7],c}function Ir(t,e){return Number(tn(e))-Number(tn(t))||Dp(t,e)}function _p(t){return t.startsWith(_i)||t.startsWith(Ii)}function Ip(t){const e=E.c(35),{items:s,members:l,memberByUserId:i,selectedIds:a,onToggleSelect:o,onSelectAllInLane:r,onOpen:c,onCreate:d,onMove:u,onAutoFix:f,onRerun:m,onAssign:g,onPriorityChange:h,onTypeChange:j,onDueDateChange:x,visible:k}=t,[b,v]=Z.useState(null);let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p=[],e[0]=p):p=e[0];const[N,y]=Z.useState(p);let B;e[1]===Symbol.for("react.memo_cache_sentinel")?(B=new Map,e[1]=B):B=e[1];const[C,w]=Z.useState(B),[D,S]=Ni(),T=Z.useRef(null);let _;e[2]===Symbol.for("react.memo_cache_sentinel")?(_=Y=>{if(T.current=Y,!Y)return;const te=ue=>{if(ue.deltaX!==0||ue.deltaY===0||Y.scrollWidth<=Y.clientWidth||Y.scrollHeight>Y.clientHeight)return;for(let he=ue.target;he&&he!==Y;he=he.parentElement)if(he.hasAttribute("data-lane-scroll"))return;ue.preventDefault();const we=ue.deltaMode===1?16:ue.deltaMode===2?Y.clientWidth:1;Y.scrollLeft=Y.scrollLeft+ue.deltaY*we};return Y.addEventListener("wheel",te,{passive:!1}),()=>{T.current=null,Y.removeEventListener("wheel",te)}},e[2]=_):_=e[2];const A=_,I=C.size>0?s.map(Y=>{const te=C.get(Y.id);return te?{...Y,...te}:Y}):s;if(C.size>0&&!b){const Y=[...C].filter(te=>{const[ue,we]=te,he=s.find(Fe=>Fe.id===ue);return he?.status===we.status&&he.sortOrder===we.sortOrder&&(!we.priority||he.priority===we.priority)});Y.length>0&&w(te=>{const ue=new Map(te);for(const[we]of Y)ue.delete(we);return ue})}Mm(T,I.map(Rp).join(","),b===null,k);const $=Y=>I.filter(te=>te.status===Y).sort(Ir),{lanes:O,hidden:R,setLaneShown:L}=Tp(),U=D.collapsedTaskBoardLanes,V=I.some(tn);let K;if(e[3]!==O||e[4]!==U){let Y;e[6]!==U?(Y=te=>!U.includes(te),e[6]=U,e[7]=Y):Y=e[7],K=O.find(Y),e[3]=O,e[4]=U,e[5]=K}else K=e[5];const Q=K;let H;e[8]!==S?(H=Y=>S(te=>({...te,collapsedTaskBoardLanes:te.collapsedTaskBoardLanes.includes(Y)?te.collapsedTaskBoardLanes.filter(ue=>ue!==Y):[...te.collapsedTaskBoardLanes,Y]})),e[8]=S,e[9]=H):H=e[9];const ee=H,G=Y=>Md({overId:Y,statusOf:te=>I.find(ue=>ue.id===te)?.status});let se;e[10]!==a?(se=Y=>a.has(Y)&&a.size>1?[Y,...Array.from(a).filter(te=>te!==Y)]:[Y],e[10]=a,e[11]=se):se=e[11];const re=se;let le;e[12]!==s?(le=(Y,te,ue,we)=>{const he=we===void 0?null:we,Fe=mi(ue,Y.length);w(We=>{const Ue=new Map(We);return Y.forEach((Pe,at)=>{const Ne=s.find(kt=>kt.id===Pe),Qe=Ne&&he&&ni(Ne,he);Ue.set(Pe,{status:te,sortOrder:Fe[at],...Qe&&{priority:Qe}})}),Ue})},e[12]=s,e[13]=le):le=e[13];const F=le;let q;e[14]===Symbol.for("react.memo_cache_sentinel")?(q={activationConstraint:{distance:4}},e[14]=q):q=e[14];let oe;e[15]===Symbol.for("react.memo_cache_sentinel")?(oe={coordinateGetter:Yc},e[15]=oe):oe=e[15];const ne=Kc(er(qc,q),er(Uc,oe)),fe=(Y,te,ue)=>{const we=s.find(he=>he.id===te);return we?Kd({overId:Y,itemOf:he=>I.find(Fe=>Fe.id===he),fromStatus:we.status,toStatus:ue,dragged:re(te)}):null},ve=Y=>{const te=String(Y.active.id),ue=G(Y.over?.id),we=I.find(Ne=>Ne.id===te),he=s.find(Ne=>Ne.id===te);if(!ue||!we||!he)return;const Fe=fe(Y.over?.id,te,ue),We=Fe&&ni(he,Fe)||void 0;if(we.status===ue&&C.get(te)?.priority===We)return;const Ue=re(te),Pe=String(Y.over?.id??""),at=$(ue).filter(Ne=>!Ue.includes(Ne.id));F(Ue,ue,ir(at,_p(Pe)?null:Pe,te),Fe)},De=Y=>{const te=String(Y.active.id);v(null);const ue=G(Y.over?.id)??I.find(Te=>Te.id===te)?.status;if(!ue){w(new Map);return}const we=re(te),he=$(ue),Fe=String(Y.over?.id??""),We=he.findIndex(Te=>Te.id===te),Ue=Fe.startsWith(Ii)?he.filter(Te=>tn(Te)&&Te.id!==te).length:Fe.startsWith(_i)?he.length-1:he.findIndex(Te=>Te.id===Fe),Pe=We===-1||Ue===-1?he:Wc(he,We,Math.min(Ue,he.length-1)),at=fe(Y.over?.id,te,ue),Ne=new Map;for(const Te of we){const Xe=s.find(qe=>qe.id===Te),st=Xe&&at&&ni(Xe,at);st&&Ne.set(Te,st)}const Qe=s.filter(Te=>Te.status===ue).sort(Ir).map($p).join();if(Ne.size===0&&Qe===Pe.map(zp).join()){w(new Map);return}const kt=Pe.slice(Pe.findIndex(Te=>Te.id===te)+1).find(Te=>!we.includes(Te.id)),dt=ir(he.filter(Te=>!we.includes(Te.id)),kt?.id??null,te);F(we,ue,dt,at),y(we);const pt=new Map(mi(dt,we.length).map((Te,Xe)=>[we[Xe],Te]));u(we,ue,dt,Ne,Te=>w(Xe=>{const st=Xe.get(Te);if(!st||st.status!==ue||st.sortOrder!==pt.get(Te))return Xe;const qe=new Map(Xe);return qe.delete(Te),qe}))},de=b?I.find(Y=>Y.id===b):null,pe=b?re(b):[],ye=Y=>pe.length>0&&pe.every(te=>{const ue=s.find(we=>we.id===te);return!!ue&&!ue.assigneeId&&ue.status!==Y});let ke;e[16]===Symbol.for("react.memo_cache_sentinel")?(ke=Y=>{v(String(Y.active.id)),y([])},e[16]=ke):ke=e[16];let ie;e[17]===Symbol.for("react.memo_cache_sentinel")?(ie=()=>{v(null),w(new Map)},e[17]=ie):ie=e[17];let Ce;e[18]===Symbol.for("react.memo_cache_sentinel")?(Ce=P("mx-auto grid w-full max-w-[1680px]","min-h-full grid-rows-[auto_auto_1fr] gap-x-3 pb-6","px-4 pt-6 sm:px-8"),e[18]=Ce):Ce=e[18];const ae=R.length>0;let ge;e[19]!==O||e[20]!==U||e[21]!==ae?(ge=Ed({lanes:O,collapsed:U,hasHiddenTail:ae}),e[19]=O,e[20]=U,e[21]=ae,e[22]=ge):ge=e[22];let xe;e[23]!==ge?(xe={gridTemplateColumns:ge},e[23]=ge,e[24]=xe):xe=e[24];let me;e[25]!==R||e[26]!==$||e[27]!==L?(me=R.length>0&&n.jsx(Ep,{statuses:R,countOf:Y=>$(Y).length,onShow:Y=>L(Y,!0)}),e[25]=R,e[26]=$,e[27]=L,e[28]=me):me=e[28];const Ae=$c.createPortal,X=Gc,be=null,Oe=de&&n.jsxs("div",{className:"relative w-[292px] cursor-grabbing",children:[n.jsx(dc,{item:de,assignee:de.assigneeId?i.get(de.assigneeId):void 0,assignedBy:de.assignedBy?i.get(de.assignedBy):void 0,selected:a.has(de.id),onOpen:Ap,className:"w-full shadow-lift"}),pe.length>1&&n.jsx("span",{className:"absolute -top-2 -right-2 flex h-5 min-w-5 items-center justify-center rounded-full bg-foreground px-1.5 text-2xs font-semibold text-background",children:pe.length})]});let Ze;e[29]!==X||e[30]!==Oe?(Ze=n.jsx(X,{dropAnimation:be,children:Oe}),e[29]=X,e[30]=Oe,e[31]=Ze):Ze=e[31];let ze;return e[32]!==Ae||e[33]!==Ze?(ze=Ae(Ze,document.body),e[32]=Ae,e[33]=Ze,e[34]=ze):ze=e[34],n.jsxs(Vc,{sensors:ne,collisionDetection:Od,onDragStart:ke,onDragOver:ve,onDragEnd:De,onDragCancel:ie,children:[n.jsx("div",{ref:A,className:"min-h-0 flex-1 overflow-x-auto overflow-y-auto",children:n.jsxs("div",{className:Ce,style:xe,children:[O.map(Y=>n.jsx(Op,{status:Y,items:$(Y),members:l,memberByUserId:i,selectedIds:a,isTarget:de?.status===Y,firesOnDrop:de?.status===Y&&ye(Y),draggedCount:pe.length,hiddenIds:pe,landedIds:N,onToggleSelect:o,onSelectAllInLane:r,onOpen:c,onCreate:d,onAutoFix:f,onRerun:m,onAssign:g,onPriorityChange:h,onTypeChange:j,onDueDateChange:x,onHide:O.length>1?()=>L(Y,!1):void 0,collapsed:U.includes(Y),onToggleCollapsed:()=>ee(Y),labelled:Y===Q,anyCritical:V},Y)),me]})}),ze]})}function Ap(){}function zp(t){return t.id}function $p(t){return t.id}function Rp(t){return`${t.id}:${t.status}`}function Ep(t){const e=E.c(19),{statuses:s,countOf:l,onShow:i}=t,a=J();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(Va,{size:14,className:"shrink-0 transition-transform group-open:rotate-90"}),e[0]=o):o=e[0];let r;e[1]!==a?(r=a("taskBoard.taskBoard.hiddenColumns"),e[1]=a,e[2]=r):r=e[2];let c;e[3]!==r?(c=n.jsxs("summary",{className:"flex cursor-pointer list-none items-center gap-1.5 px-2 py-1.5 text-sm font-medium text-muted-foreground transition-colors hover:text-foreground [&::-webkit-details-marker]:hidden",children:[o,r]}),e[3]=r,e[4]=c):c=e[4];let d;if(e[5]!==l||e[6]!==i||e[7]!==s||e[8]!==a){let m;e[10]!==l||e[11]!==i||e[12]!==a?(m=g=>{const{label:h,visual:j}=ht(g,a),x=j.icon;return n.jsxs("div",{"data-hidden-lane":g,className:"surface flex items-center gap-2 px-3 py-2.5",children:[n.jsx(x,{size:15,className:P("shrink-0",j.iconClassName)}),n.jsx("span",{className:"text-sm font-medium text-foreground",children:h}),n.jsx("span",{className:"ml-auto text-2xs font-medium text-muted-foreground",children:l(g)}),n.jsxs(Ke,{children:[n.jsx(Me,{asChild:!0,children:n.jsx(ce,{variant:"ghost",size:"icon-xs","aria-label":a("taskBoard.taskBoard.laneMenuAriaLabel",{lane:h}),className:"shrink-0 text-muted-foreground",children:n.jsx(Js,{className:"size-3.75"})})}),n.jsx(Ye,{align:"end",children:n.jsx(Se,{onClick:()=>i(g),children:a("taskBoard.taskBoard.showColumn")})})]})]},g)},e[10]=l,e[11]=i,e[12]=a,e[13]=m):m=e[13],d=s.map(m),e[5]=l,e[6]=i,e[7]=s,e[8]=a,e[9]=d}else d=e[9];let u;e[14]!==d?(u=n.jsx("div",{className:"flex flex-col gap-2 px-1 pt-1",children:d}),e[14]=d,e[15]=u):u=e[15];let f;return e[16]!==c||e[17]!==u?(f=n.jsxs("details",{className:"group row-span-3 h-full min-w-0 py-1",children:[c,u]}),e[16]=c,e[17]=u,e[18]=f):f=e[18],f}function Op(t){const e=E.c(155),{status:s,items:l,members:i,memberByUserId:a,selectedIds:o,isTarget:r,firesOnDrop:c,draggedCount:d,hiddenIds:u,landedIds:f,onToggleSelect:m,onSelectAllInLane:g,onOpen:h,onCreate:j,onAutoFix:x,onRerun:k,onAssign:b,onPriorityChange:v,onTypeChange:p,onDueDateChange:N,onHide:y,collapsed:B,onToggleCollapsed:C,labelled:w,anyCritical:D}=t,S=J(),{label:T,visual:_}=ht(s,S),A=_.icon,[I,$]=Z.useState(!1),O=ud(s),R=cd(s).filter(Kp).map(Mp),L=c&&R.length>0,U=`${_i}${s}`;let V;e[0]!==U?(V={id:U},e[0]=U,e[1]=V):V=e[1];const{setNodeRef:K}=tr(V);let Q;e[2]!==s?(Q=Pd(s),e[2]=s,e[3]=Q):Q=e[3];const H=Q,ee=`${Ii}${s}`,G=!H||!D;let se;e[4]!==ee||e[5]!==G?(se={id:ee,disabled:G},e[4]=ee,e[5]=G,e[6]=se):se=e[6];const{setNodeRef:re}=tr(se),le=l.filter(tn),F=l.filter(Pp);let q;e[7]!==u||e[8]!==f||e[9]!==a||e[10]!==i||e[11]!==b||e[12]!==x||e[13]!==N||e[14]!==h||e[15]!==v||e[16]!==k||e[17]!==m||e[18]!==p||e[19]!==o?(q=Ee=>n.jsx(Vp,{item:Ee,assignee:Ee.assigneeId?a.get(Ee.assigneeId):void 0,assignedBy:Ee.assignedBy?a.get(Ee.assignedBy):void 0,members:i,selected:o.has(Ee.id),hidden:u.includes(Ee.id),landed:f.includes(Ee.id),onToggleSelect:()=>m(Ee.id),onOpen:()=>h(Ee),onAutoFix:x?()=>x(Ee):void 0,onRerun:k?()=>k(Ee):void 0,onAssign:b?Le=>b(Ee.id,Le):void 0,onPriorityChange:v?Le=>v(Ee.id,Le):void 0,onTypeChange:p?Le=>p(Ee.id,Le):void 0,onDueDateChange:N?Le=>N(Ee.id,Le):void 0},Ee.id),e[7]=u,e[8]=f,e[9]=a,e[10]=i,e[11]=b,e[12]=x,e[13]=N,e[14]=h,e[15]=v,e[16]=k,e[17]=m,e[18]=p,e[19]=o,e[20]=q):q=e[20];const oe=q;if(B){const Ee=r?"bg-muted":"bg-muted/50";let Le;e[21]!==Ee?(Le=P("flex w-full flex-col items-center gap-2 rounded-xl px-1 py-3 transition-colors",Ee),e[21]=Ee,e[22]=Le):Le=e[22];let rt;e[23]!==l.length?(rt=n.jsx("span",{className:"text-2xs font-medium text-muted-foreground",children:l.length}),e[23]=l.length,e[24]=rt):rt=e[24];let je;e[25]!==T||e[26]!==S?(je=S("taskBoard.taskBoard.expandColumnAriaLabel",{lane:T}),e[25]=T,e[26]=S,e[27]=je):je=e[27];let gt;e[28]===Symbol.for("react.memo_cache_sentinel")?(gt=n.jsx(Wu,{size:15}),e[28]=gt):gt=e[28];let Be;e[29]!==C||e[30]!==je?(Be=n.jsx(Bs,{asChild:!0,children:n.jsx("button",{type:"button","aria-label":je,onClick:C,className:Ja,children:gt})}),e[29]=C,e[30]=je,e[31]=Be):Be=e[31];let vt;e[32]!==S?(vt=S("taskBoard.taskBoard.expandColumn"),e[32]=S,e[33]=vt):vt=e[33];let $t;e[34]!==vt?($t=n.jsx(Cs,{side:"right",children:vt}),e[34]=vt,e[35]=$t):$t=e[35];let Ct;return e[36]!==Be||e[37]!==$t?(Ct=n.jsxs(ws,{children:[Be,$t]}),e[36]=Be,e[37]=$t,e[38]=Ct):Ct=e[38],n.jsx("div",{ref:K,"data-lane":s,"data-lane-collapsed":"","data-drop-target":r||void 0,className:"group/lane row-span-3 flex h-full min-h-0 min-w-0 flex-col items-center py-1",children:n.jsxs("div",{className:Le,children:[n.jsx(A,{size:15,className:P("shrink-0",_.iconClassName.replace(/\banimate-\S+\b/g,"").trim())}),n.jsx("span",{className:"text-sm font-medium text-foreground [writing-mode:vertical-rl]",children:T}),rt,Ct]})})}const ne=L?"bg-special/15 ring-1 ring-inset ring-special/30":r&&"bg-muted/50";let fe;e[39]!==ne?(fe=P("group/lane min-h-0 min-w-0 rounded-xl py-1 transition-colors","row-span-3 grid grid-rows-subgrid max-md:flex max-md:flex-col",ne),e[39]=ne,e[40]=fe):fe=e[40];const ve=r?"bg-muted":"bg-background";let De;e[41]!==ve?(De=P("sticky top-0 z-10 flex min-w-0 flex-col transition-colors",ve),e[41]=ve,e[42]=De):De=e[42];let de;e[43]!==l.length?(de=n.jsx("span",{className:"rounded-md bg-muted px-1.5 text-2xs font-medium text-muted-foreground",children:l.length}),e[43]=l.length,e[44]=de):de=e[44];const pe=r?"from-muted from-70%":"from-background from-70%";let ye;e[45]!==pe?(ye=P("absolute inset-y-0 right-1 flex items-center gap-0.5 bg-linear-to-l to-transparent pl-8 opacity-0 transition-opacity group-hover/lane:opacity-100 group-data-[drop-target]/lane:opacity-100 focus-within:opacity-100 has-data-[state=open]:opacity-100",pe),e[45]=pe,e[46]=ye):ye=e[46];const ke=O&&n.jsxs(ws,{children:[n.jsx(Bs,{asChild:!0,children:n.jsx("button",{type:"button","aria-label":S("taskBoard.columnRules.menuItem"),onClick:()=>$(!0),className:Ja,children:n.jsx(rd,{size:13})})}),n.jsx(Cs,{side:"bottom",className:"max-w-64",children:S(O)})]});let ie;e[47]!==T||e[48]!==S?(ie=S("taskBoard.taskBoard.laneMenuAriaLabel",{lane:T}),e[47]=T,e[48]=S,e[49]=ie):ie=e[49];let Ce;e[50]===Symbol.for("react.memo_cache_sentinel")?(Ce=n.jsx(Js,{size:15}),e[50]=Ce):Ce=e[50];let ae;e[51]!==ie?(ae=n.jsx(Bs,{asChild:!0,children:n.jsx(Me,{asChild:!0,children:n.jsx("button",{type:"button","aria-label":ie,className:Ja,children:Ce})})}),e[51]=ie,e[52]=ae):ae=e[52];let ge;e[53]!==T||e[54]!==S?(ge=S("taskBoard.taskBoard.laneMenuAriaLabel",{lane:T}),e[53]=T,e[54]=S,e[55]=ge):ge=e[55];let xe;e[56]!==ge?(xe=n.jsx(Cs,{side:"top",children:ge}),e[56]=ge,e[57]=xe):xe=e[57];let me;e[58]!==ae||e[59]!==xe?(me=n.jsxs(ws,{children:[ae,xe]}),e[58]=ae,e[59]=xe,e[60]=me):me=e[60];let Ae;e[61]!==$?(Ae=()=>$(!0),e[61]=$,e[62]=Ae):Ae=e[62];let X;e[63]===Symbol.for("react.memo_cache_sentinel")?(X=n.jsx(si,{size:14}),e[63]=X):X=e[63];let be;e[64]!==S?(be=S("taskBoard.columnRules.menuItem"),e[64]=S,e[65]=be):be=e[65];let Oe;e[66]!==Ae||e[67]!==be?(Oe=n.jsxs(Se,{onClick:Ae,children:[X,be]}),e[66]=Ae,e[67]=be,e[68]=Oe):Oe=e[68];let Ze;e[69]!==g||e[70]!==s?(Ze=()=>g(s),e[69]=g,e[70]=s,e[71]=Ze):Ze=e[71];let ze;e[72]!==S?(ze=S("taskBoard.taskBoard.selectAllInLane"),e[72]=S,e[73]=ze):ze=e[73];let Y;e[74]!==Ze||e[75]!==ze?(Y=n.jsx(Se,{onClick:Ze,children:ze}),e[74]=Ze,e[75]=ze,e[76]=Y):Y=e[76];let te;e[77]!==y||e[78]!==S?(te=y&&n.jsx(Se,{onClick:y,children:S("taskBoard.taskBoard.hideColumn")}),e[77]=y,e[78]=S,e[79]=te):te=e[79];let ue;e[80]!==Oe||e[81]!==Y||e[82]!==te?(ue=n.jsxs(Ye,{align:"end",children:[Oe,Y,te]}),e[80]=Oe,e[81]=Y,e[82]=te,e[83]=ue):ue=e[83];let we;e[84]!==me||e[85]!==ue?(we=n.jsxs(Ke,{children:[me,ue]}),e[84]=me,e[85]=ue,e[86]=we):we=e[86];let he;e[87]!==T||e[88]!==S?(he=S("taskBoard.taskBoard.newTaskInLaneAriaLabel",{lane:T}),e[87]=T,e[88]=S,e[89]=he):he=e[89];let Fe;e[90]!==j||e[91]!==s?(Fe=()=>j(s),e[90]=j,e[91]=s,e[92]=Fe):Fe=e[92];let We;e[93]===Symbol.for("react.memo_cache_sentinel")?(We=n.jsx(is,{size:15}),e[93]=We):We=e[93];let Ue;e[94]!==he||e[95]!==Fe?(Ue=n.jsx(Bs,{asChild:!0,children:n.jsx("button",{type:"button","aria-label":he,onClick:Fe,className:Ja,children:We})}),e[94]=he,e[95]=Fe,e[96]=Ue):Ue=e[96];let Pe;e[97]!==T||e[98]!==S?(Pe=S("taskBoard.taskBoard.newTaskInLaneTitle",{lane:T}),e[97]=T,e[98]=S,e[99]=Pe):Pe=e[99];let at;e[100]!==Pe?(at=n.jsx(Cs,{side:"top",children:Pe}),e[100]=Pe,e[101]=at):at=e[101];let Ne;e[102]!==Ue||e[103]!==at?(Ne=n.jsxs(ws,{children:[Ue,at]}),e[102]=Ue,e[103]=at,e[104]=Ne):Ne=e[104];let Qe;e[105]!==T||e[106]!==S?(Qe=S("taskBoard.taskBoard.collapseColumnAriaLabel",{lane:T}),e[105]=T,e[106]=S,e[107]=Qe):Qe=e[107];let kt;e[108]===Symbol.for("react.memo_cache_sentinel")?(kt=n.jsx(Qu,{size:15}),e[108]=kt):kt=e[108];let dt;e[109]!==C||e[110]!==Qe?(dt=n.jsx(Bs,{asChild:!0,children:n.jsx("button",{type:"button","aria-label":Qe,onClick:C,className:Ja,children:kt})}),e[109]=C,e[110]=Qe,e[111]=dt):dt=e[111];let pt;e[112]!==S?(pt=S("taskBoard.taskBoard.collapseColumn"),e[112]=S,e[113]=pt):pt=e[113];let Te;e[114]!==pt?(Te=n.jsx(Cs,{side:"top",children:pt}),e[114]=pt,e[115]=Te):Te=e[115];let Xe;e[116]!==dt||e[117]!==Te?(Xe=n.jsxs(ws,{children:[dt,Te]}),e[116]=dt,e[117]=Te,e[118]=Xe):Xe=e[118];let st;e[119]!==ye||e[120]!==ke||e[121]!==we||e[122]!==Ne||e[123]!==Xe?(st=n.jsxs("div",{className:ye,children:[ke,we,Ne,Xe]}),e[119]=ye,e[120]=ke,e[121]=we,e[122]=Ne,e[123]=Xe,e[124]=st):st=e[124];const qe=D?n.jsxs("div",{className:P("flex min-h-0 min-w-0 flex-col gap-3 px-1 pt-4.5",!H&&"invisible"),children:[n.jsx(zr,{visible:w,icon:qr,iconClassName:"text-destructive",label:S("taskBoard.taskBoard.swimlaneCritical")}),n.jsx("div",{ref:re,"data-lane-scroll":H?s:void 0,className:Ar,children:n.jsx(sr,{items:le.map(Fp),strategy:nr,children:le.map(oe)})})]}):n.jsx("div",{}),At=D?"pt-7":"pt-4.5";let Bt;e[125]!==At?(Bt=P("flex min-h-0 min-w-0 flex-col gap-3 px-1 pb-1",At),e[125]=At,e[126]=Bt):Bt=e[126];let Ge;e[127]!==S?(Ge=S("taskBoard.taskBoard.swimlaneImprovements"),e[127]=S,e[128]=Ge):Ge=e[128];let yt;e[129]!==w||e[130]!==Ge?(yt=n.jsx(zr,{visible:w,icon:si,iconClassName:"text-muted-foreground",label:Ge}),e[129]=w,e[130]=Ge,e[131]=yt):yt=e[131];let Xt;e[132]===Symbol.for("react.memo_cache_sentinel")?(Xt=P(Ar,"pb-16"),e[132]=Xt):Xt=e[132];const xt=F.map(Lp),ds=F.map(oe);let lt;e[133]!==xt||e[134]!==ds?(lt=n.jsx(sr,{items:xt,strategy:nr,children:ds}),e[133]=xt,e[134]=ds,e[135]=lt):lt=e[135];let zt;e[136]!==K||e[137]!==s||e[138]!==lt?(zt=n.jsx("div",{ref:K,"data-lane-scroll":s,className:Xt,children:lt}),e[136]=K,e[137]=s,e[138]=lt,e[139]=zt):zt=e[139];let Je;e[140]!==Bt||e[141]!==yt||e[142]!==zt?(Je=n.jsxs("div",{className:Bt,children:[yt,zt]}),e[140]=Bt,e[141]=yt,e[142]=zt,e[143]=Je):Je=e[143];let jt;e[144]!==qe||e[145]!==Je?(jt=n.jsxs(n.Fragment,{children:[qe,Je]}),e[144]=qe,e[145]=Je,e[146]=jt):jt=e[146];const _e=dd,Pt=_.iconClassName.replace(/\banimate-\S+\b/g,"").trim();let it;return e[147]!==A||e[148]!==_e||e[149]!==T||e[150]!==I||e[151]!==$||e[152]!==s||e[153]!==Pt?(it=n.jsx(_e,{columnKey:s,label:T,icon:A,iconClassName:Pt,open:I,onOpenChange:$}),e[147]=A,e[148]=_e,e[149]=T,e[150]=I,e[151]=$,e[152]=s,e[153]=Pt,e[154]=it):it=e[154],n.jsxs("div",{"data-lane":s,"data-drop-target":r||void 0,className:fe,children:[n.jsxs("div",{className:De,children:[n.jsxs("div",{className:"relative flex items-center gap-2 px-2 py-1.5",children:[n.jsx(A,{size:15,className:P("shrink-0",_.iconClassName.replace(/\banimate-\S+\b/g,"").trim())}),n.jsx("span",{title:T,className:"min-w-0 truncate text-sm font-medium text-foreground",children:T}),de,st]}),L&&n.jsxs("div",{role:"status",className:"mx-1 mb-1.5 flex items-center gap-2 rounded-lg border border-special/30 bg-background px-3 py-2 text-xs text-special",children:[n.jsx(si,{size:14,className:"shrink-0"}),n.jsx("span",{children:S(d>1?"taskBoard.dropHint.pickUpMany":"taskBoard.dropHint.pickUp",{names:R.join(", ")})})]})]}),jt,it]})}function Lp(t){return t.id}function Fp(t){return t.id}function Pp(t){return!tn(t)}function Mp(t){return t.name}function Kp(t){return t.active}const Ar="flex flex-1 flex-col gap-3 rounded-xl bg-muted/50 p-2";function Up(t){const e=Date.parse(t);if(Number.isNaN(e))return"";const s=Math.max(0,Math.floor((Date.now()-e)/6e4));if(s<60)return`${s}m`;const l=Math.floor(s/60);return l<24?`${l}h`:`${Math.floor(l/24)}d`}function qp(t){const e=E.c(47),{items:s,onOpen:l}=t,i=J(),{org:a}=tt(),[o,r]=Z.useState(!1);let c,d,u,f,m,g,h,j,x,k,b,v,p;if(e[0]!==s||e[1]!==l||e[2]!==o||e[3]!==a||e[4]!==i){m=Symbol.for("react.early_return_sentinel");e:{const C=Hr(s);if(C.length===0){m=null;break e}d=ns,v=o,p=r;let w;e[18]===Symbol.for("react.memo_cache_sentinel")?(w=n.jsx(mt,{size:18}),e[18]=w):w=e[18];const D=n.jsx(Ua,{asChild:!0,variant:"brand",size:"control",children:n.jsxs("button",{type:"button",children:[w,C.length===1?i("taskBoard.taskBoard.agentsRunningOne"):i("taskBoard.taskBoard.agentsRunningMany",{count:C.length})]})});e[19]!==D?(f=n.jsx(ss,{asChild:!0,children:D}),e[19]=D,e[20]=f):f=e[20],c=as,h="w-[400px] p-0",j="end",x="bottom",k=Gp;let S;e[21]!==i?(S=i("taskBoard.taskBoard.agentsRunningHeading"),e[21]=i,e[22]=S):S=e[22];let T;e[23]!==S?(T=n.jsx("span",{className:"text-sm font-medium text-foreground",children:S}),e[23]=S,e[24]=T):T=e[24],b=n.jsxs("div",{className:"flex items-center gap-2 px-4 pt-3.5 pb-1.5",children:[T,n.jsx("span",{className:"text-sm tabular-nums text-muted-foreground",children:C.length})]}),u="flex max-h-[420px] flex-col overflow-y-auto p-1.5";let _;e[25]!==s||e[26]!==l||e[27]!==a||e[28]!==i?(_=A=>{const I=s.find(L=>L.id===A.taskId);if(!I)return null;const{label:$,visual:O}=ht(I.status,i),R=O.icon;return n.jsxs("button",{type:"button",onClick:()=>{r(!1),l(I)},className:"flex w-full min-w-0 items-center gap-3 rounded-xl px-3 py-2.5 text-left outline-none transition-colors hover:bg-accent focus-visible:bg-accent",children:[n.jsx(bt,{className:"size-4 shrink-0 text-muted-foreground"}),n.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[n.jsx("span",{className:"truncate text-sm font-medium text-foreground",children:A.runTitle??A.taskTitle}),n.jsxs("span",{className:"flex min-w-0 items-center gap-1.5 text-xs text-muted-foreground",children:[n.jsx(R,{size:13,className:P("shrink-0",O.iconClassName)}),n.jsx("span",{className:"shrink-0",children:$}),n.jsx("span",{"aria-hidden":!0,children:"ยท"}),n.jsx("span",{className:"truncate",children:A.runTitle&&A.runTitle!==A.taskTitle?A.taskTitle:ln(a.slug,I.keySeq)})]})]}),n.jsx("span",{className:"shrink-0 text-xs tabular-nums text-muted-foreground",children:Up(A.startedAt)})]},A.threadId)},e[25]=s,e[26]=l,e[27]=a,e[28]=i,e[29]=_):_=e[29],g=C.map(_)}e[0]=s,e[1]=l,e[2]=o,e[3]=a,e[4]=i,e[5]=c,e[6]=d,e[7]=u,e[8]=f,e[9]=m,e[10]=g,e[11]=h,e[12]=j,e[13]=x,e[14]=k,e[15]=b,e[16]=v,e[17]=p}else c=e[5],d=e[6],u=e[7],f=e[8],m=e[9],g=e[10],h=e[11],j=e[12],x=e[13],k=e[14],b=e[15],v=e[16],p=e[17];if(m!==Symbol.for("react.early_return_sentinel"))return m;let N;e[30]!==u||e[31]!==g?(N=n.jsx("div",{className:u,children:g}),e[30]=u,e[31]=g,e[32]=N):N=e[32];let y;e[33]!==c||e[34]!==N||e[35]!==h||e[36]!==j||e[37]!==x||e[38]!==k||e[39]!==b?(y=n.jsxs(c,{className:h,align:j,side:x,onOpenAutoFocus:k,children:[b,N]}),e[33]=c,e[34]=N,e[35]=h,e[36]=j,e[37]=x,e[38]=k,e[39]=b,e[40]=y):y=e[40];let B;return e[41]!==d||e[42]!==f||e[43]!==y||e[44]!==v||e[45]!==p?(B=n.jsxs(d,{open:v,onOpenChange:p,children:[f,y]}),e[41]=d,e[42]=f,e[43]=y,e[44]=v,e[45]=p,e[46]=B):B=e[46],B}function Gp(t){return t.preventDefault()}function zr(t){const e=E.c(12),{visible:s,icon:l,iconClassName:i,label:a}=t,o=!s||void 0,r=!s&&"invisible";let c;e[0]!==r?(c=P("flex items-center gap-2 px-1 py-0.5 text-sm font-medium text-muted-foreground",r),e[0]=r,e[1]=c):c=e[1];let d;e[2]!==i?(d=P("shrink-0",i),e[2]=i,e[3]=d):d=e[3];let u;e[4]!==l||e[5]!==d?(u=n.jsx(l,{size:15,className:d}),e[4]=l,e[5]=d,e[6]=u):u=e[6];let f;return e[7]!==a||e[8]!==o||e[9]!==c||e[10]!==u?(f=n.jsxs("span",{"aria-hidden":o,className:c,children:[u,a]}),e[7]=a,e[8]=o,e[9]=c,e[10]=u,e[11]=f):f=e[11],f}function Vp(t){const e=E.c(33);let s,l,i,a;e[0]!==t?({item:l,hidden:s,landed:i,...a}=t,e[0]=t,e[1]=s,e[2]=l,e[3]=i,e[4]=a):(s=e[1],l=e[2],i=e[3],a=e[4]);const o=!!cs()&&l.isEpic;let r;e[5]!==o||e[6]!==l.id?(r={id:l.id,disabled:o},e[5]=o,e[6]=l.id,e[7]=r):r=e[7];const{attributes:c,listeners:d,setNodeRef:u,transform:f,transition:m,isDragging:g}=Qc(r),h=l.id,j=l.status;let x;e[8]!==c||e[9]!==d?(x={attributes:c,listeners:d},e[8]=c,e[9]=d,e[10]=x):x=e[10];const k=i&&"animate-card-land";let b;e[11]!==k?(b=P("w-full",k),e[11]=k,e[12]=b):b=e[12];let v;e[13]!==f?(v=Hc.Translate.toString(f),e[13]=f,e[14]=v):v=e[14];const p=g||s?0:void 0;let N;e[15]!==v||e[16]!==p||e[17]!==m?(N={transform:v,transition:m,opacity:p},e[15]=v,e[16]=p,e[17]=m,e[18]=N):N=e[18];let y;e[19]!==l||e[20]!==a||e[21]!==u||e[22]!==x||e[23]!==b||e[24]!==N?(y=n.jsx(dc,{...a,item:l,dragRef:u,bindings:x,className:b,style:N}),e[19]=l,e[20]=a,e[21]=u,e[22]=x,e[23]=b,e[24]=N,e[25]=y):y=e[25];let B;e[26]!==l.id||e[27]!==l.status||e[28]!==y?(B=n.jsx("div",{className:"flex","data-flip-id":h,"data-flip-lane":j,children:y}),e[26]=l.id,e[27]=l.status,e[28]=y,e[29]=B):B=e[29];let C;return e[30]!==l||e[31]!==B?(C=n.jsx(cc,{item:l,children:B}),e[30]=l,e[31]=B,e[32]=C):C=e[32],C}function cc(t){const e=E.c(15),{item:s,children:l}=t,i=J(),a=Lc(),{org:o}=tt();let r;e[0]!==s||e[1]!==o||e[2]!==a?(r=()=>{const{href:h}=a.buildLocation({to:".",params:j=>({...j,taskKey:pi(o.slug,s)}),search:Hp});window.open(h,"_blank","noopener")},e[0]=s,e[1]=o,e[2]=a,e[3]=r):r=e[3];const c=r;let d;e[4]!==l?(d=n.jsx(hd,{asChild:!0,children:l}),e[4]=l,e[5]=d):d=e[5];let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(Ka,{}),e[6]=u):u=e[6];let f;e[7]!==i?(f=i("taskBoard.taskBoard.openInNewTab"),e[7]=i,e[8]=f):f=e[8];let m;e[9]!==c||e[10]!==f?(m=n.jsx(xd,{children:n.jsxs(jd,{onSelect:c,children:[u,f]})}),e[9]=c,e[10]=f,e[11]=m):m=e[11];let g;return e[12]!==d||e[13]!==m?(g=n.jsxs(bd,{children:[d,m]}),e[12]=d,e[13]=m,e[14]=g):g=e[14],g}function Hp(t){return t}function dc(t){const e=E.c(77),{item:s,assignee:l,assignedBy:i,members:a,selected:o,className:r,dragRef:c,bindings:d,style:u,onToggleSelect:f,onOpen:m,onAutoFix:g,onRerun:h,onAssign:j,onPriorityChange:x,onTypeChange:k,onDueDateChange:b}=t,v=J(),p=rc(s),N=cs();let y;e[0]!==N||e[1]!==s.id||e[2]!==s.isEpic||e[3]!==s.parentId?(y=!!N&&(s.isEpic||!!s.parentId||N.items.some(q=>q.parentId===s.id)),e[0]=N,e[1]=s.id,e[2]=s.isEpic,e[3]=s.parentId,e[4]=y):y=e[4];const B=y;let C;e[5]!==s?(C=zl(s),e[5]=s,e[6]=C):C=e[6];const w=C;let D,S,T,_,A,I,$,O,R,L,U,V;if(e[7]!==d?.attributes||e[8]!==d?.listeners||e[9]!==r||e[10]!==c||e[11]!==s||e[12]!==g||e[13]!==m||e[14]!==h||e[15]!==f||e[16]!==w||e[17]!==o||e[18]!==u||e[19]!==v){S=Ld(s)?v("taskBoard.taskBoard.blockedBadgeTitle"):null;const q=g&&(s.status==="triage"||s.status==="todo")&&s.assigneeId!==Ie,oe=h&&!q&&s.assigneeId===Ie&&s.status!=="done";D=q?{icon:_t,label:v("taskBoard.taskBoard.autoFix"),onClick:g}:oe?{icon:_l,label:v("taskBoard.taskBoard.rerun"),onClick:h}:null,R="button",L=c,U=u,V=d?.attributes,T=d?.listeners,e[32]!==m||e[33]!==f?(_=ne=>{ne.shiftKey&&f?f():m()},e[32]=m,e[33]=f,e[34]=_):_=e[34],A=P("group relative flex shrink-0 cursor-grab flex-col gap-3 rounded-xl px-3.5 pt-3.5 pb-2.5 text-left shadow-edge active:cursor-grabbing",o?"bg-accent hover:bg-secondary-hover":S?"bg-warning/10 hover:bg-warning/15":"bg-card surface-interactive",w==="failed"?"shadow-edge-destructive":S&&"shadow-edge-warning",r),O="flex items-start gap-2",$="relative min-w-0 flex-1 text-[14px] font-[450] leading-snug",I=P("block text-foreground line-clamp-2 wrap-anywhere",D&&"group-hover:fade-text-end"),e[7]=d?.attributes,e[8]=d?.listeners,e[9]=r,e[10]=c,e[11]=s,e[12]=g,e[13]=m,e[14]=h,e[15]=f,e[16]=w,e[17]=o,e[18]=u,e[19]=v,e[20]=D,e[21]=S,e[22]=T,e[23]=_,e[24]=A,e[25]=I,e[26]=$,e[27]=O,e[28]=R,e[29]=L,e[30]=U,e[31]=V}else D=e[20],S=e[21],T=e[22],_=e[23],A=e[24],I=e[25],$=e[26],O=e[27],R=e[28],L=e[29],U=e[30],V=e[31];let K;e[35]!==s.title||e[36]!==I?(K=n.jsx("span",{className:I,children:s.title}),e[35]=s.title,e[36]=I,e[37]=K):K=e[37];let Q;e[38]!==D?(Q=D&&n.jsx(ap,{action:D}),e[38]=D,e[39]=Q):Q=e[39];let H;e[40]!==K||e[41]!==Q||e[42]!==$?(H=n.jsxs("div",{className:$,children:[K,Q]}),e[40]=K,e[41]=Q,e[42]=$,e[43]=H):H=e[43];let ee;e[44]!==S?(ee=S&&n.jsx("span",{className:"sr-only",children:S}),e[44]=S,e[45]=ee):ee=e[45];let G;e[46]!==w?(G=w&&n.jsx(ic,{state:w}),e[46]=w,e[47]=G):G=e[47];let se;e[48]!==H||e[49]!==ee||e[50]!==G||e[51]!==O?(se=n.jsxs("div",{className:O,children:[H,ee,G]}),e[48]=H,e[49]=ee,e[50]=G,e[51]=O,e[52]=se):se=e[52];let re;e[53]!==B||e[54]!==s?(re=(s.tags.length>0||s.sprintId||B)&&n.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1.5",children:[n.jsx(A1,{item:s}),n.jsx(I1,{item:s}),n.jsx(z1,{item:s}),n.jsx(lc,{sprintId:s.sprintId}),s.tags.slice(0,Ds).map(Yp),s.tags.length>Ds&&n.jsxs("span",{className:os,children:["+",s.tags.length-Ds]})]}),e[53]=B,e[54]=s,e[55]=re):re=e[55];let le;e[56]!==i||e[57]!==l||e[58]!==p||e[59]!==s||e[60]!==a||e[61]!==j||e[62]!==b||e[63]!==x||e[64]!==k?(le=n.jsx(ac,{item:s,checks:p,assignee:l,assignedBy:i,members:a,onAssign:j,onPriorityChange:x,onTypeChange:k,onDueDateChange:b}),e[56]=i,e[57]=l,e[58]=p,e[59]=s,e[60]=a,e[61]=j,e[62]=b,e[63]=x,e[64]=k,e[65]=le):le=e[65];let F;return e[66]!==T||e[67]!==_||e[68]!==A||e[69]!==se||e[70]!==re||e[71]!==le||e[72]!==R||e[73]!==L||e[74]!==U||e[75]!==V?(F=n.jsxs("button",{type:R,ref:L,style:U,...V,...T,onClick:_,className:A,children:[se,re,le]}),e[66]=T,e[67]=_,e[68]=A,e[69]=se,e[70]=re,e[71]=le,e[72]=R,e[73]=L,e[74]=U,e[75]=V,e[76]=F):F=e[76],F}function Yp(t){return n.jsx(Qi,{tag:t},t.id)}const Wp={blocked:{labelKey:"taskBoard.feed.eventBlocked",badgeClassName:"border-warning/40 text-warning"},handed:{labelKey:"taskBoard.feed.eventHanded",badgeClassName:"border-warning/40 text-warning"},running:{labelKey:"taskBoard.feed.eventRunning",badgeClassName:"border-primary/40 text-primary"},failed:{labelKey:"taskBoard.feed.eventFailed",badgeClassName:"border-destructive/40 text-destructive"},done:{labelKey:"taskBoard.feed.eventDone",badgeClassName:"border-success/40 text-success",namesLane:!0},delivered:{labelKey:"taskBoard.feed.eventDelivered",badgeClassName:"border-success/40 text-success"},review:{labelKey:"taskBoard.feed.eventReview",badgeClassName:"border-border text-muted-foreground",namesLane:!0}},Qp=new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit"}),Xp=new Intl.DateTimeFormat(void 0,{weekday:"long",month:"short",day:"numeric"});function Zp(t){const e=E.c(50),{item:s,bucket:l,author:i,assignee:a,onOpen:o}=t,r=J(),c=Wp[M2(s)];let d;e[0]!==s.status||e[1]!==r?(d=ht(s.status,r),e[0]=s.status,e[1]=r,e[2]=d):d=e[2];const u=d,f=u.visual.icon;let m;e[3]!==s.description||e[4]!==s.threads?(m=s.threads.filter(Di)[0]?.lastMessage??s.description,e[3]=s.description,e[4]=s.threads,e[5]=m):m=e[5];const g=m,h=!i&&s.assigneeId===Ie;let j;e[6]!==a?.user?.name||e[7]!==i?.user?.name||e[8]!==h||e[9]!==r?(j=h?r("taskBoard.taskDialog.superAgentLabel"):i?.user?.name??a?.user?.name,e[6]=a?.user?.name,e[7]=i?.user?.name,e[8]=h,e[9]=r,e[10]=j):j=e[10];const x=j,k=yo(s.threads),b=rc(s),v="button",p="surface surface-interactive flex w-full flex-col gap-3 p-4 text-left";let N;e[11]!==c||e[12]!==s.tags||e[13]!==r?(N=(s.tags.length>0||c)&&n.jsxs("span",{className:"flex flex-wrap items-center gap-x-2 gap-y-1.5",children:[c&&n.jsx("span",{className:P(os,"shrink-0",c.badgeClassName),children:r(c.labelKey)}),s.tags.slice(0,Ds).map(Jp),s.tags.length>Ds&&n.jsxs("span",{className:os,children:["+",s.tags.length-Ds]})]}),e[11]=c,e[12]=s.tags,e[13]=r,e[14]=N):N=e[14];let y;e[15]!==s.title?(y=n.jsx("span",{className:"text-base leading-snug font-medium text-foreground",children:s.title}),e[15]=s.title,e[16]=y):y=e[16];let B;e[17]!==g||e[18]!==x?(B=g&&n.jsxs("span",{className:"truncate text-sm leading-relaxed text-muted-foreground",children:[x&&n.jsxs("span",{className:"font-medium text-foreground",children:[x,": "]}),g]}),e[17]=g,e[18]=x,e[19]=B):B=e[19];let C;e[20]!==y||e[21]!==B?(C=n.jsxs("span",{className:"flex min-w-0 flex-col gap-1",children:[y,B]}),e[20]=y,e[21]=B,e[22]=C):C=e[22];const w=ac;let D;e[23]!==s.updatedAt?(D=Qp.format(new Date(s.updatedAt)),e[23]=s.updatedAt,e[24]=D):D=e[24];let S;e[25]!==D?(S=n.jsx("span",{className:"shrink-0 text-xs tabular-nums text-muted-foreground",children:D}),e[25]=D,e[26]=S):S=e[26];let T;e[27]!==l?(T=l&&n.jsxs("span",{className:P(oi,"text-foreground"),children:[n.jsx(ls,{entry:l}),l.title]}),e[27]=l,e[28]=T):T=e[28];let _;e[29]!==f||e[30]!==c?.namesLane||e[31]!==u.label||e[32]!==u.visual.iconClassName?(_=!c?.namesLane&&n.jsxs("span",{className:oi,children:[n.jsx(f,{size:on,className:u.visual.iconClassName}),u.label]}),e[29]=f,e[30]=c?.namesLane,e[31]=u.label,e[32]=u.visual.iconClassName,e[33]=_):_=e[33];const A=k&&n.jsx("span",{className:P(oi,"tabular-nums"),title:r(k.runCount===1?"taskBoard.taskDialog.costTooltipSingular":"taskBoard.taskDialog.costTooltipPlural",{runs:String(k.runCount)}),children:k.total.toLocaleString(void 0,{style:"currency",currency:"USD"})});let I;e[34]!==T||e[35]!==_||e[36]!==A?(I=n.jsxs(n.Fragment,{children:[T,_,A]}),e[34]=T,e[35]=_,e[36]=A,e[37]=I):I=e[37];let $;e[38]!==w||e[39]!==a||e[40]!==b||e[41]!==s||e[42]!==S||e[43]!==I?($=n.jsx(w,{item:s,checks:b,assignee:a,trailing:S,leading:I}),e[38]=w,e[39]=a,e[40]=b,e[41]=s,e[42]=S,e[43]=I,e[44]=$):$=e[44];let O;return e[45]!==o||e[46]!==$||e[47]!==N||e[48]!==C?(O=n.jsxs("button",{type:v,onClick:o,className:p,children:[N,C,$]}),e[45]=o,e[46]=$,e[47]=N,e[48]=C,e[49]=O):O=e[49],O}function Jp(t){return n.jsx(Qi,{tag:t},t.id)}function eg(t){const e=E.c(90),{onCreated:s}=t,l=J(),[i,a]=Z.useState(""),[o,r]=Z.useState(""),[c,d]=Z.useState(qs[0]),[u,f]=Z.useState("medium"),[m,g]=Z.useState(Bl),[h,j]=Z.useState(!1);let x;e[0]!==i?(x=i.trim(),e[0]=i,e[1]=x):x=e[1];const k=x;let b;e[2]!==o||e[3]!==s||e[4]!==u||e[5]!==c||e[6]!==k||e[7]!==m?(b=()=>{k&&(s({title:k,description:o.trim(),status:c,priority:u,type:m}),a(""),r(""),d(qs[0]),f("medium"),g(Bl),j(!1))},e[2]=o,e[3]=s,e[4]=u,e[5]=c,e[6]=k,e[7]=m,e[8]=b):b=e[8];const v=b;let p;e[9]!==c||e[10]!==l?(p=ht(c,l),e[9]=c,e[10]=l,e[11]=p):p=e[11];const N=p,y=N.visual.icon,B=et[u],C=B.icon,w=It[m],D=w.icon;let S,T;e[12]===Symbol.for("react.memo_cache_sentinel")?(S=ie=>a(ie.target.value),T=()=>j(!0),e[12]=S,e[13]=T):(S=e[12],T=e[13]);let _;e[14]!==v?(_=ie=>{ie.key==="Enter"&&!ie.shiftKey&&(ie.preventDefault(),v())},e[14]=v,e[15]=_):_=e[15];let A;e[16]!==l?(A=l("taskBoard.feed.composerPlaceholder"),e[16]=l,e[17]=A):A=e[17];let I;e[18]!==_||e[19]!==A||e[20]!==i?(I=n.jsx("input",{value:i,onChange:S,onFocus:T,onKeyDown:_,placeholder:A,className:"w-full bg-transparent text-base font-medium text-foreground outline-none placeholder:text-muted-foreground"}),e[18]=_,e[19]=A,e[20]=i,e[21]=I):I=e[21];let $;e[22]!==o||e[23]!==h||e[24]!==l?($=(h||o)&&n.jsx("textarea",{value:o,onChange:ie=>r(ie.target.value),rows:2,placeholder:l("taskBoard.feed.composerDescriptionPlaceholder"),className:"w-full resize-none bg-transparent text-sm text-foreground outline-none placeholder:text-muted-foreground"}),e[22]=o,e[23]=h,e[24]=l,e[25]=$):$=e[25];let O;e[26]!==I||e[27]!==$?(O=n.jsxs("div",{className:"flex flex-col gap-1 px-4 pt-4 pb-4",children:[I,$]}),e[26]=I,e[27]=$,e[28]=O):O=e[28];let R;e[29]!==y||e[30]!==N.visual.iconClassName?(R=n.jsx(y,{size:14,className:N.visual.iconClassName}),e[29]=y,e[30]=N.visual.iconClassName,e[31]=R):R=e[31];let L;e[32]!==N.label||e[33]!==R?(L=n.jsx(Me,{asChild:!0,children:n.jsxs(ce,{variant:"outline",size:"sm",children:[R,N.label]})}),e[32]=N.label,e[33]=R,e[34]=L):L=e[34];let U;e[35]!==l?(U=qs.map(ie=>{const{label:Ce,visual:ae}=ht(ie,l),ge=ae.icon;return n.jsxs(Se,{onSelect:()=>d(ie),className:"gap-2",children:[n.jsx(ge,{size:16,className:ae.iconClassName}),Ce]},ie)}),e[35]=l,e[36]=U):U=e[36];let V;e[37]!==U?(V=n.jsx(Ye,{align:"start",className:"w-44",children:U}),e[37]=U,e[38]=V):V=e[38];let K;e[39]!==L||e[40]!==V?(K=n.jsxs(Ke,{children:[L,V]}),e[39]=L,e[40]=V,e[41]=K):K=e[41];let Q;e[42]!==D||e[43]!==w.iconClassName?(Q=n.jsx(D,{size:14,className:w.iconClassName}),e[42]=D,e[43]=w.iconClassName,e[44]=Q):Q=e[44];let H;e[45]!==l||e[46]!==w.labelKey?(H=l(w.labelKey),e[45]=l,e[46]=w.labelKey,e[47]=H):H=e[47];let ee;e[48]!==Q||e[49]!==H?(ee=n.jsx(Me,{asChild:!0,children:n.jsxs(ce,{variant:"outline",size:"sm",children:[Q,H]})}),e[48]=Q,e[49]=H,e[50]=ee):ee=e[50];let G;e[51]!==l?(G=Ti.map(ie=>{const Ce=It[ie].icon;return n.jsxs(Se,{onSelect:()=>g(ie),className:"gap-2",children:[n.jsx(Ce,{size:16,className:It[ie].iconClassName}),l(It[ie].labelKey)]},ie)}),e[51]=l,e[52]=G):G=e[52];let se;e[53]!==G?(se=n.jsx(Ye,{align:"start",className:"w-44",children:G}),e[53]=G,e[54]=se):se=e[54];let re;e[55]!==ee||e[56]!==se?(re=n.jsxs(Ke,{children:[ee,se]}),e[55]=ee,e[56]=se,e[57]=re):re=e[57];let le;e[58]!==C||e[59]!==B.iconClassName?(le=n.jsx(C,{size:14,className:B.iconClassName}),e[58]=C,e[59]=B.iconClassName,e[60]=le):le=e[60];let F;e[61]!==B.labelKey||e[62]!==l?(F=l(B.labelKey),e[61]=B.labelKey,e[62]=l,e[63]=F):F=e[63];let q;e[64]!==le||e[65]!==F?(q=n.jsx(Me,{asChild:!0,children:n.jsxs(ce,{variant:"outline",size:"sm",children:[le,F]})}),e[64]=le,e[65]=F,e[66]=q):q=e[66];let oe;e[67]!==l?(oe=_s.map(ie=>{const Ce=et[ie].icon;return n.jsxs(Se,{onSelect:()=>f(ie),className:"gap-2",children:[n.jsx(Ce,{size:16,className:et[ie].iconClassName}),l(et[ie].labelKey)]},ie)}),e[67]=l,e[68]=oe):oe=e[68];let ne;e[69]!==oe?(ne=n.jsx(Ye,{align:"start",className:"w-40",children:oe}),e[69]=oe,e[70]=ne):ne=e[70];let fe;e[71]!==q||e[72]!==ne?(fe=n.jsxs(Ke,{children:[q,ne]}),e[71]=q,e[72]=ne,e[73]=fe):fe=e[73];let ve;e[74]!==K||e[75]!==re||e[76]!==fe?(ve=n.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[K,re,fe]}),e[74]=K,e[75]=re,e[76]=fe,e[77]=ve):ve=e[77];const De=!k;let de;e[78]!==l?(de=l("taskBoard.feed.composerSubmit"),e[78]=l,e[79]=de):de=e[79];let pe;e[80]!==v||e[81]!==De||e[82]!==de?(pe=n.jsx(ce,{size:"sm",disabled:De,onClick:v,children:de}),e[80]=v,e[81]=De,e[82]=de,e[83]=pe):pe=e[83];let ye;e[84]!==ve||e[85]!==pe?(ye=n.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 border-t border-border px-3 py-3",children:[ve,pe]}),e[84]=ve,e[85]=pe,e[86]=ye):ye=e[86];let ke;return e[87]!==O||e[88]!==ye?(ke=n.jsxs("div",{className:"surface focus-within-ring flex flex-col",children:[O,ye]}),e[87]=O,e[88]=ye,e[89]=ke):ke=e[89],ke}function tg(t){const e=E.c(32),{items:s,index:l,memberByUserId:i,onCompose:a,onOpen:o}=t,r=J();let c,d,u,f,m,g;if(e[0]!==l||e[1]!==s||e[2]!==i||e[3]!==a||e[4]!==o||e[5]!==r){const v=q2(s,new Date);g="flex min-h-0 flex-1 flex-col px-4 pt-6 sm:px-8",m="mx-auto flex min-h-0 w-full max-w-[760px] flex-1 flex-col gap-6",u="flex min-h-0 min-w-0 flex-1 flex-col",e[12]!==a?(f=n.jsx(eg,{onCreated:a}),e[12]=a,e[13]=f):f=e[13],c="min-h-0 flex-1 overflow-y-auto -mx-2 px-2 pt-5 pb-16 [mask-image:linear-gradient(to_bottom,transparent,#000_20px)]";let p;e[14]!==l||e[15]!==i||e[16]!==o||e[17]!==r?(p=N=>n.jsxs("section",{className:"flex flex-col",children:[n.jsx("h2",{className:"mt-3 mb-4 px-1 text-xs font-medium text-muted-foreground",children:N.relative==="today"?r("taskBoard.feed.today"):N.relative==="yesterday"?r("taskBoard.feed.yesterday"):Xp.format(N.date)}),n.jsx("div",{className:"flex flex-col gap-2",children:N.items.map(y=>n.jsx(Zp,{item:y,bucket:Ei(y,l),assignee:y.assigneeId?i.get(y.assigneeId):void 0,author:i.get(y.updatedBy),onOpen:()=>o(y)},y.id))})]},N.key),e[14]=l,e[15]=i,e[16]=o,e[17]=r,e[18]=p):p=e[18],d=v.map(p),e[0]=l,e[1]=s,e[2]=i,e[3]=a,e[4]=o,e[5]=r,e[6]=c,e[7]=d,e[8]=u,e[9]=f,e[10]=m,e[11]=g}else c=e[6],d=e[7],u=e[8],f=e[9],m=e[10],g=e[11];let h;e[19]!==c||e[20]!==d?(h=n.jsx("div",{className:c,children:d}),e[19]=c,e[20]=d,e[21]=h):h=e[21];let j;e[22]!==u||e[23]!==f||e[24]!==h?(j=n.jsxs("div",{className:u,children:[f,h]}),e[22]=u,e[23]=f,e[24]=h,e[25]=j):j=e[25];let x;e[26]!==m||e[27]!==j?(x=n.jsx("div",{className:m,children:j}),e[26]=m,e[27]=j,e[28]=x):x=e[28];let k;return e[29]!==g||e[30]!==x?(k=n.jsx("div",{className:g,children:x}),e[29]=g,e[30]=x,e[31]=k):k=e[31],k}function uc(t){const e=E.c(8),{groups:s,depth:l,toggled:i,onToggle:a,renderRow:o,heading:r}=t,c=J();let d;return e[0]!==l||e[1]!==s||e[2]!==r||e[3]!==a||e[4]!==o||e[5]!==c||e[6]!==i?(d=s.map(u=>{const f=Po(u,i),{glyph:m,label:g}=sg(u,{...r,t:c});return n.jsxs("section",{"data-list-group":u.path,className:"flex flex-col gap-2",children:[n.jsxs(ws,{delayDuration:600,children:[n.jsx(Bs,{asChild:!0,children:n.jsxs("button",{type:"button","aria-expanded":f,onClick:h=>a(u,s,h.altKey),className:P("flex items-center gap-2.5 rounded-lg px-3 py-2 text-left text-sm font-medium text-foreground transition-colors",l===0?"bg-muted/60 hover:bg-accent":"bg-muted/30 hover:bg-accent"),children:[n.jsx(Va,{size:14,className:P("shrink-0 text-muted-foreground transition-transform",f&&"rotate-90")}),n.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center",children:m}),n.jsx("span",{className:"truncate",children:g}),n.jsx("span",{className:"text-muted-foreground",children:u.items.length})]})}),n.jsx(Cs,{side:"top",align:"start",children:c("taskBoard.viewControls.groupToggleAllHint")})]}),f&&n.jsx("div",{className:"ml-[18px] flex flex-col gap-2 border-l-[1.5px] border-muted-foreground/30 pl-3",children:u.children?n.jsx(uc,{groups:u.children,depth:l+1,toggled:i,onToggle:a,renderRow:o,heading:r}):u.items.map(o)})]},u.path)}),e[0]=l,e[1]=s,e[2]=r,e[3]=a,e[4]=o,e[5]=c,e[6]=i,e[7]=d):d=e[7],d}function sg(t,{memberByUserId:e,orgTags:s,index:l,t:i}){const{key:a,groupBy:o}=t;switch(o){case"status":{const{label:r,visual:c}=ht(a,i),d=c.icon;return{glyph:n.jsx(d,{size:15,className:P("shrink-0",c.iconClassName)}),label:r}}case"priority":{const r=_s.find(u=>u===a);if(!r)return{glyph:null,label:a};const c=et[r],d=c.icon;return{glyph:n.jsx(d,{size:15,className:P("shrink-0",c.iconClassName)}),label:i(c.labelKey)}}case"assignee":{if(a===Ie)return{glyph:n.jsx(mt,{size:16}),label:i("taskBoard.taskFilters.assigneeSuperAgent")};if(a===Gs)return{glyph:n.jsx(Qs,{size:15,className:"shrink-0 text-muted-foreground"}),label:i("taskBoard.taskFilters.assigneeUnassigned")};const r=e.get(a);return{glyph:n.jsx(ft,{url:r?.user?.image??void 0,fallback:r?.user?.name??"?",shape:"circle",size:"2xs"}),label:r?.user?.name??i("taskBoard.taskFilters.assigneeMember")}}case"tags":{if(a===hi)return{glyph:n.jsx("span",{className:"size-2 shrink-0 rounded-full border border-muted-foreground/50"}),label:i("taskBoard.viewControls.groupNoTags")};const r=s.find(c=>c.id===a)??t.items[0]?.tags.find(c=>c.id===a);return{glyph:n.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:rn(r?.color)}}),label:r?.name??a}}case"project":{if(a===nn)return{glyph:n.jsx(ls,{entry:void 0}),label:i("taskBoard.taskFilters.projectNone")};const r=sn(a,l);return{glyph:n.jsx(ls,{entry:r}),label:r?.title??a}}default:return o}}function ng(t){const e=E.c(22),{item:s,onStatusChange:l}=t,i=J();let a;e[0]!==s.status?(a=Sl(s.status),e[0]=s.status,e[1]=a):a=e[1];const o=a.icon;let r;e[2]!==s.status||e[3]!==i?(r=i("taskBoard.taskBoard.changeStatusLabel",{status:ht(s.status,i).label}),e[2]=s.status,e[3]=i,e[4]=r):r=e[4];let c;e[5]!==s?(c=P(Qr(s)),e[5]=s,e[6]=c):c=e[6];let d;e[7]!==o||e[8]!==c?(d=n.jsx(o,{size:16,className:c}),e[7]=o,e[8]=c,e[9]=d):d=e[9];let u;e[10]!==r||e[11]!==d?(u=n.jsx(Me,{asChild:!0,children:n.jsx("button",{type:"button","aria-label":r,className:"shrink-0 rounded-md p-1 transition-colors hover:bg-accent",children:d})}),e[10]=r,e[11]=d,e[12]=u):u=e[12];let f;e[13]!==s.status||e[14]!==l||e[15]!==i?(f=qs.map(h=>{const{label:j,visual:x}=ht(h,i),k=x.icon;return n.jsxs(Se,{className:"gap-2",onSelect:()=>{h!==s.status&&l(h)},children:[n.jsx(k,{size:16,className:x.iconClassName}),j,h===s.status&&n.jsx(Us,{size:14,className:"ml-auto shrink-0"})]},h)}),e[13]=s.status,e[14]=l,e[15]=i,e[16]=f):f=e[16];let m;e[17]!==f?(m=n.jsx(Ye,{align:"start",className:"w-48",children:f}),e[17]=f,e[18]=m):m=e[18];let g;return e[19]!==u||e[20]!==m?(g=n.jsxs(Ke,{children:[u,m]}),e[19]=u,e[20]=m,e[21]=g):g=e[21],g}const ag=250;function lg(t){const e=E.c(18),{title:s,onOpen:l,onRename:i}=t,a=J(),[o,r]=Z.useState(!1),c=Z.useRef(void 0);if(o){let m;e[0]!==a?(m=a("taskBoard.taskBoard.renameTaskLabel"),e[0]=a,e[1]=m):m=e[1];let g;e[2]!==i||e[3]!==s?(g=x=>{r(!1);const k=x.currentTarget.value.trim();k&&k!==s&&i(k)},e[2]=i,e[3]=s,e[4]=g):g=e[4];let h;e[5]!==s?(h=x=>{x.key==="Enter"&&x.currentTarget.blur(),x.key==="Escape"&&(x.stopPropagation(),x.currentTarget.value=s,x.currentTarget.blur())},e[5]=s,e[6]=h):h=e[6];let j;return e[7]!==m||e[8]!==g||e[9]!==h||e[10]!==s?(j=n.jsx("input",{autoFocus:!0,defaultValue:s,"aria-label":m,onFocus:ig,onBlur:g,onKeyDown:h,className:"min-w-0 flex-1 rounded-sm bg-transparent text-sm text-foreground outline-none ring-1 ring-ring"}),e[7]=m,e[8]=g,e[9]=h,e[10]=s,e[11]=j):j=e[11],j}let d;e[12]!==l?(d=m=>{clearTimeout(c.current),m.detail===0?l():m.detail===1&&(c.current=setTimeout(l,ag))},e[12]=l,e[13]=d):d=e[13];let u;e[14]===Symbol.for("react.memo_cache_sentinel")?(u=()=>{clearTimeout(c.current),r(!0)},e[14]=u):u=e[14];let f;return e[15]!==d||e[16]!==s?(f=n.jsx("button",{type:"button",onClick:d,onDoubleClick:u,className:"min-w-0 flex-1 truncate text-left text-sm text-foreground",children:s}),e[15]=d,e[16]=s,e[17]=f):f=e[17],f}function ig(t){return t.currentTarget.select()}function rg(t){const e=E.c(40),{tags:s,onChange:l}=t,i=J(),{data:a}=Rl();let o;e[0]!==a?(o=a===void 0?[]:a,e[0]=a,e[1]=o):o=e[1];const r=o,c=to(),d=so();let u;e[2]!==s?(u=s.map(cg),e[2]=s,e[3]=u):u=e[3];const f=u;let m;e[4]!==i?(m=i("taskBoard.taskBoard.editTagsLabel"),e[4]=i,e[5]=m):m=e[5];let g;e[6]!==i?(g=i("taskBoard.taskBoard.editTagsLabel"),e[6]=i,e[7]=g):g=e[7];const h=s.length===0&&ec;let j;e[8]!==h?(j=P("hidden shrink-0 items-center gap-1.5 rounded-full sm:inline-flex",h),e[8]=h,e[9]=j):j=e[9];let x;e[10]!==s?(x=s.length===0?n.jsx("span",{className:os,children:n.jsx(is,{size:on})}):n.jsxs(n.Fragment,{children:[s.slice(0,Ds).map(og),s.length>Ds&&n.jsxs("span",{className:os,children:["+",s.length-Ds]})]}),e[10]=s,e[11]=x):x=e[11];let k;e[12]!==m||e[13]!==g||e[14]!==j||e[15]!==x?(k=n.jsx(ss,{asChild:!0,children:n.jsx("button",{type:"button","aria-label":m,title:g,className:j,children:x})}),e[12]=m,e[13]=g,e[14]=j,e[15]=x,e[16]=k):k=e[16];let b;e[17]!==r.length?(b=Jr(r.length),e[17]=r.length,e[18]=b):b=e[18];let v;e[19]!==l||e[20]!==f?(v=C=>l(f.includes(C)?f.filter(w=>w!==C):[...f,C]),e[19]=l,e[20]=f,e[21]=v):v=e[21];let p;e[22]!==c||e[23]!==l||e[24]!==f?(p=async(C,w)=>{const D=await c.mutateAsync({name:C,color:w});l([...f,D.id])},e[22]=c,e[23]=l,e[24]=f,e[25]=p):p=e[25];let N;e[26]!==d||e[27]!==l||e[28]!==f?(N=C=>{d.mutate(C),f.includes(C)&&l(f.filter(w=>w!==C))},e[26]=d,e[27]=l,e[28]=f,e[29]=N):N=e[29];let y;e[30]!==r||e[31]!==b||e[32]!==v||e[33]!==p||e[34]!==N||e[35]!==f?(y=n.jsx(as,{align:"end",className:"w-56 p-0",children:n.jsx(wo,{tags:r,selectedIds:f,defaultColor:b,onToggle:v,onCreate:p,onDelete:N})}),e[30]=r,e[31]=b,e[32]=v,e[33]=p,e[34]=N,e[35]=f,e[36]=y):y=e[36];let B;return e[37]!==y||e[38]!==k?(B=n.jsxs(ns,{children:[k,y]}),e[37]=y,e[38]=k,e[39]=B):B=e[39],B}function og(t){return n.jsx(Qi,{tag:t},t.id)}function cg(t){return t.id}function dg(t){const e=E.c(61),{item:s,assignee:l,assignedBy:i,members:a,onOpen:o,onStatusChange:r,onRename:c,onPriorityChange:d,onTagsChange:u,onDueDateChange:f,onAssign:m}=t,{org:g}=tt();let h;e[0]!==s.keySeq||e[1]!==g.slug?(h=ln(g.slug,s.keySeq),e[0]=s.keySeq,e[1]=g.slug,e[2]=h):h=e[2];const j=h;let x;e[3]!==s?(x=zl(s),e[3]=s,e[4]=x):x=e[4];const k=x;let b;e[5]!==s||e[6]!==r?(b=n.jsx(ng,{item:s,onStatusChange:r}),e[5]=s,e[6]=r,e[7]=b):b=e[7];let v;e[8]!==s.priority||e[9]!==d?(v=n.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center",children:n.jsx(tc,{priority:s.priority,onChange:d})}),e[8]=s.priority,e[9]=d,e[10]=v):v=e[10];let p;e[11]!==j?(p=j&&n.jsx("span",{className:"hidden w-16 shrink-0 font-mono text-xs text-muted-foreground sm:inline",children:j}),e[11]=j,e[12]=p):p=e[12];let N;e[13]!==s.title||e[14]!==o||e[15]!==c?(N=n.jsx(lg,{title:s.title,onOpen:o,onRename:c}),e[13]=s.title,e[14]=o,e[15]=c,e[16]=N):N=e[16];let y;e[17]!==k?(y=k&&n.jsx(ic,{state:k}),e[17]=k,e[18]=y):y=e[18];let B;e[19]!==s?(B=wi(s)&&n.jsx(W2,{}),e[19]=s,e[20]=B):B=e[20];let C;e[21]!==s?(C=Zr(s)&&n.jsx(Q2,{}),e[21]=s,e[22]=C):C=e[22];let w;e[23]!==s.sprintId?(w=s.sprintId&&n.jsx("span",{className:"hidden sm:inline-flex",children:n.jsx(lc,{sprintId:s.sprintId})}),e[23]=s.sprintId,e[24]=w):w=e[24];let D;e[25]!==s.tags||e[26]!==u?(D=n.jsx(rg,{tags:s.tags,onChange:u}),e[25]=s.tags,e[26]=u,e[27]=D):D=e[27];let S;e[28]!==s.status||e[29]!==s.statusSince?(S=s.statusSince&&n.jsx("span",{className:"hidden sm:inline-flex",children:n.jsx(rp,{status:s.status,since:s.statusSince})}),e[28]=s.status,e[29]=s.statusSince,e[30]=S):S=e[30];let T;e[31]!==s.dueDate||e[32]!==f?(T=n.jsx("span",{className:"hidden sm:inline-flex",children:n.jsx(nc,{iso:s.dueDate,onChange:f})}),e[31]=s.dueDate,e[32]=f,e[33]=T):T=e[33];let _;e[34]!==i||e[35]!==l||e[36]!==s||e[37]!==a||e[38]!==m?(_=n.jsx("span",{className:"flex w-5 shrink-0 justify-center",children:n.jsx(oc,{item:s,assignee:l,assignedBy:i,members:a,onAssign:m})}),e[34]=i,e[35]=l,e[36]=s,e[37]=a,e[38]=m,e[39]=_):_=e[39];let A;e[40]!==s.createdAt?(A=Tl(new Date(s.createdAt)),e[40]=s.createdAt,e[41]=A):A=e[41];let I;e[42]!==A?(I=n.jsx("span",{className:"hidden w-12 shrink-0 text-right text-xs tabular-nums text-muted-foreground sm:inline",children:A}),e[42]=A,e[43]=I):I=e[43];let $;e[44]!==w||e[45]!==D||e[46]!==S||e[47]!==T||e[48]!==_||e[49]!==I||e[50]!==b||e[51]!==v||e[52]!==p||e[53]!==N||e[54]!==y||e[55]!==B||e[56]!==C?($=n.jsxs("div",{className:"group flex h-11 items-center gap-3 px-3 transition-colors hover:bg-accent",children:[b,v,p,N,y,B,C,w,D,S,T,_,I]}),e[44]=w,e[45]=D,e[46]=S,e[47]=T,e[48]=_,e[49]=I,e[50]=b,e[51]=v,e[52]=p,e[53]=N,e[54]=y,e[55]=B,e[56]=C,e[57]=$):$=e[57];let O;return e[58]!==s||e[59]!==$?(O=n.jsx(cc,{item:s,children:$}),e[58]=s,e[59]=$,e[60]=O):O=e[60],O}function Bh(t){const e=E.c(5),{seed:s,children:l}=t;let i;e[0]!==s?(i=()=>{const r=new Fc({defaultOptions:{queries:{staleTime:1/0,gcTime:1/0,retry:!1,refetchOnMount:!1,refetchOnWindowFocus:!1,refetchOnReconnect:!1,refetchInterval:!1}}});return s(r),r},e[0]=s,e[1]=i):i=e[1];const[a]=Z.useState(i);let o;return e[2]!==l||e[3]!==a?(o=n.jsx("div",{"aria-hidden":"true",inert:!0,className:"pointer-events-none absolute inset-0 select-none overflow-hidden",children:n.jsx(Pc,{fallback:null,children:n.jsx(Z.Suspense,{fallback:null,children:n.jsx(Mc,{client:a,children:l})})})}),e[2]=l,e[3]=a,e[4]=o):o=e[4],o}const $r=new Date().toISOString();function Fs(t,e,s,l,i,a){return{harnessId:"claude-code",parentId:null,isEpic:!1,id:t,organizationId:"preview",title:e,description:null,repositoryId:null,virtualMcpId:null,sprintId:null,status:s,priority:i,type:l,assigneeId:null,assignedBy:null,repo:null,dueDate:null,sortOrder:a,keySeq:a,externalUrl:null,previewRoutes:[],source:null,retryAttempts:0,reviewCycleStartedAt:null,threads:[],tags:[],reviewVerdicts:[],statusSince:null,createdBy:"preview",createdAt:$r,updatedBy:"preview",updatedAt:$r}}function Ch(){return{items:[Fs("p1","Fix checkout shipping estimate","triage","bug","high",1),Fs("p2","Add size guide to product page","triage","feature","medium",2),Fs("p3","Compress hero images","triage","chore","low",3),Fs("p4","Rewrite category descriptions","in_progress","feature","medium",4),Fs("p5","Audit broken redirects","in_progress","chore","high",5),Fs("p6","New arrivals landing page","in_review","feature","high",6),Fs("p7","Speed up search results","qa","chore","medium",7),Fs("p8","Black Friday banner","done","feature","urgent",8)],repos:[],columns:[],demoFrozenItemIds:[]}}export{Bh as P,Sh as T,Ch as m};