(function(a){a.fn.jpassword=function(h){var g=this;var h=a.extend({},a.fn.jpassword.defaults,h);var f='
';return g.each(function(){if(a(g).is("input")){i(a(g))}});function i(t){var s="jpassword_"+parseInt(Math.random()*1000);var r=a(f).attr("id",s);if(h.flat==false){var q=t.offset();var p=d();var o="right";var n=q.top;var l=(q.left+t.width());r.appendTo(document.body);if((l+r.width())>(p.left+p.width)){l-=(r.width()+t.width());o="left"}if((n+r.height())>(p.top+p.height)){n-=(r.height()-(t.height()*1.5));o+="bottom"}else{o+="top"}r.css({left:l+"px",top:n+"px",display:"none"});r.addClass("jpassword-"+o)}else{r.insertAfter(t);r.css({position:"relative",display:"block"});r.addClass("jpassword-flat")}t.bind("keyup",function(u){e(t,r)});t.bind("focus",function(u){e(t,r);if(h.flat==false){m(r,"show")}if(a.isFunction(h.onShow)){h.onShow(t,r)}});t.bind("blur",function(u){if(h.flat==false){m(r,"hide")}if(a.isFunction(h.onHide)){h.onHide(t,r)}});var k=a("#"+h.generate);if(k){k.bind("click",function(u){t.val(b());e(t,r);return false})}if(a.isFunction(h.onComplete)){h.onComplete(t,r)}}function e(l,k){var r=l.val();var q=k.find(".jpassword-meter");var p=k.find(".jpassword-info");var o=j(r);var n="";if(o.lowercase<2){n=h.lang.lowercase}else{if(o.uppercase<2){n=h.lang.uppercase}else{if(o.number<2){n=h.lang.number}else{if(o.punctuation<2){n=h.lang.punctuation}else{if(o.special<2){n=h.lang.special}}}}}if(r.length47&&o<58){k+=1}else{if(o>64&&o<91){cCap+=1}else{if(o>96&&o<123){cMin+=1}else{cPct+=2}}}}else{cSpe+=3}}var n=(k*cCap*cMin*cPct*cSpe);n=Math.round(Math.log((n*n)));return{val:l,level:n,number:k,uppercase:cCap,lowercase:cMin,punctuation:cPct,special:cSpe}}function b(){var l="";for(c=0;c47&&k<58)||(k>64&&k<91)||(k>96&&k<123)){n=1}if(h.type==1&&k<127){n=1}if(h.type==2){n=1}if(h.special&&(k==48||k==49||k==50||k==53||k==54||k==56||k==57||k==66||k==67||k==68||k==71||k==73||k==75||k==79||k==80||k==81||k==83||k==85||k==86||k==87||k==88||k==90||k==99||k==104||k==105||k==107||k==108||k==111||k==112||k==113||k==115||k==117||k==118||k==119||k==120||k==122)){n=0}if(n==1){l+=String.fromCharCode(k)}else{c--}}return l}function m(l,k){if(k=="show"){l.fadeIn()}else{l.fadeOut()}}function d(){var k=document.compatMode=="CSS1Compat";return{left:(window.pageXOffset||(k?document.documentElement.scrollLeft:document.body.scrollLeft)),top:(window.pageYOffset||(k?document.documentElement.scrollTop:document.body.scrollTop)),width:(window.innerWidth||(k?document.documentElement.clientWidth:document.body.clientWidth)),height:(window.innerHeight||(k?document.documentElement.clientHeight:document.body.clientHeight))}}};a.fn.jpassword.defaults={lang:{please:"A strong password...",low:"Low security.",correct:"Correct security.",high:"High security.",length:"-X- characters would be a plus.",number:"Why not numbers?",uppercase:"And caps?",lowercase:"Some tiny?",punctuation:"Punctuations?",special:"Best, special characters?"},length:8,flat:false,type:1,special:0,generate:null,onShow:function(){},onHide:function(){},onKeyup:function(){},onComplete:function(){}}})(jQuery);PrimeFaces.widget.Password=function(b,a){this.id=b;this.cfg=a;this.jqId=PrimeFaces.escapeClientId(b);this.jq=jQuery(this.jqId);if(this.cfg.feedback){this.cfg.lang={length:"",number:"",uppercase:"",lowercase:"",punctuation:"",special:""};if(this.cfg.promptLabel){this.cfg.lang.please=this.cfg.promptLabel}if(this.cfg.weakLabel){this.cfg.lang.low=this.cfg.weakLabel}if(this.cfg.goodLabel){this.cfg.lang.correct=this.cfg.goodLabel}if(this.cfg.strongLabel){this.cfg.lang.high=this.cfg.strongLabel}if(this.cfg.flat){if(!this.cfg.onShow){this.cfg.onShow=function(e,d){d.slideDown()}}if(!this.cfg.onHide){this.cfg.onHide=function(e,d){d.slideUp()}}this.cfg.onComplete=function(e,d){d.hide()}}this.jq.jpassword(this.cfg)}if(this.cfg.behaviors){PrimeFaces.attachBehaviors(this.jq,this.cfg.behaviors)}PrimeFaces.skinInput(this.jq)};