import{a as l,b as E}from"./chunk-DJ546A6R.js";import{B as L,C as R,D as b,E as B}from"./chunk-I7GW4F3B.js";import{c as P,d as D}from"./chunk-RWCAFOHA.js";import{$a as A,Gk as I,Hk as M,Oa as u,Pa as N,_a as v,ab as y,bb as k,eb as a,fb as F,qg as c,rg as $}from"./chunk-BPZQKZKD.js";import{b as S,c as x}from"./chunk-YBNTOQCK.js";import{J as C,Sa as G,be as j,ia as o,ka as g,ta as h,x as f,xa as n}from"./chunk-WL5U2YIT.js";import{e as U}from"./chunk-ADEKKGI2.js";var V,H=U(()=>{F();G();E();A();k();$();N();j();x();D();B();R();M();V=(()=>{let m=class m extends l{constructor(e,i,r,s,t){super(e,i,r),this.dataSourceSettingsService=s,this.assetServices=t}getPasswordConfigurations(e=!1){return this.getCache(e,this.getPasswordConfigurationsInternal())}savePasswordConfiguration(e){return this.assetServices.SavePasswordConfiguration(e)}updatePasswordConfiguration(e){return this.assetServices.UpdatePasswordConfiguration(e)}deletePasswordConfiguration(e){return this.assetServices.DeletePasswordConfiguration(e)}getConnectionPasswordConfiguration(e,i){return this.assetServices.GetConnectionPasswordConfiguration(e,i).pipe(g(r=>this.handleGetApiResult(r)),C(r=>!!r))}defaultPasswordConfiguration(){return new a({upperCaseMin:1,digitsMin:1,underlineMin:1,specialCharMin:1,highAnsiMin:1,lowerCaseMin:1,minusMin:1,spaceMin:1,bracketsMin:1,customCharactersMin:1})}getFromPasswordValidationViewModel$(e){return this.getPasswordConfigurations().pipe(o(this.destroyed$),f(i=>{if(e.templateType===u.List&&c.isGuid(e.templateId))return i.find(t=>t.id===e.templateId);let r=this.dataSourceSettingsService.dataSourceSettingsSnapshot.defaultPasswordTemplate;if(e.templateType===u.DataSourceSettings&&c.isGuid(r))return i.find(t=>t.id===r);let s=new v({id:e.templateId,minimumLengthCount:e.minimumLength,minimumLowerCaseCount:e.minimumLowercase,minimumUpperCaseCount:e.minimumUppercase,minimumNumericCount:e.minimumNumeric,minimumSymbolCount:e.minimumSymbol});return new a({id:e.templateId,complexity:s,mode:y.Default,length:e.minimumLength,includeLowerCase:e.isMinimumLowercase,lowerCaseMin:e.minimumLowercase,includeUpperCase:e.isMinimumUppercase,upperCaseMin:e.minimumUppercase,includeDigits:e.isMinimumNumeric,digitsMin:e.minimumNumeric,includeSpecialChar:e.isMinimumSymbol,specialCharMin:e.minimumSymbol})}))}fillPasswordValidationViewModelFromTemplate(e){let i=null;e.templateType===u.List&&c.isGuid(e.templateId)&&(i=e.templateId);let r=this.dataSourceSettingsService.dataSourceSettingsSnapshot.defaultPasswordTemplate;e.templateType===u.DataSourceSettings&&c.isGuid(r)&&(i=r),i&&this.getPasswordConfigurations().pipe(o(this.destroyed$)).subscribe(s=>{let t=s?.find(T=>T.id===i);t&&(e.isMinimumLength=t.length>0,e.minimumLength=t.length,e.isMinimumLowercase=t.lowerCaseMin>0,e.minimumLowercase=t.lowerCaseMin,e.isMinimumUppercase=t.upperCaseMin>0,e.minimumUppercase=t.upperCaseMin,e.isMinimumNumeric=t.digitsMin>0,e.minimumNumeric=t.digitsMin,e.isMinimumSymbol=t.specialCharMin>0,e.minimumSymbol=t.specialCharMin)})}getPasswordConfigurationsInternal(){return this.assetServices.GetPasswordConfigurations().pipe(g(e=>this.handleGetApiResult(e)),f(e=>this.returnWhenSuccessful(e,()=>e.data.map(i=>new a(i)))))}};m.\u0275fac=function(i){return new(i||m)(n(S),n(P),n(b),n(L),n(I))},m.\u0275prov=h({token:m,factory:m.\u0275fac,providedIn:"root"});let p=m;return p})()});export{V as a,H as b};
