openpgp
Version:
OpenPGP.js is a Javascript implementation of the OpenPGP protocol. This is defined in RFC 4880.
2 lines • 240 kB
JavaScript
/*! OpenPGP.js v6.1.0 - 2025-01-30 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
const e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=Symbol("doneWritingPromise"),r=Symbol("doneWritingResolve"),i=Symbol("doneWritingReject"),n=Symbol("readingIndex");class s extends Array{constructor(){super(),Object.setPrototypeOf(this,s.prototype),this[t]=new Promise(((e,t)=>{this[r]=e,this[i]=t})),this[t].catch((()=>{}))}}function a(e){return e&&e.getReader&&Array.isArray(e)}function o(e){if(!a(e)){const t=e.getWriter(),r=t.releaseLock;return t.releaseLock=()=>{t.closed.catch((function(){})),r.call(t)},t}this.stream=e}function c(t){if(a(t))return"array";if(e.ReadableStream&&e.ReadableStream.prototype.isPrototypeOf(t))return"web";if(t&&!(e.ReadableStream&&t instanceof e.ReadableStream)&&"function"==typeof t._read&&"object"==typeof t._readableState)throw Error("Native Node streams are no longer supported: please manually convert the stream to a WebStream, using e.g. `stream.Readable.toWeb`");return!(!t||!t.getReader)&&"web-like"}function u(e){return Uint8Array.prototype.isPrototypeOf(e)}function h(e){if(1===e.length)return e[0];let t=0;for(let r=0;r<e.length;r++){if(!u(e[r]))throw Error("concatUint8Array: Data must be in the form of a Uint8Array");t+=e[r].length}const r=new Uint8Array(t);let i=0;return e.forEach((function(e){r.set(e,i),i+=e.length})),r}s.prototype.getReader=function(){return void 0===this[n]&&(this[n]=0),{read:async()=>(await this[t],this[n]===this.length?{value:void 0,done:!0}:{value:this[this[n]++],done:!1})}},s.prototype.readToEnd=async function(e){await this[t];const r=e(this.slice(this[n]));return this.length=0,r},s.prototype.clone=function(){const e=new s;return e[t]=this[t].then((()=>{e.push(...this)})),e},o.prototype.write=async function(e){this.stream.push(e)},o.prototype.close=async function(){this.stream[r]()},o.prototype.abort=async function(e){return this.stream[i](e),e},o.prototype.releaseLock=function(){},"object"==typeof e.process&&e.process.versions;const y=new WeakSet,l=Symbol("externalBuffer");function p(e){if(this.stream=e,e[l]&&(this[l]=e[l].slice()),a(e)){const t=e.getReader();return this._read=t.read.bind(t),this._releaseLock=()=>{},void(this._cancel=()=>{})}if(c(e)){const t=e.getReader();return this._read=t.read.bind(t),this._releaseLock=()=>{t.closed.catch((function(){})),t.releaseLock()},void(this._cancel=t.cancel.bind(t))}let t=!1;this._read=async()=>t||y.has(e)?{value:void 0,done:!0}:(t=!0,{value:e,done:!1}),this._releaseLock=()=>{if(t)try{y.add(e)}catch(e){}}}function g(e){return c(e)?e:new ReadableStream({start(t){t.enqueue(e),t.close()}})}function d(e){if(c(e))return e;const t=new s;return(async()=>{const r=C(t);await r.write(e),await r.close()})(),t}function f(e){return e.some((e=>c(e)&&!a(e)))?function(e){e=e.map(g);const t=b((async function(e){await Promise.all(i.map((t=>D(t,e))))}));let r=Promise.resolve();const i=e.map(((i,n)=>v(i,((i,s)=>(r=r.then((()=>w(i,t.writable,{preventClose:n!==e.length-1}))),r)))));return t.readable}(e):e.some((e=>a(e)))?function(e){const t=new s;let r=Promise.resolve();return e.forEach(((i,n)=>(r=r.then((()=>w(i,t,{preventClose:n!==e.length-1}))),r))),t}(e):"string"==typeof e[0]?e.join(""):h(e)}async function w(e,t,{preventClose:r=!1,preventAbort:i=!1,preventCancel:n=!1}={}){if(c(e)&&!a(e)){e=g(e);try{if(e[l]){const r=C(t);for(let t=0;t<e[l].length;t++)await r.ready,await r.write(e[l][t]);r.releaseLock()}await e.pipeTo(t,{preventClose:r,preventAbort:i,preventCancel:n})}catch(e){}return}const s=I(e=d(e)),o=C(t);try{for(;;){await o.ready;const{done:e,value:t}=await s.read();if(e){r||await o.close();break}await o.write(t)}}catch(e){i||await o.abort(e)}finally{s.releaseLock(),o.releaseLock()}}function m(e,t){const r=new TransformStream(t);return w(e,r.writable),r.readable}function b(e){let t,r,i,n=!1,s=!1;return{readable:new ReadableStream({start(e){i=e},pull(){t?t():n=!0},async cancel(t){s=!0,e&&await e(t),r&&r(t)}},{highWaterMark:0}),writable:new WritableStream({write:async function(e){if(s)throw Error("Stream is cancelled");i.enqueue(e),n?n=!1:(await new Promise(((e,i)=>{t=e,r=i})),t=null,r=null)},close:i.close.bind(i),abort:i.error.bind(i)})}}function k(e,t=()=>{},r=()=>{}){if(a(e)){const i=new s;return(async()=>{const n=C(i);try{const i=await U(e),s=t(i),a=r();let o;o=void 0!==s&&void 0!==a?f([s,a]):void 0!==s?s:a,await n.write(o),await n.close()}catch(e){await n.abort(e)}})(),i}if(c(e))return m(e,{async transform(e,r){try{const i=await t(e);void 0!==i&&r.enqueue(i)}catch(e){r.error(e)}},async flush(e){try{const t=await r();void 0!==t&&e.enqueue(t)}catch(t){e.error(t)}}});const i=t(e),n=r();return void 0!==i&&void 0!==n?f([i,n]):void 0!==i?i:n}function v(e,t){if(c(e)&&!a(e)){let r;const i=new TransformStream({start(e){r=e}}),n=w(e,i.writable),s=b((async function(e){r.error(e),await n,await new Promise(setTimeout)}));return t(i.readable,s.writable),s.readable}e=d(e);const r=new s;return t(e,r),r}function A(e,t){let r;const i=v(e,((e,n)=>{const s=I(e);s.remainder=()=>(s.releaseLock(),w(e,n),i),r=t(s)}));return r}function K(e){if(a(e))return e.clone();if(c(e)){const t=function(e){if(a(e))throw Error("ArrayStream cannot be tee()d, use clone() instead");if(c(e)){const t=g(e).tee();return t[0][l]=t[1][l]=e[l],t}return[P(e),P(e)]}(e);return S(e,t[0]),t[1]}return P(e)}function E(e){return a(e)?K(e):c(e)?new ReadableStream({start(t){const r=v(e,(async(e,r)=>{const i=I(e),n=C(r);try{for(;;){await n.ready;const{done:e,value:r}=await i.read();if(e){try{t.close()}catch(e){}return void await n.close()}try{t.enqueue(r)}catch(e){}await n.write(r)}}catch(e){t.error(e),await n.abort(e)}}));S(e,r)}}):P(e)}function S(e,t){Object.entries(Object.getOwnPropertyDescriptors(e.constructor.prototype)).forEach((([r,i])=>{"constructor"!==r&&(i.value?i.value=i.value.bind(t):i.get=i.get.bind(t),Object.defineProperty(e,r,i))}))}function P(e,t=0,r=1/0){if(a(e))throw Error("Not implemented");if(c(e)){if(t>=0&&r>=0){let i=0;return m(e,{transform(e,n){i<r?(i+e.length>=t&&n.enqueue(P(e,Math.max(t-i,0),r-i)),i+=e.length):n.terminate()}})}if(t<0&&(r<0||r===1/0)){let i=[];return k(e,(e=>{e.length>=-t?i=[e]:i.push(e)}),(()=>P(f(i),t,r)))}if(0===t&&r<0){let i;return k(e,(e=>{const n=i?f([i,e]):e;if(n.length>=-r)return i=P(n,r),P(n,t,r);i=n}))}return console.warn(`stream.slice(input, ${t}, ${r}) not implemented efficiently.`),x((async()=>P(await U(e),t,r)))}return e[l]&&(e=f(e[l].concat([e]))),u(e)?e.subarray(t,r===1/0?e.length:r):e.slice(t,r)}async function U(e,t=f){return a(e)?e.readToEnd(t):c(e)?I(e).readToEnd(t):e}async function D(e,t){if(c(e)){if(e.cancel){const r=await e.cancel(t);return await new Promise(setTimeout),r}if(e.destroy)return e.destroy(t),await new Promise(setTimeout),t}}function x(e){const t=new s;return(async()=>{const r=C(t);try{await r.write(await e()),await r.close()}catch(e){await r.abort(e)}})(),t}function I(e){return new p(e)}function C(e){return new o(e)}p.prototype.read=async function(){if(this[l]&&this[l].length){return{done:!1,value:this[l].shift()}}return this._read()},p.prototype.releaseLock=function(){this[l]&&(this.stream[l]=this[l]),this._releaseLock()},p.prototype.cancel=function(e){return this._cancel(e)},p.prototype.readLine=async function(){let e,t=[];for(;!e;){let{done:r,value:i}=await this.read();if(i+="",r)return t.length?f(t):void 0;const n=i.indexOf("\n")+1;n&&(e=f(t.concat(i.substr(0,n))),t=[]),n!==i.length&&t.push(i.substr(n))}return this.unshift(...t),e},p.prototype.readByte=async function(){const{done:e,value:t}=await this.read();if(e)return;const r=t[0];return this.unshift(P(t,1)),r},p.prototype.readBytes=async function(e){const t=[];let r=0;for(;;){const{done:i,value:n}=await this.read();if(i)return t.length?f(t):void 0;if(t.push(n),r+=n.length,r>=e){const r=f(t);return this.unshift(P(r,e)),P(r,0,e)}}},p.prototype.peekBytes=async function(e){const t=await this.readBytes(e);return this.unshift(t),t},p.prototype.unshift=function(...e){this[l]||(this[l]=[]),1===e.length&&u(e[0])&&this[l].length&&e[0].length&&this[l][0].byteOffset>=e[0].length?this[l][0]=new Uint8Array(this[l][0].buffer,this[l][0].byteOffset-e[0].length,this[l][0].byteLength+e[0].length):this[l].unshift(...e.filter((e=>e&&e.length)))},p.prototype.readToEnd=async function(e=f){const t=[];for(;;){const{done:e,value:r}=await this.read();if(e)break;t.push(r)}return e(t)};const T=Symbol("byValue");var B={curve:{nistP256:"nistP256",p256:"nistP256",nistP384:"nistP384",p384:"nistP384",nistP521:"nistP521",p521:"nistP521",secp256k1:"secp256k1",ed25519Legacy:"ed25519Legacy",ed25519:"ed25519Legacy",curve25519Legacy:"curve25519Legacy",curve25519:"curve25519Legacy",brainpoolP256r1:"brainpoolP256r1",brainpoolP384r1:"brainpoolP384r1",brainpoolP512r1:"brainpoolP512r1"},s2k:{simple:0,salted:1,iterated:3,argon2:4,gnu:101},publicKey:{rsaEncryptSign:1,rsaEncrypt:2,rsaSign:3,elgamal:16,dsa:17,ecdh:18,ecdsa:19,eddsaLegacy:22,aedh:23,aedsa:24,x25519:25,x448:26,ed25519:27,ed448:28},symmetric:{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,sha3_256:12,sha3_512:14},webHash:{"SHA-1":2,"SHA-256":8,"SHA-384":9,"SHA-512":10},aead:{eax:1,ocb:2,gcm:3,experimentalGCM:100},packet:{publicKeyEncryptedSessionKey:1,signature:2,symEncryptedSessionKey:3,onePassSignature:4,secretKey:5,publicKey:6,secretSubkey:7,compressedData:8,symmetricallyEncryptedData:9,marker:10,literalData:11,trust:12,userID:13,publicSubkey:14,userAttribute:17,symEncryptedIntegrityProtectedData:18,modificationDetectionCode:19,aeadEncryptedData:20,padding:21},literal:{binary:98,text:116,utf8:117,mime:109},signature:{binary:0,text:1,standalone:2,certGeneric:16,certPersona:17,certCasual:18,certPositive:19,certRevocation:48,subkeyBinding:24,keyBinding:25,key:31,keyRevocation:32,subkeyRevocation:40,timestamp:64,thirdParty:80},signatureSubpacket:{signatureCreationTime:2,signatureExpirationTime:3,exportableCertification:4,trustSignature:5,regularExpression:6,revocable:7,keyExpirationTime:9,placeholderBackwardsCompatibility:10,preferredSymmetricAlgorithms:11,revocationKey:12,issuerKeyID:16,notationData:20,preferredHashAlgorithms:21,preferredCompressionAlgorithms:22,keyServerPreferences:23,preferredKeyServer:24,primaryUserID:25,policyURI:26,keyFlags:27,signersUserID:28,reasonForRevocation:29,features:30,signatureTarget:31,embeddedSignature:32,issuerFingerprint:33,preferredAEADAlgorithms:34,preferredCipherSuites:39},keyFlags:{certifyKeys:1,signData:2,encryptCommunication:4,encryptStorage:8,splitPrivateKey:16,authentication:32,sharedPrivateKey:128},armor:{multipartSection:0,multipartLast:1,signed:2,message:3,publicKey:4,privateKey:5,signature:6},reasonForRevocation:{noReason:0,keySuperseded:1,keyCompromised:2,keyRetired:3,userIDInvalid:32},features:{modificationDetection:1,aead:2,v5Keys:4,seipdv2:8},write:function(e,t){if("number"==typeof t&&(t=this.read(e,t)),void 0!==e[t])return e[t];throw Error("Invalid enum value.")},read:function(e,t){if(e[T]||(e[T]=[],Object.entries(e).forEach((([t,r])=>{e[T][r]=t}))),void 0!==e[T][t])return e[T][t];throw Error("Invalid enum value.")}},M={preferredHashAlgorithm:B.hash.sha512,preferredSymmetricAlgorithm:B.symmetric.aes256,preferredCompressionAlgorithm:B.compression.uncompressed,aeadProtect:!1,parseAEADEncryptedV4KeysAsLegacy:!1,preferredAEADAlgorithm:B.aead.gcm,aeadChunkSizeByte:12,v6Keys:!1,enableParsingV5Entities:!1,s2kType:B.s2k.iterated,s2kIterationCountByte:224,s2kArgon2Params:{passes:3,parallelism:4,memoryExponent:16},allowUnauthenticatedMessages:!1,allowUnauthenticatedStream:!1,minRSABits:2047,passwordCollisionCheck:!1,allowInsecureDecryptionWithSigningKeys:!1,allowInsecureVerificationWithReformattedKeys:!1,allowMissingKeyFlags:!1,constantTimePKCS1Decryption:!1,constantTimePKCS1DecryptionSupportedSymmetricAlgorithms:new Set([B.symmetric.aes128,B.symmetric.aes192,B.symmetric.aes256]),ignoreUnsupportedPackets:!0,ignoreMalformedPackets:!1,additionalAllowedPackets:[],showVersion:!1,showComment:!1,versionString:"OpenPGP.js 6.1.0",commentString:"https://openpgpjs.org",maxUserIDLength:5120,knownNotations:[],nonDeterministicSignaturesViaNotation:!0,useEllipticFallback:!0,rejectHashAlgorithms:new Set([B.hash.md5,B.hash.ripemd]),rejectMessageHashAlgorithms:new Set([B.hash.md5,B.hash.ripemd,B.hash.sha1]),rejectPublicKeyAlgorithms:new Set([B.publicKey.elgamal,B.publicKey.dsa]),rejectCurves:new Set([B.curve.secp256k1])};const F=(()=>{try{return"development"===process.env.NODE_ENV}catch(e){}return!1})(),L={isString:function(e){return"string"==typeof e||e instanceof String},nodeRequire:()=>{},isArray:function(e){return e instanceof Array},isUint8Array:u,isStream:c,getNobleCurve:async(e,t)=>{if(!M.useEllipticFallback)throw Error("This curve is only supported in the full build of OpenPGP.js");const{nobleCurves:r}=await import("./noble_curves.min.mjs");switch(e){case B.publicKey.ecdh:case B.publicKey.ecdsa:{const e=r.get(t);if(!e)throw Error("Unsupported curve");return e}case B.publicKey.x448:return r.get("x448");case B.publicKey.ed448:return r.get("ed448");default:throw Error("Unsupported curve")}},readNumber:function(e){let t=0;for(let r=0;r<e.length;r++)t+=256**r*e[e.length-1-r];return t},writeNumber:function(e,t){const r=new Uint8Array(t);for(let i=0;i<t;i++)r[i]=e>>8*(t-i-1)&255;return r},readDate:function(e){const t=L.readNumber(e);return new Date(1e3*t)},writeDate:function(e){const t=Math.floor(e.getTime()/1e3);return L.writeNumber(t,4)},normalizeDate:function(e=Date.now()){return null===e||e===1/0?e:new Date(1e3*Math.floor(+e/1e3))},readMPI:function(e){const t=(e[0]<<8|e[1])+7>>>3;return L.readExactSubarray(e,2,2+t)},readExactSubarray:function(e,t,r){if(e.length<r-t)throw Error("Input array too short");return e.subarray(t,r)},leftPad(e,t){if(e.length>t)throw Error("Input array too long");const r=new Uint8Array(t),i=t-e.length;return r.set(e,i),r},uint8ArrayToMPI:function(e){const t=L.uint8ArrayBitLength(e);if(0===t)throw Error("Zero MPI");const r=e.subarray(e.length-Math.ceil(t/8)),i=new Uint8Array([(65280&t)>>8,255&t]);return L.concatUint8Array([i,r])},uint8ArrayBitLength:function(e){let t;for(t=0;t<e.length&&0===e[t];t++);if(t===e.length)return 0;const r=e.subarray(t);return 8*(r.length-1)+L.nbits(r[0])},hexToUint8Array:function(e){const t=new Uint8Array(e.length>>1);for(let r=0;r<e.length>>1;r++)t[r]=parseInt(e.substr(r<<1,2),16);return t},uint8ArrayToHex:function(e){const t="0123456789abcdef";let r="";return e.forEach((e=>{r+=t[e>>4]+t[15&e]})),r},stringToUint8Array:function(e){return k(e,(e=>{if(!L.isString(e))throw Error("stringToUint8Array: Data must be in the form of a string");const t=new Uint8Array(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t}))},uint8ArrayToString:function(e){const t=[],r=16384,i=(e=new Uint8Array(e)).length;for(let n=0;n<i;n+=r)t.push(String.fromCharCode.apply(String,e.subarray(n,n+r<i?n+r:i)));return t.join("")},encodeUTF8:function(e){const t=new TextEncoder("utf-8");function r(e,r=!1){return t.encode(e,{stream:!r})}return k(e,r,(()=>r("",!0)))},decodeUTF8:function(e){const t=new TextDecoder("utf-8");function r(e,r=!1){return t.decode(e,{stream:!r})}return k(e,r,(()=>r(new Uint8Array,!0)))},concat:f,concatUint8Array:h,equalsUint8Array:function(e,t){if(!L.isUint8Array(e)||!L.isUint8Array(t))throw Error("Data must be in the form of a Uint8Array");if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0},writeChecksum:function(e){let t=0;for(let r=0;r<e.length;r++)t=t+e[r]&65535;return L.writeNumber(t,2)},printDebug:function(e){F&&console.log("[OpenPGP.js debug]",e)},printDebugError:function(e){F&&console.error("[OpenPGP.js debug]",e)},nbits:function(e){let t=1,r=e>>>16;return 0!==r&&(e=r,t+=16),r=e>>8,0!==r&&(e=r,t+=8),r=e>>4,0!==r&&(e=r,t+=4),r=e>>2,0!==r&&(e=r,t+=2),r=e>>1,0!==r&&(e=r,t+=1),t},double:function(e){const t=new Uint8Array(e.length),r=e.length-1;for(let i=0;i<r;i++)t[i]=e[i]<<1^e[i+1]>>7;return t[r]=e[r]<<1^135*(e[0]>>7),t},shiftRight:function(e,t){if(t)for(let r=e.length-1;r>=0;r--)e[r]>>=t,r>0&&(e[r]|=e[r-1]<<8-t);return e},getWebCrypto:function(){const t=void 0!==e&&e.crypto&&e.crypto.subtle||this.getNodeCrypto()?.webcrypto.subtle;if(!t)throw Error("The WebCrypto API is not available");return t},getNodeCrypto:function(){return this.nodeRequire("crypto")},getNodeZlib:function(){return this.nodeRequire("zlib")},getNodeBuffer:function(){return(this.nodeRequire("buffer")||{}).Buffer},getHardwareConcurrency:function(){if("undefined"!=typeof navigator)return navigator.hardwareConcurrency||1;return this.nodeRequire("os").cpus().length},isEmailAddress:function(e){if(!L.isString(e))return!1;return/^[^\p{C}\p{Z}@<>\\]+@[^\p{C}\p{Z}@<>\\]+[^\p{C}\p{Z}\p{P}]$/u.test(e)},canonicalizeEOL:function(e){let t=!1;return k(e,(e=>{let r;t&&(e=L.concatUint8Array([new Uint8Array([13]),e])),13===e[e.length-1]?(t=!0,e=e.subarray(0,-1)):t=!1;const i=[];for(let t=0;r=e.indexOf(10,t)+1,r;t=r)13!==e[r-2]&&i.push(r);if(!i.length)return e;const n=new Uint8Array(e.length+i.length);let s=0;for(let t=0;t<i.length;t++){const r=e.subarray(i[t-1]||0,i[t]);n.set(r,s),s+=r.length,n[s-1]=13,n[s]=10,s++}return n.set(e.subarray(i[i.length-1]||0),s),n}),(()=>t?new Uint8Array([13]):void 0))},nativeEOL:function(e){let t=!1;return k(e,(e=>{let r;13===(e=t&&10!==e[0]?L.concatUint8Array([new Uint8Array([13]),e]):new Uint8Array(e))[e.length-1]?(t=!0,e=e.subarray(0,-1)):t=!1;let i=0;for(let t=0;t!==e.length;t=r){r=e.indexOf(13,t)+1,r||(r=e.length);const n=r-(10===e[r]?1:0);t&&e.copyWithin(i,t,n),i+=n-t}return e.subarray(0,i)}),(()=>t?new Uint8Array([13]):void 0))},removeTrailingSpaces:function(e){return e.split("\n").map((e=>{let t=e.length-1;for(;t>=0&&(" "===e[t]||"\t"===e[t]||"\r"===e[t]);t--);return e.substr(0,t+1)})).join("\n")},wrapError:function(e,t){if(!t)return Error(e);try{t.message=e+": "+t.message}catch(e){}return t},constructAllowedPackets:function(e){const t={};return e.forEach((e=>{if(!e.tag)throw Error("Invalid input: expected a packet class");t[e.tag]=e})),t},anyPromise:function(e){return new Promise((async(t,r)=>{let i;await Promise.all(e.map((async e=>{try{t(await e)}catch(e){i=e}}))),r(i)}))},selectUint8Array:function(e,t,r){const i=Math.max(t.length,r.length),n=new Uint8Array(i);let s=0;for(let i=0;i<n.length;i++)n[i]=t[i]&256-e|r[i]&255+e,s+=e&i<t.length|1-e&i<r.length;return n.subarray(0,s)},selectUint8:function(e,t,r){return t&256-e|r&255+e},isAES:function(e){return e===B.symmetric.aes128||e===B.symmetric.aes192||e===B.symmetric.aes256}},N=L.getNodeBuffer();let R,z;function j(e){let t=new Uint8Array;return k(e,(e=>{t=L.concatUint8Array([t,e]);const r=[],i=Math.floor(t.length/45),n=45*i,s=R(t.subarray(0,n));for(let e=0;e<i;e++)r.push(s.substr(60*e,60)),r.push("\n");return t=t.subarray(n),r.join("")}),(()=>t.length?R(t)+"\n":""))}function O(e){let t="";return k(e,(e=>{t+=e;let r=0;const i=[" ","\t","\r","\n"];for(let e=0;e<i.length;e++){const n=i[e];for(let e=t.indexOf(n);-1!==e;e=t.indexOf(n,e+1))r++}let n=t.length;for(;n>0&&(n-r)%4!=0;n--)i.includes(t[n])&&r--;const s=z(t.substr(0,n));return t=t.substr(n),s}),(()=>z(t)))}function H(e){return O(e.replace(/-/g,"+").replace(/_/g,"/"))}function _(e,t){let r=j(e).replace(/[\r\n]/g,"");return r=r.replace(/[+]/g,"-").replace(/[/]/g,"_").replace(/[=]/g,""),r}function G(e){const t=e.match(/^-----BEGIN PGP (MESSAGE, PART \d+\/\d+|MESSAGE, PART \d+|SIGNED MESSAGE|MESSAGE|PUBLIC KEY BLOCK|PRIVATE KEY BLOCK|SIGNATURE)-----$/m);if(!t)throw Error("Unknown ASCII armor type");return/MESSAGE, PART \d+\/\d+/.test(t[1])?B.armor.multipartSection:/MESSAGE, PART \d+/.test(t[1])?B.armor.multipartLast:/SIGNED MESSAGE/.test(t[1])?B.armor.signed:/MESSAGE/.test(t[1])?B.armor.message:/PUBLIC KEY BLOCK/.test(t[1])?B.armor.publicKey:/PRIVATE KEY BLOCK/.test(t[1])?B.armor.privateKey:/SIGNATURE/.test(t[1])?B.armor.signature:void 0}function q(e,t){let r="";return t.showVersion&&(r+="Version: "+t.versionString+"\n"),t.showComment&&(r+="Comment: "+t.commentString+"\n"),e&&(r+="Comment: "+e+"\n"),r+="\n",r}function V(e){const t=function(e){let t=13501623;return k(e,(e=>{const r=$?Math.floor(e.length/4):0,i=new Uint32Array(e.buffer,e.byteOffset,r);for(let e=0;e<r;e++)t^=i[e],t=W[0][t>>24&255]^W[1][t>>16&255]^W[2][t>>8&255]^W[3][255&t];for(let i=4*r;i<e.length;i++)t=t>>8^W[0][255&t^e[i]]}),(()=>new Uint8Array([t,t>>8,t>>16])))}(e);return j(t)}N?(R=e=>N.from(e).toString("base64"),z=e=>{const t=N.from(e,"base64");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}):(R=e=>btoa(L.uint8ArrayToString(e)),z=e=>L.stringToUint8Array(atob(e)));const W=[Array(255),Array(255),Array(255),Array(255)];for(let e=0;e<=255;e++){let t=e<<16;for(let e=0;e<8;e++)t=t<<1^(8388608&t?8801531:0);W[0][e]=(16711680&t)>>16|65280&t|(255&t)<<16}for(let e=0;e<=255;e++)W[1][e]=W[0][e]>>8^W[0][255&W[0][e]];for(let e=0;e<=255;e++)W[2][e]=W[1][e]>>8^W[0][255&W[1][e]];for(let e=0;e<=255;e++)W[3][e]=W[2][e]>>8^W[0][255&W[2][e]];const $=function(){const e=new ArrayBuffer(2);return new DataView(e).setInt16(0,255,!0),255===new Int16Array(e)[0]}();function Q(e){for(let t=0;t<e.length;t++)/^([^\s:]|[^\s:][^:]*[^\s:]): .+$/.test(e[t])||L.printDebugError(Error("Improperly formatted armor header: "+e[t])),/^(Version|Comment|MessageID|Hash|Charset): .+$/.test(e[t])||L.printDebugError(Error("Unknown header: "+e[t]))}function X(e){let t=e;const r=e.lastIndexOf("=");return r>=0&&r!==e.length-1&&(t=e.slice(0,r)),t}function Y(e){return new Promise((async(t,r)=>{try{const i=/^-----[^-]+-----$/m,n=/^[ \f\r\t\u00a0\u2000-\u200a\u202f\u205f\u3000]*$/;let s;const a=[];let o,c,u=a,h=[];const y=O(v(e,(async(e,l)=>{const p=I(e);try{for(;;){let e=await p.readLine();if(void 0===e)throw Error("Misformed armored text");if(e=L.removeTrailingSpaces(e.replace(/[\r\n]/g,"")),s)if(o)c||s!==B.armor.signed||(i.test(e)?(h=h.join("\r\n"),c=!0,Q(u),u=[],o=!1):h.push(e.replace(/^- /,"")));else if(i.test(e)&&r(Error("Mandatory blank line missing between armor headers and armor data")),n.test(e)){if(Q(u),o=!0,c||s!==B.armor.signed){t({text:h,data:y,headers:a,type:s});break}}else u.push(e);else i.test(e)&&(s=G(e))}}catch(e){return void r(e)}const g=C(l);try{for(;;){await g.ready;const{done:e,value:t}=await p.read();if(e)throw Error("Misformed armored text");const r=t+"";if(-1!==r.indexOf("=")||-1!==r.indexOf("-")){let e=await p.readToEnd();e.length||(e=""),e=r+e,e=L.removeTrailingSpaces(e.replace(/\r/g,""));const t=e.split(i);if(1===t.length)throw Error("Misformed armored text");const n=X(t[0].slice(0,-1));await g.write(n);break}await g.write(r)}await g.ready,await g.close()}catch(e){await g.abort(e)}})))}catch(e){r(e)}})).then((async e=>(a(e.data)&&(e.data=await U(e.data)),e)))}function Z(e,t,r,i,n,s=!1,a=M){let o,c;e===B.armor.signed&&(o=t.text,c=t.hash,t=t.data);const u=s&&E(t),h=[];switch(e){case B.armor.multipartSection:h.push("-----BEGIN PGP MESSAGE, PART "+r+"/"+i+"-----\n"),h.push(q(n,a)),h.push(j(t)),u&&h.push("=",V(u)),h.push("-----END PGP MESSAGE, PART "+r+"/"+i+"-----\n");break;case B.armor.multipartLast:h.push("-----BEGIN PGP MESSAGE, PART "+r+"-----\n"),h.push(q(n,a)),h.push(j(t)),u&&h.push("=",V(u)),h.push("-----END PGP MESSAGE, PART "+r+"-----\n");break;case B.armor.signed:h.push("-----BEGIN PGP SIGNED MESSAGE-----\n"),h.push(c?`Hash: ${c}\n\n`:"\n"),h.push(o.replace(/^-/gm,"- -")),h.push("\n-----BEGIN PGP SIGNATURE-----\n"),h.push(q(n,a)),h.push(j(t)),u&&h.push("=",V(u)),h.push("-----END PGP SIGNATURE-----\n");break;case B.armor.message:h.push("-----BEGIN PGP MESSAGE-----\n"),h.push(q(n,a)),h.push(j(t)),u&&h.push("=",V(u)),h.push("-----END PGP MESSAGE-----\n");break;case B.armor.publicKey:h.push("-----BEGIN PGP PUBLIC KEY BLOCK-----\n"),h.push(q(n,a)),h.push(j(t)),u&&h.push("=",V(u)),h.push("-----END PGP PUBLIC KEY BLOCK-----\n");break;case B.armor.privateKey:h.push("-----BEGIN PGP PRIVATE KEY BLOCK-----\n"),h.push(q(n,a)),h.push(j(t)),u&&h.push("=",V(u)),h.push("-----END PGP PRIVATE KEY BLOCK-----\n");break;case B.armor.signature:h.push("-----BEGIN PGP SIGNATURE-----\n"),h.push(q(n,a)),h.push(j(t)),u&&h.push("=",V(u)),h.push("-----END PGP SIGNATURE-----\n")}return L.concat(h)}const J=BigInt(0),ee=BigInt(1);function te(e){const t="0123456789ABCDEF";let r="";return e.forEach((e=>{r+=t[e>>4]+t[15&e]})),BigInt("0x0"+r)}function re(e,t){const r=e%t;return r<J?r+t:r}function ie(e,t,r){if(r===J)throw Error("Modulo cannot be zero");if(r===ee)return BigInt(0);if(t<J)throw Error("Unsopported negative exponent");let i=t,n=e;n%=r;let s=BigInt(1);for(;i>J;){const e=iⅇi>>=ee;s=e?s*n%r:s,n=n*n%r}return s}function ne(e){return e>=J?e:-e}function se(e,t){const{gcd:r,x:i}=function(e,t){let r=BigInt(0),i=BigInt(1),n=BigInt(1),s=BigInt(0),a=ne(e),o=ne(t);const c=e<J,u=t<J;for(;o!==J;){const e=a/o;let t=r;r=n-e*r,n=t,t=i,i=s-e*i,s=t,t=o,o=a%o,a=t}return{x:c?-n:n,y:u?-s:s,gcd:a}}(e,t);if(r!==ee)throw Error("Inverse does not exist");return re(i+t,t)}function ae(e){const t=Number(e);if(t>Number.MAX_SAFE_INTEGER)throw Error("Number can only safely store up to 53 bits");return t}function oe(e,t){return(e>>BigInt(t)&ee)===J?0:1}function ce(e){const t=e<J?BigInt(-1):J;let r=1,i=e;for(;(i>>=ee)!==t;)r++;return r}function ue(e){const t=e<J?BigInt(-1):J,r=BigInt(8);let i=1,n=e;for(;(n>>=r)!==t;)i++;return i}function he(e,t="be",r){let i=e.toString(16);i.length%2==1&&(i="0"+i);const n=i.length/2,s=new Uint8Array(r||n),a=r?r-n:0;let o=0;for(;o<n;)s[o+a]=parseInt(i.slice(2*o,2*o+2),16),o++;return"be"!==t&&s.reverse(),s}const ye=L.getNodeCrypto();function le(e){const t="undefined"!=typeof crypto?crypto:ye?.webcrypto;if(t?.getRandomValues){const r=new Uint8Array(e);return t.getRandomValues(r)}throw Error("No secure random number generator available.")}function pe(e,t){if(t<e)throw Error("Illegal parameter value: max <= min");const r=t-e;return re(te(le(ue(r)+8)),r)+e}const ge=BigInt(1);function de(e,t,r){const i=BigInt(30),n=ge<<BigInt(e-1),s=[1,6,5,4,3,2,1,4,3,2,1,2,1,4,3,2,1,2,1,4,3,2,1,6,5,4,3,2,1,2];let a=pe(n,n<<ge),o=ae(re(a,i));do{a+=BigInt(s[o]),o=(o+s[o])%s.length,ce(a)>e&&(a=re(a,n<<ge),a+=n,o=ae(re(a,i)))}while(!fe(a,t,r));return a}function fe(e,t,r){return(!t||function(e,t){let r=e,i=t;for(;i!==J;){const e=i;i=r%i,r=e}return r}(e-ge,t)===ge)&&(!!function(e){const t=BigInt(0);return we.every((r=>re(e,r)!==t))}(e)&&(!!function(e,t=BigInt(2)){return ie(t,e-ge,e)===ge}(e)&&!!function(e,t){const r=ce(e);t||(t=Math.max(1,r/48|0));const i=e-ge;let n=0;for(;!oe(i,n);)n++;const s=e>>BigInt(n);for(;t>0;t--){let t,r=ie(pe(BigInt(2),i),s,e);if(r!==ge&&r!==i){for(t=1;t<n;t++){if(r=re(r*r,e),r===ge)return!1;if(r===i)break}if(t===n)return!1}}return!0}(e,r)))}const we=[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,1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,1151,1153,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487,1489,1493,1499,1511,1523,1531,1543,1549,1553,1559,1567,1571,1579,1583,1597,1601,1607,1609,1613,1619,1621,1627,1637,1657,1663,1667,1669,1693,1697,1699,1709,1721,1723,1733,1741,1747,1753,1759,1777,1783,1787,1789,1801,1811,1823,1831,1847,1861,1867,1871,1873,1877,1879,1889,1901,1907,1913,1931,1933,1949,1951,1973,1979,1987,1993,1997,1999,2003,2011,2017,2027,2029,2039,2053,2063,2069,2081,2083,2087,2089,2099,2111,2113,2129,2131,2137,2141,2143,2153,2161,2179,2203,2207,2213,2221,2237,2239,2243,2251,2267,2269,2273,2281,2287,2293,2297,2309,2311,2333,2339,2341,2347,2351,2357,2371,2377,2381,2383,2389,2393,2399,2411,2417,2423,2437,2441,2447,2459,2467,2473,2477,2503,2521,2531,2539,2543,2549,2551,2557,2579,2591,2593,2609,2617,2621,2633,2647,2657,2659,2663,2671,2677,2683,2687,2689,2693,2699,2707,2711,2713,2719,2729,2731,2741,2749,2753,2767,2777,2789,2791,2797,2801,2803,2819,2833,2837,2843,2851,2857,2861,2879,2887,2897,2903,2909,2917,2927,2939,2953,2957,2963,2969,2971,2999,3001,3011,3019,3023,3037,3041,3049,3061,3067,3079,3083,3089,3109,3119,3121,3137,3163,3167,3169,3181,3187,3191,3203,3209,3217,3221,3229,3251,3253,3257,3259,3271,3299,3301,3307,3313,3319,3323,3329,3331,3343,3347,3359,3361,3371,3373,3389,3391,3407,3413,3433,3449,3457,3461,3463,3467,3469,3491,3499,3511,3517,3527,3529,3533,3539,3541,3547,3557,3559,3571,3581,3583,3593,3607,3613,3617,3623,3631,3637,3643,3659,3671,3673,3677,3691,3697,3701,3709,3719,3727,3733,3739,3761,3767,3769,3779,3793,3797,3803,3821,3823,3833,3847,3851,3853,3863,3877,3881,3889,3907,3911,3917,3919,3923,3929,3931,3943,3947,3967,3989,4001,4003,4007,4013,4019,4021,4027,4049,4051,4057,4073,4079,4091,4093,4099,4111,4127,4129,4133,4139,4153,4157,4159,4177,4201,4211,4217,4219,4229,4231,4241,4243,4253,4259,4261,4271,4273,4283,4289,4297,4327,4337,4339,4349,4357,4363,4373,4391,4397,4409,4421,4423,4441,4447,4451,4457,4463,4481,4483,4493,4507,4513,4517,4519,4523,4547,4549,4561,4567,4583,4591,4597,4603,4621,4637,4639,4643,4649,4651,4657,4663,4673,4679,4691,4703,4721,4723,4729,4733,4751,4759,4783,4787,4789,4793,4799,4801,4813,4817,4831,4861,4871,4877,4889,4903,4909,4919,4931,4933,4937,4943,4951,4957,4967,4969,4973,4987,4993,4999].map((e=>BigInt(e)));const me=L.getWebCrypto(),be=L.getNodeCrypto(),ke=be&&be.getHashes();function ve(e){if(be&&ke.includes(e))return async function(t){const r=be.createHash(e);return k(t,(e=>{r.update(e)}),(()=>new Uint8Array(r.digest())))}}function Ae(e,t){const r=async()=>{const{nobleHashes:t}=await import("./noble_hashes.min.mjs"),r=t.get(e);if(!r)throw Error("Unsupported hash");return r};return async function(e){if(a(e)&&(e=await U(e)),L.isStream(e)){const t=(await r()).create();return k(e,(e=>{t.update(e)}),(()=>t.digest()))}if(me&&t)return new Uint8Array(await me.digest(t,e));return(await r())(e)}}const Ke=ve("md5")||Ae("md5"),Ee=ve("sha1")||Ae("sha1","SHA-1"),Se=ve("sha224")||Ae("sha224"),Pe=ve("sha256")||Ae("sha256","SHA-256"),Ue=ve("sha384")||Ae("sha384","SHA-384"),De=ve("sha512")||Ae("sha512","SHA-512"),xe=ve("ripemd160")||Ae("ripemd160"),Ie=ve("sha3-256")||Ae("sha3_256"),Ce=ve("sha3-512")||Ae("sha3_512");function Te(e,t){switch(e){case B.hash.md5:return Ke(t);case B.hash.sha1:return Ee(t);case B.hash.ripemd:return xe(t);case B.hash.sha256:return Pe(t);case B.hash.sha384:return Ue(t);case B.hash.sha512:return De(t);case B.hash.sha224:return Se(t);case B.hash.sha3_256:return Ie(t);case B.hash.sha3_512:return Ce(t);default:throw Error("Unsupported hash function")}}function Be(e){switch(e){case B.hash.md5:return 16;case B.hash.sha1:case B.hash.ripemd:return 20;case B.hash.sha256:return 32;case B.hash.sha384:return 48;case B.hash.sha512:return 64;case B.hash.sha224:return 28;case B.hash.sha3_256:return 32;case B.hash.sha3_512:return 64;default:throw Error("Invalid hash algorithm.")}}const Me=[];function Fe(e,t){const r=e.length;if(r>t-11)throw Error("Message too long");const i=function(e){const t=new Uint8Array(e);let r=0;for(;r<e;){const i=le(e-r);for(let e=0;e<i.length;e++)0!==i[e]&&(t[r++]=i[e])}return t}(t-r-3),n=new Uint8Array(t);return n[1]=2,n.set(i,2),n.set(e,t-r),n}function Le(e,t){let r=2,i=1;for(let t=r;t<e.length;t++)i&=0!==e[t],r+=i;const n=r-2,s=e.subarray(r+1),a=0===e[0]&2===e[1]&n>=8&!i;if(t)return L.selectUint8Array(a,s,t);if(a)return s;throw Error("Decryption error")}function Ne(e,t,r){let i;if(t.length!==Be(e))throw Error("Invalid hash length");const n=new Uint8Array(Me[e].length);for(i=0;i<Me[e].length;i++)n[i]=Me[e][i];const s=n.length+t.length;if(r<s+11)throw Error("Intended encoded message length too short");const a=new Uint8Array(r-s-3).fill(255),o=new Uint8Array(r);return o[1]=1,o.set(a,2),o.set(n,r-s),o.set(t,r-t.length),o}Me[1]=[48,32,48,12,6,8,42,134,72,134,247,13,2,5,5,0,4,16],Me[2]=[48,33,48,9,6,5,43,14,3,2,26,5,0,4,20],Me[3]=[48,33,48,9,6,5,43,36,3,2,1,5,0,4,20],Me[8]=[48,49,48,13,6,9,96,134,72,1,101,3,4,2,1,5,0,4,32],Me[9]=[48,65,48,13,6,9,96,134,72,1,101,3,4,2,2,5,0,4,48],Me[10]=[48,81,48,13,6,9,96,134,72,1,101,3,4,2,3,5,0,4,64],Me[11]=[48,45,48,13,6,9,96,134,72,1,101,3,4,2,4,5,0,4,28];const Re=L.getWebCrypto(),ze=L.getNodeCrypto(),je=BigInt(1);async function Oe(e,t,r,i,n,s,a,o,c){if(Be(e)>=r.length)throw Error("Digest size cannot exceed key modulus size");if(t&&!L.isStream(t))if(L.getWebCrypto())try{return await async function(e,t,r,i,n,s,a,o){const c=await qe(r,i,n,s,a,o),u={name:"RSASSA-PKCS1-v1_5",hash:{name:e}},h=await Re.importKey("jwk",c,u,!1,["sign"]);return new Uint8Array(await Re.sign("RSASSA-PKCS1-v1_5",h,t))}(B.read(B.webHash,e),t,r,i,n,s,a,o)}catch(e){L.printDebugError(e)}else if(L.getNodeCrypto())return async function(e,t,r,i,n,s,a,o){const c=ze.createSign(B.read(B.hash,e));c.write(t),c.end();const u=await qe(r,i,n,s,a,o);return new Uint8Array(c.sign({key:u,format:"jwk",type:"pkcs1"}))}(e,t,r,i,n,s,a,o);return async function(e,t,r,i){t=te(t);const n=te(Ne(e,i,ue(t)));return r=te(r),he(ie(n,r,t),"be",ue(t))}(e,r,n,c)}async function He(e,t,r,i,n,s){if(t&&!L.isStream(t))if(L.getWebCrypto())try{return await async function(e,t,r,i,n){const s=Ve(i,n),a=await Re.importKey("jwk",s,{name:"RSASSA-PKCS1-v1_5",hash:{name:e}},!1,["verify"]);return Re.verify("RSASSA-PKCS1-v1_5",a,r,t)}(B.read(B.webHash,e),t,r,i,n)}catch(e){L.printDebugError(e)}else if(L.getNodeCrypto())return async function(e,t,r,i,n){const s=Ve(i,n),a={key:s,format:"jwk",type:"pkcs1"},o=ze.createVerify(B.read(B.hash,e));o.write(t),o.end();try{return o.verify(a,r)}catch(e){return!1}}(e,t,r,i,n);return async function(e,t,r,i,n){if(r=te(r),t=te(t),i=te(i),t>=r)throw Error("Signature size cannot exceed modulus size");const s=he(ie(t,i,r),"be",ue(r)),a=Ne(e,n,ue(r));return L.equalsUint8Array(s,a)}(e,r,i,n,s)}async function _e(e,t,r){return L.getNodeCrypto()?async function(e,t,r){const i=Ve(t,r),n={key:i,format:"jwk",type:"pkcs1",padding:ze.constants.RSA_PKCS1_PADDING};return new Uint8Array(ze.publicEncrypt(n,e))}(e,t,r):async function(e,t,r){if(t=te(t),e=te(Fe(e,ue(t))),r=te(r),e>=t)throw Error("Message size cannot exceed modulus size");return he(ie(e,r,t),"be",ue(t))}(e,t,r)}async function Ge(e,t,r,i,n,s,a,o){if(L.getNodeCrypto()&&!o)try{return await async function(e,t,r,i,n,s,a){const o=await qe(t,r,i,n,s,a),c={key:o,format:"jwk",type:"pkcs1",padding:ze.constants.RSA_PKCS1_PADDING};try{return new Uint8Array(ze.privateDecrypt(c,e))}catch(e){throw Error("Decryption error")}}(e,t,r,i,n,s,a)}catch(e){L.printDebugError(e)}return async function(e,t,r,i,n,s,a,o){if(e=te(e),t=te(t),r=te(r),i=te(i),n=te(n),s=te(s),a=te(a),e>=t)throw Error("Data too large.");const c=re(i,s-je),u=re(i,n-je),h=pe(BigInt(2),t),y=ie(se(h,t),r,t);e=re(e*y,t);const l=ie(e,u,n),p=ie(e,c,s),g=re(a*(p-l),s);let d=g*n+l;return d=re(d*h,t),Le(he(d,"be",ue(t)),o)}(e,t,r,i,n,s,a,o)}async function qe(e,t,r,i,n,s){const a=te(i),o=te(n),c=te(r);let u=re(c,o-je),h=re(c,a-je);return h=he(h),u=he(u),{kty:"RSA",n:_(e),e:_(t),d:_(r),p:_(n),q:_(i),dp:_(u),dq:_(h),qi:_(s),ext:!0}}function Ve(e,t){return{kty:"RSA",n:_(e),e:_(t),ext:!0}}function We(e,t){return{n:H(e.n),e:he(t),d:H(e.d),p:H(e.q),q:H(e.p),u:H(e.qi)}}const $e=BigInt(1);const Qe="object"==typeof e&&"crypto"in e?e.crypto:void 0,Xe={};var Ye=function(e){var t,r=new Float64Array(16);if(e)for(t=0;t<e.length;t++)r[t]=e[t];return r},Ze=function(){throw Error("no PRNG")},Je=new Uint8Array(32);Je[0]=9;var et=Ye(),tt=Ye([1]),rt=Ye([56129,1]),it=Ye([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),nt=Ye([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),st=Ye([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),at=Ye([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),ot=Ye([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function ct(e,t,r,i){e[t]=r>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r,e[t+4]=i>>24&255,e[t+5]=i>>16&255,e[t+6]=i>>8&255,e[t+7]=255&i}function ut(e,t,r,i){return function(e,t,r,i,n){var s,a=0;for(s=0;s<n;s++)a|=e[t+s]^r[i+s];return(1&a-1>>>8)-1}(e,t,r,i,32)}function ht(e,t){var r;for(r=0;r<16;r++)e[r]=0|t[r]}function yt(e){var t,r,i=1;for(t=0;t<16;t++)r=e[t]+i+65535,i=Math.floor(r/65536),e[t]=r-65536*i;e[0]+=i-1+37*(i-1)}function lt(e,t,r){for(var i,n=~(r-1),s=0;s<16;s++)i=n&(e[s]^t[s]),e[s]^=i,t[s]^=i}function pt(e,t){var r,i,n,s=Ye(),a=Ye();for(r=0;r<16;r++)a[r]=t[r];for(yt(a),yt(a),yt(a),i=0;i<2;i++){for(s[0]=a[0]-65517,r=1;r<15;r++)s[r]=a[r]-65535-(s[r-1]>>16&1),s[r-1]&=65535;s[15]=a[15]-32767-(s[14]>>16&1),n=s[15]>>16&1,s[14]&=65535,lt(a,s,1-n)}for(r=0;r<16;r++)e[2*r]=255&a[r],e[2*r+1]=a[r]>>8}function gt(e,t){var r=new Uint8Array(32),i=new Uint8Array(32);return pt(r,e),pt(i,t),ut(r,0,i,0)}function dt(e){var t=new Uint8Array(32);return pt(t,e),1&t[0]}function ft(e,t){var r;for(r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}function wt(e,t,r){for(var i=0;i<16;i++)e[i]=t[i]+r[i]}function mt(e,t,r){for(var i=0;i<16;i++)e[i]=t[i]-r[i]}function bt(e,t,r){var i,n,s=0,a=0,o=0,c=0,u=0,h=0,y=0,l=0,p=0,g=0,d=0,f=0,w=0,m=0,b=0,k=0,v=0,A=0,K=0,E=0,S=0,P=0,U=0,D=0,x=0,I=0,C=0,T=0,B=0,M=0,F=0,L=r[0],N=r[1],R=r[2],z=r[3],j=r[4],O=r[5],H=r[6],_=r[7],G=r[8],q=r[9],V=r[10],W=r[11],$=r[12],Q=r[13],X=r[14],Y=r[15];s+=(i=t[0])*L,a+=i*N,o+=i*R,c+=i*z,u+=i*j,h+=i*O,y+=i*H,l+=i*_,p+=i*G,g+=i*q,d+=i*V,f+=i*W,w+=i*$,m+=i*Q,b+=i*X,k+=i*Y,a+=(i=t[1])*L,o+=i*N,c+=i*R,u+=i*z,h+=i*j,y+=i*O,l+=i*H,p+=i*_,g+=i*G,d+=i*q,f+=i*V,w+=i*W,m+=i*$,b+=i*Q,k+=i*X,v+=i*Y,o+=(i=t[2])*L,c+=i*N,u+=i*R,h+=i*z,y+=i*j,l+=i*O,p+=i*H,g+=i*_,d+=i*G,f+=i*q,w+=i*V,m+=i*W,b+=i*$,k+=i*Q,v+=i*X,A+=i*Y,c+=(i=t[3])*L,u+=i*N,h+=i*R,y+=i*z,l+=i*j,p+=i*O,g+=i*H,d+=i*_,f+=i*G,w+=i*q,m+=i*V,b+=i*W,k+=i*$,v+=i*Q,A+=i*X,K+=i*Y,u+=(i=t[4])*L,h+=i*N,y+=i*R,l+=i*z,p+=i*j,g+=i*O,d+=i*H,f+=i*_,w+=i*G,m+=i*q,b+=i*V,k+=i*W,v+=i*$,A+=i*Q,K+=i*X,E+=i*Y,h+=(i=t[5])*L,y+=i*N,l+=i*R,p+=i*z,g+=i*j,d+=i*O,f+=i*H,w+=i*_,m+=i*G,b+=i*q,k+=i*V,v+=i*W,A+=i*$,K+=i*Q,E+=i*X,S+=i*Y,y+=(i=t[6])*L,l+=i*N,p+=i*R,g+=i*z,d+=i*j,f+=i*O,w+=i*H,m+=i*_,b+=i*G,k+=i*q,v+=i*V,A+=i*W,K+=i*$,E+=i*Q,S+=i*X,P+=i*Y,l+=(i=t[7])*L,p+=i*N,g+=i*R,d+=i*z,f+=i*j,w+=i*O,m+=i*H,b+=i*_,k+=i*G,v+=i*q,A+=i*V,K+=i*W,E+=i*$,S+=i*Q,P+=i*X,U+=i*Y,p+=(i=t[8])*L,g+=i*N,d+=i*R,f+=i*z,w+=i*j,m+=i*O,b+=i*H,k+=i*_,v+=i*G,A+=i*q,K+=i*V,E+=i*W,S+=i*$,P+=i*Q,U+=i*X,D+=i*Y,g+=(i=t[9])*L,d+=i*N,f+=i*R,w+=i*z,m+=i*j,b+=i*O,k+=i*H,v+=i*_,A+=i*G,K+=i*q,E+=i*V,S+=i*W,P+=i*$,U+=i*Q,D+=i*X,x+=i*Y,d+=(i=t[10])*L,f+=i*N,w+=i*R,m+=i*z,b+=i*j,k+=i*O,v+=i*H,A+=i*_,K+=i*G,E+=i*q,S+=i*V,P+=i*W,U+=i*$,D+=i*Q,x+=i*X,I+=i*Y,f+=(i=t[11])*L,w+=i*N,m+=i*R,b+=i*z,k+=i*j,v+=i*O,A+=i*H,K+=i*_,E+=i*G,S+=i*q,P+=i*V,U+=i*W,D+=i*$,x+=i*Q,I+=i*X,C+=i*Y,w+=(i=t[12])*L,m+=i*N,b+=i*R,k+=i*z,v+=i*j,A+=i*O,K+=i*H,E+=i*_,S+=i*G,P+=i*q,U+=i*V,D+=i*W,x+=i*$,I+=i*Q,C+=i*X,T+=i*Y,m+=(i=t[13])*L,b+=i*N,k+=i*R,v+=i*z,A+=i*j,K+=i*O,E+=i*H,S+=i*_,P+=i*G,U+=i*q,D+=i*V,x+=i*W,I+=i*$,C+=i*Q,T+=i*X,B+=i*Y,b+=(i=t[14])*L,k+=i*N,v+=i*R,A+=i*z,K+=i*j,E+=i*O,S+=i*H,P+=i*_,U+=i*G,D+=i*q,x+=i*V,I+=i*W,C+=i*$,T+=i*Q,B+=i*X,M+=i*Y,k+=(i=t[15])*L,a+=38*(A+=i*R),o+=38*(K+=i*z),c+=38*(E+=i*j),u+=38*(S+=i*O),h+=38*(P+=i*H),y+=38*(U+=i*_),l+=38*(D+=i*G),p+=38*(x+=i*q),g+=38*(I+=i*V),d+=38*(C+=i*W),f+=38*(T+=i*$),w+=38*(B+=i*Q),m+=38*(M+=i*X),b+=38*(F+=i*Y),s=(i=(s+=38*(v+=i*N))+(n=1)+65535)-65536*(n=Math.floor(i/65536)),a=(i=a+n+65535)-65536*(n=Math.floor(i/65536)),o=(i=o+n+65535)-65536*(n=Math.floor(i/65536)),c=(i=c+n+65535)-65536*(n=Math.floor(i/65536)),u=(i=u+n+65535)-65536*(n=Math.floor(i/65536)),h=(i=h+n+65535)-65536*(n=Math.floor(i/65536)),y=(i=y+n+65535)-65536*(n=Math.floor(i/65536)),l=(i=l+n+65535)-65536*(n=Math.floor(i/65536)),p=(i=p+n+65535)-65536*(n=Math.floor(i/65536)),g=(i=g+n+65535)-65536*(n=Math.floor(i/65536)),d=(i=d+n+65535)-65536*(n=Math.floor(i/65536)),f=(i=f+n+65535)-65536*(n=Math.floor(i/65536)),w=(i=w+n+65535)-65536*(n=Math.floor(i/65536)),m=(i=m+n+65535)-65536*(n=Math.floor(i/65536)),b=(i=b+n+65535)-65536*(n=Math.floor(i/65536)),k=(i=k+n+65535)-65536*(n=Math.floor(i/65536)),s=(i=(s+=n-1+37*(n-1))+(n=1)+65535)-65536*(n=Math.floor(i/65536)),a=(i=a+n+65535)-65536*(n=Math.floor(i/65536)),o=(i=o+n+65535)-65536*(n=Math.floor(i/65536)),c=(i=c+n+65535)-65536*(n=Math.floor(i/65536)),u=(i=u+n+65535)-65536*(n=Math.floor(i/65536)),h=(i=h+n+65535)-65536*(n=Math.floor(i/65536)),y=(i=y+n+65535)-65536*(n=Math.floor(i/65536)),l=(i=l+n+65535)-65536*(n=Math.floor(i/65536)),p=(i=p+n+65535)-65536*(n=Math.floor(i/65536)),g=(i=g+n+65535)-65536*(n=Math.floor(i/65536)),d=(i=d+n+65535)-65536*(n=Math.floor(i/65536)),f=(i=f+n+65535)-65536*(n=Math.floor(i/65536)),w=(i=w+n+65535)-65536*(n=Math.floor(i/65536)),m=(i=m+n+65535)-65536*(n=Math.floor(i/65536)),b=(i=b+n+65535)-65536*(n=Math.floor(i/65536)),k=(i=k+n+65535)-65536*(n=Math.floor(i/65536)),s+=n-1+37*(n-1),e[0]=s,e[1]=a,e[2]=o,e[3]=c,e[4]=u,e[5]=h,e[6]=y,e[7]=l,e[8]=p,e[9]=g,e[10]=d,e[11]=f,e[12]=w,e[13]=m,e[14]=b,e[15]=k}function kt(e,t){bt(e,t,t)}function vt(e,t){var r,i=Ye();for(r=0;r<16;r++)i[r]=t[r];for(r=253;r>=0;r--)kt(i,i),2!==r&&4!==r&&bt(i,i,t);for(r=0;r<16;r++)e[r]=i[r]}function At(e,t,r){var i,n,s=new Uint8Array(32),a=new Float64Array(80),o=Ye(),c=Ye(),u=Ye(),h=Ye(),y=Ye(),l=Ye();for(n=0;n<31;n++)s[n]=t[n];for(s[31]=127&t[31]|64,s[0]&=248,ft(a,r),n=0;n<16;n++)c[n]=a[n],h[n]=o[n]=u[n]=0;for(o[0]=h[0]=1,n=254;n>=0;--n)lt(o,c,i=s[n>>>3]>>>(7&n)&1),lt(u,h,i),wt(y,o,u),mt(o,o,u),wt(u,c,h),mt(c,c,h),kt(h,y),kt(l,o),bt(o,u,o),bt(u,c,y),wt(y,o,u),mt(o,o,u),kt(c,o),mt(u,h,l),bt(o,u,rt),wt(o,o,h),bt(u,u,o),bt(o,h,l),bt(h,c,a),kt(c,y),lt(o,c,i),lt(u,h,i);for(n=0;n<16;n++)a[n+16]=o[n],a[n+32]=u[n],a[n+48]=c[n],a[n+64]=h[n];var p=a.subarray(32),g=a.subarray(16);return vt(p,p),bt(g,g,p),pt(e,g),0}function Kt(e,t){return At(e,t,Je)}var Et=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function St(e,t,r,i){for(var n,s,a,o,c,u,h,y,l,p,g,d,f,w,m,b,k,v,A,K,E,S,P,U,D,x,I=new Int32Array(16),C=new Int32Array(16),T=e[0],B=e[1],M=e[2],F=e[3],L=e[4],N=e[5],R=e[6],z=e[7],j=t[0],O=t[1],H=t[2],_=t[3],G=t[4],q=t[5],V=t[6],W=t[7],$=0;i>=128;){for(A=0;A<16;A++)K=8*A+$,I[A]=r[K+0]<<24|r[K+1]<<16|r[K+2]<<8|r[K+3],C[A]=r[K+4]<<24|r[K+5]<<16|r[K+6]<<8|r[K+7];for(A=0;A<80;A++)if(n=T,s=B,a=M,o=F,c=L,u=N,h=R,z,l=j,p=O,g=H,d=_,f=G,w=q,m=V,W,P=65535&(S=W),U=S>>>16,D=65535&(E=z),x=E>>>16,P+=65535&(S=(G>>>14|L<<18)^(G>>>18|L<<14)^(L>>>9|G<<23)),U+=S>>>16,D+=65535&(E=(L>>>14|G<<18)^(L>>>18|G<<14)^(G>>>9|L<<23)),x+=E>>>16,P+=65535&(S=G&q^~G&V),U+=S>>>16,D+=65535&(E=L&N^~L&R),x+=E>>>16,E=Et[2*A],P+=65535&(S=Et[2*A+1]),U+=S>>>16,D+=65535&E,x+=E>>>16,E=I[A%16],U+=(S=C[A%16])>>>16,D+=65535&E,x+=E>>>16,D+=(U+=(P+=65535&S)>>>16)>>>16,P=65535&(S=v=65535&P|U<<16),U=S>>>16,D=65535&(E=k=65535&D|(x+=D>>>16)<<16),x=E>>>16,P+=65535&(S=(j>>>28|T<<4)^(T>>>2|j<<30)^(T>>>7|j<<25)),U+=S>>>16,D+=65535&(E=(T>>>28|j<<4)^(j>>>2|T<<30)^(j>>>7|T<<25)),x+=E>>>16,U+=(S=j&O^j&H^O&H)>>>16,D+=65535&(E=T&B^T&M^B&M),x+=E>>>16,y=65535&(D+=(U+=(P+=65535&S)>>>16)>>>16)|(x+=D>>>16)<<16,b=65535&P|U<<16,P=65535&(S=d),U=S>>>16,D=65535&(E=o),x=E>>>16,U+=(S=v)>>>16,D+=65535&(E=k),x+=E>>>16,B=n,M=s,F=a,L=o=65535&(D+=(U+=(P+=65535&S)>>>16)>>>16)|(x+=D>>>16)<<16,N=c,R=u,z=h,T=y,O=l,H=p,_=g,G=d=65535&P|U<<16,q=f,V=w,W=m,j=b,A%16==15)for(K=0;K<16;K++)E=I[K],P=65535&(S=C[K]),U=S>>>16,D=65535&E,x=E>>>16,E=I[(K+9)%16],P+=65535&(S=C[(K+9)%16]),U+=S>>>16,D+=65535&E,x+=E>>>16,k=I[(K+1)%16],P+=65535&(S=((v=C[(K+1)%16])>>>1|k<<31)^(v>>>8|k<<24)^(v>>>7|k<<25)),U+=S>>>16,D+=65535&(E=(k>>>1|v<<31)^(k>>>8|v<<24)^k>>>7),x+=E>>>16,k=I[(K+14)%16],U+=(S=((v=C[(K+14)%16])>>>19|k<<13)^(k>>>29|v<<3)^(v>>>6|k<<26))>>>16,D+=65535&(E=(k>>>19|v<<13)^(v>>>29|k<<3)^k>>>6),x+=E>>>16,x+=(D+=(U+=(P+=65535&S)>>>16)>>>16)>>>16,I[K]=65535&D|x<<16,C[K]=65535&P|U<<16;P=65535&(S=j),U=S>>>16,D=65535&(E=T),x=E>>>16,E=e[0],U+=(S=t[0])>>>16,D+=65535&E,x+=E>>>16,x+=(D+=(U+=(P+=65535&S)>>>16)>>>16)>>>16,e[0]=T=65535&D|x<<16,t[0]=j=65535&P|U<<16,P=65535&(S=O),U=S>>>16,D=65535&(E=B),x=E>>>16,E=e[1],U+=(S=t[1])>>>16,D+=65535&E,x+=E>>>16,x+=(D+=(U+=(P+=65535&S)>>>16)>>>16)>>>16,e[1]=B=65535&D|x<<16,t[1]=O=65535&P|U<<16,P=65535&(S=H),U=S>>>16,D=65535&(E=M),x=E>>>16,E=e[2],U+=(S=t[2])>>>16,D+=65535&E,x+=E>>>16,x+=(D+=(U+=(P+=65535&S)>>>16)>>>16)>>>16,e[2]=M=65535&D|x<<16,t[2]=H=65535&P|U<<16,P=65535&(S=_),U=S>>>16,D=65535&(E=F),x=E>>>16,E=e[3],U+=(S=t[3])>>>16,D+=65535&E,x+=E>>>16,x+=(D+=(U+=(P+=65535&S)>>>16)>>>16)>>>16,e[3]=F=65535&D|x<<16,t[3]=_=65535&P|U<<16,P=65535&(S=G),U=S>>>16,D=65535&(E=L),x=E>>>16,E=e[4],U+=(S=t[4])>>>16,D+=65535&E,x+=E>>>16,x+=(D+=(U+=(P+=65535&S)>>>16)>>>16)>>>16,e[4]=L=65535&D|x<<16,t[4]=G=65535&P|U<<16,P=65535&(S=q),U=S>>>16,D=65535&(E=N),x=E>>>16,E=e[5],U+=(S=t[5])>>>16,D+=65535&E,x+=E>>>16,x+=(D+=(U+=(P+=65535&S)>>>16)>>>16)>>>16,e[5]=N=65535&D|x<<16,t[5]=q=65535&P|U<<16,P=65535&(S=V),U=S>>>16,D=65535&(E=R),x=E>>>16,E=e[6],U+=(S=t[6])>>>16,D+=65535&E,x+=E>>>16,x+=(D+=(U+=(P+=65535&S)>>>16)>>>16)>>>16,e[6]=R=65535&D|x<<16,t[6]=V=65535&P|U<<16,P=65535&(S=W),U=S>>>16,D=65535&(E=z),x=E>>>16,E=e[7],U+=(S=t[7])>>>16,D+=65535&E,x+=E>>>16,x+=(D+=(U+=(P+=65535&S)>>>16)>>>16)>>>16,e[7]=z=65535&D|x<<16,t[7]=W=65535&P|U<<16,$+=128,i-=128}return i}function Pt(e,t,r){var i,n=new Int32Array(8),s=new Int32Array(8),a=new Uint8Array(256),o=r;for(n[0]=1779033703,n[1]=3144134277,n[2]=1013904242,n[3]=2773480762,n[4]=1359893119,n[5]=2600822924,n[6]=528734635,n[7]=1541459225,s[0]=4089235720,s[1]=2227873595,s[2]=4271175723,s[3]=1595750129,s[4]=2917565137,s[5]=725511199,s[6]=4215389547,s[7]=327033209,St(n,s,t,r),r%=128,i=0;i<r;i++)a[i]=t[o-r+i];for(a[r]=128,a[(r=256-128*(r<112?1:0))-9]=0,ct(a,r-8,o/536870912|0,o<<3),St(n,s,a,r),i=0;i<8;i++)ct(e,8*i,n[i],s[i]);return 0}function Ut(e,t){var r=Ye(),i=Ye(),n=Ye(),s=Ye(),a=Ye(),o=Ye(),c=Ye(),u=Ye(),h=Ye();mt(r,e[1],e[0]),mt(h,t[1],t[0]),bt(r,r,h),wt(i,e[0],e[1]),wt(h,t[0],t[1]),bt(i,i,h),bt(n,e[3],t[3]),bt(n,n,nt),bt(s,e[2],t[2]),wt(s,s,s),mt(a,i,r),mt(o,s,n),wt(c,s,n),wt(u,i,r),bt(e[0],a,o),bt(e[1],u,c),bt(e[2],c,o),bt(e[3],a,u)}function Dt(e,t,r){var i;for(i=0;i<4;i++)lt(e[i],t[i],r)}function xt(e,t){var r=Ye(),i=Ye(),n=Ye();vt(n,t[2]),bt(r,t[0],n),bt(i,t[1],n),pt(e,i),e[31]^=dt(r)<<7}function It(e,t,r){var i,n;for(ht(e[0],et),ht(e[1],tt),ht(e[2],tt),ht(e[3],et),n=255;n>=0;--n)Dt(e,t,i=r[n/8|0]>>(7&n)&1),Ut(t,e),Ut(e,e),Dt(e,t,i)}function Ct(e,t){var r=[Ye(),Ye(),Ye(),Ye()];ht(r[0],st),ht(r[1],at),ht(r[2],tt),bt(r[3],st,at),It(e,r,t)}function Tt(e,t,r){var i,n=new Uint8Array(64),s=[Ye(),Ye(),Ye(),Ye()];for(r||Ze(t,32),Pt(n,t,32),n[0]&=248,n[31]&=127,n[31]|=64,Ct(s,n),xt(e,s),i=0;i<32;i++)t[i+32]=e[i];return 0}var Bt=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function Mt(e,t){var r,i,n,s;for(i=63;i>=32;--i){for(r=0,n=i-32,s=i-12;n<s;++n)t[n]+=r-16*t[i]*Bt[n-(i-32)],r=Math.floor((t[n]+128)/256),t[n]-=256*r;t[n]+=r,t[i]=0}for(r=0,n=0;n<32;n++)t[n]+=r-(t[31]>>4)*Bt[n],r=t[n]>>8,t[n]&=255;for(n=0;n<32;n++)t[n]-=r*Bt[n];for(i=0;i<32;i++)t[i+1]+=t[i]>>8,e[i]=255&t[i]}function Ft(e){var t,r=new Float64Array(64);for(t=0;t<64;t++)r[t]=e[t];for(t=0;t<64;t++)e[t]=0;Mt(e,r)}function Lt(e,t){var r=Ye(),i=Ye(),n=Ye(),s=Ye(),a=Ye(),o=Ye(),c=Ye();return ht(e[2],tt),ft(e[1],t),kt(n,e[1]),bt(s,n,it),mt(n,n,e[2]),wt(s,e[2],s),kt(a,s),kt(o,a),bt(c,o,a),bt(r,c,n),bt(r,r,s),function(e,t){var r,i=Ye();for(r=0;r<16;r++)i[r]=t[r];for(r=250;r>=0;r--)kt(i,i),1!==r&&bt(i,i,t);for(r=0;r<16;r++)e[r]=i[r]}(r,r),bt(r,r,n),bt(r,r,s),bt(r,r,s),bt(e[0],r,s),kt(i,e[0]),bt(i,i,s),gt(i,n)&&bt(e[0],e[0],ot),k