@whoz-oss/coday-client 3.3.1 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/{chunk-Cix5vmvF.js → chunk-0Vh5lyZK.js} +1 -1
- package/browser/{chunk-qRp_60F5.js → chunk-309mcMST.js} +1 -1
- package/browser/{chunk-CLcLLGWk.js → chunk-3ZsX4ZgS.js} +1 -1
- package/browser/{chunk-8v01wE3r.js → chunk-4GO2M8hT.js} +1 -1
- package/browser/{chunk-tYI69pxY.js → chunk-8tkEJANN.js} +1 -1
- package/browser/{chunk-jg8IIJti.js → chunk-B-VPDMd-.js} +1 -1
- package/browser/{chunk-D29_gPoW.js → chunk-B1NBvx67.js} +1 -1
- package/browser/{chunk-Ddve8eXJ.js → chunk-B8eYgbiK.js} +1 -1
- package/browser/{chunk-Wl0Mu9Ba.js → chunk-BBAS2_RT.js} +1 -1
- package/browser/{chunk-BReEzJTt.js → chunk-BBIOnLKr.js} +1 -1
- package/browser/{chunk-yr_6-dSo.js → chunk-BCFfyeMI.js} +1 -1
- package/browser/{chunk-BTSq1yp8.js → chunk-BE5BA5B4.js} +1 -1
- package/browser/{chunk-D4g4I30m.js → chunk-BELvJ8hu.js} +1 -1
- package/browser/{chunk-BOoQVfiw.js → chunk-BY6hwFXp.js} +1 -1
- package/browser/{chunk-zjf6Y2-q.js → chunk-Bbmmdt_f.js} +1 -1
- package/browser/{chunk-DS855pzA.js → chunk-BkJ_QNI6.js} +1 -1
- package/browser/{chunk-BUtf9yKK.js → chunk-BnW3N14A.js} +1 -1
- package/browser/{chunk-Dg1d1XBn.js → chunk-BoNA4fJz.js} +1 -1
- package/browser/{chunk-FIgfn9bI.js → chunk-BoVLpL7Z.js} +1 -1
- package/browser/{chunk-BhDrA9iN.js → chunk-BxI7jpz_.js} +1 -1
- package/browser/chunk-C3bVyvCC.js +2 -0
- package/browser/{chunk-xH-xVbwT.js → chunk-CA1fZ5_Q.js} +1 -1
- package/browser/{chunk-ciSHZI2F.js → chunk-CAZxbE68.js} +1 -1
- package/browser/{chunk-8Z_HvjaL.js → chunk-CBq1zNMs.js} +1 -1
- package/browser/{chunk-2_BBR3ej.js → chunk-CDyGWj0V.js} +1 -1
- package/browser/{chunk-DJBbIbii.js → chunk-CIsTlMrZ.js} +1 -1
- package/browser/{chunk-DvXqS7Sb.js → chunk-CUJZQ4UR.js} +1 -1
- package/browser/{chunk-FQTKLHXY.js → chunk-C_hp_VDq.js} +1 -1
- package/browser/{chunk-Bu8NHsWv.js → chunk-C_qUg4bH.js} +1 -1
- package/browser/{chunk-B22dvHxJ.js → chunk-Ck8v7bTv.js} +1 -1
- package/browser/{chunk-CcXOwTvX.js → chunk-Cn0FSvue.js} +1 -1
- package/browser/{chunk-BPp7UKCF.js → chunk-CsQMEH2N.js} +1 -1
- package/browser/{chunk-BHJPoh3M.js → chunk-Csv2uMFT.js} +1 -1
- package/browser/{chunk-BbMMjtpL.js → chunk-CzzKvJ6f.js} +1 -1
- package/browser/{chunk-By8x10iE.js → chunk-D41-hZBF.js} +1 -1
- package/browser/{chunk-wTW1YRSg.js → chunk-D4WR8qG4.js} +1 -1
- package/browser/{chunk-B7c_faZK.js → chunk-D4ehIKRn.js} +1 -1
- package/browser/{chunk-MT0Figq0.js → chunk-DJSlGrxA.js} +1 -1
- package/browser/{chunk-GHmZXChc.js → chunk-DL0Qzq5H.js} +1 -1
- package/browser/{chunk-BcqjfPzD.js → chunk-DNNmz0J7.js} +1 -1
- package/browser/{chunk-BB4zCw7X.js → chunk-DPzNeSq_.js} +1 -1
- package/browser/{chunk-CinHjHqk.js → chunk-DUXGBaAU.js} +3 -3
- package/browser/{chunk-rHrSoLcV.js → chunk-DXYxKL4O.js} +1 -1
- package/browser/{chunk-Cm0tD0om.js → chunk-DXbXll23.js} +1 -1
- package/browser/{chunk-8OK_6DuK.js → chunk-DayWt1hO.js} +1 -1
- package/browser/chunk-DbVl9TZ7.js +1 -0
- package/browser/{chunk-Bgz0YSqs.js → chunk-Dk5jUdzK.js} +1 -1
- package/browser/{chunk-BR6R4gpW.js → chunk-Dkk0aLyn.js} +1 -1
- package/browser/{chunk-Dr2eg2L_.js → chunk-DnT5oOBU.js} +1 -1
- package/browser/{chunk-BYZZOwP6.js → chunk-Dnwbvx9O.js} +1 -1
- package/browser/{chunk-K-jE-YGO.js → chunk-GBZQG1M4.js} +1 -1
- package/browser/{chunk-D2hh5Ex3.js → chunk-JIL5IyE3.js} +1 -1
- package/browser/{chunk-Cw18oPF0.js → chunk-Kp2ec6yl.js} +1 -1
- package/browser/{chunk-DwrSqNJu.js → chunk-OSIa_n8q.js} +1 -1
- package/browser/{chunk-CsChsLgw.js → chunk-R0Oerx4i.js} +1 -1
- package/browser/{chunk-BCn5ZD_c.js → chunk-R0q_3wcj.js} +1 -1
- package/browser/{chunk-C8P9SuaA.js → chunk-WEG2brZJ.js} +1 -1
- package/browser/{chunk-C39RA_bw.js → chunk-Y9h1W4BJ.js} +1 -1
- package/browser/{chunk-D3Kj4T8Y.js → chunk-Z5t25nYs.js} +1 -1
- package/browser/{chunk-BU-kFi7p.js → chunk-bvOEo9pV.js} +1 -1
- package/browser/{chunk-dOYABY0k.js → chunk-jgoIoM7q.js} +1 -1
- package/browser/{chunk-Ck-XMTcy.js → chunk-kRQc7zeI.js} +1 -1
- package/browser/{chunk-CXHlTmz0.js → chunk-wYGCCU_V.js} +1 -1
- package/browser/{chunk-Dm2zo81i.js → chunk-wYePVzy5.js} +1 -1
- package/browser/{chunk-DB8HcHes.js → chunk-z0RY6Set.js} +1 -1
- package/browser/{chunk-Bofelq_e.js → chunk-zwGXUhQZ.js} +1 -1
- package/browser/index.html +1 -1
- package/browser/{main-MB7Y2AR2.js → main-YBERLDOH.js} +1 -1
- package/package.json +1 -1
- package/browser/chunk--fxx5Oa-.js +0 -1
- package/browser/chunk-JSqlYB97.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import {g,ao as V,G,d4 as N,w as we,H as Hi,b as U,z as z$1,a as P,A as Aw,v as vs,l as Ag,W as WC,k as fl,n as eC,X as XE,a8 as Zg,t as tC,a9 as dC,o as bg,a3 as HI,ac as mC,r as Tg,a6 as $I,a5 as yl,aa as If,ab as wf}from'./main-
|
|
1
|
+
import {g,ao as V,G,d4 as N,w as we,H as Hi,b as U,z as z$1,a as P,A as Aw,v as vs,l as Ag,W as WC,k as fl,n as eC,X as XE,a8 as Zg,t as tC,a9 as dC,o as bg,a3 as HI,ac as mC,r as Tg,a6 as $I,a5 as yl,aa as If,ab as wf}from'./main-YBERLDOH.js';import {o as z,k as _t,b as _e,n as ni,J as Jn,Y as Ye,Z as Zn,l as Xn,C as Cn,E as En}from'./chunk-B-VPDMd-.js';function j(l,a){l&1&&(vs(0,"p",5),WC(1,"Loading\u2026"),fl());}function q(l,a){if(l&1){let e=dC();vs(0,"form",7),Ag("ngSubmit",function(){If(e);let u=mC();return wf(u.submit())}),vs(1,"div",8)(2,"label",9),WC(3,"Name "),vs(4,"span",10),WC(5,"*"),fl()(),bg(6,"input",11),HI(),fl(),vs(7,"div",8)(8,"label",12),WC(9,"Description"),fl(),bg(10,"textarea",13),HI(),fl(),vs(11,"div",8)(12,"label",14),WC(13,"External ID"),fl(),bg(14,"input",15),HI(),fl(),vs(15,"div",8)(16,"label",16),WC(17,"Default agent"),fl(),bg(18,"input",17),HI(),fl(),vs(19,"div",8)(20,"label",18),WC(21,"Config path"),fl(),bg(22,"input",19),HI(),fl(),vs(23,"div",20)(24,"button",21),WC(25),fl(),vs(26,"button",22),Ag("click",function(){If(e);let u=mC();return wf(u.cancel())}),WC(27,"Cancel"),fl()()();}if(l&2){let e=mC();Tg("formGroup",e.form),XE(6),Tg("formControl",e.nameControl),$I(),XE(4),Tg("formControl",e.descriptionControl),$I(),XE(4),Tg("formControl",e.externalIdControl),$I(),XE(4),Tg("formControl",e.defaultAgentNameControl),$I(),XE(4),Tg("formControl",e.configPathControl),$I(),XE(2),Tg("disabled",e.nameControl.invalid||e.isSubmitting()),XE(),yl(" ",e.isEditMode()?"Save changes":"Create"," ");}}var $=class l{route=g(V);router=g(G);namespaceController=g(N);destroyRef=g(we);form=new z({name:new _t("",{nonNullable:true,validators:[_e.required,_e.minLength(1)]}),description:new _t("",{nonNullable:true}),configPath:new _t("",{nonNullable:true}),externalId:new _t("",{nonNullable:true}),defaultAgentName:new _t("",{nonNullable:true})});get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get configPathControl(){return this.form.controls.configPath}get externalIdControl(){return this.form.controls.externalId}get defaultAgentNameControl(){return this.form.controls.defaultAgentName}isEditMode=Hi(false);isSubmitting=Hi(false);isLoading=Hi(false);existingNamespace=null;ngOnInit(){let a=this.route.snapshot.paramMap.get("namespaceId");a&&(this.isEditMode.set(true),this.loadNamespace(a));}loadNamespace(a){this.isLoading.set(true),this.namespaceController.getByIdNamespace(a).pipe(U(this.destroyRef)).subscribe({next:e=>{this.existingNamespace=e,this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??""),this.configPathControl.setValue(e.configPath??""),this.externalIdControl.setValue(e.externalId??""),this.defaultAgentNameControl.setValue(e.defaultAgentName??""),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),this.navigateBack();}});}submit(){if(this.nameControl.invalid||this.isSubmitting())return;this.isSubmitting.set(true);let a=z$1(P({},this.existingNamespace),{name:this.nameControl.value.trim(),description:this.descriptionControl.value.trim()||void 0,configPath:this.configPathControl.value.trim()||void 0,externalId:this.externalIdControl.value.trim()||void 0,defaultAgentName:this.defaultAgentNameControl.value.trim()||void 0});(this.isEditMode()?this.namespaceController.updateNamespace(this.existingNamespace.id??"",a):this.namespaceController.createNamespace(a)).pipe(U(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(false)});}cancel(){this.navigateBack();}navigateBack(){this.router.navigate(["/agentos/namespaces"]);}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=Aw({type:l,selectors:[["agentos-namespace-form"]],decls:10,vars:2,consts:[[1,"namespace-form"],[1,"namespace-form__header"],["type","button","title","Back to namespaces",1,"namespace-form__back",3,"click"],[1,"namespace-form__back-icon"],[1,"namespace-form__title"],[1,"namespace-form__loading"],[1,"namespace-form__form",3,"formGroup"],[1,"namespace-form__form",3,"ngSubmit","formGroup"],[1,"namespace-form__field"],["for","ns-name",1,"namespace-form__label"],["aria-hidden","true"],["id","ns-name","type","text","placeholder","Namespace name","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-description",1,"namespace-form__label"],["id","ns-description","rows","4","placeholder","Optional description",1,"namespace-form__textarea",3,"formControl"],["for","ns-external-id",1,"namespace-form__label"],["id","ns-external-id","type","text","placeholder","Optional federation ID from an external system","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-default-agent",1,"namespace-form__label"],["id","ns-default-agent","type","text","placeholder","Logical name of the default agent (e.g. coday)","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-config-path",1,"namespace-form__label"],["id","ns-config-path","type","text","placeholder","Optional path to base configuration directory","autocomplete","off",1,"namespace-form__input",3,"formControl"],[1,"namespace-form__actions"],["type","submit",1,"namespace-form__btn","namespace-form__btn--primary",3,"disabled"],["type","button",1,"namespace-form__btn",3,"click"]],template:function(e,d){e&1&&(vs(0,"div",0)(1,"header",1)(2,"button",2),Ag("click",function(){return d.cancel()}),vs(3,"span",3),WC(4,"\u2190"),fl(),WC(5," Namespaces "),fl(),vs(6,"h1",4),WC(7),fl()(),eC(8,j,2,0,"p",5)(9,q,28,8,"form",6),fl()),e&2&&(XE(7),Zg(d.isEditMode()?"Edit namespace":"New namespace"),XE(),tC(d.isLoading()?8:9));},dependencies:[ni,Jn,Ye,Zn,Xn,Cn,En],styles:[".namespace-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:480px;margin:0 auto;padding:2rem 1rem}.namespace-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.namespace-form__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-accent)}.namespace-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.namespace-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.namespace-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:700;color:var(--color-text);letter-spacing:-.02em}.namespace-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.9rem;margin:0}.namespace-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.namespace-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.namespace-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text)}.namespace-form__input[_ngcontent-%COMP%], .namespace-form__textarea[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border-radius:0;border:1px solid var(--color-divider);background:var(--color-surface);color:var(--color-text);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;transition:border-color .15s ease}.namespace-form__input[_ngcontent-%COMP%]:focus, .namespace-form__textarea[_ngcontent-%COMP%]:focus{border-color:var(--color-accent)}.namespace-form__input[_ngcontent-%COMP%]::placeholder, .namespace-form__textarea[_ngcontent-%COMP%]::placeholder{color:var(--color-neutral-500)}.namespace-form__textarea[_ngcontent-%COMP%]{resize:vertical;min-height:96px;line-height:1.5}.namespace-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.namespace-form__btn[_ngcontent-%COMP%]{padding:.6rem 1.25rem;border-radius:0;border:1px solid var(--color-divider);background:transparent;color:var(--color-text);font-size:13px;font-family:var(--font-heading);font-weight:600;cursor:pointer;transition:background .15s ease,border-color .15s ease}.namespace-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover);border-color:var(--color-neutral-500)}.namespace-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.namespace-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-accent);border-color:var(--color-accent);color:#fff}.namespace-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-700);border-color:var(--color-accent-700)}"]})};export{$ as NamespaceFormComponent};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {A,b as bt,k as kt}from'./chunk-
|
|
1
|
+
import {A,b as bt,k as kt}from'./chunk-DXYxKL4O.js';import {z as z$2}from'./chunk-Z5t25nYs.js';import {C as Ci}from'./chunk-C_hp_VDq.js';import {f as f$1}from'./chunk-Y9h1W4BJ.js';import {Y as Ye,E as Et$1,y as yt$1,Q as Qe}from'./chunk-309mcMST.js';import'./chunk-CAZxbE68.js';import {g,w as we,R as Re,G,h as he,L,P,U,O as Ot$1,F,u as ue,m as mT,H as Hi,z as z$1,a as P$1,b as U$1,c as ce,f,d as b,e as O,V,A as Aw,i as hr,p as pr,j as Gn$1,s as si,v as vs,W as WC,k as fl,l as Ag,n as eC,o as bg,q as oC,T as TC,X as XE,r as Tg,t as tC,x as iC,y as Hg,C as Cg,B as dE,D as Fg,I as IC,E as wC,J as dy,N,K as c,M as Wy,Q as By,S as ha,Y as x,Z as z$3,_ as Ue,$ as zt$2,a0 as jt,a1 as Vt$1,a2 as Nt$1,a3 as HI,a4 as rC,a5 as yl,a6 as $I,a7 as ga,a8 as Zg,a9 as dC,aa as If,ab as wf,ac as mC,ad as Vg}from'./main-YBERLDOH.js';import'./chunk-D4WR8qG4.js';import {x as xe,k as kt$1,C as Ct,z as ze}from'./chunk-zwGXUhQZ.js';import {P as Pt$1,L as Lt$1}from'./chunk-Dk5jUdzK.js';import {v as ve,n as ne}from'./chunk-Cn0FSvue.js';import'./chunk-B8eYgbiK.js';import {W,k as ke$1,s as se}from'./chunk-GBZQG1M4.js';import {c as ce$1,n as nt,O as Ot$2,z as zt$1,T as Tn$1,S as Sn$1,a as ae}from'./chunk-8tkEJANN.js';import {I as In$1,D as De,B as Be,E as En$1,F as Fn$1}from'./chunk-BoNA4fJz.js';import {V as Ve,n as ne$1,H as He,N as Ne}from'./chunk-WEG2brZJ.js';import {y as yt,w as wt$1,t as ti,Y as Ye$1,f as fn$1,Z as Zn,$ as $t$1,c as cn$1}from'./chunk-B-VPDMd-.js';var Ot=(a,t)=>t.name;function Et(a,t){if(a&1&&(vs(0,"mat-option",11),WC(1),fl()),a&2){let e=t.$implicit;Tg("value",e),XE(),Zg(e);}}function Nt(a,t){a&1&&bg(0,"mat-spinner",13);}function It(a,t){if(a&1&&(vs(0,"span",20),WC(1),fl()),a&2){let e=mC().$implicit;XE(),Zg(e.description);}}function At(a,t){if(a&1&&(vs(0,"mat-option",11)(1,"span",19),WC(2),fl(),eC(3,It,2,1,"span",20),fl()),a&2){let e=t.$implicit;Tg("value",e.name),XE(2),Zg(e.name),XE(),tC(e.description?3:-1);}}function Vt(a,t){if(a&1&&(vs(0,"mat-option",11),WC(1),fl()),a&2){let e=t.$implicit;Tg("value",e),XE(),Zg(e);}}function Ft(a,t){if(a&1){let e=dC();vs(0,"div",25)(1,"mat-form-field",8)(2,"mat-label"),WC(3,"Name"),fl(),vs(4,"input",26),Ag("input",function(i){If(e);let l=mC(2);return wf(l.issueNumber.set(i.target.value))}),fl()(),vs(5,"mat-form-field",27)(6,"mat-label"),WC(7,"Type"),fl(),vs(8,"mat-select",28),Ag("selectionChange",function(i){If(e);let l=mC(2);return wf(l.branchType.set(i.value))}),oC(9,Vt,2,2,"mat-option",11,rC),fl()()();}if(a&2){let e=mC(2);XE(4),Tg("value",e.issueNumber()),XE(4),Tg("value",e.branchType()),XE(),iC(e.branchTypes);}}function Gt(a,t){a&1&&bg(0,"mat-spinner",13);}function Rt(a,t){if(a&1&&(vs(0,"mat-option",11),WC(1),fl()),a&2){let e=t.$implicit;Tg("value",e),XE(),Zg(e);}}function qt(a,t){if(a&1){let e=dC();vs(0,"mat-form-field",8)(1,"mat-label"),WC(2,"Source branch"),fl(),vs(3,"input",29,4),Ag("input",function(i){If(e);let l=mC(2);return wf(l.onBranchSearchInput(i.target.value))})("focus",function(){If(e);let i=TC(4),l=mC(2);return wf(l.openPanel(i))}),fl(),eC(5,Gt,1,0,"mat-spinner",13),vs(6,"mat-autocomplete",10,5),Ag("optionSelected",function(i){If(e);let l=mC(2);return wf(l.selectBranch(i.option.value))}),oC(8,Rt,2,2,"mat-option",11,rC),fl()();}if(a&2){let e=TC(7),n=mC(2);XE(3),Tg("value",n.branchSearch())("matAutocomplete",e)("disabled",n.isLoadingBranches()),XE(2),tC(n.isLoadingBranches()?5:-1),XE(3),iC(n.filteredBranches());}}function $t(a,t){if(a&1){let e=dC();vs(0,"div",21)(1,"button",22),Ag("click",function(){If(e);let i=mC();return wf(i.onModeChange("local"))}),vs(2,"mat-icon"),WC(3,"folder_open"),fl(),vs(4,"span",23),WC(5,"Local"),fl(),vs(6,"span",24),WC(7,"Work directly on the current branch"),fl()(),vs(8,"button",22),Ag("click",function(){If(e);let i=mC();return wf(i.onModeChange("worktree"))}),vs(9,"mat-icon"),WC(10,"account_tree"),fl(),vs(11,"span",23),WC(12,"Worktree"),fl(),vs(13,"span",24),WC(14,"Create an isolated worktree from a branch"),fl()()(),eC(15,Ft,11,2,"div",25),eC(16,qt,10,4,"mat-form-field",8);}if(a&2){let e=mC();XE(),Hg("active",e.mode()==="local"),XE(7),Hg("active",e.mode()==="worktree"),XE(7),tC(e.isWorktree()?15:-1),XE(),tC(e.isWorktree()?16:-1);}}function Lt(a,t){a&1&&bg(0,"mat-spinner",18);}function zt(a,t){a&1&&(vs(0,"mat-icon"),WC(1,"rocket_launch"),fl());}function Bt(a,t){a&1&&(vs(0,"mat-icon"),WC(1,"open_in_new"),fl());}var ke=class a{projectApi=g(c);agentApi=g(f$1);dialogRef=g(z$3);projectState=g(P);forcedProject=F(this.projectState.forcedProject$,{initialValue:null});selectedProject=Hi("");projectSearch=Hi("");selectedAgent=Hi("");agentSearch=Hi("");mode=Hi("local");selectedBranch=Hi("");branchSearch=Hi("");issueNumber=Hi("");branchType=Hi("feature");task=Hi("");hasGit=Hi(false);branchTypes=["feature","fix","refactor","chore","docs","build"];projects=Hi([]);agents=Hi([]);branches=Hi([]);filteredProjects=mT(()=>{let t=this.projectSearch().toLowerCase();return t?this.projects().filter(e=>e.toLowerCase().includes(t)):this.projects()});filteredAgents=mT(()=>{let t=this.agentSearch().toLowerCase();return t?this.agents().filter(e=>e.name.toLowerCase().includes(t)||e.description?.toLowerCase().includes(t)):this.agents()});filteredBranches=mT(()=>{let t=this.branchSearch().toLowerCase();return t?this.branches().filter(e=>e.toLowerCase().includes(t)):this.branches()});isLoadingAgents=Hi(false);isLoadingBranches=Hi(false);isSubmitting=Hi(false);isWorktree=mT(()=>this.mode()==="worktree"&&this.hasGit());isValid=mT(()=>{let t=this.projects().includes(this.selectedProject()),e=this.agents().some(i=>i.name===this.selectedAgent()),n=t&&e&&!!this.task().trim();return this.isWorktree()?n&&!!this.selectedBranch()&&!!this.issueNumber().trim()&&!!this.branchType():n});canNavigate=mT(()=>this.projects().includes(this.selectedProject()));openPanel(t){t.openPanel();}onProjectSearchInput(t){this.projectSearch.set(t),this.selectedProject()&&t!==this.selectedProject()&&(this.selectedProject.set(""),this.selectedAgent.set(""),this.agentSearch.set(""),this.agents.set([]));}selectProject(t){this.selectedProject.set(t),this.projectSearch.set(t),this.selectedAgent.set(""),this.agentSearch.set(""),this.agents.set([]),this.branches.set([]),this.selectedBranch.set(""),this.branchSearch.set(""),this.hasGit.set(false),this.mode.set("local"),this.isLoadingAgents.set(true),this.agentApi.getAgents(t).subscribe({next:e=>{this.agents.set(e),this.isLoadingAgents.set(false);},error:()=>{this.isLoadingAgents.set(false);}}),this.projectApi.getGitBranches(t).subscribe({next:({branches:e})=>{this.hasGit.set(e.length>0);},error:()=>{this.hasGit.set(false);}});}onAgentSearchInput(t){this.agentSearch.set(t),this.selectedAgent()&&t!==this.selectedAgent()&&this.selectedAgent.set("");}selectAgent(t){this.selectedAgent.set(t),this.agentSearch.set(t);}onBranchSearchInput(t){this.branchSearch.set(t),this.selectedBranch()&&t!==this.selectedBranch()&&this.selectedBranch.set("");}selectBranch(t){this.selectedBranch.set(t),this.branchSearch.set(t);}ngOnInit(){this.projectApi.listProjects().subscribe({next:({projects:t})=>{let e=t.map(n=>n.name);this.projects.set(e),e.length===1&&e[0]&&this.selectProject(e[0]);}});}onProjectChange(t){this.selectProject(t);}onModeChange(t){this.mode.set(t),t==="worktree"&&this.selectedProject()&&this.branches().length===0&&this.loadBranches();}loadBranches(){this.isLoadingBranches.set(true),this.projectApi.getGitBranches(this.selectedProject()).subscribe({next:({branches:t})=>{this.branches.set(t),this.isLoadingBranches.set(false);},error:()=>{this.isLoadingBranches.set(false);}});}submit(){if(!this.isSubmitting()){if(this.isValid()){this.isSubmitting.set(true);let t=this.isWorktree()&&this.issueNumber().trim()?`${this.issueNumber().trim()} ${this.task().trim()}`:this.task().trim();this.projectApi.createTask(this.selectedProject(),this.selectedAgent(),t,this.isWorktree()?"worktree":"local",this.isWorktree()?this.selectedBranch():void 0,this.isWorktree()?this.issueNumber().trim():void 0,this.isWorktree()?this.branchType():void 0).subscribe({next:({threadId:e,projectId:n})=>{this.dialogRef.close({threadId:e,projectId:n});},error:()=>{this.isSubmitting.set(false);}});return}if(this.canNavigate()){this.dialogRef.close({projectId:this.selectedProject(),navigate:true});return}}}cancel(){this.dialogRef.close(null);}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=Aw({type:a,selectors:[["app-new-task-dialog"]],decls:37,vars:12,consts:[["projectTrigger","matAutocompleteTrigger"],["projectAuto",""],["agentTrigger","matAutocompleteTrigger"],["agentAuto",""],["branchTrigger","matAutocompleteTrigger"],["branchAuto",""],["mat-dialog-title",""],[1,"ntd-content"],["appearance","outline",1,"ntd-field"],["matInput","","placeholder","Search project...",3,"input","focus","value","matAutocomplete"],[3,"optionSelected"],[3,"value"],["matInput","","placeholder","Search agent...",3,"input","focus","value","matAutocomplete","disabled"],["matSuffix","","diameter","16"],["matInput","","placeholder","Describe what the agent should accomplish...","rows","4",3,"input","value"],["align","end"],["mat-button","",3,"click","disabled"],["mat-flat-button","",1,"ntd-launch-btn",3,"click","disabled"],["diameter","16"],[1,"ntd-agent-name"],[1,"ntd-agent-desc"],[1,"ntd-radio-group"],["type","button",1,"ntd-mode-btn",3,"click"],[1,"ntd-radio-label"],[1,"ntd-radio-hint"],[1,"ntd-row"],["matInput","","type","text","placeholder","Name",3,"input","value"],["appearance","outline",1,"ntd-field","ntd-field--small"],[3,"selectionChange","value"],["matInput","","placeholder","Search branch...",3,"input","focus","value","matAutocomplete","disabled"]],template:function(e,n){if(e&1){let i=dC();vs(0,"h2",6)(1,"mat-icon"),WC(2,"rocket_launch"),fl(),WC(3,` New Task
|
|
2
2
|
`),fl(),vs(4,"mat-dialog-content",7)(5,"mat-form-field",8)(6,"mat-label"),WC(7,"Project"),fl(),vs(8,"input",9,0),Ag("input",function(p){return n.onProjectSearchInput(p.target.value)})("focus",function(){If(i);let p=TC(9);return wf(n.openPanel(p))}),fl(),vs(10,"mat-autocomplete",10,1),Ag("optionSelected",function(p){return n.selectProject(p.option.value)}),oC(12,Et,2,2,"mat-option",11,rC),fl()(),vs(14,"mat-form-field",8)(15,"mat-label"),WC(16,"Agent"),fl(),vs(17,"input",12,2),Ag("input",function(p){return n.onAgentSearchInput(p.target.value)})("focus",function(){If(i);let p=TC(18);return wf(n.openPanel(p))}),fl(),eC(19,Nt,1,0,"mat-spinner",13),vs(20,"mat-autocomplete",10,3),Ag("optionSelected",function(p){return n.selectAgent(p.option.value)}),oC(22,At,4,3,"mat-option",11,Ot),fl()(),eC(24,$t,17,6),vs(25,"mat-form-field",8)(26,"mat-label"),WC(27,"Task"),fl(),vs(28,"textarea",14),Ag("input",function(p){return n.task.set(p.target.value)}),fl()()(),vs(29,"mat-dialog-actions",15)(30,"button",16),Ag("click",function(){return n.cancel()}),WC(31,"Cancel"),fl(),vs(32,"button",17),Ag("click",function(){return n.submit()}),eC(33,Lt,1,0,"mat-spinner",18)(34,zt,2,0,"mat-icon")(35,Bt,2,0,"mat-icon"),WC(36),fl()();}if(e&2){let i=TC(11),l=TC(21);XE(8),Tg("value",n.projectSearch())("matAutocomplete",i),XE(4),iC(n.filteredProjects()),XE(5),Tg("value",n.agentSearch())("matAutocomplete",l)("disabled",!n.selectedProject()||n.isLoadingAgents()),XE(2),tC(n.isLoadingAgents()?19:-1),XE(3),iC(n.filteredAgents()),XE(2),tC(n.hasGit()&&!n.forcedProject()?24:-1),XE(4),Tg("value",n.task()),XE(2),Tg("disabled",n.isSubmitting()),XE(2),Tg("disabled",!n.canNavigate()||n.isSubmitting()),XE(),tC(n.isSubmitting()?33:n.isValid()?34:35),XE(3),yl(" ",n.isValid()?"Launch":"Open"," ");}},dependencies:[ti,zt$2,jt,Vt$1,Nt$1,hr,pr,ce$1,nt,ae,zt$1,Tn$1,Sn$1,kt$1,Ct,Fn$1,ze,Pt$1,Lt$1,Et$1,yt$1,yt,wt$1],styles:["h2[mat-dialog-title][_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;margin-bottom:0}.ntd-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;padding-top:20px!important}.ntd-field[_ngcontent-%COMP%]{width:100%}.ntd-row[_ngcontent-%COMP%]{display:flex;gap:.75rem}.ntd-row[_ngcontent-%COMP%] .ntd-field--small[_ngcontent-%COMP%]{width:130px;flex-shrink:0}.ntd-radio-group[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding:.25rem 0 .75rem}.ntd-mode-btn[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;align-items:flex-start;gap:.15rem;padding:.75rem;border:1px solid var(--color-border);border-radius:8px;background:transparent;color:var(--color-text);cursor:pointer;transition:border-color .15s,background .15s}.ntd-mode-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:1.1rem;width:1.1rem;height:1.1rem;margin-bottom:.1rem}.ntd-mode-btn.active[_ngcontent-%COMP%]{border-color:var(--color-primary);background:color-mix(in srgb,var(--color-primary) 10%,transparent)}.ntd-mode-btn[_ngcontent-%COMP%]:hover:not(.active){border-color:var(--color-text-secondary)}.ntd-radio-label[_ngcontent-%COMP%]{font-weight:600;font-size:.9rem}.ntd-radio-hint[_ngcontent-%COMP%]{font-size:.72rem;color:var(--color-text-secondary);line-height:1.3;text-align:left}.ntd-agent-name[_ngcontent-%COMP%]{font-weight:500;display:block}.ntd-agent-desc[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary);display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:380px}.ntd-launch-btn[_ngcontent-%COMP%]{background:var(--color-primary);color:var(--color-text-inverse)}.ntd-launch-btn[_ngcontent-%COMP%]:disabled{background:var(--color-border);color:var(--color-text-secondary);opacity:.6;cursor:not-allowed}"],changeDetection:1})};var Qt=(a,t)=>t.name,Ut=(a,t)=>t.value;function Ht(a,t){if(a&1&&(vs(0,"mat-option",8),WC(1),fl()),a&2){let e=t.$implicit;Tg("value",e),XE(),Zg(e);}}function Jt(a,t){a&1&&bg(0,"mat-spinner",9);}function Xt(a,t){if(a&1&&(vs(0,"mat-option",8),WC(1),fl()),a&2){let e=t.$implicit;Tg("value",e.name),XE(),Zg(e.name);}}function Kt(a,t){if(a&1){let e=dC();vs(0,"button",37),Ag("click",function(){let i=If(e).$implicit,l=mC();return wf(l.toggleDay(i.value))}),WC(1),fl();}if(a&2){let e=t.$implicit,n=mC();Hg("selected",n.isDaySelected(e.value)),XE(),yl(" ",e.label," ");}}function Yt(a,t){if(a&1){let e=dC();vs(0,"mat-form-field",4)(1,"mat-label"),WC(2,"Number of runs"),fl(),vs(3,"input",17),Ag("ngModelChange",function(i){If(e);let l=mC();return wf(l.endOccurrences.set(i))}),fl(),HI(),fl();}if(a&2){let e=mC();XE(3),Tg("ngModel",e.endOccurrences()),$I();}}function Zt(a,t){if(a&1){let e=dC();vs(0,"mat-form-field",4)(1,"mat-label"),WC(2,"End date"),fl(),vs(3,"input",38),Ag("ngModelChange",function(i){If(e);let l=mC();return wf(l.endTimestamp.set(i))}),fl(),HI(),fl();}if(a&2){let e=mC();XE(3),Tg("ngModel",e.endTimestamp())("min",e.startTimestamp()),$I();}}function en(a,t){if(a&1&&(vs(0,"div",32)(1,"mat-icon"),WC(2,"error"),fl(),vs(3,"span"),WC(4),fl()()),a&2){let e=mC();XE(4),Zg(e.errorMessage());}}function tn(a,t){a&1&&bg(0,"mat-spinner",36);}function nn(a,t){a&1&&(vs(0,"mat-icon"),WC(1,"schedule"),fl());}var z=class a{projectApi=g(c);agentApi=g(f$1);schedulerApi=g(xe);dialogRef=g(z$3);dialogData=g(Ue,{optional:true});isEditMode=this.dialogData?.mode==="edit";projects=Hi([]);agents=Hi([]);name=Hi("");selectedProject=Hi("");selectedAgent=Hi("");instruction=Hi("");intervalValue=Hi(1);intervalUnit=Hi("d");startTimestamp=Hi("");daysOfWeek=Hi([]);endConditionType=Hi("none");endOccurrences=Hi(10);endTimestamp=Hi("");enabled=Hi(true);isLoadingAgents=Hi(false);isSaving=Hi(false);errorMessage=Hi("");daysOfWeekOptions=[{value:1,label:"Mon"},{value:2,label:"Tue"},{value:3,label:"Wed"},{value:4,label:"Thu"},{value:5,label:"Fri"},{value:6,label:"Sat"},{value:0,label:"Sun"}];filteredProjects=mT(()=>{let t=this.selectedProject().toLowerCase();return this.projects().filter(e=>e.toLowerCase().includes(t))});filteredAgents=mT(()=>{let t=this.selectedAgent().toLowerCase();return this.agents().filter(e=>e.name.toLowerCase().includes(t))});isValid=mT(()=>{let t=this.projects().includes(this.selectedProject()),e=this.agents().some(l=>l.name===this.selectedAgent()),n=this.instruction().trim().length>0,i=this.intervalValue()>=1;return t&&e&&n&&i});ngOnInit(){if(this.isEditMode&&this.dialogData?.scheduler){let t=this.dialogData.scheduler;this.name.set(t.name),this.selectedAgent.set(t.agentName??""),this.instruction.set(t.instruction??""),this.enabled.set(t.enabled);let e=t.schedule.interval.match(/^(\d+)(min|h|d|M)$/);e&&e[1]&&e[2]&&(this.intervalValue.set(parseInt(e[1],10)),this.intervalUnit.set(e[2])),t.schedule.startTimestamp&&this.startTimestamp.set(this.toDatetimeLocal(new Date(t.schedule.startTimestamp))),this.daysOfWeek.set(t.schedule.daysOfWeek??[]),t.schedule.endCondition&&(this.endConditionType.set(t.schedule.endCondition.type),t.schedule.endCondition.type==="occurrences"?this.endOccurrences.set(t.schedule.endCondition.value):t.schedule.endCondition.type==="endTimestamp"&&this.endTimestamp.set(this.toDatetimeLocal(new Date(t.schedule.endCondition.value))));}else this.startTimestamp.set(this.toDatetimeLocal(new Date));this.projectApi.listProjects().subscribe({next:({projects:t})=>{let e=t.map(i=>i.name).filter(i=>!i.includes("__"));this.projects.set(e);let n=this.dialogData?.projectName;this.isEditMode&&n?this.onProjectSelected(n):e.length===1&&e[0]&&this.onProjectSelected(e[0]);}});}onProjectSelected(t){this.selectedProject.set(t),this.isEditMode||(this.agents.set([]),this.selectedAgent.set("")),this.projects().includes(t)&&(this.isLoadingAgents.set(true),this.agentApi.getAgents(t).subscribe({next:e=>{this.agents.set(e),this.isLoadingAgents.set(false),!this.isEditMode&&e.length===1&&e[0]&&this.selectedAgent.set(e[0].name);},error:()=>this.isLoadingAgents.set(false)}));}toggleDay(t){let e=this.daysOfWeek();e.indexOf(t)>-1?this.daysOfWeek.set(e.filter(i=>i!==t)):this.daysOfWeek.set([...e,t].sort());}isDaySelected(t){return this.daysOfWeek().includes(t)}toDatetimeLocal(t){let e=n=>String(n).padStart(2,"0");return `${t.getFullYear()}-${e(t.getMonth()+1)}-${e(t.getDate())}T${e(t.getHours())}:${e(t.getMinutes())}`}submit(){if(!this.isValid()||this.isSaving())return;this.errorMessage.set(""),this.isSaving.set(true);let t=this.startTimestamp(),e={startTimestamp:t?new Date(t).toISOString():new Date().toISOString(),interval:`${this.intervalValue()}${this.intervalUnit()}`},n=this.daysOfWeek();n.length>0&&(e.daysOfWeek=n);let i=this.endConditionType();i==="occurrences"?e.endCondition={type:"occurrences",value:this.endOccurrences()}:i==="endTimestamp"&&this.endTimestamp()&&(e.endCondition={type:"endTimestamp",value:new Date(this.endTimestamp()).toISOString()});let l=this.instruction().trim(),p=l.length>40?l.slice(0,40)+"\u2026":l,L=this.name().trim()||`${this.selectedAgent()} \u2014 ${p}`;this.isEditMode&&this.dialogData?.scheduler&&this.dialogData.projectName?this.schedulerApi.updateSchedulerForProject(this.dialogData.projectName,this.dialogData.scheduler.id,{name:L,agentName:this.selectedAgent(),instruction:l,schedule:e,enabled:this.enabled()}).subscribe({next:()=>{this.isSaving.set(false),this.dialogRef.close(true);},error:oe=>{this.errorMessage.set(oe?.error?.error||"Failed to update scheduler"),this.isSaving.set(false);}}):this.schedulerApi.createSchedulerForProject(this.selectedProject(),{name:L,agentName:this.selectedAgent(),instruction:l,schedule:e,enabled:this.enabled()}).subscribe({next:()=>{this.isSaving.set(false),this.dialogRef.close(true);},error:oe=>{this.errorMessage.set(oe?.error?.error||"Failed to create scheduler"),this.isSaving.set(false);}});}cancel(){this.dialogRef.close(false);}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=Aw({type:a,selectors:[["app-quick-scheduler-dialog"]],decls:84,vars:20,consts:[["projectAuto","matAutocomplete"],["agentAuto","matAutocomplete"],["mat-dialog-title",""],[1,"qsd-form"],["appearance","outline",1,"full-width"],["matInput","","placeholder","Optional \u2014 auto-generated if empty",3,"ngModelChange","ngModel"],["matInput","","placeholder","Select a project",3,"ngModelChange","focus","ngModel","matAutocomplete"],[3,"optionSelected"],[3,"value"],["matSuffix","","diameter","18"],["matInput","","placeholder","Select an agent",3,"ngModelChange","focus","ngModel","matAutocomplete","disabled"],["matInput","","placeholder","e.g. Review open PRs and summarize what needs attention","rows","3",3,"ngModelChange","ngModel"],[1,"qsd-divider"],["matInput","","type","datetime-local",3,"ngModelChange","ngModel"],[1,"qsd-interval"],[1,"qsd-label"],["appearance","outline",1,"interval-value"],["matInput","","type","number","min","1",3,"ngModelChange","ngModel"],["appearance","outline",1,"interval-unit"],[3,"ngModelChange","ngModel"],["value","min"],["value","h"],["value","d"],["value","M"],[1,"qsd-days"],[1,"qsd-day-chips"],["type","button",1,"day-chip",3,"selected"],[1,"qsd-hint"],[1,"qsd-end"],["value","none"],["value","occurrences"],["value","endTimestamp"],[1,"qsd-error"],["align","end"],["mat-button","",3,"click","disabled"],["mat-flat-button","",3,"click","disabled"],["diameter","18"],["type","button",1,"day-chip",3,"click"],["matInput","","type","datetime-local",3,"ngModelChange","ngModel","min"]],template:function(e,n){if(e&1&&(vs(0,"h2",2)(1,"mat-icon"),WC(2,"schedule"),fl(),WC(3),fl(),vs(4,"mat-dialog-content")(5,"div",3)(6,"mat-form-field",4)(7,"mat-label"),WC(8,"Name"),fl(),vs(9,"input",5),Ag("ngModelChange",function(l){return n.name.set(l)}),fl(),HI(),fl(),vs(10,"mat-form-field",4)(11,"mat-label"),WC(12,"Project"),fl(),vs(13,"input",6),Ag("ngModelChange",function(l){return n.onProjectSelected(l)})("focus",function(){return n.selectedProject.set(n.selectedProject())}),fl(),HI(),vs(14,"mat-autocomplete",7,0),Ag("optionSelected",function(l){return n.onProjectSelected(l.option.value)}),oC(16,Ht,2,2,"mat-option",8,rC),fl()(),vs(18,"mat-form-field",4)(19,"mat-label"),WC(20,"Agent"),fl(),eC(21,Jt,1,0,"mat-spinner",9),vs(22,"input",10),Ag("ngModelChange",function(l){return n.selectedAgent.set(l)})("focus",function(){return n.selectedAgent.set(n.selectedAgent())}),fl(),HI(),vs(23,"mat-autocomplete",7,1),Ag("optionSelected",function(l){return n.selectedAgent.set(l.option.value)}),oC(25,Xt,2,2,"mat-option",8,Qt),fl()(),vs(27,"mat-form-field",4)(28,"mat-label"),WC(29,"What should the agent do?"),fl(),vs(30,"textarea",11),Ag("ngModelChange",function(l){return n.instruction.set(l)}),fl(),HI(),fl(),vs(31,"div",12)(32,"span"),WC(33,"Scheduling"),fl()(),vs(34,"mat-form-field",4)(35,"mat-label"),WC(36,"Starts on"),fl(),vs(37,"input",13),Ag("ngModelChange",function(l){return n.startTimestamp.set(l)}),fl(),HI(),fl(),vs(38,"div",14)(39,"span",15),WC(40,"Every"),fl(),vs(41,"mat-form-field",16)(42,"input",17),Ag("ngModelChange",function(l){return n.intervalValue.set(l)}),fl(),HI(),fl(),vs(43,"mat-form-field",18)(44,"mat-select",19),Ag("ngModelChange",function(l){return n.intervalUnit.set(l)}),vs(45,"mat-option",20),WC(46,"minutes"),fl(),vs(47,"mat-option",21),WC(48,"hours"),fl(),vs(49,"mat-option",22),WC(50,"days"),fl(),vs(51,"mat-option",23),WC(52,"months"),fl()(),HI(),fl()(),vs(53,"div",24)(54,"span",15),WC(55,"Days"),fl(),vs(56,"div",25),oC(57,Kt,2,3,"button",26,Ut),fl(),vs(59,"span",27),WC(60,"Leave empty for every day"),fl()(),vs(61,"div",28)(62,"mat-form-field",4)(63,"mat-label"),WC(64,"Ends on"),fl(),vs(65,"mat-select",19),Ag("ngModelChange",function(l){return n.endConditionType.set(l)}),vs(66,"mat-option",29),WC(67,"Never"),fl(),vs(68,"mat-option",30),WC(69,"After N runs"),fl(),vs(70,"mat-option",31),WC(71,"On a date"),fl()(),HI(),fl(),eC(72,Yt,4,1,"mat-form-field",4),eC(73,Zt,4,2,"mat-form-field",4),fl(),vs(74,"mat-checkbox",19),Ag("ngModelChange",function(l){return n.enabled.set(l)}),WC(75,"Enable immediately"),fl(),HI(),eC(76,en,5,1,"div",32),fl()(),vs(77,"mat-dialog-actions",33)(78,"button",34),Ag("click",function(){return n.cancel()}),WC(79,"Cancel"),fl(),vs(80,"button",35),Ag("click",function(){return n.submit()}),eC(81,tn,1,0,"mat-spinner",36)(82,nn,2,0,"mat-icon"),WC(83," Schedule "),fl()()),e&2){let i=TC(15),l=TC(24);XE(3),yl(" ",n.isEditMode?"Edit scheduled task":"New scheduled task",`
|
|
3
3
|
`),XE(6),Tg("ngModel",n.name()),$I(),XE(4),Tg("ngModel",n.selectedProject())("matAutocomplete",i),$I(),XE(3),iC(n.filteredProjects()),XE(5),tC(n.isLoadingAgents()?21:-1),XE(),Tg("ngModel",n.selectedAgent())("matAutocomplete",l)("disabled",!n.projects().includes(n.selectedProject())),$I(),XE(3),iC(n.filteredAgents()),XE(5),Tg("ngModel",n.instruction()),$I(),XE(7),Tg("ngModel",n.startTimestamp()),$I(),XE(5),Tg("ngModel",n.intervalValue()),$I(),XE(2),Tg("ngModel",n.intervalUnit()),$I(),XE(13),iC(n.daysOfWeekOptions),XE(8),Tg("ngModel",n.endConditionType()),$I(),XE(7),tC(n.endConditionType()==="occurrences"?72:-1),XE(),tC(n.endConditionType()==="endTimestamp"?73:-1),XE(),Tg("ngModel",n.enabled()),$I(),XE(2),tC(n.errorMessage()?76:-1),XE(2),Tg("disabled",n.isSaving()),XE(2),Tg("disabled",!n.isValid()||n.isSaving()),XE(),tC(n.isSaving()?81:82);}},dependencies:[ti,Ye$1,fn$1,Zn,$t$1,cn$1,zt$2,jt,Vt$1,Nt$1,hr,pr,ce$1,nt,ae,zt$1,Tn$1,Sn$1,kt$1,Ct,Fn$1,ze,Pt$1,Lt$1,ve,ne,Et$1,yt$1,yt,wt$1],styles:['[_nghost-%COMP%]{display:block}h2[mat-dialog-title][_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.qsd-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px;padding-top:4px}.full-width[_ngcontent-%COMP%]{width:100%}.qsd-interval[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.qsd-interval[_ngcontent-%COMP%] .qsd-label[_ngcontent-%COMP%]{font-size:14px;color:var(--mat-sys-on-surface-variant);white-space:nowrap}.qsd-interval[_ngcontent-%COMP%] .interval-value[_ngcontent-%COMP%]{width:80px}.qsd-interval[_ngcontent-%COMP%] .interval-unit[_ngcontent-%COMP%]{flex:1}.qsd-days[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.qsd-days[_ngcontent-%COMP%] .qsd-label[_ngcontent-%COMP%]{font-size:14px;color:var(--mat-sys-on-surface-variant);white-space:nowrap}.qsd-days[_ngcontent-%COMP%] .qsd-hint[_ngcontent-%COMP%]{font-size:12px;color:var(--mat-sys-on-surface-variant);opacity:.7;width:100%;margin-top:-4px;padding-left:36px}.qsd-day-chips[_ngcontent-%COMP%]{display:flex;gap:4px;flex-wrap:wrap}.day-chip[_ngcontent-%COMP%]{padding:4px 10px;border-radius:16px;border:1px solid var(--mat-sys-outline);background:transparent;color:var(--mat-sys-on-surface);font-size:12px;cursor:pointer;transition:background .15s,color .15s}.day-chip.selected[_ngcontent-%COMP%]{background:var(--mat-sys-primary);color:var(--mat-sys-on-primary);border-color:var(--mat-sys-primary)}.day-chip[_ngcontent-%COMP%]:hover:not(.selected){background:var(--mat-sys-surface-variant)}.qsd-divider[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin:4px 0}.qsd-divider[_ngcontent-%COMP%]:before, .qsd-divider[_ngcontent-%COMP%]:after{content:"";flex:1;height:1px;background:var(--mat-sys-outline-variant)}.qsd-divider[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:12px;color:var(--mat-sys-on-surface-variant);text-transform:uppercase;letter-spacing:.5px}.qsd-end[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.qsd-error[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;color:var(--mat-sys-error);font-size:14px}.qsd-error[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px}mat-dialog-actions[_ngcontent-%COMP%]{gap:8px}mat-dialog-actions[_ngcontent-%COMP%] button[mat-flat-button][_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px}']})};var rn=(a,t)=>t.id;function an(a,t){if(a&1){let e=dC();vs(0,"button",9),Ag("click",function(){let i=If(e).$implicit,l=mC(2);return wf(l.setProject(i))}),WC(1),fl();}if(a&2){let e=t.$implicit,n=mC(2);Hg("active",n.activeProject()===e),XE(),yl(" ",e," ");}}function ln(a,t){if(a&1){let e=dC();vs(0,"nav",2)(1,"button",9),Ag("click",function(){If(e);let i=mC();return wf(i.setProject(null))}),WC(2," All projects "),fl(),oC(3,an,2,3,"button",10,rC),fl();}if(a&2){let e=mC();XE(),Hg("active",e.activeProject()===null),XE(2),iC(e.projects());}}function sn(a,t){a&1&&(vs(0,"div",3),bg(1,"mat-spinner",11),fl());}function cn(a,t){if(a&1&&(vs(0,"div",4)(1,"mat-icon"),WC(2,"error"),fl(),WC(3),fl()),a&2){let e=mC();XE(3),yl(" ",e.errorMessage()," ");}}function dn(a,t){if(a&1){let e=dC();vs(0,"div",5)(1,"mat-icon"),WC(2,"schedule"),fl(),vs(3,"p"),WC(4,"No scheduled tasks yet."),fl(),vs(5,"button",12),Ag("click",function(){If(e);let i=mC();return wf(i.openCreate())}),vs(6,"mat-icon"),WC(7,"add"),fl(),WC(8," Create one "),fl()();}}function pn(a,t){if(a&1&&(vs(0,"span",17),WC(1),fl()),a&2){let e=mC().$implicit;XE(),Zg(e.projectName);}}function mn(a,t){if(a&1){let e=dC();vs(0,"li",14)(1,"div",15)(2,"span",16),WC(3),fl(),eC(4,pn,2,1,"span",17),vs(5,"span",18),WC(6),fl()(),vs(7,"div",19)(8,"span",20),WC(9),fl(),vs(10,"span",21),WC(11),fl()(),vs(12,"div",22)(13,"mat-slide-toggle",23),Ag("change",function(){let i=If(e).$implicit,l=mC(2);return wf(l.toggleEnabled(i))}),fl(),vs(14,"button",24),Ag("click",function(){let i=If(e).$implicit,l=mC(2);return wf(l.runNow(i))}),vs(15,"mat-icon"),WC(16,"play_arrow"),fl()(),vs(17,"button",25),Ag("click",function(){let i=If(e).$implicit,l=mC(2);return wf(l.edit(i))}),vs(18,"mat-icon"),WC(19,"edit"),fl()(),vs(20,"button",26),Ag("click",function(){let i=If(e).$implicit,l=mC(2);return wf(l.delete(i))}),vs(21,"mat-icon"),WC(22,"delete"),fl()()()();}if(a&2){let e=t.$implicit,n=mC(2);Hg("disabled",!e.enabled),XE(3),Zg(e.name),XE(),tC(n.projects().length>1?4:-1),XE(2),Zg(n.getSource(e)),XE(3),Zg(n.formatInterval(e.schedule.interval)),XE(),Hg("due",!e.nextRun),XE(),Zg(n.formatNextRun(e.nextRun)),XE(2),Tg("checked",e.enabled);}}function un(a,t){if(a&1&&(vs(0,"ul",6),oC(1,mn,23,10,"li",13,rn),fl()),a&2){let e=mC();XE(),iC(e.filteredSchedulers());}}var Me=class a{projectApi=g(c);schedulerApi=g(xe);dialog=g(Re);dialogRef=g(z$3);allSchedulers=Hi([]);isLoading=Hi(true);errorMessage=Hi("");activeProject=Hi(null);projects=Hi([]);filteredSchedulers=mT(()=>{let t=this.activeProject(),e=this.allSchedulers();return t?e.filter(n=>n.projectName===t):e});ngOnInit(){this.load();}load(){this.isLoading.set(true),this.errorMessage.set(""),this.projectApi.listProjects().subscribe({next:({projects:t})=>{let e=t.map(i=>i.name).filter(i=>!i.includes("__"));if(this.projects.set(e),e.length===0){this.isLoading.set(false);return}let n=e.map(i=>this.schedulerApi.listSchedulersForProject(i).pipe(ga(()=>ha([]))));By(n).subscribe({next:i=>{let l=[];i.forEach((p,L)=>{p.forEach(oe=>l.push(z$1(P$1({},oe),{projectName:e[L]})));}),this.allSchedulers.set(l),this.isLoading.set(false);},error:()=>{this.errorMessage.set("Failed to load schedulers"),this.isLoading.set(false);}});},error:()=>{this.errorMessage.set("Failed to load projects"),this.isLoading.set(false);}});}setProject(t){this.activeProject.set(t);}formatInterval(t){let e=/^(\d+)(min|h|d|M)$/.exec(t);if(!e)return t;let[,n,i]=e;return `Every ${n}${{min:"min",h:"h",d:"d",M:"mo"}[i??""]??i}`}formatNextRun(t){if(!t)return "Expired";let e=new Date(t),n=new Date,i=e.getTime()-n.getTime();if(i<0)return "Due";let l=Math.floor(i/6e4);if(l<60)return `in ${l}m`;let p=Math.floor(l/60);return p<24?`in ${p}h`:`in ${Math.floor(p/24)}d`}getSource(t){if(t.agentName&&t.instruction){let e=t.instruction.length>35?t.instruction.slice(0,35)+"\u2026":t.instruction;return `${t.agentName}: ${e}`}return t.promptId??""}toggleEnabled(t){(t.enabled?this.schedulerApi.disableSchedulerForProject(t.projectName,t.id):this.schedulerApi.enableSchedulerForProject(t.projectName,t.id)).subscribe({next:()=>{this.allSchedulers.update(n=>n.map(i=>i.id===t.id?z$1(P$1({},i),{enabled:!i.enabled}):i));},error:()=>this.errorMessage.set("Failed to toggle scheduler")});}runNow(t){this.schedulerApi.runSchedulerNowForProject(t.projectName,t.id).subscribe({error:()=>this.errorMessage.set("Failed to run scheduler")});}edit(t){let e={mode:"edit",projectName:t.projectName,scheduler:{id:t.id,name:t.name,agentName:t.agentName,instruction:t.instruction,enabled:t.enabled,schedule:t.schedule}};this.dialog.open(z,{width:"480px",data:e}).afterClosed().subscribe(i=>{i&&this.load();});}delete(t){this.schedulerApi.deleteSchedulerForProject(t.projectName,t.id).subscribe({next:()=>{this.allSchedulers.update(e=>e.filter(n=>n.id!==t.id));},error:()=>this.errorMessage.set("Failed to delete scheduler")});}openCreate(){this.dialogRef.close(),this.dialog.open(z,{width:"480px"});}close(){this.dialogRef.close();}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=Aw({type:a,selectors:[["app-global-schedulers-dialog"]],decls:19,vars:3,consts:[["mat-dialog-title",""],[1,"gsd-count"],[1,"gsd-project-filters"],[1,"gsd-loading"],[1,"gsd-error"],[1,"gsd-empty"],[1,"gsd-list"],["align","end"],["mat-button","",3,"click"],[1,"proj-chip",3,"click"],[1,"proj-chip",3,"active"],["diameter","32"],["mat-flat-button","",3,"click"],[1,"gsd-item",3,"disabled"],[1,"gsd-item"],[1,"gsd-item-main"],[1,"gsd-item-name"],[1,"gsd-item-project"],[1,"gsd-item-source"],[1,"gsd-item-meta"],[1,"gsd-interval"],[1,"gsd-next"],[1,"gsd-item-actions"],["matTooltip","Enable / Disable",3,"change","checked"],["mat-icon-button","","matTooltip","Run now",3,"click"],["mat-icon-button","","matTooltip","Edit",3,"click"],["mat-icon-button","","matTooltip","Delete",1,"delete-btn",3,"click"]],template:function(e,n){e&1&&(vs(0,"h2",0)(1,"mat-icon"),WC(2,"schedule"),fl(),WC(3," Scheduled tasks "),vs(4,"span",1),WC(5),fl()(),vs(6,"mat-dialog-content"),eC(7,ln,5,2,"nav",2),eC(8,sn,2,0,"div",3)(9,cn,4,1,"div",4)(10,dn,9,0,"div",5)(11,un,3,0,"ul",6),fl(),vs(12,"mat-dialog-actions",7)(13,"button",8),Ag("click",function(){return n.openCreate()}),vs(14,"mat-icon"),WC(15,"add"),fl(),WC(16," New scheduler "),fl(),vs(17,"button",8),Ag("click",function(){return n.close()}),WC(18,"Close"),fl()()),e&2&&(XE(5),Zg(n.filteredSchedulers().length),XE(2),tC(n.projects().length>1?7:-1),XE(),tC(n.isLoading()?8:n.errorMessage()?9:n.filteredSchedulers().length===0?10:11));},dependencies:[ti,zt$2,jt,Vt$1,Nt$1,hr,pr,Gn$1,yt,wt$1,Et$1,yt$1,Pt$1,Ve,ne$1,ke$1,se],styles:["[_nghost-%COMP%]{display:block}h2[mat-dialog-title][_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}h2[mat-dialog-title][_ngcontent-%COMP%] .gsd-count[_ngcontent-%COMP%]{font-size:13px;font-weight:400;color:var(--mat-sys-on-surface-variant);margin-left:2px}.gsd-project-filters[_ngcontent-%COMP%]{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:12px}.proj-chip[_ngcontent-%COMP%]{padding:4px 12px;border-radius:16px;border:1px solid var(--mat-sys-outline);background:transparent;color:var(--mat-sys-on-surface);font-size:13px;cursor:pointer;transition:background .15s,color .15s}.proj-chip.active[_ngcontent-%COMP%]{background:var(--mat-sys-primary);color:var(--mat-sys-on-primary);border-color:var(--mat-sys-primary)}.proj-chip[_ngcontent-%COMP%]:hover:not(.active){background:var(--mat-sys-surface-variant)}.gsd-loading[_ngcontent-%COMP%], .gsd-empty[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:32px 0;color:var(--mat-sys-on-surface-variant)}.gsd-loading[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%], .gsd-empty[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:40px;width:40px;height:40px;opacity:.4}.gsd-error[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;color:var(--mat-sys-error);padding:16px 0}.gsd-list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}.gsd-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:8px;background:var(--mat-sys-surface-container);transition:opacity .2s}.gsd-item.disabled[_ngcontent-%COMP%]{opacity:.5}.gsd-item-main[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.gsd-item-name[_ngcontent-%COMP%]{font-weight:500;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gsd-item-project[_ngcontent-%COMP%]{font-size:11px;color:var(--mat-sys-primary);font-weight:500}.gsd-item-source[_ngcontent-%COMP%]{font-size:12px;color:var(--mat-sys-on-surface-variant);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gsd-item-meta[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-end;gap:2px;white-space:nowrap}.gsd-interval[_ngcontent-%COMP%]{font-size:12px;color:var(--mat-sys-on-surface-variant)}.gsd-next[_ngcontent-%COMP%]{font-size:11px;color:var(--mat-sys-on-surface-variant)}.gsd-next.due[_ngcontent-%COMP%]{color:var(--mat-sys-error)}.gsd-item-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px}.gsd-item-actions[_ngcontent-%COMP%] .delete-btn[_ngcontent-%COMP%]{color:var(--mat-sys-error);opacity:.7;transition:opacity .15s}.gsd-item-actions[_ngcontent-%COMP%] .delete-btn[_ngcontent-%COMP%]:hover{opacity:1}mat-dialog-actions[_ngcontent-%COMP%]{gap:8px}"]})};var Se=class a{http=g(dy);threadApi=g(N);projectApi=g(c);isLoading=Hi(false);tasks=Hi([]);refresh(){this.isLoading.set(true),this.threadApi.listAllThreads().pipe(Wy(15e3)).subscribe({next:t=>{let e=t.filter(n=>!n.parentThreadId).map(n=>({id:n.id,name:n.name,summary:n.summary,modifiedDate:n.modifiedDate,starring:n.starring??[],users:n.users??[],isActive:false,status:this.deriveStatus(n),projectId:n.projectId,worktreeProject:n.worktreeProject}));this.tasks.set(this.sorted(e)),this.isLoading.set(false);},error:()=>{this.isLoading.set(false);}});}applyStatusEvent(t,e){let n=e==="invite"?"waiting-you":"in-progress";this.tasks.update(i=>this.sorted(i.map(l=>l.id===t?z$1(P$1({},l),{status:n}):l)));}closeTask(t,e){this.tasks.update(n=>n.filter(i=>i.id!==e)),this.http.delete(`/api/projects/${t}/missions/${e}`).subscribe({next:()=>this.refresh(),error:n=>{console.error("[GLOBAL-TC] Failed to close task:",n),this.refresh();}});}stopThread(t,e){this.http.post(`/api/projects/${t}/threads/${e}/stop`,{}).subscribe({error:n=>console.error("[GLOBAL-TC] Failed to stop thread:",n)});}deleteThread(t,e){this.tasks.update(n=>n.filter(i=>i.id!==e)),this.http.delete(`/api/projects/${t}/threads/${e}`).subscribe({next:()=>this.refresh(),error:n=>{console.error("[GLOBAL-TC] Failed to delete thread:",n),this.refresh();}});}toggleStar(t,e,n){let i=`/api/projects/${t}/threads/${e}/star`;(n?this.http.delete(i):this.http.post(i,{})).subscribe({next:()=>this.refresh(),error:p=>console.error("[GLOBAL-TC] Failed to toggle star:",p)});}markTaskDone(t,e){this.http.post(`/api/projects/${t}/threads/${e}/done`,{}).subscribe({next:()=>this.refresh(),error:n=>console.error("[GLOBAL-TC] Failed to mark task as done:",n)});}markTasksBatchDone(t){if(t.length===0)return;let e=new Map;for(let{id:l,projectId:p}of t){let L=e.get(p)??[];L.push(l),e.set(p,L);}let n=new Set(t.map(l=>l.id));this.tasks.update(l=>this.sorted(l.map(p=>n.has(p.id)?z$1(P$1({},p),{status:"done"}):p)));let i=[...e.entries()].map(([l,p])=>this.projectApi.markThreadsBatchDone(l,p));By(i.length>0?i:[ha(null)]).subscribe({next:()=>this.refresh(),error:l=>{console.error("[GLOBAL-TC] Failed to batch-mark tasks as done:",l),this.refresh();}});}markTaskActive(t,e){this.http.delete(`/api/projects/${t}/threads/${e}/done`).subscribe({next:()=>this.refresh(),error:n=>console.error("[GLOBAL-TC] Failed to mark task as active:",n)});}deriveStatus(t){return t.closedByUser?"done":t.pendingInvite?"waiting-you":Date.now()-new Date(t.modifiedDate).getTime()<bt?"in-progress":"paused"}sorted(t){return [...t].sort((e,n)=>{let i=kt[e.status]-kt[n.status];return i!==0?i:e.modifiedDate>n.modifiedDate?-1:1})}static \u0275fac=function(e){return new(e||a)};static \u0275prov=x({token:a,factory:a.\u0275fac,providedIn:"root"})};var Te=class a{configApi=g(W);dialog=g(Re);openUserConfigEditor(){this.configApi.getUserConfig().subscribe({next:t=>{this.dialog.open(Qe,{data:{configType:"user",initialContent:JSON.stringify(t,null,2)}}).afterClosed().subscribe(n=>{n&&this.configApi.updateUserConfig(n).subscribe({error:i=>console.error("[CONFIG-STATE] Error saving user config:",i)});});},error:t=>console.error("[CONFIG-STATE] Error loading user config:",t)});}static \u0275fac=function(e){return new(e||a)};static \u0275prov=x({token:a,factory:a.\u0275fac,providedIn:"root"})};var gn=["layoutContainer"],hn=(a,t)=>t.key,_n=(a,t)=>t.name,fn=(a,t)=>t.status,Pt=(a,t)=>t.id;function bn(a,t){if(a&1){let e=dC();vs(0,"button",32),Ag("click",function(){If(e);let i=mC();return wf(i.clearSearch())}),vs(1,"mat-icon"),WC(2,"close"),fl()();}}function vn(a,t){if(a&1){let e=dC();vs(0,"button",33),Ag("click",function(){let i=If(e).$implicit,l=mC(2);return wf(l.setProject(i.name))}),WC(1),vs(2,"span",34),WC(3),fl()();}if(a&2){let e=t.$implicit,n=mC(2);Hg("active",n.activeProject()===e.name),XE(),yl(" ",e.name," "),XE(2),Zg(e.count);}}function Cn(a,t){if(a&1){let e=dC();vs(0,"nav",22)(1,"button",33),Ag("click",function(){If(e);let i=mC();return wf(i.setProject(null))}),WC(2," All projects "),vs(3,"span",34),WC(4),fl()(),oC(5,vn,4,4,"button",35,_n),fl();}if(a&2){let e=mC();XE(),Hg("active",e.activeProject()===null),XE(3),Zg(e.allTasks().length),XE(),iC(e.projectSummaries());}}function yn(a,t){if(a&1&&(vs(0,"span",37),WC(1),fl()),a&2){let e=mC().$implicit,n=mC();XE(),Zg(n.filterCounts()[e.key]);}}function xn(a,t){if(a&1){let e=dC();vs(0,"button",36),Ag("click",function(){let i=If(e).$implicit,l=mC();return wf(l.setFilter(i.key))}),vs(1,"mat-icon",26),WC(2),fl(),vs(3,"span"),WC(4),fl(),eC(5,yn,2,1,"span",37),fl();}if(a&2){let e=t.$implicit,n=mC();Hg("active",n.activeFilter()===e.key),Cg("aria-selected",n.activeFilter()===e.key),XE(2),Zg(e.icon),XE(2),Zg(e.label),XE(),tC(n.filterCounts()[e.key]>0?5:-1);}}function kn(a,t){a&1&&(vs(0,"div",29),bg(1,"mat-spinner",38),vs(2,"p"),WC(3,"Loading tasks from all projects\u2026"),fl()());}function Mn(a,t){a&1&&(vs(0,"div",30)(1,"mat-icon",39),WC(2,"hub"),fl(),vs(3,"p"),WC(4,"No tasks found."),fl()());}function Sn(a,t){if(a&1){let e=dC();vs(0,"button",51),Ag("click",function(){If(e);let i=mC(5);return wf(i.markSelectedPausedDone())}),vs(1,"mat-icon"),WC(2,"check_circle_outline"),fl(),WC(3),fl();}if(a&2){let e=mC(5);Tg("matTooltip","Mark "+e.selectedPausedCount()+" task(s) as done"),XE(3),yl(" Mark done (",e.selectedPausedCount(),") ");}}function Tn(a,t){if(a&1){let e=dC();vs(0,"mat-checkbox",48),Ag("change",function(){If(e);let i=mC(4);return wf(i.toggleSelectAllPaused())}),fl(),eC(1,Sn,4,2,"button",49),vs(2,"button",50),Ag("click",function(){If(e);let i=mC(4);return wf(i.toggleSelectMode())}),vs(3,"mat-icon"),WC(4,"close"),fl()();}if(a&2){let e=mC(4);Tg("checked",e.allPausedSelected())("indeterminate",e.somePausedSelected()&&!e.allPausedSelected()),XE(),tC(e.selectedPausedCount()>0?1:-1);}}function wn(a,t){if(a&1){let e=dC();vs(0,"button",52),Ag("click",function(){If(e);let i=mC(4);return wf(i.toggleSelectMode())}),vs(1,"mat-icon"),WC(2,"checklist"),fl(),WC(3," Select "),fl();}}function Pn(a,t){if(a&1&&(vs(0,"div",41)(1,"h3",42)(2,"mat-icon",44),WC(3),fl(),WC(4),vs(5,"span",45),WC(6),fl()(),vs(7,"div",46),eC(8,Tn,5,3)(9,wn,4,0,"button",47),fl()()),a&2){let e=mC().$implicit,n=mC(2);XE(3),Zg(e.icon),XE(),yl(" ",e.label," "),XE(2),Zg(e.tasks.length),XE(2),tC(n.isSelectMode()?8:9);}}function Dn(a,t){if(a&1&&(vs(0,"h3",42)(1,"mat-icon",44),WC(2),fl(),WC(3),vs(4,"span",45),WC(5),fl()()),a&2){let e=mC().$implicit;XE(2),Zg(e.icon),XE(),yl(" ",e.label," "),XE(2),Zg(e.tasks.length);}}function jn(a,t){if(a&1){let e=dC();vs(0,"app-task-card",53),Ag("stopRequested",function(i){let l=If(e).$implicit,p=mC(3);return wf(p.onStopRequested(i,l.projectId))})("deleteRequested",function(i){let l=If(e).$implicit,p=mC(3);return wf(p.onDeleteRequested(i,l.projectId))})("starToggled",function(i){let l=If(e).$implicit,p=mC(3);return wf(p.onStarToggled(i,l.projectId))})("closeTaskRequested",function(i){let l=If(e).$implicit,p=mC(3);return wf(p.onCloseTaskRequested(i,l.projectId))})("markDoneRequested",function(i){let l=If(e).$implicit,p=mC(3);return wf(p.onMarkDoneRequested(i,l.projectId))})("markActiveRequested",function(i){let l=If(e).$implicit,p=mC(3);return wf(p.onMarkActiveRequested(i,l.projectId))})("previewRequested",function(i){let l=If(e).$implicit,p=mC(3);return wf(p.onPreviewRequested(i,l.projectId,l.name))})("selectionChanged",function(i){If(e);let l=mC(3);return wf(l.onPausedSelectionChanged(i.id,i.selected))}),fl();}if(a&2){let e=t.$implicit,n=mC().$implicit,i=mC(2);Hg("is-previewed",i.previewThreadId()===e.id),Tg("task",e)("projectNameOverride",e.projectId)("showProject",true)("previewMode",i.previewActive())("selectable",n.status==="paused"&&i.isSelectMode())("selected",i.selectedPausedIds().has(e.id));}}function On(a,t){if(a&1&&(vs(0,"section",40),eC(1,Pn,10,4,"div",41)(2,Dn,6,3,"h3",42),vs(3,"div",31),oC(4,jn,1,8,"app-task-card",43,Pt),fl()()),a&2){let e=t.$implicit;XE(),tC(e.status==="paused"?1:2),XE(3),iC(e.tasks);}}function En(a,t){if(a&1&&oC(0,On,6,1,"section",40,fn),a&2){let e=mC();iC(e.taskGroups());}}function Nn(a,t){if(a&1){let e=dC();vs(0,"app-task-card",55),Ag("stopRequested",function(i){let l=If(e).$implicit,p=mC(2);return wf(p.onStopRequested(i,l.projectId))})("deleteRequested",function(i){let l=If(e).$implicit,p=mC(2);return wf(p.onDeleteRequested(i,l.projectId))})("starToggled",function(i){let l=If(e).$implicit,p=mC(2);return wf(p.onStarToggled(i,l.projectId))})("closeTaskRequested",function(i){let l=If(e).$implicit,p=mC(2);return wf(p.onCloseTaskRequested(i,l.projectId))})("markDoneRequested",function(i){let l=If(e).$implicit,p=mC(2);return wf(p.onMarkDoneRequested(i,l.projectId))})("markActiveRequested",function(i){let l=If(e).$implicit,p=mC(2);return wf(p.onMarkActiveRequested(i,l.projectId))})("previewRequested",function(i){let l=If(e).$implicit,p=mC(2);return wf(p.onPreviewRequested(i,l.projectId,l.name))}),fl();}if(a&2){let e=t.$implicit,n=mC(2);Hg("is-previewed",n.previewThreadId()===e.id),Tg("task",e)("projectNameOverride",e.projectId)("showProject",true)("previewMode",n.previewActive());}}function In(a,t){if(a&1&&(vs(0,"div",31),oC(1,Nn,1,6,"app-task-card",54,Pt),fl()),a&2){let e=mC();XE(),iC(e.displayedTasks());}}function An(a,t){if(a&1){let e=dC();vs(0,"div",56),Ag("mousedown",function(i){If(e);let l=mC();return wf(l.onResizerMousedown(i))}),fl(),vs(1,"div",57)(2,"header",58)(3,"span",59),WC(4),fl(),vs(5,"div",60)(6,"button",61),Ag("click",function(){If(e);let i=mC();return wf(i.navigateToThread())}),vs(7,"mat-icon"),WC(8,"open_in_new"),fl()(),vs(9,"button",62),Ag("click",function(){If(e);let i=mC();return wf(i.closePreview())}),vs(10,"mat-icon"),WC(11,"close"),fl()()()(),vs(12,"div",63),bg(13,"app-thread",64),fl()();}if(a&2){let e=mC();XE(),Vg("width",e.previewPanelWidthPercent(),"%"),XE(3),Zg(e.previewTaskName()||"Task"),XE(9),Tg("projectName",e.previewProjectId())("threadId",e.previewThreadId());}}var Vn=20,Fn=70,Gn=[{status:"waiting-you",label:"Waiting for you",icon:"mark_unread_chat_alt"},{status:"in-progress",label:"In progress",icon:"pending"},{status:"paused",label:"Paused",icon:"pause_circle"},{status:"error",label:"Error",icon:"error"},{status:"done",label:"Done",icon:"check_circle"}],Rn=[{key:"all",label:"All",icon:"grid_view"},{key:"waiting-you",label:"Waiting for you",icon:"mark_unread_chat_alt"},{key:"in-progress",label:"In progress",icon:"pending"},{key:"paused",label:"Paused",icon:"pause_circle"},{key:"done",label:"Done",icon:"check_circle"}],wt=class a{globalTaskService=g(Se);destroyRef=g(we);dialog=g(Re);router=g(G);configState=g(Te);userService=g(he);preferences=g(L);projectState=g(P);threadState=g(U);breakpointObserver=g(Ot$1);username=F(this.userService.username$,{initialValue:null});isDesktop=F(this.breakpointObserver.observe("(min-width: 1280px)").pipe(ue(t=>t.matches)),{initialValue:false});previewEnabled=F(this.preferences.missionPreviewEnabled$,{initialValue:false});previewActive=mT(()=>this.previewEnabled()&&this.isDesktop());previewThreadId=Hi(null);previewProjectId=Hi(null);previewTaskName=Hi(null);previewPanelWidthPercent=Hi(this.preferences.getMissionPreviewPanelWidth());isDraggingResizer=false;dragStartX=0;dragStartWidth=0;containerWidth=0;layoutContainerRef;globalEventSource=null;filters=Rn;activeFilter=Hi("all");starredOnly=Hi(false);activeProject=Hi(null);searchQuery=Hi("");isLoading=this.globalTaskService.isLoading;allTasks=this.globalTaskService.tasks;isSelectMode=Hi(false);selectedPausedIds=Hi(new Set);pausedTasks=mT(()=>this.displayedTasks().filter(t=>t.status==="paused"));allPausedSelected=mT(()=>{let t=this.pausedTasks(),e=this.selectedPausedIds();return t.length>0&&t.every(n=>e.has(n.id))});somePausedSelected=mT(()=>{let t=this.selectedPausedIds();return this.pausedTasks().some(e=>t.has(e.id))});selectedPausedCount=mT(()=>{let t=this.selectedPausedIds();return this.pausedTasks().filter(e=>t.has(e.id)).length});projectSummaries=mT(()=>{let t=this.allTasks(),e=new Map;for(let n of t)e.set(n.projectId,(e.get(n.projectId)??0)+1);return [...e.entries()].map(([n,i])=>({name:n,count:i})).sort((n,i)=>n.name.localeCompare(i.name))});filteredTasks=mT(()=>{let t=this.allTasks(),e=this.activeProject();e&&(t=t.filter(l=>l.projectId===e));let n=this.username();this.starredOnly()&&n&&(t=t.filter(l=>l.starring.includes(n)));let i=this.activeFilter();return i!=="all"&&(t=t.filter(l=>l.status===i)),t});filterCounts=mT(()=>{let t=this.allTasks(),e=this.activeProject();e&&(t=t.filter(i=>i.projectId===e));let n=this.username();return this.starredOnly()&&n&&(t=t.filter(i=>i.starring.includes(n))),{all:t.length,"waiting-you":t.filter(i=>i.status==="waiting-you").length,"in-progress":t.filter(i=>i.status==="in-progress").length,done:t.filter(i=>i.status==="done").length,paused:t.filter(i=>i.status==="paused").length,error:t.filter(i=>i.status==="error").length}});displayedTasks=mT(()=>{let t=this.searchQuery().toLowerCase().trim(),e=this.sortedFilteredTasks();return t?e.filter(n=>(n.name||"").toLowerCase().includes(t)||(n.summary||"").toLowerCase().includes(t)):e});taskGroups=mT(()=>{let t=this.displayedTasks();return Gn.map(e=>z$1(P$1({},e),{tasks:t.filter(n=>n.status===e.status)})).filter(e=>e.tasks.length>0)});sortedFilteredTasks=mT(()=>{let t=this.filteredTasks(),e={"waiting-you":0,"in-progress":1,paused:2,error:3,done:4};return [...t].sort((n,i)=>(e[n.status]??99)-(e[i.status]??99))});constructor(){this.destroyRef.onDestroy(()=>this.disconnectGlobalSse());}ngOnInit(){this.globalTaskService.refresh(),this.connectGlobalSse(),this.userService.fetchCurrentUser().pipe(U$1(this.destroyRef)).subscribe({error:t=>console.warn("[GTC] Could not fetch user:",t)});}setFilter(t){this.activeFilter.set(t);}toggleStarredFilter(){this.starredOnly.update(t=>!t);}setProject(t){this.activeProject.set(t),this.activeFilter.set("all");}onSearchInput(t){this.searchQuery.set(t.target.value);}clearSearch(){this.searchQuery.set("");}refresh(){this.globalTaskService.refresh();}openPreferences(){this.dialog.open(Ye,{width:"400px"});}openTokenUsage(){this.router.navigate(["/token-usage"]);}openUserConfig(){this.configState.openUserConfigEditor();}openQuickSchedulerDialog(){this.dialog.open(z,{width:"480px",disableClose:false});}openGlobalSchedulersDialog(){this.dialog.open(Me,{width:"600px",maxHeight:"80vh"});}openNewTaskDialog(){this.dialog.open(ke,{width:"500px",disableClose:false}).afterClosed().subscribe(e=>{e&&(e.navigate?this.router.navigate(["project",e.projectId]):(setTimeout(()=>this.globalTaskService.refresh(),300),setTimeout(()=>this.globalTaskService.refresh(),1500)));});}onStopRequested(t,e){this.globalTaskService.stopThread(e,t);}onDeleteRequested(t,e){this.globalTaskService.deleteThread(e,t);}onStarToggled(t,e){let n=this.allTasks().find(p=>p.id===t);if(!n)return;let i=this.username(),l=!!i&&n.starring.includes(i);this.globalTaskService.toggleStar(e,t,l);}onCloseTaskRequested(t,e){let i=this.allTasks().find(p=>p.id===t)?.worktreeProject??e;this.dialog.open(z$2,{width:"420px",data:{title:"Close task",message:`This will stop the agent, delete the thread and remove the worktree project "${i}" from disk. This cannot be undone.`,confirmLabel:"Close task",cancelLabel:"Cancel"}}).afterClosed().subscribe(p=>{p&&this.globalTaskService.closeTask(e,t);});}onMarkDoneRequested(t,e){this.globalTaskService.markTaskDone(e,t);}onMarkActiveRequested(t,e){this.globalTaskService.markTaskActive(e,t);}toggleSelectMode(){let t=!this.isSelectMode();this.isSelectMode.set(t),t||this.selectedPausedIds.set(new Set);}onPausedSelectionChanged(t,e){this.selectedPausedIds.update(n=>{let i=new Set(n);return e?i.add(t):i.delete(t),i});}toggleSelectAllPaused(){let t=this.pausedTasks();this.allPausedSelected()?this.selectedPausedIds.set(new Set):this.selectedPausedIds.set(new Set(t.map(e=>e.id)));}markSelectedPausedDone(){let t=this.selectedPausedIds(),e=this.pausedTasks().filter(n=>t.has(n.id)).map(n=>({id:n.id,projectId:n.projectId}));e.length!==0&&(this.selectedPausedIds.set(new Set),this.isSelectMode.set(false),this.globalTaskService.markTasksBatchDone(e));}onPreviewRequested(t,e,n){this.previewThreadId()===t?(this.previewThreadId.set(null),this.previewProjectId.set(null),this.previewTaskName.set(null)):(this.projectState.selectProject(e),this.threadState.selectThread(t),this.previewProjectId.set(e),this.previewThreadId.set(t),this.previewTaskName.set(n));}closePreview(){this.previewThreadId.set(null),this.previewProjectId.set(null),this.previewTaskName.set(null);}navigateToThread(){let t=this.previewThreadId(),e=this.previewProjectId();!t||!e||this.router.navigate(["project",e,"thread",t]);}onResizerMousedown(t){t.preventDefault(),this.isDraggingResizer=true,this.dragStartX=t.clientX,this.dragStartWidth=this.previewPanelWidthPercent(),this.containerWidth=this.layoutContainerRef?.nativeElement.offsetWidth??window.innerWidth;}onDocumentMousemove(t){if(!this.isDraggingResizer)return;let n=(this.dragStartX-t.clientX)/this.containerWidth*100,i=Math.min(Fn,Math.max(Vn,this.dragStartWidth+n));this.previewPanelWidthPercent.set(i);}onDocumentMouseup(){this.isDraggingResizer&&(this.isDraggingResizer=false,this.preferences.setMissionPreviewPanelWidth(this.previewPanelWidthPercent()));}connectGlobalSse(t=5e3){this.disconnectGlobalSse();let e=new EventSource("/api/event-stream");this.globalEventSource=e,e.onmessage=n=>{try{let i=JSON.parse(n.data),l=ce(i);if(!l)return;let p=l.threadId;if(!p)return;l instanceof f||l instanceof b?this.globalTaskService.applyStatusEvent(p,"invite"):l instanceof O?this.globalTaskService.applyStatusEvent(p,"thinking"):l instanceof V&&this.globalTaskService.refresh();}catch(i){}},e.onerror=()=>{e.readyState===EventSource.CLOSED&&(this.globalEventSource=null,setTimeout(()=>{this.globalEventSource||this.connectGlobalSse(Math.min(t*2,6e4));},t));};}disconnectGlobalSse(){this.globalEventSource&&(this.globalEventSource.close(),this.globalEventSource=null);}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=Aw({type:a,selectors:[["app-global-task-control"]],viewQuery:function(e,n){if(e&1&&Fg(gn,5),e&2){let i;IC(i=wC())&&(n.layoutContainerRef=i.first);}},hostBindings:function(e,n){e&1&&Ag("mousemove",function(l){return n.onDocumentMousemove(l)},dE)("mouseup",function(){return n.onDocumentMouseup()},dE);},decls:85,vars:11,consts:[["layoutContainer",""],["schedulerMenu","matMenu"],["controlCenterMenu","matMenu"],[1,"gtc"],[1,"gtc-toolbar"],[1,"gtc-toolbar-left"],[1,"gtc-logo-icon"],[1,"gtc-title"],["appearance","fill","subscriptSizing","dynamic",1,"gtc-search"],["matPrefix",""],["matInput","","type","search","placeholder","Filter tasks\u2026","autocomplete","off",3,"input","keydown.escape","value"],["matSuffix","","mat-icon-button","","aria-label","Clear"],[1,"gtc-toolbar-actions"],["mat-icon-button","","matTooltip","Schedulers","aria-label","Schedulers",3,"matMenuTriggerFor"],["mat-menu-item","",3,"click"],["mat-icon-button","","matTooltip","Control Center","aria-label","Control Center",3,"matMenuTriggerFor"],["mat-menu-item","","href","https://github.com/whoz-oss/coday","target","_blank","rel","noopener noreferrer"],["mat-icon-button","","matTooltip","Refresh all tasks","aria-label","Refresh tasks",3,"click","disabled"],["mat-stroked-button","","routerLink","/projects","aria-label","Manage projects","matTooltip","Manage projects"],[1,"btn-label"],["mat-flat-button","","aria-label","New task","matTooltip","New Task",1,"gtc-new-btn",3,"click"],[1,"gtc-filter-bar"],["aria-label","Filter by project",1,"gtc-project-filters"],["role","tablist","aria-label","Filter by status",1,"gtc-filters"],["role","tab",1,"filter-chip",3,"active"],["role","switch","aria-label","Show starred tasks only",1,"filter-chip","starred-filter",3,"click"],[1,"filter-icon"],[1,"gtc-body"],[1,"gtc-content"],[1,"gtc-loading"],[1,"gtc-empty"],[1,"gtc-grid"],["matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"],[1,"project-chip",3,"click"],[1,"chip-count"],[1,"project-chip",3,"active"],["role","tab",1,"filter-chip",3,"click"],[1,"filter-badge"],["diameter","36"],[1,"empty-icon"],[1,"gtc-group"],[1,"gtc-group-header"],[1,"gtc-group-title"],[3,"task","projectNameOverride","showProject","previewMode","selectable","selected","is-previewed"],[1,"group-icon"],[1,"group-count"],[1,"gtc-group-actions"],["mat-stroked-button","","matTooltip","Select multiple tasks to mark as done","aria-label","Enter selection mode",1,"select-mode-btn"],["aria-label","Select all paused tasks",1,"select-all-checkbox",3,"change","checked","indeterminate"],["mat-flat-button","",1,"batch-done-btn",3,"matTooltip"],["mat-icon-button","","matTooltip","Cancel selection","aria-label","Cancel selection",1,"select-mode-cancel-btn",3,"click"],["mat-flat-button","",1,"batch-done-btn",3,"click","matTooltip"],["mat-stroked-button","","matTooltip","Select multiple tasks to mark as done","aria-label","Enter selection mode",1,"select-mode-btn",3,"click"],[3,"stopRequested","deleteRequested","starToggled","closeTaskRequested","markDoneRequested","markActiveRequested","previewRequested","selectionChanged","task","projectNameOverride","showProject","previewMode","selectable","selected"],[3,"task","projectNameOverride","showProject","previewMode","is-previewed"],[3,"stopRequested","deleteRequested","starToggled","closeTaskRequested","markDoneRequested","markActiveRequested","previewRequested","task","projectNameOverride","showProject","previewMode"],["matTooltip","Drag to resize","aria-hidden","true",1,"gtc-resizer",3,"mousedown"],[1,"gtc-preview-pane"],[1,"gtc-preview-header"],[1,"gtc-preview-title"],[1,"gtc-preview-actions"],["matTooltip","Open full view","aria-label","Open thread in full view","type","button",1,"preview-action-btn",3,"click"],["matTooltip","Close panel","aria-label","Close preview panel","type","button",1,"preview-action-btn",3,"click"],[1,"gtc-preview-body","thread-preview-host"],[3,"projectName","threadId"]],template:function(e,n){if(e&1&&(vs(0,"div",3,0)(2,"header",4)(3,"div",5)(4,"mat-icon",6),WC(5,"hub"),fl(),vs(6,"h1",7),WC(7,"Global Task Control"),fl()(),vs(8,"mat-form-field",8)(9,"mat-icon",9),WC(10,"search"),fl(),vs(11,"input",10),Ag("input",function(l){return n.onSearchInput(l)})("keydown.escape",function(){return n.clearSearch()}),fl(),eC(12,bn,3,0,"button",11),fl(),vs(13,"div",12)(14,"button",13)(15,"mat-icon"),WC(16,"schedule"),fl()(),vs(17,"mat-menu",null,1)(19,"button",14),Ag("click",function(){return n.openGlobalSchedulersDialog()}),vs(20,"mat-icon"),WC(21,"list"),fl(),vs(22,"span"),WC(23,"View schedulers"),fl()(),vs(24,"button",14),Ag("click",function(){return n.openQuickSchedulerDialog()}),vs(25,"mat-icon"),WC(26,"add"),fl(),vs(27,"span"),WC(28,"New scheduler"),fl()()(),vs(29,"button",15)(30,"mat-icon"),WC(31,"hub"),fl()(),vs(32,"mat-menu",null,2)(34,"button",14),Ag("click",function(){return n.openPreferences()}),vs(35,"mat-icon"),WC(36,"tune"),fl(),vs(37,"span"),WC(38,"Preferences"),fl()(),vs(39,"button",14),Ag("click",function(){return n.openTokenUsage()}),vs(40,"mat-icon"),WC(41,"data_usage"),fl(),vs(42,"span"),WC(43,"Token Usage"),fl()(),vs(44,"button",14),Ag("click",function(){return n.openUserConfig()}),vs(45,"mat-icon"),WC(46,"manage_accounts"),fl(),vs(47,"span"),WC(48,"User Configuration"),fl()(),bg(49,"mat-divider"),vs(50,"a",16)(51,"mat-icon"),WC(52,"code"),fl(),vs(53,"span"),WC(54,"Contribute on GitHub"),fl()()(),vs(55,"button",17),Ag("click",function(){return n.refresh()}),vs(56,"mat-icon"),WC(57,"refresh"),fl()(),vs(58,"button",18)(59,"mat-icon"),WC(60,"settings"),fl(),vs(61,"span",19),WC(62,"Manage projects"),fl()(),vs(63,"button",20),Ag("click",function(){return n.openNewTaskDialog()}),vs(64,"mat-icon"),WC(65,"rocket_launch"),fl(),vs(66,"span",19),WC(67,"New Task"),fl()()()(),vs(68,"div",21),eC(69,Cn,7,3,"nav",22),vs(70,"nav",23),oC(71,xn,6,6,"button",24,hn),vs(73,"button",25),Ag("click",function(){return n.toggleStarredFilter()}),vs(74,"mat-icon",26),WC(75,"star"),fl(),vs(76,"span"),WC(77,"Starred"),fl()()()(),vs(78,"div",27)(79,"main",28),eC(80,kn,4,0,"div",29)(81,Mn,5,0,"div",30)(82,En,2,0)(83,In,3,0,"div",31),fl(),eC(84,An,14,5),fl()()),e&2){let i=TC(18),l=TC(33);XE(11),Tg("value",n.searchQuery()),XE(),tC(n.searchQuery()?12:-1),XE(2),Tg("matMenuTriggerFor",i),XE(15),Tg("matMenuTriggerFor",l),XE(26),Tg("disabled",n.isLoading()),XE(14),tC(n.projectSummaries().length>1?69:-1),XE(2),iC(n.filters),XE(2),Hg("active",n.starredOnly()),Cg("aria-checked",n.starredOnly()),XE(7),tC(n.isLoading()?80:n.displayedTasks().length===0?81:n.activeFilter()==="all"&&!n.searchQuery()?82:83),XE(4),tC(n.previewActive()&&n.previewThreadId()&&n.previewProjectId()?84:-1);}},dependencies:[A,Ci,ve,ne,yt,wt$1,hr,pr,Gn$1,Ve,ne$1,Et$1,yt$1,In$1,De,Be,En$1,He,Ne,ce$1,nt,Ot$2,zt$1,Tn$1,Sn$1,si],styles:[".glass-panel[_ngcontent-%COMP%]{background:var(--glass-bg);backdrop-filter:var(--glass-backdrop-blur);-webkit-backdrop-filter:var(--glass-backdrop-blur);border:1px solid var(--glass-border);box-shadow:var(--glass-shadow)}.glass-interactive[_ngcontent-%COMP%]{background:var(--glass-bg);backdrop-filter:var(--glass-backdrop-blur);-webkit-backdrop-filter:var(--glass-backdrop-blur);border:1px solid var(--glass-border);box-shadow:var(--glass-shadow);transition:all .3s cubic-bezier(.4,0,.2,1)}.glass-interactive[_ngcontent-%COMP%]:hover{transform:translateY(-2px);box-shadow:0 12px 40px #00000026}.glass-interactive[_ngcontent-%COMP%]:active{transform:translateY(0)}.glass-card[_ngcontent-%COMP%]{background:var(--glass-bg);backdrop-filter:var(--glass-backdrop-blur);-webkit-backdrop-filter:var(--glass-backdrop-blur);border:1px solid var(--glass-border);box-shadow:var(--glass-shadow);border-radius:20px;padding:1.5rem}.glass-button[_ngcontent-%COMP%]{background:var(--glass-bg);backdrop-filter:var(--glass-backdrop-blur);-webkit-backdrop-filter:var(--glass-backdrop-blur);border:1px solid var(--glass-border);box-shadow:var(--glass-shadow);transition:all .3s cubic-bezier(.4,0,.2,1)}.glass-button[_ngcontent-%COMP%]:hover{transform:translateY(-2px);box-shadow:0 12px 40px #00000026}.glass-button[_ngcontent-%COMP%]:active{transform:translateY(0)}.glass-button[_ngcontent-%COMP%]{border-radius:12px;padding:.75rem 1.5rem;font-weight:600;cursor:pointer}.glass-button[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed;transform:none}.glass-button[_ngcontent-%COMP%]:disabled:hover{transform:none}.smooth-theme-transition[_ngcontent-%COMP%]{transition:background .3s ease,color .3s ease,border-color .3s ease,box-shadow .3s ease}[_nghost-%COMP%]{display:block;width:100%;height:100%;overflow:hidden}.gtc[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;overflow:hidden}.gtc-toolbar[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:0 .75rem;height:56px;flex-shrink:0;border-bottom:1px solid var(--color-border, rgba(0, 0, 0, .1));box-sizing:border-box}.gtc-toolbar-left[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.375rem;flex-shrink:0}.gtc-logo-icon[_ngcontent-%COMP%]{font-size:1.25rem;width:1.25rem;height:1.25rem;color:var(--color-primary)}.gtc-title[_ngcontent-%COMP%]{margin:0;font-size:1rem;font-weight:600;color:var(--color-text);white-space:nowrap}.gtc-search[_ngcontent-%COMP%]{margin-left:auto;flex:0 1 240px;min-width:80px;--mat-form-field-container-height: 36px;--mat-form-field-container-vertical-padding: 6px;font-size:.875rem;--mdc-filled-text-field-container-color: transparent;--mdc-filled-text-field-hover-container-color: transparent;--mdc-filled-text-field-focus-container-color: transparent;--mdc-filled-text-field-active-indicator-color: transparent;--mdc-filled-text-field-hover-active-indicator-color: transparent;--mdc-filled-text-field-focus-active-indicator-color: transparent;--mdc-filled-text-field-active-indicator-height: 0}.gtc-toolbar-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.375rem;flex-shrink:0}.gtc-new-btn[_ngcontent-%COMP%]{background:var(--color-primary);color:var(--color-text-inverse);border-radius:12px;font-weight:600;height:36px;padding:0 1rem}.gtc-new-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:1.1rem;width:1.1rem;height:1.1rem}@media(max-width:600px){.gtc-toolbar[_ngcontent-%COMP%]{flex-wrap:wrap;height:auto;min-height:48px;padding:.5rem .75rem;gap:.375rem}.gtc-title[_ngcontent-%COMP%]{font-size:.875rem}.gtc-search[_ngcontent-%COMP%]{order:3;flex:1 1 100%;min-width:0;margin-left:0}.gtc-toolbar-actions[_ngcontent-%COMP%]{margin-left:auto}.btn-label[_ngcontent-%COMP%]{display:none}.gtc-toolbar-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:not(mat-icon-button):not([mat-icon-button]){--mdc-text-button-container-height: 36px;--mdc-filled-button-container-height: 36px;--mdc-outlined-button-container-height: 36px;min-width:36px;width:36px;height:36px;padding:0;border-radius:50%!important}.gtc-toolbar-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:not(mat-icon-button):not([mat-icon-button]) .mat-mdc-button-touch-target[_ngcontent-%COMP%]{width:36px;height:36px}.gtc-toolbar-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:not(mat-icon-button):not([mat-icon-button]) mat-icon[_ngcontent-%COMP%]{margin:0!important}}.gtc-filter-bar[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem;padding:.5rem .75rem;flex-shrink:0;border-bottom:1px solid var(--color-border, rgba(0, 0, 0, .08))}.gtc-project-filters[_ngcontent-%COMP%]{display:flex;gap:.375rem;flex-wrap:wrap}.project-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;padding:.2rem .65rem;border-radius:100px;font-size:.75rem;font-weight:500;color:var(--color-text-secondary);background:transparent;border:1px solid var(--color-border);cursor:pointer;transition:background .15s ease,color .15s ease,border-color .15s ease;white-space:nowrap}.project-chip[_ngcontent-%COMP%] .chip-count[_ngcontent-%COMP%]{background:var(--color-bg-hover);border-radius:100px;padding:0 .3rem;font-size:.68rem;font-weight:700;min-width:16px;text-align:center;line-height:16px}.project-chip.active[_ngcontent-%COMP%]{background:var(--color-primary);color:var(--color-text-inverse);border-color:var(--color-primary)}.project-chip.active[_ngcontent-%COMP%] .chip-count[_ngcontent-%COMP%]{background:#ffffff40;color:var(--color-text-inverse)}.project-chip[_ngcontent-%COMP%]:hover:not(.active){background:var(--color-bg-hover);color:var(--color-text)}.gtc-filters[_ngcontent-%COMP%]{display:flex;gap:.375rem;flex-wrap:wrap}.filter-chip[_ngcontent-%COMP%]{background:var(--glass-bg);backdrop-filter:var(--glass-backdrop-blur);-webkit-backdrop-filter:var(--glass-backdrop-blur);border:1px solid var(--glass-border);box-shadow:var(--glass-shadow);display:flex;align-items:center;gap:.375rem;padding:.3rem .75rem;border-radius:100px;font-size:.8rem;font-weight:500;color:var(--color-text-secondary);cursor:pointer;border:1px solid var(--color-border);transition:background .15s ease,color .15s ease,border-color .15s ease;white-space:nowrap}.filter-chip[_ngcontent-%COMP%] .filter-icon[_ngcontent-%COMP%]{font-size:.9rem;width:.9rem;height:.9rem}.filter-chip[_ngcontent-%COMP%] .filter-badge[_ngcontent-%COMP%]{background:var(--color-primary);color:var(--color-text-inverse);border-radius:100px;padding:0 .375rem;font-size:.7rem;font-weight:700;min-width:18px;text-align:center;line-height:18px}.filter-chip.active[_ngcontent-%COMP%]{background:var(--color-primary);color:var(--color-text-inverse);border-color:var(--color-primary)}.filter-chip.active[_ngcontent-%COMP%] .filter-icon[_ngcontent-%COMP%]{color:var(--color-text-inverse)}.filter-chip.active[_ngcontent-%COMP%] .filter-badge[_ngcontent-%COMP%]{background:#ffffff40;color:var(--color-text-inverse)}.filter-chip[_ngcontent-%COMP%]:hover:not(.active){background:var(--color-bg-hover);color:var(--color-text)}.starred-filter.active[_ngcontent-%COMP%]{background:#f5a62326;border-color:#f5a623;color:#f5a623}.starred-filter.active[_ngcontent-%COMP%] .filter-icon[_ngcontent-%COMP%]{color:#f5a623}.gtc-body[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex:1;overflow:hidden;min-height:0}.gtc-content[_ngcontent-%COMP%]{flex:1;overflow-y:auto;padding:1rem 1rem 2rem;min-width:0}.gtc-resizer[_ngcontent-%COMP%]{width:6px;flex-shrink:0;cursor:col-resize;background:transparent;border-left:1px solid var(--color-border);border-right:1px solid var(--color-border);transition:background .15s ease}.gtc-resizer[_ngcontent-%COMP%]:hover, .gtc-resizer[_ngcontent-%COMP%]:active{background:var(--color-primary);opacity:.4}.gtc-preview-pane[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;overflow:hidden;flex-shrink:0;min-width:280px;border-left:1px solid var(--color-border);background:var(--glass-bg)}.gtc-preview-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.625rem .75rem .625rem 1rem;border-bottom:1px solid var(--color-border);flex-shrink:0}.gtc-preview-title[_ngcontent-%COMP%]{font-size:.875rem;font-weight:600;color:var(--color-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1}.gtc-preview-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.125rem;flex-shrink:0}.preview-action-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:none;border-radius:6px;background:transparent;cursor:pointer;transition:background .15s ease}.preview-action-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px;line-height:18px;vertical-align:middle;color:var(--color-text-secondary)}.preview-action-btn[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.preview-action-btn[_ngcontent-%COMP%]:hover mat-icon[_ngcontent-%COMP%]{color:var(--color-text)}.gtc-preview-body[_ngcontent-%COMP%]{flex:1;overflow:hidden;display:flex;flex-direction:column;min-height:0}.gtc-preview-body[_ngcontent-%COMP%] app-thread[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;overflow:hidden;min-height:0} app-task-card.is-previewed .task-card{border-color:var(--color-primary);box-shadow:0 0 0 2px var(--color-primary)}.gtc-group[_ngcontent-%COMP%]{margin-bottom:1.25rem}.gtc-group[_ngcontent-%COMP%]:last-child{margin-bottom:0}.gtc-group-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:.75rem;gap:.75rem}.gtc-group-header[_ngcontent-%COMP%] .gtc-group-title[_ngcontent-%COMP%]{margin-bottom:0}.gtc-group-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.375rem;flex-shrink:0}.select-all-checkbox[_ngcontent-%COMP%]{--mdc-checkbox-state-layer-size: 32px}.select-mode-btn[_ngcontent-%COMP%]{height:26px;font-size:.72rem;font-weight:600;padding:0 .625rem;border-radius:8px;color:var(--color-text-secondary);border-color:var(--color-border);line-height:26px}.select-mode-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:.9rem;width:.9rem;height:.9rem;margin-right:.2rem}.select-mode-btn[_ngcontent-%COMP%]:hover{color:var(--color-text);border-color:var(--color-text-secondary);background:var(--color-bg-hover)}.batch-done-btn[_ngcontent-%COMP%]{height:26px;font-size:.72rem;font-weight:600;padding:0 .625rem;border-radius:8px;background:var(--color-success, #34c759);color:#fff;line-height:26px}.batch-done-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:.9rem;width:.9rem;height:.9rem;margin-right:.2rem}.select-mode-cancel-btn[_ngcontent-%COMP%]{width:28px;height:28px;display:inline-flex!important;align-items:center!important;justify-content:center!important;color:var(--color-text-secondary)}.select-mode-cancel-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:1rem;width:1rem;height:1rem;line-height:1}.select-mode-cancel-btn[_ngcontent-%COMP%]:hover{color:var(--color-text)}.gtc-group-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;margin:0 0 .75rem;font-size:.8rem;font-weight:600;color:var(--color-text-secondary);text-transform:uppercase;letter-spacing:.05em}.gtc-group-title[_ngcontent-%COMP%] .group-icon[_ngcontent-%COMP%]{font-size:.95rem;width:.95rem;height:.95rem}.gtc-group-title[_ngcontent-%COMP%] .group-count[_ngcontent-%COMP%]{background:var(--color-bg-hover);border-radius:100px;padding:0 .375rem;font-size:.7rem;font-weight:700;min-width:16px;text-align:center;line-height:16px}.gtc-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:1rem}@media(max-width:600px){.gtc-grid[_ngcontent-%COMP%]{grid-template-columns:1fr}}.gtc-loading[_ngcontent-%COMP%], .gtc-empty[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem;padding:3rem;color:var(--color-text-secondary);text-align:center}.gtc-loading[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .gtc-empty[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:.9rem}.empty-icon[_ngcontent-%COMP%]{font-size:2.5rem;width:2.5rem;height:2.5rem;opacity:.3}"]})};
|
|
4
4
|
export{wt as GlobalTaskControlComponent};
|