From f2ef7d19f6934f02f1d2e4db84c17ad381049893 Mon Sep 17 00:00:00 2001 From: Passman Bot Date: Wed, 28 Dec 2016 13:21:47 +0100 Subject: [PATCH] Passman 2.0.0-RC1 Fix for accentuation in useSanitizeValueStrategy Signed-off-by: Passman Bot --- js/passman.min.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/passman.min.js b/js/passman.min.js index a1a0675a..f56c01c6 100644 --- a/js/passman.min.js +++ b/js/passman.min.js @@ -15,7 +15,7 @@ us_tv_and_film:"you,i,to,that,it,me,what,this,know,i'm,no,have,my,don't,just,not male_names:"james,john,robert,michael,william,david,richard,charles,joseph,thomas,christopher,daniel,paul,mark,donald,george,kenneth,steven,edward,brian,ronald,anthony,kevin,jason,matthew,gary,timothy,jose,larry,jeffrey,frank,scott,eric,stephen,andrew,raymond,gregory,joshua,jerry,dennis,walter,patrick,peter,harold,douglas,henry,carl,arthur,ryan,roger,joe,juan,jack,albert,jonathan,justin,terry,gerald,keith,samuel,willie,ralph,lawrence,nicholas,roy,benjamin,bruce,brandon,adam,harry,fred,wayne,billy,steve,louis,jeremy,aaron,randy,eugene,carlos,russell,bobby,victor,ernest,phillip,todd,jesse,craig,alan,shawn,clarence,sean,philip,chris,johnny,earl,jimmy,antonio,danny,bryan,tony,luis,mike,stanley,leonard,nathan,dale,manuel,rodney,curtis,norman,marvin,vincent,glenn,jeffery,travis,jeff,chad,jacob,melvin,alfred,kyle,francis,bradley,jesus,herbert,frederick,ray,joel,edwin,don,eddie,ricky,troy,randall,barry,bernard,mario,leroy,francisco,marcus,micheal,theodore,clifford,miguel,oscar,jay,jim,tom,calvin,alex,jon,ronnie,bill,lloyd,tommy,leon,derek,darrell,jerome,floyd,leo,alvin,tim,wesley,dean,greg,jorge,dustin,pedro,derrick,dan,zachary,corey,herman,maurice,vernon,roberto,clyde,glen,hector,shane,ricardo,sam,rick,lester,brent,ramon,tyler,gilbert,gene,marc,reginald,ruben,brett,nathaniel,rafael,edgar,milton,raul,ben,cecil,duane,andre,elmer,brad,gabriel,ron,roland,jared,adrian,karl,cory,claude,erik,darryl,neil,christian,javier,fernando,clinton,ted,mathew,tyrone,darren,lonnie,lance,cody,julio,kurt,allan,clayton,hugh,max,dwayne,dwight,armando,felix,jimmie,everett,ian,ken,bob,jaime,casey,alfredo,alberto,dave,ivan,johnnie,sidney,byron,julian,isaac,clifton,willard,daryl,virgil,andy,salvador,kirk,sergio,seth,kent,terrance,rene,eduardo,terrence,enrique,freddie,stuart,fredrick,arturo,alejandro,joey,nick,luther,wendell,jeremiah,evan,julius,donnie,otis,trevor,luke,homer,gerard,doug,kenny,hubert,angelo,shaun,lyle,matt,alfonso,orlando,rex,carlton,ernesto,pablo,lorenzo,omar,wilbur,blake,horace,roderick,kerry,abraham,rickey,ira,andres,cesar,johnathan,malcolm,rudolph,damon,kelvin,rudy,preston,alton,archie,marco,pete,randolph,garry,geoffrey,jonathon,felipe,bennie,gerardo,dominic,loren,delbert,colin,guillermo,earnest,benny,noel,rodolfo,myron,edmund,salvatore,cedric,lowell,gregg,sherman,devin,sylvester,roosevelt,israel,jermaine,forrest,wilbert,leland,simon,irving,owen,rufus,woodrow,sammy,kristopher,levi,marcos,gustavo,jake,lionel,marty,gilberto,clint,nicolas,laurence,ismael,orville,drew,ervin,dewey,wilfred,josh,hugo,ignacio,caleb,tomas,sheldon,erick,frankie,darrel,rogelio,terence,alonzo,elias,bert,elbert,ramiro,conrad,noah,grady,phil,cornelius,lamar,rolando,clay,percy,bradford,merle,darin,amos,terrell,moses,irvin,saul,roman,darnell,randal,tommie,timmy,darrin,brendan,toby,van,abel,dominick,emilio,elijah,cary,domingo,aubrey,emmett,marlon,emanuel,jerald,edmond,emil,dewayne,otto,teddy,reynaldo,bret,jess,trent,humberto,emmanuel,stephan,louie,vicente,lamont,garland,micah,efrain,heath,rodger,demetrius,ethan,eldon,rocky,pierre,eli,bryce,antoine,robbie,kendall,royce,sterling,grover,elton,cleveland,dylan,chuck,damian,reuben,stan,leonardo,russel,erwin,benito,hans,monte,blaine,ernie,curt,quentin,agustin,jamal,devon,adolfo,tyson,wilfredo,bart,jarrod,vance,denis,damien,joaquin,harlan,desmond,elliot,darwin,gregorio,kermit,roscoe,esteban,anton,solomon,norbert,elvin,nolan,carey,rod,quinton,hal,brain,rob,elwood,kendrick,darius,moises,marlin,fidel,thaddeus,cliff,marcel,ali,raphael,bryon,armand,alvaro,jeffry,dane,joesph,thurman,ned,sammie,rusty,michel,monty,rory,fabian,reggie,kris,isaiah,gus,avery,loyd,diego,adolph,millard,rocco,gonzalo,derick,rodrigo,gerry,rigoberto,alphonso,rickie,noe,vern,elvis,bernardo,mauricio,hiram,donovan,basil,nickolas,scot,vince,quincy,eddy,sebastian,federico,ulysses,heriberto,donnell,denny,gavin,emery,romeo,jayson,dion,dante,clement,coy,odell,jarvis,bruno,issac,dudley,sanford,colby,carmelo,nestor,hollis,stefan,donny,linwood,beau,weldon,galen,isidro,truman,delmar,johnathon,silas,frederic,irwin,merrill,charley,marcelino,carlo,trenton,kurtis,aurelio,winfred,vito,collin,denver,leonel,emory,pasquale,mohammad,mariano,danial,landon,dirk,branden,adan,numbers,clair,buford,bernie,wilmer,emerson,zachery,jacques,errol,josue,edwardo,wilford,theron,raymundo,daren,tristan,robby,lincoln,jame,genaro,octavio,cornell,hung,arron,antony,herschel,alva,giovanni,garth,cyrus,cyril,ronny,stevie,lon,kennith,carmine,augustine,erich,chadwick,wilburn,russ,myles,jonas,mitchel,mervin,zane,jamel,lazaro,alphonse,randell,johnie,jarrett,ariel,abdul,dusty,luciano,seymour,scottie,eugenio,mohammed,arnulfo,lucien,ferdinand,thad,ezra,aldo,rubin,mitch,earle,abe,marquis,lanny,kareem,jamar,boris,isiah,emile,elmo,aron,leopoldo,everette,josef,eloy,dorian,rodrick,reinaldo,lucio,jerrod,weston,hershel,lemuel,lavern,burt,jules,gil,eliseo,ahmad,nigel,efren,antwan,alden,margarito,refugio,dino,osvaldo,les,deandre,normand,kieth,ivory,trey,norberto,napoleon,jerold,fritz,rosendo,milford,sang,deon,christoper,alfonzo,lyman,josiah,brant,wilton,rico,jamaal,dewitt,brenton,yong,olin,faustino,claudio,judson,gino,edgardo,alec,jarred,donn,trinidad,tad,porfirio,odis,lenard,chauncey,tod,mel,marcelo,kory,augustus,keven,hilario,bud,sal,orval,mauro,dannie,zachariah,olen,anibal,milo,jed,thanh,amado,lenny,tory,richie,horacio,brice,mohamed,delmer,dario,mac,jonah,jerrold,robt,hank,sung,rupert,rolland,kenton,damion,chi,antone,waldo,fredric,bradly,kip,burl,tyree,jefferey,ahmed,willy,stanford,oren,moshe,mikel,enoch,brendon,quintin,jamison,florencio,darrick,tobias,minh,hassan,giuseppe,demarcus,cletus,tyrell,lyndon,keenan,werner,theo,geraldo,columbus,chet,bertram,markus,huey,hilton,dwain,donte,tyron,omer,isaias,hipolito,fermin,chung,adalberto,jamey,teodoro,mckinley,maximo,raleigh,lawerence,abram,rashad,emmitt,daron,chong,samual,otha,miquel,eusebio,dong,domenic,darron,wilber,renato,hoyt,haywood,ezekiel,chas,florentino,elroy,clemente,arden,neville,edison,deshawn,carrol,shayne,nathanial,jordon,danilo,claud,sherwood,raymon,rayford,cristobal,ambrose,titus,hyman,felton,ezequiel,erasmo,lonny,milan,lino,jarod,herb,andreas,rhett,jude,douglass,cordell,oswaldo,ellsworth,virgilio,toney,nathanael,benedict,mose,hong,isreal,garret,fausto,arlen,zack,modesto,francesco,manual,gaylord,gaston,filiberto,deangelo,michale,granville,malik,zackary,tuan,nicky,cristopher,antione,malcom,korey,jospeh,colton,waylon,hosea,shad,santo,rudolf,rolf,renaldo,marcellus,lucius,kristofer,harland,arnoldo,rueben,leandro,kraig,jerrell,jeromy,hobert,cedrick,arlie,winford,wally,luigi,keneth,jacinto,graig,franklyn,edmundo,leif,jeramy,willian,vincenzo,shon,michal,lynwood,jere,elden,darell,broderick,alonso".split(",")},module.exports=frequency_lists},{}],4:[function(require,module,exports){var feedback,matching,scoring,time,time_estimates,zxcvbn;matching=require("./matching"),scoring=require("./scoring"),time_estimates=require("./time_estimates"),feedback=require("./feedback"),time=function(){return(new Date).getTime()},zxcvbn=function(e,t){var i,n,c,s,a,r,m,o,u,g,_;for(null==t&&(t=[]),g=time(),u=[],c=0,s=t.length;s>c;c++)i=t[c],"string"!=(m=typeof i)&&"number"!==m&&"boolean"!==m||u.push(i.toString().toLowerCase());matching.set_user_input_dictionary(u),a=matching.omnimatch(e),o=scoring.most_guessable_match_sequence(e,a),o.calc_time=time()-g,n=time_estimates.estimate_attack_times(o.guesses);for(r in n)_=n[r],o[r]=_;return o.feedback=feedback.get_feedback(o.score,o.sequence),o},module.exports=zxcvbn},{"./feedback":2,"./matching":5,"./scoring":6,"./time_estimates":7}],5:[function(require,module,exports){var DATE_MAX_YEAR,DATE_MIN_YEAR,DATE_SPLITS,GRAPHS,L33T_TABLE,RANKED_DICTIONARIES,REGEXEN,adjacency_graphs,build_ranked_dict,frequency_lists,lst,matching,name,scoring;frequency_lists=require("./frequency_lists"),adjacency_graphs=require("./adjacency_graphs"),scoring=require("./scoring"),build_ranked_dict=function(e){var t,n,r,i,a;for(i={},t=1,r=0,n=e.length;n>r;r++)a=e[r],i[a]=t,t+=1;return i},RANKED_DICTIONARIES={};for(name in frequency_lists)lst=frequency_lists[name],RANKED_DICTIONARIES[name]=build_ranked_dict(lst);GRAPHS={qwerty:adjacency_graphs.qwerty,dvorak:adjacency_graphs.dvorak,keypad:adjacency_graphs.keypad,mac_keypad:adjacency_graphs.mac_keypad},L33T_TABLE={a:["4","@"],b:["8"],c:["(","{","[","<"],e:["3"],g:["6","9"],i:["1","!","|"],l:["1","|","7"],o:["0"],s:["$","5"],t:["+","7"],x:["%"],z:["2"]},REGEXEN={recent_year:/19\d\d|200\d|201\d/g},DATE_MAX_YEAR=2050,DATE_MIN_YEAR=1e3,DATE_SPLITS={4:[[1,2],[2,3]],5:[[1,3],[2,3]],6:[[1,2],[2,4],[4,5]],7:[[1,3],[2,3],[4,5],[4,6]],8:[[2,4],[4,6]]},matching={empty:function(e){var t;return 0===function(){var n;n=[];for(t in e)n.push(t);return n}().length},extend:function(e,t){return e.push.apply(e,t)},translate:function(e,t){var n;return function(){var r,i,a,s;for(a=e.split(""),s=[],i=0,r=a.length;r>i;i++)n=a[i],s.push(t[n]||n);return s}().join("")},mod:function(e,t){return(e%t+t)%t},sorted:function(e){return e.sort(function(e,t){return e.i-t.i||e.j-t.j})},omnimatch:function(e){var t,n,r,i,a;for(i=[],r=[this.dictionary_match,this.reverse_dictionary_match,this.l33t_match,this.spatial_match,this.repeat_match,this.sequence_match,this.regex_match,this.date_match],a=0,t=r.length;t>a;a++)n=r[a],this.extend(i,n.call(this,e));return this.sorted(i)},dictionary_match:function(e,t){var n,r,i,a,s,o,h,u,c,l,_,f,d,p;null==t&&(t=RANKED_DICTIONARIES),s=[],a=e.length,u=e.toLowerCase();for(n in t)for(l=t[n],r=o=0,_=a;_>=0?_>o:o>_;r=_>=0?++o:--o)for(i=h=f=r,d=a;d>=f?d>h:h>d;i=d>=f?++h:--h)u.slice(r,+i+1||9e9)in l&&(p=u.slice(r,+i+1||9e9),c=l[p],s.push({pattern:"dictionary",i:r,j:i,token:e.slice(r,+i+1||9e9),matched_word:p,rank:c,dictionary_name:n,reversed:!1,l33t:!1}));return this.sorted(s)},reverse_dictionary_match:function(e,t){var n,r,i,a,s,o;for(null==t&&(t=RANKED_DICTIONARIES),o=e.split("").reverse().join(""),i=this.dictionary_match(o,t),a=0,n=i.length;n>a;a++)r=i[a],r.token=r.token.split("").reverse().join(""),r.reversed=!0,s=[e.length-1-r.j,e.length-1-r.i],r.i=s[0],r.j=s[1];return this.sorted(i)},set_user_input_dictionary:function(e){return RANKED_DICTIONARIES.user_inputs=build_ranked_dict(e.slice())},relevant_l33t_subtable:function(e,t){var n,r,i,a,s,o,h,u,c,l;for(s={},o=e.split(""),a=0,r=o.length;r>a;a++)n=o[a],s[n]=!0;l={};for(i in t)c=t[i],h=function(){var e,t,n;for(n=[],t=0,e=c.length;e>t;t++)u=c[t],u in s&&n.push(u);return n}(),h.length>0&&(l[i]=h);return l},enumerate_l33t_subs:function(e){var t,n,r,i,a,s,o,h,u,c,l,_,f,d,p;a=function(){var t;t=[];for(i in e)t.push(i);return t}(),p=[[]],n=function(e){var t,n,r,a,s,o,h,u;for(n=[],s={},o=0,a=e.length;a>o;o++)h=e[o],t=function(){var e,t,n;for(n=[],u=t=0,e=h.length;e>t;u=++t)i=h[u],n.push([i,u]);return n}(),t.sort(),r=function(){var e,n,r;for(r=[],u=n=0,e=t.length;e>n;u=++n)i=t[u],r.push(i+","+u);return r}().join("-"),r in s||(s[r]=!0,n.push(h));return n},r=function(t){var i,a,s,o,h,u,c,l,_,f,d,g,m,A,E,y;if(t.length){for(a=t[0],m=t.slice(1),c=[],d=e[a],l=0,h=d.length;h>l;l++)for(o=d[l],_=0,u=p.length;u>_;_++){for(A=p[_],i=-1,s=f=0,g=A.length;g>=0?g>f:f>g;s=g>=0?++f:--f)if(A[s][0]===o){i=s;break}-1===i?(y=A.concat([[o,a]]),c.push(y)):(E=A.slice(0),E.splice(i,1),E.push([o,a]),c.push(A),c.push(E))}return p=n(c),r(m)}},r(a),d=[];for(u=0,o=p.length;o>u;u++){for(_=p[u],f={},c=0,h=_.length;h>c;c++)l=_[c],s=l[0],t=l[1],f[s]=t;d.push(f)}return d},l33t_match:function(e,t,n){var r,i,a,s,o,h,u,c,l,_,f,d,p,g,m,A;for(null==t&&(t=RANKED_DICTIONARIES),null==n&&(n=L33T_TABLE),u=[],_=this.enumerate_l33t_subs(this.relevant_l33t_subtable(e,n)),c=0,a=_.length;a>c&&(d=_[c],!this.empty(d));c++)for(g=this.translate(e,d),f=this.dictionary_match(g,t),l=0,s=f.length;s>l;l++)if(o=f[l],m=e.slice(o.i,+o.j+1||9e9),m.toLowerCase()!==o.matched_word){h={};for(p in d)r=d[p],-1!==m.indexOf(p)&&(h[p]=r);o.l33t=!0,o.token=m,o.sub=h,o.sub_display=function(){var e;e=[];for(i in h)A=h[i],e.push(i+" -> "+A);return e}().join(", "),u.push(o)}return this.sorted(u.filter(function(e){return e.token.length>1}))},spatial_match:function(e,t){var n,r,i;null==t&&(t=GRAPHS),i=[];for(r in t)n=t[r],this.extend(i,this.spatial_match_helper(e,n,r));return this.sorted(i)},SHIFTED_RX:/[~!@#$%^&*()_+QWERTYUIOP{}|ASDFGHJKL:"ZXCVBNM<>?]/,spatial_match_helper:function(e,t,n){var r,i,a,s,o,h,u,c,l,_,f,d,p,g,m;for(f=[],u=0;ud;d++)if(r=i[d],s+=1,r&&-1!==r.indexOf(a)){o=!0,h=s,1===r.indexOf(a)&&(g+=1),l!==h&&(m+=1,l=h);break}if(!o){c-u>2&&f.push({pattern:"spatial",i:u,j:c-1,token:e.slice(u,c),graph:n,turns:m,shifted_count:g}),u=c;break}c+=1}return f},repeat_match:function(e){var t,n,r,i,a,s,o,h,u,c,l,_,f,d,p;for(d=[],a=/(.+)\1+/g,c=/(.+?)\1+/g,l=/^(.+?)\1+$/,u=0;u_[0].length?(f=s,i=l.exec(f[0])[1]):(f=_,i=f[1]),p=[f.index,f.index+f[0].length-1],o=p[0],h=p[1],t=scoring.most_guessable_match_sequence(i,this.omnimatch(i)),r=t.match_sequence,n=t.guesses,d.push({pattern:"repeat",i:o,j:h,token:f[0],base_token:i,base_guesses:n,base_matches:r,repeat_count:f[0].length/i.length}),u=h+1;return d},MAX_DELTA:5,sequence_match:function(e){var t,n,r,i,a,s,o,h,u;if(1===e.length)return[];for(u=function(t){return function(n,r,i){var a,s,o,u;return(r-n>1||1===Math.abs(i))&&0<(a=Math.abs(i))&&a<=t.MAX_DELTA?(u=e.slice(n,+r+1||9e9),/^[a-z]+$/.test(u)?(s="lower",o=26):/^[A-Z]+$/.test(u)?(s="upper",o=26):/^\d+$/.test(u)?(s="digits",o=10):(s="unicode",o=26),h.push({pattern:"sequence",i:n,j:r,token:e.slice(n,+r+1||9e9),sequence_name:s,sequence_space:o,ascending:i>0})):void 0}}(this),h=[],n=0,a=null,i=s=1,o=e.length;o>=1?o>s:s>o;i=o>=1?++s:--s)t=e.charCodeAt(i)-e.charCodeAt(i-1),null==a&&(a=t),t!==a&&(r=i-1,u(n,r,a),n=r,a=t);return u(n,e.length-1,a),h},regex_match:function(e,t){var n,r,i,a;null==t&&(t=REGEXEN),n=[];for(name in t)for(r=t[name],r.lastIndex=0;i=r.exec(e);)a=i[0],n.push({pattern:"regex",token:a,i:i.index,j:i.index+i[0].length-1,regex_name:name,regex_match:i});return this.sorted(n)},date_match:function(e){var t,n,r,i,a,s,o,h,u,c,l,_,f,d,p,g,m,A,E,y,v,I,R,T,D,k,x,j,b,N,S,q,L,M;for(_=[],f=/^\d{4,8}$/,d=/^(\d{1,4})([\s\/\\_.-])(\d{1,2})\2(\d{1,4})$/,s=m=0,v=e.length-4;v>=0?v>=m:m>=v;s=v>=0?++m:--m)for(o=A=I=s+3,R=s+7;(R>=I?R>=A:A>=R)&&!(o>=e.length);o=R>=I?++A:--A)if(M=e.slice(s,+o+1||9e9),f.exec(M)){for(r=[],T=DATE_SPLITS[M.length],E=0,c=T.length;c>E;E++)D=T[E],h=D[0],u=D[1],a=this.map_ints_to_dmy([parseInt(M.slice(0,h)),parseInt(M.slice(h,u)),parseInt(M.slice(u))]),null!=a&&r.push(a);if(r.length>0){for(t=r[0],p=function(e){return Math.abs(e.year-scoring.REFERENCE_YEAR)},g=p(r[0]),k=r.slice(1),y=0,l=k.length;l>y;y++)n=k[y],i=p(n),g>i&&(x=[n,i],t=x[0],g=x[1]);_.push({pattern:"date",token:M,i:s,j:o,separator:"",year:t.year,month:t.month,day:t.day})}}for(s=q=0,j=e.length-6;j>=0?j>=q:q>=j;s=j>=0?++q:--q)for(o=L=b=s+5,N=s+9;(N>=b?N>=L:L>=N)&&!(o>=e.length);o=N>=b?++L:--L)M=e.slice(s,+o+1||9e9),S=d.exec(M),null!=S&&(a=this.map_ints_to_dmy([parseInt(S[1]),parseInt(S[3]),parseInt(S[4])]),null!=a&&_.push({pattern:"date",token:M,i:s,j:o,separator:S[2],year:a.year,month:a.month,day:a.day}));return this.sorted(_.filter(function(e){var t,n,r,i;for(t=!1,i=0,n=_.length;n>i;i++)if(r=_[i],e!==r&&r.i<=e.i&&r.j>=e.j){t=!0;break}return!t}))},map_ints_to_dmy:function(e){var t,n,r,i,a,s,o,h,u,c,l,_,f,d,p,g;if(!(e[1]>31||e[1]<=0)){for(o=0,h=0,p=0,s=0,r=e.length;r>s;s++){if(n=e[s],n>99&&DATE_MIN_YEAR>n||n>DATE_MAX_YEAR)return;n>31&&(h+=1),n>12&&(o+=1),0>=n&&(p+=1)}if(!(h>=2||3===o||p>=2)){for(c=[[e[2],e.slice(0,2)],[e[0],e.slice(1,3)]],u=0,i=c.length;i>u;u++)if(_=c[u],g=_[0],d=_[1],g>=DATE_MIN_YEAR&&DATE_MAX_YEAR>=g)return t=this.map_ints_to_dm(d),null!=t?{year:g,month:t.month,day:t.day}:void 0;for(l=0,a=c.length;a>l;l++)if(f=c[l],g=f[0],d=f[1],t=this.map_ints_to_dm(d),null!=t)return g=this.two_to_four_digit_year(g),{year:g,month:t.month,day:t.day}}}},map_ints_to_dm:function(e){var t,n,r,i,a,s;for(a=[e,e.slice().reverse()],i=0,n=a.length;n>i;i++)if(s=a[i],t=s[0],r=s[1],t>=1&&31>=t&&r>=1&&12>=r)return{day:t,month:r}},two_to_four_digit_year:function(e){return e>99?e:e>50?e+1900:e+2e3}},module.exports=matching},{"./adjacency_graphs":1,"./frequency_lists":3,"./scoring":6}],6:[function(require,module,exports){var BRUTEFORCE_CARDINALITY,MIN_GUESSES_BEFORE_GROWING_SEQUENCE,MIN_SUBMATCH_GUESSES_MULTI_CHAR,MIN_SUBMATCH_GUESSES_SINGLE_CHAR,adjacency_graphs,calc_average_degree,k,scoring,v;adjacency_graphs=require("./adjacency_graphs"),calc_average_degree=function(e){var t,r,n,s,a,u;t=0;for(n in e)a=e[n],t+=function(){var e,t,r;for(r=[],t=0,e=a.length;e>t;t++)s=a[t],s&&r.push(s);return r}().length;return t/=function(){var t;t=[];for(r in e)u=e[r],t.push(r);return t}().length},BRUTEFORCE_CARDINALITY=10,MIN_GUESSES_BEFORE_GROWING_SEQUENCE=1e4,MIN_SUBMATCH_GUESSES_SINGLE_CHAR=10,MIN_SUBMATCH_GUESSES_MULTI_CHAR=50,scoring={nCk:function(e,t){var r,n,s,a;if(t>e)return 0;if(0===t)return 1;for(s=1,r=n=1,a=t;a>=1?a>=n:n>=a;r=a>=1?++n:--n)s*=e,s/=r,e-=1;return s},log10:function(e){return Math.log(e)/Math.log(10)},log2:function(e){return Math.log(e)/Math.log(2)},factorial:function(e){var t,r,n,s;if(2>e)return 1;for(t=1,r=n=2,s=e;s>=2?s>=n:n>=s;r=s>=2?++n:--n)t*=r;return t},most_guessable_match_sequence:function(e,t,r){var n,s,a,u,i,_,o,h,E,c,g,f,l,p,A,S,R,v,I,M;for(null==r&&(r=!1),g=e.length,c=function(){var e,t,r;for(r=[],n=e=0,t=g;t>=0?t>e:e>t;n=t>=0?++e:--e)r.push([]);return r}(),f=0,_=t.length;_>f;f++)h=t[f],c[h.j].push(h);for(l={m:function(){var e,t,r;for(r=[],n=e=0,t=g;t>=0?t>e:e>t;n=t>=0?++e:--e)r.push({});return r}(),pi:function(){var e,t,r;for(r=[],n=e=0,t=g;t>=0?t>e:e>t;n=t>=0?++e:--e)r.push({});return r}(),g:function(){var e,t,r;for(r=[],n=e=0,t=g;t>=0?t>e:e>t;n=t>=0?++e:--e)r.push(1/0);return r}(),l:function(){var e,t,r;for(r=[],n=e=0,t=g;t>=0?t>e:e>t;n=t>=0?++e:--e)r.push(0);return r}()},M=function(t){return function(n,s){var a,u,i;return u=n.j,i=t.estimate_guesses(n,e),s>1&&(i*=l.pi[n.i-1][s-1]),a=t.factorial(s)*i,r||(a+=Math.pow(MIN_GUESSES_BEFORE_GROWING_SEQUENCE,s-1)),a=0;)h=l.m[t][r],n.unshift(h),t=h.i-1,r--;return n}}(this),u=A=0,S=g;S>=0?S>A:A>S;u=S>=0?++A:--A){for(R=c[u],v=0,o=R.length;o>v;v++)if(h=R[v],h.i>0)for(i in l.m[h.i-1])i=parseInt(i),M(h,i+1);else M(h,1);s(u)}return p=I(g),a=0===e.length?1:l.g[g-1],{password:e,guesses:a,guesses_log10:this.log10(a),sequence:p}},estimate_guesses:function(e,t){var r,n,s;return null!=e.guesses?e.guesses:(s=1,e.token.length=2?c>=_:_>=c;u=c>=2?++_:--_)for(o=Math.min(A,u-1),i=h=1,g=o;g>=1?g>=h:h>=g;i=g>=1?++h:--h)a+=this.nCk(u-1,i-1)*l*Math.pow(s,i);if(e.shifted_count)if(r=e.shifted_count,n=e.token.length-e.shifted_count,0===r||0===n)a*=2;else{for(p=0,u=S=1,f=Math.min(r,n);f>=1?f>=S:S>=f;u=f>=1?++S:--S)p+=this.nCk(r+n,u);a*=p}return a},dictionary_guesses:function(e){var t;return e.base_guesses=e.rank,e.uppercase_variations=this.uppercase_variations(e),e.l33t_variations=this.l33t_variations(e),t=e.reversed&&2||1,e.base_guesses*e.uppercase_variations*e.l33t_variations*t},START_UPPER:/^[A-Z][^A-Z]+$/,END_UPPER:/^[^A-Z]+[A-Z]$/,ALL_UPPER:/^[^a-z]+$/,ALL_LOWER:/^[^A-Z]+$/,uppercase_variations:function(e){var t,r,n,s,a,u,i,_,o,h,E,c;if(c=e.token,c.match(this.ALL_LOWER)||c.toLowerCase()===c)return 1;for(_=[this.START_UPPER,this.END_UPPER,this.ALL_UPPER],u=0,a=_.length;a>u;u++)if(h=_[u],c.match(h))return 2;for(r=function(){var e,t,r,s;for(r=c.split(""),s=[],t=0,e=r.length;e>t;t++)n=r[t],n.match(/[A-Z]/)&&s.push(n);return s}().length,t=function(){var e,t,r,s;for(r=c.split(""),s=[],t=0,e=r.length;e>t;t++)n=r[t],n.match(/[a-z]/)&&s.push(n);return s}().length,E=0,s=i=1,o=Math.min(r,t);o>=1?o>=i:i>=o;s=o>=1?++i:--i)E+=this.nCk(r+t,s);return E},l33t_variations:function(e){var t,r,n,s,a,u,i,_,o,h,E,c,g;if(!e.l33t)return 1;g=1,o=e.sub;for(E in o)if(c=o[E],s=e.token.toLowerCase().split(""),t=function(){var e,t,r;for(r=[],t=0,e=s.length;e>t;t++)n=s[t],n===E&&r.push(n);return r}().length,r=function(){var e,t,r;for(r=[],t=0,e=s.length;e>t;t++)n=s[t],n===c&&r.push(n);return r}().length,0===t||0===r)g*=2;else{for(i=Math.min(r,t),_=0,a=u=1,h=i;h>=1?h>=u:u>=h;a=h>=1?++u:--u)_+=this.nCk(r+t,a);g*=_}return g}},module.exports=scoring},{"./adjacency_graphs":1}],7:[function(require,module,exports){var time_estimates;time_estimates={estimate_attack_times:function(e){var t,n,s,o;n={online_throttling_100_per_hour:e/(100/3600),online_no_throttling_10_per_second:e/10,offline_slow_hashing_1e4_per_second:e/1e4,offline_fast_hashing_1e10_per_second:e/1e10},t={};for(s in n)o=n[s],t[s]=this.display_time(o);return{crack_times_seconds:n,crack_times_display:t,score:this.guesses_to_score(e)}},guesses_to_score:function(e){var t;return t=5,1e3+t>e?0:1e6+t>e?1:1e8+t>e?2:1e10+t>e?3:4},display_time:function(e){var t,n,s,o,_,r,i,a,u,c;return i=60,r=60*i,s=24*r,a=31*s,c=12*a,n=100*c,u=1>e?[null,"less than a second"]:i>e?(t=Math.round(e),[t,t+" second"]):r>e?(t=Math.round(e/i),[t,t+" minute"]):s>e?(t=Math.round(e/r),[t,t+" hour"]):a>e?(t=Math.round(e/s),[t,t+" day"]):c>e?(t=Math.round(e/a),[t,t+" month"]):n>e?(t=Math.round(e/c),[t,t+" year"]):[null,"centuries"],o=u[0],_=u[1],null!=o&&1!==o&&(_+="s"),_}},module.exports=time_estimates},{}]},{},[4])(4)}),!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.Clipboard=t()}}(function(){var t;return function t(e,n,o){function i(c,a){if(!n[c]){if(!e[c]){var s="function"==typeof require&&require;if(!a&&s)return s(c,!0);if(r)return r(c,!0);var l=new Error("Cannot find module '"+c+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[c]={exports:{}};e[c][0].call(u.exports,function(t){var n=e[c][1][t];return i(n?n:t)},u,u.exports,t,e,n,o)}return n[c].exports}for(var r="function"==typeof require&&require,c=0;co;o++)n[o].fn.apply(n[o].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),o=n[t],i=[];if(o&&e)for(var r=0,c=o.length;c>r;r++)o[r].fn!==e&&o[r].fn._!==e&&i.push(o[r]);return i.length?n[t]=i:delete n[t],this}},e.exports=o},{}],8:[function(e,n,o){!function(i,r){if("function"==typeof t&&t.amd)t(["module","select"],r);else if("undefined"!=typeof o)r(n,e("select"));else{var c={exports:{}};r(c,i.select),i.clipboardAction=c.exports}}(this,function(t,e){function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=n(e),r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},c=function(){function t(t,e){for(var n=0;n=a.minLength&&d.length<=a.maxLength&&a.allowedTagsPattern.test(d)&&!i.findInObjectArray(k.items,b,a.keyProperty||a.displayProperty);return g.when(f&&c({$tag:b})).then(i.promisifyValue)},j=function(a){return g.when(d({$tag:a})).then(i.promisifyValue)},k.items=[],k.addText=function(a){var b={};return f(b,a),k.add(b)},k.add=function(c){var d=e(c);return a.replaceSpacesWithDashes&&(d=i.replaceSpacesWithDashes(d)),f(c,d),h(c).then(function(){k.items.push(c),b.trigger("tag-added",{$tag:c})}).catch(function(){d&&b.trigger("invalid-tag",{$tag:c})})},k.remove=function(a){var c=k.items[a];return j(c).then(function(){return k.items.splice(a,1),k.clearSelection(),b.trigger("tag-removed",{$tag:c}),c})},k.select=function(a){0>a?a=k.items.length-1:a>=k.items.length&&(a=0),k.index=a,k.selected=k.items[a]},k.selectPrior=function(){k.select(--k.index)},k.selectNext=function(){k.select(++k.index)},k.removeSelected=function(){return k.remove(k.index)},k.clearSelection=function(){k.selected=null,k.index=-1},k.clearSelection(),k}function k(a){return-1!==c.indexOf(a)}return{restrict:"E",require:"ngModel",scope:{tags:"=ngModel",text:"=?",templateScope:"=?",tagClass:"&",onTagAdding:"&",onTagAdded:"&",onInvalidTag:"&",onTagRemoving:"&",onTagRemoved:"&",onTagClicked:"&"},replace:!1,transclude:!0,templateUrl:"ngTagsInput/tags-input.html",controller:["$scope","$attrs","$element",function(a,c,d){a.events=i.simplePubSub(),h.load("tagsInput",a,c,{template:[String,"ngTagsInput/tag-item.html"],type:[String,"text",k],placeholder:[String,"Add a tag"],tabindex:[Number,null],removeTagSymbol:[String,String.fromCharCode(215)],replaceSpacesWithDashes:[Boolean,!0],minLength:[Number,3],maxLength:[Number,b],addOnEnter:[Boolean,!0],addOnSpace:[Boolean,!1],addOnComma:[Boolean,!0],addOnBlur:[Boolean,!0],addOnPaste:[Boolean,!1],pasteSplitPattern:[RegExp,/,/],allowedTagsPattern:[RegExp,/.+/],enableEditingLastTag:[Boolean,!1],minTags:[Number,0],maxTags:[Number,b],displayProperty:[String,"text"],keyProperty:[String,""],allowLeftoverText:[Boolean,!1],addFromAutocompleteOnly:[Boolean,!1],spellcheck:[Boolean,!0]}),a.tagList=new j(a.options,a.events,i.handleUndefinedResult(a.onTagAdding,!0),i.handleUndefinedResult(a.onTagRemoving,!0)),this.registerAutocomplete=function(){return d.find("input"),{addTag:function(b){return a.tagList.add(b)},getTags:function(){return a.tagList.items},getCurrentTagText:function(){return a.newTag.text()},getOptions:function(){return a.options},getTemplateScope:function(){return a.templateScope},on:function(b,c){return a.events.on(b,c,!0),this}}},this.registerTagItem=function(){return{getOptions:function(){return a.options},removeTag:function(b){a.disabled||a.tagList.remove(b)}}}}],link:function(b,c,g,h){var j,k,l=[a.enter,a.comma,a.space,a.backspace,a.delete,a.left,a.right],m=b.tagList,n=b.events,o=b.options,p=c.find("input"),q=["minTags","maxTags","allowLeftoverText"];j=function(){h.$setValidity("maxTags",m.items.length<=o.maxTags),h.$setValidity("minTags",m.items.length>=o.minTags),h.$setValidity("leftoverText",!(!b.hasFocus&&!o.allowLeftoverText)||!b.newTag.text())},k=function(){d(function(){p[0].focus()})},h.$isEmpty=function(a){return!a||!a.length},b.newTag={text:function(a){return angular.isDefined(a)?(b.text=a,void n.trigger("input-change",a)):b.text||""},invalid:null},b.track=function(a){return a[o.keyProperty||o.displayProperty]},b.getTagClass=function(a,c){var d=a===m.selected;return[b.tagClass({$tag:a,$index:c,$selected:d}),{selected:d}]},b.$watch("tags",function(a){a?(m.items=i.makeObjectArray(a,o.displayProperty),b.tags=m.items):m.items=[]}),b.$watch("tags.length",function(){j(),h.$validate()}),g.$observe("disabled",function(a){b.disabled=a}),b.eventHandlers={input:{keydown:function(a){n.trigger("input-keydown",a)},focus:function(){b.hasFocus||(b.hasFocus=!0,n.trigger("input-focus"))},blur:function(){d(function(){var a=e.prop("activeElement"),d=a===p[0],f=c[0].contains(a);!d&&f||(b.hasFocus=!1,n.trigger("input-blur"))})},paste:function(a){a.getTextData=function(){var b=a.clipboardData||a.originalEvent&&a.originalEvent.clipboardData;return b?b.getData("text/plain"):f.clipboardData.getData("Text")},n.trigger("input-paste",a)}},host:{click:function(){b.disabled||k()}},tag:{click:function(a){n.trigger("tag-clicked",{$tag:a})}}},n.on("tag-added",b.onTagAdded).on("invalid-tag",b.onInvalidTag).on("tag-removed",b.onTagRemoved).on("tag-clicked",b.onTagClicked).on("tag-added",function(){b.newTag.text("")}).on("tag-added tag-removed",function(){b.tags=m.items,h.$setDirty(),k()}).on("invalid-tag",function(){b.newTag.invalid=!0}).on("option-change",function(a){-1!==q.indexOf(a.name)&&j()}).on("input-change",function(){m.clearSelection(),b.newTag.invalid=null}).on("input-focus",function(){c.triggerHandler("focus"),h.$setValidity("leftoverText",!0)}).on("input-blur",function(){o.addOnBlur&&!o.addFromAutocompleteOnly&&m.addText(b.newTag.text()),c.triggerHandler("blur"),j()}).on("input-keydown",function(c){var d,e,f,g,h=c.keyCode,j={};i.isModifierOn(c)||-1===l.indexOf(h)||(j[a.enter]=o.addOnEnter,j[a.comma]=o.addOnComma,j[a.space]=o.addOnSpace,d=!o.addFromAutocompleteOnly&&j[h],e=(h===a.backspace||h===a.delete)&&m.selected,g=h===a.backspace&&0===b.newTag.text().length&&o.enableEditingLastTag,f=(h===a.backspace||h===a.left||h===a.right)&&0===b.newTag.text().length&&!o.enableEditingLastTag,d?m.addText(b.newTag.text()):g?(m.selectPrior(),m.removeSelected().then(function(a){a&&b.newTag.text(a[o.displayProperty])})):e?m.removeSelected():f&&(h===a.left||h===a.backspace?m.selectPrior():h===a.right&&m.selectNext()),(d||f||e||g)&&c.preventDefault())}).on("input-paste",function(a){if(o.addOnPaste){var b=a.getTextData(),c=b.split(o.pasteSplitPattern);c.length>1&&(c.forEach(function(a){m.addText(a)}),a.preventDefault())}})}}}]),d.directive("tiTagItem",["tiUtil",function(a){return{restrict:"E",require:"^tagsInput",template:'',scope:{$scope:"=scope",data:"="},link:function(b,c,d,e){var f=e.registerTagItem(),g=f.getOptions();b.$$template=g.template,b.$$removeTagSymbol=g.removeTagSymbol,b.$getDisplayText=function(){return a.safeToString(b.data[g.displayProperty])},b.$removeTag=function(){f.removeTag(b.$index)},b.$watch("$parent.$index",function(a){b.$index=a})}}}]),d.directive("autoComplete",["$document","$timeout","$sce","$q","tagsInputConfig","tiUtil",function(b,c,d,e,f,g){function h(a,b,c){var d,f,h,i={};return h=function(){return b.tagsInput.keyProperty||b.tagsInput.displayProperty},d=function(a,c){return a.filter(function(a){return!g.findInObjectArray(c,a,h(),function(a,c){return b.tagsInput.replaceSpacesWithDashes&&(a=g.replaceSpacesWithDashes(a),c=g.replaceSpacesWithDashes(c)),g.defaultComparer(a,c)})})},i.reset=function(){f=null,i.items=[],i.visible=!1,i.index=-1,i.selected=null,i.query=null},i.show=function(){b.selectFirstMatch?i.select(0):i.selected=null,i.visible=!0},i.load=g.debounce(function(c,j){i.query=c;var k=e.when(a({$query:c}));f=k,k.then(function(a){k===f&&(a=g.makeObjectArray(a.data||a,h()),a=d(a,j),i.items=a.slice(0,b.maxResultsToShow),i.items.length>0?i.show():i.reset())})},b.debounceDelay),i.selectNext=function(){i.select(++i.index)},i.selectPrior=function(){i.select(--i.index)},i.select=function(a){0>a?a=i.items.length-1:a>=i.items.length&&(a=0),i.index=a,i.selected=i.items[a],c.trigger("suggestion-selected",a)},i.reset(),i}function i(a,b){var c=a.find("li").eq(b),d=c.parent(),e=c.prop("offsetTop"),f=c.prop("offsetHeight"),g=d.prop("clientHeight"),h=d.prop("scrollTop");h>e?d.prop("scrollTop",e):e+f>g+h&&d.prop("scrollTop",e+f-g)}return{restrict:"E",require:"^tagsInput",scope:{source:"&",matchClass:"&"},templateUrl:"ngTagsInput/auto-complete.html",controller:["$scope","$element","$attrs",function(a,b,c){a.events=g.simplePubSub(),f.load("autoComplete",a,c,{template:[String,"ngTagsInput/auto-complete-match.html"],debounceDelay:[Number,100],minLength:[Number,3],highlightMatchedText:[Boolean,!0],maxResultsToShow:[Number,10],loadOnDownArrow:[Boolean,!1],loadOnEmpty:[Boolean,!1],loadOnFocus:[Boolean,!1],selectFirstMatch:[Boolean,!0],displayProperty:[String,""]}),a.suggestionList=new h(a.source,a.options,a.events),this.registerAutocompleteMatch=function(){return{getOptions:function(){return a.options},getQuery:function(){return a.suggestionList.query}}}}],link:function(b,c,d,e){var f,h=[a.enter,a.tab,a.escape,a.up,a.down],j=b.suggestionList,k=e.registerAutocomplete(),l=b.options,m=b.events;l.tagsInput=k.getOptions(),f=function(a){return a&&a.length>=l.minLength||!a&&l.loadOnEmpty},b.templateScope=k.getTemplateScope(),b.addSuggestionByIndex=function(a){j.select(a),b.addSuggestion()},b.addSuggestion=function(){var a=!1;return j.selected&&(k.addTag(angular.copy(j.selected)),j.reset(),a=!0),a},b.track=function(a){return a[l.tagsInput.keyProperty||l.tagsInput.displayProperty]},b.getSuggestionClass=function(a,c){var d=a===j.selected;return[b.matchClass({$match:a,$index:c,$selected:d}),{selected:d}]},k.on("tag-added tag-removed invalid-tag input-blur",function(){j.reset()}).on("input-change",function(a){f(a)?j.load(a,k.getTags()):j.reset()}).on("input-focus",function(){var a=k.getCurrentTagText();l.loadOnFocus&&f(a)&&j.load(a,k.getTags())}).on("input-keydown",function(c){var d=c.keyCode,e=!1;if(!g.isModifierOn(c)&&-1!==h.indexOf(d))return j.visible?d===a.down?(j.selectNext(),e=!0):d===a.up?(j.selectPrior(),e=!0):d===a.escape?(j.reset(),e=!0):d!==a.enter&&d!==a.tab||(e=b.addSuggestion()):d===a.down&&b.options.loadOnDownArrow&&(j.load(k.getCurrentTagText(),k.getTags()),e=!0),e?(c.preventDefault(),c.stopImmediatePropagation(),!1):void 0}),m.on("suggestion-selected",function(a){i(c,a)})}}}]),d.directive("tiAutocompleteMatch",["$sce","tiUtil",function(a,b){return{restrict:"E",require:"^autoComplete",template:'',scope:{$scope:"=scope",data:"="},link:function(c,d,e,f){var g=f.registerAutocompleteMatch(),h=g.getOptions();c.$$template=h.template,c.$index=c.$parent.$index,c.$highlight=function(c){return h.highlightMatchedText&&(c=b.safeHighlight(c,g.getQuery())),a.trustAsHtml(c)},c.$getDisplayText=function(){return b.safeToString(c.data[h.displayProperty||h.tagsInput.displayProperty])}}}}]),d.directive("tiTranscludeAppend",function(){return function(a,b,c,d,e){e(function(a){b.append(a)})}}),d.directive("tiAutosize",["tagsInputConfig",function(a){return{restrict:"A",require:"ngModel",link:function(b,c,d,e){var f,g,h=a.getTextAutosizeThreshold();f=angular.element(''),f.css("display","none").css("visibility","hidden").css("width","auto").css("white-space","pre"),c.parent().append(f),g=function(a){var b,e=a;return angular.isString(e)&&0===e.length&&(e=d.placeholder),e&&(f.text(e),f.css("display",""),b=f.prop("offsetWidth"),f.css("display","none")),c.css("width",b?b+h+"px":""),a},e.$parsers.unshift(g),e.$formatters.unshift(g),d.$observe("placeholder",function(a){e.$modelValue||g(a)})}}}]),d.directive("tiBindAttrs",function(){return function(a,b,c){a.$watch(c.tiBindAttrs,function(a){angular.forEach(a,function(a,b){c.$set(b,a)})},!0)}}),d.provider("tagsInputConfig",function(){var a={},b={},c=3;this.setDefaults=function(b,c){return a[b]=c,this},this.setActiveInterpolation=function(a,c){return b[a]=c,this},this.setTextAutosizeThreshold=function(a){return c=a,this},this.$get=["$interpolate",function(d){var e={};return e[String]=function(a){return a},e[Number]=function(a){return parseInt(a,10)},e[Boolean]=function(a){return"true"===a.toLowerCase()},e[RegExp]=function(a){return new RegExp(a)},{load:function(c,f,g,h){var i=function(){return!0};f.options={},angular.forEach(h,function(h,j){var k,l,m,n,o,p;k=h[0],l=h[1],m=h[2]||i,n=e[k],o=function(){var b=a[c]&&a[c][j];return angular.isDefined(b)?b:l},p=function(a){f.options[j]=a&&m(a)?n(a):o()},b[c]&&b[c][j]?g.$observe(j,function(a){p(a),f.events.trigger("option-change",{name:j,newValue:a})}):p(g[j]&&d(g[j])(f.$parent))})},getTextAutosizeThreshold:function(){return c}}}]}),d.factory("tiUtil",["$timeout","$q",function(a,b){var c={};return c.debounce=function(b,c){var d;return function(){var e=arguments;a.cancel(d),d=a(function(){b.apply(null,e)},c)}},c.makeObjectArray=function(a,b){if(!angular.isArray(a)||0===a.length||angular.isObject(a[0]))return a;var c=[];return a.forEach(function(a){var d={};d[b]=a,c.push(d)}),c},c.findInObjectArray=function(a,b,d,e){var f=null;return e=e||c.defaultComparer,a.some(function(a){return e(a[d],b[d])?(f=a,!0):void 0}),f},c.defaultComparer=function(a,b){return c.safeToString(a).toLowerCase()===c.safeToString(b).toLowerCase()},c.safeHighlight=function(a,b){function d(a){return a.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}if(!b)return a;a=c.encodeHTML(a),b=c.encodeHTML(b);var e=new RegExp("&[^;]+;|"+d(b),"gi");return a.replace(e,function(a){return a.toLowerCase()===b.toLowerCase()?""+a+"":a})},c.safeToString=function(a){return angular.isUndefined(a)||null==a?"":a.toString().trim()},c.encodeHTML=function(a){return c.safeToString(a).replace(/&/g,"&").replace(//g,">")},c.handleUndefinedResult=function(a,b){return function(){var c=a.apply(null,arguments);return angular.isUndefined(c)?b:c}},c.replaceSpacesWithDashes=function(a){return c.safeToString(a).replace(/\s/g,"-")},c.isModifierOn=function(a){return a.shiftKey||a.ctrlKey||a.altKey||a.metaKey},c.promisifyValue=function(a){return a=!!angular.isUndefined(a)||a,b[a?"when":"reject"]()},c.simplePubSub=function(){var a={};return{on:function(b,c,d){return b.split(" ").forEach(function(b){a[b]||(a[b]=[]);var e=d?[].unshift:[].push;e.call(a[b],c)}),this},trigger:function(b,d){var e=a[b]||[];return e.every(function(a){return c.handleUndefinedResult(a,!0)(d)}),this}}},c}]),d.run(["$templateCache",function(a){a.put("ngTagsInput/tags-input.html",'
'),a.put("ngTagsInput/tag-item.html",' '),a.put("ngTagsInput/auto-complete.html",'
'),a.put("ngTagsInput/auto-complete-match.html",'')}])}(),angular.module("xeditable",[]).value("editableOptions",{theme:"default",icon_set:"default",buttons:"right",blurElem:"cancel",blurForm:"ignore",activate:"focus",isDisabled:!1,activationEvent:"click"}),angular.module("xeditable").directive("editableBsdate",["editableDirectiveFactory",function(a){return a({directiveName:"editableBsdate",inputTpl:"
",render:function(){this.parent.render.call(this);var a=angular.element('');a.attr("uib-datepicker-popup",this.attrs.eDatepickerPopupXEditable||"yyyy/MM/dd"),a.attr("is-open",this.attrs.eIsOpen),a.attr("date-disabled",this.attrs.eDateDisabled),a.attr("uib-datepicker-popup",this.attrs.eDatepickerPopup),a.attr("year-range",this.attrs.eYearRange||20),a.attr("show-button-bar",this.attrs.eShowButtonBar||!0),a.attr("current-text",this.attrs.eCurrentText||"Today"),a.attr("clear-text",this.attrs.eClearText||"Clear"),a.attr("close-text",this.attrs.eCloseText||"Done"),a.attr("close-on-date-selection",this.attrs.eCloseOnDateSelection||!0),a.attr("datepicker-append-to-body",this.attrs.eDatePickerAppendToBody||!1),a.attr("date-disabled",this.attrs.eDateDisabled),a.attr("name",this.attrs.eName),a.attr("on-open-focus",this.attrs.eOnOpenFocus||!0),a.attr("ng-readonly",this.attrs.eReadonly||!1),this.attrs.eNgChange&&(a.attr("ng-change",this.attrs.eNgChange),this.inputEl.removeAttr("ng-change")),this.attrs.eStyle&&(a.attr("style",this.attrs.eStyle),this.inputEl.removeAttr("style")),this.scope.dateOptions={formatDay:this.attrs.eFormatDay||"dd",formatMonth:this.attrs.eFormatMonth||"MMMM",formatYear:this.attrs.eFormatYear||"yyyy",formatDayHeader:this.attrs.eFormatDayHeader||"EEE",formatDayTitle:this.attrs.eFormatDayTitle||"MMMM yyyy",formatMonthTitle:this.attrs.eFormatMonthTitle||"yyyy",showWeeks:!this.attrs.eShowWeeks||"true"===this.attrs.eShowWeeks.toLowerCase(),startingDay:this.attrs.eStartingDay||0,minMode:this.attrs.eMinMode||"day",maxMode:this.attrs.eMaxMode||"year",initDate:this.scope.$eval(this.attrs.eInitDate)||new Date,datepickerMode:this.attrs.eDatepickerMode||"day",maxDate:this.scope.$eval(this.attrs.eMaxDate)||null,minDate:this.scope.$eval(this.attrs.eMinDate)||null};var b=angular.isDefined(this.attrs.eShowCalendarButton)?this.attrs.eShowCalendarButton:"true";if("true"===b){var c=angular.element(''),d=angular.element('');c.attr("ng-click",this.attrs.eNgClick),d.append(c),this.inputEl.append(d)}else a.attr("ng-click",this.attrs.eNgClick);a.attr("datepicker-options","dateOptions"),this.inputEl.prepend(a),this.inputEl.removeAttr("class"),this.inputEl.removeAttr("ng-click"),this.inputEl.removeAttr("is-open"),this.inputEl.removeAttr("init-date"),this.inputEl.removeAttr("datepicker-popup"),this.inputEl.removeAttr("required"),this.inputEl.removeAttr("ng-model"),this.inputEl.removeAttr("date-picker-append-to-body"),this.inputEl.removeAttr("name"),this.inputEl.attr("class","input-group")}})}]),angular.module("xeditable").directive("editableBstime",["editableDirectiveFactory",function(a){return a({directiveName:"editableBstime",inputTpl:"",render:function(){this.parent.render.call(this);var a=angular.element('
');a.attr("ng-model",this.inputEl.attr("ng-model")),this.inputEl.removeAttr("ng-model"),this.attrs.eNgChange&&(a.attr("ng-change",this.inputEl.attr("ng-change")),this.inputEl.removeAttr("ng-change")),this.inputEl.wrap(a)}})}]),angular.module("xeditable").directive("editableCheckbox",["editableDirectiveFactory",function(a){return a({directiveName:"editableCheckbox",inputTpl:'',render:function(){this.parent.render.call(this),this.attrs.eTitle&&(this.inputEl.wrap(""),this.inputEl.parent().append(""+this.attrs.eTitle+""))},autosubmit:function(){var a=this;a.inputEl.bind("change",function(){setTimeout(function(){a.scope.$apply(function(){a.scope.$form.$submit()})},500)})}})}]),angular.module("xeditable").directive("editableChecklist",["editableDirectiveFactory","editableNgOptionsParser",function(a,b){return a({directiveName:"editableChecklist",inputTpl:"",useCopy:!0,render:function(){this.parent.render.call(this);var a=b(this.attrs.eNgOptions),c='';this.inputEl.removeAttr("ng-model"),this.inputEl.removeAttr("ng-options"),this.inputEl.html(c)}})}]),angular.module("xeditable").directive("editableCombodate",["editableDirectiveFactory","editableCombodate",function(a,b){return a({directiveName:"editableCombodate",inputTpl:'',render:function(){this.parent.render.call(this);var a={value:new Date(this.scope.$data)},c=this;angular.forEach(["format","template","minYear","maxYear","yearDescending","minuteStep","secondStep","firstItem","errorClass","customClass","roundTime","smartDays"],function(b){var d="e"+b.charAt(0).toUpperCase()+b.slice(1);d in c.attrs&&(a[b]=c.attrs[d])});var d=b.getInstance(this.inputEl,a);d.$widget.find("select").bind("change",function(a){c.scope.$data=new Date(d.getValue()).toISOString()})}})}]),function(){var a=function(a){return a.toLowerCase().replace(/-(.)/g,function(a,b){return b.toUpperCase()})},b="text|password|email|tel|number|url|search|color|date|datetime|datetime-local|time|month|week|file".split("|");angular.forEach(b,function(b){var c=a("editable-"+b);angular.module("xeditable").directive(c,["editableDirectiveFactory",function(a){return a({directiveName:c,inputTpl:'',render:function(){if(this.parent.render.call(this),this.attrs.eLabel){var a=angular.element("");this.inputEl.parent().prepend(a)}this.attrs.eFormclass&&this.editorEl.addClass(this.attrs.eFormclass)}})}])}),angular.module("xeditable").directive("editableRange",["editableDirectiveFactory",function(a){return a({directiveName:"editableRange",inputTpl:'',render:function(){this.parent.render.call(this),this.inputEl.after("{{$data}}")}})}])}(),angular.module("xeditable").directive("editableTagsInput",["editableDirectiveFactory","editableUtils",function(a,b){var c=function(a){for(var b=0,c=d.length;c>b;b++)if(d[b].name===a)return b},d=[],e=a({directiveName:"editableTagsInput",inputTpl:"",render:function(){var a=c(this.name);this.parent.render.call(this),this.inputEl.append(b.rename("auto-complete",d[a].element)),this.inputEl.removeAttr("ng-model"),this.inputEl.attr("ng-model","$parent.$data")}}),f=e.link;return e.link=function(a,b,c,e){var g=b.find("editable-tags-input-auto-complete");return d.push({name:c.name||c.editableTagsInput,element:g.clone()}),g.remove(),f(a,b,c,e)},e}]),angular.module("xeditable").directive("editableRadiolist",["editableDirectiveFactory","editableNgOptionsParser",function(a,b){return a({directiveName:"editableRadiolist",inputTpl:"",render:function(){this.parent.render.call(this);var a=b(this.attrs.eNgOptions),c='';this.inputEl.removeAttr("ng-model"),this.inputEl.removeAttr("ng-options"),this.inputEl.html(c)},autosubmit:function(){var a=this;a.inputEl.bind("change",function(){setTimeout(function(){a.scope.$apply(function(){a.scope.$form.$submit()})},500)})}})}]),angular.module("xeditable").directive("editableSelect",["editableDirectiveFactory",function(a){return a({directiveName:"editableSelect",inputTpl:"",render:function(){if(this.parent.render.call(this),this.attrs.ePlaceholder){var a=angular.element('");this.inputEl.append(a)}},autosubmit:function(){var a=this;a.inputEl.bind("change",function(){a.scope.$apply(function(){a.scope.$form.$submit()})})}})}]),angular.module("xeditable").directive("editableTextarea",["editableDirectiveFactory",function(a){return a({directiveName:"editableTextarea",inputTpl:"",addListeners:function(){var a=this;a.parent.addListeners.call(a),a.single&&"no"!==a.buttons&&a.autosubmit()},autosubmit:function(){var a=this;a.inputEl.bind("keydown",function(b){(b.ctrlKey||b.metaKey)&&13===b.keyCode&&a.scope.$apply(function(){a.scope.$form.$submit()})})}})}]),angular.module("xeditable").directive("editableUiSelect",["editableDirectiveFactory","editableUtils",function(a,b){var c=function(a){for(var b=0,c=d.length;c>b;b++)if(d[b].name===a)return b},d=[],e=[],f=a({directiveName:"editableUiSelect",inputTpl:"",render:function(){var a=c(this.name);this.parent.render.call(this),this.inputEl.append(b.rename("ui-select-match",d[a].element)),this.inputEl.append(b.rename("ui-select-choices",e[a].element)),this.inputEl.removeAttr("ng-model"),this.inputEl.attr("ng-model","$parent.$parent.$data")}}),g=f.link;return f.link=function(a,b,c,f){var h=b.find("editable-ui-select-match"),i=b.find("editable-ui-select-choices");return d.push({name:c.name||c.editableUiSelect,element:h.clone()}),e.push({name:c.name||c.editableUiSelect,element:i.clone()}),h.remove(),i.remove(),g(a,b,c,f)},f}]),angular.module("xeditable").factory("editableController",["$q","editableUtils",function(a,b){function c(a,c,d,e,f,g,h,i,j,k){var l,m,n=this;n.scope=a,n.elem=d,n.attrs=c,n.inputEl=null,n.editorEl=null,n.single=!0,n.error="",n.theme=f[c.editableTheme]||f[h.theme]||f.default,n.parent={},n.icon_set="default"===h.icon_set?g.default[h.theme]:g.external[h.icon_set],n.inputTpl="",n.directiveName="",n.useCopy=!1,n.single=null,n.buttons="right",n.init=function(b){if(n.single=b,n.name=c.eName||c[n.directiveName],!c[n.directiveName])throw"You should provide value for `"+n.directiveName+"` in editable element!";l=e(c[n.directiveName]),n.single?n.buttons=n.attrs.buttons||h.buttons:n.buttons="no",c.eName&&n.scope.$watch("$data",function(a){n.scope.$form.$data[c.eName]=a}),c.onshow&&(n.onshow=function(){return n.catchError(e(c.onshow)(a))}),c.onhide&&(n.onhide=function(){return e(c.onhide)(a)}),c.oncancel&&(n.oncancel=function(){return e(c.oncancel)(a)}),c.onbeforesave&&(n.onbeforesave=function(){return n.catchError(e(c.onbeforesave)(a))}),c.onaftersave&&(n.onaftersave=function(){return n.catchError(e(c.onaftersave)(a))}),a.$parent.$watch(c[n.directiveName],function(a,b){n.setLocalValue(),n.handleEmpty()})},n.render=function(){var a=n.theme;n.inputEl=angular.element(n.inputTpl),n.controlsEl=angular.element(a.controlsTpl),n.controlsEl.append(n.inputEl),"no"!==n.buttons&&(n.buttonsEl=angular.element(a.buttonsTpl),n.submitEl=angular.element(a.submitTpl),n.cancelEl=angular.element(a.cancelTpl),n.icon_set&&(n.submitEl.find("span").addClass(n.icon_set.ok),n.cancelEl.find("span").addClass(n.icon_set.cancel)),n.buttonsEl.append(n.submitEl).append(n.cancelEl),n.controlsEl.append(n.buttonsEl),n.inputEl.addClass("editable-has-buttons")),n.errorEl=angular.element(a.errorTpl),n.controlsEl.append(n.errorEl),n.editorEl=angular.element(n.single?a.formTpl:a.noformTpl),n.editorEl.append(n.controlsEl);for(var d in c.$attr)if(!(d.length<=1)){var e=!1,f=d.substring(1,2);if("e"===d.substring(0,1)&&f===f.toUpperCase()&&(e=d.substring(1),"Form"!==e&&"NgSubmit"!==e)){e=e.substring(0,1).toLowerCase()+b.camelToDash(e.substring(1));var g="value"!==e&&""===c[d]?e:c[d];n.inputEl.attr(e,g)}}n.inputEl.addClass("editable-input"),n.inputEl.attr("ng-model","$parent.$data"),n.editorEl.addClass(b.camelToDash(n.directiveName)),n.single&&(n.editorEl.attr("editable-form","$form"),n.editorEl.attr("blur",n.attrs.blur||("no"===n.buttons?"cancel":h.blurElem))),angular.isFunction(a.postrender)&&a.postrender.call(n)},n.setLocalValue=function(){n.scope.$data=n.useCopy?angular.copy(l(a.$parent)):l(a.$parent)};var o=null;n.show=function(){return n.setLocalValue(),n.render(),d.after(n.editorEl),o=a.$new(),j(n.editorEl)(o),n.addListeners(),d.addClass("editable-hide"),n.onshow()},n.hide=function(){return o.$destroy(),n.controlsEl.remove(),n.editorEl.remove(),d.removeClass("editable-hide"),n.onhide()},n.cancel=function(){n.oncancel()},n.addListeners=function(){n.inputEl.bind("keyup",function(a){if(n.single)switch(a.keyCode){case 27:n.scope.$apply(function(){n.scope.$form.$cancel()})}}),n.single&&"no"===n.buttons&&n.autosubmit(),n.editorEl.bind("click",function(a){a.which&&1!==a.which||n.scope.$form.$visible&&(n.scope.$form._clicked=!0)})},n.setWaiting=function(a){a?(m=!n.inputEl.attr("disabled")&&!n.inputEl.attr("ng-disabled")&&!n.inputEl.attr("ng-enabled"),m&&(n.inputEl.attr("disabled","disabled"),n.buttonsEl&&n.buttonsEl.find("button").attr("disabled","disabled"))):m&&(n.inputEl.removeAttr("disabled"),n.buttonsEl&&n.buttonsEl.find("button").removeAttr("disabled"))},n.activate=function(a,b){setTimeout(function(){var c=n.inputEl[0];"focus"===h.activate&&c.focus&&(a&&(b=b||a,c.onfocus=function(){var c=this;setTimeout(function(){c.setSelectionRange(a,b)})}),c.focus()),"select"===h.activate&&c.select&&c.select()},0)},n.setError=function(b){angular.isObject(b)||(a.$error=b,n.error=b)},n.catchError=function(a,b){return angular.isObject(a)&&b!==!0?k.when(a).then(angular.bind(this,function(a){this.catchError(a,!0)}),angular.bind(this,function(a){this.catchError(a,!0)})):b&&angular.isObject(a)&&a.status&&200!==a.status&&a.data&&angular.isString(a.data)?(this.setError(a.data),a=a.data):angular.isString(a)&&this.setError(a), a},n.save=function(){l.assign(a.$parent,n.useCopy?angular.copy(n.scope.$data):n.scope.$data)},n.handleEmpty=function(){var b=l(a.$parent),c=null===b||void 0===b||""===b||angular.isArray(b)&&0===b.length;d.toggleClass("editable-empty",c)},n.autosubmit=angular.noop,n.onshow=angular.noop,n.onhide=angular.noop,n.oncancel=angular.noop,n.onbeforesave=angular.noop,n.onaftersave=angular.noop}return c.$inject=["$scope","$attrs","$element","$parse","editableThemes","editableIcons","editableOptions","$rootScope","$compile","$q"],c}]),angular.module("xeditable").factory("editableDirectiveFactory",["$parse","$compile","editableThemes","$rootScope","$document","editableController","editableFormController","editableOptions",function(a,b,c,d,e,f,g,h){return function(b){return{restrict:"A",scope:!0,require:[b.directiveName,"?^form"],controller:f,link:function(c,f,i,j){var k,l=j[0],m=!1;if(j[1])k=j[1],m=void 0===i.eSingle;else if(i.eForm){var n=a(i.eForm)(c);if(n)k=n,m=!0;else if(f&&"function"==typeof f.parents&&f.parents().last().find("form[name="+i.eForm+"]").length)k=null,m=!0;else for(var o=0;o=0&&a.splice(c,1),b},camelToDash:function(a){var b=/[A-Z]/g;return a.replace(b,function(a,b){return(b?"-":"")+a.toLowerCase()})},dashToCamel:function(a){var b=/([\:\-\_]+(.))/g,c=/^moz([A-Z])/;return a.replace(b,function(a,b,c,d){return d?c.toUpperCase():c}).replace(c,"Moz$1")},rename:function(a,b){var c=angular.element("<"+a+"/>");c.html(b.html());for(var d=b[0].attributes,e=0;e').html(this.getTemplate()),this.initCombos(),this.options.smartDays){var a=this;this.$widget.find("select").bind("change",function(b){(angular.element(b.target).hasClass("month")||angular.element(b.target).hasClass("year"))&&a.fillCombo("day")})}this.$widget.find("select").css("width","auto"),this.$element.css("display","none").after(this.$widget),this.setValue(this.$element.val()||this.options.value)},getTemplate:function(){var a=this.options.template,b=this.options.customClass;return angular.forEach(this.map,function(b,c){b=b[0];var d=new RegExp(b+"+"),e=b.length>1?b.substring(1,2):b;a=a.replace(d,"{"+e+"}")}),a=a.replace(/ /g," "),angular.forEach(this.map,function(c,d){c=c[0];var e=c.length>1?c.substring(1,2):c;a=a.replace("{"+e+"}",'')}),a},initCombos:function(){for(var a in this.map){var b=this.$widget[0].querySelectorAll("."+a);this["$"+a]=b.length?angular.element(b):null,this.fillCombo(a)}},fillCombo:function(a){var b=this["$"+a];if(b){var c="fill"+a.charAt(0).toUpperCase()+a.slice(1),d=this[c](),e=b.val();b.html("");for(var f=0;f'+d[f][1]+"");b.val(e)}},fillCommon:function(a){var b,c=[];if("name"===this.options.firstItem){b=moment.relativeTime||moment.langData()._relativeTime;var d="function"==typeof b[a]?b[a](1,!0,a,!1):b[a];d=d.split(" ").reverse()[0],c.push(["",d])}else"empty"===this.options.firstItem&&c.push(["",""]);return c},fillDay:function(){var a,b,c=this.fillCommon("d"),d=-1!==this.options.template.indexOf("DD"),e=31;if(this.options.smartDays&&this.$month&&this.$year){var f=parseInt(this.$month.val(),10),g=parseInt(this.$year.val(),10);isNaN(f)||isNaN(g)||(e=moment([g,f]).daysInMonth())}for(b=1;e>=b;b++)a=d?this.leadZero(b):b,c.push([b,a]);return c},fillMonth:function(){var a,b,c=this.fillCommon("M"),d=-1!==this.options.template.indexOf("MMMM"),e=-1!==this.options.template.indexOf("MMM"),f=-1!==this.options.template.indexOf("MM");for(b=0;11>=b;b++)a=d?moment().date(1).month(b).format("MMMM"):e?moment().date(1).month(b).format("MMM"):f?this.leadZero(b+1):b+1,c.push([b,a]);return c},fillYear:function(){var a,b,c=[],d=-1!==this.options.template.indexOf("YYYY");for(b=this.options.maxYear;b>=this.options.minYear;b--)a=d?b:(b+"").substring(2),c[this.options.yearDescending?"push":"unshift"]([b,a]);return c=this.fillCommon("y").concat(c)},fillHour:function(){var a,b,c=this.fillCommon("h"),d=-1!==this.options.template.indexOf("h"),e=(-1!==this.options.template.indexOf("H"),-1!==this.options.template.toLowerCase().indexOf("hh")),f=d?1:0,g=d?12:23;for(b=f;g>=b;b++)a=e?this.leadZero(b):b,c.push([b,a]);return c},fillMinute:function(){var a,b,c=this.fillCommon("m"),d=-1!==this.options.template.indexOf("mm");for(b=0;59>=b;b+=this.options.minuteStep)a=d?this.leadZero(b):b,c.push([b,a]);return c},fillSecond:function(){var a,b,c=this.fillCommon("s"),d=-1!==this.options.template.indexOf("ss");for(b=0;59>=b;b+=this.options.secondStep)a=d?this.leadZero(b):b,c.push([b,a]);return c},fillAmpm:function(){var a=-1!==this.options.template.indexOf("a"),b=(-1!==this.options.template.indexOf("A"),[["am",a?"am":"AM"],["pm",a?"pm":"PM"]]);return b},getValue:function(a){var b,c={},d=this,e=!1;return angular.forEach(this.map,function(a,b){if("ampm"!==b){var f="day"===b?1:0;return c[b]=d["$"+b]?parseInt(d["$"+b].val(),10):f,isNaN(c[b])?(e=!0,!1):void 0}}),e?"":(this.$ampm&&(12===c.hour?c.hour="am"===this.$ampm.val()?0:12:c.hour="am"===this.$ampm.val()?c.hour:c.hour+12),b=moment([c.year,c.month,c.day,c.hour,c.minute,c.second]),this.highlight(b),a=void 0===a?this.options.format:a,null===a?b.isValid()?b:null:b.isValid()?b.format(a):"")},setValue:function(a){function b(a,b){var c={};return angular.forEach(a.children("option"),function(a,d){var e=angular.element(a).attr("value");if(""!==e){var f=Math.abs(e-b);("undefined"==typeof c.distance||f=12?(e.ampm="pm",e.hour>12&&(e.hour-=12)):(e.ampm="am",0===e.hour&&(e.hour=12))),angular.forEach(e,function(a,c){d["$"+c]&&("minute"===c&&d.options.minuteStep>1&&d.options.roundTime&&(a=b(d["$"+c],a)),"second"===c&&d.options.secondStep>1&&d.options.roundTime&&(a=b(d["$"+c],a)),d["$"+c].val(a))}),this.options.smartDays&&this.fillCombo("day"),this.$element.val(c.format(this.options.format)).triggerHandler("change"))}},highlight:function(a){a.isValid()?this.options.errorClass?this.$widget.removeClass(this.options.errorClass):this.$widget.find("select").css("border-color",this.borderColor):this.options.errorClass?this.$widget.addClass(this.options.errorClass):(this.borderColor||(this.borderColor=this.$widget.find("select").css("border-color")),this.$widget.find("select").css("border-color","red"))},leadZero:function(a){return 9>=a?"0"+a:a},destroy:function(){this.$widget.remove(),this.$element.removeData("combodate").show()}},{getInstance:function(b,c){return new a(b,c)}}}]),angular.module("xeditable").factory("editableIcons",function(){var a={default:{bs2:{ok:"icon-ok icon-white",cancel:"icon-remove"},bs3:{ok:"glyphicon glyphicon-ok",cancel:"glyphicon glyphicon-remove"}},external:{"font-awesome":{ok:"fa fa-check",cancel:"fa fa-times"}}};return a}),angular.module("xeditable").factory("editableThemes",function(){var a={default:{formTpl:'
',noformTpl:'',controlsTpl:'',inputTpl:"",errorTpl:'
',buttonsTpl:'',submitTpl:'',cancelTpl:''},bs2:{formTpl:'
',noformTpl:'',controlsTpl:'
',inputTpl:"",errorTpl:'
',buttonsTpl:'',submitTpl:'',cancelTpl:''},bs3:{formTpl:'
',noformTpl:'',controlsTpl:'
',inputTpl:"",errorTpl:'
',buttonsTpl:'',submitTpl:'',cancelTpl:'',buttonsClass:"",inputClass:"",postrender:function(){switch(this.directiveName){case"editableText":case"editableSelect":case"editableTextarea":case"editableEmail":case"editableTel":case"editableNumber":case"editableUrl":case"editableSearch":case"editableDate":case"editableDatetime":case"editableBsdate":case"editableTime":case"editableMonth":case"editableWeek":case"editablePassword":case"editableDatetimeLocal":if(this.inputEl.addClass("form-control"),this.theme.inputClass){if(this.inputEl.attr("multiple")&&("input-sm"===this.theme.inputClass||"input-lg"===this.theme.inputClass))break;this.inputEl.addClass(this.theme.inputClass)}break;case"editableCheckbox":this.editorEl.addClass("checkbox")}this.buttonsEl&&this.theme.buttonsClass&&this.buttonsEl.find("button").addClass(this.theme.buttonsClass)}},semantic:{formTpl:'
',noformTpl:'',controlsTpl:'
',inputTpl:"",errorTpl:'
',buttonsTpl:'',submitTpl:'',cancelTpl:''}};return a}),function(T){function z(a,c,b){var g=0,f=[0],h="",l=null,h=b||"UTF8";if("UTF8"!==h&&"UTF16"!==h)throw"encoding must be UTF8 or UTF16";if("HEX"===c){if(0!==a.length%2)throw"srcString of HEX type must be in byte increments";l=B(a),g=l.binLen,f=l.value}else if("ASCII"===c||"TEXT"===c)l=J(a,h),g=l.binLen,f=l.value;else{if("B64"!==c)throw"inputFormat must be HEX, TEXT, ASCII, or B64";l=K(a),g=l.binLen,f=l.value}this.getHash=function(a,c,b,h){var p,l=null,d=f.slice(),n=g;if(3===arguments.length?"number"!=typeof b&&(h=b,b=1):2===arguments.length&&(b=1),b!==parseInt(b,10)||1>b)throw"numRounds must a integer >= 1";switch(c){case"HEX":l=L;break;case"B64":l=M;break;default:throw"format must be HEX or B64"}if("SHA-1"===a)for(p=0;pp/8&&(d[b]&=4294967040),n=0;n<=b;n+=1)w[n]=909522486^d[n],x[n]=1549556828^d[n];return c="SHA-1"===c?y(x.concat(y(w.concat(f),a+g)),a+m):v(x.concat(v(w.concat(f),a+g,c)),a+m,c),l(c,N(s))}}function s(a,c){this.a=a,this.b=c}function J(a,c){var g,l,b=[],f=[],h=0;if("UTF8"===c)for(l=0;l>>12,f[1]=128|(4032&g)>>>6,f[2]=128|63&g):128>>6,f[1]=128|63&g):f[0]=g,g=0;g>>2]|=f[g]<<24-h%4*8,h+=1;else if("UTF16"===c)for(l=0;l>>2]|=a.charCodeAt(l)<<16-h%4*8,h+=2;return{value:b,binLen:8*h}}function B(a){var g,f,c=[],b=a.length;if(0!==b%2)throw"String of HEX type must be in byte increments";for(g=0;g>>3]|=f<<24-g%8*4}return{value:c,binLen:4*b}}function K(a){var g,f,h,l,r,c=[],b=0;if(-1===a.search(/^[a-zA-Z0-9=+\/]+$/))throw"Invalid character in base-64 string";if(g=a.indexOf("="),a=a.replace(/\=/g,""),-1!==g&&g>24);tmp&&(ret+=tmp),tmp=this._isASCII((16711680&int)>>16),tmp&&(ret+=tmp),tmp=this._isASCII((65280&int)>>8),tmp&&(ret+=tmp),tmp=this._isASCII(255&int),tmp&&(ret+=tmp)}return ret},_isASCII:function(data){return data>31&&data<127&&String.fromCharCode(data)}},initEngines:function(default_paranoia){paranoia_level=default_paranoia||10,sjcl.random.setDefaultParanoia(this.paranoia_level),sjcl.random.startCollectors(),console.warn("Crypto stuff initialized")}};CRYPTO.initEngines(),function(){angular.module("passmanApp",["ngAnimate","ngCookies","ngResource","ngRoute","ngSanitize","ngTouch","templates-main","LocalStorageModule","offClick","ngPasswordMeter","ngclipboard","xeditable","ngTagsInput","angularjs-datetime-picker","ui.sortable","pascalprecht.translate"]).config(function($routeProvider){$routeProvider.when("/",{templateUrl:"views/vaults.html",controller:"VaultCtrl"}).when("/vault/:vault_id",{templateUrl:"views/show_vault.html",controller:"CredentialCtrl"}).when("/vault/:vault_id/new",{templateUrl:"views/edit_credential.html",controller:"CredentialEditCtrl"}).when("/vault/:vault_id/edit/:credential_id",{templateUrl:"views/edit_credential.html",controller:"CredentialEditCtrl"}).when("/vault/:vault_id/:credential_id/share",{templateUrl:"views/share_credential.html",controller:"ShareCtrl"}).when("/vault/:vault_id/:credential_id/revisions",{templateUrl:"views/credential_revisions.html",controller:"RevisionCtrl"}).when("/vault/:vault_id/settings",{templateUrl:"views/settings.html",controller:"SettingsCtrl"}).otherwise({redirectTo:"/"})}).config(["$httpProvider",function($httpProvider){$httpProvider.defaults.headers.common.requesttoken=oc_requesttoken}]).config(function(localStorageServiceProvider){localStorageServiceProvider.setNotify(!0,!0)}).config(function($translateProvider){$translateProvider.useSanitizeValueStrategy("sanitize"),$translateProvider.useUrlLoader(OC.generateUrl("/apps/passman/api/v2/language")),$translateProvider.preferredLanguage("en")}),jQuery(document).ready(function(){var findItemByID=function(id){var credentials,foundItem=!1;return credentials=angular.element("#app-content-wrapper").scope().credentials,angular.forEach(credentials,function(credential){credential.credential_id===id&&(foundItem=credential)}),foundItem};jQuery(document).on("click",".undoDelete",function(){var credential=findItemByID($(this).attr("data-item-id"));angular.element("#app-content-wrapper").scope().recoverCredential(credential),angular.element("#app-content-wrapper").scope().$apply()}),jQuery(document).on("click",".undoRestore",function(){var credential=findItemByID($(this).attr("data-item-id"));angular.element("#app-content-wrapper").scope().deleteCredential(credential),angular.element("#app-content-wrapper").scope().$apply()})})}(),function(){angular.module("passmanApp").filter("as",function($parse){return function(value,context,path){return $parse(path).assign(context,value)}})}(),function(){angular.module("passmanApp").filter("bytes",function(){return function(bytes,precision){if(isNaN(parseFloat(bytes))||!isFinite(bytes))return"-";"undefined"==typeof precision&&(precision=1);var units=["bytes","kB","MB","GB","TB","PB"],number=Math.floor(Math.log(bytes)/Math.log(1024));return(bytes/Math.pow(1024,Math.floor(number))).toFixed(precision)+" "+units[number]}})}(),function(){angular.module("passmanApp").filter("credentialSearch",function(){return function(credentials,filter){var _credentials=[];if(credentials){if(!filter)return credentials;if(""===filter.filterText.trim())return credentials;for(var ci=0;ci=0){_credentials.push(c);break}}else{var t=JSON.stringify(c[field]);if(t.indexOf(filter.filterText)>=0){_credentials.push(c);break}}}return _credentials}return[]}})}(),function(){angular.module("passmanApp").filter("propsFilter",function(){return function(items,props){var out=[];if(angular.isArray(items)){var keys=Object.keys(props);items.forEach(function(item){for(var itemMatches=!1,i=0;i0)for(var ci=0;ci=FOR_BITS.Length)throw"bad arguments";return FOR_BITS[a]};var L=new _cg(0,1,"L"),M=new _cg(1,0,"M"),Q=new _cg(2,3,"Q"),H=new _cg(3,2,"H"),FOR_BITS=new Array(M,L,H,Q);_dl._gn=function(c,h,s){if(c.length!=h._dp)throw"bad arguments";for(var k=h._bu(s),e=0,d=k._fb(),r=0;r=0;){var w=l[b]._dw.length;if(w==u)break;b--}b++;for(var g=u-k._bo,a=0,r=0;r7)throw"bad arguments";return _dx._dy[a]},_dx._dy=new Array(new _fg,new _fh,new _fi,new _fj,new _fk,new _fl,new _fm,new _fn),_az._bb=new _az(285),_az._bc=new _az(301),_az._bd=function(d,c){return d^c},Decoder={},Decoder.rsDecoder=new _db(_az._bb),Decoder.correctErrors=function(g,b){for(var d=g.length,f=new Array(d),e=0;ef[a][o][1]&&(f[a][o][1]=h)}}for(var m=new Array(c),b=0;b=i&&f>=e?(j=c[0],a=c[1],h=c[2]):e>=f&&e>=i?(j=c[1],a=c[0],h=c[2]):(j=c[2],a=c[0],h=c[1]),d(a,j,h)<0){var g=a;a=h,h=g}c[0]=a,c[1]=j,c[2]=h},function(root,factory){"function"==typeof define&&define.amd?define([],factory):"object"==typeof exports?module.exports=factory():root.download=factory()}(this,function(){return function download(data,strFileName,strMimeType){function dataUrlToBlob(strUrl){var parts=strUrl.split(/[:;,]/),type=parts[1],decoder="base64"==parts[2]?atob:decodeURIComponent,binData=decoder(parts.pop()),mx=binData.length,i=0,uiArr=new Uint8Array(mx);for(i;i2096103.424&&myBlob!==toString))return navigator.msSaveBlob?navigator.msSaveBlob(dataUrlToBlob(payload),fileName):saver(payload);payload=dataUrlToBlob(payload),mimeType=payload.type||defaultMime}if(blob=payload instanceof myBlob?payload:new myBlob([payload],{type:mimeType}),navigator.msSaveBlob)return navigator.msSaveBlob(blob,fileName);if(self.URL)saver(self.URL.createObjectURL(blob),!0);else{if("string"==typeof blob||blob.constructor===toString)try{return saver("data:"+mimeType+";base64,"+self.btoa(blob))}catch(y){return saver("data:"+mimeType+","+encodeURIComponent(blob))}reader=new FileReader,reader.onload=function(e){saver(this.result)},reader.readAsDataURL(blob)}return!0}}),angular.module("ui.sortable",[]).value("uiSortableConfig",{items:"> [ng-repeat],> [data-ng-repeat],> [x-ng-repeat]"}).directive("uiSortable",["uiSortableConfig","$timeout","$log",function(uiSortableConfig,$timeout,$log){return{require:"?ngModel",scope:{ngModel:"=",uiSortable:"="},link:function(scope,element,attrs,ngModel){function combineCallbacks(first,second){var firstIsFunc="function"==typeof first,secondIsFunc="function"==typeof second;return firstIsFunc&&secondIsFunc?function(){first.apply(this,arguments),second.apply(this,arguments)}:secondIsFunc?second:first}function getSortableWidgetInstance(element){var data=element.data("ui-sortable");return data&&"object"==typeof data&&"ui-sortable"===data.widgetFullName?data:null}function patchSortableOption(key,value){return callbacks[key]?("stop"===key&&(value=combineCallbacks(value,function(){scope.$apply()}),value=combineCallbacks(value,afterStop)),value=combineCallbacks(callbacks[key],value)):wrappers[key]&&(value=wrappers[key](value)),value||"items"!==key&&"ui-model-items"!==key||(value=uiSortableConfig.items),value}function patchUISortableOptions(newVal,oldVal,sortableWidgetInstance){function addDummyOptionKey(value,key){key in opts||(opts[key]=null)}angular.forEach(callbacks,addDummyOptionKey);var optsDiff=null;if(oldVal){var defaultOptions;angular.forEach(oldVal,function(oldValue,key){if(!(newVal&&key in newVal)){if(key in directiveOpts)return void("ui-floating"===key?opts[key]="auto":opts[key]=patchSortableOption(key,void 0));defaultOptions||(defaultOptions=angular.element.ui.sortable().options);var defaultValue=defaultOptions[key];defaultValue=patchSortableOption(key,defaultValue),optsDiff||(optsDiff={}),optsDiff[key]=defaultValue,opts[key]=defaultValue}})}return angular.forEach(newVal,function(value,key){return key in directiveOpts?("ui-floating"!==key||value!==!1&&value!==!0||!sortableWidgetInstance||(sortableWidgetInstance.floating=value),void(opts[key]=patchSortableOption(key,value))):(value=patchSortableOption(key,value),optsDiff||(optsDiff={}),optsDiff[key]=value,void(opts[key]=value))}),optsDiff}function getPlaceholderElement(element){var placeholder=element.sortable("option","placeholder");if(placeholder&&placeholder.element&&"function"==typeof placeholder.element){var result=placeholder.element();return result=angular.element(result)}return null}function getPlaceholderExcludesludes(element,placeholder){var notCssSelector=opts["ui-model-items"].replace(/[^,]*>/g,""),excludes=element.find('[class="'+placeholder.attr("class")+'"]:not('+notCssSelector+")");return excludes}function hasSortingHelper(element,ui){var helperOption=element.sortable("option","helper");return"clone"===helperOption||"function"==typeof helperOption&&ui.item.sortable.isCustomHelperUsed()}function getSortingHelper(element,ui,savedNodes){var result=null;return hasSortingHelper(element,ui)&&"parent"===element.sortable("option","appendTo")&&(result=savedNodes.last()),result}function isFloating(item){return/left|right/.test(item.css("float"))||/inline|table-cell/.test(item.css("display"))}function getElementScope(elementScopes,element){for(var result=null,i=0;i>24);tmp&&(ret+=tmp),tmp=this._isASCII((16711680&int)>>16),tmp&&(ret+=tmp),tmp=this._isASCII((65280&int)>>8),tmp&&(ret+=tmp),tmp=this._isASCII(255&int),tmp&&(ret+=tmp)}return ret},_isASCII:function(data){return data>31&&data<127&&String.fromCharCode(data)}},initEngines:function(default_paranoia){paranoia_level=default_paranoia||10,sjcl.random.setDefaultParanoia(this.paranoia_level),sjcl.random.startCollectors(),console.warn("Crypto stuff initialized")}};CRYPTO.initEngines(),function(){angular.module("passmanApp",["ngAnimate","ngCookies","ngResource","ngRoute","ngSanitize","ngTouch","templates-main","LocalStorageModule","offClick","ngPasswordMeter","ngclipboard","xeditable","ngTagsInput","angularjs-datetime-picker","ui.sortable","pascalprecht.translate"]).config(function($routeProvider){$routeProvider.when("/",{templateUrl:"views/vaults.html",controller:"VaultCtrl"}).when("/vault/:vault_id",{templateUrl:"views/show_vault.html",controller:"CredentialCtrl"}).when("/vault/:vault_id/new",{templateUrl:"views/edit_credential.html",controller:"CredentialEditCtrl"}).when("/vault/:vault_id/edit/:credential_id",{templateUrl:"views/edit_credential.html",controller:"CredentialEditCtrl"}).when("/vault/:vault_id/:credential_id/share",{templateUrl:"views/share_credential.html",controller:"ShareCtrl"}).when("/vault/:vault_id/:credential_id/revisions",{templateUrl:"views/credential_revisions.html",controller:"RevisionCtrl"}).when("/vault/:vault_id/settings",{templateUrl:"views/settings.html",controller:"SettingsCtrl"}).otherwise({redirectTo:"/"})}).config(["$httpProvider",function($httpProvider){$httpProvider.defaults.headers.common.requesttoken=oc_requesttoken}]).config(function(localStorageServiceProvider){localStorageServiceProvider.setNotify(!0,!0)}).config(function($translateProvider){$translateProvider.useSanitizeValueStrategy("sanitizeParameters"),$translateProvider.useUrlLoader(OC.generateUrl("/apps/passman/api/v2/language")),$translateProvider.preferredLanguage("en")}),jQuery(document).ready(function(){var findItemByID=function(id){var credentials,foundItem=!1;return credentials=angular.element("#app-content-wrapper").scope().credentials,angular.forEach(credentials,function(credential){credential.credential_id===id&&(foundItem=credential)}),foundItem};jQuery(document).on("click",".undoDelete",function(){var credential=findItemByID($(this).attr("data-item-id"));angular.element("#app-content-wrapper").scope().recoverCredential(credential),angular.element("#app-content-wrapper").scope().$apply()}),jQuery(document).on("click",".undoRestore",function(){var credential=findItemByID($(this).attr("data-item-id"));angular.element("#app-content-wrapper").scope().deleteCredential(credential),angular.element("#app-content-wrapper").scope().$apply()})})}(),function(){angular.module("passmanApp").filter("as",function($parse){return function(value,context,path){return $parse(path).assign(context,value)}})}(),function(){angular.module("passmanApp").filter("bytes",function(){return function(bytes,precision){if(isNaN(parseFloat(bytes))||!isFinite(bytes))return"-";"undefined"==typeof precision&&(precision=1);var units=["bytes","kB","MB","GB","TB","PB"],number=Math.floor(Math.log(bytes)/Math.log(1024));return(bytes/Math.pow(1024,Math.floor(number))).toFixed(precision)+" "+units[number]}})}(),function(){angular.module("passmanApp").filter("credentialSearch",function(){return function(credentials,filter){var _credentials=[];if(credentials){if(!filter)return credentials;if(""===filter.filterText.trim())return credentials;for(var ci=0;ci=0){_credentials.push(c);break}}else{var t=JSON.stringify(c[field]);if(t.indexOf(filter.filterText)>=0){_credentials.push(c);break}}}return _credentials}return[]}})}(),function(){angular.module("passmanApp").filter("propsFilter",function(){return function(items,props){var out=[];if(angular.isArray(items)){var keys=Object.keys(props);items.forEach(function(item){for(var itemMatches=!1,i=0;i0)for(var ci=0;ci0&&this.vaults.length>0){var _vault=angular.copy(this.vaults[this.current_index]);_vault.key=forge.util.encode64(_vault.public_sharing_key.encrypt(this.string)),this.data.push(_vault),this.current_index++,this.call_progress(this.current_index),setTimeout(workload.bind(this),1)}else this.call_then(this.data)};return new C_Promise(function(){this.data=[],this.vaults=vaults,this.string=string,this.current_index=0,setTimeout(workload.bind(this),0)})}}}])}(),function(){angular.module("passmanApp").service("TagService",["$filter",function($filter){var _tags=[];return{getTags:function(){return _tags},searchTag:function(string){return $filter("filter")(_tags,{text:string})},addTags:function(tags){for(var i=0;i");var btn="',angularBtn=angular.element(btn);elm.after(angularBtn),angularBtn.on("click",function(){elm.val("").trigger("change"),$parse(attr.ngModel).assign(scope,""),scope.$apply()}),elm.bind("focus keyup change paste propertychange",function(){elm.val()&&elm.val().length>0?angularBtn.removeClass("ng-hide"):angularBtn.addClass("ng-hide")})}}}])}(),function(){angular.module("passmanApp").directive("selectOnClick",["$window",function($window){return{restrict:"A",link:function(scope,element){element.on("click",function(){$window.getSelection().toString()||this.setSelectionRange(0,this.value.length)})}}}])}(),function(){angular.module("passmanApp").directive("colorFromString",[function(){return{restrict:"A",scope:{string:"=colorFromString"},link:function(scope,el){function genColor(str){for(var hash=0,i=0;i
*{{value}}
',link:function(scope){var expression=/(https?:\/\/(?:www\.|(?!www))[^\s\.]+\.[^\s]{2,}|www\.[^\s]+\.[^\s]{2,})/gi,regex=new RegExp(expression);$translate(["toggle.visibility","copy","copied"]).then(function(translations){scope.tggltxt=translations["toggle.visibility"],scope.copy_msg=translations["copy.field"]}),scope.$watch("value",function(){scope.value&&(scope.secret&&(scope.valueVisible=!1),scope.value.match(regex)&&(scope.isLink=!0))}),scope.toggle||scope.secret&&(scope.toggle=!0);var timer;scope.onSuccess=function(){scope.copy_msg=$translate.instant("copied"),$timeout.cancel(timer),timer=$timeout(function(){scope.copy_msg=$translate.instant("copy")},5e3)},scope.valueVisible=!0,scope.toggleVisibility=function(){scope.valueVisible=!scope.valueVisible}}}}])}(),function(){angular.module("passmanApp").directive("fileSelect",["$window",function($window){return{restrict:"A",scope:{success:"&success",error:"&error",progress:"&progress"},link:function(scope,el){scope.success=scope.success(),scope.error=scope.error(),scope.progress=scope.progress();var _currentFile,fileReader=new $window.FileReader;fileReader.onload=function(){_currentFile.data=fileReader.result,scope.success(_currentFile)},fileReader.onprogress=function(event){var percent=event.loaded/event.total*100;scope.$apply(scope.progress({file_total:event.total,file_loaded:event.loaded,file_percent:percent}))},fileReader.onerror=function(){scope.error()},el.bind("change",function(e){var i,_queueTotalFileSize=0;for(i=0;i1024*mb_limit*1024&&scope.error("TO_BIG",_currentFile),fileReader.readAsDataURL(_currentFile)}})}}}])}(),function(){angular.module("passmanApp").directive("ngEnter",function(){return function(scope,element,attrs){element.bind("keydown keypress",function(event){13===event.which&&(scope.$apply(function(){scope.$eval(attrs.ngEnter)}),event.preventDefault())})}})}(),function(){angular.module("passmanApp").directive("otpGenerator",["$compile","$timeout",function($compile,$timeout){function dec2hex(s){return(s<15.5?"0":"")+Math.round(s).toString(16)}function hex2dec(s){return parseInt(s,16)}function base32tohex(base32){if(base32){var i,base32chars="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bits="",hex="";for(i=0;i=str.length&&(str=Array(len+1-str.length).join(pad)+str),str}return{restrict:"A",template:' ',transclude:!1,scope:{secret:"="},replace:!0,link:function(scope){scope.otp=null,scope.timeleft=null,scope.timer=null;var updateOtp=function(){if(scope.secret){var key=base32tohex(scope.secret),epoch=Math.round((new Date).getTime()/1e3),time=leftpad(dec2hex(Math.floor(epoch/30)),16,"0"),hmacObj=new jsSHA(time,"HEX"),hmac=hmacObj.getHMAC(key,"HEX","SHA-1","HEX"),offset=hex2dec(hmac.substring(hmac.length-1)),otp=(hex2dec(hmac.substr(2*offset,8))&hex2dec("7fffffff"))+"";otp=otp.substr(otp.length-6,6),scope.otp=otp}},timer=function(){var epoch=Math.round((new Date).getTime()/1e3),countDown=30-epoch%30;epoch%30===0&&updateOtp(),scope.timeleft=countDown,scope.timer=$timeout(timer,1e3)};scope.$watch("secret",function(n){n?($timeout.cancel(scope.timer),updateOtp(),timer()):$timeout.cancel(scope.timer)},!0),scope.$on("$destroy",function(){$timeout.cancel(scope.timer)})}}}])}(),function(){angular.module("passmanApp").directive("passwordGen",function($timeout,$translate){function Arcfour(){this.j=this.i=0,this.S=[]}function ARC4init(r){var t,n,e;for(t=0;256>t;++t)this.S[t]=t;for(t=n=0;256>t;++t)n=n+this.S[t]+r[t%r.length]&255,e=this.S[t],this.S[t]=this.S[n],this.S[n]=e;this.j=this.i=0}function ARC4next(){var r;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,r=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=r,this.S[r+this.S[this.i]&255]}function prng_newstate(){return new Arcfour}function generatePassword(r,t,n,e,o,i,p,g){var _,a,s,f,d,h,u,l,c,v,w,y,m;if(void 0===r&&(r=8+get_random(0,1)),r>256&&(r=256,document.getElementById("length").value=256),i>256&&(i=256),void 0===t&&(t=!0),void 0===n&&(n=!0),void 0===e&&(e=!0),void 0===o&&(o=!1),void 0===i&&(i=0),void 0===p&&(p=!1),void 0===g&&(g=!0),_=0,a=0,s=0,g&&(_=a=s=1),f=[],n&&_>0)for(d=0;_>d;d++)f[f.length]="L";if(t&&a>0)for(d=0;a>d;d++)f[f.length]="U";if(e&&i>0)for(d=0;i>d;d++)f[f.length]="D";if(o&&s>0)for(d=0;s>d;d++)f[f.length]="S";for(;f.lengthy;y++){switch(f[y]){case"L":m=u;break;case"U":m=l;break;case"D":m=c;break;case"S":m=v;break;case"A":m=h}d=get_random(0,m.length-1),w+=m.charAt(d)}return w}function rng_seed_int(r){rng_pool[rng_pptr++]^=255&r,rng_pool[rng_pptr++]^=r>>8&255,rng_pool[rng_pptr++]^=r>>16&255,rng_pool[rng_pptr++]^=r>>24&255,rng_pptr>=rng_psize&&(rng_pptr-=rng_psize)}function rng_seed_time(){rng_seed_int((new Date).getTime())}function rng_get_byte(){if(null==rng_state){for(rng_seed_time(),rng_state=prng_newstate(),rng_state.init(rng_pool),rng_pptr=0;rng_pptre;e++)n[e]=0;for(rng_get_bytes(n),o=0,e=0;4>e;e++)o*=256,o+=n[e];return o%=i,o+=r}var rng_psize,rng_state,rng_pool,rng_pptr,t,z,crypt_obj,num,buf,i;if(Arcfour.prototype.init=ARC4init,Arcfour.prototype.next=ARC4next,rng_psize=256,null==rng_pool){if(rng_pool=[],rng_pptr=0,"undefined"!=typeof navigator&&"Netscape"==navigator.appName&&navigator.appVersion<"5"&&"undefined"!=typeof window&&window.crypto)for(z=window.crypto.random(32),t=0;trng_pptr)for(num=Math.floor((rng_psize-rng_pptr)/2)+1,buf=new Uint16Array(num),crypt_obj.getRandomValues(buf),i=0;i>>8,rng_pool[rng_pptr++]=255&t}catch(e){}for(;rng_psize>rng_pptr;)t=Math.floor(65536*Math.random()),rng_pool[rng_pptr++]=t>>>8,rng_pool[rng_pptr++]=255&t;rng_pptr=0,rng_seed_time()}return SecureRandom.prototype.nextBytes=rng_get_bytes,{scope:{model:"=ngModel",length:"@",placeholder:"@",settings:"=settings",callback:"&callback"},restrict:"E",replace:"true",template:'
',link:function(scope){scope.callback=scope.callback(),scope.$watch("model",function(){scope.password=scope.model}),scope.passwordVisible=!1,scope.toggleVisibility=function(){scope.passwordVisible=!scope.passwordVisible},scope.passwordNotNull=!1,scope.$watch("settings",function(){scope.settings&&!scope.password&&scope.settings.generateOnCreate&&scope.generatePasswordStart()}),$translate(["password.gen","password.copy","copied","toggle.visibility"]).then(function(translations){scope.tggltxt=translations["toggle.visibility"],scope.copy_msg=translations["password.copy"],scope.gen_msg=translations["password.gen"]}),scope.$watch("password",function(){scope.model=scope.password,scope.password_repeat=scope.model}),scope.onSuccess=function(e){OC.Notification.showTemporary($translate.instant("password.copied")),e.clearSelection()},scope.onError=function(){OC.Notification.showTemporary("Press Ctrl+C to copy!")},scope.progressDivShow=!1,scope.generatePasswordStart=function(){scope.progressDivShow=!0,scope.progressValue=0,scope.progressWidth={width:scope.progressValue+"%"},scope.generatePasswordProgress()},scope.generatePasswordProgress=function(){$timeout(function(){scope.progressValue<100?(scope.password=scope._generatePassword(scope.settings),scope.progressValue+=10,scope.progressWidth={width:scope.progressValue+"%"},scope.disabled=!0,scope.generatePasswordProgress()):(scope.disabled=!1,scope.callback&&scope.callback(scope.password))},10)},scope._generatePassword=function(settings){var _settings={length:12,useUppercase:!0,useLowercase:!0,useDigits:!0,useSpecialChars:!0,minimumDigitCount:3,avoidAmbiguousCharacters:!1,requireEveryCharType:!0};settings=angular.merge(_settings,settings);var password=generatePassword(settings.length,settings.useUppercase,settings.useLowercase,settings.useDigits,settings.useSpecialChars,settings.minimumDigitCount,settings.avoidAmbiguousCharacters,settings.requireEveryCharType);return password}}}})}(),function(){angular.module("passmanApp").directive("progressBar",["$translate",function($translate){return{restrict:"A",template:'
{{progress}}% {{completed_text}}{{index}} / {{total}}{{progress}}%
',scope:{progress:"=progressBar",index:"=index",total:"=total"},link:function(scope){$translate(["complete"]).then(function(translations){scope.completed_text=translations.complete})}}}])}(),function(){angular.module("passmanApp").directive("qrread",["$parse",function($parse){return{scope:!0,link:function(scope,element,attributes){var invoker=$parse(attributes.onRead);scope.imageData=null,qrcode.callback=function(result){invoker(scope,{qrdata:{qrData:result,image:scope.imageData}})},element.bind("change",function(changeEvent){var reader=new FileReader,file=changeEvent.target.files[0];reader.readAsDataURL(file),reader.onload=function(){return function(e){scope.imageData=e.target.result,qrcode.decode(e.target.result)}}(file)})}}}])}(),function(){angular.module("passmanApp").directive("tooltip",[function(){return{restrict:"A",scope:{tooltip:"=tooltip"},link:function(scope,el){scope.$watch("tooltip",function(){scope.tooltip&&(jQuery(el).attr("title",scope.tooltip),jQuery(el).tooltip(),jQuery(el).attr("title",scope.tooltip).tooltip("fixTitle"),jQuery(".tooltip-inner").text(scope.tooltip),jQuery(el).is(":visible"))})}}}])}(),function(){angular.module("passmanApp").directive("useTheme",[function(){function invertColor(hexTripletColor){var color=hexTripletColor;return color=color.substring(1),color=parseInt(color,16),color^=16777215,color=color.toString(16),color=("000000"+color).slice(-6),color="#"+color}return{restrict:"A",scope:{type:"=type",color:"=",negative:"="},link:function(scope,el){var _color=jQuery("#header").css("background-color"),_bg=_color;scope.negative&&(_bg=invertColor(_bg)),scope.type?jQuery(el).css(scope.type,_bg):jQuery(el).css("background-color",_bg),scope.color&&jQuery(el).css("color",invertColor(_color))}}}])}();var PassmanImporter={};!function(window,$,PassmanImporter){PassmanImporter.parseRow_=function(row){row=row.trim();var isQuoted=!1;return'"'==row.charAt(0)&&(row=row.substring(1),isQuoted=!0),'"'==row.charAt(row.length-2)&&(row=row.substring(0,row.length-2),isQuoted=!0),row=isQuoted===!0?row.split('","'):row.split(",")},PassmanImporter.htmlDecode=function(input){var e=document.createElement("div");return e.innerHTML=input,e.childNodes[0].nodeValue},PassmanImporter.toObject_=function(headings,row){for(var result={},i=0,ii=row.length;i Export -> Download HTML + JSON. Fields will be imported as custom fields."}},PassmanImporter.clippers.readFile=function(file_data){return new C_Promise(function(){var credential_list=[],re=/