@whoz-oss/coday-client 0.159.8 → 0.160.1

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.
Files changed (62) hide show
  1. package/3rdpartylicenses.txt +26 -26
  2. package/browser/{chunk-TCYPGB6P.js → chunk-3WSHO4HH.js} +1 -1
  3. package/browser/{chunk-TWTJJETM.js → chunk-44ROPJW7.js} +1 -1
  4. package/browser/{chunk-J6KC3ETK.js → chunk-44U6NIYJ.js} +1 -1
  5. package/browser/{chunk-AEXWYSY4.js → chunk-4RMKYA7C.js} +1 -1
  6. package/browser/chunk-5DYITBLP.js +1 -0
  7. package/browser/chunk-5ETOAW5I.js +1 -0
  8. package/browser/{chunk-GZ5XFG52.js → chunk-73MM2OCC.js} +1 -1
  9. package/browser/{chunk-FXW6JMJT.js → chunk-73XLCIE3.js} +1 -1
  10. package/browser/chunk-7INOPTJ6.js +1 -0
  11. package/browser/{chunk-64KUJ72Y.js → chunk-AKNP533G.js} +1 -1
  12. package/browser/{chunk-EL5IQEU5.js → chunk-AUD6VMQP.js} +1 -1
  13. package/browser/chunk-B5UWPZYC.js +61 -0
  14. package/browser/{chunk-3PF557D6.js → chunk-BJL3QU5V.js} +1 -1
  15. package/browser/{chunk-HBPEHALV.js → chunk-C6PPTNHE.js} +1 -1
  16. package/browser/chunk-CFTOIYSG.js +1 -0
  17. package/browser/{chunk-QMQRJWM2.js → chunk-CQCFF5QA.js} +1 -1
  18. package/browser/{chunk-F32VEQPY.js → chunk-DWPYG4F6.js} +1 -1
  19. package/browser/{chunk-GKBRHSMN.js → chunk-EQGMNQH5.js} +1 -1
  20. package/browser/chunk-F4YDJMK7.js +1 -0
  21. package/browser/{chunk-4PT56FZA.js → chunk-FJTJITU2.js} +1 -1
  22. package/browser/{chunk-NGOS7UTY.js → chunk-GTNTE2V7.js} +1 -1
  23. package/browser/chunk-IJ2PFSZT.js +1 -0
  24. package/browser/chunk-IKNFRB6Z.js +1 -0
  25. package/browser/{chunk-NUN4WTCP.js → chunk-IW7LOGR6.js} +1 -1
  26. package/browser/{chunk-46WAGL6T.js → chunk-JK7XVLXN.js} +1 -1
  27. package/browser/{chunk-MKE7HI6X.js → chunk-LANL6XWU.js} +1 -1
  28. package/browser/{chunk-OAN35RIR.js → chunk-LEIES4AA.js} +1 -1
  29. package/browser/{chunk-JLVW3WZE.js → chunk-LHRGRELF.js} +1 -1
  30. package/browser/{chunk-6HXHF2SN.js → chunk-LLIN4HKG.js} +1 -1
  31. package/browser/{chunk-VU5WR5CP.js → chunk-MRYQF7JC.js} +1 -1
  32. package/browser/{chunk-H7MV7NCQ.js → chunk-NBZFBJ7T.js} +1 -1
  33. package/browser/chunk-NHYWTBYT.js +1 -0
  34. package/browser/{chunk-P7CSUKFY.js → chunk-OXXWNVGU.js} +1 -1
  35. package/browser/{chunk-MUQFZY3N.js → chunk-PGO5PZRK.js} +1 -1
  36. package/browser/chunk-PP5TBFXE.js +31 -0
  37. package/browser/chunk-Q7MOXRND.js +1 -0
  38. package/browser/{chunk-TGT4RBUY.js → chunk-QEUPJ2EM.js} +1 -1
  39. package/browser/chunk-RF7IRXXE.js +1 -0
  40. package/browser/{chunk-LHEQ6HXJ.js → chunk-S4QJJ7B3.js} +1 -1
  41. package/browser/{chunk-KRK3FNKB.js → chunk-VIFGZQZS.js} +1 -1
  42. package/browser/{chunk-SKABLB3F.js → chunk-WP6SVXZC.js} +1 -1
  43. package/browser/{chunk-ZV2GXJ7Q.js → chunk-WPGSXQ5M.js} +1 -1
  44. package/browser/{chunk-7YDOHTEK.js → chunk-XLNZCT7N.js} +1 -1
  45. package/browser/{chunk-IREZ3UJ3.js → chunk-Y2GNO2KX.js} +1 -1
  46. package/browser/chunk-Y2JOUXVN.js +1 -0
  47. package/browser/{chunk-I5HSEFR4.js → chunk-ZKUCVZCJ.js} +1 -1
  48. package/browser/index.html +1 -1
  49. package/browser/{main-3RWS5R5L.js → main-FLHOTSKQ.js} +1 -1
  50. package/package.json +1 -1
  51. package/browser/chunk-5JACHD45.js +0 -1
  52. package/browser/chunk-DFZI6Z7W.js +0 -1
  53. package/browser/chunk-EC2BCDCL.js +0 -1
  54. package/browser/chunk-FHERZTSZ.js +0 -1
  55. package/browser/chunk-FIVJTOO5.js +0 -1
  56. package/browser/chunk-JWRID2EL.js +0 -1
  57. package/browser/chunk-LMGSBI4E.js +0 -1
  58. package/browser/chunk-N5UH5PRX.js +0 -1
  59. package/browser/chunk-UVTRXG6W.js +0 -1
  60. package/browser/chunk-WG653S5D.js +0 -91
  61. package/browser/chunk-WMRLIQ4E.js +0 -1
  62. package/browser/chunk-XHE2FLNY.js +0 -1
@@ -1 +1 @@
1
- import{b as Y}from"./chunk-XV6SOT4A.js";import{e as K}from"./chunk-ZTTTDVEL.js";import{a as A,b as H,c as G,d as J}from"./chunk-UARV2YUR.js";import{o as U,p as g,u as X}from"./chunk-F32VEQPY.js";import{c as b}from"./chunk-WJFUKUVD.js";import{A as D,B as O,Bb as h,Db as l,Fb as m,Jb as N,Ka as c,Kb as k,Lb as L,Pb as V,Rb as F,S as R,Tb as W,Ub as $,Wa as d,Xb as B,Yb as Q,Zb as j,ab as q,ca as p,ga as u,ha as C,hc as z,i as I,lb as P,m as x,mb as E,oa as f,rb as _,sb as o,t as y,ta as M,tb as s,ub as S,va as T}from"./chunk-QPN22TF2.js";var v=class i{case;static toListItem(e){return{id:e.id??"",name:e.id??"\u2014",description:void 0}}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=d({type:i,selectors:[["agentos-case-item"]],inputs:{case:"case"},decls:0,vars:0,template:function(t,n){},encapsulation:2,changeDetection:0})};var ne=["caseItemTpl"];function ae(i,e){if(i&1){let t=h();o(0,"button",3),l("click",function(){let a=u(t).$implicit,r=m();return C(r.onItemSelected(a.id))}),o(1,"span",4),W(2),s()()}if(i&2){let t=e.$implicit,n=m();F("case-drawer-item--active",t.id===n.activeCaseId),c(2),$(t.name)}}var w=class i{cases=[];activeCaseId=null;caseSelected=new f;createRequested=new f;closeRequested=new f;caseItemTpl;caseItems=[];ngOnChanges(e){e.cases&&(this.caseItems=this.cases.map(v.toListItem))}onItemSelected(e){this.caseSelected.emit(e)}onCreateRequested(){this.createRequested.emit()}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=d({type:i,selectors:[["agentos-case-drawer"]],viewQuery:function(t,n){if(t&1&&N(ne,7),t&2){let a;k(a=L())&&(n.caseItemTpl=a.first)}},inputs:{cases:"cases",activeCaseId:"activeCaseId"},outputs:{caseSelected:"caseSelected",createRequested:"createRequested",closeRequested:"closeRequested"},features:[T],decls:4,vars:3,consts:[["caseItemTpl",""],["title","Cases","emptyMessage","No cases yet. Start one below.","searchPlaceholder","Filter cases\u2026","cardMinWidth","220px","contentMaxWidth","100%",3,"itemSelected","createRequested","items","itemTemplate","showCreate"],["toolbar-start","","icon","chevron_left","variant","default","title","Close drawer",3,"action"],["type","button",1,"case-drawer-item",3,"click"],[1,"case-drawer-item__name"]],template:function(t,n){if(t&1&&(o(0,"ds-entity-list",1),l("itemSelected",function(r){return n.onItemSelected(r)})("createRequested",function(){return n.onCreateRequested()}),o(1,"ds-icon-button",2),l("action",function(){return n.closeRequested.emit()}),s()(),q(2,ae,3,3,"ng-template",null,0,z)),t&2){let a=V(3);_("items",n.caseItems)("itemTemplate",a)("showCreate",!0)}},dependencies:[X,g],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}.case-drawer-item[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;width:100%;padding:.5rem .75rem;border-radius:8px;border:none;background:transparent;cursor:pointer;text-align:left;font-family:inherit;font-size:.875rem;color:var(--color-text, #1d1d1f);transition:background .12s ease;gap:.5rem}.case-drawer-item[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .05))}.case-drawer-item--active[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);color:var(--color-text-inverse, #fff)}.case-drawer-item--active[_ngcontent-%COMP%] .case-drawer-item__status[_ngcontent-%COMP%]{color:#ffffffb3}.case-drawer-item--active[_ngcontent-%COMP%]:hover{background:var(--color-primary-hover, #0051d5)}.case-drawer-item__name[_ngcontent-%COMP%]{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500;font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);font-size:.8rem}'],changeDetection:0})};function ie(i,e){if(i&1){let t=h();o(0,"div",7)(1,"ds-icon-button",8),l("action",function(){u(t);let a=m();return C(a.toggleDrawer())}),s()()}}var te=class i{router=p(J);route=p(H);caseController=p(K);namespaceId=this.route.snapshot.params.namespaceId;drawerOpen=M(!0);refresh$=new I(void 0);cases$=this.refresh$.pipe(R(()=>this.caseController.listByParentCase(this.namespaceId)));cases=b(this.cases$,{initialValue:[]});activeCaseId=b(D(x(this.router.url),this.router.events.pipe(O(e=>e instanceof A),y(e=>e.urlAfterRedirects))).pipe(y(e=>this.extractCaseId(e))),{initialValue:null});extractCaseId(e){return e.match(/\/cases\/([^/?#]+)/)?.[1]??null}toggleDrawer(){this.drawerOpen.update(e=>!e)}onCaseSelected(e){this.router.navigate([e],{relativeTo:this.route})}onCreateRequested(){this.router.navigate(["."],{relativeTo:this.route})}refreshCases(){this.refresh$.next()}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=d({type:i,selectors:[["agentos-case-shell"]],decls:9,vars:4,consts:[[1,"case-shell"],[1,"case-shell__header"],[1,"case-shell__body"],["drawerWidth","400px",3,"openChange","open"],["dsDrawerSide","",1,"case-shell__sidenav"],[3,"caseSelected","createRequested","closeRequested","cases","activeCaseId"],["dsDrawerContent","",1,"case-shell__content"],[1,"case-shell__toggle"],["icon","menu","variant","default","title","Open drawer",3,"action"]],template:function(t,n){t&1&&(o(0,"div",0),S(1,"agentos-header",1),o(2,"div",2)(3,"ds-drawer",3),j("openChange",function(r){return Q(n.drawerOpen,r)||(n.drawerOpen=r),r}),o(4,"div",4)(5,"agentos-case-drawer",5),l("caseSelected",function(r){return n.onCaseSelected(r)})("createRequested",function(){return n.onCreateRequested()})("closeRequested",function(){return n.toggleDrawer()}),s()(),o(6,"div",6),P(7,ie,2,0,"div",7),S(8,"router-outlet"),s()()()()),t&2&&(c(3),B("open",n.drawerOpen),c(2),_("cases",n.cases())("activeCaseId",n.activeCaseId()),c(2),E(n.drawerOpen()?-1:7))},dependencies:[G,U,w,Y,g],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100dvh}.case-shell[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%}.case-shell__header[_ngcontent-%COMP%]{flex-shrink:0}.case-shell__body[_ngcontent-%COMP%]{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}.case-shell__sidenav[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;overflow:hidden}.case-shell__content[_ngcontent-%COMP%]{position:relative;flex:1;display:flex;flex-direction:column;height:100%;overflow:hidden}.case-shell__toggle[_ngcontent-%COMP%]{position:absolute;top:.375rem;left:.5rem;z-index:10}"]})};export{v as a,w as b,te as c};
1
+ import{b as Y}from"./chunk-XV6SOT4A.js";import{e as K}from"./chunk-ZTTTDVEL.js";import{a as A,b as H,c as G,d as J}from"./chunk-UARV2YUR.js";import{o as U,p as g,u as X}from"./chunk-DWPYG4F6.js";import{c as b}from"./chunk-WJFUKUVD.js";import{A as D,B as O,Bb as h,Db as l,Fb as m,Jb as N,Ka as c,Kb as k,Lb as L,Pb as V,Rb as F,S as R,Tb as W,Ub as $,Wa as d,Xb as B,Yb as Q,Zb as j,ab as q,ca as p,ga as u,ha as C,hc as z,i as I,lb as P,m as x,mb as E,oa as f,rb as _,sb as o,t as y,ta as M,tb as s,ub as S,va as T}from"./chunk-QPN22TF2.js";var v=class i{case;static toListItem(e){return{id:e.id??"",name:e.id??"\u2014",description:void 0}}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=d({type:i,selectors:[["agentos-case-item"]],inputs:{case:"case"},decls:0,vars:0,template:function(t,n){},encapsulation:2,changeDetection:0})};var ne=["caseItemTpl"];function ae(i,e){if(i&1){let t=h();o(0,"button",3),l("click",function(){let a=u(t).$implicit,r=m();return C(r.onItemSelected(a.id))}),o(1,"span",4),W(2),s()()}if(i&2){let t=e.$implicit,n=m();F("case-drawer-item--active",t.id===n.activeCaseId),c(2),$(t.name)}}var w=class i{cases=[];activeCaseId=null;caseSelected=new f;createRequested=new f;closeRequested=new f;caseItemTpl;caseItems=[];ngOnChanges(e){e.cases&&(this.caseItems=this.cases.map(v.toListItem))}onItemSelected(e){this.caseSelected.emit(e)}onCreateRequested(){this.createRequested.emit()}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=d({type:i,selectors:[["agentos-case-drawer"]],viewQuery:function(t,n){if(t&1&&N(ne,7),t&2){let a;k(a=L())&&(n.caseItemTpl=a.first)}},inputs:{cases:"cases",activeCaseId:"activeCaseId"},outputs:{caseSelected:"caseSelected",createRequested:"createRequested",closeRequested:"closeRequested"},features:[T],decls:4,vars:3,consts:[["caseItemTpl",""],["title","Cases","emptyMessage","No cases yet. Start one below.","searchPlaceholder","Filter cases\u2026","cardMinWidth","220px","contentMaxWidth","100%",3,"itemSelected","createRequested","items","itemTemplate","showCreate"],["toolbar-start","","icon","chevron_left","variant","default","title","Close drawer",3,"action"],["type","button",1,"case-drawer-item",3,"click"],[1,"case-drawer-item__name"]],template:function(t,n){if(t&1&&(o(0,"ds-entity-list",1),l("itemSelected",function(r){return n.onItemSelected(r)})("createRequested",function(){return n.onCreateRequested()}),o(1,"ds-icon-button",2),l("action",function(){return n.closeRequested.emit()}),s()(),q(2,ae,3,3,"ng-template",null,0,z)),t&2){let a=V(3);_("items",n.caseItems)("itemTemplate",a)("showCreate",!0)}},dependencies:[X,g],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}.case-drawer-item[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;width:100%;padding:.5rem .75rem;border-radius:8px;border:none;background:transparent;cursor:pointer;text-align:left;font-family:inherit;font-size:.875rem;color:var(--color-text, #1d1d1f);transition:background .12s ease;gap:.5rem}.case-drawer-item[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .05))}.case-drawer-item--active[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);color:var(--color-text-inverse, #fff)}.case-drawer-item--active[_ngcontent-%COMP%] .case-drawer-item__status[_ngcontent-%COMP%]{color:#ffffffb3}.case-drawer-item--active[_ngcontent-%COMP%]:hover{background:var(--color-primary-hover, #0051d5)}.case-drawer-item__name[_ngcontent-%COMP%]{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500;font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);font-size:.8rem}'],changeDetection:0})};function ie(i,e){if(i&1){let t=h();o(0,"div",7)(1,"ds-icon-button",8),l("action",function(){u(t);let a=m();return C(a.toggleDrawer())}),s()()}}var te=class i{router=p(J);route=p(H);caseController=p(K);namespaceId=this.route.snapshot.params.namespaceId;drawerOpen=M(!0);refresh$=new I(void 0);cases$=this.refresh$.pipe(R(()=>this.caseController.listByParentCase(this.namespaceId)));cases=b(this.cases$,{initialValue:[]});activeCaseId=b(D(x(this.router.url),this.router.events.pipe(O(e=>e instanceof A),y(e=>e.urlAfterRedirects))).pipe(y(e=>this.extractCaseId(e))),{initialValue:null});extractCaseId(e){return e.match(/\/cases\/([^/?#]+)/)?.[1]??null}toggleDrawer(){this.drawerOpen.update(e=>!e)}onCaseSelected(e){this.router.navigate([e],{relativeTo:this.route})}onCreateRequested(){this.router.navigate(["."],{relativeTo:this.route})}refreshCases(){this.refresh$.next()}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=d({type:i,selectors:[["agentos-case-shell"]],decls:9,vars:4,consts:[[1,"case-shell"],[1,"case-shell__header"],[1,"case-shell__body"],["drawerWidth","400px",3,"openChange","open"],["dsDrawerSide","",1,"case-shell__sidenav"],[3,"caseSelected","createRequested","closeRequested","cases","activeCaseId"],["dsDrawerContent","",1,"case-shell__content"],[1,"case-shell__toggle"],["icon","menu","variant","default","title","Open drawer",3,"action"]],template:function(t,n){t&1&&(o(0,"div",0),S(1,"agentos-header",1),o(2,"div",2)(3,"ds-drawer",3),j("openChange",function(r){return Q(n.drawerOpen,r)||(n.drawerOpen=r),r}),o(4,"div",4)(5,"agentos-case-drawer",5),l("caseSelected",function(r){return n.onCaseSelected(r)})("createRequested",function(){return n.onCreateRequested()})("closeRequested",function(){return n.toggleDrawer()}),s()(),o(6,"div",6),P(7,ie,2,0,"div",7),S(8,"router-outlet"),s()()()()),t&2&&(c(3),B("open",n.drawerOpen),c(2),_("cases",n.cases())("activeCaseId",n.activeCaseId()),c(2),E(n.drawerOpen()?-1:7))},dependencies:[G,U,w,Y,g],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100dvh}.case-shell[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%}.case-shell__header[_ngcontent-%COMP%]{flex-shrink:0}.case-shell__body[_ngcontent-%COMP%]{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}.case-shell__sidenav[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;overflow:hidden}.case-shell__content[_ngcontent-%COMP%]{position:relative;flex:1;display:flex;flex-direction:column;height:100%;overflow:hidden}.case-shell__toggle[_ngcontent-%COMP%]{position:absolute;top:.375rem;left:.5rem;z-index:10}"]})};export{v as a,w as b,te as c};
@@ -0,0 +1 @@
1
+ import{a as E}from"./chunk-LLIN4HKG.js";import{c as S,d as _,f as u,g as C}from"./chunk-QVW2GZXC.js";import{a as q,b as U,c as Y,d as Q}from"./chunk-PP5TBFXE.js";import"./chunk-XDTTR6NK.js";import{g as I}from"./chunk-CQCFF5QA.js";import"./chunk-B5UWPZYC.js";import"./chunk-2NBVMKPO.js";import{a as L,w as b}from"./chunk-PK3KWLLW.js";import"./chunk-TXXZ4LMH.js";import"./chunk-4HKHCNH5.js";import{b as $,d as H}from"./chunk-UARV2YUR.js";import"./chunk-PMENB5UW.js";import"./chunk-VIPJVFGJ.js";import"./chunk-AUD6VMQP.js";import"./chunk-DWPYG4F6.js";import"./chunk-XLNZCT7N.js";import"./chunk-WJFUKUVD.js";import"./chunk-QCGVGCBB.js";import"./chunk-2GHS5VUE.js";import"./chunk-DYANOPHQ.js";import"./chunk-F4YDJMK7.js";import"./chunk-NMGDBGR3.js";import"./chunk-4YLSQZJK.js";import{B as x,Bb as M,Db as y,Fb as s,Jb as W,Ka as m,Kb as O,Lb as P,N as A,T as p,Tb as G,Ub as z,Wa as v,Z as F,ca as a,d as k,ga as c,h as f,ha as d,lb as V,mb as j,rb as w,sb as h,tb as g,ub as R,vb as D,wb as B}from"./chunk-QPN22TF2.js";var T=class o{welcomeMessages=["Welcome to Coday","Bienvenue sur Coday","Bienvenido a Coday","Willkommen bei Coday","Benvenuto su Coday","Bem-vindo ao Coday","Welkom bij Coday","\u0414\u043E\u0431\u0440\u043E \u043F\u043E\u0436\u0430\u043B\u043E\u0432\u0430\u0442\u044C \u0432 Coday","Coday \u3078\u3088\u3046\u3053\u305D","\u6B22\u8FCE\u6765\u5230 Coday","Coday \uC5D0 \uC624\uC2E0 \uAC83\uC744 \uD658\uC601\uD569\uB2C8\uB2E4","\u0645\u0631\u062D\u0628\u064B\u0627 \u0628\u0643 \u0641\u064A Coday"];currentWelcomeIndex=0;currentWelcomeMessage=this.welcomeMessages[0];welcomeRotationInterval;ngOnInit(){this.startWelcomeRotation()}ngOnDestroy(){this.stopWelcomeRotation()}startWelcomeRotation(){this.welcomeRotationInterval=window.setInterval(()=>{this.currentWelcomeIndex=(this.currentWelcomeIndex+1)%this.welcomeMessages.length,this.currentWelcomeMessage=this.welcomeMessages[this.currentWelcomeIndex]},3e3)}stopWelcomeRotation(){this.welcomeRotationInterval&&(clearInterval(this.welcomeRotationInterval),this.welcomeRotationInterval=void 0)}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=v({type:o,selectors:[["app-welcome-message"]],decls:2,vars:1,consts:[[1,"welcome-title"]],template:function(t,i){t&1&&(D(0,"h1",0),G(1),B()),t&2&&(m(),z(i.currentWelcomeMessage))},styles:[".welcome-title[_ngcontent-%COMP%]{font-size:clamp(1.5rem,4vw,4rem);font-weight:700;background:linear-gradient(90deg,var(--color-primary, #3b82f6) 0%,var(--color-accent, #8b5cf6) 50%,var(--color-primary, #3b82f6) 100%);background-size:200% auto;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;animation:_ngcontent-%COMP%_gradientShift 3s ease-in-out infinite;margin:0;padding:0;line-height:1.2;transition:opacity .5s ease-in-out;display:block;min-height:1.2em;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@keyframes _ngcontent-%COMP%_gradientShift{0%{background-position:0% center}50%{background-position:100% center}to{background-position:0% center}}"]})};var N=class o{destroy$=new f;isSetup=!1;codayService=a(I);preferencesService=a(b);setup(){if(this.isSetup){console.warn("[AGENT-NOTIFICATION] Service already set up");return}console.log("[AGENT-NOTIFICATION] Setting up agent notification service"),this.codayService.isThinking$.pipe(p(this.destroy$),A(),x(([e,t])=>e===!0&&t===!1)).subscribe(()=>{console.log("[AGENT-NOTIFICATION] Agent stopped thinking, notifying task finished"),this.notifyTaskFinishedIfEnabled()}),this.preferencesService.browserNotificationEnabled$.pipe(p(this.destroy$),A(),x(([e,t])=>e===!1&&t===!0)).subscribe(()=>{console.log("[AGENT-NOTIFICATION] Browser notifications enabled, checking permission"),this.handleBrowserNotificationEnabled()}),this.isSetup=!0}notifyTaskFinishedIfEnabled(){this.preferencesService.getAgentNotificationEnabled()&&(this.preferencesService.getNotificationSoundEnabled()&&this.playCompletionSound(),this.preferencesService.getBrowserNotificationEnabled()&&this.sendBrowserNotification())}playCompletionSound(){try{let e=new(window.AudioContext||window.webkitAudioContext),t=e.createOscillator(),i=e.createGain();t.connect(i),i.connect(e.destination),t.frequency.setValueAtTime(700,e.currentTime),i.gain.setValueAtTime(.1,e.currentTime),i.gain.exponentialRampToValueAtTime(.01,e.currentTime+.08),t.start(e.currentTime),t.stop(e.currentTime+.08);let n=e.createOscillator(),r=e.createGain();n.connect(r),r.connect(e.destination);let l=e.currentTime+.11;n.frequency.setValueAtTime(950,l),r.gain.setValueAtTime(.1,l),r.gain.exponentialRampToValueAtTime(.01,l+.09),n.start(l),n.stop(l+.09),console.log("[AGENT-NOTIFICATION] Completion sound played")}catch(e){console.error("[AGENT-NOTIFICATION] Failed to play completion sound:",e)}}handleBrowserNotificationEnabled(){return k(this,null,function*(){if(!("Notification"in window)){console.warn("[AGENT-NOTIFICATION] Browser does not support notifications"),this.preferencesService.setBrowserNotificationEnabled(!1);return}if(Notification.permission==="denied"){console.warn("[AGENT-NOTIFICATION] Permission denied, disabling browser notifications"),this.preferencesService.setBrowserNotificationEnabled(!1);return}if(Notification.permission==="granted"){console.log("[AGENT-NOTIFICATION] Permission already granted, showing confirmation"),this.createConfirmationNotification();return}try{(yield Notification.requestPermission())==="granted"?(console.log("[AGENT-NOTIFICATION] Permission granted, showing confirmation"),this.createConfirmationNotification()):(console.log("[AGENT-NOTIFICATION] Permission denied or dismissed"),this.preferencesService.setBrowserNotificationEnabled(!1))}catch(e){console.error("[AGENT-NOTIFICATION] Error requesting permission:",e),this.preferencesService.setBrowserNotificationEnabled(!1)}})}sendBrowserNotification(){if(!("Notification"in window)){console.warn("[AGENT-NOTIFICATION] Browser does not support notifications");return}if(document.hasFocus()){console.warn("[AGENT-NOTIFICATION] Document is focused, skipping browser notification");return}Notification.permission==="granted"?this.createTaskCompleteNotification():console.warn("[AGENT-NOTIFICATION] Permission not granted, cannot send notification")}createConfirmationNotification(){let e=new Notification("Coday - Notifications Enabled",{body:"You will be notified when the agent completes tasks",icon:"/favicon.ico",tag:"coday-notifications-enabled",requireInteraction:!1});setTimeout(()=>e.close(),4e3),e.onclick=()=>{window.focus(),e.close()},console.log("[AGENT-NOTIFICATION] Confirmation notification sent")}createTaskCompleteNotification(){let e=new Notification("Coday - Task Complete",{body:"The agent has finished and is waiting for your input",icon:"/favicon.ico",tag:"coday-task-complete",requireInteraction:!1});setTimeout(()=>e.close(),5e3),e.onclick=()=>{window.focus(),e.close()},console.log("[AGENT-NOTIFICATION] Task complete notification sent")}ngOnDestroy(){console.log("[AGENT-NOTIFICATION] Service destroyed"),this.destroy$.next(),this.destroy$.complete()}static \u0275fac=function(t){return new(t||o)};static \u0275prov=F({token:o,factory:o.\u0275fac,providedIn:"root"})};var Z=["inputSection"];function ee(o,e){if(o&1){let t=M();h(0,"app-thread",4),y("chatFocused",function(){c(t);let n=s();return d(n.onChatFocusedOnMobile())})("drawerStateChange",function(n){c(t);let r=s();return d(r.onDrawerStateChange(n))}),g()}if(o&2){let t=s();w("projectName",t.projectName)("threadId",t.threadId)}}function te(o,e){if(o&1){let t=M();h(0,"div",5),R(1,"app-welcome-message"),g(),h(2,"div",6,0)(4,"div",7)(5,"div",8)(6,"app-chat-textarea",9),y("messageSubmitted",function(n){c(t);let r=s();return d(r.onMessageSubmitted(n))})("voiceMessageReady",function(n){c(t);let r=s();return d(r.onVoiceMessageReady(n))})("voiceRecordingToggled",function(n){c(t);let r=s();return d(r.onVoiceToggled(n))})("heightChanged",function(n){c(t);let r=s();return d(r.onInputHeightChanged(n))})("textareaFocused",function(){c(t);let n=s();return d(n.onChatFocusedOnMobile())}),g()()()()}if(o&2){let t=s();m(6),w("isDisabled",t.isSessionInitializing)("isSessionInitializing",t.isSessionInitializing)("showWelcome",!0)("isThinking",!1)("isStarting",t.isStartingFirstMessage)}}var K=class o{destroy$=new f;inputSection;sidenav;projectName="";threadId=null;isSessionInitializing=!1;isStartingFirstMessage=!1;inputSectionHeight=80;codayService=a(I);titleService=a(U);preferencesService=a(b);route=a($);router=a(H);threadApiService=a(L);agentNotificationService=a(N);firstMessageState=a(Y);constructor(){console.log("[MAIN-APP] Using new thread-based architecture (no clientId needed)")}ngOnInit(){this.agentNotificationService.setup(),this.setupPrintHandlers(),this.route.params.pipe(p(this.destroy$)).subscribe(e=>{let t=e.projectName,i=e.threadId||null;console.log("[MAIN-APP] Route params updated:",{project:t,thread:i,previousProject:this.projectName,previousThread:this.threadId}),this.projectName=t,this.threadId=i,this.threadId?console.log("[MAIN-APP] Thread selected - ThreadComponent will display"):(console.log("[MAIN-APP] No thread selected - showing welcome view"),this.initializeWelcomeView())})}initializeWelcomeView(){this.codayService.setTabTitleService(this.titleService)}ngAfterViewInit(){setTimeout(()=>this.updateInputSectionHeight(),100)}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),window.removeEventListener("beforeprint",this.handleBeforePrint),window.removeEventListener("afterprint",this.handleAfterPrint)}onMessageSubmitted(e){console.log("[MAIN-APP] First message submitted from welcome view:",e),this.isSessionInitializing=!0,this.isStartingFirstMessage=!0,this.threadApiService.createThread().subscribe({next:t=>{console.log("[MAIN-APP] Thread created:",t.thread.id),this.firstMessageState.setPendingFirstMessage(e),this.router.navigate(["project",this.projectName,"thread",t.thread.id])},error:t=>{console.error("[MAIN-APP] Failed to create thread:",t),this.isSessionInitializing=!1,this.isStartingFirstMessage=!1,alert("Failed to create conversation: "+(t.message||"Unknown error"))}})}onVoiceToggled(e){console.log("[VOICE] Recording in welcome view:",e)}onVoiceMessageReady(e){console.log("[MAIN-APP] Voice message ready from welcome view"),this.isSessionInitializing=!0,this.isStartingFirstMessage=!0,this.threadApiService.createThread().subscribe({next:t=>{console.log("[MAIN-APP] Thread created for voice message:",t.thread.id),this.firstMessageState.setPendingVoiceMessage(e),this.router.navigate(["project",this.projectName,"thread",t.thread.id])},error:t=>{console.error("[MAIN-APP] Failed to create thread for voice message:",t),this.isSessionInitializing=!1,this.isStartingFirstMessage=!1,alert("Failed to create conversation: "+(t.message||"Unknown error"))}})}isDrawerOpen=!1;onDrawerStateChange(e){this.isDrawerOpen=e}onChatFocusedOnMobile(){window.innerWidth<1024&&this.sidenav?.close()}onInputHeightChanged(e){console.log("[MAIN-APP] Input height changed:",e),this.inputSectionHeight=e}updateInputSectionHeight(){if(this.inputSection?.nativeElement){let e=this.inputSection.nativeElement.offsetHeight;e!==this.inputSectionHeight&&(console.log("[MAIN-APP] Input section height updated:",e),this.inputSectionHeight=e)}}setupPrintHandlers(){window.addEventListener("beforeprint",this.handleBeforePrint),window.addEventListener("afterprint",this.handleAfterPrint)}handleBeforePrint=()=>{console.log("[PRINT] Before print event triggered");let e=this.preferencesService.getPrintTechnicalMessages();console.log("[PRINT] Print technical messages:",e),e?document.body.classList.add("print-include-technical"):document.body.classList.remove("print-include-technical")};handleAfterPrint=()=>{console.log("[PRINT] After print event triggered"),document.body.classList.remove("print-include-technical")};static \u0275fac=function(t){return new(t||o)};static \u0275cmp=v({type:o,selectors:[["app-main"]],viewQuery:function(t,i){if(t&1&&W(Z,5)(E,5),t&2){let n;O(n=P())&&(i.inputSection=n.first),O(n=P())&&(i.sidenav=n.first)}},decls:4,vars:2,consts:[["inputSection",""],[3,"drawerOpen"],[1,"app",3,"mousedown","touchstart"],[3,"projectName","threadId"],[3,"chatFocused","drawerStateChange","projectName","threadId"],[1,"welcome-section"],[1,"input-section"],[1,"input-center"],[1,"input-glass"],[3,"messageSubmitted","voiceMessageReady","voiceRecordingToggled","heightChanged","textareaFocused","isDisabled","isSessionInitializing","showWelcome","isThinking","isStarting"]],template:function(t,i){t&1&&(h(0,"app-sidenav",1)(1,"div",2),y("mousedown",function(){return i.onChatFocusedOnMobile()})("touchstart",function(){return i.onChatFocusedOnMobile()}),V(2,ee,1,2,"app-thread",3)(3,te,7,5),g()()),t&2&&(w("drawerOpen",i.isDrawerOpen),m(2),j(i.threadId?2:3))},dependencies:[q,Q,T,E],styles:["[_nghost-%COMP%]{display:flex;height:100vh;width:100%;overflow:hidden;justify-content:center}.app[_ngcontent-%COMP%]{width:100%;max-width:100%;min-width:0;height:100%;display:flex;flex-direction:column;background:var(--color-bg);color:var(--color-text);transition:all .3s ease;position:relative;justify-content:center;overflow:hidden}.chat-wrapper[_ngcontent-%COMP%]{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;background:transparent;width:100%;padding:2.5rem 0 1.5rem;display:flex;justify-content:center}.chat-wrapper[_ngcontent-%COMP%] .chat-center[_ngcontent-%COMP%]{max-width:760px;width:100%;margin:0;padding:0 2rem}@media(max-width:768px){.chat-wrapper[_ngcontent-%COMP%] .chat-center[_ngcontent-%COMP%]{padding:0 1rem}}.welcome-section[_ngcontent-%COMP%]{flex-shrink:0;text-align:center;padding:2rem 1rem;animation:_ngcontent-%COMP%_fadeInUp .8s ease-out;display:flex;justify-content:center;align-items:center;width:100%;min-width:0;overflow:hidden}@keyframes _ngcontent-%COMP%_fadeInUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.input-section[_ngcontent-%COMP%]{flex-shrink:0;position:relative;border-top:none;background:transparent;box-shadow:none;padding:2.5rem 0 2rem;overflow-y:visible;max-height:none;width:100%;z-index:10;pointer-events:none;display:flex;justify-content:center}.input-center[_ngcontent-%COMP%]{max-width:760px;width:100%;margin:0;padding:0 2rem;display:flex;justify-content:center;align-items:end;position:relative;pointer-events:auto}@media(max-width:768px){.input-center[_ngcontent-%COMP%]{padding:0 1rem}}.input-glass[_ngcontent-%COMP%]{background:none;box-shadow:none;width:100%;min-height:64px;display:flex;align-items:stretch;gap:0;pointer-events:auto;position:relative;overflow:visible}.input-glass[_ngcontent-%COMP%] app-chat-textarea[_ngcontent-%COMP%]{width:100%;min-width:0;flex:1 1 auto;align-self:stretch;display:flex}body.dark[_nghost-%COMP%], body.dark [_nghost-%COMP%], [_ngcontent-%COMP%]:root[data-theme=dark] .input-glass[_ngcontent-%COMP%]{background:#24283073;border-color:#b4c8ff17;box-shadow:0 8px 32px #0000002b,0 1.5px 8px #00000012}.choice-overlay[_ngcontent-%COMP%]{z-index:10;width:100%;display:flex;justify-content:center;align-items:center}.upload-status[_ngcontent-%COMP%]{position:fixed;bottom:100px;left:50%;transform:translate(-50%);z-index:1000;display:flex;align-items:center;padding:12px 20px;background:var(--glass-bg);backdrop-filter:var(--glass-backdrop-blur);-webkit-backdrop-filter:var(--glass-backdrop-blur);border:1px solid var(--glass-border);border-radius:16px;font-size:.9em;color:var(--color-text);box-shadow:var(--glass-shadow);max-width:300px;text-align:center}.upload-status.error[_ngcontent-%COMP%]{background:#ff3b3026;color:var(--color-error);border-color:#ff3b304d}@media(max-width:768px){.welcome-section[_ngcontent-%COMP%]{padding:1.5rem 1rem}.input-section[_ngcontent-%COMP%]{padding:1.5rem .75rem 1rem}.input-center[_ngcontent-%COMP%]{padding:0 .5rem}}@media print{[_nghost-%COMP%]{display:block!important;height:auto!important;overflow:visible!important}.app[_ngcontent-%COMP%]{height:auto!important;overflow:visible!important;display:block!important}.input-section[_ngcontent-%COMP%], .welcome-section[_ngcontent-%COMP%]{display:none!important}}"],data:{animation:[S("slideIn",[C(":enter",[u({transform:"translateY(100%)",opacity:0}),_("300ms ease-out",u({transform:"translateY(0)",opacity:1}))]),C(":leave",[_("200ms ease-in",u({transform:"translateY(100%)",opacity:0}))])])]}})};export{K as MainAppComponent};
@@ -1 +1 @@
1
- import{a as E}from"./chunk-ZTTTDVEL.js";import{b as w,d as M}from"./chunk-UARV2YUR.js";import{p as k}from"./chunk-F32VEQPY.js";import{a as I}from"./chunk-WJFUKUVD.js";import{Db as d,Jb as y,Ka as m,Kb as v,Lb as C,Ma as _,S as f,Sc as x,Tb as l,Wa as b,ca as n,ma as g,rb as p,sb as a,t as h,ta as c,tb as i}from"./chunk-QPN22TF2.js";var H=["composerInput"],P=class u{http=n(x);router=n(M);route=n(w);config=n(E);destroyRef=n(g);composerInput;namespaceId=this.route.snapshot.params.namespaceId;inputValue=c("");isCreating=c(!1);constructor(){_(()=>{this.composerInput?.nativeElement.focus()})}get canSend(){return!!this.inputValue().trim()&&!this.isCreating()}onInput(t){this.inputValue.set(t.target.value)}onKeydown(t){t.key==="Enter"&&!t.shiftKey&&(t.preventDefault(),this.submit())}submit(){if(!this.canSend)return;let t=this.inputValue().trim();this.inputValue.set(""),this.isCreating.set(!0),this.http.post(`${this.config.basePath}/api/cases`,{namespaceId:this.namespaceId,metadata:{}}).pipe(f(e=>this.http.post(`${this.config.basePath}/api/cases/${e.id}/messages`,{content:t,userId:"default-user"}).pipe(h(()=>e))),I(this.destroyRef)).subscribe({next:e=>{this.router.navigate([e.id??""],{relativeTo:this.route})},error:e=>{console.error("[CaseHome] Failed to create case or send first message",e),this.isCreating.set(!1),this.inputValue.set(t)}})}static \u0275fac=function(e){return new(e||u)};static \u0275cmp=b({type:u,selectors:[["agentos-case-home"]],viewQuery:function(e,o){if(e&1&&y(H,5),e&2){let r;v(r=C())&&(o.composerInput=r.first)}},decls:11,vars:3,consts:[["composerInput",""],[1,"case-home"],[1,"case-home__hero"],[1,"case-home__headline"],[1,"case-home__composer"],["placeholder","Describe your task or ask a question\u2026","rows","4",1,"case-home__input",3,"input","keydown","value","disabled"],[1,"case-home__composer-footer"],[1,"case-home__hint"],["icon","send","variant","primary","title","Start case (Enter)",3,"action","disabled"]],template:function(e,o){e&1&&(a(0,"div",1)(1,"div",2)(2,"h1",3),l(3,"What can I help you with?"),i(),a(4,"div",4)(5,"textarea",5,0),d("input",function(s){return o.onInput(s)})("keydown",function(s){return o.onKeydown(s)}),i(),a(7,"div",6)(8,"span",7),l(9,"Enter to send\xA0\xA0\xB7\xA0\xA0Shift+Enter for new line"),i(),a(10,"ds-icon-button",8),d("action",function(){return o.submit()}),i()()()()()),e&2&&(m(5),p("value",o.inputValue())("disabled",o.isCreating()),m(5),p("disabled",!o.canSend))},dependencies:[k],styles:[".case-home[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;align-items:center;justify-content:center}.case-home__hero[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:2rem;padding:2rem 1.5rem 4rem;max-width:680px;width:100%}.case-home__headline[_ngcontent-%COMP%]{margin:0;font-size:clamp(1.5rem,4vw,2.25rem);font-weight:700;letter-spacing:-.03em;color:var(--color-text, #1d1d1f);text-align:center}.case-home__composer[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column;background:var(--glass-bg, rgba(255, 255, 255, .72));border:1px solid var(--glass-border, rgba(255, 255, 255, .18));backdrop-filter:var(--glass-backdrop-blur, blur(20px));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));border-radius:16px;box-shadow:0 4px 24px #00000012;overflow:hidden;transition:box-shadow .2s ease,border-color .2s ease}.case-home__composer[_ngcontent-%COMP%]:focus-within{box-shadow:0 4px 32px #007aff26;border-color:var(--color-primary, #007aff)}.case-home__input[_ngcontent-%COMP%]{width:100%;resize:none;padding:1rem 1.25rem .5rem;border:none;background:transparent;color:var(--color-text, #1d1d1f);font-size:1rem;font-family:inherit;line-height:1.6;outline:none;box-sizing:border-box}.case-home__input[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.case-home__input[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.case-home__composer-footer[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:.5rem .5rem .5rem 1.25rem}.case-home__hint[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary, #6e6e73);opacity:.7}"]})};export{P as a};
1
+ import{a as E}from"./chunk-ZTTTDVEL.js";import{b as w,d as M}from"./chunk-UARV2YUR.js";import{p as k}from"./chunk-DWPYG4F6.js";import{a as I}from"./chunk-WJFUKUVD.js";import{Db as d,Jb as y,Ka as m,Kb as v,Lb as C,Ma as _,S as f,Sc as x,Tb as l,Wa as b,ca as n,ma as g,rb as p,sb as a,t as h,ta as c,tb as i}from"./chunk-QPN22TF2.js";var H=["composerInput"],P=class u{http=n(x);router=n(M);route=n(w);config=n(E);destroyRef=n(g);composerInput;namespaceId=this.route.snapshot.params.namespaceId;inputValue=c("");isCreating=c(!1);constructor(){_(()=>{this.composerInput?.nativeElement.focus()})}get canSend(){return!!this.inputValue().trim()&&!this.isCreating()}onInput(t){this.inputValue.set(t.target.value)}onKeydown(t){t.key==="Enter"&&!t.shiftKey&&(t.preventDefault(),this.submit())}submit(){if(!this.canSend)return;let t=this.inputValue().trim();this.inputValue.set(""),this.isCreating.set(!0),this.http.post(`${this.config.basePath}/api/cases`,{namespaceId:this.namespaceId,metadata:{}}).pipe(f(e=>this.http.post(`${this.config.basePath}/api/cases/${e.id}/messages`,{content:t,userId:"default-user"}).pipe(h(()=>e))),I(this.destroyRef)).subscribe({next:e=>{this.router.navigate([e.id??""],{relativeTo:this.route})},error:e=>{console.error("[CaseHome] Failed to create case or send first message",e),this.isCreating.set(!1),this.inputValue.set(t)}})}static \u0275fac=function(e){return new(e||u)};static \u0275cmp=b({type:u,selectors:[["agentos-case-home"]],viewQuery:function(e,o){if(e&1&&y(H,5),e&2){let r;v(r=C())&&(o.composerInput=r.first)}},decls:11,vars:3,consts:[["composerInput",""],[1,"case-home"],[1,"case-home__hero"],[1,"case-home__headline"],[1,"case-home__composer"],["placeholder","Describe your task or ask a question\u2026","rows","4",1,"case-home__input",3,"input","keydown","value","disabled"],[1,"case-home__composer-footer"],[1,"case-home__hint"],["icon","send","variant","primary","title","Start case (Enter)",3,"action","disabled"]],template:function(e,o){e&1&&(a(0,"div",1)(1,"div",2)(2,"h1",3),l(3,"What can I help you with?"),i(),a(4,"div",4)(5,"textarea",5,0),d("input",function(s){return o.onInput(s)})("keydown",function(s){return o.onKeydown(s)}),i(),a(7,"div",6)(8,"span",7),l(9,"Enter to send\xA0\xA0\xB7\xA0\xA0Shift+Enter for new line"),i(),a(10,"ds-icon-button",8),d("action",function(){return o.submit()}),i()()()()()),e&2&&(m(5),p("value",o.inputValue())("disabled",o.isCreating()),m(5),p("disabled",!o.canSend))},dependencies:[k],styles:[".case-home[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;align-items:center;justify-content:center}.case-home__hero[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:2rem;padding:2rem 1.5rem 4rem;max-width:680px;width:100%}.case-home__headline[_ngcontent-%COMP%]{margin:0;font-size:clamp(1.5rem,4vw,2.25rem);font-weight:700;letter-spacing:-.03em;color:var(--color-text, #1d1d1f);text-align:center}.case-home__composer[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column;background:var(--glass-bg, rgba(255, 255, 255, .72));border:1px solid var(--glass-border, rgba(255, 255, 255, .18));backdrop-filter:var(--glass-backdrop-blur, blur(20px));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));border-radius:16px;box-shadow:0 4px 24px #00000012;overflow:hidden;transition:box-shadow .2s ease,border-color .2s ease}.case-home__composer[_ngcontent-%COMP%]:focus-within{box-shadow:0 4px 32px #007aff26;border-color:var(--color-primary, #007aff)}.case-home__input[_ngcontent-%COMP%]{width:100%;resize:none;padding:1rem 1.25rem .5rem;border:none;background:transparent;color:var(--color-text, #1d1d1f);font-size:1rem;font-family:inherit;line-height:1.6;outline:none;box-sizing:border-box}.case-home__input[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.case-home__input[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.case-home__composer-footer[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:.5rem .5rem .5rem 1.25rem}.case-home__hint[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary, #6e6e73);opacity:.7}"]})};export{P as a};
@@ -1 +1 @@
1
- import{d as k}from"./chunk-UARV2YUR.js";import{a as z,b as F}from"./chunk-DYANOPHQ.js";import{C as R,c as A,g as B,m as Q}from"./chunk-N5UH5PRX.js";import{b as D}from"./chunk-NMGDBGR3.js";import{Q as O,S as V}from"./chunk-4YLSQZJK.js";import{Bb as y,Db as c,Fb as _,Jb as j,Ka as a,Kb as P,Kc as S,Lb as M,Tb as l,Ub as f,Vb as E,Wa as C,Xb as T,Yb as I,Zb as N,ca as b,ga as v,ha as w,lb as u,mb as g,oa as x,rb as s,sb as i,tb as n}from"./chunk-QPN22TF2.js";var H=["inputElement"];function G(o,r){if(o&1&&(i(0,"span",3),l(1),n()),o&2){let t=_();a(),f(t.label)}}function J(o,r){if(o&1&&(i(0,"small",5),l(1),n()),o&2){let t=_();a(),f(t.hint)}}var h=class o{label="";placeholder="";hint="";isDisabled=!1;value="";autoFocus=!0;valueChange=new x;enterPressed=new x;inputElement;inputValue="";ngAfterViewInit(){this.inputValue=this.value,this.autoFocus&&setTimeout(()=>this.inputElement?.nativeElement.focus(),100)}onValueChange(r){this.valueChange.emit(r)}onEnter(){this.inputValue.trim()&&this.enterPressed.emit(this.inputValue.trim())}focus(){this.inputElement?.nativeElement.focus()}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=C({type:o,selectors:[["app-text-input"]],viewQuery:function(t,e){if(t&1&&j(H,5),t&2){let p;P(p=M())&&(e.inputElement=p.first)}},inputs:{label:"label",placeholder:"placeholder",hint:"hint",isDisabled:"isDisabled",value:"value",autoFocus:"autoFocus"},outputs:{valueChange:"valueChange",enterPressed:"enterPressed"},decls:6,vars:5,consts:[["inputElement",""],[1,"text-input-container"],[1,"text-input-wrapper"],[1,"text-input-label"],["type","text",1,"text-input-field",3,"ngModelChange","keydown.enter","ngModel","placeholder","disabled"],[1,"text-input-hint"]],template:function(t,e){if(t&1){let p=y();i(0,"div",1)(1,"label",2),u(2,G,2,1,"span",3),i(3,"input",4,0),N("ngModelChange",function(m){return v(p),I(e.inputValue,m)||(e.inputValue=m),w(m)}),c("ngModelChange",function(m){return e.onValueChange(m)})("keydown.enter",function(){return e.onEnter()}),n()(),u(5,J,2,1,"small",5),n()}t&2&&(a(2),g(e.label?2:-1),a(),T("ngModel",e.inputValue),s("placeholder",e.placeholder)("disabled",e.isDisabled),a(2),g(e.hint?5:-1))},dependencies:[R,A,B,Q,S],styles:[".text-input-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%}.text-input-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;cursor:text}.text-input-label[_ngcontent-%COMP%]{font-size:.95rem;font-weight:500;color:var(--color-text);margin:0}.text-input-field[_ngcontent-%COMP%]{width:100%;padding:.75rem 1rem;font-size:1rem;color:var(--color-text);background:var(--color-bg);border:1px solid var(--color-border);border-radius:8px;outline:none;transition:all .2s ease}.text-input-field[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary);opacity:.7}.text-input-field[_ngcontent-%COMP%]:focus{border-color:var(--color-primary);box-shadow:0 0 0 3px rgba(var(--color-primary-rgb),.1)}.text-input-field[_ngcontent-%COMP%]:disabled{opacity:.6;cursor:not-allowed;background:var(--color-surface)}.text-input-hint[_ngcontent-%COMP%]{font-size:.85rem;color:var(--color-text-secondary);margin:0;font-style:italic}@media(max-width:768px){.text-input-field[_ngcontent-%COMP%]{padding:.65rem .85rem;font-size:.95rem}.text-input-label[_ngcontent-%COMP%]{font-size:.9rem}.text-input-hint[_ngcontent-%COMP%]{font-size:.8rem}}"]})};function K(o,r){if(o&1&&(i(0,"div",8),l(1),n()),o&2){let t=_();a(),f(t.errorMessage)}}var W=class o{router=b(k);projectStateService=b(D);projectName="";projectPath="";isCreating=!1;errorMessage=null;isValid(){return this.projectName.trim()!==""&&this.projectPath.trim()!==""}onCreate(){if(!this.isValid()){this.errorMessage="Both name and path are required";return}this.isCreating=!0,this.errorMessage=null,this.projectStateService.createProject(this.projectName.trim(),this.projectPath.trim()).subscribe({next:()=>{let r=this.projectName.trim();this.isCreating=!1,this.projectStateService.selectProject(r),this.router.navigate(["project",r])},error:r=>{this.errorMessage=r.error?.error??"Failed to create project",this.isCreating=!1}})}onCancel(){this.router.navigate(["/"])}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=C({type:o,selectors:[["app-project-new"]],decls:19,vars:9,consts:[[1,"project-new-page"],[1,"project-new-card"],["mat-button","",1,"project-new__back",3,"click"],[1,"project-new__title"],[1,"project-new__subtitle"],[1,"project-new__form"],["label","Project name","placeholder","my-project",3,"valueChange","value","isDisabled","autoFocus"],["label","Project path","placeholder","/path/to/project","hint","Absolute path to the project directory",3,"valueChange","enterPressed","value","isDisabled"],[1,"project-new__error"],[1,"project-new__actions"],["mat-button","",3,"click","disabled"],["mat-flat-button","","color","primary",3,"click","disabled"]],template:function(t,e){t&1&&(i(0,"div",0)(1,"div",1)(2,"button",2),c("click",function(){return e.onCancel()}),i(3,"mat-icon"),l(4,"arrow_back"),n(),l(5," Back to projects "),n(),i(6,"h1",3),l(7,"New project"),n(),i(8,"p",4),l(9,"Point Coday to an existing directory on your machine."),n(),i(10,"div",5)(11,"app-text-input",6),c("valueChange",function(d){return e.projectName=d}),n(),i(12,"app-text-input",7),c("valueChange",function(d){return e.projectPath=d})("enterPressed",function(){return e.onCreate()}),n(),u(13,K,2,1,"div",8),n(),i(14,"div",9)(15,"button",10),c("click",function(){return e.onCancel()}),l(16,"Cancel"),n(),i(17,"button",11),c("click",function(){return e.onCreate()}),l(18),n()()()()),t&2&&(a(11),s("value",e.projectName)("isDisabled",e.isCreating)("autoFocus",!0),a(),s("value",e.projectPath)("isDisabled",e.isCreating),a(),g(e.errorMessage?13:-1),a(2),s("disabled",e.isCreating),a(2),s("disabled",!e.isValid()||e.isCreating),a(),E(" ",e.isCreating?"Creating\u2026":"Create project"," "))},dependencies:[V,O,F,z,h],styles:[".project-new-page[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:center;min-height:100vh;width:100%;background:var(--color-bg);padding:2rem 1.5rem;box-sizing:border-box}.project-new-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;width:100%;max-width:560px;padding:2rem;background:var(--color-bg-secondary, rgba(255, 255, 255, .7));border:1px solid var(--color-border, rgba(0, 0, 0, .1));border-radius:16px;box-shadow:var(--glass-shadow, 0 8px 32px rgba(31, 38, 135, .15));margin-top:2rem}.project-new__back[_ngcontent-%COMP%]{align-self:flex-start;margin-left:-.5rem;color:var(--color-text-secondary, #6e6e73)}.project-new__title[_ngcontent-%COMP%]{margin:0;font-size:1.625rem;font-weight:700;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.project-new__subtitle[_ngcontent-%COMP%]{margin:-.75rem 0 0;font-size:.9375rem;color:var(--color-text-secondary, #6e6e73)}.project-new__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.project-new__error[_ngcontent-%COMP%]{padding:.75rem 1rem;background:#dc262614;border:1px solid rgba(220,38,38,.25);border-radius:8px;color:var(--color-error, #ff3b30);font-size:.875rem}.project-new__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;justify-content:flex-end;padding-top:.25rem}"]})};export{W as ProjectNewComponent};
1
+ import{d as k}from"./chunk-UARV2YUR.js";import{a as z,b as F}from"./chunk-DYANOPHQ.js";import{E as R,c as A,g as B,m as Q}from"./chunk-F4YDJMK7.js";import{b as D}from"./chunk-NMGDBGR3.js";import{Q as O,S as V}from"./chunk-4YLSQZJK.js";import{Bb as y,Db as c,Fb as _,Jb as j,Ka as a,Kb as P,Kc as S,Lb as M,Tb as l,Ub as f,Vb as E,Wa as C,Xb as T,Yb as I,Zb as N,ca as b,ga as v,ha as w,lb as u,mb as g,oa as x,rb as s,sb as i,tb as n}from"./chunk-QPN22TF2.js";var H=["inputElement"];function G(o,r){if(o&1&&(i(0,"span",3),l(1),n()),o&2){let t=_();a(),f(t.label)}}function J(o,r){if(o&1&&(i(0,"small",5),l(1),n()),o&2){let t=_();a(),f(t.hint)}}var h=class o{label="";placeholder="";hint="";isDisabled=!1;value="";autoFocus=!0;valueChange=new x;enterPressed=new x;inputElement;inputValue="";ngAfterViewInit(){this.inputValue=this.value,this.autoFocus&&setTimeout(()=>this.inputElement?.nativeElement.focus(),100)}onValueChange(r){this.valueChange.emit(r)}onEnter(){this.inputValue.trim()&&this.enterPressed.emit(this.inputValue.trim())}focus(){this.inputElement?.nativeElement.focus()}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=C({type:o,selectors:[["app-text-input"]],viewQuery:function(t,e){if(t&1&&j(H,5),t&2){let p;P(p=M())&&(e.inputElement=p.first)}},inputs:{label:"label",placeholder:"placeholder",hint:"hint",isDisabled:"isDisabled",value:"value",autoFocus:"autoFocus"},outputs:{valueChange:"valueChange",enterPressed:"enterPressed"},decls:6,vars:5,consts:[["inputElement",""],[1,"text-input-container"],[1,"text-input-wrapper"],[1,"text-input-label"],["type","text",1,"text-input-field",3,"ngModelChange","keydown.enter","ngModel","placeholder","disabled"],[1,"text-input-hint"]],template:function(t,e){if(t&1){let p=y();i(0,"div",1)(1,"label",2),u(2,G,2,1,"span",3),i(3,"input",4,0),N("ngModelChange",function(m){return v(p),I(e.inputValue,m)||(e.inputValue=m),w(m)}),c("ngModelChange",function(m){return e.onValueChange(m)})("keydown.enter",function(){return e.onEnter()}),n()(),u(5,J,2,1,"small",5),n()}t&2&&(a(2),g(e.label?2:-1),a(),T("ngModel",e.inputValue),s("placeholder",e.placeholder)("disabled",e.isDisabled),a(2),g(e.hint?5:-1))},dependencies:[R,A,B,Q,S],styles:[".text-input-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%}.text-input-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;cursor:text}.text-input-label[_ngcontent-%COMP%]{font-size:.95rem;font-weight:500;color:var(--color-text);margin:0}.text-input-field[_ngcontent-%COMP%]{width:100%;padding:.75rem 1rem;font-size:1rem;color:var(--color-text);background:var(--color-bg);border:1px solid var(--color-border);border-radius:8px;outline:none;transition:all .2s ease}.text-input-field[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary);opacity:.7}.text-input-field[_ngcontent-%COMP%]:focus{border-color:var(--color-primary);box-shadow:0 0 0 3px rgba(var(--color-primary-rgb),.1)}.text-input-field[_ngcontent-%COMP%]:disabled{opacity:.6;cursor:not-allowed;background:var(--color-surface)}.text-input-hint[_ngcontent-%COMP%]{font-size:.85rem;color:var(--color-text-secondary);margin:0;font-style:italic}@media(max-width:768px){.text-input-field[_ngcontent-%COMP%]{padding:.65rem .85rem;font-size:.95rem}.text-input-label[_ngcontent-%COMP%]{font-size:.9rem}.text-input-hint[_ngcontent-%COMP%]{font-size:.8rem}}"]})};function K(o,r){if(o&1&&(i(0,"div",8),l(1),n()),o&2){let t=_();a(),f(t.errorMessage)}}var W=class o{router=b(k);projectStateService=b(D);projectName="";projectPath="";isCreating=!1;errorMessage=null;isValid(){return this.projectName.trim()!==""&&this.projectPath.trim()!==""}onCreate(){if(!this.isValid()){this.errorMessage="Both name and path are required";return}this.isCreating=!0,this.errorMessage=null,this.projectStateService.createProject(this.projectName.trim(),this.projectPath.trim()).subscribe({next:()=>{let r=this.projectName.trim();this.isCreating=!1,this.projectStateService.selectProject(r),this.router.navigate(["project",r])},error:r=>{this.errorMessage=r.error?.error??"Failed to create project",this.isCreating=!1}})}onCancel(){this.router.navigate(["/"])}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=C({type:o,selectors:[["app-project-new"]],decls:19,vars:9,consts:[[1,"project-new-page"],[1,"project-new-card"],["mat-button","",1,"project-new__back",3,"click"],[1,"project-new__title"],[1,"project-new__subtitle"],[1,"project-new__form"],["label","Project name","placeholder","my-project",3,"valueChange","value","isDisabled","autoFocus"],["label","Project path","placeholder","/path/to/project","hint","Absolute path to the project directory",3,"valueChange","enterPressed","value","isDisabled"],[1,"project-new__error"],[1,"project-new__actions"],["mat-button","",3,"click","disabled"],["mat-flat-button","","color","primary",3,"click","disabled"]],template:function(t,e){t&1&&(i(0,"div",0)(1,"div",1)(2,"button",2),c("click",function(){return e.onCancel()}),i(3,"mat-icon"),l(4,"arrow_back"),n(),l(5," Back to projects "),n(),i(6,"h1",3),l(7,"New project"),n(),i(8,"p",4),l(9,"Point Coday to an existing directory on your machine."),n(),i(10,"div",5)(11,"app-text-input",6),c("valueChange",function(d){return e.projectName=d}),n(),i(12,"app-text-input",7),c("valueChange",function(d){return e.projectPath=d})("enterPressed",function(){return e.onCreate()}),n(),u(13,K,2,1,"div",8),n(),i(14,"div",9)(15,"button",10),c("click",function(){return e.onCancel()}),l(16,"Cancel"),n(),i(17,"button",11),c("click",function(){return e.onCreate()}),l(18),n()()()()),t&2&&(a(11),s("value",e.projectName)("isDisabled",e.isCreating)("autoFocus",!0),a(),s("value",e.projectPath)("isDisabled",e.isCreating),a(),g(e.errorMessage?13:-1),a(2),s("disabled",e.isCreating),a(2),s("disabled",!e.isValid()||e.isCreating),a(),E(" ",e.isCreating?"Creating\u2026":"Create project"," "))},dependencies:[V,O,F,z,h],styles:[".project-new-page[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:center;min-height:100vh;width:100%;background:var(--color-bg);padding:2rem 1.5rem;box-sizing:border-box}.project-new-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;width:100%;max-width:560px;padding:2rem;background:var(--color-bg-secondary, rgba(255, 255, 255, .7));border:1px solid var(--color-border, rgba(0, 0, 0, .1));border-radius:16px;box-shadow:var(--glass-shadow, 0 8px 32px rgba(31, 38, 135, .15));margin-top:2rem}.project-new__back[_ngcontent-%COMP%]{align-self:flex-start;margin-left:-.5rem;color:var(--color-text-secondary, #6e6e73)}.project-new__title[_ngcontent-%COMP%]{margin:0;font-size:1.625rem;font-weight:700;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.project-new__subtitle[_ngcontent-%COMP%]{margin:-.75rem 0 0;font-size:.9375rem;color:var(--color-text-secondary, #6e6e73)}.project-new__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.project-new__error[_ngcontent-%COMP%]{padding:.75rem 1rem;background:#dc262614;border:1px solid rgba(220,38,38,.25);border-radius:8px;color:var(--color-error, #ff3b30);font-size:.875rem}.project-new__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;justify-content:flex-end;padding-top:.25rem}"]})};export{W as ProjectNewComponent};