@whoz-oss/coday-client 0.0.0-workstream-forge.95 → 0.0.0-workstream-forge.97
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/{chunk-BbkpDuKm.js → chunk-1-KrEAQ8.js} +1 -1
- package/browser/{chunk-BgIYpV8F.js → chunk-1ZOpOUaW.js} +1 -1
- package/browser/{chunk-BmcMTmtD.js → chunk-23kAEj3q.js} +1 -1
- package/browser/{chunk-B7-BsDPf.js → chunk-9HWe8Wzy.js} +1 -1
- package/browser/chunk-B7rj3sQ7.js +1 -0
- package/browser/{chunk-BDPQgAAh.js → chunk-BEDBkVgu.js} +1 -1
- package/browser/{chunk-BMUzpXmO.js → chunk-BIcQB7sK.js} +1 -1
- package/browser/{chunk-DoK-l333.js → chunk-BJPaMiDs.js} +1 -1
- package/browser/{chunk-DlxQJ0Wq.js → chunk-BV6wT0T7.js} +1 -1
- package/browser/chunk-BY47yNsu.js +1 -0
- package/browser/{chunk-BuCqp2zT.js → chunk-B_Py0laY.js} +1 -1
- package/browser/{chunk-juX0bStc.js → chunk-BbByOPta.js} +1 -1
- package/browser/{chunk-DL5nsVeX.js → chunk-BbMI-wyK.js} +1 -1
- package/browser/{chunk-BsG3PR--.js → chunk-Bfu0wybG.js} +1 -1
- package/browser/{chunk-BvEhsGlp.js → chunk-Bn4OSece.js} +1 -1
- package/browser/{chunk-D-l8Hr5w.js → chunk-Bxgh-sAQ.js} +1 -1
- package/browser/{chunk-DGq9evlM.js → chunk-C4p5x-Re.js} +1 -1
- package/browser/{chunk-B7sy8z4M.js → chunk-C8fG3ERr.js} +1 -1
- package/browser/{chunk-BJLKDKZZ.js → chunk-CFcZA3SB.js} +1 -1
- package/browser/{chunk-C3Sgc5rR.js → chunk-CHA2XJzk.js} +1 -1
- package/browser/{chunk-CMF1Mk9-.js → chunk-CHNPg49w.js} +1 -1
- package/browser/{chunk-B9bBPCOE.js → chunk-CKYIYMkc.js} +1 -1
- package/browser/{chunk-AB90cbB_.js → chunk-CLfIuVc-.js} +1 -1
- package/browser/{chunk-BBgiMYAx.js → chunk-CNACVa7Q.js} +1 -1
- package/browser/{chunk-Dx5UtZ5A.js → chunk-CNqpO_FY.js} +1 -1
- package/browser/{chunk-D84a_Xjq.js → chunk-CObrRIdZ.js} +1 -1
- package/browser/{chunk-Dn9qyCI-.js → chunk-CPvGhzK5.js} +1 -1
- package/browser/{chunk-DZdAT-59.js → chunk-CS6qKxYt.js} +1 -1
- package/browser/chunk-CUSpXmFJ.js +10 -0
- package/browser/{chunk-DhTfuwxD.js → chunk-CVUqtHak.js} +1 -1
- package/browser/{chunk-CX5D6OMW.js → chunk-CW5ww82f.js} +1 -1
- package/browser/chunk-CZukyo2x.js +2 -0
- package/browser/{chunk-DOy5wwe3.js → chunk-CdDsCzf_.js} +1 -1
- package/browser/{chunk-B-fXjnGz.js → chunk-Cf0_2K6h.js} +1 -1
- package/browser/{chunk-CtPtPfVh.js → chunk-Cf8N4Po0.js} +1 -1
- package/browser/{chunk-CnOd7CqJ.js → chunk-Ch_3uDw1.js} +1 -1
- package/browser/{chunk-D3d5Wakn.js → chunk-CnA_64qx.js} +1 -1
- package/browser/{chunk-DzLzwtOe.js → chunk-Co7LObXe.js} +1 -1
- package/browser/{chunk-DPXq5z3x.js → chunk-CpwsvvJd.js} +1 -1
- package/browser/{chunk-DZ-pYFnN.js → chunk-Cq3Oy7Pe.js} +1 -1
- package/browser/{chunk-CcfHhZEc.js → chunk-CsGeokjB.js} +1 -1
- package/browser/{chunk-DCpiwt2H.js → chunk-CuVobvV0.js} +1 -1
- package/browser/{chunk-C-3vHP5P.js → chunk-Cv0bIOvb.js} +1 -1
- package/browser/{chunk-CmC0cVBl.js → chunk-CvJVgZVG.js} +1 -1
- package/browser/{chunk-D6D0Z7ht.js → chunk-CwSW3sva.js} +1 -1
- package/browser/{chunk-CxSFWP2r.js → chunk-D0VzbRBB.js} +1 -1
- package/browser/{chunk-MAe7L4co.js → chunk-D6XCHufv.js} +1 -1
- package/browser/{chunk-Da3C0oKy.js → chunk-DBtTWzKs.js} +1 -1
- package/browser/{chunk-B9NACwUM.js → chunk-DFWsBx8I.js} +1 -1
- package/browser/chunk-DRsOVECa.js +1 -0
- package/browser/{chunk-MHk6Nl7A.js → chunk-DW3Z2BQ_.js} +1 -1
- package/browser/chunk-DZYWKX3_.js +1 -0
- package/browser/{chunk-CPWl0V02.js → chunk-DcFDoEYa.js} +1 -1
- package/browser/{chunk-JZld8hhU.js → chunk-Di5xhd_-.js} +1 -1
- package/browser/{chunk-SHexpzTz.js → chunk-DiLxoH8g.js} +1 -1
- package/browser/chunk-Dlyg1uqt.js +1 -0
- package/browser/{chunk-CSDBfCII.js → chunk-Dogf5SPS.js} +1 -1
- package/browser/{chunk-C9sVqRdl.js → chunk-DpSzd2vn.js} +1 -1
- package/browser/{chunk-BhUi8VTd.js → chunk-Dvp8jh28.js} +1 -1
- package/browser/{chunk-Cbvrb66H.js → chunk-DwMUe-rB.js} +1 -1
- package/browser/{chunk-C2_EBwWe.js → chunk-DzdxxH9i.js} +1 -1
- package/browser/chunk-M4BGcfDm.js +1 -0
- package/browser/{chunk-9Na9wjEm.js → chunk-REIy3uOh.js} +1 -1
- package/browser/{chunk-D22tCCQt.js → chunk-VWHbjPE5.js} +1 -1
- package/browser/{chunk-Bbxz2alX.js → chunk-_pblMwFh.js} +1 -1
- package/browser/chunk-as8Lizgv.js +1 -0
- package/browser/{chunk-DystVA5E.js → chunk-cK5FIedv.js} +1 -1
- package/browser/chunk-dv1zrw3r.js +1 -0
- package/browser/{chunk-CPfRkt67.js → chunk-ndZvKF70.js} +1 -1
- package/browser/{chunk-QK8tU1La.js → chunk-sYIU2Sow.js} +1 -1
- package/browser/{chunk-C1PnQMtv.js → chunk-x6K9cFDx.js} +1 -1
- package/browser/index.html +1 -1
- package/browser/{main-CB44G2DK.js → main-5MNGHNLY.js} +13 -13
- package/package.json +1 -1
- package/browser/chunk-BAGLvfTc.js +0 -1
- package/browser/chunk-BYz2GJqY.js +0 -1
- package/browser/chunk-BhsX6u7d.js +0 -2
- package/browser/chunk-Cd2wDBwK.js +0 -1
- package/browser/chunk-CigBS2kT.js +0 -11
- package/browser/chunk-DjCoQGhe.js +0 -1
- package/browser/chunk-DywMt_F6.js +0 -1
- package/browser/chunk-KsDoJ6rD.js +0 -1
- package/browser/chunk-ZC1xA4AE.js +0 -1
- package/browser/chunk-ZK5QaNGY.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import {g,F,cb as ZB,cc as qB,G as Gi,m as mT,e as xw,k as ws,n as GC,o as pl,J as Jw,z as Ug,X as XE,a8 as Yg,v as eC,ac as gC,b0 as Qg,a9 as lC,q as Rg,u as bg,aa as If,ab as wf}from'./main-
|
|
1
|
+
import {g,F,cb as ZB,cc as qB,G as Gi,m as mT,e as xw,k as ws,n as GC,o as pl,J as Jw,z as Ug,X as XE,a8 as Yg,v as eC,ac as gC,b0 as Qg,a9 as lC,q as Rg,u as bg,aa as If,ab as wf}from'./main-5MNGHNLY.js';import {c as ni,S as Se}from'./chunk-Ch_3uDw1.js';function A(t,n){t&1&&(ws(0,"span",4),GC(1,"SKILL.md"),pl());}function E(t,n){if(t&1&&(ws(0,"span",5),GC(1),pl()),t&2){let e=gC();XE(),Yg(e.skill().description);}}function T(t,n){if(t&1&&(ws(0,"span",6),GC(1),pl()),t&2){let e=gC();XE(),Qg(" ",e.resourceCount()," ",e.resourceCount()===1?"resource":"resources"," ");}}function B(t,n){if(t&1&&(ws(0,"span",6),GC(1),pl()),t&2){let e=gC();XE(),Qg(" named by ",e.namedByAgents()," ",e.namedByAgents()===1?"agent":"agents"," ");}}function N(t,n){if(t&1&&GC(0),t&2){let e=gC(2);Qg(" Delete? ",e.namedByAgents()," ",e.namedByAgents()===1?"agent":"agents"," would be left naming it. ");}}function V(t,n){t&1&&GC(0," Delete? ");}function K(t,n){if(t&1){let e=lC();ws(0,"span",9),Jw(1,N,1,2)(2,V,1,0),pl(),ws(3,"ds-icon-button",10),Rg("action",function(){If(e);let p=gC();return wf(p.onDeleteConfirmed())}),pl(),ws(4,"ds-icon-button",11),Rg("action",function(){If(e);let p=gC();return wf(p.onDeleteCancelled())}),pl();}if(t&2){let e=gC();XE(),eC(e.namedByAgents()>0?1:2);}}function q(t,n){if(t&1){let e=lC();ws(0,"ds-kebab-menu",12),Rg("itemSelected",function(p){If(e);let P=gC();return wf(P.onMenuAction(p))}),pl();}if(t&2){let e=gC();bg("items",e.isImmutable()?e.readOnlyMenuItems:e.menuItems);}}var D=class t{router=g(F);skill=ZB.required();namespaceId=ZB(void 0);platformMode=ZB(false);readOnly=ZB(false);namedByAgents=ZB(0);deleteRequested=qB();pendingDelete=Gi(false);isImmutable=mT(()=>this.readOnly()||this.skill().readOnly===true);resourceCount=mT(()=>Object.keys(this.skill().resources??{}).length);menuItems=[{key:"inspect",label:"View skill",icon:"search"},{key:"edit",label:"Edit skill",icon:"edit"},{key:"delete",label:"Delete skill",icon:"delete",variant:"danger"}];readOnlyMenuItems=[{key:"inspect",label:"View skill",icon:"search"}];onMenuAction(n){switch(n){case "inspect":this.router.navigate(this.route("inspect"));break;case "edit":this.router.navigate(this.route("edit"));break;case "delete":this.pendingDelete.set(true);break}}onDeleteConfirmed(){this.pendingDelete.set(false),this.deleteRequested.emit(this.skill());}onDeleteCancelled(){this.pendingDelete.set(false);}route(n){let e=this.skill().id??"";return this.platformMode()?["/agentos","admin","skills",e,n]:["/agentos",this.namespaceId()??"","skills",e,n]}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=xw({type:t,selectors:[["agentos-skill-item"]],inputs:{skill:[1,"skill"],namespaceId:[1,"namespaceId"],platformMode:[1,"platformMode"],readOnly:[1,"readOnly"],namedByAgents:[1,"namedByAgents"]},outputs:{deleteRequested:"deleteRequested"},decls:12,vars:8,consts:[["role","listitem",1,"skill-item"],[1,"skill-item__body"],[1,"skill-item__name-row"],[1,"skill-item__name"],["data-variant","neutral","aria-label","Skill defined by a SKILL.md file, read-only through the API",1,"skill-item__badge"],[1,"skill-item__description"],[1,"skill-item__meta"],[1,"skill-item__actions"],[3,"items"],[1,"skill-item__confirm-label"],["icon","check","variant","danger","title","Confirm deletion",3,"action"],["icon","close","title","Cancel deletion",3,"action"],[3,"itemSelected","items"]],template:function(e,a){e&1&&(ws(0,"div",0)(1,"div",1)(2,"div",2)(3,"span",3),GC(4),pl(),Jw(5,A,2,0,"span",4),pl(),Jw(6,E,2,1,"span",5),Jw(7,T,2,2,"span",6),Jw(8,B,2,2,"span",6),pl(),ws(9,"div",7),Jw(10,K,5,1)(11,q,1,1,"ds-kebab-menu",8),pl()()),e&2&&(Ug("skill-item--pending-delete",a.pendingDelete()),XE(4),Yg(a.skill().name),XE(),eC(a.skill().readOnly?5:-1),XE(),eC(a.skill().description?6:-1),XE(),eC(a.resourceCount()>0?7:-1),XE(),eC(a.namedByAgents()>0?8:-1),XE(2),eC(a.pendingDelete()?10:11));},dependencies:[ni,Se],styles:[".skill-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.75rem 1rem;border-radius:10px;border:1px solid var(--color-border, rgba(0, 0, 0, .08));background:var(--glass-bg, rgba(255, 255, 255, .72));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));backdrop-filter:var(--glass-backdrop-blur, blur(20px));transition:background .15s ease,border-color .15s ease}.skill-item[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .04));border-color:var(--color-primary, #007aff)}.skill-item__body[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:.2rem;min-width:0}.skill-item__name-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;min-width:0}.skill-item__name[_ngcontent-%COMP%]{font-size:.95rem;font-weight:500;color:var(--color-text, #1d1d1f);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.skill-item__badge[_ngcontent-%COMP%]{flex-shrink:0;font-family:var(--font-heading);font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:none;border-radius:0;padding:.15rem .5rem;white-space:nowrap}.skill-item__badge[data-variant=neutral][_ngcontent-%COMP%]{border:1px solid var(--color-divider, rgba(0, 0, 0, .12));color:var(--color-neutral-600, #6e6e73);background:transparent}.skill-item__description[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary, #6e6e73);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.skill-item__meta[_ngcontent-%COMP%]{font-size:.7rem;color:var(--color-text-tertiary, #8e8e93)}.skill-item__actions[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:center;gap:.125rem;opacity:0;transition:opacity .15s ease}.skill-item[_ngcontent-%COMP%]:hover .skill-item__actions[_ngcontent-%COMP%], .skill-item[_ngcontent-%COMP%]:focus-within .skill-item__actions[_ngcontent-%COMP%], .skill-item--pending-delete[_ngcontent-%COMP%] .skill-item__actions[_ngcontent-%COMP%]{opacity:1}.skill-item__confirm-label[_ngcontent-%COMP%]{font-size:.8rem;font-weight:500;color:var(--color-error, #ff3b30);margin-right:.25rem;white-space:nowrap}"]})};export{D};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {W as We$1,Q as Qt}from'./chunk-JZld8hhU.js';import {_,b as _e,d as an,E as En}from'./chunk-BDPQgAAh.js';import {aL as wo,aM as Zn,cq as Se,aO as wt$1,g,az as Xt,bs as Tl,bG as p,aT as Ut$1,aP as G,aW as C,cr as QB,m as mT,cs as XB,ct as vi,G as Gi,an as ue,aS as K,bt as Qn,cd as Hf,bR as wd,r as re,au as tv,ae as kt$1,ap as Cd,bP as Wy,cu as tV,e as xw,ce as _b,bA as yC,af as Eg,ag as fT,k as ws,q as Rg,J as Jw,bB as vC,o as pl,X as XE,z as Ug,v as eC,b5 as nT,cv as jg,B as Pg,cw as wC,E as EC,I as IC,cx as Lg,bv as Fg,aZ as js,aR as Fs,cy as si,cz as to,aC as Tu,a_ as QT,c0 as xg,T as Tg,bF as J,b6 as _g,aw as hl,ax as gl,ac as gC,S as Sg,u as bg,t as CC,cA as Mn,aX as D,cB as on,cC as R,cD as Te,n as GC,a8 as Yg,aF as R$1,cE as Dd}from'./main-CB44G2DK.js';var oe=class{_box;_destroyed=new ue;_resizeSubject=new ue;_resizeObserver;_elementObservables=new Map;constructor(l){this._box=l,typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(e=>this._resizeSubject.next(e)));}observe(l){return this._elementObservables.has(l)||this._elementObservables.set(l,new R$1(e=>{let t=this._resizeSubject.subscribe(e);return this._resizeObserver?.observe(l,{box:this._box}),()=>{this._resizeObserver?.unobserve(l),t.unsubscribe(),this._elementObservables.delete(l);}}).pipe(kt$1(e=>e.some(t=>t.target===l)),Dd({bufferSize:1,refCount:true}),Cd(this._destroyed))),this._elementObservables.get(l)}destroy(){this._destroyed.next(),this._destroyed.complete(),this._resizeSubject.complete(),this._elementObservables.clear();}},qe=(()=>{class i{_cleanupErrorListener;_observers=new Map;_ngZone=g(G);constructor(){}ngOnDestroy(){for(let[,e]of this._observers)e.destroy();this._observers.clear(),this._cleanupErrorListener?.();}observe(e,t){let n=t?.box||"content-box";return this._observers.has(n)||this._observers.set(n,new oe(n)),this._observers.get(n).observe(e)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Te({token:i,factory:i.\u0275fac})}return i})();var ut=["notch"],ht=["*"],Ue=["iconPrefixContainer"],We=["textPrefixContainer"],Ge=["iconSuffixContainer"],$e=["textSuffixContainer"],pt=["textField"],_t=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],bt=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];function gt(i,l){i&1&&Sg(0,"span",21);}function vt(i,l){if(i&1&&(ws(0,"label",20),vC(1,1),Jw(2,gt,1,0,"span",21),pl()),i&2){let e=gC(2);bg("floating",e._shouldLabelFloat())("monitorResize",e._hasOutline())("id",e._labelId),Tg("for",e._control.disableAutomaticLabeling?null:e._control.id),XE(2),eC(!e.hideRequiredMarker&&e._control.required?2:-1);}}function xt(i,l){if(i&1&&Jw(0,vt,3,5,"label",20),i&2){let e=gC();eC(e._hasFloatingLabel()?0:-1);}}function yt(i,l){i&1&&Sg(0,"div",7);}function Ft(i,l){}function Ct(i,l){if(i&1&&Eg(0,Ft,0,0,"ng-template",13),i&2){gC(2);let e=CC(1);bg("ngTemplateOutlet",e);}}function wt(i,l){if(i&1&&(ws(0,"div",9),Jw(1,Ct,1,1,null,13),pl()),i&2){let e=gC();bg("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat()),XE(),eC(e._forceDisplayInfixLabel()?-1:1);}}function Mt(i,l){i&1&&(ws(0,"div",10,2),vC(2,2),pl());}function Et(i,l){i&1&&(ws(0,"div",11,3),vC(2,3),pl());}function St(i,l){}function Tt(i,l){if(i&1&&Eg(0,St,0,0,"ng-template",13),i&2){gC();let e=CC(1);bg("ngTemplateOutlet",e);}}function Rt(i,l){i&1&&(ws(0,"div",14,4),vC(2,4),pl());}function Dt(i,l){i&1&&(ws(0,"div",15,5),vC(2,5),pl());}function Nt(i,l){i&1&&Sg(0,"div",16);}function At(i,l){i&1&&(ws(0,"div",18),vC(1,6),pl());}function It(i,l){if(i&1&&(ws(0,"mat-hint",22),GC(1),pl()),i&2){let e=gC(2);bg("id",e._hintLabelId),XE(),Yg(e.hintLabel);}}function Lt(i,l){if(i&1&&(ws(0,"div",19),Jw(1,It,2,2,"mat-hint",22),vC(2,7),Sg(3,"div",23),vC(4,8),pl()),i&2){let e=gC();XE(),eC(e.hintLabel?1:-1);}}var ae=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=js({type:i,selectors:[["mat-label"]]})}return i})(),kt=new C("MatError");var le=(()=>{class i{align="start";id=g(Ut$1).getId("mat-mdc-hint-");static \u0275fac=function(t){return new(t||i)};static \u0275dir=js({type:i,selectors:[["mat-hint"]],hostAttrs:[1,"mat-mdc-form-field-hint","mat-mdc-form-field-bottom-align"],hostVars:4,hostBindings:function(t,n){t&2&&(xg("id",n.id),Tg("align",null),Ug("mat-mdc-form-field-hint-end",n.align==="end"));},inputs:{align:"align",id:"id"}})}return i})(),et=new C("MatPrefix"),Ot=(()=>{class i{set _isTextSelector(e){this._isText=true;}_isText=false;static \u0275fac=function(t){return new(t||i)};static \u0275dir=js({type:i,selectors:[["","matPrefix",""],["","matIconPrefix",""],["","matTextPrefix",""]],inputs:{_isTextSelector:[0,"matTextPrefix","_isTextSelector"]},features:[nT([{provide:et,useExisting:i}])]})}return i})(),tt=new C("MatSuffix"),zt=(()=>{class i{set _isTextSelector(e){this._isText=true;}_isText=false;static \u0275fac=function(t){return new(t||i)};static \u0275dir=js({type:i,selectors:[["","matSuffix",""],["","matIconSuffix",""],["","matTextSuffix",""]],inputs:{_isTextSelector:[0,"matTextSuffix","_isTextSelector"]},features:[nT([{provide:tt,useExisting:i}])]})}return i})(),it=new C("FloatingLabelParent"),Ze=(()=>{class i{_elementRef=g(Xt);get floating(){return this._floating}set floating(e){this._floating=e,this.monitorResize&&this._handleResize();}_floating=false;get monitorResize(){return this._monitorResize}set monitorResize(e){this._monitorResize=e,this._monitorResize?this._subscribeToResize():this._resizeSubscription.unsubscribe();}_monitorResize=false;_resizeObserver=g(qe);_ngZone=g(G);_parent=g(it);_resizeSubscription=new J;ngOnDestroy(){this._resizeSubscription.unsubscribe();}getWidth(){return Pt(this._elementRef.nativeElement)}get element(){return this._elementRef.nativeElement}_handleResize(){setTimeout(()=>this._parent._handleLabelResized());}_subscribeToResize(){this._resizeSubscription.unsubscribe(),this._ngZone.runOutsideAngular(()=>{this._resizeSubscription=this._resizeObserver.observe(this._elementRef.nativeElement,{box:"border-box"}).subscribe(()=>this._handleResize());});}static \u0275fac=function(t){return new(t||i)};static \u0275dir=js({type:i,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(t,n){t&2&&Ug("mdc-floating-label--float-above",n.floating);},inputs:{floating:"floating",monitorResize:"monitorResize"}})}return i})();function Pt(i){let l=i;if(l.offsetParent!==null)return l.scrollWidth;let e=l.cloneNode(true);e.style.setProperty("position","absolute"),e.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(e);let t=e.scrollWidth;return e.remove(),t}var Qe="mdc-line-ripple--active",Z="mdc-line-ripple--deactivating",Xe=(()=>{class i{_elementRef=g(Xt);_cleanupTransitionEnd;constructor(){let e=g(G),t=g(Fs);e.runOutsideAngular(()=>{this._cleanupTransitionEnd=t.listen(this._elementRef.nativeElement,"transitionend",this._handleTransitionEnd);});}activate(){let e=this._elementRef.nativeElement.classList;e.remove(Z),e.add(Qe);}deactivate(){this._elementRef.nativeElement.classList.add(Z);}_handleTransitionEnd=e=>{let t=this._elementRef.nativeElement.classList,n=t.contains(Z);e.propertyName==="opacity"&&n&&t.remove(Qe,Z);};ngOnDestroy(){this._cleanupTransitionEnd();}static \u0275fac=function(t){return new(t||i)};static \u0275dir=js({type:i,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]})}return i})(),Ye=(()=>{class i{_elementRef=g(Xt);_ngZone=g(G);open=false;_notch;ngAfterViewInit(){let e=this._elementRef.nativeElement,t=e.querySelector(".mdc-floating-label");t?(e.classList.add("mdc-notched-outline--upgraded"),typeof requestAnimationFrame=="function"&&(t.style.transitionDuration="0s",this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>t.style.transitionDuration="");}))):e.classList.add("mdc-notched-outline--no-label");}_setNotchWidth(e){let t=this._notch.nativeElement;!this.open||!e?t.style.width="":t.style.width=`calc(${e}px * var(--mat-mdc-form-field-floating-label-scale, 0.75) + 9px)`;}_setMaxWidth(e){this._notch.nativeElement.style.setProperty("--mat-form-field-notch-max-width",`calc(100% - ${e}px)`);}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=xw({type:i,selectors:[["div","matFormFieldNotchedOutline",""]],viewQuery:function(t,n){if(t&1&&Pg(ut,5),t&2){let r;EC(r=IC())&&(n._notch=r.first);}},hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(t,n){t&2&&Ug("mdc-notched-outline--notched",n.open);},inputs:{open:[0,"matFormFieldNotchedOutlineOpen","open"]},ngContentSelectors:ht,decls:5,vars:0,consts:[["notch",""],[1,"mat-mdc-notch-piece","mdc-notched-outline__leading"],[1,"mat-mdc-notch-piece","mdc-notched-outline__notch"],[1,"mat-mdc-notch-piece","mdc-notched-outline__trailing"]],template:function(t,n){t&1&&(yC(),_g(0,"div",1),hl(1,"div",2,0),vC(3),gl(),_g(4,"div",3));},encapsulation:2})}return i})(),de=(()=>{class i{value=null;stateChanges;id;placeholder;ngControl=null;focused=false;empty=false;shouldLabelFloat=false;required=false;disabled=false;errorState=false;controlType;autofilled;userAriaDescribedBy;disableAutomaticLabeling;describedByIds;static \u0275fac=function(t){return new(t||i)};static \u0275dir=js({type:i})}return i})();var se=new C("MatFormField"),Bt=new C("MAT_FORM_FIELD_DEFAULT_OPTIONS"),Ke="fill",Vt="auto",Je="fixed",Ht="translateY(-50%)",nt=(()=>{class i{_elementRef=g(Xt);_changeDetectorRef=g(Tl);_platform=g(p);_idGenerator=g(Ut$1);_ngZone=g(G);_defaults=g(Bt,{optional:true});_currentDirection;_textField;_iconPrefixContainer;_textPrefixContainer;_iconSuffixContainer;_textSuffixContainer;_floatingLabel;_notchedOutline;_lineRipple;_iconPrefixContainerSignal=QB("iconPrefixContainer");_textPrefixContainerSignal=QB("textPrefixContainer");_iconSuffixContainerSignal=QB("iconSuffixContainer");_textSuffixContainerSignal=QB("textSuffixContainer");_prefixSuffixContainers=mT(()=>[this._iconPrefixContainerSignal(),this._textPrefixContainerSignal(),this._iconSuffixContainerSignal(),this._textSuffixContainerSignal()].map(e=>e?.nativeElement).filter(e=>e!==void 0));_formFieldControl;_prefixChildren;_suffixChildren;_errorChildren;_hintChildren;_labelChild=XB(ae);get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(e){this._hideRequiredMarker=vi(e);}_hideRequiredMarker=false;color="primary";get floatLabel(){return this._floatLabel||this._defaults?.floatLabel||Vt}set floatLabel(e){e!==this._floatLabel&&(this._floatLabel=e,this._changeDetectorRef.markForCheck());}_floatLabel;get appearance(){return this._appearanceSignal()}set appearance(e){let t=e||this._defaults?.appearance||Ke;this._appearanceSignal.set(t);}_appearanceSignal=Gi(Ke);get subscriptSizing(){return this._subscriptSizing||this._defaults?.subscriptSizing||Je}set subscriptSizing(e){this._subscriptSizing=e||this._defaults?.subscriptSizing||Je;}_subscriptSizing=null;get hintLabel(){return this._hintLabel}set hintLabel(e){this._hintLabel=e,this._processHints();}_hintLabel="";_hasIconPrefix=false;_hasTextPrefix=false;_hasIconSuffix=false;_hasTextSuffix=false;_labelId=this._idGenerator.getId("mat-mdc-form-field-label-");_hintLabelId=this._idGenerator.getId("mat-mdc-hint-");_describedByIds;get _control(){return this._explicitFormFieldControl||this._formFieldControl}set _control(e){this._explicitFormFieldControl=e;}_destroyed=new ue;_isFocused=null;_explicitFormFieldControl;_previousControl=null;_previousControlValidatorFn=null;_stateChanges;_valueChanges;_describedByChanges;_outlineLabelOffsetResizeObserver=null;_animationsDisabled=K();constructor(){let e=this._defaults,t=g(Qn);e&&(e.appearance&&(this.appearance=e.appearance),this._hideRequiredMarker=!!e?.hideRequiredMarker,e.color&&(this.color=e.color)),Hf(()=>this._currentDirection=t.valueSignal()),this._syncOutlineLabelOffset();}ngAfterViewInit(){this._updateFocusState(),this._animationsDisabled||this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{this._elementRef.nativeElement.classList.add("mat-form-field-animations-enabled");},300);}),this._changeDetectorRef.detectChanges();}ngAfterContentInit(){this._assertFormFieldControl(),this._initializeSubscript(),this._initializePrefixAndSuffix();}ngAfterContentChecked(){this._assertFormFieldControl(),this._control!==this._previousControl&&(this._initializeControl(this._previousControl),this._control.ngControl&&this._control.ngControl.control&&(this._previousControlValidatorFn=this._control.ngControl.control.validator),this._previousControl=this._control),this._control.ngControl&&this._control.ngControl.control&&this._control.ngControl.control.validator!==this._previousControlValidatorFn&&this._changeDetectorRef.markForCheck();}ngOnDestroy(){this._outlineLabelOffsetResizeObserver?.disconnect(),this._stateChanges?.unsubscribe(),this._valueChanges?.unsubscribe(),this._describedByChanges?.unsubscribe(),this._destroyed.next(),this._destroyed.complete();}getLabelId=mT(()=>this._hasFloatingLabel()?this._labelId:null);getConnectedOverlayOrigin(){return this._textField||this._elementRef}_animateAndLockLabel(){this._hasFloatingLabel()&&(this.floatLabel="always");}_initializeControl(e){let t=this._control,n="mat-mdc-form-field-type-";e&&this._elementRef.nativeElement.classList.remove(n+e.controlType),t.controlType&&this._elementRef.nativeElement.classList.add(n+t.controlType),this._stateChanges?.unsubscribe(),this._stateChanges=t.stateChanges.subscribe(()=>{this._updateFocusState(),this._changeDetectorRef.markForCheck();}),this._describedByChanges?.unsubscribe(),this._describedByChanges=t.stateChanges.pipe(wd([void 0,void 0]),re(()=>[t.errorState,t.userAriaDescribedBy]),tv(),kt$1(([[r,a],[s,C]])=>r!==s||a!==C)).subscribe(()=>this._syncDescribedByIds()),this._valueChanges?.unsubscribe(),t.ngControl&&t.ngControl.valueChanges&&(this._valueChanges=t.ngControl.valueChanges.pipe(Cd(this._destroyed)).subscribe(()=>this._changeDetectorRef.markForCheck()));}_checkPrefixAndSuffixTypes(){this._hasIconPrefix=!!this._prefixChildren.find(e=>!e._isText),this._hasTextPrefix=!!this._prefixChildren.find(e=>e._isText),this._hasIconSuffix=!!this._suffixChildren.find(e=>!e._isText),this._hasTextSuffix=!!this._suffixChildren.find(e=>e._isText);}_initializePrefixAndSuffix(){this._checkPrefixAndSuffixTypes(),Wy(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(()=>{this._checkPrefixAndSuffixTypes(),this._changeDetectorRef.markForCheck();});}_initializeSubscript(){this._hintChildren.changes.subscribe(()=>{this._processHints(),this._changeDetectorRef.markForCheck();}),this._errorChildren.changes.subscribe(()=>{this._syncDescribedByIds(),this._changeDetectorRef.markForCheck();}),this._validateHints(),this._syncDescribedByIds();}_assertFormFieldControl(){this._control;}_updateFocusState(){let e=this._control.focused;e&&!this._isFocused?(this._isFocused=true,this._lineRipple?.activate()):!e&&(this._isFocused||this._isFocused===null)&&(this._isFocused=false,this._lineRipple?.deactivate()),this._elementRef.nativeElement.classList.toggle("mat-focused",e),this._textField?.nativeElement.classList.toggle("mdc-text-field--focused",e);}_syncOutlineLabelOffset(){tV({earlyRead:()=>{if(this._appearanceSignal()!=="outline")return this._outlineLabelOffsetResizeObserver?.disconnect(),null;if(globalThis.ResizeObserver){this._outlineLabelOffsetResizeObserver||=new globalThis.ResizeObserver(()=>{this._writeOutlinedLabelStyles(this._getOutlinedLabelOffset());});for(let e of this._prefixSuffixContainers())this._outlineLabelOffsetResizeObserver.observe(e,{box:"border-box"});}return this._getOutlinedLabelOffset()},write:e=>this._writeOutlinedLabelStyles(e())});}_shouldAlwaysFloat(){return this.floatLabel==="always"}_hasOutline(){return this.appearance==="outline"}_forceDisplayInfixLabel(){return !this._platform.isBrowser&&this._prefixChildren.length&&!this._shouldLabelFloat()}_hasFloatingLabel=mT(()=>!!this._labelChild());_shouldLabelFloat(){return this._hasFloatingLabel()?this._control.shouldLabelFloat||this._shouldAlwaysFloat():false}_shouldForward(e){let t=this._control?this._control.ngControl:null;return t&&t[e]}_getSubscriptMessageType(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_handleLabelResized(){this._refreshOutlineNotchWidth();}_refreshOutlineNotchWidth(){!this._hasOutline()||!this._floatingLabel||!this._shouldLabelFloat()?this._notchedOutline?._setNotchWidth(0):this._notchedOutline?._setNotchWidth(this._floatingLabel.getWidth());}_processHints(){this._validateHints(),this._syncDescribedByIds();}_validateHints(){this._hintChildren;}_syncDescribedByIds(){if(this._control){let e=[];if(this._control.userAriaDescribedBy&&typeof this._control.userAriaDescribedBy=="string"&&e.push(...this._control.userAriaDescribedBy.split(" ")),this._getSubscriptMessageType()==="hint"){let r=this._hintChildren?this._hintChildren.find(s=>s.align==="start"):null,a=this._hintChildren?this._hintChildren.find(s=>s.align==="end"):null;r?e.push(r.id):this._hintLabel&&e.push(this._hintLabelId),a&&e.push(a.id);}else this._errorChildren&&e.push(...this._errorChildren.map(r=>r.id));let t=this._control.describedByIds,n;if(t){let r=this._describedByIds||e;n=e.concat(t.filter(a=>a&&!r.includes(a)));}else n=e;this._control.setDescribedByIds(n),this._describedByIds=e;}}_getOutlinedLabelOffset(){if(!this._hasOutline()||!this._floatingLabel)return null;if(!this._iconPrefixContainer&&!this._textPrefixContainer)return ["",null];if(!this._isAttachedToDom())return null;let e=this._iconPrefixContainer?.nativeElement,t=this._textPrefixContainer?.nativeElement,n=this._iconSuffixContainer?.nativeElement,r=this._textSuffixContainer?.nativeElement,a=e?.getBoundingClientRect().width??0,s=t?.getBoundingClientRect().width??0,C=n?.getBoundingClientRect().width??0,M=r?.getBoundingClientRect().width??0,dt=this._currentDirection==="rtl"?"-1":"1",st=`${a+s}px`,ct=`calc(${dt} * (${st} + var(--mat-mdc-form-field-label-offset-x, 0px)))`,ft=`var(--mat-mdc-form-field-label-transform, ${Ht} translateX(${ct}))`,mt=a+s+C+M;return [ft,mt]}_writeOutlinedLabelStyles(e){if(e!==null){let[t,n]=e;this._floatingLabel&&(this._floatingLabel.element.style.transform=t),n!==null&&this._notchedOutline?._setMaxWidth(n);}}_isAttachedToDom(){let e=this._elementRef.nativeElement;if(e.getRootNode){let t=e.getRootNode();return t&&t!==e}return document.documentElement.contains(e)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=xw({type:i,selectors:[["mat-form-field"]],contentQueries:function(t,n,r){if(t&1&&(Lg(r,n._labelChild,ae,5),Fg(r,de,5)(r,et,5)(r,tt,5)(r,kt,5)(r,le,5)),t&2){wC();let a;EC(a=IC())&&(n._formFieldControl=a.first),EC(a=IC())&&(n._prefixChildren=a),EC(a=IC())&&(n._suffixChildren=a),EC(a=IC())&&(n._errorChildren=a),EC(a=IC())&&(n._hintChildren=a);}},viewQuery:function(t,n){if(t&1&&(jg(n._iconPrefixContainerSignal,Ue,5)(n._textPrefixContainerSignal,We,5)(n._iconSuffixContainerSignal,Ge,5)(n._textSuffixContainerSignal,$e,5),Pg(pt,5)(Ue,5)(We,5)(Ge,5)($e,5)(Ze,5)(Ye,5)(Xe,5)),t&2){wC(4);let r;EC(r=IC())&&(n._textField=r.first),EC(r=IC())&&(n._iconPrefixContainer=r.first),EC(r=IC())&&(n._textPrefixContainer=r.first),EC(r=IC())&&(n._iconSuffixContainer=r.first),EC(r=IC())&&(n._textSuffixContainer=r.first),EC(r=IC())&&(n._floatingLabel=r.first),EC(r=IC())&&(n._notchedOutline=r.first),EC(r=IC())&&(n._lineRipple=r.first);}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:38,hostBindings:function(t,n){t&2&&Ug("mat-mdc-form-field-label-always-float",n._shouldAlwaysFloat())("mat-mdc-form-field-has-icon-prefix",n._hasIconPrefix)("mat-mdc-form-field-has-icon-suffix",n._hasIconSuffix)("mat-form-field-invalid",n._control.errorState)("mat-form-field-disabled",n._control.disabled)("mat-form-field-autofilled",n._control.autofilled)("mat-form-field-appearance-fill",n.appearance=="fill")("mat-form-field-appearance-outline",n.appearance=="outline")("mat-form-field-hide-placeholder",n._hasFloatingLabel()&&!n._shouldLabelFloat())("mat-primary",n.color!=="accent"&&n.color!=="warn")("mat-accent",n.color==="accent")("mat-warn",n.color==="warn")("ng-untouched",n._shouldForward("untouched"))("ng-touched",n._shouldForward("touched"))("ng-pristine",n._shouldForward("pristine"))("ng-dirty",n._shouldForward("dirty"))("ng-valid",n._shouldForward("valid"))("ng-invalid",n._shouldForward("invalid"))("ng-pending",n._shouldForward("pending"));},inputs:{hideRequiredMarker:"hideRequiredMarker",color:"color",floatLabel:"floatLabel",appearance:"appearance",subscriptSizing:"subscriptSizing",hintLabel:"hintLabel"},exportAs:["matFormField"],features:[nT([{provide:se,useExisting:i},{provide:it,useExisting:i}])],ngContentSelectors:bt,decls:18,vars:21,consts:[["labelTemplate",""],["textField",""],["iconPrefixContainer",""],["textPrefixContainer",""],["textSuffixContainer",""],["iconSuffixContainer",""],[1,"mat-mdc-text-field-wrapper","mdc-text-field",3,"click"],[1,"mat-mdc-form-field-focus-overlay"],[1,"mat-mdc-form-field-flex"],["matFormFieldNotchedOutline","",3,"matFormFieldNotchedOutlineOpen"],[1,"mat-mdc-form-field-icon-prefix"],[1,"mat-mdc-form-field-text-prefix"],[1,"mat-mdc-form-field-infix"],[3,"ngTemplateOutlet"],[1,"mat-mdc-form-field-text-suffix"],[1,"mat-mdc-form-field-icon-suffix"],["matFormFieldLineRipple",""],["aria-atomic","true","aria-live","polite",1,"mat-mdc-form-field-subscript-wrapper","mat-mdc-form-field-bottom-align"],[1,"mat-mdc-form-field-error-wrapper"],[1,"mat-mdc-form-field-hint-wrapper"],["matFormFieldFloatingLabel","",3,"floating","monitorResize","id"],["aria-hidden","true",1,"mat-mdc-form-field-required-marker","mdc-floating-label--required"],[3,"id"],[1,"mat-mdc-form-field-hint-spacer"]],template:function(t,n){if(t&1&&(yC(_t),Eg(0,xt,1,1,"ng-template",null,0,fT),ws(2,"div",6,1),Rg("click",function(a){return n._control.onContainerClick(a)}),Jw(4,yt,1,0,"div",7),ws(5,"div",8),Jw(6,wt,2,2,"div",9),Jw(7,Mt,3,0,"div",10),Jw(8,Et,3,0,"div",11),ws(9,"div",12),Jw(10,Tt,1,1,null,13),vC(11),pl(),Jw(12,Rt,3,0,"div",14),Jw(13,Dt,3,0,"div",15),pl(),Jw(14,Nt,1,0,"div",16),pl(),ws(15,"div",17),Jw(16,At,2,0,"div",18)(17,Lt,5,1,"div",19),pl()),t&2){let r;XE(2),Ug("mdc-text-field--filled",!n._hasOutline())("mdc-text-field--outlined",n._hasOutline())("mdc-text-field--no-label",!n._hasFloatingLabel())("mdc-text-field--disabled",n._control.disabled)("mdc-text-field--invalid",n._control.errorState),XE(2),eC(!n._hasOutline()&&!n._control.disabled?4:-1),XE(2),eC(n._hasOutline()?6:-1),XE(),eC(n._hasIconPrefix?7:-1),XE(),eC(n._hasTextPrefix?8:-1),XE(2),eC(!n._hasOutline()||n._forceDisplayInfixLabel()?10:-1),XE(2),eC(n._hasTextSuffix?12:-1),XE(),eC(n._hasIconSuffix?13:-1),XE(),eC(n._hasOutline()?-1:14),XE(),Ug("mat-mdc-form-field-subscript-dynamic-size",n.subscriptSizing==="dynamic");let a=n._getSubscriptMessageType();XE(),eC((r=a)==="error"?16:r==="hint"?17:-1);}},dependencies:[Ze,Ye,_b,Xe,le],styles:[`.mdc-text-field {
|
|
1
|
+
import {W as We$1,Q as Qt}from'./chunk-Di5xhd_-.js';import {_,b as _e,d as an,E as En}from'./chunk-BEDBkVgu.js';import {aL as wo,aM as Zn,cq as Se,aO as wt$1,g,az as Xt,bs as Tl,bG as p,aT as Ut$1,aP as G,aW as C,cr as QB,m as mT,cs as XB,ct as vi,G as Gi,an as ue,aS as K,bt as Qn,cd as Hf,bR as wd,r as re,au as tv,ae as kt$1,ap as Cd,bP as Wy,cu as tV,e as xw,ce as _b,bA as yC,af as Eg,ag as fT,k as ws,q as Rg,J as Jw,bB as vC,o as pl,X as XE,z as Ug,v as eC,b5 as nT,cv as jg,B as Pg,cw as wC,E as EC,I as IC,cx as Lg,bv as Fg,aZ as js,aR as Fs,cy as si,cz as to,aC as Tu,a_ as QT,c0 as xg,T as Tg,bF as J,b6 as _g,aw as hl,ax as gl,ac as gC,S as Sg,u as bg,t as CC,cA as Mn,aX as D,cB as on,cC as R,cD as Te,n as GC,a8 as Yg,aF as R$1,cE as Dd}from'./main-5MNGHNLY.js';var oe=class{_box;_destroyed=new ue;_resizeSubject=new ue;_resizeObserver;_elementObservables=new Map;constructor(l){this._box=l,typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(e=>this._resizeSubject.next(e)));}observe(l){return this._elementObservables.has(l)||this._elementObservables.set(l,new R$1(e=>{let t=this._resizeSubject.subscribe(e);return this._resizeObserver?.observe(l,{box:this._box}),()=>{this._resizeObserver?.unobserve(l),t.unsubscribe(),this._elementObservables.delete(l);}}).pipe(kt$1(e=>e.some(t=>t.target===l)),Dd({bufferSize:1,refCount:true}),Cd(this._destroyed))),this._elementObservables.get(l)}destroy(){this._destroyed.next(),this._destroyed.complete(),this._resizeSubject.complete(),this._elementObservables.clear();}},qe=(()=>{class i{_cleanupErrorListener;_observers=new Map;_ngZone=g(G);constructor(){}ngOnDestroy(){for(let[,e]of this._observers)e.destroy();this._observers.clear(),this._cleanupErrorListener?.();}observe(e,t){let n=t?.box||"content-box";return this._observers.has(n)||this._observers.set(n,new oe(n)),this._observers.get(n).observe(e)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Te({token:i,factory:i.\u0275fac})}return i})();var ut=["notch"],ht=["*"],Ue=["iconPrefixContainer"],We=["textPrefixContainer"],Ge=["iconSuffixContainer"],$e=["textSuffixContainer"],pt=["textField"],_t=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],bt=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];function gt(i,l){i&1&&Sg(0,"span",21);}function vt(i,l){if(i&1&&(ws(0,"label",20),vC(1,1),Jw(2,gt,1,0,"span",21),pl()),i&2){let e=gC(2);bg("floating",e._shouldLabelFloat())("monitorResize",e._hasOutline())("id",e._labelId),Tg("for",e._control.disableAutomaticLabeling?null:e._control.id),XE(2),eC(!e.hideRequiredMarker&&e._control.required?2:-1);}}function xt(i,l){if(i&1&&Jw(0,vt,3,5,"label",20),i&2){let e=gC();eC(e._hasFloatingLabel()?0:-1);}}function yt(i,l){i&1&&Sg(0,"div",7);}function Ft(i,l){}function Ct(i,l){if(i&1&&Eg(0,Ft,0,0,"ng-template",13),i&2){gC(2);let e=CC(1);bg("ngTemplateOutlet",e);}}function wt(i,l){if(i&1&&(ws(0,"div",9),Jw(1,Ct,1,1,null,13),pl()),i&2){let e=gC();bg("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat()),XE(),eC(e._forceDisplayInfixLabel()?-1:1);}}function Mt(i,l){i&1&&(ws(0,"div",10,2),vC(2,2),pl());}function Et(i,l){i&1&&(ws(0,"div",11,3),vC(2,3),pl());}function St(i,l){}function Tt(i,l){if(i&1&&Eg(0,St,0,0,"ng-template",13),i&2){gC();let e=CC(1);bg("ngTemplateOutlet",e);}}function Rt(i,l){i&1&&(ws(0,"div",14,4),vC(2,4),pl());}function Dt(i,l){i&1&&(ws(0,"div",15,5),vC(2,5),pl());}function Nt(i,l){i&1&&Sg(0,"div",16);}function At(i,l){i&1&&(ws(0,"div",18),vC(1,6),pl());}function It(i,l){if(i&1&&(ws(0,"mat-hint",22),GC(1),pl()),i&2){let e=gC(2);bg("id",e._hintLabelId),XE(),Yg(e.hintLabel);}}function Lt(i,l){if(i&1&&(ws(0,"div",19),Jw(1,It,2,2,"mat-hint",22),vC(2,7),Sg(3,"div",23),vC(4,8),pl()),i&2){let e=gC();XE(),eC(e.hintLabel?1:-1);}}var ae=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=js({type:i,selectors:[["mat-label"]]})}return i})(),kt=new C("MatError");var le=(()=>{class i{align="start";id=g(Ut$1).getId("mat-mdc-hint-");static \u0275fac=function(t){return new(t||i)};static \u0275dir=js({type:i,selectors:[["mat-hint"]],hostAttrs:[1,"mat-mdc-form-field-hint","mat-mdc-form-field-bottom-align"],hostVars:4,hostBindings:function(t,n){t&2&&(xg("id",n.id),Tg("align",null),Ug("mat-mdc-form-field-hint-end",n.align==="end"));},inputs:{align:"align",id:"id"}})}return i})(),et=new C("MatPrefix"),Ot=(()=>{class i{set _isTextSelector(e){this._isText=true;}_isText=false;static \u0275fac=function(t){return new(t||i)};static \u0275dir=js({type:i,selectors:[["","matPrefix",""],["","matIconPrefix",""],["","matTextPrefix",""]],inputs:{_isTextSelector:[0,"matTextPrefix","_isTextSelector"]},features:[nT([{provide:et,useExisting:i}])]})}return i})(),tt=new C("MatSuffix"),zt=(()=>{class i{set _isTextSelector(e){this._isText=true;}_isText=false;static \u0275fac=function(t){return new(t||i)};static \u0275dir=js({type:i,selectors:[["","matSuffix",""],["","matIconSuffix",""],["","matTextSuffix",""]],inputs:{_isTextSelector:[0,"matTextSuffix","_isTextSelector"]},features:[nT([{provide:tt,useExisting:i}])]})}return i})(),it=new C("FloatingLabelParent"),Ze=(()=>{class i{_elementRef=g(Xt);get floating(){return this._floating}set floating(e){this._floating=e,this.monitorResize&&this._handleResize();}_floating=false;get monitorResize(){return this._monitorResize}set monitorResize(e){this._monitorResize=e,this._monitorResize?this._subscribeToResize():this._resizeSubscription.unsubscribe();}_monitorResize=false;_resizeObserver=g(qe);_ngZone=g(G);_parent=g(it);_resizeSubscription=new J;ngOnDestroy(){this._resizeSubscription.unsubscribe();}getWidth(){return Pt(this._elementRef.nativeElement)}get element(){return this._elementRef.nativeElement}_handleResize(){setTimeout(()=>this._parent._handleLabelResized());}_subscribeToResize(){this._resizeSubscription.unsubscribe(),this._ngZone.runOutsideAngular(()=>{this._resizeSubscription=this._resizeObserver.observe(this._elementRef.nativeElement,{box:"border-box"}).subscribe(()=>this._handleResize());});}static \u0275fac=function(t){return new(t||i)};static \u0275dir=js({type:i,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(t,n){t&2&&Ug("mdc-floating-label--float-above",n.floating);},inputs:{floating:"floating",monitorResize:"monitorResize"}})}return i})();function Pt(i){let l=i;if(l.offsetParent!==null)return l.scrollWidth;let e=l.cloneNode(true);e.style.setProperty("position","absolute"),e.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(e);let t=e.scrollWidth;return e.remove(),t}var Qe="mdc-line-ripple--active",Z="mdc-line-ripple--deactivating",Xe=(()=>{class i{_elementRef=g(Xt);_cleanupTransitionEnd;constructor(){let e=g(G),t=g(Fs);e.runOutsideAngular(()=>{this._cleanupTransitionEnd=t.listen(this._elementRef.nativeElement,"transitionend",this._handleTransitionEnd);});}activate(){let e=this._elementRef.nativeElement.classList;e.remove(Z),e.add(Qe);}deactivate(){this._elementRef.nativeElement.classList.add(Z);}_handleTransitionEnd=e=>{let t=this._elementRef.nativeElement.classList,n=t.contains(Z);e.propertyName==="opacity"&&n&&t.remove(Qe,Z);};ngOnDestroy(){this._cleanupTransitionEnd();}static \u0275fac=function(t){return new(t||i)};static \u0275dir=js({type:i,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]})}return i})(),Ye=(()=>{class i{_elementRef=g(Xt);_ngZone=g(G);open=false;_notch;ngAfterViewInit(){let e=this._elementRef.nativeElement,t=e.querySelector(".mdc-floating-label");t?(e.classList.add("mdc-notched-outline--upgraded"),typeof requestAnimationFrame=="function"&&(t.style.transitionDuration="0s",this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>t.style.transitionDuration="");}))):e.classList.add("mdc-notched-outline--no-label");}_setNotchWidth(e){let t=this._notch.nativeElement;!this.open||!e?t.style.width="":t.style.width=`calc(${e}px * var(--mat-mdc-form-field-floating-label-scale, 0.75) + 9px)`;}_setMaxWidth(e){this._notch.nativeElement.style.setProperty("--mat-form-field-notch-max-width",`calc(100% - ${e}px)`);}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=xw({type:i,selectors:[["div","matFormFieldNotchedOutline",""]],viewQuery:function(t,n){if(t&1&&Pg(ut,5),t&2){let r;EC(r=IC())&&(n._notch=r.first);}},hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(t,n){t&2&&Ug("mdc-notched-outline--notched",n.open);},inputs:{open:[0,"matFormFieldNotchedOutlineOpen","open"]},ngContentSelectors:ht,decls:5,vars:0,consts:[["notch",""],[1,"mat-mdc-notch-piece","mdc-notched-outline__leading"],[1,"mat-mdc-notch-piece","mdc-notched-outline__notch"],[1,"mat-mdc-notch-piece","mdc-notched-outline__trailing"]],template:function(t,n){t&1&&(yC(),_g(0,"div",1),hl(1,"div",2,0),vC(3),gl(),_g(4,"div",3));},encapsulation:2})}return i})(),de=(()=>{class i{value=null;stateChanges;id;placeholder;ngControl=null;focused=false;empty=false;shouldLabelFloat=false;required=false;disabled=false;errorState=false;controlType;autofilled;userAriaDescribedBy;disableAutomaticLabeling;describedByIds;static \u0275fac=function(t){return new(t||i)};static \u0275dir=js({type:i})}return i})();var se=new C("MatFormField"),Bt=new C("MAT_FORM_FIELD_DEFAULT_OPTIONS"),Ke="fill",Vt="auto",Je="fixed",Ht="translateY(-50%)",nt=(()=>{class i{_elementRef=g(Xt);_changeDetectorRef=g(Tl);_platform=g(p);_idGenerator=g(Ut$1);_ngZone=g(G);_defaults=g(Bt,{optional:true});_currentDirection;_textField;_iconPrefixContainer;_textPrefixContainer;_iconSuffixContainer;_textSuffixContainer;_floatingLabel;_notchedOutline;_lineRipple;_iconPrefixContainerSignal=QB("iconPrefixContainer");_textPrefixContainerSignal=QB("textPrefixContainer");_iconSuffixContainerSignal=QB("iconSuffixContainer");_textSuffixContainerSignal=QB("textSuffixContainer");_prefixSuffixContainers=mT(()=>[this._iconPrefixContainerSignal(),this._textPrefixContainerSignal(),this._iconSuffixContainerSignal(),this._textSuffixContainerSignal()].map(e=>e?.nativeElement).filter(e=>e!==void 0));_formFieldControl;_prefixChildren;_suffixChildren;_errorChildren;_hintChildren;_labelChild=XB(ae);get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(e){this._hideRequiredMarker=vi(e);}_hideRequiredMarker=false;color="primary";get floatLabel(){return this._floatLabel||this._defaults?.floatLabel||Vt}set floatLabel(e){e!==this._floatLabel&&(this._floatLabel=e,this._changeDetectorRef.markForCheck());}_floatLabel;get appearance(){return this._appearanceSignal()}set appearance(e){let t=e||this._defaults?.appearance||Ke;this._appearanceSignal.set(t);}_appearanceSignal=Gi(Ke);get subscriptSizing(){return this._subscriptSizing||this._defaults?.subscriptSizing||Je}set subscriptSizing(e){this._subscriptSizing=e||this._defaults?.subscriptSizing||Je;}_subscriptSizing=null;get hintLabel(){return this._hintLabel}set hintLabel(e){this._hintLabel=e,this._processHints();}_hintLabel="";_hasIconPrefix=false;_hasTextPrefix=false;_hasIconSuffix=false;_hasTextSuffix=false;_labelId=this._idGenerator.getId("mat-mdc-form-field-label-");_hintLabelId=this._idGenerator.getId("mat-mdc-hint-");_describedByIds;get _control(){return this._explicitFormFieldControl||this._formFieldControl}set _control(e){this._explicitFormFieldControl=e;}_destroyed=new ue;_isFocused=null;_explicitFormFieldControl;_previousControl=null;_previousControlValidatorFn=null;_stateChanges;_valueChanges;_describedByChanges;_outlineLabelOffsetResizeObserver=null;_animationsDisabled=K();constructor(){let e=this._defaults,t=g(Qn);e&&(e.appearance&&(this.appearance=e.appearance),this._hideRequiredMarker=!!e?.hideRequiredMarker,e.color&&(this.color=e.color)),Hf(()=>this._currentDirection=t.valueSignal()),this._syncOutlineLabelOffset();}ngAfterViewInit(){this._updateFocusState(),this._animationsDisabled||this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{this._elementRef.nativeElement.classList.add("mat-form-field-animations-enabled");},300);}),this._changeDetectorRef.detectChanges();}ngAfterContentInit(){this._assertFormFieldControl(),this._initializeSubscript(),this._initializePrefixAndSuffix();}ngAfterContentChecked(){this._assertFormFieldControl(),this._control!==this._previousControl&&(this._initializeControl(this._previousControl),this._control.ngControl&&this._control.ngControl.control&&(this._previousControlValidatorFn=this._control.ngControl.control.validator),this._previousControl=this._control),this._control.ngControl&&this._control.ngControl.control&&this._control.ngControl.control.validator!==this._previousControlValidatorFn&&this._changeDetectorRef.markForCheck();}ngOnDestroy(){this._outlineLabelOffsetResizeObserver?.disconnect(),this._stateChanges?.unsubscribe(),this._valueChanges?.unsubscribe(),this._describedByChanges?.unsubscribe(),this._destroyed.next(),this._destroyed.complete();}getLabelId=mT(()=>this._hasFloatingLabel()?this._labelId:null);getConnectedOverlayOrigin(){return this._textField||this._elementRef}_animateAndLockLabel(){this._hasFloatingLabel()&&(this.floatLabel="always");}_initializeControl(e){let t=this._control,n="mat-mdc-form-field-type-";e&&this._elementRef.nativeElement.classList.remove(n+e.controlType),t.controlType&&this._elementRef.nativeElement.classList.add(n+t.controlType),this._stateChanges?.unsubscribe(),this._stateChanges=t.stateChanges.subscribe(()=>{this._updateFocusState(),this._changeDetectorRef.markForCheck();}),this._describedByChanges?.unsubscribe(),this._describedByChanges=t.stateChanges.pipe(wd([void 0,void 0]),re(()=>[t.errorState,t.userAriaDescribedBy]),tv(),kt$1(([[r,a],[s,C]])=>r!==s||a!==C)).subscribe(()=>this._syncDescribedByIds()),this._valueChanges?.unsubscribe(),t.ngControl&&t.ngControl.valueChanges&&(this._valueChanges=t.ngControl.valueChanges.pipe(Cd(this._destroyed)).subscribe(()=>this._changeDetectorRef.markForCheck()));}_checkPrefixAndSuffixTypes(){this._hasIconPrefix=!!this._prefixChildren.find(e=>!e._isText),this._hasTextPrefix=!!this._prefixChildren.find(e=>e._isText),this._hasIconSuffix=!!this._suffixChildren.find(e=>!e._isText),this._hasTextSuffix=!!this._suffixChildren.find(e=>e._isText);}_initializePrefixAndSuffix(){this._checkPrefixAndSuffixTypes(),Wy(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(()=>{this._checkPrefixAndSuffixTypes(),this._changeDetectorRef.markForCheck();});}_initializeSubscript(){this._hintChildren.changes.subscribe(()=>{this._processHints(),this._changeDetectorRef.markForCheck();}),this._errorChildren.changes.subscribe(()=>{this._syncDescribedByIds(),this._changeDetectorRef.markForCheck();}),this._validateHints(),this._syncDescribedByIds();}_assertFormFieldControl(){this._control;}_updateFocusState(){let e=this._control.focused;e&&!this._isFocused?(this._isFocused=true,this._lineRipple?.activate()):!e&&(this._isFocused||this._isFocused===null)&&(this._isFocused=false,this._lineRipple?.deactivate()),this._elementRef.nativeElement.classList.toggle("mat-focused",e),this._textField?.nativeElement.classList.toggle("mdc-text-field--focused",e);}_syncOutlineLabelOffset(){tV({earlyRead:()=>{if(this._appearanceSignal()!=="outline")return this._outlineLabelOffsetResizeObserver?.disconnect(),null;if(globalThis.ResizeObserver){this._outlineLabelOffsetResizeObserver||=new globalThis.ResizeObserver(()=>{this._writeOutlinedLabelStyles(this._getOutlinedLabelOffset());});for(let e of this._prefixSuffixContainers())this._outlineLabelOffsetResizeObserver.observe(e,{box:"border-box"});}return this._getOutlinedLabelOffset()},write:e=>this._writeOutlinedLabelStyles(e())});}_shouldAlwaysFloat(){return this.floatLabel==="always"}_hasOutline(){return this.appearance==="outline"}_forceDisplayInfixLabel(){return !this._platform.isBrowser&&this._prefixChildren.length&&!this._shouldLabelFloat()}_hasFloatingLabel=mT(()=>!!this._labelChild());_shouldLabelFloat(){return this._hasFloatingLabel()?this._control.shouldLabelFloat||this._shouldAlwaysFloat():false}_shouldForward(e){let t=this._control?this._control.ngControl:null;return t&&t[e]}_getSubscriptMessageType(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_handleLabelResized(){this._refreshOutlineNotchWidth();}_refreshOutlineNotchWidth(){!this._hasOutline()||!this._floatingLabel||!this._shouldLabelFloat()?this._notchedOutline?._setNotchWidth(0):this._notchedOutline?._setNotchWidth(this._floatingLabel.getWidth());}_processHints(){this._validateHints(),this._syncDescribedByIds();}_validateHints(){this._hintChildren;}_syncDescribedByIds(){if(this._control){let e=[];if(this._control.userAriaDescribedBy&&typeof this._control.userAriaDescribedBy=="string"&&e.push(...this._control.userAriaDescribedBy.split(" ")),this._getSubscriptMessageType()==="hint"){let r=this._hintChildren?this._hintChildren.find(s=>s.align==="start"):null,a=this._hintChildren?this._hintChildren.find(s=>s.align==="end"):null;r?e.push(r.id):this._hintLabel&&e.push(this._hintLabelId),a&&e.push(a.id);}else this._errorChildren&&e.push(...this._errorChildren.map(r=>r.id));let t=this._control.describedByIds,n;if(t){let r=this._describedByIds||e;n=e.concat(t.filter(a=>a&&!r.includes(a)));}else n=e;this._control.setDescribedByIds(n),this._describedByIds=e;}}_getOutlinedLabelOffset(){if(!this._hasOutline()||!this._floatingLabel)return null;if(!this._iconPrefixContainer&&!this._textPrefixContainer)return ["",null];if(!this._isAttachedToDom())return null;let e=this._iconPrefixContainer?.nativeElement,t=this._textPrefixContainer?.nativeElement,n=this._iconSuffixContainer?.nativeElement,r=this._textSuffixContainer?.nativeElement,a=e?.getBoundingClientRect().width??0,s=t?.getBoundingClientRect().width??0,C=n?.getBoundingClientRect().width??0,M=r?.getBoundingClientRect().width??0,dt=this._currentDirection==="rtl"?"-1":"1",st=`${a+s}px`,ct=`calc(${dt} * (${st} + var(--mat-mdc-form-field-label-offset-x, 0px)))`,ft=`var(--mat-mdc-form-field-label-transform, ${Ht} translateX(${ct}))`,mt=a+s+C+M;return [ft,mt]}_writeOutlinedLabelStyles(e){if(e!==null){let[t,n]=e;this._floatingLabel&&(this._floatingLabel.element.style.transform=t),n!==null&&this._notchedOutline?._setMaxWidth(n);}}_isAttachedToDom(){let e=this._elementRef.nativeElement;if(e.getRootNode){let t=e.getRootNode();return t&&t!==e}return document.documentElement.contains(e)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=xw({type:i,selectors:[["mat-form-field"]],contentQueries:function(t,n,r){if(t&1&&(Lg(r,n._labelChild,ae,5),Fg(r,de,5)(r,et,5)(r,tt,5)(r,kt,5)(r,le,5)),t&2){wC();let a;EC(a=IC())&&(n._formFieldControl=a.first),EC(a=IC())&&(n._prefixChildren=a),EC(a=IC())&&(n._suffixChildren=a),EC(a=IC())&&(n._errorChildren=a),EC(a=IC())&&(n._hintChildren=a);}},viewQuery:function(t,n){if(t&1&&(jg(n._iconPrefixContainerSignal,Ue,5)(n._textPrefixContainerSignal,We,5)(n._iconSuffixContainerSignal,Ge,5)(n._textSuffixContainerSignal,$e,5),Pg(pt,5)(Ue,5)(We,5)(Ge,5)($e,5)(Ze,5)(Ye,5)(Xe,5)),t&2){wC(4);let r;EC(r=IC())&&(n._textField=r.first),EC(r=IC())&&(n._iconPrefixContainer=r.first),EC(r=IC())&&(n._textPrefixContainer=r.first),EC(r=IC())&&(n._iconSuffixContainer=r.first),EC(r=IC())&&(n._textSuffixContainer=r.first),EC(r=IC())&&(n._floatingLabel=r.first),EC(r=IC())&&(n._notchedOutline=r.first),EC(r=IC())&&(n._lineRipple=r.first);}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:38,hostBindings:function(t,n){t&2&&Ug("mat-mdc-form-field-label-always-float",n._shouldAlwaysFloat())("mat-mdc-form-field-has-icon-prefix",n._hasIconPrefix)("mat-mdc-form-field-has-icon-suffix",n._hasIconSuffix)("mat-form-field-invalid",n._control.errorState)("mat-form-field-disabled",n._control.disabled)("mat-form-field-autofilled",n._control.autofilled)("mat-form-field-appearance-fill",n.appearance=="fill")("mat-form-field-appearance-outline",n.appearance=="outline")("mat-form-field-hide-placeholder",n._hasFloatingLabel()&&!n._shouldLabelFloat())("mat-primary",n.color!=="accent"&&n.color!=="warn")("mat-accent",n.color==="accent")("mat-warn",n.color==="warn")("ng-untouched",n._shouldForward("untouched"))("ng-touched",n._shouldForward("touched"))("ng-pristine",n._shouldForward("pristine"))("ng-dirty",n._shouldForward("dirty"))("ng-valid",n._shouldForward("valid"))("ng-invalid",n._shouldForward("invalid"))("ng-pending",n._shouldForward("pending"));},inputs:{hideRequiredMarker:"hideRequiredMarker",color:"color",floatLabel:"floatLabel",appearance:"appearance",subscriptSizing:"subscriptSizing",hintLabel:"hintLabel"},exportAs:["matFormField"],features:[nT([{provide:se,useExisting:i},{provide:it,useExisting:i}])],ngContentSelectors:bt,decls:18,vars:21,consts:[["labelTemplate",""],["textField",""],["iconPrefixContainer",""],["textPrefixContainer",""],["textSuffixContainer",""],["iconSuffixContainer",""],[1,"mat-mdc-text-field-wrapper","mdc-text-field",3,"click"],[1,"mat-mdc-form-field-focus-overlay"],[1,"mat-mdc-form-field-flex"],["matFormFieldNotchedOutline","",3,"matFormFieldNotchedOutlineOpen"],[1,"mat-mdc-form-field-icon-prefix"],[1,"mat-mdc-form-field-text-prefix"],[1,"mat-mdc-form-field-infix"],[3,"ngTemplateOutlet"],[1,"mat-mdc-form-field-text-suffix"],[1,"mat-mdc-form-field-icon-suffix"],["matFormFieldLineRipple",""],["aria-atomic","true","aria-live","polite",1,"mat-mdc-form-field-subscript-wrapper","mat-mdc-form-field-bottom-align"],[1,"mat-mdc-form-field-error-wrapper"],[1,"mat-mdc-form-field-hint-wrapper"],["matFormFieldFloatingLabel","",3,"floating","monitorResize","id"],["aria-hidden","true",1,"mat-mdc-form-field-required-marker","mdc-floating-label--required"],[3,"id"],[1,"mat-mdc-form-field-hint-spacer"]],template:function(t,n){if(t&1&&(yC(_t),Eg(0,xt,1,1,"ng-template",null,0,fT),ws(2,"div",6,1),Rg("click",function(a){return n._control.onContainerClick(a)}),Jw(4,yt,1,0,"div",7),ws(5,"div",8),Jw(6,wt,2,2,"div",9),Jw(7,Mt,3,0,"div",10),Jw(8,Et,3,0,"div",11),ws(9,"div",12),Jw(10,Tt,1,1,null,13),vC(11),pl(),Jw(12,Rt,3,0,"div",14),Jw(13,Dt,3,0,"div",15),pl(),Jw(14,Nt,1,0,"div",16),pl(),ws(15,"div",17),Jw(16,At,2,0,"div",18)(17,Lt,5,1,"div",19),pl()),t&2){let r;XE(2),Ug("mdc-text-field--filled",!n._hasOutline())("mdc-text-field--outlined",n._hasOutline())("mdc-text-field--no-label",!n._hasFloatingLabel())("mdc-text-field--disabled",n._control.disabled)("mdc-text-field--invalid",n._control.errorState),XE(2),eC(!n._hasOutline()&&!n._control.disabled?4:-1),XE(2),eC(n._hasOutline()?6:-1),XE(),eC(n._hasIconPrefix?7:-1),XE(),eC(n._hasTextPrefix?8:-1),XE(2),eC(!n._hasOutline()||n._forceDisplayInfixLabel()?10:-1),XE(2),eC(n._hasTextSuffix?12:-1),XE(),eC(n._hasIconSuffix?13:-1),XE(),eC(n._hasOutline()?-1:14),XE(),Ug("mat-mdc-form-field-subscript-dynamic-size",n.subscriptSizing==="dynamic");let a=n._getSubscriptMessageType();XE(),eC((r=a)==="error"?16:r==="hint"?17:-1);}},dependencies:[Ze,Ye,_b,Xe,le],styles:[`.mdc-text-field {
|
|
2
2
|
display: inline-flex;
|
|
3
3
|
align-items: baseline;
|
|
4
4
|
padding: 0 16px;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {O}from'./chunk-DywMt_F6.js';import {R}from'./chunk-C9sVqRdl.js';import {N}from'./chunk-B9bBPCOE.js';import {g,F,bm as Mm,C as Ce$1,G as Gi,m as mT,a as F$1,aD as Ly,r as re,b as U,e as xw,k as ws,q as Rg,o as pl,n as GC,J as Jw,X as XE,v as eC,s as rC,ac as gC,y as oC,a9 as lC,z as Ug,T as Tg,a8 as Yg,a5 as vl,S as Sg,a3 as VI,u as bg,a6 as UI,aa as If,ab as wf,cH as Kw}from'./main-CB44G2DK.js';import {l,I,f}from'./chunk-CigBS2kT.js';import {S as Se$1}from'./chunk-CnOd7CqJ.js';import'./chunk-JZld8hhU.js';import {o as z,k as _t,n as ni,J as Jn,Q as Qn,e as ei,Y as Ye,A as At,Z as Zn,l as Xn,E as En,p as An}from'./chunk-BDPQgAAh.js';import'./chunk-KsDoJ6rD.js';import'./chunk-DzLzwtOe.js';var D=(r,i)=>i.value;function se(r,i){r&1&&(ws(0,"p",4),GC(1,"Loading\u2026"),pl());}function de(r,i){if(r&1){let e=lC();ws(0,"button",18),Rg("click",function(){let d=If(e).$implicit,_=gC(2);return wf(_.setThemeVariant(d.value))}),ws(1,"span",19),GC(2),pl(),ws(3,"span",20),GC(4),pl()();}if(r&2){let e=i.$implicit,a=gC(2);Ug("user-profile__theme-variant--active",a.themeVariant()===e.value),Tg("aria-pressed",a.themeVariant()===e.value),XE(2),Yg(e.label),XE(2),Yg(e.description);}}function _e(r,i){if(r&1){let e=lC();ws(0,"button",21),Rg("click",function(){let d=If(e).$implicit,_=gC(2);return wf(_.setTheme(d.value))}),GC(1),pl();}if(r&2){let e=i.$implicit,a=gC(2);Ug("user-profile__segmented-option--active",a.themeMode()===e.value),Tg("aria-pressed",a.themeMode()===e.value),XE(),vl(" ",e.label," ");}}function ce(r,i){if(r&1){let e=lC();ws(0,"button",21),Rg("click",function(){let d=If(e).$implicit,_=gC(2);return wf(_.setEnterKeyBehavior(d.value))}),GC(1),pl();}if(r&2){let e=i.$implicit,a=gC(2);Ug("user-profile__segmented-option--active",a.enterKeyBehavior()===e.value),Tg("aria-pressed",a.enterKeyBehavior()===e.value),XE(),vl(" ",e.label," ");}}function pe(r,i){if(r&1&&(ws(0,"option",32),GC(1),pl()),r&2){let e=i.$implicit;bg("value",e.value),XE(),Yg(e.label);}}function me(r,i){if(r&1){let e=lC();ws(0,"form",22),Rg("ngSubmit",function(){If(e);let d=gC(2);return wf(d.save())}),ws(1,"div",5)(2,"h2",6),GC(3,"Identity"),pl(),ws(4,"div",7)(5,"span",8),GC(6,"Email"),pl(),ws(7,"span",23),GC(8),pl()(),ws(9,"div",7)(10,"span",8),GC(11,"External ID"),pl(),ws(12,"span",23),GC(13),pl()()(),ws(14,"div",5)(15,"h2",6),GC(16,"Profile"),pl(),ws(17,"div",7)(18,"label",24),GC(19,"First name"),pl(),Sg(20,"input",25),VI(),pl(),ws(21,"div",7)(22,"label",26),GC(23,"Last name"),pl(),Sg(24,"input",27),VI(),pl(),ws(25,"div",7)(26,"label",28),GC(27,"Bio"),pl(),Sg(28,"textarea",29),VI(),pl(),ws(29,"div",7)(30,"label",30),GC(31,"Language"),pl(),ws(32,"select",31),rC(33,pe,2,2,"option",32,D),pl(),VI(),pl()(),ws(35,"div",33)(36,"button",34),GC(37),pl(),ws(38,"button",35),Rg("click",function(){If(e);let d=gC(2);return wf(d.cancelEditing())}),GC(39,"Cancel"),pl()()();}if(r&2){let e=gC(),a=gC();bg("formGroup",a.form),XE(8),Yg(e.email),XE(5),Yg(e.externalId),XE(7),UI(),XE(4),UI(),XE(4),UI(),XE(4),UI(),XE(),oC(a.languageOptions),XE(3),bg("disabled",a.isSaving()),XE(),vl(" ",a.isSaving()?"Saving\u2026":"Save changes"," ");}}function ue(r,i){r&1&&(ws(0,"p",43),GC(1," No global configuration yet. Create one from the Integrations / AI Providers / Auth Settings pages of your namespaces. "),pl());}function fe(r,i){if(r&1){let e=lC();ws(0,"span",50),GC(1,"Delete?"),pl(),ws(2,"button",51),Rg("click",function(){If(e);let d=gC().$implicit,_=gC(6);return wf(_.confirmDelete(d))}),GC(3," Confirm "),pl(),ws(4,"button",52),Rg("click",function(){If(e);let d=gC(7);return wf(d.cancelDelete())}),GC(5," Cancel "),pl();}}function ge(r,i){if(r&1){let e=lC();ws(0,"button",52),Rg("click",function(){If(e);let d=gC().$implicit,_=gC(6);return wf(_.armDelete(d))}),GC(1," Delete "),pl();}}function Ce(r,i){if(r&1&&(ws(0,"li",46)(1,"span",47),GC(2),pl(),ws(3,"span",48),GC(4),pl(),Jw(5,fe,6,0)(6,ge,2,0,"button",49),pl()),r&2){let e=i.$implicit,a=gC(6);XE(2),Yg(e.name),XE(2),Yg(e.subtitle),XE(),eC(a.isPendingDelete(e)?5:6);}}function ve(r,i){if(r&1&&(ws(0,"h3",44),GC(1,"Integrations"),pl(),ws(2,"ul",45),rC(3,Ce,7,3,"li",46,Kw().trackEntry,true),pl()),r&2){let e=gC(5);XE(3),oC(e.recap().integrations);}}function xe(r,i){if(r&1){let e=lC();ws(0,"span",50),GC(1,"Delete?"),pl(),ws(2,"button",51),Rg("click",function(){If(e);let d=gC().$implicit,_=gC(6);return wf(_.confirmDelete(d))}),GC(3," Confirm "),pl(),ws(4,"button",52),Rg("click",function(){If(e);let d=gC(7);return wf(d.cancelDelete())}),GC(5," Cancel "),pl();}}function be(r,i){if(r&1){let e=lC();ws(0,"button",52),Rg("click",function(){If(e);let d=gC().$implicit,_=gC(6);return wf(_.armDelete(d))}),GC(1," Delete "),pl();}}function ye(r,i){if(r&1&&(ws(0,"li",46)(1,"span",47),GC(2),pl(),ws(3,"span",48),GC(4),pl(),Jw(5,xe,6,0)(6,be,2,0,"button",49),pl()),r&2){let e=i.$implicit,a=gC(6);XE(2),Yg(e.name),XE(2),Yg(e.subtitle),XE(),eC(a.isPendingDelete(e)?5:6);}}function he(r,i){if(r&1&&(ws(0,"h3",44),GC(1,"AI Providers"),pl(),ws(2,"ul",45),rC(3,ye,7,3,"li",46,Kw().trackEntry,true),pl()),r&2){let e=gC(5);XE(3),oC(e.recap().aiProviders);}}function Ee(r,i){if(r&1){let e=lC();ws(0,"span",50),GC(1,"Delete?"),pl(),ws(2,"button",51),Rg("click",function(){If(e);let d=gC().$implicit,_=gC(6);return wf(_.confirmDelete(d))}),GC(3," Confirm "),pl(),ws(4,"button",52),Rg("click",function(){If(e);let d=gC(7);return wf(d.cancelDelete())}),GC(5," Cancel "),pl();}}function Pe(r,i){if(r&1){let e=lC();ws(0,"button",52),Rg("click",function(){If(e);let d=gC().$implicit,_=gC(6);return wf(_.armDelete(d))}),GC(1," Delete "),pl();}}function Se(r,i){if(r&1&&(ws(0,"li",46)(1,"span",47),GC(2),pl(),ws(3,"span",48),GC(4),pl(),Jw(5,Ee,6,0)(6,Pe,2,0,"button",49),pl()),r&2){let e=i.$implicit,a=gC(6);XE(2),Yg(e.name),XE(2),Yg(e.subtitle),XE(),eC(a.isPendingDelete(e)?5:6);}}function we(r,i){if(r&1&&(ws(0,"h3",44),GC(1,"My global auth settings"),pl(),ws(2,"ul",45),rC(3,Se,7,3,"li",46,Kw().trackEntry,true),pl()),r&2){let e=gC(5);XE(3),oC(e.recap().authSettings);}}function ke(r,i){if(r&1&&(Jw(0,ve,5,0),Jw(1,he,5,0),Jw(2,we,5,0)),r&2){let e=gC(4);eC(e.recap().integrations.length>0?0:-1),XE(),eC(e.recap().aiProviders.length>0?1:-1),XE(),eC(e.recap().authSettings.length>0?2:-1);}}function Me(r,i){if(r&1&&Jw(0,ue,2,0,"p",43)(1,ke,3,3),r&2){let e=gC(3);eC(e.recap().total===0?0:1);}}function Oe(r,i){if(r&1){let e=lC();ws(0,"div",17)(1,"div",5)(2,"h2",6),GC(3,"Identity"),pl(),ws(4,"div",7)(5,"span",8),GC(6,"Email"),pl(),ws(7,"span",36),GC(8),pl()(),ws(9,"div",7)(10,"span",8),GC(11,"External ID"),pl(),ws(12,"span",36),GC(13),pl()()(),ws(14,"div",5)(15,"h2",6),GC(16,"Profile"),pl(),ws(17,"div",7)(18,"span",8),GC(19,"First name"),pl(),ws(20,"span",36),GC(21),pl()(),ws(22,"div",7)(23,"span",8),GC(24,"Last name"),pl(),ws(25,"span",36),GC(26),pl()(),ws(27,"div",37)(28,"span",8),GC(29,"Bio"),pl(),ws(30,"span",36),GC(31),pl()(),ws(32,"div",7)(33,"span",8),GC(34,"Language"),pl(),ws(35,"span",36),GC(36),pl()()(),ws(37,"div",33)(38,"button",38),Rg("click",function(){If(e);let d=gC(2);return wf(d.startEditing())}),GC(39," Edit profile "),pl()(),ws(40,"div",39)(41,"button",40),Rg("click",function(){If(e);let d=gC(2);return wf(d.toggleOverrides())}),ws(42,"span",41),GC(43,"\u25B6"),pl(),GC(44," My global user configurations "),ws(45,"span",42),GC(46),pl()(),Jw(47,Me,2,1),pl()();}if(r&2){let e=gC(),a=gC();XE(8),Yg(e.email),XE(5),Yg(e.externalId),XE(8),Yg(e.firstname||"\u2014"),XE(5),Yg(e.lastname||"\u2014"),XE(5),Yg(e.bio||"\u2014"),XE(5),Yg(e.preferredLanguage||"\u2014"),XE(5),Tg("aria-expanded",a.isOverridesExpanded()),XE(),Ug("user-profile__overrides-arrow--open",a.isOverridesExpanded()),XE(4),vl("(",a.recap().total,")"),XE(),eC(a.isOverridesExpanded()?47:-1);}}function Ue(r,i){if(r&1&&(ws(0,"div",5)(1,"h2",6),GC(2,"Appearance"),pl(),ws(3,"div",7)(4,"span",8),GC(5,"Skin"),pl(),ws(6,"div",9),rC(7,de,5,5,"button",10,D),pl()(),ws(9,"div",7)(10,"span",8),GC(11,"Mode"),pl(),ws(12,"div",11),rC(13,_e,2,4,"button",12,D),pl()()(),ws(15,"div",5)(16,"h2",6),GC(17,"Composer"),pl(),ws(18,"div",7)(19,"span",8),GC(20,"Enter key"),pl(),ws(21,"div",13)(22,"div",14),rC(23,ce,2,4,"button",12,D),pl(),ws(25,"p",15),GC(26,'In "New line" mode, press Ctrl or Cmd + Enter to send.'),pl()()()(),Jw(27,me,40,5,"form",16)(28,Oe,48,11,"div",17)),r&2){let e=gC();XE(7),oC(e.themeVariantOptions),XE(6),oC(e.themeOptions),XE(10),oC(e.enterKeyOptions),XE(4),eC(e.isEditing()?27:28);}}function Te(r,i){r&1&&(ws(0,"p",4),GC(1,"Unable to load profile."),pl());}var le=class r{userState=g(l);router=g(F);location=g(Mm);destroyRef=g(Ce$1);integrationState=g(N);providerState=g(O);authSettingState=g(R);themePort=g(I);preferencesPort=g(f);isEditing=Gi(false);isLoading=Gi(false);isSaving=Gi(false);isOverridesExpanded=Gi(false);currentUser=this.userState.currentUser;theme=this.themePort.theme;themeMode=mT(()=>this.themePort.theme().mode);themeOptions=[{value:"light",label:"Light"},{value:"dark",label:"Dark"},{value:"system",label:"System"}];themeVariant=mT(()=>this.themePort.theme().variant);themeVariantOptions=[{value:"industry",label:"Industry",description:"Bleu acier, Barlow"},{value:"terminal",label:"Terminal",description:"Ambre CRT, JetBrains Mono"}];enterKeyBehavior=this.preferencesPort.enterKeyBehavior;enterKeyOptions=[{value:"send",label:"Send"},{value:"newline",label:"New line"}];languageOptions=[{value:"",label:"No preference (English fallback)"},{value:"fr",label:"French"},{value:"de",label:"German"},{value:"es",label:"Spanish"},{value:"pt",label:"Portuguese"},{value:"it",label:"Italian"},{value:"nl",label:"Dutch"},{value:"pl",label:"Polish"},{value:"ja",label:"Japanese"},{value:"zh",label:"Chinese"}];form=new z({firstname:new _t("",{nonNullable:true}),lastname:new _t("",{nonNullable:true}),bio:new _t("",{nonNullable:true}),preferredLanguage:new _t("",{nonNullable:true})});recap=F$1(Ly([this.integrationState.userGlobal$,this.providerState.userGlobal$,this.authSettingState.userGlobal$]).pipe(re(([i,e,a])=>{let d=i.map(g=>({category:"integration",id:g.id??"",name:g.name,subtitle:g.integrationType})),_=e.map(g=>({category:"aiProvider",id:g.id??"",name:g.name,subtitle:g.apiType})),I=a.map(g=>({category:"authSetting",id:g.id??"",name:g.name,subtitle:g.authType}));return {integrations:d,aiProviders:_,authSettings:I,total:d.length+_.length+I.length}})),{initialValue:{integrations:[],aiProviders:[],authSettings:[],total:0}});ngOnInit(){if(this.currentUser()){this.syncFormFromState();return}this.isLoading.set(true),this.userState.loadMe().pipe(U(this.destroyRef)).subscribe({next:()=>{this.syncFormFromState(),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}startEditing(){this.syncFormFromState(),this.isEditing.set(true);}cancelEditing(){this.isEditing.set(false);}setTheme(i){this.themePort.setTheme({variant:this.themePort.theme().variant,mode:i});}setThemeVariant(i){this.themePort.setTheme({variant:i,mode:this.themePort.theme().mode});}setEnterKeyBehavior(i){this.preferencesPort.setEnterKeyBehavior(i);}save(){if(this.isSaving())return;this.isSaving.set(true);let i=this.form.controls.preferredLanguage.value.trim();this.userState.updateMe({firstname:this.form.controls.firstname.value.trim()||void 0,lastname:this.form.controls.lastname.value.trim()||void 0,bio:this.form.controls.bio.value.trim()||void 0,preferredLanguage:i||void 0}).pipe(U(this.destroyRef)).subscribe({next:()=>{this.isSaving.set(false),this.isEditing.set(false);},error:()=>this.isSaving.set(false)});}toggleOverrides(){this.isOverridesExpanded.update(i=>!i),this.pendingDeleteKey.set(null);}pendingDeleteKey=Gi(null);isPendingDelete(i){return this.pendingDeleteKey()===this.entryKey(i)}armDelete(i){i.id&&this.pendingDeleteKey.set(this.entryKey(i));}cancelDelete(){this.pendingDeleteKey.set(null);}confirmDelete(i){if(!i.id)return;this.pendingDeleteKey.set(null),(i.category==="integration"?this.integrationState.delete(i.id,"userGlobal"):i.category==="authSetting"?this.authSettingState.delete(i.id,"userGlobal"):this.providerState.delete(i.id,"userGlobal")).pipe(U(this.destroyRef)).subscribe({error:a=>{console.error(`[UserProfile] Delete failed for ${i.category}:${i.id}:`,a);}});}entryKey(i){return `${i.category}:${i.id}`}goBack(){window.history.length>1?this.location.back():this.router.navigate(["/agentos"]);}trackEntry(i,e){return this.entryKey(e)}syncFormFromState(){let i=this.currentUser();i&&this.form.setValue({firstname:i.firstname??"",lastname:i.lastname??"",bio:i.bio??"",preferredLanguage:i.preferredLanguage??""});}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=xw({type:r,selectors:[["agentos-user-profile"]],decls:8,vars:1,consts:[[1,"user-profile"],[1,"user-profile__header"],["icon","arrow_back","title","Back",3,"action"],[1,"user-profile__title"],[1,"user-profile__loading"],[1,"user-profile__section"],[1,"user-profile__section-title"],[1,"user-profile__field"],[1,"user-profile__label"],[1,"user-profile__theme-variants"],["type","button",1,"user-profile__theme-variant",3,"user-profile__theme-variant--active"],["role","group","aria-label","Color mode",1,"user-profile__segmented"],["type","button",1,"user-profile__segmented-option",3,"user-profile__segmented-option--active"],[1,"user-profile__field-control"],["role","group","aria-label","Enter key behavior",1,"user-profile__segmented"],[1,"user-profile__hint"],[1,"user-profile__form",3,"formGroup"],[1,"user-profile__view"],["type","button",1,"user-profile__theme-variant",3,"click"],[1,"user-profile__theme-variant-name"],[1,"user-profile__theme-variant-desc"],["type","button",1,"user-profile__segmented-option",3,"click"],[1,"user-profile__form",3,"ngSubmit","formGroup"],[1,"user-profile__value","user-profile__value--readonly"],["for","up-firstname",1,"user-profile__label"],["id","up-firstname","type","text","placeholder","Your first name","formControlName","firstname","autocomplete","given-name",1,"user-profile__input"],["for","up-lastname",1,"user-profile__label"],["id","up-lastname","type","text","placeholder","Your last name","formControlName","lastname","autocomplete","family-name",1,"user-profile__input"],["for","up-bio",1,"user-profile__label"],["id","up-bio","placeholder","A short description about yourself","formControlName","bio","rows","4",1,"user-profile__input","user-profile__input--textarea"],["for","up-preferredLanguage",1,"user-profile__label"],["id","up-preferredLanguage","formControlName","preferredLanguage",1,"user-profile__input","user-profile__select"],[3,"value"],[1,"user-profile__actions"],["type","submit",1,"user-profile__btn","user-profile__btn--primary",3,"disabled"],["type","button",1,"user-profile__btn",3,"click"],[1,"user-profile__value"],[1,"user-profile__field","user-profile__field--bio"],["type","button",1,"user-profile__btn","user-profile__btn--primary",3,"click"],[1,"user-profile__overrides"],["type","button",1,"user-profile__overrides-toggle",3,"click"],[1,"user-profile__overrides-arrow"],[1,"user-profile__overrides-count"],[1,"user-profile__overrides-empty"],[1,"user-profile__overrides-subtitle"],[1,"user-profile__overrides-list"],[1,"user-profile__overrides-row"],[1,"user-profile__overrides-name"],[1,"user-profile__overrides-subtitle-text"],["type","button",1,"user-profile__overrides-delete"],[1,"user-profile__overrides-confirm-label"],["type","button",1,"user-profile__overrides-delete","user-profile__overrides-delete--confirm",3,"click"],["type","button",1,"user-profile__overrides-delete",3,"click"]],template:function(e,a){if(e&1&&(ws(0,"div",0)(1,"header",1)(2,"ds-icon-button",2),Rg("action",function(){return a.goBack()}),pl(),ws(3,"h1",3),GC(4,"My profile"),pl()(),Jw(5,se,2,0,"p",4)(6,Ue,29,1)(7,Te,2,0,"p",4),pl()),e&2){let d;XE(5),eC(a.isLoading()?5:(d=a.currentUser())?6:7,d);}},dependencies:[ni,Jn,Qn,ei,Ye,At,Zn,Xn,En,An,Se$1],styles:[`.user-profile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:560px;margin:0 auto;padding:2rem 1rem}.user-profile__header[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:.5rem}.user-profile__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-accent)}.user-profile__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.user-profile__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.user-profile__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:700;color:var(--color-text);letter-spacing:-.02em}.user-profile__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.9rem;margin:0}.user-profile__view[_ngcontent-%COMP%], .user-profile__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem}.user-profile__section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.user-profile__section-title[_ngcontent-%COMP%]{margin:0;font-family:var(--font-heading);font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.12em;color:var(--color-neutral-500);border-bottom:1px solid var(--color-divider);padding-bottom:.5rem}.user-profile__field[_ngcontent-%COMP%]{display:grid;grid-template-columns:140px 1fr;align-items:baseline;gap:.75rem}.user-profile__field--bio[_ngcontent-%COMP%]{align-items:start}.user-profile__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text-secondary);white-space:nowrap}.user-profile__value[_ngcontent-%COMP%]{font-size:.9375rem;color:var(--color-text);word-break:break-word;white-space:pre-wrap}.user-profile__value--readonly[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.875rem}.user-profile__segmented[_ngcontent-%COMP%]{display:inline-flex;justify-self:start;border:1px solid var(--color-divider);overflow:hidden}.user-profile__segmented-option[_ngcontent-%COMP%]{padding:.4rem .85rem;background:transparent;border:none;border-right:1px solid var(--color-divider);color:var(--color-text-secondary);font-size:.875rem;cursor:pointer;transition:background .15s ease,color .15s ease}.user-profile__segmented-option[_ngcontent-%COMP%]:last-child{border-right:none}.user-profile__segmented-option[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.user-profile__segmented-option--active[_ngcontent-%COMP%]{background:var(--color-accent);color:#fff}.user-profile__segmented-option--active[_ngcontent-%COMP%]:hover{background:var(--color-accent-700)}.user-profile__field-control[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:.4rem}.user-profile__hint[_ngcontent-%COMP%]{margin:0;font-size:.8rem;color:var(--color-text-secondary)}.user-profile__select[_ngcontent-%COMP%]{appearance:none;cursor:pointer;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236e6e73' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right .75rem center;padding-right:2.25rem}.user-profile__input[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border:1px solid var(--color-divider);background:var(--color-surface);color:var(--color-text);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;border-radius:0;transition:border-color .15s ease;resize:none}.user-profile__input[_ngcontent-%COMP%]:focus{border-color:var(--color-accent)}.user-profile__input[_ngcontent-%COMP%]::placeholder{color:var(--color-neutral-500)}.user-profile__input--textarea[_ngcontent-%COMP%]{line-height:1.5;resize:vertical}.user-profile__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.user-profile__btn[_ngcontent-%COMP%]{padding:.6rem 1.25rem;border:1px solid var(--color-divider);background:transparent;color:var(--color-text);font-size:13px;font-family:var(--font-heading);font-weight:600;cursor:pointer;border-radius:0;transition:background .15s ease,border-color .15s ease}.user-profile__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover);border-color:var(--color-neutral-500)}.user-profile__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.user-profile__btn--primary[_ngcontent-%COMP%]{background:var(--color-accent);border-color:var(--color-accent);color:#fff}.user-profile__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-700);border-color:var(--color-accent-700)}.user-profile__theme-variants[_ngcontent-%COMP%]{display:flex;gap:8px;justify-self:start}.user-profile__theme-variant[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:3px;padding:10px 16px;border:1px solid var(--color-divider);background:transparent;cursor:pointer;min-width:120px;transition:background .12s,border-color .12s}.user-profile__theme-variant[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover);border-color:var(--color-neutral-500)}.user-profile__theme-variant--active[_ngcontent-%COMP%]{border-color:var(--color-accent);background:color-mix(in srgb,var(--color-accent) 8%,transparent)}.user-profile__theme-variant-name[_ngcontent-%COMP%]{font-family:var(--font-heading);font-size:13px;font-weight:600;color:var(--color-text)}.user-profile__theme-variant-desc[_ngcontent-%COMP%]{font-size:11px;color:var(--color-text-secondary);font-family:var(--font-body)}.user-profile__overrides[_ngcontent-%COMP%]{margin-top:1rem;padding-top:1rem;border-top:1px solid var(--color-divider)}.user-profile__overrides-toggle[_ngcontent-%COMP%]{background:transparent;border:none;padding:.25rem 0;font-size:.85rem;color:var(--color-text-secondary);cursor:pointer;display:flex;align-items:center;gap:.4rem}.user-profile__overrides-toggle[_ngcontent-%COMP%]:hover{color:var(--color-text)}.user-profile__overrides-arrow[_ngcontent-%COMP%]{display:inline-block;font-size:.65rem;transition:transform .15s ease}.user-profile__overrides-arrow--open[_ngcontent-%COMP%]{transform:rotate(90deg)}.user-profile__overrides-count[_ngcontent-%COMP%]{color:var(--color-text-tertiary)}.user-profile__overrides-empty[_ngcontent-%COMP%]{font-size:.8rem;color:var(--color-text-secondary);font-style:italic;padding:.5rem 0 0;margin:0}.user-profile__overrides-subtitle[_ngcontent-%COMP%]{font-family:var(--font-heading);font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.12em;color:var(--color-neutral-500);margin:.75rem 0 .25rem}.user-profile__overrides-list[_ngcontent-%COMP%]{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:.25rem}.user-profile__overrides-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.4rem .5rem;font-size:.85rem;border-radius:0}.user-profile__overrides-row[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.user-profile__overrides-name[_ngcontent-%COMP%]{flex:1;color:var(--color-text);font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-profile__overrides-subtitle-text[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary);font-family:var(--font-heading)}.user-profile__overrides-confirm-label[_ngcontent-%COMP%]{font-size:11px;font-family:var(--font-heading);font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--red-deep);white-space:nowrap}.user-profile__overrides-delete[_ngcontent-%COMP%]{background:transparent;border:1px solid transparent;font-size:11px;font-family:var(--font-heading);font-weight:600;color:var(--color-neutral-500);cursor:pointer;padding:3px 8px;border-radius:0;transition:color .12s,background .12s,border-color .12s}.user-profile__overrides-delete[_ngcontent-%COMP%]:hover{color:var(--red);background:color-mix(in srgb,var(--red) 10%,transparent);border-color:var(--red)}.user-profile__overrides-delete--confirm[_ngcontent-%COMP%]{border-color:var(--red);background:var(--red);color:#fff}.user-profile__overrides-delete--confirm[_ngcontent-%COMP%]:hover{background:var(--red-deep);border-color:var(--red-deep)}`]})};
|
|
1
|
+
import {O}from'./chunk-DZYWKX3_.js';import {R}from'./chunk-DpSzd2vn.js';import {N}from'./chunk-CKYIYMkc.js';import {g,F,bm as Mm,C as Ce$1,G as Gi,m as mT,a as F$1,aD as Ly,r as re,b as U,e as xw,k as ws,q as Rg,o as pl,n as GC,J as Jw,X as XE,v as eC,s as rC,ac as gC,y as oC,a9 as lC,z as Ug,T as Tg,a8 as Yg,a5 as vl,S as Sg,a3 as VI,u as bg,a6 as UI,aa as If,ab as wf,cH as Kw}from'./main-5MNGHNLY.js';import {l,I,f}from'./chunk-CUSpXmFJ.js';import {S as Se$1}from'./chunk-Ch_3uDw1.js';import'./chunk-Di5xhd_-.js';import {o as z,k as _t,n as ni,J as Jn,Q as Qn,e as ei,Y as Ye,A as At,Z as Zn,l as Xn,E as En,p as An}from'./chunk-BEDBkVgu.js';import'./chunk-DRsOVECa.js';import'./chunk-Co7LObXe.js';var D=(r,i)=>i.value;function se(r,i){r&1&&(ws(0,"p",4),GC(1,"Loading\u2026"),pl());}function de(r,i){if(r&1){let e=lC();ws(0,"button",18),Rg("click",function(){let d=If(e).$implicit,_=gC(2);return wf(_.setThemeVariant(d.value))}),ws(1,"span",19),GC(2),pl(),ws(3,"span",20),GC(4),pl()();}if(r&2){let e=i.$implicit,a=gC(2);Ug("user-profile__theme-variant--active",a.themeVariant()===e.value),Tg("aria-pressed",a.themeVariant()===e.value),XE(2),Yg(e.label),XE(2),Yg(e.description);}}function _e(r,i){if(r&1){let e=lC();ws(0,"button",21),Rg("click",function(){let d=If(e).$implicit,_=gC(2);return wf(_.setTheme(d.value))}),GC(1),pl();}if(r&2){let e=i.$implicit,a=gC(2);Ug("user-profile__segmented-option--active",a.themeMode()===e.value),Tg("aria-pressed",a.themeMode()===e.value),XE(),vl(" ",e.label," ");}}function ce(r,i){if(r&1){let e=lC();ws(0,"button",21),Rg("click",function(){let d=If(e).$implicit,_=gC(2);return wf(_.setEnterKeyBehavior(d.value))}),GC(1),pl();}if(r&2){let e=i.$implicit,a=gC(2);Ug("user-profile__segmented-option--active",a.enterKeyBehavior()===e.value),Tg("aria-pressed",a.enterKeyBehavior()===e.value),XE(),vl(" ",e.label," ");}}function pe(r,i){if(r&1&&(ws(0,"option",32),GC(1),pl()),r&2){let e=i.$implicit;bg("value",e.value),XE(),Yg(e.label);}}function me(r,i){if(r&1){let e=lC();ws(0,"form",22),Rg("ngSubmit",function(){If(e);let d=gC(2);return wf(d.save())}),ws(1,"div",5)(2,"h2",6),GC(3,"Identity"),pl(),ws(4,"div",7)(5,"span",8),GC(6,"Email"),pl(),ws(7,"span",23),GC(8),pl()(),ws(9,"div",7)(10,"span",8),GC(11,"External ID"),pl(),ws(12,"span",23),GC(13),pl()()(),ws(14,"div",5)(15,"h2",6),GC(16,"Profile"),pl(),ws(17,"div",7)(18,"label",24),GC(19,"First name"),pl(),Sg(20,"input",25),VI(),pl(),ws(21,"div",7)(22,"label",26),GC(23,"Last name"),pl(),Sg(24,"input",27),VI(),pl(),ws(25,"div",7)(26,"label",28),GC(27,"Bio"),pl(),Sg(28,"textarea",29),VI(),pl(),ws(29,"div",7)(30,"label",30),GC(31,"Language"),pl(),ws(32,"select",31),rC(33,pe,2,2,"option",32,D),pl(),VI(),pl()(),ws(35,"div",33)(36,"button",34),GC(37),pl(),ws(38,"button",35),Rg("click",function(){If(e);let d=gC(2);return wf(d.cancelEditing())}),GC(39,"Cancel"),pl()()();}if(r&2){let e=gC(),a=gC();bg("formGroup",a.form),XE(8),Yg(e.email),XE(5),Yg(e.externalId),XE(7),UI(),XE(4),UI(),XE(4),UI(),XE(4),UI(),XE(),oC(a.languageOptions),XE(3),bg("disabled",a.isSaving()),XE(),vl(" ",a.isSaving()?"Saving\u2026":"Save changes"," ");}}function ue(r,i){r&1&&(ws(0,"p",43),GC(1," No global configuration yet. Create one from the Integrations / AI Providers / Auth Settings pages of your namespaces. "),pl());}function fe(r,i){if(r&1){let e=lC();ws(0,"span",50),GC(1,"Delete?"),pl(),ws(2,"button",51),Rg("click",function(){If(e);let d=gC().$implicit,_=gC(6);return wf(_.confirmDelete(d))}),GC(3," Confirm "),pl(),ws(4,"button",52),Rg("click",function(){If(e);let d=gC(7);return wf(d.cancelDelete())}),GC(5," Cancel "),pl();}}function ge(r,i){if(r&1){let e=lC();ws(0,"button",52),Rg("click",function(){If(e);let d=gC().$implicit,_=gC(6);return wf(_.armDelete(d))}),GC(1," Delete "),pl();}}function Ce(r,i){if(r&1&&(ws(0,"li",46)(1,"span",47),GC(2),pl(),ws(3,"span",48),GC(4),pl(),Jw(5,fe,6,0)(6,ge,2,0,"button",49),pl()),r&2){let e=i.$implicit,a=gC(6);XE(2),Yg(e.name),XE(2),Yg(e.subtitle),XE(),eC(a.isPendingDelete(e)?5:6);}}function ve(r,i){if(r&1&&(ws(0,"h3",44),GC(1,"Integrations"),pl(),ws(2,"ul",45),rC(3,Ce,7,3,"li",46,Kw().trackEntry,true),pl()),r&2){let e=gC(5);XE(3),oC(e.recap().integrations);}}function xe(r,i){if(r&1){let e=lC();ws(0,"span",50),GC(1,"Delete?"),pl(),ws(2,"button",51),Rg("click",function(){If(e);let d=gC().$implicit,_=gC(6);return wf(_.confirmDelete(d))}),GC(3," Confirm "),pl(),ws(4,"button",52),Rg("click",function(){If(e);let d=gC(7);return wf(d.cancelDelete())}),GC(5," Cancel "),pl();}}function be(r,i){if(r&1){let e=lC();ws(0,"button",52),Rg("click",function(){If(e);let d=gC().$implicit,_=gC(6);return wf(_.armDelete(d))}),GC(1," Delete "),pl();}}function ye(r,i){if(r&1&&(ws(0,"li",46)(1,"span",47),GC(2),pl(),ws(3,"span",48),GC(4),pl(),Jw(5,xe,6,0)(6,be,2,0,"button",49),pl()),r&2){let e=i.$implicit,a=gC(6);XE(2),Yg(e.name),XE(2),Yg(e.subtitle),XE(),eC(a.isPendingDelete(e)?5:6);}}function he(r,i){if(r&1&&(ws(0,"h3",44),GC(1,"AI Providers"),pl(),ws(2,"ul",45),rC(3,ye,7,3,"li",46,Kw().trackEntry,true),pl()),r&2){let e=gC(5);XE(3),oC(e.recap().aiProviders);}}function Ee(r,i){if(r&1){let e=lC();ws(0,"span",50),GC(1,"Delete?"),pl(),ws(2,"button",51),Rg("click",function(){If(e);let d=gC().$implicit,_=gC(6);return wf(_.confirmDelete(d))}),GC(3," Confirm "),pl(),ws(4,"button",52),Rg("click",function(){If(e);let d=gC(7);return wf(d.cancelDelete())}),GC(5," Cancel "),pl();}}function Pe(r,i){if(r&1){let e=lC();ws(0,"button",52),Rg("click",function(){If(e);let d=gC().$implicit,_=gC(6);return wf(_.armDelete(d))}),GC(1," Delete "),pl();}}function Se(r,i){if(r&1&&(ws(0,"li",46)(1,"span",47),GC(2),pl(),ws(3,"span",48),GC(4),pl(),Jw(5,Ee,6,0)(6,Pe,2,0,"button",49),pl()),r&2){let e=i.$implicit,a=gC(6);XE(2),Yg(e.name),XE(2),Yg(e.subtitle),XE(),eC(a.isPendingDelete(e)?5:6);}}function we(r,i){if(r&1&&(ws(0,"h3",44),GC(1,"My global auth settings"),pl(),ws(2,"ul",45),rC(3,Se,7,3,"li",46,Kw().trackEntry,true),pl()),r&2){let e=gC(5);XE(3),oC(e.recap().authSettings);}}function ke(r,i){if(r&1&&(Jw(0,ve,5,0),Jw(1,he,5,0),Jw(2,we,5,0)),r&2){let e=gC(4);eC(e.recap().integrations.length>0?0:-1),XE(),eC(e.recap().aiProviders.length>0?1:-1),XE(),eC(e.recap().authSettings.length>0?2:-1);}}function Me(r,i){if(r&1&&Jw(0,ue,2,0,"p",43)(1,ke,3,3),r&2){let e=gC(3);eC(e.recap().total===0?0:1);}}function Oe(r,i){if(r&1){let e=lC();ws(0,"div",17)(1,"div",5)(2,"h2",6),GC(3,"Identity"),pl(),ws(4,"div",7)(5,"span",8),GC(6,"Email"),pl(),ws(7,"span",36),GC(8),pl()(),ws(9,"div",7)(10,"span",8),GC(11,"External ID"),pl(),ws(12,"span",36),GC(13),pl()()(),ws(14,"div",5)(15,"h2",6),GC(16,"Profile"),pl(),ws(17,"div",7)(18,"span",8),GC(19,"First name"),pl(),ws(20,"span",36),GC(21),pl()(),ws(22,"div",7)(23,"span",8),GC(24,"Last name"),pl(),ws(25,"span",36),GC(26),pl()(),ws(27,"div",37)(28,"span",8),GC(29,"Bio"),pl(),ws(30,"span",36),GC(31),pl()(),ws(32,"div",7)(33,"span",8),GC(34,"Language"),pl(),ws(35,"span",36),GC(36),pl()()(),ws(37,"div",33)(38,"button",38),Rg("click",function(){If(e);let d=gC(2);return wf(d.startEditing())}),GC(39," Edit profile "),pl()(),ws(40,"div",39)(41,"button",40),Rg("click",function(){If(e);let d=gC(2);return wf(d.toggleOverrides())}),ws(42,"span",41),GC(43,"\u25B6"),pl(),GC(44," My global user configurations "),ws(45,"span",42),GC(46),pl()(),Jw(47,Me,2,1),pl()();}if(r&2){let e=gC(),a=gC();XE(8),Yg(e.email),XE(5),Yg(e.externalId),XE(8),Yg(e.firstname||"\u2014"),XE(5),Yg(e.lastname||"\u2014"),XE(5),Yg(e.bio||"\u2014"),XE(5),Yg(e.preferredLanguage||"\u2014"),XE(5),Tg("aria-expanded",a.isOverridesExpanded()),XE(),Ug("user-profile__overrides-arrow--open",a.isOverridesExpanded()),XE(4),vl("(",a.recap().total,")"),XE(),eC(a.isOverridesExpanded()?47:-1);}}function Ue(r,i){if(r&1&&(ws(0,"div",5)(1,"h2",6),GC(2,"Appearance"),pl(),ws(3,"div",7)(4,"span",8),GC(5,"Skin"),pl(),ws(6,"div",9),rC(7,de,5,5,"button",10,D),pl()(),ws(9,"div",7)(10,"span",8),GC(11,"Mode"),pl(),ws(12,"div",11),rC(13,_e,2,4,"button",12,D),pl()()(),ws(15,"div",5)(16,"h2",6),GC(17,"Composer"),pl(),ws(18,"div",7)(19,"span",8),GC(20,"Enter key"),pl(),ws(21,"div",13)(22,"div",14),rC(23,ce,2,4,"button",12,D),pl(),ws(25,"p",15),GC(26,'In "New line" mode, press Ctrl or Cmd + Enter to send.'),pl()()()(),Jw(27,me,40,5,"form",16)(28,Oe,48,11,"div",17)),r&2){let e=gC();XE(7),oC(e.themeVariantOptions),XE(6),oC(e.themeOptions),XE(10),oC(e.enterKeyOptions),XE(4),eC(e.isEditing()?27:28);}}function Te(r,i){r&1&&(ws(0,"p",4),GC(1,"Unable to load profile."),pl());}var le=class r{userState=g(l);router=g(F);location=g(Mm);destroyRef=g(Ce$1);integrationState=g(N);providerState=g(O);authSettingState=g(R);themePort=g(I);preferencesPort=g(f);isEditing=Gi(false);isLoading=Gi(false);isSaving=Gi(false);isOverridesExpanded=Gi(false);currentUser=this.userState.currentUser;theme=this.themePort.theme;themeMode=mT(()=>this.themePort.theme().mode);themeOptions=[{value:"light",label:"Light"},{value:"dark",label:"Dark"},{value:"system",label:"System"}];themeVariant=mT(()=>this.themePort.theme().variant);themeVariantOptions=[{value:"industry",label:"Industry",description:"Bleu acier, Barlow"},{value:"terminal",label:"Terminal",description:"Ambre CRT, JetBrains Mono"}];enterKeyBehavior=this.preferencesPort.enterKeyBehavior;enterKeyOptions=[{value:"send",label:"Send"},{value:"newline",label:"New line"}];languageOptions=[{value:"",label:"No preference (English fallback)"},{value:"fr",label:"French"},{value:"de",label:"German"},{value:"es",label:"Spanish"},{value:"pt",label:"Portuguese"},{value:"it",label:"Italian"},{value:"nl",label:"Dutch"},{value:"pl",label:"Polish"},{value:"ja",label:"Japanese"},{value:"zh",label:"Chinese"}];form=new z({firstname:new _t("",{nonNullable:true}),lastname:new _t("",{nonNullable:true}),bio:new _t("",{nonNullable:true}),preferredLanguage:new _t("",{nonNullable:true})});recap=F$1(Ly([this.integrationState.userGlobal$,this.providerState.userGlobal$,this.authSettingState.userGlobal$]).pipe(re(([i,e,a])=>{let d=i.map(g=>({category:"integration",id:g.id??"",name:g.name,subtitle:g.integrationType})),_=e.map(g=>({category:"aiProvider",id:g.id??"",name:g.name,subtitle:g.apiType})),I=a.map(g=>({category:"authSetting",id:g.id??"",name:g.name,subtitle:g.authType}));return {integrations:d,aiProviders:_,authSettings:I,total:d.length+_.length+I.length}})),{initialValue:{integrations:[],aiProviders:[],authSettings:[],total:0}});ngOnInit(){if(this.currentUser()){this.syncFormFromState();return}this.isLoading.set(true),this.userState.loadMe().pipe(U(this.destroyRef)).subscribe({next:()=>{this.syncFormFromState(),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}startEditing(){this.syncFormFromState(),this.isEditing.set(true);}cancelEditing(){this.isEditing.set(false);}setTheme(i){this.themePort.setTheme({variant:this.themePort.theme().variant,mode:i});}setThemeVariant(i){this.themePort.setTheme({variant:i,mode:this.themePort.theme().mode});}setEnterKeyBehavior(i){this.preferencesPort.setEnterKeyBehavior(i);}save(){if(this.isSaving())return;this.isSaving.set(true);let i=this.form.controls.preferredLanguage.value.trim();this.userState.updateMe({firstname:this.form.controls.firstname.value.trim()||void 0,lastname:this.form.controls.lastname.value.trim()||void 0,bio:this.form.controls.bio.value.trim()||void 0,preferredLanguage:i||void 0}).pipe(U(this.destroyRef)).subscribe({next:()=>{this.isSaving.set(false),this.isEditing.set(false);},error:()=>this.isSaving.set(false)});}toggleOverrides(){this.isOverridesExpanded.update(i=>!i),this.pendingDeleteKey.set(null);}pendingDeleteKey=Gi(null);isPendingDelete(i){return this.pendingDeleteKey()===this.entryKey(i)}armDelete(i){i.id&&this.pendingDeleteKey.set(this.entryKey(i));}cancelDelete(){this.pendingDeleteKey.set(null);}confirmDelete(i){if(!i.id)return;this.pendingDeleteKey.set(null),(i.category==="integration"?this.integrationState.delete(i.id,"userGlobal"):i.category==="authSetting"?this.authSettingState.delete(i.id,"userGlobal"):this.providerState.delete(i.id,"userGlobal")).pipe(U(this.destroyRef)).subscribe({error:a=>{console.error(`[UserProfile] Delete failed for ${i.category}:${i.id}:`,a);}});}entryKey(i){return `${i.category}:${i.id}`}goBack(){window.history.length>1?this.location.back():this.router.navigate(["/agentos"]);}trackEntry(i,e){return this.entryKey(e)}syncFormFromState(){let i=this.currentUser();i&&this.form.setValue({firstname:i.firstname??"",lastname:i.lastname??"",bio:i.bio??"",preferredLanguage:i.preferredLanguage??""});}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=xw({type:r,selectors:[["agentos-user-profile"]],decls:8,vars:1,consts:[[1,"user-profile"],[1,"user-profile__header"],["icon","arrow_back","title","Back",3,"action"],[1,"user-profile__title"],[1,"user-profile__loading"],[1,"user-profile__section"],[1,"user-profile__section-title"],[1,"user-profile__field"],[1,"user-profile__label"],[1,"user-profile__theme-variants"],["type","button",1,"user-profile__theme-variant",3,"user-profile__theme-variant--active"],["role","group","aria-label","Color mode",1,"user-profile__segmented"],["type","button",1,"user-profile__segmented-option",3,"user-profile__segmented-option--active"],[1,"user-profile__field-control"],["role","group","aria-label","Enter key behavior",1,"user-profile__segmented"],[1,"user-profile__hint"],[1,"user-profile__form",3,"formGroup"],[1,"user-profile__view"],["type","button",1,"user-profile__theme-variant",3,"click"],[1,"user-profile__theme-variant-name"],[1,"user-profile__theme-variant-desc"],["type","button",1,"user-profile__segmented-option",3,"click"],[1,"user-profile__form",3,"ngSubmit","formGroup"],[1,"user-profile__value","user-profile__value--readonly"],["for","up-firstname",1,"user-profile__label"],["id","up-firstname","type","text","placeholder","Your first name","formControlName","firstname","autocomplete","given-name",1,"user-profile__input"],["for","up-lastname",1,"user-profile__label"],["id","up-lastname","type","text","placeholder","Your last name","formControlName","lastname","autocomplete","family-name",1,"user-profile__input"],["for","up-bio",1,"user-profile__label"],["id","up-bio","placeholder","A short description about yourself","formControlName","bio","rows","4",1,"user-profile__input","user-profile__input--textarea"],["for","up-preferredLanguage",1,"user-profile__label"],["id","up-preferredLanguage","formControlName","preferredLanguage",1,"user-profile__input","user-profile__select"],[3,"value"],[1,"user-profile__actions"],["type","submit",1,"user-profile__btn","user-profile__btn--primary",3,"disabled"],["type","button",1,"user-profile__btn",3,"click"],[1,"user-profile__value"],[1,"user-profile__field","user-profile__field--bio"],["type","button",1,"user-profile__btn","user-profile__btn--primary",3,"click"],[1,"user-profile__overrides"],["type","button",1,"user-profile__overrides-toggle",3,"click"],[1,"user-profile__overrides-arrow"],[1,"user-profile__overrides-count"],[1,"user-profile__overrides-empty"],[1,"user-profile__overrides-subtitle"],[1,"user-profile__overrides-list"],[1,"user-profile__overrides-row"],[1,"user-profile__overrides-name"],[1,"user-profile__overrides-subtitle-text"],["type","button",1,"user-profile__overrides-delete"],[1,"user-profile__overrides-confirm-label"],["type","button",1,"user-profile__overrides-delete","user-profile__overrides-delete--confirm",3,"click"],["type","button",1,"user-profile__overrides-delete",3,"click"]],template:function(e,a){if(e&1&&(ws(0,"div",0)(1,"header",1)(2,"ds-icon-button",2),Rg("action",function(){return a.goBack()}),pl(),ws(3,"h1",3),GC(4,"My profile"),pl()(),Jw(5,se,2,0,"p",4)(6,Ue,29,1)(7,Te,2,0,"p",4),pl()),e&2){let d;XE(5),eC(a.isLoading()?5:(d=a.currentUser())?6:7,d);}},dependencies:[ni,Jn,Qn,ei,Ye,At,Zn,Xn,En,An,Se$1],styles:[`.user-profile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:560px;margin:0 auto;padding:2rem 1rem}.user-profile__header[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:.5rem}.user-profile__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-accent)}.user-profile__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.user-profile__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.user-profile__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:700;color:var(--color-text);letter-spacing:-.02em}.user-profile__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.9rem;margin:0}.user-profile__view[_ngcontent-%COMP%], .user-profile__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem}.user-profile__section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.user-profile__section-title[_ngcontent-%COMP%]{margin:0;font-family:var(--font-heading);font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.12em;color:var(--color-neutral-500);border-bottom:1px solid var(--color-divider);padding-bottom:.5rem}.user-profile__field[_ngcontent-%COMP%]{display:grid;grid-template-columns:140px 1fr;align-items:baseline;gap:.75rem}.user-profile__field--bio[_ngcontent-%COMP%]{align-items:start}.user-profile__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text-secondary);white-space:nowrap}.user-profile__value[_ngcontent-%COMP%]{font-size:.9375rem;color:var(--color-text);word-break:break-word;white-space:pre-wrap}.user-profile__value--readonly[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.875rem}.user-profile__segmented[_ngcontent-%COMP%]{display:inline-flex;justify-self:start;border:1px solid var(--color-divider);overflow:hidden}.user-profile__segmented-option[_ngcontent-%COMP%]{padding:.4rem .85rem;background:transparent;border:none;border-right:1px solid var(--color-divider);color:var(--color-text-secondary);font-size:.875rem;cursor:pointer;transition:background .15s ease,color .15s ease}.user-profile__segmented-option[_ngcontent-%COMP%]:last-child{border-right:none}.user-profile__segmented-option[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.user-profile__segmented-option--active[_ngcontent-%COMP%]{background:var(--color-accent);color:#fff}.user-profile__segmented-option--active[_ngcontent-%COMP%]:hover{background:var(--color-accent-700)}.user-profile__field-control[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:.4rem}.user-profile__hint[_ngcontent-%COMP%]{margin:0;font-size:.8rem;color:var(--color-text-secondary)}.user-profile__select[_ngcontent-%COMP%]{appearance:none;cursor:pointer;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236e6e73' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right .75rem center;padding-right:2.25rem}.user-profile__input[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border:1px solid var(--color-divider);background:var(--color-surface);color:var(--color-text);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;border-radius:0;transition:border-color .15s ease;resize:none}.user-profile__input[_ngcontent-%COMP%]:focus{border-color:var(--color-accent)}.user-profile__input[_ngcontent-%COMP%]::placeholder{color:var(--color-neutral-500)}.user-profile__input--textarea[_ngcontent-%COMP%]{line-height:1.5;resize:vertical}.user-profile__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.user-profile__btn[_ngcontent-%COMP%]{padding:.6rem 1.25rem;border:1px solid var(--color-divider);background:transparent;color:var(--color-text);font-size:13px;font-family:var(--font-heading);font-weight:600;cursor:pointer;border-radius:0;transition:background .15s ease,border-color .15s ease}.user-profile__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover);border-color:var(--color-neutral-500)}.user-profile__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.user-profile__btn--primary[_ngcontent-%COMP%]{background:var(--color-accent);border-color:var(--color-accent);color:#fff}.user-profile__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-700);border-color:var(--color-accent-700)}.user-profile__theme-variants[_ngcontent-%COMP%]{display:flex;gap:8px;justify-self:start}.user-profile__theme-variant[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:3px;padding:10px 16px;border:1px solid var(--color-divider);background:transparent;cursor:pointer;min-width:120px;transition:background .12s,border-color .12s}.user-profile__theme-variant[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover);border-color:var(--color-neutral-500)}.user-profile__theme-variant--active[_ngcontent-%COMP%]{border-color:var(--color-accent);background:color-mix(in srgb,var(--color-accent) 8%,transparent)}.user-profile__theme-variant-name[_ngcontent-%COMP%]{font-family:var(--font-heading);font-size:13px;font-weight:600;color:var(--color-text)}.user-profile__theme-variant-desc[_ngcontent-%COMP%]{font-size:11px;color:var(--color-text-secondary);font-family:var(--font-body)}.user-profile__overrides[_ngcontent-%COMP%]{margin-top:1rem;padding-top:1rem;border-top:1px solid var(--color-divider)}.user-profile__overrides-toggle[_ngcontent-%COMP%]{background:transparent;border:none;padding:.25rem 0;font-size:.85rem;color:var(--color-text-secondary);cursor:pointer;display:flex;align-items:center;gap:.4rem}.user-profile__overrides-toggle[_ngcontent-%COMP%]:hover{color:var(--color-text)}.user-profile__overrides-arrow[_ngcontent-%COMP%]{display:inline-block;font-size:.65rem;transition:transform .15s ease}.user-profile__overrides-arrow--open[_ngcontent-%COMP%]{transform:rotate(90deg)}.user-profile__overrides-count[_ngcontent-%COMP%]{color:var(--color-text-tertiary)}.user-profile__overrides-empty[_ngcontent-%COMP%]{font-size:.8rem;color:var(--color-text-secondary);font-style:italic;padding:.5rem 0 0;margin:0}.user-profile__overrides-subtitle[_ngcontent-%COMP%]{font-family:var(--font-heading);font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.12em;color:var(--color-neutral-500);margin:.75rem 0 .25rem}.user-profile__overrides-list[_ngcontent-%COMP%]{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:.25rem}.user-profile__overrides-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.4rem .5rem;font-size:.85rem;border-radius:0}.user-profile__overrides-row[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.user-profile__overrides-name[_ngcontent-%COMP%]{flex:1;color:var(--color-text);font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-profile__overrides-subtitle-text[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary);font-family:var(--font-heading)}.user-profile__overrides-confirm-label[_ngcontent-%COMP%]{font-size:11px;font-family:var(--font-heading);font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--red-deep);white-space:nowrap}.user-profile__overrides-delete[_ngcontent-%COMP%]{background:transparent;border:1px solid transparent;font-size:11px;font-family:var(--font-heading);font-weight:600;color:var(--color-neutral-500);cursor:pointer;padding:3px 8px;border-radius:0;transition:color .12s,background .12s,border-color .12s}.user-profile__overrides-delete[_ngcontent-%COMP%]:hover{color:var(--red);background:color-mix(in srgb,var(--red) 10%,transparent);border-color:var(--red)}.user-profile__overrides-delete--confirm[_ngcontent-%COMP%]{border-color:var(--red);background:var(--red);color:#fff}.user-profile__overrides-delete--confirm[_ngcontent-%COMP%]:hover{background:var(--red-deep);border-color:var(--red-deep)}`]})};
|
|
2
2
|
export{le as UserProfileComponent};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {v}from'./chunk-ZK5QaNGY.js';import {R,q,J}from'./chunk-C9sVqRdl.js';import {g,ao as W,F,C as Ce$1,G as Gi,a as F$1,m as mT,cd as Hf,b as U,x,w,e as xw,k as ws,q as Rg,n as GC,o as pl,J as Jw,X as XE,a8 as Yg,v as eC,a9 as lC,s as rC,a4 as nC,a3 as VI,S as Sg,ac as gC,u as bg,a6 as UI,y as oC,a5 as vl,cH as Kw,aa as If,ab as wf,b$ as kC,T as Tg}from'./main-CB44G2DK.js';import'./chunk-CigBS2kT.js';import {k as _t,b as _e$1,o as z,n as ni,J as Jn,Q as Qn,e as ei,Y as Ye,A as At,m as mn,Z as Zn,l as Xn,C as Cn,E as En}from'./chunk-BDPQgAAh.js';import'./chunk-KsDoJ6rD.js';import'./chunk-DzLzwtOe.js';import'./chunk-CnOd7CqJ.js';import'./chunk-JZld8hhU.js';function se(i,t){i&1&&(ws(0,"p",5),GC(1,"Loading\u2026"),pl());}function ce(i,t){if(i&1&&(ws(0,"label",23),Sg(1,"input",24),VI(),ws(2,"span"),GC(3),pl()()),i&2){let e=t.$implicit,o=gC(3);XE(),bg("formControl",o.scopeControl)("value",e.value)("disabled",e.value==="namespace"&&!o.isAdmin()),UI(),XE(2),Yg(e.label);}}function de(i,t){if(i&1&&(ws(0,"fieldset",8)(1,"legend",22),GC(2,"Configuration scope"),pl(),rC(3,ce,4,4,"label",23,Kw().trackByScope,true),pl()),i&2){let e=gC(2);bg("disabled",e.isEditMode()),XE(3),oC(e.scopeOptions);}}function ue(i,t){if(i&1&&(ws(0,"option",13),GC(1),pl()),i&2){let e=t.$implicit,o=gC(2);bg("value",e),XE(),Yg(o.authTypeLabel[e]);}}function pe(i,t){i&1&&GC(0," Leave a field unchanged to keep the stored credential. ");}function he(i,t){i&1&&(ws(0,"span",11),GC(1,"*"),pl());}function me(i,t){if(i&1&&(ws(0,"p",28),GC(1),pl()),i&2){let e=gC(2).$implicit;bg("id","as-hint-"+e.key),XE(),Yg(e.hint);}}function ge(i,t){if(i&1&&(Sg(0,"input",27),VI(),Jw(1,me,2,2,"p",28)),i&2){let e=gC().$implicit;kC("auth-setting-form__input"+(e.secret?" auth-setting-form__input--secret":"")),bg("id","as-cred-"+e.key)("type",e.secret?"password":"text")("placeholder",e.placeholder)("formControl",t)("autocomplete",e.secret?"new-password":"off"),Tg("aria-describedby",e.hint?"as-hint-"+e.key:null),UI(),XE(),eC(e.hint?1:-1);}}function Ce(i,t){if(i&1&&(ws(0,"div",9)(1,"label",26),GC(2),Jw(3,he,2,0,"span",11),pl(),Jw(4,ge,2,9),pl()),i&2){let e,o=t.$implicit,l=gC(3);XE(),bg("for","as-cred-"+o.key),XE(),vl(" ",o.label," "),XE(),eC(o.required?3:-1),XE(),eC((e=l.controlForField(o.key))?4:-1,e);}}function fe(i,t){if(i&1&&(ws(0,"fieldset",18)(1,"legend",22),GC(2,"Credentials"),pl(),ws(3,"p",25),GC(4," Values are stored encrypted and masked on read. "),Jw(5,pe,1,0),pl(),rC(6,Ce,5,4,"div",9,Kw().trackByField,true),pl()),i&2){let e=gC(2);XE(5),eC(e.isEditMode()?5:-1),XE(),oC(e.credentialFields());}}function ye(i,t){if(i&1){let e=lC();ws(0,"form",7),Rg("ngSubmit",function(){If(e);let l=gC();return wf(l.submit())}),Jw(1,de,5,1,"fieldset",8),ws(2,"div",9)(3,"label",10),GC(4,"Auth type "),ws(5,"span",11),GC(6,"*"),pl()(),ws(7,"select",12),rC(8,ue,2,2,"option",13,nC),pl(),VI(),pl(),ws(10,"div",9)(11,"label",14),GC(12,"Name "),ws(13,"span",11),GC(14,"*"),pl()(),Sg(15,"input",15),VI(),pl(),ws(16,"div",9)(17,"label",16),GC(18,"Description"),pl(),Sg(19,"input",17),VI(),pl(),Jw(20,fe,8,1,"fieldset",18),ws(21,"div",19)(22,"button",20),GC(23),pl(),ws(24,"button",21),Rg("click",function(){If(e);let l=gC();return wf(l.cancel())}),GC(25,"Cancel"),pl()()();}if(i&2){let e=gC();bg("formGroup",e.form),XE(),eC(e.isPlatformMode?-1:1),XE(6),bg("formControl",e.authTypeControl),UI(),XE(),oC(e.authTypeOptions),XE(7),bg("formControl",e.nameControl),UI(),XE(4),bg("formControl",e.descriptionControl),UI(),XE(),eC(e.credentialFields().length>0?20:-1),XE(2),bg("disabled",e.form.invalid||e.isSubmitting()),XE(),vl(" ",e.isEditMode()?"Save changes":"Create"," ");}}var _e=new Set(["namespace","userOnNs","userGlobal"]),P=Object.freeze({platform:"Platform (read-only)",namespace:"Namespace configuration",userOnNs:"Personal \u2014 this namespace only",userGlobal:"Personal \u2014 all namespaces"}),Se={ApiKeyAuthSetting:[{key:"apiKey",label:"API Key",placeholder:"sk-\u2026",secret:true,required:false}],BasicAuthAuthSetting:[{key:"username",label:"Username",placeholder:"user@example.com",secret:false,required:false},{key:"password",label:"Password",placeholder:"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",secret:true,required:false}],BearerTokenAuthSetting:[{key:"token",label:"Bearer token",placeholder:"eyJ\u2026",secret:true,required:false}],OAuthDiscoverableAuthSetting:[{key:"discoveryUrl",label:"Discovery URL",placeholder:"https://\u2026/.well-known/openid-configuration",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Space-separated OAuth scopes to request (e.g. openid profile email). Check your provider's documentation for the exact values.",secret:false,required:false}],OAuthCustomAuthSetting:[{key:"authorizationUrl",label:"Authorization URL",placeholder:"https://\u2026/authorize",secret:false,required:false},{key:"tokenUrl",label:"Token URL",placeholder:"https://\u2026/token",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Space-separated OAuth scopes to request (e.g. openid profile email). Check your provider's documentation for the exact values.",secret:false,required:false}],OAuthRegisteredAuthSetting:[{key:"authorizationUrl",label:"Authorization URL",placeholder:"https://\u2026/authorize",secret:false,required:false},{key:"tokenUrl",label:"Token URL",placeholder:"https://\u2026/token",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Space-separated OAuth scopes to request (e.g. openid profile email). Check your provider's documentation for the exact values.",secret:false,required:false}],OAuthMcpDiscoverableAuthSetting:[{key:"resourceUrl",label:"Resource URL",placeholder:"https://mcp.example.com",hint:"Use the base URL exactly as documented by your provider \u2014 do not append a path suffix. Examples: https://mcp.hubspot.com (HubSpot), https://mcp.atlassian.com/v1/mcp (Atlassian).",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",hint:"Leave empty to let the server register an OAuth client automatically (RFC 7591 dynamic registration). Fill in only if you have a pre-registered client ID from your provider.",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Leave empty in most cases \u2014 the MCP server declares the required scopes itself. Fill in only if your provider explicitly requires client-declared scopes.",secret:false,required:false}]},le=class i{route=g(W);router=g(F);destroyRef=g(Ce$1);state=g(R);namespaceRole=g(v);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=this.namespaceId===void 0;isAdmin=this.isPlatformMode?Gi(true):F$1(this.namespaceRole.isAdminOfNamespace$(this.namespaceId),{initialValue:false});authTypeOptions=q;authTypeLabel=J;scopeOptions=[{value:"namespace",label:P.namespace},{value:"userOnNs",label:P.userOnNs},{value:"userGlobal",label:P.userGlobal}];nameControl=new _t("",{nonNullable:true,validators:[_e$1.required,_e$1.minLength(1)]});descriptionControl=new _t(null);authTypeControl=new _t("ApiKeyAuthSetting",{nonNullable:true,validators:[_e$1.required]});scopeControl=new _t("namespace",{nonNullable:true});form=new z({name:this.nameControl,description:this.descriptionControl,authType:this.authTypeControl,scope:this.scopeControl});apiKeyControl=new _t("",{nonNullable:true});usernameControl=new _t("",{nonNullable:true});passwordControl=new _t("",{nonNullable:true});tokenControl=new _t("",{nonNullable:true});discoveryUrlControl=new _t("",{nonNullable:true});authorizationUrlControl=new _t("",{nonNullable:true});tokenUrlControl=new _t("",{nonNullable:true});clientIdControl=new _t("",{nonNullable:true});clientSecretControl=new _t("",{nonNullable:true});scopesControl=new _t("",{nonNullable:true});resourceUrlControl=new _t("",{nonNullable:true});selectedAuthType=F$1(this.authTypeControl.valueChanges,{initialValue:this.authTypeControl.value});credentialFields=mT(()=>Se[this.selectedAuthType()]);isEditMode=Gi(false);isSubmitting=Gi(false);isLoading=Gi(false);existingConfig=null;initialCredentials={};constructor(){this.isPlatformMode||Hf(()=>{this.isAdmin()||this.isEditMode()||this.scopeControl.value==="namespace"&&this.scopeControl.setValue("userOnNs");});}ngOnInit(){this.namespaceId&&this.state.setNamespace(this.namespaceId);let t=this.route.snapshot.paramMap,e=this.route.snapshot.queryParamMap,o=t.get("authSettingId");if(o){this.isEditMode.set(true),this.scopeControl.disable(),this.authTypeControl.disable(),this.loadConfig(o);return}if(this.isPlatformMode){this.scopeControl.setValue("platform"),this.scopeControl.disable();return}let l=this.parseScope(e.get("scope"));this.scopeControl.setValue(l);let v=e.get("template");v&&this.hydrateFromTemplate(v);}parseScope(t){return t&&_e.has(t)?t:"namespace"}deriveScopeFromConfig(t){return !t.userId&&!t.namespaceId?"platform":t.userId?t.namespaceId?"userOnNs":"userGlobal":"namespace"}loadConfig(t){this.isLoading.set(true),this.state.getById(t).pipe(U(this.destroyRef)).subscribe({next:e=>{this.existingConfig=e,this.scopeControl.setValue(this.deriveScopeFromConfig(e)),this.applyConfigToForm(e),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),console.warn(`[AuthSettingForm] Could not load auth setting '${t}' \u2014 navigating back`),this.navigateBack();}});}hydrateFromTemplate(t){this.isLoading.set(true),this.state.getById(t).pipe(U(this.destroyRef)).subscribe({next:e=>{this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??null),this.authTypeControl.setValue(e.authType),this.clearCredentialControls(),this.initialCredentials={},this.isLoading.set(false),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:true});},error:e=>{console.warn(`[AuthSettingForm] Could not hydrate from template ${t}:`,e),this.isLoading.set(false),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:true});}});}applyConfigToForm(t){switch(this.nameControl.setValue(t.name),this.descriptionControl.setValue(t.description??null),this.authTypeControl.setValue(t.authType),this.clearCredentialControls(),this.initialCredentials={},t.authType){case "ApiKeyAuthSetting":{let e=t.apiKey??"";this.apiKeyControl.setValue(e),this.initialCredentials.apiKey=e;break}case "BasicAuthAuthSetting":{let e=t,o=e.username??"",l=e.password??"";this.usernameControl.setValue(o),this.passwordControl.setValue(l),this.initialCredentials.username=o,this.initialCredentials.password=l;break}case "BearerTokenAuthSetting":{let e=t.token??"";this.tokenControl.setValue(e),this.initialCredentials.token=e;break}case "OAuthDiscoverableAuthSetting":{let e=t;this.discoveryUrlControl.setValue(e.discoveryUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.discoveryUrl=e.discoveryUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}case "OAuthCustomAuthSetting":{let e=t;this.authorizationUrlControl.setValue(e.authorizationUrl??""),this.tokenUrlControl.setValue(e.tokenUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.authorizationUrl=e.authorizationUrl??"",this.initialCredentials.tokenUrl=e.tokenUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}case "OAuthRegisteredAuthSetting":{let e=t;this.authorizationUrlControl.setValue(e.authorizationUrl??""),this.tokenUrlControl.setValue(e.tokenUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.authorizationUrl=e.authorizationUrl??"",this.initialCredentials.tokenUrl=e.tokenUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}case "OAuthMcpDiscoverableAuthSetting":{let e=t;this.resourceUrlControl.setValue(e.resourceUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.resourceUrl=e.resourceUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}}}clearCredentialControls(){this.apiKeyControl.setValue(""),this.usernameControl.setValue(""),this.passwordControl.setValue(""),this.tokenControl.setValue(""),this.discoveryUrlControl.setValue(""),this.authorizationUrlControl.setValue(""),this.tokenUrlControl.setValue(""),this.clientIdControl.setValue(""),this.clientSecretControl.setValue(""),this.scopesControl.setValue(""),this.resourceUrlControl.setValue("");}credentialValue(t,e){if(!(this.isEditMode()&&e===this.initialCredentials[t]))return e||void 0}submit(){if(this.form.invalid||this.isSubmitting())return;if(this.isEditMode()&&!this.existingConfig?.id){this.navigateBack();return}this.isSubmitting.set(true);let t=this.nameControl.value.trim(),e=this.descriptionControl.value?.trim()||void 0,o=this.authTypeControl.value,l=this.form.getRawValue().scope,v=this.isPlatformMode?null:this.namespaceId??null,w=this.buildTypedPayload(o,t,e);(this.isEditMode()&&this.existingConfig?.id?this.state.update(this.existingConfig.id,w,this.existingConfig):this.state.create(w,l,v)).pipe(U(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(false)});}buildTypedPayload(t,e,o){let l={name:e,description:o};switch(t){case "ApiKeyAuthSetting":return x(w({},l),{authType:"ApiKeyAuthSetting",apiKey:this.credentialValue("apiKey",this.apiKeyControl.value)});case "BasicAuthAuthSetting":return x(w({},l),{authType:"BasicAuthAuthSetting",username:this.credentialValue("username",this.usernameControl.value),password:this.credentialValue("password",this.passwordControl.value)});case "BearerTokenAuthSetting":return x(w({},l),{authType:"BearerTokenAuthSetting",token:this.credentialValue("token",this.tokenControl.value)});case "OAuthDiscoverableAuthSetting":return x(w({},l),{authType:"OAuthDiscoverableAuthSetting",discoveryUrl:this.credentialValue("discoveryUrl",this.discoveryUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)});case "OAuthCustomAuthSetting":return x(w({},l),{authType:"OAuthCustomAuthSetting",authorizationUrl:this.credentialValue("authorizationUrl",this.authorizationUrlControl.value),tokenUrl:this.credentialValue("tokenUrl",this.tokenUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)});case "OAuthRegisteredAuthSetting":return x(w({},l),{authType:"OAuthRegisteredAuthSetting",authorizationUrl:this.credentialValue("authorizationUrl",this.authorizationUrlControl.value),tokenUrl:this.credentialValue("tokenUrl",this.tokenUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)});case "OAuthMcpDiscoverableAuthSetting":return x(w({},l),{authType:"OAuthMcpDiscoverableAuthSetting",resourceUrl:this.credentialValue("resourceUrl",this.resourceUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)})}}controlForField(t){return {apiKey:this.apiKeyControl,username:this.usernameControl,password:this.passwordControl,token:this.tokenControl,discoveryUrl:this.discoveryUrlControl,authorizationUrl:this.authorizationUrlControl,tokenUrl:this.tokenUrlControl,clientId:this.clientIdControl,clientSecret:this.clientSecretControl,scopes:this.scopesControl,resourceUrl:this.resourceUrlControl}[t]}cancel(){this.navigateBack();}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","auth-settings"]):this.router.navigate(["/agentos",this.namespaceId,"auth-settings"]);}trackByScope(t,e){return e.value}trackByField(t,e){return e.key}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=xw({type:i,selectors:[["agentos-auth-setting-form"]],decls:10,vars:2,consts:[[1,"auth-setting-form"],[1,"auth-setting-form__header"],["type","button","title","Back to auth settings",1,"auth-setting-form__back",3,"click"],[1,"auth-setting-form__back-icon"],[1,"auth-setting-form__title"],[1,"auth-setting-form__loading"],[1,"auth-setting-form__form",3,"formGroup"],[1,"auth-setting-form__form",3,"ngSubmit","formGroup"],[1,"auth-setting-form__scope",3,"disabled"],[1,"auth-setting-form__field"],["for","as-auth-type",1,"auth-setting-form__label"],["aria-hidden","true"],["id","as-auth-type",1,"auth-setting-form__select",3,"formControl"],[3,"value"],["for","as-name",1,"auth-setting-form__label"],["id","as-name","type","text","placeholder","e.g. GitHub OAuth App","autocomplete","off",1,"auth-setting-form__input",3,"formControl"],["for","as-description",1,"auth-setting-form__label"],["id","as-description","type","text","placeholder","Optional \u2014 short description of this auth setting","autocomplete","off",1,"auth-setting-form__input",3,"formControl"],[1,"auth-setting-form__credentials"],[1,"auth-setting-form__actions"],["type","submit",1,"auth-setting-form__btn","auth-setting-form__btn--primary",3,"disabled"],["type","button",1,"auth-setting-form__btn",3,"click"],[1,"auth-setting-form__label"],[1,"auth-setting-form__scope-option"],["type","radio",3,"formControl","value","disabled"],[1,"auth-setting-form__credentials-hint"],[1,"auth-setting-form__label",3,"for"],[3,"id","type","placeholder","formControl","autocomplete"],[1,"auth-setting-form__field-hint",3,"id"]],template:function(e,o){e&1&&(ws(0,"div",0)(1,"header",1)(2,"button",2),Rg("click",function(){return o.cancel()}),ws(3,"span",3),GC(4,"\u2190"),pl(),GC(5," Auth Settings "),pl(),ws(6,"h1",4),GC(7),pl()(),Jw(8,se,2,0,"p",5)(9,ye,26,8,"form",6),pl()),e&2&&(XE(7),Yg(o.isEditMode()?"Edit auth setting":"New auth setting"),XE(),eC(o.isLoading()?8:9));},dependencies:[ni,Jn,Qn,ei,Ye,At,mn,Zn,Xn,Cn,En],styles:[".auth-setting-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding:1.5rem;max-width:640px}.auth-setting-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.auth-setting-form__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.4rem;background:none;border:none;cursor:pointer;color:var(--color-text-secondary);font-size:.85rem;padding:0}.auth-setting-form__back[_ngcontent-%COMP%]:hover{color:var(--color-primary)}.auth-setting-form__back-icon[_ngcontent-%COMP%]{font-size:1rem}.auth-setting-form__title[_ngcontent-%COMP%]{font-size:1.4rem;font-weight:600;color:var(--color-text);margin:0}.auth-setting-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.9rem}.auth-setting-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.auth-setting-form__scope[_ngcontent-%COMP%]{border:1px solid var(--color-border);border-radius:8px;padding:.75rem 1rem;display:flex;flex-direction:column;gap:.5rem}.auth-setting-form__scope[_ngcontent-%COMP%] legend[_ngcontent-%COMP%]{padding:0 .25rem}.auth-setting-form__scope-option[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;cursor:pointer;font-size:.9rem;color:var(--color-text)}.auth-setting-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.35rem}.auth-setting-form__field-hint[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary);margin:0;line-height:1.4}.auth-setting-form__label[_ngcontent-%COMP%]{font-size:.85rem;font-weight:500;color:var(--color-text-secondary)}.auth-setting-form__input[_ngcontent-%COMP%]{border:1px solid var(--color-border);border-radius:6px;padding:.5rem .75rem;background:var(--color-bg-secondary);color:var(--color-text);font-size:.9rem;outline:none;transition:border-color .15s ease;width:100%;box-sizing:border-box}.auth-setting-form__input[_ngcontent-%COMP%]:focus{border-color:var(--color-primary)}.auth-setting-form__input--secret[_ngcontent-%COMP%]{font-family:monospace;letter-spacing:.05em}.auth-setting-form__select[_ngcontent-%COMP%]{border:1px solid var(--color-border);border-radius:6px;padding:.5rem .75rem;background:var(--color-bg-secondary);color:var(--color-text);font-size:.9rem;outline:none;cursor:pointer;transition:border-color .15s ease}.auth-setting-form__select[_ngcontent-%COMP%]:focus{border-color:var(--color-primary)}.auth-setting-form__credentials[_ngcontent-%COMP%]{border:1px solid var(--color-border);border-radius:8px;padding:.75rem 1rem 1rem;display:flex;flex-direction:column;gap:.75rem;margin:0}.auth-setting-form__credentials[_ngcontent-%COMP%] legend[_ngcontent-%COMP%]{padding:0 .25rem}.auth-setting-form__credentials-hint[_ngcontent-%COMP%]{font-size:.78rem;color:var(--color-text-secondary);margin:0}.auth-setting-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;align-items:center;padding-top:.5rem}.auth-setting-form__btn[_ngcontent-%COMP%]{border:1px solid var(--color-border);border-radius:6px;padding:.5rem 1.25rem;cursor:pointer;font-size:.9rem;font-weight:500;background:var(--color-bg-secondary);color:var(--color-text);transition:background .15s ease}.auth-setting-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover)}.auth-setting-form__btn[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.auth-setting-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-primary);color:var(--color-on-primary, #fff);border-color:var(--color-primary)}.auth-setting-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover, var(--color-primary))}"]})};
|
|
1
|
+
import {v}from'./chunk-BY47yNsu.js';import {R,q,J}from'./chunk-DpSzd2vn.js';import {g,ao as W,F,C as Ce$1,G as Gi,a as F$1,m as mT,cd as Hf,b as U,x,w,e as xw,k as ws,q as Rg,n as GC,o as pl,J as Jw,X as XE,a8 as Yg,v as eC,a9 as lC,s as rC,a4 as nC,a3 as VI,S as Sg,ac as gC,u as bg,a6 as UI,y as oC,a5 as vl,cH as Kw,aa as If,ab as wf,b$ as kC,T as Tg}from'./main-5MNGHNLY.js';import'./chunk-CUSpXmFJ.js';import {k as _t,b as _e$1,o as z,n as ni,J as Jn,Q as Qn,e as ei,Y as Ye,A as At,m as mn,Z as Zn,l as Xn,C as Cn,E as En}from'./chunk-BEDBkVgu.js';import'./chunk-DRsOVECa.js';import'./chunk-Co7LObXe.js';import'./chunk-Ch_3uDw1.js';import'./chunk-Di5xhd_-.js';function se(i,t){i&1&&(ws(0,"p",5),GC(1,"Loading\u2026"),pl());}function ce(i,t){if(i&1&&(ws(0,"label",23),Sg(1,"input",24),VI(),ws(2,"span"),GC(3),pl()()),i&2){let e=t.$implicit,o=gC(3);XE(),bg("formControl",o.scopeControl)("value",e.value)("disabled",e.value==="namespace"&&!o.isAdmin()),UI(),XE(2),Yg(e.label);}}function de(i,t){if(i&1&&(ws(0,"fieldset",8)(1,"legend",22),GC(2,"Configuration scope"),pl(),rC(3,ce,4,4,"label",23,Kw().trackByScope,true),pl()),i&2){let e=gC(2);bg("disabled",e.isEditMode()),XE(3),oC(e.scopeOptions);}}function ue(i,t){if(i&1&&(ws(0,"option",13),GC(1),pl()),i&2){let e=t.$implicit,o=gC(2);bg("value",e),XE(),Yg(o.authTypeLabel[e]);}}function pe(i,t){i&1&&GC(0," Leave a field unchanged to keep the stored credential. ");}function he(i,t){i&1&&(ws(0,"span",11),GC(1,"*"),pl());}function me(i,t){if(i&1&&(ws(0,"p",28),GC(1),pl()),i&2){let e=gC(2).$implicit;bg("id","as-hint-"+e.key),XE(),Yg(e.hint);}}function ge(i,t){if(i&1&&(Sg(0,"input",27),VI(),Jw(1,me,2,2,"p",28)),i&2){let e=gC().$implicit;kC("auth-setting-form__input"+(e.secret?" auth-setting-form__input--secret":"")),bg("id","as-cred-"+e.key)("type",e.secret?"password":"text")("placeholder",e.placeholder)("formControl",t)("autocomplete",e.secret?"new-password":"off"),Tg("aria-describedby",e.hint?"as-hint-"+e.key:null),UI(),XE(),eC(e.hint?1:-1);}}function Ce(i,t){if(i&1&&(ws(0,"div",9)(1,"label",26),GC(2),Jw(3,he,2,0,"span",11),pl(),Jw(4,ge,2,9),pl()),i&2){let e,o=t.$implicit,l=gC(3);XE(),bg("for","as-cred-"+o.key),XE(),vl(" ",o.label," "),XE(),eC(o.required?3:-1),XE(),eC((e=l.controlForField(o.key))?4:-1,e);}}function fe(i,t){if(i&1&&(ws(0,"fieldset",18)(1,"legend",22),GC(2,"Credentials"),pl(),ws(3,"p",25),GC(4," Values are stored encrypted and masked on read. "),Jw(5,pe,1,0),pl(),rC(6,Ce,5,4,"div",9,Kw().trackByField,true),pl()),i&2){let e=gC(2);XE(5),eC(e.isEditMode()?5:-1),XE(),oC(e.credentialFields());}}function ye(i,t){if(i&1){let e=lC();ws(0,"form",7),Rg("ngSubmit",function(){If(e);let l=gC();return wf(l.submit())}),Jw(1,de,5,1,"fieldset",8),ws(2,"div",9)(3,"label",10),GC(4,"Auth type "),ws(5,"span",11),GC(6,"*"),pl()(),ws(7,"select",12),rC(8,ue,2,2,"option",13,nC),pl(),VI(),pl(),ws(10,"div",9)(11,"label",14),GC(12,"Name "),ws(13,"span",11),GC(14,"*"),pl()(),Sg(15,"input",15),VI(),pl(),ws(16,"div",9)(17,"label",16),GC(18,"Description"),pl(),Sg(19,"input",17),VI(),pl(),Jw(20,fe,8,1,"fieldset",18),ws(21,"div",19)(22,"button",20),GC(23),pl(),ws(24,"button",21),Rg("click",function(){If(e);let l=gC();return wf(l.cancel())}),GC(25,"Cancel"),pl()()();}if(i&2){let e=gC();bg("formGroup",e.form),XE(),eC(e.isPlatformMode?-1:1),XE(6),bg("formControl",e.authTypeControl),UI(),XE(),oC(e.authTypeOptions),XE(7),bg("formControl",e.nameControl),UI(),XE(4),bg("formControl",e.descriptionControl),UI(),XE(),eC(e.credentialFields().length>0?20:-1),XE(2),bg("disabled",e.form.invalid||e.isSubmitting()),XE(),vl(" ",e.isEditMode()?"Save changes":"Create"," ");}}var _e=new Set(["namespace","userOnNs","userGlobal"]),P=Object.freeze({platform:"Platform (read-only)",namespace:"Namespace configuration",userOnNs:"Personal \u2014 this namespace only",userGlobal:"Personal \u2014 all namespaces"}),Se={ApiKeyAuthSetting:[{key:"apiKey",label:"API Key",placeholder:"sk-\u2026",secret:true,required:false}],BasicAuthAuthSetting:[{key:"username",label:"Username",placeholder:"user@example.com",secret:false,required:false},{key:"password",label:"Password",placeholder:"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",secret:true,required:false}],BearerTokenAuthSetting:[{key:"token",label:"Bearer token",placeholder:"eyJ\u2026",secret:true,required:false}],OAuthDiscoverableAuthSetting:[{key:"discoveryUrl",label:"Discovery URL",placeholder:"https://\u2026/.well-known/openid-configuration",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Space-separated OAuth scopes to request (e.g. openid profile email). Check your provider's documentation for the exact values.",secret:false,required:false}],OAuthCustomAuthSetting:[{key:"authorizationUrl",label:"Authorization URL",placeholder:"https://\u2026/authorize",secret:false,required:false},{key:"tokenUrl",label:"Token URL",placeholder:"https://\u2026/token",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Space-separated OAuth scopes to request (e.g. openid profile email). Check your provider's documentation for the exact values.",secret:false,required:false}],OAuthRegisteredAuthSetting:[{key:"authorizationUrl",label:"Authorization URL",placeholder:"https://\u2026/authorize",secret:false,required:false},{key:"tokenUrl",label:"Token URL",placeholder:"https://\u2026/token",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Space-separated OAuth scopes to request (e.g. openid profile email). Check your provider's documentation for the exact values.",secret:false,required:false}],OAuthMcpDiscoverableAuthSetting:[{key:"resourceUrl",label:"Resource URL",placeholder:"https://mcp.example.com",hint:"Use the base URL exactly as documented by your provider \u2014 do not append a path suffix. Examples: https://mcp.hubspot.com (HubSpot), https://mcp.atlassian.com/v1/mcp (Atlassian).",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",hint:"Leave empty to let the server register an OAuth client automatically (RFC 7591 dynamic registration). Fill in only if you have a pre-registered client ID from your provider.",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Leave empty in most cases \u2014 the MCP server declares the required scopes itself. Fill in only if your provider explicitly requires client-declared scopes.",secret:false,required:false}]},le=class i{route=g(W);router=g(F);destroyRef=g(Ce$1);state=g(R);namespaceRole=g(v);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=this.namespaceId===void 0;isAdmin=this.isPlatformMode?Gi(true):F$1(this.namespaceRole.isAdminOfNamespace$(this.namespaceId),{initialValue:false});authTypeOptions=q;authTypeLabel=J;scopeOptions=[{value:"namespace",label:P.namespace},{value:"userOnNs",label:P.userOnNs},{value:"userGlobal",label:P.userGlobal}];nameControl=new _t("",{nonNullable:true,validators:[_e$1.required,_e$1.minLength(1)]});descriptionControl=new _t(null);authTypeControl=new _t("ApiKeyAuthSetting",{nonNullable:true,validators:[_e$1.required]});scopeControl=new _t("namespace",{nonNullable:true});form=new z({name:this.nameControl,description:this.descriptionControl,authType:this.authTypeControl,scope:this.scopeControl});apiKeyControl=new _t("",{nonNullable:true});usernameControl=new _t("",{nonNullable:true});passwordControl=new _t("",{nonNullable:true});tokenControl=new _t("",{nonNullable:true});discoveryUrlControl=new _t("",{nonNullable:true});authorizationUrlControl=new _t("",{nonNullable:true});tokenUrlControl=new _t("",{nonNullable:true});clientIdControl=new _t("",{nonNullable:true});clientSecretControl=new _t("",{nonNullable:true});scopesControl=new _t("",{nonNullable:true});resourceUrlControl=new _t("",{nonNullable:true});selectedAuthType=F$1(this.authTypeControl.valueChanges,{initialValue:this.authTypeControl.value});credentialFields=mT(()=>Se[this.selectedAuthType()]);isEditMode=Gi(false);isSubmitting=Gi(false);isLoading=Gi(false);existingConfig=null;initialCredentials={};constructor(){this.isPlatformMode||Hf(()=>{this.isAdmin()||this.isEditMode()||this.scopeControl.value==="namespace"&&this.scopeControl.setValue("userOnNs");});}ngOnInit(){this.namespaceId&&this.state.setNamespace(this.namespaceId);let t=this.route.snapshot.paramMap,e=this.route.snapshot.queryParamMap,o=t.get("authSettingId");if(o){this.isEditMode.set(true),this.scopeControl.disable(),this.authTypeControl.disable(),this.loadConfig(o);return}if(this.isPlatformMode){this.scopeControl.setValue("platform"),this.scopeControl.disable();return}let l=this.parseScope(e.get("scope"));this.scopeControl.setValue(l);let v=e.get("template");v&&this.hydrateFromTemplate(v);}parseScope(t){return t&&_e.has(t)?t:"namespace"}deriveScopeFromConfig(t){return !t.userId&&!t.namespaceId?"platform":t.userId?t.namespaceId?"userOnNs":"userGlobal":"namespace"}loadConfig(t){this.isLoading.set(true),this.state.getById(t).pipe(U(this.destroyRef)).subscribe({next:e=>{this.existingConfig=e,this.scopeControl.setValue(this.deriveScopeFromConfig(e)),this.applyConfigToForm(e),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),console.warn(`[AuthSettingForm] Could not load auth setting '${t}' \u2014 navigating back`),this.navigateBack();}});}hydrateFromTemplate(t){this.isLoading.set(true),this.state.getById(t).pipe(U(this.destroyRef)).subscribe({next:e=>{this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??null),this.authTypeControl.setValue(e.authType),this.clearCredentialControls(),this.initialCredentials={},this.isLoading.set(false),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:true});},error:e=>{console.warn(`[AuthSettingForm] Could not hydrate from template ${t}:`,e),this.isLoading.set(false),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:true});}});}applyConfigToForm(t){switch(this.nameControl.setValue(t.name),this.descriptionControl.setValue(t.description??null),this.authTypeControl.setValue(t.authType),this.clearCredentialControls(),this.initialCredentials={},t.authType){case "ApiKeyAuthSetting":{let e=t.apiKey??"";this.apiKeyControl.setValue(e),this.initialCredentials.apiKey=e;break}case "BasicAuthAuthSetting":{let e=t,o=e.username??"",l=e.password??"";this.usernameControl.setValue(o),this.passwordControl.setValue(l),this.initialCredentials.username=o,this.initialCredentials.password=l;break}case "BearerTokenAuthSetting":{let e=t.token??"";this.tokenControl.setValue(e),this.initialCredentials.token=e;break}case "OAuthDiscoverableAuthSetting":{let e=t;this.discoveryUrlControl.setValue(e.discoveryUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.discoveryUrl=e.discoveryUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}case "OAuthCustomAuthSetting":{let e=t;this.authorizationUrlControl.setValue(e.authorizationUrl??""),this.tokenUrlControl.setValue(e.tokenUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.authorizationUrl=e.authorizationUrl??"",this.initialCredentials.tokenUrl=e.tokenUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}case "OAuthRegisteredAuthSetting":{let e=t;this.authorizationUrlControl.setValue(e.authorizationUrl??""),this.tokenUrlControl.setValue(e.tokenUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.authorizationUrl=e.authorizationUrl??"",this.initialCredentials.tokenUrl=e.tokenUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}case "OAuthMcpDiscoverableAuthSetting":{let e=t;this.resourceUrlControl.setValue(e.resourceUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.resourceUrl=e.resourceUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}}}clearCredentialControls(){this.apiKeyControl.setValue(""),this.usernameControl.setValue(""),this.passwordControl.setValue(""),this.tokenControl.setValue(""),this.discoveryUrlControl.setValue(""),this.authorizationUrlControl.setValue(""),this.tokenUrlControl.setValue(""),this.clientIdControl.setValue(""),this.clientSecretControl.setValue(""),this.scopesControl.setValue(""),this.resourceUrlControl.setValue("");}credentialValue(t,e){if(!(this.isEditMode()&&e===this.initialCredentials[t]))return e||void 0}submit(){if(this.form.invalid||this.isSubmitting())return;if(this.isEditMode()&&!this.existingConfig?.id){this.navigateBack();return}this.isSubmitting.set(true);let t=this.nameControl.value.trim(),e=this.descriptionControl.value?.trim()||void 0,o=this.authTypeControl.value,l=this.form.getRawValue().scope,v=this.isPlatformMode?null:this.namespaceId??null,w=this.buildTypedPayload(o,t,e);(this.isEditMode()&&this.existingConfig?.id?this.state.update(this.existingConfig.id,w,this.existingConfig):this.state.create(w,l,v)).pipe(U(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(false)});}buildTypedPayload(t,e,o){let l={name:e,description:o};switch(t){case "ApiKeyAuthSetting":return x(w({},l),{authType:"ApiKeyAuthSetting",apiKey:this.credentialValue("apiKey",this.apiKeyControl.value)});case "BasicAuthAuthSetting":return x(w({},l),{authType:"BasicAuthAuthSetting",username:this.credentialValue("username",this.usernameControl.value),password:this.credentialValue("password",this.passwordControl.value)});case "BearerTokenAuthSetting":return x(w({},l),{authType:"BearerTokenAuthSetting",token:this.credentialValue("token",this.tokenControl.value)});case "OAuthDiscoverableAuthSetting":return x(w({},l),{authType:"OAuthDiscoverableAuthSetting",discoveryUrl:this.credentialValue("discoveryUrl",this.discoveryUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)});case "OAuthCustomAuthSetting":return x(w({},l),{authType:"OAuthCustomAuthSetting",authorizationUrl:this.credentialValue("authorizationUrl",this.authorizationUrlControl.value),tokenUrl:this.credentialValue("tokenUrl",this.tokenUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)});case "OAuthRegisteredAuthSetting":return x(w({},l),{authType:"OAuthRegisteredAuthSetting",authorizationUrl:this.credentialValue("authorizationUrl",this.authorizationUrlControl.value),tokenUrl:this.credentialValue("tokenUrl",this.tokenUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)});case "OAuthMcpDiscoverableAuthSetting":return x(w({},l),{authType:"OAuthMcpDiscoverableAuthSetting",resourceUrl:this.credentialValue("resourceUrl",this.resourceUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)})}}controlForField(t){return {apiKey:this.apiKeyControl,username:this.usernameControl,password:this.passwordControl,token:this.tokenControl,discoveryUrl:this.discoveryUrlControl,authorizationUrl:this.authorizationUrlControl,tokenUrl:this.tokenUrlControl,clientId:this.clientIdControl,clientSecret:this.clientSecretControl,scopes:this.scopesControl,resourceUrl:this.resourceUrlControl}[t]}cancel(){this.navigateBack();}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","auth-settings"]):this.router.navigate(["/agentos",this.namespaceId,"auth-settings"]);}trackByScope(t,e){return e.value}trackByField(t,e){return e.key}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=xw({type:i,selectors:[["agentos-auth-setting-form"]],decls:10,vars:2,consts:[[1,"auth-setting-form"],[1,"auth-setting-form__header"],["type","button","title","Back to auth settings",1,"auth-setting-form__back",3,"click"],[1,"auth-setting-form__back-icon"],[1,"auth-setting-form__title"],[1,"auth-setting-form__loading"],[1,"auth-setting-form__form",3,"formGroup"],[1,"auth-setting-form__form",3,"ngSubmit","formGroup"],[1,"auth-setting-form__scope",3,"disabled"],[1,"auth-setting-form__field"],["for","as-auth-type",1,"auth-setting-form__label"],["aria-hidden","true"],["id","as-auth-type",1,"auth-setting-form__select",3,"formControl"],[3,"value"],["for","as-name",1,"auth-setting-form__label"],["id","as-name","type","text","placeholder","e.g. GitHub OAuth App","autocomplete","off",1,"auth-setting-form__input",3,"formControl"],["for","as-description",1,"auth-setting-form__label"],["id","as-description","type","text","placeholder","Optional \u2014 short description of this auth setting","autocomplete","off",1,"auth-setting-form__input",3,"formControl"],[1,"auth-setting-form__credentials"],[1,"auth-setting-form__actions"],["type","submit",1,"auth-setting-form__btn","auth-setting-form__btn--primary",3,"disabled"],["type","button",1,"auth-setting-form__btn",3,"click"],[1,"auth-setting-form__label"],[1,"auth-setting-form__scope-option"],["type","radio",3,"formControl","value","disabled"],[1,"auth-setting-form__credentials-hint"],[1,"auth-setting-form__label",3,"for"],[3,"id","type","placeholder","formControl","autocomplete"],[1,"auth-setting-form__field-hint",3,"id"]],template:function(e,o){e&1&&(ws(0,"div",0)(1,"header",1)(2,"button",2),Rg("click",function(){return o.cancel()}),ws(3,"span",3),GC(4,"\u2190"),pl(),GC(5," Auth Settings "),pl(),ws(6,"h1",4),GC(7),pl()(),Jw(8,se,2,0,"p",5)(9,ye,26,8,"form",6),pl()),e&2&&(XE(7),Yg(o.isEditMode()?"Edit auth setting":"New auth setting"),XE(),eC(o.isLoading()?8:9));},dependencies:[ni,Jn,Qn,ei,Ye,At,mn,Zn,Xn,Cn,En],styles:[".auth-setting-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding:1.5rem;max-width:640px}.auth-setting-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.auth-setting-form__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.4rem;background:none;border:none;cursor:pointer;color:var(--color-text-secondary);font-size:.85rem;padding:0}.auth-setting-form__back[_ngcontent-%COMP%]:hover{color:var(--color-primary)}.auth-setting-form__back-icon[_ngcontent-%COMP%]{font-size:1rem}.auth-setting-form__title[_ngcontent-%COMP%]{font-size:1.4rem;font-weight:600;color:var(--color-text);margin:0}.auth-setting-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.9rem}.auth-setting-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.auth-setting-form__scope[_ngcontent-%COMP%]{border:1px solid var(--color-border);border-radius:8px;padding:.75rem 1rem;display:flex;flex-direction:column;gap:.5rem}.auth-setting-form__scope[_ngcontent-%COMP%] legend[_ngcontent-%COMP%]{padding:0 .25rem}.auth-setting-form__scope-option[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;cursor:pointer;font-size:.9rem;color:var(--color-text)}.auth-setting-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.35rem}.auth-setting-form__field-hint[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary);margin:0;line-height:1.4}.auth-setting-form__label[_ngcontent-%COMP%]{font-size:.85rem;font-weight:500;color:var(--color-text-secondary)}.auth-setting-form__input[_ngcontent-%COMP%]{border:1px solid var(--color-border);border-radius:6px;padding:.5rem .75rem;background:var(--color-bg-secondary);color:var(--color-text);font-size:.9rem;outline:none;transition:border-color .15s ease;width:100%;box-sizing:border-box}.auth-setting-form__input[_ngcontent-%COMP%]:focus{border-color:var(--color-primary)}.auth-setting-form__input--secret[_ngcontent-%COMP%]{font-family:monospace;letter-spacing:.05em}.auth-setting-form__select[_ngcontent-%COMP%]{border:1px solid var(--color-border);border-radius:6px;padding:.5rem .75rem;background:var(--color-bg-secondary);color:var(--color-text);font-size:.9rem;outline:none;cursor:pointer;transition:border-color .15s ease}.auth-setting-form__select[_ngcontent-%COMP%]:focus{border-color:var(--color-primary)}.auth-setting-form__credentials[_ngcontent-%COMP%]{border:1px solid var(--color-border);border-radius:8px;padding:.75rem 1rem 1rem;display:flex;flex-direction:column;gap:.75rem;margin:0}.auth-setting-form__credentials[_ngcontent-%COMP%] legend[_ngcontent-%COMP%]{padding:0 .25rem}.auth-setting-form__credentials-hint[_ngcontent-%COMP%]{font-size:.78rem;color:var(--color-text-secondary);margin:0}.auth-setting-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;align-items:center;padding-top:.5rem}.auth-setting-form__btn[_ngcontent-%COMP%]{border:1px solid var(--color-border);border-radius:6px;padding:.5rem 1.25rem;cursor:pointer;font-size:.9rem;font-weight:500;background:var(--color-bg-secondary);color:var(--color-text);transition:background .15s ease}.auth-setting-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover)}.auth-setting-form__btn[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.auth-setting-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-primary);color:var(--color-on-primary, #fff);border-color:var(--color-primary)}.auth-setting-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover, var(--color-primary))}"]})};
|
|
2
2
|
export{le as AuthSettingFormComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {N}from'./chunk-CUSpXmFJ.js';import {g,ao as W,F,dt as F$1,da as $,C as Ce,G as Gi,b as U,av as B,du as Ny,e as xw,aw as hl,cJ as Og,n as GC,ax as gl,b6 as _g,J as Jw,X as XE,c0 as xg,v as eC,a5 as vl,ac as gC}from'./main-5MNGHNLY.js';import'./chunk-Co7LObXe.js';import'./chunk-Ch_3uDw1.js';import'./chunk-Di5xhd_-.js';import'./chunk-BEDBkVgu.js';function w(l,o){if(l&1&&(hl(0,"p",10),GC(1),gl()),l&2){let i=gC();XE(),vl(" ",i.launchError()," ");}}var O=class l{route=g(W);router=g(F);caseController=g(F$1);caseState=g(N);agentConfigController=g($);destroyRef=g(Ce);namespaceId=this.route.snapshot.params.namespaceId;agentConfigId=this.route.snapshot.params.agentConfigId;resolvedAgentConfig=null;payloadJson=Gi("");launchError=Gi(null);isLaunching=Gi(false);isLoading=Gi(false);ngOnInit(){this.isLoading.set(true),this.agentConfigController.getByIdAgentConfig(this.agentConfigId).pipe(U(this.destroyRef)).subscribe({next:o=>{this.resolvedAgentConfig=o,o.loopConfig!=null&&this.payloadJson.set(JSON.stringify(o.loopConfig,null,2)),this.isLoading.set(false);},error:()=>{this.isLoading.set(false);}});}launch(){return B(this,null,function*(){this.launchError.set(null),this.isLaunching.set(true);try{let o=this.resolvedAgentConfig??(yield Ny(this.agentConfigController.getByIdAgentConfig(this.agentConfigId))),i=yield Ny(this.caseController.createCase({namespaceId:this.namespaceId}));this.caseState.addCase(i);let e=i.id??"",d={content:`@${o.name} start`};yield Ny(this.caseController.addMessageCase(e,d)),this.router.navigate(["/agentos/home"],{queryParams:{ns:this.namespaceId,case:e}});}catch(o){console.error("[AgentConfigLaunch] Failed to launch loop agent",o),this.launchError.set("Failed to launch the agent loop. Please check the console for details."),this.isLaunching.set(false);}})}back(){this.router.navigate(["/agentos",this.namespaceId,"agent-configs",this.agentConfigId,"edit"]);}static \u0275fac=function(i){return new(i||l)};static \u0275cmp=xw({type:l,selectors:[["agentos-agent-config-launch"]],decls:23,vars:6,consts:[[1,"agent-config-launch"],[1,"agent-config-launch__header"],["type","button","title","Back to agent config",1,"agent-config-launch__back",3,"click"],[1,"agent-config-launch__back-icon"],[1,"agent-config-launch__title"],[1,"agent-config-launch__intro"],[1,"agent-config-launch__code"],[1,"agent-config-launch__field"],["for","agent-loop-payload",1,"agent-config-launch__label"],["id","agent-loop-payload","rows","15","readonly","","spellcheck","false","autocomplete","off",1,"agent-config-launch__textarea",3,"value","disabled"],["role","alert",1,"agent-config-launch__error","agent-config-launch__error--banner"],[1,"agent-config-launch__actions"],["type","button",1,"agent-config-launch__btn","agent-config-launch__btn--primary",3,"click","disabled"],["type","button",1,"agent-config-launch__btn",3,"click","disabled"]],template:function(i,e){i&1&&(hl(0,"div",0)(1,"header",1)(2,"button",2),Og("click",function(){return e.back()}),hl(3,"span",3),GC(4,"\u2190"),gl(),GC(5," Edit agent config "),gl(),hl(6,"h1",4),GC(7,"Launch loop agent"),gl()(),hl(8,"p",5),GC(9," The loop configuration below is read from "),hl(10,"code",6),GC(11,"AgentConfig.loopConfig"),gl(),GC(12," and will be used by the backend when the agent loop starts. A new Case will be created and one child case will be launched per entity found. "),gl(),hl(13,"div",7)(14,"label",8),GC(15,"Loop configuration (read-only)"),gl(),_g(16,"textarea",9),gl(),Jw(17,w,2,1,"p",10),hl(18,"div",11)(19,"button",12),Og("click",function(){return e.launch()}),GC(20),gl(),hl(21,"button",13),Og("click",function(){return e.back()}),GC(22,"Cancel"),gl()()()),i&2&&(XE(16),xg("value",e.payloadJson())("disabled",e.isLaunching()||e.isLoading()),XE(),eC(e.launchError()?17:-1),XE(2),xg("disabled",e.isLaunching()),XE(),vl(" ",e.isLaunching()?"Launching\u2026":"Launch"," "),XE(),xg("disabled",e.isLaunching()));},styles:[".agent-config-launch[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.75rem;max-width:720px;margin:0 auto;padding:2rem 1rem}.agent-config-launch__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.agent-config-launch__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;font-family:inherit;color:var(--color-accent, #2563eb)}.agent-config-launch__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.agent-config-launch__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.agent-config-launch__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:700;color:var(--color-text);letter-spacing:-.02em}.agent-config-launch__intro[_ngcontent-%COMP%]{margin:0;font-size:.9rem;color:var(--color-text-secondary);line-height:1.5}.agent-config-launch__code[_ngcontent-%COMP%]{font-family:var(--font-heading, monospace);font-size:.85em;background:var(--color-surface-muted, rgba(0, 0, 0, .06));padding:.1em .35em}.agent-config-launch__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.agent-config-launch__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text)}.agent-config-launch__textarea[_ngcontent-%COMP%]{width:100%;padding:.75rem 1rem;border:1px solid var(--color-divider);background:var(--color-surface-muted, rgba(0, 0, 0, .03));color:var(--color-text-secondary);font-family:var(--font-heading, monospace);font-size:.8125rem;line-height:1.6;resize:vertical;outline:none;box-sizing:border-box;cursor:default}.agent-config-launch__textarea[_ngcontent-%COMP%]:disabled{opacity:.6;cursor:not-allowed}.agent-config-launch__error[_ngcontent-%COMP%]{margin:.25rem 0 0;font-size:.8125rem;color:var(--color-error, var(--red, #dc2626));line-height:1.4}.agent-config-launch__error--banner[_ngcontent-%COMP%]{padding:.75rem 1rem;background:color-mix(in srgb,var(--color-error, #dc2626) 8%,transparent);border:1px solid color-mix(in srgb,var(--color-error, #dc2626) 25%,transparent);border-left:3px solid var(--color-error, #dc2626)}.agent-config-launch__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem}.agent-config-launch__btn[_ngcontent-%COMP%]{padding:.6rem 1.5rem;border:1px solid var(--color-divider);background:transparent;color:var(--color-text);font-size:13px;font-family:var(--font-heading);font-weight:600;cursor:pointer;transition:background .15s ease,border-color .15s ease}.agent-config-launch__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover);border-color:var(--color-neutral-500)}.agent-config-launch__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.agent-config-launch__btn--primary[_ngcontent-%COMP%]{background:var(--color-warning, #f59e0b);border-color:var(--color-warning, #f59e0b);color:#fff}.agent-config-launch__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:color-mix(in srgb,var(--color-warning, #f59e0b) 80%,black);border-color:color-mix(in srgb,var(--color-warning, #f59e0b) 80%,black)}"]})};export{O as AgentConfigLaunchComponent};
|