/*! OpenPGPjs.org this is LGPL licensed code, see LICENSE/our website for more information.- v1.6.2 - 2016-06-08 */!function(a){if("object"==typeofexports&&"undefined"!=typeofmodule)module.exports=a();elseif("function"==typeofdefine&&define.amd)define([],a);else{varb;b="undefined"!=typeofwindow?window:"undefined"!=typeofglobal?global:"undefined"!=typeofself?self:this,b.openpgp=a()}}(function(){returnfunctiona(b,c,d){functione(g,h){if(!c[g]){if(!b[g]){vari="function"==typeofrequire&&require;if(!h&&i)returni(g,!0);if(f)returnf(g,!0);varj=newError("Cannot find module '"+g+"'");throwj.code="MODULE_NOT_FOUND",j}vark=c[g]={exports:{}};b[g][0].call(k.exports,function(a){varc=b[g][1][a];returne(c?c:a)},k,k.exports,a,b,c,d)}returnc[g].exports}for(varf="function"==typeofrequire&&require,g=0;g<d.length;g++)e(d[g]);returne}({1:[function(a,b,c){"use strict";vard=a("./promise/promise").Promise,e=a("./promise/polyfill").polyfill;c.Promise=d,c.polyfill=e},{"./promise/polyfill":5,"./promise/promise":6}],2:[function(a,b,c){"use strict";functiond(a){varb=this;if(!e(a))thrownewTypeError("You must pass an array to all.");returnnewb(function(b,c){functiond(a){returnfunction(b){e(a,b)}}functione(a,c){h[a]=c,0===--i&&b(h)}varg,h=[],i=a.length;0===i&&b([]);for(varj=0;j<a.length;j++)g=a[j],g&&f(g.then)?g.then(d(j),c):e(j,g)})}vare=a("./utils").isArray,f=a("./utils").isFunction;c.all=d},{"./utils":10}],3:[function(a,b,c){(function(a,b){"use strict";functiond(){returnfunction(){a.nextTick(g)}}functione(){vara=0,b=newk(g),c=document.createTextNode("");returnb.observe(c,{characterData:!0}),function(){c.data=a=++a%2}}functionf(){returnfunction(){l.setTimeout(g,1)}}functiong(){for(vara=0;a<m.length;a++){varb=m[a],c=b[0],d=b[1];c(d)}m=[]}functionh(a,b){varc=m.push([a,b]);1===c&&i()}vari,j="undefined"!=typeofwindow?window:{},k=j.MutationObserver||j.WebKitMutationObserver,l="undefined"!=typeofb?b:void0===this?window:this,m=[];i="undefined"!=typeofa&&"[object process]"==={}.toString.call(a)?d():k?e():f(),c.asap=h}).call(this,a("_process"),"undefined"!=typeofglobal?global:"undefined"!=typeofself?self:"undefined"!=typeofwindow?window:{})},{_process:11}],4:[function(a,b,c){"use strict";functiond(a,b){return2!==arguments.length?e[a]:void(e[a]=b)}vare={instrument:!1};c.config=e,c.configure=d},{}],5:[function(a,b,c){(function(b){"use strict";functiond(){vara;a="undefined"!=typeofb?b:"undefined"!=typeofwindow&&window.document?window:self;varc="Promise"ina&&"resolve"ina.Promise&&"reject"ina.Promise&&"all"ina.Promise&&"race"ina.Promise&&function(){varb;returnnewa.Promise(function(a){b=a}),f(b)}();c||(a.Promise=e)}vare=a("./promise").Promise,f=a("./utils").isFunction;c.polyfill=d}).call(this,"undefined"!=typeofglobal?global:"undefined"!=typeofself?self:"undefined"!=typeofwindow?window:{})},{"./promise":6,"./utils":10}],6:[function(a,b,c){"use strict";functiond(a){if(!q(a))thrownewTypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(thisinstanceofd))thrownewTypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this._subscribers=[],e(a,this)}functione(a,b){functionc(a){j(b,a)}functiond(a){l(b,a)}try{a(c,d)}catch(e){d(e)}}functionf(a,b,c,d){vare,f,g,h,k=q(c);if(k)try{e=c(d),g=!0}catch(m){h=!0,f=m}elsee=d,g=!0;i(b,e)||(k&&g?j(b,e):h?l(b,f):a===y?j(b,e):a===z&&l(b,e))}functiong(a,b,c,d){vare=a._subscribers,f=e.length;e[f]=b,e[f+y]=c,e[f+z]=d}functionh(a,b){for(varc,d,e=a._subscribers,g=a._detail,h=0;h<e.length;h+=3)c=e[h],d=e[h+b],f(b,c,d,g);a._subscribers=null}functioni(a,b){varc,d=null;try{if(a===b)thrownewTypeError("A promises callback cannot return that same promise.");if(p(b)&&(d=b.then,q(d)))returnd.call(b,function(d){returnc?!0:(c=!0,void(b!==d?j(a,d):k(a,d)))},function(b){returnc?!0:(c=!0,voidl(a,b))}),!0}catch(e){returnc?!0:(l(a,e),!0)}return!1}functionj(a,b){a===b?k(a,b):i(a,b)||k(a,b)}functionk(a,b){a._state===w&&(a._state=x,a._detail=b,o.async(m,a))}functionl(a,b){a._state===w&&(a._state=x,a._detail=b,o.async(n,a))}functionm(a){h(a,a._state=y)}functionn(a){h(a,a._state=z)}varo=a("./config").config,p=(a("./config").configure,a("./utils").objectOrFunction),q=a("./utils").isFunction,r=(a("./utils").now,a("./all").all),s=a("./race").race,t=a("./resolve").resolve,u=a("./reject").reject,v=a("./asap").asap;o.async=v;varw=void0,x=0,y=1,z=2;d.prototype={constructor:d,_state:void0,_detail:void0,_subscribers:void0,then:function(a,b){varc=this,d=newthis.constructor(function(){});if(this._state){vare=arguments;o.async(function(){f(c._state,d,e[c._state-1],c._detail)})}elseg(this,d,a,b);returnd},"catch":function(a){returnthis.then(null,a)}},d.all=r,d.race=s,d.resolve=t,d.reject=u,c.Promise=d},{"./all":2,"./asap":3,"./config":4,"./race":7,"./reject":8,"./resolve":9,"./utils":10}],7:[function(a,b,c){"use strict";functiond(a){varb=this;if(!e(a))thrownewTypeError("You must pass an array to race.");returnnewb(function(b,c){for(vard,e=0;e<a.length;e++)d=a[e],d&&"function"==typeofd.then?d.then(b,c):b(d)})}vare=a("./utils").isArray;c.race=d},{"./utils":10}],8:[function(a,b,c){"use strict";functiond(a){varb=this;returnnewb(function(b,c){c(a)})}c.reject=d},{}],9:[function(a,b,c){"use strict";functiond(a){if(a&&"object"==typeofa&&a.constructor===this)returna;varb=this;returnnewb(function(b){b(a)})}c.resolve=d},{}],10:[function(a,b,c){"use strict";functiond(a){returne(a)||"object"==typeofa&&null!==a}functione(a){return"function"==typeofa}functionf(a){return"[object Array]"===Object.prototype.toString.call(a)}varg=Date.now||function(){return(newDate).getTime()};c.objectOrFunction=d,c.isFunction=e,c.isArray=f,c.now=g},{}],11:[function(a,b,c){functiond(){k=!1,h.length?j=h.concat(j):l=-1,j.length&&e()}functione(){if(!k){vara=setTimeout(d);k=!0;for(varb=j.length;b;){for(h=j,j=[];++l<b;)h&&h[l].run();l=-1,b=j.length}h=null,k=!1,clearTimeout(a)}}functionf(a,b){this.fun=a,this.array=b}functiong(){}varh,i=b.exports={},j=[],k=!1,l=-1;i.nextTick=function(a){varb=newArray(arguments.length-1);if(arguments.length>1)for(varc=1;c<arguments.length;c++)b[c-1]=arguments[c];j.push(newf(a,b)),1!==j.length||k||setTimeout(e,0)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.binding=function(a){thrownewError("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(a){thrownewError("process.chdir is not supported")},i.umask=function(){return0}},{}],12:[function(a,b,c){"use strict";functiond(a,b){returnthisinstanceofd?(this.text=a.replace(/\r/g,"").replace(/[\t ]+\n/g,"\n").replace(/\n/g,"\r\n"),void(this.packets=b||newh.List)):newd(a,b)}functione(a){varb=j.decode(a);if(b.type!==i.armor.signed)thrownewError("No cleartext signed message.");varc=newh.List;c.read(b.data),f(b.headers,c);vare=newd(b.text,c);returne}functionf(a,b){for(varc=function(a){for(varc=0;c<b.length;c++)if(b[c].tag===i.packet.signature&&!a.some(function(a){returnb[c].hashAlgorithm===a}))return!1;return!0},d=null,e=[],f=0;f<a.length;f++){if(d=a[f].match(/Hash: (.+)/),!d)thrownewError('Only "Hash" header allowed in cleartext signed message');d=d[1].replace(/\s/g,""),d=d.split(","),d=d.map(function(a){a=a.toLowerCase();try{returni.write(i.hash,a)}catch(b){thrownewError("Unknown hash algorithm in armor header: "+a)}}),e=e.concat(d)}if(!e.length&&!c([i.hash.md5]))thrownewError('If no "Hash" header in cleartext signed message, then only MD5 signatures allowed');if(!c(e))thrownewError("Hash algorithm mismatch in armor header and signature")}varg=a("./config"),h=a("./packet"),i=a("./enums.js"),j=a("./encoding/armor.js");d.prototype.getSigningKeyIds=function(){vara=[],b=this.packets.filterByTag(i.packet.signature);returnb.forEach(function(b){a.push(b.issuerKeyId)}),a},d.prototype.sign=function(a){varb=newh.List,c=newh.Literal;c.setText(this.text);for(vard=0;d<a.length;d++){if(a[d].isPublic())thrownewError("Need private key for signing");vare=newh.Signature;e.signatureType=i.signature.text,e.hashAlgorithm=g.prefer_hash_algorithm;varf=a[d].getSigningKeyPacket();if(e.publicKeyAlgorithm=f.algorithm,!f.isDecrypted)thrownewError("Private key is not decrypted.");e.sign(f,c),b.push(e)}this.packets=b},d.prototype.verify=function(a){varb=[],c=this.packets.filterByTag(i.packet.signature),d=newh.Literal;d.setText(this.text);for(vare=0;e<c.length;e++){for(varf=null,g=0;g<a.length&&!(f=a[g].getSigningKeyPacket(c[e].issuerKeyId));g++);varj={};f?(j.keyid=c[e].issuerKeyId,j.valid=c[e].verify(f,d)):(j.keyid=c[e].issuerKeyId,j.valid=null),b.push(j)}returnb},d.prototype.getText=function(){returnthis.text.replace(/\r\n/g,"\n")},d.prototype.armor=function(){vara={hash:i.read(i.hash,g.prefer_hash_algorithm).toUpperCase(),text:this.text,data:this.packets.write()};returnj.encode(i.armor.signed,a)},c.CleartextMessage=d,c.readArmored=e},{"./config":17,"./encoding/armor.js":41,"./enums.js":43,"./packet":55}],13:[function(a,b,c){(function(){"use strict";functiona(a,b){varc=a.split("."),d=n;!(c[0]ind)&&d.execScript&&d.execScript("var "+c[0]);for(vare;c.length&&(e=c.shift());)c.length||b===l?d=d[e]?d[e]:d[e]={}:d[e]=b}functionb(a,b){if(this.index="number"==typeofb?b:0,this.d=0,this.buffer=ainstanceof(o?Uint8Array:Array)?a:new(o?Uint8Array:Array)(32768),2*this.buffer.length<=this.index)throwError("invalid index");this.buffer.length<=this.index&&c(this)}functionc(a){varb,c=a.buffer,d=c.length,e=new(o?Uint8Array:Array)(d<<1);if(o)e.set(c);elsefor(b=0;d>b;++b)e[b]=c[b];returna.buffer=e}functiond(a){this.buffer=new(o?Uint16Array:Array)(2*a),this.length=0}functione(a,b){this.e=w,this.f=0,this.input=o&&ainstanceofArray?newUint8Array(a):a,this.c=0,b&&(b.lazy&&(this.f=b.lazy),"number"==typeofb.compressionType&&(this.e=b.compressionType),b.outputBuffer&&(this.b=o&&b.outputBufferinstanceofArray?newUint8Array(b.outputBuffer):b.outputBuffer),"number"==typeofb.outputIndex&&(this.c=b.outputIndex)),this.b||(this.b=new(o?Uint8Array:Array)(32768))}functionf(a,b){this.length=a,this.g=b}functiong(a,b){functionc(a,b){varc,d=a.g,e=[],f=0;c=z[a.length],e[f++]=65535&c,e[f++]=c>>16&255,e[f++]=c>>24;varg;switch(m){case1===d:g=[0,d-1,0];break;case2===d:g=[1,d-2,0];break;case3===d:g=[2,d-3,0];break;case4===d:g=[3,d-4,0];break;case6>=d:g=[4,d-5,1];break;case8>=d:g=[5,d-7,1];break;case12>=d:g=[6,d-9,2];break;case16>=d:g=[7,d-13,2];break;case24>=d:g=[8,d-17,3];break;case32>=d:g=[9,d-25,3];break;case48>=d:g=[10,d-33,4];break;case64>=d:g=[11,d-49,4];break;case96>=d:g=[12,d-65,5];break;case128>=d:g=[13,d-97,5];break;case192>=d:g=[14,d-129,6];break;case256>=d:g=[15,d-193,6];break;case384>=d:g=[16,d-257,7];break;case512>=d:g=[17,d-385,7];break;case768>=d:g=[18,d-513,8];break;case1024>=d:g=[19,d-769,8];break;case1536>=d:g=[20,d-1025,9];break;case2048>=d:g=[21,d-1537,9];break;case3072>=d:g=[22,d-2049,10];break;case4096>=d:g=[23,d-3073,10];break;case6144>=d:g=[24,d-4097,11];break;case8192>=d:g=[25,d-6145,11];break;case12288>=d:g=[26,d-8193,12];break;case16384>=d:g=[27,d-12289,12];break;case24576>=d:g=[28,d-16385,13];break;case32768>=d:g=[29,d-24577,13];break;default:throw"invalid distance"}c=g,e[f++]=c[0],e[f++]=c[1],e[f++]=c[2];varh,i;for(h=0,i=e.length;i>h;++h)r[s++]=e[h];u[e[0]]++,v[e[3]]++,t=a.length+b-1,n=null}vard,e,f,g,i,j,k,n,p,q={},r=o?newUint16Array(2*b.length):[],s=0,t=0,u=new(o?Uint32Array:Array)(286),v=new(o?Uint32Array:Array)(30),w=a.f;if(!o){for(f=0;285>=f;)u[f++]=0;for(f=0;29>=f;)v[f++]=0}for(u[256]=1,d=0,e=b.length;e>d;++d){for(f=i=0,g=3;g>f&&d+f!==e;++f)i=i<<8|b[d+f];if(q[i]===l&&(q[i]=[]),j=q[i],!(0<t--)){for(;0<j.length&&32768<d-j[0];)j.shift();if(d+3>=e){for(n&&c(n,-1),f=0,g=e-d;g>f;++f)p=b[d+f],r[s++]=p,++u[p];break}0<j.length?(k=h(b,d,j),n?n.length<k.length?(p=b[d-1],r[s++]=p,++u[p],c(k,0)):c(n,-1):k.length<w?n=k:c(k,0)):n?c(n,-1):(p=b[d],r[s++]=p,++u[p])}j.push(d)}returnr[s++]=256,u[256]++,a.j=u,a.i=v,o?r.subarray(0,s):r}functionh(a,b,c){vard,e,g,h,i,j,k=0,l=a.length;h=0,j=c.length;a:for(;j>h;h++){if(d=c[j-h-1],g=3,k>3){for(i=k;i>3;i--)if(a[d+i-1]!==a[b+i-1])continuea;g=k}for(;258>g&&l>b+g&&a[d+g]===a[b+g];)++g;if(g>k&&(e=d,k=g),258===g)break}returnnewf(k,b-e)}functioni(a,b){varc,e,f,g,h,i=a.length,k=newd(572),l=new(o?Uint8Array:Array)(i);if(!o)for(g=0;i>g;g++)l[g]=0;for(g=0;i>g;++g)0<a[g]&&k.push(g,a[g]);if(c=Array(k.length/2),e=new(o?Uint32Array:Array)(k.length/2),1===c.length)returnl[k.pop().index]=1,l;for(g=0,h=k.length/2;h>g;++g)c[g]=k.pop(),e[g]=c[g].value;for(f=j(e,e.length,b),g=0,h=c.length;h>g;++g)l[c[g].index]=f[g];returnl}functionj(a,b,c){functiond(a){varc=n[a][p[a]];c===b?(d(a+1),d(a+1)):--l[c],++p[a]}vare,f,g,h,i,j=new(o?Uint16Array:Array)(c),k=new(o?Uint8Array:Array)(c),l=new(o?Uint8Array:Array)(b),m=Array(c),n=Array(c),p=Array(c),q=(1<<c)-b,r=1<<c-1;for(j[c-1]=b,f=0;c>f;++f)r>q?k[f]=0:(k[f]=1,q-=r),q<<=1,j[c-2-f]=(j[c-1-f]/2|0)+b;for(j[0]=k[0],m[0]=Array(j[0]),n[0]=Array(j[0]),f=1;c>f;++f)j[f]>2*j[f-1]+k[f]&&(j[f]=2*j[f-1]+k[f]),m[f]=Array(j[f]),n[f]=Array(j[f]);for(e=0;b>e;++e)l[e]=c;for(g=0;g<j[c-1];++g)m[c-1][g]=a[g],n[c-1][g]=g;for(e=0;c>e;++e)p[e]=0;for(1===k[c-1]&&(--l[0],++p[c-1]),f=c-2;f>=0;--f){for(h=e=0,i=p[f+1],g=0;g<j[f];g++)h=m[f+1][i]+m[f+1][i+1],h>a[e]?(m[f][g]=h,n[f][g]=b,i+=2):(m[f][g]=a[e],n[f][g]=e,++e);p[f]=0,1===k[f]&&d(f)}returnl}functionk(a){varb,c,d,e,f=new(o?Uint16Array:Array)(a.length),g=[],h=[],i=0;for(b=0,c=a.length;c>b;b++)g[a[b]]=(0|g[a[b]])+1;for(b=1,c=16;c>=b;b++)h[b]=i,i+=0|g[b],i<<=1;for(b=0,c=a.length;c>b;b++)for(i=h[a[b]],h[a[b]]+=1,d=f[b]=0,e=a[b];e>d;d++)f[b]=f[b]<<1|1&i,i>>>=1;returnf}varl=void0,m=!0,n=this,o="undefined"!=typeofUint8Array&&"undefined"!=typeofUint16Array&&"undefined"!=typeofUint32Array&&"undefined"!=typeofDataView;b.prototype.a=function(a,b,d){vare,f=this.buffer,g=this.index,h=this.d,i=f[g];if(d&&b>1&&(a=b>8?(u[255&a]<<24|u[a>>>8&255]<<16|u[a>>>16&255]<<8|u[a>>>24&255])>>32-b:u[a]>>8-b),8>b+h)i=i<<b|a,h+=b;elsefor(e=0;b>e;++e)i=i<<1|a>>b-e-1&1,8===++h&&(h=0,f[g++]=u[i],i=0,g===f.length&&(f=c(this)));f[g]=i,this.buffer=f,this.d=h,this.index=g},b.prototype.finish=function(){vara,b=this.buffer,c=this.index;return0<this.d&&(b[c]<<=8-this.d,b[c]=u[b[c]],c++),o?a=b.subarray(0,c):(b.length=c,a=b),a};varp,q=new(o?Uint8Array:Array)(256);for(p=0;256>p;++p){for(varr=p,s=r,t=7,r=r>>>1;r;r>>>=1)s<<=1,s|=1&r,--t;q[p]=(s<<t&255)>>>0}varu=q;d.prototype.getParent=function(a){return2*((a-2)/4|0)},d.prototype.push=function(a,b){varc,d,e,f=this.buffer;for(c=this.length,f[this.length++]=b,f[this.length++]=a;c>0&&(d=this.getParent(c),f[c]>f[d]);)e=f[c],f[c]=f[d],f[d]=e,e=f[c+1],f[c+1]=f[d+1],f[d+1]=e,c=d;returnthis.length},d.prototype.pop=function(){vara,b,c,d,e,f=this.buffer;for(b=f[0],a=f[1],this.length-=2,f[0]=f[this.length],f[1]=f[this.length+1],e=0;(d=2*e+2,!(d>=this.length))&&(d+2<this.length&&f[d+2]>f[d]&&(d+=2),f[d]>f[e]);)c=f[e],f[e]=f[d],f[d]=c,c=f[e+1],f[e+1]=f[d+1],f[d+1]=c,e=d;return{index:a,value:b,length:this.length}};varv,w=2,x=[];for(v=0;288>v;v++)switch(m){case143>=v:x.push([v+48,8]);break;case255>=v:x.push([v-144+400,9]);break;case279>=v:x.push([v-256+0,7]);break;case287>=v:x.push([v-280+192,8]);break;default:throw"invalid literal: "+v}e.prototype.h=function(){vara,c,d,e,f=this.input;switch(this.e){case0:for(d=0,e=f.length;e>d;){c=o?f.subarray(d,d+65535):f.slice(d,d+65535),d+=c.length;varh=c,j=d===e,n=l,p=l,q=l,r=l,s=l,t=this.b,u=this.c;if(o){for(t=newUint8Array(this.b.buffer);t.length<=u+h.length+5;)t=newUint8Array(t.length<<1);t.set(this.b)}if(n=j?1:0,t[u++]=0|n,p=h.length,q=~p+65536&65535,t[u++]=255&p,t[u++]=p>>>8&255,t[u++]=255&q,t[u++]=q>>>8&255,o)t.set(h,u),u+=h.length,t=t.subarray(0,u);else{for(r=0,s=h.length;s>r;++r)t[u++]=h[r];t.length=u}this.c=u,this.b=t}break;case1:varv=newb(o?newUint8Array(this.b.buffer):this.b,this.c);v.a(1,1,m),v.a(1,2,m);vary,z,A,B=g(this,f);for(y=0,z=B.length;z>y;y++)if(A=B[y],b.prototype.a.apply(v,x[A]),A>256)v.a(B[++y],B[++y],m),v.a(B[++y],5),v.a(B[++y],B[++y],m);elseif(256===A)break;this.b=v.finish(),this.c=this.b.length;break;casew:varC,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R=newb(o?newUint8Array(this.b.buffer):this.b,this.c),S=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],T=Array(19);for(C=w,R.a(1,1,m),R.a(C,2,m),D=g(this,f),H=i(this.j,15),I=k(H),J=i(this.i,7),K=k(J),E=286;E>257&&0===H[E-1];E--);for(F=30;F>1&&0===J[F-1];F--);varU,V,W,X,Y,Z,$=E,_=F,aa=new(o?Uint32Array:Array)($+_),ba=new(o?Uint32Array:Array)(316),ca=new(o?Uint8Array:Array)(19);for(U=V=0;$>U;U++)aa[V++]=H[U];for(U=0;_>U;U++)aa[V++]=J[U];if(!o)for(U=0,X=ca.length;X>U;++U)ca[U]=0;for(U=Y=0,X=aa.length;X>U;U+=V){for(V=1;X>U+V&&aa[U+V]===aa[U];++V);if(W=V,0===aa[U])if(3>W)for(;0<W--;)ba[Y++]=0,ca[0]++;elsefor(;W>0;)Z=138>W?W:138,Z>W-3&&W>Z&&(Z=W-3),10>=Z?(ba[Y++]=17,ba[Y++]=Z-3,ca[17]++):(ba[Y++]=18,ba[Y++]=Z-11,ca[18]++),W-=Z;elseif(ba[Y++]=aa[U],ca[aa[U]]++,W--,3>W)for(;0<W--;)ba[Y++]=aa[U],ca[aa[U]]++;elsefor(;W>0;)Z=6>W?W:6,Z>W-3&&W>Z&&(Z=W-3),ba[Y++]=16,ba[Y++]=Z-3,ca[16]++,W-=Z}for(a=o?ba.subarray(0,Y):ba.slice(0,Y),L=i(ca,7),P=0;19>P;P++)T[P]=L[S[P]];for(G=19;G>4&&0===T[G-1];G--);for(M=k(L),R.a(E-257,5,m),R.a(F-1,5,m),R.a(G-4,4,m),P=0;G>P;P++)R.a(T[P],3,m);for(P=0,Q=a.length;Q>P;P++)if(N=a[P],R.a(M[N],L[N],m),N>=16){switch(P++,N){case16:O=2;break;case17:O=3;break;case18:O=7;break;default:throw"invalid code: "+N}R.a(a[P],O,m)}varda,ea,fa,ga,ha,ia,ja,ka,la=[I,H],ma=[K,J];for(ha=la[0],ia=la[1],ja=ma[0],ka=ma[1],da=0,ea=D.length;ea>da;++da)if(fa=D[da],R.a(ha[fa],ia[fa],m),fa>256)R.a(D[++da],D[++da],m),ga=D[++da],R.a(ja[ga],ka[ga],m),R.a(D[++da],D[++da],m);elseif(256===fa)break;this.b=R.finish(),this.c=this.b.length;break;default:throw"invalid compression type"}returnthis.b};vary=function(){functiona(a){switch(m){case3===a:return[257,a-3,0];case4===a:return[258,a-4,0];case5===a:return[259,a-5,0];case6===a:return[260,a-6,0];case7===a:return[261,a-7,0];case8===a:return[262,a-8,0];case9===a:return[263,a-9,0];case10===a:return[264,a-10,0];case12>=a:return[265,a-11,1];case14>=a:return[266,a-13,1];case16>=a:return[267,a-15,1];case18>=a:return[268,a-17,1];case22>=a:return[269,a-19,2];case26>=a:return[270,a-23,2];case30>=a:return[271,a-27,2];case34>=a:return[272,a-31,2];case42>=a:return[273,a-35,3];case50>=a:return[274,a-43,3];case58>=a:return[275,a-51,3];case66>=a:return[276,a-59,3];case82>=a:return[277,a-67,4];case98>=a:return[278,a-83,4];case114>=a:return[279,a-99,4];case130>=a:return[280,a-115,4];case162>=a:return[281,a-131,5];case194>=a:return[282,a-163,5];case226>=a:return[283,a-195,5];case257>=a:return[284,a-227,5];case258===a:return[285,a-258,0];default:throw"invalid length: "+a}}varb,c,d=[];for(b=3;258>=b;b++)c=a(b),d[b]=c[2]<<24|c[1]<<16|c[0];returnd}(),z=o?newUint32Array(y):y;a("Zlib.RawDeflate",e),a("Zlib.RawDeflate.prototype.compress",e.prototype.h);varA,B,C,D,E={NONE:0,FIXED:1,DYNAMIC:w};if(Object.keys)A=Object.keys(E);elsefor(BinA=[],C=0,E)A[C++]=B;for(C=0,D=A.length;D>C;++C)B=A[C],a("Zlib.RawDeflate.CompressionType."+B,E[B])}).call(this)},{}],14:[function(a,b,c){(function(){"use strict";functiona(a,b){varc=a.split("."),d=g;!(c[0]ind)&&d.execScript&&d.execScript("var "+c[0]);for(vare;c.length&&(e=c.shift());)c.length||void0===b?d=d[e]?d[e]:d[e]={}:d[e]=b}functionb(a){varb,c,d,e,f,g,i,j,k,l,m=a.length,n=0,o=Number.POSITIVE_INFINITY;for(j=0;m>j;++j)a[j]>n&&(n=a[j]),a[j]<o&&(o=a[j]);for(b=1<<n,c=new(h?Uint32Array:Array)(b),d=1,e=0,f=2;n>=d;){for(j=0;m>j;++j)if(a[j]===d){for(g=0,i=e,k=0;d>k;++k)g=g<<1|1&i,i>>=1;for(l=d<<16|j,k=g;b>k;k+=f)c[k]=l;++e}++d,e<<=1,f<<=1}return[c,n,o]}functionc(a,b){switch(this.g=[],this.h=32768,this.c=this.f=this.d=this.k=0,this.input=h?newUint8Array(a):a,this.l=!1,this.i=j,this.q=!1,(b||!(b={}))&&(b.index&&(this.d=b.index),b.bufferSize&&(this.h=b.bufferSize),b.bufferType&&(this.i=b.bufferType),b.resize&&(this.q=b.resize)),this.i){casei:this.a=32768,this.b=new(h?Uint8Array:Array)(32768+this.h+258);break;casej:this.a=0,this.b=new(h?Uint8Array:Array)(this.h),this.e=this.v,this.m=this.s,this.j=this.t;break;default:throwError("invalid inflate mode")}}functiond(a,b){for(varc,d=a.f,e=a.c,f=a.input,g=a.d,h=f.length;b>e;){if(g>=h)throwError("input buffer is broken");d|=f[g++]<<e,e+=8}returnc=d&(1<<b)-1,a.f=d>>>b,a.c=e-b,a.d=g,c}functione(a,b){for(varc,d,e=a.f,f=a.c,g=a.input,h=a.d,i=g.length,j=b[0],k=b[1];k>f&&!(h>=i);)e|=g[h++]<<f,f+=8;returnc=j[e&(1<<k)-1],d=c>>>16,a.f=e>>d,a.c=f-d,a.d=h,65535&c}functionf(a){functionc(a,b,c){varf,g,h,i=this.p;for(h=0;a>h;)switch(f=e(this,b)){case16:for(g=3+d(this,2);g--;)c[h++]=i;break;case17:for(g=3+d(this,3);g--;)c[h++]=0;i=0;break;case18:for(g=11+d(this,7);g--;)c[h++]=0;i=0;break;default:i=c[h++]=f}returnthis.p=i,c}varf,g,i,j,k=d(a,5)+257,l=d(a,5)+1,m=d(a,4)+4,o=new(h?Uint8Array:Array)(n.length);for(j=0;m>j;++j)o[n[j]]=d(a,3);if(!h)for(j=m,m=o.length;m>j;++j)o[n[j]]=0;f=b(o),g=new(h?Uint8Array:Array)(k),i=new(h?Uint8Array:Array)(l),a.p=0,a.j(b(c.call(a,k,f,g)),b(c.call(a,l,f,i)))}varg=this,h="undefined"!=typeofUint8Array&&"undefined"!=typeofUint16Array&&"undefined"!=typeofUint32Array&&"undefined"!=typeofDataView,i=0,j=1;c.prototype.u=function(){for(;!this.l;){vara=d(this,3);switch(1&a&&(this.l=!0),a>>>=1){case0:varb=this.input,c=this.d,e=this.b,g=this.a,k=b.length,l=void0,m=void0,n=e.length,o=void0;if(this.c=this.f=0,c+1>=k)throwError("invalid uncompressed block header: LEN");if(l=b[c++]|b[c++]<<8,c+1>=k)throwError("invalid uncompressed block header: NLEN");if(m=b[c++]|b[c++]<<8,l===~m)throwError("invalid uncompressed block header: length verify");if(c+l>b.length)throwError("input buffer is broken");switch(this.i){casei:for(;g+l>e.length;){if(o=n-g,l-=o,h)e.set(b.subarray(c,c+o),g),g+=o,c+=o;elsefor(;o--;)e[g++]=b[c++];this.a=g,e=this.e(),g=this.a}break;casej:for(;g+l>e.length;)e=this.e({o:2});break;default:throwError("invalid inflate mode")}if(h)e.set(b.subarray(c,c+l),g),g+=l,c+=l;elsefor(;l--;)e[g++]=b[c++];this.d=c,this.a=g,this.b=e;break;case1:this.j(z,B);break;case2:f(this);break;default:throwError("unknown BTYPE: "+a)}}returnthis.m()};vark,l,m=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],n=h?newUint16Array(m):m,o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],p=h?newUint16Array(o):o,q=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],r=h?newUint8Array(q):q,s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],t=h?newUint16Array(s):s,u=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],v=h?newUint8Array(u):u,w=new(h?Uint8Array:Array)(288);for(k=0,l=w.length;l>k;++k)w[k]=143>=k?8:255>=k?9:279>=k?7:8;varx,y,z=b(w),A=new(h?Uint8Array:Array)(30);for(x=0,y=A.length;y>x;++x)A[x]=5;varB=b(A);c.prototype.j=function(a,b){varc=this.b,f=this.a;this.n=a;for(varg,h,i,j,k=c.length-258;256!==(g=e(this,a));)if(256>g)f>=k&&(this.a=f,c=this.e(),f=this.a),c[f++]=g;elsefor(h=g-257,j=p[h],0<r[h]&&(j+=d(this,r[h])),g=e(this,b),i=t[g],0<v[g]&&(i+=d(this,v[g])),f>=k&&(this.a=f,c=this.e(),f=this.a);j--;)c[f]=c[f++-i];for(;8<=this.c;)this.c-=8,this.d--;this.a=f},c.prototype.t=function(a,b){varc=this.b,f=this.a;this.n=a;for(varg,h,i,j,k=c.length;256!==(g=e(this,a));)if(256>g)f>=k&&(c=this.e(),k=c.length),c[f++]=g;elsefor(h=g-257,j=p[h],0<r[h]&&(j+=d(this,r[h])),g=e(this,b),i=t[g],0<v[g]&&(i+=d(this,v[g])),f+j>k&&(c=this.e(),k=c.length);j--;)c[f]=c[f++-i];for(;8<=this.c;)this.c-=8,this.d--;this.a=f},c.prototype.e=function(){vara,b,c=new(h?Uint8Array:Array)(this.a-32768),d=this.a-32768,e=this.b;if(h)c.set(e.subarray(32768,c.length));elsefor(a=0,b=c.length;b>a;++a)c[a]=e[a+32768];if(this.g.push(c),this.k+=c.length,h)e.set(e.subarray(d,d+32768));elsefor(a=0;32768>a;++a)e[a]=e[d+a];returnthis.a=32768,e},c.prototype.v=function(a){varb,c,d,e,f=this.input.length/this.d+1|0,g=this.input,i=this.b;returna&&("number"==typeofa.o&&(f=a.o),"number"==typeofa.r&&(f+=a.r)),2>f?(c=(g.length-this.d)/this.n[2],e=258*(c/2)|0,d=e<i.length?i.length+e:i.length<<1):d=i.length*f,h?(b=newUint8Array(d),b.set(i)):b=i,this.b=b},c.prototype.m=function(){vara,b,c,d,e,f=0,g=this.b,i=this.g,j=new(h?Uint8Array:Array)(this.k+(this.a-32768));if(0===i.length)returnh?this.b.subarray(32768,this.a):this.b.slice(32768,this.a);for(b=0,c=i.length;c>b;++b)for(a=i[b],d=0,e=a.length;e>d;++d)j[f++]=a[d];for(b=32768,c=this.a;c>b;++b)j[f++]=g[b];returnthis.g=[],this.buffer=j},c.prototype.s=function(){vara,b=this.a;returnh?this.q?(a=newUint8Array(b),a.set(this.b.subarray(0,b))):a=this.b.subarray(0,b):(this.b.length>b&&(this.b.length=b),a=this.b),this.buffer=a},a("Zlib.RawInflate",c),a("Zlib.RawInflate.prototype.decompress",c.prototype.u);varC,D,E,F,G={ADAPTIVE:j,BLOCK:i};if(Object.keys)C=Object.keys(G);elsefor(DinC=[],E=0,G)C[E++]=D;for(E=0,F=C.length;F>E;++E)D=C[E],a("Zlib.RawInflate.BufferType."+D,G[D])}).call(this)},{}],15:[function(a,b,c){(function(){"use strict";functiona(a){throwa}functionb(a,b){varc=a.split("."),d=w;!(c[0]ind)&&d.execScript&&d.execScript("var "+c[0]);for(vare;c.length&&(e=c.shift());)c.length||b===u?d=d[e]?d[e]:d[e]={}:d[e]=b}functionc(b,c){this.index="number"==typeofc?c:0,this.i=0,this.buffer=binstanceof(x?Uint8Array:Array)?b:new(x?Uint8Array:Array)(32768),2*this.buffer.length<=this.index&&a(Error("invalid index")),this.buffer.length<=this.index&&this.f()}functiond(a){this.buffer=new(x?Uint16Array:Array)(2*a),this.length=0}functione(a){varb,c,d,e,f,g,h,i,j,k,l=a.length,m=0,n=Number.POSITIVE_INFINITY;for(i=0;l>i;++i)a[i]>m&&(m=a[i]),a[i]<n&&(n=a[i]);for(b=1<<m,c=new(x?Uint32Array:Array)(b),d=1,e=0,f=2;m>=d;){for(i=0;l>i;++i)if(a[i]===d){for(g=0,h=e,j=0;d>j;++j)g=g<<1|1&h,h>>=1;for(k=d<<16|i,j=g;b>j;j+=f)c[j]=k;++e}++d,e<<=1,f<<=1}return[c,m,n]}functionf(a,b){this.h=F,this.w=0,this.input=x&&ainstanceofArray?newUint8Array(a):a,this.b=0,b&&(b.lazy&&(this.w=b.lazy),"number"==typeofb.compressionType&&(this.h=b.compressionType),b.outputBuffer&&(this.a=x&&b.outputBufferinstanceofArray?newUint8Array(b.outputBuffer):b.outputBuffer),"number"==typeofb.outputIndex&&(this.b=b.outputIndex)),this.a||(this.a=new(x?Uint8Array:Array)(32768))}functiong(a,b){this.length=a,this.H=b}functionh(b,c){functiond(b,c){vard,e=b.H,f=[],g=0;d=J[b.length],f[g++]=65535&d,f[g++]=d>>16&255,f[g++]=d>>24;varh;switch(v){case1===e:h=[0,e-1,0];break;case2===e:h=[1,e-2,0];break;case3===e:h=[2,e-3,0];break;case4===e:h=[3,e-4,0];break;case6>=e:h=[4,e-5,1];break;case8>=e:h=[5,e-7,1];break;case12>=e:h=[6,e-9,2];break;case16>=e:h=[7,e-13,2];break;case24>=e:h=[8,e-17,3];break;case32>=e:h=[9,e-25,3];break;case48>=e:h=[10,e-33,4];break;case64>=e:h=[11,e-49,4];break;case96>=e:h=[12,e-65,5];break;case128>=e:h=[13,e-97,5];break;case192>=e:h=[14,e-129,6];break;case256>=e:h=[15,e-193,6];break;case384>=e:h=[16,e-257,7];break;case512>=e:h=[17,e-385,7];break;case768>=e:h=[18,e-513,8];break;case1024>=e:h=[19,e-769,8];break;case1536>=e:h=[20,e-1025,9];break;case2048>=e:h=[21,e-1537,9];break;case3072>=e:h=[22,e-2049,10];break;case4096>=e:h=[23,e-3073,10];break;case6144>=e:h=[24,e-4097,11];break;case8192>=e:h=[25,e-6145,11];break;case12288>=e:h=[26,e-8193,12];break;case16384>=e:h=[27,e-12289,12];break;case24576>=e:h=[28,e-16385,13];break;case32768>=e:h=[29,e-24577,13];break;default:a("invalid distance")}d=h,f[g++]=d[0],f[g++]=d[1],f[g++]=d[2];vari,j;for(i=0,j=f.length;j>i;++i)p[q++]=f[i];s[f[0]]++,t[f[3]]++,r=b.length+c-1,m=null}vare,f,g,h,j,k,l,m,n,o={},p=x?newUint16Array(2*c.length):[],q=0,r=0,s=new(x?Uint32Array:Array)(286),t=new(x?Uint32Array:Array)(30),w=b.w;if(!x){for(g=0;285>=g;)s[g++]=0;for(g=0;29>=g;)t[g++]=0}for(s[256]=1,e=0,f=c.length;f>e;++e){for(g=j=0,h=3;h>g&&e+g!==f;++g)j=j<<8|c[e+g];if(o[j]===u&&(o[j]=[]),k=o[j],!(0<r--)){for(;0<k.length&&32768<e-k[0];)k.shift();if(e+3>=f){for(m&&d(m,-1),g=0,h=f-e;h>g;++g)n=c[e+g],p[q++]=n,++s[n];break}0<k.length?(l=i(c,e,k),m?m.length<l.length?(n=c[e-1],p[q++]=n,++s[n],d(l,0)):d(m,-1):l.length<w?m=l:d(l,0)):m?d(m,-1):(n=c[e],p[q++]=n,++s[n])}k.push(e)}returnp[q++]=256,s[256]++,b.M=s,b.L=t,x?p.subarray(0,q):p}functioni(a,b,c){vard,e,f,h,i,j,k=0,l=a.length;h=0,j=c.length;a:for(;j>h;h++){if(d=c[j-h-1],f=3,k>3){for(i=k;i>3;i--)if(a[d+i-1]!==a[b+i-1])continuea;f=k}for(;258>f&&l>b+f&&a[d+f]===a[b+f];)++f;if(f>k&&(e=d,k=f),258===f)break}returnnewg(k,b-e)}functionj(a,b){varc,e,f,g,h,i=a.length,j=newd(572),l=new(x?Uint8Array:Array)(i);if(!x)for(g=0;i>g;g++)l[g]=0;for(g=0;i>g;++g)0<a[g]&&j.push(g,a[g]);if(c=Array(j.length/2),e=new(x?Uint32Array:Array)(j.length/2),1===c.length)returnl[j.pop().index]=1,l;for(g=0,h=j.length/2;h>g;++g)c[g]=j.pop(),e[g]=c[g].value;for(f=k(e,e.length,b),g=0,h=c.length;h>g;++g)l[c[g].index]=f[g];returnl}functionk(a,b,c){functiond(a){varc=n[a][o[a]];c===b?(d(a+1),d(a+1)):--l[c],++o[a]}vare,f,g,h,i,j=new(x?Uint16Array:Array)(c),k=new(x?Uint8Array:Array)(c),l=new(x?Uint8Array:Array)(b),m=Array(c),n=Array(c),o=Array(c),p=(1<<c)-b,q=1<<c-1;for(j[c-1]=b,f=0;c>f;++f)q>p?k[f]=0:(k[f]=1,p-=q),p<<=1,j[c-2-f]=(j[c-1-f]/2|0)+b;for(j[0]=k[0],m[0]=Array(j[0]),n[0]=Array(j[0]),f=1;c>f;++f)j[f]>2*j[f-1]+k[f]&&(j[f]=2*j[f-1]+k[f]),m[f]=Array(j[f]),n[f]=Array(j[f]);for(e=0;b>e;++e)l[e]=c;for(g=0;g<j[c-1];++g)m[c-1][g]=a[g],n[c-1][g]=g;for(e=0;c>e;++e)o[e]=0;for(1===k[c-1]&&(--l[0],++o[c-1]),f=c-2;f>=0;--f){for(h=e=0,i=o[f+1],g=0;g<j[f];g++)h=m[f+1][i]+m[f+1][i+1],h>a[e]?(m[f][g]=h,n[f][g]=b,i+=2):(m[f][g]=a[e],n[f][g]=e,++e);o[f]=0,1===k[f]&&d(f)}returnl}functionl(a){varb,c,d,e,f=new(x?Uint16Array:Array)(a.length),g=[],h=[],i=0;for(b=0,c=a.length;c>b;b++)g[a[b]]=(0|g[a[b]])+1;for(b=1,c=16;c>=b;b++)h[b]=i,i+=0|g[b],i<<=1;for(b=0,c=a.length;c>b;b++)for(i=h[a[b]],h[a[b]]+=1,d=f[b]=0,e=a[b];e>d;d++)f[b]=f[b]<<1|1&i,i>>>=1;returnf}functionm(b,c){switch(this.l=[],this.m=32768,this.e=this.g=this.c=this.q=0,this.input=x?newUint8Array(b):b,this.s=!1,this.n=L,this.C=!1,(c||!(c={}))&&(c.index&&(this.c=c.index),c.bufferSize&&(this.m=c.bufferSize),c.bufferType&&(this.n=c.bufferType),c.resize&&(this.C=c.resize)),this.n){caseK:this.b=32768,this.a=new(x?Uint8Array:Array)(32768+this.m+258);break;caseL:this.b=0,this.a=new(x?Uint8Array:Array)(this.m),this.f=this.K,this.t=this.I,this.o=this.J;break;default:a(Error("invalid inflate mode"))}}functionn(b,c){for(vard,e=b.g,f=b.e,g=b.input,h=b.c,i=g.length;c>f;)h>=i&&a(Error("input buffer is broken")),e|=g[h++]<<f,f+=8;returnd=e&(1<<c)-1,b.g=e>>>c,b.e=f-c,b.c=h,d}functiono(a,b){for(varc,d,e=a.g,f=a.e,g=a.input,h=a.c,i=g.length,j=b[0],k=b[1];k>f&&!(h>=i);)e|=g[h++]<<f,f+=8;returnc=j[e&(1<<k)-1],d=c>>>16,a.g=e>>d,a.e=f-d,a.c=h,65535&c}functionp(a){functionb(a,b,c){vard,e,f,g=this.z;for(f=0;a>f;)switch(d=o(this,b)){case16:for(e=3+n(this,2);e--;)c[f++]=g;break;case17:for(e=3+n(this,3);e--;)c[f++]=0;g=0;break;case18:for(e=11+n(this,7);e--;)c[f++]=0;g=0;break;default:g=c[f++]=d}returnthis.z=g,c}varc,d,f,g,h=n(a,5)+257,i=n(a,5)+1,j=n(a,4)+4,k=new(x?Uint8Array:Array)(Q.length);for(g=0;j>g;++g)k[Q[g]]=n(a,3);if(!x)for(g=j,j=k.length;j>g;++g)k[Q[g]]=0;c=e(k),d=new(x?Uint8Array:Array)(h),f=new(x?Uint8Array:Array)(i),a.z=0,a.o(e(b.call(a,h,c,d)),e(b.call(a,i,c,f)))}functionq(a){if("string"==typeofa){varb,c,d=a.split("");for(b=0,c=d.length;c>b;b++)d[b]=(255&d[b].charCodeAt(0))>>>0;a=d}for(vare,f=1,g=0,h=a.length,i=0;h>0;){e=h>1024?1024:h,h-=e;dof+=a[i++],g+=f;while(--e);f%=65521,g%=65521}return(g<<16|f)>>>0}functionr(b,c){vard,e;switch(this.input=b,this.c=0,(c||!(c={}))&&(c.index&&(this.c=c.index),c.verify&&(this.N=c.verify)),d=b[this.c++],e=b[this.c++],15&d){caseda:this.method=da;break;default:a(Error("unsupported compression method"))}0!==((d<<8)+e)%31&&a(Error("invalid fcheck flag:"+((d<<8)+e)%31)),
d.prototype.PARRAY=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],d.prototype.NN=16,d.prototype._clean=function(a){if(0>a){varb=2147483647&a;a=b+2147483648}returna},d.prototype._F=function(a){varb,c,d,e,f;returne=255&a,a>>>=8,d=255&a,a>>>=8,c=255&a,a>>>=8,b=255&a,f=this.sboxes[0][b]+this.sboxes[1][c],f^=this.sboxes[2][d],f+=this.sboxes[3][e]},d.prototype._encrypt_block=function(a){varb,c=a[0],d=a[1];for(b=0;b<this.NN;++b){c^=this.parray[b],d=this._F(c)^d;vare=c;c=d,d=e}c^=this.parray[this.NN+0],d^=this.parray[this.NN+1],a[0]=this._clean(d),a[1]=this._clean(c)},d.prototype.encrypt_block=function(a){varb,c=[0,0],d=this.BLOCKSIZE/2;for(b=0;b<this.BLOCKSIZE/2;++b)c[0]=c[0]<<8|255&a[b+0],c[1]=c[1]<<8|255&a[b+d];this._encrypt_block(c);vare=[];for(b=0;b<this.BLOCKSIZE/2;++b)e[b+0]=c[0]>>>24-8*b&255,e[b+d]=c[1]>>>24-8*b&255;returne},d.prototype._decrypt_block=function(a){varb,c=a[0],d=a[1];for(b=this.NN+1;b>1;--b){c^=this.parray[b],d=this._F(c)^d;vare=c;c=d,d=e}c^=this.parray[1],d^=this.parray[0],a[0]=this._clean(d),a[1]=this._clean(c)},d.prototype.init=function(a){varb,c=0;for(this.parray=[],b=0;b<this.NN+2;++b){vard,e=0;for(d=0;4>d;++d)e=e<<8|255&a[c],++c>=a.length&&(c=0);this.parray[b]=this.PARRAY[b]^e}for(this.sboxes=[],b=0;4>b;++b)for(this.sboxes[b]=[],c=0;256>c;++c)this.sboxes[b][c]=this.SBOXES[b][c];varf=[0,0];for(b=0;b<this.NN+2;b+=2)this._encrypt_block(f),this.parray[b+0]=f[0],this.parray[b+1]=f[1];for(b=0;4>b;++b)for(c=0;256>c;c+=2)this._encrypt_block(f),this.sboxes[b][c+0]=f[0],this.sboxes[b][c+1]=f[1]};varf=a("../../util.js");b.exports=e,b.exports.keySize=e.prototype.keySize=16,b.exports.blockSize=e.prototype.blockSize=16},{"../../util.js":76}],21:[function(a,b,c){functiond(){functiona(a,b,c){vard=b+a,e=d<<c|d>>>32-c;return(f[0][e>>>24]^f[1][e>>>16&255])-f[2][e>>>8&255]+f[3][255&e]}functionb(a,b,c){vard=b^a,e=d<<c|d>>>32-c;returnf[0][e>>>24]-f[1][e>>>16&255]+f[2][e>>>8&255]^f[3][255&e]}functionc(a,b,c){vard=b-a,e=d<<c|d>>>32-c;return(f[0][e>>>24]+f[1][e>>>16&255]^f[2][e>>>8&255])-f[3][255&e]}this.BlockSize=8,this.KeySize=16,this.setKey=function(a){if(this.masking=newArray(16),this.rotate=newArray(16),this.reset(),a.length!=this.KeySize)thrownewError("CAST-128: keys must be 16 bytes");returnthis.keySchedule(a),!0},this.reset=function(){for(vara=0;16>a;a++)this.masking[a]=0,this.rotate[a]=0},this.getBlockSize=function(){returnBlockSize},this.encrypt=function(d){for(vare=newArray(d.length),f=0;f<d.length;f+=8){varg,h=d[f]<<24|d[f+1]<<16|d[f+2]<<8|d[f+3],i=d[f+4]<<24|d[f+5]<<16|d[f+6]<<8|d[f+7];g=i,i=h^a(i,this.masking[0],this.rotate[0]),h=g,g=i,i=h^b(i,this.masking[1],this.rotate[1]),h=g,g=i,i=h^c(i,this.masking[2],this.rotate[2]),h=g,g=i,i=h^a(i,this.masking[3],this.rotate[3]),h=g,g=i,i=h^b(i,this.masking[4],this.rotate[4]),h=g,g=i,i=h^c(i,this.masking[5],this.rotate[5]),h=g,g=i,i=h^a(i,this.masking[6],this.rotate[6]),h=g,g=i,i=h^b(i,this.masking[7],this.rotate[7]),h=g,g=i,i=h^c(i,this.masking[8],this.rotate[8]),h=g,g=i,i=h^a(i,this.masking[9],this.rotate[9]),h=g,g=i,i=h^b(i,this.masking[10],this.rotate[10]),h=g,g=i,i=h^c(i,this.masking[11],this.rotate[11]),h=g,g=i,i=h^a(i,this.masking[12],this.rotate[12]),h=g,g=i,i=h^b(i,this.masking[13],this.rotate[13]),h=g,g=i,i=h^c(i,this.masking[14],this.rotate[14]),h=g,g=i,i=h^a(i,this.masking[15],this.rotate[15]),h=g,e[f]=i>>>24&255,e[f+1]=i>>>16&255,e[f+2]=i>>>8&255,e[f+3]=255&i,e[f+4]=h>>>24&255,e[f+5]=h>>>16&255,e[f+6]=h>>>8&255,e[f+7]=255&h}returne},this.decrypt=function(d){for(vare=newArray(d.length),f=0;f<d.length;f+=8){varg,h=d[f]<<24|d[f+1]<<16|d[f+2]<<8|d[f+3],i=d[f+4]<<24|d[f+5]<<16|d[f+6]<<8|d[f+7];g=i,i=h^a(i,this.masking[15],this.rotate[15]),h=g,g=i,i=h^c(i,this.masking[14],this.rotate[14]),h=g,g=i,i=h^b(i,this.masking[13],this.rotate[13]),h=g,g=i,i=h^a(i,this.masking[12],this.rotate[12]),h=g,g=i,i=h^c(i,this.masking[11],this.rotate[11]),h=g,g=i,i=h^b(i,this.masking[10],this.rotate[10]),h=g,g=i,i=h^a(i,this.masking[9],this.rotate[9]),h=g,g=i,i=h^c(i,this.masking[8],this.rotate[8]),h=g,g=i,i=h^b(i,this.masking[7],this.rotate[7]),h=g,g=i,i=h^a(i,this.masking[6],this.rotate[6]),h=g,g=i,i=h^c(i,this.masking[5],this.rotate[5]),h=g,g=i,i=h^b(i,this.masking[4],this.rotate[4]),h=g,g=i,i=h^a(i,this.masking[3],this.rotate[3]),h=g,g=i,i=h^c(i,this.masking[2],this.rotate[2]),h=g,g=i,i=h^b(i,this.masking[1],this.rotate[1]),h=g,g=i,i=h^a(i,this.masking[0],this.rotate[0]),h=g,e[f]=i>>>24&255,e[f+1]=i>>>16&255,e[f+2]=i>>>8&255,e[f+3]=255&i,e[f+4]=h>>>24&255,e[f+5]=h>>16&255,e[f+6]=h>>8&255,e[f+7]=255&h}returne};vard=newArray(4);d[0]=newArray(4),d[0][0]=newArray(4,0,13,15,12,14,8),d[0][1]=newArray(5,2,16,18,17,19,10),d[0][2]=newArray(6,3,23,22,21,20,9),d[0][3]=newArray(7,1,26,25,27,24,11),d[1]=newArray(4),d[1][0]=newArray(0,6,21,23,20,22,16),d[1][1]=newArray(1,4,0,2,1,3,18),d[1][2]=newArray(2,5,7,6,5,4,17),d[1][3]=newArray(3,7,10,9,11,8,19),d[2]=newArray(4),d[2][0]=newArray(4,0,13,15,12,14,8),d[2][1]=newArray(5,2,16,18,17,19,10),d[2][2]=newArray(6,3,23,22,21,20,9),d[2][3]=newArray(7,1,26,25,27,24,11),d[3]=newArray(4),d[3][0]=newArray(0,6,21,23,20,22,16),d[3][1]=newArray(1,4,0,2,1,3,18),d[3][2]=newArray(2,5,7,6,5,4,17),d[3][3]=newArray(3,7,10,9,11,8,19);vare=newArray(4);e[0]=newArray(4),e[0][0]=newArray(24,25,23,22,18),e[0][1]=newArray(26,27,21,20,22),e[0][2]=newArray(28,29,19,18,25),e[0][3]=newArray(30,31,17,16,28),e[1]=newArray(4),e[1][0]=newArray(3,2,12,13,8),e[1][1]=newArray(1,0,14,15,13),e[1][2]=newArray(7,6,8,9,3),e[1][3]=newArray(5,4,10,11,7),e[2]=newArray(4),e[2][0]=newArray(19,18,28,29,25),e[2][1]=newArray(17,16,30,31,28),e[2][2]=newArray(23,22,24,25,18),e[2][3]=newArray(21,20,26,27,22),e[3]=newArray(4),e[3][0]=newArray(8,9,7,6,3),e[3][1]=newArray(10,11,5,4,7),e[3][2]=newArray(12,13,3,2,8),e[3][3]=newArray(14,15,1,0,13),this.keySchedule=function(a){varb,c,g=newArray(8),h=newArray(32);for(b=0;4>b;b++)c=4*b,g[b]=a[c]<<24|a[c+1]<<16|a[c+2]<<8|a[c+3];for(vari,j=[6,7,4,5],k=0,l=0;2>l;l++)for(varm=0;4>m;m++){for(c=0;4>c;c++){varn=d[m][c];i=g[n[1]],i^=f[4][g[n[2]>>>2]>>>24-8*(3&n[2])&255],i^=f[5][g[n[3]>>>2]>>>24-8*(3&n[3])&255],i^=f[6][g[n[4]>>>2]>>>24-8*(3&n[4])&255],i^=f[7][g[n[5]>>>2]>>>24-8*(3&n[5])&255],i^=f[j[c]][g[n[6]>>>2]>>>24-8*(3&n[6])&255],g[n[0]]=i}for(c=0;4>c;c++){varo=e[m][c];i=f[4][g[o[0]>>>2]>>>24-8*(3&o[0])&255],i^=f[5][g[o[1]>>>2]>>>24-8*(3&o[1])&255],i^=f[6][g[o[2]>>>2]>>>24-8*(3&o[2])&255],i^=f[7][g[o[3]>>>2]>>>24-8*(3&o[3])&255],i^=f[4+c][g[o[4]>>>2]>>>24-8*(3&o[4])&255],h[k]=i,k++}}for(b=0;16>b;b++)this.masking[b]=h[b],this.rotate[b]=31&h[16+b]};varf=newArray(8);f[0]=newArray(821772500,2678128395,1810681135,1059425402,505495343,2617265619,1610868032,3483355465,3218386727,2294005173,3791863952,2563806837,1852023008,365126098,3269944861,584384398,677919599,3229601881,4280515016,2002735330,1136869587,3744433750,2289869850,2731719981,2714362070,879511577,1639411079,575934255,717107937,2857637483,576097850,2731753936,1725645e3,2810460463,5111599,767152862,2543075244,1251459544,1383482551,3052681127,3089939183,3612463449,1878520045,1510570527,2189125840,2431448366,582008916,3163445557,1265446783,1354458274,3529918736,3202711853,3073581712,3912963487,3029263377,1275016285,4249207360,2905708351,3304509486,1442611557,3585198765,2712415662,2731849581,3248163920,2283946226,208555832,2766454743,1331405426,1447828783,3315356441,3108627284,2957404670,2981538698,3339933917,1669711173,286233437,1465092821,1782121619,3862771680,710211251,980974943,1651941557,430374111,2051154026,704238805,4128970897,3144820574,2857402727,948965521,3333752299,2227686284,718756367,2269778983,2731643755,718440111,2857816721,3616097120,1113355533,2478022182,410092745,1811985197,1944238868,2696854588,1415722873,1682284203,1060277122,1998114690,1503841958,82706478,2315155686,1068173648,845149890,2167947013,1768146376,1993038550,3566826697,3390574031,940016341,3355073782,2328040721,904371731,1205506512,4094660742,2816623006,825647681,85914773,2857843460,1249926541,1417871568,3287612,3211054559,3126306446,1975924523,1353700161,2814456437,2438597621,1800716203,722146342,2873936343,1151126914,4160483941,2877670899,458611604,2866078500,3483680063,770352098,2652916994,3367839148,3940505011,3585973912,3809620402,718646636,2504206814,2914927912,3631288169,2857486607,2860018678,575749918,2857478043,718488780,2069512688,3548183469,453416197,1106044049,3032691430,52586708,3378514636,3459808877,3211506028,1785789304,218356169,3571399134,3759170522,1194783844,1523787992,3007827094,1975193539,2555452411,1341901877,3045838698,3776907964,3217423946,2802510864,2889438986,1057244207,1636348243,3761863214,1462225785,2632663439,481089165,718503062,24497053,3332243209,3344655856,3655024856,3960371065,1195698900,2971415156,3710176158,2115785917,4027663609,3525578417,2524296189,2745972565,3564906415,1372086093,1452307862,2780501478,1476592880,3389271281,18495466,2378148571,901398090,891748256,3279637769,3157290713,2560960102,1447622437,4284372637,216884176,2086908623,1879786977,3588903153,2242455666,2938092967,3559082096,2810645491,758861177,1121993112,215018983,642190776,4169236812,1196255959,2081185372,3508738393,941322904,4124243163,2877523539,1848581667,2205260958,3180453958,2589345134,3694731276,550028657,2519456284,3789985535,2973870856,2093648313,443148163,46942275,2734146937,1117713533,1115362972,1523183689,3717140224,1551984063),f[1]=newArray(522195092,4010518363,1776537470,960447360,4267822970,4005896314,1435016340,1929119313,2913464185,1310552629,3579470798,3724818106,2579771631,1594623892,417127293,2715217907,2696228731,1508390405,3994398868,3925858569,3695444102,4019471449,3129199795,3770928635,3520741761,990456497,4187484609,2783367035,21106139,3840405339,631373633,3783325702,532942976,396095098,3548038825,4267192484,2564721535,2011709262,2039648873,620404603,3776170075,2898526339,3612357925,4159332703,1645490516,223693667,1567101217,3362177881,1029951347,3470931136,3570957959,1550265121,119497089,972513919,907948164,3840628539,1613718692,3594177948,465323573,2659255085,654439692,2575596212,2699288441,3127702412,277098644,624404830,4100943870,2717858591,546110314,2403699828,3655377447,1321679412,4236791657,1045293279,4010672264,895050893,2319792268,494945126,1914543101,2777056443,3894764339,2219737618,311263384,4275257268,3458730721,669096869,3584475730,3835122877,3319158237,3949359204,2005142349,2713102337,2228954793,3769984788,569394103,3855636576,1425027204,108000370,2736431443,3671869269,3043122623,1750473702,2211081108,762237499,3972989403,2798899386,3061857628,2943854345,867476300,964413654,1591880597,1594774276,2179821409,552026980,3026064248,3726140315,2283577634,3110545105,2152310760,582474363,1582640421,1383256631,2043843868,3322775884,1217180674,463797851,2763038571,480777679,2718707717,2289164131,3118346187,214354409,200212307,3810608407,3025414197,2674075964,3997296425,1847405948,1342460550,510035443,4080271814,815934613,833030224,1620250387,1945732119,2703661145,3966000196,1388869545,3456054182,2687178561,2092620194,562037615,1356438536,3409922145,3261847397,1688467115,2150901366,631725691,3840332284,549916902,3455104640,394546491,837744717,2114462948,751520235,2221554606,2415360136,3999097078,2063029875,803036379,2702586305,821456707,3019566164,360699898,4018502092,3511869016,3677355358,2402471449,812317050,49299192,2570164949,3259169295,2816732080,3331213574,3101303564,2156015656,3705598920,3546263921,143268808,3200304480,1638124008,3165189453,3341807610,578956953,2193977524,3638120073,2333881532,807278310,658237817,2969561766,1641658566,11683945,3086995007,148645947,1138423386,4158756760,1981396783,2401016740,3699783584,380097457,2680394679,2803068651,3334260286,441530178,4016580796,1375954390,761952171,891809099,2183123478,157052462,3683840763,1592404427,341349109,2438483839,1417898363,644327628,2233032776,2353769706,2201510100,220455161,1815641738,182899273,2995019788,3627381533,3702638151,2890684138,1052606899,588164016,1681439879,4038439418,2405343923,4229449282,167996282,1336969661,1688053129,2739224926,1543734051,1046297529,1138201970,2121126012,115334942,1819067631,1902159161,1941945968,2206692869,1159982321),f[2]=newArray(2381300288,637164959,3952098751,3893414151,1197506559,916448331,2350892612,2932787856,3199334847,4009478890,3905886544,1373570990,2450425862,4037870920,3778841987,2456817877,286293407,124026297,3001279700,1028597854,3115296800,4208886496,2691114635,2188540206,1430237888,1218109995,3572471700,308166588,570424558,2187009021,2455094765,307733056,1310360322,3135275007,1384269543,2388071438,863238079,2359263624,2801553128,3380786597,2831162807,1470087780,1728663345,4072488799,1090516929,532123132,2389430977,1132193179,2578464191,3051079243,1670234342,1434557849,2711078940,1241591150,3314043432,3435360113,3091448339,1812415473,2198440252,267246943,796911696,3619716990,38830015,1526438404,2806502096,374413614,2943401790,1489179520,1603809326,1920779204,168801282,260042626,2358705581,1563175598,2397674057,1356499128,2217211040,514611088,2037363785,2186468373,4022173083,2792511869,2913485016,1173701892,4200428547,3896427269,1334932762,2455136706,602925377,2835607854,1613172210,41346230,2499634548,2457437618,2188827595,41386358,4172255629,1313404830,2405527007,3801973774,2217704835,873260488,2528884354,2478092616,4012915883,2555359016,2006953883,2463913485,575479328,2218240648,2099895446,660001756,2341502190,3038761536,3888151779,3848713377,3286851934,1022894237,1620365795,3449594689,1551255054,15374395,3570825345,4249311020,4151111129,3181912732,310226346,1133119310,530038928,136043402,2476768958,3107506709,2544909567,1036173560,2367337196,1681395281,1758231547,3641649032,306774401,1575354324,3716085866,1990386196,3114533736,2455606671,1262092282,3124342505,2768229131,4210529083,1833535011,423410938,660763973,2187129978,1639812e3,3508421329,3467445492,310289298,272797111,2188552562,2456863912,310240523,677093832,1013118031,901835429,3892695601,1116285435,3036471170,1337354835,243122523,520626091,277223598,4244441197,4194248841,1766575121,594173102,316590669,742362309,3536858622,4176435350,3838792410,2501204839,1229605004,3115755532,1552908988,2312334149,979407927,3959474601,1148277331,176638793,3614686272,2083809052,40992502,1340822838,2731552767,3535757508,3560899520,1354035053,122129617,7215240,2732932949,3118912700,2718203926,2539075635,3609230695,3725561661,1928887091,2882293555,1988674909,2063640240,2491088897,1459647954,4189817080,2302804382,1113892351,2237858528,1927010603,4002880361,1856122846,1594404395,2944033133,3855189863,3474975698,1643104450,4054590833,3431086530,1730235576,2984608721,3084664418,2131803598,4178205752,267404349,1617849798,1616132681,1462223176,736725533,2327058232,551665188,2945899023,1749386277,2575514597,1611482493,674206544,2201269090,3642560800,728599968,1680547377,2620414464,1388111496,453204106,4156223445,1094905244,2754698257,2201108165,3757000246,2704524545,3922940700,3996465027),f[3]=newArray(2645754912,532081118,2814278639,3530793624,1246723035,1689095255,2236679235,4194438865,2116582143,3859789411,157234593,2045505824,4245003587,1687664561,4083425123,605965023,672431967,1336064205,3376611392,214114848,4258466608,3232053071,489488601,605322005,3998028058,264917351,1912574028,756637694,436560991,202637054,135989450,85393697,2152923392,3896401662,2895836408,2145855233,3535335007,115294817,3147733898,1922296357,3464822751,4117858305,1037454084,2725193275,2127856640,1417604070,1148013728,1827919605,642362335,2929772533,909348033,1346338451,3547799649,297154785,1917849091,4161712827,2883604526,3968694238,1469521537,3780077382,3375584256,1763717519,136166297,4290970789,1295325189,2134727907,2798151366,1566297257,3672928234,2677174161,2672173615,965822077,2780786062,289653839,1133871874,3491843819,35685304,1068898316,418943774,672553190,642281022,2346158704,1954014401,3037126780,4079815205,2030668546,3840588673,672283427,1776201016,359975446,3750173538,555499703,2769985273,1324923,69110472,152125443,3176785106,3822147285,1340634837,798073664,1434183902,15393959,216384236,1303690150,3881221631,3711134124,3960975413,106373927,2578434224,1455997841,1801814300,1578393881,1854262133,3188178946,3258078583,2302670060,1539295533,3505142565,3078625975,2372746020,549938159,3278284284,2620926080,181285381,2865321098,3970029511,68876850,488006234,1728155692,2608167508,836007927,2435231793,919367643,3339422534,3655756360,1457871481,40520939,1380155135,797931188,234455205,2255801827,3990488299,397000196,739833055,3077865373,2871719860,4022553888,772369276,390177364,3853951029,557662966,740064294,1640166671,1699928825,3535942136,622006121,3625353122,68743880,1742502,219489963,1664179233,1577743084,1236991741,410585305,2366487942,823226535,1050371084,3426619607,3586839478,212779912,4147118561,1819446015,1911218849,530248558,3486241071,3252585495,2886188651,3410272728,2342195030,20547779,2982490058,3032363469,3631753222,312714466,1870521650,1493008054,3491686656,615382978,4103671749,2534517445,1932181,2196105170,278426614,6369430,3274544417,2913018367,697336853,2143000447,2946413531,701099306,1558357093,2805003052,3500818408,2321334417,3567135975,216290473,3591032198,23009561,1996984579,3735042806,2024298078,3739440863,569400510,2339758983,3016033873,3097871343,3639523026,3844324983,3256173865,795471839,2951117563,4101031090,4091603803,3603732598,971261452,534414648,428311343,3389027175,2844869880,694888862,1227866773,2456207019,3043454569,2614353370,3749578031,3676663836,459166190,4132644070,1794958188,51825668,2252611902,3084671440,2036672799,3436641603,1099053433,2469121526,3059204941,1323291266,2061838604,1018778475,2233344254,2553501054,334295216,3556750194,1065731521,183467730),f[4]=newArray(2127105028,745436345,2601412319,2788391185,3093987327,500390133,1155374404,389092991,150729210,3891597772,3523549952,1935325696,716645080,946045387,2901812282,1774124410,3869435775,4039581901,3293136918,3438657920,948246080,363898952,3867875531,1286266623,1598556673,68334250,630723836,1104211938,1312863373,613332731,2377784574,1101634306,441780740,3129959883,1917973735,2510624549,3238456535,2544211978,3308894634,1299840618,4076074851,1756332096,3977027158,297047435,3790297736,2265573040,3621810518,1311375015,1667687725,47300608,3299642885,2474112369,201668394,1468347890,576830978,3594690761,3742605952,1958042578,1747032512,3558991340,1408974056,3366841779,682131401,1033214337,1545599232,4265137049,206503691,103024618,2855227313,1337551222,2428998917,2963842932,4015366655,3852247746,2796956967,3865723491,3747938335,247794022,3755824572,702416469,2434691994,397379957,851939612,2314769512,218229120,1380406772,62274761,214451378,3170103466,2276210409,3845813286,28563499,446592073,1693330814,3453727194,29968656,3093872512,220656637,2470637031,77972100,1667708854,1358280214,4064765667,2395616961,325977563,4277240721,4220025399,3605526484,3355147721,811859167,3069544926,3962126810,652502677,3075892249,4132761541,3498924215,1217549313,3250244479,3858715919,3053989961,1538642152,2279026266,2875879137,574252750,3324769229,2651358713,1758150215,141295887,2719868960,3515574750,4093007735,4194485238,1082055363,3417560400,395511885,2966884026,179534037,3646028556,3738688086,1092926436,2496269142,257381841,3772900718,1636087230,1477059743,2499234752,3811018894,2675660129,3285975680,90732309,1684827095,1150307763,1723134115,3237045386,1769919919,1240018934,815675215,750138730,2239792499,1234303040,1995484674,138143821,675421338,1145607174,1936608440,3238603024,2345230278,2105974004,323969391,779555213,3004902369,2861610098,1017501463,2098600890,2628620304,2940611490,2682542546,1171473753,3656571411,3687208071,4091869518,393037935,159126506,1662887367,1147106178,391545844,3452332695,1891500680,3016609650,1851642611,546529401,1167818917,3194020571,2848076033,3953471836,575554290,475796850,4134673196,450035699,2351251534,844027695,1080539133,86184846,1554234488,3692025454,1972511363,2018339607,1491841390,1141460869,1061690759,4244549243,2008416118,2351104703,2868147542,1598468138,722020353,1027143159,212344630,1387219594,1725294528,3745187956,2500153616,458938280,4129215917,1828119673,544571780,3503225445,2297937496,1241802790,267843827,2694610800,1397140384,1558801448,3782667683,1806446719,929573330,2234912681,400817706,616011623,4121520928,3603768725,1761550015,1968522284,4053731006,4192232858,4005120285,872482584,3140537016,3894607381,2287405443,1963876937,3663887957,1584857e3,2975024454,1833426440,4025083860),f[5]=newArray(4143615901,749497569,1285769319,3795025788,2514159847,23610292,3974978748,844452780,3214870880,3751928557,2213566365,1676510905,448177848,3730751033,4086298418,2307502392,871450977,3222878141,4110862042,3831651966,2735270553,1310974780,2043402188,1218528103,2736035353,4274605013,2702448458,3936360550,2693061421,162023535,2827510090,687910808,23484817,3784910947,3371371616,779677500,3503626546,3473927188,4157212626,3500679282,4248902014,2466621104,3899384794,1958663117,925738300,1283408968,3669349440,1840910019,137959847,2679828185,1239142320,1315376211,1547541505,1690155329,739140458,3128809933,3933172616,3876308834,905091803,1548541325,4040461708,3095483362,144808038,451078856,676114313,2861728291,2469707347,993665471,373509091,2599041286,4025009006,4170239449,2149739950,3275793571,3749616649,2794760199,1534877388,572371878,2590613551,1753320020,3467782511,1405125690,4270405205,633333386,3026356924,3475123903,632057672,2846462855,1404951397,3882875879,3915906424,195638627,2385783745,3902872553,1233155085,3355999740,2380578713,2702246304,2144565621,3663341248,3894384975,2502479241,4248018925,3094885567,1594115437,572884632,3385116731,767645374,1331858858,1475698373,3793881790,3532746431,1321687957,619889600,1121017241,3440213920,2070816767,2833025776,1933951238,4095615791,890643334,3874130214,859025556,360630002,925594799,1764062180,3920222280,4078305929,979562269,2810700344,4087740022,1949714515,546639971,1165388173,3069891591,1495988560,922170659,1291546247,2107952832,1813327274,3406010024,3306028637,4241950635,153207855,2313154747,1608695416,1150242611,1967526857,721801357,1220138373,3691287617,3356069787,2112743302,3281662835,1111556101,1778980689,250857638,2298507990,673216130,2846488510,3207751581,3562756981,3008625920,3417367384,2198807050,529510932,3547516680,3426503187,2364944742,102533054,2294910856,1617093527,1204784762,3066581635,1019391227,1069574518,1317995090,1691889997,3661132003,510022745,3238594800,1362108837,1817929911,2184153760,805817662,1953603311,3699844737,120799444,2118332377,207536705,2282301548,4120041617,145305846,2508124933,3086745533,3261524335,1877257368,2977164480,3160454186,2503252186,4221677074,759945014,254147243,2767453419,3801518371,629083197,2471014217,907280572,3900796746,940896768,2751021123,2625262786,3161476951,3661752313,3260732218,1425318020,2977912069,1496677566,3988592072,2140652971,3126511541,3069632175,977771578,1392695845,1698528874,1411812681,1369733098,1343739227,3620887944,1142123638,67414216,3102056737,3088749194,1626167401,2546293654,3941374235,697522451,33404913,143560186,2595682037,994885535,1247667115,3859094837,2699155541,3547024625,4114935275,2968073508,3199963069,2732024527,1237921620,951448369,1898488916,1211705605,2790989240,2233243581,3598044975),f[6]=newArray(2246066201,858518887,1714274303,3485882003,713916271,2879113490,3730835617,539548191,36158695,1298409750,419087104,1358007170,749914897,2989680476,1261868530,2995193822,2690628854,3443622377,3780124940,3796824509,2976433025,4259637129,1551479e3,512490819,1296650241,951993153,2436689437,2460458047,144139966,3136204276,310820559,3068840729,643875328,1969602020,1680088954,2185813161,3283332454,672358534,198762408,896343282,276269502,3014846926,84060815,197145886,376173866,3943890818,3813173521,3545068822,1316698879,1598252827,2633424951,1233235075,859989710,2358460855,3503838400,3409603720,1203513385,1193654839,2792018475,2060853022,207403770,1144516871,3068631394,1121114134,177607304,3785736302,326409831,1929119770,2983279095,4183308101,3474579288,3200513878,3228482096,119610148,1170376745,3378393471,3163473169,951863017,3337026068,3135789130,2907618374,1183797387,2015970143,4045674555,2182986399,2952138740,3928772205,384012900,2454997643,10178499,2879818989,2596892536,111523738,2995089006,451689641,3196290696,235406569,1441906262,3890558523,3013735005,4158569349,1644036924,376726067,1006849064,3664579700,2041234796,1021632941,1374734338,2566452058,371631263,4007144233,490221539,206551450,3140638584,1053219195,1853335209,3412429660,3562156231,735133835,1623211703,3104214392,2738312436,4096837757,3366392578,3110964274,3956598718,3196820781,2038037254,3877786376,2339753847,300912036,3766732888,2372630639,1516443558,4200396704,1574567987,4069441456,4122592016,2699739776,146372218,2748961456,2043888151,35287437,2596680554,655490400,1132482787,110692520,1031794116,2188192751,1324057718,1217253157,919197030,686247489,3261139658,1028237775,3135486431,3059715558,2460921700,986174950,2661811465,4062904701,2752986992,3709736643,367056889,1353824391,731860949,1650113154,1778481506,784341916,357075625,3608602432,1074092588,2480052770,3811426202,92751289,877911070,3600361838,1231880047,480201094,3756190983,3094495953,434011822,87971354,363687820,1717726236,1901380172,3926403882,2481662265,400339184,1490350766,2661455099,1389319756,2558787174,784598401,1983468483,30828846,3550527752,2716276238,3841122214,1765724805,1955612312,1277890269,1333098070,1564029816,2704417615,1026694237,3287671188,1260819201,3349086767,1016692350,1582273796,1073413053,1995943182,694588404,1025494639,3323872702,3551898420,4146854327,453260480,1316140391,1435673405,3038941953,3486689407,1622062951,403978347,817677117,950059133,4246079218,3278066075,1486738320,1417279718,481875527,2549965225,3933690356,760697757,1452955855,3897451437,1177426808,1702951038,4085348628,2447005172,1084371187,3516436277,3068336338,1073369276,1027665953,3284188590,1230553676,1368340146,2226246512,267243139,2274220762,4070734279,2497715176,2423353163,2504755875),f[7]=newArray(3793104909,3151888380,2817252029,895778965,2005530807,3871412763,237245952,86829237,296341424,3851759377,3974600970,2475086196,709006108,1994621201,2972577594,937287164,3734691505,168608556,3189338153,2225080640,3139713551,3033610191,3025041904,77524477,185966941,1208824168,2344345178,1721625922,3354191921,1066374631,1927223579,1971335949,2483503697,1551748602,2881383779,2856329572,3003241482,48746954,1398218158,2050065058,313056748,4255789917,393167848,1912293076,940740642,3465845460,3091687853,2522601570,2197016661,1727764327,364383054,492521376,1291706479,3264136376,1474851438,1685747964,2575719748,1619776915,1814040067,970743798,1561002147,2925768690,2123093554,1880132620,3151188041,697884420,2550985770,2607674513,2659114323,110200136,1489731079,997519150,1378877361,3527870668,478029773,2766872923,1022481122,431258168,1112503832,897933369,2635587303,669726182,3383752315,918222264,163866573,3246985393,3776823163,114105080,1903216136,761148244,3571337562,1690750982,3166750252,1037045171,1888456500,2010454850,642736655,616092351,365016990,1185228132,4174898510,1043824992,2023083429,2241598885,3863320456,3279669087,3674716684,108438443,2132974366,830746235,606445527,4173263986,2204105912,1844756978,2532684181,4245352700,2969441100,3796921661,1335562986,4061524517,2720232303,2679424040,634407289,885462008,3294724487,3933892248,2094100220,339117932,4048830727,3202280980,1458155303,2689246273,1022871705,2464987878,3714515309,353796843,2822958815,4256850100,4052777845,551748367,618185374,3778635579,4020649912,1904685140,3069366075,2670879810,3407193292,2954511620,4058283405,2219449317,3135758300,1120655984,3447565834,1474845562,3577699062,550456716,3466908712,2043752612,881257467,869518812,2005220179,938474677,3305539448,3850417126,1315485940,3318264702,226533026,965733244,321539988,1136104718,804158748,573969341,3708209826,937399083,3290727049,2901666755,1461057207,4013193437,4066861423,3242773476,2421326174,1581322155,3028952165,786071460,3900391652,3918438532,1485433313,4023619836,3708277595,3678951060,953673138,1467089153,1930354364,1533292819,2492563023,1346121658,1685000834,1965281866,3765933717,4190206607,2052792609,3515332758,690371149,3125873887,2180283551,2903598061,3933952357,436236910,289419410,14314871,1242357089,2904507907,1616633776,2666382180,585885352,3471299210,2699507360,1432659641,277164553,3354103607,770115018,2303809295,3741942315,3177781868,2853364978,2269453327,3774259834,987383833,1290892879,225909803,1741533526,890078084,1496906255,1111072499,916028167,243534141,1252605537,2204162171,531204876,290011180,3916834213,102027703,237315147,209093447,1486785922,220223953,2758195998,4175039106,82940208,3127791296,2569425252,518464269,1353887104,3941492737,2377294467,3935040926)}functione(a){this.cast5=newd,this.cast5.setKey(f.str2bin(a)),this.encrypt=function(a){returnthis.cast5.encrypt(a)}}varf=a("../../util.js");b.exports=e,b.exports.blockSize=e.prototype.blockSize=8,b.exports.keySize=e.prototype.keySize=16},{"../../util.js":76}],22:[function(a,b,c){"use strict";functiond(a,b,c,d,e,h){vari,j,k,l,m,n,o,p,q,r,s,t,u,v,w=newArray(16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756),x=newArray(-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344),y=newArray(520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584),z=newArray(8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928),A=newArray(256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080),B=newArray(536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312),C=newArray(2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154),D=newArray(268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696),E=0,F=b.length,G=0,H=32==a.length?3:9;
varf,g,h,i;returnf=(65535&a.lowOrder)+(65535&b.lowOrder)+(65535&c.lowOrder)+(65535&e.lowOrder),g=(a.lowOrder>>>16)+(b.lowOrder>>>16)+(c.lowOrder>>>16)+(e.lowOrder>>>16)+(f>>>16),h=(65535&g)<<16|65535&f,f=(65535&a.highOrder)+(65535&b.highOrder)+(65535&c.highOrder)+(65535&e.highOrder)+(g>>>16),g=(a.highOrder>>>16)+(b.highOrder>>>16)+(c.highOrder>>>16)+(e.highOrder>>>16)+(f>>>16),i=(65535&g)<<16|65535&f,newd(i,h)},G=function(a,b,c,e,f){varg,h,i,j;returng=(65535&a.lowOrder)+(65535&b.lowOrder)+(65535&c.lowOrder)+(65535&e.lowOrder)+(65535&f.lowOrder),h=(a.lowOrder>>>16)+(b.lowOrder>>>16)+(c.lowOrder>>>16)+(e.lowOrder>>>16)+(f.lowOrder>>>16)+(g>>>16),i=(65535&h)<<16|65535&g,g=(65535&a.highOrder)+(65535&b.highOrder)+(65535&c.highOrder)+(65535&e.highOrder)+(65535&f.highOrder)+(h>>>16),h=(a.highOrder>>>16)+(b.highOrder>>>16)+(c.highOrder>>>16)+(e.highOrder>>>16)+(f.highOrder>>>16)+(g>>>16),j=(65535&h)<<16|65535&g,newd(j,i)},H=function(a,b){varc,d,e,f,g,h,i,k,l,m=[],n=p,q=o,s=r,t=j,u=B,v=D,w=[1732584193,4023233417,2562383102,271733878,3285377520],x=[1518500249,1518500249,1518500249,1518500249,1518500249,1518500249,1518500249,1518500249,1518500249,1518500249,1518500249,1518500249,1518500249,1518500249,1518500249,1518500249,1518500249,1518500249,1518500249,1518500249,1859775393,1859775393,1859775393,1859775393,1859775393,1859775393,1859775393,1859775393,1859775393,1859775393,1859775393,1859775393,1859775393,1859775393,1859775393,1859775393,1859775393,1859775393,1859775393,1859775393,2400959708,2400959708,2400959708,2400959708,2400959708,2400959708,2400959708,2400959708,2400959708,2400959708,2400959708,2400959708,2400959708,2400959708,2400959708,2400959708,2400959708,2400959708,2400959708,2400959708,3395469782,3395469782,3395469782,3395469782,3395469782,3395469782,3395469782,3395469782,3395469782,3395469782,3395469782,3395469782,3395469782,3395469782,3395469782,3395469782,3395469782,3395469782,3395469782,3395469782];for(a[b>>5]|=128<<24-b%32,a[(b+65>>9<<4)+15]=b,l=a.length,i=0;l>i;i+=16){for(c=w[0],d=w[1],e=w[2],f=w[3],g=w[4],k=0;80>k;k+=1)16>k?m[k]=a[k+i]:m[k]=t(m[k-3]^m[k-8]^m[k-14]^m[k-16],1),h=20>k?v(t(c,5),n(d,e,f),g,x[k],m[k]):40>k?v(t(c,5),q(d,e,f),g,x[k],m[k]):60>k?v(t(c,5),s(d,e,f),g,x[k],m[k]):v(t(c,5),q(d,e,f),g,x[k],m[k]),g=f,f=e,e=t(d,30),d=c,c=h;w[0]=u(c,w[0]),w[1]=u(d,w[1]),w[2]=u(e,w[2]),w[3]=u(f,w[3]),w[4]=u(g,w[4])}returnw},I=function(a,b,c){vare,f,g,h,i,j,k,l,m,n,o,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z=[];for("SHA-224"===c||"SHA-256"===c?(H=64,I=(b+65>>9<<4)+15,L=16,M=1,W=Number,N=B,O=C,P=D,Q=x,R=z,S=t,T=v,V=r,U=p,X=[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],o="SHA-224"===c?[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]:[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]):("SHA-384"===c||"SHA-512"===c)&&(H=80,I=(b+128>>10<<5)+31,L=32,M=2,W=d,N=E,O=F,P=G,Q=y,R=A,S=u,T=w,V=s,U=q,X=[newW(1116352408,3609767458),newW(1899447441,602891725),newW(3049323471,3964484399),newW(3921009573,2173295548),newW(961987163,4081628472),newW(1508970993,3053834265),newW(2453635748,2937671579),newW(2870763221,3664609560),newW(3624381080,2734883394),newW(310598401,1164996542),newW(607225278,1323610764),newW(1426881987,3590304994),newW(1925078388,4068182383),newW(2162078206,991336113),newW(2614888103,633803317),newW(3248222580,3479774868),newW(3835390401,2666613458),newW(4022224774,944711139),newW(264347078,2341262773),newW(604807628,2007800933),newW(770255983,1495990901),newW(1249150122,1856431235),newW(1555081692,3175218132),newW(1996064986,2198950837),newW(2554220882,3999719339),newW(2821834349,766784016),newW(2952996808,2566594879),newW(3210313671,3203337956),newW(3336571891,1034457026),newW(3584528711,2466948901),newW(113926993,3758326383),newW(338241895,168717936),newW(666307205,1188179964),newW(773529912,1546045734),newW(1294757372,1522805485),newW(1396182291,2643833823),newW(1695183700,2343527390),newW(1986661051,1014477480),newW(2177026350,1206759142),newW(2456956037,344077627),newW(2730485921,1290863460),newW(2820302411,3158454273),newW(3259730800,3505952657),newW(3345764771,106217008),newW(3516065817,3606008344),newW(3600352804,1432725776),newW(4094571909,1467031594),newW(275423344,851169720),newW(430227734,3100823752),newW(506948616,1363258195),newW(659060556,3750685593),newW(883997877,3785050280),newW(958139571,3318307427),newW(1322822218,3812723403),newW(1537002063,2003034995),newW(1747873779,3602036899),newW(1955562222,1575990012),newW(2024104815,1125592928),newW(2227730452,2716904306),newW(2361852424,442776044),newW(2428436474,593698344),newW(2756734187,3733110249),newW(3204031479,2999351573),newW(3329325298,3815920427),newW(3391569614,3928383900),newW(3515267271,566280711),newW(3940187606,3454069534),newW(4118630271,4000239992),newW(116418474,1914138554),newW(174292421,2731055270),newW(289380356,3203993006),newW(460393269,320620315),newW(685471733,587496836),newW(852142971,1086792851),newW(1017036298,365543100),newW(1126000580,2618297676),newW(1288033470,3409855158),newW(1501505948,4234509866),newW(1607167915,987167468),newW(1816402316,1246189591)],o="SHA-384"===c?[newW(3418070365,3238371032),newW(1654270250,914150663),newW(2438529370,812702999),newW(355462360,4144912697),newW(1731405415,4290775857),newW(41048885895,1750603025),newW(3675008525,1694076839),newW(1203062813,3204075428)]:[newW(1779033703,4089235720),newW(3144134277,2227873595),newW(1013904242,4271175723),newW(2773480762,1595750129),newW(1359893119,2917565137),newW(2600822924,725511199),newW(528734635,4215389547),newW(1541459225,327033209)]),a[b>>5]|=128<<24-b%32,a[I]=b,Y=a.length,J=0;Y>J;J+=L){for(e=o[0],f=o[1],g=o[2],h=o[3],i=o[4],j=o[5],k=o[6],l=o[7],K=0;H>K;K+=1)16>K?Z[K]=newW(a[K*M+J],a[K*M+J+1]):Z[K]=O(R(Z[K-2]),Z[K-7],Q(Z[K-15]),Z[K-16]),m=P(l,T(i),U(i,j,k),X[K],Z[K]),n=N(S(e),V(e,f,g)),l=k,k=j,j=i,i=N(h,m),h=g,g=f,f=e,e=N(m,n);o[0]=N(e,o[0]),o[1]=N(f,o[1]),o[2]=N(g,o[2]),o[3]=N(h,o[3]),o[4]=N(i,o[4]),o[5]=N(j,o[5]),o[6]=N(k,o[6]),o[7]=N(l,o[7])}switch(c){case"SHA-224":return[o[0],o[1],o[2],o[3],o[4],o[5],o[6]];case"SHA-256":returno;case"SHA-384":return[o[0].highOrder,o[0].lowOrder,o[1].highOrder,o[1].lowOrder,o[2].highOrder,o[2].lowOrder,o[3].highOrder,o[3].lowOrder,o[4].highOrder,o[4].lowOrder,o[5].highOrder,o[5].lowOrder];case"SHA-512":return[o[0].highOrder,o[0].lowOrder,o[1].highOrder,o[1].lowOrder,o[2].highOrder,o[2].lowOrder,o[3].highOrder,o[3].lowOrder,o[4].highOrder,o[4].lowOrder,o[5].highOrder,o[5].lowOrder,o[6].highOrder,o[6].lowOrder,o[7].highOrder,o[7].lowOrder];default:thrownewError("Unknown SHA variant")}},J=function(b,c){if(this.sha1=null,this.sha224=null,this.sha256=null,this.sha384=null,this.sha512=null,this.strBinLen=null,this.strToHash=null,"HEX"===c){if(0!==b.length%2)thrownewError("TEXT MUST BE IN BYTE INCREMENTS");this.strBinLen=4*b.length,this.strToHash=f(b)}else{if("ASCII"!==c&&"undefined"!=typeofc)thrownewError("UNKNOWN TEXT INPUT TYPE");this.strBinLen=b.length*a,this.strToHash=e(b)}};returnJ.prototype={getHash:function(a,b){varc=null,d=this.strToHash.slice();switch(b){case"HEX":c=g;break;case"B64":c=h;break;case"ASCII":c=i;break;default:thrownewError("FORMAT NOT RECOGNIZED")}switch(a){case"SHA-1":returnnull===this.sha1&&(this.sha1=H(d,this.strBinLen)),c(this.sha1);case"SHA-224":returnnull===this.sha224&&(this.sha224=I(d,this.strBinLen,a)),c(this.sha224);case"SHA-256":returnnull===this.sha256&&(this.sha256=I(d,this.strBinLen,a)),c(this.sha256);case"SHA-384":returnnull===this.sha384&&(this.sha384=I(d,this.strBinLen,a)),c(this.sha384);case"SHA-512":returnnull===this.sha512&&(this.sha512=I(d,this.strBinLen,a)),c(this.sha512);default:thrownewError("HASH NOT RECOGNIZED")}},getHMAC:function(b,c,d,j){vark,l,m,n,o,p,q,r,s,t=[],u=[];switch(j){case"HEX":k=g;break;case"B64":k=h;break;case"ASCII":k=i;break;default:thrownewError("FORMAT NOT RECOGNIZED")}switch(d){case"SHA-1":m=64,s=160;break;case"SHA-224":m=64,s=224;break;case"SHA-256":m=64,s=256;break;case"SHA-384":m=128,s=384;break;case"SHA-512":m=128,s=512;break;default:thrownewError("HASH NOT RECOGNIZED")}if("HEX"===c){if(0!==b.length%2)thrownewError("KEY MUST BE IN BYTE INCREMENTS");l=f(b),r=4*b.length}else{if("ASCII"!==c)thrownewError("UNKNOWN KEY INPUT TYPE");l=e(b),r=b.length*a}for(n=8*m,q=m/4-1,r/8>m?(l="SHA-1"===d?H(l,r):I(l,r,d),l[q]&=4294967040):m>r/8&&(l[q]&=4294967040),o=0;q>=o;o+=1)t[o]=909522486^l[o],u[o]=1549556828^l[o];return"SHA-1"===d?(p=H(t.concat(this.strToHash),n+this.strBinLen),p=H(u.concat(p),n+s)):(p=I(t.concat(this.strToHash),n+this.strBinLen,d),p=I(u.concat(p),n+s,d)),k(p)}},J}();b.exports={sha1:function(a){varb=newd(a,"ASCII");returnb.getHash("SHA-1","ASCII")},sha224:function(a){varb=newd(a,"ASCII");returnb.getHash("SHA-224","ASCII")},sha256:function(a){varb=newd(a,"ASCII");returnb.getHash("SHA-256","ASCII")},sha384:function(a){varb=newd(a,"ASCII");returnb.getHash("SHA-384","ASCII")},sha512:function(a){varb=newd(a,"ASCII");returnb.getHash("SHA-512","ASCII")}}},{}],32:[function(a,b,c){b.exports={cipher:a("./cipher"),hash:a("./hash"),cfb:a("./cfb.js"),publicKey:a("./public_key"),signature:a("./signature.js"),random:a("./random.js"),pkcs1:a("./pkcs1.js")};vard=a("./crypto.js");for(vareind)b.exports[e]=d[e]},{"./cfb.js":18,"./cipher":23,"./crypto.js":25,"./hash":28,"./pkcs1.js":33,"./public_key":36,"./random.js":39,"./signature.js":40}],33:[function(a,b,c){functiond(a){for(varb,c="";c.length<a;)b=f.getSecureRandomOctet(),0!==b&&(c+=String.fromCharCode(b));returnc}vare=[];e[1]=[48,32,48,12,6,8,42,134,72,134,247,13,2,5,5,0,4,16],e[2]=[48,33,48,9,6,5,43,14,3,2,26,5,0,4,20],e[3]=[48,33,48,9,6,5,43,36,3,2,1,5,0,4,20],e[8]=[48,49,48,13,6,9,96,134,72,1,101,3,4,2,1,5,0,4,32],e[9]=[48,65,48,13,6,9,96,134,72,1,101,3,4,2,2,5,0,4,48],e[10]=[48,81,48,13,6,9,96,134,72,1,101,3,4,2,3,5,0,4,64],e[11]=[48,45,48,13,6,9,96,134,72,1,101,3,4,2,4,5,0,4,28];varf=(a("./crypto.js"),a("./random.js")),g=a("../util.js"),h=a("./public_key/jsbn.js"),i=a("./hash");b.exports={eme:{encode:function(a,b){varc=a.length;if(c>b-11)thrownewError("Message too long");vare=d(b-c-3),f=String.fromCharCode(0)+String.fromCharCode(2)+e+String.fromCharCode(0)+a;returnf},decode:function(a){0!==a.charCodeAt(0)&&(a=String.fromCharCode(0)+a);for(varb=a.charCodeAt(0),c=a.charCodeAt(1),d=2;0!==a.charCodeAt(d)&&d<a.length;)d++;vare=d-2,f=a.charCodeAt(d++);if(0===b&&2===c&&e>=8&&0===f)returna.substr(d);thrownewError("Decryption error")}},emsa:{encode:function(a,b,c){vard,f=i.digest(a,b);if(f.length!==i.getHashByteLength(a))thrownewError("Invalid hash length");varj="";for(d=0;d<e[a].length;d++)j+=String.fromCharCode(e[a][d]);j+=f;vark=j.length;if(k+11>c)thrownewError("Intended encoded message length too short");varl="";for(d=0;c-k-3>d;d++)l+=String.fromCharCode(255);varm=String.fromCharCode(0)+String.fromCharCode(1)+l+String.fromCharCode(0)+j;returnnewh(g.hexstrdump(m),16)}}}},{"../util.js":76,"./crypto.js":25,"./hash":28,"./public_key/jsbn.js":37,"./random.js":39}],34:[function(a,b,c){functiond(){functiona(a,b,c,d,i,j){for(vark,l,m,n=h.getLeftNBits(g.digest(a,b),i.bitLength()),o=newe(h.hexstrdump(n),16);;)if(k=f.getRandomBigIntegerInRange(e.ONE,i.subtract(e.ONE)),l=c.modPow(k,d).mod(i),m=k.modInverse(i).multiply(o.add(j.multiply(l))).mod(i),0!=l&&0!=m)break;varp=[];returnp[0]=l.toMPI(),p[1]=m.toMPI(),p}functionb(a){varb=i.prefer_hash_algorithm;switch(Math.round(a.bitLength()/8)){case20:return2!=b&&b>11&&10!=b&&8>b?2:b;case28:returnb>11&&8>b?11:b;case32:returnb>10&&8>b?8:b;default:returnh.print_debug("DSA select hash algorithm: returning null for an unknown length of q"),null}}functionc(a,b,c,d,f,i,j,k){varl=h.getLeftNBits(g.digest(a,d),i.bitLength()),m=newe(h.hexstrdump(l),16);if(e.ZERO.compareTo(b)>=0||b.compareTo(i)>=0||e.ZERO.compareTo(c)>=0||c.compareTo(i)>=0)returnh.print_debug("invalid DSA Signature"),null;varn=c.modInverse(i);if(0==e.ZERO.compareTo(n))returnh.print_debug("invalid DSA Signature"),null;varo=m.multiply(n).mod(i),p=b.multiply(n).mod(i);returnj.modPow(o,f).multiply(k.modPow(p,f)).mod(f).mod(i)}this.select_hash_algorithm=b,this.sign=a,this.verify=c}vare=a("./jsbn.js"),f=a("../random.js"),g=a("../hash"),h=a("../../util.js"),i=a("../../config");b.exports=d},{"../../config":17,"../../util.js":76,"../hash":28,"../random.js":39,"./jsbn.js":37}],35:[function(a,b,c){functiond(){functiona(a,b,c,d){varg=c.subtract(e.TWO),h=f.getRandomBigIntegerInRange(e.ONE,g);h=h.mod(g).add(e.ONE);vari=[];returni[0]=b.modPow(h,c),i[1]=d.modPow(h,c).multiply(a).mod(c),i}functionb(a,b,c,d){returng.print_debug("Elgamal Decrypt:\nc1:"+g.hexstrdump(a.toMPI())+"\nc2:"+g.hexstrdump(b.toMPI())+"\np:"+g.hexstrdump(c.toMPI())+"\nx:"+g.hexstrdump(d.toMPI())),a.modPow(d,c).modInverse(c).multiply(b).mod(c)}this.encrypt=a,this.decrypt=b}vare=a("./jsbn.js"),f=a("../random.js"),g=a("../../util.js");b.exports=d},{"../../util.js":76,"../random.js":39,"./jsbn.js":37}],36:[function(a,b,c){b.exports={rsa:a("./rsa.js"),elgamal:a("./elgamal.js"),dsa:a("./dsa.js")}},{"./dsa.js":34,"./elgamal.js":35,"./rsa.js":38}],37:[function(a,b,c){functiond(a,b,c){null!=a&&("number"==typeofa?this.fromNumber(a,b,c):null==b&&"string"!=typeofa?this.fromString(a,256):this.fromString(a,b))}functione(){returnnewd(null)}functionf(a,b,c,d,e,f){for(;--f>=0;){varg=b*this[a++]+c[d]+e;e=Math.floor(g/67108864),c[d++]=67108863&g}returne}functiong(a){returnfb.charAt(a)}functionh(a,b){varc=gb[a.charCodeAt(b)];returnnull==c?-1:c}functioni(a){for(varb=this.t-1;b>=0;--b)a[b]=this[b];a.t=this.t,a.s=this.s}functionj(a){this.t=1,this.s=0>a?-1:0,a>0?this[0]=a:-1>a?this[0]=a+this.DV:this.t=0}functionk(a){varb=e();returnb.fromInt(a),b}functionl(a,b){varc;if(16==b)c=4;elseif(8==b)c=3;elseif(256==b)c=8;elseif(2==b)c=1;elseif(32==b)c=5;else{if(4!=b)returnvoidthis.fromRadix(a,b);c=2}this.t=0,this.s=0;for(vare=a.length,f=!1,g=0;--e>=0;){vari=8==c?255&a[e]:h(a,e);0>i?"-"==a.charAt(e)&&(f=!0):(f=!1,0==g?this[this.t++]=i:g+c>this.DB?(this[this.t-1]|=(i&(1<<this.DB-g)-1)<<g,this[this.t++]=i>>this.DB-g):this[this.t-1]|=i<<g,g+=c,g>=this.DB&&(g-=this.DB))}8==c&&0!=(128&a[0])&&(this.s=-1,g>0&&(this[this.t-1]|=(1<<this.DB-g)-1<<g)),this.clamp(),f&&d.ZERO.subTo(this,this)}functionm(){for(vara=this.s&this.DM;this.t>0&&this[this.t-1]==a;)--this.t}functionn(a){if(this.s<0)return"-"+this.negate().toString(a);varb;if(16==a)b=4;elseif(8==a)b=3;elseif(2==a)b=1;elseif(32==a)b=5;else{if(4!=a)returnthis.toRadix(a);b=2}varc,d=(1<<b)-1,e=!1,f="",h=this.t,i=this.DB-h*this.DB%b;if(h-->0)for(i<this.DB&&(c=this[h]>>i)>0&&(e=!0,f=g(c));h>=0;)b>i?(c=(this[h]&(1<<i)-1)<<b-i,c|=this[--h]>>(i+=this.DB-b)):(c=this[h]>>(i-=b)&d,0>=i&&(i+=this.DB,--h)),c>0&&(e=!0),e&&(f+=g(c));returne?f:"0"}functiono(){vara=e();returnd.ZERO.subTo(this,a),a}functionp(){returnthis.s<0?this.negate():this}functionq(a){varb=this.s-a.s;if(0!=b)returnb;varc=this.t;if(b=c-a.t,0!=b)returnthis.s<0?-b:b;for(;--c>=0;)if(0!=(b=this[c]-a[c]))returnb;return0}functionr(a){varb,c=1;return0!=(b=a>>>16)&&(a=b,c+=16),0!=(b=a>>8)&&(a=b,c+=8),0!=(b=a>>4)&&(a=b,c+=4),0!=(b=a>>2)&&(a=b,c+=2),0!=(b=a>>1)&&(a=b,c+=1),c}functions(){returnthis.t<=0?0:this.DB*(this.t-1)+r(this[this.t-1]^this.s&this.DM)}functiont(a,b){varc;for(c=this.t-1;c>=0;--c)b[c+a]=this[c];for(c=a-1;c>=0;--c)b[c]=0;b.t=this.t+a,b.s=this.s}functionu(a,b){for(varc=a;c<this.t;++c)b[c-a]=this[c];b.t=Math.max(this.t-a,0),b.s=this.s}functionv(a,b){varc,d=a%this.DB,e=this.DB-d,f=(1<<e)-1,g=Math.floor(a/this.DB),h=this.s<<d&this.DM;for(c=this.t-1;c>=0;--c)b[c+g+1]=this[c]>>e|h,h=(this[c]&f)<<d;for(c=g-1;c>=0;--c)b[c]=0;b[g]=h,b.t=this.t+g+1,b.s=this.s,b.clamp()}functionw(a,b){b.s=this.s;varc=Math.floor(a/this.DB);if(c>=this.t)returnvoid(b.t=0);vard=a%this.DB,e=this.DB-d,f=(1<<d)-1;b[0]=this[c]>>d;for(varg=c+1;g<this.t;++g)b[g-c-1]|=(this[g]&f)<<e,b[g-c]=this[g]>>d;d>0&&(b[this.t-c-1]|=(this.s&f)<<e),b.t=this.t-c,b.clamp()}functionx(a,b){for(varc=0,d=0,e=Math.min(a.t,this.t);e>c;)d+=this[c]-a[c],b[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d-=a.s;c<this.t;)d+=this[c],b[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d-=a[c],b[c++]=d&this.DM,d>>=this.DB;d-=a.s}b.s=0>d?-1:0,-1>d?b[c++]=this.DV+d:d>0&&(b[c++]=d),b.t=c,b.clamp()}functiony(a,b){varc=this.abs(),e=a.abs(),f=c.t;for(b.t=f+e.t;--f>=0;)b[f]=0;for(f=0;f<e.t;++f)b[f+c.t]=c.am(0,e[f],b,f,0,c.t);b.s=0,b.clamp(),this.s!=a.s&&d.ZERO.subTo(b,b)}functionz(a){for(varb=this.abs(),c=a.t=2*b.t;--c>=0;)a[c]=0;for(c=0;c<b.t-1;++c){vard=b.am(c,b[c],a,2*c,0,1);(a[c+b.t]+=b.am(c+1,2*b[c],a,2*c+1,d,b.t-c-1))>=b.DV&&(a[c+b.t]-=b.DV,a[c+b.t+1]=1)}a.t>0&&(a[a.t-1]+=b.am(c,b[c],a,2*c,0,1)),a.s=0,a.clamp()}functionA(a,b,c){varf=a.abs();if(!(f.t<=0)){varg=this.abs();if(g.t<f.t)returnnull!=b&&b.fromInt(0),void(null!=c&&this.copyTo(c));null==c&&(c=e());varh=e(),i=this.s,j=a.s,k=this.DB-r(f[f.t-1]);k>0?(f.lShiftTo(k,h),g.lShiftTo(k,c)):(f.copyTo(h),g.copyTo(c));varl=h.t,m=h[l-1];if(0!=m){varn=m*(1<<this.F1)+(l>1?h[l-2]>>this.F2:0),o=this.FV/n,p=(1<<this.F1)/n,q=1<<this.F2,s=c.t,t=s-l,u=null==b?e():b;for(h.dlShiftTo(t,u),c.compareTo(u)>=0&&(c[c.t++]=1,c.subTo(u,c)),d.ONE.dlShiftTo(l,u),u.subTo(h,h);h.t<l;)h[h.t++]=0;for(;--t>=0;){varv=c[--s]==m?this.DM:Math.floor(c[s]*o+(c[s-1]+q)*p);if((c[s]+=h.am(0,v,c,t,0,l))<v)for(h.dlShiftTo(t,u),c.subTo(u,c);c[s]<--v;)c.subTo(u,c)}null!=b&&(c.drShiftTo(l,b),i!=j&&d.ZERO.subTo(b,b)),c.t=l,c.clamp(),k>0&&c.rShiftTo(k,c),0>i&&d.ZERO.subTo(c,c)}}}functionB(a){varb=e();returnthis.abs().divRemTo(a,null,b),this.s<0&&b.compareTo(d.ZERO)>0&&a.subTo(b,b),b}functionC(a){this.m=a}functionD(a){returna.s<0||a.compareTo(this.m)>=0?a.mod(this.m):a}functionE(a){returna}functionF(a){a.divRemTo(this.m,null,a)}functionG(a,b,c){a.multiplyTo(b,c),this.reduce(c)}functionH(a,b){a.squareTo(b),this.reduce(b)}functionI(){if(this.t<1)return0;vara=this[0];if(0==(1&a))return0;varb=3&a;returnb=b*(2-(15&a)*b)&15,b=b*(2-(255&a)*b)&255,b=b*(2-((65535&a)*b&65535))&65535,b=b*(2-a*b%this.DV)%this.DV,b>0?this.DV-b:-b}functionJ(a){this.m=a,this.mp=a.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<a.DB-15)-1,this.mt2=2*a.t}functionK(a){varb=e();returna.abs().dlShiftTo(this.m.t,b),b.divRemTo(this.m,null,b),a.s<0&&b.compareTo(d.ZERO)>0&&this.m.subTo(b,b),b}functionL(a){varb=e();returna.copyTo(b),this.reduce(b),b}functionM(a){for(;a.t<=this.mt2;)a[a.t++]=0;for(varb=0;b<this.m.t;++b){varc=32767&a[b],d=c*this.mpl+((c*this.mph+(a[b]>>15)*this.mpl&this.um)<<15)&a.DM;for(c=b+this.m.t,a[c]+=this.m.am(0,d,a,b,0,this.m.t);a[c]>=a.DV;)a[c]-=a.DV,a[++c]++}a.clamp(),a.drShiftTo(this.m.t,a),a.compareTo(this.m)>=0&&a.subTo(this.m,a)}functionN(a,b){a.squareTo(b),this.reduce(b)}functionO(a,b,c){a.multiplyTo(b,c),this.reduce(c)}functionP(){return0==(this.t>0?1&this[0]:this.s)}functionQ(a,b){if(a>4294967295||1>a)returnd.ONE;varc=e(),f=e(),g=b.convert(this),h=r(a)-1;for(g.copyTo(c);--h>=0;)if(b.sqrTo(c,f),(a&1<<h)>0)b.mulTo(f,g,c);else{vari=c;c=f,f=i}returnb.revert(c)}functionR(a,b){varc;returnc=256>a||b.isEven()?newC(b):newJ(b),this.exp(a,c)}functionS(){vara=e();returnthis.copyTo(a),a}functionT(){if(this.s<0){if(1==this.t)returnthis[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)returnthis[0];if(0==this.t)return0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]}functionU(){return0==this.t?this.s:this[0]<<24>>24}functionV(){return0==this.t?this.s:this[0]<<16>>16}functionW(a){returnMath.floor(Math.LN2*this.DB/Math.log(a))}functionX(){returnthis.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1}functionY(a){if(null==a&&(a=10),0==this.signum()||2>a||a>36)return"0";varb=this.chunkSize(a),c=Math.pow(a,b),d=k(c),f=e(),g=e(),h="";for(this.divRemTo(d,f,g);f.signum()>0;)h=(c+g.intValue()).toString(a).substr(1)+h,f.divRemTo(d,f,g);returng.intValue().toString(a)+h}functionZ(a,b){this.fromInt(0),null==b&&(b=10);for(varc=this.chunkSize(b),e=Math.pow(b,c),f=!1,g=0,i=0,j=0;j<a.length;++j){vark=h(a,j);0>k?"-"==a.charAt(j)&&0==this.signum()&&(f=!0):(i=b*i+k,++g>=c&&(this.dMultiply(e),this.dAddOffset(i,0),g=0,i=0))}g>0&&(this.dMultiply(Math.pow(b,g)),this.dAddOffset(i,0)),f&&d.ZERO.subTo(this,this)}function$(a,b,c){if("number"==typeofb)if(2>a)this.fromInt(1);elsefor(this.fromNumber(a,c),this.testBit(a-1)||this.bitwiseTo(d.ONE.shiftLeft(a-1),ga,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(b);)this.dAddOffset(2,0),this.bitLength()>a&&this.subTo(d.ONE.shiftLeft(a-1),this);else{vare=newArray,f=7&a;e.length=(a>>3)+1,b.nextBytes(e),f>0?e[0]&=(1<<f)-1:e[0]=0,this.fromString(e,256)}}function_(){vara=this.t,b=newArray;b[0]=this.s;varc,d=this.DB-a*this.DB%8,e=0;if(a-->0)for(d<this.DB&&(c=this[a]>>d)!=(this.s&this.DM)>>d&&(b[e++]=c|this.s<<this.DB-d);a>=0;)8>d?(c=(this[a]&(1<<d)-1)<<8-d,c|=this[--a]>>(d+=this.DB-8)):(c=this[a]>>(d-=8)&255,0>=d&&(d+=this.DB,--a)),(e>0||c!=this.s)&&(b[e++]=c);returnb}functionaa(a){return0==this.compareTo(a)}functionba(a){returnthis.compareTo(a)<0?this:a}functionca(a){returnthis.compareTo(a)>0?this:a}functionda(a,b,c){vard,e,f=Math.min(a.t,this.t);for(d=0;f>d;++d)c[d]=b(this[d],a[d]);if(a.t<this.t){for(e=a.s&this.DM,d=f;d<this.t;++d)c[d]=b(this[d],e);c.t=this.t}else{for(e=this.s&this.DM,d=f;d<a.t;++d)c[d]=b(e,a[d]);c.t=a.t}c.s=b(this.s,a.s),c.clamp()}functionea(a,b){returna&b}functionfa(a){varb=e();returnthis.bitwiseTo(a,ea,b),b}functionga(a,b){returna|b}functionha(a){varb=e();returnthis.bitwiseTo(a,ga,b),b}functionia(a,b){returna^b}functionja(a){varb=e();returnthis.bitwiseTo(a,ia,b),b}functionka(a,b){returna&~b}functionla(a){varb=e();returnthis.bitwiseTo(a,ka,b),b}functionma(){for(vara=e(),b=0;b<this.t;++b)a[b]=this.DM&~this[b];returna.t=this.t,a.s=~this.s,a}functionna(a){varb=e();return0>a?this.rShiftTo(-a,b):this.lShiftTo(a,b),b}functionoa(a){varb=e();return0>a?this.lShiftTo(-a,b):this.rShiftTo(a,b),b}functionpa(a){if(0==a)return-1;varb=0;return0==(65535&a)&&(a>>=16,b+=16),0==(255&a)&&(a>>=8,b+=8),0==(15&a)&&(a>>=4,b+=4),0==(3&a)&&(a>>=2,b+=2),0==(1&a)&&++b,b}functionqa(){for(vara=0;a<this.t;++a)if(0!=this[a])returna*this.DB+pa(this[a]);returnthis.s<0?this.t*this.DB:-1}functionra(a){for(varb=0;0!=a;)a&=a-1,++b;returnb}functionsa(){for(vara=0,b=this.s&this.DM,c=0;c<this.t;++c)a+=ra(this[c]^b);returna}functionta(a){varb=Math.floor(a/this.DB);returnb>=this.t?0!=this.s:0!=(this[b]&1<<a%this.DB)}functionua(a,b){varc=d.ONE.shiftLeft(a);returnthis.bitwiseTo(c,b,c),c}functionva(a){returnthis.changeBit(a,ga)}functionwa(a){returnthis.changeBit(a,ka)}functionxa(a){returnthis.changeBit(a,ia)}functionya(a,b){for(varc=0,d=0,e=Math.min(a.t,this.t);e>c;)d+=this[c]+a[c],b[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d+=a.s;c<this.t;)d+=this[c],b[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d+=a[c],b[c++]=d&this.DM,d>>=this.DB;d+=a.s}b.s=0>d?-1:0,d>0?b[c++]=d:-1>d&&(b[c++]=this.DV+d),b.t=c,b.clamp()}functionza(a){varb=e();returnthis.addTo(a,b),b}functionAa(a){varb=e();returnthis.subTo(a,b),b}functionBa(a){varb=e();returnthis.multiplyTo(a,b),b}functionCa(){vara=e();returnthis.squareTo(a),a}functionDa(a){varb=e();returnthis.divRemTo(a,b,null),b}functionEa(a){varb=e();returnthis.divRemTo(a,null,b),b}functionFa(a){varb=e(),c=e();returnthis.divRemTo(a,b,c),newArray(b,c)}functionGa(a){this[this.t]=this.am(0,a-1,this,0,0,this.t),++this.t,this.clamp()}functionHa(a,b){if(0!=a){for(;this.t<=b;)this[this.t++]=0;for(this[b]+=a;this[b]>=this.DV;)this[b]-=this.DV,++b>=this.t&&(this[this.t++]=0),++this[b]}}functionIa(){}functionJa(a){returna}functionKa(a,b,c){a.multiplyTo(b,c)}functionLa(a,b){a.squareTo(b)}functionMa(a){returnthis.exp(a,newIa)}functionNa(a,b,c){vard=Math.min(this.t+a.t,b);for(c.s=0,c.t=d;d>0;)c[--d]=0;vare;for(e=c.t-this.t;e>d;++d)c[d+this.t]=this.am(0,a[d],c,d,0,this.t);for(e=Math.min(a.t,b);e>d;++d)this.am(0,a[d],c,d,0,b-d);c.clamp()}functionOa(a,b,c){--b;vard=c.t=this.t+a.t-b;for(c.s=0;--d>=0;)c[d]=0;for(d=Math.max(b-this.t,0);d<a.t;++d)c[this.t+d-b]=this.am(b-d,a[d],c,0,0,this.t+d-b);c.clamp(),c.drShiftTo(1,c)}functionPa(a){this.r2=e(),this.q3=e(),d.ONE.dlShiftTo(2*a.t,this.r2),this.mu=this.r2.divide(a),this.m=a}functionQa(a){if(a.s<0||a.t>2*this.m.t)returna.mod(this.m);if(a.compareTo(this.m)<0)returna;varb=e();returna.copyTo(b),this.reduce(b),b}functionRa(a){returna}functionSa(a){for(a.drShiftTo(this.m.t-1,this.r2),a.t>this.m.t+1&&(a.t=this.m.t+1,a.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);a.compareTo(this.r2)<0;)a.dAddOffset(1,this.m.t+1);for(a.subTo(this.r2,a);a.compareTo(this.m)>=0;)a.subTo(this.m,a)}functionTa(a,b){a.squareTo(b),this.reduce(b)}functionUa(a,b,c){a.multiplyTo(b,c),this.reduce(c)}functionVa(a,b){varc,d,f=a.bitLength(),g=k(1);if(0>=f)returng;c=18>f?1:48>f?3:144>f?4:768>f?5:6,d=8>f?newC(b):b.isEven()?newPa(b):newJ(b);varh=newArray,i=3,j=c-1,l=(1<<c)-1;if(h[1]=d.convert(this),c>1){varm=e();for(d.sqrTo(h[1],m);l>=i;)h[i]=e(),d.mulTo(m,h[i-2],h[i]),i+=2}varn,o,p=a.t-1,q=!0,s=e();for(f=r(a[p])-1;p>=0;){for(f>=j?n=a[p]>>f-j&l:(n=(a[p]&(1<<f+1)-1)<<j-f,p>0&&(n|=a[p-1]>>this.DB+f-j)),i=c;0==(1&n);)n>>=1,--i;if((f-=i)<0&&(f+=this.DB,--p),q)h[n].copyTo(g),q=!1;else{for(;i>1;)d.sqrTo(g,s),d.sqrTo(s,g),i-=2;i>0?d.sqrTo(g,s):(o=g,g=s,s=o),d.mulTo(s,h[n],g)}for(;p>=0&&0==(a[p]&1<<f);)d.sqrTo(g,s),o=g,g=s,s=o,--f<0&&(f=this.DB-1,--p)}returnd.revert(g)}functionWa(a){varb=this.s<0?this.negate():this.clone(),c=a.s<0?a.negate():a.clone();if(b.compareTo(c)<0){vard=b;b=c,c=d}vare=b.getLowestSetBit(),f=c.getLowestSetBit();if(0>f)returnb;for(f>e&&(f=e),f>0&&(b.rShiftTo(f,b),c.rShiftTo(f,c));b.signum()>0;)(e=b.getLowestSetBit())>0&&b.rShiftTo(e,b),(e=c.getLowestSetBit())>0&&c.rShiftTo(e,c),b.compareTo(c)>=0?(b.subTo(c,b),b.rShiftTo(1,b)):(c.subTo(b,c),c.rShiftTo(1,c));returnf>0&&c.lShiftTo(f,c),c}functionXa(a){if(0>=a)return0;varb=this.DV%a,c=this.s<0?a-1:0;if(this.t>0)if(0==b)c=this[0]%a;elsefor(vard=this.t-1;d>=0;--d)c=(b*c+this[d])%a;returnc}functionYa(a){varb=a.isEven();if(this.isEven()&&b||0==a.signum())returnd.ZERO;for(varc=a.clone(),e=this.clone(),f=k(1),g=k(0),h=k(0),i=k(1);0!=c.signum();){for(;c.isEven();)c.rShiftTo(1,c),b?(f.isEven()&&g.isEven()||(f.addTo(this,f),g.subTo(a,g)),f.rShiftTo(1,f)):g.isEven()||g.subTo(a,g),g.rShiftTo(1,g);for(;e.isEven();)e.rShiftTo(1,e),b?(h.isEven()&&i.isEven()||(h.addTo(this,h),i.subTo(a,i)),h.rShiftTo(1,h)):i.isEven()||i.subTo(a,i),i.rShiftTo(1,i);c.compareTo(e)>=0?(c.subTo(e,c),b&&f.subTo(h,f),g.subTo(i,g)):(e.subTo(c,e),b&&h.subTo(f,h),i.subTo(g,i))}return0!=e.compareTo(d.ONE)?d.ZERO:i.compareTo(a)>=0?i.subtract(a):i.signum()<0?(i.addTo(a,i),i.signum()<0?i.add(a):i):i}functionZa(a){varb,c=this.abs();if(1==c.t&&c[0]<=hb[hb.length-1]){for(b=0;b<hb.length;++b)if(c[0]==hb[b])return!0;return!1}if(c.isEven())return!1;for(b=1;b<hb.length;){for(vard=hb[b],e=b+1;e<hb.length&&ib>d;)d*=hb[e++];for(d=c.modInt(d);e>b;)if(d%hb[b++]==0)return!1}returnc.millerRabin(a)}functionr(a){varb,c=1;return0!=(b=a>>>16)&&(a=b,c+=16),0!=(b=a>>8)&&(a=b,c+=8),0!=(b=a>>4)&&(a=b,c+=4),0!=(b=a>>2)&&(a=b,c+=2),0!=(b=a>>1)&&(a=b,c+=1),c}function$a(){vara=this.toByteArray(),b=8*(a.length-1)+r(a[0]),c="";returnc+=String.fromCharCode((65280&b)>>8),c+=String.fromCharCode(255&b),c+=bb.bin2str(a)}function_a(a){varb=this.subtract(d.ONE),c=b.getLowestSetBit();if(0>=c)return!1;varf=b.shiftRight(c);a=a+1>>1,a>hb.length&&(a=hb.length);for(varg,h=e(),i=[],j=0;a>j;++j){for(;g=hb[Math.floor(Math.random()*hb.length)],-1!=i.indexOf(g););i.push(g),h.fromInt(g);vark=h.modPow(f,this);if(0!=k.compareTo(d.ONE)&&0!=k.compareTo(b)){for(varg=1;g++<c&&0!=k.compareTo(b);)if(k=k.modPowInt(2,this),0==k.compareTo(d.ONE))return!1;if(0!=k.compareTo(b))return!1}}return!0}varab,bb=a("../../util.js");d.prototype.am=f,ab=26,d.prototype.DB=ab,d.prototype.DM=(1<<ab)-1,d.prototype.DV=1<<ab;varcb=52;d.prototype.FV=Math.pow(2,cb),d.prototype.F1=cb-ab,d.prototype.F2=2*ab-cb;vardb,eb,fb="0123456789abcdefghijklmnopqrstuvwxyz",gb=newArray;for(db="0".charCodeAt(0),eb=0;9>=eb;++eb)gb[db++]=eb;for(db="a".charCodeAt(0),eb=10;36>eb;++eb)gb[db++]=eb;for(db="A".charCodeAt(0),eb=10;36>eb;++eb)gb[db++]=eb;C.prototype.convert=D,C.prototype.revert=E,C.prototype.reduce=F,C.prototype.mulTo=G,C.prototype.sqrTo=H,J.prototype.convert=K,J.prototype.revert=L,J.prototype.reduce=M,J.prototype.mulTo=O,J.prototype.sqrTo=N,d.prototype.copyTo=i,d.prototype.fromInt=j,d.prototype.fromString=l,d.prototype.clamp=m,d.prototype.dlShiftTo=t,d.prototype.drShiftTo=u,d.prototype.lShiftTo=v,d.prototype.rShiftTo=w,d.prototype.subTo=x,d.prototype.multiplyTo=y,d.prototype.squareTo=z,d.prototype.divRemTo=A,d.prototype.invDigit=I,d.prototype.isEven=P,d.prototype.exp=Q,d.prototype.toString=n,d.prototype.negate=o,d.prototype.abs=p,d.prototype.compareTo=q,d.prototype.bitLength=s,d.prototype.mod=B,d.prototype.modPowInt=R,d.ZERO=k(0),d.ONE=k(1),d.TWO=k(2),b.exports=d,Ia.prototype.convert=Ja,Ia.prototype.revert=Ja,Ia.prototype.mulTo=Ka,Ia.prototype.sqrTo=La,Pa.prototype.convert=Qa,Pa.prototype.revert=Ra,Pa.prototype.reduce=Sa,Pa.prototype.mulTo=Ua,Pa.prototype.sqrTo=Ta;varhb=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],ib=(1<<26)/hb[hb.length-1],d=a("./jsbn.js");d.prototype.chunkSize=W,d.prototype.toRadix=Y,d.prototype.fromRadix=Z,d.prototype.fromNumber=$,d.prototype.bitwiseTo=da,d.prototype.changeBit=ua,d.prototype.addTo=ya,d.prototype.dMultiply=Ga,d.prototype.dAddOffset=Ha,d.prototype.multiplyLowerTo=Na,d.prototype.multiplyUpperTo=Oa,d.prototype.modInt=Xa,d.prototype.millerRabin=_a,d.prototype.clone=S,d.prototype.intValue=T,d.prototype.byteValue=U,d.prototype.shortValue=V,d.prototype.signum=X,d.prototype.toByteArray=_,d.prototype.equals=aa,d.prototype.min=ba,d.prototype.max=ca,d.prototype.and=fa,d.prototype.or=ha,d.prototype.xor=ja,d.prototype.andNot=la,d.prototype.not=ma,d.prototype.shiftLeft=na,d.prototype.shiftRight=oa,d.prototype.getLowestSetBit=qa,d.prototype.bitCount=sa,d.prototype.testBit=ta,d.prototype.setBit=va,d.prototype.clearBit=wa,d.prototype.flipBit=xa,d.prototype.add=za,d.prototype.subtract=Aa,d.prototype.multiply=Ba,d.prototype.divide=Da,d.prototype.remainder=Ea,d.prototype.divideAndRemainder=Fa,d.prototype.modPow=Va,d.prototype.modInverse=Ya,d.prototype.pow=Ma,d.prototype.gcd=Wa,d.prototype.isProbablePrime=Za,d.prototype.toMPI=$a,d.prototype.square=Ca},{"../../util.js":76,"./jsbn.js":37}],38:[function(a,b,c){functiond(){functiona(a){for(varb=0;b<a.length;b++)a[b]=j.getSecureRandomOctet();
}this.nextBytes=a}functione(a,b,c){returnm=m.bitLength()===b.bitLength()?m.square().mod(b):j.getRandomBigIntegerInRange(h.TWO,b),l=m.modInverse(b).modPow(c,b),a.multiply(l).mod(b)}functionf(a,b){returna.multiply(m).mod(b)}functiong(){functiona(a,b,c,d,g,j,l){k.rsa_blinding&&(a=e(a,b,c));varm=a.mod(g).modPow(d.mod(g.subtract(h.ONE)),g),n=a.mod(j).modPow(d.mod(j.subtract(h.ONE)),j);i.print_debug("rsa.js decrypt\nxpn:"+i.hexstrdump(m.toMPI())+"\nxqn:"+i.hexstrdump(n.toMPI()));varo=n.subtract(m);return0===o[0]?(o=m.subtract(n),o=o.multiply(l).mod(j),o=j.subtract(o)):o=o.multiply(l).mod(j),o=o.multiply(g).add(m),k.rsa_blinding&&(o=f(o,b)),o}functionb(a,b,c){returna.modPowInt(b,c)}functionc(a,b,c){returna.modPow(b,c)}functiong(a,b,c){returna.modPowInt(b,c)}functionj(){this.n=null,this.e=0,this.ee=null,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.u=null}functionl(a,b){functionc(a){varb=g.exportKey("jwk",a.privateKey);return"function"!=typeofb.then&&(b=f(b,"Error exporting RSA key pair.")),b}functione(a){functionc(a){varb=a.replace(/\-/g,"+").replace(/_/g,"/"),c=i.hexstrdump(atob(b));returnnewh(c,16)}vard=newj;returnd.n=c(a.n),d.ee=newh(b,16),d.d=c(a.d),d.p=c(a.p),d.q=c(a.q),d.u=d.p.modInverse(d.q),d}functionf(a,b){returnnewPromise(function(c,d){a.onerror=function(a){d(newError(b))},a.oncomplete=function(a){c(a.target.result)}})}varg=i.getWebCrypto();if(g){vark,l,m=newUint32Array([parseInt(b,16)]),n=newUint8Array(m.buffer);returnwindow.crypto&&window.crypto.webkitSubtle?(k={name:"RSA-OAEP",modulusLength:a,publicExponent:n.subarray(0,3)},l=g.generateKey(k,!0,["encrypt","decrypt"])):(k={name:"RSASSA-PKCS1-v1_5",modulusLength:a,publicExponent:n.subarray(0,3),hash:{name:"SHA-1"}},l=g.generateKey(k,!0,["sign","verify"]),"function"!=typeofl.then&&(l=f(l,"Error generating RSA key pair."))),l.then(c).then(function(a){returne(ainstanceofArrayBuffer?JSON.parse(String.fromCharCode.apply(null,newUint8Array(a))):a)})}returnnewPromise(function(c){vare=newj,f=newd,g=a>>1;for(e.e=parseInt(b,16),e.ee=newh(b,16);;){for(;e.p=newh(a-g,1,f),0!==e.p.subtract(h.ONE).gcd(e.ee).compareTo(h.ONE)||!e.p.isProbablePrime(10););for(;e.q=newh(g,1,f),0!==e.q.subtract(h.ONE).gcd(e.ee).compareTo(h.ONE)||!e.q.isProbablePrime(10););if(e.p.compareTo(e.q)<=0){vari=e.p;e.p=e.q,e.q=i}vark=e.p.subtract(h.ONE),l=e.q.subtract(h.ONE),m=k.multiply(l);if(0===m.gcd(e.ee).compareTo(h.ONE)){e.n=e.p.multiply(e.q),e.d=e.ee.modInverse(m),e.dmp1=e.d.mod(k),e.dmq1=e.d.mod(l),e.u=e.p.modInverse(e.q);break}}c(e)})}this.encrypt=b,this.decrypt=a,this.verify=g,this.sign=c,this.generate=l,this.keyObject=j}varh=a("./jsbn.js"),i=a("../../util.js"),j=a("../random.js"),k=a("../../config"),l=h.ZERO,m=h.ZERO;b.exports=g},{"../../config":17,"../../util.js":76,"../random.js":39,"./jsbn.js":37}],39:[function(a,b,c){functiond(){this.buffer=null,this.size=null}vare=a("../type/mpi.js"),f=null;"undefined"==typeofwindow&&(f=a("crypto")),b.exports={getRandomBytes:function(a){for(varb="",c=0;a>c;c++)b+=String.fromCharCode(this.getSecureRandomOctet());returnb},getSecureRandom:function(a,b){for(varc=this.getSecureRandomUint(),d=(b-a).toString(2).length;(c&Math.pow(2,d)-1)>b-a;)c=this.getSecureRandomUint();returna+Math.abs(c&Math.pow(2,d)-1)},getSecureRandomOctet:function(){vara=newUint8Array(1);returnthis.getRandomValues(a),a[0]},getSecureRandomUint:function(){vara=newUint8Array(4),b=newDataView(a.buffer);returnthis.getRandomValues(a),b.getUint32(0)},getRandomValues:function(a){if(!(ainstanceofUint8Array))thrownewError("Invalid type: buf not an Uint8Array");if("undefined"!=typeofwindow&&window.crypto&&window.crypto.getRandomValues)window.crypto.getRandomValues(a);elseif("undefined"!=typeofwindow&&"object"==typeofwindow.msCrypto&&"function"==typeofwindow.msCrypto.getRandomValues)window.msCrypto.getRandomValues(a);elseif(f){varb=f.randomBytes(a.length);a.set(b)}else{if(!this.randomBuffer.buffer)thrownewError("No secure random number generator available.");this.randomBuffer.get(a)}},getRandomBigInteger:function(a){if(1>a)thrownewError("Illegal parameter value: bits < 1");varb=Math.floor((a+7)/8),c=this.getRandomBytes(b);a%8>0&&(c=String.fromCharCode(Math.pow(2,a%8)-1&c.charCodeAt(0))+c.substring(1));vard=newe;returnd.fromBytes(c),d.toBigInteger()},getRandomBigIntegerInRange:function(a,b){if(b.compareTo(a)<=0)thrownewError("Illegal parameter value: max <= min");for(varc=b.subtract(a),d=this.getRandomBigInteger(c.bitLength());d.compareTo(c)>0;)d=this.getRandomBigInteger(c.bitLength());returna.add(d)},randomBuffer:newd},d.prototype.init=function(a){this.buffer=newUint8Array(a),this.size=0},d.prototype.set=function(a){if(!this.buffer)thrownewError("RandomBuffer is not initialized");if(!(ainstanceofUint8Array))thrownewError("Invalid type: buf not an Uint8Array");varb=this.buffer.length-this.size;a.length>b&&(a=a.subarray(0,b)),this.buffer.set(a,this.size),this.size+=a.length},d.prototype.get=function(a){if(!this.buffer)thrownewError("RandomBuffer is not initialized");if(!(ainstanceofUint8Array))thrownewError("Invalid type: buf not an Uint8Array");if(this.size<a.length)thrownewError("Random number buffer depleted");for(varb=0;b<a.length;b++)a[b]=this.buffer[--this.size],this.buffer[this.size]=0}},{"../type/mpi.js":74,crypto:"crypto"}],40:[function(a,b,c){vard=a("./public_key"),e=a("./pkcs1.js");a("./hash");b.exports={verify:function(a,b,c,f,g){switch(a){case1:case2:case3:varh=newd.rsa,i=f[0].toBigInteger(),j=f[0].byteLength(),k=f[1].toBigInteger(),l=c[0].toBigInteger(),m=h.verify(l,k,i),n=e.emsa.encode(b,g,j);return0===m.compareTo(n);case16:thrownewError("signing with Elgamal is not defined in the OpenPGP standard.");case17:varo=newd.dsa,p=c[0].toBigInteger(),q=c[1].toBigInteger(),r=f[0].toBigInteger(),s=f[1].toBigInteger(),t=f[2].toBigInteger(),u=f[3].toBigInteger(),l=g,v=o.verify(b,p,q,l,r,s,t,u);return0===v.compareTo(p);default:thrownewError("Invalid signature algorithm.")}},sign:function(a,b,c,f){varg;switch(b){case1:case2:case3:varh=newd.rsa,i=c[2].toBigInteger(),j=c[0].toBigInteger();returng=e.emsa.encode(a,f,c[0].byteLength()),h.sign(g,i,j).toMPI();case17:vark=newd.dsa,l=c[0].toBigInteger(),m=c[1].toBigInteger(),n=c[2].toBigInteger(),o=(c[3].toBigInteger(),c[4].toBigInteger());g=f;varp=k.sign(a,g,n,l,m,o);returnp[0].toString()+p[1].toString();case16:thrownewError("Signing with Elgamal is not defined in the OpenPGP standard.");default:thrownewError("Invalid signature algorithm.")}}}},{"./hash":28,"./pkcs1.js":33,"./public_key":36}],41:[function(a,b,c){functiond(a){varb=/^-----BEGIN PGP (MESSAGE, PART \d+\/\d+|MESSAGE, PART \d+|SIGNED MESSAGE|MESSAGE|PUBLIC KEY BLOCK|PRIVATE KEY BLOCK|SIGNATURE)-----$\n/m,c=a.match(b);if(!c)thrownewError("Unknown ASCII armor type");return/MESSAGE, PART \d+\/\d+/.test(c[1])?o.armor.multipart_section:/MESSAGE, PART \d+/.test(c[1])?o.armor.multipart_last:/SIGNED MESSAGE/.test(c[1])?o.armor.signed:/MESSAGE/.test(c[1])?o.armor.message:/PUBLIC KEY BLOCK/.test(c[1])?o.armor.public_key:/PRIVATE KEY BLOCK/.test(c[1])?o.armor.private_key:void0}functione(){vara="";returnp.show_version&&(a+="Version: "+p.versionstring+"\r\n"),p.show_comment&&(a+="Comment: "+p.commentstring+"\r\n"),a+="\r\n"}functionf(a){varb=h(a),c=""+String.fromCharCode(b>>16)+String.fromCharCode(b>>8&255)+String.fromCharCode(255&b);returnn.encode(c)}functiong(a,b){varc=f(a),d=b;returnc[0]==d[0]&&c[1]==d[1]&&c[2]==d[2]&&c[3]==d[3]}functionh(a){for(varb=11994318,c=0;a.length-c>16;)b=b<<8^q[255&(b>>16^a.charCodeAt(c))],b=b<<8^q[255&(b>>16^a.charCodeAt(c+1))],b=b<<8^q[255&(b>>16^a.charCodeAt(c+2))],b=b<<8^q[255&(b>>16^a.charCodeAt(c+3))],b=b<<8^q[255&(b>>16^a.charCodeAt(c+4))],b=b<<8^q[255&(b>>16^a.charCodeAt(c+5))],b=b<<8^q[255&(b>>16^a.charCodeAt(c+6))],b=b<<8^q[255&(b>>16^a.charCodeAt(c+7))],b=b<<8^q[255&(b>>16^a.charCodeAt(c+8))],b=b<<8^q[255&(b>>16^a.charCodeAt(c+9))],b=b<<8^q[255&(b>>16^a.charCodeAt(c+10))],b=b<<8^q[255&(b>>16^a.charCodeAt(c+11))],b=b<<8^q[255&(b>>16^a.charCodeAt(c+12))],b=b<<8^q[255&(b>>16^a.charCodeAt(c+13))],b=b<<8^q[255&(b>>16^a.charCodeAt(c+14))],b=b<<8^q[255&(b>>16^a.charCodeAt(c+15))],c+=16;for(vard=c;d<a.length;d++)b=b<<8^q[255&(b>>16^a.charCodeAt(c++))];return16777215&b}functioni(a){varb=/^[ \f\r\t\u00a0\u2000-\u200a\u202f\u205f\u3000]*\n/m,c="",d=a,e=b.exec(a);if(null===e)thrownewError("Mandatory blank line missing between armor headers and armor data");returnc=a.slice(0,e.index),d=a.slice(e.index+e[0].length),c=c.split("\n"),c.pop(),{headers:c,body:d}}functionj(a){for(varb=0;b<a.length;b++)if(!/^(Version|Comment|MessageID|Hash|Charset): .+$/.test(a[b]))thrownewError("Improperly formatted armor header: "+a[b])}functionk(a){varb=/^=/m,c=a,d="",e=b.exec(a);returnnull!==e&&(c=a.slice(0,e.index),d=a.slice(e.index+1)),{body:c,checksum:d}}functionl(a){varb=/^-----[^-]+-----$\n/m;a=a.replace(/[\t\r ]+\n/g,"\n");varc,e,h,l=d(a),m=a.split(b),o=1;if(a.search(b)!=m[0].length&&(o=0),2!=l){h=i(m[o]);varp=k(h.body);c={data:n.decode(p.body),headers:h.headers,type:l},e=p.checksum}else{h=i(m[o].replace(/^- /gm,""));varq=i(m[o+1].replace(/^- /gm,""));j(q.headers);varr=k(q.body);c={text:h.body.replace(/\n$/,"").replace(/\n/g,"\r\n"),data:n.decode(r.body),headers:h.headers,type:l},e=r.checksum}if(e=e.substr(0,4),!g(c.data,e))thrownewError("Ascii armor integrity check on message failed: '"+e+"' should be '"+f(c.data)+"'");returnj(c.headers),c}functionm(a,b,c,d){varg=[];switch(a){caseo.armor.multipart_section:g.push("-----BEGIN PGP MESSAGE, PART "+c+"/"+d+"-----\r\n"),g.push(e()),g.push(n.encode(b)),g.push("\r\n="+f(b)+"\r\n"),g.push("-----END PGP MESSAGE, PART "+c+"/"+d+"-----\r\n");break;caseo.armor.multipart_last:g.push("-----BEGIN PGP MESSAGE, PART "+c+"-----\r\n"),g.push(e()),g.push(n.encode(b)),g.push("\r\n="+f(b)+"\r\n"),g.push("-----END PGP MESSAGE, PART "+c+"-----\r\n");break;caseo.armor.signed:g.push("\r\n-----BEGIN PGP SIGNED MESSAGE-----\r\n"),g.push("Hash: "+b.hash+"\r\n\r\n"),g.push(b.text.replace(/\n-/g,"\n- -")),g.push("\r\n-----BEGIN PGP SIGNATURE-----\r\n"),g.push(e()),g.push(n.encode(b.data)),g.push("\r\n="+f(b.data)+"\r\n"),g.push("-----END PGP SIGNATURE-----\r\n");break;caseo.armor.message:g.push("-----BEGIN PGP MESSAGE-----\r\n"),g.push(e()),g.push(n.encode(b)),g.push("\r\n="+f(b)+"\r\n"),g.push("-----END PGP MESSAGE-----\r\n");break;caseo.armor.public_key:g.push("-----BEGIN PGP PUBLIC KEY BLOCK-----\r\n"),g.push(e()),g.push(n.encode(b)),g.push("\r\n="+f(b)+"\r\n"),g.push("-----END PGP PUBLIC KEY BLOCK-----\r\n\r\n");break;caseo.armor.private_key:g.push("-----BEGIN PGP PRIVATE KEY BLOCK-----\r\n"),g.push(e()),g.push(n.encode(b)),g.push("\r\n="+f(b)+"\r\n"),g.push("-----END PGP PRIVATE KEY BLOCK-----\r\n")}returng.join("")}varn=a("./base64.js"),o=a("../enums.js"),p=a("../config"),q=[0,8801531,25875725,17603062,60024545,51751450,35206124,44007191,128024889,120049090,103502900,112007375,70412248,78916387,95990485,88014382,264588937,256049778,240098180,248108927,207005800,215016595,232553829,224014750,140824496,149062475,166599357,157832774,200747345,191980970,176028764,184266919,520933865,529177874,512099556,503334943,480196360,471432179,487973381,496217854,414011600,405478443,422020573,430033190,457094705,465107658,448029500,439496647,281648992,273666971,289622637,298124950,324696449,333198714,315665548,307683447,392699481,401494690,383961940,375687087,352057528,343782467,359738805,368533838,1041867730,1050668841,1066628831,1058355748,1032471859,1024199112,1006669886,1015471301,968368875,960392720,942864358,951368477,975946762,984451313,1000411399,992435708,836562267,828023200,810956886,818967725,844041146,852051777,868605623,860066380,914189410,922427545,938981743,930215316,904825475,896059e3,878993294,887231349,555053627,563297984,547333942,538569677,579245274,570480673,588005847,596249900,649392898,640860153,658384399,666397428,623318499,631331096,615366894,606833685,785398962,777416777,794487231,802989380,759421523,767923880,751374174,743392165,695319947,704115056,687564934,679289981,719477610,711202705,728272487,737067676,2083735460,2092239711,2109313705,2101337682,2141233477,2133257662,2116711496,2125215923,2073216669,2064943718,2048398224,2057199467,2013339772,2022141063,2039215473,2030942602,1945504045,1936737750,1920785440,1929023707,1885728716,1893966647,1911503553,1902736954,1951893524,1959904495,1977441561,1968902626,2009362165,2000822798,1984871416,1992881923,1665111629,1673124534,1656046400,1647513531,1621913772,1613380695,1629922721,1637935450,1688082292,1679317903,1695859321,1704103554,1728967061,1737211246,1720132760,1711368291,1828378820,1820103743,1836060105,1844855090,1869168165,1877963486,1860430632,1852155859,1801148925,1809650950,1792118e3,1784135691,1757986588,1750004711,1765960209,1774462698,1110107254,1118611597,1134571899,1126595968,1102643863,1094667884,1077139354,1085643617,1166763343,1158490548,1140961346,1149762745,1176011694,1184812885,1200772771,1192499800,1307552511,1298785796,1281720306,1289958153,1316768798,1325007077,1341561107,1332794856,1246636998,1254647613,1271201483,1262662192,1239272743,1230733788,1213667370,1221678289,1562785183,1570797924,1554833554,1546300521,1588974462,1580441477,1597965939,1605978760,1518843046,1510078557,1527603627,1535847760,1494504007,1502748348,1486784330,1478020017,1390639894,1382365165,1399434779,1408230112,1366334967,1375129868,1358579962,1350304769,1430452783,1438955220,1422405410,1414423513,1456544974,1448562741,1465633219,1474135352];b.exports={encode:m,decode:l}},{"../config":17,"../enums.js":43,"./base64.js":42}],42:[function(a,b,c){functiond(a,b){varc,d,e,g=b?b:[],h=0,i=0,j=a.length;for(e=0;j>e;e++)d=a.charCodeAt(e),0===i?(g.push(f.charAt(d>>2&63)),c=(3&d)<<4):1==i?(g.push(f.charAt(c|d>>4&15)),c=(15&d)<<2):2==i&&(g.push(f.charAt(c|d>>6&3)),h+=1,h%60===0&&g.push("\n"),g.push(f.charAt(63&d))),h+=1,h%60===0&&g.push("\n"),i+=1,3==i&&(i=0);returni>0&&(g.push(f.charAt(c)),h+=1,h%60===0&&g.push("\n"),g.push("="),h+=1),1==i&&(h%60===0&&g.push("\n"),g.push("=")),b?void0:g.join("")}functione(a){varb,c,d=[],e=0,g=0,h=a.length;for(c=0;h>c;c++)b=f.indexOf(a.charAt(c)),b>=0&&(e&&d.push(String.fromCharCode(g|b>>6-e&255)),e=e+2&7,g=b<<e&255);returnd.join("")}varf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";b.exports={encode:d,decode:e}},{}],43:[function(a,b,c){"use strict";b.exports={s2k:{simple:0,salted:1,iterated:3,gnu:101},publicKey:{rsa_encrypt_sign:1,rsa_encrypt:2,rsa_sign:3,elgamal:16,dsa:17},symmetric:{plaintext:0,idea:1,tripledes:2,cast5:3,blowfish:4,aes128:7,aes192:8,aes256:9,twofish:10},compression:{uncompressed:0,zip:1,zlib:2,bzip2:3},hash:{md5:1,sha1:2,ripemd:3,sha256:8,sha384:9,sha512:10,sha224:11},packet:{publicKeyEncryptedSessionKey:1,signature:2,symEncryptedSessionKey:3,onePassSignature:4,secretKey:5,publicKey:6,secretSubkey:7,compressed:8,symmetricallyEncrypted:9,marker:10,literal:11,trust:12,userid:13,publicSubkey:14,userAttribute:17,symEncryptedIntegrityProtected:18,modificationDetectionCode:19},literal:{binary:"b".charCodeAt(),text:"t".charCodeAt(),utf8:"u".charCodeAt()},signature:{binary:0,text:1,standalone:2,cert_generic:16,cert_persona:17,cert_casual:18,cert_positive:19,cert_revocation:48,subkey_binding:24,key_binding:25,key:31,key_revocation:32,subkey_revocation:40,timestamp:64,third_party:80},signatureSubpacket:{signature_creation_time:2,signature_expiration_time:3,exportable_certification:4,trust_signature:5,regular_expression:6,revocable:7,key_expiration_time:9,placeholder_backwards_compatibility:10,preferred_symmetric_algorithms:11,revocation_key:12,issuer:16,notation_data:20,preferred_hash_algorithms:21,preferred_compression_algorithms:22,key_server_preferences:23,preferred_key_server:24,primary_user_id:25,policy_uri:26,key_flags:27,signers_user_id:28,reason_for_revocation:29,features:30,signature_target:31,embedded_signature:32},keyFlags:{certify_keys:1,sign_data:2,encrypt_communication:4,encrypt_storage:8,split_private_key:16,authentication:32,shared_private_key:128},keyStatus:{invalid:0,expired:1,revoked:2,valid:3,no_self_cert:4},armor:{multipart_section:0,multipart_last:1,signed:2,message:3,public_key:4,private_key:5},write:function(a,b){if("number"==typeofb&&(b=this.read(a,b)),void0!==a[b])returna[b];thrownewError("Invalid enum value.")},read:function(a,b){for(varcina)if(a[c]==b)returnc;thrownewError("Invalid enum value.")}}},{}],44:[function(a,b,c){"use strict";functiond(b){this._baseUrl=b?b:e.keyserver,this._fetch="undefined"!=typeofwindow?window.fetch:a("node-fetch")}b.exports=d;vare=a("../config");d.prototype.lookup=function(a){varb=this._baseUrl+"/pks/lookup?op=get&options=mr&search=",c=this._fetch;if(a.keyId)b+="0x"+encodeURIComponent(a.keyId);else{if(!a.query)thrownewError("You must provide a query parameter!");b+=encodeURIComponent(a.query)}returnc(b).then(function(a){return200===a.status?a.text():void0}).then(function(a){return!a||a.indexOf("-----END PGP PUBLIC KEY BLOCK-----")<0?void0:a.trim()})},d.prototype.upload=function(a){varb=this._baseUrl+"/pks/add",c=this._fetch;returnc(b,{method:"post",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},body:"keytext="+encodeURIComponent(a)})}},{"../config":17,"node-fetch":"node-fetch"}],45:[function(a,b,c){b.exports=a("./hkp.js")},{"./hkp.js":44}],46:[function(a,b,c){"use strict";b.exports=a("./openpgp.js"),b.exports.key=a("./key.js"),b.exports.message=a("./message.js"),b.exports.cleartext=a("./cleartext.js"),b.exports.util=a("./util.js"),b.exports.packet=a("./packet"),b.exports.MPI=a("./type/mpi.js"),b.exports.S2K=a("./type/s2k.js"),b.exports.Keyid=a("./type/keyid.js"),b.exports.armor=a("./encoding/armor.js"),b.exports.enums=a("./enums.js"),b.exports.config=a("./config/config.js"),b.exports.crypto=a("./crypto"),b.exports.Keyring=a("./keyring"),b.exports.AsyncProxy=a("./worker/async_proxy.js"),b.exports.HKP=a("./hkp")},{"./cleartext.js":12,"./config/config.js":16,"./crypto":32,"./encoding/armor.js":41,"./enums.js":43,"./hkp":45,"./key.js":47,"./keyring":48,"./message.js":51,"./openpgp.js":52,"./packet":55,"./type/keyid.js":73,"./type/mpi.js":74,"./type/s2k.js":75,"./util.js":76,"./worker/async_proxy.js":77}],47:[function(a,b,c){"use strict";functiond(a){if(!(thisinstanceofd))returnnewd(a);if(this.primaryKey=null,this.revocationSignature=null,this.directSignatures=null,this.users=null,this.subKeys=null,this.packetlist2structure(a),!this.primaryKey||!this.users)thrownewError("Invalid key: need at least key and user ID packet")}functione(a,b){returna.algorithm!==o.read(o.publicKey,o.publicKey.dsa)&&a.algorithm!==o.read(o.publicKey,o.publicKey.rsa_sign)&&(!b.keyFlags||0!==(b.keyFlags[0]&o.keyFlags.encrypt_communication)||0!==(b.keyFlags[0]&o.keyFlags.encrypt_storage))}functionf(a,b){return!(a.algorithm!=o.read(o.publicKey,o.publicKey.dsa)&&a.algorithm!=o.read(o.publicKey,o.publicKey.rsa_sign)&&a.algorithm!=o.read(o.publicKey,o.publicKey.rsa_encrypt_sign)||b.keyFlags&&0===(b.keyFlags[0]&o.keyFlags.sign_data))}functiong(a,b){return3==a.version&&0!==a.expirationTimeV3?newDate(a.created.getTime()+24*a.expirationTimeV3*3600*1e3):4==a.version&&b.keyNeverExpires===!1?newDate(a.created.getTime()+1e3*b.keyExpirationTime):null}functionh(a,b,c,d){a=a[c],a&&(b[c]?a.forEach(function(a){a.isExpired()||d&&!d(a)||b[c].some(function(b){returnb.signature===a.signature})||b[c].push(a)}):b[c]=a)}functioni(a){returnthisinstanceofi?(this.userId=a.tag==o.packet.userid?a:null,this.userAttribute=a.tag==o.packet.userAttribute?a:null,this.selfCertifications=null,this.otherCertifications=null,void(this.revocationCertifications=null)):newi(a)}functionj(a){returnthisinstanceofj?(this.subKey=a,this.bindingSignature=null,void(this.revocationSignature=null)):newj(a)}functionk(a){varb={};b.keys=[];try{varc=p.decode(a);if(c.type!=o.armor.public_key&&c.type!=o.armor.private_key)thrownewError("Armored text not of type key");vare=newn.List;e.read(c.data);varf=e.indexOfTag(o.packet.publicKey,o.packet.secretKey);if(0===f.length)thrownewError("No key packet found in armored text");for(varg=0;g<f.length;g++){varh=e.slice(f[g],f[g+1]);try{vari=newd(h);b.keys.push(i)}catch(j){b.err=b.err||[],b.err.push(j)}}}catch(j){b.err=b.err||[],b.err.push(j)}returnb}functionl(a){functionb(){returng=newn.SecretKey,g.algorithm=o.read(o.publicKey,a.keyType),g.generate(a.numBits)}functionc(){returnk=newn.SecretSubkey,k.algorithm=o.read(o.publicKey,a.keyType),k.generate(a.numBits)}functione(){returna.passphrase&&(g.encrypt(a.passphrase),k.encrypt(a.passphrase)),f=newn.List,f.push(g),a.userId.forEach(function(b,c){h=newn.Userid,h.read(b),i={},i.userid=h,i.key=g,j=newn.Signature,j.signatureType=o.signature.cert_generic,j.publicKeyAlgorithm=a.keyType,j.hashAlgorithm=q.prefer_hash_algorithm,j.keyFlags=[o.keyFlags.certify_keys|o.keyFlags.sign_data],j.preferredSymmetricAlgorithms=[],j.preferredSymmetricAlgorithms.push(o.symmetric.aes256),j.preferredSymmetricAlgorithms.push(o.symmetric.aes192),j.preferredSymmetricAlgorithms.push(o.symmetric.aes128),j.preferredSymmetricAlgorithms.push(o.symmetric.cast5),j.preferredSymmetricAlgorithms.push(o.symmetric.tripledes),j.preferredHashAlgorithms=[],j.preferredHashAlgorithms.push(o.hash.sha256),j.preferredHashAlgorithms.push(o.hash.sha1),j.preferredHashAlgorithms.push(o.hash.sha512),j.preferredCompressionAlgorithms=[],j.preferredCompressionAlgorithms.push(o.compression.zlib),j.preferredCompressionAlgorithms.push(o.compression.zip),0===c&&(j.isPrimaryUserID=!0),q.integrity_protect&&(j.features=[],j.features.push(1)),j.sign(g,i),f.push(h),f.push(j)}),i={},i.key=g,i.bind=k,l=newn.Signature,l.signatureType=o.signature.subkey_binding,l.publicKeyAlgorithm=a.keyType,l.hashAlgorithm=q.prefer_hash_algorithm,l.keyFlags=[o.keyFlags.encrypt_communication|o.keyFlags.encrypt_storage],l.sign(g,i),f.push(k),f.push(l),a.unlocked||(g.clearPrivateMPIs(),k.clearPrivateMPIs()),newd(f)}varf,g,h,i,j,k,l;if(a.keyType=a.keyType||o.publicKey.rsa_encrypt_sign,a.keyType!==o.publicKey.rsa_encrypt_sign)thrownewError("Only RSA Encrypt or Sign supported");a.passphrase||(a.unlocked=!0),(String.prototype.isPrototypeOf(a.userId)||"string"==typeofa.userId)&&(a.userId=[a.userId]);varm=b(),p=c();returnPromise.all([m,p]).then(e)}functionm(a){for(varb={},c=0;c<a.length;c++){vard=a[c].getPrimaryUser();if(!d||!d.selfCertificate.preferredSymmetricAlgorithms)returnq.encryption_cipher;d.selfCertificate.preferredSymmetricAlgorithms.forEach(function(a,c){vard=b[a]||(b[a]={prio:0,count:0,algo:a});d.prio+=64>>c,d.count++})}vare={prio:0,algo:q.encryption_cipher};for(varfinb)try{f!==o.symmetric.plaintext&&f!==o.symmetric.idea&&o.read(o.symmetric,f)&&b[f].count===a.length&&b[f].prio>e.prio&&(e=b[f])}catch(g){}returne.algo}varn=a("./packet"),o=a("./enums.js"),p=a("./encoding/armor.js"),q=a("./config"),r=a("./util");d.prototype.packetlist2structure=function(a){for(varb,c,d,e=0;e<a.length;e++)switch(a[e].tag){caseo.packet.publicKey:caseo.packet.secretKey:this.primaryKey=a[e],c=this.primaryKey.getKeyId();break;caseo.packet.userid:caseo.packet.userAttribute:b=newi(a[e]),this.users||(this.users=[]),this.users.push(b);break;caseo.packet.publicSubkey:caseo.packet.secretSubkey:b=null,this.subKeys||(this.subKeys=[]),d=newj(a[e]),this.subKeys.push(d);break;caseo.packet.signature:switch(a[e].signatureType){caseo.signature.cert_generic:caseo.signature.cert_persona:caseo.signature.cert_casual:caseo.signature.cert_positive:if(!b){r.print_debug("Dropping certification signatures without preceding user packet");continue}a[e].issuerKeyId.equals(c)?(b.selfCertifications||(b.selfCertifications=[]),b.selfCertifications.push(a[e])):(b.otherCertifications||(b.otherCertifications=[]),b.otherCertifications.push(a[e]));break;caseo.signature.cert_revocation:b?(b.revocationCertifications||(b.revocationCertifications=[]),b.revocationCertifications.push(a[e])):(this.directSignatures||(this.directSignatures=[]),this.directSignatures.push(a[e]));break;caseo.signature.key:this.directSignatures||(this.directSignatures=[]),this.directSignatures.push(a[e]);break;caseo.signature.subkey_binding:if(!d){r.print_debug("Dropping subkey binding signature without preceding subkey packet");continue}d.bindingSignature=a[e];break;caseo.signature.key_revocation:this.revocationSignature=a[e];break;caseo.signature.subkey_revocation:if(!d){r.print_debug("Dropping subkey revocation signature without preceding subkey packet");continue}d.revocationSignature=a[e]}}},d.prototype.toPacketlist=function(){vara=newn.List;a.push(this.primaryKey),a.push(this.revocationSignature),a.concat(this.directSignatures);varb;for(b=0;b<this.users.length;b++)a.concat(this.users[b].toPacketlist());if(this.subKeys)for(b=0;b<this.subKeys.length;b++)a.concat(this.subKeys[b].toPacketlist());returna},d.prototype.getSubkeyPackets=function(){vara=[];if(this.subKeys)for(varb=0;b<this.subKeys.length;b++)a.push(this.subKeys[b].subKey);returna},d.prototype.getAllKeyPackets=function(){return[this.primaryKey].concat(this.getSubkeyPackets())},d.prototype.getKeyIds=function(){for(vara=[],b=this.getAllKeyPackets(),c=0;c<b.length;c++)a.push(b[c].getKeyId());returna},d.prototype.getKeyPacket=function(a){for(varb=this.getAllKeyPackets(),c=0;c<b.length;c++)for(vard=b[c].getKeyId(),e=0;e<a.length;e++)if(d.equals(a[e]))returnb[c];returnnull},d.prototype.getUserIds=function(){for(vara=[],b=0;b<this.users.length;b++)this.users[b].userId&&a.push(this.users[b].userId.write());returna},d.prototype.isPublic=function(){returnthis.primaryKey.tag==o.packet.publicKey},d.prototype.isPrivate=function(){returnthis.primaryKey.tag==o.packet.secretKey},d.prototype.toPublic=function(){for(vara,b=newn.List,c=this.toPacketlist(),e=0;e<c.length;e++)switch(c[e].tag){caseo.packet.secretKey:a=c[e].writePublicKey();varf=newn.PublicKey;f.read(a),b.push(f);break;caseo.packet.secretSubkey:a=c[e].writePublicKey();varg=newn.PublicSubkey;g.read(a),b.push(g);break;default:b.push(c[e])}returnnewd(b)},d.prototype.armor=function(){vara=this.isPublic()?o.armor.public_key:o.armor.private_key;returnp.encode(a,this.toPacketlist().write())},d.prototype.getSigningKeyPacket=function(a){varb=this.getPrimaryUser();if(b&&f(this.primaryKey,b.selfCertificate)&&(!a||this.primaryKey.getKeyId().equals(a)))returnthis.primaryKey;if(this.subKeys)for(varc=0;c<this.subKeys.length;c++)if(this.subKeys[c].isValidSigningKey(this.primaryKey)&&(!a||this.subKeys[c].subKey.getKeyId().equals(a)))returnthis.subKeys[c].subKey;returnnull},d.prototype.getPreferredHashAlgorithm=function(){vara=this.getPrimaryUser();returna&&a.selfCertificate.preferredHashAlgorithms?a.selfCertificate.preferredHashAlgorithms[0]:q.prefer_hash_algorithm},d.prototype.getEncryptionKeyPacket=function(){if(this.subKeys)for(vara=0;a<this.subKeys.length;a++)if(this.subKeys[a].isValidEncryptionKey(this.primaryKey))returnthis.subKeys[a].subKey;varb=this.getPrimaryUser();returnb&&e(this.primaryKey,b.selfCertificate)?this.primaryKey:null},d.prototype.decrypt=function(a){if(!this.isPrivate())thrownewError("Nothing to decrypt in a public key");for(varb=this.getAllKeyPackets(),c=0;c<b.length;c++){vard=b[c].decrypt(a);if(!d)return!1}return!0},d.prototype.decryptKeyPacket=function(a,b){if(!this.isPrivate())thrownewError("Nothing to decrypt in a public key");for(varc=this.getAllKeyPackets(),d=0;d<c.length;d++)for(vare=c[d].getKeyId(),f=0;f<a.length;f++)if(e.equals(a[f])){varg=c[d].decrypt(b);if(!g)return!1}return!0},d.prototype.verifyPrimaryKey=function(){if(this.revocationSignature&&!this.revocationSignature.isExpired()&&(this.revocationSignature.verified||this.revocationSignature.verify(this.primaryKey,{key:this.primaryKey})))returno.keyStatus.revoked;if(3==this.primaryKey.version&&0!==this.primaryKey.expirationTimeV3&&Date.now()>this.primaryKey.created.getTime()+24*this.primaryKey.expirationTimeV3*3600*1e3)returno.keyStatus.expired;for(vara=!1,b=0;b<this.users.length;b++)this.users[b].userId&&this.users[b].selfCertifications&&(a=!0);if(!a)returno.keyStatus.no_self_cert;varc=this.getPrimaryUser();returnc?4==this.primaryKey.version&&c.selfCertificate.keyNeverExpires===!1&&Date.now()>this.primaryKey.created.getTime()+1e3*c.selfCertificate.keyExpirationTime?o.keyStatus.expired:o.keyStatus.valid:o.keyStatus.invalid},d.prototype.getExpirationTime=function(){if(3==this.primaryKey.version)returng(this.primaryKey);if(4==this.primaryKey.version){vara=this.getPrimaryUser();returna?g(this.primaryKey,a.selfCertificate):null}},d.prototype.getPrimaryUser=function(){for(vara=[],b=0;b<this.users.length;b++)if(this.users[b].userId&&this.users[b].selfCertifications)for(varc=0;c<this.users[b].selfCertifications.length;c++)a.push({user:this.users[b],selfCertificate:this.users[b].selfCertifications[c]});a=a.sort(function(a,b){returna.selfCertificate.isPrimaryUserID>b.selfCertificate.isPrimaryUserID?-1:a.selfCertificate.isPrimaryUserID<b.selfCertificate.isPrimaryUserID?1:a.selfCertificate.created>b.selfCertificate.created?-1:a.selfCertificate.created<b.selfCertificate.created?1:0});for(varb=0;b<a.length;b++)if(a[b].user.isValidSelfCertificate(this.primaryKey,a[b].selfCertificate))returna[b];returnnull},d.prototype.update=function(a){varb=this;if(a.verifyPrimaryKey()!==o.keyStatus.invalid){if(this.primaryKey.getFingerprint()!==a.primaryKey.getFingerprint())thrownewError("Key update method: fingerprints of keys not equal");if(this.isPublic()&&a.isPrivate()){varc=(this.subKeys&&this.subKeys.length)===(a.subKeys&&a.subKeys.length)&&(!this.subKeys||this.subKeys.every(function(b){returna.subKeys.some(function(a){returnb.subKey.getFingerprint()===a.subKey.getFingerprint()})}));if(!c)thrownewError("Cannot update public key with private key if subkey mismatch");this.primaryKey=a.primaryKey}this.revocationSignature||!a.revocationSignature||a.revocationSignature.isExpired()||!a.revocationSignature.verified&&!a.revocationSignature.verify(a.primaryKey,{key:a.primaryKey})||(this.revocationSignature=a.revocationSignature),h(a,this,"directSignatures"),a.users.forEach(function(a){for(varc=!1,d=0;d<b.users.length;d++)if(a.userId&&a.userId.userid===b.users[d].userId.userid||a.userAttribute&&a.userAttribute.equals(b.users[d].userAttribute)){b.users[d].update(a,b.primaryKey),c=!0;break}c||b.users.push(a)}),a.subKeys&&a.subKeys.forEach(function(a){for(varc=!1,d=0;d<b.subKeys.length;d++)if(a.subKey.getFingerprint()===b.subKeys[d].subKey.getFingerprint()){b.subKeys[d].update(a,b.primaryKey),c=!0;break}c||b.subKeys.push(a)})}},d.prototype.revoke=function(){},i.prototype.toPacketlist=function(){vara=newn.List;returna.push(this.userId||this.userAttribute),a.concat(this.revocationCertifications),a.concat(this.selfCertifications),a.concat(this.otherCertifications),a},i.prototype.isRevoked=function(a,b){if(this.revocationCertifications){varc=this;returnthis.revocationCertifications.some(function(d){returnd.issuerKeyId.equals(a.issuerKeyId)&&!d.isExpired()&&(d.verified||d.verify(b,{userid:c.userId||c.userAttribute,key:b}))})}return!1},i.prototype.getValidSelfCertificate=function(a){if(!this.selfCertifications)returnnull;for(varb=this.selfCertifications.sort(function(a,b){returna=a.created,b=b.created,a>b?-1:b>a?1:0}),c=0;c<b.length;c++)if(this.isValidSelfCertificate(a,b[c]))returnb[c];returnnull},i.prototype.isValidSelfCertificate=function(a,b){returnthis.isRevoked(b,a)?!1:b.isExpired()||!b.verified&&!b.verify(a,{userid:this.userId||this.userAttribute,key:a})?!1:!0},i.prototype.verify=function(a){if(!this.selfCertifications)returno.keyStatus.no_self_cert;for(varb,c=0;c<this.selfCertifications.length;c++)if(this.isRevoked(this.selfCertifications[c],a))b=o.keyStatus.revoked;elseif(this.selfCertifications[c].verified||this.selfCertifications[c].verify(a,{userid:this.userId||this.userAttribute,
key:a})){if(!this.selfCertifications[c].isExpired()){b=o.keyStatus.valid;break}b=o.keyStatus.expired}elseb=o.keyStatus.invalid;returnb},i.prototype.update=function(a,b){varc=this;h(a,this,"selfCertifications",function(a){returna.verified||a.verify(b,{userid:c.userId||c.userAttribute,key:b})}),h(a,this,"otherCertifications"),h(a,this,"revocationCertifications")},j.prototype.toPacketlist=function(){vara=newn.List;returna.push(this.subKey),a.push(this.revocationSignature),a.push(this.bindingSignature),a},j.prototype.isValidEncryptionKey=function(a){returnthis.verify(a)==o.keyStatus.valid&&e(this.subKey,this.bindingSignature)},j.prototype.isValidSigningKey=function(a){returnthis.verify(a)==o.keyStatus.valid&&f(this.subKey,this.bindingSignature)},j.prototype.verify=function(a){returnthis.revocationSignature&&!this.revocationSignature.isExpired()&&(this.revocationSignature.verified||this.revocationSignature.verify(a,{key:a,bind:this.subKey}))?o.keyStatus.revoked:3==this.subKey.version&&0!==this.subKey.expirationTimeV3&&Date.now()>this.subKey.created.getTime()+24*this.subKey.expirationTimeV3*3600*1e3?o.keyStatus.expired:this.bindingSignature?this.bindingSignature.isExpired()?o.keyStatus.expired:this.bindingSignature.verified||this.bindingSignature.verify(a,{key:a,bind:this.subKey})?4==this.subKey.version&&this.bindingSignature.keyNeverExpires===!1&&Date.now()>this.subKey.created.getTime()+1e3*this.bindingSignature.keyExpirationTime?o.keyStatus.expired:o.keyStatus.valid:o.keyStatus.invalid:o.keyStatus.invalid},j.prototype.getExpirationTime=function(){returng(this.subKey,this.bindingSignature)},j.prototype.update=function(a,b){if(a.verify(b)!==o.keyStatus.invalid){if(this.subKey.getFingerprint()!==a.subKey.getFingerprint())thrownewError("SubKey update method: fingerprints of subkeys not equal");this.subKey.tag===o.packet.publicSubkey&&a.subKey.tag===o.packet.secretSubkey&&(this.subKey=a.subKey),!this.bindingSignature&&a.bindingSignature&&(a.bindingSignature.verified||a.bindingSignature.verify(b,{key:b,bind:this.subKey}))&&(this.bindingSignature=a.bindingSignature),this.revocationSignature||!a.revocationSignature||a.revocationSignature.isExpired()||!a.revocationSignature.verified&&!a.revocationSignature.verify(b,{key:b,bind:this.subKey})||(this.revocationSignature=a.revocationSignature)}},c.Key=d,c.readArmored=k,c.generate=l,c.getPreferredSymAlgo=m},{"./config":17,"./encoding/armor.js":41,"./enums.js":43,"./packet":55,"./util":76}],48:[function(a,b,c){b.exports=a("./keyring.js"),b.exports.localstore=a("./localstore.js")},{"./keyring.js":49,"./localstore.js":50}],49:[function(a,b,c){functiond(b){this.storeHandler=b||new(a("./localstore.js")),this.publicKeys=newe(this.storeHandler.loadPublic()),this.privateKeys=newe(this.storeHandler.loadPrivate())}functione(a){this.keys=a}functionf(a,b){a=a.toLowerCase();for(varc=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),d=newRegExp("<"+c+">"),e=b.getUserIds(),f=0;f<e.length;f++){varg=e[f].toLowerCase();if(a===g||d.test(g))return!0}return!1}functiong(a,b){return16===a.length?a===b.getKeyId().toHex():a===b.getFingerprint()}varh=(a("../enums.js"),a("../key.js"));a("../util.js");b.exports=d,d.prototype.store=function(){this.storeHandler.storePublic(this.publicKeys.keys),this.storeHandler.storePrivate(this.privateKeys.keys)},d.prototype.clear=function(){this.publicKeys.keys=[],this.privateKeys.keys=[]},d.prototype.getKeysForId=function(a,b){varc=[];returnc=c.concat(this.publicKeys.getForId(a,b)||[]),c=c.concat(this.privateKeys.getForId(a,b)||[]),c.length?c:null},d.prototype.removeKeysForId=function(a){varb=[];returnb=b.concat(this.publicKeys.removeForId(a)||[]),b=b.concat(this.privateKeys.removeForId(a)||[]),b.length?b:null},d.prototype.getAllKeys=function(){returnthis.publicKeys.keys.concat(this.privateKeys.keys)},e.prototype.getForAddress=function(a){for(varb=[],c=0;c<this.keys.length;c++)f(a,this.keys[c])&&b.push(this.keys[c]);returnb},e.prototype.getForId=function(a,b){for(varc=0;c<this.keys.length;c++){if(g(a,this.keys[c].primaryKey))returnthis.keys[c];if(b&&this.keys[c].subKeys)for(vard=0;d<this.keys[c].subKeys.length;d++)if(g(a,this.keys[c].subKeys[d].subKey))returnthis.keys[c]}returnnull},e.prototype.importKey=function(a){varb=h.readArmored(a),c=this;returnb.keys.forEach(function(a){varb=a.primaryKey.getKeyId().toHex(),d=c.getForId(b);d?d.update(a):c.push(a)}),b.err?b.err:null},e.prototype.push=function(a){returnthis.keys.push(a)},e.prototype.removeForId=function(a){for(varb=0;b<this.keys.length;b++)if(g(a,this.keys[b].primaryKey))returnthis.keys.splice(b,1)[0];returnnull}},{"../enums.js":43,"../key.js":47,"../util.js":76,"./localstore.js":50}],50:[function(a,b,c){functiond(b){b=b||"openpgp-",this.publicKeysItem=b+this.publicKeysItem,this.privateKeysItem=b+this.privateKeysItem,"undefined"!=typeofwindow&&window.localStorage?this.storage=window.localStorage:this.storage=new(a("node-localstorage").LocalStorage)(g.node_store)}functione(a,b){varc=JSON.parse(a.getItem(b)),d=[];if(null!==c&&0!==c.length)for(vare,f=0;f<c.length;f++)e=h.readArmored(c[f]),e.err?i.print_debug("Error reading armored key from keyring index: "+f):d.push(e.keys[0]);returnd}functionf(a,b,c){vard=[];if(c.length){for(vare=0;e<c.length;e++)d.push(c[e].armor());a.setItem(b,JSON.stringify(d))}elsea.removeItem(b)}b.exports=d;varg=a("../config"),h=a("../key.js"),i=a("../util.js");d.prototype.publicKeysItem="public-keys",d.prototype.privateKeysItem="private-keys",d.prototype.loadPublic=function(){returne(this.storage,this.publicKeysItem)},d.prototype.loadPrivate=function(){returne(this.storage,this.privateKeysItem)},d.prototype.storePublic=function(a){f(this.storage,this.publicKeysItem,a)},d.prototype.storePrivate=function(a){f(this.storage,this.privateKeysItem,a)}},{"../config":17,"../key.js":47,"../util.js":76,"node-localstorage":"node-localstorage"}],51:[function(a,b,c){"use strict";functiond(a){returnthisinstanceofd?void(this.packets=a||newi.List):newd(a)}functione(a){varb=k.decode(a).data,c=newi.List;returnc.read(b),newd(c)}functionf(a,b){varc=newi.Literal;c.setBytes(a,j.read(j.literal,j.literal.binary));vare=newi.List;e.push(c);varf=k.decode(b).data;returne.read(f),newd(e)}functiong(a){varb=newi.Literal;b.setText(a);varc=newi.List;returnc.push(b),newd(c)}functionh(a,b){varc=newi.Literal;b&&c.setFilename(b),c.setBytes(a,j.read(j.literal,j.literal.binary));vare=newi.List;returne.push(c),newd(e)}vari=a("./packet"),j=a("./enums.js"),k=a("./encoding/armor.js"),l=a("./config"),m=a("./crypto"),n=a("./key.js");d.prototype.getEncryptionKeyIds=function(){vara=[],b=this.packets.filterByTag(j.packet.publicKeyEncryptedSessionKey);returnb.forEach(function(b){a.push(b.publicKeyId)}),a},d.prototype.getSigningKeyIds=function(){vara=[],b=this.unwrapCompressed(),c=b.packets.filterByTag(j.packet.onePassSignature);if(c.forEach(function(b){a.push(b.signingKeyId)}),!a.length){vard=b.packets.filterByTag(j.packet.signature);d.forEach(function(b){a.push(b.issuerKeyId)})}returna},d.prototype.decrypt=function(a){varb=this.getEncryptionKeyIds();if(!b.length)returnthis;varc=a.getKeyPacket(b);if(!c.isDecrypted)thrownewError("Private key is not decrypted.");for(vare,f=this.packets.filterByTag(j.packet.publicKeyEncryptedSessionKey),g=0;g<f.length;g++)if(f[g].publicKeyId.equals(c.getKeyId())){e=f[g],e.decrypt(c);break}if(e){varh=this.packets.filterByTag(j.packet.symmetricallyEncrypted,j.packet.symEncryptedIntegrityProtected);if(0!==h.length){vark=h[0];k.decrypt(e.sessionKeyAlgorithm,e.sessionKey);varl=newd(k.packets);returnk.packets=newi.List,l}}},d.prototype.getLiteralData=function(){vara=this.packets.findPacket(j.packet.literal);returna&&a.data||null},d.prototype.getFilename=function(){vara=this.packets.findPacket(j.packet.literal);returna&&a.getFilename()||null},d.prototype.getText=function(){vara=this.packets.findPacket(j.packet.literal);returna?a.getText():null},d.prototype.encrypt=function(a){varb=newi.List,c=n.getPreferredSymAlgo(a),e=m.generateSessionKey(j.read(j.symmetric,c));a.forEach(function(a){vard=a.getEncryptionKeyPacket();if(!d)thrownewError("Could not find valid key packet for encryption in key "+a.primaryKey.getKeyId().toHex());varf=newi.PublicKeyEncryptedSessionKey;f.publicKeyId=d.getKeyId(),f.publicKeyAlgorithm=d.algorithm,f.sessionKey=e,f.sessionKeyAlgorithm=j.read(j.symmetric,c),f.encrypt(d),b.push(f)});varf;returnf=l.integrity_protect?newi.SymEncryptedIntegrityProtected:newi.SymmetricallyEncrypted,f.packets=this.packets,f.encrypt(j.read(j.symmetric,c),e),b.push(f),f.packets=newi.List,newd(b)},d.prototype.symEncrypt=function(a){if(!a)thrownewError("The passphrase cannot be empty!");varb=j.read(j.symmetric,l.encryption_cipher),c=newi.List,e=newi.SymEncryptedSessionKey;e.sessionKeyAlgorithm=b,e.decrypt(a),c.push(e);varf=newi.SymEncryptedIntegrityProtected;returnf.packets=this.packets,f.encrypt(b,e.sessionKey),c.push(f),f.packets=newi.List,newd(c)},d.prototype.symDecrypt=function(a){varb=this.packets.filterByTag(j.packet.symEncryptedSessionKey,j.packet.symEncryptedIntegrityProtected),c=b[0];c.decrypt(a);vare=b[1];e.decrypt(c.sessionKeyAlgorithm,c.sessionKey);varf=newd(e.packets);returne.packets=newi.List,f},d.prototype.sign=function(a){varb=newi.List,c=this.packets.findPacket(j.packet.literal);if(!c)thrownewError("No literal data packet to sign.");vare,f,g=j.write(j.literal,c.format),h=g==j.literal.binary?j.signature.binary:j.signature.text;for(e=0;e<a.length;e++){if(a[e].isPublic())thrownewError("Need private key for signing");vark=newi.OnePassSignature;if(k.type=h,k.hashAlgorithm=l.prefer_hash_algorithm,f=a[e].getSigningKeyPacket(),!f)thrownewError("Could not find valid key packet for signing in key "+a[e].primaryKey.getKeyId().toHex());k.publicKeyAlgorithm=f.algorithm,k.signingKeyId=f.getKeyId(),b.push(k)}for(b.push(c),e=a.length-1;e>=0;e--){varm=newi.Signature;if(m.signatureType=h,m.hashAlgorithm=l.prefer_hash_algorithm,m.publicKeyAlgorithm=f.algorithm,!f.isDecrypted)thrownewError("Private key is not decrypted.");m.sign(f,c),b.push(m)}returnnewd(b)},d.prototype.verify=function(a){varb=[],c=this.unwrapCompressed(),d=c.packets.filterByTag(j.packet.literal);if(1!==d.length)thrownewError("Can only verify message with one literal data packet.");for(vare=c.packets.filterByTag(j.packet.signature),f=0;f<e.length;f++){for(varg=null,h=0;h<a.length&&!(g=a[h].getSigningKeyPacket(e[f].issuerKeyId));h++);vari={};g?(i.keyid=e[f].issuerKeyId,i.valid=e[f].verify(g,d[0])):(i.keyid=e[f].issuerKeyId,i.valid=null),b.push(i)}returnb},d.prototype.unwrapCompressed=function(){vara=this.packets.filterByTag(j.packet.compressed);returna.length?newd(a[0].packets):this},d.prototype.armor=function(){returnk.encode(j.armor.message,this.packets.write())},c.Message=d,c.readArmored=e,c.readSignedContent=f,c.fromText=g,c.fromBinary=h},{"./config":17,"./crypto":32,"./encoding/armor.js":41,"./enums.js":43,"./key.js":47,"./packet":55}],52:[function(a,b,c){"use strict";functiond(a,b){returnb&&b.worker||"undefined"!=typeofwindow&&window.Worker?(b=b||{},b.config=this.config,x=neww(a,b),!0):!1}functione(){returnx}functionf(a,b,c,d){returna.length||(a=[a]),x?x.encryptMessage(a,b,c,d):m(function(){vare,f;returne=o(b,c,d),e=e.encrypt(a),f=q.encode(r.armor.message,e.packets.write())},"Error encrypting message!")}functiong(a,b,c,d,e){returna.length||(a=[a]),x?x.signAndEncryptMessage(a,b,c,d,e):m(function(){varf,g;returnf=o(c,d,e),f=f.sign([b]),f=f.encrypt(a),g=q.encode(r.armor.message,f.packets.write())},"Error signing and encrypting message!")}functionh(a,b,c){returnx?x.decryptMessage(a,b,c):m(function(){returnb=b.decrypt(a),c?p(b,c):p(b).text},"Error decrypting message!")}functioni(a,b,c,d){returnb.length||(b=[b]),x?x.decryptAndVerifyMessage(a,b,c,d):m(function(){vare={};returnc=c.decrypt(a),e=p(c,d),e.text?(e.signatures=c.verify(b),e):null},"Error decrypting and verifying message!")}functionj(a,b){returna.length||(a=[a]),x?x.signClearMessage(a,b):m(function(){varc=newt.CleartextMessage(b);returnc.sign(a),c.armor()},"Error signing cleartext message!")}functionk(a,b){returna.length||(a=[a]),x?x.verifyClearSignedMessage(a,b):m(function(){varc={};if(!(binstanceoft.CleartextMessage))thrownewError("Parameter [message] needs to be of type CleartextMessage.");returnc.text=b.getText(),c.signatures=b.verify(a),c},"Error verifying cleartext signed message!")}functionl(a){return!v.getWebCrypto()&&x?x.generateKeyPair(a):u.generate(a).then(function(a){varb={};returnb.key=a,b.privateKeyArmored=a.armor(),b.publicKeyArmored=a.toPublic().armor(),b})["catch"](function(b){if(console.error(b),!v.getWebCrypto())thrownewError("Error generating keypair using js fallback!");returnconsole.log("Error generating keypair using native WebCrypto... falling back back to js!"),x.generateKeyPair(a)})["catch"](n.bind(null,"Error generating keypair!"))}functionm(a,b){varc=newPromise(function(b){varc=a();b(c)});returnc["catch"](n.bind(null,b))}functionn(a,b){throwconsole.error(b.stack),newError(a)}functiono(a,b,c){vard;returnd="binary"===b?s.fromBinary(a,c):s.fromText(a)}functionp(a,b){return"binary"===b?{text:a.getLiteralData(),filename:a.getFilename()}:{text:a.getText()}}varq=a("./encoding/armor.js"),r=a("./enums.js"),s=a("./message.js"),t=a("./cleartext.js"),u=a("./key.js"),v=a("./util"),w=a("./worker/async_proxy.js");a("es6-promise").polyfill();varx=null;c.initWorker=d,c.getWorker=e,c.encryptMessage=f,c.signAndEncryptMessage=g,c.decryptMessage=h,c.decryptAndVerifyMessage=i,c.signClearMessage=j,c.verifyClearSignedMessage=k,c.generateKeyPair=l},{"./cleartext.js":12,"./encoding/armor.js":41,"./enums.js":43,"./key.js":47,"./message.js":51,"./util":76,"./worker/async_proxy.js":77,"es6-promise":1}],53:[function(a,b,c){functiond(a){returna.substr(0,1).toUpperCase()+a.substr(1)}vare=a("../enums.js");b.exports={Compressed:a("./compressed.js"),SymEncryptedIntegrityProtected:a("./sym_encrypted_integrity_protected.js"),PublicKeyEncryptedSessionKey:a("./public_key_encrypted_session_key.js"),SymEncryptedSessionKey:a("./sym_encrypted_session_key.js"),Literal:a("./literal.js"),PublicKey:a("./public_key.js"),SymmetricallyEncrypted:a("./symmetrically_encrypted.js"),Marker:a("./marker.js"),PublicSubkey:a("./public_subkey.js"),UserAttribute:a("./user_attribute.js"),OnePassSignature:a("./one_pass_signature.js"),SecretKey:a("./secret_key.js"),Userid:a("./userid.js"),SecretSubkey:a("./secret_subkey.js"),Signature:a("./signature.js"),Trust:a("./trust.js"),newPacketFromTag:function(a){returnnew(this[d(a)])},fromStructuredClone:function(a){varb=e.read(e.packet,a.tag),c=this.newPacketFromTag(b);for(vardina)a.hasOwnProperty(d)&&(c[d]=a[d]);returnc.postCloneTypeFix&&c.postCloneTypeFix(),c}}},{"../enums.js":43,"./compressed.js":54,"./literal.js":56,"./marker.js":57,"./one_pass_signature.js":58,"./public_key.js":61,"./public_key_encrypted_session_key.js":62,"./public_subkey.js":63,"./secret_key.js":64,"./secret_subkey.js":65,"./signature.js":66,"./sym_encrypted_integrity_protected.js":67,"./sym_encrypted_session_key.js":68,"./symmetrically_encrypted.js":69,"./trust.js":70,"./user_attribute.js":71,"./userid.js":72}],54:[function(a,b,c){functiond(){this.tag=e.packet.compressed,this.packets=null,this.algorithm="zip",this.compressed=null}b.exports=d;vare=a("../enums.js"),f=a("../util.js"),g=a("../compression/zlib.min.js"),h=a("../compression/rawinflate.min.js"),i=a("../compression/rawdeflate.min.js");d.prototype.read=function(a){this.algorithm=e.read(e.compression,a.charCodeAt(0)),this.compressed=a.substr(1),this.decompress()},d.prototype.write=function(){returnnull===this.compressed&&this.compress(),String.fromCharCode(e.write(e.compression,this.algorithm))+this.compressed},d.prototype.decompress=function(){vara;switch(this.algorithm){case"uncompressed":a=this.compressed;break;case"zip":varb=newh.Zlib.RawInflate(f.str2Uint8Array(this.compressed));a=f.Uint8Array2str(b.decompress());break;case"zlib":varb=newg.Zlib.Inflate(f.str2Uint8Array(this.compressed));a=f.Uint8Array2str(b.decompress());break;case"bzip2":thrownewError("Compression algorithm BZip2 [BZ2] is not implemented.");default:thrownewError("Compression algorithm unknown :"+this.alogrithm)}this.packets.read(a)},d.prototype.compress=function(){vara,b;switch(a=this.packets.write(),this.algorithm){case"uncompressed":this.compressed=a;break;case"zip":b=newi.Zlib.RawDeflate(f.str2Uint8Array(a)),this.compressed=f.Uint8Array2str(b.compress());break;case"zlib":b=newg.Zlib.Deflate(f.str2Uint8Array(a)),this.compressed=f.Uint8Array2str(b.compress());break;case"bzip2":thrownewError("Compression algorithm BZip2 [BZ2] is not implemented.");default:thrownewError("Compression algorithm unknown :"+this.type)}}},{"../compression/rawdeflate.min.js":13,"../compression/rawinflate.min.js":14,"../compression/zlib.min.js":15,"../enums.js":43,"../util.js":76}],55:[function(a,b,c){a("../enums.js");b.exports={List:a("./packetlist.js")};vard=a("./all_packets.js");for(vareind)b.exports[e]=d[e]},{"../enums.js":43,"./all_packets.js":53,"./packetlist.js":60}],56:[function(a,b,c){functiond(){this.tag=f.packet.literal,this.format="utf8",this.data="",this.date=newDate,this.filename="msg.txt"}b.exports=d;vare=a("../util.js"),f=a("../enums.js");d.prototype.setText=function(a){a=a.replace(/\r/g,"").replace(/\n/g,"\r\n"),this.data="utf8"==this.format?e.encode_utf8(a):a},d.prototype.getText=function(){vara=e.decode_utf8(this.data);returna.replace(/\r\n/g,"\n")},d.prototype.setBytes=function(a,b){this.format=b,this.data=a},d.prototype.getBytes=function(){returnthis.data},d.prototype.setFilename=function(a){this.filename=a},d.prototype.getFilename=function(){returnthis.filename},d.prototype.read=function(a){varb=f.read(f.literal,a.charCodeAt(0)),c=a.charCodeAt(1);this.filename=e.decode_utf8(a.substr(2,c)),this.date=e.readDate(a.substr(2+c,4));vard=a.substring(6+c);this.setBytes(d,b)},d.prototype.write=function(){vara=e.encode_utf8(this.filename),b=this.getBytes(),c="";returnc+=String.fromCharCode(f.write(f.literal,this.format)),c+=String.fromCharCode(a.length),c+=a,c+=e.writeDate(this.date),c+=b}},{"../enums.js":43,"../util.js":76}],57:[function(a,b,c){functiond(){this.tag=e.packet.marker}b.exports=d;vare=a("../enums.js");d.prototype.read=function(a){return80==a.charCodeAt(0)&&71==a.charCodeAt(1)&&80==a.charCodeAt(2)?!0:!1}},{"../enums.js":43}],58:[function(a,b,c){functiond(){this.tag=e.packet.onePassSignature,this.version=null,this.type=null,this.hashAlgorithm=null,this.publicKeyAlgorithm=null,this.signingKeyId=null,this.flags=null}b.exports=d;vare=a("../enums.js"),f=a("../type/keyid.js");d.prototype.read=function(a){varb=0;returnthis.version=a.charCodeAt(b++),this.type=e.read(e.signature,a.charCodeAt(b++)),this.hashAlgorithm=e.read(e.hash,a.charCodeAt(b++)),this.publicKeyAlgorithm=e.read(e.publicKey,a.charCodeAt(b++)),this.signingKeyId=newf,this.signingKeyId.read(a.substr(b)),b+=8,this.flags=a.charCodeAt(b++),this},d.prototype.write=function(){vara="";returna+=String.fromCharCode(3),a+=String.fromCharCode(e.write(e.signature,this.type)),a+=String.fromCharCode(e.write(e.hash,this.hashAlgorithm)),a+=String.fromCharCode(e.write(e.publicKey,this.publicKeyAlgorithm)),a+=this.signingKeyId.write(),a+=String.fromCharCode(this.flags)},d.prototype.postCloneTypeFix=function(){this.signingKeyId=f.fromClone(this.signingKeyId)}},{"../enums.js":43,"../type/keyid.js":73}],59:[function(a,b,c){vard=(a("../enums.js"),a("../util.js"));b.exports={readSimpleLength:function(a){varb,c=0,e=a.charCodeAt(0);return192>e?(c=a.charCodeAt(0),b=1):255>e?(c=(a.charCodeAt(0)-192<<8)+a.charCodeAt(1)+192,b=2):255==e&&(c=d.readNumber(a.substr(1,4)),b=5),{len:c,offset:b}},writeSimpleLength:function(a){varb="";return192>a?b+=String.fromCharCode(a):a>191&&8384>a?(b+=String.fromCharCode((a-192>>8)+192),b+=String.fromCharCode(a-192&255)):(b+=String.fromCharCode(255),b+=d.writeNumber(a,4)),b},writeHeader:function(a,b){varc="";returnc+=String.fromCharCode(192|a),c+=this.writeSimpleLength(b)},writeOldHeader:function(a,b){varc="";return256>b?(c+=String.fromCharCode(128|a<<2),c+=String.fromCharCode(b)):65536>b?(c+=String.fromCharCode(128|a<<2|1),c+=d.writeNumber(b,2)):(c+=String.fromCharCode(128|a<<2|2),c+=d.writeNumber(b,4)),c},read:function(a,b,c){if(null===a||a.length<=b||a.substring(b).length<2||0===(128&a.charCodeAt(b)))thrownewError("Error during parsing. This message / key is probably not containing a valid OpenPGP format.");vare,f=b,g=-1,h=-1;h=0,0!==(64&a.charCodeAt(f))&&(h=1);vari;h?g=63&a.charCodeAt(f):(g=(63&a.charCodeAt(f))>>2,i=3&a.charCodeAt(f)),f++;varj=null,k=-1;if(h)if(a.charCodeAt(f)<192)e=a.charCodeAt(f++),d.print_debug("1 byte length:"+e);elseif(a.charCodeAt(f)>=192&&a.charCodeAt(f)<224)e=(a.charCodeAt(f++)-192<<8)+a.charCodeAt(f++)+192,d.print_debug("2 byte length:"+e);elseif(a.charCodeAt(f)>223&&a.charCodeAt(f)<255){e=1<<(31&a.charCodeAt(f++)),d.print_debug("4 byte length:"+e);varl=f+e;j=a.substring(f,f+e);for(varm;;){if(a.charCodeAt(l)<192){m=a.charCodeAt(l++),e+=m,j+=a.substring(l,l+m),l+=m;break}if(a.charCodeAt(l)>=192&&a.charCodeAt(l)<224){m=(a.charCodeAt(l++)-192<<8)+a.charCodeAt(l++)+192,e+=m,j+=a.substring(l,l+m),l+=m;break}if(!(a.charCodeAt(l)>223&&a.charCodeAt(l)<255)){l++,m=a.charCodeAt(l++)<<24|a.charCodeAt(l++)<<16|a.charCodeAt(l++)<<8|a.charCodeAt(l++),j+=a.substring(l,l+m),e+=m,l+=m;break}m=1<<(31&a.charCodeAt(l++)),e+=m,j+=a.substring(l,l+m),l+=m}k=l-f}elsef++,e=a.charCodeAt(f++)<<24|a.charCodeAt(f++)<<16|a.charCodeAt(f++)<<8|a.charCodeAt(f++);elseswitch(i){case0:e=a.charCodeAt(f++);break;case1:e=a.charCodeAt(f++)<<8|a.charCodeAt(f++);break;case2:e=a.charCodeAt(f++)<<24|a.charCodeAt(f++)<<16|a.charCodeAt(f++)<<8|a.charCodeAt(f++);break;default:e=c}return-1==k&&(k=e),null===j&&(j=a.substring(f,f+k)),{tag:g,packet:j,offset:f+k}}}},{"../enums.js":43,"../util.js":76}],60:[function(a,b,c){functiond(){this.length=0}b.exports=d;vare=a("./packet.js"),f=a("./all_packets.js"),g=a("../enums.js");d.prototype.read=function(a){for(varb=0;b<a.length;){varc=e.read(a,b,a.length-b);b=c.offset;vard=!1;try{varh=g.read(g.packet,c.tag),i=f.newPacketFromTag(h);this.push(i),d=!0,i.read(c.packet)}catch(j){d&&this.pop()}}},d.prototype.write=function(){for(vara="",b=0;b<this.length;b++){varc=this[b].write();a+=e.writeHeader(this[b].tag,c.length),a+=c}returna},d.prototype.push=function(a){a&&(a.packets=a.packets||newd,this[this.length]=a,this.length++)},d.prototype.pop=function(){if(0!==this.length){vara=this[this.length-1];returndeletethis[this.length-1],this.length--,a}},d.prototype.filter=function(a){for(varb=newd,c=0;c<this.length;c++)a(this[c],c,this)&&b.push(this[c]);returnb},d.prototype.filterByTag=function(){for(vara=Array.prototype.slice.call(arguments),b=newd,c=this,e=0;e<this.length;e++)a.some(function(a){returnc[e].tag==a})&&b.push(this[e]);returnb},d.prototype.forEach=function(a){for(varb=0;b<this.length;b++)a(this[b])},d.prototype.findPacket=function(a){varb=this.filterByTag(a);if(b.length)returnb[0];for(varc=null,d=0;d<this.length;d++)if(this[d].packets.length&&(c=this[d].packets.findPacket(a)))returnc;returnnull},d.prototype.indexOfTag=function(){for(vara=Array.prototype.slice.call(arguments),b=[],c=this,d=0;d<this.length;d++)a.some(function(a){returnc[d].tag==a})&&b.push(d);returnb},d.prototype.slice=function(a,b){b||(b=this.length);for(varc=newd,e=a;b>e;e++)c.push(this[e]);returnc},d.prototype.concat=function(a){if(a)for(varb=0;b<a.length;b++)this.push(a[b])},b.exports.fromStructuredClone=function(a){for(varb=newd,c=0;c<a.length;c++)b.push(f.fromStructuredClone(a[c])),0!==b[c].packets.length?b[c].packets=this.fromStructuredClone(b[c].packets):b[c].packets=newd;returnb}},{"../enums.js":43,"./all_packets.js":53,"./packet.js":59}],61:[function(a,b,c){functiond(){this.tag=h.packet.publicKey,this.version=4,this.created=newDate,this.mpi=[],this.algorithm="rsa_sign",this.expirationTimeV3=0,this.fingerprint=null,this.keyid=null}b.exports=d;vare=a("../util.js"),f=a("../type/mpi.js"),g=a("../type/keyid.js"),h=a("../enums.js"),i=a("../crypto");d.prototype.read=function(a){varb=0;if(this.version=a.charCodeAt(b++),3==this.version||4==this.version){this.created=e.readDate(a.substr(b,4)),b+=4,3==this.version&&(this.expirationTimeV3=e.readNumber(a.substr(b,2)),b+=2),this.algorithm=h.read(h.publicKey,a.charCodeAt(b++));varc=i.getPublicMpiCount(this.algorithm);this.mpi=[];for(vard=a.substr(b),g=0,j=0;c>j&&g<d.length;j++)if(this.mpi[j]=newf,g+=this.mpi[j].read(d.substr(g)),g>d.length)thrownewError("Error reading MPI @:"+g);returng+6}thrownewError("Version "+this.version+" of the key packet is unsupported.")},d.prototype.readPublicKey=d.prototype.read,d.prototype.write=function(){vara=String.fromCharCode(this.version);a+=e.writeDate(this.created),3==this.version&&(a+=e.writeNumber(this.expirationTimeV3,2)),a+=String.fromCharCode(h.write(h.publicKey,this.algorithm));for(varb=i.getPublicMpiCount(this.algorithm),c=0;b>c;c++)a+=this.mpi[c].write();returna},d.prototype.writePublicKey=d.prototype.write,d.prototype.writeOld=function(){vara=this.writePublicKey();returnString.fromCharCode(153)+e.writeNumber(a.length,2)+a},d.prototype.getKeyId=function(){returnthis.keyid?this.keyid:(this.keyid=newg,4==this.version?this.keyid.read(e.hex2bin(this.getFingerprint()).substr(12,8)):3==this.version&&this.keyid.read(this.mpi[0].write().substr(-8)),this.keyid)},d.prototype.getFingerprint=function(){if(this.fingerprint)returnthis.fingerprint;vara="";if(4==this.version)a=this.writeOld(),this.fingerprint=i.hash.sha1(a);elseif(3==this.version){for(varb=i.getPublicMpiCount(this.algorithm),c=0;b>c;c++)a+=this.mpi[c].toBytes();this.fingerprint=i.hash.md5(a)}returnthis.fingerprint=e.hexstrdump(this.fingerprint),this.fingerprint},d.prototype.getBitSize=function(){return8*this.mpi[0].byteLength()},d.prototype.postCloneTypeFix=function(){for(vara=0;a<this.mpi.length;a++)this.mpi[a]=f.fromClone(this.mpi[a]);this.keyid&&(this.keyid=g.fromClone(this.keyid))}},{"../crypto":32,"../enums.js":43,"../type/keyid.js":73,"../type/mpi.js":74,"../util.js":76}],62:[function(a,b,c){functiond(){this.tag=h.packet.publicKeyEncryptedSessionKey,this.version=3,this.publicKeyId=newe,this.publicKeyAlgorithm="rsa_encrypt",this.sessionKey=null,this.sessionKeyAlgorithm="aes256",this.encrypted=[]}b.exports=d;vare=a("../type/keyid.js"),f=a("../util.js"),g=a("../type/mpi.js"),h=a("../enums.js"),i=a("../crypto");d.prototype.read=function(a){this.version=a.charCodeAt(0),this.publicKeyId.read(a.substr(1)),this.publicKeyAlgorithm=h.read(h.publicKey,a.charCodeAt(9));varb=10,c=function(a){switch(a){case"rsa_encrypt":case"rsa_encrypt_sign":return1;case"elgamal":return2;default:thrownewError("Invalid algorithm.")}}(this.publicKeyAlgorithm);this.encrypted=[];for(vard=0;c>d;d++){vare=newg;b+=e.read(a.substr(b)),this.encrypted.push(e)}},d.prototype.write=function(){vara=String.fromCharCode(this.version);a+=this.publicKeyId.write(),a+=String.fromCharCode(h.write(h.publicKey,this.publicKeyAlgorithm));for(varb=0;b<this.encrypted.length;b++)a+=this.encrypted[b].write();returna},d.prototype.encrypt=function(a){varb=String.fromCharCode(h.write(h.symmetric,this.sessionKeyAlgorithm));b+=this.sessionKey;varc=f.calc_checksum(this.sessionKey);b+=f.writeNumber(c,2);vard=newg;d.fromBytes(i.pkcs1.eme.encode(b,a.mpi[0].byteLength())),this.encrypted=i.publicKeyEncrypt(this.publicKeyAlgorithm,a.mpi,d)},d.prototype.decrypt=function(a){varb=i.publicKeyDecrypt(this.publicKeyAlgorithm,a.mpi,this.encrypted).toBytes(),c=f.readNumber(b.substr(b.length-2)),d=i.pkcs1.eme.decode(b);if(a=d.substring(1,d.length-2),c!=f.calc_checksum(a))thrownewError("Checksum mismatch");this.sessionKey=a,this.sessionKeyAlgorithm=h.read(h.symmetric,d.charCodeAt(0))},d.prototype.postCloneTypeFix=function(){this.publicKeyId=e.fromClone(this.publicKeyId);for(vara=0;a<this.encrypted.length;a++)this.encrypted[a]=g.fromClone(this.encrypted[a])}},{"../crypto":32,"../enums.js":43,"../type/keyid.js":73,"../type/mpi.js":74,"../util.js":76}],63:[function(a,b,c){functiond(){e.call(this),this.tag=f.packet.publicSubkey}b.exports=d;vare=a("./public_key.js"),f=a("../enums.js");d.prototype=newe,d.prototype.constructor=d},{"../enums.js":43,"./public_key.js":61}],64:[function(a,b,c){functiond(){j.call(this),this.tag=k.packet.secretKey,this.encrypted=null,this.isDecrypted=!1}functione(a){return"sha1"==a?20:2}functionf(a){return"sha1"==a?m.hash.sha1:function(a){returnl.writeNumber(l.calc_checksum(a),2)}}functiong(a,b,c){vard=e(a),g=f(a),h=b.substr(b.length-d);b=b.substr(0,b.length-d);vari=g(b);if(i!=h)returnnewError("Hash mismatch.");for(varj=m.getPrivateMpiCount(c),k=0,l=[],o=0;j>o&&k<b.length;o++)l[o]=newn,k+=l[o].read(b.substr(k));returnl}functionh(a,b,c){for(vard="",e=m.getPublicMpiCount(b),g=e;g<c.length;g++)d+=c[g].write();returnd+=f(a)(d)}functioni(a,b,c){returna.produce_key(b,m.cipher[c].keySize)}b.exports=d;varj=a("./public_key.js"),k=a("../enums.js"),l=a("../util.js"),m=a("../crypto"),n=a("../type/mpi.js"),o=a("../type/s2k.js");d.prototype=newj,d.prototype.constructor=d,d.prototype.read=function(a){varb=this.readPublicKey(a);a=a.substr(b);varc=a.charCodeAt(0);if(c)this.encrypted=a;else{vard=g("mod",a.substr(1),this.algorithm);if(dinstanceofError)throwd;this.mpi=this.mpi.concat(d),this.isDecrypted=!0}},d.prototype.write=function(){vara=this.writePublicKey();returnthis.encrypted?a+=this.encrypted:(a+=String.fromCharCode(0),a+=h("mod",this.algorithm,this.mpi)),a},d.prototype.encrypt=function(a){if(this.isDecrypted&&!a)returnvoid(this.encrypted=null);if(!a)thrownewError("The key must be decrypted before removing passphrase protection.");varb=newo,c="aes256",d=h("sha1",this.algorithm,this.mpi),e=i(b,a,c),f=m.cipher[c].blockSize,g=m.random.getRandomBytes(f);this.encrypted="",this.encrypted+=String.fromCharCode(254),this.encrypted+=String.fromCharCode(k.write(k.symmetric,c)),this.encrypted+=b.write(),this.encrypted+=g,this.encrypted+=m.cfb.normalEncrypt(c,e,d,g)},d.prototype.decrypt=function(a){if(this.isDecrypted)return!0;varb,c,d=0,e=this.encrypted.charCodeAt(d++);if(255==e||254==e){b=this.encrypted.charCodeAt(d++),b=k.read(k.symmetric,b);varf=newo;d+=f.read(this.encrypted.substr(d)),c=i(f,a,b)}elseb=e,b=k.read(k.symmetric,b),c=m.hash.md5(a);varh=this.encrypted.substr(d,m.cipher[b].blockSize);d+=h.length;varj,l=this.encrypted.substr(d);j=m.cfb.normalDecrypt(b,c,l,h);varn=254==e?"sha1":"mod",p=g(n,j,this.algorithm);returnpinstanceofError?!1:(this.mpi=this.mpi.concat(p),this.isDecrypted=!0,!0)},d.prototype.generate=function(a){varb=this;returnm.generateMpi(b.algorithm,a).then(function(a){b.mpi=a,b.isDecrypted=!0})},d.prototype.clearPrivateMPIs=function(){if(!this.encrypted)thrownewError("If secret key is not encrypted, clearing private MPIs is irreversible.");this.mpi=this.mpi.slice(0,m.getPublicMpiCount(this.algorithm)),this.isDecrypted=!1}},{"../crypto":32,"../enums.js":43,"../type/mpi.js":74,"../type/s2k.js":75,"../util.js":76,"./public_key.js":61}],65:[function(a,b,c){functiond(){e.call(this),this.tag=f.packet.secretSubkey}b.exports=d;vare=a("./secret_key.js"),f=a("../enums.js");d.prototype=newe,d.prototype.constructor=d},{"../enums.js":43,"./secret_key.js":64}],66:[function(a,b,c){functiond(){this.tag=h.packet.signature,this.version=4,this.signatureType=null,this.hashAlgorithm=null,this.publicKeyAlgorithm=null,this.signatureData=null,this.unhashedSubpackets=null,this.signedHashValue=null,this.created=newDate,this.signatureExpirationTime=null,this.signatureNeverExpires=!0,this.exportable=null,this.trustLevel=null,this.trustAmount=null,this.regularExpression=null,this.revocable=null,this.keyExpirationTime=null,this.keyNeverExpires=null,
this.preferredSymmetricAlgorithms=null,this.revocationKeyClass=null,this.revocationKeyAlgorithm=null,this.revocationKeyFingerprint=null,this.issuerKeyId=newk,this.notation=null,this.preferredHashAlgorithms=null,this.preferredCompressionAlgorithms=null,this.keyServerPreferences=null,this.preferredKeyServer=null,this.isPrimaryUserID=null,this.policyURI=null,this.keyFlags=null,this.signersUserId=null,this.reasonForRevocationFlag=null,this.reasonForRevocationString=null,this.features=null,this.signatureTargetPublicKeyAlgorithm=null,this.signatureTargetHashAlgorithm=null,this.signatureTargetHash=null,this.embeddedSignature=null,this.verified=!1}functione(a,b){varc="";returnc+=g.writeSimpleLength(b.length+1),c+=String.fromCharCode(a),c+=b}b.exports=d;varf=a("../util.js"),g=a("./packet.js"),h=a("../enums.js"),i=a("../crypto"),j=a("../type/mpi.js"),k=a("../type/keyid.js");d.prototype.read=function(a){functionb(a){for(varb=f.readNumber(a.substr(0,2)),c=2;2+b>c;){vard=g.readSimpleLength(a.substr(c));c+=d.offset,this.read_sub_packet(a.substr(c,d.len)),c+=d.len}returnc}varc=0;switch(this.version=a.charCodeAt(c++),this.version){case3:5!=a.charCodeAt(c++)&&f.print_debug("packet/signature.js\ninvalid One-octet length of following hashed material.MUST be 5. @:"+(c-1));vard=c;this.signatureType=a.charCodeAt(c++),this.created=f.readDate(a.substr(c,4)),c+=4,this.signatureData=a.substring(d,c),this.issuerKeyId.read(a.substring(c,c+8)),c+=8,this.publicKeyAlgorithm=a.charCodeAt(c++),this.hashAlgorithm=a.charCodeAt(c++);break;case4:this.signatureType=a.charCodeAt(c++),this.publicKeyAlgorithm=a.charCodeAt(c++),this.hashAlgorithm=a.charCodeAt(c++),c+=b.call(this,a.substr(c),!0),this.signatureData=a.substr(0,c);vare=c;c+=b.call(this,a.substr(c),!1),this.unhashedSubpackets=a.substr(e,c-e);break;default:thrownewError("Version "+this.version+" of the signature is unsupported.")}this.signedHashValue=a.substr(c,2),c+=2,this.signature=a.substr(c)},d.prototype.write=function(){vara="";switch(this.version){case3:a+=String.fromCharCode(3),a+=String.fromCharCode(5),a+=this.signatureData,a+=this.issuerKeyId.write(),a+=String.fromCharCode(this.publicKeyAlgorithm),a+=String.fromCharCode(this.hashAlgorithm);break;case4:a+=this.signatureData,a+=this.unhashedSubpackets?this.unhashedSubpackets:f.writeNumber(0,2)}returna+=this.signedHashValue+this.signature},d.prototype.sign=function(a,b){varc=h.write(h.signature,this.signatureType),d=h.write(h.publicKey,this.publicKeyAlgorithm),e=h.write(h.hash,this.hashAlgorithm),f=String.fromCharCode(4);f+=String.fromCharCode(c),f+=String.fromCharCode(d),f+=String.fromCharCode(e),this.issuerKeyId=a.getKeyId(),f+=this.write_all_sub_packets(),this.signatureData=f;varg=this.calculateTrailer(),j=this.toSign(c,b)+this.signatureData+g,k=i.hash.digest(e,j);this.signedHashValue=k.substr(0,2),this.signature=i.signature.sign(e,d,a.mpi,j)},d.prototype.write_all_sub_packets=function(){vara=h.signatureSubpacket,b="",c="";if(null!==this.created&&(b+=e(a.signature_creation_time,f.writeDate(this.created))),null!==this.signatureExpirationTime&&(b+=e(a.signature_expiration_time,f.writeNumber(this.signatureExpirationTime,4))),null!==this.exportable&&(b+=e(a.exportable_certification,String.fromCharCode(this.exportable?1:0))),null!==this.trustLevel&&(c=String.fromCharCode(this.trustLevel)+String.fromCharCode(this.trustAmount),b+=e(a.trust_signature,c)),null!==this.regularExpression&&(b+=e(a.regular_expression,this.regularExpression)),null!==this.revocable&&(b+=e(a.revocable,String.fromCharCode(this.revocable?1:0))),null!==this.keyExpirationTime&&(b+=e(a.key_expiration_time,f.writeNumber(this.keyExpirationTime,4))),null!==this.preferredSymmetricAlgorithms&&(c=f.bin2str(this.preferredSymmetricAlgorithms),b+=e(a.preferred_symmetric_algorithms,c)),null!==this.revocationKeyClass&&(c=String.fromCharCode(this.revocationKeyClass),c+=String.fromCharCode(this.revocationKeyAlgorithm),c+=this.revocationKeyFingerprint,b+=e(a.revocation_key,c)),this.issuerKeyId.isNull()||(b+=e(a.issuer,this.issuerKeyId.write())),null!==this.notation)for(vardinthis.notation)if(this.notation.hasOwnProperty(d)){varg=this.notation[d];c=String.fromCharCode(128),c+=String.fromCharCode(0),c+=String.fromCharCode(0),c+=String.fromCharCode(0),c+=f.writeNumber(d.length,2),c+=f.writeNumber(g.length,2),c+=d+g,b+=e(a.notation_data,c)}returnnull!==this.preferredHashAlgorithms&&(c=f.bin2str(this.preferredHashAlgorithms),b+=e(a.preferred_hash_algorithms,c)),null!==this.preferredCompressionAlgorithms&&(c=f.bin2str(this.preferredCompressionAlgorithms),b+=e(a.preferred_compression_algorithms,c)),null!==this.keyServerPreferences&&(c=f.bin2str(this.keyServerPreferences),b+=e(a.key_server_preferences,c)),null!==this.preferredKeyServer&&(b+=e(a.preferred_key_server,this.preferredKeyServer)),null!==this.isPrimaryUserID&&(b+=e(a.primary_user_id,String.fromCharCode(this.isPrimaryUserID?1:0))),null!==this.policyURI&&(b+=e(a.policy_uri,this.policyURI)),null!==this.keyFlags&&(c=f.bin2str(this.keyFlags),b+=e(a.key_flags,c)),null!==this.signersUserId&&(b+=e(a.signers_user_id,this.signersUserId)),null!==this.reasonForRevocationFlag&&(c=String.fromCharCode(this.reasonForRevocationFlag),c+=this.reasonForRevocationString,b+=e(a.reason_for_revocation,c)),null!==this.features&&(c=f.bin2str(this.features),b+=e(a.features,c)),null!==this.signatureTargetPublicKeyAlgorithm&&(c=String.fromCharCode(this.signatureTargetPublicKeyAlgorithm),c+=String.fromCharCode(this.signatureTargetHashAlgorithm),c+=this.signatureTargetHash,b+=e(a.signature_target,c)),null!==this.embeddedSignature&&(b+=e(a.embedded_signature,this.embeddedSignature.write())),b=f.writeNumber(b.length,2)+b},d.prototype.read_sub_packet=function(a){functionb(a,b){this[a]=[];for(varc=0;c<b.length;c++)this[a].push(b.charCodeAt(c))}varc,e=0,g=127&a.charCodeAt(e++);switch(g){case2:this.created=f.readDate(a.substr(e));break;case3:c=f.readNumber(a.substr(e)),this.signatureNeverExpires=0===c,this.signatureExpirationTime=c;break;case4:this.exportable=1==a.charCodeAt(e++);break;case5:this.trustLevel=a.charCodeAt(e++),this.trustAmount=a.charCodeAt(e++);break;case6:this.regularExpression=a.substr(e);break;case7:this.revocable=1==a.charCodeAt(e++);break;case9:c=f.readNumber(a.substr(e)),this.keyExpirationTime=c,this.keyNeverExpires=0===c;break;case11:b.call(this,"preferredSymmetricAlgorithms",a.substr(e));break;case12:this.revocationKeyClass=a.charCodeAt(e++),this.revocationKeyAlgorithm=a.charCodeAt(e++),this.revocationKeyFingerprint=a.substr(e,20);break;case16:this.issuerKeyId.read(a.substr(e));break;case20:if(128==a.charCodeAt(e)){e+=4;varh=f.readNumber(a.substr(e,2));e+=2;varj=f.readNumber(a.substr(e,2));e+=2;vark=a.substr(e,h),l=a.substr(e+h,j);this.notation=this.notation||{},this.notation[k]=l}elsef.print_debug("Unsupported notation flag "+a.charCodeAt(e));break;case21:b.call(this,"preferredHashAlgorithms",a.substr(e));break;case22:b.call(this,"preferredCompressionAlgorithms",a.substr(e));break;case23:b.call(this,"keyServerPreferencess",a.substr(e));break;case24:this.preferredKeyServer=a.substr(e);break;case25:this.isPrimaryUserID=0!==a[e++];break;case26:this.policyURI=a.substr(e);break;case27:b.call(this,"keyFlags",a.substr(e));break;case28:this.signersUserId+=a.substr(e);break;case29:this.reasonForRevocationFlag=a.charCodeAt(e++),this.reasonForRevocationString=a.substr(e);break;case30:b.call(this,"features",a.substr(e));break;case31:this.signatureTargetPublicKeyAlgorithm=a.charCodeAt(e++),this.signatureTargetHashAlgorithm=a.charCodeAt(e++);varm=i.getHashByteLength(this.signatureTargetHashAlgorithm);this.signatureTargetHash=a.substr(e,m);break;case32:this.embeddedSignature=newd,this.embeddedSignature.read(a.substr(e));break;default:f.print_debug("Unknown signature subpacket type "+g+" @:"+e)}},d.prototype.toSign=function(a,b){varc=h.signature;switch(a){casec.binary:casec.text:returnb.getBytes();casec.standalone:return"";casec.cert_generic:casec.cert_persona:casec.cert_casual:casec.cert_positive:casec.cert_revocation:vard,e;if(void0!==b.userid)e=180,d=b.userid;else{if(void0===b.userattribute)thrownewError("Either a userid or userattribute packet needs to be supplied for certification.");e=209,d=b.userattribute}varg=d.write();if(4==this.version)returnthis.toSign(c.key,b)+String.fromCharCode(e)+f.writeNumber(g.length,4)+g;if(3==this.version)returnthis.toSign(c.key,b)+g;break;casec.subkey_binding:casec.subkey_revocation:casec.key_binding:returnthis.toSign(c.key,b)+this.toSign(c.key,{key:b.bind});casec.key:if(void0===b.key)thrownewError("Key packet is required for this signature.");returnb.key.writeOld();casec.key_revocation:returnthis.toSign(c.key,b);casec.timestamp:return"";casec.third_party:thrownewError("Not implemented");default:thrownewError("Unknown signature type.")}},d.prototype.calculateTrailer=function(){vara="";return3==this.version?a:(a+=String.fromCharCode(4),a+=String.fromCharCode(255),a+=f.writeNumber(this.signatureData.length,4))},d.prototype.verify=function(a,b){varc=h.write(h.signature,this.signatureType),d=h.write(h.publicKey,this.publicKeyAlgorithm),e=h.write(h.hash,this.hashAlgorithm),f=this.toSign(c,b),g=this.calculateTrailer(),k=0;d>0&&4>d?k=1:17==d&&(k=2);for(varl=[],m=0,n=0;k>n;n++)l[n]=newj,m+=l[n].read(this.signature.substr(m));returnthis.verified=i.signature.verify(d,e,l,a.mpi,f+this.signatureData+g),this.verified},d.prototype.isExpired=function(){returnthis.signatureNeverExpires?!1:Date.now()>this.created.getTime()+1e3*this.signatureExpirationTime},d.prototype.postCloneTypeFix=function(){this.issuerKeyId=k.fromClone(this.issuerKeyId)}},{"../crypto":32,"../enums.js":43,"../type/keyid.js":73,"../type/mpi.js":74,"../util.js":76,"./packet.js":59}],67:[function(a,b,c){functiond(){this.tag=f.packet.symEncryptedIntegrityProtected,this.encrypted=null,this.modification=!1,this.packets=null}b.exports=d;vare=(a("../util.js"),a("../crypto")),f=a("../enums.js");d.prototype.read=function(a){varb=a.charCodeAt(0);if(1!=b)thrownewError("Invalid packet version.");this.encrypted=a.substr(1)},d.prototype.write=function(){returnString.fromCharCode(1)+this.encrypted},d.prototype.encrypt=function(a,b){varc=this.packets.write(),d=e.getPrefixRandom(a),f=d+d.charAt(d.length-2)+d.charAt(d.length-1),g=c;g+=String.fromCharCode(211),g+=String.fromCharCode(20),g+=e.hash.sha1(f+g),this.encrypted=e.cfb.encrypt(d,a,g,b,!1),f.length+g.length!=this.encrypted.length&&(this.encrypted=this.encrypted.substring(0,f.length+g.length))},d.prototype.decrypt=function(a,b){varc=e.cfb.decrypt(a,b,this.encrypted,!1),d=c.slice(c.length-20,c.length).join("");if(c.splice(c.length-20),this.hash=e.hash.sha1(e.cfb.mdc(a,b,this.encrypted)+c.join("")),this.hash!=d)thrownewError("Modification detected.");c.splice(c.length-2),this.packets.read(c.join(""))}},{"../crypto":32,"../enums.js":43,"../util.js":76}],68:[function(a,b,c){functiond(){this.tag=f.packet.symEncryptedSessionKey,this.version=4,this.sessionKeyEncryptionAlgorithm=null,this.sessionKeyAlgorithm="aes256",this.encrypted=null,this.s2k=newe}vare=a("../type/s2k.js"),f=a("../enums.js"),g=a("../crypto");b.exports=d,d.prototype.read=function(a){this.version=a.charCodeAt(0);varb=f.read(f.symmetric,a.charCodeAt(1)),c=this.s2k.read(a.substr(2)),d=c+2;d<a.length?(this.encrypted=a.substr(d),this.sessionKeyEncryptionAlgorithm=b):this.sessionKeyAlgorithm=b},d.prototype.write=function(){vara=null===this.encrypted?this.sessionKeyAlgorithm:this.sessionKeyEncryptionAlgorithm,b=String.fromCharCode(this.version)+String.fromCharCode(f.write(f.symmetric,a))+this.s2k.write();returnnull!==this.encrypted&&(b+=this.encrypted),b},d.prototype.decrypt=function(a){varb=null!==this.sessionKeyEncryptionAlgorithm?this.sessionKeyEncryptionAlgorithm:this.sessionKeyAlgorithm,c=g.cipher[b].keySize,d=this.s2k.produce_key(a,c);if(null===this.encrypted)this.sessionKey=d;else{vare=g.cfb.decrypt(this.sessionKeyEncryptionAlgorithm,d,this.encrypted,!0);e=e.join(""),this.sessionKeyAlgorithm=f.read(f.symmetric,e[0].keyCodeAt()),this.sessionKey=e.substr(1)}},d.prototype.encrypt=function(a){varb=g.getKeyLength(this.sessionKeyEncryptionAlgorithm),c=this.s2k.produce_key(a,b),d=String.fromCharCode(f.write(f.symmetric,this.sessionKeyAlgorithm))+g.getRandomBytes(g.getKeyLength(this.sessionKeyAlgorithm));this.encrypted=g.cfb.encrypt(g.getPrefixRandom(this.sessionKeyEncryptionAlgorithm),this.sessionKeyEncryptionAlgorithm,c,d,!0)},d.prototype.postCloneTypeFix=function(){this.s2k=e.fromClone(this.s2k)}},{"../crypto":32,"../enums.js":43,"../type/s2k.js":75}],69:[function(a,b,c){functiond(){this.tag=f.packet.symmetricallyEncrypted,this.encrypted=null,this.packets=null,this.ignore_mdc_error=g.ignore_mdc_error}b.exports=d;vare=a("../crypto"),f=a("../enums.js"),g=a("../config");d.prototype.read=function(a){this.encrypted=a},d.prototype.write=function(){returnthis.encrypted},d.prototype.decrypt=function(a,b){varc=e.cfb.decrypt(a,b,this.encrypted,!0);if(!this.ignore_mdc_error&&("aes128"===a||"aes192"===a||"aes256"===a))thrownewError("Decryption failed due to missing MDC in combination with modern cipher.");this.packets.read(c.join(""))},d.prototype.encrypt=function(a,b){varc=this.packets.write();this.encrypted=e.cfb.encrypt(e.getPrefixRandom(a),a,c,b,!0)}},{"../config":17,"../crypto":32,"../enums.js":43}],70:[function(a,b,c){functiond(){this.tag=e.packet.trust}b.exports=d;vare=a("../enums.js");d.prototype.read=function(a){}},{"../enums.js":43}],71:[function(a,b,c){functiond(){this.tag=f.packet.userAttribute,this.attributes=[]}vare=(a("../util.js"),a("./packet.js")),f=a("../enums.js");b.exports=d,d.prototype.read=function(a){for(varb=0;b<a.length;){varc=e.readSimpleLength(a.substr(b));b+=c.offset,this.attributes.push(a.substr(b,c.len)),b+=c.len}},d.prototype.write=function(){for(vara="",b=0;b<this.attributes.length;b++)a+=e.writeSimpleLength(this.attributes[b].length),a+=this.attributes[b];returna},d.prototype.equals=function(a){returna&&ainstanceofd?this.attributes.every(function(b,c){returnb===a.attributes[c]}):!1}},{"../enums.js":43,"../util.js":76,"./packet.js":59}],72:[function(a,b,c){functiond(){this.tag=f.packet.userid,this.userid=""}b.exports=d;vare=a("../util.js"),f=a("../enums.js");d.prototype.read=function(a){this.userid=e.decode_utf8(a)},d.prototype.write=function(){returne.encode_utf8(this.userid)}},{"../enums.js":43,"../util.js":76}],73:[function(a,b,c){functiond(){this.bytes=""}b.exports=d;vare=a("../util.js");d.prototype.read=function(a){this.bytes=a.substr(0,8)},d.prototype.write=function(){returnthis.bytes},d.prototype.toHex=function(){returne.hexstrdump(this.bytes)},d.prototype.equals=function(a){returnthis.bytes==a.bytes},d.prototype.isNull=function(){return""===this.bytes},b.exports.mapToHex=function(a){returna.toHex()},b.exports.fromClone=function(a){varb=newd;returnb.bytes=a.bytes,b},b.exports.fromId=function(a){varb=newd;returnb.read(e.hex2bin(a)),b}},{"../util.js":76}],74:[function(a,b,c){functiond(){this.data=null}b.exports=d;vare=a("../crypto/public_key/jsbn.js"),f=a("../util.js");d.prototype.read=function(a){varb=a.charCodeAt(0)<<8|a.charCodeAt(1),c=Math.ceil(b/8),d=a.substr(2,c);returnthis.fromBytes(d),2+c},d.prototype.fromBytes=function(a){this.data=newe(f.hexstrdump(a),16)},d.prototype.toBytes=function(){returnthis.write().substr(2)},d.prototype.byteLength=function(){returnthis.toBytes().length},d.prototype.write=function(){returnthis.data.toMPI()},d.prototype.toBigInteger=function(){returnthis.data.clone()},d.prototype.fromBigInteger=function(a){this.data=a.clone()},b.exports.fromClone=function(a){a.data.copyTo=e.prototype.copyTo;varb=newe;a.data.copyTo(b);varc=newd;returnc.data=b,c}},{"../crypto/public_key/jsbn.js":37,"../util.js":76}],75:[function(a,b,c){functiond(){this.algorithm="sha256",this.type="iterated",this.c=96,this.salt=g.random.getRandomBytes(8)}b.exports=d;vare=a("../enums.js"),f=a("../util.js"),g=a("../crypto");d.prototype.get_count=function(){vara=6;return16+(15&this.c)<<(this.c>>4)+a},d.prototype.read=function(a){varb=0;switch(this.type=e.read(e.s2k,a.charCodeAt(b++)),this.algorithm=e.read(e.hash,a.charCodeAt(b++)),this.type){case"simple":break;case"salted":this.salt=a.substr(b,8),b+=8;break;case"iterated":this.salt=a.substr(b,8),b+=8,this.c=a.charCodeAt(b++);break;case"gnu":if("GNU"!=a.substr(b,3))thrownewError("Unknown s2k type.");b+=3;varc=1e3+a.charCodeAt(b++);if(1001!=c)thrownewError("Unknown s2k gnu protection mode.");this.type=c;break;default:thrownewError("Unknown s2k type.")}returnb},d.prototype.write=function(){vara=String.fromCharCode(e.write(e.s2k,this.type));switch(a+=String.fromCharCode(e.write(e.hash,this.algorithm)),this.type){case"simple":break;case"salted":a+=this.salt;break;case"iterated":a+=this.salt,a+=String.fromCharCode(this.c);break;case"gnu":thrownewError("GNU s2k type not supported.");default:thrownewError("Unknown s2k type.")}returna},d.prototype.produce_key=function(a,b){functionc(b,c){vard=e.write(e.hash,c.algorithm);switch(c.type){case"simple":returng.hash.digest(d,b+a);case"salted":returng.hash.digest(d,b+c.salt+a);case"iterated":for(varf=[],h=c.get_count(),i=c.salt+a;f.length*i.length<h;)f.push(i);returnf=f.join(""),f.length>h&&(f=f.substr(0,h)),g.hash.digest(d,b+f);case"gnu":thrownewError("GNU s2k type not supported.");default:thrownewError("Unknown s2k type.")}}a=f.encode_utf8(a);for(vard="",h="";d.length<=b;)d+=c(h,this),h+=String.fromCharCode(0);returnd.substr(0,b)},b.exports.fromClone=function(a){varb=newd;returnthis.algorithm=a.algorithm,this.type=a.type,this.c=a.c,this.salt=a.salt,b}},{"../crypto":32,"../enums.js":43,"../util.js":76}],76:[function(a,b,c){"use strict";vard=a("./config");b.exports={readNumber:function(a){for(varb=0,c=0;c<a.length;c++)b<<=8,b+=a.charCodeAt(c);returnb},writeNumber:function(a,b){for(varc="",d=0;b>d;d++)c+=String.fromCharCode(a>>8*(b-d-1)&255);returnc},readDate:function(a){varb=this.readNumber(a),c=newDate;returnc.setTime(1e3*b),c},writeDate:function(a){varb=Math.round(a.getTime()/1e3);returnthis.writeNumber(b,4)},emailRegEx:/^[+a-zA-Z0-9_.-]+@([a-zA-Z0-9-]+\.)+[a-zA-Z0-9]{2,6}$/,hexdump:function(a){for(varb,c=[],d=a.length,e=0,f=0;d>e;){for(b=a.charCodeAt(e++).toString(16);b.length<2;)b="0"+b;c.push(" "+b),f++,f%32===0&&c.push("\n ")}returnc.join("")},hexstrdump:function(a){if(null===a)return"";for(varb,c=[],d=a.length,e=0;d>e;){for(b=a.charCodeAt(e++).toString(16);b.length<2;)b="0"+b;c.push(""+b)}returnc.join("")},hex2bin:function(a){for(varb="",c=0;c<a.length;c+=2)b+=String.fromCharCode(parseInt(a.substr(c,2),16));returnb},hexidump:function(a){for(varb,c=[],d=a.length,e=0;d>e;){for(b=a[e++].toString(16);b.length<2;)b="0"+b;c.push(""+b)}returnc.join("")},encode_utf8:function(a){returnunescape(encodeURIComponent(a))},decode_utf8:function(a){if("string"!=typeofa)thrownewError('Parameter "utf8" is not of type string');try{returndecodeURIComponent(escape(a))}catch(b){returna}},bin2str:function(a){for(varb=[],c=0;c<a.length;c++)b[c]=String.fromCharCode(a[c]);returnb.join("")},str2bin:function(a){for(varb=[],c=0;c<a.length;c++)b[c]=a.charCodeAt(c);returnb},str2Uint8Array:function(a){for(varb=newUint8Array(a.length),c=0;c<a.length;c++)b[c]=a.charCodeAt(c);returnb},Uint8Array2str:function(a){for(varb=[],c=0;c<a.length;c++)b[c]=String.fromCharCode(a[c]);returnb.join("")},calc_checksum:function(a){for(varb={s:0,add:function(a){this.s=(this.s+a)%65536}},c=0;c<a.length;c++)b.add(a.charCodeAt(c));returnb.s},print_debug:function(a){d.debug&&console.log(a)},print_debug_hexstr_dump:function(a,b){d.debug&&(a+=this.hexstrdump(b),console.log(a))},getLeftNBits:function(a,b){varc=b%8;if(0===c)returna.substring(0,b/8);vard=(b-c)/8+1,e=a.substring(0,d);returnthis.shiftRight(e,8-c)},shiftRight:function(a,b){varc=util.str2bin(a);if(b%8===0)returna;for(vard=c.length-1;d>=0;d--)c[d]>>=b%8,d>0&&(c[d]|=c[d-1]<<8-b%8&255);returnutil.bin2str(c)},get_hashAlgorithmString:function(a){switch(a){case1:return"MD5";case2:return"SHA1";case3:return"RIPEMD160";case8:return"SHA256";case9:return"SHA384";case10:return"SHA512";case11:return"SHA224"}return"unknown"},getWebCrypto:function(){if(d.useWebCrypto!==!1&&"undefined"!=typeofwindow){if(window.crypto)returnwindow.crypto.subtle||window.crypto.webkitSubtle;if(window.msCrypto)returnwindow.msCrypto.subtle}}}},{"./config":17}],77:[function(a,b,c){"use strict";functiond(a,b){b&&b.worker?this.worker=b.worker:this.worker=newWorker(a||"openpgp.worker.js"),this.worker.onmessage=this.onMessage.bind(this),this.worker.onerror=function(a){thrownewError("Unhandled error in openpgp worker: "+a.message+" ("+a.filename+":"+a.lineno+")")},this.seedRandom(i),this.tasks=[],b&&b.config&&this.worker.postMessage({event:"configure",config:b.config})}vare=a("../crypto"),f=a("../packet"),g=a("../key.js"),h=a("../type/keyid.js"),i=5e4,j=2e4;d.prototype.execute=function(a){varb=this,c=newPromise(function(c,d){a(),b.tasks.push({resolve:c,reject:d})});returnc},d.prototype.onMessage=function(a){varb=a.data;switch(b.event){case"method-return":b.err?this.tasks.shift().reject(newError(b.err)):this.tasks.shift().resolve(b.data);break;case"request-seed":this.seedRandom(j);break;default:thrownewError("Unknown Worker Event.")}},d.prototype.seedRandom=function(a){varb=this.getRandomBuffer(a);this.worker.postMessage({event:"seed-random",buf:b})},d.prototype.getRandomBuffer=function(a){if(!a)returnnull;varb=newUint8Array(a);returne.random.getRandomValues(b),b},d.prototype.terminate=function(){this.worker.terminate()},d.prototype.encryptMessage=function(a,b,c,d){vare=this;returne.execute(function(){a.length||(a=[a]),a=a.map(function(a){returna.toPacketlist()}),e.worker.postMessage({event:"encrypt-message",keys:a,text:b,format:c,filename:d})})},d.prototype.signAndEncryptMessage=function(a,b,c,d,e){varf=this;returnf.execute(function(){a.length||(a=[a]),a=a.map(function(a){returna.toPacketlist()}),b=b.toPacketlist(),f.worker.postMessage({event:"sign-and-encrypt-message",publicKeys:a,privateKey:b,text:c,format:d,filename:e})})},d.prototype.decryptMessage=function(a,b,c){vard=this;returnd.execute(function(){a=a.toPacketlist(),d.worker.postMessage({event:"decrypt-message",privateKey:a,message:b,format:c})})},d.prototype.decryptAndVerifyMessage=function(a,b,c,d){vare=this,f=newPromise(function(f,g){a=a.toPacketlist(),b.length||(b=[b]),b=b.map(function(a){returna.toPacketlist()}),e.worker.postMessage({event:"decrypt-and-verify-message",privateKey:a,publicKeys:b,message:c,format:d}),e.tasks.push({resolve:function(a){a.signatures=a.signatures.map(function(a){returna.keyid=h.fromClone(a.keyid),a}),f(a)},reject:g})});returnf},d.prototype.signClearMessage=function(a,b){varc=this;returnc.execute(function(){a.length||(a=[a]),a=a.map(function(a){returna.toPacketlist()}),c.worker.postMessage({event:"sign-clear-message",privateKeys:a,text:b})})},d.prototype.verifyClearSignedMessage=function(a,b){varc=this,d=newPromise(function(d,e){a.length||(a=[a]),a=a.map(function(a){returna.toPacketlist()}),c.worker.postMessage({event:"verify-clear-signed-message",publicKeys:a,message:b}),c.tasks.push({resolve:function(a){a.signatures=a.signatures.map(function(a){returna.keyid=h.fromClone(a.keyid),a}),d(a)},reject:e})});returnd},d.prototype.generateKeyPair=function(a){varb=this,c=newPromise(function(c,d){b.worker.postMessage({event:"generate-key-pair",options:a}),b.tasks.push({resolve:function(a){varb=f.List.fromStructuredClone(a.key);a.key=newg.Key(b),c(a)},reject:d})});returnc},d.prototype.decryptKey=function(a,b){varc=this,d=newPromise(function(d,e){a=a.toPacketlist(),c.worker.postMessage({event:"decrypt-key",privateKey:a,password:b}),c.tasks.push({resolve:function(a){varb=f.List.fromStructuredClone(a),a=newg.Key(b);d(a)},reject:e})});returnd},d.prototype.decryptKeyPacket=function(a,b,c){vard=this,e=newPromise(function(e,h){a=a.toPacketlist(),d.worker.postMessage({event:"decrypt-key-packet",privateKey:a,keyIds:b,password:c}),d.tasks.push({resolve:function(a){varb=f.List.fromStructuredClone(a),a=newg.Key(b);e(a)},reject:h})});returne},b.exports=d},{"../crypto":32,"../key.js":47,"../packet":55,"../type/keyid.js":73}]},{},[46])(46)});