Viewing File: /usr/local/cpanel/base/frontend/jupiter/team-manager/main.b3a4f0a23372a643.js

"use strict";(self.webpackChunkteam_manager=self.webpackChunkteam_manager||[]).push([[792],{5835:(y,L,p)=>{var I=p(345),e=p(3953),he=p(1562),l=p(9417),fe=p(728),X=p(3658),be=p(8658),r=p(9490),Ce=p(1960),R=p(7013),F=p(4304),A=p(9375),f=p(8580),b=p(7901),g=p(6381),O=p(6697),T=p(980),v=p(4980),_=p(6802),C=p(6354);const z=new e.nKC("userName"),ve=new e.nKC("base"),H=new e.nKC("emailApp"),q=new e.nKC("ftpApp"),Q=new e.nKC("webDiskApp"),J=new e.nKC("userManagerApp"),W=new e.nKC("deprefix"),K=new e.nKC("maxTeamUsers"),E=new e.nKC("teamOwnerDomain"),Z=new e.nKC("maxEmailQuota"),ee=new e.nKC("defaultEmailQuota"),te=new e.nKC("isEmailServiceAvailable"),D=new e.nKC("ftpDaemonInfo"),ne=new e.nKC("isWebdiskServiceAvailable");var x=p(6153),ie=p(8391);let G=(()=>{class i{constructor(t){this.locale=t,this.pagination={pageSize:20,selectedPage:1,disabled:!1,totalRecords:0,recordsBeforeFilter:0},this.sorts=[],this.pageSizes=[20,50,100],this._loading=!1}get loading(){return this._loading}set loading(t){this._loading=t}changeSort(t){const o=this.sorts?.find(n=>n.column===t);o&&(o.direction=this.changeSortDirection(o.direction)),this.setSort(t,o?.direction||x.UE.Ascending)}setSort(t,o){this.sorts=[new x.FU(t,o)]}getTableMetadata(){return{pager:{page:this.pagination.selectedPage,pageSize:this.pagination.pageSize},filters:this.filters,sorts:this.sorts}}updateSearchFilter(t,o){this.filters=[new ie.d(t,ie.t.Contains,o)],this.pagination.selectedPage=1}getSortColumn(){return this.sorts[0]?.column}sortedInAscendingOrder(){return this.sorts[0]?.direction===x.UE.Ascending}updatePageSize(t){this.pagination.pageSize=t}changePage(t){this.pagination.selectedPage=t}noResultsReason(t){return t?null:this.locale.maketext(this.pagination.recordsBeforeFilter?"No results available.":"No results match your query.")}changeSortDirection(t){return t===x.UE.Ascending?x.UE.Descending:x.UE.Ascending}static#e=this.\u0275fac=function(o){return new(o||i)(e.KVO(g.h))};static#t=this.\u0275prov=e.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),B=(()=>{class i{convertToUTC(t){const o=new Date(t);return o.setHours(23,59,59,0),o.getTime()/1e3}static#e=this.\u0275fac=function(o){return new(o||i)};static#t=this.\u0275prov=e.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();const M="Team";let P=(()=>{class i{constructor(t,o,n,a){this.http=t,this.currentUser=o,this.tableService=n,this.dateService=a}getTeam(t){const o=new v.V({namespace:M,method:"list_team_ui",arguments:[new _.e("username",this.currentUser)],...t});return this.http.get(o).pipe((0,C.T)(n=>{if(1===n.status)return n;throw n.errors.pop()}))}createUser(t){const o=new v.V({namespace:M,method:"add_team_user",arguments:[new _.e("user",t.username),new _.e("email1",t.contactEmail),new _.e("notes",t.notes),this.getArgumentBasedOnPasswordOption(t.passwordOptions,t.password),new _.e("roles",t.roles),...this.getExpireArguments(t.expireDate,t.expireReason),...this.getServicesArguments(t)]});return this.http.get(o).pipe((0,C.T)(n=>{if(1===n.status)return n;{const a=n.errors.pop();throw n.data&&(a.data=n.data),a}}))}editUser(t){let o=[];o=t.roles.length?[...t.roles.map((a,c)=>new _.e(`set_role-${c+1}`,a))]:[new _.e("set_role-1","")];const n=new v.V({namespace:M,method:"edit_team_user",arguments:[new _.e("user",t.username),new _.e("email1",t.contactEmail),new _.e("notes",t.notes),new _.e("password",t.password),...o,...this.getExpireArguments(t.expireDate,t.expireReason),...this.getServicesArguments(t)]});return this.http.get(n).pipe((0,C.T)(a=>{if(1===a.status)return a;{const c=a.errors.pop();throw a.data&&(c.data=a.data),c}}))}deleteUser(t){const o=new v.V({namespace:M,method:"remove_team_user",arguments:[new _.e("user",t)]});return this.http.get(o).pipe((0,C.T)(n=>{if(1===n.status)return n;throw n.errors.pop()}))}getTeamUsersCount(){const t=new v.V({namespace:M,method:"get_team_users_with_roles_count",arguments:[new _.e("username",this.currentUser)]});return this.http.get(t).pipe((0,C.T)(o=>{if(1===o.status)return o;throw o.errors.pop()}))}getAuditLog(t,o=this.currentUser){const n=new v.V({namespace:"AuditLog",method:"get_api_log",arguments:[new _.e("user",o)],...t});return this.http.get(n).pipe((0,C.T)(a=>{if(this.tableService.pagination.totalRecords=a.meta.totalRecords,this.tableService.pagination.recordsBeforeFilter=a.meta.recordsBeforeFilter,1===a.status)return a;throw a.errors.pop()}))}suspendUser(t){const o=new v.V({namespace:M,method:"suspend_team_user",arguments:[new _.e("user",t),new _.e("reason","")]});return this.http.get(o).pipe((0,C.T)(n=>{if(1===n.status)return n;throw n.errors.pop()}))}reinstateUser(t){const o=new v.V({namespace:M,method:"reinstate_team_user",arguments:[new _.e("user",t)]});return this.http.get(o).pipe((0,C.T)(n=>{if(1===n.status)return n;throw n.errors.pop()}))}listRoles(t=this.currentUser){const o=new v.V({namespace:"TeamRoles",method:"list_feature_descriptions",arguments:[new _.e("username",t)]});return this.http.get(o).pipe((0,C.T)(n=>{if(1===n.status)return n;throw n.errors.pop()}))}cancelExpire(t){const o=new v.V({namespace:M,method:"cancel_expire",arguments:[new _.e("user",t)]});return this.http.get(o).pipe((0,C.T)(n=>{if(1===n.status)return n;throw n.errors.pop()}))}passwordReset(t){const o=new v.V({namespace:M,method:"password_reset_request",arguments:[new _.e("user",t)]});return this.http.get(o).pipe((0,C.T)(n=>{if(1===n.status)return n;throw n.errors.pop()}))}getArgumentBasedOnPasswordOption(t,o){return new _.e("set"===t?"password":"activation_email","set"!==t||o)}getExpireArguments(t,o){return t?[new _.e("expire_date",this.dateService.convertToUTC(t)),new _.e("expire_reason",o)]:[]}getServicesArguments(t){const o=!!t.email?.hasOwnProperty("options"),n=!!t.webdisk?.hasOwnProperty("options"),a=!!t.ftp?.hasOwnProperty("options");return[new _.l("services.email.enabled",o),o&&new _.e("services.email.quota",t.email?.quota||""),new _.l("services.ftp.enabled",a),a&&new _.e("services.ftp.homedir",t.ftp?.homedir||""),a&&new _.e("services.ftp.quota",t.ftp?.quota||""),new _.l("services.webdisk.enabled",n),n&&new _.e("services.webdisk.perms","readwrite"===t.webdisk?.options?"rw":"ro"),n&&new _.e("services.webdisk.homedir",t.webdisk?.homedir||""),n&&new _.l("services.webdisk.enabledigest",t.webdisk?.enableDigest),n&&new _.l("services.webdisk.private",!1)].filter(Boolean)}static#e=this.\u0275fac=function(o){return new(o||i)(e.KVO(X.dF),e.KVO(z),e.KVO(G),e.KVO(B))};static#t=this.\u0275prov=e.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var m=p(177);function ke(i,s){if(1&i){const t=e.RV6();e.j41(0,"ul",5)(1,"li",6)(2,"div")(3,"cp-page-size-selector",7),e.bIt("optionSelected",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.pageSizeChanged.emit(n))}),e.k0s()()(),e.nrm(4,"li",8),e.j41(5,"li",6)(6,"a",9),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.refreshClicked.emit())}),e.nrm(7,"i",10),e.EFF(8),e.k0s()()()}if(2&i){const t=e.XpG();e.R7$(3),e.Y8G("pageSizeOptions",t.pageSizes)("selectedPageSize",null==t.tableService?null:t.tableService.pagination.pageSize),e.R7$(5),e.SpI(" ",t.locale.maketext("Refresh")," ")}}let Me=(()=>{class i{constructor(t,o){this.tableService=t,this.locale=o,this.pageSizes=[20,50,100,500],this.pageSizeChanged=new e.bkB,this.refreshClicked=new e.bkB}static#e=this.\u0275fac=function(o){return new(o||i)(e.rXU(G),e.rXU(g.h))};static#t=this.\u0275cmp=e.VBU({type:i,selectors:[["cp-team-manager-page-size-selector-dropdown"]],inputs:{pageSizes:"pageSizes"},outputs:{pageSizeChanged:"pageSizeChanged",refreshClicked:"refreshClicked"},decls:5,vars:1,consts:[["dropdown","","auto-close","outsideClick",1,"btn-group"],["id","table-settings-dropdown","type","button","dropdownToggle","",1,"btn","btn-default","btn-sm","dropdown-toggle","button-bar"],[1,"fas","fa-cog"],[1,"caret"],["id","table-settings-menu","class","dropdown-menu dropdown-menu-right","role","menu","aria-labelledby","table-settings-dropdown",4,"dropdownMenu"],["id","table-settings-menu","role","menu","aria-labelledby","table-settings-dropdown",1,"dropdown-menu","dropdown-menu-right"],["role","menuitem"],["id","page-size-selector",3,"optionSelected","pageSizeOptions","selectedPageSize"],[1,"divider"],["id","page-size-selector__refresh",3,"click"],[1,"fas","fa-sync-alt"]],template:function(o,n){1&o&&(e.j41(0,"div",0)(1,"button",1),e.nrm(2,"i",2)(3,"span",3),e.k0s(),e.DNE(4,ke,9,3,"ul",4),e.k0s()),2&o&&(e.R7$(),e.BMQ("aria-label",n.locale.maketext("Table Settings")))},dependencies:[f.hs,f.UL,f.Kk,r.br],encapsulation:2})}return i})();const Pe=i=>({width:i});function we(i,s){if(1&i){const t=e.RV6();e.j41(0,"cp-pagination",16),e.bIt("pageChanged",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.changePage(n))}),e.k0s()}if(2&i){const t=e.XpG();e.Y8G("totalItems",t.tableService.pagination.totalRecords)("pageSize",t.tableService.pagination.pageSize)("maxPagesVisible",5)("disabled",t.isFetchingAuditLog)}}function Te(i,s){if(1&i&&e.nrm(0,"i",23),2&i){const t=e.XpG(2).$implicit,o=e.XpG();e.AVh("icon-arrow-up",o.tableService.sortedInAscendingOrder())("icon-arrow-down",!o.tableService.sortedInAscendingOrder()),e.BMQ("title",t.label)}}function Se(i,s){if(1&i){const t=e.RV6();e.j41(0,"button",20),e.bIt("click",function(){e.eBV(t);const n=e.XpG().$implicit,a=e.XpG();return e.Njj(a.sort(n.key))}),e.j41(1,"span",21),e.EFF(2),e.k0s(),e.DNE(3,Te,1,5,"i",22),e.k0s()}if(2&i){const t=e.XpG(),o=t.$implicit,n=t.index,a=e.XpG();e.FCK("id","column-button__",n,"-",o.key,""),e.R7$(2),e.JRh(o.label),e.R7$(),e.Y8G("ngIf",o.key===a.tableService.getSortColumn())}}function xe(i,s){if(1&i&&(e.j41(0,"span",21),e.EFF(1),e.k0s()),2&i){const t=e.XpG().$implicit;e.R7$(),e.JRh(t.label)}}function ye(i,s){if(1&i&&(e.j41(0,"th",17),e.DNE(1,Se,4,5,"button",18)(2,xe,2,1,"span",19),e.k0s()),2&i){const t=s.$implicit,o=e.XpG();e.Y8G("ngStyle",e.eq3(4,Pe,100/o.columns.length+"%"))("ngClass",t.classes),e.R7$(),e.Y8G("ngIf",t.sortable),e.R7$(),e.Y8G("ngIf",!t.sortable)}}function Re(i,s){if(1&i&&(e.j41(0,"tr",24)(1,"td"),e.nrm(2,"span",25),e.EFF(3," \xa0 "),e.j41(4,"span",26),e.EFF(5),e.k0s()()()),2&i){const t=e.XpG();e.R7$(),e.BMQ("colspan",t.emptyRowColSpan),e.R7$(4),e.JRh(t.locale.maketext("Loading \u2026"))}}function Fe(i,s){if(1&i&&(e.j41(0,"tr",27)(1,"td"),e.EFF(2),e.k0s()()),2&i){const t=e.XpG();e.R7$(),e.BMQ("colspan",t.emptyRowColSpan),e.R7$(),e.JRh(t.noResultsMessage)}}function Ee(i,s){if(1&i&&(e.j41(0,"td",30),e.EFF(1),e.k0s()),2&i){const t=s.$implicit,o=e.XpG(2),n=o.$implicit,a=o.index;e.Y8G("ngClass",t.classes),e.BMQ("data-test","audit-log-data__"+t.key+"-"+a),e.R7$(),e.SpI(" ",n[t.key]||"-"," ")}}function Ge(i,s){if(1&i&&(e.j41(0,"tr"),e.DNE(1,Ee,2,3,"td",29),e.k0s()),2&i){const t=e.XpG().index,o=e.XpG();e.BMQ("data-test","audit-log-row__"+t),e.R7$(),e.Y8G("ngForOf",o.columns)("ngForTrackBy",o.trackByFn)}}function Ue(i,s){if(1&i&&(e.qex(0),e.DNE(1,Ge,2,3,"tr",28),e.bVm()),2&i){const t=s.$implicit,o=e.XpG();e.R7$(),e.Y8G("ngIf",o.columnKeyExists(t))}}let $e=(()=>{class i{constructor(t,o,n,a){this.teamManagerApiService=t,this.locale=o,this.tableService=n,this.alertService=a,this.isFetchingAuditLog=!0,this.columns=this.getListTeamTableHeaders()}ngOnInit(){this.fetchAuditLog(),this.emptyRowColSpan=this.columns.length+1}trackByFn(t){return t}searchAuditLog(t){this.tableService.updateSearchFilter("called_by",t),this.fetchAuditLog()}columnKeyExists(t){return this.columns.some(o=>Object.keys(t).includes(o.key))}fetchAuditLog(){this.rows=[],this.tableService.loading=!0,this.teamManagerApiService.getAuditLog(this.tableService.getTableMetadata()).pipe((0,O.s)(1),(0,T.j)(()=>{this.isFetchingAuditLog=!1,this.tableService.loading=!1,this.noResultsMessage=this.tableService.noResultsReason(this.rows.length)})).subscribe(t=>{this.rows=t.data},t=>{this.alertService.error(t.message)})}getListTeamTableHeaders(){return[{key:"date_timestamp",label:this.locale.maketext("Timestamp"),sortable:!0},{key:"called_by",label:this.locale.maketext("Called By"),sortable:!0},{key:"api_version",label:this.locale.maketext("API Version"),sortable:!0,classes:"hidden-xs hidden-sm hidden-md"},{key:"call",label:this.locale.maketext("Call"),sortable:!0},{key:"origin",label:this.locale.maketext("Origin"),sortable:!0,classes:"hidden-xs hidden-sm hidden-md"}]}sort(t){this.tableService.changeSort(t),this.fetchAuditLog()}pageSizeChanged(t){this.tableService.updatePageSize(t),this.fetchAuditLog()}changePage(t){t.page!==this.tableService.pagination.selectedPage&&(this.tableService.changePage(t.page),this.fetchAuditLog())}static#e=this.\u0275fac=function(o){return new(o||i)(e.rXU(P),e.rXU(g.h),e.rXU(G),e.rXU(r.uE))};static#t=this.\u0275cmp=e.VBU({type:i,selectors:[["cp-team-manager-audit-log"]],decls:19,vars:12,consts:[["searchAccountsInput",""],[1,"row","audit-log__description"],[1,"col-sm-8","col-md-9",3,"innerHTML"],[1,"section"],[1,"row","search-page-container"],[1,"col-xs-12","col-md-6","pull-left","text-left"],["id","searchAccountsInput",3,"valueChange","label"],[1,"col-xs-12","col-md-6","pull-right","text-right"],["id","audit-log--pagination","name","auditLogPagination",3,"totalItems","pageSize","maxPagesVisible","disabled","pageChanged",4,"ngIf"],[1,"pull-right","flip","create-page-size-selector-wrapper"],["id","page-size-selector-dropdown",3,"pageSizeChanged","refreshClicked"],[1,"ui","table"],[3,"ngStyle","ngClass",4,"ngFor","ngForOf"],["class","info empty-row","id","loadingRow",4,"ngIf"],["class","info empty-row","id","emptySearchRow",4,"ngIf"],[4,"ngFor","ngForOf","ngForTrackBy"],["id","audit-log--pagination","name","auditLogPagination",3,"pageChanged","totalItems","pageSize","maxPagesVisible","disabled"],[3,"ngStyle","ngClass"],["class","column-button btn btn-link p-0",3,"id","click",4,"ngIf"],["class","column-label separator",4,"ngIf"],[1,"column-button","btn","btn-link","p-0",3,"click","id"],[1,"column-label","separator"],["ngClass","column-icon",3,"icon-arrow-up","icon-arrow-down",4,"ngIf"],["ngClass","column-icon"],["id","loadingRow",1,"info","empty-row"],[1,"fas","fa-spinner","fa-spin"],[1,"loading-text"],["id","emptySearchRow",1,"info","empty-row"],[4,"ngIf"],["class","td",3,"ngClass",4,"ngFor","ngForOf","ngForTrackBy"],[1,"td",3,"ngClass"]],template:function(o,n){if(1&o){const a=e.RV6();e.j41(0,"div",1),e.nrm(1,"p",2),e.k0s(),e.j41(2,"div",3)(3,"div",4)(4,"div",5)(5,"cp-search",6,0),e.bIt("valueChange",function(u){return e.eBV(a),e.Njj(n.searchAuditLog(u))}),e.k0s()(),e.j41(7,"div",7),e.DNE(8,we,1,4,"cp-pagination",8),e.k0s()()(),e.j41(9,"div",9)(10,"cp-team-manager-page-size-selector-dropdown",10),e.bIt("pageSizeChanged",function(u){return e.eBV(a),e.Njj(n.pageSizeChanged(u))})("refreshClicked",function(){return e.eBV(a),e.Njj(n.fetchAuditLog())}),e.k0s()(),e.j41(11,"table",11)(12,"thead")(13,"tr"),e.DNE(14,ye,3,6,"th",12),e.k0s()(),e.j41(15,"tbody"),e.DNE(16,Re,6,2,"tr",13)(17,Fe,3,2,"tr",14)(18,Ue,2,1,"ng-container",15),e.k0s()()}2&o&&(e.R7$(),e.Y8G("innerHTML",n.locale.maketext("View the Audit Log of your team."),e.npT),e.R7$(4),e.FS9("label",n.locale.maketext("Search for an account by username or domain.")),e.R7$(3),e.Y8G("ngIf",0!==n.tableService.pagination.totalRecords),e.R7$(3),e.AVh("table-striped",!0)("unstackable",!0),e.R7$(3),e.Y8G("ngForOf",n.columns),e.R7$(2),e.Y8G("ngIf",n.tableService.loading),e.R7$(),e.Y8G("ngIf",n.noResultsMessage),e.R7$(),e.Y8G("ngForOf",n.rows)("ngForTrackBy",n.trackByFn))},dependencies:[m.YU,m.Sq,m.bT,m.B3,r.Sy,r.eK,Me],styles:[".table[_ngcontent-%COMP%]{border-collapse:separate}.column-button[_ngcontent-%COMP%]{display:flex;align-items:center;text-decoration:none;padding:0}.column-button[_ngcontent-%COMP%]:hover > span[_ngcontent-%COMP%]{text-decoration:underline}.column-button[_ngcontent-%COMP%]:focus{outline:none}.column-label[_ngcontent-%COMP%]{display:inline-block}html[dir=ltr][_ngcontent-%COMP%]   .column-label[_ngcontent-%COMP%], [dir=ltr][_ngcontent-%COMP%]   .column-label[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%]   .column-label[_ngcontent-%COMP%], html[dir=ltr][_nghost-%COMP%]   .column-label[_ngcontent-%COMP%], html[dir=ltr]   [_nghost-%COMP%]   .column-label[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%]   .column-label[_ngcontent-%COMP%], [dir=ltr]   [_nghost-%COMP%]   .column-label[_ngcontent-%COMP%]{margin-right:var(--cp-spacer-2)}html[dir=rtl][_ngcontent-%COMP%]   .column-label[_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%]   .column-label[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%]   .column-label[_ngcontent-%COMP%], html[dir=rtl][_nghost-%COMP%]   .column-label[_ngcontent-%COMP%], html[dir=rtl]   [_nghost-%COMP%]   .column-label[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%]   .column-label[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .column-label[_ngcontent-%COMP%]{margin-left:var(--cp-spacer-2)}thead[_ngcontent-%COMP%]{position:sticky;top:0;background:var(--cp-component-bg, #fff)}thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]{padding:0 var(--cp-spacer-2);background:var(--cp-component-bg, #fff);background-clip:content-box}.create-page-size-selector-wrapper[_ngcontent-%COMP%]{margin-bottom:var(--cp-spacer-3)}.search-page-container[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:nth-child(1){margin-top:20px}"]})}return i})();var h=p(7410);let S=(()=>{class i{constructor(t,o,n){this.locale=t,this.dateService=o,this.teamOwnerDomain=n}processRoles(t){return t.sort((o,n)=>o.title.localeCompare(n.title)),t.forEach(o=>o.features.sort((n,a)=>n.localeCompare(a))),t.filter(o=>"default"!==o.id)}mapTeamUserData(t){for(const c in t)t[c]&&(t["api__"+c]=t[c],delete t[c]);const o=this.mapBasicInfo(t),n=this.mapDetailsInfo(o),a=this.getBadgeText(n.suspended,n.expired);return{...o,...n,badgeText:a}}mapErrorIfDateExists(t){if(t.data){const o=this.getLocaleDateTime(t.data);return`${t.message} \u201c${o}\u201d`}return t.message}getTeamUserApiServices(t){return JSON.parse(localStorage.getItem("teamData")).find(c=>c.username===t).apiServices}getExpireSuccessMessage(t,o,n=!1){let a="";if(o){const c=this.dateService.convertToUTC(o);a=this.locale.maketext("\u201c[_1]\u201d account is set to expire on [local_datetime,_2,datetime_format_short][comment,this is needed to convert the date to a localized format].",t,Number(c)),n&&(a+=" ",a+=this.locale.maketext("The team user will be notified via email on expiry."))}return a}mapBasicInfo(t){return{contactEmail:t.api__contact_email,created:this.getLocaleDateTime(t.api__created),lastLoginDate:this.getLocaleDateTime(t.api__lastlogin),notes:t.api__notes,roles:t.api__roles?.join(", "),services:this.formatServices(t.api__services),apiServices:t.api__services,suspendDate:this.getLocaleDateTime(t.api__suspend_date),suspendReason:t.api__suspend_reason,expireDate:this.getLocaleDateTime(t.api__expire_date),expireDateDisplay:this.getLocaleDate(t.api__expire_date),expireReason:t.api__expire_reason,username:t.api__username}}mapDetailsInfo(t){return{contactEmailDetails:`${this.locale.maketext("Contact Email")}: ${t.contactEmail}`,createdDetails:`${this.locale.maketext("Account Created")}: ${t.created}`,lastLoginDateDetails:`${this.locale.maketext("Last Login Date")}: ${t.lastLoginDate||"-"}`,notesDetails:`${this.locale.maketext("Notes")}: ${t.notes||"-"}`,rolesDetails:`${this.locale.maketext("Roles")}: ${t.roles||"-"}`,servicesDetails:`${this.locale.maketext("Services")}: ${t.services||"-"}`,suspendDateDetails:`${this.locale.maketext("Suspended Since")}: ${t.suspendDate}`,suspendReasonDetails:`${this.locale.maketext("Suspended Reason")}: ${t.suspendReason||"-"}`,expireDateDetails:`${this.locale.maketext("Expire Date")}: ${t.expireDateDisplay}`,expireReasonDetails:`${this.locale.maketext("Expire Reason")}: ${t.expireReason||"-"}`,loginDetails:`${this.locale.maketext("Login Username")}: ${t.username}@${this.teamOwnerDomain}`,suspended:!!t.suspendDate,expired:!!t.expireDate&&new Date(t.expireDate)<new Date}}getBadgeText(t,o){return t?this.locale.maketext("Suspended"):o&&!t?this.locale.maketext("Expired"):""}getLocaleDateTime(t){return t?this.locale.maketext("[local_datetime,_1,datetime_format_short][comment,this is needed to convert the date to a localized format]",Number(t)):null}getLocaleDate(t){return t?this.locale.maketext("[local_datetime,_1,date_format_short][comment,this is needed to convert the date to a localized format]",Number(t)):null}formatServices(t){const o={email:this.locale.maketext("Email"),ftp:this.locale.maketext("FTP"),webdisk:this.locale.maketext("Web Disk")},n=[];for(const a in t)t[a].enabled&&n.push(o[a]);return n.sort().join(", ")}static#e=this.\u0275fac=function(o){return new(o||i)(e.KVO(g.h),e.KVO(B),e.KVO(E))};static#t=this.\u0275prov=e.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var d=function(i){return i.create="create",i.list="list",i.auditLog="auditlog",i.edit="edit",i}(d||{}),V=p(1413);let U=(()=>{class i{constructor(){this.showAllHelp=!1}toggleShowAll(){this.showAllHelp=!this.showAllHelp}static#e=this.\u0275fac=function(o){return new(o||i)};static#t=this.\u0275prov=e.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),oe=(()=>{class i{constructor(t,o,n,a){this.locale=t,this.renderer=o,this.showInfoBlocksService=n,this.teamOwnerDomain=a,this.showRoleFeatures=!1,this.formSubmit=new V.B,this.showSecuritySettings=!0,this.showAllHelp=!1,h.uv.locale=this.locale,this.roleList=JSON.parse(localStorage.getItem("roleList")),this.roleInfoButtonText=this.getRoleInfoButtonText(!1)}ngAfterViewInit(){this.returnArrowDir=this.locale.isRtl?"fa-arrow-right":"fa-arrow-left"}ngOnDestroy(){localStorage.removeItem("teamData")}setShowFeaturesButtonPosition(t,o){this.renderer.appendChild(t.element,o.nativeElement),this.renderer.setStyle(o.nativeElement,this.locale.isRtl?"left":"right","0")}toggleAllInfoBlocks(){this.showInfoBlocksService.toggleShowAll()}toggleRoleFeatures(t,o){t.isOpen||t.open(),this.showRoleFeatures=!o,this.roleInfoButtonText=this.getRoleInfoButtonText(this.showRoleFeatures)}updateAcknowledgmentStatus(t,o=[]){JSON.stringify(o?.sort())!==JSON.stringify(t.get("roles").value.sort())?t.get("acknowledgment").enable():t.get("acknowledgment").disable()}setNotesValidators(t){t.get("notes").setValidators([h.ln.maxLength(this.locale.maketext("The notes must be at most [numf,_1] characters.",100),100)])}setContactEmailValidators(t){t.get("contactEmail").setValidators([h.ln.required(this.locale.maketext("You [output,strong,must] enter a valid email.")),h.sr.validateEmail()])}setPasswordOptionsValidators(t){t.get("passwordOptions").setValidators(h.ln.required(this.locale.maketext("You [output,strong,must] select one option.")))}setAcknowledgmentValidators(t){t.get("acknowledgment").setValidators(h.ln.requiredTrue(this.locale.maketext("You must acknowledge the warning to proceed.")))}getRoleInfoButtonText(t){return this.locale.maketext(t?"Hide Features":"Show Features")}static#e=this.\u0275fac=function(o){return new(o||i)(e.rXU(g.h),e.rXU(e.sFG),e.rXU(U),e.rXU(E))};static#t=this.\u0275cmp=e.VBU({type:i,selectors:[["ng-component"]],decls:0,vars:0,template:function(o,n){},styles:[".base-team-user__section-title[_ngcontent-%COMP%]{font-size:1rem;margin-bottom:var(--cp-spacer-3);margin-top:var(--cp-spacer-4)}.base-team-user__section-title[_ngcontent-%COMP%]:first-of-type{margin-top:unset}.base-team-user__set-password-fieldset[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-bottom:var(--cp-spacer-2)}.fieldset-password__radio-label[_ngcontent-%COMP%]{font-weight:400}input[type=radio][_ngcontent-%COMP%]:disabled + label[_ngcontent-%COMP%]{color:#b3bccf}html[dir=ltr][_ngcontent-%COMP%]   input[type=radio][_ngcontent-%COMP%], [dir=ltr][_ngcontent-%COMP%]   input[type=radio][_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%]   input[type=radio][_ngcontent-%COMP%], html[dir=ltr][_nghost-%COMP%]   input[type=radio][_ngcontent-%COMP%], html[dir=ltr]   [_nghost-%COMP%]   input[type=radio][_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%]   input[type=radio][_ngcontent-%COMP%], [dir=ltr]   [_nghost-%COMP%]   input[type=radio][_ngcontent-%COMP%]{margin-right:var(--cp-spacer-1)}html[dir=rtl][_ngcontent-%COMP%]   input[type=radio][_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%]   input[type=radio][_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%]   input[type=radio][_ngcontent-%COMP%], html[dir=rtl][_nghost-%COMP%]   input[type=radio][_ngcontent-%COMP%], html[dir=rtl]   [_nghost-%COMP%]   input[type=radio][_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%]   input[type=radio][_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   input[type=radio][_ngcontent-%COMP%]{margin-left:var(--cp-spacer-1)}.base-team-user__description[_ngcontent-%COMP%]{margin-bottom:var(--cp-spacer-3)}.base-team-user__form-container[_ngcontent-%COMP%]{padding:0}.roles__features-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,180px);padding:var(--cp-spacer-2) 0}.role-feature[_ngcontent-%COMP%]{padding:var(--cp-spacer-1) 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.roles__ng-select--custom[_ngcontent-%COMP%]{position:relative}.roles__show-info-button[_ngcontent-%COMP%]{position:absolute;top:-25px}html[dir=ltr][_ngcontent-%COMP%]   .roles__show-info-button[_ngcontent-%COMP%], [dir=ltr][_ngcontent-%COMP%]   .roles__show-info-button[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%]   .roles__show-info-button[_ngcontent-%COMP%], html[dir=ltr][_nghost-%COMP%]   .roles__show-info-button[_ngcontent-%COMP%], html[dir=ltr]   [_nghost-%COMP%]   .roles__show-info-button[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%]   .roles__show-info-button[_ngcontent-%COMP%], [dir=ltr]   [_nghost-%COMP%]   .roles__show-info-button[_ngcontent-%COMP%]{right:0}html[dir=rtl][_ngcontent-%COMP%]   .roles__show-info-button[_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%]   .roles__show-info-button[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%]   .roles__show-info-button[_ngcontent-%COMP%], html[dir=rtl][_nghost-%COMP%]   .roles__show-info-button[_ngcontent-%COMP%], html[dir=rtl]   [_nghost-%COMP%]   .roles__show-info-button[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%]   .roles__show-info-button[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .roles__show-info-button[_ngcontent-%COMP%]{left:0}.base-team-user__fieldset-legend[_ngcontent-%COMP%]{display:inline-block;font-size:unset;border:none;font-weight:600;margin:0 0 var(--cp-spacer-1)}.row-expand-container[_ngcontent-%COMP%]{display:inline}.base-team-user__panel-footer[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.base-team-user__action-button[_ngcontent-%COMP%]{display:flex;align-items:center}.base-team-user__action-button-icon[_ngcontent-%COMP%]{align-self:normal}html[dir=ltr][_ngcontent-%COMP%]   .base-team-user__action-button-icon[_ngcontent-%COMP%], [dir=ltr][_ngcontent-%COMP%]   .base-team-user__action-button-icon[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%]   .base-team-user__action-button-icon[_ngcontent-%COMP%], html[dir=ltr][_nghost-%COMP%]   .base-team-user__action-button-icon[_ngcontent-%COMP%], html[dir=ltr]   [_nghost-%COMP%]   .base-team-user__action-button-icon[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%]   .base-team-user__action-button-icon[_ngcontent-%COMP%], [dir=ltr]   [_nghost-%COMP%]   .base-team-user__action-button-icon[_ngcontent-%COMP%]{margin-right:var(--cp-spacer-1)}html[dir=rtl][_ngcontent-%COMP%]   .base-team-user__action-button-icon[_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%]   .base-team-user__action-button-icon[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%]   .base-team-user__action-button-icon[_ngcontent-%COMP%], html[dir=rtl][_nghost-%COMP%]   .base-team-user__action-button-icon[_ngcontent-%COMP%], html[dir=rtl]   [_nghost-%COMP%]   .base-team-user__action-button-icon[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%]   .base-team-user__action-button-icon[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .base-team-user__action-button-icon[_ngcontent-%COMP%]{margin-left:var(--cp-spacer-1)}.base-team-user__accordion-group-panel[_ngcontent-%COMP%]{margin-bottom:0}"]})}return i})();const je=i=>[i];function Ie(i,s){if(1&i&&(e.j41(0,"li")(1,"a",6),e.nrm(2,"i",7),e.EFF(3),e.k0s()()),2&i){const t=e.XpG().$implicit;e.R7$(),e.Y8G("href",e.eq3(4,je,t.url),e.B4B)("id",t.id)("title",t.title),e.R7$(2),e.SpI(" ",t.title," ")}}function Ae(i,s){if(1&i&&(e.qex(0),e.DNE(1,Ie,4,6,"li",5),e.bVm()),2&i){const t=s.$implicit;e.R7$(),e.Y8G("ngIf",t.condition)}}function De(i,s){if(1&i&&(e.j41(0,"div",1)(1,"section",2)(2,"h3",3),e.EFF(3),e.k0s(),e.j41(4,"ul"),e.DNE(5,Ae,2,1,"ng-container",4),e.k0s()()()),2&i){const t=e.XpG();e.R7$(3),e.SpI(" ",t.locale.maketext("Related Interfaces")," "),e.R7$(2),e.Y8G("ngForOf",t.formattedFeatures)}}let ae=(()=>{class i{constructor(t,o,n,a,c,u){this.locale=t,this.emailApp=o,this.ftpApp=n,this.webDiskApp=a,this.userManagerApp=c,this.deprefix=u,this.hasAtLeastOneFeature=this.hasOneOfTheFeatures({email:!!this.emailApp,ftp:!!this.ftpApp,webdisk:!!this.webDiskApp,userManager:!!this.userManagerApp}),this.formattedFeatures=[{id:"emailAccounts",url:this.deprefix+this.emailApp.url,title:this.locale.maketext("Email Accounts"),condition:this.emailApp},{id:"ftpAccounts",url:this.deprefix+this.ftpApp.url,title:this.locale.maketext("FTP Accounts"),condition:this.ftpApp},{id:"webDisk",url:this.deprefix+this.webDiskApp.url,title:this.locale.maketext("Web Disk"),condition:this.webDiskApp},{id:"userManager",url:this.deprefix+this.userManagerApp.url,title:this.locale.maketext("User Manager"),condition:this.userManagerApp}]}hasOneOfTheFeatures(t){return t.email||t.ftp||t.webdisk||t.userManager}static#e=this.\u0275fac=function(o){return new(o||i)(e.rXU(g.h),e.rXU(H),e.rXU(q),e.rXU(Q),e.rXU(J),e.rXU(W))};static#t=this.\u0275cmp=e.VBU({type:i,selectors:[["cp-team-manager-team-user-related-interfaces"]],decls:1,vars:1,consts:[["class","section",4,"ngIf"],[1,"section"],[1,"widget"],[1,"widget-title"],[4,"ngFor","ngForOf"],[4,"ngIf"],["target","_blank","rel","noopener noreferrer",3,"href","id","title"],["aria-hidden","true",1,"fas","fa-fw","fa-external-link-alt"]],template:function(o,n){1&o&&e.DNE(0,De,6,2,"div",0),2&o&&e.Y8G("ngIf",n.hasAtLeastOneFeature)},dependencies:[m.Sq,m.bT],encapsulation:2})}return i})(),se=(()=>{class i{constructor(t){this.locale=t}static#e=this.\u0275fac=function(o){return new(o||i)(e.rXU(g.h))};static#t=this.\u0275cmp=e.VBU({type:i,selectors:[["cp-team-manager-team-user-help-section"]],decls:9,vars:3,consts:[[1,"section"],[1,"widget"],[1,"widget-title"],["href","https://go.cpanel.net/manage-team","id","help-section__link","target","cpanel_documentation",3,"title"],["aria-hidden","true",1,"fas","fa-fw","fa-external-link-alt"]],template:function(o,n){1&o&&(e.j41(0,"div",0)(1,"section",1)(2,"h3",2),e.EFF(3),e.k0s(),e.j41(4,"ul")(5,"li")(6,"a",3),e.nrm(7,"i",4),e.EFF(8),e.k0s()()()()()),2&o&&(e.R7$(3),e.JRh(n.locale.maketext("Need Help?")),e.R7$(3),e.FS9("title",n.locale.maketext("Need help? Click here to read more about this interface.")),e.R7$(2),e.SpI(" ",n.locale.maketext("About This Interface")," "))},encapsulation:2})}return i})();var re=function(i){return i.input="input",i.textarea="textarea",i}(re||{});const Be=i=>({"input-group":i});function Ve(i,s){if(1&i&&e.nrm(0,"input",7),2&i){const t=e.XpG();e.Y8G("id",t.id)("formControlName",t.controlName)("name",t.controlName)}}function Ne(i,s){if(1&i&&(e.j41(0,"span",8),e.EFF(1),e.k0s()),2&i){const t=e.XpG();e.Y8G("title",t.inputAddon),e.R7$(),e.JRh(t.inputAddon)}}function Ye(i,s){if(1&i&&(e.j41(0,"textarea",9),e.EFF(1,"        "),e.k0s()),2&i){const t=e.XpG();e.Y8G("id",t.id)("formControlName",t.controlName)("name",t.controlName)}}let le=(()=>{class i{constructor(t){this.showInfoBlockService=t,this.formFieldType=re}infoBlockStatus(){return this.formFieldComponent.infoBlockStatus()}setInfoBlockStatus(t){this.formFieldComponent.setInfoBlockStatus(t)}static#e=this.\u0275fac=function(o){return new(o||i)(e.rXU(U))};static#t=this.\u0275cmp=e.VBU({type:i,selectors:[["cp-team-manager-team-user-form-field"]],viewQuery:function(o,n){if(1&o&&e.GBs(r.KS,5),2&o){let a;e.mGM(a=e.lsd())&&(n.formFieldComponent=a.first)}},inputs:{id:"id",element:"element",control:"control",controlName:"controlName",formGroup:"formGroup",labelText:"labelText",infoBlockText:"infoBlockText",inputAddon:"inputAddon"},decls:8,vars:13,consts:[[1,"form-group",3,"formGroup"],["idPrefix","team-user",3,"control","showAllHelp","labelText","labelFor","showInfoToggle"],["field-label-help-text",""],["form-field-input-content","",3,"ngClass"],["type","text","cpValidationStrategy","","class","form-control",3,"id","formControlName","name",4,"ngIf"],["class","input-group-addon override-has-success",3,"title",4,"ngIf"],["form-field-input-content","","type","text","cpValidationStrategy","","class","form-control",3,"id","formControlName","name",4,"ngIf"],["type","text","cpValidationStrategy","",1,"form-control",3,"id","formControlName","name"],[1,"input-group-addon","override-has-success",3,"title"],["form-field-input-content","","type","text","cpValidationStrategy","",1,"form-control",3,"id","formControlName","name"]],template:function(o,n){1&o&&(e.j41(0,"div",0)(1,"cp-form-field",1)(2,"div",2),e.EFF(3),e.k0s(),e.j41(4,"div",3),e.DNE(5,Ve,1,3,"input",4)(6,Ne,2,2,"span",5),e.k0s(),e.DNE(7,Ye,2,3,"textarea",6),e.k0s()()),2&o&&(e.Y8G("formGroup",n.formGroup),e.R7$(),e.Y8G("control",n.control)("showAllHelp",n.showInfoBlockService.showAllHelp)("labelText",n.labelText)("labelFor",n.controlName)("showInfoToggle",n.infoBlockText),e.R7$(2),e.JRh(n.infoBlockText),e.R7$(),e.Y8G("ngClass",e.eq3(11,Be,n.inputAddon)),e.R7$(),e.Y8G("ngIf",n.element===n.formFieldType.input),e.R7$(),e.Y8G("ngIf",n.inputAddon),e.R7$(),e.Y8G("ngIf",n.element===n.formFieldType.textarea))},dependencies:[m.YU,m.bT,l.me,l.BC,l.cb,l.j4,l.JD,r.KS,r.Ar],styles:["textarea[_ngcontent-%COMP%]{resize:vertical;position:relative}.override-has-success[_ngcontent-%COMP%]{color:#555;background-color:#eee;border-color:#ccc}"]})}return i})();function Le(i,s){if(1&i&&(e.j41(0,"div",1)(1,"div",2)(2,"p",3)(3,"cp-callout",4),e.nrm(4,"span",5),e.k0s()()(),e.nrm(5,"input",6)(6,"label",7)(7,"cp-validation-container",8),e.k0s()),2&i){const t=e.XpG();e.Y8G("formGroup",t.form),e.R7$(4),e.Y8G("innerHtml",t.locale.maketext("[output,strong,Security Risk:] This role may grant access to account-level functionality. Only grant this role to users that you trust to access and modify your account."),e.npT),e.R7$(2),e.Y8G("innerHtml","&nbsp"+t.locale.maketext("I have read and understood the security risk warning."),e.npT),e.R7$(),e.Y8G("control",t.form.get("acknowledgment"))}}let ce=(()=>{class i{constructor(t){this.locale=t}static#e=this.\u0275fac=function(o){return new(o||i)(e.rXU(g.h))};static#t=this.\u0275cmp=e.VBU({type:i,selectors:[["cp-team-manager-acknowledgment-check"]],inputs:{form:"form"},decls:1,vars:1,consts:[[3,"formGroup",4,"ngIf"],[3,"formGroup"],[1,"row"],[1,"col-xs-12","acknowledgment-check__security-paragraph"],["id","acknowledgment-check__security-warning","calloutType","warning"],[3,"innerHtml"],["type","checkbox","id","acknowledgment-checkbox","formControlName","acknowledgment"],["for","acknowledgment-checkbox",3,"innerHtml"],["id","acknowledgment_validation-container",3,"control"]],template:function(o,n){1&o&&e.DNE(0,Le,8,4,"div",0),2&o&&e.Y8G("ngIf",!n.form.get("acknowledgment").disabled)},dependencies:[m.bT,l.Zm,l.BC,l.cb,l.j4,l.JD,r.kl,r.GV],styles:[".acknowledgment-check__security-paragraph[_ngcontent-%COMP%]{margin:0}"]})}return i})();var k=p(2584);const Xe=i=>({"btn btn-default dropdown-toggle":!0,"services__button--disabled":i});function ze(i,s){if(1&i){const t=e.RV6();e.j41(0,"ul",23)(1,"li",24)(2,"a",25),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.selectSize("MB"))}),e.EFF(3,"MB"),e.k0s()(),e.j41(4,"li",24)(5,"a",25),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.selectSize("GB"))}),e.EFF(6,"GB"),e.k0s()(),e.j41(7,"li",24)(8,"a",25),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.selectSize("TB"))}),e.EFF(9,"TB"),e.k0s()(),e.j41(10,"li",24)(11,"a",25),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.selectSize("PB"))}),e.EFF(12,"PB"),e.k0s()()()}}function He(i,s){if(1&i&&e.nrm(0,"cp-validation-container",26),2&i){const t=e.XpG();e.Y8G("control",t.form.get("email.quota"))}}let qe=(()=>{class i{constructor(t,o,n,a,c,u){this.maxEmailQuota=t,this.defaultEmailQuota=o,this.locale=n,this.fb=a,this.activatedRoute=c,this.mapApiService=u,this.toggleLabelPositions=r.Jr,this.toggleStates=r.pv,this.selectedSize="MB",this.emailToggleState=r.pv.toggleOff,this.setUnlimitedLabel(this.maxEmailQuota)}ngOnInit(){this.activatedRoute.snapshot.url[0].path===d.create?this.addCreateEmailControls():this.addEditEmailControls(),this.form.get("email.options").valueChanges.subscribe(o=>{this.updateEmailValidators(o)}),this.form.get("email.options").disabled||(this.emailToggleState=r.pv.toggleOn)}updateToggle(){this.emailToggleState===r.pv.toggleOff?(this.emailToggleState=r.pv.toggleOn,this.form.get("email.options").enable(),this.form.get("email.quota").enable()):this.emailToggleState===r.pv.toggleOn&&(this.emailToggleState=r.pv.toggleOff,this.form.get("email.options").disable(),this.form.get("email.quota").disable())}setEmailServiceOptionLimited(){this.form.get("email.options").setValue("limited");const t=this.form.get("email.quota");t.value||t.setValue(this.lastQuotaValue||this.defaultEmailQuota)}setEmailServiceOptionUnlimited(){this.lastQuotaValue=this.form.get("email.quota").value,this.form.get("email.quota").setValue("")}selectSize(t){this.selectedSize=t,this.setEmailQuotaValidators(this.form,this.maxEmailQuota,this.getValidatorMaxQuota(t))}addCreateEmailControls(){this.form.addControl("email",this.fb.group({options:[{value:"unlimited",disabled:!0},{updateOn:"change"}],quota:[{value:"",disabled:!0},{}]}))}addEditEmailControls(){const t=this.activatedRoute.snapshot.paramMap.get("id"),o=this.mapApiService.getTeamUserApiServices(t),n=Number(o.email.quota)||void 0,a=n&&n!==Number(this.maxEmailQuota)?"limited":"unlimited";this.form.addControl("email",this.fb.group({options:[{value:a,disabled:!(0,k.G)(o.email.enabled)},{updateOn:"change"}],quota:[{value:"limited"===a?n:"",disabled:!(0,k.G)(o.email.enabled)}]}))}setUnlimitedLabel(t){this.emailUnlimitedLabel="unlimited"!==t?this.locale.maketext("Maximum ([format_bytes,_1])",1048576*t):this.locale.maketext("Unlimited")}updateEmailValidators(t){"limited"===t?this.setEmailQuotaValidators(this.form,this.maxEmailQuota,this.getValidatorMaxQuota(this.selectedSize)):this.form.get("email.quota").setValidators(null),this.form.get("email.quota").updateValueAndValidity()}getValidatorMaxQuota(t){if("unlimited"===this.maxEmailQuota)return null;switch(t){case"GB":return this.maxEmailQuota/1024;case"TB":return this.maxEmailQuota/1048576;case"PB":return this.maxEmailQuota/1073741824;default:return this.maxEmailQuota}}setEmailQuotaValidators(t,o,n){const a=[h.ln.required(this.locale.maketext("Quota must be an integer.")),h.ln.min(this.locale.maketext("Quota must be greater than zero."),0)];"unlimited"!==o&&a.push(h.ln.max(this.locale.maketext("Quotas cannot exceed [format_bytes,_1].",1048576*o),n)),t.get("email.quota").setValidators(a),this.form.get("email.quota").updateValueAndValidity()}static#e=this.\u0275fac=function(o){return new(o||i)(e.rXU(Z),e.rXU(ee),e.rXU(g.h),e.rXU(l.ze),e.rXU(b.nX),e.rXU(S))};static#t=this.\u0275cmp=e.VBU({type:i,selectors:[["cp-team-manager-service-email"]],inputs:{form:"form"},decls:28,vars:15,consts:[[1,"panel","panel-default"],[1,"panel-heading","services-heading"],[1,"services-heading__label"],["id","toggleEmail",3,"toggleStatus","onText","offText","toggleState","labelPosition"],[1,"panel-body"],[3,"formGroup"],["formGroupName","email",1,"form-group"],[1,"row"],[1,"col-xs-12"],[1,"fieldset-label"],[1,"services__radio"],["type","radio","id","services-email-unlimited","formControlName","options","value","unlimited",3,"change"],["for","services-email-unlimited",1,"fieldset-password__radio-label"],[1,"services__radio","service__limit"],["type","radio","id","services-email-limited","formControlName","options","value","limited",3,"change"],["for","services-email-limited",1,"fieldset-password__radio-label",3,"click"],[1,"input-group","mb-3"],["type","number","id","email-quota__limit","size","11","cpValidationStrategy","","formControlName","quota",1,"form-control",3,"readOnly"],["dropdown","",1,"input-group-btn",3,"isDisabled"],["id","button-basic","dropdownToggle","","type","button","aria-controls","dropdown-basic",3,"ngClass"],[1,"caret"],["id","dropdown-basic","class","dropdown-menu","role","menu","aria-labelledby","button-basic",4,"dropdownMenu"],["id","email-service_validation-container",3,"control",4,"ngIf"],["id","dropdown-basic","role","menu","aria-labelledby","button-basic",1,"dropdown-menu"],["role","menuitem"],["href","javascript:void(0)",1,"dropdown-item",3,"click"],["id","email-service_validation-container",3,"control"]],template:function(o,n){1&o&&(e.j41(0,"div",0)(1,"div",1)(2,"label",2),e.EFF(3),e.k0s(),e.j41(4,"cp-toggle-switch",3),e.bIt("toggleStatus",function(){return n.updateToggle()}),e.k0s()(),e.j41(5,"div",4)(6,"form",5)(7,"div",6)(8,"div",7)(9,"div",8)(10,"fieldset")(11,"legend",9),e.EFF(12),e.k0s(),e.j41(13,"div",10)(14,"input",11),e.bIt("change",function(){return n.setEmailServiceOptionUnlimited()}),e.k0s(),e.j41(15,"label",12),e.EFF(16),e.k0s()(),e.j41(17,"div",13)(18,"input",14),e.bIt("change",function(){return n.setEmailServiceOptionLimited()}),e.k0s(),e.j41(19,"label",15),e.bIt("click",function(){return n.setEmailServiceOptionLimited()}),e.j41(20,"div",16),e.nrm(21,"input",17),e.j41(22,"div",18)(23,"button",19),e.EFF(24),e.nrm(25,"span",20),e.k0s(),e.DNE(26,ze,13,0,"ul",21),e.k0s()()()()(),e.DNE(27,He,1,1,"cp-validation-container",22),e.k0s()()()()()()),2&o&&(e.R7$(3),e.JRh(n.locale.maketext("Email")),e.R7$(),e.Y8G("onText",n.locale.maketext("Enabled"))("offText",n.locale.maketext("Disabled"))("toggleState",n.emailToggleState)("labelPosition",n.toggleLabelPositions.left),e.R7$(2),e.Y8G("formGroup",n.form),e.R7$(6),e.SpI(" ",n.locale.maketext("Quota")," "),e.R7$(4),e.SpI(" ",n.emailUnlimitedLabel," "),e.R7$(5),e.Y8G("readOnly","unlimited"===n.form.get("email.options").value),e.R7$(),e.Y8G("isDisabled",n.form.get("email.options").disabled),e.R7$(),e.Y8G("ngClass",e.eq3(13,Xe,"unlimited"===n.form.get("email.options").value)),e.R7$(),e.SpI(" ",n.selectedSize," "),e.R7$(3),e.Y8G("ngIf",n.form.get("email.quota").enabled))},dependencies:[m.YU,m.bT,l.qT,l.me,l.Q0,l.Fm,l.BC,l.cb,l.j4,l.JD,l.$R,f.hs,f.UL,f.Kk,r.CK,r.kl,r.Ar],styles:[".service-spacer[_ngcontent-%COMP%]{margin-bottom:var(--cp-spacer-3)}.service__limit[_ngcontent-%COMP%]{display:flex;align-items:center}.service__limit[_ngcontent-%COMP%]   input[_ngcontent-%COMP%], .service__limit[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]{margin:0}.services__radio[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]{margin-left:5px}legend[_ngcontent-%COMP%]{display:inline-block;font-size:unset;border:none;font-weight:var(--cp-font-weight-semi-bold);margin:0 0 var(--cp-spacer-1)}.services-heading[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.services-heading[_ngcontent-%COMP%]   .services-heading__label[_ngcontent-%COMP%]{margin:0}input[readonly][_ngcontent-%COMP%]{cursor:default}.services__button--disabled[_ngcontent-%COMP%]{pointer-events:none;opacity:.65}"]})}return i})();const Qe=i=>({"btn btn-default dropdown-toggle":!0,"services__button--disabled":i});function Je(i,s){if(1&i){const t=e.RV6();e.j41(0,"ul",25)(1,"li",26)(2,"a",27),e.bIt("click",function(){e.eBV(t);const n=e.XpG(2);return e.Njj(n.selectSize("MB"))}),e.EFF(3,"MB"),e.k0s()(),e.j41(4,"li",26)(5,"a",27),e.bIt("click",function(){e.eBV(t);const n=e.XpG(2);return e.Njj(n.selectSize("GB"))}),e.EFF(6,"GB"),e.k0s()(),e.j41(7,"li",26)(8,"a",27),e.bIt("click",function(){e.eBV(t);const n=e.XpG(2);return e.Njj(n.selectSize("TB"))}),e.EFF(9,"TB"),e.k0s()(),e.j41(10,"li",26)(11,"a",27),e.bIt("click",function(){e.eBV(t);const n=e.XpG(2);return e.Njj(n.selectSize("PB"))}),e.EFF(12,"PB"),e.k0s()()()}}function We(i,s){if(1&i&&e.nrm(0,"cp-validation-container",28),2&i){const t=e.XpG(2);e.Y8G("control",t.form.get("ftp.quota"))}}function Ke(i,s){if(1&i){const t=e.RV6();e.j41(0,"div",8)(1,"div",9)(2,"div",10)(3,"fieldset")(4,"legend",11),e.EFF(5),e.k0s(),e.j41(6,"div",12)(7,"input",13),e.bIt("change",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.setFtpServiceOptionUnlimited())}),e.k0s(),e.j41(8,"label",14),e.EFF(9),e.k0s()(),e.j41(10,"div",15)(11,"input",16),e.bIt("change",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.setFtpServiceOptionLimited())}),e.k0s(),e.j41(12,"label",17),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.setFtpServiceOptionLimited())}),e.j41(13,"div",18),e.nrm(14,"input",19),e.j41(15,"div",20)(16,"button",21),e.EFF(17),e.nrm(18,"span",22),e.k0s(),e.DNE(19,Je,13,0,"ul",23),e.k0s()()()()(),e.DNE(20,We,1,1,"cp-validation-container",24),e.k0s()()()}if(2&i){const t=e.XpG();e.R7$(5),e.SpI(" ",t.locale.maketext("Quota")," "),e.R7$(4),e.SpI(" ",t.locale.maketext("Unlimited")," "),e.R7$(5),e.Y8G("readOnly","unlimited"===t.form.get("ftp.options").value),e.R7$(),e.Y8G("isDisabled",t.form.get("ftp.options").disabled),e.R7$(),e.Y8G("ngClass",e.eq3(7,Qe,"unlimited"===t.form.get("ftp.options").value)),e.R7$(),e.SpI(" ",t.selectedSize," "),e.R7$(3),e.Y8G("ngIf",t.form.get("ftp.quota").enabled)}}function Ze(i,s){if(1&i&&(e.j41(0,"div",8)(1,"div",9)(2,"div",10)(3,"label",29),e.EFF(4),e.k0s(),e.j41(5,"div",30)(6,"div",31),e.nrm(7,"cp-icon",32),e.j41(8,"span"),e.EFF(9,"/"),e.k0s()(),e.nrm(10,"input",33),e.k0s()()()()),2&i){const t=e.XpG();e.R7$(4),e.JRh(t.locale.maketext("Home Directory"))}}let et=(()=>{class i{constructor(t,o,n,a,c){this.locale=t,this.ftpDaemonInfo=o,this.fb=n,this.mapApiService=a,this.activatedRoute=c,this.toggleLabelPositions=r.Jr,this.toggleStates=r.pv,this.selectedSize="MB",this.ftpToggleState=r.pv.toggleOff,this.defaultFtpQuota=100}ngOnInit(){this.activatedRoute.snapshot.url[0].path===d.create?(this.addCreateFtpControls(),this.form.get("username").valueChanges.subscribe(o=>{this.form.get("ftp.homedir").pristine&&this.form.get("ftp.homedir").patchValue(`public_html/${o}`)})):this.addEditFtpControls(),this.form.get("ftp.options").valueChanges.subscribe(o=>{"limited"===o?this.setFtpQuotaValidators(this.form):(this.form.get("ftp.quota").setValidators(null),this.form.get("ftp.quota").updateValueAndValidity())}),this.form.get("ftp.options").disabled||(this.ftpToggleState=r.pv.toggleOn)}updateToggle(){this.ftpToggleState===r.pv.toggleOff?(this.ftpToggleState=r.pv.toggleOn,this.form.get("ftp.options").enable(),this.form.get("ftp.homedir").enable(),this.ftpDaemonInfo.supports.quota&&this.form.get("ftp.quota").enable()):this.ftpToggleState===r.pv.toggleOn&&(this.ftpToggleState=r.pv.toggleOff,this.form.get("ftp.options").disable(),this.form.get("ftp.homedir").disable(),this.form.get("ftp.quota").disable())}setFtpServiceOptionLimited(){this.form.get("ftp.options").setValue("limited");const t=this.form.get("ftp.quota");t.value||t.setValue(this.lastQuotaValue||this.defaultFtpQuota)}setFtpServiceOptionUnlimited(){this.lastQuotaValue=this.form.get("ftp.quota").value,this.form.get("ftp.quota").setValue("")}selectSize(t){this.selectedSize=t}addCreateFtpControls(){this.form.addControl("ftp",this.fb.group({options:[{value:"unlimited",disabled:!0},{updateOn:"change"}],quota:[{value:"",disabled:!0},{}],homedir:[{value:"",disabled:!0},{}]}))}addEditFtpControls(){const t=this.activatedRoute.snapshot.paramMap.get("id"),o=this.mapApiService.getTeamUserApiServices(t);this.form.addControl("ftp",this.fb.group({options:[{value:Number(o.ftp.quota)>0?"limited":"unlimited",disabled:!(0,k.G)(o.ftp.enabled)},{updateOn:"change"}],quota:[{value:Number(o.ftp.quota)||"",disabled:!(0,k.G)(o.ftp.enabled)}],homedir:[{value:o.ftp.homedir||`public_html/${t}`,disabled:!(0,k.G)(o.ftp.enabled)}]}))}setFtpQuotaValidators(t){const o=[h.ln.required(this.locale.maketext("Quota must be an integer.")),h.ln.min(this.locale.maketext("Quota must be greater than zero."),0)];t.get("ftp.quota").setValidators(o),this.form.get("ftp.quota").updateValueAndValidity()}static#e=this.\u0275fac=function(o){return new(o||i)(e.rXU(g.h),e.rXU(D),e.rXU(l.ze),e.rXU(S),e.rXU(b.nX))};static#t=this.\u0275cmp=e.VBU({type:i,selectors:[["cp-team-manager-service-ftp"]],inputs:{form:"form"},decls:10,vars:8,consts:[[1,"panel","panel-default"],[1,"panel-heading","services-heading"],[1,"services-heading__label"],["id","toggleFtp",3,"toggleStatus","onText","offText","toggleState","labelPosition"],[1,"panel-body"],[3,"formGroup"],["formGroupName","ftp"],["class","form-group",4,"ngIf"],[1,"form-group"],[1,"row"],[1,"col-xs-12"],[1,"fieldset-label"],[1,"services__radio"],["type","radio","id","services-ftp-unlimited","formControlName","options","value","unlimited",3,"change"],["for","services-ftp-unlimited",1,"fieldset-password__radio-label"],[1,"services__radio","service__limit"],["type","radio","id","services-ftp-limited","formControlName","options","value","limited",3,"change"],["for","services-ftp-limited",1,"fieldset-password__radio-label",3,"click"],[1,"input-group","mb-3"],["type","number","id","ftp-quota__limit","size","11","cpValidationStrategy","","formControlName","quota",1,"form-control",3,"readOnly"],["dropdown","",1,"input-group-btn",3,"isDisabled"],["id","button-basic","dropdownToggle","","type","button","aria-controls","dropdown-basic",3,"ngClass"],[1,"caret"],["id","dropdown-basic","class","dropdown-menu","role","menu","aria-labelledby","button-basic",4,"dropdownMenu"],["id","ftp-service_validation-container",3,"control",4,"ngIf"],["id","dropdown-basic","role","menu","aria-labelledby","button-basic",1,"dropdown-menu"],["role","menuitem"],["href","javascript:void(0)",1,"dropdown-item",3,"click"],["id","ftp-service_validation-container",3,"control"],["for","service-ftp-homedir"],[1,"input-group"],[1,"input-group-addon"],["name","home-2-fill","size","ri-sm"],["type","text","id","service-ftp-homedir","formControlName","homedir",1,"form-control"]],template:function(o,n){1&o&&(e.j41(0,"div",0)(1,"div",1)(2,"label",2),e.EFF(3),e.k0s(),e.j41(4,"cp-toggle-switch",3),e.bIt("toggleStatus",function(){return n.updateToggle()}),e.k0s()(),e.j41(5,"div",4)(6,"form",5)(7,"div",6),e.DNE(8,Ke,21,9,"div",7)(9,Ze,11,1,"div",7),e.k0s()()()()),2&o&&(e.R7$(3),e.JRh(n.locale.maketext("FTP")),e.R7$(),e.Y8G("onText",n.locale.maketext("Enabled"))("offText",n.locale.maketext("Disabled"))("toggleState",n.ftpToggleState)("labelPosition",n.toggleLabelPositions.left),e.R7$(2),e.Y8G("formGroup",n.form),e.R7$(2),e.Y8G("ngIf",n.ftpDaemonInfo.supports.quota),e.R7$(),e.Y8G("ngIf",n.ftpDaemonInfo.supports.quota))},dependencies:[m.YU,m.bT,l.qT,l.me,l.Q0,l.Fm,l.BC,l.cb,l.j4,l.JD,l.$R,f.hs,f.UL,f.Kk,r.CK,r.kl,r.Ar],styles:[".service-spacer[_ngcontent-%COMP%]{margin-bottom:var(--cp-spacer-3)}.service__limit[_ngcontent-%COMP%]{display:flex;align-items:center}.service__limit[_ngcontent-%COMP%]   input[_ngcontent-%COMP%], .service__limit[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]{margin:0}.services__radio[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]{margin-left:5px}legend[_ngcontent-%COMP%]{display:inline-block;font-size:unset;border:none;font-weight:var(--cp-font-weight-semi-bold);margin:0 0 var(--cp-spacer-1)}.services-heading[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.services-heading[_ngcontent-%COMP%]   .services-heading__label[_ngcontent-%COMP%]{margin:0}input[readonly][_ngcontent-%COMP%]{cursor:default}.services__button--disabled[_ngcontent-%COMP%]{pointer-events:none;opacity:.65}"]})}return i})();function tt(i,s){if(1&i&&e.nrm(0,"cp-alert",26),2&i){const t=e.XpG();e.Y8G("alert",t.digestAlert)}}let nt=(()=>{class i{constructor(t,o,n,a,c){this.locale=t,this.fb=o,this.activatedRoute=n,this.mapApiService=a,this.showInfoBlocksService=c,this.toggleLabelPositions=r.Jr,this.toggleStates=r.pv,this.webdiskToggleState=r.pv.toggleOff,this.digestAlert=new r.Fc(this.locale.maketext("You must provide a new password to enable Digest Authentication."),r.vT.warning,{isCloseable:!1})}ngOnInit(){this.activatedRoute.snapshot.url[0].path===d.create?(this.addCreateWebdiskControls(),this.form.get("username").valueChanges.subscribe(o=>{this.form.get("webdisk.homedir").pristine&&this.form.get("webdisk.homedir").patchValue(`public_html/${o}`)})):this.addEditWebdiskControls(),this.form.get("webdisk.options").disabled||(this.webdiskToggleState=r.pv.toggleOn),this.digestInitiallyEnabled=this.form.get("webdisk.enableDigest").value}updateToggle(){this.webdiskToggleState===r.pv.toggleOff?(this.webdiskToggleState=r.pv.toggleOn,this.form.get("webdisk.options").enable(),this.form.get("webdisk.homedir").enable(),this.form.get("webdisk.enableDigest").enable()):this.webdiskToggleState===r.pv.toggleOn&&(this.webdiskToggleState=r.pv.toggleOff,this.form.get("webdisk.options").disable(),this.form.get("webdisk.homedir").disable(),this.form.get("webdisk.enableDigest").disable())}addCreateWebdiskControls(){this.form.addControl("webdisk",this.fb.group({options:[{value:"readwrite",disabled:!0},{updateOn:"change"}],homedir:[{value:"",disabled:!0},{}],enableDigest:[{value:!1,disabled:!0},{}]}))}addEditWebdiskControls(){const t=this.activatedRoute.snapshot.paramMap.get("id"),o=this.mapApiService.getTeamUserApiServices(t);this.form.addControl("webdisk",this.fb.group({options:[{value:"ro"===o.webdisk.perms?"readonly":"readwrite",disabled:!(0,k.G)(o.webdisk.enabled)},{updateOn:"change"}],homedir:[{value:o.webdisk.homedir||`public_html/${t}`,disabled:!(0,k.G)(o.webdisk.enabled)}],enableDigest:[{value:(0,k.G)(o.webdisk.enabled)&&(0,k.G)(o.webdisk.enabledigest),disabled:!(0,k.G)(o.webdisk.enabled)},{updateOn:"change"}]}))}static#e=this.\u0275fac=function(o){return new(o||i)(e.rXU(g.h),e.rXU(l.ze),e.rXU(b.nX),e.rXU(S),e.rXU(U))};static#t=this.\u0275cmp=e.VBU({type:i,selectors:[["cp-team-manager-service-webdisk"]],inputs:{form:"form"},decls:41,vars:20,consts:[[1,"panel","panel-default"],[1,"panel-heading","services-heading"],[1,"services-heading__label"],["id","toggleWebdisk",3,"toggleStatus","onText","offText","toggleState","labelPosition"],[1,"panel-body"],[3,"formGroup"],["formGroupName","webdisk"],[1,"form-group"],[1,"row"],[1,"col-xs-12"],["for","service-webdisk-homedir"],[1,"input-group"],[1,"input-group-addon"],["name","home-2-fill","size","ri-sm"],["type","text","id","service-webdisk-homedir","formControlName","homedir",1,"form-control"],["id","webdisk-options","for","options",3,"showInfoBlock","labelText"],[1,"services__radio"],["type","radio","id","services-webdisk-read-write","formControlName","options","value","readwrite"],["for","services-webdisk-read-write",1,"fieldset-password__radio-label"],["type","radio","id","services-webdisk-read-only","formControlName","options","value","readonly"],["for","services-webdisk-read-only",1,"fieldset-password__radio-label"],["id","webdisk-digest-auth","for","enableDigest",3,"showInfoBlock","labelText"],[3,"alert",4,"ngIf"],["type","checkbox","id","digest-checkbox","formControlName","enableDigest"],["for","digest-checkbox",3,"innerHtml"],[1,"help-block"],[3,"alert"]],template:function(o,n){1&o&&(e.j41(0,"div",0)(1,"div",1)(2,"label",2),e.EFF(3),e.k0s(),e.j41(4,"cp-toggle-switch",3),e.bIt("toggleStatus",function(){return n.updateToggle()}),e.k0s()(),e.j41(5,"div",4)(6,"form",5)(7,"div",6)(8,"div",7)(9,"div",8)(10,"div",9)(11,"label",10),e.EFF(12),e.k0s(),e.j41(13,"div",11)(14,"div",12),e.nrm(15,"cp-icon",13),e.j41(16,"span"),e.EFF(17,"/"),e.k0s()(),e.nrm(18,"input",14),e.k0s()()()(),e.j41(19,"div",7)(20,"div",8)(21,"div",9)(22,"cp-form-label",15),e.EFF(23),e.k0s(),e.j41(24,"div",16),e.nrm(25,"input",17),e.j41(26,"label",18),e.EFF(27),e.k0s()(),e.j41(28,"div",16),e.nrm(29,"input",19),e.j41(30,"label",20),e.EFF(31),e.k0s()()()()(),e.j41(32,"div",8)(33,"div",9)(34,"cp-form-label",21),e.EFF(35),e.k0s(),e.DNE(36,tt,1,1,"cp-alert",22),e.nrm(37,"input",23)(38,"label",24),e.j41(39,"span",25),e.EFF(40),e.k0s()()()()()()()),2&o&&(e.R7$(3),e.JRh(n.locale.maketext("Web Disk")),e.R7$(),e.Y8G("onText",n.locale.maketext("Enabled"))("offText",n.locale.maketext("Disabled"))("toggleState",n.webdiskToggleState)("labelPosition",n.toggleLabelPositions.left),e.R7$(2),e.Y8G("formGroup",n.form),e.R7$(6),e.JRh(n.locale.maketext("Home Directory")),e.R7$(10),e.Y8G("showInfoBlock",n.showInfoBlocksService.showAllHelp)("labelText",n.locale.maketext("Permissions")),e.R7$(),e.Lme(" ",n.locale.maketext("Read-Write access level will permit all supported operations inside the directory assigned to this Web Disk account.")," ",n.locale.maketext("Read-Only access will only permit this account to read, download, and list files inside the directory assigned to this Web Disk account.")," "),e.R7$(4),e.SpI(" ",n.locale.maketext("Read-Write")," "),e.R7$(4),e.SpI(" ",n.locale.maketext("Read-Only")," "),e.R7$(3),e.Y8G("showInfoBlock",n.showInfoBlocksService.showAllHelp)("labelText",n.locale.maketext("Authentication (Optional)")),e.R7$(),e.Lme(" ",n.locale.maketext("[list_and,_*] require Digest Authentication support to be enabled in order to access your Web Disk over a clear text/unencrypted connection.","Windows Vista\xae","Windows\xae 7","Windows\xae 8")," ",n.locale.maketext("If the server has an SSL certificate signed by a recognized certificate authority and you are able to make an SSL connection over port 2078, you do not need to enable this.")," "),e.R7$(),e.Y8G("ngIf",!n.digestInitiallyEnabled&&n.form.get("webdisk.enableDigest").enabled),e.R7$(2),e.Y8G("innerHtml","&nbsp"+n.locale.maketext("Enable Digest Authentication"),e.npT),e.R7$(2),e.JRh(n.locale.maketext("This option only applies to [asis,Windows Vista\xae], [asis,Windows\xae 7], [asis,Windows\xae 8] and [asis,Windows\xae 10].")))},dependencies:[m.bT,l.qT,l.me,l.Zm,l.Fm,l.BC,l.cb,l.j4,l.JD,l.$R,r.CK,r.Wp,r.Cy],styles:[".service-spacer[_ngcontent-%COMP%]{margin-bottom:var(--cp-spacer-3)}.service__limit[_ngcontent-%COMP%]{display:flex;align-items:center}.service__limit[_ngcontent-%COMP%]   input[_ngcontent-%COMP%], .service__limit[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]{margin:0}.services__radio[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]{margin-left:5px}legend[_ngcontent-%COMP%]{display:inline-block;font-size:unset;border:none;font-weight:var(--cp-font-weight-semi-bold);margin:0 0 var(--cp-spacer-1)}.services-heading[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.services-heading[_ngcontent-%COMP%]   .services-heading__label[_ngcontent-%COMP%]{margin:0}input[readonly][_ngcontent-%COMP%]{cursor:default}.services__button--disabled[_ngcontent-%COMP%]{pointer-events:none;opacity:.65}"]})}return i})();function it(i,s){if(1&i&&e.nrm(0,"cp-team-manager-service-email",2),2&i){const t=e.XpG();e.Y8G("form",t.form)}}function ot(i,s){if(1&i&&e.nrm(0,"cp-team-manager-service-ftp",2),2&i){const t=e.XpG();e.Y8G("form",t.form)}}function at(i,s){if(1&i&&e.nrm(0,"cp-team-manager-service-webdisk",2),2&i){const t=e.XpG();e.Y8G("form",t.form)}}let me=(()=>{class i{constructor(t,o,n,a){this.isEmailServiceAvailable=t,this.ftpDaemonInfo=o,this.isWebdiskServiceAvailable=n,this.locale=a}static#e=this.\u0275fac=function(o){return new(o||i)(e.rXU(te),e.rXU(D),e.rXU(ne),e.rXU(g.h))};static#t=this.\u0275cmp=e.VBU({type:i,selectors:[["cp-team-manager-services-wrapper"]],inputs:{form:"form"},decls:6,vars:3,consts:[[1,"service-spacer"],[3,"form",4,"ngIf"],[3,"form"]],template:function(o,n){1&o&&(e.j41(0,"div",0),e.DNE(1,it,1,1,"cp-team-manager-service-email",1),e.k0s(),e.j41(2,"div",0),e.DNE(3,ot,1,1,"cp-team-manager-service-ftp",1),e.k0s(),e.j41(4,"div",0),e.DNE(5,at,1,1,"cp-team-manager-service-webdisk",1),e.k0s()),2&o&&(e.R7$(),e.Y8G("ngIf",n.isEmailServiceAvailable),e.R7$(2),e.Y8G("ngIf",n.ftpDaemonInfo.enabled),e.R7$(2),e.Y8G("ngIf",n.isWebdiskServiceAvailable))},dependencies:[m.bT,qe,et,nt],styles:[".service-spacer[_ngcontent-%COMP%]{margin-bottom:var(--cp-spacer-3)}.service__limit[_ngcontent-%COMP%]{display:flex;align-items:center}.service__limit[_ngcontent-%COMP%]   input[_ngcontent-%COMP%], .service__limit[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]{margin:0}.services__radio[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]{margin-left:5px}legend[_ngcontent-%COMP%]{display:inline-block;font-size:unset;border:none;font-weight:var(--cp-font-weight-semi-bold);margin:0 0 var(--cp-spacer-1)}.services-heading[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.services-heading[_ngcontent-%COMP%]   .services-heading__label[_ngcontent-%COMP%]{margin:0}input[readonly][_ngcontent-%COMP%]{cursor:default}.services__button--disabled[_ngcontent-%COMP%]{pointer-events:none;opacity:.65}"]})}return i})();const st=i=>({adaptivePosition:!0,isAnimated:!0,dateInputFormat:i}),rt=i=>({"input-group":i});function lt(i,s){if(1&i&&e.nrm(0,"cp-validation-container",14),2&i){const t=e.XpG();e.Y8G("control",t.form.get("expireDate"))}}function ct(i,s){1&i&&e.nrm(0,"cp-icon",18)}function mt(i,s){if(1&i){const t=e.RV6();e.qex(0),e.j41(1,"div",15)(2,"button",16),e.bIt("click",function(){e.eBV(t);const n=e.XpG(2);return e.Njj(n.unExpireTeamUser())}),e.DNE(3,ct,1,0,"cp-icon",17),e.j41(4,"span"),e.EFF(5),e.k0s()()(),e.bVm()}if(2&i){const t=e.XpG(2);e.R7$(2),e.Y8G("disabled",t.loading),e.R7$(),e.Y8G("ngIf",t.loading),e.R7$(2),e.JRh(t.locale.maketext("Clear expire date"))}}function dt(i,s){if(1&i&&(e.qex(0),e.DNE(1,mt,6,3,"ng-container",13),e.bVm()),2&i){const t=e.XpG();e.R7$(),e.Y8G("ngIf",t.isExpired)}}let de=(()=>{class i{constructor(t,o,n,a,c){this.locale=t,this.teamManagerApiService=o,this.alertService=n,this.window=a,this.router=c,this.actionVisible=!0,this.datepickerMinDate=new Date,this.loading=!1,this.isExpired=!1}ngOnInit(){this.setDateFormatAndPlaceholder(),this.isExpired=this.form.get("expireDate").disabled}unExpireTeamUser(){this.loading=!0,this.teamManagerApiService.cancelExpire(this.form.get("username").value).pipe((0,O.s)(1),(0,T.j)(()=>{this.loading=!1})).subscribe({next:()=>{this.alertService.success(this.locale.maketext("The team user\u2019s expire date has been cleared.")),this.resetExpireFields()},error:t=>{this.alertService.error(t.message)}})}expireSetForNewUser(t){this.router.url.includes(d.create)&&t&&this.window.mixpanel?.track("ManageTeam-Expire-ExpireDate-Set",{date:t})}setDateFormatAndPlaceholder(){this.localizedDateFormat=this.window.CLDR.datetime_info.date_format_short.replace(/[y]+/gi,"YYYY").replace(/[d]+/gi,"DD").replace(/[m]+/gi,"MM"),this.datePlaceholder=this.localizedDateFormat.replace(/[d]+/gi,"31").replace(/[m]+/gi,"01").replace(/[y]+/gi,((new Date).getFullYear()+1).toString())}resetExpireFields(){this.form.get("expireReason").patchValue(""),this.form.get("expireDate").patchValue(null),this.form.get("expireReason").enable(),this.form.get("expireDate").enable(),this.isExpired=!1}static#e=this.\u0275fac=function(o){return new(o||i)(e.rXU(g.h),e.rXU(P),e.rXU(r.uE),e.rXU(Window),e.rXU(b.Ix))};static#t=this.\u0275cmp=e.VBU({type:i,selectors:[["cp-team-manager-expire"]],inputs:{form:"form",actionVisible:"actionVisible"},decls:15,vars:16,consts:[["datepicker","bsDatepicker"],[3,"formGroup"],[1,"form-group"],["for","team-user__datepicker",3,"innerHtml"],[1,"input-group","expire__datepicker"],["type","text","id","team-user__expire","bsDatepicker","","formControlName","expireDate",1,"form-control",3,"bsValueChange","placeholder","bsConfig","minDate"],[1,"input-group-btn"],["id","searchField_submit_btn","type","button",1,"btn","btn-outline-secondary","expire__datepicker-button",3,"click","disabled"],["aria-hidden","true",1,"fas","fa-calendar"],["id","expire-date__validation-container",3,"control",4,"ngIf"],["for","team-user__expire-reason",3,"innerHtml"],[3,"ngClass"],["type","text","formControlName","expireReason","id","team-user__expire-reason",1,"form-control",3,"placeholder"],[4,"ngIf"],["id","expire-date__validation-container",3,"control"],["role","group",1,"form-group"],["type","button",1,"btn","btn-outline-primary","expire__main-action-button",3,"click","disabled"],["class","expire-team-user__action-icon fa-spin","name","refresh-line","size","ri-sm","mode","1","aria-hidden","true",4,"ngIf"],["name","refresh-line","size","ri-sm","mode","1","aria-hidden","true",1,"expire-team-user__action-icon","fa-spin"]],template:function(o,n){if(1&o){const a=e.RV6();e.qex(0,1),e.j41(1,"div",2),e.nrm(2,"label",3),e.j41(3,"div",4)(4,"input",5,0),e.bIt("bsValueChange",function(u){return e.eBV(a),e.Njj(n.expireSetForNewUser(u))}),e.k0s(),e.j41(6,"span",6)(7,"button",7),e.bIt("click",function(){e.eBV(a);const u=e.sdS(5);return e.Njj(u.toggle())}),e.nrm(8,"i",8),e.k0s()()(),e.DNE(9,lt,1,1,"cp-validation-container",9),e.k0s(),e.j41(10,"div",2),e.nrm(11,"label",10)(12,"div",11)(13,"input",12),e.k0s(),e.DNE(14,dt,2,1,"ng-container",13),e.bVm()}if(2&o){let a;e.Y8G("formGroup",n.form),e.R7$(2),e.Y8G("innerHtml",n.locale.maketext("Expire On (optional)"),e.npT),e.R7$(2),e.Y8G("placeholder",n.datePlaceholder)("bsConfig",e.eq3(12,st,n.localizedDateFormat))("minDate",n.datepickerMinDate),e.R7$(3),e.Y8G("disabled",n.isExpired),e.BMQ("aria-label",n.locale.maketext("Date-picker to select a date to expire the team user account.")),e.R7$(2),e.Y8G("ngIf",!(n.isExpired||null!=(a=n.form.get("expireDate").errors)&&a.bsDate)),e.R7$(2),e.Y8G("innerHtml",n.locale.maketext("Expire Reason (optional)"),e.npT),e.R7$(),e.Y8G("ngClass",e.eq3(14,rt,n.actionVisible)),e.R7$(),e.Y8G("placeholder",n.locale.maketext("e.g. Contract ends")),e.R7$(),e.Y8G("ngIf",n.actionVisible)}},dependencies:[m.YU,m.bT,l.me,l.BC,l.cb,l.j4,l.JD,A.pc,A.p0,r.kl],styles:[".expire__datepicker[_ngcontent-%COMP%]{width:11rem}.expire__datepicker-button[_ngcontent-%COMP%]{border:1px solid #ccc}.expire__button-group.show[_ngcontent-%COMP%]{display:flex!important}.expire__button-group[_ngcontent-%COMP%]{display:flex}.expire__main-action-button[_ngcontent-%COMP%]{display:flex;align-items:center}html[dir=ltr][_ngcontent-%COMP%]   .expire-team-user__action-icon[_ngcontent-%COMP%], [dir=ltr][_ngcontent-%COMP%]   .expire-team-user__action-icon[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%]   .expire-team-user__action-icon[_ngcontent-%COMP%], html[dir=ltr][_nghost-%COMP%]   .expire-team-user__action-icon[_ngcontent-%COMP%], html[dir=ltr]   [_nghost-%COMP%]   .expire-team-user__action-icon[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%]   .expire-team-user__action-icon[_ngcontent-%COMP%], [dir=ltr]   [_nghost-%COMP%]   .expire-team-user__action-icon[_ngcontent-%COMP%]{margin-right:var(--cp-spacer-1)}html[dir=rtl][_ngcontent-%COMP%]   .expire-team-user__action-icon[_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%]   .expire-team-user__action-icon[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%]   .expire-team-user__action-icon[_ngcontent-%COMP%], html[dir=rtl][_nghost-%COMP%]   .expire-team-user__action-icon[_ngcontent-%COMP%], html[dir=rtl]   [_nghost-%COMP%]   .expire-team-user__action-icon[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%]   .expire-team-user__action-icon[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .expire-team-user__action-icon[_ngcontent-%COMP%]{margin-left:var(--cp-spacer-1)}.expire__dropdown-button[_ngcontent-%COMP%], .expire__main-action-button[_ngcontent-%COMP%]{margin:0;z-index:2}"]})}return i})();const pt=(i,s)=>({"fa-chevron-down":i,"fa-chevron-right":s});let pe=(()=>{class i{static#e=this.\u0275fac=function(o){return new(o||i)};static#t=this.\u0275cmp=e.VBU({type:i,selectors:[["cp-team-manager-collapsible-section"]],inputs:{isOpen:"isOpen",srCollapse:"srCollapse",srExpand:"srExpand",title:"title"},decls:5,vars:7,consts:[["type","button",1,"btn","btn-sm","btn-link","collapsible-section__toggle"],[1,"sr-only",3,"innerHTML"],["aria-hidden","true",1,"fas","collapsible-section__icon",3,"ngClass"],[1,"base-team-user__section-title"]],template:function(o,n){1&o&&(e.j41(0,"button",0),e.nrm(1,"span",1)(2,"i",2),e.j41(3,"span",3),e.EFF(4),e.k0s()()),2&o&&(e.BMQ("aria-expanded",n.isOpen),e.R7$(),e.Y8G("innerHTML",n.isOpen?n.srCollapse:n.srExpand,e.npT),e.R7$(),e.Y8G("ngClass",e.l_i(4,pt,n.isOpen,!n.isOpen)),e.R7$(2),e.SpI(" ",n.title," "))},dependencies:[m.YU],styles:[".collapsible-section__toggle[_ngcontent-%COMP%]{text-decoration:none;color:#000;font-size:inherit}.collapsible-section__toggle[aria-expanded=true][_ngcontent-%COMP%]{margin-bottom:var(--cp-spacer-2)}.collapsible-section__icon[_ngcontent-%COMP%]{padding:var(--cp-spacer-2) var(--cp-spacer-1);width:24px;font-size:.875rem}"]})}return i})();const _t=["ngSelect"],ut=["showRoleFeaturesButton"],gt=["infoBlockChild"],ht=i=>({"fa-spin":i,"base-team-user__action-button-icon":!0});function ft(i,s){1&i&&e.eu8(0)}function bt(i,s){if(1&i&&e.nrm(0,"cp-validation-container",41),2&i){const t=e.XpG();e.Y8G("control",t.createTeamUserForm)}}function Ct(i,s){if(1&i&&e.nrm(0,"span",46),2&i){const t=s.$implicit;e.Y8G("title",t)("innerHtml",t,e.npT)}}function vt(i,s){if(1&i&&(e.j41(0,"div",44),e.DNE(1,Ct,1,2,"span",45),e.k0s()),2&i){const t=e.XpG().item;e.R7$(),e.Y8G("ngForOf",t.features)}}function Ot(i,s){if(1&i&&(e.nrm(0,"input",42),e.EFF(1),e.DNE(2,vt,2,1,"div",43)),2&i){const t=s.item,o=s.item$,n=e.XpG();e.Mz_("id","item-",t.title,""),e.Y8G("checked",o.selected),e.R7$(),e.SpI(" ",t.title," "),e.R7$(),e.Y8G("ngIf",n.showRoleFeatures)}}function kt(i,s){1&i&&e.eu8(0)}function Mt(i,s){if(1&i){const t=e.RV6();e.j41(0,"div",47)(1,"div",48),e.EFF(2),e.k0s(),e.j41(3,"div",49)(4,"button",50),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.toggleAllInfoBlocks())}),e.EFF(5),e.nrm(6,"i",28),e.k0s()(),e.nrm(7,"div",51),e.k0s()}if(2&i){const t=e.XpG();e.R7$(2),e.SpI(" ",t.locale.maketext("Create a Team User")," "),e.R7$(3),e.SpI(" ",t.locale.maketext("Show/Hide Help")," ")}}function Pt(i,s){if(1&i){const t=e.RV6();e.j41(0,"div",52)(1,"button",53),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.submitCreateUser())}),e.nrm(2,"cp-icon",54),e.EFF(3),e.k0s(),e.j41(4,"a",55),e.nrm(5,"i",56),e.EFF(6),e.k0s()()}if(2&i){const t=e.XpG();e.R7$(),e.Y8G("disabled",t.createUserLoading)("title",t.locale.maketext("Create the new team user account.")),e.R7$(),e.FS9("name",t.createUserLoading?"refresh-line":"add-fill"),e.Y8G("ngClass",e.eq3(8,ht,t.createUserLoading)),e.R7$(),e.SpI(" ",t.locale.maketext("Create")," "),e.R7$(),e.Y8G("routerLink","/"),e.R7$(),e.Y8G("ngClass",t.returnArrowDir),e.R7$(),e.SpI(" ",t.locale.maketext("Go Back")," ")}}let wt=(()=>{class i extends oe{constructor(t,o,n,a,c,u,w,$,j,Y){super(t,o,n,a),this.locale=t,this.renderer=o,this.showInfoBlocksService=n,this.teamOwnerDomain=a,this.mapApiService=c,this.apiService=u,this.alertService=w,this.formBuilder=$,this.router=j,this.window=Y,this.passwordOptionSetToEmail=!0,this.createUserLoading=!1;const Un={validators:h.mZ.equalTo(this.locale.maketext("The username cannot be the same as the password."),"username","password"),updateOn:"blur"};this.createTeamUserForm=this.formBuilder.group({username:[""],notes:[""],passwordOptions:["email",{updateOn:"change"}],password:[""],expireDate:[null],expireReason:[""],contactEmail:[""],roles:[[],{updateOn:"change"}],acknowledgment:[{value:!1,disabled:!0},{updateOn:"change"}]},Un),this.setUsernameValidators(this.createTeamUserForm),this.setNotesValidators(this.createTeamUserForm),this.setContactEmailValidators(this.createTeamUserForm),this.setPasswordOptionsValidators(this.createTeamUserForm),this.setAcknowledgmentValidators(this.createTeamUserForm)}ngAfterViewInit(){this.setShowFeaturesButtonPosition(this.ngSelect,this.showRoleFeaturesButton)}passwordOptionsChange(){this.passwordOptionSetToEmail="email"===this.createTeamUserForm.get("passwordOptions").value}submitCreateUser(){this.formSubmit.next(!0),this.createTeamUserForm.valid?(this.createUserLoading=!0,this.window.mixpanel?.track("ManageTeam-CreateTeamUser-SubmitCreate-Clicked",{teamUserUsername:this.createTeamUserForm.get("username").value}),this.apiService.createUser(this.createTeamUserForm.value).pipe((0,O.s)(1),(0,T.j)(()=>{this.createUserLoading=!1})).subscribe(()=>{this.alertService.success(`\n                        ${this.locale.maketext("New team user created.")}\n                        ${this.mapApiService.getExpireSuccessMessage(this.createTeamUserForm.get("username").value,this.createTeamUserForm.get("expireDate").value)}\n                    `),this.router.navigate([d.list])},t=>{const o=this.mapApiService.mapErrorIfDateExists(t);this.alertService.error(o)})):this.createTeamUserForm.markAllAsTouched()}securityAccordionExpanded(t){t&&this.window.mixpanel?.track("ManageTeam-CreateTeamUser-SecurityAccordion-Expanded")}setUsernameValidators(t){t.get("username").setValidators([h.ln.required(this.locale.maketext("You [output,strong,must] enter a username.")),h.ln.containsSpaces(this.locale.maketext("A username cannot contain spaces.")),h.ln.minLength(this.locale.maketext("A username must have between [numf,_1] and [numf,_2] characters.",1,16),1),h.ln.maxLength(this.locale.maketext("A username must have between [numf,_1] and [numf,_2] characters.",1,16),16),h.ln.startsWithLetter(this.locale.maketext("A username must start with a letter.")),h.D4.cpanelUsername()])}static#e=this.\u0275fac=function(o){return new(o||i)(e.rXU(g.h),e.rXU(e.sFG),e.rXU(U),e.rXU(E),e.rXU(S),e.rXU(P),e.rXU(r.uE),e.rXU(l.ze),e.rXU(b.Ix),e.rXU(Window))};static#t=this.\u0275cmp=e.VBU({type:i,selectors:[["cp-team-manager-create-team-user"]],viewQuery:function(o,n){if(1&o&&(e.GBs(_t,5),e.GBs(ut,5),e.GBs(gt,5)),2&o){let a;e.mGM(a=e.lsd())&&(n.ngSelect=a.first),e.mGM(a=e.lsd())&&(n.showRoleFeaturesButton=a.first),e.mGM(a=e.lsd())&&(n.infoBlockElements=a)}},features:[e.Vt3],decls:57,vars:52,consts:[["showRoleFeaturesButton",""],["ngSelect",""],["servicesAccordion",""],["securityAccordion",""],["panelHeading",""],["panelFooter",""],[1,"row","base-team-user__description"],[1,"col-sm-8","col-md-9",3,"innerHTML"],[1,"col-xs-12","col-sm-8","col-md-6","base-team-user__form-container"],["autocomplete","off",1,"form-layout-medium",3,"formGroup"],[1,"panel","panel-default"],[4,"ngTemplateOutlet"],[1,"team-user-form","panel-body"],["name","DummyUsername","type","text",2,"display","none"],["name","DummyPassword","type","password",2,"display","none"],["id","username","element","input","controlName","username",3,"control","labelText","formGroup","inputAddon"],[1,"form-group"],[1,"base-team-user__set-password-fieldset"],["id","fieldset-password",1,"base-team-user__fieldset-legend"],["type","radio","id","radio-password-email","formControlName","passwordOptions",3,"change","value"],["for","radio-password-email",1,"fieldset-password__radio-label"],["type","radio","id","radio-password-set","formControlName","passwordOptions",3,"change","value"],["for","radio-password-set",1,"fieldset-password__radio-label"],["formControlName","password",3,"hidden","id","passwordInputName","requiresStrengthValidation","requiredStrength","validateEmptyField","formSubmission"],["id","equality_validation-container",3,"control",4,"ngIf"],["id","email","element","input","controlName","contactEmail",3,"showAllHelp","control","infoBlockText","labelText","formGroup"],["for","roles__ng-select",3,"innerHtml"],["id","roles__show-info-button",1,"btn","btn-link","btn-xs","roles__show-info-button",3,"click"],[1,"far","fa-question-circle","form-info-sign"],["bindLabel","title","bindValue","id","labelForId","roles__ng-select","formControlName","roles",1,"roles__ng-select--custom",3,"change","items","closeOnSelect","multiple","clearAllText"],["ng-option-tmp",""],["id","roles_validation-container",3,"control"],[3,"form"],["id","notes","element","textarea","controlName","notes",3,"control","showAllHelp","infoBlockText","labelText","formGroup"],[1,"row"],[1,"base-team-user__accordion-group-panel"],["panelClass","custom-class",3,"isOpen"],["accordion-heading","",3,"isOpen","title","srCollapse","srExpand"],["panelClass","custom-class",3,"isOpenChange","isOpen"],[3,"actionVisible","form"],[1,"col-xs-12","col-sm-4","col-md-3"],["id","equality_validation-container",3,"control"],["type","checkbox",3,"id","checked"],["class","roles__features-container",4,"ngIf"],[1,"roles__features-container"],["class","role-feature",3,"title","innerHtml",4,"ngFor","ngForOf"],[1,"role-feature",3,"title","innerHtml"],[1,"panel-heading"],[1,"widget-title","pull-left","flip"],[1,"pull-right","flip"],["type","button","id","link-show-hide-help",1,"btn","btn-default","btn-xs",3,"click"],[1,"clearfix"],[1,"panel-footer","base-team-user__panel-footer"],["id","create-user","type","submit",1,"btn","btn-sm","btn-primary","base-team-user__action-button",3,"click","disabled","title"],["aria-hidden","true",3,"ngClass","name"],["id","go-back",1,"btn","btn-link","flip",3,"routerLink"],["aria-hidden","true",1,"fas",3,"ngClass"]],template:function(o,n){if(1&o){const a=e.RV6();e.j41(0,"div",6),e.nrm(1,"p",7),e.k0s(),e.j41(2,"div",8)(3,"form",9)(4,"div",10),e.DNE(5,ft,1,0,"ng-container",11),e.j41(6,"div",12),e.nrm(7,"input",13)(8,"input",14)(9,"cp-team-manager-team-user-form-field",15),e.j41(10,"div",16)(11,"fieldset",17)(12,"legend",18),e.EFF(13),e.k0s(),e.j41(14,"div")(15,"input",19),e.bIt("change",function(){return e.eBV(a),e.Njj(n.passwordOptionsChange())}),e.k0s(),e.j41(16,"label",20),e.EFF(17),e.k0s()(),e.j41(18,"div")(19,"input",21),e.bIt("change",function(){return e.eBV(a),e.Njj(n.passwordOptionsChange())}),e.k0s(),e.j41(20,"label",22),e.EFF(21),e.k0s()()(),e.nrm(22,"cp-password",23),e.DNE(23,bt,1,1,"cp-validation-container",24),e.k0s(),e.nrm(24,"cp-team-manager-team-user-form-field",25),e.j41(25,"div",16),e.nrm(26,"label",26),e.j41(27,"button",27,0),e.bIt("click",function(){e.eBV(a);const u=e.sdS(32);return e.Njj(n.toggleRoleFeatures(u,n.showRoleFeatures))}),e.EFF(29),e.nrm(30,"i",28),e.k0s(),e.j41(31,"ng-select",29,1),e.bIt("change",function(){return e.eBV(a),e.Njj(n.updateAcknowledgmentStatus(n.createTeamUserForm))}),e.DNE(33,Ot,3,5,"ng-template",30),e.k0s(),e.nrm(34,"cp-validation-container",31)(35,"cp-team-manager-acknowledgment-check",32),e.k0s(),e.nrm(36,"cp-team-manager-team-user-form-field",33),e.j41(37,"div",34)(38,"accordion",35)(39,"accordion-group",36,2),e.nrm(41,"cp-team-manager-collapsible-section",37)(42,"cp-team-manager-services-wrapper",32),e.k0s()()(),e.j41(43,"div",34)(44,"accordion",35)(45,"accordion-group",38,3),e.bIt("isOpenChange",function(){e.eBV(a);const u=e.sdS(46);return e.Njj(n.securityAccordionExpanded(u.isOpen))}),e.nrm(47,"cp-team-manager-collapsible-section",37)(48,"cp-team-manager-expire",39),e.k0s()()()(),e.DNE(49,kt,1,0,"ng-container",11),e.k0s()()(),e.j41(50,"div",40),e.nrm(51,"cp-team-manager-team-user-help-section")(52,"cp-team-manager-team-user-related-interfaces"),e.k0s(),e.DNE(53,Mt,8,2,"ng-template",null,4,e.C5r)(55,Pt,7,10,"ng-template",null,5,e.C5r)}if(2&o){const a=e.sdS(40),c=e.sdS(46),u=e.sdS(54),w=e.sdS(56);e.R7$(),e.Y8G("innerHTML",n.locale.maketext("Create a new team user for your team."),e.npT),e.R7$(2),e.Y8G("formGroup",n.createTeamUserForm),e.R7$(2),e.Y8G("ngTemplateOutlet",u),e.R7$(4),e.Y8G("control",n.createTeamUserForm.get("username"))("labelText",n.locale.maketext("Username"))("formGroup",n.createTeamUserForm)("inputAddon","@"+n.teamOwnerDomain),e.R7$(4),e.SpI(" ",n.locale.maketext("Password")," "),e.R7$(2),e.Y8G("value","email"),e.R7$(2),e.SpI(" ",n.locale.maketext("The user will set the account password.")," "),e.R7$(2),e.Y8G("value","set"),e.R7$(2),e.SpI(" ",n.locale.maketext("Set the user\u2019s password.")," "),e.R7$(),e.Y8G("hidden",n.passwordOptionSetToEmail)("id","field-cp-password")("passwordInputName","field-cp-password")("requiresStrengthValidation",!0)("requiredStrength","10")("validateEmptyField",!n.passwordOptionSetToEmail)("formSubmission",n.formSubmit),e.R7$(),e.Y8G("ngIf",n.createTeamUserForm.errors),e.R7$(),e.Y8G("showAllHelp",n.showInfoBlocksService.showAllHelp)("control",n.createTeamUserForm.get("contactEmail"))("infoBlockText",n.locale.maketext("The system sends account notifications and password reset confirmations to this email address."))("labelText",n.locale.maketext("Contact Email"))("formGroup",n.createTeamUserForm),e.R7$(2),e.Y8G("innerHtml",n.locale.maketext("Roles (optional)"),e.npT),e.R7$(3),e.SpI(" ",n.roleInfoButtonText," "),e.R7$(2),e.Y8G("items",n.roleList)("closeOnSelect",!1)("multiple",!0)("clearAllText",n.locale.maketext("Clear")),e.R7$(3),e.Y8G("control",n.createTeamUserForm.get("roles")),e.R7$(),e.Y8G("form",n.createTeamUserForm),e.R7$(),e.Y8G("control",n.createTeamUserForm.get("notes"))("showAllHelp",n.showInfoBlocksService.showAllHelp)("infoBlockText",n.locale.maketext("Notes you would like to remember about the team user."))("labelText",n.locale.maketext("Notes (optional)"))("formGroup",n.createTeamUserForm),e.R7$(3),e.Y8G("isOpen",!1),e.R7$(2),e.Y8G("isOpen",a.isOpen)("title",n.locale.maketext("Services"))("srCollapse",n.locale.maketext("Collapse services"))("srExpand",n.locale.maketext("Expand services")),e.R7$(),e.Y8G("form",n.createTeamUserForm),e.R7$(3),e.Y8G("isOpen",!1),e.R7$(2),e.Y8G("isOpen",c.isOpen)("title",n.locale.maketext("Security Settings"))("srCollapse",n.locale.maketext("Collapse security settings"))("srExpand",n.locale.maketext("Expand security settings")),e.R7$(),e.Y8G("actionVisible",!1)("form",n.createTeamUserForm),e.R7$(),e.Y8G("ngTemplateOutlet",w)}},dependencies:[m.YU,m.Sq,m.bT,m.T3,l.qT,l.me,l.Fm,l.BC,l.cb,l.j4,l.JD,F.Mj,F.kt,b.Wk,r.kl,R.vr,R.Uq,r.n8,ae,se,le,ce,me,de,pe],styles:[".base-team-user__section-title{font-size:1rem;margin-bottom:var(--cp-spacer-3);margin-top:var(--cp-spacer-4)}.base-team-user__section-title:first-of-type{margin-top:unset}.base-team-user__set-password-fieldset{display:flex;flex-direction:column;margin-bottom:var(--cp-spacer-2)}.fieldset-password__radio-label{font-weight:400}input[type=radio]:disabled+label{color:#b3bccf}html[dir=ltr] input[type=radio],[dir=ltr] input[type=radio],:host([dir=ltr]) input[type=radio],:host-context(html[dir=ltr]) input[type=radio],:host-context([dir=ltr]) input[type=radio]{margin-right:var(--cp-spacer-1)}html[dir=rtl] input[type=radio],[dir=rtl] input[type=radio],:host([dir=rtl]) input[type=radio],:host-context(html[dir=rtl]) input[type=radio],:host-context([dir=rtl]) input[type=radio]{margin-left:var(--cp-spacer-1)}.base-team-user__description{margin-bottom:var(--cp-spacer-3)}.base-team-user__form-container{padding:0}.roles__features-container{display:grid;grid-template-columns:repeat(auto-fill,180px);padding:var(--cp-spacer-2) 0}.role-feature{padding:var(--cp-spacer-1) 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.roles__ng-select--custom{position:relative}.roles__show-info-button{position:absolute;top:-25px}html[dir=ltr] .roles__show-info-button,[dir=ltr] .roles__show-info-button,:host([dir=ltr]) .roles__show-info-button,:host-context(html[dir=ltr]) .roles__show-info-button,:host-context([dir=ltr]) .roles__show-info-button{right:0}html[dir=rtl] .roles__show-info-button,[dir=rtl] .roles__show-info-button,:host([dir=rtl]) .roles__show-info-button,:host-context(html[dir=rtl]) .roles__show-info-button,:host-context([dir=rtl]) .roles__show-info-button{left:0}.base-team-user__fieldset-legend{display:inline-block;font-size:unset;border:none;font-weight:600;margin:0 0 var(--cp-spacer-1)}.row-expand-container{display:inline}.base-team-user__panel-footer{display:flex;justify-content:space-between}.base-team-user__action-button{display:flex;align-items:center}.base-team-user__action-button-icon{align-self:normal}html[dir=ltr] .base-team-user__action-button-icon,[dir=ltr] .base-team-user__action-button-icon,:host([dir=ltr]) .base-team-user__action-button-icon,:host-context(html[dir=ltr]) .base-team-user__action-button-icon,:host-context([dir=ltr]) .base-team-user__action-button-icon{margin-right:var(--cp-spacer-1)}html[dir=rtl] .base-team-user__action-button-icon,[dir=rtl] .base-team-user__action-button-icon,:host([dir=rtl]) .base-team-user__action-button-icon,:host-context(html[dir=rtl]) .base-team-user__action-button-icon,:host-context([dir=rtl]) .base-team-user__action-button-icon{margin-left:var(--cp-spacer-1)}.base-team-user__accordion-group-panel{margin-bottom:0}\n"],encapsulation:2})}return i})();const Tt=["ngSelect"],St=["showRoleFeaturesButton"],xt=["infoBlockChild"],yt=i=>({"fa-spin":i,"base-team-user__action-button-icon":!0});function Rt(i,s){1&i&&e.eu8(0)}function Ft(i,s){if(1&i&&e.nrm(0,"cp-validation-container",36),2&i){const t=e.XpG();e.Y8G("control",t.editTeamUserForm)}}function Et(i,s){1&i&&e.nrm(0,"cp-icon",37)}function Gt(i,s){if(1&i&&e.nrm(0,"span",42),2&i){const t=s.$implicit;e.Y8G("title",t)("innerHtml",t,e.npT)}}function Ut(i,s){if(1&i&&(e.j41(0,"div",40),e.DNE(1,Gt,1,2,"span",41),e.k0s()),2&i){const t=e.XpG().item;e.R7$(),e.Y8G("ngForOf",t.features)}}function $t(i,s){if(1&i&&(e.nrm(0,"input",38),e.EFF(1),e.DNE(2,Ut,2,1,"div",39)),2&i){const t=s.item,o=s.item$,n=e.XpG();e.Mz_("id","item-",t.title,""),e.Y8G("checked",o.selected),e.R7$(),e.SpI(" ",t.title," "),e.R7$(),e.Y8G("ngIf",n.showRoleFeatures)}}function jt(i,s){1&i&&e.eu8(0)}function It(i,s){if(1&i){const t=e.RV6();e.j41(0,"div",43)(1,"div",44),e.EFF(2),e.k0s(),e.j41(3,"div",45)(4,"button",46),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.toggleAllInfoBlocks())}),e.EFF(5),e.nrm(6,"i",25),e.k0s()(),e.nrm(7,"div",47),e.k0s()}if(2&i){const t=e.XpG();e.R7$(2),e.SpI(" ",t.locale.maketext("Edit a Team User")," "),e.R7$(3),e.SpI(" ",t.locale.maketext("Show/Hide Help")," ")}}function At(i,s){if(1&i){const t=e.RV6();e.j41(0,"div",48)(1,"button",49),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.submitEditUser())}),e.nrm(2,"cp-icon",50),e.EFF(3),e.k0s(),e.j41(4,"a",51),e.nrm(5,"i",52),e.EFF(6),e.k0s()()}if(2&i){const t=e.XpG();e.R7$(),e.Y8G("disabled",t.editUserLoading)("title",t.locale.maketext("Update the team user account.")),e.R7$(),e.FS9("name",t.editUserLoading?"refresh-line":"add-fill"),e.Y8G("ngClass",e.eq3(8,yt,t.editUserLoading)),e.R7$(),e.SpI(" ",t.locale.maketext("Save")," "),e.R7$(),e.Y8G("routerLink","/"),e.R7$(),e.Y8G("ngClass",t.returnArrowDir),e.R7$(),e.SpI(" ",t.locale.maketext("Go Back")," ")}}let Dt=(()=>{class i extends oe{constructor(t,o,n,a,c,u,w,$,j,Y){super(t,o,n,a),this.locale=t,this.renderer=o,this.showInfoBlocksService=n,this.teamOwnerDomain=a,this.mapApiService=c,this.apiService=u,this.alertService=w,this.formBuilder=$,this.router=j,this.activatedRoute=Y,this.editUserLoading=!1,this.resetPasswordLoading=!1,this.editUserInit(),this.setNotesValidators(this.editTeamUserForm),this.setContactEmailValidators(this.editTeamUserForm),this.setAcknowledgmentValidators(this.editTeamUserForm)}ngAfterViewInit(){this.setShowFeaturesButtonPosition(this.ngSelect,this.showRoleFeaturesButton)}getMappedRoles(){return this.teamUser.roles?this.teamUser.roles.split(", ").map(t=>this.roleList.find(o=>o.title===t).id):[]}submitEditUser(){this.formSubmit.next(!0),this.editTeamUserForm.valid?(this.editUserLoading=!0,this.apiService.editUser({...this.editTeamUserForm.value,username:this.editTeamUserForm.get("username").value}).pipe((0,O.s)(1),(0,T.j)(()=>{this.editUserLoading=!1})).subscribe(()=>{this.alertService.success(`\n                    ${this.locale.maketext("You have successfully edited the settings for team user \u201c[_1]\u201d.",this.username)}\n                    ${this.mapApiService.getExpireSuccessMessage(this.editTeamUserForm.get("username").value,this.editTeamUserForm.get("expireDate").disabled?void 0:this.editTeamUserForm.get("expireDate").value)}\n                `),this.router.navigate([d.list])},t=>{const o=this.mapApiService.mapErrorIfDateExists(t);this.alertService.error(o)})):this.editTeamUserForm.markAllAsTouched()}resetPassword(){this.resetPasswordLoading=!0,this.apiService.passwordReset(this.username).pipe((0,O.s)(1),(0,T.j)(()=>{this.resetPasswordLoading=!1})).subscribe(()=>{this.alertService.success(this.locale.maketext("A password reset email was sent to \u201c[_1]\u201d.",this.teamUser.contactEmail))},t=>{this.alertService.error(t.message)})}editUserInit(){const t=JSON.parse(localStorage.getItem("teamData"));this.username=this.activatedRoute.snapshot.paramMap.get("id"),this.teamUser=t.find(n=>n.username===this.username);const o={validators:h.mZ.equalTo(this.locale.maketext("The username cannot be the same as the password."),"username","password"),updateOn:"blur"};this.editTeamUserForm=this.formBuilder.group({username:[{value:this.teamUser.username,disabled:!0}],notes:[this.teamUser.notes||""],password:[""],expireDate:[{value:this.teamUser.expireDate||null,disabled:this.teamUser.expireDate},{updateOn:"change"}],expireReason:[{value:this.teamUser.expireReason||"",disabled:this.teamUser.expireDate}],contactEmail:[this.teamUser.contactEmail],roles:[this.getMappedRoles(),{updateOn:"change"}],acknowledgment:[{value:!1,disabled:!0},{updateOn:"change"}]},o),this.initialRoles=this.editTeamUserForm.get("roles").value}static#e=this.\u0275fac=function(o){return new(o||i)(e.rXU(g.h),e.rXU(e.sFG),e.rXU(U),e.rXU(E),e.rXU(S),e.rXU(P),e.rXU(r.uE),e.rXU(l.ze),e.rXU(b.Ix),e.rXU(b.nX))};static#t=this.\u0275cmp=e.VBU({type:i,selectors:[["cp-team-manager-edit-team-user"]],viewQuery:function(o,n){if(1&o&&(e.GBs(Tt,5),e.GBs(St,5),e.GBs(xt,5)),2&o){let a;e.mGM(a=e.lsd())&&(n.ngSelect=a.first),e.mGM(a=e.lsd())&&(n.showRoleFeaturesButton=a.first),e.mGM(a=e.lsd())&&(n.infoBlockElements=a)}},features:[e.Vt3],decls:53,vars:51,consts:[["showRoleFeaturesButton",""],["ngSelect",""],["servicesAccordion",""],["securityAccordion",""],["panelHeading",""],["panelFooter",""],[1,"row","base-team-user__description"],[1,"col-sm-8","col-md-9",3,"innerHTML"],[1,"col-xs-12","col-sm-8","col-md-6","base-team-user__form-container"],["autocomplete","off",1,"form-layout-medium",3,"formGroup"],[1,"panel","panel-default"],[4,"ngTemplateOutlet"],[1,"team-user-form","panel-body"],["id","username","element","input","controlName","username",3,"control","labelText","formGroup","inputAddon"],[1,"form-group"],[1,"base-team-user__set-password-fieldset"],["id","fieldset-password",1,"base-team-user__fieldset-legend",3,"innerHtml"],["formControlName","password",3,"id","passwordInputName","requiresStrengthValidation","validateEmptyField","placeholder","requiredStrength","formSubmission"],["id","equality_validation-container",3,"control",4,"ngIf"],[3,"innerHtml"],["id","edit-team-user__reset-password",1,"btn","btn-outline-primary","base-team-user__action-button",3,"click","disabled"],["class","base-team-user__action-button-icon fa-spin","name","refresh-line","aria-hidden","true",4,"ngIf"],["id","email","element","input","controlName","contactEmail",3,"showAllHelp","control","infoBlockText","labelText","formGroup"],["for","roles__ng-select",3,"innerHtml"],["id","roles__show-info-button",1,"btn","btn-link","btn-xs","roles__show-info-button",3,"click"],[1,"far","fa-question-circle","form-info-sign"],["bindLabel","title","bindValue","id","labelForId","roles__ng-select","formControlName","roles",1,"roles__ng-select--custom",3,"change","items","closeOnSelect","multiple","clearAllText"],["ng-option-tmp",""],["id","roles_validation-container",3,"control"],[3,"form"],["id","notes","element","textarea","controlName","notes",3,"showAllHelp","control","infoBlockText","labelText","formGroup"],[1,"row"],[1,"base-team-user__accordion-group-panel"],["panelClass","custom-class",3,"isOpen"],["accordion-heading","",3,"isOpen","title","srCollapse","srExpand"],[1,"col-xs-12","col-sm-4","col-md-3"],["id","equality_validation-container",3,"control"],["name","refresh-line","aria-hidden","true",1,"base-team-user__action-button-icon","fa-spin"],["type","checkbox",3,"id","checked"],["class","roles__features-container",4,"ngIf"],[1,"roles__features-container"],["class","role-feature",3,"title","innerHtml",4,"ngFor","ngForOf"],[1,"role-feature",3,"title","innerHtml"],[1,"panel-heading"],[1,"widget-title","pull-left","flip"],[1,"pull-right","flip"],["type","button","id","link-show-hide-help",1,"btn","btn-default","btn-xs",3,"click"],[1,"clearfix"],[1,"panel-footer","base-team-user__panel-footer"],["id","edit-user","type","submit",1,"btn","btn-sm","btn-primary","base-team-user__action-button",3,"click","disabled","title"],["aria-hidden","true",3,"ngClass","name"],["id","go-back",1,"btn","btn-link","flip",3,"routerLink"],["aria-hidden","true",1,"fas",3,"ngClass"]],template:function(o,n){if(1&o){const a=e.RV6();e.j41(0,"div",6),e.nrm(1,"p",7),e.k0s(),e.j41(2,"div",8)(3,"form",9)(4,"div",10),e.DNE(5,Rt,1,0,"ng-container",11),e.j41(6,"div",12),e.nrm(7,"cp-team-manager-team-user-form-field",13),e.j41(8,"div",14)(9,"fieldset",15),e.nrm(10,"legend",16),e.k0s(),e.nrm(11,"cp-password",17),e.DNE(12,Ft,1,1,"cp-validation-container",18),e.k0s(),e.j41(13,"div",14),e.nrm(14,"label",19),e.j41(15,"div")(16,"button",20),e.bIt("click",function(){return e.eBV(a),e.Njj(n.resetPassword())}),e.DNE(17,Et,1,0,"cp-icon",21),e.j41(18,"span"),e.EFF(19),e.k0s()()()(),e.nrm(20,"cp-team-manager-team-user-form-field",22),e.j41(21,"div",14),e.nrm(22,"label",23),e.j41(23,"button",24,0),e.bIt("click",function(){e.eBV(a);const u=e.sdS(28);return e.Njj(n.toggleRoleFeatures(u,n.showRoleFeatures))}),e.EFF(25),e.nrm(26,"i",25),e.k0s(),e.j41(27,"ng-select",26,1),e.bIt("change",function(){return e.eBV(a),e.Njj(n.updateAcknowledgmentStatus(n.editTeamUserForm,n.initialRoles))}),e.DNE(29,$t,3,5,"ng-template",27),e.k0s(),e.nrm(30,"cp-validation-container",28)(31,"cp-team-manager-acknowledgment-check",29),e.k0s(),e.nrm(32,"cp-team-manager-team-user-form-field",30),e.j41(33,"div",31)(34,"accordion",32)(35,"accordion-group",33,2),e.nrm(37,"cp-team-manager-collapsible-section",34)(38,"cp-team-manager-services-wrapper",29),e.k0s()()(),e.j41(39,"div",31)(40,"accordion",32)(41,"accordion-group",33,3),e.nrm(43,"cp-team-manager-collapsible-section",34)(44,"cp-team-manager-expire",29),e.k0s()()()(),e.DNE(45,jt,1,0,"ng-container",11),e.k0s()()(),e.j41(46,"div",35),e.nrm(47,"cp-team-manager-team-user-help-section")(48,"cp-team-manager-team-user-related-interfaces"),e.k0s(),e.DNE(49,It,8,2,"ng-template",null,4,e.C5r)(51,At,7,10,"ng-template",null,5,e.C5r)}if(2&o){const a=e.sdS(36),c=e.sdS(42),u=e.sdS(50),w=e.sdS(52);e.R7$(),e.Y8G("innerHTML",n.locale.maketext("Edit user \u201c[_1]\u201d.",n.teamUser.username),e.npT),e.R7$(2),e.Y8G("formGroup",n.editTeamUserForm),e.R7$(2),e.Y8G("ngTemplateOutlet",u),e.R7$(2),e.Y8G("control",n.username)("labelText",n.locale.maketext("Username"))("formGroup",n.editTeamUserForm)("inputAddon","@"+n.teamOwnerDomain),e.R7$(3),e.Y8G("innerHtml",n.locale.maketext("New Password (optional)"),e.npT),e.R7$(),e.Y8G("id","field-cp-password")("passwordInputName","field-cp-password")("requiresStrengthValidation",!0)("validateEmptyField",!1)("placeholder",n.locale.maketext("Enter a new password"))("requiredStrength","10")("formSubmission",n.formSubmit),e.R7$(),e.Y8G("ngIf",n.editTeamUserForm.errors),e.R7$(2),e.Y8G("innerHtml",n.locale.maketext("Reset Password (optional)"),e.npT),e.R7$(2),e.Y8G("disabled",n.resetPasswordLoading),e.R7$(),e.Y8G("ngIf",n.resetPasswordLoading),e.R7$(2),e.JRh(n.locale.maketext("Send A Password Reset Email")),e.R7$(),e.Y8G("showAllHelp",n.showInfoBlocksService.showAllHelp)("control",n.editTeamUserForm.get("contactEmail"))("infoBlockText",n.locale.maketext("The system sends account notifications and password reset confirmations to this email address."))("labelText",n.locale.maketext("Contact Email"))("formGroup",n.editTeamUserForm),e.R7$(2),e.Y8G("innerHtml",n.locale.maketext("Roles (optional)"),e.npT),e.R7$(3),e.SpI(" ",n.roleInfoButtonText," "),e.R7$(2),e.Y8G("items",n.roleList)("closeOnSelect",!1)("multiple",!0)("clearAllText",n.locale.maketext("Clear")),e.R7$(3),e.Y8G("control",n.editTeamUserForm.get("roles")),e.R7$(),e.Y8G("form",n.editTeamUserForm),e.R7$(),e.Y8G("showAllHelp",n.showInfoBlocksService.showAllHelp)("control",n.editTeamUserForm.get("notes"))("infoBlockText",n.locale.maketext("Notes you would like to remember about the team user."))("labelText",n.locale.maketext("Notes (optional)"))("formGroup",n.editTeamUserForm),e.R7$(3),e.Y8G("isOpen",!0),e.R7$(2),e.Y8G("isOpen",a.isOpen)("title",n.locale.maketext("Services"))("srCollapse",n.locale.maketext("Collapse services"))("srExpand",n.locale.maketext("Expand services")),e.R7$(),e.Y8G("form",n.editTeamUserForm),e.R7$(3),e.Y8G("isOpen",!0),e.R7$(2),e.Y8G("isOpen",c.isOpen)("title",n.locale.maketext("Security Settings"))("srCollapse",n.locale.maketext("Collapse security settings"))("srExpand",n.locale.maketext("Expand security settings")),e.R7$(),e.Y8G("form",n.editTeamUserForm),e.R7$(),e.Y8G("ngTemplateOutlet",w)}},dependencies:[m.YU,m.Sq,m.bT,m.T3,l.qT,l.BC,l.cb,l.j4,l.JD,F.Mj,F.kt,b.Wk,r.kl,R.vr,R.Uq,r.n8,ae,se,le,ce,me,de,pe],styles:[".base-team-user__section-title[_ngcontent-%COMP%]{font-size:1rem;margin-bottom:var(--cp-spacer-3);margin-top:var(--cp-spacer-4)}.base-team-user__section-title[_ngcontent-%COMP%]:first-of-type{margin-top:unset}.base-team-user__set-password-fieldset[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-bottom:var(--cp-spacer-2)}.fieldset-password__radio-label[_ngcontent-%COMP%]{font-weight:400}input[type=radio][_ngcontent-%COMP%]:disabled + label[_ngcontent-%COMP%]{color:#b3bccf}html[dir=ltr][_ngcontent-%COMP%]   input[type=radio][_ngcontent-%COMP%], [dir=ltr][_ngcontent-%COMP%]   input[type=radio][_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%]   input[type=radio][_ngcontent-%COMP%], html[dir=ltr][_nghost-%COMP%]   input[type=radio][_ngcontent-%COMP%], html[dir=ltr]   [_nghost-%COMP%]   input[type=radio][_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%]   input[type=radio][_ngcontent-%COMP%], [dir=ltr]   [_nghost-%COMP%]   input[type=radio][_ngcontent-%COMP%]{margin-right:var(--cp-spacer-1)}html[dir=rtl][_ngcontent-%COMP%]   input[type=radio][_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%]   input[type=radio][_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%]   input[type=radio][_ngcontent-%COMP%], html[dir=rtl][_nghost-%COMP%]   input[type=radio][_ngcontent-%COMP%], html[dir=rtl]   [_nghost-%COMP%]   input[type=radio][_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%]   input[type=radio][_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   input[type=radio][_ngcontent-%COMP%]{margin-left:var(--cp-spacer-1)}.base-team-user__description[_ngcontent-%COMP%]{margin-bottom:var(--cp-spacer-3)}.base-team-user__form-container[_ngcontent-%COMP%]{padding:0}.roles__features-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,180px);padding:var(--cp-spacer-2) 0}.role-feature[_ngcontent-%COMP%]{padding:var(--cp-spacer-1) 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.roles__ng-select--custom[_ngcontent-%COMP%]{position:relative}.roles__show-info-button[_ngcontent-%COMP%]{position:absolute;top:-25px}html[dir=ltr][_ngcontent-%COMP%]   .roles__show-info-button[_ngcontent-%COMP%], [dir=ltr][_ngcontent-%COMP%]   .roles__show-info-button[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%]   .roles__show-info-button[_ngcontent-%COMP%], html[dir=ltr][_nghost-%COMP%]   .roles__show-info-button[_ngcontent-%COMP%], html[dir=ltr]   [_nghost-%COMP%]   .roles__show-info-button[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%]   .roles__show-info-button[_ngcontent-%COMP%], [dir=ltr]   [_nghost-%COMP%]   .roles__show-info-button[_ngcontent-%COMP%]{right:0}html[dir=rtl][_ngcontent-%COMP%]   .roles__show-info-button[_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%]   .roles__show-info-button[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%]   .roles__show-info-button[_ngcontent-%COMP%], html[dir=rtl][_nghost-%COMP%]   .roles__show-info-button[_ngcontent-%COMP%], html[dir=rtl]   [_nghost-%COMP%]   .roles__show-info-button[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%]   .roles__show-info-button[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .roles__show-info-button[_ngcontent-%COMP%]{left:0}.base-team-user__fieldset-legend[_ngcontent-%COMP%]{display:inline-block;font-size:unset;border:none;font-weight:600;margin:0 0 var(--cp-spacer-1)}.row-expand-container[_ngcontent-%COMP%]{display:inline}.base-team-user__panel-footer[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.base-team-user__action-button[_ngcontent-%COMP%]{display:flex;align-items:center}.base-team-user__action-button-icon[_ngcontent-%COMP%]{align-self:normal}html[dir=ltr][_ngcontent-%COMP%]   .base-team-user__action-button-icon[_ngcontent-%COMP%], [dir=ltr][_ngcontent-%COMP%]   .base-team-user__action-button-icon[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%]   .base-team-user__action-button-icon[_ngcontent-%COMP%], html[dir=ltr][_nghost-%COMP%]   .base-team-user__action-button-icon[_ngcontent-%COMP%], html[dir=ltr]   [_nghost-%COMP%]   .base-team-user__action-button-icon[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%]   .base-team-user__action-button-icon[_ngcontent-%COMP%], [dir=ltr]   [_nghost-%COMP%]   .base-team-user__action-button-icon[_ngcontent-%COMP%]{margin-right:var(--cp-spacer-1)}html[dir=rtl][_ngcontent-%COMP%]   .base-team-user__action-button-icon[_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%]   .base-team-user__action-button-icon[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%]   .base-team-user__action-button-icon[_ngcontent-%COMP%], html[dir=rtl][_nghost-%COMP%]   .base-team-user__action-button-icon[_ngcontent-%COMP%], html[dir=rtl]   [_nghost-%COMP%]   .base-team-user__action-button-icon[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%]   .base-team-user__action-button-icon[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .base-team-user__action-button-icon[_ngcontent-%COMP%]{margin-left:var(--cp-spacer-1)}.base-team-user__accordion-group-panel[_ngcontent-%COMP%]{margin-bottom:0}"]})}return i})();var Bt=p(8141),Vt=p(6977),Nt=p(5558);let _e=(()=>{class i{constructor(t){this.locale=t}getListTeamTableHeaders(){return[{key:"username",label:this.locale.maketext("Username"),sortable:!0},{key:"roles",label:this.locale.maketext("Roles"),sortable:!0,classes:"hidden-xs"},{key:"lastLoginDate",label:this.locale.maketext("Last Login Date"),sortable:!0,classes:"hidden-xs hidden-sm hidden-md"},{key:"services",label:this.locale.maketext("Services"),sortable:!0,classes:"hidden-xs"},{key:"actions",label:this.locale.maketext("Actions"),sortable:!1}]}static#e=this.\u0275fac=function(o){return new(o||i)(e.KVO(g.h))};static#t=this.\u0275prov=e.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var N=function(i){return i.warning="warning",i}(N||{});const Yt=i=>({warning:i});let Lt=(()=>{class i{constructor(){this.badgeColor=N}static#e=this.\u0275fac=function(o){return new(o||i)};static#t=this.\u0275cmp=e.VBU({type:i,selectors:[["cp-team-manager-badge"]],inputs:{color:"color",content:"content"},decls:2,vars:4,consts:[[1,"c-pill",3,"ngClass"]],template:function(o,n){1&o&&(e.j41(0,"span",0),e.EFF(1),e.k0s()),2&o&&(e.Y8G("ngClass",e.eq3(2,Yt,n.color===n.badgeColor.warning)),e.R7$(),e.JRh(n.content))},dependencies:[m.YU],styles:[".c-pill[_ngcontent-%COMP%]{font-size:.875rem;display:block;white-space:nowrap;width:auto;position:relative;border-radius:.25rem;overflow:hidden;padding:0 var(--cp-spacer-2);text-overflow:ellipsis;line-height:1.25rem;color:#fff;word-break:break-word}.warning[_ngcontent-%COMP%]{background:#e0a800}"]})}return i})(),Xt=(()=>{class i{constructor(t,o,n,a){this.locale=t,this.alertService=o,this.teamManagerApiService=n,this.window=a,this.deleteSuccess=new e.bkB,this.deleteButtonState=r.kj.enabled}deleteUser(){this.deleteButtonState=r.kj.loading,this.window.mixpanel?.track("ManageTeam-DeletePanel-DeleteUser-Clicked"),this.teamManagerApiService.deleteUser(this.teamUser.username).pipe((0,O.s)(1),(0,T.j)(()=>{this.deleteButtonState=r.kj.enabled})).subscribe({next:()=>{this.teamUser.detailsVisible=!1,this.teamUser.showDeletePrompt=!1,this.alertService.success(this.locale.maketext("Team user account \u201c[_1]\u201d deleted.",this.teamUser.username)),this.deleteSuccess.emit()},error:t=>{this.alertService.error(t.message)}})}static#e=this.\u0275fac=function(o){return new(o||i)(e.rXU(g.h),e.rXU(r.uE),e.rXU(P),e.rXU(Window))};static#t=this.\u0275cmp=e.VBU({type:i,selectors:[["cp-team-manager-delete-panel"]],inputs:{teamUser:"teamUser"},outputs:{deleteSuccess:"deleteSuccess"},decls:16,vars:12,consts:[[1,"list-panel"],[1,"delete-warning"],[1,"display-table"],[1,"display-table-cell"],[1,"delete-question-mark"],[1,"box"],[1,"delete-message","wordbreak",3,"innerHtml"],["id","delete-message-description",3,"innerHtml"],[3,"click","buttonState","buttonClass","id","title"],["aria-hidden","true",1,"fas","fa-trash"],["type","button",1,"btn","btn-link","btn-sm",3,"click","id","disabled"]],template:function(o,n){1&o&&(e.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"span",4),e.EFF(5,"?"),e.k0s()(),e.j41(6,"div",3)(7,"div",5),e.nrm(8,"span",6)(9,"p",7),e.k0s(),e.j41(10,"div",5)(11,"cp-action-button",8),e.bIt("click",function(){return n.deleteUser()}),e.nrm(12,"i",9),e.EFF(13),e.k0s(),e.j41(14,"button",10),e.bIt("click",function(){return n.teamUser.showDeletePrompt=!1}),e.EFF(15),e.k0s()()()()()()),2&o&&(e.R7$(8),e.Y8G("innerHtml",n.locale.maketext("Are you sure about deleting \u201c[_1]\u201d?",n.teamUser.username),e.npT),e.R7$(),e.Y8G("innerHtml",n.locale.maketext("When you delete a team user account, we permanently delete [output,strong,all] of the account\u2019s data."),e.npT),e.R7$(2),e.Mz_("id","delete-team-user__btn-confirm--",n.teamUser.username,""),e.FS9("title",n.locale.maketext("Delete")),e.Y8G("buttonState",n.deleteButtonState)("buttonClass","btn-primary btn-sm"),e.R7$(2),e.SpI(" ",n.locale.maketext("Delete")," "),e.R7$(),e.Mz_("id","delete-team-user__btn-cancel--",n.teamUser.username,""),e.Y8G("disabled",n.teamUser.deleteInProcess),e.R7$(),e.SpI(" ",n.locale.maketext("Cancel")," "))},dependencies:[r.C7],styles:["html[dir=ltr][_ngcontent-%COMP%]   .list-panel[_ngcontent-%COMP%], [dir=ltr][_ngcontent-%COMP%]   .list-panel[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%]   .list-panel[_ngcontent-%COMP%], html[dir=ltr][_nghost-%COMP%]   .list-panel[_ngcontent-%COMP%], html[dir=ltr]   [_nghost-%COMP%]   .list-panel[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%]   .list-panel[_ngcontent-%COMP%], [dir=ltr]   [_nghost-%COMP%]   .list-panel[_ngcontent-%COMP%]{padding-left:0}html[dir=rtl][_ngcontent-%COMP%]   .list-panel[_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%]   .list-panel[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%]   .list-panel[_ngcontent-%COMP%], html[dir=rtl][_nghost-%COMP%]   .list-panel[_ngcontent-%COMP%], html[dir=rtl]   [_nghost-%COMP%]   .list-panel[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%]   .list-panel[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .list-panel[_ngcontent-%COMP%]{padding-right:0}"]})}return i})();const zt=(i,s)=>({"btn btn-sm btn-outline-primary":!0,"hidden-xs hidden-sm":i,"hidden-md hidden-lg":s});function Ht(i,s){1&i&&e.nrm(0,"cp-icon",3)}function qt(i,s){if(1&i&&e.nrm(0,"cp-icon",4),2&i){const t=e.XpG();e.Y8G("name",t.teamUser.suspended?"lock-unlock-fill":"lock-fill")}}let Qt=(()=>{class i{constructor(t,o,n,a){this.teamManagerApiService=t,this.alertService=o,this.window=n,this.locale=a,this.suspendStatusChangeSuccess=new e.bkB,this.suspendButtonState=r.kj.enabled,this.actionButtonState=r.kj}suspendUser(t){this.suspendButtonState=r.kj.loading,this.window.mixpanel?.track("ManageTeam-SuspendTeamUser-Suspend-Clicked"),this.teamManagerApiService.suspendUser(t.username).pipe((0,O.s)(1),(0,T.j)(()=>{this.suspendButtonState=r.kj.enabled})).subscribe({next:()=>{this.alertService.success(this.locale.maketext("Team User \u201c[_1]\u201d is now suspended.",t.username)),this.suspendStatusChangeSuccess.emit()},error:o=>{this.alertService.error(o.message)}})}unsuspendUser(t){this.suspendButtonState=r.kj.loading,this.window.mixpanel?.track("ManageTeam-UnsuspendTeamUser-Suspend-Clicked"),this.teamManagerApiService.reinstateUser(t.username).pipe((0,O.s)(1),(0,T.j)(()=>{this.suspendButtonState=r.kj.enabled})).subscribe({next:()=>{this.alertService.success(this.locale.maketext("Team User \u201c[_1]\u201d is no longer suspended.",t.username)),this.suspendStatusChangeSuccess.emit()},error:o=>{this.alertService.error(o.message)}})}static#e=this.\u0275fac=function(o){return new(o||i)(e.rXU(P),e.rXU(r.uE),e.rXU(Window),e.rXU(g.h))};static#t=this.\u0275cmp=e.VBU({type:i,selectors:[["cp-team-manager-suspend-team-user"]],inputs:{teamUser:"teamUser",isDetailedView:"isDetailedView"},outputs:{suspendStatusChangeSuccess:"suspendStatusChangeSuccess"},decls:5,vars:10,consts:[[3,"click","id","ngClass","disabled"],["class","suspend-team-user__action-icon fa-spin","name","refresh-line","aria-hidden","true",4,"ngIf"],["class","suspend-team-user__action-icon","aria-hidden","true",3,"name",4,"ngIf"],["name","refresh-line","aria-hidden","true",1,"suspend-team-user__action-icon","fa-spin"],["aria-hidden","true",1,"suspend-team-user__action-icon",3,"name"]],template:function(o,n){1&o&&(e.j41(0,"button",0),e.bIt("click",function(){return n.teamUser.suspended?n.unsuspendUser(n.teamUser):n.suspendUser(n.teamUser)}),e.DNE(1,Ht,1,0,"cp-icon",1)(2,qt,1,1,"cp-icon",2),e.j41(3,"span"),e.EFF(4),e.k0s()()),2&o&&(e.Mz_("id","suspend-team-user__button--",n.teamUser.username,""),e.Y8G("ngClass",e.l_i(7,zt,!n.isDetailedView,n.isDetailedView))("disabled",n.suspendButtonState===n.actionButtonState.loading),e.R7$(),e.Y8G("ngIf",n.suspendButtonState===n.actionButtonState.loading),e.R7$(),e.Y8G("ngIf",n.suspendButtonState!==n.actionButtonState.loading),e.R7$(2),e.JRh(n.locale.maketext(n.teamUser.suspended?"Unsuspend":"Suspend")))},dependencies:[m.YU,m.bT],styles:[".suspend-team-user__action-icon[_ngcontent-%COMP%]{padding:0}html[dir=ltr][_ngcontent-%COMP%]   .suspend-team-user__action-icon[_ngcontent-%COMP%], [dir=ltr][_ngcontent-%COMP%]   .suspend-team-user__action-icon[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%]   .suspend-team-user__action-icon[_ngcontent-%COMP%], html[dir=ltr][_nghost-%COMP%]   .suspend-team-user__action-icon[_ngcontent-%COMP%], html[dir=ltr]   [_nghost-%COMP%]   .suspend-team-user__action-icon[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%]   .suspend-team-user__action-icon[_ngcontent-%COMP%], [dir=ltr]   [_nghost-%COMP%]   .suspend-team-user__action-icon[_ngcontent-%COMP%]{margin:0 var(--cp-spacer-1) 0 0}html[dir=rtl][_ngcontent-%COMP%]   .suspend-team-user__action-icon[_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%]   .suspend-team-user__action-icon[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%]   .suspend-team-user__action-icon[_ngcontent-%COMP%], html[dir=rtl][_nghost-%COMP%]   .suspend-team-user__action-icon[_ngcontent-%COMP%], html[dir=rtl]   [_nghost-%COMP%]   .suspend-team-user__action-icon[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%]   .suspend-team-user__action-icon[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .suspend-team-user__action-icon[_ngcontent-%COMP%]{margin:0 0 0 var(--cp-spacer-1)}"]})}return i})();const Jt=i=>({width:i}),Wt=i=>({"column-button btn btn-link p-0":!0,"list-team__username-header":i}),Kt=(i,s)=>({"wordbreak list-team__details-row":!0,"list-team__details-row--no-border":i,"warning--background":s}),Zt=i=>({"warning--background":i}),en=(i,s)=>({"fa-chevron-down":i,"fa-chevron-right":s}),tn=i=>({$implicit:i,isDetailedView:!1}),nn=i=>({$implicit:i,isDetailedView:!0}),on=(i,s)=>({"btn btn-sm btn-outline-primary":!0,"hidden-xs hidden-sm":i,"hidden-md hidden-lg":s});function an(i,s){if(1&i){const t=e.RV6();e.j41(0,"ul",28)(1,"li",29)(2,"div")(3,"cp-page-size-selector",30),e.bIt("optionSelected",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.pageSizeChange(n))}),e.k0s()()(),e.nrm(4,"li",31),e.j41(5,"li",29)(6,"a",32),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.getListOfTeamUsers())}),e.nrm(7,"i",33),e.EFF(8),e.k0s()()()}if(2&i){const t=e.XpG();e.R7$(3),e.Y8G("pageSizeOptions",t.tableService.pageSizes)("selectedPageSize",t.tableService.pagination.pageSize),e.R7$(5),e.SpI(" ",t.locale.maketext("Refresh")," ")}}function sn(i,s){if(1&i&&e.nrm(0,"i",40),2&i){const t=e.XpG(2).$implicit,o=e.XpG();e.AVh("icon-arrow-up",o.tableService.sortedInAscendingOrder())("icon-arrow-down",!o.tableService.sortedInAscendingOrder()),e.BMQ("title",t.label)}}function rn(i,s){if(1&i){const t=e.RV6();e.j41(0,"button",37),e.bIt("click",function(){e.eBV(t);const n=e.XpG().$implicit,a=e.XpG();return e.Njj(a.changeSort(n.key))}),e.j41(1,"span",38),e.EFF(2),e.k0s(),e.DNE(3,sn,1,5,"i",39),e.k0s()}if(2&i){const t=e.XpG().$implicit,o=e.XpG();e.Mz_("id","column-button__",t.key,""),e.Y8G("ngClass",e.eq3(5,Wt,"username"===t.key)),e.R7$(2),e.JRh(t.label),e.R7$(),e.Y8G("ngIf",t.key===o.tableService.getSortColumn())}}function ln(i,s){if(1&i&&(e.j41(0,"span",38),e.EFF(1),e.k0s()),2&i){const t=e.XpG().$implicit;e.R7$(),e.JRh(t.label)}}function cn(i,s){if(1&i&&(e.j41(0,"th",34),e.DNE(1,rn,4,7,"button",35)(2,ln,2,1,"span",36),e.k0s()),2&i){const t=s.$implicit,o=e.XpG();e.Y8G("ngStyle",e.eq3(4,Jt,100/o.columns.length+"%"))("ngClass",t.classes),e.R7$(),e.Y8G("ngIf",t.sortable),e.R7$(),e.Y8G("ngIf",!t.sortable)}}function mn(i,s){if(1&i&&(e.j41(0,"tr",41)(1,"td"),e.nrm(2,"span",42),e.EFF(3," \xa0 "),e.j41(4,"span",43),e.EFF(5),e.k0s()()()),2&i){const t=e.XpG();e.R7$(),e.BMQ("colspan",t.emptyRowColSpan),e.R7$(4),e.JRh(t.locale.maketext("Loading \u2026"))}}function dn(i,s){if(1&i&&(e.j41(0,"tr",44)(1,"td"),e.EFF(2),e.k0s()()),2&i){const t=e.XpG();e.R7$(),e.BMQ("colspan",t.emptyRowColSpan),e.R7$(),e.JRh(t.noResultsMessage)}}function pn(i,s){if(1&i&&(e.j41(0,"span",62),e.EFF(1),e.k0s()),2&i){const t=e.XpG(2).$implicit,o=e.XpG(2).$implicit;e.R7$(),e.SpI(" ",o[t.key]||""," ")}}function _n(i,s){if(1&i&&e.nrm(0,"cp-team-manager-badge",63),2&i){const t=e.XpG(4).$implicit,o=e.XpG();e.Y8G("color",o.badgeColor.warning)("content",t.badgeText)}}function un(i,s){if(1&i){const t=e.RV6();e.qex(0),e.j41(1,"div",55)(2,"span",56)(3,"button",57),e.bIt("click",function(){e.eBV(t);const n=e.XpG(3).$implicit,a=e.XpG();return e.Njj(a.toggleTeamUserDetails(n))}),e.nrm(4,"span",58)(5,"i",59),e.k0s()(),e.DNE(6,pn,2,1,"span",60)(7,_n,1,2,"cp-team-manager-badge",61),e.k0s(),e.bVm()}if(2&i){const t=e.XpG().$implicit,o=e.XpG(2).$implicit,n=e.XpG();e.R7$(3),e.Mz_("id","toggleRollDown_",o[t.key],""),e.R7$(),e.Y8G("innerHTML",n.locale.maketext(o.detailsVisible?"Expand details":"Collapse details"),e.npT),e.R7$(),e.Y8G("ngClass",e.l_i(6,en,o.detailsVisible,!o.detailsVisible)),e.R7$(),e.Y8G("ngIf","actions"!==(null==t?null:t.key)),e.R7$(),e.Y8G("ngIf","username"===t.key&&(o.suspended||o.expired))}}function gn(i,s){if(1&i&&(e.qex(0),e.EFF(1),e.bVm()),2&i){const t=e.XpG().$implicit,o=e.XpG(2).$implicit;e.R7$(),e.SpI(" ",o[t.key]," ")}}function hn(i,s){if(1&i){const t=e.RV6();e.j41(0,"div",64)(1,"button",65),e.bIt("click",function(){e.eBV(t);const n=e.XpG(3).$implicit,a=e.XpG();return e.Njj(a.goToEdit(n))}),e.nrm(2,"cp-icon",66),e.EFF(3),e.k0s(),e.j41(4,"cp-team-manager-suspend-team-user",67),e.bIt("suspendStatusChangeSuccess",function(){e.eBV(t);const n=e.XpG(4);return e.Njj(n.suspendStatusChangeHandler())}),e.k0s(),e.eu8(5,68),e.k0s()}if(2&i){const t=e.XpG(3).$implicit,o=e.XpG(),n=e.sdS(34);e.R7$(3),e.SpI(" ",o.locale.maketext("Edit User")," "),e.R7$(),e.Y8G("isDetailedView",!1)("teamUser",t),e.R7$(),e.Y8G("ngTemplateOutlet",n)("ngTemplateOutletContext",e.eq3(5,tn,t))}}function fn(i,s){if(1&i&&(e.qex(0),e.EFF(1),e.bVm()),2&i){const t=e.XpG().$implicit,o=e.XpG(2).$implicit;e.R7$(),e.JRh(o[t.key]||"")}}function bn(i,s){if(1&i&&(e.j41(0,"td",50),e.qex(1,51),e.DNE(2,un,8,9,"ng-container",52)(3,gn,2,1,"ng-container",52)(4,hn,6,7,"div",53)(5,fn,2,1,"ng-container",54),e.bVm(),e.k0s()),2&i){const t=s.$implicit,o=e.XpG(2).$implicit;e.Y8G("ngClass",t.classes)("id","list-team__column-"+t.key+"--"+o.username),e.R7$(),e.Y8G("ngSwitch",t.key),e.R7$(),e.Y8G("ngSwitchCase","username"),e.R7$(),e.Y8G("ngSwitchCase","roles"),e.R7$(),e.Y8G("ngSwitchCase","actions")}}function Cn(i,s){if(1&i&&(e.j41(0,"tr",48),e.DNE(1,bn,6,6,"td",49),e.k0s()),2&i){const t=e.XpG().$implicit,o=e.XpG();e.Y8G("id","main-row-"+t.username)("ngClass",e.eq3(4,Zt,t.showDeletePrompt)),e.R7$(),e.Y8G("ngForOf",o.columns)("ngForTrackBy",o.trackByFn)}}function vn(i,s){if(1&i&&(e.qex(0),e.j41(1,"p"),e.EFF(2),e.k0s(),e.j41(3,"p"),e.EFF(4),e.k0s(),e.bVm()),2&i){const t=e.XpG(3).$implicit;e.R7$(2),e.JRh(t.suspendDateDetails),e.R7$(2),e.JRh(t.suspendReasonDetails)}}function On(i,s){if(1&i&&(e.qex(0),e.j41(1,"p"),e.EFF(2),e.k0s(),e.j41(3,"p"),e.EFF(4),e.k0s(),e.bVm()),2&i){const t=e.XpG(3).$implicit;e.R7$(2),e.JRh(t.expireDateDetails),e.R7$(2),e.JRh(t.expireReasonDetails)}}function kn(i,s){if(1&i&&(e.j41(0,"div",71)(1,"p",72),e.EFF(2),e.k0s(),e.DNE(3,vn,5,2,"ng-container",74)(4,On,5,2,"ng-container",74),e.k0s()),2&i){const t=e.XpG(2).$implicit,o=e.XpG();e.R7$(2),e.SpI(" ",o.locale.maketext("Restriction Information:")," "),e.R7$(),e.Y8G("ngIf",t.suspended),e.R7$(),e.Y8G("ngIf",t.expireDate)}}function Mn(i,s){if(1&i){const t=e.RV6();e.j41(0,"cp-team-manager-delete-panel",75),e.bIt("deleteSuccess",function(){e.eBV(t);const n=e.XpG(2).$implicit,a=e.XpG();return e.Njj(a.deleteSuccess(n))}),e.k0s()}if(2&i){const t=e.XpG(2).$implicit;e.Y8G("teamUser",t)}}function Pn(i,s){if(1&i){const t=e.RV6();e.j41(0,"td",69)(1,"div",1),e.DNE(2,kn,5,3,"div",70),e.j41(3,"div",71)(4,"p",72),e.EFF(5),e.k0s(),e.j41(6,"p"),e.EFF(7),e.k0s(),e.j41(8,"p"),e.EFF(9),e.k0s(),e.j41(10,"p"),e.EFF(11),e.k0s(),e.j41(12,"p"),e.EFF(13),e.k0s()(),e.j41(14,"div",71)(15,"p",72),e.EFF(16),e.k0s(),e.j41(17,"p"),e.EFF(18),e.k0s(),e.j41(19,"p"),e.EFF(20),e.k0s()(),e.j41(21,"div",71)(22,"p",72),e.EFF(23),e.k0s(),e.j41(24,"p"),e.EFF(25),e.k0s()()(),e.j41(26,"div")(27,"cp-team-manager-suspend-team-user",67),e.bIt("suspendStatusChangeSuccess",function(){e.eBV(t);const n=e.XpG(2);return e.Njj(n.suspendStatusChangeHandler())}),e.k0s(),e.eu8(28,68),e.k0s(),e.DNE(29,Mn,1,1,"cp-team-manager-delete-panel",73),e.k0s()}if(2&i){const t=e.XpG().$implicit,o=e.XpG(),n=e.sdS(34);e.Y8G("id","details-row-"+t.username),e.R7$(2),e.Y8G("ngIf",t.suspended||t.expireDate),e.R7$(3),e.SpI(" ",o.locale.maketext("Account Information"),": "),e.R7$(2),e.JRh(t.loginDetails),e.R7$(2),e.JRh(t.notesDetails),e.R7$(2),e.JRh(t.lastLoginDateDetails),e.R7$(2),e.JRh(t.createdDetails),e.R7$(3),e.SpI(" ",o.locale.maketext("Team Information"),": "),e.R7$(2),e.JRh(t.rolesDetails),e.R7$(2),e.JRh(t.servicesDetails),e.R7$(3),e.SpI(" ",o.locale.maketext("Security Information"),": "),e.R7$(2),e.JRh(t.contactEmailDetails),e.R7$(2),e.Y8G("isDetailedView",!0)("teamUser",t),e.R7$(),e.Y8G("ngTemplateOutlet",n)("ngTemplateOutletContext",e.eq3(17,nn,t)),e.R7$(),e.Y8G("ngIf",t.showDeletePrompt)}}function wn(i,s){if(1&i&&(e.qex(0),e.DNE(1,Cn,2,6,"tr",45),e.j41(2,"tr",46),e.DNE(3,Pn,30,19,"td",47),e.k0s(),e.bVm()),2&i){const t=s.$implicit,o=e.XpG();e.R7$(),e.Y8G("ngIf",o.columnKeyExists(t)),e.R7$(),e.Y8G("ngClass",e.l_i(3,Kt,t.detailsVisible,t.showDeletePrompt)),e.R7$(),e.Y8G("ngIf",t.detailsVisible)}}function Tn(i,s){if(1&i){const t=e.RV6();e.j41(0,"button",76),e.bIt("click",function(){const n=e.eBV(t).$implicit,a=e.XpG();return e.Njj(a.deletePrompt(n))}),e.nrm(1,"cp-icon",77),e.j41(2,"span",78),e.EFF(3),e.k0s()()}if(2&i){const t=s.$implicit,o=s.isDetailedView,n=e.XpG();e.Y8G("id","list-team__delete-user--"+t.username)("ngClass",e.l_i(4,on,!o,o))("disabled",t.showDeletePrompt),e.R7$(3),e.JRh(n.locale.maketext("Delete"))}}let ue=(()=>{class i{constructor(t,o,n,a,c,u,w,$,j){this.tableService=t,this.locale=o,this.teamTableHeadersService=n,this.teamManagerApiService=a,this.alertService=c,this.router=u,this.window=w,this.mapApiService=$,this.maxTeamUsers=j,this.badgeColor=N,this.manageTeamRoutes=d,this.updateTable$=new V.B,this.destroy$=new V.B}ngOnInit(){this.getUsedTeamUsersCount(),this.columns=this.teamTableHeadersService.getListTeamTableHeaders(),this.emptyRowColSpan=this.columns?.length+1,this.initializeTableUpdate(),this.updateTable$.next()}ngAfterViewInit(){this.teamManagerApiService.listRoles().pipe((0,O.s)(1)).subscribe(t=>{localStorage.setItem("roleList",JSON.stringify(this.mapApiService.processRoles(t.data[0])))},t=>{this.alertService.error(t.message)})}ngOnDestroy(){this.destroy$.next(!0)}toggleTeamUserDetails(t){t.detailsVisible=!t.detailsVisible}getUsedTeamUsersCount(){this.teamManagerApiService.getTeamUsersCount().pipe((0,O.s)(1)).subscribe({next:t=>{this.usedUsersWithRole=t.data.used},error:t=>{this.alertService.error(t.message)}})}columnKeyExists(t){return this.columns.some(o=>Object.keys(t).includes(o.key))}trackByFn(t){return t}changeSort(t){this.tableService.changeSort(t),this.updateTable$.next()}deletePrompt(t){t.detailsVisible=!0,t.showDeletePrompt=!0}deleteSuccess(t){this.rows=this.rows.filter(o=>o.username!==t.username)}suspendStatusChangeHandler(){this.updateTable$.next()}goToCreate(){this.window.mixpanel?.track("ManageTeam-ListTeam-CreateTeamUser-Clicked"),this.router.navigate([d.create])}goToAuditLog(){this.window.mixpanel?.track("ManageTeam-ListTeam-ViewAuditLog-Clicked"),this.router.navigate([d.auditLog])}goToEdit(t){this.window.mixpanel?.track("ManageTeam-ListTeam-EditUser-Clicked"),this.router.navigate([d.edit,t.username])}filterRows(t){this.tableService.updateSearchFilter("*",t),this.updateTable$.next()}pageChange(t){t.page!==this.tableService.pagination.selectedPage&&(this.tableService.changePage(t.page),this.updateTable$.next())}pageSizeChange(t){this.tableService.updatePageSize(t),this.updateTable$.next()}initializeTableUpdate(){this.updateTable$.pipe((0,Bt.M)(()=>{this.tableService.loading=!0,this.rows=[]}),(0,Vt.Q)(this.destroy$),(0,Nt.n)(()=>this.teamManagerApiService.getTeam(this.tableService.getTableMetadata()))).subscribe(t=>{this.tableService.pagination.totalRecords=t.meta.totalRecords,this.tableService.pagination.recordsBeforeFilter=t.meta.recordsBeforeFilter,this.rows=t.data.map(o=>this.mapApiService.mapTeamUserData(o)),localStorage.setItem("teamData",JSON.stringify(this.rows)),this.tableService.loading=!1,this.noResultsMessage=this.noResultsReason()},t=>{this.alertService.error(t.message),this.tableService.loading=!1,this.noResultsMessage=this.noResultsReason()})}compare(t,o,n){return(t<o?-1:1)*(n?1:-1)}noResultsReason(){const t=this.tableService.loading,o=this.rows?.length;return t||o?null:this.noResultsMessage||this.locale.maketext("No results available.")}static#e=this.\u0275fac=function(o){return new(o||i)(e.rXU(G),e.rXU(g.h),e.rXU(_e),e.rXU(P),e.rXU(r.uE),e.rXU(b.Ix),e.rXU(Window),e.rXU(S),e.rXU(K))};static#t=this.\u0275cmp=e.VBU({type:i,selectors:[["cp-team-manager-list-team"]],decls:35,vars:25,consts:[["deleteAction",""],[1,"row"],[1,"col-sm-8","col-md-9",3,"innerHTML"],[1,"col-xs-12","col-md-9"],["id","privilege-escalation-callout","calloutType","warning"],[3,"innerHtml"],[1,"col-sm-4","col-md-3","animate-stats"],["id","stats-basic","displayLimit","true",3,"usedValue","limitValue","usedTitle","limitTitle"],[1,"list-team__pagination-container"],[3,"valueChange","autofocus","debounce","disabled","id","label"],[1,"pagination-container"],["id","pagination",3,"pageChanged","disabled","maxPagesVisible","pageSize","selectedPage","totalItems"],[1,"list-team__links"],["id","audit-log",1,"btn","btn-link","btn-sm","list-team__link-with-icon",3,"click"],["aria-hidden","true",1,"ri-file-text-line","ri-xl","list-team__icon"],["id","create-user","id","new-user",1,"btn","btn-sm","btn-primary",3,"click"],["name","add-fill","aria-hidden","true",1,"list-team__action-icon"],["dropdown","","auto-close","outsideClick",1,"btn-group"],["id","table-settings-dropdown","type","button","dropdownToggle","",1,"btn","btn-default","btn-sm","dropdown-toggle","button-bar","page-size-selector_group-icon"],[1,"sr-only"],[1,"ri-md","ri-settings-3-fill"],[1,"ri-arrow-down-s-fill"],["id","table-settings-menu","class","dropdown-menu dropdown-menu-right","role","menu","aria-labelledby","table-settings-dropdown",4,"dropdownMenu"],[1,"table","table-striped"],[3,"ngStyle","ngClass",4,"ngFor","ngForOf","ngForTrackBy"],["class","info empty-row","id","loadingRow",4,"ngIf"],["class","info empty-row","id","emptySearchRow",4,"ngIf"],[4,"ngFor","ngForOf","ngForTrackBy"],["id","table-settings-menu","role","menu","aria-labelledby","table-settings-dropdown",1,"dropdown-menu","dropdown-menu-right"],["role","menuitem"],["id","page-size-selector",3,"optionSelected","pageSizeOptions","selectedPageSize"],[1,"divider"],["id","page-size-selector__refresh",1,"page-size-selector__refresh",3,"click"],[1,"ri-refresh-line"],[3,"ngStyle","ngClass"],[3,"id","ngClass","click",4,"ngIf"],["class","column-label separator",4,"ngIf"],[3,"click","id","ngClass"],[1,"column-label","separator"],["ngClass","column-icon","aria-hidden","true",3,"icon-arrow-up","icon-arrow-down",4,"ngIf"],["ngClass","column-icon","aria-hidden","true"],["id","loadingRow",1,"info","empty-row"],["aria-hidden","true",1,"fas","fa-spinner","fa-spin"],[1,"loading-text"],["id","emptySearchRow",1,"info","empty-row"],["class","list-team__main-row",3,"id","ngClass",4,"ngIf"],[3,"ngClass"],["colspan","7",3,"id",4,"ngIf"],[1,"list-team__main-row",3,"id","ngClass"],[3,"ngClass","id",4,"ngFor","ngForOf","ngForTrackBy"],[3,"ngClass","id"],[3,"ngSwitch"],[4,"ngSwitchCase"],["class","list-team__action-items",4,"ngSwitchCase"],[4,"ngSwitchDefault"],[1,"list-team__username-column"],[1,"row-expand-container"],[1,"btn","btn-sm","btn-link",3,"click","id"],[1,"sr-only",3,"innerHTML"],["aria-hidden","true",1,"fas",3,"ngClass"],["class","list-team__td-username",4,"ngIf"],[3,"color","content",4,"ngIf"],[1,"list-team__td-username"],[3,"color","content"],[1,"list-team__action-items"],["id","edit-user",1,"btn","btn-sm","btn-outline-primary",3,"click"],["name","pencil-fill","aria-hidden","true",1,"list-team__action-icon"],[3,"suspendStatusChangeSuccess","isDetailedView","teamUser"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["colspan","7",3,"id"],["class","list-team__details col-lg-3 col-md-6 col-sm-12 col-12",4,"ngIf"],[1,"list-team__details","col-lg-3","col-md-6","col-sm-12","col-12"],[1,"list-team__details-label"],[3,"teamUser","deleteSuccess",4,"ngIf"],[4,"ngIf"],[3,"deleteSuccess","teamUser"],[3,"click","id","ngClass","disabled"],["name","delete-bin-7-fill","aria-hidden","true",1,"list-team__action-icon"],[1,""]],template:function(o,n){if(1&o){const a=e.RV6();e.j41(0,"div",1),e.nrm(1,"p",2),e.j41(2,"p",3)(3,"cp-callout",4),e.nrm(4,"span",5),e.k0s()(),e.j41(5,"div",6),e.nrm(6,"cp-stats",7),e.k0s()(),e.j41(7,"div",8)(8,"cp-search",9),e.bIt("valueChange",function(u){return e.eBV(a),e.Njj(n.filterRows(u))}),e.k0s(),e.j41(9,"div",10)(10,"cp-pagination",11),e.bIt("pageChanged",function(u){return e.eBV(a),e.Njj(n.pageChange(u))}),e.k0s()()(),e.j41(11,"div",12)(12,"button",13),e.bIt("click",function(){return e.eBV(a),e.Njj(n.goToAuditLog())}),e.nrm(13,"i",14),e.EFF(14),e.k0s(),e.j41(15,"button",15),e.bIt("click",function(){return e.eBV(a),e.Njj(n.goToCreate())}),e.nrm(16,"cp-icon",16),e.EFF(17),e.k0s(),e.j41(18,"div",17)(19,"button",18)(20,"span",19),e.EFF(21),e.k0s(),e.nrm(22,"i",20)(23,"i",21),e.k0s(),e.DNE(24,an,9,3,"ul",22),e.k0s()(),e.j41(25,"table",23)(26,"thead")(27,"tr"),e.DNE(28,cn,3,6,"th",24),e.k0s()(),e.j41(29,"tbody"),e.DNE(30,mn,6,2,"tr",25)(31,dn,3,2,"tr",26)(32,wn,4,6,"ng-container",27),e.k0s()(),e.DNE(33,Tn,4,7,"ng-template",null,0,e.C5r)}2&o&&(e.R7$(),e.Y8G("innerHTML",n.locale.maketext("Manage Team User accounts and view the Audit Log. For more information, read the [output,url,_1,documentation,title,cPanel Documentation,target,_2,class,cp-external-link].","https://go.cpanel.net/manage-team","cPanel docs"),e.npT),e.R7$(3),e.Y8G("innerHtml",n.locale.maketext("[output,strong,Warning:] This feature grants access to account-level functionality. Only grant this permission to users that you trust to access and modify your account."),e.npT),e.R7$(2),e.FS9("usedValue",n.usedUsersWithRole||"0"),e.Y8G("limitValue",n.maxTeamUsers)("usedTitle",n.locale.maketext("Users with role"))("limitTitle",n.locale.maketext("Max users with role")),e.R7$(2),e.Y8G("autofocus",!1)("debounce",400)("disabled",!1)("id","list-team")("label",n.locale.maketext("Search")),e.R7$(2),e.Y8G("disabled",n.tableService.pagination.disabled)("maxPagesVisible",n.tableService.pagination.maxPagesVisible||3)("pageSize",n.tableService.pagination.pageSize)("selectedPage",n.tableService.pagination.selectedPage)("totalItems",n.tableService.pagination.totalRecords),e.R7$(4),e.SpI(" ",n.locale.maketext("View Audit Log")," "),e.R7$(3),e.SpI(" ",n.locale.maketext("Create Team User")," "),e.R7$(4),e.JRh(n.locale.maketext("Table Settings")),e.R7$(7),e.Y8G("ngForOf",n.columns)("ngForTrackBy",n.trackByFn),e.R7$(2),e.Y8G("ngIf",n.tableService.loading),e.R7$(),e.Y8G("ngIf",n.noResultsMessage),e.R7$(),e.Y8G("ngForOf",n.rows)("ngForTrackBy",n.trackByFn))},dependencies:[m.YU,m.Sq,m.bT,m.T3,m.B3,m.ux,m.e1,m.fG,f.hs,f.UL,f.Kk,r.Sy,r.br,r.eK,r.GV,r.xp,Lt,Xt,Qt],styles:[".table[_ngcontent-%COMP%]{border-collapse:separate}.column-button[_ngcontent-%COMP%]{display:flex;align-items:center;text-decoration:none;padding:0}.column-button[_ngcontent-%COMP%]:hover > span[_ngcontent-%COMP%]{text-decoration:underline}.column-button[_ngcontent-%COMP%]:focus{outline:none}.column-label[_ngcontent-%COMP%]{display:inline-block}html[dir=ltr][_ngcontent-%COMP%]   .column-label[_ngcontent-%COMP%], [dir=ltr][_ngcontent-%COMP%]   .column-label[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%]   .column-label[_ngcontent-%COMP%], html[dir=ltr][_nghost-%COMP%]   .column-label[_ngcontent-%COMP%], html[dir=ltr]   [_nghost-%COMP%]   .column-label[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%]   .column-label[_ngcontent-%COMP%], [dir=ltr]   [_nghost-%COMP%]   .column-label[_ngcontent-%COMP%]{margin-right:var(--cp-spacer-2)}html[dir=rtl][_ngcontent-%COMP%]   .column-label[_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%]   .column-label[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%]   .column-label[_ngcontent-%COMP%], html[dir=rtl][_nghost-%COMP%]   .column-label[_ngcontent-%COMP%], html[dir=rtl]   [_nghost-%COMP%]   .column-label[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%]   .column-label[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .column-label[_ngcontent-%COMP%]{margin-left:var(--cp-spacer-2)}.column-icon[_ngcontent-%COMP%]{top:var(--cp-spacer-2)}thead[_ngcontent-%COMP%]{position:sticky;top:0;background:var(--cp-component-bg, #fff)}thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]{padding:0 var(--cp-spacer-2);background:var(--cp-component-bg, #fff);background-clip:content-box}.list-team__pagination-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}.search-container[_ngcontent-%COMP%]{min-width:100px;max-width:350px;flex-basis:350px;margin-bottom:var(--cp-spacer-3);flex-grow:1}.pagination-container[_ngcontent-%COMP%]{min-width:max-content}html[dir=ltr][_ngcontent-%COMP%]   .pagination-container[_ngcontent-%COMP%], [dir=ltr][_ngcontent-%COMP%]   .pagination-container[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%]   .pagination-container[_ngcontent-%COMP%], html[dir=ltr][_nghost-%COMP%]   .pagination-container[_ngcontent-%COMP%], html[dir=ltr]   [_nghost-%COMP%]   .pagination-container[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%]   .pagination-container[_ngcontent-%COMP%], [dir=ltr]   [_nghost-%COMP%]   .pagination-container[_ngcontent-%COMP%]{margin-left:auto}html[dir=rtl][_ngcontent-%COMP%]   .pagination-container[_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%]   .pagination-container[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%]   .pagination-container[_ngcontent-%COMP%], html[dir=rtl][_nghost-%COMP%]   .pagination-container[_ngcontent-%COMP%], html[dir=rtl]   [_nghost-%COMP%]   .pagination-container[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%]   .pagination-container[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .pagination-container[_ngcontent-%COMP%]{margin-right:auto}  div#pagination>p{margin-top:0}.list-team__links[_ngcontent-%COMP%]{margin-top:var(--cp-spacer-3);margin-bottom:var(--cp-spacer-2);display:flex;justify-content:flex-end;align-items:center}html[dir=ltr][_ngcontent-%COMP%]   .list-team__links[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:not(:last-child), [dir=ltr][_ngcontent-%COMP%]   .list-team__links[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:not(:last-child), [dir=ltr][_nghost-%COMP%]   .list-team__links[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:not(:last-child), html[dir=ltr][_nghost-%COMP%]   .list-team__links[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:not(:last-child), html[dir=ltr]   [_nghost-%COMP%]   .list-team__links[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:not(:last-child), [dir=ltr][_nghost-%COMP%]   .list-team__links[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:not(:last-child), [dir=ltr]   [_nghost-%COMP%]   .list-team__links[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:not(:last-child){margin-right:var(--cp-spacer-2)}html[dir=rtl][_ngcontent-%COMP%]   .list-team__links[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:not(:last-child), [dir=rtl][_ngcontent-%COMP%]   .list-team__links[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:not(:last-child), [dir=rtl][_nghost-%COMP%]   .list-team__links[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:not(:last-child), html[dir=rtl][_nghost-%COMP%]   .list-team__links[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:not(:last-child), html[dir=rtl]   [_nghost-%COMP%]   .list-team__links[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:not(:last-child), [dir=rtl][_nghost-%COMP%]   .list-team__links[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:not(:last-child), [dir=rtl]   [_nghost-%COMP%]   .list-team__links[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:not(:last-child){margin-left:var(--cp-spacer-2)}.list-team__username-column[_ngcontent-%COMP%]{height:100%;display:flex;align-items:center}html[dir=ltr][_ngcontent-%COMP%]   .list-team__td-username[_ngcontent-%COMP%], [dir=ltr][_ngcontent-%COMP%]   .list-team__td-username[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%]   .list-team__td-username[_ngcontent-%COMP%], html[dir=ltr][_nghost-%COMP%]   .list-team__td-username[_ngcontent-%COMP%], html[dir=ltr]   [_nghost-%COMP%]   .list-team__td-username[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%]   .list-team__td-username[_ngcontent-%COMP%], [dir=ltr]   [_nghost-%COMP%]   .list-team__td-username[_ngcontent-%COMP%]{margin-right:var(--cp-spacer-1)}html[dir=rtl][_ngcontent-%COMP%]   .list-team__td-username[_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%]   .list-team__td-username[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%]   .list-team__td-username[_ngcontent-%COMP%], html[dir=rtl][_nghost-%COMP%]   .list-team__td-username[_ngcontent-%COMP%], html[dir=rtl]   [_nghost-%COMP%]   .list-team__td-username[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%]   .list-team__td-username[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .list-team__td-username[_ngcontent-%COMP%]{margin-left:var(--cp-spacer-1)}html[dir=ltr][_ngcontent-%COMP%]   .list-team__username-header[_ngcontent-%COMP%], [dir=ltr][_ngcontent-%COMP%]   .list-team__username-header[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%]   .list-team__username-header[_ngcontent-%COMP%], html[dir=ltr][_nghost-%COMP%]   .list-team__username-header[_ngcontent-%COMP%], html[dir=ltr]   [_nghost-%COMP%]   .list-team__username-header[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%]   .list-team__username-header[_ngcontent-%COMP%], [dir=ltr]   [_nghost-%COMP%]   .list-team__username-header[_ngcontent-%COMP%]{padding-left:var(--cp-spacer-5)}html[dir=rtl][_ngcontent-%COMP%]   .list-team__username-header[_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%]   .list-team__username-header[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%]   .list-team__username-header[_ngcontent-%COMP%], html[dir=rtl][_nghost-%COMP%]   .list-team__username-header[_ngcontent-%COMP%], html[dir=rtl]   [_nghost-%COMP%]   .list-team__username-header[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%]   .list-team__username-header[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .list-team__username-header[_ngcontent-%COMP%]{padding-right:var(--cp-spacer-5)}.list-team__details[_ngcontent-%COMP%]{padding:var(--cp-spacer-2) var(--cp-spacer-3)}.list-team__action-icon[_ngcontent-%COMP%]{padding:0}html[dir=ltr][_ngcontent-%COMP%]   .list-team__action-icon[_ngcontent-%COMP%], [dir=ltr][_ngcontent-%COMP%]   .list-team__action-icon[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%]   .list-team__action-icon[_ngcontent-%COMP%], html[dir=ltr][_nghost-%COMP%]   .list-team__action-icon[_ngcontent-%COMP%], html[dir=ltr]   [_nghost-%COMP%]   .list-team__action-icon[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%]   .list-team__action-icon[_ngcontent-%COMP%], [dir=ltr]   [_nghost-%COMP%]   .list-team__action-icon[_ngcontent-%COMP%]{margin:0 var(--cp-spacer-1) 0 0}html[dir=rtl][_ngcontent-%COMP%]   .list-team__action-icon[_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%]   .list-team__action-icon[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%]   .list-team__action-icon[_ngcontent-%COMP%], html[dir=rtl][_nghost-%COMP%]   .list-team__action-icon[_ngcontent-%COMP%], html[dir=rtl]   [_nghost-%COMP%]   .list-team__action-icon[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%]   .list-team__action-icon[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .list-team__action-icon[_ngcontent-%COMP%]{margin:0 0 0 var(--cp-spacer-1)}.list-team__action-button-with-icon[_ngcontent-%COMP%]{padding:.25rem;vertical-align:middle}.list-team__action-items[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.list-team__link-with-icon[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}html[dir=ltr][_ngcontent-%COMP%]   .list-team__icon[_ngcontent-%COMP%], [dir=ltr][_ngcontent-%COMP%]   .list-team__icon[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%]   .list-team__icon[_ngcontent-%COMP%], html[dir=ltr][_nghost-%COMP%]   .list-team__icon[_ngcontent-%COMP%], html[dir=ltr]   [_nghost-%COMP%]   .list-team__icon[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%]   .list-team__icon[_ngcontent-%COMP%], [dir=ltr]   [_nghost-%COMP%]   .list-team__icon[_ngcontent-%COMP%]{margin-right:var(--cp-spacer-1)}html[dir=rtl][_ngcontent-%COMP%]   .list-team__icon[_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%]   .list-team__icon[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%]   .list-team__icon[_ngcontent-%COMP%], html[dir=rtl][_nghost-%COMP%]   .list-team__icon[_ngcontent-%COMP%], html[dir=rtl]   [_nghost-%COMP%]   .list-team__icon[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%]   .list-team__icon[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .list-team__icon[_ngcontent-%COMP%]{margin-left:var(--cp-spacer-1)}.table-striped[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]:nth-child(4n+1), .table-striped[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]:nth-child(4n+2){background-color:#f1f1f1}.table-striped[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]:nth-child(4n+3), .table-striped[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]:nth-child(4n+4){background-color:#f8f8f8}.table-striped[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr.warning--background[_ngcontent-%COMP%]{background-color:#fff7df}.list-team__details-row--no-border[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{border:0;padding:0 var(--cp-spacer-3) var(--cp-spacer-3) var(--cp-spacer-3)}.list-team__details-label[_ngcontent-%COMP%]{font-weight:700}@media only screen and (max-width: 767px){.list-team__action-items[_ngcontent-%COMP%]{justify-content:flex-end}}"]})}return i})();var Sn=p(7468),xn=p(7673),yn=p(9437);let ge=(()=>{class i{constructor(t,o,n,a){this.locale=t,this.alertService=o,this.mapApiService=n,this.teamManagerApiService=a}canActivate(t,o){const n=localStorage.getItem("roleList")&&localStorage.getItem("teamData");return!!n||(n?void 0:this.fetchTeamManagerData())}fetchTeamManagerData(){return(0,Sn.p)([this.teamManagerApiService.listRoles(),this.teamManagerApiService.getTeam()]).pipe((0,C.T)(([t,o])=>{const n=o.data.map(a=>this.mapApiService.mapTeamUserData(a));return localStorage.setItem("teamData",JSON.stringify(n)),localStorage.setItem("roleList",JSON.stringify(this.mapApiService.processRoles(t.data[0]))),!0}),(0,yn.W)(()=>{const t=this.locale.maketext("Could not load all information required to access this page."),o=this.locale.maketext("If this condition persists, contact your system administrator.");return this.alertService.error(`${t} ${o}`),(0,xn.of)(!1)}))}static#e=this.\u0275fac=function(o){return new(o||i)(e.KVO(g.h),e.KVO(r.uE),e.KVO(S),e.KVO(P))};static#t=this.\u0275prov=e.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();const Rn=[{path:d.create,component:wt,canActivate:[ge],data:{breadcrumb:{id:d.create}}},{path:`${d.edit}/:id`,component:Dt,canActivate:[ge],data:{breadcrumb:{id:d.edit}}},{path:d.auditLog,component:$e,data:{breadcrumb:{id:d.auditLog}}},{path:d.list,component:ue,data:{breadcrumb:{id:d.list}}},{path:"",redirectTo:`/${d.list}`,pathMatch:"full"},{path:"**",component:ue,pathMatch:"full"}];let Fn=(()=>{class i{constructor(t,o){this.locale=t,this.breadcrumbService=o;const n={[d.create]:{displayName:t.maketext("Create a Team User"),id:d.create,link:t.maketext("Go to the Create a Team User interface."),longName:t.maketext("Create a Team User"),path:`/${d.create}`,parentId:d.list},[d.edit]:{displayName:t.maketext("Edit a Team User"),id:d.edit,link:t.maketext("Go to the Edit a Team User interface."),longName:t.maketext("Edit a Team User"),path:`/${d.edit}`,parentId:d.list},[d.list]:{displayName:t.maketext("List Team"),id:d.list,link:t.maketext("Go to the List Team interface."),longName:t.maketext("List Team"),path:`/${d.list}`,parentId:""},[d.auditLog]:{displayName:t.maketext("Audit Log"),id:d.auditLog,link:t.maketext("Go to the Audit Log interface."),longName:t.maketext("Audit Log"),path:`/${d.auditLog}`,parentId:d.list}};this.breadcrumbService.initializeBreadcrumbs(),this.breadcrumbService.flattenedRoutesData=Object.values(n)}static#e=this.\u0275fac=function(o){return new(o||i)(e.KVO(g.h),e.KVO(r.bA))};static#t=this.\u0275mod=e.$C({type:i});static#n=this.\u0275inj=e.G2t({imports:[b.iI.forRoot(Rn,{useHash:!0}),b.iI]})}return i})(),En=(()=>{class i{constructor(t){this.locale=t,this.title="team-manager"}static#e=this.\u0275fac=function(o){return new(o||i)(e.rXU(g.h))};static#t=this.\u0275cmp=e.VBU({type:i,selectors:[["cp-team-manager-root"]],decls:3,vars:0,consts:[[1,"body-content"],[1,"section","animate-view","ng-cloak"]],template:function(o,n){1&o&&(e.nrm(0,"cp-alert-list"),e.j41(1,"div",0),e.nrm(2,"router-outlet",1),e.k0s())},dependencies:[b.n3,r.Ab],encapsulation:2})}return i})(),Gn=(()=>{class i{static#e=this.\u0275fac=function(o){return new(o||i)};static#t=this.\u0275mod=e.$C({type:i,bootstrap:[En]});static#n=this.\u0275inj=e.G2t({providers:[P,_e,Ce.N,B,S,G,{provide:ve,useValue:window.PAGE.base},{provide:z,useValue:window.PAGE.userName},{provide:H,useValue:window.PAGE.emailApp},{provide:q,useValue:window.PAGE.ftpApp},{provide:Q,useValue:window.PAGE.webDiskApp},{provide:J,useValue:window.PAGE.userManagerApp},{provide:W,useValue:window.PAGE.deprefix},{provide:K,useValue:window.PAGE.maxTeamUsers},{provide:E,useValue:window.PAGE.teamOwnerDomain},{provide:Z,useValue:window.PAGE.maxEmailQuota},{provide:ee,useValue:window.PAGE.defaultEmailQuota},{provide:te,useValue:window.PAGE.isEmailServiceAvailable},{provide:D,useValue:window.PAGE.ftpDaemonInfo},{provide:ne,useValue:window.PAGE.isWebdiskServiceAvailable},{provide:Window,useValue:window}],imports:[I.Bb,fe.wb,l.YN,l.X1,r._S,F.h6.forRoot(),f.zE.forRoot(),A.YN.forRoot(),he.q1,Fn,r.ho,r.rY,X.fg,r.tq,r.pt,r.sb,r.yI,r.H7,r.Qg,r.x6,r.jM,r.LT,R.MQ,r.Ou,r.Mb,be.B,r.rc]})}return i})();(0,e.SmG)(),I.sG().bootstrapModule(Gn).catch(i=>console.error(i))}},y=>{y.O(0,[128,538],()=>y(y.s=5835)),y.O()}]);
Back to Directory File Manager