var locamail=locamail||{};locamail.password_strength=function(){"use strict";return{init:function(a){!function(a){var t=$(a),e=$(".item-bar"),l=$(".label-bar");t.val().length||(e.attr("class","item-bar"),e.addClass("empty"),l.text(rcmail.labels["locamail_translate.pwdstrength"])),t.keyup((function(){var a=$(this).val();locamail.password_strength._adjustPasswordStrengthIndicator(a,e)}))}(a)},_adjustPasswordStrengthIndicator:function(a,t){var e,l=["empty","weak","medium","strong"],s=locamail.password_strength._passwordRank(a);e={empty:rcmail.labels["locamail_translate.pwdstrength"],weak:rcmail.labels["locamail_translate.weak"],medium:rcmail.labels["locamail_translate.medium"],strong:rcmail.labels["locamail_translate.strong"]},t.removeClass("empty weak medium strong").addClass(l[s]).find(".label-bar").html(e[l[s]]),rcmail.triggerEvent("plugin.changeSaveButton")},_passwordRank:function(a){var t=0;return $(".item-list li").removeClass("active"),a.length?(/[A-Z]/.test(a)&&($("#uppercase").addClass("active"),t+=1),/\W|_/g.test(a)&&($("#special-character").addClass("active"),t+=1),/[a-z]/.test(a)&&($("#lowercase").addClass("active"),t+=1),a.length>=8&&($("#minimal-letters").addClass("active"),t+=1),/[0-9]/.test(a)&&($("#need-a-number").addClass("active"),t+=1),5===t?3:t>=3?2:1):0}}}();