function scrypt(t,r,n,o,e,f,i,u){"use strict";function s(r){var g=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],w=1779033703,d=3144134277,m=1013904242,A=2773480762,N=1359893119,E=2600822924,b=528734635,I=1541459225,j=new Array(64);function n(r){for(var n=0,t=r.length;64<=t;){var e,o,f,i,u,a=w,s=d,h=m,c=A,p=N,l=E,v=b,y=I;for(o=0;o<16;o++)f=n+4*o,j[o]=(255&r[f])<<24|(255&r[f+1])<<16|(255&r[f+2])<<8|255&r[f+3];for(o=16;o<64;o++)i=((e=j[o-2])>>>17|e<<15)^(e>>>19|e<<13)^e>>>10,u=((e=j[o-15])>>>7|e<<25)^(e>>>18|e<<14)^e>>>3,j[o]=(i+j[o-7]|0)+(u+j[o-16]|0)|0;for(o=0;o<64;o++)i=(((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+(p&l^~p&v)|0)+(y+(g[o]+j[o]|0)|0)|0,u=((a>>>2|a<<30)^(a>>>13|a<<19)^(a>>>22|a<<10))+(a&s^a&h^s&h)|0,y=v,v=l,l=p,p=c+i|0,c=h,h=s,s=a,a=i+u|0;w=w+a|0,d=d+s|0,m=m+h|0,A=A+c|0,N=N+p|0,E=E+l|0,b=b+v|0,I=I+y|0,n+=64,t-=64}}n(r);var t,e=r.length%64,o=r.length/536870912|0,f=r.length<<3,i=e<56?56:120,u=r.slice(r.length-e,r.length);for(u.push(128),t=e+1;t>>24&255),u.push(o>>>16&255),u.push(o>>>8&255),u.push(o>>>0&255),u.push(f>>>24&255),u.push(f>>>16&255),u.push(f>>>8&255),u.push(f>>>0&255),n(u),[w>>>24&255,w>>>16&255,w>>>8&255,w>>>0&255,d>>>24&255,d>>>16&255,d>>>8&255,d>>>0&255,m>>>24&255,m>>>16&255,m>>>8&255,m>>>0&255,A>>>24&255,A>>>16&255,A>>>8&255,A>>>0&255,N>>>24&255,N>>>16&255,N>>>8&255,N>>>0&255,E>>>24&255,E>>>16&255,E>>>8&255,E>>>0&255,b>>>24&255,b>>>16&255,b>>>8&255,b>>>0&255,I>>>24&255,I>>>16&255,I>>>8&255,I>>>0&255]}function a(r,n,t){64>>25)+E)<<9|o>>>23)+x)<<13|o>>>19)+k)<<18|o>>>14,C^=(o=(b^=(o=(z^=(o=(S^=(o=C+b)<<7|o>>>25)+C)<<9|o>>>23)+S)<<13|o>>>19)+z)<<18|o>>>14,T^=(o=(L^=(o=(I^=(o=(B^=(o=T+L)<<7|o>>>25)+T)<<9|o>>>23)+B)<<13|o>>>19)+I)<<18|o>>>14,D^=(o=(U^=(o=(M^=(o=(j^=(o=D+U)<<7|o>>>25)+D)<<9|o>>>23)+j)<<13|o>>>19)+M)<<18|o>>>14,E^=(o=(j^=(o=(I^=(o=(b^=(o=E+j)<<7|o>>>25)+E)<<9|o>>>23)+b)<<13|o>>>19)+I)<<18|o>>>14,C^=(o=(x^=(o=(M^=(o=(L^=(o=C+x)<<7|o>>>25)+C)<<9|o>>>23)+L)<<13|o>>>19)+M)<<18|o>>>14,T^=(o=(S^=(o=(k^=(o=(U^=(o=T+S)<<7|o>>>25)+T)<<9|o>>>23)+U)<<13|o>>>19)+k)<<18|o>>>14,D^=(o=(B^=(o=(z^=(o=(q^=(o=D+B)<<7|o>>>25)+D)<<9|o>>>23)+q)<<13|o>>>19)+z)<<18|o>>>14;n[e++]=r[0]=E+i|0,n[e++]=r[1]=b+u|0,n[e++]=r[2]=I+a|0,n[e++]=r[3]=j+s|0,n[e++]=r[4]=x+h|0,n[e++]=r[5]=C+c|0,n[e++]=r[6]=L+p|0,n[e++]=r[7]=M+l|0,n[e++]=r[8]=k+v|0,n[e++]=r[9]=S+y|0,n[e++]=r[10]=T+g|0,n[e++]=r[11]=U+w|0,n[e++]=r[12]=q+d|0,n[e++]=r[13]=z+m|0,n[e++]=r[14]=B+A|0,n[e++]=r[15]=D+N|0}function c(r,n,t,e,o){for(;o--;)r[n++]=t[e++]}function p(r,n,t,e,o){for(;o--;)r[n++]^=t[e++]}function l(r,n,t,e,o){c(r,0,n,t+16*(2*o-1),16);for(var f=0;f<2*o;f+=2)h(r,n,t+16*f,e+8*f),h(r,n,t+16*f+16,e+8*f+16*o)}function v(r,n,t){return r[n+16*(2*t-1)]}function y(r){for(var n=[],t=0;t>6),n.push(128|63&e);else if(e<55296)n.push(224|e>>12),n.push(128|e>>6&63),n.push(128|63&e);else{if(t>=r.length-1)throw new Error("invalid string");t++,e=(1023&e)<<10,e|=1023&r.charCodeAt(t),e+=65536,n.push(240|e>>18),n.push(128|e>>12&63),n.push(128|e>>6&63),n.push(128|63&e)}}return n}var g=-1>>>0,w=1;if("object"==typeof n){if(4g)throw new Error("scrypt: N is out of range");if(0!=(d.N&d.N-1))throw new Error("scrypt: N is not a power of 2");n=Math.log(d.N)/Math.LN2}w=d.p||1,o=d.r,e=d.dkLen||32,f=d.interruptStep||0,u=d.encoding}if(w<1)throw new Error("scrypt: invalid p");if(o<=0)throw new Error("scrypt: invalid r");if(n<1||31>>0;if(1<<30<=o*w||g/128/w>>0&255,N[r+4*n+1]=t>>>8&255,N[r+4*n+2]=t>>>16&255,N[r+4*n+3]=t>>>24&255}}var k="undefined"!=typeof setImmediate?setImmediate:setTimeout;function S(r,n,t,e,o){!function f(){k(function(){e(r,r+t>>18&63]),o.push(t[n>>>12&63]),o.push(t[n>>>6&63]),o.push(t[n>>>0&63]);return 0>>4&15]),e.push(n[r[o]>>>0&15]);return e.join("")}(n):"binary"===r?new Uint8Array(n):n}"function"==typeof f&&(u=i,i=f,f=1e3),f<=0?function U(){for(var r=0;r