!function(r){"use strict";functionn(r,n){returnr<<n|r>>>32-n}functione(r,n){vare=255&r[n+3];returne=e<<8|255&r[n+2],e=e<<8|255&r[n+1],e<<8|255&r[n+0]}functiont(r,n){vare=r[n]<<24|r[n+1]<<16|r[n+2]<<8|r[n+3],t=r[n+4]<<24|r[n+5]<<16|r[n+6]<<8|r[n+7];returnnewsr(e,t)}functiono(r,n,e){vart;for(t=0;t<4;t++)r[n+t]=255&e,e>>>=8}functioni(r,n,e){r[n]=e.hi>>24&255,r[n+1]=e.hi>>16&255,r[n+2]=e.hi>>8&255,r[n+3]=255&e.hi,r[n+4]=e.lo>>24&255,r[n+5]=e.lo>>16&255,r[n+6]=e.lo>>8&255,r[n+7]=255&e.lo}functiona(r,n,e,t,o){vari,a=0;for(i=0;i<o;i++)a|=r[n+i]^e[t+i];return(1&a-1>>>8)-1}functionf(r,n,e,t){returna(r,n,e,t,16)}functionu(r,n,e,t){returna(r,n,e,t,32)}functionc(r,t,i,a,f){varu,c,w,y=newUint32Array(16),l=newUint32Array(16),s=newUint32Array(16),h=newUint32Array(4);for(u=0;u<4;u++)l[5*u]=e(a,4*u),l[1+u]=e(i,4*u),l[6+u]=e(t,4*u),l[11+u]=e(i,16+4*u);for(u=0;u<16;u++)s[u]=l[u];for(u=0;u<20;u++){for(c=0;c<4;c++){for(w=0;w<4;w++)h[w]=l[(5*c+4*w)%16];for(h[1]^=n(h[0]+h[3]|0,7),h[2]^=n(h[1]+h[0]|0,9),h[3]^=n(h[2]+h[1]|0,13),h[0]^=n(h[3]+h[2]|0,18),w=0;w<4;w++)y[4*c+(c+w)%4]=h[w]}for(w=0;w<16;w++)l[w]=y[w]}if(f){for(u=0;u<16;u++)l[u]=l[u]+s[u]|0;for(u=0;u<4;u++)l[5*u]=l[5*u]-e(a,4*u)|0,l[6+u]=l[6+u]-e(t,4*u)|0;for(u=0;u<4;u++)o(r,4*u,l[5*u]),o(r,16+4*u,l[6+u])}elsefor(u=0;u<16;u++)o(r,4*u,l[u]+s[u]|0)}functionw(r,n,e,t){returnc(r,n,e,t,!1),0}functiony(r,n,e,t){returnc(r,n,e,t,!0),0}functionl(r,n,e,t,o,i,a){varf,u,c=newUint8Array(16),y=newUint8Array(64);if(!o)return0;for(u=0;u<16;u++)c[u]=0;for(u=0;u<8;u++)c[u]=i[u];for(;o>=64;){for(w(y,c,a,Br),u=0;u<64;u++)r[n+u]=(e?e[t+u]:0)^y[u];for(f=1,u=8;u<16;u++)f=f+(255&c[u])|0,c[u]=255&f,f>>>=8;o-=64,n+=64,e&&(t+=64)}if(o>0)for(w(y,c,a,Br),u=0;u<o;u++)r[n+u]=(e?e[t+u]:0)^y[u];return0}functions(r,n,e,t,o){returnl(r,n,null,0,e,t,o)}functionh(r,n,e,t,o){vari=newUint8Array(32);returny(i,t,o,Br),s(r,n,e,t.subarray(16),i)}functiong(r,n,e,t,o,i,a){varf=newUint8Array(32);returny(f,i,a,Br),l(r,n,e,t,o,i.subarray(16),f)}functionv(r,n){vare,t=0;for(e=0;e<17;e++)t=t+(r[e]+n[e]|0)|0,r[e]=255&t,t>>>=8}functionb(r,n,e,t,o,i){vara,f,u,c,w=newUint32Array(17),y=newUint32Array(17),l=newUint32Array(17),s=newUint32Array(17),h=newUint32Array(17);for(u=0;u<17;u++)y[u]=l[u]=0;for(u=0;u<16;u++)y[u]=i[u];for(y[3]&=15,y[4]&=252,y[7]&=15,y[8]&=252,y[11]&=15,y[12]&=252,y[15]&=15;o>0;){for(u=0;u<17;u++)s[u]=0;for(u=0;u<16&&u<o;++u)s[u]=e[t+u];for(s[u]=1,t+=u,o-=u,v(l,s),f=0;f<17;f++)for(w[f]=0,u=0;u<17;u++)w[f]=w[f]+l[u]*(u<=f?y[f-u]:320*y[f+17-u]|0)|0|0;for(f=0;f<17;f++)l[f]=w[f];for(c=0,u=0;u<16;u++)c=c+l[u]|0,l[u]=255&c,c>>>=8;for(c=c+l[16]|0,l[16]=3&c,c=5*(c>>>2)|0,u=0;u<16;u++)c=c+l[u]|0,l[u]=255&c,c>>>=8;c=c+l[16]|0,l[16]=c}for(u=0;u<17;u++)h[u]=l[u];for(v(l,Sr),a=0|-(l[16]>>>7),u=0;u<17;u++)l[u]^=a&(h[u]^l[u]);for(u=0;u<16;u++)s[u]=i[u+16];for(s[16]=0,v(l,s),u=0;u<16;u++)r[n+u]=l[u];return0}functionp(r,n,e,t,o,i){vara=newUint8Array(16);returnb(a,0,e,t,o,i),f(r,n,a,0)}function_(r,n,e,t,o){vari;if(e<32)return-1;for(g(r,0,n,0,e,t,o),b(r,16,r,32,e-32,r),i=0;i<16;i++)r[i]=0;return0}functionA(r,n,e,t,o){vari,a=newUint8Array(32);if(e<32)return-1;if(h(a,0,32,t,o),0!==p(n,16,n,32,e-32,a))return-1;for(g(r,0,n,0,e,t,o),i=0;i<32;i++)r[i]=0;return0}functionU(r,n){vare;for(e=0;e<16;e++)r[e]=0|n[e]}functionE(r){varn,e;for(e=0;e<16;e++)r[e]+=65536,n=Math.floor(r[e]/65536),r[(e+1)*(e<15?1:0)]+=n-1+37*(n-1)*(15===e?1:0),r[e]-=65536*n}functiond(r,n,e){for(vart,o=~(e-1),i=0;i<16;i++)t=o&(r[i]^n[i]),r[i]^=t,n[i]^=t}functionx(r,n){vare,t,o,i=hr(),a=hr();for(e=0;e<16;e++)a[e]=n[e];for(E(a),E(a),E(a),t=0;t<2;t++){for(i[0]=a[0]-65517,e=1;e<15;e++)i[e]=a[e]-65535-(i[e-1]>>16&1),i[e-1]&=65535;i[15]=a[15]-32767-(i[14]>>16&1),o=i[15]>>16&1,i[14]&=65535,d(a,i,1-o)}for(e=0;e<16;e++)r[2*e]=255&a[e],r[2*e+1]=a[e]>>8}functionm(r,n){vare=newUint8Array(32),t=newUint8Array(32);returnx(e,r),x(t,n),u(e,0,t,0)}functionB(r){varn=newUint8Array(32);returnx(n,r),1&n[0]}functionS(r,n){vare;for(e=0;e<16;e++)r[e]=n[2*e]+(n[2*e+1]<<8);r[15]&=32767}functionK(r,n,e){vart;for(t=0;t<16;t++)r[t]=n[t]+e[t]|0}functionT(r,n,e){vart;for(t=0;t<16;t++)r[t]=n[t]-e[t]|0}functionY(r,n,e){vart,o,i=newFloat64Array(31);for(t=0;t<31;t++)i[t]=0;for(t=0;t<16;t++)for(o=0;o<16;o++)i[t+o]+=n[t]*e[o];for(t=0;t<15;t++)i[t]+=38*i[t+16];for(t=0;t<16;t++)r[t]=i[t];E(r),E(r)}functionL(r,n){Y(r,n,n)}functionk(r,n){vare,t=hr();for(e=0;e<16;e++)t[e]=n[e];for(e=253;e>=0;e--)L(t,t),2!==e&&4!==e&&Y(t,t,n);for(e=0;e<16;e++)r[e]=t[e]}functionz(r,n){vare,t=hr();for(e=0;e<16;e++)t[e]=n[e];for(e=250;e>=0;e--)L(t,t),1!==e&&Y(t,t,n);for(e=0;e<16;e++)r[e]=t[e]}functionR(r,n,e){vart,o,i=newUint8Array(32),a=newFloat64Array(80),f=hr(),u=hr(),c=hr(),w=hr(),y=hr(),l=hr();for(o=0;o<31;o++)i[o]=n[o];for(i[31]=127&n[31]|64,i[0]&=248,S(a,e),o=0;o<16;o++)u[o]=a[o],w[o]=f[o]=c[o]=0;for(f[0]=w[0]=1,o=254;o>=0;--o)t=i[o>>>3]>>>(7&o)&1,d(f,u,t),d(c,w,t),K(y,f,c),T(f,f,c),K(c,u,w),T(u,u,w),L(w,y),L(l,f),Y(f,c,f),Y(c,u,y),K(y,f,c),T(f,f,c),L(u,f),T(c,w,l),Y(f,c,Ar),K(f,f,w),Y(c,c,f),Y(f,w,l),Y(w,u,a),L(u,y),d(f,u,t),d(c,w,t);for(o=0;o<16;o++)a[o+16]=f[o],a[o+32]=c[o],a[o+48]=u[o],a[o+64]=w[o];vars=a.subarray(32),h=a.subarray(16);returnk(s,s),Y(h,h,s),x(r,h),0}functionP(r,n){returnR(r,n,br)}functionO(r,n){returngr(n,32),P(r,n)}functionF(r,n,e){vart=newUint8Array(32);returnR(t,e,n),y(r,vr,t,Br)}functionN(r,n,e,t,o,i){vara=newUint8Array(32);returnF(a,o,i),Kr(r,n,e,t,a)}functionC(r,n,e,t,o,i){vara=newUint8Array(32);returnF(a,o,i),Tr(r,n,e,t,a)}functionM(){varr,n,e,t=0,o=0,i=0,a=0,f=65535;for(e=0;e<arguments.length;e++)r=arguments[e].lo,n=arguments[e].hi,t+=r&f,o+=r>>>16,i+=n&f,a+=n>>>16;returno+=t>>>16,i+=o>>>16,a+=i>>>16,newsr(i&f|a<<16,t&f|o<<16)}functionG(r,n){returnnewsr(r.hi>>>n,r.lo>>>n|r.hi<<32-n)}functionZ(){varr,n=0,e=0;for(r=0;r<arguments.length;r++)n^=arguments[r].lo,e^=arguments[r].hi;returnnewsr(e,n)}functionj(r,n){vare,t,o=32-n;returnn<32?(e=r.hi>>>n|r.lo<<o,t=r.lo>>>n|r.hi<<o):n<64&&(e=r.lo>>>n|r.hi<<o,t=r.hi>>>n|r.lo<<o),newsr(e,t)}functionq(r,n,e){vart=r.hi&n.hi^~r.hi&e.hi,o=r.lo&n.lo^~r.lo&e.lo;returnnewsr(t,o)}functionI(r,n,e){vart=r.hi&n.hi^r.hi&e.hi^n.hi&e.hi,o=r.lo&n.lo^r.lo&e.lo^n.lo&e.lo;returnnewsr(t,o)}functionV(r){returnZ(j(r,28),j(r,34),j(r,39))}functionX(r){returnZ(j(r,14),j(r,18),j(r,41))}functionD(r){returnZ(j(r,1),j(r,8),G(r,7))}functionH(r){returnZ(j(r,19),j(r,61),G(r,6))}functionJ(r,n,e){varo,a,f,u=[],c=[],w=[],y=[];for(a=0;a<8;a++)u[a]=w[a]=t(r,8*a);for(varl=0;e>=128;){for(a=0;a<16;a++)y[a]=t(n,8*a+l);for(a=0;a<80;a++){for(f=0;f<8;f++)c[f]=w[f];for(o=M(w[7],X(w[4]),q(w[4],w[5],w[6]),Yr[a],y[a%16]),c[7]=M(o,V(w[0]),I(w[0],w[1],w[2])),c[3]=M(c[3],o),f=0;f<8;f++)w[(f+1)%8]=c[f];if(a%16===15)for(f=0;f<16;f++)y[f]=M(y[f],y[(f+9)%16],D(y[(f+1)%16]),H(y[(f+14)%16]))}for(a=0;a<8;a++)w[a]=M(w[a],u[a]),u[a]=w[a];l+=128,e-=128}for(a=0;a<8;a++)i(r,8*a,u[a]);returne}functionQ(r,n,e){vart,o=newUint8Array(64),a=newUint8Array(256),f=e;for(t=0;t<64;t++)o[t]=Lr[t];for(J(o,n,e),e%=128,t=0;t<256;t++)a[t]=0;for(t=0;t<e;t++)a[t]=n[f-e+t];for(a[e]=128,e=256-128*(e<112?1:0),a[e-9]=0,i(a,e-8,newsr(f/536870912|0,f<<3)),J(o,a,e),t=0;t<64;t++)r[t]=o[t];return0}functionW(r,n){vare=hr(),t=hr(),o=hr(),i=hr(),a=hr(),f=hr(),u=hr(),c=hr(),w=hr();T(e,r[1],r[0]),T(w,n[1],n[0]),Y(e,e,w),K(t,r[0],r[1]),K(w,n[0],n[1]),Y(t,t,w),Y(o,r[3],n[3]),Y(o,o,Er),Y(i,r[2],n[2]),K(i,i,i),T(a,t,e),T(f,i,o),K(u,i,o),K(c,t,e),Y(r[0],a,f),Y(r[1],c,u),Y(r[2],u,f),Y(r[3],a,c)}function$(r,n,e){vart;for(t=0;t<4;t++)d(r[t],n[t],e)}functionrr(r,n){vare=hr(),t=hr(),o=hr();k(o,n[2]),Y(e,n[0],o),Y(t,n[1],o),x(r,t),r[31]^=B(e)<<7}functionnr(r,n,e){vart,o;for(U(r[0],pr),U(r[1],_r),U(r[2],_r),U(r[3],pr),o=255;o>=0;--o)t=e[o/8|0]>>(7&o)&1,$(r,n,t),W(n,r),W(r,r),$(r,n,t)}functioner(r,n){vare=[hr(),hr(),hr(),hr()];U(e[0],dr),U(e[1],xr),U(e[2],_r),Y(e[3],dr,xr),nr(r,e,n)}functiontr(r,n,e){vart,o=newUint8Array(64),i=[hr(),hr(),hr(),hr()];for(e||gr(n,32),Q(o,n,32),o[0]&=248,o[31]&=127,o[31]|=64,er(i,o),rr(r,i),t=0;t<32;t++)n[t+32]=r[t];return0}functionor(r,n){vare,t,o,i;for(t=63;t>=32;--t){for(e=0,o=t-32,i=t-12;o<i;++o)n[o]+=e-16*n[t]*kr[o-(t-32)],e=n[o]+128>>8,n[o]-=256*e;n[o]+=e,n[t]=0}for(e=0,o=0;o<32;o++)n[o]+=e-(n[31]>>4)*kr[o],e=n[o]>>8,n[o]&=255;for(o=0;o<32;o++)n[o]-=e*kr[o];for(t=0;t<32;t++)n[t+1]+=n[t]>>8,r[t]=255&n[t]}functionir(r){varn,e=newFloat64Array(64);for(n=0;n<64;n++)e[n]=r[n];for(n=0;n<64;n++)r[n]=0;or(r,e)}functionar(r,n,e,t){varo,i,a=newUint8Array(64),f=newUint8Array(64),u=newUint8Array(64),c=newFloat64Array(64),w=[hr(),hr(),hr(),hr()];Q(a,t,32),a[0]&=248,a[31]&=127,a[31]|=64;vary=e+64;for(o=0;o<e;o++)r[64+o]=n[o];for(o=0;o<32;o++)r[32+o]=a[32+o];for(Q(u,r.subarray(32),e+32),ir(u),er(w,u),rr(r,w),o=32;o<64;o++)r[o]=t[o];for(Q(f,r,e+64),ir(f),o=0;o<64;o++)c[o]=0;for(o=0;o<32;o++)c[o]=u[o];for(o=0;o<32;o++)for(i=0;i<32;i++)c[o+i]+=f[o]*a[i];returnor(r.subarray(32),c),y}functionfr(r,n){vare=hr(),t=hr(),o=hr(),i=hr(),a=hr(),f=hr(),u=hr();returnU(r[2],_r),S(r[1],n),L(o,r[1]),Y(i,o,Ur),T(o,o,r[2]),K(i,r[2],i),L(a,i),L(f,a),Y(u,f,a),Y(e,u,o),Y(e,e,i),z(e,e),Y(e,e,o),Y(e,e,i),Y(e,e,i),Y(r[0],e,i),L(t,r[0]),Y(t,t,i),m(t,o)&&Y(r[0],r[0],mr),L(t,r[0]),Y(t,t,i),m(t,o)?-1:(B(r[0])===n[31]>>7&&T(r[0],pr,r[0]),Y(r[3],r[0],r[1]),0)}functionur(r,n,e,t){varo,i,a=newUint8Array(32),f=newUint8Array(64),c=[hr(),hr(),hr(),hr()],w=[hr(),hr(),hr(),hr()];if(i=-1,e<64)return-1;if(fr(w,t))return-1;for(o=0;o<e;o++)r[o]=n[o];for(o=0;o<32;o++)r[o+32]=t[o];if(Q(f,r,e),ir(f),nr(c,w,f),er(w,n.subarray(32)),W(c,w),rr(a,c),e-=64,u(n,0,a,0)){for(o=0;o<e;o++)r[o]=0;return-1}for(o=0;o<e;o++)r[o]=n[o+64];returni=e}functioncr(r,n){if(r.length!==zr)thrownewError("bad key size");if(n.length!==Rr)thrownewError("bad nonce size")}functionwr(r,n){if(r.length!==Cr)thrownewError("bad public key size");if(n.length!==Mr)thrownewError("bad secret key size")}functionyr(){varr,n;for(n=0;n<arguments.length;n++)if("[object Uint8Array]"!==(r=Object.prototype.toString.call(arguments[n])))thrownewTypeError("unexpected type "+r+", use Uint8Array")}functionlr(r){for(varn=0;n<r.length;n++)r[n]=0}varsr=function(r,n){this.hi=0|r,this.lo=0|n},hr=function(r){varn,e=newFloat64Array(16);if(r)for(n=0;n<r.length;n++)e[n]=r[n];returne},gr=function(){thrownewError("no PRNG")},vr=newUint8Array(16),br=newUint8Array(32);br[0]=9;varpr=hr(),_r=hr([1]),Ar=hr([56129,1]),Ur=hr([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),Er=hr([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),dr=hr([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),xr=hr([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),mr=hr([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]),Br=newUint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]),Sr=newUint32Array([5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,252]),Kr=_,Tr=A,Yr=[newsr(1116352408,3609767458),newsr(1899447441,602891725),newsr(3049323471,3964484399),newsr(3921009573,2173295548),newsr(961987163,4081628472),newsr(1508970993,3053834265),newsr(2453635748,2937671579),newsr(2870763221,3664609560),newsr(3624381080,2734883394),newsr(310598401,1164996542),newsr(607225278,1323610764),newsr(1426881987,3590304994),newsr(1925078388,4068182383),newsr(2162078206,991336113),newsr(2614888103,633803317),newsr(3248222580,3479774868),newsr(3835390401,2666613458),newsr(4022224774,944711139),newsr(264347078,2341262773),newsr(604807628,2007800933),newsr(770255983,1495990901),newsr(1249150122,1856431235),newsr(1555081692,3175218132),newsr(1996064986,2198950837),newsr(2554220882,3999719339),newsr(2821834349,766784016),newsr(2952996808,2566594879),newsr(3210313671,3203337956),newsr(3336571891,1034457026),newsr(3584528711,2466948901),newsr(113926993,3758326383),newsr(338241895,168717936),newsr(666307205,1188179964),newsr(773529912,1546045734),newsr(1294757372,1522805485),newsr(1396182291,2643833823),newsr(1695183700,2343527390),newsr(1986661051,1014477480),newsr(2177026350,1206759142),newsr(2456956037,344077627),newsr(2730485921,1290863460),newsr(2820302411,3158454273),newsr(3259730800,3505952657),newsr(3345764771,106217008),newsr(3516065817,3606008344),newsr(3600352804,1432725776),newsr(4094571909,1467031594),newsr(275423344,851169720),newsr(430227734,3100823752),newsr(506948616,1363258195),newsr(659060556,3750685593),newsr(883997877,3785050280),newsr(958139571,3318307427),newsr(1322822218,3812723403),newsr(1537002063,2003034995),newsr(1747873779,3602036899),newsr(1955562222,1575990012),newsr(2024104815,1125592928),newsr(2227730452,2716904306),newsr(2361852424,442776044),newsr(2428436474,593698344),newsr(2756734187,3733110249),newsr(3204031479,2999351573),newsr(3329325298,3815920427),newsr(3391569614,3928383900),newsr(3515267271,566280711),newsr(3940187606,3454069534),newsr(4118630271,4000239992),newsr(116418474,1914138554),newsr(174292421,2731055270),newsr(289380356,3203993006),newsr(460393269,320620315),newsr(685471733,587496836),newsr(852142971,1086792851),newsr(1017036298,365543100),newsr(1126000580,2618297676),newsr(1288033470,3409855158),newsr(1501505948,4234509866),newsr(1607167915,987167468),newsr(1816402316,1246189591)],Lr=newUint8Array([106,9,230,103,243,188,201,8,187,103,174,133,132,202,167,59,60,110,243,114,254,148,248,43,165,79,245,58,95,29,54,241,81,14,82,127,173,230,130,209,155,5,104,140,43,62,108,31,31,131,217,171,251,65,189,107,91,224,205,25,19,126,33,121]),kr=newFloat64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]),zr=32,Rr=24,Pr=32,Or=16,Fr=32,Nr=32,Cr=32,Mr=32,Gr=32,Zr=Rr,jr=Pr,qr=Or,Ir=64,Vr=32,Xr=64,Dr=32,Hr=64;r.lowlevel={crypto_core_hsalsa20:y,crypto_stream_xor:g,crypto_stream:h,crypto_stream_salsa20_xor:l,crypto_stream_salsa20:s,crypto_onetimeauth:b,crypto_onetimeauth_verify:p,crypto_verify_16:f,crypto_verify_32:u,crypto_secretbox:_,crypto_secretbox_open:A,crypto_scalarmult:R,crypto_scalarmult_base:P,crypto_box_beforenm:F,crypto_box_afternm:Kr,crypto_box:N,crypto_box_open:C,crypto_box_keypair:O,crypto_hash:Q,crypto_sign:ar,crypto_sign_keypair:tr,crypto_sign_open:ur,crypto_secretbox_KEYBYTES:zr,crypto_secretbox_NONCEBYTES:Rr,crypto_secretbox_ZEROBYTES:Pr,crypto_secretbox_BOXZEROBYTES:Or,crypto_scalarmult_BYTES:Fr,crypto_scalarmult_SCALARBYTES:Nr,crypto_box_PUBLICKEYBYTES:Cr,crypto_box_SECRETKEYBYTES:Mr,crypto_box_BEFORENMBYTES:Gr,crypto_box_NONCEBYTES:Zr,crypto_box_ZEROBYTES:jr,crypto_box_BOXZEROBYTES:qr,crypto_sign_BYTES:Ir,crypto_sign_PUBLICKEYBYTES:Vr,crypto_sign_SECRETKEYBYTES:Xr,crypto_sign_SEEDBYTES:Dr,crypto_hash_BYTES:Hr},r.util||(r.util={},r.util.decodeUTF8=r.util.encodeUTF8=r.util.encodeBase64=r.util.decodeBase64=function(){thrownewError("nacl.util moved into separate package: https://github.com/dchest/tweetnacl-util-js")}),r.randomBytes=function(r){varn=newUint8Array(r);returngr(n,r),n},r.secretbox=function(r,n,e){yr(r,n,e),cr(e,n);for(vart=newUint8Array(Pr+r.length),o=newUint8Array(t.length),i=0;i<r.length;i++)t[i+Pr]=r[i];return_(o,t,t.length,n,e),o.subarray(Or)},r.secretbox.open=function(r,n,e){yr(r,n,e),cr(e,n);for(vart=newUint8Array(Or+r.length),o=newUint8Array(t.length),i=0;i<r.length;i++)t[i+Or]=r[i];return!(t.length<32)&&(0===A(o,t,t.length,n,e)&&o.subarray(Pr))},r.secretbox.keyLength=zr,r.secretbox.nonceLength=Rr,r.secretbox.overheadLength=Or,r.scalarMult=function(r,n){if(yr(r,n),r.length!==Nr)thrownewError("bad n size");if(n.length!==Fr)thrownewError("bad p size");vare=newUint8Array(Fr);returnR(e,r,n),e},r.scalarMult.base=function(r){if(yr(r),r.length!==Nr)thrownewError("bad n size");varn=newUint8Array(Fr);returnP(n,r),n},r.scalarMult.scalarLength=Nr,r.scalarMult.groupElementLength=Fr,r.box=function(n,e,t,o){vari=r.box.before(t,o);returnr.secretbox(n,e,i)},r.box.before=function(r,n){yr(r,n),wr(r,n);vare=newUint8Array(Gr);returnF(e,r,n),e},r.box.after=r.secretbox,r.box.open=function(n,e,t,o){vari=r.box.before(t,o);returnr.secretbox.open(n,e,i)},r.box.open.after=r.secretbox.open,r.box.keyPair=function(){varr=newUint8Array(Cr),n=newUint8Array(Mr);returnO(r,n),{publicKey:r,secretKey:n}},r.box.keyPair.fromSecretKey=function(r){if(yr(r),r.length!==Mr)thrownewError("bad secret key size");varn=newUint8Array(Cr);returnP(n,r),{publicKey:n,secretKey:newUint8Array(r)}},r.box.publicKeyLength=Cr,r.box.secretKeyLength=Mr,r.box.sharedKeyLength=Gr,r.box.nonceLength=Zr,r.box.overheadLength=r.secretbox.overheadLength,r.sign=function(r,n){if(yr(r,n),n.length!==Xr)thrownewError("bad secret key size");vare=newUint8Array(Ir+r.length);returnar(e,r,r.length,n),e},r.sign.open=function(r,n){if(2!==arguments.length)thrownewError("nacl.sign.open accepts 2 arguments; did you mean to use nacl.sign.detached.verify?");if(yr(r,n),n.length!==Vr)thrownewError("bad public key size");vare=newUint8Array(r.length),t=ur(e,r,r.length,n);if(t<0)returnnull;for(varo=newUint8Array(t),i=0;i<o.length;i++)o[i]=e[i];returno},r.sign.detached=function(n,e){for(vart=r.sign(n,e),o=newUint8Array(Ir),i=0;i<o.length;i++)o[i]=t[i];returno},r.sign.detached.verify=function(r,n,e){if(yr(r,n,e),n.length!==Ir)thrownewError("bad signature size");if(e.length!==Vr)thrownewError("bad public key size");vart,o=newUint8Array(Ir+r.length),i=newUint8Array(Ir+r.length);for(t=0;t<Ir;t++)o[t]=n[t];for(t=0;t<r.length;t++)o[t+Ir]=r[t];returnur(i,o,o.length,e)>=0},r.sign.keyPair=function(){varr=newUint8Array(Vr),n=newUint8Array(Xr);returntr(r,n),{publicKey:r,secretKey:n}},r.sign.keyPair.fromSecretKey=function(r){if(yr(r),r.length!==Xr)thrownewError("bad secret key size");for(varn=newUint8Array(Vr),e=0;e<n.length;e++)n[e]=r[32+e];return{publicKey:n,secretKey:newUint8Array(r)}},r.sign.keyPair.fromSeed=function(r){if(yr(r),r.length!==Dr)thrownewError("bad seed size");for(varn=newUint8Array(Vr),e=newUint8Array(Xr),t=0;t<32;t++)e[t]=r[t];returntr(n,e,!0),{publicKey:n,secretKey:e}},r.sign.publicKeyLength=Vr,r.sign.secretKeyLength=Xr,r.sign.seedLength=Dr,r.sign.signatureLength=Ir,r.hash=function(r){yr(r);varn=newUint8Array(Hr);returnQ(n,r,r.length),n},r.hash.hashLength=Hr,r.verify=function(r,n){returnyr(r,n),0!==r.length&&0!==n.length&&(r.length===n.length&&0===a(r,0,n,0,r.length))},r.setPRNG=function(r){gr=r},function(){varn="undefined"!=typeofself?self.crypto||self.msCrypto:null;if(n&&n.getRandomValues){vare=65536;r.setPRNG(function(r,t){varo,i=newUint8Array(t);for(o=0;o<t;o+=e)n.getRandomValues(i.subarray(o,o+Math.min(t-o,e)));for(o=0;o<t;o++)r[o]=i[o];lr(i)})}else"undefined"!=typeofrequire&&(n=require("crypto"),n&&n.randomBytes&&r.setPRNG(function(r,e){vart,o=n.randomBytes(e);for(t=0;t<e;t++)r[t]=o[t];lr(o)}))}()}("undefined"!=typeofmodule&&module.exports?module.exports:self.nacl=self.nacl||{});