!function(e){function t(t){for(var r,a,s=t[0],l=t[1],c=t[2],u=0,d=[];u0),i.ɵɵadvance(2),i.ɵɵproperty("ngIf",(null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.minLength)>0),i.ɵɵadvance(2),i.ɵɵproperty("ngIf",null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.requireUpper),i.ɵɵadvance(2),i.ɵɵproperty("ngIf",null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.requireLower),i.ɵɵadvance(2),i.ɵɵproperty("ngIf",null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.requireNumbers),i.ɵɵadvance(2),i.ɵɵproperty("ngIf",null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.requireSpecial)}}var y=function(e){return{clickable:e}},g=["*"],x=function(){function e(e){this.i18nService=e,this.type="info"}return e.prototype.ngOnInit=function(){this.calloutStyle=this.type,void 0===this.enforcedPolicyMessage&&(this.enforcedPolicyMessage=this.i18nService.t("masterPasswordPolicyInEffect")),"warning"===this.type||"danger"===this.type?("danger"===this.type&&(this.calloutStyle="danger"),void 0===this.title&&(this.title=this.i18nService.t("warning")),void 0===this.icon&&(this.icon="fa-warning")):"error"===this.type?(this.calloutStyle="danger",void 0===this.title&&(this.title=this.i18nService.t("error")),void 0===this.icon&&(this.icon="fa-bolt")):"tip"===this.type&&(this.calloutStyle="success",void 0===this.title&&(this.title=this.i18nService.t("tip")),void 0===this.icon&&(this.icon="fa-lightbulb-o"))},e.prototype.getPasswordScoreAlertDisplay=function(){if(null==this.enforcedPolicyOptions)return"";var e;switch(this.enforcedPolicyOptions.minComplexity){case 4:e=this.i18nService.t("strong");break;case 3:e=this.i18nService.t("good");break;default:e=this.i18nService.t("weak")}return e+" ("+this.enforcedPolicyOptions.minComplexity+")"},e.ɵfac=function(t){return new(t||e)(i.ɵɵdirectiveInject(o.I18nService))},e.ɵcmp=i.ɵɵdefineComponent({type:e,selectors:[["app-callout"]],inputs:{type:"type",icon:"icon",title:"title",clickable:"clickable",enforcedPolicyOptions:"enforcedPolicyOptions",enforcedPolicyMessage:"enforcedPolicyMessage"},ngContentSelectors:g,decls:9,vars:8,consts:[["role","alert",3,"ngClass"],["class","callout-heading",4,"ngIf"],["class","enforced-policy-options",4,"ngIf"],[1,"callout-heading"],["aria-hidden","true",3,"class",4,"ngIf"],["aria-hidden","true"],[1,"enforced-policy-options"],[4,"ngIf"]],template:function(e,t){1&e&&(i.ɵɵprojectionDef(),i.ɵɵelementStart(0,"div",0),i.ɵɵtext(1," "),i.ɵɵtemplate(2,c,4,2,"h3",1),i.ɵɵtext(3," "),i.ɵɵtemplate(4,v,17,7,"div",2),i.ɵɵtext(5," "),i.ɵɵprojection(6),i.ɵɵtext(7," "),i.ɵɵelementEnd(),i.ɵɵtext(8," ")),2&e&&(i.ɵɵclassMapInterpolate1("callout callout-",t.calloutStyle,""),i.ɵɵproperty("ngClass",i.ɵɵpureFunction1(6,y,t.clickable)),i.ɵɵadvance(2),i.ɵɵproperty("ngIf",t.title),i.ɵɵadvance(2),i.ɵɵproperty("ngIf",t.enforcedPolicyOptions))},directives:[a.NgClass,a.NgIf],pipes:[s.I18nPipe],encapsulation:2}),e}();t.CalloutComponent=x,("undefined"==typeof ngDevMode||ngDevMode)&&i.ɵsetClassMetadata(x,[{type:r.Component,args:[{selector:"app-callout",templateUrl:"callout.component.html"}]}],(function(){return[{type:o.I18nService}]}),{type:[{type:r.Input}],icon:[{type:r.Input}],title:[{type:r.Input}],clickable:[{type:r.Input}],enforcedPolicyOptions:[{type:r.Input}],enforcedPolicyMessage:[{type:r.Input}]})},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0)){this.modalCount++;var r=this.openInternal(e,t,!0),i=r[0];r[1];return i}},e.prototype.registerComponentFactoryResolver=function(e,t){this.factoryResolvers.set(e,t)},e.prototype.resolveComponentFactory=function(e){return this.factoryResolvers.has(e)?this.factoryResolvers.get(e).resolveComponentFactory(e):this.componentFactoryResolver.resolveComponentFactory(e)},e.prototype.openInternal=function(e,t,n){var r=this,i=this.createModalComponent(t),o=i[0],s=i[1];if(s.instance.childComponentType=e,n){this.applicationRef.attachView(s.hostView);var l=s.hostView.rootNodes[0];document.body.appendChild(l)}return o.onClosed.pipe(a.first()).subscribe((function(){n&&r.applicationRef.detachView(s.hostView),s.destroy(),r.modalCount--})),this.setupHandlers(o),[o,s]},e.prototype.setupHandlers=function(e){var t=this,n=null;e.onCreated.pipe(a.first()).subscribe((function(r){document.body.classList.add("modal-open"),(n=document.createElement("div")).className="modal-backdrop fade",n.style.zIndex=t.modalCount+"040",document.body.appendChild(n),r.querySelector(".modal-dialog").addEventListener("click",(function(e){e.stopPropagation()})),r.querySelector(".modal").style.zIndex=t.modalCount+"050";for(var i=0,o=Array.from(r.querySelectorAll('.modal, .modal *[data-dismiss="modal"]'));i1&&(r+=e.slice(1)),void 0===t[e=r]&&(e=e.toLowerCase()),void 0===t[e]&&(e=e.toUpperCase())}return t[e]},e}();t.BaseResponse=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PolicyService=void 0;var r=function(){};t.PolicyService=r},,function(e,t,n){"use strict";(function(e,r,i){Object.defineProperty(t,"__esModule",{value:!0}),t.Utils=void 0;var o=n(984),a="undefined"==typeof window?n(985):null,s=function(){function t(){}return t.init=function(){t.inited||(t.inited=!0,t.isNode=void 0!==e&&null!=e.release&&"node"===e.release.name,t.isBrowser="undefined"!=typeof window,t.isNativeScript=!t.isNode&&!t.isBrowser,t.isMobileBrowser=t.isBrowser&&this.isMobile(window),t.isAppleMobileBrowser=t.isBrowser&&this.isAppleMobile(window),t.global=t.isNativeScript||t.isNode&&!t.isBrowser?r:window)},t.fromB64ToArray=function(e){if(t.isNode||t.isNativeScript)return new Uint8Array(i.from(e,"base64"));for(var n=window.atob(e),r=new Uint8Array(n.length),o=0;o-1&&(n=t.getUrlObject("http://"+e)));return n},t.camelToPascalCase=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},t.validIpAddress=function(e){return/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(e)},t.isMobile=function(e){var t,n=!1;return t=e.navigator.userAgent||e.navigator.vendor||e.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(n=!0),n||null!=e.navigator.userAgent.match(/iPad/i)},t.isAppleMobile=function(e){return null!=e.navigator.userAgent.match(/iPhone/i)||null!=e.navigator.userAgent.match(/iPad/i)},t.getUrlObject=function(e){try{if(null!=a)return a.URL?new a.URL(e):a.parse(e);if("function"==typeof URL)return new URL(e);if(null!=window){var t=e.indexOf("://")>-1;if(!t&&e.indexOf(".")>-1)e="http://"+e;else if(!t)return null;var n=window.document.createElement("a");return n.href=e,n}}catch(r){}return null},t.inited=!1,t.isNativeScript=!1,t.isNode=!1,t.isBrowser=!0,t.isMobileBrowser=!1,t.isAppleMobileBrowser=!1,t.global=null,t.tldEndingRegex=/.*\.(com|net|org|edu|uk|gov|ca|de|jp|fr|au|ru|ch|io|es|us|co|xyz|info|ly|mil)$/,t.regexpEmojiPresentation=/(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])/g,t}();t.Utils=s,s.init()}).call(this,n(128),n(92),n(106).Buffer)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordGenerationService=void 0;var r=function(){};t.PasswordGenerationService=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseImporter=void 0;var r=n(688),i=n(139),o=n(179),a=n(308),s=n(28),l=n(261),c=n(141),p=n(160),u=n(103),d=n(40),m=n(131),f=n(104),h=n(686),v=function(){function e(){this.organizationId=null,this.logService=new h.ConsoleLogService(!1),this.newLineRegex=/(?:\r\n|\r|\n)/,this.passwordFieldNames=["password","pass word","passphrase","pass phrase","pass","code","code word","codeword","secret","secret word","personpwd","key","keyword","key word","keyphrase","key phrase","form_pw","wppassword","pin","pwd","pw","pword","passwd","p","serial","serial#","license key","reg #","passwort"],this.usernameFieldNames=["user","name","user name","username","login name","email","e-mail","id","userid","user id","login","form_loginname","wpname","mail","loginid","login id","log","personlogin","first name","last name","card#","account #","member","member #","nom","benutzername"],this.notesFieldNames=["note","notes","comment","comments","memo","description","free form","freeform","free text","freetext","free","kommentar"],this.uriFieldNames=["url","hyper link","hyperlink","link","host","hostname","host name","server","address","hyper ref","href","web","website","web site","site","web-site","uri","ort","adresse"],this.parseCsvOptions={encoding:"UTF-8",skipEmptyLines:!1}}return Object.defineProperty(e.prototype,"organization",{get:function(){return null!=this.organizationId},enumerable:!1,configurable:!0}),e.prototype.parseXml=function(e){var t=(new DOMParser).parseFromString(e,"application/xml");return null!=t&&null==t.querySelector("parsererror")?t:null},e.prototype.parseCsv=function(e,t,n){var i=this;void 0===n&&(n={});var o=Object.assign({header:t},this.parseCsvOptions,n);e=this.splitNewLine(e).join("\n").trim();var a=r.parse(e,o);return null!=a.errors&&a.errors.length>0&&a.errors.forEach((function(e){null!=e.row&&i.logService.warning("Error parsing row "+e.row+": "+e.message)})),a.data&&a.data.length>0?a.data:null},e.prototype.parseSingleRowCsv=function(e){if(this.isNullOrWhitespace(e))return null;var t=this.parseCsv(e,!1);return null!=t&&t.length>0&&t[0].length>0?t[0]:null},e.prototype.makeUriArray=function(e){var t=this;if(null==e)return null;if("string"==typeof e){var n=new a.LoginUriView;return n.uri=this.fixUri(e),this.isNullOrWhitespace(n.uri)?null:(n.match=null,[n])}if(e.length>0){var r=[];return e.forEach((function(e){var n=new a.LoginUriView;n.uri=t.fixUri(e),t.isNullOrWhitespace(n.uri)||(n.match=null,r.push(n))})),0===r.length?null:r}return null},e.prototype.fixUri=function(e){return null==e?null:(-1===(e=e.trim()).indexOf("://")&&e.indexOf(".")>=0&&(e="http://"+e),e.length>1e3?e.substring(0,1e3):e)},e.prototype.nameFromUrl=function(e){var t=s.Utils.getHostname(e);return this.isNullOrWhitespace(t)?null:t.startsWith("www.")?t.replace("www.",""):t},e.prototype.isNullOrWhitespace=function(e){return s.Utils.isNullOrWhitespace(e)},e.prototype.getValueOrDefault=function(e,t){return void 0===t&&(t=null),this.isNullOrWhitespace(e)?t:e},e.prototype.splitNewLine=function(e){return e.split(this.newLineRegex)},e.prototype.getCardBrand=function(e){if(this.isNullOrWhitespace(e))return null;var t=new RegExp("^4");return null!=e.match(t)?"Visa":/^(5[1-5][0-9]{14}|2(22[1-9][0-9]{12}|2[3-9][0-9]{13}|[3-6][0-9]{14}|7[0-1][0-9]{13}|720[0-9]{12}))$/.test(e)?"Mastercard":(t=new RegExp("^3[47]"),null!=e.match(t)?"Amex":(t=new RegExp("^(6011|622(12[6-9]|1[3-9][0-9]|[2-8][0-9]{2}|9[0-1][0-9]|92[0-5]|64[4-9])|65)"),null!=e.match(t)?"Discover":(t=new RegExp("^36"),null!=e.match(t)?"Diners Club":(t=new RegExp("^30[0-5]"),null!=e.match(t)?"Diners Club":(t=new RegExp("^35(2[89]|[3-8][0-9])"),null!=e.match(t)?"JCB":(t=new RegExp("^(4026|417500|4508|4844|491(3|7))"),null!=e.match(t)?"Visa":null))))))},e.prototype.setCardExpiration=function(e,t){if(!this.isNullOrWhitespace(t)){var n=(t=t.replace(/\s/g,"")).split("/");if(2===n.length){var r=null,i=null;if(1!==n[0].length&&2!==n[0].length||2===(r=n[0]).length&&"0"===r[0]&&(r=r.substr(1,1)),2!==n[1].length&&4!==n[1].length||(i=2===r.length?"20"+n[1]:n[1]),null!=r&&null!=i)return e.card.expMonth=r,e.card.expYear=i,!0}}return!1},e.prototype.moveFoldersToCollections=function(e){e.folderRelationships.forEach((function(t){return e.collectionRelationships.push(t)})),e.collections=e.folders.map((function(e){var t=new o.CollectionView;return t.name=e.name,t})),e.folderRelationships=[],e.folders=[]},e.prototype.querySelectorDirectChild=function(e,t){var n=this.querySelectorAllDirectChild(e,t);return 0===n.length?null:n[0]},e.prototype.querySelectorAllDirectChild=function(e,t){return Array.from(e.querySelectorAll(t)).filter((function(t){return t.parentNode===e}))},e.prototype.initLoginCipher=function(){var e=new i.CipherView;return e.favorite=!1,e.notes="",e.fields=[],e.login=new p.LoginView,e.type=d.CipherType.Login,e},e.prototype.cleanupCipher=function(e){null!=e&&(e.type!==d.CipherType.Login&&(e.login=null),this.isNullOrWhitespace(e.name)&&(e.name="--"),this.isNullOrWhitespace(e.notes)?e.notes=null:e.notes=e.notes.trim(),null!=e.fields&&0===e.fields.length&&(e.fields=null))},e.prototype.processKvp=function(e,t,n,r){if(void 0===r&&(r=m.FieldType.Text),!this.isNullOrWhitespace(n))if(this.isNullOrWhitespace(t)&&(t=""),n.length>200||n.trim().search(this.newLineRegex)>-1)null==e.notes&&(e.notes=""),e.notes+=t+": "+this.splitNewLine(n).join("\n")+"\n";else{null==e.fields&&(e.fields=[]);var i=new l.FieldView;i.type=r,i.name=t,i.value=n,e.fields.push(i)}},e.prototype.processFolder=function(e,t){var n=e.folders.length,r=!this.isNullOrWhitespace(t),i=r;if(r)for(var o=0;o0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]1&&(n=this.getFirstLetters(r,this.charCount)),null==n&&(n=this.unicodeSafeSubstring(r,this.charCount)),n.match(a.Utils.regexpEmojiPresentation)&&(n=n.match(a.Utils.regexpEmojiPresentation)[0]),o=this.getCharText(n),s=this.stringToColor(r),(l=this.getSvg(this.size,s)).appendChild(o),c=window.document.createElement("div").appendChild(l).outerHTML,p=window.btoa(unescape(encodeURIComponent(c))),this.src="data:image/svg+xml;base64,"+p,i.label=4;case 4:return[2]}}))}))},e.prototype.stringToColor=function(e){for(var t=0,n=0;n>8*n&255).toString(16)).substr(-2)}return r},e.prototype.getFirstLetters=function(e,t){var n=e.split(" ");if(n.length>1){for(var r="",i=0;i'}]}],(function(){return[{type:l.DomSanitizer},{type:c.CryptoFunctionService},{type:p.StateService}]}),{data:[{type:o.Input}],email:[{type:o.Input}],size:[{type:o.Input}],charCount:[{type:o.Input}],textColor:[{type:o.Input}],fontSize:[{type:o.Input}],fontWeight:[{type:o.Input}],dynamic:[{type:o.Input}],circle:[{type:o.Input}]})},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LogService=void 0;var r=function(){};t.LogService=r},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]-1?e[a]=s||null:e[a]=s?new o.EncString(s):null}},e.prototype.buildDataModel=function(e,t,n,r){for(var i in void 0===r&&(r=[]),n)if(n.hasOwnProperty(i)){var o=e[n[i]||i];r.indexOf(i)>-1?t[i]=null!=o?o:null:t[i]=null!=o?o.encryptedString:null}},e.prototype.decryptObj=function(e,t,n,o){return void 0===o&&(o=null),r(this,void 0,void 0,(function(){var r,a,s;return i(this,(function(i){switch(i.label){case 0:for(s in r=[],a=this,t)t.hasOwnProperty(s)&&function(i){var s=Promise.resolve().then((function(){var e=t[i]||i;return a[e]?a[e].decrypt(n,o):null})).then((function(t){e[i]=t}));r.push(s)}(s);return[4,Promise.all(r)];case 1:return i.sent(),[2,e]}}))}))},e}();t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordVerificationRequest=void 0;var r=function(){};t.PasswordVerificationRequest=r},,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CardView=void 0;var r=function(){function e(e){this.cardholderName=null,this.expMonth=null,this.expYear=null,this.code=null,this._brand=null,this._number=null,this._subTitle=null}return Object.defineProperty(e.prototype,"maskedCode",{get:function(){return null!=this.code?"•".repeat(this.code.length):null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maskedNumber",{get:function(){return null!=this.number?"•".repeat(this.number.length):null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"brand",{get:function(){return this._brand},set:function(e){this._brand=e,this._subTitle=null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"number",{get:function(){return this._number},set:function(e){this._number=e,this._subTitle=null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"subTitle",{get:function(){if(null==this._subTitle&&(this._subTitle=this.brand,null!=this.number&&this.number.length>=4)){null!=this._subTitle&&""!==this._subTitle?this._subTitle+=", ":this._subTitle="";var e=this.number.length>=5&&null!=this.number.match(new RegExp("^3[47]"))?5:4;this._subTitle+="*"+this.number.substr(this.number.length-e)}return this._subTitle},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"expiration",{get:function(){if(!this.expMonth&&!this.expYear)return null;var e=null!=this.expMonth?("0"+this.expMonth).slice(-2):"__";return e+=" / "+(null!=this.expYear?this.formatYear(this.expYear):"____")},enumerable:!1,configurable:!0}),e.prototype.formatYear=function(e){return 2===e.length?"20"+e:e},e}();t.CardView=r},,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CryptoFunctionService=void 0;var r=function(){};t.CryptoFunctionService=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VaultTimeoutService=void 0;var r=function(){};t.VaultTimeoutService=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValidationService=void 0;var r=n(0),i=(n(1),n(3),n(0)),o=n(1),a=n(3),s=function(){function e(e,t){this.i18nService=e,this.platformUtilsService=t}return e.prototype.showError=function(e){var t=this.i18nService.t("unexpectedError"),n=[];return null!=e&&"string"==typeof e?n.push(e):null==e||"object"!=typeof e?n.push(t):null!=e.validationErrors?n=n.concat(e.getAllMessages()):n.push(e.message?e.message:t),1===n.length?this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),n[0]):n.length>1&&this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),n,{timeout:5e3*n.length}),n},e.ɵfac=function(t){return new(t||e)(i.ɵɵinject(o.I18nService),i.ɵɵinject(a.PlatformUtilsService))},e.ɵprov=i.ɵɵdefineInjectable({token:e,factory:e.ɵfac}),e}();t.ValidationService=s,("undefined"==typeof ngDevMode||ngDevMode)&&i.ɵsetClassMetadata(s,[{type:r.Injectable}],(function(){return[{type:o.I18nService},{type:a.PlatformUtilsService}]}),null)},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]-1?(e="http://"+e,t=!0):this.imageEnabled&&(t=0===e.indexOf("http")&&e.indexOf(".")>-1),this.imageEnabled&&t)try{this.image=this.iconsUrl+"/"+l.Utils.getHostname(e)+"/icon.png",this.fallbackImage="images/fa-globe.png"}catch(n){}}else this.image=null},e.ɵfac=function(t){return new(t||e)(c.ɵɵdirectiveInject(p.EnvironmentService),c.ɵɵdirectiveInject(u.StateService))},e.ɵcmp=c.ɵɵdefineComponent({type:e,selectors:[["app-vault-icon"]],inputs:{cipher:"cipher"},features:[c.ɵɵNgOnChangesFeature],decls:7,vars:2,consts:[["aria-hidden","true",1,"icon"],["alt","",3,"src","appFallbackSrc",4,"ngIf"],[3,"class",4,"ngIf"],["alt","",3,"src","appFallbackSrc"]],template:function(e,t){1&e&&(c.ɵɵelementStart(0,"div",0),c.ɵɵtext(1," "),c.ɵɵtemplate(2,f,1,2,"img",1),c.ɵɵtext(3," "),c.ɵɵtemplate(4,h,1,3,"i",2),c.ɵɵtext(5," "),c.ɵɵelementEnd(),c.ɵɵtext(6," ")),2&e&&(c.ɵɵadvance(2),c.ɵɵproperty("ngIf",t.imageEnabled&&t.image),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!t.imageEnabled||!t.image))},directives:[d.NgIf,m.FallbackSrcDirective],encapsulation:2}),e}();t.IconComponent=y,("undefined"==typeof ngDevMode||ngDevMode)&&c.ɵsetClassMetadata(y,[{type:o.Component,args:[{selector:"app-vault-icon",templateUrl:"icon.component.html"}]}],(function(){return[{type:p.EnvironmentService},{type:u.StateService}]}),{cipher:[{type:o.Input}]})},,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenService=void 0;var r=function(){};t.TokenService=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExportService=void 0;var r=function(){};t.ExportService=r},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.BroadcasterService=void 0;var o=n(0),a=n(1005),s=n(0),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.ɵfac=function(e){return c(e||t)},t.ɵprov=s.ɵɵdefineInjectable({token:t,factory:t.ɵfac}),t}(a.BroadcasterService);t.BroadcasterService=l;var c=s.ɵɵgetInheritedFactory(l);("undefined"==typeof ngDevMode||ngDevMode)&&s.ɵsetClassMetadata(l,[{type:o.Injectable}],null,null)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorProviderType=void 0,function(e){e[e.Authenticator=0]="Authenticator",e[e.Email=1]="Email",e[e.Duo=2]="Duo",e[e.Yubikey=3]="Yubikey",e[e.U2f=4]="U2f",e[e.Remember=5]="Remember",e[e.OrganizationDuo=6]="OrganizationDuo",e[e.WebAuthn=7]="WebAuthn"}(t.TwoFactorProviderType||(t.TwoFactorProviderType={}))},,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BasePolicyComponent=t.BasePolicy=void 0;var r=n(0),i=n(11),o=n(1037),a=(n(307),n(0)),s=function(){function e(){}return e.prototype.display=function(e){return!0},e}();t.BasePolicy=s;var l=function(){function e(){this.enabled=new i.FormControl(!1),this.data=null}return e.prototype.ngOnInit=function(){this.enabled.setValue(this.policyResponse.enabled),null!=this.policyResponse.data&&this.loadData()},e.prototype.loadData=function(){var e;this.data.patchValue(null!==(e=this.policyResponse.data)&&void 0!==e?e:{})},e.prototype.buildRequestData=function(){return null!=this.data?this.data.value:null},e.prototype.buildRequest=function(e){var t=new o.PolicyRequest;return t.enabled=this.enabled.value,t.type=this.policy.type,t.data=this.buildRequestData(),Promise.resolve(t)},e.ɵfac=function(t){return new(t||e)},e.ɵdir=a.ɵɵdefineDirective({type:e,inputs:{policyResponse:"policyResponse",policy:"policy"}}),e}();t.BasePolicyComponent=l,("undefined"==typeof ngDevMode||ngDevMode)&&a.ɵsetClassMetadata(l,[{type:r.Directive}],null,{policyResponse:[{type:r.Input}],policy:[{type:r.Input}]})},,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SearchPipe=void 0;var r=n(0),i=n(0),o=function(){function e(){}return e.prototype.transform=function(e,t,n,r,i){return null==e||0===e.length?[]:null==t||t.length<2?e:(t=t.trim().toLowerCase(),e.filter((function(e){return null!=n&&null!=e[n]&&e[n].toString().toLowerCase().indexOf(t)>-1||(null!=r&&null!=e[r]&&e[r].toString().toLowerCase().indexOf(t)>-1||null!=i&&null!=e[i]&&e[i].toString().toLowerCase().indexOf(t)>-1)})))},e.ɵfac=function(t){return new(t||e)},e.ɵpipe=i.ɵɵdefinePipe({name:"search",type:e,pure:!0}),e}();t.SearchPipe=o,("undefined"==typeof ngDevMode||ngDevMode)&&i.ɵsetClassMetadata(o,[{type:r.Pipe,args:[{name:"search"}]}],null,null)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TotpService=void 0;var r=function(){};t.TotpService=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FieldType=void 0,function(e){e[e.Text=0]="Text",e[e.Hidden=1]="Hidden",e[e.Boolean=2]="Boolean"}(t.FieldType||(t.FieldType={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendService=void 0;var r=function(){};t.SendService=r},,,,,,function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]-1)try{window.document.body.removeChild(e)}catch(t){}}))}),500),this.hidePaypal||(window.document.head.removeChild(this.btScript),window.setTimeout((function(){Array.from(window.document.head.querySelectorAll("script")).forEach((function(e){if(null!=e.src&&e.src.indexOf("paypal")>-1)try{window.document.head.removeChild(e)}catch(t){}}));var e=window.document.head.querySelector("#braintree-dropin-stylesheet");if(null!=e)try{window.document.head.removeChild(e)}catch(t){}}),500))},e.prototype.changeMethod=function(){var e=this;this.btInstance=null,this.method===a.PaymentMethodType.PayPal?window.setTimeout((function(){window.braintree.dropin.create({authorization:"production_qfbsv8kc_njj2zjtyngtjmbjd",container:"#bt-dropin-container",paymentOptionPriority:["paypal"],paypal:{flow:"vault",buttonStyle:{label:"pay",size:"medium",shape:"pill",color:"blue",tagline:"false"}}},(function(t,n){null==t?e.btInstance=n:console.error(t)}))}),250):this.setStripeElement()},e.prototype.createPaymentToken=function(){var e=this;return new Promise((function(t,n){e.method===a.PaymentMethodType.Credit?t([null,e.method]):e.method===a.PaymentMethodType.PayPal?e.btInstance.requestPaymentMethod().then((function(n){t([n.nonce,e.method])})).catch((function(e){n(e.message)})):e.method!==a.PaymentMethodType.Card&&e.method!==a.PaymentMethodType.BankAccount||(e.method===a.PaymentMethodType.Card?e.apiService.postSetupPayment().then((function(t){return e.stripe.handleCardSetup(t,e.stripeCardNumberElement)})).then((function(r){r.error?n(r.error.message):r.setupIntent&&"succeeded"===r.setupIntent.status?t([r.setupIntent.payment_method,e.method]):n()})):e.stripe.createToken("bank_account",e.bank).then((function(r){r.error?n(r.error.message):r.token&&null!=r.token.id?t([r.token.id,e.method]):n()})))}))},e.prototype.handleStripeCardPayment=function(e,t){var n=this;return new Promise((function(o,a){if(!n.showMethods||null!=n.stripeCardNumberElement){return(n.showMethods?n.stripe.handleCardSetup(e,n.stripeCardNumberElement):n.stripe.handleCardSetup(e)).then((function(e){return r(n,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return e.error?(a(e.error.message),[3,5]):[3,1];case 1:return e.paymentIntent&&"succeeded"===e.paymentIntent.status?null==t?[3,3]:[4,t()]:[3,4];case 2:n.sent(),n.label=3;case 3:return o(),[3,5];case 4:a(),n.label=5;case 5:return[2]}}))}))}))}a()}))},e.prototype.setStripeElement=function(){var e=this;window.setTimeout((function(){e.showMethods&&e.method===a.PaymentMethodType.Card&&(null==e.stripeCardNumberElement&&(e.stripeCardNumberElement=e.stripeElements.create("cardNumber",{style:e.StripeElementStyle,classes:e.StripeElementClasses,placeholder:""})),null==e.stripeCardExpiryElement&&(e.stripeCardExpiryElement=e.stripeElements.create("cardExpiry",{style:e.StripeElementStyle,classes:e.StripeElementClasses})),null==e.stripeCardCvcElement&&(e.stripeCardCvcElement=e.stripeElements.create("cardCvc",{style:e.StripeElementStyle,classes:e.StripeElementClasses,placeholder:""})),e.stripeCardNumberElement.mount("#stripe-card-number-element"),e.stripeCardExpiryElement.mount("#stripe-card-expiry-element"),e.stripeCardCvcElement.mount("#stripe-card-cvc-element"))}),50)},e.prototype.setTheme=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.platformUtilsService.getEffectiveTheme()];case 1:return e.sent()===s.ThemeType.Dark?(this.StripeElementStyle.base.color=_,this.StripeElementStyle.base["::placeholder"].color=A,this.StripeElementStyle.invalid.color=_):(this.StripeElementStyle.base.color=P,this.StripeElementStyle.base["::placeholder"].color=k,this.StripeElementStyle.invalid.color=P),[2]}}))}))},e.ɵfac=function(t){return new(t||e)(c.ɵɵdirectiveInject(p.PlatformUtilsService),c.ɵɵdirectiveInject(u.ApiService))},e.ɵcmp=c.ɵɵdefineComponent({type:e,selectors:[["app-payment"]],inputs:{showMethods:"showMethods",showOptions:"showOptions",method:"method",hideBank:"hideBank",hidePaypal:"hidePaypal",hideCredit:"hideCredit"},decls:10,vars:5,consts:[["class","mb-4 text-lg",4,"ngIf"],[4,"ngIf"],[1,"mb-4","text-lg"],[1,"form-check","form-check-inline","mr-4"],["type","radio","name","Method","id","method-card",1,"form-check-input",3,"value","ngModel","ngModelChange","change"],["for","method-card",1,"form-check-label"],["aria-hidden","true",1,"fa","fa-fw","fa-credit-card"],["class","form-check form-check-inline mr-4",4,"ngIf"],["class","form-check form-check-inline",4,"ngIf"],["type","radio","name","Method","id","method-bank",1,"form-check-input",3,"value","ngModel","ngModelChange","change"],["for","method-bank",1,"form-check-label"],["aria-hidden","true",1,"fa","fa-fw","fa-university"],[1,"form-check","form-check-inline"],["type","radio","name","Method","id","method-paypal",1,"form-check-input",3,"value","ngModel","ngModelChange","change"],["for","method-paypal",1,"form-check-label"],["aria-hidden","true",1,"fa","fa-fw","fa-paypal"],["type","radio","name","Method","id","method-credit",1,"form-check-input",3,"value","ngModel","ngModelChange","change"],["for","method-credit",1,"form-check-label"],["aria-hidden","true",1,"fa","fa-fw","fa-dollar"],[1,"row"],[1,"form-group","col-4"],["for","stripe-card-number-element"],["id","stripe-card-number-element",1,"form-control","stripe-form-control"],[1,"form-group","col-8","d-flex","align-items-end"],["src","images/cards.png","alt","Visa, MasterCard, Discover, AmEx, JCB, Diners Club, UnionPay","width","323","height","32"],["for","stripe-card-expiry-element"],["id","stripe-card-expiry-element",1,"form-control","stripe-form-control"],[1,"d-flex"],["for","stripe-card-cvc-element"],["href","https://www.cvvnumber.com/cvv.html","tabindex","-1","target","_blank","rel","noopener noreferrer",1,"ml-auto",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-question-circle-o"],["id","stripe-card-cvc-element",1,"form-control","stripe-form-control"],["type","warning",3,"title"],[1,"form-group","col-6"],["for","routing_number"],["id","routing_number","type","text","name","routing_number","required","","appInputVerbatim","",1,"form-control",3,"ngModel","ngModelChange"],["for","account_number"],["id","account_number","type","text","name","account_number","required","","appInputVerbatim","",1,"form-control",3,"ngModel","ngModelChange"],["for","account_holder_name"],["id","account_holder_name","type","text","name","account_holder_name","required","",1,"form-control",3,"ngModel","ngModelChange"],["for","account_holder_type"],["id","account_holder_type","name","account_holder_type","required","",1,"form-control",3,"ngModel","ngModelChange"],["value",""],["value","company"],["value","individual"],[1,"mb-3"],["id","bt-dropin-container",1,"mb-1"],[1,"text-muted"],["type","note"]],template:function(e,t){1&e&&(c.ɵɵtemplate(0,S,19,8,"div",0),c.ɵɵtext(1," "),c.ɵɵtemplate(2,w,46,12,"ng-container",1),c.ɵɵtext(3," "),c.ɵɵtemplate(4,C,60,34,"ng-container",1),c.ɵɵtext(5," "),c.ɵɵtemplate(6,I,11,3,"ng-container",1),c.ɵɵtext(7," "),c.ɵɵtemplate(8,E,6,3,"ng-container",1),c.ɵɵtext(9," ")),2&e&&(c.ɵɵproperty("ngIf",t.showOptions&&t.showMethods),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",t.showMethods&&t.method===t.paymentMethodType.Card),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",t.showMethods&&t.method===t.paymentMethodType.BankAccount),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",t.showMethods&&t.method===t.paymentMethodType.PayPal),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",t.showMethods&&t.method===t.paymentMethodType.Credit))},directives:[d.NgIf,m.RadioControlValueAccessor,m.DefaultValueAccessor,m.NgControlStatus,m.NgModel,f.A11yTitleDirective,h.CalloutComponent,m.RequiredValidator,v.InputVerbatimDirective,m.SelectControlValueAccessor,m.NgSelectOption,m.ɵangular_packages_forms_forms_z],pipes:[y.I18nPipe],encapsulation:2}),e}();t.PaymentComponent=O,("undefined"==typeof ngDevMode||ngDevMode)&&c.ɵsetClassMetadata(O,[{type:o.Component,args:[{selector:"app-payment",templateUrl:"payment.component.html"}]}],(function(){return[{type:p.PlatformUtilsService},{type:u.ApiService}]}),{showMethods:[{type:o.Input}],showOptions:[{type:o.Input}],method:[{type:o.Input}],hideBank:[{type:o.Input}],hidePaypal:[{type:o.Input}],hideCredit:[{type:o.Input}]})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CipherView=void 0;var r=n(181),i=n(40),o=n(87),a=n(140),s=n(160),l=n(103),c=function(){function e(e){var t;this.id=null,this.organizationId=null,this.folderId=null,this.name=null,this.notes=null,this.type=null,this.favorite=!1,this.organizationUseTotp=!1,this.edit=!1,this.viewPassword=!0,this.login=new s.LoginView,this.identity=new a.IdentityView,this.card=new o.CardView,this.secureNote=new l.SecureNoteView,this.attachments=null,this.fields=null,this.passwordHistory=null,this.collectionIds=null,this.revisionDate=null,this.deletedDate=null,this.reprompt=r.CipherRepromptType.None,e&&(this.id=e.id,this.organizationId=e.organizationId,this.folderId=e.folderId,this.favorite=e.favorite,this.organizationUseTotp=e.organizationUseTotp,this.edit=e.edit,this.viewPassword=e.viewPassword,this.type=e.type,this.localData=e.localData,this.collectionIds=e.collectionIds,this.revisionDate=e.revisionDate,this.deletedDate=e.deletedDate,this.reprompt=null!==(t=e.reprompt)&&void 0!==t?t:r.CipherRepromptType.None)}return Object.defineProperty(e.prototype,"subTitle",{get:function(){switch(this.type){case i.CipherType.Login:return this.login.subTitle;case i.CipherType.SecureNote:return this.secureNote.subTitle;case i.CipherType.Card:return this.card.subTitle;case i.CipherType.Identity:return this.identity.subTitle}return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasPasswordHistory",{get:function(){return this.passwordHistory&&this.passwordHistory.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasAttachments",{get:function(){return this.attachments&&this.attachments.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasOldAttachments",{get:function(){if(this.hasAttachments)for(var e=0;e0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"passwordRevisionDisplayDate",{get:function(){return this.type!==i.CipherType.Login||null==this.login||null==this.login.password||""===this.login.password?null:this.login.passwordRevisionDate},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDeleted",{get:function(){return null!=this.deletedDate},enumerable:!1,configurable:!0}),e}();t.CipherView=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IdentityView=void 0;var r=n(28),i=function(){function e(e){this.title=null,this.middleName=null,this.address1=null,this.address2=null,this.address3=null,this.city=null,this.state=null,this.postalCode=null,this.country=null,this.company=null,this.email=null,this.phone=null,this.ssn=null,this.username=null,this.passportNumber=null,this.licenseNumber=null,this._firstName=null,this._lastName=null,this._subTitle=null}return Object.defineProperty(e.prototype,"firstName",{get:function(){return this._firstName},set:function(e){this._firstName=e,this._subTitle=null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastName",{get:function(){return this._lastName},set:function(e){this._lastName=e,this._subTitle=null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"subTitle",{get:function(){return null!=this._subTitle||null==this.firstName&&null==this.lastName||(this._subTitle="",null!=this.firstName&&(this._subTitle=this.firstName),null!=this.lastName&&(""!==this._subTitle&&(this._subTitle+=" "),this._subTitle+=this.lastName)),this._subTitle},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fullName",{get:function(){if(null!=this.title||null!=this.firstName||null!=this.middleName||null!=this.lastName){var e="";return null!=this.title&&(e+=this.title+" "),null!=this.firstName&&(e+=this.firstName+" "),null!=this.middleName&&(e+=this.middleName+" "),null!=this.lastName&&(e+=this.lastName),e.trim()}return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fullAddress",{get:function(){var e=this.address1;return r.Utils.isNullOrWhitespace(this.address2)||(r.Utils.isNullOrWhitespace(e)||(e+=", "),e+=this.address2),r.Utils.isNullOrWhitespace(this.address3)||(r.Utils.isNullOrWhitespace(e)||(e+=", "),e+=this.address3),e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fullAddressPart2",{get:function(){if(null==this.city&&null==this.state&&null==this.postalCode)return null;var e=this.city||"-",t=this.state,n=this.postalCode||"-",i=e;return r.Utils.isNullOrWhitespace(t)||(i+=", "+t),i+=", "+n},enumerable:!1,configurable:!0}),e}();t.IdentityView=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FolderView=void 0;var r=function(e){this.id=null,this.name=null,this.revisionDate=null,e&&(this.id=e.id,this.revisionDate=e.revisionDate)};t.FolderView=r},,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]"+n+"";var r=this.makeAnchor(n);return r.setAttribute("href","#/organizations/"+e.organizationId+"/vault?search="+n+"&viewEvents="+e.cipherId),r.outerHTML},e.prototype.formatGroupId=function(e){var t=this.getShortId(e.groupId),n=this.makeAnchor(t);return n.setAttribute("href","#/organizations/"+e.organizationId+"/manage/groups?search="+t),n.outerHTML},e.prototype.formatCollectionId=function(e){var t=this.getShortId(e.collectionId),n=this.makeAnchor(t);return n.setAttribute("href","#/organizations/"+e.organizationId+"/manage/collections?search="+t),n.outerHTML},e.prototype.formatOrgUserId=function(e){var t=this.getShortId(e.organizationUserId),n=this.makeAnchor(t);return n.setAttribute("href","#/organizations/"+e.organizationId+"/manage/people?search="+t+"&viewEvents="+e.organizationUserId),n.outerHTML},e.prototype.formatProviderUserId=function(e){var t=this.getShortId(e.providerUserId),n=this.makeAnchor(t);return n.setAttribute("href","#/providers/"+e.providerId+"/manage/people?search="+t+"&viewEvents="+e.providerUserId),n.outerHTML},e.prototype.formatProviderOrganizationId=function(e){var t=this.getShortId(e.providerOrganizationId),n=this.makeAnchor(t);return n.setAttribute("href","#/providers/"+e.providerId+"/clients?search="+t),n.outerHTML},e.prototype.formatPolicyId=function(e){var t=this.getShortId(e.policyId),n=this.makeAnchor(t);return n.setAttribute("href","#/organizations/"+e.organizationId+"/manage/policies?policyId="+e.policyId),n.outerHTML},e.prototype.makeAnchor=function(e){var t=document.createElement("a");return t.title=this.i18nService.t("view"),t.innerHTML=""+e+"",t},e.prototype.getShortId=function(e){return null==e?void 0:e.substring(0,8)},e.prototype.toDateTimeLocalString=function(e){return e.getFullYear()+"-"+this.pad(e.getMonth()+1)+"-"+this.pad(e.getDate())+"T"+this.pad(e.getHours())+":"+this.pad(e.getMinutes())},e.prototype.pad=function(e){var t=Math.floor(Math.abs(e));return(t<10?"0":"")+t},e.ɵfac=function(t){return new(t||e)(c.ɵɵinject(p.I18nService),c.ɵɵinject(u.PolicyService))},e.ɵprov=c.ɵɵdefineInjectable({token:e,factory:e.ɵfac}),e}();t.EventService=d,("undefined"==typeof ngDevMode||ngDevMode)&&c.ɵsetClassMetadata(d,[{type:o.Injectable}],(function(){return[{type:p.I18nService},{type:u.PolicyService}]}),null);var m=function(){};t.EventInfo=m;var f=function(){this.cipherInfo=!0};t.EventOptions=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoginView=void 0;var r=n(28),i=function(){function e(e){this.username=null,this.password=null,this.passwordRevisionDate=null,this.totp=null,this.uris=null,this.autofillOnPageLoad=null,e&&(this.passwordRevisionDate=e.passwordRevisionDate,this.autofillOnPageLoad=e.autofillOnPageLoad)}return Object.defineProperty(e.prototype,"uri",{get:function(){return this.hasUris?this.uris[0].uri:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maskedPassword",{get:function(){return null!=this.password?"••••••••":null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"subTitle",{get:function(){return this.username},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"canLaunch",{get:function(){return this.hasUris&&this.uris.some((function(e){return e.canLaunch}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasTotp",{get:function(){return!r.Utils.isNullOrWhitespace(this.totp)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"launchUri",{get:function(){if(this.hasUris){var e=this.uris.find((function(e){return e.canLaunch}));if(null!=e)return e.launchUri}return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasUris",{get:function(){return null!=this.uris&&this.uris.length>0},enumerable:!1,configurable:!0}),e}();t.LoginView=i},,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.Collection=void 0;var o=n(179),a=function(e){function t(t,n){void 0===n&&(n=!1);var r=e.call(this)||this;return null==t||r.buildDomainModel(r,t,{id:null,organizationId:null,name:null,externalId:null,readOnly:null,hidePasswords:null},n,["id","organizationId","externalId","readOnly","hidePasswords"]),r}return i(t,e),t.prototype.decrypt=function(){return this.decryptObj(new o.CollectionView(this),{name:null},this.organizationId)},t}(n(80).default);t.Collection=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionView=void 0;var r=n(178),i=function(e){this.id=null,this.organizationId=null,this.name=null,this.externalId=null,this.readOnly=null,this.hidePasswords=null,e&&(this.id=e.id,this.organizationId=e.organizationId,this.externalId=e.externalId,e instanceof r.Collection&&(this.readOnly=e.readOnly,this.hidePasswords=e.hidePasswords))};t.CollectionView=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CipherData=void 0;var r=n(40),i=n(581),o=n(582),a=n(583),s=n(584),l=n(585),c=n(587),p=n(588),u=function(e,t,n){if(null!=e){switch(this.id=e.id,this.organizationId=e.organizationId,this.folderId=e.folderId,this.userId=t,this.edit=e.edit,this.viewPassword=e.viewPassword,this.organizationUseTotp=e.organizationUseTotp,this.favorite=e.favorite,this.revisionDate=e.revisionDate,this.type=e.type,this.name=e.name,this.notes=e.notes,this.collectionIds=null!=n?n:e.collectionIds,this.deletedDate=e.deletedDate,this.reprompt=e.reprompt,this.type){case r.CipherType.Login:this.login=new l.LoginData(e.login);break;case r.CipherType.SecureNote:this.secureNote=new p.SecureNoteData(e.secureNote);break;case r.CipherType.Card:this.card=new o.CardData(e.card);break;case r.CipherType.Identity:this.identity=new s.IdentityData(e.identity)}null!=e.fields&&(this.fields=e.fields.map((function(e){return new a.FieldData(e)}))),null!=e.attachments&&(this.attachments=e.attachments.map((function(e){return new i.AttachmentData(e)}))),null!=e.passwordHistory&&(this.passwordHistory=e.passwordHistory.map((function(e){return new c.PasswordHistoryData(e)})))}};t.CipherData=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CipherRepromptType=void 0,function(e){e[e.None=0]="None",e[e.Password=1]="Password"}(t.CipherRepromptType||(t.CipherRepromptType={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendType=void 0,function(e){e[e.Text=0]="Text",e[e.File=1]="File"}(t.SendType||(t.SendType={}))},,,,,,,,,,,,,function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorResponse=void 0;var o=n(28),a=function(e){function t(t,n,r){var i,a,s=e.call(this,t)||this,l=null;if(null!=t){var c=s.getResponseProperty("ErrorModel");l=c&&r?c:t}return l?(s.message=s.getResponseProperty("Message",l),s.validationErrors=s.getResponseProperty("ValidationErrors",l),s.captchaSiteKey=null===(a=null===(i=s.validationErrors)||void 0===i?void 0:i.HCaptcha_SiteKey)||void 0===a?void 0:a[0],s.captchaRequired=!o.Utils.isNullOrWhitespace(s.captchaSiteKey)):429===n&&(s.message="Rate limit exceeded. Try again later."),s.statusCode=n,s}return i(t,e),t.prototype.getSingleMessage=function(){if(null==this.validationErrors)return this.message;for(var e in this.validationErrors)if(this.validationErrors.hasOwnProperty(e)&&this.validationErrors[e].length)return this.validationErrors[e][0];return this.message},t.prototype.getAllMessages=function(){var e=[];if(null==this.validationErrors)return e;var t=function(t){if(!n.validationErrors.hasOwnProperty(t))return"continue";n.validationErrors[t].forEach((function(n){var r="";if(t.indexOf("[")>-1&&t.indexOf("]")>-1){var i=t.lastIndexOf(".");r=t.substr(0,i>-1?i:t.length)+": "}e.push(r+n)}))},n=this;for(var r in this.validationErrors)t(r);return e},t}(n(25).BaseResponse);t.ErrorResponse=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventType=void 0,function(e){e[e.User_LoggedIn=1e3]="User_LoggedIn",e[e.User_ChangedPassword=1001]="User_ChangedPassword",e[e.User_Updated2fa=1002]="User_Updated2fa",e[e.User_Disabled2fa=1003]="User_Disabled2fa",e[e.User_Recovered2fa=1004]="User_Recovered2fa",e[e.User_FailedLogIn=1005]="User_FailedLogIn",e[e.User_FailedLogIn2fa=1006]="User_FailedLogIn2fa",e[e.User_ClientExportedVault=1007]="User_ClientExportedVault",e[e.User_UpdatedTempPassword=1008]="User_UpdatedTempPassword",e[e.Cipher_Created=1100]="Cipher_Created",e[e.Cipher_Updated=1101]="Cipher_Updated",e[e.Cipher_Deleted=1102]="Cipher_Deleted",e[e.Cipher_AttachmentCreated=1103]="Cipher_AttachmentCreated",e[e.Cipher_AttachmentDeleted=1104]="Cipher_AttachmentDeleted",e[e.Cipher_Shared=1105]="Cipher_Shared",e[e.Cipher_UpdatedCollections=1106]="Cipher_UpdatedCollections",e[e.Cipher_ClientViewed=1107]="Cipher_ClientViewed",e[e.Cipher_ClientToggledPasswordVisible=1108]="Cipher_ClientToggledPasswordVisible",e[e.Cipher_ClientToggledHiddenFieldVisible=1109]="Cipher_ClientToggledHiddenFieldVisible",e[e.Cipher_ClientToggledCardCodeVisible=1110]="Cipher_ClientToggledCardCodeVisible",e[e.Cipher_ClientCopiedPassword=1111]="Cipher_ClientCopiedPassword",e[e.Cipher_ClientCopiedHiddenField=1112]="Cipher_ClientCopiedHiddenField",e[e.Cipher_ClientCopiedCardCode=1113]="Cipher_ClientCopiedCardCode",e[e.Cipher_ClientAutofilled=1114]="Cipher_ClientAutofilled",e[e.Cipher_SoftDeleted=1115]="Cipher_SoftDeleted",e[e.Cipher_Restored=1116]="Cipher_Restored",e[e.Cipher_ClientToggledCardNumberVisible=1117]="Cipher_ClientToggledCardNumberVisible",e[e.Collection_Created=1300]="Collection_Created",e[e.Collection_Updated=1301]="Collection_Updated",e[e.Collection_Deleted=1302]="Collection_Deleted",e[e.Group_Created=1400]="Group_Created",e[e.Group_Updated=1401]="Group_Updated",e[e.Group_Deleted=1402]="Group_Deleted",e[e.OrganizationUser_Invited=1500]="OrganizationUser_Invited",e[e.OrganizationUser_Confirmed=1501]="OrganizationUser_Confirmed",e[e.OrganizationUser_Updated=1502]="OrganizationUser_Updated",e[e.OrganizationUser_Removed=1503]="OrganizationUser_Removed",e[e.OrganizationUser_UpdatedGroups=1504]="OrganizationUser_UpdatedGroups",e[e.OrganizationUser_UnlinkedSso=1505]="OrganizationUser_UnlinkedSso",e[e.OrganizationUser_ResetPassword_Enroll=1506]="OrganizationUser_ResetPassword_Enroll",e[e.OrganizationUser_ResetPassword_Withdraw=1507]="OrganizationUser_ResetPassword_Withdraw",e[e.OrganizationUser_AdminResetPassword=1508]="OrganizationUser_AdminResetPassword",e[e.OrganizationUser_ResetSsoLink=1509]="OrganizationUser_ResetSsoLink",e[e.Organization_Updated=1600]="Organization_Updated",e[e.Organization_PurgedVault=1601]="Organization_PurgedVault",e[e.Organization_VaultAccessed=1603]="Organization_VaultAccessed",e[e.Policy_Updated=1700]="Policy_Updated",e[e.ProviderUser_Invited=1800]="ProviderUser_Invited",e[e.ProviderUser_Confirmed=1801]="ProviderUser_Confirmed",e[e.ProviderUser_Updated=1802]="ProviderUser_Updated",e[e.ProviderUser_Removed=1803]="ProviderUser_Removed",e[e.ProviderOrganization_Created=1900]="ProviderOrganization_Created",e[e.ProviderOrganization_Added=1901]="ProviderOrganization_Added",e[e.ProviderOrganization_Removed=1902]="ProviderOrganization_Removed",e[e.ProviderOrganization_VaultAccessed=1903]="ProviderOrganization_VaultAccessed"}(t.EventType||(t.EventType={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationUserStatusType=void 0,function(e){e[e.Invited=0]="Invited",e[e.Accepted=1]="Accepted",e[e.Confirmed=2]="Confirmed"}(t.OrganizationUserStatusType||(t.OrganizationUserStatusType={}))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PermissionsApi=void 0;var o=function(e){function t(t){void 0===t&&(t=null);var n=e.call(this,t)||this;return null==t||(n.accessEventLogs=n.getResponseProperty("AccessEventLogs"),n.accessImportExport=n.getResponseProperty("AccessImportExport"),n.accessReports=n.getResponseProperty("AccessReports"),n.manageAllCollections=n.getResponseProperty("ManageAllCollections"),n.manageAssignedCollections=n.getResponseProperty("ManageAssignedCollections"),n.createNewCollections=n.getResponseProperty("CreateNewCollections"),n.editAnyCollection=n.getResponseProperty("EditAnyCollection"),n.deleteAnyCollection=n.getResponseProperty("DeleteAnyCollection"),n.editAssignedCollections=n.getResponseProperty("EditAssignedCollections"),n.deleteAssignedCollections=n.getResponseProperty("DeleteAssignedCollections"),n.manageCiphers=n.getResponseProperty("ManageCiphers"),n.manageGroups=n.getResponseProperty("ManageGroups"),n.manageSso=n.getResponseProperty("ManageSso"),n.managePolicies=n.getResponseProperty("ManagePolicies"),n.manageUsers=n.getResponseProperty("ManageUsers"),n.manageResetPassword=n.getResponseProperty("ManageResetPassword")),n}return i(t,e),t}(n(25).BaseResponse);t.PermissionsApi=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordStrengthComponent=void 0;var r=n(0),i=(n(1),n(0)),o=n(1),a=n(2);function s(e,t){if(1&e&&(i.ɵɵelementContainerStart(0),i.ɵɵtext(1),i.ɵɵelementContainerEnd()),2&e){var n=i.ɵɵnextContext();i.ɵɵadvance(1),i.ɵɵtextInterpolate1(" ",n.text," ")}}var l=function(e){return{width:e}},c=function(){function e(e){this.i18nService=e,this.showText=!1,this.scoreWidth=0,this.color="bg-danger"}return e.prototype.ngOnChanges=function(){switch(this.scoreWidth=null==this.score?0:20*(this.score+1),this.score){case 4:this.color="bg-success",this.text=this.i18nService.t("strong");break;case 3:this.color="bg-primary",this.text=this.i18nService.t("good");break;case 2:this.color="bg-warning",this.text=this.i18nService.t("weak");break;default:this.color="bg-danger",this.text=null!=this.score?this.i18nService.t("weak"):null}},e.ɵfac=function(t){return new(t||e)(i.ɵɵdirectiveInject(o.I18nService))},e.ɵcmp=i.ɵɵdefineComponent({type:e,selectors:[["app-password-strength"]],inputs:{score:"score",showText:"showText"},features:[i.ɵɵNgOnChangesFeature],decls:8,vars:8,consts:[[1,"progress"],["role","progressbar","aria-valuemin","0","aria-valuemax","100",3,"ngStyle"],[4,"ngIf"]],template:function(e,t){1&e&&(i.ɵɵelementStart(0,"div",0),i.ɵɵtext(1," "),i.ɵɵelementStart(2,"div",1),i.ɵɵtext(3," "),i.ɵɵtemplate(4,s,2,1,"ng-container",2),i.ɵɵtext(5," "),i.ɵɵelementEnd(),i.ɵɵtext(6," "),i.ɵɵelementEnd(),i.ɵɵtext(7," ")),2&e&&(i.ɵɵadvance(2),i.ɵɵclassMapInterpolate1("progress-bar ",t.color,""),i.ɵɵproperty("ngStyle",i.ɵɵpureFunction1(6,l,t.scoreWidth+"%")),i.ɵɵattribute("aria-valuenow",t.scoreWidth),i.ɵɵadvance(2),i.ɵɵproperty("ngIf",t.showText&&t.text))},directives:[a.NgStyle,a.NgIf],encapsulation:2}),e}();t.PasswordStrengthComponent=c,("undefined"==typeof ngDevMode||ngDevMode)&&i.ɵsetClassMetadata(c,[{type:r.Component,args:[{selector:"app-password-strength",templateUrl:"password-strength.component.html"}]}],(function(){return[{type:o.I18nService}]}),{score:[{type:r.Input}],showText:[{type:r.Input}]})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionData=void 0;var r=function(e){this.id=e.id,this.organizationId=e.organizationId,this.name=e.name,this.externalId=e.externalId,this.readOnly=e.readOnly};t.CollectionData=r},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0?(p=[],[4,this.attachments.reduce((function(t,n){return t.then((function(){return n.decrypt(l,e)})).then((function(e){p.push(e)}))}),Promise.resolve())]):[3,13];case 12:a.sent(),t.attachments=p,a.label=13;case 13:return null!=this.fields&&this.fields.length>0?(u=[],[4,this.fields.reduce((function(t,n){return t.then((function(){return n.decrypt(l,e)})).then((function(e){u.push(e)}))}),Promise.resolve())]):[3,15];case 14:a.sent(),t.fields=u,a.label=15;case 15:return null!=this.passwordHistory&&this.passwordHistory.length>0?(d=[],[4,this.passwordHistory.reduce((function(t,n){return t.then((function(){return n.decrypt(l,e)})).then((function(e){d.push(e)}))}),Promise.resolve())]):[3,17];case 16:a.sent(),t.passwordHistory=d,a.label=17;case 17:return[2,t]}}))}))},t.prototype.toCipherData=function(e){var t=new l.CipherData;switch(t.id=this.id,t.organizationId=this.organizationId,t.folderId=this.folderId,t.userId=null!=this.organizationId?e:null,t.edit=this.edit,t.viewPassword=this.viewPassword,t.organizationUseTotp=this.organizationUseTotp,t.favorite=this.favorite,t.revisionDate=null!=this.revisionDate?this.revisionDate.toISOString():null,t.type=this.type,t.collectionIds=this.collectionIds,t.deletedDate=null!=this.deletedDate?this.deletedDate.toISOString():null,t.reprompt=this.reprompt,this.buildDataModel(this,t,{name:null,notes:null}),t.type){case s.CipherType.Login:t.login=this.login.toLoginData();break;case s.CipherType.SecureNote:t.secureNote=this.secureNote.toSecureNoteData();break;case s.CipherType.Card:t.card=this.card.toCardData();break;case s.CipherType.Identity:t.identity=this.identity.toIdentityData()}return null!=this.fields&&(t.fields=this.fields.map((function(e){return e.toFieldData()}))),null!=this.attachments&&(t.attachments=this.attachments.map((function(e){return e.toAttachmentData()}))),null!=this.passwordHistory&&(t.passwordHistory=this.passwordHistory.map((function(e){return e.toPasswordHistoryData()}))),t},t}(d.default);t.Cipher=g},,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]1)}}function w(e,t){if(1&e&&(a.ɵɵelementStart(0,"div",31),a.ɵɵtext(1," "),a.ɵɵelement(2,"app-avatar",32),a.ɵɵtext(3," "),a.ɵɵelementStart(4,"div",33),a.ɵɵtext(5," "),a.ɵɵelementStart(6,"span"),a.ɵɵtext(7),a.ɵɵpipe(8,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(9," "),a.ɵɵelementStart(10,"small",34),a.ɵɵtext(11),a.ɵɵelementEnd(),a.ɵɵtext(12," "),a.ɵɵelementEnd(),a.ɵɵtext(13," "),a.ɵɵelementEnd()),2&e){var n=a.ɵɵnextContext();a.ɵɵadvance(2),a.ɵɵproperty("data",n.name)("email",n.email)("circle",!0),a.ɵɵadvance(5),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(8,5,"loggedInAs")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(n.name)}}var C=function(e){return{"nav-background-alt":e}},I=function(){function e(e,t,n,r,i){this.messagingService=e,this.platformUtilsService=t,this.tokenService=n,this.userService=r,this.syncService=i,this.selfHosted=!1,this.providers=[],this.selfHosted=this.platformUtilsService.isSelfHost()}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){var e,t,n;return i(this,(function(r){switch(r.label){case 0:return e=this,[4,this.tokenService.getName()];case 1:return e.name=r.sent(),t=this,[4,this.tokenService.getEmail()];case 2:return t.email=r.sent(),null!=this.name&&""!==this.name.trim()||(this.name=this.email),[4,this.syncService.getLastSync()];case 3:return null!=r.sent()?[3,5]:[4,this.syncService.fullSync(!1)];case 4:r.sent(),r.label=5;case 5:return n=this,[4,this.userService.getAllProviders()];case 6:return n.providers=r.sent(),[2]}}))}))},e.prototype.lock=function(){this.messagingService.send("lockVault")},e.prototype.logOut=function(){this.messagingService.send("logout")},e.ɵfac=function(t){return new(t||e)(a.ɵɵdirectiveInject(s.MessagingService),a.ɵɵdirectiveInject(l.PlatformUtilsService),a.ɵɵdirectiveInject(c.TokenService),a.ɵɵdirectiveInject(p.UserService),a.ɵɵdirectiveInject(u.SyncService))},e.ɵcmp=a.ɵɵdefineComponent({type:e,selectors:[["app-navbar"]],decls:98,vars:36,consts:[[1,"navbar","navbar-expand","navbar-dark",3,"ngClass"],[1,"container"],["routerLink","/",1,"navbar-brand",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-shield"],[1,"collapse","navbar-collapse"],[1,"navbar-nav"],["routerLinkActive","active",1,"nav-item"],["routerLink","/vault",1,"nav-link"],["routerLink","/sends",1,"nav-link"],[4,"ngIf"],["routerLink","/tools",1,"nav-link"],["routerLink","/settings",1,"nav-link"],[1,"navbar-nav","flex-row","ml-md-auto","d-none","d-md-flex"],[1,"nav-item","dropdown"],["href","#","id","nav-profile","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",1,"nav-item","nav-link","dropdown-toggle"],["aria-hidden","true",1,"fa","fa-user-circle","fa-lg"],["aria-labelledby","nav-profile",1,"dropdown-menu","dropdown-menu-right"],["class","dropdown-item-text d-flex align-items-center","appStopProp","",4,"ngIf"],[1,"dropdown-divider"],["href","#","routerLink","/settings/account",1,"dropdown-item"],["aria-hidden","true",1,"fa","fa-fw","fa-user"],["href","https://help.bitwarden.com","target","_blank","rel","noopener",1,"dropdown-item"],["aria-hidden","true",1,"fa","fa-fw","fa-question-circle"],["href","https://bitwarden.com/download/","target","_blank","rel","noopener",1,"dropdown-item"],["aria-hidden","true",1,"fa","fa-fw","fa-download"],["type","button",1,"dropdown-item",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-lock"],["aria-hidden","true",1,"fa","fa-fw","fa-sign-out"],["class","nav-item","routerLinkActive","active",4,"ngIf"],[1,"nav-link",3,"routerLink"],["routerLink","/providers",1,"nav-link"],["appStopProp","",1,"dropdown-item-text","d-flex","align-items-center"],["size","25","fontSize","14",3,"data","email","circle"],[1,"ml-2","overflow-hidden"],[1,"text-muted"]],template:function(e,t){1&e&&(a.ɵɵelementStart(0,"nav",0),a.ɵɵtext(1," "),a.ɵɵelementStart(2,"div",1),a.ɵɵtext(3," "),a.ɵɵelementStart(4,"a",2),a.ɵɵpipe(5,"i18n"),a.ɵɵtext(6," "),a.ɵɵelement(7,"i",3),a.ɵɵtext(8," "),a.ɵɵelementEnd(),a.ɵɵtext(9," "),a.ɵɵelementStart(10,"div",4),a.ɵɵtext(11," "),a.ɵɵelementStart(12,"ul",5),a.ɵɵtext(13," "),a.ɵɵelementStart(14,"li",6),a.ɵɵtext(15," "),a.ɵɵelementStart(16,"a",7),a.ɵɵtext(17),a.ɵɵpipe(18,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(19," "),a.ɵɵelementEnd(),a.ɵɵtext(20," "),a.ɵɵelementStart(21,"li",6),a.ɵɵtext(22," "),a.ɵɵelementStart(23,"a",8),a.ɵɵtext(24),a.ɵɵpipe(25,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(26," "),a.ɵɵelementEnd(),a.ɵɵtext(27," "),a.ɵɵtemplate(28,S,6,2,"ng-container",9),a.ɵɵtext(29," "),a.ɵɵelementStart(30,"li",6),a.ɵɵtext(31," "),a.ɵɵelementStart(32,"a",10),a.ɵɵtext(33),a.ɵɵpipe(34,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(35," "),a.ɵɵelementEnd(),a.ɵɵtext(36," "),a.ɵɵelementStart(37,"li",6),a.ɵɵtext(38," "),a.ɵɵelementStart(39,"a",11),a.ɵɵtext(40),a.ɵɵpipe(41,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(42," "),a.ɵɵelementEnd(),a.ɵɵtext(43," "),a.ɵɵelementEnd(),a.ɵɵtext(44," "),a.ɵɵelementEnd(),a.ɵɵtext(45," "),a.ɵɵelementStart(46,"ul",12),a.ɵɵtext(47," "),a.ɵɵelementStart(48,"li",13),a.ɵɵtext(49," "),a.ɵɵelementStart(50,"a",14),a.ɵɵtext(51," "),a.ɵɵelement(52,"i",15),a.ɵɵtext(53," "),a.ɵɵelementEnd(),a.ɵɵtext(54," "),a.ɵɵelementStart(55,"div",16),a.ɵɵtext(56," "),a.ɵɵtemplate(57,w,14,7,"div",17),a.ɵɵtext(58," "),a.ɵɵelement(59,"div",18),a.ɵɵtext(60," "),a.ɵɵelementStart(61,"a",19),a.ɵɵtext(62," "),a.ɵɵelement(63,"i",20),a.ɵɵtext(64),a.ɵɵpipe(65,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(66," "),a.ɵɵelementStart(67,"a",21),a.ɵɵtext(68," "),a.ɵɵelement(69,"i",22),a.ɵɵtext(70),a.ɵɵpipe(71,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(72," "),a.ɵɵelementStart(73,"a",23),a.ɵɵtext(74," "),a.ɵɵelement(75,"i",24),a.ɵɵtext(76),a.ɵɵpipe(77,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(78," "),a.ɵɵelement(79,"div",18),a.ɵɵtext(80," "),a.ɵɵelementStart(81,"button",25),a.ɵɵlistener("click",(function(){return t.lock()})),a.ɵɵtext(82," "),a.ɵɵelement(83,"i",26),a.ɵɵtext(84),a.ɵɵpipe(85,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(86," "),a.ɵɵelementStart(87,"button",25),a.ɵɵlistener("click",(function(){return t.logOut()})),a.ɵɵtext(88," "),a.ɵɵelement(89,"i",27),a.ɵɵtext(90),a.ɵɵpipe(91,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(92," "),a.ɵɵelementEnd(),a.ɵɵtext(93," "),a.ɵɵelementEnd(),a.ɵɵtext(94," "),a.ɵɵelementEnd(),a.ɵɵtext(95," "),a.ɵɵelementEnd(),a.ɵɵtext(96," "),a.ɵɵelementEnd(),a.ɵɵtext(97," ")),2&e&&(a.ɵɵproperty("ngClass",a.ɵɵpureFunction1(34,C,t.selfHosted)),a.ɵɵadvance(4),a.ɵɵpropertyInterpolate("appA11yTitle",a.ɵɵpipeBind2(5,13,"pageTitle","Bitwarden")),a.ɵɵadvance(13),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(18,16,"myVault")),a.ɵɵadvance(7),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(25,18,"send")),a.ɵɵadvance(4),a.ɵɵproperty("ngIf",t.providers.length>=1),a.ɵɵadvance(5),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(34,20,"tools")),a.ɵɵadvance(7),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(41,22,"settings")),a.ɵɵadvance(17),a.ɵɵproperty("ngIf",t.name),a.ɵɵadvance(7),a.ɵɵtextInterpolate1(" ",a.ɵɵpipeBind1(65,24,"myAccount")," "),a.ɵɵadvance(6),a.ɵɵtextInterpolate1(" ",a.ɵɵpipeBind1(71,26,"getHelp")," "),a.ɵɵadvance(6),a.ɵɵtextInterpolate1(" ",a.ɵɵpipeBind1(77,28,"getApps")," "),a.ɵɵadvance(8),a.ɵɵtextInterpolate1(" ",a.ɵɵpipeBind1(85,30,"lockNow")," "),a.ɵɵadvance(6),a.ɵɵtextInterpolate1(" ",a.ɵɵpipeBind1(91,32,"logOut")," "))},directives:[d.NgClass,m.RouterLinkWithHref,f.A11yTitleDirective,m.RouterLinkActive,d.NgIf,h.StopPropDirective,v.AvatarComponent],pipes:[y.I18nPipe],encapsulation:2}),e}();t.NavbarComponent=I,("undefined"==typeof ngDevMode||ngDevMode)&&a.ɵsetClassMetadata(I,[{type:o.Component,args:[{selector:"app-navbar",templateUrl:"navbar.component.html"}]}],(function(){return[{type:s.MessagingService},{type:l.PlatformUtilsService},{type:c.TokenService},{type:p.UserService},{type:u.SyncService}]}),null)},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]4?(t=Math.floor(this.totpCode.length/2),this.totpCodeFormatted=this.totpCode.substring(0,t)+" "+this.totpCode.substring(t)):this.totpCodeFormatted=this.totpCode:(this.totpCodeFormatted=null,this.totpInterval&&window.clearInterval(this.totpInterval)),[2]}}))}))},t.prototype.allowOwnershipAssignment=function(){return(!this.editMode||this.cloneMode)&&null!=this.ownershipOptions&&(this.ownershipOptions.length>1||!this.allowPersonal)},t.prototype.totpTick=function(e){return o(this,void 0,void 0,(function(){var t,n;return a(this,(function(r){switch(r.label){case 0:return t=Math.round((new Date).getTime()/1e3),n=t%e,this.totpSec=e-n,this.totpDash=+(Math.round(78.6/e*n+"e+2")+"e-2"),this.totpLow=this.totpSec<=7,0!==n?[3,2]:[4,this.totpUpdateCode()];case 1:r.sent(),r.label=2;case 2:return[2]}}))}))},t.ɵfac=function(e){return new(e||t)(u.ɵɵdirectiveInject(d.CipherService),u.ɵɵdirectiveInject(m.FolderService),u.ɵɵdirectiveInject(f.I18nService),u.ɵɵdirectiveInject(h.PlatformUtilsService),u.ɵɵdirectiveInject(v.AuditService),u.ɵɵdirectiveInject(y.StateService),u.ɵɵdirectiveInject(g.UserService),u.ɵɵdirectiveInject(x.CollectionService),u.ɵɵdirectiveInject(b.TotpService),u.ɵɵdirectiveInject(S.PasswordGenerationService),u.ɵɵdirectiveInject(w.MessagingService),u.ɵɵdirectiveInject(C.EventService),u.ɵɵdirectiveInject(I.PolicyService))},t.ɵcmp=u.ɵɵdefineComponent({type:t,selectors:[["app-vault-add-edit"]],features:[u.ɵɵInheritDefinitionFeature],decls:36,vars:11,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","cipherAddEditTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-lg"],["ngNativeValidate","","autocomplete","off",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","cipherAddEditTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["type","submit","class","btn btn-primary btn-submit",3,"disabled",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],["class","ml-auto",4,"ngIf"],[1,"modal-body"],["type","info",4,"ngIf"],["class","row",4,"ngIf"],[1,"row"],[1,"col-6","form-group"],["for","name"],["id","name","type","text","name","Name","required","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["class","col-6 form-group",4,"ngIf"],[4,"ngIf"],[1,"form-group"],["for","notes"],["id","notes","name","Notes","rows","6",1,"form-control",3,"ngModel","disabled","ngModelChange"],[3,"cipher","viewOnly","copy"],[1,"mt-4"],[1,"form-check"],["type","checkbox","id","passwordPrompt","name","passwordPrompt",1,"form-check-input",3,"ngModel","disabled","change"],["for","passwordPrompt",1,"form-check-label"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/article/managing-items/#protect-individual-items",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-question-circle-o"],["type","info"],["for","type"],["id","type","name","Type","appAutofocus","",1,"form-control",3,"ngModel","disabled","ngModelChange"],[3,"ngValue",4,"ngFor","ngForOf"],[3,"ngValue"],["for","folder"],["id","folder","name","FolderId",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","loginUsername"],[1,"input-group"],["id","loginUsername","type","text","name","Login.Username","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["class","input-group-append",4,"ngIf"],[1,"d-flex"],["for","loginPassword"],["class","ml-auto d-flex",4,"ngIf"],["id","loginPassword","name","Login.Password","appInputVerbatim","","autocomplete","new-password",1,"form-control","text-monospace",3,"type","ngModel","disabled","ngModelChange"],[1,"input-group-append"],["type","button",1,"btn","btn-outline-secondary",3,"appA11yTitle","disabled","click"],["aria-hidden","true",1,"fa","fa-lg",3,"ngClass"],["aria-hidden","true",1,"fa","fa-lg","fa-clone"],["for","loginTotp"],["id","loginTotp","name","Login.Totp","appInputVerbatim","",1,"form-control","text-monospace",3,"type","ngModel","disabled","ngModelChange"],[1,"col-6","form-group","totp","d-flex","align-items-end",3,"ngClass"],["class","d-flex align-items-center",4,"ngIf"],["href","#","appStopClick","","class","d-inline-block mb-3",3,"click",4,"ngIf"],["type","button",1,"btn","btn-outline-secondary",3,"appA11yTitle","click"],[1,"ml-auto","d-flex"],["href","#","class","d-block mr-2 fa-icon-above-input","appStopClick","",3,"appA11yTitle","click",4,"ngIf"],["href","#","appStopClick","",1,"d-block","fa-icon-above-input",3,"appA11yTitle","appApiAction","click"],["checkPasswordBtn",""],["aria-hidden","true",1,"fa","fa-lg","fa-fw","fa-check-circle",3,"hidden"],["aria-hidden","true",1,"fa","fa-lg","fa-fw","fa-spinner","fa-spin",3,"hidden","title"],["href","#","appStopClick","",1,"d-block","mr-2","fa-icon-above-input",3,"appA11yTitle","click"],["aria-hidden","true",1,"fa","fa-lg","fa-fw","fa-refresh"],["src","images/totp-countdown.png","id","totpImage",1,"ml-2",3,"title"],["href","#","appStopClick","","class","badge badge-primary ml-3",3,"click",4,"ngIf"],["href","#","appStopClick","",1,"badge","badge-primary","ml-3",3,"click"],[1,"d-flex","align-items-center"],[1,"totp-countdown","mr-3","ml-2"],[1,"totp-sec"],["r","12.6","cy","16","cx","16",1,"totp-circle","inner",3,"ngStyle"],["r","14","cy","16","cx","16",1,"totp-circle","outer"],[1,"totp-code","mr-2",3,"title"],["type","button",1,"btn","btn-link",3,"appA11yTitle","click"],["aria-hidden","true",1,"fa","fa-clone"],["class","row",4,"ngFor","ngForOf","ngForTrackBy"],[1,"col-7","form-group"],[3,"for"],["type","text","appInputVerbatim","",1,"form-control",3,"id","name","ngModel","disabled","placeholder","ngModelChange"],["aria-hidden","true",1,"fa","fa-lg","fa-share"],[1,"col-5","form-group"],["href","https://help.bitwarden.com/article/uri-match-detection/","target","_blank","rel","noopener",1,"ml-auto",3,"appA11yTitle"],[1,"form-control","overflow-hidden",3,"id","name","ngModel","disabled","ngModelChange","change"],["type","button","class","btn btn-link text-danger ml-2",3,"appA11yTitle","click",4,"ngIf"],["type","button",1,"btn","btn-link","text-danger","ml-2",3,"appA11yTitle","click"],["aria-hidden","true",1,"fa","fa-minus-circle","fa-lg"],["href","#","appStopClick","",1,"d-inline-block","mb-3",3,"click"],["aria-hidden","true",1,"fa","fa-plus-circle","fa-fw"],["for","cardCardholderName"],["id","cardCardholderName","type","text","name","Card.CardCardholderName",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","cardBrand"],["id","cardBrand","name","Card.Brand",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","cardNumber"],["id","cardNumber","name","Card.Number","appInputVerbatim","","autocomplete","new-password",1,"form-control","text-monospace",3,"type","ngModel","disabled","ngModelChange"],[1,"col","form-group"],["for","cardExpMonth"],["id","cardExpMonth","name","Card.ExpMonth",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","cardExpYear"],["id","cardExpYear","type","text","name","Card.ExpYear",1,"form-control",3,"ngModel","placeholder","disabled","ngModelChange"],["for","cardCode"],["id","cardCode","name","Card.Code","appInputVerbatim","","autocomplete","new-password",1,"form-control","text-monospace",3,"type","ngModel","disabled","ngModelChange"],[1,"col-4","form-group"],["for","idTitle"],["id","idTitle","name","Identity.Title",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idFirstName"],["id","idFirstName","type","text","name","Identity.FirstName",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idMiddleName"],["id","idMiddleName","type","text","name","Identity.MiddleName",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idLastName"],["id","idLastName","type","text","name","Identity.LastName",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idUsername"],["id","idUsername","type","text","name","Identity.Username","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idCompany"],["id","idCompany","type","text","name","Identity.Company",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idSsn"],["id","idSsn","type","text","name","Identity.SSN","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idPassportNumber"],["id","idPassportNumber","type","text","name","Identity.PassportNumber","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idLicenseNumber"],["id","idLicenseNumber","type","text","name","Identity.LicenseNumber","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idEmail"],["id","idEmail","type","text","name","Identity.Email","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idPhone"],["id","idPhone","type","text","name","Identity.Phone",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idAddress1"],["id","idAddress1","type","text","name","Identity.Address1",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idAddress2"],["id","idAddress2","type","text","name","Identity.Address2",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idAddress3"],["id","idAddress3","type","text","name","Identity.Address3",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idCity"],["id","idCity","type","text","name","Identity.City",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idState"],["id","idState","type","text","name","Identity.State",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idPostalCode"],["id","idPostalCode","type","text","name","Identity.PostalCode",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idCountry"],["id","idCountry","type","text","name","Identity.Country",1,"form-control",3,"ngModel","disabled","ngModelChange"],[1,"col-5"],["for","organizationId"],["id","organizationId","name","OrganizationId",1,"form-control",3,"ngModel","disabled","ngModelChange","change"],["class","form-check",4,"ngFor","ngForOf"],["type","checkbox",1,"form-check-input",3,"ngModel","id","name","disabled","ngModelChange"],[1,"form-check-label",3,"for"],[1,"small","text-muted","mt-4"],[1,"font-weight-semibold"],["class","ml-3",4,"ngIf"],["href","#","appStopClick","",3,"title","click"],[1,"ml-3"],[4,"ngFor","ngForOf"],[1,"password-wrapper","text-monospace","ml-2"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],[1,"ml-auto"],["type","button","class","btn btn-link",3,"appA11yTitle","click",4,"ngIf"],["type","button","class","btn btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click",4,"ngIf"],["type","button",1,"btn","btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click"],["deleteBtn",""],["aria-hidden","true",1,"fa","fa-trash-o","fa-lg","fa-fw",3,"hidden"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","fa-lg","fa-fw",3,"hidden","title"]],template:function(e,t){1&e&&(u.ɵɵelementStart(0,"div",0),u.ɵɵtext(1," "),u.ɵɵelementStart(2,"div",1),u.ɵɵtext(3," "),u.ɵɵelementStart(4,"form",2,3),u.ɵɵlistener("ngSubmit",(function(){return t.submit()})),u.ɵɵtext(6," "),u.ɵɵelementStart(7,"div",4),u.ɵɵtext(8," "),u.ɵɵelementStart(9,"h2",5),u.ɵɵtext(10),u.ɵɵelementEnd(),u.ɵɵtext(11," "),u.ɵɵelementStart(12,"button",6),u.ɵɵpipe(13,"i18n"),u.ɵɵtext(14," "),u.ɵɵelementStart(15,"span",7),u.ɵɵtext(16,"×"),u.ɵɵelementEnd(),u.ɵɵtext(17," "),u.ɵɵelementEnd(),u.ɵɵtext(18," "),u.ɵɵelementEnd(),u.ɵɵtext(19," "),u.ɵɵtemplate(20,ge,66,33,"div",8),u.ɵɵtext(21," "),u.ɵɵelementStart(22,"div",9),u.ɵɵtext(23," "),u.ɵɵtemplate(24,xe,9,7,"button",10),u.ɵɵtext(25," "),u.ɵɵelementStart(26,"button",11),u.ɵɵtext(27),u.ɵɵpipe(28,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(29," "),u.ɵɵtemplate(30,Ce,6,2,"div",12),u.ɵɵtext(31," "),u.ɵɵelementEnd(),u.ɵɵtext(32," "),u.ɵɵelementEnd(),u.ɵɵtext(33," "),u.ɵɵelementEnd(),u.ɵɵtext(34," "),u.ɵɵelementEnd(),u.ɵɵtext(35," ")),2&e&&(u.ɵɵadvance(4),u.ɵɵproperty("appApiAction",t.formPromise),u.ɵɵadvance(6),u.ɵɵtextInterpolate(t.title),u.ɵɵadvance(2),u.ɵɵpropertyInterpolate("appA11yTitle",u.ɵɵpipeBind1(13,7,"close")),u.ɵɵadvance(8),u.ɵɵproperty("ngIf",t.cipher),u.ɵɵadvance(4),u.ɵɵproperty("ngIf",!t.viewOnly),u.ɵɵadvance(3),u.ɵɵtextInterpolate1(" ",u.ɵɵpipeBind1(28,9,t.viewOnly?"close":"cancel")," "),u.ɵɵadvance(3),u.ɵɵproperty("ngIf",t.cipher&&!t.viewOnly))},directives:[E.NgControlStatusGroup,E.NgForm,P.ApiActionDirective,k.A11yTitleDirective,_.NgIf,E.DefaultValueAccessor,E.RequiredValidator,E.NgControlStatus,E.NgModel,A.AddEditCustomFieldsComponent,E.CheckboxControlValueAccessor,O.CalloutComponent,E.SelectControlValueAccessor,M.AutofocusDirective,_.NgForOf,E.NgSelectOption,E.ɵangular_packages_forms_forms_z,T.InputVerbatimDirective,_.NgClass,D.StopClickDirective,_.NgStyle],pipes:[R.I18nPipe,_.DatePipe],encapsulation:2}),t}(p.AddEditComponent);t.AddEditComponent=Ie,("undefined"==typeof ngDevMode||ngDevMode)&&u.ɵsetClassMetadata(Ie,[{type:s.Component,args:[{selector:"app-vault-add-edit",templateUrl:"add-edit.component.html"}]}],(function(){return[{type:d.CipherService},{type:m.FolderService},{type:f.I18nService},{type:h.PlatformUtilsService},{type:v.AuditService},{type:y.StateService},{type:g.UserService},{type:x.CollectionService},{type:b.TotpService},{type:S.PasswordGenerationService},{type:w.MessagingService},{type:C.EventService},{type:I.PolicyService}]}),null)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImportService=void 0;var r=function(){};t.ImportService=r},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]this.pageSize&&(t=this.pagedCiphersCount),this.ciphers.length>e&&(this.pagedCiphers=this.pagedCiphers.concat(this.ciphers.slice(e,e+t))),this.pagedCiphersCount=this.pagedCiphers.length,this.didScroll=this.pagedCiphers.length>this.pageSize}},t.prototype.refresh=function(){return o(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return e.trys.push([0,,2,3]),this.refreshing=!0,[4,this.reload(this.filter,this.deleted)];case 1:return e.sent(),[3,3];case 2:return this.refreshing=!1,[7];case 3:return[2]}}))}))},t.prototype.isPaging=function(){var e=this.isSearching();return e&&this.didScroll&&this.resetPaging(),!e&&this.ciphers.length>this.pageSize},t.prototype.resetPaging=function(){return o(this,void 0,void 0,(function(){return a(this,(function(e){return this.pagedCiphers=[],this.loadMore(),[2]}))}))},t.prototype.doSearch=function(e){return o(this,void 0,void 0,(function(){var t;return a(this,(function(n){switch(n.label){case 0:return t=this,[4,this.searchService.searchCiphers(this.searchText,[this.filter,this.deletedFilter],e)];case 1:return t.ciphers=n.sent(),this.resetPaging(),[2]}}))}))},t.prototype.launch=function(e){this.platformUtilsService.launchUri(e)},t.prototype.attachments=function(e){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,this.repromptCipher(e)];case 1:return t.sent()?(this.onAttachmentsClicked.emit(e),[2]):[2]}}))}))},t.prototype.share=function(e){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,this.repromptCipher(e)];case 1:return t.sent()?(this.onShareClicked.emit(e),[2]):[2]}}))}))},t.prototype.collections=function(e){this.onCollectionsClicked.emit(e)},t.prototype.clone=function(e){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,this.repromptCipher(e)];case 1:return t.sent()?(this.onCloneClicked.emit(e),[2]):[2]}}))}))},t.prototype.delete=function(e){return o(this,void 0,void 0,(function(){var t;return a(this,(function(n){switch(n.label){case 0:return[4,this.repromptCipher(e)];case 1:return n.sent()?null!=this.actionPromise?[2]:(t=e.isDeleted,[4,this.platformUtilsService.showDialog(this.i18nService.t(t?"permanentlyDeleteItemConfirmation":"deleteItemConfirmation"),this.i18nService.t(t?"permanentlyDeleteItem":"deleteItem"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")]):[2];case 2:if(!n.sent())return[2,!1];n.label=3;case 3:return n.trys.push([3,5,,6]),this.actionPromise=this.deleteCipher(e.id,t),[4,this.actionPromise];case 4:return n.sent(),this.toasterService.popAsync("success",null,this.i18nService.t(t?"permanentlyDeletedItem":"deletedItem")),this.refresh(),[3,6];case 5:return n.sent(),[3,6];case 6:return this.actionPromise=null,[2]}}))}))},t.prototype.restore=function(e){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return null==this.actionPromise&&e.isDeleted?[4,this.platformUtilsService.showDialog(this.i18nService.t("restoreItemConfirmation"),this.i18nService.t("restoreItem"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")]:[2];case 1:if(!t.sent())return[2,!1];t.label=2;case 2:return t.trys.push([2,4,,5]),this.actionPromise=this.cipherService.restoreWithServer(e.id),[4,this.actionPromise];case 3:return t.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("restoredItem")),this.refresh(),[3,5];case 4:return t.sent(),[3,5];case 5:return this.actionPromise=null,[2]}}))}))},t.prototype.copy=function(e,t,n,r){return o(this,void 0,void 0,(function(){var i;return a(this,(function(o){switch(o.label){case 0:return(i=this.passwordRepromptService.protectedFields().includes(r))?[4,this.repromptCipher(e)]:[3,2];case 1:i=!o.sent(),o.label=2;case 2:return i||(null==t||"TOTP"===r&&!this.displayTotpCopyButton(e))?[2]:[3,3];case 3:return t!==e.login.totp?[3,5]:[4,this.totpService.getCode(t)];case 4:t=o.sent(),o.label=5;case 5:return e.viewPassword?(this.platformUtilsService.copyToClipboard(t,{window:window}),this.toasterService.popAsync("info",null,this.i18nService.t("valueCopied",this.i18nService.t(n))),"password"===n||"verificationCodeTotp"===n?this.eventService.collect(u.EventType.Cipher_ClientToggledHiddenFieldVisible,e.id):"securityCode"===n&&this.eventService.collect(u.EventType.Cipher_ClientCopiedCardCode,e.id),[2]):[2]}}))}))},t.prototype.selectAll=function(e){e&&this.selectAll(!1);for(var t=e&&this.ciphers.length>500?500:this.ciphers.length,n=0;n0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0?this.events=this.events.concat(a):this.events=a,this.loading=!1,this.morePromise=null,this.refreshPromise=null,[2]}}))}))},e.ɵfac=function(t){return new(t||e)(a.ɵɵdirectiveInject(s.ApiService),a.ɵɵdirectiveInject(l.I18nService),a.ɵɵdirectiveInject(c.EventService),a.ɵɵdirectiveInject(p.ToasterService),a.ɵɵdirectiveInject(u.UserNamePipe))},e.ɵcmp=a.ɵɵdefineComponent({type:e,selectors:[["app-entity-events"]],inputs:{name:"name",entity:"entity",entityId:"entityId",organizationId:"organizationId",providerId:"providerId",showUser:"showUser"},decls:36,vars:12,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","eventLogsTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-lg"],[1,"modal-content"],[1,"modal-header"],["id","eventLogsTitle",1,"modal-title"],["class","text-muted",4,"ngIf"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"text-muted"],[1,"modal-body"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],[1,"d-flex"],[1,"form-inline"],["for","start",1,"sr-only"],["type","datetime-local","id","start","placeholder","YYYY-MM-DDTHH:MM",1,"form-control","form-control-sm",3,"placeholder","ngModel","ngModelChange"],[1,"mx-2"],["for","end",1,"sr-only"],["type","datetime-local","id","end","placeholder","YYYY-MM-DDTHH:MM",1,"form-control","form-control-sm",3,"placeholder","ngModel","ngModelChange"],["type","button",1,"btn","btn-sm","btn-outline-primary","ml-3",3,"appApiAction","disabled","click"],["refreshBtn",""],["aria-hidden","true",1,"fa","fa-refresh","fa-fw",3,"ngClass"],[4,"ngIf"],["class","table table-hover mb-0",4,"ngIf"],["type","button","class","btn btn-block btn-link btn-submit",3,"appApiAction","disabled","click",4,"ngIf"],[1,"table","table-hover","mb-0"],["width","210",1,"border-top-0"],["width","40",1,"border-top-0"],["class","border-top-0","width","150",4,"ngIf"],[1,"border-top-0"],[4,"ngFor","ngForOf"],["width","150",1,"border-top-0"],["aria-hidden","true",3,"title"],[3,"innerHTML"],[3,"appA11yTitle"],["type","button",1,"btn","btn-block","btn-link","btn-submit",3,"appApiAction","disabled","click"],["moreBtn",""],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"]],template:function(e,t){1&e&&(a.ɵɵelementStart(0,"div",0),a.ɵɵtext(1," "),a.ɵɵelementStart(2,"div",1),a.ɵɵtext(3," "),a.ɵɵelementStart(4,"div",2),a.ɵɵtext(5," "),a.ɵɵelementStart(6,"div",3),a.ɵɵtext(7," "),a.ɵɵelementStart(8,"h2",4),a.ɵɵtext(9),a.ɵɵpipe(10,"i18n"),a.ɵɵtemplate(11,y,2,1,"small",5),a.ɵɵtext(12," "),a.ɵɵelementEnd(),a.ɵɵtext(13," "),a.ɵɵelementStart(14,"button",6),a.ɵɵpipe(15,"i18n"),a.ɵɵtext(16," "),a.ɵɵelementStart(17,"span",7),a.ɵɵtext(18,"×"),a.ɵɵelementEnd(),a.ɵɵtext(19," "),a.ɵɵelementEnd(),a.ɵɵtext(20," "),a.ɵɵelementEnd(),a.ɵɵtext(21," "),a.ɵɵtemplate(22,g,9,6,"div",8),a.ɵɵtext(23," "),a.ɵɵtemplate(24,P,40,25,"div",8),a.ɵɵtext(25," "),a.ɵɵelementStart(26,"div",9),a.ɵɵtext(27," "),a.ɵɵelementStart(28,"button",10),a.ɵɵtext(29),a.ɵɵpipe(30,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(31," "),a.ɵɵelementEnd(),a.ɵɵtext(32," "),a.ɵɵelementEnd(),a.ɵɵtext(33," "),a.ɵɵelementEnd(),a.ɵɵtext(34," "),a.ɵɵelementEnd(),a.ɵɵtext(35," ")),2&e&&(a.ɵɵadvance(9),a.ɵɵtextInterpolate1(" ",a.ɵɵpipeBind1(10,6,"eventLogs")," "),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.name),a.ɵɵadvance(3),a.ɵɵpropertyInterpolate("appA11yTitle",a.ɵɵpipeBind1(15,8,"close")),a.ɵɵadvance(8),a.ɵɵproperty("ngIf",!t.loaded),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.loaded),a.ɵɵadvance(5),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(30,10,"close")))},directives:[d.NgIf,m.A11yTitleDirective,f.DefaultValueAccessor,f.NgControlStatus,f.NgModel,h.ApiActionDirective,d.NgClass,d.NgForOf],pipes:[v.I18nPipe,d.DatePipe],encapsulation:2}),e}();t.EntityEventsComponent=k,("undefined"==typeof ngDevMode||ngDevMode)&&a.ɵsetClassMetadata(k,[{type:o.Component,args:[{selector:"app-entity-events",templateUrl:"entity-events.component.html"}]}],(function(){return[{type:s.ApiService},{type:l.I18nService},{type:c.EventService},{type:p.ToasterService},{type:u.UserNamePipe}]}),{name:[{type:o.Input}],entity:[{type:o.Input}],entityId:[{type:o.Input}],organizationId:[{type:o.Input}],providerId:[{type:o.Input}],showUser:[{type:o.Input}]})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationUserResetPasswordEnrollmentRequest=void 0;var r=function(){};t.OrganizationUserResetPasswordEnrollmentRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HashPurpose=void 0,function(e){e[e.ServerAuthorization=1]="ServerAuthorization",e[e.LocalAuthorization=2]="LocalAuthorization"}(t.HashPurpose||(t.HashPurpose={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PolicyData=void 0;var r=function(e){this.id=e.id,this.organizationId=e.organizationId,this.type=e.type,this.data=e.data,this.enabled=e.enabled};t.PolicyData=r},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]-1&&(e=e.concat(this.email.substr(0,t).trim().toLowerCase().split(/[^A-Za-z0-9]/))),e},e.ɵfac=function(t){return new(t||e)(a.ɵɵdirectiveInject(s.I18nService),a.ɵɵdirectiveInject(l.CryptoService),a.ɵɵdirectiveInject(c.MessagingService),a.ɵɵdirectiveInject(p.UserService),a.ɵɵdirectiveInject(u.PasswordGenerationService),a.ɵɵdirectiveInject(d.PlatformUtilsService),a.ɵɵdirectiveInject(m.PolicyService))},e.ɵdir=a.ɵɵdefineDirective({type:e}),e}();t.ChangePasswordComponent=f,("undefined"==typeof ngDevMode||ngDevMode)&&a.ɵsetClassMetadata(f,[{type:o.Directive}],(function(){return[{type:s.I18nService},{type:l.CryptoService},{type:c.MessagingService},{type:p.UserService},{type:u.PasswordGenerationService},{type:d.PlatformUtilsService},{type:m.PolicyService}]}),null)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionReadOnlyRequest=void 0;var r=function(e,t,n){this.id=e,this.readOnly=t,this.hidePasswords=n};t.SelectionReadOnlyRequest=r},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PolicyResponse=void 0;var o=function(e){function t(t){var n=e.call(this,t)||this;return n.id=n.getResponseProperty("Id"),n.organizationId=n.getResponseProperty("OrganizationId"),n.type=n.getResponseProperty("Type"),n.data=n.getResponseProperty("Data"),n.enabled=n.getResponseProperty("Enabled"),n}return i(t,e),t}(n(25).BaseResponse);t.PolicyResponse=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoginUriView=void 0;var r=n(309),i=n(28),o=["https://","http://","ssh://","ftp://","sftp://","irc://","vnc://","rdp://","ms-rd:","chrome://","iosapp://","androidapp://"],a=function(){function e(e){this.match=null,this._uri=null,this._domain=null,this._hostname=null,this._host=null,this._canLaunch=null,e&&(this.match=e.match)}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},set:function(e){this._uri=e,this._domain=null,this._canLaunch=null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"domain",{get:function(){return null==this._domain&&null!=this.uri&&(this._domain=i.Utils.getDomain(this.uri),""===this._domain&&(this._domain=null)),this._domain},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hostname",{get:function(){return this.match===r.UriMatchType.RegularExpression?null:(null==this._hostname&&null!=this.uri&&(this._hostname=i.Utils.getHostname(this.uri),""===this._hostname&&(this._hostname=null)),this._hostname)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"host",{get:function(){return this.match===r.UriMatchType.RegularExpression?null:(null==this._host&&null!=this.uri&&(this._host=i.Utils.getHost(this.uri),""===this._host&&(this._host=null)),this._host)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hostnameOrUri",{get:function(){return null!=this.hostname?this.hostname:this.uri},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hostOrUri",{get:function(){return null!=this.host?this.host:this.uri},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isWebsite",{get:function(){return null!=this.uri&&(0===this.uri.indexOf("http://")||0===this.uri.indexOf("https://")||this.uri.indexOf("://")<0&&i.Utils.tldEndingRegex.test(this.uri))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"canLaunch",{get:function(){if(null!=this._canLaunch)return this._canLaunch;if(null!=this.uri&&this.match!==r.UriMatchType.RegularExpression)for(var e=this.launchUri,t=0;t0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&!n.error),s.ɵɵadvance(9),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(12,3,"user")),s.ɵɵadvance(5),s.ɵɵproperty("ngForOf",n.users)}}function w(e,t){if(1&e&&(s.ɵɵelementStart(0,"small",24),s.ɵɵtext(1),s.ɵɵelementEnd()),2&e){var n=s.ɵɵnextContext().$implicit;s.ɵɵadvance(1),s.ɵɵtextInterpolate(n.name)}}function C(e,t){if(1&e&&(s.ɵɵelementStart(0,"td"),s.ɵɵtext(1),s.ɵɵelementEnd()),2&e){var n=s.ɵɵnextContext().$implicit,r=s.ɵɵnextContext(2);s.ɵɵadvance(1),s.ɵɵtextInterpolate1(" ",r.statuses.get(n.id)," ")}}function I(e,t){1&e&&(s.ɵɵelementStart(0,"td"),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(2,1,"bulkFilteredMessage")," "))}function E(e,t){if(1&e&&(s.ɵɵelementStart(0,"tr"),s.ɵɵtext(1," "),s.ɵɵelementStart(2,"td",21),s.ɵɵtext(3," "),s.ɵɵelement(4,"app-avatar",22),s.ɵɵpipe(5,"userName"),s.ɵɵtext(6," "),s.ɵɵelementEnd(),s.ɵɵtext(7," "),s.ɵɵelementStart(8,"td"),s.ɵɵtext(9),s.ɵɵtemplate(10,w,2,1,"small",23),s.ɵɵtext(11," "),s.ɵɵelementEnd(),s.ɵɵtext(12," "),s.ɵɵtemplate(13,C,2,1,"td",10),s.ɵɵtext(14," "),s.ɵɵtemplate(15,I,3,3,"td",10),s.ɵɵtext(16," "),s.ɵɵelementEnd()),2&e){var n=t.$implicit,r=s.ɵɵnextContext(2);s.ɵɵadvance(4),s.ɵɵproperty("data",s.ɵɵpipeBind1(5,8,n))("email",n.email)("circle",!0)("fontSize",14),s.ɵɵadvance(5),s.ɵɵtextInterpolate1(" ",n.email," "),s.ɵɵadvance(1),s.ɵɵproperty("ngIf",n.name),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",r.statuses.has(n.id)),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!r.statuses.has(n.id))}}function P(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1," "),s.ɵɵelementStart(2,"table",17),s.ɵɵtext(3," "),s.ɵɵelementStart(4,"thead"),s.ɵɵtext(5," "),s.ɵɵelementStart(6,"tr"),s.ɵɵtext(7," "),s.ɵɵelementStart(8,"th",18),s.ɵɵtext(9),s.ɵɵpipe(10,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(11," "),s.ɵɵelementStart(12,"th"),s.ɵɵtext(13),s.ɵɵpipe(14,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(15," "),s.ɵɵelementEnd(),s.ɵɵtext(16," "),s.ɵɵelementEnd(),s.ɵɵtext(17," "),s.ɵɵtemplate(18,E,17,10,"tr",19),s.ɵɵtext(19," "),s.ɵɵelementEnd(),s.ɵɵtext(20," "),s.ɵɵelementContainerEnd()),2&e){var n=s.ɵɵnextContext();s.ɵɵadvance(9),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(10,3,"user")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(14,5,"status")),s.ɵɵadvance(5),s.ɵɵproperty("ngForOf",n.users)}}function k(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"button",25),s.ɵɵlistener("click",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext().submit()})),s.ɵɵtext(1," "),s.ɵɵelement(2,"i",26),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4," "),s.ɵɵelementStart(5,"span"),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8," "),s.ɵɵelementEnd()}if(2&e){var r=s.ɵɵnextContext();s.ɵɵproperty("disabled",r.loading),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,3,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,5,"removeUsers"))}}var _=function(){function e(e,t){this.apiService=e,this.i18nService=t,this.statuses=new Map,this.loading=!1,this.done=!1}return e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e,t=this;return i(this,(function(n){switch(n.label){case 0:this.loading=!0,n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.deleteUsers()];case 2:return n.sent().data.forEach((function(e){var n=""!==e.error?e.error:t.i18nService.t("bulkRemovedMessage");t.statuses.set(e.id,n)})),this.done=!0,[3,4];case 3:return e=n.sent(),this.error=e.message,[3,4];case 4:return this.loading=!1,[2]}}))}))},e.prototype.deleteUsers=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return e=new a.OrganizationUserBulkRequest(this.users.map((function(e){return e.id}))),[4,this.apiService.deleteManyOrganizationUsers(this.organizationId,e)];case 1:return[2,t.sent()]}}))}))},e.ɵfac=function(t){return new(t||e)(s.ɵɵdirectiveInject(l.ApiService),s.ɵɵdirectiveInject(c.I18nService))},e.ɵcmp=s.ɵɵdefineComponent({type:e,selectors:[["app-bulk-remove"]],inputs:{organizationId:"organizationId",users:"users"},decls:43,vars:14,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","bulkTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-lg"],[1,"modal-content"],[1,"modal-header"],["id","bulkTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["type","danger",4,"ngIf"],["type","error",4,"ngIf"],[4,"ngIf"],[1,"modal-footer"],["type","submit","class","btn btn-primary btn-submit",3,"disabled","click",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],["type","danger"],["type","error"],["type","warning",4,"ngIf"],[1,"table","table-hover","table-list"],["colspan","2"],[4,"ngFor","ngForOf"],["type","warning"],["width","30"],["size","25",3,"data","email","circle","fontSize"],["class","text-muted d-block",4,"ngIf"],[1,"text-muted","d-block"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled","click"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"]],template:function(e,t){1&e&&(s.ɵɵelementStart(0,"div",0),s.ɵɵtext(1," "),s.ɵɵelementStart(2,"div",1),s.ɵɵtext(3," "),s.ɵɵelementStart(4,"div",2),s.ɵɵtext(5," "),s.ɵɵelementStart(6,"div",3),s.ɵɵtext(7," "),s.ɵɵelementStart(8,"h2",4),s.ɵɵtext(9),s.ɵɵpipe(10,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(11," "),s.ɵɵelementStart(12,"button",5),s.ɵɵpipe(13,"i18n"),s.ɵɵtext(14," "),s.ɵɵelementStart(15,"span",6),s.ɵɵtext(16,"×"),s.ɵɵelementEnd(),s.ɵɵtext(17," "),s.ɵɵelementEnd(),s.ɵɵtext(18," "),s.ɵɵelementEnd(),s.ɵɵtext(19," "),s.ɵɵelementStart(20,"div",7),s.ɵɵtext(21," "),s.ɵɵtemplate(22,v,3,3,"app-callout",8),s.ɵɵtext(23," "),s.ɵɵtemplate(24,y,2,1,"app-callout",9),s.ɵɵtext(25," "),s.ɵɵtemplate(26,S,19,5,"ng-container",10),s.ɵɵtext(27," "),s.ɵɵtemplate(28,P,21,7,"ng-container",10),s.ɵɵtext(29," "),s.ɵɵelementEnd(),s.ɵɵtext(30," "),s.ɵɵelementStart(31,"div",11),s.ɵɵtext(32," "),s.ɵɵtemplate(33,k,9,7,"button",12),s.ɵɵtext(34," "),s.ɵɵelementStart(35,"button",13),s.ɵɵtext(36),s.ɵɵpipe(37,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(38," "),s.ɵɵelementEnd(),s.ɵɵtext(39," "),s.ɵɵelementEnd(),s.ɵɵtext(40," "),s.ɵɵelementEnd(),s.ɵɵtext(41," "),s.ɵɵelementEnd(),s.ɵɵtext(42," ")),2&e&&(s.ɵɵadvance(9),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(10,8,"removeUsers")," "),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(13,10,"close")),s.ɵɵadvance(10),s.ɵɵproperty("ngIf",t.users.length<=0),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.error),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!t.done),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.done),s.ɵɵadvance(5),s.ɵɵproperty("ngIf",!t.done&&t.users.length>0),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(37,12,"close")))},directives:[p.A11yTitleDirective,u.NgIf,d.CalloutComponent,u.NgForOf,m.AvatarComponent],pipes:[f.I18nPipe,h.UserNamePipe],encapsulation:2}),e}();t.BulkRemoveComponent=_,("undefined"==typeof ngDevMode||ngDevMode)&&s.ɵsetClassMetadata(_,[{type:o.Component,args:[{selector:"app-bulk-remove",templateUrl:"bulk-remove.component.html"}]}],(function(){return[{type:l.ApiService},{type:c.I18nService}]}),{organizationId:[{type:o.Input}],users:[{type:o.Input}]})},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]r){if(o===s.TwoFactorProviderType.WebAuthn&&!e)return;n=o,r=a.priority}})),n},e.prototype.makePreloginKey=function(e,t){return i(this,void 0,void 0,(function(){var n,r,i,a;return o(this,(function(o){switch(o.label){case 0:t=t.trim().toLowerCase(),n=null,r=null,o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.apiService.postPrelogin(new u.PreloginRequest(t))];case 2:return null!=(i=o.sent())&&(n=i.kdf,r=i.kdfIterations),[3,4];case 3:if(null==(a=o.sent())||404!==a.statusCode)throw a;return[3,4];case 4:return[2,this.cryptoService.makeKey(e,t,n,r)]}}))}))},e.prototype.authingWithApiKey=function(){return null!=this.clientId&&null!=this.clientSecret},e.prototype.authingWithSso=function(){return null!=this.code&&null!=this.codeVerifier&&null!=this.ssoRedirectUrl},e.prototype.authingWithPassword=function(){return null!=this.email&&null!=this.masterPasswordHash},e.prototype.logInHelper=function(e,t,n,r,a,u,m,f,h,v,y,g,x){return i(this,void 0,void 0,(function(){var i,b,S,w,C,I,E,P,k,_,A,O,M;return o(this,(function(o){switch(o.label){case 0:return[4,this.tokenService.getTwoFactorToken(e)];case 1:return i=o.sent(),[4,this.appIdService.getAppId()];case 2:return b=o.sent(),S=new c.DeviceRequest(b,this.platformUtilsService),w=[],C=[],I=[null,null],w=null!=e&&null!=t?[e,t]:null,C=null!=r&&null!=a&&null!=u?[r,a,u]:null,I=null!=m&&null!=f?[m,f]:null,E=null!=y&&null!=v?new d.TokenRequest(w,C,I,v,y,g,x,S):null!=i?new d.TokenRequest(w,C,I,s.TwoFactorProviderType.Remember,i,!1,x,S):new d.TokenRequest(w,C,I,null,null,!1,x,S),[4,this.apiService.postIdentityToken(E)];case 3:return P=o.sent(),this.clearState(),(k=new l.AuthResult).captchaSiteKey=P.siteKey,k.captchaSiteKey?[2,k]:(k.twoFactor=!!P.twoFactorProviders2,k.twoFactor?(this.email=e,this.masterPasswordHash=t,this.localMasterPasswordHash=n,this.code=r,this.codeVerifier=a,this.ssoRedirectUrl=u,this.clientId=m,this.clientSecret=f,this.key=this.setCryptoKeys?h:null,_=P,this.twoFactorProvidersData=_.twoFactorProviders2,k.twoFactorProviders=_.twoFactorProviders2,this.captchaToken=_.captchaToken,[2,k]):(A=P,k.resetMasterPassword=A.resetMasterPassword,k.forcePasswordReset=A.forcePasswordReset,null==A.twoFactorToken?[3,5]:[4,this.tokenService.setTwoFactorToken(A.twoFactorToken,e)]));case 4:o.sent(),o.label=5;case 5:return[4,this.tokenService.setTokens(A.accessToken,A.refreshToken,I)];case 6:return o.sent(),[4,this.userService.setInformation(this.tokenService.getUserId(),this.tokenService.getEmail(),A.kdf,A.kdfIterations)];case 7:return o.sent(),this.setCryptoKeys?null==h?[3,9]:[4,this.cryptoService.setKey(h)]:[3,19];case 8:o.sent(),o.label=9;case 9:return null==n?[3,11]:[4,this.cryptoService.setKeyHash(n)];case 10:o.sent(),o.label=11;case 11:return null!=r&&null==A.key?[3,19]:[4,this.cryptoService.setEncKey(A.key)];case 12:if(o.sent(),null!=A.privateKey)return[3,17];o.label=13;case 13:return o.trys.push([13,16,,17]),[4,this.cryptoService.makeKeyPair()];case 14:return O=o.sent(),[4,this.apiService.postAccountKeys(new p.KeysRequest(O[0],O[1].encryptedString))];case 15:return o.sent(),A.privateKey=O[1].encryptedString,[3,17];case 16:return M=o.sent(),this.logService.error(M),[3,17];case 17:return[4,this.cryptoService.setEncPrivateKey(A.privateKey)];case 18:o.sent(),o.label=19;case 19:return null!=this.vaultTimeoutService&&(this.vaultTimeoutService.biometricLocked=!1),this.messagingService.send("loggedIn"),[2,k]}}))}))},e.prototype.clearState=function(){this.key=null,this.email=null,this.masterPasswordHash=null,this.localMasterPasswordHash=null,this.code=null,this.codeVerifier=null,this.ssoRedirectUrl=null,this.clientId=null,this.clientSecret=null,this.twoFactorProvidersData=null,this.selectedTwoFactorProviderType=null},e}();t.AuthService=m},,function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&t.forEach((function(t){var n=e.data.filter((function(e){return e.id===t}));null!=n&&n.length>0&&(n[0].checked=!0)})),[3,5];case 3:return"collection"!==this.entity?[3,5]:[4,this.apiService.getCollectionUsers(this.organizationId,this.entityId)];case 4:null!=(t=r.sent())&&e.data.length>0&&t.forEach((function(t){var n=e.data.filter((function(e){return!e.accessAll&&e.id===t.id}));null!=n&&n.length>0&&(n[0].checked=!0,n[0].readOnly=t.readOnly,n[0].hidePasswords=t.hidePasswords)})),r.label=5;case 5:return this.allUsers.forEach((function(e){"collection"===n.entity&&e.accessAll&&(e.checked=!0),e.checked&&n.selectedCount++})),[2]}}))}))},e.prototype.check=function(e){"collection"===this.entity&&e.accessAll||(e.checked=!e.checked,this.selectedChanged(e))},e.prototype.selectedChanged=function(e){e.checked?this.selectedCount++:("collection"===this.entity&&(e.readOnly=!1,e.hidePasswords=!1),this.selectedCount--)},e.prototype.filterSelected=function(e){this.showSelected=e},e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),"group"===this.entity?(e=this.users.filter((function(e){return e.checked})).map((function(e){return e.id})),this.formPromise=this.apiService.putGroupUsers(this.organizationId,this.entityId,e)):(e=this.users.filter((function(e){return e.checked&&!e.accessAll})).map((function(e){return new l.SelectionReadOnlyRequest(e.id,!!e.readOnly,!!e.hidePasswords)})),this.formPromise=this.apiService.putCollectionUsers(this.organizationId,this.entityId,e)),[4,this.formPromise];case 1:return t.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("updatedUsers")),this.onEditedUsers.emit(),[3,3];case 2:return t.sent(),[3,3];case 3:return[2]}}))}))},e.ɵfac=function(t){return new(t||e)(p.ɵɵdirectiveInject(u.ApiService),p.ɵɵdirectiveInject(d.I18nService),p.ɵɵdirectiveInject(m.ToasterService))},e.ɵcmp=p.ɵɵdefineComponent({type:e,selectors:[["app-entity-users"]],inputs:{entity:"entity",entityId:"entityId",entityName:"entityName",organizationId:"organizationId"},outputs:{onEditedUsers:"onEditedUsers"},decls:49,vars:29,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","userAccessTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-lg"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","userAccessTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"modal-body"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],[1,"d-flex"],[1,"mr-3"],["for","search",1,"sr-only"],["type","search","id","search","name","SearchText",1,"form-control","form-control-sm",3,"placeholder","ngModel","ngModelChange"],["role","group",1,"btn-group","btn-group-sm"],["type","button",1,"btn","btn-outline-secondary",3,"ngClass","click"],["class","badge badge-pill badge-info",4,"ngIf"],[4,"ngIf"],[1,"badge","badge-pill","badge-info"],[1,"table","table-hover","table-list","mb-0"],["width","100","class","text-center",4,"ngIf"],[4,"ngFor","ngForOf"],["width","100",1,"text-center"],[1,"table-list-checkbox",3,"click"],["type","checkbox","appStopProp","",3,"ngModel","name","disabled","ngModelChange","change"],["width","30",3,"click"],["size","25",3,"data","email","circle","fontSize"],["class","badge badge-secondary",4,"ngIf"],["class","badge badge-warning",4,"ngIf"],["class","text-muted d-block",4,"ngIf"],["class","text-center",4,"ngIf"],[1,"badge","badge-secondary"],[1,"badge","badge-warning"],[1,"text-muted","d-block"],["aria-hidden","true",1,"fa","fa-th",3,"title"],[1,"text-center"],["type","checkbox",3,"ngModel","name","disabled","ngModelChange"]],template:function(e,t){if(1&e&&(p.ɵɵelementStart(0,"div",0),p.ɵɵtext(1," "),p.ɵɵelementStart(2,"div",1),p.ɵɵtext(3," "),p.ɵɵelementStart(4,"form",2,3),p.ɵɵlistener("ngSubmit",(function(){return t.submit()})),p.ɵɵtext(6," "),p.ɵɵelementStart(7,"div",4),p.ɵɵtext(8," "),p.ɵɵelementStart(9,"h2",5),p.ɵɵtext(10),p.ɵɵpipe(11,"i18n"),p.ɵɵelementStart(12,"small"),p.ɵɵtext(13),p.ɵɵelementEnd(),p.ɵɵtext(14," "),p.ɵɵelementEnd(),p.ɵɵtext(15," "),p.ɵɵelementStart(16,"button",6),p.ɵɵpipe(17,"i18n"),p.ɵɵtext(18," "),p.ɵɵelementStart(19,"span",7),p.ɵɵtext(20,"×"),p.ɵɵelementEnd(),p.ɵɵtext(21," "),p.ɵɵelementEnd(),p.ɵɵtext(22," "),p.ɵɵelementEnd(),p.ɵɵtext(23," "),p.ɵɵtemplate(24,C,9,6,"div",8),p.ɵɵtext(25," "),p.ɵɵtemplate(26,G,32,22,"div",8),p.ɵɵpipe(27,"search"),p.ɵɵtext(28," "),p.ɵɵelementStart(29,"div",9),p.ɵɵtext(30," "),p.ɵɵelementStart(31,"button",10),p.ɵɵtext(32," "),p.ɵɵelement(33,"i",11),p.ɵɵpipe(34,"i18n"),p.ɵɵtext(35," "),p.ɵɵelementStart(36,"span"),p.ɵɵtext(37),p.ɵɵpipe(38,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(39," "),p.ɵɵelementEnd(),p.ɵɵtext(40," "),p.ɵɵelementStart(41,"button",12),p.ɵɵtext(42),p.ɵɵpipe(43,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(44," "),p.ɵɵelementEnd(),p.ɵɵtext(45," "),p.ɵɵelementEnd(),p.ɵɵtext(46," "),p.ɵɵelementEnd(),p.ɵɵtext(47," "),p.ɵɵelementEnd(),p.ɵɵtext(48," ")),2&e){var n=p.ɵɵreference(5);p.ɵɵadvance(4),p.ɵɵproperty("appApiAction",t.formPromise),p.ɵɵadvance(6),p.ɵɵtextInterpolate1(" ",p.ɵɵpipeBind1(11,10,"userAccess")," "),p.ɵɵadvance(3),p.ɵɵtextInterpolate(t.entityName),p.ɵɵadvance(3),p.ɵɵpropertyInterpolate("appA11yTitle",p.ɵɵpipeBind1(17,12,"close")),p.ɵɵadvance(8),p.ɵɵproperty("ngIf",t.loading||!t.users),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",!t.loading&&t.users&&p.ɵɵpipeBindV(27,14,p.ɵɵpureFunction2(26,q,t.users,t.searchText))),p.ɵɵadvance(5),p.ɵɵproperty("disabled",n.loading),p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(34,20,"loading")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(38,22,"save")),p.ɵɵadvance(5),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(43,24,"close"))}},directives:[f.NgControlStatusGroup,f.NgForm,h.ApiActionDirective,v.A11yTitleDirective,y.NgIf,f.DefaultValueAccessor,f.NgControlStatus,f.NgModel,y.NgClass,y.NgForOf,f.CheckboxControlValueAccessor,g.StopPropDirective,x.AvatarComponent],pipes:[b.I18nPipe,S.SearchPipe,w.UserNamePipe],encapsulation:2}),e}();t.EntityUsersComponent=W,("undefined"==typeof ngDevMode||ngDevMode)&&p.ɵsetClassMetadata(W,[{type:o.Component,args:[{selector:"app-entity-users",templateUrl:"entity-users.component.html"}]}],(function(){return[{type:u.ApiService},{type:d.I18nService},{type:m.ToasterService}]}),{entity:[{type:o.Input}],entityId:[{type:o.Input}],entityName:[{type:o.Input}],organizationId:[{type:o.Input}],onEditedUsers:[{type:o.Output}]})},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0)return void(this.creditAmount=parseFloat((Math.round(100*e)/100).toString()).toFixed(2).toString())}}catch(t){}this.creditAmount=""},Object.defineProperty(e.prototype,"creditAmountNumber",{get:function(){if(null!=this.creditAmount&&""!==this.creditAmount)try{return parseFloat(this.creditAmount)}catch(e){}return null},enumerable:!1,configurable:!0}),e.ɵfac=function(t){return new(t||e)(l.ɵɵdirectiveInject(c.UserService),l.ɵɵdirectiveInject(p.ApiService),l.ɵɵdirectiveInject(u.PlatformUtilsService))},e.ɵcmp=l.ɵɵdefineComponent({type:e,selectors:[["app-add-credit"]],viewQuery:function(e,t){if(1&e&&l.ɵɵviewQuery(y,3,o.ElementRef),2&e){var n;l.ɵɵqueryRefresh(n=l.ɵɵloadQuery())&&(t.ppButtonFormRef=n.first)}},inputs:{creditAmount:"creditAmount",showOptions:"showOptions",method:"method",organizationId:"organizationId"},outputs:{onAdded:"onAdded",onCanceled:"onCanceled"},decls:92,vars:32,consts:[["ngNativeValidate","",1,"card",3,"appApiAction","ngSubmit"],["form",""],[1,"card-body"],["type","button",1,"close",3,"appA11yTitle","click"],["aria-hidden","true"],[1,"card-body-header"],["class","mb-4 text-lg",4,"ngIf"],[1,"form-group"],[1,"row"],[1,"col-4"],["for","creditAmount"],[1,"input-group"],[1,"input-group-prepend"],[1,"input-group-text"],["id","creditAmount","type","text","name","CreditAmount","required","",1,"form-control",3,"ngModel","ngModelChange","blur"],[1,"form-text","text-muted"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["method","post","target","_top",3,"action"],["ppButtonForm",""],["type","hidden","name","cmd","value","_xclick"],["type","hidden","name","business",3,"value"],["type","hidden","name","button_subtype","value","services"],["type","hidden","name","no_note","value","1"],["type","hidden","name","no_shipping","value","1"],["type","hidden","name","rm","value","1"],["type","hidden","name","return",3,"value"],["type","hidden","name","cancel_return",3,"value"],["type","hidden","name","currency_code","value","USD"],["type","hidden","name","image_url","value","https://bitwarden.com/images/paypal-banner.png"],["type","hidden","name","bn","value","PP-BuyNowBF:btn_buynow_LG.gif:NonHosted"],["type","hidden","name","amount",3,"value"],["type","hidden","name","custom",3,"value"],["type","hidden","name","item_name","value","Bitwarden Account Credit"],["type","hidden","name","item_number",3,"value"],[1,"mb-4","text-lg"],[1,"form-check","form-check-inline"],["type","radio","name","Method","id","credit-method-paypal",1,"form-check-input",3,"value","ngModel","ngModelChange"],["for","credit-method-paypal",1,"form-check-label"],["aria-hidden","true",1,"fa","fa-fw","fa-paypal"],["type","radio","name","Method","id","credit-method-bitcoin",1,"form-check-input",3,"value","ngModel","ngModelChange"],["for","credit-method-bitcoin",1,"form-check-label"],["aria-hidden","true",1,"fa","fa-fw","fa-bitcoin"]],template:function(e,t){if(1&e&&(l.ɵɵelementStart(0,"form",0,1),l.ɵɵlistener("ngSubmit",(function(){return t.submit()})),l.ɵɵtext(2," "),l.ɵɵelementStart(3,"div",2),l.ɵɵtext(4," "),l.ɵɵelementStart(5,"button",3),l.ɵɵlistener("click",(function(){return t.cancel()})),l.ɵɵpipe(6,"i18n"),l.ɵɵelementStart(7,"span",4),l.ɵɵtext(8,"×"),l.ɵɵelementEnd(),l.ɵɵelementEnd(),l.ɵɵtext(9," "),l.ɵɵelementStart(10,"h3",5),l.ɵɵtext(11),l.ɵɵpipe(12,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(13," "),l.ɵɵtemplate(14,g,22,4,"div",6),l.ɵɵtext(15," "),l.ɵɵelementStart(16,"div",7),l.ɵɵtext(17," "),l.ɵɵelementStart(18,"div",8),l.ɵɵtext(19," "),l.ɵɵelementStart(20,"div",9),l.ɵɵtext(21," "),l.ɵɵelementStart(22,"label",10),l.ɵɵtext(23),l.ɵɵpipe(24,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(25," "),l.ɵɵelementStart(26,"div",11),l.ɵɵtext(27," "),l.ɵɵelementStart(28,"div",12),l.ɵɵelementStart(29,"span",13),l.ɵɵtext(30,"$USD"),l.ɵɵelementEnd(),l.ɵɵelementEnd(),l.ɵɵtext(31," "),l.ɵɵelementStart(32,"input",14),l.ɵɵlistener("ngModelChange",(function(e){return t.creditAmount=e}))("blur",(function(){return t.formatAmount()})),l.ɵɵelementEnd(),l.ɵɵtext(33," "),l.ɵɵelementEnd(),l.ɵɵtext(34," "),l.ɵɵelementEnd(),l.ɵɵtext(35," "),l.ɵɵelementEnd(),l.ɵɵtext(36," "),l.ɵɵelementStart(37,"small",15),l.ɵɵtext(38),l.ɵɵpipe(39,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(40," "),l.ɵɵelementEnd(),l.ɵɵtext(41," "),l.ɵɵelementStart(42,"button",16),l.ɵɵtext(43," "),l.ɵɵelement(44,"i",17),l.ɵɵpipe(45,"i18n"),l.ɵɵtext(46," "),l.ɵɵelementStart(47,"span"),l.ɵɵtext(48),l.ɵɵpipe(49,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(50," "),l.ɵɵelementEnd(),l.ɵɵtext(51," "),l.ɵɵelementStart(52,"button",18),l.ɵɵlistener("click",(function(){return t.cancel()})),l.ɵɵtext(53),l.ɵɵpipe(54,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(55," "),l.ɵɵelementEnd(),l.ɵɵtext(56," "),l.ɵɵelementEnd(),l.ɵɵtext(57," "),l.ɵɵelementStart(58,"form",19,20),l.ɵɵtext(60," "),l.ɵɵelement(61,"input",21),l.ɵɵtext(62," "),l.ɵɵelement(63,"input",22),l.ɵɵtext(64," "),l.ɵɵelement(65,"input",23),l.ɵɵtext(66," "),l.ɵɵelement(67,"input",24),l.ɵɵtext(68," "),l.ɵɵelement(69,"input",25),l.ɵɵtext(70," "),l.ɵɵelement(71,"input",26),l.ɵɵtext(72," "),l.ɵɵelement(73,"input",27),l.ɵɵtext(74," "),l.ɵɵelement(75,"input",28),l.ɵɵtext(76," "),l.ɵɵelement(77,"input",29),l.ɵɵtext(78," "),l.ɵɵelement(79,"input",30),l.ɵɵtext(80," "),l.ɵɵelement(81,"input",31),l.ɵɵtext(82," "),l.ɵɵelement(83,"input",32),l.ɵɵtext(84," "),l.ɵɵelement(85,"input",33),l.ɵɵtext(86," "),l.ɵɵelement(87,"input",34),l.ɵɵtext(88," "),l.ɵɵelement(89,"input",35),l.ɵɵtext(90," "),l.ɵɵelementEnd(),l.ɵɵtext(91," ")),2&e){var n=l.ɵɵreference(1);l.ɵɵproperty("appApiAction",t.formPromise),l.ɵɵadvance(5),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(6,18,"cancel")),l.ɵɵadvance(6),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(12,20,"addCredit")),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",t.showOptions),l.ɵɵadvance(9),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(24,22,"amount")),l.ɵɵadvance(9),l.ɵɵproperty("ngModel",t.creditAmount),l.ɵɵadvance(6),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(39,24,"creditDelayed")),l.ɵɵadvance(4),l.ɵɵproperty("disabled",n.loading||t.ppLoading),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(45,26,"loading")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(49,28,"submit")),l.ɵɵadvance(5),l.ɵɵtextInterpolate1(" ",l.ɵɵpipeBind1(54,30,"cancel")," "),l.ɵɵadvance(5),l.ɵɵpropertyInterpolate("action",t.ppButtonFormAction,l.ɵɵsanitizeUrl),l.ɵɵadvance(5),l.ɵɵpropertyInterpolate("value",t.ppButtonBusinessId),l.ɵɵadvance(10),l.ɵɵpropertyInterpolate("value",t.returnUrl),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("value",t.returnUrl),l.ɵɵadvance(8),l.ɵɵpropertyInterpolate("value",t.creditAmount),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("value",t.ppButtonCustomField),l.ɵɵadvance(4),l.ɵɵpropertyInterpolate("value",t.subject)}},directives:[d.NgControlStatusGroup,d.NgForm,m.ApiActionDirective,f.A11yTitleDirective,h.NgIf,d.DefaultValueAccessor,d.RequiredValidator,d.NgControlStatus,d.NgModel,d.ɵangular_packages_forms_forms_ba,d.RadioControlValueAccessor],pipes:[v.I18nPipe],encapsulation:2}),e}();t.AddCreditComponent=x,("undefined"==typeof ngDevMode||ngDevMode)&&l.ɵsetClassMetadata(x,[{type:o.Component,args:[{selector:"app-add-credit",templateUrl:"add-credit.component.html"}]}],(function(){return[{type:c.UserService},{type:p.ApiService},{type:u.PlatformUtilsService}]}),{creditAmount:[{type:o.Input}],showOptions:[{type:o.Input}],method:[{type:o.Input}],organizationId:[{type:o.Input}],onAdded:[{type:o.Output}],onCanceled:[{type:o.Output}],ppButtonFormRef:[{type:o.ViewChild,args:["ppButtonForm",{read:o.ElementRef,static:!0}]}]})},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&(t.push(e),r.exposedPasswordMap.set(e.id,n))}));n.push(i)}})),[4,Promise.all(n)];case 2:return i.sent(),this.ciphers=t,[2]}}))}))},t.prototype.getAllCiphers=function(){return this.cipherService.getAllDecrypted()},t.prototype.canManageCipher=function(e){return!0},t.ɵfac=function(e){return new(e||t)(p.ɵɵdirectiveInject(u.CipherService),p.ɵɵdirectiveInject(d.AuditService),p.ɵɵdirectiveInject(m.ModalService),p.ɵɵdirectiveInject(f.MessagingService),p.ɵɵdirectiveInject(h.UserService),p.ɵɵdirectiveInject(v.PasswordRepromptService))},t.ɵcmp=p.ɵɵdefineComponent({type:t,selectors:[["app-exposed-passwords-report"]],features:[p.ɵɵInheritDefinitionFeature],decls:26,vars:14,consts:[[1,"page-header"],["type","button",1,"btn","btn-primary","btn-submit",3,"disabled","click"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["class","mt-4",4,"ngIf"],["cipherAddEdit",""],[1,"mt-4"],["type","success",3,"title",4,"ngIf"],[4,"ngIf"],["type","success",3,"title"],["type","danger",3,"title"],[1,"table","table-hover","table-list","table-ciphers"],[4,"ngFor","ngForOf"],[1,"table-list-icon"],[3,"cipher"],[1,"reduced-lh","wrap"],[4,"ngIf","ngIfElse"],["cantManage",""],[1,"text-right"],[1,"badge","badge-warning"],["href","#","appStopClick","",3,"title","click"],["appStopProp","","aria-hidden","true",1,"fa","fa-cube",3,"title"],[1,"sr-only"],["appStopProp","","aria-hidden","true",1,"fa","fa-paperclip",3,"title"]],template:function(e,t){1&e&&(p.ɵɵelementStart(0,"div",0),p.ɵɵtext(1," "),p.ɵɵelementStart(2,"h1"),p.ɵɵtext(3),p.ɵɵpipe(4,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(5," "),p.ɵɵelementEnd(),p.ɵɵtext(6," "),p.ɵɵelementStart(7,"p"),p.ɵɵtext(8),p.ɵɵpipe(9,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(10," "),p.ɵɵelementStart(11,"button",1),p.ɵɵlistener("click",(function(){return t.load()})),p.ɵɵtext(12," "),p.ɵɵelement(13,"i",2),p.ɵɵpipe(14,"i18n"),p.ɵɵtext(15," "),p.ɵɵelementStart(16,"span"),p.ɵɵtext(17),p.ɵɵpipe(18,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(19," "),p.ɵɵelementEnd(),p.ɵɵtext(20," "),p.ɵɵtemplate(21,O,6,2,"div",3),p.ɵɵtext(22," "),p.ɵɵtemplate(23,M,0,0,"ng-template",null,4,p.ɵɵtemplateRefExtractor),p.ɵɵtext(25," ")),2&e&&(p.ɵɵadvance(3),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(4,6,"exposedPasswordsReport")),p.ɵɵadvance(5),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(9,8,"exposedPasswordsReportDesc")),p.ɵɵadvance(3),p.ɵɵproperty("disabled",t.loading),p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(14,10,"loading")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(18,12,"checkExposedPasswords")),p.ɵɵadvance(4),p.ɵɵproperty("ngIf",t.hasLoaded))},directives:[y.NgIf,g.CalloutComponent,y.NgForOf,x.IconComponent,b.StopClickDirective,S.StopPropDirective],pipes:[w.I18nPipe,y.DecimalPipe],encapsulation:2}),t}(c.CipherReportComponent);t.ExposedPasswordsReportComponent=T,("undefined"==typeof ngDevMode||ngDevMode)&&p.ɵsetClassMetadata(T,[{type:s.Component,args:[{selector:"app-exposed-passwords-report",templateUrl:"exposed-passwords-report.component.html"}]}],(function(){return[{type:u.CipherService},{type:d.AuditService},{type:m.ModalService},{type:f.MessagingService},{type:h.UserService},{type:v.PasswordRepromptService}]}),null)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]1||!this.allowPersonal)&&(null!=this.organization?this.cloneMode&&this.organization.canEditAnyCollection:!this.editMode||this.cloneMode)},t.prototype.loadCollections=function(){return this.organization.canEditAnyCollection?Promise.resolve(this.collections):e.prototype.loadCollections.call(this)},t.prototype.loadCipher=function(){return o(this,void 0,void 0,(function(){var t,n;return a(this,(function(r){switch(r.label){case 0:return this.organization.canEditAnyCollection?[3,2]:[4,e.prototype.loadCipher.call(this)];case 1:return[2,r.sent()];case 2:return[4,this.apiService.getCipherAdmin(this.cipherId)];case 3:return t=r.sent(),n=new l.CipherData(t),this.originalCipher=new c.Cipher(n),[2,new c.Cipher(n)]}}))}))},t.prototype.encryptCipher=function(){return this.organization.canEditAnyCollection?this.cipherService.encrypt(this.cipher,null,this.originalCipher):e.prototype.encryptCipher.call(this)},t.prototype.saveCipher=function(t){return o(this,void 0,void 0,(function(){var n;return a(this,(function(r){return this.organization.canEditAnyCollection&&null!=t.organizationId?this.editMode&&!this.cloneMode?(n=new u.CipherRequest(t),[2,this.apiService.putCipherAdmin(this.cipherId,n)]):(n=new p.CipherCreateRequest(t),[2,this.apiService.postCipherAdmin(n)]):[2,e.prototype.saveCipher.call(this,t)]}))}))},t.prototype.deleteCipher=function(){return o(this,void 0,void 0,(function(){return a(this,(function(t){return this.organization.canEditAnyCollection?[2,this.cipher.isDeleted?this.apiService.deleteCipherAdmin(this.cipherId):this.apiService.putDeleteCipherAdmin(this.cipherId)]:[2,e.prototype.deleteCipher.call(this)]}))}))},t.ɵfac=function(e){return new(e||t)(m.ɵɵdirectiveInject(f.CipherService),m.ɵɵdirectiveInject(h.FolderService),m.ɵɵdirectiveInject(v.I18nService),m.ɵɵdirectiveInject(y.PlatformUtilsService),m.ɵɵdirectiveInject(g.AuditService),m.ɵɵdirectiveInject(x.StateService),m.ɵɵdirectiveInject(b.UserService),m.ɵɵdirectiveInject(S.CollectionService),m.ɵɵdirectiveInject(w.TotpService),m.ɵɵdirectiveInject(C.PasswordGenerationService),m.ɵɵdirectiveInject(I.ApiService),m.ɵɵdirectiveInject(E.MessagingService),m.ɵɵdirectiveInject(P.EventService),m.ɵɵdirectiveInject(k.PolicyService))},t.ɵcmp=m.ɵɵdefineComponent({type:t,selectors:[["app-org-vault-add-edit"]],features:[m.ɵɵInheritDefinitionFeature],decls:36,vars:11,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","cipherAddEditTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-lg"],["ngNativeValidate","","autocomplete","off",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","cipherAddEditTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["type","submit","class","btn btn-primary btn-submit",3,"disabled",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],["class","ml-auto",4,"ngIf"],[1,"modal-body"],["type","info",4,"ngIf"],["class","row",4,"ngIf"],[1,"row"],[1,"col-6","form-group"],["for","name"],["id","name","type","text","name","Name","required","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["class","col-6 form-group",4,"ngIf"],[4,"ngIf"],[1,"form-group"],["for","notes"],["id","notes","name","Notes","rows","6",1,"form-control",3,"ngModel","disabled","ngModelChange"],[3,"cipher","viewOnly","copy"],[1,"mt-4"],[1,"form-check"],["type","checkbox","id","passwordPrompt","name","passwordPrompt",1,"form-check-input",3,"ngModel","disabled","change"],["for","passwordPrompt",1,"form-check-label"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/article/managing-items/#protect-individual-items",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-question-circle-o"],["type","info"],["for","type"],["id","type","name","Type","appAutofocus","",1,"form-control",3,"ngModel","disabled","ngModelChange"],[3,"ngValue",4,"ngFor","ngForOf"],[3,"ngValue"],["for","folder"],["id","folder","name","FolderId",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","loginUsername"],[1,"input-group"],["id","loginUsername","type","text","name","Login.Username","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["class","input-group-append",4,"ngIf"],[1,"d-flex"],["for","loginPassword"],["class","ml-auto d-flex",4,"ngIf"],["id","loginPassword","name","Login.Password","appInputVerbatim","","autocomplete","new-password",1,"form-control","text-monospace",3,"type","ngModel","disabled","ngModelChange"],[1,"input-group-append"],["type","button",1,"btn","btn-outline-secondary",3,"appA11yTitle","disabled","click"],["aria-hidden","true",1,"fa","fa-lg",3,"ngClass"],["aria-hidden","true",1,"fa","fa-lg","fa-clone"],["for","loginTotp"],["id","loginTotp","name","Login.Totp","appInputVerbatim","",1,"form-control","text-monospace",3,"type","ngModel","disabled","ngModelChange"],[1,"col-6","form-group","totp","d-flex","align-items-end",3,"ngClass"],["class","d-flex align-items-center",4,"ngIf"],["href","#","appStopClick","","class","d-inline-block mb-3",3,"click",4,"ngIf"],["type","button",1,"btn","btn-outline-secondary",3,"appA11yTitle","click"],[1,"ml-auto","d-flex"],["href","#","class","d-block mr-2 fa-icon-above-input","appStopClick","",3,"appA11yTitle","click",4,"ngIf"],["href","#","appStopClick","",1,"d-block","fa-icon-above-input",3,"appA11yTitle","appApiAction","click"],["checkPasswordBtn",""],["aria-hidden","true",1,"fa","fa-lg","fa-fw","fa-check-circle",3,"hidden"],["aria-hidden","true",1,"fa","fa-lg","fa-fw","fa-spinner","fa-spin",3,"hidden","title"],["href","#","appStopClick","",1,"d-block","mr-2","fa-icon-above-input",3,"appA11yTitle","click"],["aria-hidden","true",1,"fa","fa-lg","fa-fw","fa-refresh"],["src","images/totp-countdown.png","id","totpImage",1,"ml-2",3,"title"],["href","#","appStopClick","","class","badge badge-primary ml-3",3,"click",4,"ngIf"],["href","#","appStopClick","",1,"badge","badge-primary","ml-3",3,"click"],[1,"d-flex","align-items-center"],[1,"totp-countdown","mr-3","ml-2"],[1,"totp-sec"],["r","12.6","cy","16","cx","16",1,"totp-circle","inner",3,"ngStyle"],["r","14","cy","16","cx","16",1,"totp-circle","outer"],[1,"totp-code","mr-2",3,"title"],["type","button",1,"btn","btn-link",3,"appA11yTitle","click"],["aria-hidden","true",1,"fa","fa-clone"],["class","row",4,"ngFor","ngForOf","ngForTrackBy"],[1,"col-7","form-group"],[3,"for"],["type","text","appInputVerbatim","",1,"form-control",3,"id","name","ngModel","disabled","placeholder","ngModelChange"],["aria-hidden","true",1,"fa","fa-lg","fa-share"],[1,"col-5","form-group"],["href","https://help.bitwarden.com/article/uri-match-detection/","target","_blank","rel","noopener",1,"ml-auto",3,"appA11yTitle"],[1,"form-control","overflow-hidden",3,"id","name","ngModel","disabled","ngModelChange","change"],["type","button","class","btn btn-link text-danger ml-2",3,"appA11yTitle","click",4,"ngIf"],["type","button",1,"btn","btn-link","text-danger","ml-2",3,"appA11yTitle","click"],["aria-hidden","true",1,"fa","fa-minus-circle","fa-lg"],["href","#","appStopClick","",1,"d-inline-block","mb-3",3,"click"],["aria-hidden","true",1,"fa","fa-plus-circle","fa-fw"],["for","cardCardholderName"],["id","cardCardholderName","type","text","name","Card.CardCardholderName",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","cardBrand"],["id","cardBrand","name","Card.Brand",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","cardNumber"],["id","cardNumber","name","Card.Number","appInputVerbatim","","autocomplete","new-password",1,"form-control","text-monospace",3,"type","ngModel","disabled","ngModelChange"],[1,"col","form-group"],["for","cardExpMonth"],["id","cardExpMonth","name","Card.ExpMonth",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","cardExpYear"],["id","cardExpYear","type","text","name","Card.ExpYear",1,"form-control",3,"ngModel","placeholder","disabled","ngModelChange"],["for","cardCode"],["id","cardCode","name","Card.Code","appInputVerbatim","","autocomplete","new-password",1,"form-control","text-monospace",3,"type","ngModel","disabled","ngModelChange"],[1,"col-4","form-group"],["for","idTitle"],["id","idTitle","name","Identity.Title",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idFirstName"],["id","idFirstName","type","text","name","Identity.FirstName",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idMiddleName"],["id","idMiddleName","type","text","name","Identity.MiddleName",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idLastName"],["id","idLastName","type","text","name","Identity.LastName",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idUsername"],["id","idUsername","type","text","name","Identity.Username","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idCompany"],["id","idCompany","type","text","name","Identity.Company",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idSsn"],["id","idSsn","type","text","name","Identity.SSN","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idPassportNumber"],["id","idPassportNumber","type","text","name","Identity.PassportNumber","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idLicenseNumber"],["id","idLicenseNumber","type","text","name","Identity.LicenseNumber","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idEmail"],["id","idEmail","type","text","name","Identity.Email","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idPhone"],["id","idPhone","type","text","name","Identity.Phone",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idAddress1"],["id","idAddress1","type","text","name","Identity.Address1",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idAddress2"],["id","idAddress2","type","text","name","Identity.Address2",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idAddress3"],["id","idAddress3","type","text","name","Identity.Address3",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idCity"],["id","idCity","type","text","name","Identity.City",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idState"],["id","idState","type","text","name","Identity.State",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idPostalCode"],["id","idPostalCode","type","text","name","Identity.PostalCode",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idCountry"],["id","idCountry","type","text","name","Identity.Country",1,"form-control",3,"ngModel","disabled","ngModelChange"],[1,"col-5"],["for","organizationId"],["id","organizationId","name","OrganizationId",1,"form-control",3,"ngModel","disabled","ngModelChange","change"],["class","form-check",4,"ngFor","ngForOf"],["type","checkbox",1,"form-check-input",3,"ngModel","id","name","disabled","ngModelChange"],[1,"form-check-label",3,"for"],[1,"small","text-muted","mt-4"],[1,"font-weight-semibold"],["class","ml-3",4,"ngIf"],["href","#","appStopClick","",3,"title","click"],[1,"ml-3"],[4,"ngFor","ngForOf"],[1,"password-wrapper","text-monospace","ml-2"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],[1,"ml-auto"],["type","button","class","btn btn-link",3,"appA11yTitle","click",4,"ngIf"],["type","button","class","btn btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click",4,"ngIf"],["type","button",1,"btn","btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click"],["deleteBtn",""],["aria-hidden","true",1,"fa","fa-trash-o","fa-lg","fa-fw",3,"hidden"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","fa-lg","fa-fw",3,"hidden","title"]],template:function(e,t){1&e&&(m.ɵɵelementStart(0,"div",0),m.ɵɵtext(1," "),m.ɵɵelementStart(2,"div",1),m.ɵɵtext(3," "),m.ɵɵelementStart(4,"form",2,3),m.ɵɵlistener("ngSubmit",(function(){return t.submit()})),m.ɵɵtext(6," "),m.ɵɵelementStart(7,"div",4),m.ɵɵtext(8," "),m.ɵɵelementStart(9,"h2",5),m.ɵɵtext(10),m.ɵɵelementEnd(),m.ɵɵtext(11," "),m.ɵɵelementStart(12,"button",6),m.ɵɵpipe(13,"i18n"),m.ɵɵtext(14," "),m.ɵɵelementStart(15,"span",7),m.ɵɵtext(16,"×"),m.ɵɵelementEnd(),m.ɵɵtext(17," "),m.ɵɵelementEnd(),m.ɵɵtext(18," "),m.ɵɵelementEnd(),m.ɵɵtext(19," "),m.ɵɵtemplate(20,Se,66,33,"div",8),m.ɵɵtext(21," "),m.ɵɵelementStart(22,"div",9),m.ɵɵtext(23," "),m.ɵɵtemplate(24,we,9,7,"button",10),m.ɵɵtext(25," "),m.ɵɵelementStart(26,"button",11),m.ɵɵtext(27),m.ɵɵpipe(28,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(29," "),m.ɵɵtemplate(30,Pe,6,2,"div",12),m.ɵɵtext(31," "),m.ɵɵelementEnd(),m.ɵɵtext(32," "),m.ɵɵelementEnd(),m.ɵɵtext(33," "),m.ɵɵelementEnd(),m.ɵɵtext(34," "),m.ɵɵelementEnd(),m.ɵɵtext(35," ")),2&e&&(m.ɵɵadvance(4),m.ɵɵproperty("appApiAction",t.formPromise),m.ɵɵadvance(6),m.ɵɵtextInterpolate(t.title),m.ɵɵadvance(2),m.ɵɵpropertyInterpolate("appA11yTitle",m.ɵɵpipeBind1(13,7,"close")),m.ɵɵadvance(8),m.ɵɵproperty("ngIf",t.cipher),m.ɵɵadvance(4),m.ɵɵproperty("ngIf",!t.viewOnly),m.ɵɵadvance(3),m.ɵɵtextInterpolate1(" ",m.ɵɵpipeBind1(28,9,t.viewOnly?"close":"cancel")," "),m.ɵɵadvance(3),m.ɵɵproperty("ngIf",t.cipher&&!t.viewOnly))},directives:[_.NgControlStatusGroup,_.NgForm,A.ApiActionDirective,O.A11yTitleDirective,M.NgIf,_.DefaultValueAccessor,_.RequiredValidator,_.NgControlStatus,_.NgModel,T.AddEditCustomFieldsComponent,_.CheckboxControlValueAccessor,D.CalloutComponent,_.SelectControlValueAccessor,R.AutofocusDirective,M.NgForOf,_.NgSelectOption,_.ɵangular_packages_forms_forms_z,B.InputVerbatimDirective,M.NgClass,U.StopClickDirective,M.NgStyle],pipes:[j.I18nPipe,M.DatePipe],encapsulation:2}),t}(d.AddEditComponent);t.AddEditComponent=ke,("undefined"==typeof ngDevMode||ngDevMode)&&m.ɵsetClassMetadata(ke,[{type:s.Component,args:[{selector:"app-org-vault-add-edit",templateUrl:"../../vault/add-edit.component.html"}]}],(function(){return[{type:f.CipherService},{type:h.FolderService},{type:v.I18nService},{type:y.PlatformUtilsService},{type:g.AuditService},{type:x.StateService},{type:b.UserService},{type:S.CollectionService},{type:w.TotpService},{type:C.PasswordGenerationService},{type:I.ApiService},{type:E.MessagingService},{type:P.EventService},{type:k.PolicyService}]}),null)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.Card=void 0;var o=n(582),a=n(80),s=n(87),l=function(e){function t(t,n){void 0===n&&(n=!1);var r=e.call(this)||this;return null==t||r.buildDomainModel(r,t,{cardholderName:null,brand:null,number:null,expMonth:null,expYear:null,code:null},n,[]),r}return i(t,e),t.prototype.decrypt=function(e,t){return this.decryptObj(new s.CardView(this),{cardholderName:null,brand:null,number:null,expMonth:null,expYear:null,code:null},e,t)},t.prototype.toCardData=function(){var e=new o.CardData;return this.buildDataModel(this,e,{cardholderName:null,brand:null,number:null,expMonth:null,expYear:null,code:null}),e},t}(a.default);t.Card=l},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.Field=void 0;var o=n(583),a=n(80),s=n(261),l=function(e){function t(t,n){void 0===n&&(n=!1);var r=e.call(this)||this;return null==t||(r.type=t.type,r.buildDomainModel(r,t,{name:null,value:null},n,[])),r}return i(t,e),t.prototype.decrypt=function(e,t){return this.decryptObj(new s.FieldView(this),{name:null,value:null},e,t)},t.prototype.toFieldData=function(){var e=new o.FieldData;return this.buildDataModel(this,e,{name:null,value:null,type:null},["type"]),e},t}(a.default);t.Field=l},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.Identity=void 0;var o=n(584),a=n(80),s=n(140),l=function(e){function t(t,n){void 0===n&&(n=!1);var r=e.call(this)||this;return null==t||r.buildDomainModel(r,t,{title:null,firstName:null,middleName:null,lastName:null,address1:null,address2:null,address3:null,city:null,state:null,postalCode:null,country:null,company:null,email:null,phone:null,ssn:null,username:null,passportNumber:null,licenseNumber:null},n,[]),r}return i(t,e),t.prototype.decrypt=function(e,t){return this.decryptObj(new s.IdentityView(this),{title:null,firstName:null,middleName:null,lastName:null,address1:null,address2:null,address3:null,city:null,state:null,postalCode:null,country:null,company:null,email:null,phone:null,ssn:null,username:null,passportNumber:null,licenseNumber:null},e,t)},t.prototype.toIdentityData=function(){var e=new o.IdentityData;return this.buildDataModel(this,e,{title:null,firstName:null,middleName:null,lastName:null,address1:null,address2:null,address3:null,city:null,state:null,postalCode:null,country:null,company:null,email:null,phone:null,ssn:null,username:null,passportNumber:null,licenseNumber:null}),e},t}(a.default);t.Identity=l},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&(e.uris=[],this.uris.forEach((function(t){e.uris.push(t.toLoginUriData())}))),e},t}(n(80).default);t.Login=p},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.LoginUri=void 0;var o=n(586),a=n(308),s=function(e){function t(t,n){void 0===n&&(n=!1);var r=e.call(this)||this;return null==t||(r.match=t.match,r.buildDomainModel(r,t,{uri:null},n,[])),r}return i(t,e),t.prototype.decrypt=function(e,t){return this.decryptObj(new a.LoginUriView(this),{uri:null},e,t)},t.prototype.toLoginUriData=function(){var e=new o.LoginUriData;return this.buildDataModel(this,e,{uri:null},["match"]),e},t}(n(80).default);t.LoginUri=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordHistoryView=void 0;var r=function(e){this.password=null,this.lastUsedDate=null,e&&(this.lastUsedDate=e.lastUsedDate)};t.PasswordHistoryView=r},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.SecureNote=void 0;var o=n(588),a=n(80),s=n(103),l=function(e){function t(t,n){void 0===n&&(n=!1);var r=e.call(this)||this;return null==t||(r.type=t.type),r}return i(t,e),t.prototype.decrypt=function(e,t){return Promise.resolve(new s.SecureNoteView(this))},t.prototype.toSecureNoteData=function(){var e=new o.SecureNoteData;return e.type=this.type,e},t}(a.default);t.SecureNote=l},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0))return[3,4];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.getFileContents(n[0])];case 2:return null!=(o=i.sent())&&(r=o),[3,4];case 3:return i.sent(),[3,4];case 4:if(null==r||""===r)return this.toasterService.popAsync("error",this.i18nService.t("errorOccurred"),this.i18nService.t("selectFile")),this.loading=!1,[2];i.label=5;case 5:return i.trys.push([5,7,,8]),this.formPromise=this.importService.import(e,r,this.organizationId),[4,this.formPromise];case 6:return null!=(a=i.sent())?(this.error(a),this.loading=!1,[2]):(this.toasterService.popAsync("success",null,this.i18nService.t("importSuccess")),this.router.navigate(this.successNavigate),[3,8]);case 7:return i.sent(),[3,8];case 8:return this.loading=!1,[2]}}))}))},e.prototype.getFormatInstructionTitle=function(){var e=this;if(null==this.format)return null;var t=this.featuredImportOptions.concat(this.importOptions).filter((function(t){return t.id===e.format}));return t.length>0?this.i18nService.t("instructionsFor",t[0].name):null},e.prototype.setImportOptions=function(){this.featuredImportOptions=o([{id:null,name:"-- "+this.i18nService.t("select")+" --"}],this.importService.featuredImportOptions),this.importOptions=this.importService.regularImportOptions},e.prototype.error=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,l.default.fire({heightAuto:!1,buttonsStyling:!1,icon:"error",iconHtml:'',input:"textarea",inputValue:e.message,inputAttributes:{readonly:"true"},titleText:this.i18nService.t("importError"),text:this.i18nService.t("importErrorDesc"),showConfirmButton:!0,confirmButtonText:this.i18nService.t("ok"),onOpen:function(e){e.querySelector(".swal2-textarea").scrollTo(0,0)}})];case 1:return t.sent(),[2]}}))}))},e.prototype.getFileContents=function(e){var t=this;return new Promise((function(n,r){var i=new FileReader;i.readAsText(e,"utf-8"),i.onload=function(i){if("lastpasscsv"===t.format&&"text/html"===e.type){var o=(new DOMParser).parseFromString(i.target.result,"text/html").querySelector("pre");return null!=o?void n(o.textContent):void r()}n(i.target.result)},i.onerror=function(){r()}}))},e.ɵfac=function(t){return new(t||e)(c.ɵɵdirectiveInject(p.I18nService),c.ɵɵdirectiveInject(u.ToasterService),c.ɵɵdirectiveInject(d.ImportService),c.ɵɵdirectiveInject(m.Router),c.ɵɵdirectiveInject(f.PlatformUtilsService),c.ɵɵdirectiveInject(h.PolicyService))},e.ɵcmp=c.ɵɵdefineComponent({type:e,selectors:[["app-import"]],decls:69,vars:31,consts:[[1,"page-header"],["type","info",4,"ngIf"],["ngNativeValidate","",3,"ngSubmit"],["form",""],[1,"row"],[1,"col-6"],[1,"form-group"],["for","type"],["id","type","name","Format","required","",1,"form-control",3,"ngModel","disabled","ngModelChange"],[3,"ngValue",4,"ngFor","ngForOf"],[4,"ngIf"],["type","info",3,"title",4,"ngIf"],["for","file"],["type","file","id","file","name","file",1,"form-control-file",3,"disabled"],["for","fileContents"],["id","fileContents","name","FileContents",1,"form-control",3,"ngModel","disabled","ngModelChange"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled","ngClass"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","info"],[3,"ngValue"],["value","-","disabled","disabled"],["type","info",3,"title"],["target","_blank","rel","noopener","href","https://help.bitwarden.com/article/export-your-data/"],["target","_blank","rel","noopener","href","https://help.bitwarden.com/article/import-from-lastpass/"],["target","_blank","rel","noopener","href","https://help.bitwarden.com/article/import-from-chrome/"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/article/import-from-firefox/"],["target","_blank","rel","noopener","href","https://help.bitwarden.com/article/import-from-1password/"],["target","_blank","rel","noopener","href","https://bit.ly/2GpOMTg"]],template:function(e,t){1&e&&(c.ɵɵelementStart(0,"div",0),c.ɵɵtext(1," "),c.ɵɵelementStart(2,"h1"),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(5," "),c.ɵɵelementEnd(),c.ɵɵtext(6," "),c.ɵɵtemplate(7,b,3,3,"app-callout",1),c.ɵɵtext(8," "),c.ɵɵelementStart(9,"form",2,3),c.ɵɵlistener("ngSubmit",(function(){return t.submit()})),c.ɵɵtext(11," "),c.ɵɵelementStart(12,"div",4),c.ɵɵtext(13," "),c.ɵɵelementStart(14,"div",5),c.ɵɵtext(15," "),c.ɵɵelementStart(16,"div",6),c.ɵɵtext(17," "),c.ɵɵelementStart(18,"label",7),c.ɵɵtext(19),c.ɵɵpipe(20,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(21," "),c.ɵɵelementStart(22,"select",8),c.ɵɵlistener("ngModelChange",(function(e){return t.format=e})),c.ɵɵtext(23," "),c.ɵɵtemplate(24,S,2,2,"option",9),c.ɵɵtext(25," "),c.ɵɵtemplate(26,C,6,1,"ng-container",10),c.ɵɵtext(27," "),c.ɵɵelementEnd(),c.ɵɵtext(28," "),c.ɵɵelementEnd(),c.ɵɵtext(29," "),c.ɵɵelementEnd(),c.ɵɵtext(30," "),c.ɵɵelementEnd(),c.ɵɵtext(31," "),c.ɵɵtemplate(32,be,100,50,"app-callout",11),c.ɵɵtext(33," "),c.ɵɵelementStart(34,"div",4),c.ɵɵtext(35," "),c.ɵɵelementStart(36,"div",5),c.ɵɵtext(37," "),c.ɵɵelementStart(38,"div",6),c.ɵɵtext(39," "),c.ɵɵelementStart(40,"label",12),c.ɵɵtext(41),c.ɵɵpipe(42,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(43," "),c.ɵɵelement(44,"input",13),c.ɵɵtext(45," "),c.ɵɵelementEnd(),c.ɵɵtext(46," "),c.ɵɵelementEnd(),c.ɵɵtext(47," "),c.ɵɵelementEnd(),c.ɵɵtext(48," "),c.ɵɵelementStart(49,"div",6),c.ɵɵtext(50," "),c.ɵɵelementStart(51,"label",14),c.ɵɵtext(52),c.ɵɵpipe(53,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(54," "),c.ɵɵelementStart(55,"textarea",15),c.ɵɵlistener("ngModelChange",(function(e){return t.fileContents=e})),c.ɵɵelementEnd(),c.ɵɵtext(56," "),c.ɵɵelementEnd(),c.ɵɵtext(57," "),c.ɵɵelementStart(58,"button",16),c.ɵɵtext(59," "),c.ɵɵelement(60,"i",17),c.ɵɵpipe(61,"i18n"),c.ɵɵtext(62," "),c.ɵɵelementStart(63,"span"),c.ɵɵtext(64),c.ɵɵpipe(65,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(66," "),c.ɵɵelementEnd(),c.ɵɵtext(67," "),c.ɵɵelementEnd(),c.ɵɵtext(68," ")),2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(4,17,"importData")),c.ɵɵadvance(4),c.ɵɵproperty("ngIf",t.importBlockedByPolicy),c.ɵɵadvance(12),c.ɵɵtextInterpolate1("1. ",c.ɵɵpipeBind1(20,19,"selectFormat"),""),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",t.format)("disabled",t.importBlockedByPolicy),c.ɵɵadvance(2),c.ɵɵproperty("ngForOf",t.featuredImportOptions),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",t.importOptions&&t.importOptions.length),c.ɵɵadvance(6),c.ɵɵproperty("ngIf",t.format),c.ɵɵadvance(9),c.ɵɵtextInterpolate1("2. ",c.ɵɵpipeBind1(42,21,"selectImportFile"),""),c.ɵɵadvance(3),c.ɵɵproperty("disabled",t.importBlockedByPolicy),c.ɵɵadvance(8),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(53,23,"orCopyPasteFileContents")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",t.fileContents)("disabled",t.importBlockedByPolicy),c.ɵɵadvance(3),c.ɵɵproperty("disabled",t.loading||t.importBlockedByPolicy)("ngClass",c.ɵɵpureFunction1(29,Se,t.importBlockedByPolicy)),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(61,25,"loading")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(65,27,"importData")))},directives:[v.NgIf,y.NgControlStatusGroup,y.NgForm,y.SelectControlValueAccessor,y.RequiredValidator,y.NgControlStatus,y.NgModel,v.NgForOf,y.DefaultValueAccessor,v.NgClass,g.CalloutComponent,y.NgSelectOption,y.ɵangular_packages_forms_forms_z],pipes:[x.I18nPipe],encapsulation:2}),e}();t.ImportComponent=we,("undefined"==typeof ngDevMode||ngDevMode)&&c.ɵsetClassMetadata(we,[{type:a.Component,args:[{selector:"app-import",templateUrl:"import.component.html"}]}],(function(){return[{type:p.I18nService},{type:u.ToasterService},{type:d.ImportService},{type:m.Router},{type:f.PlatformUtilsService},{type:h.PolicyService}]}),null)},,function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0?[4,this.getAllCiphers()]:[3,6];case 4:return e=o.sent(),t=[],n=[],r=new Map,e.forEach((function(e){if(e.type===l.CipherType.Login&&(null==e.login.totp||""===e.login.totp)&&e.login.hasUris&&!e.isDeleted)for(var n=0;n0?[2]:[4,fetch(new Request("https://2fa.directory/api/v2/totp.json"))];case 1:if(200!==(e=a.sent()).status)throw new Error;return[4,e.json()];case 2:for(n in t=a.sent())if(t.hasOwnProperty(n))for(i in r=t[n])r.hasOwnProperty(i)&&null!=(o=r[i]).url&&null!=(s=c.Utils.getHostname(o.url))&&this.services.set(s,o.doc);return[2]}}))}))},t.ɵfac=function(e){return new(e||t)(u.ɵɵdirectiveInject(d.CipherService),u.ɵɵdirectiveInject(m.ModalService),u.ɵɵdirectiveInject(f.MessagingService),u.ɵɵdirectiveInject(h.UserService),u.ɵɵdirectiveInject(v.PasswordRepromptService))},t.ɵcmp=u.ɵɵdefineComponent({type:t,selectors:[["app-inactive-two-factor-report"]],features:[u.ɵɵInheritDefinitionFeature],decls:20,vars:9,consts:[[1,"page-header"],[4,"ngIf"],["class","mt-4",4,"ngIf"],["cipherAddEdit",""],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],[1,"mt-4"],["type","success",3,"title",4,"ngIf"],["type","success",3,"title"],["type","danger",3,"title"],[1,"table","table-hover","table-list","table-ciphers"],[4,"ngFor","ngForOf"],[1,"table-list-icon"],[3,"cipher"],[1,"reduced-lh","wrap"],["href","#","appStopClick","",3,"title","click"],[1,"text-right"],["class","badge badge-primary","target","_blank","rel","noopener",3,"href",4,"ngIf"],["appStopProp","","aria-hidden","true",1,"fa","fa-cube",3,"title"],["appStopProp","","aria-hidden","true",1,"fa","fa-paperclip",3,"title"],["target","_blank","rel","noopener",1,"badge","badge-primary",3,"href"]],template:function(e,t){1&e&&(u.ɵɵelementStart(0,"div",0),u.ɵɵtext(1," "),u.ɵɵelementStart(2,"h1"),u.ɵɵtext(3),u.ɵɵpipe(4,"i18n"),u.ɵɵtemplate(5,C,9,6,"small",1),u.ɵɵtext(6," "),u.ɵɵelementEnd(),u.ɵɵtext(7," "),u.ɵɵelementEnd(),u.ɵɵtext(8," "),u.ɵɵelementStart(9,"p"),u.ɵɵtext(10),u.ɵɵpipe(11,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(12," "),u.ɵɵtemplate(13,I,9,6,"div",1),u.ɵɵtext(14," "),u.ɵɵtemplate(15,M,6,2,"div",2),u.ɵɵtext(16," "),u.ɵɵtemplate(17,T,0,0,"ng-template",null,3,u.ɵɵtemplateRefExtractor),u.ɵɵtext(19," ")),2&e&&(u.ɵɵadvance(3),u.ɵɵtextInterpolate1(" ",u.ɵɵpipeBind1(4,5,"inactive2faReport")," "),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",t.hasLoaded&&t.loading),u.ɵɵadvance(5),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(11,7,"inactive2faReportDesc")),u.ɵɵadvance(3),u.ɵɵproperty("ngIf",!t.hasLoaded&&t.loading),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",t.hasLoaded))},directives:[y.NgIf,g.CalloutComponent,y.NgForOf,x.IconComponent,b.StopClickDirective,S.StopPropDirective],pipes:[w.I18nPipe,y.DecimalPipe],encapsulation:2}),t}(p.CipherReportComponent);t.InactiveTwoFactorReportComponent=D,("undefined"==typeof ngDevMode||ngDevMode)&&u.ɵsetClassMetadata(D,[{type:s.Component,args:[{selector:"app-inactive-two-factor-report",templateUrl:"inactive-two-factor-report.component.html"}]}],(function(){return[{type:d.CipherService},{type:m.ModalService},{type:f.MessagingService},{type:h.UserService},{type:v.PasswordRepromptService}]}),null)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]1})),this.ciphers=n,[2]}}))}))},t.prototype.getAllCiphers=function(){return this.cipherService.getAllDecrypted()},t.prototype.canManageCipher=function(e){return!0},t.ɵfac=function(e){return new(e||t)(p.ɵɵdirectiveInject(u.CipherService),p.ɵɵdirectiveInject(d.ModalService),p.ɵɵdirectiveInject(m.MessagingService),p.ɵɵdirectiveInject(f.UserService),p.ɵɵdirectiveInject(h.PasswordRepromptService))},t.ɵcmp=p.ɵɵdefineComponent({type:t,selectors:[["app-reused-passwords-report"]],features:[p.ɵɵInheritDefinitionFeature],decls:20,vars:9,consts:[[1,"page-header"],[4,"ngIf"],["class","mt-4",4,"ngIf"],["cipherAddEdit",""],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],[1,"mt-4"],["type","success",3,"title",4,"ngIf"],["type","success",3,"title"],["type","danger",3,"title"],[1,"table","table-hover","table-list","table-ciphers"],[4,"ngFor","ngForOf"],[1,"table-list-icon"],[3,"cipher"],[1,"reduced-lh","wrap"],[4,"ngIf","ngIfElse"],["cantManage",""],[1,"text-right"],[1,"badge","badge-warning"],["href","#","appStopClick","",3,"title","click"],["appStopProp","","aria-hidden","true",1,"fa","fa-cube",3,"title"],["appStopProp","","aria-hidden","true",1,"fa","fa-paperclip",3,"title"]],template:function(e,t){1&e&&(p.ɵɵelementStart(0,"div",0),p.ɵɵtext(1," "),p.ɵɵelementStart(2,"h1"),p.ɵɵtext(3),p.ɵɵpipe(4,"i18n"),p.ɵɵtemplate(5,w,9,6,"small",1),p.ɵɵtext(6," "),p.ɵɵelementEnd(),p.ɵɵtext(7," "),p.ɵɵelementEnd(),p.ɵɵtext(8," "),p.ɵɵelementStart(9,"p"),p.ɵɵtext(10),p.ɵɵpipe(11,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(12," "),p.ɵɵtemplate(13,C,9,6,"div",1),p.ɵɵtext(14," "),p.ɵɵtemplate(15,M,6,2,"div",2),p.ɵɵtext(16," "),p.ɵɵtemplate(17,T,0,0,"ng-template",null,3,p.ɵɵtemplateRefExtractor),p.ɵɵtext(19," ")),2&e&&(p.ɵɵadvance(3),p.ɵɵtextInterpolate1(" ",p.ɵɵpipeBind1(4,5,"reusedPasswordsReport")," "),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",t.hasLoaded&&t.loading),p.ɵɵadvance(5),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(11,7,"reusedPasswordsReportDesc")),p.ɵɵadvance(3),p.ɵɵproperty("ngIf",!t.hasLoaded&&t.loading),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",t.hasLoaded))},directives:[v.NgIf,y.CalloutComponent,v.NgForOf,g.IconComponent,x.StopClickDirective,b.StopPropDirective],pipes:[S.I18nPipe,v.DecimalPipe],encapsulation:2}),t}(c.CipherReportComponent);t.ReusedPasswordsReportComponent=D,("undefined"==typeof ngDevMode||ngDevMode)&&p.ɵsetClassMetadata(D,[{type:s.Component,args:[{selector:"app-reused-passwords-report",templateUrl:"reused-passwords-report.component.html"}]}],(function(){return[{type:u.CipherService},{type:d.ModalService},{type:m.MessagingService},{type:f.UserService},{type:h.PasswordRepromptService}]}),null)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]-1?s.concat(e.login.username.substr(0,c).trim().toLowerCase().split(/[^A-Za-z0-9]/)).filter((function(e){return e.length>=3})):e.login.username.trim().toLowerCase().split(/[^A-Za-z0-9]/).filter((function(e){return e.length>=3}))}var p=i.passwordGenerationService.passwordStrength(e.login.password,s.length>0?s:null);i.passwordStrengthCache.set(a,p.score)}var u=i.passwordStrengthCache.get(a);null!=u&&u<=2&&(i.passwordStrengthMap.set(e.id,i.scoreKey(u)),t.push(e))}})),t.sort((function(e,t){return i.passwordStrengthCache.get(r(e))-i.passwordStrengthCache.get(r(t))})),this.ciphers=t,[2]}}))}))},t.prototype.getAllCiphers=function(){return this.cipherService.getAllDecrypted()},t.prototype.canManageCipher=function(e){return!0},t.prototype.scoreKey=function(e){switch(e){case 4:return["strong","success"];case 3:return["good","primary"];case 2:return["weak","warning"];default:return["veryWeak","danger"]}},t.ɵfac=function(e){return new(e||t)(p.ɵɵdirectiveInject(u.CipherService),p.ɵɵdirectiveInject(d.PasswordGenerationService),p.ɵɵdirectiveInject(m.ModalService),p.ɵɵdirectiveInject(f.MessagingService),p.ɵɵdirectiveInject(h.UserService),p.ɵɵdirectiveInject(v.PasswordRepromptService))},t.ɵcmp=p.ɵɵdefineComponent({type:t,selectors:[["app-weak-passwords-report"]],features:[p.ɵɵInheritDefinitionFeature],decls:20,vars:9,consts:[[1,"page-header"],[4,"ngIf"],["class","mt-4",4,"ngIf"],["cipherAddEdit",""],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],[1,"mt-4"],["type","success",3,"title",4,"ngIf"],["type","success",3,"title"],["type","danger",3,"title"],[1,"table","table-hover","table-list","table-ciphers"],[4,"ngFor","ngForOf"],[1,"table-list-icon"],[3,"cipher"],[1,"reduced-lh","wrap"],[4,"ngIf","ngIfElse"],["cantManage",""],[1,"text-right"],["href","#","appStopClick","",3,"title","click"],["appStopProp","","aria-hidden","true",1,"fa","fa-cube",3,"title"],["appStopProp","","aria-hidden","true",1,"fa","fa-paperclip",3,"title"]],template:function(e,t){1&e&&(p.ɵɵelementStart(0,"div",0),p.ɵɵtext(1," "),p.ɵɵelementStart(2,"h1"),p.ɵɵtext(3),p.ɵɵpipe(4,"i18n"),p.ɵɵtemplate(5,C,9,6,"small",1),p.ɵɵtext(6," "),p.ɵɵelementEnd(),p.ɵɵtext(7," "),p.ɵɵelementEnd(),p.ɵɵtext(8," "),p.ɵɵelementStart(9,"p"),p.ɵɵtext(10),p.ɵɵpipe(11,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(12," "),p.ɵɵtemplate(13,I,9,6,"div",1),p.ɵɵtext(14," "),p.ɵɵtemplate(15,T,6,2,"div",2),p.ɵɵtext(16," "),p.ɵɵtemplate(17,D,0,0,"ng-template",null,3,p.ɵɵtemplateRefExtractor),p.ɵɵtext(19," ")),2&e&&(p.ɵɵadvance(3),p.ɵɵtextInterpolate1(" ",p.ɵɵpipeBind1(4,5,"weakPasswordsReport")," "),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",t.hasLoaded&&t.loading),p.ɵɵadvance(5),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(11,7,"weakPasswordsReportDesc")),p.ɵɵadvance(3),p.ɵɵproperty("ngIf",!t.hasLoaded&&t.loading),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",t.hasLoaded))},directives:[y.NgIf,g.CalloutComponent,y.NgForOf,x.IconComponent,b.StopClickDirective,S.StopPropDirective],pipes:[w.I18nPipe,y.DecimalPipe],encapsulation:2}),t}(c.CipherReportComponent);t.WeakPasswordsReportComponent=R,("undefined"==typeof ngDevMode||ngDevMode)&&p.ɵsetClassMetadata(R,[{type:s.Component,args:[{selector:"app-weak-passwords-report",templateUrl:"weak-passwords-report.component.html"}]}],(function(){return[{type:u.CipherService},{type:d.PasswordGenerationService},{type:m.ModalService},{type:f.MessagingService},{type:h.UserService},{type:v.PasswordRepromptService}]}),null)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]-1)""===r.substr(o).trim()&&(i=o);e+=r.substring(0,i)}this.platformUtilsService.copyToClipboard(e,{window:window})}},e.ɵfac=function(t){return new(t||e)(i.ɵɵdirectiveInject(i.ElementRef),i.ɵɵdirectiveInject(o.PlatformUtilsService))},e.ɵdir=i.ɵɵdefineDirective({type:e,selectors:[["","appSelectCopy",""]],hostBindings:function(e,t){1&e&&i.ɵɵlistener("copy",(function(){return t.onCopy()}))}}),e}();t.SelectCopyDirective=a,("undefined"==typeof ngDevMode||ngDevMode)&&i.ɵsetClassMetadata(a,[{type:r.Directive,args:[{selector:"[appSelectCopy]"}]}],(function(){return[{type:i.ElementRef},{type:o.PlatformUtilsService}]}),{onCopy:[{type:r.HostListener,args:["copy"]}]})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorPasswordPipe=void 0;var r=n(0),i=n(28),o=n(0),a=function(){function e(){}return e.prototype.transform=function(e){for(var t=Array.from(e),n="",r=0;r":o=">",a=!0;break;case" ":o=" ",a=!0}var s="letter";o.match(i.Utils.regexpEmojiPresentation)?s="emoji":a||o.match(/[^\w ]/)?s="special":o.match(/\d/)&&(s="number"),n+=''+o+""}return n},e.ɵfac=function(t){return new(t||e)},e.ɵpipe=o.ɵɵdefinePipe({name:"colorPassword",type:e,pure:!0}),e}();t.ColorPasswordPipe=a,("undefined"==typeof ngDevMode||ngDevMode)&&o.ɵsetClassMetadata(a,[{type:r.Pipe,args:[{name:"colorPassword"}]}],null,null)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotificationsService=void 0;var r=function(){};t.NotificationsService=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsService=void 0;var r=function(){};t.SettingsService=r},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0?e.data:[],t=this,[4,this.userService.getProvider(this.providerId)];case 2:return t.manageOrganizations=i.sent().type===s.ProviderUserType.ProviderAdmin,[4,this.userService.getAllOrganizations()];case 3:return n=i.sent().filter((function(e){return e.isOwner&&null==e.providerId})),[4,Promise.all(n.map((function(e){return o.apiService.getOrganization(e.id)}))).then((function(e){return e.filter((function(e){return!F.includes(e.planType)})).map((function(e){return e.id}))}))];case 4:return r=i.sent(),this.addableOrganizations=n.filter((function(e){return r.includes(e.id)})),this.showAddExisting=0!==this.addableOrganizations.length,this.loading=!1,[2]}}))}))},e.prototype.isPaging=function(){var e=this.isSearching();return e&&this.didScroll&&this.resetPaging(),!e&&this.clients&&this.clients.length>this.pageSize},e.prototype.isSearching=function(){return this.searchService.isSearchable(this.searchText)},e.prototype.resetPaging=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){return this.pagedClients=[],this.loadMore(),[2]}))}))},e.prototype.loadMore=function(){if(this.clients&&!(this.clients.length<=this.pageSize)){var e=this.pagedClients.length,t=this.pageSize;0===e&&this.pagedClientsCount>this.pageSize&&(t=this.pagedClientsCount),this.clients.length>e&&(this.pagedClients=this.pagedClients.concat(this.clients.slice(e,e+t))),this.pagedClientsCount=this.pagedClients.length,this.didScroll=this.pagedClients.length>this.pageSize}},e.prototype.addExistingOrganization=function(){return r(this,void 0,void 0,(function(){var e,t=this;return i(this,(function(n){switch(n.label){case 0:return[4,this.modalService.openViewRef(l.AddOrganizationComponent,this.addModalRef,(function(n){n.providerId=t.providerId,n.organizations=t.addableOrganizations,n.onAddedOrganization.subscribe((function(){return r(t,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.load()];case 1:return n.sent(),e.close(),[3,3];case 2:return t=n.sent(),this.logService.error("Handled exception: "+t),[3,3];case 3:return[2]}}))}))}))}))];case 1:return e=n.sent()[0],[2]}}))}))},e.prototype.remove=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.platformUtilsService.showDialog(this.i18nService.t("detachOrganizationConfirmation"),e.organizationName,this.i18nService.t("yes"),this.i18nService.t("no"),"warning")];case 1:if(!n.sent())return[2,!1];this.actionPromise=this.providerService.detachOrganizastion(this.providerId,e.id),n.label=2;case 2:return n.trys.push([2,5,,6]),[4,this.actionPromise];case 3:return n.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("detachedOrganization",e.organizationName)),[4,this.load()];case 4:return n.sent(),[3,6];case 5:return t=n.sent(),this.validationService.showError(t),[3,6];case 6:return this.actionPromise=null,[2]}}))}))},e.ɵfac=function(t){return new(t||e)(c.ɵɵdirectiveInject(p.ActivatedRoute),c.ɵɵdirectiveInject(u.UserService),c.ɵɵdirectiveInject(d.ApiService),c.ɵɵdirectiveInject(m.SearchService),c.ɵɵdirectiveInject(f.PlatformUtilsService),c.ɵɵdirectiveInject(h.I18nService),c.ɵɵdirectiveInject(v.ToasterService),c.ɵɵdirectiveInject(y.ValidationService),c.ɵɵdirectiveInject(g.ProviderService),c.ɵɵdirectiveInject(x.LogService),c.ɵɵdirectiveInject(b.ModalService))},e.ɵcmp=c.ɵɵdefineComponent({type:e,selectors:[["ng-component"]],viewQuery:function(e,t){if(1&e&&c.ɵɵviewQuery(_,3,o.ViewContainerRef),2&e){var n;c.ɵɵqueryRefresh(n=c.ɵɵloadQuery())&&(t.addModalRef=n.first)}},decls:32,vars:19,consts:[[1,"page-header","d-flex"],[1,"ml-auto","d-flex"],["for","search",1,"sr-only"],["type","search","id","search",1,"form-control","form-control-sm",3,"placeholder","ngModel","ngModelChange"],["class","btn btn-sm btn-outline-primary ml-3","routerLink","create",4,"ngIf"],["class","btn btn-sm btn-outline-primary ml-3",3,"click",4,"ngIf"],[4,"ngIf"],["add",""],["routerLink","create",1,"btn","btn-sm","btn-outline-primary","ml-3"],["aria-hidden","true",1,"fa","fa-plus","fa-fw"],[1,"btn","btn-sm","btn-outline-primary","ml-3",3,"click"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],["infiniteScroll","",1,"table","table-hover","table-list",3,"infiniteScrollDistance","infiniteScrollDisabled","scrolled"],[4,"ngFor","ngForOf"],["width","30"],["size","25",3,"data","circle","fontSize"],[3,"routerLink"],["class","table-list-options",4,"ngIf"],[1,"table-list-options"],["appListDropdown","",1,"dropdown"],["type","button","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",1,"btn","btn-outline-secondary","dropdown-toggle",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-cog","fa-lg"],[1,"dropdown-menu","dropdown-menu-right"],["href","#","appStopClick","",1,"dropdown-item","text-danger",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-remove"]],template:function(e,t){1&e&&(c.ɵɵelementStart(0,"div",0),c.ɵɵtext(1," "),c.ɵɵelementStart(2,"h1"),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(5," "),c.ɵɵelementStart(6,"div",1),c.ɵɵtext(7," "),c.ɵɵelementStart(8,"div"),c.ɵɵtext(9," "),c.ɵɵelementStart(10,"label",2),c.ɵɵtext(11),c.ɵɵpipe(12,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(13," "),c.ɵɵelementStart(14,"input",3),c.ɵɵlistener("ngModelChange",(function(e){return t.searchText=e})),c.ɵɵpipe(15,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(16," "),c.ɵɵelementEnd(),c.ɵɵtext(17," "),c.ɵɵtemplate(18,A,5,3,"a",4),c.ɵɵtext(19," "),c.ɵɵtemplate(20,O,5,3,"button",5),c.ɵɵtext(21," "),c.ɵɵelementEnd(),c.ɵɵtext(22," "),c.ɵɵelementEnd(),c.ɵɵtext(23," "),c.ɵɵtemplate(24,M,9,6,"ng-container",6),c.ɵɵtext(25," "),c.ɵɵtemplate(26,j,6,2,"ng-container",6),c.ɵɵpipe(27,"search"),c.ɵɵtext(28," "),c.ɵɵtemplate(29,V,0,0,"ng-template",null,7,c.ɵɵtemplateRefExtractor),c.ɵɵtext(31," ")),2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(4,8,"clients")),c.ɵɵadvance(8),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(12,10,"search")),c.ɵɵadvance(3),c.ɵɵpropertyInterpolate("placeholder",c.ɵɵpipeBind1(15,12,"search")),c.ɵɵproperty("ngModel",t.searchText),c.ɵɵadvance(4),c.ɵɵproperty("ngIf",t.manageOrganizations),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",t.manageOrganizations&&t.showAddExisting),c.ɵɵadvance(4),c.ɵɵproperty("ngIf",t.loading),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!t.loading&&c.ɵɵpipeBind4(27,14,t.clients,t.searchText,"organizationName","id")))},directives:[S.DefaultValueAccessor,S.NgControlStatus,S.NgModel,w.NgIf,p.RouterLinkWithHref,w.NgForOf,C.AvatarComponent,I.A11yTitleDirective,E.StopClickDirective],pipes:[P.I18nPipe,k.SearchPipe],encapsulation:2}),e}();t.ClientsComponent=N,("undefined"==typeof ngDevMode||ngDevMode)&&c.ɵsetClassMetadata(N,[{type:o.Component,args:[{templateUrl:"clients.component.html"}]}],(function(){return[{type:p.ActivatedRoute},{type:u.UserService},{type:d.ApiService},{type:m.SearchService},{type:f.PlatformUtilsService},{type:h.I18nService},{type:v.ToasterService},{type:y.ValidationService},{type:g.ProviderService},{type:x.LogService},{type:b.ModalService}]}),{addModalRef:[{type:o.ViewChild,args:["add",{read:o.ViewContainerRef,static:!0}]}]})},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0?this.events=this.events.concat(n):this.events=n,this.dirtyDates=!1,this.loading=!1,this.morePromise=null,this.refreshPromise=null,[2]}}))}))},e.prototype.loadAndParseEvents=function(e,t,n){return r(this,void 0,void 0,(function(){var o,s,l=this;return i(this,(function(c){switch(c.label){case 0:return[4,this.requestEvents(e,t,n)];case 1:return o=c.sent(),[4,Promise.all(o.data.map((function(e){return r(l,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:return t=null==e.actingUserId?e.userId:e.actingUserId,[4,this.eventService.getEventInfo(e)];case 1:return n=i.sent(),r=this.getUserName(e,t),[2,new a.EventView({message:n.message,humanReadableMessage:n.humanReadableMessage,appIcon:n.appIcon,appName:n.appName,userId:t,userName:null!=r?r.name:this.i18nService.t("unknown"),userEmail:null!=r?r.email:"",date:e.date,ip:e.ipAddress,type:e.type})]}}))}))})))];case 2:return s=c.sent(),[2,{continuationToken:o.continuationToken,events:s}]}}))}))},e.prototype.parseDates=function(){var e=null;try{e=this.eventService.formatDateFilters(this.start,this.end)}catch(t){return this.toasterService.popAsync("error",this.i18nService.t("errorOccurred"),this.i18nService.t("invalidDateRange")),null}return e},e.prototype.appApiPromiseUnfulfilled=function(){return null!=this.refreshPromise||null!=this.morePromise||null!=this.exportPromise},e.prototype.export=function(e,t){return r(this,void 0,void 0,(function(){var n,r,o,a,s;return i(this,(function(i){switch(i.label){case 0:n=this.continuationToken,r=[].concat(this.events),i.label=1;case 1:return null==n?[3,3]:[4,this.loadAndParseEvents(e,t,n)];case 2:return o=i.sent(),n=o.continuationToken,r=r.concat(o.events),[3,1];case 3:return[4,this.exportService.getEventExport(r)];case 4:return a=i.sent(),s=this.exportService.getFileName(this.exportFileName,"csv"),this.platformUtilsService.saveFile(window,a,{type:"text/plain"},s),[2]}}))}))},e.ɵfac=function(t){return new(t||e)(s.ɵɵdirectiveInject(l.EventService),s.ɵɵdirectiveInject(c.I18nService),s.ɵɵdirectiveInject(p.ToasterService),s.ɵɵdirectiveInject(u.ExportService),s.ɵɵdirectiveInject(d.PlatformUtilsService),s.ɵɵdirectiveInject(m.LogService))},e.ɵdir=s.ɵɵdefineDirective({type:e}),e}();t.BaseEventsComponent=f,("undefined"==typeof ngDevMode||ngDevMode)&&s.ɵsetClassMetadata(f,[{type:o.Directive}],(function(){return[{type:l.EventService},{type:c.I18nService},{type:p.ToasterService},{type:u.ExportService},{type:d.PlatformUtilsService},{type:m.LogService}]}),null)},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&t[0].status===c.ProviderUserStatusType.Confirmed&&this.events(t[0]),null!=n&&n.unsubscribe(),[2]}))}))})),[2]}}))}))}))},t.prototype.getUsers=function(){return this.apiService.getProviderUsers(this.providerId)},t.prototype.deleteUser=function(e){return this.apiService.deleteProviderUser(this.providerId,e)},t.prototype.reinviteUser=function(e){return this.apiService.postProviderUserReinvite(this.providerId,e)},t.prototype.confirmUser=function(e,t){return a(this,void 0,void 0,(function(){var n,r,i;return s(this,(function(o){switch(o.label){case 0:return[4,this.cryptoService.getProviderKey(this.providerId)];case 1:return n=o.sent(),[4,this.cryptoService.rsaEncrypt(n.key,t.buffer)];case 2:return r=o.sent(),(i=new d.ProviderUserConfirmRequest).key=r.encryptedString,[4,this.apiService.postProviderUserConfirm(this.providerId,e.id,i)];case 3:return o.sent(),[2]}}))}))},t.prototype.edit=function(e){return a(this,void 0,void 0,(function(){var t,n=this;return s(this,(function(r){switch(r.label){case 0:return[4,this.modalService.openViewRef(g.UserAddEditComponent,this.addEditModalRef,(function(r){r.name=n.userNamePipe.transform(e),r.providerId=n.providerId,r.providerUserId=null!=e?e.id:null,r.onSavedUser.subscribe((function(){t.close(),n.load()})),r.onDeletedUser.subscribe((function(){t.close(),n.removeUser(e)}))}))];case 1:return t=r.sent()[0],[2]}}))}))},t.prototype.events=function(e){return a(this,void 0,void 0,(function(){var t=this;return s(this,(function(n){switch(n.label){case 0:return[4,this.modalService.openViewRef(h.EntityEventsComponent,this.eventsModalRef,(function(n){n.name=t.userNamePipe.transform(e),n.providerId=t.providerId,n.entityId=e.id,n.showUser=!1,n.entity="user"}))];case 1:return n.sent()[0],[2]}}))}))},t.prototype.bulkRemove=function(){return a(this,void 0,void 0,(function(){var e=this;return s(this,(function(t){switch(t.label){case 0:return null!=this.actionPromise?[2]:[4,this.modalService.openViewRef(y.BulkRemoveComponent,this.bulkRemoveModalRef,(function(t){t.providerId=e.providerId,t.users=e.getCheckedUsers()}))];case 1:return[4,t.sent()[0].onClosedPromise()];case 2:return t.sent(),[4,this.load()];case 3:return t.sent(),[2]}}))}))},t.prototype.bulkReinvite=function(){return a(this,void 0,void 0,(function(){var e,t,n,r;return s(this,(function(i){if(null!=this.actionPromise)return[2];if(e=this.getCheckedUsers(),(t=e.filter((function(e){return e.status===c.ProviderUserStatusType.Invited}))).length<=0)return this.toasterService.popAsync("error",this.i18nService.t("errorOccurred"),this.i18nService.t("noSelectedUsersApplicable")),[2];try{n=new u.ProviderUserBulkRequest(t.map((function(e){return e.id}))),r=this.apiService.postManyProviderUserReinvite(this.providerId,n),this.showBulkStatus(e,t,r,this.i18nService.t("bulkReinviteMessage"))}catch(o){this.validationService.showError(o)}return this.actionPromise=null,[2]}))}))},t.prototype.bulkConfirm=function(){return a(this,void 0,void 0,(function(){var e=this;return s(this,(function(t){switch(t.label){case 0:return null!=this.actionPromise?[2]:[4,this.modalService.openViewRef(v.BulkConfirmComponent,this.bulkConfirmModalRef,(function(t){t.providerId=e.providerId,t.users=e.getCheckedUsers()}))];case 1:return[4,t.sent()[0].onClosedPromise()];case 2:return t.sent(),[4,this.load()];case 3:return t.sent(),[2]}}))}))},t.prototype.showBulkStatus=function(e,t,n,r){return a(this,void 0,void 0,(function(){var i,a,l,c,p,u,d,m=this;return s(this,(function(s){switch(s.label){case 0:return[4,this.modalService.openViewRef(f.BulkStatusComponent,this.bulkStatusModalRef,(function(e){e.loading=!0}))];case 1:i=s.sent(),a=i[0],l=i[1],c=!1,a.onShown.subscribe((function(){c&&a.close()})),s.label=2;case 2:return s.trys.push([2,4,,5]),[4,n];case 3:return p=s.sent(),a&&(u=p.data.filter((function(e){return""!==e.error})).reduce((function(e,t){var n;return o(o({},e),((n={})[t.id]=t.error,n))}),{}),d=t.reduce((function(e,t){var n;return o(o({},e),((n={})[t.id]=t,n))}),{}),l.users=e.map((function(e){var t,n=null!==(t=u[e.id])&&void 0!==t?t:r;return d.hasOwnProperty(e.id)||(n=m.i18nService.t("bulkFilteredMessage")),{user:e,error:u.hasOwnProperty(e.id),message:n}})),l.loading=!1),[3,5];case 4:return s.sent(),c=!0,a.close(),[3,5];case 5:return[2]}}))}))},t.ɵfac=function(e){return new(e||t)(x.ɵɵdirectiveInject(b.ApiService),x.ɵɵdirectiveInject(S.ActivatedRoute),x.ɵɵdirectiveInject(w.I18nService),x.ɵɵdirectiveInject(C.ModalService),x.ɵɵdirectiveInject(I.PlatformUtilsService),x.ɵɵdirectiveInject(E.ToasterService),x.ɵɵdirectiveInject(P.CryptoService),x.ɵɵdirectiveInject(k.UserService),x.ɵɵdirectiveInject(S.Router),x.ɵɵdirectiveInject(_.StorageService),x.ɵɵdirectiveInject(A.SearchService),x.ɵɵdirectiveInject(O.ValidationService),x.ɵɵdirectiveInject(M.LogService),x.ɵɵdirectiveInject(T.SearchPipe),x.ɵɵdirectiveInject(D.UserNamePipe))},t.ɵcmp=x.ɵɵdefineComponent({type:t,selectors:[["provider-people"]],viewQuery:function(e,t){if(1&e&&(x.ɵɵviewQuery(L,3,l.ViewContainerRef),x.ɵɵviewQuery(K,3,l.ViewContainerRef),x.ɵɵviewQuery(G,3,l.ViewContainerRef),x.ɵɵviewQuery(q,3,l.ViewContainerRef),x.ɵɵviewQuery(W,3,l.ViewContainerRef),x.ɵɵviewQuery(H,3,l.ViewContainerRef)),2&e){var n=void 0;x.ɵɵqueryRefresh(n=x.ɵɵloadQuery())&&(t.addEditModalRef=n.first),x.ɵɵqueryRefresh(n=x.ɵɵloadQuery())&&(t.groupsModalRef=n.first),x.ɵɵqueryRefresh(n=x.ɵɵloadQuery())&&(t.eventsModalRef=n.first),x.ɵɵqueryRefresh(n=x.ɵɵloadQuery())&&(t.bulkStatusModalRef=n.first),x.ɵɵqueryRefresh(n=x.ɵɵloadQuery())&&(t.bulkConfirmModalRef=n.first),x.ɵɵqueryRefresh(n=x.ɵɵloadQuery())&&(t.bulkRemoveModalRef=n.first)}},features:[x.ɵɵInheritDefinitionFeature],decls:110,vars:61,consts:[[1,"page-header","d-flex"],[1,"ml-auto","d-flex"],["role","group",1,"btn-group","btn-group-sm"],["type","button",1,"btn","btn-outline-secondary",3,"ngClass","click"],["class","badge badge-pill badge-info",4,"ngIf"],["class","badge badge-pill badge-warning",4,"ngIf"],[1,"ml-3"],["for","search",1,"sr-only"],["type","search","id","search",1,"form-control","form-control-sm",3,"placeholder","ngModel","ngModelChange"],["appListDropdown","",1,"dropdown","ml-3"],["type","button","id","bulkActionsButton","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",1,"btn","btn-sm","btn-outline-secondary","dropdown-toggle",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-cog"],["aria-labelledby","bulkActionsButton",1,"dropdown-menu","dropdown-menu-right"],["appStopClick","",1,"dropdown-item",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-envelope-o"],["class","dropdown-item text-success","appStopClick","",3,"click",4,"ngIf"],["appStopClick","",1,"dropdown-item","text-danger",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-remove"],[1,"dropdown-divider"],["aria-hidden","true",1,"fa","fa-fw","fa-check-square-o"],["aria-hidden","true",1,"fa","fa-fw","fa-minus-square-o"],["type","button",1,"btn","btn-sm","btn-outline-primary","ml-3",3,"click"],["aria-hidden","true",1,"fa","fa-plus","fa-fw"],[4,"ngIf"],["addEdit",""],["eventsTemplate",""],["confirmTemplate",""],["bulkStatusTemplate",""],["bulkConfirmTemplate",""],["bulkRemoveTemplate",""],[1,"badge","badge-pill","badge-info"],[1,"badge","badge-pill","badge-warning"],["appStopClick","",1,"dropdown-item","text-success",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-check"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],["type","info","icon","fa-check-circle",3,"title",4,"ngIf"],["infiniteScroll","",1,"table","table-hover","table-list",3,"infiniteScrollDistance","infiniteScrollDisabled","scrolled"],[4,"ngFor","ngForOf"],["type","info","icon","fa-check-circle",3,"title"],[1,"table-list-checkbox",3,"click"],["type","checkbox","appStopProp","",3,"ngModel","ngModelChange"],["width","30"],["size","25",3,"data","email","circle","fontSize"],["href","#","appStopClick","",3,"click"],["class","badge badge-secondary",4,"ngIf"],["class","badge badge-warning",4,"ngIf"],["class","text-muted d-block",4,"ngIf"],[1,"table-list-options"],["appListDropdown","",1,"dropdown"],["type","button","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",1,"btn","btn-outline-secondary","dropdown-toggle",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-cog","fa-lg"],[1,"dropdown-menu","dropdown-menu-right"],["class","dropdown-item","href","#","appStopClick","",3,"click",4,"ngIf"],["class","dropdown-item text-success","href","#","appStopClick","",3,"click",4,"ngIf"],["href","#","appStopClick","",1,"dropdown-item","text-danger",3,"click"],[1,"badge","badge-secondary"],[1,"badge","badge-warning"],[1,"text-muted","d-block"],["aria-hidden","true",1,"fa","fa-lock",3,"title"],["href","#","appStopClick","",1,"dropdown-item",3,"click"],["href","#","appStopClick","",1,"dropdown-item","text-success",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-sitemap"],["aria-hidden","true",1,"fa","fa-fw","fa-file-text-o"]],template:function(e,t){1&e&&(x.ɵɵelementStart(0,"div",0),x.ɵɵtext(1," "),x.ɵɵelementStart(2,"h1"),x.ɵɵtext(3),x.ɵɵpipe(4,"i18n"),x.ɵɵelementEnd(),x.ɵɵtext(5," "),x.ɵɵelementStart(6,"div",1),x.ɵɵtext(7," "),x.ɵɵelementStart(8,"div",2),x.ɵɵtext(9," "),x.ɵɵelementStart(10,"button",3),x.ɵɵlistener("click",(function(){return t.filter(null)})),x.ɵɵtext(11),x.ɵɵpipe(12,"i18n"),x.ɵɵtemplate(13,$,2,1,"span",4),x.ɵɵtext(14," "),x.ɵɵelementEnd(),x.ɵɵtext(15," "),x.ɵɵelementStart(16,"button",3),x.ɵɵlistener("click",(function(){return t.filter(t.userStatusType.Invited)})),x.ɵɵtext(17),x.ɵɵpipe(18,"i18n"),x.ɵɵtemplate(19,Q,2,1,"span",4),x.ɵɵtext(20," "),x.ɵɵelementEnd(),x.ɵɵtext(21," "),x.ɵɵelementStart(22,"button",3),x.ɵɵlistener("click",(function(){return t.filter(t.userStatusType.Accepted)})),x.ɵɵtext(23),x.ɵɵpipe(24,"i18n"),x.ɵɵtemplate(25,Y,2,1,"span",5),x.ɵɵtext(26," "),x.ɵɵelementEnd(),x.ɵɵtext(27," "),x.ɵɵelementEnd(),x.ɵɵtext(28," "),x.ɵɵelementStart(29,"div",6),x.ɵɵtext(30," "),x.ɵɵelementStart(31,"label",7),x.ɵɵtext(32),x.ɵɵpipe(33,"i18n"),x.ɵɵelementEnd(),x.ɵɵtext(34," "),x.ɵɵelementStart(35,"input",8),x.ɵɵlistener("ngModelChange",(function(e){return t.searchText=e})),x.ɵɵpipe(36,"i18n"),x.ɵɵelementEnd(),x.ɵɵtext(37," "),x.ɵɵelementEnd(),x.ɵɵtext(38," "),x.ɵɵelementStart(39,"div",9),x.ɵɵtext(40," "),x.ɵɵelementStart(41,"button",10),x.ɵɵpipe(42,"i18n"),x.ɵɵtext(43," "),x.ɵɵelement(44,"i",11),x.ɵɵtext(45," "),x.ɵɵelementEnd(),x.ɵɵtext(46," "),x.ɵɵelementStart(47,"div",12),x.ɵɵtext(48," "),x.ɵɵelementStart(49,"button",13),x.ɵɵlistener("click",(function(){return t.bulkReinvite()})),x.ɵɵtext(50," "),x.ɵɵelement(51,"i",14),x.ɵɵtext(52),x.ɵɵpipe(53,"i18n"),x.ɵɵelementEnd(),x.ɵɵtext(54," "),x.ɵɵtemplate(55,J,5,3,"button",15),x.ɵɵtext(56," "),x.ɵɵelementStart(57,"button",16),x.ɵɵlistener("click",(function(){return t.bulkRemove()})),x.ɵɵtext(58," "),x.ɵɵelement(59,"i",17),x.ɵɵtext(60),x.ɵɵpipe(61,"i18n"),x.ɵɵelementEnd(),x.ɵɵtext(62," "),x.ɵɵelement(63,"div",18),x.ɵɵtext(64," "),x.ɵɵelementStart(65,"button",13),x.ɵɵlistener("click",(function(){return t.selectAll(!0)})),x.ɵɵtext(66," "),x.ɵɵelement(67,"i",19),x.ɵɵtext(68),x.ɵɵpipe(69,"i18n"),x.ɵɵelementEnd(),x.ɵɵtext(70," "),x.ɵɵelementStart(71,"button",13),x.ɵɵlistener("click",(function(){return t.selectAll(!1)})),x.ɵɵtext(72," "),x.ɵɵelement(73,"i",20),x.ɵɵtext(74),x.ɵɵpipe(75,"i18n"),x.ɵɵelementEnd(),x.ɵɵtext(76," "),x.ɵɵelementEnd(),x.ɵɵtext(77," "),x.ɵɵelementEnd(),x.ɵɵtext(78," "),x.ɵɵelementStart(79,"button",21),x.ɵɵlistener("click",(function(){return t.invite()})),x.ɵɵtext(80," "),x.ɵɵelement(81,"i",22),x.ɵɵtext(82),x.ɵɵpipe(83,"i18n"),x.ɵɵelementEnd(),x.ɵɵtext(84," "),x.ɵɵelementEnd(),x.ɵɵtext(85," "),x.ɵɵelementEnd(),x.ɵɵtext(86," "),x.ɵɵtemplate(87,X,9,6,"ng-container",23),x.ɵɵtext(88," "),x.ɵɵtemplate(89,fe,6,2,"ng-container",23),x.ɵɵpipe(90,"search"),x.ɵɵtext(91," "),x.ɵɵtemplate(92,he,0,0,"ng-template",null,24,x.ɵɵtemplateRefExtractor),x.ɵɵtext(94," "),x.ɵɵtemplate(95,ve,0,0,"ng-template",null,25,x.ɵɵtemplateRefExtractor),x.ɵɵtext(97," "),x.ɵɵtemplate(98,ye,0,0,"ng-template",null,26,x.ɵɵtemplateRefExtractor),x.ɵɵtext(100," "),x.ɵɵtemplate(101,ge,0,0,"ng-template",null,27,x.ɵɵtemplateRefExtractor),x.ɵɵtext(103," "),x.ɵɵtemplate(104,xe,0,0,"ng-template",null,28,x.ɵɵtemplateRefExtractor),x.ɵɵtext(106," "),x.ɵɵtemplate(107,be,0,0,"ng-template",null,29,x.ɵɵtemplateRefExtractor),x.ɵɵtext(109," ")),2&e&&(x.ɵɵadvance(3),x.ɵɵtextInterpolate(x.ɵɵpipeBind1(4,22,"people")),x.ɵɵadvance(7),x.ɵɵproperty("ngClass",x.ɵɵpureFunction1(52,Se,null==t.status)),x.ɵɵadvance(1),x.ɵɵtextInterpolate1(" ",x.ɵɵpipeBind1(12,24,"all")," "),x.ɵɵadvance(2),x.ɵɵproperty("ngIf",t.allCount),x.ɵɵadvance(3),x.ɵɵproperty("ngClass",x.ɵɵpureFunction1(54,Se,t.status==t.userStatusType.Invited)),x.ɵɵadvance(1),x.ɵɵtextInterpolate1(" ",x.ɵɵpipeBind1(18,26,"invited")," "),x.ɵɵadvance(2),x.ɵɵproperty("ngIf",t.invitedCount),x.ɵɵadvance(3),x.ɵɵproperty("ngClass",x.ɵɵpureFunction1(56,Se,t.status==t.userStatusType.Accepted)),x.ɵɵadvance(1),x.ɵɵtextInterpolate1(" ",x.ɵɵpipeBind1(24,28,"accepted")," "),x.ɵɵadvance(2),x.ɵɵproperty("ngIf",t.acceptedCount),x.ɵɵadvance(7),x.ɵɵtextInterpolate(x.ɵɵpipeBind1(33,30,"search")),x.ɵɵadvance(3),x.ɵɵpropertyInterpolate("placeholder",x.ɵɵpipeBind1(36,32,"search")),x.ɵɵproperty("ngModel",t.searchText),x.ɵɵadvance(6),x.ɵɵpropertyInterpolate("appA11yTitle",x.ɵɵpipeBind1(42,34,"options")),x.ɵɵadvance(11),x.ɵɵtextInterpolate1(" ",x.ɵɵpipeBind1(53,36,"reinviteSelected")," "),x.ɵɵadvance(3),x.ɵɵproperty("ngIf",t.showBulkConfirmUsers),x.ɵɵadvance(5),x.ɵɵtextInterpolate1(" ",x.ɵɵpipeBind1(61,38,"remove")," "),x.ɵɵadvance(8),x.ɵɵtextInterpolate1(" ",x.ɵɵpipeBind1(69,40,"selectAll")," "),x.ɵɵadvance(6),x.ɵɵtextInterpolate1(" ",x.ɵɵpipeBind1(75,42,"unselectAll")," "),x.ɵɵadvance(8),x.ɵɵtextInterpolate1(" ",x.ɵɵpipeBind1(83,44,"inviteUser")," "),x.ɵɵadvance(5),x.ɵɵproperty("ngIf",t.loading),x.ɵɵadvance(2),x.ɵɵproperty("ngIf",!t.loading&&(t.isPaging()?t.pagedUsers:x.ɵɵpipeBindV(90,46,x.ɵɵpureFunction2(58,we,t.users,t.searchText)))))},directives:[R.NgClass,R.NgIf,B.DefaultValueAccessor,B.NgControlStatus,B.NgModel,U.A11yTitleDirective,j.StopClickDirective,R.NgForOf,V.CalloutComponent,B.CheckboxControlValueAccessor,F.StopPropDirective,N.AvatarComponent],pipes:[z.I18nPipe,T.SearchPipe,D.UserNamePipe],encapsulation:2}),t}(m.BasePeopleComponent);t.PeopleComponent=Ce,("undefined"==typeof ngDevMode||ngDevMode)&&x.ɵsetClassMetadata(Ce,[{type:l.Component,args:[{selector:"provider-people",templateUrl:"people.component.html"}]}],(function(){return[{type:b.ApiService},{type:S.ActivatedRoute},{type:w.I18nService},{type:C.ModalService},{type:I.PlatformUtilsService},{type:E.ToasterService},{type:P.CryptoService},{type:k.UserService},{type:S.Router},{type:_.StorageService},{type:A.SearchService},{type:O.ValidationService},{type:M.LogService},{type:T.SearchPipe},{type:D.UserNamePipe}]}),{addEditModalRef:[{type:l.ViewChild,args:["addEdit",{read:l.ViewContainerRef,static:!0}]}],groupsModalRef:[{type:l.ViewChild,args:["groupsTemplate",{read:l.ViewContainerRef,static:!0}]}],eventsModalRef:[{type:l.ViewChild,args:["eventsTemplate",{read:l.ViewContainerRef,static:!0}]}],bulkStatusModalRef:[{type:l.ViewChild,args:["bulkStatusTemplate",{read:l.ViewContainerRef,static:!0}]}],bulkConfirmModalRef:[{type:l.ViewChild,args:["bulkConfirmTemplate",{read:l.ViewContainerRef,static:!0}]}],bulkRemoveModalRef:[{type:l.ViewChild,args:["bulkRemoveTemplate",{read:l.ViewContainerRef,static:!0}]}]})},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]1&&this.confirmedCount>0&&this.confirmedCount<3&&this.acceptedCount>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"showBulkConfirmUsers",{get:function(){return this.acceptedCount>0},enumerable:!1,configurable:!0}),e.prototype.load=function(){return r(this,void 0,void 0,(function(){var e,t,n,r,o=this;return i(this,(function(i){switch(i.label){case 0:return[4,this.getUsers()];case 1:for(e=i.sent(),this.statusMap.clear(),t=0,n=s.Utils.iterateEnum(this.userStatusType);t0?e.data:[],this.allUsers.sort(s.Utils.getSortFunction(this.i18nService,"email")),this.allUsers.forEach((function(e){o.statusMap.has(e.status)?o.statusMap.get(e.status).push(e):o.statusMap.set(e.status,[e])})),this.filter(this.status),this.loading=!1,[2]}}))}))},e.prototype.filter=function(e){this.status=e,null!=this.status?this.users=this.statusMap.get(this.status):this.users=this.allUsers,this.selectAll(!1),this.resetPaging()},e.prototype.loadMore=function(){if(this.users&&!(this.users.length<=this.pageSize)){var e=this.pagedUsers.length,t=this.pageSize;0===e&&this.pagedUsersCount>this.pageSize&&(t=this.pagedUsersCount),this.users.length>e&&(this.pagedUsers=this.pagedUsers.concat(this.users.slice(e,e+t))),this.pagedUsersCount=this.pagedUsers.length,this.didScroll=this.pagedUsers.length>this.pageSize}},e.prototype.checkUser=function(e,t){e.checked=null==t?!e.checked:t},e.prototype.selectAll=function(e){e&&this.selectAll(!1);for(var t=this.searchPipe.transform(this.users,this.searchText,"name","email","id"),n=e&&t.length>500?500:t.length,r=0;r-1&&(t.statusMap.get(t.userStatusType.Accepted).splice(n,1),t.statusMap.get(t.userStatusType.Confirmed).push(e))}(this),this.toasterService.popAsync("success",null,this.i18nService.t("hasBeenConfirmed",this.userNamePipe.transform(e))),[3,4];case 2:throw n=r.sent(),this.validationService.showError(n),n;case 3:return this.actionPromise=null,[7];case 4:return[2]}}))}))},null!=this.actionPromise)return[2];f.label=1;case 1:return f.trys.push([1,10,,11]),[4,this.apiService.getUserPublicKey(e.userId)];case 2:return n=f.sent(),o=s.Utils.fromB64ToArray(n.publicKey),[4,this.storageService.get(a.ConstantsService.autoConfirmFingerprints)];case 3:return null!=(c=f.sent())&&c?[3,5]:[4,this.modalService.openViewRef(l.UserConfirmComponent,this.confirmModalRef,(function(n){n.name=m.userNamePipe.transform(e),n.userId=null!=e?e.userId:null,n.publicKey=o,n.onConfirmedUser.subscribe((function(){return r(m,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),n.formPromise=t(o),[4,n.formPromise];case 1:return e.sent(),p.close(),[3,3];case 2:return e.sent(),[3,3];case 3:return[2]}}))}))}))}))];case 4:return p=f.sent()[0],[2];case 5:return f.trys.push([5,7,,8]),[4,this.cryptoService.getFingerprint(e.userId,o.buffer)];case 6:return u=f.sent(),this.logService.info("User's fingerprint: "+u.join("-")),[3,8];case 7:return f.sent(),[3,8];case 8:return[4,t(o)];case 9:return f.sent(),[3,11];case 10:return d=f.sent(),this.logService.error("Handled exception: "+d),[3,11];case 11:return[2]}}))}))},e.prototype.isSearching=function(){return this.searchService.isSearchable(this.searchText)},e.prototype.isPaging=function(){var e=this.isSearching();return e&&this.didScroll&&this.resetPaging(),!e&&this.users&&this.users.length>this.pageSize},e.prototype.getCheckedUsers=function(){return this.users.filter((function(e){return e.checked}))},e.prototype.removeUser=function(e){var t=this.users.indexOf(e);t>-1&&(this.users.splice(t,1),this.resetPaging()),this.statusMap.has(e.status)&&(t=this.statusMap.get(e.status).indexOf(e))>-1&&this.statusMap.get(e.status).splice(t,1)},e.ɵfac=function(t){return new(t||e)(c.ɵɵdirectiveInject(p.ApiService),c.ɵɵdirectiveInject(u.SearchService),c.ɵɵdirectiveInject(d.I18nService),c.ɵɵdirectiveInject(m.PlatformUtilsService),c.ɵɵdirectiveInject(f.ToasterService),c.ɵɵdirectiveInject(h.CryptoService),c.ɵɵdirectiveInject(v.StorageService),c.ɵɵdirectiveInject(y.ValidationService),c.ɵɵdirectiveInject(g.ModalService),c.ɵɵdirectiveInject(x.LogService),c.ɵɵdirectiveInject(b.SearchPipe),c.ɵɵdirectiveInject(S.UserNamePipe))},e.ɵdir=c.ɵɵdefineDirective({type:e,viewQuery:function(e,t){if(1&e&&c.ɵɵviewQuery(w,3,o.ViewContainerRef),2&e){var n;c.ɵɵqueryRefresh(n=c.ɵɵloadQuery())&&(t.confirmModalRef=n.first)}}}),e}();t.BasePeopleComponent=C,("undefined"==typeof ngDevMode||ngDevMode)&&c.ɵsetClassMetadata(C,[{type:o.Directive}],(function(){return[{type:p.ApiService},{type:u.SearchService},{type:d.I18nService},{type:m.PlatformUtilsService},{type:f.ToasterService},{type:h.CryptoService},{type:v.StorageService},{type:y.ValidationService},{type:g.ModalService},{type:x.LogService},{type:b.SearchPipe},{type:S.UserNamePipe}]}),{confirmModalRef:[{type:o.ViewChild,args:["confirmTemplate",{read:o.ViewContainerRef,static:!0}]}]})},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&!n.error),p.ɵɵadvance(9),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(12,3,"user")),p.ɵɵadvance(5),p.ɵɵproperty("ngForOf",n.users)}}function C(e,t){if(1&e&&(p.ɵɵelementStart(0,"small",24),p.ɵɵtext(1),p.ɵɵelementEnd()),2&e){var n=p.ɵɵnextContext().$implicit;p.ɵɵadvance(1),p.ɵɵtextInterpolate(n.name)}}function I(e,t){if(1&e&&(p.ɵɵelementStart(0,"td"),p.ɵɵtext(1),p.ɵɵelementEnd()),2&e){var n=p.ɵɵnextContext().$implicit,r=p.ɵɵnextContext(2);p.ɵɵadvance(1),p.ɵɵtextInterpolate1(" ",r.statuses.get(n.id)," ")}}function E(e,t){1&e&&(p.ɵɵelementStart(0,"td"),p.ɵɵtext(1),p.ɵɵpipe(2,"i18n"),p.ɵɵelementEnd()),2&e&&(p.ɵɵadvance(1),p.ɵɵtextInterpolate1(" ",p.ɵɵpipeBind1(2,1,"bulkFilteredMessage")," "))}function P(e,t){if(1&e&&(p.ɵɵelementStart(0,"tr"),p.ɵɵtext(1," "),p.ɵɵelementStart(2,"td",21),p.ɵɵtext(3," "),p.ɵɵelement(4,"app-avatar",22),p.ɵɵpipe(5,"userName"),p.ɵɵtext(6," "),p.ɵɵelementEnd(),p.ɵɵtext(7," "),p.ɵɵelementStart(8,"td"),p.ɵɵtext(9),p.ɵɵtemplate(10,C,2,1,"small",23),p.ɵɵtext(11," "),p.ɵɵelementEnd(),p.ɵɵtext(12," "),p.ɵɵtemplate(13,I,2,1,"td",10),p.ɵɵtext(14," "),p.ɵɵtemplate(15,E,3,3,"td",10),p.ɵɵtext(16," "),p.ɵɵelementEnd()),2&e){var n=t.$implicit,r=p.ɵɵnextContext(2);p.ɵɵadvance(4),p.ɵɵproperty("data",p.ɵɵpipeBind1(5,8,n))("email",n.email)("circle",!0)("fontSize",14),p.ɵɵadvance(5),p.ɵɵtextInterpolate1(" ",n.email," "),p.ɵɵadvance(1),p.ɵɵproperty("ngIf",n.name),p.ɵɵadvance(3),p.ɵɵproperty("ngIf",r.statuses.has(n.id)),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",!r.statuses.has(n.id))}}function k(e,t){if(1&e&&(p.ɵɵelementContainerStart(0),p.ɵɵtext(1," "),p.ɵɵelementStart(2,"table",17),p.ɵɵtext(3," "),p.ɵɵelementStart(4,"thead"),p.ɵɵtext(5," "),p.ɵɵelementStart(6,"tr"),p.ɵɵtext(7," "),p.ɵɵelementStart(8,"th",18),p.ɵɵtext(9),p.ɵɵpipe(10,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(11," "),p.ɵɵelementStart(12,"th"),p.ɵɵtext(13),p.ɵɵpipe(14,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(15," "),p.ɵɵelementEnd(),p.ɵɵtext(16," "),p.ɵɵelementEnd(),p.ɵɵtext(17," "),p.ɵɵtemplate(18,P,17,10,"tr",19),p.ɵɵtext(19," "),p.ɵɵelementEnd(),p.ɵɵtext(20," "),p.ɵɵelementContainerEnd()),2&e){var n=p.ɵɵnextContext();p.ɵɵadvance(9),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(10,3,"user")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(14,5,"status")),p.ɵɵadvance(5),p.ɵɵproperty("ngForOf",n.users)}}function _(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"button",25),p.ɵɵlistener("click",(function(){return p.ɵɵrestoreView(n),p.ɵɵnextContext().submit()})),p.ɵɵtext(1," "),p.ɵɵelement(2,"i",26),p.ɵɵpipe(3,"i18n"),p.ɵɵtext(4," "),p.ɵɵelementStart(5,"span"),p.ɵɵtext(6),p.ɵɵpipe(7,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(8," "),p.ɵɵelementEnd()}if(2&e){var r=p.ɵɵnextContext();p.ɵɵproperty("disabled",r.loading),p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(3,3,"loading")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(7,5,"removeUsers"))}}var A=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.deleteUsers=function(){return o(this,void 0,void 0,(function(){var e;return a(this,(function(t){switch(t.label){case 0:return e=new l.ProviderUserBulkRequest(this.users.map((function(e){return e.id}))),[4,this.apiService.deleteManyProviderUsers(this.providerId,e)];case 1:return[2,t.sent()]}}))}))},t.ɵfac=function(e){return O(e||t)},t.ɵcmp=p.ɵɵdefineComponent({type:t,selectors:[["ng-component"]],inputs:{providerId:"providerId"},features:[p.ɵɵInheritDefinitionFeature],decls:43,vars:14,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","bulkTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-lg"],[1,"modal-content"],[1,"modal-header"],["id","bulkTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["type","danger",4,"ngIf"],["type","error",4,"ngIf"],[4,"ngIf"],[1,"modal-footer"],["type","submit","class","btn btn-primary btn-submit",3,"disabled","click",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],["type","danger"],["type","error"],["type","warning",4,"ngIf"],[1,"table","table-hover","table-list"],["colspan","2"],[4,"ngFor","ngForOf"],["type","warning"],["width","30"],["size","25",3,"data","email","circle","fontSize"],["class","text-muted d-block",4,"ngIf"],[1,"text-muted","d-block"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled","click"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"]],template:function(e,t){1&e&&(p.ɵɵelementStart(0,"div",0),p.ɵɵtext(1," "),p.ɵɵelementStart(2,"div",1),p.ɵɵtext(3," "),p.ɵɵelementStart(4,"div",2),p.ɵɵtext(5," "),p.ɵɵelementStart(6,"div",3),p.ɵɵtext(7," "),p.ɵɵelementStart(8,"h2",4),p.ɵɵtext(9),p.ɵɵpipe(10,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(11," "),p.ɵɵelementStart(12,"button",5),p.ɵɵpipe(13,"i18n"),p.ɵɵtext(14," "),p.ɵɵelementStart(15,"span",6),p.ɵɵtext(16,"×"),p.ɵɵelementEnd(),p.ɵɵtext(17," "),p.ɵɵelementEnd(),p.ɵɵtext(18," "),p.ɵɵelementEnd(),p.ɵɵtext(19," "),p.ɵɵelementStart(20,"div",7),p.ɵɵtext(21," "),p.ɵɵtemplate(22,y,3,3,"app-callout",8),p.ɵɵtext(23," "),p.ɵɵtemplate(24,g,2,1,"app-callout",9),p.ɵɵtext(25," "),p.ɵɵtemplate(26,w,19,5,"ng-container",10),p.ɵɵtext(27," "),p.ɵɵtemplate(28,k,21,7,"ng-container",10),p.ɵɵtext(29," "),p.ɵɵelementEnd(),p.ɵɵtext(30," "),p.ɵɵelementStart(31,"div",11),p.ɵɵtext(32," "),p.ɵɵtemplate(33,_,9,7,"button",12),p.ɵɵtext(34," "),p.ɵɵelementStart(35,"button",13),p.ɵɵtext(36),p.ɵɵpipe(37,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(38," "),p.ɵɵelementEnd(),p.ɵɵtext(39," "),p.ɵɵelementEnd(),p.ɵɵtext(40," "),p.ɵɵelementEnd(),p.ɵɵtext(41," "),p.ɵɵelementEnd(),p.ɵɵtext(42," ")),2&e&&(p.ɵɵadvance(9),p.ɵɵtextInterpolate1(" ",p.ɵɵpipeBind1(10,8,"removeUsers")," "),p.ɵɵadvance(3),p.ɵɵpropertyInterpolate("appA11yTitle",p.ɵɵpipeBind1(13,10,"close")),p.ɵɵadvance(10),p.ɵɵproperty("ngIf",t.users.length<=0),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",t.error),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",!t.done),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",t.done),p.ɵɵadvance(5),p.ɵɵproperty("ngIf",!t.done&&t.users.length>0),p.ɵɵadvance(3),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(37,12,"close")))},directives:[u.A11yTitleDirective,d.NgIf,m.CalloutComponent,d.NgForOf,f.AvatarComponent],pipes:[h.I18nPipe,v.UserNamePipe],encapsulation:2}),t}(c.BulkRemoveComponent);t.BulkRemoveComponent=A;var O=p.ɵɵgetInheritedFactory(A);("undefined"==typeof ngDevMode||ngDevMode)&&p.ɵsetClassMetadata(A,[{type:s.Component,args:[{templateUrl:"/src/app/organizations/manage/bulk/bulk-remove.component.html"}]}],null,{providerId:[{type:s.Input}]})},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]-1&&(this.email=n.email),null!=n.premium?this.stateService.save("loginRedirect",{route:"/settings/premium"}):null!=n.org&&this.stateService.save("loginRedirect",{route:"/settings/create-organization",qParams:{plan:n.org}}),[4,e.prototype.ngOnInit.call(this)];case 1:return r.sent(),null!=t&&t.unsubscribe(),[2]}}))}))})),[4,this.stateService.get("orgInvitation")];case 1:if(null==(n=c.sent()))return[3,6];r=null,c.label=2;case 2:return c.trys.push([2,4,,5]),[4,this.apiService.getPoliciesByToken(n.organizationId,n.token,n.email,n.organizationUserId)];case 3:return i=c.sent(),r=this.policyService.mapPoliciesFromToken(i),[3,5];case 4:return c.sent(),[3,5];case 5:null!=r&&(s=this.policyService.getResetPasswordPolicyOptions(r,n.organizationId),this.showResetPasswordAutoEnrollWarning=s[1]&&s[0].autoEnrollEnabled),c.label=6;case 6:return[2]}}))}))},t.prototype.goAfterLogIn=function(){return o(this,void 0,void 0,(function(){var e;return a(this,(function(t){switch(t.label){case 0:return[4,this.stateService.get("loginRedirect")];case 1:return null==(e=t.sent())?[3,3]:(this.router.navigate([e.route],{queryParams:e.qParams}),[4,this.stateService.remove("loginRedirect")]);case 2:return t.sent(),[3,4];case 3:this.router.navigate([this.successRoute]),t.label=4;case 4:return[2]}}))}))},t.ɵfac=function(e){return new(e||t)(c.ɵɵdirectiveInject(p.AuthService),c.ɵɵdirectiveInject(u.Router),c.ɵɵdirectiveInject(d.I18nService),c.ɵɵdirectiveInject(u.ActivatedRoute),c.ɵɵdirectiveInject(m.StorageService),c.ɵɵdirectiveInject(f.StateService),c.ɵɵdirectiveInject(h.PlatformUtilsService),c.ɵɵdirectiveInject(v.EnvironmentService),c.ɵɵdirectiveInject(y.PasswordGenerationService),c.ɵɵdirectiveInject(g.CryptoFunctionService),c.ɵɵdirectiveInject(x.ApiService),c.ɵɵdirectiveInject(b.PolicyService))},t.ɵcmp=c.ɵɵdefineComponent({type:t,selectors:[["app-login"]],features:[c.ɵɵInheritDefinitionFeature],decls:102,vars:45,consts:[["ngNativeValidate","",1,"container",3,"appApiAction","ngSubmit"],["form",""],[1,"row","justify-content-md-center","mt-5"],[1,"col-5"],["alt","Bitwarden",1,"mb-2","logo","logo-themed"],[1,"lead","text-center","mx-4","mb-4"],[1,"card","d-block"],[1,"card-body"],["type","warning",3,"title",4,"ngIf"],[1,"form-group"],["for","email"],["id","email","type","text","name","Email","required","","inputmode","email","appInputVerbatim","false",1,"form-control",3,"ngModel","ngModelChange"],["for","masterPassword"],[1,"d-flex"],["id","masterPassword","name","MasterPassword","required","","appInputVerbatim","",1,"text-monospace","form-control",3,"type","ngModel","ngModelChange"],["type","button",1,"ml-1","btn","btn-link",3,"appA11yTitle","click"],["aria-hidden","true",1,"fa","fa-lg",3,"ngClass"],[1,"form-text"],["routerLink","/hint"],[1,"form-check","mb-3"],["type","checkbox","id","rememberEmail","name","RememberEmail",1,"form-check-input",3,"ngModel","ngModelChange"],["for","rememberEmail",1,"form-check-label"],[1,"mb-n3",3,"hidden"],["id","hcaptcha_iframe","height","80"],["type","submit",1,"btn","btn-primary","btn-block","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-sign-in"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["routerLink","/register",1,"btn","btn-outline-secondary","btn-block","ml-2","mt-0",3,"queryParams"],["aria-hidden","true",1,"fa","fa-pencil-square-o"],["routerLink","/sso",1,"btn","btn-outline-secondary","btn-block","mt-2"],["aria-hidden","true",1,"fa","fa-bank"],["type","warning",3,"title"]],template:function(e,t){if(1&e&&(c.ɵɵelementStart(0,"form",0,1),c.ɵɵlistener("ngSubmit",(function(){return t.submit()})),c.ɵɵtext(2," "),c.ɵɵelementStart(3,"div",2),c.ɵɵtext(4," "),c.ɵɵelementStart(5,"div",3),c.ɵɵtext(6," "),c.ɵɵelement(7,"img",4),c.ɵɵtext(8," "),c.ɵɵelementStart(9,"p",5),c.ɵɵtext(10),c.ɵɵpipe(11,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(12," "),c.ɵɵelementStart(13,"div",6),c.ɵɵtext(14," "),c.ɵɵelementStart(15,"div",7),c.ɵɵtext(16," "),c.ɵɵtemplate(17,_,4,6,"app-callout",8),c.ɵɵtext(18," "),c.ɵɵelementStart(19,"div",9),c.ɵɵtext(20," "),c.ɵɵelementStart(21,"label",10),c.ɵɵtext(22),c.ɵɵpipe(23,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(24," "),c.ɵɵelementStart(25,"input",11),c.ɵɵlistener("ngModelChange",(function(e){return t.email=e})),c.ɵɵelementEnd(),c.ɵɵtext(26," "),c.ɵɵelementEnd(),c.ɵɵtext(27," "),c.ɵɵelementStart(28,"div",9),c.ɵɵtext(29," "),c.ɵɵelementStart(30,"label",12),c.ɵɵtext(31),c.ɵɵpipe(32,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(33," "),c.ɵɵelementStart(34,"div",13),c.ɵɵtext(35," "),c.ɵɵelementStart(36,"input",14),c.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e})),c.ɵɵelementEnd(),c.ɵɵtext(37," "),c.ɵɵelementStart(38,"button",15),c.ɵɵlistener("click",(function(){return t.togglePassword()})),c.ɵɵpipe(39,"i18n"),c.ɵɵtext(40," "),c.ɵɵelement(41,"i",16),c.ɵɵtext(42," "),c.ɵɵelementEnd(),c.ɵɵtext(43," "),c.ɵɵelementEnd(),c.ɵɵtext(44," "),c.ɵɵelementStart(45,"small",17),c.ɵɵtext(46," "),c.ɵɵelementStart(47,"a",18),c.ɵɵtext(48),c.ɵɵpipe(49,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(50," "),c.ɵɵelementEnd(),c.ɵɵtext(51," "),c.ɵɵelementEnd(),c.ɵɵtext(52," "),c.ɵɵelementStart(53,"div",19),c.ɵɵtext(54," "),c.ɵɵelementStart(55,"input",20),c.ɵɵlistener("ngModelChange",(function(e){return t.rememberEmail=e})),c.ɵɵelementEnd(),c.ɵɵtext(56," "),c.ɵɵelementStart(57,"label",21),c.ɵɵtext(58),c.ɵɵpipe(59,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(60," "),c.ɵɵelementEnd(),c.ɵɵtext(61," "),c.ɵɵelementStart(62,"div",22),c.ɵɵelement(63,"iframe",23),c.ɵɵelementEnd(),c.ɵɵtext(64," "),c.ɵɵelement(65,"hr"),c.ɵɵtext(66," "),c.ɵɵelementStart(67,"div",13),c.ɵɵtext(68," "),c.ɵɵelementStart(69,"button",24),c.ɵɵtext(70," "),c.ɵɵelementStart(71,"span"),c.ɵɵtext(72," "),c.ɵɵelement(73,"i",25),c.ɵɵtext(74),c.ɵɵpipe(75,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(76," "),c.ɵɵelement(77,"i",26),c.ɵɵpipe(78,"i18n"),c.ɵɵtext(79," "),c.ɵɵelementEnd(),c.ɵɵtext(80," "),c.ɵɵelementStart(81,"a",27),c.ɵɵtext(82," "),c.ɵɵelement(83,"i",28),c.ɵɵtext(84),c.ɵɵpipe(85,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(86," "),c.ɵɵelementEnd(),c.ɵɵtext(87," "),c.ɵɵelementStart(88,"div",13),c.ɵɵtext(89," "),c.ɵɵelementStart(90,"a",29),c.ɵɵtext(91," "),c.ɵɵelement(92,"i",30),c.ɵɵtext(93),c.ɵɵpipe(94,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(95," "),c.ɵɵelementEnd(),c.ɵɵtext(96," "),c.ɵɵelementEnd(),c.ɵɵtext(97," "),c.ɵɵelementEnd(),c.ɵɵtext(98," "),c.ɵɵelementEnd(),c.ɵɵtext(99," "),c.ɵɵelementEnd(),c.ɵɵtext(100," "),c.ɵɵelementEnd(),c.ɵɵtext(101," ")),2&e){var n=c.ɵɵreference(1);c.ɵɵproperty("appApiAction",t.formPromise),c.ɵɵadvance(10),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(11,20,"loginOrCreateNewAccount")),c.ɵɵadvance(7),c.ɵɵproperty("ngIf",t.showResetPasswordAutoEnrollWarning),c.ɵɵadvance(5),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(23,22,"emailAddress")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",t.email),c.ɵɵadvance(6),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(32,24,"masterPass")),c.ɵɵadvance(5),c.ɵɵpropertyInterpolate("type",t.showPassword?"text":"password"),c.ɵɵproperty("ngModel",t.masterPassword),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(39,26,"toggleVisibility")),c.ɵɵadvance(3),c.ɵɵproperty("ngClass",c.ɵɵpureFunction2(40,A,!t.showPassword,t.showPassword)),c.ɵɵadvance(7),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(49,28,"getMasterPasswordHint")),c.ɵɵadvance(7),c.ɵɵproperty("ngModel",t.rememberEmail),c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(59,30,"rememberEmail")),c.ɵɵadvance(4),c.ɵɵproperty("hidden",!t.showCaptcha()),c.ɵɵadvance(7),c.ɵɵproperty("disabled",n.loading),c.ɵɵadvance(5),c.ɵɵtextInterpolate1(" ",c.ɵɵpipeBind1(75,32,"logIn")," "),c.ɵɵadvance(3),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(78,34,"loading")),c.ɵɵadvance(4),c.ɵɵproperty("queryParams",c.ɵɵpureFunction1(43,O,t.email)),c.ɵɵadvance(3),c.ɵɵtextInterpolate1(" ",c.ɵɵpipeBind1(85,36,"createAccount")," "),c.ɵɵadvance(9),c.ɵɵtextInterpolate1(" ",c.ɵɵpipeBind1(94,38,"enterpriseSingleSignOn")," ")}},directives:[S.NgControlStatusGroup,S.NgForm,w.ApiActionDirective,C.NgIf,S.DefaultValueAccessor,S.RequiredValidator,I.InputVerbatimDirective,S.NgControlStatus,S.NgModel,E.A11yTitleDirective,C.NgClass,u.RouterLinkWithHref,S.CheckboxControlValueAccessor,P.CalloutComponent],pipes:[k.I18nPipe],encapsulation:2}),t}(l.LoginComponent);t.LoginComponent=M,("undefined"==typeof ngDevMode||ngDevMode)&&c.ɵsetClassMetadata(M,[{type:s.Component,args:[{selector:"app-login",templateUrl:"login.component.html"}]}],(function(){return[{type:p.AuthService},{type:u.Router},{type:d.I18nService},{type:u.ActivatedRoute},{type:m.StorageService},{type:f.StateService},{type:h.PlatformUtilsService},{type:v.EnvironmentService},{type:y.PasswordGenerationService},{type:g.CryptoFunctionService},{type:x.ApiService},{type:b.PolicyService}]}),null)},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]-1&&(s.email=e.email),null!=e.premium?s.stateService.save("loginRedirect",{route:"/settings/premium"}):null!=e.org&&(s.showCreateOrgMessage=!0,s.referenceData.flow=e.org,s.stateService.save("loginRedirect",{route:"/settings/create-organization",qParams:{plan:e.org}})),null!=e.layout&&(s.layout=s.referenceData.layout=e.layout),null!=e.reference?s.referenceData.id=e.reference:s.referenceData.id=("; "+document.cookie).split("; reference=").pop().split(";").shift(),""===s.referenceData.id&&(s.referenceData.id=null),null!=t&&t.unsubscribe()})),[4,this.stateService.get("orgInvitation")];case 1:if(null==(n=a.sent()))return[3,5];a.label=2;case 2:return a.trys.push([2,4,,5]),[4,this.apiService.getPoliciesByToken(n.organizationId,n.token,n.email,n.organizationUserId)];case 3:return null!=(r=a.sent()).data&&(i=r.data.map((function(e){return new p.PolicyData(e)})),this.policies=i.map((function(e){return new c.Policy(e)}))),[3,5];case 4:return a.sent(),[3,5];case 5:return null==this.policies?[3,7]:(o=this,[4,this.policyService.getMasterPasswordPolicyOptions(this.policies)]);case 6:o.enforcedPolicyOptions=a.sent(),a.label=7;case 7:return[4,e.prototype.ngOnInit.call(this)];case 8:return a.sent(),[2]}}))}))},t.prototype.submit=function(){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return null==this.enforcedPolicyOptions||this.policyService.evaluateMasterPassword(this.masterPasswordScore,this.masterPassword,this.enforcedPolicyOptions)?[4,e.prototype.submit.call(this)]:(this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPasswordPolicyRequirementsNotMet")),[2]);case 1:return t.sent(),[2]}}))}))},t.ɵfac=function(e){return new(e||t)(d.ɵɵdirectiveInject(m.AuthService),d.ɵɵdirectiveInject(f.Router),d.ɵɵdirectiveInject(h.I18nService),d.ɵɵdirectiveInject(v.CryptoService),d.ɵɵdirectiveInject(y.ApiService),d.ɵɵdirectiveInject(f.ActivatedRoute),d.ɵɵdirectiveInject(g.StateService),d.ɵɵdirectiveInject(x.PlatformUtilsService),d.ɵɵdirectiveInject(b.PasswordGenerationService),d.ɵɵdirectiveInject(S.PolicyService),d.ɵɵdirectiveInject(w.EnvironmentService))},t.ɵcmp=d.ɵɵdefineComponent({type:t,selectors:[["app-register"]],features:[d.ɵɵInheritDefinitionFeature],decls:149,vars:81,consts:[[1,"layout",3,"ngClass"],["class","header",4,"ngIf"],["ngNativeValidate","",1,"container",3,"appApiAction","ngSubmit"],["form",""],[1,"row"],["class","col-7",4,"ngIf"],[3,"ngClass"],[1,"row","justify-content-md-center","mt-5"],["class","lead text-center mb-4",4,"ngIf"],[1,"card","d-block"],[1,"card-body"],["type","info","icon","fa-thumb-tack",3,"title",4,"ngIf"],[1,"form-group"],["for","email"],["id","email","type","text","name","Email","required","","inputmode","email","appInputVerbatim","false",1,"form-control",3,"ngModel","appAutofocus","ngModelChange"],[1,"form-text","text-muted"],["for","name"],["id","name","type","text","name","Name",1,"form-control",3,"ngModel","appAutofocus","ngModelChange"],["type","info",3,"enforcedPolicyOptions",4,"ngIf"],["for","masterPassword"],[1,"d-flex"],[1,"w-100"],["id","masterPassword","name","MasterPassword","required","","appInputVerbatim","",1,"text-monospace","form-control","mb-1",3,"type","ngModel","ngModelChange","input"],[3,"score","showText"],["type","button",1,"ml-1","btn","btn-link",3,"appA11yTitle","click"],["aria-hidden","true",1,"fa","fa-lg",3,"ngClass"],[1,"progress-bar","invisible"],["for","masterPasswordRetype"],["id","masterPasswordRetype","name","MasterPasswordRetype","required","","appInputVerbatim","",1,"text-monospace","form-control",3,"type","ngModel","ngModelChange"],["for","hint"],["id","hint","type","text","name","Hint",1,"form-control",3,"ngModel","ngModelChange"],[3,"hidden"],["id","hcaptcha_iframe","height","80"],["class","form-group",4,"ngIf"],[1,"d-flex","mb-2"],["type","submit",1,"btn","btn-primary","btn-block","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["routerLink","/",1,"btn","btn-outline-secondary","btn-block","ml-2","mt-0"],[1,"header"],[1,"container"],[1,"col-7"],["alt","Bitwarden","src","images/logo-horizontal-white.png",1,"logo","mb-2"],[1,"mt-5"],[4,"ngIf"],[1,"highlight"],["src","images/wired-logo.png","alt","Wired"],[1,"lead","text-center","mb-4"],["type","info","icon","fa-thumb-tack",3,"title"],["type","info",3,"enforcedPolicyOptions"],[1,"form-check"],["type","checkbox","id","acceptPolicies","name","AcceptPolicies",1,"form-check-input",3,"ngModel","ngModelChange"],["for","acceptPolicies",1,"form-check-label","small","text-muted"],["href","https://bitwarden.com/terms/","target","_blank","rel","noopener"],["href","https://bitwarden.com/privacy/","target","_blank","rel","noopener"]],template:function(e,t){if(1&e&&(d.ɵɵelementStart(0,"div",0),d.ɵɵtext(1," "),d.ɵɵtemplate(2,T,13,0,"header",1),d.ɵɵtext(3," "),d.ɵɵelementStart(4,"form",2,3),d.ɵɵlistener("ngSubmit",(function(){return t.submit()})),d.ɵɵtext(6," "),d.ɵɵelementStart(7,"div",4),d.ɵɵtext(8," "),d.ɵɵtemplate(9,U,11,3,"div",5),d.ɵɵtext(10," "),d.ɵɵelementStart(11,"div",6),d.ɵɵtext(12," "),d.ɵɵelementStart(13,"div",7),d.ɵɵtext(14," "),d.ɵɵelementStart(15,"div",6),d.ɵɵtext(16," "),d.ɵɵtemplate(17,j,3,3,"p",8),d.ɵɵtext(18," "),d.ɵɵelementStart(19,"div",9),d.ɵɵtext(20," "),d.ɵɵelementStart(21,"div",10),d.ɵɵtext(22," "),d.ɵɵtemplate(23,V,4,6,"app-callout",11),d.ɵɵtext(24," "),d.ɵɵelementStart(25,"div",12),d.ɵɵtext(26," "),d.ɵɵelementStart(27,"label",13),d.ɵɵtext(28),d.ɵɵpipe(29,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(30," "),d.ɵɵelementStart(31,"input",14),d.ɵɵlistener("ngModelChange",(function(e){return t.email=e})),d.ɵɵelementEnd(),d.ɵɵtext(32," "),d.ɵɵelementStart(33,"small",15),d.ɵɵtext(34),d.ɵɵpipe(35,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(36," "),d.ɵɵelementEnd(),d.ɵɵtext(37," "),d.ɵɵelementStart(38,"div",12),d.ɵɵtext(39," "),d.ɵɵelementStart(40,"label",16),d.ɵɵtext(41),d.ɵɵpipe(42,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(43," "),d.ɵɵelementStart(44,"input",17),d.ɵɵlistener("ngModelChange",(function(e){return t.name=e})),d.ɵɵelementEnd(),d.ɵɵtext(45," "),d.ɵɵelementStart(46,"small",15),d.ɵɵtext(47),d.ɵɵpipe(48,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(49," "),d.ɵɵelementEnd(),d.ɵɵtext(50," "),d.ɵɵelementStart(51,"div",12),d.ɵɵtext(52," "),d.ɵɵtemplate(53,F,2,1,"app-callout",18),d.ɵɵtext(54," "),d.ɵɵelementStart(55,"label",19),d.ɵɵtext(56),d.ɵɵpipe(57,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(58," "),d.ɵɵelementStart(59,"div",20),d.ɵɵtext(60," "),d.ɵɵelementStart(61,"div",21),d.ɵɵtext(62," "),d.ɵɵelementStart(63,"input",22),d.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e}))("input",(function(){return t.updatePasswordStrength()})),d.ɵɵelementEnd(),d.ɵɵtext(64," "),d.ɵɵelementStart(65,"app-password-strength",23),d.ɵɵtext(66," "),d.ɵɵelementEnd(),d.ɵɵtext(67," "),d.ɵɵelementEnd(),d.ɵɵtext(68," "),d.ɵɵelementStart(69,"div"),d.ɵɵtext(70," "),d.ɵɵelementStart(71,"button",24),d.ɵɵlistener("click",(function(){return t.togglePassword(!1)})),d.ɵɵpipe(72,"i18n"),d.ɵɵtext(73," "),d.ɵɵelement(74,"i",25),d.ɵɵtext(75," "),d.ɵɵelementEnd(),d.ɵɵtext(76," "),d.ɵɵelement(77,"div",26),d.ɵɵtext(78," "),d.ɵɵelementEnd(),d.ɵɵtext(79," "),d.ɵɵelementEnd(),d.ɵɵtext(80," "),d.ɵɵelementStart(81,"small",15),d.ɵɵtext(82),d.ɵɵpipe(83,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(84," "),d.ɵɵelementEnd(),d.ɵɵtext(85," "),d.ɵɵelementStart(86,"div",12),d.ɵɵtext(87," "),d.ɵɵelementStart(88,"label",27),d.ɵɵtext(89),d.ɵɵpipe(90,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(91," "),d.ɵɵelementStart(92,"div",20),d.ɵɵtext(93," "),d.ɵɵelementStart(94,"input",28),d.ɵɵlistener("ngModelChange",(function(e){return t.confirmMasterPassword=e})),d.ɵɵelementEnd(),d.ɵɵtext(95," "),d.ɵɵelementStart(96,"button",24),d.ɵɵlistener("click",(function(){return t.togglePassword(!0)})),d.ɵɵpipe(97,"i18n"),d.ɵɵtext(98," "),d.ɵɵelement(99,"i",25),d.ɵɵtext(100," "),d.ɵɵelementEnd(),d.ɵɵtext(101," "),d.ɵɵelementEnd(),d.ɵɵtext(102," "),d.ɵɵelementEnd(),d.ɵɵtext(103," "),d.ɵɵelementStart(104,"div",12),d.ɵɵtext(105," "),d.ɵɵelementStart(106,"label",29),d.ɵɵtext(107),d.ɵɵpipe(108,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(109," "),d.ɵɵelementStart(110,"input",30),d.ɵɵlistener("ngModelChange",(function(e){return t.hint=e})),d.ɵɵelementEnd(),d.ɵɵtext(111," "),d.ɵɵelementStart(112,"small",15),d.ɵɵtext(113),d.ɵɵpipe(114,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(115," "),d.ɵɵelementEnd(),d.ɵɵtext(116," "),d.ɵɵelementStart(117,"div",31),d.ɵɵelement(118,"iframe",32),d.ɵɵelementEnd(),d.ɵɵtext(119," "),d.ɵɵtemplate(120,N,21,10,"div",33),d.ɵɵtext(121," "),d.ɵɵelement(122,"hr"),d.ɵɵtext(123," "),d.ɵɵelementStart(124,"div",34),d.ɵɵtext(125," "),d.ɵɵelementStart(126,"button",35),d.ɵɵtext(127," "),d.ɵɵelementStart(128,"span"),d.ɵɵtext(129),d.ɵɵpipe(130,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(131," "),d.ɵɵelement(132,"i",36),d.ɵɵpipe(133,"i18n"),d.ɵɵtext(134," "),d.ɵɵelementEnd(),d.ɵɵtext(135," "),d.ɵɵelementStart(136,"a",37),d.ɵɵtext(137),d.ɵɵpipe(138,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(139," "),d.ɵɵelementEnd(),d.ɵɵtext(140," "),d.ɵɵelementEnd(),d.ɵɵtext(141," "),d.ɵɵelementEnd(),d.ɵɵtext(142," "),d.ɵɵelementEnd(),d.ɵɵtext(143," "),d.ɵɵelementEnd(),d.ɵɵtext(144," "),d.ɵɵelementEnd(),d.ɵɵtext(145," "),d.ɵɵelementEnd(),d.ɵɵtext(146," "),d.ɵɵelementEnd(),d.ɵɵtext(147," "),d.ɵɵelementEnd(),d.ɵɵtext(148," ")),2&e){var n=d.ɵɵreference(5);d.ɵɵproperty("ngClass",d.ɵɵpureFunction1(67,z,t.layout)),d.ɵɵadvance(2),d.ɵɵproperty("ngIf","enterprise2"===t.layout),d.ɵɵadvance(2),d.ɵɵproperty("appApiAction",t.formPromise),d.ɵɵadvance(5),d.ɵɵproperty("ngIf",t.layout),d.ɵɵadvance(2),d.ɵɵproperty("ngClass",d.ɵɵpureFunction2(69,L,t.layout,!t.layout)),d.ɵɵadvance(4),d.ɵɵproperty("ngClass",d.ɵɵpureFunction2(72,L,!t.layout,t.layout)),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",!t.layout),d.ɵɵadvance(6),d.ɵɵproperty("ngIf",t.showCreateOrgMessage),d.ɵɵadvance(5),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(29,39,"emailAddress")),d.ɵɵadvance(3),d.ɵɵproperty("ngModel",t.email)("appAutofocus",""===t.email),d.ɵɵadvance(3),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(35,41,"emailAddressDesc")),d.ɵɵadvance(7),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(42,43,"yourName")),d.ɵɵadvance(3),d.ɵɵproperty("ngModel",t.name)("appAutofocus",""!==t.email),d.ɵɵadvance(3),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(48,45,"yourNameDesc")),d.ɵɵadvance(6),d.ɵɵproperty("ngIf",t.enforcedPolicyOptions),d.ɵɵadvance(3),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(57,47,"masterPass")),d.ɵɵadvance(7),d.ɵɵpropertyInterpolate("type",t.showPassword?"text":"password"),d.ɵɵproperty("ngModel",t.masterPassword),d.ɵɵadvance(2),d.ɵɵproperty("score",t.masterPasswordScore)("showText",!0),d.ɵɵadvance(6),d.ɵɵpropertyInterpolate("appA11yTitle",d.ɵɵpipeBind1(72,49,"toggleVisibility")),d.ɵɵadvance(3),d.ɵɵproperty("ngClass",d.ɵɵpureFunction2(75,K,!t.showPassword,t.showPassword)),d.ɵɵadvance(8),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(83,51,"masterPassDesc")),d.ɵɵadvance(7),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(90,53,"reTypeMasterPass")),d.ɵɵadvance(5),d.ɵɵpropertyInterpolate("type",t.showPassword?"text":"password"),d.ɵɵproperty("ngModel",t.confirmMasterPassword),d.ɵɵadvance(2),d.ɵɵpropertyInterpolate("appA11yTitle",d.ɵɵpipeBind1(97,55,"toggleVisibility")),d.ɵɵadvance(3),d.ɵɵproperty("ngClass",d.ɵɵpureFunction2(78,K,!t.showPassword,t.showPassword)),d.ɵɵadvance(8),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(108,57,"masterPassHint")),d.ɵɵadvance(3),d.ɵɵproperty("ngModel",t.hint),d.ɵɵadvance(3),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(114,59,"masterPassHintDesc")),d.ɵɵadvance(4),d.ɵɵproperty("hidden",!t.showCaptcha()),d.ɵɵadvance(3),d.ɵɵproperty("ngIf",t.showTerms),d.ɵɵadvance(6),d.ɵɵproperty("disabled",n.loading),d.ɵɵadvance(3),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(130,61,"submit")),d.ɵɵadvance(3),d.ɵɵpropertyInterpolate("title",d.ɵɵpipeBind1(133,63,"loading")),d.ɵɵadvance(5),d.ɵɵtextInterpolate1(" ",d.ɵɵpipeBind1(138,65,"cancel")," ")}},directives:[C.NgClass,C.NgIf,I.NgControlStatusGroup,I.NgForm,E.ApiActionDirective,I.DefaultValueAccessor,I.RequiredValidator,P.InputVerbatimDirective,I.NgControlStatus,I.NgModel,k.AutofocusDirective,_.PasswordStrengthComponent,A.A11yTitleDirective,f.RouterLinkWithHref,O.CalloutComponent,I.CheckboxControlValueAccessor],pipes:[M.I18nPipe],encapsulation:2}),t}(l.RegisterComponent);t.RegisterComponent=G,("undefined"==typeof ngDevMode||ngDevMode)&&d.ɵsetClassMetadata(G,[{type:s.Component,args:[{selector:"app-register",templateUrl:"register.component.html"}]}],(function(){return[{type:m.AuthService},{type:f.Router},{type:h.I18nService},{type:v.CryptoService},{type:y.ApiService},{type:f.ActivatedRoute},{type:g.StateService},{type:x.PlatformUtilsService},{type:b.PasswordGenerationService},{type:S.PolicyService},{type:w.EnvironmentService}]}),null)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.SetPasswordComponent=void 0;var o=n(0),a=(n(7),n(4),n(15),n(1),n(16),n(29),n(3),n(26),n(42),n(6),n(1019)),s=n(0),l=n(4),c=n(1),p=n(15),u=n(16),d=n(6),m=n(29),f=n(3),h=n(26),v=n(7),y=n(42),g=n(11),x=n(19),b=n(2),S=n(21),w=n(45),C=n(199),I=n(17),E=n(8);function P(e,t){1&e&&(s.ɵɵelementStart(0,"div",8),s.ɵɵtext(1," "),s.ɵɵelement(2,"i",9),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4),s.ɵɵpipe(5,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"loading")),s.ɵɵadvance(2),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(5,4,"loading")," "))}function k(e,t){1&e&&(s.ɵɵelementStart(0,"app-callout",30),s.ɵɵpipe(1,"i18n"),s.ɵɵtext(2),s.ɵɵpipe(3,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(1,2,"resetPasswordPolicyAutoEnroll")),s.ɵɵadvance(2),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(3,4,"resetPasswordAutoEnrollInviteWarning")," "))}function _(e,t){if(1&e&&(s.ɵɵelementStart(0,"app-callout",31),s.ɵɵtext(1," "),s.ɵɵelementEnd()),2&e){var n=s.ɵɵnextContext(2);s.ɵɵproperty("enforcedPolicyOptions",n.enforcedPolicyOptions)}}var A=function(e,t){return{"fa-eye":e,"fa-eye-slash":t}};function O(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",10),s.ɵɵtext(1," "),s.ɵɵelementStart(2,"app-callout",11),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5," "),s.ɵɵtemplate(6,k,4,6,"app-callout",12),s.ɵɵtext(7," "),s.ɵɵelementStart(8,"div",13),s.ɵɵtext(9," "),s.ɵɵtemplate(10,_,2,1,"app-callout",14),s.ɵɵtext(11," "),s.ɵɵelementStart(12,"label",15),s.ɵɵtext(13),s.ɵɵpipe(14,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(15," "),s.ɵɵelementStart(16,"div",16),s.ɵɵtext(17," "),s.ɵɵelementStart(18,"div",17),s.ɵɵtext(19," "),s.ɵɵelementStart(20,"input",18),s.ɵɵlistener("ngModelChange",(function(e){return s.ɵɵrestoreView(n),s.ɵɵnextContext().masterPassword=e}))("input",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext().updatePasswordStrength()})),s.ɵɵelementEnd(),s.ɵɵtext(21," "),s.ɵɵelementStart(22,"app-password-strength",19),s.ɵɵtext(23," "),s.ɵɵelementEnd(),s.ɵɵtext(24," "),s.ɵɵelementEnd(),s.ɵɵtext(25," "),s.ɵɵelementStart(26,"div"),s.ɵɵtext(27," "),s.ɵɵelementStart(28,"button",20),s.ɵɵlistener("click",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext().togglePassword(!1)})),s.ɵɵpipe(29,"i18n"),s.ɵɵtext(30," "),s.ɵɵelement(31,"i",21),s.ɵɵtext(32," "),s.ɵɵelementEnd(),s.ɵɵtext(33," "),s.ɵɵelement(34,"div",22),s.ɵɵtext(35," "),s.ɵɵelementEnd(),s.ɵɵtext(36," "),s.ɵɵelementEnd(),s.ɵɵtext(37," "),s.ɵɵelementStart(38,"small",23),s.ɵɵtext(39),s.ɵɵpipe(40,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(41," "),s.ɵɵelementEnd(),s.ɵɵtext(42," "),s.ɵɵelementStart(43,"div",13),s.ɵɵtext(44," "),s.ɵɵelementStart(45,"label",24),s.ɵɵtext(46),s.ɵɵpipe(47,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(48," "),s.ɵɵelementStart(49,"div",16),s.ɵɵtext(50," "),s.ɵɵelementStart(51,"input",25),s.ɵɵlistener("ngModelChange",(function(e){return s.ɵɵrestoreView(n),s.ɵɵnextContext().masterPasswordRetype=e})),s.ɵɵelementEnd(),s.ɵɵtext(52," "),s.ɵɵelementStart(53,"button",20),s.ɵɵlistener("click",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext().togglePassword(!0)})),s.ɵɵpipe(54,"i18n"),s.ɵɵtext(55," "),s.ɵɵelement(56,"i",21),s.ɵɵtext(57," "),s.ɵɵelementEnd(),s.ɵɵtext(58," "),s.ɵɵelementEnd(),s.ɵɵtext(59," "),s.ɵɵelementEnd(),s.ɵɵtext(60," "),s.ɵɵelementStart(61,"div",13),s.ɵɵtext(62," "),s.ɵɵelementStart(63,"label",26),s.ɵɵtext(64),s.ɵɵpipe(65,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(66," "),s.ɵɵelementStart(67,"input",27),s.ɵɵlistener("ngModelChange",(function(e){return s.ɵɵrestoreView(n),s.ɵɵnextContext().hint=e})),s.ɵɵelementEnd(),s.ɵɵtext(68," "),s.ɵɵelementStart(69,"small",23),s.ɵɵtext(70),s.ɵɵpipe(71,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(72," "),s.ɵɵelementEnd(),s.ɵɵtext(73," "),s.ɵɵelement(74,"hr"),s.ɵɵtext(75," "),s.ɵɵelementStart(76,"div",16),s.ɵɵtext(77," "),s.ɵɵelementStart(78,"button",28),s.ɵɵtext(79," "),s.ɵɵelement(80,"i",9),s.ɵɵpipe(81,"i18n"),s.ɵɵtext(82," "),s.ɵɵelementStart(83,"span"),s.ɵɵtext(84),s.ɵɵpipe(85,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(86," "),s.ɵɵelementEnd(),s.ɵɵtext(87," "),s.ɵɵelementStart(88,"button",29),s.ɵɵlistener("click",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext().logOut()})),s.ɵɵtext(89),s.ɵɵpipe(90,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(91," "),s.ɵɵelementEnd(),s.ɵɵtext(92," "),s.ɵɵelementEnd()}if(2&e){var r=s.ɵɵnextContext(),i=s.ɵɵreference(1);s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(4,23,"ssoCompleteRegistration")),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",r.resetPasswordAutoEnroll),s.ɵɵadvance(4),s.ɵɵproperty("ngIf",r.enforcedPolicyOptions),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(14,25,"masterPass")),s.ɵɵadvance(7),s.ɵɵpropertyInterpolate("type",r.showPassword?"text":"password"),s.ɵɵproperty("ngModel",r.masterPassword),s.ɵɵadvance(2),s.ɵɵproperty("score",r.masterPasswordScore)("showText",!0),s.ɵɵadvance(6),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(29,27,"toggleVisibility")),s.ɵɵadvance(3),s.ɵɵproperty("ngClass",s.ɵɵpureFunction2(45,A,!r.showPassword,r.showPassword)),s.ɵɵadvance(8),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(40,29,"masterPassDesc")),s.ɵɵadvance(7),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(47,31,"reTypeMasterPass")),s.ɵɵadvance(5),s.ɵɵpropertyInterpolate("type",r.showPassword?"text":"password"),s.ɵɵproperty("ngModel",r.masterPasswordRetype),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(54,33,"toggleVisibility")),s.ɵɵadvance(3),s.ɵɵproperty("ngClass",s.ɵɵpureFunction2(48,A,!r.showPassword,r.showPassword)),s.ɵɵadvance(8),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(65,35,"masterPassHint")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",r.hint),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(71,37,"masterPassHintDesc")),s.ɵɵadvance(8),s.ɵɵproperty("disabled",i.loading),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(81,39,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(85,41,"submit")),s.ɵɵadvance(5),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(90,43,"logOut")," ")}}var M=function(e){function t(t,n,r,i,o,a,s,l,c,p,u){return e.call(this,n,r,i,o,a,s,l,c,t,p,u)||this}return i(t,e),t.ɵfac=function(e){return new(e||t)(s.ɵɵdirectiveInject(l.ApiService),s.ɵɵdirectiveInject(c.I18nService),s.ɵɵdirectiveInject(p.CryptoService),s.ɵɵdirectiveInject(u.MessagingService),s.ɵɵdirectiveInject(d.UserService),s.ɵɵdirectiveInject(m.PasswordGenerationService),s.ɵɵdirectiveInject(f.PlatformUtilsService),s.ɵɵdirectiveInject(h.PolicyService),s.ɵɵdirectiveInject(v.Router),s.ɵɵdirectiveInject(y.SyncService),s.ɵɵdirectiveInject(v.ActivatedRoute))},t.ɵcmp=s.ɵɵdefineComponent({type:t,selectors:[["app-set-password"]],features:[s.ɵɵInheritDefinitionFeature],decls:21,vars:6,consts:[["ngNativeValidate","","autocomplete","off",3,"appApiAction","ngSubmit"],["form",""],[1,"row","justify-content-md-center","mt-5"],[1,"col-5"],[1,"lead","text-center","mb-4"],[1,"card","d-block"],["class","card-body text-center",4,"ngIf"],["class","card-body",4,"ngIf"],[1,"card-body","text-center"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],[1,"card-body"],["type","info"],["type","warning",3,"title",4,"ngIf"],[1,"form-group"],["type","info",3,"enforcedPolicyOptions",4,"ngIf"],["for","masterPassword"],[1,"d-flex"],[1,"w-100"],["id","masterPassword","name","MasterPasswordHash","required","","appInputVerbatim","",1,"text-monospace","form-control","mb-1",3,"type","ngModel","ngModelChange","input"],[3,"score","showText"],["type","button",1,"ml-1","btn","btn-link",3,"appA11yTitle","click"],["aria-hidden","true",1,"fa","fa-lg",3,"ngClass"],[1,"progress-bar","invisible"],[1,"form-text","text-muted"],["for","masterPasswordRetype"],["id","masterPasswordRetype","name","MasterPasswordRetype","required","","appInputVerbatim","",1,"text-monospace","form-control",3,"type","ngModel","ngModelChange"],["for","hint"],["id","hint","type","text","name","Hint",1,"form-control",3,"ngModel","ngModelChange"],["type","submit",1,"btn","btn-primary","btn-block","btn-submit",3,"disabled"],["type","button",1,"btn","btn-outline-secondary","btn-block","ml-2","mt-0",3,"click"],["type","warning",3,"title"],["type","info",3,"enforcedPolicyOptions"]],template:function(e,t){1&e&&(s.ɵɵelementStart(0,"form",0,1),s.ɵɵlistener("ngSubmit",(function(){return t.submit()})),s.ɵɵtext(2," "),s.ɵɵelementStart(3,"div",2),s.ɵɵtext(4," "),s.ɵɵelementStart(5,"div",3),s.ɵɵtext(6," "),s.ɵɵelementStart(7,"p",4),s.ɵɵtext(8),s.ɵɵpipe(9,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(10," "),s.ɵɵelementStart(11,"div",5),s.ɵɵtext(12," "),s.ɵɵtemplate(13,P,6,6,"div",6),s.ɵɵtext(14," "),s.ɵɵtemplate(15,O,93,51,"div",7),s.ɵɵtext(16," "),s.ɵɵelementEnd(),s.ɵɵtext(17," "),s.ɵɵelementEnd(),s.ɵɵtext(18," "),s.ɵɵelementEnd(),s.ɵɵtext(19," "),s.ɵɵelementEnd(),s.ɵɵtext(20," ")),2&e&&(s.ɵɵproperty("appApiAction",t.formPromise),s.ɵɵadvance(8),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(9,4,"setMasterPassword")),s.ɵɵadvance(5),s.ɵɵproperty("ngIf",t.syncLoading),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!t.syncLoading))},directives:[g.NgControlStatusGroup,g.NgForm,x.ApiActionDirective,b.NgIf,S.CalloutComponent,g.DefaultValueAccessor,g.RequiredValidator,w.InputVerbatimDirective,g.NgControlStatus,g.NgModel,C.PasswordStrengthComponent,I.A11yTitleDirective,b.NgClass],pipes:[E.I18nPipe],encapsulation:2}),t}(a.SetPasswordComponent);t.SetPasswordComponent=M,("undefined"==typeof ngDevMode||ngDevMode)&&s.ɵsetClassMetadata(M,[{type:o.Component,args:[{selector:"app-set-password",templateUrl:"set-password.component.html"}]}],(function(){return[{type:l.ApiService},{type:c.I18nService},{type:p.CryptoService},{type:u.MessagingService},{type:d.UserService},{type:m.PasswordGenerationService},{type:f.PlatformUtilsService},{type:h.PolicyService},{type:v.Router},{type:y.SyncService},{type:v.ActivatedRoute}]}),null)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]1?t[1]:null},e.prototype.checkState=function(e,t){if(null==e)return!1;if(null==t)return!1;var n=e.split("_identifier="),r=t.split("_identifier=");return n[0]===r[0]},e.ɵfac=function(t){return new(t||e)(l.ɵɵdirectiveInject(c.AuthService),l.ɵɵdirectiveInject(p.Router),l.ɵɵdirectiveInject(u.I18nService),l.ɵɵdirectiveInject(p.ActivatedRoute),l.ɵɵdirectiveInject(d.StorageService),l.ɵɵdirectiveInject(m.StateService),l.ɵɵdirectiveInject(f.PlatformUtilsService),l.ɵɵdirectiveInject(h.ApiService),l.ɵɵdirectiveInject(v.CryptoFunctionService),l.ɵɵdirectiveInject(y.EnvironmentService),l.ɵɵdirectiveInject(g.PasswordGenerationService))},e.ɵdir=l.ɵɵdefineDirective({type:e}),e}();t.SsoComponent=x,("undefined"==typeof ngDevMode||ngDevMode)&&l.ɵsetClassMetadata(x,[{type:o.Directive}],(function(){return[{type:c.AuthService},{type:p.Router},{type:u.I18nService},{type:p.ActivatedRoute},{type:d.StorageService},{type:m.StateService},{type:f.PlatformUtilsService},{type:h.ApiService},{type:v.CryptoFunctionService},{type:y.EnvironmentService},{type:g.PasswordGenerationService}]}),null)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorOptionsComponent=void 0;var o=n(0),a=(n(7),n(62),n(1),n(3),n(1021)),s=n(0),l=n(62),c=n(7),p=n(1),u=n(3),d=n(17),m=n(2),f=n(36),h=n(8);function v(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"a",10),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(n);var e=t.$implicit;return s.ɵɵnextContext().choose(e)})),s.ɵɵtext(1," "),s.ɵɵelement(2,"img",13),s.ɵɵtext(3," "),s.ɵɵelementStart(4,"h3"),s.ɵɵtext(5),s.ɵɵelementEnd(),s.ɵɵtext(6),s.ɵɵelementEnd()}if(2&e){var r=t.$implicit;s.ɵɵadvance(2),s.ɵɵproperty("src","images/two-factor/"+r.type+".png",s.ɵɵsanitizeUrl),s.ɵɵadvance(3),s.ɵɵtextInterpolate(r.name),s.ɵɵadvance(1),s.ɵɵtextInterpolate1(" ",r.description," ")}}var y=function(e){function t(t,n,r,i){return e.call(this,t,n,r,i,window)||this}return i(t,e),t.ɵfac=function(e){return new(e||t)(s.ɵɵdirectiveInject(l.AuthService),s.ɵɵdirectiveInject(c.Router),s.ɵɵdirectiveInject(p.I18nService),s.ɵɵdirectiveInject(u.PlatformUtilsService))},t.ɵcmp=s.ɵɵdefineComponent({type:t,selectors:[["app-two-factor-options"]],features:[s.ɵɵInheritDefinitionFeature],decls:46,vars:16,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","twoStepOptionsTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable"],[1,"modal-content"],[1,"modal-header"],["id","twoStepOptionsTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],[1,"list-group","list-group-flush"],["href","#","appStopClick","","class","list-group-item list-group-item-action",3,"click",4,"ngFor","ngForOf"],["href","#","appStopClick","",1,"list-group-item","list-group-item-action",3,"click"],[1,"modal-footer"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],["alt","",1,"pull-right",3,"src"]],template:function(e,t){1&e&&(s.ɵɵelementStart(0,"div",0),s.ɵɵtext(1," "),s.ɵɵelementStart(2,"div",1),s.ɵɵtext(3," "),s.ɵɵelementStart(4,"div",2),s.ɵɵtext(5," "),s.ɵɵelementStart(6,"div",3),s.ɵɵtext(7," "),s.ɵɵelementStart(8,"h2",4),s.ɵɵtext(9),s.ɵɵpipe(10,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(11," "),s.ɵɵelementStart(12,"button",5),s.ɵɵpipe(13,"i18n"),s.ɵɵtext(14," "),s.ɵɵelementStart(15,"span",6),s.ɵɵtext(16,"×"),s.ɵɵelementEnd(),s.ɵɵtext(17," "),s.ɵɵelementEnd(),s.ɵɵtext(18," "),s.ɵɵelementEnd(),s.ɵɵtext(19," "),s.ɵɵelementStart(20,"div",7),s.ɵɵtext(21," "),s.ɵɵelementStart(22,"div",8),s.ɵɵtext(23," "),s.ɵɵtemplate(24,v,7,3,"a",9),s.ɵɵtext(25," "),s.ɵɵelementStart(26,"a",10),s.ɵɵlistener("click",(function(){return t.recover()})),s.ɵɵtext(27," "),s.ɵɵelementStart(28,"h3"),s.ɵɵtext(29),s.ɵɵpipe(30,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(31),s.ɵɵpipe(32,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(33," "),s.ɵɵelementEnd(),s.ɵɵtext(34," "),s.ɵɵelementEnd(),s.ɵɵtext(35," "),s.ɵɵelementStart(36,"div",11),s.ɵɵtext(37," "),s.ɵɵelementStart(38,"button",12),s.ɵɵtext(39),s.ɵɵpipe(40,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(41," "),s.ɵɵelementEnd(),s.ɵɵtext(42," "),s.ɵɵelementEnd(),s.ɵɵtext(43," "),s.ɵɵelementEnd(),s.ɵɵtext(44," "),s.ɵɵelementEnd(),s.ɵɵtext(45," ")),2&e&&(s.ɵɵadvance(9),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(10,6,"twoStepOptions")),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(13,8,"close")),s.ɵɵadvance(12),s.ɵɵproperty("ngForOf",t.providers),s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(30,10,"recoveryCodeTitle")),s.ɵɵadvance(2),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(32,12,"recoveryCodeDesc")," "),s.ɵɵadvance(8),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(40,14,"close")))},directives:[d.A11yTitleDirective,m.NgForOf,f.StopClickDirective],pipes:[h.I18nPipe],encapsulation:2}),t}(a.TwoFactorOptionsComponent);t.TwoFactorOptionsComponent=y,("undefined"==typeof ngDevMode||ngDevMode)&&s.ɵsetClassMetadata(y,[{type:o.Component,args:[{selector:"app-two-factor-options",templateUrl:"two-factor-options.component.html"}]}],(function(){return[{type:l.AuthService},{type:c.Router},{type:p.I18nService},{type:u.PlatformUtilsService}]}),null)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&r.groups.forEach((function(e){var t=s.groups.filter((function(t){return!t.accessAll&&t.id===e.id}));null!=t&&t.length>0&&(t[0].checked=!0,t[0].readOnly=e.readOnly,t[0].hidePasswords=e.hidePasswords)})),[3,9];case 8:return i.sent(),[3,9];case 9:return[3,11];case 10:this.title=this.i18nService.t("addCollection"),i.label=11;case 11:return this.groups.forEach((function(e){e.accessAll&&(e.checked=!0)})),this.loading=!1,[2]}}))}))},e.prototype.check=function(e,t){e.accessAll||(e.checked=null==t?!e.checked:t,e.checked||(e.readOnly=!1,e.hidePasswords=!1))},e.prototype.selectAll=function(e){var t=this;this.groups.forEach((function(n){return t.check(n,e)}))},e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:if(null==this.orgKey)throw new Error("No encryption key for this organization.");return e=new s.CollectionRequest,t=e,[4,this.cryptoService.encrypt(this.name,this.orgKey)];case 1:t.name=n.sent().encryptedString,e.externalId=this.externalId,e.groups=this.groups.filter((function(e){return e.checked&&!e.accessAll})).map((function(e){return new l.SelectionReadOnlyRequest(e.id,!!e.readOnly,!!e.hidePasswords)})),n.label=2;case 2:return n.trys.push([2,4,,5]),this.editMode?this.formPromise=this.apiService.putCollection(this.organizationId,this.collectionId,e):this.formPromise=this.apiService.postCollection(this.organizationId,e),[4,this.formPromise];case 3:return n.sent(),this.toasterService.popAsync("success",null,this.i18nService.t(this.editMode?"editedCollectionId":"createdCollectionId",this.name)),this.onSavedCollection.emit(),[3,5];case 4:return n.sent(),[3,5];case 5:return[2]}}))}))},e.prototype.delete=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.editMode?[4,this.platformUtilsService.showDialog(this.i18nService.t("deleteCollectionConfirmation"),this.name,this.i18nService.t("yes"),this.i18nService.t("no"),"warning")]:[2];case 1:if(!e.sent())return[2,!1];e.label=2;case 2:return e.trys.push([2,4,,5]),this.deletePromise=this.apiService.deleteCollection(this.organizationId,this.collectionId),[4,this.deletePromise];case 3:return e.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("deletedCollectionId",this.name)),this.onDeletedCollection.emit(),[3,5];case 4:return e.sent(),[3,5];case 5:return[2]}}))}))},e.ɵfac=function(t){return new(t||e)(p.ɵɵdirectiveInject(u.ApiService),p.ɵɵdirectiveInject(d.I18nService),p.ɵɵdirectiveInject(m.ToasterService),p.ɵɵdirectiveInject(f.PlatformUtilsService),p.ɵɵdirectiveInject(h.CryptoService),p.ɵɵdirectiveInject(v.UserService))},e.ɵcmp=p.ɵɵdefineComponent({type:e,selectors:[["app-collection-add-edit"]],inputs:{collectionId:"collectionId",organizationId:"organizationId",canSave:"canSave",canDelete:"canDelete"},outputs:{onSavedCollection:"onSavedCollection",onDeletedCollection:"onDeletedCollection"},decls:38,vars:12,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","collectionAddEditTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","collectionAddEditTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["type","submit","class","btn btn-primary btn-submit",3,"disabled",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],["class","ml-auto",4,"ngIf"],[1,"modal-body"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],[1,"form-group"],["for","name"],["id","name","type","text","name","Name","required","","appAutofocus","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","externalId"],["id","externalId","type","text","name","ExternalId",1,"form-control",3,"ngModel","disabled","ngModelChange"],[1,"form-text","text-muted"],[4,"ngIf"],[1,"mt-4","d-flex","mb-0"],["class","table table-hover table-list mb-0",4,"ngIf"],[1,"ml-auto"],["type","button",1,"btn","btn-link","btn-sm","py-0",3,"click"],[1,"table","table-hover","table-list","mb-0"],["width","100",1,"text-center"],[4,"ngFor","ngForOf"],[1,"table-list-checkbox",3,"click"],["type","checkbox","appStopProp","",3,"ngModel","name","disabled","ngModelChange"],[3,"click"],[1,"text-center"],["type","checkbox",3,"ngModel","name","disabled","ngModelChange"],["aria-hidden","true",1,"fa","fa-th","text-muted","fa-fw",3,"title"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","button","class","btn btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click",4,"ngIf"],["type","button",1,"btn","btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click"],["deleteBtn",""],["aria-hidden","true",1,"fa","fa-trash-o","fa-lg","fa-fw",3,"hidden"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","fa-lg","fa-fw",3,"hidden","title"]],template:function(e,t){1&e&&(p.ɵɵelementStart(0,"div",0),p.ɵɵtext(1," "),p.ɵɵelementStart(2,"div",1),p.ɵɵtext(3," "),p.ɵɵelementStart(4,"form",2,3),p.ɵɵlistener("ngSubmit",(function(){return t.submit()})),p.ɵɵtext(6," "),p.ɵɵelementStart(7,"div",4),p.ɵɵtext(8," "),p.ɵɵelementStart(9,"h2",5),p.ɵɵtext(10),p.ɵɵelementEnd(),p.ɵɵtext(11," "),p.ɵɵelementStart(12,"button",6),p.ɵɵpipe(13,"i18n"),p.ɵɵtext(14," "),p.ɵɵelementStart(15,"span",7),p.ɵɵtext(16,"×"),p.ɵɵelementEnd(),p.ɵɵtext(17," "),p.ɵɵelementEnd(),p.ɵɵtext(18," "),p.ɵɵelementEnd(),p.ɵɵtext(19," "),p.ɵɵtemplate(20,I,9,6,"div",8),p.ɵɵtext(21," "),p.ɵɵtemplate(22,M,26,14,"div",8),p.ɵɵtext(23," "),p.ɵɵelementStart(24,"div",9),p.ɵɵtext(25," "),p.ɵɵtemplate(26,T,9,7,"button",10),p.ɵɵtext(27," "),p.ɵɵelementStart(28,"button",11),p.ɵɵtext(29),p.ɵɵpipe(30,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(31," "),p.ɵɵtemplate(32,R,4,1,"div",12),p.ɵɵtext(33," "),p.ɵɵelementEnd(),p.ɵɵtext(34," "),p.ɵɵelementEnd(),p.ɵɵtext(35," "),p.ɵɵelementEnd(),p.ɵɵtext(36," "),p.ɵɵelementEnd(),p.ɵɵtext(37," ")),2&e&&(p.ɵɵadvance(4),p.ɵɵproperty("appApiAction",t.formPromise),p.ɵɵadvance(6),p.ɵɵtextInterpolate(t.title),p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("appA11yTitle",p.ɵɵpipeBind1(13,8,"close")),p.ɵɵadvance(8),p.ɵɵproperty("ngIf",t.loading),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",!t.loading),p.ɵɵadvance(4),p.ɵɵproperty("ngIf",t.canSave),p.ɵɵadvance(3),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(30,10,"cancel")),p.ɵɵadvance(3),p.ɵɵproperty("ngIf",t.canDelete))},directives:[y.NgControlStatusGroup,y.NgForm,g.ApiActionDirective,x.A11yTitleDirective,b.NgIf,y.DefaultValueAccessor,y.RequiredValidator,S.AutofocusDirective,y.NgControlStatus,y.NgModel,b.NgForOf,y.CheckboxControlValueAccessor,w.StopPropDirective],pipes:[C.I18nPipe],encapsulation:2}),e}();t.CollectionAddEditComponent=B,("undefined"==typeof ngDevMode||ngDevMode)&&p.ɵsetClassMetadata(B,[{type:o.Component,args:[{selector:"app-collection-add-edit",templateUrl:"collection-add-edit.component.html"}]}],(function(){return[{type:u.ApiService},{type:d.I18nService},{type:m.ToasterService},{type:f.PlatformUtilsService},{type:h.CryptoService},{type:v.UserService}]}),{collectionId:[{type:o.Input}],organizationId:[{type:o.Input}],canSave:[{type:o.Input}],canDelete:[{type:o.Input}],onSavedCollection:[{type:o.Output}],onDeletedCollection:[{type:o.Output}]})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionRequest=void 0;var r=function(e){this.groups=[],null!=e&&(this.name=e.name?e.name.encryptedString:null,this.externalId=e.externalId)};t.CollectionRequest=r},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]this.pageSize&&(t=this.pagedCollectionsCount),this.collections.length>e&&(this.pagedCollections=this.pagedCollections.concat(this.collections.slice(e,e+t))),this.pagedCollectionsCount=this.pagedCollections.length,this.didScroll=this.pagedCollections.length>this.pageSize}},e.prototype.edit=function(e){return r(this,void 0,void 0,(function(){var t,n,r,o,a=this;return i(this,(function(i){switch(i.label){case 0:return t=null==e&&this.canCreate,n=null!=e&&this.canEdit(e),r=null!=e&&this.canDelete(e),t||n||r?[4,this.modalService.openViewRef(l.CollectionAddEditComponent,this.addEditModalRef,(function(i){i.organizationId=a.organizationId,i.collectionId=null!=e?e.id:null,i.canSave=t||n,i.canDelete=r,i.onSavedCollection.subscribe((function(){o.close(),a.load()})),i.onDeletedCollection.subscribe((function(){o.close(),a.removeCollection(e)}))}))]:(this.toasterService.popAsync("error",null,this.i18nService.t("missingPermissions")),[2]);case 1:return o=i.sent()[0],[2]}}))}))},e.prototype.add=function(){this.edit(null)},e.prototype.delete=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.platformUtilsService.showDialog(this.i18nService.t("deleteCollectionConfirmation"),e.name,this.i18nService.t("yes"),this.i18nService.t("no"),"warning")];case 1:if(!t.sent())return[2,!1];t.label=2;case 2:return t.trys.push([2,4,,5]),[4,this.apiService.deleteCollection(this.organizationId,e.id)];case 3:return t.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("deletedCollectionId",e.name)),this.removeCollection(e),[3,5];case 4:return t.sent(),this.toasterService.popAsync("error",null,this.i18nService.t("missingPermissions")),[3,5];case 5:return[2]}}))}))},e.prototype.users=function(e){return r(this,void 0,void 0,(function(){var t,n=this;return i(this,(function(r){switch(r.label){case 0:return[4,this.modalService.openViewRef(c.EntityUsersComponent,this.usersModalRef,(function(r){r.organizationId=n.organizationId,r.entity="collection",r.entityId=e.id,r.entityName=e.name,r.onEditedUsers.subscribe((function(){n.load(),t.close()}))}))];case 1:return t=r.sent()[0],[2]}}))}))},e.prototype.resetPaging=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){return this.pagedCollections=[],this.loadMore(),[2]}))}))},e.prototype.isSearching=function(){return this.searchService.isSearchable(this.searchText)},e.prototype.isPaging=function(){var e=this.isSearching();return e&&this.didScroll&&this.resetPaging(),!e&&this.collections&&this.collections.length>this.pageSize},e.prototype.canEdit=function(e){return!!this.organization.canEditAnyCollection||!(!this.organization.canEditAssignedCollections||!this.assignedCollections.some((function(t){return t.id===e.id})))},e.prototype.canDelete=function(e){return!!this.organization.canDeleteAnyCollection||!(!this.organization.canDeleteAssignedCollections||!this.assignedCollections.some((function(t){return t.id===e.id})))},e.prototype.removeCollection=function(e){var t=this.collections.indexOf(e);t>-1&&(this.collections.splice(t,1),this.resetPaging())},e.ɵfac=function(t){return new(t||e)(p.ɵɵdirectiveInject(u.ApiService),p.ɵɵdirectiveInject(d.ActivatedRoute),p.ɵɵdirectiveInject(m.CollectionService),p.ɵɵdirectiveInject(f.ModalService),p.ɵɵdirectiveInject(h.ToasterService),p.ɵɵdirectiveInject(v.I18nService),p.ɵɵdirectiveInject(y.PlatformUtilsService),p.ɵɵdirectiveInject(g.UserService),p.ɵɵdirectiveInject(x.SearchService))},e.ɵcmp=p.ɵɵdefineComponent({type:e,selectors:[["app-org-manage-collections"]],viewQuery:function(e,t){if(1&e&&(p.ɵɵviewQuery(k,3,o.ViewContainerRef),p.ɵɵviewQuery(_,3,o.ViewContainerRef)),2&e){var n=void 0;p.ɵɵqueryRefresh(n=p.ɵɵloadQuery())&&(t.addEditModalRef=n.first),p.ɵɵqueryRefresh(n=p.ɵɵloadQuery())&&(t.usersModalRef=n.first)}},decls:33,vars:18,consts:[[1,"page-header","d-flex"],[1,"ml-auto","d-flex"],["for","search",1,"sr-only"],["type","search","id","search",1,"form-control","form-control-sm",3,"placeholder","ngModel","ngModelChange"],["type","button","class","btn btn-sm btn-outline-primary ml-3",3,"click",4,"ngIf"],[4,"ngIf"],["addEdit",""],["usersTemplate",""],["type","button",1,"btn","btn-sm","btn-outline-primary","ml-3",3,"click"],["aria-hidden","true",1,"fa","fa-plus","fa-fw"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],["class","table table-hover table-list","infiniteScroll","",3,"infiniteScrollDistance","infiniteScrollDisabled","scrolled",4,"ngIf"],["infiniteScroll","",1,"table","table-hover","table-list",3,"infiniteScrollDistance","infiniteScrollDisabled","scrolled"],[4,"ngFor","ngForOf"],["href","#","appStopClick","",3,"click"],[1,"table-list-options"],["class","dropdown","appListDropdown","",4,"ngIf"],["appListDropdown","",1,"dropdown"],["type","button","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",1,"btn","btn-outline-secondary","dropdown-toggle",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-cog","fa-lg"],[1,"dropdown-menu","dropdown-menu-right"],["class","dropdown-item","href","#","appStopClick","",3,"click",4,"ngIf"],["class","dropdown-item text-danger","href","#","appStopClick","",3,"click",4,"ngIf"],["href","#","appStopClick","",1,"dropdown-item",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-users"],["href","#","appStopClick","",1,"dropdown-item","text-danger",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-trash-o"]],template:function(e,t){1&e&&(p.ɵɵelementStart(0,"div",0),p.ɵɵtext(1," "),p.ɵɵelementStart(2,"h1"),p.ɵɵtext(3),p.ɵɵpipe(4,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(5," "),p.ɵɵelementStart(6,"div",1),p.ɵɵtext(7," "),p.ɵɵelementStart(8,"div"),p.ɵɵtext(9," "),p.ɵɵelementStart(10,"label",2),p.ɵɵtext(11),p.ɵɵpipe(12,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(13," "),p.ɵɵelementStart(14,"input",3),p.ɵɵlistener("ngModelChange",(function(e){return t.searchText=e})),p.ɵɵpipe(15,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(16," "),p.ɵɵelementEnd(),p.ɵɵtext(17," "),p.ɵɵtemplate(18,A,5,3,"button",4),p.ɵɵtext(19," "),p.ɵɵelementEnd(),p.ɵɵtext(20," "),p.ɵɵelementEnd(),p.ɵɵtext(21," "),p.ɵɵtemplate(22,O,9,6,"ng-container",5),p.ɵɵtext(23," "),p.ɵɵtemplate(24,j,6,2,"ng-container",5),p.ɵɵpipe(25,"search"),p.ɵɵtext(26," "),p.ɵɵtemplate(27,V,0,0,"ng-template",null,6,p.ɵɵtemplateRefExtractor),p.ɵɵtext(29," "),p.ɵɵtemplate(30,F,0,0,"ng-template",null,7,p.ɵɵtemplateRefExtractor),p.ɵɵtext(32," ")),2&e&&(p.ɵɵadvance(3),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(4,7,"collections")),p.ɵɵadvance(8),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(12,9,"search")),p.ɵɵadvance(3),p.ɵɵpropertyInterpolate("placeholder",p.ɵɵpipeBind1(15,11,"search")),p.ɵɵproperty("ngModel",t.searchText),p.ɵɵadvance(4),p.ɵɵproperty("ngIf",t.canCreate),p.ɵɵadvance(4),p.ɵɵproperty("ngIf",t.loading),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",!t.loading&&(t.isPaging()?t.pagedCollections:p.ɵɵpipeBind4(25,13,t.collections,t.searchText,"name","id"))))},directives:[b.DefaultValueAccessor,b.NgControlStatus,b.NgModel,S.NgIf,w.InfiniteScrollDirective,S.NgForOf,C.StopClickDirective,I.A11yTitleDirective],pipes:[E.I18nPipe,P.SearchPipe],encapsulation:2}),e}();t.CollectionsComponent=N,("undefined"==typeof ngDevMode||ngDevMode)&&p.ɵsetClassMetadata(N,[{type:o.Component,args:[{selector:"app-org-manage-collections",templateUrl:"collections.component.html"}]}],(function(){return[{type:u.ApiService},{type:d.ActivatedRoute},{type:m.CollectionService},{type:f.ModalService},{type:h.ToasterService},{type:v.I18nService},{type:y.PlatformUtilsService},{type:g.UserService},{type:x.SearchService}]}),{addEditModalRef:[{type:o.ViewChild,args:["addEdit",{read:o.ViewContainerRef,static:!0}]}],usersModalRef:[{type:o.ViewChild,args:["usersTemplate",{read:o.ViewContainerRef,static:!0}]}]})},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&(n[0].checked=!0,n[0].readOnly=e.readOnly,n[0].hidePasswords=e.hidePasswords)})),[3,5];case 4:return n.sent(),[3,5];case 5:return[3,7];case 6:this.title=this.i18nService.t("addGroup"),n.label=7;case 7:return this.loading=!1,[2]}}))}))},e.prototype.loadCollections=function(){return r(this,void 0,void 0,(function(){var e,t,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.apiService.getCollections(this.organizationId)];case 1:return e=r.sent(),t=e.data.map((function(e){return new s.Collection(new a.CollectionData(e))})),n=this,[4,this.collectionService.decryptMany(t)];case 2:return n.collections=r.sent(),[2]}}))}))},e.prototype.check=function(e,t){e.checked=null==t?!e.checked:t,e.checked||(e.readOnly=!1)},e.prototype.selectAll=function(e){var t=this;this.collections.forEach((function(n){return t.check(n,e)}))},e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:(e=new l.GroupRequest).name=this.name,e.externalId=this.externalId,e.accessAll="all"===this.access,e.accessAll||(e.collections=this.collections.filter((function(e){return e.checked})).map((function(e){return new c.SelectionReadOnlyRequest(e.id,!!e.readOnly,!!e.hidePasswords)}))),t.label=1;case 1:return t.trys.push([1,3,,4]),this.editMode?this.formPromise=this.apiService.putGroup(this.organizationId,this.groupId,e):this.formPromise=this.apiService.postGroup(this.organizationId,e),[4,this.formPromise];case 2:return t.sent(),this.toasterService.popAsync("success",null,this.i18nService.t(this.editMode?"editedGroupId":"createdGroupId",this.name)),this.onSavedGroup.emit(),[3,4];case 3:return t.sent(),[3,4];case 4:return[2]}}))}))},e.prototype.delete=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.editMode?[4,this.platformUtilsService.showDialog(this.i18nService.t("deleteGroupConfirmation"),this.name,this.i18nService.t("yes"),this.i18nService.t("no"),"warning")]:[2];case 1:if(!e.sent())return[2,!1];e.label=2;case 2:return e.trys.push([2,4,,5]),this.deletePromise=this.apiService.deleteGroup(this.organizationId,this.groupId),[4,this.deletePromise];case 3:return e.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("deletedGroupId",this.name)),this.onDeletedGroup.emit(),[3,5];case 4:return e.sent(),[3,5];case 5:return[2]}}))}))},e.ɵfac=function(t){return new(t||e)(p.ɵɵdirectiveInject(u.ApiService),p.ɵɵdirectiveInject(d.I18nService),p.ɵɵdirectiveInject(m.ToasterService),p.ɵɵdirectiveInject(f.CollectionService),p.ɵɵdirectiveInject(h.PlatformUtilsService))},e.ɵcmp=p.ɵɵdefineComponent({type:e,selectors:[["app-group-add-edit"]],inputs:{groupId:"groupId",organizationId:"organizationId"},outputs:{onSavedGroup:"onSavedGroup",onDeletedGroup:"onDeletedGroup"},decls:49,vars:18,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","groupAddEditTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-lg"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","groupAddEditTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"ml-auto"],["type","button","class","btn btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click",4,"ngIf"],[1,"modal-body"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],[1,"form-group"],["for","name"],["id","name","type","text","name","Name","required","",1,"form-control",3,"ngModel","ngModelChange"],["for","externalId"],["id","externalId","type","text","name","ExternalId",1,"form-control",3,"ngModel","ngModelChange"],[1,"form-text","text-muted"],[1,"mt-4","d-flex"],[1,"mb-2"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/article/user-types-access-control/#access-control",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-question-circle-o"],["class","ml-auto",4,"ngIf"],[1,"form-group",3,"ngClass"],[1,"form-check"],["type","radio","name","access","id","accessAll","value","all",1,"form-check-input",3,"ngModel","ngModelChange"],["for","accessAll",1,"form-check-label"],["type","radio","name","access","id","accessSelected","value","selected",1,"form-check-input",3,"ngModel","ngModelChange"],["for","accessSelected",1,"form-check-label"],[4,"ngIf"],["type","button",1,"btn","btn-link","btn-sm","py-0",3,"click"],["class","table table-hover table-list mb-0",4,"ngIf"],[1,"table","table-hover","table-list","mb-0"],["width","100",1,"text-center"],[4,"ngFor","ngForOf"],[1,"table-list-checkbox",3,"click"],["type","checkbox","appStopProp","",3,"ngModel","name","ngModelChange"],[3,"click"],[1,"text-center"],["type","checkbox",3,"ngModel","name","disabled","ngModelChange"],["type","button",1,"btn","btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click"],["deleteBtn",""],["aria-hidden","true",1,"fa","fa-trash-o","fa-lg","fa-fw",3,"hidden"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","fa-lg","fa-fw",3,"hidden","title"]],template:function(e,t){if(1&e&&(p.ɵɵelementStart(0,"div",0),p.ɵɵtext(1," "),p.ɵɵelementStart(2,"div",1),p.ɵɵtext(3," "),p.ɵɵelementStart(4,"form",2,3),p.ɵɵlistener("ngSubmit",(function(){return t.submit()})),p.ɵɵtext(6," "),p.ɵɵelementStart(7,"div",4),p.ɵɵtext(8," "),p.ɵɵelementStart(9,"h2",5),p.ɵɵtext(10),p.ɵɵelementEnd(),p.ɵɵtext(11," "),p.ɵɵelementStart(12,"button",6),p.ɵɵpipe(13,"i18n"),p.ɵɵtext(14," "),p.ɵɵelementStart(15,"span",7),p.ɵɵtext(16,"×"),p.ɵɵelementEnd(),p.ɵɵtext(17," "),p.ɵɵelementEnd(),p.ɵɵtext(18," "),p.ɵɵelementEnd(),p.ɵɵtext(19," "),p.ɵɵtemplate(20,w,9,6,"div",8),p.ɵɵtext(21," "),p.ɵɵtemplate(22,A,62,30,"div",8),p.ɵɵtext(23," "),p.ɵɵelementStart(24,"div",9),p.ɵɵtext(25," "),p.ɵɵelementStart(26,"button",10),p.ɵɵtext(27," "),p.ɵɵelement(28,"i",11),p.ɵɵpipe(29,"i18n"),p.ɵɵtext(30," "),p.ɵɵelementStart(31,"span"),p.ɵɵtext(32),p.ɵɵpipe(33,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(34," "),p.ɵɵelementEnd(),p.ɵɵtext(35," "),p.ɵɵelementStart(36,"button",12),p.ɵɵtext(37),p.ɵɵpipe(38,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(39," "),p.ɵɵelementStart(40,"div",13),p.ɵɵtext(41," "),p.ɵɵtemplate(42,O,9,10,"button",14),p.ɵɵtext(43," "),p.ɵɵelementEnd(),p.ɵɵtext(44," "),p.ɵɵelementEnd(),p.ɵɵtext(45," "),p.ɵɵelementEnd(),p.ɵɵtext(46," "),p.ɵɵelementEnd(),p.ɵɵtext(47," "),p.ɵɵelementEnd(),p.ɵɵtext(48," ")),2&e){var n=p.ɵɵreference(5);p.ɵɵadvance(4),p.ɵɵproperty("appApiAction",t.formPromise),p.ɵɵadvance(6),p.ɵɵtextInterpolate(t.title),p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("appA11yTitle",p.ɵɵpipeBind1(13,10,"close")),p.ɵɵadvance(8),p.ɵɵproperty("ngIf",t.loading),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",!t.loading),p.ɵɵadvance(4),p.ɵɵproperty("disabled",n.loading),p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(29,12,"loading")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(33,14,"save")),p.ɵɵadvance(5),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(38,16,"cancel")),p.ɵɵadvance(5),p.ɵɵproperty("ngIf",t.editMode)}},directives:[v.NgControlStatusGroup,v.NgForm,y.ApiActionDirective,g.A11yTitleDirective,x.NgIf,v.DefaultValueAccessor,v.RequiredValidator,v.NgControlStatus,v.NgModel,x.NgClass,v.RadioControlValueAccessor,x.NgForOf,v.CheckboxControlValueAccessor,b.StopPropDirective],pipes:[S.I18nPipe],encapsulation:2}),e}();t.GroupAddEditComponent=M,("undefined"==typeof ngDevMode||ngDevMode)&&p.ɵsetClassMetadata(M,[{type:o.Component,args:[{selector:"app-group-add-edit",templateUrl:"group-add-edit.component.html"}]}],(function(){return[{type:u.ApiService},{type:d.I18nService},{type:m.ToasterService},{type:f.CollectionService},{type:h.PlatformUtilsService}]}),{groupId:[{type:o.Input}],organizationId:[{type:o.Input}],onSavedGroup:[{type:o.Output}],onDeletedGroup:[{type:o.Output}]})},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0?e.data:[]).sort(a.Utils.getSortFunction(this.i18nService,"name")),this.groups=t,this.resetPaging(),this.loading=!1,[2]}}))}))},e.prototype.loadMore=function(){if(this.groups&&!(this.groups.length<=this.pageSize)){var e=this.pagedGroups.length,t=this.pageSize;0===e&&this.pagedGroupsCount>this.pageSize&&(t=this.pagedGroupsCount),this.groups.length>e&&(this.pagedGroups=this.pagedGroups.concat(this.groups.slice(e,e+t))),this.pagedGroupsCount=this.pagedGroups.length,this.didScroll=this.pagedGroups.length>this.pageSize}},e.prototype.edit=function(e){return r(this,void 0,void 0,(function(){var t,n=this;return i(this,(function(r){switch(r.label){case 0:return[4,this.modalService.openViewRef(l.GroupAddEditComponent,this.addEditModalRef,(function(r){r.organizationId=n.organizationId,r.groupId=null!=e?e.id:null,r.onSavedGroup.subscribe((function(){t.close(),n.load()})),r.onDeletedGroup.subscribe((function(){t.close(),n.removeGroup(e)}))}))];case 1:return t=r.sent()[0],[2]}}))}))},e.prototype.add=function(){this.edit(null)},e.prototype.delete=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.platformUtilsService.showDialog(this.i18nService.t("deleteGroupConfirmation"),e.name,this.i18nService.t("yes"),this.i18nService.t("no"),"warning")];case 1:if(!t.sent())return[2,!1];t.label=2;case 2:return t.trys.push([2,4,,5]),[4,this.apiService.deleteGroup(this.organizationId,e.id)];case 3:return t.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("deletedGroupId",e.name)),this.removeGroup(e),[3,5];case 4:return t.sent(),[3,5];case 5:return[2]}}))}))},e.prototype.users=function(e){return r(this,void 0,void 0,(function(){var t,n=this;return i(this,(function(r){switch(r.label){case 0:return[4,this.modalService.openViewRef(s.EntityUsersComponent,this.usersModalRef,(function(r){r.organizationId=n.organizationId,r.entity="group",r.entityId=e.id,r.entityName=e.name,r.onEditedUsers.subscribe((function(){t.close()}))}))];case 1:return t=r.sent()[0],[2]}}))}))},e.prototype.resetPaging=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){return this.pagedGroups=[],this.loadMore(),[2]}))}))},e.prototype.isSearching=function(){return this.searchService.isSearchable(this.searchText)},e.prototype.isPaging=function(){var e=this.isSearching();return e&&this.didScroll&&this.resetPaging(),!e&&this.groups&&this.groups.length>this.pageSize},e.prototype.removeGroup=function(e){var t=this.groups.indexOf(e);t>-1&&(this.groups.splice(t,1),this.resetPaging())},e.ɵfac=function(t){return new(t||e)(c.ɵɵdirectiveInject(p.ApiService),c.ɵɵdirectiveInject(u.ActivatedRoute),c.ɵɵdirectiveInject(d.I18nService),c.ɵɵdirectiveInject(m.ModalService),c.ɵɵdirectiveInject(f.ToasterService),c.ɵɵdirectiveInject(h.PlatformUtilsService),c.ɵɵdirectiveInject(v.UserService),c.ɵɵdirectiveInject(u.Router),c.ɵɵdirectiveInject(y.SearchService))},e.ɵcmp=c.ɵɵdefineComponent({type:e,selectors:[["app-org-groups"]],viewQuery:function(e,t){if(1&e&&(c.ɵɵviewQuery(E,3,o.ViewContainerRef),c.ɵɵviewQuery(P,3,o.ViewContainerRef)),2&e){var n=void 0;c.ɵɵqueryRefresh(n=c.ɵɵloadQuery())&&(t.addEditModalRef=n.first),c.ɵɵqueryRefresh(n=c.ɵɵloadQuery())&&(t.usersModalRef=n.first)}},decls:37,vars:20,consts:[[1,"page-header","d-flex"],[1,"ml-auto","d-flex"],["for","search",1,"sr-only"],["type","search","id","search",1,"form-control","form-control-sm",3,"placeholder","ngModel","ngModelChange"],["type","button",1,"btn","btn-sm","btn-outline-primary","ml-3",3,"click"],["aria-hidden","true",1,"fa","fa-plus","fa-fw"],[4,"ngIf"],["addEdit",""],["usersTemplate",""],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],["class","table table-hover table-list","infiniteScroll","",3,"infiniteScrollDistance","infiniteScrollDisabled","scrolled",4,"ngIf"],["infiniteScroll","",1,"table","table-hover","table-list",3,"infiniteScrollDistance","infiniteScrollDisabled","scrolled"],[4,"ngFor","ngForOf"],["href","#","appStopClick","",3,"click"],[1,"table-list-options"],["appListDropdown","",1,"dropdown"],["type","button","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",1,"btn","btn-outline-secondary","dropdown-toggle",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-cog","fa-lg"],[1,"dropdown-menu","dropdown-menu-right"],["href","#","appStopClick","",1,"dropdown-item",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-users"],["href","#","appStopClick","",1,"dropdown-item","text-danger",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-trash-o"]],template:function(e,t){1&e&&(c.ɵɵelementStart(0,"div",0),c.ɵɵtext(1," "),c.ɵɵelementStart(2,"h1"),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(5," "),c.ɵɵelementStart(6,"div",1),c.ɵɵtext(7," "),c.ɵɵelementStart(8,"div"),c.ɵɵtext(9," "),c.ɵɵelementStart(10,"label",2),c.ɵɵtext(11),c.ɵɵpipe(12,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(13," "),c.ɵɵelementStart(14,"input",3),c.ɵɵlistener("ngModelChange",(function(e){return t.searchText=e})),c.ɵɵpipe(15,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(16," "),c.ɵɵelementEnd(),c.ɵɵtext(17," "),c.ɵɵelementStart(18,"button",4),c.ɵɵlistener("click",(function(){return t.add()})),c.ɵɵtext(19," "),c.ɵɵelement(20,"i",5),c.ɵɵtext(21),c.ɵɵpipe(22,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(23," "),c.ɵɵelementEnd(),c.ɵɵtext(24," "),c.ɵɵelementEnd(),c.ɵɵtext(25," "),c.ɵɵtemplate(26,k,9,6,"ng-container",6),c.ɵɵtext(27," "),c.ɵɵtemplate(28,M,6,2,"ng-container",6),c.ɵɵpipe(29,"search"),c.ɵɵtext(30," "),c.ɵɵtemplate(31,T,0,0,"ng-template",null,7,c.ɵɵtemplateRefExtractor),c.ɵɵtext(33," "),c.ɵɵtemplate(34,D,0,0,"ng-template",null,8,c.ɵɵtemplateRefExtractor),c.ɵɵtext(36," ")),2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(4,7,"groups")),c.ɵɵadvance(8),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(12,9,"search")),c.ɵɵadvance(3),c.ɵɵpropertyInterpolate("placeholder",c.ɵɵpipeBind1(15,11,"search")),c.ɵɵproperty("ngModel",t.searchText),c.ɵɵadvance(7),c.ɵɵtextInterpolate1(" ",c.ɵɵpipeBind1(22,13,"newGroup")," "),c.ɵɵadvance(5),c.ɵɵproperty("ngIf",t.loading),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!t.loading&&(t.isPaging()?t.pagedGroups:c.ɵɵpipeBind4(29,15,t.groups,t.searchText,"name","id"))))},directives:[g.DefaultValueAccessor,g.NgControlStatus,g.NgModel,x.NgIf,b.InfiniteScrollDirective,x.NgForOf,S.StopClickDirective,w.A11yTitleDirective],pipes:[C.I18nPipe,I.SearchPipe],encapsulation:2}),e}();t.GroupsComponent=R,("undefined"==typeof ngDevMode||ngDevMode)&&c.ɵsetClassMetadata(R,[{type:o.Component,args:[{selector:"app-org-groups",templateUrl:"groups.component.html"}]}],(function(){return[{type:p.ApiService},{type:u.ActivatedRoute},{type:d.I18nService},{type:m.ModalService},{type:f.ToasterService},{type:h.PlatformUtilsService},{type:v.UserService},{type:u.Router},{type:y.SearchService}]}),{addEditModalRef:[{type:o.ViewChild,args:["addEdit",{read:o.ViewContainerRef,static:!0}]}],usersModalRef:[{type:o.ViewChild,args:["usersTemplate",{read:o.ViewContainerRef,static:!0}]}]})},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&t[0].status===d.OrganizationUserStatusType.Confirmed&&this.events(t[0]),null!=l&&l.unsubscribe(),[2]}))}))})),[2]}}))}))})),[2]}))}))},t.prototype.load=function(){return a(this,void 0,void 0,(function(){var t;return s(this,(function(n){switch(n.label){case 0:return[4,this.policyService.getPolicyForOrganization(f.PolicyType.ResetPassword,this.organizationId)];case 1:return t=n.sent(),this.orgResetPasswordPolicyEnabled=null==t?void 0:t.enabled,e.prototype.load.call(this),[2]}}))}))},t.prototype.getUsers=function(){return this.apiService.getOrganizationUsers(this.organizationId)},t.prototype.deleteUser=function(e){return this.apiService.deleteOrganizationUser(this.organizationId,e)},t.prototype.reinviteUser=function(e){return this.apiService.postOrganizationUserReinvite(this.organizationId,e)},t.prototype.confirmUser=function(e,t){return a(this,void 0,void 0,(function(){var n,r,i;return s(this,(function(o){switch(o.label){case 0:return[4,this.cryptoService.getOrgKey(this.organizationId)];case 1:return n=o.sent(),[4,this.cryptoService.rsaEncrypt(n.key,t.buffer)];case 2:return r=o.sent(),(i=new u.OrganizationUserConfirmRequest).key=r.encryptedString,[4,this.apiService.postOrganizationUserConfirm(this.organizationId,e.id,i)];case 3:return o.sent(),[2]}}))}))},t.prototype.allowResetPassword=function(e){var t=!1;switch(this.callingUserType){case m.OrganizationUserType.Owner:t=!0;break;case m.OrganizationUserType.Admin:t=e.type!==m.OrganizationUserType.Owner;break;case m.OrganizationUserType.Custom:t=e.type!==m.OrganizationUserType.Owner&&e.type!==m.OrganizationUserType.Admin}return this.canResetPassword&&t&&this.orgUseResetPassword&&this.orgHasKeys&&e.resetPasswordEnrolled&&this.orgResetPasswordPolicyEnabled&&e.status===d.OrganizationUserStatusType.Confirmed},t.prototype.showEnrolledStatus=function(e){return this.orgUseResetPassword&&e.resetPasswordEnrolled&&this.orgResetPasswordPolicyEnabled},t.prototype.edit=function(e){return a(this,void 0,void 0,(function(){var t,n=this;return s(this,(function(r){switch(r.label){case 0:return[4,this.modalService.openViewRef(S.UserAddEditComponent,this.addEditModalRef,(function(r){r.name=n.userNamePipe.transform(e),r.organizationId=n.organizationId,r.organizationUserId=null!=e?e.id:null,r.onSavedUser.subscribe((function(){t.close(),n.load()})),r.onDeletedUser.subscribe((function(){t.close(),n.removeUser(e)}))}))];case 1:return t=r.sent()[0],[2]}}))}))},t.prototype.groups=function(e){return a(this,void 0,void 0,(function(){var t,n=this;return s(this,(function(r){switch(r.label){case 0:return[4,this.modalService.openViewRef(w.UserGroupsComponent,this.groupsModalRef,(function(r){r.name=n.userNamePipe.transform(e),r.organizationId=n.organizationId,r.organizationUserId=null!=e?e.id:null,r.onSavedUser.subscribe((function(){t.close()}))}))];case 1:return t=r.sent()[0],[2]}}))}))},t.prototype.bulkRemove=function(){return a(this,void 0,void 0,(function(){var e=this;return s(this,(function(t){switch(t.label){case 0:return null!=this.actionPromise?[2]:[4,this.modalService.openViewRef(y.BulkRemoveComponent,this.bulkRemoveModalRef,(function(t){t.organizationId=e.organizationId,t.users=e.getCheckedUsers()}))];case 1:return[4,t.sent()[0].onClosedPromise()];case 2:return t.sent(),[4,this.load()];case 3:return t.sent(),[2]}}))}))},t.prototype.bulkReinvite=function(){return a(this,void 0,void 0,(function(){var e,t,n,r;return s(this,(function(i){if(null!=this.actionPromise)return[2];if(e=this.getCheckedUsers(),(t=e.filter((function(e){return e.status===d.OrganizationUserStatusType.Invited}))).length<=0)return this.toasterService.popAsync("error",this.i18nService.t("errorOccurred"),this.i18nService.t("noSelectedUsersApplicable")),[2];try{n=new p.OrganizationUserBulkRequest(t.map((function(e){return e.id}))),r=this.apiService.postManyOrganizationUserReinvite(this.organizationId,n),this.showBulkStatus(e,t,r,this.i18nService.t("bulkReinviteMessage"))}catch(o){this.validationService.showError(o)}return this.actionPromise=null,[2]}))}))},t.prototype.bulkConfirm=function(){return a(this,void 0,void 0,(function(){var e=this;return s(this,(function(t){switch(t.label){case 0:return null!=this.actionPromise?[2]:[4,this.modalService.openViewRef(v.BulkConfirmComponent,this.bulkConfirmModalRef,(function(t){t.organizationId=e.organizationId,t.users=e.getCheckedUsers()}))];case 1:return[4,t.sent()[0].onClosedPromise()];case 2:return t.sent(),[4,this.load()];case 3:return t.sent(),[2]}}))}))},t.prototype.events=function(e){return a(this,void 0,void 0,(function(){var t=this;return s(this,(function(n){switch(n.label){case 0:return[4,this.modalService.openViewRef(x.EntityEventsComponent,this.eventsModalRef,(function(n){n.name=t.userNamePipe.transform(e),n.organizationId=t.organizationId,n.entityId=e.id,n.showUser=!1,n.entity="user"}))];case 1:return n.sent()[0],[2]}}))}))},t.prototype.resetPassword=function(e){return a(this,void 0,void 0,(function(){var t,n=this;return s(this,(function(r){switch(r.label){case 0:return[4,this.modalService.openViewRef(b.ResetPasswordComponent,this.resetPasswordModalRef,(function(r){r.name=n.userNamePipe.transform(e),r.email=null!=e?e.email:null,r.organizationId=n.organizationId,r.id=null!=e?e.id:null,r.onPasswordReset.subscribe((function(){t.close(),n.load()}))}))];case 1:return t=r.sent()[0],[2]}}))}))},t.prototype.showBulkStatus=function(e,t,n,r){return a(this,void 0,void 0,(function(){var i,a,l,c,p,u,d,m=this;return s(this,(function(s){switch(s.label){case 0:return[4,this.modalService.openViewRef(g.BulkStatusComponent,this.bulkStatusModalRef,(function(e){e.loading=!0}))];case 1:i=s.sent(),a=i[0],l=i[1],c=!1,a.onShown.subscribe((function(){c&&a.close()})),s.label=2;case 2:return s.trys.push([2,4,,5]),[4,n];case 3:return p=s.sent(),a&&(u=p.data.filter((function(e){return""!==e.error})).reduce((function(e,t){var n;return o(o({},e),((n={})[t.id]=t.error,n))}),{}),d=t.reduce((function(e,t){var n;return o(o({},e),((n={})[t.id]=t,n))}),{}),l.users=e.map((function(e){var t,n=null!==(t=u[e.id])&&void 0!==t?t:r;return d.hasOwnProperty(e.id)||(n=m.i18nService.t("bulkFilteredMessage")),{user:e,error:u.hasOwnProperty(e.id),message:n}})),l.loading=!1),[3,5];case 4:return s.sent(),c=!0,a.close(),[3,5];case 5:return[2]}}))}))},t.ɵfac=function(e){return new(e||t)(C.ɵɵdirectiveInject(I.ApiService),C.ɵɵdirectiveInject(E.ActivatedRoute),C.ɵɵdirectiveInject(P.I18nService),C.ɵɵdirectiveInject(k.ModalService),C.ɵɵdirectiveInject(_.PlatformUtilsService),C.ɵɵdirectiveInject(A.ToasterService),C.ɵɵdirectiveInject(O.CryptoService),C.ɵɵdirectiveInject(M.UserService),C.ɵɵdirectiveInject(E.Router),C.ɵɵdirectiveInject(T.StorageService),C.ɵɵdirectiveInject(D.SearchService),C.ɵɵdirectiveInject(R.ValidationService),C.ɵɵdirectiveInject(B.PolicyService),C.ɵɵdirectiveInject(U.LogService),C.ɵɵdirectiveInject(j.SearchPipe),C.ɵɵdirectiveInject(V.UserNamePipe),C.ɵɵdirectiveInject(F.SyncService))},t.ɵcmp=C.ɵɵdefineComponent({type:t,selectors:[["app-org-people"]],viewQuery:function(e,t){if(1&e&&(C.ɵɵviewQuery(Q,3,l.ViewContainerRef),C.ɵɵviewQuery(Y,3,l.ViewContainerRef),C.ɵɵviewQuery(J,3,l.ViewContainerRef),C.ɵɵviewQuery(X,3,l.ViewContainerRef),C.ɵɵviewQuery(Z,3,l.ViewContainerRef),C.ɵɵviewQuery(ee,3,l.ViewContainerRef),C.ɵɵviewQuery(te,3,l.ViewContainerRef),C.ɵɵviewQuery(ne,3,l.ViewContainerRef)),2&e){var n=void 0;C.ɵɵqueryRefresh(n=C.ɵɵloadQuery())&&(t.addEditModalRef=n.first),C.ɵɵqueryRefresh(n=C.ɵɵloadQuery())&&(t.groupsModalRef=n.first),C.ɵɵqueryRefresh(n=C.ɵɵloadQuery())&&(t.eventsModalRef=n.first),C.ɵɵqueryRefresh(n=C.ɵɵloadQuery())&&(t.confirmModalRef=n.first),C.ɵɵqueryRefresh(n=C.ɵɵloadQuery())&&(t.resetPasswordModalRef=n.first),C.ɵɵqueryRefresh(n=C.ɵɵloadQuery())&&(t.bulkStatusModalRef=n.first),C.ɵɵqueryRefresh(n=C.ɵɵloadQuery())&&(t.bulkConfirmModalRef=n.first),C.ɵɵqueryRefresh(n=C.ɵɵloadQuery())&&(t.bulkRemoveModalRef=n.first)}},features:[C.ɵɵInheritDefinitionFeature],decls:116,vars:61,consts:[[1,"page-header","d-flex"],[1,"ml-auto","d-flex"],["role","group",1,"btn-group","btn-group-sm"],["type","button",1,"btn","btn-outline-secondary",3,"ngClass","click"],["class","badge badge-pill badge-info",4,"ngIf"],["class","badge badge-pill badge-warning",4,"ngIf"],[1,"ml-3"],["for","search",1,"sr-only"],["type","search","id","search",1,"form-control","form-control-sm",3,"placeholder","ngModel","ngModelChange"],["appListDropdown","",1,"dropdown","ml-3"],["type","button","id","bulkActionsButton","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",1,"btn","btn-sm","btn-outline-secondary","dropdown-toggle",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-cog"],["aria-labelledby","bulkActionsButton",1,"dropdown-menu","dropdown-menu-right"],["appStopClick","",1,"dropdown-item",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-envelope-o"],["class","dropdown-item text-success","appStopClick","",3,"click",4,"ngIf"],["appStopClick","",1,"dropdown-item","text-danger",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-remove"],[1,"dropdown-divider"],["aria-hidden","true",1,"fa","fa-fw","fa-check-square-o"],["aria-hidden","true",1,"fa","fa-fw","fa-minus-square-o"],["type","button",1,"btn","btn-sm","btn-outline-primary","ml-3",3,"click"],["aria-hidden","true",1,"fa","fa-plus","fa-fw"],[4,"ngIf"],["addEdit",""],["groupsTemplate",""],["eventsTemplate",""],["confirmTemplate",""],["resetPasswordTemplate",""],["bulkStatusTemplate",""],["bulkConfirmTemplate",""],["bulkRemoveTemplate",""],[1,"badge","badge-pill","badge-info"],[1,"badge","badge-pill","badge-warning"],["appStopClick","",1,"dropdown-item","text-success",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-check"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],["type","info","icon","fa-check-circle",3,"title",4,"ngIf"],["infiniteScroll","",1,"table","table-hover","table-list",3,"infiniteScrollDistance","infiniteScrollDisabled","scrolled"],[4,"ngFor","ngForOf"],["type","info","icon","fa-check-circle",3,"title"],[1,"table-list-checkbox",3,"click"],["type","checkbox","appStopProp","",3,"ngModel","ngModelChange"],["width","30"],["size","25",3,"data","email","circle","fontSize"],["href","#","appStopClick","",3,"click"],["class","badge badge-secondary",4,"ngIf"],["class","badge badge-warning",4,"ngIf"],["class","text-muted d-block",4,"ngIf"],[1,"table-list-options"],["appListDropdown","",1,"dropdown"],["type","button","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",1,"btn","btn-outline-secondary","dropdown-toggle",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-cog","fa-lg"],[1,"dropdown-menu","dropdown-menu-right"],["class","dropdown-item","href","#","appStopClick","",3,"click",4,"ngIf"],["class","dropdown-item text-success","href","#","appStopClick","",3,"click",4,"ngIf"],["href","#","appStopClick","",1,"dropdown-item","text-danger",3,"click"],[1,"badge","badge-secondary"],[1,"badge","badge-warning"],[1,"text-muted","d-block"],["aria-hidden","true",1,"fa","fa-lock",3,"title"],["aria-hidden","true",1,"fa","fa-key",3,"title"],["href","#","appStopClick","",1,"dropdown-item",3,"click"],["href","#","appStopClick","",1,"dropdown-item","text-success",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-sitemap"],["aria-hidden","true",1,"fa","fa-fw","fa-file-text-o"],["aria-hidden","true",1,"fa","fa-fw","fa-key"]],template:function(e,t){1&e&&(C.ɵɵelementStart(0,"div",0),C.ɵɵtext(1," "),C.ɵɵelementStart(2,"h1"),C.ɵɵtext(3),C.ɵɵpipe(4,"i18n"),C.ɵɵelementEnd(),C.ɵɵtext(5," "),C.ɵɵelementStart(6,"div",1),C.ɵɵtext(7," "),C.ɵɵelementStart(8,"div",2),C.ɵɵtext(9," "),C.ɵɵelementStart(10,"button",3),C.ɵɵlistener("click",(function(){return t.filter(null)})),C.ɵɵtext(11),C.ɵɵpipe(12,"i18n"),C.ɵɵtemplate(13,re,2,1,"span",4),C.ɵɵtext(14," "),C.ɵɵelementEnd(),C.ɵɵtext(15," "),C.ɵɵelementStart(16,"button",3),C.ɵɵlistener("click",(function(){return t.filter(t.userStatusType.Invited)})),C.ɵɵtext(17),C.ɵɵpipe(18,"i18n"),C.ɵɵtemplate(19,ie,2,1,"span",4),C.ɵɵtext(20," "),C.ɵɵelementEnd(),C.ɵɵtext(21," "),C.ɵɵelementStart(22,"button",3),C.ɵɵlistener("click",(function(){return t.filter(t.userStatusType.Accepted)})),C.ɵɵtext(23),C.ɵɵpipe(24,"i18n"),C.ɵɵtemplate(25,oe,2,1,"span",5),C.ɵɵtext(26," "),C.ɵɵelementEnd(),C.ɵɵtext(27," "),C.ɵɵelementEnd(),C.ɵɵtext(28," "),C.ɵɵelementStart(29,"div",6),C.ɵɵtext(30," "),C.ɵɵelementStart(31,"label",7),C.ɵɵtext(32),C.ɵɵpipe(33,"i18n"),C.ɵɵelementEnd(),C.ɵɵtext(34," "),C.ɵɵelementStart(35,"input",8),C.ɵɵlistener("ngModelChange",(function(e){return t.searchText=e})),C.ɵɵpipe(36,"i18n"),C.ɵɵelementEnd(),C.ɵɵtext(37," "),C.ɵɵelementEnd(),C.ɵɵtext(38," "),C.ɵɵelementStart(39,"div",9),C.ɵɵtext(40," "),C.ɵɵelementStart(41,"button",10),C.ɵɵpipe(42,"i18n"),C.ɵɵtext(43," "),C.ɵɵelement(44,"i",11),C.ɵɵtext(45," "),C.ɵɵelementEnd(),C.ɵɵtext(46," "),C.ɵɵelementStart(47,"div",12),C.ɵɵtext(48," "),C.ɵɵelementStart(49,"button",13),C.ɵɵlistener("click",(function(){return t.bulkReinvite()})),C.ɵɵtext(50," "),C.ɵɵelement(51,"i",14),C.ɵɵtext(52),C.ɵɵpipe(53,"i18n"),C.ɵɵelementEnd(),C.ɵɵtext(54," "),C.ɵɵtemplate(55,ae,5,3,"button",15),C.ɵɵtext(56," "),C.ɵɵelementStart(57,"button",16),C.ɵɵlistener("click",(function(){return t.bulkRemove()})),C.ɵɵtext(58," "),C.ɵɵelement(59,"i",17),C.ɵɵtext(60),C.ɵɵpipe(61,"i18n"),C.ɵɵelementEnd(),C.ɵɵtext(62," "),C.ɵɵelement(63,"div",18),C.ɵɵtext(64," "),C.ɵɵelementStart(65,"button",13),C.ɵɵlistener("click",(function(){return t.selectAll(!0)})),C.ɵɵtext(66," "),C.ɵɵelement(67,"i",19),C.ɵɵtext(68),C.ɵɵpipe(69,"i18n"),C.ɵɵelementEnd(),C.ɵɵtext(70," "),C.ɵɵelementStart(71,"button",13),C.ɵɵlistener("click",(function(){return t.selectAll(!1)})),C.ɵɵtext(72," "),C.ɵɵelement(73,"i",20),C.ɵɵtext(74),C.ɵɵpipe(75,"i18n"),C.ɵɵelementEnd(),C.ɵɵtext(76," "),C.ɵɵelementEnd(),C.ɵɵtext(77," "),C.ɵɵelementEnd(),C.ɵɵtext(78," "),C.ɵɵelementStart(79,"button",21),C.ɵɵlistener("click",(function(){return t.invite()})),C.ɵɵtext(80," "),C.ɵɵelement(81,"i",22),C.ɵɵtext(82),C.ɵɵpipe(83,"i18n"),C.ɵɵelementEnd(),C.ɵɵtext(84," "),C.ɵɵelementEnd(),C.ɵɵtext(85," "),C.ɵɵelementEnd(),C.ɵɵtext(86," "),C.ɵɵtemplate(87,se,9,6,"ng-container",23),C.ɵɵtext(88," "),C.ɵɵtemplate(89,ke,6,2,"ng-container",23),C.ɵɵpipe(90,"search"),C.ɵɵtext(91," "),C.ɵɵtemplate(92,_e,0,0,"ng-template",null,24,C.ɵɵtemplateRefExtractor),C.ɵɵtext(94," "),C.ɵɵtemplate(95,Ae,0,0,"ng-template",null,25,C.ɵɵtemplateRefExtractor),C.ɵɵtext(97," "),C.ɵɵtemplate(98,Oe,0,0,"ng-template",null,26,C.ɵɵtemplateRefExtractor),C.ɵɵtext(100," "),C.ɵɵtemplate(101,Me,0,0,"ng-template",null,27,C.ɵɵtemplateRefExtractor),C.ɵɵtext(103," "),C.ɵɵtemplate(104,Te,0,0,"ng-template",null,28,C.ɵɵtemplateRefExtractor),C.ɵɵtext(106," "),C.ɵɵtemplate(107,De,0,0,"ng-template",null,29,C.ɵɵtemplateRefExtractor),C.ɵɵtext(109," "),C.ɵɵtemplate(110,Re,0,0,"ng-template",null,30,C.ɵɵtemplateRefExtractor),C.ɵɵtext(112," "),C.ɵɵtemplate(113,Be,0,0,"ng-template",null,31,C.ɵɵtemplateRefExtractor),C.ɵɵtext(115," ")),2&e&&(C.ɵɵadvance(3),C.ɵɵtextInterpolate(C.ɵɵpipeBind1(4,22,"people")),C.ɵɵadvance(7),C.ɵɵproperty("ngClass",C.ɵɵpureFunction1(52,Ue,null==t.status)),C.ɵɵadvance(1),C.ɵɵtextInterpolate1(" ",C.ɵɵpipeBind1(12,24,"all")," "),C.ɵɵadvance(2),C.ɵɵproperty("ngIf",t.allCount),C.ɵɵadvance(3),C.ɵɵproperty("ngClass",C.ɵɵpureFunction1(54,Ue,t.status==t.userStatusType.Invited)),C.ɵɵadvance(1),C.ɵɵtextInterpolate1(" ",C.ɵɵpipeBind1(18,26,"invited")," "),C.ɵɵadvance(2),C.ɵɵproperty("ngIf",t.invitedCount),C.ɵɵadvance(3),C.ɵɵproperty("ngClass",C.ɵɵpureFunction1(56,Ue,t.status==t.userStatusType.Accepted)),C.ɵɵadvance(1),C.ɵɵtextInterpolate1(" ",C.ɵɵpipeBind1(24,28,"accepted")," "),C.ɵɵadvance(2),C.ɵɵproperty("ngIf",t.acceptedCount),C.ɵɵadvance(7),C.ɵɵtextInterpolate(C.ɵɵpipeBind1(33,30,"search")),C.ɵɵadvance(3),C.ɵɵpropertyInterpolate("placeholder",C.ɵɵpipeBind1(36,32,"search")),C.ɵɵproperty("ngModel",t.searchText),C.ɵɵadvance(6),C.ɵɵpropertyInterpolate("appA11yTitle",C.ɵɵpipeBind1(42,34,"options")),C.ɵɵadvance(11),C.ɵɵtextInterpolate1(" ",C.ɵɵpipeBind1(53,36,"reinviteSelected")," "),C.ɵɵadvance(3),C.ɵɵproperty("ngIf",t.showBulkConfirmUsers),C.ɵɵadvance(5),C.ɵɵtextInterpolate1(" ",C.ɵɵpipeBind1(61,38,"remove")," "),C.ɵɵadvance(8),C.ɵɵtextInterpolate1(" ",C.ɵɵpipeBind1(69,40,"selectAll")," "),C.ɵɵadvance(6),C.ɵɵtextInterpolate1(" ",C.ɵɵpipeBind1(75,42,"unselectAll")," "),C.ɵɵadvance(8),C.ɵɵtextInterpolate1(" ",C.ɵɵpipeBind1(83,44,"inviteUser")," "),C.ɵɵadvance(5),C.ɵɵproperty("ngIf",t.loading),C.ɵɵadvance(2),C.ɵɵproperty("ngIf",!t.loading&&(t.isPaging()?t.pagedUsers:C.ɵɵpipeBindV(90,46,C.ɵɵpureFunction2(58,je,t.users,t.searchText)))))},directives:[N.NgClass,N.NgIf,z.DefaultValueAccessor,z.NgControlStatus,z.NgModel,L.A11yTitleDirective,K.StopClickDirective,G.InfiniteScrollDirective,N.NgForOf,q.CalloutComponent,z.CheckboxControlValueAccessor,W.StopPropDirective,H.AvatarComponent],pipes:[$.I18nPipe,j.SearchPipe,V.UserNamePipe],encapsulation:2}),t}(h.BasePeopleComponent);t.PeopleComponent=Ve,("undefined"==typeof ngDevMode||ngDevMode)&&C.ɵsetClassMetadata(Ve,[{type:l.Component,args:[{selector:"app-org-people",templateUrl:"people.component.html"}]}],(function(){return[{type:I.ApiService},{type:E.ActivatedRoute},{type:P.I18nService},{type:k.ModalService},{type:_.PlatformUtilsService},{type:A.ToasterService},{type:O.CryptoService},{type:M.UserService},{type:E.Router},{type:T.StorageService},{type:D.SearchService},{type:R.ValidationService},{type:B.PolicyService},{type:U.LogService},{type:j.SearchPipe},{type:V.UserNamePipe},{type:F.SyncService}]}),{addEditModalRef:[{type:l.ViewChild,args:["addEdit",{read:l.ViewContainerRef,static:!0}]}],groupsModalRef:[{type:l.ViewChild,args:["groupsTemplate",{read:l.ViewContainerRef,static:!0}]}],eventsModalRef:[{type:l.ViewChild,args:["eventsTemplate",{read:l.ViewContainerRef,static:!0}]}],confirmModalRef:[{type:l.ViewChild,args:["confirmTemplate",{read:l.ViewContainerRef,static:!0}]}],resetPasswordModalRef:[{type:l.ViewChild,args:["resetPasswordTemplate",{read:l.ViewContainerRef,static:!0}]}],bulkStatusModalRef:[{type:l.ViewChild,args:["bulkStatusTemplate",{read:l.ViewContainerRef,static:!0}]}],bulkConfirmModalRef:[{type:l.ViewChild,args:["bulkConfirmTemplate",{read:l.ViewContainerRef,static:!0}]}],bulkRemoveModalRef:[{type:l.ViewChild,args:["bulkRemoveTemplate",{read:l.ViewContainerRef,static:!0}]}]})},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]-1&&(e=e.concat(this.email.substr(0,t).trim().toLowerCase().split(/[^A-Za-z0-9]/))),null!=this.name&&""!==this.name&&(e=e.concat(this.name.trim().toLowerCase().split(" "))),e},e.ɵfac=function(t){return new(t||e)(c.ɵɵdirectiveInject(p.ApiService),c.ɵɵdirectiveInject(u.I18nService),c.ɵɵdirectiveInject(d.PlatformUtilsService),c.ɵɵdirectiveInject(m.PasswordGenerationService),c.ɵɵdirectiveInject(f.PolicyService),c.ɵɵdirectiveInject(h.CryptoService))},e.ɵcmp=c.ɵɵdefineComponent({type:e,selectors:[["app-reset-password"]],inputs:{name:"name",email:"email",id:"id",organizationId:"organizationId"},outputs:{onPasswordReset:"onPasswordReset"},decls:97,vars:43,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","resetPasswordTitle",1,"modal","fade"],["role","document",1,"modal-dialog"],[1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","resetPasswordTitle",1,"modal-title"],["class","text-muted",4,"ngIf"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["type","warning"],["type","info",3,"enforcedPolicyOptions","enforcedPolicyMessage",4,"ngIf"],[1,"row"],[1,"col","form-group"],[1,"d-flex"],["for","newPassword"],[1,"ml-auto","d-flex"],["href","#","appStopClick","",1,"d-block","mr-2","fa-icon-above-input",3,"appA11yTitle","click"],["aria-hidden","true",1,"fa","fa-lg","fa-fw","fa-refresh"],[1,"input-group","mb-1"],["id","newPassword","appAutofocus","","name","NewPassword","required","","appInputVerbatim","","autocomplete","new-password",1,"form-control","text-monospace",3,"type","ngModel","ngModelChange","input"],[1,"input-group-append"],["type","button",1,"btn","btn-outline-secondary",3,"appA11yTitle","click"],["aria-hidden","true",1,"fa","fa-lg",3,"ngClass"],["aria-hidden","true",1,"fa","fa-lg","fa-clone"],[3,"score","showText"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"text-muted"],["type","info",3,"enforcedPolicyOptions","enforcedPolicyMessage"]],template:function(e,t){if(1&e&&(c.ɵɵelementStart(0,"div",0),c.ɵɵtext(1," "),c.ɵɵelementStart(2,"div",1),c.ɵɵtext(3," "),c.ɵɵelementStart(4,"form",2,3),c.ɵɵlistener("ngSubmit",(function(){return t.submit()})),c.ɵɵtext(6," "),c.ɵɵelementStart(7,"div",4),c.ɵɵtext(8," "),c.ɵɵelementStart(9,"h2",5),c.ɵɵtext(10),c.ɵɵpipe(11,"i18n"),c.ɵɵtemplate(12,P,2,1,"small",6),c.ɵɵtext(13," "),c.ɵɵelementEnd(),c.ɵɵtext(14," "),c.ɵɵelementStart(15,"button",7),c.ɵɵpipe(16,"i18n"),c.ɵɵtext(17," "),c.ɵɵelementStart(18,"span",8),c.ɵɵtext(19,"×"),c.ɵɵelementEnd(),c.ɵɵtext(20," "),c.ɵɵelementEnd(),c.ɵɵtext(21," "),c.ɵɵelementEnd(),c.ɵɵtext(22," "),c.ɵɵelementStart(23,"div",9),c.ɵɵtext(24," "),c.ɵɵelementStart(25,"app-callout",10),c.ɵɵtext(26),c.ɵɵpipe(27,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(28," "),c.ɵɵtemplate(29,k,3,4,"app-callout",11),c.ɵɵtext(30," "),c.ɵɵelementStart(31,"div",12),c.ɵɵtext(32," "),c.ɵɵelementStart(33,"div",13),c.ɵɵtext(34," "),c.ɵɵelementStart(35,"div",14),c.ɵɵtext(36," "),c.ɵɵelementStart(37,"label",15),c.ɵɵtext(38),c.ɵɵpipe(39,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(40," "),c.ɵɵelementStart(41,"div",16),c.ɵɵtext(42," "),c.ɵɵelementStart(43,"a",17),c.ɵɵlistener("click",(function(){return t.generatePassword()})),c.ɵɵpipe(44,"i18n"),c.ɵɵtext(45," "),c.ɵɵelement(46,"i",18),c.ɵɵtext(47," "),c.ɵɵelementEnd(),c.ɵɵtext(48," "),c.ɵɵelementEnd(),c.ɵɵtext(49," "),c.ɵɵelementEnd(),c.ɵɵtext(50," "),c.ɵɵelementStart(51,"div",19),c.ɵɵtext(52," "),c.ɵɵelementStart(53,"input",20),c.ɵɵlistener("ngModelChange",(function(e){return t.newPassword=e}))("input",(function(){return t.updatePasswordStrength()})),c.ɵɵelementEnd(),c.ɵɵtext(54," "),c.ɵɵelementStart(55,"div",21),c.ɵɵtext(56," "),c.ɵɵelementStart(57,"button",22),c.ɵɵlistener("click",(function(){return t.togglePassword()})),c.ɵɵpipe(58,"i18n"),c.ɵɵtext(59," "),c.ɵɵelement(60,"i",23),c.ɵɵtext(61," "),c.ɵɵelementEnd(),c.ɵɵtext(62," "),c.ɵɵelementStart(63,"button",22),c.ɵɵlistener("click",(function(){return t.copy(t.newPassword)})),c.ɵɵpipe(64,"i18n"),c.ɵɵtext(65," "),c.ɵɵelement(66,"i",24),c.ɵɵtext(67," "),c.ɵɵelementEnd(),c.ɵɵtext(68," "),c.ɵɵelementEnd(),c.ɵɵtext(69," "),c.ɵɵelementEnd(),c.ɵɵtext(70," "),c.ɵɵelementStart(71,"app-password-strength",25),c.ɵɵtext(72," "),c.ɵɵelementEnd(),c.ɵɵtext(73," "),c.ɵɵelementEnd(),c.ɵɵtext(74," "),c.ɵɵelementEnd(),c.ɵɵtext(75," "),c.ɵɵelementEnd(),c.ɵɵtext(76," "),c.ɵɵelementStart(77,"div",26),c.ɵɵtext(78," "),c.ɵɵelementStart(79,"button",27),c.ɵɵtext(80," "),c.ɵɵelement(81,"i",28),c.ɵɵpipe(82,"i18n"),c.ɵɵtext(83," "),c.ɵɵelementStart(84,"span"),c.ɵɵtext(85),c.ɵɵpipe(86,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(87," "),c.ɵɵelementEnd(),c.ɵɵtext(88," "),c.ɵɵelementStart(89,"button",29),c.ɵɵtext(90),c.ɵɵpipe(91,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(92," "),c.ɵɵelementEnd(),c.ɵɵtext(93," "),c.ɵɵelementEnd(),c.ɵɵtext(94," "),c.ɵɵelementEnd(),c.ɵɵtext(95," "),c.ɵɵelementEnd(),c.ɵɵtext(96," ")),2&e){var n=c.ɵɵreference(5);c.ɵɵadvance(4),c.ɵɵproperty("appApiAction",t.formPromise),c.ɵɵadvance(6),c.ɵɵtextInterpolate1(" ",c.ɵɵpipeBind1(11,19,"resetPassword")," "),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",t.name),c.ɵɵadvance(3),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(16,21,"close")),c.ɵɵadvance(11),c.ɵɵtextInterpolate1("",c.ɵɵpipeBind2(27,23,"resetPasswordLoggedOutWarning",t.loggedOutWarningName)," "),c.ɵɵadvance(3),c.ɵɵproperty("ngIf",t.enforcedPolicyOptions),c.ɵɵadvance(9),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(39,26,"newPassword")),c.ɵɵadvance(5),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(44,28,"generatePassword")),c.ɵɵadvance(10),c.ɵɵpropertyInterpolate("type",t.showPassword?"text":"password"),c.ɵɵproperty("ngModel",t.newPassword),c.ɵɵadvance(4),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(58,30,"toggleVisibility")),c.ɵɵadvance(3),c.ɵɵproperty("ngClass",c.ɵɵpureFunction2(40,_,!t.showPassword,t.showPassword)),c.ɵɵadvance(3),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(64,32,"copyPassword")),c.ɵɵadvance(8),c.ɵɵproperty("score",t.masterPasswordScore)("showText",!0),c.ɵɵadvance(8),c.ɵɵproperty("disabled",n.loading),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(82,34,"loading")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(86,36,"save")),c.ɵɵadvance(5),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(91,38,"cancel"))}},directives:[v.ɵangular_packages_forms_forms_ba,v.NgControlStatusGroup,v.NgForm,y.ApiActionDirective,g.NgIf,x.A11yTitleDirective,b.CalloutComponent,S.StopClickDirective,v.DefaultValueAccessor,w.AutofocusDirective,v.RequiredValidator,C.InputVerbatimDirective,v.NgControlStatus,v.NgModel,g.NgClass,I.PasswordStrengthComponent],pipes:[E.I18nPipe],encapsulation:2}),e}();t.ResetPasswordComponent=A,("undefined"==typeof ngDevMode||ngDevMode)&&c.ɵsetClassMetadata(A,[{type:o.Component,args:[{selector:"app-reset-password",templateUrl:"reset-password.component.html"}]}],(function(){return[{type:p.ApiService},{type:u.I18nService},{type:d.PlatformUtilsService},{type:m.PasswordGenerationService},{type:f.PolicyService},{type:h.CryptoService}]}),{name:[{type:o.Input}],email:[{type:o.Input}],id:[{type:o.Input}],organizationId:[{type:o.Input}],onPasswordReset:[{type:o.Output}]})},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&(n[0].checked=!0,n[0].readOnly=e.readOnly,n[0].hidePasswords=e.hidePasswords)})),[3,5];case 4:return n.sent(),[3,5];case 5:return[3,7];case 6:this.title=this.i18nService.t("inviteUser"),n.label=7;case 7:return this.loading=!1,[2]}}))}))},e.prototype.loadCollections=function(){return r(this,void 0,void 0,(function(){var e,t,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.apiService.getCollections(this.organizationId)];case 1:return e=r.sent(),t=e.data.map((function(e){return new s.Collection(new a.CollectionData(e))})),n=this,[4,this.collectionService.decryptMany(t)];case 2:return n.collections=r.sent(),[2]}}))}))},e.prototype.check=function(e,t){e.checked=null==t?!e.checked:t,e.checked||(e.readOnly=!1)},e.prototype.selectAll=function(e){var t=this;this.collections.forEach((function(n){return t.check(n,e)}))},e.prototype.setRequestPermissions=function(e,t){return Object.assign(e,t?new d.PermissionsApi:this.permissions),e},e.prototype.handleDependentPermissions=function(){this.permissions.manageResetPassword&&!this.permissions.manageUsers&&(this.permissions.manageUsers=!0,document.getElementById("manageUsers").checked=!0,this.platformUtilsService.showToast("info",null,this.i18nService.t("resetPasswordManageUsers")))},e.prototype.submit=function(){var e,t;return r(this,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:n=null,"all"!==this.access&&(n=this.collections.filter((function(e){return e.checked})).map((function(e){return new p.SelectionReadOnlyRequest(e.id,!!e.readOnly,!!e.hidePasswords)}))),i.label=1;case 1:return i.trys.push([1,3,,4]),this.editMode?((r=new c.OrganizationUserUpdateRequest).accessAll="all"===this.access,r.type=this.type,r.collections=n,r.permissions=this.setRequestPermissions(null!==(e=r.permissions)&&void 0!==e?e:new d.PermissionsApi,r.type!==u.OrganizationUserType.Custom),this.formPromise=this.apiService.putOrganizationUser(this.organizationId,this.organizationUserId,r)):((r=new l.OrganizationUserInviteRequest).emails=this.emails.trim().split(/\s*,\s*/),r.accessAll="all"===this.access,r.type=this.type,r.permissions=this.setRequestPermissions(null!==(t=r.permissions)&&void 0!==t?t:new d.PermissionsApi,r.type!==u.OrganizationUserType.Custom),r.collections=n,this.formPromise=this.apiService.postOrganizationUserInvite(this.organizationId,r)),[4,this.formPromise];case 2:return i.sent(),this.toasterService.popAsync("success",null,this.i18nService.t(this.editMode?"editedUserId":"invitedUsers",this.name)),this.onSavedUser.emit(),[3,4];case 3:return i.sent(),[3,4];case 4:return[2]}}))}))},e.prototype.delete=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.editMode?[4,this.platformUtilsService.showDialog(this.i18nService.t("removeUserConfirmation"),this.name,this.i18nService.t("yes"),this.i18nService.t("no"),"warning")]:[2];case 1:if(!e.sent())return[2,!1];e.label=2;case 2:return e.trys.push([2,4,,5]),this.deletePromise=this.apiService.deleteOrganizationUser(this.organizationId,this.organizationUserId),[4,this.deletePromise];case 3:return e.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("removedUserId",this.name)),this.onDeletedUser.emit(),[3,5];case 4:return e.sent(),[3,5];case 5:return[2]}}))}))},e.ɵfac=function(t){return new(t||e)(m.ɵɵdirectiveInject(f.ApiService),m.ɵɵdirectiveInject(h.I18nService),m.ɵɵdirectiveInject(v.ToasterService),m.ɵɵdirectiveInject(y.CollectionService),m.ɵɵdirectiveInject(g.PlatformUtilsService))},e.ɵcmp=m.ɵɵdefineComponent({type:e,selectors:[["app-user-add-edit"]],inputs:{name:"name",organizationUserId:"organizationUserId",organizationId:"organizationId"},outputs:{onSavedUser:"onSavedUser",onDeletedUser:"onDeletedUser"},decls:51,vars:19,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","userAddEditTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-lg"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","userAddEditTitle",1,"modal-title"],["class","text-muted",4,"ngIf"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"ml-auto"],["type","button","class","btn btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click",4,"ngIf"],[1,"text-muted"],[1,"modal-body"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],[4,"ngIf"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/article/user-types-access-control/#user-types",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-question-circle-o"],[1,"form-check","mt-2","form-check-block"],["type","radio","name","userType","id","userTypeUser",1,"form-check-input",3,"value","ngModel","ngModelChange"],["for","userTypeUser",1,"form-check-label"],["type","radio","name","userType","id","userTypeManager",1,"form-check-input",3,"value","ngModel","ngModelChange"],["for","userTypeManager",1,"form-check-label"],["type","radio","name","userType","id","userTypeAdmin",1,"form-check-input",3,"value","ngModel","ngModelChange"],["for","userTypeAdmin",1,"form-check-label"],["type","radio","name","userType","id","userTypeOwner",1,"form-check-input",3,"value","ngModel","ngModelChange"],["for","userTypeOwner",1,"form-check-label"],["type","radio","name","userType","id","userTypeCustom",1,"form-check-input",3,"value","ngModel","ngModelChange"],["for","userTypeCustom",1,"form-check-label"],[1,"mt-4","d-flex"],[1,"mb-3"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/article/user-types-access-control/#access-control",3,"appA11yTitle"],["class","ml-auto",4,"ngIf"],[1,"form-group",3,"ngClass"],[1,"form-check"],["type","radio","name","access","id","accessAll","value","all",1,"form-check-input",3,"ngModel","ngModelChange"],["for","accessAll",1,"form-check-label"],["type","radio","name","access","id","accessSelected","value","selected",1,"form-check-input",3,"ngModel","ngModelChange"],["for","accessSelected",1,"form-check-label"],[1,"form-group","mb-4"],["for","emails"],["id","emails","type","text","name","Emails","required","","appAutoFocus","",1,"form-control",3,"ngModel","ngModelChange"],[1,"row"],[1,"col-6"],[1,"font-weight-bold","mb-0"],[1,"my-0","mr-2"],["parentId","manageAssignedCollections",3,"checkboxes"],[1,"form-group","mb-0"],[1,"form-check","mt-1","form-check-block"],["type","checkbox","name","accessEventLogs","id","accessEventLogs",1,"form-check-input",3,"ngModel","ngModelChange"],["for","accessEventLogs",1,"form-check-label","font-weight-normal"],["type","checkbox","name","accessImportExport","id","accessImportExport",1,"form-check-input",3,"ngModel","ngModelChange"],["for","accessImportExport",1,"form-check-label","font-weight-normal"],["type","checkbox","name","accessReports","id","accessReports",1,"form-check-input",3,"ngModel","ngModelChange"],["for","accessReports",1,"form-check-label","font-weight-normal"],["parentId","manageAllCollections",3,"checkboxes"],["type","checkbox","name","manageGroups","id","manageGroups",1,"form-check-input",3,"ngModel","ngModelChange"],["for","manageGroups",1,"form-check-label","font-weight-normal"],["type","checkbox","name","manageSso","id","managePolicies",1,"form-check-input",3,"ngModel","ngModelChange"],["for","manageSso",1,"form-check-label","font-weight-normal"],["type","checkbox","name","managePolicies","id","managePolicies",1,"form-check-input",3,"ngModel","ngModelChange"],["for","managePolicies",1,"form-check-label","font-weight-normal"],["type","checkbox","name","manageUsers","id","manageUsers",1,"form-check-input",3,"ngModel","ngModelChange","change"],["for","manageUsers",1,"form-check-label","font-weight-normal"],["type","checkbox","name","manageResetPassword","id","manageResetPassword",1,"form-check-input",3,"ngModel","ngModelChange","change"],["for","manageResetPassword",1,"form-check-label","font-weight-normal"],["type","button",1,"btn","btn-link","btn-sm","py-0",3,"click"],["class","table table-hover table-list mb-0",4,"ngIf"],[1,"table","table-hover","table-list","mb-0"],["width","100",1,"text-center"],[4,"ngFor","ngForOf"],[1,"table-list-checkbox",3,"click"],["type","checkbox","appStopProp","",3,"ngModel","name","ngModelChange"],[3,"click"],[1,"text-center"],["type","checkbox",3,"ngModel","name","disabled","ngModelChange"],["type","button",1,"btn","btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click"],["deleteBtn",""],["aria-hidden","true",1,"fa","fa-trash-o","fa-lg","fa-fw",3,"hidden"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","fa-lg","fa-fw",3,"hidden","title"]],template:function(e,t){if(1&e&&(m.ɵɵelementStart(0,"div",0),m.ɵɵtext(1," "),m.ɵɵelementStart(2,"div",1),m.ɵɵtext(3," "),m.ɵɵelementStart(4,"form",2,3),m.ɵɵlistener("ngSubmit",(function(){return t.submit()})),m.ɵɵtext(6," "),m.ɵɵelementStart(7,"div",4),m.ɵɵtext(8," "),m.ɵɵelementStart(9,"h2",5),m.ɵɵtext(10),m.ɵɵtemplate(11,P,2,1,"small",6),m.ɵɵtext(12," "),m.ɵɵelementEnd(),m.ɵɵtext(13," "),m.ɵɵelementStart(14,"button",7),m.ɵɵpipe(15,"i18n"),m.ɵɵtext(16," "),m.ɵɵelementStart(17,"span",8),m.ɵɵtext(18,"×"),m.ɵɵelementEnd(),m.ɵɵtext(19," "),m.ɵɵelementEnd(),m.ɵɵtext(20," "),m.ɵɵelementEnd(),m.ɵɵtext(21," "),m.ɵɵtemplate(22,k,9,6,"div",9),m.ɵɵtext(23," "),m.ɵɵtemplate(24,U,119,67,"div",9),m.ɵɵtext(25," "),m.ɵɵelementStart(26,"div",10),m.ɵɵtext(27," "),m.ɵɵelementStart(28,"button",11),m.ɵɵtext(29," "),m.ɵɵelement(30,"i",12),m.ɵɵpipe(31,"i18n"),m.ɵɵtext(32," "),m.ɵɵelementStart(33,"span"),m.ɵɵtext(34),m.ɵɵpipe(35,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(36," "),m.ɵɵelementEnd(),m.ɵɵtext(37," "),m.ɵɵelementStart(38,"button",13),m.ɵɵtext(39),m.ɵɵpipe(40,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(41," "),m.ɵɵelementStart(42,"div",14),m.ɵɵtext(43," "),m.ɵɵtemplate(44,j,9,10,"button",15),m.ɵɵtext(45," "),m.ɵɵelementEnd(),m.ɵɵtext(46," "),m.ɵɵelementEnd(),m.ɵɵtext(47," "),m.ɵɵelementEnd(),m.ɵɵtext(48," "),m.ɵɵelementEnd(),m.ɵɵtext(49," "),m.ɵɵelementEnd(),m.ɵɵtext(50," ")),2&e){var n=m.ɵɵreference(5);m.ɵɵadvance(4),m.ɵɵproperty("appApiAction",t.formPromise),m.ɵɵadvance(6),m.ɵɵtextInterpolate1(" ",t.title," "),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",t.name),m.ɵɵadvance(3),m.ɵɵpropertyInterpolate("appA11yTitle",m.ɵɵpipeBind1(15,11,"close")),m.ɵɵadvance(8),m.ɵɵproperty("ngIf",t.loading),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",!t.loading),m.ɵɵadvance(4),m.ɵɵproperty("disabled",n.loading),m.ɵɵadvance(2),m.ɵɵpropertyInterpolate("title",m.ɵɵpipeBind1(31,13,"loading")),m.ɵɵadvance(4),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(35,15,"save")),m.ɵɵadvance(5),m.ɵɵtextInterpolate1(" ",m.ɵɵpipeBind1(40,17,"cancel")," "),m.ɵɵadvance(5),m.ɵɵproperty("ngIf",t.editMode)}},directives:[x.NgControlStatusGroup,x.NgForm,b.ApiActionDirective,S.NgIf,w.A11yTitleDirective,x.RadioControlValueAccessor,x.DefaultValueAccessor,x.NgControlStatus,x.NgModel,S.NgClass,x.RequiredValidator,C.NestedCheckboxComponent,x.CheckboxControlValueAccessor,S.NgForOf,I.StopPropDirective],pipes:[E.I18nPipe],encapsulation:2}),e}();t.UserAddEditComponent=V,("undefined"==typeof ngDevMode||ngDevMode)&&m.ɵsetClassMetadata(V,[{type:o.Component,args:[{selector:"app-user-add-edit",templateUrl:"user-add-edit.component.html"}]}],(function(){return[{type:f.ApiService},{type:h.I18nService},{type:v.ToasterService},{type:y.CollectionService},{type:g.PlatformUtilsService}]}),{name:[{type:o.Input}],organizationUserId:[{type:o.Input}],organizationId:[{type:o.Input}],onSavedUser:[{type:o.Output}],onDeletedUser:[{type:o.Output}]})},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&(t[0].checked=!0)})),[3,5];case 4:return i.sent(),[3,5];case 5:return this.loading=!1,[2]}}))}))},e.prototype.check=function(e,t){e.checked=null==t?!e.checked:t,e.checked||(e.readOnly=!1)},e.prototype.selectAll=function(e){var t=this;this.groups.forEach((function(n){return t.check(n,e)}))},e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:(e=new a.OrganizationUserUpdateGroupsRequest).groupIds=this.groups.filter((function(e){return e.checked})).map((function(e){return e.id})),t.label=1;case 1:return t.trys.push([1,3,,4]),this.formPromise=this.apiService.putOrganizationUserGroups(this.organizationId,this.organizationUserId,e),[4,this.formPromise];case 2:return t.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("editedGroupsForUser",this.name)),this.onSavedUser.emit(),[3,4];case 3:return t.sent(),[3,4];case 4:return[2]}}))}))},e.ɵfac=function(t){return new(t||e)(l.ɵɵdirectiveInject(c.ApiService),l.ɵɵdirectiveInject(p.I18nService),l.ɵɵdirectiveInject(u.ToasterService))},e.ɵcmp=l.ɵɵdefineComponent({type:e,selectors:[["app-user-groups"]],inputs:{name:"name",organizationUserId:"organizationUserId",organizationId:"organizationId"},outputs:{onSavedUser:"onSavedUser"},decls:47,vars:20,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","groupAccessTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable"],[1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","groupAccessTitle",1,"modal-title"],["class","text-muted",4,"ngIf"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"text-muted"],[1,"modal-body"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],[4,"ngIf"],["class","table table-hover table-list mb-0",4,"ngIf"],[1,"table","table-hover","table-list","mb-0"],[4,"ngFor","ngForOf"],[1,"table-list-checkbox",3,"click"],["type","checkbox","appStopProp","",3,"ngModel","name","ngModelChange"],[3,"click"]],template:function(e,t){if(1&e&&(l.ɵɵelementStart(0,"div",0),l.ɵɵtext(1," "),l.ɵɵelementStart(2,"div",1),l.ɵɵtext(3," "),l.ɵɵelementStart(4,"form",2,3),l.ɵɵlistener("ngSubmit",(function(){return t.submit()})),l.ɵɵtext(6," "),l.ɵɵelementStart(7,"div",4),l.ɵɵtext(8," "),l.ɵɵelementStart(9,"h2",5),l.ɵɵtext(10),l.ɵɵpipe(11,"i18n"),l.ɵɵtemplate(12,g,2,1,"small",6),l.ɵɵtext(13," "),l.ɵɵelementEnd(),l.ɵɵtext(14," "),l.ɵɵelementStart(15,"button",7),l.ɵɵpipe(16,"i18n"),l.ɵɵtext(17," "),l.ɵɵelementStart(18,"span",8),l.ɵɵtext(19,"×"),l.ɵɵelementEnd(),l.ɵɵtext(20," "),l.ɵɵelementEnd(),l.ɵɵtext(21," "),l.ɵɵelementEnd(),l.ɵɵtext(22," "),l.ɵɵtemplate(23,x,9,6,"div",9),l.ɵɵtext(24," "),l.ɵɵtemplate(25,C,10,5,"div",9),l.ɵɵtext(26," "),l.ɵɵelementStart(27,"div",10),l.ɵɵtext(28," "),l.ɵɵelementStart(29,"button",11),l.ɵɵtext(30," "),l.ɵɵelement(31,"i",12),l.ɵɵpipe(32,"i18n"),l.ɵɵtext(33," "),l.ɵɵelementStart(34,"span"),l.ɵɵtext(35),l.ɵɵpipe(36,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(37," "),l.ɵɵelementEnd(),l.ɵɵtext(38," "),l.ɵɵelementStart(39,"button",13),l.ɵɵtext(40),l.ɵɵpipe(41,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(42," "),l.ɵɵelementEnd(),l.ɵɵtext(43," "),l.ɵɵelementEnd(),l.ɵɵtext(44," "),l.ɵɵelementEnd(),l.ɵɵtext(45," "),l.ɵɵelementEnd(),l.ɵɵtext(46," ")),2&e){var n=l.ɵɵreference(5);l.ɵɵadvance(4),l.ɵɵproperty("appApiAction",t.formPromise),l.ɵɵadvance(6),l.ɵɵtextInterpolate1(" ",l.ɵɵpipeBind1(11,10,"groupAccess")," "),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",t.name),l.ɵɵadvance(3),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(16,12,"close")),l.ɵɵadvance(8),l.ɵɵproperty("ngIf",t.loading),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",!t.loading),l.ɵɵadvance(4),l.ɵɵproperty("disabled",n.loading),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(32,14,"loading")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(36,16,"save")),l.ɵɵadvance(5),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(41,18,"cancel"))}},directives:[d.ɵangular_packages_forms_forms_ba,d.NgControlStatusGroup,d.NgForm,m.ApiActionDirective,f.NgIf,h.A11yTitleDirective,f.NgForOf,d.CheckboxControlValueAccessor,v.StopPropDirective,d.NgControlStatus,d.NgModel],pipes:[y.I18nPipe],encapsulation:2}),e}();t.UserGroupsComponent=I,("undefined"==typeof ngDevMode||ngDevMode)&&l.ɵsetClassMetadata(I,[{type:o.Component,args:[{selector:"app-user-groups",templateUrl:"user-groups.component.html"}]}],(function(){return[{type:c.ApiService},{type:p.I18nService},{type:u.ToasterService}]}),{name:[{type:o.Input}],organizationUserId:[{type:o.Input}],organizationId:[{type:o.Input}],onSavedUser:[{type:o.Output}]})},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0?e.data:[],this.orgPolicies.forEach((function(e){t.policiesEnabledMap.set(e.type,e.enabled)})),this.loading=!1,[2]}}))}))},e.prototype.edit=function(e){return r(this,void 0,void 0,(function(){var t,n=this;return i(this,(function(r){switch(r.label){case 0:return[4,this.modalService.openViewRef(a.PolicyEditComponent,this.editModalRef,(function(r){r.policy=e,r.organizationId=n.organizationId,r.policiesEnabledMap=n.policiesEnabledMap,r.onSavedPolicy.subscribe((function(){t.close(),n.load()}))}))];case 1:return t=r.sent()[0],[2]}}))}))},e.ɵfac=function(t){return new(t||e)(s.ɵɵdirectiveInject(l.ApiService),s.ɵɵdirectiveInject(c.ActivatedRoute),s.ɵɵdirectiveInject(p.ModalService),s.ɵɵdirectiveInject(u.UserService),s.ɵɵdirectiveInject(d.PolicyListService),s.ɵɵdirectiveInject(c.Router))},e.ɵcmp=s.ɵɵdefineComponent({type:e,selectors:[["app-org-policies"]],viewQuery:function(e,t){if(1&e&&s.ɵɵviewQuery(v,3,o.ViewContainerRef),2&e){var n;s.ɵɵqueryRefresh(n=s.ɵɵloadQuery())&&(t.editModalRef=n.first)}},decls:14,vars:5,consts:[[1,"page-header","d-flex"],[4,"ngIf"],["class","table table-hover table-list",4,"ngIf"],["editTemplate",""],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],[1,"table","table-hover","table-list"],[4,"ngFor","ngForOf"],["href","#","appStopClick","",3,"click"],["class","badge badge-success",4,"ngIf"],[1,"text-muted","d-block"],[1,"badge","badge-success"]],template:function(e,t){1&e&&(s.ɵɵelementStart(0,"div",0),s.ɵɵtext(1," "),s.ɵɵelementStart(2,"h1"),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5," "),s.ɵɵelementEnd(),s.ɵɵtext(6," "),s.ɵɵtemplate(7,y,9,6,"ng-container",1),s.ɵɵtext(8," "),s.ɵɵtemplate(9,S,7,1,"table",2),s.ɵɵtext(10," "),s.ɵɵtemplate(11,w,0,0,"ng-template",null,3,s.ɵɵtemplateRefExtractor),s.ɵɵtext(13," ")),2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(4,3,"policies")),s.ɵɵadvance(4),s.ɵɵproperty("ngIf",t.loading),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!t.loading))},directives:[m.NgIf,m.NgForOf,f.StopClickDirective],pipes:[h.I18nPipe],encapsulation:2}),e}();t.PoliciesComponent=C,("undefined"==typeof ngDevMode||ngDevMode)&&s.ɵsetClassMetadata(C,[{type:o.Component,args:[{selector:"app-org-policies",templateUrl:"policies.component.html"}]}],(function(){return[{type:l.ApiService},{type:c.ActivatedRoute},{type:p.ModalService},{type:u.UserService},{type:d.PolicyListService},{type:c.Router}]}),{editModalRef:[{type:o.ViewChild,args:["editTemplate",{read:o.ViewContainerRef,static:!0}]}]})},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]1?"×"+n.quantity:""," @ ",s.ɵɵpipeBind2(4,5,n.amount,"$")," "),s.ɵɵadvance(4),s.ɵɵtextInterpolate2(" ",s.ɵɵpipeBind2(8,8,n.quantity*n.amount,"$")," /",s.ɵɵpipeBind1(9,11,n.interval)," ")}}function T(e,t){if(1&e&&(s.ɵɵelementStart(0,"div",26),s.ɵɵtext(1," "),s.ɵɵelementStart(2,"strong",27),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5," "),s.ɵɵelementStart(6,"table",28),s.ɵɵtext(7," "),s.ɵɵelementStart(8,"tbody"),s.ɵɵtext(9," "),s.ɵɵtemplate(10,M,11,13,"tr",29),s.ɵɵtext(11," "),s.ɵɵelementEnd(),s.ɵɵtext(12," "),s.ɵɵelementEnd(),s.ɵɵtext(13," "),s.ɵɵelementEnd()),2&e){var n=s.ɵɵnextContext(3);s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(4,2,"details")),s.ɵɵadvance(7),s.ɵɵproperty("ngForOf",n.subscription.items)}}function D(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1," "),s.ɵɵelementStart(2,"div",30),s.ɵɵtext(3," "),s.ɵɵelementStart(4,"dl"),s.ɵɵtext(5," "),s.ɵɵelementStart(6,"dt"),s.ɵɵtext(7),s.ɵɵpipe(8,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(9," "),s.ɵɵelementStart(10,"dd"),s.ɵɵtext(11),s.ɵɵpipe(12,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(13," "),s.ɵɵelementEnd(),s.ɵɵtext(14," "),s.ɵɵelementEnd(),s.ɵɵtext(15," "),s.ɵɵelementContainerEnd()),2&e){var n=s.ɵɵnextContext(3);s.ɵɵadvance(7),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(8,2,"provider")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind2(12,4,"yourProviderIs",n.userOrg.providerName))}}function R(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"button",31),s.ɵɵlistener("click",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext(3).changePlan()})),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()}2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(2,1,"changeBillingPlan")," "))}function B(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"app-change-plan",32),s.ɵɵlistener("onChanged",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext(3).closeChangePlan(!0)}))("onCanceled",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext(3).closeChangePlan(!1)})),s.ɵɵelementEnd()}if(2&e){var r=s.ɵɵnextContext(3);s.ɵɵproperty("organizationId",r.organizationId)}}function U(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementContainerStart(0),s.ɵɵtext(1," "),s.ɵɵelementStart(2,"div",33),s.ɵɵtext(3," "),s.ɵɵelementStart(4,"app-adjust-subscription",34),s.ɵɵlistener("onAdjusted",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext(3).subscriptionAdjusted()})),s.ɵɵtext(5," "),s.ɵɵelementEnd(),s.ɵɵtext(6," "),s.ɵɵelementEnd(),s.ɵɵtext(7," "),s.ɵɵelementContainerEnd()}if(2&e){var r=s.ɵɵnextContext(3);s.ɵɵadvance(4),s.ɵɵproperty("seatPrice",r.seatPrice)("organizationId",r.organizationId)("interval",r.billingInterval)("currentSeatCount",r.seats)("maxAutoscaleSeats",r.maxAutoscaleSeats)}}function j(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",19),s.ɵɵtext(1," "),s.ɵɵelementStart(2,"button",31),s.ɵɵlistener("click",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext(4).adjustStorage(!0)})),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5," "),s.ɵɵelementStart(6,"button",37),s.ɵɵlistener("click",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext(4).adjustStorage(!1)})),s.ɵɵtext(7),s.ɵɵpipe(8,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(9," "),s.ɵɵelementEnd()}2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(4,2,"addStorage")," "),s.ɵɵadvance(4),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(8,4,"removeStorage")," "))}function V(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"app-adjust-storage",38),s.ɵɵlistener("onAdjusted",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext(4).closeStorage(!0)}))("onCanceled",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext(4).closeStorage(!1)})),s.ɵɵelementEnd()}if(2&e){var r=s.ɵɵnextContext(4);s.ɵɵproperty("storageGbPrice",r.storageGbPrice)("add",r.adjustStorageAdd)("organizationId",r.organizationId)("interval",r.billingInterval)}}function F(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1," "),s.ɵɵelementStart(2,"div",33),s.ɵɵtext(3," "),s.ɵɵtemplate(4,j,10,6,"div",35),s.ɵɵtext(5," "),s.ɵɵtemplate(6,V,1,4,"app-adjust-storage",36),s.ɵɵtext(7," "),s.ɵɵelementEnd(),s.ɵɵtext(8," "),s.ɵɵelementContainerEnd()),2&e){var n=s.ɵɵnextContext(3);s.ɵɵadvance(4),s.ɵɵproperty("ngIf",!n.showAdjustStorage),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",n.showAdjustStorage)}}function N(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"button",39),s.ɵɵlistener("click",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext(3).downloadLicense()})),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()}if(2&e){var r=s.ɵɵnextContext(3);s.ɵɵproperty("disabled",r.showDownloadLicense),s.ɵɵadvance(1),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(2,2,"downloadLicense")," ")}}function z(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"button",40,41),s.ɵɵlistener("click",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext(3).cancel()})),s.ɵɵtext(2," "),s.ɵɵelement(3,"i",9),s.ɵɵpipe(4,"i18n"),s.ɵɵtext(5," "),s.ɵɵelementStart(6,"span"),s.ɵɵtext(7),s.ɵɵpipe(8,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(9," "),s.ɵɵelementEnd()}if(2&e){var r=s.ɵɵreference(1),i=s.ɵɵnextContext(3);s.ɵɵproperty("appApiAction",i.cancelPromise)("disabled",r.loading),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(4,4,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(8,6,"cancelSubscription"))}}function L(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",33),s.ɵɵtext(1," "),s.ɵɵelementStart(2,"app-download-license",42),s.ɵɵlistener("onDownloaded",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext(3).closeDownloadLicense()}))("onCanceled",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext(3).closeDownloadLicense()})),s.ɵɵelementEnd(),s.ɵɵtext(3," "),s.ɵɵelementEnd()}if(2&e){var r=s.ɵɵnextContext(3);s.ɵɵadvance(2),s.ɵɵproperty("organizationId",r.organizationId)}}var K=function(e){return{width:e}};function G(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1," "),s.ɵɵelementStart(2,"div",10),s.ɵɵtext(3," "),s.ɵɵelementStart(4,"div",11),s.ɵɵtext(5," "),s.ɵɵelementStart(6,"dl"),s.ɵɵtext(7," "),s.ɵɵelementStart(8,"dt"),s.ɵɵtext(9),s.ɵɵpipe(10,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(11," "),s.ɵɵelementStart(12,"dd"),s.ɵɵtext(13),s.ɵɵelementEnd(),s.ɵɵtext(14," "),s.ɵɵtemplate(15,O,23,15,"ng-container",1),s.ɵɵtext(16," "),s.ɵɵelementEnd(),s.ɵɵtext(17," "),s.ɵɵelementEnd(),s.ɵɵtext(18," "),s.ɵɵtemplate(19,T,14,4,"div",12),s.ɵɵtext(20," "),s.ɵɵtemplate(21,D,16,7,"ng-container",1),s.ɵɵtext(22," "),s.ɵɵelementEnd(),s.ɵɵtext(23," "),s.ɵɵelementContainerStart(24),s.ɵɵtext(25," "),s.ɵɵtemplate(26,R,3,3,"button",13),s.ɵɵtext(27," "),s.ɵɵtemplate(28,B,1,1,"app-change-plan",14),s.ɵɵtext(29," "),s.ɵɵelementContainerEnd(),s.ɵɵtext(30," "),s.ɵɵelementStart(31,"h2",15),s.ɵɵtext(32),s.ɵɵpipe(33,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(34," "),s.ɵɵelementStart(35,"p",16),s.ɵɵtext(36),s.ɵɵelementEnd(),s.ɵɵtext(37," "),s.ɵɵtemplate(38,U,8,5,"ng-container",1),s.ɵɵtext(39," "),s.ɵɵelementStart(40,"h2",15),s.ɵɵtext(41),s.ɵɵpipe(42,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(43," "),s.ɵɵelementStart(44,"p"),s.ɵɵtext(45),s.ɵɵpipe(46,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(47," "),s.ɵɵelementStart(48,"div",17),s.ɵɵtext(49," "),s.ɵɵelementStart(50,"div",18),s.ɵɵtext(51),s.ɵɵpipe(52,"percent"),s.ɵɵelementEnd(),s.ɵɵtext(53," "),s.ɵɵelementEnd(),s.ɵɵtext(54," "),s.ɵɵtemplate(55,F,9,2,"ng-container",1),s.ɵɵtext(56," "),s.ɵɵelementStart(57,"h2",15),s.ɵɵtext(58),s.ɵɵpipe(59,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(60," "),s.ɵɵelementStart(61,"p",16),s.ɵɵtext(62),s.ɵɵpipe(63,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(64," "),s.ɵɵelementStart(65,"div",19),s.ɵɵtext(66," "),s.ɵɵtemplate(67,N,3,4,"button",20),s.ɵɵtext(68," "),s.ɵɵtemplate(69,z,10,8,"button",21),s.ɵɵtext(70," "),s.ɵɵelementEnd(),s.ɵɵtext(71," "),s.ɵɵtemplate(72,L,4,1,"div",22),s.ɵɵtext(73," "),s.ɵɵelementContainerEnd()),2&e){var n=s.ɵɵnextContext(2);s.ɵɵadvance(9),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(10,21,"billingPlan")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(n.sub.plan.name),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",n.subscription),s.ɵɵadvance(4),s.ɵɵproperty("ngIf",n.subscription),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",null!=(null==n.userOrg?null:n.userOrg.providerId)),s.ɵɵadvance(5),s.ɵɵproperty("ngIf",n.showChangePlanButton),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",n.showChangePlan),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(33,23,"manageSubscription")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(n.subscriptionDesc),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",n.subscription&&n.canAdjustSeats&&!n.subscription.cancelled&&!n.subscriptionMarkedForCancel),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(42,25,"storage")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind3(46,27,"subscriptionStorage",n.sub.maxStorageGb||0,n.sub.storageName||"0 MB")),s.ɵɵadvance(5),s.ɵɵproperty("ngStyle",s.ɵɵpureFunction1(37,K,n.storageProgressWidth+"%")),s.ɵɵattribute("aria-valuenow",n.storagePercentage),s.ɵɵadvance(1),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(52,31,n.storagePercentage/100),""),s.ɵɵadvance(4),s.ɵɵproperty("ngIf",n.subscription&&!n.subscription.cancelled&&!n.subscriptionMarkedForCancel),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(59,33,"additionalOptions")),s.ɵɵadvance(4),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(63,35,"additionalOptionsDesc")," "),s.ɵɵadvance(5),s.ɵɵproperty("ngIf",n.canDownloadLicense),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",n.subscription&&!n.subscription.cancelled&&!n.subscriptionMarkedForCancel),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",n.showDownloadLicense)}}function q(e,t){1&e&&(s.ɵɵelementStart(0,"span",46),s.ɵɵtext(1," "),s.ɵɵelement(2,"i",47),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(4,1,"licenseIsExpired")," "))}function W(e,t){if(1&e&&(s.ɵɵelementStart(0,"dd"),s.ɵɵtext(1),s.ɵɵpipe(2,"date"),s.ɵɵtemplate(3,q,5,3,"span",45),s.ɵɵtext(4," "),s.ɵɵelementEnd()),2&e){var n=s.ɵɵnextContext(3);s.ɵɵadvance(1),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind2(2,2,n.sub.expiration,"mediumDate")," "),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",n.isExpired)}}function H(e,t){1&e&&(s.ɵɵelementStart(0,"dd"),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(2,1,"neverExpires")))}function $(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",48),s.ɵɵtext(1," "),s.ɵɵelementStart(2,"div",49),s.ɵɵtext(3," "),s.ɵɵelementStart(4,"button",50),s.ɵɵlistener("click",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext(3).closeUpdateLicense(!1)})),s.ɵɵpipe(5,"i18n"),s.ɵɵelementStart(6,"span",51),s.ɵɵtext(7,"×"),s.ɵɵelementEnd(),s.ɵɵelementEnd(),s.ɵɵtext(8," "),s.ɵɵelementStart(9,"h3",52),s.ɵɵtext(10),s.ɵɵpipe(11,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(12," "),s.ɵɵelementStart(13,"app-update-license",53),s.ɵɵlistener("onUpdated",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext(3).closeUpdateLicense(!0)}))("onCanceled",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext(3).closeUpdateLicense(!1)})),s.ɵɵelementEnd(),s.ɵɵtext(14," "),s.ɵɵelementEnd(),s.ɵɵtext(15," "),s.ɵɵelementEnd()}if(2&e){var r=s.ɵɵnextContext(3);s.ɵɵadvance(4),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(5,3,"cancel")),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(11,5,"updateLicense")),s.ɵɵadvance(3),s.ɵɵproperty("organizationId",r.organizationId)}}function Q(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementContainerStart(0),s.ɵɵtext(1," "),s.ɵɵelementStart(2,"dl"),s.ɵɵtext(3," "),s.ɵɵelementStart(4,"dt"),s.ɵɵtext(5),s.ɵɵpipe(6,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(7," "),s.ɵɵelementStart(8,"dd"),s.ɵɵtext(9),s.ɵɵelementEnd(),s.ɵɵtext(10," "),s.ɵɵelementStart(11,"dt"),s.ɵɵtext(12),s.ɵɵpipe(13,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(14," "),s.ɵɵtemplate(15,W,5,5,"dd",1),s.ɵɵtext(16," "),s.ɵɵtemplate(17,H,3,3,"dd",1),s.ɵɵtext(18," "),s.ɵɵelementEnd(),s.ɵɵtext(19," "),s.ɵɵelementStart(20,"div"),s.ɵɵtext(21," "),s.ɵɵelementStart(22,"button",31),s.ɵɵlistener("click",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext(2).updateLicense()})),s.ɵɵtext(23),s.ɵɵpipe(24,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(25," "),s.ɵɵelementStart(26,"a",43),s.ɵɵtext(27),s.ɵɵpipe(28,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(29," "),s.ɵɵelementEnd(),s.ɵɵtext(30," "),s.ɵɵtemplate(31,$,16,7,"div",44),s.ɵɵtext(32," "),s.ɵɵelementContainerEnd()}if(2&e){var r=s.ɵɵnextContext(2);s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(6,8,"billingPlan")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(r.sub.plan.name),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(13,10,"expiration")),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",r.sub.expiration),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!r.sub.expiration),s.ɵɵadvance(6),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(24,12,"updateLicense")," "),s.ɵɵadvance(4),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(28,14,"manageSubscription")," "),s.ɵɵadvance(4),s.ɵɵproperty("ngIf",r.showUpdateLicense)}}function Y(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1," "),s.ɵɵtemplate(2,k,4,6,"app-callout",5),s.ɵɵtext(3," "),s.ɵɵtemplate(4,_,18,14,"app-callout",5),s.ɵɵtext(5," "),s.ɵɵtemplate(6,G,74,39,"ng-container",1),s.ɵɵtext(7," "),s.ɵɵtemplate(8,Q,33,16,"ng-container",1),s.ɵɵtext(9," "),s.ɵɵelementContainerEnd()),2&e){var n=s.ɵɵnextContext();s.ɵɵadvance(2),s.ɵɵproperty("ngIf",n.subscription&&n.subscription.cancelled),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",n.subscriptionMarkedForCancel),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!n.selfHosted),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",n.selfHosted)}}var J=function(){function e(e,t,n,r,i,o,a){this.apiService=e,this.platformUtilsService=t,this.i18nService=n,this.toasterService=r,this.messagingService=i,this.route=o,this.userService=a,this.loading=!1,this.firstLoaded=!1,this.adjustSeatsAdd=!0,this.showAdjustSeats=!1,this.showAdjustSeatAutoscale=!1,this.adjustStorageAdd=!0,this.showAdjustStorage=!1,this.showUpdateLicense=!1,this.showDownloadLicense=!1,this.showChangePlan=!1,this.selfHosted=!1,this.selfHosted=t.isSelfHost()}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){var e=this;return i(this,(function(t){return this.route.parent.parent.params.subscribe((function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.organizationId=t.organizationId,[4,this.load()];case 1:return e.sent(),this.firstLoaded=!0,[2]}}))}))})),[2]}))}))},e.prototype.load=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return this.loading?[2]:(this.loading=!0,e=this,[4,this.userService.getOrganization(this.organizationId)]);case 1:return e.userOrg=n.sent(),t=this,[4,this.apiService.getOrganizationSubscription(this.organizationId)];case 2:return t.sub=n.sent(),this.loading=!1,[2]}}))}))},e.prototype.reinstate=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.loading?[2]:[4,this.platformUtilsService.showDialog(this.i18nService.t("reinstateConfirmation"),this.i18nService.t("reinstateSubscription"),this.i18nService.t("yes"),this.i18nService.t("cancel"))];case 1:if(!e.sent())return[2];e.label=2;case 2:return e.trys.push([2,4,,5]),this.reinstatePromise=this.apiService.postOrganizationReinstate(this.organizationId),[4,this.reinstatePromise];case 3:return e.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("reinstated")),this.load(),[3,5];case 4:return e.sent(),[3,5];case 5:return[2]}}))}))},e.prototype.cancel=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.loading?[2]:[4,this.platformUtilsService.showDialog(this.i18nService.t("cancelConfirmation"),this.i18nService.t("cancelSubscription"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")];case 1:if(!e.sent())return[2];e.label=2;case 2:return e.trys.push([2,4,,5]),this.cancelPromise=this.apiService.postOrganizationCancel(this.organizationId),[4,this.cancelPromise];case 3:return e.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("canceledSubscription")),this.load(),[3,5];case 4:return e.sent(),[3,5];case 5:return[2]}}))}))},e.prototype.changePlan=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){return this.showChangePlan=!this.showChangePlan,[2]}))}))},e.prototype.closeChangePlan=function(e){this.showChangePlan=!1},e.prototype.downloadLicense=function(){this.showDownloadLicense=!this.showDownloadLicense},e.prototype.closeDownloadLicense=function(){this.showDownloadLicense=!1},e.prototype.updateLicense=function(){this.loading||(this.showUpdateLicense=!0)},e.prototype.closeUpdateLicense=function(e){this.showUpdateLicense=!1,e&&(this.load(),this.messagingService.send("updatedOrgLicense"))},e.prototype.subscriptionAdjusted=function(){this.load()},e.prototype.adjustStorage=function(e){this.adjustStorageAdd=e,this.showAdjustStorage=!0},e.prototype.closeStorage=function(e){this.showAdjustStorage=!1,e&&this.load()},Object.defineProperty(e.prototype,"isExpired",{get:function(){return null!=this.sub&&null!=this.sub.expiration&&new Date(this.sub.expiration)0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]

'+this.i18nService.t("twoFactorRecoveryYourCode")+":

"+this.code+'

'+new Date+"

"),e.onafterprint=function(){return e.close()},e.print()},e.prototype.formatString=function(e){return null==e?null:e.replace(/(.{4})/g,"$1 ").trim().toUpperCase()},e.prototype.processResponse=function(e){this.code=this.formatString(e.code)},e.ɵfac=function(t){return new(t||e)(o.ɵɵdirectiveInject(a.I18nService))},e.ɵcmp=o.ɵɵdefineComponent({type:e,selectors:[["app-two-factor-recovery"]],decls:31,vars:11,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","2faRecoveryTitle",1,"modal","fade"],["role","document",1,"modal-dialog"],[1,"modal-content"],[1,"modal-header"],["id","2faRecoveryTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[3,"organizationId","type","onAuthed",4,"ngIf"],[4,"ngIf"],[3,"organizationId","type","onAuthed"],[1,"modal-body","text-center"],[1,"modal-footer"],["type","button","class","btn btn-primary",3,"click",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"text-lg"],["type","button",1,"btn","btn-primary",3,"click"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1," "),o.ɵɵelementStart(2,"div",1),o.ɵɵtext(3," "),o.ɵɵelementStart(4,"div",2),o.ɵɵtext(5," "),o.ɵɵelementStart(6,"div",3),o.ɵɵtext(7," "),o.ɵɵelementStart(8,"h2",4),o.ɵɵtext(9),o.ɵɵpipe(10,"i18n"),o.ɵɵelementStart(11,"small"),o.ɵɵtext(12),o.ɵɵpipe(13,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(14," "),o.ɵɵelementEnd(),o.ɵɵtext(15," "),o.ɵɵelementStart(16,"button",5),o.ɵɵpipe(17,"i18n"),o.ɵɵtext(18," "),o.ɵɵelementStart(19,"span",6),o.ɵɵtext(20,"×"),o.ɵɵelementEnd(),o.ɵɵtext(21," "),o.ɵɵelementEnd(),o.ɵɵtext(22," "),o.ɵɵelementEnd(),o.ɵɵtext(23," "),o.ɵɵtemplate(24,u,2,2,"app-two-factor-verify",7),o.ɵɵtext(25," "),o.ɵɵtemplate(26,h,18,6,"ng-container",8),o.ɵɵtext(27," "),o.ɵɵelementEnd(),o.ɵɵtext(28," "),o.ɵɵelementEnd(),o.ɵɵtext(29," "),o.ɵɵelementEnd(),o.ɵɵtext(30," ")),2&e&&(o.ɵɵadvance(9),o.ɵɵtextInterpolate1(" ",o.ɵɵpipeBind1(10,5,"twoStepLogin")," "),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(13,7,"recoveryCodeTitle")),o.ɵɵadvance(4),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(17,9,"close")),o.ɵɵadvance(8),o.ɵɵproperty("ngIf",!t.authed),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.authed))},directives:[s.A11yTitleDirective,l.NgIf,c.TwoFactorVerifyComponent],pipes:[p.I18nPipe],encapsulation:2}),e}();t.TwoFactorRecoveryComponent=v,("undefined"==typeof ngDevMode||ngDevMode)&&o.ɵsetClassMetadata(v,[{type:r.Component,args:[{selector:"app-two-factor-recovery",templateUrl:"two-factor-recovery.component.html"}]}],(function(){return[{type:a.I18nService}]}),null)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]1&&n.configured)}}function B(e,t){1&e&&(m.ɵɵelementContainerStart(0),m.ɵɵtext(1," "),m.ɵɵelement(2,"i",38),m.ɵɵtext(3," "),m.ɵɵelementContainerEnd())}function U(e,t){1&e&&(m.ɵɵelementContainerStart(0),m.ɵɵtext(1," "),m.ɵɵelement(2,"i",38),m.ɵɵtext(3),m.ɵɵpipe(4,"i18n"),m.ɵɵelementContainerEnd()),2&e&&(m.ɵɵadvance(3),m.ɵɵtextInterpolate1(" ",m.ɵɵpipeBind1(4,1,"twoFactorU2fWaiting"),"... "))}function j(e,t){1&e&&(m.ɵɵelementContainerStart(0),m.ɵɵtext(1," "),m.ɵɵelement(2,"i",39),m.ɵɵtext(3),m.ɵɵpipe(4,"i18n"),m.ɵɵelementContainerEnd()),2&e&&(m.ɵɵadvance(3),m.ɵɵtextInterpolate1(" ",m.ɵɵpipeBind1(4,1,"twoFactorU2fClickSave")," "))}function V(e,t){1&e&&(m.ɵɵelementContainerStart(0),m.ɵɵtext(1," "),m.ɵɵelement(2,"i",40),m.ɵɵtext(3),m.ɵɵpipe(4,"i18n"),m.ɵɵelementContainerEnd()),2&e&&(m.ɵɵadvance(3),m.ɵɵtextInterpolate1(" ",m.ɵɵpipeBind1(4,1,"twoFactorU2fProblemReadingTryAgain")," "))}function F(e,t){if(1&e&&(m.ɵɵelementContainerStart(0),m.ɵɵtext(1," "),m.ɵɵtemplate(2,U,5,3,"ng-container",25),m.ɵɵtext(3," "),m.ɵɵtemplate(4,j,5,3,"ng-container",25),m.ɵɵtext(5," "),m.ɵɵtemplate(6,V,5,3,"ng-container",25),m.ɵɵtext(7," "),m.ɵɵelementContainerEnd()),2&e){var n=m.ɵɵnextContext(2);m.ɵɵadvance(2),m.ɵɵproperty("ngIf",n.webAuthnListening),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",n.webAuthnResponse),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",n.webAuthnError)}}function N(e,t){1&e&&(m.ɵɵelement(0,"i",41),m.ɵɵpipe(1,"i18n")),2&e&&m.ɵɵpropertyInterpolate("title",m.ɵɵpipeBind1(1,1,"loading"))}function z(e,t){1&e&&(m.ɵɵelementStart(0,"span"),m.ɵɵtext(1),m.ɵɵpipe(2,"i18n"),m.ɵɵelementEnd()),2&e&&(m.ɵɵadvance(1),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(2,1,"save")))}function L(e,t){if(1&e){var n=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"button",42,43),m.ɵɵlistener("click",(function(){return m.ɵɵrestoreView(n),m.ɵɵnextContext(2).disable()})),m.ɵɵtext(2," "),m.ɵɵelement(3,"i",41),m.ɵɵpipe(4,"i18n"),m.ɵɵtext(5," "),m.ɵɵelementStart(6,"span"),m.ɵɵtext(7),m.ɵɵpipe(8,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(9," "),m.ɵɵelementEnd()}if(2&e){var r=m.ɵɵreference(1),i=m.ɵɵnextContext(2);m.ɵɵproperty("appApiAction",i.disablePromise)("disabled",r.loading),m.ɵɵadvance(3),m.ɵɵpropertyInterpolate("title",m.ɵɵpipeBind1(4,4,"loading")),m.ɵɵadvance(4),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(8,6,"disableAllKeys"))}}function K(e,t){if(1&e){var n=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"form",10,11),m.ɵɵlistener("ngSubmit",(function(){return m.ɵɵrestoreView(n),m.ɵɵnextContext().submit()})),m.ɵɵtext(2," "),m.ɵɵelementStart(3,"div",12),m.ɵɵtext(4," "),m.ɵɵtemplate(5,k,4,6,"app-callout",13),m.ɵɵtext(6," "),m.ɵɵelementStart(7,"app-callout",14),m.ɵɵtext(8," "),m.ɵɵelementStart(9,"p"),m.ɵɵtext(10),m.ɵɵpipe(11,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(12," "),m.ɵɵelementStart(13,"ul",15),m.ɵɵtext(14," "),m.ɵɵelementStart(15,"li"),m.ɵɵtext(16),m.ɵɵpipe(17,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(18," "),m.ɵɵelementEnd(),m.ɵɵtext(19," "),m.ɵɵelementEnd(),m.ɵɵtext(20," "),m.ɵɵelement(21,"img",16),m.ɵɵtext(22," "),m.ɵɵelementStart(23,"ul",17),m.ɵɵtext(24," "),m.ɵɵtemplate(25,R,13,5,"li",18),m.ɵɵtext(26," "),m.ɵɵelementEnd(),m.ɵɵtext(27," "),m.ɵɵelement(28,"hr"),m.ɵɵtext(29," "),m.ɵɵelementStart(30,"p"),m.ɵɵtext(31),m.ɵɵpipe(32,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(33," "),m.ɵɵelementStart(34,"ol"),m.ɵɵtext(35," "),m.ɵɵelementStart(36,"li"),m.ɵɵtext(37),m.ɵɵpipe(38,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(39," "),m.ɵɵelementStart(40,"li"),m.ɵɵtext(41),m.ɵɵpipe(42,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(43," "),m.ɵɵelementStart(44,"li"),m.ɵɵtext(45),m.ɵɵpipe(46,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(47," "),m.ɵɵelementStart(48,"li"),m.ɵɵtext(49),m.ɵɵpipe(50,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(51," "),m.ɵɵelementEnd(),m.ɵɵtext(52," "),m.ɵɵelementStart(53,"div",19),m.ɵɵtext(54," "),m.ɵɵelementStart(55,"div",20),m.ɵɵtext(56," "),m.ɵɵelementStart(57,"label",21),m.ɵɵtext(58),m.ɵɵpipe(59,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(60," "),m.ɵɵelementStart(61,"input",22),m.ɵɵlistener("ngModelChange",(function(e){return m.ɵɵrestoreView(n),m.ɵɵnextContext().name=e})),m.ɵɵelementEnd(),m.ɵɵtext(62," "),m.ɵɵelementEnd(),m.ɵɵtext(63," "),m.ɵɵelementEnd(),m.ɵɵtext(64," "),m.ɵɵelementStart(65,"button",23,24),m.ɵɵlistener("click",(function(){return m.ɵɵrestoreView(n),m.ɵɵnextContext().readKey()})),m.ɵɵtext(67),m.ɵɵpipe(68,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(69," "),m.ɵɵtemplate(70,B,4,0,"ng-container",25),m.ɵɵtext(71," "),m.ɵɵtemplate(72,F,8,3,"ng-container",25),m.ɵɵtext(73," "),m.ɵɵelementEnd(),m.ɵɵtext(74," "),m.ɵɵelementStart(75,"div",26),m.ɵɵtext(76," "),m.ɵɵelementStart(77,"button",27),m.ɵɵtext(78," "),m.ɵɵtemplate(79,N,2,3,"i",28),m.ɵɵtext(80," "),m.ɵɵtemplate(81,z,3,3,"span",25),m.ɵɵtext(82," "),m.ɵɵelementEnd(),m.ɵɵtext(83," "),m.ɵɵtemplate(84,L,10,8,"button",29),m.ɵɵtext(85," "),m.ɵɵelementStart(86,"button",30),m.ɵɵtext(87),m.ɵɵpipe(88,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(89," "),m.ɵɵelementEnd(),m.ɵɵtext(90," "),m.ɵɵelementEnd()}if(2&e){var r=m.ɵɵreference(1),i=m.ɵɵreference(66),o=m.ɵɵnextContext();m.ɵɵproperty("appApiAction",o.formPromise),m.ɵɵadvance(5),m.ɵɵproperty("ngIf",o.enabled),m.ɵɵadvance(5),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(11,23,"twoFactorWebAuthnWarning")),m.ɵɵadvance(6),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(17,25,"twoFactorWebAuthnSupportWeb")),m.ɵɵadvance(9),m.ɵɵproperty("ngForOf",o.keys),m.ɵɵadvance(6),m.ɵɵtextInterpolate1("",m.ɵɵpipeBind1(32,27,"twoFactorWebAuthnAdd"),":"),m.ɵɵadvance(6),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(38,29,"twoFactorU2fGiveName")),m.ɵɵadvance(4),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(42,31,"twoFactorU2fPlugInReadKey")),m.ɵɵadvance(4),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(46,33,"twoFactorU2fTouchButton")),m.ɵɵadvance(4),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(50,35,"twoFactorU2fSaveForm")),m.ɵɵadvance(9),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(59,37,"name")),m.ɵɵadvance(3),m.ɵɵproperty("ngModel",o.name)("disabled",!o.keyIdAvailable),m.ɵɵadvance(4),m.ɵɵproperty("disabled",i.loading||o.webAuthnListening||!o.keyIdAvailable)("appApiAction",o.challengePromise),m.ɵɵadvance(2),m.ɵɵtextInterpolate1(" ",m.ɵɵpipeBind1(68,39,"readKey")," "),m.ɵɵadvance(3),m.ɵɵproperty("ngIf",i.loading),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",!i.loading),m.ɵɵadvance(5),m.ɵɵproperty("disabled",r.loading||!o.webAuthnResponse),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",r.loading),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",!r.loading),m.ɵɵadvance(3),m.ɵɵproperty("ngIf",o.enabled),m.ɵɵadvance(3),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(88,41,"close"))}}var G=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.ngZone=o,a.type=l.TwoFactorProviderType.WebAuthn,a.keyIdAvailable=null,a.keysConfiguredCount=0,a}return i(t,e),t.prototype.auth=function(t){e.prototype.auth.call(this,t),this.processResponse(t.response)},t.prototype.submit=function(){var t=this;if(null==this.webAuthnResponse||null==this.keyIdAvailable)return Promise.reject();var n=new u.UpdateTwoFactorWebAuthnRequest;return n.masterPasswordHash=this.masterPasswordHash,n.deviceResponse=this.webAuthnResponse,n.id=this.keyIdAvailable,n.name=this.name,e.prototype.enable.call(this,(function(){return o(t,void 0,void 0,(function(){var e;return a(this,(function(t){switch(t.label){case 0:return this.formPromise=this.apiService.putTwoFactorWebAuthn(n),[4,this.formPromise];case 1:return e=t.sent(),[4,this.processResponse(e)];case 2:return t.sent(),[2]}}))}))}))},t.prototype.disable=function(){return e.prototype.disable.call(this,this.formPromise)},t.prototype.remove=function(e){return o(this,void 0,void 0,(function(){var t,n,r;return a(this,(function(i){switch(i.label){case 0:return this.keysConfiguredCount<=1||null!=e.removePromise?[2]:(t=null!=e.name?e.name:this.i18nService.t("webAuthnkeyX",e.id),[4,this.platformUtilsService.showDialog(this.i18nService.t("removeU2fConfirmation"),t,this.i18nService.t("yes"),this.i18nService.t("no"),"warning")]);case 1:if(!i.sent())return[2];(n=new p.UpdateTwoFactorWebAuthnDeleteRequest).id=e.id,n.masterPasswordHash=this.masterPasswordHash,i.label=2;case 2:return i.trys.push([2,5,,6]),e.removePromise=this.apiService.deleteTwoFactorWebAuthn(n),[4,e.removePromise];case 3:return r=i.sent(),e.removePromise=null,[4,this.processResponse(r)];case 4:return i.sent(),[3,6];case 5:return i.sent(),[3,6];case 6:return[2]}}))}))},t.prototype.readKey=function(){return o(this,void 0,void 0,(function(){var e,t;return a(this,(function(n){switch(n.label){case 0:if(null==this.keyIdAvailable)return[2];(e=new c.PasswordVerificationRequest).masterPasswordHash=this.masterPasswordHash,n.label=1;case 1:return n.trys.push([1,3,,4]),this.challengePromise=this.apiService.getTwoFactorWebAuthnChallenge(e),[4,this.challengePromise];case 2:return t=n.sent(),this.readDevice(t),[3,4];case 3:return n.sent(),[3,4];case 4:return[2]}}))}))},t.prototype.readDevice=function(e){var t=this;console.log("listening for key..."),this.resetWebAuthn(!0),navigator.credentials.create({publicKey:e}).then((function(e){t.ngZone.run((function(){t.webAuthnListening=!1,t.webAuthnResponse=e}))})).catch((function(e){console.error(e),t.resetWebAuthn(!1),t.webAuthnError=!0}))},t.prototype.resetWebAuthn=function(e){void 0===e&&(e=!1),this.webAuthnResponse=null,this.webAuthnError=!1,this.webAuthnListening=e},t.prototype.processResponse=function(e){this.resetWebAuthn(),this.keys=[],this.keyIdAvailable=null,this.name=null,this.keysConfiguredCount=0;for(var t=function(t){if(null!=e.keys){var r=e.keys.filter((function(e){return e.id===t}));if(r.length>0)return n.keysConfiguredCount++,n.keys.push({id:t,name:r[0].name,configured:!0,migrated:r[0].migrated,removePromise:null}),"continue"}n.keys.push({id:t,name:null,configured:!1,removePromise:null}),null==n.keyIdAvailable&&(n.keyIdAvailable=t)},n=this,r=1;r<=5;r++)t(r);this.enabled=e.enabled},t.ɵfac=function(e){return new(e||t)(m.ɵɵdirectiveInject(f.ApiService),m.ɵɵdirectiveInject(h.I18nService),m.ɵɵdirectiveInject(v.ToasterService),m.ɵɵdirectiveInject(y.PlatformUtilsService),m.ɵɵdirectiveInject(m.NgZone))},t.ɵcmp=m.ɵɵdefineComponent({type:t,selectors:[["app-two-factor-webauthn"]],features:[m.ɵɵInheritDefinitionFeature],decls:31,vars:11,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","2faU2fTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-lg"],[1,"modal-content"],[1,"modal-header"],["id","2faU2fTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[3,"organizationId","type","onAuthed",4,"ngIf"],["ngNativeValidate","",3,"appApiAction","ngSubmit",4,"ngIf"],[3,"organizationId","type","onAuthed"],["ngNativeValidate","",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-body"],["type","success","icon","fa-check-circle",3,"title",4,"ngIf"],["type","warning"],[1,"mb-0"],["alt","FIDO2 WebAuthn logo'",1,"float-right","ml-5","mfaType7"],[1,"fa-ul"],[3,"appApiAction",4,"ngFor","ngForOf"],[1,"row"],[1,"form-group","col-6"],["for","name"],["id","name","type","text","name","Name",1,"form-control",3,"ngModel","disabled","ngModelChange"],["type","button",1,"btn","btn-outline-secondary","mr-2",3,"disabled","appApiAction","click"],["readKeyBtn",""],[4,"ngIf"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary",3,"disabled"],["class","fa fa-spinner fa-spin","aria-hidden","true",3,"title",4,"ngIf"],["type","button","class","btn btn-outline-secondary btn-submit",3,"appApiAction","disabled","click",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],["type","success","icon","fa-check-circle",3,"title"],[3,"appApiAction"],["removeKeyBtn",""],[1,"fa-li","fa","fa-key"],["class","fa fa-spin fa-spinner text-muted fa-fw","aria-hidden","true",3,"title",4,"ngIf"],["href","#","appStopClick","",3,"click"],["aria-hidden","true",1,"fa","fa-spin","fa-spinner","text-muted","fa-fw",3,"title"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted"],["aria-hidden","true",1,"fa","fa-check-circle","text-success"],["aria-hidden","true",1,"fa","fa-warning","text-danger"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","button",1,"btn","btn-outline-secondary","btn-submit",3,"appApiAction","disabled","click"],["disableBtn",""]],template:function(e,t){1&e&&(m.ɵɵelementStart(0,"div",0),m.ɵɵtext(1," "),m.ɵɵelementStart(2,"div",1),m.ɵɵtext(3," "),m.ɵɵelementStart(4,"div",2),m.ɵɵtext(5," "),m.ɵɵelementStart(6,"div",3),m.ɵɵtext(7," "),m.ɵɵelementStart(8,"h2",4),m.ɵɵtext(9),m.ɵɵpipe(10,"i18n"),m.ɵɵelementStart(11,"small"),m.ɵɵtext(12),m.ɵɵpipe(13,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(14," "),m.ɵɵelementEnd(),m.ɵɵtext(15," "),m.ɵɵelementStart(16,"button",5),m.ɵɵpipe(17,"i18n"),m.ɵɵtext(18," "),m.ɵɵelementStart(19,"span",6),m.ɵɵtext(20,"×"),m.ɵɵelementEnd(),m.ɵɵtext(21," "),m.ɵɵelementEnd(),m.ɵɵtext(22," "),m.ɵɵelementEnd(),m.ɵɵtext(23," "),m.ɵɵtemplate(24,P,2,2,"app-two-factor-verify",7),m.ɵɵtext(25," "),m.ɵɵtemplate(26,K,91,43,"form",8),m.ɵɵtext(27," "),m.ɵɵelementEnd(),m.ɵɵtext(28," "),m.ɵɵelementEnd(),m.ɵɵtext(29," "),m.ɵɵelementEnd(),m.ɵɵtext(30," ")),2&e&&(m.ɵɵadvance(9),m.ɵɵtextInterpolate1(" ",m.ɵɵpipeBind1(10,5,"twoStepLogin")," "),m.ɵɵadvance(3),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(13,7,"webAuthnTitle")),m.ɵɵadvance(4),m.ɵɵpropertyInterpolate("appA11yTitle",m.ɵɵpipeBind1(17,9,"close")),m.ɵɵadvance(8),m.ɵɵproperty("ngIf",!t.authed),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",t.authed))},directives:[g.A11yTitleDirective,x.NgIf,b.TwoFactorVerifyComponent,S.NgControlStatusGroup,S.NgForm,w.ApiActionDirective,C.CalloutComponent,x.NgForOf,S.DefaultValueAccessor,S.NgControlStatus,S.NgModel,I.StopClickDirective],pipes:[E.I18nPipe],encapsulation:2}),t}(d.TwoFactorBaseComponent);t.TwoFactorWebAuthnComponent=G,("undefined"==typeof ngDevMode||ngDevMode)&&m.ɵsetClassMetadata(G,[{type:s.Component,args:[{selector:"app-two-factor-webauthn",templateUrl:"two-factor-webauthn.component.html"}]}],(function(){return[{type:f.ApiService},{type:h.I18nService},{type:v.ToasterService},{type:y.PlatformUtilsService},{type:m.NgZone}]}),null)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0?this.keys[0].key:null,n.key2=null!=this.keys&&this.keys.length>1?this.keys[1].key:null,n.key3=null!=this.keys&&this.keys.length>2?this.keys[2].key:null,n.key4=null!=this.keys&&this.keys.length>3?this.keys[3].key:null,n.key5=null!=this.keys&&this.keys.length>4?this.keys[4].key:null,n.nfc=this.nfc,e.prototype.enable.call(this,(function(){return o(t,void 0,void 0,(function(){var e;return a(this,(function(t){switch(t.label){case 0:return this.formPromise=this.apiService.putTwoFactorYubiKey(n),[4,this.formPromise];case 1:return e=t.sent(),[4,this.processResponse(e)];case 2:return t.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("yubikeysUpdated")),[2]}}))}))}))},t.prototype.disable=function(){return e.prototype.disable.call(this,this.disablePromise)},t.prototype.remove=function(e){e.existingKey=null,e.key=null},t.prototype.processResponse=function(e){this.enabled=e.enabled,this.keys=[{key:e.key1,existingKey:this.padRight(e.key1)},{key:e.key2,existingKey:this.padRight(e.key2)},{key:e.key3,existingKey:this.padRight(e.key3)},{key:e.key4,existingKey:this.padRight(e.key4)},{key:e.key5,existingKey:this.padRight(e.key5)}],this.nfc=e.nfc||!e.enabled},t.prototype.padRight=function(e,t,n){if(void 0===t&&(t="•"),void 0===n&&(n=44),null==e||null==t||e.length>=n)return e;for(var r=(n-e.length)/t.length,i=0;i0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]524288e3)return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("maxFileSize")),[2];i.label=1;case 1:return i.trys.push([1,4,,5]),this.formPromise=this.saveCipherAttachment(t[0]),n=this,[4,this.formPromise];case 2:return n.cipherDomain=i.sent(),r=this,[4,this.cipherDomain.decrypt()];case 3:return r.cipher=i.sent(),this.platformUtilsService.showToast("success",null,this.i18nService.t("attachmentSaved")),this.onUploadedAttachment.emit(),[3,5];case 4:return i.sent(),[3,5];case 5:return e.type="",e.type="file",e.value="",[2]}}))}))},e.prototype.delete=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return null!=this.deletePromises[e.id]?[2]:[4,this.platformUtilsService.showDialog(this.i18nService.t("deleteAttachmentConfirmation"),this.i18nService.t("deleteAttachment"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")];case 1:if(!n.sent())return[2];n.label=2;case 2:return n.trys.push([2,4,,5]),this.deletePromises[e.id]=this.deleteCipherAttachment(e.id),[4,this.deletePromises[e.id]];case 3:return n.sent(),this.platformUtilsService.showToast("success",null,this.i18nService.t("deletedAttachment")),(t=this.cipher.attachments.indexOf(e))>-1&&this.cipher.attachments.splice(t,1),[3,5];case 4:return n.sent(),[3,5];case 5:return this.deletePromises[e.id]=null,this.onDeletedAttachment.emit(),[2]}}))}))},e.prototype.download=function(e){return r(this,void 0,void 0,(function(){var t,n,r,o,s,l,c,p,u;return i(this,(function(i){switch(i.label){case 0:if((t=e).downloading)return[2];if(!this.canAccessAttachments)return this.platformUtilsService.showToast("error",this.i18nService.t("premiumRequired"),this.i18nService.t("premiumRequiredDesc")),[2];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.apiService.getAttachmentData(this.cipher.id,e.id,this.emergencyAccessId)];case 2:return r=i.sent(),n=r.url,[3,4];case 3:if(!((o=i.sent())instanceof a.ErrorResponse&&404===o.statusCode))throw o instanceof a.ErrorResponse?new Error(o.getSingleMessage()):o;return n=e.url,[3,4];case 4:return t.downloading=!0,[4,fetch(new Request(n,{cache:"no-store"}))];case 5:if(200!==(s=i.sent()).status)return this.platformUtilsService.showToast("error",null,this.i18nService.t("errorOccurred")),t.downloading=!1,[2];i.label=6;case 6:return i.trys.push([6,12,,13]),[4,s.arrayBuffer()];case 7:return l=i.sent(),null==e.key?[3,8]:(p=e.key,[3,10]);case 8:return[4,this.cryptoService.getOrgKey(this.cipher.organizationId)];case 9:p=i.sent(),i.label=10;case 10:return c=p,[4,this.cryptoService.decryptFromBytes(l,c)];case 11:return u=i.sent(),this.platformUtilsService.saveFile(this.win,u,null,e.fileName),[3,13];case 12:return i.sent(),this.platformUtilsService.showToast("error",null,this.i18nService.t("errorOccurred")),[3,13];case 13:return t.downloading=!1,[2]}}))}))},e.prototype.init=function(){return r(this,void 0,void 0,(function(){var e,t,n,r;return i(this,(function(i){switch(i.label){case 0:return e=this,[4,this.loadCipher()];case 1:return e.cipherDomain=i.sent(),t=this,[4,this.cipherDomain.decrypt()];case 2:return t.cipher=i.sent(),n=this,[4,this.cryptoService.hasEncKey()];case 3:return n.hasUpdatedKey=i.sent(),[4,this.userService.canAccessPremium()];case 4:return r=i.sent(),this.canAccessAttachments=r||null!=this.cipher.organizationId,this.canAccessAttachments?[3,6]:[4,this.platformUtilsService.showDialog(this.i18nService.t("premiumRequiredDesc"),this.i18nService.t("premiumRequired"),this.i18nService.t("learnMore"),this.i18nService.t("cancel"))];case 5:return i.sent()&&this.platformUtilsService.launchUri("https://vault.bitwarden.com/#/?premium=purchase"),[3,8];case 6:return this.hasUpdatedKey?[3,8]:[4,this.platformUtilsService.showDialog(this.i18nService.t("updateKey"),this.i18nService.t("featureUnavailable"),this.i18nService.t("learnMore"),this.i18nService.t("cancel"),"warning")];case 7:i.sent()&&this.platformUtilsService.launchUri("https://help.bitwarden.com/article/update-encryption-key/"),i.label=8;case 8:return[2]}}))}))},e.prototype.reuploadCipherAttachment=function(e,t){return r(this,void 0,void 0,(function(){var n,o=this;return i(this,(function(a){switch(a.label){case 0:if(n=e,null!=e.key||n.downloading||null!=this.reuploadPromises[e.id])return[2];a.label=1;case 1:return a.trys.push([1,3,,4]),this.reuploadPromises[e.id]=Promise.resolve().then((function(){return r(o,void 0,void 0,(function(){var r,o,a,s,l,c,p,u,d;return i(this,(function(i){switch(i.label){case 0:return n.downloading=!0,[4,fetch(new Request(e.url,{cache:"no-store"}))];case 1:if(200!==(r=i.sent()).status)return this.platformUtilsService.showToast("error",null,this.i18nService.t("errorOccurred")),n.downloading=!1,[2];i.label=2;case 2:return i.trys.push([2,11,,12]),[4,r.arrayBuffer()];case 3:return o=i.sent(),null==e.key?[3,4]:(s=e.key,[3,6]);case 4:return[4,this.cryptoService.getOrgKey(this.cipher.organizationId)];case 5:s=i.sent(),i.label=6;case 6:return a=s,[4,this.cryptoService.decryptFromBytes(o,a)];case 7:return l=i.sent(),c=this,[4,this.cipherService.saveAttachmentRawWithServer(this.cipherDomain,e.fileName,l,t)];case 8:return c.cipherDomain=i.sent(),p=this,[4,this.cipherDomain.decrypt()];case 9:return p.cipher=i.sent(),this.deletePromises[e.id]=this.deleteCipherAttachment(e.id),[4,this.deletePromises[e.id]];case 10:return i.sent(),(u=this.cipher.attachments.filter((function(t){return t.id===e.id}))).length>0&&(d=this.cipher.attachments.indexOf(u[0]))>-1&&this.cipher.attachments.splice(d,1),this.platformUtilsService.showToast("success",null,this.i18nService.t("attachmentSaved")),this.onReuploadedAttachment.emit(),[3,12];case 11:return i.sent(),this.platformUtilsService.showToast("error",null,this.i18nService.t("errorOccurred")),[3,12];case 12:return n.downloading=!1,[2]}}))}))})),[4,this.reuploadPromises[e.id]];case 2:return a.sent(),[3,4];case 3:return a.sent(),[3,4];case 4:return[2]}}))}))},e.prototype.loadCipher=function(){return this.cipherService.get(this.cipherId)},e.prototype.saveCipherAttachment=function(e){return this.cipherService.saveAttachmentWithServer(this.cipherDomain,e)},e.prototype.deleteCipherAttachment=function(e){return this.cipherService.deleteAttachmentWithServer(this.cipher.id,e)},e.ɵfac=function(t){return new(t||e)(s.ɵɵdirectiveInject(l.CipherService),s.ɵɵdirectiveInject(c.I18nService),s.ɵɵdirectiveInject(p.CryptoService),s.ɵɵdirectiveInject(u.UserService),s.ɵɵdirectiveInject(d.PlatformUtilsService),s.ɵɵdirectiveInject(m.ApiService),s.ɵɵdirectiveInject(Window))},e.ɵdir=s.ɵɵdefineDirective({type:e,inputs:{cipherId:"cipherId"},outputs:{onUploadedAttachment:"onUploadedAttachment",onDeletedAttachment:"onDeletedAttachment",onReuploadedAttachment:"onReuploadedAttachment"}}),e}();t.AttachmentsComponent=f,("undefined"==typeof ngDevMode||ngDevMode)&&s.ɵsetClassMetadata(f,[{type:o.Directive}],(function(){return[{type:l.CipherService},{type:c.I18nService},{type:p.CryptoService},{type:u.UserService},{type:d.PlatformUtilsService},{type:m.ApiService},{type:Window}]}),{cipherId:[{type:o.Input}],onUploadedAttachment:[{type:o.Output}],onDeletedAttachment:[{type:o.Output}],onReuploadedAttachment:[{type:o.Output}]})},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&this.viewEvents(n[0]),null!=o&&o.unsubscribe(),[2]}}))}))})),null!=t&&t.unsubscribe(),[2]}}))}))}))},e.prototype.ngOnDestroy=function(){this.broadcasterService.unsubscribe(F)},e.prototype.clearGroupingFilters=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.ciphersComponent.showAddNew=!0,this.ciphersComponent.deleted=!1,this.groupingsComponent.searchPlaceholder=this.i18nService.t("searchVault"),[4,this.ciphersComponent.applyFilter()];case 1:return e.sent(),this.clearFilters(),this.go(),[2]}}))}))},e.prototype.filterCipherType=function(e,t){return void 0===t&&(t=!1),r(this,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return this.ciphersComponent.showAddNew=!0,this.ciphersComponent.deleted=!1,this.groupingsComponent.searchPlaceholder=this.i18nService.t("searchType"),n=function(t){return t.type===e},t?[4,this.ciphersComponent.reload(n)]:[3,2];case 1:return r.sent(),[3,4];case 2:return[4,this.ciphersComponent.applyFilter(n)];case 3:r.sent(),r.label=4;case 4:return this.clearFilters(),this.type=e,this.go(),[2]}}))}))},e.prototype.filterCollection=function(e,t){return void 0===t&&(t=!1),r(this,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return this.ciphersComponent.showAddNew=!0,this.ciphersComponent.deleted=!1,this.groupingsComponent.searchPlaceholder=this.i18nService.t("searchCollection"),n=function(t){return"unassigned"===e?null==t.collectionIds||0===t.collectionIds.length:null!=t.collectionIds&&t.collectionIds.indexOf(e)>-1},t?[4,this.ciphersComponent.reload(n)]:[3,2];case 1:return r.sent(),[3,4];case 2:return[4,this.ciphersComponent.applyFilter(n)];case 3:r.sent(),r.label=4;case 4:return this.clearFilters(),this.collectionId=e,this.go(),[2]}}))}))},e.prototype.filterDeleted=function(e){return void 0===e&&(e=!1),r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return this.ciphersComponent.showAddNew=!1,this.ciphersComponent.deleted=!0,this.groupingsComponent.searchPlaceholder=this.i18nService.t("searchTrash"),e?[4,this.ciphersComponent.reload(null,!0)]:[3,2];case 1:return t.sent(),[3,4];case 2:return[4,this.ciphersComponent.applyFilter(null)];case 3:t.sent(),t.label=4;case 4:return this.clearFilters(),this.deleted=!0,this.go(),[2]}}))}))},e.prototype.filterSearchText=function(e){this.ciphersComponent.searchText=e,this.ciphersComponent.search(200)},e.prototype.editCipherAttachments=function(e){return r(this,void 0,void 0,(function(){var t,n=this;return i(this,(function(o){switch(o.label){case 0:return null==this.organization.maxStorageGb||0===this.organization.maxStorageGb?(this.messagingService.send("upgradeOrganization",{organizationId:e.organizationId}),[2]):(t=!1,[4,this.modalService.openViewRef(l.AttachmentsComponent,this.attachmentsModalRef,(function(r){r.organization=n.organization,r.cipherId=e.id,r.onUploadedAttachment.subscribe((function(){return t=!0})),r.onDeletedAttachment.subscribe((function(){return t=!0}))}))]);case 1:return o.sent()[0].onClosed.subscribe((function(){return r(n,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return t?[4,this.ciphersComponent.refresh()]:[3,2];case 1:e.sent(),e.label=2;case 2:return t=!1,[2]}}))}))})),[2]}}))}))},e.prototype.editCipherCollections=function(e){return r(this,void 0,void 0,(function(){var t,n=this;return i(this,(function(o){switch(o.label){case 0:return[4,this.modalService.openViewRef(p.CollectionsComponent,this.collectionsModalRef,(function(o){n.organization.canEditAnyCollection&&(o.collectionIds=e.collectionIds,o.collections=n.groupingsComponent.collections.filter((function(e){return!e.readOnly}))),o.organization=n.organization,o.cipherId=e.id,o.onSavedCollections.subscribe((function(){return r(n,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return t.close(),[4,this.ciphersComponent.refresh()];case 1:return e.sent(),[2]}}))}))}))}))];case 1:return t=o.sent()[0],[2]}}))}))},e.prototype.addCipher=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,this.editCipher(null)];case 1:return(e=t.sent()).organizationId=this.organization.id,e.type=this.type,this.organization.canEditAnyCollection&&(e.collections=this.groupingsComponent.collections.filter((function(e){return!e.readOnly}))),null!=this.collectionId&&(e.collectionIds=[this.collectionId]),[2]}}))}))},e.prototype.editCipher=function(e){return r(this,void 0,void 0,(function(){var t,n,o=this;return i(this,(function(a){switch(a.label){case 0:return[4,this.modalService.openViewRef(s.AddEditComponent,this.cipherAddEditModalRef,(function(t){t.organization=o.organization,t.cipherId=null==e?null:e.id,t.onSavedCipher.subscribe((function(e){return r(o,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return n.close(),[4,this.ciphersComponent.refresh()];case 1:return e.sent(),[2]}}))}))})),t.onDeletedCipher.subscribe((function(e){return r(o,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return n.close(),[4,this.ciphersComponent.refresh()];case 1:return e.sent(),[2]}}))}))})),t.onRestoredCipher.subscribe((function(e){return r(o,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return n.close(),[4,this.ciphersComponent.refresh()];case 1:return e.sent(),[2]}}))}))}))}))];case 1:return t=a.sent(),n=t[0],[2,t[1]]}}))}))},e.prototype.cloneCipher=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.editCipher(e)];case 1:return(t=n.sent()).cloneMode=!0,t.organizationId=this.organization.id,this.organization.canEditAnyCollection&&(t.collections=this.groupingsComponent.collections.filter((function(e){return!e.readOnly}))),t.collectionIds=e.collectionIds,[2]}}))}))},e.prototype.viewEvents=function(e){return r(this,void 0,void 0,(function(){var t=this;return i(this,(function(n){switch(n.label){case 0:return[4,this.modalService.openViewRef(a.EntityEventsComponent,this.eventsModalRef,(function(n){n.name=e.name,n.organizationId=t.organization.id,n.entityId=e.id,n.showUser=!0,n.entity="cipher"}))];case 1:return n.sent(),[2]}}))}))},e.prototype.clearFilters=function(){this.collectionId=null,this.type=null,this.deleted=!1},e.prototype.go=function(e){void 0===e&&(e=null),null==e&&(e={type:this.type,collectionId:this.collectionId,deleted:!!this.deleted||null}),this.router.navigate([],{relativeTo:this.route,queryParams:e,replaceUrl:!0})},e.ɵfac=function(t){return new(t||e)(d.ɵɵdirectiveInject(m.ActivatedRoute),d.ɵɵdirectiveInject(f.UserService),d.ɵɵdirectiveInject(m.Router),d.ɵɵdirectiveInject(d.ChangeDetectorRef),d.ɵɵdirectiveInject(h.SyncService),d.ɵɵdirectiveInject(v.I18nService),d.ɵɵdirectiveInject(y.ModalService),d.ɵɵdirectiveInject(g.MessagingService),d.ɵɵdirectiveInject(x.BroadcasterService),d.ɵɵdirectiveInject(d.NgZone),d.ɵɵdirectiveInject(b.PlatformUtilsService))},e.ɵcmp=d.ɵɵdefineComponent({type:e,selectors:[["app-org-vault"]],viewQuery:function(e,t){if(1&e&&(d.ɵɵviewQuery(u.GroupingsComponent,3),d.ɵɵviewQuery(c.CiphersComponent,3),d.ɵɵviewQuery(_,3,o.ViewContainerRef),d.ɵɵviewQuery(A,3,o.ViewContainerRef),d.ɵɵviewQuery(O,3,o.ViewContainerRef),d.ɵɵviewQuery(M,3,o.ViewContainerRef)),2&e){var n=void 0;d.ɵɵqueryRefresh(n=d.ɵɵloadQuery())&&(t.groupingsComponent=n.first),d.ɵɵqueryRefresh(n=d.ɵɵloadQuery())&&(t.ciphersComponent=n.first),d.ɵɵqueryRefresh(n=d.ɵɵloadQuery())&&(t.attachmentsModalRef=n.first),d.ɵɵqueryRefresh(n=d.ɵɵloadQuery())&&(t.cipherAddEditModalRef=n.first),d.ɵɵqueryRefresh(n=d.ɵɵloadQuery())&&(t.collectionsModalRef=n.first),d.ɵɵqueryRefresh(n=d.ɵɵloadQuery())&&(t.eventsModalRef=n.first)}},decls:53,vars:13,consts:[[1,"container","page-content"],[1,"row"],[1,"col-3"],[3,"showFolders","showFavorites","showTrash","onAllClicked","onCipherTypeClicked","onCollectionClicked","onSearchTextChanged","onTrashClicked"],[1,"col-9"],[1,"page-header","d-flex"],[3,"appApiAction"],["actionSpinner",""],[4,"ngIf"],[1,"ml-auto","d-flex"],[3,"ciphersComponent","deleted","organization"],["type","button","class","btn btn-outline-primary btn-sm ml-auto",3,"click",4,"ngIf"],["type","warning","icon","fa-warning",4,"ngIf"],[3,"onCipherClicked","onAttachmentsClicked","onAddCipher","onCollectionsClicked","onEventsClicked","onCloneClicked"],["attachments",""],["cipherAddEdit",""],["collections",""],["eventsTemplate",""],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],["type","button",1,"btn","btn-outline-primary","btn-sm","ml-auto",3,"click"],["aria-hidden","true",1,"fa","fa-plus","fa-fw"],["type","warning","icon","fa-warning"]],template:function(e,t){if(1&e&&(d.ɵɵelementStart(0,"div",0),d.ɵɵtext(1," "),d.ɵɵelementStart(2,"div",1),d.ɵɵtext(3," "),d.ɵɵelementStart(4,"div",2),d.ɵɵtext(5," "),d.ɵɵelementStart(6,"app-org-vault-groupings",3),d.ɵɵlistener("onAllClicked",(function(){return t.clearGroupingFilters()}))("onCipherTypeClicked",(function(e){return t.filterCipherType(e)}))("onCollectionClicked",(function(e){return t.filterCollection(e.id)}))("onSearchTextChanged",(function(e){return t.filterSearchText(e)}))("onTrashClicked",(function(){return t.filterDeleted()})),d.ɵɵtext(7," "),d.ɵɵelementEnd(),d.ɵɵtext(8," "),d.ɵɵelementEnd(),d.ɵɵtext(9," "),d.ɵɵelementStart(10,"div",4),d.ɵɵtext(11," "),d.ɵɵelementStart(12,"div",5),d.ɵɵtext(13," "),d.ɵɵelementStart(14,"h1"),d.ɵɵtext(15),d.ɵɵpipe(16,"i18n"),d.ɵɵelementStart(17,"small",6,7),d.ɵɵtext(19," "),d.ɵɵtemplate(20,T,9,6,"ng-container",8),d.ɵɵtext(21," "),d.ɵɵelementEnd(),d.ɵɵtext(22," "),d.ɵɵelementEnd(),d.ɵɵtext(23," "),d.ɵɵelementStart(24,"div",9),d.ɵɵtext(25," "),d.ɵɵelementStart(26,"app-vault-bulk-actions",10),d.ɵɵtext(27," "),d.ɵɵelementEnd(),d.ɵɵtext(28," "),d.ɵɵtemplate(29,D,5,3,"button",11),d.ɵɵtext(30," "),d.ɵɵelementEnd(),d.ɵɵtext(31," "),d.ɵɵelementEnd(),d.ɵɵtext(32," "),d.ɵɵtemplate(33,R,2,1,"app-callout",12),d.ɵɵtext(34," "),d.ɵɵelementStart(35,"app-org-vault-ciphers",13),d.ɵɵlistener("onCipherClicked",(function(e){return t.editCipher(e)}))("onAttachmentsClicked",(function(e){return t.editCipherAttachments(e)}))("onAddCipher",(function(){return t.addCipher()}))("onCollectionsClicked",(function(e){return t.editCipherCollections(e)}))("onEventsClicked",(function(e){return t.viewEvents(e)}))("onCloneClicked",(function(e){return t.cloneCipher(e)})),d.ɵɵtext(36," "),d.ɵɵelementEnd(),d.ɵɵtext(37," "),d.ɵɵelementEnd(),d.ɵɵtext(38," "),d.ɵɵelementEnd(),d.ɵɵtext(39," "),d.ɵɵelementEnd(),d.ɵɵtext(40," "),d.ɵɵtemplate(41,B,0,0,"ng-template",null,14,d.ɵɵtemplateRefExtractor),d.ɵɵtext(43," "),d.ɵɵtemplate(44,U,0,0,"ng-template",null,15,d.ɵɵtemplateRefExtractor),d.ɵɵtext(46," "),d.ɵɵtemplate(47,j,0,0,"ng-template",null,16,d.ɵɵtemplateRefExtractor),d.ɵɵtext(49," "),d.ɵɵtemplate(50,V,0,0,"ng-template",null,17,d.ɵɵtemplateRefExtractor),d.ɵɵtext(52," ")),2&e){var n=d.ɵɵreference(18);d.ɵɵadvance(6),d.ɵɵproperty("showFolders",!1)("showFavorites",!1)("showTrash",!0),d.ɵɵadvance(9),d.ɵɵtextInterpolate1(" ",d.ɵɵpipeBind1(16,11,"vault")," "),d.ɵɵadvance(2),d.ɵɵproperty("appApiAction",t.ciphersComponent.actionPromise),d.ɵɵadvance(3),d.ɵɵproperty("ngIf",n.loading),d.ɵɵadvance(6),d.ɵɵproperty("ciphersComponent",t.ciphersComponent)("deleted",t.deleted)("organization",t.organization),d.ɵɵadvance(3),d.ɵɵproperty("ngIf",!t.deleted),d.ɵɵadvance(4),d.ɵɵproperty("ngIf",t.deleted)}},directives:[S.GroupingsComponent,w.ApiActionDirective,C.NgIf,I.BulkActionsComponent,E.CiphersComponent,P.CalloutComponent],pipes:[k.I18nPipe],encapsulation:2}),e}();t.VaultComponent=N,("undefined"==typeof ngDevMode||ngDevMode)&&d.ɵsetClassMetadata(N,[{type:o.Component,args:[{selector:"app-org-vault",templateUrl:"vault.component.html"}]}],(function(){return[{type:m.ActivatedRoute},{type:f.UserService},{type:m.Router},{type:d.ChangeDetectorRef},{type:h.SyncService},{type:v.I18nService},{type:y.ModalService},{type:g.MessagingService},{type:x.BroadcasterService},{type:d.NgZone},{type:b.PlatformUtilsService}]}),{groupingsComponent:[{type:o.ViewChild,args:[u.GroupingsComponent,{static:!0}]}],ciphersComponent:[{type:o.ViewChild,args:[c.CiphersComponent,{static:!0}]}],attachmentsModalRef:[{type:o.ViewChild,args:["attachments",{read:o.ViewContainerRef,static:!0}]}],cipherAddEditModalRef:[{type:o.ViewChild,args:["cipherAddEdit",{read:o.ViewContainerRef,static:!0}]}],collectionsModalRef:[{type:o.ViewChild,args:["collections",{read:o.ViewContainerRef,static:!0}]}],eventsModalRef:[{type:o.ViewChild,args:["eventsTemplate",{read:o.ViewContainerRef,static:!0}]}]})},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&(this.organizationId=this.organizations[0].id),this.filterCollections(),[2]}}))}))},e.prototype.ngOnDestroy=function(){this.selectAll(!1)},e.prototype.filterCollections=function(){var e=this;this.selectAll(!1),null==this.organizationId||0===this.writeableCollections.length?this.collections=[]:this.collections=this.writeableCollections.filter((function(t){return t.organizationId===e.organizationId}))},e.prototype.submit=function(){var e,t;return r(this,void 0,void 0,(function(){var n,r,o=this;return i(this,(function(i){switch(i.label){case 0:n=this.collections.filter((function(e){return e.checked})).map((function(e){return e.id})),i.label=1;case 1:return i.trys.push([1,3,,4]),this.formPromise=this.cipherService.shareManyWithServer(this.shareableCiphers,this.organizationId,n),[4,this.formPromise];case 2:return i.sent(),this.onShared.emit(),r=null!==(t=null===(e=this.organizations.find((function(e){return e.id===o.organizationId})))||void 0===e?void 0:e.name)&&void 0!==t?t:this.i18nService.t("organization"),this.toasterService.popAsync("success",null,this.i18nService.t("movedItemsToOrg",r)),[3,4];case 3:return i.sent(),[3,4];case 4:return[2]}}))}))},e.prototype.check=function(e,t){e.checked=null==t?!e.checked:t},e.prototype.selectAll=function(e){var t=this;(e?this.collections:this.writeableCollections).forEach((function(n){return t.check(n,e)}))},Object.defineProperty(e.prototype,"canSave",{get:function(){if(null!=this.shareableCiphers&&this.shareableCiphers.length>0&&null!=this.collections)for(var e=0;e0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=this.maxAccessCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"expired",{get:function(){return null!=this.expirationDate&&this.expirationDate<=new Date},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pendingDelete",{get:function(){return this.deletionDate<=new Date},enumerable:!1,configurable:!0}),e}();t.SendView=a},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.EffluxDatesComponent=void 0;n(2);var o=n(0),a=n(11),s=(n(1),n(3),n(1064)),l=n(0),c=n(1),p=n(3),u=n(2),d=n(11),m=n(36),f=n(8);function h(e,t){if(1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1," "),l.ɵɵelementStart(2,"div",13),l.ɵɵtext(3," "),l.ɵɵelement(4,"input",14),l.ɵɵtext(5," "),l.ɵɵelement(6,"input",15),l.ɵɵtext(7," "),l.ɵɵelementEnd(),l.ɵɵtext(8," "),l.ɵɵelementContainerEnd()),2&e){var n=l.ɵɵnextContext(2);l.ɵɵadvance(4),l.ɵɵproperty("readOnly",n.disableSend),l.ɵɵadvance(2),l.ɵɵproperty("readOnly",n.disableSend)}}function v(e,t){if(1&e&&(l.ɵɵelementStart(0,"option",18),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){var n=t.$implicit;l.ɵɵproperty("ngValue",n.twentyFourHour),l.ɵɵadvance(1),l.ɵɵtextInterpolate(n.twelveHour)}}function y(e,t){if(1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1," "),l.ɵɵelementStart(2,"div",13),l.ɵɵtext(3," "),l.ɵɵelement(4,"input",14),l.ɵɵtext(5," "),l.ɵɵelementStart(6,"select",16),l.ɵɵtext(7," "),l.ɵɵtemplate(8,v,2,2,"option",17),l.ɵɵtext(9," "),l.ɵɵelementEnd(),l.ɵɵtext(10," "),l.ɵɵelementEnd(),l.ɵɵtext(11," "),l.ɵɵelementContainerEnd()),2&e){var n=l.ɵɵnextContext(2);l.ɵɵadvance(4),l.ɵɵproperty("readOnly",n.disableSend),l.ɵɵadvance(2),l.ɵɵproperty("required",!n.editMode),l.ɵɵadvance(2),l.ɵɵproperty("ngForOf",n.safariDeletionTimePresetOptions)}}function g(e,t){if(1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1," "),l.ɵɵelement(2,"input",19),l.ɵɵtext(3," "),l.ɵɵelementContainerEnd()),2&e){var n=l.ɵɵnextContext(2);l.ɵɵadvance(2),l.ɵɵproperty("readOnly",n.disabled)}}function x(e,t){if(1&e&&(l.ɵɵtext(0," "),l.ɵɵelementContainerStart(1,10),l.ɵɵtext(2," "),l.ɵɵtemplate(3,h,9,2,"ng-container",11),l.ɵɵtext(4," "),l.ɵɵtemplate(5,y,12,3,"ng-container",11),l.ɵɵtext(6," "),l.ɵɵtemplate(7,g,4,1,"ng-container",12),l.ɵɵtext(8," "),l.ɵɵelementContainerEnd(),l.ɵɵtext(9," ")),2&e){var n=l.ɵɵnextContext();l.ɵɵadvance(1),l.ɵɵproperty("ngSwitch",n.browserPath),l.ɵɵadvance(2),l.ɵɵproperty("ngSwitchCase","firefox"),l.ɵɵadvance(2),l.ɵɵproperty("ngSwitchCase","safari")}}function b(e,t){if(1&e&&(l.ɵɵelementStart(0,"option",18),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){var n=t.$implicit;l.ɵɵproperty("ngValue",n.value),l.ɵɵadvance(1),l.ɵɵtextInterpolate1("",n.name," ")}}function S(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1," "),l.ɵɵelementContainerEnd())}function w(e,t){if(1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1," "),l.ɵɵtemplate(2,S,2,0,"ng-container",21),l.ɵɵtext(3," "),l.ɵɵelementContainerEnd()),2&e){l.ɵɵnextContext(2);var n=l.ɵɵreference(9);l.ɵɵadvance(2),l.ɵɵproperty("ngTemplateOutlet",n)}}function C(e,t){if(1&e&&(l.ɵɵelementStart(0,"div"),l.ɵɵtext(1," "),l.ɵɵelementStart(2,"select",20),l.ɵɵtext(3," "),l.ɵɵtemplate(4,b,2,2,"option",17),l.ɵɵtext(5," "),l.ɵɵelementEnd(),l.ɵɵtext(6," "),l.ɵɵtemplate(7,w,4,1,"ng-container",4),l.ɵɵtext(8," "),l.ɵɵelementEnd()),2&e){var n=l.ɵɵnextContext();l.ɵɵadvance(4),l.ɵɵproperty("ngForOf",n.deletionDatePresets),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",0===n.selectedDeletionDatePreset.value)}}function I(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1," "),l.ɵɵelementContainerEnd())}function E(e,t){if(1&e&&(l.ɵɵelementStart(0,"div"),l.ɵɵtext(1," "),l.ɵɵtemplate(2,I,2,0,"ng-container",21),l.ɵɵtext(3," "),l.ɵɵelementEnd()),2&e){l.ɵɵnextContext();var n=l.ɵɵreference(9);l.ɵɵadvance(2),l.ɵɵproperty("ngTemplateOutlet",n)}}function P(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"a",22),l.ɵɵlistener("click",(function(){return l.ɵɵrestoreView(n),l.ɵɵnextContext().clearExpiration()})),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd()}2&e&&(l.ɵɵadvance(1),l.ɵɵtextInterpolate1(" ",l.ɵɵpipeBind1(2,1,"clear")," "))}function k(e,t){if(1&e&&(l.ɵɵelementStart(0,"div",13),l.ɵɵtext(1," "),l.ɵɵelement(2,"input",24),l.ɵɵtext(3," "),l.ɵɵelement(4,"input",25),l.ɵɵtext(5," "),l.ɵɵelementEnd()),2&e){var n=l.ɵɵnextContext(2);l.ɵɵadvance(2),l.ɵɵproperty("required",!n.editMode)("readOnly",n.disabled),l.ɵɵadvance(2),l.ɵɵproperty("required",!n.editMode)("readOnly",n.disabled)}}function _(e,t){if(1&e&&(l.ɵɵelementStart(0,"option",18),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){var n=t.$implicit;l.ɵɵproperty("ngValue",n.twentyFourHour),l.ɵɵadvance(1),l.ɵɵtextInterpolate(n.twelveHour)}}function A(e,t){if(1&e&&(l.ɵɵelementStart(0,"div",13),l.ɵɵtext(1," "),l.ɵɵelement(2,"input",24),l.ɵɵtext(3," "),l.ɵɵelementStart(4,"select",26),l.ɵɵtext(5," "),l.ɵɵtemplate(6,_,2,2,"option",17),l.ɵɵtext(7," "),l.ɵɵelementEnd(),l.ɵɵtext(8," "),l.ɵɵelementEnd()),2&e){var n=l.ɵɵnextContext(2);l.ɵɵadvance(2),l.ɵɵproperty("required",!n.editMode)("readOnly",n.disabled),l.ɵɵadvance(2),l.ɵɵproperty("required",!n.editMode),l.ɵɵadvance(2),l.ɵɵproperty("ngForOf",n.safariExpirationTimePresetOptions)}}function O(e,t){if(1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1," "),l.ɵɵelement(2,"input",27),l.ɵɵtext(3," "),l.ɵɵelementContainerEnd()),2&e){var n=l.ɵɵnextContext(2);l.ɵɵadvance(2),l.ɵɵproperty("readOnly",n.disabled)}}function M(e,t){if(1&e&&(l.ɵɵtext(0," "),l.ɵɵelementContainerStart(1,10),l.ɵɵtext(2," "),l.ɵɵtemplate(3,k,6,4,"div",23),l.ɵɵtext(4," "),l.ɵɵtemplate(5,A,9,4,"div",23),l.ɵɵtext(6," "),l.ɵɵtemplate(7,O,4,1,"ng-container",12),l.ɵɵtext(8," "),l.ɵɵelementContainerEnd(),l.ɵɵtext(9," ")),2&e){var n=l.ɵɵnextContext();l.ɵɵadvance(1),l.ɵɵproperty("ngSwitch",n.browserPath),l.ɵɵadvance(2),l.ɵɵproperty("ngSwitchCase","firefox"),l.ɵɵadvance(2),l.ɵɵproperty("ngSwitchCase","safari")}}function T(e,t){if(1&e&&(l.ɵɵelementStart(0,"option",18),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){var n=t.$implicit;l.ɵɵproperty("ngValue",n.value),l.ɵɵadvance(1),l.ɵɵtextInterpolate1("",n.name," ")}}function D(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1," "),l.ɵɵelementContainerEnd())}function R(e,t){if(1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1," "),l.ɵɵtemplate(2,D,2,0,"ng-container",21),l.ɵɵtext(3," "),l.ɵɵelementContainerEnd()),2&e){l.ɵɵnextContext(2);var n=l.ɵɵreference(32);l.ɵɵadvance(2),l.ɵɵproperty("ngTemplateOutlet",n)}}function B(e,t){if(1&e&&(l.ɵɵelementStart(0,"div"),l.ɵɵtext(1," "),l.ɵɵelementStart(2,"select",28),l.ɵɵtext(3," "),l.ɵɵtemplate(4,T,2,2,"option",17),l.ɵɵtext(5," "),l.ɵɵelementEnd(),l.ɵɵtext(6," "),l.ɵɵtemplate(7,R,4,1,"ng-container",4),l.ɵɵtext(8," "),l.ɵɵelementEnd()),2&e){var n=l.ɵɵnextContext();l.ɵɵadvance(4),l.ɵɵproperty("ngForOf",n.expirationDatePresets),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",0===n.selectedExpirationDatePreset.value)}}function U(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1," "),l.ɵɵelementContainerEnd())}function j(e,t){if(1&e&&(l.ɵɵelementStart(0,"div"),l.ɵɵtext(1," "),l.ɵɵtemplate(2,U,2,0,"ng-container",21),l.ɵɵtext(3," "),l.ɵɵelementEnd()),2&e){l.ɵɵnextContext();var n=l.ɵɵreference(32);l.ɵɵadvance(2),l.ɵɵproperty("ngTemplateOutlet",n)}}var V=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.i18nService=t,i.platformUtilsService=n,i.datePipe=r,i}return i(t,e),t.ɵfac=function(e){return new(e||t)(l.ɵɵdirectiveInject(c.I18nService),l.ɵɵdirectiveInject(p.PlatformUtilsService),l.ɵɵdirectiveInject(u.DatePipe))},t.ɵcmp=l.ɵɵdefineComponent({type:t,selectors:[["app-send-efflux-dates"]],features:[l.ɵɵProvidersFeature([],[{provide:a.ControlContainer,useExisting:a.NgForm}]),l.ɵɵInheritDefinitionFeature],decls:44,vars:18,consts:[[1,"row",3,"formGroup"],[1,"col-6","form-group"],["for","deletionDate"],["deletionDateCustom",""],[4,"ngIf"],[1,"form-text","text-muted","small"],[1,"d-flex"],["for","expirationDate"],["href","#","appStopClick","","class","ml-auto",3,"click",4,"ngIf"],["expirationDateCustom",""],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[1,"d-flex","justify-content-around"],["id","deletionDateCustomFallback","type","date","name","DeletionDateFallback","formControlName","fallbackDeletionDate","required","","placeholder","MM/DD/YYYY","data-date-format","mm/dd/yyyy",1,"form-control","mt-1",3,"readOnly"],["id","deletionTimeCustomFallback","type","time","name","DeletionTimeDate","formControlName","fallbackDeletionTime","required","","placeholder","HH:MM AM/PM",1,"form-control","mt-1","ml-1",3,"readOnly"],["id","deletionTimeCustomFallback","formControlName","fallbackDeletionTime","name","SafariDeletionTime",1,"form-control","mt-1","ml-1",3,"required"],[3,"ngValue",4,"ngFor","ngForOf"],[3,"ngValue"],["id","deletionDateCustom","type","datetime-local","name","DeletionDate","formControlName","defaultDeletionDateTime","required","","placeholder","MM/DD/YYYY HH:MM AM/PM",1,"form-control","mt-1",3,"readOnly"],["id","deletionDate","name","SelectedDeletionDatePreset","formControlName","selectedDeletionDatePreset","required","",1,"form-control"],[4,"ngTemplateOutlet"],["href","#","appStopClick","",1,"ml-auto",3,"click"],["class","d-flex justify-content-around",4,"ngSwitchCase"],["id","expirationDateCustomFallback","type","date","name","ExpirationDateFallback","formControlName","fallbackExpirationDate","placeholder","MM/DD/YYYY","data-date-format","mm/dd/yyyy",1,"form-control","mt-1",3,"required","readOnly"],["id","expirationTimeCustomFallback","type","time","name","ExpirationTimeFallback","formControlName","fallbackExpirationTime","placeholder","HH:MM AM/PM",1,"form-control","mt-1","ml-1",3,"required","readOnly"],["id","expirationTimeCustomFallback","formControlName","fallbackExpirationTime","name","SafariExpirationTime",1,"form-control","mt-1","ml-1",3,"required"],["id","expirationDateCustom","type","datetime-local","name","ExpirationDate","formControlName","defaultExpirationDateTime","placeholder","MM/DD/YYYY HH:MM AM/PM",1,"form-control","mt-1",3,"readOnly"],["id","expirationDate","name","SelectedExpirationDatePreset","formControlName","selectedExpirationDatePreset","required","",1,"form-control"]],template:function(e,t){1&e&&(l.ɵɵelementStart(0,"div",0),l.ɵɵtext(1," "),l.ɵɵelementStart(2,"div",1),l.ɵɵtext(3," "),l.ɵɵelementStart(4,"label",2),l.ɵɵtext(5),l.ɵɵpipe(6,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(7," "),l.ɵɵtemplate(8,x,10,3,"ng-template",null,3,l.ɵɵtemplateRefExtractor),l.ɵɵtext(10," "),l.ɵɵtemplate(11,C,9,2,"div",4),l.ɵɵtext(12," "),l.ɵɵtemplate(13,E,4,1,"div",4),l.ɵɵtext(14," "),l.ɵɵelementStart(15,"div",5),l.ɵɵtext(16),l.ɵɵpipe(17,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(18," "),l.ɵɵelementEnd(),l.ɵɵtext(19," "),l.ɵɵelementStart(20,"div",1),l.ɵɵtext(21," "),l.ɵɵelementStart(22,"div",6),l.ɵɵtext(23," "),l.ɵɵelementStart(24,"label",7),l.ɵɵtext(25),l.ɵɵpipe(26,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(27," "),l.ɵɵtemplate(28,P,3,3,"a",8),l.ɵɵtext(29," "),l.ɵɵelementEnd(),l.ɵɵtext(30," "),l.ɵɵtemplate(31,M,10,3,"ng-template",null,9,l.ɵɵtemplateRefExtractor),l.ɵɵtext(33," "),l.ɵɵtemplate(34,B,9,2,"div",4),l.ɵɵtext(35," "),l.ɵɵtemplate(36,j,4,1,"div",4),l.ɵɵtext(37," "),l.ɵɵelementStart(38,"div",5),l.ɵɵtext(39),l.ɵɵpipe(40,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(41," "),l.ɵɵelementEnd(),l.ɵɵtext(42," "),l.ɵɵelementEnd(),l.ɵɵtext(43," ")),2&e&&(l.ɵɵproperty("formGroup",t.datesForm),l.ɵɵadvance(5),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(6,10,"deletionDate")),l.ɵɵadvance(6),l.ɵɵproperty("ngIf",!t.editMode),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",t.editMode),l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(17,12,"deletionDateDesc")),l.ɵɵadvance(9),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(26,14,"expirationDate")),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",t.editMode&&!t.disabled),l.ɵɵadvance(6),l.ɵɵproperty("ngIf",!t.editMode),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",t.editMode),l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(40,16,"expirationDateDesc")))},directives:[d.NgControlStatusGroup,d.FormGroupDirective,u.NgIf,u.NgSwitch,u.NgSwitchCase,u.NgSwitchDefault,d.DefaultValueAccessor,d.NgControlStatus,d.FormControlName,d.RequiredValidator,d.SelectControlValueAccessor,u.NgForOf,d.NgSelectOption,d.ɵangular_packages_forms_forms_z,u.NgTemplateOutlet,m.StopClickDirective],pipes:[f.I18nPipe],encapsulation:2}),t}(s.EffluxDatesComponent);t.EffluxDatesComponent=V,("undefined"==typeof ngDevMode||ngDevMode)&&l.ɵsetClassMetadata(V,[{type:o.Component,args:[{selector:"app-send-efflux-dates",templateUrl:"efflux-dates.component.html",viewProviders:[{provide:a.ControlContainer,useExisting:a.NgForm}]}]}],(function(){return[{type:c.I18nService},{type:p.PlatformUtilsService},{type:u.DatePipe}]}),null)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0),s.ɵɵadvance(2),s.ɵɵproperty("disabled",n.loading),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(43,27,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(47,29,"save"))}},directives:[u.NgControlStatusGroup,u.NgForm,d.ApiActionDirective,m.NgIf,m.NgForOf,u.DefaultValueAccessor,u.RequiredValidator,u.NgControlStatus,u.NgModel,f.A11yTitleDirective,m.NgClass,h.StopClickDirective],pipes:[v.I18nPipe],encapsulation:2}),e}();t.DomainRulesComponent=P,("undefined"==typeof ngDevMode||ngDevMode)&&s.ɵsetClassMetadata(P,[{type:o.Component,args:[{selector:"app-domain-rules",templateUrl:"domain-rules.component.html"}]}],(function(){return[{type:l.ApiService},{type:c.I18nService},{type:p.ToasterService}]}),null)},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0?(t=e.data.map((function(e){return new c.Policy(new l.PolicyData(e))})),n=this,[4,this.policyService.getMasterPasswordPolicyOptions(t)]):[3,3];case 2:n.enforcedPolicyOptions=r.sent(),r.label=3;case 3:return[2]}}))}))},t.prototype.submit=function(){return o(this,void 0,void 0,(function(){var e,t,n,r,i,o,s;return a(this,(function(a){switch(a.label){case 0:return[4,this.strongPassword()];case 1:return a.sent()?[4,this.apiService.postEmergencyAccessTakeover(this.emergencyAccessId)]:[2];case 2:return e=a.sent(),[4,this.cryptoService.rsaDecrypt(e.keyEncrypted)];case 3:return t=a.sent(),null==(n=new p.SymmetricCryptoKey(t))?(this.toasterService.popAsync("error",this.i18nService.t("errorOccurred"),this.i18nService.t("unexpectedError")),[2]):[4,this.cryptoService.makeKey(this.masterPassword,this.email,e.kdf,e.kdfIterations)];case 4:return r=a.sent(),[4,this.cryptoService.hashPassword(this.masterPassword,r)];case 5:return i=a.sent(),[4,this.cryptoService.remakeEncKey(r,n)];case 6:o=a.sent(),(s=new u.EmergencyAccessPasswordRequest).newMasterPasswordHash=i,s.key=o[1].encryptedString,this.apiService.postEmergencyAccessPassword(this.emergencyAccessId,s);try{this.onDone.emit()}catch(l){}return[2]}}))}))},t.ɵfac=function(e){return new(e||t)(m.ɵɵdirectiveInject(f.I18nService),m.ɵɵdirectiveInject(h.CryptoService),m.ɵɵdirectiveInject(v.MessagingService),m.ɵɵdirectiveInject(y.UserService),m.ɵɵdirectiveInject(g.PasswordGenerationService),m.ɵɵdirectiveInject(x.PlatformUtilsService),m.ɵɵdirectiveInject(b.PolicyService),m.ɵɵdirectiveInject(S.ApiService),m.ɵɵdirectiveInject(w.ToasterService))},t.ɵcmp=m.ɵɵdefineComponent({type:t,selectors:[["emergency-access-takeover"]],inputs:{emergencyAccessId:"emergencyAccessId",name:"name",email:"email",kdf:"kdf",kdfIterations:"kdfIterations"},outputs:{onDone:"onDone"},features:[m.ɵɵInheritDefinitionFeature],decls:82,vars:32,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","userAddEditTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-lg"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","userAddEditTitle",1,"modal-title"],["class","text-muted",4,"ngIf"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["type","warning"],["type","info",3,"enforcedPolicyOptions",4,"ngIf"],[1,"row"],[1,"col-6"],[1,"form-group"],["for","masterPassword"],["id","masterPassword","type","password","name","NewMasterPasswordHash","required","","appInputVerbatim","","autocomplete","new-password",1,"form-control","mb-1",3,"ngModel","ngModelChange","input"],[3,"score","showText"],["for","masterPasswordRetype"],["id","masterPasswordRetype","type","password","name","MasterPasswordRetype","required","","appInputVerbatim","","autocomplete","new-password",1,"form-control",3,"ngModel","ngModelChange"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"text-muted"],["type","info",3,"enforcedPolicyOptions"]],template:function(e,t){if(1&e&&(m.ɵɵelementStart(0,"div",0),m.ɵɵtext(1," "),m.ɵɵelementStart(2,"div",1),m.ɵɵtext(3," "),m.ɵɵelementStart(4,"form",2,3),m.ɵɵlistener("ngSubmit",(function(){return t.submit()})),m.ɵɵtext(6," "),m.ɵɵelementStart(7,"div",4),m.ɵɵtext(8," "),m.ɵɵelementStart(9,"h2",5),m.ɵɵtext(10),m.ɵɵpipe(11,"i18n"),m.ɵɵtemplate(12,M,2,1,"small",6),m.ɵɵtext(13," "),m.ɵɵelementEnd(),m.ɵɵtext(14," "),m.ɵɵelementStart(15,"button",7),m.ɵɵpipe(16,"i18n"),m.ɵɵtext(17," "),m.ɵɵelementStart(18,"span",8),m.ɵɵtext(19,"×"),m.ɵɵelementEnd(),m.ɵɵtext(20," "),m.ɵɵelementEnd(),m.ɵɵtext(21," "),m.ɵɵelementEnd(),m.ɵɵtext(22," "),m.ɵɵelementStart(23,"div",9),m.ɵɵtext(24," "),m.ɵɵelementStart(25,"app-callout",10),m.ɵɵtext(26),m.ɵɵpipe(27,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(28," "),m.ɵɵtemplate(29,T,2,1,"app-callout",11),m.ɵɵtext(30," "),m.ɵɵelementStart(31,"div",12),m.ɵɵtext(32," "),m.ɵɵelementStart(33,"div",13),m.ɵɵtext(34," "),m.ɵɵelementStart(35,"div",14),m.ɵɵtext(36," "),m.ɵɵelementStart(37,"label",15),m.ɵɵtext(38),m.ɵɵpipe(39,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(40," "),m.ɵɵelementStart(41,"input",16),m.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e}))("input",(function(){return t.updatePasswordStrength()})),m.ɵɵelementEnd(),m.ɵɵtext(42," "),m.ɵɵelementStart(43,"app-password-strength",17),m.ɵɵtext(44," "),m.ɵɵelementEnd(),m.ɵɵtext(45," "),m.ɵɵelementEnd(),m.ɵɵtext(46," "),m.ɵɵelementEnd(),m.ɵɵtext(47," "),m.ɵɵelementStart(48,"div",13),m.ɵɵtext(49," "),m.ɵɵelementStart(50,"div",14),m.ɵɵtext(51," "),m.ɵɵelementStart(52,"label",18),m.ɵɵtext(53),m.ɵɵpipe(54,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(55," "),m.ɵɵelementStart(56,"input",19),m.ɵɵlistener("ngModelChange",(function(e){return t.masterPasswordRetype=e})),m.ɵɵelementEnd(),m.ɵɵtext(57," "),m.ɵɵelementEnd(),m.ɵɵtext(58," "),m.ɵɵelementEnd(),m.ɵɵtext(59," "),m.ɵɵelementEnd(),m.ɵɵtext(60," "),m.ɵɵelementEnd(),m.ɵɵtext(61," "),m.ɵɵelementStart(62,"div",20),m.ɵɵtext(63," "),m.ɵɵelementStart(64,"button",21),m.ɵɵtext(65," "),m.ɵɵelement(66,"i",22),m.ɵɵpipe(67,"i18n"),m.ɵɵtext(68," "),m.ɵɵelementStart(69,"span"),m.ɵɵtext(70),m.ɵɵpipe(71,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(72," "),m.ɵɵelementEnd(),m.ɵɵtext(73," "),m.ɵɵelementStart(74,"button",23),m.ɵɵtext(75),m.ɵɵpipe(76,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(77," "),m.ɵɵelementEnd(),m.ɵɵtext(78," "),m.ɵɵelementEnd(),m.ɵɵtext(79," "),m.ɵɵelementEnd(),m.ɵɵtext(80," "),m.ɵɵelementEnd(),m.ɵɵtext(81," ")),2&e){var n=m.ɵɵreference(5);m.ɵɵadvance(4),m.ɵɵproperty("appApiAction",t.formPromise),m.ɵɵadvance(6),m.ɵɵtextInterpolate1(" ",m.ɵɵpipeBind1(11,16,"takeover")," "),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",t.name),m.ɵɵadvance(3),m.ɵɵpropertyInterpolate("appA11yTitle",m.ɵɵpipeBind1(16,18,"close")),m.ɵɵadvance(11),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(27,20,"loggedOutWarning")),m.ɵɵadvance(3),m.ɵɵproperty("ngIf",t.enforcedPolicyOptions),m.ɵɵadvance(9),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(39,22,"newMasterPass")),m.ɵɵadvance(3),m.ɵɵproperty("ngModel",t.masterPassword),m.ɵɵadvance(2),m.ɵɵproperty("score",t.masterPasswordScore)("showText",!0),m.ɵɵadvance(10),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(54,24,"confirmNewMasterPass")),m.ɵɵadvance(3),m.ɵɵproperty("ngModel",t.masterPasswordRetype),m.ɵɵadvance(8),m.ɵɵproperty("disabled",n.loading),m.ɵɵadvance(2),m.ɵɵpropertyInterpolate("title",m.ɵɵpipeBind1(67,26,"loading")),m.ɵɵadvance(4),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(71,28,"save")),m.ɵɵadvance(5),m.ɵɵtextInterpolate1(" ",m.ɵɵpipeBind1(76,30,"cancel")," ")}},directives:[C.NgControlStatusGroup,C.NgForm,I.ApiActionDirective,E.NgIf,P.A11yTitleDirective,k.CalloutComponent,C.DefaultValueAccessor,C.RequiredValidator,_.InputVerbatimDirective,C.NgControlStatus,C.NgModel,A.PasswordStrengthComponent],pipes:[O.I18nPipe],encapsulation:2}),t}(d.ChangePasswordComponent);t.EmergencyAccessTakeoverComponent=D,("undefined"==typeof ngDevMode||ngDevMode)&&m.ɵsetClassMetadata(D,[{type:s.Component,args:[{selector:"emergency-access-takeover",templateUrl:"emergency-access-takeover.component.html"}]}],(function(){return[{type:f.I18nService},{type:h.CryptoService},{type:v.MessagingService},{type:y.UserService},{type:g.PasswordGenerationService},{type:x.PlatformUtilsService},{type:b.PolicyService},{type:S.ApiService},{type:w.ToasterService}]}),{onDone:[{type:s.Output}],emergencyAccessId:[{type:s.Input}],name:[{type:s.Input}],email:[{type:s.Input}],kdf:[{type:s.Input}],kdfIterations:[{type:s.Input}]})},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]-1&&this.trustedContacts.splice(t,1)},e.prototype.removeGrantor=function(e){var t=this.grantedContacts.indexOf(e);t>-1&&this.grantedContacts.splice(t,1)},e.prototype.doConfirmation=function(e){return r(this,void 0,void 0,(function(){var t,n,r,o,a,s,p,u;return i(this,(function(i){switch(i.label){case 0:return[4,this.cryptoService.getEncKey()];case 1:return t=i.sent(),[4,this.apiService.getUserPublicKey(e.granteeId)];case 2:n=i.sent(),r=l.Utils.fromB64ToArray(n.publicKey),i.label=3;case 3:return i.trys.push([3,5,,6]),a=(o=console).log,s="User's fingerprint: ",[4,this.cryptoService.getFingerprint(e.granteeId,r.buffer)];case 4:return a.apply(o,[s+i.sent().join("-")]),[3,6];case 5:return i.sent(),[3,6];case 6:return[4,this.cryptoService.rsaEncrypt(t.key,r.buffer)];case 7:return p=i.sent(),(u=new c.EmergencyAccessConfirmRequest).key=p.encryptedString,[4,this.apiService.postEmergencyAccessConfirm(e.id,u)];case 8:return i.sent(),[2]}}))}))},e.ɵfac=function(t){return new(t||e)(h.ɵɵdirectiveInject(v.ApiService),h.ɵɵdirectiveInject(y.I18nService),h.ɵɵdirectiveInject(g.ModalService),h.ɵɵdirectiveInject(x.PlatformUtilsService),h.ɵɵdirectiveInject(b.ToasterService),h.ɵɵdirectiveInject(S.CryptoService),h.ɵɵdirectiveInject(w.StorageService),h.ɵɵdirectiveInject(C.UserService),h.ɵɵdirectiveInject(I.MessagingService),h.ɵɵdirectiveInject(E.UserNamePipe))},e.ɵcmp=h.ɵɵdefineComponent({type:e,selectors:[["emergency-access"]],viewQuery:function(e,t){if(1&e&&(h.ɵɵviewQuery(T,3,o.ViewContainerRef),h.ɵɵviewQuery(D,3,o.ViewContainerRef),h.ɵɵviewQuery(R,3,o.ViewContainerRef)),2&e){var n=void 0;h.ɵɵqueryRefresh(n=h.ɵɵloadQuery())&&(t.addEditModalRef=n.first),h.ɵɵqueryRefresh(n=h.ɵɵloadQuery())&&(t.takeoverModalRef=n.first),h.ɵɵqueryRefresh(n=h.ɵɵloadQuery())&&(t.confirmModalRef=n.first)}},decls:59,vars:25,consts:[[1,"page-header"],["href","https://bitwarden.com/help/article/emergency-access/","target","_blank","rel","noopener"],[4,"ngIf"],[1,"page-header","d-flex"],["href","#","appStopClick","","class","badge badge-primary",3,"click",4,"ngIf"],[1,"ml-auto","d-flex"],["type","button",1,"btn","btn-sm","btn-outline-primary","ml-3",3,"disabled","click"],["aria-hidden","true",1,"fa","fa-plus","fa-fw"],["class","table table-hover table-list mb-0",4,"ngIf"],[1,"page-header","spaced-header"],["addEdit",""],["takeoverTemplate",""],["confirmTemplate",""],["href","#","appStopClick","",1,"badge","badge-primary",3,"click"],[1,"table","table-hover","table-list","mb-0"],[4,"ngFor","ngForOf"],["width","30"],["size","25",3,"data","email","circle","fontSize"],["href","#","appStopClick","",3,"click"],["class","badge badge-secondary",4,"ngIf"],["class","badge badge-warning",4,"ngIf"],["class","badge badge-success",4,"ngIf"],["class","badge badge-primary",4,"ngIf"],["class","text-muted d-block",4,"ngIf"],[1,"table-list-options"],["appListDropdown","",1,"dropdown"],["type","button","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",1,"btn","btn-outline-secondary","dropdown-toggle",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-cog","fa-lg"],[1,"dropdown-menu","dropdown-menu-right"],["class","dropdown-item","href","#","appStopClick","",3,"click",4,"ngIf"],["class","dropdown-item text-success","href","#","appStopClick","",3,"click",4,"ngIf"],["class","dropdown-item text-warning","href","#","appStopClick","",3,"click",4,"ngIf"],["href","#","appStopClick","",1,"dropdown-item","text-danger",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-remove"],[1,"badge","badge-secondary"],[1,"badge","badge-warning"],[1,"badge","badge-success"],[1,"badge","badge-primary"],[1,"text-muted","d-block"],["href","#","appStopClick","",1,"dropdown-item",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-envelope-o"],["href","#","appStopClick","",1,"dropdown-item","text-success",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-check"],["href","#","appStopClick","",1,"dropdown-item","text-warning",3,"click"],["class","dropdown-item",3,"routerLink",4,"ngIf"],["aria-hidden","true",1,"fa","fa-fw","fa-key"],[1,"dropdown-item",3,"routerLink"],["aria-hidden","true",1,"fa","fa-fw","fa-eye"]],template:function(e,t){1&e&&(h.ɵɵelementStart(0,"div",0),h.ɵɵtext(1," "),h.ɵɵelementStart(2,"h1"),h.ɵɵtext(3),h.ɵɵpipe(4,"i18n"),h.ɵɵelementEnd(),h.ɵɵtext(5," "),h.ɵɵelementEnd(),h.ɵɵtext(6," "),h.ɵɵelementStart(7,"p"),h.ɵɵtext(8),h.ɵɵpipe(9,"i18n"),h.ɵɵelementStart(10,"a",1),h.ɵɵtext(11),h.ɵɵpipe(12,"i18n"),h.ɵɵelementEnd(),h.ɵɵtext(13," "),h.ɵɵelementEnd(),h.ɵɵtext(14," "),h.ɵɵtemplate(15,B,7,6,"p",2),h.ɵɵtext(16," "),h.ɵɵelementStart(17,"div",3),h.ɵɵtext(18," "),h.ɵɵelementStart(19,"h2"),h.ɵɵtext(20),h.ɵɵpipe(21,"i18n"),h.ɵɵtemplate(22,U,3,3,"a",4),h.ɵɵtext(23," "),h.ɵɵelementEnd(),h.ɵɵtext(24," "),h.ɵɵelementStart(25,"div",5),h.ɵɵtext(26," "),h.ɵɵelementStart(27,"button",6),h.ɵɵlistener("click",(function(){return t.invite()})),h.ɵɵtext(28," "),h.ɵɵelement(29,"i",7),h.ɵɵtext(30),h.ɵɵpipe(31,"i18n"),h.ɵɵelementEnd(),h.ɵɵtext(32," "),h.ɵɵelementEnd(),h.ɵɵtext(33," "),h.ɵɵelementEnd(),h.ɵɵtext(34," "),h.ɵɵtemplate(35,Q,7,1,"table",8),h.ɵɵtext(36," "),h.ɵɵtemplate(37,Y,3,3,"p",2),h.ɵɵtext(38," "),h.ɵɵelementStart(39,"div",9),h.ɵɵtext(40," "),h.ɵɵelementStart(41,"h2"),h.ɵɵtext(42),h.ɵɵpipe(43,"i18n"),h.ɵɵelementEnd(),h.ɵɵtext(44," "),h.ɵɵelementEnd(),h.ɵɵtext(45," "),h.ɵɵtemplate(46,le,7,1,"table",8),h.ɵɵtext(47," "),h.ɵɵtemplate(48,ce,3,3,"p",2),h.ɵɵtext(49," "),h.ɵɵtemplate(50,pe,0,0,"ng-template",null,10,h.ɵɵtemplateRefExtractor),h.ɵɵtext(52," "),h.ɵɵtemplate(53,ue,0,0,"ng-template",null,11,h.ɵɵtemplateRefExtractor),h.ɵɵtext(55," "),h.ɵɵtemplate(56,de,0,0,"ng-template",null,12,h.ɵɵtemplateRefExtractor),h.ɵɵtext(58," ")),2&e&&(h.ɵɵadvance(3),h.ɵɵtextInterpolate(h.ɵɵpipeBind1(4,13,"emergencyAccess")),h.ɵɵadvance(5),h.ɵɵtextInterpolate1(" ",h.ɵɵpipeBind1(9,15,"emergencyAccessDesc")," "),h.ɵɵadvance(3),h.ɵɵtextInterpolate1(" ",h.ɵɵpipeBind1(12,17,"learnMore"),". "),h.ɵɵadvance(4),h.ɵɵproperty("ngIf",t.isOrganizationOwner),h.ɵɵadvance(5),h.ɵɵtextInterpolate1(" ",h.ɵɵpipeBind1(21,19,"trustedEmergencyContacts")," "),h.ɵɵadvance(2),h.ɵɵproperty("ngIf",!t.canAccessPremium),h.ɵɵadvance(5),h.ɵɵproperty("disabled",!t.canAccessPremium),h.ɵɵadvance(3),h.ɵɵtextInterpolate1(" ",h.ɵɵpipeBind1(31,21,"addEmergencyContact")," "),h.ɵɵadvance(5),h.ɵɵproperty("ngIf",t.trustedContacts&&t.trustedContacts.length),h.ɵɵadvance(2),h.ɵɵproperty("ngIf",!t.trustedContacts||!t.trustedContacts.length),h.ɵɵadvance(5),h.ɵɵtextInterpolate(h.ɵɵpipeBind1(43,23,"designatedEmergencyContacts")),h.ɵɵadvance(4),h.ɵɵproperty("ngIf",t.grantedContacts&&t.grantedContacts.length),h.ɵɵadvance(2),h.ɵɵproperty("ngIf",!t.grantedContacts||!t.grantedContacts.length))},directives:[P.NgIf,k.StopClickDirective,P.NgForOf,_.AvatarComponent,A.A11yTitleDirective,O.RouterLinkWithHref],pipes:[M.I18nPipe,E.UserNamePipe],encapsulation:2}),e}();t.EmergencyAccessComponent=me,("undefined"==typeof ngDevMode||ngDevMode)&&h.ɵsetClassMetadata(me,[{type:o.Component,args:[{selector:"emergency-access",templateUrl:"emergency-access.component.html"}]}],(function(){return[{type:v.ApiService},{type:y.I18nService},{type:g.ModalService},{type:x.PlatformUtilsService},{type:b.ToasterService},{type:S.CryptoService},{type:w.StorageService},{type:C.UserService},{type:I.MessagingService},{type:E.UserNamePipe}]}),{addEditModalRef:[{type:o.ViewChild,args:["addEdit",{read:o.ViewContainerRef,static:!0}]}],takeoverModalRef:[{type:o.ViewChild,args:["takeoverTemplate",{read:o.ViewContainerRef,static:!0}]}],confirmModalRef:[{type:o.ViewChild,args:["confirmTemplate",{read:o.ViewContainerRef,static:!0}]}]})},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.EmergencyAccessViewResponse=t.EmergencyAccessTakeoverResponse=t.EmergencyAccessGrantorDetailsResponse=t.EmergencyAccessGranteeDetailsResponse=void 0;var o=n(25),a=n(315),s=function(e){function t(t){var n=e.call(this,t)||this;return n.id=n.getResponseProperty("Id"),n.granteeId=n.getResponseProperty("GranteeId"),n.name=n.getResponseProperty("Name"),n.email=n.getResponseProperty("Email"),n.type=n.getResponseProperty("Type"),n.status=n.getResponseProperty("Status"),n.waitTimeDays=n.getResponseProperty("WaitTimeDays"),n.creationDate=n.getResponseProperty("CreationDate"),n}return i(t,e),t}(o.BaseResponse);t.EmergencyAccessGranteeDetailsResponse=s;var l=function(e){function t(t){var n=e.call(this,t)||this;return n.id=n.getResponseProperty("Id"),n.grantorId=n.getResponseProperty("GrantorId"),n.name=n.getResponseProperty("Name"),n.email=n.getResponseProperty("Email"),n.type=n.getResponseProperty("Type"),n.status=n.getResponseProperty("Status"),n.waitTimeDays=n.getResponseProperty("WaitTimeDays"),n.creationDate=n.getResponseProperty("CreationDate"),n}return i(t,e),t}(o.BaseResponse);t.EmergencyAccessGrantorDetailsResponse=l;var c=function(e){function t(t){var n=e.call(this,t)||this;return n.keyEncrypted=n.getResponseProperty("KeyEncrypted"),n.kdf=n.getResponseProperty("Kdf"),n.kdfIterations=n.getResponseProperty("KdfIterations"),n}return i(t,e),t}(o.BaseResponse);t.EmergencyAccessTakeoverResponse=c;var p=function(e){function t(t){var n=e.call(this,t)||this;n.ciphers=[],n.keyEncrypted=n.getResponseProperty("KeyEncrypted");var r=n.getResponseProperty("Ciphers");return null!=r&&(n.ciphers=r.map((function(e){return new a.CipherResponse(e)}))),n}return i(t,e),t}(o.BaseResponse);t.EmergencyAccessViewResponse=p},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AttachmentResponse=void 0;var o=function(e){function t(t){var n=e.call(this,t)||this;return n.id=n.getResponseProperty("Id"),n.url=n.getResponseProperty("Url"),n.fileName=n.getResponseProperty("FileName"),n.key=n.getResponseProperty("Key"),n.size=n.getResponseProperty("Size"),n.sizeName=n.getResponseProperty("SizeName"),n}return i(t,e),t}(n(25).BaseResponse);t.AttachmentResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]1?"×"+n.quantity:""," @ ",a.ɵɵpipeBind2(4,5,n.amount,"$")," "),a.ɵɵadvance(4),a.ɵɵtextInterpolate2(" ",a.ɵɵpipeBind2(8,8,n.quantity*n.amount,"$")," /",a.ɵɵpipeBind1(9,11,n.interval)," ")}}function A(e,t){if(1&e&&(a.ɵɵelementStart(0,"div",16),a.ɵɵtext(1," "),a.ɵɵelementStart(2,"strong",17),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(5," "),a.ɵɵelementStart(6,"table",18),a.ɵɵtext(7," "),a.ɵɵelementStart(8,"tbody"),a.ɵɵtext(9," "),a.ɵɵtemplate(10,_,11,13,"tr",19),a.ɵɵtext(11," "),a.ɵɵelementEnd(),a.ɵɵtext(12," "),a.ɵɵelementEnd(),a.ɵɵtext(13," "),a.ɵɵelementEnd()),2&e){var n=a.ɵɵnextContext(3);a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(4,2,"details")),a.ɵɵadvance(7),a.ɵɵproperty("ngForOf",n.subscription.items)}}function O(e,t){if(1&e&&(a.ɵɵelementStart(0,"div",10),a.ɵɵtext(1," "),a.ɵɵelementStart(2,"div",11),a.ɵɵtext(3," "),a.ɵɵelementStart(4,"dl"),a.ɵɵtext(5," "),a.ɵɵelementStart(6,"dt"),a.ɵɵtext(7),a.ɵɵpipe(8,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(9," "),a.ɵɵelementStart(10,"dd"),a.ɵɵtext(11," "),a.ɵɵelementStart(12,"span",12),a.ɵɵtext(13),a.ɵɵelementEnd(),a.ɵɵtext(14," "),a.ɵɵtemplate(15,k,3,3,"span",13),a.ɵɵtext(16," "),a.ɵɵelementEnd(),a.ɵɵtext(17," "),a.ɵɵelementStart(18,"dt"),a.ɵɵtext(19),a.ɵɵpipe(20,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(21," "),a.ɵɵelementStart(22,"dd"),a.ɵɵtext(23),a.ɵɵpipe(24,"date"),a.ɵɵpipe(25,"currency"),a.ɵɵelementEnd(),a.ɵɵtext(26," "),a.ɵɵelementEnd(),a.ɵɵtext(27," "),a.ɵɵelementEnd(),a.ɵɵtext(28," "),a.ɵɵtemplate(29,A,14,4,"div",14),a.ɵɵtext(30," "),a.ɵɵelementEnd()),2&e){var n=a.ɵɵnextContext(2);a.ɵɵadvance(7),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(8,6,"status")),a.ɵɵadvance(6),a.ɵɵtextInterpolate(n.subscription&&n.subscription.status||"-"),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",n.subscriptionMarkedForCancel),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(20,8,"nextCharge")),a.ɵɵadvance(4),a.ɵɵtextInterpolate1("",n.nextInvoice?a.ɵɵpipeBind2(24,10,n.nextInvoice.date,"mediumDate")+", "+a.ɵɵpipeBind2(25,13,n.nextInvoice.amount,"$"):"-"," "),a.ɵɵadvance(6),a.ɵɵproperty("ngIf",n.subscription)}}function M(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"div",23),a.ɵɵtext(1," "),a.ɵɵelementStart(2,"div",24),a.ɵɵtext(3," "),a.ɵɵelementStart(4,"button",25),a.ɵɵlistener("click",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext(3).closeUpdateLicense(!1)})),a.ɵɵpipe(5,"i18n"),a.ɵɵelementStart(6,"span",26),a.ɵɵtext(7,"×"),a.ɵɵelementEnd(),a.ɵɵelementEnd(),a.ɵɵtext(8," "),a.ɵɵelementStart(9,"h3",27),a.ɵɵtext(10),a.ɵɵpipe(11,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(12," "),a.ɵɵelementStart(13,"app-update-license",28),a.ɵɵlistener("onUpdated",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext(3).closeUpdateLicense(!0)}))("onCanceled",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext(3).closeUpdateLicense(!1)})),a.ɵɵtext(14," "),a.ɵɵelementEnd(),a.ɵɵtext(15," "),a.ɵɵelementEnd(),a.ɵɵtext(16," "),a.ɵɵelementEnd()}2&e&&(a.ɵɵadvance(4),a.ɵɵpropertyInterpolate("appA11yTitle",a.ɵɵpipeBind1(5,2,"cancel")),a.ɵɵadvance(6),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(11,4,"updateLicense")))}function T(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementContainerStart(0),a.ɵɵtext(1," "),a.ɵɵelementStart(2,"div"),a.ɵɵtext(3," "),a.ɵɵelementStart(4,"button",20),a.ɵɵlistener("click",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext(2).updateLicense()})),a.ɵɵtext(5),a.ɵɵpipe(6,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(7," "),a.ɵɵelementStart(8,"a",21),a.ɵɵtext(9),a.ɵɵpipe(10,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(11," "),a.ɵɵelementEnd(),a.ɵɵtext(12," "),a.ɵɵtemplate(13,M,17,6,"div",22),a.ɵɵtext(14," "),a.ɵɵelementContainerEnd()}if(2&e){var r=a.ɵɵnextContext(2);a.ɵɵadvance(5),a.ɵɵtextInterpolate1(" ",a.ɵɵpipeBind1(6,3,"updateLicense")," "),a.ɵɵadvance(4),a.ɵɵtextInterpolate1(" ",a.ɵɵpipeBind1(10,5,"manageSubscription")," "),a.ɵɵadvance(4),a.ɵɵproperty("ngIf",r.showUpdateLicense)}}function D(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"button",20),a.ɵɵlistener("click",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext(3).downloadLicense()})),a.ɵɵtext(1),a.ɵɵpipe(2,"i18n"),a.ɵɵelementEnd()}2&e&&(a.ɵɵadvance(1),a.ɵɵtextInterpolate1(" ",a.ɵɵpipeBind1(2,1,"downloadLicense")," "))}function R(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"button",35,36),a.ɵɵlistener("click",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext(3).cancel()})),a.ɵɵtext(2," "),a.ɵɵelement(3,"i",9),a.ɵɵpipe(4,"i18n"),a.ɵɵtext(5," "),a.ɵɵelementStart(6,"span"),a.ɵɵtext(7),a.ɵɵpipe(8,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(9," "),a.ɵɵelementEnd()}if(2&e){var r=a.ɵɵreference(1),i=a.ɵɵnextContext(3);a.ɵɵproperty("appApiAction",i.cancelPromise)("disabled",r.loading),a.ɵɵadvance(3),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(4,4,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(8,6,"cancelSubscription"))}}function B(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"div",29),a.ɵɵtext(1," "),a.ɵɵelementStart(2,"button",20),a.ɵɵlistener("click",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext(4).adjustStorage(!0)})),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(5," "),a.ɵɵelementStart(6,"button",40),a.ɵɵlistener("click",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext(4).adjustStorage(!1)})),a.ɵɵtext(7),a.ɵɵpipe(8,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(9," "),a.ɵɵelementEnd()}2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate1(" ",a.ɵɵpipeBind1(4,2,"addStorage")," "),a.ɵɵadvance(4),a.ɵɵtextInterpolate1(" ",a.ɵɵpipeBind1(8,4,"removeStorage")," "))}function U(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"app-adjust-storage",41),a.ɵɵlistener("onAdjusted",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext(4).closeStorage(!0)}))("onCanceled",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext(4).closeStorage(!1)})),a.ɵɵelementEnd()}if(2&e){var r=a.ɵɵnextContext(4);a.ɵɵproperty("storageGbPrice",4)("add",r.adjustStorageAdd)}}function j(e,t){if(1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1," "),a.ɵɵelementStart(2,"div",37),a.ɵɵtext(3," "),a.ɵɵtemplate(4,B,10,6,"div",38),a.ɵɵtext(5," "),a.ɵɵtemplate(6,U,1,2,"app-adjust-storage",39),a.ɵɵtext(7," "),a.ɵɵelementEnd(),a.ɵɵtext(8," "),a.ɵɵelementContainerEnd()),2&e){var n=a.ɵɵnextContext(3);a.ɵɵadvance(4),a.ɵɵproperty("ngIf",!n.showAdjustStorage),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",n.showAdjustStorage)}}var V=function(e){return{width:e}};function F(e,t){if(1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1," "),a.ɵɵelementStart(2,"div",29),a.ɵɵtext(3," "),a.ɵɵtemplate(4,D,3,3,"button",30),a.ɵɵtext(5," "),a.ɵɵtemplate(6,R,10,8,"button",31),a.ɵɵtext(7," "),a.ɵɵelementEnd(),a.ɵɵtext(8," "),a.ɵɵelementStart(9,"h2",32),a.ɵɵtext(10),a.ɵɵpipe(11,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(12," "),a.ɵɵelementStart(13,"p"),a.ɵɵtext(14),a.ɵɵpipe(15,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(16," "),a.ɵɵelementStart(17,"div",33),a.ɵɵtext(18," "),a.ɵɵelementStart(19,"div",34),a.ɵɵtext(20),a.ɵɵpipe(21,"percent"),a.ɵɵelementEnd(),a.ɵɵtext(22," "),a.ɵɵelementEnd(),a.ɵɵtext(23," "),a.ɵɵtemplate(24,j,9,2,"ng-container",1),a.ɵɵtext(25," "),a.ɵɵelementContainerEnd()),2&e){var n=a.ɵɵnextContext(2);a.ɵɵadvance(4),a.ɵɵproperty("ngIf",!n.subscription||!n.subscription.cancelled),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",n.subscription&&!n.subscription.cancelled&&!n.subscriptionMarkedForCancel),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(11,8,"storage")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind3(15,10,"subscriptionStorage",n.sub.maxStorageGb||0,n.sub.storageName||"0 MB")),a.ɵɵadvance(5),a.ɵɵproperty("ngStyle",a.ɵɵpureFunction1(16,V,n.storageProgressWidth+"%")),a.ɵɵattribute("aria-valuenow",n.storagePercentage),a.ɵɵadvance(1),a.ɵɵtextInterpolate1(" ",a.ɵɵpipeBind1(21,14,n.storagePercentage/100),""),a.ɵɵadvance(4),a.ɵɵproperty("ngIf",n.subscription&&!n.subscription.cancelled&&!n.subscriptionMarkedForCancel)}}function N(e,t){if(1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1," "),a.ɵɵtemplate(2,w,4,6,"app-callout",4),a.ɵɵtext(3," "),a.ɵɵtemplate(4,C,18,14,"app-callout",4),a.ɵɵtext(5," "),a.ɵɵtemplate(6,P,10,5,"dl",1),a.ɵɵtext(7," "),a.ɵɵtemplate(8,O,31,16,"div",5),a.ɵɵtext(9," "),a.ɵɵtemplate(10,T,15,7,"ng-container",1),a.ɵɵtext(11," "),a.ɵɵtemplate(12,F,26,18,"ng-container",1),a.ɵɵtext(13," "),a.ɵɵelementContainerEnd()),2&e){var n=a.ɵɵnextContext();a.ɵɵadvance(2),a.ɵɵproperty("ngIf",n.subscription&&n.subscription.cancelled),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",n.subscriptionMarkedForCancel),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",n.selfHosted),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!n.selfHosted),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",n.selfHosted),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!n.selfHosted)}}var z=function(){function e(e,t,n,r,i,o){this.tokenService=e,this.apiService=t,this.platformUtilsService=n,this.i18nService=r,this.toasterService=i,this.router=o,this.loading=!1,this.firstLoaded=!1,this.adjustStorageAdd=!0,this.showAdjustStorage=!1,this.showUpdateLicense=!1,this.selfHosted=!1,this.selfHosted=n.isSelfHost()}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.load()];case 1:return e.sent(),this.firstLoaded=!0,[2]}}))}))},e.prototype.load=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return this.loading?[2]:this.tokenService.getPremium()?(this.loading=!0,e=this,[4,this.apiService.getUserSubscription()]):[3,2];case 1:return e.sub=t.sent(),[3,3];case 2:return this.router.navigate(["/settings/premium"]),[2];case 3:return this.loading=!1,[2]}}))}))},e.prototype.reinstate=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.loading?[2]:this.usingInAppPurchase?(this.platformUtilsService.showDialog(this.i18nService.t("manageSubscriptionFromStore"),this.i18nService.t("cancelSubscription"),null,null,"warning"),[2]):[4,this.platformUtilsService.showDialog(this.i18nService.t("reinstateConfirmation"),this.i18nService.t("reinstateSubscription"),this.i18nService.t("yes"),this.i18nService.t("cancel"))];case 1:if(!e.sent())return[2];e.label=2;case 2:return e.trys.push([2,4,,5]),this.reinstatePromise=this.apiService.postReinstatePremium(),[4,this.reinstatePromise];case 3:return e.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("reinstated")),this.load(),[3,5];case 4:return e.sent(),[3,5];case 5:return[2]}}))}))},e.prototype.cancel=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.loading?[2]:this.usingInAppPurchase?(this.platformUtilsService.showDialog(this.i18nService.t("manageSubscriptionFromStore"),this.i18nService.t("cancelSubscription"),null,null,"warning"),[2]):[4,this.platformUtilsService.showDialog(this.i18nService.t("cancelConfirmation"),this.i18nService.t("cancelSubscription"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")];case 1:if(!e.sent())return[2];e.label=2;case 2:return e.trys.push([2,4,,5]),this.cancelPromise=this.apiService.postCancelPremium(),[4,this.cancelPromise];case 3:return e.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("canceledSubscription")),this.load(),[3,5];case 4:return e.sent(),[3,5];case 5:return[2]}}))}))},e.prototype.downloadLicense=function(){if(!this.loading){var e=JSON.stringify(this.sub.license,null,2);this.platformUtilsService.saveFile(window,e,null,"bitwarden_premium_license.json")}},e.prototype.updateLicense=function(){this.loading||(this.showUpdateLicense=!0)},e.prototype.closeUpdateLicense=function(e){this.showUpdateLicense=!1,e&&this.load()},e.prototype.adjustStorage=function(e){this.usingInAppPurchase?this.platformUtilsService.showDialog(this.i18nService.t("cannotPerformInAppPurchase"),this.i18nService.t(e?"addStorage":"removeStorage"),null,null,"warning"):(this.adjustStorageAdd=e,this.showAdjustStorage=!0)},e.prototype.closeStorage=function(e){this.showAdjustStorage=!1,e&&this.load()},Object.defineProperty(e.prototype,"subscriptionMarkedForCancel",{get:function(){return null!=this.subscription&&!this.subscription.cancelled&&this.subscription.cancelAtEndDate},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"subscription",{get:function(){return null!=this.sub?this.sub.subscription:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextInvoice",{get:function(){return null!=this.sub?this.sub.upcomingInvoice:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"storagePercentage",{get:function(){return null!=this.sub&&this.sub.maxStorageGb?+(this.sub.storageGb/this.sub.maxStorageGb*100).toFixed(2):0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"storageProgressWidth",{get:function(){return this.storagePercentage<5?5:0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"usingInAppPurchase",{get:function(){return null!=this.sub&&this.sub.usingInAppPurchase},enumerable:!1,configurable:!0}),e.ɵfac=function(t){return new(t||e)(a.ɵɵdirectiveInject(s.TokenService),a.ɵɵdirectiveInject(l.ApiService),a.ɵɵdirectiveInject(c.PlatformUtilsService),a.ɵɵdirectiveInject(p.I18nService),a.ɵɵdirectiveInject(u.ToasterService),a.ɵɵdirectiveInject(d.Router))},e.ɵcmp=a.ɵɵdefineComponent({type:e,selectors:[["app-user-subscription"]],decls:13,vars:6,consts:[[1,"page-header"],[4,"ngIf"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],["type","warning",3,"title",4,"ngIf"],["class","row",4,"ngIf"],["type","warning",3,"title"],["type","button",1,"btn","btn-outline-secondary","btn-submit",3,"appApiAction","disabled","click"],["reinstateBtn",""],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],[1,"row"],[1,"col-4"],[1,"text-capitalize"],["class","badge badge-warning",4,"ngIf"],["class","col-8",4,"ngIf"],[1,"badge","badge-warning"],[1,"col-8"],[1,"d-block","mb-1"],[1,"table"],[4,"ngFor","ngForOf"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["href","https://vault.bitwarden.com/#/settings/subscription","target","_blank","rel","noopener",1,"btn","btn-outline-secondary"],["class","card mt-3",4,"ngIf"],[1,"card","mt-3"],[1,"card-body"],["type","button",1,"close",3,"appA11yTitle","click"],["aria-hidden","true"],[1,"card-body-header"],[3,"onUpdated","onCanceled"],[1,"d-flex"],["type","button","class","btn btn-outline-secondary",3,"click",4,"ngIf"],["type","button","class","btn btn-outline-danger btn-submit ml-auto",3,"appApiAction","disabled","click",4,"ngIf"],[1,"spaced-header"],[1,"progress"],["role","progressbar","aria-valuemin","0","aria-valuemax","100",1,"progress-bar","bg-success",3,"ngStyle"],["type","button",1,"btn","btn-outline-danger","btn-submit","ml-auto",3,"appApiAction","disabled","click"],["cancelBtn",""],[1,"mt-3"],["class","d-flex",4,"ngIf"],[3,"storageGbPrice","add","onAdjusted","onCanceled",4,"ngIf"],["type","button",1,"ml-1","btn","btn-outline-secondary",3,"click"],[3,"storageGbPrice","add","onAdjusted","onCanceled"]],template:function(e,t){1&e&&(a.ɵɵelementStart(0,"div",0),a.ɵɵtext(1," "),a.ɵɵelementStart(2,"h1"),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵtemplate(5,b,9,6,"small",1),a.ɵɵtext(6," "),a.ɵɵelementEnd(),a.ɵɵtext(7," "),a.ɵɵelementEnd(),a.ɵɵtext(8," "),a.ɵɵtemplate(9,S,9,6,"ng-container",1),a.ɵɵtext(10," "),a.ɵɵtemplate(11,N,14,6,"ng-container",1),a.ɵɵtext(12," ")),2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate1(" ",a.ɵɵpipeBind1(4,4,"premiumMembership")," "),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.firstLoaded&&t.loading),a.ɵɵadvance(4),a.ɵɵproperty("ngIf",!t.firstLoaded&&t.loading),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.sub))},directives:[m.NgIf,f.CalloutComponent,h.ApiActionDirective,m.NgForOf,v.A11yTitleDirective,y.UpdateLicenseComponent,m.NgStyle,g.AdjustStorageComponent],pipes:[x.I18nPipe,m.DatePipe,m.CurrencyPipe,m.PercentPipe],encapsulation:2}),e}();t.UserSubscriptionComponent=z,("undefined"==typeof ngDevMode||ngDevMode)&&a.ɵsetClassMetadata(z,[{type:o.Component,args:[{selector:"app-user-subscription",templateUrl:"user-subscription.component.html"}]}],(function(){return[{type:s.TokenService},{type:l.ApiService},{type:c.PlatformUtilsService},{type:p.I18nService},{type:u.ToasterService},{type:d.Router}]}),null)},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0,[4,Promise.all([this.groupingsComponent.load(),this.organizationsComponent.load()])];case 5:return c.sent(),null!=e?[3,7]:(this.groupingsComponent.selectedAll=!0,[4,this.ciphersComponent.reload()]);case 6:return c.sent(),[3,19];case 7:return e.deleted?(this.groupingsComponent.selectedTrash=!0,[4,this.filterDeleted()]):[3,9];case 8:return c.sent(),[3,19];case 9:return e.favorites?(this.groupingsComponent.selectedFavorites=!0,[4,this.filterFavorites()]):[3,11];case 10:return c.sent(),[3,19];case 11:return e.type?(s=parseInt(e.type,null),this.groupingsComponent.selectedType=s,[4,this.filterCipherType(s)]):[3,13];case 12:return c.sent(),[3,19];case 13:return e.folderId?(this.groupingsComponent.selectedFolder=!0,this.groupingsComponent.selectedFolderId=e.folderId,[4,this.filterFolder(e.folderId)]):[3,15];case 14:return c.sent(),[3,19];case 15:return e.collectionId?(this.groupingsComponent.selectedCollectionId=e.collectionId,[4,this.filterCollection(e.collectionId)]):[3,17];case 16:return c.sent(),[3,19];case 17:return this.groupingsComponent.selectedAll=!0,[4,this.ciphersComponent.reload()];case 18:c.sent(),c.label=19;case 19:return this.broadcasterService.subscribe(re,(function(e){l.ngZone.run((function(){return r(l,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return"syncCompleted"===e.command?[3,1]:[3,4];case 1:return e.successfully?[4,Promise.all([this.groupingsComponent.load(),this.organizationsComponent.load(),this.ciphersComponent.load(this.ciphersComponent.filter)])]:[3,3];case 2:t.sent(),this.changeDetectorRef.detectChanges(),t.label=3;case 3:return[3,4];case 4:return[2]}}))}))}))})),null!=t&&t.unsubscribe(),[2]}}))}))})),[2]}}))}))},e.prototype.ngOnDestroy=function(){this.broadcasterService.unsubscribe(re)},e.prototype.clearGroupingFilters=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.ciphersComponent.showAddNew=!0,this.groupingsComponent.searchPlaceholder=this.i18nService.t("searchVault"),[4,this.ciphersComponent.reload()];case 1:return e.sent(),this.clearFilters(),this.go(),[2]}}))}))},e.prototype.filterFavorites=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.ciphersComponent.showAddNew=!0,this.groupingsComponent.searchPlaceholder=this.i18nService.t("searchFavorites"),[4,this.ciphersComponent.reload((function(e){return e.favorite}))];case 1:return e.sent(),this.clearFilters(),this.favorites=!0,this.go(),[2]}}))}))},e.prototype.filterDeleted=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.ciphersComponent.showAddNew=!1,this.ciphersComponent.deleted=!0,this.groupingsComponent.searchPlaceholder=this.i18nService.t("searchTrash"),[4,this.ciphersComponent.reload(null,!0)];case 1:return e.sent(),this.clearFilters(),this.deleted=!0,this.go(),[2]}}))}))},e.prototype.filterCipherType=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return this.ciphersComponent.showAddNew=!0,this.groupingsComponent.searchPlaceholder=this.i18nService.t("searchType"),[4,this.ciphersComponent.reload((function(t){return t.type===e}))];case 1:return t.sent(),this.clearFilters(),this.type=e,this.go(),[2]}}))}))},e.prototype.filterFolder=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return this.ciphersComponent.showAddNew=!0,e="none"===e?null:e,this.groupingsComponent.searchPlaceholder=this.i18nService.t("searchFolder"),[4,this.ciphersComponent.reload((function(t){return t.folderId===e}))];case 1:return t.sent(),this.clearFilters(),this.folderId=null==e?"none":e,this.go(),[2]}}))}))},e.prototype.filterCollection=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return this.ciphersComponent.showAddNew=!0,this.groupingsComponent.searchPlaceholder=this.i18nService.t("searchCollection"),[4,this.ciphersComponent.reload((function(t){return null!=t.collectionIds&&t.collectionIds.indexOf(e)>-1}))];case 1:return t.sent(),this.clearFilters(),this.collectionId=e,this.go(),[2]}}))}))},e.prototype.filterSearchText=function(e){this.ciphersComponent.searchText=e,this.ciphersComponent.search(200)},e.prototype.editCipherAttachments=function(e){return r(this,void 0,void 0,(function(){var t,n,o,a=this;return i(this,(function(s){switch(s.label){case 0:return[4,this.userService.canAccessPremium()];case 1:return t=s.sent(),null!=e.organizationId||t?[3,2]:(this.messagingService.send("premiumRequired"),[2]);case 2:return null==e.organizationId?[3,4]:[4,this.userService.getOrganization(e.organizationId)];case 3:if(null!=(n=s.sent())&&(null==n.maxStorageGb||0===n.maxStorageGb))return this.messagingService.send("upgradeOrganization",{organizationId:e.organizationId}),[2];s.label=4;case 4:return o=!1,[4,this.modalService.openViewRef(c.AttachmentsComponent,this.attachmentsModalRef,(function(t){t.cipherId=e.id,t.onUploadedAttachment.subscribe((function(){return o=!0})),t.onDeletedAttachment.subscribe((function(){return o=!0})),t.onReuploadedAttachment.subscribe((function(){return o=!0}))}))];case 5:return s.sent()[0].onClosed.subscribe((function(){return r(a,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return o?[4,this.ciphersComponent.refresh()]:[3,2];case 1:e.sent(),e.label=2;case 2:return o=!1,[2]}}))}))})),[2]}}))}))},e.prototype.shareCipher=function(e){return r(this,void 0,void 0,(function(){var t,n=this;return i(this,(function(o){switch(o.label){case 0:return[4,this.modalService.openViewRef(f.ShareComponent,this.shareModalRef,(function(o){o.cipherId=e.id,o.onSharedCipher.subscribe((function(){return r(n,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return t.close(),[4,this.ciphersComponent.refresh()];case 1:return e.sent(),[2]}}))}))}))}))];case 1:return t=o.sent()[0],[2]}}))}))},e.prototype.editCipherCollections=function(e){return r(this,void 0,void 0,(function(){var t,n=this;return i(this,(function(o){switch(o.label){case 0:return[4,this.modalService.openViewRef(u.CollectionsComponent,this.collectionsModalRef,(function(o){o.cipherId=e.id,o.onSavedCollections.subscribe((function(){return r(n,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return t.close(),[4,this.ciphersComponent.refresh()];case 1:return e.sent(),[2]}}))}))}))}))];case 1:return t=o.sent()[0],[2]}}))}))},e.prototype.addFolder=function(){return r(this,void 0,void 0,(function(){var e,t=this;return i(this,(function(n){switch(n.label){case 0:return[4,this.modalService.openViewRef(d.FolderAddEditComponent,this.folderAddEditModalRef,(function(n){n.folderId=null,n.onSavedFolder.subscribe((function(){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return e.close(),[4,this.groupingsComponent.loadFolders()];case 1:return t.sent(),[2]}}))}))}))}))];case 1:return e=n.sent()[0],[2]}}))}))},e.prototype.editFolder=function(e){return r(this,void 0,void 0,(function(){var t,n=this;return i(this,(function(o){switch(o.label){case 0:return[4,this.modalService.openViewRef(d.FolderAddEditComponent,this.folderAddEditModalRef,(function(o){o.folderId=e,o.onSavedFolder.subscribe((function(){return r(n,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return t.close(),[4,this.groupingsComponent.loadFolders()];case 1:return e.sent(),[2]}}))}))})),o.onDeletedFolder.subscribe((function(){return r(n,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return t.close(),[4,this.groupingsComponent.loadFolders()];case 1:return e.sent(),[4,this.filterFolder("none")];case 2:return e.sent(),this.groupingsComponent.selectedFolderId=null,[2]}}))}))}))}))];case 1:return t=o.sent()[0],[2]}}))}))},e.prototype.addCipher=function(){return r(this,void 0,void 0,(function(){var e,t,n=this;return i(this,(function(r){switch(r.label){case 0:return[4,this.editCipher(null)];case 1:return(e=r.sent()).type=this.type,e.folderId="none"===this.folderId?null:this.folderId,null!=this.collectionId&&(t=this.groupingsComponent.collections.filter((function(e){return e.id===n.collectionId}))).length>0&&(e.organizationId=t[0].organizationId,e.collectionIds=[this.collectionId]),[2]}}))}))},e.prototype.editCipher=function(e){return r(this,void 0,void 0,(function(){var t,n,o=this;return i(this,(function(a){switch(a.label){case 0:return[4,this.modalService.openViewRef(l.AddEditComponent,this.cipherAddEditModalRef,(function(t){t.cipherId=null==e?null:e.id,t.onSavedCipher.subscribe((function(e){return r(o,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return n.close(),[4,this.ciphersComponent.refresh()];case 1:return e.sent(),[2]}}))}))})),t.onDeletedCipher.subscribe((function(e){return r(o,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return n.close(),[4,this.ciphersComponent.refresh()];case 1:return e.sent(),[2]}}))}))})),t.onRestoredCipher.subscribe((function(e){return r(o,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return n.close(),[4,this.ciphersComponent.refresh()];case 1:return e.sent(),[2]}}))}))}))}))];case 1:return t=a.sent(),n=t[0],[2,t[1]]}}))}))},e.prototype.cloneCipher=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.editCipher(e)];case 1:return t.sent().cloneMode=!0,[2]}}))}))},e.prototype.updateKey=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.modalService.openViewRef(s.UpdateKeyComponent,this.updateKeyModalRef)];case 1:return e.sent(),[2]}}))}))},e.prototype.clearFilters=function(){this.folderId=null,this.collectionId=null,this.favorites=!1,this.type=null,this.deleted=!1},e.prototype.go=function(e){void 0===e&&(e=null),null==e&&(e={favorites:!!this.favorites||null,type:this.type,folderId:this.folderId,collectionId:this.collectionId,deleted:!!this.deleted||null}),this.router.navigate([],{relativeTo:this.route,queryParams:e,replaceUrl:!0})},e.ɵfac=function(t){return new(t||e)(h.ɵɵdirectiveInject(v.SyncService),h.ɵɵdirectiveInject(y.ActivatedRoute),h.ɵɵdirectiveInject(y.Router),h.ɵɵdirectiveInject(h.ChangeDetectorRef),h.ɵɵdirectiveInject(g.I18nService),h.ɵɵdirectiveInject(x.ModalService),h.ɵɵdirectiveInject(b.TokenService),h.ɵɵdirectiveInject(S.CryptoService),h.ɵɵdirectiveInject(w.MessagingService),h.ɵɵdirectiveInject(C.UserService),h.ɵɵdirectiveInject(I.PlatformUtilsService),h.ɵɵdirectiveInject(E.BroadcasterService),h.ɵɵdirectiveInject(h.NgZone))},e.ɵcmp=h.ɵɵdefineComponent({type:e,selectors:[["app-vault"]],viewQuery:function(e,t){if(1&e&&(h.ɵɵviewQuery(m.GroupingsComponent,3),h.ɵɵviewQuery(p.CiphersComponent,3),h.ɵɵviewQuery(a.OrganizationsComponent,3),h.ɵɵviewQuery(j,3,o.ViewContainerRef),h.ɵɵviewQuery(V,3,o.ViewContainerRef),h.ɵɵviewQuery(F,3,o.ViewContainerRef),h.ɵɵviewQuery(N,3,o.ViewContainerRef),h.ɵɵviewQuery(z,3,o.ViewContainerRef),h.ɵɵviewQuery(L,3,o.ViewContainerRef)),2&e){var n=void 0;h.ɵɵqueryRefresh(n=h.ɵɵloadQuery())&&(t.groupingsComponent=n.first),h.ɵɵqueryRefresh(n=h.ɵɵloadQuery())&&(t.ciphersComponent=n.first),h.ɵɵqueryRefresh(n=h.ɵɵloadQuery())&&(t.organizationsComponent=n.first),h.ɵɵqueryRefresh(n=h.ɵɵloadQuery())&&(t.attachmentsModalRef=n.first),h.ɵɵqueryRefresh(n=h.ɵɵloadQuery())&&(t.folderAddEditModalRef=n.first),h.ɵɵqueryRefresh(n=h.ɵɵloadQuery())&&(t.cipherAddEditModalRef=n.first),h.ɵɵqueryRefresh(n=h.ɵɵloadQuery())&&(t.shareModalRef=n.first),h.ɵɵqueryRefresh(n=h.ɵɵloadQuery())&&(t.collectionsModalRef=n.first),h.ɵɵqueryRefresh(n=h.ɵɵloadQuery())&&(t.updateKeyModalRef=n.first)}},decls:90,vars:21,consts:[[1,"container","page-content"],[1,"row"],[1,"col-3"],[3,"onAllClicked","onFavoritesClicked","onCipherTypeClicked","onFolderClicked","onAddFolder","onEditFolder","onCollectionClicked","onSearchTextChanged","onTrashClicked"],[1,"col-6"],[1,"page-header","d-flex"],[3,"appApiAction"],["actionSpinner",""],[4,"ngIf"],[1,"ml-auto","d-flex"],[3,"ciphersComponent","deleted"],["type","button","class","btn btn-outline-primary btn-sm",3,"click",4,"ngIf"],["type","warning","icon","fa-warning",4,"ngIf"],[3,"onCipherClicked","onAttachmentsClicked","onAddCipher","onShareClicked","onCollectionsClicked","onCloneClicked"],["class","card border-warning mb-4",4,"ngIf"],["class","d-block mb-4",4,"ngIf"],["class","card border-success mb-4",4,"ngIf"],[1,"card"],[1,"card-header","d-flex"],["href","https://help.bitwarden.com/article/what-is-an-organization/","target","_blank","rel","noopener",1,"ml-auto",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-question-circle-o"],[1,"card-body"],[3,"vault"],["class","card mt-4",4,"ngIf"],["attachments",""],["folderAddEdit",""],["cipherAddEdit",""],["share",""],["collections",""],["updateKeyTemplate",""],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],["type","button",1,"btn","btn-outline-primary","btn-sm",3,"click"],["aria-hidden","true",1,"fa","fa-plus","fa-fw"],["type","warning","icon","fa-warning"],[1,"card","border-warning","mb-4"],[1,"card-header","bg-warning","text-white"],["aria-hidden","true",1,"fa","fa-warning","fa-fw"],["type","button",1,"btn","btn-block","btn-outline-secondary",3,"click"],[1,"d-block","mb-4"],["target","_blank","href","https://browser-update.org/update-browser.html","rel","noopener",1,"btn","btn-block","btn-outline-secondary"],[1,"card","border-success","mb-4"],[1,"card-header","bg-success","text-white"],["aria-hidden","true",1,"fa","fa-star","fa-fw"],["routerLink","/settings/premium",1,"btn","btn-block","btn-outline-secondary"],[1,"card","mt-4"],["href","https://bitwarden.com/help/article/about-providers/","target","_blank","rel","noopener",1,"ml-auto",3,"appA11yTitle"],["vault","true"]],template:function(e,t){if(1&e&&(h.ɵɵelementStart(0,"div",0),h.ɵɵtext(1," "),h.ɵɵelementStart(2,"div",1),h.ɵɵtext(3," "),h.ɵɵelementStart(4,"div",2),h.ɵɵtext(5," "),h.ɵɵelementStart(6,"app-vault-groupings",3),h.ɵɵlistener("onAllClicked",(function(){return t.clearGroupingFilters()}))("onFavoritesClicked",(function(){return t.filterFavorites()}))("onCipherTypeClicked",(function(e){return t.filterCipherType(e)}))("onFolderClicked",(function(e){return t.filterFolder(e.id)}))("onAddFolder",(function(){return t.addFolder()}))("onEditFolder",(function(e){return t.editFolder(e.id)}))("onCollectionClicked",(function(e){return t.filterCollection(e.id)}))("onSearchTextChanged",(function(e){return t.filterSearchText(e)}))("onTrashClicked",(function(){return t.filterDeleted()})),h.ɵɵtext(7," "),h.ɵɵelementEnd(),h.ɵɵtext(8," "),h.ɵɵelementEnd(),h.ɵɵtext(9," "),h.ɵɵelementStart(10,"div",4),h.ɵɵtext(11," "),h.ɵɵelementStart(12,"div",5),h.ɵɵtext(13," "),h.ɵɵelementStart(14,"h1"),h.ɵɵtext(15),h.ɵɵpipe(16,"i18n"),h.ɵɵelementStart(17,"small",6,7),h.ɵɵtext(19," "),h.ɵɵtemplate(20,K,9,6,"ng-container",8),h.ɵɵtext(21," "),h.ɵɵelementEnd(),h.ɵɵtext(22," "),h.ɵɵelementEnd(),h.ɵɵtext(23," "),h.ɵɵelementStart(24,"div",9),h.ɵɵtext(25," "),h.ɵɵelementStart(26,"app-vault-bulk-actions",10),h.ɵɵtext(27," "),h.ɵɵelementEnd(),h.ɵɵtext(28," "),h.ɵɵtemplate(29,G,5,3,"button",11),h.ɵɵtext(30," "),h.ɵɵelementEnd(),h.ɵɵtext(31," "),h.ɵɵelementEnd(),h.ɵɵtext(32," "),h.ɵɵtemplate(33,q,2,1,"app-callout",12),h.ɵɵtext(34," "),h.ɵɵelementStart(35,"app-vault-ciphers",13),h.ɵɵlistener("onCipherClicked",(function(e){return t.editCipher(e)}))("onAttachmentsClicked",(function(e){return t.editCipherAttachments(e)}))("onAddCipher",(function(){return t.addCipher()}))("onShareClicked",(function(e){return t.shareCipher(e)}))("onCollectionsClicked",(function(e){return t.editCipherCollections(e)}))("onCloneClicked",(function(e){return t.cloneCipher(e)})),h.ɵɵtext(36," "),h.ɵɵelementEnd(),h.ɵɵtext(37," "),h.ɵɵelementEnd(),h.ɵɵtext(38," "),h.ɵɵelementStart(39,"div",2),h.ɵɵtext(40," "),h.ɵɵtemplate(41,W,19,9,"div",14),h.ɵɵtext(42," "),h.ɵɵtemplate(43,H,1,0,"app-verify-email",15),h.ɵɵtext(44," "),h.ɵɵtemplate(45,$,19,9,"div",14),h.ɵɵtext(46," "),h.ɵɵtemplate(47,Q,19,9,"div",16),h.ɵɵtext(48," "),h.ɵɵelementStart(49,"div",17),h.ɵɵtext(50," "),h.ɵɵelementStart(51,"div",18),h.ɵɵtext(52),h.ɵɵpipe(53,"i18n"),h.ɵɵelementStart(54,"a",19),h.ɵɵpipe(55,"i18n"),h.ɵɵtext(56," "),h.ɵɵelement(57,"i",20),h.ɵɵtext(58," "),h.ɵɵelementEnd(),h.ɵɵtext(59," "),h.ɵɵelementEnd(),h.ɵɵtext(60," "),h.ɵɵelementStart(61,"div",21),h.ɵɵtext(62," "),h.ɵɵelement(63,"app-organizations",22),h.ɵɵtext(64," "),h.ɵɵelementEnd(),h.ɵɵtext(65," "),h.ɵɵelementEnd(),h.ɵɵtext(66," "),h.ɵɵtemplate(67,Y,17,6,"div",23),h.ɵɵtext(68," "),h.ɵɵelementEnd(),h.ɵɵtext(69," "),h.ɵɵelementEnd(),h.ɵɵtext(70," "),h.ɵɵelementEnd(),h.ɵɵtext(71," "),h.ɵɵtemplate(72,J,0,0,"ng-template",null,24,h.ɵɵtemplateRefExtractor),h.ɵɵtext(74," "),h.ɵɵtemplate(75,X,0,0,"ng-template",null,25,h.ɵɵtemplateRefExtractor),h.ɵɵtext(77," "),h.ɵɵtemplate(78,Z,0,0,"ng-template",null,26,h.ɵɵtemplateRefExtractor),h.ɵɵtext(80," "),h.ɵɵtemplate(81,ee,0,0,"ng-template",null,27,h.ɵɵtemplateRefExtractor),h.ɵɵtext(83," "),h.ɵɵtemplate(84,te,0,0,"ng-template",null,28,h.ɵɵtemplateRefExtractor),h.ɵɵtext(86," "),h.ɵɵtemplate(87,ne,0,0,"ng-template",null,29,h.ɵɵtemplateRefExtractor),h.ɵɵtext(89," ")),2&e){var n=h.ɵɵreference(18);h.ɵɵadvance(15),h.ɵɵtextInterpolate1(" ",h.ɵɵpipeBind1(16,15,"myVault")," "),h.ɵɵadvance(2),h.ɵɵproperty("appApiAction",t.ciphersComponent.actionPromise),h.ɵɵadvance(3),h.ɵɵproperty("ngIf",n.loading),h.ɵɵadvance(6),h.ɵɵproperty("ciphersComponent",t.ciphersComponent)("deleted",t.deleted),h.ɵɵadvance(3),h.ɵɵproperty("ngIf",!t.deleted),h.ɵɵadvance(4),h.ɵɵproperty("ngIf",t.deleted),h.ɵɵadvance(8),h.ɵɵproperty("ngIf",t.showUpdateKey),h.ɵɵadvance(2),h.ɵɵproperty("ngIf",t.showVerifyEmail),h.ɵɵadvance(2),h.ɵɵproperty("ngIf",t.showBrowserOutdated),h.ɵɵadvance(2),h.ɵɵproperty("ngIf",t.showPremiumCallout),h.ɵɵadvance(5),h.ɵɵtextInterpolate1(" ",h.ɵɵpipeBind1(53,17,"organizations")," "),h.ɵɵadvance(2),h.ɵɵpropertyInterpolate("appA11yTitle",h.ɵɵpipeBind1(55,19,"learnMore")),h.ɵɵadvance(9),h.ɵɵproperty("vault",!0),h.ɵɵadvance(4),h.ɵɵproperty("ngIf",t.showProviders)}},directives:[P.GroupingsComponent,k.ApiActionDirective,_.NgIf,A.BulkActionsComponent,O.CiphersComponent,M.A11yTitleDirective,T.OrganizationsComponent,D.CalloutComponent,R.VerifyEmailComponent,y.RouterLinkWithHref,B.ProvidersComponent],pipes:[U.I18nPipe],encapsulation:2}),e}();t.VaultComponent=ie,("undefined"==typeof ngDevMode||ngDevMode)&&h.ɵsetClassMetadata(ie,[{type:o.Component,args:[{selector:"app-vault",templateUrl:"vault.component.html"}]}],(function(){return[{type:v.SyncService},{type:y.ActivatedRoute},{type:y.Router},{type:h.ChangeDetectorRef},{type:g.I18nService},{type:x.ModalService},{type:b.TokenService},{type:S.CryptoService},{type:w.MessagingService},{type:C.UserService},{type:I.PlatformUtilsService},{type:E.BroadcasterService},{type:h.NgZone}]}),{groupingsComponent:[{type:o.ViewChild,args:[m.GroupingsComponent,{static:!0}]}],ciphersComponent:[{type:o.ViewChild,args:[p.CiphersComponent,{static:!0}]}],organizationsComponent:[{type:o.ViewChild,args:[a.OrganizationsComponent,{static:!0}]}],attachmentsModalRef:[{type:o.ViewChild,args:["attachments",{read:o.ViewContainerRef,static:!0}]}],folderAddEditModalRef:[{type:o.ViewChild,args:["folderAddEdit",{read:o.ViewContainerRef,static:!0}]}],cipherAddEditModalRef:[{type:o.ViewChild,args:["cipherAddEdit",{read:o.ViewContainerRef,static:!0}]}],shareModalRef:[{type:o.ViewChild,args:["share",{read:o.ViewContainerRef,static:!0}]}],collectionsModalRef:[{type:o.ViewChild,args:["collections",{read:o.ViewContainerRef,static:!0}]}],updateKeyModalRef:[{type:o.ViewChild,args:["updateKeyTemplate",{read:o.ViewContainerRef,static:!0}]}]})},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.DisableSendPolicyComponent=t.DisableSendPolicy=void 0;var o=n(0),a=n(65),s=n(124),l=n(0),c=n(21),p=n(11),u=n(8),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="disableSend",t.description="disableSendPolicyDesc",t.type=a.PolicyType.DisableSend,t.component=m,t}return i(t,e),t}(s.BasePolicy);t.DisableSendPolicy=d;var m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.ɵfac=function(e){return f(e||t)},t.ɵcmp=l.ɵɵdefineComponent({type:t,selectors:[["policy-disable-send"]],features:[l.ɵɵInheritDefinitionFeature],decls:16,vars:7,consts:[["type","warning"],[1,"form-group"],[1,"form-check"],["type","checkbox","id","enabled","name","Enabled",1,"form-check-input",3,"formControl"],["for","enabled",1,"form-check-label"]],template:function(e,t){1&e&&(l.ɵɵelementStart(0,"app-callout",0),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(3," "),l.ɵɵelementStart(4,"div",1),l.ɵɵtext(5," "),l.ɵɵelementStart(6,"div",2),l.ɵɵtext(7," "),l.ɵɵelement(8,"input",3),l.ɵɵtext(9," "),l.ɵɵelementStart(10,"label",4),l.ɵɵtext(11),l.ɵɵpipe(12,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(13," "),l.ɵɵelementEnd(),l.ɵɵtext(14," "),l.ɵɵelementEnd(),l.ɵɵtext(15," ")),2&e&&(l.ɵɵadvance(1),l.ɵɵtextInterpolate1(" ",l.ɵɵpipeBind1(2,3,"disableSendExemption")," "),l.ɵɵadvance(7),l.ɵɵproperty("formControl",t.enabled),l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(12,5,"enabled")))},directives:[c.CalloutComponent,p.CheckboxControlValueAccessor,p.NgControlStatus,p.FormControlDirective],pipes:[u.I18nPipe],encapsulation:2}),t}(s.BasePolicyComponent);t.DisableSendPolicyComponent=m;var f=l.ɵɵgetInheritedFactory(m);("undefined"==typeof ngDevMode||ngDevMode)&&l.ɵsetClassMetadata(m,[{type:o.Component,args:[{selector:"policy-disable-send",templateUrl:"disable-send.component.html"}]}],null,null)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.MasterPasswordPolicyComponent=t.MasterPasswordPolicy=void 0;var o=n(0),a=(n(11),n(1),n(65)),s=n(124),l=n(0),c=n(11),p=n(1),u=n(2),d=n(8);function m(e,t){if(1&e&&(l.ɵɵelementStart(0,"option",20),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){var n=t.$implicit;l.ɵɵproperty("ngValue",n.value),l.ɵɵadvance(1),l.ɵɵtextInterpolate(n.name)}}var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="masterPass",t.description="masterPassPolicyDesc",t.type=a.PolicyType.MasterPassword,t.component=h,t}return i(t,e),t}(s.BasePolicy);t.MasterPasswordPolicy=f;var h=function(e){function t(t,n){var r=e.call(this)||this;return r.fb=t,r.data=r.fb.group({minComplexity:[null],minLength:[null],requireUpper:[null],requireLower:[null],requireNumbers:[null],requireSpecial:[null]}),r.passwordScores=[{name:"-- "+n.t("select")+" --",value:null},{name:n.t("weak")+" (0)",value:0},{name:n.t("weak")+" (1)",value:1},{name:n.t("weak")+" (2)",value:2},{name:n.t("good")+" (3)",value:3},{name:n.t("strong")+" (4)",value:4}],r}return i(t,e),t.ɵfac=function(e){return new(e||t)(l.ɵɵdirectiveInject(c.FormBuilder),l.ɵɵdirectiveInject(p.I18nService))},t.ɵcmp=l.ɵɵdefineComponent({type:t,selectors:[["policy-master-password"]],features:[l.ɵɵInheritDefinitionFeature],decls:71,vars:12,consts:[[3,"formGroup"],[1,"form-group"],[1,"form-check"],["type","checkbox","id","enabled","name","Enabled",1,"form-check-input",3,"formControl"],["for","enabled",1,"form-check-label"],[1,"row"],[1,"col-6","form-group"],["for","minComplexity"],["id","minComplexity","name","minComplexity","formControlName","minComplexity",1,"form-control"],[3,"ngValue",4,"ngFor","ngForOf"],["for","minLength"],["id","minLength","type","number","min","8","name","minLength","formControlName","minLength",1,"form-control"],["type","checkbox","id","requireUpper","name","requireUpper","formControlName","requireUpper",1,"form-check-input"],["for","requireUpper",1,"form-check-label"],["type","checkbox","id","requireLower","name","requireLower","formControlName","requireLower",1,"form-check-input"],["for","requireLower",1,"form-check-label"],["type","checkbox","id","requireNumbers","name","requireNumbers","formControlName","requireNumbers",1,"form-check-input"],["for","requireNumbers",1,"form-check-label"],["type","checkbox","id","requireSpecial","name","requireSpecial","formControlName","requireSpecial",1,"form-check-input"],["for","requireSpecial",1,"form-check-label"],[3,"ngValue"]],template:function(e,t){1&e&&(l.ɵɵelementStart(0,"div",0),l.ɵɵtext(1," "),l.ɵɵelementStart(2,"div",1),l.ɵɵtext(3," "),l.ɵɵelementStart(4,"div",2),l.ɵɵtext(5," "),l.ɵɵelement(6,"input",3),l.ɵɵtext(7," "),l.ɵɵelementStart(8,"label",4),l.ɵɵtext(9),l.ɵɵpipe(10,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(11," "),l.ɵɵelementEnd(),l.ɵɵtext(12," "),l.ɵɵelementEnd(),l.ɵɵtext(13," "),l.ɵɵelementStart(14,"div",5),l.ɵɵtext(15," "),l.ɵɵelementStart(16,"div",6),l.ɵɵtext(17," "),l.ɵɵelementStart(18,"label",7),l.ɵɵtext(19),l.ɵɵpipe(20,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(21," "),l.ɵɵelementStart(22,"select",8),l.ɵɵtext(23," "),l.ɵɵtemplate(24,m,2,2,"option",9),l.ɵɵtext(25," "),l.ɵɵelementEnd(),l.ɵɵtext(26," "),l.ɵɵelementEnd(),l.ɵɵtext(27," "),l.ɵɵelementStart(28,"div",6),l.ɵɵtext(29," "),l.ɵɵelementStart(30,"label",10),l.ɵɵtext(31),l.ɵɵpipe(32,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(33," "),l.ɵɵelement(34,"input",11),l.ɵɵtext(35," "),l.ɵɵelementEnd(),l.ɵɵtext(36," "),l.ɵɵelementEnd(),l.ɵɵtext(37," "),l.ɵɵelementStart(38,"div",2),l.ɵɵtext(39," "),l.ɵɵelement(40,"input",12),l.ɵɵtext(41," "),l.ɵɵelementStart(42,"label",13),l.ɵɵtext(43,"A-Z"),l.ɵɵelementEnd(),l.ɵɵtext(44," "),l.ɵɵelementEnd(),l.ɵɵtext(45," "),l.ɵɵelementStart(46,"div",2),l.ɵɵtext(47," "),l.ɵɵelement(48,"input",14),l.ɵɵtext(49," "),l.ɵɵelementStart(50,"label",15),l.ɵɵtext(51,"a-z"),l.ɵɵelementEnd(),l.ɵɵtext(52," "),l.ɵɵelementEnd(),l.ɵɵtext(53," "),l.ɵɵelementStart(54,"div",2),l.ɵɵtext(55," "),l.ɵɵelement(56,"input",16),l.ɵɵtext(57," "),l.ɵɵelementStart(58,"label",17),l.ɵɵtext(59,"0-9"),l.ɵɵelementEnd(),l.ɵɵtext(60," "),l.ɵɵelementEnd(),l.ɵɵtext(61," "),l.ɵɵelementStart(62,"div",2),l.ɵɵtext(63," "),l.ɵɵelement(64,"input",18),l.ɵɵtext(65," "),l.ɵɵelementStart(66,"label",19),l.ɵɵtext(67,"!@#$%^&*"),l.ɵɵelementEnd(),l.ɵɵtext(68," "),l.ɵɵelementEnd(),l.ɵɵtext(69," "),l.ɵɵelementEnd(),l.ɵɵtext(70," ")),2&e&&(l.ɵɵproperty("formGroup",t.data),l.ɵɵadvance(6),l.ɵɵproperty("formControl",t.enabled),l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(10,6,"enabled")),l.ɵɵadvance(10),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(20,8,"minComplexityScore")),l.ɵɵadvance(5),l.ɵɵproperty("ngForOf",t.passwordScores),l.ɵɵadvance(7),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(32,10,"minLength")))},directives:[c.NgControlStatusGroup,c.FormGroupDirective,c.CheckboxControlValueAccessor,c.NgControlStatus,c.FormControlDirective,c.SelectControlValueAccessor,c.FormControlName,u.NgForOf,c.NumberValueAccessor,c.DefaultValueAccessor,c.NgSelectOption,c.ɵangular_packages_forms_forms_z],pipes:[d.I18nPipe],encapsulation:2}),t}(s.BasePolicyComponent);t.MasterPasswordPolicyComponent=h,("undefined"==typeof ngDevMode||ngDevMode)&&l.ɵsetClassMetadata(h,[{type:o.Component,args:[{selector:"policy-master-password",templateUrl:"master-password.component.html"}]}],(function(){return[{type:c.FormBuilder},{type:p.I18nService}]}),null)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordGeneratorPolicyComponent=t.PasswordGeneratorPolicy=void 0;var o=n(0),a=(n(11),n(1),n(65)),s=n(124),l=n(0),c=n(11),p=n(1),u=n(2),d=n(8);function m(e,t){if(1&e&&(l.ɵɵelementStart(0,"option",32),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){var n=t.$implicit;l.ɵɵproperty("ngValue",n.value),l.ɵɵadvance(1),l.ɵɵtextInterpolate(n.name)}}var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="passwordGenerator",t.description="passwordGeneratorPolicyDesc",t.type=a.PolicyType.PasswordGenerator,t.component=h,t}return i(t,e),t}(s.BasePolicy);t.PasswordGeneratorPolicy=f;var h=function(e){function t(t,n){var r=e.call(this)||this;return r.fb=t,r.data=r.fb.group({defaultType:[null],minLength:[null],useUpper:[null],useLower:[null],useNumbers:[null],useSpecial:[null],minNumbers:[null],minSpecial:[null],minNumberWords:[null],capitalize:[null],includeNumber:[null]}),r.defaultTypes=[{name:n.t("userPreference"),value:null},{name:n.t("password"),value:"password"},{name:n.t("passphrase"),value:"passphrase"}],r}return i(t,e),t.ɵfac=function(e){return new(e||t)(l.ɵɵdirectiveInject(c.FormBuilder),l.ɵɵdirectiveInject(p.I18nService))},t.ɵcmp=l.ɵɵdefineComponent({type:t,selectors:[["policy-password-generator"]],features:[l.ɵɵInheritDefinitionFeature],decls:133,vars:33,consts:[[3,"formGroup"],[1,"form-group"],[1,"form-check"],["type","checkbox","id","enabled","name","Enabled",1,"form-check-input",3,"formControl"],["for","enabled",1,"form-check-label"],[1,"row"],[1,"col-6","form-group","mb-0"],["for","defaultType"],["id","defaultType","name","defaultType","formControlName","defaultType",1,"form-control"],[3,"ngValue",4,"ngFor","ngForOf"],[1,"mt-4"],[1,"col-6","form-group"],["for","minLength"],["id","minLength","type","number","name","minLength","min","5","max","128","formControlName","minLength",1,"form-control"],["for","minNumbers"],["id","minNumbers","type","number","name","minNumbers","min","0","max","9","formControlName","minNumbers",1,"form-control"],["for","minSpecial"],["id","minSpecial","type","number","name","minSpecial","min","0","max","9","formControlName","minSpecial",1,"form-control"],["type","checkbox","id","useUpper","formControlName","useUpper","name","useUpper",1,"form-check-input"],["for","useUpper",1,"form-check-label"],["type","checkbox","id","useLower","name","useLower","formControlName","useLower",1,"form-check-input"],["for","useLower",1,"form-check-label"],["type","checkbox","id","useNumbers","name","useNumbers","formControlName","useNumbers",1,"form-check-input"],["for","useNumbers",1,"form-check-label"],["type","checkbox","id","useSpecial","name","useSpecial","formControlName","useSpecial",1,"form-check-input"],["for","useSpecial",1,"form-check-label"],["for","minNumberWords"],["id","minNumberWords","type","number","name","minNumberWords","min","3","max","20","formControlName","minNumberWords",1,"form-control"],["type","checkbox","id","capitalize","name","capitalize","formControlName","capitalize",1,"form-check-input"],["for","capitalize",1,"form-check-label"],["type","checkbox","id","includeNumber","name","includeNumber","formControlName","includeNumber",1,"form-check-input"],["for","includeNumber",1,"form-check-label"],[3,"ngValue"]],template:function(e,t){1&e&&(l.ɵɵelementStart(0,"div",0),l.ɵɵtext(1," "),l.ɵɵelementStart(2,"div",1),l.ɵɵtext(3," "),l.ɵɵelementStart(4,"div",2),l.ɵɵtext(5," "),l.ɵɵelement(6,"input",3),l.ɵɵtext(7," "),l.ɵɵelementStart(8,"label",4),l.ɵɵtext(9),l.ɵɵpipe(10,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(11," "),l.ɵɵelementEnd(),l.ɵɵtext(12," "),l.ɵɵelementEnd(),l.ɵɵtext(13," "),l.ɵɵelementStart(14,"div",5),l.ɵɵtext(15," "),l.ɵɵelementStart(16,"div",6),l.ɵɵtext(17," "),l.ɵɵelementStart(18,"label",7),l.ɵɵtext(19),l.ɵɵpipe(20,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(21," "),l.ɵɵelementStart(22,"select",8),l.ɵɵtext(23," "),l.ɵɵtemplate(24,m,2,2,"option",9),l.ɵɵtext(25," "),l.ɵɵelementEnd(),l.ɵɵtext(26," "),l.ɵɵelementEnd(),l.ɵɵtext(27," "),l.ɵɵelementEnd(),l.ɵɵtext(28," "),l.ɵɵelementStart(29,"h3",10),l.ɵɵtext(30),l.ɵɵpipe(31,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(32," "),l.ɵɵelementStart(33,"div",5),l.ɵɵtext(34," "),l.ɵɵelementStart(35,"div",11),l.ɵɵtext(36," "),l.ɵɵelementStart(37,"label",12),l.ɵɵtext(38),l.ɵɵpipe(39,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(40," "),l.ɵɵelement(41,"input",13),l.ɵɵtext(42," "),l.ɵɵelementEnd(),l.ɵɵtext(43," "),l.ɵɵelementEnd(),l.ɵɵtext(44," "),l.ɵɵelementStart(45,"div",5),l.ɵɵtext(46," "),l.ɵɵelementStart(47,"div",11),l.ɵɵtext(48," "),l.ɵɵelementStart(49,"label",14),l.ɵɵtext(50),l.ɵɵpipe(51,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(52," "),l.ɵɵelement(53,"input",15),l.ɵɵtext(54," "),l.ɵɵelementEnd(),l.ɵɵtext(55," "),l.ɵɵelementStart(56,"div",11),l.ɵɵtext(57," "),l.ɵɵelementStart(58,"label",16),l.ɵɵtext(59),l.ɵɵpipe(60,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(61," "),l.ɵɵelement(62,"input",17),l.ɵɵtext(63," "),l.ɵɵelementEnd(),l.ɵɵtext(64," "),l.ɵɵelementEnd(),l.ɵɵtext(65," "),l.ɵɵelementStart(66,"div",2),l.ɵɵtext(67," "),l.ɵɵelement(68,"input",18),l.ɵɵtext(69," "),l.ɵɵelementStart(70,"label",19),l.ɵɵtext(71,"A-Z"),l.ɵɵelementEnd(),l.ɵɵtext(72," "),l.ɵɵelementEnd(),l.ɵɵtext(73," "),l.ɵɵelementStart(74,"div",2),l.ɵɵtext(75," "),l.ɵɵelement(76,"input",20),l.ɵɵtext(77," "),l.ɵɵelementStart(78,"label",21),l.ɵɵtext(79,"a-z"),l.ɵɵelementEnd(),l.ɵɵtext(80," "),l.ɵɵelementEnd(),l.ɵɵtext(81," "),l.ɵɵelementStart(82,"div",2),l.ɵɵtext(83," "),l.ɵɵelement(84,"input",22),l.ɵɵtext(85," "),l.ɵɵelementStart(86,"label",23),l.ɵɵtext(87,"0-9"),l.ɵɵelementEnd(),l.ɵɵtext(88," "),l.ɵɵelementEnd(),l.ɵɵtext(89," "),l.ɵɵelementStart(90,"div",2),l.ɵɵtext(91," "),l.ɵɵelement(92,"input",24),l.ɵɵtext(93," "),l.ɵɵelementStart(94,"label",25),l.ɵɵtext(95,"!@#$%^&*"),l.ɵɵelementEnd(),l.ɵɵtext(96," "),l.ɵɵelementEnd(),l.ɵɵtext(97," "),l.ɵɵelementStart(98,"h3",10),l.ɵɵtext(99),l.ɵɵpipe(100,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(101," "),l.ɵɵelementStart(102,"div",5),l.ɵɵtext(103," "),l.ɵɵelementStart(104,"div",11),l.ɵɵtext(105," "),l.ɵɵelementStart(106,"label",26),l.ɵɵtext(107),l.ɵɵpipe(108,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(109," "),l.ɵɵelement(110,"input",27),l.ɵɵtext(111," "),l.ɵɵelementEnd(),l.ɵɵtext(112," "),l.ɵɵelementEnd(),l.ɵɵtext(113," "),l.ɵɵelementStart(114,"div",2),l.ɵɵtext(115," "),l.ɵɵelement(116,"input",28),l.ɵɵtext(117," "),l.ɵɵelementStart(118,"label",29),l.ɵɵtext(119),l.ɵɵpipe(120,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(121," "),l.ɵɵelementEnd(),l.ɵɵtext(122," "),l.ɵɵelementStart(123,"div",2),l.ɵɵtext(124," "),l.ɵɵelement(125,"input",30),l.ɵɵtext(126," "),l.ɵɵelementStart(127,"label",31),l.ɵɵtext(128),l.ɵɵpipe(129,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(130," "),l.ɵɵelementEnd(),l.ɵɵtext(131," "),l.ɵɵelementEnd(),l.ɵɵtext(132," ")),2&e&&(l.ɵɵproperty("formGroup",t.data),l.ɵɵadvance(6),l.ɵɵproperty("formControl",t.enabled),l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(10,13,"enabled")),l.ɵɵadvance(10),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(20,15,"defaultType")),l.ɵɵadvance(5),l.ɵɵproperty("ngForOf",t.defaultTypes),l.ɵɵadvance(6),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(31,17,"password")),l.ɵɵadvance(8),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(39,19,"minLength")),l.ɵɵadvance(12),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(51,21,"minNumbers")),l.ɵɵadvance(9),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(60,23,"minSpecial")),l.ɵɵadvance(40),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(100,25,"passphrase")),l.ɵɵadvance(8),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(108,27,"minimumNumberOfWords")),l.ɵɵadvance(12),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(120,29,"capitalize")),l.ɵɵadvance(9),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(129,31,"includeNumber")))},directives:[c.NgControlStatusGroup,c.FormGroupDirective,c.CheckboxControlValueAccessor,c.NgControlStatus,c.FormControlDirective,c.SelectControlValueAccessor,c.FormControlName,u.NgForOf,c.NumberValueAccessor,c.DefaultValueAccessor,c.NgSelectOption,c.ɵangular_packages_forms_forms_z],pipes:[d.I18nPipe],encapsulation:2}),t}(s.BasePolicyComponent);t.PasswordGeneratorPolicyComponent=h,("undefined"==typeof ngDevMode||ngDevMode)&&l.ɵsetClassMetadata(h,[{type:o.Component,args:[{selector:"policy-password-generator",templateUrl:"password-generator.component.html"}]}],(function(){return[{type:c.FormBuilder},{type:p.I18nService}]}),null)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PersonalOwnershipPolicyComponent=t.PersonalOwnershipPolicy=void 0;var o=n(0),a=n(65),s=n(124),l=n(0),c=n(21),p=n(11),u=n(8),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="personalOwnership",t.description="personalOwnershipPolicyDesc",t.type=a.PolicyType.PersonalOwnership,t.component=m,t}return i(t,e),t}(s.BasePolicy);t.PersonalOwnershipPolicy=d;var m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.ɵfac=function(e){return f(e||t)},t.ɵcmp=l.ɵɵdefineComponent({type:t,selectors:[["policy-personal-ownership"]],features:[l.ɵɵInheritDefinitionFeature],decls:16,vars:7,consts:[["type","warning"],[1,"form-group"],[1,"form-check"],["type","checkbox","id","enabled","name","Enabled",1,"form-check-input",3,"formControl"],["for","enabled",1,"form-check-label"]],template:function(e,t){1&e&&(l.ɵɵelementStart(0,"app-callout",0),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(3," "),l.ɵɵelementStart(4,"div",1),l.ɵɵtext(5," "),l.ɵɵelementStart(6,"div",2),l.ɵɵtext(7," "),l.ɵɵelement(8,"input",3),l.ɵɵtext(9," "),l.ɵɵelementStart(10,"label",4),l.ɵɵtext(11),l.ɵɵpipe(12,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(13," "),l.ɵɵelementEnd(),l.ɵɵtext(14," "),l.ɵɵelementEnd(),l.ɵɵtext(15," ")),2&e&&(l.ɵɵadvance(1),l.ɵɵtextInterpolate1(" ",l.ɵɵpipeBind1(2,3,"personalOwnershipExemption")," "),l.ɵɵadvance(7),l.ɵɵproperty("formControl",t.enabled),l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(12,5,"personalOwnershipCheckboxDesc")))},directives:[c.CalloutComponent,p.CheckboxControlValueAccessor,p.NgControlStatus,p.FormControlDirective],pipes:[u.I18nPipe],encapsulation:2}),t}(s.BasePolicyComponent);t.PersonalOwnershipPolicyComponent=m;var f=l.ɵɵgetInheritedFactory(m);("undefined"==typeof ngDevMode||ngDevMode)&&l.ɵsetClassMetadata(m,[{type:o.Component,args:[{selector:"policy-personal-ownership",templateUrl:"personal-ownership.component.html"}]}],null,null)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.RequireSsoPolicyComponent=t.RequireSsoPolicy=void 0;var o=n(0),a=(n(1),n(65)),s=n(124),l=n(0),c=n(1),p=n(21),u=n(11),d=n(8),m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="requireSso",t.description="requireSsoPolicyDesc",t.type=a.PolicyType.RequireSso,t.component=f,t}return i(t,e),t.prototype.display=function(e){return e.useSso},t}(s.BasePolicy);t.RequireSsoPolicy=m;var f=function(e){function t(t){var n=e.call(this)||this;return n.i18nService=t,n}return i(t,e),t.prototype.buildRequest=function(t){var n,r=null!==(n=t.get(a.PolicyType.SingleOrg))&&void 0!==n&&n;if(this.enabled.value&&!r)throw new Error(this.i18nService.t("requireSsoPolicyReqError"));return e.prototype.buildRequest.call(this,t)},t.ɵfac=function(e){return new(e||t)(l.ɵɵdirectiveInject(c.I18nService))},t.ɵcmp=l.ɵɵdefineComponent({type:t,selectors:[["policy-require-sso"]],features:[l.ɵɵInheritDefinitionFeature],decls:21,vars:13,consts:[["type","tip",3,"title"],["type","warning"],[1,"form-group"],[1,"form-check"],["type","checkbox","id","enabled","name","Enabled",1,"form-check-input",3,"formControl"],["for","enabled",1,"form-check-label"]],template:function(e,t){1&e&&(l.ɵɵelementStart(0,"app-callout",0),l.ɵɵpipe(1,"i18n"),l.ɵɵtext(2),l.ɵɵpipe(3,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(4," "),l.ɵɵelementStart(5,"app-callout",1),l.ɵɵtext(6),l.ɵɵpipe(7,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(8," "),l.ɵɵelementStart(9,"div",2),l.ɵɵtext(10," "),l.ɵɵelementStart(11,"div",3),l.ɵɵtext(12," "),l.ɵɵelement(13,"input",4),l.ɵɵtext(14," "),l.ɵɵelementStart(15,"label",5),l.ɵɵtext(16),l.ɵɵpipe(17,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(18," "),l.ɵɵelementEnd(),l.ɵɵtext(19," "),l.ɵɵelementEnd(),l.ɵɵtext(20," ")),2&e&&(l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(1,5,"prerequisite")),l.ɵɵadvance(2),l.ɵɵtextInterpolate1(" ",l.ɵɵpipeBind1(3,7,"requireSsoPolicyReq")," "),l.ɵɵadvance(4),l.ɵɵtextInterpolate1(" ",l.ɵɵpipeBind1(7,9,"requireSsoExemption")," "),l.ɵɵadvance(7),l.ɵɵproperty("formControl",t.enabled),l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(17,11,"enabled")))},directives:[p.CalloutComponent,u.CheckboxControlValueAccessor,u.NgControlStatus,u.FormControlDirective],pipes:[d.I18nPipe],encapsulation:2}),t}(s.BasePolicyComponent);t.RequireSsoPolicyComponent=f,("undefined"==typeof ngDevMode||ngDevMode)&&l.ɵsetClassMetadata(f,[{type:o.Component,args:[{selector:"policy-require-sso",templateUrl:"require-sso.component.html"}]}],(function(){return[{type:c.I18nService}]}),null)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ResetPasswordPolicyComponent=t.ResetPasswordPolicy=void 0;var o=n(0),a=(n(11),n(65)),s=n(124),l=n(0),c=n(11),p=n(21),u=n(8),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="resetPasswordPolicy",t.description="resetPasswordPolicyDescription",t.type=a.PolicyType.ResetPassword,t.component=m,t}return i(t,e),t.prototype.display=function(e){return e.useResetPassword},t}(s.BasePolicy);t.ResetPasswordPolicy=d;var m=function(e){function t(t){var n=e.call(this)||this;return n.fb=t,n.data=n.fb.group({autoEnrollEnabled:!1}),n}return i(t,e),t.ɵfac=function(e){return new(e||t)(l.ɵɵdirectiveInject(c.FormBuilder))},t.ɵcmp=l.ɵɵdefineComponent({type:t,selectors:[["policy-reset-password"]],features:[l.ɵɵInheritDefinitionFeature],decls:40,vars:20,consts:[["type","warning"],[1,"form-group"],[1,"form-check"],["type","checkbox","id","enabled","name","Enabled",1,"form-check-input",3,"formControl"],["for","enabled",1,"form-check-label"],[3,"formGroup"],[1,"mt-4"],["type","checkbox","id","autoEnrollEnabled","name","AutoEnrollEnabled","formControlName","autoEnrollEnabled",1,"form-check-input"],["for","autoEnrollEnabled",1,"form-check-label"]],template:function(e,t){1&e&&(l.ɵɵelementStart(0,"app-callout",0),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(3," "),l.ɵɵelementStart(4,"div",1),l.ɵɵtext(5," "),l.ɵɵelementStart(6,"div",2),l.ɵɵtext(7," "),l.ɵɵelement(8,"input",3),l.ɵɵtext(9," "),l.ɵɵelementStart(10,"label",4),l.ɵɵtext(11),l.ɵɵpipe(12,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(13," "),l.ɵɵelementEnd(),l.ɵɵtext(14," "),l.ɵɵelementEnd(),l.ɵɵtext(15," "),l.ɵɵelementStart(16,"div",5),l.ɵɵtext(17," "),l.ɵɵelementStart(18,"h3",6),l.ɵɵtext(19),l.ɵɵpipe(20,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(21," "),l.ɵɵelementStart(22,"p"),l.ɵɵtext(23),l.ɵɵpipe(24,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(25," "),l.ɵɵelementStart(26,"app-callout",0),l.ɵɵtext(27),l.ɵɵpipe(28,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(29," "),l.ɵɵelementStart(30,"div",2),l.ɵɵtext(31," "),l.ɵɵelement(32,"input",7),l.ɵɵtext(33," "),l.ɵɵelementStart(34,"label",8),l.ɵɵtext(35),l.ɵɵpipe(36,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(37," "),l.ɵɵelementEnd(),l.ɵɵtext(38," "),l.ɵɵelementEnd(),l.ɵɵtext(39," ")),2&e&&(l.ɵɵadvance(1),l.ɵɵtextInterpolate1(" ",l.ɵɵpipeBind1(2,8,"resetPasswordPolicyWarning")," "),l.ɵɵadvance(7),l.ɵɵproperty("formControl",t.enabled),l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(12,10,"enabled")),l.ɵɵadvance(5),l.ɵɵproperty("formGroup",t.data),l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(20,12,"resetPasswordPolicyAutoEnroll")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(24,14,"resetPasswordPolicyAutoEnrollDescription")),l.ɵɵadvance(4),l.ɵɵtextInterpolate1(" ",l.ɵɵpipeBind1(28,16,"resetPasswordPolicyAutoEnrollWarning")," "),l.ɵɵadvance(8),l.ɵɵtextInterpolate1(" ",l.ɵɵpipeBind1(36,18,"resetPasswordPolicyAutoEnrollCheckbox")," "))},directives:[p.CalloutComponent,c.CheckboxControlValueAccessor,c.NgControlStatus,c.FormControlDirective,c.NgControlStatusGroup,c.FormGroupDirective,c.FormControlName],pipes:[u.I18nPipe],encapsulation:2}),t}(s.BasePolicyComponent);t.ResetPasswordPolicyComponent=m,("undefined"==typeof ngDevMode||ngDevMode)&&l.ɵsetClassMetadata(m,[{type:o.Component,args:[{selector:"policy-reset-password",templateUrl:"reset-password.component.html"}]}],(function(){return[{type:c.FormBuilder}]}),null)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.SendOptionsPolicyComponent=t.SendOptionsPolicy=void 0;var o=n(0),a=(n(11),n(65)),s=n(124),l=n(0),c=n(11),p=n(21),u=n(8),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="sendOptions",t.description="sendOptionsPolicyDesc",t.type=a.PolicyType.SendOptions,t.component=m,t}return i(t,e),t}(s.BasePolicy);t.SendOptionsPolicy=d;var m=function(e){function t(t){var n=e.call(this)||this;return n.fb=t,n.data=n.fb.group({disableHideEmail:!1}),n}return i(t,e),t.ɵfac=function(e){return new(e||t)(l.ɵɵdirectiveInject(c.FormBuilder))},t.ɵcmp=l.ɵɵdefineComponent({type:t,selectors:[["policy-send-options"]],features:[l.ɵɵInheritDefinitionFeature],decls:32,vars:14,consts:[["type","warning"],[1,"form-group"],[1,"form-check"],["type","checkbox","id","enabled","name","Enabled",1,"form-check-input",3,"formControl"],["for","enabled",1,"form-check-label"],[3,"formGroup"],[1,"mt-4"],["type","checkbox","id","disableHideEmail","name","DisableHideEmail","formControlName","disableHideEmail",1,"form-check-input"],["for","disableHideEmail",1,"form-check-label"]],template:function(e,t){1&e&&(l.ɵɵelementStart(0,"app-callout",0),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(3," "),l.ɵɵelementStart(4,"div",1),l.ɵɵtext(5," "),l.ɵɵelementStart(6,"div",2),l.ɵɵtext(7," "),l.ɵɵelement(8,"input",3),l.ɵɵtext(9," "),l.ɵɵelementStart(10,"label",4),l.ɵɵtext(11),l.ɵɵpipe(12,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(13," "),l.ɵɵelementEnd(),l.ɵɵtext(14," "),l.ɵɵelementEnd(),l.ɵɵtext(15," "),l.ɵɵelementStart(16,"div",5),l.ɵɵtext(17," "),l.ɵɵelementStart(18,"h3",6),l.ɵɵtext(19),l.ɵɵpipe(20,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(21," "),l.ɵɵelementStart(22,"div",2),l.ɵɵtext(23," "),l.ɵɵelement(24,"input",7),l.ɵɵtext(25," "),l.ɵɵelementStart(26,"label",8),l.ɵɵtext(27),l.ɵɵpipe(28,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(29," "),l.ɵɵelementEnd(),l.ɵɵtext(30," "),l.ɵɵelementEnd(),l.ɵɵtext(31," ")),2&e&&(l.ɵɵadvance(1),l.ɵɵtextInterpolate1(" ",l.ɵɵpipeBind1(2,6,"sendOptionsExemption")," "),l.ɵɵadvance(7),l.ɵɵproperty("formControl",t.enabled),l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(12,8,"enabled")),l.ɵɵadvance(5),l.ɵɵproperty("formGroup",t.data),l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(20,10,"options")),l.ɵɵadvance(8),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(28,12,"disableHideEmail")))},directives:[p.CalloutComponent,c.CheckboxControlValueAccessor,c.NgControlStatus,c.FormControlDirective,c.NgControlStatusGroup,c.FormGroupDirective,c.FormControlName],pipes:[u.I18nPipe],encapsulation:2}),t}(s.BasePolicyComponent);t.SendOptionsPolicyComponent=m,("undefined"==typeof ngDevMode||ngDevMode)&&l.ɵsetClassMetadata(m,[{type:o.Component,args:[{selector:"policy-send-options",templateUrl:"send-options.component.html"}]}],(function(){return[{type:c.FormBuilder}]}),null)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.SingleOrgPolicyComponent=t.SingleOrgPolicy=void 0;var o=n(0),a=(n(1),n(65)),s=n(124),l=n(0),c=n(1),p=n(21),u=n(11),d=n(8),m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="singleOrg",t.description="singleOrgDesc",t.type=a.PolicyType.SingleOrg,t.component=f,t}return i(t,e),t}(s.BasePolicy);t.SingleOrgPolicy=m;var f=function(e){function t(t){var n=e.call(this)||this;return n.i18nService=t,n}return i(t,e),t.prototype.buildRequest=function(t){var n,r;if(!this.enabled.value){if(null!==(n=t.get(a.PolicyType.RequireSso))&&void 0!==n&&n)throw new Error(this.i18nService.t("disableRequiredError",this.i18nService.t("requireSso")));if(null!==(r=t.get(a.PolicyType.MaximumVaultTimeout))&&void 0!==r&&r)throw new Error(this.i18nService.t("disableRequiredError",this.i18nService.t("maximumVaultTimeoutLabel")))}return e.prototype.buildRequest.call(this,t)},t.ɵfac=function(e){return new(e||t)(l.ɵɵdirectiveInject(c.I18nService))},t.ɵcmp=l.ɵɵdefineComponent({type:t,selectors:[["policy-single-org"]],features:[l.ɵɵInheritDefinitionFeature],decls:16,vars:7,consts:[["type","warning"],[1,"form-group"],[1,"form-check"],["type","checkbox","id","enabled","name","Enabled",1,"form-check-input",3,"formControl"],["for","enabled",1,"form-check-label"]],template:function(e,t){1&e&&(l.ɵɵelementStart(0,"app-callout",0),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(3," "),l.ɵɵelementStart(4,"div",1),l.ɵɵtext(5," "),l.ɵɵelementStart(6,"div",2),l.ɵɵtext(7," "),l.ɵɵelement(8,"input",3),l.ɵɵtext(9," "),l.ɵɵelementStart(10,"label",4),l.ɵɵtext(11),l.ɵɵpipe(12,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(13," "),l.ɵɵelementEnd(),l.ɵɵtext(14," "),l.ɵɵelementEnd(),l.ɵɵtext(15," ")),2&e&&(l.ɵɵadvance(1),l.ɵɵtextInterpolate1(" ",l.ɵɵpipeBind1(2,3,"singleOrgPolicyWarning")," "),l.ɵɵadvance(7),l.ɵɵproperty("formControl",t.enabled),l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(12,5,"enabled")))},directives:[p.CalloutComponent,u.CheckboxControlValueAccessor,u.NgControlStatus,u.FormControlDirective],pipes:[d.I18nPipe],encapsulation:2}),t}(s.BasePolicyComponent);t.SingleOrgPolicyComponent=f,("undefined"==typeof ngDevMode||ngDevMode)&&l.ɵsetClassMetadata(f,[{type:o.Component,args:[{selector:"policy-single-org",templateUrl:"single-org.component.html"}]}],(function(){return[{type:c.I18nService}]}),null)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorAuthenticationPolicyComponent=t.TwoFactorAuthenticationPolicy=void 0;var o=n(0),a=n(65),s=n(124),l=n(0),c=n(21),p=n(11),u=n(8),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="twoStepLogin",t.description="twoStepLoginPolicyDesc",t.type=a.PolicyType.TwoFactorAuthentication,t.component=m,t}return i(t,e),t}(s.BasePolicy);t.TwoFactorAuthenticationPolicy=d;var m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.ɵfac=function(e){return f(e||t)},t.ɵcmp=l.ɵɵdefineComponent({type:t,selectors:[["policy-two-factor-authentication"]],features:[l.ɵɵInheritDefinitionFeature],decls:16,vars:7,consts:[["type","warning"],[1,"form-group"],[1,"form-check"],["type","checkbox","id","enabled","name","Enabled",1,"form-check-input",3,"formControl"],["for","enabled",1,"form-check-label"]],template:function(e,t){1&e&&(l.ɵɵelementStart(0,"app-callout",0),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(3," "),l.ɵɵelementStart(4,"div",1),l.ɵɵtext(5," "),l.ɵɵelementStart(6,"div",2),l.ɵɵtext(7," "),l.ɵɵelement(8,"input",3),l.ɵɵtext(9," "),l.ɵɵelementStart(10,"label",4),l.ɵɵtext(11),l.ɵɵpipe(12,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(13," "),l.ɵɵelementEnd(),l.ɵɵtext(14," "),l.ɵɵelementEnd(),l.ɵɵtext(15," ")),2&e&&(l.ɵɵadvance(1),l.ɵɵtextInterpolate1(" ",l.ɵɵpipeBind1(2,3,"twoStepLoginPolicyWarning")," "),l.ɵɵadvance(7),l.ɵɵproperty("formControl",t.enabled),l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(12,5,"enabled")))},directives:[c.CalloutComponent,p.CheckboxControlValueAccessor,p.NgControlStatus,p.FormControlDirective],pipes:[u.I18nPipe],encapsulation:2}),t}(s.BasePolicyComponent);t.TwoFactorAuthenticationPolicyComponent=m;var f=l.ɵɵgetInheritedFactory(m);("undefined"==typeof ngDevMode||ngDevMode)&&l.ɵsetClassMetadata(m,[{type:o.Component,args:[{selector:"policy-two-factor-authentication",templateUrl:"two-factor-authentication.component.html"}]}],null,null)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.DisablePersonalVaultExportPolicyComponent=t.DisablePersonalVaultExportPolicy=void 0;var o=n(0),a=n(65),s=n(124),l=n(0),c=n(11),p=n(8),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="disablePersonalVaultExport",t.description="disablePersonalVaultExportDesc",t.type=a.PolicyType.DisablePersonalVaultExport,t.component=d,t}return i(t,e),t}(s.BasePolicy);t.DisablePersonalVaultExportPolicy=u;var d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.ɵfac=function(e){return m(e||t)},t.ɵcmp=l.ɵɵdefineComponent({type:t,selectors:[["policy-disable-personal-vault-export"]],features:[l.ɵɵInheritDefinitionFeature],decls:12,vars:4,consts:[[1,"form-group"],[1,"form-check"],["type","checkbox","id","enabled","name","Enabled",1,"form-check-input",3,"formControl"],["for","enabled",1,"form-check-label"]],template:function(e,t){1&e&&(l.ɵɵelementStart(0,"div",0),l.ɵɵtext(1," "),l.ɵɵelementStart(2,"div",1),l.ɵɵtext(3," "),l.ɵɵelement(4,"input",2),l.ɵɵtext(5," "),l.ɵɵelementStart(6,"label",3),l.ɵɵtext(7),l.ɵɵpipe(8,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(9," "),l.ɵɵelementEnd(),l.ɵɵtext(10," "),l.ɵɵelementEnd(),l.ɵɵtext(11," ")),2&e&&(l.ɵɵadvance(4),l.ɵɵproperty("formControl",t.enabled),l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(8,2,"enabled")))},directives:[c.CheckboxControlValueAccessor,c.NgControlStatus,c.FormControlDirective],pipes:[p.I18nPipe],encapsulation:2}),t}(s.BasePolicyComponent);t.DisablePersonalVaultExportPolicyComponent=d;var m=l.ɵɵgetInheritedFactory(d);("undefined"==typeof ngDevMode||ngDevMode)&&l.ɵsetClassMetadata(d,[{type:o.Component,args:[{selector:"policy-disable-personal-vault-export",templateUrl:"disable-personal-vault-export.component.html"}]}],null,null)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.MaximumVaultTimeoutPolicyComponent=t.MaximumVaultTimeoutPolicy=void 0;var o=n(0),a=(n(11),n(1),n(65)),s=n(124),l=n(0),c=n(11),p=n(1),u=n(21),d=n(8),m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="maximumVaultTimeout",t.description="maximumVaultTimeoutDesc",t.type=a.PolicyType.MaximumVaultTimeout,t.component=f,t}return i(t,e),t}(s.BasePolicy);t.MaximumVaultTimeoutPolicy=m;var f=function(e){function t(t,n){var r=e.call(this)||this;return r.fb=t,r.i18nService=n,r.data=r.fb.group({hours:[null],minutes:[null]}),r}return i(t,e),t.prototype.loadData=function(){var e,t=null===(e=this.policyResponse.data)||void 0===e?void 0:e.minutes;null!=t&&this.data.patchValue({hours:Math.floor(t/60),minutes:t%60})},t.prototype.buildRequestData=function(){return null==this.data.value.hours&&null==this.data.value.minutes?null:{minutes:60*this.data.value.hours+this.data.value.minutes}},t.prototype.buildRequest=function(t){var n,r=null!==(n=t.get(a.PolicyType.SingleOrg))&&void 0!==n&&n;if(this.enabled.value&&!r)throw new Error(this.i18nService.t("requireSsoPolicyReqError"));var i=this.buildRequestData();if(null==(null==i?void 0:i.minutes)||(null==i?void 0:i.minutes)<=0)throw new Error(this.i18nService.t("invalidMaximumVaultTimeout"));return e.prototype.buildRequest.call(this,t)},t.ɵfac=function(e){return new(e||t)(l.ɵɵdirectiveInject(c.FormBuilder),l.ɵɵdirectiveInject(p.I18nService))},t.ɵcmp=l.ɵɵdefineComponent({type:t,selectors:[["policy-maximum-timeout"]],features:[l.ɵɵInheritDefinitionFeature],decls:48,vars:20,consts:[["type","tip",3,"title"],[1,"form-group"],[1,"form-check"],["type","checkbox","id","enabled","name","Enabled",1,"form-check-input",3,"formControl"],["for","enabled",1,"form-check-label"],[3,"formGroup"],["for","hours"],[1,"row"],[1,"col-6"],["id","hours","type","number","min","0","name","hours","formControlName","hours",1,"form-control"],["id","minutes","type","number","min","0","max","59","name","minutes","formControlName","minutes",1,"form-control"]],template:function(e,t){1&e&&(l.ɵɵelementStart(0,"app-callout",0),l.ɵɵpipe(1,"i18n"),l.ɵɵtext(2),l.ɵɵpipe(3,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(4," "),l.ɵɵelementStart(5,"div",1),l.ɵɵtext(6," "),l.ɵɵelementStart(7,"div",2),l.ɵɵtext(8," "),l.ɵɵelement(9,"input",3),l.ɵɵtext(10," "),l.ɵɵelementStart(11,"label",4),l.ɵɵtext(12),l.ɵɵpipe(13,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(14," "),l.ɵɵelementEnd(),l.ɵɵtext(15," "),l.ɵɵelementEnd(),l.ɵɵtext(16," "),l.ɵɵelementStart(17,"div",5),l.ɵɵtext(18," "),l.ɵɵelementStart(19,"div",1),l.ɵɵtext(20," "),l.ɵɵelementStart(21,"label",6),l.ɵɵtext(22),l.ɵɵpipe(23,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(24," "),l.ɵɵelementStart(25,"div",7),l.ɵɵtext(26," "),l.ɵɵelementStart(27,"div",8),l.ɵɵtext(28," "),l.ɵɵelement(29,"input",9),l.ɵɵtext(30," "),l.ɵɵelementStart(31,"small"),l.ɵɵtext(32),l.ɵɵpipe(33,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(34," "),l.ɵɵelementEnd(),l.ɵɵtext(35," "),l.ɵɵelementStart(36,"div",8),l.ɵɵtext(37," "),l.ɵɵelement(38,"input",10),l.ɵɵtext(39," "),l.ɵɵelementStart(40,"small"),l.ɵɵtext(41),l.ɵɵpipe(42,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(43," "),l.ɵɵelementEnd(),l.ɵɵtext(44," "),l.ɵɵelementEnd(),l.ɵɵtext(45," "),l.ɵɵelementEnd(),l.ɵɵtext(46," "),l.ɵɵelementEnd(),l.ɵɵtext(47," ")),2&e&&(l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(1,8,"prerequisite")),l.ɵɵadvance(2),l.ɵɵtextInterpolate1(" ",l.ɵɵpipeBind1(3,10,"requireSsoPolicyReq")," "),l.ɵɵadvance(7),l.ɵɵproperty("formControl",t.enabled),l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(13,12,"enabled")),l.ɵɵadvance(5),l.ɵɵproperty("formGroup",t.data),l.ɵɵadvance(5),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(23,14,"maximumVaultTimeoutLabel")),l.ɵɵadvance(10),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(33,16,"hours")),l.ɵɵadvance(9),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(42,18,"minutes")))},directives:[u.CalloutComponent,c.CheckboxControlValueAccessor,c.NgControlStatus,c.FormControlDirective,c.NgControlStatusGroup,c.FormGroupDirective,c.NumberValueAccessor,c.DefaultValueAccessor,c.FormControlName],pipes:[d.I18nPipe],encapsulation:2}),t}(s.BasePolicyComponent);t.MaximumVaultTimeoutPolicyComponent=f,("undefined"==typeof ngDevMode||ngDevMode)&&l.ɵsetClassMetadata(f,[{type:o.Component,args:[{selector:"policy-maximum-timeout",templateUrl:"maximum-vault-timeout.component.html"}]}],(function(){return[{type:c.FormBuilder},{type:p.I18nService}]}),null)},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]"}]}],(function(){return[{type:o.ModalService},{type:i.ChangeDetectorRef},{type:i.ElementRef},{type:a.ModalRef}]}),{modalContentRef:[{type:r.ViewChild,args:["modalContent",{read:r.ViewContainerRef,static:!0}]}]})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModalInjector=void 0;var r=function(){function e(e,t){this._parentInjector=e,this._additionalTokens=t}return e.prototype.get=function(e,t,n){var r;return null!==(r=this._additionalTokens.get(e))&&void 0!==r?r:this._parentInjector.get(e,t)},e}();t.ModalInjector=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderAddOrganizationRequest=void 0;var r=function(){};t.ProviderAddOrganizationRequest=r},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isValid=t.getDomain=void 0,t.getDomain=function(e){return null},t.isValid=function(e){return!0}},,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProvidersRoutingModule=void 0;var r=n(0),i=n(7),o=n(296),a=n(250),s=n(509),l=n(511),c=n(515),p=n(516),u=n(518),d=n(519),m=n(506),f=n(525),h=n(526),v=n(527),y=n(379),g=n(380),x=n(504),b=n(505),S=n(528),w=n(0),C=n(7),I=[{path:"",canActivate:[o.AuthGuardService],component:g.ProvidersComponent},{path:"",component:y.FrontendLayoutComponent,children:[{path:"setup-provider",component:h.SetupProviderComponent,data:{titleId:"setupProvider"}},{path:"accept-provider",component:c.AcceptProviderComponent,data:{titleId:"acceptProvider"}}]},{path:"",canActivate:[o.AuthGuardService],children:[{path:"setup",component:v.SetupComponent},{path:":providerId",component:m.ProvidersLayoutComponent,canActivate:[x.ProviderGuardService],children:[{path:"",pathMatch:"full",redirectTo:"clients"},{path:"clients/create",component:l.CreateOrganizationComponent},{path:"clients",component:s.ClientsComponent,data:{titleId:"clients"}},{path:"manage",component:u.ManageComponent,children:[{path:"",pathMatch:"full",redirectTo:"people"},{path:"people",component:d.PeopleComponent,canActivate:[b.ProviderTypeGuardService],data:{titleId:"people",permissions:[a.Permissions.ManageUsers]}},{path:"events",component:p.EventsComponent,canActivate:[b.ProviderTypeGuardService],data:{titleId:"eventLogs",permissions:[a.Permissions.AccessEventLogs]}}]},{path:"settings",component:f.SettingsComponent,children:[{path:"",pathMatch:"full",redirectTo:"account"},{path:"account",component:S.AccountComponent,canActivate:[b.ProviderTypeGuardService],data:{titleId:"myProvider",permissions:[a.Permissions.ManageProvider]}}]}]}]}],E=function(){function e(){}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=w.ɵɵdefineNgModule({type:e}),e.ɵinj=w.ɵɵdefineInjector({imports:[[i.RouterModule.forChild(I)],i.RouterModule]}),e}();t.ProvidersRoutingModule=E,("undefined"==typeof ngJitMode||ngJitMode)&&w.ɵɵsetNgModuleScope(E,{imports:[C.RouterModule],exports:[i.RouterModule]}),("undefined"==typeof ngDevMode||ngDevMode)&&w.ɵsetClassMetadata(E,[{type:r.NgModule,args:[{imports:[i.RouterModule.forChild(I)],exports:[i.RouterModule]}]}],null,null)},function(e,t,n){"use strict";n.r(t),t.default={darkInputColor:"#fff",darkInputPlaceholderColor:"#bac0ce",lightInputColor:"#465057",lightInputPlaceholderColor:"#b6b8b8"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationCreateRequest=void 0;var r=function(){};t.OrganizationCreateRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationUpgradeRequest=void 0;var r=function(){};t.OrganizationUpgradeRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderOrganizationCreateRequest=void 0;var r=function(e,t){this.clientOwnerEmail=e,this.organizationCreateRequest=t};t.ProviderOrganizationCreateRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderUserAcceptRequest=void 0;var r=function(){};t.ProviderUserAcceptRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventView=void 0;var r=function(e){this.message=e.message,this.humanReadableMessage=e.humanReadableMessage,this.appIcon=e.appIcon,this.appName=e.appName,this.userId=e.userId,this.userName=e.userName,this.userEmail=e.userEmail,this.date=e.date,this.ip=e.ip,this.type=e.type};t.EventView=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderUserConfirmRequest=void 0;var r=function(){};t.ProviderUserConfirmRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderUserBulkConfirmRequest=void 0;var r=function(e){this.keys=e};t.ProviderUserBulkConfirmRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationUserBulkConfirmRequest=void 0;var r=function(e){this.keys=e};t.OrganizationUserBulkConfirmRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderUserInviteRequest=void 0;var r=function(){this.emails=[]};t.ProviderUserInviteRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderUserUpdateRequest=void 0;var r=function(){};t.ProviderUserUpdateRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderSetupRequest=void 0;var r=function(){};t.ProviderSetupRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderUpdateRequest=void 0;var r=function(){};t.ProviderUpdateRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BroadcasterService=void 0;var r=function(){function e(){this.subscribers=new Map}return e.prototype.send=function(e,t){null==t?this.subscribers.forEach((function(t){t(e)})):this.subscribers.has(t)&&this.subscribers.get(t)(e)},e.prototype.subscribe=function(e,t){this.subscribers.set(e,t)},e.prototype.unsubscribe=function(e){this.subscribers.has(e)&&this.subscribers.delete(e)},e}();t.BroadcasterService=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmergencyAccessAcceptRequest=void 0;var r=function(){};t.EmergencyAccessAcceptRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationUserAcceptRequest=void 0;var r=function(){};t.OrganizationUserAcceptRequest=r},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=5)return this.messagingService.send("logout"),[2];this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("invalidPin"))}return[3,35];case 16:return[4,this.cryptoService.makeKey(this.masterPassword,this.email,e,t)];case 17:return r=i.sent(),[4,this.cryptoService.getKeyHash()];case 18:return o=i.sent(),c=!1,null==o?[3,20]:[4,this.cryptoService.compareAndUpdateKeyHash(this.masterPassword,r)];case 19:return c=i.sent(),[3,27];case 20:return u=new l.PasswordVerificationRequest,[4,this.cryptoService.hashPassword(this.masterPassword,r,p.HashPurpose.ServerAuthorization)];case 21:d=i.sent(),u.masterPasswordHash=d,i.label=22;case 22:return i.trys.push([22,26,,27]),this.formPromise=this.apiService.postAccountVerifyPassword(u),[4,this.formPromise];case 23:return i.sent(),c=!0,[4,this.cryptoService.hashPassword(this.masterPassword,r,p.HashPurpose.LocalAuthorization)];case 24:return m=i.sent(),[4,this.cryptoService.setKeyHash(m)];case 25:return i.sent(),[3,27];case 26:return i.sent(),[3,27];case 27:return c?this.pinSet[0]?[4,this.storageService.get(a.ConstantsService.protectedPin)]:[3,33]:[3,34];case 28:return f=i.sent(),[4,this.cryptoService.getEncKey(r)];case 29:return h=i.sent(),[4,this.cryptoService.decryptToUtf8(new s.EncString(f),h)];case 30:return v=i.sent(),[4,this.cryptoService.makePinKey(v,this.email,e,t)];case 31:return y=i.sent(),g=this.vaultTimeoutService,[4,this.cryptoService.encrypt(r.key,y)];case 32:g.pinProtectedKey=i.sent(),i.label=33;case 33:return this.setKeyAndContinue(r),[3,35];case 34:this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("invalidMasterPassword")),i.label=35;case 35:return[2]}}))}))},e.prototype.logOut=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.platformUtilsService.showDialog(this.i18nService.t("logOutConfirmation"),this.i18nService.t("logOut"),this.i18nService.t("logOut"),this.i18nService.t("cancel"))];case 1:return e.sent()&&this.messagingService.send("logout"),[2]}}))}))},e.prototype.unlockBiometric=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return this.biometricLock?[4,this.cryptoService.getKey("biometric")]:[2];case 1:return(e=null!=t.sent())?[4,this.doContinue()]:[3,3];case 2:t.sent(),t.label=3;case 3:return[2,e]}}))}))},e.prototype.togglePassword=function(){this.showPassword=!this.showPassword,document.getElementById(this.pinLock?"pin":"masterPassword").focus()},e.prototype.setKeyAndContinue=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.cryptoService.setKey(e)];case 1:return t.sent(),this.doContinue(),[2]}}))}))},e.prototype.doContinue=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return this.vaultTimeoutService.biometricLocked=!1,this.vaultTimeoutService.everBeenUnlocked=!0,[4,this.storageService.get(a.ConstantsService.disableFaviconKey)];case 1:return e=t.sent(),[4,this.stateService.save(a.ConstantsService.disableFaviconKey,!!e)];case 2:return t.sent(),this.messagingService.send("unlocked"),null!=this.onSuccessfulSubmit?this.onSuccessfulSubmit():null!=this.router&&this.router.navigate([this.successRoute]),[2]}}))}))},e.ɵfac=function(t){return new(t||e)(u.ɵɵdirectiveInject(d.Router),u.ɵɵdirectiveInject(m.I18nService),u.ɵɵdirectiveInject(f.PlatformUtilsService),u.ɵɵdirectiveInject(h.MessagingService),u.ɵɵdirectiveInject(v.UserService),u.ɵɵdirectiveInject(y.CryptoService),u.ɵɵdirectiveInject(g.StorageService),u.ɵɵdirectiveInject(x.VaultTimeoutService),u.ɵɵdirectiveInject(b.EnvironmentService),u.ɵɵdirectiveInject(S.StateService),u.ɵɵdirectiveInject(w.ApiService))},e.ɵdir=u.ɵɵdefineDirective({type:e}),e}();t.LockComponent=C,("undefined"==typeof ngDevMode||ngDevMode)&&u.ɵsetClassMetadata(C,[{type:o.Directive}],(function(){return[{type:d.Router},{type:m.I18nService},{type:f.PlatformUtilsService},{type:h.MessagingService},{type:v.UserService},{type:y.CryptoService},{type:g.StorageService},{type:x.VaultTimeoutService},{type:b.EnvironmentService},{type:S.StateService},{type:w.ApiService}]}),null)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]-1&&(e=e.concat(this.email.substr(0,t).trim().toLowerCase().split(/[^A-Za-z0-9]/))),null!=this.name&&""!==this.name&&(e=e.concat(this.name.trim().toLowerCase().split(" "))),e},t.ɵfac=function(e){return new(e||t)(d.ɵɵdirectiveInject(m.AuthService),d.ɵɵdirectiveInject(f.Router),d.ɵɵdirectiveInject(h.I18nService),d.ɵɵdirectiveInject(v.CryptoService),d.ɵɵdirectiveInject(y.ApiService),d.ɵɵdirectiveInject(g.StateService),d.ɵɵdirectiveInject(x.PlatformUtilsService),d.ɵɵdirectiveInject(b.PasswordGenerationService),d.ɵɵdirectiveInject(S.EnvironmentService))},t.ɵdir=d.ɵɵdefineDirective({type:t,features:[d.ɵɵInheritDefinitionFeature]}),t}(u.CaptchaProtectedComponent);t.RegisterComponent=w,("undefined"==typeof ngDevMode||ngDevMode)&&d.ɵsetClassMetadata(w,[{type:s.Directive}],(function(){return[{type:m.AuthService},{type:f.Router},{type:h.I18nService},{type:v.CryptoService},{type:y.ApiService},{type:g.StateService},{type:x.PlatformUtilsService},{type:b.PasswordGenerationService},{type:S.EnvironmentService}]}),null)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RegisterRequest=void 0;var r=function(e,t,n,r,i,o,a,s,l){this.email=e,this.name=t,this.masterPasswordHash=n,this.key=i,this.kdf=o,this.kdfIterations=a,this.referenceData=s,this.captchaResponse=l,this.masterPasswordHint=r||null};t.RegisterRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReferenceEventRequest=void 0;var r=function(){};t.ReferenceEventRequest=r},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]1?[4,this.sendEmail(!1)]:[3,5];case 4:n.sent(),n.label=5;case 5:case 6:return[3,7];case 7:return[2]}}))}))},e.prototype.submit=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:if(null==this.token||""===this.token)return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("verificationCodeRequired")),[2];if(this.selectedProviderType===s.TwoFactorProviderType.WebAuthn){if(null==this.webAuthn)return[2];this.webAuthn.stop()}else this.selectedProviderType!==s.TwoFactorProviderType.Email&&this.selectedProviderType!==s.TwoFactorProviderType.Authenticator||(this.token=this.token.replace(" ","").trim());e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.doSubmit()];case 2:return e.sent(),[3,4];case 3:return e.sent(),this.selectedProviderType===s.TwoFactorProviderType.WebAuthn&&null!=this.webAuthn&&this.webAuthn.start(),[3,4];case 4:return[2]}}))}))},e.prototype.doSubmit=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return this.formPromise=this.authService.logInTwoFactor(this.selectedProviderType,this.token,this.remember),[4,this.formPromise];case 1:return e=n.sent(),[4,this.storageService.get(p.ConstantsService.disableFaviconKey)];case 2:return t=n.sent(),[4,this.stateService.save(p.ConstantsService.disableFaviconKey,!!t)];case 3:return n.sent(),null!=this.onSuccessfulLogin&&this.onSuccessfulLogin(),e.resetMasterPassword&&(this.successRoute="set-password"),e.forcePasswordReset&&(this.successRoute="update-temp-password"),null!=this.onSuccessfulLoginNavigate?this.onSuccessfulLoginNavigate():this.router.navigate([this.successRoute],{queryParams:{identifier:this.identifier}}),[2]}}))}))},e.prototype.sendEmail=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:if(this.selectedProviderType!==s.TwoFactorProviderType.Email)return[2];if(null!=this.emailPromise)return[2];n.label=1;case 1:return n.trys.push([1,3,,4]),t=new l.TwoFactorEmailRequest(this.authService.email,this.authService.masterPasswordHash),this.emailPromise=this.apiService.postTwoFactorEmail(t),[4,this.emailPromise];case 2:return n.sent(),e&&this.platformUtilsService.showToast("success",null,this.i18nService.t("verificationCodeEmailSent",this.twoFactorEmail)),[3,4];case 3:return n.sent(),[3,4];case 4:return this.emailPromise=null,[2]}}))}))},e.prototype.authWebAuthn=function(){var e=this.authService.twoFactorProvidersData.get(this.selectedProviderType);this.webAuthnSupported&&null!=this.webAuthn&&this.webAuthn.init(e)},e.prototype.cleanupWebAuthn=function(){null!=this.webAuthn&&(this.webAuthn.stop(),this.webAuthn.cleanup())},Object.defineProperty(e.prototype,"authing",{get:function(){return this.authService.authingWithPassword()||this.authService.authingWithSso()||this.authService.authingWithApiKey()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"needsLock",{get:function(){return this.authService.authingWithSso()||this.authService.authingWithApiKey()},enumerable:!1,configurable:!0}),e.ɵfac=function(t){return new(t||e)(m.ɵɵdirectiveInject(f.AuthService),m.ɵɵdirectiveInject(h.Router),m.ɵɵdirectiveInject(v.I18nService),m.ɵɵdirectiveInject(y.ApiService),m.ɵɵdirectiveInject(g.PlatformUtilsService),m.ɵɵdirectiveInject(Window),m.ɵɵdirectiveInject(x.EnvironmentService),m.ɵɵdirectiveInject(b.StateService),m.ɵɵdirectiveInject(S.StorageService),m.ɵɵdirectiveInject(h.ActivatedRoute))},e.ɵdir=m.ɵɵdefineDirective({type:e}),e}();t.TwoFactorComponent=w,("undefined"==typeof ngDevMode||ngDevMode)&&m.ɵsetClassMetadata(w,[{type:o.Directive}],(function(){return[{type:f.AuthService},{type:h.Router},{type:v.I18nService},{type:y.ApiService},{type:g.PlatformUtilsService},{type:Window},{type:x.EnvironmentService},{type:b.StateService},{type:S.StorageService},{type:h.ActivatedRoute}]}),null)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AuthResult=void 0;var r=function(){this.twoFactor=!1,this.captchaSiteKey="",this.resetMasterPassword=!1,this.forcePasswordReset=!1,this.twoFactorProviders=null};t.AuthResult=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeviceRequest=void 0;var r=function(e,t){this.type=t.getDevice(),this.name=t.getDeviceString(),this.identifier=e,this.pushToken=null};t.DeviceRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PreloginRequest=void 0;var r=function(e){this.email=e};t.PreloginRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenRequest=void 0;var r=n(28),i=function(){function e(e,t,n,r,i,o,a,s){this.provider=r,this.token=i,this.remember=o,this.captchaResponse=a,null!=e&&e.length>1?(this.email=e[0],this.masterPasswordHash=e[1]):null!=t&&t.length>2?(this.code=t[0],this.codeVerifier=t[1],this.redirectUri=t[2]):null!=n&&n.length>1&&(this.clientId=n[0],this.clientSecret=n[1]),this.device=null!=s?s:null}return e.prototype.toIdentityToken=function(e){var t={scope:"api offline_access",client_id:e};if(null!=this.clientSecret)t.scope=e.startsWith("organization")?"api.organization":"api",t.grant_type="client_credentials",t.client_secret=this.clientSecret;else if(null!=this.masterPasswordHash&&null!=this.email)t.grant_type="password",t.username=this.email,t.password=this.masterPasswordHash;else{if(null==this.code||null==this.codeVerifier||null==this.redirectUri)throw new Error("must provide credentials or codes");t.grant_type="authorization_code",t.code=this.code,t.code_verifier=this.codeVerifier,t.redirect_uri=this.redirectUri}return this.device&&(t.deviceType=this.device.type,t.deviceIdentifier=this.device.identifier,t.deviceName=this.device.name),this.token&&null!=this.provider&&(t.twoFactorToken=this.token,t.twoFactorProvider=this.provider,t.twoFactorRemember=this.remember?"1":"0"),null!=this.captchaResponse&&(t.captchaResponse=this.captchaResponse),t},e.prototype.alterIdentityTokenHeaders=function(e){null==this.clientSecret&&null!=this.masterPasswordHash&&null!=this.email&&e.set("Auth-Email",r.Utils.fromUtf8ToUrlB64(this.email))},e}();t.TokenRequest=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebAuthnIFrame=void 0;var r=function(){function e(e,t,n,r,i,o,a,s){this.win=e,this.webVaultUrl=t,this.webAuthnNewTab=n,this.platformUtilsService=r,this.i18nService=i,this.successCallback=o,this.errorCallback=a,this.infoCallback=s,this.iframe=null,this.parseFunction=this.parseMessage.bind(this),this.connectorLink=e.document.createElement("a")}return e.prototype.init=function(e){var t=new URLSearchParams({data:this.base64Encode(JSON.stringify(e)),parent:encodeURIComponent(this.win.document.location.href),btnText:encodeURIComponent(this.i18nService.t("webAuthnAuthenticate")),v:"1"});this.webAuthnNewTab?(t.append("locale",this.i18nService.translationLocale),this.platformUtilsService.launchUri(this.webVaultUrl+"/webauthn-fallback-connector.html?"+t)):(this.connectorLink.href=this.webVaultUrl+"/webauthn-connector.html?"+t,this.iframe=this.win.document.getElementById("webauthn_iframe"),this.iframe.allow="publickey-credentials-get "+new URL(this.webVaultUrl).origin,this.iframe.src=this.connectorLink.href,this.win.addEventListener("message",this.parseFunction,!1))},e.prototype.stop=function(){this.sendMessage("stop")},e.prototype.start=function(){this.sendMessage("start")},e.prototype.sendMessage=function(e){this.iframe&&this.iframe.src&&this.iframe.contentWindow&&this.iframe.contentWindow.postMessage(e,this.iframe.src)},e.prototype.base64Encode=function(e){return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(function(e,t){return String.fromCharCode("0x"+t)})))},e.prototype.cleanup=function(){this.win.removeEventListener("message",this.parseFunction,!1)},e.prototype.parseMessage=function(e){if(this.validMessage(e)){var t=e.data.split("|");"success"===t[0]&&this.successCallback?this.successCallback(t[1]):"error"===t[0]&&this.errorCallback?this.errorCallback(t[1]):"info"===t[0]&&this.infoCallback&&this.infoCallback(t[1])}},e.prototype.validMessage=function(e){return null!=e.origin&&""!==e.origin&&e.origin===this.connectorLink.origin&&null!=e.data&&"string"==typeof e.data&&(0===e.data.indexOf("success|")||0===e.data.indexOf("error|")||0===e.data.indexOf("info|"))},e}();t.WebAuthnIFrame=r},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]"+this.i18nService.t("encExportKeyWarningDesc")+"

"+this.i18nService.t("encExportAccountWarningDesc"),this.i18nService.t("confirmVaultExport"),this.i18nService.t("exportVault"),this.i18nService.t("cancel"),"warning",!0)]:[3,2];case 1:case 3:return[2,e.sent()];case 2:return[4,this.platformUtilsService.showDialog(this.i18nService.t("exportWarningDesc"),this.i18nService.t("confirmVaultExport"),this.i18nService.t("exportVault"),this.i18nService.t("cancel"),"warning")]}}))}))},e.prototype.togglePassword=function(){this.showPassword=!this.showPassword,document.getElementById("masterPassword").focus()},e.prototype.saved=function(){this.onSaved.emit()},e.prototype.getExportData=function(){return this.exportService.getExport(this.format)},e.prototype.getFileName=function(e){var t=this.format;return"encrypted_json"===this.format&&(e=null==e?"encrypted":"encrypted_"+e,t="json"),this.exportService.getFileName(e,t)},e.prototype.collectEvent=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.eventService.collect(a.EventType.User_ClientExportedVault)];case 1:return e.sent(),[2]}}))}))},e.prototype.downloadFile=function(e){var t=this.getFileName();this.platformUtilsService.saveFile(this.win,e,{type:"text/plain"},t)},e.ɵfac=function(t){return new(t||e)(l.ɵɵdirectiveInject(c.CryptoService),l.ɵɵdirectiveInject(p.I18nService),l.ɵɵdirectiveInject(u.PlatformUtilsService),l.ɵɵdirectiveInject(d.ExportService),l.ɵɵdirectiveInject(m.EventService),l.ɵɵdirectiveInject(f.PolicyService),l.ɵɵdirectiveInject(Window))},e.ɵdir=l.ɵɵdefineDirective({type:e,outputs:{onSaved:"onSaved"}}),e}();t.ExportComponent=h,("undefined"==typeof ngDevMode||ngDevMode)&&l.ɵsetClassMetadata(h,[{type:o.Directive}],(function(){return[{type:c.CryptoService},{type:p.I18nService},{type:u.PlatformUtilsService},{type:d.ExportService},{type:m.EventService},{type:f.PolicyService},{type:Window}]}),{onSaved:[{type:o.Output}]})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttachmentView=void 0;var r=function(){function e(e){this.id=null,this.url=null,this.size=null,this.sizeName=null,this.fileName=null,this.key=null,e&&(this.id=e.id,this.url=e.url,this.size=e.size,this.sizeName=e.sizeName)}return Object.defineProperty(e.prototype,"fileSize",{get:function(){try{if(null!=this.size)return parseInt(this.size,null)}catch(e){}return 0},enumerable:!1,configurable:!0}),e}();t.AttachmentView=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttachmentRequest=void 0;var r=function(){};t.AttachmentRequest=r},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&this.collections.length>0&&this.collections.forEach((function(e){o.collectionIds.indexOf(e.id)>-1&&(e.checked=!0)})),i.label=8;case 8:return r=this,[4,this.folderService.getAllDecrypted()];case 9:return r.folders=i.sent(),this.editMode&&this.previousCipherId!==this.cipherId&&this.eventService.collect(l.EventType.Cipher_ClientViewed,this.cipherId),this.previousCipherId=this.cipherId,this.reprompt=this.cipher.reprompt!==a.CipherRepromptType.None,[2]}}))}))},e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return this.cipher.isDeleted?[2,this.restore()]:null==this.cipher.name||""===this.cipher.name?(this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("nameRequired")),[2,!1]):this.editMode&&!this.cloneMode||this.allowPersonal||null!=this.cipher.organizationId?(this.editMode&&!this.cloneMode||this.cipher.type!==s.CipherType.Login||null==this.cipher.login.uris||1!==this.cipher.login.uris.length||null!=this.cipher.login.uris[0].uri&&""!==this.cipher.login.uris[0].uri||(this.cipher.login.uris=null),this.editMode&&!this.cloneMode||null==this.cipher.organizationId||(this.cipher.collectionIds=null==this.collections?[]:this.collections.filter((function(e){return e.checked})).map((function(e){return e.id}))),this.cloneMode&&(this.cipher.id=null),[4,this.encryptCipher()]):(this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("personalOwnershipSubmitError")),[2,!1]);case 1:e=t.sent(),t.label=2;case 2:return t.trys.push([2,4,,5]),this.formPromise=this.saveCipher(e),[4,this.formPromise];case 3:return t.sent(),this.cipher.id=e.id,this.platformUtilsService.showToast("success",null,this.i18nService.t(this.editMode&&!this.cloneMode?"editedItem":"addedItem")),this.onSavedCipher.emit(this.cipher),this.messagingService.send(this.editMode&&!this.cloneMode?"editedCipher":"addedCipher"),[2,!0];case 4:return t.sent(),[3,5];case 5:return[2,!1]}}))}))},e.prototype.addUri=function(){this.cipher.type===s.CipherType.Login&&(null==this.cipher.login.uris&&(this.cipher.login.uris=[]),this.cipher.login.uris.push(new v.LoginUriView))},e.prototype.removeUri=function(e){if(this.cipher.type===s.CipherType.Login&&null!=this.cipher.login.uris){var t=this.cipher.login.uris.indexOf(e);t>-1&&this.cipher.login.uris.splice(t,1)}},e.prototype.trackByFunction=function(e,t){return e},e.prototype.cancel=function(){this.onCancelled.emit(this.cipher)},e.prototype.attachments=function(){this.onEditAttachments.emit(this.cipher)},e.prototype.share=function(){this.onShareCipher.emit(this.cipher)},e.prototype.editCollections=function(){this.onEditCollections.emit(this.cipher)},e.prototype.delete=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.platformUtilsService.showDialog(this.i18nService.t(this.cipher.isDeleted?"permanentlyDeleteItemConfirmation":"deleteItemConfirmation"),this.i18nService.t("deleteItem"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")];case 1:if(!e.sent())return[2,!1];e.label=2;case 2:return e.trys.push([2,4,,5]),this.deletePromise=this.deleteCipher(),[4,this.deletePromise];case 3:return e.sent(),this.platformUtilsService.showToast("success",null,this.i18nService.t(this.cipher.isDeleted?"permanentlyDeletedItem":"deletedItem")),this.onDeletedCipher.emit(this.cipher),this.messagingService.send(this.cipher.isDeleted?"permanentlyDeletedCipher":"deletedCipher"),[3,5];case 4:return e.sent(),[3,5];case 5:return[2,!0]}}))}))},e.prototype.restore=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.cipher.isDeleted?[4,this.platformUtilsService.showDialog(this.i18nService.t("restoreItemConfirmation"),this.i18nService.t("restoreItem"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")]:[2,!1];case 1:if(!e.sent())return[2,!1];e.label=2;case 2:return e.trys.push([2,4,,5]),this.restorePromise=this.restoreCipher(),[4,this.restorePromise];case 3:return e.sent(),this.platformUtilsService.showToast("success",null,this.i18nService.t("restoredItem")),this.onRestoredCipher.emit(this.cipher),this.messagingService.send("restoredCipher"),[3,5];case 4:return e.sent(),[3,5];case 5:return[2,!0]}}))}))},e.prototype.generatePassword=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return null!=this.cipher.login&&null!=this.cipher.login.password&&this.cipher.login.password.length?[4,this.platformUtilsService.showDialog(this.i18nService.t("overwritePasswordConfirmation"),this.i18nService.t("overwritePassword"),this.i18nService.t("yes"),this.i18nService.t("no"))]:[3,2];case 1:if(!e.sent())return[2,!1];e.label=2;case 2:return this.onGeneratePassword.emit(),[2,!0]}}))}))},e.prototype.togglePassword=function(){this.showPassword=!this.showPassword,document.getElementById("loginPassword").focus(),this.editMode&&this.showPassword&&this.eventService.collect(l.EventType.Cipher_ClientToggledPasswordVisible,this.cipherId)},e.prototype.toggleCardNumber=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){return this.showCardNumber=!this.showCardNumber,this.showCardNumber&&this.eventService.collect(l.EventType.Cipher_ClientToggledCardNumberVisible,this.cipherId),[2]}))}))},e.prototype.toggleCardCode=function(){this.showCardCode=!this.showCardCode,document.getElementById("cardCode").focus(),this.editMode&&this.showCardCode&&this.eventService.collect(l.EventType.Cipher_ClientToggledCardCodeVisible,this.cipherId)},e.prototype.toggleUriOptions=function(e){var t=e;t.showOptions=(null!=t.showOptions||null==e.match)&&!t.showOptions},e.prototype.loginUriMatchChanged=function(e){var t=e;t.showOptions=null==t.showOptions||t.showOptions},e.prototype.organizationChanged=function(){return r(this,void 0,void 0,(function(){var e,t=this;return i(this,(function(n){switch(n.label){case 0:return null!=this.writeableCollections&&this.writeableCollections.forEach((function(e){return e.checked=!1})),null==this.cipher.organizationId?[3,2]:(this.collections=this.writeableCollections.filter((function(e){return e.organizationId===t.cipher.organizationId})),[4,this.userService.getOrganization(this.cipher.organizationId)]);case 1:return null!=(e=n.sent())&&(this.cipher.organizationUseTotp=e.useTotp),[3,3];case 2:this.collections=[],n.label=3;case 3:return[2]}}))}))},e.prototype.checkPassword=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return null!=this.checkPasswordPromise||(null==this.cipher.login||null==this.cipher.login.password||""===this.cipher.login.password)?[2]:(this.checkPasswordPromise=this.auditService.passwordLeaked(this.cipher.login.password),[4,this.checkPasswordPromise]);case 1:return e=t.sent(),this.checkPasswordPromise=null,e>0?this.platformUtilsService.showToast("warning",null,this.i18nService.t("passwordExposed",e.toString())):this.platformUtilsService.showToast("success",null,this.i18nService.t("passwordSafe")),[2]}}))}))},e.prototype.repromptChanged=function(){this.reprompt=!this.reprompt,this.reprompt?this.cipher.reprompt=a.CipherRepromptType.Password:this.cipher.reprompt=a.CipherRepromptType.None},e.prototype.loadCollections=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.collectionService.getAllDecrypted()];case 1:return[2,e.sent().filter((function(e){return!e.readOnly}))]}}))}))},e.prototype.loadCipher=function(){return this.cipherService.get(this.cipherId)},e.prototype.encryptCipher=function(){return this.cipherService.encrypt(this.cipher)},e.prototype.saveCipher=function(e){return this.cipherService.saveWithServer(e)},e.prototype.deleteCipher=function(){return this.cipher.isDeleted?this.cipherService.deleteWithServer(this.cipher.id):this.cipherService.softDeleteWithServer(this.cipher.id)},e.prototype.restoreCipher=function(){return this.cipherService.restoreWithServer(this.cipher.id)},e.ɵfac=function(t){return new(t||e)(b.ɵɵdirectiveInject(S.CipherService),b.ɵɵdirectiveInject(w.FolderService),b.ɵɵdirectiveInject(C.I18nService),b.ɵɵdirectiveInject(I.PlatformUtilsService),b.ɵɵdirectiveInject(E.AuditService),b.ɵɵdirectiveInject(P.StateService),b.ɵɵdirectiveInject(k.UserService),b.ɵɵdirectiveInject(_.CollectionService),b.ɵɵdirectiveInject(A.MessagingService),b.ɵɵdirectiveInject(O.EventService),b.ɵɵdirectiveInject(M.PolicyService))},e.ɵdir=b.ɵɵdefineDirective({type:e,inputs:{cloneMode:"cloneMode",folderId:"folderId",cipherId:"cipherId",type:"type",collectionIds:"collectionIds",organizationId:"organizationId"},outputs:{onSavedCipher:"onSavedCipher",onDeletedCipher:"onDeletedCipher",onRestoredCipher:"onRestoredCipher",onCancelled:"onCancelled",onEditAttachments:"onEditAttachments",onShareCipher:"onShareCipher",onEditCollections:"onEditCollections",onGeneratePassword:"onGeneratePassword"}}),e}();t.AddEditComponent=T,("undefined"==typeof ngDevMode||ngDevMode)&&b.ɵsetClassMetadata(T,[{type:o.Directive}],(function(){return[{type:S.CipherService},{type:w.FolderService},{type:C.I18nService},{type:I.PlatformUtilsService},{type:E.AuditService},{type:P.StateService},{type:k.UserService},{type:_.CollectionService},{type:A.MessagingService},{type:O.EventService},{type:M.PolicyService}]}),{cloneMode:[{type:o.Input}],folderId:[{type:o.Input}],cipherId:[{type:o.Input}],type:[{type:o.Input}],collectionIds:[{type:o.Input}],organizationId:[{type:o.Input}],onSavedCipher:[{type:o.Output}],onDeletedCipher:[{type:o.Output}],onRestoredCipher:[{type:o.Output}],onCancelled:[{type:o.Output}],onEditAttachments:[{type:o.Output}],onShareCipher:[{type:o.Output}],onEditCollections:[{type:o.Output}],onGeneratePassword:[{type:o.Output}]})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AddEditCustomFieldsComponent=void 0;var r=n(0),i=n(323),o=(n(68),n(1),n(139),n(261)),a=n(40),s=n(196),l=n(131),c=n(0),p=n(1),u=n(68),d=function(){function e(e,t){this.i18nService=e,this.eventService=t,this.addFieldType=l.FieldType.Text,this.linkedFieldOptions=[],this.cipherType=a.CipherType,this.fieldType=l.FieldType,this.eventType=s.EventType,this.addFieldTypeOptions=[{name:e.t("cfTypeText"),value:l.FieldType.Text},{name:e.t("cfTypeHidden"),value:l.FieldType.Hidden},{name:e.t("cfTypeBoolean"),value:l.FieldType.Boolean}]}return e.prototype.addField=function(){null==this.cipher.fields&&(this.cipher.fields=[]);var e=new o.FieldView;e.type=this.addFieldType,e.newField=!0,this.cipher.fields.push(e)},e.prototype.removeField=function(e){var t=this.cipher.fields.indexOf(e);t>-1&&this.cipher.fields.splice(t,1)},e.prototype.toggleFieldValue=function(e){var t=e;t.showValue=!t.showValue,this.editMode&&t.showValue&&this.eventService.collect(s.EventType.Cipher_ClientToggledHiddenFieldVisible,this.cipher.id)},e.prototype.trackByFunction=function(e,t){return e},e.prototype.drop=function(e){i.moveItemInArray(this.cipher.fields,e.previousIndex,e.currentIndex)},e.ɵfac=function(t){return new(t||e)(c.ɵɵdirectiveInject(p.I18nService),c.ɵɵdirectiveInject(u.EventService))},e.ɵdir=c.ɵɵdefineDirective({type:e,inputs:{cipher:"cipher",editMode:"editMode"}}),e}();t.AddEditCustomFieldsComponent=d,("undefined"==typeof ngDevMode||ngDevMode)&&c.ɵsetClassMetadata(d,[{type:r.Directive}],(function(){return[{type:p.I18nService},{type:u.EventService}]}),{cipher:[{type:r.Input}],editMode:[{type:r.Input}]})},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]-1})),[2]}}))}))},e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:if(e=this.collections.filter((function(e){return!!e.checked})).map((function(e){return e.id})),!this.allowSelectNone&&0===e.length)return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("selectOneCollection")),[2];this.cipherDomain.collectionIds=e,t.label=1;case 1:return t.trys.push([1,3,,4]),this.formPromise=this.saveCollections(),[4,this.formPromise];case 2:return t.sent(),this.onSavedCollections.emit(),this.platformUtilsService.showToast("success",null,this.i18nService.t("editedItem")),[3,4];case 3:return t.sent(),[3,4];case 4:return[2]}}))}))},e.prototype.loadCipher=function(){return this.cipherService.get(this.cipherId)},e.prototype.loadCipherCollections=function(){return this.cipherDomain.collectionIds},e.prototype.loadCollections=function(){return r(this,void 0,void 0,(function(){var e=this;return i(this,(function(t){switch(t.label){case 0:return[4,this.collectionService.getAllDecrypted()];case 1:return[2,t.sent().filter((function(t){return!t.readOnly&&t.organizationId===e.cipher.organizationId}))]}}))}))},e.prototype.saveCollections=function(){return this.cipherService.saveCollectionsWithServer(this.cipherDomain)},e.ɵfac=function(t){return new(t||e)(a.ɵɵdirectiveInject(s.CollectionService),a.ɵɵdirectiveInject(l.PlatformUtilsService),a.ɵɵdirectiveInject(c.I18nService),a.ɵɵdirectiveInject(p.CipherService))},e.ɵdir=a.ɵɵdefineDirective({type:e,inputs:{cipherId:"cipherId",allowSelectNone:"allowSelectNone"},outputs:{onSavedCollections:"onSavedCollections"}}),e}();t.CollectionsComponent=u,("undefined"==typeof ngDevMode||ngDevMode)&&a.ɵsetClassMetadata(u,[{type:o.Directive}],(function(){return[{type:s.CollectionService},{type:l.PlatformUtilsService},{type:c.I18nService},{type:p.CipherService}]}),{cipherId:[{type:o.Input}],allowSelectNone:[{type:o.Input}],onSavedCollections:[{type:o.Output}]})},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]524288e3)return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("maxFileSize")),[2]}null!=this.password&&""===this.password.trim()&&(this.password=null),this.formPromise=this.encryptSend(e).then((function(e){return r(o,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.sendService.saveWithServer(e)];case 1:return n.sent(),null==this.send.id&&(this.send.id=e[0].id),null==this.send.accessId&&(this.send.accessId=e[0].accessId),this.onSavedSend.emit(this.send),this.copyLink&&null!=this.link?[4,this.copyLinkToClipboard(this.link)]:[3,6];case 2:return null==(t=n.sent())||t?(this.platformUtilsService.showToast("success",null,this.i18nService.t(this.editMode?"editedSend":"createdSend")),[3,6]):[3,3];case 3:return[4,this.platformUtilsService.showDialog(this.i18nService.t(this.editMode?"editedSend":"createdSend"),null,this.i18nService.t("ok"),null,"success",null)];case 4:return n.sent(),[4,this.copyLinkToClipboard(this.link)];case 5:n.sent(),n.label=6;case 6:return[2]}}))}))})),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.formPromise];case 2:return a.sent(),[2,!0];case 3:return a.sent(),[3,4];case 4:return[2,!1]}}))}))},e.prototype.copyLinkToClipboard=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){return[2,Promise.resolve(this.platformUtilsService.copyToClipboard(e))]}))}))},e.prototype.delete=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return null!=this.deletePromise?[2,!1]:[4,this.platformUtilsService.showDialog(this.i18nService.t("deleteSendConfirmation"),this.i18nService.t("deleteSend"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")];case 1:if(!e.sent())return[2,!1];e.label=2;case 2:return e.trys.push([2,5,,6]),this.deletePromise=this.sendService.deleteWithServer(this.send.id),[4,this.deletePromise];case 3:return e.sent(),this.platformUtilsService.showToast("success",null,this.i18nService.t("deletedSend")),[4,this.load()];case 4:return e.sent(),this.onDeletedSend.emit(this.send),[2,!0];case 5:return e.sent(),[3,6];case 6:return[2,!1]}}))}))},e.prototype.typeChanged=function(){this.send.type!==s.SendType.File||this.alertShown||(this.canAccessPremium?this.emailVerified||(this.alertShown=!0,this.messagingService.send("emailVerificationRequired")):(this.alertShown=!0,this.messagingService.send("premiumRequired")))},e.prototype.toggleOptions=function(){this.showOptions=!this.showOptions},e.prototype.loadSend=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){return[2,this.sendService.get(this.sendId)]}))}))},e.prototype.encryptSend=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.sendService.encrypt(this.send,e,this.password,null)];case 1:t=n.sent();try{t[0].deletionDate=null==this.deletionDate?null:new Date(this.deletionDate)}catch(r){t[0].deletionDate=null}try{t[0].expirationDate=null==this.expirationDate?null:new Date(this.expirationDate)}catch(i){t[0].expirationDate=null}return[2,t]}}))}))},e.prototype.togglePasswordVisible=function(){this.showPassword=!this.showPassword,document.getElementById("password").focus()},e.ɵfac=function(t){return new(t||e)(u.ɵɵdirectiveInject(d.I18nService),u.ɵɵdirectiveInject(m.PlatformUtilsService),u.ɵɵdirectiveInject(f.EnvironmentService),u.ɵɵdirectiveInject(h.DatePipe),u.ɵɵdirectiveInject(v.SendService),u.ɵɵdirectiveInject(y.UserService),u.ɵɵdirectiveInject(g.MessagingService),u.ɵɵdirectiveInject(x.PolicyService))},e.ɵdir=u.ɵɵdefineDirective({type:e,inputs:{sendId:"sendId",type:"type"},outputs:{onSavedSend:"onSavedSend",onDeletedSend:"onDeletedSend",onCancelled:"onCancelled"}}),e}();t.AddEditComponent=b,("undefined"==typeof ngDevMode||ngDevMode)&&u.ɵsetClassMetadata(b,[{type:o.Directive}],(function(){return[{type:d.I18nService},{type:m.PlatformUtilsService},{type:f.EnvironmentService},{type:h.DatePipe},{type:v.SendService},{type:y.UserService},{type:g.MessagingService},{type:x.PolicyService}]}),{sendId:[{type:o.Input}],type:[{type:o.Input}],onSavedSend:[{type:o.Output}],onDeletedSend:[{type:o.Output}],onCancelled:[{type:o.Output}]})},function(e,t,n){"use strict";var r=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0||t.value===e.CUSTOM_VALUE)&&null!=t.value})),this.validatorChange(),o.label=3;case 3:return this.form.valueChanges.subscribe((function(e){return r(n,void 0,void 0,(function(){return i(this,(function(t){return this.onChange(this.getVaultTimeout(e)),[2]}))}))})),this.form.get("vaultTimeout").valueChanges.subscribe((function(t){if(t===e.CUSTOM_VALUE){var r=Math.max(n.form.value.vaultTimeout,0);n.form.patchValue({custom:{hours:Math.floor(r/60),minutes:r%60}})}})),[2]}}))}))},e.prototype.ngOnChanges=function(){this.vaultTimeouts.push({name:this.i18nService.t("custom"),value:e.CUSTOM_VALUE})},e.prototype.getVaultTimeout=function(t){return t.vaultTimeout!==e.CUSTOM_VALUE?t.vaultTimeout:60*t.custom.hours+t.custom.minutes},e.prototype.writeValue=function(t){null!=t&&(this.vaultTimeouts.every((function(e){return e.value!==t}))?this.form.setValue({vaultTimeout:e.CUSTOM_VALUE,custom:{hours:Math.floor(t/60),minutes:t%60}}):this.form.patchValue({vaultTimeout:t}))},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){},e.prototype.setDisabledState=function(e){},e.prototype.validate=function(e){var t,n;return this.vaultTimeoutPolicy&&(null===(n=null===(t=this.vaultTimeoutPolicy)||void 0===t?void 0:t.data)||void 0===n?void 0:n.minutes)0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&(this.organizationId=this.organizations[0].id),this.filterCollections(),[2]}}))}))},e.prototype.filterCollections=function(){var e=this;this.writeableCollections.forEach((function(e){return e.checked=!1})),null==this.organizationId||0===this.writeableCollections.length?this.collections=[]:this.collections=this.writeableCollections.filter((function(t){return t.organizationId===e.organizationId}))},e.prototype.submit=function(){var e,t;return r(this,void 0,void 0,(function(){var n,o,a,s=this;return i(this,(function(l){switch(l.label){case 0:return 0===(n=this.collections.filter((function(e){return!!e.checked})).map((function(e){return e.id}))).length?(this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("selectOneCollection")),[2]):[4,this.cipherService.get(this.cipherId)];case 1:return[4,l.sent().decrypt()];case 2:o=l.sent(),a=null!==(t=null===(e=this.organizations.find((function(e){return e.id===s.organizationId})))||void 0===e?void 0:e.name)&&void 0!==t?t:this.i18nService.t("organization"),l.label=3;case 3:return l.trys.push([3,5,,6]),this.formPromise=this.cipherService.shareWithServer(o,this.organizationId,n).then((function(){return r(s,void 0,void 0,(function(){return i(this,(function(e){return this.onSharedCipher.emit(),this.platformUtilsService.showToast("success",null,this.i18nService.t("movedItemToOrg",o.name,a)),[2]}))}))})),[4,this.formPromise];case 4:return l.sent(),[2,!0];case 5:return l.sent(),[3,6];case 6:return[2,!1]}}))}))},Object.defineProperty(e.prototype,"canSave",{get:function(){if(null!=this.collections)for(var e=0;e0){var n=this.formEls[0];if("input"===n.tagName.toLowerCase()){var r=n;if(null!=r.type&&"checkbox"===r.type.toLowerCase())return void r.click()}n.focus()}},e.ɵfac=function(t){return new(t||e)(i.ɵɵdirectiveInject(i.ElementRef))},e.ɵdir=i.ɵɵdefineDirective({type:e,selectors:[["","appBoxRow",""]],hostBindings:function(e,t){1&e&&i.ɵɵlistener("click",(function(e){return t.onClick(e)}))}}),e}();t.BoxRowDirective=o,("undefined"==typeof ngDevMode||ngDevMode)&&i.ɵsetClassMetadata(o,[{type:r.Directive,args:[{selector:"[appBoxRow]"}]}],(function(){return[{type:i.ElementRef}]}),{onClick:[{type:r.HostListener,args:["click",["$event"]]}]})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SearchCiphersPipe=void 0;var r=n(0),i=n(0),o=function(){function e(){}return e.prototype.transform=function(e,t,n){return void 0===n&&(n=!1),null==e||0===e.length?[]:null==t||t.length<2?e.filter((function(e){return n!==e.isDeleted})):(t=t.trim().toLowerCase(),e.filter((function(e){return n===e.isDeleted&&(null!=e.name&&e.name.toLowerCase().indexOf(t)>-1||(!!(t.length>=8&&e.id.startsWith(t))||(null!=e.subTitle&&e.subTitle.toLowerCase().indexOf(t)>-1||!!(e.login&&null!=e.login.uri&&e.login.uri.toLowerCase().indexOf(t)>-1))))})))},e.ɵfac=function(t){return new(t||e)},e.ɵpipe=i.ɵɵdefinePipe({name:"searchCiphers",type:e,pure:!0}),e}();t.SearchCiphersPipe=o,("undefined"==typeof ngDevMode||ngDevMode)&&i.ɵsetClassMetadata(o,[{type:r.Pipe,args:[{name:"searchCiphers"}]}],null,null)},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AppComponent=void 0;var o=n(0),a=n(1121),s=n(671),l=n(672),c=n(0),p=n(10),u=n(7),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.ngOnInit=function(){e.prototype.ngOnInit.call(this),this.policyListService.addPolicies([new l.MaximumVaultTimeoutPolicy,new s.DisablePersonalVaultExportPolicy])},t.ɵfac=function(e){return m(e||t)},t.ɵcmp=c.ɵɵdefineComponent({type:t,selectors:[["app-root"]],features:[c.ɵɵInheritDefinitionFeature],decls:4,vars:1,consts:[["aria-live","polite",3,"toasterconfig"]],template:function(e,t){1&e&&(c.ɵɵelement(0,"toaster-container",0),c.ɵɵtext(1," "),c.ɵɵelement(2,"router-outlet"),c.ɵɵtext(3," ")),2&e&&c.ɵɵproperty("toasterconfig",t.toasterConfig)},directives:[p.ToasterContainerComponent,u.RouterOutlet],encapsulation:2}),t}(a.AppComponent);t.AppComponent=d;var m=c.ɵɵgetInheritedFactory(d);("undefined"==typeof ngDevMode||ngDevMode)&&c.ɵsetClassMetadata(d,[{type:o.Component,args:[{selector:"app-root",templateUrl:"../../../src/app/app.component.html"}]}],null,null)},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]"})),n.body=r,n.bodyOutputType=s.BodyOutputType.TrustedHtml}null!=e.options&&(!0===e.options.trustedHtml&&(n.bodyOutputType=s.BodyOutputType.TrustedHtml),null!=e.options.timeout&&e.options.timeout>0&&(n.timeout=e.options.timeout)),this.toasterService.popAsync(n)},e.prototype.idleStateChanged=function(){this.isIdle?this.notificationsService.disconnectFromInactivity():this.notificationsService.reconnectFromActivity()},e.prototype.setFullWidth=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.storageService.get("enableFullWidth")];case 1:return e.sent()?document.body.classList.add("full-width"):document.body.classList.remove("full-width"),[2]}}))}))},e.ɵfac=function(t){return new(t||e)(b.ɵɵdirectiveInject(S.BroadcasterService),b.ɵɵdirectiveInject(w.UserService),b.ɵɵdirectiveInject(C.TokenService),b.ɵɵdirectiveInject(I.FolderService),b.ɵɵdirectiveInject(E.SettingsService),b.ɵɵdirectiveInject(P.SyncService),b.ɵɵdirectiveInject(k.PasswordGenerationService),b.ɵɵdirectiveInject(_.CipherService),b.ɵɵdirectiveInject(A.AuthService),b.ɵɵdirectiveInject(O.Router),b.ɵɵdirectiveInject(M.ToasterService),b.ɵɵdirectiveInject(T.I18nService),b.ɵɵdirectiveInject(D.PlatformUtilsService),b.ɵɵdirectiveInject(b.NgZone),b.ɵɵdirectiveInject(R.VaultTimeoutService),b.ɵɵdirectiveInject(B.StorageService),b.ɵɵdirectiveInject(U.CryptoService),b.ɵɵdirectiveInject(j.CollectionService),b.ɵɵdirectiveInject(V.DomSanitizer),b.ɵɵdirectiveInject(F.SearchService),b.ɵɵdirectiveInject(N.NotificationsService),b.ɵɵdirectiveInject(z.RouterService),b.ɵɵdirectiveInject(L.StateService),b.ɵɵdirectiveInject(K.EventService),b.ɵɵdirectiveInject(G.PolicyService),b.ɵɵdirectiveInject(q.PolicyListService))},e.ɵcmp=b.ɵɵdefineComponent({type:e,selectors:[["app-root"]],decls:4,vars:1,consts:[["aria-live","polite",3,"toasterconfig"]],template:function(e,t){1&e&&(b.ɵɵelement(0,"toaster-container",0),b.ɵɵtext(1," "),b.ɵɵelement(2,"router-outlet"),b.ɵɵtext(3," ")),2&e&&b.ɵɵproperty("toasterconfig",t.toasterConfig)},directives:[M.ToasterContainerComponent,O.RouterOutlet],encapsulation:2}),e}();t.AppComponent=H,("undefined"==typeof ngDevMode||ngDevMode)&&b.ɵsetClassMetadata(H,[{type:l.Component,args:[{selector:"app-root",templateUrl:"app.component.html"}]}],(function(){return[{type:S.BroadcasterService},{type:w.UserService},{type:C.TokenService},{type:I.FolderService},{type:E.SettingsService},{type:P.SyncService},{type:k.PasswordGenerationService},{type:_.CipherService},{type:A.AuthService},{type:O.Router},{type:M.ToasterService},{type:T.I18nService},{type:D.PlatformUtilsService},{type:b.NgZone},{type:R.VaultTimeoutService},{type:B.StorageService},{type:U.CryptoService},{type:j.CollectionService},{type:V.DomSanitizer},{type:F.SearchService},{type:N.NotificationsService},{type:z.RouterService},{type:L.StateService},{type:K.EventService},{type:G.PolicyService},{type:q.PolicyListService}]}),null)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationsModule=void 0;var r=n(2),i=n(0),o=n(11),a=n(381),s=n(673),l=n(1124),c=n(0),p=function(){function e(){}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=c.ɵɵdefineNgModule({type:e}),e.ɵinj=c.ɵɵdefineInjector({imports:[[r.CommonModule,o.FormsModule,o.ReactiveFormsModule,a.OssModule,l.OrganizationsRoutingModule]]}),e}();t.OrganizationsModule=p,("undefined"==typeof ngJitMode||ngJitMode)&&c.ɵɵsetNgModuleScope(p,{declarations:[s.SsoComponent],imports:[r.CommonModule,o.FormsModule,o.ReactiveFormsModule,a.OssModule,l.OrganizationsRoutingModule]}),("undefined"==typeof ngDevMode||ngDevMode)&&c.ɵsetClassMetadata(p,[{type:i.NgModule,args:[{imports:[r.CommonModule,o.FormsModule,o.ReactiveFormsModule,a.OssModule,l.OrganizationsRoutingModule],declarations:[s.SsoComponent]}]}],null,null)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationSsoRequest=void 0;var r=function(){this.enabled=!1};t.OrganizationSsoRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationsRoutingModule=void 0;var r=n(0),i=n(7),o=n(296),a=n(250),s=n(382),l=n(387),c=n(428),p=n(429),u=n(673),d=n(0),m=n(7),f=[{path:"organizations/:organizationId",component:s.OrganizationLayoutComponent,canActivate:[o.AuthGuardService,c.OrganizationGuardService],children:[{path:"manage",component:l.ManageComponent,canActivate:[p.OrganizationTypeGuardService],data:{permissions:[a.Permissions.CreateNewCollections,a.Permissions.EditAnyCollection,a.Permissions.DeleteAnyCollection,a.Permissions.EditAssignedCollections,a.Permissions.DeleteAssignedCollections,a.Permissions.AccessEventLogs,a.Permissions.ManageGroups,a.Permissions.ManageUsers,a.Permissions.ManagePolicies,a.Permissions.ManageSso]},children:[{path:"sso",component:u.SsoComponent}]}]}],h=function(){function e(){}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=d.ɵɵdefineNgModule({type:e}),e.ɵinj=d.ɵɵdefineInjector({imports:[[i.RouterModule.forChild(f)],i.RouterModule]}),e}();t.OrganizationsRoutingModule=h,("undefined"==typeof ngJitMode||ngJitMode)&&d.ɵɵsetNgModuleScope(h,{imports:[m.RouterModule],exports:[i.RouterModule]}),("undefined"==typeof ngDevMode||ngDevMode)&&d.ɵsetClassMetadata(h,[{type:r.NgModule,args:[{imports:[i.RouterModule.forChild(f)],exports:[i.RouterModule]}]}],null,null)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OssRoutingModule=void 0;var r=n(0),i=n(7),o=n(379),a=n(382),s=n(533),l=n(534),c=n(535),p=n(536),u=n(537),d=n(538),m=n(540),f=n(541),h=n(542),v=n(543),y=n(544),g=n(547),x=n(549),b=n(551),S=n(552),w=n(555),C=n(556),I=n(558),E=n(387),P=n(559),k=n(563),_=n(565),A=n(570),O=n(571),M=n(572),T=n(573),D=n(579),R=n(580),B=n(600),U=n(601),j=n(602),V=n(603),F=n(604),N=n(605),z=n(610),L=n(616),K=n(620),G=n(621),q=n(635),W=n(636),H=n(648),$=n(316),Q=n(650),Y=n(651),J=n(396),X=n(390),Z=n(653),ee=n(655),te=n(397),ne=n(398),re=n(407),ie=n(409),oe=n(657),ae=n(410),se=n(658),le=n(411),ce=n(412),pe=n(661),ue=n(428),de=n(429),me=n(296),fe=n(674),he=n(675),ve=n(250),ye=n(642),ge=n(644),xe=n(0),be=n(7),Se=[{path:"",component:o.FrontendLayoutComponent,children:[{path:"",pathMatch:"full",component:d.LoginComponent,canActivate:[he.UnauthGuardService]},{path:"2fa",component:g.TwoFactorComponent,canActivate:[he.UnauthGuardService]},{path:"register",component:h.RegisterComponent,canActivate:[he.UnauthGuardService],data:{titleId:"createAccount"}},{path:"sso",component:y.SsoComponent,canActivate:[he.UnauthGuardService],data:{titleId:"enterpriseSingleSignOn"}},{path:"set-password",component:v.SetPasswordComponent,data:{titleId:"setMasterPassword"}},{path:"hint",component:p.HintComponent,canActivate:[he.UnauthGuardService],data:{titleId:"passwordHint"}},{path:"lock",component:u.LockComponent,canActivate:[fe.LockGuardService]},{path:"verify-email",component:b.VerifyEmailTokenComponent},{path:"accept-organization",component:c.AcceptOrganizationComponent,data:{titleId:"joinOrganization"}},{path:"accept-emergency",component:l.AcceptEmergencyComponent,data:{titleId:"acceptEmergency"}},{path:"recover",pathMatch:"full",redirectTo:"recover-2fa"},{path:"recover-2fa",component:f.RecoverTwoFactorComponent,canActivate:[he.UnauthGuardService],data:{titleId:"recoverAccountTwoStep"}},{path:"recover-delete",component:m.RecoverDeleteComponent,canActivate:[he.UnauthGuardService],data:{titleId:"deleteAccount"}},{path:"verify-recover-delete",component:S.VerifyRecoverDeleteComponent,canActivate:[he.UnauthGuardService],data:{titleId:"deleteAccount"}},{path:"send/:sendId/:key",component:L.AccessComponent,data:{title:"Bitwarden Send"}},{path:"update-temp-password",component:x.UpdateTempPasswordComponent,canActivate:[me.AuthGuardService],data:{titleId:"updateTempPassword"}}]},{path:"",component:s.UserLayoutComponent,canActivate:[me.AuthGuardService],children:[{path:"vault",component:pe.VaultComponent,data:{titleId:"myVault"}},{path:"sends",component:K.SendComponent,data:{title:"Send"}},{path:"settings",component:Y.SettingsComponent,children:[{path:"",pathMatch:"full",redirectTo:"account"},{path:"account",component:G.AccountComponent,data:{titleId:"myAccount"}},{path:"options",component:H.OptionsComponent,data:{titleId:"options"}},{path:"domain-rules",component:W.DomainRulesComponent,data:{titleId:"domainRules"}},{path:"two-factor",component:J.TwoFactorSetupComponent,data:{titleId:"twoStepLogin"}},{path:"premium",component:Q.PremiumComponent,data:{titleId:"goPremium"}},{path:"billing",component:X.UserBillingComponent,data:{titleId:"billing"}},{path:"subscription",component:Z.UserSubscriptionComponent,data:{titleId:"premiumMembership"}},{path:"organizations",component:$.OrganizationsComponent,data:{titleId:"organizations"}},{path:"create-organization",component:q.CreateOrganizationComponent,data:{titleId:"newOrganization"}},{path:"emergency-access",children:[{path:"",component:ge.EmergencyAccessComponent,data:{titleId:"emergencyAccess"}},{path:":id",component:ye.EmergencyAccessViewComponent,data:{titleId:"emergencyAccess"}}]}]},{path:"tools",component:se.ToolsComponent,canActivate:[me.AuthGuardService],children:[{path:"",pathMatch:"full",redirectTo:"generator"},{path:"import",component:re.ImportComponent,data:{titleId:"importData"}},{path:"export",component:te.ExportComponent,data:{titleId:"exportVault"}},{path:"generator",component:oe.PasswordGeneratorComponent,data:{titleId:"passwordGenerator"}},{path:"breach-report",component:ee.BreachReportComponent,data:{titleId:"dataBreachReport"}},{path:"reused-passwords-report",component:ae.ReusedPasswordsReportComponent,data:{titleId:"reusedPasswordsReport"}},{path:"unsecured-websites-report",component:le.UnsecuredWebsitesReportComponent,data:{titleId:"unsecuredWebsitesReport"}},{path:"weak-passwords-report",component:ce.WeakPasswordsReportComponent,data:{titleId:"weakPasswordsReport"}},{path:"exposed-passwords-report",component:ne.ExposedPasswordsReportComponent,data:{titleId:"exposedPasswordsReport"}},{path:"inactive-two-factor-report",component:ie.InactiveTwoFactorReportComponent,data:{titleId:"inactive2faReport"}}]}]},{path:"organizations/:organizationId",component:a.OrganizationLayoutComponent,canActivate:[me.AuthGuardService,ue.OrganizationGuardService],children:[{path:"",pathMatch:"full",redirectTo:"vault"},{path:"vault",component:z.VaultComponent,data:{titleId:"vault"}},{path:"tools",component:V.ToolsComponent,canActivate:[de.OrganizationTypeGuardService],data:{permissions:[ve.Permissions.AccessImportExport,ve.Permissions.AccessReports]},children:[{path:"",pathMatch:"full",redirectTo:"import"},{path:"import",component:B.ImportComponent,canActivate:[de.OrganizationTypeGuardService],data:{titleId:"importData",permissions:[ve.Permissions.AccessImportExport]}},{path:"export",component:D.ExportComponent,canActivate:[de.OrganizationTypeGuardService],data:{titleId:"exportVault",permissions:[ve.Permissions.AccessImportExport]}},{path:"exposed-passwords-report",component:R.ExposedPasswordsReportComponent,canActivate:[de.OrganizationTypeGuardService],data:{titleId:"exposedPasswordsReport",permissions:[ve.Permissions.AccessReports]}},{path:"inactive-two-factor-report",component:U.InactiveTwoFactorReportComponent,canActivate:[de.OrganizationTypeGuardService],data:{titleId:"inactive2faReport",permissions:[ve.Permissions.AccessReports]}},{path:"reused-passwords-report",component:j.ReusedPasswordsReportComponent,canActivate:[de.OrganizationTypeGuardService],data:{titleId:"reusedPasswordsReport",permissions:[ve.Permissions.AccessReports]}},{path:"unsecured-websites-report",component:F.UnsecuredWebsitesReportComponent,canActivate:[de.OrganizationTypeGuardService],data:{titleId:"unsecuredWebsitesReport",permissions:[ve.Permissions.AccessReports]}},{path:"weak-passwords-report",component:N.WeakPasswordsReportComponent,canActivate:[de.OrganizationTypeGuardService],data:{titleId:"weakPasswordsReport",permissions:[ve.Permissions.AccessReports]}}]},{path:"manage",component:E.ManageComponent,canActivate:[de.OrganizationTypeGuardService],data:{permissions:[ve.Permissions.CreateNewCollections,ve.Permissions.EditAnyCollection,ve.Permissions.DeleteAnyCollection,ve.Permissions.EditAssignedCollections,ve.Permissions.DeleteAssignedCollections,ve.Permissions.AccessEventLogs,ve.Permissions.ManageGroups,ve.Permissions.ManageUsers,ve.Permissions.ManagePolicies]},children:[{path:"",pathMatch:"full",redirectTo:"people"},{path:"collections",component:w.CollectionsComponent,canActivate:[de.OrganizationTypeGuardService],data:{titleId:"collections",permissions:[ve.Permissions.CreateNewCollections,ve.Permissions.EditAnyCollection,ve.Permissions.DeleteAnyCollection,ve.Permissions.EditAssignedCollections,ve.Permissions.DeleteAssignedCollections]}},{path:"events",component:C.EventsComponent,canActivate:[de.OrganizationTypeGuardService],data:{titleId:"eventLogs",permissions:[ve.Permissions.AccessEventLogs]}},{path:"groups",component:I.GroupsComponent,canActivate:[de.OrganizationTypeGuardService],data:{titleId:"groups",permissions:[ve.Permissions.ManageGroups]}},{path:"people",component:P.PeopleComponent,canActivate:[de.OrganizationTypeGuardService],data:{titleId:"people",permissions:[ve.Permissions.ManageUsers,ve.Permissions.ManageUsersPassword]}},{path:"policies",component:k.PoliciesComponent,canActivate:[de.OrganizationTypeGuardService],data:{titleId:"policies",permissions:[ve.Permissions.ManagePolicies]}}]},{path:"settings",component:M.SettingsComponent,canActivate:[de.OrganizationTypeGuardService],data:{permissions:[ve.Permissions.ManageOrganization]},children:[{path:"",pathMatch:"full",redirectTo:"account"},{path:"account",component:_.AccountComponent,data:{titleId:"myOrganization"}},{path:"two-factor",component:T.TwoFactorSetupComponent,data:{titleId:"twoStepLogin"}},{path:"billing",component:A.OrganizationBillingComponent,data:{titleId:"billing"}},{path:"subscription",component:O.OrganizationSubscriptionComponent,data:{titleId:"subscription"}}]}]}],we=function(){function e(){}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=xe.ɵɵdefineNgModule({type:e}),e.ɵinj=xe.ɵɵdefineInjector({imports:[[i.RouterModule.forRoot(Se,{useHash:!0,paramsInheritanceStrategy:"always"})],i.RouterModule]}),e}();t.OssRoutingModule=we,("undefined"==typeof ngJitMode||ngJitMode)&&xe.ɵɵsetNgModuleScope(we,{imports:[be.RouterModule],exports:[i.RouterModule]}),("undefined"==typeof ngDevMode||ngDevMode)&&xe.ɵsetClassMetadata(we,[{type:r.NgModule,args:[{imports:[i.RouterModule.forRoot(Se,{useHash:!0,paramsInheritanceStrategy:"always"})],exports:[i.RouterModule]}]}],null,null)},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=0?this.browserCache=a.DeviceType.OperaBrowser:-1!==navigator.userAgent.indexOf(" Edg/")?this.browserCache=a.DeviceType.EdgeBrowser:-1!==navigator.userAgent.indexOf(" Vivaldi/")?this.browserCache=a.DeviceType.VivaldiBrowser:-1!==navigator.userAgent.indexOf(" Safari/")&&-1===navigator.userAgent.indexOf("Chrome")?this.browserCache=a.DeviceType.SafariBrowser:window.chrome&&-1!==navigator.userAgent.indexOf(" Chrome/")?this.browserCache=a.DeviceType.ChromeBrowser:-1!==navigator.userAgent.indexOf(" Trident/")?this.browserCache=a.DeviceType.IEBrowser:this.browserCache=a.DeviceType.UnknownBrowser),this.browserCache},e.prototype.getDeviceString=function(){return a.DeviceType[this.getDevice()].toLowerCase().replace("browser","")},e.prototype.isFirefox=function(){return this.getDevice()===a.DeviceType.FirefoxBrowser},e.prototype.isChrome=function(){return this.getDevice()===a.DeviceType.ChromeBrowser},e.prototype.isEdge=function(){return this.getDevice()===a.DeviceType.EdgeBrowser},e.prototype.isOpera=function(){return this.getDevice()===a.DeviceType.OperaBrowser},e.prototype.isVivaldi=function(){return this.getDevice()===a.DeviceType.VivaldiBrowser},e.prototype.isSafari=function(){return this.getDevice()===a.DeviceType.SafariBrowser},e.prototype.isIE=function(){return this.getDevice()===a.DeviceType.IEBrowser},e.prototype.isMacAppStore=function(){return!1},e.prototype.isViewOpen=function(){return Promise.resolve(!1)},e.prototype.launchUri=function(e,t){var n=document.createElement("a");n.href=e,null!=t&&t.sameWindow||(n.target="_blank",n.rel="noreferrer noopener"),n.classList.add("d-none"),document.body.appendChild(n),n.click(),document.body.removeChild(n)},e.prototype.saveFile=function(e,t,n,r){var i=null,o=null,a=r.toLowerCase(),s=!0;if(a.endsWith(".pdf")?(o="application/pdf",s=!1):a.endsWith(".xlsx")?o="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":a.endsWith(".docx")?o="application/vnd.openxmlformats-officedocument.wordprocessingml.document":a.endsWith(".pptx")?o="application/vnd.openxmlformats-officedocument.presentationml.presentation":a.endsWith(".csv")?o="text/csv":a.endsWith(".png")?o="image/png":a.endsWith(".jpg")||a.endsWith(".jpeg")?o="image/jpeg":a.endsWith(".gif")&&(o="image/gif"),null!=o&&null==(n=n||{}).type&&(n.type=o),i=null==n||this.isIE()?new Blob([t]):new Blob([t],n),navigator.msSaveOrOpenBlob)navigator.msSaveBlob(i,r);else{var l=e.document.createElement("a");s?l.download=r:this.isSafari()||(l.target="_blank"),l.href=URL.createObjectURL(i),l.style.position="fixed",e.document.body.appendChild(l),l.click(),e.document.body.removeChild(l)}},e.prototype.getApplicationVersion=function(){return Promise.resolve("2.24.4")},e.prototype.supportsWebAuthn=function(e){return"undefined"!=typeof PublicKeyCredential},e.prototype.supportsDuo=function(){return!0},e.prototype.showToast=function(e,t,n,r){this.messagingService.send("showToast",{text:n,title:t,type:e,options:r})},e.prototype.showDialog=function(e,t,n,a,s,l){return void 0===l&&(l=!1),r(this,void 0,void 0,(function(){var r,c,p,u;return i(this,(function(i){switch(i.label){case 0:if(r=null,null!=s)switch(s){case"success":r="fa-check text-success";break;case"warning":r="fa-warning text-warning";break;case"error":r="fa-bolt text-danger";break;case"info":r="fa-info-circle text-info"}return null!=(c=document.querySelector("div.modal"))&&c.removeAttribute("tabindex"),p=null!=r?'':void 0,[4,o.default.fire({heightAuto:!1,buttonsStyling:!1,icon:s,iconHtml:p,text:l?null:e,html:l?e:null,titleText:t,showCancelButton:null!=a,cancelButtonText:a,showConfirmButton:!0,confirmButtonText:null==n?this.i18nService.t("ok"):n})];case 1:return u=i.sent(),null!=c&&c.setAttribute("tabindex","-1"),[2,u.value]}}))}))},e.prototype.isDev=function(){return!1},e.prototype.isSelfHost=function(){return"selfhosted"==="cloud".toString()},e.prototype.copyToClipboard=function(e,t){var n=window,r=window.document;if(t&&(t.window||t.win)?r=(n=t.window||t.win).document:t&&t.doc&&(r=t.doc),n.clipboardData&&n.clipboardData.setData)n.clipboardData.setData("Text",e);else if(r.queryCommandSupported&&r.queryCommandSupported("copy")){var i=r.createElement("textarea");i.textContent=e,i.style.position="fixed";var o=r.body;r.body.classList.contains("modal-open")&&(o=r.body.querySelector(".modal")),o.appendChild(i),i.select();var a=!1;try{(a=r.execCommand("copy"))||this.logService.debug("Copy command unsupported or disabled.")}catch(s){console.warn("Copy to clipboard failed.",s)}finally{o.removeChild(i)}return a}},e.prototype.readFromClipboard=function(e){throw new Error("Cannot read from clipboard on web.")},e.prototype.supportsBiometric=function(){return Promise.resolve(!1)},e.prototype.authenticateBiometric=function(){return Promise.resolve(!1)},e.prototype.supportsSecureStorage=function(){return!1},e.prototype.getDefaultSystemTheme=function(){return Promise.resolve(this.prefersColorSchemeDark.matches?s.ThemeType.Dark:s.ThemeType.Light)},e.prototype.getEffectiveTheme=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,this.storageService().get(l.ConstantsService.themeKey)];case 1:return(e=t.sent())===s.ThemeType.Dark?[2,s.ThemeType.Dark]:e===s.ThemeType.System?[2,this.getDefaultSystemTheme()]:[2,s.ThemeType.Light]}}))}))},e.prototype.onDefaultSystemThemeChange=function(e){this.prefersColorSchemeDark.addEventListener("change",(function(t){var n=t.matches;e(n?s.ThemeType.Dark:s.ThemeType.Light)}))},e}();t.WebPlatformUtilsService=c},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]-1?"&":"?",e+="end="+n),null!=r&&(e+=e.indexOf("?")>-1?"&":"?",e+="continuationToken="+r),e},e.prototype.isJsonResponse=function(e){var t=e.headers.get("content-type");return null!=t&&t.indexOf("application/json")>-1},e.prototype.isTextResponse=function(e){var t=e.headers.get("content-type");return null!=t&&t.indexOf("text")>-1},e}();t.ApiService=ae},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ApiKeyResponse=void 0;var o=function(e){function t(t){var n=e.call(this,t)||this;return n.apiKey=n.getResponseProperty("ApiKey"),n}return i(t,e),t}(n(25).BaseResponse);t.ApiKeyResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AttachmentUploadDataResponse=void 0;var o=n(25),a=n(315),s=function(e){function t(t){var n=e.call(this,t)||this;n.url=null,n.attachmentId=n.getResponseProperty("AttachmentId"),n.fileUploadType=n.getResponseProperty("FileUploadType");var r=n.getResponseProperty("CipherResponse"),i=n.getResponseProperty("CipherMiniResponse");return n.cipherResponse=null==r?null:new a.CipherResponse(r),n.cipherMiniResponse=null==i?null:new a.CipherResponse(i),n.url=n.getResponseProperty("Url"),n}return i(t,e),t}(o.BaseResponse);t.AttachmentUploadDataResponse=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.BillingTransactionResponse=t.BillingInvoiceResponse=t.BillingSourceResponse=t.BillingResponse=void 0;var o=n(25),a=function(e){function t(t){var n=e.call(this,t)||this;n.invoices=[],n.transactions=[],n.balance=n.getResponseProperty("Balance");var r=n.getResponseProperty("PaymentSource"),i=n.getResponseProperty("Transactions"),o=n.getResponseProperty("Invoices");return n.paymentSource=null==r?null:new s(r),null!=i&&(n.transactions=i.map((function(e){return new c(e)}))),null!=o&&(n.invoices=o.map((function(e){return new l(e)}))),n}return i(t,e),t}(o.BaseResponse);t.BillingResponse=a;var s=function(e){function t(t){var n=e.call(this,t)||this;return n.type=n.getResponseProperty("Type"),n.cardBrand=n.getResponseProperty("CardBrand"),n.description=n.getResponseProperty("Description"),n.needsVerification=n.getResponseProperty("NeedsVerification"),n}return i(t,e),t}(o.BaseResponse);t.BillingSourceResponse=s;var l=function(e){function t(t){var n=e.call(this,t)||this;return n.url=n.getResponseProperty("Url"),n.pdfUrl=n.getResponseProperty("PdfUrl"),n.number=n.getResponseProperty("Number"),n.paid=n.getResponseProperty("Paid"),n.date=n.getResponseProperty("Date"),n.amount=n.getResponseProperty("Amount"),n}return i(t,e),t}(o.BaseResponse);t.BillingInvoiceResponse=l;var c=function(e){function t(t){var n=e.call(this,t)||this;return n.createdDate=n.getResponseProperty("CreatedDate"),n.amount=n.getResponseProperty("Amount"),n.refunded=n.getResponseProperty("Refunded"),n.partiallyRefunded=n.getResponseProperty("PartiallyRefunded"),n.refundedAmount=n.getResponseProperty("RefundedAmount"),n.type=n.getResponseProperty("Type"),n.paymentMethodType=n.getResponseProperty("PaymentMethodType"),n.details=n.getResponseProperty("Details"),n}return i(t,e),t}(o.BaseResponse);t.BillingTransactionResponse=c},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.BreachAccountResponse=void 0;var o=function(e){function t(t){var n=e.call(this,t)||this;return n.addedDate=n.getResponseProperty("AddedDate"),n.breachDate=n.getResponseProperty("BreachDate"),n.dataClasses=n.getResponseProperty("DataClasses"),n.description=n.getResponseProperty("Description"),n.domain=n.getResponseProperty("Domain"),n.isActive=n.getResponseProperty("IsActive"),n.isVerified=n.getResponseProperty("IsVerified"),n.logoPath=n.getResponseProperty("LogoPath"),n.modifiedDate=n.getResponseProperty("ModifiedDate"),n.name=n.getResponseProperty("Name"),n.pwnCount=n.getResponseProperty("PwnCount"),n.title=n.getResponseProperty("Title"),n}return i(t,e),t}(n(25).BaseResponse);t.BreachAccountResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalDomainResponse=void 0;var o=function(e){function t(t){var n=e.call(this,t)||this;return n.type=n.getResponseProperty("Type"),n.domains=n.getResponseProperty("Domains"),n.excluded=n.getResponseProperty("Excluded"),n}return i(t,e),t}(n(25).BaseResponse);t.GlobalDomainResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.EventResponse=void 0;var o=function(e){function t(t){var n=e.call(this,t)||this;return n.type=n.getResponseProperty("Type"),n.userId=n.getResponseProperty("UserId"),n.organizationId=n.getResponseProperty("OrganizationId"),n.providerId=n.getResponseProperty("ProviderId"),n.cipherId=n.getResponseProperty("CipherId"),n.collectionId=n.getResponseProperty("CollectionId"),n.groupId=n.getResponseProperty("GroupId"),n.policyId=n.getResponseProperty("PolicyId"),n.organizationUserId=n.getResponseProperty("OrganizationUserId"),n.providerUserId=n.getResponseProperty("ProviderUserId"),n.providerOrganizationId=n.getResponseProperty("ProviderOrganizationId"),n.actingUserId=n.getResponseProperty("ActingUserId"),n.date=n.getResponseProperty("Date"),n.deviceType=n.getResponseProperty("DeviceType"),n.ipAddress=n.getResponseProperty("IpAddress"),n}return i(t,e),t}(n(25).BaseResponse);t.EventResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.GroupDetailsResponse=t.GroupResponse=void 0;var o=n(25),a=n(317),s=function(e){function t(t){var n=e.call(this,t)||this;return n.id=n.getResponseProperty("Id"),n.organizationId=n.getResponseProperty("OrganizationId"),n.name=n.getResponseProperty("Name"),n.accessAll=n.getResponseProperty("AccessAll"),n.externalId=n.getResponseProperty("ExternalId"),n}return i(t,e),t}(o.BaseResponse);t.GroupResponse=s;var l=function(e){function t(t){var n=e.call(this,t)||this;n.collections=[];var r=n.getResponseProperty("Collections");return null!=r&&(n.collections=r.map((function(e){return new a.SelectionReadOnlyResponse(e)}))),n}return i(t,e),t}(s);t.GroupDetailsResponse=l},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.IdentityCaptchaResponse=void 0;var o=function(e){function t(t){var n=e.call(this,t)||this;return n.siteKey=n.getResponseProperty("HCaptcha_SiteKey"),n}return i(t,e),t}(n(25).BaseResponse);t.IdentityCaptchaResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.IdentityTokenResponse=void 0;var o=function(e){function t(t){var n=e.call(this,t)||this;return n.accessToken=t.access_token,n.expiresIn=t.expires_in,n.refreshToken=t.refresh_token,n.tokenType=t.token_type,n.resetMasterPassword=n.getResponseProperty("ResetMasterPassword"),n.privateKey=n.getResponseProperty("PrivateKey"),n.key=n.getResponseProperty("Key"),n.twoFactorToken=n.getResponseProperty("TwoFactorToken"),n.kdf=n.getResponseProperty("Kdf"),n.kdfIterations=n.getResponseProperty("KdfIterations"),n.forcePasswordReset=n.getResponseProperty("ForcePasswordReset"),n}return i(t,e),t}(n(25).BaseResponse);t.IdentityTokenResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.IdentityTwoFactorResponse=void 0;var o=function(e){function t(t){var n=e.call(this,t)||this;n.twoFactorProviders2=new Map,n.captchaToken=n.getResponseProperty("CaptchaBypassToken"),n.twoFactorProviders=n.getResponseProperty("TwoFactorProviders");var r=n.getResponseProperty("TwoFactorProviders2");if(null!=r)for(var i in r)r.hasOwnProperty(i)&&n.twoFactorProviders2.set(parseInt(i,null),r[i]);return n}return i(t,e),t}(n(25).BaseResponse);t.IdentityTwoFactorResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ListResponse=void 0;var o=function(e){function t(t,n){var r=e.call(this,t)||this,i=r.getResponseProperty("Data");return r.data=null==i?[]:i.map((function(e){return new n(e)})),r.continuationToken=r.getResponseProperty("ContinuationToken"),r}return i(t,e),t}(n(25).BaseResponse);t.ListResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationSsoResponse=void 0;var o=n(1148),a=n(25),s=function(e){function t(t){var n=e.call(this,t)||this;return n.enabled=n.getResponseProperty("Enabled"),n.data=new o.SsoConfigApi(n.getResponseProperty("Data")),n.urls=new l(n.getResponseProperty("Urls")),n}return i(t,e),t}(a.BaseResponse);t.OrganizationSsoResponse=s;var l=function(e){function t(t){var n=e.call(this,t)||this;return n.callbackPath=n.getResponseProperty("CallbackPath"),n.signedOutCallbackPath=n.getResponseProperty("SignedOutCallbackPath"),n.spEntityId=n.getResponseProperty("SpEntityId"),n.spMetadataUrl=n.getResponseProperty("SpMetadataUrl"),n.spAcsUrl=n.getResponseProperty("SpAcsUrl"),n}return i(t,e),t}(a.BaseResponse)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.SsoConfigApi=void 0;var o,a,s,l,c,p=n(25);!function(e){e[e.OpenIdConnect=1]="OpenIdConnect",e[e.Saml2=2]="Saml2"}(o||(o={})),function(e){e[e.RedirectGet=0]="RedirectGet",e[e.FormPost=1]="FormPost"}(a||(a={})),function(e){e[e.HttpRedirect=1]="HttpRedirect",e[e.HttpPost=2]="HttpPost",e[e.Artifact=4]="Artifact"}(s||(s={})),function(e){e[e.NotConfigured=0]="NotConfigured",e[e.Unspecified=1]="Unspecified",e[e.EmailAddress=2]="EmailAddress",e[e.X509SubjectName=3]="X509SubjectName",e[e.WindowsDomainQualifiedName=4]="WindowsDomainQualifiedName",e[e.KerberosPrincipalName=5]="KerberosPrincipalName",e[e.EntityIdentifier=6]="EntityIdentifier",e[e.Persistent=7]="Persistent",e[e.Transient=8]="Transient"}(l||(l={})),function(e){e[e.IfIdpWantAuthnRequestsSigned=0]="IfIdpWantAuthnRequestsSigned",e[e.Always=1]="Always",e[e.Never=3]="Never"}(c||(c={}));var u=function(e){function t(t){void 0===t&&(t=null);var n=e.call(this,t)||this;return null==t||(n.configType=n.getResponseProperty("ConfigType"),n.authority=n.getResponseProperty("Authority"),n.clientId=n.getResponseProperty("ClientId"),n.clientSecret=n.getResponseProperty("ClientSecret"),n.metadataAddress=n.getResponseProperty("MetadataAddress"),n.redirectBehavior=n.getResponseProperty("RedirectBehavior"),n.getClaimsFromUserInfoEndpoint=n.getResponseProperty("GetClaimsFromUserInfoEndpoint"),n.additionalScopes=n.getResponseProperty("AdditionalScopes"),n.additionalUserIdClaimTypes=n.getResponseProperty("AdditionalUserIdClaimTypes"),n.additionalEmailClaimTypes=n.getResponseProperty("AdditionalEmailClaimTypes"),n.additionalNameClaimTypes=n.getResponseProperty("AdditionalNameClaimTypes"),n.acrValues=n.getResponseProperty("AcrValues"),n.expectedReturnAcrValue=n.getResponseProperty("ExpectedReturnAcrValue"),n.spNameIdFormat=n.getResponseProperty("SpNameIdFormat"),n.spOutboundSigningAlgorithm=n.getResponseProperty("SpOutboundSigningAlgorithm"),n.spSigningBehavior=n.getResponseProperty("SpSigningBehavior"),n.spMinIncomingSigningAlgorithm=n.getResponseProperty("SpMinIncomingSigningAlgorithm"),n.spWantAssertionsSigned=n.getResponseProperty("SpWantAssertionsSigned"),n.spValidateCertificates=n.getResponseProperty("SpValidateCertificates"),n.idpEntityId=n.getResponseProperty("IdpEntityId"),n.idpBindingType=n.getResponseProperty("IdpBindingType"),n.idpSingleSignOnServiceUrl=n.getResponseProperty("IdpSingleSignOnServiceUrl"),n.idpSingleLogoutServiceUrl=n.getResponseProperty("IdpSingleLogoutServiceUrl"),n.idpArtifactResolutionServiceUrl=n.getResponseProperty("IdpArtifactResolutionServiceUrl"),n.idpX509PublicCert=n.getResponseProperty("IdpX509PublicCert"),n.idpOutboundSigningAlgorithm=n.getResponseProperty("IdpOutboundSigningAlgorithm"),n.idpAllowUnsolicitedAuthnResponse=n.getResponseProperty("IdpAllowUnsolicitedAuthnResponse"),n.idpDisableOutboundLogoutRequests=n.getResponseProperty("IdpDisableOutboundLogoutRequests"),n.idpWantAuthnRequestsSigned=n.getResponseProperty("IdpWantAuthnRequestsSigned")),n}return i(t,e),t}(p.BaseResponse);t.SsoConfigApi=u},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationAutoEnrollStatusResponse=void 0;var o=function(e){function t(t){var n=e.call(this,t)||this;return n.id=n.getResponseProperty("Id"),n.resetPasswordEnabled=n.getResponseProperty("ResetPasswordEnabled"),n}return i(t,e),t}(n(25).BaseResponse);t.OrganizationAutoEnrollStatusResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationKeysResponse=void 0;var o=function(e){function t(t){return e.call(this,t)||this}return i(t,e),t}(n(1151).KeysResponse);t.OrganizationKeysResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.KeysResponse=void 0;var o=function(e){function t(t){var n=e.call(this,t)||this;return n.privateKey=n.getResponseProperty("PrivateKey"),n.publicKey=n.getResponseProperty("PublicKey"),n}return i(t,e),t}(n(25).BaseResponse);t.KeysResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationSubscriptionResponse=void 0;var o=n(679),a=n(681),s=function(e){function t(t){var n=e.call(this,t)||this;n.storageName=n.getResponseProperty("StorageName"),n.storageGb=n.getResponseProperty("StorageGb");var r=n.getResponseProperty("Subscription");n.subscription=null==r?null:new a.BillingSubscriptionResponse(r);var i=n.getResponseProperty("UpcomingInvoice");return n.upcomingInvoice=null==i?null:new a.BillingSubscriptionUpcomingInvoiceResponse(i),n.expiration=n.getResponseProperty("Expiration"),n}return i(t,e),t}(o.OrganizationResponse);t.OrganizationSubscriptionResponse=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationUserBulkResponse=void 0;var o=function(e){function t(t){var n=e.call(this,t)||this;return n.id=n.getResponseProperty("Id"),n.error=n.getResponseProperty("Error"),n}return i(t,e),t}(n(25).BaseResponse);t.OrganizationUserBulkResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationUserResetPasswordDetailsReponse=t.OrganizationUserDetailsResponse=t.OrganizationUserUserDetailsResponse=t.OrganizationUserResponse=void 0;var o=n(25),a=n(317),s=n(198),l=function(e){function t(t){var n=e.call(this,t)||this;return n.id=n.getResponseProperty("Id"),n.userId=n.getResponseProperty("UserId"),n.type=n.getResponseProperty("Type"),n.status=n.getResponseProperty("Status"),n.permissions=new s.PermissionsApi(n.getResponseProperty("Permissions")),n.accessAll=n.getResponseProperty("AccessAll"),n.resetPasswordEnrolled=n.getResponseProperty("ResetPasswordEnrolled"),n}return i(t,e),t}(o.BaseResponse);t.OrganizationUserResponse=l;var c=function(e){function t(t){var n=e.call(this,t)||this;return n.name=n.getResponseProperty("Name"),n.email=n.getResponseProperty("Email"),n.twoFactorEnabled=n.getResponseProperty("TwoFactorEnabled"),n}return i(t,e),t}(l);t.OrganizationUserUserDetailsResponse=c;var p=function(e){function t(t){var n=e.call(this,t)||this;n.collections=[];var r=n.getResponseProperty("Collections");return null!=r&&(n.collections=r.map((function(e){return new a.SelectionReadOnlyResponse(e)}))),n}return i(t,e),t}(l);t.OrganizationUserDetailsResponse=p;var u=function(e){function t(t){var n=e.call(this,t)||this;return n.kdf=n.getResponseProperty("Kdf"),n.kdfIterations=n.getResponseProperty("KdfIterations"),n.resetPasswordKey=n.getResponseProperty("ResetPasswordKey"),n.encryptedPrivateKey=n.getResponseProperty("EncryptedPrivateKey"),n}return i(t,e),t}(o.BaseResponse);t.OrganizationUserResetPasswordDetailsReponse=u},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PaymentResponse=void 0;var o=n(25),a=n(430),s=function(e){function t(t){var n=e.call(this,t)||this,r=n.getResponseProperty("UserProfile");return null!=r&&(n.userProfile=new a.ProfileResponse(r)),n.paymentIntentClientSecret=n.getResponseProperty("PaymentIntentClientSecret"),n.success=n.getResponseProperty("Success"),n}return i(t,e),t}(o.BaseResponse);t.PaymentResponse=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ProfileOrganizationResponse=void 0;var o=n(25),a=n(198),s=function(e){function t(t){var n=e.call(this,t)||this;return n.id=n.getResponseProperty("Id"),n.name=n.getResponseProperty("Name"),n.usePolicies=n.getResponseProperty("UsePolicies"),n.useGroups=n.getResponseProperty("UseGroups"),n.useDirectory=n.getResponseProperty("UseDirectory"),n.useEvents=n.getResponseProperty("UseEvents"),n.useTotp=n.getResponseProperty("UseTotp"),n.use2fa=n.getResponseProperty("Use2fa"),n.useApi=n.getResponseProperty("UseApi"),n.useSso=n.getResponseProperty("UseSso"),n.useResetPassword=n.getResponseProperty("UseResetPassword"),n.selfHost=n.getResponseProperty("SelfHost"),n.usersGetPremium=n.getResponseProperty("UsersGetPremium"),n.seats=n.getResponseProperty("Seats"),n.maxCollections=n.getResponseProperty("MaxCollections"),n.maxStorageGb=n.getResponseProperty("MaxStorageGb"),n.key=n.getResponseProperty("Key"),n.hasPublicAndPrivateKeys=n.getResponseProperty("HasPublicAndPrivateKeys"),n.status=n.getResponseProperty("Status"),n.type=n.getResponseProperty("Type"),n.enabled=n.getResponseProperty("Enabled"),n.ssoBound=n.getResponseProperty("SsoBound"),n.identifier=n.getResponseProperty("Identifier"),n.permissions=new a.PermissionsApi(n.getResponseProperty("permissions")),n.resetPasswordEnrolled=n.getResponseProperty("ResetPasswordEnrolled"),n.userId=n.getResponseProperty("UserId"),n.providerId=n.getResponseProperty("ProviderId"),n.providerName=n.getResponseProperty("ProviderName"),n}return i(t,e),t}(o.BaseResponse);t.ProfileOrganizationResponse=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ProfileProviderOrganizationResponse=void 0;var o=n(25),a=n(198),s=function(e){function t(t){var n=e.call(this,t)||this;return n.id=n.getResponseProperty("Id"),n.name=n.getResponseProperty("Name"),n.usePolicies=n.getResponseProperty("UsePolicies"),n.useGroups=n.getResponseProperty("UseGroups"),n.useDirectory=n.getResponseProperty("UseDirectory"),n.useEvents=n.getResponseProperty("UseEvents"),n.useTotp=n.getResponseProperty("UseTotp"),n.use2fa=n.getResponseProperty("Use2fa"),n.useApi=n.getResponseProperty("UseApi"),n.useSso=n.getResponseProperty("UseSso"),n.useResetPassword=n.getResponseProperty("UseResetPassword"),n.selfHost=n.getResponseProperty("SelfHost"),n.usersGetPremium=n.getResponseProperty("UsersGetPremium"),n.seats=n.getResponseProperty("Seats"),n.maxCollections=n.getResponseProperty("MaxCollections"),n.maxStorageGb=n.getResponseProperty("MaxStorageGb"),n.key=n.getResponseProperty("Key"),n.hasPublicAndPrivateKeys=n.getResponseProperty("HasPublicAndPrivateKeys"),n.status=n.getResponseProperty("Status"),n.type=n.getResponseProperty("Type"),n.enabled=n.getResponseProperty("Enabled"),n.ssoBound=n.getResponseProperty("SsoBound"),n.identifier=n.getResponseProperty("Identifier"),n.permissions=new a.PermissionsApi(n.getResponseProperty("permissions")),n.resetPasswordEnrolled=n.getResponseProperty("ResetPasswordEnrolled"),n.userId=n.getResponseProperty("UserId"),n.providerId=n.getResponseProperty("ProviderId"),n.providerName=n.getResponseProperty("ProviderName"),n}return i(t,e),t}(o.BaseResponse);t.ProfileProviderOrganizationResponse=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ProfileProviderResponse=void 0;var o=n(25),a=n(198),s=function(e){function t(t){var n=e.call(this,t)||this;return n.id=n.getResponseProperty("Id"),n.name=n.getResponseProperty("Name"),n.key=n.getResponseProperty("Key"),n.status=n.getResponseProperty("Status"),n.type=n.getResponseProperty("Type"),n.enabled=n.getResponseProperty("Enabled"),n.permissions=new a.PermissionsApi(n.getResponseProperty("permissions")),n.userId=n.getResponseProperty("UserId"),n.useEvents=n.getResponseProperty("UseEvents"),n}return i(t,e),t}(o.BaseResponse);t.ProfileProviderResponse=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PreloginResponse=void 0;var o=function(e){function t(t){var n=e.call(this,t)||this;return n.kdf=n.getResponseProperty("Kdf"),n.kdfIterations=n.getResponseProperty("KdfIterations"),n}return i(t,e),t}(n(25).BaseResponse);t.PreloginResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderOrganizationOrganizationDetailsResponse=t.ProviderOrganizationResponse=void 0;var o=function(e){function t(t){var n=e.call(this,t)||this;return n.id=n.getResponseProperty("Id"),n.providerId=n.getResponseProperty("ProviderId"),n.organizationId=n.getResponseProperty("OrganizationId"),n.key=n.getResponseProperty("Key"),n.settings=n.getResponseProperty("Settings"),n.creationDate=n.getResponseProperty("CreationDate"),n.revisionDate=n.getResponseProperty("RevisionDate"),n}return i(t,e),t}(n(25).BaseResponse);t.ProviderOrganizationResponse=o;var a=function(e){function t(t){var n=e.call(this,t)||this;return n.organizationName=n.getResponseProperty("OrganizationName"),n}return i(t,e),t}(o);t.ProviderOrganizationOrganizationDetailsResponse=a},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderResponse=void 0;var o=function(e){function t(t){var n=e.call(this,t)||this;return n.id=n.getResponseProperty("Id"),n.name=n.getResponseProperty("Name"),n.businessName=n.getResponseProperty("BusinessName"),n.billingEmail=n.getResponseProperty("BillingEmail"),n}return i(t,e),t}(n(25).BaseResponse);t.ProviderResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderUserBulkPublicKeyResponse=void 0;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(n(682).OrganizationUserBulkPublicKeyResponse);t.ProviderUserBulkPublicKeyResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderUserBulkResponse=void 0;var o=function(e){function t(t){var n=e.call(this,t)||this;return n.id=n.getResponseProperty("Id"),n.error=n.getResponseProperty("Error"),n}return i(t,e),t}(n(25).BaseResponse);t.ProviderUserBulkResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderUserUserDetailsResponse=t.ProviderUserResponse=void 0;var o=n(25),a=n(198),s=function(e){function t(t){var n=e.call(this,t)||this;return n.id=n.getResponseProperty("Id"),n.userId=n.getResponseProperty("UserId"),n.type=n.getResponseProperty("Type"),n.status=n.getResponseProperty("Status"),n.permissions=new a.PermissionsApi(n.getResponseProperty("Permissions")),n}return i(t,e),t}(o.BaseResponse);t.ProviderUserResponse=s;var l=function(e){function t(t){var n=e.call(this,t)||this;return n.name=n.getResponseProperty("Name"),n.email=n.getResponseProperty("Email"),n}return i(t,e),t}(s);t.ProviderUserUserDetailsResponse=l},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.SendAccessResponse=void 0;var o=n(25),a=n(422),s=n(423),l=function(e){function t(t){var n=e.call(this,t)||this;n.id=n.getResponseProperty("Id"),n.type=n.getResponseProperty("Type"),n.name=n.getResponseProperty("Name");var r=n.getResponseProperty("Text");null!=r&&(n.text=new s.SendTextApi(r));var i=n.getResponseProperty("File");return null!=i&&(n.file=new a.SendFileApi(i)),n.expirationDate=n.getResponseProperty("ExpirationDate"),n.creatorIdentifier=n.getResponseProperty("CreatorIdentifier"),n}return i(t,e),t}(o.BaseResponse);t.SendAccessResponse=l},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.SendFileDownloadDataResponse=void 0;var o=function(e){function t(t){var n=e.call(this,t)||this;return n.id=null,n.url=null,n.id=n.getResponseProperty("Id"),n.url=n.getResponseProperty("Url"),n}return i(t,e),t}(n(25).BaseResponse);t.SendFileDownloadDataResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.SendFileUploadDataResponse=void 0;var o=n(25),a=n(431),s=function(e){function t(t){var n=e.call(this,t)||this;n.url=null,n.fileUploadType=n.getResponseProperty("FileUploadType");var r=n.getResponseProperty("SendResponse");return n.sendResponse=null==r?null:new a.SendResponse(r),n.url=n.getResponseProperty("Url"),n}return i(t,e),t}(o.BaseResponse);t.SendFileUploadDataResponse=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.SyncResponse=void 0;var o=n(25),a=n(315),s=n(676),l=n(677),c=n(678),p=n(307),u=n(430),d=n(431),m=function(e){function t(t){var n=e.call(this,t)||this;n.folders=[],n.collections=[],n.ciphers=[],n.policies=[],n.sends=[];var r=n.getResponseProperty("Profile");null!=r&&(n.profile=new u.ProfileResponse(r));var i=n.getResponseProperty("Folders");null!=i&&(n.folders=i.map((function(e){return new c.FolderResponse(e)})));var o=n.getResponseProperty("Collections");null!=o&&(n.collections=o.map((function(e){return new s.CollectionDetailsResponse(e)})));var m=n.getResponseProperty("Ciphers");null!=m&&(n.ciphers=m.map((function(e){return new a.CipherResponse(e)})));var f=n.getResponseProperty("Domains");null!=f&&(n.domains=new l.DomainsResponse(f));var h=n.getResponseProperty("Policies");null!=h&&(n.policies=h.map((function(e){return new p.PolicyResponse(e)})));var v=n.getResponseProperty("Sends");return null!=v&&(n.sends=v.map((function(e){return new d.SendResponse(e)}))),n}return i(t,e),t}(o.BaseResponse);t.SyncResponse=m},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.TaxInfoResponse=void 0;var o=function(e){function t(t){var n=e.call(this,t)||this;return n.taxId=n.getResponseProperty("TaxIdNumber"),n.taxIdType=n.getResponseProperty("TaxIdType"),n.line1=n.getResponseProperty("Line1"),n.line2=n.getResponseProperty("Line2"),n.city=n.getResponseProperty("City"),n.state=n.getResponseProperty("State"),n.postalCode=n.getResponseProperty("PostalCode"),n.country=n.getResponseProperty("Country"),n}return i(t,e),t}(n(25).BaseResponse);t.TaxInfoResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.TaxRateResponse=void 0;var o=function(e){function t(t){var n=e.call(this,t)||this;return n.id=n.getResponseProperty("Id"),n.country=n.getResponseProperty("Country"),n.state=n.getResponseProperty("State"),n.postalCode=n.getResponseProperty("PostalCode"),n.rate=n.getResponseProperty("Rate"),n}return i(t,e),t}(n(25).BaseResponse);t.TaxRateResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorAuthenticatorResponse=void 0;var o=function(e){function t(t){var n=e.call(this,t)||this;return n.enabled=n.getResponseProperty("Enabled"),n.key=n.getResponseProperty("Key"),n}return i(t,e),t}(n(25).BaseResponse);t.TwoFactorAuthenticatorResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorDuoResponse=void 0;var o=function(e){function t(t){var n=e.call(this,t)||this;return n.enabled=n.getResponseProperty("Enabled"),n.host=n.getResponseProperty("Host"),n.secretKey=n.getResponseProperty("SecretKey"),n.integrationKey=n.getResponseProperty("IntegrationKey"),n}return i(t,e),t}(n(25).BaseResponse);t.TwoFactorDuoResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorEmailResponse=void 0;var o=function(e){function t(t){var n=e.call(this,t)||this;return n.enabled=n.getResponseProperty("Enabled"),n.email=n.getResponseProperty("Email"),n}return i(t,e),t}(n(25).BaseResponse);t.TwoFactorEmailResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorProviderResponse=void 0;var o=function(e){function t(t){var n=e.call(this,t)||this;return n.enabled=n.getResponseProperty("Enabled"),n.type=n.getResponseProperty("Type"),n}return i(t,e),t}(n(25).BaseResponse);t.TwoFactorProviderResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorRecoverResponse=void 0;var o=function(e){function t(t){var n=e.call(this,t)||this;return n.code=n.getResponseProperty("Code"),n}return i(t,e),t}(n(25).BaseResponse);t.TwoFactorRecoverResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorYubiKeyResponse=void 0;var o=function(e){function t(t){var n=e.call(this,t)||this;return n.enabled=n.getResponseProperty("Enabled"),n.key1=n.getResponseProperty("Key1"),n.key2=n.getResponseProperty("Key2"),n.key3=n.getResponseProperty("Key3"),n.key4=n.getResponseProperty("Key4"),n.key5=n.getResponseProperty("Key5"),n.nfc=n.getResponseProperty("Nfc"),n}return i(t,e),t}(n(25).BaseResponse);t.TwoFactorYubiKeyResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.UserKeyResponse=void 0;var o=function(e){function t(t){var n=e.call(this,t)||this;return n.userId=n.getResponseProperty("UserId"),n.publicKey=n.getResponseProperty("PublicKey"),n}return i(t,e),t}(n(25).BaseResponse);t.UserKeyResponse=o},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e?p[e-1]():0===p.length&&(l.delete(c),0===l.size&&a.delete(n))};o.apply(n,r).then((function(e){return u(),e})).catch((function(e){throw u(),e})).then(t,i)};p.push(s),p.length<=e&&s()}))}}}}},function(e,t,n){"use strict";(function(e){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]5&&(e.passwordHistory=e.passwordHistory.slice(0,5)),a.label=5;case 5:return(p=new m.Cipher).id=e.id,p.folderId=e.folderId,p.favorite=e.favorite,p.organizationId=e.organizationId,p.type=e.type,p.collectionIds=e.collectionIds,p.revisionDate=e.revisionDate,p.reprompt=e.reprompt,null!=t||null==p.organizationId?[3,7]:[4,this.cryptoService.getOrgKey(p.organizationId)];case 6:if(null==(t=a.sent()))throw new Error("Cannot encrypt cipher for organization. No key.");a.label=7;case 7:return[4,Promise.all([this.encryptObjProperty(e,p,{name:null,notes:null},t),this.encryptCipherData(p,e,t),this.encryptFields(e.fields,t).then((function(e){p.fields=e})),this.encryptPasswordHistories(e.passwordHistory,t).then((function(e){p.passwordHistory=e})),this.encryptAttachments(e.attachments,t).then((function(e){p.attachments=e}))])];case 8:return a.sent(),[2,p]}}))}))},t.prototype.encryptAttachments=function(e,t){return o(this,void 0,void 0,(function(){var n,r,i=this;return a(this,(function(s){switch(s.label){case 0:return null==e||0===e.length?[2,null]:(n=[],r=[],e.forEach((function(e){return o(i,void 0,void 0,(function(){var i,s,l=this;return a(this,(function(c){return(i=new u.Attachment).id=e.id,i.size=e.size,i.sizeName=e.sizeName,i.url=e.url,s=this.encryptObjProperty(e,i,{fileName:null},t).then((function(){return o(l,void 0,void 0,(function(){var n;return a(this,(function(o){switch(o.label){case 0:return null==e.key?[3,2]:(n=i,[4,this.cryptoService.encrypt(e.key.key,t)]);case 1:n.key=o.sent(),o.label=2;case 2:return r.push(i),[2]}}))}))})),n.push(s),[2]}))}))})),[4,Promise.all(n)]);case 1:return s.sent(),[2,r]}}))}))},t.prototype.encryptFields=function(e,t){return o(this,void 0,void 0,(function(){var n,r;return a(this,(function(i){switch(i.label){case 0:return e&&e.length?(n=this,r=[],[4,e.reduce((function(e,i){return e.then((function(){return n.encryptField(i,t)})).then((function(e){r.push(e)}))}),Promise.resolve())]):[2,null];case 1:return i.sent(),[2,r]}}))}))},t.prototype.encryptField=function(e,t){return o(this,void 0,void 0,(function(){var n;return a(this,(function(r){switch(r.label){case 0:return(n=new f.Field).type=e.type,e.type===l.FieldType.Boolean&&"true"!==e.value&&(e.value="false"),[4,this.encryptObjProperty(e,n,{name:null,value:null},t)];case 1:return r.sent(),[2,n]}}))}))},t.prototype.encryptPasswordHistories=function(e,t){return o(this,void 0,void 0,(function(){var n,r;return a(this,(function(i){switch(i.label){case 0:return e&&e.length?(n=this,r=[],[4,e.reduce((function(e,i){return e.then((function(){return n.encryptPasswordHistory(i,t)})).then((function(e){r.push(e)}))}),Promise.resolve())]):[2,null];case 1:return i.sent(),[2,r]}}))}))},t.prototype.encryptPasswordHistory=function(e,t){return o(this,void 0,void 0,(function(){var n;return a(this,(function(r){switch(r.label){case 0:return(n=new g.Password).lastUsedDate=e.lastUsedDate,[4,this.encryptObjProperty(e,n,{password:null},t)];case 1:return r.sent(),[2,n]}}))}))},t.prototype.get=function(e){return o(this,void 0,void 0,(function(){var t,n,r;return a(this,(function(i){switch(i.label){case 0:return[4,this.userService.getUserId()];case 1:return t=i.sent(),[4,this.storageService.get(B)];case 2:return n=i.sent(),[4,this.storageService.get(R+t)];case 3:return null!=(r=i.sent())&&r.hasOwnProperty(e)?[2,new m.Cipher(r[e],!1,n?n[e]:null)]:[2,null]}}))}))},t.prototype.getAll=function(){return o(this,void 0,void 0,(function(){var e,t,n,r,i;return a(this,(function(o){switch(o.label){case 0:return[4,this.userService.getUserId()];case 1:return e=o.sent(),[4,this.storageService.get(B)];case 2:return t=o.sent(),[4,this.storageService.get(R+e)];case 3:for(i in n=o.sent(),r=[],n)n.hasOwnProperty(i)&&r.push(new m.Cipher(n[i],!1,t?t[i]:null));return[2,r]}}))}))},t.prototype.getAllDecrypted=function(){var e;return o(this,void 0,void 0,(function(){var t,n,r;return a(this,(function(i){switch(i.label){case 0:return null==this.decryptedCipherCache?[3,4]:[4,this.userService.getUserId()];case 1:return t=i.sent(),null==this.searchService||(null!==(e=this.searchService().indexedEntityId)&&void 0!==e?e:t)===t?[3,3]:[4,this.searchService().indexCiphers(t,this.decryptedCipherCache)];case 2:i.sent(),i.label=3;case 3:return[2,this.decryptedCipherCache];case 4:return n=[],[4,this.cryptoService.hasKey()];case 5:if(!i.sent())throw new Error("No key.");return r=[],[4,this.getAll()];case 6:return i.sent().forEach((function(e){r.push(e.decrypt().then((function(e){return n.push(e)})))})),[4,Promise.all(r)];case 7:return i.sent(),n.sort(this.getLocaleSortingFunction()),this.decryptedCipherCache=n,[2,this.decryptedCipherCache]}}))}))},t.prototype.getAllDecryptedForGrouping=function(e,t){return void 0===t&&(t=!0),o(this,void 0,void 0,(function(){return a(this,(function(n){switch(n.label){case 0:return[4,this.getAllDecrypted()];case 1:return[2,n.sent().filter((function(n){return!n.isDeleted&&(!(!t||n.folderId!==e)||!t&&null!=n.collectionIds&&n.collectionIds.indexOf(e)>-1)}))]}}))}))},t.prototype.getAllDecryptedForUrl=function(e,t,n){return void 0===n&&(n=null),o(this,void 0,void 0,(function(){var r,i,o,l,p;return a(this,(function(a){switch(a.label){case 0:return null==e&&null==t?[2,Promise.resolve([])]:(r=D.Utils.getDomain(e),i=null==r?Promise.resolve([]):this.settingsService.getEquivalentDomains().then((function(e){var t=[];return e.forEach((function(e){e.length&&e.indexOf(r)>=0&&(t=t.concat(e))})),t.length||t.push(r),t})),[4,Promise.all([i,this.getAllDecrypted()])]);case 1:return o=a.sent(),l=o[0],p=o[1],null!=n?[3,3]:[4,this.storageService.get(M.ConstantsService.defaultUriMatch)];case 2:null==(n=a.sent())&&(n=c.UriMatchType.Domain),a.label=3;case 3:return[2,p.filter((function(i){if(null!=i.deletedDate)return!1;if(null!=t&&t.indexOf(i.type)>-1)return!0;if(null!=e&&i.type===s.CipherType.Login&&null!=i.login.uris)for(var o=0;o-1){if(!j.has(p.domain))return!0;var u=D.Utils.getHost(e);if(!j.get(p.domain).has(u))return!0}break;case c.UriMatchType.Host:var d=D.Utils.getHost(e);if(null!=d&&d===D.Utils.getHost(p.uri))return!0;break;case c.UriMatchType.Exact:if(e===p.uri)return!0;break;case c.UriMatchType.StartsWith:if(e.startsWith(p.uri))return!0;break;case c.UriMatchType.RegularExpression:try{if(new RegExp(p.uri,"i").test(e))return!0}catch(a){}case c.UriMatchType.Never:}}return!1}))]}}))}))},t.prototype.getAllFromApiForOrganization=function(e){return o(this,void 0,void 0,(function(){var t,n,r;return a(this,(function(i){switch(i.label){case 0:return[4,this.apiService.getCiphersOrganization(e)];case 1:return null!=(t=i.sent())&&null!=t.data&&t.data.length?(n=[],r=[],t.data.forEach((function(e){var t=new p.CipherData(e),i=new m.Cipher(t);r.push(i.decrypt().then((function(e){return n.push(e)})))})),[4,Promise.all(r)]):[3,3];case 2:return i.sent(),n.sort(this.getLocaleSortingFunction()),[2,n];case 3:return[2,[]]}}))}))},t.prototype.getLastUsedForUrl=function(e,t){return void 0===t&&(t=!1),o(this,void 0,void 0,(function(){return a(this,(function(n){return[2,this.getCipherForUrl(e,!0,!1,t)]}))}))},t.prototype.getLastLaunchedForUrl=function(e,t){return void 0===t&&(t=!1),o(this,void 0,void 0,(function(){return a(this,(function(n){return[2,this.getCipherForUrl(e,!1,!0,t)]}))}))},t.prototype.getNextCipherForUrl=function(e){return o(this,void 0,void 0,(function(){return a(this,(function(t){return[2,this.getCipherForUrl(e,!1,!1,!1)]}))}))},t.prototype.updateLastUsedIndexForUrl=function(e){this.sortedCiphersCache.updateLastUsedIndex(e)},t.prototype.updateLastUsedDate=function(e){return o(this,void 0,void 0,(function(){var t,n,r;return a(this,(function(i){switch(i.label){case 0:return[4,this.storageService.get(B)];case 1:return(t=i.sent())||(t={}),t[e]?t[e].lastUsedDate=(new Date).getTime():t[e]={lastUsedDate:(new Date).getTime()},[4,this.storageService.save(B,t)];case 2:if(i.sent(),null==this.decryptedCipherCache)return[2];for(n=0;nr?-1:null!=r&&null==n?1:0},t.prototype.sortCiphersByLastUsedThenName=function(e,t){var n=this.sortCiphersByLastUsed(e,t);return 0!==n?n:this.getLocaleSortingFunction()(e,t)},t.prototype.getLocaleSortingFunction=function(){var e=this;return function(t,n){var r=t.name,i=n.name;if(null==r&&null!=i)return-1;if(null!=r&&null==i)return 1;if(null==r&&null==i)return 0;var o=e.i18nService.collator?e.i18nService.collator.compare(r,i):r.localeCompare(i);return 0!==o||t.type!==s.CipherType.Login||n.type!==s.CipherType.Login?o:(null!=t.login.username&&(r+=t.login.username),null!=n.login.username&&(i+=n.login.username),e.i18nService.collator?e.i18nService.collator.compare(r,i):r.localeCompare(i))}},t.prototype.softDelete=function(e){return o(this,void 0,void 0,(function(){var t,n,r;return a(this,(function(i){switch(i.label){case 0:return[4,this.userService.getUserId()];case 1:return t=i.sent(),[4,this.storageService.get(R+t)];case 2:return null==(n=i.sent())?[2]:(r=function(e){null!=n[e]&&(n[e].deletedDate=(new Date).toISOString())},"string"==typeof e?r(e):e.forEach(r),[4,this.storageService.save(R+t,n)]);case 3:return i.sent(),this.decryptedCipherCache=null,[2]}}))}))},t.prototype.softDeleteWithServer=function(e){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,this.apiService.putDeleteCipher(e)];case 1:return t.sent(),[4,this.softDelete(e)];case 2:return t.sent(),[2]}}))}))},t.prototype.softDeleteManyWithServer=function(e){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,this.apiService.putDeleteManyCiphers(new b.CipherBulkDeleteRequest(e))];case 1:return t.sent(),[4,this.softDelete(e)];case 2:return t.sent(),[2]}}))}))},t.prototype.restore=function(e){return o(this,void 0,void 0,(function(){var t,n,r;return a(this,(function(i){switch(i.label){case 0:return[4,this.userService.getUserId()];case 1:return t=i.sent(),[4,this.storageService.get(R+t)];case 2:return null==(n=i.sent())?[2]:(r=function(e){null!=n[e.id]&&(n[e.id].deletedDate=null,n[e.id].revisionDate=e.revisionDate)},"Array"===e.constructor.name?e.forEach(r):r(e),[4,this.storageService.save(R+t,n)]);case 3:return i.sent(),this.decryptedCipherCache=null,[2]}}))}))},t.prototype.restoreWithServer=function(e){return o(this,void 0,void 0,(function(){var t;return a(this,(function(n){switch(n.label){case 0:return[4,this.apiService.putRestoreCipher(e)];case 1:return t=n.sent(),[4,this.restore({id:e,revisionDate:t.revisionDate})];case 2:return n.sent(),[2]}}))}))},t.prototype.restoreManyWithServer=function(e){return o(this,void 0,void 0,(function(){var t,n,r,i,o;return a(this,(function(a){switch(a.label){case 0:return[4,this.apiService.putRestoreManyCiphers(new w.CipherBulkRestoreRequest(e))];case 1:for(t=a.sent(),n=[],r=0,i=t.data;r0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0?[2,this.orgKeys]:[4,this.storageService.get(t.Keys.encOrgKeys)];case 1:if(null==(e=a.sent()))return[2,null];for(o in n=new Map,r=!1,i=[],e)i.push(o);s=0,a.label=2;case 2:return s0?[2,this.providerKeys]:[4,this.storageService.get(t.Keys.encProviderKeys)];case 1:if(null==(e=a.sent()))return[2,null];for(o in n=new Map,r=!1,i=[],e)i.push(o);s=0,a.label=2;case 2:return s53)throw new Error("We cannot generate numbers larger than 53 bits.");return o=Math.ceil(i/8),s=Math.pow(2,i)-1,c=Uint8Array.bind,[4,this.cryptoFunctionService.randomBytes(o)];case 1:for(l=new(c.apply(Uint8Array,[void 0,a.sent()])),p=8*(o-1),u=0;u=r?[2,this.randomNumber(e,t)]:[2,e+n]}}))}))},e.prototype.validateKey=function(e){return o(this,void 0,void 0,(function(){var n,r,i;return a(this,(function(o){switch(o.label){case 0:return o.trys.push([0,5,,6]),[4,this.storageService.get(t.Keys.encPrivateKey)];case 1:return n=o.sent(),[4,this.getEncKey(e)];case 2:return r=o.sent(),null==n||null==r?[2,!1]:[4,this.decryptToBytes(new m.EncString(n),r)];case 3:return i=o.sent(),[4,this.cryptoFunctionService.rsaExtractPublicKey(i)];case 4:return o.sent(),[3,6];case 5:return o.sent(),[2,!1];case 6:return[2,!0]}}))}))},e.prototype.storeKey=function(e){return o(this,void 0,void 0,(function(){var n;return a(this,(function(r){switch(r.label){case 0:return[4,this.shouldStoreKey("auto")];case 1:return(n=r.sent())?[3,3]:[4,this.shouldStoreKey("biometric")];case 2:n=r.sent(),r.label=3;case 3:return n?this.secureStorageService.save(t.Keys.key,e.keyB64):this.secureStorageService.remove(t.Keys.key),[2]}}))}))},e.prototype.shouldStoreKey=function(e){return o(this,void 0,void 0,(function(){var t,n,r;return a(this,(function(i){switch(i.label){case 0:return t=!1,"auto"!==e?[3,2]:[4,this.storageService.get(h.ConstantsService.vaultTimeoutKey)];case 1:return n=i.sent(),t=null==n,[3,4];case 2:return"biometric"!==e?[3,4]:[4,this.storageService.get(h.ConstantsService.biometricUnlockKey)];case 3:r=i.sent(),t=r&&this.platformUtilService.supportsSecureStorage(),i.label=4;case 4:return[2,t]}}))}))},e.prototype.retrieveKeyFromStorage=function(e){return this.secureStorageService.get(t.Keys.key,{keySuffix:e})},e.prototype.aesEncrypt=function(e,t){return o(this,void 0,void 0,(function(){var n,r,i,o,s,l;return a(this,(function(a){switch(a.label){case 0:return n=new d.EncryptedObject,r=n,[4,this.getKeyForEncryption(t)];case 1:return r.key=a.sent(),i=n,[4,this.cryptoFunctionService.randomBytes(16)];case 2:return i.iv=a.sent(),o=n,[4,this.cryptoFunctionService.aesEncrypt(e,n.iv,n.key.encKey)];case 3:return o.data=a.sent(),null==n.key.macKey?[3,5]:((s=new Uint8Array(n.iv.byteLength+n.data.byteLength)).set(new Uint8Array(n.iv),0),s.set(new Uint8Array(n.data),n.iv.byteLength),l=n,[4,this.cryptoFunctionService.hmac(s.buffer,n.key.macKey,"sha256")]);case 4:l.mac=a.sent(),a.label=5;case 5:return[2,n]}}))}))},e.prototype.aesDecryptToUtf8=function(e,t,n,r,i){return o(this,void 0,void 0,(function(){var o,s,l,c;return a(this,(function(a){switch(a.label){case 0:return[4,this.getKeyForEncryption(i)];case 1:return o=a.sent(),null!=(s=this.resolveLegacyKey(e,o)).macKey&&null==r?(this.logService.error("mac required."),[2,null]):s.encType!==e?(this.logService.error("encType unavailable."),[2,null]):null==(l=this.cryptoFunctionService.aesDecryptFastParameters(t,n,r,s)).macKey||null==l.mac?[3,4]:[4,this.cryptoFunctionService.hmacFast(l.macData,l.macKey,"sha256")];case 2:return c=a.sent(),[4,this.cryptoFunctionService.compareFast(l.mac,c)];case 3:if(!a.sent())return this.logService.error("mac failed."),[2,null];a.label=4;case 4:return[2,this.cryptoFunctionService.aesDecryptFast(l)]}}))}))},e.prototype.aesDecryptToBytes=function(e,t,n,r,i){return o(this,void 0,void 0,(function(){var o,s,l,c;return a(this,(function(a){switch(a.label){case 0:return[4,this.getKeyForEncryption(i)];case 1:return o=a.sent(),null!=(s=this.resolveLegacyKey(e,o)).macKey&&null==r?[2,null]:s.encType!==e?[2,null]:null==s.macKey||null==r?[3,4]:((l=new Uint8Array(n.byteLength+t.byteLength)).set(new Uint8Array(n),0),l.set(new Uint8Array(t),n.byteLength),[4,this.cryptoFunctionService.hmac(l.buffer,s.macKey,"sha256")]);case 2:return null===(c=a.sent())?[2,null]:[4,this.cryptoFunctionService.compare(r,c)];case 3:if(!a.sent())return this.logService.error("mac failed."),[2,null];a.label=4;case 4:return[4,this.cryptoFunctionService.aesDecrypt(t,n,s.encKey)];case 5:return[2,a.sent()]}}))}))},e.prototype.getKeyForEncryption=function(e){return o(this,void 0,void 0,(function(){var t;return a(this,(function(n){switch(n.label){case 0:return null!=e?[2,e]:[4,this.getEncKey()];case 1:return null!=(t=n.sent())?[2,t]:[4,this.getKey()];case 2:return[2,n.sent()]}}))}))},e.prototype.resolveLegacyKey=function(e,t){return e===l.EncryptionType.AesCbc128_HmacSha256_B64&&t.encType===l.EncryptionType.AesCbc256_B64?(null==this.legacyEtmKey&&(this.legacyEtmKey=new f.SymmetricCryptoKey(t.key,l.EncryptionType.AesCbc128_HmacSha256_B64)),this.legacyEtmKey):t},e.prototype.stretchKey=function(e){return o(this,void 0,void 0,(function(){var t,n,r;return a(this,(function(i){switch(i.label){case 0:return t=new Uint8Array(64),[4,this.cryptoFunctionService.hkdfExpand(e.key,"enc",32,"sha256")];case 1:return n=i.sent(),[4,this.cryptoFunctionService.hkdfExpand(e.key,"mac",32,"sha256")];case 2:return r=i.sent(),t.set(new Uint8Array(n)),t.set(new Uint8Array(r),32),[2,new f.SymmetricCryptoKey(t.buffer)]}}))}))},e.prototype.hashPhrase=function(e,t){return void 0===t&&(t=64),o(this,void 0,void 0,(function(){var n,r,i,o,l,c,p;return a(this,(function(a){if(n=Math.log(g.EEFLongWordList.length)/Math.log(2),r=Math.ceil(t/n),i=Array.from(new Uint8Array(e)),o=4*i.length,r*n>o)throw new Error("Output entropy of hash function is too small");for(l=[],c=s.fromArray(i,256);r--;)p=c.mod(g.EEFLongWordList.length),c=c.divide(g.EEFLongWordList.length),l.push(g.EEFLongWordList[p]);return[2,l]}))}))},e.prototype.buildEncKey=function(e,t){return o(this,void 0,void 0,(function(){var n,r;return a(this,(function(i){switch(i.label){case 0:return n=null,32!==e.key.byteLength?[3,3]:[4,this.stretchKey(e)];case 1:return r=i.sent(),[4,this.encrypt(t,r)];case 2:case 4:return n=i.sent(),[3,6];case 3:return 64!==e.key.byteLength?[3,5]:[4,this.encrypt(t,e)];case 5:throw new Error("Invalid key size.");case 6:return[2,[new f.SymmetricCryptoKey(t),n]]}}))}))},r([v.sequentialize((function(){return"getEncKey"})),i("design:type",Function),i("design:paramtypes",[f.SymmetricCryptoKey]),i("design:returntype",Promise)],e.prototype,"getEncKey",null),r([v.sequentialize((function(){return"getOrgKeys"})),i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",Promise)],e.prototype,"getOrgKeys",null),r([v.sequentialize((function(){return"getProviderKeys"})),i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",Promise)],e.prototype,"getProviderKeys",null),e}();t.CryptoService=x},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EncArrayBuffer=void 0;var r=function(e){this.buffer=e};t.EncArrayBuffer=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EncryptedObject=void 0;var r=function(){};t.EncryptedObject=r},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&e.data.forEach((function(e){var r=new l.Collection(new p.CollectionData(e));t.push(r.decrypt().then((function(e){n.push(e)})))})),Promise.all(t)}))),m.push(this.apiService.getCiphersOrganization(e).then((function(e){var t=[];return null!=e&&null!=e.data&&e.data.length>0&&e.data.filter((function(e){return null===e.deletedDate})).forEach((function(e){var n=new s.Cipher(new c.CipherData(e));t.push(n.decrypt().then((function(e){r.push(e)})))})),Promise.all(t)}))),[4,Promise.all(m)];case 1:return i.sent(),"csv"===t?(f=new Map,n.forEach((function(e){f.set(e.id,e)})),h=[],r.forEach((function(e){if(e.type===a.CipherType.Login||e.type===a.CipherType.SecureNote){var t={collections:[]};null!=e.collectionIds&&(t.collections=e.collectionIds.filter((function(e){return f.has(e)})).map((function(e){return f.get(e).name}))),y.buildCommonCipher(t,e),h.push(t)}})),[2,o.unparse(h)]):(v={encrypted:!1,collections:[],items:[]},n.forEach((function(e){var t=new d.CollectionWithId;t.build(e),v.collections.push(t)})),r.forEach((function(e){var t=new u.CipherWithIds;t.build(e),v.items.push(t)})),[2,JSON.stringify(v,null," ")])}}))}))},e.prototype.getOrganizationEncryptedExport=function(e){return r(this,void 0,void 0,(function(){var t,n,r,o,a,m;return i(this,(function(i){switch(i.label){case 0:return t=[],n=[],(r=[]).push(this.apiService.getCollections(e).then((function(e){return null!=e&&null!=e.data&&e.data.length>0&&e.data.forEach((function(e){var n=new l.Collection(new p.CollectionData(e));t.push(n)})),Promise.all([])}))),r.push(this.apiService.getCiphersOrganization(e).then((function(e){return null!=e&&null!=e.data&&e.data.length>0&&e.data.filter((function(e){return null===e.deletedDate})).forEach((function(e){var t=new s.Cipher(new c.CipherData(e));n.push(t)})),Promise.all([])}))),[4,Promise.all(r)];case 1:return i.sent(),[4,this.cryptoService.getOrgKey(e)];case 2:return o=i.sent(),[4,this.cryptoService.encrypt(h.Utils.newGuid(),o)];case 3:return a=i.sent(),m={encrypted:!0,encKeyValidation_DO_NOT_EDIT:a.encryptedString,collections:[],items:[]},t.forEach((function(e){var t=new d.CollectionWithId;t.build(e),m.collections.push(t)})),n.forEach((function(e){var t=new u.CipherWithIds;t.build(e),m.items.push(t)})),[2,JSON.stringify(m,null," ")]}}))}))},e.prototype.padNumber=function(e,t,n){void 0===n&&(n="0");var r=e.toString();return r.length>=t?r:new Array(t-r.length+1).join(n)+r},e.prototype.buildCommonCipher=function(e,t){switch(e.type=null,e.name=t.name,e.notes=t.notes,e.fields=null,e.reprompt=t.reprompt,e.login_uri=null,e.login_username=null,e.login_password=null,e.login_totp=null,t.fields&&t.fields.forEach((function(t){e.fields?e.fields+="\n":e.fields="",e.fields+=(t.name||"")+": "+t.value})),t.type){case a.CipherType.Login:e.type="login",e.login_username=t.login.username,e.login_password=t.login.password,e.login_totp=t.login.totp,t.login.uris&&(e.login_uri=[],t.login.uris.forEach((function(t){e.login_uri.push(t.uri)})));break;case a.CipherType.SecureNote:e.type="note";break;default:return}return e},e}();t.ExportService=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Cipher=void 0;var r=n(181),i=n(40),o=n(139),a=n(202),s=n(98),l=n(1203),c=n(1204),p=n(1205),u=n(1206),d=n(1208),m=function(){function e(){}return e.template=function(){var t=new e;return t.organizationId=null,t.collectionIds=null,t.folderId=null,t.type=i.CipherType.Login,t.name="Item name",t.notes="Some notes about this item.",t.favorite=!1,t.fields=[],t.login=null,t.secureNote=null,t.card=null,t.identity=null,t.reprompt=r.CipherRepromptType.None,t},e.toView=function(e,t){var n,a,s;if(void 0===t&&(t=new o.CipherView),t.type=e.type,t.folderId=e.folderId,null==t.organizationId&&(t.organizationId=e.organizationId),t.collectionIds||e.collectionIds){var m=new Set((null!==(n=t.collectionIds)&&void 0!==n?n:[]).concat(null!==(a=e.collectionIds)&&void 0!==a?a:[]));t.collectionIds=Array.from(m.values())}switch(t.name=e.name,t.notes=e.notes,t.favorite=e.favorite,t.reprompt=null!==(s=e.reprompt)&&void 0!==s?s:r.CipherRepromptType.None,null!=e.fields&&(t.fields=e.fields.map((function(e){return c.Field.toView(e)}))),e.type){case i.CipherType.Login:t.login=u.Login.toView(e.login);break;case i.CipherType.SecureNote:t.secureNote=d.SecureNote.toView(e.secureNote);break;case i.CipherType.Card:t.card=l.Card.toView(e.card);break;case i.CipherType.Identity:t.identity=p.Identity.toView(e.identity)}return t},e.toDomain=function(e,t){var n;switch(void 0===t&&(t=new a.Cipher),t.type=e.type,t.folderId=e.folderId,null==t.organizationId&&(t.organizationId=e.organizationId),t.name=null!=e.name?new s.EncString(e.name):null,t.notes=null!=e.notes?new s.EncString(e.notes):null,t.favorite=e.favorite,t.reprompt=null!==(n=e.reprompt)&&void 0!==n?n:r.CipherRepromptType.None,null!=e.fields&&(t.fields=e.fields.map((function(e){return c.Field.toDomain(e)}))),e.type){case i.CipherType.Login:t.login=u.Login.toDomain(e.login);break;case i.CipherType.SecureNote:t.secureNote=d.SecureNote.toDomain(e.secureNote);break;case i.CipherType.Card:t.card=l.Card.toDomain(e.card);break;case i.CipherType.Identity:t.identity=p.Identity.toDomain(e.identity)}return t},e.prototype.build=function(e){var t,n;switch(this.organizationId=e.organizationId,this.folderId=e.folderId,this.type=e.type,this.reprompt=e.reprompt,e instanceof o.CipherView?(this.name=e.name,this.notes=e.notes):(this.name=null===(t=e.name)||void 0===t?void 0:t.encryptedString,this.notes=null===(n=e.notes)||void 0===n?void 0:n.encryptedString),this.favorite=e.favorite,null!=e.fields&&(o.CipherView,this.fields=e.fields.map((function(e){return new c.Field(e)}))),e.type){case i.CipherType.Login:this.login=new u.Login(e.login);break;case i.CipherType.SecureNote:this.secureNote=new d.SecureNote(e.secureNote);break;case i.CipherType.Card:this.card=new l.Card(e.card);break;case i.CipherType.Identity:this.identity=new p.Identity(e.identity)}},e}();t.Cipher=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Card=void 0;var r=n(87),i=n(400),o=n(98),a=function(){function e(e){var t,n,i,o,a,s;null!=e&&(e instanceof r.CardView?(this.cardholderName=e.cardholderName,this.brand=e.brand,this.number=e.number,this.expMonth=e.expMonth,this.expYear=e.expYear,this.code=e.code):(this.cardholderName=null===(t=e.cardholderName)||void 0===t?void 0:t.encryptedString,this.brand=null===(n=e.brand)||void 0===n?void 0:n.encryptedString,this.number=null===(i=e.number)||void 0===i?void 0:i.encryptedString,this.expMonth=null===(o=e.expMonth)||void 0===o?void 0:o.encryptedString,this.expYear=null===(a=e.expYear)||void 0===a?void 0:a.encryptedString,this.code=null===(s=e.code)||void 0===s?void 0:s.encryptedString))}return e.template=function(){var t=new e;return t.cardholderName="John Doe",t.brand="visa",t.number="4242424242424242",t.expMonth="04",t.expYear="2023",t.code="123",t},e.toView=function(e,t){return void 0===t&&(t=new r.CardView),t.cardholderName=e.cardholderName,t.brand=e.brand,t.number=e.number,t.expMonth=e.expMonth,t.expYear=e.expYear,t.code=e.code,t},e.toDomain=function(e,t){return void 0===t&&(t=new i.Card),t.cardholderName=null!=e.cardholderName?new o.EncString(e.cardholderName):null,t.brand=null!=e.brand?new o.EncString(e.brand):null,t.number=null!=e.number?new o.EncString(e.number):null,t.expMonth=null!=e.expMonth?new o.EncString(e.expMonth):null,t.expYear=null!=e.expYear?new o.EncString(e.expYear):null,t.code=null!=e.code?new o.EncString(e.code):null,t},e}();t.Card=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Field=void 0;var r=n(131),i=n(261),o=n(98),a=n(401),s=function(){function e(e){var t,n;null!=e&&(e instanceof i.FieldView?(this.name=e.name,this.value=e.value):(this.name=null===(t=e.name)||void 0===t?void 0:t.encryptedString,this.value=null===(n=e.value)||void 0===n?void 0:n.encryptedString),this.type=e.type)}return e.template=function(){var t=new e;return t.name="Field name",t.value="Some value",t.type=r.FieldType.Text,t},e.toView=function(e,t){return void 0===t&&(t=new i.FieldView),t.type=e.type,t.value=e.value,t.name=e.name,t},e.toDomain=function(e,t){return void 0===t&&(t=new a.Field),t.type=e.type,t.value=null!=e.value?new o.EncString(e.value):null,t.name=null!=e.name?new o.EncString(e.name):null,t},e}();t.Field=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Identity=void 0;var r=n(140),i=n(98),o=n(402),a=function(){function e(e){var t,n,i,o,a,s,l,c,p,u,d,m,f,h,v,y,g,x;null!=e&&(e instanceof r.IdentityView?(this.title=e.title,this.firstName=e.firstName,this.middleName=e.middleName,this.lastName=e.lastName,this.address1=e.address1,this.address2=e.address2,this.address3=e.address3,this.city=e.city,this.state=e.state,this.postalCode=e.postalCode,this.country=e.country,this.company=e.company,this.email=e.email,this.phone=e.phone,this.ssn=e.ssn,this.username=e.username,this.passportNumber=e.passportNumber,this.licenseNumber=e.licenseNumber):(this.title=null===(t=e.title)||void 0===t?void 0:t.encryptedString,this.firstName=null===(n=e.firstName)||void 0===n?void 0:n.encryptedString,this.middleName=null===(i=e.middleName)||void 0===i?void 0:i.encryptedString,this.lastName=null===(o=e.lastName)||void 0===o?void 0:o.encryptedString,this.address1=null===(a=e.address1)||void 0===a?void 0:a.encryptedString,this.address2=null===(s=e.address2)||void 0===s?void 0:s.encryptedString,this.address3=null===(l=e.address3)||void 0===l?void 0:l.encryptedString,this.city=null===(c=e.city)||void 0===c?void 0:c.encryptedString,this.state=null===(p=e.state)||void 0===p?void 0:p.encryptedString,this.postalCode=null===(u=e.postalCode)||void 0===u?void 0:u.encryptedString,this.country=null===(d=e.country)||void 0===d?void 0:d.encryptedString,this.company=null===(m=e.company)||void 0===m?void 0:m.encryptedString,this.email=null===(f=e.email)||void 0===f?void 0:f.encryptedString,this.phone=null===(h=e.phone)||void 0===h?void 0:h.encryptedString,this.ssn=null===(v=e.ssn)||void 0===v?void 0:v.encryptedString,this.username=null===(y=e.username)||void 0===y?void 0:y.encryptedString,this.passportNumber=null===(g=e.passportNumber)||void 0===g?void 0:g.encryptedString,this.licenseNumber=null===(x=e.licenseNumber)||void 0===x?void 0:x.encryptedString))}return e.template=function(){var t=new e;return t.title="Mr",t.firstName="John",t.middleName="William",t.lastName="Doe",t.address1="123 Any St",t.address2="Apt #123",t.address3=null,t.city="New York",t.state="NY",t.postalCode="10001",t.country="US",t.company="Acme Inc.",t.email="john@company.com",t.phone="5555551234",t.ssn="000-123-4567",t.username="jdoe",t.passportNumber="US-123456789",t.licenseNumber="D123-12-123-12333",t},e.toView=function(e,t){return void 0===t&&(t=new r.IdentityView),t.title=e.title,t.firstName=e.firstName,t.middleName=e.middleName,t.lastName=e.lastName,t.address1=e.address1,t.address2=e.address2,t.address3=e.address3,t.city=e.city,t.state=e.state,t.postalCode=e.postalCode,t.country=e.country,t.company=e.company,t.email=e.email,t.phone=e.phone,t.ssn=e.ssn,t.username=e.username,t.passportNumber=e.passportNumber,t.licenseNumber=e.licenseNumber,t},e.toDomain=function(e,t){return void 0===t&&(t=new o.Identity),t.title=null!=e.title?new i.EncString(e.title):null,t.firstName=null!=e.firstName?new i.EncString(e.firstName):null,t.middleName=null!=e.middleName?new i.EncString(e.middleName):null,t.lastName=null!=e.lastName?new i.EncString(e.lastName):null,t.address1=null!=e.address1?new i.EncString(e.address1):null,t.address2=null!=e.address2?new i.EncString(e.address2):null,t.address3=null!=e.address3?new i.EncString(e.address3):null,t.city=null!=e.city?new i.EncString(e.city):null,t.state=null!=e.state?new i.EncString(e.state):null,t.postalCode=null!=e.postalCode?new i.EncString(e.postalCode):null,t.country=null!=e.country?new i.EncString(e.country):null,t.company=null!=e.company?new i.EncString(e.company):null,t.email=null!=e.email?new i.EncString(e.email):null,t.phone=null!=e.phone?new i.EncString(e.phone):null,t.ssn=null!=e.ssn?new i.EncString(e.ssn):null,t.username=null!=e.username?new i.EncString(e.username):null,t.passportNumber=null!=e.passportNumber?new i.EncString(e.passportNumber):null,t.licenseNumber=null!=e.licenseNumber?new i.EncString(e.licenseNumber):null,t},e}();t.Identity=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Login=void 0;var r=n(1207),i=n(160),o=n(98),a=n(403),s=function(){function e(e){var t,n,o;null!=e&&(null!=e.uris&&(i.LoginView,this.uris=e.uris.map((function(e){return new r.LoginUri(e)}))),e instanceof i.LoginView?(this.username=e.username,this.password=e.password,this.totp=e.totp):(this.username=null===(t=e.username)||void 0===t?void 0:t.encryptedString,this.password=null===(n=e.password)||void 0===n?void 0:n.encryptedString,this.totp=null===(o=e.totp)||void 0===o?void 0:o.encryptedString))}return e.template=function(){var t=new e;return t.uris=[],t.username="jdoe",t.password="myp@ssword123",t.totp="JBSWY3DPEHPK3PXP",t},e.toView=function(e,t){return void 0===t&&(t=new i.LoginView),null!=e.uris&&(t.uris=e.uris.map((function(e){return r.LoginUri.toView(e)}))),t.username=e.username,t.password=e.password,t.totp=e.totp,t},e.toDomain=function(e,t){return void 0===t&&(t=new a.Login),null!=e.uris&&(t.uris=e.uris.map((function(e){return r.LoginUri.toDomain(e)}))),t.username=null!=e.username?new o.EncString(e.username):null,t.password=null!=e.password?new o.EncString(e.password):null,t.totp=null!=e.totp?new o.EncString(e.totp):null,t},e}();t.Login=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoginUri=void 0;var r=n(308),i=n(98),o=n(404),a=function(){function e(e){var t;this.match=null,null!=e&&(e instanceof r.LoginUriView?this.uri=e.uri:this.uri=null===(t=e.uri)||void 0===t?void 0:t.encryptedString,this.match=e.match)}return e.template=function(){var t=new e;return t.uri="https://google.com",t.match=null,t},e.toView=function(e,t){return void 0===t&&(t=new r.LoginUriView),t.uri=e.uri,t.match=e.match,t},e.toDomain=function(e,t){return void 0===t&&(t=new o.LoginUri),t.uri=null!=e.uri?new i.EncString(e.uri):null,t.match=e.match,t},e}();t.LoginUri=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SecureNote=void 0;var r=n(104),i=n(103),o=n(406),a=function(){function e(e){null!=e&&(this.type=e.type)}return e.template=function(){var t=new e;return t.type=r.SecureNoteType.Generic,t},e.toView=function(e,t){return void 0===t&&(t=new i.SecureNoteView),t.type=e.type,t},e.toDomain=function(e,t){return void 0===t&&(t=new o.SecureNote),t.type=e.type,t},e}();t.SecureNote=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Collection=void 0;var r=n(179),i=n(178),o=n(98),a=function(){function e(){}return e.template=function(){var t=new e;return t.organizationId="00000000-0000-0000-0000-000000000000",t.name="Collection name",t.externalId=null,t},e.toView=function(e,t){return void 0===t&&(t=new r.CollectionView),t.name=e.name,t.externalId=e.externalId,null==t.organizationId&&(t.organizationId=e.organizationId),t},e.toDomain=function(e,t){return void 0===t&&(t=new i.Collection),t.name=null!=e.name?new o.EncString(e.name):null,t.externalId=e.externalId,null==t.organizationId&&(t.organizationId=e.organizationId),t},e.prototype.build=function(e){var t;this.organizationId=e.organizationId,e instanceof r.CollectionView?this.name=e.name:this.name=null===(t=e.name)||void 0===t?void 0:t.encryptedString,this.externalId=e.externalId},e}();t.Collection=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Event=void 0;var r=n(196),i=function(e){this.message=e.humanReadableMessage,this.appIcon=e.appIcon,this.appName=e.appName,this.userId=e.userId,this.userName=e.userName,this.userEmail=e.userEmail,this.date=e.date,this.ip=e.ip,this.type=r.EventType[e.type]};t.Event=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Folder=void 0;var r=n(141),i=n(98),o=n(692),a=function(){function e(){}return e.template=function(){var t=new e;return t.name="Folder name",t},e.toView=function(e,t){return void 0===t&&(t=new r.FolderView),t.name=e.name,t},e.toDomain=function(e,t){return void 0===t&&(t=new o.Folder),t.name=null!=e.name?new i.EncString(e.name):null,t},e.prototype.build=function(e){var t;e instanceof r.FolderView?this.name=e.name:this.name=null===(t=e.name)||void 0===t?void 0:t.encryptedString},e}();t.Folder=a},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]5e4)throw new Error("Cannot upload file, exceeds maximum size of "+5e4*a);i.label=1;case 1:i.trys.push([1,12,,13]),i.label=2;case 2:return s"})),t+=""},e.prototype.getMaxBlockSize=function(e){return s.compare(e,"2019-12-12")>=0?4194304e3:s.compare(e,"2016-05-31")>=0?104857600:4194304},e}();t.AzureFileUploadService=a;var s=function(){function e(e){this.year=0,this.month=0,this.day=0;try{var t=e.split("-").map((function(e){return Number.parseInt(e,10)}));this.year=t[0],this.month=t[1],this.day=t[2]}catch(n){}}return e.compare=function(t,n){return"string"==typeof t&&(t=new e(t)),"string"==typeof n&&(n=new e(n)),t.year!==n.year?t.year-n.year:t.month!==n.month?t.month-n.month:t.day!==n.day?t.day-n.day:0},e.prototype.compare=function(t){return e.compare(this,t)},e}()},function(e,t,n){"use strict";(function(e){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&this.cipherService.upsert(o)}return[2]}}))}))},e.prototype.deleteWithServer=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.apiService.deleteFolder(e)];case 1:return t.sent(),[4,this.delete(e)];case 2:return t.sent(),[2]}}))}))},e}();t.FolderService=m},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&(o=Math.floor(r.ciphers.length/2),s=r.ciphers.length-1,this.badData(r.ciphers[0])&&this.badData(r.ciphers[o])&&this.badData(r.ciphers[s])))return[2,new Error(this.i18nService.t("importFormatError"))];i.label=2;case 2:return i.trys.push([2,4,,5]),[4,this.postImport(r,n)];case 3:return i.sent(),[3,5];case 4:return l=i.sent(),c=new m.ErrorResponse(l,400),[2,this.handleServerError(c,r)];case 5:return[2,null];case 6:return a.Utils.isNullOrWhitespace(r.errorMessage)?[2,new Error(this.i18nService.t("importFormatError"))]:[2,new Error(r.errorMessage)];case 7:return[2]}}))}))},e.prototype.getImporter=function(e,t){void 0===t&&(t=null);var n=this.getImporterInstance(e);return null==n?null:(n.organizationId=t,n)},e.prototype.getImporterInstance=function(e){if(null==e||""===e)return null;switch(e){case"bitwardencsv":return new g.BitwardenCsvImporter;case"bitwardenjson":return new x.BitwardenJsonImporter(this.cryptoService,this.i18nService);case"lastpasscsv":case"passboltcsv":return new j.LastPassCsvImporter;case"keepassxcsv":return new B.KeePassXCsvImporter;case"aviracsv":return new y.AviraCsvImporter;case"blurcsv":return new S.BlurCsvImporter;case"safeincloudxml":return new re.SafeInCloudXmlImporter;case"padlockcsv":return new W.PadlockCsvImporter;case"keepass2xml":return new R.KeePass2XmlImporter;case"chromecsv":case"operacsv":case"vivaldicsv":return new C.ChromeCsvImporter;case"firefoxcsv":return new O.FirefoxCsvImporter;case"upmcsv":return new ce.UpmCsvImporter;case"saferpasscsv":return new ie.SaferPassCsvImporter;case"meldiumcsv":return new F.MeldiumCsvImporter;case"1password1pif":return new K.OnePassword1PifImporter;case"1passwordwincsv":return new q.OnePasswordWinCsvImporter;case"1passwordmaccsv":return new G.OnePasswordMacCsvImporter;case"keepercsv":return new U.KeeperCsvImporter;case"passworddragonxml":return new X.PasswordDragonXmlImporter;case"enpasscsv":return new _.EnpassCsvImporter;case"enpassjson":return new A.EnpassJsonImporter;case"pwsafexml":return new Z.PasswordSafeXmlImporter;case"dashlanejson":return new P.DashlaneJsonImporter;case"msecurecsv":return new N.MSecureCsvImporter;case"stickypasswordxml":return new se.StickyPasswordXmlImporter;case"truekeycsv":return new le.TrueKeyCsvImporter;case"clipperzhtml":return new I.ClipperzHtmlImporter;case"roboformcsv":return new ne.RoboFormCsvImporter;case"ascendocsv":return new f.AscendoCsvImporter;case"passwordbossjson":return new J.PasswordBossJsonImporter;case"zohovaultcsv":return new ue.ZohoVaultCsvImporter;case"splashidcsv":return new ae.SplashIdCsvImporter;case"passkeepcsv":return new H.PassKeepCsvImporter;case"gnomejson":return new T.GnomeJsonImporter;case"passwordagentcsv":return new Y.PasswordAgentCsvImporter;case"passpackcsv":return new Q.PasspackCsvImporter;case"passmanjson":return new $.PassmanJsonImporter;case"avastcsv":return new h.AvastCsvImporter;case"avastjson":return new v.AvastJsonImporter;case"fsecurefsk":return new M.FSecureFskImporter;case"kasperskytxt":return new D.KasperskyTxtImporter;case"remembearcsv":return new te.RememBearCsvImporter;case"passwordwallettxt":return new ee.PasswordWalletTxtImporter;case"mykicsv":return new z.MykiCsvImporter;case"securesafecsv":return new oe.SecureSafeCsvImporter;case"logmeoncecsv":return new V.LogMeOnceCsvImporter;case"blackberrycsv":return new b.BlackBerryCsvImporter;case"buttercupcsv":return new w.ButtercupCsvImporter;case"codebookcsv":return new E.CodebookCsvImporter;case"encryptrcsv":return new k.EncryptrCsvImporter;case"yoticsv":return new pe.YotiCsvImporter;case"nordpasscsv":return new L.NordPassCsvImporter;default:return null}},e.prototype.postImport=function(e,t){return void 0===t&&(t=null),r(this,void 0,void 0,(function(){var n,r,o,a,m;return i(this,(function(i){switch(i.label){case 0:if(null!=t)return[3,10];n=new p.ImportCiphersRequest,a=0,i.label=1;case 1:return a0&&(n+="\n\n"),"Folder"!==a&&"Collection"!==a&&(n+="["+(c+1)+"] "),n+="["+a+'] "'+i.name+'": '+l})),new Error(n)},e}();t.ImportService=de},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImportCiphersRequest=void 0;var r=function(){this.ciphers=[],this.folders=[],this.folderRelationships=[]};t.ImportCiphersRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImportOrganizationCiphersRequest=void 0;var r=function(){this.ciphers=[],this.collections=[],this.collectionRelationships=[]};t.ImportOrganizationCiphersRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KvpRequest=void 0;var r=function(e,t){this.key=e,this.value=t};t.KvpRequest=r},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AscendoCsvImporter=void 0;var o=n(30),a=n(31),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!1);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){if(!(e.length<2)){var r=t.initLoginCipher();if(r.notes=t.getValueOrDefault(e[e.length-1]),r.name=t.getValueOrDefault(e[0],"--"),e.length>2&&e.length%2==0)for(var i=0;i-1?r.login.password=t.getValueOrDefault(o):null==r.login.username&&t.usernameFieldNames.indexOf(s)>-1?r.login.username=t.getValueOrDefault(o):(null==r.login.uris||0===r.login.uris.length)&&t.uriFieldNames.indexOf(s)>-1?r.login.uris=t.makeUriArray(o):t.processKvp(r,a,o)}}t.convertToNoteIfNeeded(r),t.cleanupCipher(r),n.ciphers.push(r)}})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.AscendoCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AvastCsvImporter=void 0;var o=n(30),a=n(31),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){var r=t.initLoginCipher();r.name=t.getValueOrDefault(e.name),r.login.uris=t.makeUriArray(e.web),r.login.password=t.getValueOrDefault(e.password),r.login.username=t.getValueOrDefault(e.login),t.cleanupCipher(r),n.ciphers.push(r)})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.AvastCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AvastJsonImporter=void 0;var o=n(30),a=n(31),s=n(40),l=n(104),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=JSON.parse(e);return null==r?(n.success=!1,Promise.resolve(n)):(null!=r.logins&&r.logins.forEach((function(e){var r=t.initLoginCipher();r.name=t.getValueOrDefault(e.custName),r.notes=t.getValueOrDefault(e.note),r.login.uris=t.makeUriArray(e.url),r.login.password=t.getValueOrDefault(e.pwd),r.login.username=t.getValueOrDefault(e.loginName),t.cleanupCipher(r),n.ciphers.push(r)})),null!=r.notes&&r.notes.forEach((function(e){var r=t.initLoginCipher();r.type=s.CipherType.SecureNote,r.secureNote.type=l.SecureNoteType.Generic,r.name=t.getValueOrDefault(e.label),r.notes=t.getValueOrDefault(e.text),t.cleanupCipher(r),n.ciphers.push(r)})),null!=r.cards&&r.cards.forEach((function(e){var r=t.initLoginCipher();r.type=s.CipherType.Card,r.name=t.getValueOrDefault(e.custName),r.notes=t.getValueOrDefault(e.note),r.card.cardholderName=t.getValueOrDefault(e.holderName),r.card.number=t.getValueOrDefault(e.cardNumber),r.card.code=t.getValueOrDefault(e.cvv),r.card.brand=t.getCardBrand(r.card.number),null!=e.expirationDate&&(null!=e.expirationDate.month&&(r.card.expMonth=e.expirationDate.month+""),null!=e.expirationDate.year&&(r.card.expYear=e.expirationDate.year+"")),t.cleanupCipher(r),n.ciphers.push(r)})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.AvastJsonImporter=c},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AviraCsvImporter=void 0;var o=n(30),a=n(31),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){var r=t.initLoginCipher();r.name=t.getValueOrDefault(e.name,t.getValueOrDefault(t.nameFromUrl(e.website),"--")),r.login.uris=t.makeUriArray(e.website),r.login.password=t.getValueOrDefault(e.password),t.isNullOrWhitespace(e.username)&&!t.isNullOrWhitespace(e.secondary_username)?r.login.username=e.secondary_username:(r.login.username=t.getValueOrDefault(e.username),r.notes=t.getValueOrDefault(e.secondary_username)),t.cleanupCipher(r),n.ciphers.push(r)})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.AviraCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.BitwardenCsvImporter=void 0;var o=n(30),a=n(31),s=n(139),l=n(179),c=n(261),p=n(160),u=n(103),d=n(181),m=n(40),f=n(131),h=n(104),v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){t.organization&&!t.isNullOrWhitespace(e.collections)?e.collections.split(",").forEach((function(e){for(var t=!0,r=n.collections.length,i=0;ia+2&&(v.value=i[o].substr(a+2)),r.fields.push(v)}}if("note"===(null!=e.type?e.type.toLowerCase():null))r.type=m.CipherType.SecureNote,r.secureNote=new u.SecureNoteView,r.secureNote.type=h.SecureNoteType.Generic;else{r.type=m.CipherType.Login,r.login=new p.LoginView,r.login.totp=t.getValueOrDefault(e.login_totp||e.totp),r.login.username=t.getValueOrDefault(e.login_username||e.username),r.login.password=t.getValueOrDefault(e.login_password||e.password);var y=t.parseSingleRowCsv(e.login_uri||e.uri);r.login.uris=t.makeUriArray(y)}n.ciphers.push(r)})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.BitwardenCsvImporter=v},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]5&&(g.passwordHistory=g.passwordHistory.slice(0,5)),!this.organization&&null!=y.folderId&&n.has(y.folderId)?this.result.folderRelationships.push([this.result.ciphers.length,n.get(y.folderId)]):this.organization&&null!=y.collectionIds&&y.collectionIds.forEach((function(e){n.has(e)&&b.result.collectionRelationships.push([b.result.ciphers.length,n.get(e)])})),[4,g.decrypt()]):[3,16];case 14:x=a.sent(),this.cleanupCipher(x),this.result.ciphers.push(x),a.label=15;case 15:return h++,[3,13];case 16:return this.result.success=!0,[2]}}))}))},t.prototype.parseDecrypted=function(){var e=this,t=new Map;this.organization&&null!=this.results.collections?this.results.collections.forEach((function(n){var r=u.CollectionWithId.toView(n);null!=r&&(r.id=null,r.organizationId=null,t.set(n.id,e.result.collections.length),e.result.collections.push(r))})):this.organization||null==this.results.folders||this.results.folders.forEach((function(n){var r=d.FolderWithId.toView(n);null!=r&&(r.id=null,t.set(n.id,e.result.folders.length),e.result.folders.push(r))})),this.results.items.forEach((function(n){var r=p.CipherWithIds.toView(n);r.id=null,r.folderId=null,r.organizationId=null,r.collectionIds=null,null!=r.passwordHistory&&r.passwordHistory.length>5&&(r.passwordHistory=r.passwordHistory.slice(0,5)),!e.organization&&null!=n.folderId&&t.has(n.folderId)?e.result.folderRelationships.push([e.result.ciphers.length,t.get(n.folderId)]):e.organization&&null!=n.collectionIds&&n.collectionIds.forEach((function(n){t.has(n)&&e.result.collectionRelationships.push([e.result.ciphers.length,t.get(n)])})),e.cleanupCipher(r),e.result.ciphers.push(r)})),this.result.success=!0},t}(s.BaseImporter);t.BitwardenJsonImporter=m},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.BlackBerryCsvImporter=void 0;var o=n(30),a=n(31),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){if("list"!==e.grouping){var r=t.initLoginCipher();r.favorite="1"===e.fav,r.name=t.getValueOrDefault(e.name),r.notes=t.getValueOrDefault(e.extra),"note"!==e.grouping&&(r.login.uris=t.makeUriArray(e.url),r.login.password=t.getValueOrDefault(e.password),r.login.username=t.getValueOrDefault(e.username)),t.convertToNoteIfNeeded(r),t.cleanupCipher(r),n.ciphers.push(r)}})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.BlackBerryCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.BlurCsvImporter=void 0;var o=n(30),a=n(31),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){"null"===e.label&&(e.label=null);var r=t.initLoginCipher();r.name=t.getValueOrDefault(e.label,t.getValueOrDefault(t.nameFromUrl(e.domain),"--")),r.login.uris=t.makeUriArray(e.domain),r.login.password=t.getValueOrDefault(e.password),t.isNullOrWhitespace(e.email)&&!t.isNullOrWhitespace(e.username)?r.login.username=e.username:(r.login.username=t.getValueOrDefault(e.email),r.notes=t.getValueOrDefault(e.username)),t.cleanupCipher(r),n.ciphers.push(r)})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.BlurCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ButtercupCsvImporter=void 0;var o=n(30),a=n(31),s=["!group_id","!group_name","title","username","password","URL","id"],l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){t.processFolder(n,t.getValueOrDefault(e["!group_name"]));var r=t.initLoginCipher();r.name=t.getValueOrDefault(e.title,"--"),r.login.username=t.getValueOrDefault(e.username),r.login.password=t.getValueOrDefault(e.password),r.login.uris=t.makeUriArray(e.URL);var i=!1;for(var o in e)e.hasOwnProperty(o)&&(i||-1!==s.indexOf(o)||(i=!0),i&&t.processKvp(r,o,e[o]));t.cleanupCipher(r),n.ciphers.push(r)})),this.organization&&this.moveFoldersToCollections(n),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.ButtercupCsvImporter=l},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ChromeCsvImporter=void 0;var o=n(30),a=n(31),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){var r=t.initLoginCipher();r.name=t.getValueOrDefault(e.name,"--"),r.login.username=t.getValueOrDefault(e.username),r.login.password=t.getValueOrDefault(e.password),r.login.uris=t.makeUriArray(e.url),t.cleanupCipher(r),n.ciphers.push(r)})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.ChromeCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ClipperzHtmlImporter=void 0;var o=n(30),a=n(31),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseXml(e);if(null==r)return n.success=!1,Promise.resolve(n);var i=r.querySelector("textarea");return null==i||this.isNullOrWhitespace(i.textContent)?(n.errorMessage="Missing textarea.",n.success=!1,Promise.resolve(n)):(JSON.parse(i.textContent).forEach((function(e){var r=t.initLoginCipher();if(t.isNullOrWhitespace(e.label)||(r.name=e.label.split(" ")[0]),null==e.data||t.isNullOrWhitespace(e.data.notes)||(r.notes=e.data.notes.split("\\n").join("\n")),null!=e.currentVersion&&null!=e.currentVersion.fields)for(var i in e.currentVersion.fields)if(e.currentVersion.fields.hasOwnProperty(i)){var o=e.currentVersion.fields[i];switch(null!=o.actionType?o.actionType.toLowerCase():null){case"password":r.login.password=t.getValueOrDefault(o.value);break;case"email":case"username":case"user":case"name":r.login.username=t.getValueOrDefault(o.value);break;case"url":r.login.uris=t.makeUriArray(o.value);break;default:var a=null!=o.label?o.label.toLowerCase():null;null==r.login.password&&t.passwordFieldNames.indexOf(a)>-1?r.login.password=t.getValueOrDefault(o.value):null==r.login.username&&t.usernameFieldNames.indexOf(a)>-1?r.login.username=t.getValueOrDefault(o.value):(null==r.login.uris||0===r.login.uris.length)&&t.uriFieldNames.indexOf(a)>-1?r.login.uris=t.makeUriArray(o.value):t.processKvp(r,o.label,o.value)}}t.convertToNoteIfNeeded(r),t.cleanupCipher(r),n.ciphers.push(r)})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.ClipperzHtmlImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.CodebookCsvImporter=void 0;var o=n(30),a=n(31),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){t.processFolder(n,t.getValueOrDefault(e.Category));var r=t.initLoginCipher();r.favorite="True"===t.getValueOrDefault(e.Favorite),r.name=t.getValueOrDefault(e.Entry,"--"),r.notes=t.getValueOrDefault(e.Note),r.login.username=t.getValueOrDefault(e.Username,e.Email),r.login.password=t.getValueOrDefault(e.Password),r.login.totp=t.getValueOrDefault(e.TOTP),r.login.uris=t.makeUriArray(e.Website),t.isNullOrWhitespace(e.Username)||t.processKvp(r,"Email",e.Email),t.processKvp(r,"Phone",e.Phone),t.processKvp(r,"PIN",e.PIN),t.processKvp(r,"Account",e.Account),t.processKvp(r,"Date",e.Date),t.convertToNoteIfNeeded(r),t.cleanupCipher(r),n.ciphers.push(r)})),this.organization&&this.moveFoldersToCollections(n),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.CodebookCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.DashlaneJsonImporter=void 0;var o=n(30),a=n(31),s=n(87),l=n(139),c=n(140),p=n(103),u=n(40),d=n(104),m=new Set(["ADDRESS","AUTHENTIFIANT","BANKSTATEMENT","IDCARD","IDENTITY","PAYMENTMEANS_CREDITCARD","PAYMENTMEAN_PAYPAL","EMAIL"]),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){this.result=new a.ImportResult;var t=JSON.parse(e);if(null==t||0===t.length)return this.result.success=!1,Promise.resolve(this.result);for(var n in null!=t.ADDRESS&&this.processAddress(t.ADDRESS),null!=t.AUTHENTIFIANT&&this.processAuth(t.AUTHENTIFIANT),null!=t.BANKSTATEMENT&&this.processNote(t.BANKSTATEMENT,"BankAccountName"),null!=t.IDCARD&&this.processNote(t.IDCARD,"Fullname"),null!=t.PAYMENTMEANS_CREDITCARD&&this.processCard(t.PAYMENTMEANS_CREDITCARD),null!=t.IDENTITY&&this.processIdentity(t.IDENTITY),t)t.hasOwnProperty(n)&&!m.has(n)&&this.processNote(t[n],null,"Generic Note");return this.result.success=!0,Promise.resolve(this.result)},t.prototype.processAuth=function(e){var t=this;e.forEach((function(e){var n=t.initLoginCipher();n.name=t.getValueOrDefault(e.title),n.login.username=t.getValueOrDefault(e.login,t.getValueOrDefault(e.secondaryLogin)),t.isNullOrWhitespace(n.login.username)?n.login.username=t.getValueOrDefault(e.email):t.isNullOrWhitespace(e.email)||(n.notes="Email: "+e.email+"\n"),n.login.password=t.getValueOrDefault(e.password),n.login.uris=t.makeUriArray(e.domain),n.notes+=t.getValueOrDefault(e.note,""),t.convertToNoteIfNeeded(n),t.cleanupCipher(n),t.result.ciphers.push(n)}))},t.prototype.processIdentity=function(e){var t=this;e.forEach((function(e){var n=new l.CipherView;n.identity=new c.IdentityView,n.type=u.CipherType.Identity,n.name=t.getValueOrDefault(e.fullName,"");var r=n.name.split(" ");r.length>0&&(n.identity.firstName=t.getValueOrDefault(r[0])),2===r.length?n.identity.lastName=t.getValueOrDefault(r[1]):3===r.length&&(n.identity.middleName=t.getValueOrDefault(r[1]),n.identity.lastName=t.getValueOrDefault(r[2])),n.identity.username=t.getValueOrDefault(e.pseudo),t.cleanupCipher(n),t.result.ciphers.push(n)}))},t.prototype.processAddress=function(e){var t=this;e.forEach((function(e){var n=new l.CipherView;n.identity=new c.IdentityView,n.type=u.CipherType.Identity,n.name=t.getValueOrDefault(e.addressName),n.identity.address1=t.getValueOrDefault(e.addressFull),n.identity.city=t.getValueOrDefault(e.city),n.identity.state=t.getValueOrDefault(e.state),n.identity.postalCode=t.getValueOrDefault(e.zipcode),n.identity.country=t.getValueOrDefault(e.country),null!=n.identity.country&&(n.identity.country=n.identity.country.toUpperCase()),t.cleanupCipher(n),t.result.ciphers.push(n)}))},t.prototype.processCard=function(e){var t=this;e.forEach((function(e){var n=new l.CipherView;n.card=new s.CardView,n.type=u.CipherType.Card,n.name=t.getValueOrDefault(e.bank),n.card.number=t.getValueOrDefault(e.cardNumber),n.card.brand=t.getCardBrand(n.card.number),n.card.cardholderName=t.getValueOrDefault(e.owner),t.isNullOrWhitespace(n.card.brand)||(t.isNullOrWhitespace(n.name)?n.name=n.card.brand:n.name+=" - "+n.card.brand),t.cleanupCipher(n),t.result.ciphers.push(n)}))},t.prototype.processNote=function(e,t,n){var r=this;void 0===n&&(n=null),e.forEach((function(e){var i=new l.CipherView;for(var o in i.secureNote=new p.SecureNoteView,i.type=u.CipherType.SecureNote,i.secureNote.type=d.SecureNoteType.Generic,i.name=null!=n?n:r.getValueOrDefault(e[t]),e)e.hasOwnProperty(o)&&o!==t&&r.processKvp(i,o,e[o].toString());r.cleanupCipher(i),r.result.ciphers.push(i)}))},t}(o.BaseImporter);t.DashlaneJsonImporter=f},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.EncryptrCsvImporter=void 0;var o=n(30),a=n(31),s=n(87),l=n(40),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){var r=t.initLoginCipher();r.name=t.getValueOrDefault(e.Label,"--"),r.notes=t.getValueOrDefault(e.Notes);var i=t.getValueOrDefault(e.Text);t.isNullOrWhitespace(i)||(t.isNullOrWhitespace(r.notes)?r.notes=i:r.notes+="\n\n"+i);var o=e["Entry Type"];if("Password"===o)r.login.username=t.getValueOrDefault(e.Username),r.login.password=t.getValueOrDefault(e.Password),r.login.uris=t.makeUriArray(e["Site URL"]);else if("Credit Card"===o){r.type=l.CipherType.Card,r.card=new s.CardView,r.card.cardholderName=t.getValueOrDefault(e["Name on card"]),r.card.number=t.getValueOrDefault(e["Card Number"]),r.card.brand=t.getCardBrand(r.card.number),r.card.code=t.getValueOrDefault(e.CVV);var a=t.getValueOrDefault(e.Expiry);if(!t.isNullOrWhitespace(a)){var c=a.split("/");c.length>1&&(r.card.expMonth=parseInt(c[0],null).toString(),r.card.expYear=(2e3+parseInt(c[1],null)).toString())}}t.convertToNoteIfNeeded(r),t.cleanupCipher(r),n.ciphers.push(r)})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.EncryptrCsvImporter=c},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.EnpassCsvImporter=void 0;var o=n(30),a=n(31),s=n(40),l=n(104),c=n(87),p=n(103),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!1);if(null==r)return n.success=!1,Promise.resolve(n);var i=!0;return r.forEach((function(e){if(e.length<2||i&&("Title"===e[0]||"title"===e[0]))i=!1;else{var r=t.initLoginCipher();if(r.notes=t.getValueOrDefault(e[e.length-1]),r.name=t.getValueOrDefault(e[0],"--"),2!==e.length&&(t.containsField(e,"username")||t.containsField(e,"password")||t.containsField(e,"email")||t.containsField(e,"url"))||(r.type=s.CipherType.SecureNote,r.secureNote=new p.SecureNoteView,r.secureNote.type=l.SecureNoteType.Generic),t.containsField(e,"cardholder")&&t.containsField(e,"number")&&t.containsField(e,"expiry date")&&(r.type=s.CipherType.Card,r.card=new c.CardView),e.length>2&&e.length%2==0)for(var o=0;o0},t}(o.BaseImporter);t.EnpassCsvImporter=u},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.EnpassJsonImporter=void 0;var o=n(30),a=n(31),s=n(87),l=n(141),c=n(40),p=n(131),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=JSON.parse(e);if(null==r||null==r.items||0===r.items.length)return n.success=!1,Promise.resolve(n);var i=new Map,o=new Map,s=this.buildFolderTree(r.folders);return this.flattenFolderTree(null,s,i),i.forEach((function(e,t){o.set(t,n.folders.length);var r=new l.FolderView;r.name=e,n.folders.push(r)})),r.items.forEach((function(e){null!=e.folders&&e.folders.length>0&&o.has(e.folders[0])&&n.folderRelationships.push([n.ciphers.length,o.get(e.folders[0])]);var r=t.initLoginCipher();r.name=t.getValueOrDefault(e.title),r.favorite=e.favorite>0,null!=e.template_type&&null!=e.fields&&e.fields.length>0&&(0===e.template_type.indexOf("login.")||0===e.template_type.indexOf("password.")?t.processLogin(r,e.fields):0===e.template_type.indexOf("creditcard.")?t.processCard(r,e.fields):e.template_type.indexOf("identity.")<0&&e.fields.some((function(e){return"password"===e.type&&!t.isNullOrWhitespace(e.value)}))?t.processLogin(r,e.fields):t.processNote(r,e.fields)),r.notes+="\n"+t.getValueOrDefault(e.note,""),t.convertToNoteIfNeeded(r),t.cleanupCipher(r),n.ciphers.push(r)})),n.success=!0,Promise.resolve(n)},t.prototype.processLogin=function(e,t){var n=this,r=[];t.forEach((function(t){n.isNullOrWhitespace(t.value)||"section"===t.type||("username"!==t.type&&"email"!==t.type||!n.isNullOrWhitespace(e.login.username)?"password"===t.type&&n.isNullOrWhitespace(e.login.password)?e.login.password=t.value:"totp"===t.type&&n.isNullOrWhitespace(e.login.totp)?e.login.totp=t.value:"url"===t.type?r.push(t.value):n.processKvp(e,t.label,t.value,1===t.sensitive?p.FieldType.Hidden:p.FieldType.Text):e.login.username=t.value)})),e.login.uris=this.makeUriArray(r)},t.prototype.processCard=function(e,t){var n=this;e.card=new s.CardView,e.type=c.CipherType.Card,t.forEach((function(t){n.isNullOrWhitespace(t.value)||"section"===t.type||"ccType"===t.type||("ccName"===t.type&&n.isNullOrWhitespace(e.card.cardholderName)?e.card.cardholderName=t.value:"ccNumber"===t.type&&n.isNullOrWhitespace(e.card.number)?(e.card.number=t.value,e.card.brand=n.getCardBrand(e.card.number)):"ccCvc"===t.type&&n.isNullOrWhitespace(e.card.code)?e.card.code=t.value:"ccExpiry"===t.type&&n.isNullOrWhitespace(e.card.expYear)&&n.setCardExpiration(e,t.value)||n.processKvp(e,t.label,t.value,1===t.sensitive?p.FieldType.Hidden:p.FieldType.Text))}))},t.prototype.processNote=function(e,t){var n=this;t.forEach((function(t){n.isNullOrWhitespace(t.value)||"section"===t.type||n.processKvp(e,t.label,t.value,1===t.sensitive?p.FieldType.Hidden:p.FieldType.Text)}))},t.prototype.buildFolderTree=function(e){if(null==e)return[];var t=[],n=new Map([]);return e.forEach((function(e){n.set(e.uuid,e),e.children=[]})),e.forEach((function(e){null!=e.parent_uuid&&""!==e.parent_uuid&&n.has(e.parent_uuid)?n.get(e.parent_uuid).children.push(e):t.push(e)})),t},t.prototype.flattenFolderTree=function(e,t,n){var r=this;null!=t&&t.forEach((function(t){if(null!=t.title&&""!==t.title.trim()){var i=t.title.trim();null!=e&&""!==e.trim()&&(i=e+"/"+i),n.set(t.uuid,i),null!=t.children&&0!==t.children.length&&r.flattenFolderTree(i,t.children,n)}}))},t}(o.BaseImporter);t.EnpassJsonImporter=u},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.FirefoxCsvImporter=void 0;var o=n(30),a=n(31),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.filter((function(e){return"chrome://FirefoxAccounts"!==e.url})).forEach((function(e){var r=t.initLoginCipher(),i=t.getValueOrDefault(e.url,t.getValueOrDefault(e.hostname));r.name=t.getValueOrDefault(t.nameFromUrl(i),"--"),r.login.username=t.getValueOrDefault(e.username),r.login.password=t.getValueOrDefault(e.password),r.login.uris=t.makeUriArray(i),t.cleanupCipher(r),n.ciphers.push(r)})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.FirefoxCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.FSecureFskImporter=void 0;var o=n(30),a=n(31),s=n(87),l=n(40),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=new a.ImportResult,n=JSON.parse(e);if(null==n||null==n.data)return t.success=!1,Promise.resolve(t);for(var r in n.data)if(n.data.hasOwnProperty(r)){var i=n.data[r],o=this.initLoginCipher();if(o.name=this.getValueOrDefault(i.service),o.notes=this.getValueOrDefault(i.notes),"website"===i.style)o.login.username=this.getValueOrDefault(i.username),o.login.password=this.getValueOrDefault(i.password),o.login.uris=this.makeUriArray(i.url);else{if("creditcard"!==i.style)continue;o.type=l.CipherType.Card,o.card=new s.CardView,o.card.cardholderName=this.getValueOrDefault(i.username),o.card.number=this.getValueOrDefault(i.creditNumber),o.card.brand=this.getCardBrand(o.card.number),o.card.code=this.getValueOrDefault(i.creditCvv),this.isNullOrWhitespace(i.creditExpiry)||this.setCardExpiration(o,i.creditExpiry)||this.processKvp(o,"Expiration",i.creditExpiry),this.isNullOrWhitespace(i.password)||this.processKvp(o,"PIN",i.password)}this.convertToNoteIfNeeded(o),this.cleanupCipher(o),t.ciphers.push(o)}return t.success=!0,Promise.resolve(t)},t}(o.BaseImporter);t.FSecureFskImporter=c},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.GnomeJsonImporter=void 0;var o=n(30),a=n(31),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=JSON.parse(e);if(null==r||0===Object.keys(r).length)return n.success=!1,Promise.resolve(n);var i=function(e){if(!r.hasOwnProperty(e)||o.isNullOrWhitespace(e)||0===r[e].length)return"continue";r[e].forEach((function(r){if(!t.isNullOrWhitespace(r.display_name)&&0===r.display_name.indexOf("http")){t.processFolder(n,e);var i=t.initLoginCipher();if(i.name=r.display_name.replace("http://","").replace("https://",""),i.name.length>30&&(i.name=i.name.substring(0,30)),i.login.password=t.getValueOrDefault(r.secret),i.login.uris=t.makeUriArray(r.display_name),null!=r.attributes)for(var o in i.login.username=null!=r.attributes?t.getValueOrDefault(r.attributes.username_value):null,r.attributes)r.attributes.hasOwnProperty(o)&&"username_value"!==o&&"xdg:schema"!==o&&t.processKvp(i,o,r.attributes[o]);t.convertToNoteIfNeeded(i),t.cleanupCipher(i),n.ciphers.push(i)}}))},o=this;for(var s in r)i(s);return this.organization&&this.moveFoldersToCollections(n),n.success=!0,Promise.resolve(n)},t}(o.BaseImporter);t.GnomeJsonImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.KasperskyTxtImporter=void 0;var o=n(30),a=n(31),s="Notes\n\n",l="Applications\n\n",c="Websites\n\n",p="\n---\n",u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t,n,r,i,o=this,p=new a.ImportResult,u=this.splitNewLine(e).join("\n");-1!==u.indexOf(s)&&((i=u.split(s)).length>1&&(u=i[0],t=i[1]));-1!==u.indexOf(l)&&((i=u.split(l)).length>1&&(u=i[0],n=i[1]));0===u.indexOf(c)&&((i=u.split(c)).length>1&&(u=i[0],r=i[1]));var d=this.parseDataCategory(t),m=this.parseDataCategory(n),f=this.parseDataCategory(r);return d.forEach((function(e){var t=o.initLoginCipher();t.name=o.getValueOrDefault(e.get("Name")),t.notes=o.getValueOrDefault(e.get("Text")),o.cleanupCipher(t),p.ciphers.push(t)})),f.concat(m).forEach((function(e){var t=o.initLoginCipher(),n=e.has("Website name")?"Website name":"Application";t.name=o.getValueOrDefault(e.get(n),""),o.isNullOrWhitespace(e.get("Login name"))||(o.isNullOrWhitespace(t.name)||(t.name+=": "),t.name+=e.get("Login name")),t.notes=o.getValueOrDefault(e.get("Comment")),e.has("Website URL")&&(t.login.uris=o.makeUriArray(e.get("Website URL"))),t.login.username=o.getValueOrDefault(e.get("Login")),t.login.password=o.getValueOrDefault(e.get("Password")),o.cleanupCipher(t),p.ciphers.push(t)})),p.success=!0,Promise.resolve(p)},t.prototype.parseDataCategory=function(e){if(this.isNullOrWhitespace(e)||-1===e.indexOf(p))return[];var t=[];return e.split(p).forEach((function(e){if(-1!==e.indexOf("\n")){var n,r,i=new Map;e.split("\n").forEach((function(e){if(null==n){var t,o,a=e.indexOf(":");-1!==a&&(t=e.substring(0,a),e.length>a+1&&(o=e.substring(a+2)),null!=t&&i.set(t,o),"Comment"!==t&&"Text"!==t||(n=o,r=t))}else n+="\n"+e})),null!=n&&null!=r&&i.set(r,n),0!==i.size&&t.push(i)}})),t},t}(o.BaseImporter);t.KasperskyTxtImporter=u},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.KeePass2XmlImporter=void 0;var o=n(30),a=n(131),s=n(31),l=n(141),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.result=new s.ImportResult,t}return i(t,e),t.prototype.parse=function(e){var t=this.parseXml(e);if(null==t)return this.result.success=!1,Promise.resolve(this.result);var n=t.querySelector("KeePassFile > Root > Group");return null==n?(this.result.errorMessage="Missing `KeePassFile > Root > Group` node.",this.result.success=!1,Promise.resolve(this.result)):(this.traverse(n,!0,""),this.organization&&this.moveFoldersToCollections(this.result),this.result.success=!0,Promise.resolve(this.result))},t.prototype.traverse=function(e,t,n){var r=this,i=this.result.folders.length,o=n;if(!t){""!==o&&(o+="/");var s=this.querySelectorDirectChild(e,"Name");o+=null==s?"-":s.textContent;var c=new l.FolderView;c.name=o,this.result.folders.push(c)}this.querySelectorAllDirectChild(e,"Entry").forEach((function(e){var n=r.result.ciphers.length,o=r.initLoginCipher();r.querySelectorAllDirectChild(e,"String").forEach((function(e){var t=r.querySelectorDirectChild(e,"Value"),n=null!=t?t.textContent:null;if(!r.isNullOrWhitespace(n)){var i=r.querySelectorDirectChild(e,"Key"),s=null!=i?i.textContent:null;if("URL"===s)o.login.uris=r.makeUriArray(n);else if("UserName"===s)o.login.username=n;else if("Password"===s)o.login.password=n;else if("otp"===s)o.login.totp=n.replace("key=","");else if("Title"===s)o.name=n;else if("Notes"===s)o.notes+=n+"\n";else{var l=a.FieldType.Text,c=t.attributes;c.length>0&&null!=c.ProtectInMemory&&"True"===c.ProtectInMemory.value&&(l=a.FieldType.Hidden),r.processKvp(o,s,n,l)}}})),r.cleanupCipher(o),r.result.ciphers.push(o),t||r.result.folderRelationships.push([n,i])})),this.querySelectorAllDirectChild(e,"Group").forEach((function(e){r.traverse(e,!1,o)}))},t}(o.BaseImporter);t.KeePass2XmlImporter=c},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.KeePassXCsvImporter=void 0;var o=n(30),a=n(31),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){if(!t.isNullOrWhitespace(e.Title)){e.Group=!t.isNullOrWhitespace(e.Group)&&e.Group.startsWith("Root/")?e.Group.replace("Root/",""):e.Group;var r=t.isNullOrWhitespace(e.Group)?null:e.Group;t.processFolder(n,r);var i=t.initLoginCipher();i.notes=t.getValueOrDefault(e.Notes),i.name=t.getValueOrDefault(e.Title,"--"),i.login.username=t.getValueOrDefault(e.Username),i.login.password=t.getValueOrDefault(e.Password),i.login.uris=t.makeUriArray(e.URL),t.cleanupCipher(i),n.ciphers.push(i)}})),this.organization&&this.moveFoldersToCollections(n),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.KeePassXCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.KeeperCsvImporter=void 0;var o=n(30),a=n(31),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!1);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){if(!(e.length<6)){t.processFolder(n,e[0]);var r=t.initLoginCipher();if(r.notes=t.getValueOrDefault(e[5])+"\n",r.name=t.getValueOrDefault(e[1],"--"),r.login.username=t.getValueOrDefault(e[2]),r.login.password=t.getValueOrDefault(e[3]),r.login.uris=t.makeUriArray(e[4]),e.length>7)for(var i=7;i-1){var n=e.ccexp.split("-");n.length>1&&(t.expYear=n[0],t.expMonth=n[1],2===t.expMonth.length&&"0"===t.expMonth[0]&&(t.expMonth=t.expMonth[1]))}return t},t.prototype.parseIdentity=function(e){var t=new p.IdentityView;return t.title=this.getValueOrDefault(e.title),t.firstName=this.getValueOrDefault(e.firstname),t.middleName=this.getValueOrDefault(e.middlename),t.lastName=this.getValueOrDefault(e.lastname),t.username=this.getValueOrDefault(e.username),t.company=this.getValueOrDefault(e.company),t.ssn=this.getValueOrDefault(e.ssn),t.address1=this.getValueOrDefault(e.address1),t.address2=this.getValueOrDefault(e.address2),t.address3=this.getValueOrDefault(e.address3),t.city=this.getValueOrDefault(e.city),t.state=this.getValueOrDefault(e.state),t.postalCode=this.getValueOrDefault(e.zip),t.country=this.getValueOrDefault(e.country),t.email=this.getValueOrDefault(e.email),t.phone=this.getValueOrDefault(e.phone),this.isNullOrWhitespace(t.title)||(t.title=t.title.charAt(0).toUpperCase()+t.title.slice(1)),t},t.prototype.parseSecureNote=function(e,t){var n=this.splitNewLine(e.extra),r=!1;if(n.length){var i=n[0].split(":");if(i.length>1&&"NoteType"===i[0]&&("Credit Card"===i[1]||"Address"===i[1])){if("Credit Card"===i[1]){var o=this.parseSecureNoteMapping(t,n,{Number:"number","Name on Card":"cardholderName","Security Code":"code","Expiration Date":"expMonth"});if(this.isNullOrWhitespace(o.expMonth)||","===o.expMonth)o.expMonth=void 0;else{var a=o.expMonth.split(","),s=a[0],l=a[1];if(this.isNullOrWhitespace(s))o.expMonth=void 0;else{var c=new Date(Date.parse(s.trim()+" 1, 2012")).getMonth()+1;isNaN(c)?o.expMonth=void 0:o.expMonth=c.toString()}this.isNullOrWhitespace(l)||(o.expYear=l)}t.type=m.CipherType.Card,t.card=o}else if("Address"===i[1]){o=this.parseSecureNoteMapping(t,n,{Title:"title","First Name":"firstName","Last Name":"lastName","Middle Name":"middleName",Company:"company","Address 1":"address1","Address 2":"address2","Address 3":"address3","City / Town":"city",State:"state","Zip / Postal Code":"postalCode",Country:"country","Email Address":"email",Username:"username"});t.type=m.CipherType.Identity,t.identity=o}r=!0}}r||(t.secureNote=new d.SecureNoteView,t.secureNote.type=f.SecureNoteType.Generic,t.notes=this.getValueOrDefault(e.extra))},t.prototype.parseSecureNoteMapping=function(e,t,n){var r=this,i={},o=!1;return t.forEach((function(t){var a=null,s=null;if(!o){if(r.isNullOrWhitespace(t))return;var l=t.indexOf(":");if(-1===l?a=t:(a=t.substring(0,l),t.length>l&&(s=t.substring(l+1))),r.isNullOrWhitespace(a)||r.isNullOrWhitespace(s)||"NoteType"===a)return}o?e.notes+="\n"+t:"Notes"===a?(r.isNullOrWhitespace(e.notes)?e.notes=s:e.notes+="\n"+s,o=!0):n.hasOwnProperty(a)?i[n[a]]=s:r.processKvp(e,a,s)})),i},t}(o.BaseImporter);t.LastPassCsvImporter=h},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.LogMeOnceCsvImporter=void 0;var o=n(30),a=n(31),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!1);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){if(!(e.length<4)){var r=t.initLoginCipher();r.name=t.getValueOrDefault(e[0],"--"),r.login.username=t.getValueOrDefault(e[2]),r.login.password=t.getValueOrDefault(e[3]),r.login.uris=t.makeUriArray(e[1]),t.cleanupCipher(r),n.ciphers.push(r)}})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.LogMeOnceCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.MeldiumCsvImporter=void 0;var o=n(30),a=n(31),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){var r=t.initLoginCipher();r.name=t.getValueOrDefault(e.DisplayName,"--"),r.notes=t.getValueOrDefault(e.Notes),r.login.username=t.getValueOrDefault(e.UserName),r.login.password=t.getValueOrDefault(e.Password),r.login.uris=t.makeUriArray(e.Url),t.cleanupCipher(r),n.ciphers.push(r)})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.MeldiumCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.MSecureCsvImporter=void 0;var o=n(30),a=n(31),s=n(40),l=n(104),c=n(103),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!1);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){if(!(e.length<3)){var r="Unassigned"!==t.getValueOrDefault(e[0],"Unassigned")?e[0]:null;t.processFolder(n,r);var i=t.initLoginCipher();if(i.name=t.getValueOrDefault(e[2],"--"),"Web Logins"===e[1]||"Login"===e[1])i.login.uris=t.makeUriArray(e[4]),i.login.username=t.getValueOrDefault(e[5]),i.login.password=t.getValueOrDefault(e[6]),i.notes=t.isNullOrWhitespace(e[3])?null:e[3].split("\\n").join("\n");else if(e.length>3){i.type=s.CipherType.SecureNote,i.secureNote=new c.SecureNoteView,i.secureNote.type=l.SecureNoteType.Generic;for(var o=3;o0&&(e.identity.firstName=this.getValueOrDefault(n[0])),2===n.length?e.identity.lastName=this.getValueOrDefault(n[1]):n.length>=3&&(e.identity.middleName=this.getValueOrDefault(n[1]),e.identity.lastName=n.slice(2,n.length).join(" "))}},t}(o.BaseImporter);t.NordPassCsvImporter=u},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.OnePassword1PifImporter=void 0;var o=n(30),a=n(31),s=n(87),l=n(140),c=n(405),p=n(103),u=n(40),d=n(131),m=n(104),f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.result=new a.ImportResult,t}return i(t,e),t.prototype.parse=function(e){var t=this;return e.split(this.newLineRegex).forEach((function(e){if(!t.isNullOrWhitespace(e)&&"{"===e[0]){var n=JSON.parse(e);if(!0!==n.trashed){var r=t.initLoginCipher();t.isNullOrWhitespace(n.hmac)?t.processStandardItem(n,r):t.processWinOpVaultItem(n,r),t.convertToNoteIfNeeded(r),t.cleanupCipher(r),t.result.ciphers.push(r)}}})),this.result.success=!0,Promise.resolve(this.result)},t.prototype.processWinOpVaultItem=function(e,t){var n=this;if(null!=e.overview&&(t.name=this.getValueOrDefault(e.overview.title),null!=e.overview.URLs)){var r=[];e.overview.URLs.forEach((function(e){n.isNullOrWhitespace(e.u)||r.push(e.u)})),t.login.uris=this.makeUriArray(r)}null!=e.details&&(null!=e.details.passwordHistory&&this.parsePasswordHistory(e.details.passwordHistory,t),this.isNullOrWhitespace(e.details.ccnum)&&this.isNullOrWhitespace(e.details.cvv)?this.isNullOrWhitespace(e.details.firstname)&&this.isNullOrWhitespace(e.details.address1)||(t.type=u.CipherType.Identity,t.identity=new l.IdentityView):(t.type=u.CipherType.Card,t.card=new s.CardView),t.type!==u.CipherType.Login||this.isNullOrWhitespace(e.details.password)||(t.login.password=e.details.password),this.isNullOrWhitespace(e.details.notesPlain)||(t.notes=e.details.notesPlain.split(this.newLineRegex).join("\n")+"\n"),null!=e.details.fields&&this.parseFields(e.details.fields,t,"designation","value","name"),null!=e.details.sections&&e.details.sections.forEach((function(e){null!=e.fields&&n.parseFields(e.fields,t,"n","v","t")})))},t.prototype.processStandardItem=function(e,t){var n=this;if(t.favorite=!(!e.openContents||!e.openContents.faveIndex),t.name=this.getValueOrDefault(e.title),"securenotes.SecureNote"===e.typeName?(t.type=u.CipherType.SecureNote,t.secureNote=new p.SecureNoteView,t.secureNote.type=m.SecureNoteType.Generic):"wallet.financial.CreditCard"===e.typeName?(t.type=u.CipherType.Card,t.card=new s.CardView):"identities.Identity"===e.typeName?(t.type=u.CipherType.Identity,t.identity=new l.IdentityView):t.login.uris=this.makeUriArray(e.location),null!=e.secureContents){if(null!=e.secureContents.passwordHistory&&this.parsePasswordHistory(e.secureContents.passwordHistory,t),this.isNullOrWhitespace(e.secureContents.notesPlain)||(t.notes=e.secureContents.notesPlain.split(this.newLineRegex).join("\n")+"\n"),t.type===u.CipherType.Login&&(this.isNullOrWhitespace(e.secureContents.password)||(t.login.password=e.secureContents.password),null!=e.secureContents.URLs)){var r=[];e.secureContents.URLs.forEach((function(e){n.isNullOrWhitespace(e.url)||r.push(e.url)})),r.length>0&&(t.login.uris=this.makeUriArray(r))}null!=e.secureContents.fields&&this.parseFields(e.secureContents.fields,t,"designation","value","name"),null!=e.secureContents.sections&&e.secureContents.sections.forEach((function(e){null!=e.fields&&n.parseFields(e.fields,t,"n","v","t")}))}},t.prototype.parsePasswordHistory=function(e,t){var n=this,r=e.length>5?5:e.length;t.passwordHistory=e.filter((function(e){return!n.isNullOrWhitespace(e.value)&&null!=e.time})).sort((function(e,t){return t.time-e.time})).slice(0,r).map((function(e){var t=new c.PasswordHistoryView;return t.password=e.value,t.lastUsedDate=new Date((""+e.time).length>=13?e.time:1e3*e.time),t}))},t.prototype.parseFields=function(e,t,n,r,i){var o=this;e.forEach((function(e){if(null!=e[r]&&""!==e[r].toString().trim()){var a=e[r].toString(),s=null!=e[n]?e[n].toString():null;if(t.type===u.CipherType.Login){if(o.isNullOrWhitespace(t.login.username)&&"username"===s)return void(t.login.username=a);if(o.isNullOrWhitespace(t.login.password)&&"password"===s)return void(t.login.password=a);if(o.isNullOrWhitespace(t.login.totp)&&null!=s&&s.startsWith("TOTP_"))return void(t.login.totp=a)}else if(t.type===u.CipherType.Card){if(o.isNullOrWhitespace(t.card.number)&&"ccnum"===s)return t.card.number=a,void(t.card.brand=o.getCardBrand(a));if(o.isNullOrWhitespace(t.card.code)&&"cvv"===s)return void(t.card.code=a);if(o.isNullOrWhitespace(t.card.cardholderName)&&"cardholder"===s)return void(t.card.cardholderName=a);if(o.isNullOrWhitespace(t.card.expiration)&&"expiry"===s&&6===a.length)return t.card.expMonth=a.substr(4,2),"0"===t.card.expMonth[0]&&(t.card.expMonth=t.card.expMonth.substr(1,1)),void(t.card.expYear=a.substr(0,4));if("type"===s)return}else if(t.type===u.CipherType.Identity){var l=t.identity;if(o.isNullOrWhitespace(l.firstName)&&"firstname"===s)return void(l.firstName=a);if(o.isNullOrWhitespace(l.lastName)&&"lastname"===s)return void(l.lastName=a);if(o.isNullOrWhitespace(l.middleName)&&"initial"===s)return void(l.middleName=a);if(o.isNullOrWhitespace(l.phone)&&"defphone"===s)return void(l.phone=a);if(o.isNullOrWhitespace(l.company)&&"company"===s)return void(l.company=a);if(o.isNullOrWhitespace(l.email)&&"email"===s)return void(l.email=a);if(o.isNullOrWhitespace(l.username)&&"username"===s)return void(l.username=a);if("address"===s){var c=e[r],p=c.street,m=c.city,f=c.country,h=c.zip;return l.address1=o.getValueOrDefault(p),l.city=o.getValueOrDefault(m),o.isNullOrWhitespace(f)||(l.country=f.toUpperCase()),void(l.postalCode=o.getValueOrDefault(h))}}var v=o.isNullOrWhitespace(e[i])?"no_name":e[i];if("password"!==v||null==t.passwordHistory||!t.passwordHistory.some((function(e){return e.password===a}))){var y="concealed"===e.k?d.FieldType.Hidden:d.FieldType.Text;o.processKvp(t,v,a,y)}}}))},t}(o.BaseImporter);t.OnePassword1PifImporter=f},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.OnePasswordMacCsvImporter=void 0;var o=n(694),a=n(40),s=n(87),l=n(140),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.setCipherType=function(e,t){switch(this.getValueOrDefault(this.getProp(e,"type"),"Login")){case"Credit Card":t.type=a.CipherType.Card,t.card=new s.CardView,o.IgnoredProperties.push("type");break;case"Identity":t.type=a.CipherType.Identity,t.identity=new l.IdentityView,o.IgnoredProperties.push("type");break;case"Login":case"Secure Note":o.IgnoredProperties.push("type")}},t}(o.OnePasswordCsvImporter);t.OnePasswordMacCsvImporter=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CipherImportContext=void 0;var r=function(e,t,n){this.importRecord=e,this.property=t,this.cipher=n,this.lowerProperty=t.toLowerCase()};t.CipherImportContext=r},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.OnePasswordWinCsvImporter=void 0;var o=n(694),a=n(40),s=n(87),l=n(140),c=n(160),p=function(e){function t(){var t=e.call(this)||this;return t.identityPropertyParsers.push(t.setIdentityAddress),t}return i(t,e),t.prototype.setCipherType=function(e,t){t.type=a.CipherType.Login,t.login=new c.LoginView,this.isNullOrWhitespace(this.getPropByRegexp(e,/\d+: number/i))||this.isNullOrWhitespace(this.getPropByRegexp(e,/\d+: expiry date/i))||(t.type=a.CipherType.Card,t.card=new s.CardView),this.isNullOrWhitespace(this.getPropByRegexp(e,/name \d+: first name/i))&&this.isNullOrWhitespace(this.getPropByRegexp(e,/name \d+: initial/i))&&this.isNullOrWhitespace(this.getPropByRegexp(e,/name \d+: last name/i))&&this.isNullOrWhitespace(this.getPropByRegexp(e,/internet \d+: email/i))||(t.type=a.CipherType.Identity,t.identity=new l.IdentityView)},t.prototype.setIdentityAddress=function(e){return!!e.lowerProperty.match(/address \d+: address/i)&&(this.processKvp(e.cipher,"address",e.importRecord[e.property]),!0)},t.prototype.setCreditCardExpiry=function(e){if(this.isNullOrWhitespace(e.cipher.card.expiration)&&e.lowerProperty.includes("expiry date")){var t=e.importRecord[e.property].split("/");return e.cipher.card.expMonth=t[0],"0"===e.cipher.card.expMonth[0]&&2===e.cipher.card.expMonth.length&&(e.cipher.card.expMonth=e.cipher.card.expMonth.substr(1,1)),e.cipher.card.expYear=t[2].length>4?t[2].substr(0,4):t[2],!0}return!1},t}(o.OnePasswordCsvImporter);t.OnePasswordWinCsvImporter=p},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PadlockCsvImporter=void 0;var o=n(30),a=n(31),s=n(179),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!1);if(null==r)return n.success=!1,Promise.resolve(n);var i=null;return r.forEach((function(e){if(null!=i){if(!(e.length<2||e.length!==i.length)){if(!t.isNullOrWhitespace(e[1]))if(t.organization){(r=e[1].split(",")).forEach((function(e){e=e.trim();for(var t=!0,r=n.collections.length,i=0;i0?r[0].trim():null;t.processFolder(n,o)}var a=t.initLoginCipher();a.name=t.getValueOrDefault(e[0],"--");for(var l=2;l-1?a.login.username=e[l]:t.passwordFieldNames.indexOf(c)>-1?a.login.password=e[l]:t.uriFieldNames.indexOf(c)>-1?a.login.uris=t.makeUriArray(e[l]):t.processKvp(a,i[l],e[l]))}t.cleanupCipher(a),n.ciphers.push(a)}}else i=e.map((function(e){return e}))})),n.success=!0,Promise.resolve(n)},t}(o.BaseImporter);t.PadlockCsvImporter=l},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PassKeepCsvImporter=void 0;var o=n(30),a=n(31),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){t.processFolder(n,t.getValue("category",e));var r=t.initLoginCipher();r.notes=t.getValue("description",e),r.name=t.getValueOrDefault(t.getValue("title",e),"--"),r.login.username=t.getValue("username",e),r.login.password=t.getValue("password",e),r.login.uris=t.makeUriArray(t.getValue("site",e)),t.processKvp(r,"Password 2",t.getValue("password2",e)),t.cleanupCipher(r),n.ciphers.push(r)})),this.organization&&this.moveFoldersToCollections(n),n.success=!0,Promise.resolve(n))},t.prototype.getValue=function(e,t){return this.getValueOrDefault(t[e],this.getValueOrDefault(t[" "+e]))},t}(o.BaseImporter);t.PassKeepCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PassmanJsonImporter=void 0;var o=n(30),a=n(31),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=JSON.parse(e);return null==r||0===r.length?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){if(null!=e.tags&&e.tags.length>0){var r=e.tags[0].text;t.processFolder(n,r)}var i=t.initLoginCipher();i.name=e.label,i.login.username=t.getValueOrDefault(e.username),t.isNullOrWhitespace(i.login.username)?i.login.username=t.getValueOrDefault(e.email):t.isNullOrWhitespace(e.email)||(i.notes="Email: "+e.email+"\n"),i.login.password=t.getValueOrDefault(e.password),i.login.uris=t.makeUriArray(e.url),i.notes+=t.getValueOrDefault(e.description,""),null!=e.otp&&(i.login.totp=t.getValueOrDefault(e.otp.secret)),null!=e.custom_fields&&e.custom_fields.forEach((function(e){switch(e.field_type){case"text":case"password":t.processKvp(i,e.label,e.value)}})),t.convertToNoteIfNeeded(i),t.cleanupCipher(i),n.ciphers.push(i)})),this.organization&&this.moveFoldersToCollections(n),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.PassmanJsonImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PasspackCsvImporter=void 0;var o=n(30),a=n(31),s=n(179),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){var r=t.isNullOrWhitespace(e.Tags)?null:JSON.parse(e.Tags),i=null!=r&&null!=r.tags&&r.tags.length>0?r.tags.map((function(e){try{var n=JSON.parse(e);return t.getValueOrDefault(n.tag)}catch(r){}return null})).filter((function(e){return!t.isNullOrWhitespace(e)})):null;t.organization&&null!=i&&i.length>0?i.forEach((function(e){for(var t=!0,r=n.collections.length,i=0;i0&&t.processFolder(n,i[0]);var o=t.initLoginCipher();o.notes=t.getValueOrDefault(e.Notes,""),o.notes+="\n\n"+t.getValueOrDefault(e["Shared Notes"],"")+"\n",o.name=t.getValueOrDefault(e["Entry Name"],"--"),o.login.username=t.getValueOrDefault(e["User ID"]),o.login.password=t.getValueOrDefault(e.Password),o.login.uris=t.makeUriArray(e.URL),null!=e.__parsed_extra&&e.__parsed_extra.length>0&&e.__parsed_extra.forEach((function(e){t.isNullOrWhitespace(e)||(o.notes+="\n"+e)}));var a=t.isNullOrWhitespace(e["Extra Fields"])?null:JSON.parse(e["Extra Fields"]),l=null!=a&&null!=a.extraFields&&a.extraFields.length>0?a.extraFields.map((function(e){try{return JSON.parse(e)}catch(t){}return null})):null;null!=l&&l.forEach((function(e){null!=e&&t.processKvp(o,e.name,e.data)})),t.cleanupCipher(o),n.ciphers.push(o)})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.PasspackCsvImporter=l},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordAgentCsvImporter=void 0;var o=n(30),a=n(31),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!1);if(null==r)return n.success=!1,Promise.resolve(n);var i=!0;return r.forEach((function(e){if(!(5!==e.length&&e.length<9)){var r=10===e.length&&"0"===e[0],o=t.initLoginCipher();if(o.name=t.getValueOrDefault(e[r?1:0],"--"),o.login.username=t.getValueOrDefault(e[r?2:1]),o.login.password=t.getValueOrDefault(e[r?3:2]),5===e.length)i=!1,o.notes=t.getValueOrDefault(e[4]),o.login.uris=t.makeUriArray(e[3]);else{var a=t.getValueOrDefault(e[r?9:8],"(None)"),s="(None)"!==a?a.split("\\").join("/"):null;null!=s&&(s=a.split(" > ").join("/"),s=a.split(">").join("/")),t.processFolder(n,s),o.notes=t.getValueOrDefault(e[r?5:3]),o.login.uris=t.makeUriArray(e[4])}t.convertToNoteIfNeeded(o),t.cleanupCipher(o),n.ciphers.push(o)}})),i&&this.organization&&this.moveFoldersToCollections(n),n.success=!0,Promise.resolve(n)},t}(o.BaseImporter);t.PasswordAgentCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordBossJsonImporter=void 0;var o=n(30),a=n(31),s=n(87),l=n(141),c=n(40),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=JSON.parse(e);if(null==r||null==r.items)return n.success=!1,Promise.resolve(n);var i=new Map;r.folders.forEach((function(e){i.set(e.id,e.name)}));var o=new Map;return i.forEach((function(e,t){o.set(t,n.folders.length);var r=new l.FolderView;r.name=e,n.folders.push(r)})),r.items.forEach((function(e){var r=t.initLoginCipher();if(r.name=t.getValueOrDefault(e.name,"--"),r.login.uris=t.makeUriArray(e.login_url),null!=e.folder&&o.has(e.folder)&&n.folderRelationships.push([n.ciphers.length,o.get(e.folder)]),null!=e.identifiers){for(var i in t.isNullOrWhitespace(e.identifiers.notes)||(r.notes=e.identifiers.notes.split("\\r\\n").join("\n").split("\\n").join("\n")),"CreditCard"===e.type&&(r.card=new s.CardView,r.type=c.CipherType.Card),e.identifiers)if(e.identifiers.hasOwnProperty(i)){var a=e.identifiers[i],l=null!=a?a.toString():null;if(!t.isNullOrWhitespace(l)&&"notes"!==i&&"ignoreItemInSecurityScore"!==i)if("custom_fields"!==i){if(r.type===c.CipherType.Card){if("cardNumber"===i){r.card.number=l,r.card.brand=t.getCardBrand(l);continue}if("nameOnCard"===i){r.card.cardholderName=l;continue}if("security_code"===i){r.card.code=l;continue}if("expires"===i){try{var p=new Date(l);r.card.expYear=p.getFullYear().toString(),r.card.expMonth=(p.getMonth()+1).toString()}catch(u){}continue}if("cardType"===i)continue}else{if(("username"===i||"email"===i)&&t.isNullOrWhitespace(r.login.username)){r.login.username=l;continue}if("password"===i){r.login.password=l;continue}if("totp"===i){r.login.totp=l;continue}if((null==r.login.uris||0===r.login.uris.length)&&t.uriFieldNames.indexOf(i)>-1){r.login.uris=t.makeUriArray(l);continue}}t.processKvp(r,i,l)}else a.forEach((function(e){t.processKvp(r,e.name,e.value)}))}t.convertToNoteIfNeeded(r),t.cleanupCipher(r),n.ciphers.push(r)}})),n.success=!0,Promise.resolve(n)},t}(o.BaseImporter);t.PasswordBossJsonImporter=p},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordDragonXmlImporter=void 0;var o=n(30),a=n(31),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseXml(e);if(null==r)return n.success=!1,Promise.resolve(n);var i=r.querySelectorAll("PasswordManager > record");return Array.from(i).forEach((function(e){var r=t.querySelectorDirectChild(e,"Category"),i=null==r||t.isNullOrWhitespace(r.textContent)||"Unfiled"===r.textContent?null:r.textContent;t.processFolder(n,i);var o=t.querySelectorDirectChild(e,"Account-Name"),a=t.querySelectorDirectChild(e,"User-Id"),s=t.querySelectorDirectChild(e,"Password"),l=t.querySelectorDirectChild(e,"URL"),c=t.querySelectorDirectChild(e,"Notes"),p=t.initLoginCipher();p.name=null!=o?t.getValueOrDefault(o.textContent,"--"):"--",p.notes=null!=c?t.getValueOrDefault(c.textContent):"",p.login.username=null!=a?t.getValueOrDefault(a.textContent):null,p.login.password=null!=s?t.getValueOrDefault(s.textContent):null,p.login.uris=null!=l?t.makeUriArray(l.textContent):null;for(var u=[],d=1;d<=10;d++)u.push("Attribute-"+d);t.querySelectorAllDirectChild(e,u.join(",")).forEach((function(e){t.isNullOrWhitespace(e.textContent)||"null"===e.textContent||t.processKvp(p,e.tagName,e.textContent)})),t.cleanupCipher(p),n.ciphers.push(p)})),this.organization&&this.moveFoldersToCollections(n),n.success=!0,Promise.resolve(n)},t}(o.BaseImporter);t.PasswordDragonXmlImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordSafeXmlImporter=void 0;var o=n(30),a=n(31),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseXml(e);if(null==r)return n.success=!1,Promise.resolve(n);var i=r.querySelector("passwordsafe");if(null==i)return n.errorMessage="Missing `passwordsafe` node.",n.success=!1,Promise.resolve(n);var o=i.getAttribute("delimiter"),s=r.querySelectorAll("passwordsafe > entry");return Array.from(s).forEach((function(e){var r=t.querySelectorDirectChild(e,"group"),i=null==r||t.isNullOrWhitespace(r.textContent)?null:r.textContent.split(".").join("/");t.processFolder(n,i);var a=t.querySelectorDirectChild(e,"title"),s=t.querySelectorDirectChild(e,"username"),l=t.querySelectorDirectChild(e,"email"),c=t.querySelectorDirectChild(e,"password"),p=t.querySelectorDirectChild(e,"url"),u=t.querySelectorDirectChild(e,"notes"),d=t.initLoginCipher();d.name=null!=a?t.getValueOrDefault(a.textContent,"--"):"--",d.notes=null!=u?t.getValueOrDefault(u.textContent,"").split(o).join("\n"):null,d.login.username=null!=s?t.getValueOrDefault(s.textContent):null,d.login.password=null!=c?t.getValueOrDefault(c.textContent):null,d.login.uris=null!=p?t.makeUriArray(p.textContent):null,t.isNullOrWhitespace(d.login.username)&&null!=l?d.login.username=t.getValueOrDefault(l.textContent):null==l||t.isNullOrWhitespace(l.textContent)||(d.notes=t.isNullOrWhitespace(d.notes)?"Email: "+l.textContent:d.notes+"\nEmail: "+l.textContent),t.cleanupCipher(d),n.ciphers.push(d)})),this.organization&&this.moveFoldersToCollections(n),n.success=!0,Promise.resolve(n)},t}(o.BaseImporter);t.PasswordSafeXmlImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordWalletTxtImporter=void 0;var o=n(30),a=n(31),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!1);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){if(!(e.length<1)){e.length>5&&t.processFolder(n,e[5]);var r=t.initLoginCipher();r.name=t.getValueOrDefault(e[0],"--"),e.length>4&&(r.notes=t.getValueOrDefault(e[4],"").split("¬").join("\n")),e.length>2&&(r.login.username=t.getValueOrDefault(e[2])),e.length>3&&(r.login.password=t.getValueOrDefault(e[3])),e.length>1&&(r.login.uris=t.makeUriArray(e[1])),t.cleanupCipher(r),n.ciphers.push(r)}})),this.organization&&this.moveFoldersToCollections(n),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.PasswordWalletTxtImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.RememBearCsvImporter=void 0;var o=n(30),a=n(40),s=n(31),l=n(87),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new s.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){if("true"!==e.trash){var r=t.initLoginCipher();if(r.name=t.getValueOrDefault(e.name),r.notes=t.getValueOrDefault(e.notes),"LoginItem"===e.type)r.login.uris=t.makeUriArray(e.website),r.login.password=t.getValueOrDefault(e.password),r.login.username=t.getValueOrDefault(e.username);else if("CreditCardItem"===e.type){r.type=a.CipherType.Card,r.card=new l.CardView,r.card.cardholderName=t.getValueOrDefault(e.cardholder),r.card.number=t.getValueOrDefault(e.number),r.card.brand=t.getCardBrand(r.card.number),r.card.code=t.getValueOrDefault(e.verification);try{var i=t.getValueOrDefault(e.expiryMonth);if(null!=i){var o=parseInt(i,null);null!=o&&o>=1&&o<=12&&(r.card.expMonth=o.toString())}}catch(d){}try{var s=t.getValueOrDefault(e.expiryYear);if(null!=s){var c=parseInt(s,null);null!=c&&(r.card.expYear=c.toString())}}catch(m){}var p=t.getValueOrDefault(e.pin);null!=p&&t.processKvp(r,"PIN",p);var u=t.getValueOrDefault(e.zipCode);null!=u&&t.processKvp(r,"Zip Code",u)}t.cleanupCipher(r),n.ciphers.push(r)}})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.RememBearCsvImporter=c},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.RoboFormCsvImporter=void 0;var o=n(30),a=n(31),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);if(null==r)return n.success=!1,Promise.resolve(n);var i=1;return r.forEach((function(e){var o=!t.isNullOrWhitespace(e.Folder)&&e.Folder.startsWith("/")?e.Folder.replace("/",""):e.Folder,a=t.isNullOrWhitespace(o)?null:o;t.processFolder(n,a);var s=t.initLoginCipher();if(s.notes=t.getValueOrDefault(e.Note),s.name=t.getValueOrDefault(e.Name,"--"),s.login.username=t.getValueOrDefault(e.Login),s.login.password=t.getValueOrDefault(e.Pwd),s.login.uris=t.makeUriArray(e.Url),!t.isNullOrWhitespace(e.Rf_fields)){var l=[e.Rf_fields];null!=e.__parsed_extra&&e.__parsed_extra.length>0&&(l=l.concat(e.__parsed_extra)),l.forEach((function(e){var n=e.split(":");if(!(n.length<3)){var r="-no-name-"===n[0]?null:n[0],i=4===n.length&&"rck"===n[2]?n[1]:n[2];t.processKvp(s,r,i)}}))}t.convertToNoteIfNeeded(s),t.cleanupCipher(s),i===r.length&&"--"===s.name&&t.isNullOrWhitespace(s.login.password)||(n.ciphers.push(s),i++)})),this.organization&&this.moveFoldersToCollections(n),n.success=!0,Promise.resolve(n)},t}(o.BaseImporter);t.RoboFormCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.SafeInCloudXmlImporter=void 0;var o=n(30),a=n(31),s=n(141),l=n(103),c=n(40),p=n(104),u=n(131),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseXml(e);if(null==r)return n.success=!1,Promise.resolve(n);if(null==r.querySelector("database"))return n.errorMessage="Missing `database` node.",n.success=!1,Promise.resolve(n);var i=new Map;return Array.from(r.querySelectorAll("database > label")).forEach((function(e){var r=e.getAttribute("name"),o=e.getAttribute("id");if(!t.isNullOrWhitespace(r)&&!t.isNullOrWhitespace(o)){i.set(o,n.folders.length);var a=new s.FolderView;a.name=r,n.folders.push(a)}})),Array.from(r.querySelectorAll("database > card")).forEach((function(e){if("true"!==e.getAttribute("template")&&"true"!==e.getAttribute("deleted")){var r=t.querySelectorDirectChild(e,"label_id");if(null!=r){var o=r.textContent;!t.isNullOrWhitespace(o)&&i.has(o)&&n.folderRelationships.push([n.ciphers.length,i.get(o)])}var a=t.initLoginCipher();a.name=t.getValueOrDefault(e.getAttribute("title"),"--"),"true"===e.getAttribute("star")&&(a.favorite=!0),"note"===e.getAttribute("type")?(a.type=c.CipherType.SecureNote,a.secureNote=new l.SecureNoteView,a.secureNote.type=p.SecureNoteType.Generic):Array.from(t.querySelectorAllDirectChild(e,"field")).forEach((function(e){var n=e.textContent;if(!t.isNullOrWhitespace(n)){var r=e.getAttribute("name"),i=t.getValueOrDefault(e.getAttribute("type"),"").toLowerCase();"login"===i?a.login.username=n:"password"===i||"secret"===i?t.processKvp(a,r,n,u.FieldType.Hidden):"one_time_password"===i?a.login.totp=n:"notes"===i?a.notes+=n+"\n":"weblogin"===i||"website"===i?a.login.uris=t.makeUriArray(n):t.processKvp(a,r,n)}})),Array.from(t.querySelectorAllDirectChild(e,"notes")).forEach((function(e){a.notes+=e.textContent+"\n"})),t.setPassword(a),t.cleanupCipher(a),n.ciphers.push(a)}})),this.organization&&this.moveFoldersToCollections(n),n.success=!0,Promise.resolve(n)},t.prototype.setPassword=function(e){var t=e.fields.filter((function(e){return e.type===u.FieldType.Hidden}));if(t.length){for(var n,r=0,i=t;r Database > Logins > Login");return Array.from(i).forEach((function(e){var i=e.getAttribute("ID");if(!t.isNullOrWhitespace(i)){var o=e.getAttribute("Name"),a=e.getAttribute("Password"),s=null,l=null,c=null,p=null,u=null,d=r.querySelector('root > Database > Accounts > Account > LoginLinks > Login[SourceLoginID="'+i+'"]');if(null!=d){var m=d.parentElement.parentElement;null!=m&&(s=m.getAttribute("Name"),l=m.getAttribute("Link"),p=m.getAttribute("ParentID"),c=m.getAttribute("Comments"),t.isNullOrWhitespace(c)||(c=c.split("/n").join("\n")))}t.isNullOrWhitespace(p)||(u=t.buildGroupText(r,p,""),t.processFolder(n,u));var f=t.initLoginCipher();f.name=t.getValueOrDefault(s,"--"),f.notes=t.getValueOrDefault(c),f.login.username=t.getValueOrDefault(o),f.login.password=t.getValueOrDefault(a),f.login.uris=t.makeUriArray(l),t.cleanupCipher(f),n.ciphers.push(f)}})),this.organization&&this.moveFoldersToCollections(n),n.success=!0,Promise.resolve(n)},t.prototype.buildGroupText=function(e,t,n){var r=e.querySelector('root > Database > Groups > Group[ID="'+t+'"]');return null==r?n:(this.isNullOrWhitespace(n)||(n="/"+n),n=r.getAttribute("Name")+n,this.buildGroupText(e,r.getAttribute("ParentID"),n))},t}(o.BaseImporter);t.StickyPasswordXmlImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.TrueKeyCsvImporter=void 0;var o=n(30),a=n(31),s=n(87),l=n(103),c=n(40),p=n(104),u=["kind","autologin","favorite","hexcolor","protectedwithpassword","subdomainonly","type","tk_export_version","note","title","document_content"],d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){var r=t.initLoginCipher();if(r.favorite="true"===t.getValueOrDefault(e.favorite,"").toLowerCase(),r.name=t.getValueOrDefault(e.name,"--"),r.notes=t.getValueOrDefault(e.memo,""),r.login.username=t.getValueOrDefault(e.login),r.login.password=t.getValueOrDefault(e.password),r.login.uris=t.makeUriArray(e.url),"login"!==e.kind&&(r.name=t.getValueOrDefault(e.title,"--"),r.notes=t.getValueOrDefault(e.note,"")),"cc"===e.kind){if(r.type=c.CipherType.Card,r.card=new s.CardView,r.card.cardholderName=t.getValueOrDefault(e.cardholder),r.card.number=t.getValueOrDefault(e.number),r.card.brand=t.getCardBrand(r.card.number),!t.isNullOrWhitespace(e.expiryDate))try{var i=new Date(e.expiryDate);r.card.expYear=i.getFullYear().toString(),r.card.expMonth=(i.getMonth()+1).toString()}catch(a){}}else if("login"!==e.kind)for(var o in r.type=c.CipherType.SecureNote,r.secureNote=new l.SecureNoteView,r.secureNote.type=p.SecureNoteType.Generic,t.isNullOrWhitespace(r.notes)||(r.notes=t.getValueOrDefault(e.document_content,"")),e)e.hasOwnProperty(o)&&u.indexOf(o.toLowerCase())<0&&!t.isNullOrWhitespace(e[o])&&t.processKvp(r,o,e[o]);t.cleanupCipher(r),n.ciphers.push(r)})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.TrueKeyCsvImporter=d},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.UpmCsvImporter=void 0;var o=n(30),a=n(31),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!1);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){if(5===e.length){var r=t.initLoginCipher();r.name=t.getValueOrDefault(e[0],"--"),r.notes=t.getValueOrDefault(e[4]),r.login.username=t.getValueOrDefault(e[1]),r.login.password=t.getValueOrDefault(e[2]),r.login.uris=t.makeUriArray(e[3]),t.cleanupCipher(r),n.ciphers.push(r)}})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.UpmCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.YotiCsvImporter=void 0;var o=n(30),a=n(31),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){var r=t.initLoginCipher();r.name=t.getValueOrDefault(e.Name,"--"),r.login.username=t.getValueOrDefault(e["User name"]),r.login.password=t.getValueOrDefault(e.Password),r.login.uris=t.makeUriArray(e.URL),t.cleanupCipher(r),n.ciphers.push(r)})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.YotiCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ZohoVaultCsvImporter=void 0;var o=n(30),a=n(31),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){if(!t.isNullOrWhitespace(e["Password Name"])||!t.isNullOrWhitespace(e["Secret Name"])){t.processFolder(n,t.getValueOrDefault(e.ChamberName));var r=t.initLoginCipher();r.favorite="1"===t.getValueOrDefault(e.Favorite,"0"),r.notes=t.getValueOrDefault(e.Notes),r.name=t.getValueOrDefault(e["Password Name"],t.getValueOrDefault(e["Secret Name"],"--")),r.login.uris=t.makeUriArray(t.getValueOrDefault(e["Password URL"],t.getValueOrDefault(e["Secret URL"]))),t.parseData(r,e.SecretData),t.parseData(r,e.CustomData),t.convertToNoteIfNeeded(r),t.cleanupCipher(r),n.ciphers.push(r)}})),this.organization&&this.moveFoldersToCollections(n),n.success=!0,Promise.resolve(n))},t.prototype.parseData=function(e,t){var n=this;this.isNullOrWhitespace(t)||this.splitNewLine(t).forEach((function(t){var r=t.indexOf(":");if(!(r<0)){var i=t.substring(0,r),o=t.length>r?t.substring(r+1):null;if(!n.isNullOrWhitespace(i)&&!n.isNullOrWhitespace(o)&&"SecretType"!==i){var a=i.toLowerCase();null==e.login.username&&n.usernameFieldNames.indexOf(a)>-1?e.login.username=o:null==e.login.password&&n.passwordFieldNames.indexOf(a)>-1?e.login.password=o:n.processKvp(e,i,o)}}}))},t}(o.BaseImporter);t.ZohoVaultCsvImporter=s},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0)for(d=0;d0)for(d=0;d0)for(d=0;d0)for(d=0;d1)&&(t.wordSeparator=" "),null==t.capitalize&&(t.capitalize=!1),null==t.includeNumber&&(t.includeNumber=!1),n=c.EEFLongWordList.length-1,r=new Array(t.numWords),o=0,i.label=1;case 1:return oe.length&&(e.minSpecial=e.length-e.minNumber),e.numWordsn.minLength&&(n.minLength=e.data.minLength),e.data.useUpper&&(n.useUppercase=!0),e.data.useLower&&(n.useLowercase=!0),e.data.useNumbers&&(n.useNumbers=!0),null!=e.data.minNumbers&&e.data.minNumbers>n.numberCount&&(n.numberCount=e.data.minNumbers),e.data.useSpecial&&(n.useSpecial=!0),null!=e.data.minSpecial&&e.data.minSpecial>n.specialCount&&(n.specialCount=e.data.minSpecial),null!=e.data.minNumberWords&&e.data.minNumberWords>n.minNumberWords&&(n.minNumberWords=e.data.minNumberWords),e.data.capitalize&&(n.capitalize=!0),e.data.includeNumber&&(n.includeNumber=!0))})),[2,n])}}))}))},e.prototype.saveOptions=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.storageService.save(d,e)];case 1:return t.sent(),this.optionsCache=e,[2]}}))}))},e.prototype.getHistory=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return[4,this.cryptoService.hasKey()];case 1:return n.sent()?this.history?[3,4]:[4,this.storageService.get(m)]:[2,new Array];case 2:return e=n.sent(),t=this,[4,this.decryptHistory(e)];case 3:t.history=n.sent(),n.label=4;case 4:return[2,this.history||new Array]}}))}))},e.prototype.addHistory=function(e){return r(this,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.cryptoService.hasKey()];case 1:return r.sent()?[4,this.getHistory()]:[2];case 2:return t=r.sent(),this.matchesPrevious(e,t)?[2]:(t.unshift(new s.GeneratedPasswordHistory(e,Date.now())),t.length>100&&t.pop(),[4,this.encryptHistory(t)]);case 3:return n=r.sent(),[4,this.storageService.save(m,n)];case 4:return[2,r.sent()]}}))}))},e.prototype.clear=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.history=[],[4,this.storageService.remove(m)];case 1:return[2,e.sent()]}}))}))},e.prototype.passwordStrength=function(e,t){if(void 0===t&&(t=null),null==e||0===e.length)return null;var n=["bitwarden","bit","warden"];null!=t&&t.length>0&&(n=n.concat(t));var r=Array.from(new Set(n));return o(e,r)},e.prototype.normalizeOptions=function(e,t){e.minLowercase=0,e.minUppercase=0,!e.length||e.length<5?e.length=5:e.length>128&&(e.length=128),e.lengthe.length?e.minNumber=e.length:e.minNumber>9&&(e.minNumber=9):e.minNumber=0,e.minNumbere.length?e.minSpecial=e.length:e.minSpecial>9&&(e.minSpecial=9):e.minSpecial=0,e.minSpeciale.length&&(e.minSpecial=e.length-e.minNumber),null==e.numWords||e.length<3?e.numWords=3:e.numWords>20&&(e.numWords=20),e.numWords1&&(e.wordSeparator=e.wordSeparator[0]),this.sanitizePasswordLength(e,!1)},e.prototype.capitalize=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},e.prototype.appendRandomNumberToRandomWord=function(e){return r(this,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return null==e||e.length<=0?[2]:[4,this.cryptoService.randomNumber(0,e.length-1)];case 1:return t=r.sent(),[4,this.cryptoService.randomNumber(0,9)];case 2:return n=r.sent(),e[t]=e[t]+n,[2]}}))}))},e.prototype.encryptHistory=function(e){return r(this,void 0,void 0,(function(){var t,n=this;return i(this,(function(o){switch(o.label){case 0:return null==e||0===e.length?[2,Promise.resolve([])]:(t=e.map((function(e){return r(n,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.cryptoService.encrypt(e.password)];case 1:return t=n.sent(),[2,new s.GeneratedPasswordHistory(t.encryptedString,e.date)]}}))}))})),[4,Promise.all(t)]);case 1:return[2,o.sent()]}}))}))},e.prototype.decryptHistory=function(e){return r(this,void 0,void 0,(function(){var t,n=this;return i(this,(function(o){switch(o.label){case 0:return null==e||0===e.length?[2,Promise.resolve([])]:(t=e.map((function(e){return r(n,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.cryptoService.decryptToUtf8(new a.EncString(e.password))];case 1:return t=n.sent(),[2,new s.GeneratedPasswordHistory(t,e.date)]}}))}))})),[4,Promise.all(t)]);case 1:return[2,o.sent()]}}))}))},e.prototype.matchesPrevious=function(e,t){return null!=t&&0!==t.length&&t[t.length-1].password===e},e.prototype.shuffleArray=function(e){return r(this,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:t=e.length-1,i.label=1;case 1:return t>0?[4,this.cryptoService.randomNumber(0,t)]:[3,4];case 2:n=i.sent(),r=[e[n],e[t]],e[t]=r[0],e[n]=r[1],i.label=3;case 3:return t--,[3,1];case 4:return[2]}}))}))},e.prototype.sanitizePasswordLength=function(e,t){var n=0,r=0,i=e.minNumber,o=e.minSpecial;e.uppercase&&e.minUppercase<=0?n=1:e.uppercase||(n=0),e.lowercase&&e.minLowercase<=0?r=1:e.lowercase||(r=0),e.number&&e.minNumber<=0?i=1:e.number||(i=0),e.special&&e.minSpecial<=0?o=1:e.special||(o=0),(!e.length||e.length<1)&&(e.length=10);var a=n+r+i+o;e.length0||this.numberCount>0||this.specialCount>0||this.useUppercase||this.useLowercase||this.useNumbers||this.useSpecial||this.minNumberWords>0||this.capitalize||this.includeNumber},t}(n(80).default);t.PasswordGeneratorPolicyOptions=o},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]t.minComplexity&&(t.minComplexity=e.data.minComplexity),null!=e.data.minLength&&e.data.minLength>t.minLength&&(t.minLength=e.data.minLength),e.data.requireUpper&&(t.requireUpper=!0),e.data.requireLower&&(t.requireLower=!0),e.data.requireNumbers&&(t.requireNumbers=!0),e.data.requireSpecial&&(t.requireSpecial=!0))})),[2,t]}}))}))},e.prototype.evaluateMasterPassword=function(e,t,n){return null==n||!(n.minComplexity>0&&n.minComplexity>e)&&(!(n.minLength>0&&n.minLength>t.length)&&((!n.requireUpper||t.toLocaleLowerCase()!==t)&&((!n.requireLower||t.toLocaleUpperCase()!==t)&&(!(n.requireNumbers&&!/[0-9]/.test(t))&&!(n.requireSpecial&&!/[!@#$%\^&*]/g.test(t))))))},e.prototype.getResetPasswordPolicyOptions=function(e,t){var n,r,i,o=new l.ResetPasswordPolicyOptions;if(null==e||null==t)return[o,!1];var a=e.find((function(e){return e.organizationId===t&&e.type===u.PolicyType.ResetPassword&&e.enabled}));return o.autoEnrollEnabled=null!==(r=null===(n=null==a?void 0:a.data)||void 0===n?void 0:n.autoEnrollEnabled)&&void 0!==r&&r,[o,null!==(i=null==a?void 0:a.enabled)&&void 0!==i&&i]},e.prototype.mapPoliciesFromToken=function(e){return null==e||null==e.data?null:e.data.map((function(e){return new o.PolicyData(e)})).map((function(e){return new s.Policy(e)}))},e.prototype.policyAppliesToUser=function(e,t){return r(this,void 0,void 0,(function(){var n,r,o,a,s=this;return i(this,(function(i){switch(i.label){case 0:return[4,this.getAll(e)];case 1:return n=i.sent(),[4,this.userService.getAllOrganizations()];case 2:return r=i.sent(),o=null!=t?n.filter((function(e){return e.enabled&&t(e)})):n.filter((function(e){return e.enabled})),a=new Set(o.map((function(e){return e.organizationId}))),[2,r.some((function(t){return t.enabled&&t.status>=c.OrganizationUserStatusType.Accepted&&t.usePolicies&&!s.isExcemptFromPolicies(t,e)&&a.has(t.id)}))]}}))}))},e.prototype.isExcemptFromPolicies=function(e,t){return t===u.PolicyType.MaximumVaultTimeout?e.type===p.OrganizationUserType.Owner:e.isExemptFromPolicies},e}();t.PolicyService=m},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ResetPasswordPolicyOptions=void 0;var o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.autoEnrollEnabled=!1,t}return i(t,e),t}(n(80).default);t.ResetPasswordPolicyOptions=o},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]"))},e.prototype.indexCiphers=function(e,t){return r(this,void 0,void 0,(function(){var n,r,s=this;return i(this,(function(i){switch(i.label){case 0:return this.indexing?[2]:(this.logService.time("search indexing"),this.indexing=!0,this.indexedEntityId=e,this.index=null,(n=new o.Builder).ref("id"),n.field("shortid",{boost:100,extractor:function(e){return e.id.substr(0,8)}}),n.field("name",{boost:10}),n.field("subtitle",{boost:5,extractor:function(e){return null!=e.subTitle&&e.type===a.CipherType.Card?e.subTitle.replace(/\*/g,""):e.subTitle}}),n.field("notes"),n.field("login.username",{extractor:function(e){return e.type===a.CipherType.Login&&null!=e.login?e.login.username:null}}),n.field("login.uris",{boost:2,extractor:function(e){return s.uriExtractor(e)}}),n.field("fields",{extractor:function(e){return s.fieldExtractor(e,!1)}}),n.field("fields_joined",{extractor:function(e){return s.fieldExtractor(e,!0)}}),n.field("attachments",{extractor:function(e){return s.attachmentExtractor(e,!1)}}),n.field("attachments_joined",{extractor:function(e){return s.attachmentExtractor(e,!0)}}),n.field("organizationid",{extractor:function(e){return e.organizationId}}),(r=t)?[3,2]:[4,this.cipherService.getAllDecrypted()]);case 1:r=i.sent(),i.label=2;case 2:return(t=r).forEach((function(e){return n.add(e)})),this.index=n.build(),this.indexing=!1,this.logService.timeEnd("search indexing"),[2]}}))}))},e.prototype.searchCiphers=function(e,t,n){return void 0===t&&(t=null),void 0===n&&(n=null),r(this,void 0,void 0,(function(){var r,a,s,l,c;return i(this,(function(i){switch(i.label){case 0:return r=[],null!=e&&(e=e.trim().toLowerCase()),""===e&&(e=null),null!=n?[3,2]:[4,this.cipherService.getAllDecrypted()];case 1:n=i.sent(),i.label=2;case 2:return null!=t&&Array.isArray(t)&&t.length>0?n=n.filter((function(e){return t.every((function(t){return null==t||t(e)}))})):null!=t&&(n=n.filter(t)),this.isSearchable(e)?this.indexing?[4,new Promise((function(e){return setTimeout(e,250)}))]:[3,5]:[2,n];case 3:return i.sent(),this.indexing?[4,new Promise((function(e){return setTimeout(e,500)}))]:[3,5];case 4:i.sent(),i.label=5;case 5:if(null==(a=this.getIndexForSearch()))return[2,this.searchCiphersBasic(n,e)];if(s=new Map,n.forEach((function(e){return s.set(e.id,e)})),l=null,null!=e&&e.length>1&&0===e.indexOf(">"))try{l=a.search(e.substr(1).trim())}catch(p){}else c=o.Query.wildcard.LEADING|o.Query.wildcard.TRAILING,l=a.query((function(t){o.tokenizer(e).forEach((function(e){var n=e.toString();t.term(n,{fields:["name"],wildcard:c}),t.term(n,{fields:["subtitle"],wildcard:c}),t.term(n,{fields:["login.uris"],wildcard:c}),t.term(n,{})}))}));return null!=l&&l.forEach((function(e){s.has(e.ref)&&r.push(s.get(e.ref))})),[2,r]}}))}))},e.prototype.searchCiphersBasic=function(e,t,n){return void 0===n&&(n=!1),t=t.trim().toLowerCase(),e.filter((function(e){return n===e.isDeleted&&(null!=e.name&&e.name.toLowerCase().indexOf(t)>-1||(!!(t.length>=8&&e.id.startsWith(t))||(null!=e.subTitle&&e.subTitle.toLowerCase().indexOf(t)>-1||!!(e.login&&null!=e.login.uri&&e.login.uri.toLowerCase().indexOf(t)>-1))))}))},e.prototype.searchSends=function(e,t){return t=t.trim().toLocaleLowerCase(),e.filter((function(e){var n,r,i;return null!=e.name&&e.name.toLowerCase().indexOf(t)>-1||(!!(t.length>=8&&(e.id.startsWith(t)||e.accessId.toLocaleLowerCase().startsWith(t)||null!=(null===(n=e.file)||void 0===n?void 0:n.id)&&e.file.id.startsWith(t)))||(null!=e.notes&&e.notes.toLowerCase().indexOf(t)>-1||(null!=(null===(r=e.text)||void 0===r?void 0:r.text)&&e.text.text.toLowerCase().indexOf(t)>-1||(null!=(null===(i=e.file)||void 0===i?void 0:i.fileName)&&e.file.fileName.toLowerCase().indexOf(t)>-1||void 0))))}))},e.prototype.getIndexForSearch=function(){return this.index},e.prototype.fieldExtractor=function(e,t){if(!e.hasFields)return null;var n=[];return e.fields.forEach((function(e){null!=e.name&&n.push(e.name),e.type===s.FieldType.Text&&null!=e.value&&n.push(e.value)})),0===(n=n.filter((function(e){return""!==e.trim()}))).length?null:t?n.join(" "):n},e.prototype.attachmentExtractor=function(e,t){if(!e.hasAttachments)return null;var n=[];return e.attachments.forEach((function(e){null!=e&&null!=e.fileName&&(t&&e.fileName.indexOf(".")>-1?n.push(e.fileName.substr(0,e.fileName.lastIndexOf("."))):n.push(e.fileName))})),0===(n=n.filter((function(e){return""!==e.trim()}))).length?null:t?n.join(" "):n},e.prototype.uriExtractor=function(e){if(e.type!==a.CipherType.Login||null==e.login||!e.login.hasUris)return null;var t=[];return e.login.uris.forEach((function(e){if(null!=e.uri&&""!==e.uri)if(null==e.hostname){var n=e.uri;if(e.match!==l.UriMatchType.RegularExpression){var r=n.indexOf("://");r>-1&&(n=n.substr(r+3));var i=n.search(/\?|&|#/);i>-1&&(n=n.substring(0,i))}t.push(n)}else t.push(e.hostname)})),t.length>0?t:null},e}();t.SearchService=c},,function(e,t,n){"use strict";(function(e){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.revisionDate&&(n=!1),a=!1,n&&(t?(n=null!=r,a=!0):null==e.collectionIds||null==e.organizationId?n=null==r:(n=!1,a=!0)),!n&&a&&null!=e.organizationId&&null!=e.collectionIds&&e.collectionIds.length>0?[4,this.collectionService.getAll()]:[3,5];case 4:if(null!=(s=i.sent()))for(l=0;l-1){n=!0;break}i.label=5;case 5:return n?[4,this.apiService.getCipher(e.id)]:[3,9];case 6:return null==(c=i.sent())?[3,9]:[4,this.userService.getUserId()];case 7:return p=i.sent(),[4,this.cipherService.upsert(new o.CipherData(c,p))];case 8:return i.sent(),this.messagingService.send("syncedUpsertedCipher",{cipherId:e.id}),[2,this.syncCompleted(!0)];case 9:return[3,13];case 10:return null!=(u=i.sent())&&404===u.statusCode&&t?[4,this.cipherService.delete(e.id)]:[3,12];case 11:return i.sent(),this.messagingService.send("syncedDeletedCipher",{cipherId:e.id}),[2,this.syncCompleted(!0)];case 12:return[3,13];case 13:return[2,this.syncCompleted(!1)]}}))}))},e.prototype.syncDeleteCipher=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return this.syncStarted(),[4,this.userService.isAuthenticated()];case 1:return t.sent()?[4,this.cipherService.delete(e.id)]:[3,3];case 2:return t.sent(),this.messagingService.send("syncedDeletedCipher",{cipherId:e.id}),[2,this.syncCompleted(!0)];case 3:return[2,this.syncCompleted(!1)]}}))}))},e.prototype.syncUpsertSend=function(e,t){return r(this,void 0,void 0,(function(){var n,r,o;return i(this,(function(i){switch(i.label){case 0:return this.syncStarted(),[4,this.userService.isAuthenticated()];case 1:if(!i.sent())return[3,9];i.label=2;case 2:return i.trys.push([2,8,,9]),[4,this.sendService.get(e.id)];case 3:return n=i.sent(),!t&&null==n||t&&null!=n&&n.revisionDate0&&e.push(t.domains)})),[2,this.settingsService.setEquivalentDomains(e)]}))}))},e.prototype.syncPolicies=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return t={},null!=e&&e.forEach((function(e){t[e.id]=new c.PolicyData(e)})),[4,this.policyService.replace(t)];case 1:return[2,n.sent()]}}))}))},e}();t.SyncService=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationData=void 0;var r=function(e){this.id=e.id,this.name=e.name,this.status=e.status,this.type=e.type,this.enabled=e.enabled,this.usePolicies=e.usePolicies,this.useGroups=e.useGroups,this.useDirectory=e.useDirectory,this.useEvents=e.useEvents,this.useTotp=e.useTotp,this.use2fa=e.use2fa,this.useApi=e.useApi,this.useSso=e.useSso,this.useResetPassword=e.useResetPassword,this.selfHost=e.selfHost,this.usersGetPremium=e.usersGetPremium,this.seats=e.seats,this.maxCollections=e.maxCollections,this.maxStorageGb=e.maxStorageGb,this.ssoBound=e.ssoBound,this.identifier=e.identifier,this.permissions=e.permissions,this.resetPasswordEnrolled=e.resetPasswordEnrolled,this.userId=e.userId,this.hasPublicAndPrivateKeys=e.hasPublicAndPrivateKeys,this.providerId=e.providerId,this.providerName=e.providerName};t.OrganizationData=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderData=void 0;var r=function(e){this.id=e.id,this.name=e.name,this.status=e.status,this.type=e.type,this.enabled=e.enabled,this.userId=e.userId,this.useEvents=e.useEvents};t.ProviderData=r},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]10?r=10:u>0&&(r=u)}catch(I){}if(p.has("period")&&null!=p.get("period"))try{(d=parseInt(p.get("period").trim(),null))>0&&(t=d)}catch(E){}p.has("secret")&&null!=p.get("secret")&&(o=p.get("secret")),p.has("algorithm")&&null!=p.get("algorithm")&&("sha1"!==(m=p.get("algorithm").toLowerCase())&&"sha256"!==m&&"sha512"!==m||(n=m))}else c&&(o=e.substr("steam://".length),r=5);return f=Math.round((new Date).getTime()/1e3),h=this.leftPad(this.decToHex(Math.floor(f/t)),16,"0"),v=a.Utils.fromHexToArray(h),(y=this.b32ToBytes(o)).length&&v.length?[4,this.sign(y,v,n)]:[2,null];case 1:if(0===(g=i.sent()).length)return[2,null];if(x=15&g[g.length-1],b=(127&g[x])<<24|(255&g[x+1])<<16|(255&g[x+2])<<8|255&g[x+3],S="",c)for(w=2147483647&b,C=0;C=e.length&&(e=Array(t+1-e.length).join(n)+e),e},e.prototype.decToHex=function(e){return(e<15.5?"0":"")+Math.round(e).toString(16)},e.prototype.b32ToHex=function(e){e=e.toUpperCase();for(var t="",n=0;n0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=n?[4,this.storageService.get(o.ConstantsService.vaultTimeoutActionKey)]:[3,11]);case 6:return"logOut"!==r.sent()?[3,8]:[4,this.logOut()];case 7:return r.sent(),[3,10];case 8:return[4,this.lock(!0)];case 9:r.sent(),r.label=10;case 10:r.label=11;case 11:return[2]}}))}))},e.prototype.lock=function(e){return void 0===e&&(e=!1),r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.userService.isAuthenticated()];case 1:return e.sent()?(this.biometricLocked=!0,this.everBeenUnlocked=!0,[4,this.cryptoService.clearKey(!1)]):[2];case 2:return e.sent(),[4,this.cryptoService.clearOrgKeys(!0)];case 3:return e.sent(),[4,this.cryptoService.clearKeyPair(!0)];case 4:return e.sent(),[4,this.cryptoService.clearEncKey(!0)];case 5:return e.sent(),this.folderService.clearCache(),this.cipherService.clearCache(),this.collectionService.clearCache(),this.searchService.clearIndex(),this.messagingService.send("locked"),null==this.lockedCallback?[3,7]:[4,this.lockedCallback()];case 6:e.sent(),e.label=7;case 7:return[2]}}))}))},e.prototype.logOut=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return null==this.loggedOutCallback?[3,2]:[4,this.loggedOutCallback()];case 1:e.sent(),e.label=2;case 2:return[2]}}))}))},e.prototype.setVaultTimeoutOptions=function(e,t){return r(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,this.storageService.save(o.ConstantsService.vaultTimeoutKey,e)];case 1:return n.sent(),[4,this.storageService.save(o.ConstantsService.vaultTimeoutActionKey,t)];case 2:return n.sent(),[4,this.cryptoService.toggleKey()];case 3:return n.sent(),[4,this.tokenService.toggleTokens()];case 4:return n.sent(),[2]}}))}))},e.prototype.isPinLockSet=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return[4,this.storageService.get(o.ConstantsService.protectedPin)];case 1:return e=n.sent(),[4,this.storageService.get(o.ConstantsService.pinProtectedKey)];case 2:return t=n.sent(),[2,[null!=e,null!=t]]}}))}))},e.prototype.isBiometricLockSet=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.storageService.get(o.ConstantsService.biometricUnlockKey)];case 1:return[2,e.sent()]}}))}))},e.prototype.getVaultTimeout=function(){return r(this,void 0,void 0,(function(){var e,t,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.storageService.get(o.ConstantsService.vaultTimeoutKey)];case 1:return e=r.sent(),[4,this.policyService.policyAppliesToUser(a.PolicyType.MaximumVaultTimeout)];case 2:return r.sent()?[4,this.policyService.getAll(a.PolicyType.MaximumVaultTimeout)]:[3,6];case 3:return t=r.sent(),n=Math.min(e,t[0].data.minutes),(null==e||n<0)&&(n=t[0].data.minutes),e===n?[3,5]:[4,this.storageService.save(o.ConstantsService.vaultTimeoutKey,n)];case 4:r.sent(),r.label=5;case 5:return[2,n];case 6:return[2,e]}}))}))},e.prototype.clear=function(){return this.everBeenUnlocked=!1,this.pinProtectedKey=null,this.storageService.remove(o.ConstantsService.protectedPin)},e}();t.VaultTimeoutService=s},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]-1||n.indexOf(" Version/9.")>-1)}return e.prototype.pbkdf2=function(e,t,n,s){return r(this,void 0,void 0,(function(){var r,l,c,p,u,d,m,f,h;return i(this,(function(i){switch(i.label){case 0:return this.isIE||this.isOldSafari?(r="sha256"===n?32:64,l=this.toByteString(e),c=this.toByteString(t),p=o.pbkdf2(l,c,s,r,n),[2,a.Utils.fromByteStringToArray(p).buffer]):(u="sha256"===n?256:512,d=this.toBuf(e),m=this.toBuf(t),f={name:"PBKDF2",salt:m,iterations:s,hash:{name:this.toWebCryptoAlgorithm(n)}},[4,this.subtle.importKey("raw",d,{name:"PBKDF2"},!1,["deriveBits"])]);case 1:return h=i.sent(),[4,this.subtle.deriveBits(f,h,u)];case 2:return[2,i.sent()]}}))}))},e.prototype.hkdf=function(e,t,n,o,a){return r(this,void 0,void 0,(function(){var r,s,l,c;return i(this,(function(i){switch(i.label){case 0:return r=this.toBuf(t),s=this.toBuf(n),l={name:"HKDF",salt:r,info:s,hash:{name:this.toWebCryptoAlgorithm(a)}},[4,this.subtle.importKey("raw",e,{name:"HKDF"},!1,["deriveBits"])];case 1:return c=i.sent(),[4,this.subtle.deriveBits(l,c,8*o)];case 2:return[2,i.sent()]}}))}))},e.prototype.hkdfExpand=function(e,t,n,o){return r(this,void 0,void 0,(function(){var r,a,s,l,c,p,u,d,m,f;return i(this,(function(i){switch(i.label){case 0:if(n>255*(r="sha256"===o?32:64))throw new Error("outputByteSize is too large.");if(new Uint8Array(e).length=n)return[3,4];i.label=3;case 3:return d++,[3,1];case 4:return[2,u.slice(0,n).buffer]}}))}))},e.prototype.hash=function(e,t){return r(this,void 0,void 0,(function(){var n,r,s;return i(this,(function(i){switch(i.label){case 0:return this.isIE&&"sha1"===t||"md5"===t?(n="md5"===t?o.md.md5.create():o.md.sha1.create(),r=this.toByteString(e),n.update(r,"raw"),[2,a.Utils.fromByteStringToArray(n.digest().data).buffer]):(s=this.toBuf(e),[4,this.subtle.digest({name:this.toWebCryptoAlgorithm(t)},s)]);case 1:return[2,i.sent()]}}))}))},e.prototype.hmac=function(e,t,n){return r(this,void 0,void 0,(function(){var r,s,l,c,p;return i(this,(function(i){switch(i.label){case 0:return this.isIE&&"sha512"===n?(r=o.hmac.create(),s=this.toByteString(t),l=this.toByteString(e),r.start(n,s),r.update(l,"raw"),[2,a.Utils.fromByteStringToArray(r.digest().data).buffer]):(c={name:"HMAC",hash:{name:this.toWebCryptoAlgorithm(n)}},[4,this.subtle.importKey("raw",t,c,!1,["sign"])]);case 1:return p=i.sent(),[4,this.subtle.sign(c,p,e)];case 2:return[2,i.sent()]}}))}))},e.prototype.compare=function(e,t){return r(this,void 0,void 0,(function(){var n,r,o,a,s,l,c,p;return i(this,(function(i){switch(i.label){case 0:return[4,this.randomBytes(32)];case 1:return n=i.sent(),r={name:"HMAC",hash:{name:"SHA-256"}},[4,this.subtle.importKey("raw",n,r,!1,["sign"])];case 2:return o=i.sent(),[4,this.subtle.sign(r,o,e)];case 3:return a=i.sent(),[4,this.subtle.sign(r,o,t)];case 4:if(s=i.sent(),a.byteLength!==s.byteLength)return[2,!1];for(l=new Uint8Array(a),c=new Uint8Array(s),p=0;p0&&(t.el=a(n[0]),t.el.modal("show"),t.el.on("show.bs.modal",(function(){e.show(),t.messagingService.send("modalShow")})),t.el.on("shown.bs.modal",(function(){e.shown(),t.messagingService.send("modalShown"),c.Utils.isMobileBrowser||t.el.find("*[appAutoFocus]").focus()})),t.el.on("hide.bs.modal",(function(){t.messagingService.send("modalClose")})),t.el.on("hidden.bs.modal",(function(){e.closed(),t.messagingService.send("modalClosed")})))})),e.onClose.pipe(s.first()).subscribe((function(){null!=t.el&&t.el.modal("hide")}))},t.ɵfac=function(e){return new(e||t)(p.ɵɵinject(p.ComponentFactoryResolver),p.ɵɵinject(p.ApplicationRef),p.ɵɵinject(p.Injector),p.ɵɵinject(u.MessagingService))},t.ɵprov=p.ɵɵdefineInjectable({token:t,factory:t.ɵfac}),t}(l.ModalService);t.ModalService=d,("undefined"==typeof ngDevMode||ngDevMode)&&p.ɵsetClassMetadata(d,[{type:o.Injectable}],(function(){return[{type:p.ComponentFactoryResolver},{type:p.ApplicationRef},{type:p.Injector},{type:u.MessagingService}]}),null)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WildcardRoutingModule=void 0;var r=n(0),i=n(7),o=n(0),a=n(7),s=[{path:"**",redirectTo:""}],l=function(){function e(){}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=o.ɵɵdefineNgModule({type:e}),e.ɵinj=o.ɵɵdefineInjector({imports:[[i.RouterModule.forChild(s)],i.RouterModule]}),e}();t.WildcardRoutingModule=l,("undefined"==typeof ngJitMode||ngJitMode)&&o.ɵɵsetNgModuleScope(l,{imports:[a.RouterModule],exports:[i.RouterModule]}),("undefined"==typeof ngDevMode||ngDevMode)&&o.ɵsetClassMetadata(l,[{type:r.NgModule,args:[{imports:[i.RouterModule.forChild(s)],exports:[i.RouterModule]}]}],null,null)}]); //# sourceMappingURL=main.c4e52be64336d86f65df.js.map