You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

2 lines
21 KiB

"use strict";(self.webpackChunk_bitwarden_web_vault=self.webpackChunk_bitwarden_web_vault||[]).push([[449],{46449(t,i,n){n.d(i,{OrganizationSettingsModule:()=>Wt});var e=n(98403),o=n(46131),a=n(77243),r=n(72932),s=n(25065),c=n(84522),l=n(67553),p=n(77259),u=n(95661),d=n(94249),m=n(84210),b=n(87806),g=n(68108),h=n(191),f=n(69783),I=n(73366),v=n(72135),y=n(83604),w=n(98569),S=n(29236);class F{}var R=n(79334),k=n(3633),$=n(78781),T=n(8916),z=n(50342),G=n(84431),M=n(71901),A=n(14041),E=n(11217),j=n(50700),C=n(26983),D=n(37115),X=n(35500),x=n(11224),B=n(66316),V=n(69855),U=n(46758),N=n(3892),K=n(26657),O=n(38620),Y=n(57144),L=n(56898),P=n(50352),J=n(10672),_=n(90246),H=n(86226),q=n(19934),W=n(43759),Q=n(57178),Z=n(58806),tt=n(49112),it=n(25740),nt=function(t,i,n,e){return new(n||(n=Promise))(function(o,a){function r(t){try{c(e.next(t))}catch(i){a(i)}}function s(t){try{c(e.throw(t))}catch(i){a(i)}}function c(t){var i;t.done?o(t.value):(i=t.value,i instanceof n?i:new n(function(t){t(i)})).then(r,s)}c((e=e.apply(t,i||[])).next())})};function et(t,i){1&t&&(A.j41(0,"div"),A.nrm(1,"i",2),A.nI1(2,"i18n"),A.j41(3,"span",3),A.EFF(4),A.nI1(5,"i18n"),A.k0s()()),2&t&&(A.R7$(),A.Y8G("title",A.mNQ(A.bMT(2,3,"loading"))),A.R7$(3),A.JRh(A.bMT(5,5,"loading")))}function ot(t,i){if(1&t&&(A.j41(0,"form",4)(1,"div",5)(2,"div")(3,"bit-form-field")(4,"bit-label"),A.EFF(5),A.nI1(6,"i18n"),A.k0s(),A.nrm(7,"input",6),A.k0s(),A.j41(8,"bit-form-field")(9,"bit-label"),A.EFF(10),A.nI1(11,"i18n"),A.k0s(),A.nrm(12,"input",7),A.k0s()(),A.j41(13,"div"),A.nrm(14,"bit-avatar",8)(15,"app-account-fingerprint",9),A.nI1(16,"i18n"),A.k0s()(),A.j41(17,"button",10),A.EFF(18),A.nI1(19,"i18n"),A.k0s()()),2&t){const t=A.XpG();A.Y8G("bitSubmit",t.submit)("formGroup",t.formGroup),A.R7$(5),A.JRh(A.bMT(6,11,"organizationName")),A.R7$(5),A.JRh(A.bMT(11,13,"email")),A.R7$(4),A.Y8G("text",t.org.name)("id",t.org.id),A.R7$(),A.Y8G("fingerprintLabel",A.mNQ(A.bMT(16,15,"yourOrganizationsFingerprint")))("fingerprintMaterial",t.organizationId)("publicKeyBuffer",t.publicKeyBuffer),A.R7$(3),A.SpI(" ",A.bMT(19,17,"save")," ")}}function at(t,i){if(1&t){const t=A.RV6();A.qex(0),A.j41(1,"h1",11),A.EFF(2),A.nI1(3,"i18n"),A.k0s(),A.j41(4,"p",12),A.EFF(5),A.nI1(6,"i18n"),A.j41(7,"a",13),A.EFF(8),A.nI1(9,"i18n"),A.k0s()(),A.j41(10,"div",14)(11,"button",15),A.bIt("click",function(){E.eBV(t);const i=A.XpG();return E.Njj(i.viewApiKey())}),A.EFF(12),A.nI1(13,"i18n"),A.k0s(),A.j41(14,"button",15),A.bIt("click",function(){E.eBV(t);const i=A.XpG();return E.Njj(i.rotateApiKey())}),A.EFF(15),A.nI1(16,"i18n"),A.k0s()(),A.bVm()}2&t&&(A.R7$(2),A.JRh(A.bMT(3,5,"apiKey")),A.R7$(3),A.SpI(" ",A.bMT(6,7,"apiKeyDesc")," "),A.R7$(3),A.SpI(" ",A.bMT(9,9,"learnMoreAboutApi")," "),A.R7$(4),A.SpI(" ",A.bMT(13,11,"viewApiKey")," "),A.R7$(3),A.SpI(" ",A.bMT(16,13,"rotateApiKey")," "))}function rt(t,i){if(1&t&&(A.j41(0,"form",4)(1,"h1",11),A.EFF(2),A.nI1(3,"i18n"),A.k0s(),A.j41(4,"p",12),A.EFF(5),A.nI1(6,"i18n"),A.k0s(),A.j41(7,"bit-form-control")(8,"bit-label"),A.EFF(9),A.nI1(10,"i18n"),A.k0s(),A.nrm(11,"input",16),A.k0s(),A.j41(12,"bit-form-control")(13,"bit-label"),A.EFF(14),A.nI1(15,"i18n"),A.k0s(),A.nrm(16,"input",17),A.k0s(),A.j41(17,"bit-form-control")(18,"bit-label"),A.EFF(19),A.nI1(20,"i18n"),A.k0s(),A.nrm(21,"input",18),A.k0s(),A.j41(22,"bit-form-control")(23,"bit-label"),A.EFF(24),A.nI1(25,"i18n"),A.j41(26,"span",19),A.EFF(27),A.nI1(28,"i18n"),A.k0s(),A.EFF(29),A.nI1(30,"i18n"),A.k0s(),A.nrm(31,"input",20),A.k0s(),A.j41(32,"button",21),A.EFF(33),A.nI1(34,"i18n"),A.k0s()()),2&t){const t=A.XpG();A.Y8G("bitSubmit",t.submitCollectionManagement)("formGroup",t.collectionManagementFormGroup),A.R7$(2),A.JRh(A.bMT(3,11,"collectionManagement")),A.R7$(3),A.JRh(A.bMT(6,13,"collectionManagementDescription")),A.R7$(4),A.JRh(A.bMT(10,15,"allowAdminAccessToAllCollectionItemsDescription")),A.R7$(5),A.JRh(A.bMT(15,17,"restrictCollectionCreationDescription")),A.R7$(5),A.JRh(A.bMT(20,19,"restrictCollectionDeletionDescription")),A.R7$(5),A.SpI(" ",A.bMT(25,21,"restrictItemDeletionDescriptionStart")," "),A.R7$(3),A.JRh(A.bMT(28,23,"manageCollection")),A.R7$(2),A.SpI(" ",A.bMT(30,25,"restrictItemDeletionDescriptionEnd")," "),A.R7$(4),A.SpI(" ",A.bMT(34,27,"save")," ")}}function st(t,i){if(1&t){const t=A.RV6();A.j41(0,"app-danger-zone")(1,"button",22),A.bIt("click",function(){E.eBV(t);const i=A.XpG();return E.Njj(i.deleteOrganization())}),A.EFF(2),A.nI1(3,"i18n"),A.k0s(),A.j41(4,"button",23),A.EFF(5),A.nI1(6,"i18n"),A.k0s()()}if(2&t){const t=A.XpG();A.R7$(2),A.SpI(" ",A.bMT(3,3,"deleteOrganization")," "),A.R7$(2),A.Y8G("bitAction",t.purgeVault),A.R7$(),A.SpI(" ",A.bMT(6,5,"purgeVault")," ")}}class ct{constructor(t,i,n,e,o,a,r,s,c,l,p){this.i18nService=t,this.route=i,this.platformUtilsService=n,this.keyService=e,this.router=o,this.accountService=a,this.organizationService=r,this.organizationApiService=s,this.dialogService=c,this.formBuilder=l,this.toastService=p,this.selfHosted=!1,this.canEditSubscription=!0,this.loading=!0,this.canUseApi=!1,this.formGroup=this.formBuilder.group({orgName:this.formBuilder.control({value:"",disabled:!0},{validators:[m.k0.required,m.k0.maxLength(50)],updateOn:"change"}),billingEmail:this.formBuilder.control({value:"",disabled:!0},{validators:[m.k0.required,m.k0.email,m.k0.maxLength(256)]})}),this.collectionManagementFormGroup=this.formBuilder.group({limitCollectionCreation:this.formBuilder.control({value:!1,disabled:!1}),limitCollectionDeletion:this.formBuilder.control({value:!1,disabled:!1}),limitItemDeletion:this.formBuilder.control({value:!1,disabled:!1}),allowAdminAccessToAllCollectionItems:this.formBuilder.control({value:!1,disabled:!1})}),this.destroy$=new b.B,this.submit=()=>nt(this,void 0,void 0,function*(){if(this.formGroup.markAllAsTouched(),this.formGroup.invalid)return;const t={name:this.formGroup.value.orgName,billingEmail:this.formGroup.value.billingEmail};if(!this.org.hasPublicAndPrivateKeys){const i=yield(0,g._)(this.accountService.activeAccount$.pipe(k.F6,(0,h.n)(t=>this.keyService.orgKeys$(t)),(0,f.T)(t=>{var i;return null!==(i=t[this.organizationId])&&void 0!==i?i:null}))),n=yield this.keyService.makeKeyPair(i);t.keys=new R.B(n[0],n[1].encryptedString)}yield this.organizationApiService.save(this.organizationId,t),this.toastService.showToast({variant:"success",title:null,message:this.i18nService.t("organizationUpdated")})}),this.submitCollectionManagement=()=>nt(this,void 0,void 0,function*(){const t=new F;t.limitCollectionCreation=this.collectionManagementFormGroup.value.limitCollectionCreation,t.limitCollectionDeletion=this.collectionManagementFormGroup.value.limitCollectionDeletion,t.allowAdminAccessToAllCollectionItems=this.collectionManagementFormGroup.value.allowAdminAccessToAllCollectionItems,t.limitItemDeletion=this.collectionManagementFormGroup.value.limitItemDeletion,yield this.organizationApiService.updateCollectionManagement(this.organizationId,t),this.toastService.showToast({variant:"success",title:null,message:this.i18nService.t("updatedCollectionManagement")})}),this.purgeVault=()=>nt(this,void 0,void 0,function*(){const t=G.d.open(this.dialogService,{data:{organizationId:this.organizationId}});yield(0,I.s)(t.closed)})}ngOnInit(){return nt(this,void 0,void 0,function*(){this.selfHosted=!1;const t=yield(0,g._)((0,k.F6)(this.accountService.activeAccount$));this.route.params.pipe((0,h.n)(i=>this.organizationService.organizations$(t).pipe((0,l.Sw)(i.organizationId))),(0,h.n)(t=>(0,v.z)([(0,y.of)(t),(0,w.H)(this.organizationApiService.get(t.id)),(0,w.H)(this.organizationApiService.getKeys(t.id))])),(0,S.Q)(this.destroy$)).subscribe(([t,i,n])=>{this.organizationId=t.id,this.canEditSubscription=t.canEditSubscription,this.canUseApi=t.useApi,this.selfHosted||(this.formGroup.get("orgName").enable(),this.canEditSubscription&&this.formGroup.get("billingEmail").enable()),this.org=i,this.publicKeyBuffer=$.A.fromB64ToArray(null==n?void 0:n.publicKey),this.formGroup.patchValue({orgName:this.org.name,billingEmail:this.org.billingEmail}),this.collectionManagementFormGroup.patchValue({limitCollectionCreation:this.org.limitCollectionCreation,limitCollectionDeletion:this.org.limitCollectionDeletion,limitItemDeletion:this.org.limitItemDeletion,allowAdminAccessToAllCollectionItems:this.org.allowAdminAccessToAllCollectionItems}),this.loading=!1})})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}deleteOrganization(){return nt(this,void 0,void 0,function*(){const t=(0,M.f$)(this.dialogService,{data:{organizationId:this.organizationId,requestType:"RegularDelete"}});(yield(0,I.s)(t.closed))===M.ay.Deleted&&this.router.navigate(["/"])})}viewApiKey(){return nt(this,void 0,void 0,function*(){yield z.V.open(this.dialogService,{data:{keyType:"organization",entityId:this.organizationId,postKey:this.organizationApiService.getOrCreateApiKey.bind(this.organizationApiService),scope:"api.organization",grantType:"client_credentials",apiKeyTitle:"apiKey",apiKeyWarning:"apiKeyWarning",apiKeyDescription:"apiKeyDesc"}})})}rotateApiKey(){return nt(this,void 0,void 0,function*(){yield z.V.open(this.dialogService,{data:{keyType:"organization",isRotation:!0,entityId:this.organizationId,postKey:this.organizationApiService.rotateApiKey.bind(this.organizationApiService),scope:"api.organization",grantType:"client_credentials",apiKeyTitle:"apiKey",apiKeyWarning:"apiKeyWarning",apiKeyDescription:"apiKeyRotateDesc"}})})}}ct.ɵfac=function(t){return new(t||ct)(A.rXU(j.W),A.rXU(C.nX),A.rXU(D.y),A.rXU(T.Lu),A.rXU(C.Ix),A.rXU(X.D),A.rXU(l.PV),A.rXU(x.X),A.rXU(B.o),A.rXU(m.ok),A.rXU(V.f))},ct.ɵcmp=A.VBU({type:ct,selectors:[["app-org-account"]],standalone:!1,decls:7,vars:5,consts:[[4,"ngIf"],[3,"bitSubmit","formGroup",4,"ngIf"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","tw-text-muted",3,"title"],[1,"tw-sr-only"],[3,"bitSubmit","formGroup"],[1,"tw-grid","tw-grid-cols-2","tw-gap-5"],["bitInput","","id","orgName","type","text","formControlName","orgName"],["bitInput","","id","billingEmail","formControlName","billingEmail","type","email"],["size","2xl",3,"text","id"],[3,"fingerprintMaterial","publicKeyBuffer","fingerprintLabel"],["type","submit","bitButton","","bitFormButton","","buttonType","primary"],["bitTypography","h1",1,"tw-mt-16","tw-pb-2.5"],["bitTypography","body1"],["bitLink","","href","https://docs.bitwarden.com","target","_blank","rel","noreferrer"],[1,"tw-flex","tw-gap-2"],["type","button","bitButton","","buttonType","secondary",3,"click"],["type","checkbox","bitCheckbox","","formControlName","allowAdminAccessToAllCollectionItems"],["type","checkbox","bitCheckbox","","formControlName","limitCollectionCreation"],["type","checkbox","bitCheckbox","","formControlName","limitCollectionDeletion"],[1,"tw-italic"],["type","checkbox","bitCheckbox","","formControlName","limitItemDeletion"],["type","submit","bitButton","","bitFormButton","","buttonType","primary","id","collectionManagementSubmitButton"],["type","button","bitButton","","buttonType","danger",3,"click"],["type","button","bitButton","","buttonType","danger",3,"bitAction"]],template:function(t,i){1&t&&(A.nrm(0,"app-header"),A.j41(1,"bit-container"),A.DNE(2,et,6,7,"div",0)(3,ot,20,19,"form",1)(4,at,17,15,"ng-container",0)(5,rt,35,29,"form",1),A.nVh(6,st,7,7,"app-danger-zone"),A.k0s()),2&t&&(A.R7$(2),A.Y8G("ngIf",i.loading),A.R7$(),A.Y8G("ngIf",i.org&&!i.loading),A.R7$(),A.Y8G("ngIf",i.canUseApi),A.R7$(),A.Y8G("ngIf",i.org&&!i.loading),A.R7$(),A.vxM(i.loading?-1:6))},dependencies:[U.bT,m.qT,m.me,m.Zm,m.BC,m.cb,m.j4,m.JD,N.p,K.$,O.L,Y.fw,L.Q,P.P,J.H,_.f,H.j,q.J,W.h,Q.g,Z.r,a.l,o.t,tt.f,it.$],encapsulation:2});var lt=n(62423),pt=n(35284),ut=n(36219),dt=n(71804),mt=n(37380),bt=n(83516),gt=n(33818),ht=n(43600),ft=n(6804),It=n(18499),vt=n(58329),yt=n(1601),wt=n(62166),St=n(44432),Ft=n(58384),Rt=n(37856),kt=n(75556),$t=n(90300),Tt=n(4017),zt=n(91962),Gt=n(23327),Mt=function(t,i,n,e){return new(n||(n=Promise))(function(o,a){function r(t){try{c(e.next(t))}catch(i){a(i)}}function s(t){try{c(e.throw(t))}catch(i){a(i)}}function c(t){var i;t.done?o(t.value):(i=t.value,i instanceof n?i:new n(function(t){t(i)})).then(r,s)}c((e=e.apply(t,i||[])).next())})};const At=t=>({"mt-5":t});function Et(t,i){1&t&&A.nrm(0,"app-header")}function jt(t,i){1&t&&(A.j41(0,"h1"),A.EFF(1),A.nI1(2,"i18n"),A.k0s()),2&t&&(A.R7$(),A.JRh(A.bMT(2,1,"twoStepLogin")))}function Ct(t,i){1&t&&(A.j41(0,"h1"),A.EFF(1),A.nI1(2,"i18n"),A.k0s()),2&t&&(A.R7$(),A.JRh(A.bMT(2,1,"twoStepLoginEnforcement")))}function Dt(t,i){if(1&t&&(A.j41(0,"div",6),A.DNE(1,jt,3,3,"h1",1)(2,Ct,3,3,"h1",1),A.k0s()),2&t){const t=A.XpG();A.R7$(),A.Y8G("ngIf",!t.organizationId||!t.isEnterpriseOrg),A.R7$(),A.Y8G("ngIf",t.organizationId&&t.isEnterpriseOrg)}}function Xt(t,i){1&t&&(A.j41(0,"p"),A.EFF(1),A.nI1(2,"i18n"),A.k0s()),2&t&&(A.R7$(),A.JRh(A.bMT(2,1,"twoStepLoginDesc")))}function xt(t,i){1&t&&(A.qex(0),A.EFF(1),A.nI1(2,"i18n"),A.j41(3,"a",8),A.EFF(4),A.nI1(5,"i18n"),A.k0s(),A.nrm(6,"br"),A.EFF(7),A.nI1(8,"i18n"),A.nrm(9,"br")(10,"br"),A.j41(11,"p"),A.EFF(12),A.nI1(13,"i18n"),A.k0s(),A.bVm()),2&t&&(A.R7$(),A.SpI(" ",A.bMT(2,4,"twoStepLoginEnterpriseDescStart")," "),A.R7$(3),A.SpI("",A.bMT(5,6,"twoStepLoginPolicy"),"."),A.R7$(3),A.SpI(" ",A.bMT(8,8,"twoStepLoginOrganizationDuoDesc")," "),A.R7$(5),A.JRh(A.bMT(13,10,"twoStepLoginOrganizationSsoDesc")))}function Bt(t,i){1&t&&(A.EFF(0),A.nI1(1,"i18n"),A.nrm(2,"br"),A.EFF(3),A.nI1(4,"i18n")),2&t&&(A.SpI(" ",A.bMT(1,2,"twoStepLoginTeamsDesc")," "),A.R7$(3),A.SpI(" ",A.bMT(4,4,"twoStepLoginOrganizationDuoDesc")," "))}function Vt(t,i){if(1&t&&(A.qex(0),A.j41(1,"p"),A.DNE(2,xt,14,12,"ng-container",7)(3,Bt,5,6,"ng-template",null,0,A.C5r),A.k0s(),A.bVm()),2&t){const t=A.sdS(4),i=A.XpG();A.R7$(2),A.Y8G("ngIf",i.isEnterpriseOrg)("ngIfElse",t)}}function Ut(t,i){if(1&t){const t=A.RV6();A.j41(0,"bit-callout",9)(1,"p"),A.EFF(2),A.k0s(),A.j41(3,"button",10),A.bIt("click",function(){E.eBV(t);const i=A.XpG();return E.Njj(i.recoveryCode())}),A.EFF(4),A.nI1(5,"i18n"),A.k0s()()}if(2&t){const t=A.XpG();A.R7$(2),A.JRh(t.recoveryCodeWarningMessage),A.R7$(2),A.SpI(" ",A.bMT(5,2,"viewRecoveryCode")," ")}}function Nt(t,i){1&t&&(A.j41(0,"small"),A.nrm(1,"bit-icon",11),A.nI1(2,"i18n"),A.k0s()),2&t&&(A.R7$(),A.Y8G("ariaLabel",A.bMT(2,1,"loading")))}function Kt(t,i){1&t&&(A.j41(0,"bit-callout",9),A.EFF(1),A.nI1(2,"i18n"),A.k0s()),2&t&&(A.R7$(),A.SpI(" ",A.bMT(2,1,"twoStepLoginPolicyUserWarning")," "))}function Ot(t,i){1&t&&(A.qex(0),A.nrm(1,"bit-icon",22),A.nI1(2,"i18n"),A.bVm()),2&t&&(A.R7$(),A.Y8G("ariaLabel",A.bMT(2,1,"enabled")))}function Yt(t,i){1&t&&A.nrm(0,"app-premium-badge",23)}function Lt(t,i){if(1&t){const t=A.RV6();A.j41(0,"button",24),A.bIt("click",function(){E.eBV(t);const i=A.XpG().$implicit,n=A.XpG();return E.Njj(n.disablePremium2faTypeForNonPremiumUser(i.type))}),A.EFF(1),A.nI1(2,"i18n"),A.k0s()}2&t&&(A.R7$(),A.SpI(" ",A.bMT(2,1,"disable")," "))}function Pt(t,i){if(1&t){const t=A.RV6();A.j41(0,"button",25),A.nI1(1,"async"),A.bIt("click",function(){E.eBV(t);const i=A.XpG().$implicit,n=A.XpG();return E.Njj(n.manage(i.type))}),A.EFF(2),A.nI1(3,"i18n"),A.k0s()}if(2&t){const t=A.XpG().$implicit,i=A.XpG();A.Y8G("disabled",!A.bMT(1,2,i.canAccessPremium$)&&t.premium),A.R7$(2),A.SpI(" ",A.bMT(3,4,"manage")," ")}}function Jt(t,i){if(1&t&&(A.j41(0,"bit-item")(1,"div",12),A.nrm(2,"auth-two-factor-icon",13),A.k0s(),A.j41(3,"div",14)(4,"h3",15)(5,"div",16),A.EFF(6),A.k0s(),A.DNE(7,Ot,3,3,"ng-container",1)(8,Yt,1,0,"app-premium-badge",17),A.k0s(),A.j41(9,"div",18),A.EFF(10),A.k0s()(),A.j41(11,"bit-item-action",19),A.nVh(12,Lt,3,3,"button",20),A.nI1(13,"async"),A.vZN(14,Pt,4,6,"button",21),A.k0s()()),2&t){const t=i.$implicit,n=A.XpG();A.HbH(A.VkB("tw-py-4 providers-2fa-",t.type)),A.R7$(2),A.Y8G("provider",t.type)("name",t.name),A.R7$(3),A.Aen(t.enabled||t.premium?"display:inline-block":""),A.R7$(),A.SpI(" ",t.name," "),A.R7$(),A.Y8G("ngIf",t.enabled),A.R7$(),A.Y8G("ngIf",t.premium),A.R7$(2),A.JRh(t.description),A.R7$(2),A.vxM(t.premium&&t.enabled&&!A.bMT(13,12,n.canAccessPremium$)?12:14)}}class _t extends ht.q{constructor(t,i,n,e,o,a,r,s,c,l,p,u){super(t,i,n,e,r,s,c,l,p,u),this.route=o,this.organizationService=a,this.accountService=s,this.userVerificationService=p,this.toastService=u,this.tabbedHeader=!1}ngOnInit(){const t=Object.create(null,{ngOnInit:{get:()=>super.ngOnInit}});return Mt(this,void 0,void 0,function*(){const i=yield(0,g._)((0,k.F6)(this.accountService.activeAccount$));this.route.params.pipe((0,lt.H)(t=>this.organizationService.organizations$(i).pipe((0,l.Sw)(t.organizationId)).pipe((0,f.T)(i=>({params:t,organization:i})))),(0,pt.M)(t=>Mt(this,void 0,void 0,function*(){this.organizationId=t.params.organizationId,this.organization=t.organization})),(0,lt.H)(()=>Mt(this,void 0,void 0,function*(){return yield t.ngOnInit.call(this)})),(0,S.Q)(this.destroy$)).subscribe()})}manage(t){return Mt(this,void 0,void 0,function*(){var i;switch(null===(i=this.twoFactorSetupSubscription)||void 0===i||i.unsubscribe(),t){case dt.R.OrganizationDuo:{const i=ft.S.open(this.dialogService,{data:{type:t,organizationId:this.organizationId}}),n=yield(0,I.s)(i.closed);if(!n)return;const e=gt.U.open(this.dialogService,{data:{authResponse:n,organizationId:this.organizationId}});this.twoFactorSetupSubscription=e.componentInstance.onChangeStatus.pipe((0,ut.$)(),(0,S.Q)(this.destroy$)).subscribe(t=>{e.close(),this.updateStatus(t,dt.R.OrganizationDuo)});break}}})}getTwoFactorProviders(){return this.twoFactorService.getTwoFactorOrganizationProviders(this.organizationId)}filterProvider(t){return t!==dt.R.OrganizationDuo}}_t.ɵfac=function(t){return new(t||_t)(A.rXU(B.o),A.rXU(mt.fz),A.rXU(bt.U),A.rXU(It.m),A.rXU(C.nX),A.rXU(l.PV),A.rXU(vt.Q),A.rXU(X.D),A.rXU(yt.w),A.rXU(j.W),A.rXU(wt.i),A.rXU(V.f))},_t.ɵcmp=A.VBU({type:_t,selectors:[["app-two-factor-setup"]],standalone:!1,features:[A.Vt3],decls:14,vars:17,consts:[["teamsDescription",""],[4,"ngIf"],["class","tw-mt-6 tw-mb-2 tw-pb-2.5",4,"ngIf"],["type","warning",4,"ngIf"],[3,"ngClass"],[3,"class",4,"ngFor","ngForOf"],[1,"tw-mt-6","tw-mb-2","tw-pb-2.5"],[4,"ngIf","ngIfElse"],["bitLink","","routerLink","../policies"],["type","warning"],["type","button","bitButton","","buttonType","warning",3,"click"],["name","bwi-spinner",1,"bwi-spin","bwi-fw","tw-text-muted",3,"ariaLabel"],["slot","start",1,"tw-min-w-[120px]","tw-flex","tw-justify-center"],[1,"tw-flex","tw-items-center",3,"provider","name"],["bit-item-content","",1,"tw-px-4"],[1,"tw-mb-0"],[1,"tw-font-medium","tw-text-base"],["class","tw-ml-2",4,"ngIf"],[1,"tw-mt-2","tw-text-wrap"],["slot","end"],["type","button","bitButton","","buttonType","danger"],["type","button","bitButton","","buttonType","secondary",3,"disabled"],["name","bwi-check",1,"tw-text-success-600","bwi-fw","tw-ml-2",3,"ariaLabel"],[1,"tw-ml-2"],["type","button","bitButton","","buttonType","danger",3,"click"],["type","button","bitButton","","buttonType","secondary",3,"click","disabled"]],template:function(t,i){1&t&&(A.DNE(0,Et,1,0,"app-header",1),A.j41(1,"bit-container"),A.DNE(2,Dt,3,2,"div",2)(3,Xt,3,3,"p",1)(4,Vt,5,2,"ng-container",1)(5,Ut,6,4,"bit-callout",3),A.j41(6,"h2",4),A.EFF(7),A.nI1(8,"i18n"),A.DNE(9,Nt,3,3,"small",1),A.k0s(),A.DNE(10,Kt,3,3,"bit-callout",3),A.j41(11,"bit-item-group"),A.nI1(12,"i18n"),A.DNE(13,Jt,15,14,"bit-item",5),A.k0s()()),2&t&&(A.Y8G("ngIf",null!=i.organizationId),A.R7$(2),A.Y8G("ngIf",null==i.organizationId),A.R7$(),A.Y8G("ngIf",!i.organizationId),A.R7$(),A.Y8G("ngIf",i.organizationId),A.R7$(),A.Y8G("ngIf",!i.organizationId),A.R7$(),A.Y8G("ngClass",A.eq3(15,At,!i.organizationId)),A.R7$(),A.SpI(" ",A.bMT(8,11,"providers")," "),A.R7$(2),A.Y8G("ngIf",i.loading),A.R7$(),A.Y8G("ngIf",i.showPolicyWarning),A.R7$(),A.BMQ("aria-label",A.bMT(12,13,"providers")),A.R7$(2),A.Y8G("ngForOf",i.providers))},dependencies:[U.YU,U.Sq,U.bT,c.Wk,L.Q,St.G,J.H,Ft.R,Q.g,tt.f,Rt.a,kt.J,$t.g,Tt.D,zt._,Gt.U,U.Jj,it.$],encapsulation:2});const Ht=[{path:"",canActivate:[(0,p.V)(l.Dl)],children:[{path:"",pathMatch:"full",canActivate:[(0,u.r)(function(t){if(t.isOwner)return"account";if(t.canManagePolicies)return"policies";if(t.canAccessImport)return["tools","import"];if(t.canManageSso)return"sso";if(t.canManageScim)return"scim";if(t.canManageDeviceApprovals)return"device-approvals";return"/"})],children:[]},{path:"account",component:ct,canActivate:[(0,p.V)(t=>t.isOwner)],data:{titleId:"organizationInfo"}},{path:"two-factor",component:_t,canActivate:[(0,p.V)(t=>t.use2fa&&t.isOwner)],data:{titleId:"twoStepLogin"}},{path:"policies",component:d.sU,canActivate:[(0,p.V)(t=>t.canManagePolicies)],canDeactivate:[d.iZ],data:{titleId:"policies"}},{path:"tools",children:[{path:"import",loadComponent:()=>n.e(922).then(n.bind(n,6922)).then(t=>t.OrgImportComponent),canActivate:[(0,p.V)(t=>t.canAccessImport)],data:{titleId:"importNoun"}},{path:"export",loadComponent:()=>Promise.all([n.e(40),n.e(712)]).then(n.bind(n,21712)).then(t=>t.OrganizationVaultExportComponent),canActivate:[(0,p.V)(t=>t.canAccessExport)],data:{titleId:"exportNoun"}}]}]}];class qt{}qt.ɵfac=function(t){return new(t||qt)},qt.ɵmod=A.$C({type:qt}),qt.ɵinj=E.G2t({imports:[c.iI.forChild(Ht),c.iI]});class Wt{}Wt.ɵfac=function(t){return new(t||Wt)},Wt.ɵmod=A.$C({type:Wt}),Wt.ɵinj=E.G2t({imports:[s.G,qt,a.l,o.t,r.G,e.k]})}}]);
//# sourceMappingURL=449.c93b0794cf8da7e0cb0e.js.map