diff --git a/dist/2564.fd5c45e1a46b96b1.js b/dist/2564.fd5c45e1a46b96b1.js new file mode 100644 index 00000000..cc2a0934 --- /dev/null +++ b/dist/2564.fd5c45e1a46b96b1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdf_admin_interface=self.webpackChunkdf_admin_interface||[]).push([[2564],{42564:(Wn,Le,g)=>{g.r(Le),g.d(Le,{DfMcpRouteShimComponent:()=>Nf});var d=g(18331),ve=g(18724),re=g(21406),m=g(78227),j=g(29167),fe=g(28600),O=g(54688),E=g(453),G=g(91900),X=g(60368),oe=g(96984),D=g(31147),e=g(1843),u=g(68660),w=g(54342),b=g(94093),S=g(98337),H=g(97828),ct=g(33492),Ge=g(28930),z=g(12324),Qn=g(97195),h=g(62633),Pe=g(69069),Z=g(7263),P=g(58497),ee=g(62572),je=g(69099),Ne=g(23135),R=g(52483),Fe=g(14087),we=g(80972),st=g(73475),De=g(56579),Kt=g(89905);let Jt=(()=>{class n{constructor(t,o){this.http=t,this.userDataService=o,this.excludedServices=["logs","log"]}getAbsoluteApiUrl(t){const c=`${window.location.origin}/${(t.startsWith("/")?t.substring(1):t).replace(/^(dreamfactory\/dist\/)?/,"")}`;return console.log(`\u{1f50d} Constructed absolute URL for API request: ${c}`),c}isSelectableFileService(t){return!this.excludedServices.some(o=>t.name.toLowerCase().includes(o)||t.label.toLowerCase().includes(o))}getHeaders(){const t={},o=this.userDataService.token;return o&&(t[st.Zl]=o),console.log("Auth headers:",t),t}getFileServices(){console.log("Getting file services, session token:",this.userDataService.token);const t={resource:[{id:3,name:"files",label:"Local File Storage",type:"local_file"}]};return this.userDataService.token?new Ne.c(o=>{o.next(t);const i=`${window.location.origin}/api/v2/system/service`;console.log(`Loading file services from absolute URL: ${i}`);const c=this.getHeaders();this.http.get(i,{params:{filter:"type=local_file",fields:"id,name,label,type"},headers:c}).pipe((0,z.T)(s=>s&&s.resource&&Array.isArray(s.resource)?(s.resource=s.resource.filter(l=>this.isSelectableFileService(l)),0===s.resource.length?(console.warn("No valid file services found in API response, using defaults"),t):s):(console.warn("Invalid response format from API, using default services"),t)),(0,R.W)(s=>(console.error("Error fetching file services:",s),console.warn("API call failed, using default file services"),new Ne.c(l=>{l.next(t),l.complete()})))).subscribe({next:s=>{JSON.stringify(s)!==JSON.stringify(t)&&o.next(s),o.complete()},error:()=>{o.complete()}})}):(console.warn("No session token available, using hardcoded file services"),new Ne.c(o=>{o.next(t),o.complete()}))}listFiles(t,o=""){if(!t)return console.warn("No service name provided for listFiles, returning empty list"),new Ne.c(p=>{p.next({resource:[]}),p.complete()});const i=o?`api/v2/${t}/${o}`:`api/v2/${t}`;console.log(`Listing files from path: ${i}`);const r=`${window.location.origin}/${i}`;console.log(`Using absolute URL: ${r}`);const s={},l=this.userDataService.token;return l&&(s[st.Zl]=l),this.http.get(r,{headers:s,params:{include_properties:"content_type",fields:"name,path,type,content_type,last_modified,size"}}).pipe((0,Fe.M)(p=>console.log("Files response:",p)),(0,R.W)(p=>{console.error(`Error fetching files from ${r}:`,p);let f="Error loading files. ";return f+=500===p.status?"The server encountered an internal error. This might be a temporary issue.":404===p.status?"The specified folder does not exist.":403===p.status||401===p.status?"You do not have permission to access this location.":"Please check your connection and try again.",console.warn(f),new Ne.c(M=>{M.next({resource:[],error:f}),M.complete()})}))}uploadFile(t,o,i=""){let r;r=i?`api/v2/${t}/${i.replace(/\/$/,"")}/${o.name}`:`api/v2/${t}/${o.name}`;const c=this.getAbsoluteApiUrl(r);console.log(`\u2b50\u2b50\u2b50 UPLOADING FILE ${o.name} (${o.size} bytes), type: ${o.type} \u2b50\u2b50\u2b50`),console.log(`To absolute URL: ${c}`),console.log(`Current document baseURI: ${document.baseURI}`),console.log(`Current window location: ${window.location.href}`),(o.name.endsWith(".pem")||o.name.endsWith(".p8")||o.name.endsWith(".key"))&&console.log("Detected private key file - using standard FormData upload method");const l=new FormData;l.append("files",o);const p=this.getHeaders();return this.http.post(c,l,{headers:p}).pipe((0,Fe.M)(f=>console.log("Upload complete with response:",f)),(0,R.W)(f=>(console.error(`Error uploading file: ${f.status} ${f.statusText}`,f),(0,we.$)(()=>(0,De.cQ)(f)))))}createDirectoryWithPost(t,o,i){const r={resource:[{name:i,type:"folder"}]},s=this.getAbsoluteApiUrl(o?`api/v2/${t}/${o}`:`api/v2/${t}`);console.log(`Creating directory using POST at absolute URL: ${s}`,r);const l=this.getHeaders();return l["X-Http-Method"]="POST",this.http.post(s,r,{headers:l}).pipe((0,Fe.M)(p=>console.log("Create directory response:",p)),(0,R.W)(p=>{throw console.error(`Error creating directory at ${s}:`,p),p}))}getFileContent(t,o){const r=this.getAbsoluteApiUrl(`api/v2/${t}/${o}`);return console.log(`Getting file content from absolute URL: ${r}`),this.http.get(r,{responseType:"blob",headers:this.getHeaders()}).pipe((0,R.W)(c=>{throw console.error(`Error getting file content from ${r}:`,c),c}))}deleteFile(t,o){const r=this.getAbsoluteApiUrl(`api/v2/${t}/${o}`);return console.log(`Deleting file at absolute URL: ${r}`),this.http.delete(r,{headers:this.getHeaders()}).pipe((0,Fe.M)(c=>console.log("Delete response:",c)),(0,R.W)(c=>{throw console.error(`Error deleting file at ${r}:`,c),c}))}createDirectory(t,o,i){const r={resource:[{name:i,type:"folder"}]},s=this.getAbsoluteApiUrl(o?`api/v2/${t}/${o}`:`api/v2/${t}`);return console.log(`Creating directory at absolute URL: ${s}`,r),this.http.post(s,r,{headers:this.getHeaders()}).pipe((0,Fe.M)(l=>console.log("Create directory response:",l)),(0,R.W)(l=>{throw console.error(`Error creating directory at ${s}:`,l),l}))}static{this.\u0275fac=function(o){return new(o||n)(e.KVO(ee.Qq),e.KVO(Kt.T))}}static{this.\u0275prov=e.jDH({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();const Zn=["fileUploadInput"];function eo(n,a){1&n&&(e.qex(0),e.j41(1,"span"),e.EFF(2,"Upload Private Key File"),e.k0s(),e.bVm())}function to(n,a){1&n&&(e.qex(0),e.j41(1,"span"),e.EFF(2,"Select File"),e.k0s(),e.bVm())}function no(n,a){if(1&n&&(e.j41(0,"small"),e.EFF(1),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.SpI(" Allowed file types: ",t.data.allowedExtensions.join(", ")," ")}}function oo(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",10),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG(2);return e.Njj(c.selectFileApi(r))}),e.j41(1,"div",11),e.nrm(2,"fa-icon",12),e.k0s(),e.j41(3,"div",13)(4,"div",14),e.EFF(5),e.k0s(),e.j41(6,"div",15),e.EFF(7),e.k0s()()()}if(2&n){const t=a.$implicit,o=e.XpG(2);e.R7$(2),e.Y8G("icon",o.faFolderOpen),e.R7$(3),e.JRh(t.label||t.name),e.R7$(2),e.JRh(t.type)}}function io(n,a){if(1&n&&(e.j41(0,"div",7)(1,"h3"),e.EFF(2,"Select a File Service"),e.k0s(),e.j41(3,"div",8),e.DNE(4,oo,8,3,"div",9),e.k0s()()),2&n){const t=e.XpG();e.R7$(4),e.Y8G("ngForOf",t.data.fileApis)}}function ao(n,a){if(1&n&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.JRh(t.currentPath)}}function ro(n,a){1&n&&(e.j41(0,"div",32)(1,"p"),e.EFF(2," Select a file from the list below. To upload new files, please use the File Manager. "),e.k0s()())}function co(n,a){1&n&&(e.j41(0,"div",33),e.nrm(1,"mat-spinner",34),e.j41(2,"div"),e.EFF(3,"Loading files..."),e.k0s()())}function so(n,a){1&n&&(e.j41(0,"th",46),e.EFF(1,"Name"),e.k0s())}function lo(n,a){if(1&n){const t=e.RV6();e.j41(0,"td",47),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG(3);return e.Njj("folder"===r.type?c.openFolder(r):c.selectFile(r))}),e.j41(1,"div",48),e.nrm(2,"fa-icon",19),e.j41(3,"span"),e.EFF(4),e.k0s()()()}if(2&n){const t=a.$implicit,o=e.XpG(3);e.R7$(2),e.Y8G("icon","folder"===t.type?o.faFolderOpen:o.faFile),e.R7$(2),e.JRh(t.name)}}function po(n,a){1&n&&(e.j41(0,"th",46),e.EFF(1,"Type"),e.k0s())}function mo(n,a){if(1&n&&(e.j41(0,"td",49),e.EFF(1),e.k0s()),2&n){const t=a.$implicit;e.R7$(1),e.SpI(" ","folder"===t.type?"Folder":t.contentType||"File"," ")}}function _o(n,a){1&n&&(e.j41(0,"th",46),e.EFF(1,"Actions"),e.k0s())}function go(n,a){if(1&n){const t=e.RV6();e.j41(0,"button",52),e.bIt("click",function(){e.eBV(t);const i=e.XpG().$implicit,r=e.XpG(3);return e.Njj(r.openFolder(i))}),e.j41(1,"mat-icon"),e.EFF(2,"folder_open"),e.k0s()()}}function fo(n,a){if(1&n){const t=e.RV6();e.j41(0,"button",53),e.bIt("click",function(){e.eBV(t);const i=e.XpG().$implicit,r=e.XpG(3);return e.Njj(r.selectFile(i))}),e.j41(1,"mat-icon"),e.EFF(2,"check_circle"),e.k0s()()}if(2&n){const t=e.XpG(4);e.Y8G("disabled",t.data.uploadMode)}}function uo(n,a){if(1&n&&(e.j41(0,"td",49),e.DNE(1,go,3,0,"button",50),e.DNE(2,fo,3,1,"button",51),e.k0s()),2&n){const t=a.$implicit;e.R7$(1),e.Y8G("ngIf","folder"===t.type),e.R7$(1),e.Y8G("ngIf","file"===t.type)}}function ho(n,a){1&n&&e.nrm(0,"tr",54)}function bo(n,a){if(1&n){const t=e.RV6();e.j41(0,"tr",55),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG(3);return e.Njj("folder"===r.type?c.openFolder(r):null)}),e.k0s()}if(2&n){const t=a.$implicit,o=e.XpG(3);e.AVh("selected-row",(null==o.selectedFile?null:o.selectedFile.name)===t.name)}}function vo(n,a){if(1&n){const t=e.RV6();e.j41(0,"button",58),e.bIt("click",function(){e.eBV(t);const i=e.XpG(4);return e.Njj(i.triggerFileUpload())}),e.j41(1,"mat-icon"),e.EFF(2,"upload_file"),e.k0s(),e.EFF(3," Upload File Here "),e.k0s()}}function xo(n,a){if(1&n&&(e.j41(0,"div",56)(1,"p"),e.EFF(2,"This directory is empty."),e.k0s(),e.DNE(3,vo,4,0,"button",57),e.k0s()),2&n){const t=e.XpG(3);e.R7$(3),e.Y8G("ngIf",!t.isSelectorOnly)}}function Co(n,a){if(1&n&&(e.j41(0,"div",35)(1,"table",36),e.qex(2,37),e.DNE(3,so,2,0,"th",38),e.DNE(4,lo,5,2,"td",39),e.bVm(),e.qex(5,40),e.DNE(6,po,2,0,"th",38),e.DNE(7,mo,2,1,"td",41),e.bVm(),e.qex(8,42),e.DNE(9,_o,2,0,"th",38),e.DNE(10,uo,3,2,"td",41),e.bVm(),e.DNE(11,ho,1,0,"tr",43),e.DNE(12,bo,1,2,"tr",44),e.k0s(),e.DNE(13,xo,4,1,"div",45),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.Y8G("dataSource",t.files),e.R7$(10),e.Y8G("matHeaderRowDef",t.displayedColumns),e.R7$(1),e.Y8G("matRowDefColumns",t.displayedColumns),e.R7$(1),e.Y8G("ngIf",0===t.files.length)}}function ko(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",59)(1,"h3"),e.EFF(2),e.k0s(),e.j41(3,"button",6),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.uploadFile())}),e.nrm(4,"fa-icon",19),e.EFF(5," Upload Here "),e.k0s()()}if(2&n){const t=e.XpG(2);e.R7$(2),e.SpI('Upload "',null==t.data.fileToUpload?null:t.data.fileToUpload.name,'" to this location?'),e.R7$(1),e.Y8G("disabled",t.uploadInProgress),e.R7$(1),e.Y8G("icon",t.faUpload)}}function yo(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",16)(1,"div",17)(2,"button",18),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.navigateBack())}),e.nrm(3,"fa-icon",19),e.k0s(),e.j41(4,"div",20)(5,"span",21),e.EFF(6),e.k0s(),e.DNE(7,ao,2,1,"span",1),e.k0s()(),e.j41(8,"div",22)(9,"button",23),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.showCreateFolderDialog())}),e.j41(10,"span",24),e.EFF(11,"cr"),e.k0s(),e.EFF(12," Create Folder "),e.k0s(),e.j41(13,"button",25),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.triggerFileUpload())}),e.j41(14,"span",24),e.EFF(15,"up"),e.k0s(),e.EFF(16," Upload File "),e.k0s(),e.j41(17,"input",26,27),e.bIt("change",function(i){e.eBV(t);const r=e.XpG();return e.Njj(r.handleFileUpload(i))}),e.k0s()(),e.DNE(19,ro,3,0,"div",28),e.DNE(20,co,4,0,"div",29),e.DNE(21,Co,14,4,"div",30),e.DNE(22,ko,6,3,"div",31),e.k0s()}if(2&n){const t=e.XpG();e.R7$(3),e.Y8G("icon",t.faArrowLeft),e.R7$(3),e.JRh(t.selectedFileApi.name),e.R7$(1),e.Y8G("ngIf",t.currentPath),e.R7$(10),e.Y8G("accept",t.data.allowedExtensions.join(",")),e.R7$(2),e.Y8G("ngIf",t.isSelectorOnly),e.R7$(1),e.Y8G("ngIf",t.isLoading),e.R7$(1),e.Y8G("ngIf",!t.isLoading),e.R7$(1),e.Y8G("ngIf",t.data.uploadMode)}}let Mo=(()=>{class n{constructor(t){this.dialogRef=t,this.folderName=""}onCancel(){this.dialogRef.close()}onConfirm(){this.dialogRef.close(this.folderName)}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(h.CP))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-create-folder-dialog"]],standalone:!0,features:[e.aNF],decls:12,vars:2,consts:[["mat-dialog-title",""],["appearance","outline",1,"full-width"],["matInput","","placeholder","Enter folder name",3,"ngModel","ngModelChange"],["align","end"],["mat-button","",3,"click"],["mat-raised-button","","color","primary",3,"disabled","click"]],template:function(o,i){1&o&&(e.j41(0,"h2",0),e.EFF(1,"Create New Folder"),e.k0s(),e.j41(2,"mat-dialog-content")(3,"mat-form-field",1)(4,"mat-label"),e.EFF(5,"Folder Name"),e.k0s(),e.j41(6,"input",2),e.bIt("ngModelChange",function(c){return i.folderName=c}),e.k0s()()(),e.j41(7,"mat-dialog-actions",3)(8,"button",4),e.bIt("click",function(){return i.onCancel()}),e.EFF(9,"Cancel"),e.k0s(),e.j41(10,"button",5),e.bIt("click",function(){return i.onConfirm()}),e.EFF(11," Create "),e.k0s()()),2&o&&(e.R7$(6),e.Y8G("ngModel",i.folderName),e.R7$(4),e.Y8G("disabled",!i.folderName))},dependencies:[h.hM,h.BI,h.Yi,h.E7,u.Hl,u.$z,O.RG,O.rl,O.nJ,E.fS,E.fg,m.YN,m.me,m.BC,m.vS,d.MD],styles:[".full-width[_ngcontent-%COMP%]{width:100%}"]})}}return n})(),lt=class Yt{get isSelectorOnly(){return console.log("isSelectorOnly getter called, data.selectorOnly =",this.data.selectorOnly),!!this.data.selectorOnly}constructor(a,t,o,i,r,c){this.dialogRef=a,this.data=t,this.dialog=o,this.http=i,this.fileApiService=r,this.crudService=c,this.faFolderOpen=b.Uj9,this.faFile=b.A4h,this.faArrowLeft=b.CeG,this.faUpload=b.JmV,this.selectedFileApi=null,this.currentPath="",this.files=[],this.navigationStack=[],this.isLoading=!1,this.uploadInProgress=!1,this.displayedColumns=["name","type","actions"],this.selectedFile=null}ngOnInit(){this.data.uploadMode&&this.data.fileApis.length>0&&this.selectFileApi(this.data.fileApis[0]),console.log("Dialog initialized with data:",{uploadMode:this.data.uploadMode,selectorOnly:this.data.selectorOnly,allowedExtensions:this.data.allowedExtensions,fileApis:this.data.fileApis?.length||0})}selectFileApi(a){this.selectedFileApi=a,this.currentPath="",this.navigationStack=[],this.loadFiles()}loadFiles(){this.selectedFileApi&&(this.isLoading=!0,this.fileApiService.listFiles(this.selectedFileApi.name,this.currentPath).pipe((0,H.s)(this)).subscribe({next:a=>{if(this.isLoading=!1,a.error&&(console.warn("File listing contained error:",a.error),a.error.includes("Internal Server Error")))return console.log("Server error encountered, showing empty directory"),void(this.files=[]);let t=[];Array.isArray(a)?t=a:a.resource&&Array.isArray(a.resource)&&(t=a.resource),this.files=t.map(o=>({name:o.name||(o.path?o.path.split("/").pop():""),path:o.path||((this.currentPath?this.currentPath+"/":"")+o.name).replace("//","/"),type:"folder"===o.type?"folder":"file",contentType:o.content_type||o.contentType,lastModified:o.last_modified||o.lastModified,size:o.size})),console.log("Processed files:",this.files)},error:a=>{console.error("Error loading files:",a),this.files=[];let t="Failed to load files. ";500===a.status?(t+="The server encountered an internal error. Using empty directory view.",console.warn(t)):404===a.status?(t+="The specified folder does not exist.",alert(t)):403===a.status||401===a.status?(t+="You do not have permission to access this location.",alert(t)):(t+="Please check your connection and try again.",alert(t)),this.isLoading=!1}}))}openFolder(a){this.navigationStack.push(this.currentPath),this.currentPath=a.path,this.loadFiles()}navigateBack(){this.navigationStack.length>0?(this.currentPath=this.navigationStack.pop()||"",this.loadFiles()):this.selectedFileApi&&(this.selectedFileApi=null,this.files=[])}selectFile(a){const t="."+a.name.split(".").pop()?.toLowerCase();this.data.allowedExtensions.includes(t)?this.selectedFile=a:alert(`Only ${this.data.allowedExtensions.join(", ")} files are allowed.`)}confirmSelection(){if(!this.selectedFile||!this.selectedFileApi)return;const a=this.selectedFileApi,i={path:"/opt/dreamfactory/storage/app/"+this.selectedFile.path,relativePath:this.selectedFile.path,fileName:this.selectedFile.name,name:this.selectedFile.name,serviceId:a.id,serviceName:a.name};console.log("Selected file with absolute path:",i),this.dialogRef.close(i)}uploadFileDirectly(a){this.selectedFileApi?(this.uploadInProgress=!0,this.performUpload(a,this.currentPath)):alert("Please select a file service first.")}performUpload(a,t){if(!this.selectedFileApi)return void(this.uploadInProgress=!1);this.uploadInProgress=!0;const o=this.selectedFileApi;console.log(`Starting upload of ${a.name} (${a.size} bytes) to ${o.name}/${t}`),this.fileApiService.uploadFile(o.name,a,t).pipe((0,H.s)(this)).subscribe({next:i=>{this.uploadInProgress=!1,console.log("Upload successful:",i);const r=t?`${t}/${a.name}`:a.name;console.log("File uploaded successfully, returning:",{path:"/opt/dreamfactory/storage/app/"+r,relativePath:r,fileName:a.name,name:a.name,serviceId:o.id,serviceName:o.name}),this.loadFiles(),setTimeout(()=>{const l=this.files.find(p=>p.name===a.name);l&&(this.selectedFile=l)},500)},error:i=>{console.error("Error uploading file:",i),this.uploadInProgress=!1;let r="Failed to upload file. ";r+=400===i.status?"Bad request - check if the file type is allowed or if the file is too large.":401===i.status||403===i.status?"Permission denied - you may not have access to upload to this location.":404===i.status?"The specified folder does not exist.":413===i.status?"The file is too large.":500===i.status?i.error?.error?.message||"Server error occurred.":"Please try again.",alert(r)}})}uploadFile(){this.data.fileToUpload&&this.selectedFileApi&&(this.uploadInProgress=!0,this.performUploadAndClose(this.data.fileToUpload,this.currentPath))}performUploadAndClose(a,t){if(!this.selectedFileApi)return void(this.uploadInProgress=!1);this.uploadInProgress=!0;const o=this.selectedFileApi;console.log(`Starting upload of ${a.name} (${a.size} bytes) to ${o.name}/${t}`),this.fileApiService.uploadFile(o.name,a,t).pipe((0,H.s)(this)).subscribe({next:i=>{this.uploadInProgress=!1,console.log("Upload successful:",i);const r=t?`${t}/${a.name}`:a.name,s={path:"/opt/dreamfactory/storage/app/"+r,relativePath:r,fileName:a.name,name:a.name,serviceId:o.id,serviceName:o.name};console.log("File uploaded successfully, returning with absolute path:",s),this.dialogRef.close(s)},error:i=>{console.error("Error uploading file:",i),this.uploadInProgress=!1;let r="Failed to upload file. ";r+=400===i.status?"Bad request - check if the file type is allowed or if the file is too large.":401===i.status||403===i.status?"Permission denied - you may not have access to upload to this location.":404===i.status?"The specified folder does not exist.":413===i.status?"The file is too large.":500===i.status?i.error?.error?.message||"Server error occurred.":"Please try again.",alert(r)}})}triggerFileUpload(){console.log("triggerFileUpload called, isSelectorOnly =",this.isSelectorOnly),this.isSelectorOnly?console.log("Blocked file upload due to selector-only mode"):this.fileUploadInput?(console.log("Clicking file upload input element"),this.fileUploadInput.nativeElement.click()):console.log("File upload input element not found")}showCreateFolderDialog(){console.log("showCreateFolderDialog called, isSelectorOnly =",this.isSelectorOnly),this.isSelectorOnly?console.log("Blocked folder creation due to selector-only mode"):this.dialog.open(Mo,{width:"350px"}).afterClosed().subscribe(t=>{t&&this.selectedFileApi&&this.createFolder(t)})}createFolder(a){this.selectedFileApi&&(this.isLoading=!0,this.fileApiService.createDirectory(this.selectedFileApi.name,this.currentPath,a).pipe((0,H.s)(this)).subscribe({next:()=>{console.log("Folder created successfully"),this.loadFiles()},error:t=>{console.error("Error creating folder:",t),alert("Failed to create folder. Please try again."),this.isLoading=!1}}))}cancel(){this.dialogRef.close()}handleFileUpload(a){const t=a.target;if(t.files&&t.files.length>0){const o=t.files[0];console.log(`File selected: ${o.name}`),console.log(`File size: ${o.size} bytes`),console.log(`File type: ${o.type}`),(o.name.endsWith(".pem")||o.name.endsWith(".p8")||o.name.endsWith(".key"))&&console.log("Handling private key file with special care for Snowflake authentication");const r=new FileReader;r.onload=c=>{const s=c.target?.result;console.log(`File content read successfully, content length: ${s?s.byteLength:0} bytes`);const l="."+o.name.split(".").pop()?.toLowerCase();this.data.allowedExtensions.includes(l)?this.uploadFileDirectly(o):alert(`Only ${this.data.allowedExtensions.join(", ")} files are allowed`)},r.onerror=c=>{console.error("Error reading file:",c),alert("Error reading file content. Please try again with another file.")},r.readAsArrayBuffer(o)}}static{this.\u0275fac=function(t){return new(t||Yt)(e.rXU(h.CP),e.rXU(h.Vh),e.rXU(h.bZ),e.rXU(ee.Qq),e.rXU(Jt),e.rXU(je.h))}}static{this.\u0275cmp=e.VBU({type:Yt,selectors:[["df-file-selector-dialog"]],viewQuery:function(t,o){if(1&t&&e.GBs(Zn,5),2&t){let i;e.mGM(i=e.lsd())&&(o.fileUploadInput=i.first)}},standalone:!0,features:[e.Jv_([{provide:je.h,useFactory:a=>new je.h("api/v2",a),deps:[ee.Qq]}]),e.aNF],decls:12,vars:6,consts:[["mat-dialog-title",""],[4,"ngIf"],["class","file-api-selection",4,"ngIf"],["class","file-browser",4,"ngIf"],["mat-dialog-actions","","align","end"],["mat-button","",3,"click"],["mat-raised-button","","color","primary",3,"disabled","click"],[1,"file-api-selection"],[1,"file-api-grid"],["class","file-api-card",3,"click",4,"ngFor","ngForOf"],[1,"file-api-card",3,"click"],[1,"file-api-icon"],["size","2x",3,"icon"],[1,"file-api-details"],[1,"file-api-name"],[1,"file-api-type"],[1,"file-browser"],[1,"navigation-bar"],["mat-icon-button","","matTooltip","Go back",3,"click"],[3,"icon"],[1,"current-location"],[1,"service-name"],[1,"action-row"],[1,"action-button","create-folder-btn",3,"click"],[1,"button-content"],[1,"action-button","upload-file-btn",3,"click"],["type","file",2,"display","none",3,"accept","change"],["fileUploadInput",""],["class","selector-info",4,"ngIf"],["class","loading-container",4,"ngIf"],["class","file-list",4,"ngIf"],["class","upload-section",4,"ngIf"],[1,"selector-info"],[1,"loading-container"],["diameter","40"],[1,"file-list"],["mat-table","",1,"file-table",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",3,"click",4,"matCellDef"],["matColumnDef","type"],["mat-cell","",4,"matCellDef"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",3,"selected-row","click",4,"matRowDef","matRowDefColumns"],["class","empty-directory",4,"ngIf"],["mat-header-cell",""],["mat-cell","",3,"click"],[1,"file-name-cell"],["mat-cell",""],["mat-icon-button","","color","primary","matTooltip","Open folder",3,"click",4,"ngIf"],["mat-icon-button","","color","primary","matTooltip","Select file",3,"disabled","click",4,"ngIf"],["mat-icon-button","","color","primary","matTooltip","Open folder",3,"click"],["mat-icon-button","","color","primary","matTooltip","Select file",3,"disabled","click"],["mat-header-row",""],["mat-row","",3,"click"],[1,"empty-directory"],["mat-stroked-button","","color","primary",3,"click",4,"ngIf"],["mat-stroked-button","","color","primary",3,"click"],[1,"upload-section"]],template:function(t,o){1&t&&(e.j41(0,"h2",0),e.DNE(1,eo,3,0,"ng-container",1),e.DNE(2,to,3,0,"ng-container",1),e.DNE(3,no,2,1,"small",1),e.k0s(),e.j41(4,"mat-dialog-content"),e.DNE(5,io,5,1,"div",2),e.DNE(6,yo,23,8,"div",3),e.k0s(),e.j41(7,"div",4)(8,"button",5),e.bIt("click",function(){return o.cancel()}),e.EFF(9,"Cancel"),e.k0s(),e.j41(10,"button",6),e.bIt("click",function(){return o.confirmSelection()}),e.EFF(11," Choose "),e.k0s()()),2&t&&(e.R7$(1),e.Y8G("ngIf",o.data.uploadMode),e.R7$(1),e.Y8G("ngIf",!o.data.uploadMode),e.R7$(1),e.Y8G("ngIf",o.data.allowedExtensions.length>0),e.R7$(2),e.Y8G("ngIf",!o.selectedFileApi),e.R7$(1),e.Y8G("ngIf",o.selectedFileApi),e.R7$(4),e.Y8G("disabled",!o.selectedFile||"folder"===o.selectedFile.type))},dependencies:[d.MD,d.Sq,d.bT,h.hM,h.BI,h.Yi,h.E7,u.Hl,u.$z,u.iY,oe.RI,O.RG,E.fS,G.Ve,Pe.D6,Pe.LG,Z.m_,Z.An,P.tP,P.Zl,P.tL,P.ji,P.cC,P.YV,P.iL,P.KS,P.$R,P.YZ,P.NB,S.uc,S.oV,m.YN,m.X1,w.dX,w.aY],styles:["mat-dialog-content[_ngcontent-%COMP%]{min-height:400px;max-height:600px;overflow-y:auto}h2[_ngcontent-%COMP%]{margin-bottom:0}h2[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{display:block;font-size:1.2rem;font-weight:400;color:var(--df-text-muted);margin-top:4px}.file-api-selection[_ngcontent-%COMP%]{padding:16px 0}.file-api-selection[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin-top:0;margin-bottom:16px;font-size:1.6rem;font-weight:600;letter-spacing:-.01em}.file-api-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:16px}.file-api-card[_ngcontent-%COMP%]{display:flex;align-items:center;padding:16px;border-radius:var(--df-radius);border:1px solid var(--df-border);cursor:pointer;transition:background-color .2s ease,border-color .2s ease}.file-api-card[_ngcontent-%COMP%]:hover{background-color:var(--df-hover);border-color:var(--df-accent)}.file-api-icon[_ngcontent-%COMP%]{margin-right:16px;color:var(--df-accent)}.file-api-details[_ngcontent-%COMP%] .file-api-name[_ngcontent-%COMP%]{font-weight:500;margin-bottom:4px}.file-api-details[_ngcontent-%COMP%] .file-api-type[_ngcontent-%COMP%]{font-size:1.2rem;color:var(--df-text-muted)}.file-browser[_ngcontent-%COMP%] .navigation-bar[_ngcontent-%COMP%]{display:flex;align-items:center;margin-bottom:16px}.file-browser[_ngcontent-%COMP%] .navigation-bar[_ngcontent-%COMP%] .current-location[_ngcontent-%COMP%]{margin-left:8px}.file-browser[_ngcontent-%COMP%] .navigation-bar[_ngcontent-%COMP%] .current-location[_ngcontent-%COMP%] .service-name[_ngcontent-%COMP%]{font-weight:500;margin-right:8px}.file-browser[_ngcontent-%COMP%] .action-row[_ngcontent-%COMP%]{display:flex;gap:16px;margin-bottom:20px;padding:10px;border:1px dashed var(--df-border);border-radius:var(--df-radius-sm);background-color:var(--df-surface-2)}.file-browser[_ngcontent-%COMP%] .action-row[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{display:flex;align-items:center;border:none;border-radius:var(--df-radius-sm);padding:8px 16px;font-size:1.4rem;font-weight:500;cursor:pointer;transition:all .2s ease}.file-browser[_ngcontent-%COMP%] .action-row[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%] .button-content[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border:1px solid currentColor;border-radius:var(--df-radius-sm);margin-right:8px;font-weight:700;font-size:1.2rem;opacity:.85}.file-browser[_ngcontent-%COMP%] .action-row[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]:hover{opacity:.9}.file-browser[_ngcontent-%COMP%] .action-row[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]:active{transform:translateY(1px)}.file-browser[_ngcontent-%COMP%] .action-row[_ngcontent-%COMP%] .create-folder-btn[_ngcontent-%COMP%]{background-color:var(--df-accent);color:var(--df-accent-contrast)}.file-browser[_ngcontent-%COMP%] .action-row[_ngcontent-%COMP%] .upload-file-btn[_ngcontent-%COMP%]{background-color:transparent;border:1px solid var(--df-border);color:var(--df-text-2)}.file-browser[_ngcontent-%COMP%] .action-row[_ngcontent-%COMP%] .upload-file-btn[_ngcontent-%COMP%]:hover{background-color:var(--df-hover)}.loading-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:32px}.loading-container[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin-top:16px;color:var(--df-text-muted)}.file-table[_ngcontent-%COMP%]{width:100%}.file-table[_ngcontent-%COMP%] .mat-column-name[_ngcontent-%COMP%]{width:60%}.file-table[_ngcontent-%COMP%] .mat-column-type[_ngcontent-%COMP%]{width:20%}.file-table[_ngcontent-%COMP%] .mat-column-actions[_ngcontent-%COMP%]{width:20%;text-align:right}.file-table[_ngcontent-%COMP%] .file-name-cell[_ngcontent-%COMP%]{display:flex;align-items:center}.file-table[_ngcontent-%COMP%] .file-name-cell[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{margin-right:8px;color:var(--df-accent)}.file-table[_ngcontent-%COMP%] .selected-row[_ngcontent-%COMP%]{background-color:var(--df-accent-soft)}.empty-directory[_ngcontent-%COMP%]{padding:24px 16px;text-align:center;color:var(--df-text-muted)}.empty-directory[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:16px;font-style:italic}.empty-directory[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-top:8px}.upload-section[_ngcontent-%COMP%]{margin-top:24px;padding:16px;border-radius:var(--df-radius);border:1px solid var(--df-border-2);background-color:var(--df-surface-2);text-align:center}.upload-section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin-top:0;margin-bottom:16px}"]})}};lt=(0,re.Cg)([(0,H.d)({checkProperties:!0})],lt);var U=g(75066),W=g(16994),N=g(11863);function Oo(n,a){if(1&n&&(e.j41(0,"span",8),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.JRh(t.label)}}function Po(n,a){if(1&n&&e.nrm(0,"div",9),2&n){const t=e.XpG(2);e.Y8G("innerHTML",t.description,e.npT)}}function Fo(n,a){if(1&n&&(e.j41(0,"div",5),e.DNE(1,Oo,2,1,"span",6),e.DNE(2,Po,1,1,"div",7),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.Y8G("ngIf",t.label),e.R7$(1),e.Y8G("ngIf",t.description)}}function wo(n,a){1&n&&(e.j41(0,"div",17),e.EFF(1," No file services configured. Contact your administrator. "),e.k0s())}function Do(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",10)(1,"div",11)(2,"button",12),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.openFileSelector())}),e.nrm(3,"fa-icon",13),e.EFF(4," Select File "),e.k0s(),e.j41(5,"button",14),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.goToFilesManager())}),e.nrm(6,"fa-icon",13),e.EFF(7," File Manager "),e.k0s()(),e.j41(8,"div",15),e.EFF(9,' You can upload and select files directly with "Select File" or manage files via the "File Manager". '),e.k0s(),e.DNE(10,wo,2,0,"div",16),e.k0s()}if(2&n){const t=e.XpG();e.R7$(3),e.Y8G("icon",t.faFolderOpen),e.R7$(3),e.Y8G("icon",t.faExternalLinkAlt),e.R7$(4),e.Y8G("ngIf",0===t.fileApis.length)}}function To(n,a){if(1&n&&(e.j41(0,"div",31)(1,"strong"),e.EFF(2,"Service:"),e.k0s(),e.EFF(3),e.k0s()),2&n){const t=e.XpG(2);e.R7$(3),e.SpI(" ",t.selectedFile.serviceName," ")}}function So(n,a){if(1&n&&(e.j41(0,"div",32)(1,"span",33),e.EFF(2,"Service Relative Path:"),e.k0s(),e.j41(3,"span",34),e.EFF(4),e.k0s()()),2&n){const t=e.XpG(2);e.R7$(4),e.JRh(t.selectedFile.relativePath)}}function Ro(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",18)(1,"div",19),e.nrm(2,"fa-icon",20),e.j41(3,"div",21)(4,"div",22),e.EFF(5),e.k0s(),e.DNE(6,To,4,1,"div",23),e.j41(7,"div",24)(8,"div",25),e.EFF(9,"Full Absolute Path:"),e.k0s(),e.j41(10,"div",26)(11,"div",27),e.EFF(12),e.k0s()(),e.DNE(13,So,5,1,"div",28),e.k0s()()(),e.j41(14,"div",29)(15,"button",30),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.clearSelection())}),e.EFF(16," Clear selection "),e.k0s(),e.j41(17,"button",12),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.openFileSelector())}),e.EFF(18," Choose Different "),e.k0s(),e.j41(19,"button",14),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.goToFilesManager())}),e.nrm(20,"fa-icon",13),e.EFF(21," File Manager "),e.k0s()()()}if(2&n){const t=e.XpG();e.R7$(2),e.Y8G("icon",t.faFile),e.R7$(3),e.SpI(" ",t.selectedFile.fileName||t.selectedFile.name," "),e.R7$(1),e.Y8G("ngIf","Unknown"!==t.selectedFile.serviceName),e.R7$(6),e.JRh(t.selectedFile.path),e.R7$(1),e.Y8G("ngIf",t.selectedFile.relativePath),e.R7$(7),e.Y8G("icon",t.faExternalLinkAlt)}}let dt=class Vt{constructor(a,t,o,i){this.dialog=a,this.fileApiService=t,this.crudService=o,this.router=i,this.label="Private Key File",this.description="",this.allowedExtensions=[".pem",".p8",".key"],this.initialValue="",this.fileSelected=new e.bkB,this.faFile=b.A4h,this.faFolderOpen=b.Uj9,this.faCheck=b.e68,this.faUpload=b.JmV,this.faExternalLinkAlt=b.AaJ,this.selectedFile=void 0,this.fileApis=[],this.isLoading=!1}ngOnInit(){this.loadFileApis(),this.initialValue&&this.parseInitialValue(),this.ensureFallbackService()}goToFilesManager(){this.router.navigate([W.b.ADMIN_SETTINGS,W.b.FILES])}ensureFallbackService(){0===this.fileApis.length&&(console.log("Creating fallback file service entry"),this.fileApis=[{id:1,name:"files",label:"Local Files",type:"local_file"}])}loadFileApis(){this.isLoading=!0,this.ensureFallbackService(),this.fileApiService.getFileServices().pipe((0,H.s)(this)).subscribe({next:a=>{a&&a.resource&&a.resource.length>0?this.fileApis=a.resource:this.ensureFallbackService(),this.isLoading=!1},error:a=>{console.error("Error loading file APIs:",a),this.ensureFallbackService(),this.isLoading=!1}})}openFileSelector(){this.ensureFallbackService(),console.log("Opening file selector dialog with selectorOnly = false"),this.dialog.open(lt,{width:"800px",data:{fileApis:this.fileApis,allowedExtensions:this.allowedExtensions,selectorOnly:!1}}).afterClosed().subscribe(t=>{t&&(this.selectedFile=t,this.fileSelected.emit(this.selectedFile))})}clearSelection(){this.selectedFile=void 0,this.fileSelected.emit(void 0)}parseInitialValue(a){try{const t=a||this.initialValue;if(t){console.log("Parsing path value:",t);const o=t.split("/"),i=o[o.length-1];this.selectedFile={path:t,fileName:i,name:i,serviceId:0,serviceName:"Unknown"},console.log("Generated selected file:",this.selectedFile)}}catch(t){console.error("Failed to parse path value:",t)}}setPath(a){a&&(console.log("Setting path manually:",a),this.parseInitialValue(a))}static{this.\u0275fac=function(t){return new(t||Vt)(e.rXU(h.bZ),e.rXU(Jt),e.rXU(je.h),e.rXU(N.Ix))}}static{this.\u0275cmp=e.VBU({type:Vt,selectors:[["df-file-selector"]],inputs:{label:"label",description:"description",allowedExtensions:"allowedExtensions",initialValue:"initialValue"},outputs:{fileSelected:"fileSelected"},standalone:!0,features:[e.Jv_([{provide:U.Wi,useValue:"api/v2/system/service"},je.h]),e.aNF],decls:5,vars:3,consts:[[1,"file-selector-container"],["class","file-selector-header",4,"ngIf"],[1,"file-selector-content"],["class","file-selector-empty",4,"ngIf"],["class","file-selector-selected",4,"ngIf"],[1,"file-selector-header"],["class","file-selector-label",4,"ngIf"],["class","file-selector-description",3,"innerHTML",4,"ngIf"],[1,"file-selector-label"],[1,"file-selector-description",3,"innerHTML"],[1,"file-selector-empty"],[1,"file-selector-actions"],["mat-raised-button","","color","primary",1,"select-file-button",3,"click"],[3,"icon"],["mat-button","","color","accent","matTooltip","Upload and manage files in the file manager",1,"manage-files-button",3,"click"],[1,"help-text"],["class","no-apis-message",4,"ngIf"],[1,"no-apis-message"],[1,"file-selector-selected"],[1,"selected-file-info"],[1,"file-icon",3,"icon"],[1,"file-details"],[1,"file-name"],["class","file-service",4,"ngIf"],[1,"file-path-container"],[1,"file-path-header"],[1,"file-path-section"],[1,"file-path-value"],["class","relative-path-section",4,"ngIf"],[1,"file-actions"],[1,"clear-button",3,"click"],[1,"file-service"],[1,"relative-path-section"],[1,"relative-path-label"],[1,"relative-path-value"]],template:function(t,o){1&t&&(e.j41(0,"div",0),e.DNE(1,Fo,3,2,"div",1),e.j41(2,"div",2),e.DNE(3,Do,11,3,"div",3),e.DNE(4,Ro,22,6,"div",4),e.k0s()()),2&t&&(e.R7$(1),e.Y8G("ngIf",o.label||o.description),e.R7$(2),e.Y8G("ngIf",!o.selectedFile),e.R7$(1),e.Y8G("ngIf",o.selectedFile))},dependencies:[d.MD,d.bT,h.hM,u.Hl,u.$z,O.RG,E.fS,G.Ve,m.YN,m.X1,S.uc,S.oV,w.dX,w.aY,Z.m_],styles:[".file-selector-container[_ngcontent-%COMP%]{width:100%;border:1px solid var(--df-border);border-radius:var(--df-radius);padding:16px;margin-bottom:16px}.file-selector-header[_ngcontent-%COMP%]{margin-bottom:16px}.file-selector-label[_ngcontent-%COMP%]{font-size:1.5rem;font-weight:600;letter-spacing:-.01em;margin-right:8px;color:var(--df-text)}.file-selector-description[_ngcontent-%COMP%]{font-size:1.3rem;color:var(--df-text-muted)}.file-selector-description[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--df-accent);text-decoration:none}.file-selector-description[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}.file-selector-content[_ngcontent-%COMP%]{width:100%}.file-selector-empty[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;padding:16px 0}.file-selector-actions[_ngcontent-%COMP%]{display:flex;justify-content:center;margin-bottom:16px}.select-file-button[_ngcontent-%COMP%]{padding:8px 24px;font-size:1.4rem}.select-file-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{margin-right:8px}.file-selector-selected[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:12px;background-color:var(--df-surface-2);border:1px solid var(--df-border-2);border-radius:var(--df-radius-sm)}.selected-file-info[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.file-icon[_ngcontent-%COMP%]{font-size:2.4rem;color:var(--df-accent)}.file-details[_ngcontent-%COMP%]{display:flex;flex-direction:column}.file-name[_ngcontent-%COMP%]{color:var(--df-text);font-weight:500;margin-bottom:4px}.file-path-container[_ngcontent-%COMP%]{margin-top:12px;padding:4px;border-radius:var(--df-radius-sm)}.file-path-header[_ngcontent-%COMP%]{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;margin-bottom:6px;color:var(--df-text-muted)}.file-path-section[_ngcontent-%COMP%]{display:flex;margin-bottom:8px;flex-wrap:wrap;padding:12px;background-color:var(--df-surface-2);border-radius:var(--df-radius-sm);border:1px solid var(--df-border)}.file-path-label[_ngcontent-%COMP%]{font-weight:600;margin-right:8px;color:var(--df-text);font-size:1.3rem}.file-path-value[_ngcontent-%COMP%]{font-size:1.3rem;word-break:break-all;flex:1;font-family:SFMono-Regular,Menlo,Consolas,monospace;background-color:var(--df-code-bg);color:var(--df-code-text);padding:4px 8px;border-radius:var(--df-radius-sm);border:1px solid var(--df-border-2)}.file-service[_ngcontent-%COMP%]{font-size:1.2rem;color:var(--df-text-2)}.file-actions[_ngcontent-%COMP%]{display:flex;gap:12px;align-items:center}.clear-button[_ngcontent-%COMP%]{background:none;border:none;color:var(--df-danger);cursor:pointer;font-size:1.3rem;padding:0;font-weight:500}.clear-button[_ngcontent-%COMP%]:hover{text-decoration:underline}.no-apis-message[_ngcontent-%COMP%]{color:var(--df-text-muted);font-style:italic}.relative-path-section[_ngcontent-%COMP%]{display:flex;margin-top:6px;font-size:1.2rem;color:var(--df-text-muted)}.relative-path-label[_ngcontent-%COMP%]{font-weight:600;margin-right:8px}.relative-path-value[_ngcontent-%COMP%]{font-family:SFMono-Regular,Menlo,Consolas,monospace}"]})}};dt=(0,re.Cg)([(0,H.d)({checkProperties:!0})],dt);var Ue=g(19206),q=g(42250);const Io=["fileSelector"];function Eo(n,a){if(1&n&&(e.j41(0,"mat-label"),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.JRh(t.schema.label)}}function $o(n,a){if(1&n&&e.nrm(0,"input",8),2&n){const t=e.XpG(2);e.Y8G("formControl",t.control)("type","integer"===t.schema.type?"number":"password"===t.schema.type?"password":"text"),e.BMQ("autocomplete","password"===t.schema.type?"current-password":"off")("aria-label",t.schema.label)}}function Go(n,a){if(1&n&&(e.j41(0,"mat-option",11),e.EFF(1),e.k0s()),2&n){const t=a.$implicit;e.Y8G("value",t.name),e.R7$(1),e.SpI(" ",t.label," ")}}function jo(n,a){if(1&n&&(e.j41(0,"mat-select",9),e.DNE(1,Go,2,2,"mat-option",10),e.k0s()),2&n){const t=e.XpG(2);e.Y8G("multiple","multi_picklist"===t.schema.type)("formControl",t.control),e.R7$(1),e.Y8G("ngForOf",t.schema.values)("ngForTrackBy",t.trackByOptionName)}}function No(n,a){if(1&n&&e.nrm(0,"fa-icon",12),2&n){const t=e.XpG(2);e.Y8G("icon",t.faCircleInfo)("matTooltip",t.schema.description)}}const Ao=function(){return["integer","string","password","text"]},Yo=function(){return["picklist","multi_picklist"]};function Vo(n,a){if(1&n&&(e.j41(0,"mat-form-field",4),e.DNE(1,Eo,2,1,"mat-label",1),e.DNE(2,$o,1,4,"input",5),e.DNE(3,jo,2,4,"mat-select",6),e.DNE(4,No,1,2,"fa-icon",7),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.Y8G("ngIf",t.showLabel),e.R7$(1),e.Y8G("ngIf",e.lJ4(4,Ao).includes(t.schema.type)),e.R7$(1),e.Y8G("ngIf",e.lJ4(5,Yo).includes(t.schema.type)),e.R7$(1),e.Y8G("ngIf",t.schema.description)}}const Xo=function(){return[".p8",".pem",".key"]};function zo(n,a){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"df-file-selector",13,14),e.bIt("fileSelected",function(i){e.eBV(t);const r=e.XpG();return e.Njj(r.onFileSelected(i))}),e.k0s(),e.bVm()}if(2&n){const t=e.XpG();e.R7$(1),e.Y8G("label",t.schema.label)("description",t.schema.description||"")("allowedExtensions",e.lJ4(4,Xo))("initialValue",t.control.value)}}function Bo(n,a){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"input",15,16),e.bIt("change",function(i){e.eBV(t);const r=e.XpG();return e.Njj(r.handleFileInput(i))}),e.k0s(),e.j41(3,"button",17),e.bIt("click",function(){e.eBV(t);const i=e.sdS(2);return e.Njj(i.click())}),e.EFF(4),e.k0s(),e.EFF(5),e.nI1(6,"transloco"),e.bVm()}if(2&n){const t=e.XpG();let o;e.R7$(3),e.Y8G("matTooltip",null!==(o=t.schema.description)&&void 0!==o?o:""),e.R7$(1),e.SpI(" ",t.schema.label," "),e.R7$(1),e.SpI(" ",t.control.value?t.control.value.name:e.bMT(6,3,"noFileSelected")," ")}}function Lo(n,a){if(1&n&&(e.qex(0),e.j41(1,"span"),e.EFF(2),e.k0s(),e.bVm()),2&n){const t=e.XpG(2);e.R7$(2),e.JRh(t.schema.label)}}function Uo(n,a){if(1&n&&(e.j41(0,"mat-slide-toggle",18),e.DNE(1,Lo,3,1,"ng-container",1),e.k0s()),2&n){const t=e.XpG();let o;e.Y8G("formControl",t.control)("matTooltip",null!==(o=t.schema.description)&&void 0!==o?o:""),e.BMQ("aria-label",t.schema.label),e.R7$(1),e.Y8G("ngIf",t.showLabel)}}function qo(n,a){if(1&n&&(e.j41(0,"mat-label"),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.JRh(t.schema.label)}}function Ko(n,a){if(1&n&&(e.j41(0,"mat-option",11),e.EFF(1),e.k0s()),2&n){const t=a.$implicit;e.Y8G("value",t),e.R7$(1),e.SpI(" ",t," ")}}function Jo(n,a){if(1&n&&(e.j41(0,"mat-form-field",19),e.DNE(1,qo,2,1,"mat-label",1),e.nrm(2,"input",20),e.j41(3,"mat-autocomplete",null,21),e.DNE(5,Ko,2,2,"mat-option",10),e.nI1(6,"async"),e.k0s()()),2&n){const t=e.sdS(4),o=e.XpG();e.R7$(1),e.Y8G("ngIf",o.showLabel),e.R7$(1),e.Y8G("formControl",o.control)("matAutocomplete",t),e.BMQ("aria-label",o.schema.label),e.R7$(3),e.Y8G("ngForOf",e.bMT(6,6,o.filteredEventList))("ngForTrackBy",o.trackByValue)}}const Ho=function(){return["integer","password","string","string","picklist","multi_picklist","text"]};let qe=class Xt{constructor(a,t,o){this.controlDir=a,this.activedRoute=t,this.themeService=o,this.showLabel=!0,this.faCircleInfo=b.mEO,this.control=new m.MJ,this.pendingFilePath=null,this.eventList=[],this.isDarkMode=this.themeService.darkMode$,a.valueAccessor=this}trackByOptionName(a,t){return t.name}trackByValue(a,t){return t}ngOnInit(){"event_picklist"===this.schema.type&&(this.activedRoute.data.subscribe(a=>{a.systemEvents&&a.systemEvents.resource&&(this.eventList=(0,Qn.$)(a.systemEvents.resource))}),this.filteredEventList=this.control.valueChanges.pipe((0,Ge.Z)(""),(0,z.T)(a=>a&&this.eventList?this.eventList.filter(t=>t.toLowerCase().includes(a.toLowerCase())):[])))}ngDoCheck(){this.controlDir.control instanceof m.MJ&&this.controlDir.control.hasValidator(m.k0.required)&&this.control.addValidators(m.k0.required)}ngAfterViewInit(){"file_certificate_api"===this.schema?.type&&this.fileSelector&&(this.pendingFilePath?(console.log("Applying pending file path after view init:",this.pendingFilePath),this.fileSelector.setPath(this.pendingFilePath),this.pendingFilePath=null):this.control.value&&"string"==typeof this.control.value&&(console.log("Setting file selector path after view init:",this.control.value),this.fileSelector.setPath(this.control.value)))}handleFileInput(a){const t=a.target;t.files&&this.control.setValue(t.files[0])}onFileSelected(a){a?(this.control.setValue(a.path),console.log("File selected in dynamic field:",a)):this.control.setValue(null)}writeValue(a){if(console.log("Dynamic field writeValue:",a,"Schema type:",this.schema?.type),"file_certificate_api"===this.schema?.type&&"string"==typeof a&&a)return console.log("Setting file path value:",a),this.control.setValue(a,{emitEvent:!1}),void(this.fileSelector?(console.log("Setting path on file selector:",a),this.fileSelector.setPath(a)):(console.log("File selector not yet available, storing pending path:",a),this.pendingFilePath=a));this.control.setValue(a,{emitEvent:!1})}registerOnChange(a){this.onChange=a,this.control.valueChanges.subscribe(t=>this.onChange(t))}registerOnTouched(a){this.onTouched=a}setDisabledState(a){a?this.control.disable():this.control.enable()}static{this.\u0275fac=function(t){return new(t||Xt)(e.rXU(m.vO,10),e.rXU(N.nX),e.rXU(Ue.n))}}static{this.\u0275cmp=e.VBU({type:Xt,selectors:[["df-dynamic-field"]],viewQuery:function(t,o){if(1&t&&e.GBs(Io,5),2&t){let i;e.mGM(i=e.lsd())&&(o.fileSelector=i.first)}},inputs:{schema:"schema",showLabel:"showLabel"},standalone:!0,features:[e.aNF],decls:6,vars:6,consts:[["subscriptSizing","dynamic","appearance","outline",4,"ngIf"],[4,"ngIf"],["color","primary",3,"formControl","matTooltip",4,"ngIf"],["subscriptSizing","dynamic",4,"ngIf"],["subscriptSizing","dynamic","appearance","outline"],["matInput","",3,"formControl","type",4,"ngIf"],[3,"multiple","formControl",4,"ngIf"],["class","tool-tip-trigger","matSuffix","",3,"icon","matTooltip",4,"ngIf"],["matInput","",3,"formControl","type"],[3,"multiple","formControl"],[3,"value",4,"ngFor","ngForOf","ngForTrackBy"],[3,"value"],["matSuffix","",1,"tool-tip-trigger",3,"icon","matTooltip"],[3,"label","description","allowedExtensions","initialValue","fileSelected"],["fileSelector",""],["type","file",2,"display","none",3,"change"],["fileInput",""],["mat-flat-button","","color","primary",3,"matTooltip","click"],["color","primary",3,"formControl","matTooltip"],["subscriptSizing","dynamic"],["type","text","matInput","",3,"formControl","matAutocomplete"],["auto","matAutocomplete"]],template:function(t,o){1&t&&(e.j41(0,"div"),e.DNE(1,Vo,5,6,"mat-form-field",0),e.DNE(2,zo,3,5,"ng-container",1),e.DNE(3,Bo,7,5,"ng-container",1),e.DNE(4,Uo,2,4,"mat-slide-toggle",2),e.DNE(5,Jo,7,8,"mat-form-field",3),e.k0s()),2&t&&(e.R7$(1),e.Y8G("ngIf",e.lJ4(5,Ho).includes(o.schema.type)),e.R7$(1),e.Y8G("ngIf","file_certificate_api"===o.schema.type),e.R7$(1),e.Y8G("ngIf","file_certificate"===o.schema.type),e.R7$(1),e.Y8G("ngIf","boolean"===o.schema.type),e.R7$(1),e.Y8G("ngIf","event_picklist"===o.schema.type))},dependencies:[O.RG,O.rl,O.nJ,O.yw,E.fS,E.fg,d.bT,G.Ve,G.VO,q.wT,X.mV,X.sG,m.X1,m.me,m.BC,m.l_,d.pM,u.Hl,u.$z,D.Kj,w.dX,w.aY,S.uc,S.oV,ct.jL,ct.$3,ct.pN,d.Jj,dt],encapsulation:2})}};qe=(0,re.Cg)([(0,H.d)({checkProperties:!0})],qe);var pt,Te=g(93138),Wo=g(1803);function Qo(n,a){if(1&n&&e.nrm(0,"fa-icon",10),2&n){const t=e.XpG(2);e.Y8G("icon",t.faCircleInfo)("matTooltip",t.schema.description)}}function Zo(n,a){if(1&n&&(e.j41(0,"mat-card-header"),e.EFF(1),e.DNE(2,Qo,1,2,"fa-icon",9),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.JRh(t.schema.label),e.R7$(1),e.Y8G("ngIf",t.schema.description)}}function ei(n,a){if(1&n&&e.nrm(0,"fa-icon",10),2&n){const t=e.XpG(3);e.Y8G("icon",t.faCircleInfo)("matTooltip",t.schema.description)}}function ti(n,a){if(1&n&&(e.j41(0,"th",12),e.EFF(1),e.DNE(2,ei,1,2,"fa-icon",9),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.SpI(" ",t.schema.label,""),e.R7$(1),e.Y8G("ngIf",t.schema.description)}}function ni(n,a){if(1&n&&(e.j41(0,"td",13)(1,"mat-form-field",14),e.nrm(2,"input",15),e.k0s()()),2&n){const t=a.index,o=e.XpG(2);e.R7$(2),e.Y8G("formControl",o.controls[t]),e.BMQ("aria-label",o.schema.label)}}function oi(n,a){if(1&n&&(e.qex(0,11),e.DNE(1,ti,3,2,"th",5),e.DNE(2,ni,3,2,"td",6),e.bVm()),2&n){const t=e.XpG();e.Y8G("matColumnDef",t.schema.name)}}function ii(n,a){if(1&n&&(e.j41(0,"th",12),e.EFF(1),e.k0s()),2&n){const t=e.XpG().$implicit;e.R7$(1),e.SpI(" ",t.label," ")}}function ai(n,a){if(1&n&&e.nrm(0,"df-verb-picker",20),2&n){const t=e.XpG(2).$implicit;e.Y8G("formControlName",t.name)("schema",t)}}function ri(n,a){if(1&n&&e.nrm(0,"df-dynamic-field",21),2&n){const t=e.XpG(2).$implicit;e.Y8G("showLabel",!1)("schema",t)("formControlName",t.name)}}function ci(n,a){if(1&n&&(e.j41(0,"td",13),e.qex(1,17),e.DNE(2,ai,1,2,"df-verb-picker",18),e.DNE(3,ri,1,3,"df-dynamic-field",19),e.bVm(),e.k0s()),2&n){const t=a.index,o=e.XpG().$implicit,i=e.XpG(2);e.R7$(1),e.Y8G("formGroup",i.getFormGroup(t)),e.R7$(1),e.Y8G("ngIf","verb_mask"===o.type),e.R7$(1),e.Y8G("ngIf","verb_mask"!==o.type)}}function si(n,a){1&n&&(e.qex(0,11),e.DNE(1,ii,2,1,"th",5),e.DNE(2,ci,4,3,"td",6),e.bVm()),2&n&&e.Y8G("matColumnDef",a.$implicit.name)}function li(n,a){if(1&n&&e.DNE(0,si,3,1,"ng-container",16),2&n){const t=e.XpG();e.Y8G("ngForOf",t.schemas)}}function di(n,a){if(1&n){const t=e.RV6();e.j41(0,"th",12)(1,"button",22),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.add())}),e.nI1(2,"transloco"),e.nrm(3,"fa-icon",23),e.k0s()()}if(2&n){const t=e.XpG();e.R7$(1),e.BMQ("aria-label",e.bMT(2,2,"newEntry")),e.R7$(2),e.Y8G("icon",t.faPlus)}}const pi=function(n){return{id:n}};function mi(n,a){if(1&n){const t=e.RV6();e.j41(0,"td",13)(1,"button",24),e.bIt("click",function(){const r=e.eBV(t).index,c=e.XpG();return e.Njj(c.remove(r))}),e.nI1(2,"transloco"),e.nrm(3,"fa-icon",23),e.k0s()()}if(2&n){const t=a.index,o=e.XpG();e.R7$(1),e.BMQ("aria-label",e.i5U(2,2,"deleteRow",e.eq3(5,pi,t))),e.R7$(2),e.Y8G("icon",o.faTrashCan)}}function _i(n,a){1&n&&e.nrm(0,"tr",25)}function gi(n,a){1&n&&e.nrm(0,"tr",26)}let mt=class zt{static{pt=this}updateDataSource(){this.dataSource=new P.I6(this.fieldArray.controls)}constructor(a,t){this.fb=a,this.themeService=t,this.faPlus=b.QLR,this.faTrashCan=b.sjs,this.faCircleInfo=b.mEO,this.isDarkMode=this.themeService.darkMode$,this._displayedColumns=[]}get controls(){return this.fieldArray.controls}ngOnInit(){this.fieldArray||this.initialize()}get schemas(){return"array"===this.schema.type?this.schema.items:[{name:"key",label:this.schema.object?.key.label,type:this.schema.object?.key.type},{name:"value",label:this.schema.object?.value.label,type:this.schema.object?.value.type}]}get displayedColumns(){if(this._displayedColumnsSchema!==this.schema){this._displayedColumnsSchema=this.schema;const a="array"===this.schema.type?"string"===this.schema.items?[this.schema.name]:this.schemas.map(t=>t.name):["key","value"];a.push("actions"),this._displayedColumns=a}return this._displayedColumns}getFormGroup(a){return this.fieldArray.at(a)}createGroup(a){const t=this.fb.group({});return this.schemas.forEach(o=>{t.addControl(o.name,new m.MJ(a?a[o.name]:o.default))}),a&&t.patchValue(a),t}initialize(){this.fieldArray=this.fb.array([]),this.updateDataSource()}writeValue(a){this.fieldArray||this.initialize(),this.fieldArray.clear({emitEvent:!1}),a&&Array.isArray(a)&&"array"===this.schema.type?a.forEach(t=>this.fieldArray.push("string"===this.schema.items?new m.MJ(t):this.createGroup(t),{emitEvent:!1})):a&&"object"===this.schema.type&&Object.keys(a).forEach(t=>this.fieldArray.push(this.createGroup({key:t,value:a[t]}),{emitEvent:!1})),this.updateDataSource()}registerOnChange(a){this.onChange=a,this.fieldArray.valueChanges.pipe((0,z.T)(t=>"object"===this.schema.type?t.reduce((o,i)=>(o[i.key]=i.value,o),{}):t)).subscribe(t=>{this.onChange(t),this.updateDataSource()})}registerOnTouched(a){this.onTouched=a}setDisabledState(a){a?this.fieldArray.disable():this.fieldArray.enable()}add(){this.fieldArray.push("string"===this.schema.items?new m.MJ(""):this.createGroup())}remove(a){this.fieldArray.removeAt(a)}static{this.\u0275fac=function(t){return new(t||zt)(e.rXU(m.ok),e.rXU(Ue.n))}}static{this.\u0275cmp=e.VBU({type:zt,selectors:[["df-array-field"]],inputs:{schema:"schema"},standalone:!0,features:[e.Jv_([{provide:m.kq,useExisting:(0,e.Rfq)(()=>pt),multi:!0}]),e.aNF],decls:11,vars:6,consts:[[4,"ngIf"],["mat-table","",3,"dataSource"],[3,"matColumnDef",4,"ngIf","ngIfElse"],["dynamic",""],["matColumnDef","actions","stickyEnd",""],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["class","tool-tip-trigger","matSuffix","",3,"icon","matTooltip",4,"ngIf"],["matSuffix","",1,"tool-tip-trigger",3,"icon","matTooltip"],[3,"matColumnDef"],["mat-header-cell",""],["mat-cell",""],["appearance","outline","subscriptSizing","dynamic",1,"full-width"],["matInput","","type","text",3,"formControl"],[3,"matColumnDef",4,"ngFor","ngForOf"],[3,"formGroup"],["type","number","class","full-width",3,"formControlName","schema",4,"ngIf"],["class","full-width",3,"showLabel","schema","formControlName",4,"ngIf"],["type","number",1,"full-width",3,"formControlName","schema"],[1,"full-width",3,"showLabel","schema","formControlName"],["type","button","mat-mini-fab","","color","primary",3,"click"],["size","lg",3,"icon"],["type","button","mat-mini-fab","",1,"remove-btn",3,"click"],["mat-header-row",""],["mat-row",""]],template:function(t,o){if(1&t&&(e.j41(0,"mat-card"),e.DNE(1,Zo,3,2,"mat-card-header",0),e.j41(2,"table",1),e.DNE(3,oi,3,1,"ng-container",2),e.DNE(4,li,1,1,"ng-template",null,3,e.C5r),e.qex(6,4),e.DNE(7,di,4,4,"th",5),e.DNE(8,mi,4,7,"td",6),e.bVm(),e.DNE(9,_i,1,0,"tr",7),e.DNE(10,gi,1,0,"tr",8),e.k0s()()),2&t){const i=e.sdS(5);e.R7$(1),e.Y8G("ngIf","string"!==o.schema.items),e.R7$(1),e.Y8G("dataSource",o.dataSource),e.R7$(1),e.Y8G("ngIf","string"===o.schema.items)("ngIfElse",i),e.R7$(6),e.Y8G("matHeaderRowDef",o.displayedColumns),e.R7$(1),e.Y8G("matRowDefColumns",o.displayedColumns)}},dependencies:[m.X1,m.me,m.BC,m.cb,m.l_,m.j4,m.JD,d.pM,O.RG,O.rl,O.yw,E.fS,E.fg,u.Hl,u.$0,w.dX,w.aY,qe,d.bT,P.tP,P.Zl,P.tL,P.ji,P.cC,P.YV,P.iL,P.KS,P.$R,P.YZ,P.NB,Te.Hu,Te.RN,Te.MM,S.uc,S.oV,D.Kj,Wo.N,G.Ve],styles:[".mat-ripple[_ngcontent-%COMP%]{overflow:hidden;position:relative}.mat-ripple[_ngcontent-%COMP%]:not(:empty){transform:translateZ(0)}.mat-ripple.mat-ripple-unbounded[_ngcontent-%COMP%]{overflow:visible}.mat-ripple-element[_ngcontent-%COMP%]{position:absolute;border-radius:50%;pointer-events:none;transition:opacity,transform 0ms cubic-bezier(0,0,.2,1);transform:scale3d(0,0,0)}.cdk-high-contrast-active[_ngcontent-%COMP%] .mat-ripple-element[_ngcontent-%COMP%]{display:none}.cdk-visually-hidden[_ngcontent-%COMP%]{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl][_ngcontent-%COMP%] .cdk-visually-hidden[_ngcontent-%COMP%]{left:auto;right:0}.cdk-overlay-container[_ngcontent-%COMP%], .cdk-global-overlay-wrapper[_ngcontent-%COMP%]{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container[_ngcontent-%COMP%]{position:fixed;z-index:1000}.cdk-overlay-container[_ngcontent-%COMP%]:empty{display:none}.cdk-global-overlay-wrapper[_ngcontent-%COMP%]{display:flex;position:absolute;z-index:1000}.cdk-overlay-pane[_ngcontent-%COMP%]{position:absolute;pointer-events:auto;box-sizing:border-box;z-index:1000;display:flex;max-width:100%;max-height:100%}.cdk-overlay-backdrop[_ngcontent-%COMP%]{position:absolute;inset:0;z-index:1000;pointer-events:auto;-webkit-tap-highlight-color:transparent;transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0}.cdk-overlay-backdrop.cdk-overlay-backdrop-showing[_ngcontent-%COMP%]{opacity:1}.cdk-high-contrast-active[_ngcontent-%COMP%] .cdk-overlay-backdrop.cdk-overlay-backdrop-showing[_ngcontent-%COMP%]{opacity:.6}.cdk-overlay-dark-backdrop[_ngcontent-%COMP%]{background:rgba(0,0,0,.32)}.cdk-overlay-transparent-backdrop[_ngcontent-%COMP%]{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing[_ngcontent-%COMP%]{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation[_ngcontent-%COMP%]{transition:none}.cdk-overlay-connected-position-bounding-box[_ngcontent-%COMP%]{position:absolute;z-index:1000;display:flex;flex-direction:column;min-width:1px;min-height:1px}.cdk-global-scrollblock[_ngcontent-%COMP%]{position:fixed;width:100%;overflow-y:scroll}textarea.cdk-textarea-autosize[_ngcontent-%COMP%]{resize:none}textarea.cdk-textarea-autosize-measuring[_ngcontent-%COMP%]{padding:2px 0!important;box-sizing:content-box!important;height:auto!important;overflow:hidden!important}textarea.cdk-textarea-autosize-measuring-firefox[_ngcontent-%COMP%]{padding:2px 0!important;box-sizing:content-box!important;height:0!important}@keyframes _ngcontent-%COMP%_cdk-text-field-autofill-start{}@keyframes _ngcontent-%COMP%_cdk-text-field-autofill-end{}.cdk-text-field-autofill-monitored[_ngcontent-%COMP%]:-webkit-autofill{animation:_ngcontent-%COMP%_cdk-text-field-autofill-start 0s 1ms}.cdk-text-field-autofill-monitored[_ngcontent-%COMP%]:not(:-webkit-autofill){animation:_ngcontent-%COMP%_cdk-text-field-autofill-end 0s 1ms}.mat-focus-indicator[_ngcontent-%COMP%]{position:relative}.mat-focus-indicator[_ngcontent-%COMP%]:before{inset:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-focus-indicator-display, none);border:var(--mat-focus-indicator-border-width, 3px) var(--mat-focus-indicator-border-style, solid) var(--mat-focus-indicator-border-color, transparent);border-radius:var(--mat-focus-indicator-border-radius, 4px)}.mat-focus-indicator[_ngcontent-%COMP%]:focus:before{content:\"\"}.cdk-high-contrast-active[_ngcontent-%COMP%]{--mat-focus-indicator-display: block}.mat-mdc-focus-indicator[_ngcontent-%COMP%]{position:relative}.mat-mdc-focus-indicator[_ngcontent-%COMP%]:before{inset:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-mdc-focus-indicator-display, none);border:var(--mat-mdc-focus-indicator-border-width, 3px) var(--mat-mdc-focus-indicator-border-style, solid) var(--mat-mdc-focus-indicator-border-color, transparent);border-radius:var(--mat-mdc-focus-indicator-border-radius, 4px)}.mat-mdc-focus-indicator[_ngcontent-%COMP%]:focus:before{content:\"\"}.cdk-high-contrast-active[_ngcontent-%COMP%]{--mat-mdc-focus-indicator-display: block}@font-face{font-family:Inter;src:url(Inter-VariableFont_slnt,wght.1cccc37b0c8d2802.ttf)}.mat-ripple-element[_ngcontent-%COMP%]{background-color:#0000001a}html[_ngcontent-%COMP%]{--mat-option-selected-state-label-text-color: #0f0761;--mat-option-label-text-color: rgba(0, 0, 0, .87);--mat-option-hover-state-layer-color: rgba(0, 0, 0, .04);--mat-option-focus-state-layer-color: rgba(0, 0, 0, .04);--mat-option-selected-state-layer-color: rgba(0, 0, 0, .04)}.mat-accent[_ngcontent-%COMP%]{--mat-option-selected-state-label-text-color: #dd7345}.mat-warn[_ngcontent-%COMP%]{--mat-option-selected-state-label-text-color: #f44336}html[_ngcontent-%COMP%]{--mat-optgroup-label-text-color: rgba(0, 0, 0, .87)}.mat-pseudo-checkbox-full[_ngcontent-%COMP%]{color:#0000008a}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-disabled[_ngcontent-%COMP%]{color:#b0b0b0}.mat-primary[_ngcontent-%COMP%] .mat-pseudo-checkbox-checked.mat-pseudo-checkbox-minimal[_ngcontent-%COMP%]:after, .mat-primary[_ngcontent-%COMP%] .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-minimal[_ngcontent-%COMP%]:after{color:#0f0761}.mat-primary[_ngcontent-%COMP%] .mat-pseudo-checkbox-checked.mat-pseudo-checkbox-full[_ngcontent-%COMP%], .mat-primary[_ngcontent-%COMP%] .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-full[_ngcontent-%COMP%]{background:#0f0761}.mat-primary[_ngcontent-%COMP%] .mat-pseudo-checkbox-checked.mat-pseudo-checkbox-full[_ngcontent-%COMP%]:after, .mat-primary[_ngcontent-%COMP%] .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-full[_ngcontent-%COMP%]:after{color:#fafafa}.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-minimal[_ngcontent-%COMP%]:after, .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-minimal[_ngcontent-%COMP%]:after{color:#dd7345}.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-full[_ngcontent-%COMP%], .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-full[_ngcontent-%COMP%]{background:#dd7345}.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-full[_ngcontent-%COMP%]:after, .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-full[_ngcontent-%COMP%]:after{color:#fafafa}.mat-accent[_ngcontent-%COMP%] .mat-pseudo-checkbox-checked.mat-pseudo-checkbox-minimal[_ngcontent-%COMP%]:after, .mat-accent[_ngcontent-%COMP%] .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-minimal[_ngcontent-%COMP%]:after{color:#dd7345}.mat-accent[_ngcontent-%COMP%] .mat-pseudo-checkbox-checked.mat-pseudo-checkbox-full[_ngcontent-%COMP%], .mat-accent[_ngcontent-%COMP%] .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-full[_ngcontent-%COMP%]{background:#dd7345}.mat-accent[_ngcontent-%COMP%] .mat-pseudo-checkbox-checked.mat-pseudo-checkbox-full[_ngcontent-%COMP%]:after, .mat-accent[_ngcontent-%COMP%] .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-full[_ngcontent-%COMP%]:after{color:#fafafa}.mat-warn[_ngcontent-%COMP%] .mat-pseudo-checkbox-checked.mat-pseudo-checkbox-minimal[_ngcontent-%COMP%]:after, .mat-warn[_ngcontent-%COMP%] .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-minimal[_ngcontent-%COMP%]:after{color:#f44336}.mat-warn[_ngcontent-%COMP%] .mat-pseudo-checkbox-checked.mat-pseudo-checkbox-full[_ngcontent-%COMP%], .mat-warn[_ngcontent-%COMP%] .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-full[_ngcontent-%COMP%]{background:#f44336}.mat-warn[_ngcontent-%COMP%] .mat-pseudo-checkbox-checked.mat-pseudo-checkbox-full[_ngcontent-%COMP%]:after, .mat-warn[_ngcontent-%COMP%] .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-full[_ngcontent-%COMP%]:after{color:#fafafa}.mat-pseudo-checkbox-disabled.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-minimal[_ngcontent-%COMP%]:after, .mat-pseudo-checkbox-disabled.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-minimal[_ngcontent-%COMP%]:after{color:#b0b0b0}.mat-pseudo-checkbox-disabled.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-full[_ngcontent-%COMP%], .mat-pseudo-checkbox-disabled.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-full[_ngcontent-%COMP%]{background:#b0b0b0}.mat-app-background[_ngcontent-%COMP%]{background-color:#fafafa;color:#000000de}.mat-elevation-z0[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z0[_ngcontent-%COMP%]{box-shadow:0 0 #0003,0 0 #00000024,0 0 #0000001f}.mat-elevation-z1[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z1[_ngcontent-%COMP%]{box-shadow:0 2px 1px -1px #0003,0 1px 1px #00000024,0 1px 3px #0000001f}.mat-elevation-z2[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z2[_ngcontent-%COMP%]{box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f}.mat-elevation-z3[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z3[_ngcontent-%COMP%]{box-shadow:0 3px 3px -2px #0003,0 3px 4px #00000024,0 1px 8px #0000001f}.mat-elevation-z4[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z4[_ngcontent-%COMP%]{box-shadow:0 2px 4px -1px #0003,0 4px 5px #00000024,0 1px 10px #0000001f}.mat-elevation-z5[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z5[_ngcontent-%COMP%]{box-shadow:0 3px 5px -1px #0003,0 5px 8px #00000024,0 1px 14px #0000001f}.mat-elevation-z6[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z6[_ngcontent-%COMP%]{box-shadow:0 3px 5px -1px #0003,0 6px 10px #00000024,0 1px 18px #0000001f}.mat-elevation-z7[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z7[_ngcontent-%COMP%]{box-shadow:0 4px 5px -2px #0003,0 7px 10px 1px #00000024,0 2px 16px 1px #0000001f}.mat-elevation-z8[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z8[_ngcontent-%COMP%]{box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.mat-elevation-z9[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z9[_ngcontent-%COMP%]{box-shadow:0 5px 6px -3px #0003,0 9px 12px 1px #00000024,0 3px 16px 2px #0000001f}.mat-elevation-z10[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z10[_ngcontent-%COMP%]{box-shadow:0 6px 6px -3px #0003,0 10px 14px 1px #00000024,0 4px 18px 3px #0000001f}.mat-elevation-z11[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z11[_ngcontent-%COMP%]{box-shadow:0 6px 7px -4px #0003,0 11px 15px 1px #00000024,0 4px 20px 3px #0000001f}.mat-elevation-z12[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z12[_ngcontent-%COMP%]{box-shadow:0 7px 8px -4px #0003,0 12px 17px 2px #00000024,0 5px 22px 4px #0000001f}.mat-elevation-z13[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z13[_ngcontent-%COMP%]{box-shadow:0 7px 8px -4px #0003,0 13px 19px 2px #00000024,0 5px 24px 4px #0000001f}.mat-elevation-z14[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z14[_ngcontent-%COMP%]{box-shadow:0 7px 9px -4px #0003,0 14px 21px 2px #00000024,0 5px 26px 4px #0000001f}.mat-elevation-z15[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z15[_ngcontent-%COMP%]{box-shadow:0 8px 9px -5px #0003,0 15px 22px 2px #00000024,0 6px 28px 5px #0000001f}.mat-elevation-z16[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z16[_ngcontent-%COMP%]{box-shadow:0 8px 10px -5px #0003,0 16px 24px 2px #00000024,0 6px 30px 5px #0000001f}.mat-elevation-z17[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z17[_ngcontent-%COMP%]{box-shadow:0 8px 11px -5px #0003,0 17px 26px 2px #00000024,0 6px 32px 5px #0000001f}.mat-elevation-z18[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z18[_ngcontent-%COMP%]{box-shadow:0 9px 11px -5px #0003,0 18px 28px 2px #00000024,0 7px 34px 6px #0000001f}.mat-elevation-z19[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z19[_ngcontent-%COMP%]{box-shadow:0 9px 12px -6px #0003,0 19px 29px 2px #00000024,0 7px 36px 6px #0000001f}.mat-elevation-z20[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z20[_ngcontent-%COMP%]{box-shadow:0 10px 13px -6px #0003,0 20px 31px 3px #00000024,0 8px 38px 7px #0000001f}.mat-elevation-z21[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z21[_ngcontent-%COMP%]{box-shadow:0 10px 13px -6px #0003,0 21px 33px 3px #00000024,0 8px 40px 7px #0000001f}.mat-elevation-z22[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z22[_ngcontent-%COMP%]{box-shadow:0 10px 14px -6px #0003,0 22px 35px 3px #00000024,0 8px 42px 7px #0000001f}.mat-elevation-z23[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z23[_ngcontent-%COMP%]{box-shadow:0 11px 14px -7px #0003,0 23px 36px 3px #00000024,0 9px 44px 8px #0000001f}.mat-elevation-z24[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z24[_ngcontent-%COMP%]{box-shadow:0 11px 15px -7px #0003,0 24px 38px 3px #00000024,0 9px 46px 8px #0000001f}.mat-theme-loaded-marker[_ngcontent-%COMP%]{display:none}html[_ngcontent-%COMP%]{--mat-option-label-text-font: Inter;--mat-option-label-text-line-height: 19px;--mat-option-label-text-size: 13px;--mat-option-label-text-tracking: normal;--mat-option-label-text-weight: 400}html[_ngcontent-%COMP%]{--mat-optgroup-label-text-font: Inter;--mat-optgroup-label-text-line-height: 19px;--mat-optgroup-label-text-size: 13px;--mat-optgroup-label-text-tracking: normal;--mat-optgroup-label-text-weight: 400}.mat-mdc-card[_ngcontent-%COMP%]{--mdc-elevated-card-container-color: white;--mdc-elevated-card-container-elevation: 0px 2px 1px -1px rgba(0, 0, 0, .2), 0px 1px 1px 0px rgba(0, 0, 0, .14), 0px 1px 3px 0px rgba(0, 0, 0, .12);--mdc-outlined-card-container-color: white;--mdc-outlined-card-outline-color: rgba(0, 0, 0, .12);--mdc-outlined-card-container-elevation: 0px 0px 0px 0px rgba(0, 0, 0, .2), 0px 0px 0px 0px rgba(0, 0, 0, .14), 0px 0px 0px 0px rgba(0, 0, 0, .12);--mat-card-subtitle-text-color: rgba(0, 0, 0, .54)}.mat-mdc-card[_ngcontent-%COMP%]{--mat-card-title-text-font: Inter;--mat-card-title-text-line-height: 21px;--mat-card-title-text-size: 16px;--mat-card-title-text-tracking: normal;--mat-card-title-text-weight: 600;--mat-card-subtitle-text-font: Inter;--mat-card-subtitle-text-line-height: 19px;--mat-card-subtitle-text-size: 13px;--mat-card-subtitle-text-tracking: normal;--mat-card-subtitle-text-weight: 500}.mat-mdc-progress-bar[_ngcontent-%COMP%]{--mdc-linear-progress-active-indicator-color: #0f0761;--mdc-linear-progress-track-color: rgba(15, 7, 97, .25)}.mat-mdc-progress-bar[_ngcontent-%COMP%] .mdc-linear-progress__buffer-dots[_ngcontent-%COMP%]{background-color:#0f076140;background-color:var(--mdc-linear-progress-track-color, rgba(15, 7, 97, .25))}@media (forced-colors: active){.mat-mdc-progress-bar[_ngcontent-%COMP%] .mdc-linear-progress__buffer-dots[_ngcontent-%COMP%]{background-color:ButtonBorder}}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.mat-mdc-progress-bar[_ngcontent-%COMP%] .mdc-linear-progress__buffer-dots[_ngcontent-%COMP%]{background-color:transparent;background-image:url(\"data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5 2' preserveAspectRatio='none slice'%3E%3Ccircle cx='1' cy='1' r='1' fill='rgba(15, 7, 97, 0.25)'/%3E%3C/svg%3E\")}}.mat-mdc-progress-bar[_ngcontent-%COMP%] .mdc-linear-progress__buffer-bar[_ngcontent-%COMP%]{background-color:#0f076140;background-color:var(--mdc-linear-progress-track-color, rgba(15, 7, 97, .25))}.mat-mdc-progress-bar.mat-accent[_ngcontent-%COMP%]{--mdc-linear-progress-active-indicator-color: #dd7345;--mdc-linear-progress-track-color: rgba(221, 115, 69, .25)}.mat-mdc-progress-bar.mat-accent[_ngcontent-%COMP%] .mdc-linear-progress__buffer-dots[_ngcontent-%COMP%]{background-color:#dd734540;background-color:var(--mdc-linear-progress-track-color, rgba(221, 115, 69, .25))}@media (forced-colors: active){.mat-mdc-progress-bar.mat-accent[_ngcontent-%COMP%] .mdc-linear-progress__buffer-dots[_ngcontent-%COMP%]{background-color:ButtonBorder}}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.mat-mdc-progress-bar.mat-accent[_ngcontent-%COMP%] .mdc-linear-progress__buffer-dots[_ngcontent-%COMP%]{background-color:transparent;background-image:url(\"data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5 2' preserveAspectRatio='none slice'%3E%3Ccircle cx='1' cy='1' r='1' fill='rgba(221, 115, 69, 0.25)'/%3E%3C/svg%3E\")}}.mat-mdc-progress-bar.mat-accent[_ngcontent-%COMP%] .mdc-linear-progress__buffer-bar[_ngcontent-%COMP%]{background-color:#dd734540;background-color:var(--mdc-linear-progress-track-color, rgba(221, 115, 69, .25))}.mat-mdc-progress-bar.mat-warn[_ngcontent-%COMP%]{--mdc-linear-progress-active-indicator-color: #f44336;--mdc-linear-progress-track-color: rgba(244, 67, 54, .25)}@keyframes _ngcontent-%COMP%_mdc-linear-progress-buffering{}.mat-mdc-progress-bar.mat-warn[_ngcontent-%COMP%] .mdc-linear-progress__buffer-dots[_ngcontent-%COMP%]{background-color:#f4433640;background-color:var(--mdc-linear-progress-track-color, rgba(244, 67, 54, .25))}@media (forced-colors: active){.mat-mdc-progress-bar.mat-warn[_ngcontent-%COMP%] .mdc-linear-progress__buffer-dots[_ngcontent-%COMP%]{background-color:ButtonBorder}}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.mat-mdc-progress-bar.mat-warn[_ngcontent-%COMP%] .mdc-linear-progress__buffer-dots[_ngcontent-%COMP%]{background-color:transparent;background-image:url(\"data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5 2' preserveAspectRatio='none slice'%3E%3Ccircle cx='1' cy='1' r='1' fill='rgba(244, 67, 54, 0.25)'/%3E%3C/svg%3E\")}}.mat-mdc-progress-bar.mat-warn[_ngcontent-%COMP%] .mdc-linear-progress__buffer-bar[_ngcontent-%COMP%]{background-color:#f4433640;background-color:var(--mdc-linear-progress-track-color, rgba(244, 67, 54, .25))}.mat-mdc-tooltip[_ngcontent-%COMP%]{--mdc-plain-tooltip-container-color: #616161;--mdc-plain-tooltip-supporting-text-color: #fff}.mat-mdc-tooltip[_ngcontent-%COMP%]{--mdc-plain-tooltip-supporting-text-font: Inter;--mdc-plain-tooltip-supporting-text-size: 12px;--mdc-plain-tooltip-supporting-text-weight: 400;--mdc-plain-tooltip-supporting-text-tracking: normal}html[_ngcontent-%COMP%]{--mdc-filled-text-field-caret-color: #0f0761;--mdc-filled-text-field-focus-active-indicator-color: #0f0761;--mdc-filled-text-field-focus-label-text-color: rgba(15, 7, 97, .87);--mdc-filled-text-field-container-color: whitesmoke;--mdc-filled-text-field-disabled-container-color: #fafafa;--mdc-filled-text-field-label-text-color: rgba(0, 0, 0, .6);--mdc-filled-text-field-disabled-label-text-color: rgba(0, 0, 0, .38);--mdc-filled-text-field-input-text-color: rgba(0, 0, 0, .87);--mdc-filled-text-field-disabled-input-text-color: rgba(0, 0, 0, .38);--mdc-filled-text-field-input-text-placeholder-color: rgba(0, 0, 0, .6);--mdc-filled-text-field-error-focus-label-text-color: #f44336;--mdc-filled-text-field-error-label-text-color: #f44336;--mdc-filled-text-field-error-caret-color: #f44336;--mdc-filled-text-field-active-indicator-color: rgba(0, 0, 0, .42);--mdc-filled-text-field-disabled-active-indicator-color: rgba(0, 0, 0, .06);--mdc-filled-text-field-hover-active-indicator-color: rgba(0, 0, 0, .87);--mdc-filled-text-field-error-active-indicator-color: #f44336;--mdc-filled-text-field-error-focus-active-indicator-color: #f44336;--mdc-filled-text-field-error-hover-active-indicator-color: #f44336;--mdc-outlined-text-field-caret-color: #0f0761;--mdc-outlined-text-field-focus-outline-color: #0f0761;--mdc-outlined-text-field-focus-label-text-color: rgba(15, 7, 97, .87);--mdc-outlined-text-field-label-text-color: rgba(0, 0, 0, .6);--mdc-outlined-text-field-disabled-label-text-color: rgba(0, 0, 0, .38);--mdc-outlined-text-field-input-text-color: rgba(0, 0, 0, .87);--mdc-outlined-text-field-disabled-input-text-color: rgba(0, 0, 0, .38);--mdc-outlined-text-field-input-text-placeholder-color: rgba(0, 0, 0, .6);--mdc-outlined-text-field-error-caret-color: #f44336;--mdc-outlined-text-field-error-focus-label-text-color: #f44336;--mdc-outlined-text-field-error-label-text-color: #f44336;--mdc-outlined-text-field-outline-color: rgba(0, 0, 0, .38);--mdc-outlined-text-field-disabled-outline-color: rgba(0, 0, 0, .06);--mdc-outlined-text-field-hover-outline-color: rgba(0, 0, 0, .87);--mdc-outlined-text-field-error-focus-outline-color: #f44336;--mdc-outlined-text-field-error-hover-outline-color: #f44336;--mdc-outlined-text-field-error-outline-color: #f44336;--mat-form-field-disabled-input-text-placeholder-color: rgba(0, 0, 0, .38)}.mat-mdc-form-field-error[_ngcontent-%COMP%]{color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field-subscript-wrapper[_ngcontent-%COMP%], .mat-mdc-form-field-bottom-align[_ngcontent-%COMP%]:before{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-form-field-subscript-text-font);line-height:var(--mat-form-field-subscript-text-line-height);font-size:var(--mat-form-field-subscript-text-size);letter-spacing:var(--mat-form-field-subscript-text-tracking);font-weight:var(--mat-form-field-subscript-text-weight)}.mat-mdc-form-field-focus-overlay[_ngcontent-%COMP%]{background-color:#000000de}.mat-mdc-form-field[_ngcontent-%COMP%]:hover .mat-mdc-form-field-focus-overlay[_ngcontent-%COMP%]{opacity:.04}.mat-mdc-form-field.mat-focused[_ngcontent-%COMP%] .mat-mdc-form-field-focus-overlay[_ngcontent-%COMP%]{opacity:.12}.mat-mdc-form-field-type-mat-native-select[_ngcontent-%COMP%] .mat-mdc-form-field-infix[_ngcontent-%COMP%]:after{color:#0000008a}.mat-mdc-form-field-type-mat-native-select.mat-focused.mat-primary[_ngcontent-%COMP%] .mat-mdc-form-field-infix[_ngcontent-%COMP%]:after{color:#0f0761de}.mat-mdc-form-field-type-mat-native-select.mat-focused.mat-accent[_ngcontent-%COMP%] .mat-mdc-form-field-infix[_ngcontent-%COMP%]:after{color:#dd7345de}.mat-mdc-form-field-type-mat-native-select.mat-focused.mat-warn[_ngcontent-%COMP%] .mat-mdc-form-field-infix[_ngcontent-%COMP%]:after{color:#f44336de}.mat-mdc-form-field-type-mat-native-select.mat-form-field-disabled[_ngcontent-%COMP%] .mat-mdc-form-field-infix[_ngcontent-%COMP%]:after{color:#00000061}.mat-mdc-form-field.mat-accent[_ngcontent-%COMP%]{--mdc-filled-text-field-caret-color: #dd7345;--mdc-filled-text-field-focus-active-indicator-color: #dd7345;--mdc-filled-text-field-focus-label-text-color: rgba(221, 115, 69, .87);--mdc-outlined-text-field-caret-color: #dd7345;--mdc-outlined-text-field-focus-outline-color: #dd7345;--mdc-outlined-text-field-focus-label-text-color: rgba(221, 115, 69, .87)}.mat-mdc-form-field.mat-warn[_ngcontent-%COMP%]{--mdc-filled-text-field-caret-color: #f44336;--mdc-filled-text-field-focus-active-indicator-color: #f44336;--mdc-filled-text-field-focus-label-text-color: rgba(244, 67, 54, .87);--mdc-outlined-text-field-caret-color: #f44336;--mdc-outlined-text-field-focus-outline-color: #f44336;--mdc-outlined-text-field-focus-label-text-color: rgba(244, 67, 54, .87)}.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field[_ngcontent-%COMP%] .mdc-notched-outline__notch[_ngcontent-%COMP%]{border-left:1px solid transparent}[dir=rtl][_ngcontent-%COMP%] .mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field[_ngcontent-%COMP%] .mdc-notched-outline__notch[_ngcontent-%COMP%]{border-left:none;border-right:1px solid transparent}.mat-mdc-form-field-infix[_ngcontent-%COMP%]{min-height:48px}.mat-mdc-text-field-wrapper[_ngcontent-%COMP%] .mat-mdc-form-field-flex[_ngcontent-%COMP%] .mat-mdc-floating-label[_ngcontent-%COMP%]{top:24px}.mat-mdc-text-field-wrapper.mdc-text-field--outlined[_ngcontent-%COMP%] .mdc-notched-outline--upgraded[_ngcontent-%COMP%] .mdc-floating-label--float-above[_ngcontent-%COMP%]{--mat-mdc-form-field-label-transform: translateY( -30.75px) scale(var(--mat-mdc-form-field-floating-label-scale, .75));transform:var(--mat-mdc-form-field-label-transform)}.mat-mdc-text-field-wrapper.mdc-text-field--outlined[_ngcontent-%COMP%] .mat-mdc-form-field-infix[_ngcontent-%COMP%]{padding-top:12px;padding-bottom:12px}.mat-mdc-text-field-wrapper[_ngcontent-%COMP%]:not(.mdc-text-field--outlined) .mat-mdc-form-field-infix[_ngcontent-%COMP%]{padding-top:12px;padding-bottom:12px}.mdc-text-field--no-label[_ngcontent-%COMP%]:not(.mdc-text-field--outlined):not(.mdc-text-field--textarea) .mat-mdc-form-field-infix[_ngcontent-%COMP%]{padding-top:12px;padding-bottom:12px}.mat-mdc-text-field-wrapper[_ngcontent-%COMP%]:not(.mdc-text-field--outlined) .mat-mdc-floating-label[_ngcontent-%COMP%]{display:none}html[_ngcontent-%COMP%]{--mdc-filled-text-field-label-text-font: Inter;--mdc-filled-text-field-label-text-size: 13px;--mdc-filled-text-field-label-text-tracking: normal;--mdc-filled-text-field-label-text-weight: 400;--mdc-outlined-text-field-label-text-font: Inter;--mdc-outlined-text-field-label-text-size: 13px;--mdc-outlined-text-field-label-text-tracking: normal;--mdc-outlined-text-field-label-text-weight: 400;--mat-form-field-container-text-font: Inter;--mat-form-field-container-text-line-height: 19px;--mat-form-field-container-text-size: 13px;--mat-form-field-container-text-tracking: normal;--mat-form-field-container-text-weight: 400;--mat-form-field-outlined-label-text-populated-size: 13px;--mat-form-field-subscript-text-font: Inter;--mat-form-field-subscript-text-line-height: 16px;--mat-form-field-subscript-text-size: 12px;--mat-form-field-subscript-text-tracking: normal;--mat-form-field-subscript-text-weight: 400}html[_ngcontent-%COMP%]{--mat-select-panel-background-color: white;--mat-select-enabled-trigger-text-color: rgba(0, 0, 0, .87);--mat-select-disabled-trigger-text-color: rgba(0, 0, 0, .38);--mat-select-placeholder-text-color: rgba(0, 0, 0, .6);--mat-select-enabled-arrow-color: rgba(0, 0, 0, .54);--mat-select-disabled-arrow-color: rgba(0, 0, 0, .38);--mat-select-focused-arrow-color: rgba(15, 7, 97, .87);--mat-select-invalid-arrow-color: rgba(244, 67, 54, .87)}html[_ngcontent-%COMP%] .mat-mdc-form-field.mat-accent[_ngcontent-%COMP%]{--mat-select-panel-background-color: white;--mat-select-enabled-trigger-text-color: rgba(0, 0, 0, .87);--mat-select-disabled-trigger-text-color: rgba(0, 0, 0, .38);--mat-select-placeholder-text-color: rgba(0, 0, 0, .6);--mat-select-enabled-arrow-color: rgba(0, 0, 0, .54);--mat-select-disabled-arrow-color: rgba(0, 0, 0, .38);--mat-select-focused-arrow-color: rgba(221, 115, 69, .87);--mat-select-invalid-arrow-color: rgba(244, 67, 54, .87)}html[_ngcontent-%COMP%] .mat-mdc-form-field.mat-warn[_ngcontent-%COMP%]{--mat-select-panel-background-color: white;--mat-select-enabled-trigger-text-color: rgba(0, 0, 0, .87);--mat-select-disabled-trigger-text-color: rgba(0, 0, 0, .38);--mat-select-placeholder-text-color: rgba(0, 0, 0, .6);--mat-select-enabled-arrow-color: rgba(0, 0, 0, .54);--mat-select-disabled-arrow-color: rgba(0, 0, 0, .38);--mat-select-focused-arrow-color: rgba(244, 67, 54, .87);--mat-select-invalid-arrow-color: rgba(244, 67, 54, .87)}.mat-form-field-appearance-fill[_ngcontent-%COMP%] .mat-mdc-select-arrow-wrapper[_ngcontent-%COMP%]{transform:none}html[_ngcontent-%COMP%]{--mat-select-trigger-text-font: Inter;--mat-select-trigger-text-line-height: 19px;--mat-select-trigger-text-size: 13px;--mat-select-trigger-text-tracking: normal;--mat-select-trigger-text-weight: 400}html[_ngcontent-%COMP%]{--mat-autocomplete-background-color: white}.mat-mdc-dialog-container[_ngcontent-%COMP%]{--mdc-dialog-container-color: white;--mdc-dialog-subhead-color: rgba(0, 0, 0, .87);--mdc-dialog-supporting-text-color: rgba(0, 0, 0, .6)}.mat-mdc-dialog-container[_ngcontent-%COMP%]{--mdc-dialog-subhead-font: Inter;--mdc-dialog-subhead-line-height: 21px;--mdc-dialog-subhead-size: 16px;--mdc-dialog-subhead-weight: 600;--mdc-dialog-subhead-tracking: normal;--mdc-dialog-supporting-text-font: Inter;--mdc-dialog-supporting-text-line-height: 19px;--mdc-dialog-supporting-text-size: 13px;--mdc-dialog-supporting-text-weight: 400;--mdc-dialog-supporting-text-tracking: normal}.mat-mdc-standard-chip[_ngcontent-%COMP%]{--mdc-chip-disabled-label-text-color: #212121;--mdc-chip-elevated-container-color: #e0e0e0;--mdc-chip-elevated-disabled-container-color: #e0e0e0;--mdc-chip-focus-state-layer-color: black;--mdc-chip-focus-state-layer-opacity: .12;--mdc-chip-label-text-color: #212121;--mdc-chip-with-icon-icon-color: #212121;--mdc-chip-with-icon-disabled-icon-color: #212121;--mdc-chip-with-icon-selected-icon-color: #212121;--mdc-chip-with-trailing-icon-disabled-trailing-icon-color: #212121;--mdc-chip-with-trailing-icon-trailing-icon-color: #212121}.mat-mdc-standard-chip.mat-mdc-chip-selected.mat-primary[_ngcontent-%COMP%], .mat-mdc-standard-chip.mat-mdc-chip-highlighted.mat-primary[_ngcontent-%COMP%]{--mdc-chip-disabled-label-text-color: white;--mdc-chip-elevated-container-color: #0f0761;--mdc-chip-elevated-disabled-container-color: #0f0761;--mdc-chip-focus-state-layer-color: black;--mdc-chip-focus-state-layer-opacity: .12;--mdc-chip-label-text-color: white;--mdc-chip-with-icon-icon-color: white;--mdc-chip-with-icon-disabled-icon-color: white;--mdc-chip-with-icon-selected-icon-color: white;--mdc-chip-with-trailing-icon-disabled-trailing-icon-color: white;--mdc-chip-with-trailing-icon-trailing-icon-color: white}.mat-mdc-standard-chip.mat-mdc-chip-selected.mat-accent[_ngcontent-%COMP%], .mat-mdc-standard-chip.mat-mdc-chip-highlighted.mat-accent[_ngcontent-%COMP%]{--mdc-chip-disabled-label-text-color: white;--mdc-chip-elevated-container-color: #dd7345;--mdc-chip-elevated-disabled-container-color: #dd7345;--mdc-chip-focus-state-layer-color: black;--mdc-chip-focus-state-layer-opacity: .12;--mdc-chip-label-text-color: white;--mdc-chip-with-icon-icon-color: white;--mdc-chip-with-icon-disabled-icon-color: white;--mdc-chip-with-icon-selected-icon-color: white;--mdc-chip-with-trailing-icon-disabled-trailing-icon-color: white;--mdc-chip-with-trailing-icon-trailing-icon-color: white}.mat-mdc-standard-chip.mat-mdc-chip-selected.mat-warn[_ngcontent-%COMP%], .mat-mdc-standard-chip.mat-mdc-chip-highlighted.mat-warn[_ngcontent-%COMP%]{--mdc-chip-disabled-label-text-color: white;--mdc-chip-elevated-container-color: #f44336;--mdc-chip-elevated-disabled-container-color: #f44336;--mdc-chip-focus-state-layer-color: black;--mdc-chip-focus-state-layer-opacity: .12;--mdc-chip-label-text-color: white;--mdc-chip-with-icon-icon-color: white;--mdc-chip-with-icon-disabled-icon-color: white;--mdc-chip-with-icon-selected-icon-color: white;--mdc-chip-with-trailing-icon-disabled-trailing-icon-color: white;--mdc-chip-with-trailing-icon-trailing-icon-color: white}.mat-mdc-chip.mat-mdc-standard-chip[_ngcontent-%COMP%]{--mdc-chip-container-height: 24px}.mat-mdc-standard-chip[_ngcontent-%COMP%]{--mdc-chip-label-text-font: Inter;--mdc-chip-label-text-line-height: 19px;--mdc-chip-label-text-size: 13px;--mdc-chip-label-text-tracking: normal;--mdc-chip-label-text-weight: 400}.mat-mdc-slide-toggle[_ngcontent-%COMP%]{--mdc-switch-selected-focus-state-layer-color: #5c5699;--mdc-switch-selected-handle-color: #5c5699;--mdc-switch-selected-hover-state-layer-color: #5c5699;--mdc-switch-selected-pressed-state-layer-color: #5c5699;--mdc-switch-selected-focus-handle-color: #0f0761;--mdc-switch-selected-hover-handle-color: #0f0761;--mdc-switch-selected-pressed-handle-color: #0f0761;--mdc-switch-selected-focus-track-color: #aaa8ca;--mdc-switch-selected-hover-track-color: #aaa8ca;--mdc-switch-selected-pressed-track-color: #aaa8ca;--mdc-switch-selected-track-color: #aaa8ca;--mdc-switch-disabled-selected-handle-color: #424242;--mdc-switch-disabled-selected-icon-color: #fff;--mdc-switch-disabled-selected-track-color: #424242;--mdc-switch-disabled-unselected-handle-color: #424242;--mdc-switch-disabled-unselected-icon-color: #fff;--mdc-switch-disabled-unselected-track-color: #424242;--mdc-switch-handle-surface-color: var(--mdc-theme-surface, #fff);--mdc-switch-handle-elevation-shadow: 0px 2px 1px -1px rgba(0, 0, 0, .2), 0px 1px 1px 0px rgba(0, 0, 0, .14), 0px 1px 3px 0px rgba(0, 0, 0, .12);--mdc-switch-handle-shadow-color: black;--mdc-switch-disabled-handle-elevation-shadow: 0px 0px 0px 0px rgba(0, 0, 0, .2), 0px 0px 0px 0px rgba(0, 0, 0, .14), 0px 0px 0px 0px rgba(0, 0, 0, .12);--mdc-switch-selected-icon-color: #fff;--mdc-switch-unselected-focus-handle-color: #212121;--mdc-switch-unselected-focus-state-layer-color: #424242;--mdc-switch-unselected-focus-track-color: #e0e0e0;--mdc-switch-unselected-handle-color: #616161;--mdc-switch-unselected-hover-handle-color: #212121;--mdc-switch-unselected-hover-state-layer-color: #424242;--mdc-switch-unselected-hover-track-color: #e0e0e0;--mdc-switch-unselected-icon-color: #fff;--mdc-switch-unselected-pressed-handle-color: #212121;--mdc-switch-unselected-pressed-state-layer-color: #424242;--mdc-switch-unselected-pressed-track-color: #e0e0e0;--mdc-switch-unselected-track-color: #e0e0e0}.mat-mdc-slide-toggle[_ngcontent-%COMP%] .mdc-form-field[_ngcontent-%COMP%]{color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, .87))}.mat-mdc-slide-toggle[_ngcontent-%COMP%] .mdc-switch--disabled[_ngcontent-%COMP%] + label[_ngcontent-%COMP%]{color:#00000061}.mat-mdc-slide-toggle.mat-accent[_ngcontent-%COMP%]{--mdc-switch-selected-focus-state-layer-color: #914b2d;--mdc-switch-selected-handle-color: #914b2d;--mdc-switch-selected-hover-state-layer-color: #914b2d;--mdc-switch-selected-pressed-state-layer-color: #914b2d;--mdc-switch-selected-focus-handle-color: #2b160d;--mdc-switch-selected-hover-handle-color: #2b160d;--mdc-switch-selected-pressed-handle-color: #2b160d;--mdc-switch-selected-focus-track-color: #ff8c5a;--mdc-switch-selected-hover-track-color: #ff8c5a;--mdc-switch-selected-pressed-track-color: #ff8c5a;--mdc-switch-selected-track-color: #ff8c5a}.mat-mdc-slide-toggle.mat-warn[_ngcontent-%COMP%]{--mdc-switch-selected-focus-state-layer-color: #e53935;--mdc-switch-selected-handle-color: #e53935;--mdc-switch-selected-hover-state-layer-color: #e53935;--mdc-switch-selected-pressed-state-layer-color: #e53935;--mdc-switch-selected-focus-handle-color: #b71c1c;--mdc-switch-selected-hover-handle-color: #b71c1c;--mdc-switch-selected-pressed-handle-color: #b71c1c;--mdc-switch-selected-focus-track-color: #e57373;--mdc-switch-selected-hover-track-color: #e57373;--mdc-switch-selected-pressed-track-color: #e57373;--mdc-switch-selected-track-color: #e57373}.mat-mdc-slide-toggle[_ngcontent-%COMP%]{--mdc-switch-state-layer-size: 40px}.mat-mdc-slide-toggle[_ngcontent-%COMP%]{--mat-slide-toggle-label-text-font: Inter;--mat-slide-toggle-label-text-size: 13px;--mat-slide-toggle-label-text-tracking: normal;--mat-slide-toggle-label-text-line-height: 19px;--mat-slide-toggle-label-text-weight: 400}.mat-mdc-slide-toggle[_ngcontent-%COMP%] .mdc-form-field[_ngcontent-%COMP%]{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-body2-font-size, .875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, .0178571429em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform, inherit)}.mat-mdc-radio-button[_ngcontent-%COMP%] .mdc-form-field[_ngcontent-%COMP%]{color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, .87))}.mat-mdc-radio-button.mat-primary[_ngcontent-%COMP%]{--mdc-radio-disabled-selected-icon-color: #000;--mdc-radio-disabled-unselected-icon-color: #000;--mdc-radio-unselected-hover-icon-color: #212121;--mdc-radio-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color: #0f0761;--mdc-radio-selected-hover-icon-color: #0f0761;--mdc-radio-selected-icon-color: #0f0761;--mdc-radio-selected-pressed-icon-color: #0f0761;--mat-radio-ripple-color: #000;--mat-radio-checked-ripple-color: #0f0761;--mat-radio-disabled-label-color: rgba(0, 0, 0, .38)}.mat-mdc-radio-button.mat-accent[_ngcontent-%COMP%]{--mdc-radio-disabled-selected-icon-color: #000;--mdc-radio-disabled-unselected-icon-color: #000;--mdc-radio-unselected-hover-icon-color: #212121;--mdc-radio-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color: #dd7345;--mdc-radio-selected-hover-icon-color: #dd7345;--mdc-radio-selected-icon-color: #dd7345;--mdc-radio-selected-pressed-icon-color: #dd7345;--mat-radio-ripple-color: #000;--mat-radio-checked-ripple-color: #dd7345;--mat-radio-disabled-label-color: rgba(0, 0, 0, .38)}.mat-mdc-radio-button.mat-warn[_ngcontent-%COMP%]{--mdc-radio-disabled-selected-icon-color: #000;--mdc-radio-disabled-unselected-icon-color: #000;--mdc-radio-unselected-hover-icon-color: #212121;--mdc-radio-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color: #f44336;--mdc-radio-selected-hover-icon-color: #f44336;--mdc-radio-selected-icon-color: #f44336;--mdc-radio-selected-pressed-icon-color: #f44336;--mat-radio-ripple-color: #000;--mat-radio-checked-ripple-color: #f44336;--mat-radio-disabled-label-color: rgba(0, 0, 0, .38)}.mat-mdc-radio-button[_ngcontent-%COMP%] .mdc-radio[_ngcontent-%COMP%]{--mdc-radio-state-layer-size: 32px}.mat-mdc-radio-touch-target[_ngcontent-%COMP%]{display:none}.mat-mdc-radio-button[_ngcontent-%COMP%] .mdc-form-field[_ngcontent-%COMP%]{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Inter));font-size:var(--mdc-typography-body2-font-size, 13px);line-height:var(--mdc-typography-body2-line-height, 19px);font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:var(--mdc-typography-body2-letter-spacing, normal);-webkit-text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:var(--mdc-typography-body2-text-transform, none)}.mat-mdc-slider[_ngcontent-%COMP%]{--mdc-slider-label-container-color: black;--mdc-slider-label-label-text-color: white;--mdc-slider-disabled-handle-color: #000;--mdc-slider-disabled-active-track-color: #000;--mdc-slider-disabled-inactive-track-color: #000;--mdc-slider-with-tick-marks-disabled-container-color: #000;--mat-mdc-slider-value-indicator-opacity: .6}.mat-mdc-slider.mat-primary[_ngcontent-%COMP%]{--mdc-slider-handle-color: #0f0761;--mdc-slider-focus-handle-color: #0f0761;--mdc-slider-hover-handle-color: #0f0761;--mdc-slider-active-track-color: #0f0761;--mdc-slider-inactive-track-color: #0f0761;--mdc-slider-with-tick-marks-active-container-color: #fff;--mdc-slider-with-tick-marks-inactive-container-color: #0f0761;--mat-mdc-slider-ripple-color: #0f0761;--mat-mdc-slider-hover-ripple-color: rgba(15, 7, 97, .05);--mat-mdc-slider-focus-ripple-color: rgba(15, 7, 97, .2)}.mat-mdc-slider.mat-accent[_ngcontent-%COMP%]{--mdc-slider-handle-color: #dd7345;--mdc-slider-focus-handle-color: #dd7345;--mdc-slider-hover-handle-color: #dd7345;--mdc-slider-active-track-color: #dd7345;--mdc-slider-inactive-track-color: #dd7345;--mdc-slider-with-tick-marks-active-container-color: #fff;--mdc-slider-with-tick-marks-inactive-container-color: #dd7345;--mat-mdc-slider-ripple-color: #dd7345;--mat-mdc-slider-hover-ripple-color: rgba(221, 115, 69, .05);--mat-mdc-slider-focus-ripple-color: rgba(221, 115, 69, .2)}.mat-mdc-slider.mat-warn[_ngcontent-%COMP%]{--mdc-slider-handle-color: #f44336;--mdc-slider-focus-handle-color: #f44336;--mdc-slider-hover-handle-color: #f44336;--mdc-slider-active-track-color: #f44336;--mdc-slider-inactive-track-color: #f44336;--mdc-slider-with-tick-marks-active-container-color: #fff;--mdc-slider-with-tick-marks-inactive-container-color: #f44336;--mat-mdc-slider-ripple-color: #f44336;--mat-mdc-slider-hover-ripple-color: rgba(244, 67, 54, .05);--mat-mdc-slider-focus-ripple-color: rgba(244, 67, 54, .2)}.mat-mdc-slider[_ngcontent-%COMP%]{--mdc-slider-label-label-text-font: Inter;--mdc-slider-label-label-text-size: 13px;--mdc-slider-label-label-text-line-height: 19px;--mdc-slider-label-label-text-tracking: normal;--mdc-slider-label-label-text-weight: 500}html[_ngcontent-%COMP%]{--mat-menu-item-label-text-color: rgba(0, 0, 0, .87);--mat-menu-item-icon-color: rgba(0, 0, 0, .87);--mat-menu-item-hover-state-layer-color: rgba(0, 0, 0, .04);--mat-menu-item-focus-state-layer-color: rgba(0, 0, 0, .04);--mat-menu-container-color: white}html[_ngcontent-%COMP%]{--mat-menu-item-label-text-font: Inter;--mat-menu-item-label-text-size: 13px;--mat-menu-item-label-text-tracking: normal;--mat-menu-item-label-text-line-height: 19px;--mat-menu-item-label-text-weight: 400}.mat-mdc-list-base[_ngcontent-%COMP%]{--mdc-list-list-item-label-text-color: rgba(0, 0, 0, .87);--mdc-list-list-item-supporting-text-color: rgba(0, 0, 0, .54);--mdc-list-list-item-leading-icon-color: rgba(0, 0, 0, .38);--mdc-list-list-item-trailing-supporting-text-color: rgba(0, 0, 0, .38);--mdc-list-list-item-trailing-icon-color: rgba(0, 0, 0, .38);--mdc-list-list-item-selected-trailing-icon-color: rgba(0, 0, 0, .38);--mdc-list-list-item-disabled-label-text-color: black;--mdc-list-list-item-disabled-leading-icon-color: black;--mdc-list-list-item-disabled-trailing-icon-color: black;--mdc-list-list-item-hover-label-text-color: rgba(0, 0, 0, .87);--mdc-list-list-item-hover-leading-icon-color: rgba(0, 0, 0, .38);--mdc-list-list-item-hover-trailing-icon-color: rgba(0, 0, 0, .38);--mdc-list-list-item-focus-label-text-color: rgba(0, 0, 0, .87);--mdc-list-list-item-hover-state-layer-color: black;--mdc-list-list-item-hover-state-layer-opacity: .04;--mdc-list-list-item-focus-state-layer-color: black;--mdc-list-list-item-focus-state-layer-opacity: .12}.mdc-list-item__start[_ngcontent-%COMP%], .mdc-list-item__end[_ngcontent-%COMP%]{--mdc-radio-disabled-selected-icon-color: #000;--mdc-radio-disabled-unselected-icon-color: #000;--mdc-radio-unselected-hover-icon-color: #212121;--mdc-radio-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color: #0f0761;--mdc-radio-selected-hover-icon-color: #0f0761;--mdc-radio-selected-icon-color: #0f0761;--mdc-radio-selected-pressed-icon-color: #0f0761}.mat-accent[_ngcontent-%COMP%] .mdc-list-item__start[_ngcontent-%COMP%], .mat-accent[_ngcontent-%COMP%] .mdc-list-item__end[_ngcontent-%COMP%]{--mdc-radio-disabled-selected-icon-color: #000;--mdc-radio-disabled-unselected-icon-color: #000;--mdc-radio-unselected-hover-icon-color: #212121;--mdc-radio-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color: #dd7345;--mdc-radio-selected-hover-icon-color: #dd7345;--mdc-radio-selected-icon-color: #dd7345;--mdc-radio-selected-pressed-icon-color: #dd7345}.mat-warn[_ngcontent-%COMP%] .mdc-list-item__start[_ngcontent-%COMP%], .mat-warn[_ngcontent-%COMP%] .mdc-list-item__end[_ngcontent-%COMP%]{--mdc-radio-disabled-selected-icon-color: #000;--mdc-radio-disabled-unselected-icon-color: #000;--mdc-radio-unselected-hover-icon-color: #212121;--mdc-radio-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color: #f44336;--mdc-radio-selected-hover-icon-color: #f44336;--mdc-radio-selected-icon-color: #f44336;--mdc-radio-selected-pressed-icon-color: #f44336}.mat-mdc-list-option[_ngcontent-%COMP%]{--mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-selected-checkmark-color: #fff;--mdc-checkbox-selected-focus-icon-color: #0f0761;--mdc-checkbox-selected-hover-icon-color: #0f0761;--mdc-checkbox-selected-icon-color: #0f0761;--mdc-checkbox-selected-pressed-icon-color: #0f0761;--mdc-checkbox-unselected-focus-icon-color: #212121;--mdc-checkbox-unselected-hover-icon-color: #212121;--mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-selected-focus-state-layer-color: #0f0761;--mdc-checkbox-selected-hover-state-layer-color: #0f0761;--mdc-checkbox-selected-pressed-state-layer-color: #0f0761;--mdc-checkbox-unselected-focus-state-layer-color: black;--mdc-checkbox-unselected-hover-state-layer-color: black;--mdc-checkbox-unselected-pressed-state-layer-color: black}.mat-mdc-list-option.mat-accent[_ngcontent-%COMP%]{--mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-selected-checkmark-color: #fff;--mdc-checkbox-selected-focus-icon-color: #dd7345;--mdc-checkbox-selected-hover-icon-color: #dd7345;--mdc-checkbox-selected-icon-color: #dd7345;--mdc-checkbox-selected-pressed-icon-color: #dd7345;--mdc-checkbox-unselected-focus-icon-color: #212121;--mdc-checkbox-unselected-hover-icon-color: #212121;--mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-selected-focus-state-layer-color: #dd7345;--mdc-checkbox-selected-hover-state-layer-color: #dd7345;--mdc-checkbox-selected-pressed-state-layer-color: #dd7345;--mdc-checkbox-unselected-focus-state-layer-color: black;--mdc-checkbox-unselected-hover-state-layer-color: black;--mdc-checkbox-unselected-pressed-state-layer-color: black}.mat-mdc-list-option.mat-warn[_ngcontent-%COMP%]{--mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-selected-checkmark-color: #fff;--mdc-checkbox-selected-focus-icon-color: #f44336;--mdc-checkbox-selected-hover-icon-color: #f44336;--mdc-checkbox-selected-icon-color: #f44336;--mdc-checkbox-selected-pressed-icon-color: #f44336;--mdc-checkbox-unselected-focus-icon-color: #212121;--mdc-checkbox-unselected-hover-icon-color: #212121;--mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-selected-focus-state-layer-color: #f44336;--mdc-checkbox-selected-hover-state-layer-color: #f44336;--mdc-checkbox-selected-pressed-state-layer-color: #f44336;--mdc-checkbox-unselected-focus-state-layer-color: black;--mdc-checkbox-unselected-hover-state-layer-color: black;--mdc-checkbox-unselected-pressed-state-layer-color: black}.mat-mdc-list-base.mat-mdc-list-base[_ngcontent-%COMP%] .mdc-list-item--selected[_ngcontent-%COMP%] .mdc-list-item__primary-text[_ngcontent-%COMP%], .mat-mdc-list-base.mat-mdc-list-base[_ngcontent-%COMP%] .mdc-list-item--activated[_ngcontent-%COMP%] .mdc-list-item__primary-text[_ngcontent-%COMP%], .mat-mdc-list-base.mat-mdc-list-base[_ngcontent-%COMP%] .mdc-list-item--selected.mdc-list-item--with-leading-icon[_ngcontent-%COMP%] .mdc-list-item__start[_ngcontent-%COMP%], .mat-mdc-list-base.mat-mdc-list-base[_ngcontent-%COMP%] .mdc-list-item--activated.mdc-list-item--with-leading-icon[_ngcontent-%COMP%] .mdc-list-item__start[_ngcontent-%COMP%]{color:#0f0761}.mat-mdc-list-base[_ngcontent-%COMP%] .mdc-list-item--disabled[_ngcontent-%COMP%] .mdc-list-item__start[_ngcontent-%COMP%], .mat-mdc-list-base[_ngcontent-%COMP%] .mdc-list-item--disabled[_ngcontent-%COMP%] .mdc-list-item__content[_ngcontent-%COMP%], .mat-mdc-list-base[_ngcontent-%COMP%] .mdc-list-item--disabled[_ngcontent-%COMP%] .mdc-list-item__end[_ngcontent-%COMP%]{opacity:1}.mat-mdc-list-base[_ngcontent-%COMP%]{--mdc-list-list-item-one-line-container-height: 40px;--mdc-list-list-item-two-line-container-height: 56px;--mdc-list-list-item-three-line-container-height: 80px}.mat-mdc-list-item.mdc-list-item--with-leading-avatar.mdc-list-item--with-one-line[_ngcontent-%COMP%], .mat-mdc-list-item.mdc-list-item--with-leading-checkbox.mdc-list-item--with-one-line[_ngcontent-%COMP%], .mat-mdc-list-item.mdc-list-item--with-leading-icon.mdc-list-item--with-one-line[_ngcontent-%COMP%]{height:48px}.mat-mdc-list-item.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines[_ngcontent-%COMP%], .mat-mdc-list-item.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines[_ngcontent-%COMP%], .mat-mdc-list-item.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines[_ngcontent-%COMP%]{height:64px}.mat-mdc-list-base[_ngcontent-%COMP%]{--mdc-list-list-item-label-text-font: Inter;--mdc-list-list-item-label-text-line-height: 19px;--mdc-list-list-item-label-text-size: 13px;--mdc-list-list-item-label-text-tracking: normal;--mdc-list-list-item-label-text-weight: 400;--mdc-list-list-item-supporting-text-font: Inter;--mdc-list-list-item-supporting-text-line-height: 19px;--mdc-list-list-item-supporting-text-size: 13px;--mdc-list-list-item-supporting-text-tracking: normal;--mdc-list-list-item-supporting-text-weight: 400;--mdc-list-list-item-trailing-supporting-text-font: Inter;--mdc-list-list-item-trailing-supporting-text-line-height: 16px;--mdc-list-list-item-trailing-supporting-text-size: 12px;--mdc-list-list-item-trailing-supporting-text-tracking: normal;--mdc-list-list-item-trailing-supporting-text-weight: 400}.mdc-list-group__subheader[_ngcontent-%COMP%]{font-size:16px;font-weight:600;line-height:22px;font-family:Inter;letter-spacing:normal}html[_ngcontent-%COMP%]{--mat-paginator-container-text-color: rgba(0, 0, 0, .87);--mat-paginator-container-background-color: white;--mat-paginator-enabled-icon-color: rgba(0, 0, 0, .54);--mat-paginator-disabled-icon-color: rgba(0, 0, 0, .12)}html[_ngcontent-%COMP%]{--mat-paginator-container-size: 48px}.mat-mdc-paginator[_ngcontent-%COMP%] .mat-mdc-form-field-infix[_ngcontent-%COMP%]{min-height:40px}.mat-mdc-paginator[_ngcontent-%COMP%] .mat-mdc-text-field-wrapper[_ngcontent-%COMP%] .mat-mdc-form-field-flex[_ngcontent-%COMP%] .mat-mdc-floating-label[_ngcontent-%COMP%]{top:20px}.mat-mdc-paginator[_ngcontent-%COMP%] .mat-mdc-text-field-wrapper.mdc-text-field--outlined[_ngcontent-%COMP%] .mdc-notched-outline--upgraded[_ngcontent-%COMP%] .mdc-floating-label--float-above[_ngcontent-%COMP%]{--mat-mdc-form-field-label-transform: translateY( -26.75px) scale(var(--mat-mdc-form-field-floating-label-scale, .75));transform:var(--mat-mdc-form-field-label-transform)}.mat-mdc-paginator[_ngcontent-%COMP%] .mat-mdc-text-field-wrapper.mdc-text-field--outlined[_ngcontent-%COMP%] .mat-mdc-form-field-infix[_ngcontent-%COMP%]{padding-top:8px;padding-bottom:8px}.mat-mdc-paginator[_ngcontent-%COMP%] .mat-mdc-text-field-wrapper[_ngcontent-%COMP%]:not(.mdc-text-field--outlined) .mat-mdc-form-field-infix[_ngcontent-%COMP%]{padding-top:8px;padding-bottom:8px}.mat-mdc-paginator[_ngcontent-%COMP%] .mdc-text-field--no-label[_ngcontent-%COMP%]:not(.mdc-text-field--outlined):not(.mdc-text-field--textarea) .mat-mdc-form-field-infix[_ngcontent-%COMP%]{padding-top:8px;padding-bottom:8px}.mat-mdc-paginator[_ngcontent-%COMP%] .mat-mdc-text-field-wrapper[_ngcontent-%COMP%]:not(.mdc-text-field--outlined) .mat-mdc-floating-label[_ngcontent-%COMP%]{display:none}html[_ngcontent-%COMP%]{--mat-paginator-container-text-font: Inter;--mat-paginator-container-text-line-height: 16px;--mat-paginator-container-text-size: 12px;--mat-paginator-container-text-tracking: normal;--mat-paginator-container-text-weight: 400;--mat-paginator-select-trigger-text-size: 12px}.mat-mdc-tab-group[_ngcontent-%COMP%], .mat-mdc-tab-nav-bar[_ngcontent-%COMP%]{--mdc-tab-indicator-active-indicator-color: #0f0761;--mat-tab-header-disabled-ripple-color: rgba(0, 0, 0, .38);--mat-tab-header-pagination-icon-color: #000;--mat-tab-header-inactive-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-active-label-text-color: #0f0761;--mat-tab-header-active-ripple-color: #0f0761;--mat-tab-header-inactive-ripple-color: #0f0761;--mat-tab-header-inactive-focus-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-inactive-hover-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-active-focus-label-text-color: #0f0761;--mat-tab-header-active-hover-label-text-color: #0f0761;--mat-tab-header-active-focus-indicator-color: #0f0761;--mat-tab-header-active-hover-indicator-color: #0f0761}.mat-mdc-tab-group.mat-accent[_ngcontent-%COMP%], .mat-mdc-tab-nav-bar.mat-accent[_ngcontent-%COMP%]{--mdc-tab-indicator-active-indicator-color: #dd7345;--mat-tab-header-disabled-ripple-color: rgba(0, 0, 0, .38);--mat-tab-header-pagination-icon-color: #000;--mat-tab-header-inactive-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-active-label-text-color: #dd7345;--mat-tab-header-active-ripple-color: #dd7345;--mat-tab-header-inactive-ripple-color: #dd7345;--mat-tab-header-inactive-focus-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-inactive-hover-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-active-focus-label-text-color: #dd7345;--mat-tab-header-active-hover-label-text-color: #dd7345;--mat-tab-header-active-focus-indicator-color: #dd7345;--mat-tab-header-active-hover-indicator-color: #dd7345}.mat-mdc-tab-group.mat-warn[_ngcontent-%COMP%], .mat-mdc-tab-nav-bar.mat-warn[_ngcontent-%COMP%]{--mdc-tab-indicator-active-indicator-color: #f44336;--mat-tab-header-disabled-ripple-color: rgba(0, 0, 0, .38);--mat-tab-header-pagination-icon-color: #000;--mat-tab-header-inactive-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-active-label-text-color: #f44336;--mat-tab-header-active-ripple-color: #f44336;--mat-tab-header-inactive-ripple-color: #f44336;--mat-tab-header-inactive-focus-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-inactive-hover-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-active-focus-label-text-color: #f44336;--mat-tab-header-active-hover-label-text-color: #f44336;--mat-tab-header-active-focus-indicator-color: #f44336;--mat-tab-header-active-hover-indicator-color: #f44336}.mat-mdc-tab-group.mat-background-primary[_ngcontent-%COMP%], .mat-mdc-tab-nav-bar.mat-background-primary[_ngcontent-%COMP%]{--mat-tab-header-with-background-background-color: #0f0761;--mat-tab-header-with-background-foreground-color: white}.mat-mdc-tab-group.mat-background-accent[_ngcontent-%COMP%], .mat-mdc-tab-nav-bar.mat-background-accent[_ngcontent-%COMP%]{--mat-tab-header-with-background-background-color: #dd7345;--mat-tab-header-with-background-foreground-color: white}.mat-mdc-tab-group.mat-background-warn[_ngcontent-%COMP%], .mat-mdc-tab-nav-bar.mat-background-warn[_ngcontent-%COMP%]{--mat-tab-header-with-background-background-color: #f44336;--mat-tab-header-with-background-foreground-color: white}.mat-mdc-tab-header[_ngcontent-%COMP%]{--mdc-secondary-navigation-tab-container-height: 40px}.mat-mdc-tab-header[_ngcontent-%COMP%]{--mat-tab-header-label-text-font: Inter;--mat-tab-header-label-text-size: 13px;--mat-tab-header-label-text-tracking: normal;--mat-tab-header-label-text-line-height: 19px;--mat-tab-header-label-text-weight: 500}html[_ngcontent-%COMP%]{--mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-selected-checkmark-color: #fff;--mdc-checkbox-selected-focus-icon-color: #dd7345;--mdc-checkbox-selected-hover-icon-color: #dd7345;--mdc-checkbox-selected-icon-color: #dd7345;--mdc-checkbox-selected-pressed-icon-color: #dd7345;--mdc-checkbox-unselected-focus-icon-color: #212121;--mdc-checkbox-unselected-hover-icon-color: #212121;--mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-selected-focus-state-layer-color: #dd7345;--mdc-checkbox-selected-hover-state-layer-color: #dd7345;--mdc-checkbox-selected-pressed-state-layer-color: #dd7345;--mdc-checkbox-unselected-focus-state-layer-color: black;--mdc-checkbox-unselected-hover-state-layer-color: black;--mdc-checkbox-unselected-pressed-state-layer-color: black}.mat-mdc-checkbox.mat-primary[_ngcontent-%COMP%]{--mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-selected-checkmark-color: #fff;--mdc-checkbox-selected-focus-icon-color: #0f0761;--mdc-checkbox-selected-hover-icon-color: #0f0761;--mdc-checkbox-selected-icon-color: #0f0761;--mdc-checkbox-selected-pressed-icon-color: #0f0761;--mdc-checkbox-unselected-focus-icon-color: #212121;--mdc-checkbox-unselected-hover-icon-color: #212121;--mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-selected-focus-state-layer-color: #0f0761;--mdc-checkbox-selected-hover-state-layer-color: #0f0761;--mdc-checkbox-selected-pressed-state-layer-color: #0f0761;--mdc-checkbox-unselected-focus-state-layer-color: black;--mdc-checkbox-unselected-hover-state-layer-color: black;--mdc-checkbox-unselected-pressed-state-layer-color: black}.mat-mdc-checkbox.mat-warn[_ngcontent-%COMP%]{--mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-selected-checkmark-color: #fff;--mdc-checkbox-selected-focus-icon-color: #f44336;--mdc-checkbox-selected-hover-icon-color: #f44336;--mdc-checkbox-selected-icon-color: #f44336;--mdc-checkbox-selected-pressed-icon-color: #f44336;--mdc-checkbox-unselected-focus-icon-color: #212121;--mdc-checkbox-unselected-hover-icon-color: #212121;--mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-selected-focus-state-layer-color: #f44336;--mdc-checkbox-selected-hover-state-layer-color: #f44336;--mdc-checkbox-selected-pressed-state-layer-color: #f44336;--mdc-checkbox-unselected-focus-state-layer-color: black;--mdc-checkbox-unselected-hover-state-layer-color: black;--mdc-checkbox-unselected-pressed-state-layer-color: black}.mat-mdc-checkbox[_ngcontent-%COMP%] .mdc-form-field[_ngcontent-%COMP%]{color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, .87))}.mat-mdc-checkbox.mat-mdc-checkbox-disabled[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{color:#00000061}html[_ngcontent-%COMP%]{--mdc-checkbox-state-layer-size: 32px}.mat-mdc-checkbox-touch-target[_ngcontent-%COMP%]{display:none}.mat-mdc-checkbox[_ngcontent-%COMP%] .mdc-form-field[_ngcontent-%COMP%]{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Inter));font-size:var(--mdc-typography-body2-font-size, 13px);line-height:var(--mdc-typography-body2-line-height, 19px);font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:var(--mdc-typography-body2-letter-spacing, normal);-webkit-text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:var(--mdc-typography-body2-text-transform, none)}.mat-mdc-button.mat-unthemed[_ngcontent-%COMP%]{--mdc-text-button-label-text-color: #000}.mat-mdc-button.mat-primary[_ngcontent-%COMP%]{--mdc-text-button-label-text-color: #0f0761}.mat-mdc-button.mat-accent[_ngcontent-%COMP%]{--mdc-text-button-label-text-color: #dd7345}.mat-mdc-button.mat-warn[_ngcontent-%COMP%]{--mdc-text-button-label-text-color: #f44336}.mat-mdc-button[disabled][disabled][_ngcontent-%COMP%]{--mdc-text-button-disabled-label-text-color: rgba(0, 0, 0, .38);--mdc-text-button-label-text-color: rgba(0, 0, 0, .38)}.mat-mdc-unelevated-button.mat-unthemed[_ngcontent-%COMP%]{--mdc-filled-button-container-color: #fff;--mdc-filled-button-label-text-color: #000}.mat-mdc-unelevated-button.mat-primary[_ngcontent-%COMP%]{--mdc-filled-button-container-color: #0f0761;--mdc-filled-button-label-text-color: #fff}.mat-mdc-unelevated-button.mat-accent[_ngcontent-%COMP%]{--mdc-filled-button-container-color: #dd7345;--mdc-filled-button-label-text-color: #fff}.mat-mdc-unelevated-button.mat-warn[_ngcontent-%COMP%]{--mdc-filled-button-container-color: #f44336;--mdc-filled-button-label-text-color: #fff}.mat-mdc-unelevated-button[disabled][disabled][_ngcontent-%COMP%]{--mdc-filled-button-disabled-container-color: rgba(0, 0, 0, .12);--mdc-filled-button-disabled-label-text-color: rgba(0, 0, 0, .38);--mdc-filled-button-container-color: rgba(0, 0, 0, .12);--mdc-filled-button-label-text-color: rgba(0, 0, 0, .38)}.mat-mdc-raised-button.mat-unthemed[_ngcontent-%COMP%]{--mdc-protected-button-container-color: #fff;--mdc-protected-button-label-text-color: #000}.mat-mdc-raised-button.mat-primary[_ngcontent-%COMP%]{--mdc-protected-button-container-color: #0f0761;--mdc-protected-button-label-text-color: #fff}.mat-mdc-raised-button.mat-accent[_ngcontent-%COMP%]{--mdc-protected-button-container-color: #dd7345;--mdc-protected-button-label-text-color: #fff}.mat-mdc-raised-button.mat-warn[_ngcontent-%COMP%]{--mdc-protected-button-container-color: #f44336;--mdc-protected-button-label-text-color: #fff}.mat-mdc-raised-button[disabled][disabled][_ngcontent-%COMP%]{--mdc-protected-button-disabled-container-color: rgba(0, 0, 0, .12);--mdc-protected-button-disabled-label-text-color: rgba(0, 0, 0, .38);--mdc-protected-button-container-color: rgba(0, 0, 0, .12);--mdc-protected-button-label-text-color: rgba(0, 0, 0, .38);--mdc-protected-button-container-elevation: 0}.mat-mdc-outlined-button[_ngcontent-%COMP%]{--mdc-outlined-button-outline-color: rgba(0, 0, 0, .12)}.mat-mdc-outlined-button.mat-unthemed[_ngcontent-%COMP%]{--mdc-outlined-button-label-text-color: #000}.mat-mdc-outlined-button.mat-primary[_ngcontent-%COMP%]{--mdc-outlined-button-label-text-color: #0f0761}.mat-mdc-outlined-button.mat-accent[_ngcontent-%COMP%]{--mdc-outlined-button-label-text-color: #dd7345}.mat-mdc-outlined-button.mat-warn[_ngcontent-%COMP%]{--mdc-outlined-button-label-text-color: #f44336}.mat-mdc-outlined-button[disabled][disabled][_ngcontent-%COMP%]{--mdc-outlined-button-label-text-color: rgba(0, 0, 0, .38);--mdc-outlined-button-disabled-label-text-color: rgba(0, 0, 0, .38);--mdc-outlined-button-outline-color: rgba(0, 0, 0, .12);--mdc-outlined-button-disabled-outline-color: rgba(0, 0, 0, .12)}.mat-mdc-button[_ngcontent-%COMP%], .mat-mdc-outlined-button[_ngcontent-%COMP%]{--mat-mdc-button-persistent-ripple-color: #000;--mat-mdc-button-ripple-color: rgba(0, 0, 0, .1)}.mat-mdc-button[_ngcontent-%COMP%]:hover .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before, .mat-mdc-outlined-button[_ngcontent-%COMP%]:hover .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before{opacity:.04}.mat-mdc-button.cdk-program-focused[_ngcontent-%COMP%] .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before, .mat-mdc-button.cdk-keyboard-focused[_ngcontent-%COMP%] .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before, .mat-mdc-outlined-button.cdk-program-focused[_ngcontent-%COMP%] .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before, .mat-mdc-outlined-button.cdk-keyboard-focused[_ngcontent-%COMP%] .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before{opacity:.12}.mat-mdc-button[_ngcontent-%COMP%]:active .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before, .mat-mdc-outlined-button[_ngcontent-%COMP%]:active .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before{opacity:.12}.mat-mdc-button.mat-primary[_ngcontent-%COMP%], .mat-mdc-outlined-button.mat-primary[_ngcontent-%COMP%]{--mat-mdc-button-persistent-ripple-color: #0f0761;--mat-mdc-button-ripple-color: rgba(15, 7, 97, .1)}.mat-mdc-button.mat-accent[_ngcontent-%COMP%], .mat-mdc-outlined-button.mat-accent[_ngcontent-%COMP%]{--mat-mdc-button-persistent-ripple-color: #dd7345;--mat-mdc-button-ripple-color: rgba(221, 115, 69, .1)}.mat-mdc-button.mat-warn[_ngcontent-%COMP%], .mat-mdc-outlined-button.mat-warn[_ngcontent-%COMP%]{--mat-mdc-button-persistent-ripple-color: #f44336;--mat-mdc-button-ripple-color: rgba(244, 67, 54, .1)}.mat-mdc-raised-button[_ngcontent-%COMP%], .mat-mdc-unelevated-button[_ngcontent-%COMP%]{--mat-mdc-button-persistent-ripple-color: #000;--mat-mdc-button-ripple-color: rgba(0, 0, 0, .1)}.mat-mdc-raised-button[_ngcontent-%COMP%]:hover .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before, .mat-mdc-unelevated-button[_ngcontent-%COMP%]:hover .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before{opacity:.04}.mat-mdc-raised-button.cdk-program-focused[_ngcontent-%COMP%] .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before, .mat-mdc-raised-button.cdk-keyboard-focused[_ngcontent-%COMP%] .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before, .mat-mdc-unelevated-button.cdk-program-focused[_ngcontent-%COMP%] .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before, .mat-mdc-unelevated-button.cdk-keyboard-focused[_ngcontent-%COMP%] .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before{opacity:.12}.mat-mdc-raised-button[_ngcontent-%COMP%]:active .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before, .mat-mdc-unelevated-button[_ngcontent-%COMP%]:active .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before{opacity:.12}.mat-mdc-raised-button.mat-primary[_ngcontent-%COMP%], .mat-mdc-unelevated-button.mat-primary[_ngcontent-%COMP%], .mat-mdc-raised-button.mat-accent[_ngcontent-%COMP%], .mat-mdc-unelevated-button.mat-accent[_ngcontent-%COMP%], .mat-mdc-raised-button.mat-warn[_ngcontent-%COMP%], .mat-mdc-unelevated-button.mat-warn[_ngcontent-%COMP%]{--mat-mdc-button-persistent-ripple-color: #fff;--mat-mdc-button-ripple-color: rgba(255, 255, 255, .1)}.mat-mdc-button.mat-mdc-button-base[_ngcontent-%COMP%], .mat-mdc-raised-button.mat-mdc-button-base[_ngcontent-%COMP%], .mat-mdc-unelevated-button.mat-mdc-button-base[_ngcontent-%COMP%], .mat-mdc-outlined-button.mat-mdc-button-base[_ngcontent-%COMP%]{height:28px;margin-top:0;margin-bottom:0}.mat-mdc-button.mat-mdc-button-base[_ngcontent-%COMP%] .mdc-button__touch[_ngcontent-%COMP%], .mat-mdc-raised-button.mat-mdc-button-base[_ngcontent-%COMP%] .mdc-button__touch[_ngcontent-%COMP%], .mat-mdc-unelevated-button.mat-mdc-button-base[_ngcontent-%COMP%] .mdc-button__touch[_ngcontent-%COMP%], .mat-mdc-outlined-button.mat-mdc-button-base[_ngcontent-%COMP%] .mdc-button__touch[_ngcontent-%COMP%]{height:100%}.mat-mdc-button.mat-mdc-button-base[_ngcontent-%COMP%] .mat-mdc-button-touch-target[_ngcontent-%COMP%], .mat-mdc-raised-button.mat-mdc-button-base[_ngcontent-%COMP%] .mat-mdc-button-touch-target[_ngcontent-%COMP%], .mat-mdc-unelevated-button.mat-mdc-button-base[_ngcontent-%COMP%] .mat-mdc-button-touch-target[_ngcontent-%COMP%], .mat-mdc-outlined-button.mat-mdc-button-base[_ngcontent-%COMP%] .mat-mdc-button-touch-target[_ngcontent-%COMP%]{display:none}.mdc-button[_ngcontent-%COMP%]{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Inter));font-size:var(--mdc-typography-button-font-size, 13px);line-height:var(--mdc-typography-button-line-height, 19px);font-weight:var(--mdc-typography-button-font-weight, 500);letter-spacing:var(--mdc-typography-button-letter-spacing, normal);-webkit-text-decoration:var(--mdc-typography-button-text-decoration, none);text-decoration:var(--mdc-typography-button-text-decoration, none);text-transform:var(--mdc-typography-button-text-transform, none)}.mat-mdc-icon-button[_ngcontent-%COMP%]{--mdc-icon-button-icon-color: inherit;--mat-mdc-button-persistent-ripple-color: #000;--mat-mdc-button-ripple-color: rgba(0, 0, 0, .1)}.mat-mdc-icon-button[_ngcontent-%COMP%]:hover .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before{opacity:.04}.mat-mdc-icon-button.cdk-program-focused[_ngcontent-%COMP%] .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before, .mat-mdc-icon-button.cdk-keyboard-focused[_ngcontent-%COMP%] .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before{opacity:.12}.mat-mdc-icon-button[_ngcontent-%COMP%]:active .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before{opacity:.12}.mat-mdc-icon-button.mat-primary[_ngcontent-%COMP%]{--mat-mdc-button-persistent-ripple-color: #6200ee;--mat-mdc-button-ripple-color: rgba(98, 0, 238, .1)}.mat-mdc-icon-button.mat-accent[_ngcontent-%COMP%]{--mat-mdc-button-persistent-ripple-color: #018786;--mat-mdc-button-ripple-color: rgba(1, 135, 134, .1)}.mat-mdc-icon-button.mat-warn[_ngcontent-%COMP%]{--mat-mdc-button-persistent-ripple-color: #b00020;--mat-mdc-button-ripple-color: rgba(176, 0, 32, .1)}.mat-mdc-icon-button.mat-primary[_ngcontent-%COMP%]{--mdc-icon-button-icon-color: #0f0761;--mat-mdc-button-persistent-ripple-color: #0f0761;--mat-mdc-button-ripple-color: rgba(15, 7, 97, .1)}.mat-mdc-icon-button.mat-accent[_ngcontent-%COMP%]{--mdc-icon-button-icon-color: #dd7345;--mat-mdc-button-persistent-ripple-color: #dd7345;--mat-mdc-button-ripple-color: rgba(221, 115, 69, .1)}.mat-mdc-icon-button.mat-warn[_ngcontent-%COMP%]{--mdc-icon-button-icon-color: #f44336;--mat-mdc-button-persistent-ripple-color: #f44336;--mat-mdc-button-ripple-color: rgba(244, 67, 54, .1)}.mat-mdc-icon-button[disabled][disabled][_ngcontent-%COMP%]{--mdc-icon-button-icon-color: rgba(0, 0, 0, .38);--mdc-icon-button-disabled-icon-color: rgba(0, 0, 0, .38)}.mat-mdc-icon-button.mat-mdc-button-base[_ngcontent-%COMP%]{--mdc-icon-button-state-layer-size: 40px;width:var(--mdc-icon-button-state-layer-size);height:var(--mdc-icon-button-state-layer-size);padding:8px}.mat-mdc-icon-button.mat-mdc-button-base[_ngcontent-%COMP%] .mat-mdc-button-touch-target[_ngcontent-%COMP%]{display:none}.mat-mdc-fab[_ngcontent-%COMP%], .mat-mdc-mini-fab[_ngcontent-%COMP%]{--mat-mdc-button-persistent-ripple-color: #000;--mat-mdc-button-ripple-color: rgba(0, 0, 0, .1)}.mat-mdc-fab[_ngcontent-%COMP%]:hover .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before, .mat-mdc-mini-fab[_ngcontent-%COMP%]:hover .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before{opacity:.04}.mat-mdc-fab.cdk-program-focused[_ngcontent-%COMP%] .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before, .mat-mdc-fab.cdk-keyboard-focused[_ngcontent-%COMP%] .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before, .mat-mdc-mini-fab.cdk-program-focused[_ngcontent-%COMP%] .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before, .mat-mdc-mini-fab.cdk-keyboard-focused[_ngcontent-%COMP%] .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before{opacity:.12}.mat-mdc-fab[_ngcontent-%COMP%]:active .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before, .mat-mdc-mini-fab[_ngcontent-%COMP%]:active .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before{opacity:.12}.mat-mdc-fab.mat-primary[_ngcontent-%COMP%], .mat-mdc-mini-fab.mat-primary[_ngcontent-%COMP%], .mat-mdc-fab.mat-accent[_ngcontent-%COMP%], .mat-mdc-mini-fab.mat-accent[_ngcontent-%COMP%], .mat-mdc-fab.mat-warn[_ngcontent-%COMP%], .mat-mdc-mini-fab.mat-warn[_ngcontent-%COMP%]{--mat-mdc-button-persistent-ripple-color: #fff;--mat-mdc-button-ripple-color: rgba(255, 255, 255, .1)}.mat-mdc-fab[disabled][disabled][_ngcontent-%COMP%], .mat-mdc-mini-fab[disabled][disabled][_ngcontent-%COMP%]{--mdc-fab-container-color: rgba(0, 0, 0, .12);--mdc-fab-icon-color: rgba(0, 0, 0, .38);--mat-mdc-fab-color: rgba(0, 0, 0, .38)}.mat-mdc-fab.mat-unthemed[_ngcontent-%COMP%], .mat-mdc-mini-fab.mat-unthemed[_ngcontent-%COMP%]{--mdc-fab-container-color: white;--mdc-fab-icon-color: black;--mat-mdc-fab-color: #000}.mat-mdc-fab.mat-primary[_ngcontent-%COMP%], .mat-mdc-mini-fab.mat-primary[_ngcontent-%COMP%]{--mdc-fab-container-color: #0f0761;--mdc-fab-icon-color: white;--mat-mdc-fab-color: #fff}.mat-mdc-fab.mat-accent[_ngcontent-%COMP%], .mat-mdc-mini-fab.mat-accent[_ngcontent-%COMP%]{--mdc-fab-container-color: #dd7345;--mdc-fab-icon-color: white;--mat-mdc-fab-color: #fff}.mat-mdc-fab.mat-warn[_ngcontent-%COMP%], .mat-mdc-mini-fab.mat-warn[_ngcontent-%COMP%]{--mdc-fab-container-color: #f44336;--mdc-fab-icon-color: white;--mat-mdc-fab-color: #fff}.mdc-fab--extended[_ngcontent-%COMP%]{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Inter));font-size:var(--mdc-typography-button-font-size, 13px);line-height:var(--mdc-typography-button-line-height, 19px);font-weight:var(--mdc-typography-button-font-weight, 500);letter-spacing:var(--mdc-typography-button-letter-spacing, normal);-webkit-text-decoration:var(--mdc-typography-button-text-decoration, none);text-decoration:var(--mdc-typography-button-text-decoration, none);text-transform:var(--mdc-typography-button-text-transform, none)}.mat-mdc-extended-fab[_ngcontent-%COMP%]{--mdc-extended-fab-label-text-font: Inter;--mdc-extended-fab-label-text-size: 13px;--mdc-extended-fab-label-text-tracking: normal;--mdc-extended-fab-label-text-weight: 500}.mat-mdc-snack-bar-container[_ngcontent-%COMP%]{--mdc-snackbar-container-color: #333333;--mdc-snackbar-supporting-text-color: rgba(255, 255, 255, .87);--mat-snack-bar-button-color: #dd7345}.mat-mdc-snack-bar-container[_ngcontent-%COMP%]{--mdc-snackbar-supporting-text-font: Inter;--mdc-snackbar-supporting-text-line-height: 19px;--mdc-snackbar-supporting-text-size: 13px;--mdc-snackbar-supporting-text-weight: 400}html[_ngcontent-%COMP%]{--mat-table-background-color: white;--mat-table-header-headline-color: rgba(0, 0, 0, .87);--mat-table-row-item-label-text-color: rgba(0, 0, 0, .87);--mat-table-row-item-outline-color: rgba(0, 0, 0, .12)}html[_ngcontent-%COMP%]{--mat-table-header-container-height: 48px;--mat-table-footer-container-height: 44px;--mat-table-row-item-container-height: 44px}html[_ngcontent-%COMP%]{--mat-table-header-headline-font: Inter;--mat-table-header-headline-line-height: 19px;--mat-table-header-headline-size: 13px;--mat-table-header-headline-weight: 500;--mat-table-header-headline-tracking: normal;--mat-table-row-item-label-text-font: Inter;--mat-table-row-item-label-text-line-height: 19px;--mat-table-row-item-label-text-size: 13px;--mat-table-row-item-label-text-weight: 400;--mat-table-row-item-label-text-tracking: normal;--mat-table-footer-supporting-text-font: Inter;--mat-table-footer-supporting-text-line-height: 19px;--mat-table-footer-supporting-text-size: 13px;--mat-table-footer-supporting-text-weight: 400;--mat-table-footer-supporting-text-tracking: normal}.mat-mdc-progress-spinner[_ngcontent-%COMP%]{--mdc-circular-progress-active-indicator-color: #0f0761}.mat-mdc-progress-spinner.mat-accent[_ngcontent-%COMP%]{--mdc-circular-progress-active-indicator-color: #dd7345}.mat-mdc-progress-spinner.mat-warn[_ngcontent-%COMP%]{--mdc-circular-progress-active-indicator-color: #f44336}.mat-badge[_ngcontent-%COMP%]{position:relative}.mat-badge.mat-badge[_ngcontent-%COMP%]{overflow:visible}.mat-badge-content[_ngcontent-%COMP%]{position:absolute;text-align:center;display:inline-block;border-radius:50%;transition:transform .2s ease-in-out;transform:scale(.6);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;pointer-events:none;background-color:var(--mat-badge-background-color);color:var(--mat-badge-text-color);font-family:Roboto,sans-serif;font-family:var(--mat-badge-text-font, Roboto, sans-serif);font-size:12px;font-size:var(--mat-badge-text-size, 12px);font-weight:600;font-weight:var(--mat-badge-text-weight, 600)}.cdk-high-contrast-active[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{outline:solid 1px;border-radius:0}.mat-badge-disabled[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{background-color:var(--mat-badge-disabled-state-background-color);color:var(--mat-badge-disabled-state-text-color)}.mat-badge-hidden[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{display:none}.ng-animate-disabled[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%], .mat-badge-content._mat-animation-noopable[_ngcontent-%COMP%]{transition:none}.mat-badge-content.mat-badge-active[_ngcontent-%COMP%]{transform:none}.mat-badge-small[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{width:16px;height:16px;line-height:16px;font-size:9px;font-size:var(--mat-badge-small-size-text-size, 9px)}.mat-badge-small.mat-badge-above[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{top:-8px}.mat-badge-small.mat-badge-below[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{bottom:-8px}.mat-badge-small.mat-badge-before[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{left:-16px}[dir=rtl][_ngcontent-%COMP%] .mat-badge-small.mat-badge-before[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{left:auto;right:-16px}.mat-badge-small.mat-badge-after[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{right:-16px}[dir=rtl][_ngcontent-%COMP%] .mat-badge-small.mat-badge-after[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{right:auto;left:-16px}.mat-badge-small.mat-badge-overlap.mat-badge-before[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{left:-8px}[dir=rtl][_ngcontent-%COMP%] .mat-badge-small.mat-badge-overlap.mat-badge-before[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{left:auto;right:-8px}.mat-badge-small.mat-badge-overlap.mat-badge-after[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{right:-8px}[dir=rtl][_ngcontent-%COMP%] .mat-badge-small.mat-badge-overlap.mat-badge-after[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{right:auto;left:-8px}.mat-badge-medium[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{width:22px;height:22px;line-height:22px}.mat-badge-medium.mat-badge-above[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{top:-11px}.mat-badge-medium.mat-badge-below[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{bottom:-11px}.mat-badge-medium.mat-badge-before[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{left:-22px}[dir=rtl][_ngcontent-%COMP%] .mat-badge-medium.mat-badge-before[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{left:auto;right:-22px}.mat-badge-medium.mat-badge-after[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{right:-22px}[dir=rtl][_ngcontent-%COMP%] .mat-badge-medium.mat-badge-after[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{right:auto;left:-22px}.mat-badge-medium.mat-badge-overlap.mat-badge-before[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{left:-11px}[dir=rtl][_ngcontent-%COMP%] .mat-badge-medium.mat-badge-overlap.mat-badge-before[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{left:auto;right:-11px}.mat-badge-medium.mat-badge-overlap.mat-badge-after[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{right:-11px}[dir=rtl][_ngcontent-%COMP%] .mat-badge-medium.mat-badge-overlap.mat-badge-after[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{right:auto;left:-11px}.mat-badge-large[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{width:28px;height:28px;line-height:28px;font-size:24px;font-size:var(--mat-badge-large-size-text-size, 24px)}.mat-badge-large.mat-badge-above[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{top:-14px}.mat-badge-large.mat-badge-below[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{bottom:-14px}.mat-badge-large.mat-badge-before[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{left:-28px}[dir=rtl][_ngcontent-%COMP%] .mat-badge-large.mat-badge-before[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{left:auto;right:-28px}.mat-badge-large.mat-badge-after[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{right:-28px}[dir=rtl][_ngcontent-%COMP%] .mat-badge-large.mat-badge-after[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{right:auto;left:-28px}.mat-badge-large.mat-badge-overlap.mat-badge-before[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{left:-14px}[dir=rtl][_ngcontent-%COMP%] .mat-badge-large.mat-badge-overlap.mat-badge-before[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{left:auto;right:-14px}.mat-badge-large.mat-badge-overlap.mat-badge-after[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{right:-14px}[dir=rtl][_ngcontent-%COMP%] .mat-badge-large.mat-badge-overlap.mat-badge-after[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{right:auto;left:-14px}html[_ngcontent-%COMP%]{--mat-badge-background-color: #0f0761;--mat-badge-text-color: white;--mat-badge-disabled-state-background-color: #b9b9b9;--mat-badge-disabled-state-text-color: rgba(0, 0, 0, .38)}.mat-badge-accent[_ngcontent-%COMP%]{--mat-badge-background-color: #dd7345;--mat-badge-text-color: white}.mat-badge-warn[_ngcontent-%COMP%]{--mat-badge-background-color: #f44336;--mat-badge-text-color: white}html[_ngcontent-%COMP%]{--mat-badge-text-font: Inter;--mat-badge-text-size: 12px;--mat-badge-text-weight: 600;--mat-badge-small-size-text-size: 9px;--mat-badge-large-size-text-size: 24px}html[_ngcontent-%COMP%]{--mat-bottom-sheet-container-text-color: rgba(0, 0, 0, .87);--mat-bottom-sheet-container-background-color: white}html[_ngcontent-%COMP%]{--mat-bottom-sheet-container-text-font: Inter;--mat-bottom-sheet-container-text-line-height: 19px;--mat-bottom-sheet-container-text-size: 13px;--mat-bottom-sheet-container-text-tracking: normal;--mat-bottom-sheet-container-text-weight: 400}html[_ngcontent-%COMP%]{--mat-legacy-button-toggle-text-color: rgba(0, 0, 0, .38);--mat-legacy-button-toggle-state-layer-color: rgba(0, 0, 0, .12);--mat-legacy-button-toggle-selected-state-text-color: rgba(0, 0, 0, .54);--mat-legacy-button-toggle-selected-state-background-color: #e0e0e0;--mat-legacy-button-toggle-disabled-state-text-color: rgba(0, 0, 0, .26);--mat-legacy-button-toggle-disabled-state-background-color: #eeeeee;--mat-legacy-button-toggle-disabled-selected-state-background-color: #bdbdbd;--mat-standard-button-toggle-text-color: rgba(0, 0, 0, .87);--mat-standard-button-toggle-background-color: white;--mat-standard-button-toggle-state-layer-color: black;--mat-standard-button-toggle-selected-state-background-color: #e0e0e0;--mat-standard-button-toggle-selected-state-text-color: rgba(0, 0, 0, .87);--mat-standard-button-toggle-disabled-state-text-color: rgba(0, 0, 0, .26);--mat-standard-button-toggle-disabled-state-background-color: white;--mat-standard-button-toggle-disabled-selected-state-text-color: rgba(0, 0, 0, .87);--mat-standard-button-toggle-disabled-selected-state-background-color: #bdbdbd;--mat-standard-button-toggle-divider-color: #e0e0e0}html[_ngcontent-%COMP%]{--mat-standard-button-toggle-height: 40px}html[_ngcontent-%COMP%]{--mat-legacy-button-toggle-text-font: Inter;--mat-standard-button-toggle-text-font: Inter}html[_ngcontent-%COMP%]{--mat-datepicker-calendar-date-selected-state-text-color: white;--mat-datepicker-calendar-date-selected-state-background-color: #0f0761;--mat-datepicker-calendar-date-selected-disabled-state-background-color: rgba(15, 7, 97, .4);--mat-datepicker-calendar-date-today-selected-state-outline-color: white;--mat-datepicker-calendar-date-focus-state-background-color: rgba(15, 7, 97, .3);--mat-datepicker-calendar-date-hover-state-background-color: rgba(15, 7, 97, .3);--mat-datepicker-toggle-active-state-icon-color: #0f0761;--mat-datepicker-calendar-date-in-range-state-background-color: rgba(15, 7, 97, .2);--mat-datepicker-calendar-date-in-comparison-range-state-background-color: rgba(249, 171, 0, .2);--mat-datepicker-calendar-date-in-overlap-range-state-background-color: #a8dab5;--mat-datepicker-calendar-date-in-overlap-range-selected-state-background-color: #46a35e;--mat-datepicker-toggle-icon-color: rgba(0, 0, 0, .54);--mat-datepicker-calendar-body-label-text-color: rgba(0, 0, 0, .54);--mat-datepicker-calendar-period-button-icon-color: rgba(0, 0, 0, .54);--mat-datepicker-calendar-navigation-button-icon-color: rgba(0, 0, 0, .54);--mat-datepicker-calendar-header-divider-color: rgba(0, 0, 0, .12);--mat-datepicker-calendar-header-text-color: rgba(0, 0, 0, .54);--mat-datepicker-calendar-date-today-outline-color: rgba(0, 0, 0, .38);--mat-datepicker-calendar-date-today-disabled-state-outline-color: rgba(0, 0, 0, .18);--mat-datepicker-calendar-date-text-color: rgba(0, 0, 0, .87);--mat-datepicker-calendar-date-outline-color: transparent;--mat-datepicker-calendar-date-disabled-state-text-color: rgba(0, 0, 0, .38);--mat-datepicker-calendar-date-preview-state-outline-color: rgba(0, 0, 0, .24);--mat-datepicker-range-input-separator-color: rgba(0, 0, 0, .87);--mat-datepicker-range-input-disabled-state-separator-color: rgba(0, 0, 0, .38);--mat-datepicker-range-input-disabled-state-text-color: rgba(0, 0, 0, .38);--mat-datepicker-calendar-container-background-color: white;--mat-datepicker-calendar-container-text-color: rgba(0, 0, 0, .87)}.mat-datepicker-content.mat-accent[_ngcontent-%COMP%]{--mat-datepicker-calendar-date-selected-state-text-color: white;--mat-datepicker-calendar-date-selected-state-background-color: #dd7345;--mat-datepicker-calendar-date-selected-disabled-state-background-color: rgba(221, 115, 69, .4);--mat-datepicker-calendar-date-today-selected-state-outline-color: white;--mat-datepicker-calendar-date-focus-state-background-color: rgba(221, 115, 69, .3);--mat-datepicker-calendar-date-hover-state-background-color: rgba(221, 115, 69, .3);--mat-datepicker-calendar-date-in-range-state-background-color: rgba(221, 115, 69, .2);--mat-datepicker-calendar-date-in-comparison-range-state-background-color: rgba(249, 171, 0, .2);--mat-datepicker-calendar-date-in-overlap-range-state-background-color: #a8dab5;--mat-datepicker-calendar-date-in-overlap-range-selected-state-background-color: #46a35e}.mat-datepicker-content.mat-warn[_ngcontent-%COMP%]{--mat-datepicker-calendar-date-selected-state-text-color: white;--mat-datepicker-calendar-date-selected-state-background-color: #f44336;--mat-datepicker-calendar-date-selected-disabled-state-background-color: rgba(244, 67, 54, .4);--mat-datepicker-calendar-date-today-selected-state-outline-color: white;--mat-datepicker-calendar-date-focus-state-background-color: rgba(244, 67, 54, .3);--mat-datepicker-calendar-date-hover-state-background-color: rgba(244, 67, 54, .3);--mat-datepicker-calendar-date-in-range-state-background-color: rgba(244, 67, 54, .2);--mat-datepicker-calendar-date-in-comparison-range-state-background-color: rgba(249, 171, 0, .2);--mat-datepicker-calendar-date-in-overlap-range-state-background-color: #a8dab5;--mat-datepicker-calendar-date-in-overlap-range-selected-state-background-color: #46a35e}.mat-datepicker-toggle-active.mat-accent[_ngcontent-%COMP%]{--mat-datepicker-toggle-active-state-icon-color: #dd7345}.mat-datepicker-toggle-active.mat-warn[_ngcontent-%COMP%]{--mat-datepicker-toggle-active-state-icon-color: #f44336}.mat-calendar-controls[_ngcontent-%COMP%] .mat-mdc-icon-button.mat-mdc-button-base[_ngcontent-%COMP%]{--mdc-icon-button-state-layer-size: 40px;width:var(--mdc-icon-button-state-layer-size);height:var(--mdc-icon-button-state-layer-size);padding:8px}.mat-calendar-controls[_ngcontent-%COMP%] .mat-mdc-icon-button.mat-mdc-button-base[_ngcontent-%COMP%] .mat-mdc-button-touch-target[_ngcontent-%COMP%]{display:none}html[_ngcontent-%COMP%]{--mat-datepicker-calendar-text-font: Inter;--mat-datepicker-calendar-text-size: 13px;--mat-datepicker-calendar-body-label-text-size: 13px;--mat-datepicker-calendar-body-label-text-weight: 500;--mat-datepicker-calendar-period-button-text-size: 13px;--mat-datepicker-calendar-period-button-text-weight: 500;--mat-datepicker-calendar-header-text-size: 11px;--mat-datepicker-calendar-header-text-weight: 400}html[_ngcontent-%COMP%]{--mat-divider-color: rgba(0, 0, 0, .12)}html[_ngcontent-%COMP%]{--mat-expansion-container-background-color: white;--mat-expansion-container-text-color: rgba(0, 0, 0, .87);--mat-expansion-actions-divider-color: rgba(0, 0, 0, .12);--mat-expansion-header-hover-state-layer-color: rgba(0, 0, 0, .04);--mat-expansion-header-focus-state-layer-color: rgba(0, 0, 0, .04);--mat-expansion-header-disabled-state-text-color: rgba(0, 0, 0, .26);--mat-expansion-header-text-color: rgba(0, 0, 0, .87);--mat-expansion-header-description-color: rgba(0, 0, 0, .54);--mat-expansion-header-indicator-color: rgba(0, 0, 0, .54)}html[_ngcontent-%COMP%]{--mat-expansion-header-collapsed-state-height: 40px;--mat-expansion-header-expanded-state-height: 56px}html[_ngcontent-%COMP%]{--mat-expansion-header-text-font: Inter;--mat-expansion-header-text-size: 13px;--mat-expansion-header-text-weight: 500;--mat-expansion-header-text-line-height: inherit;--mat-expansion-header-text-tracking: inherit;--mat-expansion-container-text-font: Inter;--mat-expansion-container-text-line-height: 19px;--mat-expansion-container-text-size: 13px;--mat-expansion-container-text-tracking: normal;--mat-expansion-container-text-weight: 400}html[_ngcontent-%COMP%]{--mat-grid-list-tile-header-primary-text-size: 13px;--mat-grid-list-tile-header-secondary-text-size: 12px;--mat-grid-list-tile-footer-primary-text-size: 13px;--mat-grid-list-tile-footer-secondary-text-size: 12px}html[_ngcontent-%COMP%]{--mat-icon-color: inherit}.mat-icon.mat-primary[_ngcontent-%COMP%]{--mat-icon-color: #0f0761}.mat-icon.mat-accent[_ngcontent-%COMP%]{--mat-icon-color: #dd7345}.mat-icon.mat-warn[_ngcontent-%COMP%]{--mat-icon-color: #f44336}html[_ngcontent-%COMP%]{--mat-sidenav-container-divider-color: rgba(0, 0, 0, .12);--mat-sidenav-container-background-color: white;--mat-sidenav-container-text-color: rgba(0, 0, 0, .87);--mat-sidenav-content-background-color: #fafafa;--mat-sidenav-content-text-color: rgba(0, 0, 0, .87);--mat-sidenav-scrim-color: rgba(0, 0, 0, .6)}html[_ngcontent-%COMP%]{--mat-stepper-header-icon-foreground-color: white;--mat-stepper-header-selected-state-icon-background-color: #0f0761;--mat-stepper-header-selected-state-icon-foreground-color: white;--mat-stepper-header-done-state-icon-background-color: #0f0761;--mat-stepper-header-done-state-icon-foreground-color: white;--mat-stepper-header-edit-state-icon-background-color: #0f0761;--mat-stepper-header-edit-state-icon-foreground-color: white;--mat-stepper-container-color: white;--mat-stepper-line-color: rgba(0, 0, 0, .12);--mat-stepper-header-hover-state-layer-color: rgba(0, 0, 0, .04);--mat-stepper-header-focus-state-layer-color: rgba(0, 0, 0, .04);--mat-stepper-header-label-text-color: rgba(0, 0, 0, .54);--mat-stepper-header-optional-label-text-color: rgba(0, 0, 0, .54);--mat-stepper-header-selected-state-label-text-color: rgba(0, 0, 0, .87);--mat-stepper-header-error-state-label-text-color: #f44336;--mat-stepper-header-icon-background-color: rgba(0, 0, 0, .54);--mat-stepper-header-error-state-icon-foreground-color: #f44336;--mat-stepper-header-error-state-icon-background-color: transparent}html[_ngcontent-%COMP%] .mat-step-header.mat-accent[_ngcontent-%COMP%]{--mat-stepper-header-icon-foreground-color: white;--mat-stepper-header-selected-state-icon-background-color: #dd7345;--mat-stepper-header-selected-state-icon-foreground-color: white;--mat-stepper-header-done-state-icon-background-color: #dd7345;--mat-stepper-header-done-state-icon-foreground-color: white;--mat-stepper-header-edit-state-icon-background-color: #dd7345;--mat-stepper-header-edit-state-icon-foreground-color: white}html[_ngcontent-%COMP%] .mat-step-header.mat-warn[_ngcontent-%COMP%]{--mat-stepper-header-icon-foreground-color: white;--mat-stepper-header-selected-state-icon-background-color: #f44336;--mat-stepper-header-selected-state-icon-foreground-color: white;--mat-stepper-header-done-state-icon-background-color: #f44336;--mat-stepper-header-done-state-icon-foreground-color: white;--mat-stepper-header-edit-state-icon-background-color: #f44336;--mat-stepper-header-edit-state-icon-foreground-color: white}html[_ngcontent-%COMP%]{--mat-stepper-header-height: 64px}html[_ngcontent-%COMP%]{--mat-stepper-container-text-font: Inter;--mat-stepper-header-label-text-font: Inter;--mat-stepper-header-label-text-size: 13px;--mat-stepper-header-label-text-weight: 400;--mat-stepper-header-error-state-label-text-size: 13px;--mat-stepper-header-selected-state-label-text-size: 13px;--mat-stepper-header-selected-state-label-text-weight: 400}.mat-sort-header-arrow[_ngcontent-%COMP%]{color:#757575}html[_ngcontent-%COMP%]{--mat-toolbar-container-background-color: whitesmoke;--mat-toolbar-container-text-color: rgba(0, 0, 0, .87)}.mat-toolbar.mat-primary[_ngcontent-%COMP%]{--mat-toolbar-container-background-color: #0f0761;--mat-toolbar-container-text-color: white}.mat-toolbar.mat-accent[_ngcontent-%COMP%]{--mat-toolbar-container-background-color: #dd7345;--mat-toolbar-container-text-color: white}.mat-toolbar.mat-warn[_ngcontent-%COMP%]{--mat-toolbar-container-background-color: #f44336;--mat-toolbar-container-text-color: white}html[_ngcontent-%COMP%]{--mat-toolbar-standard-height: 56px;--mat-toolbar-mobile-height: 48px}html[_ngcontent-%COMP%]{--mat-toolbar-title-text-font: Inter;--mat-toolbar-title-text-line-height: 21px;--mat-toolbar-title-text-size: 16px;--mat-toolbar-title-text-tracking: normal;--mat-toolbar-title-text-weight: 600}.mat-tree[_ngcontent-%COMP%]{background:white}.mat-tree-node[_ngcontent-%COMP%], .mat-nested-tree-node[_ngcontent-%COMP%]{color:#000000de}.mat-tree-node[_ngcontent-%COMP%]{min-height:40px}.mat-tree[_ngcontent-%COMP%]{font-family:Inter}.mat-tree-node[_ngcontent-%COMP%], .mat-nested-tree-node[_ngcontent-%COMP%]{font-weight:400;font-size:13px}.mat-h1[_ngcontent-%COMP%], .mat-headline-5[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline-5[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:20px;font-weight:600;line-height:24px;font-family:Inter;letter-spacing:normal;margin:0 0 16px}.mat-h2[_ngcontent-%COMP%], .mat-headline-6[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h2[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline-6[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:16px;font-weight:600;line-height:21px;font-family:Inter;letter-spacing:normal;margin:0 0 16px}.mat-h3[_ngcontent-%COMP%], .mat-subtitle-1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h3[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-subtitle-1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:16px;font-weight:600;line-height:22px;font-family:Inter;letter-spacing:normal;margin:0 0 16px}.mat-h4[_ngcontent-%COMP%], .mat-body-1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h4[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-body-1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{font-size:13px;font-weight:400;line-height:19px;font-family:Inter;letter-spacing:normal;margin:0 0 16px}.mat-h5[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h5[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h5[_ngcontent-%COMP%]{font:400 10.79px/19px Inter;margin:0 0 12px}.mat-h6[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h6[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{font:400 8.71px/19px Inter;margin:0 0 12px}.mat-body-strong[_ngcontent-%COMP%], .mat-subtitle-2[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-body-strong[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-subtitle-2[_ngcontent-%COMP%]{font-size:13px;font-weight:500;line-height:19px;font-family:Inter;letter-spacing:normal}.mat-body[_ngcontent-%COMP%], .mat-body-2[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-body[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-body-2[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%]{font-size:13px;font-weight:400;line-height:19px;font-family:Inter;letter-spacing:normal}.mat-body[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .mat-body-2[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-body[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-body-2[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 12px}.mat-small[_ngcontent-%COMP%], .mat-caption[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-small[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-caption[_ngcontent-%COMP%]{font-size:12px;font-weight:400;line-height:16px;font-family:Inter;letter-spacing:normal}.mat-headline-1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline-1[_ngcontent-%COMP%]{font-size:56px;font-weight:600;line-height:62px;font-family:Inter;letter-spacing:normal;margin:0 0 56px}.mat-headline-2[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline-2[_ngcontent-%COMP%]{font-size:44px;font-weight:600;line-height:50px;font-family:Inter;letter-spacing:normal;margin:0 0 64px}.mat-headline-3[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline-3[_ngcontent-%COMP%]{font-size:36px;font-weight:600;line-height:43px;font-family:Inter;letter-spacing:normal;margin:0 0 64px}.mat-headline-4[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline-4[_ngcontent-%COMP%]{font-size:28px;font-weight:600;line-height:34px;font-family:Inter;letter-spacing:normal;margin:0 0 64px}.mat-ripple-element[_ngcontent-%COMP%]{display:none!important}.mat-mdc-unelevated-button.mat-primary[_ngcontent-%COMP%] .mat-ripple-element[_ngcontent-%COMP%], .mat-mdc-raised-button.mat-primary[_ngcontent-%COMP%] .mat-ripple-element[_ngcontent-%COMP%], .mat-mdc-fab[_ngcontent-%COMP%] .mat-ripple-element[_ngcontent-%COMP%], .mat-mdc-mini-fab[_ngcontent-%COMP%] .mat-ripple-element[_ngcontent-%COMP%]{display:block!important}.mat-toolbar[_ngcontent-%COMP%]{box-shadow:none!important}.shell-brand-logo[_ngcontent-%COMP%]{filter:brightness(0);opacity:.87}.dark-theme[_ngcontent-%COMP%] .shell-brand-logo[_ngcontent-%COMP%]{filter:brightness(0) invert(1);opacity:.9}.mat-column-actions[_ngcontent-%COMP%]{width:50px;padding:0 8px}.mat-column-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{height:30px;width:30px}.mat-mdc-cell[_ngcontent-%COMP%]{padding:8px}.mat-mdc-card[_ngcontent-%COMP%]{overflow-y:auto}.add-btn[_ngcontent-%COMP%]{background-color:#7571a9}"]})}};mt=pt=(0,re.Cg)([(0,H.d)({checkProperties:!0})],mt);var Ht=g(14207),ue=g(86606),L=g(73151),A=g(68686);function fi(n,a){1&n&&(e.qex(0),e.EFF(1,"loading\u2026"),e.bVm())}function ui(n,a){if(1&n&&(e.qex(0),e.EFF(1),e.bVm()),2&n){const t=e.XpG();e.R7$(1),e.SpI(" ",t.connections.length," available ")}}function hi(n,a){1&n&&(e.j41(0,"p",14),e.EFF(1," Click one to use it for this chat service: "),e.k0s())}function bi(n,a){if(1&n&&e.nrm(0,"fa-icon",20),2&n){const t=e.XpG(3);e.Y8G("icon",t.faCircleCheck)}}function vi(n,a){if(1&n){const t=e.RV6();e.j41(0,"li")(1,"button",17),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG(2);return e.Njj(c.selectConnection.emit(r.id))}),e.DNE(2,bi,1,1,"fa-icon",18),e.j41(3,"span",19),e.EFF(4),e.k0s()()()}if(2&n){const t=a.$implicit,o=e.XpG(2);e.R7$(1),e.AVh("prereqs__chip--selected",t.id===o.selectedConnectionId),e.R7$(1),e.Y8G("ngIf",t.id===o.selectedConnectionId),e.R7$(2),e.JRh(t.label||t.name)}}function xi(n,a){if(1&n&&(e.j41(0,"ul",15),e.DNE(1,vi,5,4,"li",16),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.Y8G("ngForOf",t.connections)("ngForTrackBy",t.trackById)}}function Ci(n,a){1&n&&(e.j41(0,"p",21),e.EFF(1," No AI Connections yet. The chat service can't run without one. Use the button above to create one, then come back. "),e.k0s())}function ki(n,a){1&n&&(e.qex(0),e.EFF(1,"loading\u2026"),e.bVm())}function yi(n,a){if(1&n&&(e.qex(0),e.EFF(1),e.bVm()),2&n){const t=e.XpG();e.R7$(1),e.SpI(" ",t.roles.length," available ")}}function Mi(n,a){1&n&&(e.j41(0,"p",14),e.EFF(1," Click one to scope the AI's data access: "),e.k0s())}function Oi(n,a){if(1&n&&e.nrm(0,"fa-icon",20),2&n){const t=e.XpG(3);e.Y8G("icon",t.faCircleCheck)}}const Pi=function(n){return["/api-connections/role-based-access",n,"scope"]};function Fi(n,a){if(1&n){const t=e.RV6();e.j41(0,"li")(1,"button",17),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG(2);return e.Njj(c.selectRole.emit(r.id))}),e.DNE(2,Oi,1,1,"fa-icon",18),e.j41(3,"span",19),e.EFF(4),e.k0s()(),e.j41(5,"a",22),e.EFF(6,"what can this role see?"),e.k0s()()}if(2&n){const t=a.$implicit,o=e.XpG(2);e.R7$(1),e.AVh("prereqs__chip--selected",t.id===o.selectedRoleId),e.R7$(1),e.Y8G("ngIf",t.id===o.selectedRoleId),e.R7$(2),e.JRh(t.name),e.R7$(1),e.Y8G("routerLink",e.eq3(5,Pi,t.id))}}function wi(n,a){if(1&n&&(e.j41(0,"ul",15),e.DNE(1,Fi,7,7,"li",16),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.Y8G("ngForOf",t.roles)("ngForTrackBy",t.trackById)}}function Di(n,a){1&n&&(e.j41(0,"p",21),e.EFF(1," No Roles configured. The AI operates under a Role that limits what data it can access. Create a restricted role and come back. "),e.k0s())}const Ti=function(){return["/ai/connections/create"]},Si=function(){return["/api-connections/role-based-access/create"]};let Ri=(()=>{class n{constructor(){this.http=(0,e.WQX)(ee.Qq),this.selectedConnectionId=null,this.selectedRoleId=null,this.selectConnection=new e.bkB,this.selectRole=new e.bkB,this.loading=!0,this.connections=[],this.roles=[],this.faCheck=b.e68,this.faCircleCheck=b.QRE,this.faCircleExclamation=b.lEd,this.faPlus=b.QLR,this.faRobot=b.UBk,this.faShieldHalved=b.fLc}ngOnInit(){(0,ue.p)({conn:this.http.get(`${A.C}/system/service`,{params:{filter:'type = "ai_connection"',fields:"id,name,label",sort:"name"}}).pipe((0,R.W)(()=>(0,L.of)({resource:[]}))),roles:this.http.get(`${A.C}/system/role`,{params:{fields:"id,name",sort:"name"}}).pipe((0,R.W)(()=>(0,L.of)({resource:[]})))}).subscribe(({conn:t,roles:o})=>{this.connections=t.resource??[],this.roles=o.resource??[],this.loading=!1})}trackById(t,o){return o.id}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-ai-chat-prereqs"]],inputs:{selectedConnectionId:"selectedConnectionId",selectedRoleId:"selectedRoleId"},outputs:{selectConnection:"selectConnection",selectRole:"selectRole"},standalone:!0,features:[e.aNF],decls:38,vars:34,consts:[[1,"prereqs"],[1,"prereqs__header"],[1,"prereqs__section"],[1,"prereqs__row"],[1,"prereqs__icon",3,"icon"],[1,"prereqs__kind-icon",3,"icon"],[1,"prereqs__title"],[1,"prereqs__count"],[4,"ngIf"],["mat-stroked-button","",1,"prereqs__action",3,"routerLink"],[3,"icon"],["class","prereqs__pick-hint",4,"ngIf"],["class","prereqs__list",4,"ngIf"],["class","prereqs__hint",4,"ngIf"],[1,"prereqs__pick-hint"],[1,"prereqs__list"],[4,"ngFor","ngForOf","ngForTrackBy"],["type","button",1,"prereqs__chip",3,"click"],["class","prereqs__chip-check",3,"icon",4,"ngIf"],[1,"prereqs__name"],[1,"prereqs__chip-check",3,"icon"],[1,"prereqs__hint"],[1,"prereqs__link",3,"routerLink"]],template:function(o,i){1&o&&(e.j41(0,"div",0)(1,"header",1)(2,"h4"),e.EFF(3,"AI Chat setup"),e.k0s(),e.j41(4,"p"),e.EFF(5," An AI Chat service ties an AI Connection (the LLM) to a DreamFactory Role (the data scope). Pick one of each below; your selection writes straight into the form. "),e.k0s()(),e.j41(6,"section",2)(7,"div",3),e.nrm(8,"fa-icon",4)(9,"fa-icon",5),e.j41(10,"span",6),e.EFF(11,"AI Connection"),e.k0s(),e.j41(12,"span",7),e.DNE(13,fi,2,0,"ng-container",8),e.DNE(14,ui,2,1,"ng-container",8),e.k0s(),e.j41(15,"a",9),e.nrm(16,"fa-icon",10),e.j41(17,"span"),e.EFF(18),e.k0s()()(),e.DNE(19,hi,2,0,"p",11),e.DNE(20,xi,2,2,"ul",12),e.DNE(21,Ci,2,0,"p",13),e.k0s(),e.j41(22,"section",2)(23,"div",3),e.nrm(24,"fa-icon",4)(25,"fa-icon",5),e.j41(26,"span",6),e.EFF(27,"AI Role"),e.k0s(),e.j41(28,"span",7),e.DNE(29,ki,2,0,"ng-container",8),e.DNE(30,yi,2,1,"ng-container",8),e.k0s(),e.j41(31,"a",9),e.nrm(32,"fa-icon",10),e.j41(33,"span"),e.EFF(34),e.k0s()()(),e.DNE(35,Mi,2,0,"p",11),e.DNE(36,wi,2,2,"ul",12),e.DNE(37,Di,2,0,"p",13),e.k0s()()),2&o&&(e.R7$(6),e.AVh("prereqs__section--missing",!i.loading&&0===i.connections.length),e.R7$(2),e.AVh("prereqs__icon--ok",i.connections.length)("prereqs__icon--miss",!i.connections.length),e.Y8G("icon",i.connections.length?i.faCheck:i.faCircleExclamation),e.R7$(1),e.Y8G("icon",i.faRobot),e.R7$(4),e.Y8G("ngIf",i.loading),e.R7$(1),e.Y8G("ngIf",!i.loading),e.R7$(1),e.Y8G("routerLink",e.lJ4(32,Ti)),e.R7$(1),e.Y8G("icon",i.faPlus),e.R7$(2),e.JRh(i.connections.length?"Add another":"Create one now"),e.R7$(1),e.Y8G("ngIf",i.connections.length&&null==i.selectedConnectionId),e.R7$(1),e.Y8G("ngIf",i.connections.length),e.R7$(1),e.Y8G("ngIf",!i.loading&&0===i.connections.length),e.R7$(1),e.AVh("prereqs__section--missing",!i.loading&&0===i.roles.length),e.R7$(2),e.AVh("prereqs__icon--ok",i.roles.length)("prereqs__icon--miss",!i.roles.length),e.Y8G("icon",i.roles.length?i.faCheck:i.faCircleExclamation),e.R7$(1),e.Y8G("icon",i.faShieldHalved),e.R7$(4),e.Y8G("ngIf",i.loading),e.R7$(1),e.Y8G("ngIf",!i.loading),e.R7$(1),e.Y8G("routerLink",e.lJ4(33,Si)),e.R7$(1),e.Y8G("icon",i.faPlus),e.R7$(2),e.JRh(i.roles.length?"Add another":"Create one now"),e.R7$(1),e.Y8G("ngIf",i.roles.length&&null==i.selectedRoleId),e.R7$(1),e.Y8G("ngIf",i.roles.length),e.R7$(1),e.Y8G("ngIf",!i.loading&&0===i.roles.length))},dependencies:[d.MD,d.Sq,d.bT,N.Wk,u.Hl,u.It,w.dX,w.aY],styles:["[_nghost-%COMP%]{--prereqs-surface: rgba(0, 0, 0, .03)}.dark-theme[_nghost-%COMP%], .dark-theme [_nghost-%COMP%]{--prereqs-surface: rgba(255, 255, 255, .02)}.prereqs[_ngcontent-%COMP%]{border:1px solid rgba(96,165,250,.3);background:rgba(96,165,250,.05);border-radius:8px;padding:1.5rem 1.75rem;margin:1rem 0;display:flex;flex-direction:column;gap:1.25rem;font-size:16px}.prereqs__header[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin:0 0 .4rem;font-size:19px;font-weight:600}.prereqs__header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;color:var(--df-text-2);font-size:15px;line-height:1.55}.prereqs__section[_ngcontent-%COMP%]{padding:1rem 1.25rem;border-radius:6px;background:var(--prereqs-surface)}.prereqs__section--missing[_ngcontent-%COMP%]{background:rgba(220,53,69,.06);border:1px solid rgba(220,53,69,.25)}.prereqs__row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap}.prereqs__icon[_ngcontent-%COMP%]{font-size:19px}.prereqs__icon--ok[_ngcontent-%COMP%]{color:#4ade80}.prereqs__icon--miss[_ngcontent-%COMP%]{color:#ff6b6b}.prereqs__kind-icon[_ngcontent-%COMP%]{color:var(--df-text-muted);font-size:17px}.prereqs__title[_ngcontent-%COMP%]{font-weight:600;font-size:18px}.prereqs__count[_ngcontent-%COMP%]{font-size:14px;color:var(--df-text-2)}.prereqs__action[_ngcontent-%COMP%]{margin-left:auto;display:inline-flex!important;align-items:center;gap:.4rem;font-size:.8125rem!important;padding:0 .75rem!important;min-height:32px!important}.prereqs__list[_ngcontent-%COMP%]{list-style:none;margin:.625rem 0 0;padding:0;display:flex;flex-wrap:wrap;gap:.5rem .625rem}.prereqs__list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.5rem}.prereqs__chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.5rem;padding:.55rem 1.05rem;background:var(--df-surface-2);border:1px solid var(--df-border);border-radius:999px;font:inherit;font-size:16px;color:inherit;cursor:pointer;transition:border-color .12s ease,background .12s ease}.prereqs__chip[_ngcontent-%COMP%]:hover{border-color:#60a5fa99;background:rgba(96,165,250,.08)}.prereqs__chip--selected[_ngcontent-%COMP%]{border-color:#60a5fa;background:rgba(96,165,250,.18);color:var(--df-text)}.prereqs__chip-check[_ngcontent-%COMP%]{color:#60a5fa}.prereqs__name[_ngcontent-%COMP%]{font-weight:500}.prereqs__pick-hint[_ngcontent-%COMP%]{margin:.625rem 0 0;font-size:14px;color:var(--df-text-2);font-style:italic}.prereqs__link[_ngcontent-%COMP%]{font-size:12px;color:var(--df-text-muted);text-decoration:none}.prereqs__link[_ngcontent-%COMP%]:hover{color:#60a5fa;text-decoration:underline}.prereqs__hint[_ngcontent-%COMP%]{margin:.5rem 0 0;font-size:13px;color:var(--df-text-2);line-height:1.5}.prereqs__hint[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-family:SFMono-Regular,Menlo,Consolas,monospace;font-size:12px;padding:.1rem .375rem;border-radius:3px;background:var(--df-surface-2)}.prereqs__hint[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--df-text)}"]})}}return n})();function Ii(n,a){1&n&&e.nrm(0,"mat-spinner",5)}function Ei(n,a){if(1&n&&e.nrm(0,"fa-icon",6),2&n){const t=e.XpG();e.Y8G("icon",t.faPlugCircleCheck)}}function $i(n,a){if(1&n&&(e.j41(0,"p"),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.SpI(" ",null==t.result.error?null:t.result.error.message," ")}}function Gi(n,a){if(1&n&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&n){const t=e.XpG(3);e.R7$(1),e.SpI(", including ",t.firstModelLabel,"")}}function ji(n,a){if(1&n&&(e.j41(0,"p",11),e.EFF(1),e.DNE(2,Gi,2,1,"span",9),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.SpI(" ",t.modelCount," models available "),e.R7$(1),e.Y8G("ngIf",t.firstModelLabel)}}function Ni(n,a){if(1&n&&(e.j41(0,"div",7),e.nrm(1,"fa-icon",6),e.j41(2,"div",8)(3,"strong"),e.EFF(4),e.k0s(),e.DNE(5,$i,2,1,"p",9),e.DNE(6,ji,3,2,"p",10),e.k0s()()),2&n){const t=e.XpG();e.AVh("test-conn__result--ok",t.result.success)("test-conn__result--err",!t.result.success),e.R7$(1),e.Y8G("icon",t.result.success?t.faCheckCircle:t.faCircleXmark),e.R7$(3),e.JRh(t.result.success?"Connection succeeded":"Connection failed"),e.R7$(1),e.Y8G("ngIf",!t.result.success&&(null==t.result.error?null:t.result.error.message)),e.R7$(1),e.Y8G("ngIf",t.result.success&&t.modelCount>0)}}let Ai=(()=>{class n{constructor(){this.serviceId=null,this.http=(0,e.WQX)(ee.Qq),this.loading=!1,this.result=null,this.faPlugCircleCheck=b.e6V,this.faCheckCircle=b.SGM,this.faCircleXmark=b.bnw}get modelCount(){return this.result?.resource?.length??0}get firstModelLabel(){const t=this.result?.resource?.[0];return t?"string"==typeof t?t:t.name||t.id||null:null}run(){const t=this.form.get("config")?.value??{},o=t.provider,i=t.api_key??t.apiKey??null,r="**********"===i?null:i,c=t.base_url??t.baseUrl??null,s=t.organization_id??t.organizationId??null,l=t.extra_headers??t.extraHeaders??null,p=t.timeout??null;if(!o)return void(this.result={success:!1,error:{message:"Pick a provider before testing."}});const M="openai_compatible"===o,v=null!=this.serviceId;if("ollama"!==o&&"openai_compatible"!==o&&!r&&!v)return void(this.result={success:!1,error:{message:o+" requires an API key. Fill in API Key, then test. (Existing connections fall back to the saved key automatically.)"}});if(M&&!c&&!v)return void(this.result={success:!1,error:{message:o+" requires a Base URL (e.g. http://host:8090/v1). Fill in Base URL, then test."}});this.loading=!0,this.result=null;const x={provider:o,api_key:r,base_url:c,organization_id:s,extra_headers:l,timeout:p};this.serviceId&&(x.service_id=this.serviceId),this.http.post("/_internal/ai/test-connection",x).subscribe({next:F=>{this.result=F,this.loading=!1},error:F=>{this.result={success:!1,error:{message:F?.error?.error?.message??F?.error?.message??F?.message??"Network error."}},this.loading=!1}})}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-ai-test-connection"]],inputs:{form:"form",serviceId:"serviceId"},standalone:!0,features:[e.aNF],decls:7,vars:5,consts:[[1,"test-conn"],["type","button","mat-stroked-button","",1,"test-conn__button",3,"disabled","click"],["diameter","16",4,"ngIf"],[3,"icon",4,"ngIf"],["class","test-conn__result",3,"test-conn__result--ok","test-conn__result--err",4,"ngIf"],["diameter","16"],[3,"icon"],[1,"test-conn__result"],[1,"test-conn__detail"],[4,"ngIf"],["class","test-conn__models",4,"ngIf"],[1,"test-conn__models"]],template:function(o,i){1&o&&(e.j41(0,"div",0)(1,"button",1),e.bIt("click",function(){return i.run()}),e.DNE(2,Ii,1,0,"mat-spinner",2),e.DNE(3,Ei,1,1,"fa-icon",3),e.j41(4,"span"),e.EFF(5),e.k0s()(),e.DNE(6,Ni,7,8,"div",4),e.k0s()),2&o&&(e.R7$(1),e.Y8G("disabled",i.loading),e.R7$(1),e.Y8G("ngIf",i.loading),e.R7$(1),e.Y8G("ngIf",!i.loading),e.R7$(2),e.JRh(i.loading?"Testing\u2026":"Test connection"),e.R7$(1),e.Y8G("ngIf",i.result))},dependencies:[d.MD,d.bT,u.Hl,u.$z,Pe.D6,Pe.LG,w.dX,w.aY],styles:[".test-conn[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem;margin:1rem 0;font-size:1.4rem}.test-conn__button[_ngcontent-%COMP%]{align-self:flex-start;display:inline-flex!important;align-items:center;gap:.5rem;font-size:1.3rem!important;min-height:38px!important}.test-conn__result[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding:.875rem 1.125rem;border-radius:var(--df-radius-sm);align-items:flex-start;font-size:1.4rem}.test-conn__result--ok[_ngcontent-%COMP%]{background:var(--df-success-soft);border:1px solid var(--df-success-border);color:var(--df-success)}.test-conn__result--err[_ngcontent-%COMP%]{background:var(--df-danger-soft);border:1px solid var(--df-danger-border);color:var(--df-danger)}.test-conn__detail[_ngcontent-%COMP%]{flex:1;color:var(--df-text);display:flex;flex-direction:column;gap:.35rem}.test-conn__detail[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-weight:600;font-size:1.4rem}.test-conn__detail[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;color:var(--df-text-2);font-size:1.3rem}.test-conn__models[_ngcontent-%COMP%]{font-size:1.3rem}"]})}}return n})();function Yi(n,a){1&n&&e.nrm(0,"mat-spinner",12)}function Vi(n,a){if(1&n&&e.nrm(0,"fa-icon",5),2&n){const t=e.XpG(2);e.Y8G("icon",t.faArrowsRotate)}}function Xi(n,a){if(1&n){const t=e.RV6();e.j41(0,"button",9),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.fetch())}),e.DNE(1,Yi,1,0,"mat-spinner",10),e.DNE(2,Vi,1,1,"fa-icon",11),e.j41(3,"span"),e.EFF(4),e.k0s()()}if(2&n){const t=e.XpG();e.Y8G("disabled",t.loading),e.R7$(1),e.Y8G("ngIf",t.loading),e.R7$(1),e.Y8G("ngIf",!t.loading),e.R7$(2),e.JRh(t.models.length?"Refresh":"Fetch available models")}}function zi(n,a){if(1&n&&(e.j41(0,"div",13),e.nrm(1,"fa-icon",5),e.j41(2,"span"),e.EFF(3),e.k0s()()),2&n){const t=e.XpG();e.R7$(1),e.Y8G("icon",t.faCircleXmark),e.R7$(2),e.JRh(t.error)}}function Bi(n,a){if(1&n&&(e.j41(0,"span",24),e.EFF(1),e.nI1(2,"number"),e.k0s()),2&n){const t=e.XpG().$implicit;e.R7$(1),e.SpI("",e.bMT(2,1,t.context)," ctx")}}function Li(n,a){if(1&n&&(e.j41(0,"mat-option",20)(1,"span",21)(2,"span",22),e.EFF(3),e.k0s(),e.DNE(4,Bi,3,3,"span",23),e.k0s()()),2&n){const t=a.$implicit;e.Y8G("value",t.id),e.R7$(3),e.JRh(t.label),e.R7$(1),e.Y8G("ngIf",t.context)}}function Ui(n,a){if(1&n){const t=e.RV6();e.j41(0,"mat-form-field",17)(1,"mat-label"),e.EFF(2,"Model"),e.k0s(),e.j41(3,"mat-select",18),e.bIt("selectionChange",function(i){e.eBV(t);const r=e.XpG(2);return e.Njj(r.select(i.value))}),e.DNE(4,Li,5,3,"mat-option",19),e.k0s()()}if(2&n){const t=e.XpG(2);e.R7$(3),e.Y8G("value",t.currentValue),e.R7$(1),e.Y8G("ngForOf",t.models)("ngForTrackBy",t.trackModel)}}function qi(n,a){if(1&n&&(e.j41(0,"p",25),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.SpI(" ",t.fetchHint," ")}}function Ki(n,a){1&n&&(e.j41(0,"p",25),e.EFF(1,' No models reported by the provider. Switch to "Type custom" if you know the model id. '),e.k0s())}function Ji(n,a){if(1&n&&(e.j41(0,"p",26),e.nrm(1,"fa-icon",27),e.EFF(2," Selected: "),e.j41(3,"code"),e.EFF(4),e.k0s()()),2&n){const t=e.XpG(2);e.R7$(1),e.Y8G("icon",t.faCircleCheck),e.R7$(3),e.JRh(t.currentValue)}}function Hi(n,a){if(1&n&&(e.qex(0),e.DNE(1,Ui,5,3,"mat-form-field",14),e.DNE(2,qi,2,1,"p",15),e.DNE(3,Ki,2,0,"p",15),e.DNE(4,Ji,5,2,"p",16),e.bVm()),2&n){const t=e.XpG();e.R7$(1),e.Y8G("ngIf",t.models.length>0),e.R7$(1),e.Y8G("ngIf",!t.loading&&0===t.models.length&&!t.error&&!t.lastFetched),e.R7$(1),e.Y8G("ngIf",!t.loading&&0===t.models.length&&t.lastFetched),e.R7$(1),e.Y8G("ngIf",t.currentValue)}}function Wi(n,a){if(1&n){const t=e.RV6();e.j41(0,"mat-form-field",28)(1,"mat-label"),e.EFF(2,"Model id"),e.k0s(),e.j41(3,"input",29),e.bIt("input",function(i){e.eBV(t);const r=e.XpG();return e.Njj(r.onCustomInput(i))}),e.k0s()()}if(2&n){const t=e.XpG();e.R7$(3),e.Y8G("value",t.currentValue||"")}}let Qi=(()=>{class n{constructor(){this.serviceId=null,this.http=(0,e.WQX)(ee.Qq),this.loading=!1,this.models=[],this.error=null,this.customMode=!1,this.lastFetched=!1,this.faArrowsRotate=b.$3Z,this.faCircleCheck=b.QRE,this.faCircleXmark=b.bnw,this.faKeyboard=b.Lhe}ngOnInit(){this.currentValue&&(this.customMode=!0)}get currentValue(){return this.form.get("config.defaultModel")?.value??""}get fetchHint(){const t=this.form.get("config.provider")?.value;return t?"openai_compatible"===t||"ollama"===t?'Fill in Base URL (and API Key if your endpoint requires one), then click "Fetch available models".':'Fill in API Key above, then click "Fetch available models".':'Pick a provider above first, then click "Fetch available models".'}select(t){this.form.get("config.defaultModel")?.setValue(t)}onCustomInput(t){const o=t.target.value;this.form.get("config.defaultModel")?.setValue(o)}toggleCustom(){this.customMode=!this.customMode}fetch(){const t=this.form.get("config")?.value??{},o=t.provider;if(!o)return void(this.error="Pick a provider above first.");this.loading=!0,this.error=null;const i=t.api_key??t.apiKey??null,r={provider:o,api_key:"**********"===i?null:i,base_url:t.base_url??t.baseUrl??null,organization_id:t.organization_id??t.organizationId??null,extra_headers:t.extra_headers??t.extraHeaders??null,timeout:t.timeout??null};this.serviceId&&(r.service_id=this.serviceId),this.http.post("/_internal/ai/test-connection",r).subscribe({next:c=>{this.loading=!1,this.lastFetched=!0,c.success?this.models=(c.resource??[]).map(this.normalize):this.error=c.error?.message??"Provider rejected the request."},error:c=>{this.loading=!1,this.lastFetched=!0,this.error=c?.error?.error?.message??c?.error?.message??c?.message??"Network error fetching models."}})}normalize(t){return"string"==typeof t?{id:t,label:t}:{id:t.id??t.name??"unknown",label:t.name??t.id??"unknown",context:t.context_window??null}}trackModel(t,o){return o.id}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-ai-model-picker"]],inputs:{form:"form",serviceId:"serviceId"},standalone:!0,features:[e.aNF],decls:12,vars:6,consts:[[1,"model-picker"],[1,"model-picker__header"],[1,"model-picker__title"],["type","button","mat-stroked-button","","class","model-picker__refresh",3,"disabled","click",4,"ngIf"],["type","button","mat-button","",1,"model-picker__custom-toggle",3,"click"],[3,"icon"],["class","model-picker__error",4,"ngIf"],[4,"ngIf"],["appearance","outline","subscriptSizing","dynamic","class","model-picker__custom",4,"ngIf"],["type","button","mat-stroked-button","",1,"model-picker__refresh",3,"disabled","click"],["diameter","14",4,"ngIf"],[3,"icon",4,"ngIf"],["diameter","14"],[1,"model-picker__error"],["appearance","outline","subscriptSizing","dynamic","class","model-picker__select",4,"ngIf"],["class","model-picker__hint",4,"ngIf"],["class","model-picker__current",4,"ngIf"],["appearance","outline","subscriptSizing","dynamic",1,"model-picker__select"],[3,"value","selectionChange"],[3,"value",4,"ngFor","ngForOf","ngForTrackBy"],[3,"value"],[1,"model-picker__option"],[1,"model-picker__option-label"],["class","model-picker__option-meta",4,"ngIf"],[1,"model-picker__option-meta"],[1,"model-picker__hint"],[1,"model-picker__current"],[1,"model-picker__current-ok",3,"icon"],["appearance","outline","subscriptSizing","dynamic",1,"model-picker__custom"],["matInput","","placeholder","e.g. claude-sonnet-4-5-20250929",3,"value","input"]],template:function(o,i){1&o&&(e.j41(0,"div",0)(1,"div",1)(2,"span",2),e.EFF(3,"Default Model"),e.k0s(),e.DNE(4,Xi,5,4,"button",3),e.j41(5,"button",4),e.bIt("click",function(){return i.toggleCustom()}),e.nrm(6,"fa-icon",5),e.j41(7,"span"),e.EFF(8),e.k0s()()(),e.DNE(9,zi,4,2,"div",6),e.DNE(10,Hi,5,4,"ng-container",7),e.DNE(11,Wi,4,1,"mat-form-field",8),e.k0s()),2&o&&(e.R7$(4),e.Y8G("ngIf",!i.customMode),e.R7$(2),e.Y8G("icon",i.faKeyboard),e.R7$(2),e.JRh(i.customMode?"Use list":"Type custom"),e.R7$(1),e.Y8G("ngIf",i.error),e.R7$(1),e.Y8G("ngIf",!i.customMode),e.R7$(1),e.Y8G("ngIf",i.customMode))},dependencies:[d.MD,d.Sq,d.bT,d.QX,m.YN,m.X1,u.Hl,u.$z,O.RG,O.rl,O.nJ,E.fS,E.fg,Pe.D6,Pe.LG,G.Ve,G.VO,q.wT,w.dX,w.aY],styles:[".model-picker[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.875rem;padding:1.25rem 1.5rem;margin:1rem 0;background:var(--df-surface-2);border:1px solid var(--df-border-2);border-radius:var(--df-radius);font-size:1.4rem;color:var(--df-text)}.model-picker__header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.875rem;flex-wrap:wrap}.model-picker__title[_ngcontent-%COMP%]{font-weight:600;font-size:1.5rem;letter-spacing:-.01em;margin-right:auto}.model-picker__refresh[_ngcontent-%COMP%], .model-picker__custom-toggle[_ngcontent-%COMP%]{display:inline-flex!important;align-items:center;gap:.4rem;font-size:1.3rem!important;padding:0 .875rem!important;min-height:38px!important}.model-picker__select[_ngcontent-%COMP%], .model-picker__custom[_ngcontent-%COMP%]{width:100%}.model-picker__option[_ngcontent-%COMP%]{display:flex;align-items:baseline;gap:.75rem;width:100%}.model-picker__option-label[_ngcontent-%COMP%]{flex:1}.model-picker__option-meta[_ngcontent-%COMP%]{font-size:1.2rem;color:var(--df-text-muted);font-family:SFMono-Regular,Menlo,Consolas,monospace}.model-picker__hint[_ngcontent-%COMP%]{margin:0;font-size:1.3rem;color:var(--df-text-2);font-style:italic;line-height:1.5}.model-picker__error[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.5rem;padding:.625rem .875rem;border-radius:var(--df-radius-sm);background:var(--df-danger-soft);border:1px solid var(--df-danger-border);color:var(--df-danger);font-size:1.3rem}.model-picker__current[_ngcontent-%COMP%]{margin:0;font-size:1.3rem;color:var(--df-text);display:flex;align-items:center;gap:.5rem}.model-picker__current[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-family:SFMono-Regular,Menlo,Consolas,monospace;font-size:1.2rem;background:var(--df-surface-2);border:1px solid var(--df-border-2);padding:.2rem .5rem;border-radius:var(--df-radius-sm)}.model-picker__current-ok[_ngcontent-%COMP%]{color:var(--df-success)}"]})}}return n})();var Zi=g(15629);function ea(n,a){if(1&n&&(e.j41(0,"div",14),e.nrm(1,"fa-icon",7),e.j41(2,"span"),e.EFF(3),e.k0s()()),2&n){const t=e.XpG().$implicit,o=e.XpG();e.R7$(1),e.Y8G("icon",o.faTriangleExclamation),e.R7$(2),e.JRh(t("noneWarning"))}}function ta(n,a){if(1&n&&(e.j41(0,"div",15),e.EFF(1),e.k0s()),2&n){const t=e.XpG().$implicit;e.R7$(1),e.SpI(" ",t("loading")," ")}}function na(n,a){if(1&n&&e.nrm(0,"fa-icon",21),2&n){const t=e.XpG(4);e.Y8G("icon",t.faCircleCheck)}}function oa(n,a){if(1&n){const t=e.RV6();e.j41(0,"li")(1,"button",18),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG(3);return e.Njj(c.toggle(r.id))}),e.DNE(2,na,1,1,"fa-icon",19),e.j41(3,"span",20),e.EFF(4),e.k0s()()()}if(2&n){const t=a.$implicit,o=e.XpG(3);e.R7$(1),e.AVh("allowed-roles__chip--selected",o.isSelected(t.id)),e.R7$(1),e.Y8G("ngIf",o.isSelected(t.id)),e.R7$(2),e.JRh(t.name)}}function ia(n,a){if(1&n&&(e.j41(0,"ul",16),e.DNE(1,oa,5,4,"li",17),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.Y8G("ngForOf",t.roles)("ngForTrackBy",t.trackById)}}function aa(n,a){if(1&n&&(e.j41(0,"p",22),e.EFF(1),e.k0s()),2&n){const t=e.XpG().$implicit;e.R7$(1),e.SpI(" ",t("empty")," ")}}const ra=function(n){return{role:n}};function ca(n,a){if(1&n&&(e.j41(0,"div",26)(1,"div",27),e.EFF(2),e.k0s(),e.nrm(3,"df-scope-map",28),e.k0s()),2&n){const t=a.$implicit,o=e.XpG(2).$implicit;e.R7$(2),e.SpI(" ",o("reachRole",e.eq3(2,ra,t.name))," "),e.R7$(1),e.Y8G("roleId",t.id)}}function sa(n,a){if(1&n&&(e.j41(0,"section",23)(1,"div",24),e.nrm(2,"fa-icon",7),e.j41(3,"span"),e.EFF(4),e.k0s()(),e.j41(5,"p",8),e.EFF(6),e.k0s(),e.DNE(7,ca,4,4,"div",25),e.k0s()),2&n){const t=e.XpG().$implicit,o=e.XpG();e.R7$(2),e.Y8G("icon",o.faShieldHalved),e.R7$(2),e.JRh(t("reachTitle")),e.R7$(2),e.JRh(t("reachHint")),e.R7$(1),e.Y8G("ngForOf",o.selectedRoles)("ngForTrackBy",o.trackById)}}const la=function(n,a){return{selected:n,available:a}},da=function(){return["/api-connections/role-based-access/create"]};function pa(n,a){if(1&n&&(e.j41(0,"div",1)(1,"div",2),e.nrm(2,"fa-icon",3),e.j41(3,"span",4),e.EFF(4),e.k0s(),e.j41(5,"span",5),e.EFF(6),e.k0s(),e.j41(7,"a",6),e.nrm(8,"fa-icon",7),e.j41(9,"span"),e.EFF(10),e.k0s()()(),e.j41(11,"p",8),e.EFF(12),e.k0s(),e.DNE(13,ea,4,2,"div",9),e.DNE(14,ta,2,1,"div",10),e.DNE(15,ia,2,2,"ul",11),e.DNE(16,aa,2,1,"p",12),e.DNE(17,sa,8,5,"section",13),e.k0s()),2&n){const t=a.$implicit,o=e.XpG();e.R7$(2),e.Y8G("icon",o.faShieldHalved),e.R7$(2),e.JRh(t("title")),e.R7$(2),e.SpI(" ",t("count",e.l_i(12,la,o.selected.length,o.roles.length))," "),e.R7$(1),e.Y8G("routerLink",e.lJ4(15,da)),e.R7$(1),e.Y8G("icon",o.faPlus),e.R7$(2),e.JRh(t("createRole")),e.R7$(2),e.JRh(t("hint")),e.R7$(1),e.Y8G("ngIf",0===o.selected.length&&!o.loading),e.R7$(1),e.Y8G("ngIf",o.loading),e.R7$(1),e.Y8G("ngIf",!o.loading&&o.roles.length>0),e.R7$(1),e.Y8G("ngIf",!o.loading&&0===o.roles.length),e.R7$(1),e.Y8G("ngIf",!o.loading&&o.selectedRoles.length>0)}}let ma=(()=>{class n{constructor(){this.http=(0,e.WQX)(ee.Qq),this.loading=!0,this.roles=[],this.faShieldHalved=b.fLc,this.faCheck=b.e68,this.faCircleCheck=b.QRE,this.faPlus=b.QLR,this.faTriangleExclamation=b.JAe}ngOnInit(){this.http.get(`${A.C}/system/role`,{params:{fields:"id,name,description",sort:"name"}}).subscribe({next:t=>{this.roles=t.resource??[],this.loading=!1},error:()=>{this.loading=!1}})}get selected(){const t=this.form.get("config.allowedRoles")?.value;return this.parse(t)}isSelected(t){return this.selected.includes(t)}get selectedRoles(){const t=this.selected;return this.roles.filter(o=>t.includes(o.id))}toggle(t){const o=this.selected,i=o.includes(t)?o.filter(r=>r!==t):[...o,t];this.form.get("config.allowedRoles")?.setValue(i)}parse(t){if(Array.isArray(t))return t.map(Number).filter(o=>Number.isFinite(o));if("string"==typeof t&&t.trim().length>0)try{const o=JSON.parse(t);if(Array.isArray(o))return o.map(Number).filter(i=>Number.isFinite(i))}catch{return[]}return[]}trackById(t,o){return o.id}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-ai-allowed-roles"]],inputs:{form:"form"},standalone:!0,features:[e.aNF],decls:1,vars:1,consts:[["class","allowed-roles",4,"transloco","translocoRead"],[1,"allowed-roles"],[1,"allowed-roles__header"],[1,"allowed-roles__icon",3,"icon"],[1,"allowed-roles__title"],[1,"allowed-roles__count"],["mat-stroked-button","",1,"allowed-roles__action",3,"routerLink"],[3,"icon"],[1,"allowed-roles__hint"],["class","allowed-roles__warn",4,"ngIf"],["class","allowed-roles__loading",4,"ngIf"],["class","allowed-roles__list",4,"ngIf"],["class","allowed-roles__empty",4,"ngIf"],["class","allowed-roles__reach",4,"ngIf"],[1,"allowed-roles__warn"],[1,"allowed-roles__loading"],[1,"allowed-roles__list"],[4,"ngFor","ngForOf","ngForTrackBy"],["type","button",1,"allowed-roles__chip",3,"click"],["class","allowed-roles__chip-check",3,"icon",4,"ngIf"],[1,"allowed-roles__name"],[1,"allowed-roles__chip-check",3,"icon"],[1,"allowed-roles__empty"],[1,"allowed-roles__reach"],[1,"allowed-roles__reach-head"],["class","allowed-roles__reach-role",4,"ngFor","ngForOf","ngForTrackBy"],[1,"allowed-roles__reach-role"],[1,"allowed-roles__reach-role-name"],[3,"roleId"]],template:function(o,i){1&o&&e.DNE(0,pa,18,16,"div",0),2&o&&e.Y8G("translocoRead","aiAllowedRoles")},dependencies:[d.MD,d.Sq,d.bT,N.Wk,u.Hl,u.It,w.dX,w.aY,D.Q8,D.bA,Zi.A],styles:[".allowed-roles[_ngcontent-%COMP%]{--roles-warning: #9a5b00;display:flex;flex-direction:column;gap:1rem;padding:1.5rem 1.75rem;margin:1rem 0;background:var(--df-surface-2);border:1px solid var(--df-border-2);border-radius:var(--df-radius);font-size:1.4rem;color:var(--df-text)}.allowed-roles__header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap}.allowed-roles__icon[_ngcontent-%COMP%]{color:var(--df-accent);font-size:1.8rem}.allowed-roles__title[_ngcontent-%COMP%]{font-weight:600;font-size:1.5rem;letter-spacing:-.01em}.allowed-roles__count[_ngcontent-%COMP%]{font-size:1.3rem;color:var(--df-text-muted)}.allowed-roles__action[_ngcontent-%COMP%]{margin-left:auto;display:inline-flex!important;align-items:center;gap:.4rem;font-size:1.3rem!important;padding:0 .875rem!important;min-height:38px!important}.allowed-roles__hint[_ngcontent-%COMP%]{margin:0;font-size:1.3rem;color:var(--df-text-2);line-height:1.55}.allowed-roles__warn[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.625rem;padding:.875rem 1.125rem;background:color-mix(in srgb,var(--df-warning, var(--roles-warning)) 10%,transparent);border:1px solid color-mix(in srgb,var(--df-warning, var(--roles-warning)) 40%,transparent);border-radius:var(--df-radius-sm);color:var(--df-warning, var(--roles-warning));font-size:1.3rem}.allowed-roles__loading[_ngcontent-%COMP%], .allowed-roles__empty[_ngcontent-%COMP%]{color:var(--df-text-muted);font-style:italic;font-size:1.3rem}.allowed-roles__list[_ngcontent-%COMP%]{list-style:none;margin:.25rem 0 0;padding:0;display:flex;flex-wrap:wrap;gap:.625rem .75rem}.allowed-roles__list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.625rem}.allowed-roles__chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.5rem;padding:.5rem 1rem;background:var(--df-surface);border:1px solid var(--df-border);border-radius:var(--df-radius-sm);font:inherit;font-size:1.4rem;color:inherit;cursor:pointer;transition:border-color .12s ease,background .12s ease}.allowed-roles__chip[_ngcontent-%COMP%]:hover{border-color:var(--df-accent);background:var(--df-hover)}.allowed-roles__chip--selected[_ngcontent-%COMP%]{border-color:var(--df-accent);background:var(--df-accent-soft);color:var(--df-text)}.allowed-roles__chip-check[_ngcontent-%COMP%]{color:var(--df-accent)}.allowed-roles__name[_ngcontent-%COMP%]{font-weight:500}.allowed-roles__reach[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;margin-top:.5rem;padding-top:1.25rem;border-top:1px solid var(--df-border-2)}.allowed-roles__reach-head[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.625rem;font-weight:600;font-size:1.4rem;letter-spacing:-.01em}.allowed-roles__reach-head[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--df-accent);font-size:1.6rem}.allowed-roles__reach-role[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.625rem}.allowed-roles__reach-role-name[_ngcontent-%COMP%]{font-weight:600;font-size:1.3rem;color:var(--df-text-2)}.dark-theme[_nghost-%COMP%] .allowed-roles[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .allowed-roles[_ngcontent-%COMP%]{--roles-warning: #ffb74d}"]})}}return n})();function _a(n,a){1&n&&(e.j41(0,"div",11),e.EFF(1," Loading MCP servers\u2026 "),e.k0s())}function ga(n,a){if(1&n&&e.nrm(0,"fa-icon",17),2&n){const t=e.XpG(3);e.Y8G("icon",t.faCircleCheck)}}function fa(n,a){if(1&n){const t=e.RV6();e.j41(0,"li")(1,"button",14),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG(2);return e.Njj(c.toggle(r.name))}),e.DNE(2,ga,1,1,"fa-icon",15),e.j41(3,"span",16),e.EFF(4),e.k0s()()()}if(2&n){const t=a.$implicit,o=e.XpG(2);e.R7$(1),e.AVh("mcp-servers__chip--selected",o.isSelected(t.name)),e.R7$(1),e.Y8G("ngIf",o.isSelected(t.name)),e.R7$(2),e.JRh(t.label||t.name)}}function ua(n,a){if(1&n&&(e.j41(0,"ul",12),e.DNE(1,fa,5,4,"li",13),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.Y8G("ngForOf",t.servers)("ngForTrackBy",t.trackByName)}}function ha(n,a){1&n&&(e.j41(0,"p",18),e.EFF(1," No MCP services exist yet. Create one (service type \u201cMCP Server\u201d) and come back. "),e.k0s())}const ba=function(){return["/api-connections/api-types/database"]};let va=(()=>{class n{constructor(){this.http=(0,e.WQX)(ee.Qq),this.loading=!0,this.servers=[],this.faPlug=b.QtJ,this.faCircleCheck=b.QRE,this.faPlus=b.QLR}ngOnInit(){this.http.get(`${A.C}/system/service`,{params:{filter:'type = "mcp"',fields:"id,name,label",sort:"name"}}).subscribe({next:t=>{this.servers=t.resource??[],this.loading=!1},error:()=>{this.loading=!1}})}get selected(){return this.parse(this.form.get("config.mcpServers")?.value)}isSelected(t){return this.selected.includes(t)}toggle(t){const o=this.selected,i=o.includes(t)?o.filter(r=>r!==t):[...o,t];this.form.get("config.mcpServers")?.setValue(i)}parse(t){if(Array.isArray(t))return t.map(String).filter(o=>o.length>0);if("string"==typeof t&&t.trim().length>0)try{const o=JSON.parse(t);if(Array.isArray(o))return o.map(String).filter(i=>i.length>0)}catch{return[]}return[]}trackByName(t,o){return o.name}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-ai-mcp-servers"]],inputs:{form:"form"},standalone:!0,features:[e.aNF],decls:16,vars:9,consts:[[1,"mcp-servers"],[1,"mcp-servers__header"],[1,"mcp-servers__icon",3,"icon"],[1,"mcp-servers__title"],[1,"mcp-servers__count"],["mat-stroked-button","",1,"mcp-servers__action",3,"routerLink"],[3,"icon"],[1,"mcp-servers__hint"],["class","mcp-servers__loading",4,"ngIf"],["class","mcp-servers__list",4,"ngIf"],["class","mcp-servers__empty",4,"ngIf"],[1,"mcp-servers__loading"],[1,"mcp-servers__list"],[4,"ngFor","ngForOf","ngForTrackBy"],["type","button",1,"mcp-servers__chip",3,"click"],["class","mcp-servers__chip-check",3,"icon",4,"ngIf"],[1,"mcp-servers__name"],[1,"mcp-servers__chip-check",3,"icon"],[1,"mcp-servers__empty"]],template:function(o,i){1&o&&(e.j41(0,"div",0)(1,"div",1),e.nrm(2,"fa-icon",2),e.j41(3,"span",3),e.EFF(4,"MCP Servers"),e.k0s(),e.j41(5,"span",4),e.EFF(6),e.k0s(),e.j41(7,"a",5),e.nrm(8,"fa-icon",6),e.j41(9,"span"),e.EFF(10,"Create MCP service"),e.k0s()()(),e.j41(11,"p",7),e.EFF(12," Pick the MCP servers this chat may call as tools. The AI sees the intersection of these and what the caller's role can access, so a conversation can never reach a server the person talking to it can't. Leave all unselected to allow every MCP server the role grants. "),e.k0s(),e.DNE(13,_a,2,0,"div",8),e.DNE(14,ua,2,2,"ul",9),e.DNE(15,ha,2,0,"p",10),e.k0s()),2&o&&(e.R7$(2),e.Y8G("icon",i.faPlug),e.R7$(4),e.Lme(" ",i.selected.length," selected \xb7 ",i.servers.length," available "),e.R7$(1),e.Y8G("routerLink",e.lJ4(8,ba)),e.R7$(1),e.Y8G("icon",i.faPlus),e.R7$(5),e.Y8G("ngIf",i.loading),e.R7$(1),e.Y8G("ngIf",!i.loading&&i.servers.length>0),e.R7$(1),e.Y8G("ngIf",!i.loading&&0===i.servers.length))},dependencies:[d.MD,d.Sq,d.bT,N.Wk,u.Hl,u.It,w.dX,w.aY],styles:[".mcp-servers[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:1.5rem 1.75rem;margin:1rem 0;background:var(--df-surface-2);border:1px solid var(--df-border-2);border-radius:var(--df-radius);font-size:1.4rem;color:var(--df-text)}.mcp-servers__header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap}.mcp-servers__icon[_ngcontent-%COMP%]{color:var(--df-accent);font-size:1.8rem}.mcp-servers__title[_ngcontent-%COMP%]{font-weight:600;font-size:1.5rem;letter-spacing:-.01em}.mcp-servers__count[_ngcontent-%COMP%]{font-size:1.3rem;color:var(--df-text-muted)}.mcp-servers__action[_ngcontent-%COMP%]{margin-left:auto;display:inline-flex!important;align-items:center;gap:.4rem;font-size:1.3rem!important;padding:0 .875rem!important;min-height:38px!important}.mcp-servers__hint[_ngcontent-%COMP%]{margin:0;font-size:1.3rem;color:var(--df-text-2);line-height:1.55}.mcp-servers__loading[_ngcontent-%COMP%], .mcp-servers__empty[_ngcontent-%COMP%]{color:var(--df-text-muted);font-style:italic;font-size:1.3rem}.mcp-servers__list[_ngcontent-%COMP%]{list-style:none;margin:.25rem 0 0;padding:0;display:flex;flex-wrap:wrap;gap:.625rem .75rem}.mcp-servers__list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.625rem}.mcp-servers__chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.5rem;padding:.5rem 1rem;background:var(--df-surface);border:1px solid var(--df-border);border-radius:var(--df-radius-sm);font:inherit;font-size:1.4rem;color:inherit;cursor:pointer;transition:border-color .12s ease,background .12s ease}.mcp-servers__chip[_ngcontent-%COMP%]:hover{border-color:var(--df-accent);background:var(--df-hover)}.mcp-servers__chip--selected[_ngcontent-%COMP%]{border-color:var(--df-accent);background:var(--df-accent-soft);color:var(--df-text)}.mcp-servers__chip-check[_ngcontent-%COMP%]{color:var(--df-accent)}.mcp-servers__name[_ngcontent-%COMP%]{font-weight:500}"]})}}return n})();const ie=[{name:"list_services",title:"List Services",description:"List the services configured on this DreamFactory instance."},{name:"get_service",title:"Get Service",description:"Retrieve one service, including its configuration."},{name:"create_service",title:"Create Service",description:"Create a new service (database, file, MCP, etc.)."},{name:"update_service",title:"Update Service",description:"Update an existing service, its label, or its configuration."},{name:"delete_service",title:"Delete Service",description:"Permanently delete a service by ID or name."},{name:"list_service_types",title:"List Service Types",description:"List the service types available on this instance."},{name:"get_service_type_schema",title:"Get Service Type Schema",description:"Return the configuration schema required to create a given service type."},{name:"get_environment",title:"Get Environment",description:"Read platform, license, and server environment information."},{name:"list_roles",title:"List Roles",description:"List the roles that control API access for apps and users."},{name:"create_role",title:"Create Role",description:"Create a role with service and component access rules."},{name:"get_role",title:"Get Role",description:"Retrieve one role with its access rules and lookups."},{name:"update_role",title:"Update Role",description:"Update a role, including its service access rules."},{name:"list_apps",title:"List Apps",description:"List apps (API keys) and the roles they are bound to."},{name:"create_app",title:"Create App",description:"Create an app, generating a new API key bound to a role."},{name:"get_app",title:"Get App",description:"Retrieve one app, including its API key and role."},{name:"list_admins",title:"List Admins",description:"List the administrator accounts on this instance."},{name:"get_access_audit",title:"Get Access Audit",description:"Report last-used / never-used / stale API keys, roles and users from system/access_usage."},{name:"call_system_api",title:"Call System API",description:"Call any /api/v2/system/* or /api/v2/user/* endpoint directly for operations not covered by a dedicated tool."}];function Wt(n){return"system_mcp"===(n??"").toString().trim().toLowerCase()}function Ca(n,a){1&n&&(e.j41(0,"div",9),e.EFF(1," Loading data services\u2026 "),e.k0s())}function ka(n,a){if(1&n&&e.nrm(0,"fa-icon",15),2&n){const t=e.XpG(3);e.Y8G("icon",t.faCircleCheck)}}function ya(n,a){if(1&n){const t=e.RV6();e.j41(0,"li")(1,"button",12),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG(2);return e.Njj(c.toggle(r.name))}),e.DNE(2,ka,1,1,"fa-icon",13),e.j41(3,"span",14),e.EFF(4),e.k0s()()()}if(2&n){const t=a.$implicit,o=e.XpG(2);e.R7$(1),e.AVh("data-services__chip--selected",o.isSelected(t.name)),e.R7$(1),e.Y8G("ngIf",o.isSelected(t.name)),e.R7$(2),e.JRh(t.label||t.name)}}function Ma(n,a){if(1&n&&(e.j41(0,"ul",10),e.DNE(1,ya,5,4,"li",11),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.Y8G("ngForOf",t.services)("ngForTrackBy",t.trackByName)}}function Oa(n,a){1&n&&(e.j41(0,"p",16),e.EFF(1," No database services exist yet. Create one under API Generation & Connections and come back. "),e.k0s())}const Pa=new Set(["Database","Big Data","File","Excel"]);let Fa=(()=>{class n{constructor(){this.http=(0,e.WQX)(ee.Qq),this.loading=!0,this.services=[],this.faDatabase=b.hem,this.faCircleCheck=b.QRE}ngOnInit(){(0,ue.p)({types:this.http.get(`${A.C}/system/service_type`,{params:{fields:"name,group"}}),services:this.http.get(`${A.C}/system/service`,{params:{fields:"id,name,label,type",sort:"name"}})}).subscribe({next:({types:t,services:o})=>{const i=new Set((t.resource??[]).filter(r=>Pa.has(r.group??"")).map(r=>r.name));this.services=(o.resource??[]).filter(r=>i.has(r.type)),this.loading=!1},error:()=>{this.loading=!1}})}get selected(){return this.parse(this.form.get("config.defaultDataServices")?.value)}isSelected(t){return this.selected.includes(t)}toggle(t){const o=this.selected,i=o.includes(t)?o.filter(r=>r!==t):[...o,t];this.form.get("config.defaultDataServices")?.setValue(i)}parse(t){if(Array.isArray(t))return t.map(String).filter(o=>o.length>0);if("string"==typeof t&&t.trim().length>0)try{const o=JSON.parse(t);if(Array.isArray(o))return o.map(String).filter(i=>i.length>0)}catch{return[]}return[]}trackByName(t,o){return o.name}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-ai-data-services"]],inputs:{form:"form"},standalone:!0,features:[e.aNF],decls:12,vars:6,consts:[[1,"data-services"],[1,"data-services__header"],[1,"data-services__icon",3,"icon"],[1,"data-services__title"],[1,"data-services__count"],[1,"data-services__hint"],["class","data-services__loading",4,"ngIf"],["class","data-services__list",4,"ngIf"],["class","data-services__empty",4,"ngIf"],[1,"data-services__loading"],[1,"data-services__list"],[4,"ngFor","ngForOf","ngForTrackBy"],["type","button",1,"data-services__chip",3,"click"],["class","data-services__chip-check",3,"icon",4,"ngIf"],[1,"data-services__name"],[1,"data-services__chip-check",3,"icon"],[1,"data-services__empty"]],template:function(o,i){1&o&&(e.j41(0,"div",0)(1,"div",1),e.nrm(2,"fa-icon",2),e.j41(3,"span",3),e.EFF(4,"Data Services"),e.k0s(),e.j41(5,"span",4),e.EFF(6),e.k0s()(),e.j41(7,"p",5),e.EFF(8," Pick the databases the AI may query. The AI sees the intersection of these and what the caller's role can read. Leave all unselected to allow every data service the role grants. "),e.k0s(),e.DNE(9,Ca,2,0,"div",6),e.DNE(10,Ma,2,2,"ul",7),e.DNE(11,Oa,2,0,"p",8),e.k0s()),2&o&&(e.R7$(2),e.Y8G("icon",i.faDatabase),e.R7$(4),e.Lme(" ",i.selected.length," selected \xb7 ",i.services.length," available "),e.R7$(3),e.Y8G("ngIf",i.loading),e.R7$(1),e.Y8G("ngIf",!i.loading&&i.services.length>0),e.R7$(1),e.Y8G("ngIf",!i.loading&&0===i.services.length))},dependencies:[d.MD,d.Sq,d.bT,w.dX,w.aY],styles:[".data-services[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:1.5rem 1.75rem;margin:1rem 0;background:var(--df-surface-2);border:1px solid var(--df-border-2);border-radius:var(--df-radius);font-size:1.4rem;color:var(--df-text)}.data-services__header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap}.data-services__icon[_ngcontent-%COMP%]{color:var(--df-accent);font-size:1.8rem}.data-services__title[_ngcontent-%COMP%]{font-weight:600;font-size:1.5rem;letter-spacing:-.01em}.data-services__count[_ngcontent-%COMP%]{font-size:1.3rem;color:var(--df-text-muted)}.data-services__hint[_ngcontent-%COMP%]{margin:0;font-size:1.3rem;color:var(--df-text-2);line-height:1.55}.data-services__loading[_ngcontent-%COMP%], .data-services__empty[_ngcontent-%COMP%]{color:var(--df-text-muted);font-style:italic;font-size:1.3rem}.data-services__list[_ngcontent-%COMP%]{list-style:none;margin:.25rem 0 0;padding:0;display:flex;flex-wrap:wrap;gap:.625rem .75rem}.data-services__list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.625rem}.data-services__chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.5rem;padding:.5rem 1rem;background:var(--df-surface);border:1px solid var(--df-border);border-radius:var(--df-radius-sm);font:inherit;font-size:1.4rem;color:inherit;cursor:pointer;transition:border-color .12s ease,background .12s ease}.data-services__chip[_ngcontent-%COMP%]:hover{border-color:var(--df-accent);background:var(--df-hover)}.data-services__chip--selected[_ngcontent-%COMP%]{border-color:var(--df-accent);background:var(--df-accent-soft);color:var(--df-text)}.data-services__chip-check[_ngcontent-%COMP%]{color:var(--df-accent)}.data-services__name[_ngcontent-%COMP%]{font-weight:500}"]})}}return n})();var Qt=g(23695),Se=g(58781),xe=g(89115),wa=g(82954),Zt=g(82182),he=g(73907);function Ta(n,a){1&n&&e.nrm(0,"div",18),2&n&&e.xc7("--confetti-index",a.$implicit)}function Sa(n,a){1&n&&e.nrm(0,"div",19),2&n&&e.xc7("--firework-index",a.$implicit)}const Ra=function(){return[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]},Ia=function(){return[1,2,3,4,5]};function Ea(n,a){1&n&&(e.j41(0,"div",15),e.DNE(1,Ta,1,2,"div",16),e.DNE(2,Sa,1,2,"div",17),e.k0s()),2&n&&(e.R7$(1),e.Y8G("ngForOf",e.lJ4(2,Ra)),e.R7$(1),e.Y8G("ngForOf",e.lJ4(3,Ia)))}function $a(n,a){1&n&&e.nrm(0,"div",29)}function Ga(n,a){if(1&n&&(e.j41(0,"div",20),e.DNE(1,$a,1,0,"div",21),e.j41(2,"div",22),e.nrm(3,"fa-icon",23),e.k0s(),e.j41(4,"div",24)(5,"h4",25),e.EFF(6),e.nI1(7,"transloco"),e.k0s(),e.j41(8,"p",26),e.EFF(9),e.nI1(10,"transloco"),e.k0s(),e.j41(11,"span",27),e.nrm(12,"fa-icon",28),e.EFF(13),e.k0s()()()),2&n){const t=a.$implicit,o=a.index,i=e.XpG();e.AVh("revealed",i.currentStep>=o)("pulse-animation",i.currentStep===o),e.R7$(1),e.Y8G("ngIf",o0),e.R7$(2),e.SpI(" ",e.bMT(8,8,"services.celebration.exploreLater")," "),e.R7$(3),e.SpI(" ",e.bMT(11,10,"services.celebration.autoRedirectTest")," ")}}const Ya=function(n){return{name:n}};let Va=(()=>{class n{constructor(t,o,i){this.dialogRef=t,this.data=o,this.router=i,this.destroy$=new xe.B,this.faCheckCircle=b.SGM,this.faRocket=b.KMJ,this.faShieldAlt=b.imB,this.faKey=b.bMg,this.faBolt=b.zm_,this.faDatabase=b.hem,this.faCopy=b.jPR,this.faCheck=b.e68,this.faFlask=b.rIc,this.faInfoCircle=b.iW_,this.showConfetti=!0,this.currentStep=-1,this.allStepsRevealed=!1,this.countdown=15,this.apiKeyCopied=!1,this.baseUrl=window.location.origin,this.steps=[{icon:b.hem,title:"services.celebration.steps.database.title",description:"services.celebration.steps.database.description",timing:"< 100ms"},{icon:b.zm_,title:"services.celebration.steps.endpoints.title",description:"services.celebration.steps.endpoints.description",timing:"< 50ms"},{icon:b.imB,title:"services.celebration.steps.security.title",description:"services.celebration.steps.security.description",timing:"< 200ms"},{icon:b.bMg,title:"services.celebration.steps.apiKey.title",description:"services.celebration.steps.apiKey.description",timing:"Instant"}],t.disableClose=!0}ngOnInit(){this.revealSteps(),setTimeout(()=>{this.startCountdown()},3e3)}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}revealSteps(){this.steps.forEach((o,i)=>{setTimeout(()=>{this.currentStep=i,i===this.steps.length-1&&(this.allStepsRevealed=!0)},500*(i+1))})}startCountdown(){(function Da(n=0,a=wa.E){return n<0&&(n=0),(0,Zt.O)(n,n,a)})(1e3).pipe((0,he.Q)(this.destroy$)).subscribe(()=>{this.countdown--,0===this.countdown&&this.goToApiDocs()})}goToApiDocs(){this.dialogRef.close(),this.router.navigate(["/api-connections/api-docs",this.data.serviceName])}copyApiKey(){this.data.apiKey&&(navigator.clipboard.writeText(this.data.apiKey),this.apiKeyCopied=!0,setTimeout(()=>{this.apiKeyCopied=!1},2e3))}skipToHome(){this.dialogRef.close(),this.router.navigate(["/home"])}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(h.CP),e.rXU(h.Vh),e.rXU(N.Ix))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-celebration-dialog"]],standalone:!0,features:[e.aNF],decls:21,vars:18,consts:[[1,"celebration-dialog"],["class","celebration-effects",4,"ngIf"],[1,"dialog-content"],[1,"success-header"],[1,"success-icon-wrapper"],[1,"rocket-icon",3,"icon"],[1,"success-circle"],[1,"celebration-title"],[1,"celebration-subtitle"],[1,"steps-container"],[1,"steps-title"],[1,"steps-timeline"],["class","step-item",3,"revealed","pulse-animation",4,"ngFor","ngForOf"],["class","api-connection-section",4,"ngIf"],["class","dialog-actions",4,"ngIf"],[1,"celebration-effects"],["class","confetti",3,"--confetti-index",4,"ngFor","ngForOf"],["class","firework",3,"--firework-index",4,"ngFor","ngForOf"],[1,"confetti"],[1,"firework"],[1,"step-item"],["class","step-connector",4,"ngIf"],[1,"step-icon"],[3,"icon"],[1,"step-content"],[1,"step-title"],[1,"step-description"],[1,"step-timing"],[1,"timing-icon",3,"icon"],[1,"step-connector"],[1,"api-connection-section"],[1,"endpoint-preview"],[1,"endpoint-label"],[1,"endpoint-icon",3,"icon"],[1,"endpoint-display"],[1,"endpoint-hint"],[1,"api-key-subsection"],[1,"api-key-label"],[1,"key-icon",3,"icon"],[1,"api-key-display"],["mat-icon-button","",3,"matTooltip","click"],[1,"usage-hint"],[1,"info-icon",3,"icon"],[1,"dialog-actions"],["mat-raised-button","","color","primary",1,"test-api-button",3,"click"],[1,"button-icon",3,"icon"],["class","countdown",4,"ngIf"],["mat-stroked-button","",1,"explore-later-button",3,"click"],[1,"auto-redirect-note"],[1,"countdown"]],template:function(o,i){1&o&&(e.j41(0,"div",0),e.DNE(1,Ea,3,4,"div",1),e.j41(2,"div",2)(3,"div",3)(4,"div",4),e.nrm(5,"fa-icon",5)(6,"div",6),e.k0s(),e.j41(7,"h1",7),e.EFF(8),e.nI1(9,"transloco"),e.k0s(),e.j41(10,"p",8),e.EFF(11),e.nI1(12,"transloco"),e.k0s()(),e.j41(13,"div",9)(14,"h3",10),e.EFF(15),e.nI1(16,"transloco"),e.k0s(),e.j41(17,"div",11),e.DNE(18,Ga,14,14,"div",12),e.k0s()(),e.DNE(19,ja,29,25,"div",13),e.DNE(20,Aa,12,12,"div",14),e.k0s()()),2&o&&(e.R7$(1),e.Y8G("ngIf",i.showConfetti),e.R7$(2),e.Y8G("@fadeIn",void 0),e.R7$(2),e.Y8G("icon",i.faRocket),e.R7$(3),e.SpI(" ",e.bMT(9,9,"services.celebration.title")," "),e.R7$(3),e.SpI(" ",e.i5U(12,11,"services.celebration.subtitle",e.eq3(16,Ya,i.data.serviceName))," "),e.R7$(4),e.SpI(" ",e.bMT(16,14,"services.celebration.whatHappened")," "),e.R7$(3),e.Y8G("ngForOf",i.steps),e.R7$(1),e.Y8G("ngIf",i.data.apiKey&&i.allStepsRevealed),e.R7$(1),e.Y8G("ngIf",i.allStepsRevealed))},dependencies:[d.MD,d.Sq,d.bT,h.hM,u.Hl,u.$z,u.iY,Z.m_,S.uc,S.oV,D.Q8,D.Kj,w.dX,w.aY],styles:['.celebration-dialog[_ngcontent-%COMP%]{position:relative;padding:0;overflow:hidden;height:100%;display:flex;flex-direction:column;background:var(--df-surface);animation:_ngcontent-%COMP%_subtle-entrance .4s ease-out}@keyframes _ngcontent-%COMP%_subtle-entrance{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}.celebration-effects[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;overflow:hidden;z-index:1}.confetti[_ngcontent-%COMP%]{position:absolute;width:10px;height:10px;top:-10px;animation:_ngcontent-%COMP%_confetti-fall calc(3s + var(--confetti-index) * .1s) linear infinite;animation-delay:calc(var(--confetti-index) * -.2s)}.confetti[_ngcontent-%COMP%]:before{content:"";position:absolute;width:100%;height:100%;background:linear-gradient(45deg,#7f11e0,#ff4081,#4caf50,#ffc107,#2196f3);background-size:500%;animation:_ngcontent-%COMP%_confetti-rotate 1s linear infinite;border-radius:2px;transform:rotate(calc(var(--confetti-index) * 30deg))}.confetti[_ngcontent-%COMP%]:nth-child(odd){left:calc(var(--confetti-index) * 6.5%)}.confetti[_ngcontent-%COMP%]:nth-child(2n){right:calc(var(--confetti-index) * 6.5%)}@keyframes _ngcontent-%COMP%_confetti-fall{0%{transform:translateY(-10px) rotate(0);opacity:1}to{transform:translateY(550px) rotate(720deg);opacity:0}}@keyframes _ngcontent-%COMP%_confetti-rotate{0%{background-position:0% 50%}to{background-position:100% 50%}}.firework[_ngcontent-%COMP%]{position:absolute;width:4px;height:4px;border-radius:50%;animation:_ngcontent-%COMP%_firework-launch calc(2s + var(--firework-index) * .3s) ease-out infinite;animation-delay:calc(var(--firework-index) * .5s)}.firework[_ngcontent-%COMP%]:nth-child(1){left:20%;background:#7f11e0}.firework[_ngcontent-%COMP%]:nth-child(2){left:40%;background:#ff4081}.firework[_ngcontent-%COMP%]:nth-child(3){left:50%;background:#4caf50}.firework[_ngcontent-%COMP%]:nth-child(4){left:60%;background:#ffc107}.firework[_ngcontent-%COMP%]:nth-child(5){left:80%;background:#2196f3}.firework[_ngcontent-%COMP%]:after{content:"";position:absolute;width:100px;height:100px;border-radius:50%;top:-48px;left:-48px;background:radial-gradient(circle,currentColor 0%,transparent 70%);opacity:0;animation:_ngcontent-%COMP%_firework-explode calc(2s + var(--firework-index) * .3s) ease-out infinite;animation-delay:calc(var(--firework-index) * .5s + .8s)}@keyframes _ngcontent-%COMP%_firework-launch{0%{transform:translateY(100vh) scale(1);opacity:1}40%{transform:translateY(30vh) scale(1);opacity:1}to{transform:translateY(30vh) scale(0);opacity:0}}@keyframes _ngcontent-%COMP%_firework-explode{0%{transform:scale(0);opacity:0}50%{transform:scale(1);opacity:.8}to{transform:scale(1.5);opacity:0}}.dialog-content[_ngcontent-%COMP%]{position:relative;z-index:2;padding:20px;max-width:100%;margin:0 auto;text-align:center;overflow-y:auto;overflow-x:hidden;flex:1;max-height:calc(85vh - 40px)}.dialog-content[_ngcontent-%COMP%]::-webkit-scrollbar{width:6px}.dialog-content[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:var(--df-surface-2)}.dialog-content[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:var(--df-border);border-radius:3px}.dialog-content[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:var(--df-text-faint)}.success-header[_ngcontent-%COMP%]{text-align:center;margin-bottom:16px;animation:_ngcontent-%COMP%_fadeInDown .6s ease-out}.success-icon-wrapper[_ngcontent-%COMP%]{position:relative;width:64px;height:64px;margin:0 auto 16px}.success-icon-wrapper[_ngcontent-%COMP%] .rocket-icon[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:32px;color:var(--df-accent);z-index:2;animation:_ngcontent-%COMP%_rocket-launch 2s ease-in-out infinite}.success-icon-wrapper[_ngcontent-%COMP%] .success-circle[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%;border-radius:50%;background:var(--df-accent);opacity:.1;animation:_ngcontent-%COMP%_pulse-circle 2s ease-in-out infinite}@keyframes _ngcontent-%COMP%_rocket-launch{0%,to{transform:translate(-50%,-50%) translateY(0)}50%{transform:translate(-50%,-50%) translateY(-5px)}}@keyframes _ngcontent-%COMP%_pulse-circle{0%,to{transform:scale(1);opacity:.1}50%{transform:scale(1.2);opacity:.2}}.celebration-title[_ngcontent-%COMP%]{font-size:2rem;font-weight:650;letter-spacing:-.015em;color:var(--df-text);margin:0 0 6px;animation:_ngcontent-%COMP%_bounce-in .8s ease-out;text-align:center}.celebration-subtitle[_ngcontent-%COMP%]{font-size:1.4rem;color:var(--df-text-2);margin:0;text-align:center}.steps-container[_ngcontent-%COMP%]{margin:12px 0;text-align:left;padding:0 8px}.steps-title[_ngcontent-%COMP%]{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--df-text-muted);margin-bottom:12px;text-align:center}.steps-timeline[_ngcontent-%COMP%]{position:relative;padding-left:52px;max-width:450px;margin:0 auto}.step-item[_ngcontent-%COMP%]{position:relative;display:flex;align-items:flex-start;margin-bottom:12px;opacity:0;transform:translate(-20px);transition:all .5s ease-out}.step-item.revealed[_ngcontent-%COMP%]{opacity:1;transform:translate(0)}.step-item.pulse-animation[_ngcontent-%COMP%] .step-icon[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_icon-pulse .6s ease-out}.step-item[_ngcontent-%COMP%] .step-connector[_ngcontent-%COMP%]{position:absolute;left:-35px;top:36px;width:2px;height:36px;background:var(--df-border)}.step-icon[_ngcontent-%COMP%]{position:absolute;left:-52px;width:36px;height:36px;border-radius:50%;background:var(--df-accent);display:flex;align-items:center;justify-content:center;color:var(--df-accent-contrast);font-size:16px;flex-shrink:0}@keyframes _ngcontent-%COMP%_icon-pulse{0%{transform:scale(1)}50%{transform:scale(1.2)}to{transform:scale(1)}}.step-content[_ngcontent-%COMP%]{margin-left:0;flex:1}.step-title[_ngcontent-%COMP%]{font-size:1.4rem;font-weight:500;color:var(--df-text);margin:0 0 3px}.step-description[_ngcontent-%COMP%]{font-size:1.3rem;color:var(--df-text-2);margin:0 0 6px;line-height:1.4}.step-timing[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:4px;font-size:1.2rem;color:var(--df-success);font-weight:500}.step-timing[_ngcontent-%COMP%] .timing-icon[_ngcontent-%COMP%]{font-size:1.2rem}.api-connection-section[_ngcontent-%COMP%]{margin:12px auto;padding:14px;background:var(--df-surface-2);border:1px solid var(--df-border);border-radius:var(--df-radius);animation:_ngcontent-%COMP%_slideUp .5s ease-out;max-width:480px}.endpoint-preview[_ngcontent-%COMP%]{margin-bottom:12px;padding-bottom:10px;border-bottom:1px solid var(--df-border-2)}.endpoint-label[_ngcontent-%COMP%]{font-size:1.4rem;font-weight:500;color:var(--df-text);margin-bottom:10px;display:flex;align-items:center;gap:8px}.endpoint-label[_ngcontent-%COMP%] .endpoint-icon[_ngcontent-%COMP%]{color:var(--df-accent);font-size:16px}.endpoint-display[_ngcontent-%COMP%]{position:relative}.endpoint-display[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{display:block;padding:12px 16px;background:var(--df-code-bg);border:1px solid var(--df-border-2);border-radius:var(--df-radius-sm);font-family:SFMono-Regular,Menlo,Consolas,monospace;font-size:1.3rem;color:var(--df-code-text);overflow-x:auto;margin-bottom:4px}.endpoint-display[_ngcontent-%COMP%] .endpoint-hint[_ngcontent-%COMP%]{font-size:1.1rem;color:var(--df-text-faint);font-style:italic}.api-key-subsection[_ngcontent-%COMP%]{margin-bottom:10px}.api-key-label[_ngcontent-%COMP%]{font-size:1.4rem;font-weight:500;color:var(--df-text);margin-bottom:10px;display:flex;align-items:center;gap:8px}.api-key-label[_ngcontent-%COMP%] .key-icon[_ngcontent-%COMP%]{color:var(--df-accent);font-size:16px}.api-key-display[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.api-key-display[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{flex:1;padding:10px 14px;background:var(--df-code-bg);border:1px solid var(--df-border-2);border-radius:var(--df-radius-sm);font-family:SFMono-Regular,Menlo,Consolas,monospace;font-size:1.3rem;color:var(--df-code-text);overflow-x:auto}.api-key-display[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{transition:all .2s ease}.api-key-display[_ngcontent-%COMP%] button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:16px;color:var(--df-text-2);transition:color .2s ease}.api-key-display[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover fa-icon[_ngcontent-%COMP%]{color:var(--df-accent)}.usage-hint[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:8px;padding:10px;background:var(--df-accent-soft);border-radius:var(--df-radius-sm);font-size:1.2rem;color:var(--df-text-2);line-height:1.4}.usage-hint[_ngcontent-%COMP%] .info-icon[_ngcontent-%COMP%]{color:var(--df-accent);font-size:14px;margin-top:1px}.dialog-actions[_ngcontent-%COMP%]{text-align:center;margin-top:12px;padding-bottom:8px;animation:_ngcontent-%COMP%_fadeIn .5s ease-out}.test-api-button[_ngcontent-%COMP%]{padding:10px 28px;font-size:1.5rem;font-weight:500;letter-spacing:.3px;margin-bottom:10px;min-width:200px}.test-api-button[_ngcontent-%COMP%] .button-icon[_ngcontent-%COMP%]{margin-right:8px;font-size:18px}.test-api-button[_ngcontent-%COMP%] .countdown[_ngcontent-%COMP%]{margin-left:8px;opacity:.7;font-size:1.4rem}.explore-later-button[_ngcontent-%COMP%]{font-size:1.4rem;color:var(--df-text-2)}.explore-later-button[_ngcontent-%COMP%]:hover{background:var(--df-hover)}.auto-redirect-note[_ngcontent-%COMP%]{margin-top:10px;font-size:1.2rem;color:var(--df-text-faint);text-align:center}@keyframes _ngcontent-%COMP%_fadeInDown{0%{opacity:0;transform:translateY(-20px)}to{opacity:1;transform:translateY(0)}}@keyframes _ngcontent-%COMP%_fadeIn{0%{opacity:0}to{opacity:1}}@keyframes _ngcontent-%COMP%_slideUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}@keyframes _ngcontent-%COMP%_bounce-in{0%{transform:scale(.8);opacity:0}50%{transform:scale(1.05)}to{transform:scale(1);opacity:1}}']})}}return n})();var Ce=g(57588),en=g(39258),tn=g(82444),pe=g(10056);function Xa(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",11)(1,"mat-button-toggle-group",12),e.bIt("click",function(i){return i.stopPropagation()})("change",function(i){e.eBV(t);const r=e.XpG().$implicit,c=e.XpG();return e.Njj(c.onAccessLevelChange(r,i.value))}),e.j41(2,"mat-button-toggle",13)(3,"span",14),e.nrm(4,"fa-icon",15),e.k0s(),e.EFF(5," Read Only "),e.k0s(),e.j41(6,"mat-button-toggle",16)(7,"span",14),e.nrm(8,"fa-icon",15),e.k0s(),e.EFF(9," Read & Write "),e.k0s(),e.j41(10,"mat-button-toggle",17)(11,"span",14),e.nrm(12,"fa-icon",15),e.k0s(),e.EFF(13," Full Access "),e.k0s()()()}if(2&n){const t=e.XpG().$implicit,o=e.XpG();e.R7$(1),e.Y8G("value",t.selected?t.level:null)("disabled",!t.selected),e.R7$(3),e.Y8G("icon",o.faEye),e.R7$(4),e.Y8G("icon",o.faPen),e.R7$(4),e.Y8G("icon",o.faLockOpen)}}function za(n,a){if(1&n){const t=e.RV6();e.j41(0,"mat-card",6),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG();return e.Njj(c.toggleCard(r))}),e.j41(1,"div",7)(2,"div",8),e.EFF(3),e.k0s(),e.j41(4,"div",9),e.EFF(5),e.k0s()(),e.DNE(6,Xa,14,5,"div",10),e.k0s()}if(2&n){const t=a.$implicit;e.AVh("selected",t.selected)("read-level",t.selected&&"read"===t.level)("write-level",t.selected&&"write"===t.level)("full-level",t.selected&&"full"===t.level),e.R7$(3),e.JRh(t.label),e.R7$(2),e.JRh(t.description),e.R7$(1),e.Y8G("ngIf","fullAccess"!==t.key)}}let Ba=(()=>{class n{constructor(t,o,i,r,c){this.router=t,this.snackBar=o,this.systemService=i,this.snackbarService=r,this.dialog=c,this.serviceName="",this.serviceId=null,this.isDatabase=!1,this.isFirstTimeUser=!1,this.goBack=new e.bkB,this.faEye=b.pS3,this.faPen=b.hpd,this.faLockOpen=b.pNp,this.securityConfigurations=[],this.accessOptions=[]}ngOnInit(){this.initializeAccessOptions()}initializeAccessOptions(){this.accessOptions=[{key:"fullAccess",label:"Full Access",description:"Grant complete access to all database components",selected:!1,level:"read"},{key:"schemaAccess",label:"Schema Access",description:"Configure access to specific database schemas",selected:!1,level:"read"},{key:"tableAccess",label:"Table Access",description:"Manage access to individual database tables",selected:!1,level:"read"},{key:"storedProcedures",label:"Stored Procedures",description:"Control access to stored procedures",selected:!1,level:"read"},{key:"functions",label:"Functions",description:"Set access levels for database functions",selected:!1,level:"read"}]}toggleCard(t){if("fullAccess"===t.key)t.selected||this.accessOptions.forEach(o=>{"fullAccess"!==o.key&&o.selected&&(o.selected=!1,this.removeSecurityConfiguration(o.key))});else{const o=this.accessOptions.find(i=>"fullAccess"===i.key);o&&o.selected&&(o.selected=!1,this.removeSecurityConfiguration(o.key))}t.selected=!t.selected,t.selected?this.addSecurityConfiguration(t):this.removeSecurityConfiguration(t.key)}addSecurityConfiguration(t){let o="",i="";switch(t.key){case"fullAccess":o="all",i="*";break;case"schemaAccess":o="schema",i="_schema/*";break;case"tableAccess":o="tables",i="_table/*";break;case"storedProcedures":o="procedures",i="_proc/*";break;case"functions":o="functions",i="_func/*"}const r={accessType:o,accessLevel:t.level,component:i};this.securityConfigurations.push(r),console.log("Added security configuration:",r),console.log("All configurations:",this.securityConfigurations)}removeSecurityConfiguration(t){const o=this.securityConfigurations.findIndex(i=>{switch(t){case"fullAccess":return"all"===i.accessType;case"schemaAccess":return"schema"===i.accessType;case"tableAccess":return"tables"===i.accessType;case"storedProcedures":return"procedures"===i.accessType;case"functions":return"functions"===i.accessType;default:return!1}});if(-1!==o){const i=this.securityConfigurations.splice(o,1)[0];console.log("Removed security configuration:",i),console.log("Remaining configurations:",this.securityConfigurations)}}onAccessLevelChange(t,o){t.level=o;const i=this.securityConfigurations.findIndex(r=>{switch(t.key){case"fullAccess":return"all"===r.accessType;case"schemaAccess":return"schema"===r.accessType;case"tableAccess":return"tables"===r.accessType;case"storedProcedures":return"procedures"===r.accessType;case"functions":return"functions"===r.accessType;default:return!1}});-1!==i&&(this.securityConfigurations[i].accessLevel=o,console.log("Updated access level for configuration:",this.securityConfigurations[i]))}handleGoBack(){console.log("Back button clicked"),this.goBack.emit()}isSecurityConfigValid(){if(!this.accessOptions.some(o=>o.selected)||0===this.securityConfigurations.length)return!1;for(const o of this.securityConfigurations){if(!o.accessType||!o.accessLevel||!o.component)return!1;if("all"===o.accessType){if("*"!==o.component)return!1}else if(!o.component.includes("/*"))return!1}return!0}saveSecurityConfig(){if(!this.isSecurityConfigValid())return void this.snackbarService.openSnackBar("Please select at least one access option and ensure all required fields are filled","error");if(!this.serviceId)return void this.snackBar.open("No service ID found. Please try again.","Close",{duration:3e3});const t=this.formatServiceName(this.serviceName),o=`${this.serviceName}_auto_role`,i=this.securityConfigurations.map(c=>({service_id:this.serviceId,component:c.component,verb_mask:this.getAccessLevel(c.accessLevel),requestor_mask:3,filters:[],filter_op:"AND"})),r={resource:[{name:o,description:`Auto-generated role for service ${this.serviceName}`,is_active:!0,role_service_access_by_role_id:i,user_to_app_to_role_by_role_id:[]}]};console.log("Creating role with multiple configurations:",r),this.systemService.post("role",r).pipe((0,R.W)(c=>(0,we.$)(()=>c)),(0,Ce.n)(c=>c?.resource?.[0]?.id?this.systemService.post("app?fields=*&related=role_by_role_id",{resource:[{name:`${this.serviceName}_app`,description:`Auto-generated app for service ${this.serviceName}`,type:"0",role_id:c.resource[0].id,is_active:!0,url:null,storage_service_id:null,storage_container:null,path:null}]}).pipe((0,R.W)(p=>(this.snackBar.open(`Error creating app: ${(0,De.cQ)(p).message}`,"Close",{duration:5e3}),(0,we.$)(()=>p))),(0,z.T)(p=>{if(!p?.resource?.[0])throw new Error("App response missing resource array");const f=p.resource[0];if(!f.apiKey)throw new Error("App response missing apiKey");return{apiKey:f.apiKey,formattedName:t}}),(0,R.W)(p=>(0,we.$)(()=>p))):(0,we.$)(()=>new Error("Invalid role response"))),(0,z.T)(c=>{if(!c?.apiKey)throw new Error("Invalid app response");return{apiKey:c.apiKey,formattedName:t}})).subscribe({next:c=>{navigator.clipboard?navigator.clipboard.writeText(c.apiKey).then(()=>{this.snackbarService.openSnackBar(`API Created with ${this.securityConfigurations.length} security configuration(s) and API Key copied to clipboard`,"success")}).catch(()=>{this.snackbarService.openSnackBar(`API Created with ${this.securityConfigurations.length} security configuration(s), but failed to copy API Key`,"success")}):this.snackbarService.openSnackBar(`API Created with ${this.securityConfigurations.length} security configuration(s), but failed to copy API Key`,"success"),this.isFirstTimeUser&&this.isDatabase?this.dialog.open(Va,{width:"550px",maxWidth:"90vw",maxHeight:"85vh",disableClose:!0,panelClass:"celebration-dialog-container",data:{serviceName:c.formattedName,apiKey:c.apiKey,isFirstTime:!0}}):this.isDatabase?this.router.navigate(["/api-connections/data-explorer"],{queryParams:{service:c.formattedName},replaceUrl:!0}):this.router.navigateByUrl(`/api-connections/api-docs/${c.formattedName}`,{replaceUrl:!0}).then(s=>{s||this.router.navigate(["api-connections","api-docs",c.formattedName],{replaceUrl:!0})})},error:c=>{this.snackbarService.openSnackBar("Error saving security configuration","error")}})}getAccessLevel(t){switch(t){case"read":return 1;case"write":return 7;case"full":return 15;default:return 0}}formatServiceName(t){return t.toLowerCase().replace(/\s+/g,"").replace(/[^a-z0-9_-]/g,"")}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(N.Ix),e.rXU(en.UG),e.rXU(tn.D),e.rXU(pe.L),e.rXU(h.bZ))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-security-config"]],inputs:{serviceName:"serviceName",serviceId:"serviceId",isDatabase:"isDatabase",isFirstTimeUser:"isFirstTimeUser"},outputs:{goBack:"goBack"},standalone:!0,features:[e.aNF],decls:10,vars:2,consts:[[1,"security-config-wrapper"],[1,"security-cards-container"],["class","security-option-card",3,"selected","read-level","write-level","full-level","click",4,"ngFor","ngForOf"],[1,"action-buttons"],["mat-stroked-button","",3,"click"],["mat-flat-button","","color","primary","type","button",3,"disabled","click"],[1,"security-option-card",3,"click"],[1,"card-header"],[1,"card-title"],[1,"card-description"],["class","toggle-container",4,"ngIf"],[1,"toggle-container"],["appearance","legacy",1,"access-toggle-group",3,"value","disabled","click","change"],["value","read",1,"read-toggle"],[1,"toggle-icon"],[3,"icon"],["value","write",1,"write-toggle"],["value","full",1,"full-toggle"]],template:function(o,i){1&o&&(e.j41(0,"div",0)(1,"h3"),e.EFF(2,"Security Configuration"),e.k0s(),e.j41(3,"div",1),e.DNE(4,za,7,11,"mat-card",2),e.k0s(),e.j41(5,"div",3)(6,"button",4),e.bIt("click",function(){return i.handleGoBack()}),e.EFF(7,"Back"),e.k0s(),e.j41(8,"button",5),e.bIt("click",function(){return i.saveSecurityConfig()}),e.EFF(9," Apply Security Configuration "),e.k0s()()()),2&o&&(e.R7$(4),e.Y8G("ngForOf",i.accessOptions),e.R7$(4),e.Y8G("disabled",!i.isSecurityConfigValid()))},dependencies:[d.MD,d.Sq,d.bT,m.YN,Te.Hu,Te.RN,Se.Vg,Se.ec,Se.pc,u.Hl,u.$z,j.g7,Z.m_,w.dX,w.aY],styles:[".security-config-wrapper[_ngcontent-%COMP%]{padding:24px;max-width:1200px;margin:0 auto}.security-config-wrapper[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin-bottom:24px;font-size:24px;font-weight:600;color:#1976d2;text-align:center}.security-cards-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:20px;margin-bottom:32px}@media (max-width: 768px){.security-cards-container[_ngcontent-%COMP%]{grid-template-columns:1fr;gap:16px}}@media (min-width: 769px) and (max-width: 1024px){.security-cards-container[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr)}}@media (min-width: 1025px){.security-cards-container[_ngcontent-%COMP%]{grid-template-columns:repeat(3,1fr)}}.security-option-card[_ngcontent-%COMP%]{padding:20px;cursor:pointer;border:2px solid #e0e0e0;border-radius:12px;transition:all .3s cubic-bezier(.4,0,.2,1);background:linear-gradient(135deg,#ffffff 0%,#f8f9fa 100%);position:relative;overflow:hidden}.security-option-card[_ngcontent-%COMP%]:hover{transform:translateY(-2px);box-shadow:0 8px 25px #0000001a;border-color:#1976d2}.security-option-card.selected[_ngcontent-%COMP%]{border-color:#1976d2;box-shadow:0 4px 20px #1976d226}.security-option-card.selected.read-level[_ngcontent-%COMP%]{border-color:#2196f3;background:linear-gradient(135deg,#e3f2fd 0%,#bbdefb 100%)}.security-option-card.selected.write-level[_ngcontent-%COMP%]{border-color:#fbc02d;background:linear-gradient(135deg,#fffde7 0%,#fff9c4 100%)}.security-option-card.selected.full-level[_ngcontent-%COMP%]{border-color:#43a047;background:linear-gradient(135deg,#e8f5e9 0%,#c8e6c9 100%)}.security-option-card[_ngcontent-%COMP%] .card-header[_ngcontent-%COMP%]{margin-bottom:16px}.security-option-card[_ngcontent-%COMP%] .card-header[_ngcontent-%COMP%] .card-title[_ngcontent-%COMP%]{font-weight:600;font-size:18px;margin-bottom:8px;color:#333}.security-option-card[_ngcontent-%COMP%] .card-header[_ngcontent-%COMP%] .card-description[_ngcontent-%COMP%]{font-size:14px;color:#666;line-height:1.5}.security-option-card[_ngcontent-%COMP%] .toggle-container[_ngcontent-%COMP%] .access-level-label[_ngcontent-%COMP%]{font-size:12px;font-weight:600;color:#666;margin-bottom:8px;text-transform:uppercase;letter-spacing:.5px}.security-option-card[_ngcontent-%COMP%] .toggle-container[_ngcontent-%COMP%] .access-toggle-group[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:4px;box-shadow:none}.security-option-card[_ngcontent-%COMP%] .toggle-container[_ngcontent-%COMP%] .access-toggle-group[_ngcontent-%COMP%] .mat-button-toggle-checked[_ngcontent-%COMP%]{color:#666}.security-option-card[_ngcontent-%COMP%] .toggle-container[_ngcontent-%COMP%] .access-toggle-group[_ngcontent-%COMP%] .mat-button-toggle[_ngcontent-%COMP%]{background-color:#eee;font-size:12px;padding:6px 12px;width:100%;border-radius:6px;transition:all .2s ease}@media (max-width: 768px){.security-option-card[_ngcontent-%COMP%] .toggle-container[_ngcontent-%COMP%] .access-toggle-group[_ngcontent-%COMP%] .mat-button-toggle[_ngcontent-%COMP%]{width:150px}}.security-option-card[_ngcontent-%COMP%] .toggle-container[_ngcontent-%COMP%] .access-toggle-group[_ngcontent-%COMP%] .mat-button-toggle.mat-button-toggle-disabled[_ngcontent-%COMP%]{opacity:.5;pointer-events:none;background-color:#f5f5f5;color:#999;border-color:#ddd}.security-option-card[_ngcontent-%COMP%] .toggle-container[_ngcontent-%COMP%] .access-toggle-group[_ngcontent-%COMP%] .mat-button-toggle[_ngcontent-%COMP%] .toggle-icon[_ngcontent-%COMP%]{margin-right:4px;font-size:14px}.security-option-card[_ngcontent-%COMP%] .toggle-container[_ngcontent-%COMP%] .access-toggle-group[_ngcontent-%COMP%] .mat-button-toggle.read-toggle.mat-button-toggle-checked[_ngcontent-%COMP%]{background-color:#2196f3;color:#fff}.security-option-card[_ngcontent-%COMP%] .toggle-container[_ngcontent-%COMP%] .access-toggle-group[_ngcontent-%COMP%] .mat-button-toggle.write-toggle.mat-button-toggle-checked[_ngcontent-%COMP%]{background-color:#fbc02d;color:#fff}.security-option-card[_ngcontent-%COMP%] .toggle-container[_ngcontent-%COMP%] .access-toggle-group[_ngcontent-%COMP%] .mat-button-toggle.full-toggle.mat-button-toggle-checked[_ngcontent-%COMP%]{background-color:#43a047;color:#fff}.action-buttons[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:12px;margin-top:24px;padding-top:16px;border-top:1px solid #e0e0e0}"]})}}return n})();var _t=g(20271),se=g(84246),La=g(83801),nn=g(31933),Ua=g(67261);let gt=class Bt{constructor(a,t,o,i,r){this.dialog=a,this.fileService=t,this.cacheService=o,this.baseService=i,this.themeService=r,this.storageServices=[],this.checked=!1,this.isDarkMode=this.themeService.darkMode$,this.baseService.getAll({additionalParams:[{key:"group",value:"source control,file"}]}).subscribe(c=>{this.storageServices=c.services})}ngOnInit(){this.content.setValue(this.contentText)}fileUpload(a){const t=a.target;t.files&&(0,nn.Sj)(t.files[0]).subscribe(o=>{this.content.setValue(o)})}githubImport(){this.dialog.open(Ua.z).afterClosed().subscribe(t=>{t&&this.content.setValue(window.atob(t.data.content))})}static{this.\u0275fac=function(t){return new(t||Bt)(e.rXU(h.bZ),e.rXU(U.qJ),e.rXU(U.j8),e.rXU(U.qJ),e.rXU(Ue.n))}}static{this.\u0275cmp=e.VBU({type:Bt,selectors:[["df-file-github"]],inputs:{cache:"cache",type:"type",contentText:"contentText",content:"content"},standalone:!0,features:[e.aNF],decls:11,vars:8,consts:[[1,"details-section"],[1,"actions","full-width"],["type","file",2,"display","none",3,"accept","change"],["fileInput",""],["type","button","mat-flat-button","",1,"save-btn",3,"click"],[1,"full-width",3,"formControl","mode"]],template:function(t,o){if(1&t){const i=e.RV6();e.j41(0,"div",0)(1,"div",1)(2,"input",2,3),e.bIt("change",function(c){return o.fileUpload(c)}),e.k0s(),e.j41(4,"button",4),e.bIt("click",function(){e.eBV(i);const c=e.sdS(3);return e.Njj(c.click())}),e.EFF(5),e.nI1(6,"transloco"),e.k0s(),e.j41(7,"button",4),e.bIt("click",function(){return o.githubImport()}),e.EFF(8),e.nI1(9,"transloco"),e.k0s()(),e.nrm(10,"df-ace-editor",5),e.k0s()}2&t&&(e.R7$(5),e.SpI(" ",e.bMT(6,4,"desktopFile")," "),e.R7$(3),e.SpI(" ",e.bMT(9,6,"githubFile")," "),e.R7$(2),e.Y8G("formControl",o.content)("mode",o.type.getRawValue()))},dependencies:[u.Hl,u.$z,D.Kj,O.RG,G.Ve,j.g7,m.YN,m.BC,h.hM,E.fS,Qt.s,m.X1,m.l_],styles:[".actions[_ngcontent-%COMP%]{display:flex;gap:16px}"]})}};gt=(0,re.Cg)([(0,H.d)({checkProperties:!0})],gt);var qa=g(40426),K=g(48444),Re=g(17612),Ka=g(58359),ae=g(87621),ft=g(86953),on=g(83607),ut=g(10165),Ie=g(8275),ht=g(25150),Ja=g(29094);function Ha(n,a){1&n&&e.SdG(0)}const Wa=["*"];let an=(()=>{class n{constructor(t){this._elementRef=t}focus(){this._elementRef.nativeElement.focus()}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(e.aKT))}}static{this.\u0275dir=e.FsC({type:n,selectors:[["","cdkStepHeader",""]],hostAttrs:["role","tab"]})}}return n})(),rn=(()=>{class n{constructor(t){this.template=t}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(e.C4Q))}}static{this.\u0275dir=e.FsC({type:n,selectors:[["","cdkStepLabel",""]]})}}return n})(),Qa=0;const cn=new e.nKC("STEPPER_GLOBAL_OPTIONS");let bt=(()=>{class n{get editable(){return this._editable}set editable(t){this._editable=(0,Ie.he)(t)}get optional(){return this._optional}set optional(t){this._optional=(0,Ie.he)(t)}get completed(){return null==this._completedOverride?this._getDefaultCompleted():this._completedOverride}set completed(t){this._completedOverride=(0,Ie.he)(t)}_getDefaultCompleted(){return this.stepControl?this.stepControl.valid&&this.interacted:this.interacted}get hasError(){return null==this._customError?this._getDefaultError():this._customError}set hasError(t){this._customError=(0,Ie.he)(t)}_getDefaultError(){return this.stepControl&&this.stepControl.invalid&&this.interacted}constructor(t,o){this._stepper=t,this.interacted=!1,this.interactedStream=new e.bkB,this._editable=!0,this._optional=!1,this._completedOverride=null,this._customError=null,this._stepperOptions=o||{},this._displayDefaultIndicatorType=!1!==this._stepperOptions.displayDefaultIndicatorType}select(){this._stepper.selected=this}reset(){this.interacted=!1,null!=this._completedOverride&&(this._completedOverride=!1),null!=this._customError&&(this._customError=!1),this.stepControl&&this.stepControl.reset()}ngOnChanges(){this._stepper._stateChanged()}_markAsInteracted(){this.interacted||(this.interacted=!0,this.interactedStream.emit(this))}_showError(){return this._stepperOptions.showError??null!=this._customError}static{this.\u0275fac=function(o){return new(o||n)(e.rXU((0,e.Rfq)(()=>Ae)),e.rXU(cn,8))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["cdk-step"]],contentQueries:function(o,i,r){if(1&o&&e.wni(r,rn,5),2&o){let c;e.mGM(c=e.lsd())&&(i.stepLabel=c.first)}},viewQuery:function(o,i){if(1&o&&e.GBs(e.C4Q,7),2&o){let r;e.mGM(r=e.lsd())&&(i.content=r.first)}},inputs:{stepControl:"stepControl",label:"label",errorMessage:"errorMessage",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],state:"state",editable:"editable",optional:"optional",completed:"completed",hasError:"hasError"},outputs:{interactedStream:"interacted"},exportAs:["cdkStep"],features:[e.OA$],ngContentSelectors:Wa,decls:1,vars:0,template:function(o,i){1&o&&(e.NAR(),e.DNE(0,Ha,1,0,"ng-template"))},encapsulation:2,changeDetection:0})}}return n})(),Ae=(()=>{class n{get linear(){return this._linear}set linear(t){this._linear=(0,Ie.he)(t)}get selectedIndex(){return this._selectedIndex}set selectedIndex(t){const o=(0,Ie.OE)(t);this.steps&&this._steps?(this._isValidIndex(o),this.selected?._markAsInteracted(),this._selectedIndex!==o&&!this._anyControlsInvalidOrPending(o)&&(o>=this._selectedIndex||this.steps.toArray()[o].editable)&&this._updateSelectedItemIndex(o)):this._selectedIndex=o}get selected(){return this.steps?this.steps.toArray()[this.selectedIndex]:void 0}set selected(t){this.selectedIndex=t&&this.steps?this.steps.toArray().indexOf(t):-1}get orientation(){return this._orientation}set orientation(t){this._orientation=t,this._keyManager&&this._keyManager.withVerticalOrientation("vertical"===t)}constructor(t,o,i){this._dir=t,this._changeDetectorRef=o,this._elementRef=i,this._destroyed=new xe.B,this.steps=new e.rOR,this._sortedHeaders=new e.rOR,this._linear=!1,this._selectedIndex=0,this.selectionChange=new e.bkB,this.selectedIndexChange=new e.bkB,this._orientation="horizontal",this._groupId=Qa++}ngAfterContentInit(){this._steps.changes.pipe((0,Ge.Z)(this._steps),(0,he.Q)(this._destroyed)).subscribe(t=>{this.steps.reset(t.filter(o=>o._stepper===this)),this.steps.notifyOnChanges()})}ngAfterViewInit(){this._stepHeader.changes.pipe((0,Ge.Z)(this._stepHeader),(0,he.Q)(this._destroyed)).subscribe(t=>{this._sortedHeaders.reset(t.toArray().sort((o,i)=>o._elementRef.nativeElement.compareDocumentPosition(i._elementRef.nativeElement)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)),this._sortedHeaders.notifyOnChanges()}),this._keyManager=new on.Bu(this._sortedHeaders).withWrap().withHomeAndEnd().withVerticalOrientation("vertical"===this._orientation),(this._dir?this._dir.change:(0,L.of)()).pipe((0,Ge.Z)(this._layoutDirection()),(0,he.Q)(this._destroyed)).subscribe(t=>this._keyManager.withHorizontalOrientation(t)),this._keyManager.updateActiveItem(this._selectedIndex),this.steps.changes.subscribe(()=>{this.selected||(this._selectedIndex=Math.max(this._selectedIndex-1,0))}),this._isValidIndex(this._selectedIndex)||(this._selectedIndex=0)}ngOnDestroy(){this._keyManager?.destroy(),this.steps.destroy(),this._sortedHeaders.destroy(),this._destroyed.next(),this._destroyed.complete()}next(){this.selectedIndex=Math.min(this._selectedIndex+1,this.steps.length-1)}previous(){this.selectedIndex=Math.max(this._selectedIndex-1,0)}reset(){this._updateSelectedItemIndex(0),this.steps.forEach(t=>t.reset()),this._stateChanged()}_getStepLabelId(t){return`cdk-step-label-${this._groupId}-${t}`}_getStepContentId(t){return`cdk-step-content-${this._groupId}-${t}`}_stateChanged(){this._changeDetectorRef.markForCheck()}_getAnimationDirection(t){const o=t-this._selectedIndex;return o<0?"rtl"===this._layoutDirection()?"next":"previous":o>0?"rtl"===this._layoutDirection()?"previous":"next":"current"}_getIndicatorType(t,o="number"){const i=this.steps.toArray()[t],r=this._isCurrentStep(t);return i._displayDefaultIndicatorType?this._getDefaultIndicatorLogic(i,r):this._getGuidelineLogic(i,r,o)}_getDefaultIndicatorLogic(t,o){return t._showError()&&t.hasError&&!o?"error":!t.completed||o?"number":t.editable?"edit":"done"}_getGuidelineLogic(t,o,i="number"){return t._showError()&&t.hasError&&!o?"error":t.completed&&!o?"done":t.completed&&o?i:t.editable&&o?"edit":i}_isCurrentStep(t){return this._selectedIndex===t}_getFocusIndex(){return this._keyManager?this._keyManager.activeItemIndex:this._selectedIndex}_updateSelectedItemIndex(t){const o=this.steps.toArray();this.selectionChange.emit({selectedIndex:t,previouslySelectedIndex:this._selectedIndex,selectedStep:o[t],previouslySelectedStep:o[this._selectedIndex]}),this._containsFocus()?this._keyManager.setActiveItem(t):this._keyManager.updateActiveItem(t),this._selectedIndex=t,this.selectedIndexChange.emit(this._selectedIndex),this._stateChanged()}_onKeydown(t){const o=(0,ht.rp)(t),i=t.keyCode,r=this._keyManager;null==r.activeItemIndex||o||i!==ht.t6&&i!==ht.Fm?r.setFocusOrigin("keyboard").onKeydown(t):(this.selectedIndex=r.activeItemIndex,t.preventDefault())}_anyControlsInvalidOrPending(t){return!!(this._linear&&t>=0)&&this.steps.toArray().slice(0,t).some(o=>{const i=o.stepControl;return(i?i.invalid||i.pending||!o.interacted:!o.completed)&&!o.optional&&!o._completedOverride})}_layoutDirection(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}_containsFocus(){const t=this._elementRef.nativeElement,o=(0,Ja.vc)();return t===o||t.contains(o)}_isValidIndex(t){return t>-1&&(!this.steps||t{class n{constructor(t){this._stepper=t,this.type="submit"}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(Ae))}}static{this.\u0275dir=e.FsC({type:n,selectors:[["button","cdkStepperNext",""]],hostVars:1,hostBindings:function(o,i){1&o&&e.bIt("click",function(){return i._stepper.next()}),2&o&&e.Mr5("type",i.type)},inputs:{type:"type"}})}}return n})(),er=(()=>{class n{constructor(t){this._stepper=t,this.type="button"}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(Ae))}}static{this.\u0275dir=e.FsC({type:n,selectors:[["button","cdkStepperPrevious",""]],hostVars:1,hostBindings:function(o,i){1&o&&e.bIt("click",function(){return i._stepper.previous()}),2&o&&e.Mr5("type",i.type)},inputs:{type:"type"}})}}return n})(),tr=(()=>{class n{static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275mod=e.$C({type:n})}static{this.\u0275inj=e.G2t({imports:[ut.jI]})}}return n})();var nr=g(52693),or=g(11224),I=g(89411);function ir(n,a){if(1&n&&e.eu8(0,8),2&n){const t=e.XpG();e.Y8G("ngTemplateOutlet",t.iconOverrides[t.state])("ngTemplateOutletContext",t._getIconContext())}}function ar(n,a){if(1&n&&(e.j41(0,"span",13),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.JRh(t._getDefaultTextForState(t.state))}}function rr(n,a){if(1&n&&(e.j41(0,"span",14),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.JRh(t._intl.completedLabel)}}function cr(n,a){if(1&n&&(e.j41(0,"span",14),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.JRh(t._intl.editableLabel)}}function sr(n,a){if(1&n&&(e.j41(0,"mat-icon",13),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.JRh(t._getDefaultTextForState(t.state))}}function lr(n,a){if(1&n&&(e.qex(0,9),e.DNE(1,ar,2,1,"span",10),e.DNE(2,rr,2,1,"span",11),e.DNE(3,cr,2,1,"span",11),e.DNE(4,sr,2,1,"mat-icon",12),e.bVm()),2&n){const t=e.XpG();e.Y8G("ngSwitch",t.state),e.R7$(1),e.Y8G("ngSwitchCase","number"),e.R7$(1),e.Y8G("ngIf","done"===t.state),e.R7$(1),e.Y8G("ngIf","edit"===t.state)}}function dr(n,a){if(1&n&&(e.j41(0,"div",15),e.eu8(1,16),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.Y8G("ngTemplateOutlet",t._templateLabel().template)}}function pr(n,a){if(1&n&&(e.j41(0,"div",15),e.EFF(1),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.JRh(t.label)}}function mr(n,a){if(1&n&&(e.j41(0,"div",17),e.EFF(1),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.JRh(t._intl.optionalLabel)}}function _r(n,a){if(1&n&&(e.j41(0,"div",18),e.EFF(1),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.JRh(t.errorMessage)}}function gr(n,a){}function fr(n,a){if(1&n&&(e.SdG(0),e.DNE(1,gr,0,0,"ng-template",0)),2&n){const t=e.XpG();e.R7$(1),e.Y8G("cdkPortalOutlet",t._portal)}}const ur=["*"];function hr(n,a){1&n&&e.nrm(0,"div",11)}const sn=function(n,a){return{step:n,i:a}};function br(n,a){if(1&n&&(e.qex(0),e.eu8(1,9),e.DNE(2,hr,1,0,"div",10),e.bVm()),2&n){const t=a.$implicit,o=a.index,i=a.last;e.XpG(2);const r=e.sdS(4);e.R7$(1),e.Y8G("ngTemplateOutlet",r)("ngTemplateOutletContext",e.l_i(3,sn,t,o)),e.R7$(1),e.Y8G("ngIf",!i)}}const ln=function(n){return{animationDuration:n}},dn=function(n,a){return{value:n,params:a}};function vr(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",12),e.bIt("@horizontalStepTransition.done",function(i){e.eBV(t);const r=e.XpG(2);return e.Njj(r._animationDone.next(i))}),e.eu8(1,13),e.k0s()}if(2&n){const t=a.$implicit,o=a.index,i=e.XpG(2);e.AVh("mat-horizontal-stepper-content-inactive",i.selectedIndex!==o),e.Y8G("@horizontalStepTransition",e.l_i(8,dn,i._getAnimationDirection(o),e.eq3(6,ln,i._getAnimationDuration())))("id",i._getStepContentId(o)),e.BMQ("aria-labelledby",i._getStepLabelId(o)),e.R7$(1),e.Y8G("ngTemplateOutlet",t.content)}}function xr(n,a){if(1&n&&(e.j41(0,"div",4)(1,"div",5),e.DNE(2,br,3,6,"ng-container",6),e.k0s(),e.j41(3,"div",7),e.DNE(4,vr,2,11,"div",8),e.k0s()()),2&n){const t=e.XpG();e.R7$(2),e.Y8G("ngForOf",t.steps),e.R7$(2),e.Y8G("ngForOf",t.steps)}}function Cr(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",15),e.eu8(1,9),e.j41(2,"div",16)(3,"div",17),e.bIt("@verticalStepTransition.done",function(i){e.eBV(t);const r=e.XpG(2);return e.Njj(r._animationDone.next(i))}),e.j41(4,"div",18),e.eu8(5,13),e.k0s()()()()}if(2&n){const t=a.$implicit,o=a.index,i=a.last,r=e.XpG(2),c=e.sdS(4);e.R7$(1),e.Y8G("ngTemplateOutlet",c)("ngTemplateOutletContext",e.l_i(10,sn,t,o)),e.R7$(1),e.AVh("mat-stepper-vertical-line",!i),e.R7$(1),e.AVh("mat-vertical-stepper-content-inactive",r.selectedIndex!==o),e.Y8G("@verticalStepTransition",e.l_i(15,dn,r._getAnimationDirection(o),e.eq3(13,ln,r._getAnimationDuration())))("id",r._getStepContentId(o)),e.BMQ("aria-labelledby",r._getStepLabelId(o)),e.R7$(2),e.Y8G("ngTemplateOutlet",t.content)}}function kr(n,a){if(1&n&&(e.qex(0),e.DNE(1,Cr,6,18,"div",14),e.bVm()),2&n){const t=e.XpG();e.R7$(1),e.Y8G("ngForOf",t.steps)}}function yr(n,a){if(1&n){const t=e.RV6();e.j41(0,"mat-step-header",19),e.bIt("click",function(){const r=e.eBV(t).step;return e.Njj(r.select())})("keydown",function(i){e.eBV(t);const r=e.XpG();return e.Njj(r._onKeydown(i))}),e.k0s()}if(2&n){const t=a.step,o=a.i,i=e.XpG();e.AVh("mat-horizontal-stepper-header","horizontal"===i.orientation)("mat-vertical-stepper-header","vertical"===i.orientation),e.Y8G("tabIndex",i._getFocusIndex()===o?0:-1)("id",i._getStepLabelId(o))("index",o)("state",i._getIndicatorType(o,t.state))("label",t.stepLabel||t.label)("selected",i.selectedIndex===o)("active",i._stepIsNavigable(o,t))("optional",t.optional)("errorMessage",t.errorMessage)("iconOverrides",i._iconOverrides)("disableRipple",i.disableRipple||!i._stepIsNavigable(o,t))("color",t.color||i.color),e.BMQ("aria-posinset",o+1)("aria-setsize",i.steps.length)("aria-controls",i._getStepContentId(o))("aria-selected",i.selectedIndex==o)("aria-label",t.ariaLabel||null)("aria-labelledby",!t.ariaLabel&&t.ariaLabelledby?t.ariaLabelledby:null)("aria-disabled",!i._stepIsNavigable(o,t)||null)}}let Ke=(()=>{class n extends rn{static{this.\u0275fac=function(){let t;return function(i){return(t||(t=e.xGo(n)))(i||n)}}()}static{this.\u0275dir=e.FsC({type:n,selectors:[["","matStepLabel",""]],features:[e.Vt3]})}}return n})(),Je=(()=>{class n{constructor(){this.changes=new xe.B,this.optionalLabel="Optional",this.completedLabel="Completed",this.editableLabel="Editable"}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275prov=e.jDH({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();const Or={provide:Je,deps:[[new e.Xx1,new e.kdw,Je]],useFactory:function Mr(n){return n||new Je}},Pr=(0,q.Zc)(class extends an{constructor(a){super(a)}},"primary");let pn=(()=>{class n extends Pr{constructor(t,o,i,r){super(i),this._intl=t,this._focusMonitor=o,this._intlSubscription=t.changes.subscribe(()=>r.markForCheck())}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){this._intlSubscription.unsubscribe(),this._focusMonitor.stopMonitoring(this._elementRef)}focus(t,o){t?this._focusMonitor.focusVia(this._elementRef,t,o):this._elementRef.nativeElement.focus(o)}_stringLabel(){return this.label instanceof Ke?null:this.label}_templateLabel(){return this.label instanceof Ke?this.label:null}_getHostElement(){return this._elementRef.nativeElement}_getIconContext(){return{index:this.index,active:this.active,optional:this.optional}}_getDefaultTextForState(t){return"number"==t?`${this.index+1}`:"edit"==t?"create":"error"==t?"warning":t}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(Je),e.rXU(on.FN),e.rXU(e.aKT),e.rXU(e.gRc))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["mat-step-header"]],hostAttrs:["role","tab",1,"mat-step-header"],inputs:{color:"color",state:"state",label:"label",errorMessage:"errorMessage",iconOverrides:"iconOverrides",index:"index",selected:"selected",active:"active",optional:"optional",disableRipple:"disableRipple"},features:[e.Vt3],decls:10,vars:19,consts:[["matRipple","",1,"mat-step-header-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled"],[1,"mat-step-icon-content",3,"ngSwitch"],[3,"ngTemplateOutlet","ngTemplateOutletContext",4,"ngSwitchCase"],[3,"ngSwitch",4,"ngSwitchDefault"],[1,"mat-step-label"],["class","mat-step-text-label",4,"ngIf"],["class","mat-step-optional",4,"ngIf"],["class","mat-step-sub-label-error",4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"ngSwitch"],["aria-hidden","true",4,"ngSwitchCase"],["class","cdk-visually-hidden",4,"ngIf"],["aria-hidden","true",4,"ngSwitchDefault"],["aria-hidden","true"],[1,"cdk-visually-hidden"],[1,"mat-step-text-label"],[3,"ngTemplateOutlet"],[1,"mat-step-optional"],[1,"mat-step-sub-label-error"]],template:function(o,i){1&o&&(e.nrm(0,"div",0),e.j41(1,"div")(2,"div",1),e.DNE(3,ir,1,2,"ng-container",2),e.DNE(4,lr,5,4,"ng-container",3),e.k0s()(),e.j41(5,"div",4),e.DNE(6,dr,2,1,"div",5),e.DNE(7,pr,2,1,"div",5),e.DNE(8,mr,2,1,"div",6),e.DNE(9,_r,2,1,"div",7),e.k0s()),2&o&&(e.Y8G("matRippleTrigger",i._getHostElement())("matRippleDisabled",i.disableRipple),e.R7$(1),e.ZvI("mat-step-icon-state-",i.state," mat-step-icon"),e.AVh("mat-step-icon-selected",i.selected),e.R7$(1),e.Y8G("ngSwitch",!(!i.iconOverrides||!i.iconOverrides[i.state])),e.R7$(1),e.Y8G("ngSwitchCase",!0),e.R7$(2),e.AVh("mat-step-label-active",i.active)("mat-step-label-selected",i.selected)("mat-step-label-error","error"==i.state),e.R7$(1),e.Y8G("ngIf",i._templateLabel()),e.R7$(1),e.Y8G("ngIf",i._stringLabel()),e.R7$(1),e.Y8G("ngIf",i.optional&&"error"!=i.state),e.R7$(1),e.Y8G("ngIf","error"==i.state))},dependencies:[d.bT,d.T3,d.ux,d.e1,d.fG,Z.An,q.r6],styles:['.mat-step-header{overflow:hidden;outline:none;cursor:pointer;position:relative;box-sizing:content-box;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-step-header:focus .mat-focus-indicator::before{content:""}.mat-step-header:hover[aria-disabled=true]{cursor:default}.mat-step-header:hover:not([aria-disabled]),.mat-step-header:hover[aria-disabled=false]{background-color:var(--mat-stepper-header-hover-state-layer-color)}.mat-step-header.cdk-keyboard-focused,.mat-step-header.cdk-program-focused{background-color:var(--mat-stepper-header-focus-state-layer-color)}@media(hover: none){.mat-step-header:hover{background:none}}.cdk-high-contrast-active .mat-step-header{outline:solid 1px}.cdk-high-contrast-active .mat-step-header[aria-selected=true] .mat-step-label{text-decoration:underline}.cdk-high-contrast-active .mat-step-header[aria-disabled=true]{outline-color:GrayText}.cdk-high-contrast-active .mat-step-header[aria-disabled=true] .mat-step-label,.cdk-high-contrast-active .mat-step-header[aria-disabled=true] .mat-step-icon,.cdk-high-contrast-active .mat-step-header[aria-disabled=true] .mat-step-optional{color:GrayText}.mat-step-optional{font-size:12px;color:var(--mat-stepper-header-optional-label-text-color)}.mat-step-sub-label-error{font-size:12px;font-weight:normal}.mat-step-icon{border-radius:50%;height:24px;width:24px;flex-shrink:0;position:relative;color:var(--mat-stepper-header-icon-foreground-color);background-color:var(--mat-stepper-header-icon-background-color)}.mat-step-icon-content{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);display:flex}.mat-step-icon .mat-icon{font-size:16px;height:16px;width:16px}.mat-step-icon-state-error{background-color:var(--mat-stepper-header-error-state-icon-background-color);color:var(--mat-stepper-header-error-state-icon-foreground-color)}.mat-step-icon-state-error .mat-icon{font-size:24px;height:24px;width:24px}.mat-step-label{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:50px;vertical-align:middle;font-family:var(--mat-stepper-header-label-text-font);font-size:var(--mat-stepper-header-label-text-size);font-weight:var(--mat-stepper-header-label-text-weight);color:var(--mat-stepper-header-label-text-color)}.mat-step-label.mat-step-label-active{color:var(--mat-stepper-header-selected-state-label-text-color)}.mat-step-label.mat-step-label-error{color:var(--mat-stepper-header-error-state-label-text-color);font-size:var(--mat-stepper-header-error-state-label-text-size)}.mat-step-label.mat-step-label-selected{font-size:var(--mat-stepper-header-selected-state-label-text-size);font-weight:var(--mat-stepper-header-selected-state-label-text-weight)}.mat-step-text-label{text-overflow:ellipsis;overflow:hidden}.mat-step-header .mat-step-header-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-step-icon-selected{background-color:var(--mat-stepper-header-selected-state-icon-background-color);color:var(--mat-stepper-header-selected-state-icon-foreground-color)}.mat-step-icon-state-done{background-color:var(--mat-stepper-header-done-state-icon-background-color);color:var(--mat-stepper-header-done-state-icon-foreground-color)}.mat-step-icon-state-edit{background-color:var(--mat-stepper-header-edit-state-icon-background-color);color:var(--mat-stepper-header-edit-state-icon-foreground-color)}'],encapsulation:2,changeDetection:0})}}return n})();const gn={horizontalStepTransition:(0,I.hZ)("horizontalStepTransition",[(0,I.wk)("previous",(0,I.iF)({transform:"translate3d(-100%, 0, 0)",visibility:"hidden"})),(0,I.wk)("current",(0,I.iF)({transform:"none",visibility:"inherit"})),(0,I.wk)("next",(0,I.iF)({transform:"translate3d(100%, 0, 0)",visibility:"hidden"})),(0,I.kY)("* => *",(0,I.Os)([(0,I.i0)("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)"),(0,I.P)("@*",(0,I.MA)(),{optional:!0})]),{params:{animationDuration:"500ms"}})]),verticalStepTransition:(0,I.hZ)("verticalStepTransition",[(0,I.wk)("previous",(0,I.iF)({height:"0px",visibility:"hidden"})),(0,I.wk)("next",(0,I.iF)({height:"0px",visibility:"hidden"})),(0,I.wk)("current",(0,I.iF)({height:"*",visibility:"inherit"})),(0,I.kY)("* <=> current",(0,I.Os)([(0,I.i0)("{{animationDuration}} cubic-bezier(0.4, 0.0, 0.2, 1)"),(0,I.P)("@*",(0,I.MA)(),{optional:!0})]),{params:{animationDuration:"225ms"}})])};let fn=(()=>{class n{constructor(t){this.templateRef=t}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(e.C4Q))}}static{this.\u0275dir=e.FsC({type:n,selectors:[["ng-template","matStepperIcon",""]],inputs:{name:["matStepperIcon","name"]}})}}return n})(),Fr=(()=>{class n{constructor(t){this._template=t}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(e.C4Q))}}static{this.\u0275dir=e.FsC({type:n,selectors:[["ng-template","matStepContent",""]]})}}return n})(),un=(()=>{class n extends bt{constructor(t,o,i,r){super(t,r),this._errorStateMatcher=o,this._viewContainerRef=i,this._isSelected=nr.yU.EMPTY,this.stepLabel=void 0}ngAfterContentInit(){this._isSelected=this._stepper.steps.changes.pipe((0,Ce.n)(()=>this._stepper.selectionChange.pipe((0,z.T)(t=>t.selectedStep===this),(0,Ge.Z)(this._stepper.selected===this)))).subscribe(t=>{t&&this._lazyContent&&!this._portal&&(this._portal=new ft.VA(this._lazyContent._template,this._viewContainerRef))})}ngOnDestroy(){this._isSelected.unsubscribe()}isErrorState(t,o){return this._errorStateMatcher.isErrorState(t,o)||!!(t&&t.invalid&&this.interacted)}static{this.\u0275fac=function(o){return new(o||n)(e.rXU((0,e.Rfq)(()=>hn)),e.rXU(q.es,4),e.rXU(e.c1b),e.rXU(cn,8))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["mat-step"]],contentQueries:function(o,i,r){if(1&o&&(e.wni(r,Ke,5),e.wni(r,Fr,5)),2&o){let c;e.mGM(c=e.lsd())&&(i.stepLabel=c.first),e.mGM(c=e.lsd())&&(i._lazyContent=c.first)}},inputs:{color:"color"},exportAs:["matStep"],features:[e.Jv_([{provide:q.es,useExisting:n},{provide:bt,useExisting:n}]),e.Vt3],ngContentSelectors:ur,decls:1,vars:0,consts:[[3,"cdkPortalOutlet"]],template:function(o,i){1&o&&(e.NAR(),e.DNE(0,fr,2,1,"ng-template"))},dependencies:[ft.I3],encapsulation:2,changeDetection:0})}}return n})(),hn=(()=>{class n extends Ae{get animationDuration(){return this._animationDuration}set animationDuration(t){this._animationDuration=/^\d+$/.test(t)?t+"ms":t}constructor(t,o,i){super(t,o,i),this._stepHeader=void 0,this._steps=void 0,this.steps=new e.rOR,this.animationDone=new e.bkB,this.labelPosition="end",this.headerPosition="top",this._iconOverrides={},this._animationDone=new xe.B,this._animationDuration="";const r=i.nativeElement.nodeName.toLowerCase();this.orientation="mat-vertical-stepper"===r?"vertical":"horizontal"}ngAfterContentInit(){super.ngAfterContentInit(),this._icons.forEach(({name:t,templateRef:o})=>this._iconOverrides[t]=o),this.steps.changes.pipe((0,he.Q)(this._destroyed)).subscribe(()=>{this._stateChanged()}),this._animationDone.pipe((0,or.F)((t,o)=>t.fromState===o.fromState&&t.toState===o.toState),(0,he.Q)(this._destroyed)).subscribe(t=>{"current"===t.toState&&this.animationDone.emit()})}_stepIsNavigable(t,o){return o.completed||this.selectedIndex===t||!this.linear}_getAnimationDuration(){return this.animationDuration?this.animationDuration:"horizontal"===this.orientation?"500ms":"225ms"}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(ut.dS,8),e.rXU(e.gRc),e.rXU(e.aKT))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["mat-stepper"],["mat-vertical-stepper"],["mat-horizontal-stepper"],["","matStepper",""]],contentQueries:function(o,i,r){if(1&o&&(e.wni(r,un,5),e.wni(r,fn,5)),2&o){let c;e.mGM(c=e.lsd())&&(i._steps=c),e.mGM(c=e.lsd())&&(i._icons=c)}},viewQuery:function(o,i){if(1&o&&e.GBs(pn,5),2&o){let r;e.mGM(r=e.lsd())&&(i._stepHeader=r)}},hostAttrs:["role","tablist","ngSkipHydration",""],hostVars:11,hostBindings:function(o,i){2&o&&(e.BMQ("aria-orientation",i.orientation),e.AVh("mat-stepper-horizontal","horizontal"===i.orientation)("mat-stepper-vertical","vertical"===i.orientation)("mat-stepper-label-position-end","horizontal"===i.orientation&&"end"==i.labelPosition)("mat-stepper-label-position-bottom","horizontal"===i.orientation&&"bottom"==i.labelPosition)("mat-stepper-header-position-bottom","bottom"===i.headerPosition))},inputs:{selectedIndex:"selectedIndex",disableRipple:"disableRipple",color:"color",labelPosition:"labelPosition",headerPosition:"headerPosition",animationDuration:"animationDuration"},outputs:{animationDone:"animationDone"},exportAs:["matStepper","matVerticalStepper","matHorizontalStepper"],features:[e.Jv_([{provide:Ae,useExisting:n}]),e.Vt3],decls:5,vars:3,consts:[[3,"ngSwitch"],["class","mat-horizontal-stepper-wrapper",4,"ngSwitchCase"],[4,"ngSwitchCase"],["stepTemplate",""],[1,"mat-horizontal-stepper-wrapper"],[1,"mat-horizontal-stepper-header-container"],[4,"ngFor","ngForOf"],[1,"mat-horizontal-content-container"],["class","mat-horizontal-stepper-content","role","tabpanel",3,"id","mat-horizontal-stepper-content-inactive",4,"ngFor","ngForOf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["class","mat-stepper-horizontal-line",4,"ngIf"],[1,"mat-stepper-horizontal-line"],["role","tabpanel",1,"mat-horizontal-stepper-content",3,"id"],[3,"ngTemplateOutlet"],["class","mat-step",4,"ngFor","ngForOf"],[1,"mat-step"],[1,"mat-vertical-content-container"],["role","tabpanel",1,"mat-vertical-stepper-content",3,"id"],[1,"mat-vertical-content"],[3,"tabIndex","id","index","state","label","selected","active","optional","errorMessage","iconOverrides","disableRipple","color","click","keydown"]],template:function(o,i){1&o&&(e.qex(0,0),e.DNE(1,xr,5,2,"div",1),e.DNE(2,kr,2,1,"ng-container",2),e.bVm(),e.DNE(3,yr,1,23,"ng-template",null,3,e.C5r)),2&o&&(e.Y8G("ngSwitch",i.orientation),e.R7$(1),e.Y8G("ngSwitchCase","horizontal"),e.R7$(1),e.Y8G("ngSwitchCase","vertical"))},dependencies:[d.Sq,d.bT,d.T3,d.ux,d.e1,pn],styles:['.mat-stepper-vertical,.mat-stepper-horizontal{display:block;font-family:var(--mat-stepper-container-text-font);background:var(--mat-stepper-container-color)}.mat-horizontal-stepper-header-container{white-space:nowrap;display:flex;align-items:center}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header-container{align-items:flex-start}.mat-stepper-header-position-bottom .mat-horizontal-stepper-header-container{order:1}.mat-stepper-horizontal-line{border-top-width:1px;border-top-style:solid;flex:auto;height:0;margin:0 -16px;min-width:32px;border-top-color:var(--mat-stepper-line-color)}.mat-stepper-label-position-bottom .mat-stepper-horizontal-line{margin:0;min-width:0;position:relative;top:calc(calc((var(--mat-stepper-header-height) - 24px) / 2) + 12px)}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::before,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::before,.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::after,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::after{border-top-width:1px;border-top-style:solid;content:"";display:inline-block;height:0;position:absolute;width:calc(50% - 20px)}.mat-horizontal-stepper-header{display:flex;height:72px;overflow:hidden;align-items:center;padding:0 24px;height:var(--mat-stepper-header-height)}.mat-horizontal-stepper-header .mat-step-icon{margin-right:8px;flex:none}[dir=rtl] .mat-horizontal-stepper-header .mat-step-icon{margin-right:0;margin-left:8px}.mat-horizontal-stepper-header::before,.mat-horizontal-stepper-header::after{border-top-color:var(--mat-stepper-line-color)}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header{padding:calc((var(--mat-stepper-header-height) - 24px) / 2) 24px}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header::before,.mat-stepper-label-position-bottom .mat-horizontal-stepper-header::after{top:calc(calc((var(--mat-stepper-header-height) - 24px) / 2) + 12px)}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header{box-sizing:border-box;flex-direction:column;height:auto}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::after,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::after{right:0}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::before,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::before{left:0}[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:last-child::before,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:first-child::after{display:none}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header .mat-step-icon{margin-right:0;margin-left:0}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header .mat-step-label{padding:16px 0 0 0;text-align:center;width:100%}.mat-vertical-stepper-header{display:flex;align-items:center;height:24px;padding:calc((var(--mat-stepper-header-height) - 24px) / 2) 24px}.mat-vertical-stepper-header .mat-step-icon{margin-right:12px}[dir=rtl] .mat-vertical-stepper-header .mat-step-icon{margin-right:0;margin-left:12px}.mat-horizontal-stepper-wrapper{display:flex;flex-direction:column}.mat-horizontal-stepper-content{outline:0}.mat-horizontal-stepper-content.mat-horizontal-stepper-content-inactive{height:0;overflow:hidden}.mat-horizontal-stepper-content:not(.mat-horizontal-stepper-content-inactive){visibility:inherit !important}.mat-horizontal-content-container{overflow:hidden;padding:0 24px 24px 24px}.cdk-high-contrast-active .mat-horizontal-content-container{outline:solid 1px}.mat-stepper-header-position-bottom .mat-horizontal-content-container{padding:24px 24px 0 24px}.mat-vertical-content-container{margin-left:36px;border:0;position:relative}.cdk-high-contrast-active .mat-vertical-content-container{outline:solid 1px}[dir=rtl] .mat-vertical-content-container{margin-left:0;margin-right:36px}.mat-stepper-vertical-line::before{content:"";position:absolute;left:0;border-left-width:1px;border-left-style:solid;border-left-color:var(--mat-stepper-line-color);top:calc(8px - calc((var(--mat-stepper-header-height) - 24px) / 2));bottom:calc(8px - calc((var(--mat-stepper-header-height) - 24px) / 2))}[dir=rtl] .mat-stepper-vertical-line::before{left:auto;right:0}.mat-vertical-stepper-content{overflow:hidden;outline:0}.mat-vertical-stepper-content:not(.mat-vertical-stepper-content-inactive){visibility:inherit !important}.mat-vertical-content{padding:0 24px 24px 24px}.mat-step:last-child .mat-vertical-content-container{border:none}'],encapsulation:2,data:{animation:[gn.horizontalStepTransition,gn.verticalStepTransition]},changeDetection:0})}}return n})(),wr=(()=>{class n extends Za{static{this.\u0275fac=function(){let t;return function(i){return(t||(t=e.xGo(n)))(i||n)}}()}static{this.\u0275dir=e.FsC({type:n,selectors:[["button","matStepperNext",""]],hostAttrs:[1,"mat-stepper-next"],hostVars:1,hostBindings:function(o,i){2&o&&e.Mr5("type",i.type)},inputs:{type:"type"},features:[e.Vt3]})}}return n})(),Dr=(()=>{class n extends er{static{this.\u0275fac=function(){let t;return function(i){return(t||(t=e.xGo(n)))(i||n)}}()}static{this.\u0275dir=e.FsC({type:n,selectors:[["button","matStepperPrevious",""]],hostAttrs:[1,"mat-stepper-previous"],hostVars:1,hostBindings:function(o,i){2&o&&e.Mr5("type",i.type)},inputs:{type:"type"},features:[e.Vt3]})}}return n})(),Tr=(()=>{class n{static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275mod=e.$C({type:n})}static{this.\u0275inj=e.G2t({providers:[Or,q.es],imports:[q.yE,d.MD,ft.jc,tr,Z.m_,q.pZ,q.yE]})}}return n})();var J=g(58001),Sr=g(7967),bn=g(16396),Rr=g(35877);const Ir=["calendlyWidget"];let Er=(()=>{class n{constructor(t,o,i,r){this.userDataService=t,this.systemConfigService=o,this.dfPaywallService=i,this.data=r}ngOnInit(){const o=this.userDataService.userData?.email,i=this.systemConfigService?.environment?.client?.ipAddress;this.dfPaywallService.trackPaywallHit(o,i,this.data.serviceName)}ngAfterViewInit(){window.Calendly.initInlineWidget({url:"https://calendly.com/dreamfactory-platform/unlock-all-features",parentElement:this.calendlyWidget.nativeElement,autoLoad:!1})}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(Kt.T),e.rXU(bn.f),e.rXU(Rr.o),e.rXU(h.Vh))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-paywall-modal"]],viewQuery:function(o,i){if(1&o&&e.GBs(Ir,5),2&o){let r;e.mGM(r=e.lsd())&&(i.calendlyWidget=r.first)}},standalone:!0,features:[e.aNF],decls:39,vars:27,consts:[[1,"app-container",2,"padding","12px 20px"],["mat-dialog-title","",2,"text-align","center"],[1,"paywall-container"],[1,"details-section"],[1,"info-columns"],[1,"info-column"],[3,"innerHTML"],[1,"paywall-contact"],["href","tel:+1 415-993-5877"],["href","mailto:info@dreamfactory.com"],[1,"calendly-inline-widget"],["calendlyWidget",""]],template:function(o,i){1&o&&(e.j41(0,"div",0)(1,"h1",1),e.EFF(2,"Unlock Service"),e.k0s(),e.j41(3,"mat-dialog-content")(4,"div",2)(5,"h2"),e.EFF(6),e.nI1(7,"transloco"),e.k0s(),e.j41(8,"h2"),e.EFF(9),e.nI1(10,"transloco"),e.k0s(),e.j41(11,"div",3)(12,"div",4)(13,"div",5)(14,"h4"),e.EFF(15),e.nI1(16,"transloco"),e.k0s(),e.nrm(17,"p",6),e.nI1(18,"transloco"),e.k0s(),e.j41(19,"div",5)(20,"h4"),e.EFF(21),e.nI1(22,"transloco"),e.k0s(),e.j41(23,"p"),e.EFF(24),e.nI1(25,"transloco"),e.k0s()()()(),e.j41(26,"h2"),e.EFF(27),e.nI1(28,"transloco"),e.k0s()(),e.j41(29,"h3",7)(30,"a",8),e.EFF(31),e.nI1(32,"transloco"),e.k0s(),e.EFF(33," | "),e.j41(34,"a",9),e.EFF(35),e.nI1(36,"transloco"),e.k0s()(),e.nrm(37,"div",10,11),e.k0s()()),2&o&&(e.R7$(6),e.JRh(e.bMT(7,9,"paywall.header")),e.R7$(3),e.JRh(e.bMT(10,11,"paywall.subheader")),e.R7$(6),e.JRh(e.bMT(16,13,"paywall.hostedTrial")),e.R7$(2),e.Y8G("innerHTML",e.bMT(18,15,"paywall.bookTime"),e.npT),e.R7$(4),e.JRh(e.bMT(22,17,"paywall.learnMoreTitle")),e.R7$(3),e.JRh(e.bMT(25,19,"paywall.gain")),e.R7$(3),e.JRh(e.bMT(28,21,"paywall.speakToHuman")),e.R7$(4),e.SpI("",e.bMT(32,23,"phone"),": +1 415-993-5877"),e.R7$(4),e.SpI(" ",e.bMT(36,25,"email"),": info@dreamfactory.com "))},dependencies:[h.hM,h.BI,h.Yi,u.Hl,D.Kj]})}}return n})();var $r=g(81137),vt=g(17189),Gr=g(60875);function jr(n,a){if(1&n&&(e.j41(0,"span",29),e.EFF(1),e.k0s()),2&n){const t=e.XpG().$implicit;e.R7$(1),e.SpI(" \xb7 ",t.role,"")}}function Nr(n,a){if(1&n&&(e.j41(0,"mat-option",27),e.EFF(1),e.DNE(2,jr,2,1,"span",28),e.k0s()),2&n){const t=a.$implicit;e.Y8G("value",t.apiKey),e.R7$(1),e.SpI(" ",t.label,""),e.R7$(1),e.Y8G("ngIf",t.role)}}function Ar(n,a){if(1&n){const t=e.RV6();e.j41(0,"mat-form-field",9)(1,"mat-label"),e.EFF(2),e.k0s(),e.j41(3,"mat-select",10),e.bIt("selectionChange",function(i){e.eBV(t);const r=e.XpG(2);return e.Njj(r.selectedKey=i.value)}),e.DNE(4,Nr,3,3,"mat-option",26),e.k0s()()}if(2&n){const t=e.XpG().$implicit,o=e.XpG();let i;e.R7$(2),e.JRh(t("keyLabel")),e.R7$(1),e.Y8G("value",null!==(i=o.selectedKey)&&void 0!==i?i:o.keyOptions[0].apiKey),e.R7$(1),e.Y8G("ngForOf",o.keyOptions)("ngForTrackBy",o.trackByLabel)}}function Yr(n,a){if(1&n){const t=e.RV6();e.j41(0,"dd",15)(1,"code",16),e.EFF(2),e.k0s(),e.j41(3,"button",17),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.onCopy("authHeader",i.headerName+": "+i.activeKey))}),e.nrm(4,"fa-icon",18),e.k0s()()}if(2&n){const t=e.XpG().$implicit,o=e.XpG();e.R7$(2),e.Lme("",o.headerName,": ",o.activeKey,""),e.R7$(1),e.Y8G("matTooltip",t("authHeader"===o.copiedBlock?"copied":"copy")),e.BMQ("aria-label",t("copy")),e.R7$(1),e.AVh("is-copied","authHeader"===o.copiedBlock),e.Y8G("icon","authHeader"===o.copiedBlock?o.faCheck:o.faCopy)}}function Vr(n,a){if(1&n){const t=e.RV6();e.j41(0,"dd",30),e.nrm(1,"df-badge",31),e.j41(2,"span",32),e.EFF(3),e.k0s(),e.j41(4,"button",33),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.createKey.emit())}),e.nrm(5,"fa-icon",18),e.EFF(6),e.k0s()()}if(2&n){const t=e.XpG().$implicit,o=e.XpG();e.R7$(1),e.Y8G("label",t("noKeyBadge")),e.R7$(2),e.JRh(t("noKeyHint")),e.R7$(2),e.Y8G("icon",o.faPlus),e.R7$(1),e.SpI(" ",t("createKey")," ")}}function Xr(n,a){1&n&&e.eu8(0)}function zr(n,a){1&n&&e.eu8(0)}function Br(n,a){1&n&&e.eu8(0)}function Lr(n,a){if(1&n&&(e.EFF(0),e.nrm(1,"df-badge",34)),2&n){const t=e.XpG().$implicit;e.SpI(" ",t("tabs.mcp")," "),e.R7$(1),e.Y8G("dot",!1)}}function Ur(n,a){1&n&&e.eu8(0)}function qr(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",35)(1,"div",36)(2,"span",37),e.EFF(3),e.k0s(),e.j41(4,"button",38),e.bIt("click",function(){const i=e.eBV(t),r=i.id,c=i.code,s=e.XpG(2);return e.Njj(s.onCopy(r,c))}),e.nrm(5,"fa-icon",18),e.EFF(6),e.k0s()(),e.j41(7,"pre",39)(8,"code"),e.EFF(9),e.k0s()()()}if(2&n){const t=a.id,o=a.code,i=a.note,r=e.XpG().$implicit,c=e.XpG();e.R7$(3),e.JRh(i),e.R7$(1),e.AVh("is-copied",c.copiedBlock===t),e.R7$(1),e.Y8G("icon",c.copiedBlock===t?c.faCheck:c.faCopy),e.R7$(1),e.SpI(" ",r(c.copiedBlock===t?"copied":"copy")," "),e.R7$(3),e.JRh(o)}}const Ee=function(n){return{table:n}},Kr=function(n,a){return{id:"curl",code:n,note:a}},Jr=function(n,a){return{id:"javascript",code:n,note:a}},Hr=function(n,a){return{id:"python",code:n,note:a}},Wr=function(n,a){return{id:"mcp",code:n,note:a}};function Qr(n,a){if(1&n){const t=e.RV6();e.j41(0,"section",1)(1,"header",2)(2,"div",3)(3,"span",4),e.EFF(4),e.k0s(),e.j41(5,"h3",5),e.EFF(6),e.k0s(),e.j41(7,"p",6),e.EFF(8),e.k0s()(),e.j41(9,"div",7),e.DNE(10,Ar,5,4,"mat-form-field",8),e.j41(11,"mat-form-field",9)(12,"mat-label"),e.EFF(13),e.k0s(),e.j41(14,"mat-select",10),e.bIt("selectionChange",function(i){e.eBV(t);const r=e.XpG();return e.Njj(r.format=i.value)}),e.j41(15,"mat-option",11),e.EFF(16,"JSON"),e.k0s(),e.j41(17,"mat-option",12),e.EFF(18,"XML"),e.k0s()()()()(),e.j41(19,"dl",13)(20,"div",14)(21,"dt",4),e.EFF(22),e.k0s(),e.j41(23,"dd",15)(24,"code",16),e.EFF(25),e.k0s(),e.j41(26,"button",17),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.onCopy("baseUrl",i.resolvedBase))}),e.nrm(27,"fa-icon",18),e.k0s()()(),e.j41(28,"div",14)(29,"dt",4),e.EFF(30),e.k0s(),e.DNE(31,Yr,5,7,"dd",19),e.DNE(32,Vr,7,4,"ng-template",null,20,e.C5r),e.k0s()(),e.j41(34,"mat-tab-group",21)(35,"mat-tab",22),e.DNE(36,Xr,1,0,"ng-container",23),e.k0s(),e.j41(37,"mat-tab",22),e.DNE(38,zr,1,0,"ng-container",23),e.k0s(),e.j41(39,"mat-tab",22),e.DNE(40,Br,1,0,"ng-container",23),e.k0s(),e.j41(41,"mat-tab"),e.DNE(42,Lr,2,2,"ng-template",24),e.DNE(43,Ur,1,0,"ng-container",23),e.k0s()(),e.DNE(44,qr,10,6,"ng-template",null,25,e.C5r),e.k0s()}if(2&n){const t=a.$implicit,o=e.sdS(33),i=e.sdS(45),r=e.XpG();e.R7$(4),e.JRh(t("eyebrow")),e.R7$(2),e.JRh(t("title")),e.R7$(2),e.JRh(t("subtitle")),e.R7$(2),e.Y8G("ngIf",r.hasKey),e.R7$(3),e.JRh(t("formatLabel")),e.R7$(1),e.Y8G("value",r.format),e.R7$(8),e.JRh(t("baseUrlLabel")),e.R7$(3),e.JRh(r.resolvedBase),e.R7$(1),e.Y8G("matTooltip",t("baseUrl"===r.copiedBlock?"copied":"copy")),e.BMQ("aria-label",t("copy")),e.R7$(1),e.AVh("is-copied","baseUrl"===r.copiedBlock),e.Y8G("icon","baseUrl"===r.copiedBlock?r.faCheck:r.faCopy),e.R7$(3),e.JRh(t("authHeaderLabel")),e.R7$(1),e.Y8G("ngIf",r.hasKey)("ngIfElse",o),e.R7$(3),e.Y8G("mat-stretch-tabs",!1),e.R7$(1),e.Y8G("label",t("tabs.curl")),e.R7$(1),e.Y8G("ngTemplateOutlet",i)("ngTemplateOutletContext",e.l_i(32,Kr,r.curlSnippet,r.activeKeyVerified?t("runNote",e.eq3(28,Ee,r.sampleTable)):t("previewNote",e.eq3(30,Ee,r.sampleTable)))),e.R7$(1),e.Y8G("label",t("tabs.javascript")),e.R7$(1),e.Y8G("ngTemplateOutlet",i)("ngTemplateOutletContext",e.l_i(39,Jr,r.javascriptSnippet,r.activeKeyVerified?t("runNote",e.eq3(35,Ee,r.sampleTable)):t("previewNote",e.eq3(37,Ee,r.sampleTable)))),e.R7$(1),e.Y8G("label",t("tabs.python")),e.R7$(1),e.Y8G("ngTemplateOutlet",i)("ngTemplateOutletContext",e.l_i(46,Hr,r.pythonSnippet,r.activeKeyVerified?t("runNote",e.eq3(42,Ee,r.sampleTable)):t("previewNote",e.eq3(44,Ee,r.sampleTable)))),e.R7$(3),e.Y8G("ngTemplateOutlet",i)("ngTemplateOutletContext",e.l_i(49,Wr,r.mcpSnippet,t("mcpNote")))}}let Zr=(()=>{class n{get keyOptions(){return this.keys?.length?this.keys:this.apiKey?[{label:"Default key",apiKey:this.apiKey}]:[]}get hasKey(){return this.keyOptions.length>0}get activeKey(){return this.hasKey?(this.keyOptions.find(o=>o.apiKey===this.selectedKey)??this.keyOptions[0]).apiKey:"YOUR_API_KEY"}get activeKeyVerified(){return!!this.hasKey&&!!(this.keyOptions.find(o=>o.apiKey===this.selectedKey)??this.keyOptions[0]).verified}get resolvedBase(){return(this.baseUrl??"").replace(/\/+$/,"")||`${this.origin}${A.C}/${this.serviceName}`}get endpointUrl(){return`${this.resolvedBase}/_table/${this.sampleTable}?limit=5`}get resolvedMcpUrl(){return(this.mcpUrl??`${this.resolvedBase}/_mcp`).replace(/\/+$/,"")}get acceptHeader(){return"xml"===this.format?"application/xml":"application/json"}get curlSnippet(){return[`curl -X GET '${this.endpointUrl}' \\`,` -H 'Accept: ${this.acceptHeader}' \\`,` -H '${this.headerName}: ${this.activeKey}'`].join("\n")}get javascriptSnippet(){return[`const res = await fetch('${this.endpointUrl}', {`," headers: {",` 'Accept': '${this.acceptHeader}',`,` '${this.headerName}': '${this.activeKey}',`," },","});",`const data = await res.${"xml"===this.format?"text":"json"}();`,"console.log(data);"].join("\n")}get pythonSnippet(){return["import requests","","res = requests.get(",` '${this.endpointUrl}',`," headers={",` 'Accept': '${this.acceptHeader}',`,` '${this.headerName}': '${this.activeKey}',`," },",")",`print(${"xml"===this.format?"res.text":"res.json()"})`].join("\n")}get mcpSnippet(){return["{",' "mcpServers": {',` "dreamfactory-${this.serviceName||"service"}": {`,' "type": "http",',` "url": "${this.resolvedMcpUrl}",`,' "headers": {',` "${this.headerName}": "${this.activeKey}"`," }"," }"," }","}"].join("\n")}onCopy(t,o){this.clipboard.copy(o),this.copiedBlock=t,this.copied.emit(t),this.copyTimer&&clearTimeout(this.copyTimer),this.copyTimer=setTimeout(()=>{this.copiedBlock=null},1600)}trackByLabel(t,o){return o.apiKey}constructor(t){this.clipboard=t,this.serviceName="",this.sampleTable="your_table",this.keys=[],this.createKey=new e.bkB,this.copied=new e.bkB,this.selectedKey=null,this.format="json",this.copiedBlock=null,this.headerName=st.dE,this.faCopy=b.jPR,this.faCheck=b.e68,this.faPlus=b.QLR,this.origin=typeof window<"u"&&window.location?window.location.origin:""}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(Gr.B0))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-artifact-card"]],inputs:{serviceName:"serviceName",baseUrl:"baseUrl",apiKey:"apiKey",sampleTable:"sampleTable",keys:"keys",mcpUrl:"mcpUrl"},outputs:{createKey:"createKey",copied:"copied"},standalone:!0,features:[e.aNF],decls:1,vars:1,consts:[["class","artifact-card",4,"transloco","translocoRead"],[1,"artifact-card"],[1,"artifact-card__head"],[1,"artifact-card__intro"],[1,"df-eyebrow"],[1,"artifact-card__title"],[1,"artifact-card__subtitle"],[1,"artifact-card__switchers"],["appearance","outline","class","artifact-card__field",4,"ngIf"],["appearance","outline",1,"artifact-card__field"],["panelClass","artifact-card__panel",3,"value","selectionChange"],["value","json"],["value","xml"],[1,"artifact-card__meta"],[1,"artifact-card__meta-row"],[1,"artifact-card__meta-val"],[1,"artifact-card__inline"],["type","button","mat-icon-button","",1,"artifact-card__copy",3,"matTooltip","click"],[3,"icon"],["class","artifact-card__meta-val",4,"ngIf","ngIfElse"],["noKey",""],["animationDuration","0ms","disableRipple","",1,"artifact-card__tabs",3,"mat-stretch-tabs"],[3,"label"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["mat-tab-label",""],["block",""],[3,"value",4,"ngFor","ngForOf","ngForTrackBy"],[3,"value"],["class","artifact-card__opt-role",4,"ngIf"],[1,"artifact-card__opt-role"],[1,"artifact-card__meta-val","artifact-card__nokey"],["variant","neutral",3,"label"],[1,"artifact-card__nokey-hint"],["type","button","mat-button","",1,"artifact-card__nokey-cta",3,"click"],["variant","ai","label","MCP",1,"artifact-card__mcp-badge",3,"dot"],[1,"artifact-card__block"],[1,"artifact-card__code-head"],[1,"artifact-card__note"],["type","button","mat-button","",1,"artifact-card__copy-btn",3,"click"],[1,"artifact-card__code"]],template:function(o,i){1&o&&e.DNE(0,Qr,46,52,"section",0),2&o&&e.Y8G("translocoRead","artifactCard")},dependencies:[d.bT,d.pM,d.T3,D.Q8,D.bA,oe.RI,oe.ES,oe.mq,oe.T8,G.Ve,O.rl,O.nJ,G.VO,q.wT,O.RG,u.Hl,u.$z,u.iY,S.uc,S.oV,w.dX,w.aY,vt.v],styles:["[_nghost-%COMP%]{display:block}.artifact-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--df-space-4);padding:var(--df-space-5);background-color:var(--df-surface);border:1px solid var(--df-border);border-radius:var(--df-radius)}.artifact-card__head[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:var(--df-space-4)}.artifact-card__intro[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--df-space-1);min-width:0}.artifact-card__title[_ngcontent-%COMP%]{margin:0;font-size:var(--df-font-size-lg);font-weight:var(--df-font-weight-heading);line-height:var(--df-lh-tight);color:var(--df-text)}.artifact-card__subtitle[_ngcontent-%COMP%]{margin:0;font-size:var(--df-font-size-sm);color:var(--df-text-muted)}.artifact-card__switchers[_ngcontent-%COMP%]{display:flex;gap:var(--df-space-3);flex-wrap:wrap}.artifact-card__field[_ngcontent-%COMP%]{width:11rem}.artifact-card__field[_ngcontent-%COMP%] .mat-mdc-form-field-subscript-wrapper{display:none}.artifact-card__opt-role[_ngcontent-%COMP%]{color:var(--df-text-muted)}.artifact-card__meta[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--df-space-2);margin:0;padding:var(--df-space-3) var(--df-space-4);background-color:var(--df-surface-2);border:1px solid var(--df-border-2);border-radius:var(--df-radius-sm)}.artifact-card__meta-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--df-space-3);min-width:0}.artifact-card__meta-row[_ngcontent-%COMP%] dt[_ngcontent-%COMP%]{flex:0 0 5.5rem}.artifact-card__meta-val[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--df-space-2);margin:0;min-width:0;flex:1 1 auto}.artifact-card__inline[_ngcontent-%COMP%]{font-family:var(--df-font-mono);font-size:var(--df-font-size-xs);color:var(--df-text-2);overflow-x:auto;white-space:nowrap;padding:var(--df-space-1) 0}.artifact-card__copy[_ngcontent-%COMP%]{flex:0 0 auto;color:var(--df-text-muted);transition:color var(--df-duration-fast) var(--df-ease-standard)}.artifact-card__copy[_ngcontent-%COMP%]:hover{color:var(--df-text)}.artifact-card__copy[_ngcontent-%COMP%] .is-copied[_ngcontent-%COMP%]{color:var(--df-success)}.artifact-card__nokey[_ngcontent-%COMP%]{flex-wrap:wrap}.artifact-card__nokey-hint[_ngcontent-%COMP%]{font-size:var(--df-font-size-xs);color:var(--df-text-muted)}.artifact-card__nokey-cta[_ngcontent-%COMP%]{color:var(--df-accent)}.artifact-card__nokey-cta[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{margin-right:var(--df-space-1)}.artifact-card__mcp-badge[_ngcontent-%COMP%]{margin-left:var(--df-space-2)}.artifact-card__block[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--df-space-2);padding-top:var(--df-space-3)}.artifact-card__code-head[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:var(--df-space-3)}.artifact-card__note[_ngcontent-%COMP%]{font-size:var(--df-font-size-xs);color:var(--df-text-muted)}.artifact-card__copy-btn[_ngcontent-%COMP%]{flex:0 0 auto;color:var(--df-text-muted);font-size:var(--df-font-size-xs);transition:color var(--df-duration-fast) var(--df-ease-standard)}.artifact-card__copy-btn[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{margin-right:var(--df-space-1)}.artifact-card__copy-btn[_ngcontent-%COMP%]:hover{color:var(--df-text)}.artifact-card__copy-btn.is-copied[_ngcontent-%COMP%]{color:var(--df-success)}.artifact-card__code[_ngcontent-%COMP%]{margin:0;padding:var(--df-space-4);background-color:var(--df-code-bg);color:var(--df-code-text);border:1px solid var(--df-border-2);border-radius:var(--df-radius-sm);font-family:var(--df-font-mono);font-size:var(--df-font-size-sm);line-height:var(--df-lh-base);overflow-x:auto}.artifact-card__code[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-family:inherit;white-space:pre}"]})}}return n})();var vn=g(61417),xn=g(98443),Ye=g(28067);function ec(n,a){1&n&&(e.j41(0,"div",6),e.nrm(1,"df-skeleton",7),e.k0s()),2&n&&(e.R7$(1),e.Y8G("count",4))}function tc(n,a){if(1&n&&e.nrm(0,"df-empty-state",8),2&n){const t=e.XpG().$implicit;e.Y8G("title",t("emptyTitle"))("description",t("emptyHint"))}}function nc(n,a){if(1&n&&(e.j41(0,"span",14),e.EFF(1),e.k0s()),2&n){const t=a.$implicit;e.R7$(1),e.JRh(t)}}function oc(n,a){if(1&n){const t=e.RV6();e.j41(0,"button",18),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG().$implicit,s=e.XpG(3);return e.Njj(s.onCellClick(c,r))}),e.nrm(1,"span",19),e.k0s()}if(2&n){const t=a.$implicit,o=e.XpG().$implicit,i=e.XpG(2).$implicit,r=e.XpG();e.AVh("scope-matrix__cell--full","full"===r.cellState(o,t))("scope-matrix__cell--filtered","filtered"===r.cellState(o,t))("scope-matrix__cell--none","none"===r.cellState(o,t)),e.Y8G("disabled","none"===r.cellState(o,t))("title",i("state."+r.cellState(o,t))),e.BMQ("aria-label",o.roleName+" "+t+": "+i("state."+r.cellState(o,t)))}}function ic(n,a){if(1&n&&(e.j41(0,"div",15)(1,"span",16),e.EFF(2),e.k0s(),e.DNE(3,oc,2,9,"button",17),e.k0s()),2&n){const t=a.$implicit,o=e.XpG(3);e.R7$(1),e.Y8G("title",t.roleName),e.R7$(1),e.JRh(t.roleName),e.R7$(1),e.Y8G("ngForOf",o.verbs)("ngForTrackBy",o.trackByVerb)}}function ac(n,a){if(1&n&&(e.j41(0,"div",9)(1,"div",10)(2,"span",11),e.EFF(3),e.k0s(),e.DNE(4,nc,2,1,"span",12),e.k0s(),e.DNE(5,ic,4,4,"div",13),e.k0s()),2&n){const t=e.XpG().$implicit,o=e.XpG();e.BMQ("aria-label",t("ariaLabel")),e.R7$(3),e.JRh(t("roleHeader")),e.R7$(1),e.Y8G("ngForOf",o.verbs)("ngForTrackBy",o.trackByVerb),e.R7$(1),e.Y8G("ngForOf",o.rows)("ngForTrackBy",o.trackByRoleId)}}function rc(n,a){if(1&n&&(e.j41(0,"div",20)(1,"span",21),e.nrm(2,"span",22),e.EFF(3),e.k0s(),e.j41(4,"span",21),e.nrm(5,"span",23),e.EFF(6),e.k0s(),e.j41(7,"span",21),e.nrm(8,"span",24),e.EFF(9),e.k0s()()),2&n){const t=e.XpG().$implicit;e.R7$(3),e.JRh(t("state.full")),e.R7$(3),e.JRh(t("state.filtered")),e.R7$(3),e.JRh(t("state.none"))}}function cc(n,a){if(1&n&&(e.qex(0),e.j41(1,"section",1),e.DNE(2,ec,2,1,"div",2),e.DNE(3,tc,1,2,"df-empty-state",3),e.DNE(4,ac,6,6,"div",4),e.DNE(5,rc,10,3,"div",5),e.k0s(),e.bVm()),2&n){const t=e.XpG();e.R7$(2),e.Y8G("ngIf",t.loading),e.R7$(1),e.Y8G("ngIf",!t.loading&&0===t.rows.length),e.R7$(1),e.Y8G("ngIf",!t.loading&&t.rows.length>0),e.R7$(1),e.Y8G("ngIf",!t.loading&&t.rows.length>0)}}let sc=(()=>{class n{constructor(t){this.scope=t,this.cellClick=new e.bkB,this.verbs=Ye.e,this.rows=[],this.loading=!1,this.destroy$=new xe.B}ngOnChanges(t){"serviceId"in t&&this.load()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}onCellClick(t,o){"none"!==t.verbs[o]&&this.cellClick.emit({roleId:t.roleId,verb:o})}trackByRoleId(t,o){return o.roleId}trackByVerb(t,o){return o}load(){const t=this.serviceId;this.rows=[],null!=t&&(this.loading=!0,this.scope.matrixForService(t).pipe((0,he.Q)(this.destroy$)).subscribe(o=>{this.loading=!1,this.rows=o.roles}))}cellState(t,o){return t.verbs[o]}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(Ye.q))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-scope-matrix"]],inputs:{serviceId:"serviceId"},outputs:{cellClick:"cellClick"},standalone:!0,features:[e.OA$,e.aNF],decls:1,vars:1,consts:[[4,"transloco","translocoRead"],["data-testid","df-scope-matrix",1,"scope-matrix"],["class","scope-matrix__loading",4,"ngIf"],["icon","security",3,"title","description",4,"ngIf"],["class","scope-matrix__grid","role","table",4,"ngIf"],["class","scope-matrix__legend","aria-hidden","true",4,"ngIf"],[1,"scope-matrix__loading"],["variant","table-row",3,"count"],["icon","security",3,"title","description"],["role","table",1,"scope-matrix__grid"],["role","row",1,"scope-matrix__row","scope-matrix__row--head"],["role","columnheader",1,"scope-matrix__corner"],["class","scope-matrix__verb","role","columnheader",4,"ngFor","ngForOf","ngForTrackBy"],["class","scope-matrix__row","role","row",4,"ngFor","ngForOf","ngForTrackBy"],["role","columnheader",1,"scope-matrix__verb"],["role","row",1,"scope-matrix__row"],["role","rowheader",1,"scope-matrix__role",3,"title"],["type","button","class","scope-matrix__cell","role","cell",3,"scope-matrix__cell--full","scope-matrix__cell--filtered","scope-matrix__cell--none","disabled","title","click",4,"ngFor","ngForOf","ngForTrackBy"],["type","button","role","cell",1,"scope-matrix__cell",3,"disabled","title","click"],["aria-hidden","true",1,"scope-matrix__dot"],["aria-hidden","true",1,"scope-matrix__legend"],[1,"scope-matrix__legend-item"],[1,"scope-matrix__dot","scope-matrix__dot--full"],[1,"scope-matrix__dot","scope-matrix__dot--filtered"],[1,"scope-matrix__dot","scope-matrix__dot--none"]],template:function(o,i){1&o&&e.DNE(0,cc,6,4,"ng-container",0),2&o&&e.Y8G("translocoRead","scopeMatrix")},dependencies:[d.MD,d.Sq,d.bT,D.Q8,D.bA,vn.M,xn.d],styles:["[_nghost-%COMP%]{display:block}.scope-matrix[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--df-space-4)}.scope-matrix__loading[_ngcontent-%COMP%]{padding:var(--df-space-2) 0}.scope-matrix__grid[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--df-space-1);overflow-x:auto;padding-bottom:var(--df-space-1)}.scope-matrix__row[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(12rem,1.4fr) repeat(5,minmax(4.4rem,1fr));align-items:center;gap:var(--df-space-2);min-width:40rem}.scope-matrix__row--head[_ngcontent-%COMP%]{padding-bottom:var(--df-space-1);border-bottom:1px solid var(--df-border-2)}.scope-matrix__corner[_ngcontent-%COMP%]{font-size:var(--df-font-size-xs);font-weight:var(--df-font-weight-heading);color:var(--df-text-muted);text-transform:uppercase;letter-spacing:.04em}.scope-matrix__verb[_ngcontent-%COMP%]{justify-self:center;font-size:var(--df-font-size-xs);font-weight:var(--df-font-weight-heading);color:var(--df-text-2);letter-spacing:.02em}.scope-matrix__role[_ngcontent-%COMP%]{font-size:var(--df-font-size-sm);color:var(--df-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.scope-matrix__cell[_ngcontent-%COMP%]{justify-self:center;display:inline-flex;align-items:center;justify-content:center;width:2.8rem;height:2.8rem;padding:0;border:1px solid transparent;border-radius:var(--df-radius-sm);background:transparent;cursor:pointer;transition:background-color .12s ease,border-color .12s ease}.scope-matrix__cell[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--df-hover);border-color:var(--df-border)}.scope-matrix__cell[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--df-accent);outline-offset:1px}.scope-matrix__cell[_ngcontent-%COMP%]:disabled{cursor:default}.scope-matrix__dot[_ngcontent-%COMP%]{width:1.2rem;height:1.2rem;border-radius:50%;display:inline-block;flex:none;background:var(--df-text-muted);box-shadow:0 0 0 .3rem transparent}.scope-matrix__cell--full[_ngcontent-%COMP%] .scope-matrix__dot[_ngcontent-%COMP%], .scope-matrix__dot--full[_ngcontent-%COMP%]{background:var(--df-success);box-shadow:0 0 0 .3rem var(--df-success-soft)}.scope-matrix__cell--filtered[_ngcontent-%COMP%] .scope-matrix__dot[_ngcontent-%COMP%], .scope-matrix__dot--filtered[_ngcontent-%COMP%]{background:var(--df-warning);box-shadow:0 0 0 .3rem var(--df-warning-soft)}.scope-matrix__cell--none[_ngcontent-%COMP%] .scope-matrix__dot[_ngcontent-%COMP%], .scope-matrix__dot--none[_ngcontent-%COMP%]{background:var(--df-text-faint);box-shadow:none}.scope-matrix__legend[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:var(--df-space-4);padding-top:var(--df-space-1)}.scope-matrix__legend-item[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:var(--df-space-2);font-size:var(--df-font-size-xs);color:var(--df-text-muted)}"]})}}return n})();var lc=g(81663),dc=g(23667),pc=g(43521);function mc(n,a){if(1&n&&(e.qex(0),e.j41(1,"span",13),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.nrm(4,"df-error-detail",14),e.bVm()),2&n){const t=e.XpG(4);e.R7$(2),e.JRh(e.bMT(3,2,t.probeError.message)),e.R7$(2),e.Y8G("error",t.probeError)}}function _c(n,a){if(1&n&&(e.j41(0,"li",11)(1,"span",12),e.EFF(2),e.nI1(3,"transloco"),e.DNE(4,mc,5,4,"ng-container",0),e.k0s()()),2&n){const t=e.XpG(3);e.R7$(2),e.SpI(" ",e.bMT(3,2,"services.health.probe.failed")," "),e.R7$(2),e.Y8G("ngIf",t.probeError)}}function gc(n,a){if(1&n&&(e.j41(0,"a",16),e.EFF(1),e.nI1(2,"transloco"),e.nrm(3,"fa-icon",5),e.k0s()),2&n){const t=e.XpG().$implicit,o=e.XpG(3);e.Y8G("routerLink",t.fix),e.R7$(1),e.SpI(" ",e.bMT(2,3,"services.health.fix."+t.id)," "),e.R7$(2),e.Y8G("icon",o.faArrowRight)}}function fc(n,a){if(1&n&&(e.j41(0,"li",11)(1,"span",12),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.DNE(4,gc,4,5,"a",15),e.k0s()),2&n){const t=a.$implicit;e.R7$(2),e.JRh(e.bMT(3,2,"services.health.rules."+t.id)),e.R7$(2),e.Y8G("ngIf",t.fix)}}function uc(n,a){if(1&n&&(e.j41(0,"section",3),e.nI1(1,"transloco"),e.j41(2,"header",4),e.nrm(3,"fa-icon",5),e.j41(4,"span",6),e.EFF(5),e.nI1(6,"transloco"),e.k0s(),e.nrm(7,"df-badge",7),e.nI1(8,"transloco"),e.k0s(),e.j41(9,"ul",8),e.DNE(10,_c,5,4,"li",9),e.DNE(11,fc,5,4,"li",10),e.k0s()()),2&n){const t=e.XpG(2);e.AVh("health-panel--danger","danger"===t.level),e.BMQ("aria-label",e.bMT(1,9,"services.health.panelAria")),e.R7$(3),e.Y8G("icon",t.faShieldHalved),e.R7$(2),e.JRh(e.bMT(6,11,"services.health.header")),e.R7$(2),e.Y8G("variant",t.level)("label",e.bMT(8,13,"services.health.level."+t.level)),e.R7$(3),e.Y8G("ngIf","failed"===t.probe),e.R7$(1),e.Y8G("ngForOf",null==t.health?null:t.health.rules)}}function hc(n,a){1&n&&(e.qex(0),e.EFF(1),e.nI1(2,"transloco"),e.bVm()),2&n&&(e.R7$(1),e.JRh(e.bMT(2,1,"services.health.probe.checking")))}function bc(n,a){1&n&&(e.qex(0),e.EFF(1),e.nI1(2,"transloco"),e.bVm()),2&n&&(e.R7$(1),e.JRh(e.bMT(2,1,"services.health.probe.unsupported")))}function vc(n,a){1&n&&(e.qex(0),e.EFF(1),e.nI1(2,"transloco"),e.bVm()),2&n&&(e.R7$(1),e.JRh(e.bMT(2,1,"services.health.probe.ok")))}function xc(n,a){if(1&n&&(e.j41(0,"p",17),e.nrm(1,"fa-icon",5),e.j41(2,"span",18),e.DNE(3,hc,3,3,"ng-container",19),e.DNE(4,bc,3,3,"ng-container",19),e.DNE(5,vc,3,3,"ng-container",20),e.k0s()()),2&n){const t=e.XpG(2);e.AVh("health-panel__ok--muted","ok"!==t.probe),e.R7$(1),e.Y8G("icon","ok"===t.probe?t.faCircleCheck:t.faShieldHalved),e.R7$(1),e.Y8G("ngSwitch",t.probe),e.R7$(1),e.Y8G("ngSwitchCase","checking"),e.R7$(1),e.Y8G("ngSwitchCase","unsupported")}}function Cc(n,a){if(1&n&&(e.qex(0),e.DNE(1,uc,12,15,"section",1),e.DNE(2,xc,6,6,"ng-template",null,2,e.C5r),e.bVm()),2&n){const t=e.sdS(3),o=e.XpG();e.R7$(1),e.Y8G("ngIf",o.hasFindings)("ngIfElse",t)}}let xt=class Lt{constructor(a,t,o){this.healthService=a,this.probeService=t,this.cdr=o,this.serviceName="",this.probe="idle",this.probeError=null,this.faShieldHalved=b.fLc,this.faCircleCheck=b.QRE,this.faArrowRight=b.dmS}ngOnInit(){this.score(),this.runProbe()}ngOnChanges(a){(a.serviceId||a.deprecated)&&this.score(),(a.serviceId||a.serviceName||a.serviceGroup)&&this.runProbe()}get level(){return"failed"===this.probe?"danger":this.health?.level??"success"}get hasFindings(){return"failed"===this.probe||!!this.health?.rules.length}score(){if(!this.serviceId)return void(this.health=void 0);const a=this.serviceId;this.healthService.getContext().pipe((0,H.s)(this)).subscribe(t=>{this.serviceId===a&&(this.health=this.healthService.derive({id:a,name:this.serviceName,deprecated:this.deprecated},t),this.cdr.markForCheck())})}runProbe(){if(!this.serviceId||!this.serviceName)return void(this.probe="idle");const a=this.serviceName;this.probeError=null,this.probeService.probe(a,this.serviceGroup).pipe((0,H.s)(this)).subscribe(t=>{this.serviceName===a&&(this.probe=t.state,this.probeError=t.error??null,this.cdr.markForCheck())})}static{this.\u0275fac=function(t){return new(t||Lt)(e.rXU(dc.d),e.rXU(pc.j),e.rXU(e.gRc))}}static{this.\u0275cmp=e.VBU({type:Lt,selectors:[["df-service-health-panel"]],inputs:{serviceId:"serviceId",serviceName:"serviceName",serviceGroup:"serviceGroup",deprecated:"deprecated"},standalone:!0,features:[e.OA$,e.aNF],decls:1,vars:1,consts:[[4,"ngIf"],["class","health-panel",3,"health-panel--danger",4,"ngIf","ngIfElse"],["clean",""],[1,"health-panel"],[1,"health-panel__head"],["aria-hidden","true",3,"icon"],[1,"df-eyebrow"],[3,"variant","label"],[1,"health-panel__rules"],["class","health-panel__rule",4,"ngIf"],["class","health-panel__rule",4,"ngFor","ngForOf"],[1,"health-panel__rule"],[1,"health-panel__reason"],[1,"health-panel__detail"],[3,"error"],["class","health-panel__fix",3,"routerLink",4,"ngIf"],[1,"health-panel__fix",3,"routerLink"],[1,"health-panel__ok"],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"]],template:function(t,o){1&t&&e.DNE(0,Cc,4,2,"ng-container",0),2&t&&e.Y8G("ngIf",o.health||"idle"!==o.probe)},dependencies:[d.bT,d.pM,d.ux,d.e1,d.fG,N.Wk,D.Kj,w.dX,w.aY,vt.v,lc.R],styles:[".health-panel[_ngcontent-%COMP%]{box-sizing:border-box;display:flex;flex-direction:column;gap:var(--df-space-3);padding:var(--df-space-3) var(--df-space-4);border:1px solid var(--df-warning-border);border-radius:var(--df-radius);background:var(--df-warning-soft);color:var(--df-text)}.health-panel[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--df-warning)}.health-panel--danger[_ngcontent-%COMP%]{border-color:var(--df-danger-border);background:var(--df-danger-soft)}.health-panel--danger[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--df-danger)}.health-panel__head[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--df-space-2)}.health-panel__rules[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--df-space-2);margin:0;padding:0;list-style:none}.health-panel__rule[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:baseline;gap:var(--df-space-2) var(--df-space-3)}.health-panel__reason[_ngcontent-%COMP%]{flex:1 1 20rem}.health-panel__detail[_ngcontent-%COMP%]{display:block;margin-top:var(--df-space-1);font-size:var(--df-font-size-xs);color:var(--df-text-muted);overflow-wrap:anywhere}.health-panel__fix[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:var(--df-space-1);color:var(--df-accent);font-weight:var(--df-font-weight-medium);text-decoration:none;white-space:nowrap}.health-panel__fix[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:currentColor}.health-panel__fix[_ngcontent-%COMP%]:hover{text-decoration:underline}.health-panel__fix[_ngcontent-%COMP%]:focus-visible{outline:none;box-shadow:var(--df-focus-ring);border-radius:var(--df-radius-sm, var(--df-radius))}.health-panel__ok[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--df-space-2);margin:0;color:var(--df-text-muted)}.health-panel__ok[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--df-success)}.health-panel__ok--muted[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--df-text-muted)}"],changeDetection:0})}};function kc(n,a){1&n&&(e.j41(0,"div",5),e.nrm(1,"df-skeleton",6),e.k0s()),2&n&&(e.R7$(1),e.Y8G("count",5))}function yc(n,a){if(1&n&&e.nrm(0,"df-empty-state",7),2&n){const t=e.XpG().$implicit;e.Y8G("title",t("error.title"))("description",t("error.hint"))}}function Mc(n,a){if(1&n&&(e.j41(0,"a",21)(1,"mat-icon"),e.EFF(2,"add"),e.k0s(),e.EFF(3),e.k0s()),2&n){const t=e.XpG().$implicit,o=e.XpG(2).$implicit;e.Y8G("routerLink",t.addLink),e.R7$(3),e.SpI(" ",o("addPolicy")," ")}}function Oc(n,a){if(1&n&&(e.j41(0,"li",10)(1,"div",11)(2,"span",12)(3,"mat-icon"),e.EFF(4),e.k0s()()(),e.j41(5,"div",13)(6,"div",14)(7,"span",15),e.EFF(8),e.k0s(),e.nrm(9,"df-badge",16),e.k0s(),e.j41(10,"p",17),e.EFF(11),e.k0s(),e.j41(12,"div",18)(13,"a",19),e.EFF(14),e.j41(15,"mat-icon"),e.EFF(16,"chevron_right"),e.k0s()(),e.DNE(17,Mc,4,2,"a",20),e.k0s()()()),2&n){const t=a.$implicit,o=e.XpG(2).$implicit,i=e.XpG();e.AVh("pipeline-strip__node--open",!t.present),e.R7$(2),e.AVh("pipeline-strip__marker--active","active"===t.status)("pipeline-strip__marker--filtered","filtered"===t.status)("pipeline-strip__marker--handler","handler"===t.status),e.R7$(2),e.JRh(t.icon),e.R7$(4),e.JRh(o("nodes."+t.kind+".title")),e.R7$(1),e.Y8G("variant",i.badgeVariant(t))("label",o("status."+t.status)),e.R7$(2),e.SpI(" ",o(t.detailKey,t.detailParams)," "),e.R7$(2),e.Y8G("routerLink",t.link),e.R7$(1),e.SpI(" ",o("view")," "),e.R7$(3),e.Y8G("ngIf",t.addLink)}}function Pc(n,a){if(1&n&&(e.j41(0,"ol",8),e.DNE(1,Oc,18,16,"li",9),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.Y8G("ngForOf",t.nodes)("ngForTrackBy",t.trackByKind)}}function Fc(n,a){if(1&n&&(e.qex(0),e.j41(1,"section",1),e.DNE(2,kc,2,1,"div",2),e.DNE(3,yc,1,2,"df-empty-state",3),e.DNE(4,Pc,2,2,"ol",4),e.k0s(),e.bVm()),2&n){const t=e.XpG();e.R7$(2),e.Y8G("ngIf",t.loading),e.R7$(1),e.Y8G("ngIf",!t.loading&&t.errored),e.R7$(1),e.Y8G("ngIf",!t.loading&&!t.errored&&t.nodes.length>0)}}xt=(0,re.Cg)([(0,H.d)({checkProperties:!0})],xt);const wc={active:"success",filtered:"warning",open:"neutral",handler:"build"};let Dc=(()=>{class n{constructor(t,o,i){this.scope=t,this.limitService=o,this.appService=i,this.nodes=[],this.loading=!1,this.errored=!1,this.destroy$=new xe.B}ngOnChanges(t){("serviceId"in t||"serviceName"in t)&&this.load()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}badgeVariant(t){return wc[t.status]}trackByKind(t,o){return o.kind}load(){const t=this.serviceId;this.nodes=[],this.errored=!1,null!=t&&(this.loading=!0,(0,ue.p)({matrix:this.scope.matrixForService(t),limits:this.limitService.getAll({limit:0,sort:"name"}).pipe((0,z.T)(o=>o.resource??[]),(0,R.W)(()=>(0,L.of)([]))),apps:this.appService.getAll({limit:0}).pipe((0,z.T)(o=>o.resource??[]),(0,R.W)(()=>(0,L.of)([])))}).pipe((0,he.Q)(this.destroy$)).subscribe({next:({matrix:o,limits:i,apps:r})=>{this.loading=!1,this.nodes=this.buildNodes(t,o.roles,i,r)},error:()=>{this.loading=!1,this.errored=!0}}))}buildNodes(t,o,i,r){const c=o.filter(_=>Ye.e.some(C=>"none"!==_.verbs[C])),s=o.filter(_=>Ye.e.some(C=>"filtered"===_.verbs[C])),l=i.find(_=>_.serviceId===t)??i.find(_=>null==_.serviceId),p=["/",W.b.API_CONNECTIONS,W.b.API_KEYS],f=["/",W.b.API_CONNECTIONS,W.b.ROLE_BASED_ACCESS],M=["/",W.b.API_SECURITY,W.b.RATE_LIMITING];return[{kind:"key",icon:"key",present:r.length>0,status:r.length>0?"active":"open",detailKey:r.length>0?"nodes.key.detail":"nodes.key.empty",detailParams:{count:r.length},link:p,addLink:r.length>0?void 0:[...p,W.b.CREATE]},{kind:"role",icon:"security",present:c.length>0,status:c.length>0?"active":"open",detailKey:c.length>0?"nodes.role.detail":"nodes.role.empty",detailParams:{count:c.length},link:1===c.length?[...f,String(c[0].roleId)]:f,addLink:c.length>0?void 0:[...f,W.b.CREATE]},{kind:"rate",icon:"speed",present:!!l,status:l?"active":"open",detailKey:l?"nodes.rate.detail":"nodes.rate.empty",detailParams:l?{rate:l.rate,period:l.period}:void 0,link:l?[...M,String(l.id)]:M,addLink:l?void 0:[...M,W.b.CREATE]},{kind:"filter",icon:"filter_alt",present:s.length>0,status:s.length>0?"filtered":"open",detailKey:s.length>0?"nodes.filter.detail":"nodes.filter.empty",detailParams:{count:s.length},link:f},{kind:"handler",icon:"bolt",present:!0,status:"handler",detailKey:this.serviceType?"nodes.handler.detail":"nodes.handler.empty",detailParams:this.serviceType?{type:this.serviceType}:void 0,link:this.serviceName?["/",W.b.API_CONNECTIONS,W.b.API_DOCS,this.serviceName]:["/",W.b.API_CONNECTIONS,W.b.API_DOCS]}]}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(Ye.q),e.rXU(U.gu),e.rXU(U.u7))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-pipeline-strip"]],inputs:{serviceId:"serviceId",serviceName:"serviceName",serviceType:"serviceType"},standalone:!0,features:[e.OA$,e.aNF],decls:1,vars:1,consts:[[4,"transloco","translocoRead"],["data-testid","df-pipeline-strip",1,"pipeline-strip"],["class","pipeline-strip__loading",4,"ngIf"],["icon","error_outline",3,"title","description",4,"ngIf"],["class","pipeline-strip__list",4,"ngIf"],[1,"pipeline-strip__loading"],["variant","card",3,"count"],["icon","error_outline",3,"title","description"],[1,"pipeline-strip__list"],["class","pipeline-strip__node",3,"pipeline-strip__node--open",4,"ngFor","ngForOf","ngForTrackBy"],[1,"pipeline-strip__node"],["aria-hidden","true",1,"pipeline-strip__rail"],[1,"pipeline-strip__marker"],[1,"pipeline-strip__card"],[1,"pipeline-strip__head"],[1,"pipeline-strip__name"],[3,"variant","label"],[1,"pipeline-strip__detail"],[1,"pipeline-strip__actions"],[1,"pipeline-strip__link",3,"routerLink"],["class","pipeline-strip__link pipeline-strip__link--add",3,"routerLink",4,"ngIf"],[1,"pipeline-strip__link","pipeline-strip__link--add",3,"routerLink"]],template:function(o,i){1&o&&e.DNE(0,Fc,5,3,"ng-container",0),2&o&&e.Y8G("translocoRead","pipelineStrip")},dependencies:[d.MD,d.Sq,d.bT,N.iI,N.Wk,D.Q8,D.bA,Z.m_,Z.An,vt.v,vn.M,xn.d],styles:['[_nghost-%COMP%]{display:block}.pipeline-strip[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--df-space-4)}.pipeline-strip__loading[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--df-space-3)}.pipeline-strip__list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:var(--df-space-3)}.pipeline-strip__node[_ngcontent-%COMP%]{display:grid;grid-template-columns:3.6rem 1fr;gap:var(--df-space-3);align-items:stretch}.pipeline-strip__rail[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;padding-top:var(--df-space-2)}.pipeline-strip__node[_ngcontent-%COMP%]:not(:last-child) .pipeline-strip__rail[_ngcontent-%COMP%]:after{content:"";position:absolute;top:4rem;bottom:calc(var(--df-space-3) * -1);left:50%;width:1px;transform:translate(-50%);background:var(--df-border)}.pipeline-strip__marker[_ngcontent-%COMP%]{position:relative;z-index:1;display:inline-flex;align-items:center;justify-content:center;width:3.2rem;height:3.2rem;flex:none;border-radius:50%;border:1px solid var(--df-border);background:var(--df-surface);color:var(--df-text-muted)}.pipeline-strip__marker[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{width:1.8rem;height:1.8rem;font-size:1.8rem;line-height:1.8rem}.pipeline-strip__marker--active[_ngcontent-%COMP%]{border-color:var(--df-success-border);background:var(--df-success-soft);color:var(--df-success)}.pipeline-strip__marker--filtered[_ngcontent-%COMP%]{border-color:var(--df-warning-border);background:var(--df-warning-soft);color:var(--df-warning)}.pipeline-strip__marker--handler[_ngcontent-%COMP%]{border-color:var(--df-accent);background:var(--df-accent-soft);color:var(--df-accent)}.pipeline-strip__node--open[_ngcontent-%COMP%] .pipeline-strip__marker[_ngcontent-%COMP%]{border-style:dashed;color:var(--df-text-faint)}.pipeline-strip__card[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--df-space-1);padding:var(--df-space-3) var(--df-space-4);border:1px solid var(--df-border);border-radius:var(--df-radius);background:var(--df-surface)}.pipeline-strip__node--open[_ngcontent-%COMP%] .pipeline-strip__card[_ngcontent-%COMP%]{background:var(--df-surface-2);border-style:dashed}.pipeline-strip__head[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:var(--df-space-2)}.pipeline-strip__name[_ngcontent-%COMP%]{font-size:var(--df-font-size-md);font-weight:var(--df-font-weight-heading);color:var(--df-text)}.pipeline-strip__detail[_ngcontent-%COMP%]{margin:0;font-size:var(--df-font-size-sm);color:var(--df-text-muted)}.pipeline-strip__actions[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:var(--df-space-4);margin-top:var(--df-space-1)}.pipeline-strip__link[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:var(--df-space-1);font-size:var(--df-font-size-sm);font-weight:var(--df-font-weight-medium);color:var(--df-accent);text-decoration:none;cursor:pointer}.pipeline-strip__link[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{width:1.6rem;height:1.6rem;font-size:1.6rem;line-height:1.6rem}.pipeline-strip__link[_ngcontent-%COMP%]:hover{text-decoration:underline}.pipeline-strip__link[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--df-accent);outline-offset:2px;border-radius:var(--df-radius-sm)}.pipeline-strip__link--add[_ngcontent-%COMP%]{color:var(--df-text-2)}']})}}return n})();const Tc=function(n,a){return{verb:n,service:a}};let Sc=(()=>{class n{constructor(t){this.data=t}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(h.Vh))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-service-role-scope-dialog"]],standalone:!0,features:[e.aNF],decls:22,vars:20,consts:[[1,"scope-role-dialog"],["mat-dialog-title","",1,"scope-role-dialog__head"],[1,"scope-role-dialog__heading"],[1,"scope-role-dialog__eyebrow"],[1,"scope-role-dialog__title"],["mat-icon-button","","mat-dialog-close","",1,"scope-role-dialog__close"],[1,"scope-role-dialog__content"],[1,"scope-role-dialog__hint"],[3,"roleId"],["align","end",1,"scope-role-dialog__actions"],["mat-stroked-button","","mat-dialog-close",""]],template:function(o,i){1&o&&(e.j41(0,"div",0)(1,"header",1)(2,"div",2)(3,"p",3),e.EFF(4),e.nI1(5,"transloco"),e.k0s(),e.j41(6,"h2",4),e.EFF(7),e.nI1(8,"transloco"),e.k0s()(),e.j41(9,"button",5),e.nI1(10,"transloco"),e.j41(11,"mat-icon"),e.EFF(12,"close"),e.k0s()()(),e.j41(13,"mat-dialog-content",6)(14,"p",7),e.EFF(15),e.nI1(16,"transloco"),e.k0s(),e.nrm(17,"df-role-scope",8),e.k0s(),e.j41(18,"mat-dialog-actions",9)(19,"button",10),e.EFF(20),e.nI1(21,"transloco"),e.k0s()()()),2&o&&(e.R7$(4),e.SpI(" ",e.bMT(5,6,"services.access.dialog.eyebrow")," "),e.R7$(3),e.SpI(" ",e.i5U(8,8,"services.access.dialog.title",e.l_i(17,Tc,i.data.verb,i.data.serviceLabel))," "),e.R7$(2),e.BMQ("aria-label",e.bMT(10,11,"services.access.dialog.close")),e.R7$(6),e.SpI(" ",e.bMT(16,13,"services.access.dialog.hint")," "),e.R7$(2),e.Y8G("roleId",i.data.roleId),e.R7$(3),e.SpI(" ",e.bMT(21,15,"services.access.dialog.close")," "))},dependencies:[d.MD,D.Q8,D.Kj,u.Hl,u.$z,u.iY,Z.m_,Z.An,h.hM,h.tx,h.BI,h.Yi,h.E7,Ht.e],styles:[".scope-role-dialog__head[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:space-between;gap:1.6rem;margin:0}.scope-role-dialog__eyebrow[_ngcontent-%COMP%]{margin:0 0 .2rem;font-size:1.1rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--df-text-muted)}.scope-role-dialog__title[_ngcontent-%COMP%]{margin:0;font-size:1.8rem;line-height:1.3;color:var(--df-text)}.scope-role-dialog__close[_ngcontent-%COMP%]{flex:0 0 auto;color:var(--df-text-muted)}.scope-role-dialog__hint[_ngcontent-%COMP%]{margin:0 0 1.6rem;color:var(--df-text-muted);font-size:1.3rem;line-height:1.5}"]})}}return n})();class _e extends Error{}const Rc=new Set(["-s","--silent","-S","--show-error","-v","--verbose","-i","--include","-f","--fail","-#","--progress-bar","-N","--no-buffer","-g","--globoff","-4","--ipv4","-6","--ipv6","--no-progress-meter"]),Ic=new Set(["-o","--output","-w","--write-out","-D","--dump-header","--trace","--trace-ascii","--stderr"]),Ec=new Set(["-d","--data","--data-raw","--data-ascii","--data-binary","--data-urlencode"]);function Gc(n){if(n.endsWith(";")&&!n.includes(":"))return{name:n.slice(0,-1).trim(),value:""};const a=n.indexOf(":");if(-1===a)return null;const t=n.slice(0,a).trim();return t?{name:t,value:n.slice(a+1).trim()}:null}function Nc(n){const a=encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,o)=>String.fromCharCode(parseInt(o,16)));return btoa(a)}function He(n){try{return decodeURIComponent(n.replace(/\+/g," "))}catch{return n}}function Yc(n,a){if(1&n&&(e.j41(0,"div",10),e.nrm(1,"fa-icon",11),e.j41(2,"span"),e.EFF(3),e.k0s()()),2&n){const t=e.XpG();e.R7$(1),e.Y8G("icon",t.faTriangleExclamation),e.R7$(2),e.JRh(t.error)}}function Vc(n,a){1&n&&(e.j41(0,"th",26),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&n&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"name")," "))}function Xc(n,a){if(1&n&&(e.j41(0,"td",27),e.EFF(1),e.k0s()),2&n){const t=a.$implicit;e.R7$(1),e.JRh(t.name)}}function zc(n,a){1&n&&(e.j41(0,"th",26),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&n&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"value")," "))}function Bc(n,a){if(1&n&&(e.j41(0,"td",28),e.EFF(1),e.k0s()),2&n){const t=a.$implicit;e.R7$(1),e.SpI(" ",t.value," ")}}function Lc(n,a){1&n&&e.nrm(0,"tr",29)}function Uc(n,a){1&n&&e.nrm(0,"tr",30)}function qc(n,a){if(1&n&&(e.qex(0),e.j41(1,"h3",12),e.EFF(2),e.k0s(),e.j41(3,"table",18),e.qex(4,19),e.DNE(5,Vc,3,3,"th",20),e.DNE(6,Xc,2,1,"td",21),e.bVm(),e.qex(7,22),e.DNE(8,zc,3,3,"th",20),e.DNE(9,Bc,2,1,"td",23),e.bVm(),e.DNE(10,Lc,1,0,"tr",24),e.DNE(11,Uc,1,0,"tr",25),e.k0s(),e.bVm()),2&n){const t=e.XpG(),o=t.caption,i=t.$implicit,r=e.XpG(2);e.R7$(2),e.Lme("",o," (",i.length,")"),e.R7$(1),e.Y8G("dataSource",i),e.R7$(7),e.Y8G("matHeaderRowDef",r.keyValueColumns),e.R7$(1),e.Y8G("matRowDefColumns",r.keyValueColumns)}}function Kc(n,a){1&n&&e.DNE(0,qc,12,5,"ng-container",6),2&n&&e.Y8G("ngIf",a.$implicit.length)}function Jc(n,a){1&n&&e.eu8(0)}function Hc(n,a){1&n&&e.eu8(0)}function Wc(n,a){1&n&&e.eu8(0)}function Qc(n,a){if(1&n&&(e.j41(0,"div",33),e.nrm(1,"fa-icon",11),e.j41(2,"span"),e.EFF(3),e.k0s()()),2&n){const t=a.$implicit,o=e.XpG(3);e.R7$(1),e.Y8G("icon",o.faTriangleExclamation),e.R7$(2),e.JRh(t)}}function Zc(n,a){if(1&n&&(e.j41(0,"div",31),e.DNE(1,Qc,4,2,"div",32),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.Y8G("ngForOf",t.parsed.warnings)}}const Ct=function(n,a){return{$implicit:n,caption:a}};function es(n,a){if(1&n&&(e.qex(0),e.j41(1,"h2",12),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.j41(4,"dl",13)(5,"dt"),e.EFF(6),e.nI1(7,"transloco"),e.k0s(),e.j41(8,"dd",14),e.EFF(9),e.k0s(),e.j41(10,"dt"),e.EFF(11),e.nI1(12,"transloco"),e.k0s(),e.j41(13,"dd"),e.EFF(14),e.k0s()(),e.DNE(15,Kc,1,1,"ng-template",null,15,e.C5r),e.DNE(17,Jc,1,0,"ng-container",16),e.nI1(18,"transloco"),e.DNE(19,Hc,1,0,"ng-container",16),e.nI1(20,"transloco"),e.DNE(21,Wc,1,0,"ng-container",16),e.nI1(22,"transloco"),e.DNE(23,Zc,2,1,"div",17),e.bVm()),2&n){const t=e.sdS(16),o=e.XpG();e.R7$(2),e.SpI(" ",e.bMT(3,12,"services.curlImport.preview")," "),e.R7$(4),e.JRh(e.bMT(7,14,"services.curlImport.baseUrl")),e.R7$(3),e.JRh(o.parsed.baseUrl),e.R7$(2),e.JRh(e.bMT(12,16,"services.curlImport.method")),e.R7$(3),e.JRh(o.parsed.method),e.R7$(3),e.Y8G("ngTemplateOutlet",t)("ngTemplateOutletContext",e.l_i(24,Ct,o.parsed.parameters,e.bMT(18,18,"services.curlImport.parameters"))),e.R7$(2),e.Y8G("ngTemplateOutlet",t)("ngTemplateOutletContext",e.l_i(27,Ct,o.parsed.headers,e.bMT(20,20,"services.curlImport.headers"))),e.R7$(2),e.Y8G("ngTemplateOutlet",t)("ngTemplateOutletContext",e.l_i(30,Ct,o.optionEntries,e.bMT(22,22,"services.curlImport.curlOptions"))),e.R7$(2),e.Y8G("ngIf",o.parsed.warnings.length)}}let ts=(()=>{class n{constructor(t){this.dialogRef=t,this.command="",this.parsed=null,this.error="",this.faUpload=b.JmV,this.faTriangleExclamation=b.JAe,this.keyValueColumns=["name","value"]}get optionEntries(){return Object.entries(this.parsed?.options??{}).map(([t,o])=>({name:t,value:o}))}onCommandChange(){if(this.error="",this.parsed=null,this.command.trim())try{this.parsed=function Ac(n){const a=(n??"").trim();if(!a)throw new _e("Enter a cURL command.");const t=function $c(n){const a=[];let t="",o=!1,i=0;for(;i{if(void 0!==y)return y;if(v++,v>=t.length)throw new _e(`Missing value for ${k}.`);return t[v]};for(;v2&&"HXduexAebm".includes(k[1])&&(y=k.slice(0,2),Y=k.slice(2)),!Rc.has(y)){if(Ic.has(y)){x(y,Y);continue}if(Ec.has(y)){c.push(x(y,Y));continue}switch(y){case"-X":case"--request":l=x(y,Y).toUpperCase();break;case"-H":case"--header":{const be=Gc(x(y,Y));be?o.push(be):r.push("Skipped a header that could not be parsed.");break}case"--url":s.push(x(y,Y));break;case"-u":case"--user":p=x(y,Y);break;case"-A":case"--user-agent":o.push({name:"User-Agent",value:x(y,Y)});break;case"-e":case"--referer":o.push({name:"Referer",value:x(y,Y)});break;case"-b":case"--cookie":o.push({name:"Cookie",value:x(y,Y)});break;case"-k":case"--insecure":i.CURLOPT_SSL_VERIFYPEER="0",i.CURLOPT_SSL_VERIFYHOST="0";break;case"-L":case"--location":i.CURLOPT_FOLLOWLOCATION="1";break;case"-x":case"--proxy":i.CURLOPT_PROXY=x(y,Y);break;case"-U":case"--proxy-user":i.CURLOPT_PROXYUSERPWD=x(y,Y);break;case"--connect-timeout":i.CURLOPT_CONNECTTIMEOUT=x(y,Y);break;case"-m":case"--max-time":i.CURLOPT_TIMEOUT=x(y,Y);break;case"--compressed":i.CURLOPT_ENCODING="";break;case"-G":case"--get":f=!0;break;case"-I":case"--head":l=l||"HEAD";break;case"-F":case"--form":M=!0,c.push(x(y,Y));break;default:if(r.push(`Ignored unsupported option "${y}".`),void 0===Y&&!1===t[v+1]?.startsWith("-")){const be=t[v+1];be&&!/^[a-z][a-z0-9+.-]*:\/\//i.test(be)&&v++}}}}if(!s.length)throw new _e("No URL found in the command.");s.length>1&&r.push(`Command contains ${s.length} URLs; only the first was imported.`);const{baseUrl:F,parameters:T}=function jc(n){const a=[],t=n.indexOf("#"),o=-1===t?n:n.slice(0,t),i=o.indexOf("?");if(-1===i)return{baseUrl:o,parameters:a};const r=o.slice(0,i),c=o.slice(i+1);for(const s of c.split("&")){if(!s)continue;const l=s.indexOf("="),p=-1===l?s:s.slice(0,l),f=-1===l?"":s.slice(l+1);a.push({name:He(p),value:He(f)})}return{baseUrl:r,parameters:a}}(s[0]);if(!F)throw new _e("No URL found in the command.");const B=F.match(/^([a-z][a-z0-9+.-]*):(?=\/)/i);if(B){const k=B[1].toLowerCase();"http"!==k&&"https"!==k&&r.push(`The URL uses the "${k}" scheme, not http or https. The service sends requests with that scheme server-side, which can read local files or reach internal hosts. Import only if you trust the source.`)}const _=c.length?c.join("&"):void 0;if(f&&_)for(const k of _.split("&")){if(!k)continue;const y=k.indexOf("=");T.push({name:He(-1===y?k:k.slice(0,y)),value:He(-1===y?"":k.slice(y+1))})}let C=l;return C||(C=_&&!f?"POST":"GET"),M?r.push("Multipart form fields (-F) cannot be stored on an HTTP service and were not imported."):_&&!f&&r.push("The request body was not imported. An HTTP service passes through the body it receives at request time."),p&&(o.some(y=>"authorization"===y.name.toLowerCase())?r.push("Credentials from -u were ignored because the command already sets an Authorization header."):(o.push({name:"Authorization",value:`Basic ${Nc(p)}`}),r.push("Credentials from -u were imported as an Authorization header. Base64 is encoding, not encryption, so they are stored in a recoverable form."))),{baseUrl:F,method:C,parameters:T,headers:o,options:i,body:f?void 0:_,warnings:r}}(this.command)}catch(t){this.error=t instanceof _e?t.message:"Could not parse the cURL command."}}onImport(){this.parsed&&this.dialogRef.close(this.parsed)}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(h.CP))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-curl-import-dialog"]],standalone:!0,features:[e.aNF],decls:22,vars:22,consts:[["mat-dialog-title",""],["mat-dialog-content","",1,"curl-import-content"],[1,"curl-import-hint"],["appearance","outline",1,"full-width"],["matInput","","rows","7","spellcheck","false","data-testid","curl-import-command",3,"placeholder","ngModel","ngModelChange"],["class","curl-import-error","data-testid","curl-import-error",4,"ngIf"],[4,"ngIf"],["mat-dialog-actions",""],["mat-flat-button","","mat-dialog-close","","type","button"],["mat-flat-button","","color","primary","type","button","data-testid","curl-import-submit",3,"disabled","click"],["data-testid","curl-import-error",1,"curl-import-error"],[3,"icon"],[1,"curl-import-section"],[1,"curl-import-summary"],["data-testid","curl-import-base-url"],["keyValueTable",""],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["class","curl-import-warnings","data-testid","curl-import-warnings",4,"ngIf"],["mat-table","",1,"full-width",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","value"],["mat-cell","","class","curl-import-value",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-cell","",1,"curl-import-value"],["mat-header-row",""],["mat-row",""],["data-testid","curl-import-warnings",1,"curl-import-warnings"],["class","curl-import-warning",4,"ngFor","ngForOf"],[1,"curl-import-warning"]],template:function(o,i){1&o&&(e.j41(0,"h1",0),e.EFF(1),e.nI1(2,"transloco"),e.k0s(),e.j41(3,"div",1)(4,"p",2),e.EFF(5),e.nI1(6,"transloco"),e.k0s(),e.j41(7,"mat-form-field",3)(8,"mat-label"),e.EFF(9),e.nI1(10,"transloco"),e.k0s(),e.j41(11,"textarea",4),e.bIt("ngModelChange",function(c){return i.command=c})("ngModelChange",function(){return i.onCommandChange()}),e.nI1(12,"transloco"),e.k0s()(),e.DNE(13,Yc,4,2,"div",5),e.DNE(14,es,24,33,"ng-container",6),e.k0s(),e.j41(15,"div",7)(16,"button",8),e.EFF(17),e.nI1(18,"transloco"),e.k0s(),e.j41(19,"button",9),e.bIt("click",function(){return i.onImport()}),e.EFF(20),e.nI1(21,"transloco"),e.k0s()()),2&o&&(e.R7$(1),e.JRh(e.bMT(2,10,"services.curlImport.title")),e.R7$(4),e.SpI(" ",e.bMT(6,12,"services.curlImport.hint")," "),e.R7$(4),e.JRh(e.bMT(10,14,"services.curlImport.commandLabel")),e.R7$(2),e.Y8G("placeholder",e.bMT(12,16,"services.curlImport.placeholder"))("ngModel",i.command),e.R7$(2),e.Y8G("ngIf",i.error),e.R7$(1),e.Y8G("ngIf",i.parsed),e.R7$(3),e.SpI(" ",e.bMT(18,18,"cancel")," "),e.R7$(2),e.Y8G("disabled",!i.parsed),e.R7$(1),e.SpI(" ",e.bMT(21,20,"services.curlImport.import")," "))},dependencies:[d.bT,d.pM,d.T3,m.YN,m.me,m.BC,m.vS,h.hM,h.tx,h.BI,h.Yi,h.E7,u.Hl,u.$z,O.RG,O.rl,O.nJ,E.fS,E.fg,P.tP,P.Zl,P.tL,P.ji,P.cC,P.YV,P.iL,P.KS,P.$R,P.YZ,P.NB,w.dX,w.aY,D.Kj],styles:[".curl-import-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-width:34rem;max-width:44rem}.curl-import-hint[_ngcontent-%COMP%]{margin:0 0 1rem;opacity:.75}.full-width[_ngcontent-%COMP%]{width:100%}textarea[matInput][_ngcontent-%COMP%]{font-family:monospace;white-space:pre;overflow-x:auto}.curl-import-section[_ngcontent-%COMP%]{font-size:.95rem;font-weight:600;margin:1rem 0 .5rem}.curl-import-summary[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto 1fr;gap:.25rem 1rem;margin:0}.curl-import-summary[_ngcontent-%COMP%] dt[_ngcontent-%COMP%]{font-weight:600}.curl-import-summary[_ngcontent-%COMP%] dd[_ngcontent-%COMP%]{margin:0;overflow-wrap:anywhere}.curl-import-value[_ngcontent-%COMP%]{overflow-wrap:anywhere}.curl-import-error[_ngcontent-%COMP%], .curl-import-warning[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.5rem;padding:.5rem 0}.curl-import-error[_ngcontent-%COMP%]{color:var(--mdc-theme-error, #b3261e)}.curl-import-warnings[_ngcontent-%COMP%]{margin-top:1rem}"]})}}return n})();var ns=g(68788),os=g(29810);let is=(()=>{class n{constructor(t){this.http=t,this.CACHE_KEY="df_dashboard_stats",this.CACHE_DURATION=3e4,this.REFRESH_INTERVAL=9e5,this.stats$=(0,Zt.O)(0,this.REFRESH_INTERVAL).pipe((0,Ce.n)(()=>this.fetchStats()),(0,os.t)(1))}getDashboardStats(){const t=this.getCachedStats();return t?(0,L.of)(t):this.stats$}fetchStats(){const t=(0,K.Ku)(),o={services:this.http.get("/api/v2/system/service?fields=id,name,type&include_count=true",{context:t}),roles:this.http.get("/api/v2/system/role?fields=id,name&include_count=true",{context:t}),appKeys:this.http.get("/api/v2/system/app?include_count=true",{context:t})};return(0,ue.p)(o).pipe((0,z.T)(i=>this.transformResponses(i)),(0,Fe.M)(i=>this.cacheStats(i)),(0,R.W)(()=>(0,L.of)(this.getSimpleStats())))}transformResponses(t){const{services:o,roles:i,appKeys:r}=t,c=["system","api_docs","files","logs","db","email","user","script","ui","schema","api_doc","file","log","admin","df-admin","dreamfactory","cache","push","pub_sub"].map(v=>v.toLowerCase()),s=["admin","api_docs","file_manager"].map(v=>v.toLowerCase()),l=["administrator","user","admin","sys_admin"].map(v=>v.toLowerCase()),p=(o.resource||[]).filter(v=>!c.includes(v.name.toLowerCase())),f=(r.resource||[]).filter(v=>{const F=!!(v.apiKey||v.api_key||v.apikey);return!s.includes(v.name.toLowerCase())&&F}),M=(i.resource||[]).filter(v=>!l.includes(v.name.toLowerCase()));return{services:{total:p.length},apiKeys:{total:f.length},roles:{total:M.length}}}calculateTrend(t,o){return 0===t?0:Math.round((o-t)/t*100)}getCachedStats(){const t=localStorage.getItem(this.CACHE_KEY);if(!t)return null;try{const{data:o,timestamp:i}=JSON.parse(t);if(Date.now()-i{class n{constructor(){this.http=(0,e.WQX)(ee.Qq)}resolveWorkingKeyAndTable(t,o){var i=this;return(0,ve.A)(function*(r,c,s="your_table"){let l=s;if(!c||"number"!=typeof r)return{apiKey:"",sampleTable:l,keys:[]};try{const p=yield i.introspectTables(c);p[0]&&(l=p[0]);const f=yield i.resolveCandidates(r);if(!f.length)return{apiKey:"",sampleTable:l,keys:[]};const M=window.location.origin,v=[],x=[];for(const T of f){const B={label:T.label,apiKey:T.apiKey},_=(T.grantsAll?p:T.tables.filter(y=>p.includes(y))).slice(0,5),C=(T.writeCapable?2:0)+(T.grantsAll?1:0);let k="";for(const y of _)try{if((yield fetch(`${M}${A.C}/${c}/_table/${encodeURIComponent(y)}?limit=1`,{headers:{"X-DreamFactory-API-Key":T.apiKey},credentials:"omit"})).ok){k=y;break}}catch{}k?v.push({option:{...B,verified:!0},table:k,score:C}):x.push(B)}if(!v.length)return{apiKey:"",sampleTable:l,keys:[]};v.sort((T,B)=>T.score-B.score),l=v[0].table;const F=[...v.map(T=>T.option),...x];return{apiKey:F[0].apiKey,sampleTable:l,keys:F}}catch{return{apiKey:"",sampleTable:l,keys:[]}}}).apply(this,arguments)}resolveCandidates(t){var o=this;return(0,ve.A)(function*(){const i=yield(0,kt._)(o.http.get(`${A.C}/system/role?related=role_service_access_by_role_id&limit=200`,{context:(0,K.Ku)()})),r=new Map;for(const p of i?.resource??[]){if(!1===p?.isActive)continue;let f=!1,M=!1;const v=[];for(const x of p?.roleServiceAccessByRoleId??[]){const F=x?.serviceId;if(F!==t&&null!=F)continue;const B=x?.verbMask??0;if(30&B&&(M=!0),!(1&B))continue;const _=x?.component??"";if(""===_||"*"===_||"_table/*"===_)f=!0;else if(_.startsWith("_table/")){const C=_.slice(7).replace(/\/\*$/,"").replace(/\/$/,"");C&&"*"!==C&&v.push(C)}}(f||v.length)&&r.set(p.id,{tables:v,grantsAll:f,writeCapable:M})}if(!r.size)return[];const c=[...r.keys()],s=yield Promise.all(c.map(p=>(0,kt._)(o.http.get(`${A.C}/system/app?filter=role_id=${p}&fields=*`,{context:(0,K.Ku)()})).catch(()=>({resource:[]})))),l=[];return c.forEach((p,f)=>{const M=r.get(p);if(M)for(const v of s[f]?.resource??[])!1===v?.isActive||!v?.apiKey||l.push({label:v.name||"API key",apiKey:v.apiKey,tables:M.tables,grantsAll:M.grantsAll,writeCapable:M.writeCapable})}),l})()}introspectTables(t){var o=this;return(0,ve.A)(function*(){try{return((yield(0,kt._)(o.http.get(`${A.C}/${t}/_table`,{context:(0,K.Ku)()})))?.resource??[]).map(r=>"string"==typeof r?r:r?.name).filter(r=>!!r)}catch{return[]}})()}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275prov=e.jDH({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var yt;const rs=["stepper"],cs=["functionEditor"],ss=["headersEditor"],ls=["unsavedToolDialog"];function ds(n,a){1&n&&(e.EFF(0),e.nI1(1,"transloco")),2&n&&e.SpI(" ",e.bMT(1,1,"services.controls.serviceType.label"),"")}function ps(n,a){if(1&n){const t=e.RV6();e.j41(0,"label",30)(1,"input",31),e.bIt("input",function(){e.eBV(t),e.XpG();const i=e.sdS(2),r=e.XpG();return e.Njj(r.nextStep(i))}),e.k0s(),e.j41(2,"div",32),e.nrm(3,"span",33),e.j41(4,"div",34),e.nrm(5,"img",35),e.j41(6,"h4"),e.EFF(7),e.k0s()()()()}if(2&n){const t=a.$implicit,o=e.XpG(2);e.R7$(1),e.Y8G("value",t.name),e.R7$(1),e.HbH(t.class),e.R7$(3),e.Y8G("src",o.getBackgroundImage(t.name),e.B4B)("alt",t.label),e.R7$(2),e.SpI(" ",t.label," ")}}function ms(n,a){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"button",37),e.bIt("click",function(){e.eBV(t);const i=e.XpG().$implicit,r=e.XpG(2);return e.Njj(r.openDialog(i.label||i.name))}),e.EFF(2," Unlock Now "),e.k0s(),e.bVm()}}function _s(n,a){if(1&n){const t=e.RV6();e.j41(0,"label",30)(1,"input",31),e.bIt("input",function(){e.eBV(t),e.XpG();const i=e.sdS(2),r=e.XpG();return e.Njj(r.nextStep(i))}),e.k0s(),e.j41(2,"div",32),e.nrm(3,"span",33),e.j41(4,"div",34),e.nrm(5,"img",35),e.j41(6,"h4",36),e.EFF(7),e.k0s()()(),e.DNE(8,ms,3,0,"ng-container",24),e.k0s()}if(2&n){const t=a.$implicit,o=e.XpG(2);e.R7$(1),e.Y8G("value",t.name),e.BMQ("disabled",!0),e.R7$(1),e.HbH(t.class),e.R7$(3),e.Y8G("src",o.getBackgroundImage(t.name),e.B4B)("alt",t.label),e.R7$(2),e.SpI(" ",t.label," "),e.R7$(1),e.Y8G("ngIf","not-included"===t.class)}}function gs(n,a){1&n&&e.EFF(0,"Service Details")}function fs(n,a){if(1&n&&(e.j41(0,"mat-form-field",38)(1,"mat-label"),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.nrm(4,"input",39)(5,"fa-icon",11),e.nI1(6,"transloco"),e.j41(7,"mat-hint"),e.EFF(8),e.nI1(9,"transloco"),e.k0s()()),2&n){const t=e.XpG(2);e.R7$(2),e.JRh(e.bMT(3,4,"services.controls.namespace.label")),e.R7$(3),e.Y8G("icon",t.faCircleInfo)("matTooltip",e.bMT(6,6,"services.controls.namespace.tooltip")),e.R7$(3),e.JRh(e.bMT(9,8,"services.controls.namespace.hint"))}}function us(n,a){if(1&n&&(e.j41(0,"mat-form-field",40)(1,"mat-label"),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.nrm(4,"input",41)(5,"fa-icon",11),e.nI1(6,"transloco"),e.k0s()),2&n){const t=e.XpG(2);e.R7$(2),e.JRh(e.bMT(3,3,"services.controls.label.label")),e.R7$(3),e.Y8G("icon",t.faCircleInfo)("matTooltip",e.bMT(6,5,"services.controls.label.tooltip"))}}function hs(n,a){if(1&n&&(e.j41(0,"mat-form-field",42)(1,"mat-label"),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.nrm(4,"textarea",43)(5,"fa-icon",11),e.nI1(6,"transloco"),e.k0s()),2&n){const t=e.XpG(2);e.R7$(2),e.JRh(e.bMT(3,3,"services.controls.description.label")),e.R7$(3),e.Y8G("icon",t.faCircleInfo)("matTooltip",e.bMT(6,5,"services.controls.description.tooltip"))}}function bs(n,a){1&n&&(e.j41(0,"mat-slide-toggle",44),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&n&&(e.R7$(1),e.JRh(e.bMT(2,1,"active")))}function vs(n,a){1&n&&e.EFF(0,"Service Options")}function xs(n,a){if(1&n&&(e.qex(0),e.nrm(1,"df-script-editor",48),e.bVm()),2&n){const t=e.XpG(6);e.R7$(1),e.Y8G("type",t.getControl("type"))("storageServiceId",t.getConfigControl("storageServiceId"))("storagePath",t.getConfigControl("storagePath"))("content",t.getServiceDocByServiceIdControl("content"))("cache",t.serviceData?t.serviceData.name:"")}}function Cs(n,a){if(1&n&&(e.qex(0),e.DNE(1,xs,2,5,"ng-container",24),e.bVm()),2&n){const t=e.XpG(5);e.R7$(1),e.Y8G("ngIf",t.getConfigControl("storageServiceId"))}}const le=function(){return["file_certificate","file_certificate_api"]};function ks(n,a){if(1&n&&e.nrm(0,"df-dynamic-field",51),2&n){const t=e.XpG(2).$implicit,o=e.XpG(4);e.AVh("dynamic-width",-1===e.lJ4(6,le).indexOf(t.type))("full-width",-1!==e.lJ4(7,le).indexOf(t.type)),e.Y8G("schema",t)("formControl",o.getConfigControl(t.name))}}function ys(n,a){if(1&n&&e.nrm(0,"df-array-field",52),2&n){const t=e.XpG(2).$implicit,o=e.XpG(4);e.Y8G("schema",t)("formControl",o.getConfigControl(t.name))}}const ke=function(){return["integer","password","string","text","picklist","multi_picklist","boolean","file_certificate","file_certificate_api"]};function Ms(n,a){if(1&n&&(e.DNE(0,ks,1,8,"df-dynamic-field",49),e.DNE(1,ys,1,2,"df-array-field",50)),2&n){const t=e.XpG().$implicit;e.Y8G("ngIf",e.lJ4(2,ke).includes(t.type)),e.R7$(1),e.Y8G("ngIf","array"===t.type||"object"===t.type)}}function Os(n,a){if(1&n&&(e.qex(0),e.DNE(1,Cs,2,1,"ng-container",1),e.DNE(2,Ms,2,3,"ng-template",null,47,e.C5r),e.bVm()),2&n){const t=a.$implicit,o=e.sdS(3);e.R7$(1),e.Y8G("ngIf","text"===t.type&&"content"===t.name)("ngIfElse",o)}}function Ps(n,a){if(1&n&&(e.qex(0),e.j41(1,"mat-accordion",15)(2,"div",9),e.DNE(3,Os,4,2,"ng-container",46),e.k0s()(),e.bVm()),2&n){const t=e.XpG(3);e.R7$(3),e.Y8G("ngForOf",t.viewSchema)("ngForTrackBy",t.trackByName)}}function Fs(n,a){if(1&n&&e.nrm(0,"df-dynamic-field",51),2&n){const t=e.XpG().$implicit,o=e.XpG(4);e.AVh("dynamic-width","file_certificate"!==t.type)("full-width","file_certificate"===t.type),e.Y8G("schema",t)("formControl",o.getConfigControl(t.name))}}function ws(n,a){if(1&n&&e.nrm(0,"df-array-field",52),2&n){const t=e.XpG().$implicit,o=e.XpG(4);e.Y8G("schema",t)("formControl",o.getConfigControl(t.name))}}function Ds(n,a){if(1&n&&(e.qex(0),e.DNE(1,Fs,1,6,"df-dynamic-field",49),e.DNE(2,ws,1,2,"df-array-field",50),e.bVm()),2&n){const t=a.$implicit;e.R7$(1),e.Y8G("ngIf",e.lJ4(2,ke).includes(t.type)),e.R7$(1),e.Y8G("ngIf","array"===t.type||"object"===t.type)}}function Ts(n,a){if(1&n&&(e.qex(0),e.nrm(1,"df-script-editor",48),e.bVm()),2&n){const t=e.XpG(7);e.R7$(1),e.Y8G("type",t.getControl("type"))("storageServiceId",t.getConfigControl("storageServiceId"))("storagePath",t.getConfigControl("storagePath"))("content",t.getServiceDocByServiceIdControl("content"))("cache",t.serviceData?t.serviceData.name:"")}}function Ss(n,a){if(1&n&&(e.qex(0),e.DNE(1,Ts,2,5,"ng-container",24),e.bVm()),2&n){const t=e.XpG(6);e.R7$(1),e.Y8G("ngIf",t.getConfigControl("storageServiceId"))}}function Rs(n,a){if(1&n&&e.nrm(0,"df-dynamic-field",51),2&n){const t=e.XpG(2).$implicit,o=e.XpG(5);e.AVh("dynamic-width","file_certificate"!==t.type&&"file_certificate_api"!==t.type)("full-width","file_certificate"===t.type||"file_certificate_api"===t.type),e.Y8G("schema",t)("formControl",o.getConfigControl(t.name))}}function Is(n,a){if(1&n&&e.nrm(0,"df-array-field",52),2&n){const t=e.XpG(2).$implicit,o=e.XpG(5);e.Y8G("schema",t)("formControl",o.getConfigControl(t.name))}}function Es(n,a){if(1&n&&(e.DNE(0,Rs,1,6,"df-dynamic-field",49),e.DNE(1,Is,1,2,"df-array-field",50)),2&n){const t=e.XpG().$implicit;e.Y8G("ngIf",e.lJ4(2,ke).includes(t.type)),e.R7$(1),e.Y8G("ngIf","array"===t.type||"object"===t.type)}}function $s(n,a){if(1&n&&(e.qex(0),e.DNE(1,Ss,2,1,"ng-container",1),e.DNE(2,Es,2,3,"ng-template",null,47,e.C5r),e.bVm()),2&n){const t=a.$implicit,o=e.sdS(3);e.R7$(1),e.Y8G("ngIf","text"===t.type&&"content"===t.name)("ngIfElse",o)}}function Gs(n,a){if(1&n&&(e.j41(0,"div",55)(1,"mat-accordion",15)(2,"mat-expansion-panel",56)(3,"mat-expansion-panel-header"),e.EFF(4),e.nI1(5,"transloco"),e.k0s(),e.j41(6,"div",9),e.DNE(7,$s,4,2,"ng-container",46),e.k0s()()()()),2&n){const t=e.XpG(4);e.R7$(2),e.Y8G("expanded",!1),e.R7$(2),e.SpI(" ",e.bMT(5,4,"services.options")," "),e.R7$(3),e.Y8G("ngForOf",t.advancedFields)("ngForTrackBy",t.trackByName)}}function js(n,a){if(1&n&&(e.qex(0),e.j41(1,"div",53),e.DNE(2,Ds,3,3,"ng-container",46),e.k0s(),e.DNE(3,Gs,8,6,"div",54),e.bVm()),2&n){const t=e.XpG(3);e.R7$(2),e.Y8G("ngForOf",t.basicFields)("ngForTrackBy",t.trackByName),e.R7$(1),e.Y8G("ngIf",t.showAdvancedOptions)}}function Ns(n,a){if(1&n&&(e.qex(0)(1,45),e.DNE(2,Ps,4,2,"ng-container",24),e.DNE(3,js,4,3,"ng-container",24),e.bVm()()),2&n){const t=e.XpG(2);e.R7$(2),e.Y8G("ngIf",!t.isDatabase||!t.hasStandardFields),e.R7$(1),e.Y8G("ngIf",t.isDatabase&&t.hasStandardFields)}}function As(n,a){if(1&n&&(e.j41(0,"div",57),e.nrm(1,"fa-icon",58),e.j41(2,"p",59),e.EFF(3),e.nI1(4,"transloco"),e.k0s()()),2&n){const t=e.XpG(2);e.R7$(1),e.Y8G("icon",t.faCircleInfo),e.R7$(2),e.SpI(" ",e.bMT(4,2,"services.firstTimeGuidance")," ")}}function Ys(n,a){if(1&n){const t=e.RV6();e.j41(0,"button",66),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.goToSecurityConfig())}),e.EFF(1),e.nI1(2,"transloco"),e.k0s()}if(2&n){const t=e.XpG(3);e.Y8G("disabled",!t.serviceForm.valid),e.R7$(1),e.SpI(" ",e.bMT(2,2,"services.controls.nextSecurityConfig")," ")}}function Vs(n,a){if(1&n){const t=e.RV6();e.j41(0,"button",67),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.goToSecurityConfig())}),e.EFF(1),e.nI1(2,"transloco"),e.k0s()}if(2&n){const t=e.XpG(3);e.Y8G("disabled",!t.serviceForm.valid),e.R7$(1),e.SpI(" ",e.bMT(2,2,"services.controls.securityConfig")," ")}}function Xs(n,a){1&n&&(e.j41(0,"button",68),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&n&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"services.controls.createAndTest")," "))}function zs(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",60)(1,"button",61),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.goBack())}),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.j41(4,"div",62),e.DNE(5,Ys,3,4,"button",63),e.DNE(6,Vs,3,4,"button",64),e.DNE(7,Xs,3,3,"button",65),e.k0s()()}if(2&n){const t=e.XpG(2);e.R7$(2),e.SpI(" ",e.bMT(3,4,"cancel")," "),e.R7$(3),e.Y8G("ngIf",t.isFirstTimeUser&&t.isDatabase),e.R7$(1),e.Y8G("ngIf",!(t.isFirstTimeUser&&t.isDatabase)),e.R7$(1),e.Y8G("ngIf",!(t.isFirstTimeUser&&t.isDatabase))}}function Bs(n,a){1&n&&e.EFF(0,"Security Configuration")}function Ls(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",9)(1,"df-security-config",69),e.bIt("goBack",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.goBack())}),e.k0s()()}if(2&n){const t=e.XpG(2);let o;e.R7$(1),e.Y8G("serviceName",null==(o=t.serviceForm.get("name"))?null:o.value)("serviceId",t.currentServiceId)("isDatabase",t.isDatabase)("isFirstTimeUser",t.isFirstTimeUser)}}function Us(n,a){1&n&&(e.j41(0,"div",9)(1,"p"),e.EFF(2,' Please complete the previous steps and click "Security Config" to configure security settings. '),e.k0s(),e.j41(3,"div",21)(4,"div")(5,"button",23),e.EFF(6," Back "),e.k0s()()()())}function qs(n,a){1&n&&(e.j41(0,"mat-icon"),e.EFF(1,"1"),e.k0s())}function Ks(n,a){1&n&&(e.j41(0,"mat-icon"),e.EFF(1,"2"),e.k0s())}function Js(n,a){1&n&&(e.j41(0,"mat-icon"),e.EFF(1,"3"),e.k0s())}function Hs(n,a){1&n&&(e.j41(0,"mat-icon"),e.EFF(1,"4"),e.k0s())}function Ws(n,a){1&n&&(e.qex(0,70),e.DNE(1,qs,2,0,"mat-icon",71),e.DNE(2,Ks,2,0,"mat-icon",71),e.DNE(3,Js,2,0,"mat-icon",71),e.DNE(4,Hs,2,0,"mat-icon",71),e.bVm()),2&n&&(e.Y8G("ngSwitch",a.index),e.R7$(1),e.Y8G("ngSwitchCase",0),e.R7$(1),e.Y8G("ngSwitchCase",1),e.R7$(1),e.Y8G("ngSwitchCase",2),e.R7$(1),e.Y8G("ngSwitchCase",3))}function Qs(n,a){1&n&&(e.j41(0,"mat-icon"),e.EFF(1,"1"),e.k0s())}function Zs(n,a){1&n&&(e.j41(0,"mat-icon"),e.EFF(1,"2"),e.k0s())}function el(n,a){1&n&&(e.j41(0,"mat-icon"),e.EFF(1,"3"),e.k0s())}function tl(n,a){1&n&&(e.j41(0,"mat-icon"),e.EFF(1,"4"),e.k0s())}function nl(n,a){1&n&&(e.qex(0,70),e.DNE(1,Qs,2,0,"mat-icon",71),e.DNE(2,Zs,2,0,"mat-icon",71),e.DNE(3,el,2,0,"mat-icon",71),e.DNE(4,tl,2,0,"mat-icon",71),e.bVm()),2&n&&(e.Y8G("ngSwitch",a.index),e.R7$(1),e.Y8G("ngSwitchCase",0),e.R7$(1),e.Y8G("ngSwitchCase",1),e.R7$(1),e.Y8G("ngSwitchCase",2),e.R7$(1),e.Y8G("ngSwitchCase",3))}const Mt=function(){return{standalone:!0}};function ol(n,a){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"mat-stepper",5,6)(3,"mat-step",7),e.DNE(4,ds,2,3,"ng-template",8),e.j41(5,"div",9)(6,"div",10)(7,"h3"),e.EFF(8),e.nI1(9,"transloco"),e.nrm(10,"fa-icon",11),e.nI1(11,"transloco"),e.k0s(),e.j41(12,"div")(13,"button",12),e.EFF(14," Next "),e.k0s()()(),e.j41(15,"mat-form-field",13)(16,"mat-label"),e.EFF(17,"Search service types..."),e.k0s(),e.j41(18,"input",14),e.bIt("ngModelChange",function(i){e.eBV(t);const r=e.XpG();return e.Njj(r.search=i)}),e.k0s()(),e.j41(19,"div",15)(20,"div",16),e.DNE(21,ps,8,6,"label",17),e.DNE(22,_s,9,8,"label",17),e.k0s()(),e.j41(23,"div")(24,"button",12),e.EFF(25," Next "),e.k0s()()()(),e.j41(26,"mat-step"),e.DNE(27,gs,1,0,"ng-template",8),e.nrm(28,"br"),e.j41(29,"div",9),e.DNE(30,fs,10,10,"mat-form-field",18),e.DNE(31,us,7,7,"mat-form-field",19),e.DNE(32,hs,7,7,"mat-form-field",20),e.j41(33,"div",21),e.DNE(34,bs,3,3,"mat-slide-toggle",22),e.j41(35,"div")(36,"button",23),e.EFF(37," Back "),e.k0s(),e.j41(38,"button",12),e.EFF(39," Next "),e.k0s()(),e.nrm(40,"div"),e.k0s()()(),e.j41(41,"mat-step"),e.DNE(42,vs,1,0,"ng-template",8),e.nrm(43,"br"),e.DNE(44,Ns,4,2,"ng-container",24),e.DNE(45,As,5,4,"div",25),e.DNE(46,zs,8,6,"div",26),e.k0s(),e.j41(47,"mat-step"),e.DNE(48,Bs,1,0,"ng-template",8),e.DNE(49,Ls,2,4,"div",27),e.DNE(50,Us,7,0,"div",27),e.k0s(),e.DNE(51,Ws,5,5,"ng-template",28),e.DNE(52,nl,5,5,"ng-template",29),e.k0s(),e.bVm()}if(2&n){const t=e.XpG();let o,i,r;e.R7$(3),e.Y8G("editable",!0),e.R7$(5),e.SpI(" Search for your ",e.bMT(9,22,"services.controls.serviceType.label")," to get started "),e.R7$(2),e.Y8G("icon",t.faCircleInfo)("matTooltip",e.bMT(11,24,"services.controls.serviceType.tooltip")),e.R7$(3),e.Y8G("disabled",""===(null==(o=t.serviceForm.get("type"))?null:o.value)),e.R7$(5),e.Y8G("ngModel",t.search)("ngModelOptions",e.lJ4(26,Mt)),e.R7$(3),e.Y8G("ngForOf",t.filteredServiceTypes)("ngForTrackBy",t.trackByName),e.R7$(1),e.Y8G("ngForOf",t.notIncludedServices)("ngForTrackBy",t.trackByName),e.R7$(2),e.Y8G("disabled",""===(null==(i=t.serviceForm.get("type"))?null:i.value)),e.R7$(6),e.Y8G("ngIf",!t.subscriptionRequired),e.R7$(1),e.Y8G("ngIf",!t.subscriptionRequired),e.R7$(1),e.Y8G("ngIf",!t.subscriptionRequired),e.R7$(2),e.Y8G("ngIf",!t.subscriptionRequired),e.R7$(4),e.Y8G("disabled",""===(null==(r=t.serviceForm.get("type"))?null:r.value)&&""===(null==(r=t.serviceForm.get("description"))?null:r.value)),e.R7$(6),e.Y8G("ngIf",t.viewSchema&&!t.subscriptionRequired),e.R7$(1),e.Y8G("ngIf",t.isFirstTimeUser&&t.isDatabase&&!t.subscriptionRequired),e.R7$(1),e.Y8G("ngIf",!t.subscriptionRequired),e.R7$(3),e.Y8G("ngIf",t.showSecurityConfig),e.R7$(1),e.Y8G("ngIf",!t.showSecurityConfig)}}function il(n,a){if(1&n&&e.nrm(0,"df-service-health-panel",78),2&n){const t=e.XpG(2);e.Y8G("serviceId",t.serviceData.id)("serviceName",t.serviceData.name)("serviceGroup",t.serviceGroup)("deprecated",t.serviceData.deprecated)}}function al(n,a){if(1&n&&(e.j41(0,"section",83),e.nrm(1,"df-page-header",79),e.nI1(2,"transloco"),e.nI1(3,"transloco"),e.nI1(4,"transloco"),e.j41(5,"p",84),e.EFF(6),e.nI1(7,"transloco"),e.k0s(),e.nrm(8,"df-pipeline-strip",85),e.k0s()),2&n){const t=e.XpG(3);e.R7$(1),e.Y8G("eyebrow",e.bMT(2,7,"services.pipeline.eyebrow"))("title",e.bMT(3,9,"services.pipeline.title"))("description",e.bMT(4,11,"services.pipeline.description")),e.R7$(5),e.SpI(" ",e.bMT(7,13,"services.pipeline.hint")," "),e.R7$(2),e.Y8G("serviceId",t.serviceData.id)("serviceName",t.serviceData.name)("serviceType",t.serviceData.type)}}function rl(n,a){if(1&n){const t=e.RV6();e.j41(0,"section",86),e.nrm(1,"df-page-header",79),e.nI1(2,"transloco"),e.nI1(3,"transloco"),e.nI1(4,"transloco"),e.j41(5,"p",87),e.EFF(6),e.nI1(7,"transloco"),e.k0s(),e.j41(8,"df-scope-matrix",88),e.bIt("cellClick",function(i){e.eBV(t);const r=e.XpG(3);return e.Njj(r.onScopeCellClick(i))}),e.k0s()()}if(2&n){const t=e.XpG(3);e.R7$(1),e.Y8G("eyebrow",e.bMT(2,5,"services.access.eyebrow"))("title",e.bMT(3,7,"services.access.title"))("description",e.bMT(4,9,"services.access.description")),e.R7$(5),e.SpI(" ",e.bMT(7,11,"services.access.hint")," "),e.R7$(2),e.Y8G("serviceId",t.serviceData.id)}}function cl(n,a){if(1&n){const t=e.RV6();e.qex(0),e.nrm(1,"df-page-header",79),e.nI1(2,"transloco"),e.nI1(3,"transloco"),e.j41(4,"df-artifact-card",80),e.bIt("createKey",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.onCreateApiKey())}),e.k0s(),e.DNE(5,al,9,15,"section",81),e.DNE(6,rl,9,13,"section",82),e.bVm()}if(2&n){const t=e.XpG(2);e.R7$(1),e.Y8G("eyebrow",e.bMT(2,9,"services.overview.eyebrow"))("title",t.serviceData.label||t.serviceData.name)("description",e.bMT(3,11,"services.overview.description")),e.R7$(3),e.Y8G("serviceName",t.serviceData.name)("baseUrl",t.artifactBaseUrl)("sampleTable",t.artifactSampleTable)("keys",t.artifactKeys),e.R7$(1),e.Y8G("ngIf",t.serviceData.id),e.R7$(1),e.Y8G("ngIf",t.serviceData.id)}}function sl(n,a){if(1&n&&(e.j41(0,"mat-option",89),e.EFF(1),e.k0s()),2&n){const t=a.$implicit;e.Y8G("value",t.name),e.R7$(1),e.SpI(" ",t.label," ")}}function ll(n,a){if(1&n&&(e.j41(0,"mat-form-field",38)(1,"mat-label"),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.nrm(4,"input",39)(5,"fa-icon",11),e.nI1(6,"transloco"),e.k0s()),2&n){const t=e.XpG(2);e.R7$(2),e.JRh(e.bMT(3,3,"services.controls.namespace.label")),e.R7$(3),e.Y8G("icon",t.faCircleInfo)("matTooltip",e.bMT(6,5,"services.controls.namespace.tooltip"))}}function dl(n,a){if(1&n&&(e.j41(0,"mat-option",89),e.EFF(1),e.k0s()),2&n){const t=a.$implicit;e.Y8G("value",t.id),e.R7$(1),e.SpI(" ",t.label||t.name," ")}}function pl(n,a){if(1&n&&(e.qex(0),e.j41(1,"mat-form-field",90)(2,"mat-label"),e.EFF(3,"Storage Service *"),e.k0s(),e.j41(4,"mat-select",91),e.DNE(5,dl,2,2,"mat-option",74),e.k0s()(),e.bVm()),2&n){const t=e.XpG(2);e.R7$(5),e.Y8G("ngForOf",t.availableFileServices)("ngForTrackBy",t.trackById)}}function ml(n,a){if(1&n&&(e.j41(0,"mat-form-field",92)(1,"mat-label"),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.nrm(4,"input",41)(5,"fa-icon",11),e.nI1(6,"transloco"),e.k0s()),2&n){const t=e.XpG(2);e.R7$(2),e.JRh(e.bMT(3,3,"services.controls.label.label")),e.R7$(3),e.Y8G("icon",t.faCircleInfo)("matTooltip",e.bMT(6,5,"services.controls.label.tooltip"))}}function _l(n,a){if(1&n&&(e.j41(0,"mat-form-field",92)(1,"mat-label"),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.nrm(4,"textarea",43)(5,"fa-icon",11),e.nI1(6,"transloco"),e.k0s()),2&n){const t=e.XpG(2);e.R7$(2),e.JRh(e.bMT(3,3,"services.controls.description.label")),e.R7$(3),e.Y8G("icon",t.faCircleInfo)("matTooltip",e.bMT(6,5,"services.controls.description.tooltip"))}}function gl(n,a){1&n&&(e.j41(0,"mat-slide-toggle",93)(1,"span"),e.EFF(2),e.nI1(3,"transloco"),e.k0s()()),2&n&&(e.R7$(2),e.JRh(e.bMT(3,1,"active")))}function fl(n,a){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"button",95),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.gotoSchema())}),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.bVm()}2&n&&(e.R7$(2),e.SpI(" ",e.bMT(3,1,"schema")," "))}function ul(n,a){if(1&n){const t=e.RV6();e.j41(0,"button",95),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.gotoAPIDocs())}),e.EFF(1),e.nI1(2,"transloco"),e.k0s()}2&n&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"apiDocs")," "))}function hl(n,a){if(1&n&&(e.qex(0),e.DNE(1,fl,4,3,"ng-container",1),e.DNE(2,ul,3,3,"ng-template",null,94,e.C5r),e.bVm()),2&n){const t=e.sdS(3),o=e.XpG(2);e.R7$(1),e.Y8G("ngIf",o.isDatabase)("ngIfElse",t)}}function bl(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",97)(1,"button",98),e.bIt("click",function(){e.eBV(t);const i=e.XpG(4);return e.Njj(i.openCurlImport())}),e.nrm(2,"fa-icon",99),e.j41(3,"span"),e.EFF(4),e.nI1(5,"transloco"),e.k0s()(),e.j41(6,"span",100),e.EFF(7),e.nI1(8,"transloco"),e.k0s()()}if(2&n){const t=e.XpG(4);e.R7$(2),e.Y8G("icon",t.faFileImport),e.R7$(2),e.JRh(e.bMT(5,3,"services.curlImport.button")),e.R7$(3),e.SpI(" ",e.bMT(8,5,"services.curlImport.buttonHint")," ")}}function vl(n,a){if(1&n&&e.nrm(0,"df-dynamic-field",102),2&n){const t=e.XpG().$implicit,o=e.XpG(4);e.AVh("dynamic-width",-1===e.lJ4(6,le).indexOf(t.type))("full-width",-1!==e.lJ4(7,le).indexOf(t.type)),e.Y8G("schema",t)("formControl",o.getConfigControl(t.name))}}function xl(n,a){if(1&n&&(e.qex(0),e.DNE(1,vl,1,8,"df-dynamic-field",101),e.bVm()),2&n){const t=a.$implicit;e.R7$(1),e.Y8G("ngIf",e.lJ4(1,ke).includes(t.type))}}function Cl(n,a){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"mat-button-toggle-group",103),e.bIt("ngModelChange",function(i){e.eBV(t);const r=e.XpG(4);return e.Njj(r.serviceDefinitionType=i)})("change",function(){e.eBV(t);const i=e.XpG(4);return e.Njj(i.onServiceDefinitionTypeChange(i.serviceDefinitionType))}),e.j41(2,"mat-button-toggle",104),e.EFF(3,"JSON"),e.k0s(),e.j41(4,"mat-button-toggle",105),e.EFF(5,"YAML"),e.k0s()(),e.bVm()}if(2&n){const t=e.XpG(4);e.R7$(1),e.Y8G("ngModel",t.serviceDefinitionType)("ngModelOptions",e.lJ4(2,Mt))}}function kl(n,a){if(1&n&&(e.qex(0),e.nrm(1,"df-file-github",106),e.bVm()),2&n){const t=e.XpG(4);e.R7$(1),e.Y8G("type",t.getControl("type"))("content",t.getConfigControl("content"))("contentText",t.content)}}function yl(n,a){if(1&n&&(e.qex(0),e.nrm(1,"df-file-github",106),e.bVm()),2&n){const t=e.XpG(4);e.R7$(1),e.Y8G("type",t.getControl("type"))("content",t.getConfigControl("content"))("contentText",t.content)}}function Ml(n,a){if(1&n&&(e.qex(0),e.nrm(1,"df-ace-editor",107),e.bVm()),2&n){const t=e.XpG(4);e.R7$(1),e.Y8G("formControl",t.getConfigControl("content"))("mode",t.serviceDefinitionMode)}}function Ol(n,a){if(1&n&&e.nrm(0,"df-dynamic-field",102),2&n){const t=e.XpG().$implicit,o=e.XpG(4);e.AVh("dynamic-width",-1===e.lJ4(6,le).indexOf(t.type))("full-width",-1!==e.lJ4(7,le).indexOf(t.type)),e.Y8G("schema",t)("formControl",o.getConfigControl(t.name))}}function Pl(n,a){if(1&n&&e.nrm(0,"df-array-field",52),2&n){const t=e.XpG().$implicit,o=e.XpG(4);e.Y8G("schema",t)("formControl",o.getConfigControl(t.name))}}function Fl(n,a){if(1&n&&(e.qex(0),e.DNE(1,Ol,1,8,"df-dynamic-field",101),e.DNE(2,Pl,1,2,"df-array-field",50),e.bVm()),2&n){const t=a.$implicit;e.R7$(1),e.Y8G("ngIf",e.lJ4(2,ke).includes(t.type)),e.R7$(1),e.Y8G("ngIf","array"===t.type||"object"===t.type)}}function wl(n,a){if(1&n&&(e.qex(0),e.DNE(1,bl,9,7,"div",96),e.DNE(2,xl,2,2,"ng-container",46),e.j41(3,"mat-accordion",15)(4,"mat-expansion-panel",56)(5,"mat-expansion-panel-header"),e.EFF(6," Advanced Options "),e.k0s(),e.j41(7,"div",9),e.DNE(8,Cl,6,3,"ng-container",24),e.j41(9,"mat-label",15),e.EFF(10,"Service Definition"),e.k0s(),e.DNE(11,kl,2,3,"ng-container",24),e.DNE(12,yl,2,3,"ng-container",24),e.DNE(13,Ml,2,2,"ng-container",24),e.DNE(14,Fl,3,3,"ng-container",46),e.k0s()()(),e.bVm()),2&n){const t=e.XpG(3);e.R7$(1),e.Y8G("ngIf",t.showCurlImport),e.R7$(1),e.Y8G("ngForOf",t.networkRequiredFields)("ngForTrackBy",t.trackByName),e.R7$(2),e.Y8G("expanded",!1),e.R7$(4),e.Y8G("ngIf","soap"!==t.serviceForm.getRawValue().type),e.R7$(3),e.Y8G("ngIf","rws"===t.serviceForm.getRawValue().type),e.R7$(1),e.Y8G("ngIf","soap"===t.serviceForm.getRawValue().type),e.R7$(1),e.Y8G("ngIf","rest"===t.serviceForm.getRawValue().type||"http"===t.serviceForm.getRawValue().type),e.R7$(1),e.Y8G("ngForOf",t.networkAdvancedFields)("ngForTrackBy",t.trackByName)}}function Dl(n,a){if(1&n&&(e.qex(0),e.nrm(1,"df-script-editor",108),e.bVm()),2&n){const t=e.XpG(4);e.R7$(1),e.Y8G("isScript",t.isScriptService)("type",t.getControl("type"))("storageServiceId",t.getConfigControl("storageServiceId"))("storagePath",t.getConfigControl("storagePath"))("content",t.getConfigControl("content"))("cache",t.serviceData?t.serviceData.name:"")("hideScmActions",!0)}}function Tl(n,a){if(1&n&&e.nrm(0,"df-dynamic-field",102),2&n){const t=e.XpG(2).$implicit,o=e.XpG(4);e.AVh("dynamic-width",-1===e.lJ4(6,le).indexOf(t.type))("full-width",-1!==e.lJ4(7,le).indexOf(t.type)),e.Y8G("schema",t)("formControl",o.getConfigControl(t.name))}}function Sl(n,a){if(1&n&&e.nrm(0,"df-array-field",52),2&n){const t=e.XpG(2).$implicit,o=e.XpG(4);e.Y8G("schema",t)("formControl",o.getConfigControl(t.name))}}function Rl(n,a){if(1&n&&(e.qex(0),e.DNE(1,Tl,1,8,"df-dynamic-field",101),e.DNE(2,Sl,1,2,"df-array-field",50),e.bVm()),2&n){const t=e.XpG().$implicit;e.R7$(1),e.Y8G("ngIf",e.lJ4(2,ke).includes(t.type)),e.R7$(1),e.Y8G("ngIf","array"===t.type||"object"===t.type)}}function Il(n,a){if(1&n&&(e.qex(0),e.DNE(1,Rl,3,3,"ng-container",24),e.bVm()),2&n){const t=a.$implicit;e.R7$(1),e.Y8G("ngIf","content"!==t.name)}}function El(n,a){if(1&n){const t=e.RV6();e.qex(0),e.DNE(1,Dl,2,7,"ng-container",24),e.j41(2,"mat-accordion",15)(3,"mat-expansion-panel",56)(4,"mat-expansion-panel-header"),e.EFF(5," Advanced Options "),e.k0s(),e.j41(6,"div",9)(7,"mat-button-toggle-group",103),e.bIt("ngModelChange",function(i){e.eBV(t);const r=e.XpG(3);return e.Njj(r.serviceDefinitionType=i)})("change",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.onServiceDefinitionTypeChange(i.serviceDefinitionType))}),e.j41(8,"mat-button-toggle",104),e.EFF(9,"JSON"),e.k0s(),e.j41(10,"mat-button-toggle",105),e.EFF(11,"YAML"),e.k0s()(),e.j41(12,"mat-label",15),e.EFF(13,"OpenAPI Service Definition (Optional)"),e.k0s(),e.nrm(14,"df-ace-editor",107),e.DNE(15,Il,2,1,"ng-container",46),e.k0s()()(),e.bVm()}if(2&n){const t=e.XpG(3);e.R7$(1),e.Y8G("ngIf",t.getConfigControl("storageServiceId")),e.R7$(2),e.Y8G("expanded",!1),e.R7$(4),e.Y8G("ngModel",t.serviceDefinitionType)("ngModelOptions",e.lJ4(8,Mt)),e.R7$(7),e.Y8G("formControl",t.getServiceDocByServiceIdControl("content"))("mode",t.serviceDefinitionMode),e.R7$(1),e.Y8G("ngForOf",t.viewSchema)("ngForTrackBy",t.trackByName)}}function $l(n,a){if(1&n){const t=e.RV6();e.j41(0,"df-ai-chat-prereqs",113),e.bIt("selectConnection",function(i){e.eBV(t);const r=e.XpG(4);return e.Njj(r.setAiServiceId(i))})("selectRole",function(i){e.eBV(t);const r=e.XpG(4);return e.Njj(r.setAiRoleId(i))}),e.k0s()}if(2&n){const t=e.XpG(4);e.Y8G("selectedConnectionId",t.aiServiceId)("selectedRoleId",t.aiRoleId)}}function Gl(n,a){if(1&n&&e.nrm(0,"df-ai-data-services",114),2&n){const t=e.XpG(4);e.Y8G("form",t.serviceForm)}}function jl(n,a){if(1&n&&e.nrm(0,"df-ai-mcp-servers",114),2&n){const t=e.XpG(4);e.Y8G("form",t.serviceForm)}}function Nl(n,a){if(1&n&&e.nrm(0,"df-ai-test-connection",115),2&n){const t=e.XpG(4);e.Y8G("form",t.serviceForm)("serviceId",t.edit&&t.serviceData?t.serviceData.id:null)}}function Al(n,a){if(1&n&&e.nrm(0,"df-ai-model-picker",115),2&n){const t=e.XpG(4);e.Y8G("form",t.serviceForm)("serviceId",t.edit&&t.serviceData?t.serviceData.id:null)}}function Yl(n,a){if(1&n&&e.nrm(0,"df-ai-allowed-roles",114),2&n){const t=e.XpG(4);e.Y8G("form",t.serviceForm)}}function Vl(n,a){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"div",116)(2,"input",117,118),e.bIt("change",function(i){e.eBV(t);const r=e.XpG(4);return e.Njj(r.excelUpload(i))}),e.k0s(),e.j41(4,"button",95),e.bIt("click",function(){e.eBV(t);const i=e.sdS(3);return e.Njj(i.click())}),e.EFF(5," Upload Excel "),e.k0s()(),e.nrm(6,"df-ace-editor",107),e.bVm()}if(2&n){const t=e.XpG(4);e.R7$(6),e.Y8G("formControl",t.getConfigControl("excelContent"))("mode",t.excelMode)}}function Xl(n,a){if(1&n&&(e.qex(0),e.nrm(1,"df-script-editor",48),e.bVm()),2&n){const t=e.XpG(7);e.R7$(1),e.Y8G("type",t.getControl("type"))("storageServiceId",t.getConfigControl("storageServiceId"))("storagePath",t.getConfigControl("storagePath"))("content",t.getServiceDocByServiceIdControl("content"))("cache",t.serviceData?t.serviceData.name:"")}}function zl(n,a){if(1&n&&(e.qex(0),e.DNE(1,Xl,2,5,"ng-container",24),e.bVm()),2&n){const t=e.XpG(6);e.R7$(1),e.Y8G("ngIf",t.getConfigControl("storageServiceId"))}}function Bl(n,a){if(1&n&&e.nrm(0,"df-dynamic-field",102),2&n){const t=e.XpG(3).$implicit,o=e.XpG(4);e.AVh("dynamic-width",-1===e.lJ4(6,le).indexOf(t.type))("full-width",-1!==e.lJ4(7,le).indexOf(t.type)),e.Y8G("schema",t)("formControl",o.getConfigControl(t.name))}}function Ll(n,a){if(1&n&&e.nrm(0,"df-array-field",52),2&n){const t=e.XpG(3).$implicit,o=e.XpG(4);e.Y8G("schema",t)("formControl",o.getConfigControl(t.name))}}function Ul(n,a){if(1&n&&(e.DNE(0,Bl,1,8,"df-dynamic-field",101),e.DNE(1,Ll,1,2,"df-array-field",50)),2&n){const t=e.XpG(2).$implicit;e.Y8G("ngIf",e.lJ4(2,ke).includes(t.type)),e.R7$(1),e.Y8G("ngIf","array"===t.type||"object"===t.type)}}function ql(n,a){if(1&n&&(e.qex(0),e.DNE(1,zl,2,1,"ng-container",1),e.DNE(2,Ul,2,3,"ng-template",null,47,e.C5r),e.bVm()),2&n){const t=e.sdS(3),o=e.XpG().$implicit;e.R7$(1),e.Y8G("ngIf","text"===o.type&&"content"===o.name)("ngIfElse",t)}}function Kl(n,a){if(1&n&&(e.qex(0),e.DNE(1,ql,4,2,"ng-container",24),e.bVm()),2&n){const t=a.$implicit,o=e.XpG(4);e.R7$(1),e.Y8G("ngIf",!("ai_chat"===o.serviceForm.getRawValue().type&&("aiServiceId"===t.name||"aiRoleId"===t.name||"mcpServers"===t.name||"defaultDataServices"===t.name)||"ai_connection"===o.serviceForm.getRawValue().type&&("defaultModel"===t.name||"allowedRoles"===t.name)))}}function Jl(n,a){if(1&n&&e.nrm(0,"df-role-scope",119),2&n){const t=e.XpG(4);e.Y8G("roleId",t.aiRoleId)}}function Hl(n,a){if(1&n&&(e.qex(0),e.j41(1,"mat-accordion",15)(2,"mat-expansion-panel",56)(3,"mat-expansion-panel-header"),e.EFF(4),e.nI1(5,"transloco"),e.k0s(),e.j41(6,"div",9),e.DNE(7,$l,1,2,"df-ai-chat-prereqs",109),e.DNE(8,Gl,1,1,"df-ai-data-services",110),e.DNE(9,jl,1,1,"df-ai-mcp-servers",110),e.DNE(10,Nl,1,2,"df-ai-test-connection",111),e.DNE(11,Al,1,2,"df-ai-model-picker",111),e.DNE(12,Yl,1,1,"df-ai-allowed-roles",110),e.DNE(13,Vl,7,2,"ng-container",24),e.DNE(14,Kl,2,1,"ng-container",46),e.DNE(15,Jl,1,1,"df-role-scope",112),e.k0s()()(),e.bVm()),2&n){const t=e.XpG(3);e.R7$(2),e.Y8G("expanded",t.serviceForm.getRawValue().type),e.R7$(2),e.SpI("",e.bMT(5,12,"services.options")," "),e.R7$(3),e.Y8G("ngIf","ai_chat"===t.serviceForm.getRawValue().type),e.R7$(1),e.Y8G("ngIf","ai_chat"===t.serviceForm.getRawValue().type),e.R7$(1),e.Y8G("ngIf","ai_chat"===t.serviceForm.getRawValue().type),e.R7$(1),e.Y8G("ngIf","ai_connection"===t.serviceForm.getRawValue().type),e.R7$(1),e.Y8G("ngIf","ai_connection"===t.serviceForm.getRawValue().type),e.R7$(1),e.Y8G("ngIf","ai_connection"===t.serviceForm.getRawValue().type),e.R7$(1),e.Y8G("ngIf",t.isFile&&"local_file"===t.serviceForm.getRawValue().type),e.R7$(1),e.Y8G("ngForOf",t.viewSchema)("ngForTrackBy",t.trackByName),e.R7$(1),e.Y8G("ngIf","ai_chat"===t.serviceForm.getRawValue().type&&t.aiRoleId)}}function Wl(n,a){if(1&n&&(e.qex(0)(1,45),e.DNE(2,wl,15,10,"ng-container",24),e.DNE(3,El,16,9,"ng-container",24),e.DNE(4,Hl,16,14,"ng-container",24),e.bVm()()),2&n){const t=e.XpG(2);e.R7$(2),e.Y8G("ngIf",t.isNetworkService),e.R7$(1),e.Y8G("ngIf",t.isScriptService),e.R7$(1),e.Y8G("ngIf",!t.isNetworkService&&!t.isScriptService)}}function Ql(n,a){if(1&n){const t=e.RV6();e.j41(0,"tr")(1,"td",125)(2,"mat-slide-toggle",127),e.bIt("change",function(i){const c=e.eBV(t).$implicit,s=e.XpG(3);return e.Njj(s.toggleTool(c.name,i.checked))}),e.k0s()(),e.j41(3,"td")(4,"code"),e.EFF(5),e.k0s()(),e.j41(6,"td"),e.EFF(7),e.k0s()()}if(2&n){const t=a.$implicit,o=e.XpG(3);e.AVh("disabled-row",!o.isToolEnabled(t.name)),e.R7$(2),e.Y8G("checked",o.isToolEnabled(t.name)),e.R7$(3),e.JRh(t.name),e.R7$(2),e.JRh(t.description)}}function Zl(n,a){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"mat-accordion",15)(2,"mat-expansion-panel",56)(3,"mat-expansion-panel-header"),e.EFF(4," Built-in Tools "),e.k0s(),e.j41(5,"div",120)(6,"mat-accordion",121)(7,"mat-expansion-panel",56)(8,"mat-expansion-panel-header")(9,"mat-panel-title",122)(10,"mat-slide-toggle",123),e.bIt("change",function(i){e.eBV(t);const r=e.XpG(2);return e.Njj(r.toggleAllSystemTools(i.checked))})("click",function(i){return i.stopPropagation()}),e.k0s(),e.j41(11,"span"),e.EFF(12,"System API"),e.k0s()(),e.j41(13,"mat-panel-description"),e.EFF(14),e.k0s()(),e.j41(15,"table",124)(16,"thead")(17,"tr"),e.nrm(18,"th",125),e.j41(19,"th"),e.EFF(20,"Tool Name"),e.k0s(),e.j41(21,"th"),e.EFF(22,"Description"),e.k0s()()(),e.j41(23,"tbody"),e.DNE(24,Ql,8,5,"tr",126),e.k0s()()()()()()(),e.bVm()}if(2&n){const t=e.XpG(2);e.R7$(2),e.Y8G("expanded",!0),e.R7$(5),e.Y8G("expanded",!0),e.R7$(3),e.Y8G("checked",t.isAllSystemToolsEnabled()),e.R7$(4),e.SpI(" System API \xb7 ",t.systemMcpTools.length," tools "),e.R7$(10),e.Y8G("ngForOf",t.systemMcpTools)("ngForTrackBy",t.trackByName)}}function ed(n,a){1&n&&(e.j41(0,"div",9)(1,"p"),e.EFF(2,"Loading services..."),e.k0s()())}function td(n,a){1&n&&(e.j41(0,"div",9)(1,"p"),e.EFF(2,"No database or file services found."),e.k0s()())}function nd(n,a){if(1&n){const t=e.RV6();e.j41(0,"tr")(1,"td",125)(2,"mat-slide-toggle",127),e.bIt("change",function(i){const c=e.eBV(t).$implicit,s=e.XpG(4);return e.Njj(s.toggleTool(c.name,i.checked))}),e.k0s()(),e.j41(3,"td")(4,"code"),e.EFF(5),e.k0s()(),e.j41(6,"td"),e.EFF(7),e.k0s()()}if(2&n){const t=a.$implicit,o=e.XpG(4);e.AVh("disabled-row",!o.isToolEnabled(t.name)),e.R7$(2),e.Y8G("checked",o.isToolEnabled(t.name)),e.R7$(3),e.JRh(t.name),e.R7$(2),e.JRh(t.description)}}function od(n,a){if(1&n&&(e.j41(0,"th")(1,"code"),e.EFF(2),e.k0s()()),2&n){const t=a.$implicit;e.R7$(2),e.JRh(t.name)}}function id(n,a){if(1&n){const t=e.RV6();e.j41(0,"td")(1,"mat-slide-toggle",127),e.bIt("change",function(i){const c=e.eBV(t).$implicit,s=e.XpG().$implicit,l=e.XpG(5);return e.Njj(l.toggleVerbFor(s.name,c.name,i.checked))}),e.k0s()()}if(2&n){const t=a.$implicit,o=e.XpG().$implicit,i=e.XpG(5);e.R7$(1),e.Y8G("checked",i.isVerbEnabledFor(o.name,t.name))}}function ad(n,a){if(1&n){const t=e.RV6();e.j41(0,"tr")(1,"td",125)(2,"mat-slide-toggle",127),e.bIt("change",function(i){const c=e.eBV(t).$implicit,s=e.XpG(5);return e.Njj(s.toggleVerbEverywhere(c.name,i.checked))}),e.k0s()(),e.j41(3,"td")(4,"code"),e.EFF(5),e.k0s()(),e.DNE(6,id,2,1,"td",46),e.k0s()}if(2&n){const t=a.$implicit,o=e.XpG(5);e.AVh("disabled-row",!o.isVerbEnabledAnywhere(t.name)),e.R7$(2),e.Y8G("checked",o.isVerbEnabledAnywhere(t.name)),e.R7$(3),e.JRh(t.name),e.R7$(1),e.Y8G("ngForOf",o.dbServices)("ngForTrackBy",o.trackByName)}}function rd(n,a){if(1&n&&(e.j41(0,"mat-expansion-panel",132)(1,"mat-expansion-panel-header")(2,"mat-panel-title",122)(3,"span"),e.EFF(4,"Database Tools (merged)"),e.k0s()(),e.j41(5,"mat-panel-description"),e.EFF(6),e.k0s()(),e.j41(7,"p",9),e.EFF(8," Each verb is registered once and takes a "),e.j41(9,"code"),e.EFF(10,"service"),e.k0s(),e.EFF(11," argument. Turning a verb off for one database removes that database from the tool's allowed services; turning it off everywhere removes the tool. "),e.k0s(),e.j41(12,"table",124)(13,"thead")(14,"tr"),e.nrm(15,"th",125),e.j41(16,"th"),e.EFF(17,"Tool Name"),e.k0s(),e.DNE(18,od,3,1,"th",46),e.k0s()(),e.j41(19,"tbody"),e.DNE(20,ad,7,6,"tr",126),e.k0s()()()),2&n){const t=e.XpG(4);e.R7$(6),e.Lme(" ",t.mergedDbVerbs.length," tools \xb7 ",t.dbServices.length," databases "),e.R7$(12),e.Y8G("ngForOf",t.dbServices)("ngForTrackBy",t.trackByName),e.R7$(2),e.Y8G("ngForOf",t.mergedDbVerbs)("ngForTrackBy",t.trackByName)}}function cd(n,a){if(1&n){const t=e.RV6();e.j41(0,"tr")(1,"td",125)(2,"mat-slide-toggle",127),e.bIt("change",function(i){const c=e.eBV(t).$implicit,s=e.XpG(5);return e.Njj(s.toggleTool(c.name,i.checked))}),e.k0s()(),e.j41(3,"td")(4,"code"),e.EFF(5),e.k0s()(),e.j41(6,"td"),e.EFF(7),e.k0s()()}if(2&n){const t=a.$implicit,o=e.XpG(5);e.AVh("disabled-row",!o.isToolEnabled(t.name)),e.R7$(2),e.Y8G("checked",o.isToolEnabled(t.name)),e.R7$(3),e.JRh(t.name),e.R7$(2),e.JRh(t.description)}}function sd(n,a){if(1&n){const t=e.RV6();e.j41(0,"mat-expansion-panel",56)(1,"mat-expansion-panel-header")(2,"mat-panel-title",122)(3,"mat-slide-toggle",123),e.bIt("change",function(i){const c=e.eBV(t).$implicit,s=e.XpG(4);return e.Njj(s.toggleService(c,i.checked))})("click",function(i){return i.stopPropagation()}),e.k0s(),e.j41(4,"span"),e.EFF(5),e.k0s()(),e.j41(6,"mat-panel-description"),e.EFF(7),e.k0s()(),e.j41(8,"table",124)(9,"thead")(10,"tr"),e.nrm(11,"th",125),e.j41(12,"th"),e.EFF(13,"Tool Name"),e.k0s(),e.j41(14,"th"),e.EFF(15,"Description"),e.k0s()()(),e.j41(16,"tbody"),e.DNE(17,cd,8,5,"tr",126),e.k0s()()()}if(2&n){const t=a.$implicit,o=e.XpG(4);e.Y8G("expanded",t.expanded),e.R7$(3),e.Y8G("checked",o.isServiceEnabled(t)),e.R7$(2),e.JRh(t.label),e.R7$(2),e.Lme(" ",t.category," \xb7 ",t.tools.length," tools "),e.R7$(10),e.Y8G("ngForOf",t.tools)("ngForTrackBy",o.trackByName)}}function ld(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",120)(1,"mat-accordion",121)(2,"mat-expansion-panel")(3,"mat-expansion-panel-header")(4,"mat-panel-title",122)(5,"mat-slide-toggle",123),e.bIt("change",function(i){e.eBV(t);const r=e.XpG(3);return e.Njj(r.toggleAllGlobalTools(i.checked))})("click",function(i){return i.stopPropagation()}),e.k0s(),e.j41(6,"span"),e.EFF(7,"Global Tools"),e.k0s()(),e.j41(8,"mat-panel-description"),e.EFF(9),e.k0s()(),e.j41(10,"table",124)(11,"thead")(12,"tr"),e.nrm(13,"th",125),e.j41(14,"th"),e.EFF(15,"Tool Name"),e.k0s(),e.j41(16,"th"),e.EFF(17,"Description"),e.k0s()()(),e.j41(18,"tbody"),e.DNE(19,nd,8,5,"tr",129),e.k0s()()(),e.DNE(20,rd,21,6,"mat-expansion-panel",130),e.DNE(21,sd,18,7,"mat-expansion-panel",131),e.k0s()()}if(2&n){const t=e.XpG(3);e.R7$(5),e.Y8G("checked",t.isAllGlobalToolsEnabled()),e.R7$(4),e.SpI(" Cross-service \xb7 ",t.mcpGlobalTools.length," tools "),e.R7$(10),e.Y8G("ngForOf",t.mcpGlobalTools),e.R7$(1),e.Y8G("ngIf",t.isMergedStyle&&t.dbServices.length>0),e.R7$(1),e.Y8G("ngForOf",t.visibleServices)("ngForTrackBy",t.trackByName)}}function dd(n,a){if(1&n&&(e.qex(0),e.j41(1,"mat-accordion",15)(2,"mat-expansion-panel",56)(3,"mat-expansion-panel-header"),e.EFF(4," Built-in Tools "),e.k0s(),e.DNE(5,ed,3,0,"div",27),e.DNE(6,td,3,0,"div",27),e.DNE(7,ld,22,6,"div",128),e.k0s()(),e.bVm()),2&n){const t=e.XpG(2);e.R7$(2),e.Y8G("expanded",!0),e.R7$(3),e.Y8G("ngIf",!t.mcpServicesLoaded),e.R7$(1),e.Y8G("ngIf",t.mcpServicesLoaded&&0===t.mcpServices.length&&0===t.mcpGlobalTools.length),e.R7$(1),e.Y8G("ngIf",t.mcpServicesLoaded)}}function pd(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",139)(1,"button",140),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.addCustomTool())}),e.nrm(2,"fa-icon",141),e.EFF(3," Add Custom Tool "),e.k0s()()}if(2&n){const t=e.XpG(3);e.R7$(2),e.Y8G("icon",t.faPlus)}}function md(n,a){1&n&&(e.j41(0,"mat-form-field",161)(1,"mat-label"),e.EFF(2,"HTTP Method"),e.k0s(),e.j41(3,"mat-select",162)(4,"mat-option",163),e.EFF(5,"GET"),e.k0s(),e.j41(6,"mat-option",164),e.EFF(7,"POST"),e.k0s(),e.j41(8,"mat-option",165),e.EFF(9,"PUT"),e.k0s(),e.j41(10,"mat-option",166),e.EFF(11,"PATCH"),e.k0s(),e.j41(12,"mat-option",167),e.EFF(13,"DELETE"),e.k0s()()())}function _d(n,a){if(1&n){const t=e.RV6();e.j41(0,"button",172),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG(5);return e.Njj(c.insertLookup(r.name,"url"))}),e.EFF(1),e.k0s()}if(2&n){const t=a.$implicit;e.R7$(1),e.SpI(" ",t.name," ")}}function gd(n,a){if(1&n&&(e.j41(0,"mat-form-field",90)(1,"mat-label"),e.EFF(2,"URL"),e.k0s(),e.nrm(3,"input",168),e.j41(4,"button",169),e.nrm(5,"fa-icon",99),e.k0s(),e.j41(6,"mat-menu",null,170),e.DNE(8,_d,2,1,"button",171),e.k0s(),e.j41(9,"mat-hint"),e.EFF(10,"Use {LOOKUP_NAME} for secrets or {param} for path parameters"),e.k0s()()),2&n){const t=e.sdS(7),o=e.XpG(4);e.R7$(4),e.Y8G("matMenuTriggerFor",t)("disabled",0===o.availableLookups.length),e.R7$(1),e.Y8G("icon",o.faPlus),e.R7$(3),e.Y8G("ngForOf",o.availableLookups)("ngForTrackBy",o.trackByName)}}function fd(n,a){1&n&&(e.j41(0,"mat-form-field",193)(1,"mat-label"),e.EFF(2,"Location"),e.k0s(),e.j41(3,"mat-select",194)(4,"mat-option",195),e.EFF(5,"query"),e.k0s(),e.j41(6,"mat-option",196),e.EFF(7,"path"),e.k0s(),e.j41(8,"mat-option",197),e.EFF(9,"body"),e.k0s(),e.j41(10,"mat-option",198),e.EFF(11,"header"),e.k0s()()())}function ud(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",175)(1,"div",176)(2,"span",177),e.EFF(3),e.k0s(),e.j41(4,"button",178),e.bIt("click",function(){const r=e.eBV(t).index,c=e.XpG(5);return e.Njj(c.removeToolParameter(r))}),e.nrm(5,"fa-icon",99),e.k0s()(),e.j41(6,"div",179)(7,"mat-form-field",180)(8,"mat-label"),e.EFF(9,"Name"),e.k0s(),e.nrm(10,"input",181),e.k0s(),e.j41(11,"mat-form-field",182)(12,"mat-label"),e.EFF(13,"Type"),e.k0s(),e.j41(14,"mat-select",183)(15,"mat-option",184),e.EFF(16,"string"),e.k0s(),e.j41(17,"mat-option",185),e.EFF(18,"number"),e.k0s(),e.j41(19,"mat-option",186),e.EFF(20,"integer"),e.k0s(),e.j41(21,"mat-option",187),e.EFF(22,"boolean"),e.k0s()()(),e.DNE(23,fd,12,0,"mat-form-field",188),e.j41(24,"div",189)(25,"mat-checkbox",190),e.EFF(26,"Required"),e.k0s()(),e.j41(27,"mat-form-field",191)(28,"mat-label"),e.EFF(29,"Description"),e.k0s(),e.nrm(30,"input",192),e.k0s()()()}if(2&n){const t=a.index,o=e.XpG(5);let i;e.Y8G("formGroupName",t),e.R7$(3),e.SpI("#",t+1,""),e.R7$(2),e.Y8G("icon",o.faTrashCan),e.R7$(18),e.Y8G("ngIf","api"===(null==(i=o.customToolForm.get("toolType"))?null:i.value))}}function hd(n,a){if(1&n&&(e.j41(0,"div",173),e.DNE(1,ud,31,4,"div",174),e.k0s()),2&n){const t=e.XpG(4);e.R7$(1),e.Y8G("ngForOf",t.customToolParameters.controls)}}function bd(n,a){1&n&&(e.j41(0,"p",199),e.EFF(1," No parameters yet. Add one to define inputs for this tool. "),e.k0s())}function vd(n,a){if(1&n&&(e.j41(0,"mat-option",89),e.EFF(1),e.k0s()),2&n){const t=a.$implicit;e.Y8G("value",t.id),e.R7$(1),e.SpI(" ",t.label||t.name," ")}}function xd(n,a){1&n&&(e.j41(0,"div",146)(1,"mat-form-field",204)(2,"mat-label"),e.EFF(3,"Repository"),e.k0s(),e.nrm(4,"input",205),e.k0s(),e.j41(5,"mat-form-field",204)(6,"mat-label"),e.EFF(7,"Branch / Tag"),e.k0s(),e.nrm(8,"input",206),e.k0s(),e.j41(9,"mat-form-field",204)(10,"mat-label"),e.EFF(11,"File Path"),e.k0s(),e.nrm(12,"input",207),e.k0s()())}function Cd(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",208)(1,"button",209),e.bIt("click",function(){e.eBV(t);const i=e.XpG(5);return e.Njj(i.viewLatestScmContent())}),e.EFF(2," View Latest "),e.k0s()()}}function kd(n,a){if(1&n&&(e.j41(0,"div",200)(1,"mat-expansion-panel",56)(2,"mat-expansion-panel-header")(3,"mat-panel-title"),e.EFF(4,"Link to Repository"),e.k0s()(),e.j41(5,"div",146)(6,"mat-form-field",147)(7,"mat-label"),e.EFF(8,"SCM Service"),e.k0s(),e.j41(9,"mat-select",201)(10,"mat-option",89),e.EFF(11,"None"),e.k0s(),e.DNE(12,vd,2,2,"mat-option",74),e.k0s(),e.j41(13,"mat-hint"),e.EFF(14,"Select a GitHub, GitLab, or Bitbucket service"),e.k0s()()(),e.DNE(15,xd,13,0,"div",202),e.DNE(16,Cd,3,0,"div",203),e.k0s()()),2&n){const t=e.XpG(4);let o,i,r;e.Y8G("formGroup",t.customToolForm),e.R7$(1),e.Y8G("expanded",!(null==(o=t.customToolForm.get("storageServiceId"))||!o.value)),e.R7$(9),e.Y8G("value",null),e.R7$(2),e.Y8G("ngForOf",t.availableScmServices)("ngForTrackBy",t.trackById),e.R7$(3),e.Y8G("ngIf",null==(i=t.customToolForm.get("storageServiceId"))?null:i.value),e.R7$(1),e.Y8G("ngIf",null==(r=t.customToolForm.get("storageServiceId"))?null:r.value)}}function yd(n,a){if(1&n){const t=e.RV6();e.j41(0,"button",172),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG(5);return e.Njj(c.insertLookup(r.name,"function"))}),e.EFF(1),e.k0s()}if(2&n){const t=a.$implicit;e.R7$(1),e.SpI(" ",t.name," ")}}function Md(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",210)(1,"div",211)(2,"label",212),e.EFF(3,"Function (JavaScript function body)"),e.k0s(),e.j41(4,"button",213),e.nrm(5,"fa-icon",141),e.EFF(6," Insert Lookup "),e.k0s(),e.j41(7,"mat-menu",null,214),e.DNE(9,yd,2,1,"button",171),e.k0s()(),e.j41(10,"div",215)(11,"df-ace-editor",216,217),e.bIt("valueChange",function(i){e.eBV(t);const r=e.XpG(4);return e.Njj(r.onFunctionChange(i))}),e.k0s()(),e.j41(13,"span",218),e.EFF(14," Write a JavaScript function body. Parameters are available as variables by name. Use "),e.j41(15,"code"),e.EFF(16,"secrets.LOOKUP_NAME"),e.k0s(),e.EFF(17," to reference lookup values. "),e.k0s()()}if(2&n){const t=e.sdS(8),o=e.XpG(4);e.R7$(4),e.Y8G("matMenuTriggerFor",t)("disabled",0===o.availableLookups.length),e.R7$(1),e.Y8G("icon",o.faPlus),e.R7$(4),e.Y8G("ngForOf",o.availableLookups)("ngForTrackBy",o.trackByName),e.R7$(2),e.Y8G("mode",o.functionEditorMode)}}function Od(n,a){if(1&n){const t=e.RV6();e.j41(0,"button",172),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG(5);return e.Njj(c.insertLookup(r.name,"headers"))}),e.EFF(1),e.k0s()}if(2&n){const t=a.$implicit;e.R7$(1),e.SpI(" ",t.name," ")}}function Pd(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",210)(1,"div",211)(2,"label",212),e.EFF(3,"Static Headers (JSON)"),e.k0s(),e.j41(4,"button",213),e.nrm(5,"fa-icon",141),e.EFF(6," Insert Lookup "),e.k0s(),e.j41(7,"mat-menu",null,219),e.DNE(9,Od,2,1,"button",171),e.k0s()(),e.j41(10,"div",220)(11,"df-ace-editor",221,222),e.bIt("valueChange",function(i){e.eBV(t);const r=e.XpG(4);return e.Njj(r.onHeadersChange(i))}),e.k0s()()()}if(2&n){const t=e.sdS(8),o=e.XpG(4);e.R7$(4),e.Y8G("matMenuTriggerFor",t)("disabled",0===o.availableLookups.length),e.R7$(1),e.Y8G("icon",o.faPlus),e.R7$(4),e.Y8G("ngForOf",o.availableLookups)("ngForTrackBy",o.trackByName),e.R7$(2),e.Y8G("mode",o.headersEditorMode)}}function Fd(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",142)(1,"h4"),e.EFF(2),e.k0s(),e.j41(3,"mat-button-toggle-group",143)(4,"mat-button-toggle",144),e.EFF(5,"API"),e.k0s(),e.j41(6,"mat-button-toggle",145),e.EFF(7,"Function"),e.k0s()(),e.j41(8,"div",146)(9,"mat-form-field",147)(10,"mat-label"),e.EFF(11,"Tool Name"),e.k0s(),e.nrm(12,"input",148),e.j41(13,"mat-hint"),e.EFF(14,"Letters, numbers, and underscores only"),e.k0s()(),e.DNE(15,md,14,0,"mat-form-field",149),e.k0s(),e.DNE(16,gd,11,5,"mat-form-field",150),e.j41(17,"mat-form-field",90)(18,"mat-label"),e.EFF(19,"Description"),e.k0s(),e.nrm(20,"textarea",151),e.j41(21,"mat-hint"),e.EFF(22,"This description is shown to the LLM"),e.k0s()(),e.j41(23,"div",152)(24,"div",10)(25,"h5"),e.EFF(26,"Parameters"),e.k0s(),e.j41(27,"button",153),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.addToolParameter())}),e.nrm(28,"fa-icon",141),e.EFF(29," Add Parameter "),e.k0s()(),e.DNE(30,hd,2,1,"div",154),e.DNE(31,bd,2,0,"p",155),e.k0s(),e.DNE(32,kd,17,7,"div",156),e.DNE(33,Md,18,6,"div",157),e.DNE(34,Pd,13,6,"div",157),e.j41(35,"div",158)(36,"button",159),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.cancelCustomToolEdit())}),e.EFF(37," Cancel "),e.k0s(),e.j41(38,"button",160),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.saveCustomTool())}),e.EFF(39),e.k0s()()()}if(2&n){const t=e.XpG(3);let o,i,r,c,s;e.Y8G("formGroup",t.customToolForm),e.R7$(2),e.SpI(" ",-1===t.editingToolIndex?"Add Custom Tool":"Edit Custom Tool"," "),e.R7$(13),e.Y8G("ngIf","api"===(null==(o=t.customToolForm.get("toolType"))?null:o.value)),e.R7$(1),e.Y8G("ngIf","api"===(null==(i=t.customToolForm.get("toolType"))?null:i.value)),e.R7$(12),e.Y8G("icon",t.faPlus),e.R7$(2),e.Y8G("ngIf",t.customToolParameters.length>0),e.R7$(1),e.Y8G("ngIf",0===t.customToolParameters.length),e.R7$(1),e.Y8G("ngIf","function"===(null==(r=t.customToolForm.get("toolType"))?null:r.value)&&t.availableScmServices.length>0),e.R7$(1),e.Y8G("ngIf","function"===(null==(c=t.customToolForm.get("toolType"))?null:c.value)),e.R7$(1),e.Y8G("ngIf","api"===(null==(s=t.customToolForm.get("toolType"))?null:s.value)),e.R7$(4),e.Y8G("disabled",t.customToolForm.invalid),e.R7$(1),e.SpI(" ",-1===t.editingToolIndex?"Add":"Update"," ")}}function wd(n,a){if(1&n&&(e.qex(0),e.j41(1,"code"),e.EFF(2),e.k0s(),e.EFF(3),e.bVm()),2&n){const t=e.XpG().$implicit;e.R7$(2),e.JRh(t.httpMethod),e.R7$(1),e.SpI(" ",t.url," ")}}function Dd(n,a){1&n&&(e.j41(0,"em"),e.EFF(1,"Function"),e.k0s())}function Td(n,a){if(1&n&&(e.j41(0,"em"),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2).$implicit;e.R7$(1),e.Lme("SCM: ",t.scmRepository,"/",t.storagePath,"")}}function Sd(n,a){if(1&n&&(e.qex(0),e.DNE(1,Dd,2,0,"em",24),e.DNE(2,Td,2,2,"em",24),e.bVm()),2&n){const t=e.XpG().$implicit;e.R7$(1),e.Y8G("ngIf",!t.storageServiceId),e.R7$(1),e.Y8G("ngIf",t.storageServiceId)}}function Rd(n,a){if(1&n){const t=e.RV6();e.j41(0,"tr")(1,"td",125)(2,"mat-slide-toggle",127),e.bIt("change",function(i){const c=e.eBV(t).index,s=e.XpG(4);return e.Njj(s.toggleCustomTool(c,i.checked))}),e.k0s()(),e.j41(3,"td")(4,"code"),e.EFF(5),e.k0s()(),e.j41(6,"td")(7,"code"),e.EFF(8),e.k0s()(),e.j41(9,"td",224),e.DNE(10,wd,4,2,"ng-container",24),e.DNE(11,Sd,3,2,"ng-container",24),e.k0s(),e.j41(12,"td"),e.EFF(13),e.k0s(),e.j41(14,"td",223)(15,"div",225)(16,"button",226),e.bIt("click",function(){const r=e.eBV(t).index,c=e.XpG(4);return e.Njj(c.editCustomTool(r))}),e.nrm(17,"fa-icon",99),e.k0s(),e.j41(18,"button",227),e.bIt("click",function(){const r=e.eBV(t).index,c=e.XpG(4);return e.Njj(c.deleteCustomTool(r))}),e.nrm(19,"fa-icon",99),e.k0s()()()()}if(2&n){const t=a.$implicit,o=e.XpG(4);e.AVh("disabled-row",!t.enabled),e.R7$(2),e.Y8G("checked",t.enabled),e.R7$(3),e.JRh(t.name),e.R7$(3),e.JRh((t.toolType||"api").toUpperCase()),e.R7$(2),e.Y8G("ngIf","api"===(t.toolType||"api")),e.R7$(1),e.Y8G("ngIf","function"===t.toolType),e.R7$(2),e.JRh(t.description),e.R7$(3),e.Y8G("disabled",null!==o.editingToolIndex),e.R7$(1),e.Y8G("icon",o.faPenToSquare),e.R7$(1),e.Y8G("disabled",null!==o.editingToolIndex),e.R7$(1),e.Y8G("icon",o.faTrashCan)}}function Id(n,a){if(1&n&&(e.j41(0,"table",124)(1,"thead")(2,"tr"),e.nrm(3,"th",125),e.j41(4,"th"),e.EFF(5,"Name"),e.k0s(),e.j41(6,"th"),e.EFF(7,"Type"),e.k0s(),e.j41(8,"th"),e.EFF(9,"Method / URL"),e.k0s(),e.j41(10,"th"),e.EFF(11,"Description"),e.k0s(),e.nrm(12,"th",223),e.k0s()(),e.j41(13,"tbody"),e.DNE(14,Rd,20,12,"tr",129),e.k0s()()),2&n){const t=e.XpG(3);e.R7$(14),e.Y8G("ngForOf",t.customTools)}}function Ed(n,a){1&n&&(e.j41(0,"p",228),e.EFF(1,' No custom tools defined. Click "Add Custom Tool" to create one. '),e.k0s())}function $d(n,a){if(1&n&&(e.qex(0),e.j41(1,"mat-accordion",15)(2,"mat-expansion-panel",56)(3,"mat-expansion-panel-header"),e.EFF(4," Custom Tools "),e.k0s(),e.j41(5,"div",133)(6,"p",134),e.EFF(7," Define custom tools that make HTTP requests to external APIs or execute server-side functions. These tools will be available to MCP clients alongside the built-in DreamFactory tools. "),e.k0s(),e.DNE(8,pd,4,1,"div",135),e.DNE(9,Fd,40,12,"div",136),e.DNE(10,Id,15,1,"table",137),e.DNE(11,Ed,2,0,"p",138),e.k0s()()(),e.bVm()),2&n){const t=e.XpG(2);e.R7$(2),e.Y8G("expanded",t.customTools.length>0),e.R7$(6),e.Y8G("ngIf",null===t.editingToolIndex),e.R7$(1),e.Y8G("ngIf",null!==t.editingToolIndex),e.R7$(1),e.Y8G("ngIf",t.customTools.length>0),e.R7$(1),e.Y8G("ngIf",0===t.customTools.length&&null===t.editingToolIndex)}}function Gd(n,a){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"button",229),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.save(!0,!1))}),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.j41(4,"button",229),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.save(!0,!0))}),e.EFF(5),e.nI1(6,"transloco"),e.k0s(),e.bVm()}2&n&&(e.R7$(1),e.Y8G("value",!0),e.R7$(1),e.SpI(" ",e.bMT(3,4,"saveAndClear")," "),e.R7$(2),e.Y8G("value",!0),e.R7$(1),e.SpI(" ",e.bMT(6,6,"saveAndContinue")," "))}function jd(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",60)(1,"button",61),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.goBack())}),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.DNE(4,Gd,7,8,"ng-container",24),e.j41(5,"button",68),e.EFF(6),e.nI1(7,"transloco"),e.k0s()()}if(2&n){const t=e.XpG(2);e.R7$(2),e.SpI(" ",e.bMT(3,3,"cancel")," "),e.R7$(2),e.Y8G("ngIf",t.edit),e.R7$(2),e.SpI(" ",e.bMT(7,5,"save")," ")}}function Nd(n,a){if(1&n){const t=e.RV6();e.DNE(0,il,1,4,"df-service-health-panel",72),e.DNE(1,cl,7,13,"ng-container",24),e.j41(2,"mat-form-field",38)(3,"mat-label"),e.EFF(4),e.nI1(5,"transloco"),e.k0s(),e.j41(6,"mat-select",73),e.bIt("selectionChange",function(i){e.eBV(t);const r=e.XpG();return e.Njj(r.onServiceTypeSelect(r.getServiceTypeLabel(i.value)))}),e.DNE(7,sl,2,2,"mat-option",74),e.k0s(),e.nrm(8,"fa-icon",11),e.nI1(9,"transloco"),e.k0s(),e.DNE(10,ll,7,7,"mat-form-field",18),e.DNE(11,pl,6,2,"ng-container",24),e.DNE(12,ml,7,7,"mat-form-field",75),e.DNE(13,_l,7,7,"mat-form-field",76),e.DNE(14,gl,4,3,"mat-slide-toggle",77),e.j41(15,"div",15),e.DNE(16,hl,4,2,"ng-container",24),e.k0s(),e.DNE(17,Wl,5,3,"ng-container",24),e.DNE(18,Zl,25,6,"ng-container",24),e.DNE(19,dd,8,4,"ng-container",24),e.DNE(20,$d,12,5,"ng-container",24),e.DNE(21,jd,8,7,"div",26)}if(2&n){const t=e.XpG();e.Y8G("ngIf",t.edit&&(null==t.serviceData?null:t.serviceData.id)&&!t.isPlatformService),e.R7$(1),e.Y8G("ngIf",t.edit&&t.isDatabase&&t.serviceData),e.R7$(3),e.JRh(e.bMT(5,18,"services.controls.serviceType.label")),e.R7$(3),e.Y8G("ngForOf",t.serviceTypes)("ngForTrackBy",t.trackByName),e.R7$(1),e.Y8G("icon",t.faCircleInfo)("matTooltip",e.bMT(9,20,"services.controls.serviceType.tooltip")),e.R7$(2),e.Y8G("ngIf",!t.subscriptionRequired),e.R7$(1),e.Y8G("ngIf","excel"===t.serviceForm.getRawValue().type),e.R7$(1),e.Y8G("ngIf",!t.subscriptionRequired),e.R7$(1),e.Y8G("ngIf",!t.subscriptionRequired),e.R7$(1),e.Y8G("ngIf",!t.subscriptionRequired),e.R7$(2),e.Y8G("ngIf",t.edit),e.R7$(1),e.Y8G("ngIf",t.viewSchema&&!t.subscriptionRequired),e.R7$(1),e.Y8G("ngIf",t.isMcp&&t.isSystemMcp&&t.edit),e.R7$(1),e.Y8G("ngIf",t.isMcp&&!t.isSystemMcp&&t.edit),e.R7$(1),e.Y8G("ngIf",t.isMcp&&!t.isSystemMcp&&t.edit),e.R7$(1),e.Y8G("ngIf",!t.subscriptionRequired)}}function Ad(n,a){if(1&n&&e.nrm(0,"df-paywall",230),2&n){const t=e.XpG();e.Y8G("serviceName",t.selectedServiceTypeLable||"Unable to fetch service name")}}function Yd(n,a){if(1&n){const t=e.RV6();e.j41(0,"h1",231),e.EFF(1,"Unsaved custom tool"),e.k0s(),e.j41(2,"div",232),e.EFF(3," You have unsaved changes in the custom tool editor. Saving the service now will discard those changes unless you add/update the tool first. "),e.k0s(),e.j41(4,"div",233)(5,"button",234),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.closeUnsavedToolDialog("cancel"))}),e.EFF(6," Keep editing "),e.k0s(),e.j41(7,"button",235),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.closeUnsavedToolDialog("discard"))}),e.EFF(8," Discard tool changes "),e.k0s(),e.j41(9,"button",236),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.closeUnsavedToolDialog("save"))}),e.EFF(10," Add/Update tool, then save "),e.k0s()()}}let Ot=class Ut{static{yt=this}constructor(a,t,o,i,r,c,s,l,p,f,M,v,x,F,T){this.activatedRoute=a,this.fb=t,this.servicesService=o,this.cacheService=i,this.router=r,this.systemConfigDataService=c,this.http=s,this.dialog=l,this.themeService=p,this.snackbarService=f,this.currentServiceService=M,this.snackBar=v,this.systemService=x,this.analyticsService=F,this.artifactResolver=T,this.edit=!1,this.isDatabase=!1,this.isPlatformService=!1,this.serviceGroup=null,this.isNetworkService=!1,this.isScriptService=!1,this.isFile=!1,this.isAuth=!1,this.isMcp=!1,this.isSystemMcp=!1,this.systemMcpTools=ie,this.faCircleInfo=b.mEO,this.faPenToSquare=b.LFz,this.faTrashCan=b.sjs,this.faPlus=b.QLR,this.faFileImport=b.$MS,this.search="",this.content="",this.showSecurityConfig=!1,this.currentServiceId=null,this.isFirstTimeUser=!1,this.artifactKeys=[],this.artifactSampleTable="your_table",this.availableFileServices=[],this.mcpServices=[],this.mcpServicesLoaded=!1,this.disabledTools=new Set,this.mcpGlobalTools=[{name:"list_apis",title:"List Available APIs",description:"List all available database APIs and their tool prefixes"},{name:"all_get_tables",title:"Get Tables from All Databases",description:"Retrieve tables from all connected database services in one call"},{name:"all_find_table",title:"Find Table Across Databases",description:"Search for a table by name across all connected databases"},{name:"all_get_stored_procedures",title:"Get Stored Procedures from All",description:"Retrieve stored procedures from all connected databases"},{name:"all_get_stored_functions",title:"Get Stored Functions from All",description:"Retrieve stored functions from all connected databases"},{name:"all_get_resources",title:"Get Resources from All",description:"Retrieve all available resources from all connected databases"},{name:"all_list_files",title:"List Files from All Storage",description:"List files from all connected file storage services"},{name:"search",title:"Search (stub)",description:"Stub search implementation for connectors that require it"},{name:"fetch",title:"Fetch (stub)",description:"Stub fetch implementation for connectors that require it"}],this.customTools=[],this.editingToolIndex=null,this.availableLookups=[],this.availableScmServices=[],this.unsavedToolDialogRef=null,this.liveHeadersValue=null,this.liveFunctionValue=null,this.isDarkMode=this.themeService.darkMode$,this.toolStyle="prefixed",this.schemaMemoSrc=null,this.schemaMemoIsDatabase=null,this.schemaMemoIsNetwork=null,this.memoViewSchema=[],this.memoHasStandardFields=!1,this.memoBasicFields=[],this.memoAdvancedFields=[],this.memoNetworkRequiredFields=[],this.memoNetworkAdvancedFields=[],this.trackByName=(_,C)=>C.name,this.trackById=(_,C)=>C.id,this.warnings=[],this.memoServiceTypesSrc=null,this.memoServiceTypesSearch=null,this.memoFilteredServiceTypes=[],this.serviceForm=this.fb.group({type:["",m.k0.required],name:["",m.k0.required],label:[""],description:[""],isActive:[!0],storageServiceId:[null],config:this.fb.group({}),service_doc_by_service_id:this.fb.group({format:[0],content:[""]})}),this.customToolForm=this.fb.group({toolType:["api"],name:["",[m.k0.required,m.k0.pattern(/^[a-zA-Z0-9_]+$/)]],description:["",m.k0.required],httpMethod:["GET"],url:["",m.k0.required],parameters:this.fb.array([]),headers:["{}"],function:[""],enabled:[!0],storageServiceId:[null],scmRepository:[""],scmReference:[""],storagePath:[""]}),this.customToolForm.get("toolType").valueChanges.subscribe(_=>{const C=this.customToolForm.get("url"),k=this.customToolForm.get("function");if("function"===_){C.clearValidators();const y=!!this.customToolForm.get("storageServiceId")?.value;k.setValidators(y?[]:[m.k0.required])}else C.setValidators(m.k0.required),k.clearValidators();C.updateValueAndValidity(),k.updateValueAndValidity()}),this.customToolForm.get("storageServiceId").valueChanges.subscribe(_=>{const C=this.customToolForm.get("function");"function"===this.customToolForm.get("toolType")?.value&&(C.setValidators(_?[]:[m.k0.required]),C.updateValueAndValidity())}),this.activatedRoute.snapshot.paramMap.get("id")&&(this.edit=!0)}ngOnInit(){this.edit||this.analyticsService.getDashboardStats().subscribe(a=>{this.isFirstTimeUser=0===a.services.total}),this.http.get("assets/img/databaseImages.json").subscribe(a=>{this.images=a}),this.http.get(`${A.C}/system/lookup`,{params:{fields:"name",limit:"100"}}).subscribe(a=>{this.availableLookups=a?.resource??[]}),this.systemConfigDataService.environment$.pipe((0,Ce.n)(a=>this.activatedRoute.data.pipe((0,z.T)(t=>({env:a,route:t}))))).subscribe(({env:a,route:t})=>{t.groups&&"Database"===t.groups[0]&&(this.isDatabase=!0),t.groups&&"Remote Service"===t.groups[0]&&(this.isNetworkService=!0),t.groups&&"Script"===t.groups[0]&&(this.isScriptService=!0),t.groups&&"File"===t.groups[0]&&(this.isFile=!0),t.groups&&"LDAP"===t.groups[0]&&(this.isAuth=!0),t.groups&&"MCP"===t.groups[0]&&(this.isMcp=!0),this.serviceGroup=t.groups?.[0]??null,this.isPlatformService=t.system||this.activatedRoute.snapshot.parent?.data?.system||!1;const{data:o,serviceTypes:i,groups:r}=t,c=a.platform?.license;if(this.serviceTypes=i.filter(s=>"python"!==s.name.toLowerCase()),this.notIncludedServices=[],this.snackbarService.setSnackbarLastEle(o&&(o.label||o.name)?o.label?o.label:o.name:"Unknown label",!1),this.edit&&o&&this.snackbarService.setPageLabel(this.router.url,o.label||o.name||String(o.id??"")),this.isDatabase?("SILVER"===c&&this.notIncludedServices.push(...Re.Ky.map(s=>(s.class="not-included",s)).filter(s=>r.includes(s.group))),"OPEN SOURCE"===c&&this.notIncludedServices.push(...Re.F8.map(s=>(s.class="not-included",s)).filter(s=>r.includes(s.group)),...Re.Ky.map(s=>(s.class="not-included",s)).filter(s=>r.includes(s.group)))):("SILVER"===c&&this.serviceTypes.push(...Re.Ky.filter(s=>r.includes(s.group))),"OPEN SOURCE"===c&&this.serviceTypes.push(...Re.F8.filter(s=>r.includes(s.group)),...Re.Ky.filter(s=>r.includes(s.group)))),o?.serviceDocByServiceId)if(this.isNetworkService)o.config.serviceDefinition=o?.serviceDocByServiceId.content,this.getServiceDocByServiceIdControl("content").setValue(o?.serviceDocByServiceId.content);else if(this.isScriptService){o.config||(o.config={});const s=l=>{if(!l)return!1;const p=l.trim();return[/^\s*\{?\s*["']?openapi["']?\s*:/i,/^\s*\{?\s*["']?swagger["']?\s*:/i,/^\s*openapi\s*:/im,/^\s*swagger\s*:/im,/["']paths["']\s*:\s*\{/i,/^\s*paths\s*:/im].some(M=>M.test(p))};o.config.content&&""!==o.config.content.trim()?this.getServiceDocByServiceIdControl("content").setValue(o?.serviceDocByServiceId.content||""):o.serviceDocByServiceId?.content&&(s(o.serviceDocByServiceId.content)?this.getServiceDocByServiceIdControl("content").setValue(o.serviceDocByServiceId.content):(o.config.content=o.serviceDocByServiceId.content,this.getServiceDocByServiceIdControl("content").setValue("")))}else this.getServiceDocByServiceIdControl("content").setValue(o?.serviceDocByServiceId.content);if(this.serviceData=o,this.content=o?this.isScriptService?o.config.content||"":o.config.serviceDefinition||"":"",this.edit){if(this.configSchema=this.getConfigSchema(o.type),this.initializeConfig(""),"excel"===o.type){console.log("Editing Excel service, data:",o),console.log("Config:",o.config),console.log("Storage service ID from config:",o.config?.storageServiceId);const s=o.config?.storageServiceId;this.loadAvailableFileServices(()=>{console.log("File services loaded, now setting form value"),s?(console.log("Setting storageServiceId to:",s),this.serviceForm.patchValue({...o,config:o.config,storageServiceId:s})):(console.log("No storageServiceId found in config"),this.serviceForm.patchValue({...o,config:o.config}))})}else this.serviceForm.patchValue({...o,config:o.config});o?.serviceDocByServiceId&&(this.serviceDefinitionType=""+o?.serviceDocByServiceId.format,this.isNetworkService&&(this.getConfigControl("content")?.setValue(o.serviceDocByServiceId.content),this.content=o.serviceDocByServiceId.content||"")),this.serviceForm.controls.type.disable()}else this.serviceForm.controls.type.valueChanges.subscribe(s=>{this.serviceForm.removeControl("config"),this.configSchema=this.getConfigSchema(s),this.updateServiceTypeFlags(s),this.initializeConfig(s),"excel"===s&&this.loadAvailableFileServices()});this.edit&&"excel"===o?.type&&this.loadAvailableFileServices(),this.edit&&this.isMcp&&(this.isSystemMcp=Wt(o?.type),this.disabledTools=new Set(o?.config?.disabledTools??[]),this.toolStyle="merged"===o?.config?.toolStyle?"merged":"prefixed",this.isSystemMcp?(this.customTools=[],this.mcpServicesLoaded=!0):(this.customTools=(o?.config?.customTools??[]).map(l=>({id:l.id,toolType:l.toolType||"api",name:l.name,description:l.description,httpMethod:l.httpMethod,url:l.url,parameters:l.parameters||[],headers:l.headers||{},function:l.function||"",enabled:!1!==l.enabled&&0!==l.enabled,storageServiceId:l.storageServiceId||null,scmRepository:l.scmRepository||"",scmReference:l.scmReference||"",storagePath:l.storagePath||""})),this.loadMcpServices(),this.getConfigControl("toolStyle")?.valueChanges.subscribe(l=>{this.toolStyle="merged"===l?"merged":"prefixed"}),this.loadAvailableScmServices())),this.edit&&this.isDatabase&&this.serviceData&&this.loadArtifactCardData()}),this.isDatabase&&this.serviceForm.controls.type.valueChanges.subscribe(a=>{this.serviceForm.patchValue({label:a})})}getStorageServiceDisplayName(){console.log("=== getStorageServiceDisplayName called ==="),console.log("this.edit:",this.edit),console.log("this.serviceData:",this.serviceData),console.log("this.availableFileServices:",this.availableFileServices);let a=this.serviceForm.get("storageServiceId")?.value;if(console.log("storageServiceId from form:",a),!a&&this.edit&&this.serviceData?.config?.storageServiceId&&(a=this.serviceData.config.storageServiceId,console.log("storageServiceId from serviceData.config.storageServiceId:",a)),console.log("this.serviceData.config:",this.serviceData?.config),console.log("this.serviceData.config?.storageServiceId:",this.serviceData?.config?.storageServiceId),!a)return console.log("No storageServiceId found, returning default message"),"No storage service selected";const t=this.availableFileServices.find(o=>o.id===a);if(console.log("selectedService found:",t),t){const o=t.label||t.name;return console.log("Returning display name:",o),o}return console.log("Service not found in availableFileServices, returning ID"),`Service ID: ${a}`}loadAvailableFileServices(a){console.log("=== loadAvailableFileServices called ==="),console.log("Current service form type:",this.serviceForm.getRawValue().type),console.log("Available file services before loading:",this.availableFileServices);let t="";const o=localStorage.getItem("df_token")||localStorage.getItem("X-DreamFactory-API-Key")||sessionStorage.getItem("df_token");if(o)t=`X-DreamFactory-API-Key: ${o}`;else{const l=document.cookie.split(";");let p="",f="";for(const M of l){const[v,x]=M.trim().split("=");("df_session_token"===v||"session_token"===v)&&(p=x),("df_api_key"===v||"api_key"===v)&&(f=x)}p?t=`X-DreamFactory-Session-Token: ${p}`:f?t=`X-DreamFactory-API-Key: ${f}`:window.dfAuthToken?t=`X-DreamFactory-API-Key: ${window.dfAuthToken}`:window.dreamFactoryToken&&(t=`X-DreamFactory-API-Key: ${window.dreamFactoryToken}`)}if(!t)return console.warn("No authentication method found, cannot load file services"),this.availableFileServices=[],void(a&&a());const i=`${window.location.origin}/api/v2/system/service`,[r,c]=t.split(": "),s={};r&&c&&(s[r]=c),this.http.get(i,{params:{filter:"type=local_file",fields:"id,name,label,type"},headers:s}).subscribe({next:l=>{l.resource&&Array.isArray(l.resource)?(this.availableFileServices=l.resource,console.log("File services loaded successfully:",this.availableFileServices)):(console.warn("No file services found in response or invalid format"),this.availableFileServices=[]),a&&a()},error:l=>{console.error("Failed to load file services:",l),this.http.get(i,{params:{fields:"id,name,label,type"},headers:s}).subscribe({next:p=>{p.resource&&Array.isArray(p.resource)?(this.availableFileServices=p.resource.filter(M=>M.type&&("local_file"===M.type||"file"===M.type||M.type.includes("file"))),console.log("File services loaded via fallback:",this.availableFileServices)):this.availableFileServices=[],a&&a()},error:p=>{console.error("Fallback also failed:",p),this.availableFileServices=[],a&&a()}})}})}loadMcpServices(){this.mcpServicesLoaded||this.http.get("/api/v2/system/service_type",{params:{fields:"name,group"}}).pipe((0,Ce.n)(a=>{const t=a?.resource??[],o=new Set(t.filter(r=>"Database"===r.group).map(r=>r.name)),i=new Set(t.filter(r=>"File"===r.group).map(r=>r.name));return this.http.get("/api/v2/system/service",{params:{fields:"name,label,type,is_active"}}).pipe((0,z.T)(r=>(r?.resource??[]).filter(s=>!1!==s.isActive&&(o.has(s.type)||i.has(s.type))).map(s=>{const l=o.has(s.type)?"Database":"File",p=this.sanitizeApiName(s.name);return{name:s.name,label:s.label||s.name,type:s.type,category:l,tools:this.buildToolList(p,l),expanded:!1}})))})).subscribe({next:a=>{this.mcpServices=a,this.mcpServicesLoaded=!0},error:a=>{console.error("Failed to load MCP services:",a),this.mcpServicesLoaded=!0}})}buildToolList(a,t){return"Database"===t?[{name:`${a}_get_tables`,title:"List Tables",description:"Get tables available in the database"},{name:`${a}_get_table_schema`,title:"Get Table Schema",description:"Retrieve the schema of a specific table"},{name:`${a}_get_table_data`,title:"Get Table Data",description:"Retrieve table data with filtering, pagination, and sorting"},{name:`${a}_create_records`,title:"Create Records",description:"Create one or more records in a table"},{name:`${a}_update_records`,title:"Update Records",description:"Update (patch) records in a table"},{name:`${a}_delete_records`,title:"Delete Records",description:"Delete records from a table"},{name:`${a}_get_table_fields`,title:"Get Table Fields",description:"Retrieve field definitions for a table"},{name:`${a}_get_table_relationships`,title:"Get Table Relationships",description:"Retrieve relationships definition for a table"},{name:`${a}_get_stored_procedures`,title:"List Stored Procedures",description:"Get stored procedures available in the database"},{name:`${a}_call_stored_procedure`,title:"Call Stored Procedure",description:"Call a stored procedure"},{name:`${a}_get_stored_functions`,title:"List Stored Functions",description:"Get stored functions available in the database"},{name:`${a}_call_stored_function`,title:"Call Stored Function",description:"Call a stored function"},{name:`${a}_get_database_resources`,title:"List Database Resources",description:"Get all resources available in the database service"},{name:`${a}_get_api_spec`,title:"Get API Spec",description:"Get the OpenAPI specification for this database service"},{name:`${a}_get_data_model`,title:"Get Data Model",description:"Get a condensed data model showing all tables and columns"},{name:`${a}_aggregate_data`,title:"Aggregate Data",description:"Compute server-side aggregations (SUM, COUNT, AVG, MIN, MAX)"}]:[{name:`${a}_list_files`,title:"List Files",description:"List files and folders in a path"},{name:`${a}_get_file`,title:"Get File Content",description:"Get the content of a file"},{name:`${a}_create_file`,title:"Create File",description:"Create a new file with the given content"},{name:`${a}_get_file_properties`,title:"Get File Properties",description:"Get properties/metadata of a file or folder"},{name:`${a}_create_folder`,title:"Create Folder",description:"Create a new folder"},{name:`${a}_delete_file`,title:"Delete File or Folder",description:"Delete a file or folder"}]}isToolEnabled(a){return!this.disabledTools.has(a)}toggleTool(a,t){t?this.disabledTools.delete(a):this.disabledTools.add(a)}isAllSystemToolsEnabled(){return this.systemMcpTools.some(a=>!this.disabledTools.has(a.name))}toggleAllSystemTools(a){for(const t of this.systemMcpTools)a?this.disabledTools.delete(t.name):this.disabledTools.add(t.name)}isAllGlobalToolsEnabled(){return this.mcpGlobalTools.some(a=>!this.disabledTools.has(a.name))}toggleAllGlobalTools(a){for(const t of this.mcpGlobalTools)a?this.disabledTools.delete(t.name):this.disabledTools.add(t.name)}get isMergedStyle(){return"merged"===this.toolStyle}get dbServices(){return this.mcpServices.filter(a=>"Database"===a.category)}get visibleServices(){return this.isMergedStyle?this.mcpServices.filter(a=>"Database"!==a.category):this.mcpServices}get mergedDbVerbs(){const a=this.dbServices[0];if(!a)return[];const t=this.sanitizeApiName(a.name)+"_";return a.tools.map(o=>({...o,name:o.name.startsWith(t)?o.name.slice(t.length):o.name}))}verbKey(a,t){return`${this.sanitizeApiName(t)}_${a}`}isVerbEnabledFor(a,t){return!this.disabledTools.has(this.verbKey(a,t))}toggleVerbFor(a,t,o){const i=this.verbKey(a,t);o?this.disabledTools.delete(i):this.disabledTools.add(i)}isVerbEnabledAnywhere(a){return this.dbServices.some(t=>this.isVerbEnabledFor(a,t.name))}toggleVerbEverywhere(a,t){for(const o of this.dbServices)this.toggleVerbFor(a,o.name,t)}isServiceEnabled(a){return a.tools.some(t=>!this.disabledTools.has(t.name))}toggleService(a,t){for(const o of a.tools)t?this.disabledTools.delete(o.name):this.disabledTools.add(o.name)}sanitizeApiName(a){return a.toLowerCase().replace(/[^a-z0-9]/g,"_").replace(/_+/g,"_").replace(/^_|_$/g,"")}get customToolParameters(){return this.customToolForm.get("parameters")}createParameterGroup(a){return this.fb.group({name:[a?.name??"",m.k0.required],type:[a?.type??"string"],in:[a?.in??"query"],required:[a?.required??!1],description:[a?.description??""]})}addCustomTool(){this.editingToolIndex=-1,this.customToolForm.reset({toolType:"api",name:"",description:"",httpMethod:"GET",url:"",headers:"{}",function:"",enabled:!0,storageServiceId:null,scmRepository:"",scmReference:"",storagePath:""}),this.customToolParameters.clear(),this.liveHeadersValue=null,this.liveFunctionValue=null}editCustomTool(a){const t=this.customTools[a];this.editingToolIndex=a;const o=JSON.stringify(t.headers||{},null,2);this.customToolForm.patchValue({toolType:t.toolType||"api",name:t.name,description:t.description,httpMethod:t.httpMethod||"GET",url:t.url||"",headers:o,function:t.function||"",enabled:t.enabled,storageServiceId:t.storageServiceId||null,scmRepository:t.scmRepository||"",scmReference:t.scmReference||"",storagePath:t.storagePath||""}),this.liveHeadersValue=o,this.liveFunctionValue=t.function||"",this.customToolParameters.clear(),(t.parameters||[]).forEach(i=>{this.customToolParameters.push(this.createParameterGroup(i))})}deleteCustomTool(a){this.customTools.splice(a,1)}onHeadersChange(a){this.liveHeadersValue=a}onFunctionChange(a){this.liveFunctionValue=a}insertLookup(a,t){if("function"===t)this.functionEditor?.insertAtCursor(`secrets.${a}`);else if("headers"===t)this.headersEditor?.insertAtCursor(`{${a}}`);else if("url"===t){const o=this.customToolForm.get("url");o&&o.setValue((o.value||"")+`{${a}}`)}}saveCustomTool(){if(this.customToolForm.invalid)return;const a=this.customToolForm.getRawValue(),t=this.liveHeadersValue??a.headers??"{}",o=this.liveFunctionValue??a.function??"";let i={};if("api"===a.toolType&&""!==t.trim())try{i=JSON.parse(t)}catch(c){return void this.snackbarService.openSnackBar(`Invalid JSON in Static Headers: ${c.message}`,"error")}const r={toolType:a.toolType||"api",name:a.name,description:a.description,httpMethod:a.httpMethod,url:a.url,parameters:a.parameters||[],headers:i,function:o,enabled:a.enabled??!0,storageServiceId:a.storageServiceId||null,scmRepository:a.scmRepository||"",scmReference:a.scmReference||"",storagePath:a.storagePath||""};-1===this.editingToolIndex?this.customTools.push(r):null!==this.editingToolIndex&&(r.id=this.customTools[this.editingToolIndex].id,this.customTools[this.editingToolIndex]=r),this.editingToolIndex=null}cancelCustomToolEdit(){this.editingToolIndex=null}hasUnsavedCustomTool(){return null!==this.editingToolIndex&&this.customToolForm.dirty}closeUnsavedToolDialog(a){this.unsavedToolDialogRef?.close(a)}toggleCustomTool(a,t){this.customTools[a].enabled=t}loadAvailableScmServices(){this.http.get("/api/v2",{params:{group:"source control",fields:"id,name,label,type"},context:(0,K.Ku)()}).subscribe({next:a=>{this.availableScmServices=(a?.resource??a?.services??[]).filter(t=>t.id&&t.name)},error:()=>{this.availableScmServices=[]}})}viewLatestScmContent(){const a=this.customToolForm.get("storageServiceId")?.value,t=this.customToolForm.get("scmRepository")?.value,o=this.customToolForm.get("scmReference")?.value||"master",i=this.customToolForm.get("storagePath")?.value;if(!a||!t||!i)return void this.snackbarService.openSnackBar("Service, repository, and path are required to fetch from SCM.","error");const r=this.availableScmServices.find(s=>s.id===a);r?this.http.get(`/api/v2/${r.name}/_repo/${t}`,{params:{branch:o,content:"1",path:i},responseType:"text",context:(0,K.PH)()}).subscribe({next:s=>{this.customToolForm.get("function")?.setValue(s),this.liveFunctionValue=s,this.snackbarService.openSnackBar("Function loaded from repository.","success")},error:s=>{this.snackbarService.openSnackBar(`Failed to fetch from SCM: ${(0,De.cQ)(s).message}`,"error")}}):this.snackbarService.openSnackBar("Selected SCM service not found.","error")}addToolParameter(){this.customToolParameters.push(this.createParameterGroup())}removeToolParameter(a){this.customToolParameters.removeAt(a)}logFormValues(){console.log("Form values:",this.serviceForm.value)}updateServiceTypeFlags(a){this.isNetworkService=!1,this.isScriptService=!1,this.isFile=!1,this.isSystemMcp=Wt(a);const t=this.serviceTypes.find(o=>o.name===a);if(t&&t.group){const o=t.group;"Remote Service"===o?this.isNetworkService=!0:"Script"===o?this.isScriptService=!0:"File"===o&&(this.isFile=!0)}}initializeConfig(a){const t=this.fb.group({});if(this.configSchema&&this.configSchema.length>0){this.configSchema.forEach(i=>{const r=[];i.required&&r.push(m.k0.required),t?.addControl(i.name,new m.MJ(i.default,r))}),this.isFile&&"local_file"===a&&t?.addControl("excelContent",new m.MJ(""));const o=this.configSchema.filter(i=>"content"===i.name)?.[0];if(o){const i=[];o.required&&i.push(m.k0.required),t?.addControl("serviceDefinition",new m.MJ(o.default,i))}this.isNetworkService&&(this.serviceForm.addControl("type",new m.MJ("")),t.addControl("content",new m.MJ("")),this.serviceDefinitionType="0"),this.isScriptService&&(t.get("content")||t.addControl("content",new m.MJ("")),this.serviceDefinitionType="0")}this.serviceForm.setControl("config",t)}get subscriptionRequired(){const a=this.serviceForm.controls.type.value;return"local_email"!==a&&"api_builder"!==a&&"API Builder"!==this.serviceTypes.find(o=>o.name===a)?.group&&a&&0===this.configSchema?.length}get scriptMode(){const a=this.serviceForm.getRawValue().type;return"nodejs"===a?se.Q.NODEJS:"python"===a?se.Q.PYTHON:"python3"===a?se.Q.PYTHON3:"php"===a?se.Q.PHP:se.Q.TEXT}get serviceDefinitionMode(){return"0"===this.serviceDefinitionType?se.Q.JSON:se.Q.YAML}get excelMode(){return se.Q.JSON}get functionEditorMode(){return se.Q.JAVASCRIPT}get headersEditorMode(){return se.Q.JSON}excelUpload(a){const t=this.serviceForm.get("config"),o=a.target;o.files&&t&&t.get("excelContent")&&(0,nn.Sj)(o.files[0]).subscribe(i=>{const r=t.get("excelContent");r&&r.setValue(i)})}getConfigSchema(a){return this.serviceTypes.find(t=>t.name===a)?.configSchema.map(t=>{const o="array"===t.type&&Array.isArray(t.items)?t.items.map(i=>({...i,name:(0,_t.hm)(i.name)})):t.items;return{...t,name:(0,_t.hm)(t.name),items:o}})??[]}syncSchemaViews(){if(this.schemaMemoSrc===(this.configSchema??null)&&this.schemaMemoIsDatabase===this.isDatabase&&this.schemaMemoIsNetwork===this.isNetworkService)return;this.schemaMemoSrc=this.configSchema??null,this.schemaMemoIsDatabase=this.isDatabase,this.schemaMemoIsNetwork=this.isNetworkService;const a=this.configSchema?.filter(r=>!["storageServiceId","storagePath"].includes(r.name))||[];this.memoViewSchema=a;const t=["host","port","database","username","password"],o=a.map(r=>r.name.toLowerCase());this.memoHasStandardFields=this.isDatabase&&t.filter(r=>o.includes(r)).length>=3,this.isDatabase?this.memoHasStandardFields?(this.memoBasicFields=a.filter(r=>t.includes(r.name.toLowerCase())),this.memoAdvancedFields=a.filter(r=>!t.includes(r.name.toLowerCase()))):(this.memoBasicFields=a,this.memoAdvancedFields=[]):(this.memoBasicFields=[],this.memoAdvancedFields=[]);const i=["baseUrl"];this.isNetworkService?(this.memoNetworkRequiredFields=a.filter(r=>i.includes(r.name)),this.memoNetworkAdvancedFields=a.filter(r=>!i.includes(r.name)&&"content"!==r.name)):(this.memoNetworkRequiredFields=[],this.memoNetworkAdvancedFields=[])}get viewSchema(){return this.syncSchemaViews(),this.memoViewSchema}get hasStandardFields(){return this.syncSchemaViews(),this.memoHasStandardFields}get basicFields(){return this.syncSchemaViews(),this.memoBasicFields}get advancedFields(){return this.syncSchemaViews(),this.memoAdvancedFields}get showAdvancedOptions(){return this.isDatabase&&this.hasStandardFields&&this.advancedFields.length>0}get networkRequiredFields(){return this.syncSchemaViews(),this.memoNetworkRequiredFields}get networkAdvancedFields(){return this.syncSchemaViews(),this.memoNetworkAdvancedFields}get showNetworkAdvancedOptions(){return this.isNetworkService}get showCurlImport(){return this.isNetworkService&&this.viewSchema.some(a=>"baseUrl"===a.name)}openCurlImport(){this.dialog.open(ts,{width:"46rem"}).afterClosed().subscribe(a=>{a&&this.applyCurlImport(a)})}static{this.VERB_MASK={GET:1,POST:2,PUT:4,PATCH:8,DELETE:16}}applyCurlImport(a){const t=this.serviceForm.get("config");if(!t)return;const o=(r,c)=>{const s=t.get(r);s&&(s.setValue(c),s.markAsDirty())},i=yt.VERB_MASK[a.method]??0;o("baseUrl",a.baseUrl),o("parameters",a.parameters.map(r=>({name:r.name,value:r.value,exclude:!1,outbound:!0,cacheKey:!1,action:i}))),o("headers",a.headers.map(r=>({name:r.name,value:r.value,passFromClient:!1,action:i}))),Object.keys(a.options).length&&o("options",{...t.get("options")?.value??{},...a.options}),this.serviceForm.markAsDirty()}getConfigControl(a){return this.serviceForm.get(`config.${a}`)}get aiRoleId(){const t=this.serviceForm.get("config.aiRoleId")?.value;return"number"==typeof t?t:null}get aiServiceId(){const t=this.serviceForm.get("config.aiServiceId")?.value;return"number"==typeof t?t:null}setAiServiceId(a){this.serviceForm.get("config.aiServiceId")?.setValue(a)}setAiRoleId(a){this.serviceForm.get("config.aiRoleId")?.setValue(a)}getServiceDocByServiceIdControl(a){return this.serviceForm.get(`service_doc_by_service_id.${a}`)}getServiceDefinitionControl(){return this.serviceForm.get("serviceDefinition")}getControl(a){return this.serviceForm.controls[a]}save(a,t){if(this.hasUnsavedCustomTool()){if(this.unsavedToolDialogRef)return;return this.unsavedToolDialogRef=this.dialog.open(this.unsavedToolDialogTpl,{width:"440px",disableClose:!0}),void this.unsavedToolDialogRef.afterClosed().subscribe(l=>{if(this.unsavedToolDialogRef=null,l&&"cancel"!==l){if("save"===l){if(this.customToolForm.invalid)return void this.snackbarService.openSnackBar("Custom tool has invalid fields. Fix them or discard the edit before saving the service.","error");this.saveCustomTool()}else this.cancelCustomToolEdit();this.customToolForm.markAsPristine(),this.save(a,t)}})}const o=this.serviceForm.getRawValue();if(""===o.type||""===o.name)return void this.serviceForm.markAllAsTouched();this.validateServiceName(o.name)||console.warn(this.warnings);const i=this.formatServiceName(o.name);this.serviceForm.patchValue({name:i});let s,r={snackbarSuccess:"services.createSuccessMsg"},c=null;if(this.isNetworkService)r={...r,fields:"*",related:"service_doc_by_service_id"},o.config?.content&&(c={content:o.config.content,format:this.serviceDefinitionType?Number(this.serviceDefinitionType):0},delete o.config.content);else if(this.isScriptService){r={...r,fields:"*",related:"service_doc_by_service_id"};const l=this.getServiceDocByServiceIdControl("content")?.value;l&&l.trim()&&(c={content:l,format:this.serviceDefinitionType?Number(this.serviceDefinitionType):0})}if(o.service_doc_by_service_id=c,o.type.toLowerCase().includes("saml")?(r={...r,fields:"*",related:"service_doc_by_service_id"},s={...o,is_active:o.isActive,id:this.edit?this.serviceData.id:null,config:{sp_nameIDFormat:o.config.spNameIDFormat,default_role:o.config.defaultRole,sp_x509cert:o.config.spX509cert,sp_privateKey:o.config.spPrivateKey,idp_entityId:o.config.idpEntityId,idp_singleSignOnService_url:o.config.idpSingleSignOnServiceUrl,idp_x509cert:o.config.idpX509cert,relay_state:o.config.relayState}},o.config.appRoleMap&&(s.config.app_role_map=o.config.appRoleMap.map(l=>Object.keys(l).reduce((p,f)=>({...p,[(0,_t.F0)(f)]:l[f]}),{}))),o.config.iconClass&&(s.config.icon_class=o.config.iconClass),delete s.isActive):"excel"===o.type?(s={...o,id:this.edit?this.serviceData.id:null,config:{...o.config||{},storage_service_id:o.storageServiceId}},delete s.storageServiceId):s={...o,id:this.edit?this.serviceData.id:null},this.edit){let l;"excel"===o.type?(l={...this.serviceData,...o,config:{...this.serviceData.config||{},...o.config,storage_service_id:o.storageServiceId},service_doc_by_service_id:o.service_doc_by_service_id?{id:this.serviceData.serviceDocByServiceId?.id,...this.serviceData.serviceDocByServiceId||{},...o.service_doc_by_service_id}:null},delete l.storageServiceId):l={...this.serviceData,...o,config:{...this.serviceData.config||{},...o.config},service_doc_by_service_id:o.service_doc_by_service_id?{id:this.serviceData.serviceDocByServiceId?.id,...this.serviceData.serviceDocByServiceId||{},...o.service_doc_by_service_id}:null},this.isNetworkService&&delete l.config.serviceDefinition,this.isMcp&&(l.config.disabledTools=Array.from(this.disabledTools),l.config.customTools=this.customTools.map(p=>({id:p.id,toolType:p.toolType||"api",name:p.name,description:p.description,httpMethod:p.httpMethod,url:p.url,parameters:p.parameters,headers:p.headers,function:p.function||"",enabled:p.enabled,storageServiceId:p.storageServiceId||null,scmRepository:p.scmRepository||"",scmReference:p.scmReference||"",storagePath:p.storagePath||""})),this.isSystemMcp&&delete l.config.customTools),this.servicesService.update(this.serviceData.id,l,{snackbarSuccess:"services.updateSuccessMsg"}).subscribe(()=>{o.type.toLowerCase().includes("saml")?this.router.navigate(["../"],{relativeTo:this.activatedRoute}):a&&this.cacheService.delete(l.name,{snackbarSuccess:"cache.serviceCacheFlushed"}).subscribe({next:()=>{t||this.router.navigate(["../"],{relativeTo:this.activatedRoute})},error:p=>console.error("Error flushing cache",p)})})}else this.servicesService.create({resource:[s]},r).pipe((0,Ce.n)(l=>this.isDatabase?this.http.get(`${A.C}/${i}/_table`).pipe((0,z.T)(()=>l),(0,R.W)(p=>this.servicesService.delete(l.resource[0].id).pipe((0,qa.Z)(()=>(0,we.$)(()=>new Error("Database connection failed. Please check your connection details.")))))):(0,L.of)(l))).subscribe({next:l=>{if(o.type.toLowerCase().includes("saml"))this.router.navigate(["../"],{relativeTo:this.activatedRoute});else if(this.isDatabase)this.router.navigate(["/api-connections/data-explorer"],{queryParams:{service:o.name}});else if(this.isMcp){const p=l?.resource?.[0]?.id;null!=p?this.router.navigate(["../",p],{relativeTo:this.activatedRoute,queryParams:{created:1}}):this.router.navigate(["../"],{relativeTo:this.activatedRoute})}else this.router.navigate([`/api-connections/api-docs/${i}`])},error:l=>{this.snackbarService.openSnackBar((0,De.cQ)(l).message,"error")}})}validateServiceName(a){return!!/^[a-zA-Z0-9_-]+$/.test(a)||(this.warnings.push("Service name can only contain letters, numbers, underscores, and hyphens."),!1)}formatServiceName(a){return a.toLowerCase().replace(/\s+/g,"").replace(/[^a-z0-9_-]/g,"")}gotoSchema(){const a=this.serviceForm.getRawValue();this.router.navigate([`/admin-settings/schema/${a.name}`])}gotoAPIDocs(){const a=this.serviceForm.getRawValue();this.currentServiceService.setCurrentServiceId(this.serviceData.id);const t=this.formatServiceName(a.name);this.router.navigate([`/api-connections/api-docs/${t}`])}goBack(){this.router.navigate(["../"],{relativeTo:this.activatedRoute})}get artifactBaseUrl(){return`${window.location.origin}${A.C}/${this.serviceData?.name??""}`}onCreateApiKey(){this.router.navigate(["/api-connections/api-keys/create"])}onScopeCellClick(a){this.dialog.open(Sc,{width:"640px",maxWidth:"92vw",autoFocus:!1,data:{roleId:a.roleId,verb:a.verb,serviceLabel:this.serviceData?.label||this.serviceData?.name||""}})}loadArtifactCardData(){var a=this;return(0,ve.A)(function*(){const t=a.serviceData?.name,o=a.serviceData?.id;if(!t||"number"!=typeof o)return void(a.artifactKeys=[]);const i=yield a.artifactResolver.resolveWorkingKeyAndTable(o,t,a.artifactSampleTable);a.artifactSampleTable=i.sampleTable,a.artifactKeys=i.keys})()}getBackgroundImage(a){const t=this.images?.find(o=>o.label==a);return t&&t?t.src:""}get filteredServiceTypes(){if(this.memoServiceTypesSrc!==this.serviceTypes||this.memoServiceTypesSearch!==this.search){this.memoServiceTypesSrc=this.serviceTypes,this.memoServiceTypesSearch=this.search;const a=this.search.toLowerCase();this.memoFilteredServiceTypes=this.serviceTypes.filter(t=>t.label.toLowerCase().includes(a)||t.name.toLowerCase().includes(a))}return this.memoFilteredServiceTypes}nextStep(a){a.next()}openDialog(a){this.dialog.open(Er,{data:{serviceName:a}}).afterClosed().subscribe()}onServiceDefinitionTypeChange(a){this.serviceDefinitionType=a}navigateToRoles(a){a.preventDefault(),this.router.navigate(["/roles"],{queryParams:{tab:"access"}})}goToSecurityConfig(){var a=this;return(0,ve.A)(function*(){try{const t=a.serviceForm.getRawValue(),o=a.formatServiceName(t.name);a.serviceForm.patchValue({name:o});const i={...t,config:{...t.config||{}}};if(a.isNetworkService&&t.config?.content)i.service_doc_by_service_id={content:t.config.content,format:a.serviceDefinitionType?Number(a.serviceDefinitionType):0},delete i.config.content;else if(a.isScriptService){const s=a.getServiceDocByServiceIdControl("content")?.value;s&&s.trim()&&(i.service_doc_by_service_id={content:s,format:a.serviceDefinitionType?Number(a.serviceDefinitionType):0})}else i.service_doc_by_service_id=null;const r=yield a.servicesService.create({resource:[i]},{snackbarSuccess:"services.createSuccessMsg"}).toPromise();if(!r)throw new Error("No response received from service creation");a.currentServiceId=r.resource[0].id,a.snackbarService.openSnackBar("Service created","success"),a.showSecurityConfig=!0,setTimeout(()=>{a.stepper.selectedIndex=a.stepper.steps.length-1})}catch{a.snackbarService.openSnackBar("Error creating service","error")}})()}getServiceTypeLabel(a){const t=this.serviceTypes.find(o=>o.name===a);return t?t.label:a}onServiceTypeSelect(a){this.selectedServiceTypeLable=a||"Unknown. Unable to identify Service Type"}static{this.\u0275fac=function(t){return new(t||Ut)(e.rXU(N.nX),e.rXU(m.ok),e.rXU(U.Z1),e.rXU(U.j8),e.rXU(N.Ix),e.rXU(bn.f),e.rXU(ee.Qq),e.rXU(h.bZ),e.rXU(Ue.n),e.rXU(pe.L),e.rXU(ns.M),e.rXU(en.UG),e.rXU(tn.D),e.rXU(is),e.rXU(as))}}static{this.\u0275cmp=e.VBU({type:Ut,selectors:[["df-service-details"]],viewQuery:function(t,o){if(1&t&&(e.GBs(rs,5),e.GBs(cs,5),e.GBs(ss,5),e.GBs(ls,5)),2&t){let i;e.mGM(i=e.lsd())&&(o.stepper=i.first),e.mGM(i=e.lsd())&&(o.functionEditor=i.first),e.mGM(i=e.lsd())&&(o.headersEditor=i.first),e.mGM(i=e.lsd())&&(o.unsavedToolDialogTpl=i.first)}},standalone:!0,features:[e.aNF],decls:7,vars:4,consts:[[1,"details-section",3,"formGroup","ngSubmit"],[4,"ngIf","ngIfElse"],["notDatabaseEdit",""],[3,"serviceName",4,"ngIf"],["unsavedToolDialog",""],["linear",""],["stepper",""],["errorMessage","Service Type is required.",3,"editable"],["matStepLabel",""],[1,"details-section"],[1,"section-header"],["matSuffix","",1,"tool-tip-trigger",3,"icon","matTooltip"],["mat-button","","matStepperNext","","type","button",1,"cancel-btn",3,"disabled"],["appearance","outline",1,"dynamic-width"],["matInput","","placeholder","SQL, AWS, MongoDB, etc.",3,"ngModel","ngModelOptions","ngModelChange"],[1,"full-width"],[1,"grid-wrapper","grid-col-auto"],["class","radio-card",4,"ngFor","ngForOf","ngForTrackBy"],["subscriptSizing","dynamic","class","dynamic-width","appearance","outline",4,"ngIf"],["appearance","outline","subscriptSizing","dynamic","class","dynamic-width",4,"ngIf"],["appearance","outline","subscriptSizing","dynamic","class","full-width",4,"ngIf"],[1,"action-container"],["color","primary","formControlName","isActive",4,"ngIf"],["mat-button","","matStepperPrevious","","type","button",1,"cancel-btn"],[4,"ngIf"],["class","first-time-guidance",4,"ngIf"],["class","full-width action-bar",4,"ngIf"],["class","details-section",4,"ngIf"],["matStepperIcon","edit"],["matStepperIcon","done"],[1,"radio-card"],["formControlName","type","type","radio",3,"value","input"],[1,"card-content-wrapper"],[1,"check-icon"],[1,"card-content"],[1,"card-icon",3,"src","alt"],[1,"text-center"],["mat-button","",1,"unlock-btn",3,"click"],["subscriptSizing","dynamic","appearance","outline",1,"dynamic-width"],["matInput","","formControlName","name"],["appearance","outline","subscriptSizing","dynamic",1,"dynamic-width"],["matInput","","formControlName","label"],["appearance","outline","subscriptSizing","dynamic",1,"full-width"],["rows","1","matInput","","formControlName","description"],["color","primary","formControlName","isActive"],["formGroupName","config"],[4,"ngFor","ngForOf","ngForTrackBy"],["dynamic",""],[1,"full-width",3,"type","storageServiceId","storagePath","content","cache"],[3,"schema","formControl","dynamic-width","full-width",4,"ngIf"],["class","full-width",3,"schema","formControl",4,"ngIf"],[3,"schema","formControl"],[1,"full-width",3,"schema","formControl"],[1,"details-section","basic-fields-section"],["class","advanced-section",4,"ngIf"],[1,"advanced-section"],[3,"expanded"],[1,"first-time-guidance"],[1,"guidance-icon",3,"icon"],[1,"guidance-text"],[1,"full-width","action-bar"],["mat-flat-button","","type","button",1,"cancel-btn",3,"click"],[1,"button-group"],["mat-flat-button","","class","save-btn","color","primary","type","button",3,"disabled","click",4,"ngIf"],["mat-flat-button","","class","save-btn secondary-btn","type","button",3,"disabled","click",4,"ngIf"],["class","save-btn","mat-flat-button","","color","primary",4,"ngIf"],["mat-flat-button","","color","primary","type","button",1,"save-btn",3,"disabled","click"],["mat-flat-button","","type","button",1,"save-btn","secondary-btn",3,"disabled","click"],["mat-flat-button","","color","primary",1,"save-btn"],[3,"serviceName","serviceId","isDatabase","isFirstTimeUser","goBack"],[3,"ngSwitch"],[4,"ngSwitchCase"],["class","service-health-panel",3,"serviceId","serviceName","serviceGroup","deprecated",4,"ngIf"],["formControlName","type",3,"selectionChange"],[3,"value",4,"ngFor","ngForOf","ngForTrackBy"],["subscriptSizing","dynamic","appearance","outline","class","full-width",4,"ngIf"],["subscriptSizing","dynamic","class","full-width","appearance","outline",4,"ngIf"],["formControlName","isActive","color","primary",4,"ngIf"],[1,"service-health-panel",3,"serviceId","serviceName","serviceGroup","deprecated"],[3,"eyebrow","title","description"],[1,"service-overview-card",3,"serviceName","baseUrl","sampleTable","keys","createKey"],["class","service-pipeline",4,"ngIf"],["class","service-access",4,"ngIf"],[1,"service-pipeline"],[1,"service-pipeline__hint"],[3,"serviceId","serviceName","serviceType"],[1,"service-access"],[1,"service-access__hint"],[3,"serviceId","cellClick"],[3,"value"],["appearance","outline",1,"full-width"],["formControlName","storageServiceId","required",""],["subscriptSizing","dynamic","appearance","outline",1,"full-width"],["formControlName","isActive","color","primary"],["notDatabase",""],["type","button","mat-flat-button","",1,"save-btn",3,"click"],["class","curl-import-action full-width",4,"ngIf"],[1,"curl-import-action","full-width"],["mat-stroked-button","","type","button","color","primary","data-testid","open-curl-import",3,"click"],[3,"icon"],[1,"curl-import-action__hint"],["color","primary",3,"schema","formControl","dynamic-width","full-width",4,"ngIf"],["color","primary",3,"schema","formControl"],["aria-label","Service Definition Type",3,"ngModel","ngModelOptions","ngModelChange","change"],["value","0"],["value","1"],[1,"full-width",3,"type","content","contentText"],[1,"full-width",3,"formControl","mode"],[1,"full-width",3,"isScript","type","storageServiceId","storagePath","content","cache","hideScmActions"],["class","full-width",3,"selectedConnectionId","selectedRoleId","selectConnection","selectRole",4,"ngIf"],["class","full-width",3,"form",4,"ngIf"],["class","full-width",3,"form","serviceId",4,"ngIf"],["class","full-width",3,"roleId",4,"ngIf"],[1,"full-width",3,"selectedConnectionId","selectedRoleId","selectConnection","selectRole"],[1,"full-width",3,"form"],[1,"full-width",3,"form","serviceId"],[1,"actions","full-width"],["type","file",2,"display","none",3,"accept","change"],["fileInput",""],[1,"full-width",3,"roleId"],[1,"mcp-tools-container"],["multi",""],[1,"mcp-service-header"],["color","primary",3,"checked","change","click"],[1,"mcp-services-table","full-width"],[1,"toggle-col"],[3,"disabled-row",4,"ngFor","ngForOf","ngForTrackBy"],["color","primary",3,"checked","change"],["class","mcp-tools-container",4,"ngIf"],[3,"disabled-row",4,"ngFor","ngForOf"],["data-testid","merged-db-tools",4,"ngIf"],[3,"expanded",4,"ngFor","ngForOf","ngForTrackBy"],["data-testid","merged-db-tools"],[1,"custom-tools-container"],[1,"custom-tools-description"],["class","custom-tools-actions",4,"ngIf"],["class","custom-tool-form",3,"formGroup",4,"ngIf"],["class","mcp-services-table full-width",4,"ngIf"],["class","no-tools-message",4,"ngIf"],[1,"custom-tools-actions"],["mat-flat-button","","color","primary",3,"click"],[1,"btn-icon",3,"icon"],[1,"custom-tool-form",3,"formGroup"],["formControlName","toolType",1,"tool-type-toggle"],["value","api"],["value","function"],[1,"form-row"],["appearance","outline",1,"form-field-half"],["matInput","","formControlName","name","placeholder","my_tool_name"],["appearance","outline","class","form-field-quarter",4,"ngIf"],["appearance","outline","class","full-width",4,"ngIf"],["matInput","","formControlName","description","rows","2","placeholder","Describe what this tool does..."],[1,"parameters-section"],["mat-stroked-button","","color","primary","type","button",3,"click"],["class","parameter-cards","formArrayName","parameters",4,"ngIf"],["class","no-parameters-hint",4,"ngIf"],["class","scm-link-section",3,"formGroup",4,"ngIf"],["class","editor-section",4,"ngIf"],[1,"form-actions"],["mat-button","","type","button",3,"click"],["mat-flat-button","","color","primary","type","button",3,"disabled","click"],["appearance","outline",1,"form-field-quarter"],["formControlName","httpMethod"],["value","GET"],["value","POST"],["value","PUT"],["value","PATCH"],["value","DELETE"],["matInput","","formControlName","url","placeholder","https://api.example.com/endpoint/{id}"],["mat-icon-button","","matSuffix","","type","button","matTooltip","Insert Lookup",3,"matMenuTriggerFor","disabled"],["urlLookupMenu","matMenu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf","ngForTrackBy"],["mat-menu-item","",3,"click"],["formArrayName","parameters",1,"parameter-cards"],["class","parameter-card",3,"formGroupName",4,"ngFor","ngForOf"],[1,"parameter-card",3,"formGroupName"],[1,"parameter-card-header"],[1,"parameter-index"],["mat-icon-button","","color","warn","type","button","matTooltip","Remove parameter",1,"parameter-remove-btn",3,"click"],[1,"parameter-card-fields"],["appearance","outline",1,"param-field","param-field--name"],["matInput","","formControlName","name","placeholder","param_name"],["appearance","outline",1,"param-field","param-field--type"],["formControlName","type"],["value","string"],["value","number"],["value","integer"],["value","boolean"],["appearance","outline","class","param-field param-field--location",4,"ngIf"],[1,"param-field","param-field--required"],["formControlName","required"],["appearance","outline",1,"param-field","param-field--desc"],["matInput","","formControlName","description","placeholder","What this parameter does"],["appearance","outline",1,"param-field","param-field--location"],["formControlName","in"],["value","query"],["value","path"],["value","body"],["value","header"],[1,"no-parameters-hint"],[1,"scm-link-section",3,"formGroup"],["formControlName","storageServiceId"],["class","form-row",4,"ngIf"],["class","scm-actions",4,"ngIf"],["appearance","outline",1,"form-field-third"],["matInput","","formControlName","scmRepository","placeholder","my-repo"],["matInput","","formControlName","scmReference","placeholder","master"],["matInput","","formControlName","storagePath","placeholder","scripts/my-tool.js"],[1,"scm-actions"],["mat-flat-button","","color","primary","type","button",3,"click"],[1,"editor-section"],[1,"editor-label-row"],[1,"editor-label"],["mat-stroked-button","","type","button",3,"matMenuTriggerFor","disabled"],["fnLookupMenu","matMenu"],[1,"editor-wrapper"],["formControlName","function",3,"mode","valueChange"],["functionEditor",""],[1,"editor-hint"],["hdrLookupMenu","matMenu"],[1,"editor-wrapper","editor-wrapper--compact"],["formControlName","headers",3,"mode","valueChange"],["headersEditor",""],[1,"action-col"],[1,"url-cell"],[1,"action-buttons"],["mat-icon-button","","matTooltip","Edit tool",3,"disabled","click"],["mat-icon-button","","color","warn","matTooltip","Delete tool",3,"disabled","click"],[1,"no-tools-message"],["mat-flat-button","","color","primary",1,"save-btn",3,"value","click"],[3,"serviceName"],["mat-dialog-title",""],["mat-dialog-content",""],["mat-dialog-actions","","align","end"],["mat-flat-button","","type","button",3,"click"],["mat-flat-button","","color","warn","type","button",3,"click"],["mat-flat-button","","color","primary","cdkFocusInitial","","type","button",3,"click"]],template:function(t,o){if(1&t&&(e.j41(0,"form",0),e.bIt("ngSubmit",function(){return o.save(!1,!1)}),e.DNE(1,ol,53,27,"ng-container",1),e.DNE(2,Nd,22,22,"ng-template",null,2,e.C5r),e.k0s(),e.DNE(4,Ad,1,1,"df-paywall",3),e.DNE(5,Yd,11,0,"ng-template",null,4,e.C5r)),2&t){const i=e.sdS(3);e.Y8G("formGroup",o.serviceForm),e.R7$(1),e.Y8G("ngIf",o.isDatabase&&!o.edit)("ngIfElse",i),e.R7$(3),e.Y8G("ngIf",o.subscriptionRequired)}},dependencies:[O.RG,O.rl,O.nJ,O.MV,O.yw,E.fS,E.fg,G.Ve,G.VO,q.wT,d.pM,X.mV,X.sG,oe.RI,fe.MY,fe.BS,fe.GK,fe.Z2,fe.WN,fe.Q6,D.Kj,m.X1,m.qT,m.me,m.Fm,m.BC,m.cb,m.YS,m.l_,m.j4,m.JD,m.$R,m.v8,m.YN,m.vS,d.bT,j.g7,j.So,qe,Ht.e,Ri,Ai,Qi,ma,va,Fa,mt,Qt.s,w.dX,w.aY,S.uc,S.oV,u.Hl,u.$z,u.iY,La.S,gt,Ka.C,Tr,un,Ke,hn,wr,Dr,fn,d.MD,d.ux,d.e1,Z.m_,Z.An,Se.Vg,Se.ec,Se.pc,J.Wk,Te.Hu,Sr.w,Ba,ae.Cn,ae.kk,ae.fb,ae.Cp,h.hM,h.BI,h.Yi,h.E7,$r.K,Zr,sc,Dc,xt],styles:[".grid-wrapper[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:16px}.service-health-panel[_ngcontent-%COMP%]{display:block;margin-bottom:2.4rem}.service-pipeline[_ngcontent-%COMP%], .service-access[_ngcontent-%COMP%]{margin-top:3.2rem;padding-top:3.2rem;border-top:1px solid var(--df-border-2)}.service-pipeline__hint[_ngcontent-%COMP%], .service-access__hint[_ngcontent-%COMP%]{margin:0 0 1.6rem;max-width:68ch;color:var(--df-text-muted);font-size:1.3rem;line-height:1.5}.section-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .basic-fields-section[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%], .component-selection[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .security-config-container[_ngcontent-%COMP%] .access-level-section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0 0 16px;font-size:1.5rem;font-weight:600;letter-spacing:-.01em;color:var(--df-text)}[_nghost-%COMP%] .mat-horizontal-stepper-header-container{border-bottom:1px solid var(--df-border-2);margin-bottom:8px}[_nghost-%COMP%] .mat-horizontal-stepper-header{height:48px}[_nghost-%COMP%] .mat-horizontal-stepper-header .mat-step-label{font-size:1.2rem;font-weight:600;letter-spacing:.02em;color:var(--df-text-muted)}[_nghost-%COMP%] .mat-horizontal-stepper-header .mat-step-label-selected{color:var(--df-text)}[_nghost-%COMP%] .mat-horizontal-stepper-header .mat-step-icon{height:22px;width:22px;font-size:1.1rem;background-color:var(--df-surface-2);color:var(--df-text-muted);border:1px solid var(--df-border)}[_nghost-%COMP%] .mat-horizontal-stepper-header .mat-step-icon .mat-icon{font-size:1.2rem;height:auto;width:auto;line-height:1}[_nghost-%COMP%] .mat-horizontal-stepper-header .mat-step-icon-selected, [_nghost-%COMP%] .mat-horizontal-stepper-header .mat-step-icon-state-edit{background-color:var(--df-accent)!important;color:var(--df-accent-contrast);border-color:transparent}[_nghost-%COMP%] .mat-stepper-horizontal-line{border-top-color:var(--df-border-2)}label.radio-card[_ngcontent-%COMP%]{cursor:pointer}label.radio-card[_ngcontent-%COMP%] .card-content-wrapper[_ngcontent-%COMP%]{background:var(--df-surface);border-radius:var(--df-radius-sm);max-width:200px;min-height:200px;padding:12px;display:grid;box-shadow:none;border:1px solid var(--df-border);background-size:contain;background-repeat:no-repeat;transition:border-color .15s ease}label.radio-card[_ngcontent-%COMP%] .card-content-wrapper.not-included[_ngcontent-%COMP%]{opacity:.5;cursor:default!important;pointer-events:none!important}label.radio-card[_ngcontent-%COMP%] .check-icon[_ngcontent-%COMP%]{width:20px;height:20px;display:inline-block;border:solid 2px var(--df-border);background-color:var(--df-surface-2);border-radius:50%;position:relative}label.radio-card[_ngcontent-%COMP%] .check-icon[_ngcontent-%COMP%]:before{content:\"\";position:absolute;inset:0;background-image:url(\"data:image/svg+xml,%3Csvg width='12' height='9' viewBox='0 0 12 9' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0.93552 4.58423C0.890286 4.53718 0.854262 4.48209 0.829309 4.42179C0.779553 4.28741 0.779553 4.13965 0.829309 4.00527C0.853759 3.94471 0.889842 3.88952 0.93552 3.84283L1.68941 3.12018C1.73378 3.06821 1.7893 3.02692 1.85185 2.99939C1.91206 2.97215 1.97736 2.95796 2.04345 2.95774C2.11507 2.95635 2.18613 2.97056 2.2517 2.99939C2.31652 3.02822 2.3752 3.06922 2.42456 3.12018L4.69872 5.39851L9.58026 0.516971C9.62828 0.466328 9.68554 0.42533 9.74895 0.396182C9.81468 0.367844 9.88563 0.353653 9.95721 0.354531C10.0244 0.354903 10.0907 0.369582 10.1517 0.397592C10.2128 0.425602 10.2672 0.466298 10.3112 0.516971L11.0651 1.25003C11.1108 1.29672 11.1469 1.35191 11.1713 1.41247C11.2211 1.54686 11.2211 1.69461 11.1713 1.82899C11.1464 1.88929 11.1104 1.94439 11.0651 1.99143L5.06525 7.96007C5.02054 8.0122 4.96514 8.0541 4.90281 8.08294C4.76944 8.13802 4.61967 8.13802 4.4863 8.08294C4.42397 8.0541 4.36857 8.0122 4.32386 7.96007L0.93552 4.58423Z' fill='white'/%3E%3C/svg%3E%0A\");background-repeat:no-repeat;background-size:12px;background-position:center center;transform:scale(1.6);opacity:0}label.radio-card[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{appearance:none;-webkit-appearance:none;-moz-appearance:none}label.radio-card[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + .card-content-wrapper[_ngcontent-%COMP%]{border-color:var(--df-accent);box-shadow:0 0 0 1px var(--df-accent);opacity:1}label.radio-card[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + .card-content-wrapper[_ngcontent-%COMP%] .check-icon[_ngcontent-%COMP%]{transform:scale(1.2);background-color:var(--df-accent);border-color:var(--df-accent)}label.radio-card[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + .card-content-wrapper[_ngcontent-%COMP%] .check-icon[_ngcontent-%COMP%]:before{transform:scale(1);opacity:1}label.radio-card[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:focus + .card-content-wrapper[_ngcontent-%COMP%] .check-icon[_ngcontent-%COMP%]{box-shadow:0 0 0 4px var(--df-accent-soft);border-color:var(--df-accent)}label.radio-card[_ngcontent-%COMP%] .card-content[_ngcontent-%COMP%]{width:100%;text-align:center}label.radio-card[_ngcontent-%COMP%] .card-content[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin-bottom:10px;width:100%;height:110px}label.radio-card[_ngcontent-%COMP%] .card-content[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{color:var(--df-text)}.details-section[_ngcontent-%COMP%] .section-header[_ngcontent-%COMP%], .details-section[_ngcontent-%COMP%] .action-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between;width:100%}mat-icon[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.calendly-inline-widget[_ngcontent-%COMP%]{height:500px}.unlock-btn[_ngcontent-%COMP%]{position:relative;top:-95px;right:-55px;color:var(--df-danger)}.action-bar[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.action-bar[_ngcontent-%COMP%] .button-group[_ngcontent-%COMP%]{display:flex;gap:8px}.action-bar[_ngcontent-%COMP%] .secondary-btn[_ngcontent-%COMP%]{background-color:transparent!important;border:1px solid var(--df-accent)!important;color:var(--df-accent)!important} .mat-expansion-panel-header>.mat-expansion-indicator:after{color:unset!important} .mat-mdc-select-arrow{color:unset!important}.dark-theme[_nghost-%COMP%] label.radio-card[_ngcontent-%COMP%] .card-content-wrapper[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] label.radio-card[_ngcontent-%COMP%] .card-content-wrapper[_ngcontent-%COMP%]{background:#000;border:1px solid #fff}.dark-theme[_nghost-%COMP%] label.radio-card[_ngcontent-%COMP%] .check-icon[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] label.radio-card[_ngcontent-%COMP%] .check-icon[_ngcontent-%COMP%]{border:solid 2px #2d2d2d}.dark-theme[_nghost-%COMP%] label.radio-card[_ngcontent-%COMP%] .card-content[_ngcontent-%COMP%] h4[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] label.radio-card[_ngcontent-%COMP%] .card-content[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{color:#fff}.dark-theme[_nghost-%COMP%] .details-section[_ngcontent-%COMP%] .mat-button-toggle-group button, .dark-theme [_nghost-%COMP%] .details-section[_ngcontent-%COMP%] .mat-button-toggle-group button{background:inherit!important}.dark-theme[_nghost-%COMP%] .details-section[_ngcontent-%COMP%] .mat-button-toggle-group button span, .dark-theme [_nghost-%COMP%] .details-section[_ngcontent-%COMP%] .mat-button-toggle-group button span{color:var(--df-text)!important}.security-config-container[_ngcontent-%COMP%]{padding:24px 0}.security-config-container[_ngcontent-%COMP%] .top-hint[_ngcontent-%COMP%]{margin-bottom:24px;padding:12px 16px;background:var(--df-accent-soft);border-radius:var(--df-radius-sm)}.security-config-container[_ngcontent-%COMP%] .top-hint[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:1.35rem;color:var(--df-text)}.security-config-container[_ngcontent-%COMP%] .top-hint[_ngcontent-%COMP%] .role-link[_ngcontent-%COMP%]{color:var(--df-accent);text-decoration:none;font-weight:500;cursor:pointer}.security-config-container[_ngcontent-%COMP%] .top-hint[_ngcontent-%COMP%] .role-link[_ngcontent-%COMP%]:hover{text-decoration:underline}.security-config-container[_ngcontent-%COMP%] .security-cards-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,1fr);gap:16px;margin-bottom:32px}@media (max-width: 768px){.security-config-container[_ngcontent-%COMP%] .security-cards-grid[_ngcontent-%COMP%]{grid-template-columns:1fr}}.security-config-container[_ngcontent-%COMP%] .security-option-card[_ngcontent-%COMP%]{position:relative;cursor:pointer;transition:border-color .15s ease-in-out;border-radius:var(--df-radius);background:var(--df-surface);border:1px solid var(--df-border-2);box-shadow:none;overflow:hidden;height:100%;min-height:160px;display:flex;flex-direction:column}.security-config-container[_ngcontent-%COMP%] .security-option-card[_ngcontent-%COMP%]:hover{border-color:var(--df-accent)}.security-config-container[_ngcontent-%COMP%] .security-option-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%]{padding:24px;display:flex;flex-direction:column;align-items:center;text-align:center;gap:12px;height:100%;justify-content:center}.security-config-container[_ngcontent-%COMP%] .security-option-card[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin:0;font-size:1.6rem;font-weight:600;letter-spacing:-.01em;color:var(--df-text)}.security-config-container[_ngcontent-%COMP%] .security-option-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;color:var(--df-text-muted);font-size:1.35rem;line-height:1.5}.security-config-container[_ngcontent-%COMP%] .security-option-card.selected[_ngcontent-%COMP%]{border-color:var(--df-accent);background-color:var(--df-accent-soft)}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%]{margin-top:32px}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .search-field[_ngcontent-%COMP%]{width:100%;max-width:400px;margin-bottom:24px}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .search-field[_ngcontent-%COMP%] .mat-mdc-form-field-wrapper[_ngcontent-%COMP%]{padding-bottom:0}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .components-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:12px;margin-bottom:24px}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .component-card[_ngcontent-%COMP%]{border:1px solid var(--df-border-2);border-radius:var(--df-radius-sm);transition:border-color .15s ease-in-out;cursor:pointer;box-shadow:none;background:var(--df-surface)}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .component-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%]{padding:16px;display:flex;align-items:center;gap:12px}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .component-card[_ngcontent-%COMP%] .checkbox-wrapper[_ngcontent-%COMP%]{margin-right:8px}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .component-card[_ngcontent-%COMP%]:hover{border-color:var(--df-accent)}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .component-card.selected[_ngcontent-%COMP%]{border-color:var(--df-accent);background-color:var(--df-accent-soft)}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .access-level-section[_ngcontent-%COMP%]{margin-top:32px;padding:24px;background:var(--df-surface);border-radius:var(--df-radius);border:1px solid var(--df-border-2)}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .access-level-section[_ngcontent-%COMP%] .hint-widget[_ngcontent-%COMP%]{margin:0 0 24px;padding:12px 16px;background:var(--df-accent-soft);border-radius:var(--df-radius-sm);display:flex;align-items:center;gap:12px}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .access-level-section[_ngcontent-%COMP%] .hint-widget[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:var(--df-accent);font-size:20px;width:20px;height:20px}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .access-level-section[_ngcontent-%COMP%] .hint-widget[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:1.35rem;color:var(--df-text)}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .access-level-section[_ngcontent-%COMP%] .hint-widget[_ngcontent-%COMP%] .role-link[_ngcontent-%COMP%]{color:var(--df-accent);text-decoration:none;font-weight:500;cursor:pointer}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .access-level-section[_ngcontent-%COMP%] .hint-widget[_ngcontent-%COMP%] .role-link[_ngcontent-%COMP%]:hover{text-decoration:underline}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .access-level-section[_ngcontent-%COMP%] .access-level-controls[_ngcontent-%COMP%] mat-button-toggle-group[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;border:none;width:100%}@media (max-width: 768px){.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .access-level-section[_ngcontent-%COMP%] .access-level-controls[_ngcontent-%COMP%] mat-button-toggle-group[_ngcontent-%COMP%]{grid-template-columns:1fr}}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .access-level-section[_ngcontent-%COMP%] .access-level-controls[_ngcontent-%COMP%] .mat-button-toggle[_ngcontent-%COMP%]{background:var(--df-surface);border:1px solid var(--df-border-2);border-radius:var(--df-radius-sm);height:auto;width:100%;transition:border-color .15s ease-in-out}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .access-level-section[_ngcontent-%COMP%] .access-level-controls[_ngcontent-%COMP%] .mat-button-toggle[_ngcontent-%COMP%]:hover{border-color:var(--df-accent)}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .access-level-section[_ngcontent-%COMP%] .access-level-controls[_ngcontent-%COMP%] .mat-button-toggle[_ngcontent-%COMP%] .toggle-content[_ngcontent-%COMP%]{padding:16px;text-align:center}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .access-level-section[_ngcontent-%COMP%] .access-level-controls[_ngcontent-%COMP%] .mat-button-toggle[_ngcontent-%COMP%] .toggle-content[_ngcontent-%COMP%] .toggle-text[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600;letter-spacing:-.01em;color:var(--df-text)}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .access-level-section[_ngcontent-%COMP%] .access-level-controls[_ngcontent-%COMP%] .mat-button-toggle[_ngcontent-%COMP%] .toggle-content[_ngcontent-%COMP%] .toggle-text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:6px 0 0;font-size:1.3rem;color:var(--df-text-muted)}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .access-level-section[_ngcontent-%COMP%] .access-level-controls[_ngcontent-%COMP%] .mat-button-toggle.mat-button-toggle-checked[_ngcontent-%COMP%]{background:var(--df-accent-soft);border-color:var(--df-accent)}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .access-level-section[_ngcontent-%COMP%] .access-level-controls[_ngcontent-%COMP%] .mat-button-toggle.mat-button-toggle-checked[_ngcontent-%COMP%] .toggle-text[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{color:var(--df-accent)}.action-container[_ngcontent-%COMP%]{margin-top:24px;padding-top:16px;border-top:1px solid var(--df-border-2);display:flex;justify-content:space-between;align-items:center}.action-container[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-width:120px}.component-selection[_ngcontent-%COMP%] .hint-widget[_ngcontent-%COMP%]{margin:0 0 24px;padding:12px 16px;background:var(--df-accent-soft);border-radius:var(--df-radius-sm)}.component-selection[_ngcontent-%COMP%] .hint-widget[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:1.35rem;color:var(--df-text)}.component-selection[_ngcontent-%COMP%] .hint-widget[_ngcontent-%COMP%] .role-link[_ngcontent-%COMP%]{color:var(--df-accent);text-decoration:none;font-weight:500;cursor:pointer}.component-selection[_ngcontent-%COMP%] .hint-widget[_ngcontent-%COMP%] .role-link[_ngcontent-%COMP%]:hover{text-decoration:underline}.mcp-tools-container[_ngcontent-%COMP%]{padding:12px 0}.mcp-tools-container[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-size:1.2rem;padding:3px 8px;background:var(--df-accent-soft);color:var(--df-accent-strong);border-radius:4px;white-space:nowrap;font-weight:500}.mcp-service-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.toggle-col[_ngcontent-%COMP%]{width:60px}.disabled-row[_ngcontent-%COMP%]{opacity:.45;transition:opacity .2s ease}.disabled-row[_ngcontent-%COMP%]:hover{opacity:.65}.mcp-services-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse}.mcp-services-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .mcp-services-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{text-align:left;padding:12px;border-bottom:1px solid var(--df-border-2)}.mcp-services-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{font-weight:600;color:var(--df-text-muted);font-size:11px;text-transform:uppercase;letter-spacing:.06em}.mcp-services-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{font-size:1.35rem}.mcp-services-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{height:44px;transition:background-color .15s ease}.mcp-services-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background-color:var(--df-hover)}.custom-tools-container[_ngcontent-%COMP%]{padding:12px 0}.custom-tools-container[_ngcontent-%COMP%] .custom-tools-description[_ngcontent-%COMP%]{color:var(--df-text-muted);font-size:1.35rem;line-height:1.6;margin-bottom:16px}.custom-tools-container[_ngcontent-%COMP%] .custom-tools-actions[_ngcontent-%COMP%]{margin-bottom:16px}.custom-tools-container[_ngcontent-%COMP%] .no-tools-message[_ngcontent-%COMP%]{color:var(--df-text-faint);font-style:italic;padding:24px 16px;text-align:center;border:1px dashed var(--df-border);border-radius:var(--df-radius-sm);background:var(--df-surface-2)}.custom-tools-container[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-size:1.2rem;padding:3px 8px;background:var(--df-accent-soft);color:var(--df-accent-strong);border-radius:4px;white-space:nowrap;font-weight:500}.custom-tools-container[_ngcontent-%COMP%] .url-cell[_ngcontent-%COMP%]{max-width:300px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--df-text-muted);font-size:1.3rem}.tool-type-toggle[_ngcontent-%COMP%]{margin-bottom:16px}.tool-type-toggle[_ngcontent-%COMP%] .mat-button-toggle[_ngcontent-%COMP%]{min-width:110px}.custom-tool-form[_ngcontent-%COMP%]{background:var(--df-surface-2);border:1px solid var(--df-border-2);border-radius:var(--df-radius);padding:20px;margin-bottom:16px}.custom-tool-form[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin:0 0 16px;font-weight:600;font-size:1.5rem;letter-spacing:-.01em;color:var(--df-text)}.custom-tool-form[_ngcontent-%COMP%] .form-row[_ngcontent-%COMP%]{display:flex;gap:16px;align-items:flex-start}.custom-tool-form[_ngcontent-%COMP%] .form-field-half[_ngcontent-%COMP%]{flex:1}.custom-tool-form[_ngcontent-%COMP%] .form-field-quarter[_ngcontent-%COMP%]{width:160px;flex-shrink:0}.custom-tool-form[_ngcontent-%COMP%] .form-field-third[_ngcontent-%COMP%]{flex:1;min-width:0}.custom-tool-form[_ngcontent-%COMP%] .scm-link-section[_ngcontent-%COMP%]{margin-bottom:16px}.custom-tool-form[_ngcontent-%COMP%] .scm-actions[_ngcontent-%COMP%]{margin-top:8px;margin-bottom:8px}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%]{margin:20px 0}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .section-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .section-header[_ngcontent-%COMP%] h5[_ngcontent-%COMP%]{margin:0;font-weight:600;font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--df-text-muted)}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .parameter-cards[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .parameter-card[_ngcontent-%COMP%]{background:var(--df-surface);border:1px solid var(--df-border-2);border-radius:var(--df-radius);padding:16px 20px 8px;transition:border-color .2s ease,box-shadow .2s ease}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .parameter-card[_ngcontent-%COMP%]:hover{border-color:var(--df-border)}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .parameter-card[_ngcontent-%COMP%]:focus-within{border-color:var(--df-accent);box-shadow:0 0 0 2px var(--df-accent-soft)}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .parameter-card-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .parameter-card-header[_ngcontent-%COMP%] .parameter-index[_ngcontent-%COMP%]{font-size:1.2rem;font-weight:600;color:var(--df-accent-strong);background:var(--df-accent-soft);padding:2px 8px;border-radius:var(--df-radius-sm);letter-spacing:.03em}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .parameter-card-header[_ngcontent-%COMP%] .parameter-remove-btn[_ngcontent-%COMP%]{opacity:.4;transition:opacity .15s ease;transform:scale(.85)}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .parameter-card-header[_ngcontent-%COMP%] .parameter-remove-btn[_ngcontent-%COMP%]:hover{opacity:1}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .parameter-card-fields[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 120px 120px auto;gap:12px;align-items:start}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .parameter-card-fields[_ngcontent-%COMP%] .param-field[_ngcontent-%COMP%]{min-width:0}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .parameter-card-fields[_ngcontent-%COMP%] .param-field--name[_ngcontent-%COMP%]{grid-column:1}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .parameter-card-fields[_ngcontent-%COMP%] .param-field--type[_ngcontent-%COMP%]{grid-column:2}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .parameter-card-fields[_ngcontent-%COMP%] .param-field--location[_ngcontent-%COMP%]{grid-column:3}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .parameter-card-fields[_ngcontent-%COMP%] .param-field--required[_ngcontent-%COMP%]{grid-column:4;padding-top:12px;white-space:nowrap}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .parameter-card-fields[_ngcontent-%COMP%] .param-field--desc[_ngcontent-%COMP%]{grid-column:1/-1}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .no-parameters-hint[_ngcontent-%COMP%]{color:var(--df-text-faint);font-size:1.3rem;text-align:center;padding:20px 16px;margin:0;border:1px dashed var(--df-border);border-radius:var(--df-radius-sm)}.custom-tool-form[_ngcontent-%COMP%] .inline-input[_ngcontent-%COMP%]{width:100%;padding:6px 10px;border:1px solid var(--df-border);border-radius:var(--df-radius-sm);font-size:1.3rem;background:var(--df-surface);color:var(--df-text);transition:border-color .2s ease,box-shadow .2s ease}.custom-tool-form[_ngcontent-%COMP%] .inline-input[_ngcontent-%COMP%]:focus{outline:none;border-color:var(--df-accent);box-shadow:0 0 0 2px var(--df-accent-soft)}.custom-tool-form[_ngcontent-%COMP%] .inline-input[_ngcontent-%COMP%]::placeholder{color:var(--df-text-faint)}.custom-tool-form[_ngcontent-%COMP%] .inline-select[_ngcontent-%COMP%]{padding:6px 10px;border:1px solid var(--df-border);border-radius:var(--df-radius-sm);font-size:1.3rem;background:var(--df-surface);color:var(--df-text);cursor:pointer;transition:border-color .2s ease,box-shadow .2s ease}.custom-tool-form[_ngcontent-%COMP%] .inline-select[_ngcontent-%COMP%]:focus{outline:none;border-color:var(--df-accent);box-shadow:0 0 0 2px var(--df-accent-soft)}.custom-tool-form[_ngcontent-%COMP%] .editor-section[_ngcontent-%COMP%]{margin-bottom:16px}.custom-tool-form[_ngcontent-%COMP%] .editor-section[_ngcontent-%COMP%] .editor-label[_ngcontent-%COMP%]{display:block;font-size:1.3rem;font-weight:500;color:var(--df-text-muted);margin-bottom:8px}.custom-tool-form[_ngcontent-%COMP%] .editor-section[_ngcontent-%COMP%] .editor-label-row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}.custom-tool-form[_ngcontent-%COMP%] .editor-section[_ngcontent-%COMP%] .editor-label-row[_ngcontent-%COMP%] .editor-label[_ngcontent-%COMP%]{margin-bottom:0}.custom-tool-form[_ngcontent-%COMP%] .editor-section[_ngcontent-%COMP%] .editor-wrapper[_ngcontent-%COMP%]{border:1px solid var(--df-border);border-radius:var(--df-radius-sm);overflow:hidden;transition:border-color .2s ease,box-shadow .2s ease}.custom-tool-form[_ngcontent-%COMP%] .editor-section[_ngcontent-%COMP%] .editor-wrapper[_ngcontent-%COMP%]:focus-within{border-color:var(--df-accent);box-shadow:0 0 0 2px var(--df-accent-soft)}.custom-tool-form[_ngcontent-%COMP%] .editor-section[_ngcontent-%COMP%] .editor-wrapper[_ngcontent-%COMP%] df-ace-editor[_ngcontent-%COMP%]{display:block;min-height:200px}.custom-tool-form[_ngcontent-%COMP%] .editor-section[_ngcontent-%COMP%] .editor-wrapper[_ngcontent-%COMP%] df-ace-editor[_ngcontent-%COMP%] .editor{min-height:200px;border-radius:var(--df-radius-sm)}.custom-tool-form[_ngcontent-%COMP%] .editor-section[_ngcontent-%COMP%] .editor-wrapper--compact[_ngcontent-%COMP%] df-ace-editor[_ngcontent-%COMP%]{min-height:100px}.custom-tool-form[_ngcontent-%COMP%] .editor-section[_ngcontent-%COMP%] .editor-wrapper--compact[_ngcontent-%COMP%] df-ace-editor[_ngcontent-%COMP%] .editor{min-height:100px}.custom-tool-form[_ngcontent-%COMP%] .editor-section[_ngcontent-%COMP%] .editor-hint[_ngcontent-%COMP%]{display:block;font-size:1.2rem;color:var(--df-text-faint);margin-top:6px;padding-left:2px}.custom-tool-form[_ngcontent-%COMP%] .form-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:12px;margin-top:24px;padding-top:16px;border-top:1px solid var(--df-border-2)}.btn-icon[_ngcontent-%COMP%]{margin-right:6px}.action-col[_ngcontent-%COMP%]{width:100px;white-space:nowrap;text-align:right;padding-right:4px!important}.action-col[_ngcontent-%COMP%] .action-buttons[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end;gap:2px}.action-col[_ngcontent-%COMP%] .action-buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{opacity:.6;transition:opacity .15s ease}.action-col[_ngcontent-%COMP%] .action-buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{opacity:1}.basic-fields-section[_ngcontent-%COMP%]{margin-bottom:24px}.advanced-section[_ngcontent-%COMP%]{margin-top:24px;margin-bottom:24px}.first-time-guidance[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;padding:12px 16px;margin:16px 0;background:var(--df-accent-soft);border-radius:var(--df-radius-sm);border-left:3px solid var(--df-accent)}.first-time-guidance[_ngcontent-%COMP%] .guidance-icon[_ngcontent-%COMP%]{color:var(--df-accent);font-size:18px;flex-shrink:0}.first-time-guidance[_ngcontent-%COMP%] .guidance-text[_ngcontent-%COMP%]{margin:0;color:var(--df-text-2);font-size:1.35rem;line-height:1.5;flex:1}.service-overview-card[_ngcontent-%COMP%]{display:block;margin-bottom:var(--df-space-5)}.curl-import-action[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap;margin-bottom:1rem}.curl-import-action[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{margin-right:.5rem}.curl-import-action__hint[_ngcontent-%COMP%]{font-size:.85rem;opacity:.7}"]})}};Ot=yt=(0,re.Cg)([(0,H.d)({checkProperties:!0})],Ot);var Vd=g(51407);const Cn=[{key:"read",label:"Read data",warn:null,verbs:[{verb:"get_table_data",title:"Get Table Data",description:"Retrieve records from a table with filtering and paging"},{verb:"aggregate_data",title:"Aggregate Data",description:"Compute server-side aggregations (SUM, COUNT, AVG, MIN, MAX)"}]},{key:"schema",label:"Explore schema",warn:null,verbs:[{verb:"get_tables",title:"Get Tables",description:"List tables available in the database"},{verb:"get_table_schema",title:"Get Table Schema",description:"Retrieve schema definition for a table"},{verb:"get_table_fields",title:"Get Table Fields",description:"Retrieve field definitions for a table"},{verb:"get_table_relationships",title:"Get Table Relationships",description:"Retrieve relationships definition for a table"},{verb:"get_database_resources",title:"List Database Resources",description:"Get all resources available in the database service"},{verb:"get_api_spec",title:"Get API Spec",description:"Get the OpenAPI specification for this database service"},{verb:"get_data_model",title:"Get Data Model",description:"Get a condensed data model showing all tables and columns"}]},{key:"write",label:"Write data",warn:"writes",verbs:[{verb:"create_records",title:"Create Records",description:"Insert records into a table"},{verb:"update_records",title:"Update Records",description:"Update (patch) records in a table"},{verb:"delete_records",title:"Delete Records",description:"Delete records from a table"}]},{key:"procs",label:"Procedures & functions",warn:"executes",verbs:[{verb:"get_stored_procedures",title:"List Stored Procedures",description:"Get stored procedures available in the database"},{verb:"call_stored_procedure",title:"Call Stored Procedure",description:"Call a stored procedure"},{verb:"get_stored_functions",title:"List Stored Functions",description:"Get stored functions available in the database"},{verb:"call_stored_function",title:"Call Stored Function",description:"Call a stored function"}]}],kn=[{key:"fread",label:"Read files",warn:null,verbs:[{verb:"list_files",title:"List Files",description:"List files and folders in a path"},{verb:"get_file",title:"Get File",description:"Read the contents of a file"},{verb:"get_file_properties",title:"Get File Properties",description:"Get properties/metadata of a file or folder"}]},{key:"fwrite",label:"Write files",warn:"writes",verbs:[{verb:"create_file",title:"Create File",description:"Create or overwrite a file"},{verb:"create_folder",title:"Create Folder",description:"Create a new folder"},{verb:"delete_file",title:"Delete File or Folder",description:"Delete a file or folder"}]}],ye=[{verb:"discover_services",title:"Discover Services",description:"List the services and operations the calling role can access"},{verb:"request_access",title:"Request Access",description:"Explain how to request wider access"},{verb:"list_apis",title:"List Available APIs",description:"List all available database APIs and their tool prefixes"},{verb:"search",title:"Search",description:"Search records across the exposed services"},{verb:"fetch",title:"Fetch",description:"Fetch one record by id"}],Pt=[{verb:"all_get_tables",title:"Get Tables from All Databases",description:"Retrieve tables from all connected database services in one call"},{verb:"all_find_table",title:"Find Table Across Databases",description:"Search for a table by name across all connected databases"},{verb:"all_get_stored_procedures",title:"Get Stored Procedures from All",description:"Retrieve stored procedures from all connected databases"},{verb:"all_get_stored_functions",title:"Get Stored Functions from All",description:"Retrieve stored functions from all connected databases"},{verb:"all_get_resources",title:"Get Resources from All",description:"Retrieve all available resources from all connected databases"},{verb:"all_list_files",title:"List Files from All Storage",description:"List files from all connected file storage services"}];function Ve(n,a){return Pt.filter(t=>"all_list_files"===t.verb?a>=2:n>=2)}const Me=[{verb:"search_tools",title:"Search Tools",description:"Find tools by capability"},{verb:"describe_tool",title:"Describe Tool",description:"Get one tool\u2019s full schema"},{verb:"call_tool",title:"Call Tool",description:"Invoke a tool by name"},{verb:"fetch_more",title:"Fetch More",description:"Page through a long result"},{verb:"list_tools",title:"List Tools",description:"Page through the full catalog"}];function Xd(n,a){return"Database"===n?"db":"local_file"===a||"File"===n?"file":null}function Oe(n){return"db"===n?Cn:kn}function $(n){return Oe(n).flatMap(a=>a.verbs)}const We=new Set(["write","procs","fwrite"]),Qe=new Set(["create_records","update_records","delete_records","call_stored_procedure","call_stored_function","create_file","create_folder","delete_file"]),Ze=32768,yn=540;function Ft(n){return"on"===n||"always"===n||!0===n?"on":"off"===n||"never"===n||!1===n?"off":"auto"}const zd=["exposed_services","exposedServices","disabled_tools","disabledTools","tool_style","toolStyle","lazy_mode","lazyMode","allow_api_key_auth","allowApiKeyAuth","allow_writes","allowWrites","require_role_access","requireRoleAccess","oauth_client_id","oauthClientId","oauth_client_secret","oauthClientSecret","custom_login_url","customLoginUrl","auto_oauth_service","autoOauthService","redirect_uris","redirectUris","registered_redirect_uris","registeredRedirectUris","custom_tools","customTools"];function te(n,a,t){return void 0!==n[a]?n[a]:n[t]}function wt(n){const a=n??{},t=te(a,"exposed_services","exposedServices"),o=te(a,"disabled_tools","disabledTools"),i=te(a,"tool_style","toolStyle"),r=te(a,"redirect_uris","redirectUris"),c=te(a,"registered_redirect_uris","registeredRedirectUris"),s={};for(const l of Object.keys(a))zd.includes(l)||(s[l]=a[l]);return{exposedServices:Array.isArray(t)?[...t]:[],disabledTools:new Set(Array.isArray(o)?o:[]),toolStyle:"merged"===i?"merged":"prefixed"===i?"prefixed":null,lazyMode:Ft(te(a,"lazy_mode","lazyMode")),allowApiKeyAuth:!!te(a,"allow_api_key_auth","allowApiKeyAuth"),allowWrites:!1!==te(a,"allow_writes","allowWrites"),requireRoleAccess:!!te(a,"require_role_access","requireRoleAccess"),oauthClientId:te(a,"oauth_client_id","oauthClientId")??"",oauthClientSecret:te(a,"oauth_client_secret","oauthClientSecret")??"",customLoginUrl:te(a,"custom_login_url","customLoginUrl")??"",autoOauthService:te(a,"auto_oauth_service","autoOauthService")??null,redirectUris:Array.isArray(r)?[...r]:[],registeredRedirectUris:Array.isArray(c)?[...c]:[],customTools:te(a,"custom_tools","customTools")??[],rest:s}}function Mn(n,a="mcp"){const t={...n.rest,exposedServices:[...n.exposedServices],disabledTools:[...n.disabledTools].sort(),toolStyle:n.toolStyle,lazyMode:Ft(n.lazyMode),allowApiKeyAuth:n.allowApiKeyAuth,allowWrites:!1!==n.allowWrites,requireRoleAccess:!!n.requireRoleAccess,oauthClientId:n.oauthClientId,oauthClientSecret:n.oauthClientSecret,customLoginUrl:n.customLoginUrl||null,autoOauthService:n.autoOauthService,redirectUris:[...n.redirectUris],registeredRedirectUris:[...n.registeredRedirectUris??[]]};return"mcp"===a&&(t.customTools=(n.customTools??[]).map(o=>({id:o.id,toolType:o.toolType||"api",name:o.name,description:o.description,httpMethod:o.httpMethod,url:o.url,parameters:o.parameters,headers:o.headers,function:o.function||"",enabled:o.enabled,storageServiceId:o.storageServiceId||null,scmRepository:o.scmRepository||"",scmReference:o.scmReference||"",storagePath:o.storagePath||""}))),t}function On(n,a){const t=[];for(const o of n){const i=Xd(a[o.type]??"",o.type);i&&t.push({id:o.id,name:o.name,label:o.label||o.name,kind:i,active:o.isActive??o.is_active??!0})}return t}function ne(n,a){return`${n}_${a}`}function Pn(n,a){const t=$(n.kind);return{on:t.filter(o=>!a.has(ne(n.name,o.verb))).length,total:t.length}}function et(n,a,t){const o=a.verbs.filter(i=>!t.has(ne(n.name,i.verb))).length;return 0===o?"off":o===a.verbs.length?"on":"part"}function Dt(n,a){const t=Pn(n,a);if(0===t.on)return{kind:"zero",label:`0 of ${t.total}`};if(t.on===t.total)return{kind:"full",label:"Full"};const o=Oe(n.kind),i=o.filter(c=>We.has(c.key)).every(c=>"off"===et(n,c,a)),r=o.filter(c=>!We.has(c.key)).every(c=>"on"===et(n,c,a));return i&&r?{kind:"ro",label:"Read-only"}:{kind:"custom",label:`Custom ${t.on} of ${t.total}`}}function Tt(n){return Oe(n.kind).filter(a=>We.has(a.key)).flatMap(a=>a.verbs.map(t=>ne(n.name,t.verb)))}function St(n){return $(n.kind).map(a=>ne(n.name,a.verb))}function ce(n,a,t){return!(!1===n.allowWrites&&Qe.has(t)||n.disabledTools.has(ne(a,t)))}function Rt(n,a){return function Bd(n){return!!n&&!1!==n.enabled&&0!==n.enabled}(a)&&(!1!==n.allowWrites||!tt(a))}function tt(n){return!!n&&("function"===(n.toolType||"api")||"GET"!==String(n.httpMethod??"GET").toUpperCase())}const Fn=new Set($("db").map(n=>n.verb)),wn=new Set($("file").map(n=>n.verb));function Xe(n,a,t){const o=a+"_";if(!n.startsWith(o))return!1;const i=n.slice(o.length);return"db"===t?Fn.has(i):"file"===t?wn.has(i):Fn.has(i)||wn.has(i)}function Dn(n,a){return n.exposedServices.map(t=>({name:t,svc:a.find(o=>o.name===t)??null}))}function It(n,a,t){return Dn(n,a).map(o=>o.svc).filter(o=>!!o&&o.active&&(!t||o.kind===t))}function ze(n,a){const t="merged"===n.toolStyle?"merged":"prefixed",o=It(n,a,"db"),i=It(n,a,"file"),r=n.disabledTools,c=V=>$(V.kind).filter(Q=>ce(n,V.name,Q.verb)).length;let s=0;if(o.length)if("merged"===t)for(const V of $("db"))o.some(Q=>ce(n,Q.name,V.verb))&&s++;else s=o.reduce((V,Q)=>V+c(Q),0);let l=0;if(i.length)if("merged"===t)for(const V of $("file"))i.some(Q=>ce(n,Q.name,V.verb))&&l++;else l=i.reduce((V,Q)=>V+c(Q),0);const p=ye.filter(V=>!r.has(V.verb)).length,f=Ve(o.length,i.length).filter(V=>!r.has(V.verb)).length,M=(n.customTools??[]).filter(V=>Rt(n,V)),v=M.length,x=M.filter(tt).length,F=new Set,T=new Set;let B=0,_=0,C=0,k=0;for(const V of!1===n.allowWrites?[]:[...o,...i]){const Q=Oe(V.kind).filter(ge=>We.has(ge.key)).flatMap(ge=>ge.verbs).filter(ge=>ce(n,V.name,ge.verb));Q.length&&(C++,"db"===V.kind?(k++,B+=Q.length,Q.forEach(ge=>F.add(ge.verb))):(_+=Q.length,Q.forEach(ge=>T.add(ge.verb))))}const $e=("merged"===t?F.size:B)+("merged"===t?T.size:_)+x,be=s+l+p+f+v,Hn=Tn(be,n.lazyMode);return{total:be,dbTools:s,dbServices:o.length,fileTools:l,fileServices:i.length,globalTools:p,aggregators:f,customTools:v,writeVerbs:$e,writeCapableCustoms:x,writeReach:C,writeReachDb:k,readOnly:0===$e,tokenEstimate:Hn.tokens,lazyEngaged:Hn.lazy,effectiveStyle:t}}function Et(n,a,t){const o=It(a,t,"db");return{on:o.filter(i=>ce(a,i.name,n)).map(i=>i.name),total:o.length}}function $t(n,a,t){return"merged"===n?t:ne(a,t)}function Tn(n,a,t=yn){const o=n*t,i=Me.length*t,r="on"===a||"auto"===a&&o>Ze;return{count:n,bytes:o,facadeBytes:i,lazy:r,tokens:Sn(r,o,i),source:"estimate"}}function Sn(n,a,t){return Math.round((n?t:a)/4)}function Rn(n){return n>=1e3?`~${(n/1e3).toFixed(1)}k`:`~${n}`}function de(n){return`${(n/1024).toFixed(n<10240?1:0)} KB`}function Gt(n){return{...n,exposedServices:[...n.exposedServices],disabledTools:new Set(n.disabledTools),redirectUris:[...n.redirectUris],customTools:(n.customTools??[]).map(a=>({...a})),rest:{...n.rest}}}function In(n){return JSON.stringify({e:[...n.exposedServices],d:[...n.disabledTools].sort(),s:n.toolStyle,l:n.lazyMode,k:n.allowApiKeyAuth,w:n.allowWrites,rr:n.requireRoleAccess,ci:n.oauthClientId,cs:n.oauthClientSecret,lu:n.customLoginUrl,ao:n.autoOauthService,r:[...n.redirectUris],ct:n.customTools})}class En{constructor(){this.draftName="",this.draftLabel="",this.draftDescription="",this.draftIsActive=!0,this._version=0,this.memoVersion=-1,this.memo={},this._backendServices=[],this.backendLoaded=!1,this.created=!1,this.checklistDismissed=!1,this.copiedUrl=!1,this.copiedClient=!1,this.reconnectBanner=!1,this.createdApiKey=null,this.changes=new xe.B,this.health=null,this.healthChecked=!1,this.serverCatalog=null,this.previewIdentity={},this.reloadServerCatalog=()=>{}}get version(){return this._version}memoFor(){return this.memoVersion!==this._version&&(this.memo={},this.memoVersion=this._version),this.memo}get backendServices(){return this._backendServices}set backendServices(a){this._backendServices=a,this.touch()}setPreviewIdentity(a){this.previewIdentity={...a},this.serverCatalog=null,this.touch(),this.reloadServerCatalog()}setServerCatalog(a){this.serverCatalog=a,this.touch()}init(a,t){this.service=a,this.cfg=wt(t),this.savedCfg=Gt(this.cfg),this.draftName=a.name,this.draftLabel=a.label,this.draftDescription=a.description,this.draftIsActive=a.isActive,this.created=!1,this.checklistDismissed=!1,this.copiedUrl=!1,this.copiedClient=!1,this.reconnectBanner=!1,this.createdApiKey=null,this.touch()}get isSystemMcp(){return"system_mcp"===this.service?.type}touch(){this._version++,this.changes.next()}dirty(){return In(this.cfg)!==In(this.savedCfg)||this.draftName!==this.service.name||this.draftLabel!==this.service.label||this.draftDescription!==this.service.description||this.draftIsActive!==this.service.isActive}connectionAffecting(){return this.draftName!==this.service.name||this.cfg.allowApiKeyAuth!==this.savedCfg.allowApiKeyAuth||this.cfg.allowWrites!==this.savedCfg.allowWrites||this.cfg.toolStyle!==this.savedCfg.toolStyle||this.cfg.oauthClientSecret!==this.savedCfg.oauthClientSecret||JSON.stringify(this.cfg.redirectUris)!==JSON.stringify(this.savedCfg.redirectUris)}markSaved(){this.savedCfg=Gt(this.cfg),this.service.name=this.draftName,this.service.label=this.draftLabel,this.service.description=this.draftDescription,this.service.isActive=this.draftIsActive,this.touch()}discard(){this.cfg=Gt(this.savedCfg),this.draftName=this.service.name,this.draftLabel=this.service.label,this.draftDescription=this.service.description,this.draftIsActive=this.service.isActive,this.touch()}effective(){const a=this.memoFor();return a.effective??=ze(this.cfg,this.backendServices)}savedEffective(){const a=this.memoFor();return a.savedEffective??=ze(this.savedCfg,this.backendServices)}totalTools(){const a=this.memoFor();return a.totalTools??=this.isSystemMcp?ie.filter(t=>!this.cfg.disabledTools.has(t.name)).length:this.effective().total}savedTotalTools(){const a=this.memoFor();return a.savedTotalTools??=this.isSystemMcp?ie.filter(t=>!this.savedCfg.disabledTools.has(t.name)).length:this.savedEffective().total}catalogStats(){const a=this.memoFor();return a.catalogStats??=function qd(n,a,t,o){const i=t?.count&&t.bytes?Math.round(t.bytes/t.count):yn,r=Tn(n,a,i);if(!t||o)return r;if(null===t.count)return{...r,facadeBytes:t.bytes,lazy:!0,tokens:Math.round(t.bytes/4),source:"server"};const c=Me.length*i;return{count:t.count,bytes:t.bytes,facadeBytes:c,lazy:t.lazy,tokens:Sn(t.lazy,t.bytes,c),source:"server"}}(this.totalTools(),this.cfg.lazyMode,this.serverCatalog,this.dirty())}rows(){const a=this.memoFor();return a.rows??=Dn(this.cfg,this.backendServices)}fraction(a){return Pn(a,this.cfg.disabledTools)}access(a){return Dt(a,this.cfg.disabledTools)}orphans(){const a=this.memoFor();return a.orphans??=function Ld(n,a,t=[]){const o=new Set([...ye.map(s=>s.verb),...Pt.map(s=>s.verb),...(n.customTools??[]).map(s=>s?.name).filter(Boolean),...t]),i=new Set(a.map(s=>s.name)),r=n.exposedServices.filter(s=>!i.has(s));return[...n.disabledTools].filter(s=>!(s=>o.has(s)||a.some(l=>Xe(s,l.name,l.kind))||r.some(l=>Xe(s,l)))(s))}(this.cfg,this.backendServices,this.isSystemMcp?ie.map(t=>t.name):[])}kindOf(a){return this._backendServices.find(t=>t.name===a)?.kind}isToolEnabled(a,t){return!this.cfg.disabledTools.has(ne(a,t))}setTool(a,t,o){const i=ne(a,t);o?this.cfg.disabledTools.delete(i):this.cfg.disabledTools.add(i),this.touch()}isBareToolEnabled(a){return!this.cfg.disabledTools.has(a)}setBareTool(a,t){t?this.cfg.disabledTools.delete(a):this.cfg.disabledTools.add(a),this.touch()}setServiceFull(a){St(a).forEach(t=>this.cfg.disabledTools.delete(t)),this.touch()}setServiceReadOnly(a){St(a).forEach(t=>this.cfg.disabledTools.delete(t)),Tt(a).forEach(t=>this.cfg.disabledTools.add(t)),this.touch()}exposeServices(a,t){for(const o of a){this.cfg.exposedServices.includes(o)||this.cfg.exposedServices.push(o);const i=this.backendServices.find(r=>r.name===o);!i||"keep"===t||("ro"===t?this.setServiceReadOnly(i):this.setServiceFull(i))}this.touch()}removeService(a,t=!1){if(this.cfg.exposedServices=this.cfg.exposedServices.filter(o=>o!==a),t){const o=this.kindOf(a);for(const i of[...this.cfg.disabledTools])Xe(i,a,o)&&this.cfg.disabledTools.delete(i)}this.touch()}renameExposedEntry(a,t){this.cfg.exposedServices=this.cfg.exposedServices.map(i=>i===a?t:i);const o=this.kindOf(a);for(const i of[...this.cfg.disabledTools])Xe(i,a,o)&&(this.cfg.disabledTools.delete(i),this.cfg.disabledTools.add(t+i.slice(a.length)));this.touch()}makeReadOnly(){for(const a of this.rows())a.svc&&a.svc.active&&this.setServiceReadOnly(a.svc);for(const a of this.cfg.customTools??[])tt(a)&&(a.enabled=!1);this.touch()}dormantCurationCount(a){const t=this.kindOf(a);let o=0;for(const i of this.cfg.disabledTools)Xe(i,a,t)&&o++;return o}}function Wd(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",37),e.EFF(1," \u26a0 This server serves no tools. Agents can connect but can call nothing. "),e.j41(2,"button",38),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.goToTab.emit("tools"))}),e.EFF(3," Expose services in Tools. "),e.k0s()()}}function Qd(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",39)(1,"span"),e.EFF(2," Connection details changed \u2014 clients may need to reconnect. The snippets below are updated. "),e.k0s(),e.j41(3,"button",40),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.dismissReconnect())}),e.EFF(4," \xd7 "),e.k0s()()}}function Zd(n,a){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"span"),e.EFF(2),e.j41(3,"button",23),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.goToTab.emit("tools"))}),e.EFF(4," refine in Tools \u2192 "),e.k0s()(),e.bVm()}if(2&n){const t=e.XpG(2);e.R7$(2),e.SpI(" ",t.exposedSummary," \u2014 ")}}function ep(n,a){if(1&n){const t=e.RV6();e.j41(0,"span")(1,"button",23),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.goToTab.emit("tools"))}),e.EFF(2," Expose your first service \u2192 Tools. "),e.k0s(),e.EFF(3," 0 services exposed \u2014 agents get global and custom tools only. "),e.j41(4,"b"),e.EFF(5,"Empty never means every service."),e.k0s()()}}function tp(n,a){if(1&n){const t=e.RV6();e.j41(0,"section",41)(1,"div",42)(2,"h2"),e.EFF(3,"Server created \u2014 3 steps to your first tool call"),e.k0s(),e.j41(4,"button",43),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.dismissChecklist())}),e.EFF(5," \xd7 "),e.k0s()(),e.j41(6,"ol",44)(7,"li")(8,"span",45),e.EFF(9),e.k0s(),e.j41(10,"span"),e.EFF(11,"Copy your endpoint URL"),e.k0s()(),e.j41(12,"li")(13,"span",45),e.EFF(14),e.k0s(),e.j41(15,"span"),e.EFF(16,"Add it to a client below"),e.k0s()(),e.j41(17,"li")(18,"span",45),e.EFF(19),e.k0s(),e.DNE(20,Zd,5,1,"ng-container",27),e.DNE(21,ep,6,0,"ng-template",null,46,e.C5r),e.k0s()()()}if(2&n){const t=e.sdS(22),o=e.XpG();e.R7$(7),e.AVh("done",o.store.copiedUrl),e.R7$(2),e.JRh(o.store.copiedUrl?"\u2713":"1"),e.R7$(3),e.AVh("done",o.store.copiedClient),e.R7$(2),e.JRh(o.store.copiedClient?"\u2713":"2"),e.R7$(3),e.AVh("done",o.step3Done),e.R7$(2),e.JRh(o.step3Done?"\u2713":"3"),e.R7$(1),e.Y8G("ngIf",o.step3Done)("ngIfElse",t)}}function np(n,a){1&n&&(e.j41(0,"p",47),e.EFF(1," This client needs a redirect URI \u2014 add Claude's callback below or in Settings. "),e.k0s())}const op=function(){return["/api-connections/api-keys"]};function ip(n,a){1&n&&(e.qex(0),e.j41(1,"p"),e.EFF(2," Any DreamFactory API key whose role grants access to the exposed services can connect. "),e.j41(3,"a",48),e.EFF(4," Manage API keys \u2192 "),e.k0s()(),e.j41(5,"p",21),e.EFF(6," The URL plus any valid key grants access \u2014 treat the pair like a password. "),e.k0s(),e.bVm()),2&n&&(e.R7$(3),e.Y8G("routerLink",e.lJ4(1,op)))}function ap(n,a){if(1&n){const t=e.RV6();e.j41(0,"p"),e.EFF(1," API-key auth is off \u2014 enable it in "),e.j41(2,"button",23),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.goToTab.emit("settings"))}),e.EFF(3," Settings \u2192 Authentication"),e.k0s(),e.EFF(4,". "),e.k0s()}}function rp(n,a){if(1&n){const t=e.RV6();e.j41(0,"button",49),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG();return e.Njj(c.selectClient(r.id))}),e.EFF(1),e.k0s()}if(2&n){const t=a.$implicit,o=e.XpG();e.AVh("on",o.selectedClient===t.id),e.BMQ("data-testid","mcp-client-chip-"+t.id),e.R7$(1),e.SpI(" ",t.label," ")}}function cp(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",50)(1,"span"),e.EFF(2,"Connect with:"),e.k0s(),e.j41(3,"button",51),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.setAuthVariant("oauth"))}),e.EFF(4," OAuth "),e.k0s(),e.j41(5,"button",51),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.setAuthVariant("apikey"))}),e.EFF(6," API key "),e.k0s()()}if(2&n){const t=e.XpG();e.R7$(3),e.AVh("on","oauth"===t.authVariant),e.R7$(2),e.AVh("on","apikey"===t.authVariant)}}function sp(n,a){1&n&&(e.j41(0,"p",21),e.EFF(1," Claude connectors sign in with OAuth \u2014 API keys don't apply here. "),e.k0s())}function lp(n,a){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"h3",13),e.EFF(2,"Claude \u2014 add a custom connector"),e.k0s(),e.j41(3,"ol",52)(4,"li"),e.EFF(5,"Settings \u2192 Connectors \u2192 Add custom connector."),e.k0s(),e.j41(6,"li"),e.EFF(7," Remote MCP server URL: "),e.j41(8,"code",53),e.EFF(9),e.k0s(),e.j41(10,"button",18),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.copyForClient(i.mcpUrl,!0))}),e.EFF(11," Copy "),e.k0s()(),e.j41(12,"li"),e.EFF(13," Advanced settings \u2192 paste the OAuth Client ID and Client Secret from above. "),e.j41(14,"button",18),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.copyClientId())}),e.EFF(15," Copy ID "),e.k0s(),e.j41(16,"button",18),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.copySecret())}),e.EFF(17," Copy secret "),e.k0s()(),e.j41(18,"li"),e.EFF(19," Allow Claude's callback: "),e.j41(20,"code",53),e.EFF(21),e.k0s(),e.j41(22,"button",54),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.addClaudeCallback())}),e.EFF(23),e.k0s()(),e.j41(24,"li"),e.EFF(25,"Connect and sign in with DreamFactory."),e.k0s()(),e.DNE(26,sp,2,0,"p",55),e.bVm()}if(2&n){const t=e.XpG();e.R7$(9),e.JRh(t.mcpUrl),e.R7$(12),e.JRh(t.claudeCallback),e.R7$(1),e.Y8G("disabled",t.claudeCallbackAdded),e.R7$(1),e.SpI(" ",t.claudeCallbackAdded?"\u2713 In redirect URIs":"+ Add to redirect URIs"," "),e.R7$(3),e.Y8G("ngIf",t.bothAuthOn)}}function dp(n,a){1&n&&(e.j41(0,"p",21),e.EFF(1," Claude Code opens a browser to sign in with OAuth on first use. "),e.k0s())}function pp(n,a){if(1&n&&e.eu8(0,59),2&n){e.XpG(2);const t=e.sdS(76);e.Y8G("ngTemplateOutlet",t)}}function mp(n,a){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"h3",13),e.EFF(2,"Claude Code"),e.k0s(),e.j41(3,"p"),e.EFF(4,"Run in your terminal:"),e.k0s(),e.j41(5,"div",56)(6,"pre")(7,"code"),e.EFF(8),e.k0s()(),e.j41(9,"button",57),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.copyForClient(i.claudeCodeSnippet))}),e.EFF(10," Copy "),e.k0s()(),e.DNE(11,dp,2,0,"p",55),e.DNE(12,pp,1,1,"ng-container",58),e.bVm()}if(2&n){const t=e.XpG();e.R7$(8),e.JRh(t.claudeCodeSnippet),e.R7$(3),e.Y8G("ngIf",!t.keyMode),e.R7$(1),e.Y8G("ngIf",t.keyMode)}}function _p(n,a){1&n&&(e.j41(0,"p",21),e.EFF(1," Cursor opens a browser to sign in with OAuth on first use. "),e.k0s())}function gp(n,a){if(1&n&&e.eu8(0,59),2&n){e.XpG(2);const t=e.sdS(76);e.Y8G("ngTemplateOutlet",t)}}function fp(n,a){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"h3",13),e.EFF(2,"Cursor"),e.k0s(),e.j41(3,"p"),e.EFF(4," Add to "),e.j41(5,"code",53),e.EFF(6,".cursor/mcp.json"),e.k0s(),e.EFF(7," (project) or "),e.j41(8,"code",53),e.EFF(9,"~/.cursor/mcp.json"),e.k0s(),e.EFF(10," (global): "),e.k0s(),e.j41(11,"div",56)(12,"pre")(13,"code"),e.EFF(14),e.k0s()(),e.j41(15,"button",57),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.copyForClient(i.cursorSnippet))}),e.EFF(16," Copy "),e.k0s()(),e.DNE(17,_p,2,0,"p",55),e.DNE(18,gp,1,1,"ng-container",58),e.bVm()}if(2&n){const t=e.XpG();e.R7$(14),e.JRh(t.cursorSnippet),e.R7$(3),e.Y8G("ngIf",!t.keyMode),e.R7$(1),e.Y8G("ngIf",t.keyMode)}}function up(n,a){1&n&&(e.j41(0,"p",21),e.EFF(1," VS Code opens a browser to sign in with OAuth on first use. "),e.k0s())}function hp(n,a){if(1&n&&e.eu8(0,59),2&n){e.XpG(2);const t=e.sdS(76);e.Y8G("ngTemplateOutlet",t)}}function bp(n,a){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"h3",13),e.EFF(2,"VS Code"),e.k0s(),e.j41(3,"p"),e.EFF(4,"One-liner:"),e.k0s(),e.j41(5,"div",56)(6,"pre")(7,"code"),e.EFF(8),e.k0s()(),e.j41(9,"button",57),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.copyForClient(i.vscodeSnippet))}),e.EFF(10," Copy "),e.k0s()(),e.DNE(11,up,2,0,"p",55),e.DNE(12,hp,1,1,"ng-container",58),e.bVm()}if(2&n){const t=e.XpG();e.R7$(8),e.JRh(t.vscodeSnippet),e.R7$(3),e.Y8G("ngIf",!t.keyMode),e.R7$(1),e.Y8G("ngIf",t.keyMode)}}function vp(n,a){1&n&&(e.j41(0,"p",21),e.EFF(1," ChatGPT connectors sign in with OAuth \u2014 API keys don't apply here. "),e.k0s())}function xp(n,a){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"h3",13),e.EFF(2,"ChatGPT \u2014 add a connector"),e.k0s(),e.j41(3,"ol",52)(4,"li"),e.EFF(5,"Settings \u2192 Connectors \u2192 Create."),e.k0s(),e.j41(6,"li"),e.EFF(7," MCP server URL: "),e.j41(8,"code",53),e.EFF(9),e.k0s(),e.j41(10,"button",18),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.copyForClient(i.mcpUrl,!0))}),e.EFF(11," Copy "),e.k0s()(),e.j41(12,"li"),e.EFF(13," Authentication: OAuth \u2014 ChatGPT discovers the sign-in flow from the server. "),e.k0s(),e.j41(14,"li"),e.EFF(15,"Create, then connect and sign in with DreamFactory."),e.k0s()(),e.DNE(16,vp,2,0,"p",55),e.bVm()}if(2&n){const t=e.XpG();e.R7$(9),e.JRh(t.mcpUrl),e.R7$(7),e.Y8G("ngIf",t.bothAuthOn)}}function Cp(n,a){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"h3",13),e.EFF(2,"Generic JSON"),e.k0s(),e.j41(3,"p"),e.EFF(4," For any MCP client that reads an "),e.j41(5,"code",53),e.EFF(6,"mcpServers"),e.k0s(),e.EFF(7," block: "),e.k0s(),e.j41(8,"div",56)(9,"pre")(10,"code"),e.EFF(11),e.k0s()(),e.j41(12,"button",57),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.copyForClient(i.genericSnippet))}),e.EFF(13," Copy "),e.k0s()(),e.j41(14,"p",21),e.EFF(15," Check reachability: "),e.j41(16,"code",53),e.EFF(17),e.k0s(),e.j41(18,"button",18),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.copyForClient(i.genericCurl))}),e.EFF(19," Copy "),e.k0s(),e.EFF(20," \u2014 a 401 challenge here means healthy auth. "),e.k0s(),e.bVm()}if(2&n){const t=e.XpG();e.R7$(11),e.JRh(t.genericSnippet),e.R7$(6),e.JRh(t.genericCurl)}}function kp(n,a){1&n&&(e.j41(0,"p",21),e.EFF(1," Replace YOUR_API_KEY with a DreamFactory API key whose role grants access to the exposed services. "),e.k0s())}function yp(n,a){1&n&&(e.j41(0,"p",61),e.EFF(1," Filled with the API key you just created on the Tools tab \u2014 it is not shown again after you leave this page. "),e.k0s())}function Mp(n,a){if(1&n&&(e.DNE(0,kp,2,0,"p",55),e.DNE(1,yp,2,0,"p",60)),2&n){const t=e.XpG();e.Y8G("ngIf",!t.store.createdApiKey),e.R7$(1),e.Y8G("ngIf",t.store.createdApiKey)}}const Op=function(n){return["/api-connections/api-docs",n]},jt="https://claude.ai/api/mcp/auth_callback",$n="X-DreamFactory-API-Key",Gn=new Set(["claude-code","cursor","vscode","json"]);let wp=(()=>{class n{constructor(t){this.snackbarService=t,this.goToTab=new e.bkB,this.claudeCallback=jt,this.clients=[{id:"claude",label:"Claude"},{id:"claude-code",label:"Claude Code"},{id:"cursor",label:"Cursor"},{id:"vscode",label:"VS Code"},{id:"chatgpt",label:"ChatGPT"},{id:"json",label:"Generic JSON"}],this.probe="pending",this.secretRevealed=!1,this.selectedClient="claude",this.authVariant="oauth",this.autoDismissTimer=null}ngOnInit(){this.restoreClientChoice(),this.runProbe()}ngOnChanges(t){t.mcpUrl&&!t.mcpUrl.firstChange&&(this.probe="pending",this.secretRevealed=!1,this.authVariant="oauth",this.restoreClientChoice(),this.runProbe())}runProbe(){const t=this.mcpUrl;fetch(t,{method:"GET"}).then(o=>{t===this.mcpUrl&&(this.probe=401===o.status||403===o.status?"auth":"open")}).catch(()=>{t===this.mcpUrl&&(this.probe="unknown")})}ngOnDestroy(){this.autoDismissTimer&&clearTimeout(this.autoDismissTimer)}get zeroTools(){return(this.store.isSystemMcp||this.store.backendLoaded)&&0===this.store.totalTools()}get checklistVisible(){return this.store.created&&!this.store.checklistDismissed}get exposedCount(){return this.store.cfg.exposedServices.length}get step3Done(){return this.exposedCount>0}get exposedSummary(){const t=this.exposedCount,o=this.store.effective();return`${t} ${1===t?"service":"services"} exposed (${o.total} tools${o.readOnly?", read-only":""})`}dismissChecklist(){this.store.checklistDismissed=!0,this.store.touch()}maybeAutoDismiss(){!this.checklistVisible||this.autoDismissTimer||this.store.copiedUrl&&this.store.copiedClient&&this.step3Done&&(this.autoDismissTimer=setTimeout(()=>{this.store.checklistDismissed=!0,this.store.touch()},1500))}dismissReconnect(){this.store.reconnectBanner=!1,this.store.touch()}doCopy(t){try{navigator.clipboard?.writeText(t)?.catch(()=>{})}catch{}this.snackbarService.openSnackBar("Copied.","success")}copyEndpointUrl(){this.doCopy(this.mcpUrl),this.store.copiedUrl=!0,this.store.touch(),this.maybeAutoDismiss()}copyForClient(t,o=!1){this.doCopy(t),this.store.copiedClient=!0,o&&(this.store.copiedUrl=!0),this.store.touch(),this.maybeAutoDismiss()}copyClientId(){this.copyForClient(this.store.cfg.oauthClientId)}copySecret(){this.copyForClient(this.store.cfg.oauthClientSecret)}get secretDisplay(){return this.secretRevealed?this.store.cfg.oauthClientSecret||"\u2014":this.store.cfg.oauthClientSecret?"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022":"\u2014"}toggleSecret(){this.secretRevealed=!this.secretRevealed}regenerateSecret(){window.confirm("Clients using the old secret will stop connecting. Regenerate?")&&(this.store.cfg.oauthClientSecret=function Fp(){const n=new Uint8Array(32),a=globalThis.crypto;if(a?.getRandomValues)a.getRandomValues(n);else for(let t=0;tt.toString(16).padStart(2,"0")).join("")}(),this.store.touch(),this.snackbarService.openSnackBar("New client secret generated \u2014 save to apply.","success"))}get clientChoiceKey(){return"df-mcp-connect-client."+(this.store.service?.name??"")}restoreClientChoice(){try{const t=localStorage.getItem(this.clientChoiceKey);t&&this.clients.some(o=>o.id===t)&&(this.selectedClient=t)}catch{}}selectClient(t){this.selectedClient=t;try{localStorage.setItem(this.clientChoiceKey,t)}catch{}}get bothAuthOn(){return this.store.cfg.allowApiKeyAuth}get showAuthToggle(){return this.bothAuthOn&&Gn.has(this.selectedClient)}setAuthVariant(t){this.authVariant=t}get keyMode(){return this.bothAuthOn&&"apikey"===this.authVariant&&Gn.has(this.selectedClient)}get serviceName(){return this.store.service?.name??""}get origin(){return this.mcpUrl.replace(/\/mcp\/[^/]*\/?$/,"")}get legacyAlias(){return`${this.origin}/api/v2/${this.serviceName}/_mcp`}get claudeCallbackAdded(){return this.store.cfg.redirectUris.includes(jt)}get needsRedirectPrompt(){return("claude"===this.selectedClient||"chatgpt"===this.selectedClient)&&0===this.store.cfg.redirectUris.length}addClaudeCallback(){this.claudeCallbackAdded||(this.store.cfg.redirectUris.push(jt),this.store.touch(),this.snackbarService.openSnackBar("Added Claude's callback to redirect URIs \u2014 save to apply.","success"))}get apiKeyValue(){return this.store.createdApiKey??"YOUR_API_KEY"}get claudeCodeSnippet(){const t=`claude mcp add --transport http ${this.serviceName} ${this.mcpUrl}`;return this.keyMode?`${t} --header "${$n}: ${this.apiKeyValue}"`:t}serverEntry(t){const o=t?{type:"http",url:this.mcpUrl}:{url:this.mcpUrl};return this.keyMode&&(o.headers={[$n]:this.apiKeyValue}),o}get cursorSnippet(){return JSON.stringify({mcpServers:{[this.serviceName]:this.serverEntry(!1)}},null,2)}get vscodeSnippet(){const t={name:this.serviceName,...this.serverEntry(!0)};return`code --add-mcp '${JSON.stringify(t)}'`}get genericSnippet(){return`${JSON.stringify({mcpServers:{[this.serviceName]:this.serverEntry(!0)}},null,2)}\n// Legacy alias (same server): ${this.legacyAlias}`}get genericCurl(){return`curl -i ${this.mcpUrl}`}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(pe.L))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-mcp-connect"]],inputs:{store:"store",mcpUrl:"mcpUrl"},outputs:{goToTab:"goToTab"},standalone:!0,features:[e.OA$,e.aNF],decls:77,vars:30,consts:[["data-testid","mcp-connect-tab",1,"mcp-connect"],["class","mcp-zero-banner","data-testid","mcp-connect-zero-banner",4,"ngIf"],["class","mcp-reconnect-banner","data-testid","mcp-reconnect-banner",4,"ngIf"],["class","mcp-card mcp-checklist","data-testid","mcp-checklist",4,"ngIf"],["data-testid","mcp-endpoint-card",1,"mcp-card","mcp-endpoint"],[1,"mcp-endpoint-row"],["data-testid","mcp-endpoint-url",1,"mcp-endpoint-url"],["mat-stroked-button","","type","button","data-testid","mcp-endpoint-copy",3,"click"],[1,"mcp-endpoint-sub"],["data-testid","mcp-probe-chip",1,"mcp-chip",3,"matTooltip"],[1,"mcp-section-title"],[1,"mcp-auth-grid"],["data-testid","mcp-oauth-card",1,"mcp-card"],[1,"mcp-card-title"],[1,"mcp-chip","good"],[1,"mcp-cred-row"],[1,"mcp-cred-label"],[1,"mcp-cred-value"],["mat-button","","type","button",3,"click"],["mat-button","","type","button","data-testid","mcp-secret-reveal",3,"click"],["mat-stroked-button","","type","button","data-testid","mcp-secret-regenerate",1,"mcp-regenerate",3,"click"],[1,"mcp-caption"],[1,"mcp-redirects-line"],["type","button",1,"mcp-link",3,"click"],["class","mcp-redirect-prompt","data-testid","mcp-redirect-jump-prompt",4,"ngIf"],["data-testid","mcp-apikey-card",1,"mcp-card"],[1,"mcp-chip"],[4,"ngIf","ngIfElse"],["apiKeyOff",""],[1,"mcp-client-chips"],["type","button","class","mcp-client-chip",3,"on","click",4,"ngFor","ngForOf"],["class","mcp-auth-toggle",4,"ngIf"],["data-testid","mcp-client-panel",1,"mcp-card","mcp-client-panel",3,"ngSwitch"],[4,"ngSwitchCase"],[1,"mcp-connect-footer"],[1,"mcp-link","mcp-docs-link",3,"routerLink"],["keyCaption",""],["data-testid","mcp-connect-zero-banner",1,"mcp-zero-banner"],["type","button","data-testid","mcp-connect-zero-link",1,"mcp-link",3,"click"],["data-testid","mcp-reconnect-banner",1,"mcp-reconnect-banner"],["type","button","aria-label","Dismiss",1,"mcp-x",3,"click"],["data-testid","mcp-checklist",1,"mcp-card","mcp-checklist"],[1,"mcp-checklist-head"],["type","button","data-testid","mcp-checklist-dismiss","aria-label","Dismiss checklist",1,"mcp-x",3,"click"],[1,"mcp-checklist-steps"],[1,"mcp-step-mark"],["exposePrompt",""],["data-testid","mcp-redirect-jump-prompt",1,"mcp-redirect-prompt"],[1,"mcp-link",3,"routerLink"],["type","button",1,"mcp-client-chip",3,"click"],[1,"mcp-auth-toggle"],["type","button",3,"click"],[1,"mcp-steps"],[1,"mcp-inline-code"],["mat-stroked-button","","type","button","data-testid","mcp-add-redirect",3,"disabled","click"],["class","mcp-caption",4,"ngIf"],[1,"mcp-snippet-block"],["mat-stroked-button","","type","button",3,"click"],[3,"ngTemplateOutlet",4,"ngIf"],[3,"ngTemplateOutlet"],["class","mcp-caption","data-testid","mcp-created-key-caption",4,"ngIf"],["data-testid","mcp-created-key-caption",1,"mcp-caption"]],template:function(o,i){if(1&o&&(e.j41(0,"div",0),e.DNE(1,Wd,4,0,"div",1),e.DNE(2,Qd,5,0,"div",2),e.DNE(3,tp,23,11,"section",3),e.j41(4,"section",4)(5,"div",5)(6,"code",6),e.EFF(7),e.k0s(),e.j41(8,"button",7),e.bIt("click",function(){return i.copyEndpointUrl()}),e.EFF(9," Copy "),e.k0s()(),e.j41(10,"div",8)(11,"span"),e.EFF(12,"Streamable HTTP \xb7 MCP 2025-03-26"),e.k0s(),e.j41(13,"span",9),e.EFF(14),e.k0s()()(),e.j41(15,"h2",10),e.EFF(16,"Authentication"),e.k0s(),e.j41(17,"div",11)(18,"section",12)(19,"h3",13),e.EFF(20," OAuth 2.1 "),e.j41(21,"span",14),e.EFF(22,"always on"),e.k0s()(),e.j41(23,"div",15)(24,"span",16),e.EFF(25,"Client ID"),e.k0s(),e.j41(26,"code",17),e.EFF(27),e.k0s(),e.j41(28,"button",18),e.bIt("click",function(){return i.copyClientId()}),e.EFF(29,"Copy"),e.k0s()(),e.j41(30,"div",15)(31,"span",16),e.EFF(32,"Client secret"),e.k0s(),e.j41(33,"code",17),e.EFF(34),e.k0s(),e.j41(35,"button",19),e.bIt("click",function(){return i.toggleSecret()}),e.EFF(36),e.k0s(),e.j41(37,"button",18),e.bIt("click",function(){return i.copySecret()}),e.EFF(38,"Copy"),e.k0s()(),e.j41(39,"button",20),e.bIt("click",function(){return i.regenerateSecret()}),e.EFF(40," Regenerate\u2026 "),e.k0s(),e.j41(41,"p",21),e.EFF(42," These match the URL, Client ID, and Client Secret fields in your client's add-connector dialog. "),e.k0s(),e.j41(43,"p",22),e.EFF(44),e.j41(45,"button",23),e.bIt("click",function(){return i.goToTab.emit("settings")}),e.EFF(46," Manage \u2192 "),e.k0s()(),e.DNE(47,np,2,0,"p",24),e.k0s(),e.j41(48,"section",25)(49,"h3",13),e.EFF(50," API key "),e.j41(51,"span",26),e.EFF(52),e.k0s()(),e.DNE(53,ip,7,2,"ng-container",27),e.DNE(54,ap,5,0,"ng-template",null,28,e.C5r),e.k0s()(),e.j41(56,"h2",10),e.EFF(57,"Connect a client"),e.k0s(),e.j41(58,"div",29),e.DNE(59,rp,2,4,"button",30),e.k0s(),e.DNE(60,cp,7,4,"div",31),e.j41(61,"section",32),e.DNE(62,lp,27,5,"ng-container",33),e.DNE(63,mp,13,3,"ng-container",33),e.DNE(64,fp,19,3,"ng-container",33),e.DNE(65,bp,13,3,"ng-container",33),e.DNE(66,xp,17,2,"ng-container",33),e.DNE(67,Cp,21,2,"ng-container",33),e.k0s(),e.j41(68,"footer",34)(69,"p"),e.EFF(70," Roles further filter tools per caller at runtime \u2014 this page sets the server-wide maximum. "),e.j41(71,"button",23),e.bIt("click",function(){return i.goToTab.emit("tools")}),e.EFF(72," Preview in Tools. "),e.k0s()(),e.j41(73,"a",35),e.EFF(74," \u25b8 Also available: REST endpoint & API Docs "),e.k0s()()(),e.DNE(75,Mp,2,2,"ng-template",null,36,e.C5r)),2&o){const r=e.sdS(55);e.R7$(1),e.Y8G("ngIf",i.zeroTools),e.R7$(1),e.Y8G("ngIf",i.store.reconnectBanner),e.R7$(1),e.Y8G("ngIf",i.checklistVisible),e.R7$(4),e.JRh(i.mcpUrl),e.R7$(6),e.AVh("good","auth"===i.probe),e.Y8G("matTooltip","auth"===i.probe?"The endpoint answered with the expected sign-in challenge.":"open"===i.probe?"The endpoint answered, but not with the expected sign-in challenge.":""),e.R7$(1),e.SpI(" ","auth"===i.probe?"\u2713 Reachable \u2014 auth enforced":"open"===i.probe?"Reachable":"\u2014"," "),e.R7$(13),e.JRh(i.store.cfg.oauthClientId||"\u2014"),e.R7$(7),e.JRh(i.secretDisplay),e.R7$(2),e.SpI(" ",i.secretRevealed?"Hide":"Reveal"," "),e.R7$(8),e.SpI(" Redirect URIs: ",i.store.cfg.redirectUris.length," \xb7 "),e.R7$(3),e.Y8G("ngIf",i.needsRedirectPrompt),e.R7$(4),e.AVh("good",i.store.cfg.allowApiKeyAuth),e.R7$(1),e.SpI(" ",i.store.cfg.allowApiKeyAuth?"on":"off"," "),e.R7$(1),e.Y8G("ngIf",i.store.cfg.allowApiKeyAuth)("ngIfElse",r),e.R7$(6),e.Y8G("ngForOf",i.clients),e.R7$(1),e.Y8G("ngIf",i.showAuthToggle),e.R7$(1),e.Y8G("ngSwitch",i.selectedClient),e.R7$(1),e.Y8G("ngSwitchCase","claude"),e.R7$(1),e.Y8G("ngSwitchCase","claude-code"),e.R7$(1),e.Y8G("ngSwitchCase","cursor"),e.R7$(1),e.Y8G("ngSwitchCase","vscode"),e.R7$(1),e.Y8G("ngSwitchCase","chatgpt"),e.R7$(1),e.Y8G("ngSwitchCase","json"),e.R7$(6),e.Y8G("routerLink",e.eq3(28,Op,i.store.service.name))}},dependencies:[d.MD,d.Sq,d.bT,d.T3,d.ux,d.e1,N.iI,N.Wk,u.Hl,u.$z,S.uc,S.oV],styles:[".mcp-connect[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:14px;max-width:980px}.mcp-card[_ngcontent-%COMP%]{background:var(--df-surface);border:1px solid color-mix(in srgb,var(--df-text) 8%,transparent);border-radius:10px;padding:16px 18px}.mcp-card[_ngcontent-%COMP%] .mcp-card-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;font-size:14.5px;font-weight:700;margin:0 0 10px}.mcp-section-title[_ngcontent-%COMP%]{font-size:12.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.6;margin:6px 0 -4px}.mcp-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:5px;padding:2px 9px;border-radius:999px;font-size:12px;font-weight:600;border:1px solid color-mix(in srgb,var(--df-text) 14%,transparent);background:color-mix(in srgb,var(--df-text) 2%,transparent);white-space:nowrap}.mcp-chip.good[_ngcontent-%COMP%]{background:var(--df-success-soft);border-color:color-mix(in srgb,var(--df-success) 35%,transparent);color:var(--df-success)}.mcp-chip.warn[_ngcontent-%COMP%]{background:var(--df-warning-soft);border-color:color-mix(in srgb,var(--df-warning) 40%,transparent);color:var(--df-warning)}.mcp-chip.primary[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--df-accent) 10%,transparent);border-color:color-mix(in srgb,var(--df-accent) 38%,transparent);color:var(--df-accent)}.mcp-reconnect-banner[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:12px;background:var(--df-warning-soft);border:1px solid color-mix(in srgb,var(--df-warning) 40%,transparent);color:var(--df-warning);border-radius:10px;padding:10px 14px;font-size:13.5px;font-weight:500}.mcp-x[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;font:inherit;font-size:18px;line-height:1;padding:2px 6px;border-radius:6px;color:inherit;opacity:.7}.mcp-x[_ngcontent-%COMP%]:hover{opacity:1;background:color-mix(in srgb,var(--df-text) 5%,transparent)}.mcp-zero-banner[_ngcontent-%COMP%]{background:var(--df-warning-soft);border:1px solid color-mix(in srgb,var(--df-warning) 40%,transparent);color:var(--df-warning);border-radius:10px;padding:10px 14px;font-size:13px;font-weight:600;margin-bottom:14px}.mcp-zero-banner[_ngcontent-%COMP%] .mcp-link[_ngcontent-%COMP%]{font-weight:600}.mcp-checklist[_ngcontent-%COMP%]{border-color:color-mix(in srgb,var(--df-accent) 38%,transparent)}.mcp-checklist[_ngcontent-%COMP%] .mcp-checklist-head[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.mcp-checklist[_ngcontent-%COMP%] .mcp-checklist-head[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:15px;font-weight:700;margin:0 0 8px}.mcp-checklist[_ngcontent-%COMP%] .mcp-checklist-steps[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:7px}.mcp-checklist[_ngcontent-%COMP%] .mcp-checklist-steps[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:9px;font-size:13.5px}.mcp-checklist[_ngcontent-%COMP%] .mcp-checklist-steps[_ngcontent-%COMP%] li.done[_ngcontent-%COMP%]{color:var(--df-success)}.mcp-checklist[_ngcontent-%COMP%] .mcp-checklist-steps[_ngcontent-%COMP%] li.done[_ngcontent-%COMP%] .mcp-step-mark[_ngcontent-%COMP%]{background:var(--df-success);border-color:var(--df-success);color:var(--df-accent-contrast)}.mcp-checklist[_ngcontent-%COMP%] .mcp-checklist-steps[_ngcontent-%COMP%] .mcp-step-mark[_ngcontent-%COMP%]{flex:none;box-sizing:border-box;width:18px;height:18px;margin-top:1px;border:1.5px solid color-mix(in srgb,var(--df-accent) 55%,transparent);border-radius:50%;font-size:11px;font-weight:700;line-height:15px;text-align:center}.mcp-endpoint[_ngcontent-%COMP%] .mcp-endpoint-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.mcp-endpoint[_ngcontent-%COMP%] .mcp-endpoint-url[_ngcontent-%COMP%]{font-size:16px;font-weight:600;background:color-mix(in srgb,var(--df-text) 3.5%,transparent);border:1px solid color-mix(in srgb,var(--df-text) 8%,transparent);border-radius:7px;padding:7px 12px;overflow-x:auto;max-width:100%}.mcp-endpoint[_ngcontent-%COMP%] .mcp-endpoint-sub[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:9px;font-size:12.5px;opacity:.85}.mcp-auth-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:14px;align-items:start}.mcp-auth-grid[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:13.5px;margin:0 0 8px}.mcp-cred-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:6px;font-size:13px}.mcp-cred-row[_ngcontent-%COMP%] .mcp-cred-label[_ngcontent-%COMP%]{flex:none;width:92px;font-weight:600;opacity:.75}.mcp-cred-row[_ngcontent-%COMP%] .mcp-cred-value[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--df-text) 3.5%,transparent);border:1px solid color-mix(in srgb,var(--df-text) 8%,transparent);border-radius:6px;padding:3px 8px;font-size:12.5px;max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mcp-regenerate[_ngcontent-%COMP%]{margin:4px 0 6px}.mcp-caption[_ngcontent-%COMP%]{font-size:12.5px;opacity:.7;margin:8px 0 0}.mcp-redirects-line[_ngcontent-%COMP%]{font-size:13px;margin:10px 0 0}.mcp-redirect-prompt[_ngcontent-%COMP%]{font-size:12.5px;font-weight:600;color:var(--df-warning);margin:6px 0 0}.mcp-client-chips[_ngcontent-%COMP%]{display:flex;gap:8px;flex-wrap:wrap}.mcp-client-chip[_ngcontent-%COMP%]{cursor:pointer;font:inherit;font-size:13px;font-weight:600;padding:6px 14px;border-radius:999px;border:1px solid color-mix(in srgb,var(--df-text) 14%,transparent);background:var(--df-surface)}.mcp-client-chip[_ngcontent-%COMP%]:hover{border-color:color-mix(in srgb,var(--df-accent) 38%,transparent)}.mcp-client-chip.on[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--df-accent) 10%,transparent);border-color:var(--df-accent);color:var(--df-accent)}.mcp-auth-toggle[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;font-size:12.5px;font-weight:600;opacity:.9}.mcp-auth-toggle[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{cursor:pointer;font:inherit;font-size:12.5px;font-weight:600;padding:3px 10px;border-radius:999px;border:1px solid color-mix(in srgb,var(--df-text) 14%,transparent);background:var(--df-surface)}.mcp-auth-toggle[_ngcontent-%COMP%] button.on[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--df-accent) 10%,transparent);border-color:var(--df-accent);color:var(--df-accent)}.mcp-client-panel[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:13.5px;margin:0 0 8px}.mcp-client-panel[_ngcontent-%COMP%] .mcp-steps[_ngcontent-%COMP%]{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:7px;font-size:13.5px}.mcp-inline-code[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--df-text) 3.5%,transparent);border:1px solid color-mix(in srgb,var(--df-text) 8%,transparent);border-radius:6px;padding:2px 7px;font-size:12.5px;word-break:break-all}.mcp-snippet-block[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:10px;background:color-mix(in srgb,var(--df-text) 3.5%,transparent);border:1px solid color-mix(in srgb,var(--df-text) 8%,transparent);border-radius:8px;padding:10px 12px;margin:6px 0 8px}.mcp-snippet-block[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{flex:1;margin:0;overflow-x:auto;font-size:12.5px;line-height:1.55}.mcp-snippet-block[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{flex:none}.mcp-connect-footer[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px;padding:4px 2px 8px;font-size:13px;opacity:.9}.mcp-connect-footer[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}.mcp-link[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;font:inherit;font-size:inherit;padding:0;color:var(--df-accent);font-weight:600;text-decoration:none}.mcp-link[_ngcontent-%COMP%]:hover{text-decoration:underline}.mcp-docs-link[_ngcontent-%COMP%]{display:inline-block}@media (max-width: 700px){.mcp-auth-grid[_ngcontent-%COMP%]{grid-template-columns:1fr}.mcp-endpoint[_ngcontent-%COMP%] .mcp-endpoint-url[_ngcontent-%COMP%]{font-size:13.5px}.mcp-cred-row[_ngcontent-%COMP%] .mcp-cred-label[_ngcontent-%COMP%]{width:100%}.mcp-snippet-block[_ngcontent-%COMP%]{flex-direction:column}}"]})}}return n})();function Dp(n,a){if(1&n&&(e.j41(0,"span",30),e.EFF(1),e.k0s()),2&n){const t=e.XpG().$implicit,o=e.XpG(4);e.R7$(1),e.SpI(" saved curation: ",o.dormantCount(t)," tools off ")}}function Tp(n,a){1&n&&(e.j41(0,"span",30),e.EFF(1,"inactive"),e.k0s())}function Sp(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",24),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG(4);return e.Njj(c.toggle(r.name))}),e.j41(1,"mat-checkbox",25),e.bIt("click",function(i){return i.stopPropagation()})("change",function(){const r=e.eBV(t).$implicit,c=e.XpG(4);return e.Njj(c.toggle(r.name))}),e.k0s(),e.j41(2,"span",26),e.EFF(3),e.k0s(),e.j41(4,"span",27),e.EFF(5),e.k0s(),e.j41(6,"span",28),e.EFF(7),e.k0s(),e.DNE(8,Dp,2,1,"span",29),e.DNE(9,Tp,2,0,"span",29),e.k0s()}if(2&n){const t=a.$implicit,o=e.XpG(4);e.R7$(1),e.Y8G("checked",o.isSelected(t.name)),e.R7$(2),e.JRh(t.label),e.R7$(2),e.JRh(t.name),e.R7$(2),e.JRh(o.toolDelta(t)),e.R7$(1),e.Y8G("ngIf",o.dormantCount(t)>0),e.R7$(1),e.Y8G("ngIf",!t.active)}}function Rp(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",20)(1,"div",21)(2,"span"),e.EFF(3),e.k0s(),e.j41(4,"mat-checkbox",22),e.bIt("change",function(){e.eBV(t);const i=e.XpG().ngIf,r=e.XpG(2);return e.Njj(r.toggleGroup(i))}),e.EFF(5," Select all databases "),e.k0s()(),e.DNE(6,Sp,10,6,"div",23),e.k0s()}if(2&n){const t=e.XpG().ngIf,o=e.XpG(2);e.R7$(3),e.SpI("Databases (",t.length,")"),e.R7$(1),e.Y8G("checked",o.groupAllSelected(t))("indeterminate",o.groupSomeSelected(t)),e.R7$(2),e.Y8G("ngForOf",t)("ngForTrackBy",o.trackBySvcName)}}function Ip(n,a){if(1&n&&(e.qex(0),e.DNE(1,Rp,7,5,"div",19),e.bVm()),2&n){const t=a.ngIf;e.R7$(1),e.Y8G("ngIf",t.length>0)}}function Ep(n,a){if(1&n&&(e.j41(0,"span",30),e.EFF(1),e.k0s()),2&n){const t=e.XpG().$implicit,o=e.XpG(4);e.R7$(1),e.SpI(" saved curation: ",o.dormantCount(t)," tools off ")}}function $p(n,a){1&n&&(e.j41(0,"span",30),e.EFF(1,"inactive"),e.k0s())}function Gp(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",24),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG(4);return e.Njj(c.toggle(r.name))}),e.j41(1,"mat-checkbox",25),e.bIt("click",function(i){return i.stopPropagation()})("change",function(){const r=e.eBV(t).$implicit,c=e.XpG(4);return e.Njj(c.toggle(r.name))}),e.k0s(),e.j41(2,"span",26),e.EFF(3),e.k0s(),e.j41(4,"span",27),e.EFF(5),e.k0s(),e.j41(6,"span",28),e.EFF(7),e.k0s(),e.DNE(8,Ep,2,1,"span",29),e.DNE(9,$p,2,0,"span",29),e.k0s()}if(2&n){const t=a.$implicit,o=e.XpG(4);e.R7$(1),e.Y8G("checked",o.isSelected(t.name)),e.R7$(2),e.JRh(t.label),e.R7$(2),e.JRh(t.name),e.R7$(2),e.JRh(o.toolDelta(t)),e.R7$(1),e.Y8G("ngIf",o.dormantCount(t)>0),e.R7$(1),e.Y8G("ngIf",!t.active)}}function jp(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",20)(1,"div",21)(2,"span"),e.EFF(3),e.k0s(),e.j41(4,"mat-checkbox",22),e.bIt("change",function(){e.eBV(t);const i=e.XpG().ngIf,r=e.XpG(2);return e.Njj(r.toggleGroup(i))}),e.EFF(5," Select all files "),e.k0s()(),e.DNE(6,Gp,10,6,"div",23),e.k0s()}if(2&n){const t=e.XpG().ngIf,o=e.XpG(2);e.R7$(3),e.SpI("File storage (",t.length,")"),e.R7$(1),e.Y8G("checked",o.groupAllSelected(t))("indeterminate",o.groupSomeSelected(t)),e.R7$(2),e.Y8G("ngForOf",t)("ngForTrackBy",o.trackBySvcName)}}function Np(n,a){if(1&n&&(e.qex(0),e.DNE(1,jp,7,5,"div",19),e.bVm()),2&n){const t=a.ngIf;e.R7$(1),e.Y8G("ngIf",t.length>0)}}function Ap(n,a){1&n&&(e.j41(0,"p",31),e.EFF(1," Every service on this instance is already exposed. "),e.k0s())}function Yp(n,a){if(1&n&&(e.qex(0),e.DNE(1,Ip,2,1,"ng-container",17),e.DNE(2,Np,2,1,"ng-container",17),e.DNE(3,Ap,2,0,"p",18),e.bVm()),2&n){const t=e.XpG();e.R7$(1),e.Y8G("ngIf",t.dbCandidates()),e.R7$(1),e.Y8G("ngIf",t.fileCandidates()),e.R7$(1),e.Y8G("ngIf",0===t.dbCandidates().length&&0===t.fileCandidates().length&&!t.q.trim())}}function Vp(n,a){if(1&n&&(e.j41(0,"p",31),e.EFF(1),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.SpI(" No service matches \u201c",t.q.trim(),"\u201d. Create one under API Generation & Connections. ")}}function jn(n,a,t){const o=new Set;if(t)return o;for(const i of a)n.dormantCurationCount(i)>0&&o.add(i);return o}let Lp=(()=>{class n{constructor(t,o){this.dialogRef=t,this.data=o,this.q="",this.access="ro",this.accessTouched=!1,this.selected=new Set,this.listMemo=new Map,this.trackBySvcName=(i,r)=>r.name}get store(){return this.data.store}memoized(t,o){const i=`${this.store.version}|${this.q}`,r=this.listMemo.get(t);if(r&&r.key===i)return r.value;const c=o();return this.listMemo.set(t,{key:i,value:c}),c}candidates(){return this.memoized("candidates",()=>this.store.backendServices.filter(t=>!this.store.cfg.exposedServices.includes(t.name)))}matches(t){const o=this.q.trim().toLowerCase();return!o||t.name.toLowerCase().includes(o)||t.label.toLowerCase().includes(o)}dbCandidates(){return this.memoized("db",()=>this.candidates().filter(t=>"db"===t.kind&&this.matches(t)))}fileCandidates(){return this.memoized("file",()=>this.candidates().filter(t=>"file"===t.kind&&this.matches(t)))}toolDelta(t){return`+${$(t.kind).length} tools`}dormantCount(t){return this.store.dormantCurationCount(t.name)}isSelected(t){return this.selected.has(t)}toggle(t){this.selected.has(t)?this.selected.delete(t):this.selected.add(t)}markAccessTouched(){this.accessTouched=!0}groupAllSelected(t){return t.length>0&&t.every(o=>this.selected.has(o.name))}groupSomeSelected(t){const o=t.filter(i=>this.selected.has(i.name)).length;return o>0&&o({...a})),rest:{...n.rest}}}(n.cfg),r=jn(n,a,o);for(const c of a){i.exposedServices.includes(c)||i.exposedServices.push(c);const s=n.backendServices.find(l=>l.name===c);!s||r.has(c)||(St(s).forEach(l=>i.disabledTools.delete(l)),"ro"===t&&Tt(s).forEach(l=>i.disabledTools.add(l)))}return ze(i,n.backendServices).total}(this.store,[...this.selected],this.access,this.accessTouched);return`${t} selected \xb7 ${this.accessLabel()} \u2192 server will serve ${i} tools (was ${o})`}emptySearch(){return this.q.trim().length>0&&0===this.dbCandidates().length&&0===this.fileCandidates().length}confirm(){0!==this.selected.size&&this.dialogRef.close({names:[...this.selected],access:this.access,accessTouched:this.accessTouched})}cancel(){this.dialogRef.close()}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(h.CP),e.rXU(h.Vh))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-mcp-picker"]],standalone:!0,features:[e.aNF],decls:27,vars:9,consts:[["data-testid","mcp-picker-dialog",1,"mcp-picker"],[1,"mcp-picker-head"],["mat-icon-button","","type","button","aria-label","Close",3,"click"],["type","search","data-testid","mcp-picker-search","aria-label","Search available services",1,"mcp-picker-search",3,"ngModel","placeholder","ngModelChange"],[1,"mcp-picker-access"],[1,"mcp-picker-access-label"],[3,"ngModel","ngModelChange","change"],["value","ro","data-testid","mcp-picker-access-ro"],["value","rw"],[1,"mcp-picker-body"],[4,"ngIf","ngIfElse"],["noMatch",""],[1,"mcp-picker-foot"],["data-testid","mcp-picker-consequence",1,"mcp-picker-consequence"],[1,"mcp-picker-foot-btns"],["mat-button","","type","button",3,"click"],["mat-flat-button","","color","primary","type","button","data-testid","mcp-picker-confirm",3,"disabled","click"],[4,"ngIf"],["class","mcp-picker-empty",4,"ngIf"],["class","mcp-picker-group",4,"ngIf"],[1,"mcp-picker-group"],[1,"mcp-picker-group-head"],[3,"checked","indeterminate","change"],["class","mcp-picker-row",3,"click",4,"ngFor","ngForOf","ngForTrackBy"],[1,"mcp-picker-row",3,"click"],[3,"checked","click","change"],[1,"mcp-picker-label"],[1,"mcp-chip"],[1,"mcp-picker-delta"],["class","mcp-chip warn",4,"ngIf"],[1,"mcp-chip","warn"],[1,"mcp-picker-empty"]],template:function(o,i){if(1&o&&(e.j41(0,"div",0)(1,"div",1)(2,"h2"),e.EFF(3,"Expose services"),e.k0s(),e.j41(4,"button",2),e.bIt("click",function(){return i.cancel()}),e.EFF(5," \u2715 "),e.k0s()(),e.j41(6,"input",3),e.bIt("ngModelChange",function(c){return i.q=c}),e.k0s(),e.j41(7,"div",4)(8,"span",5),e.EFF(9,"Access for these services:"),e.k0s(),e.j41(10,"mat-radio-group",6),e.bIt("ngModelChange",function(c){return i.access=c})("change",function(){return i.markAccessTouched()}),e.j41(11,"mat-radio-button",7),e.EFF(12," Read-only \u2014 recommended "),e.k0s(),e.j41(13,"mat-radio-button",8),e.EFF(14,"Read & write"),e.k0s()()(),e.j41(15,"div",9),e.DNE(16,Yp,4,3,"ng-container",10),e.DNE(17,Vp,2,1,"ng-template",null,11,e.C5r),e.k0s(),e.j41(19,"div",12)(20,"span",13),e.EFF(21),e.k0s(),e.j41(22,"span",14)(23,"button",15),e.bIt("click",function(){return i.cancel()}),e.EFF(24,"Cancel"),e.k0s(),e.j41(25,"button",16),e.bIt("click",function(){return i.confirm()}),e.EFF(26),e.k0s()()()()),2&o){const r=e.sdS(18);e.R7$(6),e.Mz_("placeholder","Search ",i.candidates().length," available services\u2026"),e.Y8G("ngModel",i.q),e.R7$(4),e.Y8G("ngModel",i.access),e.R7$(6),e.Y8G("ngIf",!i.emptySearch())("ngIfElse",r),e.R7$(5),e.SpI(" ",i.consequenceText()," "),e.R7$(4),e.Y8G("disabled",0===i.selected.size),e.R7$(1),e.Lme(" Expose ",i.selected.size," ",1===i.selected.size?"service":"services"," ")}},dependencies:[d.MD,d.Sq,d.bT,m.YN,m.me,m.BC,m.vS,u.Hl,u.$z,u.iY,j.g7,j.So,h.hM,J.Wk,J.VT,J._g],styles:['@charset "UTF-8";.mcp-picker[_ngcontent-%COMP%]{display:flex;flex-direction:column;font-family:Inter,Helvetica Neue,sans-serif;min-width:320px;max-height:80vh;padding:18px 20px 14px;box-sizing:border-box}.mcp-picker-head[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}.mcp-picker-head[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;font-size:17px;font-weight:700}.mcp-picker-search[_ngcontent-%COMP%]{margin:12px 0 10px;width:100%;box-sizing:border-box;font:inherit;font-size:13.5px;padding:8px 12px;border:1px solid color-mix(in srgb,var(--df-text) 18%,transparent);border-radius:8px}.mcp-picker-search[_ngcontent-%COMP%]:focus{outline:2px solid var(--df-accent);outline-offset:-1px}.mcp-picker-access[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:13px;margin-bottom:8px}.mcp-picker-access[_ngcontent-%COMP%] .mcp-picker-access-label[_ngcontent-%COMP%]{font-weight:600}.mcp-picker-access[_ngcontent-%COMP%] mat-radio-group[_ngcontent-%COMP%]{display:inline-flex;gap:4px;flex-wrap:wrap}.mcp-picker-body[_ngcontent-%COMP%]{flex:1;overflow-y:auto;border:1px solid color-mix(in srgb,var(--df-text) 8%,transparent);border-radius:10px;background:var(--df-surface);min-height:160px}.mcp-picker-group-head[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:8px 12px 2px;font-size:11.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;opacity:.75}.mcp-picker-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:4px 12px;cursor:pointer;border-top:1px solid color-mix(in srgb,var(--df-text) 4%,transparent)}.mcp-picker-row[_ngcontent-%COMP%]:hover{background:color-mix(in srgb,var(--df-accent) 5%,transparent)}.mcp-picker-row[_ngcontent-%COMP%] .mcp-picker-label[_ngcontent-%COMP%]{font-weight:600;font-size:13.5px}.mcp-picker-row[_ngcontent-%COMP%] .mcp-picker-delta[_ngcontent-%COMP%]{font-size:12px;opacity:.65;font-variant-numeric:tabular-nums}.mcp-picker-empty[_ngcontent-%COMP%]{padding:22px 16px;font-size:13.5px;opacity:.75}.mcp-picker-foot[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding-top:12px}.mcp-picker-foot[_ngcontent-%COMP%] .mcp-picker-consequence[_ngcontent-%COMP%]{font-size:13px;font-variant-numeric:tabular-nums;opacity:.85}.mcp-picker-foot[_ngcontent-%COMP%] .mcp-picker-foot-btns[_ngcontent-%COMP%]{display:inline-flex;gap:8px;margin-left:auto}.mcp-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:5px;padding:2px 9px;border-radius:999px;font-size:12px;font-weight:600;border:1px solid color-mix(in srgb,var(--df-text) 14%,transparent);background:color-mix(in srgb,var(--df-text) 2%,transparent);white-space:nowrap}.mcp-chip.warn[_ngcontent-%COMP%]{background:var(--df-warning-soft);border-color:color-mix(in srgb,var(--df-warning) 40%,transparent);color:var(--df-warning)}@media (max-width: 700px){.mcp-picker[_ngcontent-%COMP%]{padding:14px 12px 10px;min-width:0}}']})}}return n})();function Up(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",12)(1,"span",13),e.EFF(2,"Catalog:"),e.k0s(),e.j41(3,"mat-radio-group",14),e.bIt("ngModelChange",function(i){e.eBV(t);const r=e.XpG();return e.Njj(r.view=i)}),e.j41(4,"mat-radio-button",15),e.EFF(5,"First response"),e.k0s(),e.j41(6,"mat-radio-button",16),e.EFF(7,"Full catalog"),e.k0s()(),e.j41(8,"p",17),e.EFF(9),e.k0s()()}if(2&n){const t=e.XpG();e.R7$(3),e.Y8G("ngModel",t.view),e.R7$(6),e.SpI(" ",t.lazyFlow," ")}}function qp(n,a){1&n&&(e.j41(0,"p",19),e.EFF(1," None served. "),e.k0s())}function Kp(n,a){if(1&n&&(e.j41(0,"span",23),e.EFF(1),e.k0s()),2&n){const t=e.XpG().$implicit;e.R7$(1),e.JRh(t.meta)}}function Jp(n,a){if(1&n&&(e.j41(0,"div",20)(1,"code"),e.EFF(2),e.k0s(),e.DNE(3,Kp,2,1,"span",21),e.j41(4,"span",22),e.EFF(5),e.k0s()()),2&n){const t=a.$implicit;e.R7$(2),e.JRh(t.name),e.R7$(1),e.Y8G("ngIf",t.meta),e.R7$(1),e.BMQ("title",t.description),e.R7$(1),e.SpI(" ",t.description," ")}}function Hp(n,a){if(1&n&&(e.j41(0,"section",18)(1,"h3"),e.EFF(2),e.k0s(),e.DNE(3,qp,2,0,"p",7),e.DNE(4,Jp,6,4,"div",8),e.k0s()),2&n){const t=a.$implicit,o=e.XpG();e.R7$(2),e.JRh(t.label),e.R7$(1),e.Y8G("ngIf",0===t.items.length),e.R7$(1),e.Y8G("ngForOf",t.items)("ngForTrackBy",o.trackByItemName)}}function Wp(n,a){1&n&&(e.j41(0,"p",19),e.EFF(1," Nothing is excluded \u2014 every catalog tool is served. "),e.k0s())}function Qp(n,a){if(1&n&&(e.j41(0,"div",20)(1,"code"),e.EFF(2),e.k0s(),e.j41(3,"span",24),e.EFF(4),e.k0s()()),2&n){const t=a.$implicit;e.R7$(2),e.JRh(t.name),e.R7$(2),e.JRh(t.reason)}}let Zp=(()=>{class n{constructor(t,o,i){this.dialogRef=t,this.data=o,this.snackbar=i,this.groups=[],this.excluded=[],this.total=0,this.lazyEngaged=!1,this.lazyAuto=!0,this.view="full",this.firstResponseGroups=[{label:`First response \u2014 discovery tools (${Me.length})`,items:this.firstResponseItems()}],this.trackByLabel=(r,c)=>c.label,this.trackByItemName=(r,c)=>c.name,this.trackByExcluded=(r,c)=>`${c.name}|${c.reason}`,this.lazyFlow="Agents call search_tools to find a tool, describe_tool for its schema, then call_tool to run it; fetch_more pages long results."}get store(){return this.data.store}ngOnInit(){this.store.isSystemMcp?this.buildSystem():this.buildMcp(),this.stats=this.store.catalogStats(),this.lazyEngaged=this.stats.lazy,this.lazyAuto="auto"===this.store.cfg.lazyMode,this.lazyEngaged&&(this.view="first")}buildMcp(){const t=this.store,o=t.cfg,i=o.disabledTools,r=t.effective(),c=r.effectiveStyle,s=t.rows(),l=s.filter(_=>!!_.svc),p=l.map(_=>_.svc).filter(_=>_.active&&"db"===_.kind),f=l.map(_=>_.svc).filter(_=>_.active&&"file"===_.kind),M=Ve(p.length,f.length),v=ye.filter(_=>!i.has(_.verb)).map(_=>({name:_.verb,description:_.description}));for(const _ of M)i.has(_.verb)||v.push({name:_.verb,description:_.description});this.groups.push({label:`Global (${v.length})`,items:v});const x=[];if(p.length>0)if("merged"===c){for(const _ of $("db")){const C=Et(_.verb,o,t.backendServices);0!==C.on.length&&x.push({name:_.verb,description:_.description,meta:`service: ${C.on.join(", ")} (${C.on.length} of ${C.total})`})}this.groups.push({label:`Database \u2014 consolidated, service argument (${x.length})`,items:x})}else{for(const _ of p)for(const C of $("db"))ce(o,_.name,C.verb)&&x.push({name:$t("prefixed",_.name,C.verb),description:C.description});this.groups.push({label:`Database (${x.length})`,items:x})}const F=[];if(f.length>0)if("merged"===c){for(const _ of $("file")){const C=f.filter(k=>ce(o,k.name,_.verb)).map(k=>k.name);0!==C.length&&F.push({name:_.verb,description:_.description,meta:`service: ${C.join(", ")} (${C.length} of ${f.length})`})}this.groups.push({label:`File \u2014 consolidated, service argument (${F.length})`,items:F})}else{for(const _ of f)for(const C of $("file"))ce(o,_.name,C.verb)&&F.push({name:ne(_.name,C.verb),description:C.description});this.groups.push({label:`File (${F.length})`,items:F})}const T=(o.customTools??[]).filter(_=>Rt(o,_)).map(_=>({name:_.name??"",description:_.description??""}));T.length>0&&this.groups.push({label:`Custom (${T.length})`,items:T});const B=t.backendServices.filter(_=>!o.exposedServices.includes(_.name));if(B.length>0){const _=B.map(y=>y.name),C=_.slice(0,3).join(", ");this.excluded.push({name:C+(_.length>3?`, +${_.length-3} more`:""),reason:"not exposed"})}if(!1===o.allowWrites){const _=(o.customTools??[]).filter(C=>!1!==C?.enabled&&0!==C?.enabled&&tt(C)).length;this.excluded.push({name:"write & execute tools"+(_?` + ${_} custom`:""),reason:"writes are off for this server"})}for(const _ of l)_.svc.active||this.excluded.push({name:_.name,reason:"service inactive"});for(const _ of s)_.svc||this.excluded.push({name:_.name,reason:"no service with this name exists"});for(const _ of l)if(_.svc.active)for(const C of Oe(_.svc.kind)){const k=et(_.svc,C,i);if("off"===k)this.excluded.push({name:`${_.name} \xb7 ${C.label.toLowerCase()}`,reason:"turned off by you"});else if("part"===k&&("prefixed"===c||"file"===_.svc.kind))for(const y of C.verbs)i.has(ne(_.name,y.verb))&&this.excluded.push({name:ne(_.name,y.verb),reason:"turned off by you"})}if("merged"===c&&p.length>0)for(const _ of $("db"))!1===o.allowWrites&&Qe.has(_.verb)||0===Et(_.verb,o,t.backendServices).on.length&&this.excluded.push({name:_.verb,reason:"turned off in every exposed database"});p.length<2&&this.excluded.push({name:"cross-database aggregators",reason:"served only with two or more databases"});for(const _ of ye)i.has(_.verb)&&this.excluded.push({name:_.verb,reason:"turned off by you"});for(const _ of M)i.has(_.verb)&&this.excluded.push({name:_.verb,reason:"turned off by you"});for(const _ of o.customTools??[])(!1===_?.enabled||0===_?.enabled)&&this.excluded.push({name:_.name??"",reason:"turned off by you"});this.total=r.total}buildSystem(){const o=this.store.cfg.disabledTools,i=ie.filter(r=>!o.has(r.name));this.groups.push({label:`System API (${i.length})`,items:i.map(r=>({name:r.name,description:r.description}))});for(const r of ie)o.has(r.name)&&this.excluded.push({name:r.name,reason:"turned off by you"});this.total=i.length}firstResponseItems(){return Me.map(t=>({name:t.verb,description:t.description}))}visibleGroups(){return this.lazyEngaged&&"first"===this.view?this.firstResponseGroups:this.groups}tokenLabel(){const t="server"===this.stats.source?"":" (estimate)";return`${Rn(this.stats.tokens)} tokens per turn${t}`}lazyLabel(){return this.lazyEngaged?`Lazy loading: engaged (${this.lazyAuto?"auto":"always on"}) \u2014 ${de(this.stats.facadeBytes)} facade instead of ${de(this.stats.bytes)}`:`Lazy loading: not engaged (${de(this.stats.bytes)} of ${de(Ze)})`}copyJson(){const t=this.visibleGroups().flatMap(i=>i.items).map(i=>({name:i.name,description:i.description})),o=JSON.stringify(t,null,2);navigator.clipboard?.writeText(o).catch(()=>{}),this.snackbar.openSnackBar("tools/list JSON copied.","success")}close(){this.dialogRef.close()}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(h.CP),e.rXU(h.Vh),e.rXU(pe.L))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-mcp-preview"]],standalone:!0,features:[e.aNF],decls:19,vars:10,consts:[["data-testid","mcp-preview-drawer",1,"mcp-preview"],[1,"mcp-preview-head"],["mat-icon-button","","type","button","aria-label","Close",3,"click"],["class","mcp-preview-controls",4,"ngIf"],[1,"mcp-preview-body"],["class","mcp-preview-group",4,"ngFor","ngForOf","ngForTrackBy"],["data-testid","mcp-preview-excluded",1,"mcp-preview-group","mcp-preview-excluded"],["class","mcp-preview-none",4,"ngIf"],["class","mcp-preview-item",4,"ngFor","ngForOf","ngForTrackBy"],[1,"mcp-preview-foot"],[1,"mcp-preview-foot-facts"],["mat-stroked-button","","type","button",3,"click"],[1,"mcp-preview-controls"],[1,"mcp-preview-controls-label"],[3,"ngModel","ngModelChange"],["value","first"],["value","full"],["data-testid","mcp-preview-lazy-flow",1,"mcp-preview-flow"],[1,"mcp-preview-group"],[1,"mcp-preview-none"],[1,"mcp-preview-item"],["class","mcp-preview-meta",4,"ngIf"],[1,"mcp-preview-desc"],[1,"mcp-preview-meta"],[1,"mcp-preview-reason"]],template:function(o,i){1&o&&(e.j41(0,"div",0)(1,"div",1)(2,"h2"),e.EFF(3),e.k0s(),e.j41(4,"button",2),e.bIt("click",function(){return i.close()}),e.EFF(5," \u2715 "),e.k0s()(),e.DNE(6,Up,10,2,"div",3),e.j41(7,"div",4),e.DNE(8,Hp,5,4,"section",5),e.j41(9,"section",6)(10,"h3"),e.EFF(11,"Excluded (not served)"),e.k0s(),e.DNE(12,Wp,2,0,"p",7),e.DNE(13,Qp,5,2,"div",8),e.k0s()(),e.j41(14,"div",9)(15,"span",10),e.EFF(16),e.k0s(),e.j41(17,"button",11),e.bIt("click",function(){return i.copyJson()}),e.EFF(18," Copy tools/list JSON "),e.k0s()()()),2&o&&(e.R7$(3),e.SpI("What an agent sees \u2014 as served at /mcp/",i.store.service.name,""),e.R7$(3),e.Y8G("ngIf",i.lazyEngaged),e.R7$(2),e.Y8G("ngForOf",i.visibleGroups())("ngForTrackBy",i.trackByLabel),e.R7$(4),e.Y8G("ngIf",0===i.excluded.length),e.R7$(1),e.Y8G("ngForOf",i.excluded)("ngForTrackBy",i.trackByExcluded),e.R7$(3),e.E5c(" ",i.total," tools \xb7 ",i.tokenLabel()," \xb7 ",i.lazyLabel()," "))},dependencies:[d.MD,d.Sq,d.bT,m.YN,m.BC,m.vS,u.Hl,u.$z,u.iY,h.hM,J.Wk,J.VT,J._g],styles:['@charset "UTF-8";.mcp-preview[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;min-height:0;font-family:Inter,Helvetica Neue,sans-serif;padding:18px 20px 14px;box-sizing:border-box;background:var(--df-surface)}.mcp-preview-head[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.mcp-preview-head[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;font-size:15.5px;font-weight:700;line-height:1.35}.mcp-preview-controls[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:10px;font-size:13px}.mcp-preview-controls[_ngcontent-%COMP%] .mcp-preview-controls-label[_ngcontent-%COMP%]{font-weight:600}.mcp-preview-controls[_ngcontent-%COMP%] .mcp-preview-flow[_ngcontent-%COMP%]{flex-basis:100%;margin:0;opacity:.75}.mcp-preview-body[_ngcontent-%COMP%]{flex:1;overflow-y:auto;margin-top:12px;min-height:0}.mcp-preview-group[_ngcontent-%COMP%]{margin-bottom:18px}.mcp-preview-group[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:11.5px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;opacity:.7;margin:0 0 6px}.mcp-preview-item[_ngcontent-%COMP%]{display:flex;align-items:baseline;gap:8px;flex-wrap:nowrap;padding:3px 0;font-size:13px;min-width:0}.mcp-preview-item[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-size:12.5px;background:color-mix(in srgb,var(--df-text) 3.5%,transparent);border:1px solid color-mix(in srgb,var(--df-text) 8%,transparent);border-radius:6px;padding:1px 7px;flex-shrink:0;white-space:nowrap}.mcp-preview-item[_ngcontent-%COMP%] .mcp-preview-meta[_ngcontent-%COMP%]{font-size:12px;color:var(--df-accent);font-variant-numeric:tabular-nums;flex-shrink:0;white-space:nowrap}.mcp-preview-item[_ngcontent-%COMP%] .mcp-preview-desc[_ngcontent-%COMP%]{font-size:12px;opacity:.65;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mcp-preview-item[_ngcontent-%COMP%] .mcp-preview-reason[_ngcontent-%COMP%]{font-size:12px;color:var(--df-warning);flex-shrink:0;white-space:nowrap}.mcp-preview-excluded[_ngcontent-%COMP%]{border-top:1px solid color-mix(in srgb,var(--df-text) 8%,transparent);padding-top:12px}.mcp-preview-excluded[_ngcontent-%COMP%] .mcp-preview-item[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{opacity:.75;flex-shrink:1;min-width:0;overflow:hidden;text-overflow:ellipsis}.mcp-preview-none[_ngcontent-%COMP%]{font-size:12.5px;opacity:.6;margin:0}.mcp-preview-foot[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;border-top:1px solid color-mix(in srgb,var(--df-text) 8%,transparent);padding-top:10px}.mcp-preview-foot[_ngcontent-%COMP%] .mcp-preview-foot-facts[_ngcontent-%COMP%]{font-size:12.5px;font-variant-numeric:tabular-nums;opacity:.8}@media (max-width: 700px){.mcp-preview[_ngcontent-%COMP%]{padding:14px 12px 10px}}']})}}return n})();const Nn=1,em=30,tm=31;function nt(n){return n<=0?"none":n&em?"rw":"read"}function nm(n){return"rw"===n?tm:"read"===n?Nn:0}const Nt="_table/",om=/^_table\/([^/*][^/]*)\/\*$/;function Be(n){const a=om.exec(n);return a?a[1]:null}function An(n){return n===Nt||"_table"===n}const ot={level:"none",tables:null,editable:!0,mask:0};function im(n){const a=n.filter(p=>p.verbMask>0),t=a.reduce((p,f)=>p|f.verbMask,0);if(0===a.length)return{...ot};const o=a.some(p=>Array.isArray(p.filters)&&p.filters.length>0),i=a.filter(p=>"*"===p.component),r=a.filter(p=>Be(p.component)),c=a.filter(p=>An(p.component)),s=a.length-i.length-r.length-c.length,l=r.length?r.map(p=>Be(p.component)):null;if(o||s>0||i.length&&r.length)return{level:nt(t),tables:l,editable:!1,mask:t};if(i.length){const p=i.reduce((f,M)=>f|M.verbMask,0);return{level:nt(p),tables:null,editable:!0,mask:p}}if(r.length){const p=r[0].verbMask;return r.some(f=>f.verbMask!==p)?{level:nt(t),tables:l,editable:!1,mask:t}:{level:nt(p),tables:l,editable:!0,mask:p}}return{level:"none",tables:null,editable:!0,mask:t}}function it(n,a){const t={};for(const o of a)t[o]=im(n.filter(i=>i.serviceId===o));return t}function At(n){return n.before!==n.after||"none"!==n.after&&!function am(n,a){return[...n??[]].sort().join("|")===[...a??[]].sort().join("|")}(n.beforeTables,n.tables)}function cm(n){return n.tables?.length?n.tableTotal?`${n.label} (${n.tables.length} of ${n.tableTotal} tables)`:`${n.label} (${n.tables.length} tables)`:n.label}function Yn(n,a){const t={server:"none",read:[],rw:[],deltas:[],listing:!1};for(const o of n){if(o.serviceId===a){t.server="none"===o.before?"grant":"keep";continue}if(!At(o))continue;"none"!==o.after&&o.tables?.length&&(t.listing=!0);const i=cm(o);o.before===o.after?t.deltas.push({label:i,delta:"~tables"}):"none"===o.before?("rw"===o.after?t.rw:t.read).push(i):t.deltas.push("none"===o.after?{label:o.label,delta:"-access"}:{label:i,delta:"rw"===o.after?"+write":"-write"})}return t}const sm={"+write":"+ write on","-write":"\u2212 write on","-access":"\u2212 access on","~tables":"tables on"},Vn=(n,a,t)=>`${n} ${1===n?a:t}`;function Xn(n,a){const t=[],o=r=>{null!=r.id&&t.push({id:r.id,role_id:null})},i=(r,c,s,l)=>{null!=r?.id&&r.verbMask===l||t.push({...null!=r?.id?{id:r.id}:{},service_id:c,component:s,verb_mask:l,requestor_mask:r?.requestorMask??3,filters:[],filter_op:"AND"})};for(const r of n){if(!At(r))continue;const c=a.filter(x=>x.serviceId===r.serviceId),s=c.find(x=>"*"===x.component),l=c.filter(x=>Be(x.component)),p=c.filter(x=>An(x.component));if("none"===r.after){s&&o(s),l.forEach(o),p.forEach(o);continue}const f=nm(r.after);if(!r.tables?.length){i(s,r.serviceId,"*",f),l.forEach(o),p.forEach(o);continue}s&&o(s);const M=new Set(r.tables);for(const x of l)M.has(Be(x.component))||o(x);for(const x of r.tables)i(l.find(T=>Be(T.component)===x),r.serviceId,`_table/${x}/*`,f);const v=p.find(x=>x.component===Nt);p.filter(x=>x!==v).forEach(o),i(v,r.serviceId,Nt,Nn)}return t}function zn(n,a,t,o){const i=n[a]??n[t];return null==i?o:!0===i||1===i||"1"===i||"true"===i}let Bn=(()=>{class n{constructor(t){this.http=t}access(t){return this.http.get("/_internal/ai/mcp-access",{params:{service:String(t),period:"30d"},context:(0,K.Ku)()}).pipe((0,R.W)(()=>(0,L.of)(null)))}roles(){return this.http.get(`${A.C}/system/role`,{params:{fields:"id,name,is_active",related:"role_service_access_by_role_id",limit:"1000"},context:(0,K.Ku)()}).pipe((0,z.T)(t=>(t?.resource??[]).map(o=>({id:o.id,name:o.name,isActive:o.isActive,rows:(o.roleServiceAccessByRoleId??[]).map(i=>({id:i.id,serviceId:i.serviceId,component:i.component,verbMask:i.verbMask??0,requestorMask:i.requestorMask,filters:i.filters??null}))}))),(0,R.W)(()=>(0,L.of)([])))}apps(){return this.http.get(`${A.C}/system/app`,{params:{fields:"id,name,role_id,is_active",limit:"1000"},context:(0,K.Ku)()}).pipe((0,z.T)(t=>(t?.resource??[]).filter(o=>!1!==o.isActive&&null!=o.roleId).map(o=>({id:o.id,name:o.name,roleId:o.roleId}))),(0,R.W)(()=>(0,L.of)([])))}listTables(t){return this.http.get(`${A.C}/${t}/_table`,{params:{as_list:"true"},context:(0,K.Ku)()}).pipe((0,z.T)(o=>Array.isArray(o?.resource)?o.resource:[]),(0,R.W)(()=>(0,L.of)([])))}patchRoleAccess(t,o){return this.http.patch(`${A.C}/system/role/${t}`,{role_service_access_by_role_id:o},{context:(0,K.PH)()})}createRole(t,o,i){return this.http.post(`${A.C}/system/role`,{resource:[{name:t,description:o,is_active:!0,role_service_access_by_role_id:i}]},{params:{fields:"id"},context:(0,K.PH)()}).pipe((0,z.T)(r=>r?.resource?.[0]?.id))}createAppKey(t,o){return this.http.post(`${A.C}/system/app`,{resource:[{name:t,type:0,role_id:o,is_active:!0}]},{params:{fields:"id,api_key"},context:(0,K.PH)()}).pipe((0,z.T)(i=>i?.resource?.[0]?.apiKey??null))}static{this.\u0275fac=function(o){return new(o||n)(e.KVO(ee.Qq))}}static{this.\u0275prov=e.jDH({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();function mm(n,a){1&n&&(e.j41(0,"span",1),e.EFF(1," API-key auth is off on this server \u2014 turn it on in Settings \u2192 Authentication before clients use the key. "),e.k0s())}function _m(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",8)(1,"span"),e.EFF(2,"API key created. Copy it now \u2014 it is shown once."),e.k0s(),e.j41(3,"code",9),e.EFF(4),e.k0s(),e.j41(5,"button",10),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.copyKey())}),e.EFF(6," Copy key "),e.k0s(),e.j41(7,"span",1),e.EFF(8,"The Connect tab\u2019s API-key snippets now use this key."),e.k0s(),e.DNE(9,mm,2,0,"span",5),e.k0s()}if(2&n){const t=e.XpG(2);e.R7$(4),e.JRh(t.apiKey),e.R7$(5),e.Y8G("ngIf",!t.data.store.cfg.allowApiKeyAuth)}}function gm(n,a){1&n&&(e.j41(0,"p",1),e.EFF(1," The API key could not be created; add one under API Keys. "),e.k0s())}function fm(n,a){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"p",3),e.EFF(2),e.k0s(),e.DNE(3,_m,10,2,"div",4),e.DNE(4,gm,2,0,"p",5),e.j41(5,"div",6)(6,"button",7),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.dialogRef.close(!0))}),e.EFF(7," Done "),e.k0s()(),e.bVm()}if(2&n){const t=e.XpG();e.R7$(2),e.SpI(" Role ",t.name," created and granted this MCP server. "),e.R7$(1),e.Y8G("ngIf",t.apiKey),e.R7$(1),e.Y8G("ngIf",!t.apiKey)}}function um(n,a){if(1&n&&(e.j41(0,"mat-option",25),e.EFF(1),e.k0s()),2&n){const t=a.$implicit;e.Y8G("value",t.id),e.R7$(1),e.JRh(t.name)}}function hm(n,a){if(1&n){const t=e.RV6();e.j41(0,"mat-form-field",22)(1,"mat-label"),e.EFF(2,"Role"),e.k0s(),e.j41(3,"mat-select",23),e.bIt("selectionChange",function(i){e.eBV(t);const r=e.XpG(2);return e.Njj(r.onRolePicked(i.value))}),e.DNE(4,um,2,2,"mat-option",24),e.k0s()()}if(2&n){const t=e.XpG(2);e.R7$(3),e.Y8G("value",t.roleId),e.R7$(1),e.Y8G("ngForOf",t.addableRoles)}}function bm(n,a){if(1&n){const t=e.RV6();e.j41(0,"mat-form-field",22)(1,"mat-label"),e.EFF(2,"Role name"),e.k0s(),e.j41(3,"input",26),e.bIt("ngModelChange",function(i){e.eBV(t);const r=e.XpG(2);return e.Njj(r.name=i)}),e.k0s()()}if(2&n){const t=e.XpG(2);e.R7$(3),e.Y8G("ngModel",t.name)}}function vm(n,a){if(1&n){const t=e.RV6();e.j41(0,"mat-checkbox",27),e.bIt("ngModelChange",function(i){e.eBV(t);const r=e.XpG(2);return e.Njj(r.createKey=i)}),e.EFF(1," Also create an API key "),e.k0s()}if(2&n){const t=e.XpG(2);e.Y8G("ngModel",t.createKey)}}const xm=function(n,a){return[n,a]};function Cm(n,a){if(1&n){const t=e.RV6();e.j41(0,"span",28)(1,"code"),e.EFF(2),e.k0s(),e.j41(3,"a",29),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.dialogRef.close())}),e.EFF(4,"Role page \u2197"),e.k0s()()}if(2&n){const t=e.XpG(2);e.R7$(2),e.JRh(t.data.role.name),e.R7$(1),e.Y8G("routerLink",e.l_i(2,xm,t.roleRoute,t.data.role.id))}}function km(n,a){if(1&n){const t=e.RV6();e.j41(0,"input",30),e.bIt("ngModelChange",function(i){e.eBV(t);const r=e.XpG(2);return e.Njj(r.filter=i)}),e.k0s()}if(2&n){const t=e.XpG(2);e.Y8G("ngModel",t.filter)}}function ym(n,a){1&n&&(e.j41(0,"p",1),e.EFF(1," Nothing is exposed yet; the role will only be granted the MCP server. "),e.k0s())}function Mm(n,a){1&n&&(e.j41(0,"p",31),e.EFF(1," Writes are blocked on this server \u2014 Read and write is unavailable. "),e.k0s())}function Om(n,a){1&n&&(e.j41(0,"span",41),e.EFF(1," limited on the role page "),e.k0s())}function Pm(n,a){1&n&&(e.j41(0,"span",41),e.EFF(1," pick a role first "),e.k0s())}function Fm(n,a){if(1&n){const t=e.RV6();e.j41(0,"button",46),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2).$implicit,r=e.XpG(4);return e.Njj(r.toggleExpanded(i))}),e.EFF(1),e.k0s()}if(2&n){const t=e.XpG(2).$implicit,o=e.XpG(4);e.BMQ("aria-expanded",o.expanded.has(t.id)),e.R7$(1),e.Lme(" ",o.expanded.has(t.id)?"\u25be":"\u25b8"," ",o.limitLabel(t)," ")}}function wm(n,a){if(1&n){const t=e.RV6();e.j41(0,"button",47),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG(2).$implicit,s=e.XpG(4);return e.Njj(s.setLevel(c,r))}),e.EFF(1),e.k0s()}if(2&n){const t=a.$implicit,o=e.XpG(2).$implicit,i=e.XpG(4);e.AVh("on",i.levels[o.id]===t),e.Y8G("disabled","rw"===t&&!i.data.allowWrites)("matTooltip","rw"!==t||i.data.allowWrites?"":"Writes are blocked on this server"),e.BMQ("aria-checked",i.levels[o.id]===t)("data-level",t),e.R7$(1),e.SpI(" ",i.levelText[t]," ")}}function Dm(n,a){if(1&n&&(e.j41(0,"div",42),e.DNE(1,Fm,2,3,"button",43),e.j41(2,"div",44),e.DNE(3,wm,2,7,"button",45),e.k0s()()),2&n){const t=e.XpG().$implicit,o=e.XpG(4);e.R7$(1),e.Y8G("ngIf",o.canLimit(t)),e.R7$(1),e.BMQ("aria-label",t.svc.label),e.R7$(1),e.Y8G("ngForOf",o.levelsList)}}function Tm(n,a){1&n&&(e.j41(0,"p",1),e.EFF(1," Loading tables\u2026 "),e.k0s())}function Sm(n,a){1&n&&(e.j41(0,"p",1),e.EFF(1," No tables found (or the admin cannot list them). "),e.k0s())}function Rm(n,a){if(1&n){const t=e.RV6();e.j41(0,"input",52),e.bIt("ngModelChange",function(i){e.eBV(t);const r=e.XpG(3).$implicit,c=e.XpG(4);return e.Njj(c.tableFilter[r.id]=i)}),e.k0s()}if(2&n){const t=e.XpG(3).$implicit,o=e.XpG(4);e.Y8G("ngModel",o.tableFilter[t.id])("name","tf_"+t.svc.name)}}function Im(n,a){if(1&n){const t=e.RV6();e.j41(0,"mat-checkbox",53),e.bIt("change",function(){const r=e.eBV(t).$implicit,c=e.XpG(3).$implicit,s=e.XpG(4);return e.Njj(s.toggleTable(c,r))}),e.EFF(1),e.k0s()}if(2&n){const t=a.$implicit,o=e.XpG(3).$implicit,i=e.XpG(4);e.Y8G("checked",i.ticked(o,t)),e.BMQ("data-table",t),e.R7$(1),e.SpI(" ",t," ")}}function Em(n,a){if(1&n&&(e.qex(0),e.DNE(1,Sm,2,0,"p",5),e.DNE(2,Rm,1,2,"input",49),e.j41(3,"div",50),e.DNE(4,Im,2,3,"mat-checkbox",51),e.k0s(),e.j41(5,"p",1),e.EFF(6),e.k0s(),e.bVm()),2&n){const t=a.ngIf,o=e.XpG(2).$implicit,i=e.XpG(4);e.R7$(1),e.Y8G("ngIf",0===t.length),e.R7$(1),e.Y8G("ngIf",t.length>12),e.R7$(2),e.Y8G("ngForOf",i.visibleTables(o)),e.R7$(2),e.SpI(" ",0===i.tickedCount(o)?"Nothing ticked: whole service.":i.limitLabel(o)," ")}}function $m(n,a){if(1&n&&(e.j41(0,"div",48),e.DNE(1,Tm,2,0,"p",5),e.DNE(2,Em,7,4,"ng-container",2),e.k0s()),2&n){const t=e.XpG().$implicit,o=e.XpG(4);e.BMQ("data-tables-for",t.svc.name),e.R7$(1),e.Y8G("ngIf",o.loadingTables.has(t.svc.name)),e.R7$(1),e.Y8G("ngIf",o.tablesOf(t))}}function Gm(n,a){if(1&n&&(e.qex(0),e.j41(1,"div",36)(2,"div",37)(3,"span"),e.EFF(4),e.k0s(),e.j41(5,"code"),e.EFF(6),e.k0s()(),e.DNE(7,Om,2,0,"span",38),e.DNE(8,Pm,2,0,"span",38),e.DNE(9,Dm,4,3,"div",39),e.k0s(),e.DNE(10,$m,3,3,"div",40),e.bVm()),2&n){const t=a.$implicit,o=e.XpG(4);e.R7$(1),e.BMQ("data-backend",t.svc.name),e.R7$(3),e.JRh(t.svc.label),e.R7$(2),e.JRh(t.svc.name),e.R7$(1),e.Y8G("ngIf",!t.spec.editable),e.R7$(1),e.Y8G("ngIf",t.spec.editable&&"add"===o.mode&&!o.roleId),e.R7$(1),e.Y8G("ngIf",!o.locked(t)),e.R7$(1),e.Y8G("ngIf",o.canLimit(t)&&o.expanded.has(t.id))}}function jm(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",33)(1,"div",34)(2,"span"),e.EFF(3),e.k0s(),e.j41(4,"button",35),e.bIt("click",function(){e.eBV(t);const i=e.XpG().$implicit,r=e.XpG(2);return e.Njj(r.readOnAll(i.kind))}),e.EFF(5," Read on all "),e.k0s()(),e.DNE(6,Gm,11,7,"ng-container",17),e.k0s()}if(2&n){const t=e.XpG().$implicit,o=e.XpG(2);e.R7$(3),e.JRh(t.label),e.R7$(1),e.Y8G("disabled","add"===o.mode&&!o.roleId),e.R7$(2),e.Y8G("ngForOf",t.rows)("ngForTrackBy",o.trackByRow)}}function Nm(n,a){if(1&n&&(e.qex(0),e.DNE(1,jm,7,4,"div",32),e.bVm()),2&n){const t=a.$implicit;e.R7$(1),e.Y8G("ngIf",t.rows.length>0)}}function Am(n,a){if(1&n&&(e.j41(0,"p",54),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.JRh(t.error)}}function Ym(n,a){1&n&&(e.j41(0,"span",1),e.EFF(1," This changes what the role can do everywhere, not only through MCP. "),e.k0s())}function Vm(n,a){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"div",11),e.DNE(2,hm,5,2,"mat-form-field",12),e.DNE(3,bm,4,1,"mat-form-field",12),e.DNE(4,vm,2,1,"mat-checkbox",13),e.DNE(5,Cm,5,5,"span",14),e.DNE(6,km,1,1,"input",15),e.k0s(),e.DNE(7,ym,2,0,"p",5),e.DNE(8,Mm,2,0,"p",16),e.DNE(9,Nm,2,1,"ng-container",17),e.j41(10,"p",18),e.EFF(11),e.k0s(),e.DNE(12,Am,2,1,"p",19),e.j41(13,"div",6),e.DNE(14,Ym,2,0,"span",5),e.j41(15,"button",20),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.dialogRef.close())}),e.EFF(16," Cancel "),e.k0s(),e.j41(17,"button",21),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.save())}),e.EFF(18),e.k0s()(),e.bVm()}if(2&n){const t=e.XpG();e.R7$(2),e.Y8G("ngIf","add"===t.mode),e.R7$(1),e.Y8G("ngIf","create"===t.mode),e.R7$(1),e.Y8G("ngIf","create"===t.mode),e.R7$(1),e.Y8G("ngIf","edit"===t.mode&&t.data.role),e.R7$(1),e.Y8G("ngIf",t.showFilter),e.R7$(1),e.Y8G("ngIf",0===t.data.backends.length),e.R7$(1),e.Y8G("ngIf",!t.data.allowWrites),e.R7$(1),e.Y8G("ngForOf",t.groups)("ngForTrackBy",t.trackByKind),e.R7$(2),e.SpI(" ",t.summaryText," "),e.R7$(1),e.Y8G("ngIf",t.error),e.R7$(2),e.Y8G("ngIf",t.touchesApis),e.R7$(3),e.Y8G("disabled",!t.canSave),e.R7$(1),e.SpI(" ",t.saving?"Saving\u2026":"create"===t.mode?"Create role":"Save"," ")}}const Ln="/api-connections/role-based-access";let Xm=(()=>{class n{constructor(t,o,i){this.dialogRef=t,this.data=o,this.api=i,this.levelsList=["none","read","rw"],this.levelText={none:"No access",read:"Read",rw:"Read and write"},this.roleRoute=Ln,this.roleId=null,this.name="",this.createKey=!1,this.levels={},this.tables={},this.expanded=new Set,this.tableFilter={},this.tableCache={},this.loadingTables=new Set,this.filter="",this.saving=!1,this.error="",this.done=!1,this.apiKey=null,this.trackByKind=(r,c)=>c.kind,this.trackByRow=(r,c)=>c.id,this.mode=o.mode,this.serviceId=o.store.service.id,this.serviceLabel=o.store.service.label||o.store.service.name;for(const r of o.backends)this.levels[r.id]="none";"edit"===o.mode&&o.role&&(this.roleId=o.role.id,this.seed(o.role)),"create"===o.mode&&(this.name=function pm(n){const a=n.toLowerCase().replace(/[^a-z0-9]+/g,"_").replace(/^_|_$/g,"");return a?`${a}_access`:"mcp_access"}(this.serviceLabel))}get title(){return"create"===this.mode?`Create a role for ${this.serviceLabel}`:"add"===this.mode?`Add a role to ${this.serviceLabel}`:`Edit access to ${this.serviceLabel}`}get hint(){return"edit"===this.mode?"Per exposed service. No access removes the role\u2019s row for that service.":"The role is granted this MCP server. Pick what else it may reach \u2014 No access is the default."}ids(){return[this.serviceId,...this.data.backends.map(t=>t.id)]}seed(t){const o=it(t.rows,this.ids());this.tables={};for(const i of this.data.backends){const r=i.id;this.levels[r]=o[r]?.level??"none",o[r]?.tables?.length&&(this.tables[r]=[...o[r].tables])}}get addableRoles(){return this.data.roles.filter(t=>!1!==t.isActive&&!this.data.grantedIds.has(t.id))}get currentRole(){return this.data.role??this.data.roles.find(t=>t.id===this.roleId)}currentSpecs(){return it(this.currentRole?.rows??[],this.ids())}onRolePicked(t){this.roleId=t;const o=this.currentRole;o&&this.seed(o)}get showFilter(){return this.data.backends.length>6}rowsOf(t){const o=this.currentSpecs(),i=this.filter.trim().toLowerCase();return this.data.backends.filter(r=>r.kind===t).filter(r=>!i||r.label.toLowerCase().includes(i)||r.name.toLowerCase().includes(i)).map(r=>({svc:r,id:r.id,spec:o[r.id]??ot}))}get groups(){return[{kind:"db",label:"Databases",rows:this.rowsOf("db")},{kind:"file",label:"File stores",rows:this.rowsOf("file")}]}locked(t){return"add"===this.mode&&!this.roleId||!t.spec.editable}setLevel(t,o){this.locked(t)||"rw"===o&&!this.data.allowWrites||(this.levels[t.id]=o,"none"===o&&(delete this.tables[t.id],this.expanded.delete(t.id)))}readOnAll(t){for(const o of this.rowsOf(t))!this.locked(o)&&"none"===this.levels[o.id]&&(this.levels[o.id]="read")}canLimit(t){return"db"===t.svc.kind&&!this.locked(t)&&"none"!==(this.levels[t.id]??"none")}toggleExpanded(t){if(this.expanded.delete(t.id))return;this.expanded.add(t.id);const o=t.svc.name;this.tableCache[o]||this.loadingTables.has(o)||(this.loadingTables.add(o),this.api.listTables(o).subscribe(i=>{this.tableCache[o]=i,this.loadingTables.delete(o)}))}tablesOf(t){return this.tableCache[t.svc.name]??null}visibleTables(t){const o=this.tablesOf(t)??[],i=(this.tableFilter[t.id]??"").trim().toLowerCase();return i?o.filter(r=>r.toLowerCase().includes(i)):o}ticked(t,o){return(this.tables[t.id]??[]).includes(o)}toggleTable(t,o){const i=this.tables[t.id]??[];this.tables[t.id]=i.includes(o)?i.filter(r=>r!==o):[...i,o]}tickedCount(t){return(this.tables[t.id]??[]).length}limitLabel(t){const o=this.tickedCount(t);if(0===o)return"Limit to tables";const i=this.tablesOf(t);return i?`${o} of ${i.length} tables`:`${o} ${1===o?"table":"tables"}`}get changes(){return function rm(n){const a=[],t=n.specs[n.serverId]??ot;t.editable&&a.push({serviceId:n.serverId,label:n.serverLabel,before:t.level,after:"none"===t.level?"read":t.level});for(const o of n.backends){const i=n.specs[o.id]??ot;if(!i.editable)continue;const r=n.tables?.[o.id],c=n.tableTotals?.[o.id];a.push({serviceId:o.id,label:o.label,before:i.level,after:n.levels[o.id]??"none",...i.tables?.length?{beforeTables:i.tables}:{},...r?.length?{tables:r}:{},...null!=c?{tableTotal:c}:{}})}return a}({serverId:this.serviceId,serverLabel:this.serviceLabel,backends:this.data.backends.map(t=>({id:t.id,label:t.label})),specs:this.currentSpecs(),levels:this.levels,tables:this.tables,tableTotals:Object.fromEntries(this.data.backends.filter(t=>this.tableCache[t.name]).map(t=>[t.id,this.tableCache[t.name].length]))})}get summaryText(){return function lm(n,a){const t=[];return"create"===a.mode&&t.push(`Creates role ${a.roleName||"\u2026"}`),"grant"===n.server&&t.push("grants this MCP server"),"edit"===a.mode?(n.read.forEach(o=>t.push(`+ read on ${o}`)),n.rw.forEach(o=>t.push(`+ read and write on ${o}`))):(n.read.length&&t.push(`read on ${Vn(n.read.length,"API","APIs")}`),n.rw.length&&t.push(`read and write on ${Vn(n.rw.length,"API","APIs")}`)),n.deltas.forEach(o=>t.push(`${sm[o.delta]} ${o.label}`)),n.listing&&t.push("plus table listing (GET _table/) on limited APIs"),"create"===a.mode&&a.createKey&&t.push("creates an API key"),t.length?t.join(", "):"No changes yet."}(Yn(this.changes,this.serviceId),{mode:this.mode,roleName:this.name.trim(),createKey:this.createKey})}get touchesApis(){const t=Yn(this.changes,this.serviceId);return t.read.length+t.rw.length+t.deltas.length>0}get canSave(){return!(this.saving||"add"===this.mode&&!this.roleId)&&("create"===this.mode?!!this.name.trim():this.changes.some(At))}save(){if(!this.canSave)return;this.saving=!0,this.error="";const t=Xn(this.changes,this.currentRole?.rows??[]),o=this.name.trim();("create"===this.mode?this.api.createRole(o,`Created from the ${this.serviceLabel} MCP page`,t).pipe((0,Ce.n)(r=>this.createKey?this.api.createAppKey(`${o}_app`,r).pipe((0,R.W)(()=>(0,L.of)(null))):(0,L.of)(null))):this.api.patchRoleAccess(this.roleId,t)).subscribe({next:r=>{this.saving=!1,"create"===this.mode&&this.createKey?(this.apiKey=r??null,this.apiKey&&(this.data.store.createdApiKey=this.apiKey),this.done=!0):this.dialogRef.close(!0)},error:r=>{this.saving=!1,this.error=(0,De.cQ)(r).message}})}copyKey(){this.apiKey&&navigator.clipboard?.writeText(this.apiKey).catch(()=>{})}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(h.CP),e.rXU(h.Vh),e.rXU(Bn))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-mcp-access-editor"]],standalone:!0,features:[e.aNF],decls:7,vars:5,consts:[["data-testid","mcp-access-editor",1,"mcp-acc-editor"],[1,"mcp-acc-hint"],[4,"ngIf"],[1,"mcp-acc-created"],["class","mcp-acc-keybox",4,"ngIf"],["class","mcp-acc-hint",4,"ngIf"],[1,"mcp-acc-actions"],["mat-flat-button","","color","primary","type","button",3,"click"],[1,"mcp-acc-keybox"],["data-testid","mcp-access-key"],["mat-stroked-button","","type","button",3,"click"],[1,"mcp-acc-top"],["appearance","outline","subscriptSizing","dynamic",4,"ngIf"],["color","primary","name","createKey","data-testid","mcp-access-createkey",3,"ngModel","ngModelChange",4,"ngIf"],["class","mcp-acc-role",4,"ngIf"],["type","search","class","mcp-acc-filter","name","filter","placeholder","Filter services\u2026","aria-label","Filter services",3,"ngModel","ngModelChange",4,"ngIf"],["class","mcp-acc-warn",4,"ngIf"],[4,"ngFor","ngForOf","ngForTrackBy"],["data-testid","mcp-access-summary",1,"mcp-acc-summary"],["class","mcp-acc-error",4,"ngIf"],["mat-button","","type","button",3,"click"],["mat-flat-button","","color","primary","type","button","data-testid","mcp-access-save",3,"disabled","click"],["appearance","outline","subscriptSizing","dynamic"],["data-testid","mcp-access-role",3,"value","selectionChange"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["matInput","","name","name","data-testid","mcp-access-name",3,"ngModel","ngModelChange"],["color","primary","name","createKey","data-testid","mcp-access-createkey",3,"ngModel","ngModelChange"],[1,"mcp-acc-role"],[3,"routerLink","click"],["type","search","name","filter","placeholder","Filter services\u2026","aria-label","Filter services",1,"mcp-acc-filter",3,"ngModel","ngModelChange"],[1,"mcp-acc-warn"],["class","mcp-acc-group",4,"ngIf"],[1,"mcp-acc-group"],[1,"mcp-acc-group-hd"],["mat-button","","type","button",3,"disabled","click"],[1,"mcp-acc-row"],[1,"mcp-acc-name"],["class","mcp-acc-why",4,"ngIf"],["class","mcp-acc-ctl",4,"ngIf"],["class","mcp-acc-tables",4,"ngIf"],[1,"mcp-acc-why"],[1,"mcp-acc-ctl"],["type","button","class","mcp-linklike","data-testid","mcp-limit-tables",3,"click",4,"ngIf"],["role","radiogroup",1,"mcp-acc-seg"],["type","button","role","radio","class","mcp-acc-opt",3,"on","disabled","matTooltip","click",4,"ngFor","ngForOf"],["type","button","data-testid","mcp-limit-tables",1,"mcp-linklike",3,"click"],["type","button","role","radio",1,"mcp-acc-opt",3,"disabled","matTooltip","click"],[1,"mcp-acc-tables"],["type","search","class","mcp-acc-filter","placeholder","Filter tables\u2026","aria-label","Filter tables",3,"ngModel","name","ngModelChange",4,"ngIf"],[1,"mcp-acc-tlist"],["color","primary",3,"checked","change",4,"ngFor","ngForOf"],["type","search","placeholder","Filter tables\u2026","aria-label","Filter tables",1,"mcp-acc-filter",3,"ngModel","name","ngModelChange"],["color","primary",3,"checked","change"],[1,"mcp-acc-error"]],template:function(o,i){1&o&&(e.j41(0,"div",0)(1,"h2"),e.EFF(2),e.k0s(),e.j41(3,"p",1),e.EFF(4),e.k0s(),e.DNE(5,fm,8,3,"ng-container",2),e.DNE(6,Vm,19,14,"ng-container",2),e.k0s()),2&o&&(e.BMQ("data-mode",i.mode),e.R7$(2),e.JRh(i.title),e.R7$(2),e.JRh(i.hint),e.R7$(1),e.Y8G("ngIf",i.done),e.R7$(1),e.Y8G("ngIf",!i.done))},dependencies:[d.MD,d.Sq,d.bT,m.YN,m.me,m.BC,m.vS,u.Hl,u.$z,j.g7,j.So,h.hM,O.RG,O.rl,O.nJ,E.fS,E.fg,G.Ve,G.VO,q.wT,S.uc,S.oV,N.Wk],styles:[".mcp-acc-editor[_ngcontent-%COMP%]{padding:18px 20px 14px;font-family:Inter,Helvetica Neue,sans-serif;font-size:13px}.mcp-acc-editor[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0 0 4px;font-size:16px;font-weight:700}.mcp-acc-hint[_ngcontent-%COMP%]{font-size:12.5px;opacity:.75;margin:0 0 10px}.mcp-acc-warn[_ngcontent-%COMP%]{font-size:12.5px;background:var(--df-warning-soft);border:1px solid color-mix(in srgb,var(--df-warning) 40%,transparent);border-radius:8px;padding:6px 10px;margin:0 0 10px}.mcp-acc-top[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-bottom:10px}.mcp-acc-role[_ngcontent-%COMP%]{display:inline-flex;gap:10px;align-items:center}.mcp-acc-role[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--df-accent);font-weight:600;text-decoration:none}.mcp-acc-filter[_ngcontent-%COMP%]{padding:6px 10px;border:1px solid color-mix(in srgb,var(--df-text) 20%,transparent);border-radius:6px;font:inherit;min-width:200px}.mcp-acc-group[_ngcontent-%COMP%]{border:1px solid color-mix(in srgb,var(--df-text) 8%,transparent);border-radius:10px;margin-bottom:10px;padding:4px 12px 8px}.mcp-acc-group-hd[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;font-size:11.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.8}.mcp-acc-row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;padding:6px 0;border-top:1px solid color-mix(in srgb,var(--df-text) 5%,transparent)}.mcp-acc-name[_ngcontent-%COMP%]{flex:1 1 180px;display:flex;gap:8px;align-items:baseline;min-width:0}.mcp-acc-name[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-size:11.5px;opacity:.65}.mcp-acc-why[_ngcontent-%COMP%]{font-size:12px;opacity:.7;font-style:italic}.mcp-acc-ctl[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px}.mcp-acc-seg[_ngcontent-%COMP%]{display:inline-flex;border:1px solid color-mix(in srgb,var(--df-text) 18%,transparent);border-radius:8px;overflow:hidden}.mcp-acc-opt[_ngcontent-%COMP%]{border:0;background:var(--df-surface);padding:4px 10px;font:inherit;font-size:12px;cursor:pointer;white-space:nowrap}.mcp-acc-opt[_ngcontent-%COMP%] + .mcp-acc-opt[_ngcontent-%COMP%]{border-left:1px solid color-mix(in srgb,var(--df-text) 12%,transparent)}.mcp-acc-opt.on[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--df-accent) 14%,transparent);color:var(--df-accent);font-weight:700}.mcp-acc-opt[_ngcontent-%COMP%]:disabled{cursor:not-allowed;opacity:.45}.mcp-linklike[_ngcontent-%COMP%]{background:none;border:0;padding:0;font:inherit;font-size:12px;color:var(--df-accent);cursor:pointer}.mcp-acc-tables[_ngcontent-%COMP%]{padding:4px 0 8px 14px}.mcp-acc-tlist[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));max-height:220px;overflow:auto}.mcp-acc-summary[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--df-accent) 7%,transparent);border-radius:8px;padding:8px 12px;margin:6px 0 4px}.mcp-acc-error[_ngcontent-%COMP%]{color:var(--df-danger);margin:4px 0}.mcp-acc-created[_ngcontent-%COMP%]{font-weight:600}.mcp-acc-keybox[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:8px;background:var(--df-warning-soft);border:1px solid color-mix(in srgb,var(--df-warning) 40%,transparent);border-radius:8px;padding:10px 12px}.mcp-acc-keybox[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{word-break:break-all;-webkit-user-select:all;user-select:all}.mcp-acc-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;align-items:center;flex-wrap:wrap;gap:8px;margin-top:12px}.mcp-acc-actions[_ngcontent-%COMP%] .mcp-acc-hint[_ngcontent-%COMP%]{margin:0 auto 0 0}"]})}}return n})();function zm(n,a){1&n&&(e.j41(0,"p",9),e.EFF(1," \u26a0 Require role access is off: any logged-in user can connect. Roles below only limit what data calls may touch. "),e.k0s())}function Bm(n,a){1&n&&(e.j41(0,"p",2),e.EFF(1,"Loading roles\u2026"),e.k0s())}function Lm(n,a){1&n&&(e.j41(0,"p",2),e.EFF(1," Request counts unavailable; roles shown from their grants. "),e.k0s())}function Um(n,a){if(1&n){const t=e.RV6();e.j41(0,"button",20),e.bIt("click",function(){e.eBV(t);const i=e.XpG().$implicit,r=e.XpG(3);return e.Njj(r.open("edit",i))}),e.EFF(1," Edit "),e.k0s()}}function qm(n,a){if(1&n&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"slice"),e.k0s()),2&n){const t=e.XpG().$implicit;e.R7$(1),e.SpI("last seen ",e.brH(2,1,t.lastSeen,0,16),"")}}function Km(n,a){if(1&n&&(e.j41(0,"span",21),e.EFF(1),e.k0s()),2&n){const t=e.XpG().$implicit;e.Y8G("matTooltip","API key (app) bound to this role"),e.R7$(1),e.SpI("\u{1f511} ",t.keyName,"")}}const Un=function(n,a){return[n,a]};function Jm(n,a){if(1&n&&(e.j41(0,"li",13)(1,"div",14)(2,"a",15),e.EFF(3),e.k0s(),e.j41(4,"span",16),e.EFF(5,"granted"),e.k0s(),e.DNE(6,Um,2,0,"button",17),e.k0s(),e.j41(7,"div",18)(8,"span"),e.EFF(9),e.k0s(),e.j41(10,"span"),e.EFF(11),e.k0s(),e.DNE(12,qm,3,5,"span",5),e.DNE(13,Km,2,2,"span",19),e.k0s()()),2&n){const t=a.$implicit,o=e.XpG(3);e.BMQ("data-role",t.name),e.R7$(2),e.Y8G("routerLink",e.l_i(11,Un,o.roleRoute,t.roleId)),e.R7$(1),e.JRh(t.name),e.R7$(3),e.Y8G("ngIf",t.exists),e.R7$(3),e.Lme("",t.requests," ",1===t.requests?"request":"requests",""),e.R7$(1),e.AVh("mcp-access-denied",t.denied>0),e.R7$(1),e.SpI("",t.denied," denied"),e.R7$(1),e.Y8G("ngIf",t.lastSeen),e.R7$(1),e.Y8G("ngIf",t.keyName)}}function Hm(n,a){if(1&n&&(e.j41(0,"ul",11),e.DNE(1,Jm,14,14,"li",12),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.Y8G("ngForOf",t.granted)("ngForTrackBy",t.trackByRole)}}function Wm(n,a){if(1&n&&(e.j41(0,"p",2),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.SpI(" ",t.requireRoleAccess?"No role can connect yet. Add a role or create one.":"No role holds a grant on this server."," ")}}function Qm(n,a){if(1&n&&(e.j41(0,"a",15),e.EFF(1),e.k0s()),2&n){const t=e.XpG().$implicit,o=e.XpG(3);e.Y8G("routerLink",e.l_i(2,Un,o.roleRoute,t.roleId)),e.R7$(1),e.JRh(t.name)}}function Zm(n,a){if(1&n&&(e.j41(0,"span",28),e.EFF(1),e.k0s()),2&n){const t=e.XpG().$implicit;e.R7$(1),e.SpI("",t.name," (deleted)")}}function e_(n,a){if(1&n){const t=e.RV6();e.j41(0,"button",29),e.bIt("click",function(){e.eBV(t);const i=e.XpG().$implicit,r=e.XpG(3);return e.Njj(r.grant(i))}),e.EFF(1," Grant "),e.k0s()}if(2&n){const t=e.XpG().$implicit,o=e.XpG(3);e.Y8G("disabled",o.granting===t.roleId)}}function t_(n,a){if(1&n&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"slice"),e.k0s()),2&n){const t=e.XpG().$implicit;e.R7$(1),e.SpI("last seen ",e.brH(2,1,t.lastSeen,0,16),"")}}function n_(n,a){if(1&n&&(e.j41(0,"li",24)(1,"div",14),e.DNE(2,Qm,2,5,"a",25),e.DNE(3,Zm,2,1,"span",26),e.DNE(4,e_,2,1,"button",27),e.k0s(),e.j41(5,"div",18)(6,"span"),e.EFF(7),e.k0s(),e.j41(8,"span"),e.EFF(9),e.k0s(),e.DNE(10,t_,3,5,"span",5),e.k0s()()),2&n){const t=a.$implicit;e.BMQ("data-role",t.name),e.R7$(2),e.Y8G("ngIf",t.exists),e.R7$(1),e.Y8G("ngIf",!t.exists),e.R7$(1),e.Y8G("ngIf",t.exists),e.R7$(3),e.Lme("",t.requests," ",1===t.requests?"request":"requests",""),e.R7$(1),e.AVh("mcp-access-denied",t.denied>0),e.R7$(1),e.SpI("",t.denied," denied"),e.R7$(1),e.Y8G("ngIf",t.lastSeen)}}function o_(n,a){if(1&n&&(e.qex(0),e.j41(1,"h3",22),e.EFF(2,"Seen in the last 30 days without a grant"),e.k0s(),e.j41(3,"ul",11),e.DNE(4,n_,11,10,"li",23),e.k0s(),e.bVm()),2&n){const t=e.XpG(2);e.R7$(4),e.Y8G("ngForOf",t.seen)("ngForTrackBy",t.trackByRole)}}function i_(n,a){if(1&n&&(e.qex(0),e.DNE(1,Lm,2,0,"p",4),e.DNE(2,Hm,2,2,"ul",10),e.DNE(3,Wm,2,1,"p",4),e.DNE(4,o_,5,2,"ng-container",5),e.bVm()),2&n){const t=e.XpG();e.R7$(1),e.Y8G("ngIf",!t.access),e.R7$(1),e.Y8G("ngIf",t.granted.length>0),e.R7$(1),e.Y8G("ngIf",0===t.granted.length),e.R7$(1),e.Y8G("ngIf",t.seen.length>0)}}let r_=(()=>{class n{constructor(t,o,i){this.api=t,this.dialog=o,this.snackbar=i,this.roleRoute=Ln,this.loading=!1,this.access=null,this.roles=[],this.apps=[],this.rows=[],this.granting=null,this.trackByRole=(r,c)=>c.roleId}ngOnChanges(t){t.store&&this.load()}load(){const t=this.store?.service?.id;null!=t&&(this.loading=!0,(0,ue.p)({access:this.api.access(t),roles:this.api.roles(),apps:this.api.apps()}).subscribe(({access:o,roles:i,apps:r})=>{this.access=o,this.roles=i,this.apps=r,this.rows=function a_(n,a,t,o){const i=c=>o.find(s=>s.roleId===c)?.name??null,r=new Map;for(const c of a?.roles??[])r.set(c.role_id,{roleId:c.role_id,name:c.name,granted:!!c.granted,requests:c.requests??0,denied:c.denied??0,lastSeen:c.last_seen??null,keyName:i(c.role_id),exists:t.some(s=>s.id===c.role_id)});for(const c of t)r.has(c.id)||"none"!==it(c.rows,[n])[n].level&&r.set(c.id,{roleId:c.id,name:c.name,granted:!0,requests:0,denied:0,lastSeen:null,keyName:i(c.id),exists:!0});return[...r.values()].sort((c,s)=>c.granted===s.granted?s.requests-c.requests:c.granted?-1:1)}(t,o,i,r),this.loading=!1}))}get granted(){return this.rows.filter(t=>t.granted)}get seen(){return this.rows.filter(t=>!t.granted)}get requireRoleAccess(){return this.access?.require_role_access??zn(this.store.cfg.rest,"require_role_access","requireRoleAccess",!1)}get allowWrites(){return zn(this.store.cfg.rest,"allow_writes","allowWrites",!0)}backends(){return this.store.rows().map(t=>t.svc).filter(t=>!!t&&null!=t.id)}grant(t){const o=this.roles.find(r=>r.id===t.roleId);if(!o)return;const i=function dm(n,a){return"none"!==it(a,[n])[n].level?[]:Xn([{serviceId:n,label:"",before:"none",after:"read"}],a)}(this.store.service.id,o.rows);if(0===i.length)return this.load();this.granting=t.roleId,this.api.patchRoleAccess(o.id,i).subscribe({next:()=>{this.granting=null,this.snackbar.openSnackBar(`${t.name} can now connect to this server.`,"success"),this.load()},error:r=>{this.granting=null,this.snackbar.openSnackBar((0,De.cQ)(r).message,"error")}})}open(t,o){const i={store:this.store,mode:t,backends:this.backends(),allowWrites:this.allowWrites,roles:this.roles,role:o?this.roles.find(r=>r.id===o.roleId):void 0,grantedIds:new Set(this.granted.map(r=>r.roleId))};this.dialog.open(Xm,{data:i,width:"720px",maxWidth:"95vw",disableClose:!0}).afterClosed().subscribe(r=>{r&&(this.store.touch(),this.load())})}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(Bn),e.rXU(h.bZ),e.rXU(pe.L))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-mcp-access"]],inputs:{store:"store"},standalone:!0,features:[e.OA$,e.aNF],decls:13,vars:3,consts:[["data-testid","mcp-access",1,"mcp-access"],[1,"mcp-rail-title"],[1,"mcp-access-note"],["class","mcp-access-warn","data-testid","mcp-access-open",4,"ngIf"],["class","mcp-access-note",4,"ngIf"],[4,"ngIf"],[1,"mcp-access-actions"],["mat-stroked-button","","type","button","data-testid","mcp-access-add",3,"click"],["mat-flat-button","","color","primary","type","button","data-testid","mcp-access-create",3,"click"],["data-testid","mcp-access-open",1,"mcp-access-warn"],["class","mcp-access-list",4,"ngIf"],[1,"mcp-access-list"],["data-testid","mcp-access-granted",4,"ngFor","ngForOf","ngForTrackBy"],["data-testid","mcp-access-granted"],[1,"mcp-access-line"],[1,"mcp-access-name",3,"routerLink"],[1,"mcp-chip","good"],["type","button","class","mcp-linklike","data-testid","mcp-access-edit",3,"click",4,"ngIf"],[1,"mcp-access-stats"],[3,"matTooltip",4,"ngIf"],["type","button","data-testid","mcp-access-edit",1,"mcp-linklike",3,"click"],[3,"matTooltip"],[1,"mcp-access-sub"],["data-testid","mcp-access-seen",4,"ngFor","ngForOf","ngForTrackBy"],["data-testid","mcp-access-seen"],["class","mcp-access-name",3,"routerLink",4,"ngIf"],["class","mcp-access-name","matTooltip","This role no longer exists",4,"ngIf"],["mat-stroked-button","","type","button","class","mcp-access-grant","data-testid","mcp-access-grant",3,"disabled","click",4,"ngIf"],["matTooltip","This role no longer exists",1,"mcp-access-name"],["mat-stroked-button","","type","button","data-testid","mcp-access-grant",1,"mcp-access-grant",3,"disabled","click"]],template:function(o,i){1&o&&(e.j41(0,"section",0)(1,"h2",1),e.EFF(2,"Access"),e.k0s(),e.j41(3,"p",2),e.EFF(4," Roles filter further per caller \u2014 a role also needs access to each exposed service it should reach. "),e.k0s(),e.DNE(5,zm,2,0,"p",3),e.DNE(6,Bm,2,0,"p",4),e.DNE(7,i_,5,4,"ng-container",5),e.j41(8,"div",6)(9,"button",7),e.bIt("click",function(){return i.open("add")}),e.EFF(10," Add existing role "),e.k0s(),e.j41(11,"button",8),e.bIt("click",function(){return i.open("create")}),e.EFF(12," Create role "),e.k0s()()()),2&o&&(e.R7$(5),e.Y8G("ngIf",!i.requireRoleAccess),e.R7$(1),e.Y8G("ngIf",i.loading),e.R7$(1),e.Y8G("ngIf",!i.loading))},dependencies:[d.MD,d.Sq,d.bT,d.P9,u.Hl,u.$z,h.hM,S.uc,S.oV,N.Wk],styles:['@charset "UTF-8";.mcp-access[_ngcontent-%COMP%]{border-top:1px solid color-mix(in srgb,var(--df-text) 8%,transparent);padding-top:10px;margin-top:8px;font-size:12.5px}.mcp-rail-title[_ngcontent-%COMP%]{font-size:11.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.7;margin:0 0 6px}.mcp-access-note[_ngcontent-%COMP%]{opacity:.75;margin:0 0 8px}.mcp-access-warn[_ngcontent-%COMP%]{background:var(--df-warning-soft);border:1px solid color-mix(in srgb,var(--df-warning) 40%,transparent);border-radius:8px;padding:6px 8px;margin:0 0 8px}.mcp-access-sub[_ngcontent-%COMP%]{font-size:12px;font-weight:700;margin:10px 0 4px}.mcp-access-list[_ngcontent-%COMP%]{list-style:none;padding:0;margin:0 0 8px}.mcp-access-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{padding:5px 0;border-bottom:1px solid color-mix(in srgb,var(--df-text) 5%,transparent)}.mcp-access-line[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px}.mcp-access-name[_ngcontent-%COMP%]{font-weight:600;color:inherit;text-decoration:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-right:auto}.mcp-access-name[_ngcontent-%COMP%]:hover{text-decoration:underline}.mcp-access-stats[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:2px 10px;font-size:11.5px;opacity:.75;font-variant-numeric:tabular-nums}.mcp-access-denied[_ngcontent-%COMP%]{color:var(--df-danger);opacity:1}.mcp-access-actions[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:6px}.mcp-linklike[_ngcontent-%COMP%]{background:none;border:0;padding:0;font:inherit;color:var(--df-accent);font-weight:600;cursor:pointer}.mcp-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;padding:1px 7px;border-radius:999px;font-size:11px;font-weight:600;border:1px solid color-mix(in srgb,var(--df-text) 14%,transparent);white-space:nowrap}.mcp-chip.good[_ngcontent-%COMP%]{background:var(--df-success-soft);border-color:color-mix(in srgb,var(--df-success) 35%,transparent);color:var(--df-success)}']})}}return n})();function c_(n,a){1&n&&(e.j41(0,"mat-error"),e.EFF(1," A name is required. "),e.k0s())}function s_(n,a){1&n&&(e.j41(0,"mat-error"),e.EFF(1," Letters, numbers and underscores only. "),e.k0s())}function l_(n,a){if(1&n&&(e.j41(0,"mat-error"),e.EFF(1),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.SpI(" A tool named ",t.form.controls.name.value," already exists. Choose another name. ")}}function d_(n,a){if(1&n&&(e.j41(0,"mat-option",23),e.EFF(1),e.k0s()),2&n){const t=a.$implicit;e.Y8G("value",t),e.R7$(1),e.JRh(t)}}function p_(n,a){1&n&&(e.j41(0,"mat-error"),e.EFF(1," A URL is required for an API tool. "),e.k0s())}function m_(n,a){1&n&&(e.j41(0,"mat-error"),e.EFF(1," Not valid JSON. "),e.k0s())}function __(n,a){1&n&&(e.j41(0,"mat-error"),e.EFF(1," Not valid JSON. "),e.k0s())}function g_(n,a){if(1&n&&(e.qex(0),e.j41(1,"div",15)(2,"mat-form-field",16)(3,"mat-label"),e.EFF(4,"Method"),e.k0s(),e.j41(5,"mat-select",17),e.DNE(6,d_,2,2,"mat-option",18),e.k0s()(),e.j41(7,"mat-form-field",19)(8,"mat-label"),e.EFF(9,"URL"),e.k0s(),e.nrm(10,"input",20),e.DNE(11,p_,2,0,"mat-error",9),e.k0s()(),e.j41(12,"mat-form-field",7)(13,"mat-label"),e.EFF(14,"Parameters (JSON, optional)"),e.k0s(),e.nrm(15,"textarea",21),e.DNE(16,m_,2,0,"mat-error",9),e.k0s(),e.j41(17,"mat-form-field",7)(18,"mat-label"),e.EFF(19,"Headers (JSON, optional)"),e.k0s(),e.nrm(20,"textarea",22),e.DNE(21,__,2,0,"mat-error",9),e.k0s(),e.bVm()),2&n){const t=e.XpG();e.R7$(6),e.Y8G("ngForOf",t.methods),e.R7$(5),e.Y8G("ngIf",t.form.controls.url.hasError("required")),e.R7$(5),e.Y8G("ngIf",t.form.controls.parameters.hasError("json")),e.R7$(5),e.Y8G("ngIf",t.form.controls.headers.hasError("json"))}}function f_(n,a){1&n&&(e.j41(0,"mat-error"),e.EFF(1," Function code is required for a function tool. "),e.k0s())}function u_(n,a){if(1&n&&(e.j41(0,"mat-form-field",7)(1,"mat-label"),e.EFF(2,"Function code"),e.k0s(),e.nrm(3,"textarea",24),e.DNE(4,f_,2,0,"mat-error",9),e.k0s()),2&n){const t=e.XpG();e.R7$(4),e.Y8G("ngIf",t.form.controls.functionCode.hasError("required"))}}let qn=(()=>{class n{constructor(t,o,i){this.dialogRef=t,this.data=o,this.fb=i,this.methods=["GET","POST","PUT","PATCH","DELETE"],this.takenNames=new Set}ngOnInit(){const t=this.data.tool;this.takenNames=function h_(n,a){const t=new Set;ye.forEach(i=>t.add(i.verb)),Pt.forEach(i=>t.add(i.verb));const o=n.effective().effectiveStyle;for(const i of n.rows())if(i.svc)for(const r of $(i.svc.kind))t.add($t(o,i.svc.name,r.verb));for(const i of n.cfg.customTools??[])i?.name&&i.name!==a&&t.add(i.name);return t}(this.data.store,t?.name),this.form=this.fb.group({toolType:[t?.toolType||"api"],name:[t?.name??"",[m.k0.required,m.k0.pattern(/^[a-zA-Z0-9_]+$/),o=>this.takenNames.has(o.value)?{collision:!0}:null]],description:[t?.description??""],httpMethod:[t?.httpMethod||"GET"],url:[t?.url??""],parameters:[this.toJsonText(t?.parameters)],headers:[this.toJsonText(t?.headers)],functionCode:[t?.function??""]}),this.dialogRef.keydownEvents().subscribe(o=>{"Escape"===o.key&&this.attemptDismiss()}),this.dialogRef.backdropClick().subscribe(()=>this.attemptDismiss())}attemptDismiss(){(!this.form.dirty||window.confirm("Discard this custom tool? Your unsaved edits will be lost."))&&this.dialogRef.close()}toJsonText(t){if(null==t||""===t)return"";if("string"==typeof t)return t;try{return JSON.stringify(t,null,2)}catch{return""}}parseJson(t){const o=(t??"").trim();if(!o)return null;try{return JSON.parse(o)}catch{return}}save(){const t=this.form.value,o="api"===t.toolType;this.form.controls.url.setErrors(o&&!(t.url??"").trim()?{required:!0}:null),this.form.controls.functionCode.setErrors(o||(t.functionCode??"").trim()?null:{required:!0});let i=null,r=null;if(o&&(i=this.parseJson(t.parameters),r=this.parseJson(t.headers),this.form.controls.parameters.setErrors(void 0===i?{json:!0}:null),this.form.controls.headers.setErrors(void 0===r?{json:!0}:null)),this.form.markAllAsTouched(),this.form.invalid)return;const c=this.data.tool??{};this.dialogRef.close({...c,toolType:t.toolType,name:t.name,description:t.description??"",httpMethod:o?t.httpMethod:c.httpMethod??"GET",url:o?t.url:c.url??"",parameters:o?i:c.parameters??null,headers:o?r:c.headers??null,function:o?c.function??"":t.functionCode,enabled:!1!==c.enabled&&0!==c.enabled})}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(h.CP),e.rXU(h.Vh),e.rXU(m.ok))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-mcp-custom-tool-dialog"]],standalone:!0,features:[e.aNF],decls:30,vars:8,consts:[["data-testid","mcp-custom-dialog",1,"mcp-ct-dialog"],[3,"formGroup","ngSubmit"],[1,"mcp-ct-type"],[1,"mcp-ct-type-label"],["formControlName","toolType"],["value","api"],["value","function"],["appearance","outline",1,"mcp-ct-field"],["matInput","","formControlName","name","data-testid","mcp-custom-name"],[4,"ngIf"],["matInput","","formControlName","description"],["appearance","outline","class","mcp-ct-field",4,"ngIf"],[1,"mcp-ct-actions"],["mat-button","","type","button",3,"click"],["mat-flat-button","","color","primary","type","submit","data-testid","mcp-custom-save"],[1,"mcp-ct-api-row"],["appearance","outline",1,"mcp-ct-method"],["formControlName","httpMethod"],[3,"value",4,"ngFor","ngForOf"],["appearance","outline",1,"mcp-ct-url"],["matInput","","formControlName","url","placeholder","https://\u2026"],["matInput","","formControlName","parameters","rows","3"],["matInput","","formControlName","headers","rows","3"],[3,"value"],["matInput","","formControlName","functionCode","rows","8"]],template:function(o,i){1&o&&(e.j41(0,"div",0)(1,"h2"),e.EFF(2),e.k0s(),e.j41(3,"form",1),e.bIt("ngSubmit",function(){return i.save()}),e.j41(4,"div",2)(5,"span",3),e.EFF(6,"Tool type:"),e.k0s(),e.j41(7,"mat-radio-group",4)(8,"mat-radio-button",5),e.EFF(9,"API endpoint"),e.k0s(),e.j41(10,"mat-radio-button",6),e.EFF(11,"Server-side function"),e.k0s()()(),e.j41(12,"mat-form-field",7)(13,"mat-label"),e.EFF(14,"Name"),e.k0s(),e.nrm(15,"input",8),e.DNE(16,c_,2,0,"mat-error",9),e.DNE(17,s_,2,0,"mat-error",9),e.DNE(18,l_,2,1,"mat-error",9),e.k0s(),e.j41(19,"mat-form-field",7)(20,"mat-label"),e.EFF(21,"Description"),e.k0s(),e.nrm(22,"input",10),e.k0s(),e.DNE(23,g_,22,4,"ng-container",9),e.DNE(24,u_,5,1,"mat-form-field",11),e.j41(25,"div",12)(26,"button",13),e.bIt("click",function(){return i.dialogRef.close()}),e.EFF(27," Cancel "),e.k0s(),e.j41(28,"button",14),e.EFF(29),e.k0s()()()()),2&o&&(e.R7$(2),e.JRh(i.data.tool?"Edit custom tool":"Add custom tool"),e.R7$(1),e.Y8G("formGroup",i.form),e.R7$(13),e.Y8G("ngIf",i.form.controls.name.hasError("required")),e.R7$(1),e.Y8G("ngIf",i.form.controls.name.hasError("pattern")),e.R7$(1),e.Y8G("ngIf",i.form.controls.name.hasError("collision")),e.R7$(5),e.Y8G("ngIf","api"===i.form.controls.toolType.value),e.R7$(1),e.Y8G("ngIf","function"===i.form.controls.toolType.value),e.R7$(5),e.SpI(" ",i.data.tool?"Save tool":"Add tool"," "))},dependencies:[d.MD,d.Sq,d.bT,m.X1,m.qT,m.me,m.BC,m.cb,m.j4,m.JD,u.Hl,u.$z,h.hM,O.RG,O.rl,O.nJ,O.TL,E.fS,E.fg,J.Wk,J.VT,J._g,G.Ve,G.VO,q.wT],styles:[".mcp-ct-dialog[_ngcontent-%COMP%]{padding:18px 20px 14px;font-family:Inter,Helvetica Neue,sans-serif;min-width:320px;max-width:520px}h2[_ngcontent-%COMP%]{margin:0 0 12px;font-size:16px;font-weight:700}.mcp-ct-type[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:12px;font-size:13px}.mcp-ct-type-label[_ngcontent-%COMP%]{font-weight:600}.mcp-ct-field[_ngcontent-%COMP%]{width:100%}.mcp-ct-api-row[_ngcontent-%COMP%]{display:flex;gap:10px;flex-wrap:wrap}.mcp-ct-method[_ngcontent-%COMP%]{width:130px}.mcp-ct-url[_ngcontent-%COMP%]{flex:1;min-width:180px}.mcp-ct-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:8px;margin-top:4px}"]})}}return n})(),b_=(()=>{class n{constructor(t,o){this.dialogRef=t,this.data=o,this.clear=!1}get title(){return 1===this.data.names.length?`Remove ${this.data.names[0]} from this server?`:`Remove ${this.data.names.length} services from this server?`}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(h.CP),e.rXU(h.Vh))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-mcp-remove-dialog"]],standalone:!0,features:[e.aNF],decls:15,vars:7,consts:[[1,"mcp-remove-dialog"],[1,"mcp-remove-choices",3,"ngModel","ngModelChange"],[3,"value"],[1,"mcp-remove-note"],[1,"mcp-remove-actions"],["mat-button","","type","button",3,"click"],["mat-flat-button","","color","warn","type","button","data-testid","mcp-remove-confirm",3,"click"]],template:function(o,i){1&o&&(e.j41(0,"div",0)(1,"h2"),e.EFF(2),e.k0s(),e.j41(3,"mat-radio-group",1),e.bIt("ngModelChange",function(c){return i.clear=c}),e.j41(4,"mat-radio-button",2),e.EFF(5),e.k0s(),e.j41(6,"mat-radio-button",2),e.EFF(7),e.k0s()(),e.j41(8,"p",3),e.EFF(9),e.k0s(),e.j41(10,"div",4)(11,"button",5),e.bIt("click",function(){return i.dialogRef.close()}),e.EFF(12," Cancel "),e.k0s(),e.j41(13,"button",6),e.bIt("click",function(){return i.dialogRef.close({clear:i.clear})}),e.EFF(14," Remove from server "),e.k0s()()()),2&o&&(e.R7$(2),e.JRh(i.title),e.R7$(1),e.Y8G("ngModel",i.clear),e.R7$(1),e.Y8G("value",!1),e.R7$(1),e.SpI(" ",1===i.data.names.length?"Keep its tool curation (recommended)":"Keep their tool curation (recommended)"," "),e.R7$(1),e.Y8G("value",!0),e.R7$(1),e.SpI(" ",1===i.data.names.length?"Also clear its saved tool settings":"Also clear their saved tool settings"," "),e.R7$(2),e.SpI(" Kept curation restores automatically if you expose ",1===i.data.names.length?"the service":"a service"," again. "))},dependencies:[d.MD,m.YN,m.BC,m.vS,u.Hl,u.$z,h.hM,J.Wk,J.VT,J._g],styles:[".mcp-remove-dialog[_ngcontent-%COMP%]{padding:18px 20px 14px;font-family:Inter,Helvetica Neue,sans-serif;max-width:420px}h2[_ngcontent-%COMP%]{margin:0 0 10px;font-size:16px;font-weight:700}.mcp-remove-choices[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px}.mcp-remove-note[_ngcontent-%COMP%]{font-size:12.5px;opacity:.7;margin:8px 0 0}.mcp-remove-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:8px;margin-top:14px}"]})}}return n})();function v_(n,a){if(1&n&&(e.j41(0,"mat-option",9),e.EFF(1),e.k0s()),2&n){const t=a.$implicit;e.Y8G("value",t.name),e.R7$(1),e.Lme(" ",t.label," (",t.name,") ")}}function x_(n,a){if(1&n&&(e.j41(0,"p",10),e.EFF(1),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.LHq(" Point this entry at ",t.newName," and rename its ",t.keyCount()," saved tool settings (",t.data.oldName,"_* \u2192 ",t.newName,"_*)? ")}}let C_=(()=>{class n{constructor(t,o){this.dialogRef=t,this.data=o,this.newName=void 0}candidates(){return this.data.store.backendServices.filter(t=>!this.data.store.cfg.exposedServices.includes(t.name))}keyCount(){return this.data.store.dormantCurationCount(this.data.oldName)}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(h.CP),e.rXU(h.Vh))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-mcp-rename-dialog"]],standalone:!0,features:[e.aNF],decls:16,vars:5,consts:[[1,"mcp-rename-dialog"],[1,"mcp-rename-intro"],["appearance","outline",1,"mcp-rename-field"],["data-testid","mcp-rename-select",3,"ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],["class","mcp-rename-preview",4,"ngIf"],[1,"mcp-rename-actions"],["mat-button","","type","button",3,"click"],["mat-flat-button","","color","primary","type","button","data-testid","mcp-rename-confirm",3,"disabled","click"],[3,"value"],[1,"mcp-rename-preview"]],template:function(o,i){1&o&&(e.j41(0,"div",0)(1,"h2"),e.EFF(2,"Point this entry at its renamed service"),e.k0s(),e.j41(3,"p",1),e.EFF(4),e.k0s(),e.j41(5,"mat-form-field",2)(6,"mat-label"),e.EFF(7,"Renamed to"),e.k0s(),e.j41(8,"mat-select",3),e.bIt("ngModelChange",function(c){return i.newName=c}),e.DNE(9,v_,2,3,"mat-option",4),e.k0s()(),e.DNE(10,x_,2,4,"p",5),e.j41(11,"div",6)(12,"button",7),e.bIt("click",function(){return i.dialogRef.close()}),e.EFF(13," Cancel "),e.k0s(),e.j41(14,"button",8),e.bIt("click",function(){return i.dialogRef.close(i.newName)}),e.EFF(15," Rename entry "),e.k0s()()()),2&o&&(e.R7$(4),e.SpI(" \u201c",i.data.oldName,"\u201d no longer exists on this instance. Pick the service it was renamed to. "),e.R7$(4),e.Y8G("ngModel",i.newName),e.R7$(1),e.Y8G("ngForOf",i.candidates()),e.R7$(1),e.Y8G("ngIf",i.newName),e.R7$(4),e.Y8G("disabled",!i.newName))},dependencies:[d.MD,d.Sq,d.bT,m.YN,m.BC,m.vS,u.Hl,u.$z,h.hM,O.RG,O.rl,O.nJ,G.Ve,G.VO,q.wT],styles:[".mcp-rename-dialog[_ngcontent-%COMP%]{padding:18px 20px 14px;font-family:Inter,Helvetica Neue,sans-serif;max-width:440px}h2[_ngcontent-%COMP%]{margin:0 0 8px;font-size:16px;font-weight:700}.mcp-rename-intro[_ngcontent-%COMP%]{font-size:13px;opacity:.8;margin:0 0 12px}.mcp-rename-field[_ngcontent-%COMP%]{width:100%}.mcp-rename-preview[_ngcontent-%COMP%]{font-size:13px;background:var(--df-warning-soft);border:1px solid color-mix(in srgb,var(--df-warning) 40%,transparent);border-radius:8px;padding:8px 12px;margin:0 0 4px}.mcp-rename-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}"]})}}return n})();function k_(n,a){1&n&&(e.j41(0,"div",3),e.EFF(1,"Loading services\u2026"),e.k0s())}function y_(n,a){1&n&&(e.j41(0,"div",24),e.EFF(1," \u26a0 This server serves no tools. Agents can connect but can call nothing. "),e.k0s())}function M_(n,a){1&n&&(e.j41(0,"span",35),e.EFF(1,"\u26a0 writes"),e.k0s())}function O_(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",38)(1,"mat-checkbox",39),e.bIt("change",function(i){const c=e.eBV(t).$implicit,s=e.XpG(5);return e.Njj(s.setBareChecked(c.name,i.checked))}),e.j41(2,"code"),e.EFF(3),e.k0s()(),e.j41(4,"span",40),e.EFF(5),e.k0s()()}if(2&n){const t=a.$implicit,o=e.XpG(5);e.R7$(1),e.Y8G("checked",o.bareEnabled(t.name)),e.R7$(2),e.JRh(t.name),e.R7$(2),e.JRh(t.description)}}function P_(n,a){if(1&n&&(e.j41(0,"div",36),e.DNE(1,O_,6,3,"div",37),e.k0s()),2&n){const t=e.XpG().$implicit;e.R7$(1),e.Y8G("ngForOf",t.tools)}}function F_(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",28)(1,"div",29)(2,"mat-checkbox",30),e.bIt("change",function(){const r=e.eBV(t).$implicit,c=e.XpG(3);return e.Njj(c.sysToggleGroup(r))}),e.EFF(3),e.k0s(),e.DNE(4,M_,2,0,"span",31),e.j41(5,"span",32),e.EFF(6),e.k0s()(),e.j41(7,"button",33),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG(3);return e.Njj(c.toggleToolsList(r.key))}),e.EFF(8),e.k0s(),e.DNE(9,P_,2,1,"div",34),e.k0s()}if(2&n){const t=a.$implicit,o=e.XpG(3);e.R7$(2),e.Y8G("checked","on"===o.sysGroupState(t))("indeterminate","part"===o.sysGroupState(t)),e.R7$(1),e.SpI(" ",t.label," "),e.R7$(1),e.Y8G("ngIf",t.warn),e.R7$(2),e.Lme(" ",o.sysGroupOn(t)," of ",t.tools.length," on "),e.R7$(2),e.Lme(" ",o.isToolsListOpen(t.key)?"\u25be":"\u25b8"," Individual tools (",t.tools.length,") "),e.R7$(1),e.Y8G("ngIf",o.isToolsListOpen(t.key))}}function w_(n,a){if(1&n&&(e.qex(0),e.j41(1,"div",25)(2,"h2"),e.EFF(3),e.k0s()(),e.j41(4,"div",26),e.DNE(5,F_,10,9,"div",27),e.k0s(),e.bVm()),2&n){const t=e.XpG(2);e.R7$(3),e.Lme(" System API tools (",t.sysEnabledCount()," of ",t.sysTotal(),") "),e.R7$(2),e.Y8G("ngForOf",t.systemGroups)}}function D_(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",62)(1,"p"),e.EFF(2),e.k0s(),e.j41(3,"div",63)(4,"button",64),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG(4);return e.Njj(c.removeServices([r.name],!0))}),e.EFF(5," Remove from server "),e.k0s(),e.j41(6,"button",64),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG(4);return e.Njj(c.renameOrphan(r.name))}),e.EFF(7," It was renamed\u2026 "),e.k0s()()()}if(2&n){const t=a.$implicit,o=e.XpG(4);e.BMQ("data-testid","mcp-orphan-row-"+t.name),e.R7$(2),e.JRh(o.orphanText(t.name))}}function T_(n,a){if(1&n&&(e.j41(0,"section",59)(1,"h2",60),e.EFF(2),e.k0s(),e.DNE(3,D_,8,2,"div",61),e.k0s()),2&n){const t=e.XpG(3);e.R7$(2),e.SpI(" \u26a0 Needs attention (",t.orphanRows().length,") "),e.R7$(1),e.Y8G("ngForOf",t.orphanRows())("ngForTrackBy",t.trackByName)}}function S_(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",65)(1,"p"),e.EFF(2),e.j41(3,"b"),e.EFF(4,"empty never means every service."),e.k0s()(),e.j41(5,"button",64),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.openPicker())}),e.EFF(6," Expose services "),e.k0s()()}if(2&n){const t=e.XpG(3);e.R7$(2),e.SpI(" No services exposed. Agents get the ",t.eff().globalTools," global tools and any custom tools \u2014 ")}}function R_(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",66)(1,"input",67),e.bIt("ngModelChange",function(i){e.eBV(t);const r=e.XpG(3);return e.Njj(r.filterText=i)}),e.k0s(),e.j41(2,"button",68),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.setFilterKind("db"))}),e.EFF(3),e.k0s(),e.j41(4,"button",68),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.setFilterKind("file"))}),e.EFF(5),e.k0s(),e.j41(6,"button",69),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.filterModified=!i.filterModified)}),e.EFF(7," Modified only "),e.k0s()()}if(2&n){const t=e.XpG(3);e.R7$(1),e.Y8G("ngModel",t.filterText),e.R7$(1),e.AVh("primary","db"===t.filterKind),e.R7$(1),e.SpI(" Databases ",t.rowCountOf("db")," "),e.R7$(1),e.AVh("primary","file"===t.filterKind),e.R7$(1),e.SpI(" Files ",t.rowCountOf("file")," "),e.R7$(1),e.AVh("primary",t.filterModified)}}const at=function(n){return[n]};function I_(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",108)(1,"span",109),e.EFF(2),e.k0s(),e.j41(3,"button",105),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG(3).$implicit,s=e.XpG(4);return e.Njj(s.toggleColumn(c.svc.kind,[r]))}),e.nrm(4,"i"),e.k0s()()}if(2&n){const t=a.$implicit,o=e.XpG(3).$implicit,i=e.XpG(4);e.R7$(2),e.JRh(t.verb),e.R7$(1),e.Y8G("matTooltip",i.columnTip(o.svc.kind,t.verb,e.eq3(5,at,t))),e.BMQ("data-state",i.columnState(o.svc.kind,e.eq3(7,at,t)))("aria-checked","on"===i.columnState(o.svc.kind,e.eq3(9,at,t)))("aria-label",i.columnTip(o.svc.kind,t.verb,e.eq3(11,at,t)))}}function E_(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",103)(1,"div",104)(2,"span"),e.EFF(3),e.k0s(),e.j41(4,"button",105),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG(2).$implicit,s=e.XpG(4);return e.Njj(s.toggleColumn(c.svc.kind,r.verbs))}),e.nrm(5,"i"),e.k0s()(),e.j41(6,"div",106),e.DNE(7,I_,5,13,"div",107),e.k0s()()}if(2&n){const t=a.$implicit,o=e.XpG(2).$implicit,i=e.XpG(4);e.AVh("write",!!t.warn),e.R7$(3),e.JRh(i.shortGroupLabel(t)),e.R7$(1),e.Y8G("matTooltip",i.columnTip(o.svc.kind,t.label,t.verbs)),e.BMQ("data-state",i.columnState(o.svc.kind,t.verbs))("aria-checked","on"===i.columnState(o.svc.kind,t.verbs))("aria-label",i.columnTip(o.svc.kind,t.label,t.verbs)),e.R7$(3),e.Y8G("ngForOf",t.verbs)}}function $_(n,a){if(1&n&&(e.j41(0,"div",98)(1,"div",99)(2,"span",100),e.EFF(3),e.k0s(),e.j41(4,"span",101),e.EFF(5,"Click a cell to turn one tool off. The switches change a whole column or group."),e.k0s()(),e.j41(6,"div",102),e.DNE(7,E_,8,8,"div",88),e.k0s(),e.nrm(8,"span",89),e.k0s()),2&n){const t=e.XpG().$implicit,o=e.XpG(4);e.BMQ("data-testid","mcp-grid-head-"+t.svc.kind),e.R7$(3),e.JRh(o.kindTitle(t.svc.kind)),e.R7$(4),e.Y8G("ngForOf",o.groupsForKind(t.svc.kind))}}function G_(n,a){if(1&n){const t=e.RV6();e.j41(0,"mat-checkbox",110),e.bIt("change",function(){e.eBV(t);const i=e.XpG().$implicit,r=e.XpG(4);return e.Njj(r.toggleSelected(i.name))})("click",function(i){return i.stopPropagation()}),e.k0s()}if(2&n){const t=e.XpG().$implicit,o=e.XpG(4);e.Y8G("checked",o.isSelected(t.name))}}function j_(n,a){1&n&&(e.j41(0,"span",111),e.EFF(1," Service inactive \u2014 tools not served "),e.k0s())}function N_(n,a){if(1&n){const t=e.RV6();e.j41(0,"button",113),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG(2).$implicit,s=e.XpG(4);return e.Njj(s.toggleCell(c.svc,r.verb))}),e.nrm(1,"i"),e.k0s()}if(2&n){const t=a.$implicit,o=e.XpG(2).$implicit,i=e.XpG(4);e.AVh("write",i.isWriteVerb(t.verb)),e.Y8G("matTooltip",i.cellTip(o.svc,t.verb)),e.BMQ("data-state",i.cellState(o.svc,t.verb))("data-testid","mcp-cell-"+o.name+"-"+t.verb)("aria-pressed",i.toolEnabled(o.svc,t.verb))("aria-label",i.cellTip(o.svc,t.verb))}}function A_(n,a){if(1&n&&(e.j41(0,"div",103)(1,"div",106),e.DNE(2,N_,2,7,"button",112),e.k0s()()),2&n){const t=a.$implicit;e.AVh("write",!!t.warn),e.R7$(2),e.Y8G("ngForOf",t.verbs)}}function Y_(n,a){if(1&n&&(e.j41(0,"button",114),e.EFF(1," Copy this selection to\u2026 "),e.k0s()),2&n){e.XpG();const t=e.sdS(45);e.Y8G("matMenuTriggerFor",t)}}function V_(n,a){if(1&n){const t=e.RV6();e.j41(0,"button",86),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG().$implicit,s=e.XpG(4);return e.Njj(s.copySelectionTo(c.svc,r))}),e.EFF(1),e.k0s()}if(2&n){const t=a.$implicit;e.R7$(1),e.Lme(" ",t.label," (",t.name,") ")}}function X_(n,a){if(1&n&&(e.j41(0,"p",120),e.EFF(1),e.k0s()),2&n){const t=e.XpG(6);e.R7$(1),e.SpI(" ",t.allOffLine," ")}}function z_(n,a){if(1&n&&(e.j41(0,"p",121),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2).$implicit,o=e.XpG(4);e.R7$(1),e.SpI(" ",o.mergedCaption(t.svc)," ")}}function B_(n,a){1&n&&(e.j41(0,"span",35),e.EFF(1,"\u26a0 writes"),e.k0s())}function L_(n,a){1&n&&(e.j41(0,"span",35),e.EFF(1,"\u26a0 executes"),e.k0s())}function U_(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",29)(1,"mat-checkbox",30),e.bIt("change",function(){const r=e.eBV(t).$implicit,c=e.XpG(2).$implicit,s=e.XpG(4);return e.Njj(s.toggleGroup(c.svc,r))}),e.EFF(2),e.k0s(),e.DNE(3,B_,2,0,"span",31),e.DNE(4,L_,2,0,"span",31),e.j41(5,"span",32),e.EFF(6),e.k0s()()}if(2&n){const t=a.$implicit,o=e.XpG(2).$implicit,i=e.XpG(4);e.R7$(1),e.Y8G("checked","on"===i.groupStateOf(o.svc,t))("indeterminate","part"===i.groupStateOf(o.svc,t)),e.R7$(1),e.SpI(" ",t.label," "),e.R7$(1),e.Y8G("ngIf","writes"===t.warn),e.R7$(1),e.Y8G("ngIf","executes"===t.warn),e.R7$(2),e.Lme(" ",i.groupOnCount(o.svc,t)," of ",t.verbs.length," on ")}}function q_(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",38)(1,"mat-checkbox",39),e.bIt("change",function(i){const c=e.eBV(t).$implicit,s=e.XpG(4).$implicit,l=e.XpG(4);return e.Njj(l.setToolChecked(s.svc,c.verb,i.checked))}),e.j41(2,"code"),e.EFF(3),e.k0s()(),e.j41(4,"span",40),e.EFF(5),e.k0s()()}if(2&n){const t=a.$implicit,o=e.XpG(4).$implicit,i=e.XpG(4);e.R7$(1),e.Y8G("checked",i.toolEnabled(o.svc,t.verb)),e.R7$(2),e.JRh(i.emittedName(o.svc,t.verb)),e.R7$(2),e.JRh(t.description)}}function K_(n,a){if(1&n&&(e.qex(0),e.DNE(1,q_,6,3,"div",37),e.bVm()),2&n){const t=a.$implicit;e.R7$(1),e.Y8G("ngForOf",t.verbs)}}function J_(n,a){if(1&n&&(e.j41(0,"div",36),e.DNE(1,K_,2,1,"ng-container",15),e.k0s()),2&n){const t=e.XpG(2).$implicit,o=e.XpG(4);e.R7$(1),e.Y8G("ngForOf",o.groupsFor(t.svc))}}function H_(n,a){if(1&n){const t=e.RV6();e.j41(0,"button",86),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG(3).$implicit,s=e.XpG(4);return e.Njj(s.copySelectionTo(c.svc,r))}),e.EFF(1),e.k0s()}if(2&n){const t=a.$implicit;e.R7$(1),e.Lme(" ",t.label," (",t.name,") ")}}function W_(n,a){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"button",122),e.EFF(2," Copy this selection to\u2026 "),e.k0s(),e.j41(3,"mat-menu",null,123),e.DNE(5,H_,2,2,"button",95),e.j41(6,"button",86),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2).$implicit,r=e.XpG(4);return e.Njj(r.copySelectionTo(i.svc,null))}),e.EFF(7," All exposed databases "),e.k0s()(),e.bVm()}if(2&n){const t=e.sdS(4),o=e.XpG(2).$implicit,i=e.XpG(4);e.R7$(1),e.Y8G("matMenuTriggerFor",t),e.R7$(4),e.Y8G("ngForOf",i.copyTargets(o.svc))("ngForTrackBy",i.trackBySvcName)}}function Q_(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",115),e.DNE(1,X_,2,1,"p",116),e.DNE(2,z_,2,1,"p",117),e.DNE(3,U_,7,7,"div",118),e.j41(4,"button",33),e.bIt("click",function(){e.eBV(t);const i=e.XpG().$implicit,r=e.XpG(4);return e.Njj(r.toggleToolsList(i.name))}),e.EFF(5),e.k0s(),e.DNE(6,J_,2,1,"div",34),e.j41(7,"div",119)(8,"button",64),e.bIt("click",function(){e.eBV(t);const i=e.XpG().$implicit,r=e.XpG(4);return e.Njj(r.setFull(i.svc))}),e.EFF(9),e.k0s(),e.DNE(10,W_,8,3,"ng-container",2),e.k0s()()}if(2&n){const t=e.XpG().$implicit,o=e.XpG(4);e.R7$(1),e.Y8G("ngIf","zero"===o.accessKind(t.svc)),e.R7$(1),e.Y8G("ngIf",o.showMergedCaption(t.svc)),e.R7$(1),e.Y8G("ngForOf",o.groupsFor(t.svc)),e.R7$(2),e.Lme(" ",o.isToolsListOpen(t.name)?"\u25be":"\u25b8"," Individual tools (",o.verbCount(t.svc),") "),e.R7$(1),e.Y8G("ngIf",o.isToolsListOpen(t.name)),e.R7$(3),e.SpI(" Reset to all ",o.verbCount(t.svc)," "),e.R7$(1),e.Y8G("ngIf","db"===t.svc.kind&&o.copyTargets(t.svc).length>0)}}function Z_(n,a){if(1&n){const t=e.RV6();e.qex(0),e.DNE(1,$_,9,3,"div",73),e.j41(2,"div",74)(3,"div",75)(4,"div",76),e.DNE(5,G_,1,1,"mat-checkbox",77),e.j41(6,"button",78),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG(4);return e.Njj(c.toggleExpand(r.name))}),e.j41(7,"span",79),e.EFF(8),e.k0s(),e.j41(9,"span",80),e.EFF(10),e.k0s(),e.j41(11,"span",81),e.EFF(12),e.k0s(),e.j41(13,"span",82),e.EFF(14),e.k0s()(),e.DNE(15,j_,2,0,"span",83),e.j41(16,"button",84),e.bIt("click",function(i){return i.stopPropagation()}),e.EFF(17),e.k0s(),e.j41(18,"mat-menu",null,85)(20,"button",86),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG(4);return e.Njj(c.setFull(r.svc))}),e.EFF(21," Full access "),e.k0s(),e.j41(22,"button",86),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG(4);return e.Njj(c.setReadOnly(r.svc))}),e.EFF(23," Read-only "),e.k0s(),e.j41(24,"button",86),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG(4);return e.Njj(c.expanded.add(r.name))}),e.EFF(25," Choose tools\u2026 "),e.k0s()(),e.j41(26,"span",52),e.EFF(27),e.k0s()(),e.j41(28,"div",87),e.DNE(29,A_,3,3,"div",88),e.k0s(),e.j41(30,"span",89)(31,"button",90),e.bIt("click",function(i){return i.stopPropagation()}),e.EFF(32," \u22ee "),e.k0s(),e.j41(33,"mat-menu",null,91)(35,"button",86),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG(4);return e.Njj(c.expanded.add(r.name))}),e.EFF(36," Edit tools "),e.k0s(),e.j41(37,"button",86),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG(4);return e.Njj(c.setFull(r.svc))}),e.EFF(38," Full access "),e.k0s(),e.j41(39,"button",86),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG(4);return e.Njj(c.setReadOnly(r.svc))}),e.EFF(40," Read-only "),e.k0s(),e.DNE(41,Y_,2,1,"button",92),e.j41(42,"button",93),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG(4);return e.Njj(c.removeServices([r.name]))}),e.EFF(43," Remove from server "),e.k0s()(),e.j41(44,"mat-menu",null,94),e.DNE(46,V_,2,2,"button",95),e.j41(47,"button",86),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG(4);return e.Njj(c.copySelectionTo(r.svc,null))}),e.EFF(48," All exposed databases "),e.k0s()(),e.j41(49,"button",96),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG(4);return e.Njj(c.toggleExpand(r.name))}),e.EFF(50),e.k0s()()(),e.DNE(51,Q_,11,8,"div",97),e.k0s(),e.bVm()}if(2&n){const t=a.$implicit,o=a.index,i=e.sdS(19),r=e.sdS(34),c=e.XpG(4);e.R7$(1),e.Y8G("ngIf",c.startsKind(o)),e.R7$(1),e.AVh("inactive",!t.svc.active),e.BMQ("data-testid","mcp-svc-row-"+t.name),e.R7$(3),e.Y8G("ngIf",c.showFilter()),e.R7$(3),e.JRh(c.typeIcon(t.svc.kind)),e.R7$(2),e.JRh(t.svc.label),e.R7$(2),e.JRh(t.name),e.R7$(2),e.JRh(c.typeBadge(t.svc.kind)),e.R7$(1),e.Y8G("ngIf",!t.svc.active),e.R7$(1),e.AVh("good","ro"===c.accessKind(t.svc))("primary","custom"===c.accessKind(t.svc))("warn","zero"===c.accessKind(t.svc)),e.Y8G("matMenuTriggerFor",i),e.BMQ("data-testid","mcp-svc-access-"+t.name),e.R7$(1),e.SpI(" ",c.accessDisplay(t.svc)," "),e.R7$(9),e.BMQ("data-testid","mcp-svc-fraction-"+t.name),e.R7$(1),e.SpI(" ",c.fractionText(t.svc)," "),e.R7$(1),e.BMQ("aria-label","Tools of "+t.name),e.R7$(1),e.Y8G("ngForOf",c.groupsFor(t.svc)),e.R7$(2),e.Y8G("matMenuTriggerFor",r),e.BMQ("data-testid","mcp-svc-menu-"+t.name),e.R7$(10),e.Y8G("ngIf","db"===t.svc.kind&&c.copyTargets(t.svc).length>0),e.R7$(5),e.Y8G("ngForOf",c.copyTargets(t.svc))("ngForTrackBy",c.trackBySvcName),e.R7$(3),e.BMQ("aria-expanded",c.isExpanded(t.name)),e.R7$(1),e.SpI(" ",c.isExpanded(t.name)?"\u25be":"\u25b8"," "),e.R7$(1),e.Y8G("ngIf",c.isExpanded(t.name))}}function eg(n,a){1&n&&(e.j41(0,"p",124),e.EFF(1," No exposed service matches the current filter. "),e.k0s())}function tg(n,a){if(1&n&&(e.j41(0,"div",70),e.DNE(1,Z_,52,31,"ng-container",71),e.DNE(2,eg,2,0,"p",72),e.k0s()),2&n){const t=e.XpG(3);e.R7$(1),e.Y8G("ngForOf",t.gridRows())("ngForTrackBy",t.trackByName),e.R7$(1),e.Y8G("ngIf",0===t.visibleRows().length)}}function ng(n,a){1&n&&(e.j41(0,"span"),e.nrm(1,"i",129),e.EFF(2,"blocked: writes are off for this server"),e.k0s())}function og(n,a){if(1&n&&(e.j41(0,"div",125)(1,"span"),e.nrm(2,"i",126),e.EFF(3,"served, reads"),e.k0s(),e.j41(4,"span"),e.nrm(5,"i",127),e.EFF(6,"served, writes or executes"),e.k0s(),e.j41(7,"span"),e.nrm(8,"i",128),e.EFF(9,"turned off"),e.k0s(),e.DNE(10,ng,3,0,"span",2),e.k0s()),2&n){const t=e.XpG(3);e.R7$(10),e.Y8G("ngIf",!1===t.store.cfg.allowWrites)}}function ig(n,a){if(1&n&&(e.j41(0,"button",134),e.EFF(1," Copy curation from\u2026 "),e.k0s()),2&n){e.XpG();const t=e.sdS(9);e.Y8G("matMenuTriggerFor",t)}}function ag(n,a){if(1&n){const t=e.RV6();e.j41(0,"button",86),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG(4);return e.Njj(c.bulkCopyFrom(r))}),e.EFF(1),e.k0s()}if(2&n){const t=a.$implicit;e.R7$(1),e.Lme(" ",t.label," (",t.name,") ")}}function rg(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",130)(1,"span"),e.EFF(2),e.k0s(),e.j41(3,"button",64),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.bulkReadOnly())}),e.EFF(4," Read-only "),e.k0s(),e.j41(5,"button",64),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.bulkFull())}),e.EFF(6," Full access "),e.k0s(),e.DNE(7,ig,2,1,"button",131),e.j41(8,"mat-menu",null,132),e.DNE(10,ag,2,2,"button",95),e.k0s(),e.j41(11,"button",64),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.bulkRemove())}),e.EFF(12," Remove from server "),e.k0s(),e.j41(13,"button",133),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.clearSelection())}),e.EFF(14," Clear "),e.k0s()()}if(2&n){const t=e.XpG(3);e.R7$(2),e.SpI("",t.selected.size," selected"),e.R7$(5),e.Y8G("ngIf",t.bulkCopyShown()),e.R7$(3),e.Y8G("ngForOf",t.bulkCopySources())("ngForTrackBy",t.trackBySvcName)}}function cg(n,a){1&n&&(e.j41(0,"span",81),e.EFF(1,"Cross-database aggregators"),e.k0s())}function sg(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",38)(1,"mat-checkbox",39),e.bIt("change",function(i){const c=e.eBV(t).$implicit,s=e.XpG(4);return e.Njj(s.setBareChecked(c.tool.verb,i.checked))}),e.j41(2,"code"),e.EFF(3),e.k0s()(),e.DNE(4,cg,2,0,"span",136),e.j41(5,"span",40),e.EFF(6),e.k0s()()}if(2&n){const t=a.$implicit,o=e.XpG(4);e.R7$(1),e.Y8G("checked",o.bareEnabled(t.tool.verb)),e.R7$(2),e.JRh(t.tool.verb),e.R7$(1),e.Y8G("ngIf",t.aggregator),e.R7$(2),e.JRh(t.tool.description)}}function lg(n,a){if(1&n&&(e.j41(0,"div",36),e.DNE(1,sg,7,4,"div",135),e.k0s()),2&n){const t=e.XpG(3);e.R7$(1),e.Y8G("ngForOf",t.globalToolList())("ngForTrackBy",t.trackByToolVerb)}}function dg(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",139)(1,"mat-slide-toggle",140),e.bIt("change",function(i){const c=e.eBV(t).$implicit,s=e.XpG(4);return e.Njj(s.setCustomEnabled(c,i.checked))}),e.k0s(),e.j41(2,"code"),e.EFF(3),e.k0s(),e.j41(4,"span",81),e.EFF(5),e.k0s(),e.j41(6,"span",40),e.EFF(7),e.k0s(),e.j41(8,"span",141)(9,"button",133),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG(4);return e.Njj(c.editCustomTool(r))}),e.EFF(10," Edit "),e.k0s(),e.j41(11,"button",133),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG(4);return e.Njj(c.deleteCustomTool(r))}),e.EFF(12," Delete "),e.k0s()()()}if(2&n){const t=a.$implicit,o=e.XpG(4);e.R7$(1),e.Y8G("checked",o.customEnabled(t)),e.BMQ("aria-label","Enable "+t.name),e.R7$(2),e.JRh(t.name),e.R7$(2),e.JRh("function"===t.toolType?"Function":"API"),e.R7$(2),e.JRh(o.customSummary(t))}}function pg(n,a){if(1&n&&(e.j41(0,"div",137),e.DNE(1,dg,13,5,"div",138),e.k0s()),2&n){const t=e.XpG(3);e.R7$(1),e.Y8G("ngForOf",t.customTools())}}function mg(n,a){1&n&&(e.j41(0,"p",142),e.EFF(1," No custom tools. Add an API endpoint or server-side function agents can call alongside the catalog above. "),e.k0s())}function _g(n,a){if(1&n){const t=e.RV6();e.DNE(0,T_,4,3,"section",41),e.j41(1,"div",25)(2,"h2"),e.EFF(3),e.k0s(),e.j41(4,"button",42),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.openPicker())}),e.EFF(5," + Expose services\u2026 "),e.k0s()(),e.DNE(6,S_,7,1,"div",43),e.DNE(7,R_,8,9,"div",44),e.DNE(8,tg,3,3,"div",45),e.DNE(9,og,11,1,"div",46),e.DNE(10,rg,15,4,"div",47),e.j41(11,"section",48)(12,"button",49),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.globalsOpen=!i.globalsOpen)}),e.j41(13,"span",50),e.EFF(14,"Global tools"),e.k0s(),e.j41(15,"span",51),e.EFF(16,"Work across the services exposed above."),e.k0s(),e.j41(17,"span",52),e.EFF(18),e.k0s(),e.j41(19,"span",53),e.EFF(20),e.k0s()(),e.DNE(21,lg,2,2,"div",34),e.k0s(),e.j41(22,"section",54)(23,"div",55)(24,"span",50),e.EFF(25),e.k0s(),e.j41(26,"button",56),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.addCustomTool())}),e.EFF(27," + Add custom tool "),e.k0s()(),e.DNE(28,pg,2,1,"div",57),e.DNE(29,mg,2,0,"p",58),e.k0s()}if(2&n){const t=e.XpG(2);e.Y8G("ngIf",t.orphanRows().length>0),e.R7$(3),e.Lme(" Exposed services (",t.serviceRows().length," of ",t.store.backendServices.length,") "),e.R7$(3),e.Y8G("ngIf",0===t.store.cfg.exposedServices.length),e.R7$(1),e.Y8G("ngIf",t.showFilter()),e.R7$(1),e.Y8G("ngIf",t.serviceRows().length>0),e.R7$(1),e.Y8G("ngIf",t.serviceRows().length>0),e.R7$(1),e.Y8G("ngIf",t.selected.size>0),e.R7$(8),e.JRh(t.globalFractionText()),e.R7$(2),e.JRh(t.globalsOpen?"\u25be":"\u25b8"),e.R7$(1),e.Y8G("ngIf",t.globalsOpen),e.R7$(4),e.SpI("Custom tools (",t.customTools().length,")"),e.R7$(3),e.Y8G("ngIf",t.customTools().length>0),e.R7$(1),e.Y8G("ngIf",0===t.customTools().length)}}function gg(n,a){if(1&n&&(e.j41(0,"span",143),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.SpI(" \xb7 ",t.serverCountNote()," ")}}function fg(n,a){1&n&&(e.qex(0),e.EFF(1,"(estimate)"),e.bVm())}function ug(n,a){if(1&n&&(e.j41(0,"li"),e.EFF(1),e.k0s()),2&n){const t=a.$implicit;e.R7$(1),e.JRh(t)}}function hg(n,a){1&n&&(e.qex(0),e.j41(1,"span",144),e.EFF(2,"Read-only \u2713"),e.k0s(),e.j41(3,"span",145),e.EFF(4,"writes are off for this server (Settings) \u2014 write tools are not served"),e.k0s(),e.bVm())}function bg(n,a){1&n&&(e.qex(0),e.j41(1,"span",146),e.EFF(2,"Read-only \u2713"),e.k0s(),e.j41(3,"span",145),e.EFF(4,"zero write or execute tools enabled"),e.k0s(),e.bVm())}function vg(n,a){if(1&n&&e.DNE(0,bg,5,0,"ng-container",7),2&n){e.XpG();const t=e.sdS(25),o=e.XpG();e.Y8G("ngIf",o.railReadOnly())("ngIfElse",t)}}function xg(n,a){if(1&n){const t=e.RV6();e.j41(0,"span",145),e.EFF(1),e.k0s(),e.j41(2,"button",147),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.makeReadOnly())}),e.EFF(3," Make read-only "),e.k0s()}if(2&n){const t=e.XpG(2);e.R7$(1),e.Lme(" ",t.railWriteActive()," write ",1===t.railWriteActive()?"tool":"tools"," active ")}}function Cg(n,a){if(1&n&&(e.j41(0,"p",148),e.EFF(1),e.j41(2,"span",149),e.EFF(3,"[Why?]"),e.k0s()()),2&n){const t=e.XpG(2);e.R7$(1),e.SpI(" ",t.servingLine()," "),e.R7$(1),e.Y8G("matTooltip",t.lazyWhyTooltip)}}function kg(n,a){if(1&n&&(e.j41(0,"li")(1,"code"),e.EFF(2),e.k0s(),e.EFF(3),e.k0s()),2&n){const t=a.$implicit;e.R7$(2),e.JRh(t.verb),e.R7$(1),e.Lme(" \u2192 ",t.on," of ",t.total," ")}}function yg(n,a){if(1&n&&(e.j41(0,"ul"),e.DNE(1,kg,4,3,"li",71),e.k0s()),2&n){const t=e.XpG(3);e.R7$(1),e.Y8G("ngForOf",t.reachList())("ngForTrackBy",t.trackByVerb)}}function Mg(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",150)(1,"button",33),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.railReachOpen=!i.railReachOpen)}),e.EFF(2),e.k0s(),e.DNE(3,yg,2,2,"ul",2),e.k0s()}if(2&n){const t=e.XpG(2);e.R7$(2),e.SpI(" ",t.railReachOpen?"\u25be":"\u25b8"," Per-tool reach "),e.R7$(1),e.Y8G("ngIf",t.railReachOpen)}}function Og(n,a){if(1&n){const t=e.RV6();e.qex(0),e.DNE(1,y_,2,0,"div",4),e.j41(2,"div",5)(3,"div",6),e.DNE(4,w_,6,3,"ng-container",7),e.DNE(5,_g,30,14,"ng-template",null,8,e.C5r),e.k0s(),e.j41(7,"aside",9)(8,"h2",10),e.EFF(9,"What an agent gets"),e.k0s(),e.j41(10,"p",11)(11,"b"),e.EFF(12),e.k0s(),e.EFF(13," callable tools "),e.DNE(14,gg,2,1,"span",12),e.k0s(),e.j41(15,"p",13),e.EFF(16),e.DNE(17,fg,2,0,"ng-container",2),e.k0s(),e.j41(18,"ul",14),e.DNE(19,ug,2,1,"li",15),e.k0s(),e.j41(20,"div",16),e.DNE(21,hg,5,0,"ng-container",7),e.DNE(22,vg,1,2,"ng-template",null,17,e.C5r),e.DNE(24,xg,4,2,"ng-template",null,18,e.C5r),e.k0s(),e.DNE(26,Cg,4,2,"p",19),e.j41(27,"button",20),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.openPreview())}),e.EFF(28," Preview what an agent sees "),e.k0s(),e.j41(29,"button",21),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.copyToolList())}),e.EFF(30," \u25b8 Copy tool list "),e.k0s(),e.DNE(31,Mg,4,2,"div",22),e.nrm(32,"df-mcp-access",23),e.k0s()(),e.bVm()}if(2&n){const t=e.sdS(6),o=e.sdS(23),i=e.XpG();e.R7$(1),e.Y8G("ngIf",0===i.railTotal()),e.R7$(3),e.Y8G("ngIf",i.store.isSystemMcp)("ngIfElse",t),e.R7$(8),e.JRh(i.railTotal()),e.R7$(2),e.Y8G("ngIf",i.serverCountNote()),e.R7$(2),e.SpI(" ",i.sizeLine()," "),e.R7$(1),e.Y8G("ngIf","estimate"===i.stats().source),e.R7$(2),e.Y8G("ngForOf",i.railBreakdown()),e.R7$(2),e.Y8G("ngIf",i.writesOff())("ngIfElse",o),e.R7$(5),e.Y8G("ngIf",i.servingLine()),e.R7$(5),e.Y8G("ngIf",i.showReach()),e.R7$(1),e.Y8G("store",i.store)}}function Kn(n){return/^(get_|list_)/.test(n.name)}let Pg=(()=>{class n{ngOnChanges(t){t.store&&this.localMemo.clear(),t.store&&!t.store.firstChange&&(this.expanded.clear(),this.toolsListOpen.clear(),this.selected.clear(),this.globalsOpen=!1,this.railReachOpen=!1,this.filterText="",this.filterKind="all",this.filterModified=!1)}memoized(t,o,i){const r=this.localMemo.get(t);if(r&&r.key===o)return r.value;const c=i();return this.localMemo.set(t,{key:o,value:c}),c}constructor(t,o){this.dialog=t,this.snackbar=o,this.loading=!1,this.localMemo=new Map,this.trackByName=(i,r)=>r.name,this.trackBySvcName=(i,r)=>r.name,this.trackByToolVerb=(i,r)=>r.tool.verb,this.trackByVerb=(i,r)=>r.verb,this.allOffLine="Agents see this service but can call nothing. Enable tools or remove it.",this.lazyWhyTooltip=`When the tool list exceeds ${de(Ze)} (~8k tokens), agents first receive ${Me.length} discovery tools instead of the full catalog: search_tools \u2192 describe_tool \u2192 call_tool, with fetch_more for long results. Every tool stays callable by name.`,this.expanded=new Set,this.toolsListOpen=new Set,this.globalsOpen=!1,this.customsOpen=!0,this.railReachOpen=!1,this.filterText="",this.filterKind="all",this.filterModified=!1,this.selected=new Set,this.systemGroups=[{key:"sysread",label:"Read system",warn:!1,tools:ie.filter(Kn)},{key:"sysmod",label:"Modify system",warn:!0,tools:ie.filter(i=>!Kn(i))}]}eff(){return this.store.effective()}railTotal(){return this.store.isSystemMcp?this.sysEnabledCount():this.eff().total}railReadOnly(){return this.store.isSystemMcp?0===this.sysModifyOn():this.eff().readOnly}writesOff(){return!this.store.isSystemMcp&&!1===this.store.cfg.allowWrites}stats(){return this.store.catalogStats()}sizeLine(){const t=this.stats(),o=t.lazy?`${de(t.facadeBytes)} facade instead of ${de(t.bytes)}`:de(t.bytes);return`${Rn(t.tokens)} tokens per turn \xb7 ${o}`}serverCountNote(){const t=this.stats();return"server"!==t.source||null===t.count||t.count===this.railTotal()?null:`Server reports ${t.count}`}railWriteActive(){return this.store.isSystemMcp?this.sysModifyOn():this.eff().writeVerbs}serviceRows(){return this.memoized("serviceRows",String(this.store.version),()=>this.store.rows().filter(t=>!!t.svc))}orphanRows(){return this.memoized("orphanRows",String(this.store.version),()=>this.store.rows().filter(t=>!t.svc))}showFilter(){return this.serviceRows().length>8}rowCountOf(t){return this.serviceRows().filter(o=>o.svc.kind===t).length}isModified(t){return this.store.dormantCurationCount(t)>0}visibleRows(){return this.memoized("visibleRows",`${this.store.version}|${this.filterText}|${this.filterKind}|${this.filterModified}`,()=>{let o=this.serviceRows();if(!this.showFilter())return o;const i=this.filterText.trim().toLowerCase();return i&&(o=o.filter(r=>r.name.toLowerCase().includes(i)||r.svc.label.toLowerCase().includes(i))),"all"!==this.filterKind&&(o=o.filter(r=>r.svc.kind===this.filterKind)),this.filterModified&&(o=o.filter(r=>this.isModified(r.name))),o})}setFilterKind(t){this.filterKind=this.filterKind===t?"all":t}typeIcon(t){return"db"===t?"\u26c1":"\u{1f5c2}"}typeBadge(t){return"db"===t?"Database":"Files"}isExpanded(t){return this.expanded.has(t)}toggleExpand(t){this.expanded.has(t)?this.expanded.delete(t):this.expanded.add(t)}isToolsListOpen(t){return this.toolsListOpen.has(t)}toggleToolsList(t){this.toolsListOpen.has(t)?this.toolsListOpen.delete(t):this.toolsListOpen.add(t)}accessKind(t){return this.store.access(t).kind}accessDisplay(t){const o=this.store.access(t),i=this.store.fraction(t);switch(o.kind){case"full":return"Full";case"ro":return"Read-only";case"zero":return`0 of ${i.total} \u26a0`;default:return`Custom \u25d0 ${i.on} of ${i.total}`}}fractionText(t){const o=this.store.fraction(t);return`${o.on} of ${o.total}`}setFull(t){this.store.setServiceFull(t)}setReadOnly(t){this.store.setServiceReadOnly(t)}gridRows(){return this.memoized("gridRows",`${this.store.version}|${this.filterText}|${this.filterKind}|${this.filterModified}`,()=>{const o=this.visibleRows();return[...o.filter(i=>"db"===i.svc.kind),...o.filter(i=>"db"!==i.svc.kind)]})}startsKind(t){const o=this.gridRows();return 0===t||o[t-1].svc.kind!==o[t].svc.kind}groupsForKind(t){return Oe(t)}kindTitle(t){return"db"===t?"Databases":"File storage"}shortGroupLabel(t){return{read:"Read",schema:"Schema",write:"Write",procs:"Procs",fread:"Read",fwrite:"Write"}[t.key]??t.label}isWriteVerb(t){return Qe.has(t)}cellState(t,o){return this.store.isToolEnabled(t.name,o)?!1===this.store.cfg.allowWrites&&Qe.has(o)?"writes-off":"on":"off"}cellTip(t,o){const i=this.cellState(t,o),r="on"===i?"served":"off"===i?"turned off":"blocked: writes are off for this server";return`${this.emittedName(t,o)} (${t.name}): ${r}. Click to turn ${this.store.isToolEnabled(t.name,o)?"off":"on"}.`}toggleCell(t,o){this.store.setTool(t.name,o,!this.store.isToolEnabled(t.name,o))}exposedOfKind(t){return this.serviceRows().filter(o=>o.svc.kind===t).map(o=>o.svc)}columnState(t,o){let i=0,r=0;for(const c of this.exposedOfKind(t))for(const s of o)r++,this.store.isToolEnabled(c.name,s.verb)&&i++;return 0===r||0===i?"off":i===r?"on":"mixed"}toggleColumn(t,o){const i="on"!==this.columnState(t,o);for(const r of this.exposedOfKind(t))for(const c of o)this.store.setTool(r.name,c.verb,i)}columnTip(t,o,i){const r=this.exposedOfKind(t).length,c=`${r} exposed ${"db"===t?"database":"file service"}${1===r?"":"s"}`;return"on"===this.columnState(t,i)?`Turn ${o} off in all ${c}`:`Turn ${o} on in all ${c}`}groupsFor(t){return Oe(t.kind)}groupStateOf(t,o){return et(t,o,this.store.cfg.disabledTools)}groupOnCount(t,o){return o.verbs.filter(i=>this.store.isToolEnabled(t.name,i.verb)).length}toggleGroup(t,o){const i="on"!==this.groupStateOf(t,o);for(const r of o.verbs)this.store.setTool(t.name,r.verb,i)}toolEnabled(t,o){return this.store.isToolEnabled(t.name,o)}setToolChecked(t,o,i){this.store.setTool(t.name,o,i)}emittedName(t,o){return $t(this.eff().effectiveStyle,t.name,o)}verbCount(t){return $(t.kind).length}mergedCaption(t){return`Tools are shared across your ${"db"===t.kind?"databases":"file services"}. Turning one off here removes ${t.name} from that tool's allowed services; turning it off in every ${"db"===t.kind?"database":"file service"} removes the tool.`}showMergedCaption(t){return"merged"===this.store.cfg.toolStyle}copyTargets(t){return this.memoized(`copyTargets:${t.name}`,String(this.store.version),()=>this.serviceRows().map(o=>o.svc).filter(o=>"db"===o.kind&&o.name!==t.name))}copySelectionTo(t,o){const i=o?[o]:this.copyTargets(t);if(0!==i.length){for(const c of i)for(const s of $("db"))this.store.setTool(c.name,s.verb,this.store.isToolEnabled(t.name,s.verb));this.snackbar.openSnackBar(`Copied ${t.name}'s tool selection to ${o?o.name:"all exposed databases"}.`,"success")}}removeServices(t,o=!1){0!==t.length&&this.dialog.open(b_,{data:{names:t,orphan:o},maxWidth:"95vw"}).afterClosed().subscribe(i=>{if(!i)return;for(const s of t)this.store.removeService(s,i.clear);t.forEach(s=>this.selected.delete(s));const r=1===t.length?t[0]:`${t.length} services`;this.snackbar.openSnackBar(i.clear?`Removed ${r} and cleared the saved tool settings.`:1===t.length?`Removed ${r} \u2014 its tool selection is kept and restores if you expose it again.`:`Removed ${r} \u2014 their tool selections are kept and restore if you expose them again.`,"success")})}orphanText(t){return`'${t}' no longer exists on this instance (renamed or deleted). Its ${this.store.dormantCurationCount(t)} saved tool settings are kept.`}renameOrphan(t){this.dialog.open(C_,{data:{store:this.store,oldName:t},maxWidth:"95vw"}).afterClosed().subscribe(o=>{o&&(this.store.renameExposedEntry(t,o),this.snackbar.openSnackBar(`Pointed the entry at ${o} and renamed its saved tool settings.`,"success"))})}openPicker(){this.dialog.open(Lp,{data:{store:this.store},width:"680px",maxWidth:"95vw"}).afterClosed().subscribe(t=>{!t||0===t.names.length||(function Bp(n,a){const t=jn(n,a.names,a.accessTouched),o=a.names.filter(i=>!t.has(i));o.length&&n.exposeServices(o,a.access),t.size&&n.exposeServices([...t],"keep")}(this.store,t),this.snackbar.openSnackBar(`Exposed ${t.names.length} ${1===t.names.length?"service":"services"}.`,"success"))})}isSelected(t){return this.selected.has(t)}toggleSelected(t){this.selected.has(t)?this.selected.delete(t):this.selected.add(t)}selectedServices(){return this.serviceRows().filter(t=>this.selected.has(t.name)).map(t=>t.svc)}bulkReadOnly(){this.selectedServices().forEach(t=>this.store.setServiceReadOnly(t))}bulkFull(){this.selectedServices().forEach(t=>this.store.setServiceFull(t))}bulkCopySources(){return this.memoized("bulkCopySources",String(this.store.version),()=>this.serviceRows().map(t=>t.svc).filter(t=>"db"===t.kind))}bulkCopyShown(){return this.selectedServices().some(t=>"db"===t.kind)&&this.bulkCopySources().length>0}bulkCopyFrom(t){const o=this.selectedServices().filter(i=>"db"===i.kind&&i.name!==t.name);if(0!==o.length){for(const i of o)for(const r of $("db"))this.store.setTool(i.name,r.verb,this.store.isToolEnabled(t.name,r.verb));this.snackbar.openSnackBar(`Copied ${t.name}'s tool selection to ${o.length} selected ${1===o.length?"database":"databases"}.`,"success")}}bulkRemove(){this.removeServices([...this.selected])}clearSelection(){this.selected.clear()}aggregatorsShown(){const t=this.eff();return Ve(t.dbServices,t.fileServices).length>0}globalToolList(){return this.memoized("globalToolList",String(this.store.version),()=>{const t=ye.map(i=>({tool:i,aggregator:!1})),o=this.eff();for(const i of Ve(o.dbServices,o.fileServices))t.push({tool:i,aggregator:!0});return t})}globalFractionText(){const t=this.globalToolList();return`${t.filter(i=>this.store.isBareToolEnabled(i.tool.verb)).length} of ${t.length}`}bareEnabled(t){return this.store.isBareToolEnabled(t)}setBareChecked(t,o){this.store.setBareTool(t,o)}customTools(){return this.store.cfg.customTools??[]}customEnabled(t){return!1!==t?.enabled&&0!==t?.enabled}setCustomEnabled(t,o){t.enabled=o,this.store.touch()}customSummary(t){return"function"===t?.toolType?t?.description||"Server-side function":`${t?.httpMethod||"GET"} ${t?.url||""}`.trim()}addCustomTool(){this.dialog.open(qn,{data:{store:this.store},width:"560px",maxWidth:"95vw",disableClose:!0}).afterClosed().subscribe(t=>{t&&(this.store.cfg.customTools=[...this.customTools(),t],this.store.touch())})}editCustomTool(t){this.dialog.open(qn,{data:{store:this.store,tool:t},width:"560px",maxWidth:"95vw",disableClose:!0}).afterClosed().subscribe(o=>{if(!o)return;const i=this.customTools().indexOf(t);i>=0&&(this.store.cfg.customTools=[...this.customTools().slice(0,i),o,...this.customTools().slice(i+1)],this.store.touch())})}deleteCustomTool(t){window.confirm(`Delete custom tool "${t?.name}"?`)&&(this.store.cfg.customTools=this.customTools().filter(i=>i!==t),this.store.touch())}railBreakdown(){if(this.store.isSystemMcp)return[`${this.sysGroupOn(this.systemGroups[0])} read system`,`${this.sysGroupOn(this.systemGroups[1])} modify system`];const t=this.eff(),o=[];if(t.dbServices>0&&o.push(`${t.dbTools} database (${"merged"===t.effectiveStyle?"shared set \u2014 ":""}write reaches ${t.writeReachDb} of ${t.dbServices} ${1===t.dbServices?"database":"databases"})`),t.fileServices>0){const i=$("file").length;o.push(`${t.fileTools} file (${t.fileServices} ${1===t.fileServices?"service":"services"}${t.fileTools===t.fileServices*i?` \xd7 ${i}`:""})`)}return o.push(`${t.globalTools} global`),t.aggregators>0&&o.push(`${t.aggregators} cross-database aggregators`),t.customTools>0&&o.push(`${t.customTools} custom`),o}servingLine(){const t=this.stats();if(!t.lazy)return null;const o=Me.length;return"auto"===this.store.cfg.lazyMode?`Delivered on demand (auto): the catalog (${de(t.bytes)}) exceeds ${de(Ze)}, so clients first see ${o} discovery tools.`:`Delivered on demand (always on): clients first see ${o} discovery tools.`}makeReadOnly(){if(this.store.isSystemMcp){const r=this.systemGroups[1].tools.filter(s=>this.store.isBareToolEnabled(s.name));if(!window.confirm(`Turn off all ${r.length} write and execute tools? You can undo until you save.`))return;return void r.forEach(s=>this.store.setBareTool(s.name,!1))}const t=this.eff();window.confirm(`Turn off all ${t.writeVerbs} write and execute tools across ${t.writeReach} ${1===t.writeReach?"service":"services"}${t.writeCapableCustoms>0?` and ${t.writeCapableCustoms} custom ${1===t.writeCapableCustoms?"tool":"tools"}`:""}? You can undo until you save.`)&&this.store.makeReadOnly()}servedToolNames(){if(this.store.isSystemMcp)return ie.filter(l=>this.store.isBareToolEnabled(l.name)).map(l=>l.name);const t=this.store.cfg.disabledTools,o=this.eff().effectiveStyle,i=this.serviceRows().map(l=>l.svc).filter(l=>l.active),r=i.filter(l=>"db"===l.kind),c=i.filter(l=>"file"===l.kind),s=[];for(const l of ye)t.has(l.verb)||s.push(l.verb);for(const l of Ve(r.length,c.length))t.has(l.verb)||s.push(l.verb);if("merged"===o)for(const l of $("db"))r.some(p=>ce(this.store.cfg,p.name,l.verb))&&s.push(l.verb);else for(const l of r)for(const p of $("db"))ce(this.store.cfg,l.name,p.verb)&&s.push(ne(l.name,p.verb));for(const l of c)for(const p of $("file"))ce(this.store.cfg,l.name,p.verb)&&s.push(ne(l.name,p.verb));for(const l of this.store.cfg.customTools??[])Rt(this.store.cfg,l)&&l?.name&&s.push(l.name);return s}copyToolList(){const t=this.servedToolNames();navigator.clipboard?.writeText(t.join("\n")).catch(()=>{}),this.snackbar.openSnackBar(`Copied ${t.length} tool ${1===t.length?"name":"names"}.`,"success")}showReach(){return!this.store.isSystemMcp&&"merged"===this.eff().effectiveStyle&&this.eff().dbServices>0}reachList(){return this.memoized("reachList",String(this.store.version),()=>$("db").map(t=>{const o=Et(t.verb,this.store.cfg,this.store.backendServices);return{verb:t.verb,on:o.on.length,total:o.total}}))}openPreview(){this.dialog.open(Zp,{data:{store:this.store},position:{top:"0",right:"0"},height:"100vh",width:"560px",maxWidth:"95vw",panelClass:"mcp-preview-pane"})}sysEnabledCount(){return ie.filter(t=>this.store.isBareToolEnabled(t.name)).length}sysTotal(){return ie.length}sysGroupOn(t){return t.tools.filter(o=>this.store.isBareToolEnabled(o.name)).length}sysGroupState(t){const o=this.sysGroupOn(t);return 0===o?"off":o===t.tools.length?"on":"part"}sysToggleGroup(t){const o="on"!==this.sysGroupState(t);t.tools.forEach(i=>this.store.setBareTool(i.name,o))}sysModifyOn(){return this.sysGroupOn(this.systemGroups[1])}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(h.bZ),e.rXU(pe.L))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-mcp-tools"]],inputs:{store:"store",loading:"loading"},standalone:!0,features:[e.OA$,e.aNF],decls:3,vars:2,consts:[["data-testid","mcp-tools-tab",1,"mcp-tools"],["class","mcp-tools-loading",4,"ngIf"],[4,"ngIf"],[1,"mcp-tools-loading"],["class","mcp-tools-warnbanner",4,"ngIf"],[1,"mcp-tools-layout"],[1,"mcp-tools-main"],[4,"ngIf","ngIfElse"],["mcpMain",""],["data-testid","mcp-rail",1,"mcp-rail"],[1,"mcp-rail-title"],["data-testid","mcp-rail-total",1,"mcp-rail-total"],["class","mcp-rail-note","data-testid","mcp-server-count",4,"ngIf"],["data-testid","mcp-rail-size",1,"mcp-rail-note"],[1,"mcp-rail-breakdown"],[4,"ngFor","ngForOf"],["data-testid","mcp-rail-readonly",1,"mcp-rail-ro"],["curated",""],["writesActive",""],["class","mcp-rail-serving",4,"ngIf"],["mat-flat-button","","color","primary","type","button","data-testid","mcp-preview-btn",1,"mcp-rail-preview-btn",3,"click"],["type","button","data-testid","mcp-copy-toollist",1,"mcp-linklike",3,"click"],["class","mcp-rail-reach",4,"ngIf"],[3,"store"],[1,"mcp-tools-warnbanner"],[1,"mcp-section-head"],[1,"mcp-card"],["class","mcp-sys-group",4,"ngFor","ngForOf"],[1,"mcp-sys-group"],[1,"mcp-group-row"],[3,"checked","indeterminate","change"],["class","mcp-warn-tag",4,"ngIf"],[1,"mcp-group-count"],["type","button",1,"mcp-linklike",3,"click"],["class","mcp-tool-list",4,"ngIf"],[1,"mcp-warn-tag"],[1,"mcp-tool-list"],["class","mcp-tool-row",4,"ngFor","ngForOf"],[1,"mcp-tool-row"],[3,"checked","change"],[1,"mcp-tool-desc"],["class","mcp-orphans",4,"ngIf"],["mat-flat-button","","color","primary","type","button","data-testid","mcp-expose-btn",3,"click"],["class","mcp-card mcp-empty",4,"ngIf"],["class","mcp-filter-strip",4,"ngIf"],["class","mcp-card mcp-rows",4,"ngIf"],["class","mcp-legend",4,"ngIf"],["class","mcp-bulk-bar","data-testid","mcp-bulk-bar",4,"ngIf"],["data-testid","mcp-global-section",1,"mcp-card","mcp-peer-section"],["type","button",1,"mcp-peer-head",3,"click"],[1,"mcp-peer-title"],[1,"mcp-peer-caption"],[1,"mcp-fraction"],[1,"mcp-row-caret"],["data-testid","mcp-custom-section",1,"mcp-card","mcp-peer-section"],[1,"mcp-peer-head"],["mat-stroked-button","","type","button","data-testid","mcp-custom-add",3,"click"],["class","mcp-custom-list",4,"ngIf"],["class","mcp-tool-desc mcp-custom-empty",4,"ngIf"],[1,"mcp-orphans"],[1,"mcp-orphans-title"],["class","mcp-card mcp-orphan-row",4,"ngFor","ngForOf","ngForTrackBy"],[1,"mcp-card","mcp-orphan-row"],[1,"mcp-orphan-actions"],["mat-stroked-button","","type","button",3,"click"],[1,"mcp-card","mcp-empty"],[1,"mcp-filter-strip"],["type","search","data-testid","mcp-filter-input","placeholder","Filter exposed services\u2026","aria-label","Filter exposed services",1,"mcp-filter-input",3,"ngModel","ngModelChange"],["type","button",1,"mcp-chip","mcp-chip-btn",3,"click"],["type","button","data-testid","mcp-filter-modified",1,"mcp-chip","mcp-chip-btn",3,"click"],[1,"mcp-card","mcp-rows"],[4,"ngFor","ngForOf","ngForTrackBy"],["class","mcp-rows-nomatch",4,"ngIf"],["class","mcp-grid-head",4,"ngIf"],[1,"mcp-row"],[1,"mcp-row-head"],[1,"mcp-row-left"],["class","mcp-row-bulk",3,"checked","change","click",4,"ngIf"],["type","button",1,"mcp-row-main",3,"click"],["aria-hidden","true",1,"mcp-row-icon"],[1,"mcp-row-label"],[1,"mcp-chip"],[1,"mcp-chip","mcp-type-badge"],["class","mcp-chip warn",4,"ngIf"],["type","button",1,"mcp-chip","mcp-chip-btn","mcp-access-chip",3,"matMenuTriggerFor","click"],["accessMenu","matMenu"],["mat-menu-item","","type","button",3,"click"],["role","group",1,"mcp-cells"],["class","mcp-cellgroup",3,"write",4,"ngFor","ngForOf"],[1,"mcp-row-tail"],["mat-icon-button","","type","button","aria-label","Service actions",1,"mcp-row-menu-btn",3,"matMenuTriggerFor","click"],["rowMenu","matMenu"],["mat-menu-item","","type","button",3,"matMenuTriggerFor",4,"ngIf"],["mat-menu-item","","type","button",1,"mcp-menu-danger",3,"click"],["copyMenu","matMenu"],["mat-menu-item","","type","button",3,"click",4,"ngFor","ngForOf","ngForTrackBy"],["type","button",1,"mcp-row-caret",3,"click"],["class","mcp-drill",4,"ngIf"],[1,"mcp-grid-head"],[1,"mcp-grid-head-left"],[1,"mcp-grid-head-title"],[1,"mcp-grid-head-hint"],[1,"mcp-cells"],[1,"mcp-cellgroup"],[1,"mcp-cellgroup-label"],["type","button","role","switch",1,"mcp-sw",3,"matTooltip","click"],[1,"mcp-cellgroup-cols"],["class","mcp-colhead",4,"ngFor","ngForOf"],[1,"mcp-colhead"],[1,"mcp-colhead-name"],[1,"mcp-row-bulk",3,"checked","change","click"],[1,"mcp-chip","warn"],["type","button","class","mcp-cell",3,"write","matTooltip","click",4,"ngFor","ngForOf"],["type","button",1,"mcp-cell",3,"matTooltip","click"],["mat-menu-item","","type","button",3,"matMenuTriggerFor"],[1,"mcp-drill"],["class","mcp-drill-alloff",4,"ngIf"],["class","mcp-drill-caption",4,"ngIf"],["class","mcp-group-row",4,"ngFor","ngForOf"],[1,"mcp-drill-foot"],[1,"mcp-drill-alloff"],[1,"mcp-drill-caption"],["mat-stroked-button","","type","button",3,"matMenuTriggerFor"],["copyMenuFoot","matMenu"],[1,"mcp-rows-nomatch"],[1,"mcp-legend"],["data-state","on",1,"mcp-cell-dot"],["data-state","on",1,"mcp-cell-dot","write"],["data-state","off",1,"mcp-cell-dot"],["data-state","writes-off",1,"mcp-cell-dot"],["data-testid","mcp-bulk-bar",1,"mcp-bulk-bar"],["mat-stroked-button","","type","button","data-testid","mcp-bulk-copyfrom",3,"matMenuTriggerFor",4,"ngIf"],["bulkCopyMenu","matMenu"],["mat-button","","type","button",3,"click"],["mat-stroked-button","","type","button","data-testid","mcp-bulk-copyfrom",3,"matMenuTriggerFor"],["class","mcp-tool-row",4,"ngFor","ngForOf","ngForTrackBy"],["class","mcp-chip",4,"ngIf"],[1,"mcp-custom-list"],["class","mcp-custom-row",4,"ngFor","ngForOf"],[1,"mcp-custom-row"],["color","primary",3,"checked","change"],[1,"mcp-custom-actions"],[1,"mcp-tool-desc","mcp-custom-empty"],["data-testid","mcp-server-count",1,"mcp-rail-note"],["data-testid","mcp-writes-off",1,"mcp-chip","good"],[1,"mcp-rail-note"],[1,"mcp-chip","good"],["mat-stroked-button","","type","button","data-testid","mcp-make-readonly",3,"click"],[1,"mcp-rail-serving"],["tabindex","0","data-testid","mcp-lazy-why","aria-label","Why tools are delivered on demand",1,"mcp-info",3,"matTooltip"],[1,"mcp-rail-reach"]],template:function(o,i){1&o&&(e.j41(0,"div",0),e.DNE(1,k_,2,0,"div",1),e.DNE(2,Og,33,13,"ng-container",2),e.k0s()),2&o&&(e.R7$(1),e.Y8G("ngIf",i.loading),e.R7$(1),e.Y8G("ngIf",!i.loading))},dependencies:[d.MD,d.Sq,d.bT,m.YN,m.me,m.BC,m.vS,u.Hl,u.$z,u.iY,j.g7,j.So,h.hM,ae.Cn,ae.kk,ae.fb,ae.Cp,X.mV,X.sG,S.uc,S.oV,r_],styles:['@charset "UTF-8";.mcp-tools[_ngcontent-%COMP%]{font-family:Inter,Helvetica Neue,sans-serif}.mcp-tools-loading[_ngcontent-%COMP%]{padding:32px 0;font-size:13.5px;opacity:.65}.mcp-tools-warnbanner[_ngcontent-%COMP%]{background:var(--df-warning-soft);border:1px solid color-mix(in srgb,var(--df-warning) 40%,transparent);color:var(--df-warning);border-radius:10px;padding:10px 14px;font-size:13px;font-weight:600;margin-bottom:14px}.mcp-tools-layout[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:22px;align-items:start}.mcp-tools-main[_ngcontent-%COMP%]{min-width:0}@media (max-width: 1119px){.mcp-tools-layout[_ngcontent-%COMP%]{grid-template-columns:1fr}}.mcp-card[_ngcontent-%COMP%]{background:var(--df-surface);border:1px solid color-mix(in srgb,var(--df-text) 8%,transparent);border-radius:10px;margin-bottom:14px}.mcp-section-head[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:4px 0 10px}.mcp-section-head[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75;margin:0}.mcp-empty[_ngcontent-%COMP%]{padding:18px 16px}.mcp-empty[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 10px;font-size:13.5px}.mcp-orphans[_ngcontent-%COMP%]{margin-bottom:16px}.mcp-orphans[_ngcontent-%COMP%] .mcp-orphans-title[_ngcontent-%COMP%]{font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--df-warning);margin:0 0 8px}.mcp-orphan-row[_ngcontent-%COMP%]{border-color:color-mix(in srgb,var(--df-warning) 40%,transparent);background:var(--df-warning-soft);padding:12px 16px}.mcp-orphan-row[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 10px;font-size:13.5px}.mcp-orphan-row[_ngcontent-%COMP%] .mcp-orphan-actions[_ngcontent-%COMP%]{display:flex;gap:8px;flex-wrap:wrap}.mcp-filter-strip[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:10px}.mcp-filter-strip[_ngcontent-%COMP%] .mcp-filter-input[_ngcontent-%COMP%]{font:inherit;font-size:13px;padding:7px 12px;border:1px solid color-mix(in srgb,var(--df-text) 18%,transparent);border-radius:8px;min-width:200px;flex:1;max-width:320px}.mcp-filter-strip[_ngcontent-%COMP%] .mcp-filter-input[_ngcontent-%COMP%]:focus{outline:2px solid var(--df-accent);outline-offset:-1px}.mcp-rows[_ngcontent-%COMP%]{overflow:visible}.mcp-row[_ngcontent-%COMP%]{border-top:1px solid color-mix(in srgb,var(--df-text) 6%,transparent);padding:6px 12px}.mcp-row[_ngcontent-%COMP%]:first-child{border-top:none}.mcp-row.inactive[_ngcontent-%COMP%] .mcp-row-head[_ngcontent-%COMP%]{opacity:.55}.mcp-row-head[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;flex-wrap:nowrap}.mcp-row-main[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap;background:none;border:none;padding:4px 0;cursor:pointer;font:inherit;text-align:left;min-width:0}.mcp-row-main[_ngcontent-%COMP%] .mcp-row-icon[_ngcontent-%COMP%]{font-size:15px;opacity:.7}.mcp-row-main[_ngcontent-%COMP%] .mcp-row-label[_ngcontent-%COMP%]{font-weight:600;font-size:13.5px}.mcp-type-badge[_ngcontent-%COMP%]{opacity:.8}.mcp-fraction[_ngcontent-%COMP%]{font-size:13px;font-variant-numeric:tabular-nums;font-weight:600;white-space:nowrap}.mcp-access-chip[_ngcontent-%COMP%]{cursor:pointer}.mcp-rows[_ngcontent-%COMP%] .mcp-type-badge[_ngcontent-%COMP%]{display:none}.mcp-row-left[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px 8px;flex-wrap:wrap;flex:1 1 0;min-width:0}.mcp-cells[_ngcontent-%COMP%]{display:flex;gap:8px;flex:none}.mcp-cellgroup[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center}.mcp-cellgroup[_ngcontent-%COMP%] + .mcp-cellgroup[_ngcontent-%COMP%]{border-left:1px solid var(--df-border-2);padding-left:8px;margin-left:-1px}.mcp-cellgroup-cols[_ngcontent-%COMP%]{display:flex}.mcp-row-tail[_ngcontent-%COMP%]{width:76px;flex:none;display:inline-flex;align-items:center;justify-content:flex-end}.mcp-cell[_ngcontent-%COMP%]{width:26px;height:26px;padding:0;display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:var(--df-radius-sm, 4px);background:transparent;cursor:pointer}.mcp-cell[_ngcontent-%COMP%]:hover{background:var(--df-hover);border-color:var(--df-border)}.mcp-cell[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--df-accent);outline-offset:1px}.mcp-cell[_ngcontent-%COMP%] i[_ngcontent-%COMP%], .mcp-cell-dot[_ngcontent-%COMP%]{display:inline-block;width:12px;height:12px;border-radius:3px;box-sizing:border-box;background:var(--df-success)}.mcp-cell.write[_ngcontent-%COMP%] i[_ngcontent-%COMP%], .mcp-cell-dot.write[_ngcontent-%COMP%]{background:var(--df-warning)}.mcp-cell[data-state=off][_ngcontent-%COMP%] i[_ngcontent-%COMP%], .mcp-cell-dot[data-state=off][_ngcontent-%COMP%]{background:transparent;border:1.5px solid var(--df-text-faint)}.mcp-cell[data-state=writes-off][_ngcontent-%COMP%] i[_ngcontent-%COMP%], .mcp-cell-dot[data-state=writes-off][_ngcontent-%COMP%]{background:repeating-linear-gradient(45deg,var(--df-border) 0 2px,transparent 2px 4px);border:1px solid var(--df-border)}.mcp-grid-head[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:8px;padding:10px 12px 6px;border-bottom:1px solid var(--df-border);background:var(--df-surface-2)}.mcp-row[_ngcontent-%COMP%] + .mcp-grid-head[_ngcontent-%COMP%]{border-top:1px solid var(--df-border)}.mcp-grid-head-left[_ngcontent-%COMP%]{flex:1 1 0;min-width:0;display:flex;flex-direction:column;gap:2px;align-self:flex-end;padding-bottom:4px}.mcp-grid-head-left[_ngcontent-%COMP%] .mcp-grid-head-title[_ngcontent-%COMP%]{font-weight:600;font-size:13px}.mcp-grid-head-left[_ngcontent-%COMP%] .mcp-grid-head-hint[_ngcontent-%COMP%]{font-size:12px;color:var(--df-text-muted)}.mcp-cellgroup-label[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:3px;margin-bottom:6px;font-size:10.5px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--df-text-muted);white-space:nowrap}.write[_ngcontent-%COMP%] > .mcp-cellgroup-label[_ngcontent-%COMP%]{color:var(--df-warning)}.mcp-colhead[_ngcontent-%COMP%]{width:26px;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:5px;height:172px}.mcp-colhead[_ngcontent-%COMP%] .mcp-colhead-name[_ngcontent-%COMP%]{writing-mode:vertical-rl;transform:rotate(180deg);font-family:monospace;font-size:11px;color:var(--df-text-2);white-space:nowrap}.mcp-sw[_ngcontent-%COMP%]{position:relative;flex:none;width:18px;height:10px;padding:0;border:1px solid var(--df-border);border-radius:999px;background:var(--df-surface-2);cursor:pointer}.mcp-sw[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{position:absolute;top:1px;left:1px;width:6px;height:6px;border-radius:50%;background:var(--df-text-faint);transition:left .12s ease}.mcp-sw[data-state=on][_ngcontent-%COMP%]{background:var(--df-accent);border-color:var(--df-accent)}.mcp-sw[data-state=on][_ngcontent-%COMP%] i[_ngcontent-%COMP%]{left:9px;background:var(--df-accent-contrast)}.mcp-sw[data-state=mixed][_ngcontent-%COMP%]{background:linear-gradient(90deg,var(--df-accent) 50%,var(--df-surface-2) 50%);border-color:var(--df-accent)}.mcp-sw[data-state=mixed][_ngcontent-%COMP%] i[_ngcontent-%COMP%]{left:5px;background:var(--df-accent-contrast)}.mcp-sw[_ngcontent-%COMP%]:hover{box-shadow:0 0 0 3px var(--df-accent-soft)}.mcp-sw[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--df-accent);outline-offset:1px}.mcp-legend[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:16px;margin:8px 2px 0;font-size:12px;color:var(--df-text-muted)}.mcp-legend[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px}.mcp-row-menu-btn[_ngcontent-%COMP%]{font-size:16px;line-height:1}.mcp-row-caret[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;font:inherit;font-size:13px;opacity:.7;padding:4px 6px}.mcp-menu-danger[_ngcontent-%COMP%]{color:var(--df-danger)}.mcp-drill[_ngcontent-%COMP%]{padding:4px 8px 10px 30px}.mcp-drill[_ngcontent-%COMP%] .mcp-drill-alloff[_ngcontent-%COMP%]{font-size:13px;font-weight:600;color:var(--df-warning);background:var(--df-warning-soft);border:1px solid color-mix(in srgb,var(--df-warning) 40%,transparent);border-radius:8px;padding:7px 11px;margin:4px 0 8px}.mcp-drill[_ngcontent-%COMP%] .mcp-drill-caption[_ngcontent-%COMP%]{font-size:12.5px;opacity:.7;margin:4px 0 8px}.mcp-group-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:1px 0}.mcp-group-row[_ngcontent-%COMP%] .mcp-group-count[_ngcontent-%COMP%]{font-size:12px;opacity:.6;font-variant-numeric:tabular-nums}.mcp-warn-tag[_ngcontent-%COMP%]{font-size:11.5px;font-weight:700;color:var(--df-warning)}.mcp-linklike[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;font:inherit;font-size:13px;font-weight:600;color:var(--df-accent);padding:6px 0 2px;text-align:left}.mcp-tool-list[_ngcontent-%COMP%]{padding:2px 0 4px 8px}.mcp-tool-row[_ngcontent-%COMP%]{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;padding:1px 0}.mcp-tool-row[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-size:12.5px}.mcp-tool-desc[_ngcontent-%COMP%]{font-size:12px;opacity:.6}.mcp-drill-foot[_ngcontent-%COMP%]{display:flex;gap:8px;flex-wrap:wrap;padding-top:8px}.mcp-rows-nomatch[_ngcontent-%COMP%]{padding:14px 16px;font-size:13px;opacity:.65;margin:0}.mcp-bulk-bar[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;flex-wrap:wrap;background:color-mix(in srgb,var(--df-accent) 8%,transparent);border:1px solid color-mix(in srgb,var(--df-accent) 35%,transparent);border-radius:10px;padding:8px 14px;margin-bottom:14px;font-size:13px;font-weight:600}.mcp-peer-section[_ngcontent-%COMP%]{padding:10px 14px}.mcp-peer-head[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;flex-wrap:wrap;width:100%;background:none;border:none;padding:2px 0;font:inherit;text-align:left}.mcp-peer-head[_ngcontent-%COMP%] .mcp-peer-title[_ngcontent-%COMP%]{font-weight:700;font-size:13.5px}.mcp-peer-head[_ngcontent-%COMP%] .mcp-peer-caption[_ngcontent-%COMP%]{font-size:12px;opacity:.6}.mcp-peer-head[_ngcontent-%COMP%] .mcp-fraction[_ngcontent-%COMP%]{margin-left:auto}button.mcp-peer-head[_ngcontent-%COMP%]{cursor:pointer}.mcp-custom-list[_ngcontent-%COMP%]{margin-top:6px}.mcp-custom-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;flex-wrap:wrap;border-top:1px solid color-mix(in srgb,var(--df-text) 6%,transparent);padding:5px 0}.mcp-custom-row[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-size:12.5px;font-weight:600}.mcp-custom-row[_ngcontent-%COMP%] .mcp-custom-actions[_ngcontent-%COMP%]{margin-left:auto;display:inline-flex;gap:2px}.mcp-custom-empty[_ngcontent-%COMP%]{margin:8px 0 2px}.mcp-sys-group[_ngcontent-%COMP%]{padding:10px 14px;border-top:1px solid color-mix(in srgb,var(--df-text) 6%,transparent)}.mcp-sys-group[_ngcontent-%COMP%]:first-child{border-top:none}.mcp-rail[_ngcontent-%COMP%]{background:var(--df-surface);border:1px solid color-mix(in srgb,var(--df-text) 8%,transparent);border-radius:10px;padding:14px 16px;position:sticky;top:12px}@media (max-width: 1119px){.mcp-rail[_ngcontent-%COMP%]{position:static}}.mcp-rail-title[_ngcontent-%COMP%]{font-size:11.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.7;margin:0 0 6px}.mcp-rail-total[_ngcontent-%COMP%]{font-size:15px;margin:0 0 6px}.mcp-rail-total[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{font-size:22px;font-variant-numeric:tabular-nums}.mcp-rail-breakdown[_ngcontent-%COMP%]{list-style:none;padding:0;margin:0 0 12px;font-size:12.5px;opacity:.85}.mcp-rail-breakdown[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{padding:1px 0}.mcp-rail-ro[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:12px}.mcp-rail-ro[_ngcontent-%COMP%] .mcp-rail-note[_ngcontent-%COMP%]{font-size:12.5px}.mcp-rail-serving[_ngcontent-%COMP%]{font-size:12px;opacity:.75;background:color-mix(in srgb,var(--df-text) 3%,transparent);border-radius:8px;padding:8px 10px;margin:0 0 12px}.mcp-rail-serving[_ngcontent-%COMP%] .mcp-info[_ngcontent-%COMP%]{cursor:help;font-weight:600;color:var(--df-accent);white-space:nowrap}.mcp-rail-preview-btn[_ngcontent-%COMP%]{width:100%;margin-bottom:12px}.mcp-rail-reach[_ngcontent-%COMP%]{margin-bottom:8px}.mcp-rail-reach[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{list-style:none;padding:2px 0 0 14px;margin:0;font-size:12px;font-variant-numeric:tabular-nums}.mcp-rail-reach[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-size:11.5px}.mcp-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:5px;padding:2px 9px;border-radius:999px;font-size:12px;font-weight:600;border:1px solid color-mix(in srgb,var(--df-text) 14%,transparent);background:color-mix(in srgb,var(--df-text) 2%,transparent);white-space:nowrap}.mcp-chip.good[_ngcontent-%COMP%]{background:var(--df-success-soft);border-color:color-mix(in srgb,var(--df-success) 35%,transparent);color:var(--df-success)}.mcp-chip.warn[_ngcontent-%COMP%]{background:var(--df-warning-soft);border-color:color-mix(in srgb,var(--df-warning) 40%,transparent);color:var(--df-warning)}.mcp-chip.primary[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--df-accent) 10%,transparent);border-color:color-mix(in srgb,var(--df-accent) 38%,transparent);color:var(--df-accent)}.mcp-chip-btn[_ngcontent-%COMP%]{cursor:pointer;font:inherit;font-size:12px;font-weight:600}@media (max-width: 1100px){.mcp-row-head[_ngcontent-%COMP%]{flex-wrap:wrap;row-gap:4px}.mcp-drill[_ngcontent-%COMP%]{padding-left:12px}.mcp-grid-head[_ngcontent-%COMP%]{display:none}.mcp-row-tail[_ngcontent-%COMP%]{width:auto}}']})}}return n})();function Fg(n,a){if(1&n&&(e.j41(0,"span",9),e.EFF(1),e.k0s()),2&n){const t=a.ngIf;e.R7$(1),e.SpI(" \u2014 from \u201c",t,"\u201d? ")}}function wg(n,a){if(1&n){const t=e.RV6();e.j41(0,"li")(1,"mat-checkbox",7),e.bIt("change",function(i){const c=e.eBV(t).$implicit,s=e.XpG();return e.Njj(s.toggle(c,i.checked))}),e.j41(2,"code"),e.EFF(3),e.k0s(),e.DNE(4,Fg,2,1,"span",8),e.k0s()()}if(2&n){const t=a.$implicit,o=e.XpG();e.R7$(1),e.Y8G("checked",o.checked[t]),e.BMQ("data-testid","mcp-orphan-"+t),e.R7$(2),e.JRh(t),e.R7$(1),e.Y8G("ngIf",o.originOf(t))}}const Dg=[...Cn,...kn].flatMap(n=>n.verbs.map(a=>a.verb)).sort((n,a)=>a.length-n.length);let Sg=(()=>{class n{constructor(t,o){this.dialogRef=t,this.data=o,this.checked={};for(const i of o.keys)this.checked[i]=!0}toggle(t,o){this.checked[t]=o}get selected(){return this.data.keys.filter(t=>this.checked[t])}originOf(t){return function Tg(n){for(const a of Dg)if(n.endsWith("_"+a)&&n.length>a.length+1)return n.slice(0,n.length-a.length-1);return null}(t)}deleteSelected(){this.dialogRef.close(this.selected)}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(h.CP),e.rXU(h.Vh))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-mcp-housekeeping-dialog"]],standalone:!0,features:[e.aNF],decls:12,vars:2,consts:[["data-testid","mcp-housekeeping-dialog",1,"mcp-hk-dialog"],[1,"mcp-hk-note"],[1,"mcp-hk-list"],[4,"ngFor","ngForOf"],[1,"mcp-hk-actions"],["mat-button","","type","button",3,"click"],["mat-flat-button","","color","warn","type","button","data-testid","mcp-housekeeping-delete",3,"disabled","click"],[3,"checked","change"],["class","mcp-hk-origin",4,"ngIf"],[1,"mcp-hk-origin"]],template:function(o,i){1&o&&(e.j41(0,"div",0)(1,"h2"),e.EFF(2,"Review & clean up"),e.k0s(),e.j41(3,"p",1),e.EFF(4," These saved tool settings reference services that no longer exist. Checked entries are deleted; unchecked entries are kept. "),e.k0s(),e.j41(5,"ul",2),e.DNE(6,wg,5,4,"li",3),e.k0s(),e.j41(7,"div",4)(8,"button",5),e.bIt("click",function(){return i.dialogRef.close()}),e.EFF(9," Cancel "),e.k0s(),e.j41(10,"button",6),e.bIt("click",function(){return i.deleteSelected()}),e.EFF(11," Delete selected "),e.k0s()()()),2&o&&(e.R7$(6),e.Y8G("ngForOf",i.data.keys),e.R7$(4),e.Y8G("disabled",0===i.selected.length))},dependencies:[d.MD,d.Sq,d.bT,u.Hl,u.$z,j.g7,j.So,h.hM],styles:[".mcp-hk-dialog[_ngcontent-%COMP%]{padding:18px 20px 14px;font-family:Inter,Helvetica Neue,sans-serif;max-width:460px}h2[_ngcontent-%COMP%]{margin:0 0 8px;font-size:16px;font-weight:700}.mcp-hk-note[_ngcontent-%COMP%]{font-size:13px;opacity:.75;margin:0 0 10px}.mcp-hk-list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;max-height:320px;overflow-y:auto}.mcp-hk-list[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-size:12.5px;background:color-mix(in srgb,var(--df-text) 3.5%,transparent);border:1px solid color-mix(in srgb,var(--df-text) 8%,transparent);border-radius:5px;padding:1px 6px;word-break:break-all}.mcp-hk-origin[_ngcontent-%COMP%]{font-size:12px;opacity:.6;margin-left:4px}.mcp-hk-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:8px;margin-top:14px}"]})}}return n})();function Rg(n,a){if(1&n&&(e.j41(0,"p",44),e.EFF(1),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.SpI(" Renaming changes your endpoint URL to \u2026/mcp/",t.store.draftName,". Connected clients will break until they update. ")}}function Ig(n,a){1&n&&(e.j41(0,"p",45),e.EFF(1," This server is inactive \u2014 the endpoint refuses connections. "),e.k0s())}function Eg(n,a){if(1&n){const t=e.RV6();e.j41(0,"li")(1,"code"),e.EFF(2),e.k0s(),e.j41(3,"button",46),e.bIt("click",function(){const r=e.eBV(t).index,c=e.XpG();return e.Njj(c.removeRedirect(r))}),e.EFF(4," \xd7 "),e.k0s()()}if(2&n){const t=a.$implicit;e.R7$(2),e.JRh(t),e.R7$(1),e.BMQ("aria-label","Remove "+t)}}function $g(n,a){1&n&&(e.j41(0,"li",47),e.EFF(1," No redirect URIs yet \u2014 OAuth clients that need a callback can't connect until theirs is added. "),e.k0s())}function Gg(n,a){if(1&n&&(e.j41(0,"mat-option",20),e.EFF(1),e.k0s()),2&n){const t=e.XpG();e.Y8G("value",t.store.cfg.autoOauthService),e.R7$(1),e.SpI(" ",t.store.cfg.autoOauthService," (not found on this instance) ")}}function jg(n,a){if(1&n&&(e.j41(0,"mat-option",20),e.EFF(1),e.k0s()),2&n){const t=a.$implicit;e.Y8G("value",t.name),e.R7$(1),e.Lme(" ",t.label," (",t.name,") ")}}function Ng(n,a){1&n&&(e.qex(0),e.EFF(1," Only users and API keys whose role is granted access to this MCP service can connect. Admins always can. "),e.bVm())}function Ag(n,a){1&n&&e.EFF(0," Anyone who can sign in to DreamFactory can connect; their role still decides what they can reach. ")}function Yg(n,a){1&n&&(e.j41(0,"span",54),e.EFF(1," Matches the recommended default. "),e.k0s())}function Vg(n,a){1&n&&(e.j41(0,"span",54),e.EFF(1," Server default (per-service names). "),e.k0s())}function Xg(n,a){1&n&&(e.j41(0,"p",55),e.EFF(1," Style changes rename emitted tools \u2014 preview before saving. Clients may need to reconnect. Your tool selections are preserved \u2014 they apply per service in both modes. "),e.k0s())}function zg(n,a){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"h3",10),e.EFF(2,"Tool naming"),e.k0s(),e.j41(3,"mat-radio-group",48),e.bIt("change",function(i){e.eBV(t);const r=e.XpG();return e.Njj(r.onToolStyleChange(i))}),e.j41(4,"mat-radio-button",49)(5,"span",50),e.EFF(6," Consolidated (merged) \u2014 one tool per verb with a service argument. Recommended. "),e.k0s(),e.DNE(7,Yg,2,0,"span",51),e.k0s(),e.j41(8,"mat-radio-button",52)(9,"span",50),e.EFF(10," Per-service names (prefixed) \u2014 legacy compatibility for clients pinned to names like crm_get_tables. "),e.k0s(),e.DNE(11,Vg,2,0,"span",51),e.k0s()(),e.DNE(12,Xg,2,0,"p",53),e.bVm()}if(2&n){const t=e.XpG();e.R7$(3),e.Y8G("value",t.toolStyleValue),e.R7$(4),e.Y8G("ngIf","merged"===t.store.cfg.toolStyle),e.R7$(4),e.Y8G("ngIf",null===t.store.cfg.toolStyle),e.R7$(1),e.Y8G("ngIf",t.styleChanged)}}function Bg(n,a){1&n&&(e.qex(0),e.EFF(1," Write tools you leave on can create, update and delete records and files and call procedures, subject to the caller's role. "),e.bVm())}function Lg(n,a){1&n&&e.EFF(0," Read-only server: write tools and custom tools that write are never offered, whatever the per-tool settings. Clients must reconnect to pick up a change. ")}function Ug(n,a){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"h3",10),e.EFF(2,"Writes"),e.k0s(),e.j41(3,"mat-slide-toggle",56),e.bIt("change",function(i){e.eBV(t);const r=e.XpG();return e.Njj(r.setAllowWrites(i))}),e.EFF(4," Allow writes "),e.k0s(),e.j41(5,"p",23),e.DNE(6,Bg,2,0,"ng-container",26),e.DNE(7,Lg,1,0,"ng-template",null,57,e.C5r),e.k0s(),e.bVm()}if(2&n){const t=e.sdS(8),o=e.XpG();e.R7$(3),e.Y8G("checked",o.store.cfg.allowWrites),e.R7$(2),e.AVh("warn",!o.store.cfg.allowWrites),e.R7$(1),e.Y8G("ngIf",o.store.cfg.allowWrites)("ngIfElse",t)}}function qg(n,a){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"p",45),e.EFF(2),e.k0s(),e.j41(3,"button",58),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.openHousekeeping())}),e.EFF(4," Review & clean up "),e.k0s(),e.bVm()}if(2&n){const t=e.XpG();e.R7$(2),e.Lme(" ",t.orphanCount," saved tool ",1===t.orphanCount?"setting references":"settings reference"," services that no longer exist. Nothing is removed automatically \u2014 review before deleting. ")}}function Kg(n,a){1&n&&(e.j41(0,"p",23),e.EFF(1,"No orphaned tool settings."),e.k0s())}let Wg=(()=>{class n{ngOnChanges(t){t.store&&!t.store.firstChange&&(this.newRedirectUri="")}constructor(t,o,i,r,c){this.serviceTypeService=t,this.servicesService=o,this.cacheService=i,this.snackbarService=r,this.dialog=c,this.requestDelete=new e.bkB,this.oauthServices=[],this.oauthLoaded=!1,this.newRedirectUri="",this.flushingCache=!1}ngOnInit(){this.loadOauthServices()}loadOauthServices(){(0,ue.p)({types:this.serviceTypeService.getAll({fields:"name,group",limit:1e3}),services:this.servicesService.getAll({limit:1e3,fields:"id,name,label,type",sort:"name"})}).subscribe({next:({types:t,services:o})=>{const i=new Set((t?.resource??[]).filter(r=>"OAuth"===r.group).map(r=>r.name));this.oauthServices=(o?.resource??[]).filter(r=>i.has(r.type)).map(r=>({name:r.name,label:r.label||r.name})),this.oauthLoaded=!0},error:()=>{this.oauthLoaded=!0}})}get renamePending(){return this.store.draftName!==this.store.service.name}setName(t){this.store.draftName=t,this.store.touch()}setLabel(t){this.store.draftLabel=t,this.store.touch()}setDescription(t){this.store.draftDescription=t,this.store.touch()}setActive(t){this.store.draftIsActive=t.checked,this.store.touch()}addRedirect(){const t=this.newRedirectUri.trim();if(t){if(this.store.cfg.redirectUris.includes(t))return void this.snackbarService.openSnackBar("That redirect URI is already listed.","warning");this.store.cfg.redirectUris.push(t),this.newRedirectUri="",this.store.touch()}}removeRedirect(t){this.store.cfg.redirectUris.splice(t,1),this.store.touch()}setLoginUrl(t){this.store.cfg.customLoginUrl=t,this.store.touch()}setAutoOauth(t){this.store.cfg.autoOauthService=t,this.store.touch()}get missingAutoOauth(){const t=this.store.cfg.autoOauthService;return!!t&&this.oauthLoaded&&!this.oauthServices.some(o=>o.name===t)}setAllowApiKey(t){this.store.cfg.allowApiKeyAuth=t.checked,this.store.touch()}setRequireRoleAccess(t){this.store.cfg.requireRoleAccess=t.checked,this.store.touch()}setAllowWrites(t){this.store.cfg.allowWrites=t.checked,this.store.touch()}regenerateSecret(){window.confirm("Clients using the old secret will stop connecting. Regenerate?")&&(this.store.cfg.oauthClientSecret=function Hg(){const n=new Uint8Array(32),a=globalThis.crypto;if(a?.getRandomValues)a.getRandomValues(n);else for(let t=0;tt.toString(16).padStart(2,"0")).join("")}(),this.store.touch(),this.snackbarService.openSnackBar("New client secret generated \u2014 save to apply.","success"))}get toolStyleValue(){return"merged"===this.store.cfg.toolStyle?"merged":"prefixed"}onToolStyleChange(t){this.store.cfg.toolStyle="merged"===t.value?"merged":"prefixed",this.store.touch()}get styleChanged(){return this.store.cfg.toolStyle!==this.store.savedCfg.toolStyle}get lazyValue(){return Ft(this.store.cfg.lazyMode)}setLazy(t){this.store.cfg.lazyMode=t,this.store.touch()}get scopeToolsOn(){const t=this.store.cfg.rest??{},o=t.scope_tools??t.scopeTools;return null==o||!!o}get orphanCount(){return this.store.backendLoaded?this.store.orphans().length:0}openHousekeeping(){const t=this.store.orphans();t.length&&this.dialog.open(Sg,{data:{keys:t},width:"480px"}).afterClosed().subscribe(o=>{if(o&&0!==o.length){for(const i of o)this.store.cfg.disabledTools.delete(i);this.store.touch(),this.snackbarService.openSnackBar(`Removed ${o.length} saved tool setting${1===o.length?"":"s"} \u2014 save to apply.`,"success")}})}flushCache(){this.flushingCache||(this.flushingCache=!0,this.cacheService.delete(this.store.service.name).subscribe({next:()=>{this.flushingCache=!1,this.snackbarService.openSnackBar("Cache flushed.","success")},error:()=>{this.flushingCache=!1,this.snackbarService.openSnackBar("Cache flush failed.","error")}}))}get fullConfigJson(){const t=Mn(this.store.cfg,this.store.service.type);return t.oauthClientSecret&&(t.oauthClientSecret="\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022"),JSON.stringify(t,null,2)}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(U.zs),e.rXU(U.Z1),e.rXU(U.j8),e.rXU(pe.L),e.rXU(h.bZ))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-mcp-settings"]],inputs:{store:"store"},outputs:{requestDelete:"requestDelete"},standalone:!0,features:[e.OA$,e.aNF],decls:110,vars:28,consts:[["data-testid","mcp-settings-tab",1,"mcp-settings"],[1,"mcp-card"],[1,"mcp-card-title"],["appearance","outline",1,"mcp-field"],["matInput","","data-testid","mcp-set-name",3,"ngModel","ngModelChange"],["class","mcp-inline-warning","data-testid","mcp-rename-warning",4,"ngIf"],["matInput","","data-testid","mcp-set-label",3,"ngModel","ngModelChange"],["matInput","","rows","3","data-testid","mcp-set-description",3,"ngModel","ngModelChange"],["color","primary","data-testid","mcp-set-active",3,"checked","change"],["class","mcp-hint warn",4,"ngIf"],[1,"mcp-sub-title"],["data-testid","mcp-redirect-list",1,"mcp-redirect-list"],[4,"ngFor","ngForOf"],["class","mcp-redirect-empty",4,"ngIf"],[1,"mcp-redirect-addrow"],["appearance","outline",1,"mcp-field","grow"],["matInput","","placeholder","https://client.example.com/callback","data-testid","mcp-redirect-add",3,"ngModel","ngModelChange","keyup.enter"],["mat-stroked-button","","type","button","data-testid","mcp-redirect-add-btn",3,"click"],["matInput","","placeholder","https://login.example.com","data-testid","mcp-login-url",3,"ngModel","ngModelChange"],["data-testid","mcp-auto-oauth",3,"value","selectionChange"],[3,"value"],[3,"value",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],[1,"mcp-hint"],["color","primary","data-testid","mcp-apikey-toggle",3,"checked","change"],["color","primary","data-testid","mcp-require-role-toggle",3,"checked","change"],[4,"ngIf","ngIfElse"],["anyUser",""],[1,"mcp-regenerate-row"],["mat-stroked-button","","type","button","data-testid","mcp-regenerate-secret",3,"click"],[4,"ngIf"],["data-testid","mcp-lazy-select",3,"value","selectionChange"],["value","auto"],["value","on"],["value","off"],["data-testid","mcp-scope-line",1,"mcp-scope-line"],["data-testid","mcp-housekeeping",1,"mcp-card"],["noOrphans",""],[1,"mcp-flush-row"],["mat-stroked-button","","type","button","data-testid","mcp-flush-cache",3,"disabled","click"],["data-testid","mcp-fullconfig",1,"mcp-fullconfig"],[1,"mcp-card","mcp-danger"],[1,"mcp-danger-copy"],["mat-flat-button","","color","warn","type","button","data-testid","mcp-delete-server",3,"click"],["data-testid","mcp-rename-warning",1,"mcp-inline-warning"],[1,"mcp-hint","warn"],["type","button",1,"mcp-x",3,"click"],[1,"mcp-redirect-empty"],[1,"mcp-toolstyle",3,"value","change"],["value","merged","data-testid","mcp-toolstyle-merged"],[1,"mcp-radio-label"],["class","mcp-radio-note",4,"ngIf"],["value","prefixed","data-testid","mcp-toolstyle-prefixed"],["class","mcp-hint warn","data-testid","mcp-toolstyle-note",4,"ngIf"],[1,"mcp-radio-note"],["data-testid","mcp-toolstyle-note",1,"mcp-hint","warn"],["color","primary","data-testid","mcp-allow-writes-toggle",3,"checked","change"],["readOnlyServer",""],["mat-stroked-button","","type","button","data-testid","mcp-housekeeping-review",3,"click"]],template:function(o,i){if(1&o&&(e.j41(0,"div",0)(1,"section",1)(2,"h2",2),e.EFF(3,"Identity"),e.k0s(),e.j41(4,"mat-form-field",3)(5,"mat-label"),e.EFF(6,"Name (namespace)"),e.k0s(),e.j41(7,"input",4),e.bIt("ngModelChange",function(c){return i.setName(c)}),e.k0s()(),e.DNE(8,Rg,2,1,"p",5),e.j41(9,"mat-form-field",3)(10,"mat-label"),e.EFF(11,"Label"),e.k0s(),e.j41(12,"input",6),e.bIt("ngModelChange",function(c){return i.setLabel(c)}),e.k0s()(),e.j41(13,"mat-form-field",3)(14,"mat-label"),e.EFF(15,"Description"),e.k0s(),e.j41(16,"textarea",7),e.bIt("ngModelChange",function(c){return i.setDescription(c)}),e.k0s()(),e.j41(17,"mat-slide-toggle",8),e.bIt("change",function(c){return i.setActive(c)}),e.EFF(18," Active "),e.k0s(),e.DNE(19,Ig,2,0,"p",9),e.k0s(),e.j41(20,"section",1)(21,"h2",2),e.EFF(22,"Authentication"),e.k0s(),e.j41(23,"h3",10),e.EFF(24,"Redirect URIs"),e.k0s(),e.j41(25,"ul",11),e.DNE(26,Eg,5,2,"li",12),e.DNE(27,$g,2,0,"li",13),e.k0s(),e.j41(28,"div",14)(29,"mat-form-field",15)(30,"mat-label"),e.EFF(31,"Add redirect URI"),e.k0s(),e.j41(32,"input",16),e.bIt("ngModelChange",function(c){return i.newRedirectUri=c})("keyup.enter",function(){return i.addRedirect()}),e.k0s()(),e.j41(33,"button",17),e.bIt("click",function(){return i.addRedirect()}),e.EFF(34," Add "),e.k0s()(),e.j41(35,"mat-form-field",3)(36,"mat-label"),e.EFF(37,"Custom login URL"),e.k0s(),e.j41(38,"input",18),e.bIt("ngModelChange",function(c){return i.setLoginUrl(c)}),e.k0s()(),e.j41(39,"mat-form-field",3)(40,"mat-label"),e.EFF(41,"Auto OAuth service"),e.k0s(),e.j41(42,"mat-select",19),e.bIt("selectionChange",function(c){return i.setAutoOauth(c.value)}),e.j41(43,"mat-option",20),e.EFF(44,"None"),e.k0s(),e.DNE(45,Gg,2,2,"mat-option",21),e.DNE(46,jg,2,3,"mat-option",22),e.k0s()(),e.j41(47,"p",23),e.EFF(48," Sign-ins are sent straight to this OAuth provider instead of the DreamFactory login form. "),e.k0s(),e.j41(49,"mat-slide-toggle",24),e.bIt("change",function(c){return i.setAllowApiKey(c)}),e.EFF(50," Allow API-key authentication "),e.k0s(),e.j41(51,"p",23),e.EFF(52," Anyone with the URL and a valid API key connects without a login prompt. The key's role decides which tools it can use. "),e.k0s(),e.j41(53,"mat-slide-toggle",25),e.bIt("change",function(c){return i.setRequireRoleAccess(c)}),e.EFF(54," Require role access "),e.k0s(),e.j41(55,"p",23),e.DNE(56,Ng,2,0,"ng-container",26),e.DNE(57,Ag,1,0,"ng-template",null,27,e.C5r),e.k0s(),e.j41(59,"div",28)(60,"button",29),e.bIt("click",function(){return i.regenerateSecret()}),e.EFF(61," Regenerate client secret\u2026 "),e.k0s(),e.j41(62,"span",23),e.EFF(63," Clients using the old secret will stop connecting. "),e.k0s()()(),e.j41(64,"section",1)(65,"h2",2),e.EFF(66,"Serving"),e.k0s(),e.DNE(67,zg,13,4,"ng-container",30),e.DNE(68,Ug,9,5,"ng-container",30),e.j41(69,"h3",10),e.EFF(70,"Catalog delivery"),e.k0s(),e.j41(71,"mat-form-field",3)(72,"mat-label"),e.EFF(73,"Catalog delivery"),e.k0s(),e.j41(74,"mat-select",31),e.bIt("selectionChange",function(c){return i.setLazy(c.value)}),e.j41(75,"mat-option",32),e.EFF(76,"Auto \u2014 recommended"),e.k0s(),e.j41(77,"mat-option",33),e.EFF(78,"Always on-demand"),e.k0s(),e.j41(79,"mat-option",34),e.EFF(80,"Never"),e.k0s()()(),e.j41(81,"p",23),e.EFF(82," When the tool list exceeds 32 KB (~8k tokens), agents first receive five discovery tools instead of the full catalog. "),e.k0s(),e.j41(83,"p",35),e.EFF(84),e.k0s()(),e.j41(85,"section",36)(86,"h2",2),e.EFF(87,"Housekeeping"),e.k0s(),e.DNE(88,qg,5,2,"ng-container",26),e.DNE(89,Kg,2,0,"ng-template",null,37,e.C5r),e.j41(91,"div",38)(92,"button",39),e.bIt("click",function(){return i.flushCache()}),e.EFF(93," Flush cache now "),e.k0s(),e.j41(94,"span",23),e.EFF(95," Saves flush the cache automatically \u2014 this one is for support. "),e.k0s()()(),e.j41(96,"section",1)(97,"h2",2),e.EFF(98,"Full configuration"),e.k0s(),e.j41(99,"p",23),e.EFF(100," The stored config, read-only \u2014 what the audit sees is what you see. "),e.k0s(),e.j41(101,"pre",40),e.EFF(102),e.k0s()(),e.j41(103,"section",41)(104,"h2",2),e.EFF(105,"Danger zone"),e.k0s(),e.j41(106,"p",42),e.EFF(107," Delete this MCP server. Clients lose access immediately. "),e.k0s(),e.j41(108,"button",43),e.bIt("click",function(){return i.requestDelete.emit()}),e.EFF(109," Delete server\u2026 "),e.k0s()()()),2&o){const r=e.sdS(58),c=e.sdS(90);e.R7$(7),e.Y8G("ngModel",i.store.draftName),e.R7$(1),e.Y8G("ngIf",i.renamePending),e.R7$(4),e.Y8G("ngModel",i.store.draftLabel),e.R7$(4),e.Y8G("ngModel",i.store.draftDescription),e.R7$(1),e.Y8G("checked",i.store.draftIsActive),e.R7$(2),e.Y8G("ngIf",!i.store.draftIsActive),e.R7$(7),e.Y8G("ngForOf",i.store.cfg.redirectUris),e.R7$(1),e.Y8G("ngIf",0===i.store.cfg.redirectUris.length),e.R7$(5),e.Y8G("ngModel",i.newRedirectUri),e.R7$(6),e.Y8G("ngModel",i.store.cfg.customLoginUrl),e.R7$(4),e.Y8G("value",i.store.cfg.autoOauthService),e.R7$(1),e.Y8G("value",null),e.R7$(2),e.Y8G("ngIf",i.missingAutoOauth),e.R7$(1),e.Y8G("ngForOf",i.oauthServices),e.R7$(3),e.Y8G("checked",i.store.cfg.allowApiKeyAuth),e.R7$(4),e.Y8G("checked",i.store.cfg.requireRoleAccess),e.R7$(2),e.AVh("warn",!i.store.cfg.requireRoleAccess),e.R7$(1),e.Y8G("ngIf",i.store.cfg.requireRoleAccess)("ngIfElse",r),e.R7$(11),e.Y8G("ngIf",!i.store.isSystemMcp),e.R7$(1),e.Y8G("ngIf",!i.store.isSystemMcp),e.R7$(6),e.Y8G("value",i.lazyValue),e.R7$(10),e.SpI(" Scope tools to caller's role: ",i.scopeToolsOn?"on":"off"," \u2014 set by MCP_SCOPE_TOOLS on the server. "),e.R7$(4),e.Y8G("ngIf",i.orphanCount>0)("ngIfElse",c),e.R7$(4),e.Y8G("disabled",i.flushingCache),e.R7$(10),e.JRh(i.fullConfigJson)}},dependencies:[d.MD,d.Sq,d.bT,m.YN,m.me,m.BC,m.vS,u.Hl,u.$z,h.hM,O.RG,O.rl,O.nJ,E.fS,E.fg,J.Wk,J.VT,J._g,G.Ve,G.VO,q.wT,X.mV,X.sG,S.uc],styles:[".mcp-settings[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:14px;max-width:760px}.mcp-card[_ngcontent-%COMP%]{background:var(--df-surface);border:1px solid color-mix(in srgb,var(--df-text) 8%,transparent);border-radius:10px;padding:16px 18px}.mcp-card[_ngcontent-%COMP%] .mcp-card-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;font-size:14.5px;font-weight:700;margin:0 0 12px}.mcp-sub-title[_ngcontent-%COMP%]{font-size:12.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.6;margin:14px 0 8px}.mcp-sub-title[_ngcontent-%COMP%]:first-of-type{margin-top:0}.mcp-field[_ngcontent-%COMP%]{display:block;width:100%}.mcp-hint[_ngcontent-%COMP%]{font-size:12.5px;opacity:.7;margin:2px 0 12px}.mcp-hint.warn[_ngcontent-%COMP%]{color:var(--df-warning);opacity:1;font-weight:500}.mcp-inline-warning[_ngcontent-%COMP%]{background:var(--df-warning-soft);border:1px solid color-mix(in srgb,var(--df-warning) 40%,transparent);color:var(--df-warning);border-radius:8px;padding:8px 12px;font-size:13px;font-weight:500;margin:-6px 0 14px}.mcp-redirect-list[_ngcontent-%COMP%]{list-style:none;margin:0 0 8px;padding:0;display:flex;flex-direction:column;gap:6px}.mcp-redirect-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.mcp-redirect-list[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-size:12.5px;background:color-mix(in srgb,var(--df-text) 3.5%,transparent);border:1px solid color-mix(in srgb,var(--df-text) 8%,transparent);border-radius:6px;padding:3px 8px;word-break:break-all}.mcp-redirect-list[_ngcontent-%COMP%] .mcp-redirect-empty[_ngcontent-%COMP%]{font-size:12.5px;opacity:.7}.mcp-x[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;font:inherit;font-size:17px;line-height:1;padding:2px 6px;border-radius:6px;color:inherit;opacity:.6}.mcp-x[_ngcontent-%COMP%]:hover{opacity:1;background:color-mix(in srgb,var(--df-text) 5%,transparent)}.mcp-redirect-addrow[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:10px}.mcp-redirect-addrow[_ngcontent-%COMP%] .grow[_ngcontent-%COMP%]{flex:1}.mcp-redirect-addrow[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-top:6px}.mcp-regenerate-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:4px}.mcp-regenerate-row[_ngcontent-%COMP%] .mcp-hint[_ngcontent-%COMP%]{margin:0}.mcp-toolstyle[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;margin-bottom:4px}.mcp-toolstyle[_ngcontent-%COMP%] .mcp-radio-label[_ngcontent-%COMP%]{display:block;font-size:13.5px;white-space:normal;line-height:1.45}.mcp-toolstyle[_ngcontent-%COMP%] .mcp-radio-note[_ngcontent-%COMP%]{display:block;font-size:12px;font-weight:600;color:var(--df-accent);margin-top:2px}.mcp-scope-line[_ngcontent-%COMP%]{font-size:13px;opacity:.8;margin:4px 0 0}.mcp-flush-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:14px}.mcp-flush-row[_ngcontent-%COMP%] .mcp-hint[_ngcontent-%COMP%]{margin:0}.mcp-fullconfig[_ngcontent-%COMP%]{margin:0;background:color-mix(in srgb,var(--df-text) 3.5%,transparent);border:1px solid color-mix(in srgb,var(--df-text) 8%,transparent);border-radius:8px;padding:12px 14px;font-size:12px;line-height:1.55;overflow:auto;max-height:420px}.mcp-danger[_ngcontent-%COMP%]{background:var(--df-danger-soft);border-color:color-mix(in srgb,var(--df-danger) 35%,transparent)}.mcp-danger[_ngcontent-%COMP%] .mcp-danger-copy[_ngcontent-%COMP%]{font-size:13.5px;margin:0 0 10px}@media (max-width: 700px){.mcp-card[_ngcontent-%COMP%]{padding:14px}.mcp-redirect-addrow[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch}.mcp-redirect-addrow[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-top:0}}"]})}}return n})(),Qg=(()=>{class n{constructor(t){this.http=t}health(){return this.http.get("/_internal/ai/mcp-health",{context:(0,K.Ku)()}).pipe((0,R.W)(()=>(0,L.of)(null)))}catalog(t,o){if(null==o.roleId&&null==o.appId)return this.http.post(`${A.C}/${t}/rpc`,{jsonrpc:"2.0",id:1,method:"tools/list",params:{}},{context:(0,K.Ku)()}).pipe((0,z.T)(r=>function Ud(n){if(!n.length)return null;const a=JSON.stringify({tools:n}).length,t=new Set(Me.map(i=>i.verb)),o=n.some(i=>t.has(i.name));return{count:o?null:n.length,bytes:a,lazy:o}}(r?.result?.tools??[])),(0,R.W)(()=>(0,L.of)(null)));const i={service:t};return null!=o.appId?i.app_id=String(o.appId):i.role_id=String(o.roleId),this.http.get("/_internal/ai/mcp-catalog",{params:i,context:(0,K.Ku)()}).pipe((0,z.T)(r=>"number"==typeof r?.count&&"number"==typeof r?.bytes?{count:r.count,bytes:r.bytes,lazy:"lazy"===r.lazy}:null),(0,R.W)(()=>(0,L.of)(null)))}static{this.\u0275fac=function(o){return new(o||n)(e.KVO(ee.Qq))}}static{this.\u0275prov=e.jDH({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();function Zg(n,a){1&n&&(e.j41(0,"span",21),e.EFF(1," \u26a0 Serves no tools "),e.k0s())}function ef(n,a){if(1&n&&(e.j41(0,"span",22),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2);e.AVh("good","ok"===t.healthLevel)("warn","warn"===t.healthLevel)("bad","error"===t.healthLevel),e.Y8G("matTooltip",t.healthText),e.R7$(1),e.SpI(" ",t.healthChip," ")}}function tf(n,a){1&n&&(e.j41(0,"span",23),e.EFF(1," Health unavailable "),e.k0s())}function nf(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",24)(1,"code",25),e.EFF(2),e.k0s(),e.j41(3,"button",26),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.copyUrl())}),e.EFF(4," Copy "),e.k0s(),e.j41(5,"span",27),e.EFF(6),e.k0s()()}if(2&n){const t=e.XpG(2);e.R7$(2),e.JRh(t.mcpUrl),e.R7$(4),e.SpI(" OAuth 2.1",t.store.cfg.allowApiKeyAuth?" \xb7 API key":""," \xb7 Streamable HTTP ")}}function of(n,a){if(1&n&&(e.qex(0),e.j41(1,"strong"),e.EFF(2,"MCP sign-in redirects to APP_URL."),e.k0s(),e.EFF(3," APP_URL is "),e.j41(4,"code"),e.EFF(5),e.k0s(),e.EFF(6," but this page is open at "),e.j41(7,"code"),e.EFF(8),e.k0s(),e.EFF(9,", so clients must connect through APP_URL (the endpoint shown here already uses it). If clients cannot reach that address, set APP_URL to the one they use and run "),e.j41(10,"code"),e.EFF(11,"php artisan config:clear"),e.k0s(),e.EFF(12,". "),e.bVm()),2&n){const t=e.XpG().ngIf;e.R7$(5),e.JRh(t.appUrl),e.R7$(3),e.JRh(t.seen)}}function af(n,a){if(1&n&&(e.j41(0,"strong"),e.EFF(1,"APP_URL is not set."),e.k0s(),e.EFF(2," MCP sign-in redirects to APP_URL, so set it to the address clients use (for example "),e.j41(3,"code"),e.EFF(4),e.k0s(),e.EFF(5,") and run "),e.j41(6,"code"),e.EFF(7,"php artisan config:clear"),e.k0s(),e.EFF(8,". ")),2&n){const t=e.XpG().ngIf;e.R7$(4),e.JRh(t.seen)}}function rf(n,a){if(1&n&&(e.j41(0,"df-alert",28),e.DNE(1,of,13,2,"ng-container",29),e.DNE(2,af,9,1,"ng-template",null,30,e.C5r),e.k0s()),2&n){const t=a.ngIf,o=e.sdS(3);e.Y8G("showAlert",!0)("dismissible",!1),e.R7$(1),e.Y8G("ngIf",t.appUrl)("ngIfElse",o)}}function cf(n,a){if(1&n&&(e.j41(0,"df-alert",31),e.EFF(1),e.k0s()),2&n){const t=a.ngIf;e.Y8G("alertType",t.level)("showAlert",!0)("dismissible",!1),e.R7$(1),e.SpI(" ",t.text," ")}}function sf(n,a){if(1&n){const t=e.RV6();e.j41(0,"df-mcp-connect",32),e.bIt("goToTab",function(i){e.eBV(t);const r=e.XpG(2);return e.Njj(r.setTab(i))}),e.k0s()}if(2&n){const t=e.XpG(2);e.Y8G("store",t.store)("mcpUrl",t.mcpUrl)}}function lf(n,a){if(1&n&&e.nrm(0,"df-mcp-tools",33),2&n){const t=e.XpG(2);e.Y8G("store",t.store)("loading",t.loading)}}function df(n,a){if(1&n){const t=e.RV6();e.j41(0,"df-mcp-settings",34),e.bIt("requestDelete",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.deleteServer())}),e.k0s()}if(2&n){const t=e.XpG(2);e.Y8G("store",t.store)}}function pf(n,a){if(1&n&&(e.qex(0),e.EFF(1," \xb7 "),e.j41(2,"b"),e.EFF(3),e.k0s(),e.bVm()),2&n){const t=e.XpG(3);e.R7$(3),e.Lme("",t.store.savedTotalTools()," \u2192 ",t.store.totalTools()," tools")}}function mf(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",35)(1,"div",36)(2,"span"),e.EFF(3," Unsaved changes "),e.DNE(4,pf,4,2,"ng-container",37),e.k0s(),e.j41(5,"button",38),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.discard())}),e.EFF(6," Discard "),e.k0s(),e.j41(7,"button",39),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.save())}),e.EFF(8),e.k0s()()()}if(2&n){const t=e.XpG(2);e.R7$(4),e.Y8G("ngIf",t.store.savedTotalTools()!==t.store.totalTools()),e.R7$(3),e.Y8G("disabled",t.saving),e.R7$(1),e.SpI(" ",t.saving?"Saving\u2026":"Save"," ")}}function _f(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",1)(1,"header",2)(2,"div",3)(3,"span",4),e.EFF(4),e.k0s(),e.j41(5,"button",5),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.setTab("tools"))}),e.EFF(6),e.k0s(),e.DNE(7,Zg,2,0,"span",6),e.DNE(8,ef,2,8,"span",7),e.DNE(9,tf,2,0,"span",8),e.k0s(),e.DNE(10,nf,7,2,"div",9),e.DNE(11,rf,4,4,"df-alert",10),e.DNE(12,cf,2,4,"df-alert",11),e.j41(13,"nav",12)(14,"a",13),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.setTab("connect"))}),e.EFF(15," Connect "),e.k0s(),e.j41(16,"a",14),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.setTab("tools"))}),e.EFF(17),e.k0s(),e.j41(18,"a",15),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.setTab("settings"))}),e.EFF(19," Settings "),e.k0s()()(),e.j41(20,"mat-tab-nav-panel",null,16),e.DNE(22,sf,1,2,"df-mcp-connect",17),e.DNE(23,lf,1,2,"df-mcp-tools",18),e.DNE(24,df,1,1,"df-mcp-settings",19),e.k0s(),e.DNE(25,mf,9,3,"div",20),e.k0s()}if(2&n){const t=e.sdS(21),o=e.XpG();e.R7$(3),e.AVh("good",o.store.service.isActive)("warn",!o.store.service.isActive),e.R7$(1),e.SpI(" ",o.store.service.isActive?"\u25cf Active":"Inactive \u2014 endpoint refuses connections"," "),e.R7$(2),e.SpI(" ",o.store.totalTools()," tools live "),e.R7$(1),e.Y8G("ngIf",0===o.store.totalTools()),e.R7$(1),e.Y8G("ngIf",o.healthLevel),e.R7$(1),e.Y8G("ngIf",!o.store.health&&o.store.healthChecked),e.R7$(1),e.Y8G("ngIf","connect"!==o.tab),e.R7$(1),e.Y8G("ngIf",o.appUrlIssue),e.R7$(1),e.Y8G("ngIf",o.otherHealthIssue),e.R7$(1),e.Y8G("tabPanel",t),e.R7$(1),e.Y8G("active","connect"===o.tab),e.R7$(2),e.Y8G("active","tools"===o.tab),e.R7$(1),e.SpI(" Tools \xb7 ",o.store.totalTools()," "),e.R7$(1),e.Y8G("active","settings"===o.tab),e.R7$(4),e.Y8G("ngIf","connect"===o.tab),e.R7$(1),e.Y8G("ngIf","tools"===o.tab),e.R7$(1),e.Y8G("ngIf","settings"===o.tab),e.R7$(1),e.Y8G("ngIf",o.store.dirty())}}let rt=class qt{constructor(a,t,o,i,r,c,s){this.activatedRoute=a,this.router=t,this.servicesService=o,this.serviceTypeService=i,this.cacheService=r,this.snackbarService=c,this.mcpApi=s,this.store=new En,this.tab="connect",this.loading=!0,this.saving=!1}ngOnInit(){this.routeSub=this.activatedRoute.data.subscribe(()=>this.initFromRoute())}initFromRoute(){const a=this.activatedRoute.snapshot.data.data,t=this.activatedRoute.snapshot.queryParamMap,o="system_mcp"===a?.type?"system_mcp":"mcp";this.sub?.unsubscribe(),this.store=new En,this.sub=this.store.changes.subscribe(()=>{}),this.store.init({id:a?.id,name:a?.name??"",label:a?.label||a?.name||"",description:a?.description??"",isActive:a?.isActive??!0,type:o,raw:a},a?.config??{}),this.store.created="1"===t.get("created"),this.saving=!1,this.tab="connect";const i=t.get("tab");i&&["connect","tools","settings"].includes(i)&&(this.tab=i),this.snackbarService.setPageLabel(this.router.url,this.store.service.label||this.store.service.name),this.loading=!0,this.loadBackendServices();const r=this.store;r.reloadServerCatalog=()=>this.loadServerCatalog(r),this.loadServerCatalog(r),this.mcpApi.health().subscribe(c=>{this.store===r&&(r.health=c,r.healthChecked=!0,r.touch())})}loadServerCatalog(a){const t=a.previewIdentity;this.mcpApi.catalog(a.service.name,t).subscribe(o=>{this.store!==a||a.previewIdentity!==t||a.setServerCatalog(o)})}ngOnDestroy(){this.sub?.unsubscribe(),this.routeSub?.unsubscribe()}loadBackendServices(){(0,ue.p)({types:this.serviceTypeService.getAll({fields:"name,group",limit:1e3}),services:this.servicesService.getAll({limit:1e3,fields:"id,name,label,type,is_active",sort:"name"})}).subscribe({next:({types:a,services:t})=>{const o={};for(const i of a?.resource??[])o[i.name]=i.group;this.store.backendServices=On(t?.resource??[],o),this.store.backendLoaded=!0,this.loading=!1,this.store.touch()},error:()=>{this.store.backendLoaded=!0,this.loading=!1,this.store.touch()}})}get mcpUrl(){return`${function Hd(n){const a=n?.checks?.find(t=>"app_url"===t.id)?.details?.app_url;return"string"==typeof a&&a?a.replace(/\/+$/,""):null}(this.store.health)??window.location.origin}/mcp/${this.store.service.name}`}get appUrlIssue(){const a=this.store.health?.checks?.find(o=>"app_url"===o.id&&"ok"!==(o.status||"").toLowerCase());if(!a)return null;const t=a.details??{};return{appUrl:"string"==typeof t.app_url?t.app_url:"",seen:t.forwarded_origin||t.request_origin||window.location.origin}}get otherHealthIssue(){const a=this.store.health?.checks?.find(t=>"app_url"!==t.id&&"ok"!==(t.status||"").toLowerCase());return a?{level:"error"===(a.status||"").toLowerCase()?"error":"warning",text:a.message??""}:null}get healthLevel(){return this.store.health?function Kd(n){const a=(n.status||"").toLowerCase();return"ok"===a||"healthy"===a||"pass"===a?"ok":"warn"===a||"warning"===a||"degraded"===a?"warn":"error"}(this.store.health):null}get healthText(){const a=this.store.health;return a?function Jd(n){return(n.checks??[]).find(t=>"ok"!==(t.status||"").toLowerCase()&&t.message)?.message??""}(a)||("ok"===this.healthLevel?"MCP health: all checks pass":"MCP health: check failed"):""}get healthChip(){const a=this.healthLevel;return"ok"===a?"\u25cf Healthy":"\u26a0 "+("app_url"===this.store.health?.checks?.find(i=>"ok"!==(i.status||"").toLowerCase())?.id?"APP_URL mismatch":"warn"===a?"Health warning":"Health error")}copyUrl(){navigator.clipboard?.writeText(this.mcpUrl).catch(()=>{}),this.store.copiedUrl=!0,this.snackbarService.openSnackBar("Endpoint URL copied.","success")}setTab(a){this.tab=a}canDeactivate(){return!this.store?.service||!this.store.dirty()||window.confirm("You have unsaved changes. Leave this page and discard them?")}save(){if(this.saving||!this.store.dirty())return;const a=this.store,t=a.savedTotalTools(),o=a.draftName!==a.service.name,i=a.connectionAffecting();if(o&&!window.confirm(`Renaming changes your endpoint URL to \u2026/mcp/${a.draftName}. Connected clients will break until they update. Rename?`))return;this.saving=!0;const r={...a.service.raw,id:a.service.id,name:a.draftName,label:a.draftLabel,description:a.draftDescription,isActive:a.draftIsActive,type:a.service.type,config:Mn(a.cfg,a.service.type)};delete r.serviceDocByServiceId,this.servicesService.update(a.service.id,r).subscribe({next:()=>{this.saving=!1,a.markSaved(),this.cacheService.delete(a.service.name).subscribe({next:()=>{},error:()=>{}}),this.loadServerCatalog(a);const c=a.totalTools();0===c?this.snackbarService.openSnackBar("Saved \u2014 this server serves no tools. Agents can connect but can call nothing.","warning"):this.snackbarService.openSnackBar(c!==t?`Saved \u2014 ${c} tools live (was ${t}).`:"Saved.","success"),i&&(a.reconnectBanner=!0),a.touch()},error:c=>{this.saving=!1,this.snackbarService.openSnackBar(c?.error?.error?.message??"Save failed.","error")}})}discard(){this.store.discard()}deleteServer(){const a=this.store;window.prompt(`Delete this MCP server? Clients lose access immediately.\nType the server name (${a.service.name}) to confirm:`)===a.service.name&&this.servicesService.delete(a.service.id).subscribe({next:()=>{this.snackbarService.openSnackBar("Server deleted.","success"),this.router.navigate(["../"],{relativeTo:this.activatedRoute})},error:()=>this.snackbarService.openSnackBar("Delete failed.","error")})}static{this.\u0275fac=function(t){return new(t||qt)(e.rXU(N.nX),e.rXU(N.Ix),e.rXU(U.Z1),e.rXU(U.zs),e.rXU(U.j8),e.rXU(pe.L),e.rXU(Qg))}}static{this.\u0275cmp=e.VBU({type:qt,selectors:[["df-mcp-details"]],standalone:!0,features:[e.aNF],decls:1,vars:1,consts:[["class","mcp-page",4,"ngIf"],[1,"mcp-page"],[1,"mcp-head"],[1,"mcp-head-row"],[1,"mcp-chip"],["type","button","matTooltip","Open the Tools tab",1,"mcp-chip","primary","mcp-chip-btn",3,"click"],["class","mcp-chip warn",4,"ngIf"],["class","mcp-chip","tabindex","0","data-testid","mcp-health-chip",3,"good","warn","bad","matTooltip",4,"ngIf"],["class","mcp-chip","matTooltip","/_internal/ai/mcp-health did not answer.","data-testid","mcp-health-chip",4,"ngIf"],["class","mcp-head-url",4,"ngIf"],["class","mcp-head-alert","alertType","warning","data-testid","mcp-health-message",3,"showAlert","dismissible",4,"ngIf"],["class","mcp-head-alert","data-testid","mcp-health-issue",3,"alertType","showAlert","dismissible",4,"ngIf"],["mat-tab-nav-bar","","mat-stretch-tabs","false","mat-align-tabs","start",1,"mcp-tabs",3,"tabPanel"],["mat-tab-link","","data-testid","mcp-tab-connect",3,"active","click"],["mat-tab-link","","data-testid","mcp-tab-tools",3,"active","click"],["mat-tab-link","","data-testid","mcp-tab-settings",3,"active","click"],["mcpTabPanel",""],[3,"store","mcpUrl","goToTab",4,"ngIf"],[3,"store","loading",4,"ngIf"],[3,"store","requestDelete",4,"ngIf"],["class","mcp-dirty-bar","data-testid","mcp-dirty-bar",4,"ngIf"],[1,"mcp-chip","warn"],["tabindex","0","data-testid","mcp-health-chip",1,"mcp-chip",3,"matTooltip"],["matTooltip","/_internal/ai/mcp-health did not answer.","data-testid","mcp-health-chip",1,"mcp-chip"],[1,"mcp-head-url"],["data-testid","mcp-endpoint-url"],["mat-stroked-button","","type","button","data-testid","mcp-copy-url",3,"click"],[1,"mcp-head-auth"],["alertType","warning","data-testid","mcp-health-message",1,"mcp-head-alert",3,"showAlert","dismissible"],[4,"ngIf","ngIfElse"],["noAppUrl",""],["data-testid","mcp-health-issue",1,"mcp-head-alert",3,"alertType","showAlert","dismissible"],[3,"store","mcpUrl","goToTab"],[3,"store","loading"],[3,"store","requestDelete"],["data-testid","mcp-dirty-bar",1,"mcp-dirty-bar"],[1,"mcp-dirty-inner"],[4,"ngIf"],["mat-button","","type","button","data-testid","mcp-discard",1,"mcp-dirty-discard",3,"click"],["mat-flat-button","","type","button","data-testid","mcp-save",1,"mcp-dirty-save",3,"disabled","click"]],template:function(t,o){1&t&&e.DNE(0,_f,26,21,"div",0),2&t&&e.Y8G("ngIf",o.store.service)},dependencies:[d.MD,d.bT,u.Hl,u.$z,Z.m_,S.uc,S.oV,oe.RI,oe.Bu,oe.hQ,oe.Ql,Vd.W,wp,Pg,Wg],styles:[".mcp-page[_ngcontent-%COMP%]{position:relative;padding-bottom:72px}.mcp-head[_ngcontent-%COMP%]{margin-bottom:4px}.mcp-head[_ngcontent-%COMP%] .mcp-head-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.mcp-head[_ngcontent-%COMP%] .mcp-head-row[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:21px;font-weight:700;margin:0}.mcp-head[_ngcontent-%COMP%] .mcp-head-url[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:8px}.mcp-head[_ngcontent-%COMP%] .mcp-head-url[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-size:13px;background:color-mix(in srgb,var(--df-text) 3.5%,transparent);border:1px solid color-mix(in srgb,var(--df-text) 8%,transparent);border-radius:7px;padding:4px 10px;overflow-x:auto;max-width:100%}.mcp-head[_ngcontent-%COMP%] .mcp-head-url[_ngcontent-%COMP%] .mcp-head-auth[_ngcontent-%COMP%]{font-size:12.5px;opacity:.65}.mcp-tabs[_ngcontent-%COMP%]{margin:16px 0 20px;border-bottom:1px solid var(--df-border)}.mcp-tabs[_ngcontent-%COMP%] .mat-mdc-tab-link[_ngcontent-%COMP%]{min-width:120px;font-size:14px;font-weight:600;letter-spacing:normal;border-radius:var(--df-radius-sm, 6px) var(--df-radius-sm, 6px) 0 0}.mcp-tabs[_ngcontent-%COMP%] .mat-mdc-tab-link[_ngcontent-%COMP%]:hover{background:var(--df-hover)}.mcp-tabs[_ngcontent-%COMP%] .mat-mdc-tab-link.mdc-tab--active[_ngcontent-%COMP%]{background:var(--df-accent-soft)}.mcp-head-alert[_ngcontent-%COMP%]{display:block;margin-top:10px}.mcp-head-alert[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-size:12.5px;padding:0 4px;border-radius:4px;background:var(--df-surface-2)}.mcp-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:5px;padding:2px 9px;border-radius:999px;font-size:12px;font-weight:600;border:1px solid color-mix(in srgb,var(--df-text) 14%,transparent);background:color-mix(in srgb,var(--df-text) 2%,transparent);white-space:nowrap}.mcp-chip.good[_ngcontent-%COMP%]{background:var(--df-success-soft);border-color:color-mix(in srgb,var(--df-success) 35%,transparent);color:var(--df-success)}.mcp-chip.warn[_ngcontent-%COMP%]{background:var(--df-warning-soft);border-color:color-mix(in srgb,var(--df-warning) 40%,transparent);color:var(--df-warning)}.mcp-chip.bad[_ngcontent-%COMP%]{background:var(--df-danger-soft);border-color:color-mix(in srgb,var(--df-danger) 40%,transparent);color:var(--df-danger)}.mcp-chip.primary[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--df-accent) 10%,transparent);border-color:color-mix(in srgb,var(--df-accent) 38%,transparent);color:var(--df-accent)}.mcp-chip-btn[_ngcontent-%COMP%]{cursor:pointer;font:inherit;font-size:12px;font-weight:600}.mcp-dirty-bar[_ngcontent-%COMP%]{position:fixed;left:0;right:0;bottom:0;z-index:30;display:flex;justify-content:center;padding:0 16px 14px;pointer-events:none}.mcp-dirty-bar[_ngcontent-%COMP%] .mcp-dirty-inner[_ngcontent-%COMP%]{pointer-events:auto;display:flex;align-items:center;gap:14px;background:var(--df-accent-strong);color:var(--df-accent-contrast);border-radius:12px;padding:8px 12px 8px 18px;box-shadow:0 6px 24px color-mix(in srgb,var(--df-text) 25%,transparent);font-size:13.5px;flex-wrap:wrap}.mcp-dirty-bar[_ngcontent-%COMP%] .mcp-dirty-discard[_ngcontent-%COMP%]{color:var(--df-accent-soft)}.mcp-dirty-bar[_ngcontent-%COMP%] .mcp-dirty-save[_ngcontent-%COMP%]{background:var(--df-surface);color:var(--df-accent-strong)}@media (max-width: 700px){.mcp-head[_ngcontent-%COMP%] .mcp-head-row[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:18px}}"]})}};function gf(n,a){if(1&n&&(e.j41(0,"p",30),e.EFF(1),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.SpI(" A service named ",t.name," already exists. ")}}function ff(n,a){1&n&&(e.j41(0,"p",30),e.EFF(1," Name is required. "),e.k0s())}function uf(n,a){if(1&n){const t=e.RV6();e.j41(0,"button",31),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.showDescription=!0)}),e.EFF(1," + Add description "),e.k0s()}}function hf(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",11)(1,"label",32),e.EFF(2,"Description"),e.k0s(),e.j41(3,"textarea",33),e.bIt("input",function(i){e.eBV(t);const r=e.XpG();return e.Njj(r.onDescriptionInput(i))}),e.k0s()()}if(2&n){const t=e.XpG();e.R7$(3),e.Y8G("value",t.description)}}function bf(n,a){if(1&n){const t=e.RV6();e.j41(0,"button",59),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG(2);return e.Njj(c.pickClone(r))}),e.EFF(1),e.j41(2,"span",60),e.EFF(3),e.k0s()()}if(2&n){const t=a.$implicit;e.R7$(1),e.SpI(" ",t.label,"\xa0"),e.R7$(2),e.SpI("(",t.name,")")}}function vf(n,a){1&n&&(e.j41(0,"button",61),e.EFF(1," No other MCP servers yet "),e.k0s())}function xf(n,a){if(1&n&&(e.j41(0,"span",62),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.SpI(" Cloned from ",t.cloneSource," ")}}function Cf(n,a){1&n&&(e.j41(0,"p",63),e.EFF(1,"Loading services\u2026"),e.k0s())}function kf(n,a){1&n&&(e.j41(0,"p",63),e.EFF(1," No database or file services yet. Create one under API Generation & Connections. "),e.k0s())}function yf(n,a){if(1&n&&(e.j41(0,"p",63),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.SpI(" No service matches '",t.q,"'. Create one under API Generation & Connections. ")}}function Mf(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",68)(1,"mat-checkbox",69),e.bIt("change",function(){const r=e.eBV(t).$implicit,c=e.XpG(3);return e.Njj(c.toggle(r.name))}),e.j41(2,"span",70),e.EFF(3),e.k0s()(),e.j41(4,"span",71),e.EFF(5),e.k0s(),e.j41(6,"span",72),e.EFF(7),e.k0s()()}if(2&n){const t=a.$implicit,o=e.XpG(3);e.R7$(1),e.Y8G("checked",o.isSelected(t.name)),e.BMQ("data-testid","mcp-create-svc-"+t.name),e.R7$(2),e.JRh(t.label),e.R7$(2),e.JRh(t.name),e.R7$(2),e.JRh(o.toolDelta(t))}}function Of(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",64)(1,"div",65)(2,"span"),e.EFF(3),e.k0s(),e.j41(4,"mat-checkbox",66),e.bIt("change",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.toggleGroup(i.dbFiltered()))}),e.EFF(5," Select all "),e.k0s()(),e.DNE(6,Mf,8,5,"div",67),e.k0s()}if(2&n){const t=e.XpG(2);e.R7$(3),e.SpI("Databases (",t.dbAll().length,")"),e.R7$(1),e.Y8G("checked",t.groupAllSelected(t.dbFiltered()))("indeterminate",t.groupSomeSelected(t.dbFiltered())),e.R7$(2),e.Y8G("ngForOf",t.dbFiltered())}}function Pf(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",68)(1,"mat-checkbox",69),e.bIt("change",function(){const r=e.eBV(t).$implicit,c=e.XpG(3);return e.Njj(c.toggle(r.name))}),e.j41(2,"span",70),e.EFF(3),e.k0s()(),e.j41(4,"span",71),e.EFF(5),e.k0s(),e.j41(6,"span",72),e.EFF(7),e.k0s()()}if(2&n){const t=a.$implicit,o=e.XpG(3);e.R7$(1),e.Y8G("checked",o.isSelected(t.name)),e.BMQ("data-testid","mcp-create-svc-"+t.name),e.R7$(2),e.JRh(t.label),e.R7$(2),e.JRh(t.name),e.R7$(2),e.JRh(o.toolDelta(t))}}function Ff(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",64)(1,"div",65)(2,"span"),e.EFF(3),e.k0s(),e.j41(4,"mat-checkbox",66),e.bIt("change",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.toggleGroup(i.fileFiltered()))}),e.EFF(5," Select all "),e.k0s()(),e.DNE(6,Pf,8,5,"div",67),e.k0s()}if(2&n){const t=e.XpG(2);e.R7$(3),e.SpI("File storage (",t.fileAll().length,")"),e.R7$(1),e.Y8G("checked",t.groupAllSelected(t.fileFiltered()))("indeterminate",t.groupSomeSelected(t.fileFiltered())),e.R7$(2),e.Y8G("ngForOf",t.fileFiltered())}}function wf(n,a){1&n&&(e.j41(0,"p",73),e.EFF(1," Nothing selected \u2014 agents get global tools only. "),e.k0s())}function Df(n,a){if(1&n&&(e.j41(0,"span",71),e.EFF(1),e.k0s()),2&n){const t=e.XpG().$implicit;e.R7$(1),e.SpI(" ","db"===t.svc.kind?"Database":"File storage"," ")}}function Tf(n,a){1&n&&(e.j41(0,"span",79),e.EFF(1,"Not on this instance"),e.k0s())}function Sf(n,a){if(1&n&&(e.j41(0,"span",71),e.EFF(1),e.k0s()),2&n){const t=e.XpG().$implicit,o=e.XpG(2);e.AVh("good","ro"===o.accessKindFor(t)),e.R7$(1),e.SpI(" ",o.accessLabelFor(t)," ")}}function Rf(n,a){if(1&n){const t=e.RV6();e.j41(0,"li")(1,"span",74),e.EFF(2),e.k0s(),e.DNE(3,Df,2,1,"span",75),e.DNE(4,Tf,2,0,"span",76),e.DNE(5,Sf,2,3,"span",77),e.j41(6,"button",78),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG(2);return e.Njj(c.toggle(r.name))}),e.EFF(7," \u2715 "),e.k0s()()}if(2&n){const t=a.$implicit;e.R7$(2),e.JRh((null==t.svc?null:t.svc.label)||t.name),e.R7$(1),e.Y8G("ngIf",t.svc),e.R7$(1),e.Y8G("ngIf",!t.svc),e.R7$(1),e.Y8G("ngIf",t.svc)}}function If(n,a){if(1&n){const t=e.RV6();e.j41(0,"section",34)(1,"div",35)(2,"h2"),e.EFF(3,"Expose services"),e.k0s()(),e.j41(4,"div",36)(5,"button",37),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.presetAllDb())}),e.EFF(6," All databases (read-only) "),e.k0s(),e.j41(7,"button",38),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.presetChoose())}),e.EFF(8," Choose services "),e.k0s(),e.j41(9,"button",39),e.EFF(10," Clone another MCP server\u2026 "),e.k0s(),e.j41(11,"mat-menu",null,40),e.DNE(13,bf,4,2,"button",41),e.DNE(14,vf,2,0,"button",42),e.k0s(),e.DNE(15,xf,2,1,"span",43),e.k0s(),e.j41(16,"div",44)(17,"span",45),e.EFF(18,"Access for these services:"),e.k0s(),e.j41(19,"div",46)(20,"button",47),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.setAccess("ro"))}),e.EFF(21," Read-only \u2014 recommended "),e.k0s(),e.j41(22,"button",48),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.setAccess("rw"))}),e.EFF(23," Read & write "),e.k0s()()(),e.j41(24,"div",49)(25,"div",50)(26,"input",51),e.bIt("ngModelChange",function(i){e.eBV(t);const r=e.XpG();return e.Njj(r.q=i)}),e.k0s(),e.DNE(27,Cf,2,0,"p",52),e.DNE(28,kf,2,0,"p",52),e.DNE(29,yf,2,1,"p",52),e.DNE(30,Of,7,4,"div",53),e.DNE(31,Ff,7,4,"div",53),e.k0s(),e.j41(32,"aside",54)(33,"div",55),e.EFF(34),e.k0s(),e.DNE(35,wf,2,0,"p",56),e.j41(36,"ul",57),e.DNE(37,Rf,8,4,"li",58),e.k0s()()()()}if(2&n){const t=e.sdS(12),o=e.XpG();e.R7$(5),e.AVh("primary","alldb"===o.preset),e.R7$(2),e.AVh("primary","choose"===o.preset),e.R7$(2),e.AVh("primary","clone"===o.preset),e.Y8G("matMenuTriggerFor",t),e.R7$(4),e.Y8G("ngForOf",o.mcpSiblings),e.R7$(1),e.Y8G("ngIf",0===o.mcpSiblings.length),e.R7$(1),e.Y8G("ngIf",o.cloneApplied),e.R7$(5),e.AVh("on","ro"===o.access),e.BMQ("aria-checked","ro"===o.access),e.R7$(2),e.AVh("on","rw"===o.access),e.BMQ("aria-checked","rw"===o.access),e.R7$(4),e.Y8G("placeholder","Search "+o.backendServices.length+" services\u2026")("ngModel",o.q),e.R7$(1),e.Y8G("ngIf",!o.instanceLoaded),e.R7$(1),e.Y8G("ngIf",o.instanceLoaded&&0===o.backendServices.length),e.R7$(1),e.Y8G("ngIf",o.emptySearch()),e.R7$(1),e.Y8G("ngIf",o.dbAll().length>0&&o.dbFiltered().length>0),e.R7$(1),e.Y8G("ngIf",o.fileAll().length>0&&o.fileFiltered().length>0),e.R7$(3),e.SpI("Selected (",o.selected.size,")"),e.R7$(1),e.Y8G("ngIf",0===o.selected.size),e.R7$(2),e.Y8G("ngForOf",o.selectedList())}}function Ef(n,a){1&n&&(e.j41(0,"b"),e.EFF(1," Empty never means every service."),e.k0s())}rt=(0,re.Cg)([(0,H.d)({checkProperties:!0})],rt);let Jn=(()=>{class n{canDeactivate(){return!(!this.createdOk&&(this.name||0!==this.selected.size))||window.confirm("Leave without creating the server? Your entries will be discarded.")}constructor(t,o,i,r,c){this.activatedRoute=t,this.router=o,this.servicesService=i,this.serviceTypeService=r,this.snackbarService=c,this.createdOk=!1,this.serverType="mcp",this.name="",this.label="",this.labelTouched=!1,this.nameBlurred=!1,this.description="",this.showDescription=!1,this.preset="choose",this.access="ro",this.selected=new Set,this.q="",this.cloneApplied=!1,this.cloneSource="",this.clonedDisabled=new Set,this.accessTouchedAfterClone=!1,this.toolStyle="merged",this.backendServices=[],this.existingNames=new Set,this.mcpSiblings=[],this.instanceLoaded=!1,this.saving=!1}ngOnInit(){this.loadInstance()}loadInstance(){(0,ue.p)({types:this.serviceTypeService.getAll({fields:"name,group",limit:1e3}),services:this.servicesService.getAll({limit:1e3,fields:"id,name,label,type,is_active",sort:"name"})}).subscribe({next:({types:t,services:o})=>{const i={};for(const c of t?.resource??[])i[c.name]=c.group;const r=o?.resource??[];this.backendServices=On(r,i),this.existingNames=new Set(r.map(c=>c.name).filter(Boolean)),this.mcpSiblings=r.filter(c=>"mcp"===c.type).map(c=>({id:c.id,name:c.name,label:c.label||c.name})),this.instanceLoaded=!0},error:()=>{this.instanceLoaded=!0}})}setType(t){this.serverType=t}onNameInput(t){const o=t.target;this.name=o.value.toLowerCase().replace(/\s+/g,"").replace(/[^a-z0-9_-]/g,""),o.value=this.name,this.labelTouched||(this.label=this.labelSuggestion())}onLabelInput(t){const o=t.target;this.label=o.value,this.labelTouched=o.value.length>0,this.labelTouched||(this.label=this.labelSuggestion())}onDescriptionInput(t){this.description=t.target.value}labelSuggestion(){return this.name.split(/[_-]+/).filter(Boolean).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}get urlPreview(){return`${window.location.origin}/mcp/${this.name||"\u2026"}`}nameTaken(){return""!==this.name&&this.existingNames.has(this.name)}matches(t){const o=this.q.trim().toLowerCase();return!o||t.name.toLowerCase().includes(o)||t.label.toLowerCase().includes(o)}dbAll(){return this.backendServices.filter(t=>"db"===t.kind)}fileAll(){return this.backendServices.filter(t=>"file"===t.kind)}dbFiltered(){return this.dbAll().filter(t=>this.matches(t))}fileFiltered(){return this.fileAll().filter(t=>this.matches(t))}emptySearch(){return this.q.trim().length>0&&0===this.dbFiltered().length&&0===this.fileFiltered().length}toolDelta(t){return`+${$(t.kind).length} tools`}isSelected(t){return this.selected.has(t)}toggle(t){this.selected.has(t)?this.selected.delete(t):this.selected.add(t),"alldb"===this.preset&&(this.preset="choose")}groupAllSelected(t){return t.length>0&&t.every(o=>this.selected.has(o.name))}groupSomeSelected(t){const o=t.filter(i=>this.selected.has(i.name)).length;return o>0&&o({name:t,svc:this.backendServices.find(o=>o.name===t)??null}))}accessLabelFor(t){if(!t.svc)return"";const o=Dt(t.svc,this.compiledDisabledTools());return"full"===o.kind?"Full access":o.label}accessKindFor(t){return t.svc?Dt(t.svc,this.compiledDisabledTools()).kind:""}presetAllDb(){this.selected=new Set(this.dbAll().map(t=>t.name)),this.access="ro",this.cloneApplied=!1,this.preset="alldb"}presetChoose(){this.cloneApplied=!1,this.preset="choose"}pickClone(t){this.servicesService.get(t.id).subscribe({next:o=>{const i=wt(o?.config);this.selected=new Set(i.exposedServices),this.clonedDisabled=new Set(i.disabledTools),this.toolStyle=i.toolStyle??"prefixed",this.cloneApplied=!0,this.cloneSource=t.label||t.name,this.accessTouchedAfterClone=!1,this.preset="clone"},error:()=>this.snackbarService.openSnackBar(`Could not load ${t.name}'s configuration.`,"error")})}setAccess(t){this.access=t,this.accessTouchedAfterClone=!0}compiledDisabledTools(){if("system_mcp"===this.serverType)return new Set;if(this.cloneApplied&&!this.accessTouchedAfterClone)return new Set(this.clonedDisabled);if("ro"===this.access){const t=new Set;for(const o of this.selected){const i=this.backendServices.find(r=>r.name===o);i&&Tt(i).forEach(r=>t.add(r))}return t}return new Set}draftConfig(){const t=wt({});return t.exposedServices=[...this.selected],t.disabledTools=this.compiledDisabledTools(),t.toolStyle=this.toolStyle,t.lazyMode="auto",t.allowApiKeyAuth=!1,t}breakdown(){return ze(this.draftConfig(),this.backendServices)}consequenceMain(){if("system_mcp"===this.serverType)return`Agents will get the ${ie.length} System API admin tools.`;const t=this.breakdown();if(0===this.selected.size)return`Agents will get global tools only (${t.globalTools}) \u2014 no data access.`;const o=[];t.dbServices>0&&o.push("merged"===t.effectiveStyle?`${t.dbTools} database (shared)`:`${t.dbTools} database`),t.fileServices>0&&o.push(`${t.fileTools} file`),o.push(`${t.globalTools} global`);let i=`Agents will get ${t.total} tools: ${o.join(" \xb7 ")}.`;return t.readOnly&&(i+=" Write tools are off."),i}showEmptyBold(){return"mcp"===this.serverType&&0===this.selected.size}canSubmit(){return!this.saving&&this.name.length>0&&!this.nameTaken()}submit(){if(!this.canSubmit())return;this.saving=!0;const t="mcp"===this.serverType?{exposedServices:[...this.selected],disabledTools:[...this.compiledDisabledTools()].sort(),toolStyle:this.toolStyle,lazyMode:"auto",allowApiKeyAuth:!1,allowWrites:!0,requireRoleAccess:!0}:{requireRoleAccess:!0};this.servicesService.create({resource:[{name:this.name,label:this.label||this.name,description:this.description,isActive:!0,type:this.serverType,config:t}]}).subscribe({next:o=>{this.saving=!1,this.createdOk=!0;const i=o?.resource?.[0]?.id;null!=i?this.router.navigate(["../",i],{relativeTo:this.activatedRoute,queryParams:{created:1}}):this.router.navigate(["../"],{relativeTo:this.activatedRoute})},error:o=>{this.saving=!1,this.snackbarService.openSnackBar(o?.error?.error?.message??"Create failed.","error")}})}cancel(){this.router.navigate(["../"],{relativeTo:this.activatedRoute})}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(N.nX),e.rXU(N.Ix),e.rXU(U.Z1),e.rXU(U.zs),e.rXU(pe.L))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-mcp-create"]],standalone:!0,features:[e.aNF],decls:53,vars:18,consts:[["data-testid","mcp-create-page",1,"mcp-create"],[1,"mcp-create-head"],[1,"mcp-create-tagline"],["role","radiogroup","aria-label","Server type",1,"mcp-create-types"],["type","button","role","radio","data-testid","mcp-create-type-mcp",1,"mcp-type-card",3,"click"],["aria-hidden","true",1,"mcp-type-dot"],[1,"mcp-type-body"],[1,"mcp-type-title"],[1,"mcp-type-desc"],["type","button","role","radio","data-testid","mcp-create-type-system",1,"mcp-type-card",3,"click"],[1,"mcp-card","mcp-create-card"],[1,"mcp-field"],["for","mcp-create-name-input"],[1,"req"],["id","mcp-create-name-input","type","text","autocomplete","off","spellcheck","false","placeholder","warehouse","data-testid","mcp-create-name",1,"mcp-input",3,"value","input","blur"],["data-testid","mcp-create-url-preview",1,"mcp-url-preview"],[1,"mcp-url-mono"],[1,"mcp-url-note"],["class","mcp-field-error",4,"ngIf"],["for","mcp-create-label-input"],["id","mcp-create-label-input","type","text","autocomplete","off",1,"mcp-input",3,"value","input"],["type","button","class","mcp-linklike",3,"click",4,"ngIf"],["class","mcp-field",4,"ngIf"],["class","mcp-create-expose",4,"ngIf"],["data-testid","mcp-create-consequence",1,"mcp-create-consequence"],[4,"ngIf"],[1,"mcp-create-auth"],[1,"mcp-create-actions"],["mat-stroked-button","","type","button",3,"click"],["mat-flat-button","","color","primary","type","button","data-testid","mcp-create-submit",3,"disabled","click"],[1,"mcp-field-error"],["type","button",1,"mcp-linklike",3,"click"],["for","mcp-create-desc-input"],["id","mcp-create-desc-input","rows","3",1,"mcp-input","mcp-textarea",3,"value","input"],[1,"mcp-create-expose"],[1,"mcp-section-head"],[1,"mcp-preset-row"],["type","button","data-testid","mcp-create-preset-alldb",1,"mcp-chip","mcp-chip-btn",3,"click"],["type","button",1,"mcp-chip","mcp-chip-btn",3,"click"],["type","button",1,"mcp-chip","mcp-chip-btn",3,"matMenuTriggerFor"],["cloneMenu","matMenu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],["mat-menu-item","","disabled","",4,"ngIf"],["class","mcp-chip good",4,"ngIf"],[1,"mcp-access-row"],[1,"mcp-access-label"],["role","radiogroup","aria-label","Access for these services",1,"mcp-seg"],["type","button","role","radio","data-testid","mcp-create-access-ro",1,"mcp-seg-btn",3,"click"],["type","button","role","radio","data-testid","mcp-create-access-rw",1,"mcp-seg-btn",3,"click"],[1,"mcp-create-pickgrid"],[1,"mcp-card","mcp-pick-card"],["type","search","data-testid","mcp-create-search",1,"mcp-input","mcp-pick-search",3,"placeholder","ngModel","ngModelChange"],["class","mcp-pick-note",4,"ngIf"],["class","mcp-pick-group",4,"ngIf"],[1,"mcp-pick-side"],[1,"mcp-side-head"],["class","mcp-side-none",4,"ngIf"],[1,"mcp-side-list"],[4,"ngFor","ngForOf"],["mat-menu-item","",3,"click"],[1,"mcp-menu-name"],["mat-menu-item","","disabled",""],[1,"mcp-chip","good"],[1,"mcp-pick-note"],[1,"mcp-pick-group"],[1,"mcp-pick-grouphead"],[3,"checked","indeterminate","change"],["class","mcp-pick-row",4,"ngFor","ngForOf"],[1,"mcp-pick-row"],[3,"checked","change"],[1,"mcp-pick-label"],[1,"mcp-chip"],[1,"mcp-pick-delta"],[1,"mcp-side-none"],[1,"mcp-side-label"],["class","mcp-chip",4,"ngIf"],["class","mcp-chip warn",4,"ngIf"],["class","mcp-chip",3,"good",4,"ngIf"],["type","button","matTooltip","Remove from selection","aria-label","Remove from selection",1,"mcp-side-remove",3,"click"],[1,"mcp-chip","warn"]],template:function(o,i){1&o&&(e.j41(0,"div",0)(1,"header",1)(2,"h1"),e.EFF(3,"New MCP server"),e.k0s(),e.j41(4,"p",2),e.EFF(5," Choose what agents may reach. Naming, catalog size, and auth are handled automatically. "),e.k0s()(),e.j41(6,"div",3)(7,"button",4),e.bIt("click",function(){return i.setType("mcp")}),e.nrm(8,"span",5),e.j41(9,"span",6)(10,"span",7),e.EFF(11,"MCP server"),e.k0s(),e.j41(12,"span",8),e.EFF(13,"Expose your data services to AI agents."),e.k0s()()(),e.j41(14,"button",9),e.bIt("click",function(){return i.setType("system_mcp")}),e.nrm(15,"span",5),e.j41(16,"span",6)(17,"span",7),e.EFF(18,"System API MCP server"),e.k0s(),e.j41(19,"span",8),e.EFF(20,"Expose the DreamFactory admin API itself."),e.k0s()()()(),e.j41(21,"section",10)(22,"div",11)(23,"label",12),e.EFF(24,"Name "),e.j41(25,"span",13),e.EFF(26,"*"),e.k0s()(),e.j41(27,"input",14),e.bIt("input",function(c){return i.onNameInput(c)})("blur",function(){return i.nameBlurred=!0}),e.k0s(),e.j41(28,"p",15)(29,"span",16),e.EFF(30),e.k0s(),e.EFF(31," "),e.j41(32,"span",17),e.EFF(33,"\u2014 the name is the URL"),e.k0s()(),e.DNE(34,gf,2,1,"p",18),e.DNE(35,ff,2,0,"p",18),e.k0s(),e.j41(36,"div",11)(37,"label",19),e.EFF(38,"Label"),e.k0s(),e.j41(39,"input",20),e.bIt("input",function(c){return i.onLabelInput(c)}),e.k0s()(),e.DNE(40,uf,2,0,"button",21),e.DNE(41,hf,4,1,"div",22),e.k0s(),e.DNE(42,If,38,26,"section",23),e.j41(43,"p",24),e.EFF(44),e.DNE(45,Ef,2,0,"b",25),e.k0s(),e.j41(46,"p",26),e.EFF(47," Secured with OAuth 2.1, configured automatically. Connection details appear after you create the server. "),e.k0s(),e.j41(48,"div",27)(49,"button",28),e.bIt("click",function(){return i.cancel()}),e.EFF(50,"Cancel"),e.k0s(),e.j41(51,"button",29),e.bIt("click",function(){return i.submit()}),e.EFF(52),e.k0s()()()),2&o&&(e.R7$(7),e.AVh("on","mcp"===i.serverType),e.BMQ("aria-checked","mcp"===i.serverType),e.R7$(7),e.AVh("on","system_mcp"===i.serverType),e.BMQ("aria-checked","system_mcp"===i.serverType),e.R7$(13),e.Y8G("value",i.name),e.R7$(3),e.SpI("\u2192 ",i.urlPreview,""),e.R7$(4),e.Y8G("ngIf",i.nameTaken()),e.R7$(1),e.Y8G("ngIf",i.nameBlurred&&""===i.name),e.R7$(4),e.Y8G("value",i.label),e.R7$(1),e.Y8G("ngIf",!i.showDescription),e.R7$(1),e.Y8G("ngIf",i.showDescription),e.R7$(1),e.Y8G("ngIf","mcp"===i.serverType),e.R7$(2),e.SpI(" ",i.consequenceMain(),""),e.R7$(1),e.Y8G("ngIf",i.showEmptyBold()),e.R7$(6),e.Y8G("disabled",!i.canSubmit()),e.R7$(1),e.SpI(" ",i.saving?"Creating\u2026":"Create server"," "))},dependencies:[d.MD,d.Sq,d.bT,m.YN,m.me,m.BC,m.vS,u.Hl,u.$z,j.g7,j.So,ae.Cn,ae.kk,ae.fb,ae.Cp,S.uc,S.oV],styles:['@charset "UTF-8";.mcp-create[_ngcontent-%COMP%]{font-family:Inter,Helvetica Neue,sans-serif;max-width:980px;padding:0 0 40px}.mcp-create-head[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:21px;font-weight:700;margin:0 0 4px}.mcp-create-head[_ngcontent-%COMP%] .mcp-create-tagline[_ngcontent-%COMP%]{font-size:13.5px;opacity:.65;margin:0 0 18px;max-width:560px}.mcp-create-types[_ngcontent-%COMP%]{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:16px}.mcp-create-types[_ngcontent-%COMP%] .mcp-type-card[_ngcontent-%COMP%]{flex:1 1 260px;display:flex;align-items:flex-start;gap:10px;text-align:left;background:var(--df-surface);border:1px solid color-mix(in srgb,var(--df-text) 8%,transparent);border-radius:10px;padding:14px 16px;cursor:pointer;font:inherit}.mcp-create-types[_ngcontent-%COMP%] .mcp-type-card.on[_ngcontent-%COMP%]{border-color:var(--df-accent);box-shadow:inset 0 0 0 1px var(--df-accent);background:color-mix(in srgb,var(--df-accent) 4%,transparent)}.mcp-create-types[_ngcontent-%COMP%] .mcp-type-card[_ngcontent-%COMP%] .mcp-type-dot[_ngcontent-%COMP%]{flex:none;margin-top:2px;width:16px;height:16px;border-radius:50%;border:2px solid color-mix(in srgb,var(--df-text) 30%,transparent);background:var(--df-surface)}.mcp-create-types[_ngcontent-%COMP%] .mcp-type-card.on[_ngcontent-%COMP%] .mcp-type-dot[_ngcontent-%COMP%]{border-color:var(--df-accent);box-shadow:inset 0 0 0 3.5px var(--df-surface);background:var(--df-accent)}.mcp-create-types[_ngcontent-%COMP%] .mcp-type-card[_ngcontent-%COMP%] .mcp-type-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px}.mcp-create-types[_ngcontent-%COMP%] .mcp-type-card[_ngcontent-%COMP%] .mcp-type-title[_ngcontent-%COMP%]{font-size:14px;font-weight:700}.mcp-create-types[_ngcontent-%COMP%] .mcp-type-card[_ngcontent-%COMP%] .mcp-type-desc[_ngcontent-%COMP%]{font-size:12.5px;opacity:.65}.mcp-card[_ngcontent-%COMP%]{background:var(--df-surface);border:1px solid color-mix(in srgb,var(--df-text) 8%,transparent);border-radius:10px;margin-bottom:14px}.mcp-create-card[_ngcontent-%COMP%]{padding:16px}.mcp-field[_ngcontent-%COMP%]{margin-bottom:14px}.mcp-field[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:block;font-size:12.5px;font-weight:600;margin-bottom:4px}.mcp-field[_ngcontent-%COMP%] .req[_ngcontent-%COMP%]{color:var(--df-danger)}.mcp-field[_ngcontent-%COMP%]:last-child{margin-bottom:0}.mcp-input[_ngcontent-%COMP%]{font:inherit;font-size:13.5px;padding:8px 12px;border:1px solid color-mix(in srgb,var(--df-text) 18%,transparent);border-radius:8px;background:var(--df-surface);width:100%;max-width:420px;box-sizing:border-box}.mcp-input[_ngcontent-%COMP%]:focus{outline:2px solid color-mix(in srgb,var(--df-accent) 35%,transparent);outline-offset:0}.mcp-textarea[_ngcontent-%COMP%]{max-width:640px;resize:vertical}.mcp-url-preview[_ngcontent-%COMP%]{margin:6px 0 0;font-size:12.5px}.mcp-url-preview[_ngcontent-%COMP%] .mcp-url-mono[_ngcontent-%COMP%]{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:var(--df-accent);word-break:break-all}.mcp-url-preview[_ngcontent-%COMP%] .mcp-url-note[_ngcontent-%COMP%]{opacity:.6}.mcp-field-error[_ngcontent-%COMP%]{margin:6px 0 0;font-size:12.5px;font-weight:600;color:var(--df-danger)}.mcp-linklike[_ngcontent-%COMP%]{background:none;border:none;padding:0;font:inherit;font-size:13px;font-weight:600;color:var(--df-accent);cursor:pointer}.mcp-section-head[_ngcontent-%COMP%]{margin:18px 0 10px}.mcp-section-head[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75;margin:0}.mcp-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:5px;padding:2px 9px;border-radius:999px;font-size:12px;font-weight:600;border:1px solid color-mix(in srgb,var(--df-text) 14%,transparent);background:color-mix(in srgb,var(--df-text) 2%,transparent);white-space:nowrap}.mcp-chip.good[_ngcontent-%COMP%]{background:var(--df-success-soft);border-color:color-mix(in srgb,var(--df-success) 35%,transparent);color:var(--df-success)}.mcp-chip.warn[_ngcontent-%COMP%]{background:var(--df-warning-soft);border-color:color-mix(in srgb,var(--df-warning) 40%,transparent);color:var(--df-warning)}.mcp-chip.primary[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--df-accent) 10%,transparent);border-color:color-mix(in srgb,var(--df-accent) 38%,transparent);color:var(--df-accent)}.mcp-chip-btn[_ngcontent-%COMP%]{cursor:pointer;font:inherit;font-size:12px;font-weight:600}.mcp-preset-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:12px}.mcp-menu-name[_ngcontent-%COMP%]{opacity:.55;font-size:12px}.mcp-access-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:12px}.mcp-access-row[_ngcontent-%COMP%] .mcp-access-label[_ngcontent-%COMP%]{font-size:13px;font-weight:600}.mcp-seg[_ngcontent-%COMP%]{display:inline-flex;border:1px solid color-mix(in srgb,var(--df-text) 18%,transparent);border-radius:8px;overflow:hidden}.mcp-seg[_ngcontent-%COMP%] .mcp-seg-btn[_ngcontent-%COMP%]{font:inherit;font-size:13px;font-weight:600;padding:7px 14px;background:var(--df-surface);border:none;cursor:pointer;opacity:.75}.mcp-seg[_ngcontent-%COMP%] .mcp-seg-btn[_ngcontent-%COMP%] + .mcp-seg-btn[_ngcontent-%COMP%]{border-left:1px solid color-mix(in srgb,var(--df-text) 12%,transparent)}.mcp-seg[_ngcontent-%COMP%] .mcp-seg-btn.on[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--df-accent) 12%,transparent);color:var(--df-accent);opacity:1}.mcp-create-pickgrid[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:16px;align-items:start}.mcp-pick-card[_ngcontent-%COMP%]{padding:12px 14px;margin-bottom:0}.mcp-pick-search[_ngcontent-%COMP%]{max-width:none}.mcp-pick-note[_ngcontent-%COMP%]{font-size:13px;opacity:.65;margin:12px 2px 2px}.mcp-pick-group[_ngcontent-%COMP%]{margin-top:14px}.mcp-pick-grouphead[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;font-size:11.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.8;border-bottom:1px solid color-mix(in srgb,var(--df-text) 6%,transparent);padding-bottom:2px;margin-bottom:4px}.mcp-pick-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:2px 0}.mcp-pick-row[_ngcontent-%COMP%] .mcp-pick-label[_ngcontent-%COMP%]{font-size:13.5px;font-weight:600}.mcp-pick-row[_ngcontent-%COMP%] .mcp-pick-delta[_ngcontent-%COMP%]{margin-left:auto;font-size:12px;opacity:.6;white-space:nowrap}.mcp-pick-side[_ngcontent-%COMP%]{background:var(--df-surface);border:1px solid color-mix(in srgb,var(--df-text) 8%,transparent);border-radius:10px;padding:12px 14px}.mcp-pick-side[_ngcontent-%COMP%] .mcp-side-head[_ngcontent-%COMP%]{font-size:11.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.8;margin-bottom:6px}.mcp-pick-side[_ngcontent-%COMP%] .mcp-side-none[_ngcontent-%COMP%]{font-size:13px;opacity:.65;margin:4px 0 0}.mcp-pick-side[_ngcontent-%COMP%] .mcp-side-list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0}.mcp-pick-side[_ngcontent-%COMP%] .mcp-side-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:5px 0;border-bottom:1px solid color-mix(in srgb,var(--df-text) 5%,transparent)}.mcp-pick-side[_ngcontent-%COMP%] .mcp-side-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:last-child{border-bottom:none}.mcp-pick-side[_ngcontent-%COMP%] .mcp-side-label[_ngcontent-%COMP%]{font-size:13px;font-weight:600}.mcp-pick-side[_ngcontent-%COMP%] .mcp-side-remove[_ngcontent-%COMP%]{margin-left:auto;background:none;border:none;cursor:pointer;font-size:13px;line-height:1;opacity:.45;padding:2px 4px}.mcp-pick-side[_ngcontent-%COMP%] .mcp-side-remove[_ngcontent-%COMP%]:hover{opacity:.9}.mcp-create-consequence[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--df-accent) 7%,transparent);border:1px solid color-mix(in srgb,var(--df-accent) 25%,transparent);border-radius:10px;padding:10px 14px;font-size:13.5px;margin:16px 0}.mcp-create-auth[_ngcontent-%COMP%]{font-size:13px;opacity:.7;margin:0 0 18px}.mcp-create-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap}@media (max-width: 860px){.mcp-create-pickgrid[_ngcontent-%COMP%]{grid-template-columns:1fr}}@media (max-width: 700px){.mcp-create-head[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:18px}.mcp-input[_ngcontent-%COMP%], .mcp-textarea[_ngcontent-%COMP%]{max-width:none}.mcp-create-actions[_ngcontent-%COMP%]{justify-content:stretch}.mcp-create-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{flex:1 1 auto}}']})}}return n})();function $f(n,a){1&n&&e.nrm(0,"df-mcp-details")}function Gf(n,a){1&n&&e.nrm(0,"df-mcp-create")}function jf(n,a){1&n&&e.nrm(0,"df-service-details")}let Nf=(()=>{class n{constructor(t){this.activatedRoute=t,this.mode="generic"}canDeactivate(){return"mcp-edit"===this.mode?this.details?.canDeactivate()??!0:"mcp-create"!==this.mode||(this.create?.canDeactivate()??!0)}ngOnInit(){this.routeSub=this.activatedRoute.data.subscribe(()=>this.computeMode())}ngOnDestroy(){this.routeSub?.unsubscribe()}computeMode(){const t=this.activatedRoute.snapshot,o=t.data.data;if("mcp"===o?.type||"system_mcp"===o?.type)return void(this.mode="mcp-edit");const i=!t.paramMap.get("id");this.mode=i&&(t.data.groups||t.parent?.data?.groups||[]).includes("MCP")?"mcp-create":"generic"}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(N.nX))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-mcp-route-shim"]],viewQuery:function(o,i){if(1&o&&(e.GBs(rt,5),e.GBs(Jn,5)),2&o){let r;e.mGM(r=e.lsd())&&(i.details=r.first),e.mGM(r=e.lsd())&&(i.create=r.first)}},standalone:!0,features:[e.aNF],decls:3,vars:3,consts:[[4,"ngIf"]],template:function(o,i){1&o&&(e.DNE(0,$f,1,0,"df-mcp-details",0),e.DNE(1,Gf,1,0,"df-mcp-create",0),e.DNE(2,jf,1,0,"df-service-details",0)),2&o&&(e.Y8G("ngIf","mcp-edit"===i.mode),e.R7$(1),e.Y8G("ngIf","mcp-create"===i.mode),e.R7$(1),e.Y8G("ngIf","generic"===i.mode))},dependencies:[d.MD,d.bT,Ot,rt,Jn],encapsulation:2})}}return n})()},51407:(Wn,Le,g)=>{g.d(Le,{W:()=>G});var d=g(1843),ve=g(18331),re=g(68660),m=g(54342),j=g(94093);function fe(X,oe){if(1&X){const D=d.RV6();d.j41(0,"button",5),d.bIt("click",function(){d.eBV(D);const u=d.XpG(2);return d.Njj(u.dismissAlert())}),d.j41(1,"fa-icon",6),d.EFF(2),d.k0s()()}if(2&X){const D=d.XpG(2);d.R7$(1),d.Y8G("icon",D.faXmark),d.R7$(1),d.JRh("alerts.close")}}function O(X,oe){if(1&X&&(d.j41(0,"div",1),d.nrm(1,"fa-icon",2),d.j41(2,"span",3),d.SdG(3),d.k0s(),d.DNE(4,fe,3,2,"button",4),d.k0s()),2&X){const D=d.XpG();d.HbH(D.alertType),d.R7$(1),d.Y8G("icon",D.icon),d.R7$(3),d.Y8G("ngIf",D.dismissible)}}const E=["*"];let G=(()=>{class X{constructor(){this.alertType="success",this.showAlert=!1,this.dismissible=!0,this.alertClosed=new d.bkB,this.faXmark=j.Jyw}dismissAlert(){this.alertClosed.emit()}get icon(){switch(this.alertType){case"success":return j.SGM;case"error":return j.rfe;case"warning":return j.tUE;default:return j.iW_}}static{this.\u0275fac=function(e){return new(e||X)}}static{this.\u0275cmp=d.VBU({type:X,selectors:[["df-alert"]],inputs:{alertType:"alertType",showAlert:"showAlert",dismissible:"dismissible"},outputs:{alertClosed:"alertClosed"},standalone:!0,features:[d.aNF],ngContentSelectors:E,decls:1,vars:1,consts:[["class","alert-container",3,"class",4,"ngIf"],[1,"alert-container"],["aria-hidden","true",1,"alert-icon",3,"icon"],["role","alert",1,"alert-message"],["mat-icon-button","","class","dismiss-alert",3,"click",4,"ngIf"],["mat-icon-button","",1,"dismiss-alert",3,"click"],[3,"icon"]],template:function(e,u){1&e&&(d.NAR(),d.DNE(0,O,5,4,"div",0)),2&e&&d.Y8G("ngIf",u.showAlert)},dependencies:[ve.bT,re.Hl,re.iY,m.dX,m.aY],styles:[".alert-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:space-between;background-color:var(--df-surface);color:var(--df-text);border:1px solid var(--df-border);border-radius:var(--df-radius-sm);font-size:1.4rem}.alert-container[_ngcontent-%COMP%] .alert-message[_ngcontent-%COMP%]{flex:1;padding:8px}.alert-container[_ngcontent-%COMP%] .alert-icon[_ngcontent-%COMP%]{padding:0 10px}.alert-container.success[_ngcontent-%COMP%]{border-color:var(--df-success-border)}.alert-container.success[_ngcontent-%COMP%] .alert-icon[_ngcontent-%COMP%]{color:var(--df-success)}.alert-container.error[_ngcontent-%COMP%]{border-color:var(--df-danger-border)}.alert-container.error[_ngcontent-%COMP%] .alert-icon[_ngcontent-%COMP%]{color:var(--df-danger)}.alert-container.warning[_ngcontent-%COMP%]{border-color:var(--df-warning, var(--df-danger-border))}.alert-container.warning[_ngcontent-%COMP%] .alert-icon[_ngcontent-%COMP%]{color:var(--df-warning, var(--df-danger))}.alert-container.info[_ngcontent-%COMP%] .alert-icon[_ngcontent-%COMP%]{color:var(--df-accent)}"]})}}return X})()}}]); \ No newline at end of file diff --git a/dist/5036.a356a975647e3bb5.js b/dist/5036.a356a975647e3bb5.js new file mode 100644 index 00000000..d7c816fa --- /dev/null +++ b/dist/5036.a356a975647e3bb5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdf_admin_interface=self.webpackChunkdf_admin_interface||[]).push([[5036],{75036:(Nt,z,c)=>{c.r(z),c.d(z,{DfDataExplorerComponent:()=>It});var f=c(18331),T=c(74312),B=c(83545),_=c(7263),u=c(69069),d=c(31147),y=c(89115),M=c(73907),v=c(54342),e=c(1843),P=c(85784),g=c(68660),h=c(98337),x=c(94093);function J(i,r){if(1&i&&(e.j41(0,"div",9),e.nrm(1,"mat-spinner",10),e.j41(2,"span"),e.EFF(3),e.k0s()()),2&i){const t=e.XpG().$implicit;e.R7$(3),e.JRh(t("dataExplorer.loading"))}}function H(i,r){if(1&i){const t=e.RV6();e.j41(0,"div",11)(1,"mat-icon",12),e.EFF(2,"error_outline"),e.k0s(),e.j41(3,"span"),e.EFF(4),e.nI1(5,"transloco"),e.k0s(),e.j41(6,"button",13),e.bIt("click",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.retry.emit())}),e.EFF(7),e.k0s()()}if(2&i){const t=e.XpG().$implicit,n=e.XpG();e.R7$(4),e.JRh(e.bMT(5,2,n.error)),e.R7$(3),e.SpI(" ",t("dataExplorer.retry")," ")}}function Q(i,r){if(1&i&&(e.j41(0,"div",14)(1,"mat-icon"),e.EFF(2,"info_outline"),e.k0s(),e.j41(3,"span"),e.EFF(4),e.k0s(),e.j41(5,"small"),e.EFF(6),e.k0s()()),2&i){const t=e.XpG().$implicit;e.R7$(4),e.JRh(t("dataExplorer.noDatabases")),e.R7$(2),e.JRh(t("dataExplorer.noDatabasesHint"))}}function K(i,r){if(1&i){const t=e.RV6();e.j41(0,"a",17),e.bIt("click",function(){const a=e.eBV(t).$implicit,l=e.XpG(3);return e.Njj(l.databaseSelected.emit(a))}),e.nrm(1,"fa-icon",18),e.j41(2,"div",19)(3,"span",20),e.EFF(4),e.k0s(),e.j41(5,"span",21),e.EFF(6),e.k0s()(),e.j41(7,"mat-icon",22),e.EFF(8,"chevron_right"),e.k0s()()}if(2&i){const t=r.$implicit,n=e.XpG(3);e.Y8G("matTooltip",t.description||t.name),e.R7$(1),e.Y8G("icon",n.faDatabase),e.R7$(3),e.JRh(t.label||t.name),e.R7$(2),e.JRh(t.type)}}function W(i,r){if(1&i&&(e.j41(0,"mat-nav-list",15),e.DNE(1,K,9,4,"a",16),e.k0s()),2&i){const t=e.XpG(2);e.R7$(1),e.Y8G("ngForOf",t.databases)("ngForTrackBy",t.trackByDbName)}}function q(i,r){if(1&i&&(e.j41(0,"div",1)(1,"div",2)(2,"mat-icon",3),e.EFF(3,"storage"),e.k0s(),e.j41(4,"span",4),e.EFF(5),e.k0s()(),e.DNE(6,J,4,1,"div",5),e.DNE(7,H,8,4,"div",6),e.DNE(8,Q,7,2,"div",7),e.DNE(9,W,2,2,"mat-nav-list",8),e.k0s()),2&i){const t=r.$implicit,n=e.XpG();e.R7$(5),e.JRh(t("dataExplorer.database")),e.R7$(1),e.Y8G("ngIf",n.loading),e.R7$(1),e.Y8G("ngIf",n.error&&!n.loading),e.R7$(1),e.Y8G("ngIf",!n.loading&&!n.error&&0===n.databases.length),e.R7$(1),e.Y8G("ngIf",!n.loading&&!n.error&&n.databases.length>0)}}let Z=(()=>{class i{constructor(){this.databases=[],this.loading=!1,this.error=null,this.databaseSelected=new e.bkB,this.retry=new e.bkB,this.faDatabase=x.hem}trackByDbName(t,n){return n.name}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["df-db-selector"]],inputs:{databases:"databases",loading:"loading",error:"error"},outputs:{databaseSelected:"databaseSelected",retry:"retry"},standalone:!0,features:[e.aNF],decls:1,vars:1,consts:[["class","db-selector",4,"transloco","translocoScope"],[1,"db-selector"],[1,"panel-header"],[1,"header-icon"],[1,"header-title"],["class","loading-state",4,"ngIf"],["class","error-state",4,"ngIf"],["class","empty-state",4,"ngIf"],["class","db-list",4,"ngIf"],[1,"loading-state"],["diameter","32"],[1,"error-state"],["color","warn"],["mat-stroked-button","","color","primary",3,"click"],[1,"empty-state"],[1,"db-list"],["mat-list-item","","matTooltipPosition","right","class","db-item",3,"matTooltip","click",4,"ngFor","ngForOf","ngForTrackBy"],["mat-list-item","","matTooltipPosition","right",1,"db-item",3,"matTooltip","click"],[1,"db-icon",3,"icon"],[1,"db-info"],[1,"db-name"],[1,"db-type"],[1,"chevron"]],template:function(n,o){1&n&&e.DNE(0,q,10,5,"div",0),2&n&&e.Y8G("translocoScope","dataExplorer")},dependencies:[f.bT,f.pM,P.Fg,P._L,P.YE,_.m_,_.An,g.Hl,g.$z,u.D6,u.LG,h.uc,h.oV,d.Q8,d.bA,d.Kj,v.dX,v.aY],styles:[".db-selector[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column}.panel-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:0 16px;height:49px;box-sizing:border-box;border-bottom:1px solid var(--df-border);font-weight:600;font-size:1.4rem;letter-spacing:-.01em;color:var(--df-text)}.panel-header[_ngcontent-%COMP%] .header-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px;color:var(--df-accent)}.loading-state[_ngcontent-%COMP%], .error-state[_ngcontent-%COMP%], .empty-state[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:12px;padding:32px 16px;text-align:center;color:var(--df-text-muted);font-size:1.3rem}.db-list[_ngcontent-%COMP%]{flex:1;overflow-y:auto;padding-top:4px}.db-item[_ngcontent-%COMP%]{height:56px!important;padding:0 16px!important;cursor:pointer}.db-item[_ngcontent-%COMP%] .mdc-list-item__primary-text{display:flex!important;align-items:center;gap:12px;width:100%}.db-item[_ngcontent-%COMP%] .db-icon[_ngcontent-%COMP%]{color:var(--df-accent);font-size:16px;flex-shrink:0;pointer-events:none}.db-item[_ngcontent-%COMP%] .db-info[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;min-width:0;pointer-events:none}.db-item[_ngcontent-%COMP%] .db-info[_ngcontent-%COMP%] .db-name[_ngcontent-%COMP%]{font-size:1.4rem;font-weight:500;color:var(--df-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.db-item[_ngcontent-%COMP%] .db-info[_ngcontent-%COMP%] .db-type[_ngcontent-%COMP%]{font-size:11px;color:var(--df-text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.db-item[_ngcontent-%COMP%] .chevron[_ngcontent-%COMP%]{color:var(--df-text-faint);flex-shrink:0;pointer-events:none}.db-item[_ngcontent-%COMP%]:hover{background:var(--df-hover)}"]})}}return i})();var C=c(78227),w=c(54688),$=c(453);function ee(i,r){if(1&i){const t=e.RV6();e.j41(0,"div",12)(1,"mat-form-field",13)(2,"mat-icon",14),e.EFF(3,"search"),e.k0s(),e.j41(4,"input",15),e.bIt("ngModelChange",function(o){e.eBV(t);const a=e.XpG(2);return e.Njj(a.searchQuery=o)})("ngModelChange",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.filterTables())}),e.k0s()()()}if(2&i){const t=e.XpG().$implicit,n=e.XpG();e.R7$(4),e.Y8G("placeholder",t("dataExplorer.searchTables"))("ngModel",n.searchQuery)}}function te(i,r){if(1&i&&(e.j41(0,"div",16)(1,"span",17),e.EFF(2),e.k0s(),e.j41(3,"span",18),e.EFF(4),e.k0s()()),2&i){const t=e.XpG().$implicit,n=e.XpG();e.R7$(2),e.JRh(t("dataExplorer.tables")),e.R7$(2),e.JRh(n.filteredTables.length)}}function ne(i,r){if(1&i&&(e.j41(0,"div",19),e.nrm(1,"mat-spinner",20),e.j41(2,"span"),e.EFF(3),e.k0s()()),2&i){const t=e.XpG().$implicit;e.R7$(3),e.JRh(t("dataExplorer.loadingSchema"))}}function ie(i,r){if(1&i){const t=e.RV6();e.j41(0,"div",21)(1,"mat-icon",22),e.EFF(2,"error_outline"),e.k0s(),e.j41(3,"span"),e.EFF(4),e.nI1(5,"transloco"),e.k0s(),e.j41(6,"button",23),e.bIt("click",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.retry.emit())}),e.EFF(7),e.k0s()()}if(2&i){const t=e.XpG().$implicit,n=e.XpG();e.R7$(4),e.JRh(e.bMT(5,2,n.error)),e.R7$(3),e.SpI(" ",t("dataExplorer.retry")," ")}}function oe(i,r){if(1&i&&(e.j41(0,"div",24)(1,"mat-icon"),e.EFF(2,"info_outline"),e.k0s(),e.j41(3,"span"),e.EFF(4),e.k0s(),e.j41(5,"small"),e.EFF(6),e.k0s()()),2&i){const t=e.XpG().$implicit;e.R7$(4),e.JRh(t("dataExplorer.noTables")),e.R7$(2),e.JRh(t("dataExplorer.noTablesHint"))}}function ae(i,r){if(1&i){const t=e.RV6();e.j41(0,"a",27),e.bIt("click",function(){const a=e.eBV(t).$implicit,l=e.XpG(3);return e.Njj(l.tableSelected.emit(a))}),e.nrm(1,"fa-icon",28),e.j41(2,"span",29),e.EFF(3),e.k0s()()}if(2&i){const t=r.$implicit,n=e.XpG(3);e.AVh("selected",(null==n.selectedTable?null:n.selectedTable.name)===t.name),e.R7$(1),e.Y8G("icon",n.faTable),e.R7$(2),e.JRh(t.name)}}function re(i,r){if(1&i&&(e.j41(0,"mat-nav-list",25),e.DNE(1,ae,4,4,"a",26),e.k0s()),2&i){const t=e.XpG(2);e.R7$(1),e.Y8G("ngForOf",t.filteredTables)("ngForTrackBy",t.trackByTableName)}}function le(i,r){if(1&i){const t=e.RV6();e.j41(0,"div",1)(1,"div",2)(2,"button",3),e.bIt("click",function(){e.eBV(t);const o=e.XpG();return e.Njj(o.backClicked.emit())}),e.j41(3,"mat-icon"),e.EFF(4,"arrow_back"),e.k0s()(),e.nrm(5,"fa-icon",4),e.j41(6,"span",5),e.EFF(7),e.k0s()(),e.DNE(8,ee,5,2,"div",6),e.DNE(9,te,5,2,"div",7),e.DNE(10,ne,4,1,"div",8),e.DNE(11,ie,8,4,"div",9),e.DNE(12,oe,7,2,"div",10),e.DNE(13,re,2,2,"mat-nav-list",11),e.k0s()}if(2&i){const t=e.XpG();e.R7$(5),e.Y8G("icon",t.faDatabase),e.R7$(1),e.Y8G("matTooltip",t.serviceLabel),e.R7$(1),e.JRh(t.serviceLabel),e.R7$(1),e.Y8G("ngIf",!t.loading&&!t.error&&t.tables.length>0),e.R7$(1),e.Y8G("ngIf",!t.loading&&!t.error&&t.tables.length>0),e.R7$(1),e.Y8G("ngIf",t.loading),e.R7$(1),e.Y8G("ngIf",t.error&&!t.loading),e.R7$(1),e.Y8G("ngIf",!t.loading&&!t.error&&0===t.tables.length),e.R7$(1),e.Y8G("ngIf",!t.loading&&!t.error&&t.filteredTables.length>0)}}let ce=(()=>{class i{constructor(){this.serviceName="",this.serviceLabel="",this.tables=[],this.loading=!1,this.error=null,this.selectedTable=null,this.tableSelected=new e.bkB,this.backClicked=new e.bkB,this.retry=new e.bkB,this.faTable=x.w97,this.faDatabase=x.hem,this.searchQuery="",this.filteredTables=[]}ngOnChanges(t){t.tables&&this.filterTables()}trackByTableName(t,n){return n.name}filterTables(){if(this.searchQuery){const t=this.searchQuery.toLowerCase();this.filteredTables=this.tables.filter(n=>n.name.toLowerCase().includes(t))}else this.filteredTables=this.tables}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["df-schema-tree"]],inputs:{serviceName:"serviceName",serviceLabel:"serviceLabel",tables:"tables",loading:"loading",error:"error",selectedTable:"selectedTable"},outputs:{tableSelected:"tableSelected",backClicked:"backClicked",retry:"retry"},standalone:!0,features:[e.OA$,e.aNF],decls:1,vars:1,consts:[["class","schema-tree",4,"transloco","translocoScope"],[1,"schema-tree"],[1,"panel-header"],["mat-icon-button","",1,"back-btn",3,"click"],[1,"header-icon",3,"icon"],[1,"header-title",3,"matTooltip"],["class","search-box",4,"ngIf"],["class","tables-header",4,"ngIf"],["class","loading-state",4,"ngIf"],["class","error-state",4,"ngIf"],["class","empty-state",4,"ngIf"],["class","table-list",4,"ngIf"],[1,"search-box"],["appearance","outline",1,"search-field"],["matPrefix",""],["matInput","",3,"placeholder","ngModel","ngModelChange"],[1,"tables-header"],[1,"tables-label"],[1,"tables-count"],[1,"loading-state"],["diameter","32"],[1,"error-state"],["color","warn"],["mat-stroked-button","","color","primary",3,"click"],[1,"empty-state"],[1,"table-list"],["mat-list-item","","class","table-item",3,"selected","click",4,"ngFor","ngForOf","ngForTrackBy"],["mat-list-item","",1,"table-item",3,"click"],[1,"table-icon",3,"icon"],[1,"table-name"]],template:function(n,o){1&n&&e.DNE(0,le,14,9,"div",0),2&n&&e.Y8G("translocoScope","dataExplorer")},dependencies:[f.bT,f.pM,C.YN,C.me,C.BC,C.vS,P.Fg,P._L,P.YE,_.m_,_.An,g.Hl,g.$z,g.iY,u.D6,u.LG,w.RG,w.rl,w.JW,$.fS,$.fg,h.uc,h.oV,d.Q8,d.bA,d.Kj,v.dX,v.aY],styles:[".schema-tree[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column}.panel-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:0 12px 0 8px;height:49px;box-sizing:border-box;border-bottom:1px solid var(--df-border);font-weight:600;font-size:1.4rem;letter-spacing:-.01em;color:var(--df-text)}.panel-header[_ngcontent-%COMP%] .back-btn[_ngcontent-%COMP%]{flex-shrink:0;width:36px;height:36px;display:flex;align-items:center;justify-content:center}.panel-header[_ngcontent-%COMP%] .back-btn[_ngcontent-%COMP%] .mat-mdc-button-touch-target{width:36px;height:36px}.panel-header[_ngcontent-%COMP%] .back-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px}.panel-header[_ngcontent-%COMP%] .header-icon[_ngcontent-%COMP%]{color:var(--df-accent);font-size:16px;flex-shrink:0}.panel-header[_ngcontent-%COMP%] .header-title[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;min-width:0}.search-box[_ngcontent-%COMP%]{padding:12px 12px 0}.search-box[_ngcontent-%COMP%] .search-field[_ngcontent-%COMP%]{width:100%}.search-box[_ngcontent-%COMP%] .search-field[_ngcontent-%COMP%] .mat-mdc-form-field-infix{min-height:44px;padding:8px 0!important;display:flex;align-items:center}.search-box[_ngcontent-%COMP%] .search-field[_ngcontent-%COMP%] .mat-mdc-text-field-wrapper{padding:0 12px}.search-box[_ngcontent-%COMP%] .search-field[_ngcontent-%COMP%] .mat-mdc-form-field-icon-prefix{padding:0 8px 0 0;display:flex;align-items:center}.search-box[_ngcontent-%COMP%] .search-field[_ngcontent-%COMP%] input.mat-mdc-input-element{font-size:14px;line-height:1.4;height:auto}.search-box[_ngcontent-%COMP%] .search-field[_ngcontent-%COMP%] .mat-mdc-form-field-subscript-wrapper{display:none}.tables-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:8px 16px 4px;font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--df-text-muted);font-weight:600}.tables-header[_ngcontent-%COMP%] .tables-count[_ngcontent-%COMP%]{background:var(--df-surface-2);border:1px solid var(--df-border-2);border-radius:10px;padding:1px 8px;font-size:11px;font-weight:500;color:var(--df-text-muted)}.loading-state[_ngcontent-%COMP%], .error-state[_ngcontent-%COMP%], .empty-state[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:12px;padding:32px 16px;text-align:center;color:var(--df-text-muted);font-size:1.3rem}.table-list[_ngcontent-%COMP%]{flex:1;overflow-y:auto;padding-top:0}.table-item[_ngcontent-%COMP%]{height:40px!important;padding:0 16px!important;font-size:1.3rem;cursor:pointer}.table-item[_ngcontent-%COMP%] .mdc-list-item__primary-text{display:flex!important;align-items:center;width:100%}.table-item[_ngcontent-%COMP%] .table-icon[_ngcontent-%COMP%]{color:var(--df-accent);font-size:13px;margin-right:10px;flex-shrink:0;pointer-events:none}.table-item[_ngcontent-%COMP%] .table-name[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;pointer-events:none}.table-item[_ngcontent-%COMP%]:hover{background:var(--df-hover)}.table-item.selected[_ngcontent-%COMP%]{background:var(--df-accent-soft);font-weight:500}"]})}}return i})();var m=c(58497),V=c(1929),G=c(82180),b=c(33329),E=c(42250),j=c(83607),Y=c(8275);let se=0;const de=(0,E.Ob)(class{}),L="mat-badge-content";let pe=(()=>{class i extends de{get color(){return this._color}set color(t){this._setColor(t),this._color=t}get overlap(){return this._overlap}set overlap(t){this._overlap=(0,Y.he)(t)}get content(){return this._content}set content(t){this._updateRenderedContent(t)}get description(){return this._description}set description(t){this._updateDescription(t)}get hidden(){return this._hidden}set hidden(t){this._hidden=(0,Y.he)(t)}constructor(t,n,o,a,l){super(),this._ngZone=t,this._elementRef=n,this._ariaDescriber=o,this._renderer=a,this._animationMode=l,this._color="primary",this._overlap=!0,this.position="above after",this.size="medium",this._id=se++,this._isInitialized=!1,this._interactivityChecker=(0,e.WQX)(j.Z7),this._document=(0,e.WQX)(f.qQ)}isAbove(){return-1===this.position.indexOf("below")}isAfter(){return-1===this.position.indexOf("before")}getBadgeElement(){return this._badgeElement}ngOnInit(){this._clearExistingBadges(),this.content&&!this._badgeElement&&(this._badgeElement=this._createBadgeElement(),this._updateRenderedContent(this.content)),this._isInitialized=!0}ngOnDestroy(){this._renderer.destroyNode&&(this._renderer.destroyNode(this._badgeElement),this._inlineBadgeDescription?.remove()),this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.description)}_isHostInteractive(){return this._interactivityChecker.isFocusable(this._elementRef.nativeElement,{ignoreVisibility:!0})}_createBadgeElement(){const t=this._renderer.createElement("span"),n="mat-badge-active";return t.setAttribute("id",`mat-badge-content-${this._id}`),t.setAttribute("aria-hidden","true"),t.classList.add(L),"NoopAnimations"===this._animationMode&&t.classList.add("_mat-animation-noopable"),this._elementRef.nativeElement.appendChild(t),"function"==typeof requestAnimationFrame&&"NoopAnimations"!==this._animationMode?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{t.classList.add(n)})}):t.classList.add(n),t}_updateRenderedContent(t){const n=`${t??""}`.trim();this._isInitialized&&n&&!this._badgeElement&&(this._badgeElement=this._createBadgeElement()),this._badgeElement&&(this._badgeElement.textContent=n),this._content=n}_updateDescription(t){this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.description),(!t||this._isHostInteractive())&&this._removeInlineDescription(),this._description=t,this._isHostInteractive()?this._ariaDescriber.describe(this._elementRef.nativeElement,t):this._updateInlineDescription()}_updateInlineDescription(){this._inlineBadgeDescription||(this._inlineBadgeDescription=this._document.createElement("span"),this._inlineBadgeDescription.classList.add("cdk-visually-hidden")),this._inlineBadgeDescription.textContent=this.description,this._badgeElement?.appendChild(this._inlineBadgeDescription)}_removeInlineDescription(){this._inlineBadgeDescription?.remove(),this._inlineBadgeDescription=void 0}_setColor(t){const n=this._elementRef.nativeElement.classList;n.remove(`mat-badge-${this._color}`),t&&n.add(`mat-badge-${t}`)}_clearExistingBadges(){const t=this._elementRef.nativeElement.querySelectorAll(`:scope > .${L}`);for(const n of Array.from(t))n!==this._badgeElement&&n.remove()}static{this.\u0275fac=function(n){return new(n||i)(e.rXU(e.SKi),e.rXU(e.aKT),e.rXU(j.vr),e.rXU(e.sFG),e.rXU(e.bc$,8))}}static{this.\u0275dir=e.FsC({type:i,selectors:[["","matBadge",""]],hostAttrs:[1,"mat-badge"],hostVars:20,hostBindings:function(n,o){2&n&&e.AVh("mat-badge-overlap",o.overlap)("mat-badge-above",o.isAbove())("mat-badge-below",!o.isAbove())("mat-badge-before",!o.isAfter())("mat-badge-after",o.isAfter())("mat-badge-small","small"===o.size)("mat-badge-medium","medium"===o.size)("mat-badge-large","large"===o.size)("mat-badge-hidden",o.hidden||!o.content)("mat-badge-disabled",o.disabled)},inputs:{disabled:["matBadgeDisabled","disabled"],color:["matBadgeColor","color"],overlap:["matBadgeOverlap","overlap"],position:["matBadgePosition","position"],content:["matBadge","content"],description:["matBadgeDescription","description"],size:["matBadgeSize","size"],hidden:["matBadgeHidden","hidden"]},features:[e.Vt3]})}}return i})(),fe=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=e.$C({type:i})}static{this.\u0275inj=e.G2t({imports:[j.Pd,E.yE,E.yE]})}}return i})();var I=c(87621),A=c(29167),_e=c(91900),ge=c(45318),R=c(56579),me=c(62572),he=c(86606),ue=c(23135),S=c(12324),be=c(57588),D=c(68686),k=c(48444);const ve=["Database","Big Data"];let N=(()=>{class i{constructor(){this.http=(0,e.WQX)(me.Qq)}getDatabaseServices(){const t=ve.map(n=>this.http.get(`${D.C}/system/service_type`,{params:{fields:"name",group:n},headers:{"show-loading":"","Cache-Control":"no-cache, private"},context:(0,k.PH)()}));return(0,he.p)(t).pipe((0,S.T)(n=>n.flatMap(o=>o.resource||[]).map(o=>o.name)),(0,be.n)(n=>{if(0===n.length)return new ue.c(a=>{a.next([]),a.complete()});const o=`(type in ("${n.join('","')}"))`;return this.http.get(`${D.C}/system/service`,{params:{filter:o,fields:"id,name,label,description,type",limit:"100",sort:"name"},headers:{"show-loading":"","Cache-Control":"no-cache, private"},context:(0,k.PH)()}).pipe((0,S.T)(a=>(a.resource||[]).filter(l=>!1!==l.isActive)))}))}getSchema(t){return this.http.get(`${D.C}/${t}/_schema`,{headers:{"show-loading":""},context:(0,k.PH)()}).pipe((0,S.T)(n=>(n.resource||[]).sort((o,a)=>o.name.localeCompare(a.name))))}getTableSchema(t,n){return this.http.get(`${D.C}/${t}/_schema/${n}`,{params:{refresh:"true"},headers:{"show-loading":""},context:(0,k.PH)()})}getTableData(t,n,o=50,a=0,l,s){const p={limit:o.toString(),offset:a.toString(),include_count:"true"};return l&&(p.order=l),s&&(p.filter=s),this.http.get(`${D.C}/${t}/_table/${n}`,{params:p,headers:{"show-loading":""},context:(0,k.PH)()})}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=e.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();function xe(i,r){1&i&&(e.j41(0,"div",8),e.nrm(1,"mat-spinner",9),e.k0s())}function Ce(i,r){if(1&i&&(e.j41(0,"div",10)(1,"mat-icon",11),e.EFF(2,"error_outline"),e.k0s(),e.j41(3,"span"),e.EFF(4),e.nI1(5,"transloco"),e.k0s()()),2&i){const t=e.XpG(2);e.R7$(4),e.JRh(e.bMT(5,1,t.error))}}function Oe(i,r){1&i&&(e.j41(0,"mat-chip",28),e.EFF(1,"PK"),e.k0s())}function Me(i,r){if(1&i&&(e.j41(0,"mat-chip",29),e.EFF(1,"FK"),e.k0s()),2&i){const t=e.XpG().$implicit;e.Y8G("matTooltip",t.refTable+"."+t.refField)}}function Pe(i,r){1&i&&(e.j41(0,"mat-chip",30),e.EFF(1,"UQ"),e.k0s())}function De(i,r){1&i&&(e.j41(0,"span",31),e.EFF(1,"NOT NULL"),e.k0s())}function ke(i,r){1&i&&(e.j41(0,"span",32),e.EFF(1,"AUTO"),e.k0s())}function Fe(i,r){if(1&i){const t=e.RV6();e.j41(0,"div",33)(1,"mat-icon",34),e.EFF(2,"subdirectory_arrow_right"),e.k0s(),e.j41(3,"a",35),e.bIt("click",function(){e.eBV(t);const o=e.XpG().$implicit,a=e.XpG(3);return e.Njj(a.navigateToTable.emit(o.refTable))}),e.EFF(4),e.k0s()()}if(2&i){const t=e.XpG().$implicit;e.R7$(4),e.Lme(" ",t.refTable,".",t.refField," ")}}function Te(i,r){if(1&i&&(e.j41(0,"div",17)(1,"div",18)(2,"span"),e.EFF(3),e.k0s(),e.j41(4,"mat-chip-set",19),e.DNE(5,Oe,2,0,"mat-chip",20),e.DNE(6,Me,2,1,"mat-chip",21),e.DNE(7,Pe,2,0,"mat-chip",22),e.k0s()(),e.j41(8,"div",23),e.EFF(9),e.k0s(),e.j41(10,"div",24),e.DNE(11,De,2,0,"span",25),e.DNE(12,ke,2,0,"span",26),e.k0s(),e.DNE(13,Fe,5,2,"div",27),e.k0s()),2&i){const t=r.$implicit;e.R7$(3),e.JRh(t.name),e.R7$(2),e.Y8G("ngIf",t.isPrimaryKey),e.R7$(1),e.Y8G("ngIf",t.isForeignKey),e.R7$(1),e.Y8G("ngIf",t.isUnique&&!t.isPrimaryKey),e.R7$(2),e.JRh(t.dbType),e.R7$(2),e.Y8G("ngIf",!t.allowNull),e.R7$(1),e.Y8G("ngIf",t.autoIncrement),e.R7$(1),e.Y8G("ngIf",t.isForeignKey&&t.refTable)}}function ye(i,r){if(1&i){const t=e.RV6();e.j41(0,"div",38)(1,"mat-icon",39),e.EFF(2),e.k0s(),e.j41(3,"div",40)(4,"span",41),e.EFF(5),e.k0s(),e.j41(6,"a",35),e.bIt("click",function(){const a=e.eBV(t).$implicit,l=e.XpG(4);return e.Njj(l.navigateToTable.emit(a.refTable))}),e.EFF(7),e.k0s(),e.j41(8,"span",42),e.EFF(9),e.k0s()()()}if(2&i){const t=r.$implicit;e.R7$(2),e.JRh("belongs_to"===t.type?"arrow_back":"arrow_forward"),e.R7$(3),e.JRh(t.type),e.R7$(2),e.JRh(t.refTable),e.R7$(2),e.Lme("",t.field," \u2192 ",t.refField,"")}}function we(i,r){if(1&i&&(e.j41(0,"div")(1,"div",13),e.EFF(2),e.k0s(),e.j41(3,"div",36),e.DNE(4,ye,10,5,"div",37),e.k0s()()),2&i){const t=e.XpG(2).$implicit,n=e.XpG();e.R7$(2),e.Lme(" ",t("dataExplorer.relationships")," (",n.schema.related.length,") "),e.R7$(2),e.Y8G("ngForOf",n.schema.related)("ngForTrackBy",n.trackByRelName)}}function Ge(i,r){if(1&i&&(e.j41(0,"div",12)(1,"div",13),e.EFF(2),e.k0s(),e.j41(3,"div",14),e.DNE(4,Te,14,8,"div",15),e.k0s(),e.DNE(5,we,5,4,"div",16),e.k0s()),2&i){const t=e.XpG().$implicit,n=e.XpG();e.R7$(2),e.Lme(" ",t("dataExplorer.columns")," (",n.schema.field.length,") "),e.R7$(2),e.Y8G("ngForOf",n.schema.field)("ngForTrackBy",n.trackByFieldName),e.R7$(1),e.Y8G("ngIf",n.schema.related&&n.schema.related.length>0)}}function Re(i,r){if(1&i){const t=e.RV6();e.j41(0,"div",1)(1,"div",2)(2,"span",3),e.EFF(3),e.k0s(),e.j41(4,"button",4),e.bIt("click",function(){e.eBV(t);const o=e.XpG();return e.Njj(o.closeClicked.emit())}),e.j41(5,"mat-icon"),e.EFF(6,"close"),e.k0s()()(),e.DNE(7,xe,2,0,"div",5),e.DNE(8,Ce,6,3,"div",6),e.DNE(9,Ge,6,5,"div",7),e.k0s()}if(2&i){const t=r.$implicit,n=e.XpG();e.R7$(3),e.JRh(t("dataExplorer.schemaInfo")),e.R7$(4),e.Y8G("ngIf",n.loading),e.R7$(1),e.Y8G("ngIf",n.error&&!n.loading),e.R7$(1),e.Y8G("ngIf",n.schema&&!n.loading&&!n.error)}}let U=(()=>{class i{constructor(t){this.dataExplorerService=t,this.serviceName="",this.tableName="",this.closeClicked=new e.bkB,this.navigateToTable=new e.bkB,this.schema=null,this.loading=!1,this.error=null,this.cache=new Map,this.destroy$=new y.B}ngOnChanges(t){(t.tableName||t.serviceName)&&this.loadSchema()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}trackByFieldName(t,n){return n.name}trackByRelName(t,n){return n.name}loadSchema(){if(!this.serviceName||!this.tableName)return;const t=`${this.serviceName}:${this.tableName}`;this.cache.has(t)?this.schema=this.cache.get(t):(this.loading=!0,this.error=null,this.dataExplorerService.getTableSchema(this.serviceName,this.tableName).pipe((0,M.Q)(this.destroy$)).subscribe({next:n=>{this.schema=n,this.cache.set(t,n),this.loading=!1},error:n=>{this.error=(0,R.cQ)(n).message,this.loading=!1}}))}getSchema(){return this.schema}getCachedSchema(t,n){return this.cache.get(`${t}:${n}`)||null}static{this.\u0275fac=function(n){return new(n||i)(e.rXU(N))}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["df-schema-info"]],inputs:{serviceName:"serviceName",tableName:"tableName"},outputs:{closeClicked:"closeClicked",navigateToTable:"navigateToTable"},standalone:!0,features:[e.OA$,e.aNF],decls:1,vars:1,consts:[["class","schema-info-panel",4,"transloco","translocoScope"],[1,"schema-info-panel"],[1,"schema-header"],[1,"schema-title"],["mat-icon-button","",1,"close-btn",3,"click"],["class","schema-loading",4,"ngIf"],["class","schema-error",4,"ngIf"],["class","schema-body",4,"ngIf"],[1,"schema-loading"],["diameter","24"],[1,"schema-error"],["color","warn"],[1,"schema-body"],[1,"section-header"],[1,"field-list"],["class","field-row",4,"ngFor","ngForOf","ngForTrackBy"],[4,"ngIf"],[1,"field-row"],[1,"field-name"],[1,"field-badges"],["class","badge-pk","disabled","",4,"ngIf"],["class","badge-fk","disabled","",3,"matTooltip",4,"ngIf"],["class","badge-uq","disabled","",4,"ngIf"],[1,"field-type"],[1,"field-meta"],["class","not-null",4,"ngIf"],["class","auto-inc",4,"ngIf"],["class","field-ref",4,"ngIf"],["disabled","",1,"badge-pk"],["disabled","",1,"badge-fk",3,"matTooltip"],["disabled","",1,"badge-uq"],[1,"not-null"],[1,"auto-inc"],[1,"field-ref"],[1,"ref-icon"],[1,"ref-link",3,"click"],[1,"rel-list"],["class","rel-row",4,"ngFor","ngForOf","ngForTrackBy"],[1,"rel-row"],[1,"rel-icon"],[1,"rel-info"],[1,"rel-type"],[1,"rel-field"]],template:function(n,o){1&n&&e.DNE(0,Re,10,4,"div",0),2&n&&e.Y8G("translocoScope","dataExplorer")},dependencies:[f.bT,f.pM,_.m_,_.An,g.Hl,g.iY,b.YN,b.Jl,b.Jo,u.D6,u.LG,h.uc,h.oV,d.Q8,d.bA,d.Kj],styles:[".schema-info-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;border-left:1px solid var(--df-border);background:var(--df-bg);width:320px;overflow:hidden}.schema-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;border-bottom:1px solid var(--df-border);background:var(--df-surface-2)}.schema-header[_ngcontent-%COMP%] .schema-title[_ngcontent-%COMP%]{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--df-text-muted)}.schema-header[_ngcontent-%COMP%] .close-btn[_ngcontent-%COMP%]{width:28px;height:28px;line-height:28px}.schema-loading[_ngcontent-%COMP%]{display:flex;justify-content:center;padding:24px}.schema-error[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:12px;font-size:1.3rem;color:var(--df-danger)}.schema-body[_ngcontent-%COMP%]{flex:1;overflow-y:auto;padding:0}.section-header[_ngcontent-%COMP%]{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--df-text-muted);padding:12px 12px 6px;border-bottom:1px solid var(--df-border-2)}.field-list[_ngcontent-%COMP%] .field-row[_ngcontent-%COMP%]{padding:6px 12px;border-bottom:1px solid var(--df-border-2);font-size:12px}.field-list[_ngcontent-%COMP%] .field-row[_ngcontent-%COMP%] .field-name[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;font-weight:500;color:var(--df-text);font-family:SFMono-Regular,Menlo,Consolas,monospace}.field-list[_ngcontent-%COMP%] .field-row[_ngcontent-%COMP%] .field-badges[_ngcontent-%COMP%]{display:inline-flex;gap:4px}.field-list[_ngcontent-%COMP%] .field-row[_ngcontent-%COMP%] .field-badges[_ngcontent-%COMP%] mat-chip[_ngcontent-%COMP%]{font-size:9px;min-height:18px;padding:0 6px}.field-list[_ngcontent-%COMP%] .field-row[_ngcontent-%COMP%] .field-badges[_ngcontent-%COMP%] .badge-pk[_ngcontent-%COMP%]{--mdc-chip-elevated-container-color: var(--df-accent);--mdc-chip-label-text-color: var(--df-accent-contrast)}.field-list[_ngcontent-%COMP%] .field-row[_ngcontent-%COMP%] .field-badges[_ngcontent-%COMP%] .badge-fk[_ngcontent-%COMP%]{--mdc-chip-elevated-container-color: var(--df-accent-soft);--mdc-chip-label-text-color: var(--df-accent-strong)}.field-list[_ngcontent-%COMP%] .field-row[_ngcontent-%COMP%] .field-badges[_ngcontent-%COMP%] .badge-uq[_ngcontent-%COMP%]{--mdc-chip-elevated-container-color: var(--df-surface-2);--mdc-chip-label-text-color: var(--df-text-2)}.field-list[_ngcontent-%COMP%] .field-row[_ngcontent-%COMP%] .field-type[_ngcontent-%COMP%]{font-size:11px;color:var(--df-text-muted);margin-top:2px;font-family:SFMono-Regular,Menlo,Consolas,monospace}.field-list[_ngcontent-%COMP%] .field-row[_ngcontent-%COMP%] .field-meta[_ngcontent-%COMP%]{display:flex;gap:8px;margin-top:2px}.field-list[_ngcontent-%COMP%] .field-row[_ngcontent-%COMP%] .field-meta[_ngcontent-%COMP%] .not-null[_ngcontent-%COMP%], .field-list[_ngcontent-%COMP%] .field-row[_ngcontent-%COMP%] .field-meta[_ngcontent-%COMP%] .auto-inc[_ngcontent-%COMP%]{font-size:10px;color:var(--df-text-faint);text-transform:uppercase}.field-list[_ngcontent-%COMP%] .field-row[_ngcontent-%COMP%] .field-ref[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;margin-top:2px}.field-list[_ngcontent-%COMP%] .field-row[_ngcontent-%COMP%] .field-ref[_ngcontent-%COMP%] .ref-icon[_ngcontent-%COMP%]{font-size:14px;width:14px;height:14px;color:var(--df-text-faint)}.ref-link[_ngcontent-%COMP%]{color:var(--df-accent);cursor:pointer;font-size:11px;text-decoration:none}.ref-link[_ngcontent-%COMP%]:hover{color:var(--df-accent-strong);text-decoration:underline}.rel-list[_ngcontent-%COMP%] .rel-row[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:8px;padding:6px 12px;border-bottom:1px solid var(--df-border-2)}.rel-list[_ngcontent-%COMP%] .rel-row[_ngcontent-%COMP%] .rel-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px;color:var(--df-accent);margin-top:2px}.rel-list[_ngcontent-%COMP%] .rel-row[_ngcontent-%COMP%] .rel-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px}.rel-list[_ngcontent-%COMP%] .rel-row[_ngcontent-%COMP%] .rel-info[_ngcontent-%COMP%] .rel-type[_ngcontent-%COMP%]{font-size:10px;text-transform:uppercase;color:var(--df-text-faint);letter-spacing:.06em}.rel-list[_ngcontent-%COMP%] .rel-row[_ngcontent-%COMP%] .rel-info[_ngcontent-%COMP%] .rel-field[_ngcontent-%COMP%]{font-size:11px;color:var(--df-text-muted);font-family:SFMono-Regular,Menlo,Consolas,monospace}"]})}}return i})();function $e(i,r){if(1&i&&(e.j41(0,"span",16),e.EFF(1),e.k0s()),2&i){const t=r.ngIf;e.R7$(1),e.JRh(t.dbType)}}function Ee(i,r){1&i&&(e.j41(0,"mat-chip",20),e.EFF(1,"PK"),e.k0s())}function je(i,r){if(1&i&&(e.j41(0,"mat-chip",21),e.EFF(1,"FK"),e.k0s()),2&i){const t=e.XpG().ngIf;e.Y8G("matTooltip",t.refTable+"."+t.refField)}}function Ie(i,r){if(1&i&&(e.j41(0,"mat-chip-set",17),e.DNE(1,Ee,2,0,"mat-chip",18),e.DNE(2,je,2,1,"mat-chip",19),e.k0s()),2&i){const t=r.ngIf;e.R7$(1),e.Y8G("ngIf",t.isPrimaryKey),e.R7$(1),e.Y8G("ngIf",t.isForeignKey)}}function Se(i,r){if(1&i&&(e.qex(0),e.j41(1,"span",22),e.EFF(2),e.k0s(),e.bVm()),2&i){const t=e.XpG(3).$implicit;e.R7$(2),e.JRh(t("dataExplorer.nullValue"))}}function Ne(i,r){if(1&i&&(e.j41(0,"pre",25),e.EFF(1),e.nI1(2,"json"),e.k0s()),2&i){const t=e.XpG(2).$implicit,n=e.XpG(3);e.R7$(1),e.JRh(e.bMT(2,1,n.row[t]))}}function Xe(i,r){if(1&i&&(e.j41(0,"span",26),e.EFF(1),e.k0s()),2&i){const t=e.XpG(2).$implicit,n=e.XpG(3);e.R7$(1),e.JRh(n.row[t])}}function ze(i,r){if(1&i&&(e.qex(0),e.DNE(1,Ne,3,3,"pre",23),e.DNE(2,Xe,2,1,"span",24),e.bVm()),2&i){const t=e.XpG().$implicit,n=e.XpG(3);e.R7$(1),e.Y8G("ngIf",n.isObject(n.row[t])),e.R7$(1),e.Y8G("ngIf",!n.isObject(n.row[t]))}}function Be(i,r){if(1&i){const t=e.RV6();e.j41(0,"div",27)(1,"mat-icon",28),e.EFF(2,"link"),e.k0s(),e.j41(3,"a",29),e.bIt("click",function(){e.eBV(t);const o=e.XpG().$implicit,a=e.XpG(3);return e.Njj(a.navigateToTable.emit(a.getFieldInfo(o).refTable))}),e.EFF(4),e.k0s()()}if(2&i){const t=e.XpG().$implicit,n=e.XpG(3);e.R7$(4),e.Lme(" ",n.getFieldInfo(t).refTable,".",n.getFieldInfo(t).refField," ")}}function Ve(i,r){if(1&i&&(e.j41(0,"div",8)(1,"div",9)(2,"span",10),e.EFF(3),e.k0s(),e.DNE(4,$e,2,1,"span",11),e.DNE(5,Ie,3,2,"mat-chip-set",12),e.k0s(),e.j41(6,"div",13),e.DNE(7,Se,3,1,"ng-container",14),e.DNE(8,ze,3,2,"ng-container",14),e.k0s(),e.DNE(9,Be,5,2,"div",15),e.k0s()),2&i){const t=r.$implicit,n=e.XpG(3);let o;e.R7$(3),e.JRh(t),e.R7$(1),e.Y8G("ngIf",n.getFieldInfo(t)),e.R7$(1),e.Y8G("ngIf",n.getFieldInfo(t)),e.R7$(1),e.AVh("null-value",null==n.row[t]),e.R7$(1),e.Y8G("ngIf",null==n.row[t]),e.R7$(1),e.Y8G("ngIf",null!=n.row[t]),e.R7$(1),e.Y8G("ngIf",(null==(o=n.getFieldInfo(t))?null:o.isForeignKey)&&(null==(o=n.getFieldInfo(t))?null:o.refTable))}}function Ye(i,r){if(1&i&&(e.j41(0,"div",6),e.DNE(1,Ve,10,8,"div",7),e.k0s()),2&i){const t=e.XpG(2);e.R7$(1),e.Y8G("ngForOf",t.objectKeys(t.row))}}function Le(i,r){if(1&i){const t=e.RV6();e.j41(0,"div",1)(1,"div",2)(2,"span",3),e.EFF(3),e.k0s(),e.j41(4,"button",4),e.bIt("click",function(){e.eBV(t);const o=e.XpG();return e.Njj(o.closeClicked.emit())}),e.j41(5,"mat-icon"),e.EFF(6,"close"),e.k0s()()(),e.DNE(7,Ye,2,1,"div",5),e.k0s()}if(2&i){const t=r.$implicit,n=e.XpG();e.R7$(3),e.JRh(t("dataExplorer.recordDetail")),e.R7$(4),e.Y8G("ngIf",n.row)}}let Ae=(()=>{class i{constructor(){this.row=null,this.schema=null,this.closeClicked=new e.bkB,this.navigateToTable=new e.bkB,this.objectKeys=Object.keys}isObject(t){return null!==t&&"object"==typeof t}getFieldInfo(t){return this.schema?.field&&this.schema.field.find(n=>n.name===t)||null}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["df-row-detail"]],inputs:{row:"row",schema:"schema"},outputs:{closeClicked:"closeClicked",navigateToTable:"navigateToTable"},standalone:!0,features:[e.aNF],decls:1,vars:1,consts:[["class","row-detail-panel",4,"transloco","translocoScope"],[1,"row-detail-panel"],[1,"detail-header"],[1,"detail-title"],["mat-icon-button","",1,"close-btn",3,"click"],["class","detail-body",4,"ngIf"],[1,"detail-body"],["class","field-entry",4,"ngFor","ngForOf"],[1,"field-entry"],[1,"field-label"],[1,"field-key"],["class","field-type-badge",4,"ngIf"],["class","field-badges",4,"ngIf"],[1,"field-value"],[4,"ngIf"],["class","field-ref",4,"ngIf"],[1,"field-type-badge"],[1,"field-badges"],["class","badge-pk","disabled","",4,"ngIf"],["class","badge-fk","disabled","",3,"matTooltip",4,"ngIf"],["disabled","",1,"badge-pk"],["disabled","",1,"badge-fk",3,"matTooltip"],[1,"null-badge"],["class","json-value",4,"ngIf"],["class","text-value",4,"ngIf"],[1,"json-value"],[1,"text-value"],[1,"field-ref"],[1,"ref-icon"],[1,"ref-link",3,"click"]],template:function(n,o){1&n&&e.DNE(0,Le,8,2,"div",0),2&n&&e.Y8G("translocoScope","dataExplorer")},dependencies:[f.bT,f.pM,f.TG,_.m_,_.An,g.Hl,g.iY,b.YN,b.Jl,b.Jo,h.uc,h.oV,d.Q8,d.bA],styles:[".row-detail-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;width:380px;border-left:1px solid var(--df-border);background:var(--df-bg);overflow:hidden}.detail-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;border-bottom:1px solid var(--df-border);background:var(--df-surface-2)}.detail-header[_ngcontent-%COMP%] .detail-title[_ngcontent-%COMP%]{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--df-text-muted)}.detail-header[_ngcontent-%COMP%] .close-btn[_ngcontent-%COMP%]{width:28px;height:28px;line-height:28px}.detail-body[_ngcontent-%COMP%]{flex:1;overflow-y:auto;padding:0}.field-entry[_ngcontent-%COMP%]{padding:8px 12px;border-bottom:1px solid var(--df-border-2)}.field-entry[_ngcontent-%COMP%] .field-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;margin-bottom:4px}.field-entry[_ngcontent-%COMP%] .field-label[_ngcontent-%COMP%] .field-key[_ngcontent-%COMP%]{font-size:12px;font-weight:600;color:var(--df-text);font-family:SFMono-Regular,Menlo,Consolas,monospace}.field-entry[_ngcontent-%COMP%] .field-label[_ngcontent-%COMP%] .field-type-badge[_ngcontent-%COMP%]{font-size:10px;color:var(--df-text-faint);font-family:SFMono-Regular,Menlo,Consolas,monospace}.field-entry[_ngcontent-%COMP%] .field-label[_ngcontent-%COMP%] .field-badges[_ngcontent-%COMP%]{display:inline-flex;gap:4px}.field-entry[_ngcontent-%COMP%] .field-label[_ngcontent-%COMP%] .field-badges[_ngcontent-%COMP%] mat-chip[_ngcontent-%COMP%]{font-size:9px;min-height:18px;padding:0 6px}.field-entry[_ngcontent-%COMP%] .field-label[_ngcontent-%COMP%] .field-badges[_ngcontent-%COMP%] .badge-pk[_ngcontent-%COMP%]{--mdc-chip-elevated-container-color: var(--df-accent);--mdc-chip-label-text-color: var(--df-accent-contrast)}.field-entry[_ngcontent-%COMP%] .field-label[_ngcontent-%COMP%] .field-badges[_ngcontent-%COMP%] .badge-fk[_ngcontent-%COMP%]{--mdc-chip-elevated-container-color: var(--df-accent-soft);--mdc-chip-label-text-color: var(--df-accent-strong)}.field-entry[_ngcontent-%COMP%] .field-value[_ngcontent-%COMP%]{font-size:1.3rem;color:var(--df-text);word-break:break-word}.field-entry[_ngcontent-%COMP%] .field-value[_ngcontent-%COMP%] .null-badge[_ngcontent-%COMP%]{display:inline-block;font-size:11px;padding:1px 8px;border-radius:var(--df-radius-sm);background:var(--df-surface-2);color:var(--df-text-faint);font-style:italic}.field-entry[_ngcontent-%COMP%] .field-value[_ngcontent-%COMP%] .json-value[_ngcontent-%COMP%]{font-size:12px;font-family:SFMono-Regular,Menlo,Consolas,monospace;background:var(--df-surface-2);border:1px solid var(--df-border);border-radius:var(--df-radius-sm);padding:8px;margin:4px 0 0;overflow-x:auto;max-height:200px;white-space:pre-wrap}.field-entry[_ngcontent-%COMP%] .field-value[_ngcontent-%COMP%] .text-value[_ngcontent-%COMP%]{white-space:pre-wrap}.field-entry.null-value[_ngcontent-%COMP%] .field-value[_ngcontent-%COMP%]{color:var(--df-text-faint)}.field-entry[_ngcontent-%COMP%] .field-ref[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;margin-top:4px}.field-entry[_ngcontent-%COMP%] .field-ref[_ngcontent-%COMP%] .ref-icon[_ngcontent-%COMP%]{font-size:14px;width:14px;height:14px;color:var(--df-text-faint)}.ref-link[_ngcontent-%COMP%]{color:var(--df-accent);cursor:pointer;font-size:11px;text-decoration:none}.ref-link[_ngcontent-%COMP%]:hover{color:var(--df-accent-strong);text-decoration:underline}"]})}}return i})();function Ue(i,r){if(1&i){const t=e.RV6();e.j41(0,"button",33),e.bIt("click",function(){e.eBV(t);const o=e.XpG(3);return e.Njj(o.clearQuickSearch())}),e.j41(1,"mat-icon"),e.EFF(2,"close"),e.k0s()()}}function Je(i,r){if(1&i){const t=e.RV6();e.j41(0,"div",29)(1,"mat-icon",30),e.EFF(2,"search"),e.k0s(),e.j41(3,"input",31),e.bIt("input",function(o){e.eBV(t);const a=e.XpG(2);return e.Njj(a.onQuickSearch(o))}),e.k0s(),e.DNE(4,Ue,3,0,"button",32),e.k0s()}if(2&i){const t=e.XpG().$implicit,n=e.XpG();e.R7$(3),e.Y8G("placeholder",t("dataExplorer.quickSearch"))("value",n.quickSearchTerm),e.R7$(1),e.Y8G("ngIf",n.quickSearchTerm)}}function He(i,r){if(1&i){const t=e.RV6();e.j41(0,"button",34),e.bIt("click",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.clearAllFilters())}),e.j41(1,"mat-icon",35),e.EFF(2,"filter_list_off"),e.k0s()()}if(2&i){const t=e.XpG().$implicit,n=e.XpG();e.Y8G("matTooltip",t("dataExplorer.clearFilters")),e.R7$(1),e.Y8G("matBadge",n.activeFilterCount)}}function Qe(i,r){if(1&i){const t=e.RV6();e.j41(0,"div",36),e.bIt("click",function(o){return o.stopPropagation()}),e.j41(1,"mat-checkbox",37),e.bIt("change",function(){const a=e.eBV(t).$implicit,l=e.XpG(2);return e.Njj(l.toggleColumn(a))}),e.EFF(2),e.k0s()()}if(2&i){const t=r.$implicit,n=e.XpG(2);e.R7$(1),e.Y8G("checked",!n.hiddenColumns.has(t)),e.R7$(1),e.SpI(" ",t," ")}}function Ke(i,r){if(1&i){const t=e.RV6();e.j41(0,"div",38)(1,"mat-icon",39),e.EFF(2,"link"),e.k0s(),e.j41(3,"span",40),e.EFF(4,"Filtered via foreign key: "),e.j41(5,"code"),e.EFF(6),e.k0s()(),e.j41(7,"button",41),e.bIt("click",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.clearNavigationFilter())}),e.j41(8,"mat-icon"),e.EFF(9,"close"),e.k0s()()()}if(2&i){const t=e.XpG(2);e.R7$(6),e.JRh(t.navigationFilter)}}function We(i,r){if(1&i&&(e.j41(0,"span",55),e.EFF(1),e.k0s()),2&i){const t=e.XpG(3);e.yjJ("matTooltip","Records ",t.currentOffset+1," through ",t.currentOffset+t.dataSource.data.length," out of ",t.totalRecords," total. Use the per-column filters below the headers for server-side filtering."),e.R7$(1),e.E5c(" ",t.currentOffset+1,"\u2013",t.currentOffset+t.dataSource.data.length," of ",t.totalRecords," records ")}}function qe(i,r){if(1&i&&(e.j41(0,"option",56),e.EFF(1),e.k0s()),2&i){const t=r.$implicit;e.Y8G("value",t),e.R7$(1),e.SpI(" ",t," ")}}function Ze(i,r){if(1&i){const t=e.RV6();e.j41(0,"div",42)(1,"div",43),e.DNE(2,We,2,6,"span",44),e.k0s(),e.j41(3,"div",45)(4,"label",46),e.EFF(5,"Rows: "),e.j41(6,"select",47),e.bIt("change",function(o){e.eBV(t);const a=e.XpG(2);return e.Njj(a.onPageSizeChange(o))}),e.DNE(7,qe,2,2,"option",48),e.k0s()(),e.j41(8,"div",49)(9,"button",50),e.bIt("click",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.goToFirstPage())}),e.j41(10,"mat-icon"),e.EFF(11,"first_page"),e.k0s()(),e.j41(12,"button",51),e.bIt("click",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.goToPrevPage())}),e.j41(13,"mat-icon"),e.EFF(14,"chevron_left"),e.k0s()(),e.j41(15,"span",52),e.EFF(16),e.k0s(),e.j41(17,"button",53),e.bIt("click",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.goToNextPage())}),e.j41(18,"mat-icon"),e.EFF(19,"chevron_right"),e.k0s()(),e.j41(20,"button",54),e.bIt("click",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.goToLastPage())}),e.j41(21,"mat-icon"),e.EFF(22,"last_page"),e.k0s()()()()()}if(2&i){const t=e.XpG(2);e.R7$(2),e.Y8G("ngIf",t.totalRecords>0),e.R7$(4),e.Y8G("value",t.pageSize),e.R7$(1),e.Y8G("ngForOf",t.pageSizeOptions),e.R7$(2),e.Y8G("disabled",0===t.pageIndex),e.R7$(3),e.Y8G("disabled",0===t.pageIndex),e.R7$(4),e.Lme("",t.pageIndex+1," / ",t.totalPages,""),e.R7$(1),e.Y8G("disabled",t.isLastPage()),e.R7$(3),e.Y8G("disabled",t.isLastPage())}}function et(i,r){if(1&i){const t=e.RV6();e.j41(0,"label",65)(1,"input",66),e.bIt("change",function(){const a=e.eBV(t).$implicit,l=e.XpG(4);return e.Njj(l.toggleApiRelated(a.name))}),e.k0s(),e.EFF(2),e.k0s()}if(2&i){const t=r.$implicit,n=e.XpG(4);e.Y8G("matTooltip",t.type+": Include "+t.refTable+" records linked via "+t.field+" \u2192 "+t.refField),e.R7$(1),e.Y8G("checked",n.apiSelectedRelated[t.name]),e.R7$(1),e.SpI(" ",t.name," ")}}function tt(i,r){if(1&i&&(e.j41(0,"div",69)(1,"span",64),e.EFF(2,"Related:"),e.k0s(),e.DNE(3,et,3,3,"label",70),e.k0s()),2&i){const t=e.XpG(3);e.R7$(3),e.Y8G("ngForOf",t.cachedSchema.related)("ngForTrackBy",t.trackByRelName)}}function nt(i,r){if(1&i){const t=e.RV6();e.j41(0,"div",57)(1,"div",58),e.EFF(2," This is the DreamFactory REST API call equivalent to your current view. Any sorting or column filters you apply will update the URL in real time. Click the URL or the copy button to copy it to your clipboard. "),e.k0s(),e.j41(3,"div",59)(4,"span",60),e.EFF(5,"GET"),e.k0s(),e.j41(6,"code",61),e.bIt("click",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.copyApiUrl())}),e.EFF(7),e.k0s(),e.j41(8,"button",62),e.bIt("click",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.copyApiUrl())}),e.j41(9,"mat-icon"),e.EFF(10),e.k0s()()(),e.j41(11,"div",63)(12,"span",64),e.EFF(13,"Include:"),e.k0s(),e.j41(14,"label",65)(15,"input",66),e.bIt("change",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.apiIncludeLimit=!o.apiIncludeLimit)}),e.k0s(),e.EFF(16," limit "),e.k0s(),e.j41(17,"label",65)(18,"input",66),e.bIt("change",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.apiIncludeOffset=!o.apiIncludeOffset)}),e.k0s(),e.EFF(19," offset "),e.k0s(),e.j41(20,"label",67)(21,"input",66),e.bIt("change",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.apiIncludeCount=!o.apiIncludeCount)}),e.k0s(),e.EFF(22," include_count "),e.k0s()(),e.DNE(23,tt,4,2,"div",68),e.k0s()}if(2&i){const t=e.XpG(2);e.R7$(7),e.JRh(t.buildApiUrl()),e.R7$(3),e.JRh(t.apiCopied?"check":"content_copy"),e.R7$(4),e.Mz_("matTooltip","limit: Maximum number of records to return per request (currently ",t.pageSize,")"),e.R7$(1),e.Y8G("checked",t.apiIncludeLimit),e.R7$(2),e.Mz_("matTooltip","offset: Number of records to skip, used for pagination (currently ",t.currentOffset,")"),e.R7$(1),e.Y8G("checked",t.apiIncludeOffset),e.R7$(3),e.Y8G("checked",t.apiIncludeCount),e.R7$(2),e.Y8G("ngIf",null==t.cachedSchema||null==t.cachedSchema.related?null:t.cachedSchema.related.length)}}function it(i,r){if(1&i&&(e.j41(0,"div",71),e.nrm(1,"mat-spinner",72),e.j41(2,"span"),e.EFF(3),e.k0s()()),2&i){const t=e.XpG().$implicit;e.R7$(3),e.JRh(t("dataExplorer.loadingData"))}}function ot(i,r){if(1&i){const t=e.RV6();e.j41(0,"div",73)(1,"mat-icon",74),e.EFF(2,"error_outline"),e.k0s(),e.j41(3,"span"),e.EFF(4),e.nI1(5,"transloco"),e.k0s(),e.j41(6,"button",75),e.bIt("click",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.loadData())}),e.EFF(7),e.k0s()()}if(2&i){const t=e.XpG().$implicit,n=e.XpG();e.R7$(4),e.JRh(e.bMT(5,2,n.error)),e.R7$(3),e.SpI(" ",t("dataExplorer.retry")," ")}}function at(i,r){if(1&i&&(e.j41(0,"div",76)(1,"mat-icon"),e.EFF(2,"inbox"),e.k0s(),e.j41(3,"span"),e.EFF(4),e.k0s(),e.j41(5,"small"),e.EFF(6),e.k0s()()),2&i){const t=e.XpG().$implicit;e.R7$(4),e.JRh(t("dataExplorer.noData")),e.R7$(2),e.JRh(t("dataExplorer.noDataHint"))}}function rt(i,r){1&i&&(e.j41(0,"mat-icon",90),e.EFF(1,"vpn_key"),e.k0s())}function lt(i,r){if(1&i){const t=e.RV6();e.j41(0,"th",87),e.DNE(1,rt,2,0,"mat-icon",88),e.EFF(2),e.j41(3,"span",89),e.bIt("mousedown",function(o){e.eBV(t);const a=e.XpG().$implicit,l=e.XpG(3);return e.Njj(l.onResizeStart(o,a))}),e.k0s()()}if(2&i){const t=e.XpG().$implicit,n=e.XpG(3);e.xc7("width",n.columnWidths[t],"px")("min-width",n.columnWidths[t],"px")("max-width",n.columnWidths[t],"px"),e.R7$(1),e.Y8G("ngIf",n.isPrimaryKey(t)),e.R7$(1),e.SpI(" ",t," ")}}function ct(i,r){if(1&i){const t=e.RV6();e.j41(0,"span",94),e.bIt("click",function(o){e.eBV(t);const a=e.XpG().$implicit,l=e.XpG().$implicit,s=e.XpG(3);return e.Njj(s.onFkClick(o,l,a[l]))}),e.EFF(1),e.j41(2,"mat-icon",95),e.EFF(3,"open_in_new"),e.k0s()()}if(2&i){const t=e.XpG().$implicit,n=e.XpG().$implicit,o=e.XpG(3);e.Y8G("matTooltip","Go to "+o.getFkRefTable(n)),e.R7$(1),e.SpI(" ",o.formatCellValue(t[n])," ")}}function st(i,r){if(1&i&&(e.qex(0),e.EFF(1),e.bVm()),2&i){const t=e.XpG().$implicit,n=e.XpG().$implicit,o=e.XpG(3);e.R7$(1),e.SpI(" ",o.formatCellValue(t[n])," ")}}function dt(i,r){if(1&i&&(e.j41(0,"td",91),e.DNE(1,ct,4,2,"span",92),e.DNE(2,st,2,1,"ng-container",93),e.k0s()),2&i){const t=r.$implicit,n=e.XpG().$implicit,o=e.XpG(3);e.xc7("width",o.columnWidths[n],"px")("min-width",o.columnWidths[n],"px")("max-width",o.columnWidths[n],"px"),e.AVh("null-cell",null==t[n])("fk-cell",o.isForeignKey(n)&&null!=t[n]),e.R7$(1),e.Y8G("ngIf",o.isForeignKey(n)&&null!=t[n]),e.R7$(1),e.Y8G("ngIf",!(o.isForeignKey(n)&&null!=t[n]))}}function pt(i,r){1&i&&(e.qex(0,84),e.DNE(1,lt,4,8,"th",85),e.DNE(2,dt,3,12,"td",86),e.bVm()),2&i&&e.Y8G("matColumnDef",r.$implicit)}function ft(i,r){if(1&i&&(e.j41(0,"option",56),e.EFF(1),e.k0s()),2&i){const t=r.$implicit;e.Y8G("value",t.value),e.R7$(1),e.SpI(" ",t.label," ")}}function _t(i,r){if(1&i){const t=e.RV6();e.j41(0,"input",101),e.bIt("input",function(o){e.eBV(t);const a=e.XpG(2).$implicit,l=e.XpG(3);return e.Njj(l.onFilterInput(a,o))}),e.k0s()}if(2&i){const t=e.XpG(2).$implicit,n=e.XpG(2).$implicit,o=e.XpG();e.Y8G("placeholder",n("dataExplorer.filterPlaceholder"))("value",o.getFilterValue(t))}}function gt(i,r){if(1&i){const t=e.RV6();e.j41(0,"th",97)(1,"div",98)(2,"select",99),e.bIt("change",function(o){e.eBV(t);const a=e.XpG().$implicit,l=e.XpG(3);return e.Njj(l.onFilterOpChange(a,o))}),e.DNE(3,ft,2,2,"option",48),e.k0s(),e.DNE(4,_t,1,2,"input",100),e.k0s()()}if(2&i){const t=e.XpG().$implicit,n=e.XpG(3);e.xc7("width",n.columnWidths[t],"px")("min-width",n.columnWidths[t],"px")("max-width",n.columnWidths[t],"px"),e.R7$(2),e.Y8G("value",n.getFilterOp(t)),e.R7$(1),e.Y8G("ngForOf",n.getOperatorsForColumn(t)),e.R7$(1),e.Y8G("ngIf",!n.isNullOp(n.getFilterOp(t)))}}function mt(i,r){1&i&&(e.qex(0,84),e.DNE(1,gt,5,9,"th",96),e.bVm()),2&i&&e.Y8G("matColumnDef","filter_"+r.$implicit)}function ht(i,r){1&i&&e.nrm(0,"tr",102)}function ut(i,r){1&i&&e.nrm(0,"tr",103)}function bt(i,r){if(1&i){const t=e.RV6();e.j41(0,"tr",104),e.bIt("click",function(){const a=e.eBV(t).$implicit,l=e.XpG(3);return e.Njj(l.onRowClick(a))}),e.k0s()}if(2&i){const t=r.$implicit,n=e.XpG(3);e.AVh("selected-row",t===n.selectedRow),e.Y8G("matTooltipShowDelay",800)}}function vt(i,r){if(1&i){const t=e.RV6();e.j41(0,"div",77)(1,"div",78)(2,"table",79),e.bIt("matSortChange",function(o){e.eBV(t);const a=e.XpG(2);return e.Njj(a.onSortChange(o))}),e.DNE(3,pt,3,1,"ng-container",80),e.DNE(4,mt,2,1,"ng-container",80),e.DNE(5,ht,1,0,"tr",81),e.DNE(6,ut,1,0,"tr",82),e.DNE(7,bt,1,3,"tr",83),e.k0s()()()}if(2&i){const t=e.XpG(2);e.AVh("is-loading",t.loading),e.R7$(2),e.Y8G("dataSource",t.dataSource),e.R7$(1),e.Y8G("ngForOf",t.columns),e.R7$(1),e.Y8G("ngForOf",t.columns),e.R7$(1),e.Y8G("matHeaderRowDef",t.columns)("matHeaderRowDefSticky",!0),e.R7$(1),e.Y8G("matHeaderRowDef",t.filterColumns)("matHeaderRowDefSticky",!0),e.R7$(1),e.Y8G("matRowDefColumns",t.columns)}}function xt(i,r){1&i&&(e.qex(0),e.EFF(1," (filtered)"),e.bVm())}function Ct(i,r){if(1&i&&(e.j41(0,"span",112),e.EFF(1),e.k0s()),2&i){const t=e.XpG(3);e.R7$(1),e.Lme(" Page ",t.pageIndex+1," of ",t.totalPages," ")}}function Ot(i,r){if(1&i){const t=e.RV6();e.j41(0,"div",105)(1,"span",106),e.EFF(2),e.DNE(3,xt,2,0,"ng-container",93),e.k0s(),e.j41(4,"span",107),e.EFF(5),e.k0s(),e.j41(6,"div",108),e.DNE(7,Ct,2,2,"span",109),e.j41(8,"div",110)(9,"button",111),e.bIt("click",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.goToFirstPage())}),e.j41(10,"mat-icon"),e.EFF(11,"first_page"),e.k0s()(),e.j41(12,"button",111),e.bIt("click",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.goToPrevPage())}),e.j41(13,"mat-icon"),e.EFF(14,"chevron_left"),e.k0s()(),e.j41(15,"button",111),e.bIt("click",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.goToNextPage())}),e.j41(16,"mat-icon"),e.EFF(17,"chevron_right"),e.k0s()(),e.j41(18,"button",111),e.bIt("click",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.goToLastPage())}),e.j41(19,"mat-icon"),e.EFF(20,"last_page"),e.k0s()()()()()}if(2&i){const t=e.XpG(2);e.R7$(2),e.SpI(" ",t.totalRecords," records "),e.R7$(1),e.Y8G("ngIf",t.activeFilterCount>0),e.R7$(2),e.Lme("",t.columns.length," of ",t.allColumns.length," columns"),e.R7$(2),e.Y8G("ngIf",t.totalRecords>0),e.R7$(2),e.Y8G("disabled",0===t.pageIndex),e.R7$(3),e.Y8G("disabled",0===t.pageIndex),e.R7$(3),e.Y8G("disabled",t.isLastPage()),e.R7$(3),e.Y8G("disabled",t.isLastPage())}}function Mt(i,r){if(1&i){const t=e.RV6();e.j41(0,"df-schema-info",113),e.bIt("closeClicked",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.showSchemaPanel=!1)})("navigateToTable",function(o){e.eBV(t);const a=e.XpG(2);return e.Njj(a.tableNavigated.emit({tableName:o}))}),e.k0s()}if(2&i){const t=e.XpG(2);e.Y8G("serviceName",t.serviceName)("tableName",t.tableName)}}function Pt(i,r){if(1&i){const t=e.RV6();e.j41(0,"df-row-detail",114),e.bIt("closeClicked",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.selectedRow=null)})("navigateToTable",function(o){e.eBV(t);const a=e.XpG(2);return e.Njj(a.tableNavigated.emit({tableName:o}))}),e.k0s()}if(2&i){const t=e.XpG(2);e.Y8G("row",t.selectedRow)("schema",t.cachedSchema)}}function Dt(i,r){if(1&i){const t=e.RV6();e.j41(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4),e.nrm(4,"fa-icon",5),e.j41(5,"span",6),e.EFF(6),e.k0s(),e.j41(7,"mat-chip-set",7)(8,"mat-chip",8),e.nrm(9,"fa-icon",9),e.EFF(10),e.k0s()()(),e.j41(11,"div",10),e.DNE(12,Je,5,3,"div",11),e.DNE(13,He,3,2,"button",12),e.j41(14,"button",13),e.bIt("click",function(){e.eBV(t);const o=e.XpG();return e.Njj(o.showApiCall=!o.showApiCall)}),e.j41(15,"mat-icon"),e.EFF(16,"code"),e.k0s()(),e.j41(17,"button",14)(18,"mat-icon"),e.EFF(19,"view_column"),e.k0s()(),e.j41(20,"mat-menu",15,16),e.DNE(22,Qe,3,2,"div",17),e.k0s(),e.j41(23,"button",18),e.bIt("click",function(){e.eBV(t);const o=e.XpG();return e.Njj(o.toggleSchemaPanel())}),e.j41(24,"mat-icon"),e.EFF(25,"info_outline"),e.k0s()()()(),e.DNE(26,Ke,10,1,"div",19),e.DNE(27,Ze,23,9,"div",20),e.DNE(28,nt,24,8,"div",21),e.DNE(29,it,4,1,"div",22),e.DNE(30,ot,8,4,"div",23),e.DNE(31,at,7,2,"div",24),e.DNE(32,vt,8,10,"div",25),e.DNE(33,Ot,21,9,"div",26),e.k0s(),e.DNE(34,Mt,1,2,"df-schema-info",27),e.DNE(35,Pt,1,2,"df-row-detail",28),e.k0s()}if(2&i){const t=r.$implicit,n=e.sdS(21),o=e.XpG();e.R7$(4),e.Y8G("icon",o.faTable),e.R7$(2),e.JRh(o.tableName),e.R7$(3),e.Y8G("icon",o.faLock),e.R7$(1),e.SpI(" ",t("dataExplorer.readOnly")," "),e.R7$(2),e.Y8G("ngIf",!o.initialLoading&&o.columns.length>0),e.R7$(1),e.Y8G("ngIf",o.activeFilterCount>0),e.R7$(1),e.AVh("active",o.showApiCall),e.R7$(3),e.Y8G("matMenuTriggerFor",n),e.R7$(5),e.Y8G("ngForOf",o.allColumns),e.R7$(1),e.AVh("active",o.showSchemaPanel),e.R7$(3),e.Y8G("ngIf",o.navigationFilter),e.R7$(1),e.Y8G("ngIf",!o.initialLoading&&!o.error&&o.columns.length>0),e.R7$(1),e.Y8G("ngIf",o.showApiCall&&!o.initialLoading&&o.columns.length>0),e.R7$(1),e.Y8G("ngIf",o.initialLoading),e.R7$(1),e.Y8G("ngIf",o.error&&!o.initialLoading),e.R7$(1),e.Y8G("ngIf",!o.initialLoading&&!o.error&&0===o.dataSource.data.length&&0===o.allColumns.length),e.R7$(1),e.Y8G("ngIf",!o.initialLoading&&!o.error&&o.columns.length>0),e.R7$(1),e.Y8G("ngIf",!o.initialLoading&&!o.error&&o.columns.length>0),e.R7$(1),e.Y8G("ngIf",o.showSchemaPanel),e.R7$(1),e.Y8G("ngIf",o.selectedRow)}}let kt=(()=>{class i{constructor(t,n,o){this.dataExplorerService=t,this.cdr=n,this.ngZone=o,this.serviceName="",this.tableName="",this.tableNavigated=new e.bkB,this.dataSource=new m.I6([]),this.allColumns=[],this.columns=[],this.filterColumns=[],this.hiddenColumns=new Set,this.totalRecords=0,this.pageSize=50,this.pageSizeOptions=[25,50,100,250,500],this.pageIndex=0,this.currentOffset=0,this.loading=!1,this.initialLoading=!1,this.error=null,this.columnFilters={},this.activeFilterCount=0,this.filterSubject$=new y.B,this.columnWidths={},this.resizeRafId=0,this.showSchemaPanel=!1,this.showApiCall=!1,this.apiCopied=!1,this.apiIncludeLimit=!0,this.apiIncludeOffset=!0,this.apiIncludeCount=!0,this.apiSelectedRelated={},this.selectedRow=null,this.cachedSchema=null,this.navigationFilter=null,this.quickSearchTerm="",this.faTable=x.w97,this.faLock=x.DW4,this.faFilter=x.mRM,this.faCode=x.jTw,this.destroy$=new y.B,this.textOperators=[{value:"contains",label:"contains"},{value:"eq",label:"="},{value:"neq",label:"\u2260"},{value:"starts",label:"starts with"},{value:"ends",label:"ends with"},{value:"is_null",label:"is null"},{value:"is_not_null",label:"is not null"}],this.numericOperators=[{value:"eq",label:"="},{value:"neq",label:"\u2260"},{value:"gt",label:">"},{value:"lt",label:"<"},{value:"gte",label:"\u2265"},{value:"lte",label:"\u2264"},{value:"is_null",label:"is null"},{value:"is_not_null",label:"is not null"}],this.dateOperators=[{value:"eq",label:"="},{value:"neq",label:"\u2260"},{value:"gt",label:"after"},{value:"lt",label:"before"},{value:"gte",label:"on/after"},{value:"lte",label:"on/before"},{value:"is_null",label:"is null"},{value:"is_not_null",label:"is not null"}],this.booleanOperators=[{value:"eq",label:"="},{value:"is_null",label:"is null"},{value:"is_not_null",label:"is not null"}],this.fieldInfoCache=new Map,this.fieldInfoCacheSchema=null,this.apiStateVersion=0,this.apiUrlCacheKey="",this.apiUrlCache="",this.filterSubject$.pipe((0,ge.B)(500),(0,M.Q)(this.destroy$)).subscribe(()=>{this.pageIndex=0,this.currentOffset=0,this.loadData()})}ngAfterViewInit(){}ngOnChanges(t){(t.tableName||t.serviceName)&&this.resetAndLoad()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),cancelAnimationFrame(this.resizeRafId)}get totalPages(){return Math.max(1,Math.ceil(this.totalRecords/this.pageSize))}resetAndLoad(){this.allColumns=[],this.columns=[],this.filterColumns=[],this.hiddenColumns=new Set,this.dataSource.data=[],this.totalRecords=0,this.pageIndex=0,this.currentOffset=0,this.currentSort=void 0,this.columnFilters={},this.apiStateVersion++,this.activeFilterCount=0,this.selectedRow=null,this.cachedSchema=null,this.columnWidths={},this.navigationFilter=this.initialFilter||null,this.initialLoading=!0,this.loadData(),this.loadSchemaForTable()}loadSchemaForTable(){!this.serviceName||!this.tableName||this.dataExplorerService.getTableSchema(this.serviceName,this.tableName).pipe((0,M.Q)(this.destroy$)).subscribe({next:t=>{this.cachedSchema=t,this.apiSelectedRelated={},this.apiStateVersion++,this.dataSource.data=[...this.dataSource.data],this.cdr.detectChanges()},error:()=>{}})}loadData(){if(!this.serviceName||!this.tableName)return;this.loading=!0,this.error=null;const t=this.buildFilterString(),o=[this.navigationFilter,t].filter(Boolean).join(" AND ")||void 0;this.dataExplorerService.getTableData(this.serviceName,this.tableName,this.pageSize,this.currentOffset,this.currentSort,o).pipe((0,M.Q)(this.destroy$)).subscribe({next:a=>{const l=a.resource||[];if(l.length>0&&0===this.allColumns.length){this.allColumns=Object.keys(l[0]),this.updateVisibleColumns();for(const s of this.allColumns)this.columnWidths[s]=150}this.dataSource.data=l,this.totalRecords=a.meta?.count??l.length,this.loading=!1,this.initialLoading=!1},error:a=>{this.error=(0,R.cQ)(a).message,this.loading=!1,this.initialLoading=!1}})}toggleColumn(t){this.hiddenColumns.has(t)?this.hiddenColumns.delete(t):this.columns.length>1&&this.hiddenColumns.add(t),this.updateVisibleColumns()}updateVisibleColumns(){this.columns=this.allColumns.filter(t=>!this.hiddenColumns.has(t)),this.filterColumns=this.columns.map(t=>"filter_"+t)}onPageChange(t){this.pageSize=t.pageSize,this.pageIndex=t.pageIndex,this.currentOffset=t.pageIndex*t.pageSize,this.loadData()}onPageSizeChange(t){this.pageSize=Number(t.target.value),this.pageIndex=0,this.currentOffset=0,this.loadData()}goToFirstPage(){this.pageIndex=0,this.currentOffset=0,this.loadData()}goToPrevPage(){this.pageIndex>0&&(this.pageIndex--,this.currentOffset=this.pageIndex*this.pageSize,this.loadData())}goToNextPage(){this.isLastPage()||(this.pageIndex++,this.currentOffset=this.pageIndex*this.pageSize,this.loadData())}goToLastPage(){this.pageIndex=Math.max(0,Math.ceil(this.totalRecords/this.pageSize)-1),this.currentOffset=this.pageIndex*this.pageSize,this.loadData()}isLastPage(){return this.currentOffset+this.pageSize>=this.totalRecords}onSortChange(t){if(t.direction){const n=this.getDbColumnName(t.active);this.currentSort=`${n} ${t.direction.toUpperCase()}`}else this.currentSort=void 0;this.pageIndex=0,this.currentOffset=0,this.loadData()}getFieldInfo(t){if(!this.cachedSchema?.field)return null;this.fieldInfoCacheSchema!==this.cachedSchema&&(this.fieldInfoCacheSchema=this.cachedSchema,this.fieldInfoCache.clear());const n=this.fieldInfoCache.get(t);if(void 0!==n)return n;const o=this.cachedSchema.field.find(s=>s.name===t),a=t.toLowerCase(),l=o||this.cachedSchema.field.find(s=>s.name.toLowerCase().replace(/_/g,"")===a)||null;return this.fieldInfoCache.set(t,l),l}getDbColumnName(t){return this.getFieldInfo(t)?.name??t}onResizeStart(t,n){t.stopPropagation(),t.preventDefault();const o=t.pageX,a=this.columnWidths[n]||150;document.body.style.cursor="col-resize",document.body.style.userSelect="none";const l=p=>{cancelAnimationFrame(this.resizeRafId),this.resizeRafId=requestAnimationFrame(()=>{this.columnWidths[n]=Math.max(60,a+(p.pageX-o)),this.cdr.detectChanges()})},s=()=>{cancelAnimationFrame(this.resizeRafId),document.body.style.cursor="",document.body.style.userSelect="",document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",s),this.cdr.detectChanges()};this.ngZone.runOutsideAngular(()=>{document.addEventListener("mousemove",l),document.addEventListener("mouseup",s)})}getOperatorsForColumn(t){const n=this.getFieldInfo(t);if(!n)return this.textOperators;const o=(n.type||n.dbType).toLowerCase();return this.isNumericType(o)?this.numericOperators:this.isDateType(o)?this.dateOperators:this.isBooleanType(o)?this.booleanOperators:this.textOperators}getFilterOp(t){return this.columnFilters[t]?.op||this.getDefaultOp(t)}getFilterValue(t){return this.columnFilters[t]?.value||""}getDefaultOp(t){return this.getOperatorsForColumn(t)[0].value}isNullOp(t){return"is_null"===t||"is_not_null"===t}onFilterOpChange(t,n){const o=n.target.value,a=this.columnFilters[t]?.value||"";this.columnFilters[t]={op:o,value:a},this.isNullOp(o)?(this.columnFilters[t]={op:o,value:""},this.updateActiveFilterCount(),this.filterSubject$.next()):a?(this.updateActiveFilterCount(),this.filterSubject$.next()):this.updateActiveFilterCount()}onFilterInput(t,n){const o=n.target.value,a=this.columnFilters[t]?.op||this.getDefaultOp(t);this.columnFilters[t]=o?{op:a,value:o}:{op:a,value:""},this.updateActiveFilterCount(),this.filterSubject$.next()}clearAllFilters(){this.columnFilters={},this.apiStateVersion++,this.activeFilterCount=0,this.pageIndex=0,this.currentOffset=0,this.loadData()}updateActiveFilterCount(){this.apiStateVersion++,this.activeFilterCount=Object.keys(this.columnFilters).filter(t=>{const n=this.columnFilters[t];return n.value||this.isNullOp(n.op)}).length}buildFilterString(){const t=[];for(const[n,o]of Object.entries(this.columnFilters)){const{op:a,value:l}=o;if(!l&&!this.isNullOp(a))continue;const s=this.getDbColumnName(n);if("is_null"!==a)if("is_not_null"!==a){if(l)if("contains"===a){const p=l.replace(/'/g,"''");t.push(`(${s} like '%${p}%')`)}else if("starts"===a){const p=l.replace(/'/g,"''");t.push(`(${s} like '${p}%')`)}else if("ends"===a){const p=l.replace(/'/g,"''");t.push(`(${s} like '%${p}')`)}else{const O={eq:"=",neq:"!=",gt:">",lt:"<",gte:">=",lte:"<="}[a]||"=",F=this.getFieldInfo(n),X=(F?.type||F?.dbType||"").toLowerCase();if(this.isNumericType(X)&&!isNaN(Number(l)))t.push(`(${s} ${O} ${l})`);else{const St=l.replace(/'/g,"''");t.push(`(${s} ${O} '${St}')`)}}}else t.push(`(${s} IS NOT NULL)`);else t.push(`(${s} IS NULL)`)}return t.join(" AND ")}isNumericType(t){return["integer","int","smallint","bigint","tinyint","float","double","decimal","numeric","real","serial","bigserial","int2","int4","int8","float4","float8","money"].some(o=>t.toLowerCase().includes(o))}isDateType(t){return["date","datetime","timestamp","time","timestamptz","timetz"].some(o=>t.toLowerCase().includes(o))}isBooleanType(t){return["boolean","bool","bit"].some(o=>t.toLowerCase().includes(o))}onRowClick(t){this.selectedRow=this.selectedRow===t?null:t}toggleSchemaPanel(){this.showSchemaPanel=!this.showSchemaPanel}isPrimaryKey(t){return this.getFieldInfo(t)?.isPrimaryKey??!1}isForeignKey(t){return this.getFieldInfo(t)?.isForeignKey??!1}getFkRefTable(t){return this.getFieldInfo(t)?.refTable||""}onFkClick(t,n,o){t.stopPropagation();const a=this.getFieldInfo(n);if(!a?.refTable||!a?.refField)return;const s=this.isNumericType((a.type||a.dbType).toLowerCase())?`(${a.refField} = ${o})`:`(${a.refField} = '${String(o).replace(/'/g,"''")}')`;this.tableNavigated.emit({tableName:a.refTable,filter:s})}clearNavigationFilter(){this.navigationFilter=null,this.pageIndex=0,this.currentOffset=0,this.loadData()}buildApiUrl(){const t=`${this.serviceName}|${this.tableName}|${this.apiIncludeLimit}|${this.apiIncludeOffset}|${this.apiIncludeCount}|${this.pageSize}|${this.currentOffset}|${this.currentSort}|${this.navigationFilter}|${this.apiStateVersion}`;if(t===this.apiUrlCacheKey)return this.apiUrlCache;const n=`${window.location.origin}/api/v2/${this.serviceName}/_table/${this.tableName}`,o=new URLSearchParams;this.apiIncludeLimit&&o.set("limit",this.pageSize.toString()),this.apiIncludeOffset&&o.set("offset",this.currentOffset.toString()),this.apiIncludeCount&&o.set("include_count","true"),this.currentSort&&o.set("order",this.currentSort);const a=this.buildFilterString(),s=[this.navigationFilter,a].filter(Boolean).join(" AND ");s&&o.set("filter",s);const p=Object.entries(this.apiSelectedRelated).filter(([F,X])=>X).map(([F])=>F);p.length>0&&o.set("related",p.join(","));const O=o.toString();return this.apiUrlCacheKey=t,this.apiUrlCache=O?`${n}?${O}`:n,this.apiUrlCache}toggleApiRelated(t){this.apiSelectedRelated[t]=!this.apiSelectedRelated[t],this.apiStateVersion++}trackByRelName(t,n){return n.name}copyApiUrl(){const t=this.buildApiUrl();navigator.clipboard.writeText(t).then(()=>{this.apiCopied=!0,setTimeout(()=>this.apiCopied=!1,2e3)})}onQuickSearch(t){this.quickSearchTerm=t.target.value,this.applyQuickSearch()}clearQuickSearch(){this.quickSearchTerm="",this.applyQuickSearch()}applyQuickSearch(){this.dataSource.filter=this.quickSearchTerm?this.quickSearchTerm.trim().toLowerCase():"",this.dataSource.filterPredicate=(t,n)=>this.columns.some(o=>{const a=t[o];return null!=a&&String(a).toLowerCase().includes(n)})}formatCellValue(t){if(null==t)return"NULL";if("object"==typeof t)return JSON.stringify(t);if("boolean"==typeof t)return t?"true":"false";const n=String(t);return n.length>200?n.substring(0,200)+"...":n}static{this.\u0275fac=function(n){return new(n||i)(e.rXU(N),e.rXU(e.gRc),e.rXU(e.SKi))}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["df-data-grid"]],viewQuery:function(n,o){if(1&n&&(e.GBs(V.iy,5),e.GBs(G.B4,5),e.GBs(U,5)),2&n){let a;e.mGM(a=e.lsd())&&(o.paginator=a.first),e.mGM(a=e.lsd())&&(o.sort=a.first),e.mGM(a=e.lsd())&&(o.schemaInfoComponent=a.first)}},inputs:{serviceName:"serviceName",tableName:"tableName",initialFilter:"initialFilter"},outputs:{tableNavigated:"tableNavigated"},standalone:!0,features:[e.OA$,e.aNF],decls:1,vars:1,consts:[["class","data-grid-container",4,"transloco","translocoScope"],[1,"data-grid-container"],[1,"grid-main"],[1,"grid-toolbar"],[1,"toolbar-left"],[1,"toolbar-icon",3,"icon"],[1,"table-title"],[1,"readonly-chip"],["disabled","","matTooltip","Data Explorer is currently read-only. Use the API call to build write operations."],[1,"lock-icon",3,"icon"],[1,"toolbar-right"],["class","quick-search","matTooltip","Search within the current page of results. Filters rows client-side across all visible columns.",4,"ngIf"],["mat-icon-button","","class","clear-filters-btn",3,"matTooltip","click",4,"ngIf"],["mat-icon-button","","matTooltip","Show the DreamFactory REST API call that matches your current view. Copy it to use in your own apps.",3,"click"],["mat-icon-button","","matTooltip","Show or hide columns in the grid",3,"matMenuTriggerFor"],[1,"column-menu"],["columnMenu","matMenu"],["class","column-menu-item",3,"click",4,"ngFor","ngForOf"],["mat-icon-button","","matTooltip","View column types, primary keys, foreign keys, and table relationships",3,"click"],["class","nav-filter-bar",4,"ngIf"],["class","top-pagination",4,"ngIf"],["class","api-call-bar",4,"ngIf"],["class","loading-state",4,"ngIf"],["class","error-state",4,"ngIf"],["class","empty-state",4,"ngIf"],["class","table-wrapper",3,"is-loading",4,"ngIf"],["class","grid-footer",4,"ngIf"],[3,"serviceName","tableName","closeClicked","navigateToTable",4,"ngIf"],[3,"row","schema","closeClicked","navigateToTable",4,"ngIf"],["matTooltip","Search within the current page of results. Filters rows client-side across all visible columns.",1,"quick-search"],[1,"search-icon"],[1,"search-input",3,"placeholder","value","input"],["class","search-clear",3,"click",4,"ngIf"],[1,"search-clear",3,"click"],["mat-icon-button","",1,"clear-filters-btn",3,"matTooltip","click"],["matBadgeColor","accent","matBadgeSize","small",3,"matBadge"],[1,"column-menu-item",3,"click"],[3,"checked","change"],[1,"nav-filter-bar"],[1,"nav-filter-icon"],[1,"nav-filter-text"],["mat-icon-button","","matTooltip","Remove navigation filter and show all records",1,"nav-filter-clear",3,"click"],[1,"top-pagination"],[1,"top-pagination-left"],["class","page-info",3,"matTooltip",4,"ngIf"],[1,"top-pagination-right"],[1,"page-size-label"],[1,"page-size-select",3,"value","change"],[3,"value",4,"ngFor","ngForOf"],[1,"page-nav"],["mat-icon-button","","matTooltip","First page",3,"disabled","click"],["mat-icon-button","","matTooltip","Previous page",3,"disabled","click"],[1,"page-label"],["mat-icon-button","","matTooltip","Next page",3,"disabled","click"],["mat-icon-button","","matTooltip","Last page",3,"disabled","click"],[1,"page-info",3,"matTooltip"],[3,"value"],[1,"api-call-bar"],[1,"api-call-desc"],[1,"api-call-top"],["matTooltip","HTTP method: GET retrieves records without modifying data",1,"api-method"],["matTooltip","Click to copy this URL",1,"api-url",3,"click"],["mat-icon-button","","matTooltip","Copy URL to clipboard",1,"copy-btn",3,"click"],[1,"api-call-options"],[1,"options-label"],[1,"api-option",3,"matTooltip"],["type","checkbox",3,"checked","change"],["matTooltip","include_count: Returns total record count in the response metadata",1,"api-option"],["class","api-call-related",4,"ngIf"],[1,"api-call-related"],["class","api-option",3,"matTooltip",4,"ngFor","ngForOf","ngForTrackBy"],[1,"loading-state"],["diameter","40"],[1,"error-state"],["color","warn"],["mat-stroked-button","","color","primary",3,"click"],[1,"empty-state"],[1,"table-wrapper"],[1,"table-scroll"],["mat-table","","matSort","",1,"data-table",3,"dataSource","matSortChange"],[3,"matColumnDef",4,"ngFor","ngForOf"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-header-row","","class","filter-row",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","","class","clickable-row","matTooltip","Click to view full record details",3,"selected-row","matTooltipShowDelay","click",4,"matRowDef","matRowDefColumns"],[3,"matColumnDef"],["mat-header-cell","","mat-sort-header","","class","header-cell",3,"width","min-width","max-width",4,"matHeaderCellDef"],["mat-cell","","class","data-cell",3,"width","min-width","max-width","null-cell","fk-cell",4,"matCellDef"],["mat-header-cell","","mat-sort-header","",1,"header-cell"],["class","pk-icon","matTooltip","Primary Key",4,"ngIf"],[1,"resize-handle",3,"mousedown"],["matTooltip","Primary Key",1,"pk-icon"],["mat-cell","",1,"data-cell"],["class","fk-link",3,"matTooltip","click",4,"ngIf"],[4,"ngIf"],[1,"fk-link",3,"matTooltip","click"],[1,"fk-nav-icon"],["mat-header-cell","","class","filter-cell",3,"width","min-width","max-width",4,"matHeaderCellDef"],["mat-header-cell","",1,"filter-cell"],[1,"filter-group"],[1,"filter-op",3,"value","change"],["class","filter-input",3,"placeholder","value","input",4,"ngIf"],[1,"filter-input",3,"placeholder","value","input"],["mat-header-row",""],["mat-header-row","",1,"filter-row"],["mat-row","","matTooltip","Click to view full record details",1,"clickable-row",3,"matTooltipShowDelay","click"],[1,"grid-footer"],["matTooltip","Total records matching current server-side filters",1,"footer-info"],["matTooltip","Use the column visibility button to show/hide columns",1,"footer-info"],[1,"footer-right"],["class","page-info-footer",4,"ngIf"],[1,"page-nav-footer"],["mat-icon-button","",1,"footer-btn",3,"disabled","click"],[1,"page-info-footer"],[3,"serviceName","tableName","closeClicked","navigateToTable"],[3,"row","schema","closeClicked","navigateToTable"]],template:function(n,o){1&n&&e.DNE(0,Dt,36,22,"div",0),2&n&&e.Y8G("translocoScope","dataExplorer")},dependencies:[f.bT,f.pM,C.YN,C.xH,C.y7,m.tP,m.Zl,m.tL,m.ji,m.cC,m.YV,m.iL,m.KS,m.$R,m.YZ,m.NB,V.Ou,G.NQ,G.B4,G.aE,u.D6,u.LG,_.m_,_.An,g.Hl,g.$z,g.iY,B.s5,b.YN,b.Jl,b.Jo,w.RG,$.fS,h.uc,h.oV,fe,pe,I.Cn,I.kk,I.Cp,A.g7,A.So,_e.Ve,d.Q8,d.bA,d.Kj,v.dX,v.aY,U,Ae],styles:['[_nghost-%COMP%]{position:absolute;inset:0;display:flex;flex-direction:column;overflow:hidden}.data-grid-container[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:row;overflow:hidden}.grid-main[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;flex-direction:column;overflow:hidden}.grid-toolbar[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:0 12px;height:49px;box-sizing:border-box;border-bottom:1px solid var(--df-border);background:var(--df-surface-2);flex-shrink:0}.grid-toolbar[_ngcontent-%COMP%] .toolbar-left[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px}.grid-toolbar[_ngcontent-%COMP%] .toolbar-left[_ngcontent-%COMP%] .toolbar-icon[_ngcontent-%COMP%]{color:var(--df-accent);font-size:16px}.grid-toolbar[_ngcontent-%COMP%] .toolbar-left[_ngcontent-%COMP%] .table-title[_ngcontent-%COMP%]{font-size:1.5rem;font-weight:600;letter-spacing:-.01em;color:var(--df-text)}.grid-toolbar[_ngcontent-%COMP%] .toolbar-left[_ngcontent-%COMP%] .readonly-chip[_ngcontent-%COMP%] .lock-icon[_ngcontent-%COMP%]{font-size:11px;margin-right:4px}.grid-toolbar[_ngcontent-%COMP%] .toolbar-right[_ngcontent-%COMP%]{display:flex;align-items:center;gap:2px}.grid-toolbar[_ngcontent-%COMP%] .toolbar-right[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{color:var(--df-accent)}.grid-toolbar[_ngcontent-%COMP%] .toolbar-right[_ngcontent-%COMP%] .clear-filters-btn[_ngcontent-%COMP%]{color:var(--df-warning, var(--df-accent))}.column-menu-item[_ngcontent-%COMP%]{padding:4px 16px;font-size:13px}.top-pagination[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2px 12px;border-bottom:1px solid var(--df-border);background:var(--df-surface-2);flex-shrink:0;font-size:12px;color:var(--df-text-muted)}.top-pagination[_ngcontent-%COMP%] .top-pagination-left[_ngcontent-%COMP%] .page-info[_ngcontent-%COMP%]{white-space:nowrap}.top-pagination[_ngcontent-%COMP%] .top-pagination-right[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.top-pagination[_ngcontent-%COMP%] .top-pagination-right[_ngcontent-%COMP%] .page-size-label[_ngcontent-%COMP%]{font-size:12px;display:flex;align-items:center;gap:4px}.top-pagination[_ngcontent-%COMP%] .top-pagination-right[_ngcontent-%COMP%] .page-size-label[_ngcontent-%COMP%] .page-size-select[_ngcontent-%COMP%]{border:1px solid var(--df-border);border-radius:var(--df-radius-sm);padding:2px 4px;font-size:12px;background:var(--df-surface);color:var(--df-text);outline:none;cursor:pointer}.top-pagination[_ngcontent-%COMP%] .top-pagination-right[_ngcontent-%COMP%] .page-nav[_ngcontent-%COMP%]{display:flex;align-items:center;gap:0}.top-pagination[_ngcontent-%COMP%] .top-pagination-right[_ngcontent-%COMP%] .page-nav[_ngcontent-%COMP%] .page-label[_ngcontent-%COMP%]{font-size:12px;padding:0 6px;white-space:nowrap}.top-pagination[_ngcontent-%COMP%] .top-pagination-right[_ngcontent-%COMP%] .page-nav[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:28px;height:28px;line-height:28px}.top-pagination[_ngcontent-%COMP%] .top-pagination-right[_ngcontent-%COMP%] .page-nav[_ngcontent-%COMP%] button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px}.loading-state[_ngcontent-%COMP%], .error-state[_ngcontent-%COMP%], .empty-state[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;padding:48px 24px;color:var(--df-text-muted);font-size:14px;flex:1}.table-wrapper[_ngcontent-%COMP%]{flex:1;min-height:0;overflow:hidden;position:relative}.table-wrapper.is-loading[_ngcontent-%COMP%]:after{content:"";position:absolute;top:0;left:0;right:0;height:3px;background:linear-gradient(90deg,transparent,var(--df-accent),transparent);animation:_ngcontent-%COMP%_loading-bar 1s infinite;z-index:10}@keyframes _ngcontent-%COMP%_loading-bar{0%{transform:translate(-100%)}to{transform:translate(100%)}}.table-scroll[_ngcontent-%COMP%]{height:100%;overflow:scroll;scrollbar-width:auto;scrollbar-color:var(--df-text-faint) var(--df-surface-2)}.table-scroll[_ngcontent-%COMP%]::-webkit-scrollbar{width:14px;height:14px}.table-scroll[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:var(--df-surface-2)}.table-scroll[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:var(--df-text-faint);border-radius:7px;border:3px solid var(--df-surface)}.table-scroll[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:var(--df-text-muted)}.table-scroll[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:active{background:var(--df-text-2)}.table-scroll[_ngcontent-%COMP%]::-webkit-scrollbar-corner{background:var(--df-surface-2)}.data-table[_ngcontent-%COMP%]{width:max-content;min-width:100%}.data-table[_ngcontent-%COMP%] .header-cell[_ngcontent-%COMP%]{position:relative;flex:none;font-weight:600;font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--df-text-muted);background-color:var(--df-surface);background-image:linear-gradient(var(--df-surface-2),var(--df-surface-2));white-space:nowrap;padding:0 16px;border-right:1px solid var(--df-border);box-sizing:border-box}.data-table[_ngcontent-%COMP%] .header-cell[_ngcontent-%COMP%] .resize-handle[_ngcontent-%COMP%]{position:absolute;right:-7px;top:0;bottom:0;width:13px;cursor:col-resize;z-index:10}.data-table[_ngcontent-%COMP%] .header-cell[_ngcontent-%COMP%] .resize-handle[_ngcontent-%COMP%]:after{content:"";position:absolute;left:50%;transform:translate(-50%);top:20%;bottom:20%;width:2px;border-radius:1px;background:transparent;transition:background .15s}.data-table[_ngcontent-%COMP%] .header-cell[_ngcontent-%COMP%] .resize-handle[_ngcontent-%COMP%]:hover:after{background:var(--df-accent)}.data-table[_ngcontent-%COMP%] .header-cell[_ngcontent-%COMP%] .resize-handle[_ngcontent-%COMP%]:hover{background:var(--df-accent-soft)}.data-table[_ngcontent-%COMP%] .filter-cell[_ngcontent-%COMP%]{flex:none;padding:4px 8px;background-color:var(--df-surface);background-image:linear-gradient(var(--df-surface-2),var(--df-surface-2));border-right:1px solid var(--df-border);overflow:hidden;box-sizing:border-box}.data-table[_ngcontent-%COMP%] .filter-cell[_ngcontent-%COMP%] .filter-group[_ngcontent-%COMP%]{display:flex;gap:4px;align-items:center}.data-table[_ngcontent-%COMP%] .filter-cell[_ngcontent-%COMP%] .filter-op[_ngcontent-%COMP%]{flex-shrink:0;border:1px solid var(--df-border);border-radius:var(--df-radius-sm);padding:3px 4px;font-size:11px;background:var(--df-surface);color:var(--df-text);outline:none;cursor:pointer;max-width:90px}.data-table[_ngcontent-%COMP%] .filter-cell[_ngcontent-%COMP%] .filter-op[_ngcontent-%COMP%]:focus{border-color:var(--df-accent)}.data-table[_ngcontent-%COMP%] .filter-cell[_ngcontent-%COMP%] .filter-input[_ngcontent-%COMP%]{flex:1;min-width:0;border:1px solid var(--df-border);border-radius:var(--df-radius-sm);padding:4px 8px;font-size:12px;background:var(--df-surface);color:var(--df-text);outline:none;box-sizing:border-box}.data-table[_ngcontent-%COMP%] .filter-cell[_ngcontent-%COMP%] .filter-input[_ngcontent-%COMP%]:focus{border-color:var(--df-accent)}.data-table[_ngcontent-%COMP%] .filter-cell[_ngcontent-%COMP%] .filter-input[_ngcontent-%COMP%]::placeholder{color:var(--df-text-faint);font-style:italic}.data-table[_ngcontent-%COMP%] .data-cell[_ngcontent-%COMP%]{flex:none;font-size:1.3rem;padding:0 16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border-right:1px solid var(--df-border-2);color:var(--df-text);font-family:SFMono-Regular,Menlo,Consolas,monospace;box-sizing:border-box}.data-table[_ngcontent-%COMP%] .data-cell.null-cell[_ngcontent-%COMP%]{color:var(--df-text-faint);font-style:italic}.data-table[_ngcontent-%COMP%] tr.mat-mdc-row[_ngcontent-%COMP%]:hover{background:var(--df-hover)}.data-table[_ngcontent-%COMP%] tr.mat-mdc-row[_ngcontent-%COMP%]{height:44px}.data-table[_ngcontent-%COMP%] tr.clickable-row[_ngcontent-%COMP%]{cursor:pointer}.data-table[_ngcontent-%COMP%] tr.selected-row[_ngcontent-%COMP%]{background:var(--df-accent-soft)!important}.data-table[_ngcontent-%COMP%] tr.mat-mdc-header-row[_ngcontent-%COMP%]{height:40px}.data-table[_ngcontent-%COMP%] tr.filter-row[_ngcontent-%COMP%]{height:36px}.grid-footer[_ngcontent-%COMP%]{display:flex;align-items:center;gap:16px;padding:4px 12px;border-top:1px solid var(--df-border);background:var(--df-surface-2);flex-shrink:0;font-size:12px;color:var(--df-text-muted)}.grid-footer[_ngcontent-%COMP%] .footer-info[_ngcontent-%COMP%]{white-space:nowrap}.grid-footer[_ngcontent-%COMP%] .footer-right[_ngcontent-%COMP%]{margin-left:auto;display:flex;align-items:center;gap:8px}.grid-footer[_ngcontent-%COMP%] .footer-right[_ngcontent-%COMP%] .page-info-footer[_ngcontent-%COMP%]{white-space:nowrap}.grid-footer[_ngcontent-%COMP%] .footer-right[_ngcontent-%COMP%] .page-nav-footer[_ngcontent-%COMP%]{display:flex;align-items:center;gap:0}.grid-footer[_ngcontent-%COMP%] .footer-right[_ngcontent-%COMP%] .page-nav-footer[_ngcontent-%COMP%] .footer-btn[_ngcontent-%COMP%]{width:26px;height:26px;line-height:26px}.grid-footer[_ngcontent-%COMP%] .footer-right[_ngcontent-%COMP%] .page-nav-footer[_ngcontent-%COMP%] .footer-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px}.quick-search[_ngcontent-%COMP%]{display:flex;align-items:center;background:var(--df-surface);border:1px solid var(--df-border);border-radius:var(--df-radius-sm);padding:0 6px;height:28px;gap:4px}.quick-search[_ngcontent-%COMP%] .search-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px;color:var(--df-text-faint)}.quick-search[_ngcontent-%COMP%] .search-input[_ngcontent-%COMP%]{border:none;outline:none;background:transparent;font-size:12px;width:140px;color:var(--df-text)}.quick-search[_ngcontent-%COMP%] .search-input[_ngcontent-%COMP%]::placeholder{color:var(--df-text-faint)}.quick-search[_ngcontent-%COMP%] .search-clear[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;border:none;background:none;cursor:pointer;padding:0;color:var(--df-text-faint)}.quick-search[_ngcontent-%COMP%] .search-clear[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:14px;width:14px;height:14px}.quick-search[_ngcontent-%COMP%] .search-clear[_ngcontent-%COMP%]:hover{color:var(--df-text-2)}.api-call-bar[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:4px 12px;border-bottom:1px solid var(--df-border);background:var(--df-surface-2);flex-shrink:0;font-size:12px;overflow:hidden;gap:2px}.api-call-bar[_ngcontent-%COMP%] .api-call-desc[_ngcontent-%COMP%]{font-size:11px;color:var(--df-text-muted);line-height:1.4;padding:2px 0}.api-call-bar[_ngcontent-%COMP%] .api-call-top[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.api-call-bar[_ngcontent-%COMP%] .api-method[_ngcontent-%COMP%]{flex-shrink:0;font-weight:700;font-size:11px;color:var(--df-success);background:var(--df-success-soft);border:1px solid var(--df-success-border);padding:1px 6px;border-radius:var(--df-radius-sm);font-family:SFMono-Regular,Menlo,Consolas,monospace}.api-call-bar[_ngcontent-%COMP%] .api-url[_ngcontent-%COMP%]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:SFMono-Regular,Menlo,Consolas,monospace;font-size:12px;color:var(--df-text-2);cursor:pointer}.api-call-bar[_ngcontent-%COMP%] .api-url[_ngcontent-%COMP%]:hover{color:var(--df-accent-strong)}.api-call-bar[_ngcontent-%COMP%] .copy-btn[_ngcontent-%COMP%]{flex-shrink:0;width:24px;height:24px;line-height:24px}.api-call-bar[_ngcontent-%COMP%] .copy-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px}.api-call-bar[_ngcontent-%COMP%] .api-call-options[_ngcontent-%COMP%], .api-call-bar[_ngcontent-%COMP%] .api-call-related[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:12px;padding-left:2px}.api-call-bar[_ngcontent-%COMP%] .api-call-options[_ngcontent-%COMP%] .options-label[_ngcontent-%COMP%], .api-call-bar[_ngcontent-%COMP%] .api-call-related[_ngcontent-%COMP%] .options-label[_ngcontent-%COMP%]{font-size:11px;color:var(--df-text-faint);font-weight:500}.api-call-bar[_ngcontent-%COMP%] .api-call-options[_ngcontent-%COMP%] .api-option[_ngcontent-%COMP%], .api-call-bar[_ngcontent-%COMP%] .api-call-related[_ngcontent-%COMP%] .api-option[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;font-size:11px;color:var(--df-text-muted);font-family:SFMono-Regular,Menlo,Consolas,monospace;cursor:pointer;white-space:nowrap}.api-call-bar[_ngcontent-%COMP%] .api-call-options[_ngcontent-%COMP%] .api-option[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%], .api-call-bar[_ngcontent-%COMP%] .api-call-related[_ngcontent-%COMP%] .api-option[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{width:12px;height:12px;margin:0;cursor:pointer;accent-color:var(--df-accent)}.pk-icon[_ngcontent-%COMP%]{font-size:14px;width:14px;height:14px;color:var(--df-accent);margin-right:2px;vertical-align:middle}.fk-cell[_ngcontent-%COMP%]{cursor:pointer!important}.fk-link[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:3px;color:var(--df-accent);text-decoration:none;cursor:pointer;transition:color .15s}.fk-link[_ngcontent-%COMP%]:hover{color:var(--df-accent-strong);text-decoration:underline}.fk-link[_ngcontent-%COMP%] .fk-nav-icon[_ngcontent-%COMP%]{font-size:12px;width:12px;height:12px;opacity:0;transition:opacity .15s}.fk-link[_ngcontent-%COMP%]:hover .fk-nav-icon[_ngcontent-%COMP%]{opacity:.7}.nav-filter-bar[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:4px 12px;border-bottom:1px solid var(--df-border);background:var(--df-accent-soft);flex-shrink:0;font-size:12px;color:var(--df-text-2)}.nav-filter-bar[_ngcontent-%COMP%] .nav-filter-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px;color:var(--df-accent)}.nav-filter-bar[_ngcontent-%COMP%] .nav-filter-text[_ngcontent-%COMP%]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nav-filter-bar[_ngcontent-%COMP%] .nav-filter-text[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-family:SFMono-Regular,Menlo,Consolas,monospace;font-size:11px;background:var(--df-surface);border:1px solid var(--df-border-2);padding:1px 4px;border-radius:4px}.nav-filter-bar[_ngcontent-%COMP%] .nav-filter-clear[_ngcontent-%COMP%]{flex-shrink:0;width:24px;height:24px;line-height:24px;color:var(--df-accent)}.nav-filter-bar[_ngcontent-%COMP%] .nav-filter-clear[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px}.search-no-match[_ngcontent-%COMP%]{display:none!important}']})}}return i})();var Ft=c(19206),Tt=c(11863);function yt(i,r){if(1&i){const t=e.RV6();e.qex(0),e.j41(1,"df-db-selector",7),e.bIt("databaseSelected",function(o){e.eBV(t);const a=e.XpG(2);return e.Njj(a.onDatabaseSelected(o))})("retry",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.loadDatabases())}),e.k0s(),e.bVm()}if(2&i){const t=e.XpG(2);e.R7$(1),e.Y8G("databases",t.databases)("loading",t.loadingDbs)("error",t.errorDbs)}}function wt(i,r){if(1&i){const t=e.RV6();e.qex(0),e.j41(1,"df-schema-tree",8),e.bIt("tableSelected",function(o){e.eBV(t);const a=e.XpG(2);return e.Njj(a.onTableSelected(o))})("backClicked",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.onBackToDatabases())})("retry",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.loadSchema(o.selectedDb.name))}),e.k0s(),e.bVm()}if(2&i){const t=e.XpG(2);e.R7$(1),e.Y8G("serviceName",t.selectedDb.name)("serviceLabel",t.selectedDb.label||t.selectedDb.name)("tables",t.tables)("loading",t.loadingSchema)("error",t.errorSchema)("selectedTable",t.selectedTable)}}function Gt(i,r){if(1&i&&(e.j41(0,"p"),e.EFF(1),e.k0s()),2&i){const t=e.XpG(2).$implicit;e.R7$(1),e.JRh(t("dataExplorer.selectDatabase"))}}function Rt(i,r){if(1&i&&(e.j41(0,"p"),e.EFF(1),e.k0s()),2&i){const t=e.XpG(2).$implicit;e.R7$(1),e.JRh(t("dataExplorer.selectTable"))}}function $t(i,r){if(1&i&&(e.qex(0),e.j41(1,"div",9)(2,"mat-icon",10),e.EFF(3,"storage"),e.k0s(),e.j41(4,"h2"),e.EFF(5),e.k0s(),e.DNE(6,Gt,2,1,"p",5),e.DNE(7,Rt,2,1,"p",5),e.k0s(),e.bVm()),2&i){const t=e.XpG().$implicit,n=e.XpG();e.R7$(5),e.JRh(t("dataExplorer.title")),e.R7$(1),e.Y8G("ngIf",!n.selectedDb),e.R7$(1),e.Y8G("ngIf",n.selectedDb)}}function Et(i,r){if(1&i){const t=e.RV6();e.qex(0),e.j41(1,"df-data-grid",11),e.bIt("tableNavigated",function(o){e.eBV(t);const a=e.XpG(2);return e.Njj(a.onTableNavigated(o))}),e.k0s(),e.bVm()}if(2&i){const t=e.XpG(2);e.R7$(1),e.Y8G("serviceName",t.selectedDb.name)("tableName",t.selectedTable.name)("initialFilter",t.pendingFilter)}}function jt(i,r){if(1&i&&(e.j41(0,"div",1)(1,"mat-sidenav-container",2)(2,"mat-sidenav",3)(3,"div",4),e.DNE(4,yt,2,3,"ng-container",5),e.DNE(5,wt,2,6,"ng-container",5),e.k0s()(),e.j41(6,"mat-sidenav-content",6),e.DNE(7,$t,8,3,"ng-container",5),e.DNE(8,Et,2,3,"ng-container",5),e.k0s()()()),2&i){const t=e.XpG();e.R7$(2),e.Y8G("fixedInViewport",!1),e.R7$(2),e.Y8G("ngIf",!t.selectedDb),e.R7$(1),e.Y8G("ngIf",t.selectedDb),e.R7$(2),e.Y8G("ngIf",!t.selectedTable),e.R7$(1),e.Y8G("ngIf",t.selectedTable&&t.selectedDb)}}let It=(()=>{class i{constructor(t,n,o,a,l){this.dataExplorerService=t,this.themeService=n,this.elementRef=o,this.ngZone=a,this.route=l,this.hostHeight=null,this.databases=[],this.tables=[],this.selectedDb=null,this.selectedTable=null,this.loadingDbs=!1,this.loadingSchema=!1,this.errorDbs=null,this.errorSchema=null,this.isDarkMode$=this.themeService.darkMode$,this.destroy$=new y.B,this.resizeObserver=null,this.resizeListener=()=>this.calculateHeight()}ngOnInit(){this.loadDatabases()}ngAfterViewInit(){this.calculateHeight(),window.addEventListener("resize",this.resizeListener),this.ngZone.runOutsideAngular(()=>{this.resizeObserver=new ResizeObserver(()=>{this.ngZone.run(()=>this.calculateHeight())});const t=this.elementRef.nativeElement.parentElement;t&&this.resizeObserver.observe(t)})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),window.removeEventListener("resize",this.resizeListener),this.resizeObserver?.disconnect()}calculateHeight(){const n=this.elementRef.nativeElement.getBoundingClientRect();this.hostHeight=Math.floor(window.innerHeight-n.top)}loadDatabases(){this.loadingDbs=!0,this.errorDbs=null,this.dataExplorerService.getDatabaseServices().pipe((0,M.Q)(this.destroy$)).subscribe({next:t=>{this.databases=t,this.loadingDbs=!1;const n=this.route.snapshot.queryParamMap.get("service"),o=n?t.find(a=>a.name===n):void 0;o&&this.onDatabaseSelected(o)},error:t=>{this.errorDbs=(0,R.cQ)(t).message,this.loadingDbs=!1}})}onDatabaseSelected(t){this.selectedDb=t,this.selectedTable=null,this.tables=[],this.loadSchema(t.name)}loadSchema(t){this.loadingSchema=!0,this.errorSchema=null,this.dataExplorerService.getSchema(t).pipe((0,M.Q)(this.destroy$)).subscribe({next:n=>{this.tables=n,this.loadingSchema=!1},error:n=>{this.errorSchema=(0,R.cQ)(n).message,this.loadingSchema=!1}})}onTableSelected(t){this.pendingFilter=void 0,this.selectedTable=t}onTableNavigated(t){const n=this.tables.find(o=>o.name===t.tableName);n&&(this.pendingFilter=t.filter,this.selectedTable?.name===n.name?(this.selectedTable=null,setTimeout(()=>this.selectedTable=n)):this.selectedTable=n)}onBackToDatabases(){this.selectedDb=null,this.selectedTable=null,this.pendingFilter=void 0,this.tables=[]}static{this.\u0275fac=function(n){return new(n||i)(e.rXU(N),e.rXU(Ft.n),e.rXU(e.aKT),e.rXU(e.SKi),e.rXU(Tt.nX))}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["df-data-explorer"]],hostVars:2,hostBindings:function(n,o){2&n&&e.xc7("height",o.hostHeight,"px")},standalone:!0,features:[e.aNF],decls:1,vars:1,consts:[["class","data-explorer-container",4,"transloco","translocoScope"],[1,"data-explorer-container"],[1,"explorer-sidenav-container"],["mode","side","opened","",1,"explorer-sidenav",3,"fixedInViewport"],[1,"sidenav-content"],[4,"ngIf"],[1,"explorer-content"],[3,"databases","loading","error","databaseSelected","retry"],[3,"serviceName","serviceLabel","tables","loading","error","selectedTable","tableSelected","backClicked","retry"],[1,"empty-state"],[1,"empty-icon"],[3,"serviceName","tableName","initialFilter","tableNavigated"]],template:function(n,o){1&n&&e.DNE(0,jt,9,5,"div",0),2&n&&e.Y8G("translocoScope","dataExplorer")},dependencies:[f.bT,T.vg,T.LG,T.US,T.El,B.s5,_.m_,_.An,u.D6,d.Q8,d.bA,v.dX,Z,ce,kt],styles:["[_nghost-%COMP%]{display:block;overflow:hidden}.data-explorer-container[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column;overflow:hidden}.explorer-sidenav-container[_ngcontent-%COMP%]{height:100%!important;min-height:0!important;max-height:100%!important;overflow:hidden!important} mat-sidenav-container.explorer-sidenav-container{height:100%!important;min-height:0!important;max-height:100%!important}.explorer-sidenav[_ngcontent-%COMP%]{width:280px;border-right:1px solid var(--df-border);background:var(--df-bg)}.sidenav-content[_ngcontent-%COMP%]{height:100%;overflow-y:auto}.explorer-content[_ngcontent-%COMP%]{background:var(--df-surface)} .mat-sidenav-content, .mat-drawer-content{height:100%!important;overflow:hidden!important;position:relative!important}.empty-state[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;color:var(--df-text-muted);text-align:center;padding:24px}.empty-state[_ngcontent-%COMP%] .empty-icon[_ngcontent-%COMP%]{font-size:64px;width:64px;height:64px;color:var(--df-text-faint);margin-bottom:16px}.empty-state[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0 0 8px;font-size:1.8rem;font-weight:600;letter-spacing:-.01em;color:var(--df-text)}.empty-state[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:1.4rem}"]})}}return i})()}}]); \ No newline at end of file diff --git a/dist/index.html b/dist/index.html index 17fb9716..b18d9bcf 100644 --- a/dist/index.html +++ b/dist/index.html @@ -10,5 +10,5 @@ - + diff --git a/dist/runtime.04c7bbe7528aa297.js b/dist/runtime.04c7bbe7528aa297.js new file mode 100644 index 00000000..37036365 --- /dev/null +++ b/dist/runtime.04c7bbe7528aa297.js @@ -0,0 +1 @@ +(()=>{"use strict";var e,_={},v={};function f(e){var d=v[e];if(void 0!==d)return d.exports;var a=v[e]={id:e,loaded:!1,exports:{}};return _[e].call(a.exports,a,a.exports,f),a.loaded=!0,a.exports}f.m=_,f.amdD=function(){throw new Error("define cannot be used indirect")},e=[],f.O=(d,a,r,n)=>{if(!a){var t=1/0;for(c=0;c=n)&&Object.keys(f.O).every(p=>f.O[p](a[b]))?a.splice(b--,1):(s=!1,n0&&e[c-1][2]>n;c--)e[c]=e[c-1];e[c]=[a,r,n]},f.n=e=>{var d=e&&e.__esModule?()=>e.default:()=>e;return f.d(d,{a:d}),d},(()=>{var d,e=Object.getPrototypeOf?a=>Object.getPrototypeOf(a):a=>a.__proto__;f.t=function(a,r){if(1&r&&(a=this(a)),8&r||"object"==typeof a&&a&&(4&r&&a.__esModule||16&r&&"function"==typeof a.then))return a;var n=Object.create(null);f.r(n);var c={};d=d||[null,e({}),e([]),e(e)];for(var t=2&r&&a;"object"==typeof t&&!~d.indexOf(t);t=e(t))Object.getOwnPropertyNames(t).forEach(s=>c[s]=()=>a[s]);return c.default=()=>a,f.d(n,c),n}})(),f.d=(e,d)=>{for(var a in d)f.o(d,a)&&!f.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:d[a]})},f.f={},f.e=e=>Promise.all(Object.keys(f.f).reduce((d,a)=>(f.f[a](e,d),d),[])),f.u=e=>(2076===e?"common":e)+"."+{214:"676648eec53f0ec7",399:"841dcb3c92cfff2e",485:"912e3e802f37c120",583:"e8891b7cc791de6f",669:"98f064f5a937aec8",796:"6988d10857687016",870:"bd2cd719f9ad1540",986:"15ef69176e0c7448",1068:"275a15c7ea3f54f5",1524:"0427308cbd09bc81",1643:"4893b3dc0dbd730c",1900:"a12604cdc6136544",2066:"01138641db2ae347",2076:"8add9df0f3c751ac",2262:"e1b1581ef5ffc005",2317:"87abf625347bbc67",2430:"f7d33b75ef0f9d4a",2564:"fd5c45e1a46b96b1",2661:"4723cda3623aa906",2967:"e5f225277a409e25",3101:"5b940d454995f053",3138:"04acce1458a7ef9a",3307:"e67abeb3c237b9b4",3392:"dfa5337deb7a37f5",3451:"68ce099758dfcefb",3492:"4563bbd0ec2cdd6f",3533:"91066031d8fe1453",3645:"8c6548ca9b1a641d",3649:"69c49f317f65f68e",3678:"b856ac5ef4971ffe",3685:"88541102f64bdb90",3695:"0215f99bd71a088d",3751:"23b0e86a0a4e6e9d",3756:"9f335ae0f5636fe2",3828:"d30a9d66224578e5",3956:"50bb85ac336f0f5e",4207:"6549a98040f7b707",4255:"ac57882452d90abb",4461:"3d5cd6d4513d76db",4588:"19f974787da3fe15",4673:"fb747af965cc59a0",4705:"2f5fb87d0c1e3592",5036:"a356a975647e3bb5",5201:"8f0dbf2bc1a2e854",5372:"3feb13c0050a8360",5453:"5e29b39d5d102b3b",5469:"98bf5af86094c49f",5624:"605e50332c22f7df",5629:"5e427cca66ca2ba1",5969:"b64292feb5bcfb3a",6214:"981118ca14b0d356",6242:"11c5b631cf93c664",6377:"a34e85c7dc59559c",6557:"e1e2097c6cf8f99e",6968:"c6af7114ccc40b36",6984:"2ab977c129d686c9",7058:"f66bee5fee6bbbcf",7067:"0bf0fc7ac44a8276",7129:"7c39d873d3b8d92e",7251:"ef64ccb7ad3ebfff",7252:"5c5b25226b515af8",7263:"b2c1b33aa6efae16",7303:"3621328ea8c0d850",7418:"4d59c7947daff731",7741:"b1494e07e5316066",7888:"47d1ba4b95b4aa71",8001:"df27a0963b4a3e68",8221:"7d29ff8933c706c8",8272:"a7ef6eaf1af75d7e",8328:"58d36ccb3a10d953",8337:"96252439a08a6a13",8497:"05b3e2db41552bec",8747:"4aa72a816a9e2b1a",8781:"08c7eef2edf7ad5e",8816:"7d97eea967c9810d",8859:"3b307639b11cdb16",9106:"7c66719d514008a6",9167:"9edee1862e426be4",9675:"5bc46c37954a8ea1",9841:"9c713cb73db35467"}[e]+".js",f.miniCssF=e=>{},f.o=(e,d)=>Object.prototype.hasOwnProperty.call(e,d),(()=>{var e={},d="df-admin-interface:";f.l=(a,r,n,c)=>{if(e[a])e[a].push(r);else{var t,s;if(void 0!==n)for(var b=document.getElementsByTagName("script"),o=0;o{t.onerror=t.onload=null,clearTimeout(l);var m=e[a];if(delete e[a],t.parentNode&&t.parentNode.removeChild(t),m&&m.forEach(h=>h(p)),g)return g(p)},l=setTimeout(u.bind(null,void 0,{type:"timeout",target:t}),12e4);t.onerror=u.bind(null,t.onerror),t.onload=u.bind(null,t.onload),s&&document.head.appendChild(t)}}})(),f.r=e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;f.tt=()=>(void 0===e&&(e={createScriptURL:d=>d},typeof trustedTypes<"u"&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("angular#bundler",e))),e)})(),f.tu=e=>f.tt().createScriptURL(e),f.p="",(()=>{var e={9121:0};f.f.j=(r,n)=>{var c=f.o(e,r)?e[r]:void 0;if(0!==c)if(c)n.push(c[2]);else if(9121!=r){var t=new Promise((i,u)=>c=e[r]=[i,u]);n.push(c[2]=t);var s=f.p+f.u(r),b=new Error;f.l(s,i=>{if(f.o(e,r)&&(0!==(c=e[r])&&(e[r]=void 0),c)){var u=i&&("load"===i.type?"missing":i.type),l=i&&i.target&&i.target.src;b.message="Loading chunk "+r+" failed.\n("+u+": "+l+")",b.name="ChunkLoadError",b.type=u,b.request=l,c[1](b)}},"chunk-"+r,r)}else e[r]=0},f.O.j=r=>0===e[r];var d=(r,n)=>{var b,o,[c,t,s]=n,i=0;if(c.some(l=>0!==e[l])){for(b in t)f.o(t,b)&&(f.m[b]=t[b]);if(s)var u=s(f)}for(r&&r(n);i { this.databases = dbs; this.loadingDbs = false; + // ?service= opens straight on that database: the post-create + // handoff from the API wizard lands here with the new API selected. + const requested = this.route.snapshot.queryParamMap.get('service'); + const match = requested + ? dbs.find(db => db.name === requested) + : undefined; + if (match) { + this.onDatabaseSelected(match); + } }, error: err => { this.errorDbs = normalizeError(err).message; diff --git a/src/app/adf-services/df-service-details/df-service-details.component.ts b/src/app/adf-services/df-service-details/df-service-details.component.ts index 2bdb19f5..021f1728 100644 --- a/src/app/adf-services/df-service-details/df-service-details.component.ts +++ b/src/app/adf-services/df-service-details/df-service-details.component.ts @@ -2202,19 +2202,13 @@ export class DfServiceDetailsComponent implements OnInit { relativeTo: this.activatedRoute, }); } else if (this.isDatabase) { - // Meridian Phase 1 proof-of-life: a new database API lands on its - // Overview (the Live API Card with a runnable curl), not the - // api-docs scavenger hunt. `../{id}` is the sibling :id route. - const newId = response?.resource?.[0]?.id; - if (newId != null) { - this.router.navigate(['../', newId], { - relativeTo: this.activatedRoute, - }); - } else { - this.router.navigate([ - `/api-connections/api-docs/${formattedName}`, - ]); - } + // A new database API lands on Data Explorer with that API + // selected: live rows from the connection just entered, not + // the config form it was created from (2026-07 landed on the + // service Overview; before that, API Docs). + this.router.navigate(['/api-connections/data-explorer'], { + queryParams: { service: data.name }, + }); } else if (this.isMcp) { // A new MCP server lands on its own editor's Connect tab with // the endpoint URL and first-run checklist — never API Docs, diff --git a/src/app/shared/components/df-security-config/df-security-config.component.ts b/src/app/shared/components/df-security-config/df-security-config.component.ts index 02a7cf67..2b531b98 100644 --- a/src/app/shared/components/df-security-config/df-security-config.component.ts +++ b/src/app/shared/components/df-security-config/df-security-config.component.ts @@ -454,8 +454,15 @@ export class DfSecurityConfigComponent implements OnInit { }); // Dialog will handle navigation to API docs when closed + } else if (this.isDatabase) { + // A secured database API lands on Data Explorer with that API + // selected: the rows it just exposed, not its documentation. + this.router.navigate(['/api-connections/data-explorer'], { + queryParams: { service: result.formattedName }, + replaceUrl: true, + }); } else { - // Navigate to API docs directly for experienced users + // Other service types keep landing on API docs this.router .navigateByUrl( `/api-connections/api-docs/${result.formattedName}`,