-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWalrus.standalone.min.js
1 lines (1 loc) · 42.6 KB
/
Walrus.standalone.min.js
1
(function(){var r=[].slice,t={Deferrals:function(){function t(r){this.continuation=r,this.count=1,this.ret=null}return t.prototype._fulfill=function(){if(!--this.count)return this.continuation(this.ret)},t.prototype.defer=function(t){return++this.count,function(n){return function(){var e,o=1<=arguments.length?r.call(arguments,0):[];return null!=t&&null!=(e=t.assign_fn)&&e.apply(null,o),n._fulfill()}}(this)},t}(),findDeferral:function(){return null},trampoline:function(r){return r()}},n=function(){},e=e=function(){function r(r){r=r||{},this.lazy_loop_delay=r.lazy_loop_delay||30,this.loop_delay=r.loop_delay||5,this.work_min=r.work_min||1,this.auto_stop_bits=r.auto_stop_bits||4096,this.max_bits_per_delta=r.max_bits_per_delta||4,this.auto_stop=!r.auto_stop||r.auto_stop,this.entropies=[],this.running=!0,this.is_generating=!1,this.timer_race_loop()}return r.prototype.generate=function(r,n){var e,o;t.findDeferral(arguments),this.is_generating=!0,this.running||this.resume();var i=0,h=[];!function(n){return function(a){var s=function(a){if(!(i<r))return a();!function(r){if(n.entropies.length)return e=n.entropies.splice(0,1)[0],i+=e[1],r(h.push(e[0]));o=new t.Deferrals(r),n.delay(o.defer({})),o._fulfill()}(function(){return t.trampoline(function(){return s(a)})})};s(a)}}(this)(function(r){return function(){return r.auto_stop&&r.stop(),r.is_generating=!1,n(h)}}(this))},r.prototype.stop=function(){return this.running=!1},r.prototype.resume=function(){return this.running=!0,this.timer_race_loop()},r.prototype.reset=function(){return this.entropies=[],this.total_bits=0},r.prototype.count_unused_bits=function(){var r,t=0,n=this.entropies,e=0;for(r=n.length;e<r;e++)t+=n[e][1];return t},r.prototype.delay=function(r){var n;t.findDeferral(arguments);var e=this.is_generating?this.loop_delay:this.lazy_loop_delay;!function(r){n=new t.Deferrals(r),setTimeout(n.defer({}),e),n._fulfill()}(function(){return r()})},r.prototype.timer_race_loop=function(){t.findDeferral(arguments),this._last_count=null;var r=function(n){var e,o,i,h,a;return function(s){if(!n.running)return s();n.count_unused_bits()<n.auto_stop_bits&&(e=n.millisecond_count(),null!=n._last_count&&(o=e-n._last_count)&&(i=Math.floor(n.log_2(Math.abs(o))),i=Math.min(n.max_bits_per_delta,i),h=[o,i],n.entropies.push(h)),n._last_count=e),a=new t.Deferrals(function(){return t.trampoline(function(){return r(s)})}),n.delay(a.defer({})),a._fulfill()}}(this);r(n)},r.prototype.log_2=function(r){return Math.log(r)/Math.LN2},r.prototype.millisecond_count=function(){var r,t=Date.now();for(r=0;Date.now()<t+this.work_min+1;)r++;return r},r}();"undefined"!=typeof window&&null!==window&&(window.Generator=e),"undefined"!=typeof exports&&null!==exports&&(exports.Generator=e)}).call(this),function(r){"use strict";function t(r,t,n,e){r[t]=n>>24&255,r[t+1]=n>>16&255,r[t+2]=n>>8&255,r[t+3]=255&n,r[t+4]=e>>24&255,r[t+5]=e>>16&255,r[t+6]=e>>8&255,r[t+7]=255&e}function n(r,t,n,e,o){var i,h=0;for(i=0;i<o;i++)h|=r[t+i]^n[e+i];return(1&h-1>>>8)-1}function e(r,t,e,o){return n(r,t,e,o,16)}function o(r,t,e,o){return n(r,t,e,o,32)}function i(r,t,n,e){for(var o,i=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,h=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,s=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,f=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,u=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,c=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,l=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,y=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,p=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,w=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,g=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,v=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,d=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,b=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,_=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,A=i,m=h,U=a,q=s,E=f,x=u,L=c,M=l,K=y,S=p,z=w,C=g,k=v,B=d,T=b,N=_,P=0;P<20;P+=2)o=A+k|0,E^=o<<7|o>>>25,o=E+A|0,K^=o<<9|o>>>23,o=K+E|0,k^=o<<13|o>>>19,o=k+K|0,A^=o<<18|o>>>14,o=x+m|0,S^=o<<7|o>>>25,o=S+x|0,B^=o<<9|o>>>23,o=B+S|0,m^=o<<13|o>>>19,o=m+B|0,x^=o<<18|o>>>14,o=z+L|0,T^=o<<7|o>>>25,o=T+z|0,U^=o<<9|o>>>23,o=U+T|0,L^=o<<13|o>>>19,o=L+U|0,z^=o<<18|o>>>14,o=N+C|0,q^=o<<7|o>>>25,o=q+N|0,M^=o<<9|o>>>23,o=M+q|0,C^=o<<13|o>>>19,o=C+M|0,N^=o<<18|o>>>14,o=A+q|0,m^=o<<7|o>>>25,o=m+A|0,U^=o<<9|o>>>23,o=U+m|0,q^=o<<13|o>>>19,o=q+U|0,A^=o<<18|o>>>14,o=x+E|0,L^=o<<7|o>>>25,o=L+x|0,M^=o<<9|o>>>23,o=M+L|0,E^=o<<13|o>>>19,o=E+M|0,x^=o<<18|o>>>14,o=z+S|0,C^=o<<7|o>>>25,o=C+z|0,K^=o<<9|o>>>23,o=K+C|0,S^=o<<13|o>>>19,o=S+K|0,z^=o<<18|o>>>14,o=N+T|0,k^=o<<7|o>>>25,o=k+N|0,B^=o<<9|o>>>23,o=B+k|0,T^=o<<13|o>>>19,o=T+B|0,N^=o<<18|o>>>14;A=A+i|0,m=m+h|0,U=U+a|0,q=q+s|0,E=E+f|0,x=x+u|0,L=L+c|0,M=M+l|0,K=K+y|0,S=S+p|0,z=z+w|0,C=C+g|0,k=k+v|0,B=B+d|0,T=T+b|0,N=N+_|0,r[0]=A>>>0&255,r[1]=A>>>8&255,r[2]=A>>>16&255,r[3]=A>>>24&255,r[4]=m>>>0&255,r[5]=m>>>8&255,r[6]=m>>>16&255,r[7]=m>>>24&255,r[8]=U>>>0&255,r[9]=U>>>8&255,r[10]=U>>>16&255,r[11]=U>>>24&255,r[12]=q>>>0&255,r[13]=q>>>8&255,r[14]=q>>>16&255,r[15]=q>>>24&255,r[16]=E>>>0&255,r[17]=E>>>8&255,r[18]=E>>>16&255,r[19]=E>>>24&255,r[20]=x>>>0&255,r[21]=x>>>8&255,r[22]=x>>>16&255,r[23]=x>>>24&255,r[24]=L>>>0&255,r[25]=L>>>8&255,r[26]=L>>>16&255,r[27]=L>>>24&255,r[28]=M>>>0&255,r[29]=M>>>8&255,r[30]=M>>>16&255,r[31]=M>>>24&255,r[32]=K>>>0&255,r[33]=K>>>8&255,r[34]=K>>>16&255,r[35]=K>>>24&255,r[36]=S>>>0&255,r[37]=S>>>8&255,r[38]=S>>>16&255,r[39]=S>>>24&255,r[40]=z>>>0&255,r[41]=z>>>8&255,r[42]=z>>>16&255,r[43]=z>>>24&255,r[44]=C>>>0&255,r[45]=C>>>8&255,r[46]=C>>>16&255,r[47]=C>>>24&255,r[48]=k>>>0&255,r[49]=k>>>8&255,r[50]=k>>>16&255,r[51]=k>>>24&255,r[52]=B>>>0&255,r[53]=B>>>8&255,r[54]=B>>>16&255,r[55]=B>>>24&255,r[56]=T>>>0&255,r[57]=T>>>8&255,r[58]=T>>>16&255,r[59]=T>>>24&255,r[60]=N>>>0&255,r[61]=N>>>8&255,r[62]=N>>>16&255,r[63]=N>>>24&255}function h(r,t,n,e){for(var o,i=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,h=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,s=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,f=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,u=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,c=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,l=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,y=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,p=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,w=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,g=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,v=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,d=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,b=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,_=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,A=0;A<20;A+=2)o=i+v|0,f^=o<<7|o>>>25,o=f+i|0,y^=o<<9|o>>>23,o=y+f|0,v^=o<<13|o>>>19,o=v+y|0,i^=o<<18|o>>>14,o=u+h|0,p^=o<<7|o>>>25,o=p+u|0,d^=o<<9|o>>>23,o=d+p|0,h^=o<<13|o>>>19,o=h+d|0,u^=o<<18|o>>>14,o=w+c|0,b^=o<<7|o>>>25,o=b+w|0,a^=o<<9|o>>>23,o=a+b|0,c^=o<<13|o>>>19,o=c+a|0,w^=o<<18|o>>>14,o=_+g|0,s^=o<<7|o>>>25,o=s+_|0,l^=o<<9|o>>>23,o=l+s|0,g^=o<<13|o>>>19,o=g+l|0,_^=o<<18|o>>>14,o=i+s|0,h^=o<<7|o>>>25,o=h+i|0,a^=o<<9|o>>>23,o=a+h|0,s^=o<<13|o>>>19,o=s+a|0,i^=o<<18|o>>>14,o=u+f|0,c^=o<<7|o>>>25,o=c+u|0,l^=o<<9|o>>>23,o=l+c|0,f^=o<<13|o>>>19,o=f+l|0,u^=o<<18|o>>>14,o=w+p|0,g^=o<<7|o>>>25,o=g+w|0,y^=o<<9|o>>>23,o=y+g|0,p^=o<<13|o>>>19,o=p+y|0,w^=o<<18|o>>>14,o=_+b|0,v^=o<<7|o>>>25,o=v+_|0,d^=o<<9|o>>>23,o=d+v|0,b^=o<<13|o>>>19,o=b+d|0,_^=o<<18|o>>>14;r[0]=i>>>0&255,r[1]=i>>>8&255,r[2]=i>>>16&255,r[3]=i>>>24&255,r[4]=u>>>0&255,r[5]=u>>>8&255,r[6]=u>>>16&255,r[7]=u>>>24&255,r[8]=w>>>0&255,r[9]=w>>>8&255,r[10]=w>>>16&255,r[11]=w>>>24&255,r[12]=_>>>0&255,r[13]=_>>>8&255,r[14]=_>>>16&255,r[15]=_>>>24&255,r[16]=c>>>0&255,r[17]=c>>>8&255,r[18]=c>>>16&255,r[19]=c>>>24&255,r[20]=l>>>0&255,r[21]=l>>>8&255,r[22]=l>>>16&255,r[23]=l>>>24&255,r[24]=y>>>0&255,r[25]=y>>>8&255,r[26]=y>>>16&255,r[27]=y>>>24&255,r[28]=p>>>0&255,r[29]=p>>>8&255,r[30]=p>>>16&255,r[31]=p>>>24&255}function a(r,t,n,e){i(r,t,n,e)}function s(r,t,n,e){h(r,t,n,e)}function f(r,t,n,e,o,i,h){var s,f,u=new Uint8Array(16),c=new Uint8Array(64);for(f=0;f<16;f++)u[f]=0;for(f=0;f<8;f++)u[f]=i[f];for(;o>=64;){for(a(c,u,h,fr),f=0;f<64;f++)r[t+f]=n[e+f]^c[f];for(s=1,f=8;f<16;f++)s=s+(255&u[f])|0,u[f]=255&s,s>>>=8;o-=64,t+=64,e+=64}if(o>0)for(a(c,u,h,fr),f=0;f<o;f++)r[t+f]=n[e+f]^c[f];return 0}function u(r,t,n,e,o){var i,h,s=new Uint8Array(16),f=new Uint8Array(64);for(h=0;h<16;h++)s[h]=0;for(h=0;h<8;h++)s[h]=e[h];for(;n>=64;){for(a(f,s,o,fr),h=0;h<64;h++)r[t+h]=f[h];for(i=1,h=8;h<16;h++)i=i+(255&s[h])|0,s[h]=255&i,i>>>=8;n-=64,t+=64}if(n>0)for(a(f,s,o,fr),h=0;h<n;h++)r[t+h]=f[h];return 0}function c(r,t,n,e,o){var i=new Uint8Array(32);s(i,e,o,fr);for(var h=new Uint8Array(8),a=0;a<8;a++)h[a]=e[a+16];return u(r,t,n,h,i)}function l(r,t,n,e,o,i,h){var a=new Uint8Array(32);s(a,i,h,fr);for(var u=new Uint8Array(8),c=0;c<8;c++)u[c]=i[c+16];return f(r,t,n,e,o,u,a)}function y(r,t,n,e,o,i){var h=new ur(i);return h.update(n,e,o),h.finish(r,t),0}function p(r,t,n,o,i,h){var a=new Uint8Array(16);return y(a,0,n,o,i,h),e(r,t,a,0)}function w(r,t,n,e,o){var i;if(n<32)return-1;for(l(r,0,t,0,n,e,o),y(r,16,r,32,n-32,r),i=0;i<16;i++)r[i]=0;return 0}function g(r,t,n,e,o){var i,h=new Uint8Array(32);if(n<32)return-1;if(c(h,0,32,e,o),0!==p(t,16,t,32,n-32,h))return-1;for(l(r,0,t,0,n,e,o),i=0;i<32;i++)r[i]=0;return 0}function v(r,t){var n;for(n=0;n<16;n++)r[n]=0|t[n]}function d(r){var t,n,e=1;for(t=0;t<16;t++)n=r[t]+e+65535,e=Math.floor(n/65536),r[t]=n-65536*e;r[0]+=e-1+37*(e-1)}function b(r,t,n){for(var e,o=~(n-1),i=0;i<16;i++)e=o&(r[i]^t[i]),r[i]^=e,t[i]^=e}function _(r,t){var n,e,o,i=X(),h=X();for(n=0;n<16;n++)h[n]=t[n];for(d(h),d(h),d(h),e=0;e<2;e++){for(i[0]=h[0]-65517,n=1;n<15;n++)i[n]=h[n]-65535-(i[n-1]>>16&1),i[n-1]&=65535;i[15]=h[15]-32767-(i[14]>>16&1),o=i[15]>>16&1,i[14]&=65535,b(h,i,1-o)}for(n=0;n<16;n++)r[2*n]=255&h[n],r[2*n+1]=h[n]>>8}function A(r,t){var n=new Uint8Array(32),e=new Uint8Array(32);return _(n,r),_(e,t),o(n,0,e,0)}function m(r){var t=new Uint8Array(32);return _(t,r),1&t[0]}function U(r,t){var n;for(n=0;n<16;n++)r[n]=t[2*n]+(t[2*n+1]<<8);r[15]&=32767}function q(r,t,n){for(var e=0;e<16;e++)r[e]=t[e]+n[e]}function E(r,t,n){for(var e=0;e<16;e++)r[e]=t[e]-n[e]}function x(r,t,n){var e,o,i=0,h=0,a=0,s=0,f=0,u=0,c=0,l=0,y=0,p=0,w=0,g=0,v=0,d=0,b=0,_=0,A=0,m=0,U=0,q=0,E=0,x=0,L=0,M=0,K=0,S=0,z=0,C=0,k=0,B=0,T=0,N=n[0],P=n[1],Z=n[2],D=n[3],R=n[4],Y=n[5],G=n[6],I=n[7],F=n[8],V=n[9],W=n[10],O=n[11],J=n[12],Q=n[13],H=n[14],X=n[15];i+=(e=t[0])*N,h+=e*P,a+=e*Z,s+=e*D,f+=e*R,u+=e*Y,c+=e*G,l+=e*I,y+=e*F,p+=e*V,w+=e*W,g+=e*O,v+=e*J,d+=e*Q,b+=e*H,_+=e*X,h+=(e=t[1])*N,a+=e*P,s+=e*Z,f+=e*D,u+=e*R,c+=e*Y,l+=e*G,y+=e*I,p+=e*F,w+=e*V,g+=e*W,v+=e*O,d+=e*J,b+=e*Q,_+=e*H,A+=e*X,a+=(e=t[2])*N,s+=e*P,f+=e*Z,u+=e*D,c+=e*R,l+=e*Y,y+=e*G,p+=e*I,w+=e*F,g+=e*V,v+=e*W,d+=e*O,b+=e*J,_+=e*Q,A+=e*H,m+=e*X,s+=(e=t[3])*N,f+=e*P,u+=e*Z,c+=e*D,l+=e*R,y+=e*Y,p+=e*G,w+=e*I,g+=e*F,v+=e*V,d+=e*W,b+=e*O,_+=e*J,A+=e*Q,m+=e*H,U+=e*X,f+=(e=t[4])*N,u+=e*P,c+=e*Z,l+=e*D,y+=e*R,p+=e*Y,w+=e*G,g+=e*I,v+=e*F,d+=e*V,b+=e*W,_+=e*O,A+=e*J,m+=e*Q,U+=e*H,q+=e*X,u+=(e=t[5])*N,c+=e*P,l+=e*Z,y+=e*D,p+=e*R,w+=e*Y,g+=e*G,v+=e*I,d+=e*F,b+=e*V,_+=e*W,A+=e*O,m+=e*J,U+=e*Q,q+=e*H,E+=e*X,c+=(e=t[6])*N,l+=e*P,y+=e*Z,p+=e*D,w+=e*R,g+=e*Y,v+=e*G,d+=e*I,b+=e*F,_+=e*V,A+=e*W,m+=e*O,U+=e*J,q+=e*Q,E+=e*H,x+=e*X,l+=(e=t[7])*N,y+=e*P,p+=e*Z,w+=e*D,g+=e*R,v+=e*Y,d+=e*G,b+=e*I,_+=e*F,A+=e*V,m+=e*W,U+=e*O,q+=e*J,E+=e*Q,x+=e*H,L+=e*X,y+=(e=t[8])*N,p+=e*P,w+=e*Z,g+=e*D,v+=e*R,d+=e*Y,b+=e*G,_+=e*I,A+=e*F,m+=e*V,U+=e*W,q+=e*O,E+=e*J,x+=e*Q,L+=e*H,M+=e*X,p+=(e=t[9])*N,w+=e*P,g+=e*Z,v+=e*D,d+=e*R,b+=e*Y,_+=e*G,A+=e*I,m+=e*F,U+=e*V,q+=e*W,E+=e*O,x+=e*J,L+=e*Q,M+=e*H,K+=e*X,w+=(e=t[10])*N,g+=e*P,v+=e*Z,d+=e*D,b+=e*R,_+=e*Y,A+=e*G,m+=e*I,U+=e*F,q+=e*V,E+=e*W,x+=e*O,L+=e*J,M+=e*Q,K+=e*H,S+=e*X,g+=(e=t[11])*N,v+=e*P,d+=e*Z,b+=e*D,_+=e*R,A+=e*Y,m+=e*G,U+=e*I,q+=e*F,E+=e*V,x+=e*W,L+=e*O,M+=e*J,K+=e*Q,S+=e*H,z+=e*X,v+=(e=t[12])*N,d+=e*P,b+=e*Z,_+=e*D,A+=e*R,m+=e*Y,U+=e*G,q+=e*I,E+=e*F,x+=e*V,L+=e*W,M+=e*O,K+=e*J,S+=e*Q,z+=e*H,C+=e*X,d+=(e=t[13])*N,b+=e*P,_+=e*Z,A+=e*D,m+=e*R,U+=e*Y,q+=e*G,E+=e*I,x+=e*F,L+=e*V,M+=e*W,K+=e*O,S+=e*J,z+=e*Q,C+=e*H,k+=e*X,b+=(e=t[14])*N,_+=e*P,A+=e*Z,m+=e*D,U+=e*R,q+=e*Y,E+=e*G,x+=e*I,L+=e*F,M+=e*V,K+=e*W,S+=e*O,z+=e*J,C+=e*Q,k+=e*H,B+=e*X,_+=(e=t[15])*N,h+=38*(m+=e*Z),a+=38*(U+=e*D),s+=38*(q+=e*R),f+=38*(E+=e*Y),u+=38*(x+=e*G),c+=38*(L+=e*I),l+=38*(M+=e*F),y+=38*(K+=e*V),p+=38*(S+=e*W),w+=38*(z+=e*O),g+=38*(C+=e*J),v+=38*(k+=e*Q),d+=38*(B+=e*H),b+=38*(T+=e*X),i=(e=(i+=38*(A+=e*P))+(o=1)+65535)-65536*(o=Math.floor(e/65536)),h=(e=h+o+65535)-65536*(o=Math.floor(e/65536)),a=(e=a+o+65535)-65536*(o=Math.floor(e/65536)),s=(e=s+o+65535)-65536*(o=Math.floor(e/65536)),f=(e=f+o+65535)-65536*(o=Math.floor(e/65536)),u=(e=u+o+65535)-65536*(o=Math.floor(e/65536)),c=(e=c+o+65535)-65536*(o=Math.floor(e/65536)),l=(e=l+o+65535)-65536*(o=Math.floor(e/65536)),y=(e=y+o+65535)-65536*(o=Math.floor(e/65536)),p=(e=p+o+65535)-65536*(o=Math.floor(e/65536)),w=(e=w+o+65535)-65536*(o=Math.floor(e/65536)),g=(e=g+o+65535)-65536*(o=Math.floor(e/65536)),v=(e=v+o+65535)-65536*(o=Math.floor(e/65536)),d=(e=d+o+65535)-65536*(o=Math.floor(e/65536)),b=(e=b+o+65535)-65536*(o=Math.floor(e/65536)),_=(e=_+o+65535)-65536*(o=Math.floor(e/65536)),i=(e=(i+=o-1+37*(o-1))+(o=1)+65535)-65536*(o=Math.floor(e/65536)),h=(e=h+o+65535)-65536*(o=Math.floor(e/65536)),a=(e=a+o+65535)-65536*(o=Math.floor(e/65536)),s=(e=s+o+65535)-65536*(o=Math.floor(e/65536)),f=(e=f+o+65535)-65536*(o=Math.floor(e/65536)),u=(e=u+o+65535)-65536*(o=Math.floor(e/65536)),c=(e=c+o+65535)-65536*(o=Math.floor(e/65536)),l=(e=l+o+65535)-65536*(o=Math.floor(e/65536)),y=(e=y+o+65535)-65536*(o=Math.floor(e/65536)),p=(e=p+o+65535)-65536*(o=Math.floor(e/65536)),w=(e=w+o+65535)-65536*(o=Math.floor(e/65536)),g=(e=g+o+65535)-65536*(o=Math.floor(e/65536)),v=(e=v+o+65535)-65536*(o=Math.floor(e/65536)),d=(e=d+o+65535)-65536*(o=Math.floor(e/65536)),b=(e=b+o+65535)-65536*(o=Math.floor(e/65536)),_=(e=_+o+65535)-65536*(o=Math.floor(e/65536)),i+=o-1+37*(o-1),r[0]=i,r[1]=h,r[2]=a,r[3]=s,r[4]=f,r[5]=u,r[6]=c,r[7]=l,r[8]=y,r[9]=p,r[10]=w,r[11]=g,r[12]=v,r[13]=d,r[14]=b,r[15]=_}function L(r,t){x(r,t,t)}function M(r,t){var n,e=X();for(n=0;n<16;n++)e[n]=t[n];for(n=253;n>=0;n--)L(e,e),2!==n&&4!==n&&x(e,e,t);for(n=0;n<16;n++)r[n]=e[n]}function K(r,t){var n,e=X();for(n=0;n<16;n++)e[n]=t[n];for(n=250;n>=0;n--)L(e,e),1!==n&&x(e,e,t);for(n=0;n<16;n++)r[n]=e[n]}function S(r,t,n){var e,o,i=new Uint8Array(32),h=new Float64Array(80),a=X(),s=X(),f=X(),u=X(),c=X(),l=X();for(o=0;o<31;o++)i[o]=t[o];for(i[31]=127&t[31]|64,i[0]&=248,U(h,n),o=0;o<16;o++)s[o]=h[o],u[o]=a[o]=f[o]=0;for(a[0]=u[0]=1,o=254;o>=0;--o)e=i[o>>>3]>>>(7&o)&1,b(a,s,e),b(f,u,e),q(c,a,f),E(a,a,f),q(f,s,u),E(s,s,u),L(u,c),L(l,a),x(a,f,a),x(f,s,c),q(c,a,f),E(a,a,f),L(s,a),E(f,u,l),x(a,f,er),q(a,a,u),x(f,f,a),x(a,u,l),x(u,s,h),L(s,c),b(a,s,e),b(f,u,e);for(o=0;o<16;o++)h[o+16]=a[o],h[o+32]=f[o],h[o+48]=s[o],h[o+64]=u[o];var y=h.subarray(32),p=h.subarray(16);return M(y,y),x(p,p,y),_(r,p),0}function z(r,t){return S(r,t,rr)}function C(r,t){return j(t,32),z(r,t)}function k(r,t,n){var e=new Uint8Array(32);return S(e,n,t),s(r,$,e,fr)}function B(r,t,n,e){for(var o,i,h,a,s,f,u,c,l,y,p,w,g,v,d,b,_,A,m,U,q,E,x,L,M,K,S=new Int32Array(16),z=new Int32Array(16),C=r[0],k=r[1],B=r[2],T=r[3],N=r[4],P=r[5],Z=r[6],D=r[7],R=t[0],Y=t[1],G=t[2],I=t[3],F=t[4],V=t[5],W=t[6],O=t[7],J=0;e>=128;){for(m=0;m<16;m++)U=8*m+J,S[m]=n[U+0]<<24|n[U+1]<<16|n[U+2]<<8|n[U+3],z[m]=n[U+4]<<24|n[U+5]<<16|n[U+6]<<8|n[U+7];for(m=0;m<80;m++)if(o=C,i=k,h=B,a=T,s=N,f=P,u=Z,c=D,l=R,y=Y,p=G,w=I,g=F,v=V,d=W,b=O,q=D,E=O,x=65535&E,L=E>>>16,M=65535&q,K=q>>>16,q=(N>>>14|F<<18)^(N>>>18|F<<14)^(F>>>9|N<<23),E=(F>>>14|N<<18)^(F>>>18|N<<14)^(N>>>9|F<<23),x+=65535&E,L+=E>>>16,M+=65535&q,K+=q>>>16,q=N&P^~N&Z,E=F&V^~F&W,x+=65535&E,L+=E>>>16,M+=65535&q,K+=q>>>16,q=yr[2*m],E=yr[2*m+1],x+=65535&E,L+=E>>>16,M+=65535&q,K+=q>>>16,q=S[m%16],E=z[m%16],x+=65535&E,L+=E>>>16,M+=65535&q,K+=q>>>16,L+=x>>>16,M+=L>>>16,K+=M>>>16,_=65535&M|K<<16,A=65535&x|L<<16,q=_,E=A,x=65535&E,L=E>>>16,M=65535&q,K=q>>>16,q=(C>>>28|R<<4)^(R>>>2|C<<30)^(R>>>7|C<<25),E=(R>>>28|C<<4)^(C>>>2|R<<30)^(C>>>7|R<<25),x+=65535&E,L+=E>>>16,M+=65535&q,K+=q>>>16,q=C&k^C&B^k&B,E=R&Y^R&G^Y&G,x+=65535&E,L+=E>>>16,M+=65535&q,K+=q>>>16,L+=x>>>16,M+=L>>>16,K+=M>>>16,c=65535&M|K<<16,b=65535&x|L<<16,q=a,E=w,x=65535&E,L=E>>>16,M=65535&q,K=q>>>16,q=_,E=A,x+=65535&E,L+=E>>>16,M+=65535&q,K+=q>>>16,L+=x>>>16,M+=L>>>16,K+=M>>>16,a=65535&M|K<<16,w=65535&x|L<<16,k=o,B=i,T=h,N=a,P=s,Z=f,D=u,C=c,Y=l,G=y,I=p,F=w,V=g,W=v,O=d,R=b,m%16==15)for(U=0;U<16;U++)q=S[U],E=z[U],x=65535&E,L=E>>>16,M=65535&q,K=q>>>16,q=S[(U+9)%16],E=z[(U+9)%16],x+=65535&E,L+=E>>>16,M+=65535&q,K+=q>>>16,_=S[(U+1)%16],A=z[(U+1)%16],q=(_>>>1|A<<31)^(_>>>8|A<<24)^_>>>7,E=(A>>>1|_<<31)^(A>>>8|_<<24)^(A>>>7|_<<25),x+=65535&E,L+=E>>>16,M+=65535&q,K+=q>>>16,_=S[(U+14)%16],A=z[(U+14)%16],q=(_>>>19|A<<13)^(A>>>29|_<<3)^_>>>6,E=(A>>>19|_<<13)^(_>>>29|A<<3)^(A>>>6|_<<26),x+=65535&E,L+=E>>>16,M+=65535&q,K+=q>>>16,L+=x>>>16,M+=L>>>16,K+=M>>>16,S[U]=65535&M|K<<16,z[U]=65535&x|L<<16;x=65535&(E=R),L=E>>>16,M=65535&(q=C),K=q>>>16,q=r[0],L+=(E=t[0])>>>16,M+=65535&q,K+=q>>>16,K+=(M+=(L+=(x+=65535&E)>>>16)>>>16)>>>16,r[0]=C=65535&M|K<<16,t[0]=R=65535&x|L<<16,x=65535&(E=Y),L=E>>>16,M=65535&(q=k),K=q>>>16,q=r[1],L+=(E=t[1])>>>16,M+=65535&q,K+=q>>>16,K+=(M+=(L+=(x+=65535&E)>>>16)>>>16)>>>16,r[1]=k=65535&M|K<<16,t[1]=Y=65535&x|L<<16,x=65535&(E=G),L=E>>>16,M=65535&(q=B),K=q>>>16,q=r[2],L+=(E=t[2])>>>16,M+=65535&q,K+=q>>>16,K+=(M+=(L+=(x+=65535&E)>>>16)>>>16)>>>16,r[2]=B=65535&M|K<<16,t[2]=G=65535&x|L<<16,x=65535&(E=I),L=E>>>16,M=65535&(q=T),K=q>>>16,q=r[3],L+=(E=t[3])>>>16,M+=65535&q,K+=q>>>16,K+=(M+=(L+=(x+=65535&E)>>>16)>>>16)>>>16,r[3]=T=65535&M|K<<16,t[3]=I=65535&x|L<<16,x=65535&(E=F),L=E>>>16,M=65535&(q=N),K=q>>>16,q=r[4],L+=(E=t[4])>>>16,M+=65535&q,K+=q>>>16,K+=(M+=(L+=(x+=65535&E)>>>16)>>>16)>>>16,r[4]=N=65535&M|K<<16,t[4]=F=65535&x|L<<16,x=65535&(E=V),L=E>>>16,M=65535&(q=P),K=q>>>16,q=r[5],L+=(E=t[5])>>>16,M+=65535&q,K+=q>>>16,K+=(M+=(L+=(x+=65535&E)>>>16)>>>16)>>>16,r[5]=P=65535&M|K<<16,t[5]=V=65535&x|L<<16,x=65535&(E=W),L=E>>>16,M=65535&(q=Z),K=q>>>16,q=r[6],L+=(E=t[6])>>>16,M+=65535&q,K+=q>>>16,K+=(M+=(L+=(x+=65535&E)>>>16)>>>16)>>>16,r[6]=Z=65535&M|K<<16,t[6]=W=65535&x|L<<16,x=65535&(E=O),L=E>>>16,M=65535&(q=D),K=q>>>16,q=r[7],L+=(E=t[7])>>>16,M+=65535&q,K+=q>>>16,K+=(M+=(L+=(x+=65535&E)>>>16)>>>16)>>>16,r[7]=D=65535&M|K<<16,t[7]=O=65535&x|L<<16,J+=128,e-=128}return e}function T(r,n,e){var o,i=new Int32Array(8),h=new Int32Array(8),a=new Uint8Array(256),s=e;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,h[0]=4089235720,h[1]=2227873595,h[2]=4271175723,h[3]=1595750129,h[4]=2917565137,h[5]=725511199,h[6]=4215389547,h[7]=327033209,B(i,h,n,e),e%=128,o=0;o<e;o++)a[o]=n[s-e+o];for(a[e]=128,a[(e=256-128*(e<112?1:0))-9]=0,t(a,e-8,s/536870912|0,s<<3),B(i,h,a,e),o=0;o<8;o++)t(r,8*o,i[o],h[o]);return 0}function N(r,t){var n=X(),e=X(),o=X(),i=X(),h=X(),a=X(),s=X(),f=X(),u=X();E(n,r[1],r[0]),E(u,t[1],t[0]),x(n,n,u),q(e,r[0],r[1]),q(u,t[0],t[1]),x(e,e,u),x(o,r[3],t[3]),x(o,o,ir),x(i,r[2],t[2]),q(i,i,i),E(h,e,n),E(a,i,o),q(s,i,o),q(f,e,n),x(r[0],h,a),x(r[1],f,s),x(r[2],s,a),x(r[3],h,f)}function P(r,t,n){var e;for(e=0;e<4;e++)b(r[e],t[e],n)}function Z(r,t){var n=X(),e=X(),o=X();M(o,t[2]),x(n,t[0],o),x(e,t[1],o),_(r,e),r[31]^=m(n)<<7}function D(r,t,n){var e,o;for(v(r[0],tr),v(r[1],nr),v(r[2],nr),v(r[3],tr),o=255;o>=0;--o)e=n[o/8|0]>>(7&o)&1,P(r,t,e),N(t,r),N(r,r),P(r,t,e)}function R(r,t){var n=[X(),X(),X(),X()];v(n[0],hr),v(n[1],ar),v(n[2],nr),x(n[3],hr,ar),D(r,n,t)}function Y(r,t,n){var e,o=new Uint8Array(64),i=[X(),X(),X(),X()];for(n||j(t,32),T(o,t,32),o[0]&=248,o[31]&=127,o[31]|=64,R(i,o),Z(r,i),e=0;e<32;e++)t[e+32]=r[e];return 0}function G(r,t){var n,e,o,i;for(e=63;e>=32;--e){for(n=0,o=e-32,i=e-12;o<i;++o)t[o]+=n-16*t[e]*pr[o-(e-32)],n=t[o]+128>>8,t[o]-=256*n;t[o]+=n,t[e]=0}for(n=0,o=0;o<32;o++)t[o]+=n-(t[31]>>4)*pr[o],n=t[o]>>8,t[o]&=255;for(o=0;o<32;o++)t[o]-=n*pr[o];for(e=0;e<32;e++)t[e+1]+=t[e]>>8,r[e]=255&t[e]}function I(r){var t,n=new Float64Array(64);for(t=0;t<64;t++)n[t]=r[t];for(t=0;t<64;t++)r[t]=0;G(r,n)}function F(r,t,n,e){var o,i,h=new Uint8Array(64),a=new Uint8Array(64),s=new Uint8Array(64),f=new Float64Array(64),u=[X(),X(),X(),X()];T(h,e,32),h[0]&=248,h[31]&=127,h[31]|=64;var c=n+64;for(o=0;o<n;o++)r[64+o]=t[o];for(o=0;o<32;o++)r[32+o]=h[32+o];for(T(s,r.subarray(32),n+32),I(s),R(u,s),Z(r,u),o=32;o<64;o++)r[o]=e[o];for(T(a,r,n+64),I(a),o=0;o<64;o++)f[o]=0;for(o=0;o<32;o++)f[o]=s[o];for(o=0;o<32;o++)for(i=0;i<32;i++)f[o+i]+=a[o]*h[i];return G(r.subarray(32),f),c}function V(r,t){var n=X(),e=X(),o=X(),i=X(),h=X(),a=X(),s=X();return v(r[2],nr),U(r[1],t),L(o,r[1]),x(i,o,or),E(o,o,r[2]),q(i,r[2],i),L(h,i),L(a,h),x(s,a,h),x(n,s,o),x(n,n,i),K(n,n),x(n,n,o),x(n,n,i),x(n,n,i),x(r[0],n,i),L(e,r[0]),x(e,e,i),A(e,o)&&x(r[0],r[0],sr),L(e,r[0]),x(e,e,i),A(e,o)?-1:(m(r[0])===t[31]>>7&&E(r[0],tr,r[0]),x(r[3],r[0],r[1]),0)}function W(r,t,n,e){var i,h=new Uint8Array(32),a=new Uint8Array(64),s=[X(),X(),X(),X()],f=[X(),X(),X(),X()];if(-1,n<64)return-1;if(V(f,e))return-1;for(i=0;i<n;i++)r[i]=t[i];for(i=0;i<32;i++)r[i+32]=e[i];if(T(a,r,n),I(a),D(s,f,a),R(f,t.subarray(32)),N(s,f),Z(h,s),n-=64,o(t,0,h,0)){for(i=0;i<n;i++)r[i]=0;return-1}for(i=0;i<n;i++)r[i]=t[i+64];return n}function O(r,t){if(r.length!==wr)throw new Error("bad key size");if(t.length!==gr)throw new Error("bad nonce size")}function J(r,t){if(r.length!==vr)throw new Error("bad public key size");if(t.length!==dr)throw new Error("bad secret key size")}function Q(){for(var r=0;r<arguments.length;r++)if(!(arguments[r]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function H(r){for(var t=0;t<r.length;t++)r[t]=0}var X=function(r){var t,n=new Float64Array(16);if(r)for(t=0;t<r.length;t++)n[t]=r[t];return n},j=function(){throw new Error("no PRNG")},$=new Uint8Array(16),rr=new Uint8Array(32);rr[0]=9;var tr=X(),nr=X([1]),er=X([56129,1]),or=X([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),ir=X([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),hr=X([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),ar=X([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),sr=X([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]),fr=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]),ur=function(r){this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0;var t,n,e,o,i,h,a,s;t=255&r[0]|(255&r[1])<<8,this.r[0]=8191&t,n=255&r[2]|(255&r[3])<<8,this.r[1]=8191&(t>>>13|n<<3),e=255&r[4]|(255&r[5])<<8,this.r[2]=7939&(n>>>10|e<<6),o=255&r[6]|(255&r[7])<<8,this.r[3]=8191&(e>>>7|o<<9),i=255&r[8]|(255&r[9])<<8,this.r[4]=255&(o>>>4|i<<12),this.r[5]=i>>>1&8190,h=255&r[10]|(255&r[11])<<8,this.r[6]=8191&(i>>>14|h<<2),a=255&r[12]|(255&r[13])<<8,this.r[7]=8065&(h>>>11|a<<5),s=255&r[14]|(255&r[15])<<8,this.r[8]=8191&(a>>>8|s<<8),this.r[9]=s>>>5&127,this.pad[0]=255&r[16]|(255&r[17])<<8,this.pad[1]=255&r[18]|(255&r[19])<<8,this.pad[2]=255&r[20]|(255&r[21])<<8,this.pad[3]=255&r[22]|(255&r[23])<<8,this.pad[4]=255&r[24]|(255&r[25])<<8,this.pad[5]=255&r[26]|(255&r[27])<<8,this.pad[6]=255&r[28]|(255&r[29])<<8,this.pad[7]=255&r[30]|(255&r[31])<<8};ur.prototype.blocks=function(r,t,n){for(var e,o,i,h,a,s,f,u,c,l,y,p,w,g,v,d,b,_,A,m=this.fin?0:2048,U=this.h[0],q=this.h[1],E=this.h[2],x=this.h[3],L=this.h[4],M=this.h[5],K=this.h[6],S=this.h[7],z=this.h[8],C=this.h[9],k=this.r[0],B=this.r[1],T=this.r[2],N=this.r[3],P=this.r[4],Z=this.r[5],D=this.r[6],R=this.r[7],Y=this.r[8],G=this.r[9];n>=16;)e=255&r[t+0]|(255&r[t+1])<<8,U+=8191&e,o=255&r[t+2]|(255&r[t+3])<<8,q+=8191&(e>>>13|o<<3),i=255&r[t+4]|(255&r[t+5])<<8,E+=8191&(o>>>10|i<<6),h=255&r[t+6]|(255&r[t+7])<<8,x+=8191&(i>>>7|h<<9),a=255&r[t+8]|(255&r[t+9])<<8,L+=8191&(h>>>4|a<<12),M+=a>>>1&8191,s=255&r[t+10]|(255&r[t+11])<<8,K+=8191&(a>>>14|s<<2),f=255&r[t+12]|(255&r[t+13])<<8,S+=8191&(s>>>11|f<<5),u=255&r[t+14]|(255&r[t+15])<<8,z+=8191&(f>>>8|u<<8),C+=u>>>5|m,c=0,l=c,l+=U*k,l+=q*(5*G),l+=E*(5*Y),l+=x*(5*R),l+=L*(5*D),c=l>>>13,l&=8191,l+=M*(5*Z),l+=K*(5*P),l+=S*(5*N),l+=z*(5*T),l+=C*(5*B),c+=l>>>13,l&=8191,y=c,y+=U*B,y+=q*k,y+=E*(5*G),y+=x*(5*Y),y+=L*(5*R),c=y>>>13,y&=8191,y+=M*(5*D),y+=K*(5*Z),y+=S*(5*P),y+=z*(5*N),y+=C*(5*T),c+=y>>>13,y&=8191,p=c,p+=U*T,p+=q*B,p+=E*k,p+=x*(5*G),p+=L*(5*Y),c=p>>>13,p&=8191,p+=M*(5*R),p+=K*(5*D),p+=S*(5*Z),p+=z*(5*P),p+=C*(5*N),c+=p>>>13,p&=8191,w=c,w+=U*N,w+=q*T,w+=E*B,w+=x*k,w+=L*(5*G),c=w>>>13,w&=8191,w+=M*(5*Y),w+=K*(5*R),w+=S*(5*D),w+=z*(5*Z),w+=C*(5*P),c+=w>>>13,w&=8191,g=c,g+=U*P,g+=q*N,g+=E*T,g+=x*B,g+=L*k,c=g>>>13,g&=8191,g+=M*(5*G),g+=K*(5*Y),g+=S*(5*R),g+=z*(5*D),g+=C*(5*Z),c+=g>>>13,g&=8191,v=c,v+=U*Z,v+=q*P,v+=E*N,v+=x*T,v+=L*B,c=v>>>13,v&=8191,v+=M*k,v+=K*(5*G),v+=S*(5*Y),v+=z*(5*R),v+=C*(5*D),c+=v>>>13,v&=8191,d=c,d+=U*D,d+=q*Z,d+=E*P,d+=x*N,d+=L*T,c=d>>>13,d&=8191,d+=M*B,d+=K*k,d+=S*(5*G),d+=z*(5*Y),d+=C*(5*R),c+=d>>>13,d&=8191,b=c,b+=U*R,b+=q*D,b+=E*Z,b+=x*P,b+=L*N,c=b>>>13,b&=8191,b+=M*T,b+=K*B,b+=S*k,b+=z*(5*G),b+=C*(5*Y),c+=b>>>13,b&=8191,_=c,_+=U*Y,_+=q*R,_+=E*D,_+=x*Z,_+=L*P,c=_>>>13,_&=8191,_+=M*N,_+=K*T,_+=S*B,_+=z*k,_+=C*(5*G),c+=_>>>13,_&=8191,A=c,A+=U*G,A+=q*Y,A+=E*R,A+=x*D,A+=L*Z,c=A>>>13,A&=8191,A+=M*P,A+=K*N,A+=S*T,A+=z*B,A+=C*k,c+=A>>>13,A&=8191,c=(c<<2)+c|0,c=c+l|0,l=8191&c,c>>>=13,y+=c,U=l,q=y,E=p,x=w,L=g,M=v,K=d,S=b,z=_,C=A,t+=16,n-=16;this.h[0]=U,this.h[1]=q,this.h[2]=E,this.h[3]=x,this.h[4]=L,this.h[5]=M,this.h[6]=K,this.h[7]=S,this.h[8]=z,this.h[9]=C},ur.prototype.finish=function(r,t){var n,e,o,i,h=new Uint16Array(10);if(this.leftover){for(i=this.leftover,this.buffer[i++]=1;i<16;i++)this.buffer[i]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(n=this.h[1]>>>13,this.h[1]&=8191,i=2;i<10;i++)this.h[i]+=n,n=this.h[i]>>>13,this.h[i]&=8191;for(this.h[0]+=5*n,n=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=n,n=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=n,h[0]=this.h[0]+5,n=h[0]>>>13,h[0]&=8191,i=1;i<10;i++)h[i]=this.h[i]+n,n=h[i]>>>13,h[i]&=8191;for(h[9]-=8192,e=(1^n)-1,i=0;i<10;i++)h[i]&=e;for(e=~e,i=0;i<10;i++)this.h[i]=this.h[i]&e|h[i];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),o=this.h[0]+this.pad[0],this.h[0]=65535&o,i=1;i<8;i++)o=(this.h[i]+this.pad[i]|0)+(o>>>16)|0,this.h[i]=65535&o;r[t+0]=this.h[0]>>>0&255,r[t+1]=this.h[0]>>>8&255,r[t+2]=this.h[1]>>>0&255,r[t+3]=this.h[1]>>>8&255,r[t+4]=this.h[2]>>>0&255,r[t+5]=this.h[2]>>>8&255,r[t+6]=this.h[3]>>>0&255,r[t+7]=this.h[3]>>>8&255,r[t+8]=this.h[4]>>>0&255,r[t+9]=this.h[4]>>>8&255,r[t+10]=this.h[5]>>>0&255,r[t+11]=this.h[5]>>>8&255,r[t+12]=this.h[6]>>>0&255,r[t+13]=this.h[6]>>>8&255,r[t+14]=this.h[7]>>>0&255,r[t+15]=this.h[7]>>>8&255},ur.prototype.update=function(r,t,n){var e,o;if(this.leftover){for((o=16-this.leftover)>n&&(o=n),e=0;e<o;e++)this.buffer[this.leftover+e]=r[t+e];if(n-=o,t+=o,this.leftover+=o,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(n>=16&&(o=n-n%16,this.blocks(r,t,o),t+=o,n-=o),n){for(e=0;e<n;e++)this.buffer[this.leftover+e]=r[t+e];this.leftover+=n}};var cr=w,lr=g,yr=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],pr=new Float64Array([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]),wr=32,gr=24,vr=32,dr=32,br=gr;r.lowlevel={crypto_core_hsalsa20:s,crypto_stream_xor:l,crypto_stream:c,crypto_stream_salsa20_xor:f,crypto_stream_salsa20:u,crypto_onetimeauth:y,crypto_onetimeauth_verify:p,crypto_verify_16:e,crypto_verify_32:o,crypto_secretbox:w,crypto_secretbox_open:g,crypto_scalarmult:S,crypto_scalarmult_base:z,crypto_box_beforenm:k,crypto_box_afternm:cr,crypto_box:function(r,t,n,e,o,i){var h=new Uint8Array(32);return k(h,o,i),cr(r,t,n,e,h)},crypto_box_open:function(r,t,n,e,o,i){var h=new Uint8Array(32);return k(h,o,i),lr(r,t,n,e,h)},crypto_box_keypair:C,crypto_hash:T,crypto_sign:F,crypto_sign_keypair:Y,crypto_sign_open:W,crypto_secretbox_KEYBYTES:wr,crypto_secretbox_NONCEBYTES:gr,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:16,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:vr,crypto_box_SECRETKEYBYTES:dr,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:br,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:64,crypto_sign_PUBLICKEYBYTES:32,crypto_sign_SECRETKEYBYTES:64,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64},r.randomBytes=function(r){var t=new Uint8Array(r);return j(t,r),t},r.secretbox=function(r,t,n){Q(r,t,n),O(n,t);for(var e=new Uint8Array(32+r.length),o=new Uint8Array(e.length),i=0;i<r.length;i++)e[i+32]=r[i];return w(o,e,e.length,t,n),o.subarray(16)},r.secretbox.open=function(r,t,n){Q(r,t,n),O(n,t);for(var e=new Uint8Array(16+r.length),o=new Uint8Array(e.length),i=0;i<r.length;i++)e[i+16]=r[i];return e.length<32?null:0!==g(o,e,e.length,t,n)?null:o.subarray(32)},r.secretbox.keyLength=wr,r.secretbox.nonceLength=gr,r.secretbox.overheadLength=16,r.scalarMult=function(r,t){if(Q(r,t),32!==r.length)throw new Error("bad n size");if(32!==t.length)throw new Error("bad p size");var n=new Uint8Array(32);return S(n,r,t),n},r.scalarMult.base=function(r){if(Q(r),32!==r.length)throw new Error("bad n size");var t=new Uint8Array(32);return z(t,r),t},r.scalarMult.scalarLength=32,r.scalarMult.groupElementLength=32,r.box=function(t,n,e,o){var i=r.box.before(e,o);return r.secretbox(t,n,i)},r.box.before=function(r,t){Q(r,t),J(r,t);var n=new Uint8Array(32);return k(n,r,t),n},r.box.after=r.secretbox,r.box.open=function(t,n,e,o){var i=r.box.before(e,o);return r.secretbox.open(t,n,i)},r.box.open.after=r.secretbox.open,r.box.keyPair=function(){var r=new Uint8Array(vr),t=new Uint8Array(dr);return C(r,t),{publicKey:r,secretKey:t}},r.box.keyPair.fromSecretKey=function(r){if(Q(r),r.length!==dr)throw new Error("bad secret key size");var t=new Uint8Array(vr);return z(t,r),{publicKey:t,secretKey:new Uint8Array(r)}},r.box.publicKeyLength=vr,r.box.secretKeyLength=dr,r.box.sharedKeyLength=32,r.box.nonceLength=br,r.box.overheadLength=r.secretbox.overheadLength,r.sign=function(r,t){if(Q(r,t),64!==t.length)throw new Error("bad secret key size");var n=new Uint8Array(64+r.length);return F(n,r,r.length,t),n},r.sign.open=function(r,t){if(Q(r,t),32!==t.length)throw new Error("bad public key size");var n=new Uint8Array(r.length),e=W(n,r,r.length,t);if(e<0)return null;for(var o=new Uint8Array(e),i=0;i<o.length;i++)o[i]=n[i];return o},r.sign.detached=function(t,n){for(var e=r.sign(t,n),o=new Uint8Array(64),i=0;i<o.length;i++)o[i]=e[i];return o},r.sign.detached.verify=function(r,t,n){if(Q(r,t,n),64!==t.length)throw new Error("bad signature size");if(32!==n.length)throw new Error("bad public key size");var e,o=new Uint8Array(64+r.length),i=new Uint8Array(64+r.length);for(e=0;e<64;e++)o[e]=t[e];for(e=0;e<r.length;e++)o[e+64]=r[e];return W(i,o,o.length,n)>=0},r.sign.keyPair=function(){var r=new Uint8Array(32),t=new Uint8Array(64);return Y(r,t),{publicKey:r,secretKey:t}},r.sign.keyPair.fromSecretKey=function(r){if(Q(r),64!==r.length)throw new Error("bad secret key size");for(var t=new Uint8Array(32),n=0;n<t.length;n++)t[n]=r[32+n];return{publicKey:t,secretKey:new Uint8Array(r)}},r.sign.keyPair.fromSeed=function(r){if(Q(r),32!==r.length)throw new Error("bad seed size");for(var t=new Uint8Array(32),n=new Uint8Array(64),e=0;e<32;e++)n[e]=r[e];return Y(t,n,!0),{publicKey:t,secretKey:n}},r.sign.publicKeyLength=32,r.sign.secretKeyLength=64,r.sign.seedLength=32,r.sign.signatureLength=64,r.hash=function(r){Q(r);var t=new Uint8Array(64);return T(t,r,r.length),t},r.hash.hashLength=64,r.verify=function(r,t){return Q(r,t),0!==r.length&&0!==t.length&&r.length===t.length&&0===n(r,0,t,0,r.length)},r.setPRNG=function(r){j=r},function(){var t="undefined"!=typeof self?self.crypto||self.msCrypto:null;if(t&&t.getRandomValues){r.setPRNG(function(r,n){var e,o=new Uint8Array(n);for(e=0;e<n;e+=65536)t.getRandomValues(o.subarray(e,e+Math.min(n-e,65536)));for(e=0;e<n;e++)r[e]=o[e];H(o)})}else"undefined"!=typeof require&&(t=require("crypto"))&&t.randomBytes&&r.setPRNG(function(r,n){var e,o=t.randomBytes(n);for(e=0;e<n;e++)r[e]=o[e];H(o)})}()}("undefined"!=typeof module&&module.exports?module.exports:self.nacl=self.nacl||{});var Walrus;!function(r){function t(){if("function"!=typeof atob)throw new Error("missing environment support: atob");if("function"!=typeof btoa)throw new Error("missing environment support: btoa");if("function"!=typeof Uint8Array)throw new Error("missing environment support: Uint8Array");if("function"!=typeof Generator)throw new Error("missing dependency: more-entropy");if("object"!=typeof nacl)throw new Error("missing dependency: tweetnacl-js");u(),l()}function n(r,t,n){if(!function(r,t){return typeof r==typeof t&&("object"==typeof r?o(r,t):r===t)}(r,t))throw new Error("assertion failed"+(n?": "+n:""))}function e(r){try{r()}catch(r){return}throw new Error("expected error, nothing happened")}function o(r,t){if(r.length!==t.length)return!1;for(var n=0;n<r.length;++n)if(r[n]!==t[n])return!1;return!0}function i(r,t){return r[t]<<24|r[t+1]<<16|r[t+2]<<8|r[t+3]}function h(r){for(var t=[],n=0,e=0;e<r.length;e++){var o=r.charCodeAt(e),i=void 0;o<128?t[n++]=o:o<2048?(t[n++]=o>>6|192,t[n++]=63&o|128):55296==(64512&o)&&e+1<r.length&&56320==(64512&(i=r.charCodeAt(e+1)))?(o=65536+((1023&o)<<10)+(1023&i),++e,t[n++]=o>>18|240,t[n++]=o>>12&63|128,t[n++]=o>>6&63|128,t[n++]=63&o|128):(t[n++]=o>>12|224,t[n++]=o>>6&63|128,t[n++]=63&o|128)}return new Uint8Array(t)}function a(r){for(var t=[],n=0,e=0;e<r.length;){var o=r[e++],i=void 0,h=void 0,a=void 0;if(o<128)t[n++]=o;else{if(o<194)throw"invalid UTF-8";if(o<224){if(e+1>r.length||128!=(192&(i=r[e++])))throw"invalid UTF-8";t[n++]=(31&o)<<6|63&i}else if(o<240){if(e+2>r.length||128!=(192&(i=r[e++]))||128!=(192&(h=r[e++])))throw"invalid UTF-8";if((o=(15&o)<<12|(63&i)<<6|63&h)<2048||55296<=o&&o<57344)throw"invalid UTF-8";t[n++]=o}else{if(!(o<245))throw"invalid UTF-8";if(e+3>r.length||128!=(192&(i=r[e++]))||128!=(192&(h=r[e++]))||128!=(192&(a=r[e++])))throw"invalid UTF-8";if((o=((7&o)<<18|(63&i)<<12|(63&h)<<6|63&a)-65536)<0||o>=1048576)throw"invalid UTF-8";t[n++]=55296+(o>>10),t[n++]=56320+(1023&o)}}}return String.fromCharCode.apply(null,t)}function s(r){return btoa(String.fromCharCode.apply(null,r))}function f(r){if(!r.match(/^(?:[0-9A-Za-z+/]{4})*(?:[0-9A-Za-z+/][AQgw]==|[0-9A-Za-z+/]{2}[048AEIMQUYcgkosw]=)?$/))throw new Error("bad base64 input");for(var t=atob(r),n=new Uint8Array(t.length),e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}function u(){var r=function(r,t){n(a(new Uint8Array(r)),t),n(h(t),r)};r([94,95,94],"^_^"),r([127],""),r([194,128],""),r([209,129,208,190,209,128,208,190,208,186,32,208,180,208,178,208,176],"сорок два"),r([223,191],"߿"),r([224,160,128],"ࠀ"),r([236,149,136,235,133,149,63],"안녕?"),r([239,191,191],String.fromCharCode(65535)),r([240,144,128,128],"𐀀"),r([240,159,146,169],"💩"),r([244,143,191,191],""),n(h("\udc00\ud800"),[237,176,128,237,160,128]);for(var t=0,o=[[128],[191],[192],[193],[194],[194,127],[194,192],[223],[224],[224,128],[224,128,128],[224,159,191],[225],[225,128],[225,127,128],[225,192,128],[225,128,127],[225,128,192],[237,160,128],[237,191,191],[239],[239,191],[240],[240,128],[240,128,128],[240,128,128,128],[240,143,191,191],[241],[241,128],[241,128,128],[241,127,128,128],[241,192,128,128],[241,128,127,128],[241,128,192,128],[241,128,128,127],[241,128,128,192],[244],[244,143],[244,143,191],[244,144,128,128],[245],[255]];t<o.length;t++)!function(r){e(function(){return a(r)})}(l=o[t]);var i=function(r,t){n(s(new Uint8Array(r)),t),n(f(t),r)};i([],""),i([1],"AQ=="),i([42],"Kg=="),i([0,255],"AP8="),i([255,0],"/wA="),i([0,255,0],"AP8A"),i([255,0,255],"/wD/"),i([12,34,56],"DCI4"),i([12,34,56,78],"DCI4Tg=="),i([12,34,56,78,90],"DCI4Tlo="),i([251,239,190,251,239,190],"++++++++"),i([255,255,255,255,255,255],"////////");for(var u=0,c=["!","A","B","AB","AP","AAB","AAD","AAD","====","A===","B===","AB==","AP==","AAB=","AAD=","AAD=","AAAA====","AP8=/wA=","AP 8","AP 8="];u<c.length;u++){var l=c[u];!function(r){e(function(){return f(r)})}(l)}}function c(r,t){r.length>128&&(r=nacl.hash(r));for(var n=new Uint8Array(128+t.length),e=new Uint8Array(128+nacl.hash.hashLength),o=0;o<128;++o){var i=r[o]||0;n[o]=54^i,e[o]=92^i}return n.set(t,128),e.set(nacl.hash(n),128),nacl.hash(e)}function l(){function r(r,t,e){n(c(f(r),f(t)),f(e))}r("CwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCw==","SGkgVGhlcmU=","Y37cbgHc5+Z0KplFGq6C3yPaPpJDnlkOQ+dhsz6RD7isKHjr1YA/bwth285eJR/4eJpHIsG+Za6kX9Rk6J+PWw=="),r("SmVmZUplZmVKZWZlSmVmZUplZmVKZWZlSmVmZUplZmVKZWZlSmVmZUplZmVKZWZlSmVmZUplZmVKZWZlSmVmZQ==","d2hhdCBkbyB5YSB3YW50IGZvciBub3RoaW5nPw==","yzcJF66KfOKM/R2PRwXWFBwXOyqTYsFd8jXfslGxVFRqozSun7mvwhhJMthpXjl7+g/7k0Zs/M6q44yDO326OA=="),r("qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqg==","3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d0=","Lues14NiTKk5hxDz7gWuQbn5sFEMh+SeWGzJv5YXM9hiPHtVzr78zwLVWBrMHJ1fsf9ood5FUJ++TamkM5ImVQ=="),r("AQIDBAUGBwgJCgsMDQ4PEBESExQVFhcYGRobHB0eHyAhIiMkJSYnKCkqKywtLi8wMTIzNDU2Nzg5Ojs8PT4/QA==","zc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc0=","XmaI5aPa7IJsoy6uoiTv9ecAYolHRw4TrQEwJWG6sQi4xIy8a4B9z72FBSGmhbq8fq5KKi5mDcDoa5MdZVA/0g==")}function y(r){var t=f(r);if(t.length<10+nacl.box.publicKeyLength)return null;if(!o(t.subarray(0,6),[89,169,107,186,195,245]))return null;var n=t.subarray(6,6+nacl.box.publicKeyLength),e=i(t,6+nacl.box.publicKeyLength),h=t.subarray(10+nacl.box.publicKeyLength);return h.length!==e?null:{realm:h,serverPublicKey:n}}function p(r){var t=f(r);if(t.length<6+nacl.box.nonceLength+nacl.box.overheadLength)return null;if(!o(t.subarray(0,6),[89,169,107,186,196,117]))return null;var n=t.subarray(6,6+nacl.box.nonceLength);return{output:t.subarray(6+nacl.box.nonceLength),nonce:n}}var w,g=function(){function r(r){var n=this;t();var e;try{e=y(r)}catch(r){throw new Error("bad parameters")}if(!e)throw new Error("bad parameters");this.realm=e.realm,this.serverPublicKey=e.serverPublicKey,this.withRandomGenerator=function(r,t){w(r,function(r){n.withRandomGenerator=function(t,n){return n(r)},e=nacl.box.keyPair(),n.clientPublicKey=e.publicKey,n.clientSecretKey=e.secretKey,t(r);var e})}}return r.prototype.makeSecret=function(r,t,n){var e=this,o=h(r),i=h(t);this.withRandomGenerator(this.realm,function(r){var t=[83,105,108,118,101,114,118,105,110,101,67,108,105,101,110,116],h=new Uint8Array(t.length+e.realm.length+o.length);h.set(t),h.set(e.realm,t.length),h.set(o,t.length+e.realm.length);var a=c(h,i),f=r(nacl.box.nonceLength),u=nacl.box(a,f,e.serverPublicKey,e.clientSecretKey),l=new Uint8Array(6+2*nacl.box.publicKeyLength+nacl.box.nonceLength+u.length);return l.set([89,169,107,186,196,181]),l.set(e.serverPublicKey,6),l.set(e.clientPublicKey,6+nacl.box.publicKeyLength),l.set(f,6+2*nacl.box.publicKeyLength),l.set(u,6+2*nacl.box.publicKeyLength+nacl.box.nonceLength),n(s(l))})},r.prototype.decodeResultAsByteArray=function(r,t,n){var e,o=function(){return n(new Error("bad authentication result"))};try{e=p(r)}catch(r){return o()}if(!e)return o();var i=nacl.box.open(e.output,e.nonce,this.serverPublicKey,this.clientSecretKey);return i?t(i):o()},r.prototype.decodeResultAsString=function(r,t,n){return this.decodeResultAsByteArray(r,function(r){var e;try{e=a(r)}catch(r){return n(r)}return t(e)},n)},r}();r.WebAuth=g;var v=function(){function r(r){this.k=new Uint8Array(nacl.hash.hashLength),this.v=new Uint8Array(nacl.hash.hashLength);for(var t=0;t<nacl.hash.hashLength;++t)this.k[t]=0,this.v[t]=1;this.reseed(r)}return r.prototype.update=function(r){var t=new Uint8Array(this.v.length+1+(r?r.length:0));t.set(this.v,0),t[this.v.length]=0,r&&t.set(r,this.v.length+1),this.k=c(this.k,t),this.v=c(this.k,this.v),r&&(t.set(this.v,0),t[this.v.length]=1,this.k=c(this.k,t),this.v=c(this.k,this.v))},r.prototype.reseed=function(t){if(t.length<r.MIN_SEED_LENGTH)throw new Error("too small seed input");this.update(t),this.counter=1},r.prototype.generate=function(r,t){if(this.counter>=281474976710656)throw new Error("reseed is required");t&&this.update(t);for(var n=new Uint8Array(r),e=r-r%nacl.hash.hashLength,o=0;o<e;o+=nacl.hash.hashLength)this.v=c(this.k,this.v),n.set(this.v,o);return e<r&&(this.v=c(this.k,this.v),n.set(this.v.subarray(0,r-e),e)),this.update(t),++this.counter,n},r.MIN_SEED_LENGTH=48,r}(),d=window.crypto||window.msCrypto;if(d&&d.getRandomValues){var b=d.getRandomValues.bind(d);w=function(r,t){t(function(r){var t=new Uint8Array(r);return b(t),t})}}else w=function(r,t){(new Generator).generate(8*v.MIN_SEED_LENGTH,function(n){var e=new Uint8Array(16+r.length),o=[83,105,108,118,101,114,118,105,110,101,82,97,110,100,111,109];e.set(o),e.set(r,16);var i=new Uint8Array(c(e,h(JSON.stringify(n))),0,v.MIN_SEED_LENGTH),a=new v(i);nacl.setPRNG(function(r,t){return r.set(a.generate(t))}),t(function(r){return a.generate(r)})})}}(Walrus||(Walrus={}));