@whoz-oss/coday-client 0.249.5 → 0.249.7

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 (73) hide show
  1. package/browser/{chunk-B4fIYjLb.js → chunk-3_ejZSiX.js} +1 -1
  2. package/browser/{chunk-CwXyQ4Ju.js → chunk-3x6JTc-Q.js} +1 -1
  3. package/browser/{chunk-BiPnnB8X.js → chunk-8Eyic2K4.js} +1 -1
  4. package/browser/{chunk-UDqQWKAg.js → chunk-9yQCwEpD.js} +1 -1
  5. package/browser/{chunk-CGgxj8Ll.js → chunk-B8vTtlfh.js} +1 -1
  6. package/browser/{chunk-DNuwJ0p8.js → chunk-BAmsPD3r.js} +1 -1
  7. package/browser/{chunk-McdsPwbe.js → chunk-BBLhUbcZ.js} +4 -4
  8. package/browser/{chunk-CL8NUXXa.js → chunk-BMgmcV4B.js} +1 -1
  9. package/browser/{chunk-BUPJDuFO.js → chunk-BRXCNJvv.js} +1 -1
  10. package/browser/{chunk-D_sXoT68.js → chunk-BUz3EUUk.js} +1 -1
  11. package/browser/{chunk-Lq8skGXv.js → chunk-BVn3NXYI.js} +1 -1
  12. package/browser/{chunk-DQ4FoWyz.js → chunk-BXQlLEq4.js} +2 -2
  13. package/browser/{chunk-BJTPtUco.js → chunk-BY12tEuK.js} +1 -1
  14. package/browser/{chunk-dpvvF4wU.js → chunk-BZI3JT54.js} +1 -1
  15. package/browser/{chunk-CPHT__IG.js → chunk-Ba9oGMbp.js} +1 -1
  16. package/browser/{chunk-DxYwvtCM.js → chunk-BbBDsahP.js} +1 -1
  17. package/browser/{chunk-COF9QnRG.js → chunk-BfeoBGQ9.js} +1 -1
  18. package/browser/{chunk-DijOcbn5.js → chunk-Bm3jLRpw.js} +1 -1
  19. package/browser/{chunk-kfNFXWlK.js → chunk-BmXT79gZ.js} +1 -1
  20. package/browser/{chunk-CvpbNH1V.js → chunk-BuvPMEL0.js} +2 -2
  21. package/browser/{chunk-Ct5Qp4E2.js → chunk-BwFdftpq.js} +1 -1
  22. package/browser/{chunk-CRB1wakd.js → chunk-C5a0dF7k.js} +1 -1
  23. package/browser/{chunk-BxmtpvI3.js → chunk-C5iStkq3.js} +1 -1
  24. package/browser/{chunk-ZUPZhG8s.js → chunk-C7dWjJdY.js} +2 -2
  25. package/browser/{chunk-Cm8hWWGc.js → chunk-C7yIemdX.js} +1 -1
  26. package/browser/{chunk-ZQW3-vPv.js → chunk-C8-Us7mG.js} +1 -1
  27. package/browser/{chunk-BQWolQ1_.js → chunk-CAtc1ecu.js} +1 -1
  28. package/browser/{chunk-Y_yj5Q5X.js → chunk-CFsppsJO.js} +1 -1
  29. package/browser/{chunk-DIqcovfM.js → chunk-CUubHATe.js} +2 -2
  30. package/browser/{chunk-iOgvtXqW.js → chunk-Ce-SqhaH.js} +1 -1
  31. package/browser/{chunk-C2gFixjV.js → chunk-CgJwfnU2.js} +1 -1
  32. package/browser/{chunk-BKMFWybZ.js → chunk-Cie8aEhE.js} +1 -1
  33. package/browser/{chunk-Dm3IJf8m.js → chunk-Clsp8PqN.js} +1 -1
  34. package/browser/{chunk-BXfg4Cn0.js → chunk-CmdzwND4.js} +1 -1
  35. package/browser/{chunk-BLEV4Kd8.js → chunk-CmjpqALv.js} +1 -1
  36. package/browser/{chunk-MEeAhlKz.js → chunk-Cuj0_PIE.js} +1 -1
  37. package/browser/{chunk-DJZUs7_z.js → chunk-CwOPXZEL.js} +1 -1
  38. package/browser/{chunk-C7pLql5T.js → chunk-CwVIbvMt.js} +1 -1
  39. package/browser/{chunk-33vlVNIU.js → chunk-CyB5bq-B.js} +1 -1
  40. package/browser/{chunk-BcgV9w1p.js → chunk-CyPzVyFW.js} +2 -2
  41. package/browser/{chunk-CiJ-4xLE.js → chunk-D4BFancP.js} +1 -1
  42. package/browser/{chunk-FlhMcqxz.js → chunk-D4pA968T.js} +1 -1
  43. package/browser/{chunk-DVY7ZRkn.js → chunk-DBVltHOO.js} +1 -1
  44. package/browser/{chunk-DVCs6PIN.js → chunk-DEM_1kYL.js} +1 -1
  45. package/browser/chunk-DGfCbMIU.js +1 -0
  46. package/browser/chunk-DLdFeD2Y.js +7 -0
  47. package/browser/{chunk-Dd7TuG2v.js → chunk-DMseVDyx.js} +1 -1
  48. package/browser/chunk-DRHPWyM_.js +1 -0
  49. package/browser/{chunk-GBM7ZdiS.js → chunk-DbPWDOCY.js} +1 -1
  50. package/browser/chunk-DdMCtiIj.js +1 -0
  51. package/browser/{chunk-BMNFjpsg.js → chunk-DhoUXdbf.js} +1 -1
  52. package/browser/{chunk-DCcqC6CZ.js → chunk-DiH98F5Y.js} +1 -1
  53. package/browser/{chunk-Cy26cHH0.js → chunk-Dl5GYR1f.js} +1 -1
  54. package/browser/{chunk-CnhLV6NJ.js → chunk-DmDjr28S.js} +1 -1
  55. package/browser/{chunk-DBcvm9ht.js → chunk-Dszi4fsk.js} +1 -1
  56. package/browser/{chunk-BIsBTTbQ.js → chunk-Dt4HP_6r.js} +1 -1
  57. package/browser/{chunk-BOSz-hxC.js → chunk-DtRowKlH.js} +1 -1
  58. package/browser/{chunk-COcrCp25.js → chunk-EWpqubAu.js} +1 -1
  59. package/browser/{chunk-Ddzyej-S.js → chunk-FyGR8D8l.js} +1 -1
  60. package/browser/{chunk-osSFU_ft.js → chunk-IRYK8gQC.js} +1 -1
  61. package/browser/{chunk-FfWh7yzS.js → chunk-SP2AM0SK.js} +1 -1
  62. package/browser/{chunk-DBDq5Tbc.js → chunk-cd-U8aJW.js} +1 -1
  63. package/browser/{chunk-XR8SsRgz.js → chunk-m-JrYooj.js} +1 -1
  64. package/browser/{chunk-HGwsSYC8.js → chunk-maGoHfNW.js} +1 -1
  65. package/browser/{chunk-CjgqGSbb.js → chunk-yZXrhXjq.js} +1 -1
  66. package/browser/{chunk-4T0Wfhqy.js → chunk-zdTdqHNW.js} +1 -1
  67. package/browser/index.html +1 -1
  68. package/browser/{main-Z5SI5ZVQ.js → main-RF3N53YL.js} +1 -1
  69. package/package.json +1 -1
  70. package/browser/chunk-CK3s5ul2.js +0 -7
  71. package/browser/chunk-CKzcFadZ.js +0 -1
  72. package/browser/chunk-DEYaa_7l.js +0 -1
  73. package/browser/chunk-f86mGfJT.js +0 -1
@@ -1 +1 @@
1
- import {g,J as dy,P,S as pa,u as ue,Y as x}from'./main-Z5SI5ZVQ.js';var d=class i{http=g(dy);projectState=g(P);promptsCache=new Map;getBaseUrl(){return `/api/projects/${this.projectState.getSelectedProjectIdOrThrow()}/prompts`}listPrompts(){return this.http.get(this.getBaseUrl())}getPromptsAutocomplete(t,e){let r=this.promptsCache.get(t);return r?pa(this.filterPromptsForAutocomplete(r,e)):this.http.get(`/api/projects/${t}/prompts`).pipe(ue(p=>(this.promptsCache.set(t,p),this.filterPromptsForAutocomplete(p,e))))}filterPromptsForAutocomplete(t,e){let r=e.toLowerCase();return t.filter(o=>o.name.toLowerCase().includes(r)||o.description.toLowerCase().includes(r)).map(o=>({name:o.name,description:o.description,parameterFormat:o.parameterFormat}))}clearCache(t){t?this.promptsCache.delete(t):this.promptsCache.clear();}getPrompt(t){return this.http.get(`${this.getBaseUrl()}/${t}`)}createPrompt(t){return this.http.post(this.getBaseUrl(),t).pipe(ue(e=>(this.clearCache(this.projectState.getSelectedProjectId()??void 0),e)))}updatePrompt(t,e){return this.http.put(`${this.getBaseUrl()}/${t}`,e).pipe(ue(r=>(this.clearCache(this.projectState.getSelectedProjectId()??void 0),r)))}deletePrompt(t){return this.http.delete(`${this.getBaseUrl()}/${t}`).pipe(ue(e=>(this.clearCache(this.projectState.getSelectedProjectId()??void 0),e)))}enableWebhook(t){return this.http.post(`${this.getBaseUrl()}/${t}/webhook`,{})}disableWebhook(t){return this.http.delete(`${this.getBaseUrl()}/${t}/webhook`)}static \u0275fac=function(e){return new(e||i)};static \u0275prov=x({token:i,factory:i.\u0275fac,providedIn:"root"})};export{d};
1
+ import {g,J as dy,P,S as pa,u as ue,Y as x}from'./main-RF3N53YL.js';var d=class i{http=g(dy);projectState=g(P);promptsCache=new Map;getBaseUrl(){return `/api/projects/${this.projectState.getSelectedProjectIdOrThrow()}/prompts`}listPrompts(){return this.http.get(this.getBaseUrl())}getPromptsAutocomplete(t,e){let r=this.promptsCache.get(t);return r?pa(this.filterPromptsForAutocomplete(r,e)):this.http.get(`/api/projects/${t}/prompts`).pipe(ue(p=>(this.promptsCache.set(t,p),this.filterPromptsForAutocomplete(p,e))))}filterPromptsForAutocomplete(t,e){let r=e.toLowerCase();return t.filter(o=>o.name.toLowerCase().includes(r)||o.description.toLowerCase().includes(r)).map(o=>({name:o.name,description:o.description,parameterFormat:o.parameterFormat}))}clearCache(t){t?this.promptsCache.delete(t):this.promptsCache.clear();}getPrompt(t){return this.http.get(`${this.getBaseUrl()}/${t}`)}createPrompt(t){return this.http.post(this.getBaseUrl(),t).pipe(ue(e=>(this.clearCache(this.projectState.getSelectedProjectId()??void 0),e)))}updatePrompt(t,e){return this.http.put(`${this.getBaseUrl()}/${t}`,e).pipe(ue(r=>(this.clearCache(this.projectState.getSelectedProjectId()??void 0),r)))}deletePrompt(t){return this.http.delete(`${this.getBaseUrl()}/${t}`).pipe(ue(e=>(this.clearCache(this.projectState.getSelectedProjectId()??void 0),e)))}enableWebhook(t){return this.http.post(`${this.getBaseUrl()}/${t}/webhook`,{})}disableWebhook(t){return this.http.delete(`${this.getBaseUrl()}/${t}/webhook`)}static \u0275fac=function(e){return new(e||i)};static \u0275prov=x({token:i,factory:i.\u0275fac,providedIn:"root"})};export{d};
@@ -1 +1 @@
1
- import {I}from'./chunk-GBM7ZdiS.js';import {m}from'./chunk-CK3s5ul2.js';import {g,ao as V$1,G as G$1,w as we,aI as Tr,bR as ga,Q as By,a7 as ha,S as pa,u as ue,b as U$1,A as Aw,aJ as Nb,v as vs,be as aT,l as Ag,W as WC,k as dl,af as Dg,T as TC,r as Tg,bf as uT,ah as rT,n as eC,ac as mC,t as tC,a9 as dC,aa as If,ab as wf,ag as fT}from'./main-Z5SI5ZVQ.js';import {W as Wn}from'./chunk-McdsPwbe.js';import'./chunk-CL8NUXXa.js';import'./chunk-BXfg4Cn0.js';import'./chunk-kfNFXWlK.js';var F=()=>[];function U(r,t){if(r&1){let o=dC();vs(0,"agentos-prompt-item",4),Ag("deleteRequested",function(n){If(o);let D=mC(2);return wf(D.deletePrompt(n))}),dl();}if(r&2){let o=mC().$implicit,e=mC();Tg("prompt",t)("namespaceId",e.namespaceId)("readOnly",e.isPlatformPrompt(o.id));}}function V(r,t){if(r&1&&eC(0,U,1,3,"agentos-prompt-item",3),r&2){let o,e=t.$implicit,n=mC();tC((o=n.resolvePrompt(e.id))?0:-1,o);}}var j="platform",G="namespace",A=class r{route=g(V$1);router=g(G$1);destroyRef=g(we);promptState=g(m);namespaceId=this.route.snapshot.params.namespaceId;refresh$=new Tr(void 0);allPrompts$=this.refresh$.pipe(ga(()=>By({platform:this.promptState.listPlatform().pipe(ha(()=>pa([]))),namespace:this.promptState.listByNamespace(this.namespaceId)})));promptItems$=this.allPrompts$.pipe(ue(({platform:t,namespace:o})=>[...t.map(e=>({id:e.id??"",name:e.name,description:e.description,groupKey:j,groupLabel:"Platform (read-only)"})),...o.map(e=>({id:e.id??"",name:e.name,description:e.description,groupKey:G,groupLabel:"Namespace"}))]));namespacePromptsById=new Map;platformPromptsById=new Map;constructor(){this.allPrompts$.pipe(U$1(this.destroyRef)).subscribe(({platform:t,namespace:o})=>{this.platformPromptsById=new Map(t.map(e=>[e.id??"",e])),this.namespacePromptsById=new Map(o.map(e=>[e.id??"",e]));});}goBack(){this.router.navigate(["/agentos","namespaces"]);}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"prompts","new"]);}deletePrompt(t){this.promptState.delete(t.id??"").pipe(U$1(this.destroyRef)).subscribe(()=>this.refresh$.next());}resolvePrompt(t){return this.platformPromptsById.get(t)??this.namespacePromptsById.get(t)??null}isPlatformPrompt(t){return this.platformPromptsById.has(t)}static \u0275fac=function(o){return new(o||r)};static \u0275cmp=Aw({type:r,selectors:[["agentos-namespace-prompts"]],decls:6,vars:6,consts:[["promptItemTpl",""],["title","Prompts","emptyMessage","No prompts defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","type","button",1,"namespace-prompts__back",3,"click"],[3,"prompt","namespaceId","readOnly"],[3,"deleteRequested","prompt","namespaceId","readOnly"]],template:function(o,e){if(o&1&&(vs(0,"ds-entity-list",1),aT(1,"async"),Ag("createRequested",function(){return e.openCreateForm()}),vs(2,"button",2),Ag("click",function(){return e.goBack()}),WC(3,"\u2190 Namespaces"),dl()(),Dg(4,V,1,1,"ng-template",null,0,fT)),o&2){let n=TC(5);Tg("items",uT(1,3,e.promptItems$)??rT(5,F))("showCreate",true)("itemTemplate",n);}},dependencies:[Wn,I,Nb],styles:[".namespace-prompts__back[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.namespace-prompts__back[_ngcontent-%COMP%]:hover{text-decoration:underline}"]})};export{A as NamespacePromptsComponent};
1
+ import {I}from'./chunk-DbPWDOCY.js';import {m}from'./chunk-DLdFeD2Y.js';import {g,ao as V$1,G as G$1,w as we,aI as Tr,bR as ga,Q as By,a7 as ha,S as pa,u as ue,b as U$1,A as Aw,aJ as Nb,v as vs,be as aT,l as Ag,W as WC,k as dl,af as Dg,T as TC,r as Tg,bf as uT,ah as rT,n as eC,ac as mC,t as tC,a9 as dC,aa as If,ab as wf,ag as fT}from'./main-RF3N53YL.js';import {W as Wn}from'./chunk-BBLhUbcZ.js';import'./chunk-BMgmcV4B.js';import'./chunk-CmdzwND4.js';import'./chunk-BmXT79gZ.js';var F=()=>[];function U(r,t){if(r&1){let o=dC();vs(0,"agentos-prompt-item",4),Ag("deleteRequested",function(n){If(o);let D=mC(2);return wf(D.deletePrompt(n))}),dl();}if(r&2){let o=mC().$implicit,e=mC();Tg("prompt",t)("namespaceId",e.namespaceId)("readOnly",e.isPlatformPrompt(o.id));}}function V(r,t){if(r&1&&eC(0,U,1,3,"agentos-prompt-item",3),r&2){let o,e=t.$implicit,n=mC();tC((o=n.resolvePrompt(e.id))?0:-1,o);}}var j="platform",G="namespace",A=class r{route=g(V$1);router=g(G$1);destroyRef=g(we);promptState=g(m);namespaceId=this.route.snapshot.params.namespaceId;refresh$=new Tr(void 0);allPrompts$=this.refresh$.pipe(ga(()=>By({platform:this.promptState.listPlatform().pipe(ha(()=>pa([]))),namespace:this.promptState.listByNamespace(this.namespaceId)})));promptItems$=this.allPrompts$.pipe(ue(({platform:t,namespace:o})=>[...t.map(e=>({id:e.id??"",name:e.name,description:e.description,groupKey:j,groupLabel:"Platform (read-only)"})),...o.map(e=>({id:e.id??"",name:e.name,description:e.description,groupKey:G,groupLabel:"Namespace"}))]));namespacePromptsById=new Map;platformPromptsById=new Map;constructor(){this.allPrompts$.pipe(U$1(this.destroyRef)).subscribe(({platform:t,namespace:o})=>{this.platformPromptsById=new Map(t.map(e=>[e.id??"",e])),this.namespacePromptsById=new Map(o.map(e=>[e.id??"",e]));});}goBack(){this.router.navigate(["/agentos","namespaces"]);}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"prompts","new"]);}deletePrompt(t){this.promptState.delete(t.id??"").pipe(U$1(this.destroyRef)).subscribe(()=>this.refresh$.next());}resolvePrompt(t){return this.platformPromptsById.get(t)??this.namespacePromptsById.get(t)??null}isPlatformPrompt(t){return this.platformPromptsById.has(t)}static \u0275fac=function(o){return new(o||r)};static \u0275cmp=Aw({type:r,selectors:[["agentos-namespace-prompts"]],decls:6,vars:6,consts:[["promptItemTpl",""],["title","Prompts","emptyMessage","No prompts defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","type","button",1,"namespace-prompts__back",3,"click"],[3,"prompt","namespaceId","readOnly"],[3,"deleteRequested","prompt","namespaceId","readOnly"]],template:function(o,e){if(o&1&&(vs(0,"ds-entity-list",1),aT(1,"async"),Ag("createRequested",function(){return e.openCreateForm()}),vs(2,"button",2),Ag("click",function(){return e.goBack()}),WC(3,"\u2190 Namespaces"),dl()(),Dg(4,V,1,1,"ng-template",null,0,fT)),o&2){let n=TC(5);Tg("items",uT(1,3,e.promptItems$)??rT(5,F))("showCreate",true)("itemTemplate",n);}},dependencies:[Wn,I,Nb],styles:[".namespace-prompts__back[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.namespace-prompts__back[_ngcontent-%COMP%]:hover{text-decoration:underline}"]})};export{A as NamespacePromptsComponent};
@@ -1 +1 @@
1
- import {I}from'./chunk-BxmtpvI3.js';import {g,G,w as we,de as B,dd as $,aI as Tr,bR as ga,aD as Ly,u as ue,b as U,A as Aw,aJ as Nb,v as vs,be as aT,l as Ag,k as dl,af as Dg,T as TC,r as Tg,bf as uT,ah as rT,n as eC,ac as mC,t as tC,a9 as dC,aa as If,ab as wf,ag as fT}from'./main-Z5SI5ZVQ.js';import {W as Wn,D as De}from'./chunk-McdsPwbe.js';import'./chunk-CL8NUXXa.js';import'./chunk-BXfg4Cn0.js';var N=()=>[];function V(n,t){if(n&1){let o=dC();vs(0,"agentos-ai-model-item",4),Ag("editRequested",function(e){If(o);let s=mC(2);return wf(s.onEdit(e))})("deleteRequested",function(e){If(o);let s=mC(2);return wf(s.deleteModel(e))}),dl();}n&2&&Tg("model",t);}function F(n,t){if(n&1&&eC(0,V,1,1,"agentos-ai-model-item",3),n&2){let o,i=t.$implicit,e=mC();tC((o=e.resolveModel(i.id))?0:-1,o);}}var L=class n{router=g(G);destroyRef=g(we);aiModelController=g(B);aiProviderController=g($);refresh$=new Tr(void 0);data$=this.refresh$.pipe(ga(()=>Ly([this.aiModelController.listPlatformLevelAiModel(),this.aiProviderController.listAiProvider("none")])));modelItems$=this.data$.pipe(ue(([t,o])=>{let i=new Map(o.map(e=>[e.id??"",e.name]));return t.map(e=>({id:e.id??"",name:e.alias??e.apiModelName,description:e.apiModelName,groupKey:e.aiProviderId,groupLabel:i.get(e.aiProviderId)??e.aiProviderId}))}));modelsById=new Map;constructor(){this.data$.pipe(U(this.destroyRef)).subscribe(([t])=>{this.modelsById=new Map(t.map(o=>[o.id??"",o]));});}goBack(){this.router.navigate(["/agentos","admin"]);}openCreateForm(){this.router.navigate(["/agentos","admin","ai-models","new"]);}deleteModel(t){this.aiModelController.deleteAiModel(t.id??"").pipe(U(this.destroyRef)).subscribe(()=>this.refresh$.next());}onEdit(t){t.id&&this.router.navigate(["/agentos","admin","ai-models",t.id,"edit"]);}resolveModel(t){return this.modelsById.get(t)??null}static \u0275fac=function(o){return new(o||n)};static \u0275cmp=Aw({type:n,selectors:[["agentos-platform-ai-models"]],decls:5,vars:6,consts:[["aiModelItemTpl",""],["title","Platform AI Models","emptyMessage","No platform AI models defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[3,"model"],[3,"editRequested","deleteRequested","model"]],template:function(o,i){if(o&1&&(vs(0,"ds-entity-list",1),aT(1,"async"),Ag("createRequested",function(){return i.openCreateForm()}),vs(2,"ds-icon-button",2),Ag("action",function(){return i.goBack()}),dl()(),Dg(3,F,1,1,"ng-template",null,0,fT)),o&2){let e=TC(4);Tg("items",uT(1,3,i.modelItems$)??rT(5,N))("showCreate",true)("itemTemplate",e);}},dependencies:[Wn,I,De,Nb],styles:[".platform-ai-models__back[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;font-family:inherit;font-size:.875rem;color:var(--color-text-secondary, #6e6e73);padding:.25rem .5rem;border-radius:4px;transition:color .15s ease}.platform-ai-models__back[_ngcontent-%COMP%]:hover{color:var(--color-primary, #007aff)}"]})};export{L as PlatformAiModelsComponent};
1
+ import {I}from'./chunk-C5iStkq3.js';import {g,G,w as we,de as B,dd as $,aI as Tr,bR as ga,aD as Ly,u as ue,b as U,A as Aw,aJ as Nb,v as vs,be as aT,l as Ag,k as dl,af as Dg,T as TC,r as Tg,bf as uT,ah as rT,n as eC,ac as mC,t as tC,a9 as dC,aa as If,ab as wf,ag as fT}from'./main-RF3N53YL.js';import {W as Wn,S as Se}from'./chunk-BBLhUbcZ.js';import'./chunk-BMgmcV4B.js';import'./chunk-CmdzwND4.js';var N=()=>[];function V(n,t){if(n&1){let o=dC();vs(0,"agentos-ai-model-item",4),Ag("editRequested",function(e){If(o);let s=mC(2);return wf(s.onEdit(e))})("deleteRequested",function(e){If(o);let s=mC(2);return wf(s.deleteModel(e))}),dl();}n&2&&Tg("model",t);}function F(n,t){if(n&1&&eC(0,V,1,1,"agentos-ai-model-item",3),n&2){let o,i=t.$implicit,e=mC();tC((o=e.resolveModel(i.id))?0:-1,o);}}var L=class n{router=g(G);destroyRef=g(we);aiModelController=g(B);aiProviderController=g($);refresh$=new Tr(void 0);data$=this.refresh$.pipe(ga(()=>Ly([this.aiModelController.listPlatformLevelAiModel(),this.aiProviderController.listAiProvider("none")])));modelItems$=this.data$.pipe(ue(([t,o])=>{let i=new Map(o.map(e=>[e.id??"",e.name]));return t.map(e=>({id:e.id??"",name:e.alias??e.apiModelName,description:e.apiModelName,groupKey:e.aiProviderId,groupLabel:i.get(e.aiProviderId)??e.aiProviderId}))}));modelsById=new Map;constructor(){this.data$.pipe(U(this.destroyRef)).subscribe(([t])=>{this.modelsById=new Map(t.map(o=>[o.id??"",o]));});}goBack(){this.router.navigate(["/agentos","admin"]);}openCreateForm(){this.router.navigate(["/agentos","admin","ai-models","new"]);}deleteModel(t){this.aiModelController.deleteAiModel(t.id??"").pipe(U(this.destroyRef)).subscribe(()=>this.refresh$.next());}onEdit(t){t.id&&this.router.navigate(["/agentos","admin","ai-models",t.id,"edit"]);}resolveModel(t){return this.modelsById.get(t)??null}static \u0275fac=function(o){return new(o||n)};static \u0275cmp=Aw({type:n,selectors:[["agentos-platform-ai-models"]],decls:5,vars:6,consts:[["aiModelItemTpl",""],["title","Platform AI Models","emptyMessage","No platform AI models defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[3,"model"],[3,"editRequested","deleteRequested","model"]],template:function(o,i){if(o&1&&(vs(0,"ds-entity-list",1),aT(1,"async"),Ag("createRequested",function(){return i.openCreateForm()}),vs(2,"ds-icon-button",2),Ag("action",function(){return i.goBack()}),dl()(),Dg(3,F,1,1,"ng-template",null,0,fT)),o&2){let e=TC(4);Tg("items",uT(1,3,i.modelItems$)??rT(5,N))("showCreate",true)("itemTemplate",e);}},dependencies:[Wn,I,Se,Nb],styles:[".platform-ai-models__back[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;font-family:inherit;font-size:.875rem;color:var(--color-text-secondary, #6e6e73);padding:.25rem .5rem;border-radius:4px;transition:color .15s ease}.platform-ai-models__back[_ngcontent-%COMP%]:hover{color:var(--color-primary, #007aff)}"]})};export{L as PlatformAiModelsComponent};
@@ -1 +1 @@
1
- import {u}from'./chunk-CK3s5ul2.js';import {g,dg as Q,dh as T,S as pa,bR as ga,u as ue,a7 as ha,cD as Rd,Y as x}from'./main-Z5SI5ZVQ.js';var v=class i{userState=g(u);membership=g(Q);currentUser$=T(this.userState.currentUser);cache=new Map;isAdminOfNamespace$(e){if(!e)return pa(false);let t=this.cache.get(e);if(t)return t;let s=this.currentUser$.pipe(ga(a=>a?a.isAdmin?pa(true):this.membership.getMembersNamespaceMembership(e).pipe(ue(d=>d.some(n=>n.id===a.id&&n.role==="ADMIN")),ha(()=>pa(false))):pa(false)),Rd({bufferSize:1,refCount:false}));return this.cache.set(e,s),s}static \u0275fac=function(t){return new(t||i)};static \u0275prov=x({token:i,factory:i.\u0275fac,providedIn:"root"})};export{v};
1
+ import {u}from'./chunk-DLdFeD2Y.js';import {g,dg as Q,dh as T,S as pa,bR as ga,u as ue,a7 as ha,cD as Rd,Y as x}from'./main-RF3N53YL.js';var v=class i{userState=g(u);membership=g(Q);currentUser$=T(this.userState.currentUser);cache=new Map;isAdminOfNamespace$(e){if(!e)return pa(false);let t=this.cache.get(e);if(t)return t;let s=this.currentUser$.pipe(ga(a=>a?a.isAdmin?pa(true):this.membership.getMembersNamespaceMembership(e).pipe(ue(d=>d.some(n=>n.id===a.id&&n.role==="ADMIN")),ha(()=>pa(false))):pa(false)),Rd({bufferSize:1,refCount:false}));return this.cache.set(e,s),s}static \u0275fac=function(t){return new(t||i)};static \u0275prov=x({token:i,factory:i.\u0275fac,providedIn:"root"})};export{v};
@@ -1,4 +1,4 @@
1
- import {b as Qe}from'./chunk-CL8NUXXa.js';import {D as D$1,i as y}from'./chunk-BXfg4Cn0.js';import {aK as Do,aL as Wn,aN as wt,g as g$1,az as Qt,br as wl,aO as G,aR as K,aV as w,al as yt,aW as D,bw as on,bx as am,aS as Ut,H as Hi,A as Aw,by as Oi,aC as wu,aZ as YT,bz as vC,v as vs,l as Ag,k as dl,o as bg,c8 as kf,cj as Ff,bA as DC,T as TC,r as Tg,X as XE,y as Hg,C as Cg,b4 as nT,bB as Ii,c7 as QT,b$ as Ng,b_ as FC,D as Fg,I as IC,E as wC}from'./main-Z5SI5ZVQ.js';var W=["input"],Y=["label"],ee=["*"],f={color:"accent",clickAction:"check-indeterminate",disabledInteractive:false},ce=new w("mat-checkbox-default-options",{providedIn:"root",factory:()=>f}),a=(function(t){return t[t.Init=0]="Init",t[t.Checked=1]="Checked",t[t.Unchecked=2]="Unchecked",t[t.Indeterminate=3]="Indeterminate",t})(a||{}),g=class{source;checked},ne=(()=>{class t{_elementRef=g$1(Qt);_changeDetectorRef=g$1(wl);_ngZone=g$1(G);_animationsDisabled=K();_options=g$1(ce,{optional:true});focus(){this._inputElement.nativeElement.focus();}_createChangeEvent(e){let n=new g;return n.source=this,n.checked=e,n}_getAnimationTargetElement(){return this._inputElement?.nativeElement}_animationClasses={uncheckedToChecked:"mdc-checkbox--anim-unchecked-checked",uncheckedToIndeterminate:"mdc-checkbox--anim-unchecked-indeterminate",checkedToUnchecked:"mdc-checkbox--anim-checked-unchecked",checkedToIndeterminate:"mdc-checkbox--anim-checked-indeterminate",indeterminateToChecked:"mdc-checkbox--anim-indeterminate-checked",indeterminateToUnchecked:"mdc-checkbox--anim-indeterminate-unchecked"};ariaLabel="";ariaLabelledby=null;ariaDescribedby;ariaExpanded;ariaControls;ariaOwns;_uniqueId;id;get inputId(){return `${this.id||this._uniqueId}-input`}required=false;labelPosition="after";name=null;change=new yt;indeterminateChange=new yt;value;disableRipple=false;_inputElement;_labelElement;tabIndex;color;disabledInteractive;_onTouched=()=>{};_currentAnimationClass="";_currentCheckState=a.Init;_controlValueAccessorChangeFn=()=>{};_validatorChangeFn=()=>{};constructor(){g$1(D).load(on);let e=g$1(new am("tabindex"),{optional:true});this._options=this._options||f,this.color=this._options.color||f.color,this.tabIndex=e==null?0:parseInt(e)||0,this.id=this._uniqueId=g$1(Ut).getId("mat-mdc-checkbox-"),this.disabledInteractive=this._options?.disabledInteractive??false;}ngOnChanges(e){e.required&&this._validatorChangeFn();}ngAfterViewInit(){this._syncIndeterminate(this.indeterminate);}get checked(){return this._checked}set checked(e){e!=this.checked&&(this._checked=e,this._changeDetectorRef.markForCheck());}_checked=false;get disabled(){return this._disabled}set disabled(e){e!==this.disabled&&(this._disabled=e,this._changeDetectorRef.markForCheck());}_disabled=false;get indeterminate(){return this._indeterminate()}set indeterminate(e){let n=e!=this._indeterminate();this._indeterminate.set(e),n&&(e?this._transitionCheckState(a.Indeterminate):this._transitionCheckState(this.checked?a.Checked:a.Unchecked),this.indeterminateChange.emit(e)),this._syncIndeterminate(e);}_indeterminate=Hi(false);_isRippleDisabled(){return this.disableRipple||this.disabled}_onLabelTextChange(){this._changeDetectorRef.detectChanges();}writeValue(e){this.checked=!!e;}registerOnChange(e){this._controlValueAccessorChangeFn=e;}registerOnTouched(e){this._onTouched=e;}setDisabledState(e){this.disabled=e;}validate(e){return this.required&&e.value!==true?{required:true}:null}registerOnValidatorChange(e){this._validatorChangeFn=e;}_transitionCheckState(e){let n=this._currentCheckState,c=this._getAnimationTargetElement();if(!(n===e||!c)&&(this._currentAnimationClass&&c.classList.remove(this._currentAnimationClass),this._currentAnimationClass=this._getAnimationClassForCheckStateTransition(n,e),this._currentCheckState=e,this._currentAnimationClass.length>0)){c.classList.add(this._currentAnimationClass);let o=this._currentAnimationClass;this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{c.classList.remove(o);},1e3);});}}_emitChangeEvent(){this._controlValueAccessorChangeFn(this.checked),this.change.emit(this._createChangeEvent(this.checked)),this._inputElement&&(this._inputElement.nativeElement.checked=this.checked);}toggle(){this.checked=!this.checked,this._controlValueAccessorChangeFn(this.checked);}_handleInputClick(){let e=this._options?.clickAction;!this.disabled&&e!=="noop"?(this.indeterminate&&e!=="check"&&Promise.resolve().then(()=>{this._indeterminate.set(false),this.indeterminateChange.emit(false);}),this._checked=!this._checked,this._transitionCheckState(this._checked?a.Checked:a.Unchecked),this._emitChangeEvent()):(this.disabled&&this.disabledInteractive||!this.disabled&&e==="noop")&&(this._inputElement.nativeElement.checked=this.checked,this._inputElement.nativeElement.indeterminate=this.indeterminate);}_onInteractionEvent(e){e.stopPropagation();}_onBlur(){Promise.resolve().then(()=>{this._onTouched(),this._changeDetectorRef.markForCheck();});}_getAnimationClassForCheckStateTransition(e,n){if(this._animationsDisabled)return "";switch(e){case a.Init:if(n===a.Checked)return this._animationClasses.uncheckedToChecked;if(n==a.Indeterminate)return this._checked?this._animationClasses.checkedToIndeterminate:this._animationClasses.uncheckedToIndeterminate;break;case a.Unchecked:return n===a.Checked?this._animationClasses.uncheckedToChecked:this._animationClasses.uncheckedToIndeterminate;case a.Checked:return n===a.Unchecked?this._animationClasses.checkedToUnchecked:this._animationClasses.checkedToIndeterminate;case a.Indeterminate:return n===a.Checked?this._animationClasses.indeterminateToChecked:this._animationClasses.indeterminateToUnchecked}return ""}_syncIndeterminate(e){let n=this._inputElement;n&&(n.nativeElement.indeterminate=e);}_onInputClick(){this._handleInputClick();}_onTouchTargetClick(){this._handleInputClick(),this.disabled||this._inputElement.nativeElement.focus();}_preventBubblingFromLabel(e){e.target&&this._labelElement.nativeElement.contains(e.target)&&e.stopPropagation();}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Aw({type:t,selectors:[["mat-checkbox"]],viewQuery:function(n,c){if(n&1&&Fg(W,5)(Y,5),n&2){let o;IC(o=wC())&&(c._inputElement=o.first),IC(o=wC())&&(c._labelElement=o.first);}},hostAttrs:[1,"mat-mdc-checkbox"],hostVars:16,hostBindings:function(n,c){n&2&&(Ng("id",c.id),Cg("tabindex",null)("aria-label",null)("aria-labelledby",null),FC(c.color?"mat-"+c.color:"mat-accent"),Hg("_mat-animation-noopable",c._animationsDisabled)("mdc-checkbox--disabled",c.disabled)("mat-mdc-checkbox-disabled",c.disabled)("mat-mdc-checkbox-checked",c.checked)("mat-mdc-checkbox-disabled-interactive",c.disabledInteractive));},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],ariaExpanded:[2,"aria-expanded","ariaExpanded",YT],ariaControls:[0,"aria-controls","ariaControls"],ariaOwns:[0,"aria-owns","ariaOwns"],id:"id",required:[2,"required","required",YT],labelPosition:"labelPosition",name:"name",value:"value",disableRipple:[2,"disableRipple","disableRipple",YT],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?void 0:QT(e)],color:"color",disabledInteractive:[2,"disabledInteractive","disabledInteractive",YT],checked:[2,"checked","checked",YT],disabled:[2,"disabled","disabled",YT],indeterminate:[2,"indeterminate","indeterminate",YT]},outputs:{change:"change",indeterminateChange:"indeterminateChange"},exportAs:["matCheckbox"],features:[nT([{provide:D$1,useExisting:Ii(()=>t),multi:true},{provide:y,useExisting:t,multi:true}]),wu],ngContentSelectors:ee,decls:15,vars:23,consts:[["checkbox",""],["input",""],["label",""],["mat-internal-form-field","",3,"click","labelPosition"],[1,"mdc-checkbox"],["aria-hidden","true",1,"mat-mdc-checkbox-touch-target",3,"click"],["type","checkbox",1,"mdc-checkbox__native-control",3,"blur","click","change","checked","indeterminate","disabled","id","required","tabIndex"],["aria-hidden","true",1,"mdc-checkbox__ripple"],["aria-hidden","true",1,"mdc-checkbox__background"],["focusable","false","viewBox","0 0 24 24",1,"mdc-checkbox__checkmark"],["fill","none","d","M1.73,12.91 8.1,19.28 22.79,4.59",1,"mdc-checkbox__checkmark-path"],[1,"mdc-checkbox__mixedmark"],["mat-ripple","","aria-hidden","true",1,"mat-mdc-checkbox-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mdc-label",3,"for"]],template:function(n,c){if(n&1&&(vC(),vs(0,"div",3),Ag("click",function(k){return c._preventBubblingFromLabel(k)}),vs(1,"div",4,0)(3,"div",5),Ag("click",function(){return c._onTouchTargetClick()}),dl(),vs(4,"input",6,1),Ag("blur",function(){return c._onBlur()})("click",function(){return c._onInputClick()})("change",function(k){return c._onInteractionEvent(k)}),dl(),bg(6,"div",7),vs(7,"div",8),kf(),vs(8,"svg",9),bg(9,"path",10),dl(),Ff(),bg(10,"div",11),dl(),bg(11,"div",12),dl(),vs(12,"label",13,2),DC(14),dl()()),n&2){let o=TC(2);Tg("labelPosition",c.labelPosition),XE(4),Hg("mdc-checkbox--selected",c.checked),Tg("checked",c.checked)("indeterminate",c.indeterminate)("disabled",c.disabled&&!c.disabledInteractive)("id",c.inputId)("required",c.required)("tabIndex",c.disabled&&!c.disabledInteractive?-1:c.tabIndex),Cg("aria-label",c.ariaLabel||null)("aria-labelledby",c.ariaLabelledby)("aria-describedby",c.ariaDescribedby)("aria-checked",c.indeterminate?"mixed":null)("aria-controls",c.ariaControls)("aria-disabled",c.disabled&&c.disabledInteractive?true:null)("aria-expanded",c.ariaExpanded)("aria-owns",c.ariaOwns)("name",c.name)("value",c.value),XE(7),Tg("matRippleTrigger",o)("matRippleDisabled",c.disableRipple||c.disabled)("matRippleCentered",true),XE(),Tg("for",c.inputId);}},dependencies:[Oi,Qe],styles:[`.mdc-checkbox {
1
+ import {b as Qe}from'./chunk-BMgmcV4B.js';import {D as D$1,i as y}from'./chunk-CmdzwND4.js';import {aK as Do,aL as Wn,aN as wt,g as g$1,az as Qt,br as wl,aO as G,aR as K,aV as w,al as yt,aW as D,bw as on,bx as am,aS as Ut,H as Hi,A as Aw,by as Oi,aC as wu,aZ as YT,bz as vC,v as vs,l as Ag,k as dl,o as bg,c8 as kf,cj as Ff,bA as DC,T as TC,r as Tg,X as XE,y as Hg,C as Cg,b4 as nT,bB as Ii,c7 as QT,b$ as Ng,b_ as FC,D as Fg,I as IC,E as wC}from'./main-RF3N53YL.js';var W=["input"],Y=["label"],ee=["*"],f={color:"accent",clickAction:"check-indeterminate",disabledInteractive:false},ce=new w("mat-checkbox-default-options",{providedIn:"root",factory:()=>f}),a=(function(t){return t[t.Init=0]="Init",t[t.Checked=1]="Checked",t[t.Unchecked=2]="Unchecked",t[t.Indeterminate=3]="Indeterminate",t})(a||{}),g=class{source;checked},ne=(()=>{class t{_elementRef=g$1(Qt);_changeDetectorRef=g$1(wl);_ngZone=g$1(G);_animationsDisabled=K();_options=g$1(ce,{optional:true});focus(){this._inputElement.nativeElement.focus();}_createChangeEvent(e){let n=new g;return n.source=this,n.checked=e,n}_getAnimationTargetElement(){return this._inputElement?.nativeElement}_animationClasses={uncheckedToChecked:"mdc-checkbox--anim-unchecked-checked",uncheckedToIndeterminate:"mdc-checkbox--anim-unchecked-indeterminate",checkedToUnchecked:"mdc-checkbox--anim-checked-unchecked",checkedToIndeterminate:"mdc-checkbox--anim-checked-indeterminate",indeterminateToChecked:"mdc-checkbox--anim-indeterminate-checked",indeterminateToUnchecked:"mdc-checkbox--anim-indeterminate-unchecked"};ariaLabel="";ariaLabelledby=null;ariaDescribedby;ariaExpanded;ariaControls;ariaOwns;_uniqueId;id;get inputId(){return `${this.id||this._uniqueId}-input`}required=false;labelPosition="after";name=null;change=new yt;indeterminateChange=new yt;value;disableRipple=false;_inputElement;_labelElement;tabIndex;color;disabledInteractive;_onTouched=()=>{};_currentAnimationClass="";_currentCheckState=a.Init;_controlValueAccessorChangeFn=()=>{};_validatorChangeFn=()=>{};constructor(){g$1(D).load(on);let e=g$1(new am("tabindex"),{optional:true});this._options=this._options||f,this.color=this._options.color||f.color,this.tabIndex=e==null?0:parseInt(e)||0,this.id=this._uniqueId=g$1(Ut).getId("mat-mdc-checkbox-"),this.disabledInteractive=this._options?.disabledInteractive??false;}ngOnChanges(e){e.required&&this._validatorChangeFn();}ngAfterViewInit(){this._syncIndeterminate(this.indeterminate);}get checked(){return this._checked}set checked(e){e!=this.checked&&(this._checked=e,this._changeDetectorRef.markForCheck());}_checked=false;get disabled(){return this._disabled}set disabled(e){e!==this.disabled&&(this._disabled=e,this._changeDetectorRef.markForCheck());}_disabled=false;get indeterminate(){return this._indeterminate()}set indeterminate(e){let n=e!=this._indeterminate();this._indeterminate.set(e),n&&(e?this._transitionCheckState(a.Indeterminate):this._transitionCheckState(this.checked?a.Checked:a.Unchecked),this.indeterminateChange.emit(e)),this._syncIndeterminate(e);}_indeterminate=Hi(false);_isRippleDisabled(){return this.disableRipple||this.disabled}_onLabelTextChange(){this._changeDetectorRef.detectChanges();}writeValue(e){this.checked=!!e;}registerOnChange(e){this._controlValueAccessorChangeFn=e;}registerOnTouched(e){this._onTouched=e;}setDisabledState(e){this.disabled=e;}validate(e){return this.required&&e.value!==true?{required:true}:null}registerOnValidatorChange(e){this._validatorChangeFn=e;}_transitionCheckState(e){let n=this._currentCheckState,c=this._getAnimationTargetElement();if(!(n===e||!c)&&(this._currentAnimationClass&&c.classList.remove(this._currentAnimationClass),this._currentAnimationClass=this._getAnimationClassForCheckStateTransition(n,e),this._currentCheckState=e,this._currentAnimationClass.length>0)){c.classList.add(this._currentAnimationClass);let o=this._currentAnimationClass;this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{c.classList.remove(o);},1e3);});}}_emitChangeEvent(){this._controlValueAccessorChangeFn(this.checked),this.change.emit(this._createChangeEvent(this.checked)),this._inputElement&&(this._inputElement.nativeElement.checked=this.checked);}toggle(){this.checked=!this.checked,this._controlValueAccessorChangeFn(this.checked);}_handleInputClick(){let e=this._options?.clickAction;!this.disabled&&e!=="noop"?(this.indeterminate&&e!=="check"&&Promise.resolve().then(()=>{this._indeterminate.set(false),this.indeterminateChange.emit(false);}),this._checked=!this._checked,this._transitionCheckState(this._checked?a.Checked:a.Unchecked),this._emitChangeEvent()):(this.disabled&&this.disabledInteractive||!this.disabled&&e==="noop")&&(this._inputElement.nativeElement.checked=this.checked,this._inputElement.nativeElement.indeterminate=this.indeterminate);}_onInteractionEvent(e){e.stopPropagation();}_onBlur(){Promise.resolve().then(()=>{this._onTouched(),this._changeDetectorRef.markForCheck();});}_getAnimationClassForCheckStateTransition(e,n){if(this._animationsDisabled)return "";switch(e){case a.Init:if(n===a.Checked)return this._animationClasses.uncheckedToChecked;if(n==a.Indeterminate)return this._checked?this._animationClasses.checkedToIndeterminate:this._animationClasses.uncheckedToIndeterminate;break;case a.Unchecked:return n===a.Checked?this._animationClasses.uncheckedToChecked:this._animationClasses.uncheckedToIndeterminate;case a.Checked:return n===a.Unchecked?this._animationClasses.checkedToUnchecked:this._animationClasses.checkedToIndeterminate;case a.Indeterminate:return n===a.Checked?this._animationClasses.indeterminateToChecked:this._animationClasses.indeterminateToUnchecked}return ""}_syncIndeterminate(e){let n=this._inputElement;n&&(n.nativeElement.indeterminate=e);}_onInputClick(){this._handleInputClick();}_onTouchTargetClick(){this._handleInputClick(),this.disabled||this._inputElement.nativeElement.focus();}_preventBubblingFromLabel(e){e.target&&this._labelElement.nativeElement.contains(e.target)&&e.stopPropagation();}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Aw({type:t,selectors:[["mat-checkbox"]],viewQuery:function(n,c){if(n&1&&Fg(W,5)(Y,5),n&2){let o;IC(o=wC())&&(c._inputElement=o.first),IC(o=wC())&&(c._labelElement=o.first);}},hostAttrs:[1,"mat-mdc-checkbox"],hostVars:16,hostBindings:function(n,c){n&2&&(Ng("id",c.id),Cg("tabindex",null)("aria-label",null)("aria-labelledby",null),FC(c.color?"mat-"+c.color:"mat-accent"),Hg("_mat-animation-noopable",c._animationsDisabled)("mdc-checkbox--disabled",c.disabled)("mat-mdc-checkbox-disabled",c.disabled)("mat-mdc-checkbox-checked",c.checked)("mat-mdc-checkbox-disabled-interactive",c.disabledInteractive));},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],ariaExpanded:[2,"aria-expanded","ariaExpanded",YT],ariaControls:[0,"aria-controls","ariaControls"],ariaOwns:[0,"aria-owns","ariaOwns"],id:"id",required:[2,"required","required",YT],labelPosition:"labelPosition",name:"name",value:"value",disableRipple:[2,"disableRipple","disableRipple",YT],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?void 0:QT(e)],color:"color",disabledInteractive:[2,"disabledInteractive","disabledInteractive",YT],checked:[2,"checked","checked",YT],disabled:[2,"disabled","disabled",YT],indeterminate:[2,"indeterminate","indeterminate",YT]},outputs:{change:"change",indeterminateChange:"indeterminateChange"},exportAs:["matCheckbox"],features:[nT([{provide:D$1,useExisting:Ii(()=>t),multi:true},{provide:y,useExisting:t,multi:true}]),wu],ngContentSelectors:ee,decls:15,vars:23,consts:[["checkbox",""],["input",""],["label",""],["mat-internal-form-field","",3,"click","labelPosition"],[1,"mdc-checkbox"],["aria-hidden","true",1,"mat-mdc-checkbox-touch-target",3,"click"],["type","checkbox",1,"mdc-checkbox__native-control",3,"blur","click","change","checked","indeterminate","disabled","id","required","tabIndex"],["aria-hidden","true",1,"mdc-checkbox__ripple"],["aria-hidden","true",1,"mdc-checkbox__background"],["focusable","false","viewBox","0 0 24 24",1,"mdc-checkbox__checkmark"],["fill","none","d","M1.73,12.91 8.1,19.28 22.79,4.59",1,"mdc-checkbox__checkmark-path"],[1,"mdc-checkbox__mixedmark"],["mat-ripple","","aria-hidden","true",1,"mat-mdc-checkbox-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mdc-label",3,"for"]],template:function(n,c){if(n&1&&(vC(),vs(0,"div",3),Ag("click",function(k){return c._preventBubblingFromLabel(k)}),vs(1,"div",4,0)(3,"div",5),Ag("click",function(){return c._onTouchTargetClick()}),dl(),vs(4,"input",6,1),Ag("blur",function(){return c._onBlur()})("click",function(){return c._onInputClick()})("change",function(k){return c._onInteractionEvent(k)}),dl(),bg(6,"div",7),vs(7,"div",8),kf(),vs(8,"svg",9),bg(9,"path",10),dl(),Ff(),bg(10,"div",11),dl(),bg(11,"div",12),dl(),vs(12,"label",13,2),DC(14),dl()()),n&2){let o=TC(2);Tg("labelPosition",c.labelPosition),XE(4),Hg("mdc-checkbox--selected",c.checked),Tg("checked",c.checked)("indeterminate",c.indeterminate)("disabled",c.disabled&&!c.disabledInteractive)("id",c.inputId)("required",c.required)("tabIndex",c.disabled&&!c.disabledInteractive?-1:c.tabIndex),Cg("aria-label",c.ariaLabel||null)("aria-labelledby",c.ariaLabelledby)("aria-describedby",c.ariaDescribedby)("aria-checked",c.indeterminate?"mixed":null)("aria-controls",c.ariaControls)("aria-disabled",c.disabled&&c.disabledInteractive?true:null)("aria-expanded",c.ariaExpanded)("aria-owns",c.ariaOwns)("name",c.name)("value",c.value),XE(7),Tg("matRippleTrigger",o)("matRippleDisabled",c.disableRipple||c.disabled)("matRippleCentered",true),XE(),Tg("for",c.inputId);}},dependencies:[Oi,Qe],styles:[`.mdc-checkbox {
2
2
  display: inline-block;
3
3
  position: relative;
4
4
  flex: 0 0 18px;
@@ -1 +1 @@
1
- import {I}from'./chunk-GBM7ZdiS.js';import {m}from'./chunk-CK3s5ul2.js';import {g,G,w as we,aI as Tr,bR as ga,u as ue,b as U,A as Aw,aJ as Nb,v as vs,be as aT,l as Ag,k as dl,af as Dg,T as TC,r as Tg,bf as uT,ah as rT,n as eC,ac as mC,t as tC,a9 as dC,aa as If,ab as wf,ag as fT}from'./main-Z5SI5ZVQ.js';import {W as Wn,D as De}from'./chunk-McdsPwbe.js';import'./chunk-CL8NUXXa.js';import'./chunk-BXfg4Cn0.js';import'./chunk-kfNFXWlK.js';var F=()=>[];function L(o,e){if(o&1){let t=dC();vs(0,"agentos-prompt-item",4),Ag("deleteRequested",function(r){If(t);let E=mC(2);return wf(E.deletePrompt(r))}),dl();}o&2&&Tg("prompt",e)("platformMode",true);}function N(o,e){if(o&1&&eC(0,L,1,2,"agentos-prompt-item",3),o&2){let t,n=e.$implicit,r=mC();tC((t=r.resolvePrompt(n.id))?0:-1,t);}}var D=class o{router=g(G);destroyRef=g(we);promptState=g(m);refresh$=new Tr(void 0);prompts$=this.refresh$.pipe(ga(()=>this.promptState.listPlatform()));promptItems$=this.prompts$.pipe(ue(e=>e.map(t=>({id:t.id??"",name:t.name,description:t.description}))));promptsById=new Map;constructor(){this.prompts$.pipe(U(this.destroyRef)).subscribe(e=>{this.promptsById=new Map(e.map(t=>[t.id??"",t]));});}goBack(){this.router.navigate(["/agentos","admin"]);}openCreateForm(){this.router.navigate(["/agentos","admin","prompts","new"]);}deletePrompt(e){this.promptState.delete(e.id??"").pipe(U(this.destroyRef)).subscribe(()=>this.refresh$.next());}resolvePrompt(e){return this.promptsById.get(e)??null}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=Aw({type:o,selectors:[["agentos-platform-prompts"]],decls:5,vars:6,consts:[["promptItemTpl",""],["title","Platform Prompts","emptyMessage","No platform prompts defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[3,"prompt","platformMode"],[3,"deleteRequested","prompt","platformMode"]],template:function(t,n){if(t&1&&(vs(0,"ds-entity-list",1),aT(1,"async"),Ag("createRequested",function(){return n.openCreateForm()}),vs(2,"ds-icon-button",2),Ag("action",function(){return n.goBack()}),dl()(),Dg(3,N,1,1,"ng-template",null,0,fT)),t&2){let r=TC(4);Tg("items",uT(1,3,n.promptItems$)??rT(5,F))("showCreate",true)("itemTemplate",r);}},dependencies:[Wn,I,De,Nb],styles:[".platform-prompts__back[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.platform-prompts__back[_ngcontent-%COMP%]:hover{text-decoration:underline}"]})};export{D as PlatformPromptsComponent};
1
+ import {I}from'./chunk-DbPWDOCY.js';import {m}from'./chunk-DLdFeD2Y.js';import {g,G,w as we,aI as Tr,bR as ga,u as ue,b as U,A as Aw,aJ as Nb,v as vs,be as aT,l as Ag,k as dl,af as Dg,T as TC,r as Tg,bf as uT,ah as rT,n as eC,ac as mC,t as tC,a9 as dC,aa as If,ab as wf,ag as fT}from'./main-RF3N53YL.js';import {W as Wn,S as Se}from'./chunk-BBLhUbcZ.js';import'./chunk-BMgmcV4B.js';import'./chunk-CmdzwND4.js';import'./chunk-BmXT79gZ.js';var F=()=>[];function L(o,e){if(o&1){let t=dC();vs(0,"agentos-prompt-item",4),Ag("deleteRequested",function(r){If(t);let E=mC(2);return wf(E.deletePrompt(r))}),dl();}o&2&&Tg("prompt",e)("platformMode",true);}function N(o,e){if(o&1&&eC(0,L,1,2,"agentos-prompt-item",3),o&2){let t,n=e.$implicit,r=mC();tC((t=r.resolvePrompt(n.id))?0:-1,t);}}var D=class o{router=g(G);destroyRef=g(we);promptState=g(m);refresh$=new Tr(void 0);prompts$=this.refresh$.pipe(ga(()=>this.promptState.listPlatform()));promptItems$=this.prompts$.pipe(ue(e=>e.map(t=>({id:t.id??"",name:t.name,description:t.description}))));promptsById=new Map;constructor(){this.prompts$.pipe(U(this.destroyRef)).subscribe(e=>{this.promptsById=new Map(e.map(t=>[t.id??"",t]));});}goBack(){this.router.navigate(["/agentos","admin"]);}openCreateForm(){this.router.navigate(["/agentos","admin","prompts","new"]);}deletePrompt(e){this.promptState.delete(e.id??"").pipe(U(this.destroyRef)).subscribe(()=>this.refresh$.next());}resolvePrompt(e){return this.promptsById.get(e)??null}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=Aw({type:o,selectors:[["agentos-platform-prompts"]],decls:5,vars:6,consts:[["promptItemTpl",""],["title","Platform Prompts","emptyMessage","No platform prompts defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[3,"prompt","platformMode"],[3,"deleteRequested","prompt","platformMode"]],template:function(t,n){if(t&1&&(vs(0,"ds-entity-list",1),aT(1,"async"),Ag("createRequested",function(){return n.openCreateForm()}),vs(2,"ds-icon-button",2),Ag("action",function(){return n.goBack()}),dl()(),Dg(3,N,1,1,"ng-template",null,0,fT)),t&2){let r=TC(4);Tg("items",uT(1,3,n.promptItems$)??rT(5,F))("showCreate",true)("itemTemplate",r);}},dependencies:[Wn,I,Se,Nb],styles:[".platform-prompts__back[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.platform-prompts__back[_ngcontent-%COMP%]:hover{text-decoration:underline}"]})};export{D as PlatformPromptsComponent};