hanewinpgp
Version:
PGP / GnuPG / OpenPGP Message Encryption in JavaScript by Herbert Hanewinkel.
8 lines • 79.1 kB
JavaScript
/*!
* hanewinpgp.browser - PGP / GnuPG / OpenPGP Message Encryption in JavaScript by Herbert Hanewinkel.
* @version v0.1.0
* @link https://github.com/dossy/hanewinpgp#readme
*/
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.hanewinpgp=f()}})(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}({1:[function(require,module,exports){"use strict";exports.byteLength=byteLength;exports.toByteArray=toByteArray;exports.fromByteArray=fromByteArray;var lookup=[];var revLookup=[];var Arr=typeof Uint8Array!=="undefined"?Uint8Array:Array;var code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var i=0,len=code.length;i<len;++i){lookup[i]=code[i];revLookup[code.charCodeAt(i)]=i}revLookup["-".charCodeAt(0)]=62;revLookup["_".charCodeAt(0)]=63;function placeHoldersCount(b64){var len=b64.length;if(len%4>0){throw new Error("Invalid string. Length must be a multiple of 4")}return b64[len-2]==="="?2:b64[len-1]==="="?1:0}function byteLength(b64){return b64.length*3/4-placeHoldersCount(b64)}function toByteArray(b64){var i,l,tmp,placeHolders,arr;var len=b64.length;placeHolders=placeHoldersCount(b64);arr=new Arr(len*3/4-placeHolders);l=placeHolders>0?len-4:len;var L=0;for(i=0;i<l;i+=4){tmp=revLookup[b64.charCodeAt(i)]<<18|revLookup[b64.charCodeAt(i+1)]<<12|revLookup[b64.charCodeAt(i+2)]<<6|revLookup[b64.charCodeAt(i+3)];arr[L++]=tmp>>16&255;arr[L++]=tmp>>8&255;arr[L++]=tmp&255}if(placeHolders===2){tmp=revLookup[b64.charCodeAt(i)]<<2|revLookup[b64.charCodeAt(i+1)]>>4;arr[L++]=tmp&255}else if(placeHolders===1){tmp=revLookup[b64.charCodeAt(i)]<<10|revLookup[b64.charCodeAt(i+1)]<<4|revLookup[b64.charCodeAt(i+2)]>>2;arr[L++]=tmp>>8&255;arr[L++]=tmp&255}return arr}function tripletToBase64(num){return lookup[num>>18&63]+lookup[num>>12&63]+lookup[num>>6&63]+lookup[num&63]}function encodeChunk(uint8,start,end){var tmp;var output=[];for(var i=start;i<end;i+=3){tmp=(uint8[i]<<16)+(uint8[i+1]<<8)+uint8[i+2];output.push(tripletToBase64(tmp))}return output.join("")}function fromByteArray(uint8){var tmp;var len=uint8.length;var extraBytes=len%3;var output="";var parts=[];var maxChunkLength=16383;for(var i=0,len2=len-extraBytes;i<len2;i+=maxChunkLength){parts.push(encodeChunk(uint8,i,i+maxChunkLength>len2?len2:i+maxChunkLength))}if(extraBytes===1){tmp=uint8[len-1];output+=lookup[tmp>>2];output+=lookup[tmp<<4&63];output+="=="}else if(extraBytes===2){tmp=(uint8[len-2]<<8)+uint8[len-1];output+=lookup[tmp>>10];output+=lookup[tmp>>4&63];output+=lookup[tmp<<2&63];output+="="}parts.push(output);return parts.join("")}},{}],2:[function(require,module,exports){"use strict";var base64=require("base64-js");var ieee754=require("ieee754");exports.Buffer=Buffer;exports.SlowBuffer=SlowBuffer;exports.INSPECT_MAX_BYTES=50;var K_MAX_LENGTH=2147483647;exports.kMaxLength=K_MAX_LENGTH;Buffer.TYPED_ARRAY_SUPPORT=typedArraySupport();if(!Buffer.TYPED_ARRAY_SUPPORT&&typeof console!=="undefined"&&typeof console.error==="function"){console.error("This browser lacks typed array (Uint8Array) support which is required by "+"`buffer` v5.x. Use `buffer` v4.x if you require old browser support.")}function typedArraySupport(){try{var arr=new Uint8Array(1);arr.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}};return arr.foo()===42}catch(e){return false}}function createBuffer(length){if(length>K_MAX_LENGTH){throw new RangeError("Invalid typed array length")}var buf=new Uint8Array(length);buf.__proto__=Buffer.prototype;return buf}function Buffer(arg,encodingOrOffset,length){if(typeof arg==="number"){if(typeof encodingOrOffset==="string"){throw new Error("If encoding is specified then the first argument must be a string")}return allocUnsafe(arg)}return from(arg,encodingOrOffset,length)}if(typeof Symbol!=="undefined"&&Symbol.species&&Buffer[Symbol.species]===Buffer){Object.defineProperty(Buffer,Symbol.species,{value:null,configurable:true,enumerable:false,writable:false})}Buffer.poolSize=8192;function from(value,encodingOrOffset,length){if(typeof value==="number"){throw new TypeError('"value" argument must not be a number')}if(isArrayBuffer(value)){return fromArrayBuffer(value,encodingOrOffset,length)}if(typeof value==="string"){return fromString(value,encodingOrOffset)}return fromObject(value)}Buffer.from=function(value,encodingOrOffset,length){return from(value,encodingOrOffset,length)};Buffer.prototype.__proto__=Uint8Array.prototype;Buffer.__proto__=Uint8Array;function assertSize(size){if(typeof size!=="number"){throw new TypeError('"size" argument must be a number')}else if(size<0){throw new RangeError('"size" argument must not be negative')}}function alloc(size,fill,encoding){assertSize(size);if(size<=0){return createBuffer(size)}if(fill!==undefined){return typeof encoding==="string"?createBuffer(size).fill(fill,encoding):createBuffer(size).fill(fill)}return createBuffer(size)}Buffer.alloc=function(size,fill,encoding){return alloc(size,fill,encoding)};function allocUnsafe(size){assertSize(size);return createBuffer(size<0?0:checked(size)|0)}Buffer.allocUnsafe=function(size){return allocUnsafe(size)};Buffer.allocUnsafeSlow=function(size){return allocUnsafe(size)};function fromString(string,encoding){if(typeof encoding!=="string"||encoding===""){encoding="utf8"}if(!Buffer.isEncoding(encoding)){throw new TypeError('"encoding" must be a valid string encoding')}var length=byteLength(string,encoding)|0;var buf=createBuffer(length);var actual=buf.write(string,encoding);if(actual!==length){buf=buf.slice(0,actual)}return buf}function fromArrayLike(array){var length=array.length<0?0:checked(array.length)|0;var buf=createBuffer(length);for(var i=0;i<length;i+=1){buf[i]=array[i]&255}return buf}function fromArrayBuffer(array,byteOffset,length){if(byteOffset<0||array.byteLength<byteOffset){throw new RangeError("'offset' is out of bounds")}if(array.byteLength<byteOffset+(length||0)){throw new RangeError("'length' is out of bounds")}var buf;if(byteOffset===undefined&&length===undefined){buf=new Uint8Array(array)}else if(length===undefined){buf=new Uint8Array(array,byteOffset)}else{buf=new Uint8Array(array,byteOffset,length)}buf.__proto__=Buffer.prototype;return buf}function fromObject(obj){if(Buffer.isBuffer(obj)){var len=checked(obj.length)|0;var buf=createBuffer(len);if(buf.length===0){return buf}obj.copy(buf,0,0,len);return buf}if(obj){if(isArrayBufferView(obj)||"length"in obj){if(typeof obj.length!=="number"||numberIsNaN(obj.length)){return createBuffer(0)}return fromArrayLike(obj)}if(obj.type==="Buffer"&&Array.isArray(obj.data)){return fromArrayLike(obj.data)}}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function checked(length){if(length>=K_MAX_LENGTH){throw new RangeError("Attempt to allocate Buffer larger than maximum "+"size: 0x"+K_MAX_LENGTH.toString(16)+" bytes")}return length|0}function SlowBuffer(length){if(+length!=length){length=0}return Buffer.alloc(+length)}Buffer.isBuffer=function isBuffer(b){return b!=null&&b._isBuffer===true};Buffer.compare=function compare(a,b){if(!Buffer.isBuffer(a)||!Buffer.isBuffer(b)){throw new TypeError("Arguments must be Buffers")}if(a===b)return 0;var x=a.length;var y=b.length;for(var i=0,len=Math.min(x,y);i<len;++i){if(a[i]!==b[i]){x=a[i];y=b[i];break}}if(x<y)return-1;if(y<x)return 1;return 0};Buffer.isEncoding=function isEncoding(encoding){switch(String(encoding).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return true;default:return false}};Buffer.concat=function concat(list,length){if(!Array.isArray(list)){throw new TypeError('"list" argument must be an Array of Buffers')}if(list.length===0){return Buffer.alloc(0)}var i;if(length===undefined){length=0;for(i=0;i<list.length;++i){length+=list[i].length}}var buffer=Buffer.allocUnsafe(length);var pos=0;for(i=0;i<list.length;++i){var buf=list[i];if(!Buffer.isBuffer(buf)){throw new TypeError('"list" argument must be an Array of Buffers')}buf.copy(buffer,pos);pos+=buf.length}return buffer};function byteLength(string,encoding){if(Buffer.isBuffer(string)){return string.length}if(isArrayBufferView(string)||isArrayBuffer(string)){return string.byteLength}if(typeof string!=="string"){string=""+string}var len=string.length;if(len===0)return 0;var loweredCase=false;for(;;){switch(encoding){case"ascii":case"latin1":case"binary":return len;case"utf8":case"utf-8":case undefined:return utf8ToBytes(string).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return len*2;case"hex":return len>>>1;case"base64":return base64ToBytes(string).length;default:if(loweredCase)return utf8ToBytes(string).length;encoding=(""+encoding).toLowerCase();loweredCase=true}}}Buffer.byteLength=byteLength;function slowToString(encoding,start,end){var loweredCase=false;if(start===undefined||start<0){start=0}if(start>this.length){return""}if(end===undefined||end>this.length){end=this.length}if(end<=0){return""}end>>>=0;start>>>=0;if(end<=start){return""}if(!encoding)encoding="utf8";while(true){switch(encoding){case"hex":return hexSlice(this,start,end);case"utf8":case"utf-8":return utf8Slice(this,start,end);case"ascii":return asciiSlice(this,start,end);case"latin1":case"binary":return latin1Slice(this,start,end);case"base64":return base64Slice(this,start,end);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,start,end);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase();loweredCase=true}}}Buffer.prototype._isBuffer=true;function swap(b,n,m){var i=b[n];b[n]=b[m];b[m]=i}Buffer.prototype.swap16=function swap16(){var len=this.length;if(len%2!==0){throw new RangeError("Buffer size must be a multiple of 16-bits")}for(var i=0;i<len;i+=2){swap(this,i,i+1)}return this};Buffer.prototype.swap32=function swap32(){var len=this.length;if(len%4!==0){throw new RangeError("Buffer size must be a multiple of 32-bits")}for(var i=0;i<len;i+=4){swap(this,i,i+3);swap(this,i+1,i+2)}return this};Buffer.prototype.swap64=function swap64(){var len=this.length;if(len%8!==0){throw new RangeError("Buffer size must be a multiple of 64-bits")}for(var i=0;i<len;i+=8){swap(this,i,i+7);swap(this,i+1,i+6);swap(this,i+2,i+5);swap(this,i+3,i+4)}return this};Buffer.prototype.toString=function toString(){var length=this.length;if(length===0)return"";if(arguments.length===0)return utf8Slice(this,0,length);return slowToString.apply(this,arguments)};Buffer.prototype.equals=function equals(b){if(!Buffer.isBuffer(b))throw new TypeError("Argument must be a Buffer");if(this===b)return true;return Buffer.compare(this,b)===0};Buffer.prototype.inspect=function inspect(){var str="";var max=exports.INSPECT_MAX_BYTES;if(this.length>0){str=this.toString("hex",0,max).match(/.{2}/g).join(" ");if(this.length>max)str+=" ... "}return"<Buffer "+str+">"};Buffer.prototype.compare=function compare(target,start,end,thisStart,thisEnd){if(!Buffer.isBuffer(target)){throw new TypeError("Argument must be a Buffer")}if(start===undefined){start=0}if(end===undefined){end=target?target.length:0}if(thisStart===undefined){thisStart=0}if(thisEnd===undefined){thisEnd=this.length}if(start<0||end>target.length||thisStart<0||thisEnd>this.length){throw new RangeError("out of range index")}if(thisStart>=thisEnd&&start>=end){return 0}if(thisStart>=thisEnd){return-1}if(start>=end){return 1}start>>>=0;end>>>=0;thisStart>>>=0;thisEnd>>>=0;if(this===target)return 0;var x=thisEnd-thisStart;var y=end-start;var len=Math.min(x,y);var thisCopy=this.slice(thisStart,thisEnd);var targetCopy=target.slice(start,end);for(var i=0;i<len;++i){if(thisCopy[i]!==targetCopy[i]){x=thisCopy[i];y=targetCopy[i];break}}if(x<y)return-1;if(y<x)return 1;return 0};function bidirectionalIndexOf(buffer,val,byteOffset,encoding,dir){if(buffer.length===0)return-1;if(typeof byteOffset==="string"){encoding=byteOffset;byteOffset=0}else if(byteOffset>2147483647){byteOffset=2147483647}else if(byteOffset<-2147483648){byteOffset=-2147483648}byteOffset=+byteOffset;if(numberIsNaN(byteOffset)){byteOffset=dir?0:buffer.length-1}if(byteOffset<0)byteOffset=buffer.length+byteOffset;if(byteOffset>=buffer.length){if(dir)return-1;else byteOffset=buffer.length-1}else if(byteOffset<0){if(dir)byteOffset=0;else return-1}if(typeof val==="string"){val=Buffer.from(val,encoding)}if(Buffer.isBuffer(val)){if(val.length===0){return-1}return arrayIndexOf(buffer,val,byteOffset,encoding,dir)}else if(typeof val==="number"){val=val&255;if(typeof Uint8Array.prototype.indexOf==="function"){if(dir){return Uint8Array.prototype.indexOf.call(buffer,val,byteOffset)}else{return Uint8Array.prototype.lastIndexOf.call(buffer,val,byteOffset)}}return arrayIndexOf(buffer,[val],byteOffset,encoding,dir)}throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(arr,val,byteOffset,encoding,dir){var indexSize=1;var arrLength=arr.length;var valLength=val.length;if(encoding!==undefined){encoding=String(encoding).toLowerCase();if(encoding==="ucs2"||encoding==="ucs-2"||encoding==="utf16le"||encoding==="utf-16le"){if(arr.length<2||val.length<2){return-1}indexSize=2;arrLength/=2;valLength/=2;byteOffset/=2}}function read(buf,i){if(indexSize===1){return buf[i]}else{return buf.readUInt16BE(i*indexSize)}}var i;if(dir){var foundIndex=-1;for(i=byteOffset;i<arrLength;i++){if(read(arr,i)===read(val,foundIndex===-1?0:i-foundIndex)){if(foundIndex===-1)foundIndex=i;if(i-foundIndex+1===valLength)return foundIndex*indexSize}else{if(foundIndex!==-1)i-=i-foundIndex;foundIndex=-1}}}else{if(byteOffset+valLength>arrLength)byteOffset=arrLength-valLength;for(i=byteOffset;i>=0;i--){var found=true;for(var j=0;j<valLength;j++){if(read(arr,i+j)!==read(val,j)){found=false;break}}if(found)return i}}return-1}Buffer.prototype.includes=function includes(val,byteOffset,encoding){return this.indexOf(val,byteOffset,encoding)!==-1};Buffer.prototype.indexOf=function indexOf(val,byteOffset,encoding){return bidirectionalIndexOf(this,val,byteOffset,encoding,true)};Buffer.prototype.lastIndexOf=function lastIndexOf(val,byteOffset,encoding){return bidirectionalIndexOf(this,val,byteOffset,encoding,false)};function hexWrite(buf,string,offset,length){offset=Number(offset)||0;var remaining=buf.length-offset;if(!length){length=remaining}else{length=Number(length);if(length>remaining){length=remaining}}var strLen=string.length;if(strLen%2!==0)throw new TypeError("Invalid hex string");if(length>strLen/2){length=strLen/2}for(var i=0;i<length;++i){var parsed=parseInt(string.substr(i*2,2),16);if(numberIsNaN(parsed))return i;buf[offset+i]=parsed}return i}function utf8Write(buf,string,offset,length){return blitBuffer(utf8ToBytes(string,buf.length-offset),buf,offset,length)}function asciiWrite(buf,string,offset,length){return blitBuffer(asciiToBytes(string),buf,offset,length)}function latin1Write(buf,string,offset,length){return asciiWrite(buf,string,offset,length)}function base64Write(buf,string,offset,length){return blitBuffer(base64ToBytes(string),buf,offset,length)}function ucs2Write(buf,string,offset,length){return blitBuffer(utf16leToBytes(string,buf.length-offset),buf,offset,length)}Buffer.prototype.write=function write(string,offset,length,encoding){if(offset===undefined){encoding="utf8";length=this.length;offset=0}else if(length===undefined&&typeof offset==="string"){encoding=offset;length=this.length;offset=0}else if(isFinite(offset)){offset=offset>>>0;if(isFinite(length)){length=length>>>0;if(encoding===undefined)encoding="utf8"}else{encoding=length;length=undefined}}else{throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported")}var remaining=this.length-offset;if(length===undefined||length>remaining)length=remaining;if(string.length>0&&(length<0||offset<0)||offset>this.length){throw new RangeError("Attempt to write outside buffer bounds")}if(!encoding)encoding="utf8";var loweredCase=false;for(;;){switch(encoding){case"hex":return hexWrite(this,string,offset,length);case"utf8":case"utf-8":return utf8Write(this,string,offset,length);case"ascii":return asciiWrite(this,string,offset,length);case"latin1":case"binary":return latin1Write(this,string,offset,length);case"base64":return base64Write(this,string,offset,length);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,string,offset,length);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(""+encoding).toLowerCase();loweredCase=true}}};Buffer.prototype.toJSON=function toJSON(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function base64Slice(buf,start,end){if(start===0&&end===buf.length){return base64.fromByteArray(buf)}else{return base64.fromByteArray(buf.slice(start,end))}}function utf8Slice(buf,start,end){end=Math.min(buf.length,end);var res=[];var i=start;while(i<end){var firstByte=buf[i];var codePoint=null;var bytesPerSequence=firstByte>239?4:firstByte>223?3:firstByte>191?2:1;if(i+bytesPerSequence<=end){var secondByte,thirdByte,fourthByte,tempCodePoint;switch(bytesPerSequence){case 1:if(firstByte<128){codePoint=firstByte}break;case 2:secondByte=buf[i+1];if((secondByte&192)===128){tempCodePoint=(firstByte&31)<<6|secondByte&63;if(tempCodePoint>127){codePoint=tempCodePoint}}break;case 3:secondByte=buf[i+1];thirdByte=buf[i+2];if((secondByte&192)===128&&(thirdByte&192)===128){tempCodePoint=(firstByte&15)<<12|(secondByte&63)<<6|thirdByte&63;if(tempCodePoint>2047&&(tempCodePoint<55296||tempCodePoint>57343)){codePoint=tempCodePoint}}break;case 4:secondByte=buf[i+1];thirdByte=buf[i+2];fourthByte=buf[i+3];if((secondByte&192)===128&&(thirdByte&192)===128&&(fourthByte&192)===128){tempCodePoint=(firstByte&15)<<18|(secondByte&63)<<12|(thirdByte&63)<<6|fourthByte&63;if(tempCodePoint>65535&&tempCodePoint<1114112){codePoint=tempCodePoint}}}}if(codePoint===null){codePoint=65533;bytesPerSequence=1}else if(codePoint>65535){codePoint-=65536;res.push(codePoint>>>10&1023|55296);codePoint=56320|codePoint&1023}res.push(codePoint);i+=bytesPerSequence}return decodeCodePointsArray(res)}var MAX_ARGUMENTS_LENGTH=4096;function decodeCodePointsArray(codePoints){var len=codePoints.length;if(len<=MAX_ARGUMENTS_LENGTH){return String.fromCharCode.apply(String,codePoints)}var res="";var i=0;while(i<len){res+=String.fromCharCode.apply(String,codePoints.slice(i,i+=MAX_ARGUMENTS_LENGTH))}return res}function asciiSlice(buf,start,end){var ret="";end=Math.min(buf.length,end);for(var i=start;i<end;++i){ret+=String.fromCharCode(buf[i]&127)}return ret}function latin1Slice(buf,start,end){var ret="";end=Math.min(buf.length,end);for(var i=start;i<end;++i){ret+=String.fromCharCode(buf[i])}return ret}function hexSlice(buf,start,end){var len=buf.length;if(!start||start<0)start=0;if(!end||end<0||end>len)end=len;var out="";for(var i=start;i<end;++i){out+=toHex(buf[i])}return out}function utf16leSlice(buf,start,end){var bytes=buf.slice(start,end);var res="";for(var i=0;i<bytes.length;i+=2){res+=String.fromCharCode(bytes[i]+bytes[i+1]*256)}return res}Buffer.prototype.slice=function slice(start,end){var len=this.length;start=~~start;end=end===undefined?len:~~end;if(start<0){start+=len;if(start<0)start=0}else if(start>len){start=len}if(end<0){end+=len;if(end<0)end=0}else if(end>len){end=len}if(end<start)end=start;var newBuf=this.subarray(start,end);newBuf.__proto__=Buffer.prototype;return newBuf};function checkOffset(offset,ext,length){if(offset%1!==0||offset<0)throw new RangeError("offset is not uint");if(offset+ext>length)throw new RangeError("Trying to access beyond buffer length")}Buffer.prototype.readUIntLE=function readUIntLE(offset,byteLength,noAssert){offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i<byteLength&&(mul*=256)){val+=this[offset+i]*mul}return val};Buffer.prototype.readUIntBE=function readUIntBE(offset,byteLength,noAssert){offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert){checkOffset(offset,byteLength,this.length)}var val=this[offset+--byteLength];var mul=1;while(byteLength>0&&(mul*=256)){val+=this[offset+--byteLength]*mul}return val};Buffer.prototype.readUInt8=function readUInt8(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,1,this.length);return this[offset]};Buffer.prototype.readUInt16LE=function readUInt16LE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,2,this.length);return this[offset]|this[offset+1]<<8};Buffer.prototype.readUInt16BE=function readUInt16BE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,2,this.length);return this[offset]<<8|this[offset+1]};Buffer.prototype.readUInt32LE=function readUInt32LE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,4,this.length);return(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+this[offset+3]*16777216};Buffer.prototype.readUInt32BE=function readUInt32BE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,4,this.length);return this[offset]*16777216+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])};Buffer.prototype.readIntLE=function readIntLE(offset,byteLength,noAssert){offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i<byteLength&&(mul*=256)){val+=this[offset+i]*mul}mul*=128;if(val>=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readIntBE=function readIntBE(offset,byteLength,noAssert){offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkOffset(offset,byteLength,this.length);var i=byteLength;var mul=1;var val=this[offset+--i];while(i>0&&(mul*=256)){val+=this[offset+--i]*mul}mul*=128;if(val>=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readInt8=function readInt8(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,1,this.length);if(!(this[offset]&128))return this[offset];return(255-this[offset]+1)*-1};Buffer.prototype.readInt16LE=function readInt16LE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt16BE=function readInt16BE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt32LE=function readInt32LE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,4,this.length);return this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24};Buffer.prototype.readInt32BE=function readInt32BE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,4,this.length);return this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]};Buffer.prototype.readFloatLE=function readFloatLE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,true,23,4)};Buffer.prototype.readFloatBE=function readFloatBE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,false,23,4)};Buffer.prototype.readDoubleLE=function readDoubleLE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,true,52,8)};Buffer.prototype.readDoubleBE=function readDoubleBE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,false,52,8)};function checkInt(buf,value,offset,ext,max,min){if(!Buffer.isBuffer(buf))throw new TypeError('"buffer" argument must be a Buffer instance');if(value>max||value<min)throw new RangeError('"value" argument is out of bounds');if(offset+ext>buf.length)throw new RangeError("Index out of range")}Buffer.prototype.writeUIntLE=function writeUIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert){var maxBytes=Math.pow(2,8*byteLength)-1;checkInt(this,value,offset,byteLength,maxBytes,0)}var mul=1;var i=0;this[offset]=value&255;while(++i<byteLength&&(mul*=256)){this[offset+i]=value/mul&255}return offset+byteLength};Buffer.prototype.writeUIntBE=function writeUIntBE(value,offset,byteLength,noAssert){value=+value;offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert){var maxBytes=Math.pow(2,8*byteLength)-1;checkInt(this,value,offset,byteLength,maxBytes,0)}var i=byteLength-1;var mul=1;this[offset+i]=value&255;while(--i>=0&&(mul*=256)){this[offset+i]=value/mul&255}return offset+byteLength};Buffer.prototype.writeUInt8=function writeUInt8(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,1,255,0);this[offset]=value&255;return offset+1};Buffer.prototype.writeUInt16LE=function writeUInt16LE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,65535,0);this[offset]=value&255;this[offset+1]=value>>>8;return offset+2};Buffer.prototype.writeUInt16BE=function writeUInt16BE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,65535,0);this[offset]=value>>>8;this[offset+1]=value&255;return offset+2};Buffer.prototype.writeUInt32LE=function writeUInt32LE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);this[offset+3]=value>>>24;this[offset+2]=value>>>16;this[offset+1]=value>>>8;this[offset]=value&255;return offset+4};Buffer.prototype.writeUInt32BE=function writeUInt32BE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value&255;return offset+4};Buffer.prototype.writeIntLE=function writeIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset>>>0;if(!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=0;var mul=1;var sub=0;this[offset]=value&255;while(++i<byteLength&&(mul*=256)){if(value<0&&sub===0&&this[offset+i-1]!==0){sub=1}this[offset+i]=(value/mul>>0)-sub&255}return offset+byteLength};Buffer.prototype.writeIntBE=function writeIntBE(value,offset,byteLength,noAssert){value=+value;offset=offset>>>0;if(!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=byteLength-1;var mul=1;var sub=0;this[offset+i]=value&255;while(--i>=0&&(mul*=256)){if(value<0&&sub===0&&this[offset+i+1]!==0){sub=1}this[offset+i]=(value/mul>>0)-sub&255}return offset+byteLength};Buffer.prototype.writeInt8=function writeInt8(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,1,127,-128);if(value<0)value=255+value+1;this[offset]=value&255;return offset+1};Buffer.prototype.writeInt16LE=function writeInt16LE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);this[offset]=value&255;this[offset+1]=value>>>8;return offset+2};Buffer.prototype.writeInt16BE=function writeInt16BE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);this[offset]=value>>>8;this[offset+1]=value&255;return offset+2};Buffer.prototype.writeInt32LE=function writeInt32LE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);this[offset]=value&255;this[offset+1]=value>>>8;this[offset+2]=value>>>16;this[offset+3]=value>>>24;return offset+4};Buffer.prototype.writeInt32BE=function writeInt32BE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(value<0)value=4294967295+value+1;this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value&255;return offset+4};function checkIEEE754(buf,value,offset,ext,max,min){if(offset+ext>buf.length)throw new RangeError("Index out of range");if(offset<0)throw new RangeError("Index out of range")}function writeFloat(buf,value,offset,littleEndian,noAssert){value=+value;offset=offset>>>0;if(!noAssert){checkIEEE754(buf,value,offset,4,3.4028234663852886e38,-3.4028234663852886e38)}ieee754.write(buf,value,offset,littleEndian,23,4);return offset+4}Buffer.prototype.writeFloatLE=function writeFloatLE(value,offset,noAssert){return writeFloat(this,value,offset,true,noAssert)};Buffer.prototype.writeFloatBE=function writeFloatBE(value,offset,noAssert){return writeFloat(this,value,offset,false,noAssert)};function writeDouble(buf,value,offset,littleEndian,noAssert){value=+value;offset=offset>>>0;if(!noAssert){checkIEEE754(buf,value,offset,8,1.7976931348623157e308,-1.7976931348623157e308)}ieee754.write(buf,value,offset,littleEndian,52,8);return offset+8}Buffer.prototype.writeDoubleLE=function writeDoubleLE(value,offset,noAssert){return writeDouble(this,value,offset,true,noAssert)};Buffer.prototype.writeDoubleBE=function writeDoubleBE(value,offset,noAssert){return writeDouble(this,value,offset,false,noAssert)};Buffer.prototype.copy=function copy(target,targetStart,start,end){if(!start)start=0;if(!end&&end!==0)end=this.length;if(targetStart>=target.length)targetStart=target.length;if(!targetStart)targetStart=0;if(end>0&&end<start)end=start;if(end===start)return 0;if(target.length===0||this.length===0)return 0;if(targetStart<0){throw new RangeError("targetStart out of bounds")}if(start<0||start>=this.length)throw new RangeError("sourceStart out of bounds");if(end<0)throw new RangeError("sourceEnd out of bounds");if(end>this.length)end=this.length;if(target.length-targetStart<end-start){end=target.length-targetStart+start}var len=end-start;var i;if(this===target&&start<targetStart&&targetStart<end){for(i=len-1;i>=0;--i){target[i+targetStart]=this[i+start]}}else if(len<1e3){for(i=0;i<len;++i){target[i+targetStart]=this[i+start]}}else{Uint8Array.prototype.set.call(target,this.subarray(start,start+len),targetStart)}return len};Buffer.prototype.fill=function fill(val,start,end,encoding){if(typeof val==="string"){if(typeof start==="string"){encoding=start;start=0;end=this.length}else if(typeof end==="string"){encoding=end;end=this.length}if(val.length===1){var code=val.charCodeAt(0);if(code<256){val=code}}if(encoding!==undefined&&typeof encoding!=="string"){throw new TypeError("encoding must be a string")}if(typeof encoding==="string"&&!Buffer.isEncoding(encoding)){throw new TypeError("Unknown encoding: "+encoding)}}else if(typeof val==="number"){val=val&255}if(start<0||this.length<start||this.length<end){throw new RangeError("Out of range index")}if(end<=start){return this}start=start>>>0;end=end===undefined?this.length:end>>>0;if(!val)val=0;var i;if(typeof val==="number"){for(i=start;i<end;++i){this[i]=val}}else{var bytes=Buffer.isBuffer(val)?val:new Buffer(val,encoding);var len=bytes.length;for(i=0;i<end-start;++i){this[i+start]=bytes[i%len]}}return this};var INVALID_BASE64_RE=/[^+\/0-9A-Za-z-_]/g;function base64clean(str){str=str.trim().replace(INVALID_BASE64_RE,"");if(str.length<2)return"";while(str.length%4!==0){str=str+"="}return str}function toHex(n){if(n<16)return"0"+n.toString(16);return n.toString(16)}function utf8ToBytes(string,units){units=units||Infinity;var codePoint;var length=string.length;var leadSurrogate=null;var bytes=[];for(var i=0;i<length;++i){codePoint=string.charCodeAt(i);if(codePoint>55295&&codePoint<57344){if(!leadSurrogate){if(codePoint>56319){if((units-=3)>-1)bytes.push(239,191,189);continue
}else if(i+1===length){if((units-=3)>-1)bytes.push(239,191,189);continue}leadSurrogate=codePoint;continue}if(codePoint<56320){if((units-=3)>-1)bytes.push(239,191,189);leadSurrogate=codePoint;continue}codePoint=(leadSurrogate-55296<<10|codePoint-56320)+65536}else if(leadSurrogate){if((units-=3)>-1)bytes.push(239,191,189)}leadSurrogate=null;if(codePoint<128){if((units-=1)<0)break;bytes.push(codePoint)}else if(codePoint<2048){if((units-=2)<0)break;bytes.push(codePoint>>6|192,codePoint&63|128)}else if(codePoint<65536){if((units-=3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,codePoint&63|128)}else if(codePoint<1114112){if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,codePoint&63|128)}else{throw new Error("Invalid code point")}}return bytes}function asciiToBytes(str){var byteArray=[];for(var i=0;i<str.length;++i){byteArray.push(str.charCodeAt(i)&255)}return byteArray}function utf16leToBytes(str,units){var c,hi,lo;var byteArray=[];for(var i=0;i<str.length;++i){if((units-=2)<0)break;c=str.charCodeAt(i);hi=c>>8;lo=c%256;byteArray.push(lo);byteArray.push(hi)}return byteArray}function base64ToBytes(str){return base64.toByteArray(base64clean(str))}function blitBuffer(src,dst,offset,length){for(var i=0;i<length;++i){if(i+offset>=dst.length||i>=src.length)break;dst[i+offset]=src[i]}return i}function isArrayBuffer(obj){return obj instanceof ArrayBuffer||obj!=null&&obj.constructor!=null&&obj.constructor.name==="ArrayBuffer"&&typeof obj.byteLength==="number"}function isArrayBufferView(obj){return typeof ArrayBuffer.isView==="function"&&ArrayBuffer.isView(obj)}function numberIsNaN(obj){return obj!==obj}},{"base64-js":1,ieee754:3}],3:[function(require,module,exports){exports.read=function(buffer,offset,isLE,mLen,nBytes){var e,m;var eLen=nBytes*8-mLen-1;var eMax=(1<<eLen)-1;var eBias=eMax>>1;var nBits=-7;var i=isLE?nBytes-1:0;var d=isLE?-1:1;var s=buffer[offset+i];i+=d;e=s&(1<<-nBits)-1;s>>=-nBits;nBits+=eLen;for(;nBits>0;e=e*256+buffer[offset+i],i+=d,nBits-=8){}m=e&(1<<-nBits)-1;e>>=-nBits;nBits+=mLen;for(;nBits>0;m=m*256+buffer[offset+i],i+=d,nBits-=8){}if(e===0){e=1-eBias}else if(e===eMax){return m?NaN:(s?-1:1)*Infinity}else{m=m+Math.pow(2,mLen);e=e-eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)};exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var e,m,c;var eLen=nBytes*8-mLen-1;var eMax=(1<<eLen)-1;var eBias=eMax>>1;var rt=mLen===23?Math.pow(2,-24)-Math.pow(2,-77):0;var i=isLE?0:nBytes-1;var d=isLE?1:-1;var s=value<0||value===0&&1/value<0?1:0;value=Math.abs(value);if(isNaN(value)||value===Infinity){m=isNaN(value)?1:0;e=eMax}else{e=Math.floor(Math.log(value)/Math.LN2);if(value*(c=Math.pow(2,-e))<1){e--;c*=2}if(e+eBias>=1){value+=rt/c}else{value+=rt*Math.pow(2,1-eBias)}if(value*c>=2){e++;c/=2}if(e+eBias>=eMax){m=0;e=eMax}else if(e+eBias>=1){m=(value*c-1)*Math.pow(2,mLen);e=e+eBias}else{m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen);e=0}}for(;mLen>=8;buffer[offset+i]=m&255,i+=d,m/=256,mLen-=8){}e=e<<mLen|m;eLen+=mLen;for(;eLen>0;buffer[offset+i]=e&255,i+=d,e/=256,eLen-=8){}buffer[offset+i-d]|=s*128}},{}],4:[function(require,module,exports){(function(root){"use strict";var GLOBAL_KEY="Random";var imul=typeof Math.imul!=="function"||Math.imul(4294967295,5)!==-5?function(a,b){var ah=a>>>16&65535;var al=a&65535;var bh=b>>>16&65535;var bl=b&65535;return al*bl+(ah*bl+al*bh<<16>>>0)|0}:Math.imul;var stringRepeat=typeof String.prototype.repeat==="function"&&"x".repeat(3)==="xxx"?function(x,y){return x.repeat(y)}:function(pattern,count){var result="";while(count>0){if(count&1){result+=pattern}count>>=1;pattern+=pattern}return result};function Random(engine){if(!(this instanceof Random)){return new Random(engine)}if(engine==null){engine=Random.engines.nativeMath}else if(typeof engine!=="function"){throw new TypeError("Expected engine to be a function, got "+typeof engine)}this.engine=engine}var proto=Random.prototype;Random.engines={nativeMath:function(){return Math.random()*4294967296|0},mt19937:function(Int32Array){function refreshData(data){var k=0;var tmp=0;for(;(k|0)<227;k=k+1|0){tmp=data[k]&2147483648|data[k+1|0]&2147483647;data[k]=data[k+397|0]^tmp>>>1^(tmp&1?2567483615:0)}for(;(k|0)<623;k=k+1|0){tmp=data[k]&2147483648|data[k+1|0]&2147483647;data[k]=data[k-227|0]^tmp>>>1^(tmp&1?2567483615:0)}tmp=data[623]&2147483648|data[0]&2147483647;data[623]=data[396]^tmp>>>1^(tmp&1?2567483615:0)}function temper(value){value^=value>>>11;value^=value<<7&2636928640;value^=value<<15&4022730752;return value^value>>>18}function seedWithArray(data,source){var i=1;var j=0;var sourceLength=source.length;var k=Math.max(sourceLength,624)|0;var previous=data[0]|0;for(;(k|0)>0;--k){data[i]=previous=(data[i]^imul(previous^previous>>>30,1664525))+(source[j]|0)+(j|0)|0;i=i+1|0;++j;if((i|0)>623){data[0]=data[623];i=1}if(j>=sourceLength){j=0}}for(k=623;(k|0)>0;--k){data[i]=previous=(data[i]^imul(previous^previous>>>30,1566083941))-i|0;i=i+1|0;if((i|0)>623){data[0]=data[623];i=1}}data[0]=2147483648}function mt19937(){var data=new Int32Array(624);var index=0;var uses=0;function next(){if((index|0)>=624){refreshData(data);index=0}var value=data[index];index=index+1|0;uses+=1;return temper(value)|0}next.getUseCount=function(){return uses};next.discard=function(count){uses+=count;if((index|0)>=624){refreshData(data);index=0}while(count-index>624){count-=624-index;refreshData(data);index=0}index=index+count|0;return next};next.seed=function(initial){var previous=0;data[0]=previous=initial|0;for(var i=1;i<624;i=i+1|0){data[i]=previous=imul(previous^previous>>>30,1812433253)+i|0}index=624;uses=0;return next};next.seedWithArray=function(source){next.seed(19650218);seedWithArray(data,source);return next};next.autoSeed=function(){return next.seedWithArray(Random.generateEntropyArray())};return next}return mt19937}(typeof Int32Array==="function"?Int32Array:Array),browserCrypto:typeof crypto!=="undefined"&&typeof crypto.getRandomValues==="function"&&typeof Int32Array==="function"?function(){var data=null;var index=128;return function(){if(index>=128){if(data===null){data=new Int32Array(128)}crypto.getRandomValues(data);index=0}return data[index++]|0}}():null};Random.generateEntropyArray=function(){var array=[];var engine=Random.engines.nativeMath;for(var i=0;i<16;++i){array[i]=engine()|0}array.push((new Date).getTime()|0);return array};function returnValue(value){return function(){return value}}Random.int32=function(engine){return engine()|0};proto.int32=function(){return Random.int32(this.engine)};Random.uint32=function(engine){return engine()>>>0};proto.uint32=function(){return Random.uint32(this.engine)};Random.uint53=function(engine){var high=engine()&2097151;var low=engine()>>>0;return high*4294967296+low};proto.uint53=function(){return Random.uint53(this.engine)};Random.uint53Full=function(engine){while(true){var high=engine()|0;if(high&2097152){if((high&4194303)===2097152&&(engine()|0)===0){return 9007199254740992}}else{var low=engine()>>>0;return(high&2097151)*4294967296+low}}};proto.uint53Full=function(){return Random.uint53Full(this.engine)};Random.int53=function(engine){var high=engine()|0;var low=engine()>>>0;return(high&2097151)*4294967296+low+(high&2097152?-9007199254740992:0)};proto.int53=function(){return Random.int53(this.engine)};Random.int53Full=function(engine){while(true){var high=engine()|0;if(high&4194304){if((high&8388607)===4194304&&(engine()|0)===0){return 9007199254740992}}else{var low=engine()>>>0;return(high&2097151)*4294967296+low+(high&2097152?-9007199254740992:0)}}};proto.int53Full=function(){return Random.int53Full(this.engine)};function add(generate,addend){if(addend===0){return generate}else{return function(engine){return generate(engine)+addend}}}Random.integer=function(){function isPowerOfTwoMinusOne(value){return(value+1&value)===0}function bitmask(masking){return function(engine){return engine()&masking}}function downscaleToLoopCheckedRange(range){var extendedRange=range+1;var maximum=extendedRange*Math.floor(4294967296/extendedRange);return function(engine){var value=0;do{value=engine()>>>0}while(value>=maximum);return value%extendedRange}}function downscaleToRange(range){if(isPowerOfTwoMinusOne(range)){return bitmask(range)}else{return downscaleToLoopCheckedRange(range)}}function isEvenlyDivisibleByMaxInt32(value){return(value|0)===0}function upscaleWithHighMasking(masking){return function(engine){var high=engine()&masking;var low=engine()>>>0;return high*4294967296+low}}function upscaleToLoopCheckedRange(extendedRange){var maximum=extendedRange*Math.floor(9007199254740992/extendedRange);return function(engine){var ret=0;do{var high=engine()&2097151;var low=engine()>>>0;ret=high*4294967296+low}while(ret>=maximum);return ret%extendedRange}}function upscaleWithinU53(range){var extendedRange=range+1;if(isEvenlyDivisibleByMaxInt32(extendedRange)){var highRange=(extendedRange/4294967296|0)-1;if(isPowerOfTwoMinusOne(highRange)){return upscaleWithHighMasking(highRange)}}return upscaleToLoopCheckedRange(extendedRange)}function upscaleWithinI53AndLoopCheck(min,max){return function(engine){var ret=0;do{var high=engine()|0;var low=engine()>>>0;ret=(high&2097151)*4294967296+low+(high&2097152?-9007199254740992:0)}while(ret<min||ret>max);return ret}}return function(min,max){min=Math.floor(min);max=Math.floor(max);if(min<-9007199254740992||!isFinite(min)){throw new RangeError("Expected min to be at least "+-9007199254740992)}else if(max>9007199254740992||!isFinite(max)){throw new RangeError("Expected max to be at most "+9007199254740992)}var range=max-min;if(range<=0||!isFinite(range)){return returnValue(min)}else if(range===4294967295){if(min===0){return Random.uint32}else{return add(Random.int32,min+2147483648)}}else if(range<4294967295){return add(downscaleToRange(range),min)}else if(range===9007199254740991){return add(Random.uint53,min)}else if(range<9007199254740991){return add(upscaleWithinU53(range),min)}else if(max-1-min===9007199254740991){return add(Random.uint53Full,min)}else if(min===-9007199254740992&&max===9007199254740992){return Random.int53Full}else if(min===-9007199254740992&&max===9007199254740991){return Random.int53}else if(min===-9007199254740991&&max===9007199254740992){return add(Random.int53,1)}else if(max===9007199254740992){return add(upscaleWithinI53AndLoopCheck(min-1,max-1),1)}else{return upscaleWithinI53AndLoopCheck(min,max)}}}();proto.integer=function(min,max){return Random.integer(min,max)(this.engine)};Random.realZeroToOneInclusive=function(engine){return Random.uint53Full(engine)/9007199254740992};proto.realZeroToOneInclusive=function(){return Random.realZeroToOneInclusive(this.engine)};Random.realZeroToOneExclusive=function(engine){return Random.uint53(engine)/9007199254740992};proto.realZeroToOneExclusive=function(){return Random.realZeroToOneExclusive(this.engine)};Random.real=function(){function multiply(generate,multiplier){if(multiplier===1){return generate}else if(multiplier===0){return function(){return 0}}else{return function(engine){return generate(engine)*multiplier}}}return function(left,right,inclusive){if(!isFinite(left)){throw new RangeError("Expected left to be a finite number")}else if(!isFinite(right)){throw new RangeError("Expected right to be a finite number")}return add(multiply(inclusive?Random.realZeroToOneInclusive:Random.realZeroToOneExclusive,right-left),left)}}();proto.real=function(min,max,inclusive){return Random.real(min,max,inclusive)(this.engine)};Random.bool=function(){function isLeastBitTrue(engine){return(engine()&1)===1}function lessThan(generate,value){return function(engine){return generate(engine)<value}}function probability(percentage){if(percentage<=0){return returnValue(false)}else if(percentage>=1){return returnValue(true)}else{var scaled=percentage*4294967296;if(scaled%1===0){return lessThan(Random.int32,scaled-2147483648|0)}else{return lessThan(Random.uint53,Math.round(percentage*9007199254740992))}}}return function(numerator,denominator){if(denominator==null){if(numerator==null){return isLeastBitTrue}return probability(numerator)}else{if(numerator<=0){return returnValue(false)}else if(numerator>=denominator){return returnValue(true)}return lessThan(Random.integer(0,denominator-1),numerator)}}}();proto.bool=function(numerator,denominator){return Random.bool(numerator,denominator)(this.engine)};function toInteger(value){var number=+value;if(number<0){return Math.ceil(number)}else{return Math.floor(number)}}function convertSliceArgument(value,length){if(value<0){return Math.max(value+length,0)}else{return Math.min(value,length)}}Random.pick=function(engine,array,begin,end){var length=array.length;var start=begin==null?0:convertSliceArgument(toInteger(begin),length);var finish=end===void 0?length:convertSliceArgument(toInteger(end),length);if(start>=finish){return void 0}var distribution=Random.integer(start,finish-1);return array[distribution(engine)]};proto.pick=function(array,begin,end){return Random.pick(this.engine,array,begin,end)};function returnUndefined(){return void 0}var slice=Array.prototype.slice;Random.picker=function(array,begin,end){var clone=slice.call(array,begin,end);if(!clone.length){return returnUndefined}var distribution=Random.integer(0,clone.length-1);return function(engine){return clone[distribution(engine)]}};Random.shuffle=function(engine,array,downTo){var length=array.length;if(length){if(downTo==null){downTo=0}for(var i=length-1>>>0;i>downTo;--i){var distribution=Random.integer(0,i);var j=distribution(engine);if(i!==j){var tmp=array[i];array[i]=array[j];array[j]=tmp}}}return array};proto.shuffle=function(array){return Random.shuffle(this.engine,array)};Random.sample=function(engine,population,sampleSize){if(sampleSize<0||sampleSize>population.length||!isFinite(sampleSize)){throw new RangeError("Expected sampleSize to be within 0 and the length of the population")}if(sampleSize===0){return[]}var clone=slice.call(population);var length=clone.length;if(length===sampleSize){return Random.shuffle(engine,clone,0)}var tailLength=length-sampleSize;return Random.shuffle(engine,clone,tailLength-1).slice(tailLength)};proto.sample=function(population,sampleSize){return Random.sample(this.engine,population,sampleSize)};Random.die=function(sideCount){return Random.integer(1,sideCount)};proto.die=function(sideCount){return Random.die(sideCount)(this.engine)};Random.dice=function(sideCount,dieCount){var distribution=Random.die(sideCount);return function(engine){var result=[];result.length=dieCount;for(var i=0;i<dieCount;++i){result[i]=distribution(engine)}return result}};proto.dice=function(sideCount,dieCount){return Random.dice(sideCount,dieCount)(this.engine)};Random.uuid4=function(){function zeroPad(string,zeroCount){return stringRepeat("0",zeroCount-string.length)+string}return function(engine){var a=engine()>>>0;var b=engine()|0;var c=engine()|0;var d=engine()>>>0;return zeroPad(a.toString(16),8)+"-"+zeroPad((b&65535).toString(16),4)+"-"+zeroPad((b>>4&4095|16384).toString(16),4)+"-"+zeroPad((c&16383|32768).toString(16),4)+"-"+zeroPad((c>>4&65535).toString(16),4)+zeroPad(d.toString(16),8)}}();proto.uuid4=function(){return Random.uuid4(this.engine)};Random.string=function(){var DEFAULT_STRING_POOL="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-";return function(pool){if(pool==null){pool=DEFAULT_STRING_POOL}var length=pool.length;if(!length){throw new Error("Expected pool not to be an empty string")}var distribution=Random.integer(0,length-1);return function(engine,length){var result="";for(var i=0;i<length;++i){var j=distribution(engine);result+=pool.charAt(j)}return result}}}();proto.string=function(length,pool){return Random.string(pool)(this.engine,length)};Random.hex=function(){var LOWER_HEX_POOL="0123456789abcdef";var lowerHex=Random.string(LOWER_HEX_POOL);var upperHex=Random.string(LOWER_HEX_POOL.toUpperCase());return function(upper){if(upper){return upperHex}else{return lowerHex}}}();proto.hex=function(length,upper){return Random.hex(upper)(this.engine,length)};Random.date=function(start,end){if(!(start instanceof Date)){throw new TypeError("Expected start to be a Date, got "+typeof start)}else if(!(end instanceof Date)){throw new TypeError("Expected end to be a Date, got "+typeof end)}var distribution=Random.integer(start.getTime(),end.getTime());return function(engine){return new Date(distribution(engine))}};proto.date=function(start,end){return Random.date(start,end)(this.engine)};if(typeof define==="function"&&define.amd){define(function(){return Random})}else if(typeof module!=="undefined"&&typeof require==="function"){module.exports=Random}else{(function(){var oldGlobal=root[GLOBAL_KEY];Random.noConflict=function(){root[GLOBAL_KEY]=oldGlobal;return this}})();root[GLOBAL_KEY]=Random}})(this)},{}],hanewinpgp:[function(require,module,exports){(function(Buffer){var VERSION="0.1.0";"use strict";var randomByte;try{var crypto=require("crypto");randomByte=function(){return crypto.randomBytes(1)[0]}}catch(e){var Random=require("random-js");randomByte=Random.engines.browserCrypto?function(){return Random.integer(0,255)(Random.engines.browserCrypto)}:function(){return Random.integer(0,255)(Random.engines.nativeMath)}}var randomString=function(len,noNulls){var r=[],t;for(var i=0;i<len;){t=randomByte();if(t==0&&noNulls)continue;i++;r.push(String.fromCharCode(t))}return r.join("")};function hex2s(hex){var r="";if(hex.length%2)hex+="0";for(var i=0;i<hex.length;i+=2)r+=String.fromCharCode(parseInt(hex.slice(i,i+2),16));return r}function crc24(data){var crc=11994318;for(var n=0;n<data.length;n++){crc^=(data.charCodeAt(n)&255)<<16;for(var i=0;i<8;i++){crc<<=1;if(crc&16777216)crc^=25578747}}return String.fromCharCode(crc>>16&255)+String.fromCharCode(crc>>8&255)+String.fromCharCode(crc&255)}function GPGencrypt(key,text){var i,n;var len=text.length;var lsk=key.length;var bpbl=16;var iblock=new Array(bpbl);var rblock=new Array(bpbl);var ct=new Array(bpbl+2);var expandedKey=keyExpansion(key);var ciphertext=[];if(len%bpbl){for(i=len%bpbl;i<bpbl;i++){text+="\0"}}for(i=0;i<bpbl;i++){iblock[i]=0;rblock[i]=randomByte()}iblock=AESencrypt(iblock,expandedKey);for(i=0;i<bpbl;i++){ct[i]=iblock[i]^=rblock[i]}iblock=AESencrypt(iblock,expandedKey);ct[bpbl]=iblock[0]^rblock[bpbl-2];ct[bpbl+1]=iblock[1]^rblock[bpbl-1];for(i=0;i<bpbl+2;i++){ciphertext.push(String.fromCharCode(ct[i]))}iblock=ct.slice(2,bpbl+2);for(n=0;n<text.length;n+=bpbl){iblock=AESencrypt(iblock,expandedKey);for(i=0;i<bpbl;i++){iblock[i]^=text.charCodeAt(n+i);ciphertext.push(String.fromCharCode(iblock[i]))}}return ciphertext.slice(0,len+bpbl+2).join("")}function GPGpkt(tag,len){var h=[128+((tag&15)<<2)+(len>255)+(len>65535)];if(len>65535){h.push((len&4278190080)>>>24);h.push((len&16711680)>>>16)}if(len>255){h.push((len&65280)>>>8)}h.push(len&255);return h.map(function(el){return String.fromCharCode(el)}).join("")}function GPGpkesk(keyId,keytyp,symAlgo,sessionkey,pkey){var el=[3,5,9,17,513,2049,4097,8193];var s=r2s(pkey);var l=Math.floor((s.charCodeAt(0)*256+s.charCodeAt(1)+7)/8);var mod=mpi2b(s.substr(0,l+2));var exp=new Array;if(keytyp){var grp=new Array;var y=new Array;var B=new Array;var C=new Array;var l2=Math.floor((s.charCodeAt(l+2)*256+s.charCodeAt(l+3)+7)/8)+2;grp=mpi2b(s.substr(l+2,l2));y=mpi2b(s.substr(l+2+l2));exp[0]=9;B=bmodexp(grp,exp,mod);C=bmodexp(y,exp,mod)}else{exp=mpi2b(s.substr(l+2))}var lsk=sessionkey.length;var c=0;for(var i=0;i<lsk;i++)c+=sessionkey.charCodeAt(i);c&=65535;var lm=(l-2)*8+2;var m=String.fromCharCode(lm/256)+String.fromCharCode(lm%256)+String.fromCharCode(2)+randomString(l-lsk-6,1)+"\0"+String.fromCharCode(symAlgo)+sessionkey+String.fromCharCode(c/256)+String.fromCharCode(c&255);if(keytyp){var enc=b2mpi(B)+b2mpi(bmod(bmul(mpi2b(m),C),mod));return GPGpkt(1,enc.length+10)+String.fromCharCode(3)+keyId+String.fromCharCode(16)+enc}else{var enc=b2mpi(bmodexp(mpi2b(m),exp,mod));return GPGpkt(1,enc.length+10)+String.fromCharCode(3)+keyId+String.fromCharCode(1)+enc}}function GPGsed(key,data){var ld=GPGld(data);var enc=GPGencrypt(key,ld);var pkt=GPGpkt(9,enc.length)+enc;return pkt}function GPGld(data,type){type=type||0;return GPGpkt(11,data.length+10)+["b","t","u"][type]+String.fromCharCode(4)+"file"+"\0\0\0\0"+data.map(function(el){return String.fromCharCode(el)}).join("")}module.exports.encrypt=function(key,message){if(typeof navigator!="undefined"&&/MSIE [0-8]\.[0-9]+/.test(navigator.appVersion)){throw new Error("IE8 and older not supported.")}var arr=message;if(typeof arr=="string"){arr=Buffer.from(arr,"utf8")}if(typeof arr=="object"&&!(arr instanceof Array)){arr=Array.prototype.slice.call(arr,0)}var symAlg=7;var kSize=[16,24,32];var keylen=kSize[symAlg-7];var sesskey=randomString(keylen,0);var keyId=hex2s(key.id);var cp=GPGpkesk(keyId,key.type,symAlg,sesskey,key.key)+GPGsed(sesskey,arr);return["-----BEGIN PGP MESSAGE-----","Version: hanewinpgp v"+VERSION,"",s2r(cp),"="+s2r(crc24(cp)),"-----END PGP MESSAGE-----"].join("\n")};"use strict";function s2hex(s){var result="";for(var i=0;i<s.length;i++){var c=s.charCodeAt(i);result+=(c<16?"0":"")+c.toString(16)}return result}function getPublicKey(text){var found=0,len;var i=text.indexOf("-----BEGIN PGP PUBLIC KEY BLOCK-----");if(i==-1){alert("No PGP Public Key Block");this.vers="";this.fp="";this.keyid="";this.user="";this.pkey="";return}var a=text.indexOf("\n\n",i);if(a>0)a+=2;else{a=text.indexOf("\n\r\n",i);if(a>0)a+=3}var e=text.indexOf("\n=",i);if(a>0&&e>0)text=text.slice(a,e);else{alert("Invalid PGP Public Key Block");this.vers="";this.fp="";this.keyid="";this.user="";this.pkey="";return}var s=r2s(text);for(var i=0;i<s.length;){var tag=s.charCodeAt(i++);if((tag&128)==0)break;if(tag&64){tag&=63;len=s.charCodeAt(i++);if(len>191&&len<224)len=(len-192<<8)+s.charCodeAt(i++);else if(len==255)len=(s.charCodeAt(i++)<<24)+(s.charCodeAt(i++)<<16)+(s.charCodeAt(i++)<<8)+s.charCodeAt(i++);else if(len>223&&len<255)len=1<<(len&31)}else{len=tag&3;tag=tag>>2&15;if(len==0)len=s.charCodeAt(i++);else if(len==1)len=(s.charCodeAt(i++)<<8)+s.charCodeAt(i++);else if(len==2)len=(s.charCodeAt(i++)<<24)+(s.charCodeAt(i++)<<16)+(s.charCodeAt(i++)<<8)+s.charCodeAt(i++);else len=s.length-1}if(tag==6||tag==14){var k=i;var vers=s.charCodeAt(i++);found=1;this.vers=vers;var time=(s.charCodeAt(i++)<<24)+(s.charCodeAt(i++)<<16)+(s.charCodeAt(i++)<<8)+s.charCodeAt(i++);if(vers==2||vers==3)var valid=s.charCodeAt(i++)<<8+s.charCodeAt(i++);var algo=s.charCodeAt(i++);if(algo==1||algo==2){var m=i;var lm=Math.floor((s.charCodeAt(i)*256+s.charCodeAt(i+1)+7)/8);i+=lm+2;var mod=s.substr(m,lm+2);var le=Math.floor((s.charCodeAt(i)*256+s.charCodeAt(i+1)+7)/8);i+=le+2;this.pkey=s2r(s.substr(m,lm+le+4));this.type="RSA";if(vers==3){this.fp="";this.keyid=s2hex(mod.substr(mod.length-8,8))}else if(vers==4){var pkt=String.fromCharCode(153)+String.fromCharCode(len>>8)+String.fromCharCode(len&255)+s.substr(k,len);var fp=str_sha1(pkt);this.fp=s2hex(fp);this.keyid=s2hex(fp.substr(fp.length-8,8))}else{this.fp="";this.keyid=""}found=2}else if((algo==16||algo==20)&&vers==4){var m=i;var lp=Math.floor((s.charCodeAt(i)*256+s.charCodeAt(i+1)+7)/8);i+=lp+2;var lg=Math.floor((s.charCodeAt(i)*256+s.charCodeAt(i+1)+7)/8);i+=lg+2;var ly=Math.floor((s.charCodeAt(i)*256+s.charCodeAt(i+1)+7)/8);i+=ly+2;this.pkey=s2r(s.substr(m,lp+lg+ly+6));var pkt=String.fromCharCode(153)+String.fromCharCode(len>>8)+String.fromCharCode(len&255)+s.substr(k,len);var fp=str_sha1(pkt);this.fp=s2hex(fp);this.keyid=s2hex(fp.substr(fp.length-8,8));this.type="ELGAMAL";found=3}else{i=k+len}}else if(tag==13){this.user=s.substr(i,len);i+=len}else{i+=len}}if(found<2){this.vers="";this.fp="";this.keyid="";if(found==0)this.user="No public key packet found.";else if(found==1){this.user="public key algorithm is "+algo+" not RSA or ELGAMAL."}this.pkey=""}}module.exports.extract=function(text){var key=new getPublicKey(text);return{version:key.vers,user:key.user,id:key.keyid,type:key.type=="RSA"?0:1,key:key.pkey.replace(/\n/g,"")}};var Rcon=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145];var S=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22];var T1=[2774754246,2222750968,2574743534,2373680118,234025727,3177933782,2976870366,1422247313,1345335392,50397442,2842126286,2099981142,436141799,1658312629,3870010189,2591454956,1170918031,2642575903,1086966153,2273148410,368769775,3948501426,3376891790,200339707,3970805057,1742001331,4255294047,3937382213,3214711843,4154762323,2524082916,1539358875,3266819957,486407649,2928907069,1780885068,1513502316,1094664062,49805301,1338821763,1546925160,4104496465,887481809,150073849,2473685474,1943591083,1395732834,1058346282,201589768,1388824469,1696801606,1589887901,672667696,2711000631,251987210,3046808111,151455502,907153956,2608889883,1038279391,652995533,1764173646,3451040383,2675275242,453576978,2659418909,1949051992,773462580,756751158,2993581788,3998898868,4221608027,4132590244,1295727478,1641469623,3467883389,2066295122,1055122397,1898917726,2542044179,4115878822,1758581177,0,753790401,1612718144,536673507,3367088505,3982187446,3194645204,1187761037,3653156455,1262041458,3729410708,3561770136,3898103984,1255133061,1808847035,720367557,3853167183,385612781,3309519750,3612167578,1429418854,2491778321,3477423498,284817897,100794884,2172616702,4031795360,1144798328,3131023141,3819481163,4082192802,4272137053,3225436288,2324664069,2912064063,3164445985,1211644016,83228145,3753688163,3249976951,1977277103,1663115586,806359072,452984805,250868733,1842533055,1288555905,336333848,890442534,804056259,3781124030,2727843637,3427026056,957814574,1472513171,4071073621,2189328124,1195195770,2892260552,3881655738,723065138,2507371494,2690670784,2558624025,3511635870,2145180835,1713513028,2116692564,2878378043,2206763019,3393603212,703524551,3552098411,1007948840,2044649127,3797835452,487262998,1994120109,1004593371,1446130276,1312438900,503974420,3679013266,168166924,1814307912,3831258296,1573044895,1859376061,4021070915,2791465668,2828112185,2761266481,937747667,2339994098,854058965,1137232011,1496790894,3077402074,2358086913,1691735473,3528347292,3769215305,3027004632,4199962284,133494003,636152527,2942657994,2390391540,3920539207,403179536,3585784431,2289596656,1864705354,1915629148,605822008,4054230615,3350508659,1371981463,602466507,2094914977,2624877800,555687742,3712699286,3703422305,2257292045,2240449039,2423288032,1111375484,3300242801,2858837708,3628615824,84083462,32962295,302911004,2741068226,1597322602,4183250862,3501832553,2441512471,1489093017,656219450,3114180135,954327513,335083755,3013122091,856756514,3144247762,1893325225,2307821063,2811532339,3063651117,572399164,2458355477,552200649,1238290055,4283782570,2015897680,2061492133,2408352771,4171342169,2156497161,386731290,3669999461,837215959,3326231172,3093850320,3275833730,2962856233,1999449434,286199582,3417354363,4233385128,3602627437,974525996];var T2=[1667483301,2088564868,2004348569,2071721613,4076011277,1802229437,1869602481,3318059348,808476752,16843267,1734856361,724260477,4278118169,3621238114,2880130534,1987505306,3402272581,2189565853,3385428288,2105408135,4210749205,1499050731,1195871945,4042324747,2913812972,3570709351,2728550397,2947499498,2627478463,2762232823,1920132246,3233848155,3082253762,4261273884,2475900334,640044138,909536346,1061125697,4160222466,3435955023,875849820,2779075060,3857043764,4059166984,1903288979,3638078323,825320019,353708607,67373068,3351745874,589514341,3284376926,404238376,2526427041,84216335,2593796021,117902857,303178806,2155879323,3806519101,3958099238,656887401,2998042573,1970662047,151589403,2206408094,741103732,437924910,454768173,1852759218,1515893998,2694863867,1381147894,993752653,3604395873,3014884814,690573947,3823361342,791633521,2223248279,1397991157,3520182632,0,3991781676,538984544,4244431647,2981198280,1532737261,1785386174,3419114822,3200149465,960066123,1246401758,1280088276,1482207464,3486483786,3503340395,4025468202,2863288293,4227591446,1128498885,1296931543,859006549,2240090516,1162185423,4193904912,33686534,2139094657,1347461360,1010595908,2678007226,2829601763,1364304627,2745392638,1077969088,2408514954,2459058093,2644320700,943222856,4126535940,3166462943,3065411521,3671764853,555827811,269492272,4294960410,4092853518,3537026925,3452797260,202119188,320022069,3974939439,1600110305,2543269282,1145342156,387395129,3301217111,2812761586,2122251394,1027439175,1684326572,1566423783,421081643,1936975509,1616953504,2172721560,1330618065,3705447295,572671078,707417214,2425371563,2290617219,1179028682,4008625961,3099093971,336865340,3739133817,1583267042,185275933,3688607094,3772832571,842163286,976909390,168432670,1229558491,101059594,606357612,1549580516,3267534685,3553869166,2896970735,1650640038,2442213800,2509582756,3840201527,2038035083,3890730290,3368586051,926379609,1835915959,2374828428,3587551588,1313774802,2846444e3,1819072692,1448520954,4109693703,3941256997,1701169839,2054878350,2930657257,134746136,3132780501,2021191816,623200879,774790258,471611428,2795919345,3031724999,3334903633,3907570467,3722289532,1953818780,522141217,1263245021,3183305180,2341145990,2324303749,1886445712,1044282434,3048567236,1718013098,1212715224,50529797,4143380225,235805714,1633796771,892693087,1465364217,3115936208,2256934801,3250690392,488454695,2661164985,3789674808,4177062675,2560109491,286335539,1768542907,3654920560,2391672713,2492740519,2610638262,505297954,2273777042,3924412704,3469641545,1431677695,673730680,3755976058,2357986191,2711706104,2307459456,218962455,3216991706,3873888049,1111655622,1751699640,1094812355,2576951728,757946999,252648977,2964356043,1414834428,3149622742,370551866]
;var T3=[1673962851,2096661628,2012125559,2079755643,4076801522,1809235307,1876865391,3314635973,811618352,16909057,1741597031,727088427,4276558334,3618988759,2874009259,1995217526,3398387146,2183110018,3381215433,2113570685,4209972730,1504897881,1200539975,4042984432,2906778797,3568527316,2724199842,2940594863,2619588508,2756966308,1927583346,3231407040,3077948087,4259388669,2470293139,642542118,913070646,1065238847,4160029431,3431157708,879254580,2773611685,3855693029,4059629809,1910674289,3635114968,828527409,355090197,67636228,3348452039,591815971,3281870531,405809176,2520228246,84545285,2586817946,118360327,304363026,2149292928,3806281186,3956090603,659450151,2994720178,1978310517,152181513,2199756419,743994412,439627290,456535323,1859957358,1521806938,2690382752,1386542674,997608763,3602342358,3011366579,693271337,3822927587,794718511,2215876484,1403450707,3518589137,0,3988860141,541089824,4242743292,2977548465,1538714971,1792327274,3415033547,3194476990,963791673,1251270218,1285084236,1487988824,3481619151,3501943760,4022676207,2857362858,4226619131,1132905795,1301993293,862344499,2232521861,1166724933,4192801017,33818114,2147385727,1352724560,1014514748,2670049951,2823545768,1369633617,2740846243,1082179648,2399505039,2453646738,2636233885,946882616,4126213365,3160661948,3061301686,3668932058,557998881,270544912,4293204735,4093447923,3535760850,3447803085,202904588,321271059,3972214764,1606345055,2536874647,1149815876,388905239,3297990596,2807427751,2130477694,1031423805,1690872932,1572530013,422718233,1944491379,1623236704,2165938305,1335808335,3701702620,574907938,710180394,2419829648,2282455944,1183631942,4006029806,3094074296,338181140,3735517662,1589437022,185998603,3685578459,3772464096,845436466,980700730,169090570,1234361161,101452294,608726052,1555620956,3265224130,3552407251,2890133420,1657054818,2436475025,2503058581,3839047652,2045938553,3889509095,3364570056,929978679,1843050349,2365688973,3585172693,1318900302,2840191145,1826141292,1454176854,4109567988,3939444202,1707781989,2062847610,2923948462,135272456,3127891386,2029029496,625635109,777810478,473441308,2790781350,3027486644,3331805638,3905627112,3718347997,1961401460,524165407,1268178251,3177307325,2332919435,2316273034,1893765232,1048330814,3044132021,1724688998,1217452104,50726147,4143383030,236720654,1640145761,896163637,1471084887,3110719673,2249691526,3248052417,490350365,2653403550,3789109473,4176155640,2553000856,287453969,1775418217,3651760345,2382858638,2486413204,2603464347,507257374,2266337927,3922272489,3464972750,1437269845,676362280,3752164063,2349043596,2707028129,2299101321,219813645,3211123391,3872862694,1115997762,1758509160,1099088705,2569646233,760903469,253628687,2960903088,1420360788,3144537787,371997206];var T4=[3332727651,4169432188,4003034999,4136467323,4279104242,3602738027,3736170351,2438251973,1615867952,33751297,3467208551,1451043627,3877240574,3043153879,1306962859,3969545846,2403715786,530416258,2302724553,4203183485,4011195130,3001768281,2395555655,4211863792,1106029997,3009926356,1610457762,1173008303,599760028,1408738468,3835064946,2606481600,1975695287,3776773629,1034851219,1282024998,1817851446,2118205247,4110612471,2203045068,1750873140,1374987685,3509904869,4178113009,3801313649,2876496088,1649619249,708777237,135005188,2505230279,1181033251,2640233411,807933976,933336726,168756485,800430746,235472647,607523346,463175808,3745374946,3441880043,1315514151,2144187058,3936318837,303761673,496927619,1484008492,875436570,908925723,3702681198,3035519578,1543217312,2767606354,1984772923,3076642518,2110698419,1383803177,3711886307,1584475951,328696964,2801095507,3110654417,0,3240947181,1080041504,3810524412,2043195825,3069008731,3569248874,2370227147,1742323390,1917532473,2497595978,2564049996,2968016984,2236272591,3144405200,3307925487,1340451498,3977706491,2261074755,2597801293,1716859699,294946181,2328839493,3910203897,67502594,4269899647,2700103760,2017737788,632987551,1273211048,2733855057,1576969123,2160083008,92966799,1068339858,566009245,1883781176,4043634165,1675607228,2009183926,2943736538,1113792801,540020752,3843751935,4245615603,3211645650,2169294285,403966988,641012499,3274697964,3202441055,899848087,2295088196,775493399,2472002756,1441965991,4236410494,2051489085,3366741092,3135724893,841685273,3868554099,3231735904,429425025,2664517455,2743065820,1147544098,1417554474,1001099408,193169544,2362066502,3341414126,1809037496,675025940,2809781982,3168951902,371002123,2910247899,3678134496,1683370546,1951283770,337512970,2463844681,201983494,1215046692,3101973596,2673722050,3178157011,1139780780,3299238498,967348625,832869781,3543655652,4069226873,3576883175,2336475336,1851340599,3669454189,25988493,2976175573,2631028302,1239460265,3635702892,2902087254,4077384948,3475368682,3400492389,4102978170,1206496942,270010376,1876277946,4035475576,1248797989,1550986798,941890588,1475454630,1942467764,2538718918,3408128232,2709315037,3902567540,1042358047,2531085131,1641856445,226921355,260409994,3767562352,2084716094,1908716981,3433719398,2430093384,100991747,4144101110,470945294,3265487201,1784624437,2935576407,1775286713,395413126,2572730817,975641885,666476190,3644383713,3943954680,733190296,573772049,3535497577,2842745305,126455438,866620564,766942107,1008868894,361924487,3374377449,2269761230,2868860245,1350051880,2776293343,59739276,1509466529,159418761,437718285,1708834751,3610371814,2227585602,3501746280,2193834305,699439513,1517759789,504434447,2076946608,2835108948,1842789307,742004246];function B0(x){return x&255}function B1(x){return x>>8&255}function B2(x){return x>>16&255}function B3(x){return x>>24&255}function F1(x0,x1,x2,x3){return B1(T1[x0&255])|B1(T1[x1>>8&255])<<8|B1(T1[x2>>16&255])<<16|B1(T1[x3>>>24])<<24}function packBytes(octets){var i,j;var len=octets.length;var b=new Array(len/4);if(!octets||len%4)return;for(i=0,j=0;j<len;j+=4)b[i++]=octets[j]|octets[j+1]<<8|octets[j+2]<<16|octets[j+3]<<24;return b}function unpackBytes(packed){var j;var i=0,l=packed.length;var r=new Array(l*4);for(j=0;j<l;j++){r[i++]=B0(packed[j]);r[i++]=B1(packed[j]);r[i++]=B2(packed[j]);r[i++]=B3(packed[j])}return r}var maxkc=8;var maxrk=14;function keyExpansion(key){var kc,i,j,r,t;var rounds;var keySched=new Array(maxrk+1);var keylen=key.length;var k=new Array(maxkc);var tk=new Array(maxkc);var rconpointer=0;if(keylen==16){rounds=10;kc=4}else if(keylen==24){rounds=12;kc=6}else if(keylen==32){rounds=14;kc=8}else{alert("Invalid AES key length "+keylen);return}for(i=0;i<maxrk+1;i++)keySched[i]=new Array(4);for(i=0,j=0;j<keylen;j++,i+=4)k[j]=key.charCodeAt(i)|key.charCodeAt(i+1)<<8|key.charCodeAt(i+2)<<16|key.charCodeAt(i+3)<<24;for(j=kc-1;j>=0;j--)tk[j]=k[j];r=0;t=0;for(j=0;j<kc&&r<rounds+1;){for(;j<kc&&t<4;j++,t++){keySched[r][t]=tk[j]}if(t==4){r++;t=0}}while(r<rounds+1){var temp=tk[kc-1];tk[0]^=S[B1(temp)]|S[B2(temp)]<<8|S[B3(temp)]<<16|S[B0(temp)]<<24;tk[0]^=Rcon[rconpointer++];if(kc!=8){for(j=1;j<kc;j++)tk[j]^=tk[j-1]}else{for(j=1;j<kc/2;j++)tk[j]^=tk[j-1];temp=tk[kc/2-1];tk[kc/2]^=S[B0(temp)]|S[B1(temp)]<<8|S[B2(temp)]<<16|S[B3(temp)]<<24;for(j=kc/2+1;j<kc;j++)tk[j]^=tk[j-1]}for(j=0;j<kc&&r<rounds+1;){for(;j<kc&&t<4;j++,t++){keySched[r][t]=tk[j]}if(t==4){r++;t=0}}}return{rounds:rounds,rk:keySched}}function AESencrypt(block,ctx){var r;var t0,t1,t2,t3;var b=packBytes(block);var rounds=ctx.rounds;var b0=b[0];var b1=b[1];var b2=b[2];var b3=b[3];for(r=0;r<rounds-1;r++){t0=b0^ctx.rk[r][0];t1=b1^ctx.rk[r][1];t2=b2^ctx.rk[r][2];t3=b3^ctx.rk[r][3];b0=T1[t0&255]^T2[t1>>8&255]^T3[t2>>16&255]^T4[t3>>>24];b1=T1[t1&255]^T2[t2>>8&255]^T3[t3>>16&255]^T4[t0>>>24];b2=T1[t2&255]^T2[t3>>8&255]^T3[t0>>16&255]^T4[t1>>>24];b3=T1[t3&255]^T2[t0>>8&255]^T3[t1>>16&255]^T4[t2>>>24]}r=rounds-1;t0=b0^ctx.rk[r][0];t1=b1^ctx.rk[r][1];t2=b2^ctx.rk[r][2];t3=b3^ctx.rk[r][3];b[0]=F1(t0,t1,t2,t3)^ctx.rk[rounds][0];b[1]=F1(t1,t2,t3,t0)^ctx.rk[rounds][1];b[2]=F1(t2,t3,t0,t1)^ctx.rk[rounds][2];b[3]=F1(t3,t0,t1,t2)^ctx.rk[rounds][3];return unpackBytes(b)}var b64s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function s2r(t){var a,c,n;var r="",l=0,s=0;var tl=t.length;for(n=0;n<tl;n++){c=t.charCodeAt(n);if(s==0){r+=b64s.charAt(c>>2&63);a=(c&3)<<4}else if(s==1){r+=b64s.charAt(a|c>>4&15);a=(c&15)<<2}else if(s==2){r+=b64s.charAt(a|c>>6&3);l+=1;if(l%60==0)r+="\n";r+=b64s.charAt(c&63)}l+=1;if(l%60==0)r+="\n";s+=1;if(s==3)s=0}if(s>0){r+=b64s.charAt(a);l+=1;if(l%60==0)r+="\n";r+="=";l+=1}if(s==1){if(l%60==0)r+="\n";r+="="}return r}function r2s(t){var c,n;var r="",s=0,a=0;var tl=t.length;for(n=0;n<tl;n++){c=b64s.indexOf(t.charAt(n));if(c>=0){if(s)r+=String.fromCharCode(a|c>>6-s&255);s=s+2&7;a=c<<s&255}}return r}var alert=function(message){throw new Error(message)};"use strict";var bs=28;var bx2=1<<bs,bm=bx2-1,bx=bx2>>1,bd=bs>>1,bdm=(1<<bd)-1;var log2=Math.log(2);function zeros(n){var r=new Array(n);while(n-- >0)r[n]=0;return r}function zclip(r){var n=r.length;if(r[n-1])return r;while(n>1&&r[n-1]==0)n--;return r.slice(0,n)}function nbits(x){var n=1,t;if((t=x>>>16)!=0){x=t;n+=16}if((t=x>>8)!=0){x=t;n+=8}if((t=x>>4)!=0){x=t;n+=4}if((t=x>>2)!=0){x=t;n+=2}if((t=x>>1)!=0){x=t;n+=1}return n}function badd(a,b){var al=a.length;var bl=b.length;if(al<bl)return badd(b,a);var r=new Array(al);var c=0,n=0;for(;n<bl;n++){c+=a[n]+b[n];r[n]=c&bm;c>>>=bs}for(;n<al;n++){c+=a[n];r[n]=c&bm;c>>>=bs}if(c)r[n]=c;return r}function bsub(a,b){var al=a.length;var bl=b.length;if(bl>al)return[];if(bl==al){if(b[bl-1]>a[bl-1])return[];if(bl==1)return[a[0]-b[0]]}var r=new Array(al);var c=0;for(var n=0;n<bl;n++){c+=a[n]-b[n];r[n]=c&bm;c>>=bs}for(;n<al;n++){c+=a[n];r[n]=c&bm;c>>=bs}if(c)return[];return zclip(r)}function ip(w,n,x,y,c){var xl=x&bdm;var xh=x>>bd;var yl=y&bdm;var yh=y>>bd;var m=xh*yl+yh*xl;var l=xl*yl+((m&bdm)<<bd)+w[n]+c;w[n]=l&bm;c=xh*yh+(m>>bd)+(l>>bs);return c}function bsqr(x){var t=x.length;var n=2*t;var r=zeros(n);var c=0;var i,j;for(i=0;i<t;i++){c=ip(r,2*i,x[i],x[i],0);for(j=i+1;j<t;j++){c=ip(r,i+j,2*x[j],x[i],c)}r[i+t]=c}return zclip(r)}function bmul(x,y){var n=x.length;var t=y.length;var r=zeros(n+t-1);var c,i,j;for(i=0;i<t;i++){c=0;for(j=0;j<n;j++){c=ip(r,i+j,x[j],y[i],c)}r[i+n]=c}return zclip(r)}function toppart(x,start,len){var n=0;while(start>=0&&len-- >0)n=n*bx2+x[start--];return n}function bdiv(a,b){var n=a.length-1;var t=b.length-1;var nmt=n-t;if(n<t||n==t&&(a[n]<b[n]||n>0&&a[n]==b[n]&&a[n-1]<b[n-1])){return{q:[0],mod:a}}if(n==t&&toppart(a,t,2)/toppart(b,t,2)<4){var x=a.concat();var qq=0;var xx;for(;;){xx=bsub(x,b);if(xx.length==0)break;x=xx;qq++}return{q:[qq],mod:x}}var shift2=Math.floor(Math.log(b[t])/log2)+1;var shift=bs-shift2;var x=a.concat();var y=b.concat();if(shift){for(i=t;i>0;i--)y[i]=y[i]<<shift&bm|y[i-1]>>shift2;y[0]=y[0]<<shift&bm;if(x[n]&(bm<<shift2&bm)){x[++n]=0;nmt++}for(i=n;i>0;i--)x[i]=x[i]<<shift&bm|x[i-1]>>shift2;x[0]=x[0]<<shift&bm}var i,j,x2;var q=zeros(nmt+1);var y2=zeros(nmt).concat(y);for(;;){x2=bsub(x,y2);if(x2.length==0)break;q[nmt]++;x=x2}var yt=y[t],top=toppart(y,t,2);for(i=n;i>t;i--){var m=i-t-1;if(i>=x.length)q[m]=1;else if(x[i]==yt)q[m]=bm;else q[m]=Math.floor(toppart(x,i,2)/yt);var topx=toppart(x,i,3);while(q[m]*top>topx)q[m]--;y2=y2.slice(1);x2=bsub(x,bmul([q[m]],y2));if(x2.length==0){q[m]--;x2=bsub(x,bmul([q[m]],y2))}x=x2}if(shift){for(i=0;i<x.length-1;i++)x[i]=x[i]>>shift|x[i+1]<<shift2&bm;x[x.length-1]>>=shift}return{q:zclip(q),mod:zclip(x)}}function simplemod(i,m){var c=0,v;for(var n=i.length-1;n>=0;n--){v=i[n];c=((v>>bd)+(c<<bd))%m;c=((v&bdm)+(c<<bd))%m}return c}function bmod(p,m){if(m.length==1){if(p.length==1)return[p[0]%m[0]];if(m[0]<bdm)return[simplemod(p,m[0])]}var r=bdiv(p,m);return r.mod}function bmod2(x,m,mu){var xl=x.length-(m.length<<1);if(xl>0)return bmod2(x.slice(0,xl).concat(bmod2(x.slice(xl),m,mu)),m,mu);var ml1=m.length+1,ml2=m.length-1,rr;var q3=bmul(x.slice(ml2),mu).slice(ml1);var r1=x.slice(0,ml1);var r2=bmul(q3,m).slice(0,ml1);var r=bsub(r1,r2);if(r.length==0){r1[ml1]=1;r=bsub(r1,r2)}for(var n=0;;n++){rr=bsub(r,m);if(rr.length==0)break;r=rr;if(n>=3)return bmod2(r,m,mu)}return r}function bexpmod(g,e,m){var a=g.concat();var l=e.length-1;var n=nbits(e[l])-2;for(;l>=0;l--){for(;n>=0;n-=1){a=bmod(bsqr(a),m);if(e[l]&1<<n)a=bmod(bmul(a,g),m)}n=bs-1}return a}function bmodexp(g,e,m){var a=g.concat();var l=e.length-1;var n=m.length*2;var mu=zeros(n+1);mu[n]=1;mu=bdiv(mu,m).q;n=nbits(e[l])-2;for(;l>=0;l--){for(;n>=0;n-=1){a=bmod2(bsqr(a),m,mu);if(e[l]&1<<n)a=bmod2(bmul(a,g),m,mu)}n=bs-1}return a}function RSAencrypt(s,e,m){return bexpmod(s,e,m)}function RSAdecrypt(m,d,p,q,u){var xp=bmodexp(bmod(m,p),bmod(d,bsub(p,[1])),p);var xq=bmodexp(bmod(m,q),bmod(d,bsub(q,[1])),q);var t=bsub(xq,xp);if(t.length==0){t=bsub(xp,xq);t=bmod(bmul(t,u),q);t=bsub(q,t)}else{t=bmod(bmul(t,u),q)}return badd(bmul(t,p),xp)}function mpi2b(s){var bn=1,r=[0],rn=0,sb=256;var c,sn=s.length;if(sn<2){alert("string too short, not a MPI");return 0}var len=(sn-2)*8;var bits=s.charCodeAt(0)*256+s.charCodeAt(1);if(bits>len||bits<len-8){alert("not a MPI, bits="+bits+",len="+len);return 0}for(var n=0;n<len;n++){if((sb<<=1)>255){sb=1;c=s.charCodeAt(--sn)}if(bn>bm){bn=1;r[++rn]=0}if(c&sb)r[rn]|=bn;bn<<=1}return r}function b2mpi(b){var bn=1,bc=0,r=[0],rb=1,rn=0;var bits=b.length*bs;var n,rr="";for(n=0;n<bits;n++){if(b[bc]&bn)r[rn]|=rb;if((rb<<=1)>255){rb=1;r[++rn]=0}if((bn<<=1)>bm){bn=1;bc++}}while(rn&&r[rn]==0)rn--;bn=256;for(bits=8;bits>0;bits--)if(r[rn]&(bn>>=1))break;bits+=rn*8;rr+=String.fromCharCode(bits/256)+String.fromCharCode(bits%256);if(bits)for(n=rn;n>=0;n--)rr+=String.fromCharCode(r[n]);return rr}var hexcase=0;var b64pad="";var chrsz=8;function hex_sha1(s){return binb2hex(core_sha1(str2binb(s),s.length*chrsz))}function b64_sha1(s){return binb2b64(core_sha1(str2binb(s),s.length*chrsz))}function str_sha1(s){return binb2str(core_sha1(str2binb(s),s.length*chrsz))}function hex_hmac_sha1(key,data){return binb2hex(core_hmac_sha1(key,data))}function b64_hmac_sha1(key,data){return binb2b64(core_hmac_sha1(key,data))}function str_hmac_sha1(key,data){return binb2str(core_hmac_sha1(key,data))}function sha1_vm_test(){return hex_sha1("abc")=="a9993e364706816aba3e25717850c26c9cd0d89d"}function core_sha1(x,len){x[len>>5]|=128<<24-len%32;x[(len+64>>9<<4)+15]=len;var w=Array(80);var a=1732584193;var b=-271733879;var c=-1732584194;var d=271733878;var e=-1009589776;for(var i=0;i<x.length;i+=16){var olda=a;var oldb=b;var oldc=c;var oldd=d;var olde=e;for(var j=0;j<80;j++){if(j<16)w[j]=x[i+j];else w[j]=rol(w[j-3]^w[j-8]^w[j-14]^w[j-16],1);var t=safe_add(safe_add(rol(a,5),sha1_ft(j,b,c,d)),safe_add(safe_add(e,w[j]),sha1_kt(j)));e=d;d=c;c=rol(b,30);b=a;a=t}a=safe_add(a,olda);b=safe_add(b,oldb);c=safe_add(c,oldc);d=safe_add(d,oldd);e=safe_add(e,olde)}return Array(a,b,c,d,e)}function sha1_ft(t,b,c,d){if(t<20)return b&c|~b&d;if(t<40)return b^c^d;if(t<60)return b&c|b&d|c&d;return b^c^d}function sha1_kt(t){return t<20?1518500249:t<40?1859775393:t<60?-1894007588:-899497514}function core_hmac_sha1(key,data){var bkey=str2binb(key);if(bkey.length>16)bkey=core_sha1(bkey,key.length*chrsz);var ipad=Array(16),opad=Array(16);for(var i=0;i<16;i++){ipad[i]=bkey[i]^909522486;opad[i]=bkey[i]^1549556828}var hash=core_sha1(ipad.concat(str2binb(data)),512+data.length*chrsz);return core_sha1(opad.concat(hash),512+160)}function safe_add(x,y){var lsw=(x&65535)+(y&65535);var msw=(x>>16)+(y>>16)+(lsw>>16);return msw<<16|lsw&65535}function rol(num,cnt){return num<<cnt|num>>>32-cnt}function str2binb(str){var bin=Array();var mask=(1<<chrsz)-1;for(var i=0;i<str.length*chrsz;i+=chrsz)bin[i>>5]|=(str.charCodeAt(i/chrsz)&mask)<<24-i%32;return bin}function binb2str(bin){var str="";var mask=(1<<chrsz)-1;for(var i=0;i<bin.length*32;i+=chrsz)str+=String.fromCharCode(bin[i>>5]>>>24-i%32&mask);return str}function binb2hex(binarray){var hex_tab=hexcase?"0123456789ABCDEF":"0123456789abcdef";var str="";for(var i=0;i<binarray.length*4;i++){str+=hex_tab.charAt(binarray[i>>2]>>(3-i%4)*8+4&15)+hex_tab.charAt(binarray[i>>2]>>(3-i%4)*8&15)}return str}function binb2b64(binarray){var tab="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var str="";for(var i=0;i<binarray.length*4;i+=3){var triplet=(binarray[i>>2]>>8*(3-i%4)&255)<<16|(binarray[i+1>>2]>>8*(3-(i+1)%4)&255)<<8|binarray[i+2>>2]>>8*(3-(i+2)%4)&255;for(var j=0;j<4;j++){if(i*8+j*6>binarray.length*32)str+=b64pad;else str+=tab.charAt(triplet>>6*(3-j)&63)}}return str}}).call(this,require("buffer").Buffer)},{buffer:2,crypto:"crypto","random-js":4}]},{},[])("hanewinpgp")});