@toruslabs/openlogin-ed25519
Advanced tools
Comparing version 1.3.3 to 1.3.4
@@ -85,3 +85,3 @@ module.exports = | ||
/******/ // Load entry module and return exports | ||
/******/ return __webpack_require__(__webpack_require__.s = 3); | ||
/******/ return __webpack_require__(__webpack_require__.s = 2); | ||
/******/ }) | ||
@@ -91,8 +91,2 @@ /************************************************************************/ | ||
/* 0 */ | ||
/***/ (function(module, exports) { | ||
module.exports = require("@babel/runtime/helpers/toConsumableArray"); | ||
/***/ }), | ||
/* 1 */ | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
@@ -102,11 +96,8 @@ | ||
/* WEBPACK VAR INJECTION */(function(Buffer) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getED25519Key; }); | ||
/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); | ||
/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__); | ||
/* harmony import */ var _toruslabs_tweetnacl_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2); | ||
/* harmony import */ var _toruslabs_tweetnacl_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_toruslabs_tweetnacl_js__WEBPACK_IMPORTED_MODULE_1__); | ||
/* harmony import */ var _toruslabs_tweetnacl_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); | ||
/* harmony import */ var _toruslabs_tweetnacl_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_toruslabs_tweetnacl_js__WEBPACK_IMPORTED_MODULE_0__); | ||
var l = _toruslabs_tweetnacl_js__WEBPACK_IMPORTED_MODULE_1___default.a.lowlevel; | ||
const l = _toruslabs_tweetnacl_js__WEBPACK_IMPORTED_MODULE_0___default.a.lowlevel; | ||
function getED25519Key(privateKey) { | ||
var privKey; | ||
let privKey; | ||
@@ -120,6 +111,6 @@ if (typeof privateKey === "string") { | ||
var d = new Uint8Array(64); | ||
var p = [l.gf(), l.gf(), l.gf(), l.gf()]; | ||
var sk = new Uint8Array([].concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(new Uint8Array(privKey)), _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(new Uint8Array(32)))); | ||
var pk = new Uint8Array(32); | ||
const d = new Uint8Array(64); | ||
const p = [l.gf(), l.gf(), l.gf(), l.gf()]; | ||
const sk = new Uint8Array([...new Uint8Array(privKey), ...new Uint8Array(32)]); | ||
const pk = new Uint8Array(32); | ||
l.crypto_hash(d, sk, 32); | ||
@@ -132,5 +123,3 @@ d[0] &= 248; | ||
for (var i = 0; i < 32; i += 1) { | ||
sk[i + 32] = pk[i]; | ||
} | ||
for (let i = 0; i < 32; i += 1) sk[i + 32] = pk[i]; | ||
@@ -142,6 +131,6 @@ return { | ||
} | ||
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4).Buffer)) | ||
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(3).Buffer)) | ||
/***/ }), | ||
/* 2 */ | ||
/* 1 */ | ||
/***/ (function(module, exports) { | ||
@@ -152,3 +141,3 @@ | ||
/***/ }), | ||
/* 3 */ | ||
/* 2 */ | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
@@ -158,3 +147,3 @@ | ||
__webpack_require__.r(__webpack_exports__); | ||
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); | ||
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); | ||
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getED25519Key", function() { return _utils__WEBPACK_IMPORTED_MODULE_0__["a"]; }); | ||
@@ -165,3 +154,3 @@ | ||
/***/ }), | ||
/* 4 */ | ||
/* 3 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -180,5 +169,5 @@ | ||
var base64 = __webpack_require__(6) | ||
var ieee754 = __webpack_require__(7) | ||
var isArray = __webpack_require__(8) | ||
var base64 = __webpack_require__(5) | ||
var ieee754 = __webpack_require__(6) | ||
var isArray = __webpack_require__(7) | ||
@@ -1961,6 +1950,6 @@ exports.Buffer = Buffer | ||
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(5))) | ||
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4))) | ||
/***/ }), | ||
/* 5 */ | ||
/* 4 */ | ||
/***/ (function(module, exports) { | ||
@@ -1991,3 +1980,3 @@ | ||
/***/ }), | ||
/* 6 */ | ||
/* 5 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -2149,3 +2138,3 @@ | ||
/***/ }), | ||
/* 7 */ | ||
/* 6 */ | ||
/***/ (function(module, exports) { | ||
@@ -2241,3 +2230,3 @@ | ||
/***/ }), | ||
/* 8 */ | ||
/* 7 */ | ||
/***/ (function(module, exports) { | ||
@@ -2244,0 +2233,0 @@ |
@@ -85,3 +85,3 @@ module.exports = | ||
/******/ // Load entry module and return exports | ||
/******/ return __webpack_require__(__webpack_require__.s = 3); | ||
/******/ return __webpack_require__(__webpack_require__.s = 1); | ||
/******/ }) | ||
@@ -93,3 +93,3 @@ /************************************************************************/ | ||
module.exports = require("@babel/runtime/helpers/toConsumableArray"); | ||
module.exports = require("@toruslabs/tweetnacl-js"); | ||
@@ -101,12 +101,17 @@ /***/ }), | ||
"use strict"; | ||
/* WEBPACK VAR INJECTION */(function(Buffer) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getED25519Key; }); | ||
/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); | ||
/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__); | ||
/* harmony import */ var _toruslabs_tweetnacl_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2); | ||
/* harmony import */ var _toruslabs_tweetnacl_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_toruslabs_tweetnacl_js__WEBPACK_IMPORTED_MODULE_1__); | ||
// ESM COMPAT FLAG | ||
__webpack_require__.r(__webpack_exports__); | ||
// EXPORTS | ||
__webpack_require__.d(__webpack_exports__, "getED25519Key", function() { return /* reexport */ getED25519Key; }); | ||
var l = _toruslabs_tweetnacl_js__WEBPACK_IMPORTED_MODULE_1___default.a.lowlevel; | ||
// EXTERNAL MODULE: external "@toruslabs/tweetnacl-js" | ||
var tweetnacl_js_ = __webpack_require__(0); | ||
var tweetnacl_js_default = /*#__PURE__*/__webpack_require__.n(tweetnacl_js_); | ||
// CONCATENATED MODULE: ./src/utils.ts | ||
const l = tweetnacl_js_default.a.lowlevel; | ||
function getED25519Key(privateKey) { | ||
var privKey; | ||
let privKey; | ||
@@ -120,6 +125,6 @@ if (typeof privateKey === "string") { | ||
var d = new Uint8Array(64); | ||
var p = [l.gf(), l.gf(), l.gf(), l.gf()]; | ||
var sk = new Uint8Array([].concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(new Uint8Array(privKey)), _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(new Uint8Array(32)))); | ||
var pk = new Uint8Array(32); | ||
const d = new Uint8Array(64); | ||
const p = [l.gf(), l.gf(), l.gf(), l.gf()]; | ||
const sk = new Uint8Array([...new Uint8Array(privKey), ...new Uint8Array(32)]); | ||
const pk = new Uint8Array(32); | ||
l.crypto_hash(d, sk, 32); | ||
@@ -132,5 +137,3 @@ d[0] &= 248; | ||
for (var i = 0; i < 32; i += 1) { | ||
sk[i + 32] = pk[i]; | ||
} | ||
for (let i = 0; i < 32; i += 1) sk[i + 32] = pk[i]; | ||
@@ -142,2105 +145,7 @@ return { | ||
} | ||
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4).Buffer)) | ||
// CONCATENATED MODULE: ./src/index.ts | ||
/***/ }), | ||
/* 2 */ | ||
/***/ (function(module, exports) { | ||
module.exports = require("@toruslabs/tweetnacl-js"); | ||
/***/ }), | ||
/* 3 */ | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
"use strict"; | ||
__webpack_require__.r(__webpack_exports__); | ||
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); | ||
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getED25519Key", function() { return _utils__WEBPACK_IMPORTED_MODULE_0__["a"]; }); | ||
/***/ }), | ||
/* 4 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
"use strict"; | ||
/* WEBPACK VAR INJECTION */(function(global) {/*! | ||
* The buffer module from node.js, for the browser. | ||
* | ||
* @author Feross Aboukhadijeh <http://feross.org> | ||
* @license MIT | ||
*/ | ||
/* eslint-disable no-proto */ | ||
var base64 = __webpack_require__(6) | ||
var ieee754 = __webpack_require__(7) | ||
var isArray = __webpack_require__(8) | ||
exports.Buffer = Buffer | ||
exports.SlowBuffer = SlowBuffer | ||
exports.INSPECT_MAX_BYTES = 50 | ||
/** | ||
* If `Buffer.TYPED_ARRAY_SUPPORT`: | ||
* === true Use Uint8Array implementation (fastest) | ||
* === false Use Object implementation (most compatible, even IE6) | ||
* | ||
* Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, | ||
* Opera 11.6+, iOS 4.2+. | ||
* | ||
* Due to various browser bugs, sometimes the Object implementation will be used even | ||
* when the browser supports typed arrays. | ||
* | ||
* Note: | ||
* | ||
* - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances, | ||
* See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. | ||
* | ||
* - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. | ||
* | ||
* - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of | ||
* incorrect length in some situations. | ||
* We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they | ||
* get the Object implementation, which is slower but behaves correctly. | ||
*/ | ||
Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined | ||
? global.TYPED_ARRAY_SUPPORT | ||
: typedArraySupport() | ||
/* | ||
* Export kMaxLength after typed array support is determined. | ||
*/ | ||
exports.kMaxLength = kMaxLength() | ||
function typedArraySupport () { | ||
try { | ||
var arr = new Uint8Array(1) | ||
arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }} | ||
return arr.foo() === 42 && // typed array instances can be augmented | ||
typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray` | ||
arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray` | ||
} catch (e) { | ||
return false | ||
} | ||
} | ||
function kMaxLength () { | ||
return Buffer.TYPED_ARRAY_SUPPORT | ||
? 0x7fffffff | ||
: 0x3fffffff | ||
} | ||
function createBuffer (that, length) { | ||
if (kMaxLength() < length) { | ||
throw new RangeError('Invalid typed array length') | ||
} | ||
if (Buffer.TYPED_ARRAY_SUPPORT) { | ||
// Return an augmented `Uint8Array` instance, for best performance | ||
that = new Uint8Array(length) | ||
that.__proto__ = Buffer.prototype | ||
} else { | ||
// Fallback: Return an object instance of the Buffer class | ||
if (that === null) { | ||
that = new Buffer(length) | ||
} | ||
that.length = length | ||
} | ||
return that | ||
} | ||
/** | ||
* The Buffer constructor returns instances of `Uint8Array` that have their | ||
* prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of | ||
* `Uint8Array`, so the returned instances will have all the node `Buffer` methods | ||
* and the `Uint8Array` methods. Square bracket notation works as expected -- it | ||
* returns a single octet. | ||
* | ||
* The `Uint8Array` prototype remains unmodified. | ||
*/ | ||
function Buffer (arg, encodingOrOffset, length) { | ||
if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) { | ||
return new Buffer(arg, encodingOrOffset, length) | ||
} | ||
// Common case. | ||
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(this, arg) | ||
} | ||
return from(this, arg, encodingOrOffset, length) | ||
} | ||
Buffer.poolSize = 8192 // not used by this implementation | ||
// TODO: Legacy, not needed anymore. Remove in next major version. | ||
Buffer._augment = function (arr) { | ||
arr.__proto__ = Buffer.prototype | ||
return arr | ||
} | ||
function from (that, value, encodingOrOffset, length) { | ||
if (typeof value === 'number') { | ||
throw new TypeError('"value" argument must not be a number') | ||
} | ||
if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) { | ||
return fromArrayBuffer(that, value, encodingOrOffset, length) | ||
} | ||
if (typeof value === 'string') { | ||
return fromString(that, value, encodingOrOffset) | ||
} | ||
return fromObject(that, value) | ||
} | ||
/** | ||
* Functionally equivalent to Buffer(arg, encoding) but throws a TypeError | ||
* if value is a number. | ||
* Buffer.from(str[, encoding]) | ||
* Buffer.from(array) | ||
* Buffer.from(buffer) | ||
* Buffer.from(arrayBuffer[, byteOffset[, length]]) | ||
**/ | ||
Buffer.from = function (value, encodingOrOffset, length) { | ||
return from(null, value, encodingOrOffset, length) | ||
} | ||
if (Buffer.TYPED_ARRAY_SUPPORT) { | ||
Buffer.prototype.__proto__ = Uint8Array.prototype | ||
Buffer.__proto__ = Uint8Array | ||
if (typeof Symbol !== 'undefined' && Symbol.species && | ||
Buffer[Symbol.species] === Buffer) { | ||
// Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97 | ||
Object.defineProperty(Buffer, Symbol.species, { | ||
value: null, | ||
configurable: true | ||
}) | ||
} | ||
} | ||
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 (that, size, fill, encoding) { | ||
assertSize(size) | ||
if (size <= 0) { | ||
return createBuffer(that, size) | ||
} | ||
if (fill !== undefined) { | ||
// Only pay attention to encoding if it's a string. This | ||
// prevents accidentally sending in a number that would | ||
// be interpretted as a start offset. | ||
return typeof encoding === 'string' | ||
? createBuffer(that, size).fill(fill, encoding) | ||
: createBuffer(that, size).fill(fill) | ||
} | ||
return createBuffer(that, size) | ||
} | ||
/** | ||
* Creates a new filled Buffer instance. | ||
* alloc(size[, fill[, encoding]]) | ||
**/ | ||
Buffer.alloc = function (size, fill, encoding) { | ||
return alloc(null, size, fill, encoding) | ||
} | ||
function allocUnsafe (that, size) { | ||
assertSize(size) | ||
that = createBuffer(that, size < 0 ? 0 : checked(size) | 0) | ||
if (!Buffer.TYPED_ARRAY_SUPPORT) { | ||
for (var i = 0; i < size; ++i) { | ||
that[i] = 0 | ||
} | ||
} | ||
return that | ||
} | ||
/** | ||
* Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. | ||
* */ | ||
Buffer.allocUnsafe = function (size) { | ||
return allocUnsafe(null, size) | ||
} | ||
/** | ||
* Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | ||
*/ | ||
Buffer.allocUnsafeSlow = function (size) { | ||
return allocUnsafe(null, size) | ||
} | ||
function fromString (that, 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 | ||
that = createBuffer(that, length) | ||
var actual = that.write(string, encoding) | ||
if (actual !== length) { | ||
// Writing a hex string, for example, that contains invalid characters will | ||
// cause everything after the first invalid character to be ignored. (e.g. | ||
// 'abxxcd' will be treated as 'ab') | ||
that = that.slice(0, actual) | ||
} | ||
return that | ||
} | ||
function fromArrayLike (that, array) { | ||
var length = array.length < 0 ? 0 : checked(array.length) | 0 | ||
that = createBuffer(that, length) | ||
for (var i = 0; i < length; i += 1) { | ||
that[i] = array[i] & 255 | ||
} | ||
return that | ||
} | ||
function fromArrayBuffer (that, array, byteOffset, length) { | ||
array.byteLength // this throws if `array` is not a valid ArrayBuffer | ||
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') | ||
} | ||
if (byteOffset === undefined && length === undefined) { | ||
array = new Uint8Array(array) | ||
} else if (length === undefined) { | ||
array = new Uint8Array(array, byteOffset) | ||
} else { | ||
array = new Uint8Array(array, byteOffset, length) | ||
} | ||
if (Buffer.TYPED_ARRAY_SUPPORT) { | ||
// Return an augmented `Uint8Array` instance, for best performance | ||
that = array | ||
that.__proto__ = Buffer.prototype | ||
} else { | ||
// Fallback: Return an object instance of the Buffer class | ||
that = fromArrayLike(that, array) | ||
} | ||
return that | ||
} | ||
function fromObject (that, obj) { | ||
if (Buffer.isBuffer(obj)) { | ||
var len = checked(obj.length) | 0 | ||
that = createBuffer(that, len) | ||
if (that.length === 0) { | ||
return that | ||
} | ||
obj.copy(that, 0, 0, len) | ||
return that | ||
} | ||
if (obj) { | ||
if ((typeof ArrayBuffer !== 'undefined' && | ||
obj.buffer instanceof ArrayBuffer) || 'length' in obj) { | ||
if (typeof obj.length !== 'number' || isnan(obj.length)) { | ||
return createBuffer(that, 0) | ||
} | ||
return fromArrayLike(that, obj) | ||
} | ||
if (obj.type === 'Buffer' && isArray(obj.data)) { | ||
return fromArrayLike(that, obj.data) | ||
} | ||
} | ||
throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.') | ||
} | ||
function checked (length) { | ||
// Note: cannot use `length < kMaxLength()` here because that fails when | ||
// length is NaN (which is otherwise coerced to zero.) | ||
if (length >= kMaxLength()) { | ||
throw new RangeError('Attempt to allocate Buffer larger than maximum ' + | ||
'size: 0x' + kMaxLength().toString(16) + ' bytes') | ||
} | ||
return length | 0 | ||
} | ||
function SlowBuffer (length) { | ||
if (+length != length) { // eslint-disable-line eqeqeq | ||
length = 0 | ||
} | ||
return Buffer.alloc(+length) | ||
} | ||
Buffer.isBuffer = function isBuffer (b) { | ||
return !!(b != null && b._isBuffer) | ||
} | ||
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 (!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 (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && | ||
(ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) { | ||
return string.byteLength | ||
} | ||
if (typeof string !== 'string') { | ||
string = '' + string | ||
} | ||
var len = string.length | ||
if (len === 0) return 0 | ||
// Use a for loop to avoid recursion | ||
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 // assume utf8 | ||
encoding = ('' + encoding).toLowerCase() | ||
loweredCase = true | ||
} | ||
} | ||
} | ||
Buffer.byteLength = byteLength | ||
function slowToString (encoding, start, end) { | ||
var loweredCase = false | ||
// No need to verify that "this.length <= MAX_UINT32" since it's a read-only | ||
// property of a typed array. | ||
// This behaves neither like String nor Uint8Array in that we set start/end | ||
// to their upper/lower bounds if the value passed is out of range. | ||
// undefined is handled specially as per ECMA-262 6th Edition, | ||
// Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. | ||
if (start === undefined || start < 0) { | ||
start = 0 | ||
} | ||
// Return early if start > this.length. Done here to prevent potential uint32 | ||
// coercion fail below. | ||
if (start > this.length) { | ||
return '' | ||
} | ||
if (end === undefined || end > this.length) { | ||
end = this.length | ||
} | ||
if (end <= 0) { | ||
return '' | ||
} | ||
// Force coersion to uint32. This will also coerce falsey/NaN values to 0. | ||
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 | ||
} | ||
} | ||
} | ||
// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect | ||
// Buffer instances. | ||
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 | 0 | ||
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 | ||
} | ||
// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, | ||
// OR the last index of `val` in `buffer` at offset <= `byteOffset`. | ||
// | ||
// Arguments: | ||
// - buffer - a Buffer to search | ||
// - val - a string, Buffer, or number | ||
// - byteOffset - an index into `buffer`; will be clamped to an int32 | ||
// - encoding - an optional encoding, relevant is val is a string | ||
// - dir - true for indexOf, false for lastIndexOf | ||
function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { | ||
// Empty buffer means no match | ||
if (buffer.length === 0) return -1 | ||
// Normalize byteOffset | ||
if (typeof byteOffset === 'string') { | ||
encoding = byteOffset | ||
byteOffset = 0 | ||
} else if (byteOffset > 0x7fffffff) { | ||
byteOffset = 0x7fffffff | ||
} else if (byteOffset < -0x80000000) { | ||
byteOffset = -0x80000000 | ||
} | ||
byteOffset = +byteOffset // Coerce to Number. | ||
if (isNaN(byteOffset)) { | ||
// byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer | ||
byteOffset = dir ? 0 : (buffer.length - 1) | ||
} | ||
// Normalize byteOffset: negative offsets start from the end of the buffer | ||
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 | ||
} | ||
// Normalize val | ||
if (typeof val === 'string') { | ||
val = Buffer.from(val, encoding) | ||
} | ||
// Finally, search either indexOf (if dir is true) or lastIndexOf | ||
if (Buffer.isBuffer(val)) { | ||
// Special case: looking for empty string/buffer always fails | ||
if (val.length === 0) { | ||
return -1 | ||
} | ||
return arrayIndexOf(buffer, val, byteOffset, encoding, dir) | ||
} else if (typeof val === 'number') { | ||
val = val & 0xFF // Search for a byte value [0-255] | ||
if (Buffer.TYPED_ARRAY_SUPPORT && | ||
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 | ||
} | ||
} | ||
// must be an even number of digits | ||
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 (isNaN(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) { | ||
// Buffer#write(string) | ||
if (offset === undefined) { | ||
encoding = 'utf8' | ||
length = this.length | ||
offset = 0 | ||
// Buffer#write(string, encoding) | ||
} else if (length === undefined && typeof offset === 'string') { | ||
encoding = offset | ||
length = this.length | ||
offset = 0 | ||
// Buffer#write(string, offset[, length][, encoding]) | ||
} else if (isFinite(offset)) { | ||
offset = offset | 0 | ||
if (isFinite(length)) { | ||
length = length | 0 | ||
if (encoding === undefined) encoding = 'utf8' | ||
} else { | ||
encoding = length | ||
length = undefined | ||
} | ||
// legacy write(string, encoding, offset, length) - remove in v0.13 | ||
} 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': | ||
// Warning: maxLength not taken into account in base64Write | ||
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 > 0xEF) ? 4 | ||
: (firstByte > 0xDF) ? 3 | ||
: (firstByte > 0xBF) ? 2 | ||
: 1 | ||
if (i + bytesPerSequence <= end) { | ||
var secondByte, thirdByte, fourthByte, tempCodePoint | ||
switch (bytesPerSequence) { | ||
case 1: | ||
if (firstByte < 0x80) { | ||
codePoint = firstByte | ||
} | ||
break | ||
case 2: | ||
secondByte = buf[i + 1] | ||
if ((secondByte & 0xC0) === 0x80) { | ||
tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) | ||
if (tempCodePoint > 0x7F) { | ||
codePoint = tempCodePoint | ||
} | ||
} | ||
break | ||
case 3: | ||
secondByte = buf[i + 1] | ||
thirdByte = buf[i + 2] | ||
if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { | ||
tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) | ||
if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { | ||
codePoint = tempCodePoint | ||
} | ||
} | ||
break | ||
case 4: | ||
secondByte = buf[i + 1] | ||
thirdByte = buf[i + 2] | ||
fourthByte = buf[i + 3] | ||
if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { | ||
tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) | ||
if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { | ||
codePoint = tempCodePoint | ||
} | ||
} | ||
} | ||
} | ||
if (codePoint === null) { | ||
// we did not generate a valid codePoint so insert a | ||
// replacement char (U+FFFD) and advance only 1 byte | ||
codePoint = 0xFFFD | ||
bytesPerSequence = 1 | ||
} else if (codePoint > 0xFFFF) { | ||
// encode to utf16 (surrogate pair dance) | ||
codePoint -= 0x10000 | ||
res.push(codePoint >>> 10 & 0x3FF | 0xD800) | ||
codePoint = 0xDC00 | codePoint & 0x3FF | ||
} | ||
res.push(codePoint) | ||
i += bytesPerSequence | ||
} | ||
return decodeCodePointsArray(res) | ||
} | ||
// Based on http://stackoverflow.com/a/22747272/680742, the browser with | ||
// the lowest limit is Chrome, with 0x10000 args. | ||
// We go 1 magnitude less, for safety | ||
var MAX_ARGUMENTS_LENGTH = 0x1000 | ||
function decodeCodePointsArray (codePoints) { | ||
var len = codePoints.length | ||
if (len <= MAX_ARGUMENTS_LENGTH) { | ||
return String.fromCharCode.apply(String, codePoints) // avoid extra slice() | ||
} | ||
// Decode in chunks to avoid "call stack size exceeded". | ||
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] & 0x7F) | ||
} | ||
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 | ||
if (Buffer.TYPED_ARRAY_SUPPORT) { | ||
newBuf = this.subarray(start, end) | ||
newBuf.__proto__ = Buffer.prototype | ||
} else { | ||
var sliceLen = end - start | ||
newBuf = new Buffer(sliceLen, undefined) | ||
for (var i = 0; i < sliceLen; ++i) { | ||
newBuf[i] = this[i + start] | ||
} | ||
} | ||
return newBuf | ||
} | ||
/* | ||
* Need to make sure that buffer isn't trying to write out of bounds. | ||
*/ | ||
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 *= 0x100)) { | ||
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 *= 0x100)) { | ||
val += this[offset + --byteLength] * mul | ||
} | ||
return val | ||
} | ||
Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { | ||
if (!noAssert) checkOffset(offset, 1, this.length) | ||
return this[offset] | ||
} | ||
Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { | ||
if (!noAssert) checkOffset(offset, 2, this.length) | ||
return this[offset] | (this[offset + 1] << 8) | ||
} | ||
Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { | ||
if (!noAssert) checkOffset(offset, 2, this.length) | ||
return (this[offset] << 8) | this[offset + 1] | ||
} | ||
Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { | ||
if (!noAssert) checkOffset(offset, 4, this.length) | ||
return ((this[offset]) | | ||
(this[offset + 1] << 8) | | ||
(this[offset + 2] << 16)) + | ||
(this[offset + 3] * 0x1000000) | ||
} | ||
Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { | ||
if (!noAssert) checkOffset(offset, 4, this.length) | ||
return (this[offset] * 0x1000000) + | ||
((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 *= 0x100)) { | ||
val += this[offset + i] * mul | ||
} | ||
mul *= 0x80 | ||
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 *= 0x100)) { | ||
val += this[offset + --i] * mul | ||
} | ||
mul *= 0x80 | ||
if (val >= mul) val -= Math.pow(2, 8 * byteLength) | ||
return val | ||
} | ||
Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { | ||
if (!noAssert) checkOffset(offset, 1, this.length) | ||
if (!(this[offset] & 0x80)) return (this[offset]) | ||
return ((0xff - this[offset] + 1) * -1) | ||
} | ||
Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { | ||
if (!noAssert) checkOffset(offset, 2, this.length) | ||
var val = this[offset] | (this[offset + 1] << 8) | ||
return (val & 0x8000) ? val | 0xFFFF0000 : val | ||
} | ||
Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { | ||
if (!noAssert) checkOffset(offset, 2, this.length) | ||
var val = this[offset + 1] | (this[offset] << 8) | ||
return (val & 0x8000) ? val | 0xFFFF0000 : val | ||
} | ||
Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { | ||
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) { | ||
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) { | ||
if (!noAssert) checkOffset(offset, 4, this.length) | ||
return ieee754.read(this, offset, true, 23, 4) | ||
} | ||
Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { | ||
if (!noAssert) checkOffset(offset, 4, this.length) | ||
return ieee754.read(this, offset, false, 23, 4) | ||
} | ||
Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { | ||
if (!noAssert) checkOffset(offset, 8, this.length) | ||
return ieee754.read(this, offset, true, 52, 8) | ||
} | ||
Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { | ||
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 & 0xFF | ||
while (++i < byteLength && (mul *= 0x100)) { | ||
this[offset + i] = (value / mul) & 0xFF | ||
} | ||
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 & 0xFF | ||
while (--i >= 0 && (mul *= 0x100)) { | ||
this[offset + i] = (value / mul) & 0xFF | ||
} | ||
return offset + byteLength | ||
} | ||
Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { | ||
value = +value | ||
offset = offset | 0 | ||
if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) | ||
if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) | ||
this[offset] = (value & 0xff) | ||
return offset + 1 | ||
} | ||
function objectWriteUInt16 (buf, value, offset, littleEndian) { | ||
if (value < 0) value = 0xffff + value + 1 | ||
for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) { | ||
buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> | ||
(littleEndian ? i : 1 - i) * 8 | ||
} | ||
} | ||
Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { | ||
value = +value | ||
offset = offset | 0 | ||
if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) | ||
if (Buffer.TYPED_ARRAY_SUPPORT) { | ||
this[offset] = (value & 0xff) | ||
this[offset + 1] = (value >>> 8) | ||
} else { | ||
objectWriteUInt16(this, value, offset, true) | ||
} | ||
return offset + 2 | ||
} | ||
Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { | ||
value = +value | ||
offset = offset | 0 | ||
if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) | ||
if (Buffer.TYPED_ARRAY_SUPPORT) { | ||
this[offset] = (value >>> 8) | ||
this[offset + 1] = (value & 0xff) | ||
} else { | ||
objectWriteUInt16(this, value, offset, false) | ||
} | ||
return offset + 2 | ||
} | ||
function objectWriteUInt32 (buf, value, offset, littleEndian) { | ||
if (value < 0) value = 0xffffffff + value + 1 | ||
for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) { | ||
buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff | ||
} | ||
} | ||
Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { | ||
value = +value | ||
offset = offset | 0 | ||
if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) | ||
if (Buffer.TYPED_ARRAY_SUPPORT) { | ||
this[offset + 3] = (value >>> 24) | ||
this[offset + 2] = (value >>> 16) | ||
this[offset + 1] = (value >>> 8) | ||
this[offset] = (value & 0xff) | ||
} else { | ||
objectWriteUInt32(this, value, offset, true) | ||
} | ||
return offset + 4 | ||
} | ||
Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { | ||
value = +value | ||
offset = offset | 0 | ||
if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) | ||
if (Buffer.TYPED_ARRAY_SUPPORT) { | ||
this[offset] = (value >>> 24) | ||
this[offset + 1] = (value >>> 16) | ||
this[offset + 2] = (value >>> 8) | ||
this[offset + 3] = (value & 0xff) | ||
} else { | ||
objectWriteUInt32(this, value, offset, false) | ||
} | ||
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 & 0xFF | ||
while (++i < byteLength && (mul *= 0x100)) { | ||
if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { | ||
sub = 1 | ||
} | ||
this[offset + i] = ((value / mul) >> 0) - sub & 0xFF | ||
} | ||
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 & 0xFF | ||
while (--i >= 0 && (mul *= 0x100)) { | ||
if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { | ||
sub = 1 | ||
} | ||
this[offset + i] = ((value / mul) >> 0) - sub & 0xFF | ||
} | ||
return offset + byteLength | ||
} | ||
Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { | ||
value = +value | ||
offset = offset | 0 | ||
if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) | ||
if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) | ||
if (value < 0) value = 0xff + value + 1 | ||
this[offset] = (value & 0xff) | ||
return offset + 1 | ||
} | ||
Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { | ||
value = +value | ||
offset = offset | 0 | ||
if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) | ||
if (Buffer.TYPED_ARRAY_SUPPORT) { | ||
this[offset] = (value & 0xff) | ||
this[offset + 1] = (value >>> 8) | ||
} else { | ||
objectWriteUInt16(this, value, offset, true) | ||
} | ||
return offset + 2 | ||
} | ||
Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { | ||
value = +value | ||
offset = offset | 0 | ||
if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) | ||
if (Buffer.TYPED_ARRAY_SUPPORT) { | ||
this[offset] = (value >>> 8) | ||
this[offset + 1] = (value & 0xff) | ||
} else { | ||
objectWriteUInt16(this, value, offset, false) | ||
} | ||
return offset + 2 | ||
} | ||
Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { | ||
value = +value | ||
offset = offset | 0 | ||
if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) | ||
if (Buffer.TYPED_ARRAY_SUPPORT) { | ||
this[offset] = (value & 0xff) | ||
this[offset + 1] = (value >>> 8) | ||
this[offset + 2] = (value >>> 16) | ||
this[offset + 3] = (value >>> 24) | ||
} else { | ||
objectWriteUInt32(this, value, offset, true) | ||
} | ||
return offset + 4 | ||
} | ||
Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { | ||
value = +value | ||
offset = offset | 0 | ||
if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) | ||
if (value < 0) value = 0xffffffff + value + 1 | ||
if (Buffer.TYPED_ARRAY_SUPPORT) { | ||
this[offset] = (value >>> 24) | ||
this[offset + 1] = (value >>> 16) | ||
this[offset + 2] = (value >>> 8) | ||
this[offset + 3] = (value & 0xff) | ||
} else { | ||
objectWriteUInt32(this, value, offset, false) | ||
} | ||
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) { | ||
if (!noAssert) { | ||
checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) | ||
} | ||
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) { | ||
if (!noAssert) { | ||
checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) | ||
} | ||
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) | ||
} | ||
// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) | ||
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 | ||
// Copy 0 bytes; we're done | ||
if (end === start) return 0 | ||
if (target.length === 0 || this.length === 0) return 0 | ||
// Fatal error conditions | ||
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') | ||
// Are we oob? | ||
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) { | ||
// descending copy from end | ||
for (i = len - 1; i >= 0; --i) { | ||
target[i + targetStart] = this[i + start] | ||
} | ||
} else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) { | ||
// ascending copy from start | ||
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 | ||
} | ||
// Usage: | ||
// buffer.fill(number[, offset[, end]]) | ||
// buffer.fill(buffer[, offset[, end]]) | ||
// buffer.fill(string[, offset[, end]][, encoding]) | ||
Buffer.prototype.fill = function fill (val, start, end, encoding) { | ||
// Handle string cases: | ||
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 | ||
} | ||
// Invalid ranges are not set to a default, so can range check early. | ||
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 | ||
: utf8ToBytes(new Buffer(val, encoding).toString()) | ||
var len = bytes.length | ||
for (i = 0; i < end - start; ++i) { | ||
this[i + start] = bytes[i % len] | ||
} | ||
} | ||
return this | ||
} | ||
// HELPER FUNCTIONS | ||
// ================ | ||
var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g | ||
function base64clean (str) { | ||
// Node strips out invalid characters like \n and \t from the string, base64-js does not | ||
str = stringtrim(str).replace(INVALID_BASE64_RE, '') | ||
// Node converts strings with length < 2 to '' | ||
if (str.length < 2) return '' | ||
// Node allows for non-padded base64 strings (missing trailing ===), base64-js does not | ||
while (str.length % 4 !== 0) { | ||
str = str + '=' | ||
} | ||
return str | ||
} | ||
function stringtrim (str) { | ||
if (str.trim) return str.trim() | ||
return str.replace(/^\s+|\s+$/g, '') | ||
} | ||
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) | ||
// is surrogate component | ||
if (codePoint > 0xD7FF && codePoint < 0xE000) { | ||
// last char was a lead | ||
if (!leadSurrogate) { | ||
// no lead yet | ||
if (codePoint > 0xDBFF) { | ||
// unexpected trail | ||
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) | ||
continue | ||
} else if (i + 1 === length) { | ||
// unpaired lead | ||
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) | ||
continue | ||
} | ||
// valid lead | ||
leadSurrogate = codePoint | ||
continue | ||
} | ||
// 2 leads in a row | ||
if (codePoint < 0xDC00) { | ||
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) | ||
leadSurrogate = codePoint | ||
continue | ||
} | ||
// valid surrogate pair | ||
codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000 | ||
} else if (leadSurrogate) { | ||
// valid bmp char, but last char was a lead | ||
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) | ||
} | ||
leadSurrogate = null | ||
// encode utf8 | ||
if (codePoint < 0x80) { | ||
if ((units -= 1) < 0) break | ||
bytes.push(codePoint) | ||
} else if (codePoint < 0x800) { | ||
if ((units -= 2) < 0) break | ||
bytes.push( | ||
codePoint >> 0x6 | 0xC0, | ||
codePoint & 0x3F | 0x80 | ||
) | ||
} else if (codePoint < 0x10000) { | ||
if ((units -= 3) < 0) break | ||
bytes.push( | ||
codePoint >> 0xC | 0xE0, | ||
codePoint >> 0x6 & 0x3F | 0x80, | ||
codePoint & 0x3F | 0x80 | ||
) | ||
} else if (codePoint < 0x110000) { | ||
if ((units -= 4) < 0) break | ||
bytes.push( | ||
codePoint >> 0x12 | 0xF0, | ||
codePoint >> 0xC & 0x3F | 0x80, | ||
codePoint >> 0x6 & 0x3F | 0x80, | ||
codePoint & 0x3F | 0x80 | ||
) | ||
} else { | ||
throw new Error('Invalid code point') | ||
} | ||
} | ||
return bytes | ||
} | ||
function asciiToBytes (str) { | ||
var byteArray = [] | ||
for (var i = 0; i < str.length; ++i) { | ||
// Node's code seems to be doing this and not & 0x7F.. | ||
byteArray.push(str.charCodeAt(i) & 0xFF) | ||
} | ||
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 isnan (val) { | ||
return val !== val // eslint-disable-line no-self-compare | ||
} | ||
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(5))) | ||
/***/ }), | ||
/* 5 */ | ||
/***/ (function(module, exports) { | ||
var g; | ||
// This works in non-strict mode | ||
g = (function() { | ||
return this; | ||
})(); | ||
try { | ||
// This works if eval is allowed (see CSP) | ||
g = g || new Function("return this")(); | ||
} catch (e) { | ||
// This works if the window reference is available | ||
if (typeof window === "object") g = window; | ||
} | ||
// g can still be undefined, but nothing to do about it... | ||
// We return undefined, instead of nothing here, so it's | ||
// easier to handle this case. if(!global) { ...} | ||
module.exports = g; | ||
/***/ }), | ||
/* 6 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
"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 | ||
} | ||
// Support decoding URL-safe base64 strings, as Node.js does. | ||
// See: https://en.wikipedia.org/wiki/Base64#URL_applications | ||
revLookup['-'.charCodeAt(0)] = 62 | ||
revLookup['_'.charCodeAt(0)] = 63 | ||
function getLens (b64) { | ||
var len = b64.length | ||
if (len % 4 > 0) { | ||
throw new Error('Invalid string. Length must be a multiple of 4') | ||
} | ||
// Trim off extra bytes after placeholder bytes are found | ||
// See: https://github.com/beatgammit/base64-js/issues/42 | ||
var validLen = b64.indexOf('=') | ||
if (validLen === -1) validLen = len | ||
var placeHoldersLen = validLen === len | ||
? 0 | ||
: 4 - (validLen % 4) | ||
return [validLen, placeHoldersLen] | ||
} | ||
// base64 is 4/3 + up to two characters of the original data | ||
function byteLength (b64) { | ||
var lens = getLens(b64) | ||
var validLen = lens[0] | ||
var placeHoldersLen = lens[1] | ||
return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen | ||
} | ||
function _byteLength (b64, validLen, placeHoldersLen) { | ||
return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen | ||
} | ||
function toByteArray (b64) { | ||
var tmp | ||
var lens = getLens(b64) | ||
var validLen = lens[0] | ||
var placeHoldersLen = lens[1] | ||
var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)) | ||
var curByte = 0 | ||
// if there are placeholders, only get up to the last complete 4 chars | ||
var len = placeHoldersLen > 0 | ||
? validLen - 4 | ||
: validLen | ||
var i | ||
for (i = 0; i < len; 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[curByte++] = (tmp >> 16) & 0xFF | ||
arr[curByte++] = (tmp >> 8) & 0xFF | ||
arr[curByte++] = tmp & 0xFF | ||
} | ||
if (placeHoldersLen === 2) { | ||
tmp = | ||
(revLookup[b64.charCodeAt(i)] << 2) | | ||
(revLookup[b64.charCodeAt(i + 1)] >> 4) | ||
arr[curByte++] = tmp & 0xFF | ||
} | ||
if (placeHoldersLen === 1) { | ||
tmp = | ||
(revLookup[b64.charCodeAt(i)] << 10) | | ||
(revLookup[b64.charCodeAt(i + 1)] << 4) | | ||
(revLookup[b64.charCodeAt(i + 2)] >> 2) | ||
arr[curByte++] = (tmp >> 8) & 0xFF | ||
arr[curByte++] = tmp & 0xFF | ||
} | ||
return arr | ||
} | ||
function tripletToBase64 (num) { | ||
return lookup[num >> 18 & 0x3F] + | ||
lookup[num >> 12 & 0x3F] + | ||
lookup[num >> 6 & 0x3F] + | ||
lookup[num & 0x3F] | ||
} | ||
function encodeChunk (uint8, start, end) { | ||
var tmp | ||
var output = [] | ||
for (var i = start; i < end; i += 3) { | ||
tmp = | ||
((uint8[i] << 16) & 0xFF0000) + | ||
((uint8[i + 1] << 8) & 0xFF00) + | ||
(uint8[i + 2] & 0xFF) | ||
output.push(tripletToBase64(tmp)) | ||
} | ||
return output.join('') | ||
} | ||
function fromByteArray (uint8) { | ||
var tmp | ||
var len = uint8.length | ||
var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes | ||
var parts = [] | ||
var maxChunkLength = 16383 // must be multiple of 3 | ||
// go through the array every three bytes, we'll deal with trailing stuff later | ||
for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { | ||
parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))) | ||
} | ||
// pad the end with zeros, but make sure to not forget the extra bytes | ||
if (extraBytes === 1) { | ||
tmp = uint8[len - 1] | ||
parts.push( | ||
lookup[tmp >> 2] + | ||
lookup[(tmp << 4) & 0x3F] + | ||
'==' | ||
) | ||
} else if (extraBytes === 2) { | ||
tmp = (uint8[len - 2] << 8) + uint8[len - 1] | ||
parts.push( | ||
lookup[tmp >> 10] + | ||
lookup[(tmp >> 4) & 0x3F] + | ||
lookup[(tmp << 2) & 0x3F] + | ||
'=' | ||
) | ||
} | ||
return parts.join('') | ||
} | ||
/***/ }), | ||
/* 7 */ | ||
/***/ (function(module, exports) { | ||
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */ | ||
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 & 0xff, i += d, m /= 256, mLen -= 8) {} | ||
e = (e << mLen) | m | ||
eLen += mLen | ||
for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} | ||
buffer[offset + i - d] |= s * 128 | ||
} | ||
/***/ }), | ||
/* 8 */ | ||
/***/ (function(module, exports) { | ||
var toString = {}.toString; | ||
module.exports = Array.isArray || function (arr) { | ||
return toString.call(arr) == '[object Array]'; | ||
}; | ||
/***/ }) | ||
/******/ ]); | ||
//# sourceMappingURL=openloginEd25519.cjs.js.map |
@@ -5,23 +5,28 @@ import nacl from '@toruslabs/tweetnacl-js'; | ||
function getED25519Key(privateKey) { | ||
let privKey; | ||
if (typeof privateKey === "string") { | ||
privKey = Buffer.from(privateKey, "hex"); | ||
} | ||
else { | ||
privKey = privateKey; | ||
} | ||
// Implementation copied from tweetnacl | ||
const d = new Uint8Array(64); | ||
const p = [l.gf(), l.gf(), l.gf(), l.gf()]; | ||
const sk = new Uint8Array([...new Uint8Array(privKey), ...new Uint8Array(32)]); | ||
const pk = new Uint8Array(32); | ||
l.crypto_hash(d, sk, 32); | ||
d[0] &= 248; | ||
d[31] &= 127; | ||
d[31] |= 64; | ||
l.scalarbase(p, d); | ||
l.pack(pk, p); | ||
for (let i = 0; i < 32; i += 1) | ||
sk[i + 32] = pk[i]; | ||
return { sk: Buffer.from(sk), pk: Buffer.from(pk) }; | ||
let privKey; | ||
if (typeof privateKey === "string") { | ||
privKey = Buffer.from(privateKey, "hex"); | ||
} else { | ||
privKey = privateKey; | ||
} // Implementation copied from tweetnacl | ||
const d = new Uint8Array(64); | ||
const p = [l.gf(), l.gf(), l.gf(), l.gf()]; | ||
const sk = new Uint8Array([...new Uint8Array(privKey), ...new Uint8Array(32)]); | ||
const pk = new Uint8Array(32); | ||
l.crypto_hash(d, sk, 32); | ||
d[0] &= 248; | ||
d[31] &= 127; | ||
d[31] |= 64; | ||
l.scalarbase(p, d); | ||
l.pack(pk, p); | ||
for (let i = 0; i < 32; i += 1) sk[i + 32] = pk[i]; | ||
return { | ||
sk: Buffer.from(sk), | ||
pk: Buffer.from(pk) | ||
}; | ||
} | ||
@@ -28,0 +33,0 @@ |
@@ -1,2 +0,2 @@ | ||
!function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof exports?exports.OpenloginEd25519=r():t.OpenloginEd25519=r()}(window,(function(){return function(t){var r={};function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:n})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,r){if(1&r&&(t=e(t)),8&r)return t;if(4&r&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&r&&"string"!=typeof t)for(var o in t)e.d(n,o,function(r){return t[r]}.bind(null,o));return n},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},e.p="",e(e.s=4)}([function(t,r,e){var n=e(10),o=e(11),i=e(12),f=e(13);t.exports=function(t){return n(t)||o(t)||i(t)||f()},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,r,e){"use strict";(function(t){e.d(r,"a",(function(){return h}));var n=e(0),o=e.n(n),i=e(3),f=e.n(i).a.lowlevel;function h(r){var e;e="string"==typeof r?t.from(r,"hex"):r;var n=new Uint8Array(64),i=[f.gf(),f.gf(),f.gf(),f.gf()],h=new Uint8Array([].concat(o()(new Uint8Array(e)),o()(new Uint8Array(32)))),a=new Uint8Array(32);f.crypto_hash(n,h,32),n[0]&=248,n[31]&=127,n[31]|=64,f.scalarbase(i,n),f.pack(a,i);for(var s=0;s<32;s+=1)h[s+32]=a[s];return{sk:t.from(h),pk:t.from(a)}}}).call(this,e(5).Buffer)},function(t,r){t.exports=function(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e<r;e++)n[e]=t[e];return n},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,r,e){!function(t){"use strict";var r=function(t){var r,e=new Float64Array(16);if(t)for(r=0;r<t.length;r++)e[r]=t[r];return e},n=function(){throw new Error("no PRNG")},o=new Uint8Array(16),i=new Uint8Array(32);i[0]=9;var f=r(),h=r([1]),a=r([56129,1]),s=r([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),u=r([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),c=r([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),l=r([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),p=r([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function y(t,r,e,n){t[r]=e>>24&255,t[r+1]=e>>16&255,t[r+2]=e>>8&255,t[r+3]=255&e,t[r+4]=n>>24&255,t[r+5]=n>>16&255,t[r+6]=n>>8&255,t[r+7]=255&n}function g(t,r,e,n,o){var i,f=0;for(i=0;i<o;i++)f|=t[r+i]^e[n+i];return(1&f-1>>>8)-1}function w(t,r,e,n){return g(t,r,e,n,16)}function v(t,r,e,n){return g(t,r,e,n,32)}function d(t,r,e,n){!function(t,r,e,n){for(var o,i=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,f=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,h=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,a=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,s=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,u=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,c=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,l=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,p=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,y=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,g=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,w=255&e[16]|(255&e[17])<<8|(255&e[18])<<16|(255&e[19])<<24,v=255&e[20]|(255&e[21])<<8|(255&e[22])<<16|(255&e[23])<<24,d=255&e[24]|(255&e[25])<<8|(255&e[26])<<16|(255&e[27])<<24,b=255&e[28]|(255&e[29])<<8|(255&e[30])<<16|(255&e[31])<<24,A=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,_=i,E=f,m=h,U=a,x=s,R=u,B=c,T=l,S=p,P=y,M=g,Y=w,L=v,O=d,I=b,C=A,k=0;k<20;k+=2)_^=(o=(L^=(o=(S^=(o=(x^=(o=_+L|0)<<7|o>>>25)+_|0)<<9|o>>>23)+x|0)<<13|o>>>19)+S|0)<<18|o>>>14,R^=(o=(E^=(o=(O^=(o=(P^=(o=R+E|0)<<7|o>>>25)+R|0)<<9|o>>>23)+P|0)<<13|o>>>19)+O|0)<<18|o>>>14,M^=(o=(B^=(o=(m^=(o=(I^=(o=M+B|0)<<7|o>>>25)+M|0)<<9|o>>>23)+I|0)<<13|o>>>19)+m|0)<<18|o>>>14,C^=(o=(Y^=(o=(T^=(o=(U^=(o=C+Y|0)<<7|o>>>25)+C|0)<<9|o>>>23)+U|0)<<13|o>>>19)+T|0)<<18|o>>>14,_^=(o=(U^=(o=(m^=(o=(E^=(o=_+U|0)<<7|o>>>25)+_|0)<<9|o>>>23)+E|0)<<13|o>>>19)+m|0)<<18|o>>>14,R^=(o=(x^=(o=(T^=(o=(B^=(o=R+x|0)<<7|o>>>25)+R|0)<<9|o>>>23)+B|0)<<13|o>>>19)+T|0)<<18|o>>>14,M^=(o=(P^=(o=(S^=(o=(Y^=(o=M+P|0)<<7|o>>>25)+M|0)<<9|o>>>23)+Y|0)<<13|o>>>19)+S|0)<<18|o>>>14,C^=(o=(I^=(o=(O^=(o=(L^=(o=C+I|0)<<7|o>>>25)+C|0)<<9|o>>>23)+L|0)<<13|o>>>19)+O|0)<<18|o>>>14;_=_+i|0,E=E+f|0,m=m+h|0,U=U+a|0,x=x+s|0,R=R+u|0,B=B+c|0,T=T+l|0,S=S+p|0,P=P+y|0,M=M+g|0,Y=Y+w|0,L=L+v|0,O=O+d|0,I=I+b|0,C=C+A|0,t[0]=_>>>0&255,t[1]=_>>>8&255,t[2]=_>>>16&255,t[3]=_>>>24&255,t[4]=E>>>0&255,t[5]=E>>>8&255,t[6]=E>>>16&255,t[7]=E>>>24&255,t[8]=m>>>0&255,t[9]=m>>>8&255,t[10]=m>>>16&255,t[11]=m>>>24&255,t[12]=U>>>0&255,t[13]=U>>>8&255,t[14]=U>>>16&255,t[15]=U>>>24&255,t[16]=x>>>0&255,t[17]=x>>>8&255,t[18]=x>>>16&255,t[19]=x>>>24&255,t[20]=R>>>0&255,t[21]=R>>>8&255,t[22]=R>>>16&255,t[23]=R>>>24&255,t[24]=B>>>0&255,t[25]=B>>>8&255,t[26]=B>>>16&255,t[27]=B>>>24&255,t[28]=T>>>0&255,t[29]=T>>>8&255,t[30]=T>>>16&255,t[31]=T>>>24&255,t[32]=S>>>0&255,t[33]=S>>>8&255,t[34]=S>>>16&255,t[35]=S>>>24&255,t[36]=P>>>0&255,t[37]=P>>>8&255,t[38]=P>>>16&255,t[39]=P>>>24&255,t[40]=M>>>0&255,t[41]=M>>>8&255,t[42]=M>>>16&255,t[43]=M>>>24&255,t[44]=Y>>>0&255,t[45]=Y>>>8&255,t[46]=Y>>>16&255,t[47]=Y>>>24&255,t[48]=L>>>0&255,t[49]=L>>>8&255,t[50]=L>>>16&255,t[51]=L>>>24&255,t[52]=O>>>0&255,t[53]=O>>>8&255,t[54]=O>>>16&255,t[55]=O>>>24&255,t[56]=I>>>0&255,t[57]=I>>>8&255,t[58]=I>>>16&255,t[59]=I>>>24&255,t[60]=C>>>0&255,t[61]=C>>>8&255,t[62]=C>>>16&255,t[63]=C>>>24&255}(t,r,e,n)}function b(t,r,e,n){!function(t,r,e,n){for(var o,i=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,f=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,h=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,a=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,s=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,u=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,c=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,l=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,p=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,y=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,g=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,w=255&e[16]|(255&e[17])<<8|(255&e[18])<<16|(255&e[19])<<24,v=255&e[20]|(255&e[21])<<8|(255&e[22])<<16|(255&e[23])<<24,d=255&e[24]|(255&e[25])<<8|(255&e[26])<<16|(255&e[27])<<24,b=255&e[28]|(255&e[29])<<8|(255&e[30])<<16|(255&e[31])<<24,A=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,_=0;_<20;_+=2)i^=(o=(v^=(o=(p^=(o=(s^=(o=i+v|0)<<7|o>>>25)+i|0)<<9|o>>>23)+s|0)<<13|o>>>19)+p|0)<<18|o>>>14,u^=(o=(f^=(o=(d^=(o=(y^=(o=u+f|0)<<7|o>>>25)+u|0)<<9|o>>>23)+y|0)<<13|o>>>19)+d|0)<<18|o>>>14,g^=(o=(c^=(o=(h^=(o=(b^=(o=g+c|0)<<7|o>>>25)+g|0)<<9|o>>>23)+b|0)<<13|o>>>19)+h|0)<<18|o>>>14,A^=(o=(w^=(o=(l^=(o=(a^=(o=A+w|0)<<7|o>>>25)+A|0)<<9|o>>>23)+a|0)<<13|o>>>19)+l|0)<<18|o>>>14,i^=(o=(a^=(o=(h^=(o=(f^=(o=i+a|0)<<7|o>>>25)+i|0)<<9|o>>>23)+f|0)<<13|o>>>19)+h|0)<<18|o>>>14,u^=(o=(s^=(o=(l^=(o=(c^=(o=u+s|0)<<7|o>>>25)+u|0)<<9|o>>>23)+c|0)<<13|o>>>19)+l|0)<<18|o>>>14,g^=(o=(y^=(o=(p^=(o=(w^=(o=g+y|0)<<7|o>>>25)+g|0)<<9|o>>>23)+w|0)<<13|o>>>19)+p|0)<<18|o>>>14,A^=(o=(b^=(o=(d^=(o=(v^=(o=A+b|0)<<7|o>>>25)+A|0)<<9|o>>>23)+v|0)<<13|o>>>19)+d|0)<<18|o>>>14;t[0]=i>>>0&255,t[1]=i>>>8&255,t[2]=i>>>16&255,t[3]=i>>>24&255,t[4]=u>>>0&255,t[5]=u>>>8&255,t[6]=u>>>16&255,t[7]=u>>>24&255,t[8]=g>>>0&255,t[9]=g>>>8&255,t[10]=g>>>16&255,t[11]=g>>>24&255,t[12]=A>>>0&255,t[13]=A>>>8&255,t[14]=A>>>16&255,t[15]=A>>>24&255,t[16]=c>>>0&255,t[17]=c>>>8&255,t[18]=c>>>16&255,t[19]=c>>>24&255,t[20]=l>>>0&255,t[21]=l>>>8&255,t[22]=l>>>16&255,t[23]=l>>>24&255,t[24]=p>>>0&255,t[25]=p>>>8&255,t[26]=p>>>16&255,t[27]=p>>>24&255,t[28]=y>>>0&255,t[29]=y>>>8&255,t[30]=y>>>16&255,t[31]=y>>>24&255}(t,r,e,n)}var A=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function _(t,r,e,n,o,i,f){var h,a,s=new Uint8Array(16),u=new Uint8Array(64);for(a=0;a<16;a++)s[a]=0;for(a=0;a<8;a++)s[a]=i[a];for(;o>=64;){for(d(u,s,f,A),a=0;a<64;a++)t[r+a]=e[n+a]^u[a];for(h=1,a=8;a<16;a++)h=h+(255&s[a])|0,s[a]=255&h,h>>>=8;o-=64,r+=64,n+=64}if(o>0)for(d(u,s,f,A),a=0;a<o;a++)t[r+a]=e[n+a]^u[a];return 0}function E(t,r,e,n,o){var i,f,h=new Uint8Array(16),a=new Uint8Array(64);for(f=0;f<16;f++)h[f]=0;for(f=0;f<8;f++)h[f]=n[f];for(;e>=64;){for(d(a,h,o,A),f=0;f<64;f++)t[r+f]=a[f];for(i=1,f=8;f<16;f++)i=i+(255&h[f])|0,h[f]=255&i,i>>>=8;e-=64,r+=64}if(e>0)for(d(a,h,o,A),f=0;f<e;f++)t[r+f]=a[f];return 0}function m(t,r,e,n,o){var i=new Uint8Array(32);b(i,n,o,A);for(var f=new Uint8Array(8),h=0;h<8;h++)f[h]=n[h+16];return E(t,r,e,f,i)}function U(t,r,e,n,o,i,f){var h=new Uint8Array(32);b(h,i,f,A);for(var a=new Uint8Array(8),s=0;s<8;s++)a[s]=i[s+16];return _(t,r,e,n,o,a,h)}var x=function(t){var r,e,n,o,i,f,h,a;this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0,r=255&t[0]|(255&t[1])<<8,this.r[0]=8191&r,e=255&t[2]|(255&t[3])<<8,this.r[1]=8191&(r>>>13|e<<3),n=255&t[4]|(255&t[5])<<8,this.r[2]=7939&(e>>>10|n<<6),o=255&t[6]|(255&t[7])<<8,this.r[3]=8191&(n>>>7|o<<9),i=255&t[8]|(255&t[9])<<8,this.r[4]=255&(o>>>4|i<<12),this.r[5]=i>>>1&8190,f=255&t[10]|(255&t[11])<<8,this.r[6]=8191&(i>>>14|f<<2),h=255&t[12]|(255&t[13])<<8,this.r[7]=8065&(f>>>11|h<<5),a=255&t[14]|(255&t[15])<<8,this.r[8]=8191&(h>>>8|a<<8),this.r[9]=a>>>5&127,this.pad[0]=255&t[16]|(255&t[17])<<8,this.pad[1]=255&t[18]|(255&t[19])<<8,this.pad[2]=255&t[20]|(255&t[21])<<8,this.pad[3]=255&t[22]|(255&t[23])<<8,this.pad[4]=255&t[24]|(255&t[25])<<8,this.pad[5]=255&t[26]|(255&t[27])<<8,this.pad[6]=255&t[28]|(255&t[29])<<8,this.pad[7]=255&t[30]|(255&t[31])<<8};function R(t,r,e,n,o,i){var f=new x(i);return f.update(e,n,o),f.finish(t,r),0}function B(t,r,e,n,o,i){var f=new Uint8Array(16);return R(f,0,e,n,o,i),w(t,r,f,0)}function T(t,r,e,n,o){var i;if(e<32)return-1;for(U(t,0,r,0,e,n,o),R(t,16,t,32,e-32,t),i=0;i<16;i++)t[i]=0;return 0}function S(t,r,e,n,o){var i,f=new Uint8Array(32);if(e<32)return-1;if(m(f,0,32,n,o),0!==B(r,16,r,32,e-32,f))return-1;for(U(t,0,r,0,e,n,o),i=0;i<32;i++)t[i]=0;return 0}function P(t,r){var e;for(e=0;e<16;e++)t[e]=0|r[e]}function M(t){var r,e,n=1;for(r=0;r<16;r++)e=t[r]+n+65535,n=Math.floor(e/65536),t[r]=e-65536*n;t[0]+=n-1+37*(n-1)}function Y(t,r,e){for(var n,o=~(e-1),i=0;i<16;i++)n=o&(t[i]^r[i]),t[i]^=n,r[i]^=n}function L(t,e){var n,o,i,f=r(),h=r();for(n=0;n<16;n++)h[n]=e[n];for(M(h),M(h),M(h),o=0;o<2;o++){for(f[0]=h[0]-65517,n=1;n<15;n++)f[n]=h[n]-65535-(f[n-1]>>16&1),f[n-1]&=65535;f[15]=h[15]-32767-(f[14]>>16&1),i=f[15]>>16&1,f[14]&=65535,Y(h,f,1-i)}for(n=0;n<16;n++)t[2*n]=255&h[n],t[2*n+1]=h[n]>>8}function O(t,r){var e=new Uint8Array(32),n=new Uint8Array(32);return L(e,t),L(n,r),v(e,0,n,0)}function I(t){var r=new Uint8Array(32);return L(r,t),1&r[0]}function C(t,r){var e;for(e=0;e<16;e++)t[e]=r[2*e]+(r[2*e+1]<<8);t[15]&=32767}function k(t,r,e){for(var n=0;n<16;n++)t[n]=r[n]+e[n]}function D(t,r,e){for(var n=0;n<16;n++)t[n]=r[n]-e[n]}function N(t,r,e){var n,o,i=0,f=0,h=0,a=0,s=0,u=0,c=0,l=0,p=0,y=0,g=0,w=0,v=0,d=0,b=0,A=0,_=0,E=0,m=0,U=0,x=0,R=0,B=0,T=0,S=0,P=0,M=0,Y=0,L=0,O=0,I=0,C=e[0],k=e[1],D=e[2],N=e[3],K=e[4],z=e[5],j=e[6],F=e[7],Z=e[8],G=e[9],V=e[10],X=e[11],q=e[12],J=e[13],$=e[14],H=e[15];i+=(n=r[0])*C,f+=n*k,h+=n*D,a+=n*N,s+=n*K,u+=n*z,c+=n*j,l+=n*F,p+=n*Z,y+=n*G,g+=n*V,w+=n*X,v+=n*q,d+=n*J,b+=n*$,A+=n*H,f+=(n=r[1])*C,h+=n*k,a+=n*D,s+=n*N,u+=n*K,c+=n*z,l+=n*j,p+=n*F,y+=n*Z,g+=n*G,w+=n*V,v+=n*X,d+=n*q,b+=n*J,A+=n*$,_+=n*H,h+=(n=r[2])*C,a+=n*k,s+=n*D,u+=n*N,c+=n*K,l+=n*z,p+=n*j,y+=n*F,g+=n*Z,w+=n*G,v+=n*V,d+=n*X,b+=n*q,A+=n*J,_+=n*$,E+=n*H,a+=(n=r[3])*C,s+=n*k,u+=n*D,c+=n*N,l+=n*K,p+=n*z,y+=n*j,g+=n*F,w+=n*Z,v+=n*G,d+=n*V,b+=n*X,A+=n*q,_+=n*J,E+=n*$,m+=n*H,s+=(n=r[4])*C,u+=n*k,c+=n*D,l+=n*N,p+=n*K,y+=n*z,g+=n*j,w+=n*F,v+=n*Z,d+=n*G,b+=n*V,A+=n*X,_+=n*q,E+=n*J,m+=n*$,U+=n*H,u+=(n=r[5])*C,c+=n*k,l+=n*D,p+=n*N,y+=n*K,g+=n*z,w+=n*j,v+=n*F,d+=n*Z,b+=n*G,A+=n*V,_+=n*X,E+=n*q,m+=n*J,U+=n*$,x+=n*H,c+=(n=r[6])*C,l+=n*k,p+=n*D,y+=n*N,g+=n*K,w+=n*z,v+=n*j,d+=n*F,b+=n*Z,A+=n*G,_+=n*V,E+=n*X,m+=n*q,U+=n*J,x+=n*$,R+=n*H,l+=(n=r[7])*C,p+=n*k,y+=n*D,g+=n*N,w+=n*K,v+=n*z,d+=n*j,b+=n*F,A+=n*Z,_+=n*G,E+=n*V,m+=n*X,U+=n*q,x+=n*J,R+=n*$,B+=n*H,p+=(n=r[8])*C,y+=n*k,g+=n*D,w+=n*N,v+=n*K,d+=n*z,b+=n*j,A+=n*F,_+=n*Z,E+=n*G,m+=n*V,U+=n*X,x+=n*q,R+=n*J,B+=n*$,T+=n*H,y+=(n=r[9])*C,g+=n*k,w+=n*D,v+=n*N,d+=n*K,b+=n*z,A+=n*j,_+=n*F,E+=n*Z,m+=n*G,U+=n*V,x+=n*X,R+=n*q,B+=n*J,T+=n*$,S+=n*H,g+=(n=r[10])*C,w+=n*k,v+=n*D,d+=n*N,b+=n*K,A+=n*z,_+=n*j,E+=n*F,m+=n*Z,U+=n*G,x+=n*V,R+=n*X,B+=n*q,T+=n*J,S+=n*$,P+=n*H,w+=(n=r[11])*C,v+=n*k,d+=n*D,b+=n*N,A+=n*K,_+=n*z,E+=n*j,m+=n*F,U+=n*Z,x+=n*G,R+=n*V,B+=n*X,T+=n*q,S+=n*J,P+=n*$,M+=n*H,v+=(n=r[12])*C,d+=n*k,b+=n*D,A+=n*N,_+=n*K,E+=n*z,m+=n*j,U+=n*F,x+=n*Z,R+=n*G,B+=n*V,T+=n*X,S+=n*q,P+=n*J,M+=n*$,Y+=n*H,d+=(n=r[13])*C,b+=n*k,A+=n*D,_+=n*N,E+=n*K,m+=n*z,U+=n*j,x+=n*F,R+=n*Z,B+=n*G,T+=n*V,S+=n*X,P+=n*q,M+=n*J,Y+=n*$,L+=n*H,b+=(n=r[14])*C,A+=n*k,_+=n*D,E+=n*N,m+=n*K,U+=n*z,x+=n*j,R+=n*F,B+=n*Z,T+=n*G,S+=n*V,P+=n*X,M+=n*q,Y+=n*J,L+=n*$,O+=n*H,A+=(n=r[15])*C,f+=38*(E+=n*D),h+=38*(m+=n*N),a+=38*(U+=n*K),s+=38*(x+=n*z),u+=38*(R+=n*j),c+=38*(B+=n*F),l+=38*(T+=n*Z),p+=38*(S+=n*G),y+=38*(P+=n*V),g+=38*(M+=n*X),w+=38*(Y+=n*q),v+=38*(L+=n*J),d+=38*(O+=n*$),b+=38*(I+=n*H),i=(n=(i+=38*(_+=n*k))+(o=1)+65535)-65536*(o=Math.floor(n/65536)),f=(n=f+o+65535)-65536*(o=Math.floor(n/65536)),h=(n=h+o+65535)-65536*(o=Math.floor(n/65536)),a=(n=a+o+65535)-65536*(o=Math.floor(n/65536)),s=(n=s+o+65535)-65536*(o=Math.floor(n/65536)),u=(n=u+o+65535)-65536*(o=Math.floor(n/65536)),c=(n=c+o+65535)-65536*(o=Math.floor(n/65536)),l=(n=l+o+65535)-65536*(o=Math.floor(n/65536)),p=(n=p+o+65535)-65536*(o=Math.floor(n/65536)),y=(n=y+o+65535)-65536*(o=Math.floor(n/65536)),g=(n=g+o+65535)-65536*(o=Math.floor(n/65536)),w=(n=w+o+65535)-65536*(o=Math.floor(n/65536)),v=(n=v+o+65535)-65536*(o=Math.floor(n/65536)),d=(n=d+o+65535)-65536*(o=Math.floor(n/65536)),b=(n=b+o+65535)-65536*(o=Math.floor(n/65536)),A=(n=A+o+65535)-65536*(o=Math.floor(n/65536)),i=(n=(i+=o-1+37*(o-1))+(o=1)+65535)-65536*(o=Math.floor(n/65536)),f=(n=f+o+65535)-65536*(o=Math.floor(n/65536)),h=(n=h+o+65535)-65536*(o=Math.floor(n/65536)),a=(n=a+o+65535)-65536*(o=Math.floor(n/65536)),s=(n=s+o+65535)-65536*(o=Math.floor(n/65536)),u=(n=u+o+65535)-65536*(o=Math.floor(n/65536)),c=(n=c+o+65535)-65536*(o=Math.floor(n/65536)),l=(n=l+o+65535)-65536*(o=Math.floor(n/65536)),p=(n=p+o+65535)-65536*(o=Math.floor(n/65536)),y=(n=y+o+65535)-65536*(o=Math.floor(n/65536)),g=(n=g+o+65535)-65536*(o=Math.floor(n/65536)),w=(n=w+o+65535)-65536*(o=Math.floor(n/65536)),v=(n=v+o+65535)-65536*(o=Math.floor(n/65536)),d=(n=d+o+65535)-65536*(o=Math.floor(n/65536)),b=(n=b+o+65535)-65536*(o=Math.floor(n/65536)),A=(n=A+o+65535)-65536*(o=Math.floor(n/65536)),i+=o-1+37*(o-1),t[0]=i,t[1]=f,t[2]=h,t[3]=a,t[4]=s,t[5]=u,t[6]=c,t[7]=l,t[8]=p,t[9]=y,t[10]=g,t[11]=w,t[12]=v,t[13]=d,t[14]=b,t[15]=A}function K(t,r){N(t,r,r)}function z(t,e){var n,o=r();for(n=0;n<16;n++)o[n]=e[n];for(n=253;n>=0;n--)K(o,o),2!==n&&4!==n&&N(o,o,e);for(n=0;n<16;n++)t[n]=o[n]}function j(t,e){var n,o=r();for(n=0;n<16;n++)o[n]=e[n];for(n=250;n>=0;n--)K(o,o),1!==n&&N(o,o,e);for(n=0;n<16;n++)t[n]=o[n]}function F(t,e,n){var o,i,f=new Uint8Array(32),h=new Float64Array(80),s=r(),u=r(),c=r(),l=r(),p=r(),y=r();for(i=0;i<31;i++)f[i]=e[i];for(f[31]=127&e[31]|64,f[0]&=248,C(h,n),i=0;i<16;i++)u[i]=h[i],l[i]=s[i]=c[i]=0;for(s[0]=l[0]=1,i=254;i>=0;--i)Y(s,u,o=f[i>>>3]>>>(7&i)&1),Y(c,l,o),k(p,s,c),D(s,s,c),k(c,u,l),D(u,u,l),K(l,p),K(y,s),N(s,c,s),N(c,u,p),k(p,s,c),D(s,s,c),K(u,s),D(c,l,y),N(s,c,a),k(s,s,l),N(c,c,s),N(s,l,y),N(l,u,h),K(u,p),Y(s,u,o),Y(c,l,o);for(i=0;i<16;i++)h[i+16]=s[i],h[i+32]=c[i],h[i+48]=u[i],h[i+64]=l[i];var g=h.subarray(32),w=h.subarray(16);return z(g,g),N(w,w,g),L(t,w),0}function Z(t,r){return F(t,r,i)}function G(t,r){return n(r,32),Z(t,r)}function V(t,r,e){var n=new Uint8Array(32);return F(n,e,r),b(t,o,n,A)}x.prototype.blocks=function(t,r,e){for(var n,o,i,f,h,a,s,u,c,l,p,y,g,w,v,d,b,A,_,E=this.fin?0:2048,m=this.h[0],U=this.h[1],x=this.h[2],R=this.h[3],B=this.h[4],T=this.h[5],S=this.h[6],P=this.h[7],M=this.h[8],Y=this.h[9],L=this.r[0],O=this.r[1],I=this.r[2],C=this.r[3],k=this.r[4],D=this.r[5],N=this.r[6],K=this.r[7],z=this.r[8],j=this.r[9];e>=16;)l=c=0,l+=(m+=8191&(n=255&t[r+0]|(255&t[r+1])<<8))*L,l+=(U+=8191&(n>>>13|(o=255&t[r+2]|(255&t[r+3])<<8)<<3))*(5*j),l+=(x+=8191&(o>>>10|(i=255&t[r+4]|(255&t[r+5])<<8)<<6))*(5*z),l+=(R+=8191&(i>>>7|(f=255&t[r+6]|(255&t[r+7])<<8)<<9))*(5*K),c=(l+=(B+=8191&(f>>>4|(h=255&t[r+8]|(255&t[r+9])<<8)<<12))*(5*N))>>>13,l&=8191,l+=(T+=h>>>1&8191)*(5*D),l+=(S+=8191&(h>>>14|(a=255&t[r+10]|(255&t[r+11])<<8)<<2))*(5*k),l+=(P+=8191&(a>>>11|(s=255&t[r+12]|(255&t[r+13])<<8)<<5))*(5*C),l+=(M+=8191&(s>>>8|(u=255&t[r+14]|(255&t[r+15])<<8)<<8))*(5*I),p=c+=(l+=(Y+=u>>>5|E)*(5*O))>>>13,p+=m*O,p+=U*L,p+=x*(5*j),p+=R*(5*z),c=(p+=B*(5*K))>>>13,p&=8191,p+=T*(5*N),p+=S*(5*D),p+=P*(5*k),p+=M*(5*C),c+=(p+=Y*(5*I))>>>13,p&=8191,y=c,y+=m*I,y+=U*O,y+=x*L,y+=R*(5*j),c=(y+=B*(5*z))>>>13,y&=8191,y+=T*(5*K),y+=S*(5*N),y+=P*(5*D),y+=M*(5*k),g=c+=(y+=Y*(5*C))>>>13,g+=m*C,g+=U*I,g+=x*O,g+=R*L,c=(g+=B*(5*j))>>>13,g&=8191,g+=T*(5*z),g+=S*(5*K),g+=P*(5*N),g+=M*(5*D),w=c+=(g+=Y*(5*k))>>>13,w+=m*k,w+=U*C,w+=x*I,w+=R*O,c=(w+=B*L)>>>13,w&=8191,w+=T*(5*j),w+=S*(5*z),w+=P*(5*K),w+=M*(5*N),v=c+=(w+=Y*(5*D))>>>13,v+=m*D,v+=U*k,v+=x*C,v+=R*I,c=(v+=B*O)>>>13,v&=8191,v+=T*L,v+=S*(5*j),v+=P*(5*z),v+=M*(5*K),d=c+=(v+=Y*(5*N))>>>13,d+=m*N,d+=U*D,d+=x*k,d+=R*C,c=(d+=B*I)>>>13,d&=8191,d+=T*O,d+=S*L,d+=P*(5*j),d+=M*(5*z),b=c+=(d+=Y*(5*K))>>>13,b+=m*K,b+=U*N,b+=x*D,b+=R*k,c=(b+=B*C)>>>13,b&=8191,b+=T*I,b+=S*O,b+=P*L,b+=M*(5*j),A=c+=(b+=Y*(5*z))>>>13,A+=m*z,A+=U*K,A+=x*N,A+=R*D,c=(A+=B*k)>>>13,A&=8191,A+=T*C,A+=S*I,A+=P*O,A+=M*L,_=c+=(A+=Y*(5*j))>>>13,_+=m*j,_+=U*z,_+=x*K,_+=R*N,c=(_+=B*D)>>>13,_&=8191,_+=T*k,_+=S*C,_+=P*I,_+=M*O,m=l=8191&(c=(c=((c+=(_+=Y*L)>>>13)<<2)+c|0)+(l&=8191)|0),U=p+=c>>>=13,x=y&=8191,R=g&=8191,B=w&=8191,T=v&=8191,S=d&=8191,P=b&=8191,M=A&=8191,Y=_&=8191,r+=16,e-=16;this.h[0]=m,this.h[1]=U,this.h[2]=x,this.h[3]=R,this.h[4]=B,this.h[5]=T,this.h[6]=S,this.h[7]=P,this.h[8]=M,this.h[9]=Y},x.prototype.finish=function(t,r){var e,n,o,i,f=new Uint16Array(10);if(this.leftover){for(i=this.leftover,this.buffer[i++]=1;i<16;i++)this.buffer[i]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(e=this.h[1]>>>13,this.h[1]&=8191,i=2;i<10;i++)this.h[i]+=e,e=this.h[i]>>>13,this.h[i]&=8191;for(this.h[0]+=5*e,e=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=e,e=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=e,f[0]=this.h[0]+5,e=f[0]>>>13,f[0]&=8191,i=1;i<10;i++)f[i]=this.h[i]+e,e=f[i]>>>13,f[i]&=8191;for(f[9]-=8192,n=(1^e)-1,i=0;i<10;i++)f[i]&=n;for(n=~n,i=0;i<10;i++)this.h[i]=this.h[i]&n|f[i];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),o=this.h[0]+this.pad[0],this.h[0]=65535&o,i=1;i<8;i++)o=(this.h[i]+this.pad[i]|0)+(o>>>16)|0,this.h[i]=65535&o;t[r+0]=this.h[0]>>>0&255,t[r+1]=this.h[0]>>>8&255,t[r+2]=this.h[1]>>>0&255,t[r+3]=this.h[1]>>>8&255,t[r+4]=this.h[2]>>>0&255,t[r+5]=this.h[2]>>>8&255,t[r+6]=this.h[3]>>>0&255,t[r+7]=this.h[3]>>>8&255,t[r+8]=this.h[4]>>>0&255,t[r+9]=this.h[4]>>>8&255,t[r+10]=this.h[5]>>>0&255,t[r+11]=this.h[5]>>>8&255,t[r+12]=this.h[6]>>>0&255,t[r+13]=this.h[6]>>>8&255,t[r+14]=this.h[7]>>>0&255,t[r+15]=this.h[7]>>>8&255},x.prototype.update=function(t,r,e){var n,o;if(this.leftover){for((o=16-this.leftover)>e&&(o=e),n=0;n<o;n++)this.buffer[this.leftover+n]=t[r+n];if(e-=o,r+=o,this.leftover+=o,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(e>=16&&(o=e-e%16,this.blocks(t,r,o),r+=o,e-=o),e){for(n=0;n<e;n++)this.buffer[this.leftover+n]=t[r+n];this.leftover+=e}};var X=T,q=S;var J=[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 $(t,r,e,n){for(var o,i,f,h,a,s,u,c,l,p,y,g,w,v,d,b,A,_,E,m,U,x,R,B,T,S,P=new Int32Array(16),M=new Int32Array(16),Y=t[0],L=t[1],O=t[2],I=t[3],C=t[4],k=t[5],D=t[6],N=t[7],K=r[0],z=r[1],j=r[2],F=r[3],Z=r[4],G=r[5],V=r[6],X=r[7],q=0;n>=128;){for(E=0;E<16;E++)m=8*E+q,P[E]=e[m+0]<<24|e[m+1]<<16|e[m+2]<<8|e[m+3],M[E]=e[m+4]<<24|e[m+5]<<16|e[m+6]<<8|e[m+7];for(E=0;E<80;E++)if(o=Y,i=L,f=O,h=I,a=C,s=k,u=D,N,l=K,p=z,y=j,g=F,w=Z,v=G,d=V,X,R=65535&(x=X),B=x>>>16,T=65535&(U=N),S=U>>>16,R+=65535&(x=(Z>>>14|C<<18)^(Z>>>18|C<<14)^(C>>>9|Z<<23)),B+=x>>>16,T+=65535&(U=(C>>>14|Z<<18)^(C>>>18|Z<<14)^(Z>>>9|C<<23)),S+=U>>>16,R+=65535&(x=Z&G^~Z&V),B+=x>>>16,T+=65535&(U=C&k^~C&D),S+=U>>>16,R+=65535&(x=J[2*E+1]),B+=x>>>16,T+=65535&(U=J[2*E]),S+=U>>>16,U=P[E%16],B+=(x=M[E%16])>>>16,T+=65535&U,S+=U>>>16,T+=(B+=(R+=65535&x)>>>16)>>>16,R=65535&(x=_=65535&R|B<<16),B=x>>>16,T=65535&(U=A=65535&T|(S+=T>>>16)<<16),S=U>>>16,R+=65535&(x=(K>>>28|Y<<4)^(Y>>>2|K<<30)^(Y>>>7|K<<25)),B+=x>>>16,T+=65535&(U=(Y>>>28|K<<4)^(K>>>2|Y<<30)^(K>>>7|Y<<25)),S+=U>>>16,B+=(x=K&z^K&j^z&j)>>>16,T+=65535&(U=Y&L^Y&O^L&O),S+=U>>>16,c=65535&(T+=(B+=(R+=65535&x)>>>16)>>>16)|(S+=T>>>16)<<16,b=65535&R|B<<16,R=65535&(x=g),B=x>>>16,T=65535&(U=h),S=U>>>16,B+=(x=_)>>>16,T+=65535&(U=A),S+=U>>>16,L=o,O=i,I=f,C=h=65535&(T+=(B+=(R+=65535&x)>>>16)>>>16)|(S+=T>>>16)<<16,k=a,D=s,N=u,Y=c,z=l,j=p,F=y,Z=g=65535&R|B<<16,G=w,V=v,X=d,K=b,E%16==15)for(m=0;m<16;m++)U=P[m],R=65535&(x=M[m]),B=x>>>16,T=65535&U,S=U>>>16,U=P[(m+9)%16],R+=65535&(x=M[(m+9)%16]),B+=x>>>16,T+=65535&U,S+=U>>>16,A=P[(m+1)%16],R+=65535&(x=((_=M[(m+1)%16])>>>1|A<<31)^(_>>>8|A<<24)^(_>>>7|A<<25)),B+=x>>>16,T+=65535&(U=(A>>>1|_<<31)^(A>>>8|_<<24)^A>>>7),S+=U>>>16,A=P[(m+14)%16],B+=(x=((_=M[(m+14)%16])>>>19|A<<13)^(A>>>29|_<<3)^(_>>>6|A<<26))>>>16,T+=65535&(U=(A>>>19|_<<13)^(_>>>29|A<<3)^A>>>6),S+=U>>>16,S+=(T+=(B+=(R+=65535&x)>>>16)>>>16)>>>16,P[m]=65535&T|S<<16,M[m]=65535&R|B<<16;R=65535&(x=K),B=x>>>16,T=65535&(U=Y),S=U>>>16,U=t[0],B+=(x=r[0])>>>16,T+=65535&U,S+=U>>>16,S+=(T+=(B+=(R+=65535&x)>>>16)>>>16)>>>16,t[0]=Y=65535&T|S<<16,r[0]=K=65535&R|B<<16,R=65535&(x=z),B=x>>>16,T=65535&(U=L),S=U>>>16,U=t[1],B+=(x=r[1])>>>16,T+=65535&U,S+=U>>>16,S+=(T+=(B+=(R+=65535&x)>>>16)>>>16)>>>16,t[1]=L=65535&T|S<<16,r[1]=z=65535&R|B<<16,R=65535&(x=j),B=x>>>16,T=65535&(U=O),S=U>>>16,U=t[2],B+=(x=r[2])>>>16,T+=65535&U,S+=U>>>16,S+=(T+=(B+=(R+=65535&x)>>>16)>>>16)>>>16,t[2]=O=65535&T|S<<16,r[2]=j=65535&R|B<<16,R=65535&(x=F),B=x>>>16,T=65535&(U=I),S=U>>>16,U=t[3],B+=(x=r[3])>>>16,T+=65535&U,S+=U>>>16,S+=(T+=(B+=(R+=65535&x)>>>16)>>>16)>>>16,t[3]=I=65535&T|S<<16,r[3]=F=65535&R|B<<16,R=65535&(x=Z),B=x>>>16,T=65535&(U=C),S=U>>>16,U=t[4],B+=(x=r[4])>>>16,T+=65535&U,S+=U>>>16,S+=(T+=(B+=(R+=65535&x)>>>16)>>>16)>>>16,t[4]=C=65535&T|S<<16,r[4]=Z=65535&R|B<<16,R=65535&(x=G),B=x>>>16,T=65535&(U=k),S=U>>>16,U=t[5],B+=(x=r[5])>>>16,T+=65535&U,S+=U>>>16,S+=(T+=(B+=(R+=65535&x)>>>16)>>>16)>>>16,t[5]=k=65535&T|S<<16,r[5]=G=65535&R|B<<16,R=65535&(x=V),B=x>>>16,T=65535&(U=D),S=U>>>16,U=t[6],B+=(x=r[6])>>>16,T+=65535&U,S+=U>>>16,S+=(T+=(B+=(R+=65535&x)>>>16)>>>16)>>>16,t[6]=D=65535&T|S<<16,r[6]=V=65535&R|B<<16,R=65535&(x=X),B=x>>>16,T=65535&(U=N),S=U>>>16,U=t[7],B+=(x=r[7])>>>16,T+=65535&U,S+=U>>>16,S+=(T+=(B+=(R+=65535&x)>>>16)>>>16)>>>16,t[7]=N=65535&T|S<<16,r[7]=X=65535&R|B<<16,q+=128,n-=128}return n}function H(t,r,e){var n,o=new Int32Array(8),i=new Int32Array(8),f=new Uint8Array(256),h=e;for(o[0]=1779033703,o[1]=3144134277,o[2]=1013904242,o[3]=2773480762,o[4]=1359893119,o[5]=2600822924,o[6]=528734635,o[7]=1541459225,i[0]=4089235720,i[1]=2227873595,i[2]=4271175723,i[3]=1595750129,i[4]=2917565137,i[5]=725511199,i[6]=4215389547,i[7]=327033209,$(o,i,r,e),e%=128,n=0;n<e;n++)f[n]=r[h-e+n];for(f[e]=128,f[(e=256-128*(e<112?1:0))-9]=0,y(f,e-8,h/536870912|0,h<<3),$(o,i,f,e),n=0;n<8;n++)y(t,8*n,o[n],i[n]);return 0}function Q(t,e){var n=r(),o=r(),i=r(),f=r(),h=r(),a=r(),s=r(),c=r(),l=r();D(n,t[1],t[0]),D(l,e[1],e[0]),N(n,n,l),k(o,t[0],t[1]),k(l,e[0],e[1]),N(o,o,l),N(i,t[3],e[3]),N(i,i,u),N(f,t[2],e[2]),k(f,f,f),D(h,o,n),D(a,f,i),k(s,f,i),k(c,o,n),N(t[0],h,a),N(t[1],c,s),N(t[2],s,a),N(t[3],h,c)}function W(t,r,e){var n;for(n=0;n<4;n++)Y(t[n],r[n],e)}function tt(t,e){var n=r(),o=r(),i=r();z(i,e[2]),N(n,e[0],i),N(o,e[1],i),L(t,o),t[31]^=I(n)<<7}function rt(t,r,e){var n,o;for(P(t[0],f),P(t[1],h),P(t[2],h),P(t[3],f),o=255;o>=0;--o)W(t,r,n=e[o/8|0]>>(7&o)&1),Q(r,t),Q(t,t),W(t,r,n)}function et(t,e){var n=[r(),r(),r(),r()];P(n[0],c),P(n[1],l),P(n[2],h),N(n[3],c,l),rt(t,n,e)}function nt(t,e,o){var i,f=new Uint8Array(64),h=[r(),r(),r(),r()];for(o||n(e,32),H(f,e,32),f[0]&=248,f[31]&=127,f[31]|=64,et(h,f),tt(t,h),i=0;i<32;i++)e[i+32]=t[i];return 0}var ot=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 it(t,r){var e,n,o,i;for(n=63;n>=32;--n){for(e=0,o=n-32,i=n-12;o<i;++o)r[o]+=e-16*r[n]*ot[o-(n-32)],e=Math.floor((r[o]+128)/256),r[o]-=256*e;r[o]+=e,r[n]=0}for(e=0,o=0;o<32;o++)r[o]+=e-(r[31]>>4)*ot[o],e=r[o]>>8,r[o]&=255;for(o=0;o<32;o++)r[o]-=e*ot[o];for(n=0;n<32;n++)r[n+1]+=r[n]>>8,t[n]=255&r[n]}function ft(t){var r,e=new Float64Array(64);for(r=0;r<64;r++)e[r]=t[r];for(r=0;r<64;r++)t[r]=0;it(t,e)}function ht(t,e,n,o){var i,f,h=new Uint8Array(64),a=new Uint8Array(64),s=new Uint8Array(64),u=new Float64Array(64),c=[r(),r(),r(),r()];H(h,o,32),h[0]&=248,h[31]&=127,h[31]|=64;var l=n+64;for(i=0;i<n;i++)t[64+i]=e[i];for(i=0;i<32;i++)t[32+i]=h[32+i];for(H(s,t.subarray(32),n+32),ft(s),et(c,s),tt(t,c),i=32;i<64;i++)t[i]=o[i];for(H(a,t,n+64),ft(a),i=0;i<64;i++)u[i]=0;for(i=0;i<32;i++)u[i]=s[i];for(i=0;i<32;i++)for(f=0;f<32;f++)u[i+f]+=a[i]*h[f];return it(t.subarray(32),u),l}function at(t,e,n,o){var i,a=new Uint8Array(32),u=new Uint8Array(64),c=[r(),r(),r(),r()],l=[r(),r(),r(),r()];if(n<64)return-1;if(function(t,e){var n=r(),o=r(),i=r(),a=r(),u=r(),c=r(),l=r();return P(t[2],h),C(t[1],e),K(i,t[1]),N(a,i,s),D(i,i,t[2]),k(a,t[2],a),K(u,a),K(c,u),N(l,c,u),N(n,l,i),N(n,n,a),j(n,n),N(n,n,i),N(n,n,a),N(n,n,a),N(t[0],n,a),K(o,t[0]),N(o,o,a),O(o,i)&&N(t[0],t[0],p),K(o,t[0]),N(o,o,a),O(o,i)?-1:(I(t[0])===e[31]>>7&&D(t[0],f,t[0]),N(t[3],t[0],t[1]),0)}(l,o))return-1;for(i=0;i<n;i++)t[i]=e[i];for(i=0;i<32;i++)t[i+32]=o[i];if(H(u,t,n),ft(u),rt(c,l,u),et(l,e.subarray(32)),Q(c,l),tt(a,c),n-=64,v(e,0,a,0)){for(i=0;i<n;i++)t[i]=0;return-1}for(i=0;i<n;i++)t[i]=e[i+64];return n}function st(t,r){if(32!==t.length)throw new Error("bad key size");if(24!==r.length)throw new Error("bad nonce size")}function ut(){for(var t=0;t<arguments.length;t++)if(!(arguments[t]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function ct(t){for(var r=0;r<t.length;r++)t[r]=0}t.lowlevel={crypto_core_hsalsa20:b,crypto_stream_xor:U,crypto_stream:m,crypto_stream_salsa20_xor:_,crypto_stream_salsa20:E,crypto_onetimeauth:R,crypto_onetimeauth_verify:B,crypto_verify_16:w,crypto_verify_32:v,crypto_secretbox:T,crypto_secretbox_open:S,crypto_scalarmult:F,crypto_scalarmult_base:Z,crypto_box_beforenm:V,crypto_box_afternm:X,crypto_box:function(t,r,e,n,o,i){var f=new Uint8Array(32);return V(f,o,i),X(t,r,e,n,f)},crypto_box_open:function(t,r,e,n,o,i){var f=new Uint8Array(32);return V(f,o,i),q(t,r,e,n,f)},crypto_box_keypair:G,crypto_hash:H,crypto_sign:ht,crypto_sign_keypair:nt,crypto_sign_open:at,crypto_secretbox_KEYBYTES:32,crypto_secretbox_NONCEBYTES:24,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:16,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:32,crypto_box_SECRETKEYBYTES:32,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:24,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:64,crypto_sign_PUBLICKEYBYTES:32,crypto_sign_SECRETKEYBYTES:64,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64,gf:r,D:s,L:ot,pack:tt,pack25519:L,unpack25519:C,M:N,A:k,S:K,Z:D,pow2523:j,add:Q,set25519:P,modL:it,scalarmult:rt,scalarbase:et},t.randomBytes=function(t){var r=new Uint8Array(t);return n(r,t),r},t.secretbox=function(t,r,e){ut(t,r,e),st(e,r);for(var n=new Uint8Array(32+t.length),o=new Uint8Array(n.length),i=0;i<t.length;i++)n[i+32]=t[i];return T(o,n,n.length,r,e),o.subarray(16)},t.secretbox.open=function(t,r,e){ut(t,r,e),st(e,r);for(var n=new Uint8Array(16+t.length),o=new Uint8Array(n.length),i=0;i<t.length;i++)n[i+16]=t[i];return n.length<32||0!==S(o,n,n.length,r,e)?null:o.subarray(32)},t.secretbox.keyLength=32,t.secretbox.nonceLength=24,t.secretbox.overheadLength=16,t.scalarMult=function(t,r){if(ut(t,r),32!==t.length)throw new Error("bad n size");if(32!==r.length)throw new Error("bad p size");var e=new Uint8Array(32);return F(e,t,r),e},t.scalarMult.base=function(t){if(ut(t),32!==t.length)throw new Error("bad n size");var r=new Uint8Array(32);return Z(r,t),r},t.scalarMult.scalarLength=32,t.scalarMult.groupElementLength=32,t.box=function(r,e,n,o){var i=t.box.before(n,o);return t.secretbox(r,e,i)},t.box.before=function(t,r){ut(t,r),function(t,r){if(32!==t.length)throw new Error("bad public key size");if(32!==r.length)throw new Error("bad secret key size")}(t,r);var e=new Uint8Array(32);return V(e,t,r),e},t.box.after=t.secretbox,t.box.open=function(r,e,n,o){var i=t.box.before(n,o);return t.secretbox.open(r,e,i)},t.box.open.after=t.secretbox.open,t.box.keyPair=function(){var t=new Uint8Array(32),r=new Uint8Array(32);return G(t,r),{publicKey:t,secretKey:r}},t.box.keyPair.fromSecretKey=function(t){if(ut(t),32!==t.length)throw new Error("bad secret key size");var r=new Uint8Array(32);return Z(r,t),{publicKey:r,secretKey:new Uint8Array(t)}},t.box.publicKeyLength=32,t.box.secretKeyLength=32,t.box.sharedKeyLength=32,t.box.nonceLength=24,t.box.overheadLength=t.secretbox.overheadLength,t.sign=function(t,r){if(ut(t,r),64!==r.length)throw new Error("bad secret key size");var e=new Uint8Array(64+t.length);return ht(e,t,t.length,r),e},t.sign.open=function(t,r){if(ut(t,r),32!==r.length)throw new Error("bad public key size");var e=new Uint8Array(t.length),n=at(e,t,t.length,r);if(n<0)return null;for(var o=new Uint8Array(n),i=0;i<o.length;i++)o[i]=e[i];return o},t.sign.detached=function(r,e){for(var n=t.sign(r,e),o=new Uint8Array(64),i=0;i<o.length;i++)o[i]=n[i];return o},t.sign.detached.verify=function(t,r,e){if(ut(t,r,e),64!==r.length)throw new Error("bad signature size");if(32!==e.length)throw new Error("bad public key size");var n,o=new Uint8Array(64+t.length),i=new Uint8Array(64+t.length);for(n=0;n<64;n++)o[n]=r[n];for(n=0;n<t.length;n++)o[n+64]=t[n];return at(i,o,o.length,e)>=0},t.sign.keyPair=function(){var t=new Uint8Array(32),r=new Uint8Array(64);return nt(t,r),{publicKey:t,secretKey:r}},t.sign.keyPair.fromSecretKey=function(t){if(ut(t),64!==t.length)throw new Error("bad secret key size");for(var r=new Uint8Array(32),e=0;e<r.length;e++)r[e]=t[32+e];return{publicKey:r,secretKey:new Uint8Array(t)}},t.sign.keyPair.fromSeed=function(t){if(ut(t),32!==t.length)throw new Error("bad seed size");for(var r=new Uint8Array(32),e=new Uint8Array(64),n=0;n<32;n++)e[n]=t[n];return nt(r,e,!0),{publicKey:r,secretKey:e}},t.sign.publicKeyLength=32,t.sign.secretKeyLength=64,t.sign.seedLength=32,t.sign.signatureLength=64,t.hash=function(t){ut(t);var r=new Uint8Array(64);return H(r,t,t.length),r},t.hash.hashLength=64,t.verify=function(t,r){return ut(t,r),0!==t.length&&0!==r.length&&(t.length===r.length&&0===g(t,0,r,0,t.length))},t.setPRNG=function(t){n=t},function(){var r="undefined"!=typeof self?self.crypto||self.msCrypto:null;if(r&&r.getRandomValues){t.setPRNG((function(t,e){var n,o=new Uint8Array(e);for(n=0;n<e;n+=65536)r.getRandomValues(o.subarray(n,n+Math.min(e-n,65536)));for(n=0;n<e;n++)t[n]=o[n];ct(o)}))}else(r=e(14))&&r.randomBytes&&t.setPRNG((function(t,e){var n,o=r.randomBytes(e);for(n=0;n<e;n++)t[n]=o[n];ct(o)}))}()}(t.exports?t.exports:self.nacl=self.nacl||{})},function(t,r,e){"use strict";e.r(r);var n=e(1);e.d(r,"getED25519Key",(function(){return n.a}))},function(t,r,e){"use strict";(function(t){ | ||
!function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof exports?exports.OpenloginEd25519=r():t.OpenloginEd25519=r()}(window,(function(){return function(t){var r={};function n(e){if(r[e])return r[e].exports;var o=r[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=r,n.d=function(t,r,e){n.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:e})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,r){if(1&r&&(t=n(t)),8&r)return t;if(4&r&&"object"==typeof t&&t&&t.__esModule)return t;var e=Object.create(null);if(n.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:t}),2&r&&"string"!=typeof t)for(var o in t)n.d(e,o,function(r){return t[r]}.bind(null,o));return e},n.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(r,"a",r),r},n.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},n.p="",n(n.s=2)}([function(t,r,n){"use strict";(function(t){n.d(r,"a",(function(){return i}));var e=n(1);const o=n.n(e).a.lowlevel;function i(r){let n;n="string"==typeof r?t.from(r,"hex"):r;const e=new Uint8Array(64),i=[o.gf(),o.gf(),o.gf(),o.gf()],f=new Uint8Array([...new Uint8Array(n),...new Uint8Array(32)]),h=new Uint8Array(32);o.crypto_hash(e,f,32),e[0]&=248,e[31]&=127,e[31]|=64,o.scalarbase(i,e),o.pack(h,i);for(let t=0;t<32;t+=1)f[t+32]=h[t];return{sk:t.from(f),pk:t.from(h)}}}).call(this,n(3).Buffer)},function(t,r,n){!function(t){"use strict";var r=function(t){var r,n=new Float64Array(16);if(t)for(r=0;r<t.length;r++)n[r]=t[r];return n},e=function(){throw new Error("no PRNG")},o=new Uint8Array(16),i=new Uint8Array(32);i[0]=9;var f=r(),h=r([1]),a=r([56129,1]),s=r([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),u=r([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),c=r([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),l=r([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),p=r([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function y(t,r,n,e){t[r]=n>>24&255,t[r+1]=n>>16&255,t[r+2]=n>>8&255,t[r+3]=255&n,t[r+4]=e>>24&255,t[r+5]=e>>16&255,t[r+6]=e>>8&255,t[r+7]=255&e}function g(t,r,n,e,o){var i,f=0;for(i=0;i<o;i++)f|=t[r+i]^n[e+i];return(1&f-1>>>8)-1}function w(t,r,n,e){return g(t,r,n,e,16)}function v(t,r,n,e){return g(t,r,n,e,32)}function d(t,r,n,e){!function(t,r,n,e){for(var o,i=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,f=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,h=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,a=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,s=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,u=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,c=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,l=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,p=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,y=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,g=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,w=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,v=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,d=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,b=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,A=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,_=i,E=f,U=h,m=a,R=s,B=u,T=c,P=l,S=p,x=y,M=g,Y=w,L=v,O=d,I=b,k=A,C=0;C<20;C+=2)_^=(o=(L^=(o=(S^=(o=(R^=(o=_+L|0)<<7|o>>>25)+_|0)<<9|o>>>23)+R|0)<<13|o>>>19)+S|0)<<18|o>>>14,B^=(o=(E^=(o=(O^=(o=(x^=(o=B+E|0)<<7|o>>>25)+B|0)<<9|o>>>23)+x|0)<<13|o>>>19)+O|0)<<18|o>>>14,M^=(o=(T^=(o=(U^=(o=(I^=(o=M+T|0)<<7|o>>>25)+M|0)<<9|o>>>23)+I|0)<<13|o>>>19)+U|0)<<18|o>>>14,k^=(o=(Y^=(o=(P^=(o=(m^=(o=k+Y|0)<<7|o>>>25)+k|0)<<9|o>>>23)+m|0)<<13|o>>>19)+P|0)<<18|o>>>14,_^=(o=(m^=(o=(U^=(o=(E^=(o=_+m|0)<<7|o>>>25)+_|0)<<9|o>>>23)+E|0)<<13|o>>>19)+U|0)<<18|o>>>14,B^=(o=(R^=(o=(P^=(o=(T^=(o=B+R|0)<<7|o>>>25)+B|0)<<9|o>>>23)+T|0)<<13|o>>>19)+P|0)<<18|o>>>14,M^=(o=(x^=(o=(S^=(o=(Y^=(o=M+x|0)<<7|o>>>25)+M|0)<<9|o>>>23)+Y|0)<<13|o>>>19)+S|0)<<18|o>>>14,k^=(o=(I^=(o=(O^=(o=(L^=(o=k+I|0)<<7|o>>>25)+k|0)<<9|o>>>23)+L|0)<<13|o>>>19)+O|0)<<18|o>>>14;_=_+i|0,E=E+f|0,U=U+h|0,m=m+a|0,R=R+s|0,B=B+u|0,T=T+c|0,P=P+l|0,S=S+p|0,x=x+y|0,M=M+g|0,Y=Y+w|0,L=L+v|0,O=O+d|0,I=I+b|0,k=k+A|0,t[0]=_>>>0&255,t[1]=_>>>8&255,t[2]=_>>>16&255,t[3]=_>>>24&255,t[4]=E>>>0&255,t[5]=E>>>8&255,t[6]=E>>>16&255,t[7]=E>>>24&255,t[8]=U>>>0&255,t[9]=U>>>8&255,t[10]=U>>>16&255,t[11]=U>>>24&255,t[12]=m>>>0&255,t[13]=m>>>8&255,t[14]=m>>>16&255,t[15]=m>>>24&255,t[16]=R>>>0&255,t[17]=R>>>8&255,t[18]=R>>>16&255,t[19]=R>>>24&255,t[20]=B>>>0&255,t[21]=B>>>8&255,t[22]=B>>>16&255,t[23]=B>>>24&255,t[24]=T>>>0&255,t[25]=T>>>8&255,t[26]=T>>>16&255,t[27]=T>>>24&255,t[28]=P>>>0&255,t[29]=P>>>8&255,t[30]=P>>>16&255,t[31]=P>>>24&255,t[32]=S>>>0&255,t[33]=S>>>8&255,t[34]=S>>>16&255,t[35]=S>>>24&255,t[36]=x>>>0&255,t[37]=x>>>8&255,t[38]=x>>>16&255,t[39]=x>>>24&255,t[40]=M>>>0&255,t[41]=M>>>8&255,t[42]=M>>>16&255,t[43]=M>>>24&255,t[44]=Y>>>0&255,t[45]=Y>>>8&255,t[46]=Y>>>16&255,t[47]=Y>>>24&255,t[48]=L>>>0&255,t[49]=L>>>8&255,t[50]=L>>>16&255,t[51]=L>>>24&255,t[52]=O>>>0&255,t[53]=O>>>8&255,t[54]=O>>>16&255,t[55]=O>>>24&255,t[56]=I>>>0&255,t[57]=I>>>8&255,t[58]=I>>>16&255,t[59]=I>>>24&255,t[60]=k>>>0&255,t[61]=k>>>8&255,t[62]=k>>>16&255,t[63]=k>>>24&255}(t,r,n,e)}function b(t,r,n,e){!function(t,r,n,e){for(var o,i=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,f=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,h=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,a=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,s=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,u=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,c=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,l=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,p=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,y=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,g=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,w=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,v=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,d=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,b=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,A=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,_=0;_<20;_+=2)i^=(o=(v^=(o=(p^=(o=(s^=(o=i+v|0)<<7|o>>>25)+i|0)<<9|o>>>23)+s|0)<<13|o>>>19)+p|0)<<18|o>>>14,u^=(o=(f^=(o=(d^=(o=(y^=(o=u+f|0)<<7|o>>>25)+u|0)<<9|o>>>23)+y|0)<<13|o>>>19)+d|0)<<18|o>>>14,g^=(o=(c^=(o=(h^=(o=(b^=(o=g+c|0)<<7|o>>>25)+g|0)<<9|o>>>23)+b|0)<<13|o>>>19)+h|0)<<18|o>>>14,A^=(o=(w^=(o=(l^=(o=(a^=(o=A+w|0)<<7|o>>>25)+A|0)<<9|o>>>23)+a|0)<<13|o>>>19)+l|0)<<18|o>>>14,i^=(o=(a^=(o=(h^=(o=(f^=(o=i+a|0)<<7|o>>>25)+i|0)<<9|o>>>23)+f|0)<<13|o>>>19)+h|0)<<18|o>>>14,u^=(o=(s^=(o=(l^=(o=(c^=(o=u+s|0)<<7|o>>>25)+u|0)<<9|o>>>23)+c|0)<<13|o>>>19)+l|0)<<18|o>>>14,g^=(o=(y^=(o=(p^=(o=(w^=(o=g+y|0)<<7|o>>>25)+g|0)<<9|o>>>23)+w|0)<<13|o>>>19)+p|0)<<18|o>>>14,A^=(o=(b^=(o=(d^=(o=(v^=(o=A+b|0)<<7|o>>>25)+A|0)<<9|o>>>23)+v|0)<<13|o>>>19)+d|0)<<18|o>>>14;t[0]=i>>>0&255,t[1]=i>>>8&255,t[2]=i>>>16&255,t[3]=i>>>24&255,t[4]=u>>>0&255,t[5]=u>>>8&255,t[6]=u>>>16&255,t[7]=u>>>24&255,t[8]=g>>>0&255,t[9]=g>>>8&255,t[10]=g>>>16&255,t[11]=g>>>24&255,t[12]=A>>>0&255,t[13]=A>>>8&255,t[14]=A>>>16&255,t[15]=A>>>24&255,t[16]=c>>>0&255,t[17]=c>>>8&255,t[18]=c>>>16&255,t[19]=c>>>24&255,t[20]=l>>>0&255,t[21]=l>>>8&255,t[22]=l>>>16&255,t[23]=l>>>24&255,t[24]=p>>>0&255,t[25]=p>>>8&255,t[26]=p>>>16&255,t[27]=p>>>24&255,t[28]=y>>>0&255,t[29]=y>>>8&255,t[30]=y>>>16&255,t[31]=y>>>24&255}(t,r,n,e)}var A=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function _(t,r,n,e,o,i,f){var h,a,s=new Uint8Array(16),u=new Uint8Array(64);for(a=0;a<16;a++)s[a]=0;for(a=0;a<8;a++)s[a]=i[a];for(;o>=64;){for(d(u,s,f,A),a=0;a<64;a++)t[r+a]=n[e+a]^u[a];for(h=1,a=8;a<16;a++)h=h+(255&s[a])|0,s[a]=255&h,h>>>=8;o-=64,r+=64,e+=64}if(o>0)for(d(u,s,f,A),a=0;a<o;a++)t[r+a]=n[e+a]^u[a];return 0}function E(t,r,n,e,o){var i,f,h=new Uint8Array(16),a=new Uint8Array(64);for(f=0;f<16;f++)h[f]=0;for(f=0;f<8;f++)h[f]=e[f];for(;n>=64;){for(d(a,h,o,A),f=0;f<64;f++)t[r+f]=a[f];for(i=1,f=8;f<16;f++)i=i+(255&h[f])|0,h[f]=255&i,i>>>=8;n-=64,r+=64}if(n>0)for(d(a,h,o,A),f=0;f<n;f++)t[r+f]=a[f];return 0}function U(t,r,n,e,o){var i=new Uint8Array(32);b(i,e,o,A);for(var f=new Uint8Array(8),h=0;h<8;h++)f[h]=e[h+16];return E(t,r,n,f,i)}function m(t,r,n,e,o,i,f){var h=new Uint8Array(32);b(h,i,f,A);for(var a=new Uint8Array(8),s=0;s<8;s++)a[s]=i[s+16];return _(t,r,n,e,o,a,h)}var R=function(t){var r,n,e,o,i,f,h,a;this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0,r=255&t[0]|(255&t[1])<<8,this.r[0]=8191&r,n=255&t[2]|(255&t[3])<<8,this.r[1]=8191&(r>>>13|n<<3),e=255&t[4]|(255&t[5])<<8,this.r[2]=7939&(n>>>10|e<<6),o=255&t[6]|(255&t[7])<<8,this.r[3]=8191&(e>>>7|o<<9),i=255&t[8]|(255&t[9])<<8,this.r[4]=255&(o>>>4|i<<12),this.r[5]=i>>>1&8190,f=255&t[10]|(255&t[11])<<8,this.r[6]=8191&(i>>>14|f<<2),h=255&t[12]|(255&t[13])<<8,this.r[7]=8065&(f>>>11|h<<5),a=255&t[14]|(255&t[15])<<8,this.r[8]=8191&(h>>>8|a<<8),this.r[9]=a>>>5&127,this.pad[0]=255&t[16]|(255&t[17])<<8,this.pad[1]=255&t[18]|(255&t[19])<<8,this.pad[2]=255&t[20]|(255&t[21])<<8,this.pad[3]=255&t[22]|(255&t[23])<<8,this.pad[4]=255&t[24]|(255&t[25])<<8,this.pad[5]=255&t[26]|(255&t[27])<<8,this.pad[6]=255&t[28]|(255&t[29])<<8,this.pad[7]=255&t[30]|(255&t[31])<<8};function B(t,r,n,e,o,i){var f=new R(i);return f.update(n,e,o),f.finish(t,r),0}function T(t,r,n,e,o,i){var f=new Uint8Array(16);return B(f,0,n,e,o,i),w(t,r,f,0)}function P(t,r,n,e,o){var i;if(n<32)return-1;for(m(t,0,r,0,n,e,o),B(t,16,t,32,n-32,t),i=0;i<16;i++)t[i]=0;return 0}function S(t,r,n,e,o){var i,f=new Uint8Array(32);if(n<32)return-1;if(U(f,0,32,e,o),0!==T(r,16,r,32,n-32,f))return-1;for(m(t,0,r,0,n,e,o),i=0;i<32;i++)t[i]=0;return 0}function x(t,r){var n;for(n=0;n<16;n++)t[n]=0|r[n]}function M(t){var r,n,e=1;for(r=0;r<16;r++)n=t[r]+e+65535,e=Math.floor(n/65536),t[r]=n-65536*e;t[0]+=e-1+37*(e-1)}function Y(t,r,n){for(var e,o=~(n-1),i=0;i<16;i++)e=o&(t[i]^r[i]),t[i]^=e,r[i]^=e}function L(t,n){var e,o,i,f=r(),h=r();for(e=0;e<16;e++)h[e]=n[e];for(M(h),M(h),M(h),o=0;o<2;o++){for(f[0]=h[0]-65517,e=1;e<15;e++)f[e]=h[e]-65535-(f[e-1]>>16&1),f[e-1]&=65535;f[15]=h[15]-32767-(f[14]>>16&1),i=f[15]>>16&1,f[14]&=65535,Y(h,f,1-i)}for(e=0;e<16;e++)t[2*e]=255&h[e],t[2*e+1]=h[e]>>8}function O(t,r){var n=new Uint8Array(32),e=new Uint8Array(32);return L(n,t),L(e,r),v(n,0,e,0)}function I(t){var r=new Uint8Array(32);return L(r,t),1&r[0]}function k(t,r){var n;for(n=0;n<16;n++)t[n]=r[2*n]+(r[2*n+1]<<8);t[15]&=32767}function C(t,r,n){for(var e=0;e<16;e++)t[e]=r[e]+n[e]}function D(t,r,n){for(var e=0;e<16;e++)t[e]=r[e]-n[e]}function N(t,r,n){var e,o,i=0,f=0,h=0,a=0,s=0,u=0,c=0,l=0,p=0,y=0,g=0,w=0,v=0,d=0,b=0,A=0,_=0,E=0,U=0,m=0,R=0,B=0,T=0,P=0,S=0,x=0,M=0,Y=0,L=0,O=0,I=0,k=n[0],C=n[1],D=n[2],N=n[3],K=n[4],z=n[5],j=n[6],F=n[7],Z=n[8],G=n[9],V=n[10],X=n[11],q=n[12],J=n[13],H=n[14],Q=n[15];i+=(e=r[0])*k,f+=e*C,h+=e*D,a+=e*N,s+=e*K,u+=e*z,c+=e*j,l+=e*F,p+=e*Z,y+=e*G,g+=e*V,w+=e*X,v+=e*q,d+=e*J,b+=e*H,A+=e*Q,f+=(e=r[1])*k,h+=e*C,a+=e*D,s+=e*N,u+=e*K,c+=e*z,l+=e*j,p+=e*F,y+=e*Z,g+=e*G,w+=e*V,v+=e*X,d+=e*q,b+=e*J,A+=e*H,_+=e*Q,h+=(e=r[2])*k,a+=e*C,s+=e*D,u+=e*N,c+=e*K,l+=e*z,p+=e*j,y+=e*F,g+=e*Z,w+=e*G,v+=e*V,d+=e*X,b+=e*q,A+=e*J,_+=e*H,E+=e*Q,a+=(e=r[3])*k,s+=e*C,u+=e*D,c+=e*N,l+=e*K,p+=e*z,y+=e*j,g+=e*F,w+=e*Z,v+=e*G,d+=e*V,b+=e*X,A+=e*q,_+=e*J,E+=e*H,U+=e*Q,s+=(e=r[4])*k,u+=e*C,c+=e*D,l+=e*N,p+=e*K,y+=e*z,g+=e*j,w+=e*F,v+=e*Z,d+=e*G,b+=e*V,A+=e*X,_+=e*q,E+=e*J,U+=e*H,m+=e*Q,u+=(e=r[5])*k,c+=e*C,l+=e*D,p+=e*N,y+=e*K,g+=e*z,w+=e*j,v+=e*F,d+=e*Z,b+=e*G,A+=e*V,_+=e*X,E+=e*q,U+=e*J,m+=e*H,R+=e*Q,c+=(e=r[6])*k,l+=e*C,p+=e*D,y+=e*N,g+=e*K,w+=e*z,v+=e*j,d+=e*F,b+=e*Z,A+=e*G,_+=e*V,E+=e*X,U+=e*q,m+=e*J,R+=e*H,B+=e*Q,l+=(e=r[7])*k,p+=e*C,y+=e*D,g+=e*N,w+=e*K,v+=e*z,d+=e*j,b+=e*F,A+=e*Z,_+=e*G,E+=e*V,U+=e*X,m+=e*q,R+=e*J,B+=e*H,T+=e*Q,p+=(e=r[8])*k,y+=e*C,g+=e*D,w+=e*N,v+=e*K,d+=e*z,b+=e*j,A+=e*F,_+=e*Z,E+=e*G,U+=e*V,m+=e*X,R+=e*q,B+=e*J,T+=e*H,P+=e*Q,y+=(e=r[9])*k,g+=e*C,w+=e*D,v+=e*N,d+=e*K,b+=e*z,A+=e*j,_+=e*F,E+=e*Z,U+=e*G,m+=e*V,R+=e*X,B+=e*q,T+=e*J,P+=e*H,S+=e*Q,g+=(e=r[10])*k,w+=e*C,v+=e*D,d+=e*N,b+=e*K,A+=e*z,_+=e*j,E+=e*F,U+=e*Z,m+=e*G,R+=e*V,B+=e*X,T+=e*q,P+=e*J,S+=e*H,x+=e*Q,w+=(e=r[11])*k,v+=e*C,d+=e*D,b+=e*N,A+=e*K,_+=e*z,E+=e*j,U+=e*F,m+=e*Z,R+=e*G,B+=e*V,T+=e*X,P+=e*q,S+=e*J,x+=e*H,M+=e*Q,v+=(e=r[12])*k,d+=e*C,b+=e*D,A+=e*N,_+=e*K,E+=e*z,U+=e*j,m+=e*F,R+=e*Z,B+=e*G,T+=e*V,P+=e*X,S+=e*q,x+=e*J,M+=e*H,Y+=e*Q,d+=(e=r[13])*k,b+=e*C,A+=e*D,_+=e*N,E+=e*K,U+=e*z,m+=e*j,R+=e*F,B+=e*Z,T+=e*G,P+=e*V,S+=e*X,x+=e*q,M+=e*J,Y+=e*H,L+=e*Q,b+=(e=r[14])*k,A+=e*C,_+=e*D,E+=e*N,U+=e*K,m+=e*z,R+=e*j,B+=e*F,T+=e*Z,P+=e*G,S+=e*V,x+=e*X,M+=e*q,Y+=e*J,L+=e*H,O+=e*Q,A+=(e=r[15])*k,f+=38*(E+=e*D),h+=38*(U+=e*N),a+=38*(m+=e*K),s+=38*(R+=e*z),u+=38*(B+=e*j),c+=38*(T+=e*F),l+=38*(P+=e*Z),p+=38*(S+=e*G),y+=38*(x+=e*V),g+=38*(M+=e*X),w+=38*(Y+=e*q),v+=38*(L+=e*J),d+=38*(O+=e*H),b+=38*(I+=e*Q),i=(e=(i+=38*(_+=e*C))+(o=1)+65535)-65536*(o=Math.floor(e/65536)),f=(e=f+o+65535)-65536*(o=Math.floor(e/65536)),h=(e=h+o+65535)-65536*(o=Math.floor(e/65536)),a=(e=a+o+65535)-65536*(o=Math.floor(e/65536)),s=(e=s+o+65535)-65536*(o=Math.floor(e/65536)),u=(e=u+o+65535)-65536*(o=Math.floor(e/65536)),c=(e=c+o+65535)-65536*(o=Math.floor(e/65536)),l=(e=l+o+65535)-65536*(o=Math.floor(e/65536)),p=(e=p+o+65535)-65536*(o=Math.floor(e/65536)),y=(e=y+o+65535)-65536*(o=Math.floor(e/65536)),g=(e=g+o+65535)-65536*(o=Math.floor(e/65536)),w=(e=w+o+65535)-65536*(o=Math.floor(e/65536)),v=(e=v+o+65535)-65536*(o=Math.floor(e/65536)),d=(e=d+o+65535)-65536*(o=Math.floor(e/65536)),b=(e=b+o+65535)-65536*(o=Math.floor(e/65536)),A=(e=A+o+65535)-65536*(o=Math.floor(e/65536)),i=(e=(i+=o-1+37*(o-1))+(o=1)+65535)-65536*(o=Math.floor(e/65536)),f=(e=f+o+65535)-65536*(o=Math.floor(e/65536)),h=(e=h+o+65535)-65536*(o=Math.floor(e/65536)),a=(e=a+o+65535)-65536*(o=Math.floor(e/65536)),s=(e=s+o+65535)-65536*(o=Math.floor(e/65536)),u=(e=u+o+65535)-65536*(o=Math.floor(e/65536)),c=(e=c+o+65535)-65536*(o=Math.floor(e/65536)),l=(e=l+o+65535)-65536*(o=Math.floor(e/65536)),p=(e=p+o+65535)-65536*(o=Math.floor(e/65536)),y=(e=y+o+65535)-65536*(o=Math.floor(e/65536)),g=(e=g+o+65535)-65536*(o=Math.floor(e/65536)),w=(e=w+o+65535)-65536*(o=Math.floor(e/65536)),v=(e=v+o+65535)-65536*(o=Math.floor(e/65536)),d=(e=d+o+65535)-65536*(o=Math.floor(e/65536)),b=(e=b+o+65535)-65536*(o=Math.floor(e/65536)),A=(e=A+o+65535)-65536*(o=Math.floor(e/65536)),i+=o-1+37*(o-1),t[0]=i,t[1]=f,t[2]=h,t[3]=a,t[4]=s,t[5]=u,t[6]=c,t[7]=l,t[8]=p,t[9]=y,t[10]=g,t[11]=w,t[12]=v,t[13]=d,t[14]=b,t[15]=A}function K(t,r){N(t,r,r)}function z(t,n){var e,o=r();for(e=0;e<16;e++)o[e]=n[e];for(e=253;e>=0;e--)K(o,o),2!==e&&4!==e&&N(o,o,n);for(e=0;e<16;e++)t[e]=o[e]}function j(t,n){var e,o=r();for(e=0;e<16;e++)o[e]=n[e];for(e=250;e>=0;e--)K(o,o),1!==e&&N(o,o,n);for(e=0;e<16;e++)t[e]=o[e]}function F(t,n,e){var o,i,f=new Uint8Array(32),h=new Float64Array(80),s=r(),u=r(),c=r(),l=r(),p=r(),y=r();for(i=0;i<31;i++)f[i]=n[i];for(f[31]=127&n[31]|64,f[0]&=248,k(h,e),i=0;i<16;i++)u[i]=h[i],l[i]=s[i]=c[i]=0;for(s[0]=l[0]=1,i=254;i>=0;--i)Y(s,u,o=f[i>>>3]>>>(7&i)&1),Y(c,l,o),C(p,s,c),D(s,s,c),C(c,u,l),D(u,u,l),K(l,p),K(y,s),N(s,c,s),N(c,u,p),C(p,s,c),D(s,s,c),K(u,s),D(c,l,y),N(s,c,a),C(s,s,l),N(c,c,s),N(s,l,y),N(l,u,h),K(u,p),Y(s,u,o),Y(c,l,o);for(i=0;i<16;i++)h[i+16]=s[i],h[i+32]=c[i],h[i+48]=u[i],h[i+64]=l[i];var g=h.subarray(32),w=h.subarray(16);return z(g,g),N(w,w,g),L(t,w),0}function Z(t,r){return F(t,r,i)}function G(t,r){return e(r,32),Z(t,r)}function V(t,r,n){var e=new Uint8Array(32);return F(e,n,r),b(t,o,e,A)}R.prototype.blocks=function(t,r,n){for(var e,o,i,f,h,a,s,u,c,l,p,y,g,w,v,d,b,A,_,E=this.fin?0:2048,U=this.h[0],m=this.h[1],R=this.h[2],B=this.h[3],T=this.h[4],P=this.h[5],S=this.h[6],x=this.h[7],M=this.h[8],Y=this.h[9],L=this.r[0],O=this.r[1],I=this.r[2],k=this.r[3],C=this.r[4],D=this.r[5],N=this.r[6],K=this.r[7],z=this.r[8],j=this.r[9];n>=16;)l=c=0,l+=(U+=8191&(e=255&t[r+0]|(255&t[r+1])<<8))*L,l+=(m+=8191&(e>>>13|(o=255&t[r+2]|(255&t[r+3])<<8)<<3))*(5*j),l+=(R+=8191&(o>>>10|(i=255&t[r+4]|(255&t[r+5])<<8)<<6))*(5*z),l+=(B+=8191&(i>>>7|(f=255&t[r+6]|(255&t[r+7])<<8)<<9))*(5*K),c=(l+=(T+=8191&(f>>>4|(h=255&t[r+8]|(255&t[r+9])<<8)<<12))*(5*N))>>>13,l&=8191,l+=(P+=h>>>1&8191)*(5*D),l+=(S+=8191&(h>>>14|(a=255&t[r+10]|(255&t[r+11])<<8)<<2))*(5*C),l+=(x+=8191&(a>>>11|(s=255&t[r+12]|(255&t[r+13])<<8)<<5))*(5*k),l+=(M+=8191&(s>>>8|(u=255&t[r+14]|(255&t[r+15])<<8)<<8))*(5*I),p=c+=(l+=(Y+=u>>>5|E)*(5*O))>>>13,p+=U*O,p+=m*L,p+=R*(5*j),p+=B*(5*z),c=(p+=T*(5*K))>>>13,p&=8191,p+=P*(5*N),p+=S*(5*D),p+=x*(5*C),p+=M*(5*k),c+=(p+=Y*(5*I))>>>13,p&=8191,y=c,y+=U*I,y+=m*O,y+=R*L,y+=B*(5*j),c=(y+=T*(5*z))>>>13,y&=8191,y+=P*(5*K),y+=S*(5*N),y+=x*(5*D),y+=M*(5*C),g=c+=(y+=Y*(5*k))>>>13,g+=U*k,g+=m*I,g+=R*O,g+=B*L,c=(g+=T*(5*j))>>>13,g&=8191,g+=P*(5*z),g+=S*(5*K),g+=x*(5*N),g+=M*(5*D),w=c+=(g+=Y*(5*C))>>>13,w+=U*C,w+=m*k,w+=R*I,w+=B*O,c=(w+=T*L)>>>13,w&=8191,w+=P*(5*j),w+=S*(5*z),w+=x*(5*K),w+=M*(5*N),v=c+=(w+=Y*(5*D))>>>13,v+=U*D,v+=m*C,v+=R*k,v+=B*I,c=(v+=T*O)>>>13,v&=8191,v+=P*L,v+=S*(5*j),v+=x*(5*z),v+=M*(5*K),d=c+=(v+=Y*(5*N))>>>13,d+=U*N,d+=m*D,d+=R*C,d+=B*k,c=(d+=T*I)>>>13,d&=8191,d+=P*O,d+=S*L,d+=x*(5*j),d+=M*(5*z),b=c+=(d+=Y*(5*K))>>>13,b+=U*K,b+=m*N,b+=R*D,b+=B*C,c=(b+=T*k)>>>13,b&=8191,b+=P*I,b+=S*O,b+=x*L,b+=M*(5*j),A=c+=(b+=Y*(5*z))>>>13,A+=U*z,A+=m*K,A+=R*N,A+=B*D,c=(A+=T*C)>>>13,A&=8191,A+=P*k,A+=S*I,A+=x*O,A+=M*L,_=c+=(A+=Y*(5*j))>>>13,_+=U*j,_+=m*z,_+=R*K,_+=B*N,c=(_+=T*D)>>>13,_&=8191,_+=P*C,_+=S*k,_+=x*I,_+=M*O,U=l=8191&(c=(c=((c+=(_+=Y*L)>>>13)<<2)+c|0)+(l&=8191)|0),m=p+=c>>>=13,R=y&=8191,B=g&=8191,T=w&=8191,P=v&=8191,S=d&=8191,x=b&=8191,M=A&=8191,Y=_&=8191,r+=16,n-=16;this.h[0]=U,this.h[1]=m,this.h[2]=R,this.h[3]=B,this.h[4]=T,this.h[5]=P,this.h[6]=S,this.h[7]=x,this.h[8]=M,this.h[9]=Y},R.prototype.finish=function(t,r){var n,e,o,i,f=new Uint16Array(10);if(this.leftover){for(i=this.leftover,this.buffer[i++]=1;i<16;i++)this.buffer[i]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(n=this.h[1]>>>13,this.h[1]&=8191,i=2;i<10;i++)this.h[i]+=n,n=this.h[i]>>>13,this.h[i]&=8191;for(this.h[0]+=5*n,n=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=n,n=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=n,f[0]=this.h[0]+5,n=f[0]>>>13,f[0]&=8191,i=1;i<10;i++)f[i]=this.h[i]+n,n=f[i]>>>13,f[i]&=8191;for(f[9]-=8192,e=(1^n)-1,i=0;i<10;i++)f[i]&=e;for(e=~e,i=0;i<10;i++)this.h[i]=this.h[i]&e|f[i];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),o=this.h[0]+this.pad[0],this.h[0]=65535&o,i=1;i<8;i++)o=(this.h[i]+this.pad[i]|0)+(o>>>16)|0,this.h[i]=65535&o;t[r+0]=this.h[0]>>>0&255,t[r+1]=this.h[0]>>>8&255,t[r+2]=this.h[1]>>>0&255,t[r+3]=this.h[1]>>>8&255,t[r+4]=this.h[2]>>>0&255,t[r+5]=this.h[2]>>>8&255,t[r+6]=this.h[3]>>>0&255,t[r+7]=this.h[3]>>>8&255,t[r+8]=this.h[4]>>>0&255,t[r+9]=this.h[4]>>>8&255,t[r+10]=this.h[5]>>>0&255,t[r+11]=this.h[5]>>>8&255,t[r+12]=this.h[6]>>>0&255,t[r+13]=this.h[6]>>>8&255,t[r+14]=this.h[7]>>>0&255,t[r+15]=this.h[7]>>>8&255},R.prototype.update=function(t,r,n){var e,o;if(this.leftover){for((o=16-this.leftover)>n&&(o=n),e=0;e<o;e++)this.buffer[this.leftover+e]=t[r+e];if(n-=o,r+=o,this.leftover+=o,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(n>=16&&(o=n-n%16,this.blocks(t,r,o),r+=o,n-=o),n){for(e=0;e<n;e++)this.buffer[this.leftover+e]=t[r+e];this.leftover+=n}};var X=P,q=S;var J=[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 H(t,r,n,e){for(var o,i,f,h,a,s,u,c,l,p,y,g,w,v,d,b,A,_,E,U,m,R,B,T,P,S,x=new Int32Array(16),M=new Int32Array(16),Y=t[0],L=t[1],O=t[2],I=t[3],k=t[4],C=t[5],D=t[6],N=t[7],K=r[0],z=r[1],j=r[2],F=r[3],Z=r[4],G=r[5],V=r[6],X=r[7],q=0;e>=128;){for(E=0;E<16;E++)U=8*E+q,x[E]=n[U+0]<<24|n[U+1]<<16|n[U+2]<<8|n[U+3],M[E]=n[U+4]<<24|n[U+5]<<16|n[U+6]<<8|n[U+7];for(E=0;E<80;E++)if(o=Y,i=L,f=O,h=I,a=k,s=C,u=D,N,l=K,p=z,y=j,g=F,w=Z,v=G,d=V,X,B=65535&(R=X),T=R>>>16,P=65535&(m=N),S=m>>>16,B+=65535&(R=(Z>>>14|k<<18)^(Z>>>18|k<<14)^(k>>>9|Z<<23)),T+=R>>>16,P+=65535&(m=(k>>>14|Z<<18)^(k>>>18|Z<<14)^(Z>>>9|k<<23)),S+=m>>>16,B+=65535&(R=Z&G^~Z&V),T+=R>>>16,P+=65535&(m=k&C^~k&D),S+=m>>>16,B+=65535&(R=J[2*E+1]),T+=R>>>16,P+=65535&(m=J[2*E]),S+=m>>>16,m=x[E%16],T+=(R=M[E%16])>>>16,P+=65535&m,S+=m>>>16,P+=(T+=(B+=65535&R)>>>16)>>>16,B=65535&(R=_=65535&B|T<<16),T=R>>>16,P=65535&(m=A=65535&P|(S+=P>>>16)<<16),S=m>>>16,B+=65535&(R=(K>>>28|Y<<4)^(Y>>>2|K<<30)^(Y>>>7|K<<25)),T+=R>>>16,P+=65535&(m=(Y>>>28|K<<4)^(K>>>2|Y<<30)^(K>>>7|Y<<25)),S+=m>>>16,T+=(R=K&z^K&j^z&j)>>>16,P+=65535&(m=Y&L^Y&O^L&O),S+=m>>>16,c=65535&(P+=(T+=(B+=65535&R)>>>16)>>>16)|(S+=P>>>16)<<16,b=65535&B|T<<16,B=65535&(R=g),T=R>>>16,P=65535&(m=h),S=m>>>16,T+=(R=_)>>>16,P+=65535&(m=A),S+=m>>>16,L=o,O=i,I=f,k=h=65535&(P+=(T+=(B+=65535&R)>>>16)>>>16)|(S+=P>>>16)<<16,C=a,D=s,N=u,Y=c,z=l,j=p,F=y,Z=g=65535&B|T<<16,G=w,V=v,X=d,K=b,E%16==15)for(U=0;U<16;U++)m=x[U],B=65535&(R=M[U]),T=R>>>16,P=65535&m,S=m>>>16,m=x[(U+9)%16],B+=65535&(R=M[(U+9)%16]),T+=R>>>16,P+=65535&m,S+=m>>>16,A=x[(U+1)%16],B+=65535&(R=((_=M[(U+1)%16])>>>1|A<<31)^(_>>>8|A<<24)^(_>>>7|A<<25)),T+=R>>>16,P+=65535&(m=(A>>>1|_<<31)^(A>>>8|_<<24)^A>>>7),S+=m>>>16,A=x[(U+14)%16],T+=(R=((_=M[(U+14)%16])>>>19|A<<13)^(A>>>29|_<<3)^(_>>>6|A<<26))>>>16,P+=65535&(m=(A>>>19|_<<13)^(_>>>29|A<<3)^A>>>6),S+=m>>>16,S+=(P+=(T+=(B+=65535&R)>>>16)>>>16)>>>16,x[U]=65535&P|S<<16,M[U]=65535&B|T<<16;B=65535&(R=K),T=R>>>16,P=65535&(m=Y),S=m>>>16,m=t[0],T+=(R=r[0])>>>16,P+=65535&m,S+=m>>>16,S+=(P+=(T+=(B+=65535&R)>>>16)>>>16)>>>16,t[0]=Y=65535&P|S<<16,r[0]=K=65535&B|T<<16,B=65535&(R=z),T=R>>>16,P=65535&(m=L),S=m>>>16,m=t[1],T+=(R=r[1])>>>16,P+=65535&m,S+=m>>>16,S+=(P+=(T+=(B+=65535&R)>>>16)>>>16)>>>16,t[1]=L=65535&P|S<<16,r[1]=z=65535&B|T<<16,B=65535&(R=j),T=R>>>16,P=65535&(m=O),S=m>>>16,m=t[2],T+=(R=r[2])>>>16,P+=65535&m,S+=m>>>16,S+=(P+=(T+=(B+=65535&R)>>>16)>>>16)>>>16,t[2]=O=65535&P|S<<16,r[2]=j=65535&B|T<<16,B=65535&(R=F),T=R>>>16,P=65535&(m=I),S=m>>>16,m=t[3],T+=(R=r[3])>>>16,P+=65535&m,S+=m>>>16,S+=(P+=(T+=(B+=65535&R)>>>16)>>>16)>>>16,t[3]=I=65535&P|S<<16,r[3]=F=65535&B|T<<16,B=65535&(R=Z),T=R>>>16,P=65535&(m=k),S=m>>>16,m=t[4],T+=(R=r[4])>>>16,P+=65535&m,S+=m>>>16,S+=(P+=(T+=(B+=65535&R)>>>16)>>>16)>>>16,t[4]=k=65535&P|S<<16,r[4]=Z=65535&B|T<<16,B=65535&(R=G),T=R>>>16,P=65535&(m=C),S=m>>>16,m=t[5],T+=(R=r[5])>>>16,P+=65535&m,S+=m>>>16,S+=(P+=(T+=(B+=65535&R)>>>16)>>>16)>>>16,t[5]=C=65535&P|S<<16,r[5]=G=65535&B|T<<16,B=65535&(R=V),T=R>>>16,P=65535&(m=D),S=m>>>16,m=t[6],T+=(R=r[6])>>>16,P+=65535&m,S+=m>>>16,S+=(P+=(T+=(B+=65535&R)>>>16)>>>16)>>>16,t[6]=D=65535&P|S<<16,r[6]=V=65535&B|T<<16,B=65535&(R=X),T=R>>>16,P=65535&(m=N),S=m>>>16,m=t[7],T+=(R=r[7])>>>16,P+=65535&m,S+=m>>>16,S+=(P+=(T+=(B+=65535&R)>>>16)>>>16)>>>16,t[7]=N=65535&P|S<<16,r[7]=X=65535&B|T<<16,q+=128,e-=128}return e}function Q(t,r,n){var e,o=new Int32Array(8),i=new Int32Array(8),f=new Uint8Array(256),h=n;for(o[0]=1779033703,o[1]=3144134277,o[2]=1013904242,o[3]=2773480762,o[4]=1359893119,o[5]=2600822924,o[6]=528734635,o[7]=1541459225,i[0]=4089235720,i[1]=2227873595,i[2]=4271175723,i[3]=1595750129,i[4]=2917565137,i[5]=725511199,i[6]=4215389547,i[7]=327033209,H(o,i,r,n),n%=128,e=0;e<n;e++)f[e]=r[h-n+e];for(f[n]=128,f[(n=256-128*(n<112?1:0))-9]=0,y(f,n-8,h/536870912|0,h<<3),H(o,i,f,n),e=0;e<8;e++)y(t,8*e,o[e],i[e]);return 0}function W(t,n){var e=r(),o=r(),i=r(),f=r(),h=r(),a=r(),s=r(),c=r(),l=r();D(e,t[1],t[0]),D(l,n[1],n[0]),N(e,e,l),C(o,t[0],t[1]),C(l,n[0],n[1]),N(o,o,l),N(i,t[3],n[3]),N(i,i,u),N(f,t[2],n[2]),C(f,f,f),D(h,o,e),D(a,f,i),C(s,f,i),C(c,o,e),N(t[0],h,a),N(t[1],c,s),N(t[2],s,a),N(t[3],h,c)}function $(t,r,n){var e;for(e=0;e<4;e++)Y(t[e],r[e],n)}function tt(t,n){var e=r(),o=r(),i=r();z(i,n[2]),N(e,n[0],i),N(o,n[1],i),L(t,o),t[31]^=I(e)<<7}function rt(t,r,n){var e,o;for(x(t[0],f),x(t[1],h),x(t[2],h),x(t[3],f),o=255;o>=0;--o)$(t,r,e=n[o/8|0]>>(7&o)&1),W(r,t),W(t,t),$(t,r,e)}function nt(t,n){var e=[r(),r(),r(),r()];x(e[0],c),x(e[1],l),x(e[2],h),N(e[3],c,l),rt(t,e,n)}function et(t,n,o){var i,f=new Uint8Array(64),h=[r(),r(),r(),r()];for(o||e(n,32),Q(f,n,32),f[0]&=248,f[31]&=127,f[31]|=64,nt(h,f),tt(t,h),i=0;i<32;i++)n[i+32]=t[i];return 0}var ot=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 it(t,r){var n,e,o,i;for(e=63;e>=32;--e){for(n=0,o=e-32,i=e-12;o<i;++o)r[o]+=n-16*r[e]*ot[o-(e-32)],n=Math.floor((r[o]+128)/256),r[o]-=256*n;r[o]+=n,r[e]=0}for(n=0,o=0;o<32;o++)r[o]+=n-(r[31]>>4)*ot[o],n=r[o]>>8,r[o]&=255;for(o=0;o<32;o++)r[o]-=n*ot[o];for(e=0;e<32;e++)r[e+1]+=r[e]>>8,t[e]=255&r[e]}function ft(t){var r,n=new Float64Array(64);for(r=0;r<64;r++)n[r]=t[r];for(r=0;r<64;r++)t[r]=0;it(t,n)}function ht(t,n,e,o){var i,f,h=new Uint8Array(64),a=new Uint8Array(64),s=new Uint8Array(64),u=new Float64Array(64),c=[r(),r(),r(),r()];Q(h,o,32),h[0]&=248,h[31]&=127,h[31]|=64;var l=e+64;for(i=0;i<e;i++)t[64+i]=n[i];for(i=0;i<32;i++)t[32+i]=h[32+i];for(Q(s,t.subarray(32),e+32),ft(s),nt(c,s),tt(t,c),i=32;i<64;i++)t[i]=o[i];for(Q(a,t,e+64),ft(a),i=0;i<64;i++)u[i]=0;for(i=0;i<32;i++)u[i]=s[i];for(i=0;i<32;i++)for(f=0;f<32;f++)u[i+f]+=a[i]*h[f];return it(t.subarray(32),u),l}function at(t,n,e,o){var i,a=new Uint8Array(32),u=new Uint8Array(64),c=[r(),r(),r(),r()],l=[r(),r(),r(),r()];if(e<64)return-1;if(function(t,n){var e=r(),o=r(),i=r(),a=r(),u=r(),c=r(),l=r();return x(t[2],h),k(t[1],n),K(i,t[1]),N(a,i,s),D(i,i,t[2]),C(a,t[2],a),K(u,a),K(c,u),N(l,c,u),N(e,l,i),N(e,e,a),j(e,e),N(e,e,i),N(e,e,a),N(e,e,a),N(t[0],e,a),K(o,t[0]),N(o,o,a),O(o,i)&&N(t[0],t[0],p),K(o,t[0]),N(o,o,a),O(o,i)?-1:(I(t[0])===n[31]>>7&&D(t[0],f,t[0]),N(t[3],t[0],t[1]),0)}(l,o))return-1;for(i=0;i<e;i++)t[i]=n[i];for(i=0;i<32;i++)t[i+32]=o[i];if(Q(u,t,e),ft(u),rt(c,l,u),nt(l,n.subarray(32)),W(c,l),tt(a,c),e-=64,v(n,0,a,0)){for(i=0;i<e;i++)t[i]=0;return-1}for(i=0;i<e;i++)t[i]=n[i+64];return e}function st(t,r){if(32!==t.length)throw new Error("bad key size");if(24!==r.length)throw new Error("bad nonce size")}function ut(){for(var t=0;t<arguments.length;t++)if(!(arguments[t]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function ct(t){for(var r=0;r<t.length;r++)t[r]=0}t.lowlevel={crypto_core_hsalsa20:b,crypto_stream_xor:m,crypto_stream:U,crypto_stream_salsa20_xor:_,crypto_stream_salsa20:E,crypto_onetimeauth:B,crypto_onetimeauth_verify:T,crypto_verify_16:w,crypto_verify_32:v,crypto_secretbox:P,crypto_secretbox_open:S,crypto_scalarmult:F,crypto_scalarmult_base:Z,crypto_box_beforenm:V,crypto_box_afternm:X,crypto_box:function(t,r,n,e,o,i){var f=new Uint8Array(32);return V(f,o,i),X(t,r,n,e,f)},crypto_box_open:function(t,r,n,e,o,i){var f=new Uint8Array(32);return V(f,o,i),q(t,r,n,e,f)},crypto_box_keypair:G,crypto_hash:Q,crypto_sign:ht,crypto_sign_keypair:et,crypto_sign_open:at,crypto_secretbox_KEYBYTES:32,crypto_secretbox_NONCEBYTES:24,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:16,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:32,crypto_box_SECRETKEYBYTES:32,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:24,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:64,crypto_sign_PUBLICKEYBYTES:32,crypto_sign_SECRETKEYBYTES:64,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64,gf:r,D:s,L:ot,pack:tt,pack25519:L,unpack25519:k,M:N,A:C,S:K,Z:D,pow2523:j,add:W,set25519:x,modL:it,scalarmult:rt,scalarbase:nt},t.randomBytes=function(t){var r=new Uint8Array(t);return e(r,t),r},t.secretbox=function(t,r,n){ut(t,r,n),st(n,r);for(var e=new Uint8Array(32+t.length),o=new Uint8Array(e.length),i=0;i<t.length;i++)e[i+32]=t[i];return P(o,e,e.length,r,n),o.subarray(16)},t.secretbox.open=function(t,r,n){ut(t,r,n),st(n,r);for(var e=new Uint8Array(16+t.length),o=new Uint8Array(e.length),i=0;i<t.length;i++)e[i+16]=t[i];return e.length<32||0!==S(o,e,e.length,r,n)?null:o.subarray(32)},t.secretbox.keyLength=32,t.secretbox.nonceLength=24,t.secretbox.overheadLength=16,t.scalarMult=function(t,r){if(ut(t,r),32!==t.length)throw new Error("bad n size");if(32!==r.length)throw new Error("bad p size");var n=new Uint8Array(32);return F(n,t,r),n},t.scalarMult.base=function(t){if(ut(t),32!==t.length)throw new Error("bad n size");var r=new Uint8Array(32);return Z(r,t),r},t.scalarMult.scalarLength=32,t.scalarMult.groupElementLength=32,t.box=function(r,n,e,o){var i=t.box.before(e,o);return t.secretbox(r,n,i)},t.box.before=function(t,r){ut(t,r),function(t,r){if(32!==t.length)throw new Error("bad public key size");if(32!==r.length)throw new Error("bad secret key size")}(t,r);var n=new Uint8Array(32);return V(n,t,r),n},t.box.after=t.secretbox,t.box.open=function(r,n,e,o){var i=t.box.before(e,o);return t.secretbox.open(r,n,i)},t.box.open.after=t.secretbox.open,t.box.keyPair=function(){var t=new Uint8Array(32),r=new Uint8Array(32);return G(t,r),{publicKey:t,secretKey:r}},t.box.keyPair.fromSecretKey=function(t){if(ut(t),32!==t.length)throw new Error("bad secret key size");var r=new Uint8Array(32);return Z(r,t),{publicKey:r,secretKey:new Uint8Array(t)}},t.box.publicKeyLength=32,t.box.secretKeyLength=32,t.box.sharedKeyLength=32,t.box.nonceLength=24,t.box.overheadLength=t.secretbox.overheadLength,t.sign=function(t,r){if(ut(t,r),64!==r.length)throw new Error("bad secret key size");var n=new Uint8Array(64+t.length);return ht(n,t,t.length,r),n},t.sign.open=function(t,r){if(ut(t,r),32!==r.length)throw new Error("bad public key size");var n=new Uint8Array(t.length),e=at(n,t,t.length,r);if(e<0)return null;for(var o=new Uint8Array(e),i=0;i<o.length;i++)o[i]=n[i];return o},t.sign.detached=function(r,n){for(var e=t.sign(r,n),o=new Uint8Array(64),i=0;i<o.length;i++)o[i]=e[i];return o},t.sign.detached.verify=function(t,r,n){if(ut(t,r,n),64!==r.length)throw new Error("bad signature size");if(32!==n.length)throw new Error("bad public key size");var e,o=new Uint8Array(64+t.length),i=new Uint8Array(64+t.length);for(e=0;e<64;e++)o[e]=r[e];for(e=0;e<t.length;e++)o[e+64]=t[e];return at(i,o,o.length,n)>=0},t.sign.keyPair=function(){var t=new Uint8Array(32),r=new Uint8Array(64);return et(t,r),{publicKey:t,secretKey:r}},t.sign.keyPair.fromSecretKey=function(t){if(ut(t),64!==t.length)throw new Error("bad secret key size");for(var r=new Uint8Array(32),n=0;n<r.length;n++)r[n]=t[32+n];return{publicKey:r,secretKey:new Uint8Array(t)}},t.sign.keyPair.fromSeed=function(t){if(ut(t),32!==t.length)throw new Error("bad seed size");for(var r=new Uint8Array(32),n=new Uint8Array(64),e=0;e<32;e++)n[e]=t[e];return et(r,n,!0),{publicKey:r,secretKey:n}},t.sign.publicKeyLength=32,t.sign.secretKeyLength=64,t.sign.seedLength=32,t.sign.signatureLength=64,t.hash=function(t){ut(t);var r=new Uint8Array(64);return Q(r,t,t.length),r},t.hash.hashLength=64,t.verify=function(t,r){return ut(t,r),0!==t.length&&0!==r.length&&(t.length===r.length&&0===g(t,0,r,0,t.length))},t.setPRNG=function(t){e=t},function(){var r="undefined"!=typeof self?self.crypto||self.msCrypto:null;if(r&&r.getRandomValues){t.setPRNG((function(t,n){var e,o=new Uint8Array(n);for(e=0;e<n;e+=65536)r.getRandomValues(o.subarray(e,e+Math.min(n-e,65536)));for(e=0;e<n;e++)t[e]=o[e];ct(o)}))}else(r=n(8))&&r.randomBytes&&t.setPRNG((function(t,n){var e,o=r.randomBytes(n);for(e=0;e<n;e++)t[e]=o[e];ct(o)}))}()}(t.exports?t.exports:self.nacl=self.nacl||{})},function(t,r,n){"use strict";n.r(r);var e=n(0);n.d(r,"getED25519Key",(function(){return e.a}))},function(t,r,n){"use strict";(function(t){ | ||
/*! | ||
@@ -8,5 +8,5 @@ * The buffer module from node.js, for the browser. | ||
*/ | ||
var n=e(7),o=e(8),i=e(9);function f(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function h(t,r){if(f()<r)throw new RangeError("Invalid typed array length");return a.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(r)).__proto__=a.prototype:(null===t&&(t=new a(r)),t.length=r),t}function a(t,r,e){if(!(a.TYPED_ARRAY_SUPPORT||this instanceof a))return new a(t,r,e);if("number"==typeof t){if("string"==typeof r)throw new Error("If encoding is specified then the first argument must be a string");return c(this,t)}return s(this,t,r,e)}function s(t,r,e,n){if("number"==typeof r)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&r instanceof ArrayBuffer?function(t,r,e,n){if(r.byteLength,e<0||r.byteLength<e)throw new RangeError("'offset' is out of bounds");if(r.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");r=void 0===e&&void 0===n?new Uint8Array(r):void 0===n?new Uint8Array(r,e):new Uint8Array(r,e,n);a.TYPED_ARRAY_SUPPORT?(t=r).__proto__=a.prototype:t=l(t,r);return t}(t,r,e,n):"string"==typeof r?function(t,r,e){"string"==typeof e&&""!==e||(e="utf8");if(!a.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=0|y(r,e),o=(t=h(t,n)).write(r,e);o!==n&&(t=t.slice(0,o));return t}(t,r,e):function(t,r){if(a.isBuffer(r)){var e=0|p(r.length);return 0===(t=h(t,e)).length||r.copy(t,0,0,e),t}if(r){if("undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r)return"number"!=typeof r.length||(n=r.length)!=n?h(t,0):l(t,r);if("Buffer"===r.type&&i(r.data))return l(t,r.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,r)}function u(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function c(t,r){if(u(r),t=h(t,r<0?0:0|p(r)),!a.TYPED_ARRAY_SUPPORT)for(var e=0;e<r;++e)t[e]=0;return t}function l(t,r){var e=r.length<0?0:0|p(r.length);t=h(t,e);for(var n=0;n<e;n+=1)t[n]=255&r[n];return t}function p(t){if(t>=f())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+f().toString(16)+" bytes");return 0|t}function y(t,r){if(a.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var e=t.length;if(0===e)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return K(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return z(t).length;default:if(n)return K(t).length;r=(""+r).toLowerCase(),n=!0}}function g(t,r,e){var n=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if((e>>>=0)<=(r>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return S(this,r,e);case"utf8":case"utf-8":return R(this,r,e);case"ascii":return B(this,r,e);case"latin1":case"binary":return T(this,r,e);case"base64":return x(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function w(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}function v(t,r,e,n,o){if(0===t.length)return-1;if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=o?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(o)return-1;e=t.length-1}else if(e<0){if(!o)return-1;e=0}if("string"==typeof r&&(r=a.from(r,n)),a.isBuffer(r))return 0===r.length?-1:d(t,r,e,n,o);if("number"==typeof r)return r&=255,a.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):d(t,[r],e,n,o);throw new TypeError("val must be string, number or Buffer")}function d(t,r,e,n,o){var i,f=1,h=t.length,a=r.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||r.length<2)return-1;f=2,h/=2,a/=2,e/=2}function s(t,r){return 1===f?t[r]:t.readUInt16BE(r*f)}if(o){var u=-1;for(i=e;i<h;i++)if(s(t,i)===s(r,-1===u?0:i-u)){if(-1===u&&(u=i),i-u+1===a)return u*f}else-1!==u&&(i-=i-u),u=-1}else for(e+a>h&&(e=h-a),i=e;i>=0;i--){for(var c=!0,l=0;l<a;l++)if(s(t,i+l)!==s(r,l)){c=!1;break}if(c)return i}return-1}function b(t,r,e,n){e=Number(e)||0;var o=t.length-e;n?(n=Number(n))>o&&(n=o):n=o;var i=r.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var f=0;f<n;++f){var h=parseInt(r.substr(2*f,2),16);if(isNaN(h))return f;t[e+f]=h}return f}function A(t,r,e,n){return j(K(r,t.length-e),t,e,n)}function _(t,r,e,n){return j(function(t){for(var r=[],e=0;e<t.length;++e)r.push(255&t.charCodeAt(e));return r}(r),t,e,n)}function E(t,r,e,n){return _(t,r,e,n)}function m(t,r,e,n){return j(z(r),t,e,n)}function U(t,r,e,n){return j(function(t,r){for(var e,n,o,i=[],f=0;f<t.length&&!((r-=2)<0);++f)e=t.charCodeAt(f),n=e>>8,o=e%256,i.push(o),i.push(n);return i}(r,t.length-e),t,e,n)}function x(t,r,e){return 0===r&&e===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(r,e))}function R(t,r,e){e=Math.min(t.length,e);for(var n=[],o=r;o<e;){var i,f,h,a,s=t[o],u=null,c=s>239?4:s>223?3:s>191?2:1;if(o+c<=e)switch(c){case 1:s<128&&(u=s);break;case 2:128==(192&(i=t[o+1]))&&(a=(31&s)<<6|63&i)>127&&(u=a);break;case 3:i=t[o+1],f=t[o+2],128==(192&i)&&128==(192&f)&&(a=(15&s)<<12|(63&i)<<6|63&f)>2047&&(a<55296||a>57343)&&(u=a);break;case 4:i=t[o+1],f=t[o+2],h=t[o+3],128==(192&i)&&128==(192&f)&&128==(192&h)&&(a=(15&s)<<18|(63&i)<<12|(63&f)<<6|63&h)>65535&&a<1114112&&(u=a)}null===u?(u=65533,c=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),o+=c}return function(t){var r=t.length;if(r<=4096)return String.fromCharCode.apply(String,t);var e="",n=0;for(;n<r;)e+=String.fromCharCode.apply(String,t.slice(n,n+=4096));return e}(n)}r.Buffer=a,r.SlowBuffer=function(t){+t!=t&&(t=0);return a.alloc(+t)},r.INSPECT_MAX_BYTES=50,a.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),r.kMaxLength=f(),a.poolSize=8192,a._augment=function(t){return t.__proto__=a.prototype,t},a.from=function(t,r,e){return s(null,t,r,e)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0})),a.alloc=function(t,r,e){return function(t,r,e,n){return u(r),r<=0?h(t,r):void 0!==e?"string"==typeof n?h(t,r).fill(e,n):h(t,r).fill(e):h(t,r)}(null,t,r,e)},a.allocUnsafe=function(t){return c(null,t)},a.allocUnsafeSlow=function(t){return c(null,t)},a.isBuffer=function(t){return!(null==t||!t._isBuffer)},a.compare=function(t,r){if(!a.isBuffer(t)||!a.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(t===r)return 0;for(var e=t.length,n=r.length,o=0,i=Math.min(e,n);o<i;++o)if(t[o]!==r[o]){e=t[o],n=r[o];break}return e<n?-1:n<e?1:0},a.isEncoding=function(t){switch(String(t).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!0;default:return!1}},a.concat=function(t,r){if(!i(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return a.alloc(0);var e;if(void 0===r)for(r=0,e=0;e<t.length;++e)r+=t[e].length;var n=a.allocUnsafe(r),o=0;for(e=0;e<t.length;++e){var f=t[e];if(!a.isBuffer(f))throw new TypeError('"list" argument must be an Array of Buffers');f.copy(n,o),o+=f.length}return n},a.byteLength=y,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<t;r+=2)w(this,r,r+1);return this},a.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<t;r+=4)w(this,r,r+3),w(this,r+1,r+2);return this},a.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<t;r+=8)w(this,r,r+7),w(this,r+1,r+6),w(this,r+2,r+5),w(this,r+3,r+4);return this},a.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?R(this,0,t):g.apply(this,arguments)},a.prototype.equals=function(t){if(!a.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===a.compare(this,t)},a.prototype.inspect=function(){var t="",e=r.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),"<Buffer "+t+">"},a.prototype.compare=function(t,r,e,n,o){if(!a.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===e&&(e=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),r<0||e>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&r>=e)return 0;if(n>=o)return-1;if(r>=e)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(n>>>=0),f=(e>>>=0)-(r>>>=0),h=Math.min(i,f),s=this.slice(n,o),u=t.slice(r,e),c=0;c<h;++c)if(s[c]!==u[c]){i=s[c],f=u[c];break}return i<f?-1:f<i?1:0},a.prototype.includes=function(t,r,e){return-1!==this.indexOf(t,r,e)},a.prototype.indexOf=function(t,r,e){return v(this,t,r,e,!0)},a.prototype.lastIndexOf=function(t,r,e){return v(this,t,r,e,!1)},a.prototype.write=function(t,r,e,n){if(void 0===r)n="utf8",e=this.length,r=0;else if(void 0===e&&"string"==typeof r)n=r,e=this.length,r=0;else{if(!isFinite(r))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");r|=0,isFinite(e)?(e|=0,void 0===n&&(n="utf8")):(n=e,e=void 0)}var o=this.length-r;if((void 0===e||e>o)&&(e=o),t.length>0&&(e<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return b(this,t,r,e);case"utf8":case"utf-8":return A(this,t,r,e);case"ascii":return _(this,t,r,e);case"latin1":case"binary":return E(this,t,r,e);case"base64":return m(this,t,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,t,r,e);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function B(t,r,e){var n="";e=Math.min(t.length,e);for(var o=r;o<e;++o)n+=String.fromCharCode(127&t[o]);return n}function T(t,r,e){var n="";e=Math.min(t.length,e);for(var o=r;o<e;++o)n+=String.fromCharCode(t[o]);return n}function S(t,r,e){var n=t.length;(!r||r<0)&&(r=0),(!e||e<0||e>n)&&(e=n);for(var o="",i=r;i<e;++i)o+=N(t[i]);return o}function P(t,r,e){for(var n=t.slice(r,e),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function M(t,r,e){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+r>e)throw new RangeError("Trying to access beyond buffer length")}function Y(t,r,e,n,o,i){if(!a.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>o||r<i)throw new RangeError('"value" argument is out of bounds');if(e+n>t.length)throw new RangeError("Index out of range")}function L(t,r,e,n){r<0&&(r=65535+r+1);for(var o=0,i=Math.min(t.length-e,2);o<i;++o)t[e+o]=(r&255<<8*(n?o:1-o))>>>8*(n?o:1-o)}function O(t,r,e,n){r<0&&(r=4294967295+r+1);for(var o=0,i=Math.min(t.length-e,4);o<i;++o)t[e+o]=r>>>8*(n?o:3-o)&255}function I(t,r,e,n,o,i){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function C(t,r,e,n,i){return i||I(t,0,e,4),o.write(t,r,e,n,23,4),e+4}function k(t,r,e,n,i){return i||I(t,0,e,8),o.write(t,r,e,n,52,8),e+8}a.prototype.slice=function(t,r){var e,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r<t&&(r=t),a.TYPED_ARRAY_SUPPORT)(e=this.subarray(t,r)).__proto__=a.prototype;else{var o=r-t;e=new a(o,void 0);for(var i=0;i<o;++i)e[i]=this[i+t]}return e},a.prototype.readUIntLE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t],o=1,i=0;++i<r&&(o*=256);)n+=this[t+i]*o;return n},a.prototype.readUIntBE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t+--r],o=1;r>0&&(o*=256);)n+=this[t+--r]*o;return n},a.prototype.readUInt8=function(t,r){return r||M(t,1,this.length),this[t]},a.prototype.readUInt16LE=function(t,r){return r||M(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUInt16BE=function(t,r){return r||M(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUInt32LE=function(t,r){return r||M(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},a.prototype.readUInt32BE=function(t,r){return r||M(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readIntLE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t],o=1,i=0;++i<r&&(o*=256);)n+=this[t+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*r)),n},a.prototype.readIntBE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=r,o=1,i=this[t+--n];n>0&&(o*=256);)i+=this[t+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*r)),i},a.prototype.readInt8=function(t,r){return r||M(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},a.prototype.readInt16LE=function(t,r){r||M(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},a.prototype.readInt16BE=function(t,r){r||M(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},a.prototype.readInt32LE=function(t,r){return r||M(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,r){return r||M(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readFloatLE=function(t,r){return r||M(t,4,this.length),o.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,r){return r||M(t,4,this.length),o.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,r){return r||M(t,8,this.length),o.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,r){return r||M(t,8,this.length),o.read(this,t,!1,52,8)},a.prototype.writeUIntLE=function(t,r,e,n){(t=+t,r|=0,e|=0,n)||Y(this,t,r,e,Math.pow(2,8*e)-1,0);var o=1,i=0;for(this[r]=255&t;++i<e&&(o*=256);)this[r+i]=t/o&255;return r+e},a.prototype.writeUIntBE=function(t,r,e,n){(t=+t,r|=0,e|=0,n)||Y(this,t,r,e,Math.pow(2,8*e)-1,0);var o=e-1,i=1;for(this[r+o]=255&t;--o>=0&&(i*=256);)this[r+o]=t/i&255;return r+e},a.prototype.writeUInt8=function(t,r,e){return t=+t,r|=0,e||Y(this,t,r,1,255,0),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=255&t,r+1},a.prototype.writeUInt16LE=function(t,r,e){return t=+t,r|=0,e||Y(this,t,r,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):L(this,t,r,!0),r+2},a.prototype.writeUInt16BE=function(t,r,e){return t=+t,r|=0,e||Y(this,t,r,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):L(this,t,r,!1),r+2},a.prototype.writeUInt32LE=function(t,r,e){return t=+t,r|=0,e||Y(this,t,r,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t):O(this,t,r,!0),r+4},a.prototype.writeUInt32BE=function(t,r,e){return t=+t,r|=0,e||Y(this,t,r,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):O(this,t,r,!1),r+4},a.prototype.writeIntLE=function(t,r,e,n){if(t=+t,r|=0,!n){var o=Math.pow(2,8*e-1);Y(this,t,r,e,o-1,-o)}var i=0,f=1,h=0;for(this[r]=255&t;++i<e&&(f*=256);)t<0&&0===h&&0!==this[r+i-1]&&(h=1),this[r+i]=(t/f>>0)-h&255;return r+e},a.prototype.writeIntBE=function(t,r,e,n){if(t=+t,r|=0,!n){var o=Math.pow(2,8*e-1);Y(this,t,r,e,o-1,-o)}var i=e-1,f=1,h=0;for(this[r+i]=255&t;--i>=0&&(f*=256);)t<0&&0===h&&0!==this[r+i+1]&&(h=1),this[r+i]=(t/f>>0)-h&255;return r+e},a.prototype.writeInt8=function(t,r,e){return t=+t,r|=0,e||Y(this,t,r,1,127,-128),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[r]=255&t,r+1},a.prototype.writeInt16LE=function(t,r,e){return t=+t,r|=0,e||Y(this,t,r,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):L(this,t,r,!0),r+2},a.prototype.writeInt16BE=function(t,r,e){return t=+t,r|=0,e||Y(this,t,r,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):L(this,t,r,!1),r+2},a.prototype.writeInt32LE=function(t,r,e){return t=+t,r|=0,e||Y(this,t,r,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):O(this,t,r,!0),r+4},a.prototype.writeInt32BE=function(t,r,e){return t=+t,r|=0,e||Y(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),a.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):O(this,t,r,!1),r+4},a.prototype.writeFloatLE=function(t,r,e){return C(this,t,r,!0,e)},a.prototype.writeFloatBE=function(t,r,e){return C(this,t,r,!1,e)},a.prototype.writeDoubleLE=function(t,r,e){return k(this,t,r,!0,e)},a.prototype.writeDoubleBE=function(t,r,e){return k(this,t,r,!1,e)},a.prototype.copy=function(t,r,e,n){if(e||(e=0),n||0===n||(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n<e&&(n=e),n===e)return 0;if(0===t.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(e<0||e>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-r<n-e&&(n=t.length-r+e);var o,i=n-e;if(this===t&&e<r&&r<n)for(o=i-1;o>=0;--o)t[o+r]=this[o+e];else if(i<1e3||!a.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)t[o+r]=this[o+e];else Uint8Array.prototype.set.call(t,this.subarray(e,e+i),r);return i},a.prototype.fill=function(t,r,e,n){if("string"==typeof t){if("string"==typeof r?(n=r,r=0,e=this.length):"string"==typeof e&&(n=e,e=this.length),1===t.length){var o=t.charCodeAt(0);o<256&&(t=o)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!a.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(r<0||this.length<r||this.length<e)throw new RangeError("Out of range index");if(e<=r)return this;var i;if(r>>>=0,e=void 0===e?this.length:e>>>0,t||(t=0),"number"==typeof t)for(i=r;i<e;++i)this[i]=t;else{var f=a.isBuffer(t)?t:K(new a(t,n).toString()),h=f.length;for(i=0;i<e-r;++i)this[i+r]=f[i%h]}return this};var D=/[^+\/0-9A-Za-z-_]/g;function N(t){return t<16?"0"+t.toString(16):t.toString(16)}function K(t,r){var e;r=r||1/0;for(var n=t.length,o=null,i=[],f=0;f<n;++f){if((e=t.charCodeAt(f))>55295&&e<57344){if(!o){if(e>56319){(r-=3)>-1&&i.push(239,191,189);continue}if(f+1===n){(r-=3)>-1&&i.push(239,191,189);continue}o=e;continue}if(e<56320){(r-=3)>-1&&i.push(239,191,189),o=e;continue}e=65536+(o-55296<<10|e-56320)}else o&&(r-=3)>-1&&i.push(239,191,189);if(o=null,e<128){if((r-=1)<0)break;i.push(e)}else if(e<2048){if((r-=2)<0)break;i.push(e>>6|192,63&e|128)}else if(e<65536){if((r-=3)<0)break;i.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;i.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return i}function z(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(D,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function j(t,r,e,n){for(var o=0;o<n&&!(o+e>=r.length||o>=t.length);++o)r[o+e]=t[o];return o}}).call(this,e(6))},function(t,r){var e;e=function(){return this}();try{e=e||new Function("return this")()}catch(t){"object"==typeof window&&(e=window)}t.exports=e},function(t,r,e){"use strict";r.byteLength=function(t){var r=s(t),e=r[0],n=r[1];return 3*(e+n)/4-n},r.toByteArray=function(t){var r,e,n=s(t),f=n[0],h=n[1],a=new i(function(t,r,e){return 3*(r+e)/4-e}(0,f,h)),u=0,c=h>0?f-4:f;for(e=0;e<c;e+=4)r=o[t.charCodeAt(e)]<<18|o[t.charCodeAt(e+1)]<<12|o[t.charCodeAt(e+2)]<<6|o[t.charCodeAt(e+3)],a[u++]=r>>16&255,a[u++]=r>>8&255,a[u++]=255&r;2===h&&(r=o[t.charCodeAt(e)]<<2|o[t.charCodeAt(e+1)]>>4,a[u++]=255&r);1===h&&(r=o[t.charCodeAt(e)]<<10|o[t.charCodeAt(e+1)]<<4|o[t.charCodeAt(e+2)]>>2,a[u++]=r>>8&255,a[u++]=255&r);return a},r.fromByteArray=function(t){for(var r,e=t.length,o=e%3,i=[],f=0,h=e-o;f<h;f+=16383)i.push(u(t,f,f+16383>h?h:f+16383));1===o?(r=t[e-1],i.push(n[r>>2]+n[r<<4&63]+"==")):2===o&&(r=(t[e-2]<<8)+t[e-1],i.push(n[r>>10]+n[r>>4&63]+n[r<<2&63]+"="));return i.join("")};for(var n=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=0,a=f.length;h<a;++h)n[h]=f[h],o[f.charCodeAt(h)]=h;function s(t){var r=t.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var e=t.indexOf("=");return-1===e&&(e=r),[e,e===r?0:4-e%4]}function u(t,r,e){for(var o,i,f=[],h=r;h<e;h+=3)o=(t[h]<<16&16711680)+(t[h+1]<<8&65280)+(255&t[h+2]),f.push(n[(i=o)>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return f.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(t,r){ | ||
var e=n(5),o=n(6),i=n(7);function f(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function h(t,r){if(f()<r)throw new RangeError("Invalid typed array length");return a.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(r)).__proto__=a.prototype:(null===t&&(t=new a(r)),t.length=r),t}function a(t,r,n){if(!(a.TYPED_ARRAY_SUPPORT||this instanceof a))return new a(t,r,n);if("number"==typeof t){if("string"==typeof r)throw new Error("If encoding is specified then the first argument must be a string");return c(this,t)}return s(this,t,r,n)}function s(t,r,n,e){if("number"==typeof r)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&r instanceof ArrayBuffer?function(t,r,n,e){if(r.byteLength,n<0||r.byteLength<n)throw new RangeError("'offset' is out of bounds");if(r.byteLength<n+(e||0))throw new RangeError("'length' is out of bounds");r=void 0===n&&void 0===e?new Uint8Array(r):void 0===e?new Uint8Array(r,n):new Uint8Array(r,n,e);a.TYPED_ARRAY_SUPPORT?(t=r).__proto__=a.prototype:t=l(t,r);return t}(t,r,n,e):"string"==typeof r?function(t,r,n){"string"==typeof n&&""!==n||(n="utf8");if(!a.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var e=0|y(r,n),o=(t=h(t,e)).write(r,n);o!==e&&(t=t.slice(0,o));return t}(t,r,n):function(t,r){if(a.isBuffer(r)){var n=0|p(r.length);return 0===(t=h(t,n)).length||r.copy(t,0,0,n),t}if(r){if("undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r)return"number"!=typeof r.length||(e=r.length)!=e?h(t,0):l(t,r);if("Buffer"===r.type&&i(r.data))return l(t,r.data)}var e;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,r)}function u(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function c(t,r){if(u(r),t=h(t,r<0?0:0|p(r)),!a.TYPED_ARRAY_SUPPORT)for(var n=0;n<r;++n)t[n]=0;return t}function l(t,r){var n=r.length<0?0:0|p(r.length);t=h(t,n);for(var e=0;e<n;e+=1)t[e]=255&r[e];return t}function p(t){if(t>=f())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+f().toString(16)+" bytes");return 0|t}function y(t,r){if(a.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var e=!1;;)switch(r){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return K(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(t).length;default:if(e)return K(t).length;r=(""+r).toLowerCase(),e=!0}}function g(t,r,n){var e=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(r>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return S(this,r,n);case"utf8":case"utf-8":return B(this,r,n);case"ascii":return T(this,r,n);case"latin1":case"binary":return P(this,r,n);case"base64":return R(this,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,r,n);default:if(e)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),e=!0}}function w(t,r,n){var e=t[r];t[r]=t[n],t[n]=e}function v(t,r,n,e,o){if(0===t.length)return-1;if("string"==typeof n?(e=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(o)return-1;n=t.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof r&&(r=a.from(r,e)),a.isBuffer(r))return 0===r.length?-1:d(t,r,n,e,o);if("number"==typeof r)return r&=255,a.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,r,n):Uint8Array.prototype.lastIndexOf.call(t,r,n):d(t,[r],n,e,o);throw new TypeError("val must be string, number or Buffer")}function d(t,r,n,e,o){var i,f=1,h=t.length,a=r.length;if(void 0!==e&&("ucs2"===(e=String(e).toLowerCase())||"ucs-2"===e||"utf16le"===e||"utf-16le"===e)){if(t.length<2||r.length<2)return-1;f=2,h/=2,a/=2,n/=2}function s(t,r){return 1===f?t[r]:t.readUInt16BE(r*f)}if(o){var u=-1;for(i=n;i<h;i++)if(s(t,i)===s(r,-1===u?0:i-u)){if(-1===u&&(u=i),i-u+1===a)return u*f}else-1!==u&&(i-=i-u),u=-1}else for(n+a>h&&(n=h-a),i=n;i>=0;i--){for(var c=!0,l=0;l<a;l++)if(s(t,i+l)!==s(r,l)){c=!1;break}if(c)return i}return-1}function b(t,r,n,e){n=Number(n)||0;var o=t.length-n;e?(e=Number(e))>o&&(e=o):e=o;var i=r.length;if(i%2!=0)throw new TypeError("Invalid hex string");e>i/2&&(e=i/2);for(var f=0;f<e;++f){var h=parseInt(r.substr(2*f,2),16);if(isNaN(h))return f;t[n+f]=h}return f}function A(t,r,n,e){return j(K(r,t.length-n),t,n,e)}function _(t,r,n,e){return j(function(t){for(var r=[],n=0;n<t.length;++n)r.push(255&t.charCodeAt(n));return r}(r),t,n,e)}function E(t,r,n,e){return _(t,r,n,e)}function U(t,r,n,e){return j(z(r),t,n,e)}function m(t,r,n,e){return j(function(t,r){for(var n,e,o,i=[],f=0;f<t.length&&!((r-=2)<0);++f)n=t.charCodeAt(f),e=n>>8,o=n%256,i.push(o),i.push(e);return i}(r,t.length-n),t,n,e)}function R(t,r,n){return 0===r&&n===t.length?e.fromByteArray(t):e.fromByteArray(t.slice(r,n))}function B(t,r,n){n=Math.min(t.length,n);for(var e=[],o=r;o<n;){var i,f,h,a,s=t[o],u=null,c=s>239?4:s>223?3:s>191?2:1;if(o+c<=n)switch(c){case 1:s<128&&(u=s);break;case 2:128==(192&(i=t[o+1]))&&(a=(31&s)<<6|63&i)>127&&(u=a);break;case 3:i=t[o+1],f=t[o+2],128==(192&i)&&128==(192&f)&&(a=(15&s)<<12|(63&i)<<6|63&f)>2047&&(a<55296||a>57343)&&(u=a);break;case 4:i=t[o+1],f=t[o+2],h=t[o+3],128==(192&i)&&128==(192&f)&&128==(192&h)&&(a=(15&s)<<18|(63&i)<<12|(63&f)<<6|63&h)>65535&&a<1114112&&(u=a)}null===u?(u=65533,c=1):u>65535&&(u-=65536,e.push(u>>>10&1023|55296),u=56320|1023&u),e.push(u),o+=c}return function(t){var r=t.length;if(r<=4096)return String.fromCharCode.apply(String,t);var n="",e=0;for(;e<r;)n+=String.fromCharCode.apply(String,t.slice(e,e+=4096));return n}(e)}r.Buffer=a,r.SlowBuffer=function(t){+t!=t&&(t=0);return a.alloc(+t)},r.INSPECT_MAX_BYTES=50,a.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),r.kMaxLength=f(),a.poolSize=8192,a._augment=function(t){return t.__proto__=a.prototype,t},a.from=function(t,r,n){return s(null,t,r,n)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0})),a.alloc=function(t,r,n){return function(t,r,n,e){return u(r),r<=0?h(t,r):void 0!==n?"string"==typeof e?h(t,r).fill(n,e):h(t,r).fill(n):h(t,r)}(null,t,r,n)},a.allocUnsafe=function(t){return c(null,t)},a.allocUnsafeSlow=function(t){return c(null,t)},a.isBuffer=function(t){return!(null==t||!t._isBuffer)},a.compare=function(t,r){if(!a.isBuffer(t)||!a.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(t===r)return 0;for(var n=t.length,e=r.length,o=0,i=Math.min(n,e);o<i;++o)if(t[o]!==r[o]){n=t[o],e=r[o];break}return n<e?-1:e<n?1:0},a.isEncoding=function(t){switch(String(t).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!0;default:return!1}},a.concat=function(t,r){if(!i(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return a.alloc(0);var n;if(void 0===r)for(r=0,n=0;n<t.length;++n)r+=t[n].length;var e=a.allocUnsafe(r),o=0;for(n=0;n<t.length;++n){var f=t[n];if(!a.isBuffer(f))throw new TypeError('"list" argument must be an Array of Buffers');f.copy(e,o),o+=f.length}return e},a.byteLength=y,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<t;r+=2)w(this,r,r+1);return this},a.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<t;r+=4)w(this,r,r+3),w(this,r+1,r+2);return this},a.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<t;r+=8)w(this,r,r+7),w(this,r+1,r+6),w(this,r+2,r+5),w(this,r+3,r+4);return this},a.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?B(this,0,t):g.apply(this,arguments)},a.prototype.equals=function(t){if(!a.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===a.compare(this,t)},a.prototype.inspect=function(){var t="",n=r.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),"<Buffer "+t+">"},a.prototype.compare=function(t,r,n,e,o){if(!a.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===n&&(n=t?t.length:0),void 0===e&&(e=0),void 0===o&&(o=this.length),r<0||n>t.length||e<0||o>this.length)throw new RangeError("out of range index");if(e>=o&&r>=n)return 0;if(e>=o)return-1;if(r>=n)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(e>>>=0),f=(n>>>=0)-(r>>>=0),h=Math.min(i,f),s=this.slice(e,o),u=t.slice(r,n),c=0;c<h;++c)if(s[c]!==u[c]){i=s[c],f=u[c];break}return i<f?-1:f<i?1:0},a.prototype.includes=function(t,r,n){return-1!==this.indexOf(t,r,n)},a.prototype.indexOf=function(t,r,n){return v(this,t,r,n,!0)},a.prototype.lastIndexOf=function(t,r,n){return v(this,t,r,n,!1)},a.prototype.write=function(t,r,n,e){if(void 0===r)e="utf8",n=this.length,r=0;else if(void 0===n&&"string"==typeof r)e=r,n=this.length,r=0;else{if(!isFinite(r))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");r|=0,isFinite(n)?(n|=0,void 0===e&&(e="utf8")):(e=n,n=void 0)}var o=this.length-r;if((void 0===n||n>o)&&(n=o),t.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");e||(e="utf8");for(var i=!1;;)switch(e){case"hex":return b(this,t,r,n);case"utf8":case"utf-8":return A(this,t,r,n);case"ascii":return _(this,t,r,n);case"latin1":case"binary":return E(this,t,r,n);case"base64":return U(this,t,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return m(this,t,r,n);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(""+e).toLowerCase(),i=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function T(t,r,n){var e="";n=Math.min(t.length,n);for(var o=r;o<n;++o)e+=String.fromCharCode(127&t[o]);return e}function P(t,r,n){var e="";n=Math.min(t.length,n);for(var o=r;o<n;++o)e+=String.fromCharCode(t[o]);return e}function S(t,r,n){var e=t.length;(!r||r<0)&&(r=0),(!n||n<0||n>e)&&(n=e);for(var o="",i=r;i<n;++i)o+=N(t[i]);return o}function x(t,r,n){for(var e=t.slice(r,n),o="",i=0;i<e.length;i+=2)o+=String.fromCharCode(e[i]+256*e[i+1]);return o}function M(t,r,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+r>n)throw new RangeError("Trying to access beyond buffer length")}function Y(t,r,n,e,o,i){if(!a.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>o||r<i)throw new RangeError('"value" argument is out of bounds');if(n+e>t.length)throw new RangeError("Index out of range")}function L(t,r,n,e){r<0&&(r=65535+r+1);for(var o=0,i=Math.min(t.length-n,2);o<i;++o)t[n+o]=(r&255<<8*(e?o:1-o))>>>8*(e?o:1-o)}function O(t,r,n,e){r<0&&(r=4294967295+r+1);for(var o=0,i=Math.min(t.length-n,4);o<i;++o)t[n+o]=r>>>8*(e?o:3-o)&255}function I(t,r,n,e,o,i){if(n+e>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function k(t,r,n,e,i){return i||I(t,0,n,4),o.write(t,r,n,e,23,4),n+4}function C(t,r,n,e,i){return i||I(t,0,n,8),o.write(t,r,n,e,52,8),n+8}a.prototype.slice=function(t,r){var n,e=this.length;if((t=~~t)<0?(t+=e)<0&&(t=0):t>e&&(t=e),(r=void 0===r?e:~~r)<0?(r+=e)<0&&(r=0):r>e&&(r=e),r<t&&(r=t),a.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,r)).__proto__=a.prototype;else{var o=r-t;n=new a(o,void 0);for(var i=0;i<o;++i)n[i]=this[i+t]}return n},a.prototype.readUIntLE=function(t,r,n){t|=0,r|=0,n||M(t,r,this.length);for(var e=this[t],o=1,i=0;++i<r&&(o*=256);)e+=this[t+i]*o;return e},a.prototype.readUIntBE=function(t,r,n){t|=0,r|=0,n||M(t,r,this.length);for(var e=this[t+--r],o=1;r>0&&(o*=256);)e+=this[t+--r]*o;return e},a.prototype.readUInt8=function(t,r){return r||M(t,1,this.length),this[t]},a.prototype.readUInt16LE=function(t,r){return r||M(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUInt16BE=function(t,r){return r||M(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUInt32LE=function(t,r){return r||M(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},a.prototype.readUInt32BE=function(t,r){return r||M(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readIntLE=function(t,r,n){t|=0,r|=0,n||M(t,r,this.length);for(var e=this[t],o=1,i=0;++i<r&&(o*=256);)e+=this[t+i]*o;return e>=(o*=128)&&(e-=Math.pow(2,8*r)),e},a.prototype.readIntBE=function(t,r,n){t|=0,r|=0,n||M(t,r,this.length);for(var e=r,o=1,i=this[t+--e];e>0&&(o*=256);)i+=this[t+--e]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*r)),i},a.prototype.readInt8=function(t,r){return r||M(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},a.prototype.readInt16LE=function(t,r){r||M(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt16BE=function(t,r){r||M(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt32LE=function(t,r){return r||M(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,r){return r||M(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readFloatLE=function(t,r){return r||M(t,4,this.length),o.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,r){return r||M(t,4,this.length),o.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,r){return r||M(t,8,this.length),o.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,r){return r||M(t,8,this.length),o.read(this,t,!1,52,8)},a.prototype.writeUIntLE=function(t,r,n,e){(t=+t,r|=0,n|=0,e)||Y(this,t,r,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[r]=255&t;++i<n&&(o*=256);)this[r+i]=t/o&255;return r+n},a.prototype.writeUIntBE=function(t,r,n,e){(t=+t,r|=0,n|=0,e)||Y(this,t,r,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[r+o]=255&t;--o>=0&&(i*=256);)this[r+o]=t/i&255;return r+n},a.prototype.writeUInt8=function(t,r,n){return t=+t,r|=0,n||Y(this,t,r,1,255,0),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=255&t,r+1},a.prototype.writeUInt16LE=function(t,r,n){return t=+t,r|=0,n||Y(this,t,r,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):L(this,t,r,!0),r+2},a.prototype.writeUInt16BE=function(t,r,n){return t=+t,r|=0,n||Y(this,t,r,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):L(this,t,r,!1),r+2},a.prototype.writeUInt32LE=function(t,r,n){return t=+t,r|=0,n||Y(this,t,r,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t):O(this,t,r,!0),r+4},a.prototype.writeUInt32BE=function(t,r,n){return t=+t,r|=0,n||Y(this,t,r,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):O(this,t,r,!1),r+4},a.prototype.writeIntLE=function(t,r,n,e){if(t=+t,r|=0,!e){var o=Math.pow(2,8*n-1);Y(this,t,r,n,o-1,-o)}var i=0,f=1,h=0;for(this[r]=255&t;++i<n&&(f*=256);)t<0&&0===h&&0!==this[r+i-1]&&(h=1),this[r+i]=(t/f>>0)-h&255;return r+n},a.prototype.writeIntBE=function(t,r,n,e){if(t=+t,r|=0,!e){var o=Math.pow(2,8*n-1);Y(this,t,r,n,o-1,-o)}var i=n-1,f=1,h=0;for(this[r+i]=255&t;--i>=0&&(f*=256);)t<0&&0===h&&0!==this[r+i+1]&&(h=1),this[r+i]=(t/f>>0)-h&255;return r+n},a.prototype.writeInt8=function(t,r,n){return t=+t,r|=0,n||Y(this,t,r,1,127,-128),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[r]=255&t,r+1},a.prototype.writeInt16LE=function(t,r,n){return t=+t,r|=0,n||Y(this,t,r,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):L(this,t,r,!0),r+2},a.prototype.writeInt16BE=function(t,r,n){return t=+t,r|=0,n||Y(this,t,r,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):L(this,t,r,!1),r+2},a.prototype.writeInt32LE=function(t,r,n){return t=+t,r|=0,n||Y(this,t,r,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):O(this,t,r,!0),r+4},a.prototype.writeInt32BE=function(t,r,n){return t=+t,r|=0,n||Y(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),a.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):O(this,t,r,!1),r+4},a.prototype.writeFloatLE=function(t,r,n){return k(this,t,r,!0,n)},a.prototype.writeFloatBE=function(t,r,n){return k(this,t,r,!1,n)},a.prototype.writeDoubleLE=function(t,r,n){return C(this,t,r,!0,n)},a.prototype.writeDoubleBE=function(t,r,n){return C(this,t,r,!1,n)},a.prototype.copy=function(t,r,n,e){if(n||(n=0),e||0===e||(e=this.length),r>=t.length&&(r=t.length),r||(r=0),e>0&&e<n&&(e=n),e===n)return 0;if(0===t.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(e<0)throw new RangeError("sourceEnd out of bounds");e>this.length&&(e=this.length),t.length-r<e-n&&(e=t.length-r+n);var o,i=e-n;if(this===t&&n<r&&r<e)for(o=i-1;o>=0;--o)t[o+r]=this[o+n];else if(i<1e3||!a.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)t[o+r]=this[o+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+i),r);return i},a.prototype.fill=function(t,r,n,e){if("string"==typeof t){if("string"==typeof r?(e=r,r=0,n=this.length):"string"==typeof n&&(e=n,n=this.length),1===t.length){var o=t.charCodeAt(0);o<256&&(t=o)}if(void 0!==e&&"string"!=typeof e)throw new TypeError("encoding must be a string");if("string"==typeof e&&!a.isEncoding(e))throw new TypeError("Unknown encoding: "+e)}else"number"==typeof t&&(t&=255);if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;var i;if(r>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(i=r;i<n;++i)this[i]=t;else{var f=a.isBuffer(t)?t:K(new a(t,e).toString()),h=f.length;for(i=0;i<n-r;++i)this[i+r]=f[i%h]}return this};var D=/[^+\/0-9A-Za-z-_]/g;function N(t){return t<16?"0"+t.toString(16):t.toString(16)}function K(t,r){var n;r=r||1/0;for(var e=t.length,o=null,i=[],f=0;f<e;++f){if((n=t.charCodeAt(f))>55295&&n<57344){if(!o){if(n>56319){(r-=3)>-1&&i.push(239,191,189);continue}if(f+1===e){(r-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(r-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(r-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((r-=1)<0)break;i.push(n)}else if(n<2048){if((r-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((r-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function z(t){return e.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(D,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function j(t,r,n,e){for(var o=0;o<e&&!(o+n>=r.length||o>=t.length);++o)r[o+n]=t[o];return o}}).call(this,n(4))},function(t,r){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,r,n){"use strict";r.byteLength=function(t){var r=s(t),n=r[0],e=r[1];return 3*(n+e)/4-e},r.toByteArray=function(t){var r,n,e=s(t),f=e[0],h=e[1],a=new i(function(t,r,n){return 3*(r+n)/4-n}(0,f,h)),u=0,c=h>0?f-4:f;for(n=0;n<c;n+=4)r=o[t.charCodeAt(n)]<<18|o[t.charCodeAt(n+1)]<<12|o[t.charCodeAt(n+2)]<<6|o[t.charCodeAt(n+3)],a[u++]=r>>16&255,a[u++]=r>>8&255,a[u++]=255&r;2===h&&(r=o[t.charCodeAt(n)]<<2|o[t.charCodeAt(n+1)]>>4,a[u++]=255&r);1===h&&(r=o[t.charCodeAt(n)]<<10|o[t.charCodeAt(n+1)]<<4|o[t.charCodeAt(n+2)]>>2,a[u++]=r>>8&255,a[u++]=255&r);return a},r.fromByteArray=function(t){for(var r,n=t.length,o=n%3,i=[],f=0,h=n-o;f<h;f+=16383)i.push(u(t,f,f+16383>h?h:f+16383));1===o?(r=t[n-1],i.push(e[r>>2]+e[r<<4&63]+"==")):2===o&&(r=(t[n-2]<<8)+t[n-1],i.push(e[r>>10]+e[r>>4&63]+e[r<<2&63]+"="));return i.join("")};for(var e=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=0,a=f.length;h<a;++h)e[h]=f[h],o[f.charCodeAt(h)]=h;function s(t){var r=t.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=r),[n,n===r?0:4-n%4]}function u(t,r,n){for(var o,i,f=[],h=r;h<n;h+=3)o=(t[h]<<16&16711680)+(t[h+1]<<8&65280)+(255&t[h+2]),f.push(e[(i=o)>>18&63]+e[i>>12&63]+e[i>>6&63]+e[63&i]);return f.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(t,r){ | ||
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */ | ||
r.read=function(t,r,e,n,o){var i,f,h=8*o-n-1,a=(1<<h)-1,s=a>>1,u=-7,c=e?o-1:0,l=e?-1:1,p=t[r+c];for(c+=l,i=p&(1<<-u)-1,p>>=-u,u+=h;u>0;i=256*i+t[r+c],c+=l,u-=8);for(f=i&(1<<-u)-1,i>>=-u,u+=n;u>0;f=256*f+t[r+c],c+=l,u-=8);if(0===i)i=1-s;else{if(i===a)return f?NaN:1/0*(p?-1:1);f+=Math.pow(2,n),i-=s}return(p?-1:1)*f*Math.pow(2,i-n)},r.write=function(t,r,e,n,o,i){var f,h,a,s=8*i-o-1,u=(1<<s)-1,c=u>>1,l=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,y=n?1:-1,g=r<0||0===r&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(h=isNaN(r)?1:0,f=u):(f=Math.floor(Math.log(r)/Math.LN2),r*(a=Math.pow(2,-f))<1&&(f--,a*=2),(r+=f+c>=1?l/a:l*Math.pow(2,1-c))*a>=2&&(f++,a/=2),f+c>=u?(h=0,f=u):f+c>=1?(h=(r*a-1)*Math.pow(2,o),f+=c):(h=r*Math.pow(2,c-1)*Math.pow(2,o),f=0));o>=8;t[e+p]=255&h,p+=y,h/=256,o-=8);for(f=f<<o|h,s+=o;s>0;t[e+p]=255&f,p+=y,f/=256,s-=8);t[e+p-y]|=128*g}},function(t,r){var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},function(t,r,e){var n=e(2);t.exports=function(t){if(Array.isArray(t))return n(t)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,r){t.exports=function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,r,e){var n=e(2);t.exports=function(t,r){if(t){if("string"==typeof t)return n(t,r);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?n(t,r):void 0}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,r){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,r){}])})); | ||
r.read=function(t,r,n,e,o){var i,f,h=8*o-e-1,a=(1<<h)-1,s=a>>1,u=-7,c=n?o-1:0,l=n?-1:1,p=t[r+c];for(c+=l,i=p&(1<<-u)-1,p>>=-u,u+=h;u>0;i=256*i+t[r+c],c+=l,u-=8);for(f=i&(1<<-u)-1,i>>=-u,u+=e;u>0;f=256*f+t[r+c],c+=l,u-=8);if(0===i)i=1-s;else{if(i===a)return f?NaN:1/0*(p?-1:1);f+=Math.pow(2,e),i-=s}return(p?-1:1)*f*Math.pow(2,i-e)},r.write=function(t,r,n,e,o,i){var f,h,a,s=8*i-o-1,u=(1<<s)-1,c=u>>1,l=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=e?0:i-1,y=e?1:-1,g=r<0||0===r&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(h=isNaN(r)?1:0,f=u):(f=Math.floor(Math.log(r)/Math.LN2),r*(a=Math.pow(2,-f))<1&&(f--,a*=2),(r+=f+c>=1?l/a:l*Math.pow(2,1-c))*a>=2&&(f++,a/=2),f+c>=u?(h=0,f=u):f+c>=1?(h=(r*a-1)*Math.pow(2,o),f+=c):(h=r*Math.pow(2,c-1)*Math.pow(2,o),f=0));o>=8;t[n+p]=255&h,p+=y,h/=256,o-=8);for(f=f<<o|h,s+=o;s>0;t[n+p]=255&f,p+=y,f/=256,s-=8);t[n+p-y]|=128*g}},function(t,r){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,r){}])})); | ||
//# sourceMappingURL=openloginEd25519.umd.min.js.map |
{ | ||
"name": "@toruslabs/openlogin-ed25519", | ||
"version": "1.3.3", | ||
"version": "1.3.4", | ||
"homepage": "https://github.com/torusresearch/OpenLoginSdk#readme", | ||
@@ -48,6 +48,6 @@ "license": "ISC", | ||
}, | ||
"gitHead": "32e42a6286cb30e22216499ceb2df3f843de654a", | ||
"gitHead": "62b1052bbab91ae5ce287bc320d3667b60a25a65", | ||
"devDependencies": { | ||
"lint-staged": "^12.1.2" | ||
"lint-staged": "^12.1.7" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1
431857
2291