From 924ac380bb27b7606bc0dc47b847b7b5b1697bb6 Mon Sep 17 00:00:00 2001 From: Guillaume Vincent Date: Thu, 27 Jul 2017 21:45:42 +0200 Subject: [PATCH] Add more end to end tests --- dist/lesspass.min.js | 2 +- src/components/Options.vue | 22 +++++++------ src/views/PasswordGenerator.vue | 38 +++++++++++----------- test/e2e/specs/passwordGeneration.js | 61 ++++++++++++++++++++++++++++++++++++ 4 files changed, 93 insertions(+), 30 deletions(-) diff --git a/dist/lesspass.min.js b/dist/lesspass.min.js index 7815383..ef80b2b 100644 --- a/dist/lesspass.min.js +++ b/dist/lesspass.min.js @@ -35,4 +35,4 @@ object-assign (c) Sindre Sorhus @license MIT */ -var i=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(t){r[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,a,u=r(t),c=1;c=e||n<0||O&&r>=m}function f(){var t=x();if(c(t))return l(t);_=setTimeout(f,u(t))}function l(t){return _=void 0,A&&v?i(t):(v=g=void 0,y)}function p(){void 0!==_&&clearTimeout(_),C=0,v=E=g=_=void 0}function d(){return void 0===_?y:l(x())}function h(){var t=x(),n=c(t);if(v=arguments,g=this,E=t,n){if(void 0===_)return o(E);if(O)return _=setTimeout(f,e),i(E)}return void 0===_&&(_=setTimeout(f,e)),y}var v,g,m,y,_,E,C=0,S=!1,O=!1,A=!0;if("function"!=typeof t)throw new TypeError(a);return e=s(e)||0,r(n)&&(S=!!n.leading,O="maxWait"in n,m=O?w(s(n.maxWait)||0,e):m,A="trailing"in n?!!n.trailing:A),h.cancel=p,h.flush=d,h}function r(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function i(t){return!!t&&"object"==typeof t}function o(t){return"symbol"==typeof t||i(t)&&_.call(t)==c}function s(t){if("number"==typeof t)return t;if(o(t))return u;if(r(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=r(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(f,"");var n=p.test(t);return n||d.test(t)?h(t.slice(2),n?2:8):l.test(t)?u:+t}var a="Expected a function",u=NaN,c="[object Symbol]",f=/^\s+|\s+$/g,l=/^[-+]0x[0-9a-f]+$/i,p=/^0b[01]+$/i,d=/^0o[0-7]+$/i,h=parseInt,v="object"==typeof e&&e&&e.Object===Object&&e,g="object"==typeof self&&self&&self.Object===Object&&self,m=v||g||Function("return this")(),y=Object.prototype,_=y.toString,w=Math.max,b=Math.min,x=function(){return m.Date.now()};t.exports=n}).call(e,n(4))},function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"masterPassword"},[n("div",{staticClass:"input-group inner-addon left-addon"},[n("label",{staticClass:"sr-only",attrs:{for:"passwordField"}},[t._v("\n "+t._s(t.label)+"\n ")]),t._v(" "),n("i",{staticClass:"fa fa-lock"}),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.password,expression:"password"}],ref:"passwordField",staticClass:"form-control",attrs:{id:"passwordField",name:"passwordField",type:"password",autocorrect:"off",autocapitalize:"off",placeholder:t.label},domProps:{value:t.password},on:{blur:function(e){t.hidePassword(t.$refs.passwordField)},input:function(e){e.target.composing||(t.password=e.target.value)}}}),t._v(" "),t.fingerprint&&t.password?n("span",{staticClass:"input-group-btn",on:{click:function(e){t.togglePasswordType(t.$refs.passwordField)}}},[n("button",{staticClass:"btn",attrs:{id:"fingerprint",type:"button",tabindex:"-1"}},[n("small",{staticClass:"hint--left"},[n("i",{staticClass:"fa fa-fw",class:[t.icon1],style:{color:t.color1}}),t._v(" "),n("i",{staticClass:"fa fa-fw",class:[t.icon2],style:{color:t.color2}}),t._v(" "),n("i",{staticClass:"fa fa-fw",class:[t.icon3],style:{color:t.color3}})])])]):t._e()]),t._v(" "),t.showEncryptButton?n("button",{staticClass:"btn btn-link btn-sm p-0",class:{disabled:""===t.email,"hint--top hint--medium":""!==t.email},attrs:{id:"encryptMasterPassword__btn",type:"button"},on:{click:function(e){t.encryptMasterPassword(t.$refs.passwordField.value)}}},[n("small",[t._v(t._s(t.EncryptButtonText))])]):t._e()])},i=[],o={render:r,staticRenderFns:i};e.a=o},function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("form",{on:{submit:function(e){e.preventDefault(),t.signIn(e)}}},[n("div",{staticClass:"form-group"},[n("div",{staticClass:"inner-addon left-addon"},[n("i",{staticClass:"fa fa-globe"}),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.baseURL,expression:"baseURL"}],staticClass:"form-control",attrs:{id:"baseURL",type:"text",placeholder:t.$t("LessPass Database Url")},domProps:{value:t.baseURL},on:{input:function(e){e.target.composing||(t.baseURL=e.target.value)}}})])]),t._v(" "),n("div",{staticClass:"form-group row"},[n("div",{staticClass:"col-12"},[n("div",{staticClass:"inner-addon left-addon"},[n("i",{staticClass:"fa fa-user"}),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.email,expression:"email"}],staticClass:"form-control",attrs:{id:"email",name:"username",type:"email",placeholder:t.$t("Email"),required:""},domProps:{value:t.email},on:{input:function(e){e.target.composing||(t.email=e.target.value)}}})])])]),t._v(" "),n("div",{staticClass:"form-group mb-2"},[n("master-password",{attrs:{label:t.$t("Master Password"),email:t.email,showEncryptButton:!0,EncryptButtonText:t.$t("Encrypt my master password")},model:{value:t.password,callback:function(e){t.password=e},expression:"password"}})],1),t._v(" "),n("div",{staticClass:"form-group row no-gutters mb-0"},[n("div",{staticClass:"col"},[n("button",{staticClass:"btn btn-block",class:{"btn-warning":1===t.version,"btn-primary":2===t.version},attrs:{id:"signInButton",type:"submit"}},[t._v("\n "+t._s(t.$t("Sign In"))+"\n ")])]),t._v(" "),n("div",{staticClass:"col"},[n("button",{staticClass:"btn btn-secondary btn-block",attrs:{id:"registerButton",type:"button"},on:{click:t.register}},[t._v("\n "+t._s(t.$t("Register"))+"\n ")])])]),t._v(" "),n("div",{staticClass:"form-group mb-0"},[n("button",{staticClass:"btn btn-link btn-sm p-0",attrs:{type:"button"},on:{click:function(e){t.$router.push({name:"passwordReset"})}}},[n("small",[t._v(t._s(t.$t("ForgotPassword","Forgot your password?")))])])])])},i=[],o={render:r,staticRenderFns:i};e.a=o},function(t,e,n){"use strict";function r(t){n(134)}Object.defineProperty(e,"__esModule",{value:!0});var i=n(136),o=n.n(i),s=n(148),a=n(2),u=r,c=a(o.a,s.a,u,null,null);e.default=c.exports},function(t,e,n){var r=n(135);"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);n(7)("1fff9582",r,!0)},function(t,e,n){e=t.exports=n(6)(void 0),e.push([t.i,"#generated-password{font-family:Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,sans-serif}div.awesomplete{display:block}div.awesomplete>ul{z-index:11}",""])},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=Object.assign||function(t){for(var e=1;e0&&new w.default(e,{list:t.map(function(t){return{label:t.site+" "+t.login,value:t}}),replace:function(t){n.$store.dispatch("savePassword",{password:t.value}),this.input.value=t.value.site,n.focusBestInputField()}})},password:{handler:function(){this.cleanErrors()},deep:!0},passwordGenerated:function(){this.cleanFormInSeconds(30)},masterPassword:function(){this.cleanErrors(),this.cleanFormInSeconds(30)}},methods:{toggleShowOptions:function(){this.$store.dispatch("toggleShowOptions")},togglePasswordType:function(t){"password"===t.type?t.type="text":t.type="password"},cleanErrors:function(){clearTimeout(this.cleanTimeout),this.passwordGenerated=""},cleanFormInSeconds:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:15;clearTimeout(this.cleanTimeout),this.cleanTimeout=setTimeout(function(){t.masterPassword="",t.passwordGenerated="",t.fingerprint=""},1e3*e)},generatePassword:function(){var t=this,e=this.password.site,n=this.password.login,r=this.masterPassword;if(!e&&!n||!r)return void y.default.error(this.$t("SiteLoginMasterPasswordMandatory","Site, login, and master password fields are mandatory."));this.cleanErrors(),this.fingerprint=this.masterPassword;var i={lowercase:this.password.lowercase,uppercase:this.password.uppercase,numbers:this.password.numbers,symbols:this.password.symbols,length:this.password.length,counter:this.password.counter,version:this.password.version};return s.default.generatePassword(e,n,r,i).then(function(e){t.passwordGenerated=e,t.$store.dispatch("passwordGenerated")})},focusBestInputField:function(){var t=this.$refs.site,e=this.$refs.login,n=this.$refs.masterPassword.$refs.passwordField;t.value?e.value?n.focus():e.focus():t.focus()},copyPassword:function(){var t=this;(0,c.default)(this.passwordGenerated)?((0,g.showTooltip)(document.getElementById("copyPasswordButton"),this.$t("Copied","copied !")),setTimeout(function(){t.cleanFormInSeconds()},2e3)):y.default.warning(this.$t("SorryCopy","We are sorry the copy only works on modern browsers"))},sharePasswordProfile:function(){var t=this;if((0,c.default)(this.passwordURL)){var e=this.$t("PasswordProfileCopied","Your password profile has been copied");(0,g.showTooltip)(document.getElementById("sharePasswordProfileButton"),e,"hint--top-left"),setTimeout(function(){t.cleanFormInSeconds()},2e3)}else y.default.warning(this.$t("SorryCopy","We are sorry the copy only works on modern browsers"))}}}},function(t,e,n){"use strict";t.exports=function(t){var e=document.createElement("textarea");e.value=t,e.setAttribute("readonly",""),e.style.contain="strict",e.style.position="absolute",e.style.left="-9999px",e.style.fontSize="12pt";var n=getSelection(),r=!1;n.rangeCount>0&&(r=n.getRangeAt(0)),document.body.appendChild(e),e.select();var i=!1;try{i=document.execCommand("copy")}catch(t){}return document.body.removeChild(e),r&&(n.removeAllRanges(),n.addRange(r)),i}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(139),i=n(2),o=i(null,r.a,null,null,null);e.default=o.exports},function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement;t._self._c;return t._m(0)},i=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticStyle:{display:"none"}},[n("label",{attrs:{for:"username"}},[n("input",{attrs:{type:"text",id:"username",name:"username",autocomplete:"username"}})]),t._v(" "),n("label",{attrs:{for:"password"}},[n("input",{attrs:{type:"password",id:"password",name:"password",autocomplete:"current-password"}})])])}],o={render:r,staticRenderFns:i};e.a=o},function(t,e,n){"use strict";function r(t){n(141)}Object.defineProperty(e,"__esModule",{value:!0});var i=n(143),o=n.n(i),s=n(145),a=n(2),u=r,c=a(o.a,s.a,u,null,null);e.default=c.exports},function(t,e,n){var r=n(142);"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);n(7)("15e23426",r,!0)},function(t,e,n){e=t.exports=n(6)(void 0),e.push([t.i,"#options input[type=number]{-moz-appearance:textfield}#options input[type=number]::-webkit-inner-spin-button,#options input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}",""])},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(5),i=n(9),o=function(t){return t&&t.__esModule?t:{default:t}}(i),s=n(144);e.default={name:"options",computed:(0,r.mapState)(["password"]),methods:{decrement:s.decrement,increment:s.increment,setVersion:function(t){1===t&&o.default.error(this.$t("WarningV1Deprecated","Version 1 is deprecated and will be deleted soon. We strongly advise you to migrate your passwords to version 2."));var e=Object.assign({},this.password,{length:1===t?12:16,version:t});this.$store.dispatch("savePassword",{password:e}),this.$store.dispatch("saveVersion",{version:t})},saveDefaultOptions:function(){this.$store.dispatch("saveDefaultOptions",{options:this.options}),o.default.success(this.$t("Your options have been saved successfully"))}}}},function(t,e,n){"use strict";function r(t,e){var n=e.min,r=e.max;return t>r?r:t2&&void 0!==arguments[2]?arguments[2]:"hint--top",r=t.className;t.setAttribute("class",r+" "+n),t.setAttribute("aria-label",e),setTimeout(function(){t.setAttribute("class",r),t.setAttribute("aria-label","")},2e3)}Object.defineProperty(e,"__esModule",{value:!0}),e.showTooltip=r},function(t,e){!function(){function e(t){var e=Array.isArray(t)?{label:t[0],value:t[1]}:"object"==typeof t&&"label"in t&&"value"in t?t:{label:t,value:t};this.label=e.label||e.value,this.value=e.value}function n(t,e,n){for(var r in e){var i=e[r],o=t.input.getAttribute("data-"+r.toLowerCase());"number"==typeof i?t[r]=parseInt(o):!1===i?t[r]=null!==o:i instanceof Function?t[r]=null:t[r]=o,t[r]||0===t[r]||(t[r]=r in n?n[r]:i)}}function r(t,e){return"string"==typeof t?(e||document).querySelector(t):t||null}function i(t,e){return a.call((e||document).querySelectorAll(t))}function o(){i("input.awesomplete").forEach(function(t){new s(t)})}var s=function(t,e){var i=this;this.isOpened=!1,this.input=r(t),this.input.setAttribute("autocomplete","off"),this.input.setAttribute("aria-autocomplete","list"),e=e||{},n(this,{minChars:2,maxItems:10,autoFirst:!1,data:s.DATA,filter:s.FILTER_CONTAINS,sort:!1!==e.sort&&s.SORT_BYLENGTH,item:s.ITEM,replace:s.REPLACE},e),this.index=-1,this.container=r.create("div",{className:"awesomplete",around:t}),this.ul=r.create("ul",{hidden:"hidden",inside:this.container}),this.status=r.create("span",{className:"visually-hidden",role:"status","aria-live":"assertive","aria-relevant":"additions",inside:this.container}),this._events={input:{input:this.evaluate.bind(this),blur:this.close.bind(this,{reason:"blur"}),keydown:function(t){var e=t.keyCode;i.opened&&(13===e&&i.selected?(t.preventDefault(),i.select()):27===e?i.close({reason:"esc"}):38!==e&&40!==e||(t.preventDefault(),i[38===e?"previous":"next"]()))}},form:{submit:this.close.bind(this,{reason:"submit"})},ul:{mousedown:function(t){var e=t.target;if(e!==this){for(;e&&!/li/i.test(e.nodeName);)e=e.parentNode;e&&0===t.button&&(t.preventDefault(),i.select(e,t.target))}}}},r.bind(this.input,this._events.input),r.bind(this.input.form,this._events.form),r.bind(this.ul,this._events.ul),this.input.hasAttribute("list")?(this.list="#"+this.input.getAttribute("list"),this.input.removeAttribute("list")):this.list=this.input.getAttribute("data-list")||e.list||[],s.all.push(this)};s.prototype={set list(t){if(Array.isArray(t))this._list=t;else if("string"==typeof t&&t.indexOf(",")>-1)this._list=t.split(/\s*,\s*/);else if((t=r(t))&&t.children){var e=[];a.apply(t.children).forEach(function(t){if(!t.disabled){var n=t.textContent.trim(),r=t.value||n,i=t.label||n;""!==r&&e.push({label:i,value:r})}}),this._list=e}document.activeElement===this.input&&this.evaluate()},get selected(){return this.index>-1},get opened(){return this.isOpened},close:function(t){this.opened&&(this.ul.setAttribute("hidden",""),this.isOpened=!1,this.index=-1,r.fire(this.input,"awesomplete-close",t||{}))},open:function(){this.ul.removeAttribute("hidden"),this.isOpened=!0,this.autoFirst&&-1===this.index&&this.goto(0),r.fire(this.input,"awesomplete-open")},destroy:function(){r.unbind(this.input,this._events.input),r.unbind(this.input.form,this._events.form);var t=this.container.parentNode;t.insertBefore(this.input,this.container),t.removeChild(this.container),this.input.removeAttribute("autocomplete"),this.input.removeAttribute("aria-autocomplete");var e=s.all.indexOf(this);-1!==e&&s.all.splice(e,1)},next:function(){var t=this.ul.children.length;this.goto(this.index-1&&e.length>0&&(e[t].setAttribute("aria-selected","true"),this.status.textContent=e[t].textContent,this.ul.scrollTop=e[t].offsetTop-this.ul.clientHeight+e[t].clientHeight,r.fire(this.input,"awesomplete-highlight",{text:this.suggestions[this.index]}))},select:function(t,e){if(t?this.index=r.siblingIndex(t):t=this.ul.children[this.index],t){var n=this.suggestions[this.index];r.fire(this.input,"awesomplete-select",{text:n,origin:e||t})&&(this.replace(n),this.close({reason:"select"}),r.fire(this.input,"awesomplete-selectcomplete",{text:n}))}},evaluate:function(){var t=this,n=this.input.value;n.length>=this.minChars&&this._list.length>0?(this.index=-1,this.ul.innerHTML="",this.suggestions=this._list.map(function(r){return new e(t.data(r,n))}).filter(function(e){return t.filter(e,n)}),!1!==this.sort&&(this.suggestions=this.suggestions.sort(this.sort)),this.suggestions=this.suggestions.slice(0,this.maxItems),this.suggestions.forEach(function(e){t.ul.appendChild(t.item(e,n))}),0===this.ul.children.length?this.close({reason:"nomatches"}):this.open()):this.close({reason:"nomatches"})}},s.all=[],s.FILTER_CONTAINS=function(t,e){return RegExp(r.regExpEscape(e.trim()),"i").test(t)},s.FILTER_STARTSWITH=function(t,e){return RegExp("^"+r.regExpEscape(e.trim()),"i").test(t)},s.SORT_BYLENGTH=function(t,e){return t.length!==e.length?t.length-e.length:t$&"),"aria-selected":"false"})},s.REPLACE=function(t){this.input.value=t.value},s.DATA=function(t){return t},Object.defineProperty(e.prototype=Object.create(String.prototype),"length",{get:function(){return this.label.length}}),e.prototype.toString=e.prototype.valueOf=function(){return""+this.label};var a=Array.prototype.slice;r.create=function(t,e){var n=document.createElement(t);for(var i in e){var o=e[i];if("inside"===i)r(o).appendChild(n);else if("around"===i){var s=r(o);s.parentNode.insertBefore(n,s),n.appendChild(s)}else i in n?n[i]=o:n.setAttribute(i,o)}return n},r.bind=function(t,e){if(t)for(var n in e){var r=e[n];n.split(/\s+/).forEach(function(e){t.addEventListener(e,r)})}},r.unbind=function(t,e){if(t)for(var n in e){var r=e[n];n.split(/\s+/).forEach(function(e){t.removeEventListener(e,r)})}},r.fire=function(t,e,n){var r=document.createEvent("HTMLEvents");r.initEvent(e,!0,!0);for(var i in n)r[i]=n[i];return t.dispatchEvent(r)},r.regExpEscape=function(t){return t.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")},r.siblingIndex=function(t){for(var e=0;t=t.previousElementSibling;e++);return e},"undefined"!=typeof Document&&("loading"!==document.readyState?o():document.addEventListener("DOMContentLoaded",o)),s.$=r,s.$$=i,"undefined"!=typeof self&&(self.Awesomplete=s),"object"==typeof t&&t.exports&&(t.exports=s)}()},function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("form",{attrs:{id:"password-generator"}},[n("div",{staticClass:"form-group"},[n("label",{staticClass:"sr-only",attrs:{for:"site"}},[t._v(t._s(t.$t("Site")))]),t._v(" "),n("div",{staticClass:"inner-addon left-addon"},[n("i",{staticClass:"fa fa-globe"}),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.password.site,expression:"password.site"}],ref:"site",staticClass:"form-control awesomplete",attrs:{id:"site",name:"site",type:"text",autocorrect:"off",autocapitalize:"none",placeholder:t.$t("Site")},domProps:{value:t.password.site},on:{input:function(e){e.target.composing||(t.password.site=e.target.value)}}})])]),t._v(" "),n("remove-auto-complete"),t._v(" "),n("div",{staticClass:"form-group"},[n("label",{staticClass:"sr-only",attrs:{for:"login"}},[t._v(t._s(t.$t("Login")))]),t._v(" "),n("div",{staticClass:"inner-addon left-addon"},[n("i",{staticClass:"fa fa-user"}),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.password.login,expression:"password.login"}],ref:"login",staticClass:"form-control",attrs:{id:"login",name:"login",type:"text",autocomplete:"off",autocorrect:"off",autocapitalize:"none",placeholder:t.$t("Login")},domProps:{value:t.password.login},on:{input:function(e){e.target.composing||(t.password.login=e.target.value)}}})])]),t._v(" "),n("div",{staticClass:"form-group"},[n("master-password",{ref:"masterPassword",attrs:{keyupEnter:t.generatePassword,label:t.$t("Master Password")},model:{value:t.masterPassword,callback:function(e){t.masterPassword=e},expression:"masterPassword"}})],1),t._v(" "),n("div",{staticClass:"form-group",class:{"mb-0":!t.showOptions}},[t.passwordGenerated?t._e():n("div",[n("button",{staticClass:"btn",class:{"btn-warning":1===t.password.version,"btn-primary":2===t.password.version},attrs:{id:"generatePassword__btn",type:"button"},on:{click:t.generatePassword}},[t._v("\n "+t._s(t.$t("Generate"))+"\n ")]),t._v(" "),n("button",{directives:[{name:"show",rawName:"v-show",value:!t.passwordGenerated,expression:"!passwordGenerated"}],staticClass:"btn btn-secondary pull-right",attrs:{type:"button"},on:{click:function(e){t.toggleShowOptions()}}},[n("i",{staticClass:"fa fa-sliders",attrs:{"aria-hidden":"true"}})])]),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.passwordGenerated,expression:"passwordGenerated"}],staticClass:"btn-group"},[n("div",{staticClass:"input-group"},[n("span",{staticClass:"input-group-btn"},[n("button",{staticClass:"btn",class:{"btn-warning":1===t.password.version,"btn-primary":2===t.password.version},attrs:{id:"copyPasswordButton",type:"button"},on:{click:function(e){t.copyPassword()}}},[n("i",{staticClass:"fa fa-clipboard",attrs:{"aria-hidden":"true"}})])]),t._v(" "),n("input",{ref:"passwordGenerated",staticClass:"form-control",attrs:{id:"generated-password",type:"password",tabindex:"-1"},domProps:{value:t.passwordGenerated}}),t._v(" "),n("span",{staticClass:"input-group-btn"},[n("button",{staticClass:"btn btn-secondary",attrs:{id:"revealGeneratedPassword",type:"button"},on:{click:function(e){t.togglePasswordType(t.$refs.passwordGenerated)}}},[n("i",{staticClass:"fa fa-eye",attrs:{"aria-hidden":"true"}})])]),t._v(" "),n("span",{staticClass:"input-group-btn"},[n("button",{staticClass:"btn btn-secondary",attrs:{id:"sharePasswordProfileButton",type:"button"},on:{click:function(e){t.sharePasswordProfile()}}},[n("i",{staticClass:"fa fa-share-alt pointer",attrs:{"aria-hidden":"true"}})])]),t._v(" "),n("span",{staticClass:"input-group-btn"},[n("button",{staticClass:"btn btn-secondary",attrs:{type:"button"},on:{click:function(e){t.toggleShowOptions()}}},[n("i",{staticClass:"fa fa-sliders",attrs:{"aria-hidden":"true"}})])])])])]),t._v(" "),t.showOptions?n("options"):t._e()],1)},i=[],o={render:r,staticRenderFns:i};e.a=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(150),i=n.n(r),o=n(151),s=n(2),a=s(i.a,o.a,null,null,null);e.default=a.exports},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=Object.assign||function(t){for(var e=1;e=0&&m.splice(e,1)}function a(t){var e=document.createElement("style");return e.type="text/css",o(t,e),e}function u(t,e){var n,r,i;if(e.singleton){var o=g++;n=v||(v=a(e)),r=c.bind(null,n,o,!1),i=c.bind(null,n,o,!0)}else n=a(e),r=f.bind(null,n),i=function(){s(n)};return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else i()}}function c(t,e,n,r){var i=n?"":r.css;if(t.styleSheet)t.styleSheet.cssText=y(e,i);else{var o=document.createTextNode(i),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(o,s[e]):t.appendChild(o)}}function f(t,e){var n=e.css,r=e.media,i=e.sourceMap;if(r&&t.setAttribute("media",r),i&&(n+="\n/*# sourceURL="+i.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}var l={},p=function(t){var e;return function(){return void 0===e&&(e=t.apply(this,arguments)),e}},d=p(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),h=p(function(){return document.head||document.getElementsByTagName("head")[0]}),v=null,g=0,m=[];t.exports=function(t,e){e=e||{},void 0===e.singleton&&(e.singleton=d()),void 0===e.insertAt&&(e.insertAt="bottom");var n=i(t);return r(n,e),function(t){for(var o=[],s=0;st.pageCount-t.pageRange/2&&(r=t.pageCount-t.selected,n=t.pageRange-r);for(var i=function(i){var o={index:i,content:i+1,selected:i===t.selected};if(i<=t.marginPages-1||i>=t.pageCount-t.marginPages)return void(e[i]=o);var s={content:"...",disabled:!0};t.selected-n>t.marginPages&&e[t.marginPages]!==s&&(e[t.marginPages]=s),t.selected+r0&&i===t.selected-n-a&&(e[i]=o),i>=t.selected-n&&i<=t.selected+r?void(e[i]=o):void 0},o=0;o=t.pageCount-t.marginPages;s--)i(s);var a=0;t.selected-t.pageRange>0&&(a=t.selected-t.pageRange);var u=t.pageCount;t.selected+t.pageRange=this.pageCount-1||(this.selected++,this.clickHandler(this.selected+1))},firstPageSelected:function(){return 0===this.selected},lastPageSelected:function(){return this.selected===this.pageCount-1||0===this.pageCount}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.noLiSurround?n("div",{class:t.containerClass},[n("a",{class:[t.prevLinkClass,{disabled:t.firstPageSelected()}],attrs:{tabindex:"0"},on:{click:function(e){t.prevPage()},keyup:function(e){return"button"in e||!t._k(e.keyCode,"enter",13)?void t.prevPage():null}}},[t._v(t._s(t.prevText))]),t._v(" "),t._l(t.pages,function(e){return[e.disabled?n("a",{class:[t.pageLinkClass,{active:e.selected,disabled:e.disabled}],attrs:{tabindex:"0"}},[t._v(t._s(e.content))]):n("a",{class:[t.pageLinkClass,{active:e.selected,disabled:e.disabled}],attrs:{tabindex:"0"},on:{click:function(n){t.handlePageSelected(e.index)},keyup:function(n){return"button"in n||!t._k(n.keyCode,"enter",13)?void t.handlePageSelected(e.index):null}}},[t._v("\n "+t._s(e.content)+"\n ")])]}),t._v(" "),n("a",{class:[t.nextLinkClass,{disabled:t.lastPageSelected()}],attrs:{tabindex:"0"},on:{click:function(e){t.nextPage()},keyup:function(e){return"button"in e||!t._k(e.keyCode,"enter",13)?void t.nextPage():null}}},[t._v(t._s(t.nextText))])],2):n("ul",{class:t.containerClass},[n("li",{class:[t.prevClass,{disabled:t.firstPageSelected()}]},[n("a",{class:t.prevLinkClass,attrs:{tabindex:"0"},on:{click:function(e){t.prevPage()},keyup:function(e){return"button"in e||!t._k(e.keyCode,"enter",13)?void t.prevPage():null}}},[t._v(t._s(t.prevText))])]),t._v(" "),t._l(t.pages,function(e){return n("li",{class:[t.pageClass,{active:e.selected,disabled:e.disabled}]},[e.disabled?n("a",{class:t.pageLinkClass,attrs:{tabindex:"0"}},[t._v(t._s(e.content))]):n("a",{class:t.pageLinkClass,attrs:{tabindex:"0"},on:{click:function(n){t.handlePageSelected(e.index)},keyup:function(n){return"button"in n||!t._k(n.keyCode,"enter",13)?void t.handlePageSelected(e.index):null}}},[t._v(t._s(e.content))])])}),t._v(" "),n("li",{class:[t.nextClass,{disabled:t.lastPageSelected()}]},[n("a",{class:t.nextLinkClass,attrs:{tabindex:"0"},on:{click:function(e){t.nextPage()},keyup:function(e){return"button"in e||!t._k(e.keyCode,"enter",13)?void t.nextPage():null}}},[t._v(t._s(t.nextText))])])],2)},staticRenderFns:[]}}])})},function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{attrs:{id:"passwords"}},[n("div",{staticClass:"pb-3",attrs:{id:"passwords__search"}},[n("div",{staticClass:"row"},[n("div",{staticClass:"col"},[n("div",{staticClass:"inner-addon left-addon"},[n("i",{staticClass:"fa fa-search"}),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.searchQuery,expression:"searchQuery"}],staticClass:"form-control",attrs:{name:"search",placeholder:"Search"},domProps:{value:t.searchQuery},on:{input:function(e){e.target.composing||(t.searchQuery=e.target.value)}}})])])])]),t._v(" "),n("div",{attrs:{id:"passwords__list"}},[0===t.passwords.length?n("div",[n("div",{staticClass:"row"},[n("div",{staticClass:"col"},[t._v("\n "+t._s(t.$t("NoPassword","You don't have any password profile saved in your database."))+"\n "),n("router-link",{attrs:{to:{name:"home"}}},[t._v(t._s(t.$t("CreatePassword","Would you like to create one?")))])],1)])]):t._e(),t._v(" "),0===t.filteredPasswords.length&&t.passwords.length>0?n("div",[n("div",{staticClass:"row"},[n("div",{staticClass:"col"},[t._v("\n "+t._s(t.$t("NoMatchFor","Oops! There are no matches for"))+' "'+t._s(t.searchQuery)+'".\n '+t._s(t.$t("UpdateYourSearch","Please try broadening your search."))+"\n ")])])]):t._e(),t._v(" "),t._l(t.filteredPasswords,function(e){return n("password-profile",{key:e.id,staticClass:"passwords__profile",attrs:{password:e},on:{deleted:function(e){t.pagination.currentPage=1}}})})],2),t._v(" "),t.pagination.pageCount>1?n("div",{attrs:{id:"passwords__pagination"}},[n("paginate",{attrs:{"page-count":t.pagination.pageCount,"click-handler":t.setCurrentPage,containerClass:"pagination pagination-sm","page-class":"page-item","prev-class":"page-item","next-class":"page-item","page-link-class":"page-link","prev-link-class":"page-link","next-link-class":"page-link","prev-text":t.$t("Previous"),"next-text":t.$t("Next")}})],1):t._e()])},i=[],o={render:r,staticRenderFns:i};e.a=o},function(t,e,n){(function(e,n){!function(e,n){t.exports=n()}(0,function(){"use strict";function t(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var r=("undefined"!=typeof window?window:void 0!==e||"undefined"!=typeof self&&self,"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t}),i=function(t,e){return e={exports:{}},t(e,e.exports),e.exports}(function(t,e){!function(e,n){t.exports=n()}(0,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){t.exports=n(1)},function(t,e,n){function r(t){var e=new s(t),n=o(s.prototype.request,e);return i.extend(n,s.prototype,e),i.extend(n,e),n}var i=n(2),o=n(3),s=n(4),a=n(5),u=r(a);u.Axios=s,u.create=function(t){return r(i.merge(a,t))},u.Cancel=n(22),u.CancelToken=n(23),u.isCancel=n(19),u.all=function(t){return Promise.all(t)},u.spread=n(24),t.exports=u,t.exports.default=u},function(t,e,n){function i(t){return"[object Array]"===C.call(t)}function o(t){return"[object ArrayBuffer]"===C.call(t)}function s(t){return"undefined"!=typeof FormData&&t instanceof FormData}function a(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer}function u(t){return"string"==typeof t}function c(t){return"number"==typeof t}function f(t){return void 0===t}function l(t){return null!==t&&"object"===(void 0===t?"undefined":r(t))}function p(t){return"[object Date]"===C.call(t)}function d(t){return"[object File]"===C.call(t)}function h(t){return"[object Blob]"===C.call(t)}function v(t){return"[object Function]"===C.call(t)}function g(t){return l(t)&&v(t.pipe)}function m(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams}function y(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}function _(){return"undefined"!=typeof window&&"undefined"!=typeof document&&"function"==typeof document.createElement}function w(t,e){if(null!==t&&void 0!==t)if("object"===(void 0===t?"undefined":r(t))||i(t)||(t=[t]),i(t))for(var n=0,o=t.length;n=200&&t<300}};c.headers={common:{Accept:"application/json, text/plain, */*"}},o.forEach(["delete","get","head"],function(t){c.headers[t]={}}),o.forEach(["post","put","patch"],function(t){c.headers[t]=o.merge(u)}),t.exports=c},function(t,e,n){var r=n(2);t.exports=function(t,e){r.forEach(t,function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])})}},function(t,e,n){var r=n(2),i=n(8),o=n(11),s=n(12),a=n(13),u=n(9),c="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||n(14);t.exports=function(t){return new Promise(function(e,f){var l=t.data,p=t.headers;r.isFormData(l)&&delete p["Content-Type"];var d=new XMLHttpRequest,h="onreadystatechange",v=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in d||a(t.url)||(d=new window.XDomainRequest,h="onload",v=!0,d.onprogress=function(){},d.ontimeout=function(){}),t.auth){var g=t.auth.username||"",m=t.auth.password||"";p.Authorization="Basic "+c(g+":"+m)}if(d.open(t.method.toUpperCase(),o(t.url,t.params,t.paramsSerializer),!0),d.timeout=t.timeout,d[h]=function(){if(d&&(4===d.readyState||v)&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in d?s(d.getAllResponseHeaders()):null,r=t.responseType&&"text"!==t.responseType?d.response:d.responseText,o={data:r,status:1223===d.status?204:d.status,statusText:1223===d.status?"No Content":d.statusText,headers:n,config:t,request:d};i(e,f,o),d=null}},d.onerror=function(){f(u("Network Error",t)),d=null},d.ontimeout=function(){f(u("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED")),d=null},r.isStandardBrowserEnv()){var y=n(15),_=(t.withCredentials||a(t.url))&&t.xsrfCookieName?y.read(t.xsrfCookieName):void 0;_&&(p[t.xsrfHeaderName]=_)}if("setRequestHeader"in d&&r.forEach(p,function(t,e){void 0===l&&"content-type"===e.toLowerCase()?delete p[e]:d.setRequestHeader(e,t)}),t.withCredentials&&(d.withCredentials=!0),t.responseType)try{d.responseType=t.responseType}catch(t){if("json"!==d.responseType)throw t}"function"==typeof t.onDownloadProgress&&d.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then(function(t){d&&(d.abort(),f(t),d=null)}),void 0===l&&(l=null),d.send(l)})}},function(t,e,n){var r=n(9);t.exports=function(t,e,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?e(r("Request failed with status code "+n.status,n.config,null,n)):t(n)}},function(t,e,n){var r=n(10);t.exports=function(t,e,n,i){var o=new Error(t);return r(o,e,n,i)}},function(t,e){t.exports=function(t,e,n,r){return t.config=e,n&&(t.code=n),t.response=r,t}},function(t,e,n){function r(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var i=n(2);t.exports=function(t,e,n){if(!e)return t;var o;if(n)o=n(e);else if(i.isURLSearchParams(e))o=e.toString();else{var s=[];i.forEach(e,function(t,e){null!==t&&void 0!==t&&(i.isArray(t)&&(e+="[]"),i.isArray(t)||(t=[t]),i.forEach(t,function(t){i.isDate(t)?t=t.toISOString():i.isObject(t)&&(t=JSON.stringify(t)),s.push(r(e)+"="+r(t))}))}),o=s.join("&")}return o&&(t+=(-1===t.indexOf("?")?"?":"&")+o),t}},function(t,e,n){var r=n(2);t.exports=function(t){var e,n,i,o={};return t?(r.forEach(t.split("\n"),function(t){i=t.indexOf(":"),e=r.trim(t.substr(0,i)).toLowerCase(),n=r.trim(t.substr(i+1)),e&&(o[e]=o[e]?o[e]+", "+n:n)}),o):o}},function(t,e,n){var r=n(2);t.exports=r.isStandardBrowserEnv()?function(){function t(t){var e=t;return n&&(i.setAttribute("href",e),e=i.href),i.setAttribute("href",e),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:"/"===i.pathname.charAt(0)?i.pathname:"/"+i.pathname}}var e,n=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a");return e=t(window.location.href),function(n){var i=r.isString(n)?t(n):n;return i.protocol===e.protocol&&i.host===e.host}}():function(){return function(){return!0}}()},function(t,e){function n(){this.message="String contains an invalid character"}function r(t){for(var e,r,o=String(t),s="",a=0,u=i;o.charAt(0|a)||(u="=",a%1);s+=u.charAt(63&e>>8-a%1*8)){if((r=o.charCodeAt(a+=.75))>255)throw new n;e=e<<8|r}return s}var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.prototype=new Error,n.prototype.code=5,n.prototype.name="InvalidCharacterError",t.exports=r},function(t,e,n){var r=n(2);t.exports=r.isStandardBrowserEnv()?function(){return{write:function(t,e,n,i,o,s){var a=[];a.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.isString(i)&&a.push("path="+i),r.isString(o)&&a.push("domain="+o),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},function(t,e,n){function r(){this.handlers=[]}var i=n(2);r.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},r.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},r.prototype.forEach=function(t){i.forEach(this.handlers,function(e){null!==e&&t(e)})},t.exports=r},function(t,e,n){function r(t){t.cancelToken&&t.cancelToken.throwIfRequested()}var i=n(2),o=n(18),s=n(19),a=n(5);t.exports=function(t){return r(t),t.headers=t.headers||{},t.data=o(t.data,t.headers,t.transformRequest),t.headers=i.merge(t.headers.common||{},t.headers[t.method]||{},t.headers||{}),i.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]}),(t.adapter||a.adapter)(t).then(function(e){return r(t),e.data=o(e.data,e.headers,t.transformResponse),e},function(e){return s(e)||(r(t),e&&e.response&&(e.response.data=o(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})}},function(t,e,n){var r=n(2);t.exports=function(t,e,n){return r.forEach(n,function(n){t=n(t,e)}),t}},function(t,e){t.exports=function(t){return!(!t||!t.__CANCEL__)}},function(t,e){t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,e){t.exports=function(t,e){return t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,"")}},function(t,e){function n(t){this.message=t}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,t.exports=n},function(t,e,n){function r(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(t){e=t});var n=this;t(function(t){n.reason||(n.reason=new i(t),e(n.reason))})}var i=n(22);r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var t;return{token:new r(function(e){t=e}),cancel:t}},t.exports=r},function(t,e){t.exports=function(t){return function(e){return t.apply(null,e)}}}])})}),o={translate:function(t,e,n,r){return t&&e in t?this.compile(t[e],r):n?this.compile(n,r):e},compile:function(t,e){return e?t.replace(/{(\w*)}/g,function(t,n){return e.hasOwnProperty(n)?e[n]:""}):t},getBestLanguage:function(t,e,n){if(void 0===e)return n;for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{languagesAvailable:[],defaultLanguage:"en-US"};s||(s=new e({data:function(){return{languagesAvailable:n.languagesAvailable,defaultLanguage:n.defaultLanguage,lang:this.getLang(),locales:{}}},computed:{locale:function(){return this.locales[this.lang]?this.locales[this.lang]:null}},methods:{setLang:function(t){var e=t.lang;this.lang=e},addLangInLanguagesAvailable:function(t){var e=t.lang;-1===this.languagesAvailable.indexOf(e)&&this.languagesAvailable.push(e)},setLocale:function(e){var n=e.lang,r=e.locale;this.locales=Object.assign({},this.locales,t({},n,r))},extendLocales:function(t){var e=this;Object.keys(t).forEach(function(n){var r=e.locales.hasOwnProperty(n)?Object.assign({},e.locales[n],t[n]):t[n];e.setLocale({lang:n,locale:r})})},getLang:function(){var t=n.languagesAvailable,e=window.navigator.userLanguage||window.navigator.language,r=n.defaultLanguage;return o.getBestLanguage(t,e,r)},getLocale:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.baseURL,o=void 0===r?"i18n":r,s=e.lang,a=void 0===s?"auto":s,u=e.ext,c=void 0===u?".json":u;(a="auto"===a?this.getLang():a)!==n.defaultLanguage&&i.get(o+"/"+a+c).then(function(e){var n=e.data;t.setLocale({lang:a,locale:n}),t.setLang({lang:a}),t.addLangInLanguagesAvailable({lang:a})})},_t:function(t,e,n){return o.translate(this.locale,t,e,n)}}}),e.prototype.$polyglot=s),e.mixin({methods:{$t:function(t,e,n){return this.$polyglot._t(t,e,n)}}}),e.locales=function(t){Object.keys(t).forEach(function(e){s.$polyglot.setLocale({lang:e,locale:t[e]})})}}}})}).call(e,n(4),n(8))}]); \ No newline at end of file +var i=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(t){r[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,a,u=r(t),c=1;c=e||n<0||O&&r>=m}function f(){var t=x();if(c(t))return l(t);_=setTimeout(f,u(t))}function l(t){return _=void 0,A&&v?i(t):(v=g=void 0,y)}function p(){void 0!==_&&clearTimeout(_),C=0,v=E=g=_=void 0}function d(){return void 0===_?y:l(x())}function h(){var t=x(),n=c(t);if(v=arguments,g=this,E=t,n){if(void 0===_)return o(E);if(O)return _=setTimeout(f,e),i(E)}return void 0===_&&(_=setTimeout(f,e)),y}var v,g,m,y,_,E,C=0,S=!1,O=!1,A=!0;if("function"!=typeof t)throw new TypeError(a);return e=s(e)||0,r(n)&&(S=!!n.leading,O="maxWait"in n,m=O?w(s(n.maxWait)||0,e):m,A="trailing"in n?!!n.trailing:A),h.cancel=p,h.flush=d,h}function r(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function i(t){return!!t&&"object"==typeof t}function o(t){return"symbol"==typeof t||i(t)&&_.call(t)==c}function s(t){if("number"==typeof t)return t;if(o(t))return u;if(r(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=r(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(f,"");var n=p.test(t);return n||d.test(t)?h(t.slice(2),n?2:8):l.test(t)?u:+t}var a="Expected a function",u=NaN,c="[object Symbol]",f=/^\s+|\s+$/g,l=/^[-+]0x[0-9a-f]+$/i,p=/^0b[01]+$/i,d=/^0o[0-7]+$/i,h=parseInt,v="object"==typeof e&&e&&e.Object===Object&&e,g="object"==typeof self&&self&&self.Object===Object&&self,m=v||g||Function("return this")(),y=Object.prototype,_=y.toString,w=Math.max,b=Math.min,x=function(){return m.Date.now()};t.exports=n}).call(e,n(4))},function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"masterPassword"},[n("div",{staticClass:"input-group inner-addon left-addon"},[n("label",{staticClass:"sr-only",attrs:{for:"passwordField"}},[t._v("\n "+t._s(t.label)+"\n ")]),t._v(" "),n("i",{staticClass:"fa fa-lock"}),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.password,expression:"password"}],ref:"passwordField",staticClass:"form-control",attrs:{id:"passwordField",name:"passwordField",type:"password",autocorrect:"off",autocapitalize:"off",placeholder:t.label},domProps:{value:t.password},on:{blur:function(e){t.hidePassword(t.$refs.passwordField)},input:function(e){e.target.composing||(t.password=e.target.value)}}}),t._v(" "),t.fingerprint&&t.password?n("span",{staticClass:"input-group-btn",on:{click:function(e){t.togglePasswordType(t.$refs.passwordField)}}},[n("button",{staticClass:"btn",attrs:{id:"fingerprint",type:"button",tabindex:"-1"}},[n("small",{staticClass:"hint--left"},[n("i",{staticClass:"fa fa-fw",class:[t.icon1],style:{color:t.color1}}),t._v(" "),n("i",{staticClass:"fa fa-fw",class:[t.icon2],style:{color:t.color2}}),t._v(" "),n("i",{staticClass:"fa fa-fw",class:[t.icon3],style:{color:t.color3}})])])]):t._e()]),t._v(" "),t.showEncryptButton?n("button",{staticClass:"btn btn-link btn-sm p-0",class:{disabled:""===t.email,"hint--top hint--medium":""!==t.email},attrs:{id:"encryptMasterPassword__btn",type:"button"},on:{click:function(e){t.encryptMasterPassword(t.$refs.passwordField.value)}}},[n("small",[t._v(t._s(t.EncryptButtonText))])]):t._e()])},i=[],o={render:r,staticRenderFns:i};e.a=o},function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("form",{on:{submit:function(e){e.preventDefault(),t.signIn(e)}}},[n("div",{staticClass:"form-group"},[n("div",{staticClass:"inner-addon left-addon"},[n("i",{staticClass:"fa fa-globe"}),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.baseURL,expression:"baseURL"}],staticClass:"form-control",attrs:{id:"baseURL",type:"text",placeholder:t.$t("LessPass Database Url")},domProps:{value:t.baseURL},on:{input:function(e){e.target.composing||(t.baseURL=e.target.value)}}})])]),t._v(" "),n("div",{staticClass:"form-group row"},[n("div",{staticClass:"col-12"},[n("div",{staticClass:"inner-addon left-addon"},[n("i",{staticClass:"fa fa-user"}),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.email,expression:"email"}],staticClass:"form-control",attrs:{id:"email",name:"username",type:"email",placeholder:t.$t("Email"),required:""},domProps:{value:t.email},on:{input:function(e){e.target.composing||(t.email=e.target.value)}}})])])]),t._v(" "),n("div",{staticClass:"form-group mb-2"},[n("master-password",{attrs:{label:t.$t("Master Password"),email:t.email,showEncryptButton:!0,EncryptButtonText:t.$t("Encrypt my master password")},model:{value:t.password,callback:function(e){t.password=e},expression:"password"}})],1),t._v(" "),n("div",{staticClass:"form-group row no-gutters mb-0"},[n("div",{staticClass:"col"},[n("button",{staticClass:"btn btn-block",class:{"btn-warning":1===t.version,"btn-primary":2===t.version},attrs:{id:"signInButton",type:"submit"}},[t._v("\n "+t._s(t.$t("Sign In"))+"\n ")])]),t._v(" "),n("div",{staticClass:"col"},[n("button",{staticClass:"btn btn-secondary btn-block",attrs:{id:"registerButton",type:"button"},on:{click:t.register}},[t._v("\n "+t._s(t.$t("Register"))+"\n ")])])]),t._v(" "),n("div",{staticClass:"form-group mb-0"},[n("button",{staticClass:"btn btn-link btn-sm p-0",attrs:{type:"button"},on:{click:function(e){t.$router.push({name:"passwordReset"})}}},[n("small",[t._v(t._s(t.$t("ForgotPassword","Forgot your password?")))])])])])},i=[],o={render:r,staticRenderFns:i};e.a=o},function(t,e,n){"use strict";function r(t){n(134)}Object.defineProperty(e,"__esModule",{value:!0});var i=n(136),o=n.n(i),s=n(148),a=n(2),u=r,c=a(o.a,s.a,u,null,null);e.default=c.exports},function(t,e,n){var r=n(135);"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);n(7)("1fff9582",r,!0)},function(t,e,n){e=t.exports=n(6)(void 0),e.push([t.i,"#generated-password{font-family:Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,sans-serif}div.awesomplete{display:block}div.awesomplete>ul{z-index:11}",""])},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=Object.assign||function(t){for(var e=1;e0&&new w.default(e,{list:t.map(function(t){return{label:t.site+" "+t.login,value:t}}),replace:function(t){n.$store.dispatch("savePassword",{password:t.value}),this.input.value=t.value.site,n.focusBestInputField()}})},password:{handler:function(){this.cleanErrors()},deep:!0},passwordGenerated:function(){this.cleanFormInSeconds(30)},masterPassword:function(){this.cleanErrors(),this.cleanFormInSeconds(30)}},methods:{toggleShowOptions:function(){this.$store.dispatch("toggleShowOptions")},togglePasswordType:function(t){"password"===t.type?t.type="text":t.type="password"},cleanErrors:function(){clearTimeout(this.cleanTimeout),this.passwordGenerated=""},cleanFormInSeconds:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:15;clearTimeout(this.cleanTimeout),this.cleanTimeout=setTimeout(function(){t.masterPassword="",t.passwordGenerated="",t.fingerprint=""},1e3*e)},generatePassword:function(){var t=this,e=this.password.site,n=this.password.login,r=this.masterPassword;if(!e&&!n||!r)return void y.default.error(this.$t("SiteLoginMasterPasswordMandatory","Site, login, and master password fields are mandatory."));this.cleanErrors(),this.fingerprint=this.masterPassword;var i={lowercase:this.password.lowercase,uppercase:this.password.uppercase,numbers:this.password.numbers,symbols:this.password.symbols,length:this.password.length,counter:this.password.counter,version:this.password.version};return s.default.generatePassword(e,n,r,i).then(function(e){t.passwordGenerated=e,t.$store.dispatch("passwordGenerated")})},focusBestInputField:function(){var t=this.$refs.site,e=this.$refs.login,n=this.$refs.masterPassword.$refs.passwordField;t.value?e.value?n.focus():e.focus():t.focus()},copyPassword:function(){var t=this;(0,c.default)(this.passwordGenerated)?((0,g.showTooltip)(document.getElementById("copyPasswordButton"),this.$t("Copied","copied !")),setTimeout(function(){t.cleanFormInSeconds()},2e3)):y.default.warning(this.$t("SorryCopy","We are sorry the copy only works on modern browsers"))},sharePasswordProfile:function(){var t=this;if((0,c.default)(this.passwordURL)){var e=this.$t("PasswordProfileCopied","Your password profile has been copied");(0,g.showTooltip)(document.getElementById("sharePasswordProfileButton"),e,"hint--top-left"),setTimeout(function(){t.cleanFormInSeconds()},2e3)}else y.default.warning(this.$t("SorryCopy","We are sorry the copy only works on modern browsers"))}}}},function(t,e,n){"use strict";t.exports=function(t){var e=document.createElement("textarea");e.value=t,e.setAttribute("readonly",""),e.style.contain="strict",e.style.position="absolute",e.style.left="-9999px",e.style.fontSize="12pt";var n=getSelection(),r=!1;n.rangeCount>0&&(r=n.getRangeAt(0)),document.body.appendChild(e),e.select();var i=!1;try{i=document.execCommand("copy")}catch(t){}return document.body.removeChild(e),r&&(n.removeAllRanges(),n.addRange(r)),i}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(139),i=n(2),o=i(null,r.a,null,null,null);e.default=o.exports},function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement;t._self._c;return t._m(0)},i=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticStyle:{display:"none"}},[n("label",{attrs:{for:"username"}},[n("input",{attrs:{type:"text",id:"username",name:"username",autocomplete:"username"}})]),t._v(" "),n("label",{attrs:{for:"password"}},[n("input",{attrs:{type:"password",id:"password",name:"password",autocomplete:"current-password"}})])])}],o={render:r,staticRenderFns:i};e.a=o},function(t,e,n){"use strict";function r(t){n(141)}Object.defineProperty(e,"__esModule",{value:!0});var i=n(143),o=n.n(i),s=n(145),a=n(2),u=r,c=a(o.a,s.a,u,null,null);e.default=c.exports},function(t,e,n){var r=n(142);"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);n(7)("15e23426",r,!0)},function(t,e,n){e=t.exports=n(6)(void 0),e.push([t.i,"#options input[type=number]{-moz-appearance:textfield}#options input[type=number]::-webkit-inner-spin-button,#options input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}",""])},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(5),i=n(9),o=function(t){return t&&t.__esModule?t:{default:t}}(i),s=n(144);e.default={name:"options",computed:(0,r.mapState)(["password"]),methods:{decrement:s.decrement,increment:s.increment,setVersion:function(t){1===t&&o.default.error(this.$t("WarningV1Deprecated","Version 1 is deprecated and will be deleted soon. We strongly advise you to migrate your passwords to version 2."));var e=Object.assign({},this.password,{length:1===t?12:16,version:t});this.$store.dispatch("savePassword",{password:e}),this.$store.dispatch("saveVersion",{version:t})},saveDefaultOptions:function(){this.$store.dispatch("saveDefaultOptions",{options:this.options}),o.default.success(this.$t("Your options have been saved successfully"))}}}},function(t,e,n){"use strict";function r(t,e){var n=e.min,r=e.max;return t>r?r:t2&&void 0!==arguments[2]?arguments[2]:"hint--top",r=t.className;t.setAttribute("class",r+" "+n),t.setAttribute("aria-label",e),setTimeout(function(){t.setAttribute("class",r),t.setAttribute("aria-label","")},2e3)}Object.defineProperty(e,"__esModule",{value:!0}),e.showTooltip=r},function(t,e){!function(){function e(t){var e=Array.isArray(t)?{label:t[0],value:t[1]}:"object"==typeof t&&"label"in t&&"value"in t?t:{label:t,value:t};this.label=e.label||e.value,this.value=e.value}function n(t,e,n){for(var r in e){var i=e[r],o=t.input.getAttribute("data-"+r.toLowerCase());"number"==typeof i?t[r]=parseInt(o):!1===i?t[r]=null!==o:i instanceof Function?t[r]=null:t[r]=o,t[r]||0===t[r]||(t[r]=r in n?n[r]:i)}}function r(t,e){return"string"==typeof t?(e||document).querySelector(t):t||null}function i(t,e){return a.call((e||document).querySelectorAll(t))}function o(){i("input.awesomplete").forEach(function(t){new s(t)})}var s=function(t,e){var i=this;this.isOpened=!1,this.input=r(t),this.input.setAttribute("autocomplete","off"),this.input.setAttribute("aria-autocomplete","list"),e=e||{},n(this,{minChars:2,maxItems:10,autoFirst:!1,data:s.DATA,filter:s.FILTER_CONTAINS,sort:!1!==e.sort&&s.SORT_BYLENGTH,item:s.ITEM,replace:s.REPLACE},e),this.index=-1,this.container=r.create("div",{className:"awesomplete",around:t}),this.ul=r.create("ul",{hidden:"hidden",inside:this.container}),this.status=r.create("span",{className:"visually-hidden",role:"status","aria-live":"assertive","aria-relevant":"additions",inside:this.container}),this._events={input:{input:this.evaluate.bind(this),blur:this.close.bind(this,{reason:"blur"}),keydown:function(t){var e=t.keyCode;i.opened&&(13===e&&i.selected?(t.preventDefault(),i.select()):27===e?i.close({reason:"esc"}):38!==e&&40!==e||(t.preventDefault(),i[38===e?"previous":"next"]()))}},form:{submit:this.close.bind(this,{reason:"submit"})},ul:{mousedown:function(t){var e=t.target;if(e!==this){for(;e&&!/li/i.test(e.nodeName);)e=e.parentNode;e&&0===t.button&&(t.preventDefault(),i.select(e,t.target))}}}},r.bind(this.input,this._events.input),r.bind(this.input.form,this._events.form),r.bind(this.ul,this._events.ul),this.input.hasAttribute("list")?(this.list="#"+this.input.getAttribute("list"),this.input.removeAttribute("list")):this.list=this.input.getAttribute("data-list")||e.list||[],s.all.push(this)};s.prototype={set list(t){if(Array.isArray(t))this._list=t;else if("string"==typeof t&&t.indexOf(",")>-1)this._list=t.split(/\s*,\s*/);else if((t=r(t))&&t.children){var e=[];a.apply(t.children).forEach(function(t){if(!t.disabled){var n=t.textContent.trim(),r=t.value||n,i=t.label||n;""!==r&&e.push({label:i,value:r})}}),this._list=e}document.activeElement===this.input&&this.evaluate()},get selected(){return this.index>-1},get opened(){return this.isOpened},close:function(t){this.opened&&(this.ul.setAttribute("hidden",""),this.isOpened=!1,this.index=-1,r.fire(this.input,"awesomplete-close",t||{}))},open:function(){this.ul.removeAttribute("hidden"),this.isOpened=!0,this.autoFirst&&-1===this.index&&this.goto(0),r.fire(this.input,"awesomplete-open")},destroy:function(){r.unbind(this.input,this._events.input),r.unbind(this.input.form,this._events.form);var t=this.container.parentNode;t.insertBefore(this.input,this.container),t.removeChild(this.container),this.input.removeAttribute("autocomplete"),this.input.removeAttribute("aria-autocomplete");var e=s.all.indexOf(this);-1!==e&&s.all.splice(e,1)},next:function(){var t=this.ul.children.length;this.goto(this.index-1&&e.length>0&&(e[t].setAttribute("aria-selected","true"),this.status.textContent=e[t].textContent,this.ul.scrollTop=e[t].offsetTop-this.ul.clientHeight+e[t].clientHeight,r.fire(this.input,"awesomplete-highlight",{text:this.suggestions[this.index]}))},select:function(t,e){if(t?this.index=r.siblingIndex(t):t=this.ul.children[this.index],t){var n=this.suggestions[this.index];r.fire(this.input,"awesomplete-select",{text:n,origin:e||t})&&(this.replace(n),this.close({reason:"select"}),r.fire(this.input,"awesomplete-selectcomplete",{text:n}))}},evaluate:function(){var t=this,n=this.input.value;n.length>=this.minChars&&this._list.length>0?(this.index=-1,this.ul.innerHTML="",this.suggestions=this._list.map(function(r){return new e(t.data(r,n))}).filter(function(e){return t.filter(e,n)}),!1!==this.sort&&(this.suggestions=this.suggestions.sort(this.sort)),this.suggestions=this.suggestions.slice(0,this.maxItems),this.suggestions.forEach(function(e){t.ul.appendChild(t.item(e,n))}),0===this.ul.children.length?this.close({reason:"nomatches"}):this.open()):this.close({reason:"nomatches"})}},s.all=[],s.FILTER_CONTAINS=function(t,e){return RegExp(r.regExpEscape(e.trim()),"i").test(t)},s.FILTER_STARTSWITH=function(t,e){return RegExp("^"+r.regExpEscape(e.trim()),"i").test(t)},s.SORT_BYLENGTH=function(t,e){return t.length!==e.length?t.length-e.length:t$&"),"aria-selected":"false"})},s.REPLACE=function(t){this.input.value=t.value},s.DATA=function(t){return t},Object.defineProperty(e.prototype=Object.create(String.prototype),"length",{get:function(){return this.label.length}}),e.prototype.toString=e.prototype.valueOf=function(){return""+this.label};var a=Array.prototype.slice;r.create=function(t,e){var n=document.createElement(t);for(var i in e){var o=e[i];if("inside"===i)r(o).appendChild(n);else if("around"===i){var s=r(o);s.parentNode.insertBefore(n,s),n.appendChild(s)}else i in n?n[i]=o:n.setAttribute(i,o)}return n},r.bind=function(t,e){if(t)for(var n in e){var r=e[n];n.split(/\s+/).forEach(function(e){t.addEventListener(e,r)})}},r.unbind=function(t,e){if(t)for(var n in e){var r=e[n];n.split(/\s+/).forEach(function(e){t.removeEventListener(e,r)})}},r.fire=function(t,e,n){var r=document.createEvent("HTMLEvents");r.initEvent(e,!0,!0);for(var i in n)r[i]=n[i];return t.dispatchEvent(r)},r.regExpEscape=function(t){return t.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")},r.siblingIndex=function(t){for(var e=0;t=t.previousElementSibling;e++);return e},"undefined"!=typeof Document&&("loading"!==document.readyState?o():document.addEventListener("DOMContentLoaded",o)),s.$=r,s.$$=i,"undefined"!=typeof self&&(self.Awesomplete=s),"object"==typeof t&&t.exports&&(t.exports=s)}()},function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("form",{attrs:{id:"password-generator"}},[n("div",{staticClass:"form-group"},[n("label",{staticClass:"sr-only",attrs:{for:"site"}},[t._v(t._s(t.$t("Site")))]),t._v(" "),n("div",{staticClass:"inner-addon left-addon"},[n("i",{staticClass:"fa fa-globe"}),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.password.site,expression:"password.site"}],ref:"site",staticClass:"form-control awesomplete",attrs:{id:"site",name:"site",autocorrect:"off",autocapitalize:"none",placeholder:t.$t("Site")},domProps:{value:t.password.site},on:{input:function(e){e.target.composing||(t.password.site=e.target.value)}}})])]),t._v(" "),n("remove-auto-complete"),t._v(" "),n("div",{staticClass:"form-group"},[n("label",{staticClass:"sr-only",attrs:{for:"login"}},[t._v(t._s(t.$t("Login")))]),t._v(" "),n("div",{staticClass:"inner-addon left-addon"},[n("i",{staticClass:"fa fa-user"}),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.password.login,expression:"password.login"}],ref:"login",staticClass:"form-control",attrs:{id:"login",name:"login",autocomplete:"off",autocorrect:"off",autocapitalize:"none",placeholder:t.$t("Login")},domProps:{value:t.password.login},on:{input:function(e){e.target.composing||(t.password.login=e.target.value)}}})])]),t._v(" "),n("div",{staticClass:"form-group"},[n("master-password",{ref:"masterPassword",attrs:{keyupEnter:t.generatePassword,label:t.$t("Master Password")},model:{value:t.masterPassword,callback:function(e){t.masterPassword=e},expression:"masterPassword"}})],1),t._v(" "),n("div",{staticClass:"form-group",class:{"mb-0":!t.showOptions}},[t.passwordGenerated?t._e():n("div",[n("button",{staticClass:"btn",class:{"btn-warning":1===t.password.version,"btn-primary":2===t.password.version},attrs:{id:"generatePassword__btn",type:"button"},on:{click:t.generatePassword}},[t._v("\n "+t._s(t.$t("Generate"))+"\n ")]),t._v(" "),n("button",{directives:[{name:"show",rawName:"v-show",value:!t.passwordGenerated,expression:"!passwordGenerated"}],staticClass:"btn btn-secondary pull-right showOptions__btn",attrs:{type:"button"},on:{click:function(e){t.toggleShowOptions()}}},[n("i",{staticClass:"fa fa-sliders"})])]),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.passwordGenerated,expression:"passwordGenerated"}],staticClass:"btn-group"},[n("div",{staticClass:"input-group"},[n("span",{staticClass:"input-group-btn"},[n("button",{staticClass:"btn",class:{"btn-warning":1===t.password.version,"btn-primary":2===t.password.version},attrs:{id:"copyPasswordButton",type:"button"},on:{click:function(e){t.copyPassword()}}},[n("i",{staticClass:"fa fa-clipboard"})])]),t._v(" "),n("input",{ref:"passwordGenerated",staticClass:"form-control",attrs:{id:"generated-password",type:"password",tabindex:"-1"},domProps:{value:t.passwordGenerated}}),t._v(" "),n("span",{staticClass:"input-group-btn"},[n("button",{staticClass:"btn btn-secondary",attrs:{id:"revealGeneratedPassword",type:"button"},on:{click:function(e){t.togglePasswordType(t.$refs.passwordGenerated)}}},[n("i",{staticClass:"fa fa-eye"})])]),t._v(" "),n("span",{staticClass:"input-group-btn"},[n("button",{staticClass:"btn btn-secondary",attrs:{id:"sharePasswordProfileButton",type:"button"},on:{click:function(e){t.sharePasswordProfile()}}},[n("i",{staticClass:"fa fa-share-alt pointer"})])]),t._v(" "),n("span",{staticClass:"input-group-btn"},[n("button",{staticClass:"btn btn-secondary showOptions__btn",attrs:{type:"button"},on:{click:function(e){t.toggleShowOptions()}}},[n("i",{staticClass:"fa fa-sliders"})])])])])]),t._v(" "),t.showOptions?n("options"):t._e()],1)},i=[],o={render:r,staticRenderFns:i};e.a=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(150),i=n.n(r),o=n(151),s=n(2),a=s(i.a,o.a,null,null,null);e.default=a.exports},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=Object.assign||function(t){for(var e=1;e=0&&m.splice(e,1)}function a(t){var e=document.createElement("style");return e.type="text/css",o(t,e),e}function u(t,e){var n,r,i;if(e.singleton){var o=g++;n=v||(v=a(e)),r=c.bind(null,n,o,!1),i=c.bind(null,n,o,!0)}else n=a(e),r=f.bind(null,n),i=function(){s(n)};return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else i()}}function c(t,e,n,r){var i=n?"":r.css;if(t.styleSheet)t.styleSheet.cssText=y(e,i);else{var o=document.createTextNode(i),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(o,s[e]):t.appendChild(o)}}function f(t,e){var n=e.css,r=e.media,i=e.sourceMap;if(r&&t.setAttribute("media",r),i&&(n+="\n/*# sourceURL="+i.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}var l={},p=function(t){var e;return function(){return void 0===e&&(e=t.apply(this,arguments)),e}},d=p(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),h=p(function(){return document.head||document.getElementsByTagName("head")[0]}),v=null,g=0,m=[];t.exports=function(t,e){e=e||{},void 0===e.singleton&&(e.singleton=d()),void 0===e.insertAt&&(e.insertAt="bottom");var n=i(t);return r(n,e),function(t){for(var o=[],s=0;st.pageCount-t.pageRange/2&&(r=t.pageCount-t.selected,n=t.pageRange-r);for(var i=function(i){var o={index:i,content:i+1,selected:i===t.selected};if(i<=t.marginPages-1||i>=t.pageCount-t.marginPages)return void(e[i]=o);var s={content:"...",disabled:!0};t.selected-n>t.marginPages&&e[t.marginPages]!==s&&(e[t.marginPages]=s),t.selected+r0&&i===t.selected-n-a&&(e[i]=o),i>=t.selected-n&&i<=t.selected+r?void(e[i]=o):void 0},o=0;o=t.pageCount-t.marginPages;s--)i(s);var a=0;t.selected-t.pageRange>0&&(a=t.selected-t.pageRange);var u=t.pageCount;t.selected+t.pageRange=this.pageCount-1||(this.selected++,this.clickHandler(this.selected+1))},firstPageSelected:function(){return 0===this.selected},lastPageSelected:function(){return this.selected===this.pageCount-1||0===this.pageCount}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.noLiSurround?n("div",{class:t.containerClass},[n("a",{class:[t.prevLinkClass,{disabled:t.firstPageSelected()}],attrs:{tabindex:"0"},on:{click:function(e){t.prevPage()},keyup:function(e){return"button"in e||!t._k(e.keyCode,"enter",13)?void t.prevPage():null}}},[t._v(t._s(t.prevText))]),t._v(" "),t._l(t.pages,function(e){return[e.disabled?n("a",{class:[t.pageLinkClass,{active:e.selected,disabled:e.disabled}],attrs:{tabindex:"0"}},[t._v(t._s(e.content))]):n("a",{class:[t.pageLinkClass,{active:e.selected,disabled:e.disabled}],attrs:{tabindex:"0"},on:{click:function(n){t.handlePageSelected(e.index)},keyup:function(n){return"button"in n||!t._k(n.keyCode,"enter",13)?void t.handlePageSelected(e.index):null}}},[t._v("\n "+t._s(e.content)+"\n ")])]}),t._v(" "),n("a",{class:[t.nextLinkClass,{disabled:t.lastPageSelected()}],attrs:{tabindex:"0"},on:{click:function(e){t.nextPage()},keyup:function(e){return"button"in e||!t._k(e.keyCode,"enter",13)?void t.nextPage():null}}},[t._v(t._s(t.nextText))])],2):n("ul",{class:t.containerClass},[n("li",{class:[t.prevClass,{disabled:t.firstPageSelected()}]},[n("a",{class:t.prevLinkClass,attrs:{tabindex:"0"},on:{click:function(e){t.prevPage()},keyup:function(e){return"button"in e||!t._k(e.keyCode,"enter",13)?void t.prevPage():null}}},[t._v(t._s(t.prevText))])]),t._v(" "),t._l(t.pages,function(e){return n("li",{class:[t.pageClass,{active:e.selected,disabled:e.disabled}]},[e.disabled?n("a",{class:t.pageLinkClass,attrs:{tabindex:"0"}},[t._v(t._s(e.content))]):n("a",{class:t.pageLinkClass,attrs:{tabindex:"0"},on:{click:function(n){t.handlePageSelected(e.index)},keyup:function(n){return"button"in n||!t._k(n.keyCode,"enter",13)?void t.handlePageSelected(e.index):null}}},[t._v(t._s(e.content))])])}),t._v(" "),n("li",{class:[t.nextClass,{disabled:t.lastPageSelected()}]},[n("a",{class:t.nextLinkClass,attrs:{tabindex:"0"},on:{click:function(e){t.nextPage()},keyup:function(e){return"button"in e||!t._k(e.keyCode,"enter",13)?void t.nextPage():null}}},[t._v(t._s(t.nextText))])])],2)},staticRenderFns:[]}}])})},function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{attrs:{id:"passwords"}},[n("div",{staticClass:"pb-3",attrs:{id:"passwords__search"}},[n("div",{staticClass:"row"},[n("div",{staticClass:"col"},[n("div",{staticClass:"inner-addon left-addon"},[n("i",{staticClass:"fa fa-search"}),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.searchQuery,expression:"searchQuery"}],staticClass:"form-control",attrs:{name:"search",placeholder:"Search"},domProps:{value:t.searchQuery},on:{input:function(e){e.target.composing||(t.searchQuery=e.target.value)}}})])])])]),t._v(" "),n("div",{attrs:{id:"passwords__list"}},[0===t.passwords.length?n("div",[n("div",{staticClass:"row"},[n("div",{staticClass:"col"},[t._v("\n "+t._s(t.$t("NoPassword","You don't have any password profile saved in your database."))+"\n "),n("router-link",{attrs:{to:{name:"home"}}},[t._v(t._s(t.$t("CreatePassword","Would you like to create one?")))])],1)])]):t._e(),t._v(" "),0===t.filteredPasswords.length&&t.passwords.length>0?n("div",[n("div",{staticClass:"row"},[n("div",{staticClass:"col"},[t._v("\n "+t._s(t.$t("NoMatchFor","Oops! There are no matches for"))+' "'+t._s(t.searchQuery)+'".\n '+t._s(t.$t("UpdateYourSearch","Please try broadening your search."))+"\n ")])])]):t._e(),t._v(" "),t._l(t.filteredPasswords,function(e){return n("password-profile",{key:e.id,staticClass:"passwords__profile",attrs:{password:e},on:{deleted:function(e){t.pagination.currentPage=1}}})})],2),t._v(" "),t.pagination.pageCount>1?n("div",{attrs:{id:"passwords__pagination"}},[n("paginate",{attrs:{"page-count":t.pagination.pageCount,"click-handler":t.setCurrentPage,containerClass:"pagination pagination-sm","page-class":"page-item","prev-class":"page-item","next-class":"page-item","page-link-class":"page-link","prev-link-class":"page-link","next-link-class":"page-link","prev-text":t.$t("Previous"),"next-text":t.$t("Next")}})],1):t._e()])},i=[],o={render:r,staticRenderFns:i};e.a=o},function(t,e,n){(function(e,n){!function(e,n){t.exports=n()}(0,function(){"use strict";function t(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var r=("undefined"!=typeof window?window:void 0!==e||"undefined"!=typeof self&&self,"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t}),i=function(t,e){return e={exports:{}},t(e,e.exports),e.exports}(function(t,e){!function(e,n){t.exports=n()}(0,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){t.exports=n(1)},function(t,e,n){function r(t){var e=new s(t),n=o(s.prototype.request,e);return i.extend(n,s.prototype,e),i.extend(n,e),n}var i=n(2),o=n(3),s=n(4),a=n(5),u=r(a);u.Axios=s,u.create=function(t){return r(i.merge(a,t))},u.Cancel=n(22),u.CancelToken=n(23),u.isCancel=n(19),u.all=function(t){return Promise.all(t)},u.spread=n(24),t.exports=u,t.exports.default=u},function(t,e,n){function i(t){return"[object Array]"===C.call(t)}function o(t){return"[object ArrayBuffer]"===C.call(t)}function s(t){return"undefined"!=typeof FormData&&t instanceof FormData}function a(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer}function u(t){return"string"==typeof t}function c(t){return"number"==typeof t}function f(t){return void 0===t}function l(t){return null!==t&&"object"===(void 0===t?"undefined":r(t))}function p(t){return"[object Date]"===C.call(t)}function d(t){return"[object File]"===C.call(t)}function h(t){return"[object Blob]"===C.call(t)}function v(t){return"[object Function]"===C.call(t)}function g(t){return l(t)&&v(t.pipe)}function m(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams}function y(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}function _(){return"undefined"!=typeof window&&"undefined"!=typeof document&&"function"==typeof document.createElement}function w(t,e){if(null!==t&&void 0!==t)if("object"===(void 0===t?"undefined":r(t))||i(t)||(t=[t]),i(t))for(var n=0,o=t.length;n=200&&t<300}};c.headers={common:{Accept:"application/json, text/plain, */*"}},o.forEach(["delete","get","head"],function(t){c.headers[t]={}}),o.forEach(["post","put","patch"],function(t){c.headers[t]=o.merge(u)}),t.exports=c},function(t,e,n){var r=n(2);t.exports=function(t,e){r.forEach(t,function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])})}},function(t,e,n){var r=n(2),i=n(8),o=n(11),s=n(12),a=n(13),u=n(9),c="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||n(14);t.exports=function(t){return new Promise(function(e,f){var l=t.data,p=t.headers;r.isFormData(l)&&delete p["Content-Type"];var d=new XMLHttpRequest,h="onreadystatechange",v=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in d||a(t.url)||(d=new window.XDomainRequest,h="onload",v=!0,d.onprogress=function(){},d.ontimeout=function(){}),t.auth){var g=t.auth.username||"",m=t.auth.password||"";p.Authorization="Basic "+c(g+":"+m)}if(d.open(t.method.toUpperCase(),o(t.url,t.params,t.paramsSerializer),!0),d.timeout=t.timeout,d[h]=function(){if(d&&(4===d.readyState||v)&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in d?s(d.getAllResponseHeaders()):null,r=t.responseType&&"text"!==t.responseType?d.response:d.responseText,o={data:r,status:1223===d.status?204:d.status,statusText:1223===d.status?"No Content":d.statusText,headers:n,config:t,request:d};i(e,f,o),d=null}},d.onerror=function(){f(u("Network Error",t)),d=null},d.ontimeout=function(){f(u("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED")),d=null},r.isStandardBrowserEnv()){var y=n(15),_=(t.withCredentials||a(t.url))&&t.xsrfCookieName?y.read(t.xsrfCookieName):void 0;_&&(p[t.xsrfHeaderName]=_)}if("setRequestHeader"in d&&r.forEach(p,function(t,e){void 0===l&&"content-type"===e.toLowerCase()?delete p[e]:d.setRequestHeader(e,t)}),t.withCredentials&&(d.withCredentials=!0),t.responseType)try{d.responseType=t.responseType}catch(t){if("json"!==d.responseType)throw t}"function"==typeof t.onDownloadProgress&&d.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then(function(t){d&&(d.abort(),f(t),d=null)}),void 0===l&&(l=null),d.send(l)})}},function(t,e,n){var r=n(9);t.exports=function(t,e,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?e(r("Request failed with status code "+n.status,n.config,null,n)):t(n)}},function(t,e,n){var r=n(10);t.exports=function(t,e,n,i){var o=new Error(t);return r(o,e,n,i)}},function(t,e){t.exports=function(t,e,n,r){return t.config=e,n&&(t.code=n),t.response=r,t}},function(t,e,n){function r(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var i=n(2);t.exports=function(t,e,n){if(!e)return t;var o;if(n)o=n(e);else if(i.isURLSearchParams(e))o=e.toString();else{var s=[];i.forEach(e,function(t,e){null!==t&&void 0!==t&&(i.isArray(t)&&(e+="[]"),i.isArray(t)||(t=[t]),i.forEach(t,function(t){i.isDate(t)?t=t.toISOString():i.isObject(t)&&(t=JSON.stringify(t)),s.push(r(e)+"="+r(t))}))}),o=s.join("&")}return o&&(t+=(-1===t.indexOf("?")?"?":"&")+o),t}},function(t,e,n){var r=n(2);t.exports=function(t){var e,n,i,o={};return t?(r.forEach(t.split("\n"),function(t){i=t.indexOf(":"),e=r.trim(t.substr(0,i)).toLowerCase(),n=r.trim(t.substr(i+1)),e&&(o[e]=o[e]?o[e]+", "+n:n)}),o):o}},function(t,e,n){var r=n(2);t.exports=r.isStandardBrowserEnv()?function(){function t(t){var e=t;return n&&(i.setAttribute("href",e),e=i.href),i.setAttribute("href",e),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:"/"===i.pathname.charAt(0)?i.pathname:"/"+i.pathname}}var e,n=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a");return e=t(window.location.href),function(n){var i=r.isString(n)?t(n):n;return i.protocol===e.protocol&&i.host===e.host}}():function(){return function(){return!0}}()},function(t,e){function n(){this.message="String contains an invalid character"}function r(t){for(var e,r,o=String(t),s="",a=0,u=i;o.charAt(0|a)||(u="=",a%1);s+=u.charAt(63&e>>8-a%1*8)){if((r=o.charCodeAt(a+=.75))>255)throw new n;e=e<<8|r}return s}var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.prototype=new Error,n.prototype.code=5,n.prototype.name="InvalidCharacterError",t.exports=r},function(t,e,n){var r=n(2);t.exports=r.isStandardBrowserEnv()?function(){return{write:function(t,e,n,i,o,s){var a=[];a.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.isString(i)&&a.push("path="+i),r.isString(o)&&a.push("domain="+o),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},function(t,e,n){function r(){this.handlers=[]}var i=n(2);r.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},r.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},r.prototype.forEach=function(t){i.forEach(this.handlers,function(e){null!==e&&t(e)})},t.exports=r},function(t,e,n){function r(t){t.cancelToken&&t.cancelToken.throwIfRequested()}var i=n(2),o=n(18),s=n(19),a=n(5);t.exports=function(t){return r(t),t.headers=t.headers||{},t.data=o(t.data,t.headers,t.transformRequest),t.headers=i.merge(t.headers.common||{},t.headers[t.method]||{},t.headers||{}),i.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]}),(t.adapter||a.adapter)(t).then(function(e){return r(t),e.data=o(e.data,e.headers,t.transformResponse),e},function(e){return s(e)||(r(t),e&&e.response&&(e.response.data=o(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})}},function(t,e,n){var r=n(2);t.exports=function(t,e,n){return r.forEach(n,function(n){t=n(t,e)}),t}},function(t,e){t.exports=function(t){return!(!t||!t.__CANCEL__)}},function(t,e){t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,e){t.exports=function(t,e){return t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,"")}},function(t,e){function n(t){this.message=t}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,t.exports=n},function(t,e,n){function r(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(t){e=t});var n=this;t(function(t){n.reason||(n.reason=new i(t),e(n.reason))})}var i=n(22);r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var t;return{token:new r(function(e){t=e}),cancel:t}},t.exports=r},function(t,e){t.exports=function(t){return function(e){return t.apply(null,e)}}}])})}),o={translate:function(t,e,n,r){return t&&e in t?this.compile(t[e],r):n?this.compile(n,r):e},compile:function(t,e){return e?t.replace(/{(\w*)}/g,function(t,n){return e.hasOwnProperty(n)?e[n]:""}):t},getBestLanguage:function(t,e,n){if(void 0===e)return n;for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{languagesAvailable:[],defaultLanguage:"en-US"};s||(s=new e({data:function(){return{languagesAvailable:n.languagesAvailable,defaultLanguage:n.defaultLanguage,lang:this.getLang(),locales:{}}},computed:{locale:function(){return this.locales[this.lang]?this.locales[this.lang]:null}},methods:{setLang:function(t){var e=t.lang;this.lang=e},addLangInLanguagesAvailable:function(t){var e=t.lang;-1===this.languagesAvailable.indexOf(e)&&this.languagesAvailable.push(e)},setLocale:function(e){var n=e.lang,r=e.locale;this.locales=Object.assign({},this.locales,t({},n,r))},extendLocales:function(t){var e=this;Object.keys(t).forEach(function(n){var r=e.locales.hasOwnProperty(n)?Object.assign({},e.locales[n],t[n]):t[n];e.setLocale({lang:n,locale:r})})},getLang:function(){var t=n.languagesAvailable,e=window.navigator.userLanguage||window.navigator.language,r=n.defaultLanguage;return o.getBestLanguage(t,e,r)},getLocale:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.baseURL,o=void 0===r?"i18n":r,s=e.lang,a=void 0===s?"auto":s,u=e.ext,c=void 0===u?".json":u;(a="auto"===a?this.getLang():a)!==n.defaultLanguage&&i.get(o+"/"+a+c).then(function(e){var n=e.data;t.setLocale({lang:a,locale:n}),t.setLang({lang:a}),t.addLangInLanguagesAvailable({lang:a})})},_t:function(t,e,n){return o.translate(this.locale,t,e,n)}}}),e.prototype.$polyglot=s),e.mixin({methods:{$t:function(t,e,n){return this.$polyglot._t(t,e,n)}}}),e.locales=function(t){Object.keys(t).forEach(function(e){s.$polyglot.setLocale({lang:e,locale:t[e]})})}}}})}).call(e,n(4),n(8))}]); \ No newline at end of file diff --git a/src/components/Options.vue b/src/components/Options.vue index fe31c3f..fa420ad 100644 --- a/src/components/Options.vue +++ b/src/components/Options.vue @@ -20,28 +20,32 @@
-
-
-
- @@ -67,7 +71,7 @@ v-model.number="password.length"> - @@ -80,7 +84,7 @@ {{$t('Counter')}}
- + @@ -90,7 +94,7 @@ type="number" min="1" v-model.number="password.counter"> - + @@ -130,7 +134,7 @@ v-bind:aria-label="$t('DefaultOptionLocalStorage', 'We use local storage to save default options locally. Each time you open the app, these options will be loaded by default.')" v-bind:class="{'btn-outline-warning':password.version===1,'btn-outline-primary':password.version!==1}" v-on:click="saveDefaultOptions()"> - {{$t('Save options')}} + {{$t('Save options')}}
diff --git a/src/views/PasswordGenerator.vue b/src/views/PasswordGenerator.vue index 7d271f3..2250f94 100644 --- a/src/views/PasswordGenerator.vue +++ b/src/views/PasswordGenerator.vue @@ -19,7 +19,6 @@
@@ -75,7 +73,7 @@ type="button" v-on:click="copyPassword()" v-bind:class="{ 'btn-warning': password.version===1, 'btn-primary': password.version===2 }"> - + - + @@ -97,14 +95,14 @@ type="button" class="btn btn-secondary" v-on:click="sharePasswordProfile()"> - +
@@ -135,16 +133,16 @@ computed: { ...mapState(['passwords', 'password', 'passwordURL', 'showOptions']), }, - beforeMount () { + beforeMount() { this.$store.dispatch('getPasswords'); this.$store.dispatch('getPasswordFromUrlQuery', {query: this.$route.query}); }, - mounted(){ + mounted() { setTimeout(() => { this.focusBestInputField(); }, 500); }, - data(){ + data() { return { masterPassword: '', fingerprint: '', @@ -184,21 +182,21 @@ } }, methods: { - toggleShowOptions(){ + toggleShowOptions() { this.$store.dispatch('toggleShowOptions'); }, - togglePasswordType(element){ + togglePasswordType(element) { if (element.type === 'password') { element.type = 'text'; } else { element.type = 'password'; } }, - cleanErrors(){ + cleanErrors() { clearTimeout(this.cleanTimeout); this.passwordGenerated = ''; }, - cleanFormInSeconds(seconds = 15){ + cleanFormInSeconds(seconds = 15) { clearTimeout(this.cleanTimeout); this.cleanTimeout = setTimeout(() => { this.masterPassword = ''; @@ -206,7 +204,7 @@ this.fingerprint = ''; }, 1000 * seconds); }, - generatePassword(){ + generatePassword() { const site = this.password.site; const login = this.password.login; const masterPassword = this.masterPassword; @@ -233,13 +231,13 @@ this.$store.dispatch('passwordGenerated'); }); }, - focusBestInputField(){ + focusBestInputField() { const site = this.$refs.site; const login = this.$refs.login; const masterPassword = this.$refs.masterPassword.$refs.passwordField; site.value ? (login.value ? masterPassword.focus() : login.focus()) : site.focus(); }, - copyPassword(){ + copyPassword() { const copied = copy(this.passwordGenerated); if (copied) { showTooltip(document.getElementById('copyPasswordButton'), this.$t('Copied', 'copied !')); @@ -250,7 +248,7 @@ message.warning(this.$t('SorryCopy', 'We are sorry the copy only works on modern browsers')) } }, - sharePasswordProfile(){ + sharePasswordProfile() { const copied = copy(this.passwordURL); if (copied) { const copySuccessMessage = this.$t('PasswordProfileCopied', 'Your password profile has been copied'); diff --git a/test/e2e/specs/passwordGeneration.js b/test/e2e/specs/passwordGeneration.js index 20c9ad8..a350583 100644 --- a/test/e2e/specs/passwordGeneration.js +++ b/test/e2e/specs/passwordGeneration.js @@ -1,5 +1,18 @@ var assert = require("assert"); +function clickAndAssertOption(browser, button, password1, password2) { + browser + .waitForElementVisible(button) + .click(button) + .click("#generatePassword__btn") + .waitForElementVisible("#generated-password") + .assert.value("#generated-password", password1) + .click(button) + .click("#generatePassword__btn") + .waitForElementVisible("#generated-password") + .assert.value("#generated-password", password2); +} + module.exports = { "Password generation tests": function(browser) { browser @@ -14,8 +27,56 @@ module.exports = { .waitForElementVisible("#generatePassword__btn") .click("#generatePassword__btn") .waitForElementVisible("#generated-password") + .assert.value("#generated-password", "hjV@\\5ULp3bIs,6B") + .click(".showOptions__btn") + .waitForElementVisible("#decreaseLength__btn") + .click("#decreaseLength__btn") + .assert.value("#passwordLength", "15") + .click("#generatePassword__btn") + .waitForElementVisible("#generated-password") + .assert.value("#generated-password", "h6j@r\\ULp3!CIs6") + .click("#increaseLength__btn") + .assert.value("#passwordLength", "16") + .click("#generatePassword__btn") + .waitForElementVisible("#generated-password") + .assert.value("#generated-password", "hjV@\\5ULp3bIs,6B") + .waitForElementVisible("#decreaseCounter__btn") + .click("#increaseCounter__btn") + .assert.value("#passwordCounter", "2") + .click("#generatePassword__btn") + .waitForElementVisible("#generated-password") + .assert.value("#generated-password", "#wOxv!q;URh:k82(") + .click("#decreaseCounter__btn") + .assert.value("#passwordCounter", "1") + .click("#generatePassword__btn") + .waitForElementVisible("#generated-password") .assert.value("#generated-password", "hjV@\\5ULp3bIs,6B"); + clickAndAssertOption( + browser, + "#lowercase__btn", + "^>_9>+}OV?[3[_U,", + "hjV@\\5ULp3bIs,6B" + ); + clickAndAssertOption( + browser, + "#uppercase__btn", + "^>_9>+}ov?[3[_u,", + "hjV@\\5ULp3bIs,6B" + ); + clickAndAssertOption( + browser, + "#numbers__btn", + 'jCmMpNy=T."+u^ZQ', + "hjV@\\5ULp3bIs,6B" + ); + clickAndAssertOption( + browser, + "#symbols__btn", + "XAwlOl5mtjGSY6PA", + "hjV@\\5ULp3bIs,6B" + ); + browser.end(); } };